@sapudex/web-components 2.20.0 → 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/Carousel.d.ts +29 -2
- package/dist/Carousel.js +34 -6
- package/dist/Carousel.js.map +1 -1
- package/dist/CarouselTemplate.js +2 -2
- package/dist/CarouselTemplate.js.map +1 -1
- package/dist/DatePicker.d.ts +4 -4
- package/dist/DatePicker.js +3 -10
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePickerPopoverTemplate.d.ts +2 -0
- package/dist/DatePickerPopoverTemplate.js +13 -0
- package/dist/DatePickerPopoverTemplate.js.map +1 -0
- package/dist/DatePickerTemplate.d.ts +2 -0
- package/dist/DatePickerTemplate.js +7 -0
- package/dist/DatePickerTemplate.js.map +1 -0
- 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/MediaPlayerTemplate.js +2 -2
- package/dist/MediaPlayerTemplate.js.map +1 -1
- package/dist/MessageStripTemplate.js +3 -1
- package/dist/MessageStripTemplate.js.map +1 -1
- package/dist/RatingBarTemplate.js +1 -1
- package/dist/RatingBarTemplate.js.map +1 -1
- package/dist/Review.js +3 -6
- package/dist/Review.js.map +1 -1
- package/dist/ReviewItem.d.ts +1 -1
- package/dist/ReviewItem.js +15 -18
- package/dist/ReviewItem.js.map +1 -1
- package/dist/ReviewItemTemplate.d.ts +2 -0
- package/dist/ReviewItemTemplate.js +10 -0
- package/dist/ReviewItemTemplate.js.map +1 -0
- package/dist/ReviewTemplate.d.ts +2 -0
- package/dist/ReviewTemplate.js +9 -0
- package/dist/ReviewTemplate.js.map +1 -0
- package/dist/TileTemplate.js +1 -1
- package/dist/TileTemplate.js.map +1 -1
- package/dist/assets/{InputSuggestions-DOj9B3SE.js → InputSuggestions-B0P5JAFd.js} +1 -1
- package/dist/assets/{ListItemStandardExpandableTextTemplate-C6q5EhEr.js → ListItemStandardExpandableTextTemplate-CFj3_UAT.js} +1 -1
- package/dist/assets/{bundle.esm-CmHUshBw.js → bundle.esm-BaPBMfCT.js} +211 -205
- 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 +533 -0
- package/dist/custom-elements.json +507 -0
- 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 +114 -0
- package/dist/web-types.json +255 -1
- package/package.json +1 -1
- package/src/AssetsVariables.ts +4 -0
- package/src/Carousel.ts +36 -6
- package/src/CarouselTemplate.tsx +4 -0
- package/src/DatePicker.ts +7 -11
- package/src/DatePickerPopoverTemplate.tsx +35 -0
- package/src/DatePickerTemplate.tsx +27 -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/MediaPlayerTemplate.tsx +20 -19
- package/src/MessageStripTemplate.tsx +4 -2
- package/src/RatingBarTemplate.tsx +1 -0
- package/src/Review.ts +3 -6
- package/src/ReviewItem.ts +15 -19
- package/src/ReviewItemTemplate.tsx +49 -0
- package/src/ReviewTemplate.tsx +69 -0
- package/src/TileTemplate.tsx +1 -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/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/dist/generated/templates/DatePickerPopoverTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +0 -10
- package/dist/generated/templates/DatePickerPopoverTemplate.lit.js.map +0 -1
- package/dist/generated/templates/DatePickerTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/DatePickerTemplate.lit.js +0 -10
- package/dist/generated/templates/DatePickerTemplate.lit.js.map +0 -1
- package/dist/generated/templates/ReviewItemTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/ReviewItemTemplate.lit.js +0 -10
- package/dist/generated/templates/ReviewItemTemplate.lit.js.map +0 -1
- package/dist/generated/templates/ReviewTemplate.lit.d.ts +0 -3
- package/dist/generated/templates/ReviewTemplate.lit.js +0 -12
- package/dist/generated/templates/ReviewTemplate.lit.js.map +0 -1
- package/src/DatePicker.hbs +0 -19
- package/src/DatePickerPopover.hbs +0 -24
- package/src/Review.hbs +0 -44
- package/src/ReviewItem.hbs +0 -20
- package/src/generated/templates/DatePickerPopoverTemplate.lit.ts +0 -14
- package/src/generated/templates/DatePickerTemplate.lit.ts +0 -14
- package/src/generated/templates/ReviewItemTemplate.lit.ts +0 -14
- package/src/generated/templates/ReviewTemplate.lit.ts +0 -16
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;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C,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/Carousel.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
2
2
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
3
3
|
import type UI5Carousel from "@ui5/webcomponents/dist/Carousel.js";
|
|
4
|
+
import type { UI5CustomEvent } from "@ui5/webcomponents-base";
|
|
5
|
+
import type CarouselPageIndicatorType from "@ui5/webcomponents/dist/types/CarouselPageIndicatorType.js";
|
|
6
|
+
import type UDExButton from "./Button.js";
|
|
4
7
|
export declare enum UDExCarouselNavigationPosition {
|
|
5
8
|
top = "top",
|
|
6
9
|
bottom = "bottom"
|
|
@@ -47,6 +50,30 @@ declare class UDExCarousel extends UI5Element {
|
|
|
47
50
|
* @public
|
|
48
51
|
*/
|
|
49
52
|
items: Array<HTMLElement>;
|
|
53
|
+
/**
|
|
54
|
+
* Defines the number of items per page depending on the carousel width.
|
|
55
|
+
*
|
|
56
|
+
* - 'S' for screens smaller than 600 pixels.
|
|
57
|
+
* - 'M' for screens greater than or equal to 600 pixels and smaller than 1024 pixels.
|
|
58
|
+
* - 'L' for screens greater than or equal to 1024 pixels and smaller than 1440 pixels.
|
|
59
|
+
* - 'XL' for screens greater than or equal to 1440 pixels.
|
|
60
|
+
*
|
|
61
|
+
* One item per page is shown by default.
|
|
62
|
+
* @default "S1 M1 L1 XL1"
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
itemsPerPage: string;
|
|
66
|
+
/**
|
|
67
|
+
* Defines the style of the page indicator.
|
|
68
|
+
* Available options are:
|
|
69
|
+
*
|
|
70
|
+
* - `Default` - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)
|
|
71
|
+
* - `Numeric` - The page indicator will display the current page and the total number of pages. (e.g. X of Y)
|
|
72
|
+
* @since 1.10
|
|
73
|
+
* @default "Default"
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
pageIndicatorType: `${CarouselPageIndicatorType}`;
|
|
50
77
|
/**
|
|
51
78
|
* Defines the prev button is disabled
|
|
52
79
|
*
|
|
@@ -81,8 +108,8 @@ declare class UDExCarousel extends UI5Element {
|
|
|
81
108
|
get _carousel(): UI5Carousel | null;
|
|
82
109
|
get _ui5CarouselRoot(): HTMLElement | null | undefined;
|
|
83
110
|
_calculateDisabledButtonsState(): void;
|
|
84
|
-
_prevButtonClick(): void;
|
|
85
|
-
_nextButtonClick(): void;
|
|
111
|
+
_prevButtonClick(e: UI5CustomEvent<UDExButton, "click">): void;
|
|
112
|
+
_nextButtonClick(e: UI5CustomEvent<UDExButton, "click">): void;
|
|
86
113
|
_onkeydown(e: KeyboardEvent): void;
|
|
87
114
|
onAfterRendering(): void;
|
|
88
115
|
}
|
package/dist/Carousel.js
CHANGED
|
@@ -60,6 +60,30 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
60
60
|
* @public
|
|
61
61
|
*/
|
|
62
62
|
this.navigationPlacement = UDExCarouselNavigationPosition.top;
|
|
63
|
+
/**
|
|
64
|
+
* Defines the number of items per page depending on the carousel width.
|
|
65
|
+
*
|
|
66
|
+
* - 'S' for screens smaller than 600 pixels.
|
|
67
|
+
* - 'M' for screens greater than or equal to 600 pixels and smaller than 1024 pixels.
|
|
68
|
+
* - 'L' for screens greater than or equal to 1024 pixels and smaller than 1440 pixels.
|
|
69
|
+
* - 'XL' for screens greater than or equal to 1440 pixels.
|
|
70
|
+
*
|
|
71
|
+
* One item per page is shown by default.
|
|
72
|
+
* @default "S1 M1 L1 XL1"
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
this.itemsPerPage = "S1 M1 L1 XL1";
|
|
76
|
+
/**
|
|
77
|
+
* Defines the style of the page indicator.
|
|
78
|
+
* Available options are:
|
|
79
|
+
*
|
|
80
|
+
* - `Default` - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)
|
|
81
|
+
* - `Numeric` - The page indicator will display the current page and the total number of pages. (e.g. X of Y)
|
|
82
|
+
* @since 1.10
|
|
83
|
+
* @default "Default"
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
this.pageIndicatorType = "Default";
|
|
63
87
|
/**
|
|
64
88
|
* Defines the accessible ARIA name of the component.
|
|
65
89
|
*
|
|
@@ -102,20 +126,18 @@ let UDExCarousel = UDExCarousel_1 = class UDExCarousel extends UI5Element {
|
|
|
102
126
|
this.isPrevButtonDisabled = !this._carousel?.hasPrev;
|
|
103
127
|
this.isNextButtonDisabled = !this._carousel?.hasNext;
|
|
104
128
|
}
|
|
105
|
-
_prevButtonClick() {
|
|
129
|
+
_prevButtonClick(e) {
|
|
106
130
|
if (this.isPrevButtonDisabled) {
|
|
107
131
|
return;
|
|
108
132
|
}
|
|
109
|
-
this._carousel?.
|
|
110
|
-
this._ui5CarouselRoot?.focus();
|
|
133
|
+
this._carousel?._navButtonClick(e);
|
|
111
134
|
this._calculateDisabledButtonsState();
|
|
112
135
|
}
|
|
113
|
-
_nextButtonClick() {
|
|
136
|
+
_nextButtonClick(e) {
|
|
114
137
|
if (this.isNextButtonDisabled) {
|
|
115
138
|
return;
|
|
116
139
|
}
|
|
117
|
-
this._carousel?.
|
|
118
|
-
this._ui5CarouselRoot?.focus();
|
|
140
|
+
this._carousel?._navButtonClick(e);
|
|
119
141
|
this._calculateDisabledButtonsState();
|
|
120
142
|
}
|
|
121
143
|
_onkeydown(e) {
|
|
@@ -134,6 +156,12 @@ __decorate([
|
|
|
134
156
|
__decorate([
|
|
135
157
|
slot({ "default": true, type: HTMLElement, individualSlots: true })
|
|
136
158
|
], UDExCarousel.prototype, "items", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
property()
|
|
161
|
+
], UDExCarousel.prototype, "itemsPerPage", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
property()
|
|
164
|
+
], UDExCarousel.prototype, "pageIndicatorType", void 0);
|
|
137
165
|
__decorate([
|
|
138
166
|
property({ type: Boolean, noAttribute: true })
|
|
139
167
|
], UDExCarousel.prototype, "isPrevButtonDisabled", void 0);
|
package/dist/Carousel.js.map
CHANGED
|
@@ -1 +1 @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B;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.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/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n isUp, isDown, isRight, isLeft,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { CAROUSEL_NEXT_ARROW_TEXT, CAROUSEL_PREVIOUS_ARROW_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport redirectAttributes from \"./utils/redirectAttributes.js\";\nimport type UI5Carousel from \"@ui5/webcomponents/dist/Carousel.js\";\n\nimport CarouselTemplate from \"./CarouselTemplate.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\n\nexport enum UDExCarouselNavigationPosition {\n top = \"top\",\n bottom = \"bottom\",\n}\n\nexport enum UDExCarouselButtonDesign {\n Secondary = \"Secondary\",\n Tertiary = \"Tertiary\",\n}\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-carousel</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/Carousel.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @tagname udex-carousel\n * @public\n */\n@customElement({\n tag: \"udex-carousel\",\n renderer: jsxRenderer,\n styles: CarouselCss,\n template: CarouselTemplate,\n})\n\nclass UDExCarousel extends UI5Element {\n /**\n * Defines the position of the navigation.\n * <br><br>\n * Available options are:\n * <ul>\n * <li><code>top</code> - the navigation button are placed above the component.</li>\n * <li><code>bottom</code> - the navigation button arrows are placed below the component.</li>\n * </ul>\n *\n * @public\n */\n @property()\n navigationPlacement: `${UDExCarouselNavigationPosition}` = UDExCarouselNavigationPosition.top;\n\n /**\n * Defines the content of the component.\n *\n * @slot\n * @public\n */\n @slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n items!: Array<HTMLElement>;\n\n /**\n * Defines the prev button is disabled\n *\n * @default false\n * @private\n */\n @property({ type: Boolean, noAttribute: true })\n isPrevButtonDisabled!: boolean;\n\n /**\n * Defines the next button is disabled\n *\n * @default false\n * @private\n */\n @property({ type: Boolean, noAttribute: true })\n isNextButtonDisabled!: boolean;\n\n /**\n * Defines the accessible ARIA name of the component.\n *\n * @default ''\n * @public\n */\n @property({ type: String })\n accessibleName: string = \"\";\n\n @i18n(\"@sapudex/web-components\")\n static i18nBundle: I18nBundle;\n\n get nextPageText(): string {\n return UDExCarousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n }\n\n get previousPageText(): string {\n return UDExCarousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n }\n\n get carouselClass(): string {\n const classes = \"udex-carousel\";\n\n return `${classes} udex-carousel__navigation--${this.navigationPlacement}`;\n }\n\n get buttonDesign(): UDExCarouselButtonDesign {\n return this.navigationPlacement === UDExCarouselNavigationPosition.top\n ? UDExCarouselButtonDesign.Secondary\n : UDExCarouselButtonDesign.Tertiary;\n }\n\n get showNavigationButtons(): { top: boolean; bottom: boolean } {\n return {\n top: this.navigationPlacement === UDExCarouselNavigationPosition.top,\n bottom: this.navigationPlacement === UDExCarouselNavigationPosition.bottom,\n };\n }\n\n get _hidePageIndicator(): boolean {\n return this.navigationPlacement === UDExCarouselNavigationPosition.top;\n }\n\n get _carousel(): UI5Carousel | null {\n return this.shadowRoot!.querySelector<UI5Carousel>(\"[ui5-carousel]\");\n }\n\n get _ui5CarouselRoot(): HTMLElement | null | undefined {\n return this._carousel?.shadowRoot?.querySelector(\".ui5-carousel-root\");\n }\n\n _calculateDisabledButtonsState() {\n this.isPrevButtonDisabled = !this._carousel?.hasPrev;\n this.isNextButtonDisabled = !this._carousel?.hasNext;\n }\n\n _prevButtonClick() {\n if (this.isPrevButtonDisabled) {\n return;\n }\n\n this._carousel?.navigateLeft();\n this._ui5CarouselRoot?.focus();\n this._calculateDisabledButtonsState();\n }\n\n _nextButtonClick() {\n if (this.isNextButtonDisabled) {\n return;\n }\n\n this._carousel?.navigateRight();\n this._ui5CarouselRoot?.focus();\n this._calculateDisabledButtonsState();\n }\n\n _onkeydown(e: KeyboardEvent) {\n if (isLeft(e) || isDown(e) || isRight(e) || isUp(e)) {\n this._calculateDisabledButtonsState();\n }\n }\n\n onAfterRendering() {\n redirectAttributes(this, \"carousel\");\n\n this._calculateDisabledButtonsState();\n }\n}\n\nUDExCarousel.define();\n\nexport default UDExCarousel;\n"]}
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../src/Carousel.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,iDAAiD,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EACL,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAC9B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAK/D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,SAAS;AACT,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,MAAM,CAAN,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACxC,6CAAW,CAAA;IACX,mDAAiB,CAA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QAAQ,EAAE;yDACqF;AAS9F;IADD,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;2CACvC;AAe3B;IADD,QAAQ,EAAE;kDACqB;AAa9B;IADD,QAAQ,EAAE;uDACqD;AAS9D;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACd;AAS/B;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACd;AAS/B;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACG;AAGvB;IADN,IAAI,CAAC,yBAAyB,CAAC;sCACF;AAhF1B,YAAY;IAPjB,aAAa,CAAC;QACb,GAAG,EAAE,eAAe;QACpB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC3B,CAAC;GAEI,YAAY,CA2JjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.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/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n isUp, isDown, isRight, isLeft,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { CAROUSEL_NEXT_ARROW_TEXT, CAROUSEL_PREVIOUS_ARROW_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport redirectAttributes from \"./utils/redirectAttributes.js\";\nimport type UI5Carousel from \"@ui5/webcomponents/dist/Carousel.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base\";\nimport type Icon from \"@ui5/webcomponents/dist/Icon.js\";\n\nimport CarouselTemplate from \"./CarouselTemplate.js\";\n\n// Styles\nimport CarouselCss from \"./generated/themes/Carousel.css.js\";\nimport type CarouselPageIndicatorType from \"@ui5/webcomponents/dist/types/CarouselPageIndicatorType.js\";\nimport type UDExButton from \"./Button.js\";\n\nexport enum UDExCarouselNavigationPosition {\n top = \"top\",\n bottom = \"bottom\",\n}\n\nexport enum UDExCarouselButtonDesign {\n Secondary = \"Secondary\",\n Tertiary = \"Tertiary\",\n}\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-carousel</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/Carousel.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @tagname udex-carousel\n * @public\n */\n@customElement({\n tag: \"udex-carousel\",\n renderer: jsxRenderer,\n styles: CarouselCss,\n template: CarouselTemplate,\n})\n\nclass UDExCarousel extends UI5Element {\n /**\n * Defines the position of the navigation.\n * <br><br>\n * Available options are:\n * <ul>\n * <li><code>top</code> - the navigation button are placed above the component.</li>\n * <li><code>bottom</code> - the navigation button arrows are placed below the component.</li>\n * </ul>\n *\n * @public\n */\n @property()\n navigationPlacement: `${UDExCarouselNavigationPosition}` = UDExCarouselNavigationPosition.top;\n\n /**\n * Defines the content of the component.\n *\n * @slot\n * @public\n */\n @slot({ \"default\": true, type: HTMLElement, individualSlots: true })\n items!: Array<HTMLElement>;\n\n /**\n * Defines the number of items per page depending on the carousel width.\n *\n * - 'S' for screens smaller than 600 pixels.\n * - 'M' for screens greater than or equal to 600 pixels and smaller than 1024 pixels.\n * - 'L' for screens greater than or equal to 1024 pixels and smaller than 1440 pixels.\n * - 'XL' for screens greater than or equal to 1440 pixels.\n *\n * One item per page is shown by default.\n * @default \"S1 M1 L1 XL1\"\n * @public\n */\n @property()\n itemsPerPage = \"S1 M1 L1 XL1\";\n\n /**\n * Defines the style of the page indicator.\n * Available options are:\n *\n * - `Default` - The page indicator will be visualized as dots if there are fewer than 9 pages. If there are more pages, the page indicator will switch to displaying the current page and the total number of pages. (e.g. X of Y)\n * - `Numeric` - The page indicator will display the current page and the total number of pages. (e.g. X of Y)\n * @since 1.10\n * @default \"Default\"\n * @public\n */\n @property()\n pageIndicatorType: `${CarouselPageIndicatorType}` = \"Default\";\n\n /**\n * Defines the prev button is disabled\n *\n * @default false\n * @private\n */\n @property({ type: Boolean, noAttribute: true })\n isPrevButtonDisabled!: boolean;\n\n /**\n * Defines the next button is disabled\n *\n * @default false\n * @private\n */\n @property({ type: Boolean, noAttribute: true })\n isNextButtonDisabled!: boolean;\n\n /**\n * Defines the accessible ARIA name of the component.\n *\n * @default ''\n * @public\n */\n @property({ type: String })\n accessibleName: string = \"\";\n\n @i18n(\"@sapudex/web-components\")\n static i18nBundle: I18nBundle;\n\n get nextPageText(): string {\n return UDExCarousel.i18nBundle.getText(CAROUSEL_NEXT_ARROW_TEXT);\n }\n\n get previousPageText(): string {\n return UDExCarousel.i18nBundle.getText(CAROUSEL_PREVIOUS_ARROW_TEXT);\n }\n\n get carouselClass(): string {\n const classes = \"udex-carousel\";\n\n return `${classes} udex-carousel__navigation--${this.navigationPlacement}`;\n }\n\n get buttonDesign(): UDExCarouselButtonDesign {\n return this.navigationPlacement === UDExCarouselNavigationPosition.top\n ? UDExCarouselButtonDesign.Secondary\n : UDExCarouselButtonDesign.Tertiary;\n }\n\n get showNavigationButtons(): { top: boolean; bottom: boolean } {\n return {\n top: this.navigationPlacement === UDExCarouselNavigationPosition.top,\n bottom: this.navigationPlacement === UDExCarouselNavigationPosition.bottom,\n };\n }\n\n get _hidePageIndicator(): boolean {\n return this.navigationPlacement === UDExCarouselNavigationPosition.top;\n }\n\n get _carousel(): UI5Carousel | null {\n return this.shadowRoot!.querySelector<UI5Carousel>(\"[ui5-carousel]\");\n }\n\n get _ui5CarouselRoot(): HTMLElement | null | undefined {\n return this._carousel?.shadowRoot?.querySelector(\".ui5-carousel-root\");\n }\n\n _calculateDisabledButtonsState() {\n this.isPrevButtonDisabled = !this._carousel?.hasPrev;\n this.isNextButtonDisabled = !this._carousel?.hasNext;\n }\n\n _prevButtonClick(e: UI5CustomEvent<UDExButton, \"click\">) {\n if (this.isPrevButtonDisabled) {\n return;\n }\n\n this._carousel?._navButtonClick(e as unknown as UI5CustomEvent<Icon, \"click\">);\n this._calculateDisabledButtonsState();\n }\n\n _nextButtonClick(e: UI5CustomEvent<UDExButton, \"click\">) {\n if (this.isNextButtonDisabled) {\n return;\n }\n\n this._carousel?._navButtonClick(e as unknown as UI5CustomEvent<Icon, \"click\">);\n this._calculateDisabledButtonsState();\n }\n\n _onkeydown(e: KeyboardEvent) {\n if (isLeft(e) || isDown(e) || isRight(e) || isUp(e)) {\n this._calculateDisabledButtonsState();\n }\n }\n\n onAfterRendering() {\n redirectAttributes(this, \"carousel\");\n\n this._calculateDisabledButtonsState();\n }\n}\n\nUDExCarousel.define();\n\nexport default UDExCarousel;\n"]}
|
package/dist/CarouselTemplate.js
CHANGED
|
@@ -6,10 +6,10 @@ import CarouselArrowsPlacement from "@ui5/webcomponents/dist/types/CarouselArrow
|
|
|
6
6
|
import slimArrowLeft from "@ui5/webcomponents-icons/dist/slim-arrow-left.js";
|
|
7
7
|
import slimArrowRight from "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
8
8
|
export default function CarouselTemplate() {
|
|
9
|
-
return (_jsxs("div", { className: this.carouselClass, onKeyDown: this._onkeydown, children: [this.showNavigationButtons.top && navigation.call(this), _jsx(UI5Carousel, { id: "carousel", hideNavigationArrows: true, arrowsPlacement: CarouselArrowsPlacement.Navigation, accessibleName: this.accessibleName, hidePageIndicator: this._hidePageIndicator, children: this.items.map(item => _jsx("slot", { name: item._individualSlot })) }), this.showNavigationButtons.bottom && navigation.call(this)] }));
|
|
9
|
+
return (_jsxs("div", { className: this.carouselClass, onKeyDown: this._onkeydown, children: [this.showNavigationButtons.top && navigation.call(this), _jsx(UI5Carousel, { itemsPerPage: this.itemsPerPage, pageIndicatorType: this.pageIndicatorType, id: "carousel", hideNavigationArrows: true, arrowsPlacement: CarouselArrowsPlacement.Navigation, accessibleName: this.accessibleName, hidePageIndicator: this._hidePageIndicator, children: this.items.map(item => _jsx("slot", { name: item._individualSlot })) }), this.showNavigationButtons.bottom && navigation.call(this)] }));
|
|
10
10
|
}
|
|
11
11
|
function navigation() {
|
|
12
12
|
const btnClassName = "udex-carousel__navigation-button";
|
|
13
|
-
return (_jsxs("div", { class: "udex-carousel__navigation-wrapper", part: "navigation", children: [_jsx(UDExButton, { size: UDExButtonSize.Large, disabled: this.isPrevButtonDisabled, class: btnClassName, icon: slimArrowLeft, design: this.buttonDesign, tooltip: this.previousPageText, onClick: this._prevButtonClick, part: "prev-button" }), _jsx(UDExButton, { size: UDExButtonSize.Large, disabled: this.isNextButtonDisabled, class: btnClassName, icon: slimArrowRight, design: this.buttonDesign, tooltip: this.nextPageText, onClick: this._nextButtonClick, part: "next-button" })] }));
|
|
13
|
+
return (_jsxs("div", { class: "udex-carousel__navigation-wrapper", part: "navigation", children: [_jsx(UDExButton, { "data-ui5-arrow-back": true, size: UDExButtonSize.Large, disabled: this.isPrevButtonDisabled, class: btnClassName, icon: slimArrowLeft, design: this.buttonDesign, tooltip: this.previousPageText, onClick: this._prevButtonClick, part: "prev-button" }), _jsx(UDExButton, { "data-ui5-arrow-forward": true, size: UDExButtonSize.Large, disabled: this.isNextButtonDisabled, class: btnClassName, icon: slimArrowRight, design: this.buttonDesign, tooltip: this.nextPageText, onClick: this._nextButtonClick, part: "next-button" })] }));
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=CarouselTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CarouselTemplate.js","sourceRoot":"","sources":["../src/CarouselTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAEnD,OAAO,uBAAuB,MAAM,0DAA0D,CAAC;AAC/F,OAAO,aAAa,MAAM,kDAAkD,CAAC;AAC7E,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAE/E,MAAM,CAAC,OAAO,UAAU,gBAAgB;IACtC,OAAO,CACL,eAAK,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,UAAU,aAC3D,IAAI,CAAC,qBAAqB,CAAC,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EACxD,KAAC,WAAW,IACV,EAAE,EAAC,UAAU,EACb,oBAAoB,QACpB,eAAe,EAAE,uBAAuB,CAAC,UAAU,EACnD,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,YACzC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACrB,eAAM,IAAI,EAAG,IAAqB,CAAC,eAAe,GAAS,CAC5D,GACW,EACb,IAAI,CAAC,qBAAqB,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IACvD,CACP,CAAC;AACJ,CAAC;AAED,SAAS,UAAU;IACjB,MAAM,YAAY,GAAG,kCAAkC,CAAC;IAExD,OAAO,CACL,eAAK,KAAK,EAAC,mCAAmC,EAAC,IAAI,EAAC,YAAY,aAC9D,KAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"CarouselTemplate.js","sourceRoot":"","sources":["../src/CarouselTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAEnD,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CAET,IAAI,EAAE,cAAc,CAAC,KAAK,EAC1B,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EACnC,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,IAAI,CAAC,YAAY,EACzB,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,IAAI,EAAC,aAAa,GACP,IACT,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type Carousel from \"./Carousel.js\";\nimport UI5Carousel from \"@ui5/webcomponents/dist/Carousel.js\";\nimport UDExButton from \"./Button.js\";\nimport UDExButtonSize from \"./types/ButtonSize.js\";\nimport type SlottedChild from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport CarouselArrowsPlacement from \"@ui5/webcomponents/dist/types/CarouselArrowsPlacement.js\";\nimport slimArrowLeft from \"@ui5/webcomponents-icons/dist/slim-arrow-left.js\";\nimport slimArrowRight from \"@ui5/webcomponents-icons/dist/slim-arrow-right.js\";\n\nexport default function CarouselTemplate(this: Carousel) {\n return (\n <div className={this.carouselClass} onKeyDown={this._onkeydown}>\n {this.showNavigationButtons.top && navigation.call(this)}\n <UI5Carousel\n itemsPerPage={this.itemsPerPage}\n pageIndicatorType={this.pageIndicatorType}\n id=\"carousel\"\n hideNavigationArrows\n arrowsPlacement={CarouselArrowsPlacement.Navigation}\n accessibleName={this.accessibleName}\n hidePageIndicator={this._hidePageIndicator}>\n {this.items.map(item =>\n <slot name={(item as SlottedChild)._individualSlot}></slot>\n )}\n </UI5Carousel>\n {this.showNavigationButtons.bottom && navigation.call(this)}\n </div>\n );\n}\n\nfunction navigation(this: Carousel) {\n const btnClassName = \"udex-carousel__navigation-button\";\n\n return (\n <div class=\"udex-carousel__navigation-wrapper\" part=\"navigation\">\n <UDExButton\n data-ui5-arrow-back\n size={UDExButtonSize.Large}\n disabled={this.isPrevButtonDisabled}\n class={btnClassName}\n icon={slimArrowLeft}\n design={this.buttonDesign}\n tooltip={this.previousPageText}\n onClick={this._prevButtonClick}\n part=\"prev-button\">\n </UDExButton>\n <UDExButton\n data-ui5-arrow-forward\n size={UDExButtonSize.Large}\n disabled={this.isNextButtonDisabled}\n class={btnClassName}\n icon={slimArrowRight}\n design={this.buttonDesign}\n tooltip={this.nextPageText}\n onClick={this._nextButtonClick}\n part=\"next-button\">\n </UDExButton>\n </div>\n );\n}\n"]}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import DateComponentBase from "@ui5/webcomponents/dist/DateComponentBase.js";
|
|
2
|
-
import { CalendarSelectionChangeEventDetail } from "@ui5/webcomponents/dist/Calendar.js";
|
|
2
|
+
import type { CalendarSelectionChangeEventDetail } from "@ui5/webcomponents/dist/Calendar.js";
|
|
3
3
|
import "@ui5/webcomponents/dist/Icon.js";
|
|
4
4
|
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
5
5
|
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
|
|
6
|
-
import UDExTextField from "./TextField.js";
|
|
7
|
-
import UDExDropdown from "./Dropdown.js";
|
|
6
|
+
import type UDExTextField from "./TextField.js";
|
|
7
|
+
import type UDExDropdown from "./Dropdown.js";
|
|
8
8
|
import UDExValueState from "./types/common.js";
|
|
9
9
|
export declare enum UDExDatePickerSelectionMode {
|
|
10
10
|
Single = "Single",
|
|
@@ -193,7 +193,7 @@ declare class UDExDatePicker extends DateComponentBase {
|
|
|
193
193
|
_buildEventData(value: string): UDExDatePickerSelectionChangeEventDetail;
|
|
194
194
|
_updateValueAndFireDecoratorEvents(value: string, normalizeValue: boolean, e?: CustomEvent | null): void;
|
|
195
195
|
_onInputChange(e: Event): void;
|
|
196
|
-
handleInputClick(e:
|
|
196
|
+
handleInputClick(e: CustomEvent<void>): void;
|
|
197
197
|
/**
|
|
198
198
|
* Used to provide selectedDates to the calendar based on the component's state
|
|
199
199
|
* Override in derivatives to provide different rules for setting the calendar's selected dates
|
package/dist/DatePicker.js
CHANGED
|
@@ -6,23 +6,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
var UDExDatePicker_1;
|
|
8
8
|
import DateComponentBase from "@ui5/webcomponents/dist/DateComponentBase.js";
|
|
9
|
-
import
|
|
9
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
10
10
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
11
11
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
|
12
12
|
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
13
|
-
// eslint-disable-next-line
|
|
14
|
-
import Calendar from "@ui5/webcomponents/dist/Calendar.js";
|
|
15
|
-
import CalendarDate from "@ui5/webcomponents/dist/CalendarDate.js";
|
|
16
13
|
import "@ui5/webcomponents/dist/Icon.js";
|
|
17
14
|
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
18
15
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
19
16
|
import { CALENDAR_ICON, DATEPICKER_DATE_DESCRIPTION } from "./generated/i18n/i18n-defaults.js";
|
|
20
|
-
import UDExTextField from "./TextField.js";
|
|
21
|
-
import UDExDropdown from "./Dropdown.js";
|
|
22
|
-
import UDExStatusMessage from "./StatusMessage.js";
|
|
23
17
|
import UDExValueState from "./types/common.js";
|
|
24
18
|
// Template
|
|
25
|
-
import DatePickerTemplate from "./
|
|
19
|
+
import DatePickerTemplate from "./DatePickerTemplate.js";
|
|
26
20
|
// Styles
|
|
27
21
|
import DatePickerCss from "./generated/themes/DatePicker.css.js";
|
|
28
22
|
import DatePickerPopoverCss from "./generated/themes/DatePickerPopover.css.js";
|
|
@@ -422,10 +416,9 @@ __decorate([
|
|
|
422
416
|
UDExDatePicker = UDExDatePicker_1 = __decorate([
|
|
423
417
|
customElement({
|
|
424
418
|
tag: "udex-date-picker",
|
|
425
|
-
renderer:
|
|
419
|
+
renderer: jsxRenderer,
|
|
426
420
|
styles: [DatePickerCss, DatePickerPopoverCss],
|
|
427
421
|
template: DatePickerTemplate,
|
|
428
|
-
dependencies: [CalendarDate, Calendar, UDExTextField, UDExDropdown, UDExStatusMessage],
|
|
429
422
|
})
|
|
430
423
|
/**
|
|
431
424
|
* Fired when the selected dates change.
|