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,18 @@
"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.applyChangesToFile = applyChangesToFile;
const change_1 = require("@schematics/angular/utility/change");
function applyChangesToFile(host, filePath, changes) {
const recorder = host.beginUpdate(filePath);
changes.forEach((change) => {
if (change instanceof change_1.InsertChange) {
recorder.insertLeft(change.pos, change.toAdd);
}
});
host.commitUpdate(recorder);
}
//# sourceMappingURL=apply-changes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"apply-changes.js","sourceRoot":"","sources":["../../../schematics/utils/apply-changes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAKH,gDAUC;AAZD,+DAA0E;AAE1E,SAAgB,kBAAkB,CAAC,IAAU,EAAE,QAAgB,EAAE,OAAiB;IAChF,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,IAAI,MAAM,YAAY,qBAAY,EAAE,CAAC;YACnC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}

View File

@@ -0,0 +1,246 @@
"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
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildComponent = buildComponent;
const schematics_1 = require("@angular/cdk/schematics");
const core_1 = require("@angular-devkit/core");
const schematics_2 = require("@angular-devkit/schematics");
const schema_1 = require("@schematics/angular/component/schema");
const ts = require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript");
const utility_1 = require("@schematics/angular/utility");
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
const change_1 = require("@schematics/angular/utility/change");
const find_module_1 = require("@schematics/angular/utility/find-module");
const parse_name_1 = require("@schematics/angular/utility/parse-name");
const validation_1 = require("@schematics/angular/utility/validation");
const workspace_models_1 = require("@schematics/angular/utility/workspace-models");
const fs_1 = require("fs");
const path_1 = require("path");
function findClassDeclarationParent(node) {
if (ts.isClassDeclaration(node)) {
return node;
}
return node.parent && findClassDeclarationParent(node.parent);
}
function getFirstNgModuleName(source) {
// First, find the @NgModule decorators.
const ngModulesMetadata = (0, ast_utils_1.getDecoratorMetadata)(source, 'NgModule', '@angular/core');
if (ngModulesMetadata.length === 0) {
return undefined;
}
// Then walk parent pointers up the AST, looking for the ClassDeclaration parent of the NgModule
// metadata.
const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]);
if (!moduleClass || !moduleClass.name) {
return undefined;
}
// Get the class name of the module ClassDeclaration.
return moduleClass.name.text;
}
/**
* Build a default project path for generating.
*
* @param project The project to build the path for.
*/
function buildDefaultPath(project) {
const root = project.sourceRoot ? `/${project.sourceRoot}/` : `/${project.root}/src/`;
const projectDirName = project.extensions['projectType'] === workspace_models_1.ProjectType.Application ? 'app' : 'lib';
return `${root}${projectDirName}`;
}
/**
* List of style extensions which are CSS compatible. All supported CLI style extensions can be
* found here: angular/angular-cli/master/packages/schematics/angular/ng-new/schema.json#L118-L122
*/
const supportedCssExtensions = ['css', 'scss', 'sass', 'less', 'none'];
function readIntoSourceFile(host, modulePath) {
const text = host.read(modulePath);
if (text === null) {
throw new schematics_2.SchematicsException(`File ${modulePath} does not exist.`);
}
return ts.createSourceFile(modulePath, text.toString('utf-8'), ts.ScriptTarget.Latest, true);
}
function getModuleClassnamePrefix(source) {
var _a;
const className = getFirstNgModuleName(source);
if (className) {
const execArray = /(\w+)Module/gi.exec(className);
return (_a = execArray === null || execArray === void 0 ? void 0 : execArray[1]) !== null && _a !== void 0 ? _a : null;
}
else {
return null;
}
}
function addDeclarationToNgModule(options) {
return (host) => {
if (options.skipImport || options.standalone || !options.module) {
return host;
}
const modulePath = options.module;
let source = readIntoSourceFile(host, modulePath);
const componentPath = `/${options.path}/${options.flat ? '' : `${schematics_2.strings.dasherize(options.name)}/`}${schematics_2.strings.dasherize(options.name)}.component`;
const relativePath = (0, find_module_1.buildRelativePath)(modulePath, componentPath);
let classifiedName = schematics_2.strings.classify(`${options.name}Component`);
if (options.classnameWithModule) {
const modulePrefix = getModuleClassnamePrefix(source);
if (modulePrefix) {
classifiedName = `${modulePrefix}${classifiedName}`;
}
}
const declarationChanges = (0, ast_utils_1.addDeclarationToModule)(source, modulePath, classifiedName, relativePath);
const declarationRecorder = host.beginUpdate(modulePath);
for (const change of declarationChanges) {
if (change instanceof change_1.InsertChange) {
declarationRecorder.insertLeft(change.pos, change.toAdd);
}
}
host.commitUpdate(declarationRecorder);
if (options.export) {
// Need to refresh the AST because we overwrote the file in the host.
source = readIntoSourceFile(host, modulePath);
const exportRecorder = host.beginUpdate(modulePath);
const exportChanges = (0, ast_utils_1.addExportToModule)(source, modulePath, schematics_2.strings.classify(`${options.name}Component`), relativePath);
for (const change of exportChanges) {
if (change instanceof change_1.InsertChange) {
exportRecorder.insertLeft(change.pos, change.toAdd);
}
}
host.commitUpdate(exportRecorder);
}
return host;
};
}
function buildSelector(options, projectPrefix, modulePrefixName) {
let selector = schematics_2.strings.dasherize(options.name);
let modulePrefix = '';
if (modulePrefixName) {
modulePrefix = `${schematics_2.strings.dasherize(modulePrefixName)}-`;
}
if (options.prefix) {
selector = `${options.prefix}-${modulePrefix}${selector}`;
}
else if (options.prefix === undefined && projectPrefix) {
selector = `${projectPrefix}-${modulePrefix}${selector}`;
}
return selector;
}
/**
* Indents the text content with the amount of specified spaces. The spaces will be added after
* every line-break. This utility function can be used inside EJS templates to properly
* include the additional files.
*/
function indentTextContent(text, numSpaces) {
// In the Material project there should be only LF line-endings, but the schematic files
// are not being linted and therefore there can be also CRLF or just CR line-endings.
return text.replace(/(\r\n|\r|\n)/g, `$1${' '.repeat(numSpaces)}`);
}
/**
* Rule that copies and interpolates the files that belong to this schematic context. Additionally
* a list of file paths can be passed to this rule in order to expose them inside the EJS
* template context.
*
* This allows inlining the external template or stylesheet files in EJS without having
* to manually duplicate the file content.
*/
function buildComponent(options, additionalFiles = {}) {
return (host, context) => __awaiter(this, void 0, void 0, function* () {
var _a;
const workspace = yield (0, utility_1.readWorkspace)(host);
const project = (0, schematics_1.getProjectFromWorkspace)(workspace, options.project);
const defaultZorroComponentOptions = (0, schematics_1.getDefaultComponentOptions)(project);
let modulePrefix = '';
// TODO(devversion): Remove if we drop support for older CLI versions.
// This handles an unreported breaking change from the @angular-devkit/schematics. Previously
// the description path resolved to the factory file, but starting from 6.2.0, it resolves
// to the factory directory.
const schematicPath = (0, fs_1.statSync)(context.schematic.description.path).isDirectory()
? context.schematic.description.path
: (0, path_1.dirname)(context.schematic.description.path);
const schematicFilesUrl = './files';
const schematicFilesPath = (0, path_1.resolve)(schematicPath, schematicFilesUrl);
options.style = options.style || schema_1.Style.Css;
// Add the default component option values to the options if an option is not explicitly
// specified but a default component option is available.
Object.keys(options)
.filter(optionName => options[optionName] == null && defaultZorroComponentOptions[optionName])
.forEach(optionName => (options[optionName] = defaultZorroComponentOptions[optionName]));
if (options.path === undefined) {
options.path = buildDefaultPath(project);
}
options.standalone = yield (0, schematics_1.isStandaloneSchematic)(host, options);
if (!options.standalone) {
options.module = (0, find_module_1.findModuleFromOptions)(host, options);
}
(_a = options.type) !== null && _a !== void 0 ? _a : (options.type = '');
const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
if (options.classnameWithModule && !options.skipImport && options.module) {
const source = readIntoSourceFile(host, options.module);
modulePrefix = getModuleClassnamePrefix(source);
}
options.name = parsedPath.name;
options.path = parsedPath.path;
options.selector = options.selector || buildSelector(options, project.prefix, modulePrefix);
(0, validation_1.validateHtmlSelector)(options.selector);
const skipStyleFile = options.inlineStyle || options.style === schema_1.Style.None;
// In case the specified style extension is not part of the supported CSS supersets,
// we generate the stylesheets with the "css" extension. This ensures that we don't
// accidentally generate invalid stylesheets (e.g. drag-drop-comp.styl) which will
// break the Angular CLI project. See: https://github.com/angular/components/issues/15164
if (!skipStyleFile && !supportedCssExtensions.includes(options.style)) {
options.style = schema_1.Style.Css;
}
const classifyCovered = (name) => {
return `${modulePrefix}${schematics_2.strings.classify(name)}`;
};
// Object that will be used as context for the EJS templates.
const baseTemplateContext = Object.assign(Object.assign(Object.assign({}, schematics_2.strings), { 'if-flat': (s) => (options.flat ? '' : s), classify: classifyCovered, ngext: options.ngHtml ? '.ng' : '' }), options);
// Key-value object that includes the specified additional files with their loaded content.
// The resolved contents can be used inside EJS templates.
const resolvedFiles = {};
for (const key in additionalFiles) {
if (additionalFiles[key]) {
const fileContent = (0, fs_1.readFileSync)((0, path_1.join)(schematicFilesPath, additionalFiles[key]), 'utf-8');
// Interpolate the additional files with the base EJS template context.
resolvedFiles[key] = (0, core_1.template)(fileContent)(baseTemplateContext);
}
}
const templateSource = (0, schematics_2.apply)((0, schematics_2.url)(schematicFilesUrl), [
options.skipTests ? (0, schematics_2.filter)(path => !path.endsWith('.spec.ts.template')) : (0, schematics_2.noop)(),
skipStyleFile ? (0, schematics_2.filter)(path => !path.endsWith('.__style__.template')) : (0, schematics_2.noop)(),
options.inlineTemplate ? (0, schematics_2.filter)(path => !path.endsWith('.html.template')) : (0, schematics_2.noop)(),
// Treat the template options as any, because the type definition for the template options
// is made unnecessarily explicit. Every type of object can be used in the EJS template.
(0, schematics_2.applyTemplates)(Object.assign({ indentTextContent, resolvedFiles }, baseTemplateContext)),
// remove multiple dots if no type is specified
!options.type
? (0, schematics_2.forEach)(((file) => {
return file.path.includes('..')
? {
content: file.content,
path: file.path.replace('..', '.')
}
: file;
}))
: (0, schematics_2.noop)(),
// TODO(devversion): figure out why we cannot just remove the first parameter
// See for example: angular-cli#schematics/angular/component/index.ts#L160
(0, schematics_2.move)(null, parsedPath.path)
]);
return () => (0, schematics_2.chain)([
addDeclarationToNgModule(options),
(0, schematics_2.mergeWith)(templateSource)
])(host, context);
});
}
//# sourceMappingURL=build-component.js.map

