@sapudex/web-components 2.20.1 → 2.21.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 +2 -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/support/component-imports.instrumented.ts +4 -0
- package/cypress/support/component-imports.src.ts +4 -0
- package/dist/AssetsVariables.js +4 -0
- package/dist/AssetsVariables.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/Footer.d.ts +14 -2
- package/dist/Footer.js +10 -4
- package/dist/Footer.js.map +1 -1
- package/dist/FooterTemplate.js +3 -3
- package/dist/FooterTemplate.js.map +1 -1
- package/dist/assets/{InputSuggestions-yR1p8cXL.js → InputSuggestions-B0P5JAFd.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-BovnAV24.js → ListItemStandardExpandableTextTemplate-CFj3_UAT.js} +1 -1
- package/dist/assets/{bundle.esm-C7AybWk0.js → bundle.esm-BaPBMfCT.js} +216 -210
- 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/MediaPlayer.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 +694 -207
- package/dist/custom-elements.json +597 -135
- 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/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/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 +104 -0
- package/dist/web-types.json +232 -1
- package/package.json +1 -1
- package/src/AssetsVariables.ts +4 -0
- 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/Footer.ts +20 -4
- package/src/FooterTemplate.tsx +29 -39
- 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/MediaPlayer.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/MediaPlayer.css +1 -1
- package/dist/assets/messagebundle_en-BhTYnZbC.js +0 -1
package/bundle.esm.js
CHANGED
|
@@ -45,6 +45,8 @@ import "./dist/FilterMenu.js";
|
|
|
45
45
|
import "./dist/FilterMenuGroupHeader.js";
|
|
46
46
|
import "./dist/FilterMenuItem.js";
|
|
47
47
|
import "./dist/FilterMenuSelectAll.js";
|
|
48
|
+
import "./dist/Feed.js";
|
|
49
|
+
import "./dist/FeedItem.js";
|
|
48
50
|
import "./dist/Footer.js";
|
|
49
51
|
import "./dist/HeroBanner.js";
|
|
50
52
|
import "./dist/ImageGridTicker.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { UDExFeed } from "../support/component-imports.js";
|
|
2
|
+
|
|
3
|
+
const iconName = "add";
|
|
4
|
+
const imageLabel = "image label";
|
|
5
|
+
const imageUrl = "test.com";
|
|
6
|
+
const header = "Feed header";
|
|
7
|
+
const button = "Feed button";
|
|
8
|
+
const buttonDesign = "Tertiary";
|
|
9
|
+
const accessibleName = "Feed label";
|
|
10
|
+
|
|
11
|
+
const feed = <UDExFeed icon={iconName} image-label={imageLabel} header={header} button={button} button-design={buttonDesign} accessible-name={accessibleName}></UDExFeed>
|
|
12
|
+
const feedWithImage = <UDExFeed image-url={imageUrl} image-label={imageLabel}></UDExFeed>
|
|
13
|
+
|
|
14
|
+
describe("Feed", () => {
|
|
15
|
+
it("renders simple feed", () => {
|
|
16
|
+
cy.mount(feed)
|
|
17
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__container").should("be.visible");
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("renders feed with icon", () => {
|
|
21
|
+
cy.mount(feed)
|
|
22
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__pictogram").should("have.attr", "title", imageLabel);
|
|
23
|
+
cy.get("[udex-feed]").shadow().find("[ui5-icon]").should("have.attr", "name", iconName);
|
|
24
|
+
cy.get("[udex-feed]").shadow().find("[ui5-icon]").should("have.attr", "accessible-name", imageLabel);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("renders feed with image", () => {
|
|
28
|
+
cy.mount(feedWithImage)
|
|
29
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__icon").should("have.attr", "src", imageUrl);
|
|
30
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__icon").should("have.attr", "aria-label", imageLabel);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("renders feed with header", () => {
|
|
34
|
+
cy.mount(feed)
|
|
35
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__header").should("have.text", header);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("renders feed with label", () => {
|
|
39
|
+
cy.mount(feed)
|
|
40
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__container").should("have.attr", "aria-label", accessibleName);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
describe("Feed - button", () => {
|
|
45
|
+
beforeEach(() => {
|
|
46
|
+
cy.mount(feed)
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it("renders feed with button", () => {
|
|
50
|
+
cy.get("[udex-feed]").shadow().find(".udex-feed__footer").should("be.visible");
|
|
51
|
+
cy.get("[udex-feed]").shadow().find("[udex-button]").shadow().find("button").should("have.attr", "aria-label", button);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("renders feed with default desktop size", () => {
|
|
55
|
+
cy.get("[udex-feed]").shadow().find("[udex-button]").should("have.attr", "size", "Large");
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it("renders feed with button Tertiary design", () => {
|
|
59
|
+
cy.get("[udex-feed]").shadow().find("[udex-button]").should("have.attr", "design", buttonDesign);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("button click emits \"button-click\" event", () => {
|
|
63
|
+
const stub = cy.stub();
|
|
64
|
+
cy.get("[udex-feed]").then($tiles => {
|
|
65
|
+
$tiles.get(0).addEventListener("button-click", stub);
|
|
66
|
+
});
|
|
67
|
+
cy.get("[udex-feed]").shadow().find("[udex-button]").click()
|
|
68
|
+
.then(() => {
|
|
69
|
+
expect(stub).to.have.been.called;
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { UDExFeedItem, UDExAvatar } from "../support/component-imports.js";
|
|
2
|
+
import { UDExTarget } from "../../src/types/common.js";
|
|
3
|
+
|
|
4
|
+
const text = "Feed link text";
|
|
5
|
+
const href = "href";
|
|
6
|
+
const target = UDExTarget._self;
|
|
7
|
+
const details = "Additional details";
|
|
8
|
+
const date = new Date().toString();
|
|
9
|
+
const location = "New York, US";
|
|
10
|
+
const icon = "appointment-2";
|
|
11
|
+
const iconAccessibleName = "icon label";
|
|
12
|
+
const accessibleName = "Feed label";
|
|
13
|
+
const avatarInitials = "AB";
|
|
14
|
+
|
|
15
|
+
const textFeedItem = <UDExFeedItem text={text} href={href} target={target} details={details} accessible-name={accessibleName}></UDExFeedItem>
|
|
16
|
+
const blogFeedItem = <UDExFeedItem text={text} href={href}><UDExAvatar slot="avatar" initials={avatarInitials}></UDExAvatar></UDExFeedItem>
|
|
17
|
+
const eventFeedItem = <UDExFeedItem text={text} href={href} date={date} location={location}></UDExFeedItem>
|
|
18
|
+
const iconFeedItem = <UDExFeedItem text={text} href={href} icon={icon} icon-accessible-name={iconAccessibleName}></UDExFeedItem>
|
|
19
|
+
|
|
20
|
+
describe("Feed item", () => {
|
|
21
|
+
it("renders feed item", () => {
|
|
22
|
+
cy.mount(textFeedItem)
|
|
23
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item").should("be.visible");
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("renders feed item with details", () => {
|
|
27
|
+
cy.mount(textFeedItem)
|
|
28
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__content").should("be.visible");
|
|
29
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__details").should("have.text", details);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it("renders feed item with link", () => {
|
|
33
|
+
cy.mount(textFeedItem)
|
|
34
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__content").should("be.visible");
|
|
35
|
+
cy.get("[udex-feed-item]").shadow().find("[udex-link]").should("have.attr", "href", href);
|
|
36
|
+
cy.get("[udex-feed-item]").shadow().find("[udex-link]").should("have.attr", "target", target);
|
|
37
|
+
cy.get("[udex-feed-item]").shadow().find("[udex-link]").should("have.attr", "accessible-name", accessibleName);
|
|
38
|
+
cy.get("[udex-feed-item]").shadow().find("[udex-link]").should("have.text", text);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("renders feed item with avatar", () => {
|
|
42
|
+
cy.mount(blogFeedItem)
|
|
43
|
+
cy.get("[udex-feed-item]").find("[udex-avatar]").should("have.attr", "initials", avatarInitials);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("renders feed item with date", () => {
|
|
47
|
+
cy.mount(eventFeedItem)
|
|
48
|
+
const dateElements = date.toLocaleString().split(" ");
|
|
49
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__date").should("have.attr", "aria-label", date);
|
|
50
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__day").should("have.text", dateElements[2]);
|
|
51
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__month").should("have.text", dateElements[1]);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("renders feed item with location", () => {
|
|
55
|
+
cy.mount(eventFeedItem)
|
|
56
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__content").should("be.visible");
|
|
57
|
+
cy.get("[udex-feed-item]").shadow().find(".udex-feed-item__location").should("have.text", location);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("renders feed item with icon", () => {
|
|
61
|
+
cy.mount(iconFeedItem)
|
|
62
|
+
cy.get("[udex-feed-item]").shadow().find("[ui5-icon]").should("have.attr", "name", icon);
|
|
63
|
+
cy.get("[udex-feed-item]").shadow().find("[ui5-icon]").should("have.attr", "accessible-name", iconAccessibleName);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe("Feed item - link", () => {
|
|
68
|
+
beforeEach(() => {
|
|
69
|
+
cy.mount(textFeedItem)
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("click item emits \"item-click\" event", () => {
|
|
73
|
+
const stub = cy.stub();
|
|
74
|
+
cy.get("[udex-feed-item]").then($el => {
|
|
75
|
+
$el.get(0).addEventListener("item-click", stub);
|
|
76
|
+
});
|
|
77
|
+
cy.get("[udex-feed-item]").shadow().find("[udex-link]").click()
|
|
78
|
+
.then(() => {
|
|
79
|
+
expect(stub).to.have.been.called;
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
@@ -7,6 +7,9 @@ const chineseLogoUrl = "./stories/footer/chinese-logo.svg";
|
|
|
7
7
|
const chineseLogoLink = "https://www.sap.cn/index.html";
|
|
8
8
|
const taglineUrl = "./stories/footer/tagline.svg";
|
|
9
9
|
const chineseTaglineUrl = "./stories/footer/chinese-tagline.svg";
|
|
10
|
+
const chineseSecurityNetworkNumber = "Custom number";
|
|
11
|
+
const chineseIcpNumber = "Custom ICP";
|
|
12
|
+
const chineseIcpNumberLink = "https://custom-url.com";
|
|
10
13
|
const url = 'http://test.com';
|
|
11
14
|
|
|
12
15
|
const defaultFooter = <UDExFooter
|
|
@@ -32,6 +35,29 @@ const defaultFooter = <UDExFooter
|
|
|
32
35
|
<UDExSocialMediaButton slot="customSocialLinks" url={url}></UDExSocialMediaButton>
|
|
33
36
|
</UDExFooter>
|
|
34
37
|
|
|
38
|
+
const customChineseFooter = <UDExFooter
|
|
39
|
+
id="footer"
|
|
40
|
+
logoLink="#test"
|
|
41
|
+
logoTitle="SAP Title"
|
|
42
|
+
logoAriaLabel="SAP Homepage"
|
|
43
|
+
logoUrl='https://cdn.udex.services.sap.com/dds/design-tokens/assets/logos/sap-logo.svg'
|
|
44
|
+
contactNumbersList='[{"country":"France","number":"400-619-0727"},{"country":"United State","number":"1-800-872-1727"}]'
|
|
45
|
+
localCountryNumbersLink='#'
|
|
46
|
+
chatWithUsLink='#'
|
|
47
|
+
quickLinks={JSON.stringify(quickLinks)}
|
|
48
|
+
trendingLinks = {JSON.stringify(trendingLinks)}
|
|
49
|
+
aboutLinks = {JSON.stringify(aboutLinks)}
|
|
50
|
+
siteInformationLinks = {JSON.stringify(siteInformationLinks)}
|
|
51
|
+
socialLinks = {JSON.stringify(socialLinks)}
|
|
52
|
+
contactUsLink='#'
|
|
53
|
+
tagline-alt={taglineAlt}
|
|
54
|
+
tagline-url={taglineUrl}
|
|
55
|
+
chinese-security-network-number={chineseSecurityNetworkNumber}
|
|
56
|
+
chinese-icp-number={chineseIcpNumber}
|
|
57
|
+
chinese-icp-number-link={chineseIcpNumberLink}>
|
|
58
|
+
<UDExSocialMediaButton slot="customSocialLinks" url={url}></UDExSocialMediaButton>
|
|
59
|
+
</UDExFooter>
|
|
60
|
+
|
|
35
61
|
describe("Footer", () => {
|
|
36
62
|
beforeEach(() => {
|
|
37
63
|
cy.mount(defaultFooter)
|
|
@@ -342,8 +368,12 @@ describe("Footer", () => {
|
|
|
342
368
|
})
|
|
343
369
|
});
|
|
344
370
|
|
|
345
|
-
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
describe("Footer chinese", () => {
|
|
374
|
+
describe("default", () => {
|
|
346
375
|
beforeEach(() => {
|
|
376
|
+
cy.mount(defaultFooter);
|
|
347
377
|
cy.viewport(1920, 1080);
|
|
348
378
|
setLanguage("zh_cn");
|
|
349
379
|
cy.get("#footer").shadow().as("footer");
|
|
@@ -366,4 +396,18 @@ describe("Footer", () => {
|
|
|
366
396
|
cy.get("@footer").find(".udex-footer__tagline-image-chinese").should("have.attr", "src", chineseTaglineUrl);
|
|
367
397
|
});
|
|
368
398
|
});
|
|
399
|
+
|
|
400
|
+
describe("custom", () => {
|
|
401
|
+
beforeEach(() => {
|
|
402
|
+
cy.mount(customChineseFooter);
|
|
403
|
+
cy.viewport(1920, 1080);
|
|
404
|
+
setLanguage("zh_cn");
|
|
405
|
+
cy.get("#footer").shadow().as("footer");
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
it("renders custom chinese icp details", () => {
|
|
409
|
+
cy.get("@footer").find(".udex-footer__copyright-chinese-text").should("have.text", `${chineseIcpNumber} ${chineseSecurityNetworkNumber}`)
|
|
410
|
+
cy.get("@footer").find(".udex-footer__copyright-chinese-link").should("have.attr", "href", chineseIcpNumberLink)
|
|
411
|
+
});
|
|
412
|
+
});
|
|
369
413
|
});
|
|
@@ -13,6 +13,8 @@ import UDExContactItem from "../../instrumented/ContactItem.js";
|
|
|
13
13
|
import UDExCountrySelector from "../../instrumented/CountrySelector.js";
|
|
14
14
|
import UDExDivider from "../../instrumented/Divider.js";
|
|
15
15
|
import UDExEventRibbon from "../../instrumented/EventRibbon.js";
|
|
16
|
+
import UDExFeed from "../../instrumented/Feed.js";
|
|
17
|
+
import UDExFeedItem from "../../instrumented/FeedItem.js";
|
|
16
18
|
import UDExFilterMenu from "../../instrumented/FilterMenu.js";
|
|
17
19
|
import UDExFilterMenuGroupHeader from "../../instrumented/FilterMenuGroupHeader.js";
|
|
18
20
|
import UDExFilterMenuItem from "../../instrumented/FilterMenuItem.js";
|
|
@@ -80,6 +82,8 @@ export {
|
|
|
80
82
|
UDExCountrySelector,
|
|
81
83
|
UDExDivider,
|
|
82
84
|
UDExEventRibbon,
|
|
85
|
+
UDExFeed,
|
|
86
|
+
UDExFeedItem,
|
|
83
87
|
UDExFilterMenu,
|
|
84
88
|
UDExFilterMenuGroupHeader,
|
|
85
89
|
UDExFilterMenuItem,
|
|
@@ -13,6 +13,8 @@ import UDExContactItem from "../../src/ContactItem.js";
|
|
|
13
13
|
import UDExCountrySelector from "../../src/CountrySelector.js";
|
|
14
14
|
import UDExDivider from "../../src/Divider.js";
|
|
15
15
|
import UDExEventRibbon from "../../src/EventRibbon.js";
|
|
16
|
+
import UDExFeed from "../../src/Feed.js";
|
|
17
|
+
import UDExFeedItem from "../../src/FeedItem.js";
|
|
16
18
|
import UDExFilterMenu from "../../src/FilterMenu.js";
|
|
17
19
|
import UDExFilterMenuGroupHeader from "../../src/FilterMenuGroupHeader.js";
|
|
18
20
|
import UDExFilterMenuItem from "../../src/FilterMenuItem.js";
|
|
@@ -80,6 +82,8 @@ export {
|
|
|
80
82
|
UDExCountrySelector,
|
|
81
83
|
UDExDivider,
|
|
82
84
|
UDExEventRibbon,
|
|
85
|
+
UDExFeed,
|
|
86
|
+
UDExFeedItem,
|
|
83
87
|
UDExFilterMenu,
|
|
84
88
|
UDExFilterMenuGroupHeader,
|
|
85
89
|
UDExFilterMenuItem,
|
package/dist/AssetsVariables.js
CHANGED
|
@@ -57,6 +57,10 @@ const variablesOverwrite = `
|
|
|
57
57
|
${getScopedVarName("--_ui5_input_focus_outline_color")}: var(--sapContent_FocusColor);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
[udex-feed] {
|
|
61
|
+
${getScopedVarName("--_ui5_icon_transform_scale")}: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
.sapUiSizeCompact,
|
|
61
65
|
.ui5-content-density-compact,
|
|
62
66
|
[data-ui5-compact-size] {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsVariables.js","sourceRoot":"","sources":["../src/AssetsVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAE/E,MAAM,kBAAkB,GAAG;IACvB,0BAA0B,EAAE;;;;IAI5B,gBAAgB,CAAC,mCAAmC,CAAC;;;IAGrD,gBAAgB,CAAC,2BAA2B,CAAC;;;IAG7C,gBAAgB,CAAC,0BAA0B,CAAC;;;IAG5C,gBAAgB,CAAC,sCAAsC,CAAC;IACxD,gBAAgB,CAAC,kCAAkC,CAAC;;;IAGpD,gBAAgB,CAAC,uBAAuB,CAAC;IACzC,gBAAgB,CAAC,wBAAwB,CAAC;IAC1C,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,2CAA2C,CAAC;IAC7D,gBAAgB,CAAC,8BAA8B,CAAC;IAChD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,iCAAiC,CAAC;IACnD,gBAAgB,CAAC,iCAAiC,CAAC;IACnD,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,4CAA4C,CAAC;IAC9D,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,wCAAwC,CAAC;IAC1D,gBAAgB,CAAC,uCAAuC,CAAC;IACzD,gBAAgB,CAAC,6CAA6C,CAAC;IAC/D,gBAAgB,CAAC,oDAAoD,CAAC;IACtE,gBAAgB,CAAC,gDAAgD,CAAC;IAClE,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,oCAAoC,CAAC;;;;MAIpD,gBAAgB,CAAC,uBAAuB,CAAC;;;;MAIzC,gBAAgB,CAAC,4CAA4C,CAAC;;;;MAI9D,gBAAgB,CAAC,2BAA2B,CAAC;MAC7C,gBAAgB,CAAC,kCAAkC,CAAC;MACpD,gBAAgB,CAAC,kCAAkC,CAAC;;;;;;;
|
|
1
|
+
{"version":3,"file":"AssetsVariables.js","sourceRoot":"","sources":["../src/AssetsVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAE/E,MAAM,kBAAkB,GAAG;IACvB,0BAA0B,EAAE;;;;IAI5B,gBAAgB,CAAC,mCAAmC,CAAC;;;IAGrD,gBAAgB,CAAC,2BAA2B,CAAC;;;IAG7C,gBAAgB,CAAC,0BAA0B,CAAC;;;IAG5C,gBAAgB,CAAC,sCAAsC,CAAC;IACxD,gBAAgB,CAAC,kCAAkC,CAAC;;;IAGpD,gBAAgB,CAAC,uBAAuB,CAAC;IACzC,gBAAgB,CAAC,wBAAwB,CAAC;IAC1C,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,2CAA2C,CAAC;IAC7D,gBAAgB,CAAC,8BAA8B,CAAC;IAChD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,iCAAiC,CAAC;IACnD,gBAAgB,CAAC,iCAAiC,CAAC;IACnD,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,+BAA+B,CAAC;IACjD,gBAAgB,CAAC,4CAA4C,CAAC;IAC9D,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,wCAAwC,CAAC;IAC1D,gBAAgB,CAAC,uCAAuC,CAAC;IACzD,gBAAgB,CAAC,6CAA6C,CAAC;IAC/D,gBAAgB,CAAC,oDAAoD,CAAC;IACtE,gBAAgB,CAAC,gDAAgD,CAAC;IAClE,gBAAgB,CAAC,gCAAgC,CAAC;IAClD,gBAAgB,CAAC,oCAAoC,CAAC;IACtD,gBAAgB,CAAC,oCAAoC,CAAC;;;;MAIpD,gBAAgB,CAAC,uBAAuB,CAAC;;;;MAIzC,gBAAgB,CAAC,4CAA4C,CAAC;;;;MAI9D,gBAAgB,CAAC,2BAA2B,CAAC;MAC7C,gBAAgB,CAAC,kCAAkC,CAAC;MACpD,gBAAgB,CAAC,kCAAkC,CAAC;;;;MAIpD,gBAAgB,CAAC,6BAA6B,CAAC;;;;;;;MAO/C,gBAAgB,CAAC,uBAAuB,CAAC;MACzC,gBAAgB,CAAC,wBAAwB,CAAC;MAC1C,gBAAgB,CAAC,oCAAoC,CAAC;MACtD,gBAAgB,CAAC,oCAAoC,CAAC;MACtD,gBAAgB,CAAC,+BAA+B,CAAC;MACjD,gBAAgB,CAAC,2CAA2C,CAAC;MAC7D,gBAAgB,CAAC,8BAA8B,CAAC;MAChD,gBAAgB,CAAC,+BAA+B,CAAC;MACjD,gBAAgB,CAAC,iCAAiC,CAAC;MACnD,gBAAgB,CAAC,uCAAuC,CAAC;MACzD,gBAAgB,CAAC,iCAAiC,CAAC;MACnD,gBAAgB,CAAC,gCAAgC,CAAC;MAClD,gBAAgB,CAAC,gCAAgC,CAAC;MAClD,gBAAgB,CAAC,+BAA+B,CAAC;MACjD,gBAAgB,CAAC,oCAAoC,CAAC;MACtD,gBAAgB,CAAC,oCAAoC,CAAC;;CAE3D,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { getScopedVarName } from \"@ui5/webcomponents-base/dist/CustomElementsScope.js\";\nimport getEffectiveScrollbarStyle from \"./utils/getEffectiveScrollbarStyle.js\";\n\nconst variablesOverwrite = `\n ${getEffectiveScrollbarStyle()}\n \n :root {\n /* Browser Scrollbar */\n ${getScopedVarName(\"--browser_scrollbar_border_radius\")}: var(--udexRadiusM, 8px);\n\n /* Tooltip */\n ${getScopedVarName(\"--_ui5_popover_box_shadow\")}: 0px 0px 0px 1px var(--udexColorGrey4);\n\n /* Tokenizer */\n ${getScopedVarName(\"--_ui5_tokenizer_padding\")}: var(--udexSpacer12, 12px);\n\n /* Carousel */\n ${getScopedVarName(\"--ui5_carousel_active_dot_background\")}: var(--udexColorBlue8, #0057D2);\n ${getScopedVarName(\"--ui5_carousel_active_dot_border\")}: 1px solid var(--udexColorBlue8, #0057D2);\n\n /* Calendar & Date Picker */\n ${getScopedVarName(\"--_ui5_calendar_width\")}: 371px;\n ${getScopedVarName(\"--_ui5_calendar_height\")}: auto;\n ${getScopedVarName(\"--_ui5_calendar_top_bottom_padding\")}: var(--udexSpacer8, 8px);\n ${getScopedVarName(\"--_ui5_calendar_left_right_padding\")}: var(--udexSpacer8, 8px);\n ${getScopedVarName(\"--_ui5_calendar_header_height\")}: 42px;\n ${getScopedVarName(\"--_ui5_calendar_header_arrow_button_width\")}: 42px;\n ${getScopedVarName(\"--_ui5_day_picker_item_width\")}: 42px;\n ${getScopedVarName(\"--_ui5_day_picker_item_height\")}: 42px;\n ${getScopedVarName(\"--_ui5_daypicker_weekname_color\")}: var(--udexColorGrey6, #5B738B);\n ${getScopedVarName(\"--_ui5_month_picker_item_height\")}: 36px;\n ${getScopedVarName(\"--_ui5_monthpicker_item_margin\")}: -8px 0 var(--udexSpacer16, 16px) 0;\n ${getScopedVarName(\"--_ui5_year_picker_item_height\")}: 36px;\n ${getScopedVarName(\"--_ui5_yearpicker_item_margin\")}: -8px 0 var(--udexSpacer16, 16px) 0;\n ${getScopedVarName(\"--_ui5_daypicker_daynames_container_height\")}: 42px;\n ${getScopedVarName(\"--_ui5_daypicker_dayname_color\")}: var(--udexColorGrey6, #5B738B);\n ${getScopedVarName(\"--_ui5_daypicker_item_now_border_color\")}: var(--udexColorPink8, #A100C2);\n ${getScopedVarName(\"--_ui5_daypicker_item_weeekend_filter\")}: none;\n ${getScopedVarName(\"--_ui5_daypicker_item_select_between_border\")}: 1px solid var(--udexColorBlue9, #0040B0);\n ${getScopedVarName(\"--_ui5_calendar_header_middle_button_focus_outline\")}: 1px solid var(--udexColorBlue9, #0040B0);\n ${getScopedVarName(\"--_ui5_calendar_header_arrow_button_box_shadow\")}: none;\n ${getScopedVarName(\"--_ui5_calendar_header_padding\")}: 0;\n ${getScopedVarName(\"--_ui5_calendar_left_right_padding\")}: 0;\n ${getScopedVarName(\"--_ui5_calendar_top_bottom_padding\")}: 0;\n \n /* Avatar */\n [udex-avatar].dark {\n ${getScopedVarName(\"--_ui5_avatar_outline\")}: var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--udexColorNeutralWhite, #FFFFFF);\n }\n\n [udex-search] {\n ${getScopedVarName(\"--_ui5_button_pressed_focused_border_color\")}: transparent;\n }\n \n [udex-upload] {\n ${getScopedVarName(\"--_ui5_input_focus_offset\")}: 2px;\n ${getScopedVarName(\"--_ui5_input_focus_border_radius\")}: 0.375rem;\n ${getScopedVarName(\"--_ui5_input_focus_outline_color\")}: var(--sapContent_FocusColor);\n }\n\n [udex-feed] {\n ${getScopedVarName(\"--_ui5_icon_transform_scale\")}: none;\n }\n\n .sapUiSizeCompact,\n .ui5-content-density-compact,\n [data-ui5-compact-size] {\n /* Calendar & Date Picker */\n ${getScopedVarName(\"--_ui5_calendar_width\")}: 371px;\n ${getScopedVarName(\"--_ui5_calendar_height\")}: auto;\n ${getScopedVarName(\"--_ui5_calendar_top_bottom_padding\")}: var(--udexSpacer8, 8px);\n ${getScopedVarName(\"--_ui5_calendar_left_right_padding\")}: var(--udexSpacer8, 8px);\n ${getScopedVarName(\"--_ui5_calendar_header_height\")}: 42px;\n ${getScopedVarName(\"--_ui5_calendar_header_arrow_button_width\")}: 42px;\n ${getScopedVarName(\"--_ui5_day_picker_item_width\")}: 42px;\n ${getScopedVarName(\"--_ui5_day_picker_item_height\")}: 42px;\n ${getScopedVarName(\"--_ui5_daypicker_weekname_color\")}: var(--udexColorGrey6, #5B738B);\n ${getScopedVarName(\"--_ui5_daypicker_item_weeekend_filter\")}: none;\n ${getScopedVarName(\"--_ui5_month_picker_item_height\")}: 36px;\n ${getScopedVarName(\"--_ui5_monthpicker_item_margin\")}: -8px 0 var(--udexSpacer16, 16px) 0;\n ${getScopedVarName(\"--_ui5_year_picker_item_height\")}: 36px;\n ${getScopedVarName(\"--_ui5_yearpicker_item_margin\")}: -8px 0 var(--udexSpacer16, 16px) 0;\n ${getScopedVarName(\"--_ui5_calendar_left_right_padding\")}: 0;\n ${getScopedVarName(\"--_ui5_calendar_top_bottom_padding\")}: 0;\n }\n`;\n\nexport default variablesOverwrite;\n"]}
|
package/dist/Feed.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import UDExButtonDesign from "./types/ButtonDesign.js";
|
|
3
|
+
import type UDExFeedItem from "./FeedItem.js";
|
|
4
|
+
/**
|
|
5
|
+
* @class
|
|
6
|
+
*
|
|
7
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* <h3>Usage</h3>
|
|
11
|
+
*
|
|
12
|
+
* For the <code>udex-feed</code>
|
|
13
|
+
* <h3>ES6 Module Import</h3>
|
|
14
|
+
*
|
|
15
|
+
* <code>import "@sapudex/web-components/dist/Feed.js";</code>
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* @constructor
|
|
19
|
+
* @extends UI5Element
|
|
20
|
+
* @tagname udex-feed
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
declare class UDExFeed extends UI5Element {
|
|
24
|
+
eventDetails: {
|
|
25
|
+
"button-click": void;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Slot for feed items.
|
|
29
|
+
*
|
|
30
|
+
* @slot items
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
33
|
+
items: Array<UDExFeedItem>;
|
|
34
|
+
/**
|
|
35
|
+
* Defines the UI5 icon name in the pictogram section.
|
|
36
|
+
*
|
|
37
|
+
* @default ""
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
icon?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the image URL in the pictogram section.
|
|
43
|
+
*
|
|
44
|
+
* @default ""
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
imageUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Defines the image aria label and alt in the pictogram section.
|
|
50
|
+
*
|
|
51
|
+
* @default ""
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
imageLabel?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the header text of the component.
|
|
57
|
+
*
|
|
58
|
+
* @default ""
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
header?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the CTA button label
|
|
64
|
+
*
|
|
65
|
+
* @default ""
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
button?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Defines the CTA button design
|
|
71
|
+
*
|
|
72
|
+
* @default "UDExButtonDesign.Secondary"
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
buttonDesign: UDExButtonDesign;
|
|
76
|
+
/**
|
|
77
|
+
* Defines the accessible ARIA name of the component.
|
|
78
|
+
*
|
|
79
|
+
* @default undefined
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
accessibleName?: string;
|
|
83
|
+
get _showPictogram(): boolean;
|
|
84
|
+
get _showImage(): boolean;
|
|
85
|
+
get _imageLabel(): string;
|
|
86
|
+
handleCTAButtonClick(): void;
|
|
87
|
+
}
|
|
88
|
+
export default UDExFeed;
|
package/dist/Feed.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
10
|
+
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
11
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
12
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
13
|
+
import UDExButtonDesign from "./types/ButtonDesign.js";
|
|
14
|
+
import FeedItem from "./FeedItem.js";
|
|
15
|
+
import FeedTemplate from "./FeedTemplate.js";
|
|
16
|
+
// Styles
|
|
17
|
+
import FeedCss from "./generated/themes/Feed.css.js";
|
|
18
|
+
/**
|
|
19
|
+
* @class
|
|
20
|
+
*
|
|
21
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* <h3>Usage</h3>
|
|
25
|
+
*
|
|
26
|
+
* For the <code>udex-feed</code>
|
|
27
|
+
* <h3>ES6 Module Import</h3>
|
|
28
|
+
*
|
|
29
|
+
* <code>import "@sapudex/web-components/dist/Feed.js";</code>
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* @constructor
|
|
33
|
+
* @extends UI5Element
|
|
34
|
+
* @tagname udex-feed
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
let UDExFeed = class UDExFeed extends UI5Element {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
/**
|
|
41
|
+
* Defines the CTA button design
|
|
42
|
+
*
|
|
43
|
+
* @default "UDExButtonDesign.Secondary"
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
this.buttonDesign = UDExButtonDesign.Secondary;
|
|
47
|
+
}
|
|
48
|
+
get _showPictogram() {
|
|
49
|
+
return !!this.icon || !!this.imageUrl;
|
|
50
|
+
}
|
|
51
|
+
get _showImage() {
|
|
52
|
+
return !this.icon && !!this.imageUrl;
|
|
53
|
+
}
|
|
54
|
+
get _imageLabel() {
|
|
55
|
+
return this.imageLabel || "";
|
|
56
|
+
}
|
|
57
|
+
handleCTAButtonClick() {
|
|
58
|
+
this.fireDecoratorEvent("button-click");
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
__decorate([
|
|
62
|
+
slot({ type: HTMLElement, individualSlots: true })
|
|
63
|
+
], UDExFeed.prototype, "items", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: String })
|
|
66
|
+
], UDExFeed.prototype, "icon", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
property({ type: String })
|
|
69
|
+
], UDExFeed.prototype, "imageUrl", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({ type: String })
|
|
72
|
+
], UDExFeed.prototype, "imageLabel", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
property({ type: String })
|
|
75
|
+
], UDExFeed.prototype, "header", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: String })
|
|
78
|
+
], UDExFeed.prototype, "button", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
property()
|
|
81
|
+
], UDExFeed.prototype, "buttonDesign", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property()
|
|
84
|
+
], UDExFeed.prototype, "accessibleName", void 0);
|
|
85
|
+
UDExFeed = __decorate([
|
|
86
|
+
customElement({
|
|
87
|
+
tag: "udex-feed",
|
|
88
|
+
renderer: jsxRenderer,
|
|
89
|
+
styles: FeedCss,
|
|
90
|
+
template: FeedTemplate,
|
|
91
|
+
dependencies: [FeedItem],
|
|
92
|
+
})
|
|
93
|
+
/**
|
|
94
|
+
* Triggered when the user clicks on the CTA button
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
,
|
|
99
|
+
event("button-click", { cancelable: true, bubbles: true })
|
|
100
|
+
], UDExFeed);
|
|
101
|
+
UDExFeed.define();
|
|
102
|
+
export default UDExFeed;
|
|
103
|
+
//# sourceMappingURL=Feed.js.map
|
package/dist/Feed.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Feed.js","sourceRoot":"","sources":["../src/Feed.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,SAAS;AACT,OAAO,OAAO,MAAM,gCAAgC,CAAC;AAErD;;;;;;;;;;;;;;;;;;GAkBG;AAgBH,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QA0DE;;;;;WAKG;QAED,iBAAY,GAAqB,gBAAgB,CAAC,SAAS,CAAC;IA0BhE,CAAC;IAfC,IAAI,cAAc;QAChB,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IACvC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;CACF,CAAA;AAhFG;IADD,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;uCACrB;AAS5B;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCACX;AASd;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACP;AASlB;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACL;AASpB;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACT;AAShB;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACT;AAShB;IADD,QAAQ,EAAE;8CACmD;AAS5D;IADD,QAAQ,EAAE;gDACe;AA1EtB,QAAQ;IAfb,aAAa,CAAC;QACb,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,CAAC,QAAQ,CAAC;KACzB,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;GAErD,QAAQ,CA2Fb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport UDExButtonDesign from \"./types/ButtonDesign.js\";\nimport FeedItem from \"./FeedItem.js\";\nimport type UDExFeedItem from \"./FeedItem.js\";\nimport FeedTemplate from \"./FeedTemplate.js\";\n\n// Styles\nimport FeedCss from \"./generated/themes/Feed.css.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-feed</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/Feed.js\";</code>\n *\n *\n * @constructor\n * @extends UI5Element\n * @tagname udex-feed\n * @public\n */\n@customElement({\n tag: \"udex-feed\",\n renderer: jsxRenderer,\n styles: FeedCss,\n template: FeedTemplate,\n dependencies: [FeedItem],\n})\n\n/**\n * Triggered when the user clicks on the CTA button\n *\n * @public\n */\n@event(\"button-click\", { cancelable: true, bubbles: true })\n\nclass UDExFeed extends UI5Element {\n eventDetails!: {\n \"button-click\": void\n };\n /**\n * Slot for feed items.\n *\n * @slot items\n * @public\n */\n @slot({ type: HTMLElement, individualSlots: true })\n items!: Array<UDExFeedItem>;\n\n /**\n * Defines the UI5 icon name in the pictogram section.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Defines the image URL in the pictogram section.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n imageUrl?: string;\n\n /**\n * Defines the image aria label and alt in the pictogram section.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n imageLabel?: string;\n\n /**\n * Defines the header text of the component.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n header?: string;\n\n /**\n * Defines the CTA button label\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n button?: string;\n\n /**\n * Defines the CTA button design\n *\n * @default \"UDExButtonDesign.Secondary\"\n * @public\n */\n @property()\n buttonDesign: UDExButtonDesign = UDExButtonDesign.Secondary;\n\n /**\n * Defines the accessible ARIA name of the component.\n *\n * @default undefined\n * @public\n */\n @property()\n accessibleName?: string;\n\n get _showPictogram(): boolean {\n return !!this.icon || !!this.imageUrl;\n }\n\n get _showImage(): boolean {\n return !this.icon && !!this.imageUrl;\n }\n\n get _imageLabel(): string {\n return this.imageLabel || \"\";\n }\n\n handleCTAButtonClick() {\n this.fireDecoratorEvent(\"button-click\");\n }\n}\n\nUDExFeed.define();\n\nexport default UDExFeed;\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
|
+
import { UDExTarget } from "./types/common.js";
|
|
3
|
+
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
4
|
+
type UDExFeedItemClickEventDetail = {
|
|
5
|
+
originalEvent: Event;
|
|
6
|
+
item: UDExFeedItem;
|
|
7
|
+
};
|
|
8
|
+
export type FeedDate = {
|
|
9
|
+
day: string;
|
|
10
|
+
month: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @class
|
|
14
|
+
*
|
|
15
|
+
* <h3 class="comment-api-title">Overview</h3>
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* <h3>Usage</h3>
|
|
19
|
+
*
|
|
20
|
+
* For the <code>udex-feed-item</code>
|
|
21
|
+
* <h3>ES6 Module Import</h3>
|
|
22
|
+
*
|
|
23
|
+
* <code>import "@sapudex/web-components/dist/FeedItem.js";</code>
|
|
24
|
+
*
|
|
25
|
+
* @constructor
|
|
26
|
+
* @extends UI5Element
|
|
27
|
+
* @tagname udex-feed-item
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
declare class UDExFeedItem extends UI5Element {
|
|
31
|
+
eventDetails: {
|
|
32
|
+
"item-click": UDExFeedItemClickEventDetail;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Defines the link text
|
|
36
|
+
*
|
|
37
|
+
* @default undefined
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
text?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Defines the link text URL
|
|
43
|
+
*
|
|
44
|
+
* @default ""
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
href: string;
|
|
48
|
+
/**
|
|
49
|
+
* Defines target for the link
|
|
50
|
+
*
|
|
51
|
+
* @default UDExTarget._self
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
target: UDExTarget;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the link text details
|
|
57
|
+
*
|
|
58
|
+
* @default undefined
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
details?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Defines the accessible ARIA name of the link.
|
|
64
|
+
*
|
|
65
|
+
* @default undefined
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
accessibleName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Defines the date of the event
|
|
71
|
+
*
|
|
72
|
+
* @default undefined
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
date?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Defines the location of the event
|
|
78
|
+
*
|
|
79
|
+
* @default undefined
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
location?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Defines the UI5 icon name
|
|
85
|
+
*
|
|
86
|
+
* @default undefined
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
icon?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Defines the UI5 icon label
|
|
92
|
+
*
|
|
93
|
+
* @default undefined
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
iconAccessibleName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Receives the avatar
|
|
99
|
+
*
|
|
100
|
+
* @slot avatar
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
avatar: Array<HTMLElement>;
|
|
104
|
+
static i18nBundle: I18nBundle;
|
|
105
|
+
get _date(): FeedDate;
|
|
106
|
+
get _showAvatar(): boolean;
|
|
107
|
+
get _showIcon(): boolean;
|
|
108
|
+
get _showDate(): boolean;
|
|
109
|
+
get locationIconLabel(): string;
|
|
110
|
+
formatDate(d: string | undefined): FeedDate;
|
|
111
|
+
handleLinkClick(e: Event): void;
|
|
112
|
+
}
|
|
113
|
+
export default UDExFeedItem;
|
|
114
|
+
export type { UDExFeedItemClickEventDetail };
|