@ui5/create-webcomponents-package 0.0.0-d9b978d1d → 0.0.0-da0d3eb88

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 CHANGED
@@ -3,6 +3,464 @@
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
+ # [2.0.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2024-05-10)
7
+
8
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
9
+
10
+
11
+
12
+
13
+
14
+ # [2.0.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2024-04-18)
15
+
16
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
17
+
18
+
19
+
20
+
21
+
22
+ # [2.0.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2024-04-11)
23
+
24
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
25
+
26
+
27
+
28
+
29
+
30
+ # [2.0.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0...v2.0.0-rc.0) (2024-04-09)
31
+
32
+
33
+ ### chore
34
+
35
+ * bring release-2.0 to main ([#8651](https://github.com/SAP/ui5-webcomponents/issues/8651)) ([69271c9](https://github.com/SAP/ui5-webcomponents/commit/69271c9468c7dd54f90710fc4613ae0a79f85cef)), closes [#8494](https://github.com/SAP/ui5-webcomponents/issues/8494) [#8496](https://github.com/SAP/ui5-webcomponents/issues/8496) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8497](https://github.com/SAP/ui5-webcomponents/issues/8497) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8504](https://github.com/SAP/ui5-webcomponents/issues/8504) [#8509](https://github.com/SAP/ui5-webcomponents/issues/8509) [#8507](https://github.com/SAP/ui5-webcomponents/issues/8507) [#8511](https://github.com/SAP/ui5-webcomponents/issues/8511) [#8501](https://github.com/SAP/ui5-webcomponents/issues/8501) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8503](https://github.com/SAP/ui5-webcomponents/issues/8503) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8506](https://github.com/SAP/ui5-webcomponents/issues/8506) [#8502](https://github.com/SAP/ui5-webcomponents/issues/8502) [#8524](https://github.com/SAP/ui5-webcomponents/issues/8524) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8525](https://github.com/SAP/ui5-webcomponents/issues/8525) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8518](https://github.com/SAP/ui5-webcomponents/issues/8518) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8526](https://github.com/SAP/ui5-webcomponents/issues/8526) [#8529](https://github.com/SAP/ui5-webcomponents/issues/8529) [#8528](https://github.com/SAP/ui5-webcomponents/issues/8528) [#8531](https://github.com/SAP/ui5-webcomponents/issues/8531) [#8532](https://github.com/SAP/ui5-webcomponents/issues/8532) [#8534](https://github.com/SAP/ui5-webcomponents/issues/8534) [#8163](https://github.com/SAP/ui5-webcomponents/issues/8163) [#8527](https://github.com/SAP/ui5-webcomponents/issues/8527) [#8538](https://github.com/SAP/ui5-webcomponents/issues/8538) [#8521](https://github.com/SAP/ui5-webcomponents/issues/8521) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8542](https://github.com/SAP/ui5-webcomponents/issues/8542) [#8461](https://github.com/SAP/ui5-webcomponents/issues/8461) [#8548](https://github.com/SAP/ui5-webcomponents/issues/8548) [#8555](https://github.com/SAP/ui5-webcomponents/issues/8555) [#8559](https://github.com/SAP/ui5-webcomponents/issues/8559) [#8565](https://github.com/SAP/ui5-webcomponents/issues/8565) [#8570](https://github.com/SAP/ui5-webcomponents/issues/8570) [#8558](https://github.com/SAP/ui5-webcomponents/issues/8558) [#8568](https://github.com/SAP/ui5-webcomponents/issues/8568) [#8596](https://github.com/SAP/ui5-webcomponents/issues/8596) [#8192](https://github.com/SAP/ui5-webcomponents/issues/8192) [#8606](https://github.com/SAP/ui5-webcomponents/issues/8606) [#8605](https://github.com/SAP/ui5-webcomponents/issues/8605) [#8600](https://github.com/SAP/ui5-webcomponents/issues/8600) [#8602](https://github.com/SAP/ui5-webcomponents/issues/8602) [#8593](https://github.com/SAP/ui5-webcomponents/issues/8593)
36
+
37
+
38
+ ### BREAKING CHANGES
39
+
40
+ * "Device#isIE" method has been removed and no longer available
41
+
42
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
43
+ * Removed the `CSP.js` module and the creation of `<style>` and `<link>` tags, as all browsers now support adoptedStyleSheets. The following APIs are not available any more and should not be used:
44
+ ```ts
45
+ import { setUseLinks } from "@ui5/webcomponents-base/dist/CSP.js"
46
+ import { setPackageCSSRoot } from "@ui5/webcomponents-base/dist/CSP.js"
47
+ import { setPreloadLinks } from "@ui5/webcomponents-base/dist/CSP.js"
48
+ ```
49
+ * Removed the `ICardHeader` interface. If you previously used the interface
50
+ ```ts
51
+ import type { ICardHeader } from "@ui5/webcomponents-base/dist/Card.js"
52
+ ```
53
+ Use the CardHeader type instead:
54
+ ```ts
55
+ import type CardHeader from "@ui5/webcomponents-base/dist/CardHeader.js"
56
+ ```
57
+ * Removed the `IUploadCollectionItem` interface. If you previously used the interface:
58
+ ```js
59
+ import type { IUploadCollectionItem} from "@ui5/webcomponents-fiori/dist/UploadCollection.js"
60
+ ```
61
+ Use the `UploadCollectionItem` type instead:
62
+ ```js
63
+ import type UploadCollectionItem from "@ui5/webcomponents-fiori/dist/UploadCollectionItem.js"
64
+ ```
65
+
66
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
67
+ * The `size` property now accepts different values. If you previously used it like:
68
+ ```html
69
+ <ui5-busy-indicator size="Small"></ui5-busy-indicator>
70
+ ```
71
+ Now use the new values instead:
72
+ ```html
73
+ <ui5-busy-indicator size="S"></ui5-busy-indicator>
74
+ ```
75
+
76
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
77
+ * The `status` property and its shadow part have been renamed. If you previously used them:
78
+ ```html
79
+ <style>
80
+ .cardHeader::part(status) { ... }
81
+ </style>
82
+ <ui5-card-header status="3 of 10"></ui5-popover>
83
+ ```
84
+ Now use `additionalText` instead:
85
+ ```html
86
+ <style>
87
+ .cardHeader::part(additional-text) { ... }
88
+ </style>
89
+ <ui5-card-header class="cardHeader" additional-text="3 of 10"></ui5-card-header>
90
+ ```
91
+
92
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
93
+ * The `pageIndicatorStyle` no longer exists. If you previously used it like:
94
+ ```html
95
+ <ui5-carousel page-indicator-style="Numeric"></ui5-carousel>
96
+ ```
97
+ Now you should use `pageIndicatorType` instead:
98
+ ```html
99
+ <ui5-carousel page-indicator-type="Numeric"></ui5-carousel>
100
+ ```
101
+
102
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
103
+ * Removed `UI5Element#render` method in favour of `UI5Element#renderer`. If you previously used "render"
104
+ ```js
105
+ class MyClass extends UI5Element {
106
+ static get render() {
107
+ return litRenderer;
108
+ }
109
+ }
110
+ ```
111
+ start using "renderer"
112
+ ```ts
113
+ class MyClass extends UI5Element {
114
+ static get renderer() {
115
+ return litRenderer;
116
+ }
117
+ }
118
+ ```
119
+ * Remove JavaScript template option from @ui5/create-webcomponents-package
120
+ Previously `npm init @ui5/webcomponents-package` used to create JS-based project, however now it will be TypeScript-based project.
121
+ If you previously used `npm init @ui5/webcomponents-package --enable-typescript` to create TypeScript-based project, now it's by default, e.g `npm init @ui5/webcomponents-package` and `--enable-typescript` is removed.
122
+ * The `Left` and `Right` options option have been renamed. If you previously used them to set the placement or the alignment of the popover:
123
+ ```html
124
+ <ui5-popover horizontal-align="Left" placement-type="Left"></ui5-popover>
125
+ ```
126
+ Now use `Start` or `End` instead:
127
+ ```html
128
+ <ui5-popover horizontal-align="Start" placement-type="Start"></ui5-popover>
129
+ ```
130
+
131
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
132
+
133
+ * docs: deploy v2 preview
134
+ * Remove `soccor` icon. Use `soccer` instead.
135
+ * Remove `add-polygone` icon. Use `add-polygon` instead.
136
+ * The JSDoc plugin has been removed, and the generation of api.json has stopped. If you previously relied on the `ui5-package/dist/api.json file`, you can now use `ui5-package/dist/custom-elements.json`
137
+ * All Assets-static.js modules are removed. If you previously imported any Assets-static.js module from any package:
138
+ ```ts
139
+ import "@ui5/webcomponents/dist/Assets-static.js";
140
+ import "@ui5/webcomponents-icons/dist/Assets-static.js"
141
+ ```
142
+ use the dynamic equivalent of it:
143
+ ```ts
144
+ import "@ui5/webcomponents/dist/Assets.js";
145
+ import "@ui5/webcomponents-icons/dist/Assets.js"
146
+ ```
147
+
148
+ Related to: https://github.com/SAP/ui5-webcomponents/issues/8461
149
+ * The event `selected-dates-change ` is renamed to `selection-change`. In addition the event details
150
+ `values` and `dates` are renamed to `selectedValues` and `selectedDateValues`. If you previously used the Calendar event as follows:
151
+ ```ts
152
+ myCalendar.addEventListener("selected-dates-change", () => {
153
+ const values = e.detail.values;
154
+ const dates = e.detail.dates;
155
+ })
156
+ ```
157
+ Now you have to use the new event name and details:
158
+ ```ts
159
+ myCalendar.addEventListener("selection-change", () => {
160
+ const values = event.detail.selectedValues;
161
+ const dates = event.detail.selectedDateValues;
162
+ })
163
+ ```
164
+
165
+ Related to: https://github.com/SAP/ui5-webcomponents/issues/8461
166
+ * The property `color` is renamed to `value`. If you previously used the change event of the ColorPicker as follows:
167
+ ```html
168
+ <ui5-color-picker color="red"></ui5-color-picker>
169
+ ```
170
+ Now you have to use it like this:
171
+ ```html
172
+ <ui5-color-picker value="red"></ui5-color-picker>
173
+ ```
174
+
175
+ Related to: https://github.com/SAP/ui5-webcomponents/issues/8461
176
+ * JavaScript projects may not function properly with the tools package.
177
+ * The `openPopover` and `showAt` methods are removed in favor of `open` and `opener` properties. If you previously used the imperative API:
178
+ ```js
179
+ button.addEventListener("click", function(event) {
180
+ colorPalettePopover.showAt(this);
181
+ });
182
+ ```
183
+ Now the declarative API should be used instead:
184
+ ```html
185
+ <ui5-button id="opener">Open</ui5-button>
186
+ <ui5-color-palette-popover opener="opener">
187
+ ```
188
+ ```js
189
+ button.addEventListener("click", function(event) {
190
+ colorPalettePopover.open = !colorPalettePopover.open;
191
+ });
192
+ ```
193
+ * The `ui5-bar` component is now in `main` library. If you previously imported the `ui5-bar` from `fiori`:
194
+ ```ts
195
+ import "@ui5/webcomponents-fiori/dist/Bar.js;
196
+ ```
197
+ Now, import the `ui5-bar` from `main`:
198
+ ```ts
199
+ import "@ui5/webcomponents/dist/Bar.js";
200
+ ```
201
+
202
+ Related to: https://github.com/SAP/ui5-webcomponents/issues/8461
203
+ * If you have previously used:
204
+ ```html
205
+ <ui5-tab id="nestedTab" slot="subTabs"></ui5-tab>
206
+ ```
207
+ Now use:
208
+ ```html
209
+ <ui5-tab id="nestedTab" slot="items"></ui5-tab>
210
+ ```
211
+
212
+ Relates to https://github.com/SAP/ui5-webcomponents/issues/8461
213
+ * If you have previously used:
214
+ ```html
215
+ <ui5-tabcontainer tabs-overflow-mode="StartAndEnd"></ui5-tabcontainer>
216
+ ```
217
+ Now use:
218
+ ```html
219
+ <ui5-tabcontainer overflow-mode="StartAndEnd"></ui5-tabcontainer>
220
+ ```
221
+
222
+ Relates to https://github.com/SAP/ui5-webcomponents/issues/8461
223
+ * If you previously imported `TabContainerBackgroundDesign`, use `BackgroundDesign` instead.
224
+
225
+ Relates to https://github.com/SAP/ui5-webcomponents/issues/8461
226
+ * The showOverflow property is removed. If previously you have used:
227
+ ```html
228
+ <ui5-tabcontainer show-overflow></ui5-tabcontainer>
229
+ ```
230
+ now use the overflowButton slot:
231
+ ```html
232
+ <ui5-tabcontainer>
233
+ <ui5-button slot="startOverflowButton" id="startOverflowButton">Start</ui5-button>
234
+ <ui5-button slot="overflowButton" id="endOverflowButton">End</ui5-button>
235
+ </ui5-tabcontainer>
236
+ ```
237
+
238
+ Relates to https://github.com/SAP/ui5-webcomponents/issues/8461
239
+ * The `placementType` property and the `PopoverPlacementType` enum have been renamed.
240
+ If you have previously used the `placementType` property and the `PopoverPlacementType`
241
+ ```html
242
+ <ui5-popover placement-type="Bottom"></ui5-popover>
243
+ ```
244
+ ```js
245
+ import PopoverPlacementType from "@ui5/webcomponents/dist/types/PopoverPlacementType.js";
246
+ ```
247
+ Now use `placement` instead:
248
+ ```html
249
+ <ui5-placement="Bottom"></ui5-popover>
250
+ ```
251
+ ```js
252
+ import PopoverPlacementType from "@ui5/webcomponents/dist/types/PopoverPlacement.js";
253
+ ```
254
+
255
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461
256
+ * The `size` property of the `ui5--illustrated-message` is renamed to `design`.
257
+ If you have previously used the `size` property:
258
+ ```html
259
+ <ui5-illustrated-message size="Dialog">
260
+ ```
261
+ Now use `design` instead:
262
+ ```html
263
+ <ui5-illustrated-message design="Dialog">
264
+
265
+ ```
266
+
267
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461, https://github.com/SAP/ui5-webcomponents/issues/7887
268
+ * The `separator-style` property is renamed to `separators` and the `BreadcrumbsSeparatorStyle` enum is renamed to `BreadcrumbsSeparator`.
269
+ If you have previously used the `separator-style` property:
270
+ ```html
271
+ <ui5-breadcrumbs separator-style="Slash">
272
+ ```
273
+ Now use `separators` instead:
274
+ ```html
275
+ <ui5-breadcrumbs separators="Slash">
276
+ ```
277
+
278
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461, https://github.com/SAP/ui5-webcomponents/issues/7887
279
+ * The `disabled` property of the `ui5-option` is removed.
280
+ If you have previously used the `disabled` property:
281
+ ```html
282
+ <ui5-option disabled>Option</ui5-option>
283
+ ```
284
+ it will no longer work for the component.
285
+
286
+ Related to https://github.com/SAP/ui5-webcomponents/issues/8461, https://github.com/SAP/ui5-webcomponents/issues/7887
287
+ * You can no longer import and implement the `ITab` interface. TabContainer is designed to work only with Tab and TabSeparator classes, so the interface was obsolete.
288
+
289
+
290
+
291
+
292
+
293
+ # [1.24.0](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.4...v1.24.0) (2024-04-04)
294
+
295
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
296
+
297
+
298
+
299
+
300
+
301
+ # [1.24.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.3...v1.24.0-rc.4) (2024-04-04)
302
+
303
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
304
+
305
+
306
+
307
+
308
+
309
+ # [1.24.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.2...v1.24.0-rc.3) (2024-03-28)
310
+
311
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
312
+
313
+
314
+
315
+
316
+
317
+ # [1.24.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.1...v1.24.0-rc.2) (2024-03-21)
318
+
319
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
320
+
321
+
322
+
323
+
324
+
325
+ # [1.24.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.24.0-rc.0...v1.24.0-rc.1) (2024-03-15)
326
+
327
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
328
+
329
+
330
+
331
+
332
+
333
+ # [1.24.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.1...v1.24.0-rc.0) (2024-03-14)
334
+
335
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
336
+
337
+
338
+
339
+
340
+
341
+ ## [1.23.1](https://github.com/SAP/ui5-webcomponents/compare/v1.23.1-rc.0...v1.23.1) (2024-03-08)
342
+
343
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
344
+
345
+
346
+
347
+
348
+
349
+ ## [1.23.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0...v1.23.1-rc.0) (2024-03-07)
350
+
351
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
352
+
353
+
354
+
355
+
356
+
357
+ # [1.23.0](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.5...v1.23.0) (2024-03-06)
358
+
359
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
360
+
361
+
362
+
363
+
364
+
365
+ # [1.23.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.4...v1.23.0-rc.5) (2024-02-29)
366
+
367
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
368
+
369
+
370
+
371
+
372
+
373
+ # [1.23.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.3...v1.23.0-rc.4) (2024-02-26)
374
+
375
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
376
+
377
+
378
+
379
+
380
+
381
+ # [1.23.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.2...v1.23.0-rc.3) (2024-02-22)
382
+
383
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
384
+
385
+
386
+
387
+
388
+
389
+ # [1.23.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.1...v1.23.0-rc.2) (2024-02-20)
390
+
391
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
392
+
393
+
394
+
395
+
396
+
397
+ # [1.23.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.23.0-rc.0...v1.23.0-rc.1) (2024-02-19)
398
+
399
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
400
+
401
+
402
+
403
+
404
+
405
+ # [1.23.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.1-rc.0...v1.23.0-rc.0) (2024-02-15)
406
+
407
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
408
+
409
+
410
+
411
+
412
+
413
+ ## [1.22.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0...v1.22.1-rc.0) (2024-02-08)
414
+
415
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
416
+
417
+
418
+
419
+
420
+
421
+ # [1.22.0](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.3...v1.22.0) (2024-02-05)
422
+
423
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
424
+
425
+
426
+
427
+
428
+
429
+ # [1.22.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.2...v1.22.0-rc.3) (2024-02-01)
430
+
431
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
432
+
433
+
434
+
435
+
436
+
437
+ # [1.22.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.1...v1.22.0-rc.2) (2024-01-25)
438
+
439
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
440
+
441
+
442
+
443
+
444
+
445
+ # [1.22.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.22.0-rc.0...v1.22.0-rc.1) (2024-01-18)
446
+
447
+
448
+ ### Bug Fixes
449
+
450
+ * broken test page ([#8097](https://github.com/SAP/ui5-webcomponents/issues/8097)) ([6903367](https://github.com/SAP/ui5-webcomponents/commit/6903367c290b84490c74a6ef56b074aa0a2fc729))
451
+
452
+
453
+
454
+
455
+
456
+ # [1.22.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0...v1.22.0-rc.0) (2024-01-11)
457
+
458
+ **Note:** Version bump only for package @ui5/create-webcomponents-package
459
+
460
+
461
+
462
+
463
+
6
464
  # [1.21.0](https://github.com/SAP/ui5-webcomponents/compare/v1.21.0-rc.5...v1.21.0) (2024-01-05)
7
465
 
8
466
  **Note:** Version bump only for package @ui5/create-webcomponents-package
package/README.md CHANGED
@@ -21,7 +21,6 @@ Options:
21
21
  --name <string> - defines the package name
22
22
  --component-name <string> - defines the component class name that will be created in your new package
23
23
  --tag <string> - defines the tag name of the sample web component that will be created in your new package. The tag will be derived from the component name if not provided.
24
- --enable-typescript - enables TypeScript support for the package
25
24
  --skip - skips configuration and generates package with a default value for each parameter that wasn't passed
26
25
  ```
27
26
 
@@ -37,7 +36,6 @@ Options:
37
36
  --name <string> - defines the package name
38
37
  --component-name <string> - defines the component class name that will be created in your new package
39
38
  --tag <string> - defines the tag name of the sample web component that will be created in your new package
40
- --enable-typescript - enables TypeScript support for the package
41
39
  --skip - skips configuration and generates package with a default value for each parameter that wasn't passed
42
40
  ```
43
41
 
package/create-package.js CHANGED
@@ -15,13 +15,6 @@ const version = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"))
15
15
  // from where all the files will be copied
16
16
  const TEMPLATE_DIR = path.join(`${__dirname}`, `template/`);
17
17
 
18
- // String utils
19
- const isTSRelatedFile = sourcePath => {
20
- return ["Assets.ts", "MyFirstComponent.ts", "tsconfig.json", "global.d.ts"].some(fileName => sourcePath.includes(fileName));
21
- };
22
- const isJSRelatedFile = sourcePath => {
23
- return ["Assets.js", "MyFirstComponent.js"].some(fileName => sourcePath.includes(fileName));
24
- };
25
18
  const isGitIgnore = sourcePath => {
26
19
  return sourcePath.includes("gitignore");
27
20
  };
@@ -34,10 +27,8 @@ const isNPMRC = sourcePath => {
34
27
 
35
28
  // Validation of user input
36
29
  const ComponentNamePattern = /^[A-Z][A-Za-z0-9]+$/;
37
- const NamespacePattern = /^[a-z][a-z0-9\.\-]+$/;
38
30
  const isPackageNameValid = name => typeof name === "string" && name.match(/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/);
39
31
  const isComponentNameValid = name => typeof name === "string" && ComponentNamePattern.test(name);
40
- const isNamespaceValid = name => typeof name === "string" && NamespacePattern.test(name);
41
32
  const isTagValid = tag => typeof tag === "string" && tag.match(/^[a-z0-9]+?-[a-zA-Z0-9\-_]+?[a-z0-9]$/);
42
33
 
43
34
  /**
@@ -65,13 +56,6 @@ const replaceVarsInFileName = (vars, fileName) => {
65
56
  };
66
57
 
67
58
  const copyFile = (vars, sourcePath, destPath) => {
68
- const ignoreJsRelated = vars.INIT_PACKAGE_VAR_TYPESCRIPT && isJSRelatedFile(sourcePath);
69
- const ignoreTsRelated = !vars.INIT_PACKAGE_VAR_TYPESCRIPT && isTSRelatedFile(sourcePath);
70
-
71
- if (ignoreJsRelated || ignoreTsRelated) {
72
- return;
73
- }
74
-
75
59
  if (isLogo(sourcePath)) {
76
60
  fs.copyFileSync(sourcePath, destPath);
77
61
  return;
@@ -108,16 +92,14 @@ const copyFiles = (vars, sourcePath, destPath) => {
108
92
  }
109
93
  };
110
94
 
111
- const generateFilesContent = (packageName, componentName, namespace, typescript, skipSubfolder) => {
95
+ const generateFilesContent = (packageName, componentName, skipSubfolder) => {
112
96
  const tagName = argv.tag || hyphaneteComponentName(componentName);
113
97
 
114
98
  // All variables that will be replaced in the content of the resources/
115
99
  const vars = {
116
- INIT_PACKAGE_VAR_NAMESPACE: namespace, // namespace must be replaced before name
117
100
  INIT_PACKAGE_VAR_NAME: packageName,
118
101
  INIT_PACKAGE_VAR_TAG: tagName,
119
102
  INIT_PACKAGE_VAR_CLASS_NAME: componentName,
120
- INIT_PACKAGE_VAR_TYPESCRIPT: typescript,
121
103
  };
122
104
 
123
105
  const packageContent = {
@@ -150,13 +132,10 @@ const generateFilesContent = (packageName, componentName, namespace, typescript,
150
132
  "devDependencies": {
151
133
  "@ui5/webcomponents-tools": version,
152
134
  "chromedriver": "*",
135
+ "typescript": "^5.2.2"
153
136
  },
154
137
  };
155
138
 
156
- if (typescript) {
157
- packageContent.devDependencies.typescript = "^4.9.4";
158
- }
159
-
160
139
  // Update package.json
161
140
  let destDir = packageName.includes("@") ? packageName.slice(packageName.lastIndexOf("/") + 1) : packageName;
162
141
 
@@ -196,22 +175,16 @@ const createWebcomponentsPackage = async () => {
196
175
  throw new Error("The component name should be a string, starting with a capital letter [A-Z][a-z], for example: Button, MyButton, etc.");
197
176
  }
198
177
 
199
- if (argv.namespace && !isNamespaceValid(argv.namespace)) {
200
- throw new Error("The JSDoc namespace must start with a letter and can only contain small-case letters, numbers, dots and dashes.");
201
- }
202
-
203
178
  if (argv.tag && !isTagValid(argv.tag) ) {
204
179
  throw new Error("The tag should be in kebab-case (f.e my-component) and it can't be a single word.");
205
180
  }
206
181
 
207
182
  let packageName = argv.name || "my-package";
208
183
  let componentName = argv.componentName || "MyComponent";
209
- let namespace = argv.namespace || "demo.components";
210
- let typescriptSupport = !!argv.enableTypescript;
211
184
  const skipSubfolder = !!argv.skipSubfolder;
212
185
 
213
186
  if (argv.skip) {
214
- return generateFilesContent(packageName, componentName, namespace, typescriptSupport, skipSubfolder);
187
+ return generateFilesContent(packageName, componentName, skipSubfolder);
215
188
  }
216
189
 
217
190
  if (!argv.name) {
@@ -224,25 +197,6 @@ const createWebcomponentsPackage = async () => {
224
197
  packageName = response.name;
225
198
  }
226
199
 
227
- if (!typescriptSupport) {
228
- response = await prompts({
229
- type: "select",
230
- name: "language",
231
- message: "Project type:",
232
- choices: [
233
- {
234
- title: "JavaScript",
235
- value: false,
236
- },
237
- {
238
- title: "TypeScript",
239
- value: true,
240
- },
241
- ],
242
- });
243
- typescriptSupport = response.language;
244
- }
245
-
246
200
  if (!argv.componentName) {
247
201
  response = await prompts({
248
202
  type: "text",
@@ -254,18 +208,7 @@ const createWebcomponentsPackage = async () => {
254
208
  componentName = response.componentName;
255
209
  }
256
210
 
257
- if (!argv.namespace) {
258
- response = await prompts({
259
- type: "text",
260
- name: "namespace",
261
- message: "JSDoc namespace:",
262
- initial: "demo.components",
263
- validate: (value) => isNamespaceValid(value) ? true : "The JSDoc namespace must start with a letter and can only contain small-case letters, numbers, dots and dashes.",
264
- });
265
- namespace = response.namespace;
266
- }
267
-
268
- return generateFilesContent(packageName, componentName, namespace, typescriptSupport, skipSubfolder);
211
+ return generateFilesContent(packageName, componentName, skipSubfolder);
269
212
  };
270
213
 
271
214
  createWebcomponentsPackage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/create-webcomponents-package",
3
- "version": "0.0.0-d9b978d1d",
3
+ "version": "0.0.0-da0d3eb88",
4
4
  "description": "UI5 Web Components: create package",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -2,5 +2,4 @@
2
2
  dist
3
3
  test
4
4
  src/generated
5
- jsdoc-dist
6
5
  .eslintrc.js
@@ -6,7 +6,6 @@ import { getLanguage } from "@ui5/webcomponents-base/dist/config/Language.js";
6
6
  import { getCalendarType } from "@ui5/webcomponents-base/dist/config/CalendarType.js";
7
7
  import { getTheme, setTheme } from "@ui5/webcomponents-base/dist/config/Theme.js";
8
8
  import { getNoConflict, setNoConflict } from "@ui5/webcomponents-base/dist/config/NoConflict.js";
9
- import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js";
10
9
  import { getFirstDayOfWeek } from "@ui5/webcomponents-base/dist/config/FormatSettings.js";
11
10
 
12
11
  // Enable additional themes and i18n texts
@@ -25,7 +24,6 @@ window["sap-ui-webcomponents-bundle"] = {
25
24
  getNoConflict,
26
25
  setNoConflict,
27
26
  getCalendarType,
28
- getRTL,
29
27
  getFirstDayOfWeek,
30
28
  },
31
29
  };
@@ -1,4 +1,3 @@
1
1
  node_modules
2
2
  dist
3
- jsdoc-dist
4
3
  src/generated
@@ -2,7 +2,6 @@ const getScripts = require("@ui5/webcomponents-tools/components-package/nps.js")
2
2
 
3
3
  const options = {
4
4
  port: 8080,
5
- typescript: INIT_PACKAGE_VAR_TYPESCRIPT,
6
5
  };
7
6
 
8
7
  const scripts = getScripts(options);
@@ -1 +1,6 @@
1
- <div @click="{{onClick}}">{{counterText}} :: {{count}}</div>
1
+ <div
2
+ class="root"
3
+ @click="{{onClick}}"
4
+ >
5
+ {{counterText}} :: {{count}}
6
+ </div>
@@ -22,9 +22,7 @@ import { COUNT } from "./generated/i18n/i18n-defaults.js";
22
22
  * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
23
23
  *
24
24
  * @constructor
25
- * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
26
- * @extends sap.ui.webc.base.UI5Element
27
- * @tagname INIT_PACKAGE_VAR_TAG
25
+ * @extends UI5Element
28
26
  * @public
29
27
  */
30
28
  @customElement({
@@ -42,9 +40,8 @@ class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
42
40
 
43
41
  /**
44
42
  * Defines the component count.
45
- * @name INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype.count
43
+ * @default 0
46
44
  * @public
47
- * @type { sap.ui.webc.base.types.Integer }
48
45
  */
49
46
  @property({ validator: Integer, defaultValue: 0 })
50
47
  count!: number;
@@ -1,4 +1,4 @@
1
- :host {
1
+ .root {
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -13,4 +13,5 @@
13
13
  line-height: 3rem;
14
14
  font-size: 1.25rem;
15
15
  user-select: none;
16
+ cursor: pointer;
16
17
  }
@@ -16,7 +16,7 @@
16
16
  </script>
17
17
 
18
18
  <link rel="stylesheet" type="text/css" href="./css/index.css">
19
- <script src="%VITE_BUNDLE_PATH%" type="module"></script>
19
+ <script src="../../bundle.esm.js" type="module"></script>
20
20
  </head>
21
21
 
22
22
  <body>
@@ -2,6 +2,7 @@
2
2
  "include": ["src/**/*", "global.d.ts"],
3
3
  "compilerOptions": {
4
4
  "target": "ES2021",
5
+ "lib": ["DOM", "DOM.Iterable", "ES2023"],
5
6
  // Generate d.ts files
6
7
  "declaration": true,
7
8
  "outDir": "dist",
@@ -1,5 +0,0 @@
1
- import "@ui5/webcomponents-theming/dist/Assets.js"; // Theming
2
-
3
- // own INIT_PACKAGE_VAR_NAME package assets
4
- import "./generated/json-imports/Themes.js";
5
- import "./generated/json-imports/i18n.js";
@@ -1,82 +0,0 @@
1
- import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
- import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3
- import { getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
4
- import Integer from "@ui5/webcomponents-base/dist/types/Integer.js";
5
-
6
- // Template
7
- import INIT_PACKAGE_VAR_CLASS_NAMETemplate from "./generated/templates/INIT_PACKAGE_VAR_CLASS_NAMETemplate.lit.js";
8
-
9
- // Styles
10
- import INIT_PACKAGE_VAR_CLASS_NAMECss from "./generated/themes/INIT_PACKAGE_VAR_CLASS_NAME.css.js";
11
-
12
- import { COUNT } from "./generated/i18n/i18n-defaults.js";
13
-
14
- /**
15
- * @public
16
- */
17
- const metadata = {
18
- tag: "INIT_PACKAGE_VAR_TAG",
19
- properties: /** @lends INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME.prototype */ {
20
- /**
21
- * Defines the count of the component.
22
- * @type { sap.ui.webc.base.types.Integer }
23
- * @defaultvalue 0
24
- * @public
25
- */
26
- count: {
27
- type: Integer,
28
- defaultValue: 0,
29
- },
30
- },
31
- slots: {
32
- },
33
- events: {
34
- },
35
- };
36
-
37
- /**
38
- * @class
39
- *
40
- * <h3 class="comment-api-title">Overview</h3>
41
- *
42
- * The <code>INIT_PACKAGE_VAR_TAG</code> component is a demo component that displays some text.
43
- *
44
- * @constructor
45
- * @alias INIT_PACKAGE_VAR_NAMESPACE.INIT_PACKAGE_VAR_CLASS_NAME
46
- * @extends sap.ui.webc.base.UI5Element
47
- * @tagname INIT_PACKAGE_VAR_TAG
48
- * @public
49
- */
50
- class INIT_PACKAGE_VAR_CLASS_NAME extends UI5Element {
51
- static get metadata() {
52
- return metadata;
53
- }
54
-
55
- static get render() {
56
- return litRender;
57
- }
58
-
59
- static get template() {
60
- return INIT_PACKAGE_VAR_CLASS_NAMETemplate;
61
- }
62
-
63
- static get styles() {
64
- return INIT_PACKAGE_VAR_CLASS_NAMECss;
65
- }
66
-
67
- static async onDefine() {
68
- INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle = await getI18nBundle("INIT_PACKAGE_VAR_NAME");
69
- }
70
-
71
- onClick() {
72
- this.count++;
73
- }
74
-
75
- get counterText() {
76
- return INIT_PACKAGE_VAR_CLASS_NAME.i18nBundle.getText(COUNT);
77
- }
78
- }
79
-
80
- INIT_PACKAGE_VAR_CLASS_NAME.define();
81
-
82
- export default INIT_PACKAGE_VAR_CLASS_NAME;