File diff suppressed because one or more lines are too long

42
node_modules/ng-zorro-antd/schematics/utils/config.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
"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
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDefaultComponentOptions = getDefaultComponentOptions;
exports.getAppOptions = getAppOptions;
const config_1 = require("@angular/cli/src/utilities/config");
const core_1 = require("@angular-devkit/core");
/**
* Returns the default options for the `@schematics/angular:component` schematic which would
* have been specified at project initialization (ng new or ng init).
*/
function getDefaultComponentOptions(project) {
return __awaiter(this, void 0, void 0, function* () {
return (0, config_1.getSchematicDefaults)('@schematics/angular', 'component', project);
});
}
function getAppOptions(project, projectRoot) {
return __awaiter(this, void 0, void 0, function* () {
var _a;
const componentOptions = yield getDefaultComponentOptions(project);
(_a = componentOptions.type) !== null && _a !== void 0 ? _a : (componentOptions.type = '');
const appDir = (0, core_1.normalize)(projectRoot);
const sourceDir = `${appDir}/src/app`;
return {
componentOptions,
sourceDir
};
});
}
//# sourceMappingURL=config.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../schematics/utils/config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;AAWH,gEAEC;AAED,sCAiBC;AA9BD,8DAAyE;AAEzE,+CAAiD;AAGjD;;;GAGG;AACH,SAAsB,0BAA0B,CAAC,OAAgB;;QAC/D,OAAO,IAAA,6BAAoB,EAAC,qBAAqB,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;CAAA;AAED,SAAsB,aAAa,CACjC,OAAe,EACf,WAAoB;;;QAKpB,MAAM,gBAAgB,GAAG,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACnE,MAAA,gBAAgB,CAAC,IAAI,oCAArB,gBAAgB,CAAC,IAAI,GAAK,EAAE,EAAC;QAE7B,MAAM,MAAM,GAAG,IAAA,gBAAS,EAAC,WAAW,CAAC,CAAC;QACtC,MAAM,SAAS,GAAG,GAAG,MAAM,UAAU,CAAC;QAEtC,OAAO;YACL,gBAAgB;YAChB,SAAS;SACV,CAAC;IACJ,CAAC;CAAA"}

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.createCustomTheme = createCustomTheme;
function createCustomTheme() {
return `
// Custom Theming for NG-ZORRO
// For more information: https://ng.ant.design/docs/customize-theme/en
@import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";
// Override less variables to here
// View all variables: https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/components/style/themes/default.less
// @primary-color: #1890ff;
`;
}
//# sourceMappingURL=create-custom-theme.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"create-custom-theme.js","sourceRoot":"","sources":["../../../schematics/utils/create-custom-theme.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,8CAWC;AAXD,SAAgB,iBAAiB;IAC/B,OAAO;;;;;;;;;CASR,CAAC;AACF,CAAC"}

