This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CalendarTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class CalendarTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzCard', ['nz-calendar'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input "nzCard" component. Use "nzFullscreen" to instead please.`
});
});
}
}
exports.CalendarTemplateRule = CalendarTemplateRule;
//# sourceMappingURL=calendar-input-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"calendar-input-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/calendar-input-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAA+G;AAE/G,MAAa,oBAAqB,SAAQ,sBAAsB;IAAhE;;QAEE,YAAO,GAAG,KAAK,CAAC;IAclB,CAAC;IAZC,aAAa,CAAC,QAA0B;QAEtC,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,aAAa,CAAC,CAAC;aACpE,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,kFAAkF;aAC5F,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IAEN,CAAC;CACF;AAhBD,oDAgBC"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"carousel-like-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/carousel-like-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAA+G;AAE/G,MAAa,oBAAqB,SAAQ,sBAAsB;IAAhE;;QAEE,YAAO,GAAG,KAAK,CAAC;IAclB,CAAC;IAZC,aAAa,CAAC,QAA0B;QAEtC,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,aAAa,CAAC,CAAC;aACxE,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,iFAAiF;aAC3F,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IAEP,CAAC;CACF;AAhBD,oDAgBC"}

View File

@@ -0,0 +1,30 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DropdownClassRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const ts = require("typescript");
class DropdownClassRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitNode(node) {
if (ts.isIdentifier(node)) {
this._visitIdentifier(node);
}
}
_visitIdentifier(identifier) {
if (identifier.getText() === 'NzDropdownContextComponent') {
this.createFailureAtNode(identifier, `Found "NzDropdownContextComponent" which has been removed. Your code need to be updated.`);
}
if (identifier.getText() === 'NzDropdownService') {
this.createFailureAtNode(identifier, `Found usage of "NzDropdownService" which has been removed. Please use "NzContextMenuService" instead.`);
}
}
}
exports.DropdownClassRule = DropdownClassRule;
//# sourceMappingURL=dropdown-class-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dropdown-class-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/dropdown-class-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAiE;AAEjE,iCAAiC;AAEjC,MAAa,iBAAkB,SAAQ,sBAAsB;IAA7D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAqBlB,CAAC;IAnBC,SAAS,CAAC,IAAa;QACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAEO,gBAAgB,CAAC,UAAyB;QAChD,IAAI,UAAU,CAAC,OAAO,EAAE,KAAK,4BAA4B,EAAE,CAAC;YAC1D,IAAI,CAAC,mBAAmB,CACtB,UAAU,EACV,0FAA0F,CAAC,CAAC;QAChG,CAAC;QAED,IAAI,UAAU,CAAC,OAAO,EAAE,KAAK,mBAAmB,EAAE,CAAC;YACjD,IAAI,CAAC,mBAAmB,CACtB,UAAU,EACV,uGAAuG,CAAC,CAAC;QAC7G,CAAC;IACH,CAAC;CACF;AAvBD,8CAuBC"}

View File

@@ -0,0 +1,29 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DropdownTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const deprecated_component_1 = require("../utils/deprecated-component");
class DropdownTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
this.deprecatedComponents = [{
replace: 'nz-dropdown',
replaceWith: '[nz-dropdown]'
}, {
replace: 'nz-dropdown-button',
replaceWith: '[nz-dropdown]'
}];
}
visitTemplate(template) {
this.deprecatedComponents.forEach(data => {
this.failures.push(...(0, deprecated_component_1.deprecatedComponent)(template, data.replace, data.replaceWith));
});
}
}
exports.DropdownTemplateRule = DropdownTemplateRule;
//# sourceMappingURL=dropdown-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"dropdown-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/dropdown-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAKiC;AAEjC,wEAAoE;AAEpE,MAAa,oBAAqB,SAAQ,sBAAsB;IAAhE;;QAEE,YAAO,GAAG,KAAK,CAAC;QAEhB,yBAAoB,GAAiC,CAAC;gBACpD,OAAO,EAAE,aAAa;gBACtB,WAAW,EAAE,eAAe;aAC7B,EAAE;gBACD,OAAO,EAAE,oBAAoB;gBAC7B,WAAW,EAAE,eAAe;aAC7B,CAAC,CAAA;IAOJ,CAAC;IALC,aAAa,CAAC,QAA0B;QACtC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAA,0CAAmB,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACvF,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAjBD,oDAiBC"}

