@ui5/webcomponents-tools 0.0.0-50304f58c → 0.0.0-51202adee
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/CHANGELOG.md +284 -0
- package/README.md +5 -6
- package/assets-meta.js +16 -1
- package/bin/dev.js +1 -5
- package/components-package/eslint.js +28 -0
- package/components-package/nps.js +89 -47
- package/components-package/postcss.themes.js +6 -3
- package/components-package/vite.config.js +12 -0
- package/components-package/wdio.js +80 -31
- package/components-package/wdio.sync.js +360 -0
- package/icons-collection/nps.js +47 -8
- package/lib/copy-and-watch/index.js +30 -5
- package/lib/copy-list/index.js +28 -0
- package/lib/create-icons/index.js +101 -52
- package/lib/create-illustrations/index.js +161 -0
- package/lib/create-new-component/index.js +17 -9
- package/lib/dev-server/dev-server.js +66 -0
- package/lib/dev-server/virtual-index-html-plugin.js +53 -0
- package/lib/esm-abs-to-rel/index.js +58 -0
- package/lib/generate-custom-elements-manifest/index.js +373 -0
- package/lib/generate-js-imports/illustrations.js +72 -0
- package/lib/generate-json-imports/i18n.js +75 -30
- package/lib/generate-json-imports/themes.js +62 -24
- package/lib/hbs2lit/src/compiler.js +20 -3
- package/lib/hbs2lit/src/includesReplacer.js +5 -5
- package/lib/hbs2lit/src/litVisitor2.js +77 -14
- package/lib/hbs2lit/src/svgProcessor.js +3 -3
- package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +4 -11
- package/lib/hbs2ui5/index.js +37 -21
- package/lib/i18n/defaults.js +58 -57
- package/lib/i18n/toJSON.js +13 -12
- package/lib/jsdoc/configTypescript.json +29 -0
- package/lib/jsdoc/plugin.js +62 -1
- package/lib/jsdoc/preprocess.js +146 -0
- package/lib/jsdoc/template/publish.js +30 -2
- package/lib/postcss-combine-duplicated-selectors/index.js +178 -0
- package/lib/postcss-css-to-esm/index.js +33 -18
- package/lib/postcss-css-to-json/index.js +31 -11
- package/lib/postcss-new-files/index.js +36 -0
- package/lib/postcss-p/postcss-p.mjs +14 -0
- package/lib/replace-global-core/index.js +25 -0
- package/lib/scoping/get-all-tags.js +1 -8
- package/lib/scoping/lint-src.js +1 -1
- package/lib/scoping/missing-dependencies.js +65 -0
- package/lib/scoping/report-tags-usage.js +28 -0
- package/lib/scoping/scope-test-pages.js +1 -1
- package/lib/test-runner/test-runner.js +63 -0
- package/package.json +44 -52
- package/bin/init-ui5-package.js +0 -3
- package/components-package/rollup.js +0 -147
- package/components-package/serve.json +0 -3
- package/lib/documentation/index.js +0 -143
- package/lib/documentation/templates/api-component-since.js +0 -3
- package/lib/documentation/templates/api-css-variables-section.js +0 -24
- package/lib/documentation/templates/api-events-section.js +0 -35
- package/lib/documentation/templates/api-methods-section.js +0 -26
- package/lib/documentation/templates/api-properties-section.js +0 -40
- package/lib/documentation/templates/api-slots-section.js +0 -28
- package/lib/documentation/templates/template.js +0 -38
- package/lib/init-package/index.js +0 -123
- package/lib/init-package/resources/.eslintignore +0 -3
- package/lib/init-package/resources/bundle.es5.js +0 -25
- package/lib/init-package/resources/bundle.esm.js +0 -34
- package/lib/init-package/resources/config/.eslintrc.js +0 -1
- package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
- package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
- package/lib/init-package/resources/config/rollup.config.js +0 -1
- package/lib/init-package/resources/config/wdio.conf.js +0 -1
- package/lib/init-package/resources/package-scripts.js +0 -11
- package/lib/init-package/resources/src/Assets.js +0 -5
- package/lib/init-package/resources/src/MyFirstComponent.hbs +0 -1
- package/lib/init-package/resources/src/MyFirstComponent.js +0 -56
- package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
- package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
- package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
- package/lib/init-package/resources/src/themes/MyFirstComponent.css +0 -11
- package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_hcb/parameters-bundle.css +0 -3
- package/lib/init-package/resources/src/themes/sap_fiori_3_hcw/parameters-bundle.css +0 -3
- package/lib/init-package/resources/test/pages/index.html +0 -56
- package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
- package/package-lock.json +0 -48
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,290 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [1.10.0](https://github.com/SAP/ui5-webcomponents/compare/v1.9.3...v1.10.0) (2023-01-20)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **infra:** set Content-Type header on testsuite ([#6108](https://github.com/SAP/ui5-webcomponents/issues/6108)) ([fae3f91](https://github.com/SAP/ui5-webcomponents/commit/fae3f91975ab1dad7135bea2227f61986eff403f))
|
12
|
+
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
* enable TS in main, fiori ([#6064](https://github.com/SAP/ui5-webcomponents/issues/6064)) ([0b56130](https://github.com/SAP/ui5-webcomponents/commit/0b561307b93b8af465dc5bee67650069ee138f7f))
|
17
|
+
* migrate illustrated-message component to TS, small refactor ([#6195](https://github.com/SAP/ui5-webcomponents/issues/6195)) ([046c779](https://github.com/SAP/ui5-webcomponents/commit/046c779f654648172619dd720c0d90342ec78fb9))
|
18
|
+
* support decorators for custom elements metadata ([#6072](https://github.com/SAP/ui5-webcomponents/issues/6072)) ([fc9ee6e](https://github.com/SAP/ui5-webcomponents/commit/fc9ee6e2af10b4315fde072a50ab37efa180c809))
|
19
|
+
* **ui5-button, ui5-date-picker, ui5-calendar:** migrate to TS ([#6173](https://github.com/SAP/ui5-webcomponents/issues/6173)) ([7232ca0](https://github.com/SAP/ui5-webcomponents/commit/7232ca08f286c5dde10080373fb62247f1acf7b7)), closes [#6080](https://github.com/SAP/ui5-webcomponents/issues/6080)
|
20
|
+
* use Typescript for the `base` package ([#5982](https://github.com/SAP/ui5-webcomponents/issues/5982)) ([bd184d8](https://github.com/SAP/ui5-webcomponents/commit/bd184d81a4218328bc7bf04baf2bc1f69a361679))
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
## [1.9.3](https://github.com/SAP/ui5-webcomponents/compare/v1.9.2...v1.9.3) (2022-12-16)
|
27
|
+
|
28
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
## [1.9.1](https://github.com/SAP/ui5-webcomponents/compare/v1.9.0...v1.9.1) (2022-11-10)
|
35
|
+
|
36
|
+
|
37
|
+
### Bug Fixes
|
38
|
+
|
39
|
+
* **framework:** fix paths for generating illustration imports in nps ([#5997](https://github.com/SAP/ui5-webcomponents/issues/5997)) ([e932f7d](https://github.com/SAP/ui5-webcomponents/commit/e932f7d069ebf10f73219bff7154558b7b0d849e))
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
# [1.9.0](https://github.com/SAP/ui5-webcomponents/compare/v1.8.0...v1.9.0) (2022-10-31)
|
46
|
+
|
47
|
+
|
48
|
+
### Bug Fixes
|
49
|
+
|
50
|
+
* **framework:** fix contexts management in hbs-2-lit compiler ([#5958](https://github.com/SAP/ui5-webcomponents/issues/5958)) ([94d1619](https://github.com/SAP/ui5-webcomponents/commit/94d16199ed7dc79b21d99a0637533e93af54c90a)), closes [#4701](https://github.com/SAP/ui5-webcomponents/issues/4701)
|
51
|
+
|
52
|
+
|
53
|
+
### Features
|
54
|
+
|
55
|
+
* **framework:** fetch illustrations on demand ([#5927](https://github.com/SAP/ui5-webcomponents/issues/5927)) ([f8e1033](https://github.com/SAP/ui5-webcomponents/commit/f8e1033643626261dcad8a38f65c325ba9aff99f))
|
56
|
+
* **framework:** generate custom elements manifest ([#5964](https://github.com/SAP/ui5-webcomponents/issues/5964)) ([0d62770](https://github.com/SAP/ui5-webcomponents/commit/0d62770cace54fd9aef73d9632dd06d8a83680e9))
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
# [1.8.0](https://github.com/SAP/ui5-webcomponents/compare/v1.7.1...v1.8.0) (2022-10-03)
|
63
|
+
|
64
|
+
|
65
|
+
### Features
|
66
|
+
|
67
|
+
* **icons:** create type-definitions for icon imports ([#5753](https://github.com/SAP/ui5-webcomponents/issues/5753)) ([2de4a04](https://github.com/SAP/ui5-webcomponents/commit/2de4a045f56e2f166d3e846ff11e6f9d76e98009)), closes [#5747](https://github.com/SAP/ui5-webcomponents/issues/5747) [#5335](https://github.com/SAP/ui5-webcomponents/issues/5335)
|
68
|
+
* **main:** add support for custom SVG icons ([#5865](https://github.com/SAP/ui5-webcomponents/issues/5865)) ([d8b7200](https://github.com/SAP/ui5-webcomponents/commit/d8b7200f30c16d94b7f15ddbdf9808d8efbaa38c))
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
## [1.7.1](https://github.com/SAP/ui5-webcomponents/compare/v1.7.0...v1.7.1) (2022-09-08)
|
75
|
+
|
76
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
# [1.7.0](https://github.com/SAP/ui5-webcomponents/compare/v1.6.0...v1.7.0) (2022-09-02)
|
83
|
+
|
84
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
# [1.6.0](https://github.com/SAP/ui5-webcomponents/compare/v1.5.0...v1.6.0) (2022-07-25)
|
91
|
+
|
92
|
+
|
93
|
+
### Bug Fixes
|
94
|
+
|
95
|
+
* **MultoComboBox:** fix component scoping ([#5553](https://github.com/SAP/ui5-webcomponents/issues/5553)) ([9c26e8e](https://github.com/SAP/ui5-webcomponents/commit/9c26e8e)), closes [#5521](https://github.com/SAP/ui5-webcomponents/issues/5521)
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
# [1.5.0](https://github.com/SAP/ui5-webcomponents/compare/v1.4.0...v1.5.0) (2022-07-03)
|
102
|
+
|
103
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
# [1.4.0](https://github.com/SAP/ui5-webcomponents/compare/v1.3.1...v1.4.0) (2022-05-25)
|
110
|
+
|
111
|
+
|
112
|
+
### Features
|
113
|
+
|
114
|
+
**Note:** Version bump only for package @ui5/webcomponents-icons-tnt
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
## [1.3.1](https://github.com/SAP/ui5-webcomponents/compare/v1.3.0...v1.3.1) (2022-04-27)
|
121
|
+
|
122
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
# [1.3.0](https://github.com/SAP/ui5-webcomponents/compare/v1.2.4...v1.3.0) (2022-04-19)
|
129
|
+
|
130
|
+
|
131
|
+
### Bug Fixes
|
132
|
+
|
133
|
+
* **localization:** fix js error if "sh" locale set ([#4905](https://github.com/SAP/ui5-webcomponents/issues/4905)) ([979bca2](https://github.com/SAP/ui5-webcomponents/commit/979bca2)), closes [#4904](https://github.com/SAP/ui5-webcomponents/issues/4904)
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
## [1.2.4](https://github.com/SAP/ui5-webcomponents/compare/v1.2.3...v1.2.4) (2022-03-30)
|
140
|
+
|
141
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
## [1.2.3](https://github.com/SAP/ui5-webcomponents/compare/v1.2.2...v1.2.3) (2022-03-23)
|
148
|
+
|
149
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
## [1.2.2](https://github.com/SAP/ui5-webcomponents/compare/v1.2.1...v1.2.2) (2022-03-22)
|
156
|
+
|
157
|
+
|
158
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
## [1.2.1](https://github.com/SAP/ui5-webcomponents/compare/v1.2.0...v1.2.1) (2022-03-02)
|
165
|
+
|
166
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
# [1.2.0](https://github.com/SAP/ui5-webcomponents/compare/v1.1.2...v1.2.0) (2022-02-28)
|
173
|
+
|
174
|
+
|
175
|
+
### Bug Fixes
|
176
|
+
|
177
|
+
* correct scoping issues with several components ([#4820](https://github.com/SAP/ui5-webcomponents/issues/4820)) ([621dc20](https://github.com/SAP/ui5-webcomponents/commit/621dc20))
|
178
|
+
* display methods in child components API ([#4792](https://github.com/SAP/ui5-webcomponents/issues/4792)) ([1929d08](https://github.com/SAP/ui5-webcomponents/commit/1929d08))
|
179
|
+
|
180
|
+
|
181
|
+
### Features
|
182
|
+
|
183
|
+
* **jsdoc:** remove attr name for Object props ([#4680](https://github.com/SAP/ui5-webcomponents/issues/4680)) ([1741bd6](https://github.com/SAP/ui5-webcomponents/commit/1741bd6)), closes [#4674](https://github.com/SAP/ui5-webcomponents/issues/4674)
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
## [1.1.2](https://github.com/SAP/ui5-webcomponents/compare/v1.1.1...v1.1.2) (2022-01-26)
|
190
|
+
|
191
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
## [1.1.1](https://github.com/SAP/ui5-webcomponents/compare/v1.1.0...v1.1.1) (2022-01-24)
|
198
|
+
|
199
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
# [1.1.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.2...v1.1.0) (2022-01-21)
|
206
|
+
|
207
|
+
|
208
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
## [1.0.2](https://github.com/SAP/ui5-webcomponents/compare/v1.0.1...v1.0.2) (2021-11-29)
|
215
|
+
|
216
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
## [1.0.1](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0...v1.0.1) (2021-11-10)
|
223
|
+
|
224
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
# [1.0.0](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.16...v1.0.0) (2021-11-10)
|
231
|
+
|
232
|
+
|
233
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
234
|
+
|
235
|
+
|
236
|
+
# [1.0.0-rc.16](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.15...v1.0.0-rc.16) (2021-11-09)
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
### Features
|
241
|
+
|
242
|
+
* **tools:** create an npm init script ([#4090](https://github.com/SAP/ui5-webcomponents/issues/4090)) ([5608e04](https://github.com/SAP/ui5-webcomponents/commit/5608e04))
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
# [1.0.0-rc.15](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.14...v1.0.0-rc.15) (2021-07-23)
|
247
|
+
|
248
|
+
|
249
|
+
### Bug Fixes
|
250
|
+
|
251
|
+
* **tools:** fix build error on MacOS 11 from rollup-plugin-terser ([#3347](https://github.com/SAP/ui5-webcomponents/issues/3347)) ([59892c4](https://github.com/SAP/ui5-webcomponents/commit/59892c4)), closes [#2515](https://github.com/SAP/ui5-webcomponents/issues/2515)
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
# [1.0.0-rc.14](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.13...v1.0.0-rc.14) (2021-04-01)
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
# [1.0.0-rc.13](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.12...v1.0.0-rc.13) (2021-03-26)
|
264
|
+
|
265
|
+
|
266
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
# [1.0.0-rc.12](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.11...v1.0.0-rc.12) (2021-02-18)
|
273
|
+
|
274
|
+
**Note:** Version bump only for package @ui5/webcomponents-tools
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
# [1.0.0-rc.11](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.10...v1.0.0-rc.11) (2020-12-21)
|
280
|
+
|
281
|
+
|
282
|
+
### Bug Fixes
|
283
|
+
|
284
|
+
* build error on MacOS 11 from rollup-plugin-terser ([#2515](https://github.com/SAP/ui5-webcomponents/issues/2515)) ([0629fac](https://github.com/SAP/ui5-webcomponents/commit/0629fac))
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
6
290
|
# [1.0.0-rc.10](https://github.com/SAP/ui5-webcomponents/compare/v1.0.0-rc.9...v1.0.0-rc.10) (2020-11-12)
|
7
291
|
|
8
292
|
|
package/README.md
CHANGED
@@ -1,24 +1,23 @@
|
|
1
|
-

|
2
2
|
|
3
3
|
# UI5 Web Components - Tools
|
4
4
|
|
5
|
-
[](https://travis-ci.org/SAP/ui5-webcomponents)
|
6
5
|
[](https://www.npmjs.com/package/@ui5/webcomponents)
|
7
6
|
|
8
7
|
Provides libraries, configuration files and build artifacts,
|
9
8
|
used by other UI5 Web Components packages, such as `main` and `fiori`.
|
10
9
|
|
11
10
|
## Resources
|
12
|
-
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/
|
11
|
+
- [UI5 Web Components - README.md](https://github.com/SAP/ui5-webcomponents/blob/main/README.md)
|
13
12
|
- [UI5 Web Components - Home Page](https://sap.github.io/ui5-webcomponents)
|
14
13
|
- [UI5 Web Components - Playground and API Reference](https://sap.github.io/ui5-webcomponents/playground/)
|
15
14
|
|
16
15
|
## Support
|
17
|
-
We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/
|
16
|
+
We welcome all comments, suggestions, questions, and bug reports. Please follow our [Support Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/SUPPORT.md#-content) on how to report an issue, or chat with us in the `#webcomponents` channel of the [OpenUI5 Community Slack](https://join-ui5-slack.herokuapp.com/).
|
18
17
|
|
19
18
|
## Contribute
|
20
|
-
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/
|
19
|
+
Please check our [Contribution Guidelines](https://github.com/SAP/ui5-webcomponents/blob/main/docs/6-contributing/02-conventions-and-guidelines.md).
|
21
20
|
|
22
21
|
## License
|
23
22
|
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
|
24
|
-
This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/
|
23
|
+
This file is licensed under the Apache Software License, Version 2.0 except as noted otherwise in the [LICENSE](https://github.com/SAP/ui5-webcomponents/blob/main/LICENSE.txt) file.
|
package/assets-meta.js
CHANGED
@@ -8,7 +8,12 @@ const assetsMeta = {
|
|
8
8
|
"sap_belize_hcb",
|
9
9
|
"sap_belize_hcw",
|
10
10
|
"sap_fiori_3_hcb",
|
11
|
-
"sap_fiori_3_hcw"
|
11
|
+
"sap_fiori_3_hcw",
|
12
|
+
"sap_horizon",
|
13
|
+
"sap_horizon_dark",
|
14
|
+
"sap_horizon_hcb",
|
15
|
+
"sap_horizon_hcw",
|
16
|
+
"sap_horizon_exp"
|
12
17
|
]
|
13
18
|
},
|
14
19
|
"languages": {
|
@@ -18,17 +23,25 @@ const assetsMeta = {
|
|
18
23
|
"bg",
|
19
24
|
"ca",
|
20
25
|
"cs",
|
26
|
+
"cy",
|
21
27
|
"da",
|
22
28
|
"de",
|
23
29
|
"el",
|
24
30
|
"en",
|
31
|
+
"en_GB",
|
32
|
+
"en_US_sappsd",
|
33
|
+
"en_US_saprigi",
|
34
|
+
"en_US_saptrc",
|
25
35
|
"es",
|
36
|
+
"es_MX",
|
26
37
|
"et",
|
27
38
|
"fi",
|
28
39
|
"fr",
|
40
|
+
"fr_CA",
|
29
41
|
"hi",
|
30
42
|
"hr",
|
31
43
|
"hu",
|
44
|
+
"in",
|
32
45
|
"it",
|
33
46
|
"iw",
|
34
47
|
"ja",
|
@@ -40,6 +53,7 @@ const assetsMeta = {
|
|
40
53
|
"nl",
|
41
54
|
"no",
|
42
55
|
"pl",
|
56
|
+
"pt_PT",
|
43
57
|
"pt",
|
44
58
|
"ro",
|
45
59
|
"ru",
|
@@ -122,6 +136,7 @@ const assetsMeta = {
|
|
122
136
|
"sk",
|
123
137
|
"sl",
|
124
138
|
"sr",
|
139
|
+
"sr_Latn",
|
125
140
|
"sv",
|
126
141
|
"th",
|
127
142
|
"tr",
|
package/bin/dev.js
CHANGED
@@ -10,11 +10,7 @@ if (command === "watch") {
|
|
10
10
|
command = `watch.${argument}`;
|
11
11
|
}
|
12
12
|
} else if (command === "test") {
|
13
|
-
|
14
|
-
command = `test.run`;
|
15
|
-
} else if (argument) { // yarn test test/specs/Button.spec.js
|
16
|
-
command = `test.spec --spec ${argument}`;
|
17
|
-
}
|
13
|
+
command = `test ${process.argv.slice(3).join(" ")}`;
|
18
14
|
}
|
19
15
|
|
20
16
|
child_process.execSync(`npx nps "${command}"`, {stdio: 'inherit'});
|
@@ -5,6 +5,34 @@ module.exports = {
|
|
5
5
|
},
|
6
6
|
"root": true,
|
7
7
|
"extends": "airbnb-base",
|
8
|
+
overrides: [{
|
9
|
+
files: ["*.ts"],
|
10
|
+
parser: "@typescript-eslint/parser",
|
11
|
+
plugins: ["@typescript-eslint"],
|
12
|
+
extends: [
|
13
|
+
"plugin:@typescript-eslint/recommended",
|
14
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
15
|
+
],
|
16
|
+
parserOptions: {
|
17
|
+
"project": ["./tsconfig.json", "./packages/*/tsconfig.json"],
|
18
|
+
},
|
19
|
+
/**
|
20
|
+
* Typescript Rules
|
21
|
+
*/
|
22
|
+
rules: {
|
23
|
+
"no-shadow": "off",
|
24
|
+
"@typescript-eslint/no-shadow": ["error"],
|
25
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
26
|
+
"@typescript-eslint/no-floating-promises": "off",
|
27
|
+
"@typescript-eslint/no-explicit-any": "off",
|
28
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
29
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
30
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
31
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
32
|
+
"@typescript-eslint/no-empty-function": "off",
|
33
|
+
"lines-between-class-members": "off",
|
34
|
+
}
|
35
|
+
}],
|
8
36
|
"parserOptions": {
|
9
37
|
"ecmaVersion": 2018,
|
10
38
|
"sourceType": "module"
|
@@ -1,25 +1,63 @@
|
|
1
1
|
const path = require("path");
|
2
|
-
|
2
|
+
const fs = require("fs");
|
3
|
+
const resolve = require("resolve");
|
3
4
|
const LIB = path.join(__dirname, `../lib/`);
|
4
|
-
const
|
5
|
-
const polyfillDir = path.dirname(require.resolve("@webcomponents/webcomponentsjs"));
|
6
|
-
const polyfillPath = path.join(polyfillDir, "/**/*.*");
|
5
|
+
const preprocessJSDocScript = resolve.sync("@ui5/webcomponents-tools/lib/jsdoc/preprocess.js");
|
7
6
|
|
8
7
|
const getScripts = (options) => {
|
9
8
|
|
10
|
-
|
9
|
+
// The script creates all JS modules (dist/illustrations/{illustrationName}.js) out of the existing SVGs
|
10
|
+
const illustrationsData = options.illustrationsData || [];
|
11
|
+
illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath}`);
|
12
|
+
const createIllustrationsJSImportsScript = illustrations.join(" && ");
|
13
|
+
|
14
|
+
// The script creates the "dist/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
|
15
|
+
const illustrationDestinationPaths = illustrationsData.map(illustrations => illustrations.destinationPath);
|
16
|
+
const createIllustrationsLoadersScript = options.fioriPackage ? `node ${LIB}/generate-js-imports/illustrations.js ${illustrationDestinationPaths[0]} ${illustrationDestinationPaths[1]} dist/generated/js-imports` : "";
|
17
|
+
const tsCommand = options.typescript ? "tsc" : "";
|
18
|
+
const tsWatchCommand = options.typescript ? "tsc --watch" : "";
|
19
|
+
|
20
|
+
let viteConfig;
|
21
|
+
if (fs.existsSync("config/vite.config.js")) {
|
22
|
+
// old project setup where config file is in separate folder
|
23
|
+
viteConfig = "-c config/vite.config.js";
|
24
|
+
} else if (fs.existsSync("vite.config.js")) {
|
25
|
+
// preferred way of custom configuration in root project folder
|
26
|
+
viteConfig = "";
|
27
|
+
} else {
|
28
|
+
// no custom configuration - use default from tools project
|
29
|
+
viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-package/vite.config.js")}"`;
|
30
|
+
}
|
31
|
+
|
32
|
+
let eslintConfig;
|
33
|
+
if (fs.existsSync("config/.eslintrc.js")) {
|
34
|
+
// old project setup where config file is in separate folder
|
35
|
+
eslintConfig = "--config config/.eslintrc.js";
|
36
|
+
} else if (fs.existsSync(".eslintrc.js")) {
|
37
|
+
// preferred way of custom configuration in root project folder
|
38
|
+
eslintConfig = "";
|
39
|
+
} else {
|
40
|
+
// no custom configuration - use default from tools project
|
41
|
+
eslintConfig = `--config "${require.resolve("@ui5/webcomponents-tools/components-package/eslint.js")}"`;
|
42
|
+
}
|
11
43
|
|
12
44
|
const scripts = {
|
13
|
-
clean:
|
14
|
-
lint:
|
15
|
-
|
45
|
+
clean: 'rimraf jsdoc-dist && rimraf dist && rimraf .port && nps "scope.testPages.clean"',
|
46
|
+
lint: `eslint . ${eslintConfig}`,
|
47
|
+
lintfix: `eslint . ${eslintConfig}`,
|
48
|
+
prepare: {
|
49
|
+
default: "nps clean prepare.all generateAPI",
|
50
|
+
all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps copy" "nps typescript" "nps build.illustrations"',
|
51
|
+
styleRelated: "nps build.styles build.jsonImports build.jsImports",
|
52
|
+
},
|
53
|
+
typescript: tsCommand,
|
16
54
|
build: {
|
17
55
|
default: "nps lint prepare build.bundle",
|
18
56
|
templates: `mkdirp dist/generated/templates && node "${LIB}/hbs2ui5/index.js" -d src/ -o dist/generated/templates`,
|
19
57
|
styles: {
|
20
58
|
default: "nps build.styles.themes build.styles.components",
|
21
|
-
themes: "postcss
|
22
|
-
components: "postcss src/themes/*.css --config config/postcss.components --base src --dir dist/css/",
|
59
|
+
themes: `node "${LIB}/postcss-p/postcss-p.mjs"`,
|
60
|
+
components: "postcss src/themes/*.css --config config/postcss.components --base src --dir dist/css/", // When updating this, also update the new files script
|
23
61
|
},
|
24
62
|
i18n: {
|
25
63
|
default: "nps build.i18n.defaultsjs build.i18n.json",
|
@@ -31,59 +69,63 @@ const getScripts = (options) => {
|
|
31
69
|
themes: `node "${LIB}/generate-json-imports/themes.js" dist/generated/assets/themes dist/generated/json-imports`,
|
32
70
|
i18n: `node "${LIB}/generate-json-imports/i18n.js" dist/generated/assets/i18n dist/generated/json-imports`,
|
33
71
|
},
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
72
|
+
jsImports: {
|
73
|
+
default: "mkdirp dist/generated/js-imports && nps build.jsImports.illustrationsLoaders",
|
74
|
+
illustrationsLoaders: createIllustrationsLoadersScript,
|
75
|
+
},
|
76
|
+
bundle: `vite build ${viteConfig}`,
|
77
|
+
illustrations: createIllustrationsJSImportsScript,
|
40
78
|
},
|
41
79
|
copy: {
|
42
|
-
default: "nps copy.src copy.
|
43
|
-
src: `node "${LIB}/copy-and-watch/index.js" "src/**/*.js" dist/`,
|
44
|
-
|
45
|
-
"webcomponents-polyfill": `node "${LIB}/copy-and-watch/index.js" "${polyfillPath}" dist/webcomponentsjs/`,
|
80
|
+
default: "nps copy.src copy.props",
|
81
|
+
src: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.js" dist/`,
|
82
|
+
props: `node "${LIB}/copy-and-watch/index.js" --silent "src/**/*.properties" dist/`,
|
46
83
|
},
|
47
84
|
watch: {
|
48
|
-
default: 'concurrently "nps watch.templates" "nps watch.
|
85
|
+
default: 'concurrently "nps watch.templates" "nps watch.api" "nps watch.src" "nps watch.typescript" "nps watch.styles" "nps watch.i18n" "nps watch.props"',
|
86
|
+
devServer: 'concurrently "nps watch.default" "nps watch.bundle"',
|
49
87
|
src: 'nps "copy.src --watch --safe --skip-initial-copy"',
|
50
|
-
|
51
|
-
|
88
|
+
typescript: tsWatchCommand,
|
89
|
+
props: 'nps "copy.props --watch --safe --skip-initial-copy"',
|
90
|
+
bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`,
|
52
91
|
styles: {
|
53
92
|
default: 'concurrently "nps watch.styles.themes" "nps watch.styles.components"',
|
54
93
|
themes: 'nps "build.styles.themes -w"',
|
55
|
-
components:
|
94
|
+
components: {
|
95
|
+
default: 'concurrently "nps watch.styles.components.existingFiles" "nps watch.styles.components.newFiles"',
|
96
|
+
existingFiles: `nps "build.styles.components -w"`,
|
97
|
+
newFiles: `node "${LIB}/postcss-new-files/index.js" --srcFiles="src/themes/*.css"`,
|
98
|
+
},
|
56
99
|
},
|
57
|
-
templates:
|
58
|
-
|
59
|
-
|
60
|
-
dev: 'concurrently "nps serve" "nps watch"',
|
61
|
-
start: "nps prepare dev",
|
62
|
-
serve: {
|
63
|
-
default: "nps serve.prepare serve.run",
|
64
|
-
prepare: `node "${LIB}/copy-and-watch/index.js" "${serveConfig}" dist/`,
|
65
|
-
run: `serve --no-clipboard -l ${port} dist`,
|
66
|
-
},
|
67
|
-
test: {
|
68
|
-
// --success first - report the exit code of the test run (first command to finish), as serve is always terminated and has a non-0 exit code
|
69
|
-
default: 'concurrently "nps serve" "nps test.run" --kill-others --success first',
|
70
|
-
run: "cross-env WDIO_LOG_LEVEL=error FORCE_COLOR=0 wdio config/wdio.conf.js",
|
71
|
-
spec: "wdio run config/wdio.conf.js",
|
100
|
+
templates: 'chokidar "src/**/*.hbs" -c "nps build.templates"',
|
101
|
+
api: 'chokidar "test/**/*.sample.html" -c "nps generateAPI"',
|
102
|
+
i18n: 'chokidar "src/i18n/messagebundle.properties" -c "nps build.i18n.defaultsjs"'
|
72
103
|
},
|
73
|
-
|
104
|
+
start: "nps prepare watch.devServer",
|
105
|
+
test: `node "${LIB}/test-runner/test-runner.js"`,
|
106
|
+
"test-suite-1": `node "${LIB}/test-runner/test-runner.js" --suite suite1`,
|
107
|
+
"test-suite-2": `node "${LIB}/test-runner/test-runner.js" --suite suite2`,
|
108
|
+
startWithScope: "nps scope.prepare scope.watchWithBundle",
|
74
109
|
scope: {
|
75
110
|
prepare: "nps scope.lint prepare scope.testPages",
|
76
111
|
lint: `node "${LIB}/scoping/lint-src.js"`,
|
77
112
|
testPages: {
|
78
113
|
default: "nps scope.testPages.clean scope.testPages.copy scope.testPages.replace",
|
79
|
-
clean: "rimraf
|
80
|
-
copy: `node "${LIB}/copy-and-watch/index.js" "
|
81
|
-
replace: `node "${LIB}/scoping/scope-test-pages.js"
|
114
|
+
clean: "rimraf test/pages/scoped",
|
115
|
+
copy: `node "${LIB}/copy-and-watch/index.js" --silent "test/pages/**/*" test/pages/scoped`,
|
116
|
+
replace: `node "${LIB}/scoping/scope-test-pages.js" test/pages/scoped demo`,
|
82
117
|
},
|
83
|
-
|
84
|
-
watch: 'concurrently "nps watch.templates" "nps watch.
|
85
|
-
bundle:
|
86
|
-
}
|
118
|
+
watchWithBundle: 'concurrently "nps scope.watch" "nps scope.bundle" ',
|
119
|
+
watch: 'concurrently "nps watch.templates" "nps watch.api" "nps watch.src" "nps watch.props" "nps watch.styles"',
|
120
|
+
bundle: `node ${LIB}/dev-server/dev-server.js ${viteConfig}`,
|
121
|
+
},
|
122
|
+
generateAPI: {
|
123
|
+
default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
|
124
|
+
prepare: `node "${LIB}/copy-and-watch/index.js" --silent "dist/**/*.js" jsdoc-dist/`,
|
125
|
+
preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/ src`,
|
126
|
+
jsdoc: `jsdoc -c "${LIB}/jsdoc/configTypescript.json"`,
|
127
|
+
cleanup: "rimraf jsdoc-dist/"
|
128
|
+
},
|
87
129
|
};
|
88
130
|
|
89
131
|
return scripts;
|
@@ -1,8 +1,11 @@
|
|
1
1
|
const postcssImport = require('postcss-import');
|
2
|
-
const combineSelectors = require('postcss-combine-duplicated-selectors');
|
2
|
+
const combineSelectors = require('../lib/postcss-combine-duplicated-selectors/index.js');
|
3
3
|
const postcssCSStoJSON = require('../lib/postcss-css-to-json/index.js');
|
4
4
|
const postcssCSStoESM = require('../lib/postcss-css-to-esm/index.js');
|
5
5
|
const cssnano = require('cssnano');
|
6
|
+
const fs = require("fs");
|
7
|
+
|
8
|
+
const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
|
6
9
|
|
7
10
|
module.exports = {
|
8
11
|
plugins: [
|
@@ -17,7 +20,7 @@ module.exports = {
|
|
17
20
|
},
|
18
21
|
]
|
19
22
|
},),
|
20
|
-
postcssCSStoJSON({toReplace: 'src'}),
|
21
|
-
postcssCSStoESM({toReplace: 'src'}),
|
23
|
+
postcssCSStoJSON({toReplace: 'src', packageName}),
|
24
|
+
postcssCSStoESM({toReplace: 'src', packageName}),
|
22
25
|
]
|
23
26
|
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// vite.config.js
|
2
|
+
const { defineConfig } = require('vite');
|
3
|
+
const virtualIndex = require("../lib/dev-server/virtual-index-html-plugin.js");
|
4
|
+
|
5
|
+
module.exports = defineConfig(async () => {
|
6
|
+
return {
|
7
|
+
build: {
|
8
|
+
emptyOutDir: false,
|
9
|
+
},
|
10
|
+
plugins: [await virtualIndex()],
|
11
|
+
}
|
12
|
+
});
|