@skyux/packages 13.0.0-alpha.5 → 13.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/collection.json +5 -0
  2. package/migrations.json +6 -6
  3. package/package.json +59 -60
  4. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.schematic.d.ts +8 -0
  5. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.schematic.js +15 -0
  6. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.schematic.js.map +1 -0
  7. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.d.ts +9 -0
  8. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.js +3 -0
  9. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.js.map +1 -0
  10. package/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.json +16 -0
  11. package/src/schematics/rules/convert-page-summary-to-page-header/convert-page-summary-to-page-header.js +1 -1
  12. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.d.ts +3 -0
  13. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.js +305 -0
  14. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.js.map +1 -0
  15. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/options.d.ts +6 -0
  16. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/options.js +3 -0
  17. package/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/options.js.map +1 -0
  18. package/src/schematics/testing/angular-module-generator.d.ts +5 -0
  19. package/src/schematics/testing/angular-module-generator.js +18 -0
  20. package/src/schematics/testing/angular-module-generator.js.map +1 -0
  21. package/src/schematics/utility/typescript/ng-ast.d.ts +14 -1
  22. package/src/schematics/utility/typescript/ng-ast.js +137 -66
  23. package/src/schematics/utility/typescript/ng-ast.js.map +1 -1
  24. package/src/version.js +1 -1
package/collection.json CHANGED
@@ -26,6 +26,11 @@
26
26
  "factory": "./src/schematics/ng-generate/convert-page-summary-to-page-header/convert-page-summary-to-page-header.schematic",
27
27
  "schema": "./src/schematics/ng-generate/convert-page-summary-to-page-header/schema.json"
28
28
  },
