@sapudex/web-components 2.3.0 → 2.4.0
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/.eslintignore +3 -0
- package/bundle.esm.js +2 -0
- package/cypress/fixtures/contact-numbers.ts +10 -0
- package/cypress/specs/Accordion.cy.tsx +24 -0
- package/cypress/specs/Contact.cy.tsx +92 -0
- package/cypress/specs/ContactItem.cy.tsx +56 -0
- package/cypress/support/commands.ts +31 -2
- package/cypress/support/component-imports.instrumented.ts +4 -0
- package/cypress/support/component-imports.src.ts +4 -0
- package/dist/Accordion.d.ts +7 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.js.map +1 -1
- package/dist/Assets.js +31 -0
- package/dist/Assets.js.map +1 -1
- package/dist/Contact.d.ts +102 -0
- package/dist/Contact.js +152 -0
- package/dist/Contact.js.map +1 -0
- package/dist/ContactItem.d.ts +67 -0
- package/dist/ContactItem.js +96 -0
- package/dist/ContactItem.js.map +1 -0
- package/dist/ContactItemTemplate.d.ts +2 -0
- package/dist/ContactItemTemplate.js +13 -0
- package/dist/ContactItemTemplate.js.map +1 -0
- package/dist/ContactTemplate.d.ts +4 -0
- package/dist/ContactTemplate.js +29 -0
- package/dist/ContactTemplate.js.map +1 -0
- package/dist/CountrySelector.d.ts +0 -2
- package/dist/CountrySelector.js +0 -4
- package/dist/CountrySelector.js.map +1 -1
- package/dist/Footer.d.ts +0 -1
- package/dist/Footer.js +7 -9
- package/dist/Footer.js.map +1 -1
- package/dist/List.d.ts +1 -1
- package/dist/List.js +1 -1
- package/dist/List.js.map +1 -1
- package/dist/MastheadItem.d.ts +1 -3
- package/dist/MastheadItem.js +6 -11
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadMenu.d.ts +0 -1
- package/dist/MastheadMenu.js +2 -4
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/MastheadProfileMenu.d.ts +0 -1
- package/dist/MastheadProfileMenu.js +2 -4
- package/dist/MastheadProfileMenu.js.map +1 -1
- package/dist/SearchableListBase.js +5 -1
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SecondaryNavigation.d.ts +0 -1
- package/dist/SecondaryNavigation.js +2 -4
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/assets/{InputSuggestions-BgbbJ4tc.js → InputSuggestions-CYW_6A8K.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-onAnn1Tj.js → ListItemStandardExpandableTextTemplate-BDrgWGjT.js} +1 -1
- package/dist/assets/{bundle.esm-CwUfibNQ.js → bundle.esm-DRCvw6Ji.js} +203 -198
- package/dist/assets/messagebundle_en-BK8-Eyic.js +1 -0
- package/dist/css/themes/Accordion.css +1 -1
- package/dist/css/themes/Button.css +1 -1
- package/dist/css/themes/Contact.css +1 -0
- package/dist/css/themes/ContactItem.css +1 -0
- package/dist/css/themes/Modal.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/custom-elements-internal.json +482 -100
- package/dist/custom-elements.json +444 -85
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/templates/AccordionTemplate.lit.js +4 -2
- package/dist/generated/templates/AccordionTemplate.lit.js.map +1 -1
- package/dist/generated/templates/MastheadItemTemplate.lit.js +25 -22
- package/dist/generated/templates/MastheadItemTemplate.lit.js.map +1 -1
- package/dist/generated/themes/Accordion.css.d.ts +1 -1
- package/dist/generated/themes/Accordion.css.js +1 -1
- package/dist/generated/themes/Accordion.css.js.map +1 -1
- package/dist/generated/themes/Button.css.d.ts +1 -1
- package/dist/generated/themes/Button.css.js +1 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/Contact.css.d.ts +2 -0
- package/dist/generated/themes/Contact.css.js +8 -0
- package/dist/generated/themes/Contact.css.js.map +1 -0
- package/dist/generated/themes/ContactItem.css.d.ts +2 -0
- package/dist/generated/themes/ContactItem.css.js +8 -0
- package/dist/generated/themes/ContactItem.css.js.map +1 -0
- package/dist/generated/themes/Modal.css.d.ts +1 -1
- package/dist/generated/themes/Modal.css.js +1 -1
- package/dist/generated/themes/Modal.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.d.ts +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/messagebundle.properties +5 -0
- package/dist/messagebundle_en.properties +3 -0
- package/dist/types/ContactItemIcon.d.ts +6 -0
- package/dist/types/ContactItemIcon.js +8 -0
- package/dist/types/ContactItemIcon.js.map +1 -0
- package/dist/utils/parseArrayFromString.d.ts +2 -0
- package/dist/utils/parseArrayFromString.js +5 -0
- package/dist/utils/parseArrayFromString.js.map +1 -0
- package/dist/vscode.html-custom-data.json +84 -1
- package/dist/web-types.json +172 -2
- package/package.json +2 -2
- package/src/Accordion.hbs +13 -9
- package/src/Accordion.ts +7 -4
- package/src/Assets.ts +29 -0
- package/src/Contact.ts +200 -0
- package/src/ContactItem.ts +119 -0
- package/src/ContactItemTemplate.tsx +22 -0
- package/src/ContactTemplate.tsx +105 -0
- package/src/CountrySelector.ts +0 -5
- package/src/Footer.ts +7 -10
- package/src/List.ts +1 -1
- package/src/MastheadItem.hbs +8 -0
- package/src/MastheadItem.ts +8 -16
- package/src/MastheadMenu.ts +2 -5
- package/src/MastheadProfileMenu.ts +2 -5
- package/src/SearchableListBase.ts +6 -1
- package/src/SecondaryNavigation.ts +3 -5
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/templates/AccordionTemplate.lit.ts +4 -2
- package/src/generated/templates/MastheadItemTemplate.lit.ts +25 -22
- package/src/generated/themes/Accordion.css.ts +1 -1
- package/src/generated/themes/Button.css.ts +1 -1
- package/src/generated/themes/Contact.css.ts +9 -0
- package/src/generated/themes/ContactItem.css.ts +9 -0
- package/src/generated/themes/Modal.css.ts +1 -1
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/i18n/messagebundle.properties +5 -0
- package/src/i18n/messagebundle_en.properties +3 -0
- package/src/themes/Accordion.css +1 -0
- package/src/themes/Button.css +7 -1
- package/src/themes/Contact.css +184 -0
- package/src/themes/ContactItem.css +44 -0
- package/src/themes/Modal.css +4 -4
- package/src/types/ContactItemIcon.ts +7 -0
- package/src/utils/parseArrayFromString.ts +5 -0
- package/dist/assets/messagebundle_en-CVKgy_9L.js +0 -1
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
"name": "udex-accordion",
|
|
6
6
|
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-accordion</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/Accordion.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **toggle-items** - Triggered when the user clicks on the Expand/Collapse All button..\n\n### **Slots:**\n - **default** - Slot for accordion items.",
|
|
7
7
|
"attributes": [
|
|
8
|
+
{
|
|
9
|
+
"name": "hide-expand-button",
|
|
10
|
+
"description": "Defines if expandAll button should be displayed.",
|
|
11
|
+
"values": []
|
|
12
|
+
},
|
|
8
13
|
{
|
|
9
14
|
"name": "headline",
|
|
10
15
|
"description": "Defines the headline text of the accordion component.",
|
|
@@ -264,6 +269,84 @@
|
|
|
264
269
|
],
|
|
265
270
|
"references": []
|
|
266
271
|
},
|
|
272
|
+
{
|
|
273
|
+
"name": "udex-contact",
|
|
274
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-contact</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/Contact.js\";</code>\n\n\n---\n\n\n\n\n### **Slots:**\n - **default** - Slot for list items.",
|
|
275
|
+
"attributes": [
|
|
276
|
+
{
|
|
277
|
+
"name": "button-text",
|
|
278
|
+
"description": "Defines the <code>text</code> for the contact button.",
|
|
279
|
+
"values": []
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "contact-numbers",
|
|
283
|
+
"description": "List of the contact numbers",
|
|
284
|
+
"values": []
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "local-country-numbers-link",
|
|
288
|
+
"description": "Defines the local country numbers link's href",
|
|
289
|
+
"values": []
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "prevent-initial-focus",
|
|
293
|
+
"description": "Defines if the initial focus should be prevented.",
|
|
294
|
+
"values": []
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "prevent-focus-restore",
|
|
298
|
+
"description": "Defines if the focus should be returned to the previously focused element.",
|
|
299
|
+
"values": []
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "accessible-name",
|
|
303
|
+
"description": "Defines the accessible name of the component.",
|
|
304
|
+
"values": []
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "accessible-name-ref",
|
|
308
|
+
"description": "Defines the IDs of the elements that label the component.",
|
|
309
|
+
"values": []
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"references": []
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "udex-contact-item",
|
|
316
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-contact-item</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/ContactItem.js\";</code>\n\n\n---\n\n\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n\n### **Slots:**\n - **default** - Slot for the item content.",
|
|
317
|
+
"attributes": [
|
|
318
|
+
{
|
|
319
|
+
"name": "label",
|
|
320
|
+
"description": "Defines the label for the item.",
|
|
321
|
+
"values": []
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "href",
|
|
325
|
+
"description": "Defines the href for the item.",
|
|
326
|
+
"values": []
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"name": "icon",
|
|
330
|
+
"description": "Defines the icon name for the item.",
|
|
331
|
+
"values": [
|
|
332
|
+
{ "name": "Email" },
|
|
333
|
+
{ "name": "Headset" },
|
|
334
|
+
{ "name": "Discussion-2" }
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "target",
|
|
339
|
+
"description": "Defines target for the item",
|
|
340
|
+
"values": [
|
|
341
|
+
{ "name": "_blank" },
|
|
342
|
+
{ "name": "_parent" },
|
|
343
|
+
{ "name": "_self" },
|
|
344
|
+
{ "name": "_top" }
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"references": []
|
|
349
|
+
},
|
|
267
350
|
{
|
|
268
351
|
"name": "udex-control-button",
|
|
269
352
|
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-control-button</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/ControlButton.js\";</code>\n\n\n---\n\n\n",
|
|
@@ -1120,7 +1203,7 @@
|
|
|
1120
1203
|
},
|
|
1121
1204
|
{
|
|
1122
1205
|
"name": "udex-list",
|
|
1123
|
-
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n
|
|
1206
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-list</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/List.js\";</code>\n\n\n---\n\n\n\n\n### **Slots:**\n - **default** - Slot for list items.",
|
|
1124
1207
|
"attributes": [
|
|
1125
1208
|
{
|
|
1126
1209
|
"name": "accessible-role",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@sapudex/web-components",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-accordion</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/Accordion.js\";</code>\n---\n\n\n### **Events:**\n - **toggle-items** - Triggered when the user clicks on the Expand/Collapse All button..\n\n### **Slots:**\n - **default** - Slot for accordion items.",
|
|
12
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
|
+
{
|
|
15
|
+
"name": "hide-expand-button",
|
|
16
|
+
"description": "Defines if expandAll button should be displayed.",
|
|
17
|
+
"value": { "type": "boolean", "default": "false" }
|
|
18
|
+
},
|
|
14
19
|
{
|
|
15
20
|
"name": "headline",
|
|
16
21
|
"description": "Defines the headline text of the accordion component.",
|
|
@@ -28,6 +33,11 @@
|
|
|
28
33
|
],
|
|
29
34
|
"js": {
|
|
30
35
|
"properties": [
|
|
36
|
+
{
|
|
37
|
+
"name": "hide-expand-button",
|
|
38
|
+
"description": "Defines if expandAll button should be displayed.",
|
|
39
|
+
"value": { "type": "boolean" }
|
|
40
|
+
},
|
|
31
41
|
{
|
|
32
42
|
"name": "headline",
|
|
33
43
|
"description": "Defines the headline text of the accordion component.",
|
|
@@ -557,6 +567,166 @@
|
|
|
557
567
|
"events": []
|
|
558
568
|
}
|
|
559
569
|
},
|
|
570
|
+
{
|
|
571
|
+
"name": "udex-contact",
|
|
572
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-contact</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/Contact.js\";</code>\n---\n\n\n### **Slots:**\n - **default** - Slot for list items.",
|
|
573
|
+
"doc-url": "",
|
|
574
|
+
"attributes": [
|
|
575
|
+
{
|
|
576
|
+
"name": "button-text",
|
|
577
|
+
"description": "Defines the <code>text</code> for the contact button.",
|
|
578
|
+
"value": { "type": "string" }
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "contact-numbers",
|
|
582
|
+
"description": "List of the contact numbers",
|
|
583
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "local-country-numbers-link",
|
|
587
|
+
"description": "Defines the local country numbers link's href",
|
|
588
|
+
"value": { "type": "string", "default": "\"\"" }
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "prevent-initial-focus",
|
|
592
|
+
"description": "Defines if the initial focus should be prevented.",
|
|
593
|
+
"value": { "type": "boolean" }
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"name": "prevent-focus-restore",
|
|
597
|
+
"description": "Defines if the focus should be returned to the previously focused element.",
|
|
598
|
+
"value": { "type": "boolean" }
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "accessible-name",
|
|
602
|
+
"description": "Defines the accessible name of the component.",
|
|
603
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "accessible-name-ref",
|
|
607
|
+
"description": "Defines the IDs of the elements that label the component.",
|
|
608
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
"slots": [
|
|
612
|
+
{ "name": "default", "description": "Slot for list items." }
|
|
613
|
+
],
|
|
614
|
+
"events": [],
|
|
615
|
+
"js": {
|
|
616
|
+
"properties": [
|
|
617
|
+
{
|
|
618
|
+
"name": "button-text",
|
|
619
|
+
"description": "Defines the <code>text</code> for the contact button.",
|
|
620
|
+
"value": { "type": "string" }
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "contact-numbers",
|
|
624
|
+
"description": "List of the contact numbers",
|
|
625
|
+
"value": { "type": "string" }
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "local-country-numbers-link",
|
|
629
|
+
"description": "Defines the local country numbers link's href",
|
|
630
|
+
"value": { "type": "string" }
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "prevent-initial-focus",
|
|
634
|
+
"description": "Defines if the initial focus should be prevented.",
|
|
635
|
+
"value": { "type": "boolean" }
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "prevent-focus-restore",
|
|
639
|
+
"description": "Defines if the focus should be returned to the previously focused element.",
|
|
640
|
+
"value": { "type": "boolean" }
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "accessible-name",
|
|
644
|
+
"description": "Defines the accessible name of the component.",
|
|
645
|
+
"value": { "type": "string | undefined" }
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "accessible-name-ref",
|
|
649
|
+
"description": "Defines the IDs of the elements that label the component.",
|
|
650
|
+
"value": { "type": "string | undefined" }
|
|
651
|
+
}
|
|
652
|
+
],
|
|
653
|
+
"events": []
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"name": "udex-contact-item",
|
|
658
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-contact-item</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/ContactItem.js\";</code>\n---\n\n\n### **Events:**\n - **item-click** - Fires when item is clicked\n\n### **Slots:**\n - **default** - Slot for the item content.",
|
|
659
|
+
"doc-url": "",
|
|
660
|
+
"attributes": [
|
|
661
|
+
{
|
|
662
|
+
"name": "label",
|
|
663
|
+
"description": "Defines the label for the item.",
|
|
664
|
+
"value": { "type": "string" }
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "href",
|
|
668
|
+
"description": "Defines the href for the item.",
|
|
669
|
+
"value": { "type": "string" }
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "icon",
|
|
673
|
+
"description": "Defines the icon name for the item.",
|
|
674
|
+
"value": {
|
|
675
|
+
"type": "\"Email\" | \"Headset\" | \"Discussion-2\" | undefined"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "target",
|
|
680
|
+
"description": "Defines target for the item",
|
|
681
|
+
"value": {
|
|
682
|
+
"type": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
],
|
|
686
|
+
"slots": [
|
|
687
|
+
{ "name": "default", "description": "Slot for the item content." }
|
|
688
|
+
],
|
|
689
|
+
"events": [
|
|
690
|
+
{
|
|
691
|
+
"name": "item-click",
|
|
692
|
+
"description": "Fires when item is clicked"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"js": {
|
|
696
|
+
"properties": [
|
|
697
|
+
{
|
|
698
|
+
"name": "label",
|
|
699
|
+
"description": "Defines the label for the item.",
|
|
700
|
+
"value": { "type": "string" }
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "href",
|
|
704
|
+
"description": "Defines the href for the item.",
|
|
705
|
+
"value": { "type": "string" }
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"name": "icon",
|
|
709
|
+
"description": "Defines the icon name for the item.",
|
|
710
|
+
"value": {
|
|
711
|
+
"type": "\"Email\" | \"Headset\" | \"Discussion-2\" | undefined"
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "target",
|
|
716
|
+
"description": "Defines target for the item",
|
|
717
|
+
"value": {
|
|
718
|
+
"type": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\""
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
],
|
|
722
|
+
"events": [
|
|
723
|
+
{
|
|
724
|
+
"name": "item-click",
|
|
725
|
+
"description": "Fires when item is clicked"
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
},
|
|
560
730
|
{
|
|
561
731
|
"name": "udex-control-button",
|
|
562
732
|
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-control-button</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/ControlButton.js\";</code>\n---\n",
|
|
@@ -2458,7 +2628,7 @@
|
|
|
2458
2628
|
},
|
|
2459
2629
|
{
|
|
2460
2630
|
"name": "udex-list",
|
|
2461
|
-
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n
|
|
2631
|
+
"description": "<h3 class=\"comment-api-title\">Overview</h3>\n\n\n<h3>Usage</h3>\n\nFor the <code>udex-list</code>\n<h3>ES6 Module Import</h3>\n\n<code>import \"@sapudex/web-components/dist/List.js\";</code>\n---\n\n\n### **Slots:**\n - **default** - Slot for list items.",
|
|
2462
2632
|
"doc-url": "",
|
|
2463
2633
|
"attributes": [
|
|
2464
2634
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@sapudex/web-components",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"@ui5/webcomponents-icons": "2.12.0",
|
|
44
44
|
"@ui5/webcomponents-theming": "2.12.0",
|
|
45
45
|
"@vimeo/player": "^2.24.0",
|
|
46
|
-
"cypress-real-events": "^1.14.0",
|
|
47
46
|
"video.js": "8.22.0"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
@@ -53,6 +52,7 @@
|
|
|
53
52
|
"chromedriver": "138.0.1",
|
|
54
53
|
"cross-env": "^7.0.3",
|
|
55
54
|
"cypress": "^14.3.3",
|
|
55
|
+
"cypress-real-events": "^1.14.0",
|
|
56
56
|
"typescript": "^5.6.2",
|
|
57
57
|
"wdio-chromedriver-service": "^8.1.1",
|
|
58
58
|
"webdriverio": "^8.16.12"
|
package/src/Accordion.hbs
CHANGED
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
@keydown="{{keydownHandler}}"
|
|
4
4
|
@ui5-accordion-item-focus="{{itemFocusHandler}}">
|
|
5
5
|
<div class="udex-accordion__head" part="head">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
{{#if headline}}
|
|
7
|
+
<h3 class="udex-accordion__headline">{{headline}}</h3>
|
|
8
|
+
{{/if}}
|
|
9
|
+
{{#unless hideExpandButton}}
|
|
10
|
+
<udex-button class="udex-accordion__btn"
|
|
11
|
+
size="Large"
|
|
12
|
+
design="Tertiary"
|
|
13
|
+
@click="{{toggleAllHandler}}"
|
|
14
|
+
@keydown="{{toggleKeyAllHandler}}"
|
|
15
|
+
accessible-name="{{toggleAllText}}">
|
|
16
|
+
{{toggleAllText}}
|
|
17
|
+
</udex-button>
|
|
18
|
+
{{/unless}}
|
|
15
19
|
</div>
|
|
16
20
|
<div class="udex-accordion__content">
|
|
17
21
|
{{#each items}}
|
package/src/Accordion.ts
CHANGED
|
@@ -65,6 +65,13 @@ class UDExAccordion extends UI5Element {
|
|
|
65
65
|
* @private
|
|
66
66
|
*/
|
|
67
67
|
@property({ type: Boolean, noAttribute: true }) _allExpanded!: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Defines if expandAll button should be displayed.
|
|
70
|
+
*
|
|
71
|
+
* @default false
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
@property({ type: Boolean }) hideExpandButton!: boolean;
|
|
68
75
|
|
|
69
76
|
/**
|
|
70
77
|
* Defines direction of the accordion component.
|
|
@@ -118,10 +125,6 @@ class UDExAccordion extends UI5Element {
|
|
|
118
125
|
});
|
|
119
126
|
}
|
|
120
127
|
|
|
121
|
-
get headlineText(): string {
|
|
122
|
-
return this.headline ? this.headline : "Default headline";
|
|
123
|
-
}
|
|
124
|
-
|
|
125
128
|
toggleAllHandler(e: Event) {
|
|
126
129
|
e.preventDefault();
|
|
127
130
|
this._allExpanded = !this._allExpanded;
|
package/src/Assets.ts
CHANGED
|
@@ -10,3 +10,32 @@ import variablesOverwrite from "./AssetsVariables.js";
|
|
|
10
10
|
const customThemeLoader = () => Promise.resolve(variablesOverwrite);
|
|
11
11
|
|
|
12
12
|
registerCustomThemePropertiesLoader("@ui5/webcomponents", "sap_glow", customThemeLoader);
|
|
13
|
+
|
|
14
|
+
(function checkThemeCSSLink() {
|
|
15
|
+
if (typeof document === "undefined") { return; }
|
|
16
|
+
|
|
17
|
+
const runCheck = () => {
|
|
18
|
+
const cssLoaded = Array.from(document.styleSheets).some(sheet => {
|
|
19
|
+
try {
|
|
20
|
+
if (sheet.href && sheet.href.includes("css_variables.css")) { return true; }
|
|
21
|
+
return Array.from(sheet.cssRules || []).some(rule => rule.cssText.includes(".sapThemeMetaData-Base-baseLib"));
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (!cssLoaded) {
|
|
28
|
+
const msg = `Required theme CSS not found.
|
|
29
|
+
Please add:
|
|
30
|
+
<link rel="stylesheet" href="path/to/@sapudex/design-tokens/dist/themes/sap_glow/css_variables.css">
|
|
31
|
+
or import '@sapudex/design-tokens/dist/themes/sap_glow/css_variables.css'`;
|
|
32
|
+
console.warn(msg);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
if (document.readyState === "loading") {
|
|
37
|
+
document.addEventListener("DOMContentLoaded", runCheck);
|
|
38
|
+
} else {
|
|
39
|
+
runCheck();
|
|
40
|
+
}
|
|
41
|
+
})();
|
package/src/Contact.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
3
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
4
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
5
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
6
|
+
import ContactTemplate from "./ContactTemplate.js";
|
|
7
|
+
import type UDExContactItem from "./ContactItem.js";
|
|
8
|
+
import type UI5ResponsivePopover from "@ui5/webcomponents/dist/ResponsivePopover.js";
|
|
9
|
+
import parseArrayFromString from "./utils/parseArrayFromString.js";
|
|
10
|
+
import {
|
|
11
|
+
LOCAL_COUNTRY_NAMES, COMPLETE_LIST_OF, CALL_US_TODAY, CONTACT_US,
|
|
12
|
+
} from "./generated/i18n/i18n-defaults.js";
|
|
13
|
+
import i18n from "@ui5/webcomponents-base/decorators/i18n.js";
|
|
14
|
+
import type I18nBundle from "@ui5/webcomponents-base/i18nBundle.js";
|
|
15
|
+
|
|
16
|
+
// Styles
|
|
17
|
+
import ContactCss from "./generated/themes/Contact.css.js";
|
|
18
|
+
import { BreakpointUtils } from "./utils/Breakpoints.js";
|
|
19
|
+
|
|
20
|
+
export type ContactNumber = {
|
|
21
|
+
number: string;
|
|
22
|
+
country: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @class
|
|
27
|
+
*
|
|
28
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* <h3>Usage</h3>
|
|
32
|
+
*
|
|
33
|
+
* For the <code>udex-contact</code>
|
|
34
|
+
* <h3>ES6 Module Import</h3>
|
|
35
|
+
*
|
|
36
|
+
* <code>import "@sapudex/web-components/dist/Contact.js";</code>
|
|
37
|
+
*
|
|
38
|
+
* @constructor
|
|
39
|
+
* @extends UI5Element
|
|
40
|
+
* @tagname udex-contact
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
@customElement({
|
|
44
|
+
tag: "udex-contact",
|
|
45
|
+
renderer: jsxRenderer,
|
|
46
|
+
styles: ContactCss,
|
|
47
|
+
template: ContactTemplate,
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
class UDExContact extends UI5Element {
|
|
51
|
+
/**
|
|
52
|
+
* Defines the <code>text</code> for the contact button.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
@property({ type: String })
|
|
57
|
+
buttonText!: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* List of the contact numbers
|
|
61
|
+
*
|
|
62
|
+
* @default "[]"
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
@property({ type: String })
|
|
66
|
+
contactNumbers: string = "";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Defines the local country numbers link's href
|
|
70
|
+
*
|
|
71
|
+
* @default ""
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
@property({ type: String })
|
|
75
|
+
localCountryNumbersLink: string = "";
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Defines if the initial focus should be prevented.
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
@property({ type: Boolean })
|
|
82
|
+
preventInitialFocus!: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Defines if the focus should be returned to the previously focused element.
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
@property({ type: Boolean })
|
|
89
|
+
preventFocusRestore!: boolean;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Defines the accessible name of the component.
|
|
93
|
+
* @default undefined
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
@property({ type: String })
|
|
97
|
+
accessibleName?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines the IDs of the elements that label the component.
|
|
101
|
+
* @default undefined
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
@property({ type: String })
|
|
105
|
+
accessibleNameRef?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Slot for list items.
|
|
109
|
+
*
|
|
110
|
+
* @slot items
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
@slot({ type: HTMLElement, "default": true })
|
|
114
|
+
items!: Array<UDExContactItem>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Defines the mobile mode for component
|
|
118
|
+
*
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
@property({ type: Boolean })
|
|
122
|
+
_isMobileMode: boolean = BreakpointUtils.isAtMost("M");
|
|
123
|
+
|
|
124
|
+
_screenResizeHandler: () => void;
|
|
125
|
+
_screenResizeHandlerAttached?: boolean;
|
|
126
|
+
|
|
127
|
+
@i18n("@sapudex/web-components")
|
|
128
|
+
static i18nBundle: I18nBundle;
|
|
129
|
+
|
|
130
|
+
constructor() {
|
|
131
|
+
super();
|
|
132
|
+
this._screenResizeHandler = this._screenResize.bind(this);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
onEnterDOM() {
|
|
136
|
+
this._attachScreenResizeHandler();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
onExitDOM() {
|
|
140
|
+
this._detachScreenResizeHandler();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
_openPopover(): void {
|
|
144
|
+
this._responsivePopover.open = !this._responsivePopover.open;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
_closePopover(): void {
|
|
148
|
+
this._responsivePopover.open = false;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
_screenResize(): void {
|
|
152
|
+
this._isMobileMode = BreakpointUtils.isAtMost("M");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
_attachScreenResizeHandler(): void {
|
|
156
|
+
if (!this._screenResizeHandlerAttached) {
|
|
157
|
+
window.addEventListener("resize", this._screenResizeHandler);
|
|
158
|
+
this._screenResizeHandlerAttached = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
_detachScreenResizeHandler(): void {
|
|
163
|
+
if (this._screenResizeHandlerAttached) {
|
|
164
|
+
window.removeEventListener("resize", this._screenResizeHandler);
|
|
165
|
+
this._screenResizeHandlerAttached = false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
get _contactNumbersArray(): ContactNumber[] {
|
|
170
|
+
return parseArrayFromString<ContactNumber>(this.contactNumbers);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
get _responsivePopover(): UI5ResponsivePopover {
|
|
174
|
+
return this.shadowRoot!.querySelector<UI5ResponsivePopover>(".udex-contact__popover")!;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
get _completeListTitle(): string {
|
|
178
|
+
return `${UDExContact.i18nBundle.getText(COMPLETE_LIST_OF)} `;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
get _localCountryTitle(): string {
|
|
182
|
+
return UDExContact.i18nBundle.getText(LOCAL_COUNTRY_NAMES);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
get _numbersTitle(): string {
|
|
186
|
+
return UDExContact.i18nBundle.getText(CALL_US_TODAY);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
get _contactUsTitle(): string {
|
|
190
|
+
return UDExContact.i18nBundle.getText(CONTACT_US);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
get _hasNumbersList(): boolean {
|
|
194
|
+
return this._contactNumbersArray.length > 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
UDExContact.define();
|
|
199
|
+
|
|
200
|
+
export default UDExContact;
|