tabs-output-rule.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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.TabsOutputRule = void 0;
  8. const schematics_1 = require("@angular/cdk/schematics");
  9. class TabsOutputRule extends schematics_1.Migration {
  10. constructor() {
  11. super(...arguments);
  12. this.enabled = false;
  13. }
  14. visitTemplate(template) {
  15. (0, schematics_1.findOutputsOnElementWithTag)(template.content, 'nzOnNextClick', ['nz-tabset'])
  16. .forEach(offset => {
  17. this.failures.push({
  18. filePath: template.filePath,
  19. position: template.getCharacterAndLineOfPosition(offset),
  20. message: `Found deprecated output '(nzOnNextClick)'. Please manually remove this output.`
  21. });
  22. });
  23. (0, schematics_1.findOutputsOnElementWithTag)(template.content, 'nzOnPrevClick', ['nz-tabset'])
  24. .forEach(offset => {
  25. this.failures.push({
  26. filePath: template.filePath,
  27. position: template.getCharacterAndLineOfPosition(offset),
  28. message: `Found deprecated output '(nzOnPrevClick)'. Please manually remove this output.`
  29. });
  30. });
  31. }
  32. }
  33. exports.TabsOutputRule = TabsOutputRule;
  34. //# sourceMappingURL=tabs-output-rule.js.map