@skyux/packages 9.0.0-alpha.6 → 9.0.0-alpha.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/packages",
3
- "version": "9.0.0-alpha.6",
3
+ "version": "9.0.0-alpha.8",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "description": "Handles the `ng update` command for SKY UX component libraries.",
6
6
  "keywords": [
@@ -20,8 +20,7 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./src/index.d.ts",
23
- "default": "./src/index.js",
24
- "require": "./src/index.js"
23
+ "default": "./src/index.js"
25
24
  },
26
25
  "./package.json": {
27
26
  "default": "./package.json"
@@ -37,65 +36,67 @@
37
36
  "ng-update": {
38
37
  "migrations": "./src/schematics/migrations/migration-collection.json",
39
38
  "packageGroup": {
40
- "@skyux-sdk/eslint-config": "9.0.0-alpha.6",
41
- "@skyux-sdk/prettier-schematics": "9.0.0-alpha.6",
42
- "@skyux-sdk/testing": "9.0.0-alpha.6",
43
- "@skyux/a11y": "9.0.0-alpha.6",
44
- "@skyux/action-bars": "9.0.0-alpha.6",
45
- "@skyux/ag-grid": "9.0.0-alpha.6",
46
- "@skyux/angular-tree-component": "9.0.0-alpha.6",
47
- "@skyux/animations": "9.0.0-alpha.6",
48
- "@skyux/assets": "9.0.0-alpha.6",
49
- "@skyux/autonumeric": "9.0.0-alpha.6",
50
- "@skyux/avatar": "9.0.0-alpha.6",
51
- "@skyux/colorpicker": "9.0.0-alpha.6",
52
- "@skyux/config": "9.0.0-alpha.6",
53
- "@skyux/core": "9.0.0-alpha.6",
54
- "@skyux/data-manager": "9.0.0-alpha.6",
55
- "@skyux/datetime": "9.0.0-alpha.6",
56
- "@skyux/errors": "9.0.0-alpha.6",
57
- "@skyux/flyout": "9.0.0-alpha.6",
58
- "@skyux/forms": "9.0.0-alpha.6",
59
- "@skyux/grids": "9.0.0-alpha.6",
60
- "@skyux/http": "9.0.0-alpha.6",
61
- "@skyux/i18n": "9.0.0-alpha.6",
39
+ "@blackbaud/angular-tree-component": "^1.0.0-alpha.0",
40
+ "@skyux-sdk/eslint-config": "9.0.0-alpha.8",
41
+ "@skyux-sdk/prettier-schematics": "9.0.0-alpha.8",
42
+ "@skyux-sdk/testing": "9.0.0-alpha.8",
43
+ "@skyux/a11y": "9.0.0-alpha.8",
44
+ "@skyux/action-bars": "9.0.0-alpha.8",
45
+ "@skyux/ag-grid": "9.0.0-alpha.8",
46
+ "@skyux/angular-tree-component": "9.0.0-alpha.8",
47
+ "@skyux/animations": "9.0.0-alpha.8",
48
+ "@skyux/assets": "9.0.0-alpha.8",
49
+ "@skyux/autonumeric": "9.0.0-alpha.8",
50
+ "@skyux/avatar": "9.0.0-alpha.8",
51
+ "@skyux/colorpicker": "9.0.0-alpha.8",
52
+ "@skyux/config": "9.0.0-alpha.8",
53
+ "@skyux/core": "9.0.0-alpha.8",
54
+ "@skyux/data-manager": "9.0.0-alpha.8",
55
+ "@skyux/datetime": "9.0.0-alpha.8",
56
+ "@skyux/errors": "9.0.0-alpha.8",
57
+ "@skyux/flyout": "9.0.0-alpha.8",
58
+ "@skyux/forms": "9.0.0-alpha.8",
59
+ "@skyux/grids": "9.0.0-alpha.8",
60
+ "@skyux/http": "9.0.0-alpha.8",
61
+ "@skyux/i18n": "9.0.0-alpha.8",
62
62
  "@skyux/icons": "^6.0.0",
63
- "@skyux/indicators": "9.0.0-alpha.6",
64
- "@skyux/inline-form": "9.0.0-alpha.6",
65
- "@skyux/layout": "9.0.0-alpha.6",
66
- "@skyux/list-builder": "9.0.0-alpha.6",
67
- "@skyux/list-builder-common": "9.0.0-alpha.6",
68
- "@skyux/list-builder-view-checklist": "9.0.0-alpha.6",
69
- "@skyux/list-builder-view-grids": "9.0.0-alpha.6",
70
- "@skyux/lists": "9.0.0-alpha.6",
71
- "@skyux/lookup": "9.0.0-alpha.6",
72
- "@skyux/modals": "9.0.0-alpha.6",
73
- "@skyux/navbar": "9.0.0-alpha.6",
74
- "@skyux/omnibar-interop": "9.0.0-alpha.6",
75
- "@skyux/pages": "9.0.0-alpha.6",
76
- "@skyux/phone-field": "9.0.0-alpha.6",
77
- "@skyux/popovers": "9.0.0-alpha.6",
78
- "@skyux/progress-indicator": "9.0.0-alpha.6",
79
- "@skyux/router": "9.0.0-alpha.6",
80
- "@skyux/select-field": "9.0.0-alpha.6",
81
- "@skyux/split-view": "9.0.0-alpha.6",
82
- "@skyux/tabs": "9.0.0-alpha.6",
83
- "@skyux/text-editor": "9.0.0-alpha.6",
84
- "@skyux/theme": "9.0.0-alpha.6",
85
- "@skyux/tiles": "9.0.0-alpha.6",
86
- "@skyux/toast": "9.0.0-alpha.6",
87
- "@skyux/validation": "9.0.0-alpha.6",
63
+ "@skyux/indicators": "9.0.0-alpha.8",
64
+ "@skyux/inline-form": "9.0.0-alpha.8",
65
+ "@skyux/layout": "9.0.0-alpha.8",
66
+ "@skyux/list-builder": "9.0.0-alpha.8",
67
+ "@skyux/list-builder-common": "9.0.0-alpha.8",
68
+ "@skyux/list-builder-view-checklist": "9.0.0-alpha.8",
69
+ "@skyux/list-builder-view-grids": "9.0.0-alpha.8",
70
+ "@skyux/lists": "9.0.0-alpha.8",
71
+ "@skyux/lookup": "9.0.0-alpha.8",
72
+ "@skyux/modals": "9.0.0-alpha.8",
73
+ "@skyux/navbar": "9.0.0-alpha.8",
74
+ "@skyux/omnibar-interop": "9.0.0-alpha.8",
75
+ "@skyux/pages": "9.0.0-alpha.8",
76
+ "@skyux/phone-field": "9.0.0-alpha.8",
77
+ "@skyux/popovers": "9.0.0-alpha.8",
78
+ "@skyux/progress-indicator": "9.0.0-alpha.8",
79
+ "@skyux/router": "9.0.0-alpha.8",
80
+ "@skyux/select-field": "9.0.0-alpha.8",
81
+ "@skyux/split-view": "9.0.0-alpha.8",
82
+ "@skyux/tabs": "9.0.0-alpha.8",
83
+ "@skyux/text-editor": "9.0.0-alpha.8",
84
+ "@skyux/theme": "9.0.0-alpha.8",
85
+ "@skyux/tiles": "9.0.0-alpha.8",
86
+ "@skyux/toast": "9.0.0-alpha.8",
87
+ "@skyux/validation": "9.0.0-alpha.8",
88
88
  "ag-grid-angular": "^29.3.5",
89
89
  "ag-grid-community": "^29.3.5",
90
- "ag-grid-enterprise": "^29.3.5"
90
+ "ag-grid-enterprise": "^29.3.5",
91
+ "autonumeric": "^4.9.0"
91
92
  }
92
93
  },
93
94
  "peerDependencies": {
94
- "@angular/cli": "^16.1.6"
95
+ "@angular/cli": "^16.2.0"
95
96
  },
96
97
  "dependencies": {
97
98
  "fs-extra": "10.1.0",
98
99
  "jsonc-parser": "3.2.0"
99
100
  },
100
- "types": "./src/index.d.ts"
101
+ "type": "commonjs"
101
102
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schematics": {
3
3
  "noop": {
4
- "version": "9.0.0-alpha.6",
4
+ "version": "9.0.0-alpha.8",
5
5
  "factory": "./noop/noop.schematic",
6
6
  "description": "Update all SKY UX component packages"
7
7
  },
@@ -15,6 +15,11 @@
15
15
  "factory": "./update-9/add-forms-popovers-peer-dependency/add-forms-popovers-peer-dependency.schematic",
16
16
  "description": "Add @skyux/popovers peer dependency for @skyux/forms"
17
17
  },