View File

@@ -0,0 +1,15 @@
"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.getFileContent = getFileContent;
function getFileContent(tree, path) {
const fileEntry = tree.get(path);
if (!fileEntry) {
throw new Error(`The file (${path}) does not exist.`);
}
return fileEntry.content.toString();
}
//# sourceMappingURL=get-file-content.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-file-content.js","sourceRoot":"","sources":["../../../schematics/utils/get-file-content.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,wCAQC;AARD,SAAgB,cAAc,CAAC,IAAU,EAAE,IAAY;IACrD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEjC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,aAAa,IAAI,mBAAmB,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;AACtC,CAAC"}

View File

@@ -0,0 +1,74 @@
"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.findElementWithoutStructuralDirective = findElementWithoutStructuralDirective;
exports.findElementWithTag = findElementWithTag;
exports.findElementWithClassName = findElementWithClassName;
const parse5_1 = require("parse5");
const hasClassName = (node, className) => {
var _a, _b;
return (_b = (_a = node.attrs) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, attr => attr.name === 'class' && attr.value.indexOf(className) !== -1);
};
const compareCaseInsensitive = (a, b) => (a === null || a === void 0 ? void 0 : a.toLowerCase()) === (b === null || b === void 0 ? void 0 : b.toLowerCase());
function findElementWithoutStructuralDirective(html, tagName, directiveName, attr) {
const document = (0, parse5_1.parseFragment)(html, { sourceCodeLocationInfo: true });
const elements = [];
const visitNodes = (nodes) => {
nodes.forEach(node => {
if (node['childNodes'] && !(node['tagName'] === 'ng-template' && !!node.attrs.find(a => compareCaseInsensitive(a.name, directiveName)))) {
visitNodes(node['childNodes']);
}
if (compareCaseInsensitive(node['tagName'], tagName)) {
const element = node;
const directive = `*${directiveName}`;
if (!!element.attrs.find(a => compareCaseInsensitive(a.name, attr)) && !element.attrs.find(a => compareCaseInsensitive(a.name, directive))) {
elements.push(element);
}
}
});
};
visitNodes(document.childNodes);
return elements
.filter(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.startTag; })
.map(element => element.sourceCodeLocation.startTag.startOffset);
}
function findElementWithTag(html, tagName) {
const document = (0, parse5_1.parseFragment)(html, { sourceCodeLocationInfo: true });
const elements = [];
const visitNodes = (nodes) => {
nodes.forEach(node => {
if (node['childNodes']) {
visitNodes(node['childNodes']);
}
if (compareCaseInsensitive(node['tagName'], tagName)) {
elements.push(node);
}
});
};
visitNodes(document.childNodes);
return elements
.filter(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.startTag; })
.map(element => element.sourceCodeLocation.startTag.startOffset);
}
function findElementWithClassName(html, className, tagName) {
const document = (0, parse5_1.parseFragment)(html, { sourceCodeLocationInfo: true });
const elements = [];
const visitNodes = (nodes) => {
nodes.forEach(node => {
if (node['childNodes']) {
visitNodes(node['childNodes']);
}
if (compareCaseInsensitive(node['tagName'], tagName) && hasClassName(node, className)) {
elements.push(node);
}
});
};
visitNodes(document.childNodes);
return elements
.filter(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.startTag; })
.map(element => element.sourceCodeLocation.attrs.class.startOffset);
}
//# sourceMappingURL=elements.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../../schematics/utils/ng-update/elements.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAqBH,sFAyBC;AAED,gDAqBC;AAED,4DAqBC;AA1FD,mCAA8D;AAa9D,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,SAAiB,EAAyB,EAAE;;IAC/E,OAAO,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,mDAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAW,EAAE,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,WAAW,EAAE,OAAK,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,WAAW,EAAE,CAAA,CAAC;AAExG,SAAgB,qCAAqC,CAAC,IAAY,EAAE,OAAe,EAAE,aAAqB,EAAE,IAAY;IACtH,MAAM,QAAQ,GAAG,IAAA,sBAAa,EAAC,IAAI,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAc,EAAE,CAAC;IAE/B,MAAM,UAAU,GAAG,CAAC,KAAkB,EAAQ,EAAE;QAC9C,KAAK,CAAC,OAAO,CA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UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACjC,CAAC;YAED,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,YAAY,CAAC,IAAe,EAAE,SAAS,CAAC,EAAE,CAAC;gBACjG,QAAQ,CAAC,IAAI,CAAC,IAAe,CAAC,CAAC;YACjC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAEhC,OAAO,QAAQ;SACZ,MAAM,CAAC,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,kBAAkB,0CAAE,QAAQ,CAAA,EAAA,CAAC;SAC5C,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACxE,CAAC"}