View File

@@ -0,0 +1,29 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const deprecated_component_1 = require("../utils/deprecated-component");
class FormTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
this.deprecatedComponents = [{
replace: 'nz-form-extra',
replaceWith: 'nz-form-control[nzExtra]'
}, {
replace: 'nz-form-explain',
replaceWith: 'nz-form-control[nzSuccessTip][nzWarningTip][nzErrorTip][nzValidatingTip]...'
}];
}
visitTemplate(template) {
this.deprecatedComponents.forEach(data => {
this.failures.push(...(0, deprecated_component_1.deprecatedComponent)(template, data.replace, data.replaceWith));
});
}
}
exports.FormTemplateRule = FormTemplateRule;
//# sourceMappingURL=form-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"form-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/form-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAA+G;AAE/G,wEAAoE;AAEpE,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QAEE,YAAO,GAAG,KAAK,CAAC;QAEhB,yBAAoB,GAAiC,CAAC;gBACpD,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,0BAA0B;aACxC,EAAE;gBACD,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,6EAA6E;aAC3F,CAAC,CAAC;IAOL,CAAC;IALC,aAAa,CAAC,QAA0B;QACtC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAA,0CAAmB,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,4CAiBC"}

View File

@@ -0,0 +1,20 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlobalConfigRule = void 0;
const injection_token_rule_1 = require("./injection-token-rule");
class GlobalConfigRule extends injection_token_rule_1.InjectionTokenRule {
constructor() {
super(...arguments);
this.enabled = false;
this.tokens = [];
}
getFailure(token) {
return `Found deprecated symbol "${token}" which has been removed. Please use 'NzConfigService' instead.`;
}
}
exports.GlobalConfigRule = GlobalConfigRule;
//# sourceMappingURL=global-config-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"global-config-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/global-config-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iEAA4D;AAE5D,MAAa,gBAAiB,SAAQ,yCAAkB;IAAxD;;QACE,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,EAAE,CAAC;IAId,CAAC;IAHC,UAAU,CAAC,KAAa;QACtB,OAAO,4BAA4B,KAAK,iEAAiE,CAAC;IAC5G,CAAC;CACF;AAND,4CAMC"}

View File

@@ -0,0 +1,35 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.GridTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class GridTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
const offsets = [];
offsets.push(...(0, schematics_1.findInputsOnElementWithAttr)(template.content, 'nzType', ['nz-row']));
offsets.push(...(0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzType', ['nz-form-item', 'nz-row']));
offsets.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input '[nzType]'. Please manually remove this input.`
});
});
(0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzFlex', ['nz-form-item']).forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input '[nzFlex]'. Please manually remove this input.`
});
});
}
}
exports.GridTemplateRule = GridTemplateRule;
//# sourceMappingURL=grid-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"grid-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/grid-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAKiC;AAEjC,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QAEE,YAAO,GAAG,KAAK,CAAC;IA0BlB,CAAC;IAxBC,aAAa,CAAC,QAA0B;QAEtC,MAAM,OAAO,GAAG,EAAE,CAAA;QAElB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAA,wCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QACpF,OAAO,CAAC,IAAI,CAAC,GAAG,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;QAEnG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACtD,OAAO,EAAE,uEAAuE;aACnF,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;QAEF,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YACxF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,uEAAuE;aACjF,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IAEJ,CAAC;CACF;AA5BD,4CA4BC"}

View File