18
+ "add-compat-stylesheets": {
19
+ "version": "9.0.0-0",
20
+ "factory": "./update-9/add-compat-stylesheets/add-compat-stylesheet.schematic",
21
+ "description": "Add a backwards-compatible stylesheet with styles that have been removed from components in SKY UX 9."
22
+ },
18
23
  "ag-grid-29": {
19
24
  "version": "9.0.0-0",
20
25
  "factory": "./update-9/ag-grid-29/ag-grid-29.schematic",
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export default function (): Rule;
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const schematics_1 = require("@angular-devkit/schematics");
4
+ const tree_1 = require("../../../utility/tree");
5
+ const workspace_1 = require("../../../utility/workspace");
6
+ const COMPAT_CSS_FILE_NAME = 'skyux9-compat.css';
7
+ const compatStyles = {
8
+ libraries: [
9
+ {
10
+ name: '@skyux/forms',
11
+ components: [
12
+ {
13
+ name: 'input box',
14
+ styles: [
15
+ {
16
+ css: `
17
+ :root {
18
+ --sky-compat-sky-form-group-margin-bottom: 10px
19
+ }
20
+ `,
21
+ instructions: `
22
+ The bottom margin has been removed from the \`sky-input-box\`. To address this, remove this block of CSS and use \`stacked="true"\` to automatically have the latest vertical spacing added.`,
23
+ },
24
+ ],
25
+ },
26
+ ],
27
+ },
28
+ {
29
+ name: '@skyux/theme',
30
+ components: [
31
+ {
32
+ name: 'styles',
33
+ styles: [
34
+ {
35
+ css: `
36
+ :root {
37
+ --sky-compat-sky-form-group-margin-bottom: 10px
38
+ }
39
+ `,
40
+ instructions: `
41
+ The bottom margin has been removed from \`sky-form-group\` style class. To address this, remove this block of css and change \`sky-form-group\` to \`sky-margin-stacked-sm\` or other appropriate spacing classes. See https://developer.blackbaud.com/skyux/design/styles/spacing for a list of supported spacing classes.`,
42
+ },
43
+ ],
44
+ },
45
+ ],
46
+ },
47
+ ],
48
+ };
49
+ function getProjectSourcePath(projectDefinition) {
50
+ /*istanbul ignore else*/
51
+ if (projectDefinition.sourceRoot) {
52
+ return `${projectDefinition.sourceRoot}/app`;
53
+ }
54
+ else {
55
+ return `${projectDefinition.root}/src/app`;
56
+ }
57
+ }
58
+ function buildCommentBlock(message) {
59
+ return `/${'*'.repeat(79)}
60
+ * ${message.replace(/(?![^\n]{1,75}$)([^\n]{1,75})\s/g, '$1\n * ')}
61
+ ${'*'.repeat(79)}/`;
62
+ }
63
+ function buildComponentCss(component) {
64
+ let contents = buildCommentBlock(`COMPONENT: ${component.name.toUpperCase()}`);
65
+ for (const style of component.styles) {
66
+ contents += `
67
+
68
+ ${buildCommentBlock(style.instructions.trim())}
69
+
70
+ ${style.css.trim()}
71
+ `;
72
+ }
73
+ return contents;
74
+ }
75
+ function writeStylesheet(sourceRoot, contents) {
76
+ const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
77
+ return (tree) => {
78
+ if (tree.exists(filePath)) {
79
+ tree.overwrite(filePath, contents);
80
+ }
81
+ else {
82
+ tree.create(filePath, contents);
83
+ }
84
+ };
85
+ }
86
+ function addStylesheetToWorkspace() {
87
+ return () => (0, workspace_1.updateWorkspace)((workspace) => {
88
+ for (const project of workspace.projects.values()) {
89
+ for (const targetName of ['build', 'test']) {
90
+ if (project.extensions['projectType'] === 'application') {
91
+ const target = project.targets.get(targetName);
92
+ const sourceRoot = getProjectSourcePath(project);
93
+ const filePath = `${sourceRoot}/${COMPAT_CSS_FILE_NAME}`;
94
+ /* istanbul ignore else */
95
+ if (target && target.options) {
96
+ const styles = (target.options['styles'] = (target.options['styles'] || []));
97
+ if (!styles.includes(filePath)) {
98
+ styles.push(filePath);
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ });
105
+ }
106
+ function getCompatStyles(tree) {
107
+ let contents = '';
108
+ const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, '/package.json'));
109
+ for (const library of compatStyles.libraries) {
110
+ if (packageJson.dependencies?.[library.name] ||
111
+ packageJson.devDependencies?.[library.name]) {
112
+ for (const component of library.components) {
113
+ contents += `
114
+ ${buildComponentCss(component)}`;
115
+ }
116
+ }
117
+ }
118
+ return contents
119
+ ? `${buildCommentBlock(`TODO: The following component libraries introduced visual breaking changes in SKY UX 9. Each block of CSS reintroduces the styles that were changed or removed for backwards compatibility. You will need to do the following before migrating to the next major version of SKY UX:
120
+ - Address each of the changes by following the instructions
121
+ in each block of CSS, then remove the block.
122
+ - Delete this file after all blocks have been addressed.
123
+ - Remove each occurrence of this file in your project's
124
+ angular.json file.`)}
125
+ ${contents}`
126
+ : undefined;
127
+ }
128
+ function default_1() {
129
+ return async (tree) => {
130
+ const { workspace } = await (0, workspace_1.getWorkspace)(tree);
131
+ const styles = getCompatStyles(tree);
132
+ const rules = [];
133
+ for (const [, projectDefinition] of workspace.projects.entries()) {
134
+ if (projectDefinition.extensions['projectType'] === 'application') {
135
+ if (styles) {
136
+ const sourcePath = getProjectSourcePath(projectDefinition);
137
+ rules.push(writeStylesheet(sourcePath, styles));
138
+ }
139
+ }
140
+ }
141
+ if (styles) {
142
+ rules.push(addStylesheetToWorkspace());
143
+ }
144
+ return (0, schematics_1.chain)(rules);
145
+ };
146
+ }
147
+ exports.default = default_1;
148
+ //# sourceMappingURL=add-compat-stylesheet.schematic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-compat-stylesheet.schematic.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/packages/src/schematics/migrations/update-9/add-compat-stylesheets/add-compat-stylesheet.schematic.ts"],"names":[],"mappings":";;AACA,2DAA+D;AAE/D,gDAAyD;AACzD,0DAA2E;AAE3E,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAEjD,MAAM,YAAY,GAAG;IACnB,SAAS,EAAE;QACT;YACE,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE;wBACN;4BACE,GAAG,EAAE;;;;CAIlB;4BACa,YAAY,EAAE;8LACkK;yBACjL;qBACF;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE;wBACN;4BACE,GAAG,EAAE;;;;CAIlB;4BACa,YAAY,EAAE;4TACgS;yBAC/S;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,SAAS,oBAAoB,CAAC,iBAAoC;IAChE,wBAAwB;IACxB,IAAI,iBAAiB,CAAC,UAAU,EAAE;QAChC,OAAO,GAAG,iBAAiB,CAAC,UAAU,MAAM,CAAC;KAC9C;SAAM;QACL,OAAO,GAAG,iBAAiB,CAAC,IAAI,UAAU,CAAC;KAC5C;AACH,CAAC;AAED,SAAS,iBAAiB,CAA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