@esri/calcite-components 5.1.1-next.6 → 5.1.1
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/README.md +1 -1
- package/dist/cdn/{BTSHRUHD.js → 2J4U5E4U.js} +1 -1
- package/dist/cdn/{FZTLSQJL.js → 2JJ5YBBT.js} +1 -1
- package/dist/cdn/{KQGUXAM6.js → 2P3LOGHK.js} +1 -1
- package/dist/cdn/{RIEKXKB2.js → 34ENIUR5.js} +1 -1
- package/dist/cdn/{YNG6JO67.js → 3KWJQXAT.js} +1 -1
- package/dist/cdn/{E4MGJ47Y.js → 3RRY5HHA.js} +1 -1
- package/dist/cdn/{MD2UCHOX.js → 3TYJSBP3.js} +1 -1
- package/dist/cdn/44HFP2I6.js +2 -0
- package/dist/cdn/44VCOKJX.js +2 -0
- package/dist/cdn/{CUSR767T.js → 47Q2AE5B.js} +1 -1
- package/dist/cdn/{CDGEWGDD.js → 4NUFBGFK.js} +1 -1
- package/dist/cdn/{7YNDWV76.js → 4UHTWXNV.js} +1 -1
- package/dist/cdn/{72EJ64LI.js → 524MMG22.js} +1 -1
- package/dist/cdn/{Y6WCKCHJ.js → 5D7IEY6J.js} +1 -1
- package/dist/cdn/{CUTXFNYN.js → 5O6YGOJE.js} +1 -1
- package/dist/cdn/{VCDOY22T.js → 5VAPN2S2.js} +1 -1
- package/dist/cdn/{ZEEFJOPQ.js → 6HRHKHF5.js} +1 -1
- package/dist/cdn/6S3G75WP.js +2 -0
- package/dist/cdn/6SZY5PY7.js +2 -0
- package/dist/cdn/{GEKASHNF.js → 6V3FX2W2.js} +1 -1
- package/dist/cdn/{FE3TGEP7.js → 6VDGKXTH.js} +1 -1
- package/dist/cdn/{HQHM5NWX.js → 6VP3K6WL.js} +1 -1
- package/dist/cdn/{6N246L5H.js → 6X3QWKZL.js} +1 -1
- package/dist/cdn/{ERBKUSSX.js → 6XMUSNRS.js} +1 -1
- package/dist/cdn/{773VWCGD.js → 7B4FOF3S.js} +1 -1
- package/dist/cdn/{SBQVCX2M.js → 7QS3Z4ZJ.js} +1 -1
- package/dist/cdn/{34WAUXUE.js → 7SDGC2RW.js} +1 -1
- package/dist/cdn/A6V4I2J3.js +2 -0
- package/dist/cdn/{QN4XN67Z.js → ALLL4LZ4.js} +1 -1
- package/dist/cdn/BCRYMNH7.js +2 -0
- package/dist/cdn/{CBUNIAKL.js → BSMPD6VA.js} +1 -1
- package/dist/cdn/C462ZIJD.js +2 -0
- package/dist/cdn/{QABVNEOF.js → C4DW27AP.js} +1 -1
- package/dist/cdn/C4OX3FC4.js +2 -0
- package/dist/cdn/{RZR44QGM.js → CDNETLLO.js} +1 -1
- package/dist/cdn/{NDVX6CLP.js → CENYPZ3Y.js} +1 -1
- package/dist/cdn/{RVXZUGJA.js → CEWOZ7LP.js} +1 -1
- package/dist/cdn/{WVJUNLFN.js → CM45J66U.js} +1 -1
- package/dist/cdn/{VYXKMJSU.js → COXLBEPM.js} +1 -1
- package/dist/cdn/CVJBK7K3.js +2 -0
- package/dist/cdn/{RUNWK23I.js → DDUIHGBF.js} +1 -1
- package/dist/cdn/{XCNAJ4XA.js → DK3SDSZL.js} +1 -1
- package/dist/cdn/{DJMAPSDY.js → DP2TY4KH.js} +1 -1
- package/dist/cdn/{TPML2DIA.js → E6X6BQLH.js} +1 -1
- package/dist/cdn/{JMKB4CRU.js → E7GXKIIO.js} +1 -1
- package/dist/cdn/{3XFDQDVC.js → ECVX7SVS.js} +1 -1
- package/dist/cdn/{UE4QYUAU.js → ELXBBUY5.js} +1 -1
- package/dist/cdn/{F5MS5PBN.js → EQKCU4NC.js} +1 -1
- package/dist/cdn/{SH7DQCS7.js → ETEMG44R.js} +1 -1
- package/dist/cdn/{MWMTHMMN.js → G2G6FHMB.js} +1 -1
- package/dist/cdn/{VVJGLEIA.js → GCAYSD7G.js} +1 -1
- package/dist/cdn/{YBFI2FQL.js → GDFQSWZ7.js} +1 -1
- package/dist/cdn/{72XY7IDN.js → GDYGEN45.js} +1 -1
- package/dist/cdn/{G62VTWNT.js → GTH6QFMV.js} +1 -1
- package/dist/cdn/{WAXTXFBL.js → HA65OOQD.js} +1 -1
- package/dist/cdn/HYIVUAZU.js +2 -0
- package/dist/cdn/{UIFHJ5IO.js → I4IDQ735.js} +1 -1
- package/dist/cdn/{O6PZKJ7R.js → ICGT7C6U.js} +1 -1
- package/dist/cdn/{3BUDIEL3.js → ID2LCYSN.js} +1 -1
- package/dist/cdn/{5RJTKL4J.js → IEWVQCQW.js} +1 -1
- package/dist/cdn/{3H6RVKMN.js → IHYNJVS4.js} +1 -1
- package/dist/cdn/{5N32D533.js → IMUM436K.js} +1 -1
- package/dist/cdn/{PJSI5N6F.js → IRANNKJ2.js} +1 -1
- package/dist/cdn/{C4DX6ZIA.js → JCVLN6XL.js} +1 -1
- package/dist/cdn/{5QXKHC54.js → JDVSVNSE.js} +1 -1
- package/dist/cdn/{6MUZLYOR.js → JGCJVDJA.js} +1 -1
- package/dist/cdn/{6UM5PQBD.js → JPPCKAMD.js} +1 -1
- package/dist/cdn/{OWJYARYV.js → JSXQ6NFN.js} +1 -1
- package/dist/cdn/KCN4PBFZ.js +2 -0
- package/dist/cdn/{7M4ANW77.js → KJCVGOXF.js} +1 -1
- package/dist/cdn/{OXKGEAUB.js → KLNQGCK2.js} +1 -1
- package/dist/cdn/KOWFGIAY.js +2 -0
- package/dist/cdn/{Y44WJ7Z2.js → KXD6O3ZI.js} +1 -1
- package/dist/cdn/{TFTS26NS.js → L3D2OBOR.js} +1 -1
- package/dist/cdn/L5IKT3WY.js +2 -0
- package/dist/cdn/LGB6OAXT.js +2 -0
- package/dist/cdn/{3NNR2AZU.js → LI2CATYC.js} +1 -1
- package/dist/cdn/{4NYY44U4.js → LJSR66HF.js} +1 -1
- package/dist/cdn/{YFUBBPNI.js → LKYA2H2B.js} +1 -1
- package/dist/cdn/{MRRVOAJL.js → LOJBKHVF.js} +1 -1
- package/dist/cdn/{A332WZ6V.js → MHE72N53.js} +1 -1
- package/dist/cdn/{REW7C42W.js → MW5MGBT4.js} +1 -1
- package/dist/cdn/{5SYOHCLD.js → NBAYHB3K.js} +1 -1
- package/dist/cdn/{3VNZC64N.js → NCSMOKFP.js} +1 -1
- package/dist/cdn/{XTGDCTQE.js → NG7BG3QY.js} +1 -1
- package/dist/cdn/NL77UDLL.js +2 -0
- package/dist/cdn/{D2HPEC7F.js → NTD2BJWG.js} +1 -1
- package/dist/cdn/{FKX46Z6K.js → ODGJXDZK.js} +1 -1
- package/dist/cdn/{OGNY6ZIB.js → ORIGVFX7.js} +1 -1
- package/dist/cdn/{N6V2UT62.js → OWIJSXYV.js} +1 -1
- package/dist/cdn/{EJUEMY56.js → OXCL3M4W.js} +1 -1
- package/dist/cdn/{I2DNOFC6.js → PB3LTBSS.js} +1 -1
- package/dist/cdn/{PW2XM5HR.js → PHEMAFCT.js} +1 -1
- package/dist/cdn/{FKPCRFUW.js → PIR7PWBO.js} +1 -1
- package/dist/cdn/PM5MZR4Z.js +2 -0
- package/dist/cdn/{TQJK5WF5.js → Q4V5DVKS.js} +1 -1
- package/dist/cdn/{YI3ZMHS5.js → Q56UST3A.js} +1 -1
- package/dist/cdn/{TMWGSGAP.js → QC5NB4VL.js} +1 -1
- package/dist/cdn/{5L5RJCKK.js → QEJBAQOY.js} +1 -1
- package/dist/cdn/{JDAOWOTY.js → QGF4JJQO.js} +1 -1
- package/dist/cdn/{DZSC3TJX.js → QZJ7GLQ3.js} +1 -1
- package/dist/cdn/RK2LH73E.js +2 -0
- package/dist/cdn/{5CBFI2KM.js → ROJYTRK6.js} +1 -1
- package/dist/cdn/{DAXLXKIY.js → RRKFBHMW.js} +1 -1
- package/dist/cdn/{KCENWQ6Z.js → RUUD543Z.js} +1 -1
- package/dist/cdn/{N3YQ6P66.js → S2BIRHQ7.js} +1 -1
- package/dist/cdn/{CQYI4Z2Z.js → SJCWFQNF.js} +1 -1
- package/dist/cdn/SNJLHXVG.js +2 -0
- package/dist/cdn/{IXQQO6HC.js → SNY2QKQJ.js} +1 -1
- package/dist/cdn/{27MK2V4G.js → ST6WRTR2.js} +1 -1
- package/dist/cdn/{WYGNUS2B.js → SW5TNX5V.js} +1 -1
- package/dist/cdn/SXXFODM6.js +2 -0
- package/dist/cdn/{4Q7PL2KY.js → TKK3AWQJ.js} +1 -1
- package/dist/cdn/{45C4ENM6.js → TTCZVBEF.js} +1 -1
- package/dist/cdn/TV47CRME.js +2 -0
- package/dist/cdn/{DEQNFOAS.js → TVU7KEKM.js} +1 -1
- package/dist/cdn/{C4PPQBLW.js → TVYIJRI2.js} +1 -1
- package/dist/cdn/{3XMNPYNB.js → TWVXE232.js} +1 -1
- package/dist/cdn/{32QFEQZS.js → TYQB2FN4.js} +1 -1
- package/dist/cdn/{ZBN5LXKS.js → U4GRIQVY.js} +1 -1
- package/dist/cdn/{Z2GSU7Q2.js → U7OJQ4EC.js} +1 -1
- package/dist/cdn/UCWB5EGV.js +2 -0
- package/dist/cdn/{CZPSEMDH.js → UTVGUMUM.js} +1 -1
- package/dist/cdn/{NAJTDRNC.js → V3X47NBI.js} +1 -1
- package/dist/cdn/{R4C3WA5S.js → V7PYDILT.js} +1 -1
- package/dist/cdn/{5JIKOOZ6.js → V7YPIVAX.js} +1 -1
- package/dist/cdn/{ROY5CHB3.js → VDJMOKVP.js} +1 -1
- package/dist/cdn/{2MRL4RKW.js → VEZBAZZG.js} +1 -1
- package/dist/cdn/VXBJOP6X.js +2 -0
- package/dist/cdn/{74UIHSVE.js → VZ2YR2UG.js} +1 -1
- package/dist/cdn/{KB2WIMAL.js → W57IL7KF.js} +1 -1
- package/dist/cdn/{5WFJNGXP.js → WCUO6JQN.js} +1 -1
- package/dist/cdn/{F3E7QPPC.js → WER7FADP.js} +1 -1
- package/dist/cdn/{F7RQCNJ4.js → WQCT4VLB.js} +1 -1
- package/dist/cdn/X3HV2NYH.js +2 -0
- package/dist/cdn/{SGZ3IG5W.js → XRUJ4D7O.js} +1 -1
- package/dist/cdn/{EHS7L663.js → XT4GLBAQ.js} +1 -1
- package/dist/cdn/{GYYFBZS2.js → Y7O6UR4T.js} +1 -1
- package/dist/cdn/{IHGSINVA.js → YHAJICJ2.js} +1 -1
- package/dist/cdn/{IRDSJTUK.js → YKL7MIG5.js} +1 -1
- package/dist/cdn/YYAYEKGB.js +2 -0
- package/dist/cdn/{TRN7FUFM.js → Z3IP3JBL.js} +1 -1
- package/dist/cdn/ZK2W2KJX.js +2 -0
- package/dist/cdn/ZOEJDQXA.js +2 -0
- package/dist/cdn/{RDOHAXOA.js → ZRMTOZ3B.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/date.js +3 -3
- package/dist/chunks/dom.js +3 -15
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/label.js +6 -6
- package/dist/chunks/locale.js +6 -3
- package/dist/chunks/manager.js +5 -5
- package/dist/chunks/resources10.js +63 -0
- package/dist/chunks/resources5.js +27 -52
- package/dist/chunks/resources6.js +48 -45
- package/dist/chunks/resources7.js +49 -7
- package/dist/chunks/resources8.js +9 -11
- package/dist/chunks/resources9.js +4 -48
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/useTime.js +45 -40
- package/dist/chunks/utils2.js +59 -6
- package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.d.ts +2 -2
- package/dist/components/calcite-alert/customElement.js +4 -6
- package/dist/components/calcite-autocomplete/customElement.d.ts +16 -16
- package/dist/components/calcite-autocomplete/customElement.js +4 -4
- package/dist/components/calcite-autocomplete-item/customElement.d.ts +5 -5
- package/dist/components/calcite-avatar/customElement.d.ts +5 -5
- package/dist/components/calcite-card/customElement.d.ts +1 -1
- package/dist/components/calcite-carousel/customElement.js +6 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -4
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -27
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +292 -143
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +11 -2
- package/dist/components/calcite-dialog/customElement.js +8 -8
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.d.ts +2 -2
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +2 -2
- package/dist/components/calcite-input/customElement.js +5 -2
- package/dist/components/calcite-input-date-picker/customElement.js +5 -10
- package/dist/components/calcite-input-text/customElement.js +2 -2
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.d.ts +4 -4
- package/dist/components/calcite-list/customElement.js +6 -5
- package/dist/components/calcite-list-item/customElement.d.ts +6 -6
- package/dist/components/calcite-list-item/customElement.js +16 -13
- package/dist/components/calcite-list-item-group/customElement.d.ts +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +3 -3
- package/dist/components/calcite-menu-item/customElement.d.ts +7 -7
- package/dist/components/calcite-menu-item/customElement.js +0 -3
- package/dist/components/calcite-meter/customElement.d.ts +6 -6
- package/dist/components/calcite-meter/customElement.js +7 -14
- package/dist/components/calcite-pagination/customElement.d.ts +1 -1
- package/dist/components/calcite-pagination/customElement.js +0 -3
- package/dist/components/calcite-panel/customElement.d.ts +6 -6
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.d.ts +4 -4
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.d.ts +2 -2
- package/dist/components/calcite-radio-button/customElement.d.ts +5 -5
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -4
- package/dist/components/calcite-radio-button-group/customElement.js +3 -3
- package/dist/components/calcite-rating/customElement.d.ts +7 -7
- package/dist/components/calcite-rating/customElement.js +9 -13
- package/dist/components/calcite-sheet/customElement.js +27 -32
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.d.ts +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -2
- package/dist/components/calcite-tab-nav/customElement.d.ts +3 -3
- package/dist/components/calcite-tab-nav/customElement.js +7 -12
- package/dist/components/calcite-tab-title/customElement.d.ts +3 -3
- package/dist/components/calcite-tab-title/customElement.js +0 -2
- package/dist/components/calcite-table/customElement.js +14 -22
- package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
- package/dist/components/calcite-table-cell/customElement.js +0 -6
- package/dist/components/calcite-table-header/customElement.d.ts +4 -4
- package/dist/components/calcite-table-header/customElement.js +0 -2
- package/dist/components/calcite-table-row/customElement.js +3 -5
- package/dist/components/calcite-tabs/customElement.js +2 -3
- package/dist/components/calcite-text-area/customElement.d.ts +12 -12
- package/dist/components/calcite-text-area/customElement.js +3 -5
- package/dist/components/calcite-tile/customElement.d.ts +6 -6
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-time-picker/customElement.js +15 -35
- package/dist/components/calcite-tooltip/customElement.d.ts +2 -2
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +6 -7
- package/dist/components/calcite-tree-item/customElement.d.ts +3 -3
- package/dist/components/calcite-tree-item/customElement.js +6 -12
- package/dist/controllers/useSortable.d.ts +2 -2
- package/dist/controllers/useTime.d.ts +20 -20
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/utils/dom.d.ts +1 -1
- package/package.json +9 -8
- package/dist/cdn/2PEF7GQE.js +0 -2
- package/dist/cdn/2VL3OCAZ.js +0 -2
- package/dist/cdn/6W4CWLXH.js +0 -2
- package/dist/cdn/73EQ5TEB.js +0 -2
- package/dist/cdn/74CLXGQH.js +0 -2
- package/dist/cdn/7AOQ4FPG.js +0 -2
- package/dist/cdn/ATWAUE4R.js +0 -2
- package/dist/cdn/BZJYGCDK.js +0 -2
- package/dist/cdn/C2BK5CUC.js +0 -2
- package/dist/cdn/I5HZNPIE.js +0 -2
- package/dist/cdn/JQIHTMWX.js +0 -2
- package/dist/cdn/KJNTF66K.js +0 -2
- package/dist/cdn/M2TFDONT.js +0 -2
- package/dist/cdn/OB3Z74X6.js +0 -2
- package/dist/cdn/OJO5NPP3.js +0 -2
- package/dist/cdn/QXPWDVC2.js +0 -2
- package/dist/cdn/SS4J7QES.js +0 -2
- package/dist/cdn/U6NA5WAH.js +0 -2
- package/dist/cdn/UOSSQPFY.js +0 -2
- package/dist/cdn/VWQPK5JA.js +0 -2
- package/dist/cdn/VYZ6WAWT.js +0 -2
- package/dist/cdn/W3N2DKPC.js +0 -2
- package/dist/cdn/WRQD4O6A.js +0 -2
- package/dist/cdn/WUBPEGFV.js +0 -2
- package/dist/cdn/Z7NNDJEN.js +0 -2
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
- package/dist/cdn/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly16.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly24.json +0 -1
- package/dist/cdn/assets/icon/orientedImagerySceneOnly32.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer16.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer24.json +0 -1
- package/dist/cdn/assets/icon/parquetFeatureLayer32.json +0 -1
- /package/dist/cdn/{IYGANVDT.js → 72YUATHS.js} +0 -0
- /package/dist/cdn/{MYDCGCGV.js → IIA2H2SU.js} +0 -0
- /package/dist/cdn/{DCWL5FUH.js → LKL63VXR.js} +0 -0
- /package/dist/cdn/{UM6KICQF.js → MO64UYDH.js} +0 -0
- /package/dist/cdn/{R6HABYRV.js → Q55YTOMB.js} +0 -0
package/dist/chunks/useTime.js
CHANGED
|
@@ -128,28 +128,23 @@ function getLocalizedTimePart(part, parts, locale = "en") {
|
|
|
128
128
|
return null;
|
|
129
129
|
}
|
|
130
130
|
if (part === "hourSuffix") {
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const hourIndex = hourPart ? parts.indexOf(hourPart) : -1;
|
|
134
|
-
const minuteIndex = minutePart ? parts.indexOf(minutePart) : -1;
|
|
131
|
+
const hourIndex = parts.indexOf(parts.find(({ type }) => type === "hour"));
|
|
132
|
+
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
|
135
133
|
const hourSuffix = parts[hourIndex + 1];
|
|
136
134
|
return hourSuffix?.type === "literal" && minuteIndex - hourIndex === 2 ? hourSuffix.value || null : null;
|
|
137
135
|
}
|
|
138
136
|
if (part === "minuteSuffix") {
|
|
139
|
-
const
|
|
140
|
-
const minuteIndex = minutePart ? parts.indexOf(minutePart) : -1;
|
|
137
|
+
const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
|
|
141
138
|
const minuteSuffix = parts[minuteIndex + 1];
|
|
142
139
|
return minuteSuffix?.type === "literal" ? minuteSuffix.value || null : null;
|
|
143
140
|
}
|
|
144
141
|
if (part === "secondSuffix") {
|
|
145
142
|
let secondSuffixPart;
|
|
146
|
-
const
|
|
147
|
-
const fractionalSecondIndex = fractionalSecondPart ? parts.indexOf(fractionalSecondPart) : -1;
|
|
143
|
+
const fractionalSecondIndex = parts.indexOf(parts.find(({ type }) => type === "fractionalSecond"));
|
|
148
144
|
if (fractionalSecondIndex !== -1) {
|
|
149
145
|
secondSuffixPart = parts[fractionalSecondIndex + 1];
|
|
150
146
|
} else {
|
|
151
|
-
const
|
|
152
|
-
const secondIndex = secondPart ? parts.indexOf(secondPart) : -1;
|
|
147
|
+
const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
|
|
153
148
|
secondSuffixPart = parts[secondIndex + 1];
|
|
154
149
|
}
|
|
155
150
|
return secondSuffixPart?.type === "literal" && secondSuffixPart.value || null;
|
|
@@ -157,7 +152,7 @@ function getLocalizedTimePart(part, parts, locale = "en") {
|
|
|
157
152
|
if (part === "meridiem") {
|
|
158
153
|
const meridiemFromBrowser = parts.find(({ type }) => type === "dayPeriod")?.value || null;
|
|
159
154
|
if (meridiemFromBrowser) {
|
|
160
|
-
return getLocalizedMeridiem({ locale, parts })
|
|
155
|
+
return getLocalizedMeridiem({ locale, parts });
|
|
161
156
|
}
|
|
162
157
|
}
|
|
163
158
|
return parts.find(({ type }) => type === part)?.value || null;
|
|
@@ -197,11 +192,14 @@ function isValidTime(value) {
|
|
|
197
192
|
}
|
|
198
193
|
const hourAsNumber = parseInt(hour);
|
|
199
194
|
const minuteAsNumber = parseInt(minute);
|
|
200
|
-
const secondAsNumber = parseInt(second
|
|
195
|
+
const secondAsNumber = parseInt(second);
|
|
201
196
|
const hourValid = isValidNumber(hour) && hourAsNumber >= 0 && hourAsNumber < 24;
|
|
202
197
|
const minuteValid = isValidNumber(minute) && minuteAsNumber >= 0 && minuteAsNumber < 60;
|
|
203
198
|
const secondValid = isValidNumber(second) && secondAsNumber >= 0 && secondAsNumber < 60;
|
|
204
|
-
|
|
199
|
+
if (hourValid && minuteValid && !second || hourValid && minuteValid && secondValid) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
205
203
|
}
|
|
206
204
|
function isValidTimePart(value, part) {
|
|
207
205
|
if (part === "meridiem") {
|
|
@@ -210,8 +208,7 @@ function isValidTimePart(value, part) {
|
|
|
210
208
|
if (!isValidNumber(value)) {
|
|
211
209
|
return false;
|
|
212
210
|
}
|
|
213
|
-
const
|
|
214
|
-
const valueAsNumber = Number(valueAsString);
|
|
211
|
+
const valueAsNumber = Number(value);
|
|
215
212
|
const isZeroOrGreater = valueAsNumber >= 0;
|
|
216
213
|
const isLessThanMaxHour = valueAsNumber < 24;
|
|
217
214
|
const isLessThanMaxSecond = valueAsNumber < 60;
|
|
@@ -293,8 +290,8 @@ function localizeTimeString({
|
|
|
293
290
|
0,
|
|
294
291
|
parseInt(hour),
|
|
295
292
|
parseInt(minute),
|
|
296
|
-
includeSeconds &&
|
|
297
|
-
includeSeconds && fractionalSecond
|
|
293
|
+
includeSeconds && parseInt(second),
|
|
294
|
+
includeSeconds && fractionalSecond && fractionalSecondPartToMilliseconds(fractionalSecond)
|
|
298
295
|
)
|
|
299
296
|
);
|
|
300
297
|
const formatter = createLocaleDateTimeFormatter({
|
|
@@ -314,7 +311,7 @@ function localizeTimeString({
|
|
|
314
311
|
second: getLocalizedTimePart("second", parts),
|
|
315
312
|
decimalSeparator: getLocalizedDecimalSeparator(locale, numberingSystem),
|
|
316
313
|
fractionalSecond: getLocalizedTimePart("fractionalSecond", parts),
|
|
317
|
-
secondSuffix: locale !== "bg"
|
|
314
|
+
secondSuffix: locale !== "bg" && getLocalizedTimePart("secondSuffix", parts),
|
|
318
315
|
meridiem: getLocalizedTimePart("meridiem", parts, locale)
|
|
319
316
|
};
|
|
320
317
|
} else {
|
|
@@ -344,7 +341,7 @@ function parseTimeString(value, step) {
|
|
|
344
341
|
if (secondDecimal?.includes(".")) {
|
|
345
342
|
[second, fractionalSecond] = secondDecimal.split(".");
|
|
346
343
|
}
|
|
347
|
-
if (step
|
|
344
|
+
if (step) {
|
|
348
345
|
fractionalSecond = formatFractionalSecond(fractionalSecond, step);
|
|
349
346
|
}
|
|
350
347
|
return {
|
|
@@ -425,7 +422,7 @@ class TimeController extends GenericController {
|
|
|
425
422
|
case "Backspace":
|
|
426
423
|
case "Delete":
|
|
427
424
|
event.preventDefault();
|
|
428
|
-
this.setValuePart("hour",
|
|
425
|
+
this.setValuePart("hour", null);
|
|
429
426
|
break;
|
|
430
427
|
case "ArrowDown":
|
|
431
428
|
event.preventDefault();
|
|
@@ -447,7 +444,7 @@ class TimeController extends GenericController {
|
|
|
447
444
|
if (numberKeys.includes(key)) {
|
|
448
445
|
const keyAsNumber = parseInt(key);
|
|
449
446
|
let newMinute;
|
|
450
|
-
if (
|
|
447
|
+
if (isValidNumber(this.minute) && this.minute.startsWith("0")) {
|
|
451
448
|
const minuteAsNumber = parseInt(this.minute);
|
|
452
449
|
newMinute = minuteAsNumber > maxTenthForMinuteAndSecond ? keyAsNumber : `${minuteAsNumber}${keyAsNumber}`;
|
|
453
450
|
} else {
|
|
@@ -459,7 +456,7 @@ class TimeController extends GenericController {
|
|
|
459
456
|
case "Backspace":
|
|
460
457
|
case "Delete":
|
|
461
458
|
event.preventDefault();
|
|
462
|
-
this.setValuePart("minute",
|
|
459
|
+
this.setValuePart("minute", null);
|
|
463
460
|
break;
|
|
464
461
|
case "ArrowDown":
|
|
465
462
|
event.preventDefault();
|
|
@@ -481,7 +478,7 @@ class TimeController extends GenericController {
|
|
|
481
478
|
if (numberKeys.includes(key)) {
|
|
482
479
|
const keyAsNumber = parseInt(key);
|
|
483
480
|
let newSecond;
|
|
484
|
-
if (
|
|
481
|
+
if (isValidNumber(this.second) && this.second.startsWith("0")) {
|
|
485
482
|
const secondAsNumber = parseInt(this.second);
|
|
486
483
|
newSecond = secondAsNumber > maxTenthForMinuteAndSecond ? keyAsNumber : `${secondAsNumber}${keyAsNumber}`;
|
|
487
484
|
} else {
|
|
@@ -493,7 +490,7 @@ class TimeController extends GenericController {
|
|
|
493
490
|
case "Backspace":
|
|
494
491
|
case "Delete":
|
|
495
492
|
event.preventDefault();
|
|
496
|
-
this.setValuePart("second",
|
|
493
|
+
this.setValuePart("second", null);
|
|
497
494
|
break;
|
|
498
495
|
case "ArrowDown":
|
|
499
496
|
event.preventDefault();
|
|
@@ -528,7 +525,7 @@ class TimeController extends GenericController {
|
|
|
528
525
|
case "Backspace":
|
|
529
526
|
case "Delete":
|
|
530
527
|
event.preventDefault();
|
|
531
|
-
this.setValuePart("fractionalSecond",
|
|
528
|
+
this.setValuePart("fractionalSecond", null);
|
|
532
529
|
break;
|
|
533
530
|
case "ArrowDown":
|
|
534
531
|
event.preventDefault();
|
|
@@ -586,7 +583,7 @@ class TimeController extends GenericController {
|
|
|
586
583
|
this.decrementMinuteOrSecond("second");
|
|
587
584
|
}
|
|
588
585
|
incrementHour() {
|
|
589
|
-
const newHour =
|
|
586
|
+
const newHour = isValidNumber(this.hour) ? this.hour === "23" ? 0 : parseInt(this.hour) + 1 : 1;
|
|
590
587
|
this.setValuePart("hour", newHour);
|
|
591
588
|
}
|
|
592
589
|
incrementMinute() {
|
|
@@ -697,7 +694,17 @@ class TimeController extends GenericController {
|
|
|
697
694
|
const newValue = toISOTimeString(value, step);
|
|
698
695
|
if (isValidTime(value)) {
|
|
699
696
|
const { hour, minute, second, fractionalSecond } = parseTimeString(newValue, step);
|
|
700
|
-
const
|
|
697
|
+
const {
|
|
698
|
+
hour: localizedHour,
|
|
699
|
+
hourSuffix: localizedHourSuffix,
|
|
700
|
+
minute: localizedMinute,
|
|
701
|
+
minuteSuffix: localizedMinuteSuffix,
|
|
702
|
+
second: localizedSecond,
|
|
703
|
+
secondSuffix: localizedSecondSuffix,
|
|
704
|
+
decimalSeparator: localizedDecimalSeparator,
|
|
705
|
+
fractionalSecond: localizedFractionalSecond,
|
|
706
|
+
meridiem: localizedMeridiem
|
|
707
|
+
} = localizeTimeString({
|
|
701
708
|
hour12,
|
|
702
709
|
locale,
|
|
703
710
|
numberingSystem,
|
|
@@ -709,19 +716,17 @@ class TimeController extends GenericController {
|
|
|
709
716
|
this.minute = minute;
|
|
710
717
|
this.second = second;
|
|
711
718
|
this.fractionalSecond = fractionalSecond;
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
this.localizedMeridiem = localized.meridiem;
|
|
724
|
-
}
|
|
719
|
+
this.localizedHour = localizedHour;
|
|
720
|
+
this.localizedHourSuffix = localizedHourSuffix;
|
|
721
|
+
this.localizedMinute = localizedMinute;
|
|
722
|
+
this.localizedMinuteSuffix = localizedMinuteSuffix;
|
|
723
|
+
this.localizedSecond = localizedSecond;
|
|
724
|
+
this.localizedDecimalSeparator = localizedDecimalSeparator;
|
|
725
|
+
this.localizedFractionalSecond = localizedFractionalSecond;
|
|
726
|
+
this.localizedSecondSuffix = localizedSecondSuffix;
|
|
727
|
+
if (localizedMeridiem) {
|
|
728
|
+
this.meridiem = getMeridiem(this.hour);
|
|
729
|
+
this.localizedMeridiem = localizedMeridiem;
|
|
725
730
|
}
|
|
726
731
|
} else {
|
|
727
732
|
this.hour = null;
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { isServer } from "lit";
|
|
3
3
|
import { n as nodeListToArray } from "./dom.js";
|
|
4
|
-
import { A as AllComboboxChildrenSelector, a as ComboboxItemSelector, b as ComboboxItemGroupSelector } from "./
|
|
4
|
+
import { A as AllComboboxChildrenSelector, a as ComboboxItemSelector, b as ComboboxItemGroupSelector } from "./resources6.js";
|
|
5
5
|
function getAncestors(element) {
|
|
6
6
|
const parent = element.parentElement?.closest(AllComboboxChildrenSelector);
|
|
7
7
|
const grandparent = parent?.parentElement?.closest(AllComboboxChildrenSelector);
|
|
@@ -47,12 +47,65 @@ function isSingleLike(selectionMode) {
|
|
|
47
47
|
function getLabel(item) {
|
|
48
48
|
return item.shortHeading || item.heading;
|
|
49
49
|
}
|
|
50
|
+
function orderByPrevious(items, previousItems) {
|
|
51
|
+
if (items.length < 2 || previousItems.length === 0) {
|
|
52
|
+
return items;
|
|
53
|
+
}
|
|
54
|
+
const previousItemOrder = new Map(previousItems.map((item, index) => [item, index]));
|
|
55
|
+
return [...items].sort((a, b) => {
|
|
56
|
+
const aOrder = previousItemOrder.get(a);
|
|
57
|
+
const bOrder = previousItemOrder.get(b);
|
|
58
|
+
if (aOrder !== void 0 && bOrder !== void 0) {
|
|
59
|
+
return aOrder - bOrder;
|
|
60
|
+
}
|
|
61
|
+
if (aOrder !== void 0) {
|
|
62
|
+
return -1;
|
|
63
|
+
}
|
|
64
|
+
if (bOrder !== void 0) {
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function consumeValue(counts, value) {
|
|
71
|
+
const count = counts.get(value) ?? 0;
|
|
72
|
+
if (count === 0) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (count === 1) {
|
|
76
|
+
counts.delete(value);
|
|
77
|
+
} else {
|
|
78
|
+
counts.set(value, count - 1);
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
function orderValuesByPrevious(selectedValues, previousValues) {
|
|
83
|
+
if (selectedValues.length < 2 || previousValues.length === 0) {
|
|
84
|
+
return selectedValues;
|
|
85
|
+
}
|
|
86
|
+
const selectedValueCounts = /* @__PURE__ */ new Map();
|
|
87
|
+
selectedValues.forEach((value) => {
|
|
88
|
+
selectedValueCounts.set(value, (selectedValueCounts.get(value) ?? 0) + 1);
|
|
89
|
+
});
|
|
90
|
+
const orderedSelectedValues = previousValues.filter((value) => consumeValue(selectedValueCounts, value));
|
|
91
|
+
if (orderedSelectedValues.length === 0) {
|
|
92
|
+
return selectedValues;
|
|
93
|
+
}
|
|
94
|
+
selectedValues.forEach((value) => {
|
|
95
|
+
if (consumeValue(selectedValueCounts, value)) {
|
|
96
|
+
orderedSelectedValues.push(value);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return orderedSelectedValues;
|
|
100
|
+
}
|
|
50
101
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
102
|
+
orderByPrevious as a,
|
|
103
|
+
getItemAncestors as b,
|
|
104
|
+
getItemChildren as c,
|
|
105
|
+
getAncestors as d,
|
|
106
|
+
getDepth as e,
|
|
55
107
|
getLabel as g,
|
|
56
108
|
hasActiveChildren as h,
|
|
57
|
-
isSingleLike as i
|
|
109
|
+
isSingleLike as i,
|
|
110
|
+
orderValuesByPrevious as o
|
|
58
111
|
};
|
|
@@ -31,7 +31,7 @@ import type { HeadingLevel } from "../functional/Heading.js";
|
|
|
31
31
|
*/
|
|
32
32
|
export abstract class AccordionItem extends LitElement {
|
|
33
33
|
/** Specifies a description for the component. */
|
|
34
|
-
accessor description: string
|
|
34
|
+
accessor description: string;
|
|
35
35
|
/**
|
|
36
36
|
* When `true`, expands the component and its contents.
|
|
37
37
|
*
|
|
@@ -39,15 +39,15 @@ export abstract class AccordionItem extends LitElement {
|
|
|
39
39
|
*/
|
|
40
40
|
accessor expanded: boolean;
|
|
41
41
|
/** Specifies the component's heading text. */
|
|
42
|
-
accessor heading: string
|
|
42
|
+
accessor heading: string;
|
|
43
43
|
/** Specifies the heading level number of the component's `heading` for proper document structure, without affecting visual styling. */
|
|
44
|
-
accessor headingLevel: HeadingLevel
|
|
44
|
+
accessor headingLevel: HeadingLevel;
|
|
45
45
|
/** Specifies an icon to display at the end of the component. */
|
|
46
|
-
accessor iconEnd: IconName
|
|
46
|
+
accessor iconEnd: IconName;
|
|
47
47
|
/** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
|
|
48
|
-
accessor iconFlipRtl: FlipContext
|
|
48
|
+
accessor iconFlipRtl: FlipContext;
|
|
49
49
|
/** Specifies an icon to display at the start of the component. */
|
|
50
|
-
accessor iconStart: IconName
|
|
50
|
+
accessor iconStart: IconName;
|
|
51
51
|
/** Overrides individual strings used by the component. */
|
|
52
52
|
accessor messageOverrides: {
|
|
53
53
|
collapse?: string;
|
|
@@ -70,7 +70,7 @@ class AccordionItem extends LitElement {
|
|
|
70
70
|
this.listenOn(document, "calciteInternalAccordionItemsSync", this.accordionItemSyncHandler);
|
|
71
71
|
}
|
|
72
72
|
static {
|
|
73
|
-
this.properties = { hasActionsEnd: [16, {}, { state: true }], hasActionsStart: [16, {}, { state: true }], hasContentEnd: [16, {}, { state: true }], hasContentStart: [16, {}, { state: true }], description: 1, expanded: [7, {}, { reflect: true, type: Boolean }], heading: 1, iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], appearance: 1, headingLevel: [11, {}, { type: Number, reflect: true }], iconPosition: 1, iconStart: [3, { type: String }, { reflect: true }], iconType: 1, scale: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }] };
|
|
73
|
+
this.properties = { hasActionsEnd: [16, {}, { state: true }], hasActionsStart: [16, {}, { state: true }], hasContentEnd: [16, {}, { state: true }], hasContentStart: [16, {}, { state: true }], accordionParent: [0, {}, { attribute: false }], description: 1, expanded: [7, {}, { reflect: true, type: Boolean }], heading: 1, iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], appearance: 1, headingLevel: [11, {}, { type: Number, reflect: true }], iconPosition: 1, iconStart: [3, { type: String }, { reflect: true }], iconType: 1, scale: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }] };
|
|
74
74
|
}
|
|
75
75
|
static {
|
|
76
76
|
this.styles = styles;
|
|
@@ -37,7 +37,7 @@ export abstract class Alert extends LitElement {
|
|
|
37
37
|
* When `true`, shows a default recommended icon. Alternatively,
|
|
38
38
|
* pass a Calcite UI Icon name to display a specific icon.
|
|
39
39
|
*/
|
|
40
|
-
accessor icon: IconName | boolean
|
|
40
|
+
accessor icon: IconName | boolean;
|
|
41
41
|
/**
|
|
42
42
|
* When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
|
|
43
43
|
*
|
|
@@ -59,7 +59,7 @@ export abstract class Alert extends LitElement {
|
|
|
59
59
|
/** Overrides individual strings used by the component. */
|
|
60
60
|
accessor messageOverrides: { close?: string; };
|
|
61
61
|
/** Specifies the Unicode numeral system used by the component for localization. */
|
|
62
|
-
accessor numberingSystem: NumberingSystem
|
|
62
|
+
accessor numberingSystem: NumberingSystem;
|
|
63
63
|
/**
|
|
64
64
|
* When `true`, displays and positions the component.
|
|
65
65
|
*
|
|
@@ -95,9 +95,7 @@ const manager = new AlertManager();
|
|
|
95
95
|
class Alert extends LitElement {
|
|
96
96
|
constructor() {
|
|
97
97
|
super(...arguments);
|
|
98
|
-
this.
|
|
99
|
-
this.isHovered = false;
|
|
100
|
-
this.lastMouseOverBegin = -1;
|
|
98
|
+
this.autoCloseTimeoutId = null;
|
|
101
99
|
this.transitionProp = "opacity";
|
|
102
100
|
this.totalHoverTime = 0;
|
|
103
101
|
this.totalOpenTime = 0;
|
|
@@ -228,7 +226,7 @@ class Alert extends LitElement {
|
|
|
228
226
|
}
|
|
229
227
|
clearAutoCloseTimeout() {
|
|
230
228
|
window.clearTimeout(this.autoCloseTimeoutId);
|
|
231
|
-
this.autoCloseTimeoutId =
|
|
229
|
+
this.autoCloseTimeoutId = null;
|
|
232
230
|
}
|
|
233
231
|
closeAlert() {
|
|
234
232
|
this.open = false;
|
|
@@ -288,10 +286,10 @@ class Alert extends LitElement {
|
|
|
288
286
|
[`${CSS.container}--${placement}`]: true,
|
|
289
287
|
[CSS.containerEmbedded]: this.embedded,
|
|
290
288
|
[CSS.focused]: this.isFocused
|
|
291
|
-
})} @pointerenter=${this.autoClose && this.autoCloseTimeoutId ? this.handleMouseOver :
|
|
289
|
+
})} @pointerenter=${this.autoClose && this.autoCloseTimeoutId ? this.handleMouseOver : null} @pointerleave=${this.autoClose ? this.handleMouseLeave : null} .popover=${!this.embedded ? "manual" : null} ${ref(this.transitionRef)}>${effectiveIcon && this.renderIcon(effectiveIcon) || ""}<div class=${safeClassMap(CSS.textContainer)} @focusin=${this.autoClose && this.autoCloseTimeoutId ? this.handleKeyBoardFocus : null} @focusout=${this.autoClose ? this.handleKeyBoardBlur : null}><slot name=${SLOTS.title}></slot><slot name=${SLOTS.message}></slot><slot name=${SLOTS.link}></slot></div>${this.renderActionsEnd()}${hasQueuedAlerts ? this.renderQueueCount() : null}${this.renderCloseButton()}${open && active && autoClose ? html`<div class=${safeClassMap(CSS.dismissProgress)}></div>` : null}</div>`;
|
|
292
290
|
}
|
|
293
291
|
renderCloseButton() {
|
|
294
|
-
return html`<calcite-action class=${safeClassMap(CSS.close)} icon=x .label=${this.messages.close} @click=${this.closeAlert} @focusin=${this.autoClose ? this.handleKeyBoardFocus :
|
|
292
|
+
return html`<calcite-action class=${safeClassMap(CSS.close)} icon=x .label=${this.messages.close} @click=${this.closeAlert} @focusin=${this.autoClose ? this.handleKeyBoardFocus : null} @focusout=${this.autoClose ? this.handleKeyBoardBlur : null} .scale=${this.scale} .text=${this.messages.close}></calcite-action>`;
|
|
295
293
|
}
|
|
296
294
|
renderQueueCount() {
|
|
297
295
|
const { openAlertCount } = this;
|
|
@@ -46,7 +46,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
46
46
|
*
|
|
47
47
|
* @see [MDN - autocomplete](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete)
|
|
48
48
|
*/
|
|
49
|
-
accessor autocomplete: AutoFill
|
|
49
|
+
accessor autocomplete: AutoFill;
|
|
50
50
|
/**
|
|
51
51
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
52
52
|
*
|
|
@@ -54,19 +54,19 @@ export abstract class Autocomplete extends LitElement {
|
|
|
54
54
|
*/
|
|
55
55
|
accessor disabled: boolean;
|
|
56
56
|
/** Specifies the component's fallback `placement` for slotted content when it's initial or specified `placement` has insufficient space available. */
|
|
57
|
-
accessor flipPlacements: FlipPlacement[]
|
|
57
|
+
accessor flipPlacements: FlipPlacement[];
|
|
58
58
|
/**
|
|
59
59
|
* Specifies the `id` of the component's associated form.
|
|
60
60
|
*
|
|
61
61
|
* When not set, the component is associated with its ancestor form element, if one exists.
|
|
62
62
|
*/
|
|
63
|
-
accessor form: string
|
|
63
|
+
accessor form: string;
|
|
64
64
|
/**
|
|
65
65
|
* When `true` or not set, shows a default recommended icon. Alternatively, pass a Calcite UI Icon name to display a specific icon.
|
|
66
66
|
*
|
|
67
67
|
* To hide the default icon, set the property to `false` using JavaScript.
|
|
68
68
|
*/
|
|
69
|
-
accessor icon: IconName | boolean
|
|
69
|
+
accessor icon: IconName | boolean;
|
|
70
70
|
/**
|
|
71
71
|
* When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
|
|
72
72
|
*
|
|
@@ -74,11 +74,11 @@ export abstract class Autocomplete extends LitElement {
|
|
|
74
74
|
*/
|
|
75
75
|
accessor iconFlipRtl: boolean;
|
|
76
76
|
/** Specifies the text typed into the component and is used to filter slotted `autocomplete-item`s. */
|
|
77
|
-
accessor inputValue: string
|
|
77
|
+
accessor inputValue: string;
|
|
78
78
|
/** Specifies an accessible label for the component. */
|
|
79
|
-
accessor label: string
|
|
79
|
+
accessor label: string;
|
|
80
80
|
/** Specifies the component's label text. */
|
|
81
|
-
accessor labelText: string
|
|
81
|
+
accessor labelText: string;
|
|
82
82
|
/**
|
|
83
83
|
* When `true`, a busy indicator is displayed.
|
|
84
84
|
*
|
|
@@ -91,7 +91,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
91
91
|
*
|
|
92
92
|
* @see [MDN - maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength)
|
|
93
93
|
*/
|
|
94
|
-
accessor maxLength: number
|
|
94
|
+
accessor maxLength: number;
|
|
95
95
|
/** Overrides individual strings used by the component. */
|
|
96
96
|
accessor messageOverrides: {
|
|
97
97
|
clear?: string;
|
|
@@ -104,7 +104,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
104
104
|
*
|
|
105
105
|
* @see [MDN - minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength)
|
|
106
106
|
*/
|
|
107
|
-
accessor minLength: number
|
|
107
|
+
accessor minLength: number;
|
|
108
108
|
/**
|
|
109
109
|
* Specifies the name of the component.
|
|
110
110
|
*
|
|
@@ -112,7 +112,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
112
112
|
*
|
|
113
113
|
* @see [MDN - name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name)
|
|
114
114
|
*/
|
|
115
|
-
accessor name: string
|
|
115
|
+
accessor name: string;
|
|
116
116
|
/**
|
|
117
117
|
* When `true`, displays and positions the component.
|
|
118
118
|
*
|
|
@@ -136,13 +136,13 @@ export abstract class Autocomplete extends LitElement {
|
|
|
136
136
|
*
|
|
137
137
|
* @see [MDN - step](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern)
|
|
138
138
|
*/
|
|
139
|
-
accessor pattern: string
|
|
139
|
+
accessor pattern: string;
|
|
140
140
|
/**
|
|
141
141
|
* Specifies placeholder text for the component.
|
|
142
142
|
*
|
|
143
143
|
* @see [MDN - placeholder](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder)
|
|
144
144
|
*/
|
|
145
|
-
accessor placeholder: string
|
|
145
|
+
accessor placeholder: string;
|
|
146
146
|
/**
|
|
147
147
|
* Determines where the component will be positioned relative to the container element.
|
|
148
148
|
*
|
|
@@ -150,7 +150,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
150
150
|
*/
|
|
151
151
|
accessor placement: MenuPlacement;
|
|
152
152
|
/** Specifies the component's prefix text. */
|
|
153
|
-
accessor prefixText: string
|
|
153
|
+
accessor prefixText: string;
|
|
154
154
|
/**
|
|
155
155
|
* When `true`, the component's value can be read, but cannot be modified.
|
|
156
156
|
*
|
|
@@ -178,7 +178,7 @@ export abstract class Autocomplete extends LitElement {
|
|
|
178
178
|
*/
|
|
179
179
|
accessor status: Status;
|
|
180
180
|
/** Specifies the component's suffix text. */
|
|
181
|
-
accessor suffixText: string
|
|
181
|
+
accessor suffixText: string;
|
|
182
182
|
/**
|
|
183
183
|
* When `true` and the component is `open`, disables top layer placement.
|
|
184
184
|
*
|
|
@@ -189,9 +189,9 @@ export abstract class Autocomplete extends LitElement {
|
|
|
189
189
|
*/
|
|
190
190
|
accessor topLayerDisabled: boolean;
|
|
191
191
|
/** Specifies the validation icon to display under the component. */
|
|
192
|
-
accessor validationIcon: IconName | boolean
|
|
192
|
+
accessor validationIcon: IconName | boolean;
|
|
193
193
|
/** Specifies the validation message to display under the component. */
|
|
194
|
-
accessor validationMessage: string
|
|
194
|
+
accessor validationMessage: string;
|
|
195
195
|
/**
|
|
196
196
|
* The component's current validation state.
|
|
197
197
|
*
|
|
@@ -130,7 +130,7 @@ class Autocomplete extends LitElement {
|
|
|
130
130
|
this.transitionRef.value?.scrollTo(options);
|
|
131
131
|
}
|
|
132
132
|
async selectText() {
|
|
133
|
-
return this.referenceEl
|
|
133
|
+
return this.referenceEl.selectText();
|
|
134
134
|
}
|
|
135
135
|
async setFocus(options) {
|
|
136
136
|
return this.focusSetter(() => this.referenceEl, options);
|
|
@@ -163,7 +163,7 @@ class Autocomplete extends LitElement {
|
|
|
163
163
|
}
|
|
164
164
|
let itemsAndGroupsUpdated = false;
|
|
165
165
|
if (changes.has("inputValue") && (this.hasUpdated || this.inputValue)) {
|
|
166
|
-
this.inputValueMatchPattern = this.inputValue
|
|
166
|
+
this.inputValueMatchPattern = this.inputValue && new RegExp(`(${escapeRegExp(this.inputValue)})`, "i");
|
|
167
167
|
this.updateItems();
|
|
168
168
|
this.updateGroups();
|
|
169
169
|
itemsAndGroupsUpdated = true;
|
|
@@ -260,7 +260,7 @@ class Autocomplete extends LitElement {
|
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
updateItems() {
|
|
263
|
-
let activeDescendant =
|
|
263
|
+
let activeDescendant = null;
|
|
264
264
|
this.items.forEach((item) => {
|
|
265
265
|
item.scale = this.scale;
|
|
266
266
|
item.inputValueMatchPattern = this.inputValueMatchPattern;
|
|
@@ -386,7 +386,7 @@ class Autocomplete extends LitElement {
|
|
|
386
386
|
const autofocus = this.el.autofocus;
|
|
387
387
|
const enterKeyHint = this.el.enterKeyHint;
|
|
388
388
|
const inputMode = this.el.inputMode;
|
|
389
|
-
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant ?? nothing} aria-controls=${listId ?? nothing} aria-label=${getLabelText(this) ?? nothing} aria-owns=${listId ?? nothing} aria-autocomplete=list .ariaExpanded=${isOpen} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${autofocus} class=${safeClassMap(CSS.input)} clearable .disabled=${disabled} enterkeyhint=${enterKeyHint ?? nothing} .form=${this.form} .icon=${this.icon ?? true} .iconFlipRtl=${this.iconFlipRtl} id=${inputId ?? nothing} inputmode=${inputMode ?? nothing} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @
|
|
389
|
+
return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant ?? nothing} aria-controls=${listId ?? nothing} aria-label=${getLabelText(this) ?? nothing} aria-owns=${listId ?? nothing} aria-autocomplete=list .ariaExpanded=${isOpen} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${autofocus} class=${safeClassMap(CSS.input)} clearable .disabled=${disabled} enterkeyhint=${enterKeyHint ?? nothing} .form=${this.form} .icon=${this.icon ?? true} .iconFlipRtl=${this.iconFlipRtl} id=${inputId ?? nothing} inputmode=${inputMode ?? nothing} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} .required=${this.required} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${ref(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${safeClassMap({
|
|
390
390
|
[CSS.contentContainer]: true,
|
|
391
391
|
[CSS.floatingUIContainer]: true,
|
|
392
392
|
[CSS.floatingUIContainerActive]: isOpen
|
|
@@ -13,7 +13,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export abstract class AutocompleteItem extends LitElement {
|
|
15
15
|
/** Specifies a description for the component. Displays below the label text. */
|
|
16
|
-
accessor description: string
|
|
16
|
+
accessor description: string;
|
|
17
17
|
/**
|
|
18
18
|
* When `true`, interaction is prevented and the component is displayed with lower opacity.
|
|
19
19
|
*
|
|
@@ -27,13 +27,13 @@ export abstract class AutocompleteItem extends LitElement {
|
|
|
27
27
|
*/
|
|
28
28
|
accessor heading: string;
|
|
29
29
|
/** Specifies an icon to display at the end of the component. */
|
|
30
|
-
accessor iconEnd: IconName
|
|
30
|
+
accessor iconEnd: IconName;
|
|
31
31
|
/** Displays the `iconStart` and/or `iconEnd` as flipped when the element direction is right-to-left (`"rtl"`). */
|
|
32
|
-
accessor iconFlipRtl: FlipContext
|
|
32
|
+
accessor iconFlipRtl: FlipContext;
|
|
33
33
|
/** Specifies an icon to display at the start of the component. */
|
|
34
|
-
accessor iconStart: IconName
|
|
34
|
+
accessor iconStart: IconName;
|
|
35
35
|
/** Specifies an accessible label for the component. */
|
|
36
|
-
accessor label: string
|
|
36
|
+
accessor label: string;
|
|
37
37
|
/**
|
|
38
38
|
* When `true`, the component is selected.
|
|
39
39
|
*
|
|
@@ -9,9 +9,9 @@ import type { Scale } from "../interfaces.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export abstract class Avatar extends LitElement {
|
|
11
11
|
/** Specifies the full name of the user. When `label` and `thumbnail` are not defined, specifies the accessible name for the component. */
|
|
12
|
-
accessor fullName: string
|
|
12
|
+
accessor fullName: string;
|
|
13
13
|
/** Specifies alternative text when `thumbnail` is defined, otherwise specifies an accessible label for the component. */
|
|
14
|
-
accessor label: string
|
|
14
|
+
accessor label: string;
|
|
15
15
|
/**
|
|
16
16
|
* Specifies the size of the component.
|
|
17
17
|
*
|
|
@@ -19,9 +19,9 @@ export abstract class Avatar extends LitElement {
|
|
|
19
19
|
*/
|
|
20
20
|
accessor scale: Scale;
|
|
21
21
|
/** Specifies the `src` to an image. If the image is private, include an access token in the URL. */
|
|
22
|
-
accessor thumbnail: string
|
|
22
|
+
accessor thumbnail: string;
|
|
23
23
|
/** Specifies the unique id of the user. */
|
|
24
|
-
accessor userId: string
|
|
24
|
+
accessor userId: string;
|
|
25
25
|
/** Specifies the username of the user. */
|
|
26
|
-
accessor username: string
|
|
26
|
+
accessor username: string;
|
|
27
27
|
}
|
|
@@ -30,7 +30,7 @@ export abstract class Card extends LitElement {
|
|
|
30
30
|
*/
|
|
31
31
|
accessor disabled: boolean;
|
|
32
32
|
/** Specifies an accessible label for the component. */
|
|
33
|
-
accessor label: string
|
|
33
|
+
accessor label: string;
|
|
34
34
|
/**
|
|
35
35
|
* When `true`, a busy indicator is displayed.
|
|
36
36
|
*
|