View File

@@ -0,0 +1,25 @@
"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.ngZorroModuleSpecifier = void 0;
exports.isNgZorroImportDeclaration = isNgZorroImportDeclaration;
exports.isNgZorroExportDeclaration = isNgZorroExportDeclaration;
const schematics_1 = require("@angular/cdk/schematics");
exports.ngZorroModuleSpecifier = 'ng-zorro-antd';
function isNgZorroImportDeclaration(node) {
return isNgZorroDeclaration((0, schematics_1.getImportDeclaration)(node));
}
function isNgZorroExportDeclaration(node) {
return isNgZorroDeclaration((0, schematics_1.getExportDeclaration)(node));
}
function isNgZorroDeclaration(declaration) {
if (!declaration.moduleSpecifier) {
return false;
}
const moduleSpecifier = declaration.moduleSpecifier.getText();
return moduleSpecifier.indexOf(exports.ngZorroModuleSpecifier) !== -1;
}
//# sourceMappingURL=module-specifiers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"module-specifiers.js","sourceRoot":"","sources":["../../../../schematics/utils/ng-update/module-specifiers.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,gEAEC;AAED,gEAEC;AAZD,wDAAqF;AAIxE,QAAA,sBAAsB,GAAG,eAAe,CAAC;AAEtD,SAAgB,0BAA0B,CAAC,IAAa;IACtD,OAAO,oBAAoB,CAAC,IAAA,iCAAoB,EAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,0BAA0B,CAAC,IAAa;IACtD,OAAO,oBAAoB,CAAC,IAAA,iCAAoB,EAAC,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,oBAAoB,CAAC,WAAwD;IACpF,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC;IAC9D,OAAO,eAAe,CAAC,OAAO,CAAC,8BAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;AAChE,CAAC"}

