@sapudex/web-components 2.20.1 → 2.22.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/bundle.esm.js +4 -0
- package/cypress/specs/Feed.cy.tsx +72 -0
- package/cypress/specs/FeedItem.cy.tsx +82 -0
- package/cypress/specs/Footer.cy.tsx +45 -1
- package/cypress/specs/ImageGridCloud.cy.tsx +78 -0
- package/cypress/specs/ImageGridCloudItem.cy.tsx +29 -0
- package/cypress/support/component-imports.instrumented.ts +8 -0
- package/cypress/support/component-imports.src.ts +8 -0
- package/dist/Accordion.js +1 -0
- package/dist/Accordion.js.map +1 -1
- package/dist/AccordionItem.js +2 -0
- package/dist/AccordionItem.js.map +1 -1
- package/dist/AssetsVariables.js +5 -0
- package/dist/AssetsVariables.js.map +1 -1
- package/dist/Breadcrumbs.js +5 -0
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/ContactItem.js +2 -0
- package/dist/ContactItem.js.map +1 -1
- package/dist/CountrySelector.js +1 -0
- package/dist/CountrySelector.js.map +1 -1
- package/dist/DatePicker.js +2 -1
- package/dist/DatePicker.js.map +1 -1
- package/dist/Feed.d.ts +88 -0
- package/dist/Feed.js +103 -0
- package/dist/Feed.js.map +1 -0
- package/dist/FeedItem.d.ts +114 -0
- package/dist/FeedItem.js +131 -0
- package/dist/FeedItem.js.map +1 -0
- package/dist/FeedItemTemplate.d.ts +2 -0
- package/dist/FeedItemTemplate.js +16 -0
- package/dist/FeedItemTemplate.js.map +1 -0
- package/dist/FeedTemplate.d.ts +2 -0
- package/dist/FeedTemplate.js +19 -0
- package/dist/FeedTemplate.js.map +1 -0
- package/dist/FilterMenu.js +2 -0
- package/dist/FilterMenu.js.map +1 -1
- package/dist/Footer.d.ts +14 -2
- package/dist/Footer.js +37 -4
- package/dist/Footer.js.map +1 -1
- package/dist/FooterTemplate.js +3 -3
- package/dist/FooterTemplate.js.map +1 -1
- package/dist/ImageGridCloud.d.ts +76 -0
- package/dist/ImageGridCloud.js +153 -0
- package/dist/ImageGridCloud.js.map +1 -0
- package/dist/ImageGridCloudItem.d.ts +35 -0
- package/dist/ImageGridCloudItem.js +49 -0
- package/dist/ImageGridCloudItem.js.map +1 -0
- package/dist/ImageGridCloudItemTemplate.d.ts +2 -0
- package/dist/ImageGridCloudItemTemplate.js +5 -0
- package/dist/ImageGridCloudItemTemplate.js.map +1 -0
- package/dist/ImageGridCloudTemplate.d.ts +2 -0
- package/dist/ImageGridCloudTemplate.js +6 -0
- package/dist/ImageGridCloudTemplate.js.map +1 -0
- package/dist/ImageGridTicker.d.ts +2 -2
- package/dist/ImageGridTicker.js +1 -8
- package/dist/ImageGridTicker.js.map +1 -1
- package/dist/LinkListItem.js +1 -0
- package/dist/LinkListItem.js.map +1 -1
- package/dist/List.js +3 -0
- package/dist/List.js.map +1 -1
- package/dist/ListGroupHeader.js +1 -0
- package/dist/ListGroupHeader.js.map +1 -1
- package/dist/ListItem.js +2 -0
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItemBase.js +4 -0
- package/dist/ListItemBase.js.map +1 -1
- package/dist/ListSelectAll.js +1 -0
- package/dist/ListSelectAll.js.map +1 -1
- package/dist/MastheadCountrySelector.js +15 -0
- package/dist/MastheadCountrySelector.js.map +1 -1
- package/dist/MastheadItem.js +10 -0
- package/dist/MastheadItem.js.map +1 -1
- package/dist/MastheadMenu.js +6 -0
- package/dist/MastheadMenu.js.map +1 -1
- package/dist/MastheadMobileMenu.js +11 -0
- package/dist/MastheadMobileMenu.js.map +1 -1
- package/dist/MastheadProfileMenu.js +11 -0
- package/dist/MastheadProfileMenu.js.map +1 -1
- package/dist/MastheadShell.js +41 -0
- package/dist/MastheadShell.js.map +1 -1
- package/dist/MediaPlayer.js +1 -0
- package/dist/MediaPlayer.js.map +1 -1
- package/dist/MediaPlayerVimeo.d.ts +3 -3
- package/dist/MediaPlayerVimeo.js +1 -0
- package/dist/MediaPlayerVimeo.js.map +1 -1
- package/dist/MediaPlayerYoutube.js +3 -0
- package/dist/MediaPlayerYoutube.js.map +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Pagination.js.map +1 -1
- package/dist/Search.d.ts +2 -1
- package/dist/Search.js +18 -3
- package/dist/Search.js.map +1 -1
- package/dist/SearchTemplate.d.ts +2 -0
- package/dist/SearchTemplate.js +48 -0
- package/dist/SearchTemplate.js.map +1 -0
- package/dist/SearchableListBase.d.ts +3 -0
- package/dist/SearchableListBase.js +10 -0
- package/dist/SearchableListBase.js.map +1 -1
- package/dist/SecondaryNavigation.js +19 -0
- package/dist/SecondaryNavigation.js.map +1 -1
- package/dist/SecondaryNavigationItem.js +6 -0
- package/dist/SecondaryNavigationItem.js.map +1 -1
- package/dist/SecondaryNavigationSubItem.js +3 -0
- package/dist/SecondaryNavigationSubItem.js.map +1 -1
- package/dist/SelectBox.js +1 -0
- package/dist/SelectBox.js.map +1 -1
- package/dist/SocialMediaButton.js +2 -0
- package/dist/SocialMediaButton.js.map +1 -1
- package/dist/StepInput.js +2 -0
- package/dist/StepInput.js.map +1 -1
- package/dist/TabNavigation.js +3 -0
- package/dist/TabNavigation.js.map +1 -1
- package/dist/Tag.js +1 -0
- package/dist/Tag.js.map +1 -1
- package/dist/TagGroup.js +3 -0
- package/dist/TagGroup.js.map +1 -1
- package/dist/TextField.js +1 -0
- package/dist/TextField.js.map +1 -1
- package/dist/Tile.js +1 -0
- package/dist/Tile.js.map +1 -1
- package/dist/Upload.js +5 -0
- package/dist/Upload.js.map +1 -1
- package/dist/assets/{InputSuggestions-yR1p8cXL.js → InputSuggestions-By00xQan.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-BovnAV24.js → ListItemStandardExpandableTextTemplate-BGtoxRbA.js} +1 -1
- package/dist/assets/{bundle.esm-C7AybWk0.js → bundle.esm-9yDdQqR5.js} +223 -214
- package/dist/assets/messagebundle_en-D_yCmNrd.js +1 -0
- package/dist/css/themes/Feed.css +1 -0
- package/dist/css/themes/FeedItem.css +1 -0
- package/dist/css/themes/Footer.css +1 -1
- package/dist/css/themes/ImageGridCloud.css +1 -0
- package/dist/css/themes/ImageGridCloudItem.css +1 -0
- package/dist/css/themes/MediaPlayer.css +1 -1
- package/dist/css/themes/Pagination.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 +4455 -456
- package/dist/custom-elements.json +1411 -288
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +2 -1
- package/dist/generated/i18n/i18n-defaults.js +2 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Feed.css.d.ts +2 -0
- package/dist/generated/themes/Feed.css.js +8 -0
- package/dist/generated/themes/Feed.css.js.map +1 -0
- package/dist/generated/themes/FeedItem.css.d.ts +2 -0
- package/dist/generated/themes/FeedItem.css.js +8 -0
- package/dist/generated/themes/FeedItem.css.js.map +1 -0
- package/dist/generated/themes/Footer.css.d.ts +1 -1
- package/dist/generated/themes/Footer.css.js +1 -1
- package/dist/generated/themes/Footer.css.js.map +1 -1
- package/dist/generated/themes/ImageGridCloud.css.d.ts +2 -0
- package/dist/generated/themes/ImageGridCloud.css.js +8 -0
- package/dist/generated/themes/ImageGridCloud.css.js.map +1 -0
- package/dist/generated/themes/ImageGridCloudItem.css.d.ts +2 -0
- package/dist/generated/themes/ImageGridCloudItem.css.js +8 -0
- package/dist/generated/themes/ImageGridCloudItem.css.js.map +1 -0
- package/dist/generated/themes/MediaPlayer.css.d.ts +1 -1
- package/dist/generated/themes/MediaPlayer.css.js +1 -1
- package/dist/generated/themes/MediaPlayer.css.js.map +1 -1
- package/dist/generated/themes/Pagination.css.d.ts +1 -1
- package/dist/generated/themes/Pagination.css.js +1 -1
- package/dist/generated/themes/Pagination.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 +3 -0
- package/dist/messagebundle_en.properties +1 -0
- package/dist/vscode.html-custom-data.json +130 -1
- package/dist/web-types.json +305 -4
- package/package.json +1 -1
- package/src/Accordion.ts +1 -0
- package/src/AccordionItem.ts +2 -0
- package/src/AssetsVariables.ts +5 -0
- package/src/Breadcrumbs.ts +5 -0
- package/src/ContactItem.ts +2 -0
- package/src/CountrySelector.ts +1 -0
- package/src/DatePicker.ts +2 -1
- package/src/Feed.ts +144 -0
- package/src/FeedItem.ts +198 -0
- package/src/FeedItemTemplate.tsx +60 -0
- package/src/FeedTemplate.tsx +66 -0
- package/src/FilterMenu.ts +2 -0
- package/src/Footer.ts +47 -4
- package/src/FooterTemplate.tsx +29 -39
- package/src/ImageGridCloud.ts +188 -0
- package/src/ImageGridCloudItem.ts +57 -0
- package/src/ImageGridCloudItemTemplate.tsx +11 -0
- package/src/ImageGridCloudTemplate.tsx +16 -0
- package/src/ImageGridTicker.ts +3 -3
- package/src/LinkListItem.ts +1 -0
- package/src/List.ts +3 -0
- package/src/ListGroupHeader.ts +1 -0
- package/src/ListItem.ts +2 -0
- package/src/ListItemBase.ts +4 -0
- package/src/ListSelectAll.ts +1 -0
- package/src/MastheadCountrySelector.ts +15 -0
- package/src/MastheadItem.ts +10 -0
- package/src/MastheadMenu.ts +6 -0
- package/src/MastheadMobileMenu.ts +11 -0
- package/src/MastheadProfileMenu.ts +11 -0
- package/src/MastheadShell.ts +41 -0
- package/src/MediaPlayer.ts +1 -0
- package/src/MediaPlayerVimeo.ts +4 -3
- package/src/MediaPlayerYoutube.ts +3 -0
- package/src/Pagination.ts +1 -1
- package/src/Search.ts +20 -4
- package/src/SearchTemplate.tsx +353 -0
- package/src/SearchableListBase.ts +10 -0
- package/src/SecondaryNavigation.ts +19 -0
- package/src/SecondaryNavigationItem.ts +6 -0
- package/src/SecondaryNavigationSubItem.ts +3 -0
- package/src/SelectBox.ts +1 -0
- package/src/SocialMediaButton.ts +2 -0
- package/src/StepInput.ts +2 -0
- package/src/TabNavigation.ts +3 -0
- package/src/Tag.ts +1 -0
- package/src/TagGroup.ts +3 -0
- package/src/TextField.ts +1 -0
- package/src/Tile.ts +1 -0
- package/src/Upload.ts +5 -0
- package/src/generated/i18n/i18n-defaults.ts +2 -2
- package/src/generated/themes/Feed.css.ts +9 -0
- package/src/generated/themes/FeedItem.css.ts +9 -0
- package/src/generated/themes/Footer.css.ts +1 -1
- package/src/generated/themes/ImageGridCloud.css.ts +9 -0
- package/src/generated/themes/ImageGridCloudItem.css.ts +9 -0
- package/src/generated/themes/MediaPlayer.css.ts +1 -1
- package/src/generated/themes/Pagination.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 +3 -0
- package/src/i18n/messagebundle_en.properties +1 -0
- package/src/themes/Feed.css +51 -0
- package/src/themes/FeedItem.css +60 -0
- package/src/themes/Footer.css +9 -5
- package/src/themes/ImageGridCloud.css +55 -0
- package/src/themes/ImageGridCloudItem.css +10 -0
- package/src/themes/MediaPlayer.css +1 -1
- package/src/themes/Pagination.css +1 -1
- package/dist/assets/messagebundle_en-BhTYnZbC.js +0 -1
- package/dist/generated/templates/SearchSuggestionsTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/SearchSuggestionsTemplate.lit.js +0 -17
- package/dist/generated/templates/SearchSuggestionsTemplate.lit.js.map +0 -1
- package/dist/generated/templates/SearchTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/SearchTemplate.lit.js +0 -28
- package/dist/generated/templates/SearchTemplate.lit.js.map +0 -1
- package/src/Search.hbs +0 -155
- package/src/SearchSuggestions.hbs +0 -91
- package/src/generated/templates/SearchSuggestionsTemplate.lit.ts +0 -21
- package/src/generated/templates/SearchTemplate.lit.ts +0 -32
package/src/Feed.ts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
3
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
4
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
5
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
6
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
7
|
+
import UDExButtonDesign from "./types/ButtonDesign.js";
|
|
8
|
+
import FeedItem from "./FeedItem.js";
|
|
9
|
+
import type UDExFeedItem from "./FeedItem.js";
|
|
10
|
+
import FeedTemplate from "./FeedTemplate.js";
|
|
11
|
+
|
|
12
|
+
// Styles
|
|
13
|
+
import FeedCss from "./generated/themes/Feed.css.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @class
|
|
17
|
+
*
|
|
18
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* <h3>Usage</h3>
|
|
22
|
+
*
|
|
23
|
+
* For the <code>udex-feed</code>
|
|
24
|
+
* <h3>ES6 Module Import</h3>
|
|
25
|
+
*
|
|
26
|
+
* <code>import "@sapudex/web-components/dist/Feed.js";</code>
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* @constructor
|
|
30
|
+
* @extends UI5Element
|
|
31
|
+
* @tagname udex-feed
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
@customElement({
|
|
35
|
+
tag: "udex-feed",
|
|
36
|
+
renderer: jsxRenderer,
|
|
37
|
+
styles: FeedCss,
|
|
38
|
+
template: FeedTemplate,
|
|
39
|
+
dependencies: [FeedItem],
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Triggered when the user clicks on the CTA button
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
@event("button-click", { cancelable: true, bubbles: true })
|
|
48
|
+
|
|
49
|
+
class UDExFeed extends UI5Element {
|
|
50
|
+
eventDetails!: {
|
|
51
|
+
"button-click": void
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Slot for feed items.
|
|
55
|
+
*
|
|
56
|
+
* @slot items
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
@slot({ type: HTMLElement, individualSlots: true })
|
|
60
|
+
items!: Array<UDExFeedItem>;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Defines the UI5 icon name in the pictogram section.
|
|
64
|
+
*
|
|
65
|
+
* @default ""
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
@property({ type: String })
|
|
69
|
+
icon?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Defines the image URL in the pictogram section.
|
|
73
|
+
*
|
|
74
|
+
* @default ""
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
@property({ type: String })
|
|
78
|
+
imageUrl?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Defines the image aria label and alt in the pictogram section.
|
|
82
|
+
*
|
|
83
|
+
* @default ""
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
@property({ type: String })
|
|
87
|
+
imageLabel?: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Defines the header text of the component.
|
|
91
|
+
*
|
|
92
|
+
* @default ""
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
@property({ type: String })
|
|
96
|
+
header?: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Defines the CTA button label
|
|
100
|
+
*
|
|
101
|
+
* @default ""
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
@property({ type: String })
|
|
105
|
+
button?: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Defines the CTA button design
|
|
109
|
+
*
|
|
110
|
+
* @default "UDExButtonDesign.Secondary"
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
@property()
|
|
114
|
+
buttonDesign: UDExButtonDesign = UDExButtonDesign.Secondary;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Defines the accessible ARIA name of the component.
|
|
118
|
+
*
|
|
119
|
+
* @default undefined
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
@property()
|
|
123
|
+
accessibleName?: string;
|
|
124
|
+
|
|
125
|
+
get _showPictogram(): boolean {
|
|
126
|
+
return !!this.icon || !!this.imageUrl;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
get _showImage(): boolean {
|
|
130
|
+
return !this.icon && !!this.imageUrl;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
get _imageLabel(): string {
|
|
134
|
+
return this.imageLabel || "";
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
handleCTAButtonClick() {
|
|
138
|
+
this.fireDecoratorEvent("button-click");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
UDExFeed.define();
|
|
143
|
+
|
|
144
|
+
export default UDExFeed;
|
package/src/FeedItem.ts
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import { UDExTarget } from "./types/common.js";
|
|
3
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
4
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
5
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
6
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
7
|
+
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
8
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
9
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
10
|
+
import FeedItemTemplate from "./FeedItemTemplate.js";
|
|
11
|
+
import { LOCATION } from "./generated/i18n/i18n-defaults.js";
|
|
12
|
+
|
|
13
|
+
// Styles
|
|
14
|
+
import FeedItemCss from "./generated/themes/FeedItem.css.js";
|
|
15
|
+
|
|
16
|
+
type UDExFeedItemClickEventDetail = {
|
|
17
|
+
originalEvent: Event,
|
|
18
|
+
item: UDExFeedItem,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type FeedDate = {
|
|
22
|
+
day: string;
|
|
23
|
+
month: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @class
|
|
28
|
+
*
|
|
29
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* <h3>Usage</h3>
|
|
33
|
+
*
|
|
34
|
+
* For the <code>udex-feed-item</code>
|
|
35
|
+
* <h3>ES6 Module Import</h3>
|
|
36
|
+
*
|
|
37
|
+
* <code>import "@sapudex/web-components/dist/FeedItem.js";</code>
|
|
38
|
+
*
|
|
39
|
+
* @constructor
|
|
40
|
+
* @extends UI5Element
|
|
41
|
+
* @tagname udex-feed-item
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
@customElement({
|
|
45
|
+
tag: "udex-feed-item",
|
|
46
|
+
renderer: jsxRenderer,
|
|
47
|
+
styles: FeedItemCss,
|
|
48
|
+
template: FeedItemTemplate,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Fires when item is clicked
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
@event("item-click", { bubbles: true, cancelable: true })
|
|
57
|
+
|
|
58
|
+
class UDExFeedItem extends UI5Element {
|
|
59
|
+
eventDetails!: {
|
|
60
|
+
"item-click": UDExFeedItemClickEventDetail,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Defines the link text
|
|
65
|
+
*
|
|
66
|
+
* @default undefined
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
@property({ type: String })
|
|
70
|
+
text?: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Defines the link text URL
|
|
74
|
+
*
|
|
75
|
+
* @default ""
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
@property({ type: String })
|
|
79
|
+
href!: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Defines target for the link
|
|
83
|
+
*
|
|
84
|
+
* @default UDExTarget._self
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
@property()
|
|
88
|
+
target: UDExTarget = UDExTarget._self;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Defines the link text details
|
|
92
|
+
*
|
|
93
|
+
* @default undefined
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
@property({ type: String })
|
|
97
|
+
details?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines the accessible ARIA name of the link.
|
|
101
|
+
*
|
|
102
|
+
* @default undefined
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
@property()
|
|
106
|
+
accessibleName?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Defines the date of the event
|
|
110
|
+
*
|
|
111
|
+
* @default undefined
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
@property({ type: String })
|
|
115
|
+
date?: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Defines the location of the event
|
|
119
|
+
*
|
|
120
|
+
* @default undefined
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
@property({ type: String })
|
|
124
|
+
location?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Defines the UI5 icon name
|
|
128
|
+
*
|
|
129
|
+
* @default undefined
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
@property({ type: String })
|
|
133
|
+
icon?: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Defines the UI5 icon label
|
|
137
|
+
*
|
|
138
|
+
* @default undefined
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
@property({ type: String })
|
|
142
|
+
iconAccessibleName?: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Receives the avatar
|
|
146
|
+
*
|
|
147
|
+
* @slot avatar
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
@slot({ type: HTMLElement })
|
|
151
|
+
avatar!: Array<HTMLElement>;
|
|
152
|
+
|
|
153
|
+
@i18n("@sapudex/web-components")
|
|
154
|
+
static i18nBundle: I18nBundle;
|
|
155
|
+
|
|
156
|
+
get _date(): FeedDate {
|
|
157
|
+
return this.formatDate(this.date);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
get _showAvatar(): boolean {
|
|
161
|
+
return !!this.avatar.length;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get _showIcon(): boolean {
|
|
165
|
+
return !!this.icon && !this._showAvatar;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get _showDate(): boolean {
|
|
169
|
+
return !!this.date && !this._showAvatar && !this._showIcon;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
get locationIconLabel(): string {
|
|
173
|
+
return UDExFeedItem.i18nBundle.getText(LOCATION);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
formatDate(d: string | undefined): FeedDate {
|
|
177
|
+
if (!d) {
|
|
178
|
+
return { day: "", month: "" };
|
|
179
|
+
}
|
|
180
|
+
const date = new Date(d);
|
|
181
|
+
const day = date.toLocaleString("default", { day: "2-digit" });
|
|
182
|
+
let month = date.toLocaleString("default", { month: "short" });
|
|
183
|
+
month = month.charAt(0).toUpperCase() + month.slice(1);
|
|
184
|
+
return { day, month };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
handleLinkClick(e: Event): void {
|
|
188
|
+
this.fireDecoratorEvent("item-click", {
|
|
189
|
+
item: this,
|
|
190
|
+
originalEvent: e,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
UDExFeedItem.define();
|
|
196
|
+
|
|
197
|
+
export default UDExFeedItem;
|
|
198
|
+
export type { UDExFeedItemClickEventDetail };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type FeedItem from "./FeedItem.js";
|
|
2
|
+
import UI5Icon from "@ui5/webcomponents/dist/Icon.js";
|
|
3
|
+
import IconMode from "@ui5/webcomponents/dist/types/IconMode.js";
|
|
4
|
+
import IconDesign from "@ui5/webcomponents/dist/types/IconDesign.js";
|
|
5
|
+
import UDExLink from "./Link.js";
|
|
6
|
+
|
|
7
|
+
export default function FeedItemTemplate(this: FeedItem) {
|
|
8
|
+
const rootClass = "udex-feed-item";
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div class={rootClass}>
|
|
12
|
+
{this._showAvatar &&
|
|
13
|
+
<slot name="avatar" slot="avatar" aria-hidden="true"></slot>
|
|
14
|
+
}
|
|
15
|
+
{this._showIcon &&
|
|
16
|
+
<UI5Icon
|
|
17
|
+
class={`${rootClass}__icon`}
|
|
18
|
+
name={this.icon?.toLowerCase()}
|
|
19
|
+
mode={IconMode.Decorative}
|
|
20
|
+
accessibleName={this.iconAccessibleName}>
|
|
21
|
+
</UI5Icon>
|
|
22
|
+
}
|
|
23
|
+
{this._showDate &&
|
|
24
|
+
<div class={`${rootClass}__date`}
|
|
25
|
+
aria-label={this.date}>
|
|
26
|
+
<span class={`${rootClass}__month`}>{this._date.month}</span>
|
|
27
|
+
<span class={`${rootClass}__day`}>{this._date.day}</span>
|
|
28
|
+
</div>
|
|
29
|
+
}
|
|
30
|
+
{(this.text || this.details || this.location) &&
|
|
31
|
+
<div class={`${rootClass}__content`}>
|
|
32
|
+
<UDExLink
|
|
33
|
+
class={`${rootClass}__link`}
|
|
34
|
+
accessibleName={this.accessibleName}
|
|
35
|
+
href={this.href}
|
|
36
|
+
target={this.target}
|
|
37
|
+
onClick={this.handleLinkClick}>
|
|
38
|
+
{this.text}
|
|
39
|
+
</UDExLink>
|
|
40
|
+
{this.details &&
|
|
41
|
+
<p class={`${rootClass}__details`}>
|
|
42
|
+
{this.details}
|
|
43
|
+
</p>
|
|
44
|
+
}
|
|
45
|
+
{this.location &&
|
|
46
|
+
<p class={`${rootClass}__location`}>
|
|
47
|
+
<UI5Icon
|
|
48
|
+
name="map"
|
|
49
|
+
mode={IconMode.Decorative}
|
|
50
|
+
design={IconDesign.Neutral}
|
|
51
|
+
accessibleName={this.locationIconLabel}>
|
|
52
|
+
</UI5Icon>
|
|
53
|
+
{this.location}
|
|
54
|
+
</p>
|
|
55
|
+
}
|
|
56
|
+
</div>
|
|
57
|
+
}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type UDExFeed from "./Feed.js";
|
|
2
|
+
import UI5Icon from "@ui5/webcomponents/dist/Icon.js";
|
|
3
|
+
import IconMode from "@ui5/webcomponents/dist/types/IconMode.js";
|
|
4
|
+
import UDExButton from "./Button.js";
|
|
5
|
+
import UDExButtonSize from "./types/ButtonSize.js";
|
|
6
|
+
import UDExButtonAccessibleRole from "./types/ButtonAccessibleRole.js";
|
|
7
|
+
|
|
8
|
+
export default function FeedTemplate(this: UDExFeed) {
|
|
9
|
+
const rootClass = "udex-feed";
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
role="region"
|
|
14
|
+
class={`${rootClass}__container`}
|
|
15
|
+
aria-label={this.accessibleName}>
|
|
16
|
+
{this._showPictogram &&
|
|
17
|
+
<div
|
|
18
|
+
part="image"
|
|
19
|
+
class={`${rootClass}__pictogram`}
|
|
20
|
+
title={this._imageLabel}>
|
|
21
|
+
{this.icon &&
|
|
22
|
+
<UI5Icon
|
|
23
|
+
class={`${rootClass}__icon`}
|
|
24
|
+
name={this.icon?.toLowerCase()}
|
|
25
|
+
mode={IconMode.Decorative}
|
|
26
|
+
accessibleName={this._imageLabel}>
|
|
27
|
+
</UI5Icon>}
|
|
28
|
+
{this._showImage &&
|
|
29
|
+
<img
|
|
30
|
+
src={this.imageUrl}
|
|
31
|
+
class={`${rootClass}__icon`}
|
|
32
|
+
aria-label={this._imageLabel}
|
|
33
|
+
alt={this._imageLabel} />}
|
|
34
|
+
</div>
|
|
35
|
+
}
|
|
36
|
+
<div part="content" class={`${rootClass}__content`}>
|
|
37
|
+
{this.header &&
|
|
38
|
+
<h3 part="header" class={`${rootClass}__header`}>{this.header}</h3>
|
|
39
|
+
}
|
|
40
|
+
{this.items.length > 0 &&
|
|
41
|
+
<div class={`${rootClass}__items`}>
|
|
42
|
+
{this.items.map(item =>
|
|
43
|
+
<slot name={item._individualSlot}></slot>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
}
|
|
47
|
+
{!!this.button && footerSection.call(this, rootClass)}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function footerSection(this: UDExFeed, rootClass: string) {
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<div part="footer" class={`${rootClass}__footer`}>
|
|
56
|
+
<UDExButton class={`${rootClass}__btn`}
|
|
57
|
+
size={UDExButtonSize.Large}
|
|
58
|
+
design={this.buttonDesign}
|
|
59
|
+
onClick={this.handleCTAButtonClick}
|
|
60
|
+
accessibleRole={UDExButtonAccessibleRole.Button}>
|
|
61
|
+
{this.button}
|
|
62
|
+
</UDExButton>
|
|
63
|
+
</div>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
}
|
package/src/FilterMenu.ts
CHANGED
|
@@ -97,6 +97,7 @@ type UDExFilterMenuResetClickEventDetail = {
|
|
|
97
97
|
* Fired event when the user click on a reset button on the footer.
|
|
98
98
|
*
|
|
99
99
|
* @public
|
|
100
|
+
* @param {Array<UDExListItemBase>} restoredItems
|
|
100
101
|
*/
|
|
101
102
|
@event("reset-click", { bubbles: true })
|
|
102
103
|
|
|
@@ -104,6 +105,7 @@ type UDExFilterMenuResetClickEventDetail = {
|
|
|
104
105
|
* Fired event when the user click on a result button on the footer.
|
|
105
106
|
*
|
|
106
107
|
* @public
|
|
108
|
+
* @param {Array<UDExListItemBase>} selectedItems
|
|
107
109
|
*/
|
|
108
110
|
@event("result-click", { bubbles: true })
|
|
109
111
|
|
package/src/Footer.ts
CHANGED
|
@@ -111,66 +111,91 @@ type DetailedEvents = "quick-links-click" | "trending-click" | "about-sap-click"
|
|
|
111
111
|
/**
|
|
112
112
|
* Triggered on click interaction with logo in footer
|
|
113
113
|
* @public
|
|
114
|
+
* @param { MouseEvent | Event } originalEvent
|
|
114
115
|
* @allowPreventDefault
|
|
115
116
|
*/
|
|
116
117
|
@event("logo-click", { bubbles: true })
|
|
117
118
|
/**
|
|
118
119
|
* Triggered on click interaction with "Back to Top" button
|
|
119
120
|
* @public
|
|
121
|
+
* @param { MouseEvent | Event } originalEvent
|
|
120
122
|
* @allowPreventDefault
|
|
121
123
|
*/
|
|
122
124
|
@event("back-to-top-click", { bubbles: true })
|
|
123
125
|
/**
|
|
124
126
|
* Triggered on click interaction with phone number link in footer
|
|
125
127
|
* @public
|
|
128
|
+
* @param { MouseEvent | Event } originalEvent
|
|
126
129
|
* @allowPreventDefault
|
|
127
130
|
*/
|
|
128
131
|
@event("contact-phone-click", { bubbles: true })
|
|
129
132
|
/**
|
|
130
133
|
* Triggered on click interaction with local country numbers list link
|
|
131
134
|
* @public
|
|
135
|
+
* @param { MouseEvent | Event } originalEvent
|
|
132
136
|
* @allowPreventDefault
|
|
133
137
|
*/
|
|
134
138
|
@event("contact-phone-local-numbers-click", { bubbles: true })
|
|
135
139
|
/**
|
|
136
140
|
* Triggered on click interaction with "Contact us by email" link
|
|
137
141
|
* @public
|
|
142
|
+
* @param { MouseEvent | Event } originalEvent
|
|
138
143
|
* @allowPreventDefault
|
|
139
144
|
*/
|
|
140
145
|
@event("contact-email-click", { bubbles: true })
|
|
141
146
|
/**
|
|
142
147
|
* Triggered on click interaction with "Contact us by chat" link
|
|
143
148
|
* @public
|
|
149
|
+
* @param { MouseEvent | Event } originalEvent
|
|
144
150
|
* @allowPreventDefault
|
|
145
151
|
*/
|
|
146
152
|
@event("contact-chat-click", { bubbles: true })
|
|
147
153
|
/**
|
|
148
154
|
* Triggered on click interaction with a link within "Quick Links" category
|
|
149
155
|
* @public
|
|
156
|
+
* @param { MouseEvent | Event } originalEvent
|
|
157
|
+
* @param { HTMLElement } sourceNode
|
|
158
|
+
* @param { string | undefined } name
|
|
150
159
|
* @allowPreventDefault
|
|
151
160
|
*/
|
|
152
161
|
@event("quick-links-click", { bubbles: true })
|
|
153
162
|
/**
|
|
154
163
|
* Triggered on click interaction with a link within "Trending" category
|
|
155
164
|
* @public
|
|
165
|
+
* @param { MouseEvent | Event } originalEvent
|
|
166
|
+
* @param { HTMLElement } sourceNode
|
|
167
|
+
* @param { string | undefined } name
|
|
168
|
+
* @param { string } [id]
|
|
156
169
|
* @allowPreventDefault
|
|
157
170
|
*/
|
|
158
171
|
@event("trending-click", { bubbles: true })
|
|
159
172
|
/**
|
|
160
173
|
* Triggered on click interaction with a link within "About SAP" category
|
|
161
174
|
* @public
|
|
175
|
+
* @param { MouseEvent | Event } originalEvent
|
|
176
|
+
* @param { HTMLElement } sourceNode
|
|
177
|
+
* @param { string | undefined } name
|
|
178
|
+
* @param { string } [id]
|
|
162
179
|
* @allowPreventDefault
|
|
163
180
|
*/
|
|
164
181
|
@event("about-sap-click", { bubbles: true })
|
|
165
182
|
/**
|
|
166
183
|
* Triggered on click interaction with a link within "Site Information" category
|
|
167
184
|
* @public
|
|
185
|
+
* @param { MouseEvent | Event } originalEvent
|
|
186
|
+
* @param { HTMLElement } sourceNode
|
|
187
|
+
* @param { string | undefined } name
|
|
188
|
+
* @param { string } [id]
|
|
168
189
|
* @allowPreventDefault
|
|
169
190
|
*/
|
|
170
191
|
@event("site-information-click", { bubbles: true })
|
|
171
192
|
/**
|
|
172
193
|
* Triggered on click interaction with any of the social media links within footer
|
|
173
194
|
* @public
|
|
195
|
+
* @param { MouseEvent | Event } originalEvent
|
|
196
|
+
* @param { HTMLElement } sourceNode
|
|
197
|
+
* @param { string | undefined } name
|
|
198
|
+
* @param { string } [id]
|
|
174
199
|
* @allowPreventDefault
|
|
175
200
|
*/
|
|
176
201
|
@event("social-media-link-click", { bubbles: true })
|
|
@@ -178,6 +203,8 @@ type DetailedEvents = "quick-links-click" | "trending-click" | "about-sap-click"
|
|
|
178
203
|
/**
|
|
179
204
|
* Triggered when the user clicks on an accordion item.
|
|
180
205
|
* @public
|
|
206
|
+
* @param { string | undefined } name
|
|
207
|
+
* @param { boolean } expanded
|
|
181
208
|
*/
|
|
182
209
|
@event("accordion-item-click", { bubbles: true })
|
|
183
210
|
|
|
@@ -417,6 +444,22 @@ class UDExFooter extends UI5Element {
|
|
|
417
444
|
@property({ type: String })
|
|
418
445
|
chineseIcpNumberLink: string = chineseICPDefaultLink;
|
|
419
446
|
|
|
447
|
+
/**
|
|
448
|
+
* Defines text for the chinese ICP Number
|
|
449
|
+
*
|
|
450
|
+
* @public
|
|
451
|
+
*/
|
|
452
|
+
@property({ type: String })
|
|
453
|
+
chineseIcpNumber!: string;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Defines text for the chinese security network number
|
|
457
|
+
*
|
|
458
|
+
* @public
|
|
459
|
+
*/
|
|
460
|
+
@property({ type: String })
|
|
461
|
+
chineseSecurityNetworkNumber!: string;
|
|
462
|
+
|
|
420
463
|
/**
|
|
421
464
|
* Defines should render the mobile navigation.
|
|
422
465
|
*
|
|
@@ -532,12 +575,12 @@ class UDExFooter extends UI5Element {
|
|
|
532
575
|
return UDExFooter.i18nBundle.getText(COPYRIGHT, new Date().getFullYear());
|
|
533
576
|
}
|
|
534
577
|
|
|
535
|
-
get
|
|
536
|
-
return `${UDExFooter.i18nBundle.getText(ICP_NUMBER)} `;
|
|
578
|
+
get chineseICPNumberText(): string {
|
|
579
|
+
return this.chineseIcpNumber ? `${this.chineseIcpNumber} ` : `${UDExFooter.i18nBundle.getText(ICP_NUMBER)} `;
|
|
537
580
|
}
|
|
538
581
|
|
|
539
|
-
get
|
|
540
|
-
return UDExFooter.i18nBundle.getText(PUBLIC_SECURITY_NETWORK_NUMBER);
|
|
582
|
+
get chineseSecurityNetworkNumberText(): string {
|
|
583
|
+
return this.chineseSecurityNetworkNumber ?? UDExFooter.i18nBundle.getText(PUBLIC_SECURITY_NETWORK_NUMBER);
|
|
541
584
|
}
|
|
542
585
|
|
|
543
586
|
get isMobile(): boolean {
|