@@ -0,0 +1,27 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.IconTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const elements_1 = require("../../../utils/ng-update/elements");
class IconTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, elements_1.findElementWithClassName)(template.content, 'anticon', 'i')
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated css selector "i.anticon" component. Use "<nz-icon>" to instead please.`
});
});
}
}
exports.IconTemplateRule = IconTemplateRule;
//# sourceMappingURL=icon-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"icon-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/icon-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAmF;AAEnF,gEAA6E;AAE7E,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAclB,CAAC;IAZC,aAAa,CAAC,QAA0B;QAEtC,IAAA,mCAAwB,EAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC;aACvD,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,yFAAyF;aACnG,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IAEN,CAAC;CACF;AAhBD,4CAgBC"}

View File

@@ -0,0 +1,37 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectionTokenRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const ts = require("typescript");
const module_specifiers_1 = require("../../../utils/ng-update/module-specifiers");
class InjectionTokenRule extends schematics_1.Migration {
visitNode(node) {
if (ts.isImportDeclaration(node)) {
this._visitImportDeclaration(node);
}
}
_visitImportDeclaration(node) {
if (!(0, module_specifiers_1.isNgZorroImportDeclaration)(node) || !node.importClause ||
!node.importClause.namedBindings) {
return;
}
const namedBindings = node.importClause.namedBindings;
if (ts.isNamedImports(namedBindings)) {
this._checkInjectionToken(namedBindings);
}
}
_checkInjectionToken(namedImports) {
namedImports.elements.filter(element => ts.isIdentifier(element.name)).forEach(element => {
const importName = element.name.text;
if (this.tokens.indexOf(importName) !== -1) {
this.createFailureAtNode(element, this.getFailure(importName));
}
});
}
}
exports.InjectionTokenRule = InjectionTokenRule;
//# sourceMappingURL=injection-token-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"injection-token-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/injection-token-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAiE;AAEjE,iCAAiC;AAEjC,kFAAwF;AAExF,MAAsB,kBAAmB,SAAQ,sBAAsB;IAGrE,SAAS,CAAC,IAAa;QACrB,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAEO,uBAAuB,CAAC,IAA0B;QACxD,IAAI,CAAC,IAAA,8CAA0B,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY;YACzD,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC;QAEtD,IAAI,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,YAA6B;QACxD,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACvF,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAErC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;gBAC3C,IAAI,CAAC,mBAAmB,CACtB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CAGF;AAlCD,gDAkCC"}

View File

@@ -0,0 +1,26 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModalTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class ModalTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzGetContainer', ['nz-modal'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input '[nzGetContainer]'. Please manually remove this input.`
});
});
}
}
exports.ModalTemplateRule = ModalTemplateRule;
//# sourceMappingURL=modal-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"modal-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/modal-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAIiC;AAEjC,MAAa,iBAAkB,SAAQ,sBAAsB;IAA7D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAYlB,CAAC;IAVC,aAAa,CAAC,QAA0B;QACtC,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,UAAU,CAAC,CAAC;aACzE,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,+EAA+E;aACzF,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;CACF;AAdD,8CAcC"}

View File

@@ -0,0 +1,32 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecondaryEntryPointsRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const ts = require("typescript");
class SecondaryEntryPointsRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitNode(declaration) {
if (!ts.isImportDeclaration(declaration) ||
!ts.isStringLiteralLike(declaration.moduleSpecifier)) {
return;
}
const importLocation = declaration.moduleSpecifier.text;
if (importLocation === 'ng-zorro-antd/core') {
this.createFailureAtNode(declaration, 'The entry-point "ng-zorro-antd/core" is removed, ' +
'use "ng-zorro-antd/core/**" instead.');
}
if (importLocation === 'ng-zorro-antd') {
this.createFailureAtNode(declaration, 'The entry-point "ng-zorro-antd" is removed, ' +
'use "ng-zorro-antd/**" instead.');
}
}
}
exports.SecondaryEntryPointsRule = SecondaryEntryPointsRule;
//# sourceMappingURL=secondary-entry-points-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"secondary-entry-points-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/secondary-entry-points-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAiE;AAEjE,iCAAiC;AAEjC,MAAa,wBAAyB,SAAQ,sBAAsB;IAApE;;QACE,YAAO,GAAG,KAAK,CAAC;IAoBlB,CAAC;IAlBC,SAAS,CAAC,WAAoB;QAC5B,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC;YACtC,CAAC,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;YACvD,OAAO;QACT,CAAC;QAED,MAAM,cAAc,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC;QACxD,IAAI,cAAc,KAAK,oBAAoB,EAAE,CAAC;YAC5C,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,mDAAmD;gBACvF,sCAAsC,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,cAAc,KAAK,eAAe,EAAE,CAAC;YACvC,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE,8CAA8C;gBAClF,iCAAiC,CAAC,CAAC;QACvC,CAAC;IAEH,CAAC;CACF;AArBD,4DAqBC"}

