@skyux/packages 11.0.0-alpha.0 → 11.0.0-alpha.10
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.
- package/collection.json +10 -0
- package/package.json +56 -56
- package/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.js +44 -23
- package/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.js.map +1 -1
- package/src/schematics/ag-grid-migrate/schema.d.ts +6 -2
- package/src/schematics/ag-grid-migrate/schema.json +2 -1
- package/src/schematics/migrations/migration-collection.json +28 -43
- package/src/schematics/migrations/noop/noop.schematic.js +1 -1
- package/src/schematics/migrations/noop/noop.schematic.js.map +1 -1
- package/src/schematics/migrations/update-11/ag-grid/ag-grid.schematic.d.ts +13 -0
- package/src/schematics/migrations/{update-10 → update-11}/ag-grid/ag-grid.schematic.js +43 -65
- package/src/schematics/migrations/update-11/ag-grid/ag-grid.schematic.js.map +1 -0
- package/src/schematics/migrations/update-11/ag-grid/event-type-strings/event-type-strings.d.ts +2 -0
- package/src/schematics/migrations/update-11/ag-grid/event-type-strings/event-type-strings.js +187 -0
- package/src/schematics/migrations/update-11/ag-grid/event-type-strings/event-type-strings.js.map +1 -0
- package/src/schematics/migrations/update-11/ag-grid/schema.json +5 -0
- package/src/schematics/migrations/update-11/ag-grid/switch-to-update-grid-options/switch-to-update-grid-options.d.ts +2 -0
- package/src/schematics/migrations/update-11/ag-grid/switch-to-update-grid-options/switch-to-update-grid-options.js +14 -0
- package/src/schematics/migrations/update-11/ag-grid/switch-to-update-grid-options/switch-to-update-grid-options.js.map +1 -0
- package/src/schematics/migrations/update-11/help-inline-import-path/help-inline-import-path.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-11/help-inline-import-path/help-inline-import-path.schematic.js +31 -0
- package/src/schematics/migrations/update-11/help-inline-import-path/help-inline-import-path.schematic.js.map +1 -0
- package/src/schematics/migrations/{update-10 → update-11}/i18n-resources-module/i18n-resources-module.schematic.js +1 -1
- package/src/schematics/migrations/update-11/i18n-resources-module/i18n-resources-module.schematic.js.map +1 -0
- package/src/schematics/migrations/update-11/icons-migration/icons-migration.schematic.d.ts +1 -0
- package/src/schematics/migrations/update-11/icons-migration/icons-migration.schematic.js +49 -0
- package/src/schematics/migrations/update-11/icons-migration/icons-migration.schematic.js.map +1 -0
- package/src/schematics/migrations/update-11/ng-wait-for-async-test/ng-wait-for-async-test.schematic.d.ts +2 -0
- package/src/schematics/migrations/update-11/ng-wait-for-async-test/ng-wait-for-async-test.schematic.js +47 -0
- package/src/schematics/migrations/update-11/ng-wait-for-async-test/ng-wait-for-async-test.schematic.js.map +1 -0
- package/src/schematics/migrations/{update-10 → update-11}/remove-nx-cache/remove-nx-cache.schematic.js +1 -1
- package/src/schematics/migrations/update-11/remove-nx-cache/remove-nx-cache.schematic.js.map +1 -0
- package/src/schematics/migrations/update-11/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic.js +11 -0
- package/src/schematics/migrations/update-11/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic.js.map +1 -0
- package/src/schematics/migrations/update-11/workspace-check/workspace-check.schematic.js +8 -0
- package/src/schematics/migrations/update-11/workspace-check/workspace-check.schematic.js.map +1 -0
- package/src/schematics/ng-add/ng-add.schematic.js +3 -1
- package/src/schematics/ng-add/ng-add.schematic.js.map +1 -1
- package/src/schematics/ng-generate/add-ag-grid-styles/add-ag-grid-styles.schematic.js +1 -1
- package/src/schematics/ng-generate/add-ag-grid-styles/add-ag-grid-styles.schematic.js.map +1 -1
- package/src/schematics/ng-generate/polyfills/polyfills.schematic.js +1 -1
- package/src/schematics/ng-generate/polyfills/polyfills.schematic.js.map +1 -1
- package/src/schematics/ng-generate/remove-compat-stylesheets/remove-compat-stylesheets.schematic.d.ts +3 -0
- package/src/schematics/{migrations/update-10/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic.js → ng-generate/remove-compat-stylesheets/remove-compat-stylesheets.schematic.js} +8 -11
- package/src/schematics/ng-generate/remove-compat-stylesheets/remove-compat-stylesheets.schematic.js.map +1 -0
- package/src/schematics/ng-generate/remove-compat-stylesheets/schema.d.ts +9 -0
- package/src/schematics/ng-generate/remove-compat-stylesheets/schema.js +3 -0
- package/src/schematics/ng-generate/remove-compat-stylesheets/schema.js.map +1 -0
- package/src/schematics/ng-generate/remove-compat-stylesheets/schema.json +10 -0
- package/src/schematics/ng-generate/remove-nx-cache/remove-nx-cache.schematic.js +1 -1
- package/src/schematics/ng-generate/remove-nx-cache/remove-nx-cache.schematic.js.map +1 -1
- package/src/schematics/rules/add-ag-grid-styles-config.js +1 -2
- package/src/schematics/rules/add-ag-grid-styles-config.js.map +1 -1
- package/src/schematics/rules/add-commonjs-config.js +1 -2
- package/src/schematics/rules/add-commonjs-config.js.map +1 -1
- package/src/schematics/rules/add-polyfills-config.js +1 -2
- package/src/schematics/rules/add-polyfills-config.js.map +1 -1
- package/src/schematics/rules/apply-skyux-stylesheets-to-workspace.js +1 -2
- package/src/schematics/rules/apply-skyux-stylesheets-to-workspace.js.map +1 -1
- package/src/schematics/rules/ensure-peers-installed.js +1 -2
- package/src/schematics/rules/ensure-peers-installed.js.map +1 -1
- package/src/schematics/rules/install-angular-cdk.js +1 -2
- package/src/schematics/rules/install-angular-cdk.js.map +1 -1
- package/src/schematics/rules/modify-tsconfig.js +1 -2
- package/src/schematics/rules/modify-tsconfig.js.map +1 -1
- package/src/schematics/rules/remove-nx-cache/remove-nx-cache.js +10 -15
- package/src/schematics/rules/remove-nx-cache/remove-nx-cache.js.map +1 -1
- package/src/schematics/{migrations/update-10/add-indicators-help-inline-peer-dependency/add-indicators-help-inline-peer-dependency.schematic.d.ts → rules/workspace-check/workspace-check.d.ts} +1 -1
- package/src/schematics/rules/workspace-check/workspace-check.js +18 -0
- package/src/schematics/rules/workspace-check/workspace-check.js.map +1 -0
- package/src/schematics/testing/scaffold.d.ts +3 -0
- package/src/schematics/testing/scaffold.js +4 -3
- package/src/schematics/testing/scaffold.js.map +1 -1
- package/src/schematics/testing/tree.js +1 -2
- package/src/schematics/testing/tree.js.map +1 -1
- package/src/schematics/utility/move-class-to-library.d.ts +8 -0
- package/src/schematics/utility/move-class-to-library.js +43 -0
- package/src/schematics/utility/move-class-to-library.js.map +1 -0
- package/src/schematics/utility/regex.js +1 -2
- package/src/schematics/utility/regex.js.map +1 -1
- package/src/schematics/utility/theme.js +2 -3
- package/src/schematics/utility/theme.js.map +1 -1
- package/src/schematics/utility/tree.js +1 -2
- package/src/schematics/utility/tree.js.map +1 -1
- package/src/schematics/utility/typescript/imports.js +2 -3
- package/src/schematics/utility/typescript/imports.js.map +1 -1
- package/src/schematics/utility/typescript/remove-import.d.ts +7 -0
- package/src/schematics/utility/typescript/remove-import.js +38 -0
- package/src/schematics/utility/typescript/remove-import.js.map +1 -0
- package/src/schematics/utility/typescript/source-file.js +1 -2
- package/src/schematics/utility/typescript/source-file.js.map +1 -1
- package/src/schematics/utility/typescript/swap-imported-class.d.ts +7 -0
- package/src/schematics/utility/typescript/swap-imported-class.js +29 -0
- package/src/schematics/utility/typescript/swap-imported-class.js.map +1 -0
- package/src/schematics/utility/visit-project-files.js +1 -2
- package/src/schematics/utility/visit-project-files.js.map +1 -1
- package/src/schematics/utility/workspace.js +4 -5
- package/src/schematics/utility/workspace.js.map +1 -1
- package/src/version.js +1 -1
- package/src/schematics/migrations/update-10/add-compat-stylesheets/add-compat-stylesheet.schematic.js +0 -174
- package/src/schematics/migrations/update-10/add-compat-stylesheets/add-compat-stylesheet.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/add-forms-help-inline-peer-dependency/add-forms-help-inline-peer-dependency.schematic.d.ts +0 -2
- package/src/schematics/migrations/update-10/add-forms-help-inline-peer-dependency/add-forms-help-inline-peer-dependency.schematic.js +0 -15
- package/src/schematics/migrations/update-10/add-forms-help-inline-peer-dependency/add-forms-help-inline-peer-dependency.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/add-indicators-help-inline-peer-dependency/add-indicators-help-inline-peer-dependency.schematic.js +0 -15
- package/src/schematics/migrations/update-10/add-indicators-help-inline-peer-dependency/add-indicators-help-inline-peer-dependency.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/ag-grid/ag-grid-codemod-task.d.ts +0 -10
- package/src/schematics/migrations/update-10/ag-grid/ag-grid-codemod-task.js +0 -18
- package/src/schematics/migrations/update-10/ag-grid/ag-grid-codemod-task.js.map +0 -1
- package/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.d.ts +0 -14
- package/src/schematics/migrations/update-10/ag-grid/ag-grid.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/axe-core/axe-core.schematic.d.ts +0 -7
- package/src/schematics/migrations/update-10/axe-core/axe-core.schematic.js +0 -29
- package/src/schematics/migrations/update-10/axe-core/axe-core.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/confirm-instance-observable/confirm-instance-observable.schematic.d.ts +0 -2
- package/src/schematics/migrations/update-10/confirm-instance-observable/confirm-instance-observable.schematic.js +0 -25
- package/src/schematics/migrations/update-10/confirm-instance-observable/confirm-instance-observable.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/i18n-resources-module/i18n-resources-module.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/remove-nx-cache/remove-nx-cache.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/rename-harness-queries/rename-harness-queries.schematic.d.ts +0 -2
- package/src/schematics/migrations/update-10/rename-harness-queries/rename-harness-queries.schematic.js +0 -26
- package/src/schematics/migrations/update-10/rename-harness-queries/rename-harness-queries.schematic.js.map +0 -1
- package/src/schematics/migrations/update-10/rename-tabset-tabindex/rename-tabset-tabindex.schematic.d.ts +0 -5
- package/src/schematics/migrations/update-10/rename-tabset-tabindex/rename-tabset-tabindex.schematic.js +0 -35
- package/src/schematics/migrations/update-10/rename-tabset-tabindex/rename-tabset-tabindex.schematic.js.map +0 -1
- /package/src/schematics/migrations/{update-10 → update-11}/i18n-resources-module/i18n-resources-module.schematic.d.ts +0 -0
- /package/src/schematics/migrations/{update-10 → update-11}/remove-nx-cache/remove-nx-cache.schematic.d.ts +0 -0
- /package/src/schematics/migrations/{update-10 → update-11}/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic.d.ts +0 -0
- /package/src/schematics/migrations/{update-10/add-compat-stylesheets/add-compat-stylesheet.schematic.d.ts → update-11/workspace-check/workspace-check.schematic.d.ts} +0 -0
package/collection.json
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
"factory": "./src/schematics/ag-grid-migrate/ag-grid-migrate.schematic",
|
|
7
7
|
"schema": "./src/schematics/ag-grid-migrate/schema.json"
|
|
8
8
|
},
|
|
9
|
+
"ag-grid-update": {
|
|
10
|
+
"description": "Run AG Grid update schematic.",
|
|
11
|
+
"factory": "./src/schematics/migrations/update-11/ag-grid/ag-grid.schematic",
|
|
12
|
+
"schema": "./src/schematics/migrations/update-11/ag-grid/schema.json"
|
|
13
|
+
},
|
|
9
14
|
"ng-add": {
|
|
10
15
|
"description": "Add @skyux/packages to your project.",
|
|
11
16
|
"factory": "./src/schematics/ng-add/ng-add.schematic",
|
|
@@ -21,6 +26,11 @@
|
|
|
21
26
|
"factory": "./src/schematics/ng-generate/polyfills/polyfills.schematic",
|
|
22
27
|
"schema": "./src/schematics/ng-generate/polyfills/schema.json"
|
|
23
28
|
},
|
|
29
|
+
"remove-compat-stylesheets": {
|
|
30
|
+
"description": "Remove SKY UX compatibility stylesheets.",
|
|
31
|
+
"factory": "./src/schematics/ng-generate/remove-compat-stylesheets/remove-compat-stylesheets.schematic",
|
|
32
|
+
"schema": "./src/schematics/ng-generate/remove-compat-stylesheets/schema.json"
|
|
33
|
+
},
|
|
24
34
|
"remove-nx-cache": {
|
|
25
35
|
"description": "Remove the Nx cache directory from git.",
|
|
26
36
|
"factory": "./src/schematics/ng-generate/remove-nx-cache/remove-nx-cache.schematic",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/packages",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.10",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Handles the `ng update` command for SKY UX component libraries.",
|
|
6
6
|
"keywords": [
|
|
@@ -35,69 +35,69 @@
|
|
|
35
35
|
"ng-update": {
|
|
36
36
|
"migrations": "./src/schematics/migrations/migration-collection.json",
|
|
37
37
|
"packageGroup": {
|
|
38
|
-
"@skyux/packages": "11.0.0-alpha.
|
|
38
|
+
"@skyux/packages": "11.0.0-alpha.10",
|
|
39
39
|
"@blackbaud/angular-tree-component": "^1.0.0",
|
|
40
|
-
"@skyux-sdk/eslint-config": "11.0.0-alpha.
|
|
41
|
-
"@skyux-sdk/prettier-schematics": "11.0.0-alpha.
|
|
42
|
-
"@skyux-sdk/testing": "11.0.0-alpha.
|
|
43
|
-
"@skyux/a11y": "11.0.0-alpha.
|
|
44
|
-
"@skyux/action-bars": "11.0.0-alpha.
|
|
45
|
-
"@skyux/ag-grid": "11.0.0-alpha.
|
|
46
|
-
"@skyux/angular-tree-component": "11.0.0-alpha.
|
|
47
|
-
"@skyux/animations": "11.0.0-alpha.
|
|
48
|
-
"@skyux/assets": "11.0.0-alpha.
|
|
49
|
-
"@skyux/autonumeric": "11.0.0-alpha.
|
|
50
|
-
"@skyux/avatar": "11.0.0-alpha.
|
|
51
|
-
"@skyux/colorpicker": "11.0.0-alpha.
|
|
52
|
-
"@skyux/config": "11.0.0-alpha.
|
|
53
|
-
"@skyux/core": "11.0.0-alpha.
|
|
54
|
-
"@skyux/data-manager": "11.0.0-alpha.
|
|
55
|
-
"@skyux/datetime": "11.0.0-alpha.
|
|
56
|
-
"@skyux/errors": "11.0.0-alpha.
|
|
57
|
-
"@skyux/flyout": "11.0.0-alpha.
|
|
58
|
-
"@skyux/forms": "11.0.0-alpha.
|
|
59
|
-
"@skyux/grids": "11.0.0-alpha.
|
|
60
|
-
"@skyux/help-inline": "11.0.0-alpha.
|
|
61
|
-
"@skyux/i18n": "11.0.0-alpha.
|
|
62
|
-
"@skyux/icons": "^7.
|
|
63
|
-
"@skyux/indicators": "11.0.0-alpha.
|
|
64
|
-
"@skyux/inline-form": "11.0.0-alpha.
|
|
65
|
-
"@skyux/layout": "11.0.0-alpha.
|
|
66
|
-
"@skyux/list-builder": "11.0.0-alpha.
|
|
67
|
-
"@skyux/list-builder-common": "11.0.0-alpha.
|
|
68
|
-
"@skyux/list-builder-view-checklist": "11.0.0-alpha.
|
|
69
|
-
"@skyux/list-builder-view-grids": "11.0.0-alpha.
|
|
70
|
-
"@skyux/lists": "11.0.0-alpha.
|
|
71
|
-
"@skyux/lookup": "11.0.0-alpha.
|
|
72
|
-
"@skyux/modals": "11.0.0-alpha.
|
|
73
|
-
"@skyux/navbar": "11.0.0-alpha.
|
|
74
|
-
"@skyux/
|
|
75
|
-
"@skyux/
|
|
76
|
-
"@skyux/
|
|
77
|
-
"@skyux/
|
|
78
|
-
"@skyux/
|
|
79
|
-
"@skyux/
|
|
80
|
-
"@skyux/
|
|
81
|
-
"@skyux/
|
|
82
|
-
"@skyux/
|
|
83
|
-
"@skyux/
|
|
84
|
-
"@skyux/
|
|
85
|
-
"@skyux/
|
|
86
|
-
"@skyux/
|
|
87
|
-
"
|
|
88
|
-
"ag-grid-
|
|
89
|
-
"ag-grid-
|
|
90
|
-
"ag-grid-enterprise": "~31.2.0",
|
|
40
|
+
"@skyux-sdk/eslint-config": "11.0.0-alpha.10",
|
|
41
|
+
"@skyux-sdk/prettier-schematics": "11.0.0-alpha.10",
|
|
42
|
+
"@skyux-sdk/testing": "11.0.0-alpha.10",
|
|
43
|
+
"@skyux/a11y": "11.0.0-alpha.10",
|
|
44
|
+
"@skyux/action-bars": "11.0.0-alpha.10",
|
|
45
|
+
"@skyux/ag-grid": "11.0.0-alpha.10",
|
|
46
|
+
"@skyux/angular-tree-component": "11.0.0-alpha.10",
|
|
47
|
+
"@skyux/animations": "11.0.0-alpha.10",
|
|
48
|
+
"@skyux/assets": "11.0.0-alpha.10",
|
|
49
|
+
"@skyux/autonumeric": "11.0.0-alpha.10",
|
|
50
|
+
"@skyux/avatar": "11.0.0-alpha.10",
|
|
51
|
+
"@skyux/colorpicker": "11.0.0-alpha.10",
|
|
52
|
+
"@skyux/config": "11.0.0-alpha.10",
|
|
53
|
+
"@skyux/core": "11.0.0-alpha.10",
|
|
54
|
+
"@skyux/data-manager": "11.0.0-alpha.10",
|
|
55
|
+
"@skyux/datetime": "11.0.0-alpha.10",
|
|
56
|
+
"@skyux/errors": "11.0.0-alpha.10",
|
|
57
|
+
"@skyux/flyout": "11.0.0-alpha.10",
|
|
58
|
+
"@skyux/forms": "11.0.0-alpha.10",
|
|
59
|
+
"@skyux/grids": "11.0.0-alpha.10",
|
|
60
|
+
"@skyux/help-inline": "11.0.0-alpha.10",
|
|
61
|
+
"@skyux/i18n": "11.0.0-alpha.10",
|
|
62
|
+
"@skyux/icons": "^7.5.0",
|
|
63
|
+
"@skyux/indicators": "11.0.0-alpha.10",
|
|
64
|
+
"@skyux/inline-form": "11.0.0-alpha.10",
|
|
65
|
+
"@skyux/layout": "11.0.0-alpha.10",
|
|
66
|
+
"@skyux/list-builder": "11.0.0-alpha.10",
|
|
67
|
+
"@skyux/list-builder-common": "11.0.0-alpha.10",
|
|
68
|
+
"@skyux/list-builder-view-checklist": "11.0.0-alpha.10",
|
|
69
|
+
"@skyux/list-builder-view-grids": "11.0.0-alpha.10",
|
|
70
|
+
"@skyux/lists": "11.0.0-alpha.10",
|
|
71
|
+
"@skyux/lookup": "11.0.0-alpha.10",
|
|
72
|
+
"@skyux/modals": "11.0.0-alpha.10",
|
|
73
|
+
"@skyux/navbar": "11.0.0-alpha.10",
|
|
74
|
+
"@skyux/pages": "11.0.0-alpha.10",
|
|
75
|
+
"@skyux/phone-field": "11.0.0-alpha.10",
|
|
76
|
+
"@skyux/popovers": "11.0.0-alpha.10",
|
|
77
|
+
"@skyux/progress-indicator": "11.0.0-alpha.10",
|
|
78
|
+
"@skyux/router": "11.0.0-alpha.10",
|
|
79
|
+
"@skyux/select-field": "11.0.0-alpha.10",
|
|
80
|
+
"@skyux/split-view": "11.0.0-alpha.10",
|
|
81
|
+
"@skyux/tabs": "11.0.0-alpha.10",
|
|
82
|
+
"@skyux/text-editor": "11.0.0-alpha.10",
|
|
83
|
+
"@skyux/theme": "11.0.0-alpha.10",
|
|
84
|
+
"@skyux/tiles": "11.0.0-alpha.10",
|
|
85
|
+
"@skyux/toast": "11.0.0-alpha.10",
|
|
86
|
+
"@skyux/validation": "11.0.0-alpha.10",
|
|
87
|
+
"ag-grid-angular": "^32.0.2",
|
|
88
|
+
"ag-grid-community": "^32.0.2",
|
|
89
|
+
"ag-grid-enterprise": "^32.0.2",
|
|
91
90
|
"autonumeric": "^4.10.5"
|
|
92
91
|
}
|
|
93
92
|
},
|
|
94
93
|
"peerDependencies": {
|
|
95
|
-
"@angular/
|
|
96
|
-
"@angular/
|
|
94
|
+
"@angular/cdk": "^18.1.2",
|
|
95
|
+
"@angular/cli": "^18.1.2",
|
|
96
|
+
"@angular/core": "^18.1.2"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"fs-extra": "11.2.0",
|
|
100
|
-
"jsonc-parser": "3.
|
|
100
|
+
"jsonc-parser": "3.3.1"
|
|
101
101
|
},
|
|
102
102
|
"main": "./src/index.js",
|
|
103
103
|
"type": "commonjs"
|
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const child_process_1 = require("child_process");
|
|
4
5
|
const os_1 = require("os");
|
|
5
|
-
const
|
|
6
|
-
const AG_GRID_VERSION =
|
|
6
|
+
const AG_GRID_MIGRATION = '32.0.5';
|
|
7
|
+
const AG_GRID_VERSION = '32.0.2';
|
|
8
|
+
function getStartingVersion(sourceRoot) {
|
|
9
|
+
try {
|
|
10
|
+
const content = (0, child_process_1.spawnSync)('git',
|
|
11
|
+
// eslint-disable-next-line @cspell/spellchecker
|
|
12
|
+
['cat-file', '--textconv', `HEAD:${sourceRoot}/package-lock.json`], {
|
|
13
|
+
encoding: 'utf-8',
|
|
14
|
+
stdio: 'pipe',
|
|
15
|
+
});
|
|
16
|
+
const packageJson = JSON.parse(content.stdout);
|
|
17
|
+
return packageJson.packages?.['node_modules/ag-grid-community']?.version;
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
7
23
|
function default_1(options) {
|
|
8
24
|
return (tree, context) => {
|
|
9
25
|
let { sourceRoot } = options;
|
|
10
26
|
sourceRoot ||= '.';
|
|
27
|
+
const startingVersion = options.from ?? getStartingVersion(sourceRoot);
|
|
28
|
+
if (!startingVersion) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (startingVersion === AG_GRID_VERSION) {
|
|
32
|
+
context.logger.info(`✅ Already on AG Grid ${AG_GRID_VERSION}. No migration needed.`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
11
35
|
context.logger.info(`🏁 Migrating AG Grid code in ${sourceRoot}...`);
|
|
12
36
|
const files = (0, child_process_1.spawnSync)('git', ['ls-files', `${sourceRoot}/**/*.ts`])
|
|
13
37
|
.stdout.toString()
|
|
@@ -26,33 +50,30 @@ function default_1(options) {
|
|
|
26
50
|
return;
|
|
27
51
|
}
|
|
28
52
|
const npm = (0, os_1.platform)() === 'win32' ? 'npm.cmd' : 'npm';
|
|
29
|
-
(0, child_process_1.spawnSync)(npm, ['install', '--no-save', `@ag-grid-
|
|
53
|
+
(0, child_process_1.spawnSync)(npm, ['install', '--no-save', `@ag-grid-devtools/cli@~${AG_GRID_MIGRATION}`], {
|
|
30
54
|
stdio: 'ignore',
|
|
31
55
|
windowsVerbatimArguments: true,
|
|
32
56
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
(0, child_process_1.spawnSync)(npm, ['remove', `@ag-grid-community/cli`], {
|
|
57
|
+
const cmdArgs = [
|
|
58
|
+
'node_modules/@ag-grid-devtools/cli/index.cjs',
|
|
59
|
+
'migrate',
|
|
60
|
+
`--from=${startingVersion}`,
|
|
61
|
+
`--to=${AG_GRID_MIGRATION}`,
|
|
62
|
+
'--allow-dirty',
|
|
63
|
+
...agGridFiles,
|
|
64
|
+
];
|
|
65
|
+
context.logger.info(`⏳ Migrating to AG Grid ${AG_GRID_VERSION}...`);
|
|
66
|
+
const output = context.debug ? 'inherit' : 'ignore';
|
|
67
|
+
(0, child_process_1.spawnSync)('node', cmdArgs, {
|
|
68
|
+
shell: true,
|
|
69
|
+
stdio: ['ignore', output, output],
|
|
70
|
+
windowsVerbatimArguments: true,
|
|
71
|
+
argv0: 'npx',
|
|
72
|
+
});
|
|
73
|
+
(0, child_process_1.spawnSync)(npm, ['remove', `@ag-grid-devtools/cli`], {
|
|
52
74
|
stdio: 'ignore',
|
|
53
75
|
});
|
|
54
76
|
context.logger.info(`🏁 Done running migrations for AG Grid ${AG_GRID_VERSION}`);
|
|
55
77
|
};
|
|
56
78
|
}
|
|
57
|
-
exports.default = default_1;
|
|
58
79
|
//# sourceMappingURL=ag-grid-migrate.schematic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ag-grid-migrate.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ag-grid-migrate.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/components/packages/src/schematics/ag-grid-migrate/ag-grid-migrate.schematic.ts"],"names":[],"mappings":";;AA4BA,4BAkEC;AA5FD,iDAA0C;AAC1C,2BAA8B;AAI9B,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AACnC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEjC,SAAS,kBAAkB,CAAC,UAAkB;IAC5C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,yBAAS,EACvB,KAAK;QACL,gDAAgD;QAChD,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,UAAU,oBAAoB,CAAC,EAClE;YACE,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,MAAM;SACd,CACF,CAAC;QACF,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC/C,OAAO,WAAW,CAAC,QAAQ,EAAE,CAAC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3E,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,mBAAyB,OAAe;IACtC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAC7B,UAAU,KAAK,GAAG,CAAC;QACnB,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACvE,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QACD,IAAI,eAAe,KAAK,eAAe,EAAE,CAAC;YACxC,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,wBAAwB,eAAe,wBAAwB,CAChE,CAAC;YACF,OAAO;QACT,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,UAAU,KAAK,CAAC,CAAC;QACrE,MAAM,KAAK,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,MAAM,CAAC,IAAI,CAAC,0BAA0B,eAAe,KAAK,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;QACpD,IAAA,yBAAS,EAAC,MAAM,EAAE,OAAO,EAAE;YACzB,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACjC,wBAAwB,EAAE,IAAI;YAC9B,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QACH,IAAA,yBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC,EAAE;YAClD,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;QACH,OAAO,CAAC,MAAM,CAAC,IAAI,CACjB,0CAA0C,eAAe,EAAE,CAC5D,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface Schema {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Path to the source root of the project. Defaults to the current directory.
|
|
7
7
|
*/
|
|
8
|
-
sourceRoot
|
|
8
|
+
sourceRoot?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The version of AG Grid to migrate from. Defaults to the version found in the project's package-lock.json.
|
|
11
|
+
*/
|
|
12
|
+
from?: string;
|
|
9
13
|
}
|
|
@@ -1,64 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schematics": {
|
|
3
3
|
"noop": {
|
|
4
|
-
"version": "11.0.0-alpha.
|
|
4
|
+
"version": "11.0.0-alpha.10",
|
|
5
5
|
"factory": "./noop/noop.schematic",
|
|
6
6
|
"description": "Update all SKY UX component packages"
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"version": "
|
|
10
|
-
"factory": "./
|
|
11
|
-
"description": "
|
|
8
|
+
"workspace-check": {
|
|
9
|
+
"version": "11.0.0-alpha.10",
|
|
10
|
+
"factory": "./workspace-check/workspace-check.schematic",
|
|
11
|
+
"description": "Log warnings if the workspace is not configured correctly."
|
|
12
12
|
},
|
|
13
13
|
"ag-grid": {
|
|
14
|
-
"version": "
|
|
15
|
-
"factory": "./update-
|
|
16
|
-
"description": "Apply code changes for AG Grid
|
|
14
|
+
"version": "11.0.0",
|
|
15
|
+
"factory": "./update-11/ag-grid/ag-grid.schematic",
|
|
16
|
+
"description": "Apply code changes for AG Grid 32."
|
|
17
17
|
},
|
|
18
|
-
"
|
|
19
|
-
"version": "
|
|
20
|
-
"factory": "./update-
|
|
21
|
-
"description": "Update
|
|
18
|
+
"help-inline-import-path": {
|
|
19
|
+
"version": "11.0.0",
|
|
20
|
+
"factory": "./update-11/help-inline-import-path/help-inline-import-path.schematic",
|
|
21
|
+
"description": "Update help inline import paths to help inline library."
|
|
22
22
|
},
|
|
23
23
|
"i18n-resources-module": {
|
|
24
|
-
"version": "
|
|
25
|
-
"factory": "./update-
|
|
24
|
+
"version": "11.0.0",
|
|
25
|
+
"factory": "./update-11/i18n-resources-module/i18n-resources-module.schematic",
|
|
26
26
|
"description": "Regenerate i18n resources modules for libraries."
|
|
27
27
|
},
|
|
28
|
+
"icons-migration": {
|
|
29
|
+
"version": "11.0.0",
|
|
30
|
+
"factory": "./update-11/icons-migration/icons-migration.schematic",
|
|
31
|
+
"description": "Update icons import paths to icons library and add new peer."
|
|
32
|
+
},
|
|
33
|
+
"ng-wait-for-async-test": {
|
|
34
|
+
"version": "11.0.0",
|
|
35
|
+
"factory": "./update-11/ng-wait-for-async-test/ng-wait-for-async-test.schematic",
|
|
36
|
+
"description": "Replace 'async()' with 'waitForAsync()' in tests."
|
|
37
|
+
},
|
|
28
38
|
"remove-nx-cache": {
|
|
29
|
-
"version": "
|
|
30
|
-
"factory": "./update-
|
|
39
|
+
"version": "11.0.0",
|
|
40
|
+
"factory": "./update-11/remove-nx-cache/remove-nx-cache.schematic",
|
|
31
41
|
"description": "Remove `.nx/cache` from git and add `.gitignore` entry."
|
|
32
42
|
},
|
|
33
43
|
"remove-old-compat-stylesheets": {
|
|
34
|
-
"version": "
|
|
35
|
-
"factory": "./update-
|
|
44
|
+
"version": "11.0.0",
|
|
45
|
+
"factory": "./update-11/remove-old-compat-stylesheets/remove-old-compat-stylesheets.schematic",
|
|
36
46
|
"description": "Remove backward compatible stylesheets for older versions of SKY UX."
|
|
37
|
-
},
|
|
38
|
-
"rename-tabset-tabindex": {
|
|
39
|
-
"version": "10.0.0",
|
|
40
|
-
"factory": "./update-10/rename-tabset-tabindex/rename-tabset-tabindex.schematic",
|
|
41
|
-
"description": "Rename the tabIndex input of sky-tab to tabIndexValue to avoid collision with HTML's native tabindex attribute."
|
|
42
|
-
},
|
|
43
|
-
"rename-harness-queries": {
|
|
44
|
-
"version": "10.0.0",
|
|
45
|
-
"factory": "./update-10/rename-harness-queries/rename-harness-queries.schematic",
|
|
46
|
-
"description": "Rename harnesses's queryHarness methods to queryHarnessOrNull."
|
|
47
|
-
},
|
|
48
|
-
"confirm-instance-observable": {
|
|
49
|
-
"version": "10.0.0",
|
|
50
|
-
"factory": "./update-10/confirm-instance-observable/confirm-instance-observable.schematic",
|
|
51
|
-
"description": "Rename SkyConfirmInstance.closed.next calls to SkyConfirmInstance.close in unit tests."
|
|
52
|
-
},
|
|
53
|
-
"add-forms-help-inline-peer-dependency": {
|
|
54
|
-
"version": "10.7.0",
|
|
55
|
-
"factory": "./update-10/add-forms-help-inline-peer-dependency/add-forms-help-inline-peer-dependency.schematic",
|
|
56
|
-
"description": "Add @skyux/help-inline peer dependency for @skyux/forms."
|
|
57
|
-
},
|
|
58
|
-
"add-indicators-help-inline-peer-dependency": {
|
|
59
|
-
"version": "10.32.0",
|
|
60
|
-
"factory": "./update-10/add-indicators-help-inline-peer-dependency/add-indicators-help-inline-peer-dependency.schematic",
|
|
61
|
-
"description": "Add @skyux/help-inline peer dependency for @skyux/indicators."
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
49
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
function default_1() {
|
|
4
5
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5
6
|
return () => { };
|
|
6
7
|
}
|
|
7
|
-
exports.default = default_1;
|
|
8
8
|
//# sourceMappingURL=noop.schematic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noop.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/noop/noop.schematic.ts"],"names":[],"mappings":";;AAEA;IACE,gEAAgE;IAChE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;AAClB,CAAC
|
|
1
|
+
{"version":3,"file":"noop.schematic.js","sourceRoot":"","sources":["../../../../../../../../libs/components/packages/src/schematics/migrations/noop/noop.schematic.ts"],"names":[],"mappings":";;AAEA,4BAGC;AAHD;IACE,gEAAgE;IAChE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
/**
|
|
3
|
+
* Upgrade to AG Grid 32 and address three breaking changes:
|
|
4
|
+
*
|
|
5
|
+
* - Switch Event Types to Strings
|
|
6
|
+
* - Switch gridOptions.api and gridOptions.columnApi to gridApi
|
|
7
|
+
* - Switch setQuickFilter to updateGridOptions
|
|
8
|
+
* - Switch Beans references to use BeanCollection
|
|
9
|
+
* - Switch Column references to use AgColumn
|
|
10
|
+
*
|
|
11
|
+
* Also advise against mixing modules and packages.
|
|
12
|
+
*/
|
|
13
|
+
export default function (): Rule;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
+
const schematics_1 = require("@angular/cdk/schematics");
|
|
4
6
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
7
|
+
const swap_imported_class_1 = require("../../../utility/typescript/swap-imported-class");
|
|
5
8
|
const visit_project_files_1 = require("../../../utility/visit-project-files");
|
|
6
9
|
const workspace_1 = require("../../../utility/workspace");
|
|
10
|
+
const event_type_strings_1 = require("./event-type-strings/event-type-strings");
|
|
11
|
+
const switch_to_update_grid_options_1 = require("./switch-to-update-grid-options/switch-to-update-grid-options");
|
|
7
12
|
const ANY_MODULE = '@ag-grid-community/';
|
|
8
13
|
const ENT_MODULE = '@ag-grid-enterprise/';
|
|
9
14
|
const AG_GRID = 'ag-grid-community';
|
|
10
15
|
const AG_GRID_ENT = 'ag-grid-enterprise';
|
|
11
16
|
const AG_GRID_NG = 'ag-grid-angular';
|
|
12
17
|
const AG_GRID_SKY = '@skyux/ag-grid';
|
|
13
|
-
const AG_GRID_VERSION = '
|
|
18
|
+
const AG_GRID_VERSION = '^32.0.2';
|
|
14
19
|
/**
|
|
15
20
|
* Check package.json for AG Grid dependencies.
|
|
16
21
|
*/
|
|
@@ -33,52 +38,22 @@ function checkAgGridDependency(tree, context) {
|
|
|
33
38
|
const packageJson = tree.readJson('package.json');
|
|
34
39
|
return ['dependencies', 'devDependencies'].some((dep) => Object.keys((packageJson && packageJson[dep]) || {}).some((dep) => dep.startsWith(ANY_MODULE) || dep.startsWith(ENT_MODULE)));
|
|
35
40
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Column API renamed getSecondaryColumns / setSecondaryColumns to getSecondaryPivotColumns / setSecondaryPivotColumns.
|
|
38
|
-
*/
|
|
39
|
-
function renameColumnApiFunctionsInCode(updatedContent) {
|
|
40
|
-
if (updatedContent.includes('etSecondaryColumns(')) {
|
|
41
|
-
updatedContent = updatedContent.replace(/(?<=columnApi\s*)\.(get|set)SecondaryColumns\(/g, (_, x) => `.${x}PivotResultColumns(`);
|
|
42
|
-
}
|
|
43
|
-
return updatedContent;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Update renamed grid options in code.
|
|
47
|
-
*/
|
|
48
|
-
function renameGridOptionsInCode(updatedContent) {
|
|
49
|
-
const componentReferenceExp = /\b((header|loadingOverlay|noRowsOverlay)Component|component|cell(Editor|Renderer)|filter)Framework\b/g;
|
|
50
|
-
if (updatedContent.match(/gridOptions/i) &&
|
|
51
|
-
(updatedContent.includes('suppressCellSelection') ||
|
|
52
|
-
updatedContent.includes('getRowNodeId') ||
|
|
53
|
-
updatedContent.includes('enterMovesDown') ||
|
|
54
|
-
componentReferenceExp.test(updatedContent))) {
|
|
55
|
-
updatedContent = updatedContent
|
|
56
|
-
.replace(/\bsuppressCellSelection\b/g, 'suppressCellFocus')
|
|
57
|
-
.replace(componentReferenceExp, '$1')
|
|
58
|
-
.replace(/\bgetRowNodeId\b/g, 'getRowId')
|
|
59
|
-
.replace(/\benterMovesDown(?=\b|AfterEdit)/g, 'enterNavigatesVertically');
|
|
60
|
-
}
|
|
61
|
-
return updatedContent;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Switch charPress to eventKey.
|
|
65
|
-
*/
|
|
66
|
-
function renameCharPress(updatedContent) {
|
|
67
|
-
if (updatedContent.match(/\bcharPress\b(?!: undefined)/)) {
|
|
68
|
-
updatedContent = updatedContent.replace(/\bcharPress\b(?!: undefined)/g, 'eventKey');
|
|
69
|
-
}
|
|
70
|
-
return updatedContent;
|
|
71
|
-
}
|
|
72
41
|
/**
|
|
73
42
|
* If available, switch gridOptions.api and gridOptions.columnApi to gridApi.
|
|
74
43
|
*/
|
|
75
|
-
function swapGridOptionsApiToGridApi(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
44
|
+
function swapGridOptionsApiToGridApi(tree, path) {
|
|
45
|
+
const content = tree.readText(path);
|
|
46
|
+
if (content.includes('this.gridApi') &&
|
|
47
|
+
(content.includes('this.gridOptions.api') ||
|
|
48
|
+
content.includes('this.gridOptions.columnApi'))) {
|
|
49
|
+
const recorder = tree.beginUpdate(path);
|
|
50
|
+
const instances = content.matchAll(/\bthis\.gridOptions\.(api|columnApi)\b/g);
|
|
51
|
+
for (const instance of instances) {
|
|
52
|
+
recorder.remove(instance.index, instance[0].length);
|
|
53
|
+
recorder.insertRight(instance.index, 'this.gridApi');
|
|
54
|
+
}
|
|
55
|
+
tree.commitUpdate(recorder);
|
|
80
56
|
}
|
|
81
|
-
return updatedContent;
|
|
82
57
|
}
|
|
83
58
|
/**
|
|
84
59
|
* Check if the file includes any AG Grid imports.
|
|
@@ -86,9 +61,19 @@ function swapGridOptionsApiToGridApi(updatedContent) {
|
|
|
86
61
|
function includesAgGrid(updatedContent) {
|
|
87
62
|
return (updatedContent.includes(AG_GRID) ||
|
|
88
63
|
updatedContent.includes(AG_GRID_ENT) ||
|
|
89
|
-
updatedContent.includes(AG_GRID_SKY)
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
updatedContent.includes(AG_GRID_SKY));
|
|
65
|
+
}
|
|
66
|
+
function swapClasses(tree, filePath) {
|
|
67
|
+
const sourceFile = (0, schematics_1.parseSourceFile)(tree, filePath);
|
|
68
|
+
(0, swap_imported_class_1.swapImportedClass)(tree, filePath, sourceFile, [
|
|
69
|
+
{
|
|
70
|
+
classNames: {
|
|
71
|
+
Column: 'AgColumn',
|
|
72
|
+
Beans: 'BeanCollection',
|
|
73
|
+
},
|
|
74
|
+
moduleName: 'ag-grid-community',
|
|
75
|
+
},
|
|
76
|
+
]);
|
|
92
77
|
}
|
|
93
78
|
/**
|
|
94
79
|
* Visit all files and apply the changes.
|
|
@@ -105,40 +90,34 @@ async function updateSourceFiles(tree, context) {
|
|
|
105
90
|
workspace.projects.forEach((project) => {
|
|
106
91
|
(0, visit_project_files_1.visitProjectFiles)(tree, project.sourceRoot || project.root, (filePath) => {
|
|
107
92
|
// If the file is not a TypeScript file, we can skip it.
|
|
108
|
-
if (!filePath.endsWith('.ts')) {
|
|
93
|
+
if (!filePath.endsWith('.ts') || filePath.includes('schematics')) {
|
|
109
94
|
return;
|
|
110
95
|
}
|
|
111
96
|
const content = tree.readText(filePath);
|
|
112
97
|
if (!content || !includesAgGrid(content)) {
|
|
113
98
|
return;
|
|
114
99
|
}
|
|
115
|
-
let updatedContent = content;
|
|
116
100
|
// Prompt the user to moderate the use of AG Grid modules
|
|
117
|
-
if (
|
|
118
|
-
updatedContent.includes(ENT_MODULE)) {
|
|
101
|
+
if (content.includes(ANY_MODULE) || content.includes(ENT_MODULE)) {
|
|
119
102
|
warnOnce(`\n
|
|
120
103
|
AG Grid recommends not mixing module and package imports.
|
|
121
104
|
https://ag-grid.com/angular-data-grid/modules/\n\n`);
|
|
122
105
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (updatedContent !== content) {
|
|
128
|
-
tree.overwrite(filePath, updatedContent);
|
|
129
|
-
}
|
|
106
|
+
(0, event_type_strings_1.eventTypeStrings)(tree, filePath);
|
|
107
|
+
swapClasses(tree, filePath);
|
|
108
|
+
swapGridOptionsApiToGridApi(tree, filePath);
|
|
109
|
+
(0, switch_to_update_grid_options_1.switchToUpdateGridOptions)(tree, filePath);
|
|
130
110
|
});
|
|
131
111
|
});
|
|
132
112
|
}
|
|
133
113
|
/**
|
|
134
|
-
* Upgrade to AG Grid
|
|
114
|
+
* Upgrade to AG Grid 32 and address three breaking changes:
|
|
135
115
|
*
|
|
136
|
-
* -
|
|
137
|
-
* -
|
|
138
|
-
* -
|
|
139
|
-
* -
|
|
140
|
-
* -
|
|
141
|
-
* - Rename cellRendererFramework to cellRenderer
|
|
116
|
+
* - Switch Event Types to Strings
|
|
117
|
+
* - Switch gridOptions.api and gridOptions.columnApi to gridApi
|
|
118
|
+
* - Switch setQuickFilter to updateGridOptions
|
|
119
|
+
* - Switch Beans references to use BeanCollection
|
|
120
|
+
* - Switch Column references to use AgColumn
|
|
142
121
|
*
|
|
143
122
|
* Also advise against mixing modules and packages.
|
|
144
123
|
*/
|
|
@@ -158,5 +137,4 @@ function default_1() {
|
|
|
158
137
|
}
|
|
159
138
|
};
|
|
160
139
|
}
|
|
161
|
-
exports.default = default_1;
|
|
162
140
|
//# sourceMappingURL=ag-grid.schematic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ag-grid.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-11/ag-grid/ag-grid.schematic.ts"],"names":[],"mappings":";;AAkKA,4BAmBC;AApLD,4DAG0C;AAC1C,wDAA0D;AAC1D,2EAIkD;AAElD,yFAAoF;AACpF,8EAAyE;AACzE,0DAA0D;AAE1D,gFAA2E;AAC3E,iHAA0G;AAE1G,MAAM,UAAU,GAAG,qBAAqB,CAAC;AACzC,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAC1C,MAAM,OAAO,GAAG,mBAAmB,CAAC;AACpC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AACzC,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,SAAS,qBAAqB,CAAC,IAAU,EAAE,OAAyB;IAClE,MAAM,gBAAgB,GAAG,IAAA,uCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjE,MAAM,mBAAmB,GAAG,IAAA,uCAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACxE,MAAM,kBAAkB,GAAG,IAAA,uCAAwB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACtE,IAAI,gBAAgB,IAAI,mBAAmB,IAAI,kBAAkB,EAAE,CAAC;QAClE,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,2BAA2B;YAC3B,IAAA,uCAAwB,EAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,OAAO;gBACb,IAAI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