@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk.
|
|
2
|
+
getLocaleDateFromISO,
|
|
3
|
+
parseDate
|
|
4
|
+
} from "./chunk.6K3AQESH.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk.
|
|
6
|
+
input_date_styles_default
|
|
7
|
+
} from "./chunk.H3OIUOL7.js";
|
|
8
8
|
import {
|
|
9
9
|
getDateFromISO,
|
|
10
10
|
getISOFormattedDate
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk.V7RJROLH.js";
|
|
32
32
|
import {
|
|
33
33
|
LocalizeController
|
|
34
|
-
} from "./chunk.
|
|
34
|
+
} from "./chunk.G3MRVMJ4.js";
|
|
35
35
|
import {
|
|
36
36
|
watch
|
|
37
37
|
} from "./chunk.6IH66JBY.js";
|
|
@@ -45,13 +45,13 @@ import {
|
|
|
45
45
|
__decorateClass
|
|
46
46
|
} from "./chunk.6M63UXML.js";
|
|
47
47
|
|
|
48
|
-
// src/components/input/input.ts
|
|
48
|
+
// src/components/input-date/input-date.ts
|
|
49
49
|
import { html } from "lit";
|
|
50
50
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
51
51
|
import { classMap } from "lit/directives/class-map.js";
|
|
52
52
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
53
53
|
import { live } from "lit/directives/live.js";
|
|
54
|
-
var
|
|
54
|
+
var DSAInputDate = class extends ShoelaceElement {
|
|
55
55
|
constructor() {
|
|
56
56
|
super(...arguments);
|
|
57
57
|
this.formControlController = new FormControlController(this, {
|
|
@@ -65,8 +65,9 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
65
65
|
this.localize = new LocalizeController(this);
|
|
66
66
|
this.hasFocus = false;
|
|
67
67
|
this.isDatepickerOpen = false;
|
|
68
|
+
this.displayedValue = "";
|
|
69
|
+
this.maxLength = 0;
|
|
68
70
|
this.title = "";
|
|
69
|
-
this.type = "text";
|
|
70
71
|
this.name = "";
|
|
71
72
|
this.value = "";
|
|
72
73
|
this.defaultValue = "";
|
|
@@ -78,18 +79,15 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
78
79
|
this.disabled = false;
|
|
79
80
|
this.placeholder = "";
|
|
80
81
|
this.readonly = false;
|
|
81
|
-
this.passwordVisible = false;
|
|
82
82
|
this.error = false;
|
|
83
83
|
this.errorMessage = "";
|
|
84
84
|
this.form = "";
|
|
85
85
|
this.required = false;
|
|
86
|
-
this.counter = false;
|
|
87
|
-
this.spellcheck = true;
|
|
88
86
|
}
|
|
89
87
|
/** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */
|
|
90
88
|
get valueAsDate() {
|
|
91
89
|
var _a, _b;
|
|
92
|
-
return (_b = (_a = this.
|
|
90
|
+
return (_b = (_a = this.hiddenInput) == null ? void 0 : _a.valueAsDate) != null ? _b : null;
|
|
93
91
|
}
|
|
94
92
|
set valueAsDate(newValue) {
|
|
95
93
|
const input = document.createElement("input");
|
|
@@ -97,24 +95,13 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
97
95
|
input.valueAsDate = newValue;
|
|
98
96
|
this.value = input.value;
|
|
99
97
|
}
|
|
100
|
-
/** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */
|
|
101
|
-
get valueAsNumber() {
|
|
102
|
-
var _a, _b;
|
|
103
|
-
return (_b = (_a = this.input) == null ? void 0 : _a.valueAsNumber) != null ? _b : parseFloat(this.value);
|
|
104
|
-
}
|
|
105
|
-
set valueAsNumber(newValue) {
|
|
106
|
-
const input = document.createElement("input");
|
|
107
|
-
input.type = "number";
|
|
108
|
-
input.valueAsNumber = newValue;
|
|
109
|
-
this.value = input.value;
|
|
110
|
-
}
|
|
111
98
|
/** Gets the validity state object */
|
|
112
99
|
get validity() {
|
|
113
|
-
return this.
|
|
100
|
+
return this.hiddenInput.validity;
|
|
114
101
|
}
|
|
115
102
|
/** Gets the validation message */
|
|
116
103
|
get validationMessage() {
|
|
117
|
-
return this.
|
|
104
|
+
return this.hiddenInput.validationMessage;
|
|
118
105
|
}
|
|
119
106
|
connectedCallback() {
|
|
120
107
|
super.connectedCallback();
|
|
@@ -124,7 +111,10 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
124
111
|
this.handleSelectedDate = this.handleSelectedDate.bind(this);
|
|
125
112
|
this.shouldDisableDate = this.shouldDisableDate.bind(this);
|
|
126
113
|
}
|
|
127
|
-
firstUpdated() {
|
|
114
|
+
async firstUpdated() {
|
|
115
|
+
this.handleLangChange();
|
|
116
|
+
this.updateDate();
|
|
117
|
+
await this.updateComplete;
|
|
128
118
|
this.formControlController.updateValidity();
|
|
129
119
|
}
|
|
130
120
|
addOpenListeners() {
|
|
@@ -139,6 +129,16 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
139
129
|
document.removeEventListener("mousedown", this.handleDocumentMouseDown);
|
|
140
130
|
this.removeEventListener("dsa-date-selected", this.handleSelectedDate);
|
|
141
131
|
}
|
|
132
|
+
updateDate() {
|
|
133
|
+
const date = new Date(this.value);
|
|
134
|
+
if (!isNaN(date.getTime())) {
|
|
135
|
+
this.displayedValue = getLocaleDateFromISO(this.value, this.lang);
|
|
136
|
+
} else {
|
|
137
|
+
this.displayedValue = "";
|
|
138
|
+
this.value = "";
|
|
139
|
+
}
|
|
140
|
+
this.input.value = this.displayedValue;
|
|
141
|
+
}
|
|
142
142
|
handleSelectedDate(event) {
|
|
143
143
|
const { detail } = event;
|
|
144
144
|
const selectedDate = detail.dates[0];
|
|
@@ -193,7 +193,20 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
193
193
|
this.emit("dsa-blur");
|
|
194
194
|
}
|
|
195
195
|
handleChange() {
|
|
196
|
-
|
|
196
|
+
const inputValue = this.input.value;
|
|
197
|
+
const date = parseDate(
|
|
198
|
+
inputValue,
|
|
199
|
+
this.lang !== "" ? this.lang : this.localize.lang()
|
|
200
|
+
);
|
|
201
|
+
if (date) {
|
|
202
|
+
this.value = getISOFormattedDate(date);
|
|
203
|
+
this.displayedValue = getLocaleDateFromISO(this.value, this.lang);
|
|
204
|
+
this.input.value = this.displayedValue;
|
|
205
|
+
} else {
|
|
206
|
+
this.setCustomValidity(this.localize.term("invalidDateFormat"));
|
|
207
|
+
this.reportValidity();
|
|
208
|
+
}
|
|
209
|
+
this.formControlController.updateValidity();
|
|
197
210
|
this.emit("dsa-change");
|
|
198
211
|
}
|
|
199
212
|
handleClearClick(event) {
|
|
@@ -208,9 +221,11 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
208
221
|
this.hasFocus = true;
|
|
209
222
|
this.emit("dsa-focus");
|
|
210
223
|
}
|
|
224
|
+
handleHiddenInputFocus() {
|
|
225
|
+
this.input.focus();
|
|
226
|
+
}
|
|
211
227
|
handleInput() {
|
|
212
|
-
this.
|
|
213
|
-
this.formControlController.updateValidity();
|
|
228
|
+
this.setCustomValidity("");
|
|
214
229
|
this.emit("dsa-input");
|
|
215
230
|
}
|
|
216
231
|
handleInvalid(event) {
|
|
@@ -226,19 +241,13 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
226
241
|
}
|
|
227
242
|
});
|
|
228
243
|
}
|
|
229
|
-
if (
|
|
244
|
+
if (event.key === " " && !this.readonly && !this.disabled) {
|
|
230
245
|
event.preventDefault();
|
|
231
246
|
this.showDatepicker();
|
|
232
247
|
}
|
|
233
248
|
}
|
|
234
|
-
handlePasswordToggle() {
|
|
235
|
-
this.passwordVisible = !this.passwordVisible;
|
|
236
|
-
}
|
|
237
249
|
getDescriptionIds() {
|
|
238
250
|
let ids = ["help-text"];
|
|
239
|
-
if (this.maxlength && this.counter) {
|
|
240
|
-
ids = [...ids, "counter"];
|
|
241
|
-
}
|
|
242
251
|
if (this.error) {
|
|
243
252
|
ids = ["error-text", ...ids];
|
|
244
253
|
}
|
|
@@ -255,11 +264,14 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
255
264
|
handleDisabledChange() {
|
|
256
265
|
this.formControlController.setValidity(this.disabled);
|
|
257
266
|
}
|
|
258
|
-
|
|
259
|
-
this.
|
|
267
|
+
async handleValueChange() {
|
|
268
|
+
this.updateDate();
|
|
269
|
+
await this.updateComplete;
|
|
260
270
|
this.formControlController.updateValidity();
|
|
261
271
|
}
|
|
262
|
-
async
|
|
272
|
+
async handleLangChange() {
|
|
273
|
+
this.maxLength = getLocaleDateFromISO("2010-10-10", this.lang).length;
|
|
274
|
+
this.updateDate();
|
|
263
275
|
await this.updateComplete;
|
|
264
276
|
this.formControlController.updateValidity();
|
|
265
277
|
}
|
|
@@ -313,12 +325,6 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
313
325
|
this.value = this.input.value;
|
|
314
326
|
}
|
|
315
327
|
}
|
|
316
|
-
/** Displays the browser picker for an input element (only works if the browser supports it for the input type). */
|
|
317
|
-
showTimePicker() {
|
|
318
|
-
if ("showPicker" in HTMLInputElement.prototype) {
|
|
319
|
-
this.input.showPicker();
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
328
|
/** Displays the dsa-calendar picker for an input element. */
|
|
323
329
|
async showDatepicker() {
|
|
324
330
|
if (this.isDatepickerOpen) {
|
|
@@ -337,23 +343,9 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
337
343
|
this.isDatepickerOpen = false;
|
|
338
344
|
return await waitForEvent(this, "dsa-after-hide");
|
|
339
345
|
}
|
|
340
|
-
/** Increments the value of a numeric input type by the value of the step attribute. */
|
|
341
|
-
stepUp() {
|
|
342
|
-
this.input.stepUp();
|
|
343
|
-
if (this.value !== this.input.value) {
|
|
344
|
-
this.value = this.input.value;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
/** Decrements the value of a numeric input type by the value of the step attribute. */
|
|
348
|
-
stepDown() {
|
|
349
|
-
this.input.stepDown();
|
|
350
|
-
if (this.value !== this.input.value) {
|
|
351
|
-
this.value = this.input.value;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
346
|
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
355
347
|
checkValidity() {
|
|
356
|
-
return this.
|
|
348
|
+
return this.hiddenInput.checkValidity();
|
|
357
349
|
}
|
|
358
350
|
/** Gets the associated form, if one exists. */
|
|
359
351
|
getForm() {
|
|
@@ -361,24 +353,20 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
361
353
|
}
|
|
362
354
|
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
363
355
|
reportValidity() {
|
|
364
|
-
return this.
|
|
356
|
+
return this.hiddenInput.reportValidity();
|
|
365
357
|
}
|
|
366
358
|
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
367
359
|
setCustomValidity(message) {
|
|
368
|
-
this.
|
|
360
|
+
this.hiddenInput.setCustomValidity(message);
|
|
369
361
|
this.formControlController.updateValidity();
|
|
370
362
|
}
|
|
371
363
|
render() {
|
|
372
364
|
const hasLabelSlot = this.hasSlotController.test("label");
|
|
373
365
|
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
374
|
-
const
|
|
375
|
-
const hasPrefixIcon = overridenPrefixIcon !== void 0 || this.hasSlotController.test("prefix");
|
|
366
|
+
const hasPrefixIcon = this.hasSlotController.test("prefix");
|
|
376
367
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
377
368
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
378
369
|
const hasClearIcon = this.clearable && !this.disabled && !this.readonly && (typeof this.value === "number" || this.value.length > 0);
|
|
379
|
-
const hasHideIcon = this.type === "password" && !this.disabled;
|
|
380
|
-
const counterText = this.maxlength && this.counter ? `${this.value.length}/${this.maxlength}` : void 0;
|
|
381
|
-
const isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
|
|
382
370
|
return html`
|
|
383
371
|
<div
|
|
384
372
|
part="form-control"
|
|
@@ -391,9 +379,7 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
391
379
|
"form-control--has-label": hasLabel,
|
|
392
380
|
"form-control--has-help-text": hasHelpText,
|
|
393
381
|
"form-control--has-prefix-icon": hasPrefixIcon,
|
|
394
|
-
"form-control--has-
|
|
395
|
-
"form-control--has-clear-icon": hasClearIcon,
|
|
396
|
-
"form-control--has-counter": counterText !== void 0
|
|
382
|
+
"form-control--has-clear-icon": hasClearIcon
|
|
397
383
|
})}
|
|
398
384
|
>
|
|
399
385
|
<label
|
|
@@ -412,7 +398,7 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
412
398
|
part="base"
|
|
413
399
|
class=${classMap({
|
|
414
400
|
input: true,
|
|
415
|
-
"input--date":
|
|
401
|
+
"input--date": true,
|
|
416
402
|
// Sizes
|
|
417
403
|
"input--small": this.size === "small",
|
|
418
404
|
"input--medium": this.size === "medium",
|
|
@@ -427,56 +413,12 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
427
413
|
"input--empty": !this.value
|
|
428
414
|
})}
|
|
429
415
|
>
|
|
430
|
-
|
|
431
|
-
name=${overridenPrefixIcon.iconName}
|
|
432
|
-
class="input__prefix"
|
|
433
|
-
></dsa-icon>` : html` <slot
|
|
416
|
+
<slot
|
|
434
417
|
name="prefix"
|
|
435
418
|
part="prefix"
|
|
436
419
|
class="input__prefix"
|
|
437
|
-
></slot
|
|
420
|
+
></slot>
|
|
438
421
|
|
|
439
|
-
${this.type !== "date" ? html`
|
|
440
|
-
<input
|
|
441
|
-
part="input"
|
|
442
|
-
id="input"
|
|
443
|
-
class="input__control"
|
|
444
|
-
type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
|
|
445
|
-
title=${ifDefinedAndNotEmpty(
|
|
446
|
-
hasLabel ? void 0 : this.title
|
|
447
|
-
)}
|
|
448
|
-
name=${ifDefinedAndNotEmpty(this.name)}
|
|
449
|
-
?disabled=${this.disabled}
|
|
450
|
-
?readonly=${this.readonly}
|
|
451
|
-
?required=${this.required}
|
|
452
|
-
placeholder=${ifDefined(this.placeholder)}
|
|
453
|
-
minlength=${ifDefined(this.minlength)}
|
|
454
|
-
maxlength=${ifDefined(this.maxlength)}
|
|
455
|
-
min=${ifDefined(this.min)}
|
|
456
|
-
max=${ifDefined(this.max)}
|
|
457
|
-
step=${ifDefined(this.step)}
|
|
458
|
-
.value=${live(this.value)}
|
|
459
|
-
autocapitalize=${ifDefined(this.autocapitalize)}
|
|
460
|
-
autocomplete=${ifDefined(this.autocomplete)}
|
|
461
|
-
autocorrect=${ifDefined(this.autocorrect)}
|
|
462
|
-
?autofocus=${this.autofocus}
|
|
463
|
-
spellcheck=${this.spellcheck}
|
|
464
|
-
pattern=${ifDefined(this.pattern)}
|
|
465
|
-
enterkeyhint=${ifDefined(this.enterkeyhint)}
|
|
466
|
-
inputmode=${ifDefined(this.inputmode)}
|
|
467
|
-
aria-label=${ifDefinedAndNotEmpty(
|
|
468
|
-
hasLabel ? void 0 : this.title
|
|
469
|
-
)}
|
|
470
|
-
aria-describedby=${this.getDescriptionIds()}
|
|
471
|
-
aria-invalid=${ifDefined(this.error ? "true" : void 0)}
|
|
472
|
-
@change=${this.handleChange}
|
|
473
|
-
@input=${this.handleInput}
|
|
474
|
-
@invalid=${this.handleInvalid}
|
|
475
|
-
@keydown=${this.handleKeyDown}
|
|
476
|
-
@focus=${this.handleFocus}
|
|
477
|
-
@blur=${this.handleBlur}
|
|
478
|
-
/>
|
|
479
|
-
` : html`
|
|
480
422
|
<dsa-popup
|
|
481
423
|
class="date-popup"
|
|
482
424
|
part="popup"
|
|
@@ -494,7 +436,7 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
494
436
|
part="input"
|
|
495
437
|
id="input"
|
|
496
438
|
class="input__control input__control--date"
|
|
497
|
-
type="
|
|
439
|
+
type="text"
|
|
498
440
|
title=${ifDefinedAndNotEmpty(
|
|
499
441
|
hasLabel ? void 0 : this.title
|
|
500
442
|
)}
|
|
@@ -502,51 +444,58 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
502
444
|
?disabled=${this.disabled}
|
|
503
445
|
?readonly=${this.readonly}
|
|
504
446
|
?required=${this.required}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
.value=${live(this.value)}
|
|
447
|
+
placeholder=${ifDefined(this.placeholder)}
|
|
448
|
+
.value=${this.displayedValue}
|
|
508
449
|
autocomplete=${ifDefined(this.autocomplete)}
|
|
509
450
|
?autofocus=${this.autofocus}
|
|
451
|
+
maxlength=${this.maxLength}
|
|
510
452
|
aria-label=${ifDefinedAndNotEmpty(
|
|
511
453
|
hasLabel ? void 0 : this.title
|
|
512
454
|
)}
|
|
513
|
-
aria-describedby=${
|
|
455
|
+
aria-describedby=${this.getDescriptionIds()}
|
|
514
456
|
aria-invalid=${ifDefined(
|
|
515
457
|
this.error ? "true" : void 0
|
|
516
458
|
)}
|
|
517
459
|
@change=${this.handleChange}
|
|
518
460
|
@input=${this.handleInput}
|
|
519
|
-
@invalid=${this.handleInvalid}
|
|
520
461
|
@keydown=${this.handleKeyDown}
|
|
521
462
|
@focus=${this.handleFocus}
|
|
522
463
|
@blur=${this.handleBlur}
|
|
523
464
|
@click=${this.handleInputClick}
|
|
524
465
|
/>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
466
|
+
<input
|
|
467
|
+
class="input-date__value-input"
|
|
468
|
+
type="date"
|
|
469
|
+
?disabled=${this.disabled}
|
|
470
|
+
?readonly=${this.readonly}
|
|
471
|
+
?required=${this.required}
|
|
472
|
+
min=${ifDefined(this.min)}
|
|
473
|
+
max=${ifDefined(this.max)}
|
|
474
|
+
.value=${live(this.value)}
|
|
475
|
+
tabindex="-1"
|
|
476
|
+
aria-hidden="true"
|
|
477
|
+
@invalid=${this.handleInvalid}
|
|
478
|
+
@focus=${this.handleHiddenInputFocus}
|
|
479
|
+
/>
|
|
480
|
+
|
|
481
|
+
${!this.readonly && !this.disabled ? html` <dsa-icon-button
|
|
482
|
+
part="picker-button"
|
|
483
|
+
class="input__action-button icon-button--date"
|
|
484
|
+
name="calendar_today"
|
|
485
|
+
label=${this.localize.term("picker")}
|
|
486
|
+
@click=${this.showDatepicker}
|
|
487
|
+
></dsa-icon-button>` : ""}
|
|
540
488
|
</div>
|
|
541
489
|
<div id="date-panel" class="date--panel">
|
|
542
490
|
<dsa-calendar
|
|
543
491
|
class="calendar"
|
|
544
|
-
.value=${
|
|
492
|
+
.value=${ifDefined(this.value)}
|
|
545
493
|
.disableDate=${this.shouldDisableDate}
|
|
494
|
+
start-date=${ifDefined(this.calendarStartDate)}
|
|
546
495
|
></dsa-calendar>
|
|
547
496
|
</div>
|
|
548
497
|
</dsa-popup>
|
|
549
|
-
|
|
498
|
+
|
|
550
499
|
${hasClearIcon ? html`
|
|
551
500
|
<dsa-icon-button
|
|
552
501
|
part="clear-button"
|
|
@@ -556,24 +505,6 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
556
505
|
@click=${this.handleClearClick}
|
|
557
506
|
></dsa-icon-button>
|
|
558
507
|
` : ""}
|
|
559
|
-
${hasHideIcon ? html`<dsa-icon-button
|
|
560
|
-
part="password-toggle-button"
|
|
561
|
-
class="input__action-button"
|
|
562
|
-
label=${this.localize.term(
|
|
563
|
-
this.passwordVisible ? "hidePassword" : "showPassword"
|
|
564
|
-
)}
|
|
565
|
-
name=${this.passwordVisible ? "visibility_off" : "visibility"}
|
|
566
|
-
@click=${this.handlePasswordToggle}
|
|
567
|
-
></dsa-icon-button>` : ""}
|
|
568
|
-
${this.type === "time" ? html`
|
|
569
|
-
<dsa-icon-button
|
|
570
|
-
part="picker-button"
|
|
571
|
-
class="input__action-button"
|
|
572
|
-
name="schedule"
|
|
573
|
-
label=${this.localize.term("selectATime")}
|
|
574
|
-
@click=${this.showTimePicker}
|
|
575
|
-
></dsa-icon-button>
|
|
576
|
-
` : ""}
|
|
577
508
|
</div>
|
|
578
509
|
</div>
|
|
579
510
|
|
|
@@ -587,15 +518,6 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
587
518
|
${this.helpText}
|
|
588
519
|
</slot>
|
|
589
520
|
|
|
590
|
-
${counterText !== void 0 ? html`<span
|
|
591
|
-
id="counter"
|
|
592
|
-
class=${classMap({
|
|
593
|
-
"form-control__counter": true,
|
|
594
|
-
"form-control__counter--animated": this.value.length === this.maxlength
|
|
595
|
-
})}
|
|
596
|
-
>${counterText}</span
|
|
597
|
-
>` : ""}
|
|
598
|
-
|
|
599
521
|
${this.error && !this.disabled && this.errorMessage !== "" ? html`<dsa-error-text
|
|
600
522
|
id="error-text"
|
|
601
523
|
class="form-control__error-text"
|
|
@@ -606,140 +528,121 @@ var DSAInput = class extends ShoelaceElement {
|
|
|
606
528
|
`;
|
|
607
529
|
}
|
|
608
530
|
};
|
|
609
|
-
|
|
531
|
+
DSAInputDate.styles = input_date_styles_default;
|
|
610
532
|
__decorateClass([
|
|
611
533
|
query(".input__control")
|
|
612
|
-
],
|
|
534
|
+
], DSAInputDate.prototype, "input", 2);
|
|
535
|
+
__decorateClass([
|
|
536
|
+
query(".input-date__value-input")
|
|
537
|
+
], DSAInputDate.prototype, "hiddenInput", 2);
|
|
613
538
|
__decorateClass([
|
|
614
539
|
query(".date-popup")
|
|
615
|
-
],
|
|
540
|
+
], DSAInputDate.prototype, "popup", 2);
|
|
616
541
|
__decorateClass([
|
|
617
542
|
query(".icon-button--date")
|
|
618
|
-
],
|
|
543
|
+
], DSAInputDate.prototype, "datepickerButton", 2);
|
|
619
544
|
__decorateClass([
|
|
620
545
|
state()
|
|
621
|
-
],
|
|
546
|
+
], DSAInputDate.prototype, "hasFocus", 2);
|
|
622
547
|
__decorateClass([
|
|
623
548
|
state()
|
|
624
|
-
],
|
|
549
|
+
], DSAInputDate.prototype, "isDatepickerOpen", 2);
|
|
625
550
|
__decorateClass([
|
|
626
|
-
|
|
627
|
-
],
|
|
551
|
+
state()
|
|
552
|
+
], DSAInputDate.prototype, "displayedValue", 2);
|
|
628
553
|
__decorateClass([
|
|
629
|
-
|
|
630
|
-
],
|
|
554
|
+
state()
|
|
555
|
+
], DSAInputDate.prototype, "maxLength", 2);
|
|
556
|
+
__decorateClass([
|
|
557
|
+
property()
|
|
558
|
+
], DSAInputDate.prototype, "title", 2);
|
|
631
559
|
__decorateClass([
|
|
632
560
|
property()
|
|
633
|
-
],
|
|
561
|
+
], DSAInputDate.prototype, "name", 2);
|
|
634
562
|
__decorateClass([
|
|
635
563
|
property()
|
|
636
|
-
],
|
|
564
|
+
], DSAInputDate.prototype, "value", 2);
|
|
637
565
|
__decorateClass([
|
|
638
566
|
defaultValue()
|
|
639
|
-
],
|
|
567
|
+
], DSAInputDate.prototype, "defaultValue", 2);
|
|
640
568
|
__decorateClass([
|
|
641
569
|
property({ reflect: true })
|
|
642
|
-
],
|
|
570
|
+
], DSAInputDate.prototype, "size", 2);
|
|
643
571
|
__decorateClass([
|
|
644
572
|
property({ reflect: true })
|
|
645
|
-
],
|
|
573
|
+
], DSAInputDate.prototype, "variant", 2);
|
|
646
574
|
__decorateClass([
|
|
647
575
|
property()
|
|
648
|
-
],
|
|
576
|
+
], DSAInputDate.prototype, "label", 2);
|
|
649
577
|
__decorateClass([
|
|
650
578
|
property({ attribute: "help-text" })
|
|
651
|
-
],
|
|
579
|
+
], DSAInputDate.prototype, "helpText", 2);
|
|
652
580
|
__decorateClass([
|
|
653
581
|
property({ type: Boolean })
|
|
654
|
-
],
|
|
582
|
+
], DSAInputDate.prototype, "clearable", 2);
|
|
655
583
|
__decorateClass([
|
|
656
584
|
property({ type: Boolean, reflect: true })
|
|
657
|
-
],
|
|
585
|
+
], DSAInputDate.prototype, "disabled", 2);
|
|
658
586
|
__decorateClass([
|
|
659
587
|
property()
|
|
660
|
-
],
|
|
588
|
+
], DSAInputDate.prototype, "lang", 2);
|
|
661
589
|
__decorateClass([
|
|
662
|
-
property(
|
|
663
|
-
],
|
|
590
|
+
property()
|
|
591
|
+
], DSAInputDate.prototype, "placeholder", 2);
|
|
664
592
|
__decorateClass([
|
|
665
|
-
property({
|
|
666
|
-
],
|
|
593
|
+
property({ type: Boolean, reflect: true })
|
|
594
|
+
], DSAInputDate.prototype, "readonly", 2);
|
|
667
595
|
__decorateClass([
|
|
668
596
|
property({ type: Boolean })
|
|
669
|
-
],
|
|
597
|
+
], DSAInputDate.prototype, "error", 2);
|
|
670
598
|
__decorateClass([
|
|
671
599
|
property({ attribute: "error-message" })
|
|
672
|
-
],
|
|
600
|
+
], DSAInputDate.prototype, "errorMessage", 2);
|
|
673
601
|
__decorateClass([
|
|
674
602
|
property({ reflect: true })
|
|
675
|
-
],
|
|
603
|
+
], DSAInputDate.prototype, "form", 2);
|
|
676
604
|
__decorateClass([
|
|
677
605
|
property({ type: Boolean, reflect: true })
|
|
678
|
-
],
|
|
679
|
-
__decorateClass([
|
|
680
|
-
property()
|
|
681
|
-
], DSAInput.prototype, "pattern", 2);
|
|
682
|
-
__decorateClass([
|
|
683
|
-
property({ type: Number })
|
|
684
|
-
], DSAInput.prototype, "minlength", 2);
|
|
685
|
-
__decorateClass([
|
|
686
|
-
property({ type: Number })
|
|
687
|
-
], DSAInput.prototype, "maxlength", 2);
|
|
688
|
-
__decorateClass([
|
|
689
|
-
property({ type: Boolean })
|
|
690
|
-
], DSAInput.prototype, "counter", 2);
|
|
691
|
-
__decorateClass([
|
|
692
|
-
property()
|
|
693
|
-
], DSAInput.prototype, "min", 2);
|
|
606
|
+
], DSAInputDate.prototype, "required", 2);
|
|
694
607
|
__decorateClass([
|
|
695
608
|
property()
|
|
696
|
-
],
|
|
609
|
+
], DSAInputDate.prototype, "pattern", 2);
|
|
697
610
|
__decorateClass([
|
|
698
611
|
property()
|
|
699
|
-
],
|
|
612
|
+
], DSAInputDate.prototype, "min", 2);
|
|
700
613
|
__decorateClass([
|
|
701
614
|
property()
|
|
702
|
-
],
|
|
615
|
+
], DSAInputDate.prototype, "max", 2);
|
|
703
616
|
__decorateClass([
|
|
704
|
-
property()
|
|
705
|
-
],
|
|
617
|
+
property({ attribute: "calendar-start-date" })
|
|
618
|
+
], DSAInputDate.prototype, "calendarStartDate", 2);
|
|
706
619
|
__decorateClass([
|
|
707
620
|
property()
|
|
708
|
-
],
|
|
621
|
+
], DSAInputDate.prototype, "autocomplete", 2);
|
|
709
622
|
__decorateClass([
|
|
710
623
|
property({ type: Boolean })
|
|
711
|
-
],
|
|
624
|
+
], DSAInputDate.prototype, "autofocus", 2);
|
|
712
625
|
__decorateClass([
|
|
713
626
|
property()
|
|
714
|
-
],
|
|
715
|
-
__decorateClass([
|
|
716
|
-
property({
|
|
717
|
-
type: Boolean,
|
|
718
|
-
converter: {
|
|
719
|
-
// Allow "true|false" attribute values but keep the property boolean
|
|
720
|
-
fromAttribute: (value) => !value || value === "false" ? false : true,
|
|
721
|
-
toAttribute: (value) => value ? "true" : "false"
|
|
722
|
-
}
|
|
723
|
-
})
|
|
724
|
-
], DSAInput.prototype, "spellcheck", 2);
|
|
627
|
+
], DSAInputDate.prototype, "enterkeyhint", 2);
|
|
725
628
|
__decorateClass([
|
|
726
629
|
property()
|
|
727
|
-
],
|
|
630
|
+
], DSAInputDate.prototype, "inputmode", 2);
|
|
728
631
|
__decorateClass([
|
|
729
632
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
730
|
-
],
|
|
731
|
-
__decorateClass([
|
|
732
|
-
watch("step", { waitUntilFirstUpdate: true })
|
|
733
|
-
], DSAInput.prototype, "handleStepChange", 1);
|
|
633
|
+
], DSAInputDate.prototype, "handleDisabledChange", 1);
|
|
734
634
|
__decorateClass([
|
|
735
635
|
watch("value", { waitUntilFirstUpdate: true })
|
|
736
|
-
],
|
|
636
|
+
], DSAInputDate.prototype, "handleValueChange", 1);
|
|
637
|
+
__decorateClass([
|
|
638
|
+
watch("lang", { waitUntilFirstUpdate: true })
|
|
639
|
+
], DSAInputDate.prototype, "handleLangChange", 1);
|
|
737
640
|
__decorateClass([
|
|
738
641
|
watch("isDatepickerOpen", { waitUntilFirstUpdate: true })
|
|
739
|
-
],
|
|
740
|
-
|
|
741
|
-
customElement("dsa-input")
|
|
742
|
-
],
|
|
642
|
+
], DSAInputDate.prototype, "handleOpenChange", 1);
|
|
643
|
+
DSAInputDate = __decorateClass([
|
|
644
|
+
customElement("dsa-input-date")
|
|
645
|
+
], DSAInputDate);
|
|
743
646
|
setDefaultAnimation("date-popup.show", {
|
|
744
647
|
keyframes: [
|
|
745
648
|
{ opacity: 0, scale: 0.9 },
|
|
@@ -756,5 +659,5 @@ setDefaultAnimation("date-popup.hide", {
|
|
|
756
659
|
});
|
|
757
660
|
|
|
758
661
|
export {
|
|
759
|
-
|
|
662
|
+
DSAInputDate
|
|
760
663
|
};
|