@spartan-ng/cli 0.0.1-alpha.511 → 0.0.1-alpha.513
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/generators.json +111 -87
- package/package.json +2 -1
- package/src/generators/healthcheck/generator.js +2 -0
- package/src/generators/healthcheck/generator.js.map +1 -1
- package/src/generators/healthcheck/healthchecks/brn-accordion-trigger.d.ts +2 -0
- package/src/generators/healthcheck/healthchecks/brn-accordion-trigger.js +110 -0
- package/src/generators/healthcheck/healthchecks/brn-accordion-trigger.js.map +1 -0
- package/src/generators/migrate-brain-accordion-trigger/compat.d.ts +2 -0
- package/src/generators/migrate-brain-accordion-trigger/compat.js +7 -0
- package/src/generators/migrate-brain-accordion-trigger/compat.js.map +1 -0
- package/src/generators/migrate-brain-accordion-trigger/generator.d.ts +3 -0
- package/src/generators/migrate-brain-accordion-trigger/generator.js +126 -0
- package/src/generators/migrate-brain-accordion-trigger/generator.js.map +1 -0
- package/src/generators/migrate-brain-accordion-trigger/schema.d.ts +4 -0
- package/src/generators/migrate-brain-accordion-trigger/schema.json +14 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/html-utils.d.ts +15 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/html-utils.js +71 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/html-utils.js.map +1 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.d.ts +35 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.js +111 -0
- package/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.js.map +1 -0
- package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.ts.template +3 -1
- package/src/generators/ui/libs/ui-checkbox-helm/files/lib/hlm-checkbox.ts.template +4 -0
- package/src/generators/ui/libs/ui-switch-helm/files/lib/hlm-switch.ts.template +4 -0
- package/src/generators/ui/supported-ui-libraries.json +27 -27
package/generators.json
CHANGED
|
@@ -1,60 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"
|
|
4
|
-
"factory": "./src/generators/
|
|
5
|
-
"schema": "./src/generators/
|
|
6
|
-
"description": "
|
|
3
|
+
"healthcheck": {
|
|
4
|
+
"factory": "./src/generators/healthcheck/generator",
|
|
5
|
+
"schema": "./src/generators/healthcheck/schema.json",
|
|
6
|
+
"description": "Run a healthcheck on the project to identify any potential issues or outdated code."
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
"factory": "./src/generators/
|
|
10
|
-
"schema": "./src/generators/
|
|
11
|
-
"description": "
|
|
8
|
+
"migrate-brain-accordion-trigger": {
|
|
9
|
+
"factory": "./src/generators/migrate-brain-accordion-trigger/generator",
|
|
10
|
+
"schema": "./src/generators/migrate-brain-accordion-trigger/schema.json",
|
|
11
|
+
"description": "Migrate brain accordion trigger to be wrapped by a heading element."
|
|
12
12
|
},
|
|
13
13
|
"migrate-brain-imports": {
|
|
14
14
|
"factory": "./src/generators/migrate-brain-imports/generator",
|
|
15
15
|
"schema": "./src/generators/migrate-brain-imports/schema.json",
|
|
16
16
|
"description": "Migrate Brain imports to use secondary entrypoints."
|
|
17
17
|
},
|
|
18
|
-
"migrate-scroll-area": {
|
|
19
|
-
"factory": "./src/generators/migrate-scroll-area/generator",
|
|
20
|
-
"schema": "./src/generators/migrate-scroll-area/schema.json",
|
|
21
|
-
"description": "Migrate hlm-scroll-area to ngx-scrollbar"
|
|
22
|
-
},
|
|
23
|
-
"migrate-icon": {
|
|
24
|
-
"factory": "./src/generators/migrate-icon/generator",
|
|
25
|
-
"schema": "./src/generators/migrate-icon/schema.json",
|
|
26
|
-
"description": "Migrate hlm-icon to ng-icon"
|
|
27
|
-
},
|
|
28
|
-
"migrate-radio": {
|
|
29
|
-
"factory": "./src/generators/migrate-radio/generator",
|
|
30
|
-
"schema": "./src/generators/migrate-radio/schema.json",
|
|
31
|
-
"description": "Migrate brn-radio to hlm-radio"
|
|
32
|
-
},
|
|
33
|
-
"migrate-toggle-group": {
|
|
34
|
-
"factory": "./src/generators/migrate-toggle-group/generator",
|
|
35
|
-
"schema": "./src/generators/migrate-toggle-group/schema.json",
|
|
36
|
-
"description": "Migrate brn-toggle-group from @spartan-ng/brain/toggle to @spartan-ng/brain/toggle-group"
|
|
37
|
-
},
|
|
38
|
-
"migrate-select": {
|
|
39
|
-
"factory": "./src/generators/migrate-select/generator",
|
|
40
|
-
"schema": "./src/generators/migrate-select/schema.json",
|
|
41
|
-
"description": "Migrate brn-select and hlm-select to use openChange and active descendants"
|
|
42
|
-
},
|
|
43
18
|
"migrate-core": {
|
|
44
19
|
"factory": "./src/generators/migrate-core/generator",
|
|
45
20
|
"schema": "./src/generators/migrate-core/schema.json",
|
|
46
|
-
"description": "Migrate core library to brain core
|
|
21
|
+
"description": "Migrate core library to brain core entrypoint"
|
|
47
22
|
},
|
|
48
|
-
"
|
|
49
|
-
"factory": "./src/generators/
|
|
50
|
-
"schema": "./src/generators/
|
|
51
|
-
"description": "
|
|
23
|
+
"migrate-date-picker": {
|
|
24
|
+
"factory": "./src/generators/migrate-date-picker/generator",
|
|
25
|
+
"schema": "./src/generators/migrate-date-picker/schema.json",
|
|
26
|
+
"description": "Migrate hlm-date-picker changed event to dateChange"
|
|
27
|
+
},
|
|
28
|
+
"migrate-helm-imports": {
|
|
29
|
+
"factory": "./src/generators/migrate-helm-imports/generator",
|
|
30
|
+
"schema": "./src/generators/migrate-helm-imports/schema.json",
|
|
31
|
+
"description": "Migrate Helm imports to use the new imports structure."
|
|
52
32
|
},
|
|
53
33
|
"migrate-helm-libraries": {
|
|
54
34
|
"factory": "./src/generators/migrate-helm-libraries/generator",
|
|
55
35
|
"schema": "./src/generators/migrate-helm-libraries/schema.json",
|
|
56
36
|
"description": "Migrate Helm libraries to their latest versions"
|
|
57
37
|
},
|
|
38
|
+
"migrate-hlm": {
|
|
39
|
+
"factory": "./src/generators/migrate-hlm/generator",
|
|
40
|
+
"schema": "./src/generators/migrate-hlm/schema.json",
|
|
41
|
+
"description": "Migrate hlm import from @spartan-ng/brain to @spartan-ng/helm/utils"
|
|
42
|
+
},
|
|
43
|
+
"migrate-icon": {
|
|
44
|
+
"factory": "./src/generators/migrate-icon/generator",
|
|
45
|
+
"schema": "./src/generators/migrate-icon/schema.json",
|
|
46
|
+
"description": "Migrate hlm-icon to ng-icon"
|
|
47
|
+
},
|
|
58
48
|
"migrate-naming-conventions": {
|
|
59
49
|
"factory": "./src/generators/migrate-naming-convention/generator",
|
|
60
50
|
"schema": "./src/generators/migrate-naming-convention/schema.json",
|
|
@@ -65,98 +55,132 @@
|
|
|
65
55
|
"schema": "./src/generators/migrate-progress/schema.json",
|
|
66
56
|
"description": "Migrate brn-progress to hlm-progress"
|
|
67
57
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"description": "Migrate hlm-date-picker changed event to dateChange"
|
|
58
|
+
"migrate-radio": {
|
|
59
|
+
"factory": "./src/generators/migrate-radio/generator",
|
|
60
|
+
"schema": "./src/generators/migrate-radio/schema.json",
|
|
61
|
+
"description": "Migrate brn-radio to hlm-radio"
|
|
73
62
|
},
|
|
74
|
-
"migrate-
|
|
75
|
-
"factory": "./src/generators/migrate-
|
|
76
|
-
"schema": "./src/generators/migrate-
|
|
77
|
-
"description": "Migrate hlm
|
|
63
|
+
"migrate-scroll-area": {
|
|
64
|
+
"factory": "./src/generators/migrate-scroll-area/generator",
|
|
65
|
+
"schema": "./src/generators/migrate-scroll-area/schema.json",
|
|
66
|
+
"description": "Migrate hlm-scroll-area to ngx-scrollbar"
|
|
67
|
+
},
|
|
68
|
+
"migrate-select": {
|
|
69
|
+
"factory": "./src/generators/migrate-select/generator",
|
|
70
|
+
"schema": "./src/generators/migrate-select/schema.json",
|
|
71
|
+
"description": "Migrate brn-select and hlm-select to use openChange and active descendants"
|
|
78
72
|
},
|
|
79
73
|
"migrate-separator": {
|
|
80
74
|
"factory": "./src/generators/migrate-separator/generator",
|
|
81
75
|
"schema": "./src/generators/migrate-separator/schema.json",
|
|
82
76
|
"description": "Migrate brn-separator to hlm-separator"
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
},
|
|
78
|
+
"migrate-toggle-group": {
|
|
79
|
+
"factory": "./src/generators/migrate-toggle-group/generator",
|
|
80
|
+
"schema": "./src/generators/migrate-toggle-group/schema.json",
|
|
81
|
+
"description": "Migrate brn-toggle-group from @spartan-ng/brain/toggle to @spartan-ng/brain/toggle-group"
|
|
82
|
+
},
|
|
86
83
|
"ui": {
|
|
87
|
-
"factory": "./src/generators/ui/
|
|
84
|
+
"factory": "./src/generators/ui/generator",
|
|
88
85
|
"schema": "./src/generators/ui/schema.json",
|
|
89
86
|
"description": "spartan-ng ui generator"
|
|
90
87
|
},
|
|
91
88
|
"ui-theme": {
|
|
92
|
-
"factory": "./src/generators/theme/
|
|
89
|
+
"factory": "./src/generators/theme/generator",
|
|
93
90
|
"schema": "./src/generators/theme/schema.json",
|
|
94
91
|
"description": "spartan-ng theme generator"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"schematics": {
|
|
95
|
+
"healthcheck": {
|
|
96
|
+
"factory": "./src/generators/healthcheck/compat",
|
|
97
|
+
"schema": "./src/generators/healthcheck/schema.json",
|
|
98
|
+
"description": "Run a healthcheck on the project to identify any potential issues or outdated code."
|
|
99
|
+
},
|
|
100
|
+
"migrate-brain-accordion-trigger": {
|
|
101
|
+
"factory": "./src/generators/migrate-brain-accordion-trigger/compat",
|
|
102
|
+
"schema": "./src/generators/migrate-brain-accordion-trigger/schema.json",
|
|
103
|
+
"description": "Migrate brain accordion trigger to be wrapped by a heading element."
|
|
95
104
|
},
|
|
96
105
|
"migrate-brain-imports": {
|
|
97
106
|
"factory": "./src/generators/migrate-brain-imports/compat",
|
|
98
107
|
"schema": "./src/generators/migrate-brain-imports/schema.json",
|
|
99
108
|
"description": "Migrate Brain imports to use secondary entrypoints."
|
|
100
109
|
},
|
|
110
|
+
"migrate-core": {
|
|
111
|
+
"factory": "./src/generators/migrate-scroll-area/compat",
|
|
112
|
+
"schema": "./src/generators/migrate-core/schema.json",
|
|
113
|
+
"description": "Migrate core library to brain core entrypoint"
|
|
114
|
+
},
|
|
115
|
+
"migrate-date-picker": {
|
|
116
|
+
"factory": "./src/generators/migrate-date-picker/compat",
|
|
117
|
+
"schema": "./src/generators/migrate-date-picker/schema.json",
|
|
118
|
+
"description": "Migrate hlm-date-picker changed event to dateChange"
|
|
119
|
+
},
|
|
101
120
|
"migrate-helm-imports": {
|
|
102
121
|
"factory": "./src/generators/migrate-helm-imports/compat",
|
|
103
122
|
"schema": "./src/generators/migrate-helm-imports/schema.json",
|
|
104
123
|
"description": "Migrate Helm imports to use the new imports structure."
|
|
105
124
|
},
|
|
106
|
-
"migrate-
|
|
107
|
-
"factory": "./src/generators/migrate-
|
|
108
|
-
"schema": "./src/generators/migrate-
|
|
109
|
-
"description": "Migrate
|
|
125
|
+
"migrate-helm-libraries": {
|
|
126
|
+
"factory": "./src/generators/migrate-helm-libraries/compat",
|
|
127
|
+
"schema": "./src/generators/migrate-helm-libraries/schema.json",
|
|
128
|
+
"description": "Migrate Helm libraries to their latest versions"
|
|
129
|
+
},
|
|
130
|
+
"migrate-hlm": {
|
|
131
|
+
"factory": "./src/generators/migrate-hlm/compat",
|
|
132
|
+
"schema": "./src/generators/migrate-hlm/schema.json",
|
|
133
|
+
"description": "Migrate hlm import from @spartan-ng/brain to @spartan-ng/helm/utils"
|
|
110
134
|
},
|
|
111
135
|
"migrate-icon": {
|
|
112
136
|
"factory": "./src/generators/migrate-icon/compat",
|
|
113
137
|
"schema": "./src/generators/migrate-icon/schema.json",
|
|
114
138
|
"description": "Migrate hlm-icon to ng-icon"
|
|
115
139
|
},
|
|
140
|
+
"migrate-naming-conventions": {
|
|
141
|
+
"factory": "./src/generators/migrate-naming-convention/compat",
|
|
142
|
+
"schema": "./src/generators/migrate-naming-convention/schema.json",
|
|
143
|
+
"description": "Migrate naming conventions to the latest standards"
|
|
144
|
+
},
|
|
145
|
+
"migrate-progress": {
|
|
146
|
+
"factory": "./src/generators/migrate-progress/compat",
|
|
147
|
+
"schema": "./src/generators/migrate-progress/schema.json",
|
|
148
|
+
"description": "Migrate brn-progress to hlm-progress"
|
|
149
|
+
},
|
|
116
150
|
"migrate-radio": {
|
|
117
151
|
"factory": "./src/generators/migrate-radio/compat",
|
|
118
152
|
"schema": "./src/generators/migrate-radio/schema.json",
|
|
119
153
|
"description": "Migrate brn-radio to hlm-radio"
|
|
120
154
|
},
|
|
155
|
+
"migrate-scroll-area": {
|
|
156
|
+
"factory": "./src/generators/migrate-scroll-area/compat",
|
|
157
|
+
"schema": "./src/generators/migrate-scroll-area/schema.json",
|
|
158
|
+
"description": "Migrate hlm-scroll-area to ngx-scrollbar"
|
|
159
|
+
},
|
|
121
160
|
"migrate-select": {
|
|
122
161
|
"factory": "./src/generators/migrate-select/compat",
|
|
123
162
|
"schema": "./src/generators/migrate-select/schema.json",
|
|
124
163
|
"description": "Migrate brn-select and hlm-select to use openChange and active descendants"
|
|
125
164
|
},
|
|
126
|
-
"migrate-
|
|
127
|
-
"factory": "./src/generators/migrate-
|
|
128
|
-
"schema": "./src/generators/migrate-
|
|
129
|
-
"description": "Migrate
|
|
130
|
-
},
|
|
131
|
-
"healthcheck": {
|
|
132
|
-
"factory": "./src/generators/healthcheck/compat",
|
|
133
|
-
"schema": "./src/generators/healthcheck/schema.json",
|
|
134
|
-
"description": "Run a healthcheck on the project to identify any potential issues or outdated code."
|
|
135
|
-
},
|
|
136
|
-
"migrate-helm-libraries": {
|
|
137
|
-
"factory": "./src/generators/migrate-helm-libraries/compat",
|
|
138
|
-
"schema": "./src/generators/migrate-helm-libraries/schema.json",
|
|
139
|
-
"description": "Migrate Helm libraries to their latest versions"
|
|
140
|
-
},
|
|
141
|
-
"migrate-naming-conventions": {
|
|
142
|
-
"factory": "./src/generators/migrate-naming-convention/compat",
|
|
143
|
-
"schema": "./src/generators/migrate-naming-convention/schema.json",
|
|
144
|
-
"description": "Migrate naming conventions to the latest standards"
|
|
165
|
+
"migrate-separator": {
|
|
166
|
+
"factory": "./src/generators/migrate-separator/compat",
|
|
167
|
+
"schema": "./src/generators/migrate-separator/schema.json",
|
|
168
|
+
"description": "Migrate brn-separator to hlm-separator"
|
|
145
169
|
},
|
|
146
|
-
"migrate-
|
|
147
|
-
"factory": "./src/generators/migrate-
|
|
148
|
-
"schema": "./src/generators/migrate-
|
|
149
|
-
"description": "Migrate brn-
|
|
170
|
+
"migrate-toggle-group": {
|
|
171
|
+
"factory": "./src/generators/migrate-toggle-group/compat",
|
|
172
|
+
"schema": "./src/generators/migrate-toggle-group/schema.json",
|
|
173
|
+
"description": "Migrate brn-toggle-group from @spartan-ng/brain/toggle to @spartan-ng/brain/toggle-group"
|
|
150
174
|
},
|
|
151
|
-
"
|
|
152
|
-
"factory": "./src/generators/
|
|
153
|
-
"schema": "./src/generators/
|
|
154
|
-
"description": "
|
|
175
|
+
"ui": {
|
|
176
|
+
"factory": "./src/generators/ui/compat",
|
|
177
|
+
"schema": "./src/generators/ui/schema.json",
|
|
178
|
+
"description": "spartan-ng ui generator"
|
|
155
179
|
},
|
|
156
|
-
"
|
|
157
|
-
"factory": "./src/generators/
|
|
158
|
-
"schema": "./src/generators/
|
|
159
|
-
"description": "
|
|
180
|
+
"ui-theme": {
|
|
181
|
+
"factory": "./src/generators/theme/compat",
|
|
182
|
+
"schema": "./src/generators/theme/schema.json",
|
|
183
|
+
"description": "spartan-ng theme generator"
|
|
160
184
|
}
|
|
161
185
|
}
|
|
162
186
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spartan-ng/cli",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.513",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@nx/angular": ">=20.0.0",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"@schematics/angular": ">=19.0.0",
|
|
12
12
|
"enquirer": "2.3.6",
|
|
13
13
|
"jsonc-eslint-parser": "^2.1.0",
|
|
14
|
+
"node-html-parser": "^7.0.1",
|
|
14
15
|
"nx": ">=20.0.0",
|
|
15
16
|
"picocolors": "^1.1.1",
|
|
16
17
|
"semver": "7.5.4",
|
|
@@ -4,6 +4,7 @@ exports.healthcheckGenerator = healthcheckGenerator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const healthchecks_1 = require("./healthchecks");
|
|
6
6
|
const brain_imports_1 = require("./healthchecks/brain-imports");
|
|
7
|
+
const brn_accordion_trigger_1 = require("./healthchecks/brn-accordion-trigger");
|
|
7
8
|
const brn_radio_1 = require("./healthchecks/brn-radio");
|
|
8
9
|
const brn_separator_1 = require("./healthchecks/brn-separator");
|
|
9
10
|
const brn_toggle_group_1 = require("./healthchecks/brn-toggle-group");
|
|
@@ -37,6 +38,7 @@ async function healthcheckGenerator(tree, options) {
|
|
|
37
38
|
hlm_progress_1.progressHealthcheck,
|
|
38
39
|
hlm_1.hlmImportHealthcheck,
|
|
39
40
|
brn_separator_1.brainSeparatorHealthcheck,
|
|
41
|
+
brn_accordion_trigger_1.brainAccordionTriggerHealthcheck,
|
|
40
42
|
];
|
|
41
43
|
const failedReports = [];
|
|
42
44
|
for (const healthcheck of healthchecks) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/healthcheck/generator.ts"],"names":[],"mappings":";;AAsBA,oDA6CC;AAnED,uCAAuD;AACvD,iDAAyG;AACzG,gEAAuE;AACvE,gFAAwF;AACxF,wDAAiE;AACjE,gEAAyE;AACzE,sEAAyE;AACzE,8DAAqE;AACrE,8D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AI,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;YACxE,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACzB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACzB,CAAC;AACF,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.brainAccordionTriggerHealthcheck = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const ts_morph_1 = require("ts-morph");
|
|
7
|
+
const generator_1 = tslib_1.__importDefault(require("../../migrate-brain-accordion-trigger/generator"));
|
|
8
|
+
const html_utils_1 = require("../../migrate-brain-accordion-trigger/utils/html-utils");
|
|
9
|
+
const shared_utils_1 = require("../../migrate-brain-accordion-trigger/utils/shared-utils");
|
|
10
|
+
const healthchecks_1 = require("../healthchecks");
|
|
11
|
+
exports.brainAccordionTriggerHealthcheck = {
|
|
12
|
+
name: 'Brain Accordion Trigger',
|
|
13
|
+
async detect(tree, failure) {
|
|
14
|
+
const project = new ts_morph_1.Project({ useInMemoryFileSystem: true });
|
|
15
|
+
const violations = [];
|
|
16
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '/', (file) => {
|
|
17
|
+
if (!(0, shared_utils_1.shouldProcessFile)(file))
|
|
18
|
+
return;
|
|
19
|
+
const contents = tree.read(file, 'utf-8');
|
|
20
|
+
if (!contents || !(0, shared_utils_1.hasAccordionTriggers)(contents))
|
|
21
|
+
return;
|
|
22
|
+
const fileViolations = file.endsWith('.html')
|
|
23
|
+
? findTemplateViolations(contents, file)
|
|
24
|
+
: findComponentViolations(contents, file, project);
|
|
25
|
+
violations.push(...fileViolations);
|
|
26
|
+
});
|
|
27
|
+
if (violations.length > 0) {
|
|
28
|
+
const summary = generateViolationSummary(violations);
|
|
29
|
+
failure(summary, healthchecks_1.HealthcheckSeverity.Error, true);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
fix: async (tree) => {
|
|
33
|
+
await (0, generator_1.default)(tree, { skipFormat: true });
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
36
|
+
prompt: 'Would you like to migrate your brain accordion triggers?',
|
|
37
|
+
};
|
|
38
|
+
function findTemplateViolations(content, filePath) {
|
|
39
|
+
const violations = [];
|
|
40
|
+
const root = (0, html_utils_1.parseHtmlForAccordionMigration)(content);
|
|
41
|
+
const buttons = (0, html_utils_1.findAccordionButtons)(root);
|
|
42
|
+
for (const button of buttons) {
|
|
43
|
+
const violation = checkButton(button, filePath);
|
|
44
|
+
if (violation)
|
|
45
|
+
violations.push(violation);
|
|
46
|
+
}
|
|
47
|
+
return violations;
|
|
48
|
+
}
|
|
49
|
+
function checkButton(button, filePath) {
|
|
50
|
+
if (!(0, html_utils_1.isInHeading)(button)) {
|
|
51
|
+
return {
|
|
52
|
+
file: filePath,
|
|
53
|
+
line: button.range?.[0] || 0,
|
|
54
|
+
type: 'not-in-heading',
|
|
55
|
+
buttonText: (0, html_utils_1.getButtonText)(button),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
if ((0, html_utils_1.hasSignificantSiblings)(button)) {
|
|
59
|
+
return {
|
|
60
|
+
file: filePath,
|
|
61
|
+
line: button.range?.[0] || 0,
|
|
62
|
+
type: 'not-only-child',
|
|
63
|
+
buttonText: (0, html_utils_1.getButtonText)(button),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function findComponentViolations(content, filePath, project) {
|
|
69
|
+
const sourceFile = project.createSourceFile(filePath, content, { overwrite: true });
|
|
70
|
+
const templateContent = (0, shared_utils_1.extractInlineTemplate)(sourceFile);
|
|
71
|
+
if (!templateContent)
|
|
72
|
+
return [];
|
|
73
|
+
const templateViolations = findTemplateViolations(templateContent.text, filePath);
|
|
74
|
+
for (const violation of templateViolations) {
|
|
75
|
+
violation.line += templateContent.startLine - 1;
|
|
76
|
+
}
|
|
77
|
+
return templateViolations;
|
|
78
|
+
}
|
|
79
|
+
function generateViolationSummary(violations) {
|
|
80
|
+
const notInHeading = violations.filter((v) => v.type === 'not-in-heading');
|
|
81
|
+
const byFile = groupViolationsByFile(notInHeading);
|
|
82
|
+
let summary = `Found ${notInHeading.length} accordion trigger(s) that need to be wrapped in headings:\n\n`;
|
|
83
|
+
for (const [file, fileViolations] of byFile) {
|
|
84
|
+
summary += `${file}\n`;
|
|
85
|
+
summary += formatFileViolations(fileViolations);
|
|
86
|
+
}
|
|
87
|
+
return summary;
|
|
88
|
+
}
|
|
89
|
+
function groupViolationsByFile(violations) {
|
|
90
|
+
const byFile = new Map();
|
|
91
|
+
for (const violation of violations) {
|
|
92
|
+
if (!byFile.has(violation.file)) {
|
|
93
|
+
byFile.set(violation.file, []);
|
|
94
|
+
}
|
|
95
|
+
byFile.get(violation.file).push(violation);
|
|
96
|
+
}
|
|
97
|
+
return byFile;
|
|
98
|
+
}
|
|
99
|
+
function formatFileViolations(violations) {
|
|
100
|
+
return violations
|
|
101
|
+
.map((v) => {
|
|
102
|
+
let line = ` - Line ${v.line}`;
|
|
103
|
+
if (v.buttonText) {
|
|
104
|
+
line += ` - (button: "${v.buttonText}")`;
|
|
105
|
+
}
|
|
106
|
+
return line + '\n';
|
|
107
|
+
})
|
|
108
|
+
.join('');
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=brn-accordion-trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brn-accordion-trigger.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/healthcheck/healthchecks/brn-accordion-trigger.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,uCAAmC;AACnC,wGAA+F;AAC/F,uFAOgE;AAChE,2FAIkE;AAClE,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,CAAC;IAC7C,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,oBAAoB,CAAC,UAAuB;IACpD,OAAO,UAAU;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACV,IAAI,IAAI,GAAG,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,IAAI,gBAAgB,CAAC,CAAC,UAAU,IAAI,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
exports.default = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brain-accordion-trigger/compat.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAA2D;AAE3D,kBAAe,IAAA,2BAAkB,EAAC,mBAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = migrateAccordionTriggerGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const node_html_parser_1 = require("node-html-parser");
|
|
6
|
+
const ts_morph_1 = require("ts-morph");
|
|
7
|
+
const visit_files_1 = require("../../utils/visit-files");
|
|
8
|
+
const html_utils_1 = require("./utils/html-utils");
|
|
9
|
+
const shared_utils_1 = require("./utils/shared-utils");
|
|
10
|
+
async function migrateAccordionTriggerGenerator(tree, { skipFormat }) {
|
|
11
|
+
const issues = [];
|
|
12
|
+
const project = new ts_morph_1.Project({ useInMemoryFileSystem: true });
|
|
13
|
+
wrapAccordionTriggers(tree, project, issues);
|
|
14
|
+
if (issues.length > 0) {
|
|
15
|
+
reportManualFixesNeeded(issues);
|
|
16
|
+
}
|
|
17
|
+
if (!skipFormat) {
|
|
18
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function wrapAccordionTriggers(tree, project, issues) {
|
|
22
|
+
(0, visit_files_1.visitFiles)(tree, '.', (path) => {
|
|
23
|
+
console.log('Processing ' + path + '...');
|
|
24
|
+
if (!(0, shared_utils_1.shouldProcessFile)(path))
|
|
25
|
+
return;
|
|
26
|
+
const content = tree.read(path, 'utf-8');
|
|
27
|
+
if (!content || !(0, shared_utils_1.hasAccordionTriggers)(content))
|
|
28
|
+
return;
|
|
29
|
+
const result = path.endsWith('.html')
|
|
30
|
+
? fixTemplate(content, path, issues)
|
|
31
|
+
: fixComponentFile(content, path, project, issues);
|
|
32
|
+
if (result?.modified) {
|
|
33
|
+
tree.write(path, result.content);
|
|
34
|
+
console.log(`Fixed ${result.fixedCount} accordion trigger(s) in ${path}`);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function fixTemplate(content, filePath, issues, options = { noContentsClass: false }) {
|
|
39
|
+
const root = (0, html_utils_1.parseHtmlForAccordionMigration)(content);
|
|
40
|
+
const buttons = (0, html_utils_1.findAccordionButtons)(root);
|
|
41
|
+
let fixedCount = 0;
|
|
42
|
+
for (const button of buttons) {
|
|
43
|
+
const analysis = (0, shared_utils_1.analyzeButton)(button);
|
|
44
|
+
switch (analysis.issue) {
|
|
45
|
+
case 'NotInHeading':
|
|
46
|
+
(0, html_utils_1.wrapButtonInHeading)(button, !options.noContentsClass);
|
|
47
|
+
fixedCount++;
|
|
48
|
+
break;
|
|
49
|
+
case 'HasSiblings':
|
|
50
|
+
logSiblingIssue(analysis, filePath, issues);
|
|
51
|
+
break;
|
|
52
|
+
case 'NoIssue':
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (fixedCount > 0) {
|
|
57
|
+
return {
|
|
58
|
+
content: formatHtmlOutput(root),
|
|
59
|
+
modified: true,
|
|
60
|
+
fixedCount,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return { content, modified: false, fixedCount: 0 };
|
|
64
|
+
}
|
|
65
|
+
function fixComponentFile(content, filePath, project, issues) {
|
|
66
|
+
const sourceFile = project.createSourceFile(filePath, content, { overwrite: true });
|
|
67
|
+
const templateInfo = (0, shared_utils_1.extractInlineTemplate)(sourceFile);
|
|
68
|
+
if (!templateInfo) {
|
|
69
|
+
return { content, modified: false, fixedCount: 0 };
|
|
70
|
+
}
|
|
71
|
+
// Fix the template content
|
|
72
|
+
const result = fixTemplate(templateInfo.text, filePath, issues);
|
|
73
|
+
if (result.modified && templateInfo.propertyAssignment.getInitializer()) {
|
|
74
|
+
// Replace template in source file
|
|
75
|
+
const quoteStyle = templateInfo.originalQuoteStyle || '`';
|
|
76
|
+
let newTemplateValue;
|
|
77
|
+
if (quoteStyle === '`') {
|
|
78
|
+
newTemplateValue = `\`${result.content}\``;
|
|
79
|
+
}
|
|
80
|
+
else if (quoteStyle === '"') {
|
|
81
|
+
newTemplateValue = `"${result.content.replace(/"/g, '\\"')}"`;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
newTemplateValue = `'${result.content.replace(/'/g, "\\'")}'`;
|
|
85
|
+
}
|
|
86
|
+
templateInfo.propertyAssignment.getInitializer().replaceWithText(newTemplateValue);
|
|
87
|
+
return {
|
|
88
|
+
content: sourceFile.getFullText(),
|
|
89
|
+
modified: true,
|
|
90
|
+
fixedCount: result.fixedCount,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return { content, modified: false, fixedCount: 0 };
|
|
94
|
+
}
|
|
95
|
+
function logSiblingIssue(analysis, filePath, issues) {
|
|
96
|
+
const parent = analysis.parent;
|
|
97
|
+
const siblingContent = getSiblingPreview(analysis.button, parent);
|
|
98
|
+
issues.push(`! ${filePath}\n` +
|
|
99
|
+
` - Button "${analysis.buttonText}" in <${parent.tagName.toLowerCase()}> ` +
|
|
100
|
+
`has siblings that need to be moved: ${siblingContent}...\n`);
|
|
101
|
+
}
|
|
102
|
+
function getSiblingPreview(button, parent) {
|
|
103
|
+
return parent.childNodes
|
|
104
|
+
.filter((child) => child !== button)
|
|
105
|
+
.map((child) => {
|
|
106
|
+
if (child.nodeType === node_html_parser_1.NodeType.TEXT_NODE) {
|
|
107
|
+
return child.text?.trim();
|
|
108
|
+
}
|
|
109
|
+
return child.toString();
|
|
110
|
+
})
|
|
111
|
+
.filter(Boolean)
|
|
112
|
+
.join(', ')
|
|
113
|
+
.substring(0, 50);
|
|
114
|
+
}
|
|
115
|
+
function formatHtmlOutput(root) {
|
|
116
|
+
const output = root.toString();
|
|
117
|
+
// Convert empty tags to self-closing
|
|
118
|
+
return output.replace(/<([^>\s]+)([^>]*)><\/\1>/g, '<$1$2/>');
|
|
119
|
+
}
|
|
120
|
+
function reportManualFixesNeeded(issues) {
|
|
121
|
+
console.log(`We also detected ${issues.length} accordion trigger buttons ` +
|
|
122
|
+
`that have siblings that need to be manually moved:`);
|
|
123
|
+
issues.forEach((issue) => console.log(issue));
|
|
124
|
+
console.log('To learn more about this pattern see: ' + 'https://www.w3.org/WAI/ARIA/apg/patterns/accordion/');
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../libs/cli/src/generators/migrate-brain-accordion-trigger/generator.ts"],"names":[],"mappings":";;AAmBA,mDAgBC;AAnCD,uCAA+C;AAC/C,uDAA4C;AA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DAAoD,CACrD,CAAC;IACF,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,wCAAwC,GAAG,qDAAqD,CAAC,CAAC;AAC/G,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "MigrateAccordionTrigger",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"skipFormat": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"default": false,
|
|
10
|
+
"description": "Skip formatting files"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": []
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLElement as ParsedHTMLElement } from 'node-html-parser';
|
|
2
|
+
export type HTMLElement = ParsedHTMLElement;
|
|
3
|
+
export declare const HTML_PARSE_CONFIG: {
|
|
4
|
+
lowerCaseTagName: boolean;
|
|
5
|
+
comment: boolean;
|
|
6
|
+
voidTag: {
|
|
7
|
+
tags: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare function parseHtmlForAccordionMigration(content: string): ParsedHTMLElement;
|
|
11
|
+
export declare function findAccordionButtons(root: HTMLElement): HTMLElement[];
|
|
12
|
+
export declare function isInHeading(button: HTMLElement): boolean;
|
|
13
|
+
export declare function hasSignificantSiblings(button: HTMLElement): boolean;
|
|
14
|
+
export declare function getButtonText(button: HTMLElement, maxLength?: number): string;
|
|
15
|
+
export declare function wrapButtonInHeading(button: HTMLElement, useContentsClass?: boolean): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HTML_PARSE_CONFIG = void 0;
|
|
4
|
+
exports.parseHtmlForAccordionMigration = parseHtmlForAccordionMigration;
|
|
5
|
+
exports.findAccordionButtons = findAccordionButtons;
|
|
6
|
+
exports.isInHeading = isInHeading;
|
|
7
|
+
exports.hasSignificantSiblings = hasSignificantSiblings;
|
|
8
|
+
exports.getButtonText = getButtonText;
|
|
9
|
+
exports.wrapButtonInHeading = wrapButtonInHeading;
|
|
10
|
+
const tslib_1 = require("tslib");
|
|
11
|
+
const node_html_parser_1 = tslib_1.__importStar(require("node-html-parser"));
|
|
12
|
+
exports.HTML_PARSE_CONFIG = {
|
|
13
|
+
lowerCaseTagName: false,
|
|
14
|
+
comment: false,
|
|
15
|
+
voidTag: {
|
|
16
|
+
tags: [
|
|
17
|
+
'img',
|
|
18
|
+
'br',
|
|
19
|
+
'hr',
|
|
20
|
+
'area',
|
|
21
|
+
'base',
|
|
22
|
+
'col',
|
|
23
|
+
'embed',
|
|
24
|
+
'input',
|
|
25
|
+
'link',
|
|
26
|
+
'meta',
|
|
27
|
+
'param',
|
|
28
|
+
'source',
|
|
29
|
+
'track',
|
|
30
|
+
'wbr',
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function parseHtmlForAccordionMigration(content) {
|
|
35
|
+
return (0, node_html_parser_1.default)(content, exports.HTML_PARSE_CONFIG);
|
|
36
|
+
}
|
|
37
|
+
function findAccordionButtons(root) {
|
|
38
|
+
return root.querySelectorAll('button[brnAccordionTrigger], button[hlmAccordionTrigger]');
|
|
39
|
+
}
|
|
40
|
+
function isInHeading(button) {
|
|
41
|
+
const parent = button.parentNode;
|
|
42
|
+
return !!(parent && /^h[1-6]$/i.test(parent.tagName));
|
|
43
|
+
}
|
|
44
|
+
function hasSignificantSiblings(button) {
|
|
45
|
+
const parent = button.parentNode;
|
|
46
|
+
if (!parent)
|
|
47
|
+
return false;
|
|
48
|
+
const siblings = parent.childNodes.filter((child) => {
|
|
49
|
+
if (child === button)
|
|
50
|
+
return false;
|
|
51
|
+
if (child.nodeType === node_html_parser_1.NodeType.TEXT_NODE) {
|
|
52
|
+
return child.text?.trim().length > 0;
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
});
|
|
56
|
+
return siblings.length > 0;
|
|
57
|
+
}
|
|
58
|
+
function getButtonText(button, maxLength = 50) {
|
|
59
|
+
return button.innerText?.trim()?.substring(0, maxLength) || '';
|
|
60
|
+
}
|
|
61
|
+
function wrapButtonInHeading(button, useContentsClass = true) {
|
|
62
|
+
const h3Html = useContentsClass ? '<h3 class="contents"></h3>' : '<h3></h3>';
|
|
63
|
+
const h3 = parseHtmlForAccordionMigration(h3Html).firstChild;
|
|
64
|
+
const parent = button.parentNode;
|
|
65
|
+
button.remove();
|
|
66
|
+
h3.appendChild(button);
|
|
67
|
+
if (parent) {
|
|
68
|
+
parent.prepend(h3);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=html-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-utils.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/migrate-brain-accordion-trigger/utils/html-utils.ts"],"names":[],"mappings":";;;AA0BA,wEAEC;AAED,oDAEC;AAED,kCAGC;AAED,wDAaC;AAED,sCAEC;AAED,kDAWC;;AArED,6EAAqF;AAGxE,QAAA,iBAAiB,GAAG;IAChC,gBAAgB,EAAE,KAAK;IACvB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE;QACR,IAAI,EAAE;YACL,KAAK;YACL,IAAI;YACJ,IAAI;YACJ,MAAM;YACN,MAAM;YACN,KAAK;YACL,OAAO;YACP,OAAO;YACP,MAAM;YACN,MAAM;YACN,OAAO;YACP,QAAQ;YACR,OAAO;YACP,KAAK;SACL;KACD;CACD,CAAC;AAEF,SAAgB,8BAA8B,CAAC,OAAe;IAC7D,OAAO,IAAA,0BAAK,EAAC,OAAO,EAAE,yBAAiB,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,o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,MAAM,MAAM,GAAG,MAAM,CAAC,UAAyB,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEvB,IAAI,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Decorator, PropertyAssignment, SourceFile } from 'ts-morph';
|
|
2
|
+
import { HTMLElement } from './html-utils';
|
|
3
|
+
export declare function shouldProcessFile(file: string): boolean;
|
|
4
|
+
export declare function hasAccordionTriggers(content: string): boolean;
|
|
5
|
+
export interface TemplateInfo {
|
|
6
|
+
text: string;
|
|
7
|
+
startLine: number;
|
|
8
|
+
propertyAssignment?: PropertyAssignment;
|
|
9
|
+
originalQuoteStyle?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function extractInlineTemplate(sourceFile: SourceFile): TemplateInfo | null;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if a decorator is @Component and extracts its template
|
|
14
|
+
*
|
|
15
|
+
* The AST (Abstract Syntax Tree) structure looks like this:
|
|
16
|
+
*
|
|
17
|
+
* Decorator (@Component)
|
|
18
|
+
* └── CallExpression (Component(...))
|
|
19
|
+
* └── ObjectLiteralExpression ({...})
|
|
20
|
+
* └── PropertyAssignment (template: '...')
|
|
21
|
+
* ├── Identifier (the word "template")
|
|
22
|
+
* └── StringLiteral (the actual template string)
|
|
23
|
+
*
|
|
24
|
+
* We need to navigate down this tree to find the template!
|
|
25
|
+
*/
|
|
26
|
+
export declare function findComponentTemplate(decorator: Decorator): TemplateInfo | null;
|
|
27
|
+
export type ButtonIssue = 'NotInHeading' | 'HasSiblings' | 'NoIssue';
|
|
28
|
+
export interface ButtonAnalysis {
|
|
29
|
+
issue: ButtonIssue;
|
|
30
|
+
button: HTMLElement;
|
|
31
|
+
buttonText: string;
|
|
32
|
+
parent: HTMLElement | null;
|
|
33
|
+
line: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function analyzeButton(button: HTMLElement): ButtonAnalysis;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldProcessFile = shouldProcessFile;
|
|
4
|
+
exports.hasAccordionTriggers = hasAccordionTriggers;
|
|
5
|
+
exports.extractInlineTemplate = extractInlineTemplate;
|
|
6
|
+
exports.findComponentTemplate = findComponentTemplate;
|
|
7
|
+
exports.analyzeButton = analyzeButton;
|
|
8
|
+
const ts_morph_1 = require("ts-morph");
|
|
9
|
+
const html_utils_1 = require("./html-utils");
|
|
10
|
+
function shouldProcessFile(file) {
|
|
11
|
+
return file.endsWith('.ts') || file.endsWith('.html');
|
|
12
|
+
}
|
|
13
|
+
function hasAccordionTriggers(content) {
|
|
14
|
+
return content.includes('brnAccordionTrigger') || content.includes('hlmAccordionTrigger');
|
|
15
|
+
}
|
|
16
|
+
function extractInlineTemplate(sourceFile) {
|
|
17
|
+
// Find all @Something decorators in the file
|
|
18
|
+
// (like @Component, @Directive, etc.)
|
|
19
|
+
const decorators = sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.Decorator);
|
|
20
|
+
for (const decorator of decorators) {
|
|
21
|
+
const template = findComponentTemplate(decorator);
|
|
22
|
+
if (template)
|
|
23
|
+
return template;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Checks if a decorator is @Component and extracts its template
|
|
29
|
+
*
|
|
30
|
+
* The AST (Abstract Syntax Tree) structure looks like this:
|
|
31
|
+
*
|
|
32
|
+
* Decorator (@Component)
|
|
33
|
+
* └── CallExpression (Component(...))
|
|
34
|
+
* └── ObjectLiteralExpression ({...})
|
|
35
|
+
* └── PropertyAssignment (template: '...')
|
|
36
|
+
* ├── Identifier (the word "template")
|
|
37
|
+
* └── StringLiteral (the actual template string)
|
|
38
|
+
*
|
|
39
|
+
* We need to navigate down this tree to find the template!
|
|
40
|
+
*/
|
|
41
|
+
function findComponentTemplate(decorator) {
|
|
42
|
+
// Step 1: Get the function call part of @Component(...)
|
|
43
|
+
// We want the Component(...) part
|
|
44
|
+
const callExpression = decorator.getCallExpression();
|
|
45
|
+
// Make sure this is @Component, not @Injectable or something else
|
|
46
|
+
if (callExpression?.getExpression().getText() !== 'Component') {
|
|
47
|
+
return null; // Not a component decorator, skip it
|
|
48
|
+
}
|
|
49
|
+
// Step 2: Get the arguments passed to Component(...)
|
|
50
|
+
// Usually it's Component({ template: '...', selector: '...' })
|
|
51
|
+
const args = callExpression.getArguments();
|
|
52
|
+
// Make sure there's an object literal as first argument
|
|
53
|
+
if (args.length === 0 || args[0].getKind() !== ts_morph_1.SyntaxKind.ObjectLiteralExpression) {
|
|
54
|
+
return null; // Component() with no args or weird args, skip
|
|
55
|
+
}
|
|
56
|
+
// Step 3: Get the object literal { template: '...', ... }
|
|
57
|
+
const objLiteral = args[0].asKindOrThrow(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
58
|
+
// Step 4: Find the "template" property in the object
|
|
59
|
+
// We're looking for: template: '...' or template: `...`
|
|
60
|
+
const templateProp = objLiteral.getProperty('template');
|
|
61
|
+
// Make sure we found a template property and it's an assignment
|
|
62
|
+
if (!templateProp || templateProp.getKind() !== ts_morph_1.SyntaxKind.PropertyAssignment) {
|
|
63
|
+
return null; // No template property, must use templateUrl or external file
|
|
64
|
+
}
|
|
65
|
+
// Step 5: Cast to PropertyAssignment so TypeScript knows what we have
|
|
66
|
+
// PropertyAssignment means something like: key: value
|
|
67
|
+
const propAssignment = templateProp.asKindOrThrow(ts_morph_1.SyntaxKind.PropertyAssignment);
|
|
68
|
+
// Step 6: Get the value part of template: VALUE
|
|
69
|
+
// This is the actual template string
|
|
70
|
+
const initializer = propAssignment.getInitializer();
|
|
71
|
+
if (!initializer)
|
|
72
|
+
return null; // Shouldn't happen but be safe
|
|
73
|
+
// Step 7: Get the full text including quotes
|
|
74
|
+
// Could be: `<div>...</div>` or "<div>...</div>" or '<div>...</div>'
|
|
75
|
+
const fullText = initializer.getText();
|
|
76
|
+
// Step 8: Check what kind of string it is
|
|
77
|
+
const isStringLiteral = initializer.getKind() === ts_morph_1.SyntaxKind.StringLiteral; // "..." or '...'
|
|
78
|
+
const isTemplateLiteral = initializer.getKind() === ts_morph_1.SyntaxKind.NoSubstitutionTemplateLiteral; // `...`
|
|
79
|
+
if (!isStringLiteral && !isTemplateLiteral) {
|
|
80
|
+
return null; // template is something weird like a variable or function call
|
|
81
|
+
}
|
|
82
|
+
// Step 9: Figure out what quotes were used (we want to preserve them)
|
|
83
|
+
const quoteStyle = fullText[0]; // First character is the quote
|
|
84
|
+
// Step 10: Return all the info we gathered!
|
|
85
|
+
return {
|
|
86
|
+
text: fullText.slice(1, -1), // Remove first and last character (the quotes)
|
|
87
|
+
startLine: initializer.getStartLineNumber(), // For error messages
|
|
88
|
+
propertyAssignment: propAssignment, // Save this so we can modify it later!
|
|
89
|
+
originalQuoteStyle: quoteStyle, // Remember if it was ` or " or '
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function analyzeButton(button) {
|
|
93
|
+
const buttonText = (0, html_utils_1.getButtonText)(button);
|
|
94
|
+
const parent = button.parentNode;
|
|
95
|
+
// Check what's wrong (if anything)
|
|
96
|
+
let issue = 'NoIssue';
|
|
97
|
+
if (!(0, html_utils_1.isInHeading)(button)) {
|
|
98
|
+
issue = 'NotInHeading';
|
|
99
|
+
}
|
|
100
|
+
else if ((0, html_utils_1.hasSignificantSiblings)(button)) {
|
|
101
|
+
issue = 'HasSiblings';
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
issue,
|
|
105
|
+
button,
|
|
106
|
+
buttonText,
|
|
107
|
+
parent,
|
|
108
|
+
line: button.range?.[0] || 0,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=shared-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-utils.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/migrate-brain-accordion-trigger/utils/shared-utils.ts"],"names":[],"mappings":";;AAGA,8CAEC;AAED,oDAEC;AASD,sDAWC;AAgBD,sDA+DC;AAYD,sCAoBC;AA5ID,uCAAiF;AACjF,6CAA+F;AAE/F,SAAgB,iBAAiB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACvD,CAAC;AAED,SAAgB,oBAAoB,CAAC,OAAe;IACnD,OAAO,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAC3F,CAAC;AASD,SAAgB,qBAAqB,CAAC,UAAsB;IAC3D,6CAA6C;IAC7C,sCAAsC;IACtC,MAAM,UAAU,GAAG,UAAU,CAAC,oBAAoB,CAAC,qBAAU,CAAC,SAAS,CAAC,CAAC;IAEzE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;IAC/B,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,SAAoB;IACzD,wDAAwD;IACxD,0CAA0C;IAC1C,MAAM,cAAc,GAAG,SAAS,CAAC,iBAAiB,EAAE,CAAC;IAErD,kEAAkE;IAClE,IAAI,cAAc,EAAE,aAAa,EAAE,CAAC,OAAO,EAAE,KAAK,WAAW,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC,CAAC,qCAAqC;IACnD,CAAC;IAED,qDAAqD;IACrD,uEAAuE;IACvE,MAAM,IAAI,GAAG,cAAc,CAA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AC,+DAA+D;IAC7E,CAAC;IAED,sEAAsE;IACtE,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,+BAA+B;IAE/D,4CAA4C;IAC5C,OAAO;QACN,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,+CAA+C;QAC5E,SAAS,EAAE,WAAW,CAAC,kBAAkB,EAAE,EAAE,qBAAqB;QAClE,kBAAkB,EAAE,cAAc,EAAE,uCAAuC;QAC3E,kBAAkB,EAAE,UAAU,EAAE,iCAAiC;KACjE,CAAC;AACH,CAAC;AAYD,SAAgB,aAAa,CAAC,MAAmB;IAChD,MAAM,UAAU,GAAG,IAAA,0BAAa,EAAC,MAAM,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,CAAC,UAAyB,CAAC;IAEhD,mCAAmC;IACnC,IAAI,KAAK,GAAgB,SAAS,CAAC;IAEnC,IAAI,CAAC,IAAA,wBAAW,EAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,KAAK,GAAG,cAAc,CAAC;IACxB,CAAC;SAAM,IAAI,IAAA,mCAAsB,EAAC,MAAM,CAAC,EAAE,CAAC;QAC3C,KAAK,GAAG,aAAa,CAAC;IACvB,CAAC;IAED,OAAO;QACN,KAAK;QACL,MAAM;QACN,UAAU;QACV,MAAM;QACN,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAC5B,CAAC;AACH,CAAC"}
|
package/src/generators/ui/libs/ui-accordion-helm/files/lib/hlm-accordion-content.ts.template
CHANGED
|
@@ -6,7 +6,7 @@ import type { ClassValue } from 'clsx';
|
|
|
6
6
|
@Component({
|
|
7
7
|
selector: 'hlm-accordion-content',
|
|
8
8
|
template: `
|
|
9
|
-
<div [attr.inert]="_addInert()" style="
|
|
9
|
+
<div [attr.inert]="_addInert()" [style]="contentStyle()">
|
|
10
10
|
<div class="flex flex-col gap-4 text-balance pb-4 pt-0">
|
|
11
11
|
<ng-content />
|
|
12
12
|
</div>
|
|
@@ -20,6 +20,8 @@ import type { ClassValue } from 'clsx';
|
|
|
20
20
|
})
|
|
21
21
|
export class HlmAccordionContent extends BrnAccordionContent {
|
|
22
22
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
23
|
+
public readonly contentStyle = input<string>('overflow: hidden');
|
|
24
|
+
|
|
23
25
|
protected readonly _computedClass = computed(() => {
|
|
24
26
|
const gridRows = this.state() === 'open' ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]';
|
|
25
27
|
return hlm('grid text-sm transition-all', gridRows, this.userClass());
|
|
@@ -87,6 +87,9 @@ export class HlmCheckbox implements ControlValueAccessor {
|
|
|
87
87
|
/** The checked state of the checkbox. */
|
|
88
88
|
public readonly checked = model<CheckboxValue>(false);
|
|
89
89
|
|
|
90
|
+
/** Emits when checked state changes. */
|
|
91
|
+
public readonly checkedChange = output<CheckboxValue>();
|
|
92
|
+
|
|
90
93
|
/** The name attribute of the checkbox. */
|
|
91
94
|
public readonly name = input<string | null>(null);
|
|
92
95
|
|
|
@@ -112,6 +115,7 @@ export class HlmCheckbox implements ControlValueAccessor {
|
|
|
112
115
|
this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);
|
|
113
116
|
this._onChange?.(!previousChecked);
|
|
114
117
|
this.changed.emit(!previousChecked);
|
|
118
|
+
this.checkedChange.emit(!previousChecked);
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
/** CONTROL VALUE ACCESSOR */
|
|
@@ -62,6 +62,9 @@ export class HlmSwitch implements ControlValueAccessor {
|
|
|
62
62
|
/** The checked state of the switch. */
|
|
63
63
|
public readonly checked = model<boolean>(false);
|
|
64
64
|
|
|
65
|
+
/** Emits when the checked state of the switch changes. */
|
|
66
|
+
public readonly checkedChange = output<boolean>();
|
|
67
|
+
|
|
65
68
|
/** The disabled state of the switch. */
|
|
66
69
|
public readonly disabled = input<boolean, BooleanInput>(false, {
|
|
67
70
|
transform: booleanAttribute,
|
|
@@ -91,6 +94,7 @@ export class HlmSwitch implements ControlValueAccessor {
|
|
|
91
94
|
this.checked.set(value);
|
|
92
95
|
this._onChange?.(value);
|
|
93
96
|
this.changed.emit(value);
|
|
97
|
+
this.checkedChange.emit(value);
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
/** CONROL VALUE ACCESSOR */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"internalName": "ui-accordion-helm",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=19.0.0",
|
|
6
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
6
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
7
7
|
"clsx": "^2.1.1",
|
|
8
8
|
"@ng-icons/core": ">=29.0.0",
|
|
9
9
|
"@ng-icons/lucide": ">=29.0.0"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"internalName": "ui-alert-dialog-helm",
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@angular/core": ">=19.0.0",
|
|
24
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
24
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
25
25
|
"clsx": "^2.1.1"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@angular/core": ">=19.0.0",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
41
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
42
42
|
"@angular/cdk": ">=19.0.0",
|
|
43
43
|
"@angular/common": ">=19.0.0",
|
|
44
44
|
"@angular/forms": ">=19.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"internalName": "ui-avatar-helm",
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@angular/core": ">=19.0.0",
|
|
53
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
53
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"internalName": "ui-button-helm",
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@angular/core": ">=19.0.0",
|
|
79
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
79
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
80
80
|
"class-variance-authority": "^0.7.0",
|
|
81
81
|
"clsx": "^2.1.1"
|
|
82
82
|
}
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@angular/cdk": ">=19.0.0",
|
|
89
89
|
"@ng-icons/core": ">=29.0.0",
|
|
90
90
|
"@ng-icons/lucide": ">=29.0.0",
|
|
91
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
91
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
92
92
|
"clsx": "^2.1.1"
|
|
93
93
|
}
|
|
94
94
|
},
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@angular/forms": ">=19.0.0",
|
|
119
119
|
"@ng-icons/core": ">=29.0.0",
|
|
120
120
|
"@ng-icons/lucide": ">=29.0.0",
|
|
121
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
121
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
122
122
|
"clsx": "^2.1.1"
|
|
123
123
|
}
|
|
124
124
|
},
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"internalName": "ui-command-helm",
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"@angular/core": ">=19.0.0",
|
|
129
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
129
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
130
130
|
"clsx": "^2.1.1"
|
|
131
131
|
}
|
|
132
132
|
},
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@angular/forms": ">=19.0.0",
|
|
139
139
|
"@ng-icons/core": ">=29.0.0",
|
|
140
140
|
"@ng-icons/lucide": ">=29.0.0",
|
|
141
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
141
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
142
142
|
"clsx": "^2.1.1"
|
|
143
143
|
}
|
|
144
144
|
},
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@angular/common": ">=19.0.0",
|
|
151
151
|
"@ng-icons/core": ">=29.0.0",
|
|
152
152
|
"@ng-icons/lucide": ">=29.0.0",
|
|
153
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
153
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
154
154
|
"@angular/cdk": ">=19.0.0"
|
|
155
155
|
}
|
|
156
156
|
},
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"@angular/core": ">=19.0.0",
|
|
161
161
|
"@angular/forms": ">=19.0.0",
|
|
162
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
162
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
163
163
|
"clsx": "^2.1.1"
|
|
164
164
|
}
|
|
165
165
|
},
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"internalName": "ui-hover-card-helm",
|
|
168
168
|
"peerDependencies": {
|
|
169
169
|
"@angular/core": ">=19.0.0",
|
|
170
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
170
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
171
171
|
"clsx": "^2.1.1"
|
|
172
172
|
}
|
|
173
173
|
},
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"class-variance-authority": "^0.7.0",
|
|
187
187
|
"clsx": "^2.1.1",
|
|
188
188
|
"@angular/forms": ">=19.0.0",
|
|
189
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
189
|
+
"@spartan-ng/brain": "0.0.1-alpha.513"
|
|
190
190
|
}
|
|
191
191
|
},
|
|
192
192
|
"input-otp": {
|
|
@@ -197,14 +197,14 @@
|
|
|
197
197
|
"@ng-icons/core": ">=29.0.0",
|
|
198
198
|
"@ng-icons/lucide": ">=29.0.0",
|
|
199
199
|
"@angular/cdk": ">=19.0.0",
|
|
200
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
200
|
+
"@spartan-ng/brain": "0.0.1-alpha.513"
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
"label": {
|
|
204
204
|
"internalName": "ui-label-helm",
|
|
205
205
|
"peerDependencies": {
|
|
206
206
|
"@angular/core": ">=19.0.0",
|
|
207
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
207
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
208
208
|
"clsx": "^2.1.1"
|
|
209
209
|
}
|
|
210
210
|
},
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"internalName": "ui-menu-helm",
|
|
213
213
|
"peerDependencies": {
|
|
214
214
|
"@angular/core": ">=19.0.0",
|
|
215
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
215
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
216
216
|
"clsx": "^2.1.1",
|
|
217
217
|
"@ng-icons/core": ">=29.0.0",
|
|
218
218
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"@angular/core": ">=19.0.0",
|
|
227
227
|
"@angular/cdk": ">=19.0.0",
|
|
228
228
|
"@angular/forms": ">=19.0.0",
|
|
229
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
229
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
230
230
|
"class-variance-authority": "^0.7.0",
|
|
231
231
|
"clsx": "^2.1.1",
|
|
232
232
|
"@ng-icons/core": ">=29.0.0",
|
|
@@ -239,14 +239,14 @@
|
|
|
239
239
|
"peerDependencies": {
|
|
240
240
|
"@angular/core": ">=19.0.0",
|
|
241
241
|
"clsx": "^2.1.1",
|
|
242
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
242
|
+
"@spartan-ng/brain": "0.0.1-alpha.513"
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
"progress": {
|
|
246
246
|
"internalName": "ui-progress-helm",
|
|
247
247
|
"peerDependencies": {
|
|
248
248
|
"@angular/core": ">=19.0.0",
|
|
249
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
249
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
250
250
|
"clsx": "^2.1.1"
|
|
251
251
|
}
|
|
252
252
|
},
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"internalName": "ui-radio-group-helm",
|
|
255
255
|
"peerDependencies": {
|
|
256
256
|
"@angular/core": ">=19.0.0",
|
|
257
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
257
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
258
258
|
"clsx": "^2.1.1",
|
|
259
259
|
"@angular/common": ">=19.0.0"
|
|
260
260
|
}
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"peerDependencies": {
|
|
272
272
|
"@angular/core": ">=19.0.0",
|
|
273
273
|
"@angular/cdk": ">=19.0.0",
|
|
274
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
274
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
275
275
|
"clsx": "^2.1.1",
|
|
276
276
|
"@ng-icons/core": ">=29.0.0",
|
|
277
277
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
"internalName": "ui-separator-helm",
|
|
283
283
|
"peerDependencies": {
|
|
284
284
|
"@angular/core": ">=19.0.0",
|
|
285
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
285
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
286
286
|
"clsx": "^2.1.1"
|
|
287
287
|
}
|
|
288
288
|
},
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"clsx": "^2.1.1",
|
|
294
294
|
"@ng-icons/core": ">=29.0.0",
|
|
295
295
|
"@ng-icons/lucide": ">=29.0.0",
|
|
296
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
296
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
297
297
|
"class-variance-authority": "^0.7.0"
|
|
298
298
|
}
|
|
299
299
|
},
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
"internalName": "ui-slider-helm",
|
|
309
309
|
"peerDependencies": {
|
|
310
310
|
"@angular/core": ">=19.0.0",
|
|
311
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
311
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
312
312
|
"clsx": "^2.1.1"
|
|
313
313
|
}
|
|
314
314
|
},
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
"clsx": "^2.1.1",
|
|
335
335
|
"@angular/cdk": ">=19.0.0",
|
|
336
336
|
"@angular/forms": ">=19.0.0",
|
|
337
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
337
|
+
"@spartan-ng/brain": "0.0.1-alpha.513"
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
340
|
"table": {
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"internalName": "ui-tabs-helm",
|
|
349
349
|
"peerDependencies": {
|
|
350
350
|
"@angular/core": ">=19.0.0",
|
|
351
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
351
|
+
"@spartan-ng/brain": "0.0.1-alpha.513",
|
|
352
352
|
"clsx": "^2.1.1",
|
|
353
353
|
"class-variance-authority": "^0.7.0",
|
|
354
354
|
"@angular/cdk": ">=19.0.0",
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
"internalName": "ui-tooltip-helm",
|
|
378
378
|
"peerDependencies": {
|
|
379
379
|
"@angular/core": ">=19.0.0",
|
|
380
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
380
|
+
"@spartan-ng/brain": "0.0.1-alpha.513"
|
|
381
381
|
}
|
|
382
382
|
},
|
|
383
383
|
"typography": {
|