View File

@@ -0,0 +1,20 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpaceTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const deprecated_component_1 = require("../utils/deprecated-component");
class SpaceTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
this.failures.push(...(0, deprecated_component_1.deprecatedComponent)(template, 'nz-space-item', 'ng-template[nzSpaceItem]'));
}
}
exports.SpaceTemplateRule = SpaceTemplateRule;
//# sourceMappingURL=space-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"space-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/space-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAmF;AAEnF,wEAAoE;AAEpE,MAAa,iBAAkB,SAAQ,sBAAsB;IAA7D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAOlB,CAAC;IALC,aAAa,CAAC,QAA0B;QACtC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAChB,GAAG,IAAA,0CAAmB,EAAC,QAAQ,EAAE,eAAe,EAAE,0BAA0B,CAAC,CAC9E,CAAC;IACJ,CAAC;CACF;AATD,8CASC"}

View File

@@ -0,0 +1,43 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class TableTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
const content = template.content.replace('nz-table', 'table ');
(0, schematics_1.findOutputsOnElementWithTag)(content, 'nzSortChangeWithKey', ['th'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated output 'th(nzSortChangeWithKey)'. Please manually remove this output.`
});
});
(0, schematics_1.findInputsOnElementWithTag)(content, 'nzSingleSort', ['thead'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input 'thead[nzSingleSort]'. Please manually change to 'th[nzSortFn]'.`
});
});
(0, schematics_1.findInputsOnElementWithTag)(content, 'nzSortKey', ['th'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input 'th[nzSortKey]'. Please manually change to 'th[nzSortFn]'.`
});
});
}
}
exports.TableTemplateRule = TableTemplateRule;
//# sourceMappingURL=table-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"table-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/table-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAIiC;AAEjC,MAAa,iBAAkB,SAAQ,sBAAsB;IAA7D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAgClB,CAAC;IA9BC,aAAa,CAAC,QAA0B;QAEtC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;QAC/D,IAAA,wCAA2B,EAAC,OAAO,EAAE,qBAAqB,EAAE,CAAC,IAAI,CAAC,CAAC;aAChE,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,wFAAwF;aAClG,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEL,IAAA,uCAA0B,EAAC,OAAO,EAAE,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC;aAC3D,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,yFAAyF;aACnG,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEL,IAAA,uCAA0B,EAAC,OAAO,EAAE,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;aACrD,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,mFAAmF;aAC7F,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAlCD,8CAkCC"}

View File

@@ -0,0 +1,26 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TabsInputRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class TabsInputRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, schematics_1.findInputsOnElementWithTag)(template.content, 'nzShowPagination', ['nz-tabset'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated input '[nzShowPagination]'. Please manually remove this input.`
});
});
}
}
exports.TabsInputRule = TabsInputRule;
//# sourceMappingURL=tabs-input-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tabs-input-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/tabs-input-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAA+G;AAE/G,MAAa,aAAc,SAAQ,sBAAsB;IAAzD;;QAEE,YAAO,GAAG,KAAK,CAAC;IAclB,CAAC;IAZC,aAAa,CAAC,QAA0B;QAEtC,IAAA,uCAA0B,EAAC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC,WAAW,CAAC,CAAC;aAC5E,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,iFAAiF;aAC3F,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IAEN,CAAC;CACF;AAhBD,sCAgBC"}

View File