View File

@@ -0,0 +1,15 @@
"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.getProjectStyle = getProjectStyle;
const schematics_1 = require("@angular/cdk/schematics");
const schema_1 = require("@schematics/angular/application/schema");
function getProjectStyle(project) {
const stylesPath = (0, schematics_1.getProjectStyleFile)(project);
const style = stylesPath ? stylesPath.split('.').pop() : schema_1.Style.Css;
return style;
}
//# sourceMappingURL=project-style.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"project-style.js","sourceRoot":"","sources":["../../../schematics/utils/project-style.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAOH,0CAIC;AATD,wDAA8D;AAE9D,mEAA+D;AAG/D,SAAgB,eAAe,CAAC,OAA0B;IACxD,MAAM,UAAU,GAAG,IAAA,gCAAmB,EAAC,OAAO,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,cAAK,CAAC,GAAG,CAAC;IACnE,OAAO,KAAc,CAAC;AACxB,CAAC"}

View File

@@ -0,0 +1,59 @@
"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
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.addModule = addModule;
exports.addDeclaration = addDeclaration;
const schematics_1 = require("@angular/cdk/schematics");
const schematics_2 = require("@angular-devkit/schematics");
const utility_1 = require("@schematics/angular/utility");
const change_1 = require("@schematics/angular/utility/change");
const find_module_1 = require("@schematics/angular/utility/find-module");
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
const ts = require("typescript");
function readIntoSourceFile(host, modulePath) {
const text = host.read(modulePath);
if (text === null) {
throw new schematics_2.SchematicsException(`File ${modulePath} does not exist.`);
}
const sourceText = text.toString('utf-8');
return ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true);
}
function addModule(moduleName, modulePath, projectName) {
return (host) => __awaiter(this, void 0, void 0, function* () {
const workspace = yield (0, utility_1.readWorkspace)(host);
const project = (0, schematics_1.getProjectFromWorkspace)(workspace, projectName);
(0, schematics_1.addModuleImportToRootModule)(host, moduleName, modulePath, project);
return (0, schematics_2.noop)();
});
}
function addDeclaration(componentName, componentPath, projectName) {
return (host) => __awaiter(this, void 0, void 0, function* () {
const workspace = yield (0, utility_1.readWorkspace)(host);
const project = (0, schematics_1.getProjectFromWorkspace)(workspace, projectName);
const appModulePath = (0, ng_ast_utils_1.getAppModulePath)(host, (0, schematics_1.getProjectMainFile)(project));
const source = readIntoSourceFile(host, appModulePath);
const relativePath = (0, find_module_1.buildRelativePath)(appModulePath, componentPath);
const declarationChanges = (0, schematics_1.addDeclarationToModule)(source, appModulePath, componentName, relativePath);
const declarationRecorder = host.beginUpdate(appModulePath);
for (const change of declarationChanges) {
if (change instanceof change_1.InsertChange) {
declarationRecorder.insertLeft(change.pos, change.toAdd);
}
}
host.commitUpdate(declarationRecorder);
return (0, schematics_2.noop)();
});
}
//# sourceMappingURL=root-module.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"root-module.js","sourceRoot":"","sources":["../../../schematics/utils/root-module.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;AA0BH,8BAOC;AAED,wCAkBC;AAnDD,wDAKiC;AAEjC,2DAAmF;AACnF,yDAA4D;AAC5D,+DAAkE;AAClE,yEAA4E;AAC5E,2EAA4E;AAC5E,iCAAiC;AAEjC,SAAS,kBAAkB,CAAC,IAAU,EAAE,UAAkB;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,gCAAmB,CAAC,QAAQ,UAAU,kBAAkB,CAAC,CAAC;IACtE,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACnF,CAAC;AAED,SA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AC;QACH,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAEvC,OAAO,IAAA,iBAAI,GAAE,CAAC;IAChB,CAAC,CAAA,CAAC;AACJ,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hammerjsVersion = exports.zorroVersion = void 0;
exports.zorroVersion = '^20.4.0';
exports.hammerjsVersion = '^2.0.8';
//# sourceMappingURL=version-names.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"version-names.js","sourceRoot":"","sources":["../../../schematics/utils/version-names.ts"],"names":[],"mappings":";;;AACa,QAAA,YAAY,GAAG,SAAS,CAAC;AACzB,QAAA,eAAe,GAAG,QAAQ,CAAC"}