29
+ "convert-progress-indicator-wizard-to-tab-wizard": {
30
+ "description": "Convert <sky-progress-indicator> components using wizard to use <sky-tabset> components.",
31
+ "factory": "./src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.schematic",
32
+ "schema": "./src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.json"
33
+ },
29
34
  "remove-compat-stylesheets": {
30
35
  "description": "Remove SKY UX compatibility stylesheets.",
31
36
  "factory": "./src/schematics/ng-generate/remove-compat-stylesheets/remove-compat-stylesheets.schematic",
package/migrations.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "schematics": {
3
3
  "noop": {
4
- "version": "13.0.0-alpha.5",
4
+ "version": "13.0.0-alpha.7",
5
5
  "factory": "./src/schematics/migrations/noop/noop.schematic",
6
6
  "description": "Update all SKY UX component packages"
7
7
  },
8
8
  "i18n-resources-module": {
9
- "version": "13.0.0-alpha.5",
9
+ "version": "13.0.0-alpha.7",
10
10
  "factory": "./src/schematics/migrations/update-13/i18n-resources-module/i18n-resources-module.schematic",
11
11
  "description": "Regenerate i18n resources modules for libraries."
12
12
  },
13
13
  "icon-name": {
14
- "version": "13.0.0-alpha.5",
14
+ "version": "13.0.0-alpha.7",
15
15
  "factory": "./src/schematics/migrations/update-13/icon-name/icon-name.schematic",
16
16
  "description": "Update icon `icon` properties to `iconName`."
17
17
  },
18
18
  "remove-old-compat-stylesheets": {
19
- "version": "13.0.0-alpha.5",
19
+ "version": "13.0.0-alpha.7",
20
20
  "factory": "./src/schematics/migrations/update-13/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic",
21
21
  "description": "Remove backward compatible stylesheets for older versions of SKY UX."
22
22
  },
23
23
  "workspace-check": {
24
- "version": "13.0.0-alpha.5",
24
+ "version": "13.0.0-alpha.7",
25
25
  "factory": "./src/schematics/migrations/update-13/workspace-check/workspace-check.schematic",
26
26
  "description": "Log warnings if the workspace is not configured correctly."
27
27
  },
28
28
  "replace-light-blue-custom-property": {
29
- "version": "13.0.0-alpha.5",
29
+ "version": "13.0.0-alpha.7",
30
30
  "factory": "./src/schematics/migrations/update-13/replace-light-blue-custom-property/replace-light-blue-custom-property.schematic",
31
31
  "description": "Replace --sky-category-color-light-blue custom property with --sky-category-color-green."
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/packages",
3
- "version": "13.0.0-alpha.5",
3
+ "version": "13.0.0-alpha.7",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "description": "Handles the `ng update` command for SKY UX component libraries.",
6
6
  "keywords": [
@@ -35,68 +35,67 @@
35
35
  "ng-update": {
36
36
  "migrations": "./migrations.json",
37
37
  "packageGroup": {
38
- "@skyux/packages": "13.0.0-alpha.5",
38
+ "@skyux/packages": "13.0.0-alpha.7",
39
39
  "@blackbaud/angular-tree-component": "^1.0.0",
40
- "@skyux-sdk/eslint-config": "13.0.0-alpha.5",
41
- "@skyux-sdk/eslint-schematics": "13.0.0-alpha.5",
42
- "@skyux-sdk/prettier-schematics": "13.0.0-alpha.5",
43
- "@skyux-sdk/stylelint-schematics": "13.0.0-alpha.5",
44
- "@skyux-sdk/testing": "13.0.0-alpha.5",
45
- "@skyux/a11y": "13.0.0-alpha.5",
46
- "@skyux/action-bars": "13.0.0-alpha.5",
47
- "@skyux/ag-grid": "13.0.0-alpha.5",
48
- "@skyux/angular-tree-component": "13.0.0-alpha.5",
49
- "@skyux/animations": "13.0.0-alpha.5",
50
- "@skyux/assets": "13.0.0-alpha.5",
51
- "@skyux/autonumeric": "13.0.0-alpha.5",
52
- "@skyux/avatar": "13.0.0-alpha.5",
53
- "@skyux/code-examples": "13.0.0-alpha.5",
54
- "@skyux/colorpicker": "13.0.0-alpha.5",
55
- "@skyux/config": "13.0.0-alpha.5",
56
- "@skyux/core": "13.0.0-alpha.5",
57
- "@skyux/data-manager": "13.0.0-alpha.5",
58
- "@skyux/datetime": "13.0.0-alpha.5",
59
- "@skyux/docs-tools": "13.0.0-alpha.5",
60
- "@skyux/errors": "13.0.0-alpha.5",
61
- "@skyux/flyout": "13.0.0-alpha.5",
62
- "@skyux/forms": "13.0.0-alpha.5",
63
- "@skyux/grids": "13.0.0-alpha.5",
64
- "@skyux/help-inline": "13.0.0-alpha.5",
65
- "@skyux/i18n": "13.0.0-alpha.5",
66
- "@skyux/icon": "13.0.0-alpha.5",
40
+ "@skyux-sdk/eslint-schematics": "13.0.0-alpha.7",
41
+ "@skyux-sdk/stylelint-schematics": "13.0.0-alpha.7",
42
+ "@skyux-sdk/testing": "13.0.0-alpha.7",
43
+ "@skyux/a11y": "13.0.0-alpha.7",
44
+ "@skyux/action-bars": "13.0.0-alpha.7",
45
+ "@skyux/ag-grid": "13.0.0-alpha.7",
46
+ "@skyux/angular-tree-component": "13.0.0-alpha.7",
47
+ "@skyux/animations": "13.0.0-alpha.7",
48
+ "@skyux/assets": "13.0.0-alpha.7",
49
+ "@skyux/autonumeric": "13.0.0-alpha.7",
50
+ "@skyux/avatar": "13.0.0-alpha.7",
51
+ "@skyux/code-examples": "13.0.0-alpha.7",
52
+ "@skyux/colorpicker": "13.0.0-alpha.7",
53
+ "@skyux/config": "13.0.0-alpha.7",
54
+ "@skyux/core": "13.0.0-alpha.7",
55
+ "@skyux/data-manager": "13.0.0-alpha.7",
56
+ "@skyux/datetime": "13.0.0-alpha.7",
57
+ "@skyux/docs-tools": "13.0.0-alpha.7",
58
+ "@skyux/errors": "13.0.0-alpha.7",
59
+ "@skyux/flyout": "13.0.0-alpha.7",
60
+ "@skyux/forms": "13.0.0-alpha.7",
61
+ "@skyux/grids": "13.0.0-alpha.7",
62
+ "@skyux/help-inline": "13.0.0-alpha.7",
63
+ "@skyux/i18n": "13.0.0-alpha.7",
64
+ "@skyux/icon": "13.0.0-alpha.7",
67
65
  "@skyux/icons": "^9.0.0",
68
- "@skyux/indicators": "13.0.0-alpha.5",
69
- "@skyux/inline-form": "13.0.0-alpha.5",
70
- "@skyux/layout": "13.0.0-alpha.5",
71
- "@skyux/list-builder": "13.0.0-alpha.5",
72
- "@skyux/list-builder-common": "13.0.0-alpha.5",
73
- "@skyux/list-builder-view-checklist": "13.0.0-alpha.5",
74
- "@skyux/list-builder-view-grids": "13.0.0-alpha.5",
75
- "@skyux/lists": "13.0.0-alpha.5",
76
- "@skyux/lookup": "13.0.0-alpha.5",
77
- "@skyux/manifest": "13.0.0-alpha.5",
78
- "@skyux/modals": "13.0.0-alpha.5",
79
- "@skyux/navbar": "13.0.0-alpha.5",
80
- "@skyux/pages": "13.0.0-alpha.5",
81
- "@skyux/phone-field": "13.0.0-alpha.5",
82
- "@skyux/popovers": "13.0.0-alpha.5",
83
- "@skyux/progress-indicator": "13.0.0-alpha.5",
84
- "@skyux/router": "13.0.0-alpha.5",
85
- "@skyux/select-field": "13.0.0-alpha.5",
86
- "@skyux/split-view": "13.0.0-alpha.5",
87
- "@skyux/tabs": "13.0.0-alpha.5",
88
- "@skyux/text-editor": "13.0.0-alpha.5",
89
- "@skyux/theme": "13.0.0-alpha.5",
90
- "@skyux/tiles": "13.0.0-alpha.5",
91
- "@skyux/toast": "13.0.0-alpha.5",
92
- "@skyux/validation": "13.0.0-alpha.5",
93
- "ag-grid-angular": "^33.3.2",
94
- "ag-grid-community": "^33.3.2",
95
- "ag-grid-enterprise": "^32.1.0",
66
+ "@skyux/indicators": "13.0.0-alpha.7",
67
+ "@skyux/inline-form": "13.0.0-alpha.7",
68
+ "@skyux/layout": "13.0.0-alpha.7",
69
+ "@skyux/list-builder": "13.0.0-alpha.7",
70
+ "@skyux/list-builder-common": "13.0.0-alpha.7",
71
+ "@skyux/list-builder-view-checklist": "13.0.0-alpha.7",
72
+ "@skyux/list-builder-view-grids": "13.0.0-alpha.7",
73
+ "@skyux/lists": "13.0.0-alpha.7",
74
+ "@skyux/lookup": "13.0.0-alpha.7",
75
+ "@skyux/manifest": "13.0.0-alpha.7",
76
+ "@skyux/modals": "13.0.0-alpha.7",
77
+ "@skyux/navbar": "13.0.0-alpha.7",
78
+ "@skyux/pages": "13.0.0-alpha.7",
79
+ "@skyux/phone-field": "13.0.0-alpha.7",
80
+ "@skyux/popovers": "13.0.0-alpha.7",
81
+ "@skyux/progress-indicator": "13.0.0-alpha.7",
82
+ "@skyux/router": "13.0.0-alpha.7",
83
+ "@skyux/select-field": "13.0.0-alpha.7",
84
+ "@skyux/split-view": "13.0.0-alpha.7",
85
+ "@skyux/tabs": "13.0.0-alpha.7",
86
+ "@skyux/text-editor": "13.0.0-alpha.7",
87
+ "@skyux/theme": "13.0.0-alpha.7",
88
+ "@skyux/tiles": "13.0.0-alpha.7",
89
+ "@skyux/toast": "13.0.0-alpha.7",
90
+ "@skyux/validation": "13.0.0-alpha.7",
91
+ "ag-grid-angular": "^34.1.1",
92
+ "ag-grid-community": "^34.1.1",
93
+ "ag-grid-enterprise": "^34.1.1",
96
94
  "autonumeric": "^4.10.8",
97
- "eslint-config-skyux": "13.0.0-alpha.5",
98
- "skyux-stylelint": "13.0.0-alpha.5",
99
- "stylelint-config-skyux": "13.0.0-alpha.5"
95
+ "eslint-config-skyux": "13.0.0-alpha.7",
96
+ "skyux-eslint": "13.0.0-alpha.7",
97
+ "skyux-stylelint": "13.0.0-alpha.7",
98
+ "stylelint-config-skyux": "13.0.0-alpha.7"
100
99
  }
101
100
  },
102
101
  "peerDependencies": {
@@ -0,0 +1,8 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { Schema } from './schema';
3
+ /**
4
+ * Converts `<sky-progress-indicator>` components using
5
+ * `displayMode="horizontal"` to `<sky-tabset>` components
6
+ * with `<sky-tab>` elements.
7
+ */
8
+ export default function convertProgressIndicatorWizardToTabWizardSchematic(options: Partial<Schema>): Rule;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = convertProgressIndicatorWizardToTabWizardSchematic;
4
+ const convert_progress_indicator_wizard_to_tab_wizard_1 = require("../../rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard");
5
+ /**
6
+ * Converts `<sky-progress-indicator>` components using
7
+ * `displayMode="horizontal"` to `<sky-tabset>` components
8
+ * with `<sky-tab>` elements.
9
+ */
10
+ function convertProgressIndicatorWizardToTabWizardSchematic(options) {
11
+ return (0, convert_progress_indicator_wizard_to_tab_wizard_1.convertProgressIndicatorWizardToTabWizard)({
12
+ projectPath: options.projectPath ?? '',
13
+ });
14
+ }
15
+ //# sourceMappingURL=convert-progress-indicator-wizard-to-tab-wizard.schematic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-progress-indicator-wizard-to-tab-wizard.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.schematic.ts"],"names":[],"mappings":";;AAWA,qEAMC;AAfD,iLAAwK;AAIxK;;;;GAIG;AACH,SAAwB,kDAAkD,CACxE,OAAwB;IAExB,OAAO,IAAA,2FAAyC,EAAC;QAC/C,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;KACvC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Represents options passed via Angular CLI.
3
+ */
4
+ export interface Schema {
5
+ /**
6
+ * The path to the files where the rule should be applied.
7
+ */
8
+ projectPath: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/ng-generate/convert-progress-indicator-wizard-to-tab-wizard/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "type": "object",
4
+ "description": "Converts sky-progress-indicator components using horizontal layout to use sky-tabset wizard",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "projectPath": {
8
+ "type": "string",
9
+ "description": "The path to the files where the rule should be applied.",
10
+ "format": "path",
11
+ "$default": {
12
+ "$source": "workingDirectory"
13
+ }
14
+ }
15
+ }
16
+ }
@@ -175,7 +175,7 @@ function convertPageSummaryToPageHeader(projectPath) {
175
175
  }
176
176
  });
177
177
  },
178
- (0, utility_1.addDependency)('@skyux/pages', `13.0.0-alpha.5`, {
178
+ (0, utility_1.addDependency)('@skyux/pages', `13.0.0-alpha.7`, {
179
179
  existing: utility_1.ExistingBehavior.Skip,
180
180
  }),
181
181
  ]);
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { ConvertProgressIndicatorWizardToTabWizardOptions } from './options';
3
+ export declare function convertProgressIndicatorWizardToTabWizard(options: ConvertProgressIndicatorWizardToTabWizardOptions): Rule;
@@ -0,0 +1,305 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertProgressIndicatorWizardToTabWizard = convertProgressIndicatorWizardToTabWizard;
4
+ const tslib_1 = require("tslib");
5
+ const schematics_1 = require("@angular-devkit/schematics");
6
+ const schematics_2 = require("@angular/cdk/schematics");
7
+ const typescript_1 = tslib_1.__importDefault(require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript"));
8
+ const utility_1 = require("@schematics/angular/utility");
9
+ const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
10
+ const change_1 = require("@schematics/angular/utility/change");
11
+ const eol_1 = require("@schematics/angular/utility/eol");
12
+ const util_1 = require("@schematics/angular/utility/standalone/util");
13
+ const node_path_1 = require("node:path");
14
+ const template_1 = require("../../utility/template");
15
+ const ng_ast_1 = require("../../utility/typescript/ng-ast");
16
+ const swap_imported_class_1 = require("../../utility/typescript/swap-imported-class");
17
+ const visit_project_files_1 = require("../../utility/visit-project-files");
18
+ /**
19
+ * Tabs do not use a heading element.
20
+ * Create a new `<h3>` element with the heading text.
21
+ */
22
+ function moveHeading(progressIndicator, recorder, content, offset, eol) {
23
+ const heading = (0, template_1.getElementsByTagName)('sky-progress-indicator-title', progressIndicator)[0];
24
+ if ((0, template_1.isParentNode)(heading)) {
25
+ const headingText = content.slice(heading.sourceCodeLocation.startTag.endOffset, heading.sourceCodeLocation.endTag.startOffset);
26
+ const indent = ' '.repeat(progressIndicator.sourceCodeLocation.startTag.startCol - 1);
27
+ recorder.insertLeft(offset + progressIndicator.sourceCodeLocation.startTag.startOffset, `<h3 class="sky-margin-stacked-sm">${headingText}</h3>${eol}${indent}`);
28
+ recorder.remove(offset + heading.sourceCodeLocation.startOffset, heading.sourceCodeLocation.endOffset -
29
+ heading.sourceCodeLocation.startOffset);
30
+ }
31
+ }
32
+ const tags = {
33
+ 'sky-progress-indicator': 'sky-tabset',
34
+ 'sky-progress-indicator-item': 'sky-tab',
35
+ 'sky-progress-indicator-nav-button': 'sky-tabset-nav-button',
36
+ };
37
+ function progressIndicatorTagSwap(filePath) {
38
+ return (position, oldTag, node, content) => {
39
+ if (position === 'open') {
40
+ if (oldTag === 'sky-progress-indicator') {
41
+ const attributeSwaps = {
42
+ '[startingIndex]': '[active]',
43
+ '(progressChanges)': '(activeChange)',
44
+ '[messageStream]': '(unsupported)',
45
+ isPassive: '',
46
+ '[isPassive]': '',
47
+ displayMode: '',
48
+ '[displayMode]': '',
49
+ };
50
+ const attributeCallback = (oldAttr, newAttr, _node, _content) => {
51
+ if (oldAttr === '(progressChanges)') {
52
+ const newValue = (0, template_1.getAttributeValueText)(content, node, oldAttr).replace('$event', '{ activeIndex: $event }');
53
+ return `${newAttr}${newValue}`;
54
+ }
55
+ else if (oldAttr === '[messageStream]') {
56
+ throw new Error(`The <sky-progress-indicator> element in ${filePath} uses '[messageStream]', which is not supported on the <sky-tabset> component. Please evaluate if '[messageStream]' is still needed.`);
57
+ }
58
+ return `${newAttr}${(0, template_1.getAttributeValueText)(content, node, oldAttr)}`;
59
+ };
60
+ return `<${tags[oldTag]} tabStyle="wizard"${(0, template_1.swapAttributes)(node, attributeSwaps, content, attributeCallback)}>`;
61
+ }
62
+ else if (oldTag === 'sky-progress-indicator-item') {
63
+ return `<${tags[oldTag]}${(0, template_1.swapAttributes)(node, { title: 'tabHeading', '[title]': '[tabHeading]' }, content)}>`;
64
+ }
65
+ }
66
+ return `</${tags[oldTag]}>`;
67
+ };
68
+ }
69
+ function progressIndicatorNavButtonTagSwap(filePath) {
70
+ return (position, oldTag, node, content) => {
71
+ if (position === 'open') {
72
+ if (node.attrs.some((attr) => attr.name === '(actionClick)'.toLowerCase())) {
73
+ throw new Error(`The <sky-progress-indicator-nav-button> element in ${filePath} uses '(actionClick)', which is not supported on the <sky-tabset-nav-button> component. Please evaluate if '(actionClick)' is still needed.`);
74
+ }
75
+ if (node.attrs.some((attr) => attr.name === 'buttonType'.toLowerCase() && attr.value === 'reset')) {
76
+ throw new Error(`The <sky-progress-indicator-nav-button> element in ${filePath} uses 'buttonType="reset"', which is not supported on the <sky-tabset-nav-button> component. Please evaluate if a reset button is still needed.`);
77
+ }
78
+ const close = node.sourceCodeLocation.endTag?.startOffset ? '>' : ' />';
79
+ return `<${tags[oldTag]}${(0, template_1.swapAttributes)(node, { progressIndicator: 'tabset', '[progressIndicator]': '[tabset]' }, content)}${close}`;
80
+ }
81
+ return `</${tags[oldTag]}>`;
82
+ };
83
+ }
84
+ function addFollowupComments(filePath, sourceFile, followupTasks, eol) {
85
+ const changes = [];
86
+ const addComments = ([functionName, comment]) => {
87
+ const functionNodes = (0, ast_utils_1.findNodes)(sourceFile, (node) => typescript_1.default.isIdentifier(node) && node.text === functionName);
88
+ if (functionNodes.length === 1) {
89
+ const line = sourceFile.getLineAndCharacterOfPosition(functionNodes[0].getStart()).line;
90
+ const lineStart = sourceFile.getPositionOfLineAndCharacter(line, 0);
91
+ const lineText = String(sourceFile.text.split('\n')[line]);
92
+ const indentation = lineText.match(/^\s*/)?.[0] || '';
93
+ changes.push(new change_1.InsertChange(filePath, lineStart, `${indentation}// todo: ${comment}${eol}`));
94
+ }
95
+ };
96
+ Object.entries(followupTasks.addCommentsToProperties).forEach(addComments);
97
+ return changes;
98
+ }
99
+ function applyFollowupTasksToComponent(source, tree, filePath, followupTasks, isStandalone, eol) {
100
+ if (isStandalone &&
101
+ (0, schematics_2.isImported)(source, 'SkyProgressIndicatorModule', '@skyux/progress-indicator') &&
102
+ !(0, schematics_2.isImported)(source, 'SkyTabsModule', '@skyux/tabs')) {
103
+ if (followupTasks.keepProgressIndicator) {
104
+ applyModuleDependencies(source, tree, filePath);
105
+ }
106
+ else {
107
+ swapModuleDependencies(tree, filePath);
108
+ }
109
+ }
110
+ (0, util_1.applyChangesToFile)(tree, filePath, addFollowupComments(filePath, (0, schematics_2.parseSourceFile)(tree, filePath), followupTasks, eol));
111
+ }
112
+ function applyModuleDependencies(originalSource, tree, filePath) {
113
+ [
114
+ ['Component', '@angular/core'],
115
+ ['NgModule', '@angular/core'],
116
+ ['TestBed.configureTestingModule', '@angular/core/testing'],
117
+ ].forEach(([decorator, decoratorModule]) => {
118
+ if ((0, schematics_2.isImported)(originalSource, String(decorator.split('.').shift()), decoratorModule)) {
119
+ const metadata = decorator === 'TestBed.configureTestingModule'
120
+ ? (0, ng_ast_1.getTestingModuleMetadata)(originalSource)
121
+ : (0, schematics_2.getDecoratorMetadata)(originalSource, decorator, decoratorModule);
122
+ ['imports', 'exports'].forEach((metadataField) => {
123
+ if (metadata.some((node) => typescript_1.default.isObjectLiteralExpression(node) &&
124
+ (0, ng_ast_1.isSymbolInClassMetadataFieldArray)(node, metadataField, 'SkyProgressIndicatorModule'))) {
125
+ (0, util_1.applyChangesToFile)(tree, filePath, (0, ng_ast_1.addSymbolToClassMetadata)((0, schematics_2.parseSourceFile)(tree, filePath), decorator, filePath, metadataField, 'SkyTabsModule', '@skyux/tabs'));
126
+ }
127
+ });
128
+ }
129
+ });
130
+ }
131
+ function swapModuleDependencies(tree, filePath) {
132
+ const recorder = tree.beginUpdate(filePath);
133
+ (0, swap_imported_class_1.swapImportedClass)(recorder, filePath, (0, schematics_2.parseSourceFile)(tree, filePath), [
134
+ {
135
+ classNames: { SkyProgressIndicatorModule: 'SkyTabsModule' },
136
+ moduleName: {
137
+ old: '@skyux/progress-indicator',
138
+ new: '@skyux/tabs',
139
+ },
140
+ },
141
+ ]);
142
+ tree.commitUpdate(recorder);
143
+ }
144
+ function isThisAWizard(progressIndicator, componentSource, filePath, followupTasks) {
145
+ const displayModeBoundAttribute = progressIndicator.attrs.find((attr) => '[displayMode]'.toLowerCase() === attr.name);
146
+ const displayModeAttribute = progressIndicator.attrs.find((attr) => 'displayMode'.toLowerCase() === attr.name);
147
+ if (displayModeAttribute) {
148
+ return ['horizontal', '1'].includes(displayModeAttribute.value);
149
+ }
150
+ else if (displayModeBoundAttribute) {
151
+ const displayModeExpression = displayModeBoundAttribute.value.trim();
152
+ if (displayModeExpression.match(/^([`"'])horizontal\1$/) ||
153
+ displayModeExpression === '1') {
154
+ // You're a wizard!
155
+ return true;
156
+ }
157
+ else if (!displayModeExpression.match(/^\w+$/)) {
158
+ // If the expression is not a simple identifier, we can't determine the value.
159
+ throw new Error(`Unable to determine the 'displayMode' attribute on <sky-progress-indicator> in ${filePath}.`);
160
+ }
161
+ else {
162
+ // Find the value in componentSource
163
+ const displayModeProperty = (0, ast_utils_1.findNodes)(componentSource, (node) => typescript_1.default.isPropertyDeclaration(node) &&
164
+ typescript_1.default.isIdentifier(node.name) &&
165
+ node.name.text === displayModeExpression)[0];
166
+ const value = displayModeProperty?.initializer?.getText().trim();
167
+ if (!value) {
168
+ throw new Error(`Unable to determine the value for the 'displayMode' attribute on <sky-progress-indicator> in ${filePath}.`);
169
+ }
170
+ if (!!value.match(/^([`"'])horizontal\1$/) ||
171
+ ['SkyProgressIndicatorDisplayMode.Horizontal', '1'].includes(value)) {
172
+ // You're a wizard!
173
+ followupTasks.addCommentsToProperties[displayModeProperty.name.getText()] =
174
+ `Remove. The ${displayModeProperty.name.getText()} property was previously used to determine if the progress indicator should be displayed as a wizard. It is no longer needed.`;
175
+ return true;
176
+ }
177
+ }
178
+ }
179
+ return false;
180
+ }
181
+ function convertTemplate(recorder, filePath, content, componentSource, offset = 0) {
182
+ const eol = (0, eol_1.getEOL)(content);
183
+ const fragment = (0, template_1.parseTemplate)(content);
184
+ const progressIndicators = (0, template_1.getElementsByTagName)('sky-progress-indicator', fragment);
185
+ const followupTasks = {
186
+ swapModuleImports: false,
187
+ keepProgressIndicator: false,
188
+ addCommentsToProperties: {},
189
+ };
190
+ for (const progressIndicator of progressIndicators) {
191
+ const isWizard = isThisAWizard(progressIndicator, componentSource, filePath, followupTasks);
192
+ if (!isWizard) {
193
+ followupTasks.keepProgressIndicator = true;
194
+ continue;
195
+ }
196
+ followupTasks.swapModuleImports = true;
197
+ moveHeading(progressIndicator, recorder, content, offset, eol);
198
+ (0, template_1.swapTags)(content, recorder, offset, ['sky-progress-indicator', 'sky-progress-indicator-item'], progressIndicatorTagSwap(filePath), progressIndicator);
199
+ }
200
+ const navButtons = (0, template_1.getElementsByTagName)('sky-progress-indicator-nav-button', fragment);
201
+ for (const navButton of navButtons) {
202
+ (0, template_1.swapTags)(content, recorder, offset, ['sky-progress-indicator-nav-button'], progressIndicatorNavButtonTagSwap(filePath), navButton);
203
+ }
204
+ return followupTasks;
205
+ }
206
+ function convertHtmlFile(tree, filePath, componentSource) {
207
+ const content = tree.readText(filePath);
208
+ if (content.includes('<sky-progress-indicator')) {
209
+ const recorder = tree.beginUpdate(filePath);
210
+ const followupTasks = convertTemplate(recorder, filePath, content, componentSource);
211
+ tree.commitUpdate(recorder);
212
+ return followupTasks;
213
+ }
214
+ return undefined;
215
+ }
216
+ function convertTypescriptFile(tree, filePath, componentsThatNeedModules, componentsThatKeepProgressIndicator) {
217
+ const source = (0, schematics_2.parseSourceFile)(tree, filePath);
218
+ const eol = (0, eol_1.getEOL)(tree.readText(filePath));
219
+ let followupTasks = undefined;
220
+ if ((0, schematics_2.isImported)(source, 'Component', '@angular/core')) {
221
+ const metadata = (0, schematics_2.getDecoratorMetadata)(source, 'Component', '@angular/core')[0];
222
+ const templateUrl = (0, schematics_2.getMetadataField)(metadata, 'templateUrl')[0];
223
+ if (templateUrl && typescript_1.default.isStringLiteralLike(templateUrl.initializer)) {
224
+ const htmlFilePath = (0, node_path_1.normalize)((0, node_path_1.join)((0, node_path_1.dirname)(filePath), templateUrl.initializer.text));
225
+ followupTasks = convertHtmlFile(tree, htmlFilePath, source);
226
+ }
227
+ else {
228
+ const template = (0, ng_ast_1.getInlineTemplates)(source)[0];
229
+ if (template) {
230
+ const content = tree.readText(filePath);
231
+ const templateContent = content.slice(template.start, template.end);
232
+ const recorder = tree.beginUpdate(filePath);
233
+ followupTasks = convertTemplate(recorder, filePath, templateContent, source, template.start);
234
+ tree.commitUpdate(recorder);
235
+ }
236
+ }
237
+ if (followupTasks?.swapModuleImports) {
238
+ const isStandalone = (0, ng_ast_1.isStandaloneComponent)(metadata);
239
+ applyFollowupTasksToComponent(source, tree, filePath, followupTasks, isStandalone, eol);
240
+ if (!isStandalone) {
241
+ const componentClassName = (0, ast_utils_1.findNodes)(source, typescript_1.default.isClassDeclaration)[0]?.name?.text;
242
+ componentsThatNeedModules.push(componentClassName);
243
+ if (followupTasks?.keepProgressIndicator) {
244
+ componentsThatKeepProgressIndicator.push(componentClassName);
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+ function hasSymbolReference(source, symbolNames) {
251
+ return ((0, ast_utils_1.findNodes)(source, (node) => typescript_1.default.isIdentifier(node) && symbolNames.includes(node.text)).length > 0);
252
+ }
253
+ function isModuleExportingProgressIndicatorModule(source) {
254
+ if ((0, schematics_2.isImported)(source, 'NgModule', '@angular/core')) {
255
+ const decoratorMetadata = (0, schematics_2.getDecoratorMetadata)(source, 'NgModule', '@angular/core')[0];
256
+ return (typescript_1.default.isObjectLiteralExpression(decoratorMetadata) &&
257
+ (0, ng_ast_1.isSymbolInClassMetadataFieldArray)(decoratorMetadata, 'exports', 'SkyProgressIndicatorModule'));
258
+ }
259
+ return false;
260
+ }
261
+ /**
262
+ * If this is a test file and references a component that was converted,
263
+ * we need to ensure that the SkyTabsModule is imported in the TestBed configuration.
264
+ */
265
+ function updateModuleOrTestFile(tree, filePath, componentsThatNeedModules, componentsThatKeepProgressIndicator) {
266
+ const source = (0, schematics_2.parseSourceFile)(tree, filePath);
267
+ if (((0, schematics_2.isImported)(source, 'TestBed', '@angular/core/testing') &&
268
+ hasSymbolReference(source, componentsThatNeedModules)) ||
269
+ ((0, schematics_2.isImported)(source, 'NgModule', '@angular/core') &&
270
+ (0, schematics_2.isImported)(source, 'SkyProgressIndicatorModule', '@skyux/progress-indicator'))) {
271
+ if ((componentsThatKeepProgressIndicator.length > 0 &&
272
+ isModuleExportingProgressIndicatorModule(source)) ||
273
+ hasSymbolReference(source, componentsThatKeepProgressIndicator)) {
274
+ applyModuleDependencies(source, tree, filePath);
275
+ }
276
+ else {
277
+ swapModuleDependencies(tree, filePath);
278
+ }
279
+ }
280
+ }
281
+ function convertProgressIndicatorWizardToTabWizard(options) {
282
+ return (0, schematics_1.chain)([
283
+ (tree, context) => {
284
+ // This is used to track if we need to add the SkyTabsModule to the module imports.
285
+ const componentsThatNeedModules = [];
286
+ const componentsThatKeepProgressIndicator = [];
287
+ (0, visit_project_files_1.visitProjectFiles)(tree, options.projectPath, (filePath) => {
288
+ if (filePath.endsWith('.ts')) {
289
+ convertTypescriptFile(tree, filePath, componentsThatNeedModules, componentsThatKeepProgressIndicator);
290
+ }
291
+ });
292
+ if (componentsThatNeedModules.length > 0) {
293
+ (0, visit_project_files_1.visitProjectFiles)(tree, options.projectPath, (filePath) => {
294
+ if (filePath.endsWith('.ts')) {
295
+ updateModuleOrTestFile(tree, filePath, componentsThatNeedModules, componentsThatKeepProgressIndicator);
296
+ }
297
+ });
298
+ }
299
+ },
300
+ (0, utility_1.addDependency)('@skyux/tabs', `13.0.0-alpha.7`, {
301
+ existing: utility_1.ExistingBehavior.Skip,
302
+ }),
303
+ ]);
304
+ }
305
+ //# sourceMappingURL=convert-progress-indicator-wizard-to-tab-wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-progress-indicator-wizard-to-tab-wizard.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/convert-progress-indicator-wizard-to-tab-wizard.ts"],"names":[],"mappings":";;AAgjBA,8FAmCC;;AAnlBD,2DAA+E;AAC/E,wDAKiC;AACjC,wIAAgG;AAChG,yDAA8E;AAC9E,qEAAkE;AAClE,+DAA0E;AAC1E,yDAAyD;AACzD,sEAAiF;AAEjF,yCAAqD;AAErD,qDASgC;AAChC,4DAMyC;AACzC,sFAAiF;AACjF,2EAAsE;AAItE;;;GAGG;AACH,SAAS,WAAW,CAClB,iBAAsC,EACtC,QAAwB,EACxB,OAAe,EACf,MAAc,EACd,GAAW;IAEX,MAAM,OAAO,GAAG,IAAA,+BAAoB,EAClC,8BAA8B,EAC9B,iBAAiB,CAClB,CAAC,CAAC,CAAC,CAAC;IACL,IAAI,IAAA,uBAAY,EAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAC/B,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,SAAS,EAC7C,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAC9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AAa,EAAE,CAAC;YACzD,IAAA,uCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,EAAE;gBACxD,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC7B,qBAAqB,CACnB,IAAI,EACJ,QAAQ,EACR,yBAAyB,EACzB,mCAAmC,CACpC,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;YACH,IAAI,yBAAyB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzC,IAAA,uCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,EAAE;oBACxD,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC7B,sBAAsB,CACpB,IAAI,EACJ,QAAQ,EACR,yBAAyB,EACzB,mCAAmC,CACpC,CAAC;oBACJ,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,IAAA,uBAAa,EAAC,aAAa,EAAE,mBAAmB,EAAE;YAChD,QAAQ,EAAE,0BAAgB,CAAC,IAAI;SAChC,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface ConvertProgressIndicatorWizardToTabWizardOptions {
2
+ /**
3
+ * The path to the files where the rule should be applied.
4
+ */
5
+ projectPath: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/rules/convert-progress-indicator-wizard-to-tab-wizard/options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
2
+ import { Schema as ComponentSchema } from '@schematics/angular/component/schema';
3
+ import { Schema as ModuleSchema } from '@schematics/angular/module/schema';
4
+ export declare function angularModuleGenerator(runner: SchematicTestRunner, tree: UnitTestTree, schema: ModuleSchema): Promise<UnitTestTree>;
5
+ export declare function angularComponentGenerator(runner: SchematicTestRunner, tree: UnitTestTree, schema: ComponentSchema): Promise<UnitTestTree>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.angularModuleGenerator = angularModuleGenerator;
4
+ exports.angularComponentGenerator = angularComponentGenerator;
5
+ async function angularModuleGenerator(runner, tree, schema) {
6
+ return await runner.runExternalSchematic('@schematics/angular', 'module', {
7
+ typeSeparator: '.',
8
+ ...schema,
9
+ }, tree);
10
+ }
11
+ async function angularComponentGenerator(runner, tree, schema) {
12
+ return await runner.runExternalSchematic('@schematics/angular', 'component', {
13
+ style: 'scss',
14
+ type: 'component',
15
+ ...schema,
16
+ }, tree);
17
+ }
18
+ //# sourceMappingURL=angular-module-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"angular-module-generator.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/testing/angular-module-generator.ts"],"names":[],"mappings":";;AAOA,wDAcC;AAED,8DAeC;AA/BM,KAAK,UAAU,sBAAsB,CAC1C,MAA2B,EAC3B,IAAkB,EAClB,MAAoB;IAEpB,OAAO,MAAM,MAAM,CAAC,oBAAoB,CACtC,qBAAqB,EACrB,QAAQ,EACR;QACE,aAAa,EAAE,GAAG;QAClB,GAAG,MAAM;KACV,EACD,IAAI,CACL,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,yBAAyB,CAC7C,MAA2B,EAC3B,IAAkB,EAClB,MAAuB;IAEvB,OAAO,MAAM,MAAM,CAAC,oBAAoB,CACtC,qBAAqB,EACrB,WAAW,EACX;QACE,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,WAAW;QACjB,GAAG,MAAM;KACV,EACD,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -4,9 +4,22 @@ export declare function getInlineTemplates(sourceFile: ts.SourceFile): {
4
4
  start: number;
5
5
  end: number;
6
6
  }[];
7
+ export declare function getTemplateUrls(sourceFile: ts.SourceFile): string[];
8
+ /**
9
+ * Like `getDecoratorMetadata` from @angular/cdk/schematics, but for `TestBed.configureTestingModule`.
10
+ */
11
+ export declare function getTestingModuleMetadata(source: ts.SourceFile): ts.ObjectLiteralExpression[];
12
+ /**
13
+ * Determines whether a component is standalone from its metadata.
14
+ */
15
+ export declare function isStandaloneComponent(metadata: ts.ObjectLiteralExpression): boolean;
7
16
  /**
8
17
  * Adds a symbol to the metadata of an Angular class (NgModule, Component, Directive).
9
18
  *
10
19
  * Derived from https://github.com/angular/angular-cli/blob/20.1.x/packages/schematics/angular/utility/ast-utils.ts
11
20
  */
12
- export declare function addSymbolToClassMetadata(source: ts.SourceFile, decorator: 'NgModule' | 'Component' | 'Directive', filePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];
21
+ export declare function addSymbolToClassMetadata(source: ts.SourceFile, decorator: 'NgModule' | 'Component' | 'Directive' | 'TestBed.configureTestingModule', filePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];
22
+ /**
23
+ * Checks if a symbol is present in a class metadata field array.
24
+ */
25
+ export declare function isSymbolInClassMetadataFieldArray(node: ts.ObjectLiteralExpression, metadataField: string, symbolName: string): boolean;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getInlineTemplates = getInlineTemplates;
4
+ exports.getTemplateUrls = getTemplateUrls;
5
+ exports.getTestingModuleMetadata = getTestingModuleMetadata;
6
+ exports.isStandaloneComponent = isStandaloneComponent;
4
7
  exports.addSymbolToClassMetadata = addSymbolToClassMetadata;
8
+ exports.isSymbolInClassMetadataFieldArray = isSymbolInClassMetadataFieldArray;
5
9
  const tslib_1 = require("tslib");
6
10
  const core_1 = require("@angular-devkit/core");
7
11
  const schematics_1 = require("@angular/cdk/schematics");
@@ -18,8 +22,7 @@ function getInlineTemplates(sourceFile) {
18
22
  if (templates.length > 0) {
19
23
  return templates
20
24
  .map((template) => {
21
- if (typescript_1.default.isStringLiteralLike(template.initializer) ||
22
- typescript_1.default.isNoSubstitutionTemplateLiteral(template.initializer)) {
25
+ if (typescript_1.default.isStringLiteralLike(template.initializer)) {
23
26
  return {
24
27
  start: template.initializer.getStart() + 1,
25
28
  end: template.initializer.getEnd() - 1, // Exclude quotes
@@ -32,96 +35,164 @@ function getInlineTemplates(sourceFile) {
32
35
  }
33
36
  return [];
34
37
  }
38
+ function getTemplateUrls(sourceFile) {
39
+ if ((0, schematics_1.isImported)(sourceFile, 'Component', '@angular/core')) {
40
+ const components = (0, schematics_1.getDecoratorMetadata)(sourceFile, 'Component', '@angular/core');
41
+ const templates = components
42
+ .filter((component) => typescript_1.default.isObjectLiteralExpression(component))
43
+ .flatMap((component) => (0, schematics_1.getMetadataField)(component, 'templateUrl'))
44
+ .filter((template) => typescript_1.default.isPropertyAssignment(template));
45
+ if (templates.length > 0) {
46
+ return templates
47
+ .map((template) => {
48
+ if (typescript_1.default.isStringLiteralLike(template.initializer)) {
49
+ const quoted = template.initializer.getText();
50
+ return quoted.substring(1, quoted.length - 1);
51
+ }
52
+ return undefined;
53
+ })
54
+ .filter(Boolean);
55
+ }
56
+ }
57
+ return [];
58
+ }
59
+ /**
60
+ * Like `getDecoratorMetadata` from @angular/cdk/schematics, but for `TestBed.configureTestingModule`.
61
+ */
62
+ function getTestingModuleMetadata(source) {
63
+ return (0, ast_utils_1.findNodes)(source, (node) => typescript_1.default.isObjectLiteralExpression(node) &&
64
+ typescript_1.default.isCallExpression(node.parent) &&
65
+ node.parent.expression.getText().trim() ===
66
+ 'TestBed.configureTestingModule');
67
+ }
68
+ /**
69
+ * Determines whether a component is standalone from its metadata.
70
+ */
71
+ function isStandaloneComponent(metadata) {
72
+ const standalone = (0, schematics_1.getMetadataField)(metadata, 'standalone');
73
+ return (!standalone[0] ||
74
+ (typescript_1.default.isPropertyAssignment(standalone[0]) &&
75
+ standalone[0].initializer.kind === typescript_1.default.SyntaxKind.TrueKeyword));
76
+ }
35
77
  /**
36
78
  * Adds a symbol to the metadata of an Angular class (NgModule, Component, Directive).
37
79
  *
38
80
  * Derived from https://github.com/angular/angular-cli/blob/20.1.x/packages/schematics/angular/utility/ast-utils.ts
39
81
  */
40
82
  function addSymbolToClassMetadata(source, decorator, filePath, metadataField, symbolName, importPath = null) {
41
- const nodes = (0, schematics_1.getDecoratorMetadata)(source, decorator, '@angular/core');
42
- const node = nodes[0];
43
- // Find the decorator declaration.
44
- if (!node || !typescript_1.default.isObjectLiteralExpression(node)) {
45
- return [];
46
- }
47
- // Get all the children property assignment of object literals.
48
- const matchingProperties = (0, schematics_1.getMetadataField)(node, metadataField);
49
- if (!matchingProperties.length) {
50
- // We haven't found the field in the metadata declaration. Insert a new field.
51
- let position;
83
+ const nodes = 'TestBed.configureTestingModule' === decorator
84
+ ? getTestingModuleMetadata(source)
85
+ : (0, schematics_1.getDecoratorMetadata)(source, decorator, '@angular/core');
86
+ let insertedImport = false;
87
+ return nodes
88
+ .filter((node) => !!node && typescript_1.default.isObjectLiteralExpression(node))
89
+ .flatMap((node) => {
90
+ if (importPath === '@angular/common' &&
91
+ isSymbolInClassMetadataFieldArray(node, metadataField, 'CommonModule')) {
92
+ // Special case: don't add children of CommonModule if it's already present.
93
+ return [];
94
+ }
95
+ // Get all the children property assignment of object literals.
96
+ const matchingProperties = (0, schematics_1.getMetadataField)(node, metadataField);
97
+ if (!matchingProperties.length) {
98
+ // We haven't found the field in the metadata declaration. Insert a new field.
99
+ let position;
100
+ let toInsert;
101
+ if (!node.properties.length) {
102
+ position = node.getEnd() - 1;
103
+ toInsert = `\n ${metadataField}: [\n${core_1.tags.indentBy(4) `${symbolName}`}\n ]\n`;
104
+ }
105
+ else {
106
+ const childNode = node.properties[node.properties.length - 1];
107
+ position = childNode.getEnd();
108
+ // Get the indentation of the last element, if any.
109
+ const text = childNode.getFullText(source);
110
+ const matches = text.match(/^(\r?\n)(\s*)/);
111
+ if (matches) {
112
+ toInsert =
113
+ `,${matches[0]}${metadataField}: [${matches[1]}` +
114
+ `${core_1.tags.indentBy(matches[2].length + 2) `${symbolName}`}${matches[0]}]`;
115
+ }
116
+ else {
117
+ toInsert = `, ${metadataField}: [${symbolName}]`;
118
+ }
119
+ }
120
+ if (importPath !== null && !insertedImport) {
121
+ insertedImport = true;
122
+ return [
123
+ new change_1.InsertChange(filePath, position, toInsert),
124
+ (0, ast_utils_1.insertImport)(source, filePath,
125
+ // Remove function call syntax (e.g., SomeSymbol()) and property access (e.g., SomeSymbol.method) from symbolName for import.
126
+ symbolName.replace(/(\.\w+|\(.*\))$/, ''), importPath),
127
+ ];
128
+ }
129
+ else {
130
+ return [new change_1.InsertChange(filePath, position, toInsert)];
131
+ }
132
+ }
133
+ const assignment = matchingProperties[0];
134
+ // If it's not an array, nothing we can do really.
135
+ if (!typescript_1.default.isPropertyAssignment(assignment) ||
136
+ !typescript_1.default.isArrayLiteralExpression(assignment.initializer)) {
137
+ return [];
138
+ }
139
+ let expression;
140
+ const assignmentInit = assignment.initializer;
141
+ const elements = assignmentInit.elements;
142
+ if (elements.length) {
143
+ const symbolsArray = elements.map((node) => core_1.tags.oneLine `${node.getText()}`);
144
+ if (symbolsArray.includes(core_1.tags.oneLine `${symbolName}`)) {
145
+ return [];
146
+ }
147
+ expression = elements[elements.length - 1];
148
+ }
149
+ else {
150
+ expression = assignmentInit;
151
+ }
52
152
  let toInsert;
53
- if (!node.properties.length) {
54
- position = node.getEnd() - 1;
55
- toInsert = `\n ${metadataField}: [\n${core_1.tags.indentBy(4) `${symbolName}`}\n ]\n`;
153
+ let position = expression.getEnd();
154
+ if (typescript_1.default.isArrayLiteralExpression(expression)) {
155
+ // We found the field but it's empty. Insert it just before the `]`.
156
+ position--;
157
+ toInsert = `\n${core_1.tags.indentBy(4) `${symbolName}`}\n `;
56
158
  }
57
159
  else {
58
- const childNode = node.properties[node.properties.length - 1];
59
- position = childNode.getEnd();
60
160
  // Get the indentation of the last element, if any.
61
- const text = childNode.getFullText(source);
161
+ const text = expression.getFullText(source);
62
162
  const matches = text.match(/^(\r?\n)(\s*)/);
63
163
  if (matches) {
64
- toInsert =
65
- `,${matches[0]}${metadataField}: [${matches[1]}` +
66
- `${core_1.tags.indentBy(matches[2].length + 2) `${symbolName}`}${matches[0]}]`;
164
+ toInsert = `,${matches[1]}${core_1.tags.indentBy(matches[2].length) `${symbolName}`}`;
67
165
  }
68
166
  else {
69
- toInsert = `, ${metadataField}: [${symbolName}]`;
167
+ toInsert = `, ${symbolName}`;
70
168
  }
71
169
  }
72
- if (importPath !== null) {
170
+ if (importPath !== null && !insertedImport) {
171
+ insertedImport = true;
73
172
  return [
74
173
  new change_1.InsertChange(filePath, position, toInsert),
75
- (0, ast_utils_1.insertImport)(source, filePath, symbolName.replace(/\..*$/, ''), importPath),
174
+ (0, ast_utils_1.insertImport)(source, filePath, symbolName.replace(/[.(].*$/, ''), importPath),
76
175
  ];
77
176
  }
78
- else {
79
- return [new change_1.InsertChange(filePath, position, toInsert)];
80
- }
177
+ return [new change_1.InsertChange(filePath, position, toInsert)];
178
+ });
179
+ }
180
+ /**
181
+ * Checks if a symbol is present in a class metadata field array.
182
+ */
183
+ function isSymbolInClassMetadataFieldArray(node, metadataField, symbolName) {
184
+ const matchingProperties = (0, schematics_1.getMetadataField)(node, metadataField);
185
+ if (!matchingProperties.length) {
186
+ return false;
81
187
  }
82
188
  const assignment = matchingProperties[0];
83
- // If it's not an array, nothing we can do really.
84
189
  if (!typescript_1.default.isPropertyAssignment(assignment) ||
85
190
  !typescript_1.default.isArrayLiteralExpression(assignment.initializer)) {
86
- return [];
191
+ return false;
87
192
  }
88
- let expression;
89
193
  const assignmentInit = assignment.initializer;
90
194
  const elements = assignmentInit.elements;
91
- if (elements.length) {
92
- const symbolsArray = elements.map((node) => core_1.tags.oneLine `${node.getText()}`);
93
- if (symbolsArray.includes(core_1.tags.oneLine `${symbolName}`)) {
94
- return [];
95
- }
96
- expression = elements[elements.length - 1];
97
- }
98
- else {
99
- expression = assignmentInit;
100
- }
101
- let toInsert;
102
- let position = expression.getEnd();
103
- if (typescript_1.default.isArrayLiteralExpression(expression)) {
104
- // We found the field but it's empty. Insert it just before the `]`.
105
- position--;
106
- toInsert = `\n${core_1.tags.indentBy(4) `${symbolName}`}\n `;
107
- }
108
- else {
109
- // Get the indentation of the last element, if any.
110
- const text = expression.getFullText(source);
111
- const matches = text.match(/^(\r?\n)(\s*)/);
112
- if (matches) {
113
- toInsert = `,${matches[1]}${core_1.tags.indentBy(matches[2].length) `${symbolName}`}`;
114
- }
115
- else {
116
- toInsert = `, ${symbolName}`;
117
- }
118
- }
119
- if (importPath !== null) {
120
- return [
121
- new change_1.InsertChange(filePath, position, toInsert),
122
- (0, ast_utils_1.insertImport)(source, filePath, symbolName.replace(/\..*$/, ''), importPath),
123
- ];
124
- }
125
- return [new change_1.InsertChange(filePath, position, toInsert)];
195
+ const symbolsArray = elements.map((node) => core_1.tags.oneLine `${node.getText()}`);
196
+ return symbolsArray.includes(core_1.tags.oneLine `${symbolName}`);
126
197
  }
127
198
  //# sourceMappingURL=ng-ast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-ast.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/ng-ast.ts"],"names":[],"mappings":";;AAUA,gDA+BC;AAOD,4DA+GC;;AA/JD,+CAA4C;AAC5C,wDAIiC;AACjC,wIAAgG;AAChG,qEAAqE;AACrE,+DAA0E;AAE1E,SAAgB,kBAAkB,CAChC,UAAyB;IAEzB,IAAI,IAAA,uBAAU,EAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,CAAC;QACzD,MAAM,UAAU,GAAG,IAAA,iCAAoB,EACrC,UAAU,EACV,WAAW,EACX,eAAe,CAChB,CAAC;QACF,MAAM,SAAS,GAAG,UAAU;aACzB,MAAM,CAAC,CAAC,SAAS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MAAM,EAAE,CAAC;IACnC,IAAI,oBAAE,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5C,oEAAoE;QACpE,QAAQ,EAAE,CAAC;QACX,QAAQ,GAAG,KAAK,WAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA,GAAG,UAAU,EAAE,MAAM,CAAC;IACxD,CAAC;SAAM,CAAC;QACN,mDAAmD;QACnD,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAC5C,IAAI,OAAO,EAAE,CAAC;YACZ,QAAQ,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,WAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA,GAAG,UAAU,EAAE,EAAE,CAAC;QAChF,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,KAAK,UAAU,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO;YACL,IAAI,qBAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;YAC9C,IAAA,wBAAY,EACV,MAAM,EACN,QAAQ,EACR,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,EAC/B,UAAU,CACX;SACF,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,IAAI,qBAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC1D,CAAC"}
1
+ {"version":3,"file":"ng-ast.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/utility/typescript/ng-ast.ts"],"names":[],"mappings":";;AAUA,gDA4BC;AAED,0CAwBC;AAKD,4DAWC;AAKD,sDASC;AAOD,4DA+HC;AAKD,8EAwBC;;AAjQD,+CAA4C;A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AAC,CAAC,CAAC;IAEzC,IACE,CAAC,oBAAE,CAAC,oBAAoB,CAAC,UAAU,CAAC;QACpC,CAAC,oBAAE,CAAC,wBAAwB,CAAC,UAAU,CAAC,WAAW,CAAC,EACpD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAC9C,MAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;IAEzC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAI,CAAC,OAAO,CAAA,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC7E,OAAO,YAAY,CAAC,QAAQ,CAAC,WAAI,CAAC,OAAO,CAAA,GAAG,UAAU,EAAE,CAAC,CAAC;AAC5D,CAAC"}
package/src/version.js CHANGED
@@ -19,5 +19,5 @@ exports.Version = Version;
19
19
  /**
20
20
  * Represents the version of @skyux/core.
21
21
  */
22
- exports.VERSION = new Version('13.0.0-alpha.5');
22
+ exports.VERSION = new Version('13.0.0-alpha.7');
23
23
  //# sourceMappingURL=version.js.map