@ds-autonomie/web-components 1.16.2 → 1.18.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/CHANGELOG.md +40 -0
- package/dist/chunks/{chunk.VC3XT47N.js → chunk.26R2GJ3D.js} +24 -46
- package/dist/chunks/{chunk.RG342A22.js → chunk.2GIZK5OL.js} +5 -5
- package/dist/chunks/{chunk.MXDA7QXL.js → chunk.33YIN2OK.js} +12 -9
- package/dist/chunks/{chunk.GYJZ3E7K.js → chunk.3RD6XYCZ.js} +1 -1
- package/dist/chunks/{chunk.JHPIOVRD.js → chunk.3RQ3AMTB.js} +4 -4
- package/dist/chunks/{chunk.VJRDVQTS.js → chunk.4EOWX2QT.js} +1 -1
- package/dist/chunks/{chunk.CZFGLE3Y.js → chunk.4FP4K3F5.js} +20 -0
- package/dist/chunks/chunk.4IGA5VLC.js +308 -0
- package/dist/chunks/{chunk.3UNYRJRK.js → chunk.4IXJVHZ5.js} +1 -1
- package/dist/chunks/{chunk.V7MYOBN4.js → chunk.4L7EJLR4.js} +5 -5
- package/dist/chunks/{chunk.2UZSRWJ7.js → chunk.4QUJBAX3.js} +5 -0
- package/dist/chunks/{chunk.5MXBL3PY.js → chunk.4WWQYBFA.js} +1 -1
- package/dist/chunks/{chunk.E475BLMD.js → chunk.63LGJMTZ.js} +1 -1
- package/dist/chunks/{chunk.45B5UA3U.js → chunk.64JQY57B.js} +1 -1
- package/dist/chunks/{chunk.NXQ42SSB.js → chunk.67S77FO4.js} +145 -313
- package/dist/chunks/{chunk.IDAQJSVV.js → chunk.6GVM3YU4.js} +16 -2
- package/dist/chunks/chunk.6K3AQESH.js +31 -0
- package/dist/chunks/{chunk.Z5LJXDHJ.js → chunk.7PFNOFBI.js} +23 -12
- package/dist/chunks/{chunk.MZF7MK5G.js → chunk.7UPFI4HE.js} +1 -0
- package/dist/chunks/{chunk.7J3HDP6J.js → chunk.AC3HBDLB.js} +1 -1
- package/dist/chunks/{chunk.ORNTGXRO.js → chunk.ARYKCY32.js} +1 -0
- package/dist/chunks/{chunk.KKAOTWJY.js → chunk.ATFH7NZ3.js} +23 -1
- package/dist/chunks/{chunk.7KF6Z37I.js → chunk.ATHRVCEP.js} +1 -1
- package/dist/chunks/{chunk.A2AK34DU.js → chunk.B5XEZJD7.js} +1 -1
- package/dist/chunks/{chunk.KOW5OFDN.js → chunk.BAASBQN5.js} +85 -27
- package/dist/chunks/{chunk.BROIFXIH.js → chunk.BCJMEP6L.js} +1 -1
- package/dist/chunks/chunk.BFVPPAWG.js +277 -0
- package/dist/chunks/{chunk.4DRKFRDB.js → chunk.BNPEW3RO.js} +4 -10
- package/dist/chunks/{chunk.V5J2RAQ5.js → chunk.CFISAFUN.js} +90 -1
- package/dist/chunks/chunk.CFUNT7FK.js +96 -0
- package/dist/chunks/{chunk.OXM5EF3F.js → chunk.CZIWWDCG.js} +7 -18
- package/dist/chunks/{chunk.WHTNMZZS.js → chunk.DLMZ2MN2.js} +4 -4
- package/dist/chunks/{chunk.N2H4K44W.js → chunk.ENMMYFHE.js} +1 -1
- package/dist/chunks/chunk.EWT3XVAN.js +319 -0
- package/dist/chunks/{chunk.6L4HRCFK.js → chunk.EWVN3OFD.js} +1 -1
- package/dist/chunks/{chunk.PNTPO2DN.js → chunk.EY6DBOBY.js} +21 -11
- package/dist/chunks/chunk.FWFLQD5T.js +49 -0
- package/dist/chunks/chunk.FXAGFSAU.js +68 -0
- package/dist/chunks/{chunk.SIPW72IF.js → chunk.FZBZ5HAZ.js} +3 -3
- package/dist/chunks/{chunk.ZYY6O4PU.js → chunk.G2ETLWQZ.js} +5 -16
- package/dist/chunks/{chunk.BAU3732X.js → chunk.G2PBKGYI.js} +3 -2
- package/dist/chunks/{chunk.6L6CZSQX.js → chunk.G3MRVMJ4.js} +2 -16
- package/dist/chunks/chunk.GBE3NP7T.js +36 -0
- package/dist/chunks/{chunk.IQTKA4UT.js → chunk.GCPXZXYD.js} +1 -1
- package/dist/chunks/chunk.H3OIUOL7.js +55 -0
- package/dist/chunks/{chunk.CKBRIIGV.js → chunk.HF2BKQ7K.js} +7 -5
- package/dist/chunks/chunk.HF7GESMZ.js +15 -0
- package/dist/chunks/{chunk.43EIYNTL.js → chunk.HSLR5GY4.js} +9 -3
- package/dist/chunks/{chunk.5MB36CJO.js → chunk.IMRGO6QP.js} +1 -1
- package/dist/chunks/{chunk.JXWCUSV3.js → chunk.ISIFJ4EB.js} +1 -1
- package/dist/chunks/{chunk.O2OMAMMI.js → chunk.IWQVNYM3.js} +1 -1
- package/dist/chunks/{chunk.LFYUJOPU.js → chunk.JH5GMUO7.js} +7 -8
- package/dist/chunks/{chunk.A3RCXT25.js → chunk.JKSDPLU3.js} +1 -1
- package/dist/chunks/{chunk.2PA4QKLT.js → chunk.KKJF6BYU.js} +1 -0
- package/dist/chunks/{chunk.VDOVUA55.js → chunk.KOTPR264.js} +1 -0
- package/dist/chunks/{chunk.4EFJ2NV3.js → chunk.KSF45YRN.js} +7 -2
- package/dist/chunks/{chunk.BHQ3BNQA.js → chunk.L2L37MWZ.js} +10 -12
- package/dist/chunks/{chunk.2P44D5YL.js → chunk.L5DEEGJU.js} +10 -1
- package/dist/chunks/{chunk.Z74FEBJS.js → chunk.L6I3R7R4.js} +1 -1
- package/dist/chunks/{chunk.D433F3FV.js → chunk.LDRVRUQG.js} +1 -0
- package/dist/chunks/{chunk.ZLGBX4RI.js → chunk.LQ42ZLXI.js} +1 -1
- package/dist/chunks/{chunk.VXQMFXV5.js → chunk.M7QP6END.js} +20 -2
- package/dist/chunks/{chunk.WPYZYOD5.js → chunk.MFWGK7WB.js} +1 -1
- package/dist/chunks/{chunk.RBXTMFL6.js → chunk.MNWP6APB.js} +1 -1
- package/dist/chunks/{chunk.H2JSXKGD.js → chunk.MPZ56XQK.js} +4 -0
- package/dist/chunks/{chunk.MUGCPHYQ.js → chunk.MSCG6J3T.js} +4 -4
- package/dist/chunks/chunk.MVFQ3IXQ.js +179 -0
- package/dist/chunks/{chunk.ZWVWEQGL.js → chunk.NDQ5XCHJ.js} +5 -0
- package/dist/chunks/{chunk.GZMFP7UN.js → chunk.O5STCK5X.js} +8 -4
- package/dist/chunks/{chunk.3YSH35MM.js → chunk.O7DWCXXH.js} +1 -1
- package/dist/chunks/{chunk.7DHGAM7P.js → chunk.PC2VIFJW.js} +2 -2
- package/dist/chunks/{chunk.RYD4BVIA.js → chunk.PSAB4UIG.js} +1 -1
- package/dist/chunks/{chunk.GE2PTQVM.js → chunk.PT4W6K27.js} +8 -3
- package/dist/chunks/{chunk.CWHNW2T5.js → chunk.QGNUX2KV.js} +38 -28
- package/dist/chunks/{chunk.EAP74BQL.js → chunk.QVJYJURQ.js} +32 -35
- package/dist/chunks/{chunk.VO6MIHUM.js → chunk.RFQ2Y5SK.js} +2 -0
- package/dist/chunks/{chunk.QR4Z7SWH.js → chunk.RJCFCZY3.js} +1 -1
- package/dist/chunks/{chunk.BQ7R6MC6.js → chunk.RSX6EFCX.js} +23 -1
- package/dist/chunks/{chunk.JR77AUQ7.js → chunk.SH26MYV3.js} +1 -1
- package/dist/chunks/{chunk.TRKYAEYS.js → chunk.SRYBWTPD.js} +143 -240
- package/dist/chunks/{chunk.4V4L6Q7P.js → chunk.TEHCPESC.js} +1 -1
- package/dist/chunks/{chunk.AMIXGL74.js → chunk.TOZLN2DN.js} +20 -3
- package/dist/chunks/chunk.TSW2ZSHN.js +63 -0
- package/dist/chunks/{chunk.IJMNSKEV.js → chunk.TVVACMGN.js} +1 -6
- package/dist/chunks/{chunk.EMJZLQCL.js → chunk.UVGAHM33.js} +2 -1
- package/dist/chunks/{chunk.YG7TOAY3.js → chunk.V5E77HVI.js} +4 -4
- package/dist/chunks/{chunk.SUCVNPSQ.js → chunk.VNMJ2D4A.js} +31 -4
- package/dist/chunks/{chunk.R6572W75.js → chunk.WMZ6HMZN.js} +10 -7
- package/dist/chunks/{chunk.RTEOTFLP.js → chunk.WQVKSBYD.js} +11 -0
- package/dist/chunks/{chunk.QDXCYEAZ.js → chunk.WSP5BYQP.js} +7 -7
- package/dist/chunks/{chunk.XD5JM6WF.js → chunk.WYUQG5BJ.js} +20 -0
- package/dist/chunks/{chunk.N43R5DJN.js → chunk.YU57HFSC.js} +1 -1
- package/dist/chunks/chunk.YVJBJSTS.js +595 -0
- package/dist/chunks/{chunk.WAROYP2H.js → chunk.YXVKJQFH.js} +1 -1
- package/dist/chunks/{chunk.RCSAV4XJ.js → chunk.ZV7TVP6P.js} +1 -1
- package/dist/components/accordion/accordion.js +6 -6
- package/dist/components/accordion/accordion.styles.js +1 -1
- package/dist/components/alert/alert.d.ts +2 -0
- package/dist/components/alert/alert.js +5 -5
- package/dist/components/anchor-tag/anchor-tag.js +2 -2
- package/dist/components/anchor-tag/anchor-tag.styles.js +1 -1
- package/dist/components/avatar/avatar.js +4 -4
- package/dist/components/breadcrumb/breadcrumb.js +5 -5
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/button/button.js +6 -6
- package/dist/components/calendar/calendar.d.ts +1 -1
- package/dist/components/calendar/calendar.js +3 -3
- package/dist/components/calendar/calendar.styles.js +1 -1
- package/dist/components/callout/callout.d.ts +23 -0
- package/dist/components/callout/callout.js +75 -0
- package/dist/components/callout/callout.styles.d.ts +2 -0
- package/dist/components/callout/callout.styles.js +8 -0
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.js +2 -2
- package/dist/components/card/card.styles.js +1 -1
- package/dist/components/checkbox/checkbox.js +4 -4
- package/dist/components/checkbox-button/checkbox-button.d.ts +2 -0
- package/dist/components/checkbox-button/checkbox-button.js +5 -5
- package/dist/components/checkbox-button/checkbox-button.styles.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +3 -1
- package/dist/components/checkbox-group/checkbox-group.js +2 -2
- package/dist/components/combobox/combobox.d.ts +1 -0
- package/dist/components/combobox/combobox.js +10 -10
- package/dist/components/combobox/combobox.styles.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -1
- package/dist/components/dialog/dialog.js +6 -6
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/download-card/download-card.js +3 -3
- package/dist/components/download-link/download-link.js +5 -5
- package/dist/components/download-link/download-link.styles.js +1 -1
- package/dist/components/drawer/drawer.d.ts +4 -0
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/drawer/drawer.styles.js +1 -1
- package/dist/components/dropdown/dropdown.js +2 -2
- package/dist/components/error-message-panel/error-message-panel.js +2 -2
- package/dist/components/filter/filter-base/filter-base.d.ts +49 -0
- package/dist/components/filter/filter-base/filter-base.js +13 -0
- package/dist/components/filter/filter-base/filter-base.styles.d.ts +2 -0
- package/dist/components/filter/filter-base/filter-base.styles.js +8 -0
- package/dist/components/filter/filter-button/filter-button.d.ts +1 -0
- package/dist/components/filter/filter-button/filter-button.js +6 -6
- package/dist/components/filter/filter-button/filter-button.styles.js +1 -1
- package/dist/components/filter/filter-counter/filter-counter.d.ts +5 -42
- package/dist/components/filter/filter-counter/filter-counter.js +7 -5
- package/dist/components/filter/filter-counter/filter-counter.styles.js +2 -1
- package/dist/components/filter/filter-date/filter-date.d.ts +7 -0
- package/dist/components/filter/filter-date/filter-date.js +15 -12
- package/dist/components/filter/filter-date/filter-date.styles.js +1 -1
- package/dist/components/filter/filter-range/filter-range.d.ts +7 -39
- package/dist/components/filter/filter-range/filter-range.js +19 -14
- package/dist/components/filter/filter-range/filter-range.styles.js +2 -1
- package/dist/components/filter/filter-select/filter-select.d.ts +7 -40
- package/dist/components/filter/filter-select/filter-select.js +26 -10
- package/dist/components/filter/filter-select/filter-select.styles.js +2 -2
- package/dist/components/footer/footer.js +3 -3
- package/dist/components/footer-sitemap-item/footer-sitemap-item.js +2 -2
- package/dist/components/footer-sitemap-item/footer-sitemap-item.styles.js +1 -1
- package/dist/components/format-bytes/format-bytes.js +2 -2
- package/dist/components/format-date/format-date.js +2 -2
- package/dist/components/format-number/format-number.js +2 -2
- package/dist/components/header/header.js +3 -3
- package/dist/components/header/header.styles.js +1 -1
- package/dist/components/header-search/header-search.d.ts +2 -0
- package/dist/components/header-search/header-search.js +2 -2
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/library.js +2 -2
- package/dist/components/icon-button/icon-button.js +3 -3
- package/dist/components/input/input.d.ts +8 -18
- package/dist/components/input/input.js +11 -8
- package/dist/components/input/input.styles.js +1 -1
- package/dist/components/input-date/input-date.d.ts +157 -0
- package/dist/components/input-date/input-date.js +35 -0
- package/dist/components/input-date/input-date.styles.d.ts +2 -0
- package/dist/components/input-date/input-date.styles.js +10 -0
- package/dist/components/input-mask/input-mask.d.ts +2 -0
- package/dist/components/input-mask/input-mask.js +3 -3
- package/dist/components/input-mask/input-mask.styles.js +1 -1
- package/dist/components/input-phone/input-phone.d.ts +4 -2
- package/dist/components/input-phone/input-phone.js +17 -17
- package/dist/components/input-phone/input-phone.styles.js +1 -1
- package/dist/components/menu-accordion/menu-accordion.d.ts +2 -0
- package/dist/components/menu-accordion/menu-accordion.js +5 -5
- package/dist/components/menu-item/menu-item.js +3 -3
- package/dist/components/navbar/navbar-link/navbar-link.js +3 -3
- package/dist/components/navbar/navbar-menu/navbar-menu.d.ts +2 -0
- package/dist/components/navbar/navbar-menu/navbar-menu.js +5 -5
- package/dist/components/option/option.js +6 -6
- package/dist/components/option/option.styles.js +1 -1
- package/dist/components/pagination/pagination.js +13 -10
- package/dist/components/popup/popup.d.ts +8 -0
- package/dist/components/popup/popup.js +2 -2
- package/dist/components/popup/popup.styles.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +2 -2
- package/dist/components/radio/radio.js +3 -3
- package/dist/components/radio-button/radio-button.d.ts +2 -0
- package/dist/components/radio-button/radio-button.js +2 -2
- package/dist/components/radio-button/radio-button.styles.js +1 -1
- package/dist/components/range-slider/range-slider.js +2 -2
- package/dist/components/range-slider/range-slider.styles.js +1 -1
- package/dist/components/relative-time/relative-time.js +2 -2
- package/dist/components/select/select.d.ts +1 -0
- package/dist/components/select/select.js +9 -9
- package/dist/components/select/select.styles.js +1 -1
- package/dist/components/spinner/spinner.js +2 -2
- package/dist/components/split-panel/split-panel.d.ts +66 -0
- package/dist/components/split-panel/split-panel.js +21 -0
- package/dist/components/split-panel/split-panel.styles.d.ts +2 -0
- package/dist/components/split-panel/split-panel.styles.js +7 -0
- package/dist/components/step/step.js +6 -6
- package/dist/components/tab/tab.js +2 -2
- package/dist/components/tab-group/tab-group.js +2 -2
- package/dist/components/table/table-action/table-action.js +2 -2
- package/dist/components/table/table-caption/table-caption.js +2 -2
- package/dist/components/table/table-header-row/table-header-row.js +3 -3
- package/dist/components/table/table-row/table-row.js +2 -2
- package/dist/components/table-container/table-container.js +2 -2
- package/dist/components/table-container/table-container.styles.js +1 -1
- package/dist/components/table-of-contents/table-of-contents.d.ts +2 -0
- package/dist/components/table-of-contents/table-of-contents.js +2 -2
- package/dist/components/table-of-contents/table-of-contents.styles.js +1 -1
- package/dist/components/tag/tag.js +5 -5
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +5 -5
- package/dist/components/tooltip/tooltip.styles.js +1 -1
- package/dist/components/tree/tree.js +10 -9
- package/dist/components/tree-item/tree-item.js +7 -7
- package/dist/custom-elements.json +8830 -6464
- package/dist/design-system.d.ts +1 -0
- package/dist/design-system.js +170 -159
- package/dist/internal/test.d.ts +11 -0
- package/dist/internal/test.js +19 -0
- package/dist/themes/dsa-wc-theme.css +52 -13
- package/dist/themes/dsa-wc-theme.min.css +1 -1
- package/dist/themes/dsa-wc-theme.styles.js +52 -15
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/utilities/date.d.ts +2 -0
- package/dist/utilities/date.js +9 -0
- package/dist/utilities/icon-library.js +2 -2
- package/dist/utilities/localize.d.ts +1 -2
- package/dist/utilities/localize.js +1 -1
- package/dist/utilities/storybook.d.ts +3 -2
- package/dist/utilities/storybook.js +62 -21
- package/dist/vscode.html-custom-data.json +302 -67
- package/dist/web-types.json +1783 -574
- package/package.json +4 -3
- package/dist/chunks/chunk.5BCAEDG4.js +0 -382
- package/dist/chunks/chunk.FZODQJBF.js +0 -99
- package/dist/chunks/chunk.PAF4S7OV.js +0 -484
- package/dist/chunks/chunk.YOLAIUYX.js +0 -95
- package/dist/chunks/{chunk.O2PIWM25.js → chunk.D34QDO4H.js} +3 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/utilities/date.ts
|
|
2
|
+
function parseDate(dateString, lang) {
|
|
3
|
+
const dateFormat = new Intl.DateTimeFormat(lang, {
|
|
4
|
+
year: "numeric",
|
|
5
|
+
month: "2-digit",
|
|
6
|
+
day: "2-digit"
|
|
7
|
+
});
|
|
8
|
+
const dateOrder = dateFormat.formatToParts(new Date()).filter((part) => ["day", "month", "year"].includes(part.type)).map((part) => part.type);
|
|
9
|
+
const parts = dateString.split(/[-/]/);
|
|
10
|
+
if (parts.length !== 3)
|
|
11
|
+
return null;
|
|
12
|
+
const dateObj = {};
|
|
13
|
+
dateOrder.forEach((part, index) => {
|
|
14
|
+
dateObj[part] = parseInt(parts[index], 10);
|
|
15
|
+
});
|
|
16
|
+
dateObj.month -= 1;
|
|
17
|
+
const date = new Date(dateObj.year, dateObj.month, dateObj.day);
|
|
18
|
+
return isNaN(date.getTime()) ? null : date;
|
|
19
|
+
}
|
|
20
|
+
function getLocaleDateFromISO(isoDate, lang) {
|
|
21
|
+
if (isoDate === "") {
|
|
22
|
+
return "";
|
|
23
|
+
} else {
|
|
24
|
+
return new Date(isoDate).toLocaleDateString(lang !== "" ? lang : "");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
parseDate,
|
|
30
|
+
getLocaleDateFromISO
|
|
31
|
+
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk.YIY5RM53.js";
|
|
10
10
|
import {
|
|
11
11
|
LocalizeController
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.G3MRVMJ4.js";
|
|
13
13
|
import {
|
|
14
14
|
watch
|
|
15
15
|
} from "./chunk.6IH66JBY.js";
|
|
@@ -36,9 +36,11 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
36
36
|
this.mobile = false;
|
|
37
37
|
}
|
|
38
38
|
handlePageButtonClick(event) {
|
|
39
|
-
if (event.
|
|
39
|
+
if (event.currentTarget.value !== -1 && !event.currentTarget.selected) {
|
|
40
40
|
this.emit("dsa-page-change", {
|
|
41
|
-
detail: {
|
|
41
|
+
detail: {
|
|
42
|
+
page: `${event.currentTarget.value}`
|
|
43
|
+
}
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -69,6 +71,7 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
69
71
|
?compact=${this.compact}
|
|
70
72
|
value=${pageNumber}
|
|
71
73
|
?selected=${this.currentPage === pageNumber}
|
|
74
|
+
@click=${this.handlePageButtonClick}
|
|
72
75
|
></dsa-pagination-button>
|
|
73
76
|
`;
|
|
74
77
|
});
|
|
@@ -110,7 +113,10 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
110
113
|
renderItemsDisplayedItemsPerPage() {
|
|
111
114
|
var _a;
|
|
112
115
|
const fromItem = 1 + (this.currentPage - 1) * this.itemsPerPage;
|
|
113
|
-
const toItem =
|
|
116
|
+
const toItem = Math.min(
|
|
117
|
+
this.currentPage * this.itemsPerPage,
|
|
118
|
+
this.totalItems
|
|
119
|
+
);
|
|
114
120
|
return html`
|
|
115
121
|
<div class="pagination__items">
|
|
116
122
|
<p
|
|
@@ -186,10 +192,11 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
186
192
|
navigation-type=${this.navigationType}
|
|
187
193
|
value="${this.currentPage - 1}"
|
|
188
194
|
?disabled=${this.currentPage < 2}
|
|
189
|
-
class="pagination__navigation__button--mobile"
|
|
195
|
+
class="pagination__navigation__button--mobile previous-button"
|
|
196
|
+
@click=${this.handlePageButtonClick}
|
|
190
197
|
>
|
|
191
|
-
<dsa-icon name="chevron_left" slot="prefix"></dsa-icon
|
|
192
|
-
|
|
198
|
+
<dsa-icon name="chevron_left" slot="prefix"></dsa-icon>
|
|
199
|
+
${this.localize.term("previousPage")}
|
|
193
200
|
</dsa-pagination-button>
|
|
194
201
|
<div class="pagination__navigation__page-input">
|
|
195
202
|
<dsa-input
|
|
@@ -211,19 +218,22 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
211
218
|
navigation-type=${this.navigationType}
|
|
212
219
|
value="${this.currentPage + 1}"
|
|
213
220
|
?disabled=${this.currentPage > this.totalPages - 1}
|
|
214
|
-
class="pagination__navigation__button--mobile"
|
|
215
|
-
|
|
221
|
+
class="pagination__navigation__button--mobile next-button"
|
|
222
|
+
@click=${this.handlePageButtonClick}
|
|
223
|
+
>
|
|
224
|
+
${this.localize.term("nextPage")}
|
|
216
225
|
<dsa-icon name="chevron_right" slot="suffix"></dsa-icon>
|
|
217
226
|
</dsa-pagination-button>
|
|
218
227
|
` : html`
|
|
219
|
-
<ul class="button-list"
|
|
228
|
+
<ul class="button-list">
|
|
220
229
|
<dsa-pagination-button
|
|
221
230
|
role="listitem"
|
|
222
231
|
navigation-type=${this.navigationType}
|
|
223
232
|
?compact=${this.compact}
|
|
224
233
|
value="${this.currentPage - 1}"
|
|
225
234
|
?disabled=${this.currentPage < 2}
|
|
226
|
-
class="first-button"
|
|
235
|
+
class="first-button previous-button"
|
|
236
|
+
@click=${this.handlePageButtonClick}
|
|
227
237
|
>
|
|
228
238
|
<dsa-icon name="chevron_left" slot="prefix"></dsa-icon>
|
|
229
239
|
${this.compact ? html`
|
|
@@ -241,7 +251,8 @@ var DSAPagination = class extends LoadingStateElement {
|
|
|
241
251
|
?compact=${this.compact}
|
|
242
252
|
value="${this.currentPage + 1}"
|
|
243
253
|
?disabled=${this.currentPage > this.totalPages - 1}
|
|
244
|
-
class="last-button"
|
|
254
|
+
class="last-button next-button"
|
|
255
|
+
@click=${this.handlePageButtonClick}
|
|
245
256
|
>
|
|
246
257
|
${this.compact ? html`<dsa-visually-hidden
|
|
247
258
|
>${this.localize.term(
|
|
@@ -22,8 +22,30 @@ var radio_button_styles_default = css`
|
|
|
22
22
|
border-color: var(--dsa-wc-toggle-button-border-color);
|
|
23
23
|
color: var(--dsa-wc-toggle-button-color);
|
|
24
24
|
border-width: 1px;
|
|
25
|
-
|
|
25
|
+
border-style: solid;
|
|
26
26
|
font-weight: 400;
|
|
27
|
+
height: auto;
|
|
28
|
+
white-space: normal;
|
|
29
|
+
text-align: left;
|
|
30
|
+
line-height: 130%;
|
|
31
|
+
}
|
|
32
|
+
.button--toggle.button--small {
|
|
33
|
+
min-height: var(--dsa-wc-form-input-height-small);
|
|
34
|
+
}
|
|
35
|
+
.button--toggle.button--medium {
|
|
36
|
+
min-height: var(--dsa-wc-form-input-height);
|
|
37
|
+
}
|
|
38
|
+
.button--toggle.button--large {
|
|
39
|
+
min-height: var(--dsa-wc-form-input-height-large);
|
|
40
|
+
}
|
|
41
|
+
.button--toggle.button--small .button__label {
|
|
42
|
+
padding-block: 4px;
|
|
43
|
+
}
|
|
44
|
+
.button--toggle.button--medium .button__label {
|
|
45
|
+
padding-block: 8px;
|
|
46
|
+
}
|
|
47
|
+
.button--toggle.button--large .button__label {
|
|
48
|
+
padding-block: 10px;
|
|
27
49
|
}
|
|
28
50
|
|
|
29
51
|
.button--toggle:hover {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
filter_date_styles_default
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.TVVACMGN.js";
|
|
4
4
|
import {
|
|
5
5
|
formatDateRange,
|
|
6
6
|
parseDateRange
|
|
7
7
|
} from "./chunk.BY3RW35M.js";
|
|
8
|
+
import {
|
|
9
|
+
getLocaleDateFromISO,
|
|
10
|
+
parseDate
|
|
11
|
+
} from "./chunk.6K3AQESH.js";
|
|
8
12
|
import {
|
|
9
13
|
getDateFromISO,
|
|
10
14
|
getISOFormattedDate
|
|
@@ -22,7 +26,7 @@ import {
|
|
|
22
26
|
} from "./chunk.V7RJROLH.js";
|
|
23
27
|
import {
|
|
24
28
|
LocalizeController
|
|
25
|
-
} from "./chunk.
|
|
29
|
+
} from "./chunk.G3MRVMJ4.js";
|
|
26
30
|
import {
|
|
27
31
|
watch
|
|
28
32
|
} from "./chunk.6IH66JBY.js";
|
|
@@ -46,12 +50,14 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
46
50
|
super(...arguments);
|
|
47
51
|
this.isIconButtonFocused = false;
|
|
48
52
|
this.localize = new LocalizeController(this);
|
|
53
|
+
this.maxLength = 0;
|
|
49
54
|
this.value = "";
|
|
50
55
|
this.label = "";
|
|
51
56
|
this.buttonLabel = "";
|
|
52
57
|
this.open = false;
|
|
53
58
|
this.hoist = false;
|
|
54
59
|
this.range = false;
|
|
60
|
+
this.placeholder = "";
|
|
55
61
|
this.disabled = false;
|
|
56
62
|
this.readonly = false;
|
|
57
63
|
}
|
|
@@ -61,8 +67,10 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
61
67
|
this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
|
|
62
68
|
this.handleSelectedDate = this.handleSelectedDate.bind(this);
|
|
63
69
|
this.shouldDisableDate = this.shouldDisableDate.bind(this);
|
|
70
|
+
this.currentLocale = this.lang || this.localize.lang();
|
|
64
71
|
}
|
|
65
72
|
firstUpdated() {
|
|
73
|
+
this.handleLangChange();
|
|
66
74
|
this.updateComplete.then(() => {
|
|
67
75
|
this.datepickerButton.button.setAttribute("aria-expanded", "false");
|
|
68
76
|
});
|
|
@@ -91,8 +99,8 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
handleDefaultKeyDown(event) {
|
|
102
|
+
event.stopPropagation();
|
|
94
103
|
if (this.open && event.key === "Escape") {
|
|
95
|
-
event.stopPropagation();
|
|
96
104
|
event.preventDefault();
|
|
97
105
|
this.hide();
|
|
98
106
|
this.datepickerButton.focus({ preventScroll: true });
|
|
@@ -111,7 +119,7 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
111
119
|
}
|
|
112
120
|
const path = event.composedPath();
|
|
113
121
|
const isDatepickerButton = path.some((el) => el === this.datepickerButton);
|
|
114
|
-
if (isDatepickerButton && (event.key === "Enter" || event.key === " ")) {
|
|
122
|
+
if (isDatepickerButton && !this.readonly && (event.key === "Enter" || event.key === " ")) {
|
|
115
123
|
event.preventDefault();
|
|
116
124
|
if (!this.open) {
|
|
117
125
|
this.show();
|
|
@@ -129,7 +137,7 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
139
|
handleInputKeyDown(event) {
|
|
132
|
-
if (event.key === " ") {
|
|
140
|
+
if (event.key === " " && !this.readonly) {
|
|
133
141
|
event.preventDefault();
|
|
134
142
|
this.show();
|
|
135
143
|
}
|
|
@@ -139,11 +147,40 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
139
147
|
this.show();
|
|
140
148
|
}
|
|
141
149
|
handleInput() {
|
|
142
|
-
this.
|
|
150
|
+
this.filterInputStart.setCustomValidity("");
|
|
143
151
|
this.emit("dsa-input");
|
|
144
152
|
}
|
|
145
153
|
handleChange() {
|
|
146
|
-
|
|
154
|
+
let startISODate = "";
|
|
155
|
+
let endISODate = "";
|
|
156
|
+
const startDate = parseDate(
|
|
157
|
+
this.filterInputStart.value,
|
|
158
|
+
this.currentLocale
|
|
159
|
+
);
|
|
160
|
+
if (startDate && !this.shouldDisableDate(startDate)) {
|
|
161
|
+
startISODate = getISOFormattedDate(startDate);
|
|
162
|
+
}
|
|
163
|
+
if (!startDate) {
|
|
164
|
+
this.filterInputStart.setCustomValidity(
|
|
165
|
+
this.localize.term("invalidDateFormat")
|
|
166
|
+
);
|
|
167
|
+
this.filterInputStart.reportValidity();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (this.range) {
|
|
171
|
+
const endDate = parseDate(this.filterInputEnd.value, this.currentLocale);
|
|
172
|
+
if (endDate && !this.shouldDisableDate(endDate)) {
|
|
173
|
+
endISODate = getISOFormattedDate(endDate);
|
|
174
|
+
}
|
|
175
|
+
if (!endDate) {
|
|
176
|
+
this.filterInputEnd.setCustomValidity(
|
|
177
|
+
this.localize.term("invalidDateFormat")
|
|
178
|
+
);
|
|
179
|
+
this.filterInputEnd.reportValidity();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
this.value = this.range ? formatDateRange(startISODate, endISODate) : startISODate;
|
|
147
184
|
this.emit("dsa-change");
|
|
148
185
|
}
|
|
149
186
|
handleInputFocus() {
|
|
@@ -210,6 +247,13 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
210
247
|
this.emit("dsa-after-hide");
|
|
211
248
|
}
|
|
212
249
|
}
|
|
250
|
+
handleLangChange() {
|
|
251
|
+
this.currentLocale = this.lang || this.localize.lang();
|
|
252
|
+
this.maxLength = getLocaleDateFromISO(
|
|
253
|
+
"2010-10-10",
|
|
254
|
+
this.currentLocale
|
|
255
|
+
).length;
|
|
256
|
+
}
|
|
213
257
|
/** Shows the listbox. */
|
|
214
258
|
async show() {
|
|
215
259
|
if (this.open) {
|
|
@@ -229,8 +273,8 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
229
273
|
return await waitForEvent(this, "dsa-after-hide");
|
|
230
274
|
}
|
|
231
275
|
render() {
|
|
276
|
+
var _a;
|
|
232
277
|
const isDateActive = this.value !== "";
|
|
233
|
-
const isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
|
|
234
278
|
return html`
|
|
235
279
|
<dsa-popup
|
|
236
280
|
class="filter"
|
|
@@ -262,10 +306,11 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
262
306
|
|
|
263
307
|
<input
|
|
264
308
|
id="input-start"
|
|
265
|
-
type="
|
|
309
|
+
type="text"
|
|
266
310
|
class="filter-input"
|
|
267
|
-
.value=${
|
|
268
|
-
this.range ? parseDateRange(this.value)[0] : this.value
|
|
311
|
+
.value=${getLocaleDateFromISO(
|
|
312
|
+
this.range ? parseDateRange(this.value)[0] : this.value,
|
|
313
|
+
this.currentLocale
|
|
269
314
|
)}
|
|
270
315
|
@input=${this.handleInput}
|
|
271
316
|
@change=${this.handleChange}
|
|
@@ -280,18 +325,19 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
280
325
|
?readonly=${this.readonly}
|
|
281
326
|
title=${this.range ? this.localize.term("startDate") : this.label}
|
|
282
327
|
aria-label=${this.range ? this.localize.term("startDate") : this.label}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
max=${ifDefined(this.max)}
|
|
286
|
-
tabindex=${ifDefined(this.readonly ? "-1" : void 0)}
|
|
328
|
+
maxlength=${this.maxLength}
|
|
329
|
+
placeholder=${this.placeholder}
|
|
287
330
|
/>
|
|
288
331
|
${this.range ? html`
|
|
289
332
|
<span class="filter-separator">-</span>
|
|
290
333
|
<input
|
|
291
334
|
id="input-end"
|
|
292
|
-
type="
|
|
335
|
+
type="text"
|
|
293
336
|
class="filter-input"
|
|
294
|
-
.value=${
|
|
337
|
+
.value=${getLocaleDateFromISO(
|
|
338
|
+
(_a = parseDateRange(this.value)[1]) != null ? _a : "",
|
|
339
|
+
this.currentLocale
|
|
340
|
+
)}
|
|
295
341
|
@input=${this.handleInput}
|
|
296
342
|
@change=${this.handleChange}
|
|
297
343
|
@keydown=${this.handleInputKeyDown}
|
|
@@ -305,17 +351,10 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
305
351
|
?readonly=${this.readonly}
|
|
306
352
|
title=${this.localize.term("endDate")}
|
|
307
353
|
aria-label=${this.localize.term("endDate")}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
max=${ifDefined(this.max)}
|
|
311
|
-
tabindex=${ifDefined(this.readonly ? "-1" : void 0)}
|
|
354
|
+
maxlength=${this.maxLength}
|
|
355
|
+
placeholder=${this.placeholder}
|
|
312
356
|
/>
|
|
313
357
|
` : ""}
|
|
314
|
-
${isFirefox ? html`
|
|
315
|
-
<dsa-visually-hidden id="firefox-limitation">
|
|
316
|
-
${this.localize.term("firefoxLimitation", this.buttonLabel)}
|
|
317
|
-
</dsa-visually-hidden>
|
|
318
|
-
` : ""}
|
|
319
358
|
<dsa-icon-button
|
|
320
359
|
part="date-button"
|
|
321
360
|
class="datepicker-button"
|
|
@@ -334,9 +373,10 @@ var DSAFilterDate = class extends ShoelaceElement {
|
|
|
334
373
|
<div id="filter-panel" class="filter-panel">
|
|
335
374
|
<dsa-calendar
|
|
336
375
|
class="calendar"
|
|
337
|
-
.value=${
|
|
376
|
+
.value=${ifDefined(this.value)}
|
|
338
377
|
?range=${ifDefined(this.range)}
|
|
339
378
|
.disableDate=${this.shouldDisableDate}
|
|
379
|
+
start-date=${ifDefined(this.calendarStartDate)}
|
|
340
380
|
></dsa-calendar>
|
|
341
381
|
</div>
|
|
342
382
|
</dsa-popup>
|
|
@@ -362,6 +402,12 @@ __decorateClass([
|
|
|
362
402
|
__decorateClass([
|
|
363
403
|
query(".datepicker-button")
|
|
364
404
|
], DSAFilterDate.prototype, "datepickerButton", 2);
|
|
405
|
+
__decorateClass([
|
|
406
|
+
state()
|
|
407
|
+
], DSAFilterDate.prototype, "maxLength", 2);
|
|
408
|
+
__decorateClass([
|
|
409
|
+
state()
|
|
410
|
+
], DSAFilterDate.prototype, "currentLocale", 2);
|
|
365
411
|
__decorateClass([
|
|
366
412
|
property({ reflect: true })
|
|
367
413
|
], DSAFilterDate.prototype, "value", 2);
|
|
@@ -380,6 +426,12 @@ __decorateClass([
|
|
|
380
426
|
__decorateClass([
|
|
381
427
|
property({ type: Boolean, reflect: true })
|
|
382
428
|
], DSAFilterDate.prototype, "range", 2);
|
|
429
|
+
__decorateClass([
|
|
430
|
+
property()
|
|
431
|
+
], DSAFilterDate.prototype, "lang", 2);
|
|
432
|
+
__decorateClass([
|
|
433
|
+
property()
|
|
434
|
+
], DSAFilterDate.prototype, "placeholder", 2);
|
|
383
435
|
__decorateClass([
|
|
384
436
|
property({ type: Boolean, reflect: true })
|
|
385
437
|
], DSAFilterDate.prototype, "disabled", 2);
|
|
@@ -392,12 +444,18 @@ __decorateClass([
|
|
|
392
444
|
__decorateClass([
|
|
393
445
|
property()
|
|
394
446
|
], DSAFilterDate.prototype, "max", 2);
|
|
447
|
+
__decorateClass([
|
|
448
|
+
property({ attribute: "calendar-start-date" })
|
|
449
|
+
], DSAFilterDate.prototype, "calendarStartDate", 2);
|
|
395
450
|
__decorateClass([
|
|
396
451
|
watch(["disabled", "readonly"], { waitUntilFirstUpdate: true })
|
|
397
452
|
], DSAFilterDate.prototype, "handleDisabledChange", 1);
|
|
398
453
|
__decorateClass([
|
|
399
454
|
watch("open", { waitUntilFirstUpdate: true })
|
|
400
455
|
], DSAFilterDate.prototype, "handleOpenChange", 1);
|
|
456
|
+
__decorateClass([
|
|
457
|
+
watch("lang")
|
|
458
|
+
], DSAFilterDate.prototype, "handleLangChange", 1);
|
|
401
459
|
DSAFilterDate = __decorateClass([
|
|
402
460
|
customElement("dsa-filter-date")
|
|
403
461
|
], DSAFilterDate);
|