carousel-like-template-rule.js 1.0 KB

1234567891011121314151617181920212223242526
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. Object.defineProperty(exports, "__esModule", { value: true });
  7. exports.CarouselTemplateRule = void 0;
  8. const schematics_1 = require("@angular/cdk/schematics");
  9. class CarouselTemplateRule extends schematics_1.Migration {
  10. constructor() {
  11. super(...arguments);
  12. this.enabled = false;
  13. }
  14. visitTemplate(template) {
  15. (0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzVertical', ['nz-carousel'])
  16. .forEach(offset => {
  17. this.failures.push({
  18. filePath: template.filePath,
  19. position: template.getCharacterAndLineOfPosition(offset),
  20. message: `Found deprecated "[nzVertical]" input. Use "[nzDotPosition]" to instead please.`
  21. });
  22. });
  23. }
  24. }
  25. exports.CarouselTemplateRule = CarouselTemplateRule;
  26. //# sourceMappingURL=carousel-like-template-rule.js.map