@@ -0,0 +1,34 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TabsOutputRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
class TabsOutputRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, schematics_1.findOutputsOnElementWithTag)(template.content, 'nzOnNextClick', ['nz-tabset'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated output '(nzOnNextClick)'. Please manually remove this output.`
});
});
(0, schematics_1.findOutputsOnElementWithTag)(template.content, 'nzOnPrevClick', ['nz-tabset'])
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated output '(nzOnPrevClick)'. Please manually remove this output.`
});
});
}
}
exports.TabsOutputRule = TabsOutputRule;
//# sourceMappingURL=tabs-output-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tabs-output-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/tabs-output-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAIiC;AAEjC,MAAa,cAAe,SAAQ,sBAAsB;IAA1D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAsBlB,CAAC;IApBC,aAAa,CAAC,QAA0B;QAEtC,IAAA,wCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,WAAW,CAAC,CAAC;aAC1E,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,gFAAgF;aAC1F,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;QAEJ,IAAA,wCAA2B,EAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,WAAW,CAAC,CAAC;aAC1E,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,gFAAgF;aAC1F,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;CACF;AAxBD,wCAwBC"}

View File

@@ -0,0 +1,27 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TabsTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const elements_1 = require("../../../utils/ng-update/elements");
class TabsTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = false;
}
visitTemplate(template) {
(0, elements_1.findElementWithoutStructuralDirective)(template.content, 'a', 'nzTabLink', 'nz-tab-link')
.forEach(offset => {
this.failures.push({
filePath: template.filePath,
position: template.getCharacterAndLineOfPosition(offset),
message: `Found deprecated selector 'a[nz-tab-link]', please use 'ng-template[nzTabLink] > a[nz-tab-link]' instead.`
});
});
}
}
exports.TabsTemplateRule = TabsTemplateRule;
//# sourceMappingURL=tabs-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tabs-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/tabs-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAAmF;AAEnF,gEAA0F;AAE1F,MAAa,gBAAiB,SAAQ,sBAAsB;IAA5D;;QAEE,YAAO,GAAG,KAAK,CAAC;IAclB,CAAC;IAZC,aAAa,CAAC,QAA0B;QAEtC,IAAA,gDAAqC,EAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC;aACrF,OAAO,CAAC,MAAM,CAAC,EAAE;YAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;gBAC3B,QAAQ,EAAE,QAAQ,CAAC,6BAA6B,CAAC,MAAM,CAAC;gBACxD,OAAO,EAAE,2GAA2G;aACrH,CAAC,CAAC;QACL,CAAC,CAAC,CAAA;IAEN,CAAC;CACF;AAhBD,4CAgBC"}

View File

@@ -0,0 +1,32 @@
"use strict";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TooltipLikeTemplateRule = void 0;
const schematics_1 = require("@angular/cdk/schematics");
const deprecated_component_1 = require("../utils/deprecated-component");
class TooltipLikeTemplateRule extends schematics_1.Migration {
constructor() {
super(...arguments);
this.enabled = true;
this.deprecatedComponents = [{
replace: 'nz-tooltip',
replaceWith: '[nz-tooltip]'
}, {
replace: 'nz-popover',
replaceWith: '[nz-popover]'
}, {
replace: 'nz-popconfirm',
replaceWith: '[nz-popconfirm]'
}];
}
visitTemplate(template) {
this.deprecatedComponents.forEach(data => {
this.failures.push(...(0, deprecated_component_1.deprecatedComponent)(template, data.replace, data.replaceWith));
});
}
}
exports.TooltipLikeTemplateRule = TooltipLikeTemplateRule;
//# sourceMappingURL=tooltip-like-template-rule.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tooltip-like-template-rule.js","sourceRoot":"","sources":["../../../../../schematics/ng-update/upgrade-rules/checks/tooltip-like-template-rule.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,wDAKiC;AAEjC,wEAAoE;AAEpE,MAAa,uBAAwB,SAAQ,sBAAsB;IAAnE;;QAEE,YAAO,GAAG,IAAI,CAAC;QAEf,yBAAoB,GAAiC,CAAC;gBACpD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,cAAc;aAC5B,EAAE;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,cAAc;aAC5B,EAAE;gBACD,OAAO,EAAE,eAAe;gBACxB,WAAW,EAAE,iBAAiB;aAC/B,CAAC,CAAC;IAOL,CAAC;IALC,aAAa,CAAC,QAA0B;QACtC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAA,0CAAmB,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApBD,0DAoBC"}