@ds-autonomie/web-components 2.21.0 → 2.21.2
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 +17 -0
- package/cdn/chunks/{chunk.OZUBIMSO.js → chunk.2ER3NBC5.js} +1 -1
- package/cdn/chunks/{chunk.7T3GRSME.js → chunk.2PBEBWOP.js} +1 -1
- package/cdn/chunks/{chunk.DZNXUAKA.js → chunk.37M4BXLK.js} +1 -1
- package/cdn/chunks/{chunk.3NZ4VRJF.js → chunk.4SRRFJ5K.js} +1 -1
- package/cdn/chunks/{chunk.THBCP6LI.js → chunk.4VPKUUYI.js} +1 -1
- package/cdn/chunks/{chunk.BFOG2B56.js → chunk.5BVWK6K3.js} +1 -1
- package/cdn/chunks/chunk.5KKFNICD.js +121 -0
- package/cdn/chunks/{chunk.JU47KXI6.js → chunk.64XZMZ77.js} +1 -1
- package/cdn/chunks/{chunk.6Y5FKCNR.js → chunk.6B4UFELP.js} +7 -7
- package/cdn/chunks/{chunk.I4AEWSTQ.js → chunk.6EJNSZJR.js} +1 -1
- package/cdn/chunks/{chunk.AHAZYWZF.js → chunk.6VYL37C4.js} +1 -1
- package/cdn/chunks/{chunk.UPUWTQY3.js → chunk.7HT5EWGA.js} +1 -1
- package/cdn/chunks/chunk.7RARSIUW.js +38 -0
- package/cdn/chunks/{chunk.CWRA4UT2.js → chunk.7RM7VDGX.js} +1 -1
- package/cdn/chunks/{chunk.VM2KBACU.js → chunk.AAYMCYCU.js} +1 -1
- package/cdn/chunks/{chunk.LXVTY3UZ.js → chunk.AMOSE5HG.js} +1 -1
- package/cdn/chunks/{chunk.NLFHV3ZO.js → chunk.APXTIKVI.js} +1 -1
- package/cdn/chunks/{chunk.XVTFPCEL.js → chunk.BTHWDYRM.js} +6 -5
- package/cdn/chunks/{chunk.SCA6KI3Y.js → chunk.D52GGKLJ.js} +1 -1
- package/cdn/chunks/chunk.DIMD2VOY.js +23 -0
- package/cdn/chunks/{chunk.GHH7XYKB.js → chunk.DOFWGC23.js} +1 -1
- package/cdn/chunks/chunk.DQCCNCWD.js +56 -0
- package/cdn/chunks/{chunk.6DSY52TF.js → chunk.DYFOZ46Z.js} +1 -1
- package/cdn/chunks/chunk.E2MXTZP6.js +65 -0
- package/cdn/chunks/{chunk.XXFCN6MW.js → chunk.EBMR5RUP.js} +1 -1
- package/cdn/chunks/{chunk.7DI4X2VG.js → chunk.EYRLG5PX.js} +1 -1
- package/cdn/chunks/{chunk.VCAUYLU6.js → chunk.EZJFC4HU.js} +1 -1
- package/cdn/chunks/{chunk.DGEG6HVV.js → chunk.F2JIMT3T.js} +1 -1
- package/cdn/chunks/{chunk.WDYFEO2Q.js → chunk.FAW4PEMU.js} +3 -3
- package/cdn/chunks/{chunk.DBVKBRPG.js → chunk.FWFZG7TN.js} +1 -1
- package/cdn/chunks/{chunk.CT4MJF6T.js → chunk.GI2AQXQB.js} +1 -1
- package/cdn/chunks/{chunk.OR4BPTYF.js → chunk.H56SHMXX.js} +1 -1
- package/cdn/chunks/{chunk.27RSAF7P.js → chunk.H63LC2FP.js} +1 -1
- package/cdn/chunks/{chunk.LPXI2TGU.js → chunk.HN7OEKVB.js} +1 -1
- package/cdn/chunks/{chunk.UB73V5BI.js → chunk.HYHQBG6T.js} +1 -1
- package/cdn/chunks/{chunk.VRETONIU.js → chunk.HYQVCAH7.js} +1 -1
- package/cdn/chunks/{chunk.A7WF23I3.js → chunk.IBACM3KM.js} +1 -1
- package/cdn/chunks/{chunk.XZWROQBU.js → chunk.IDZ2RBHS.js} +5 -2
- package/cdn/chunks/{chunk.CFJ4QXH4.js → chunk.IXAKCI7U.js} +1 -1
- package/cdn/chunks/{chunk.GNP3HUWO.js → chunk.IZFWLGVN.js} +1 -1
- package/cdn/chunks/{chunk.K6LO352V.js → chunk.IZFZSMNL.js} +1 -1
- package/cdn/chunks/{chunk.M4NNGNSF.js → chunk.L4PDR2XQ.js} +1 -1
- package/cdn/chunks/{chunk.N35G45JG.js → chunk.L7V323CK.js} +1 -1
- package/cdn/chunks/{chunk.353PHEPC.js → chunk.LIHGH26S.js} +1 -1
- package/cdn/chunks/chunk.MU332V37.js +42 -0
- package/cdn/chunks/{chunk.POOZWGH5.js → chunk.MYN44Z6S.js} +1 -1
- package/cdn/chunks/chunk.NHMFB7ET.js +1 -0
- package/cdn/chunks/{chunk.IJ4EFTP2.js → chunk.NUADNBQV.js} +1 -1
- package/cdn/chunks/{chunk.BWWABV2J.js → chunk.NVJC2QTS.js} +1 -1
- package/cdn/chunks/{chunk.MIF4MK3R.js → chunk.NYTHY7TB.js} +1 -1
- package/cdn/chunks/{chunk.RMHUEO6M.js → chunk.OB2C6PTR.js} +1 -1
- package/cdn/chunks/{chunk.ELL45QD3.js → chunk.ODDQO2HD.js} +1 -1
- package/cdn/chunks/{chunk.Z33ITBWZ.js → chunk.ONUDFMLG.js} +8 -8
- package/cdn/chunks/{chunk.TBAF2O5H.js → chunk.OTYLTVBL.js} +1 -1
- package/cdn/chunks/chunk.PAYML2WU.js +20 -0
- package/cdn/chunks/{chunk.OE4QGAVP.js → chunk.PRKWQXS3.js} +1 -1
- package/cdn/chunks/{chunk.FASLFYND.js → chunk.Q5SVZYIN.js} +1 -1
- package/cdn/chunks/{chunk.P5OHHVIZ.js → chunk.QRLWNZCU.js} +1 -1
- package/cdn/chunks/{chunk.I6KH3RXW.js → chunk.QTXLNRFI.js} +1 -1
- package/cdn/chunks/{chunk.OHC3KP3N.js → chunk.RC2F2CPY.js} +1 -1
- package/cdn/chunks/{chunk.OSQWNBGB.js → chunk.RCVYUT4P.js} +1 -1
- package/cdn/chunks/{chunk.B6OZRSZK.js → chunk.RSIWBM4T.js} +1 -1
- package/cdn/chunks/chunk.S3CAREPN.js +18 -0
- package/cdn/chunks/{chunk.YG7EIWOO.js → chunk.TLQIAQRC.js} +1 -1
- package/cdn/chunks/{chunk.AWM5EZRY.js → chunk.TMUGGTVF.js} +1 -1
- package/cdn/chunks/{chunk.UIEL566X.js → chunk.TNPDX6EX.js} +1 -1
- package/cdn/chunks/chunk.TY4KYVHJ.js +27 -0
- package/cdn/chunks/{chunk.5VZFKPSK.js → chunk.U4A36HDQ.js} +1 -1
- package/cdn/chunks/{chunk.4HFX2WWN.js → chunk.UKO4J7PG.js} +1 -1
- package/cdn/chunks/{chunk.OX4H5VZP.js → chunk.UUN3KGYB.js} +1 -1
- package/cdn/chunks/{chunk.AGV4A3YT.js → chunk.UXEA6PSC.js} +1 -1
- package/cdn/chunks/{chunk.UQC4FZQO.js → chunk.UXYCUMRZ.js} +1 -1
- package/cdn/chunks/{chunk.QZ7M6OGO.js → chunk.VILF2M2M.js} +1 -1
- package/cdn/chunks/{chunk.UREKS7QR.js → chunk.VPTZFEPZ.js} +1 -1
- package/cdn/chunks/{chunk.ZQPFBR34.js → chunk.WCHNPFSL.js} +1 -1
- package/cdn/chunks/{chunk.XBO6BPEL.js → chunk.XUW6MAEV.js} +1 -1
- package/cdn/chunks/{chunk.YEEGO6X3.js → chunk.YIFMUGSO.js} +1 -1
- package/cdn/chunks/{chunk.VBIJSQJQ.js → chunk.YQETGEXV.js} +1 -1
- package/cdn/chunks/{chunk.GGN6W46J.js → chunk.ZGGW2XG7.js} +1 -1
- package/cdn/chunks/{chunk.6ETSOBAB.js → chunk.ZOGTB7J7.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/badge/badge.js +1 -1
- package/cdn/components/banner/banner.js +1 -1
- package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
- package/cdn/components/calendar/calendar.js +1 -1
- package/cdn/components/calendar/calendar.styles.js +1 -1
- package/cdn/components/callout/callout.js +1 -1
- package/cdn/components/callout/callout.styles.js +1 -1
- package/cdn/components/card/card.js +1 -1
- package/cdn/components/card-content/card-content.js +1 -1
- package/cdn/components/card-nav/card-nav.js +1 -1
- package/cdn/components/card-nav-accordion/card-nav-accordion.js +1 -1
- package/cdn/components/card-nav-item/card-nav-item.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox-button/checkbox-button.js +1 -1
- package/cdn/components/checkbox-card/checkbox-card.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/copy-button/copy-button.js +1 -1
- package/cdn/components/copy-button/copy-button.styles.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/dropdown/dropdown.js +1 -1
- package/cdn/components/error-message-panel/error-message-panel.js +1 -1
- package/cdn/components/fieldset/fieldset.js +1 -1
- package/cdn/components/file-upload/file-upload.js +1 -1
- package/cdn/components/filter-counter/filter-counter.js +1 -1
- package/cdn/components/filter-date/filter-date.js +1 -1
- package/cdn/components/filter-range/filter-range.js +1 -1
- package/cdn/components/filter-select/filter-select.d.ts +0 -1
- package/cdn/components/filter-select/filter-select.js +1 -1
- package/cdn/components/footer/footer.js +1 -1
- package/cdn/components/footer-content-block/footer-content-block.js +1 -1
- package/cdn/components/footer-mandatory-mentions/footer-mandatory-mentions.js +1 -1
- package/cdn/components/footer-sitemap/footer-sitemap.js +1 -1
- package/cdn/components/header/header.js +1 -1
- package/cdn/components/header-modern/header-modern.js +1 -1
- package/cdn/components/header-search/header-search.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/input-amount/input-amount.js +1 -1
- package/cdn/components/input-date/input-date.js +1 -1
- package/cdn/components/input-mask/input-mask.js +1 -1
- package/cdn/components/input-mask/input-mask.utils.d.ts +0 -1
- package/cdn/components/input-mask/input-mask.utils.js +1 -1
- package/cdn/components/input-native/input-native.js +1 -1
- package/cdn/components/input-otp/input-otp.js +1 -1
- package/cdn/components/input-phone/input-phone.js +1 -1
- package/cdn/components/input-time/input-time.js +1 -1
- package/cdn/components/menu-accordion/menu-accordion.js +1 -1
- package/cdn/components/menu-item/menu-item.js +1 -1
- package/cdn/components/menu-navigation/menu-navigation.js +1 -1
- package/cdn/components/navbar-link/navbar-link.js +1 -1
- package/cdn/components/navbar-menu/navbar-menu.js +1 -1
- package/cdn/components/page-header/page-header.js +1 -1
- package/cdn/components/pagination/pagination.js +1 -1
- package/cdn/components/pagination-button/pagination-button.js +1 -1
- package/cdn/components/popup/popup.js +1 -1
- package/cdn/components/profile-button/profile-button.js +1 -1
- package/cdn/components/radio-button/radio-button.js +1 -1
- package/cdn/components/radio-card/radio-card.js +1 -1
- package/cdn/components/radio-group/radio-group.js +1 -1
- package/cdn/components/search/search.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/sidenav/sidenav.js +1 -1
- package/cdn/components/sidenav-info-accordion/sidenav-info-accordion.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/table-caption/table-caption.js +1 -1
- package/cdn/components/table-container/table-container.js +1 -1
- package/cdn/components/table-header-row/table-header-row.js +1 -1
- package/cdn/components/table-row/table-row.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/components/tree/tree.js +1 -1
- package/cdn/custom-elements.json +260 -326
- package/cdn/design-system.js +1 -1
- package/cdn/internal/slot.d.ts +0 -5
- package/cdn/internal/slot.js +0 -20
- package/cdn/internal/tabbable.d.ts +0 -8
- package/cdn/internal/tabbable.js +0 -12
- package/cdn/utilities/date.d.ts +0 -2
- package/cdn/utilities/date.js +1 -1
- package/cdn/utilities/storybook.js +1 -1
- package/cdn/vscode.html-custom-data.json +41 -41
- package/cdn/web-types.json +144 -163
- package/dist/chunks/{chunk.73XHVQNA.js → chunk.32T5435Z.js} +2 -2
- package/dist/chunks/{chunk.H5G2LRCX.js → chunk.32ZGNEEA.js} +6 -6
- package/dist/chunks/{chunk.TAMFIHNV.js → chunk.4DRUU356.js} +28 -36
- package/dist/chunks/{chunk.IQY2ZVAV.js → chunk.4EG67OAK.js} +2 -2
- package/dist/chunks/{chunk.QHNPNQXO.js → chunk.4TRXHBIO.js} +9 -11
- package/dist/chunks/{chunk.SEMHY47B.js → chunk.5GTWUU56.js} +1 -1
- package/dist/chunks/{chunk.LBLBASKK.js → chunk.623OV6KT.js} +1 -1
- package/dist/chunks/{chunk.X3H6MOUU.js → chunk.6XF7Y5OQ.js} +1 -1
- package/dist/chunks/{chunk.GSRQID3H.js → chunk.7AB3AL2Z.js} +2 -2
- package/dist/chunks/{chunk.M47YUO2L.js → chunk.A63V45OW.js} +1 -1
- package/dist/chunks/{chunk.ZSPNI52I.js → chunk.AEGKKYZ4.js} +1 -1
- package/dist/chunks/{chunk.5DVIZLXZ.js → chunk.AGQDJZXG.js} +2 -2
- package/dist/chunks/{chunk.SYQNO5B4.js → chunk.BADNDBKF.js} +1 -1
- package/dist/chunks/{chunk.ITBFUL7J.js → chunk.BBH5JFVX.js} +1 -1
- package/dist/chunks/{chunk.M347TELO.js → chunk.BJPQ42FM.js} +3 -3
- package/dist/chunks/{chunk.H7TB3KTK.js → chunk.BKW7OOII.js} +1 -1
- package/dist/chunks/{chunk.4IDR4RJI.js → chunk.CP3HQO7Z.js} +1 -1
- package/dist/chunks/{chunk.UBA2H662.js → chunk.DI4J6YRC.js} +1 -1
- package/dist/chunks/{chunk.3D7AGBFQ.js → chunk.DYV7U6UU.js} +0 -2
- package/dist/chunks/{chunk.JBFJWJUF.js → chunk.E6UAGCKS.js} +1 -1
- package/dist/chunks/{chunk.7HMEK2ND.js → chunk.E7CTAIEF.js} +1 -1
- package/dist/chunks/{chunk.PT2BKEDG.js → chunk.EC6ZMNDK.js} +1 -1
- package/dist/chunks/{chunk.RPPERQYB.js → chunk.ECHY7YBZ.js} +1 -1
- package/dist/chunks/{chunk.BZFZTT6Z.js → chunk.EH7ABWD6.js} +1 -1
- package/dist/chunks/{chunk.MOTDL3I3.js → chunk.ENRVP5HO.js} +5 -5
- package/dist/chunks/{chunk.Y4KCVPIC.js → chunk.EWAET5DR.js} +5 -5
- package/dist/chunks/{chunk.GYWU4AAB.js → chunk.EWO55RR2.js} +41 -49
- package/dist/chunks/{chunk.BIB7IJGE.js → chunk.FOZ6VW33.js} +2 -2
- package/dist/chunks/{chunk.AC6UE3V5.js → chunk.FV626ULR.js} +7 -6
- package/dist/chunks/{chunk.DEEMRWEE.js → chunk.H7FCKWK4.js} +11 -23
- package/dist/chunks/{chunk.ZUG2HYP5.js → chunk.HD75OK3X.js} +1 -1
- package/dist/chunks/{chunk.EX63QI6Z.js → chunk.HTBUOA43.js} +3 -3
- package/dist/chunks/{chunk.RJAOB66Y.js → chunk.HTSDHYY3.js} +4 -4
- package/dist/chunks/{chunk.KOO2JWHZ.js → chunk.HTXWT3CI.js} +1 -1
- package/dist/chunks/{chunk.ZDRQOJI6.js → chunk.IRJKFO7O.js} +3 -3
- package/dist/chunks/{chunk.C6BC46KV.js → chunk.JP47EKO5.js} +5 -5
- package/dist/chunks/{chunk.SYZVBVOX.js → chunk.KDDTJP4K.js} +1 -1
- package/dist/chunks/{chunk.ITFYDUMM.js → chunk.KR4VFINH.js} +1 -1
- package/dist/chunks/{chunk.PCTIMH5D.js → chunk.L365K634.js} +3 -3
- package/dist/chunks/{chunk.7PE2PORN.js → chunk.LB3ZEOQX.js} +2 -2
- package/dist/chunks/{chunk.LJ2VCS7Q.js → chunk.LKLBHDXL.js} +5 -2
- package/dist/chunks/{chunk.E2AA6JZR.js → chunk.LN4SRWKC.js} +1 -1
- package/dist/chunks/{chunk.SKY7526Z.js → chunk.LNSYUTNL.js} +1 -1
- package/dist/chunks/{chunk.JMA3VRB4.js → chunk.MMROE4ER.js} +2 -2
- package/dist/chunks/{chunk.RMOUFLCI.js → chunk.N6RV7TJA.js} +1 -1
- package/dist/chunks/{chunk.EPG5ZB4T.js → chunk.OMSTY3Y5.js} +2 -2
- package/dist/chunks/{chunk.BWP55AAX.js → chunk.OYJ4CG6J.js} +1 -1
- package/dist/chunks/{chunk.GOVTNZ72.js → chunk.PPNCR6KJ.js} +2 -2
- package/dist/chunks/{chunk.VTNFE6PI.js → chunk.QHW2OXLX.js} +1 -1
- package/dist/chunks/{chunk.N2V4KI76.js → chunk.QJC7AVKZ.js} +1 -1
- package/dist/chunks/{chunk.F4DMZGND.js → chunk.QM6A2OJ6.js} +2 -2
- package/dist/chunks/{chunk.WQMUNZSA.js → chunk.RANW22ZB.js} +2 -2
- package/dist/chunks/{chunk.Q6GPBRDV.js → chunk.RHRIPLA3.js} +1 -1
- package/dist/chunks/{chunk.U5AWZEM5.js → chunk.RTBQXZDB.js} +1 -1
- package/dist/chunks/{chunk.7WMOPNN5.js → chunk.SKYFDHVP.js} +5 -5
- package/dist/chunks/{chunk.RIJIUMG2.js → chunk.SPVKFHUZ.js} +5 -4
- package/dist/chunks/{chunk.MTRAJSQ5.js → chunk.SWIKAUKG.js} +4 -3
- package/dist/chunks/{chunk.XHZ5CCR7.js → chunk.SYWMXJ3H.js} +20 -18
- package/dist/chunks/{chunk.OYVF3HNG.js → chunk.TIM2RCEB.js} +0 -23
- package/dist/chunks/{chunk.H7QHCUBR.js → chunk.TKJ72YYU.js} +1 -1
- package/dist/chunks/{chunk.XCSAMBUB.js → chunk.TXZ4S7T7.js} +2 -2
- package/dist/chunks/{chunk.RLLACUYR.js → chunk.U73GKQGJ.js} +1 -1
- package/dist/chunks/{chunk.AL6PYL6U.js → chunk.UPMUUECF.js} +1 -1
- package/dist/chunks/{chunk.Y7UR2ZKQ.js → chunk.UR3NX4ST.js} +1 -1
- package/dist/chunks/{chunk.ABXTXNT4.js → chunk.USCIRPV5.js} +22 -19
- package/dist/chunks/{chunk.QLJNW3TZ.js → chunk.UXHQARJW.js} +1 -1
- package/dist/chunks/{chunk.MRGJKLE3.js → chunk.UZZ34Z5W.js} +25 -20
- package/dist/chunks/{chunk.IYGSQFGQ.js → chunk.VCO46TJT.js} +2 -2
- package/dist/chunks/{chunk.7EVHJ2OT.js → chunk.VPAEURPO.js} +40 -25
- package/dist/chunks/{chunk.DZLEAEG5.js → chunk.X7QQZ42A.js} +2 -2
- package/dist/chunks/{chunk.XGEWLFBF.js → chunk.X7RPGUOS.js} +3 -3
- package/dist/chunks/{chunk.N2XNANRE.js → chunk.XEHLIOJ2.js} +1 -1
- package/dist/chunks/{chunk.DJFSPHO4.js → chunk.XQ3BCGWA.js} +1 -1
- package/dist/chunks/{chunk.5ESJXERV.js → chunk.YKBHVARA.js} +1 -1
- package/dist/chunks/{chunk.RDHPV744.js → chunk.YSEIF6AP.js} +1 -1
- package/dist/chunks/{chunk.S4ZCJOC5.js → chunk.ZOFJITKA.js} +1 -1
- package/dist/chunks/{chunk.KGP2JSZ7.js → chunk.ZWZ72KXY.js} +1 -1
- package/dist/components/accordion/accordion.js +2 -2
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/banner/banner.js +2 -2
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
- package/dist/components/calendar/calendar.js +3 -3
- package/dist/components/calendar/calendar.styles.js +1 -1
- package/dist/components/callout/callout.js +2 -2
- package/dist/components/callout/callout.styles.js +1 -1
- package/dist/components/card/card.js +2 -2
- package/dist/components/card-content/card-content.js +2 -2
- package/dist/components/card-nav/card-nav.js +2 -2
- package/dist/components/card-nav-accordion/card-nav-accordion.js +2 -2
- package/dist/components/card-nav-item/card-nav-item.js +2 -2
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-button/checkbox-button.js +4 -4
- package/dist/components/checkbox-card/checkbox-card.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +2 -2
- package/dist/components/combobox/combobox.js +6 -6
- package/dist/components/copy-button/copy-button.js +4 -4
- package/dist/components/copy-button/copy-button.styles.js +1 -1
- package/dist/components/dialog/dialog.js +3 -3
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/dropdown/dropdown.js +2 -2
- package/dist/components/error-message-panel/error-message-panel.js +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-upload/file-upload.js +2 -2
- package/dist/components/filter-counter/filter-counter.js +16 -16
- package/dist/components/filter-date/filter-date.js +7 -7
- package/dist/components/filter-range/filter-range.js +16 -16
- package/dist/components/filter-select/filter-select.d.ts +0 -1
- package/dist/components/filter-select/filter-select.js +16 -16
- package/dist/components/footer/footer.js +2 -2
- package/dist/components/footer-content-block/footer-content-block.js +2 -2
- package/dist/components/footer-mandatory-mentions/footer-mandatory-mentions.js +2 -2
- package/dist/components/footer-sitemap/footer-sitemap.js +2 -2
- package/dist/components/header/header.js +2 -2
- package/dist/components/header-modern/header-modern.js +2 -2
- package/dist/components/header-search/header-search.js +3 -3
- package/dist/components/input/input.js +14 -14
- package/dist/components/input-amount/input-amount.js +5 -5
- package/dist/components/input-date/input-date.js +9 -9
- package/dist/components/input-mask/input-mask.js +5 -5
- package/dist/components/input-mask/input-mask.utils.d.ts +0 -1
- package/dist/components/input-mask/input-mask.utils.js +1 -3
- package/dist/components/input-native/input-native.js +4 -4
- package/dist/components/input-otp/input-otp.js +4 -4
- package/dist/components/input-phone/input-phone.js +10 -10
- package/dist/components/input-time/input-time.js +5 -5
- package/dist/components/menu-accordion/menu-accordion.js +4 -4
- package/dist/components/menu-item/menu-item.js +4 -4
- package/dist/components/menu-navigation/menu-navigation.js +6 -6
- package/dist/components/navbar-link/navbar-link.js +6 -6
- package/dist/components/navbar-menu/navbar-menu.js +3 -3
- package/dist/components/page-header/page-header.js +2 -2
- package/dist/components/pagination/pagination.js +16 -16
- package/dist/components/pagination-button/pagination-button.js +2 -2
- package/dist/components/popup/popup.js +1 -1
- package/dist/components/profile-button/profile-button.js +4 -4
- package/dist/components/radio-button/radio-button.js +4 -4
- package/dist/components/radio-card/radio-card.js +4 -4
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/search/search.js +2 -2
- package/dist/components/select/select.js +6 -6
- package/dist/components/sidenav/sidenav.js +4 -4
- package/dist/components/sidenav-info-accordion/sidenav-info-accordion.js +5 -5
- package/dist/components/step/step.js +2 -2
- package/dist/components/table-caption/table-caption.js +2 -2
- package/dist/components/table-container/table-container.js +2 -2
- package/dist/components/table-header-row/table-header-row.js +8 -8
- package/dist/components/table-row/table-row.js +4 -4
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/components/tree/tree.js +2 -2
- package/dist/custom-elements.json +260 -326
- package/dist/design-system.js +117 -117
- package/dist/internal/slot.d.ts +0 -5
- package/dist/internal/slot.js +0 -20
- package/dist/internal/tabbable.d.ts +0 -8
- package/dist/internal/tabbable.js +0 -12
- package/dist/utilities/date.d.ts +0 -2
- package/dist/utilities/date.js +1 -5
- package/dist/utilities/storybook.js +2 -2
- package/dist/vscode.html-custom-data.json +41 -41
- package/dist/web-types.json +144 -163
- package/package.json +1 -1
- package/cdn/chunks/chunk.6DVHKT6J.js +0 -56
- package/cdn/chunks/chunk.6XSWDZ3K.js +0 -42
- package/cdn/chunks/chunk.AU7QYOWT.js +0 -27
- package/cdn/chunks/chunk.GSE4BYLS.js +0 -38
- package/cdn/chunks/chunk.IFSGAJQ4.js +0 -1
- package/cdn/chunks/chunk.J34FMZ22.js +0 -20
- package/cdn/chunks/chunk.J5KWRJTH.js +0 -121
- package/cdn/chunks/chunk.RUMRXWLX.js +0 -65
- package/cdn/chunks/chunk.SXMGNTD4.js +0 -18
- package/cdn/chunks/chunk.U2HDZAQO.js +0 -23
- package/cdn/components/include/request.d.ts +0 -8
- package/cdn/components/include/request.js +0 -1
- package/cdn/components/table/types.d.ts +0 -5
- package/cdn/components/table/types.js +0 -1
- package/cdn/events/dsa-focus-in.d.ts +0 -7
- package/cdn/events/dsa-focus-in.js +0 -1
- package/cdn/events/dsa-focus-out.d.ts +0 -7
- package/cdn/events/dsa-focus-out.js +0 -1
- package/cdn/translations/en-gb.d.ts +0 -3
- package/cdn/translations/en-gb.js +0 -1
- package/dist/components/include/request.d.ts +0 -8
- package/dist/components/include/request.js +0 -24
- package/dist/components/table/types.d.ts +0 -5
- package/dist/components/table/types.js +0 -12
- package/dist/events/dsa-focus-in.d.ts +0 -7
- package/dist/events/dsa-focus-in.js +0 -1
- package/dist/events/dsa-focus-out.d.ts +0 -7
- package/dist/events/dsa-focus-out.js +0 -1
- package/dist/translations/en-gb.d.ts +0 -3
- package/dist/translations/en-gb.js +0 -21
- package/dist/chunks/{chunk.STZAPPWR.js → chunk.7Y2PLLDT.js} +0 -0
- package/dist/chunks/{chunk.YIY5RM53.js → chunk.XMFD37RX.js} +0 -0
- package/dist/chunks/{chunk.Z4TGH2YA.js → chunk.XSZCCDGA.js} +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk.535I3ZDX.js";import{a as v}from"./chunk.2TZ4LFPJ.js";import{a as y}from"./chunk.WFPILKOS.js";import{a as $}from"./chunk.SWEIVB73.js";import{a as d}from"./chunk.
|
|
1
|
+
import{a as x}from"./chunk.535I3ZDX.js";import{a as v}from"./chunk.2TZ4LFPJ.js";import{a as y}from"./chunk.WFPILKOS.js";import{a as $}from"./chunk.SWEIVB73.js";import{a as d}from"./chunk.ODDQO2HD.js";import{a as g}from"./chunk.2FPBPQUJ.js";import{a as f}from"./chunk.NIRNX67K.js";import{c as b}from"./chunk.Q54GPNUS.js";import{a as m}from"./chunk.2RF4WD6T.js";import{d as n}from"./chunk.ZBHHLRFH.js";import{a as u,b as s,c,d as l,f as p}from"./chunk.KBZ32KWP.js";import{a as o}from"./chunk.GP725TPQ.js";import{f as i}from"./chunk.IZ2HVRME.js";var e=class extends p{constructor(){super(...arguments);this.localize=new b(this);this.hasSlotController=new d(this,"help-text");this.hasFocus=!1;this.size="medium";this.variant="base";this.value="";this.helpText="";this.error=!1;this.errorMessage=""}handleChange(){this.value!==this.input.value&&(this.value=this.input.value),this.emit("dsa-change")}handleInput(){this.value!==this.input.value&&(this.value=this.input.value),this.emit("dsa-input")}handleInputFocus(){this.hasFocus||(this.hasFocus=!0),this.emit("dsa-focus")}handleInputBlur(){this.hasFocus&&(this.hasFocus=!1),this.emit("dsa-blur")}handleClearClick(t){if(this.value===""){t.stopPropagation();return}this.value="",this.emit("dsa-clear"),this.emit("dsa-input"),this.emit("dsa-change"),this.input.focus(),t.stopPropagation()}handleKeyDown(t){t.stopPropagation();let a=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!a&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.handleSubmitClick()})}handleSubmitClick(){this.emit("dsa-submit")}getDescriptionIds(){let t=this.hasSlotController.test("help-text"),a=this.helpText?!0:!!t,r=[];return this.error&&(r=[...r,"error-text"]),a&&(r=[...r,"help-text"]),r.join(" ")}render(){var a,r,h;let t=(()=>{switch(this.size){case"small":return"large";case"large":return"2xlarge";default:return"xlarge"}})();return o`
|
|
2
2
|
<div
|
|
3
3
|
class=${n({"search-bar":!0,"search-bar--error":this.error,"search-bar--small":this.size==="small","search-bar--medium":this.size==="medium","search-bar--large":this.size==="large","search-bar--on-layer":this.variant==="layer","search-bar--on-base":this.variant==="base","search-bar--on-floating":this.variant==="floating"})}
|
|
4
4
|
>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{a as E}from"./chunk.RUVWVGYN.js";import{a as k}from"./chunk.ODDQO2HD.js";import{a as m}from"./chunk.KLRPP4NQ.js";import{a as d,c,d as h}from"./chunk.HHVNQNCC.js";import{a as p,c as u}from"./chunk.TV2TMO2H.js";import{a as v}from"./chunk.B4KFHYLS.js";import{c as H}from"./chunk.Q54GPNUS.js";import{c as _}from"./chunk.AM2ZR2Y2.js";import{d as w}from"./chunk.ZBHHLRFH.js";import{a as g}from"./chunk.BWEPOOQP.js";import{a as f,b as r,d as s,f as b}from"./chunk.KBZ32KWP.js";import{a as y}from"./chunk.GP725TPQ.js";import{f as a}from"./chunk.IZ2HVRME.js";var t=class extends b{constructor(){super(...arguments);this.localize=new H(this);this.hasSlotController=new k(this,"summary");this.open=!1;this.role="listitem"}firstUpdated(){let{body:e,open:i}=this;e.hidden=!i,e.style.height=i?"auto":"0"}handleSummaryClick(){this.open?this.hide():this.show(),this.headerButton.focus()}handleSummaryKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open?this.hide():this.show()),(e.key==="ArrowUp"||e.key==="ArrowLeft")&&(e.preventDefault(),this.hide()),(e.key==="ArrowDown"||e.key==="ArrowRight")&&(e.preventDefault(),this.show())}async handleOpenChange(){let{body:e,localize:i}=this;if(this.open){if(this.emit("dsa-show",{cancelable:!0}).defaultPrevented){this.open=!1;return}await c(e),e.hidden=!1;let{keyframes:n,options:l}=u(this,"accordion.show",{dir:i.dir()});await d(e,h(n,e.scrollHeight),l),e.style.height="auto",this.emit("dsa-after-show")}else{if(this.emit("dsa-hide",{cancelable:!0}).defaultPrevented){this.open=!0;return}await c(e);let{keyframes:n,options:l}=u(this,"accordion.hide",{dir:i.dir()});await d(e,h(n,e.scrollHeight),l),e.hidden=!0,e.style.height="auto",this.emit("dsa-after-hide")}}async show(){if(!this.open)return this.open=!0,await m(this,"dsa-after-show")}async hide(){if(this.open)return this.open=!1,await m(this,"dsa-after-hide")}render(){let{summary:e,hasSlotController:i,open:o}=this;return!e&&!i.test("summary")&&v("<dsa-card-nav-accordion> requires a summary attribute or a summary slot for accessibility"),y`
|
|
2
|
+
<div
|
|
3
|
+
part="base"
|
|
4
|
+
class=${w({"card-nav-accordion":!0,"card-nav-accordion--open":o,"card-nav-accordion--chevron":!0})}
|
|
5
|
+
>
|
|
6
|
+
<div part="header" id="header" class="card-nav-accordion__header">
|
|
7
|
+
<span
|
|
8
|
+
role="button"
|
|
9
|
+
aria-expanded=${o?"true":"false"}
|
|
10
|
+
aria-controls="content"
|
|
11
|
+
@click=${this.handleSummaryClick}
|
|
12
|
+
@keydown=${this.handleSummaryKeyDown}
|
|
13
|
+
class="card-nav-accordion__header-button"
|
|
14
|
+
tabindex="0"
|
|
15
|
+
>
|
|
16
|
+
<slot name="summary" class="card-nav-accordion__summary"
|
|
17
|
+
>${e}</slot
|
|
18
|
+
>
|
|
19
|
+
|
|
20
|
+
<span part="summary-icon" class="card-nav-accordion__summary-icon">
|
|
21
|
+
<dsa-icon
|
|
22
|
+
class="card-nav-accordion__expand-icon"
|
|
23
|
+
name="expand_more"
|
|
24
|
+
library="system"
|
|
25
|
+
></dsa-icon>
|
|
26
|
+
</span>
|
|
27
|
+
</span>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div
|
|
31
|
+
class="card-nav-accordion__body"
|
|
32
|
+
role="list"
|
|
33
|
+
aria-labelledby="header"
|
|
34
|
+
>
|
|
35
|
+
<slot
|
|
36
|
+
part="content"
|
|
37
|
+
id="content"
|
|
38
|
+
class="card-nav-accordion__content"
|
|
39
|
+
></slot>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
`}};t.styles=E,t.dependencies={"dsa-icon":_},a([s(".card-nav-accordion")],t.prototype,"accordion",2),a([s(".card-nav-accordion__header-button")],t.prototype,"headerButton",2),a([s(".card-nav-accordion__body")],t.prototype,"body",2),a([r({type:Boolean,reflect:!0})],t.prototype,"open",2),a([r()],t.prototype,"summary",2),a([r({reflect:!0})],t.prototype,"role",2),a([g("open",{waitUntilFirstUpdate:!0})],t.prototype,"handleOpenChange",1),t=a([f("dsa-card-nav-accordion")],t);p("accordion.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}});p("accordion.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as x}from"./chunk.DEILGCUT.js";import{c,d as w,e as _,f as E,g as R}from"./chunk.FAW4PEMU.js";import{a as p}from"./chunk.DYFOZ46Z.js";import{a as C}from"./chunk.2TZ4LFPJ.js";import{a as $}from"./chunk.2FPBPQUJ.js";import{a as u}from"./chunk.NIRNX67K.js";import{c as b}from"./chunk.Q54GPNUS.js";import{a as s}from"./chunk.2RF4WD6T.js";import{d}from"./chunk.ZBHHLRFH.js";import{a as n}from"./chunk.BWEPOOQP.js";import{a as g,b as h,c as y,d as V}from"./chunk.KBZ32KWP.js";import{a as o}from"./chunk.GP725TPQ.js";import{a as v,b as k,f as a}from"./chunk.IZ2HVRME.js";var t=class extends p{constructor(){super(...arguments);this.localize=new b(this);this.effectiveMask="";this.maskedValue="";this.pattern="";this.mask=""}get validity(){let e=this.value.length>0&&this.patternRegExp?this.patternRegExp.test(c(this.value)):void 0;return E(this.input.validity,e)}connectedCallback(){super.connectedCallback(),this.updateMaskConfig(),this.mask.length>0&&this.mask.length!==this.placeholder.length&&console.warn("For correct usage: add `mask` attribute. It should have the same format than the placeholder."),this.maskedValue=this.rawValueToMaskedValue(this.value)}updateMaskConfig(){this.effectiveMask=this.mask||this.placeholder,this.patternRegExp=this.pattern?new RegExp(this.pattern):void 0}syncMaskedValue(){let e=this.rawValueToMaskedValue(this.value);this.maskedValue!==e&&(this.maskedValue=e),this.input&&this.input.value!==e&&(this.input.value=e)}handleInputValueChange(){let e=this.input,r=c(e.value),l=_(r,this.effectiveMask),i=this.rawValueToMaskedValue(l);this.value===l&&this.maskedValue===i&&e.value===i||(this.value=l,this.maskedValue=i,e.value!==i&&(e.value=i),this.formControlController.updateValidity(),this.emit("dsa-input"))}rawValueToMaskedValue(e){return w(e,this.placeholder)}handleChange(){this.emit("dsa-change")}async handleValueChange(){this.syncMaskedValue(),await this.updateComplete,this.formControlController.updateValidity()}handleMaskConfigChange(){this.updateMaskConfig(),this.syncMaskedValue(),this.formControlController.updateValidity()}setRangeText(e,r,l,i){this.input.setRangeText(e,r,l,i),this.value!==this.input.value&&(this.value=this.input.value)}renderInput(){var m,f;let e=this.hasSlotController.test("label"),r=this.hasSlotController.test("prefix"),l=this.hasSlotController.test("suffix"),i=this.label?!0:!!e,T=this.clearable&&!this.disabled&&!this.readonly&&(typeof this.value=="number"||this.value.length>0);return o`
|
|
2
2
|
<div
|
|
3
3
|
part="base"
|
|
4
4
|
class=${d({"input-mask":!0,"input--small":this.size==="small","input--medium":this.size==="medium","input--large":this.size==="large","input--error":this.error,"input--success":this.success&&!this.error,"input--on-layer":this.variant==="layer","input--on-base":this.variant==="base","input--disabled":this.disabled,"input--readonly":this.readonly,"input--focused":this.hasFocus,"input--empty":!this.value})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(t,e){return t===""?"":i(t).toLocaleDateString(e!==""?e:"")}function o(t){let[e,r,n]=t.split("-");if([e,r,n].includes(""))return!1;let u=new Date(`${t}T00:00`);return u.getFullYear()===Number(e)&&u.getMonth()===Number(r)-1&&u.getDate()===Number(n)}function g(t){if(t===void 0)return"";let e=String(t.getFullYear()).padStart(4,"0"),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${e}-${r}-${n}`}function i(t){return new Date(`${t}T00:00`)}function f(t,e){return t?e?new Date(e,t,0).getDate():new Date(2024,t,0).getDate():31}function s(t){return t.split(",")}function c(t,e){return t===""&&e===""?"":`${t},${e}`}export{a,o as b,g as c,i as d,f as e,s as f,c as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as T}from"./chunk.IMVLXBHS.js";import{a as z}from"./chunk.FECWEUQM.js";import{a as C}from"./chunk.PIG773U2.js";import{a as k}from"./chunk.
|
|
1
|
+
import{a as T}from"./chunk.IMVLXBHS.js";import{a as z}from"./chunk.FECWEUQM.js";import{a as C}from"./chunk.PIG773U2.js";import{a as k}from"./chunk.ODDQO2HD.js";import{a as y}from"./chunk.B4KFHYLS.js";import{a as r,b as l}from"./chunk.FDMPUSVV.js";import{c as g}from"./chunk.Q54GPNUS.js";import{c as $}from"./chunk.AM2ZR2Y2.js";import{b as v}from"./chunk.QTD6NQFL.js";import{a as i}from"./chunk.2RF4WD6T.js";import{d as o}from"./chunk.ZBHHLRFH.js";import{a as m,b as s,d as f,f as b}from"./chunk.KBZ32KWP.js";import{f as e}from"./chunk.IZ2HVRME.js";var t=class extends b{constructor(){super(...arguments);this.hasSlotController=new k(this,"title","content");this.localize=new g(this);this.status="default";this.stepTitle="";this.content="";this.vertical=!1;this.clickable=!1;this.href="";this.rel="noreferrer noopener"}click(){this.button.click()}focus(c){this.button.focus(c)}blur(){this.button.blur()}connectedCallback(){v(this,"role","listitem"),super.connectedCallback()}getTag(){return this.clickable?this.href?r`a`:r`button`:r`div`}getStepLabel(){switch(this.status){case"complete":return this.localize.term("stepCompleted");case"in-progress":return this.localize.term("stepInProgress");case"active":return this.localize.term("stepActive");case"error":return this.localize.term("stepError");default:return}}render(){let c=this.hasSlotController.test("title"),L=this.hasSlotController.test("content"),x=this.hasSlotController.test("tooltip"),d=this.stepTitle?!0:!!c,_=this.content?!0:!!L,p=!this.clickable,E=this.status!=="in-progress"&&this.status!=="active"?z(this.status):void 0,a=this.getStepLabel(),n=this.clickable&&this.href,h=this.clickable&&!this.href,u=this.getTag();return this.clickable&&!d&&y("<dsa-step> requires a `step-title` attribute or an element in its `title` slot for accessibility when clickable, "),l`
|
|
2
2
|
<div
|
|
3
3
|
part="step"
|
|
4
4
|
class=${o({"step-container":!0,"step-container--clickable":!p,"step-container--has-title":d,"step-container--has-content":_,"step-container__horizontal":!this.vertical,"step-container__vertical":this.vertical})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk.U5TCFENL.js";import{a as q}from"./chunk.S2RTEOQU.js";import{a as T}from"./chunk.PIG773U2.js";import{a as M}from"./chunk.WFPILKOS.js";import{a as w}from"./chunk.SWEIVB73.js";import{a as x}from"./chunk.
|
|
1
|
+
import{a as _}from"./chunk.U5TCFENL.js";import{a as q}from"./chunk.S2RTEOQU.js";import{a as T}from"./chunk.PIG773U2.js";import{a as M}from"./chunk.WFPILKOS.js";import{a as w}from"./chunk.SWEIVB73.js";import{a as x}from"./chunk.ODDQO2HD.js";import{b as E,c as I,d as k,e as B}from"./chunk.FWTZS7LK.js";import{a as v}from"./chunk.B4KFHYLS.js";import{b,c as y}from"./chunk.QTD6NQFL.js";import{d as R}from"./chunk.ZBHHLRFH.js";import{a as m}from"./chunk.BWEPOOQP.js";import{a as C,b as l,c as f,d as p,f as V}from"./chunk.KBZ32KWP.js";import{a as c}from"./chunk.GP725TPQ.js";import{f as s}from"./chunk.IZ2HVRME.js";var a=class extends V{constructor(){super(...arguments);this.formControlController=new E(this);this.hasSlotController=new x(this,"help-text","label");this.customValidityMessage="";this.customValidityError="";this.hasRadioButtons=!1;this.hasRadioCards=!1;this.readonlyRadioButtonValue=new Map;this.defaultValue="";this.label="";this.helpText="";this.description="";this.name="option";this.value="";this.deselectable=!1;this.form="";this.required=!1;this.disabled=!1;this.readonly=!1;this.horizontal=!1;this.error=!1;this.errorMessage="";this.hideLabel=!1}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?B:t?k:I}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){let t=[...this.querySelectorAll("dsa-radio, dsa-radio-button, dsa-radio-card")];return this.hasRadioButtons=t.some(e=>e.tagName.toLowerCase()==="dsa-radio-button"),this.hasRadioCards=t.some(e=>e.tagName.toLowerCase()==="dsa-radio-card"),t}handleRadioClick(t){let e=t.target.closest("dsa-radio, dsa-radio-button, dsa-radio-card");if(!e||e.disabled||e.readonly||this.disabled||this.readonly)return;let i=this.getAllRadios(),o=this.value;e.value!==o?(this.value=e.value,this.updateCheckedRadio()):this.deselectable&&(this.value="",i.forEach(n=>{n.checked=!1})),this.value!==o&&this.emit("dsa-change"),this.emit("dsa-input")}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key)||this.disabled||this.readonly)return;let e=this.getAllRadios(),i=e.filter(d=>!this.disabled&&!d.disabled&&(!d.readonly||d.checked)),o=i.length;if(o===0)return;let n=i.findIndex(d=>d.matches(":focus")),h=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,u=this.value,r=n+h;if(r=q(r,o),e.forEach(d=>{if(d.checked&&(d.checked=!1),this.hasRadioButtons||this.hasRadioCards){let g=d.button;g.tabIndex!==-1&&(g.tabIndex=-1)}else d.tabIndex!==-1&&(d.tabIndex=-1)}),h===0?(i[r].checked=this.deselectable?i[r].value!==u:!0,this.value=i[r].checked?i[r].value:""):(this.value=i[r].readonly||i[n].readonly&&i[n].checked?this.value:i[r].value,i[r].checked=this.value===i[r].value),!this.hasRadioButtons&&!this.hasRadioCards)i[r].tabIndex=0,i[r].focus();else{let d=i[r];d.button.tabIndex=0,d.button.focus()}this.value!==u&&(this.emit("dsa-change"),this.emit("dsa-input")),t.preventDefault()}handleLabelClick(){this.focus()}handleSlotChange(){if(customElements.get("dsa-radio")||customElements.get("dsa-radio-button")||customElements.get("dsa-radio-card")){let t=this.getAllRadios();this.readonlyRadioButtonValue.clear(),t.forEach(e=>{e.error!==this.error&&(e.error=this.error),this.required?b(e,"aria-required","true"):y(e,"aria-required"),(this.hasRadioButtons||this.hasRadioCards)&&e.readonly&&this.readonlyRadioButtonValue.set(e.value,!0),e.parentDisabled!==this.disabled&&(e.parentDisabled=this.disabled),e.parentReadonly!==this.readonly&&(e.parentReadonly=this.readonly)}),this.updateCheckedRadio()}else customElements.whenDefined("dsa-radio").then(()=>this.handleSlotChange()),customElements.whenDefined("dsa-radio-button").then(()=>this.handleSlotChange()),customElements.whenDefined("dsa-radio-card").then(()=>this.handleSlotChange())}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),setTimeout(()=>{this.focus()},0)}updateCheckedRadio(){this.getAllRadios().forEach(e=>{var o;let i=e.value===this.value;if(e.checked!==i&&(e.checked=i),!this.value&&this.required?b(e,"aria-invalid","true"):y(e,"aria-invalid"),this.hasRadioButtons||this.hasRadioCards){let n=e,h=(o=this.readonlyRadioButtonValue.get(this.value))!=null?o:n.readonly;n.readonly!==h&&(n.readonly=h)}}),this.updateTabIndexes(),this.formControlController.setValidity(this.validity.valid)}getDescriptionIds(){let t=[];return this.error&&(t=["error-text"]),t=[...t,"help-text","description"],t.join(" ")}updateTabIndexes(){let t=this.getAllRadios(),e=t.findIndex(o=>!o.disabled&&(!o.readonly||o.checked)),i=this.value!==""&&t.some(o=>o.value===this.value);t.forEach((o,n)=>{if(this.disabled){o.tabIndex=-1;return}let h=o.checked&&!o.disabled||!i&&n===e&&!this.readonly;if(this.hasRadioButtons||this.hasRadioCards){let u=o;customElements.whenDefined(this.hasRadioButtons?"dsa-radio-button":"dsa-radio-card").then(()=>{let r=h?0:-1;u.button.tabIndex!==r&&(u.button.tabIndex=r)})}else{let u=h?0:-1;o.tabIndex!==u&&(o.tabIndex=u)}})}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}handleErrorChange(){this.getAllRadios().forEach(t=>{t.error!==this.error&&(t.error=this.error)})}handleDisabledChange(){this.getAllRadios().forEach(t=>{t.parentDisabled!==this.disabled&&(t.parentDisabled=this.disabled)})}handleReadonlyChange(){this.getAllRadios().forEach(t=>{t.parentReadonly!==this.readonly&&(t.parentReadonly=this.readonly)}),this.updateTabIndexes()}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.error=!1,this.customValidityError=this.customValidityMessage!==""?this.customValidityMessage:t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){let e=this.getAllRadios(),i=e.find(h=>h.checked),o=e.find(h=>!h.disabled),n=i||o;n&&n.focus(t)}render(){let t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=this.label?!0:!!t,o=this.helpText?!0:!!e;return i||v("<dsa-radio-group> requires a label attribute or a label slot for accessibility"),this.error&&!this.errorMessage&&v("<dsa-radio-group> requires an error-message attribute for accessibility when the error attribute is set"),c`
|
|
2
2
|
<fieldset
|
|
3
3
|
part="form-control"
|
|
4
4
|
class=${R({"form-control":!0,"form-control--error":this.error,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":i,"form-control--has-help-text":o,"form-control--has-buttons":this.hasRadioButtons,"form-control--has-cards":this.hasRadioCards,"form-control--options-horizontal":!!this.horizontal})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk.HTMFQPE5.js";import{a as f}from"./chunk.
|
|
1
|
+
import{a as x}from"./chunk.HTMFQPE5.js";import{a as f}from"./chunk.DYFOZ46Z.js";import{a as g}from"./chunk.2TZ4LFPJ.js";import{a as h}from"./chunk.NIRNX67K.js";import{a as l}from"./chunk.2RF4WD6T.js";import{d}from"./chunk.ZBHHLRFH.js";import{a as o}from"./chunk.BWEPOOQP.js";import{a as c,b as p,c as u,d as m}from"./chunk.KBZ32KWP.js";import{a}from"./chunk.GP725TPQ.js";import{f as s}from"./chunk.IZ2HVRME.js";var i=class extends f{constructor(){super(...arguments);this.currentIndex=0;this.length=6}handleFocus(){this.currentIndex=this.value?-1:0,this.hasFocus=!0,this.emit("dsa-focus")}handleInput(e){let t=this.input.value;if(this.patternRegexp&&!this.patternRegexp.test(t)){this.input.value=this.value,this.handleCurrentIndexChange();return}this.value=t.length>this.length?t.slice(0,this.length):t,this.value!==t&&(this.input.value=this.value),e.data?e.data.length===1?this.currentIndex=this.currentIndex<this.length?this.currentIndex+1:this.length-1:this.currentIndex=this.getLastIndex():this.currentIndex===0?this.handleCurrentIndexChange():this.currentIndex===-1?this.currentIndex=0:this.currentIndex-=1,this.formControlController.updateValidity(),this.emit("dsa-input")}handleSelect(){let e=this.input;e.value.length>1&&e.selectionStart===0&&e.selectionEnd===e.value.length&&(this.currentIndex=-1)}handleKeyDown(e){switch(super.handleKeyDown(e),e.key){case"ArrowLeft":e.preventDefault(),this.currentIndex=this.currentIndex>0?this.currentIndex-1:0;break;case"ArrowRight":e.preventDefault(),this.currentIndex===-1?this.currentIndex=this.getLastIndex():this.currentIndex<this.value.length&&this.currentIndex<this.length-1&&(this.currentIndex+=1);break;case"ArrowUp":e.preventDefault(),this.currentIndex=0;break;case"ArrowDown":e.preventDefault(),this.currentIndex=this.getLastIndex();break;default:break}}handleSingleFieldClick(e){var r;let t=(r=e.target)==null?void 0:r.closest(".single-field");if(!t||!this.renderRoot.contains(t))return;this.focus();let n=Number(t.dataset.fieldIndex);Number.isNaN(n)||(this.currentIndex=n<this.value.length?n:this.getLastIndex())}getLastIndex(){return this.value.length>0?Math.min(this.value.length,this.length-1):0}handleCurrentIndexChange(){this.currentIndex===-1?this.input.setSelectionRange(0,this.input.value.length):this.input.setSelectionRange(this.currentIndex,this.currentIndex+1)}handlePatterChange(){this.patternRegexp=new RegExp(this.pattern)}async getUpdateComplete(){return await super.getUpdateComplete()}renderSingleField(e){let t=this.value.charAt(e),n=this.currentIndex===e||this.currentIndex===-1&&t,r=d({"single-field":!0,"single-field--active":this.hasFocus&&n});return a`
|
|
2
2
|
<div class=${r} data-field-index=${e} aria-hidden="true">
|
|
3
3
|
${t||this.hasFocus&&n?a`<span class="single-field__value">${t}</span>`:a`
|
|
4
4
|
<span class="single-field__placeholder"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as V}from"./chunk.PIG773U2.js";import{a as x}from"./chunk.WFPILKOS.js";import{a as E}from"./chunk.SWEIVB73.js";import{a as M}from"./chunk.YDZDEOUX.js";import{a as y}from"./chunk.
|
|
1
|
+
import{a as V}from"./chunk.PIG773U2.js";import{a as x}from"./chunk.WFPILKOS.js";import{a as E}from"./chunk.SWEIVB73.js";import{a as M}from"./chunk.YDZDEOUX.js";import{a as y}from"./chunk.ODDQO2HD.js";import{b as g,c as C,d as v,e as k}from"./chunk.FWTZS7LK.js";import{a as u}from"./chunk.B4KFHYLS.js";import{d as p}from"./chunk.ZBHHLRFH.js";import{a as h}from"./chunk.BWEPOOQP.js";import{a as f,b as i,c as d,d as c,f as b}from"./chunk.KBZ32KWP.js";import{a as r}from"./chunk.GP725TPQ.js";import{f as l}from"./chunk.IZ2HVRME.js";var s=class extends b{constructor(){super(...arguments);this.formControlController=new g(this);this.hasSlotController=new y(this,"help-text","label");this.customValidityMessage="";this.hasCheckboxButtons=!1;this.hasCheckboxCards=!1;this.defaultValue=[];this.label="";this.helpText="";this.description="";this.name="option";this.value=[];this.form="";this.required=!1;this.disabled=!1;this.readonly=!1;this.horizontal=!1;this.error=!1;this.errorMessage="";this.hideLabel=!1}get validity(){let e=this.required&&this.value.length===0;return this.customValidityMessage!==""?k:e?v:C}get validationMessage(){let e=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:e?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllCheckboxes(){return[...this.querySelectorAll("dsa-checkbox, dsa-checkbox-button, dsa-checkbox-card")]}handleCheckboxClick(e){if(e.target.tagName.toLowerCase()==="a")return;let t=e.target.closest("dsa-checkbox, dsa-checkbox-button, dsa-checkbox-card");if(e.preventDefault(),e.stopPropagation(),!t||t.disabled||t.readonly||this.disabled||this.readonly)return;this.value.includes(t.value)?this.value=this.value.filter(n=>n!==t.value):this.value=[...this.value,t.value],this.getAllCheckboxes().forEach(n=>{let m=this.value.includes(n.value);n.checked!==m&&(n.checked=m)}),this.emit("dsa-change"),this.emit("dsa-input")}handleKeyDown(e){if(e.target.tagName.toLowerCase()==="a")return;let t=e.target;if(e.key===" "){if(e.preventDefault(),this.disabled||this.readonly||t.disabled||t.readonly)return;t.checked=!t.checked;let a=this.getAllCheckboxes().filter(o=>o.checked);this.value=a.map(o=>o.value),this.emit("dsa-input"),this.emit("dsa-change")}e.key==="Enter"&&(this.disabled||this.readonly||t.disabled||t.readonly)&&e.preventDefault()}handleLabelClick(){this.focus()}handleSlotChange(){if(customElements.get("dsa-checkbox")||customElements.get("dsa-checkbox-button")||customElements.get("dsa-checkbox-card")){let e=this.getAllCheckboxes();e.forEach(t=>{let a=this.value.includes(t.value);t.checked!==a&&(t.checked=a),t.parentDisabled!==this.disabled&&(t.parentDisabled=this.disabled),t.parentReadonly!==this.readonly&&(t.parentReadonly=this.readonly)}),this.hasCheckboxButtons=e.some(t=>t.tagName.toLowerCase()==="dsa-checkbox-button"),this.hasCheckboxCards=e.some(t=>t.tagName.toLowerCase()==="dsa-checkbox-card")}else customElements.whenDefined("dsa-checkbox").then(()=>this.handleSlotChange()),customElements.whenDefined("dsa-checkbox-button").then(()=>this.handleSlotChange()),customElements.whenDefined("dsa-checkbox-card").then(()=>this.handleSlotChange())}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),setTimeout(()=>{this.focus()},0)}getDescriptionIds(){let e=[];return this.error&&(e=["error-text"]),e=[...e,"help-text","description"],e.join(" ")}handleValueChange(){this.getAllCheckboxes().forEach(e=>{let t=this.value.includes(e.value);e.checked!==t&&(e.checked=t)}),this.formControlController.setValidity(this.validity.valid)}handleDisabledChange(){this.getAllCheckboxes().forEach(e=>{e.parentDisabled!==this.disabled&&(e.parentDisabled=this.disabled)})}handleReadonlyChange(){this.getAllCheckboxes().forEach(e=>{e.parentReadonly!==this.readonly&&(e.parentReadonly=this.readonly)})}checkValidity(){let e=this.required&&this.value.length===0,t=this.customValidityMessage!=="";return e||t?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let e=this.validity.valid;return this.formControlController.setValidity(e),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),e||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),e}setCustomValidity(e=""){this.customValidityMessage=e,this.validationInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){let t=this.getAllCheckboxes().filter(o=>!o.disabled&&!o.readonly),a=t.find(o=>o.checked)||t[0];a&&a.focus(e)}render(){let e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),a=this.label?!0:!!e,o=this.helpText?!0:!!t;return a||u("<dsa-checkbox-group> requires a label attribute or a label slot for accessibility"),this.error&&!this.errorMessage&&u("<dsa-checkbox-group> requires an error-message attribute for accessibility when the error attribute is set"),r`
|
|
2
2
|
<fieldset
|
|
3
3
|
part="form-control"
|
|
4
4
|
class=${p({"form-control":!0,"form-control--error":this.error,"form-control--medium":!0,"form-control--checkbox-group":!0,"form-control--has-label":a,"form-control--has-help-text":o,"form-control--has-buttons":this.hasCheckboxButtons,"form-control--has-cards":this.hasCheckboxCards,"form-control--options-horizontal":!!this.horizontal})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=class{constructor(t,...e){this.slotNames=[];(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){let e=t;if(e.tagName.toLowerCase()==="dsa-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){let e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}};function
|
|
1
|
+
var o=class{constructor(t,...e){this.slotNames=[];(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){let e=t;if(e.tagName.toLowerCase()==="dsa-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){let e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}};function l(s){if(!s)return"";let t=s.assignedNodes({flatten:!0}),e="";return[...t].forEach(n=>{n.nodeType===Node.TEXT_NODE&&(e+=n.textContent)}),e}export{o as a,l as b};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as ie,d as j}from"./chunk.NHMFB7ET.js";import{a as Ae}from"./chunk.IDZ2RBHS.js";import{c as Ne}from"./chunk.Q54GPNUS.js";import{a as Te}from"./chunk.2RF4WD6T.js";import{a as ae}from"./chunk.BWEPOOQP.js";import{a as xe,b as z,d as Le,f as Me}from"./chunk.KBZ32KWP.js";import{a as ke}from"./chunk.GP725TPQ.js";import{c as Ce,f as w}from"./chunk.IZ2HVRME.js";var o={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};var q="app";var Mt=Ce({});var O,Je,_,Nt,At=0,Ze=!1,Q=!1,ge=!1,y=!1,Ee=null,re=0,X=!1,Ns={isDev:!!o.isDev,isBrowser:!0,isServer:!1,isTesting:!!o.isTesting};var C=(e,t="")=>{if(o.profile&&performance.mark){let s=`st:${e}:${t}:${At++}`;return performance.mark(s),()=>performance.measure(`[Stencil] ${e}() <${t}>`,s)}else return()=>{}},Et=(e,t)=>o.profile&&performance.mark?(performance.getEntriesByName(e,"mark").length===0&&performance.mark(e),()=>{performance.getEntriesByName(t,"measure").length===0&&performance.measure(t,e)}):()=>{};var It="r",Ot="o",Bt="s",Rt="t",de="s-id",Ie="sty-id",Oe="c-id";var Be="http://www.w3.org/1999/xlink",Re={},_t="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml",Ft=e=>e!=null,me=e=>(e=typeof e,e==="object"||e==="function");function Yt(e){var t,s,n;return(n=(s=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||s===void 0?void 0:s.getAttribute("content"))!==null&&n!==void 0?n:void 0}var $=(e,t,...s)=>{let n=null,a=null,i=null,r=!1,l=!1,c=[],d=h=>{for(let f=0;f<h.length;f++)n=h[f],Array.isArray(n)?d(n):n!=null&&typeof n!="boolean"&&((r=typeof e!="function"&&!me(n))?n=String(n):o.isDev&&typeof e!="function"&&n.$flags$===void 0&&J(`vNode passed as children has unexpected type.
|
|
2
2
|
Make sure it's using the correct h() function.
|
|
3
3
|
Empty objects can also be the cause, look for JSX comments that became objects.`),r&&l?c[c.length-1].$text$+=n:c.push(r?P(null,n):n),l=r)};if(d(s),t&&(o.isDev&&e==="input"&&Ut(t),o.vdomKey&&t.key&&(a=t.key),o.slotRelocation&&t.name&&(i=t.name),o.vdomClass)){let h=t.className||t.class;h&&(t.class=typeof h!="object"?h:Object.keys(h).filter(f=>h[f]).join(" "))}if(o.isDev&&c.some(ue)&&J(`The <Host> must be the single root component. Make sure:
|
|
4
4
|
- You are NOT using hostData() and <Host> in the same component.
|
|
5
|
-
- <Host> is used once, and it's the single root component of the render() function.`),o.vdomFunctional&&typeof e=="function")return e(t===null?{}:t,c,Yt);let u=P(e,null);return u.$attrs$=t,c.length>0&&(u.$children$=c),o.vdomKey&&(u.$key$=a),o.slotRelocation&&(u.$name$=i),u},P=(e,t)=>{let s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return o.vdomAttribute&&(s.$attrs$=null),o.vdomKey&&(s.$key$=null),o.slotRelocation&&(s.$name$=null),s},ye={},ue=e=>e&&e.$tag$===ye,Yt={forEach:(e,t)=>e.map(_e).forEach(t),map:(e,t)=>e.map(_e).map(t).map(Ht)},_e=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Ht=e=>{if(typeof e.vtag=="function"){let s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),$(e.vtag,s,...e.vchildren||[])}let t=P(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Ut=e=>{let t=Object.keys(e),s=t.indexOf("value");if(s===-1)return;let n=t.indexOf("type"),a=t.indexOf("min"),i=t.indexOf("max"),r=t.indexOf("step");(s<n||s<a||s<i||s<r)&&U('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},Wt=(e,t,s,n)=>{let a=C("hydrateClient",t),i=e.shadowRoot,r=[],l=[],c=o.shadowDom&&i?[]:null,d=n.$vnode$=P(t,null);p.$orgLocNodes$||fe(m.body,p.$orgLocNodes$=new Map),e[de]=s,e.removeAttribute(de),he(d,r,l,c,e,e,s),r.map(u=>{let h=u.$hostId$+"."+u.$nodeId$,f=p.$orgLocNodes$.get(h),g=u.$elm$;f&&F&&f["s-en"]===""&&f.parentNode.insertBefore(g,f.nextSibling),i||(g["s-hn"]=t,f&&(g["s-ol"]=f,g["s-ol"]["s-nr"]=g)),p.$orgLocNodes$.delete(h)}),o.shadowDom&&i&&c.map(u=>{u&&i.appendChild(u)}),a()},he=(e,t,s,n,a,i,r)=>{let l,c,d,u;if(i.nodeType===1){for(l=i.getAttribute(Oe),l&&(c=l.split("."),(c[0]===r||c[0]==="0")&&(d={$flags$:0,$hostId$:c[0],$nodeId$:c[1],$depth$:c[2],$index$:c[3],$tag$:i.tagName.toLowerCase(),$elm$:i,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},t.push(d),i.removeAttribute(Oe),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d,e=d,n&&d.$depth$==="0"&&(n[d.$index$]=d.$elm$))),u=i.childNodes.length-1;u>=0;u--)he(e,t,s,n,a,i.childNodes[u],r);if(i.shadowRoot)for(u=i.shadowRoot.childNodes.length-1;u>=0;u--)he(e,t,s,n,a,i.shadowRoot.childNodes[u],r)}else if(i.nodeType===8)c=i.nodeValue.split("."),(c[1]===r||c[1]==="0")&&(l=c[0],d={$flags$:0,$hostId$:c[1],$nodeId$:c[2],$depth$:c[3],$index$:c[4],$elm$:i,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},l===Rt?(d.$elm$=i.nextSibling,d.$elm$&&d.$elm$.nodeType===3&&(d.$text$=d.$elm$.textContent,t.push(d),i.remove(),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d,n&&d.$depth$==="0"&&(n[d.$index$]=d.$elm$))):d.$hostId$===r&&(l===Bt?(d.$tag$="slot",c[5]?i["s-sn"]=d.$name$=c[5]:i["s-sn"]="",i["s-sr"]=!0,o.shadowDom&&n&&(d.$elm$=m.createElement(d.$tag$),d.$name$&&d.$elm$.setAttribute("name",d.$name$),i.parentNode.insertBefore(d.$elm$,i),i.remove(),d.$depth$==="0"&&(n[d.$index$]=d.$elm$)),s.push(d),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d):l===It&&(o.shadowDom&&n?i.remove():o.slotRelocation&&(a["s-cr"]=i,i["s-cn"]=!0))));else if(e&&e.$tag$==="style"){let h=P(null,i.textContent);h.$elm$=i,h.$index$="0",e.$children$=[h]}},fe=(e,t)=>{if(e.nodeType===1){let s=0;for(;s<e.childNodes.length;s++)fe(e.childNodes[s],t);if(e.shadowRoot)for(s=0;s<e.shadowRoot.childNodes.length;s++)fe(e.shadowRoot.childNodes[s],t)}else if(e.nodeType===8){let s=e.nodeValue.split(".");s[0]===Ot&&(t.set(s[1]+"."+s[2],e),e.nodeValue="",e["s-en"]=s[3])}},jt=e=>fs.map(t=>t(e)).find(t=>!!t);var qt=(e,t)=>e!=null&&!me(e)?o.propBoolean&&t&4?e==="false"?!1:e===""||!!e:o.propNumber&&t&2?parseFloat(e):o.propString&&t&1?String(e):e:e,Kt=e=>o.lazyLoad?M(e).$hostElement$:e,De=(e,t,s)=>{let n=Kt(e);return{emit:a=>(o.isDev&&!n.isConnected&&U(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),ve(n,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:a}))}},ve=(e,t,s)=>{let n=p.ce(t,s);return e.dispatchEvent(n),n},Pe=new WeakMap,Qt=(e,t,s)=>{let n=Z.get(e);gs&&s?(n=n||new CSSStyleSheet,typeof n=="string"?n=t:n.replaceSync(t)):n=t,Z.set(e,n)},$e=(e,t,s,n)=>{var a;let i=Ve(t,s),r=Z.get(i);if(!o.attachStyles)return i;if(e=e.nodeType===11?e:m,r)if(typeof r=="string"){e=e.head||e;let l=Pe.get(e),c;if(l||Pe.set(e,l=new Set),!l.has(i)){if(o.hydrateClientSide&&e.host&&(c=e.querySelector(`[${Ie}="${i}"]`)))c.innerHTML=r;else{if(o.cssVarShim&&p.$cssShim$){c=p.$cssShim$.createHostStyle(n,i,r,!!(t.$flags$&10));let u=c["s-sc"];u&&(i=u,l=null)}else c=m.createElement("style"),c.innerHTML=r;let d=(a=p.$nonce$)!==null&&a!==void 0?a:zt(m);d!=null&&c.setAttribute("nonce",d),(o.hydrateServerSide||o.hotModuleReplacement)&&c.setAttribute(Ie,i),e.insertBefore(c,e.querySelector("link"))}l&&l.add(i)}}else o.constructableCSS&&!e.adoptedStyleSheets.includes(r)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return i},Xt=e=>{let t=e.$cmpMeta$,s=e.$hostElement$,n=t.$flags$,a=C("attachStyles",t.$tagName$),i=$e(o.shadowDom&&F&&s.shadowRoot?s.shadowRoot:s.getRootNode(),t,e.$modeName$,s);(o.shadowDom||o.scoped)&&o.cssAnnotations&&n&10&&(s["s-sc"]=i,s.classList.add(i+"-h"),o.scoped&&n&2&&s.classList.add(i+"-s")),a()},Ve=(e,t)=>"sc-"+(o.mode&&t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$);var Fe=(e,t,s,n,a,i)=>{if(s!==n){let r=Ke(e,t),l=t.toLowerCase();if(o.vdomClass&&t==="class"){let c=e.classList,d=ze(s),u=ze(n);c.remove(...d.filter(h=>h&&!u.includes(h))),c.add(...u.filter(h=>h&&!d.includes(h)))}else if(o.vdomStyle&&t==="style"){if(o.updatable)for(let c in s)(!n||n[c]==null)&&(!o.hydrateServerSide&&c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(let c in n)(!s||n[c]!==s[c])&&(!o.hydrateServerSide&&c.includes("-")?e.style.setProperty(c,n[c]):e.style[c]=n[c])}else if(!(o.vdomKey&&t==="key")){if(o.vdomRef&&t==="ref")n&&n(e);else if(o.vdomListener&&(o.lazyLoad?!r:!e.__lookupSetter__(t))&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Ke(z,l)?t=l.slice(2):t=l[2]+t.slice(3),s&&p.rel(e,t,s,!1),n&&p.ael(e,t,n,!1);else if(o.vdomPropOrAttr){let c=me(n);if((r||c&&n!==null)&&!a)try{if(e.tagName.includes("-"))e[t]=n;else{let u=n==null?"":n;t==="list"?r=!1:(s==null||e[t]!=u)&&(e[t]=u)}}catch(u){}let d=!1;o.vdomXlink&&l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,d=!0),n==null||n===!1?(n!==!1||e.getAttribute(t)==="")&&(o.vdomXlink&&d?e.removeAttributeNS(Be,t):e.removeAttribute(t)):(!r||i&4||a)&&!c&&(n=n===!0?"":n,o.vdomXlink&&d?e.setAttributeNS(Be,t,n):e.setAttribute(t,n))}}}},Gt=/\s/,ze=e=>e?e.split(Gt):[],et=(e,t,s,n)=>{let a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||Re,r=t.$attrs$||Re;if(o.updatable)for(n in i)n in r||Fe(a,n,i[n],void 0,s,t.$flags$);for(n in r)Fe(a,n,i[n],r[n],s,t.$flags$)},G=(e,t,s,n)=>{let a=t.$children$[s],i=0,r,l,c;if(o.slotRelocation&&!Ze&&(ge=!0,a.$tag$==="slot"&&(O&&n.classList.add(O+"-s"),a.$flags$|=a.$children$?2:1)),o.isDev&&a.$elm$&&J(`The JSX ${a.$text$!==null?`"${a.$text$}" text`:`"${a.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),o.vdomText&&a.$text$!==null)r=a.$elm$=m.createTextNode(a.$text$);else if(o.slotRelocation&&a.$flags$&1)r=a.$elm$=o.isDebug||o.hydrateServerSide?Zt(a):m.createTextNode("");else{if(o.svg&&!y&&(y=a.$tag$==="svg"),r=a.$elm$=o.svg?m.createElementNS(y?_t:Pt,o.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$):m.createElement(o.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),o.svg&&y&&a.$tag$==="foreignObject"&&(y=!1),o.vdomAttribute&&et(null,a,y),(o.shadowDom||o.scoped)&&Ft(O)&&r["s-si"]!==O&&r.classList.add(r["s-si"]=O),a.$children$)for(i=0;i<a.$children$.length;++i)l=G(e,a,i,r),l&&r.appendChild(l);o.svg&&(a.$tag$==="svg"?y=!1:r.tagName==="foreignObject"&&(y=!0))}return o.slotRelocation&&(r["s-hn"]=_,a.$flags$&3&&(r["s-sr"]=!0,r["s-cr"]=Je,r["s-sn"]=a.$name$||"",c=e&&e.$children$&&e.$children$[s],c&&c.$tag$===a.$tag$&&e.$elm$&&H(e.$elm$,!1))),r},H=(e,t)=>{p.$flags$|=1;let s=e.childNodes;for(let n=s.length-1;n>=0;n--){let a=s[n];a["s-hn"]!==_&&a["s-ol"]&&(nt(a).insertBefore(a,be(a)),a["s-ol"].remove(),a["s-ol"]=void 0,ge=!0),t&&H(a,t)}p.$flags$&=-2},tt=(e,t,s,n,a,i)=>{let r=o.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e,l;for(o.shadowDom&&r.shadowRoot&&r.tagName===_&&(r=r.shadowRoot);a<=i;++a)n[a]&&(l=G(null,s,a,e),l&&(n[a].$elm$=l,r.insertBefore(l,o.slotRelocation?be(t):t)))},st=(e,t,s,n,a)=>{for(;t<=s;++t)(n=e[t])&&(a=n.$elm$,it(n),o.slotRelocation&&(Q=!0,a["s-ol"]?a["s-ol"].remove():H(a,!0)),a.remove())},Jt=(e,t,s,n)=>{let a=0,i=0,r=0,l=0,c=t.length-1,d=t[0],u=t[c],h=n.length-1,f=n[0],g=n[h],v,L;for(;a<=c&&i<=h;)if(d==null)d=t[++a];else if(u==null)u=t[--c];else if(f==null)f=n[++i];else if(g==null)g=n[--h];else if(K(d,f))B(d,f),d=t[++a],f=n[++i];else if(K(u,g))B(u,g),u=t[--c],g=n[--h];else if(K(d,g))o.slotRelocation&&(d.$tag$==="slot"||g.$tag$==="slot")&&H(d.$elm$.parentNode,!1),B(d,g),e.insertBefore(d.$elm$,u.$elm$.nextSibling),d=t[++a],g=n[--h];else if(K(u,f))o.slotRelocation&&(d.$tag$==="slot"||g.$tag$==="slot")&&H(u.$elm$.parentNode,!1),B(u,f),e.insertBefore(u.$elm$,d.$elm$),u=t[--c],f=n[++i];else{if(r=-1,o.vdomKey){for(l=a;l<=c;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===f.$key$){r=l;break}}o.vdomKey&&r>=0?(L=t[r],L.$tag$!==f.$tag$?v=G(t&&t[i],s,r,e):(B(L,f),t[r]=void 0,v=L.$elm$),f=n[++i]):(v=G(t&&t[i],s,i,e),f=n[++i]),v&&(o.slotRelocation?nt(d.$elm$).insertBefore(v,be(d.$elm$)):d.$elm$.parentNode.insertBefore(v,d.$elm$))}a>c?tt(e,n[h+1]==null?null:n[h+1].$elm$,s,n,i,h):o.updatable&&i>h&&st(t,a,c)},K=(e,t)=>e.$tag$===t.$tag$?o.slotRelocation&&e.$tag$==="slot"?e.$name$===t.$name$:o.vdomKey?e.$key$===t.$key$:!0:!1,be=e=>e&&e["s-ol"]||e,nt=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,B=(e,t)=>{let s=t.$elm$=e.$elm$,n=e.$children$,a=t.$children$,i=t.$tag$,r=t.$text$,l;!o.vdomText||r===null?(o.svg&&(y=i==="svg"?!0:i==="foreignObject"?!1:y),(o.vdomAttribute||o.reflect)&&(o.slot&&i==="slot"||et(e,t,y)),o.updatable&&n!==null&&a!==null?Jt(s,n,t,a):a!==null?(o.updatable&&o.vdomText&&e.$text$!==null&&(s.textContent=""),tt(s,null,t,a,0,a.length-1)):o.updatable&&n!==null&&st(n,0,n.length-1),o.svg&&y&&i==="svg"&&(y=!1)):o.vdomText&&o.slotRelocation&&(l=s["s-cr"])?l.parentNode.textContent=r:o.vdomText&&e.$text$!==r&&(s.data=r)},ot=e=>{let t=e.childNodes,s,n,a,i,r,l;for(n=0,a=t.length;n<a;n++)if(s=t[n],s.nodeType===1){if(s["s-sr"]){for(r=s["s-sn"],s.hidden=!1,i=0;i<a;i++)if(l=t[i].nodeType,t[i]["s-hn"]!==s["s-hn"]||r!==""){if(l===1&&r===t[i].getAttribute("slot")){s.hidden=!0;break}}else if(l===1||l===3&&t[i].textContent.trim()!==""){s.hidden=!0;break}}ot(s)}},b=[],at=e=>{let t,s,n,a,i,r,l=0,c=e.childNodes,d=c.length;for(;l<d;l++){if(t=c[l],t["s-sr"]&&(s=t["s-cr"])&&s.parentNode)for(n=s.parentNode.childNodes,a=t["s-sn"],r=n.length-1;r>=0;r--)s=n[r],!s["s-cn"]&&!s["s-nr"]&&s["s-hn"]!==t["s-hn"]&&(Ye(s,a)?(i=b.find(u=>u.$nodeToRelocate$===s),Q=!0,s["s-sn"]=s["s-sn"]||a,i?i.$slotRefNode$=t:b.push({$slotRefNode$:t,$nodeToRelocate$:s}),s["s-sr"]&&b.map(u=>{Ye(u.$nodeToRelocate$,s["s-sn"])&&(i=b.find(h=>h.$nodeToRelocate$===s),i&&!u.$slotRefNode$&&(u.$slotRefNode$=i.$slotRefNode$))})):b.some(u=>u.$nodeToRelocate$===s)||b.push({$nodeToRelocate$:s}));t.nodeType===1&&at(t)}},Ye=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",it=e=>{o.vdomRef&&(e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(it))},He=(e,t)=>{let s=e.$hostElement$,n=e.$cmpMeta$,a=e.$vnode$||P(null,null),i=ue(t)?t:$(null,null,t);if(_=s.tagName,o.isDev&&Array.isArray(t)&&t.some(ue))throw new Error(`The <Host> must be the single root component.
|
|
5
|
+
- <Host> is used once, and it's the single root component of the render() function.`),o.vdomFunctional&&typeof e=="function")return e(t===null?{}:t,c,zt);let u=P(e,null);return u.$attrs$=t,c.length>0&&(u.$children$=c),o.vdomKey&&(u.$key$=a),o.slotRelocation&&(u.$name$=i),u},P=(e,t)=>{let s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return o.vdomAttribute&&(s.$attrs$=null),o.vdomKey&&(s.$key$=null),o.slotRelocation&&(s.$name$=null),s},ye={},ue=e=>e&&e.$tag$===ye,zt={forEach:(e,t)=>e.map(_e).forEach(t),map:(e,t)=>e.map(_e).map(t).map(Ht)},_e=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Ht=e=>{if(typeof e.vtag=="function"){let s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),$(e.vtag,s,...e.vchildren||[])}let t=P(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Ut=e=>{let t=Object.keys(e),s=t.indexOf("value");if(s===-1)return;let n=t.indexOf("type"),a=t.indexOf("min"),i=t.indexOf("max"),r=t.indexOf("step");(s<n||s<a||s<i||s<r)&&U('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},Wt=(e,t,s,n)=>{let a=C("hydrateClient",t),i=e.shadowRoot,r=[],l=[],c=o.shadowDom&&i?[]:null,d=n.$vnode$=P(t,null);p.$orgLocNodes$||fe(m.body,p.$orgLocNodes$=new Map),e[de]=s,e.removeAttribute(de),he(d,r,l,c,e,e,s),r.map(u=>{let h=u.$hostId$+"."+u.$nodeId$,f=p.$orgLocNodes$.get(h),g=u.$elm$;f&&F&&f["s-en"]===""&&f.parentNode.insertBefore(g,f.nextSibling),i||(g["s-hn"]=t,f&&(g["s-ol"]=f,g["s-ol"]["s-nr"]=g)),p.$orgLocNodes$.delete(h)}),o.shadowDom&&i&&c.map(u=>{u&&i.appendChild(u)}),a()},he=(e,t,s,n,a,i,r)=>{let l,c,d,u;if(i.nodeType===1){for(l=i.getAttribute(Oe),l&&(c=l.split("."),(c[0]===r||c[0]==="0")&&(d={$flags$:0,$hostId$:c[0],$nodeId$:c[1],$depth$:c[2],$index$:c[3],$tag$:i.tagName.toLowerCase(),$elm$:i,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},t.push(d),i.removeAttribute(Oe),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d,e=d,n&&d.$depth$==="0"&&(n[d.$index$]=d.$elm$))),u=i.childNodes.length-1;u>=0;u--)he(e,t,s,n,a,i.childNodes[u],r);if(i.shadowRoot)for(u=i.shadowRoot.childNodes.length-1;u>=0;u--)he(e,t,s,n,a,i.shadowRoot.childNodes[u],r)}else if(i.nodeType===8)c=i.nodeValue.split("."),(c[1]===r||c[1]==="0")&&(l=c[0],d={$flags$:0,$hostId$:c[1],$nodeId$:c[2],$depth$:c[3],$index$:c[4],$elm$:i,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},l===Rt?(d.$elm$=i.nextSibling,d.$elm$&&d.$elm$.nodeType===3&&(d.$text$=d.$elm$.textContent,t.push(d),i.remove(),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d,n&&d.$depth$==="0"&&(n[d.$index$]=d.$elm$))):d.$hostId$===r&&(l===Bt?(d.$tag$="slot",c[5]?i["s-sn"]=d.$name$=c[5]:i["s-sn"]="",i["s-sr"]=!0,o.shadowDom&&n&&(d.$elm$=m.createElement(d.$tag$),d.$name$&&d.$elm$.setAttribute("name",d.$name$),i.parentNode.insertBefore(d.$elm$,i),i.remove(),d.$depth$==="0"&&(n[d.$index$]=d.$elm$)),s.push(d),e.$children$||(e.$children$=[]),e.$children$[d.$index$]=d):l===It&&(o.shadowDom&&n?i.remove():o.slotRelocation&&(a["s-cr"]=i,i["s-cn"]=!0))));else if(e&&e.$tag$==="style"){let h=P(null,i.textContent);h.$elm$=i,h.$index$="0",e.$children$=[h]}},fe=(e,t)=>{if(e.nodeType===1){let s=0;for(;s<e.childNodes.length;s++)fe(e.childNodes[s],t);if(e.shadowRoot)for(s=0;s<e.shadowRoot.childNodes.length;s++)fe(e.shadowRoot.childNodes[s],t)}else if(e.nodeType===8){let s=e.nodeValue.split(".");s[0]===Ot&&(t.set(s[1]+"."+s[2],e),e.nodeValue="",e["s-en"]=s[3])}},jt=e=>fs.map(t=>t(e)).find(t=>!!t);var qt=(e,t)=>e!=null&&!me(e)?o.propBoolean&&t&4?e==="false"?!1:e===""||!!e:o.propNumber&&t&2?parseFloat(e):o.propString&&t&1?String(e):e:e,Kt=e=>o.lazyLoad?M(e).$hostElement$:e,ve=(e,t,s)=>{let n=Kt(e);return{emit:a=>(o.isDev&&!n.isConnected&&U(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),De(n,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:a}))}},De=(e,t,s)=>{let n=p.ce(t,s);return e.dispatchEvent(n),n},Pe=new WeakMap,Qt=(e,t,s)=>{let n=Z.get(e);gs&&s?(n=n||new CSSStyleSheet,typeof n=="string"?n=t:n.replaceSync(t)):n=t,Z.set(e,n)},$e=(e,t,s,n)=>{var a;let i=Ve(t,s),r=Z.get(i);if(!o.attachStyles)return i;if(e=e.nodeType===11?e:m,r)if(typeof r=="string"){e=e.head||e;let l=Pe.get(e),c;if(l||Pe.set(e,l=new Set),!l.has(i)){if(o.hydrateClientSide&&e.host&&(c=e.querySelector(`[${Ie}="${i}"]`)))c.innerHTML=r;else{if(o.cssVarShim&&p.$cssShim$){c=p.$cssShim$.createHostStyle(n,i,r,!!(t.$flags$&10));let u=c["s-sc"];u&&(i=u,l=null)}else c=m.createElement("style"),c.innerHTML=r;let d=(a=p.$nonce$)!==null&&a!==void 0?a:Yt(m);d!=null&&c.setAttribute("nonce",d),(o.hydrateServerSide||o.hotModuleReplacement)&&c.setAttribute(Ie,i),e.insertBefore(c,e.querySelector("link"))}l&&l.add(i)}}else o.constructableCSS&&!e.adoptedStyleSheets.includes(r)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return i},Xt=e=>{let t=e.$cmpMeta$,s=e.$hostElement$,n=t.$flags$,a=C("attachStyles",t.$tagName$),i=$e(o.shadowDom&&F&&s.shadowRoot?s.shadowRoot:s.getRootNode(),t,e.$modeName$,s);(o.shadowDom||o.scoped)&&o.cssAnnotations&&n&10&&(s["s-sc"]=i,s.classList.add(i+"-h"),o.scoped&&n&2&&s.classList.add(i+"-s")),a()},Ve=(e,t)=>"sc-"+(o.mode&&t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$);var Fe=(e,t,s,n,a,i)=>{if(s!==n){let r=Ke(e,t),l=t.toLowerCase();if(o.vdomClass&&t==="class"){let c=e.classList,d=Ye(s),u=Ye(n);c.remove(...d.filter(h=>h&&!u.includes(h))),c.add(...u.filter(h=>h&&!d.includes(h)))}else if(o.vdomStyle&&t==="style"){if(o.updatable)for(let c in s)(!n||n[c]==null)&&(!o.hydrateServerSide&&c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(let c in n)(!s||n[c]!==s[c])&&(!o.hydrateServerSide&&c.includes("-")?e.style.setProperty(c,n[c]):e.style[c]=n[c])}else if(!(o.vdomKey&&t==="key")){if(o.vdomRef&&t==="ref")n&&n(e);else if(o.vdomListener&&(o.lazyLoad?!r:!e.__lookupSetter__(t))&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):Ke(Y,l)?t=l.slice(2):t=l[2]+t.slice(3),s&&p.rel(e,t,s,!1),n&&p.ael(e,t,n,!1);else if(o.vdomPropOrAttr){let c=me(n);if((r||c&&n!==null)&&!a)try{if(e.tagName.includes("-"))e[t]=n;else{let u=n==null?"":n;t==="list"?r=!1:(s==null||e[t]!=u)&&(e[t]=u)}}catch(u){}let d=!1;o.vdomXlink&&l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,d=!0),n==null||n===!1?(n!==!1||e.getAttribute(t)==="")&&(o.vdomXlink&&d?e.removeAttributeNS(Be,t):e.removeAttribute(t)):(!r||i&4||a)&&!c&&(n=n===!0?"":n,o.vdomXlink&&d?e.setAttributeNS(Be,t,n):e.setAttribute(t,n))}}}},Gt=/\s/,Ye=e=>e?e.split(Gt):[],et=(e,t,s,n)=>{let a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,i=e&&e.$attrs$||Re,r=t.$attrs$||Re;if(o.updatable)for(n in i)n in r||Fe(a,n,i[n],void 0,s,t.$flags$);for(n in r)Fe(a,n,i[n],r[n],s,t.$flags$)},G=(e,t,s,n)=>{let a=t.$children$[s],i=0,r,l,c;if(o.slotRelocation&&!Ze&&(ge=!0,a.$tag$==="slot"&&(O&&n.classList.add(O+"-s"),a.$flags$|=a.$children$?2:1)),o.isDev&&a.$elm$&&J(`The JSX ${a.$text$!==null?`"${a.$text$}" text`:`"${a.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`),o.vdomText&&a.$text$!==null)r=a.$elm$=m.createTextNode(a.$text$);else if(o.slotRelocation&&a.$flags$&1)r=a.$elm$=o.isDebug||o.hydrateServerSide?Zt(a):m.createTextNode("");else{if(o.svg&&!y&&(y=a.$tag$==="svg"),r=a.$elm$=o.svg?m.createElementNS(y?_t:Pt,o.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$):m.createElement(o.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),o.svg&&y&&a.$tag$==="foreignObject"&&(y=!1),o.vdomAttribute&&et(null,a,y),(o.shadowDom||o.scoped)&&Ft(O)&&r["s-si"]!==O&&r.classList.add(r["s-si"]=O),a.$children$)for(i=0;i<a.$children$.length;++i)l=G(e,a,i,r),l&&r.appendChild(l);o.svg&&(a.$tag$==="svg"?y=!1:r.tagName==="foreignObject"&&(y=!0))}return o.slotRelocation&&(r["s-hn"]=_,a.$flags$&3&&(r["s-sr"]=!0,r["s-cr"]=Je,r["s-sn"]=a.$name$||"",c=e&&e.$children$&&e.$children$[s],c&&c.$tag$===a.$tag$&&e.$elm$&&H(e.$elm$,!1))),r},H=(e,t)=>{p.$flags$|=1;let s=e.childNodes;for(let n=s.length-1;n>=0;n--){let a=s[n];a["s-hn"]!==_&&a["s-ol"]&&(nt(a).insertBefore(a,be(a)),a["s-ol"].remove(),a["s-ol"]=void 0,ge=!0),t&&H(a,t)}p.$flags$&=-2},tt=(e,t,s,n,a,i)=>{let r=o.slotRelocation&&e["s-cr"]&&e["s-cr"].parentNode||e,l;for(o.shadowDom&&r.shadowRoot&&r.tagName===_&&(r=r.shadowRoot);a<=i;++a)n[a]&&(l=G(null,s,a,e),l&&(n[a].$elm$=l,r.insertBefore(l,o.slotRelocation?be(t):t)))},st=(e,t,s,n,a)=>{for(;t<=s;++t)(n=e[t])&&(a=n.$elm$,it(n),o.slotRelocation&&(Q=!0,a["s-ol"]?a["s-ol"].remove():H(a,!0)),a.remove())},Jt=(e,t,s,n)=>{let a=0,i=0,r=0,l=0,c=t.length-1,d=t[0],u=t[c],h=n.length-1,f=n[0],g=n[h],D,L;for(;a<=c&&i<=h;)if(d==null)d=t[++a];else if(u==null)u=t[--c];else if(f==null)f=n[++i];else if(g==null)g=n[--h];else if(K(d,f))B(d,f),d=t[++a],f=n[++i];else if(K(u,g))B(u,g),u=t[--c],g=n[--h];else if(K(d,g))o.slotRelocation&&(d.$tag$==="slot"||g.$tag$==="slot")&&H(d.$elm$.parentNode,!1),B(d,g),e.insertBefore(d.$elm$,u.$elm$.nextSibling),d=t[++a],g=n[--h];else if(K(u,f))o.slotRelocation&&(d.$tag$==="slot"||g.$tag$==="slot")&&H(u.$elm$.parentNode,!1),B(u,f),e.insertBefore(u.$elm$,d.$elm$),u=t[--c],f=n[++i];else{if(r=-1,o.vdomKey){for(l=a;l<=c;++l)if(t[l]&&t[l].$key$!==null&&t[l].$key$===f.$key$){r=l;break}}o.vdomKey&&r>=0?(L=t[r],L.$tag$!==f.$tag$?D=G(t&&t[i],s,r,e):(B(L,f),t[r]=void 0,D=L.$elm$),f=n[++i]):(D=G(t&&t[i],s,i,e),f=n[++i]),D&&(o.slotRelocation?nt(d.$elm$).insertBefore(D,be(d.$elm$)):d.$elm$.parentNode.insertBefore(D,d.$elm$))}a>c?tt(e,n[h+1]==null?null:n[h+1].$elm$,s,n,i,h):o.updatable&&i>h&&st(t,a,c)},K=(e,t)=>e.$tag$===t.$tag$?o.slotRelocation&&e.$tag$==="slot"?e.$name$===t.$name$:o.vdomKey?e.$key$===t.$key$:!0:!1,be=e=>e&&e["s-ol"]||e,nt=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,B=(e,t)=>{let s=t.$elm$=e.$elm$,n=e.$children$,a=t.$children$,i=t.$tag$,r=t.$text$,l;!o.vdomText||r===null?(o.svg&&(y=i==="svg"?!0:i==="foreignObject"?!1:y),(o.vdomAttribute||o.reflect)&&(o.slot&&i==="slot"||et(e,t,y)),o.updatable&&n!==null&&a!==null?Jt(s,n,t,a):a!==null?(o.updatable&&o.vdomText&&e.$text$!==null&&(s.textContent=""),tt(s,null,t,a,0,a.length-1)):o.updatable&&n!==null&&st(n,0,n.length-1),o.svg&&y&&i==="svg"&&(y=!1)):o.vdomText&&o.slotRelocation&&(l=s["s-cr"])?l.parentNode.textContent=r:o.vdomText&&e.$text$!==r&&(s.data=r)},ot=e=>{let t=e.childNodes,s,n,a,i,r,l;for(n=0,a=t.length;n<a;n++)if(s=t[n],s.nodeType===1){if(s["s-sr"]){for(r=s["s-sn"],s.hidden=!1,i=0;i<a;i++)if(l=t[i].nodeType,t[i]["s-hn"]!==s["s-hn"]||r!==""){if(l===1&&r===t[i].getAttribute("slot")){s.hidden=!0;break}}else if(l===1||l===3&&t[i].textContent.trim()!==""){s.hidden=!0;break}}ot(s)}},b=[],at=e=>{let t,s,n,a,i,r,l=0,c=e.childNodes,d=c.length;for(;l<d;l++){if(t=c[l],t["s-sr"]&&(s=t["s-cr"])&&s.parentNode)for(n=s.parentNode.childNodes,a=t["s-sn"],r=n.length-1;r>=0;r--)s=n[r],!s["s-cn"]&&!s["s-nr"]&&s["s-hn"]!==t["s-hn"]&&(ze(s,a)?(i=b.find(u=>u.$nodeToRelocate$===s),Q=!0,s["s-sn"]=s["s-sn"]||a,i?i.$slotRefNode$=t:b.push({$slotRefNode$:t,$nodeToRelocate$:s}),s["s-sr"]&&b.map(u=>{ze(u.$nodeToRelocate$,s["s-sn"])&&(i=b.find(h=>h.$nodeToRelocate$===s),i&&!u.$slotRefNode$&&(u.$slotRefNode$=i.$slotRefNode$))})):b.some(u=>u.$nodeToRelocate$===s)||b.push({$nodeToRelocate$:s}));t.nodeType===1&&at(t)}},ze=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",it=e=>{o.vdomRef&&(e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(it))},He=(e,t)=>{let s=e.$hostElement$,n=e.$cmpMeta$,a=e.$vnode$||P(null,null),i=ue(t)?t:$(null,null,t);if(_=s.tagName,o.isDev&&Array.isArray(t)&&t.some(ue))throw new Error(`The <Host> must be the single root component.
|
|
6
6
|
Looks like the render() function of "${_.toLowerCase()}" is returning an array that contains the <Host>.
|
|
7
7
|
|
|
8
8
|
The render() function should look like this instead:
|
|
@@ -13,25 +13,25 @@ render() {
|
|
|
13
13
|
<Host>{content}</Host>
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
|
-
`);if(o.reflect&&n.$attrsToReflect$&&(i.$attrs$=i.$attrs$||{},n.$attrsToReflect$.map(([r,l])=>i.$attrs$[l]=s[r])),i.$tag$=null,i.$flags$|=4,e.$vnode$=i,i.$elm$=a.$elm$=o.shadowDom&&s.shadowRoot||s,(o.scoped||o.shadowDom)&&(O=s["s-sc"]),o.slotRelocation&&(Je=s["s-cr"],Ze=F&&(n.$flags$&1)!==0,Q=!1),B(a,i),o.slotRelocation){if(p.$flags$|=1,ge){at(i.$elm$);let r,l,c,d,u,h,f=0;for(;f<b.length;f++)r=b[f],l=r.$nodeToRelocate$,l["s-ol"]||(c=o.isDebug||o.hydrateServerSide?Vt(l):m.createTextNode(""),c["s-nr"]=l,l.parentNode.insertBefore(l["s-ol"]=c,l));for(f=0;f<b.length;f++)if(r=b[f],l=r.$nodeToRelocate$,r.$slotRefNode$){for(d=r.$slotRefNode$.parentNode,u=r.$slotRefNode$.nextSibling,c=l["s-ol"];c=c.previousSibling;)if(h=c["s-nr"],h&&h["s-sn"]===l["s-sn"]&&d===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&d!==l.parentNode||l.nextSibling!==u)&&l!==u&&(!l["s-hn"]&&l["s-ol"]&&(l["s-hn"]=l["s-ol"].parentNode.nodeName),d.insertBefore(l,u))}else l.nodeType===1&&(l.hidden=!0)}Q&&ot(i.$elm$),p.$flags$&=-2,b.length=0}},Zt=e=>m.createComment(`<slot${e.$name$?' name="'+e.$name$+'"':""}> (host=${_.toLowerCase()})`),Vt=e=>m.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),rt=(e,t)=>{o.asyncLoading&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},Se=(e,t)=>{if(o.taskQueue&&o.updatable&&(e.$flags$|=16),o.asyncLoading&&e.$flags$&4){e.$flags$|=512;return}rt(e,e.$ancestorComponent$);let s=()=>es(e,t);return o.taskQueue?ys(s):s()},es=(e,t)=>{let s=e.$hostElement$,n=C("scheduleUpdate",e.$cmpMeta$.$tagName$),a=o.lazyLoad?e.$lazyInstance$:s,i;return t?(o.lazyLoad&&o.hostListener&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([r,l])=>S(a,r,l)),e.$queuedListeners$=null)),R(s,"componentWillLoad"),o.cmpWillLoad&&(i=S(a,"componentWillLoad"))):(R(s,"componentWillUpdate"),o.cmpWillUpdate&&(i=S(a,"componentWillUpdate"))),R(s,"componentWillRender"),o.cmpWillRender&&(i=je(i,()=>S(a,"componentWillRender"))),n(),je(i,()=>ts(e,a,t))},ts=async(e,t,s)=>{let n=e.$hostElement$,a=C("update",e.$cmpMeta$.$tagName$),i=n["s-rc"];o.style&&s&&Xt(e);let r=C("render",e.$cmpMeta$.$tagName$);if(o.isDev&&(e.$flags$|=1024),o.hydrateServerSide?await Ue(e,t,n):Ue(e,t,n),o.cssVarShim&&p.$cssShim$&&p.$cssShim$.updateHost(n),o.isDev&&(e.$renderCount$++,e.$flags$&=-1025),o.hydrateServerSide)try{ct(n),s&&(e.$cmpMeta$.$flags$&1?n["s-en"]="":e.$cmpMeta$.$flags$&2&&(n["s-en"]="c"))}catch(l){k(l,n)}if(o.asyncLoading&&i&&(i.map(l=>l()),n["s-rc"]=void 0),r(),a(),o.asyncLoading){let l=n["s-p"],c=()=>We(e);l.length===0?c():(Promise.all(l).then(c),e.$flags$|=4,l.length=0)}else We(e)},Ue=(e,t,s)=>{let n=!!o.allRenderFn,a=!!o.lazyLoad,i=!!o.taskQueue,r=!!o.updatable;try{if(Ee=t,t=(n||t.render)&&t.render(),r&&i&&(e.$flags$&=-17),(r||a)&&(e.$flags$|=2),o.hasRenderFn||o.reflect)if(o.vdomRender||o.reflect){if(o.hydrateServerSide)return Promise.resolve(t).then(l=>He(e,l));He(e,t)}else s.textContent=t}catch(l){k(l,e.$hostElement$)}return Ee=null,null};var We=e=>{let t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,n=C("postUpdate",t),a=o.lazyLoad?e.$lazyInstance$:s,i=e.$ancestorComponent$;o.cmpDidRender&&(o.isDev&&(e.$flags$|=1024),S(a,"componentDidRender"),o.isDev&&(e.$flags$&=-1025)),R(s,"componentDidRender"),e.$flags$&64?(o.cmpDidUpdate&&(o.isDev&&(e.$flags$|=1024),S(a,"componentDidUpdate"),o.isDev&&(e.$flags$&=-1025)),R(s,"componentDidUpdate"),n()):(e.$flags$|=64,o.asyncLoading&&o.cssAnnotations&<(s),o.cmpDidLoad&&(o.isDev&&(e.$flags$|=2048),S(a,"componentDidLoad"),o.isDev&&(e.$flags$&=-2049)),R(s,"componentDidLoad"),n(),o.asyncLoading&&(e.$onReadyResolve$(s),i||ss(t))),o.hotModuleReplacement&&s["s-hmr-load"]&&s["s-hmr-load"](),o.method&&o.lazyLoad&&e.$onInstanceResolve$(s),o.asyncLoading&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&ee(()=>Se(e,!1)),e.$flags$&=-517)};var ss=e=>{o.cssAnnotations&<(m.documentElement),o.asyncQueue&&(p.$flags$|=2),ee(()=>
|
|
16
|
+
`);if(o.reflect&&n.$attrsToReflect$&&(i.$attrs$=i.$attrs$||{},n.$attrsToReflect$.map(([r,l])=>i.$attrs$[l]=s[r])),i.$tag$=null,i.$flags$|=4,e.$vnode$=i,i.$elm$=a.$elm$=o.shadowDom&&s.shadowRoot||s,(o.scoped||o.shadowDom)&&(O=s["s-sc"]),o.slotRelocation&&(Je=s["s-cr"],Ze=F&&(n.$flags$&1)!==0,Q=!1),B(a,i),o.slotRelocation){if(p.$flags$|=1,ge){at(i.$elm$);let r,l,c,d,u,h,f=0;for(;f<b.length;f++)r=b[f],l=r.$nodeToRelocate$,l["s-ol"]||(c=o.isDebug||o.hydrateServerSide?Vt(l):m.createTextNode(""),c["s-nr"]=l,l.parentNode.insertBefore(l["s-ol"]=c,l));for(f=0;f<b.length;f++)if(r=b[f],l=r.$nodeToRelocate$,r.$slotRefNode$){for(d=r.$slotRefNode$.parentNode,u=r.$slotRefNode$.nextSibling,c=l["s-ol"];c=c.previousSibling;)if(h=c["s-nr"],h&&h["s-sn"]===l["s-sn"]&&d===h.parentNode&&(h=h.nextSibling,!h||!h["s-nr"])){u=h;break}(!u&&d!==l.parentNode||l.nextSibling!==u)&&l!==u&&(!l["s-hn"]&&l["s-ol"]&&(l["s-hn"]=l["s-ol"].parentNode.nodeName),d.insertBefore(l,u))}else l.nodeType===1&&(l.hidden=!0)}Q&&ot(i.$elm$),p.$flags$&=-2,b.length=0}},Zt=e=>m.createComment(`<slot${e.$name$?' name="'+e.$name$+'"':""}> (host=${_.toLowerCase()})`),Vt=e=>m.createComment("org-location for "+(e.localName?`<${e.localName}> (host=${e["s-hn"]})`:`[${e.textContent}]`)),rt=(e,t)=>{o.asyncLoading&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},Se=(e,t)=>{if(o.taskQueue&&o.updatable&&(e.$flags$|=16),o.asyncLoading&&e.$flags$&4){e.$flags$|=512;return}rt(e,e.$ancestorComponent$);let s=()=>es(e,t);return o.taskQueue?ys(s):s()},es=(e,t)=>{let s=e.$hostElement$,n=C("scheduleUpdate",e.$cmpMeta$.$tagName$),a=o.lazyLoad?e.$lazyInstance$:s,i;return t?(o.lazyLoad&&o.hostListener&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([r,l])=>S(a,r,l)),e.$queuedListeners$=null)),R(s,"componentWillLoad"),o.cmpWillLoad&&(i=S(a,"componentWillLoad"))):(R(s,"componentWillUpdate"),o.cmpWillUpdate&&(i=S(a,"componentWillUpdate"))),R(s,"componentWillRender"),o.cmpWillRender&&(i=je(i,()=>S(a,"componentWillRender"))),n(),je(i,()=>ts(e,a,t))},ts=async(e,t,s)=>{let n=e.$hostElement$,a=C("update",e.$cmpMeta$.$tagName$),i=n["s-rc"];o.style&&s&&Xt(e);let r=C("render",e.$cmpMeta$.$tagName$);if(o.isDev&&(e.$flags$|=1024),o.hydrateServerSide?await Ue(e,t,n):Ue(e,t,n),o.cssVarShim&&p.$cssShim$&&p.$cssShim$.updateHost(n),o.isDev&&(e.$renderCount$++,e.$flags$&=-1025),o.hydrateServerSide)try{ct(n),s&&(e.$cmpMeta$.$flags$&1?n["s-en"]="":e.$cmpMeta$.$flags$&2&&(n["s-en"]="c"))}catch(l){k(l,n)}if(o.asyncLoading&&i&&(i.map(l=>l()),n["s-rc"]=void 0),r(),a(),o.asyncLoading){let l=n["s-p"],c=()=>We(e);l.length===0?c():(Promise.all(l).then(c),e.$flags$|=4,l.length=0)}else We(e)},Ue=(e,t,s)=>{let n=!!o.allRenderFn,a=!!o.lazyLoad,i=!!o.taskQueue,r=!!o.updatable;try{if(Ee=t,t=(n||t.render)&&t.render(),r&&i&&(e.$flags$&=-17),(r||a)&&(e.$flags$|=2),o.hasRenderFn||o.reflect)if(o.vdomRender||o.reflect){if(o.hydrateServerSide)return Promise.resolve(t).then(l=>He(e,l));He(e,t)}else s.textContent=t}catch(l){k(l,e.$hostElement$)}return Ee=null,null};var We=e=>{let t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,n=C("postUpdate",t),a=o.lazyLoad?e.$lazyInstance$:s,i=e.$ancestorComponent$;o.cmpDidRender&&(o.isDev&&(e.$flags$|=1024),S(a,"componentDidRender"),o.isDev&&(e.$flags$&=-1025)),R(s,"componentDidRender"),e.$flags$&64?(o.cmpDidUpdate&&(o.isDev&&(e.$flags$|=1024),S(a,"componentDidUpdate"),o.isDev&&(e.$flags$&=-1025)),R(s,"componentDidUpdate"),n()):(e.$flags$|=64,o.asyncLoading&&o.cssAnnotations&<(s),o.cmpDidLoad&&(o.isDev&&(e.$flags$|=2048),S(a,"componentDidLoad"),o.isDev&&(e.$flags$&=-2049)),R(s,"componentDidLoad"),n(),o.asyncLoading&&(e.$onReadyResolve$(s),i||ss(t))),o.hotModuleReplacement&&s["s-hmr-load"]&&s["s-hmr-load"](),o.method&&o.lazyLoad&&e.$onInstanceResolve$(s),o.asyncLoading&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&ee(()=>Se(e,!1)),e.$flags$&=-517)};var ss=e=>{o.cssAnnotations&<(m.documentElement),o.asyncQueue&&(p.$flags$|=2),ee(()=>De(Y,"appload",{detail:{namespace:q}})),o.profile&&performance.measure&&performance.measure(`[Stencil] ${q} initial load (by ${e})`,"st:app:start")},S=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(n){k(n)}},je=(e,t)=>e&&e.then?e.then(t):t(),R=(e,t)=>{o.lifecycleDOMEvents&&De(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:q}})},lt=e=>o.hydratedClass?e.classList.add("hydrated"):o.hydratedAttribute?e.setAttribute("hydrated",""):void 0,ct=e=>{let t=e.children;if(t!=null)for(let s=0,n=t.length;s<n;s++){let a=t[s];typeof a.connectedCallback=="function"&&a.connectedCallback(),ct(a)}},ns=(e,t)=>M(e).$instanceValues$.get(t),os=(e,t,s,n)=>{let a=M(e),i=o.lazyLoad?a.$hostElement$:e,r=a.$instanceValues$.get(t),l=a.$flags$,c=o.lazyLoad?a.$lazyInstance$:i;s=qt(s,n.$members$[t][0]);let d=Number.isNaN(r)&&Number.isNaN(s),u=s!==r&&!d;if((!o.lazyLoad||!(l&8)||r===void 0)&&u&&(a.$instanceValues$.set(t,s),o.isDev&&(a.$flags$&1024?U(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,`
|
|
17
17
|
Element`,i,`
|
|
18
18
|
New value`,s,`
|
|
19
19
|
Old value`,r):a.$flags$&2048&&U(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,`
|
|
20
20
|
Element`,i,`
|
|
21
21
|
New value`,s,`
|
|
22
22
|
Old value`,r)),!o.lazyLoad||c)){if(o.watchCallback&&n.$watchers$&&l&128){let h=n.$watchers$[t];h&&h.map(f=>{try{c[f](s,r,t)}catch(g){k(g,i)}})}if(o.updatable&&(l&18)===2){if(o.cmpShouldUpdate&&c.componentShouldUpdate&&c.componentShouldUpdate(s,r,t)===!1)return;Se(a,!1)}}},dt=(e,t,s)=>{if(o.member&&t.$members$){o.watchCallback&&e.watchers&&(t.$watchers$=e.watchers);let n=Object.entries(t.$members$),a=e.prototype;if(n.map(([i,[r]])=>{(o.prop||o.state)&&(r&31||(!o.lazyLoad||s&2)&&r&32)?Object.defineProperty(a,i,{get(){return ns(this,i)},set(l){if(o.isDev){let c=M(this);(s&1)===0&&(c.$flags$&8)===0&&(r&31)!==0&&(r&1024)===0&&U(`@Prop() "${i}" on <${t.$tagName$}> is immutable but was modified from within the component.
|
|
23
|
-
More information: https://stenciljs.com/docs/properties#prop-mutability`)}os(this,i,l,t)},configurable:!0,enumerable:!0}):o.lazyLoad&&o.method&&s&1&&r&64&&Object.defineProperty(a,i,{value(...l){let c=M(this);return c.$onInstancePromise$.then(()=>c.$lazyInstance$[i](...l))}})}),o.observeAttribute&&(!o.lazyLoad||s&1)){let i=new Map;a.attributeChangedCallback=function(r,l,c){p.jmp(()=>{let d=i.get(r);if(this.hasOwnProperty(d))c=this[d],delete this[d];else if(a.hasOwnProperty(d)&&typeof this[d]=="number"&&this[d]==c)return;this[d]=c===null&&typeof this[d]=="boolean"?!1:c})},e.observedAttributes=n.filter(([r,l])=>l[0]&15).map(([r,l])=>{let c=l[1]||r;return i.set(c,r),o.reflect&&l[0]&512&&t.$attrsToReflect$.push([r,c]),c})}}return e},qe=async(e,t,s,n,a)=>{if((o.lazyLoad||o.hydrateServerSide||o.style)&&(t.$flags$&32)===0){if(o.lazyLoad||o.hydrateClientSide){if(t.$flags$|=32,a=hs(s,t,n),a.then){let c=Et(`st:load:${s.$tagName$}:${t.$modeName$}`,`[Stencil] Load module for <${s.$tagName$}>`);a=await a,c()}if((o.isDev||o.isDebug)&&!a)throw new Error(`Constructor for "${s.$tagName$}#${t.$modeName$}" was not found`);o.member&&!a.isProxied&&(o.watchCallback&&(s.$watchers$=a.watchers),dt(a,s,2),a.isProxied=!0);let l=C("createInstance",s.$tagName$);o.member&&(t.$flags$|=8);try{new a(t)}catch(c){k(c)}o.member&&(t.$flags$&=-9),o.watchCallback&&(t.$flags$|=128),l(),ut(t.$lazyInstance$)}else a=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128);if(o.style&&a.style){let l=a.style;o.mode&&typeof l!="string"&&(l=l[t.$modeName$=jt(e)],o.hydrateServerSide&&t.$modeName$&&e.setAttribute("s-mode",t.$modeName$));let c=Ve(s,t.$modeName$);if(!Z.has(c)){let d=C("registerStyles",s.$tagName$);!o.hydrateServerSide&&o.shadowDom&&o.shadowDomShim&&s.$flags$&8&&(l=await import("./shadow-css.G7TZ65TM.js").then(u=>u.scopeCss(l,c,!1))),Qt(c,l,!!(s.$flags$&1)),d()}}}let i=t.$ancestorComponent$,r=()=>Se(t,!0);o.asyncLoading&&i&&i["s-rc"]?i["s-rc"].push(r):r()},ut=e=>{o.lazyLoad&&o.connectedCallback&&S(e,"connectedCallback")},as=e=>{if((p.$flags$&1)===0){let t=M(e),s=t.$cmpMeta$,n=C("connectedCallback",s.$tagName$);if(o.hostListenerTargetParent&&pe(e,t,s.$listeners$,!0),t.$flags$&1)pe(e,t,s.$listeners$,!1),ut(t.$lazyInstance$);else{t.$flags$|=1;let a;if(o.hydrateClientSide&&(a=e.getAttribute(de),a)){if(o.shadowDom&&F&&s.$flags$&1){let i=o.mode?$e(e.shadowRoot,s,e.getAttribute("s-mode")):$e(e.shadowRoot,s);e.classList.remove(i+"-h",i+"-s")}Wt(e,s.$tagName$,a,t)}if(o.slotRelocation&&!a&&(o.hydrateServerSide||(o.slot||o.shadowDom)&&s.$flags$&12)&&is(e),o.asyncLoading){let i=e;for(;i=i.parentNode||i.host;)if(o.hydrateClientSide&&i.nodeType===1&&i.hasAttribute("s-id")&&i["s-p"]||i["s-p"]){rt(t,t.$ancestorComponent$=i);break}}o.prop&&!o.hydrateServerSide&&s.$members$&&Object.entries(s.$members$).map(([i,[r]])=>{if(r&31&&e.hasOwnProperty(i)){let l=e[i];delete e[i],e[i]=l}}),o.initializeNextTick?ee(()=>qe(e,t,s)):qe(e,t,s)}n()}},is=e=>{let t=e["s-cr"]=m.createComment(o.isDebug?`content-ref (host=${e.localName})`:"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},rs=e=>{if((p.$flags$&1)===0){let t=M(e),s=o.lazyLoad?t.$lazyInstance$:e;o.hostListener&&t.$rmListeners$&&(t.$rmListeners$.map(n=>n()),t.$rmListeners$=void 0),o.cssVarShim&&p.$cssShim$&&p.$cssShim$.removeHost(e),o.lazyLoad&&o.disconnectedCallback&&S(s,"disconnectedCallback"),o.cmpDidUnload&&S(s,"componentDidUnload")}};var ht=(e,t)=>{let s={$flags$:t[0],$tagName$:t[1]};o.member&&(s.$members$=t[2]),o.hostListener&&(s.$listeners$=t[3]),o.watchCallback&&(s.$watchers$=e.$watchers$),o.reflect&&(s.$attrsToReflect$=[]),o.shadowDom&&!F&&s.$flags$&1&&(s.$flags$|=8);let n=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){us(this,s)},connectedCallback(){as(this),o.connectedCallback&&n&&n.call(this)},disconnectedCallback(){rs(this),o.disconnectedCallback&&a&&a.call(this)},__attachShadow(){F?o.shadowDelegatesFocus?this.attachShadow({mode:"open",delegatesFocus:!!(s.$flags$&16)}):this.attachShadow({mode:"open"}):this.shadowRoot=this}}),e.is=s.$tagName$,dt(e,s,3)};var pe=(e,t,s,n)=>{o.hostListener&&s&&(o.hostListenerTargetParent&&(n?s=s.filter(([a])=>a&32):s=s.filter(([a])=>!(a&32))),s.map(([a,i,r])=>{let l=o.hostListenerTarget?cs(e,a):e,c=ls(t,r),d=ds(a);p.ael(l,i,c,d),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>p.rel(l,i,c,d))}))},ls=(e,t)=>s=>{try{o.lazyLoad?e.$flags$&256?e.$lazyInstance$[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s]):e.$hostElement$[t](s)}catch(n){k(n)}},cs=(e,t)=>o.hostListenerTargetDocument&&t&4?m:o.hostListenerTargetWindow&&t&8?z:o.hostListenerTargetBody&&t&16?m.body:o.hostListenerTargetParent&&t&32?e.parentElement:e,ds=e=>$s?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;var ft=new WeakMap,M=e=>ft.get(e);var us=(e,t)=>{let s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return o.isDev&&(s.$renderCount$=0),o.method&&o.lazyLoad&&(s.$onInstancePromise$=new Promise(n=>s.$onInstanceResolve$=n)),o.asyncLoading&&(s.$onReadyPromise$=new Promise(n=>s.$onReadyResolve$=n),e["s-p"]=[],e["s-rc"]=[]),pe(e,s,t.$listeners$,!1),ft.set(e,s)},Ke=(e,t)=>t in e,k=(e,t)=>(Nt||console.error)(e,t),$t=o.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],J=(...e)=>console.error(...$t,...e),U=(...e)=>console.warn(...$t,...e);var Qe=new Map,hs=(e,t,s)=>{let n=e.$tagName$.replace(/-/g,"_"),a=e.$lazyBundleId$;if(o.isDev&&typeof a!="string"){J(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);return}let i=o.hotModuleReplacement?!1:Qe.get(a);if(i)return i[n];return Mt(`./${a}.entry.js${o.hotModuleReplacement&&s?"?s-hmr="+s:""}`).then(r=>(o.hotModuleReplacement||Qe.set(a,r),r[n]),k)},Z=new Map,fs=[],z=typeof window!="undefined"?window:{},As=o.cssVarShim?z.CSS:null,m=z.document||{head:{}},pt=z.HTMLElement||class{},p={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,n)=>e.addEventListener(t,s,n),rel:(e,t,s,n)=>e.removeEventListener(t,s,n),ce:(e,t)=>new CustomEvent(e,t)};var F=o.shadowDomShim&&o.shadowDom?(m.head.attachShadow+"").indexOf("[native")>-1:!0,$s=(()=>{let e=!1;try{m.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(t){}return e})(),ps=e=>Promise.resolve(e),gs=o.constructableCSS?(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch(e){}return!1})():!1,le=[],T=[],ce=[],ms=(e,t)=>s=>{e.push(s),X||(X=!0,t&&p.$flags$&4?ee(V):p.raf(V))},Xe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){k(s)}e.length=0},Ge=(e,t)=>{let s=0,n=0;for(;s<e.length&&(n=performance.now())<t;)try{e[s++](n)}catch(a){k(a)}s===e.length?e.length=0:s!==0&&e.splice(0,s)},V=()=>{if(o.asyncQueue&&re++,Xe(le),o.asyncQueue){let e=(p.$flags$&6)===2?performance.now()+14*Math.ceil(re*.1):1/0;Ge(T,e),Ge(ce,e),T.length>0&&(ce.push(...T),T.length=0),(X=le.length+T.length+ce.length>0)?p.raf(V):re=0}else Xe(T),(X=le.length>0)&&p.raf(V)},ee=e=>ps().then(e);var ys=ms(T,!0);function te(e,t){let s=new Date(e);return s.setDate(s.getDate()+t),s}function Ds(e,t,s){let n=[],a=we(e),i=a.getDay()===0?7:a.getDay(),r=se(e),l=r.getDay()===0?7:r.getDay(),c=s===1?7:s-1,d=[],u=[];if(t){let g=(7-s+i)%7,v=oe(a);for(;g>0;)d.push(v),v=oe(v),g-=1;d.reverse();let E=(7-l+c)%7,I=W(r);for(;E>0;)u.push(I),I=W(I),E-=1}let h=a;for(;h.getMonth()===e.getMonth();)n.push(h),h=W(h);return[...d,...n,...u]}function we(e){return A(new Date(`${String(St(e)).padStart(4,"0")}-${String(bt(e)).padStart(2,"0")}-01`))}function N(e){if(e instanceof Date)return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function se(e){let t=we(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t}function bt(e){return e.getMonth()+1}function vs(e){return new Array(12).fill(void 0).map((t,s)=>{let n=A(new Date(`2006-${String(s+1).padStart(2,"0")}-01`));return Intl.DateTimeFormat(e,{month:"long"}).format(n)})}function W(e){return te(e,1)}function gt(e){let t=new Date(e);return t.setDate(1),t.setMonth(t.getMonth()+1),t}function mt(e){let t=new Date(e);return t.setFullYear(t.getFullYear()+1),t}function oe(e){return ne(e,1)}function yt(e){let t=new Date(e);return t.setDate(1),t.setMonth(t.getMonth()-1),t}function Dt(e){let t=new Date(e);return t.setFullYear(t.getFullYear()-1),t}function bs(e,t){return new Array(7).fill(void 0).map((s,n)=>(e+n)%7+1).map(s=>{let n=A(new Date(`2006-01-0${s}`));return[Intl.DateTimeFormat(t,{weekday:"short"}).format(n).slice(0,3),Intl.DateTimeFormat(t,{weekday:"long"}).format(n)]})}function St(e){return e.getFullYear()}function vt(e,t){if(!e||!t||!t.from||!t.to)return!1;let s=t.from<t.to?t.from:t.to,n=t.from<t.to?t.to:t.from;return e>=s&&e<=n}function x(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function A(e){let t=new Date(e);return t.setMinutes(t.getMinutes()+t.getTimezoneOffset()),t}function ne(e,t){let s=new Date(e);return s.setDate(s.getDate()-t),s}var Ss=".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}",ws={clearButton:"Clear value",monthSelect:"Select month",nextMonthButton:"Next month",nextYearButton:"Next year",picker:"Choose date",previousMonthButton:"Previous month",previousYearButton:"Previous year",todayButton:"Show today",yearSelect:"Select year"},Cs=ht(class extends pt{constructor(){super(),this.__registerHost(),this.selectDate=De(this,"selectDate",7),this.changeMonth=De(this,"changeMonth",7),this.disabled=!1,this.disableDate=()=>!1,this.elementClassName="wc-datepicker",this.firstDayOfWeek=0,this.labels=ws,this.locale=(navigator==null?void 0:navigator.language)||"en-US",this.showClearButton=!1,this.showMonthStepper=!0,this.showTodayButton=!1,this.showYearStepper=!1,this.startDate=N(new Date),this.maxSearchDays=365,this.goToRangeStartOnSelect=!0,this.init=()=>{this.currentDate=this.startDate?A(new Date(this.startDate)):new Date,this.updateWeekdays()},this.getAvailableDate=(e,t)=>{let s,n=!1;switch(t){case"previousDay":s=oe(e);break;case"nextDay":s=W(e);break;case"previousSameWeekDay":s=ne(e,7);break;case"nextSameWeekDay":s=te(e,7);break;case"firstOfMonth":s=we(e);break;case"lastOfMonth":s=se(e);break;case"previousMonth":s=yt(e);break;case"nextMonth":s=gt(e);break;case"previousYear":s=Dt(e);break;case"nextYear":s=mt(e);break}for(;this.disableDate(s)&&!n;){switch(t){case"previousDay":case"lastOfMonth":s=oe(s);break;case"nextDay":case"firstOfMonth":case"previousMonth":case"nextMonth":case"previousYear":case"nextYear":s=W(s);break;case"previousSameWeekDay":s=ne(s,7);break;case"nextSameWeekDay":s=te(s,7);break}switch(t){case"firstOfMonth":case"lastOfMonth":case"previousYear":case"nextYear":n=s.getMonth()!==e.getMonth();break;case"previousMonth":n=s.getMonth()!==e.getMonth()-1;break;case"nextMonth":n=s.getMonth()!==e.getMonth()+1;break;default:n=!vt(s,{from:ne(e,this.maxSearchDays),to:te(e,this.maxSearchDays)});break}}return n?e:s},this.nextMonth=()=>{this.updateCurrentDate(gt(this.currentDate))},this.nextYear=()=>{this.updateCurrentDate(mt(this.currentDate))},this.previousMonth=()=>{this.updateCurrentDate(yt(this.currentDate))},this.previousYear=()=>{this.updateCurrentDate(Dt(this.currentDate))},this.showToday=()=>{this.updateCurrentDate(new Date)},this.clear=()=>{this.value=void 0,this.selectDate.emit(void 0)},this.onClick=e=>{if(this.disabled)return;let t=e.target.closest("[data-date]");if(!t)return;let s=A(new Date(t.dataset.date));this.updateCurrentDate(s),this.onSelectDate(s)},this.onMonthSelect=e=>{let t=+e.target.value-1,s=this.currentDate.getDate(),n=new Date(this.currentDate.getFullYear(),t,1),a=se(n).getDate(),i=Math.min(s,a),r=new Date(this.currentDate.getFullYear(),t,i);this.updateCurrentDate(r)},this.onYearSelect=e=>{let t=+e.target.value,s=e.target;isNaN(t)?(t=new Date().getFullYear(),s.value=String(t)):t<0?(t=0,s.value=String(t)):t>9999&&(t=9999,s.value=String(t));let n=this.currentDate.getDate(),a=this.currentDate.getMonth(),i=new Date;i.setFullYear(t,a,1);let r=se(i).getDate(),l=Math.min(n,r),c=new Date;c.setFullYear(t,a,l),this.updateCurrentDate(c)},this.onKeyDown=e=>{this.disabled||(e.code==="ArrowLeft"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousDay"),!0)):e.code==="ArrowRight"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextDay"),!0)):e.code==="ArrowUp"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousSameWeekDay"),!0)):e.code==="ArrowDown"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextSameWeekDay"),!0)):e.code==="PageUp"?(e.preventDefault(),e.shiftKey?this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousYear"),!0):this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousMonth"),!0)):e.code==="PageDown"?(e.preventDefault(),e.shiftKey?this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextYear"),!0):this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextMonth"),!0)):e.code==="Home"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"firstOfMonth"),!0)):e.code==="End"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"lastOfMonth"),!0)):(e.code==="Space"||e.code==="Enter")&&(e.preventDefault(),this.onSelectDate(this.currentDate)))},this.onMouseEnter=e=>{if(this.disabled)return;let t=A(new Date(e.target.closest("td").dataset.date));this.hoveredDate=t},this.onMouseLeave=()=>{this.hoveredDate=void 0},this.onFocus=e=>{let t=new Date(e.target.dataset.date);x(t,this.currentDate)||this.updateCurrentDate(t)}}componentWillLoad(){this.init()}watchFirstDayOfWeek(){this.updateWeekdays()}watchLocale(){this.locale||(this.locale=(navigator==null?void 0:navigator.language)||"en-US"),this.updateWeekdays()}watchRange(){this.value=void 0,this.selectDate.emit(void 0)}watchStartDate(){this.currentDate=this.startDate?A(new Date(this.startDate)):new Date}watchValue(){this.value&&(Array.isArray(this.value)?this.currentDate=this.value.length>1&&!this.goToRangeStartOnSelect?this.value[1]:this.value[0]:this.value instanceof Date&&(this.currentDate=this.value))}componentDidRender(){this.moveFocusAfterMonthChanged&&(this.focusDate(this.currentDate),this.moveFocusAfterMonthChanged=!1)}updateWeekdays(){this.weekdays=bs(this.firstDayOfWeek===0?7:this.firstDayOfWeek,this.locale)}getClassName(e){return e?`${this.elementClassName}__${e}`:this.elementClassName}getCalendarRows(){let e=Ds(this.currentDate,!0,this.firstDayOfWeek===0?7:this.firstDayOfWeek),t=[];for(let s=0;s<e.length;s+=7){let n=e.slice(s,s+7);t.push(n)}return t}getTitle(){if(this.value)if(this.isRangeValue(this.value)){let e=Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value[0]),t=this.value[1]?Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value[1]):void 0;return t?`${e} - ${t}`:e}else return Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value)}focusDate(e){var t;(t=this.el.querySelector(`[data-date="${N(e)}"]`))===null||t===void 0||t.focus()}updateCurrentDate(e,t){let s=e.getMonth(),n=e.getFullYear();if(n>9999||n<0)return;(s!==this.currentDate.getMonth()||n!==this.currentDate.getFullYear())&&(this.changeMonth.emit({month:bt(e),year:St(e),day:e.getDate()}),t&&(this.moveFocusAfterMonthChanged=!0)),this.currentDate=e,t&&this.focusDate(this.currentDate)}onSelectDate(e){var t,s;if(!this.disableDate(e))if(this.isRangeValue(this.value)){let n=((t=this.value)===null||t===void 0?void 0:t[0])===void 0||this.value.length===2?[e]:[this.value[0],e];n.length===2&&n[0]>n[1]&&n.reverse();let a=n[1]===void 0?[N(n[0])]:[N(n[0]),N(n[1])];this.value=n,this.selectDate.emit(a)}else{if(((s=this.value)===null||s===void 0?void 0:s.getTime())===e.getTime())return;this.value=e,this.selectDate.emit(N(e))}}isRangeValue(e){return this.range}render(){let e=this.showTodayButton||this.showClearButton;return $(ye,null,$("div",{"aria-disabled":String(this.disabled),"aria-label":this.labels.picker,class:{[this.getClassName()]:!0,[`${this.getClassName()}--disabled`]:this.disabled},role:"group"},$("div",{class:this.getClassName("header")},$("span",{"aria-atomic":"true","aria-live":"polite",class:"visually-hidden"},this.getTitle()),this.showYearStepper&&$("button",{"aria-label":this.labels.previousYearButton,class:this.getClassName("previous-year-button"),disabled:this.disabled,innerHTML:this.previousYearButtonContent||void 0,onClick:this.previousYear,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"11 17 6 12 11 7"}),$("polyline",{points:"18 17 13 12 18 7"}))),this.showMonthStepper&&$("button",{"aria-label":this.labels.previousMonthButton,class:this.getClassName("previous-month-button"),disabled:this.disabled,innerHTML:this.previousMonthButtonContent||void 0,onClick:this.previousMonth,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"15 18 9 12 15 6"}))),$("span",{class:this.getClassName("current-month")},$("select",{title:this.labels.monthSelect,"aria-label":this.labels.monthSelect,class:this.getClassName("month-select"),disabled:this.disabled,name:"month",onChange:this.onMonthSelect},vs(this.locale).map((t,s)=>$("option",{key:t,selected:this.currentDate.getMonth()===s,value:s+1},t))),$("input",{title:this.labels.yearSelect,"aria-label":this.labels.yearSelect,class:this.getClassName("year-select"),disabled:this.disabled,max:9999,maxLength:4,min:1,name:"year",onChange:this.onYearSelect,type:"number",value:this.currentDate.getFullYear()})),this.showMonthStepper&&$("button",{"aria-label":this.labels.nextMonthButton,class:this.getClassName("next-month-button"),disabled:this.disabled,innerHTML:this.nextMonthButtonContent||void 0,onClick:this.nextMonth,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"9 18 15 12 9 6"}))),this.showYearStepper&&$("button",{"aria-label":this.labels.nextYearButton,class:this.getClassName("next-year-button"),disabled:this.disabled,innerHTML:this.nextYearButtonContent||void 0,onClick:this.nextYear,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"13 17 18 12 13 7"}),$("polyline",{points:"6 17 11 12 6 7"})))),$("div",{class:this.getClassName("body")},$("table",{class:this.getClassName("calendar"),onKeyDown:this.onKeyDown,role:"grid"},$("thead",{class:this.getClassName("calendar-header")},$("tr",{class:this.getClassName("weekday-row")},this.weekdays.map(t=>$("th",{"aria-label":t[1],abbr:t[1],class:this.getClassName("weekday"),key:t[0],scope:"col"},$("span",null,t[0]))))),$("tbody",null,this.getCalendarRows().map(t=>{let s=`row-${t[0].getMonth()}-${t[0].getDate()}`;return $("tr",{class:this.getClassName("calendar-row"),key:s},t.map(n=>{var a,i,r,l,c;let d=x(n,this.currentDate),u=n.getMonth()!==this.currentDate.getMonth(),h=Array.isArray(this.value)?x(n,this.value[0])||x(n,this.value[1]):x(n,this.value),f=this.isRangeValue?vt(n,{from:(a=this.value)===null||a===void 0?void 0:a[0],to:((i=this.value)===null||i===void 0?void 0:i[1])||this.hoveredDate||this.currentDate}):!1,g=!((r=this.value)===null||r===void 0)&&r[0]?[(l=this.value)===null||l===void 0?void 0:l[0],((c=this.value)===null||c===void 0?void 0:c[1])||this.hoveredDate].sort((Lt,Tt)=>Lt-Tt):[],v=this.range&&x(g[0],n),L=this.range&&x(g[1],n),E=x(n,new Date),I=this.disableDate(n),Ct=`cell-${n.getMonth()}-${n.getDate()}`,kt={[this.getClassName("date")]:!0,[this.getClassName("date--current")]:d,[this.getClassName("date--disabled")]:I,[this.getClassName("date--overflowing")]:u,[this.getClassName("date--today")]:E,[this.getClassName("date--selected")]:h,[this.getClassName("date--in-range")]:f,[this.getClassName("date--start")]:v,[this.getClassName("date--end")]:L},xt=h?"strong":E?"em":"span";return $("td",{"aria-disabled":String(I),"aria-selected":h?"true":void 0,"aria-current":E?"date":h?"true":void 0,class:kt,"data-date":N(n),key:Ct,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onFocus:this.onFocus,role:"gridcell",tabIndex:x(n,this.currentDate)&&!this.disabled?0:-1},$(xt,{"aria-hidden":"true"},n.getDate()),$("span",{class:"visually-hidden"},Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(n)))}))})))),e&&$("div",{class:this.getClassName("footer")},this.showTodayButton&&$("button",{class:this.getClassName("today-button"),disabled:this.disabled,innerHTML:this.todayButtonContent||void 0,onClick:this.showToday,type:"button"},this.labels.todayButton),this.showClearButton&&$("button",{class:this.getClassName("clear-button"),disabled:this.disabled,innerHTML:this.clearButtonContent||void 0,onClick:this.clear,type:"button"},this.labels.clearButton))))}get el(){return this}static get watchers(){return{firstDayOfWeek:["watchFirstDayOfWeek"],locale:["watchLocale"],range:["watchRange"],startDate:["watchStartDate"],value:["watchValue"]}}static get style(){return Ss}},[2,"wc-datepicker",{clearButtonContent:[1,"clear-button-content"],disabled:[4],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],maxSearchDays:[2,"max-search-days"],goToRangeStartOnSelect:[4,"go-to-range-start-on-select"],currentDate:[32],hoveredDate:[32],weekdays:[32]}]);var wt=Cs;customElements.define("dsa-internal-calendar",wt);var ks=1,D=class extends Me{constructor(){super(...arguments);this.localize=new Ne(this);this.value="";this.startDate=ie(new Date);this.range=!1}firstUpdated(){this.disableDate!==void 0&&(this.calendar.disableDate=this.disableDate),this.updateCalendarValue()}updateCalendarValue(){let s=this.parsedDateValue;this.calendar.value=s.length>1?s:s[0]}get parsedDateValue(){return this.value===""?[]:this.value.split(",").filter(s=>s!=="").map(s=>j(s))}handleDateSelection(s){let{detail:n}=s;if(n===void 0)return;let a=Array.isArray(n)?n.map(i=>j(i)):[j(n)];this.emit("dsa-date-selected",{detail:{dates:a}})}handleMonthSelection(s){let{month:n,year:a}=s.detail;this.emit("dsa-month-year-selected",{detail:{month:n,year:a}})}getLabels(){return{clearButton:this.localize.term("clearButton"),monthSelect:this.localize.term("monthSelect"),nextMonthButton:this.localize.term("nextMonthButton"),nextYearButton:this.localize.term("nextYearButton"),picker:this.localize.term(this.range?"pickerRange":"picker"),previousMonthButton:this.localize.term("previousMonthButton"),previousYearButton:this.localize.term("previousYearButton"),todayButton:this.localize.term("todayButton"),yearSelect:this.localize.term("yearSelect")}}handleDisableDateChange(){this.disableDate!==void 0&&(this.calendar.disableDate=this.disableDate)}handleValueChange(){if(this.value===""){this.calendar.value=void 0;return}this.updateCalendarValue()}render(){return ke`
|
|
23
|
+
More information: https://stenciljs.com/docs/properties#prop-mutability`)}os(this,i,l,t)},configurable:!0,enumerable:!0}):o.lazyLoad&&o.method&&s&1&&r&64&&Object.defineProperty(a,i,{value(...l){let c=M(this);return c.$onInstancePromise$.then(()=>c.$lazyInstance$[i](...l))}})}),o.observeAttribute&&(!o.lazyLoad||s&1)){let i=new Map;a.attributeChangedCallback=function(r,l,c){p.jmp(()=>{let d=i.get(r);if(this.hasOwnProperty(d))c=this[d],delete this[d];else if(a.hasOwnProperty(d)&&typeof this[d]=="number"&&this[d]==c)return;this[d]=c===null&&typeof this[d]=="boolean"?!1:c})},e.observedAttributes=n.filter(([r,l])=>l[0]&15).map(([r,l])=>{let c=l[1]||r;return i.set(c,r),o.reflect&&l[0]&512&&t.$attrsToReflect$.push([r,c]),c})}}return e},qe=async(e,t,s,n,a)=>{if((o.lazyLoad||o.hydrateServerSide||o.style)&&(t.$flags$&32)===0){if(o.lazyLoad||o.hydrateClientSide){if(t.$flags$|=32,a=hs(s,t,n),a.then){let c=Et(`st:load:${s.$tagName$}:${t.$modeName$}`,`[Stencil] Load module for <${s.$tagName$}>`);a=await a,c()}if((o.isDev||o.isDebug)&&!a)throw new Error(`Constructor for "${s.$tagName$}#${t.$modeName$}" was not found`);o.member&&!a.isProxied&&(o.watchCallback&&(s.$watchers$=a.watchers),dt(a,s,2),a.isProxied=!0);let l=C("createInstance",s.$tagName$);o.member&&(t.$flags$|=8);try{new a(t)}catch(c){k(c)}o.member&&(t.$flags$&=-9),o.watchCallback&&(t.$flags$|=128),l(),ut(t.$lazyInstance$)}else a=e.constructor,t.$flags$|=32,customElements.whenDefined(s.$tagName$).then(()=>t.$flags$|=128);if(o.style&&a.style){let l=a.style;o.mode&&typeof l!="string"&&(l=l[t.$modeName$=jt(e)],o.hydrateServerSide&&t.$modeName$&&e.setAttribute("s-mode",t.$modeName$));let c=Ve(s,t.$modeName$);if(!Z.has(c)){let d=C("registerStyles",s.$tagName$);!o.hydrateServerSide&&o.shadowDom&&o.shadowDomShim&&s.$flags$&8&&(l=await import("./shadow-css.G7TZ65TM.js").then(u=>u.scopeCss(l,c,!1))),Qt(c,l,!!(s.$flags$&1)),d()}}}let i=t.$ancestorComponent$,r=()=>Se(t,!0);o.asyncLoading&&i&&i["s-rc"]?i["s-rc"].push(r):r()},ut=e=>{o.lazyLoad&&o.connectedCallback&&S(e,"connectedCallback")},as=e=>{if((p.$flags$&1)===0){let t=M(e),s=t.$cmpMeta$,n=C("connectedCallback",s.$tagName$);if(o.hostListenerTargetParent&&pe(e,t,s.$listeners$,!0),t.$flags$&1)pe(e,t,s.$listeners$,!1),ut(t.$lazyInstance$);else{t.$flags$|=1;let a;if(o.hydrateClientSide&&(a=e.getAttribute(de),a)){if(o.shadowDom&&F&&s.$flags$&1){let i=o.mode?$e(e.shadowRoot,s,e.getAttribute("s-mode")):$e(e.shadowRoot,s);e.classList.remove(i+"-h",i+"-s")}Wt(e,s.$tagName$,a,t)}if(o.slotRelocation&&!a&&(o.hydrateServerSide||(o.slot||o.shadowDom)&&s.$flags$&12)&&is(e),o.asyncLoading){let i=e;for(;i=i.parentNode||i.host;)if(o.hydrateClientSide&&i.nodeType===1&&i.hasAttribute("s-id")&&i["s-p"]||i["s-p"]){rt(t,t.$ancestorComponent$=i);break}}o.prop&&!o.hydrateServerSide&&s.$members$&&Object.entries(s.$members$).map(([i,[r]])=>{if(r&31&&e.hasOwnProperty(i)){let l=e[i];delete e[i],e[i]=l}}),o.initializeNextTick?ee(()=>qe(e,t,s)):qe(e,t,s)}n()}},is=e=>{let t=e["s-cr"]=m.createComment(o.isDebug?`content-ref (host=${e.localName})`:"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},rs=e=>{if((p.$flags$&1)===0){let t=M(e),s=o.lazyLoad?t.$lazyInstance$:e;o.hostListener&&t.$rmListeners$&&(t.$rmListeners$.map(n=>n()),t.$rmListeners$=void 0),o.cssVarShim&&p.$cssShim$&&p.$cssShim$.removeHost(e),o.lazyLoad&&o.disconnectedCallback&&S(s,"disconnectedCallback"),o.cmpDidUnload&&S(s,"componentDidUnload")}};var ht=(e,t)=>{let s={$flags$:t[0],$tagName$:t[1]};o.member&&(s.$members$=t[2]),o.hostListener&&(s.$listeners$=t[3]),o.watchCallback&&(s.$watchers$=e.$watchers$),o.reflect&&(s.$attrsToReflect$=[]),o.shadowDom&&!F&&s.$flags$&1&&(s.$flags$|=8);let n=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){us(this,s)},connectedCallback(){as(this),o.connectedCallback&&n&&n.call(this)},disconnectedCallback(){rs(this),o.disconnectedCallback&&a&&a.call(this)},__attachShadow(){F?o.shadowDelegatesFocus?this.attachShadow({mode:"open",delegatesFocus:!!(s.$flags$&16)}):this.attachShadow({mode:"open"}):this.shadowRoot=this}}),e.is=s.$tagName$,dt(e,s,3)};var pe=(e,t,s,n)=>{o.hostListener&&s&&(o.hostListenerTargetParent&&(n?s=s.filter(([a])=>a&32):s=s.filter(([a])=>!(a&32))),s.map(([a,i,r])=>{let l=o.hostListenerTarget?cs(e,a):e,c=ls(t,r),d=ds(a);p.ael(l,i,c,d),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>p.rel(l,i,c,d))}))},ls=(e,t)=>s=>{try{o.lazyLoad?e.$flags$&256?e.$lazyInstance$[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s]):e.$hostElement$[t](s)}catch(n){k(n)}},cs=(e,t)=>o.hostListenerTargetDocument&&t&4?m:o.hostListenerTargetWindow&&t&8?Y:o.hostListenerTargetBody&&t&16?m.body:o.hostListenerTargetParent&&t&32?e.parentElement:e,ds=e=>$s?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;var ft=new WeakMap,M=e=>ft.get(e);var us=(e,t)=>{let s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return o.isDev&&(s.$renderCount$=0),o.method&&o.lazyLoad&&(s.$onInstancePromise$=new Promise(n=>s.$onInstanceResolve$=n)),o.asyncLoading&&(s.$onReadyPromise$=new Promise(n=>s.$onReadyResolve$=n),e["s-p"]=[],e["s-rc"]=[]),pe(e,s,t.$listeners$,!1),ft.set(e,s)},Ke=(e,t)=>t in e,k=(e,t)=>(Nt||console.error)(e,t),$t=o.isTesting?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],J=(...e)=>console.error(...$t,...e),U=(...e)=>console.warn(...$t,...e);var Qe=new Map,hs=(e,t,s)=>{let n=e.$tagName$.replace(/-/g,"_"),a=e.$lazyBundleId$;if(o.isDev&&typeof a!="string"){J(`Trying to lazily load component <${e.$tagName$}> with style mode "${t.$modeName$}", but it does not exist.`);return}let i=o.hotModuleReplacement?!1:Qe.get(a);if(i)return i[n];return Mt(`./${a}.entry.js${o.hotModuleReplacement&&s?"?s-hmr="+s:""}`).then(r=>(o.hotModuleReplacement||Qe.set(a,r),r[n]),k)},Z=new Map,fs=[],Y=typeof window!="undefined"?window:{},As=o.cssVarShim?Y.CSS:null,m=Y.document||{head:{}},pt=Y.HTMLElement||class{},p={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,n)=>e.addEventListener(t,s,n),rel:(e,t,s,n)=>e.removeEventListener(t,s,n),ce:(e,t)=>new CustomEvent(e,t)};var F=o.shadowDomShim&&o.shadowDom?(m.head.attachShadow+"").indexOf("[native")>-1:!0,$s=(()=>{let e=!1;try{m.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(t){}return e})(),ps=e=>Promise.resolve(e),gs=o.constructableCSS?(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch(e){}return!1})():!1,le=[],T=[],ce=[],ms=(e,t)=>s=>{e.push(s),X||(X=!0,t&&p.$flags$&4?ee(V):p.raf(V))},Xe=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){k(s)}e.length=0},Ge=(e,t)=>{let s=0,n=0;for(;s<e.length&&(n=performance.now())<t;)try{e[s++](n)}catch(a){k(a)}s===e.length?e.length=0:s!==0&&e.splice(0,s)},V=()=>{if(o.asyncQueue&&re++,Xe(le),o.asyncQueue){let e=(p.$flags$&6)===2?performance.now()+14*Math.ceil(re*.1):1/0;Ge(T,e),Ge(ce,e),T.length>0&&(ce.push(...T),T.length=0),(X=le.length+T.length+ce.length>0)?p.raf(V):re=0}else Xe(T),(X=le.length>0)&&p.raf(V)},ee=e=>ps().then(e);var ys=ms(T,!0);function te(e,t){let s=new Date(e);return s.setDate(s.getDate()+t),s}function vs(e,t,s){let n=[],a=we(e),i=a.getDay()===0?7:a.getDay(),r=se(e),l=r.getDay()===0?7:r.getDay(),c=s===1?7:s-1,d=[],u=[];if(t){let g=(7-s+i)%7,D=oe(a);for(;g>0;)d.push(D),D=oe(D),g-=1;d.reverse();let E=(7-l+c)%7,I=W(r);for(;E>0;)u.push(I),I=W(I),E-=1}let h=a;for(;h.getMonth()===e.getMonth();)n.push(h),h=W(h);return[...d,...n,...u]}function we(e){return A(new Date(`${String(St(e)).padStart(4,"0")}-${String(bt(e)).padStart(2,"0")}-01`))}function N(e){if(e instanceof Date)return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function se(e){let t=we(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t}function bt(e){return e.getMonth()+1}function Ds(e){return new Array(12).fill(void 0).map((t,s)=>{let n=A(new Date(`2006-${String(s+1).padStart(2,"0")}-01`));return Intl.DateTimeFormat(e,{month:"long"}).format(n)})}function W(e){return te(e,1)}function gt(e){let t=new Date(e);return t.setDate(1),t.setMonth(t.getMonth()+1),t}function mt(e){let t=new Date(e);return t.setFullYear(t.getFullYear()+1),t}function oe(e){return ne(e,1)}function yt(e){let t=new Date(e);return t.setDate(1),t.setMonth(t.getMonth()-1),t}function vt(e){let t=new Date(e);return t.setFullYear(t.getFullYear()-1),t}function bs(e,t){return new Array(7).fill(void 0).map((s,n)=>(e+n)%7+1).map(s=>{let n=A(new Date(`2006-01-0${s}`));return[Intl.DateTimeFormat(t,{weekday:"short"}).format(n).slice(0,3),Intl.DateTimeFormat(t,{weekday:"long"}).format(n)]})}function St(e){return e.getFullYear()}function Dt(e,t){if(!e||!t||!t.from||!t.to)return!1;let s=t.from<t.to?t.from:t.to,n=t.from<t.to?t.to:t.from;return e>=s&&e<=n}function x(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function A(e){let t=new Date(e);return t.setMinutes(t.getMinutes()+t.getTimezoneOffset()),t}function ne(e,t){let s=new Date(e);return s.setDate(s.getDate()-t),s}var Ss=".visually-hidden.sc-wc-datepicker{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%)}",ws={clearButton:"Clear value",monthSelect:"Select month",nextMonthButton:"Next month",nextYearButton:"Next year",picker:"Choose date",previousMonthButton:"Previous month",previousYearButton:"Previous year",todayButton:"Show today",yearSelect:"Select year"},Cs=ht(class extends pt{constructor(){super(),this.__registerHost(),this.selectDate=ve(this,"selectDate",7),this.changeMonth=ve(this,"changeMonth",7),this.disabled=!1,this.disableDate=()=>!1,this.elementClassName="wc-datepicker",this.firstDayOfWeek=0,this.labels=ws,this.locale=(navigator==null?void 0:navigator.language)||"en-US",this.showClearButton=!1,this.showMonthStepper=!0,this.showTodayButton=!1,this.showYearStepper=!1,this.startDate=N(new Date),this.maxSearchDays=365,this.goToRangeStartOnSelect=!0,this.init=()=>{this.currentDate=this.startDate?A(new Date(this.startDate)):new Date,this.updateWeekdays()},this.getAvailableDate=(e,t)=>{let s,n=!1;switch(t){case"previousDay":s=oe(e);break;case"nextDay":s=W(e);break;case"previousSameWeekDay":s=ne(e,7);break;case"nextSameWeekDay":s=te(e,7);break;case"firstOfMonth":s=we(e);break;case"lastOfMonth":s=se(e);break;case"previousMonth":s=yt(e);break;case"nextMonth":s=gt(e);break;case"previousYear":s=vt(e);break;case"nextYear":s=mt(e);break}for(;this.disableDate(s)&&!n;){switch(t){case"previousDay":case"lastOfMonth":s=oe(s);break;case"nextDay":case"firstOfMonth":case"previousMonth":case"nextMonth":case"previousYear":case"nextYear":s=W(s);break;case"previousSameWeekDay":s=ne(s,7);break;case"nextSameWeekDay":s=te(s,7);break}switch(t){case"firstOfMonth":case"lastOfMonth":case"previousYear":case"nextYear":n=s.getMonth()!==e.getMonth();break;case"previousMonth":n=s.getMonth()!==e.getMonth()-1;break;case"nextMonth":n=s.getMonth()!==e.getMonth()+1;break;default:n=!Dt(s,{from:ne(e,this.maxSearchDays),to:te(e,this.maxSearchDays)});break}}return n?e:s},this.nextMonth=()=>{this.updateCurrentDate(gt(this.currentDate))},this.nextYear=()=>{this.updateCurrentDate(mt(this.currentDate))},this.previousMonth=()=>{this.updateCurrentDate(yt(this.currentDate))},this.previousYear=()=>{this.updateCurrentDate(vt(this.currentDate))},this.showToday=()=>{this.updateCurrentDate(new Date)},this.clear=()=>{this.value=void 0,this.selectDate.emit(void 0)},this.onClick=e=>{if(this.disabled)return;let t=e.target.closest("[data-date]");if(!t)return;let s=A(new Date(t.dataset.date));this.updateCurrentDate(s),this.onSelectDate(s)},this.onMonthSelect=e=>{let t=+e.target.value-1,s=this.currentDate.getDate(),n=new Date(this.currentDate.getFullYear(),t,1),a=se(n).getDate(),i=Math.min(s,a),r=new Date(this.currentDate.getFullYear(),t,i);this.updateCurrentDate(r)},this.onYearSelect=e=>{let t=+e.target.value,s=e.target;isNaN(t)?(t=new Date().getFullYear(),s.value=String(t)):t<0?(t=0,s.value=String(t)):t>9999&&(t=9999,s.value=String(t));let n=this.currentDate.getDate(),a=this.currentDate.getMonth(),i=new Date;i.setFullYear(t,a,1);let r=se(i).getDate(),l=Math.min(n,r),c=new Date;c.setFullYear(t,a,l),this.updateCurrentDate(c)},this.onKeyDown=e=>{this.disabled||(e.code==="ArrowLeft"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousDay"),!0)):e.code==="ArrowRight"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextDay"),!0)):e.code==="ArrowUp"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousSameWeekDay"),!0)):e.code==="ArrowDown"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextSameWeekDay"),!0)):e.code==="PageUp"?(e.preventDefault(),e.shiftKey?this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousYear"),!0):this.updateCurrentDate(this.getAvailableDate(this.currentDate,"previousMonth"),!0)):e.code==="PageDown"?(e.preventDefault(),e.shiftKey?this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextYear"),!0):this.updateCurrentDate(this.getAvailableDate(this.currentDate,"nextMonth"),!0)):e.code==="Home"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"firstOfMonth"),!0)):e.code==="End"?(e.preventDefault(),this.updateCurrentDate(this.getAvailableDate(this.currentDate,"lastOfMonth"),!0)):(e.code==="Space"||e.code==="Enter")&&(e.preventDefault(),this.onSelectDate(this.currentDate)))},this.onMouseEnter=e=>{if(this.disabled)return;let t=A(new Date(e.target.closest("td").dataset.date));this.hoveredDate=t},this.onMouseLeave=()=>{this.hoveredDate=void 0},this.onFocus=e=>{let t=new Date(e.target.dataset.date);x(t,this.currentDate)||this.updateCurrentDate(t)}}componentWillLoad(){this.init()}watchFirstDayOfWeek(){this.updateWeekdays()}watchLocale(){this.locale||(this.locale=(navigator==null?void 0:navigator.language)||"en-US"),this.updateWeekdays()}watchRange(){this.value=void 0,this.selectDate.emit(void 0)}watchStartDate(){this.currentDate=this.startDate?A(new Date(this.startDate)):new Date}watchValue(){this.value&&(Array.isArray(this.value)?this.currentDate=this.value.length>1&&!this.goToRangeStartOnSelect?this.value[1]:this.value[0]:this.value instanceof Date&&(this.currentDate=this.value))}componentDidRender(){this.moveFocusAfterMonthChanged&&(this.focusDate(this.currentDate),this.moveFocusAfterMonthChanged=!1)}updateWeekdays(){this.weekdays=bs(this.firstDayOfWeek===0?7:this.firstDayOfWeek,this.locale)}getClassName(e){return e?`${this.elementClassName}__${e}`:this.elementClassName}getCalendarRows(){let e=vs(this.currentDate,!0,this.firstDayOfWeek===0?7:this.firstDayOfWeek),t=[];for(let s=0;s<e.length;s+=7){let n=e.slice(s,s+7);t.push(n)}return t}getTitle(){if(this.value)if(this.isRangeValue(this.value)){let e=Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value[0]),t=this.value[1]?Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value[1]):void 0;return t?`${e} - ${t}`:e}else return Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(this.value)}focusDate(e){var t;(t=this.el.querySelector(`[data-date="${N(e)}"]`))===null||t===void 0||t.focus()}updateCurrentDate(e,t){let s=e.getMonth(),n=e.getFullYear();if(n>9999||n<0)return;(s!==this.currentDate.getMonth()||n!==this.currentDate.getFullYear())&&(this.changeMonth.emit({month:bt(e),year:St(e),day:e.getDate()}),t&&(this.moveFocusAfterMonthChanged=!0)),this.currentDate=e,t&&this.focusDate(this.currentDate)}onSelectDate(e){var t,s;if(!this.disableDate(e))if(this.isRangeValue(this.value)){let n=((t=this.value)===null||t===void 0?void 0:t[0])===void 0||this.value.length===2?[e]:[this.value[0],e];n.length===2&&n[0]>n[1]&&n.reverse();let a=n[1]===void 0?[N(n[0])]:[N(n[0]),N(n[1])];this.value=n,this.selectDate.emit(a)}else{if(((s=this.value)===null||s===void 0?void 0:s.getTime())===e.getTime())return;this.value=e,this.selectDate.emit(N(e))}}isRangeValue(e){return this.range}render(){let e=this.showTodayButton||this.showClearButton;return $(ye,null,$("div",{"aria-disabled":String(this.disabled),"aria-label":this.labels.picker,class:{[this.getClassName()]:!0,[`${this.getClassName()}--disabled`]:this.disabled},role:"group"},$("div",{class:this.getClassName("header")},$("span",{"aria-atomic":"true","aria-live":"polite",class:"visually-hidden"},this.getTitle()),this.showYearStepper&&$("button",{"aria-label":this.labels.previousYearButton,class:this.getClassName("previous-year-button"),disabled:this.disabled,innerHTML:this.previousYearButtonContent||void 0,onClick:this.previousYear,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"11 17 6 12 11 7"}),$("polyline",{points:"18 17 13 12 18 7"}))),this.showMonthStepper&&$("button",{"aria-label":this.labels.previousMonthButton,class:this.getClassName("previous-month-button"),disabled:this.disabled,innerHTML:this.previousMonthButtonContent||void 0,onClick:this.previousMonth,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"15 18 9 12 15 6"}))),$("span",{class:this.getClassName("current-month")},$("select",{title:this.labels.monthSelect,"aria-label":this.labels.monthSelect,class:this.getClassName("month-select"),disabled:this.disabled,name:"month",onChange:this.onMonthSelect},Ds(this.locale).map((t,s)=>$("option",{key:t,selected:this.currentDate.getMonth()===s,value:s+1},t))),$("input",{title:this.labels.yearSelect,"aria-label":this.labels.yearSelect,class:this.getClassName("year-select"),disabled:this.disabled,max:9999,maxLength:4,min:1,name:"year",onChange:this.onYearSelect,type:"number",value:this.currentDate.getFullYear()})),this.showMonthStepper&&$("button",{"aria-label":this.labels.nextMonthButton,class:this.getClassName("next-month-button"),disabled:this.disabled,innerHTML:this.nextMonthButtonContent||void 0,onClick:this.nextMonth,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"9 18 15 12 9 6"}))),this.showYearStepper&&$("button",{"aria-label":this.labels.nextYearButton,class:this.getClassName("next-year-button"),disabled:this.disabled,innerHTML:this.nextYearButtonContent||void 0,onClick:this.nextYear,type:"button"},$("svg",{fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},$("polyline",{points:"13 17 18 12 13 7"}),$("polyline",{points:"6 17 11 12 6 7"})))),$("div",{class:this.getClassName("body")},$("table",{class:this.getClassName("calendar"),onKeyDown:this.onKeyDown,role:"grid"},$("thead",{class:this.getClassName("calendar-header")},$("tr",{class:this.getClassName("weekday-row")},this.weekdays.map(t=>$("th",{"aria-label":t[1],abbr:t[1],class:this.getClassName("weekday"),key:t[0],scope:"col"},$("span",null,t[0]))))),$("tbody",null,this.getCalendarRows().map(t=>{let s=`row-${t[0].getMonth()}-${t[0].getDate()}`;return $("tr",{class:this.getClassName("calendar-row"),key:s},t.map(n=>{var a,i,r,l,c;let d=x(n,this.currentDate),u=n.getMonth()!==this.currentDate.getMonth(),h=Array.isArray(this.value)?x(n,this.value[0])||x(n,this.value[1]):x(n,this.value),f=this.isRangeValue?Dt(n,{from:(a=this.value)===null||a===void 0?void 0:a[0],to:((i=this.value)===null||i===void 0?void 0:i[1])||this.hoveredDate||this.currentDate}):!1,g=!((r=this.value)===null||r===void 0)&&r[0]?[(l=this.value)===null||l===void 0?void 0:l[0],((c=this.value)===null||c===void 0?void 0:c[1])||this.hoveredDate].sort((Lt,Tt)=>Lt-Tt):[],D=this.range&&x(g[0],n),L=this.range&&x(g[1],n),E=x(n,new Date),I=this.disableDate(n),Ct=`cell-${n.getMonth()}-${n.getDate()}`,kt={[this.getClassName("date")]:!0,[this.getClassName("date--current")]:d,[this.getClassName("date--disabled")]:I,[this.getClassName("date--overflowing")]:u,[this.getClassName("date--today")]:E,[this.getClassName("date--selected")]:h,[this.getClassName("date--in-range")]:f,[this.getClassName("date--start")]:D,[this.getClassName("date--end")]:L},xt=h?"strong":E?"em":"span";return $("td",{"aria-disabled":String(I),"aria-selected":h?"true":void 0,"aria-current":E?"date":h?"true":void 0,class:kt,"data-date":N(n),key:Ct,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onFocus:this.onFocus,role:"gridcell",tabIndex:x(n,this.currentDate)&&!this.disabled?0:-1},$(xt,{"aria-hidden":"true"},n.getDate()),$("span",{class:"visually-hidden"},Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(n)))}))})))),e&&$("div",{class:this.getClassName("footer")},this.showTodayButton&&$("button",{class:this.getClassName("today-button"),disabled:this.disabled,innerHTML:this.todayButtonContent||void 0,onClick:this.showToday,type:"button"},this.labels.todayButton),this.showClearButton&&$("button",{class:this.getClassName("clear-button"),disabled:this.disabled,innerHTML:this.clearButtonContent||void 0,onClick:this.clear,type:"button"},this.labels.clearButton))))}get el(){return this}static get watchers(){return{firstDayOfWeek:["watchFirstDayOfWeek"],locale:["watchLocale"],range:["watchRange"],startDate:["watchStartDate"],value:["watchValue"]}}static get style(){return Ss}},[2,"wc-datepicker",{clearButtonContent:[1,"clear-button-content"],disabled:[4],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],maxSearchDays:[2,"max-search-days"],goToRangeStartOnSelect:[4,"go-to-range-start-on-select"],currentDate:[32],hoveredDate:[32],weekdays:[32]}]);var wt=Cs;customElements.define("dsa-internal-calendar",wt);var ks=1,v=class extends Me{constructor(){super(...arguments);this.localize=new Ne(this);this.value="";this.startDate=ie(new Date);this.range=!1}firstUpdated(){let{disableDate:s,calendar:n}=this;s!==void 0&&(n.disableDate=s),this.updateCalendarValue()}updateCalendarValue(){let s=this.parsedDateValue;this.calendar.value=s.length>1?s:s[0]}get parsedDateValue(){return this.value===""?[]:this.value.split(",").filter(s=>s!=="").map(s=>j(s))}handleDateSelection(s){let{detail:n}=s;if(n===void 0)return;let a=Array.isArray(n)?n.map(i=>j(i)):[j(n)];this.emit("dsa-date-selected",{detail:{dates:a}})}handleMonthSelection(s){let{month:n,year:a}=s.detail;this.emit("dsa-month-year-selected",{detail:{month:n,year:a}})}getLabels(){let{localize:s,range:n}=this;return{clearButton:s.term("clearButton"),monthSelect:s.term("monthSelect"),nextMonthButton:s.term("nextMonthButton"),nextYearButton:s.term("nextYearButton"),picker:s.term(n?"pickerRange":"picker"),previousMonthButton:s.term("previousMonthButton"),previousYearButton:s.term("previousYearButton"),todayButton:s.term("todayButton"),yearSelect:s.term("yearSelect")}}handleDisableDateChange(){let{disableDate:s,calendar:n}=this;s!==void 0&&(n.disableDate=s)}handleValueChange(){let{value:s,calendar:n}=this;if(s===""){n.value=void 0;return}this.updateCalendarValue()}render(){let{value:s,startDate:n,range:a,localize:i}=this;return ke`
|
|
24
24
|
<dsa-internal-calendar
|
|
25
25
|
class="calendar"
|
|
26
|
-
?range=${Te(
|
|
26
|
+
?range=${Te(a)}
|
|
27
27
|
@selectDate=${this.handleDateSelection}
|
|
28
28
|
@changeMonth=${this.handleMonthSelection}
|
|
29
|
-
start-date=${
|
|
30
|
-
locale=${
|
|
29
|
+
start-date=${s===""?n:ie(this.parsedDateValue[0])}
|
|
30
|
+
locale=${i.lang()}
|
|
31
31
|
.labels=${this.getLabels()}
|
|
32
32
|
first-day-of-week=${ks}
|
|
33
33
|
></dsa-internal-calendar>
|
|
34
|
-
`}};
|
|
34
|
+
`}};v.styles=Ae,w([Le(".calendar")],v.prototype,"calendar",2),w([z()],v.prototype,"value",2),w([z({attribute:"start-date"})],v.prototype,"startDate",2),w([z({type:Boolean,reflect:!0})],v.prototype,"range",2),w([z({type:Function,attribute:!1})],v.prototype,"disableDate",2),w([ae("disableDate",{waitUntilFirstUpdate:!0})],v.prototype,"handleDisableDateChange",1),w([ae("value",{waitUntilFirstUpdate:!0})],v.prototype,"handleValueChange",1),v=w([xe("dsa-calendar")],v);export{v as a};
|
|
35
35
|
/*! Bundled license information:
|
|
36
36
|
|
|
37
37
|
@stencil/core/internal/client/index.js:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk.
|
|
1
|
+
import{a as s}from"./chunk.NVJC2QTS.js";import{a as d}from"./chunk.HYHQBG6T.js";import{a as i}from"./chunk.BWEPOOQP.js";import{a as r}from"./chunk.KBZ32KWP.js";import{f as t}from"./chunk.IZ2HVRME.js";var e=class extends d{constructor(){super(...arguments);this.type="radio"}handleClick(){this.disabled||this.readonly||this.parentDisabled||this.parentReadonly||this.checked||(this.checked=!0)}handleDisabledChange(){let a=this.parentElement;a instanceof s&&a.updateTabIndexes()}};t([i(["disabled","readonly"],{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e=t([r("dsa-radio-card")],e);export{e as a};
|