@tylertech/forge 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -13
- package/dist/esm/accordion/index.js +39 -0
- package/dist/esm/accordion/index.js.map +7 -0
- package/dist/esm/app-bar/help-button/index.js +58 -0
- package/dist/esm/app-bar/help-button/index.js.map +7 -0
- package/dist/esm/app-bar/index.js +136 -0
- package/dist/esm/app-bar/index.js.map +7 -0
- package/dist/esm/app-bar/menu-button/index.js +41 -0
- package/dist/esm/app-bar/menu-button/index.js.map +7 -0
- package/dist/esm/app-bar/notification-button/index.js +46 -0
- package/dist/esm/app-bar/notification-button/index.js.map +7 -0
- package/dist/esm/app-bar/profile-button/index.js +51 -0
- package/dist/esm/app-bar/profile-button/index.js.map +7 -0
- package/dist/esm/app-bar/search/index.js +43 -0
- package/dist/esm/app-bar/search/index.js.map +7 -0
- package/dist/esm/autocomplete/index.js +77 -0
- package/dist/esm/autocomplete/index.js.map +7 -0
- package/dist/esm/avatar/index.js +33 -0
- package/dist/esm/avatar/index.js.map +7 -0
- package/dist/esm/backdrop/index.js +28 -0
- package/dist/esm/backdrop/index.js.map +7 -0
- package/dist/esm/badge/index.js +31 -0
- package/dist/esm/badge/index.js.map +7 -0
- package/dist/esm/banner/index.js +45 -0
- package/dist/esm/banner/index.js.map +7 -0
- package/dist/esm/bottom-sheet/index.js +45 -0
- package/dist/esm/bottom-sheet/index.js.map +7 -0
- package/dist/esm/busy-indicator/index.js +37 -0
- package/dist/esm/busy-indicator/index.js.map +7 -0
- package/dist/esm/button/index.js +29 -0
- package/dist/esm/button/index.js.map +7 -0
- package/dist/esm/button-toggle/button-toggle/index.js +33 -0
- package/dist/esm/button-toggle/button-toggle/index.js.map +7 -0
- package/dist/esm/button-toggle/button-toggle-group/index.js +32 -0
- package/dist/esm/button-toggle/button-toggle-group/index.js.map +7 -0
- package/dist/esm/button-toggle/index.js +46 -0
- package/dist/esm/button-toggle/index.js.map +7 -0
- package/dist/esm/calendar/calendar-dropdown/index.js +35 -0
- package/dist/esm/calendar/calendar-dropdown/index.js.map +7 -0
- package/dist/esm/calendar/calendar-menu/index.js +48 -0
- package/dist/esm/calendar/calendar-menu/index.js.map +7 -0
- package/dist/esm/calendar/core/index.js +13 -0
- package/dist/esm/calendar/core/index.js.map +7 -0
- package/dist/esm/calendar/index.js +199 -0
- package/dist/esm/calendar/index.js.map +7 -0
- package/dist/esm/card/index.js +22 -0
- package/dist/esm/card/index.js.map +7 -0
- package/dist/esm/checkbox/index.js +44 -0
- package/dist/esm/checkbox/index.js.map +7 -0
- package/dist/esm/chip-field/index.js +51 -0
- package/dist/esm/chip-field/index.js.map +7 -0
- package/dist/esm/chips/chip/index.js +42 -0
- package/dist/esm/chips/chip/index.js.map +7 -0
- package/dist/esm/chips/chip-set/index.js +42 -0
- package/dist/esm/chips/chip-set/index.js.map +7 -0
- package/dist/esm/chips/index.js +55 -0
- package/dist/esm/chips/index.js.map +7 -0
- package/dist/esm/chunks/chunk.2F6PST3N.js +476 -0
- package/dist/esm/chunks/chunk.2F6PST3N.js.map +7 -0
- package/dist/esm/chunks/chunk.2FXYTBYG.js +1450 -0
- package/dist/esm/chunks/chunk.2FXYTBYG.js.map +7 -0
- package/dist/esm/chunks/chunk.2LQMHAC7.js +187 -0
- package/dist/esm/chunks/chunk.2LQMHAC7.js.map +7 -0
- package/dist/esm/chunks/chunk.2LSEVYAC.js +342 -0
- package/dist/esm/chunks/chunk.2LSEVYAC.js.map +7 -0
- package/dist/esm/chunks/chunk.2NUAEZY7.js +221 -0
- package/dist/esm/chunks/chunk.2NUAEZY7.js.map +7 -0
- package/dist/esm/chunks/chunk.35U3UPDV.js +70 -0
- package/dist/esm/chunks/chunk.35U3UPDV.js.map +7 -0
- package/dist/esm/chunks/chunk.3KCCCXWS.js +344 -0
- package/dist/esm/chunks/chunk.3KCCCXWS.js.map +7 -0
- package/dist/esm/chunks/chunk.3NOZRZ7R.js +145 -0
- package/dist/esm/chunks/chunk.3NOZRZ7R.js.map +7 -0
- package/dist/esm/chunks/chunk.3ZKORL4I.js +212 -0
- package/dist/esm/chunks/chunk.3ZKORL4I.js.map +7 -0
- package/dist/esm/chunks/chunk.4BG22DGY.js +317 -0
- package/dist/esm/chunks/chunk.4BG22DGY.js.map +7 -0
- package/dist/esm/chunks/chunk.4HQ5VELO.js +793 -0
- package/dist/esm/chunks/chunk.4HQ5VELO.js.map +7 -0
- package/dist/esm/chunks/chunk.4JURZYE4.js +410 -0
- package/dist/esm/chunks/chunk.4JURZYE4.js.map +7 -0
- package/dist/esm/chunks/chunk.4UKSUUTX.js +296 -0
- package/dist/esm/chunks/chunk.4UKSUUTX.js.map +7 -0
- package/dist/esm/chunks/chunk.4V5O2CPU.js +417 -0
- package/dist/esm/chunks/chunk.4V5O2CPU.js.map +7 -0
- package/dist/esm/chunks/chunk.52F6VUCF.js +273 -0
- package/dist/esm/chunks/chunk.52F6VUCF.js.map +7 -0
- package/dist/esm/chunks/chunk.5EEEKOOK.js +552 -0
- package/dist/esm/chunks/chunk.5EEEKOOK.js.map +7 -0
- package/dist/esm/chunks/chunk.5NXVVSTU.js +243 -0
- package/dist/esm/chunks/chunk.5NXVVSTU.js.map +7 -0
- package/dist/esm/chunks/chunk.5VKAVHLM.js +610 -0
- package/dist/esm/chunks/chunk.5VKAVHLM.js.map +7 -0
- package/dist/esm/chunks/chunk.6KTLOA7V.js +6 -0
- package/dist/esm/chunks/chunk.6KTLOA7V.js.map +7 -0
- package/dist/esm/chunks/chunk.6V463G4I.js +105 -0
- package/dist/esm/chunks/chunk.6V463G4I.js.map +7 -0
- package/dist/esm/chunks/chunk.7FC5CPLE.js +603 -0
- package/dist/esm/chunks/chunk.7FC5CPLE.js.map +7 -0
- package/dist/esm/chunks/chunk.7G2S3DCM.js +458 -0
- package/dist/esm/chunks/chunk.7G2S3DCM.js.map +7 -0
- package/dist/esm/chunks/chunk.7I2XNJBL.js +593 -0
- package/dist/esm/chunks/chunk.7I2XNJBL.js.map +7 -0
- package/dist/esm/chunks/chunk.7KILTPJ6.js +72 -0
- package/dist/esm/chunks/chunk.7KILTPJ6.js.map +7 -0
- package/dist/esm/chunks/chunk.7XGNGXLR.js +648 -0
- package/dist/esm/chunks/chunk.7XGNGXLR.js.map +7 -0
- package/dist/esm/chunks/chunk.7Y4NHCJH.js +338 -0
- package/dist/esm/chunks/chunk.7Y4NHCJH.js.map +7 -0
- package/dist/esm/chunks/chunk.AHQ6QX3J.js +716 -0
- package/dist/esm/chunks/chunk.AHQ6QX3J.js.map +7 -0
- package/dist/esm/chunks/chunk.AYOZGYGO.js +21 -0
- package/dist/esm/chunks/chunk.AYOZGYGO.js.map +7 -0
- package/dist/esm/chunks/chunk.BKMWXPAS.js +439 -0
- package/dist/esm/chunks/chunk.BKMWXPAS.js.map +7 -0
- package/dist/esm/chunks/chunk.BOWCSPCH.js +2428 -0
- package/dist/esm/chunks/chunk.BOWCSPCH.js.map +7 -0
- package/dist/esm/chunks/chunk.BYN27JXZ.js +51 -0
- package/dist/esm/chunks/chunk.BYN27JXZ.js.map +7 -0
- package/dist/esm/chunks/chunk.BZPQIDQP.js +602 -0
- package/dist/esm/chunks/chunk.BZPQIDQP.js.map +7 -0
- package/dist/esm/chunks/chunk.C2MR3RDF.js +202 -0
- package/dist/esm/chunks/chunk.C2MR3RDF.js.map +7 -0
- package/dist/esm/chunks/chunk.C64YUJHS.js +55 -0
- package/dist/esm/chunks/chunk.C64YUJHS.js.map +7 -0
- package/dist/esm/chunks/chunk.CGHKW6S6.js +683 -0
- package/dist/esm/chunks/chunk.CGHKW6S6.js.map +7 -0
- package/dist/esm/chunks/chunk.CKS5A4YN.js +6 -0
- package/dist/esm/chunks/chunk.CKS5A4YN.js.map +7 -0
- package/dist/esm/chunks/chunk.COF6DD6T.js +293 -0
- package/dist/esm/chunks/chunk.COF6DD6T.js.map +7 -0
- package/dist/esm/chunks/chunk.D4XU5MZN.js +1203 -0
- package/dist/esm/chunks/chunk.D4XU5MZN.js.map +7 -0
- package/dist/esm/chunks/chunk.D5DMZ7ZG.js +350 -0
- package/dist/esm/chunks/chunk.D5DMZ7ZG.js.map +7 -0
- package/dist/esm/chunks/chunk.DB7ZQBES.js +244 -0
- package/dist/esm/chunks/chunk.DB7ZQBES.js.map +7 -0
- package/dist/esm/chunks/chunk.E4NCI7MS.js +6 -0
- package/dist/esm/chunks/chunk.E4NCI7MS.js.map +7 -0
- package/dist/esm/chunks/chunk.EA7XMXI5.js +200 -0
- package/dist/esm/chunks/chunk.EA7XMXI5.js.map +7 -0
- package/dist/esm/chunks/chunk.EARNUKJ2.js +401 -0
- package/dist/esm/chunks/chunk.EARNUKJ2.js.map +7 -0
- package/dist/esm/chunks/chunk.EKIW7VYG.js +419 -0
- package/dist/esm/chunks/chunk.EKIW7VYG.js.map +7 -0
- package/dist/esm/chunks/chunk.EL6B2ODN.js +52 -0
- package/dist/esm/chunks/chunk.EL6B2ODN.js.map +7 -0
- package/dist/esm/chunks/chunk.ETP6HSXO.js +513 -0
- package/dist/esm/chunks/chunk.ETP6HSXO.js.map +7 -0
- package/dist/esm/chunks/chunk.ETQIBLKP.js +978 -0
- package/dist/esm/chunks/chunk.ETQIBLKP.js.map +7 -0
- package/dist/esm/chunks/chunk.EWQENJ4W.js +505 -0
- package/dist/esm/chunks/chunk.EWQENJ4W.js.map +7 -0
- package/dist/esm/chunks/chunk.EY57VTRF.js +33 -0
- package/dist/esm/chunks/chunk.EY57VTRF.js.map +7 -0
- package/dist/esm/chunks/chunk.FBUQQD2T.js +732 -0
- package/dist/esm/chunks/chunk.FBUQQD2T.js.map +7 -0
- package/dist/esm/chunks/chunk.FMMPWQKC.js +439 -0
- package/dist/esm/chunks/chunk.FMMPWQKC.js.map +7 -0
- package/dist/esm/chunks/chunk.FWJ7SIFA.js +433 -0
- package/dist/esm/chunks/chunk.FWJ7SIFA.js.map +7 -0
- package/dist/esm/chunks/chunk.FZQCBRPK.js +6 -0
- package/dist/esm/chunks/chunk.FZQCBRPK.js.map +7 -0
- package/dist/esm/chunks/chunk.G6FY472A.js +658 -0
- package/dist/esm/chunks/chunk.G6FY472A.js.map +7 -0
- package/dist/esm/chunks/chunk.GS2AXUCN.js +150 -0
- package/dist/esm/chunks/chunk.GS2AXUCN.js.map +7 -0
- package/dist/esm/chunks/chunk.HHHMDDTU.js +297 -0
- package/dist/esm/chunks/chunk.HHHMDDTU.js.map +7 -0
- package/dist/esm/chunks/chunk.HZISALRH.js +20 -0
- package/dist/esm/chunks/chunk.HZISALRH.js.map +7 -0
- package/dist/esm/chunks/chunk.IBH5GL7A.js +258 -0
- package/dist/esm/chunks/chunk.IBH5GL7A.js.map +7 -0
- package/dist/esm/chunks/chunk.IWXT6VVJ.js +222 -0
- package/dist/esm/chunks/chunk.IWXT6VVJ.js.map +7 -0
- package/dist/esm/chunks/chunk.J6LOWXOG.js +654 -0
- package/dist/esm/chunks/chunk.J6LOWXOG.js.map +7 -0
- package/dist/esm/chunks/chunk.JICZQ2BO.js +168 -0
- package/dist/esm/chunks/chunk.JICZQ2BO.js.map +7 -0
- package/dist/esm/chunks/chunk.JKC5PU23.js +42 -0
- package/dist/esm/chunks/chunk.JKC5PU23.js.map +7 -0
- package/dist/esm/chunks/chunk.JQQOZMKQ.js +2994 -0
- package/dist/esm/chunks/chunk.JQQOZMKQ.js.map +7 -0
- package/dist/esm/chunks/chunk.JVQP6BJ3.js +1591 -0
- package/dist/esm/chunks/chunk.JVQP6BJ3.js.map +7 -0
- package/dist/esm/chunks/chunk.K2PCTUVN.js +139 -0
- package/dist/esm/chunks/chunk.K2PCTUVN.js.map +7 -0
- package/dist/esm/chunks/chunk.KCK3G74Y.js +634 -0
- package/dist/esm/chunks/chunk.KCK3G74Y.js.map +7 -0
- package/dist/esm/chunks/chunk.KI3IHPS2.js +801 -0
- package/dist/esm/chunks/chunk.KI3IHPS2.js.map +7 -0
- package/dist/esm/chunks/chunk.KRW2IAIU.js +445 -0
- package/dist/esm/chunks/chunk.KRW2IAIU.js.map +7 -0
- package/dist/esm/chunks/chunk.KZ2QNQK2.js +21 -0
- package/dist/esm/chunks/chunk.KZ2QNQK2.js.map +7 -0
- package/dist/esm/chunks/chunk.KZATVOA6.js +68 -0
- package/dist/esm/chunks/chunk.KZATVOA6.js.map +7 -0
- package/dist/esm/chunks/chunk.LCWRP2UI.js +59 -0
- package/dist/esm/chunks/chunk.LCWRP2UI.js.map +7 -0
- package/dist/esm/chunks/chunk.LM5TVNZY.js +71 -0
- package/dist/esm/chunks/chunk.LM5TVNZY.js.map +7 -0
- package/dist/esm/chunks/chunk.MAGJQ2PP.js +964 -0
- package/dist/esm/chunks/chunk.MAGJQ2PP.js.map +7 -0
- package/dist/esm/chunks/chunk.MEFT5FQC.js +158 -0
- package/dist/esm/chunks/chunk.MEFT5FQC.js.map +7 -0
- package/dist/esm/chunks/chunk.MHEJZJT3.js +6 -0
- package/dist/esm/chunks/chunk.MHEJZJT3.js.map +7 -0
- package/dist/esm/chunks/chunk.MMIZOYAS.js +147 -0
- package/dist/esm/chunks/chunk.MMIZOYAS.js.map +7 -0
- package/dist/esm/chunks/chunk.MNFGVNDI.js +6 -0
- package/dist/esm/chunks/chunk.MNFGVNDI.js.map +7 -0
- package/dist/esm/chunks/chunk.NQOD2XB3.js +840 -0
- package/dist/esm/chunks/chunk.NQOD2XB3.js.map +7 -0
- package/dist/esm/chunks/chunk.NRI7SWVX.js +1347 -0
- package/dist/esm/chunks/chunk.NRI7SWVX.js.map +7 -0
- package/dist/esm/chunks/chunk.NX5SKZLU.js +50 -0
- package/dist/esm/chunks/chunk.NX5SKZLU.js.map +7 -0
- package/dist/esm/chunks/chunk.O6UHX6FK.js +463 -0
- package/dist/esm/chunks/chunk.O6UHX6FK.js.map +7 -0
- package/dist/esm/chunks/chunk.OJI6ZRYW.js +561 -0
- package/dist/esm/chunks/chunk.OJI6ZRYW.js.map +7 -0
- package/dist/esm/chunks/chunk.OQRMHHPB.js +1335 -0
- package/dist/esm/chunks/chunk.OQRMHHPB.js.map +7 -0
- package/dist/esm/chunks/chunk.OYO6NUZY.js +52 -0
- package/dist/esm/chunks/chunk.OYO6NUZY.js.map +7 -0
- package/dist/esm/chunks/chunk.P43Z3YAS.js +507 -0
- package/dist/esm/chunks/chunk.P43Z3YAS.js.map +7 -0
- package/dist/esm/chunks/chunk.P7NOYP4O.js +73 -0
- package/dist/esm/chunks/chunk.P7NOYP4O.js.map +7 -0
- package/dist/esm/chunks/chunk.PBGL3BRX.js +27 -0
- package/dist/esm/chunks/chunk.PBGL3BRX.js.map +7 -0
- package/dist/esm/chunks/chunk.PCYIY5OY.js +461 -0
- package/dist/esm/chunks/chunk.PCYIY5OY.js.map +7 -0
- package/dist/esm/chunks/chunk.Q4YMHFRY.js +155 -0
- package/dist/esm/chunks/chunk.Q4YMHFRY.js.map +7 -0
- package/dist/esm/chunks/chunk.QD7EPCL6.js +144 -0
- package/dist/esm/chunks/chunk.QD7EPCL6.js.map +7 -0
- package/dist/esm/chunks/chunk.QQDDGRY6.js +6 -0
- package/dist/esm/chunks/chunk.QQDDGRY6.js.map +7 -0
- package/dist/esm/chunks/chunk.RNPIV3BY.js +540 -0
- package/dist/esm/chunks/chunk.RNPIV3BY.js.map +7 -0
- package/dist/esm/chunks/chunk.RR7HDQU6.js +236 -0
- package/dist/esm/chunks/chunk.RR7HDQU6.js.map +7 -0
- package/dist/esm/chunks/chunk.RV3E762Y.js +73 -0
- package/dist/esm/chunks/chunk.RV3E762Y.js.map +7 -0
- package/dist/esm/chunks/chunk.RWCC6E4O.js +52 -0
- package/dist/esm/chunks/chunk.RWCC6E4O.js.map +7 -0
- package/dist/esm/chunks/chunk.SJZ54RE3.js +56 -0
- package/dist/esm/chunks/chunk.SJZ54RE3.js.map +7 -0
- package/dist/esm/chunks/chunk.SKISCNSC.js +559 -0
- package/dist/esm/chunks/chunk.SKISCNSC.js.map +7 -0
- package/dist/esm/chunks/chunk.SKLCDWYQ.js +6 -0
- package/dist/esm/chunks/chunk.SKLCDWYQ.js.map +7 -0
- package/dist/esm/chunks/chunk.SNAZ6JSS.js +22 -0
- package/dist/esm/chunks/chunk.SNAZ6JSS.js.map +7 -0
- package/dist/esm/chunks/chunk.ST3R6JEE.js +73 -0
- package/dist/esm/chunks/chunk.ST3R6JEE.js.map +7 -0
- package/dist/esm/chunks/chunk.TLCGGWBO.js +6 -0
- package/dist/esm/chunks/chunk.TLCGGWBO.js.map +7 -0
- package/dist/esm/chunks/chunk.U35QQZVK.js +422 -0
- package/dist/esm/chunks/chunk.U35QQZVK.js.map +7 -0
- package/dist/esm/chunks/chunk.U6FJJGO3.js +6 -0
- package/dist/esm/chunks/chunk.U6FJJGO3.js.map +7 -0
- package/dist/esm/chunks/chunk.VAPJ75PS.js +21 -0
- package/dist/esm/chunks/chunk.VAPJ75PS.js.map +7 -0
- package/dist/esm/chunks/chunk.VHO7NUMI.js +37 -0
- package/dist/esm/chunks/chunk.VHO7NUMI.js.map +7 -0
- package/dist/esm/chunks/chunk.VK6LIH3B.js +13 -0
- package/dist/esm/chunks/chunk.VK6LIH3B.js.map +7 -0
- package/dist/esm/chunks/chunk.VTXXZ5KT.js +450 -0
- package/dist/esm/chunks/chunk.VTXXZ5KT.js.map +7 -0
- package/dist/esm/chunks/chunk.WAJDLUSQ.js +56 -0
- package/dist/esm/chunks/chunk.WAJDLUSQ.js.map +7 -0
- package/dist/esm/chunks/chunk.WF2MFLG4.js +6 -0
- package/dist/esm/chunks/chunk.WF2MFLG4.js.map +7 -0
- package/dist/esm/chunks/chunk.WINL2C7Q.js +6 -0
- package/dist/esm/chunks/chunk.WINL2C7Q.js.map +7 -0
- package/dist/esm/chunks/chunk.WIYLQTSX.js +3550 -0
- package/dist/esm/chunks/chunk.WIYLQTSX.js.map +7 -0
- package/dist/esm/chunks/chunk.WT4W2IFT.js +92 -0
- package/dist/esm/chunks/chunk.WT4W2IFT.js.map +7 -0
- package/dist/esm/chunks/chunk.WXFCZJJI.js +52 -0
- package/dist/esm/chunks/chunk.WXFCZJJI.js.map +7 -0
- package/dist/esm/chunks/chunk.XEF6G5NS.js +248 -0
- package/dist/esm/chunks/chunk.XEF6G5NS.js.map +7 -0
- package/dist/esm/chunks/chunk.XGMOOPIE.js +136 -0
- package/dist/esm/chunks/chunk.XGMOOPIE.js.map +7 -0
- package/dist/esm/chunks/chunk.XIDZXGD4.js +912 -0
- package/dist/esm/chunks/chunk.XIDZXGD4.js.map +7 -0
- package/dist/esm/chunks/chunk.XJVLHRVJ.js +59 -0
- package/dist/esm/chunks/chunk.XJVLHRVJ.js.map +7 -0
- package/dist/esm/chunks/chunk.XO3XVXWW.js +72 -0
- package/dist/esm/chunks/chunk.XO3XVXWW.js.map +7 -0
- package/dist/esm/chunks/chunk.XY3ZHN7Y.js +649 -0
- package/dist/esm/chunks/chunk.XY3ZHN7Y.js.map +7 -0
- package/dist/esm/chunks/chunk.Y2TDQIA4.js +307 -0
- package/dist/esm/chunks/chunk.Y2TDQIA4.js.map +7 -0
- package/dist/esm/chunks/chunk.YCW56AVX.js +176 -0
- package/dist/esm/chunks/chunk.YCW56AVX.js.map +7 -0
- package/dist/esm/chunks/chunk.YDPSV74L.js +742 -0
- package/dist/esm/chunks/chunk.YDPSV74L.js.map +7 -0
- package/dist/esm/chunks/chunk.YJ5X3WZ4.js +110 -0
- package/dist/esm/chunks/chunk.YJ5X3WZ4.js.map +7 -0
- package/dist/esm/chunks/chunk.ZABF5CI6.js +760 -0
- package/dist/esm/chunks/chunk.ZABF5CI6.js.map +7 -0
- package/dist/esm/chunks/chunk.ZG4NZM2P.js +173 -0
- package/dist/esm/chunks/chunk.ZG4NZM2P.js.map +7 -0
- package/dist/esm/chunks/chunk.ZUM5YLB2.js +291 -0
- package/dist/esm/chunks/chunk.ZUM5YLB2.js.map +7 -0
- package/dist/esm/circular-progress/index.js +28 -0
- package/dist/esm/circular-progress/index.js.map +7 -0
- package/dist/esm/color-picker/index.js +49 -0
- package/dist/esm/color-picker/index.js.map +7 -0
- package/dist/esm/core/base/index.js +21 -0
- package/dist/esm/core/base/index.js.map +7 -0
- package/dist/esm/core/delegates/index.js +20 -0
- package/dist/esm/core/delegates/index.js.map +7 -0
- package/dist/esm/core/index.js +83 -0
- package/dist/esm/core/index.js.map +7 -0
- package/dist/esm/core/mask/index.js +26 -0
- package/dist/esm/core/mask/index.js.map +7 -0
- package/dist/esm/core/utils/index.js +46 -0
- package/dist/esm/core/utils/index.js.map +7 -0
- package/dist/esm/date-picker/index.js +62 -0
- package/dist/esm/date-picker/index.js.map +7 -0
- package/dist/esm/date-range-picker/index.js +64 -0
- package/dist/esm/date-range-picker/index.js.map +7 -0
- package/dist/esm/dialog/index.js +44 -0
- package/dist/esm/dialog/index.js.map +7 -0
- package/dist/esm/divider/index.js +22 -0
- package/dist/esm/divider/index.js.map +7 -0
- package/dist/esm/drawer/base/index.js +25 -0
- package/dist/esm/drawer/base/index.js.map +7 -0
- package/dist/esm/drawer/drawer/index.js +25 -0
- package/dist/esm/drawer/drawer/index.js.map +7 -0
- package/dist/esm/drawer/index.js +56 -0
- package/dist/esm/drawer/index.js.map +7 -0
- package/dist/esm/drawer/mini-drawer/index.js +25 -0
- package/dist/esm/drawer/mini-drawer/index.js.map +7 -0
- package/dist/esm/drawer/modal-drawer/index.js +30 -0
- package/dist/esm/drawer/modal-drawer/index.js.map +7 -0
- package/dist/esm/expansion-panel/index.js +38 -0
- package/dist/esm/expansion-panel/index.js.map +7 -0
- package/dist/esm/file-picker/index.js +41 -0
- package/dist/esm/file-picker/index.js.map +7 -0
- package/dist/esm/floating-action-button/index.js +29 -0
- package/dist/esm/floating-action-button/index.js.map +7 -0
- package/dist/esm/floating-label/index.js +23 -0
- package/dist/esm/floating-label/index.js.map +7 -0
- package/dist/esm/icon/index.js +53 -0
- package/dist/esm/icon/index.js.map +7 -0
- package/dist/esm/icon-button/index.js +37 -0
- package/dist/esm/icon-button/index.js.map +7 -0
- package/dist/esm/index.js +1275 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/inline-message/index.js +22 -0
- package/dist/esm/inline-message/index.js.map +7 -0
- package/dist/esm/keyboard-shortcut/index.js +41 -0
- package/dist/esm/keyboard-shortcut/index.js.map +7 -0
- package/dist/esm/label-value/index.js +32 -0
- package/dist/esm/label-value/index.js.map +7 -0
- package/dist/esm/linear-progress/index.js +24 -0
- package/dist/esm/linear-progress/index.js.map +7 -0
- package/dist/esm/list/index.js +44 -0
- package/dist/esm/list/index.js.map +7 -0
- package/dist/esm/list/list/index.js +33 -0
- package/dist/esm/list/list/index.js.map +7 -0
- package/dist/esm/list/list-item/index.js +31 -0
- package/dist/esm/list/list-item/index.js.map +7 -0
- package/dist/esm/list-dropdown/index.js +55 -0
- package/dist/esm/list-dropdown/index.js.map +7 -0
- package/dist/esm/menu/index.js +53 -0
- package/dist/esm/menu/index.js.map +7 -0
- package/dist/esm/open-icon/index.js +37 -0
- package/dist/esm/open-icon/index.js.map +7 -0
- package/dist/esm/page-state/index.js +22 -0
- package/dist/esm/page-state/index.js.map +7 -0
- package/dist/esm/paginator/index.js +66 -0
- package/dist/esm/paginator/index.js.map +7 -0
- package/dist/esm/popup/index.js +31 -0
- package/dist/esm/popup/index.js.map +7 -0
- package/dist/esm/product-icon/index.js +29 -0
- package/dist/esm/product-icon/index.js.map +7 -0
- package/dist/esm/profile-card/index.js +37 -0
- package/dist/esm/profile-card/index.js.map +7 -0
- package/dist/esm/quantity-field/index.js +46 -0
- package/dist/esm/quantity-field/index.js.map +7 -0
- package/dist/esm/radio/index.js +26 -0
- package/dist/esm/radio/index.js.map +7 -0
- package/dist/esm/ripple/index.js +32 -0
- package/dist/esm/ripple/index.js.map +7 -0
- package/dist/esm/scaffold/index.js +22 -0
- package/dist/esm/scaffold/index.js.map +7 -0
- package/dist/esm/select/core/index.js +60 -0
- package/dist/esm/select/core/index.js.map +7 -0
- package/dist/esm/select/index.js +114 -0
- package/dist/esm/select/index.js.map +7 -0
- package/dist/esm/select/option/index.js +28 -0
- package/dist/esm/select/option/index.js.map +7 -0
- package/dist/esm/select/option-group/index.js +22 -0
- package/dist/esm/select/option-group/index.js.map +7 -0
- package/dist/esm/select/select/index.js +63 -0
- package/dist/esm/select/select/index.js.map +7 -0
- package/dist/esm/select/select-dropdown/index.js +59 -0
- package/dist/esm/select/select-dropdown/index.js.map +7 -0
- package/dist/esm/skeleton/index.js +22 -0
- package/dist/esm/skeleton/index.js.map +7 -0
- package/dist/esm/slider/index.js +35 -0
- package/dist/esm/slider/index.js.map +7 -0
- package/dist/esm/stepper/index.js +55 -0
- package/dist/esm/stepper/index.js.map +7 -0
- package/dist/esm/stepper/step/index.js +40 -0
- package/dist/esm/stepper/step/index.js.map +7 -0
- package/dist/esm/stepper/stepper/index.js +43 -0
- package/dist/esm/stepper/stepper/index.js.map +7 -0
- package/dist/esm/switch/index.js +34 -0
- package/dist/esm/switch/index.js.map +7 -0
- package/dist/esm/table/index.js +57 -0
- package/dist/esm/table/index.js.map +7 -0
- package/dist/esm/tabs/index.js +61 -0
- package/dist/esm/tabs/index.js.map +7 -0
- package/dist/esm/tabs/tab/index.js +33 -0
- package/dist/esm/tabs/tab/index.js.map +7 -0
- package/dist/esm/tabs/tab-bar/index.js +47 -0
- package/dist/esm/tabs/tab-bar/index.js.map +7 -0
- package/dist/esm/text-field/index.js +39 -0
- package/dist/esm/text-field/index.js.map +7 -0
- package/dist/esm/theme/index.js +17 -0
- package/dist/esm/theme/index.js.map +7 -0
- package/dist/esm/time-picker/index.js +92 -0
- package/dist/esm/time-picker/index.js.map +7 -0
- package/dist/esm/toast/index.js +42 -0
- package/dist/esm/toast/index.js.map +7 -0
- package/dist/esm/toolbar/index.js +22 -0
- package/dist/esm/toolbar/index.js.map +7 -0
- package/dist/esm/tooltip/index.js +34 -0
- package/dist/esm/tooltip/index.js.map +7 -0
- package/dist/esm/utils/index.js +17 -0
- package/dist/esm/utils/index.js.map +7 -0
- package/dist/esm/view-switcher/index.js +40 -0
- package/dist/esm/view-switcher/index.js.map +7 -0
- package/dist/esm/view-switcher/view/index.js +22 -0
- package/dist/esm/view-switcher/view/index.js.map +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1450 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
DialogComponent
|
|
8
|
+
} from "./chunk.KI3IHPS2.js";
|
|
9
|
+
import {
|
|
10
|
+
TEXT_FIELD_CONSTANTS,
|
|
11
|
+
TextFieldComponentDelegate
|
|
12
|
+
} from "./chunk.Q4YMHFRY.js";
|
|
13
|
+
import {
|
|
14
|
+
ListDropdown
|
|
15
|
+
} from "./chunk.D4XU5MZN.js";
|
|
16
|
+
import {
|
|
17
|
+
ListComponent
|
|
18
|
+
} from "./chunk.4UKSUUTX.js";
|
|
19
|
+
import {
|
|
20
|
+
ListItemComponent
|
|
21
|
+
} from "./chunk.G6FY472A.js";
|
|
22
|
+
import {
|
|
23
|
+
PopupComponent
|
|
24
|
+
} from "./chunk.5EEEKOOK.js";
|
|
25
|
+
import {
|
|
26
|
+
ICON_BUTTON_CONSTANTS,
|
|
27
|
+
IconButtonComponent
|
|
28
|
+
} from "./chunk.7Y4NHCJH.js";
|
|
29
|
+
import {
|
|
30
|
+
tylIconClose
|
|
31
|
+
} from "./chunk.GS2AXUCN.js";
|
|
32
|
+
import {
|
|
33
|
+
Platform
|
|
34
|
+
} from "./chunk.BYN27JXZ.js";
|
|
35
|
+
import {
|
|
36
|
+
ICON_CONSTANTS,
|
|
37
|
+
IconComponent,
|
|
38
|
+
IconRegistry
|
|
39
|
+
} from "./chunk.P43Z3YAS.js";
|
|
40
|
+
import {
|
|
41
|
+
FormFieldComponentDelegate
|
|
42
|
+
} from "./chunk.HZISALRH.js";
|
|
43
|
+
import {
|
|
44
|
+
TimeInputMask
|
|
45
|
+
} from "./chunk.WIYLQTSX.js";
|
|
46
|
+
import {
|
|
47
|
+
TWELVE_HOUR_TIME_REGEX,
|
|
48
|
+
TWENTY_FOUR_HOUR_TIME_REGEX,
|
|
49
|
+
isSupportedTimeFormat,
|
|
50
|
+
tokenize12HourTimeString,
|
|
51
|
+
tokenize24HourTimeString,
|
|
52
|
+
tryCoerceTimeString
|
|
53
|
+
} from "./chunk.52F6VUCF.js";
|
|
54
|
+
import {
|
|
55
|
+
BaseAdapter
|
|
56
|
+
} from "./chunk.KZATVOA6.js";
|
|
57
|
+
import {
|
|
58
|
+
FoundationProperty
|
|
59
|
+
} from "./chunk.MMIZOYAS.js";
|
|
60
|
+
import {
|
|
61
|
+
COMPONENT_NAME_PREFIX,
|
|
62
|
+
CustomElement
|
|
63
|
+
} from "./chunk.35U3UPDV.js";
|
|
64
|
+
import {
|
|
65
|
+
BaseComponent
|
|
66
|
+
} from "./chunk.VK6LIH3B.js";
|
|
67
|
+
import {
|
|
68
|
+
attachShadowTemplate,
|
|
69
|
+
defineCustomElement,
|
|
70
|
+
emitEvent,
|
|
71
|
+
getShadowElement
|
|
72
|
+
} from "./chunk.K2PCTUVN.js";
|
|
73
|
+
import {
|
|
74
|
+
ensureChild,
|
|
75
|
+
getActiveElement,
|
|
76
|
+
toggleAttribute
|
|
77
|
+
} from "./chunk.4JURZYE4.js";
|
|
78
|
+
import {
|
|
79
|
+
coerceBoolean,
|
|
80
|
+
coerceNumber,
|
|
81
|
+
debounce,
|
|
82
|
+
randomChars
|
|
83
|
+
} from "./chunk.MEFT5FQC.js";
|
|
84
|
+
import {
|
|
85
|
+
__decorateClass,
|
|
86
|
+
__spreadValues
|
|
87
|
+
} from "./chunk.LM5TVNZY.js";
|
|
88
|
+
|
|
89
|
+
// node_modules/@tylertech/tyler-icons/extended/index.js
|
|
90
|
+
var tylIconClockOutline = {
|
|
91
|
+
name: "clock_outline",
|
|
92
|
+
data: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 20a8 8 0 008-8 8 8 0 00-8-8 8 8 0 00-8 8 8 8 0 008 8m0-18a10 10 0 0110 10 10 10 0 01-10 10C6.47 22 2 17.5 2 12A10 10 0 0112 2m.5 5v5.25l4.5 2.67-.75 1.23L11 13V7h1.5z"/></svg>'
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// dist/build/lib/staging/src/time-picker/time-picker-constants.ts
|
|
96
|
+
var elementName = `${COMPONENT_NAME_PREFIX}time-picker`;
|
|
97
|
+
var attributes = {
|
|
98
|
+
TOGGLE: "forge-time-picker-toggle",
|
|
99
|
+
VALUE: "value",
|
|
100
|
+
OPEN: "open",
|
|
101
|
+
ALLOW_SECONDS: "allow-seconds",
|
|
102
|
+
MASKED: "masked",
|
|
103
|
+
SHOW_MASK_FORMAT: "show-mask-format",
|
|
104
|
+
USE_24_HOUR_TIME: "use-24-hour-time",
|
|
105
|
+
ALLOW_INVALID_TIME: "allow-invalid-time",
|
|
106
|
+
MIN: "min",
|
|
107
|
+
MAX: "max",
|
|
108
|
+
START_TIME: "start-time",
|
|
109
|
+
STEP: "step",
|
|
110
|
+
ALLOW_INPUT: "allow-input",
|
|
111
|
+
SHOW_NOW: "show-now",
|
|
112
|
+
DISABLED: "disabled",
|
|
113
|
+
POPUP_CLASSES: "popup-classes",
|
|
114
|
+
ALLOW_DROPDOWN: "allow-dropdown"
|
|
115
|
+
};
|
|
116
|
+
var selectors = {
|
|
117
|
+
INPUT: "input, input[forge-time-picker-input]",
|
|
118
|
+
TOGGLE: `[${attributes.TOGGLE}]`
|
|
119
|
+
};
|
|
120
|
+
var events = {
|
|
121
|
+
OPEN: `${elementName}-open`,
|
|
122
|
+
CLOSE: `${elementName}-close`,
|
|
123
|
+
INPUT: `${elementName}-input`,
|
|
124
|
+
CHANGE: `${elementName}-change`
|
|
125
|
+
};
|
|
126
|
+
var numbers = {
|
|
127
|
+
DEFAULT_MINUTE_STEP: 60,
|
|
128
|
+
MAX_DAY_MILLIS: 864e5,
|
|
129
|
+
MAX_DAY_MINUTES: 1440
|
|
130
|
+
};
|
|
131
|
+
var TIME_PICKER_CONSTANTS = {
|
|
132
|
+
elementName,
|
|
133
|
+
attributes,
|
|
134
|
+
selectors,
|
|
135
|
+
events,
|
|
136
|
+
numbers
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// dist/build/lib/staging/src/time-picker/time-picker-adapter.ts
|
|
140
|
+
var TimePickerAdapter = class extends BaseAdapter {
|
|
141
|
+
constructor(component) {
|
|
142
|
+
super(component);
|
|
143
|
+
}
|
|
144
|
+
initialize() {
|
|
145
|
+
this._inputElement = this._component.querySelector(TIME_PICKER_CONSTANTS.selectors.INPUT);
|
|
146
|
+
}
|
|
147
|
+
initializeMask(options) {
|
|
148
|
+
if (this._inputMask) {
|
|
149
|
+
this._inputMask.destroy();
|
|
150
|
+
}
|
|
151
|
+
this._inputMask = new TimeInputMask(this._inputElement, options);
|
|
152
|
+
}
|
|
153
|
+
destroy() {
|
|
154
|
+
this._targetElement = void 0;
|
|
155
|
+
this._toggleElement = void 0;
|
|
156
|
+
this._inputElement = void 0;
|
|
157
|
+
}
|
|
158
|
+
destroyMask() {
|
|
159
|
+
if (this._inputMask) {
|
|
160
|
+
this._inputMask.destroy();
|
|
161
|
+
this._inputMask = void 0;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
initializeAccessibility(identifier) {
|
|
165
|
+
this._inputElement.setAttribute("autocomplete", "off");
|
|
166
|
+
this._inputElement.setAttribute("autocorrect", "off");
|
|
167
|
+
this._inputElement.setAttribute("autocapitalize", "off");
|
|
168
|
+
this._inputElement.setAttribute("spellcheck", "false");
|
|
169
|
+
this._inputElement.setAttribute("role", "combobox");
|
|
170
|
+
this._inputElement.setAttribute("aria-live", "assertive");
|
|
171
|
+
this._inputElement.setAttribute("aria-atomic", "true");
|
|
172
|
+
this._inputElement.setAttribute("aria-haspopup", "true");
|
|
173
|
+
this._inputElement.setAttribute("aria-expanded", "false");
|
|
174
|
+
}
|
|
175
|
+
addInputListener(type, listener, capture) {
|
|
176
|
+
this._inputElement.addEventListener(type, listener, { capture });
|
|
177
|
+
}
|
|
178
|
+
removeInputListener(type, listener, capture) {
|
|
179
|
+
if (this._inputElement) {
|
|
180
|
+
this._inputElement.removeEventListener(type, listener, { capture });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
addToggleListener(type, listener) {
|
|
184
|
+
if (this._toggleElement) {
|
|
185
|
+
this._toggleElement.addEventListener(type, listener);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
removeToggleListener(type, listener) {
|
|
189
|
+
if (this._toggleElement) {
|
|
190
|
+
this._toggleElement.removeEventListener(type, listener);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
hasInputElement() {
|
|
194
|
+
return !!this._inputElement;
|
|
195
|
+
}
|
|
196
|
+
tryCreateToggle() {
|
|
197
|
+
const textField = this._component.querySelector(TEXT_FIELD_CONSTANTS.elementName);
|
|
198
|
+
const toggleElement = this._component.querySelector(TIME_PICKER_CONSTANTS.selectors.TOGGLE);
|
|
199
|
+
if (textField) {
|
|
200
|
+
const existingIconButton = textField.querySelector(`${ICON_BUTTON_CONSTANTS.elementName}[slot=trailing]`);
|
|
201
|
+
if (existingIconButton || toggleElement) {
|
|
202
|
+
this._toggleElement = existingIconButton || toggleElement;
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const iconButtonElement = document.createElement(ICON_BUTTON_CONSTANTS.elementName);
|
|
206
|
+
iconButtonElement.slot = "trailing";
|
|
207
|
+
iconButtonElement.dense = true;
|
|
208
|
+
iconButtonElement.densityLevel = 3;
|
|
209
|
+
iconButtonElement.style.marginRight = "4px";
|
|
210
|
+
const buttonElement = document.createElement("button");
|
|
211
|
+
buttonElement.type = "button";
|
|
212
|
+
buttonElement.tabIndex = -1;
|
|
213
|
+
buttonElement.setAttribute("aria-label", "Toggle time dropdown");
|
|
214
|
+
const iconElement = document.createElement(ICON_CONSTANTS.elementName);
|
|
215
|
+
iconElement.name = "clock_outline";
|
|
216
|
+
buttonElement.appendChild(iconElement);
|
|
217
|
+
iconButtonElement.appendChild(buttonElement);
|
|
218
|
+
textField.appendChild(iconButtonElement);
|
|
219
|
+
this._toggleElement = iconButtonElement;
|
|
220
|
+
} else if (toggleElement) {
|
|
221
|
+
this._toggleElement = toggleElement;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
tryFocusInput() {
|
|
225
|
+
this._inputElement.select();
|
|
226
|
+
}
|
|
227
|
+
tryBlurInput() {
|
|
228
|
+
this._inputElement.blur();
|
|
229
|
+
}
|
|
230
|
+
selectInputText() {
|
|
231
|
+
this._inputElement.select();
|
|
232
|
+
}
|
|
233
|
+
isInputDisabled() {
|
|
234
|
+
return this._inputElement.disabled;
|
|
235
|
+
}
|
|
236
|
+
isInputFocused() {
|
|
237
|
+
return getActiveElement() === this._inputElement;
|
|
238
|
+
}
|
|
239
|
+
setInputValue(value, emitEvents) {
|
|
240
|
+
if (this._inputElement.value === value) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
this._inputElement.value = value;
|
|
244
|
+
if (this._inputMask) {
|
|
245
|
+
this._inputMask.update();
|
|
246
|
+
}
|
|
247
|
+
if (emitEvents) {
|
|
248
|
+
this._emitInputEvent("change");
|
|
249
|
+
this._emitInputEvent("input");
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
getInputValue() {
|
|
253
|
+
return this._inputMask ? this._inputMask.maskedValue : this._inputElement.value;
|
|
254
|
+
}
|
|
255
|
+
setDisabled(isDisabled) {
|
|
256
|
+
this._inputElement.disabled = isDisabled;
|
|
257
|
+
this._inputElement.setAttribute("aria-disabled", isDisabled.toString());
|
|
258
|
+
this.setToggleDisabled(isDisabled);
|
|
259
|
+
}
|
|
260
|
+
attachDropdown(config) {
|
|
261
|
+
this._listDropdown = new ListDropdown(this._inputElement, config);
|
|
262
|
+
this._listDropdown.open();
|
|
263
|
+
this._inputElement.setAttribute("aria-controls", `list-dropdown-popup-${config.id}`);
|
|
264
|
+
}
|
|
265
|
+
detachDropdown() {
|
|
266
|
+
if (this._listDropdown) {
|
|
267
|
+
this._listDropdown.close();
|
|
268
|
+
this._listDropdown.destroy();
|
|
269
|
+
this._listDropdown = void 0;
|
|
270
|
+
}
|
|
271
|
+
this._inputElement.removeAttribute("aria-controls");
|
|
272
|
+
}
|
|
273
|
+
propagateKey(key) {
|
|
274
|
+
var _a;
|
|
275
|
+
(_a = this._listDropdown) == null ? void 0 : _a.handleKey(key);
|
|
276
|
+
}
|
|
277
|
+
setActiveDescendant(id) {
|
|
278
|
+
toggleAttribute(this._inputElement, !!id, "aria-activedescendant", id);
|
|
279
|
+
}
|
|
280
|
+
getTargetElementWidth(selector) {
|
|
281
|
+
const targetElement = this._getTargetElement(selector);
|
|
282
|
+
return targetElement.getBoundingClientRect().width;
|
|
283
|
+
}
|
|
284
|
+
_emitInputEvent(type) {
|
|
285
|
+
this._inputElement.dispatchEvent(new Event(type));
|
|
286
|
+
}
|
|
287
|
+
emitInputEvent(type, data) {
|
|
288
|
+
emitEvent(this._inputElement, type, data);
|
|
289
|
+
}
|
|
290
|
+
setInputReadonly(value) {
|
|
291
|
+
this._inputElement.readOnly = value;
|
|
292
|
+
}
|
|
293
|
+
setToggleDisabled(value) {
|
|
294
|
+
if (this._toggleElement) {
|
|
295
|
+
this._toggleElement.setAttribute("aria-disabled", value.toString());
|
|
296
|
+
if ("disabled" in this._toggleElement) {
|
|
297
|
+
this._toggleElement.disabled = value;
|
|
298
|
+
} else {
|
|
299
|
+
const button = this._toggleElement.querySelector("button");
|
|
300
|
+
if (button) {
|
|
301
|
+
button.disabled = value;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
activateFirstOption() {
|
|
307
|
+
var _a;
|
|
308
|
+
(_a = this._listDropdown) == null ? void 0 : _a.activateFirstOption();
|
|
309
|
+
}
|
|
310
|
+
getActiveOption() {
|
|
311
|
+
var _a;
|
|
312
|
+
return (_a = this._listDropdown) == null ? void 0 : _a.getActiveOption();
|
|
313
|
+
}
|
|
314
|
+
_getTargetElement(selector) {
|
|
315
|
+
if (this._targetElement) {
|
|
316
|
+
return this._targetElement;
|
|
317
|
+
}
|
|
318
|
+
this._targetElement = selector ? this._component.querySelector(selector) || this._getDefaultTargetElement() : this._getDefaultTargetElement();
|
|
319
|
+
return this._targetElement;
|
|
320
|
+
}
|
|
321
|
+
_getDefaultTargetElement() {
|
|
322
|
+
const textField = this._component.querySelector(TEXT_FIELD_CONSTANTS.elementName);
|
|
323
|
+
if (textField && textField.shadowRoot) {
|
|
324
|
+
const textFieldRoot = getShadowElement(textField, TEXT_FIELD_CONSTANTS.selectors.ROOT);
|
|
325
|
+
if (textFieldRoot) {
|
|
326
|
+
return textFieldRoot;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return this._component;
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// dist/build/lib/staging/src/time-picker/time-picker-utils.ts
|
|
334
|
+
function timeStringToMillis(time, use24HourTime, allowSeconds) {
|
|
335
|
+
if (!time || /^\s*$/.test(time)) {
|
|
336
|
+
return null;
|
|
337
|
+
}
|
|
338
|
+
let hours = 0;
|
|
339
|
+
let minutes = 0;
|
|
340
|
+
let seconds = 0;
|
|
341
|
+
if (TWENTY_FOUR_HOUR_TIME_REGEX.test(time)) {
|
|
342
|
+
const tokens = tokenize24HourTimeString(time);
|
|
343
|
+
hours = +tokens.hours || 0;
|
|
344
|
+
minutes = +tokens.minutes || 0;
|
|
345
|
+
seconds = +tokens.seconds || 0;
|
|
346
|
+
} else if (TWELVE_HOUR_TIME_REGEX.test(time)) {
|
|
347
|
+
const tokens = tokenize12HourTimeString(time);
|
|
348
|
+
hours = +tokens.hours || 0;
|
|
349
|
+
minutes = +tokens.minutes || 0;
|
|
350
|
+
seconds = +tokens.seconds || 0;
|
|
351
|
+
if (hours === 12 && tokens.meridiem === "AM") {
|
|
352
|
+
hours = 0;
|
|
353
|
+
}
|
|
354
|
+
if (hours < 12 && tokens.meridiem === "PM") {
|
|
355
|
+
hours += 12;
|
|
356
|
+
}
|
|
357
|
+
} else {
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
return hoursToMillis(hours) + minutesToMillis(minutes) + (allowSeconds ? secondsToMillis(seconds) : 0);
|
|
361
|
+
}
|
|
362
|
+
function millisToTimeString(value, use24HourTime, allowSeconds) {
|
|
363
|
+
if (typeof value !== "number" || value < 0) {
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
366
|
+
let hours = Math.min(millisToHours(value), 23);
|
|
367
|
+
const minutes = Math.min(millisToMinutesClamped(value), 59);
|
|
368
|
+
const totalMinutes = value / (1e3 * 60);
|
|
369
|
+
const meridiem = totalMinutes < 720 ? "AM" : "PM";
|
|
370
|
+
if (!use24HourTime) {
|
|
371
|
+
hours = hours <= 12 ? hours : hours - 12;
|
|
372
|
+
if (hours === 0) {
|
|
373
|
+
hours = 12;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
let time = `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
|
|
377
|
+
if (allowSeconds) {
|
|
378
|
+
const seconds = Math.min(millisToSecondsClamped(value), 59);
|
|
379
|
+
time += `:${String(seconds).padStart(2, "0")}`;
|
|
380
|
+
}
|
|
381
|
+
if (!use24HourTime) {
|
|
382
|
+
time += ` ${meridiem}`;
|
|
383
|
+
}
|
|
384
|
+
return time;
|
|
385
|
+
}
|
|
386
|
+
function millisToHours(millis) {
|
|
387
|
+
return Math.abs(Math.floor(millis / (1e3 * 60 * 60)));
|
|
388
|
+
}
|
|
389
|
+
function millisToMinutesClamped(millis) {
|
|
390
|
+
return Math.abs(Math.floor(millisToMinutes(millis) % 60));
|
|
391
|
+
}
|
|
392
|
+
function millisToMinutes(millis) {
|
|
393
|
+
return millis / (1e3 * 60);
|
|
394
|
+
}
|
|
395
|
+
function millisToSecondsClamped(millis) {
|
|
396
|
+
return Math.abs(Math.floor(millisToSeconds(millis) % 60));
|
|
397
|
+
}
|
|
398
|
+
function millisToSeconds(millis) {
|
|
399
|
+
return millis / 1e3;
|
|
400
|
+
}
|
|
401
|
+
function hoursToMillis(hours) {
|
|
402
|
+
return hours * 60 * 60 * 1e3;
|
|
403
|
+
}
|
|
404
|
+
function minutesToMillis(minutes) {
|
|
405
|
+
return minutes * 60 * 1e3;
|
|
406
|
+
}
|
|
407
|
+
function secondsToMillis(seconds) {
|
|
408
|
+
return seconds * 1e3;
|
|
409
|
+
}
|
|
410
|
+
function stripSecondsFromMillis(millis) {
|
|
411
|
+
return millis - secondsToMillis(millisToSecondsClamped(millis));
|
|
412
|
+
}
|
|
413
|
+
function getCurrentTimeOfDayMillis(allowSeconds) {
|
|
414
|
+
const date = new Date();
|
|
415
|
+
const hours = date.getHours();
|
|
416
|
+
const minutes = date.getMinutes();
|
|
417
|
+
return hoursToMillis(hours) + minutesToMillis(minutes) + (allowSeconds ? secondsToMillis(date.getSeconds()) : 0);
|
|
418
|
+
}
|
|
419
|
+
function mergeDateWithTime(date, time, useSeconds = false) {
|
|
420
|
+
if (!date) {
|
|
421
|
+
date = new Date();
|
|
422
|
+
}
|
|
423
|
+
const millis = timeStringToMillis(time, true, useSeconds);
|
|
424
|
+
if (!millis) {
|
|
425
|
+
date.setHours(0, 0, 0);
|
|
426
|
+
return date;
|
|
427
|
+
}
|
|
428
|
+
let hours = millisToHours(millis);
|
|
429
|
+
const twentyThreeHoursInMillis = 828e5;
|
|
430
|
+
if (hours > twentyThreeHoursInMillis) {
|
|
431
|
+
hours = twentyThreeHoursInMillis;
|
|
432
|
+
} else if (hours < 0) {
|
|
433
|
+
hours = 0;
|
|
434
|
+
}
|
|
435
|
+
const minutes = millisToMinutesClamped(millis);
|
|
436
|
+
const seconds = useSeconds ? millisToSecondsClamped(millis) : 0;
|
|
437
|
+
date.setHours(hours, minutes, seconds);
|
|
438
|
+
return date;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// dist/build/lib/staging/src/time-picker/time-picker-foundation.ts
|
|
442
|
+
var TimePickerFoundation = class {
|
|
443
|
+
constructor(_adapter) {
|
|
444
|
+
this._adapter = _adapter;
|
|
445
|
+
this._value = null;
|
|
446
|
+
this._masked = true;
|
|
447
|
+
this._use24HourTime = false;
|
|
448
|
+
this._showMaskFormat = false;
|
|
449
|
+
this._min = null;
|
|
450
|
+
this._max = null;
|
|
451
|
+
this._restrictedTimes = [];
|
|
452
|
+
this._startTime = null;
|
|
453
|
+
this._step = TIME_PICKER_CONSTANTS.numbers.DEFAULT_MINUTE_STEP;
|
|
454
|
+
this._allowInput = true;
|
|
455
|
+
this._open = false;
|
|
456
|
+
this._allowSeconds = false;
|
|
457
|
+
this._allowInvalidTime = false;
|
|
458
|
+
this._showNow = false;
|
|
459
|
+
this._customOptions = [];
|
|
460
|
+
this._disabled = false;
|
|
461
|
+
this._popupClasses = [];
|
|
462
|
+
this._allowDropdown = true;
|
|
463
|
+
this._isInitialized = false;
|
|
464
|
+
this._identifier = randomChars();
|
|
465
|
+
this._inputListener = (evt) => this._onInput(evt);
|
|
466
|
+
this._inputKeydownListener = (evt) => this._onInputKeydown(evt);
|
|
467
|
+
this._toggleMousedownListener = (evt) => this._onToggleMousedown(evt);
|
|
468
|
+
this._inputFocusListener = (evt) => this._onInputFocus(evt);
|
|
469
|
+
this._inputBlurListener = (evt) => this._onInputBlur(evt);
|
|
470
|
+
this._inputMousedownListener = (evt) => this._onInputMousedown(evt);
|
|
471
|
+
}
|
|
472
|
+
initialize() {
|
|
473
|
+
this._adapter.initialize();
|
|
474
|
+
if (!this._adapter.hasInputElement()) {
|
|
475
|
+
throw new Error("Unable to locate <input> element to attach to.");
|
|
476
|
+
}
|
|
477
|
+
this._adapter.initializeAccessibility(this._identifier);
|
|
478
|
+
if (!this._value) {
|
|
479
|
+
const inputValue = this._adapter.getInputValue();
|
|
480
|
+
this._setValue(this._convertTimeStringToMillis(inputValue, this._use24HourTime, this._allowSeconds));
|
|
481
|
+
}
|
|
482
|
+
this._adapter.addInputListener("focus", this._inputFocusListener);
|
|
483
|
+
this._adapter.addInputListener("blur", this._inputBlurListener);
|
|
484
|
+
this._adapter.addInputListener("keydown", this._inputKeydownListener, true);
|
|
485
|
+
this._formatInputValue(false);
|
|
486
|
+
if (typeof this._value === "number") {
|
|
487
|
+
this._applyValue(this._value, false);
|
|
488
|
+
}
|
|
489
|
+
this._applyAllowInput();
|
|
490
|
+
this._applyAllowDropdown();
|
|
491
|
+
this._applyDisabled();
|
|
492
|
+
this._applyMask();
|
|
493
|
+
this._isInitialized = true;
|
|
494
|
+
}
|
|
495
|
+
disconnect() {
|
|
496
|
+
this._isInitialized = false;
|
|
497
|
+
this._adapter.removeInputListener("input", this._inputListener);
|
|
498
|
+
this._adapter.removeInputListener("focus", this._inputFocusListener);
|
|
499
|
+
this._adapter.removeInputListener("blur", this._inputBlurListener);
|
|
500
|
+
this._adapter.removeToggleListener("mousedown", this._toggleMousedownListener);
|
|
501
|
+
this._adapter.removeInputListener("keydown", this._inputKeydownListener, true);
|
|
502
|
+
if (this._masked) {
|
|
503
|
+
this._adapter.destroyMask();
|
|
504
|
+
}
|
|
505
|
+
this._closeDropdown();
|
|
506
|
+
this._adapter.destroy();
|
|
507
|
+
}
|
|
508
|
+
_onInput(evt) {
|
|
509
|
+
this._handleInput(this._adapter.getInputValue());
|
|
510
|
+
}
|
|
511
|
+
_onInputKeydown(evt) {
|
|
512
|
+
if (evt.shiftKey) {
|
|
513
|
+
switch (evt.code) {
|
|
514
|
+
case "Backspace":
|
|
515
|
+
case "Delete":
|
|
516
|
+
evt.preventDefault();
|
|
517
|
+
const result = this._trySetValue(null);
|
|
518
|
+
if (result) {
|
|
519
|
+
this._formatInputValue();
|
|
520
|
+
}
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
switch (evt.code) {
|
|
525
|
+
case "Tab":
|
|
526
|
+
if (this._open) {
|
|
527
|
+
this._selectActiveOption();
|
|
528
|
+
}
|
|
529
|
+
break;
|
|
530
|
+
case "Esc":
|
|
531
|
+
case "Escape":
|
|
532
|
+
if (this._open) {
|
|
533
|
+
evt.preventDefault();
|
|
534
|
+
this._closeDropdown(true);
|
|
535
|
+
}
|
|
536
|
+
break;
|
|
537
|
+
case "Down":
|
|
538
|
+
case "ArrowDown":
|
|
539
|
+
if (this._allowDropdown) {
|
|
540
|
+
evt.preventDefault();
|
|
541
|
+
if (!this._open) {
|
|
542
|
+
this._openDropdown();
|
|
543
|
+
this._adapter.activateFirstOption();
|
|
544
|
+
} else {
|
|
545
|
+
this._adapter.propagateKey(evt.code);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
break;
|
|
549
|
+
case "Up":
|
|
550
|
+
case "ArrowUp":
|
|
551
|
+
if (this._allowDropdown) {
|
|
552
|
+
evt.preventDefault();
|
|
553
|
+
if (this._open) {
|
|
554
|
+
this._adapter.propagateKey(evt.code);
|
|
555
|
+
} else {
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
break;
|
|
559
|
+
case "Enter":
|
|
560
|
+
case "Home":
|
|
561
|
+
case "End":
|
|
562
|
+
if (this._open) {
|
|
563
|
+
if (evt.code === "Enter") {
|
|
564
|
+
evt.stopPropagation();
|
|
565
|
+
}
|
|
566
|
+
evt.preventDefault();
|
|
567
|
+
this._adapter.propagateKey(evt.code);
|
|
568
|
+
}
|
|
569
|
+
break;
|
|
570
|
+
case "KeyN":
|
|
571
|
+
evt.preventDefault();
|
|
572
|
+
const nowMillis = getCurrentTimeOfDayMillis(this._allowSeconds);
|
|
573
|
+
if (this._value !== nowMillis) {
|
|
574
|
+
const timeString = millisToTimeString(nowMillis, true, this._allowSeconds);
|
|
575
|
+
const canContinue = this._emitChangeEvent(timeString);
|
|
576
|
+
if (canContinue) {
|
|
577
|
+
this._applyValue(nowMillis);
|
|
578
|
+
this._selectInputText();
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
_selectActiveOption() {
|
|
585
|
+
const activeOption = this._adapter.getActiveOption();
|
|
586
|
+
if (activeOption) {
|
|
587
|
+
this._onSelect(activeOption.value);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
_onToggleMousedown(evt) {
|
|
591
|
+
if (this._disabled || !this.allowDropdown) {
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
594
|
+
evt.stopPropagation();
|
|
595
|
+
if (this._adapter.isInputDisabled()) {
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
evt.preventDefault();
|
|
599
|
+
if (this._open) {
|
|
600
|
+
this._closeDropdown(true);
|
|
601
|
+
} else {
|
|
602
|
+
if (!Platform.isMobile) {
|
|
603
|
+
this._adapter.tryFocusInput();
|
|
604
|
+
} else {
|
|
605
|
+
this._adapter.tryBlurInput();
|
|
606
|
+
}
|
|
607
|
+
this._openDropdown();
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
_onInputFocus(evt) {
|
|
611
|
+
if (this._allowInput) {
|
|
612
|
+
this._adapter.selectInputText();
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
_onInputBlur(evt) {
|
|
616
|
+
this._formatInputValue();
|
|
617
|
+
if (this._open && !this._adapter.isInputFocused()) {
|
|
618
|
+
this._closeDropdown(true);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
_onInputMousedown(evt) {
|
|
622
|
+
if (!this._allowInput && !this._open) {
|
|
623
|
+
this._openDropdown();
|
|
624
|
+
this._adapter.tryFocusInput();
|
|
625
|
+
window.requestAnimationFrame(() => this._adapter.selectInputText());
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
_applyDisabled() {
|
|
629
|
+
this._adapter.setDisabled(this._disabled);
|
|
630
|
+
}
|
|
631
|
+
_applyMask() {
|
|
632
|
+
if (this._masked && this._allowInput) {
|
|
633
|
+
const options = {
|
|
634
|
+
showMaskFormat: this._showMaskFormat,
|
|
635
|
+
use24HourTime: this._use24HourTime,
|
|
636
|
+
showSeconds: this._allowSeconds,
|
|
637
|
+
prepareCallback: this._prepareMaskCallback,
|
|
638
|
+
onChange: debounce((value) => this._handleInput(value), 0, true)
|
|
639
|
+
};
|
|
640
|
+
this._adapter.initializeMask(options);
|
|
641
|
+
} else {
|
|
642
|
+
this._adapter.destroyMask();
|
|
643
|
+
this._formatInputValue();
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
_applyAllowInput() {
|
|
647
|
+
this._adapter.setInputReadonly(!this._allowInput);
|
|
648
|
+
if (this._allowInput) {
|
|
649
|
+
this._adapter.removeInputListener("mousedown", this._inputMousedownListener);
|
|
650
|
+
if (!this._masked) {
|
|
651
|
+
this._adapter.addInputListener("input", this._inputListener);
|
|
652
|
+
}
|
|
653
|
+
} else {
|
|
654
|
+
this._adapter.addInputListener("mousedown", this._inputMousedownListener);
|
|
655
|
+
this._adapter.removeInputListener("input", this._inputListener);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
_applyAllowDropdown() {
|
|
659
|
+
this._adapter.setToggleDisabled(!this._allowDropdown);
|
|
660
|
+
if (this._allowDropdown) {
|
|
661
|
+
this._adapter.removeToggleListener("mousedown", this._toggleMousedownListener);
|
|
662
|
+
this._adapter.tryCreateToggle();
|
|
663
|
+
this._adapter.addToggleListener("mousedown", this._toggleMousedownListener);
|
|
664
|
+
} else if (this._open) {
|
|
665
|
+
this._closeDropdown(true);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
_applyAllowSeconds() {
|
|
669
|
+
const originalValue = this._value;
|
|
670
|
+
if (!this._allowSeconds) {
|
|
671
|
+
if (typeof this._value !== "number") {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
this._setValue(stripSecondsFromMillis(this._value));
|
|
675
|
+
if (this._isInitialized && originalValue !== this._value) {
|
|
676
|
+
const timeString = millisToTimeString(this._value, true, false);
|
|
677
|
+
this._emitChangeEvent(timeString);
|
|
678
|
+
}
|
|
679
|
+
} else if (this._isInitialized && originalValue !== this._value) {
|
|
680
|
+
const timeString = millisToTimeString(this._value, true, true);
|
|
681
|
+
this._emitChangeEvent(timeString);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
_handleInput(value) {
|
|
685
|
+
const rawValue = value;
|
|
686
|
+
if (!this._allowInput) {
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
if (this._open) {
|
|
690
|
+
this._closeDropdown(true);
|
|
691
|
+
}
|
|
692
|
+
value = tryCoerceTimeString(value, this._use24HourTime, this._allowSeconds);
|
|
693
|
+
if (typeof this._coercionCallback === "function") {
|
|
694
|
+
value = this._coercionCallback.call(null, rawValue, value, this._allowSeconds);
|
|
695
|
+
}
|
|
696
|
+
if (!this._isValidTimeFormat(value)) {
|
|
697
|
+
value = "";
|
|
698
|
+
}
|
|
699
|
+
let millis;
|
|
700
|
+
if (!this._masked && typeof this._parseCallback === "function") {
|
|
701
|
+
millis = this._parseCallback.call(null, value);
|
|
702
|
+
} else {
|
|
703
|
+
millis = this._convertTimeStringToMillis(value, this._use24HourTime, this._allowSeconds);
|
|
704
|
+
}
|
|
705
|
+
millis = this._validateMillis(millis);
|
|
706
|
+
this._trySetValue(millis);
|
|
707
|
+
}
|
|
708
|
+
_emitChangeEvent(value, force = false) {
|
|
709
|
+
return this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.CHANGE, value, true, !force);
|
|
710
|
+
}
|
|
711
|
+
_trySetValue(millis) {
|
|
712
|
+
if (millis === this._value) {
|
|
713
|
+
return false;
|
|
714
|
+
}
|
|
715
|
+
const timeString = millisToTimeString(millis, true, this._allowSeconds);
|
|
716
|
+
if (this._masked) {
|
|
717
|
+
this._adapter.emitInputEvent(TIME_PICKER_CONSTANTS.events.INPUT, timeString);
|
|
718
|
+
}
|
|
719
|
+
if (this._value !== millis) {
|
|
720
|
+
const canContinue = this._emitChangeEvent(timeString);
|
|
721
|
+
if (canContinue) {
|
|
722
|
+
this._setValue(millis);
|
|
723
|
+
return true;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return false;
|
|
727
|
+
}
|
|
728
|
+
_setValue(value) {
|
|
729
|
+
this._value = this._normalizeTimeValue(value);
|
|
730
|
+
}
|
|
731
|
+
_validateMillis(millis) {
|
|
732
|
+
if (typeof millis === "number") {
|
|
733
|
+
const isBelowMin = typeof this._min === "number" && millis < this._min;
|
|
734
|
+
const isAboveMax = typeof this._max === "number" && millis > this._max;
|
|
735
|
+
if (isBelowMin || isAboveMax) {
|
|
736
|
+
millis = null;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
if (typeof millis === "number" && this._restrictedTimes.length) {
|
|
740
|
+
if (this._restrictedTimes.includes(millis)) {
|
|
741
|
+
millis = null;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return millis;
|
|
745
|
+
}
|
|
746
|
+
_isValidTimeFormat(value) {
|
|
747
|
+
if (!this._masked && typeof this._validationCallback === "function") {
|
|
748
|
+
return this._validationCallback.call(this, value);
|
|
749
|
+
}
|
|
750
|
+
return isSupportedTimeFormat(value);
|
|
751
|
+
}
|
|
752
|
+
_isValidInputValue(value) {
|
|
753
|
+
return TWENTY_FOUR_HOUR_TIME_REGEX.test(value);
|
|
754
|
+
}
|
|
755
|
+
_onSelect(value) {
|
|
756
|
+
this._closeDropdown(true);
|
|
757
|
+
if (!value.isCustom && value.metadata === "now") {
|
|
758
|
+
value.time = getCurrentTimeOfDayMillis(this._allowSeconds);
|
|
759
|
+
}
|
|
760
|
+
if (value.isCustom) {
|
|
761
|
+
if (typeof value.customCallback === "function") {
|
|
762
|
+
const result = value.customCallback.call(null, value.metadata);
|
|
763
|
+
if (typeof result !== "number") {
|
|
764
|
+
throw new Error("Custom options must provide a time of day value in milliseconds.");
|
|
765
|
+
}
|
|
766
|
+
value.time = result;
|
|
767
|
+
} else {
|
|
768
|
+
throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
if (this._value === value.time) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
const timeString = millisToTimeString(value.time, true, this._allowSeconds);
|
|
775
|
+
const canContinue = this._emitChangeEvent(timeString);
|
|
776
|
+
if (!canContinue) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
this._applyValue(value.time);
|
|
780
|
+
this._selectInputText();
|
|
781
|
+
}
|
|
782
|
+
_selectInputText() {
|
|
783
|
+
window.requestAnimationFrame(() => {
|
|
784
|
+
window.requestAnimationFrame(() => {
|
|
785
|
+
if (this._adapter.isInputFocused()) {
|
|
786
|
+
this._adapter.selectInputText();
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
_applyValue(value, emitEvents = true) {
|
|
792
|
+
this._setValue(value);
|
|
793
|
+
const formattedValue = this._formatValue(this._value);
|
|
794
|
+
if (this._adapter.getInputValue() !== formattedValue) {
|
|
795
|
+
this._adapter.setInputValue(formattedValue, emitEvents);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
_normalizeTimeValue(value) {
|
|
799
|
+
if (value === null || value === void 0) {
|
|
800
|
+
return null;
|
|
801
|
+
} else if (value < 0) {
|
|
802
|
+
return 0;
|
|
803
|
+
} else if (value > TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MILLIS) {
|
|
804
|
+
return TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MILLIS;
|
|
805
|
+
}
|
|
806
|
+
return value;
|
|
807
|
+
}
|
|
808
|
+
_openDropdown() {
|
|
809
|
+
if (!this.allowDropdown) {
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
this._formatInputValue();
|
|
813
|
+
this._open = true;
|
|
814
|
+
this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.OPEN);
|
|
815
|
+
const options = this._generateTimeOptions();
|
|
816
|
+
const selectableOptions = options.filter((o) => !o.divider && !o.disabled);
|
|
817
|
+
let selectedValues = [];
|
|
818
|
+
let activeStartIndex;
|
|
819
|
+
if (this._value !== null) {
|
|
820
|
+
const optionIndex = this._findClosestOptionIndex(this._value, selectableOptions);
|
|
821
|
+
if (optionIndex >= 0) {
|
|
822
|
+
const isExactMatch = selectableOptions[optionIndex].value.time === this._value;
|
|
823
|
+
if (isExactMatch) {
|
|
824
|
+
selectedValues = [selectableOptions[optionIndex].value];
|
|
825
|
+
} else {
|
|
826
|
+
activeStartIndex = optionIndex;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
} else if (typeof this._startTime === "number") {
|
|
830
|
+
const optionIndex = this._findClosestOptionIndex(this._startTime, selectableOptions);
|
|
831
|
+
if (optionIndex >= 0 && optionIndex < selectableOptions.length) {
|
|
832
|
+
activeStartIndex = optionIndex;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
const config = {
|
|
836
|
+
id: `forge-time-picker-${this._identifier}`,
|
|
837
|
+
selectedValues,
|
|
838
|
+
syncWidth: true,
|
|
839
|
+
activeStartIndex,
|
|
840
|
+
popupClasses: this._popupClasses,
|
|
841
|
+
popupStatic: true,
|
|
842
|
+
type: "standard" /* Standard */,
|
|
843
|
+
options,
|
|
844
|
+
selectCallback: (value) => this._onSelect(value),
|
|
845
|
+
closeCallback: () => this._closeDropdown(true),
|
|
846
|
+
activeChangeCallback: (id) => this._adapter.setActiveDescendant(id),
|
|
847
|
+
targetWidthCallback: () => this._adapter.getTargetElementWidth(this._popupTarget)
|
|
848
|
+
};
|
|
849
|
+
this._adapter.attachDropdown(config);
|
|
850
|
+
this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.OPEN, void 0, false);
|
|
851
|
+
}
|
|
852
|
+
_closeDropdown(emitCloseEvent = false) {
|
|
853
|
+
this._open = false;
|
|
854
|
+
this._adapter.removeHostAttribute(TIME_PICKER_CONSTANTS.attributes.OPEN);
|
|
855
|
+
this._adapter.detachDropdown();
|
|
856
|
+
if (emitCloseEvent) {
|
|
857
|
+
this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.CLOSE, true, false);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
_findClosestOptionIndex(value, options) {
|
|
861
|
+
const closestItem = options.reduce((prev, curr) => {
|
|
862
|
+
return Math.abs((curr.value.time || 0) - value) < Math.abs((prev.value.time || 0) - value) ? curr : prev;
|
|
863
|
+
});
|
|
864
|
+
return options.indexOf(closestItem);
|
|
865
|
+
}
|
|
866
|
+
_formatInputValue(emitEvents = true) {
|
|
867
|
+
const inputValue = this._adapter.getInputValue();
|
|
868
|
+
if (this._allowInvalidTime && !this._masked && inputValue && !this._value) {
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
const formattedValue = this._formatValue(this._value);
|
|
872
|
+
if (inputValue !== formattedValue) {
|
|
873
|
+
this._adapter.setInputValue(formattedValue, emitEvents);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
_generateTimeOptions() {
|
|
877
|
+
const minMinutes = this._min !== null ? Math.max(millisToMinutes(this._min), 0) : 0;
|
|
878
|
+
const maxMinutes = this._max !== null ? Math.min(millisToMinutes(this._max), TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) : TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES;
|
|
879
|
+
const minuteStep = this._step;
|
|
880
|
+
const times = [];
|
|
881
|
+
let leadingOptions = [];
|
|
882
|
+
for (let totalMinutes = minMinutes; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {
|
|
883
|
+
if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {
|
|
884
|
+
break;
|
|
885
|
+
}
|
|
886
|
+
const millis = minutesToMillis(totalMinutes);
|
|
887
|
+
const disabled = this._restrictedTimes.includes(millis);
|
|
888
|
+
const label = millisToTimeString(millis, this._use24HourTime, false) || "";
|
|
889
|
+
const value = { time: millis };
|
|
890
|
+
times.push({ label, value, disabled });
|
|
891
|
+
}
|
|
892
|
+
const firstPmIndex = times.findIndex((t) => t.value.time / 1e3 / 60 >= 720);
|
|
893
|
+
if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {
|
|
894
|
+
times.splice(firstPmIndex, 0, { label: "", value: null, divider: true });
|
|
895
|
+
}
|
|
896
|
+
if (this._showNow) {
|
|
897
|
+
const value = { time: null, metadata: "now" };
|
|
898
|
+
leadingOptions.push({ label: "Now", value });
|
|
899
|
+
}
|
|
900
|
+
if (Array.isArray(this._customOptions) && this._customOptions.length) {
|
|
901
|
+
const options = this._customOptions.map((o) => {
|
|
902
|
+
const value = { time: null, metadata: o.value, isCustom: true, customCallback: o.toMilliseconds };
|
|
903
|
+
return { label: o.label, value };
|
|
904
|
+
});
|
|
905
|
+
leadingOptions = [...leadingOptions, ...options];
|
|
906
|
+
}
|
|
907
|
+
if (leadingOptions.length) {
|
|
908
|
+
times.splice(0, 0, { label: "", value: null, divider: true });
|
|
909
|
+
leadingOptions.forEach((o, index) => times.splice(index, 0, o));
|
|
910
|
+
}
|
|
911
|
+
return times;
|
|
912
|
+
}
|
|
913
|
+
_convertTimeStringToMillis(value, use24HourTime, allowSeconds) {
|
|
914
|
+
if (!value || !this._isValidTimeFormat(value)) {
|
|
915
|
+
value = "";
|
|
916
|
+
}
|
|
917
|
+
return timeStringToMillis(value, use24HourTime, allowSeconds);
|
|
918
|
+
}
|
|
919
|
+
_formatValue(value) {
|
|
920
|
+
if (!this._masked && typeof this._formatCallback === "function") {
|
|
921
|
+
return this._formatCallback.call(null, value, this._use24HourTime, this._allowSeconds);
|
|
922
|
+
}
|
|
923
|
+
return millisToTimeString(this._value, this._use24HourTime, this._allowSeconds) || "";
|
|
924
|
+
}
|
|
925
|
+
_warnInvalidFormat(value) {
|
|
926
|
+
console.warn(`The specified value "${value}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`);
|
|
927
|
+
}
|
|
928
|
+
get open() {
|
|
929
|
+
return this._open;
|
|
930
|
+
}
|
|
931
|
+
set open(value) {
|
|
932
|
+
if (this._open !== value) {
|
|
933
|
+
if (this._isInitialized) {
|
|
934
|
+
this._open = value;
|
|
935
|
+
if (this._open) {
|
|
936
|
+
this._openDropdown();
|
|
937
|
+
} else {
|
|
938
|
+
this._closeDropdown();
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
get masked() {
|
|
944
|
+
return this._masked;
|
|
945
|
+
}
|
|
946
|
+
set masked(value) {
|
|
947
|
+
if (this._masked !== value) {
|
|
948
|
+
this._masked = value;
|
|
949
|
+
if (this._isInitialized) {
|
|
950
|
+
if (this._masked) {
|
|
951
|
+
this._adapter.removeInputListener("input", this._inputListener);
|
|
952
|
+
this._applyMask();
|
|
953
|
+
} else {
|
|
954
|
+
this._adapter.destroyMask();
|
|
955
|
+
this._formatInputValue();
|
|
956
|
+
this._adapter.addInputListener("input", this._inputListener);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
get showMaskFormat() {
|
|
962
|
+
return this._showMaskFormat;
|
|
963
|
+
}
|
|
964
|
+
set showMaskFormat(value) {
|
|
965
|
+
if (this._showMaskFormat !== value) {
|
|
966
|
+
this._showMaskFormat = value;
|
|
967
|
+
if (this._isInitialized) {
|
|
968
|
+
this._applyMask();
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
get allowSeconds() {
|
|
973
|
+
return this._allowSeconds;
|
|
974
|
+
}
|
|
975
|
+
set allowSeconds(value) {
|
|
976
|
+
if (this._allowSeconds !== value) {
|
|
977
|
+
this._allowSeconds = !!value;
|
|
978
|
+
this._applyAllowSeconds();
|
|
979
|
+
if (this._isInitialized) {
|
|
980
|
+
this._applyMask();
|
|
981
|
+
this._formatInputValue();
|
|
982
|
+
}
|
|
983
|
+
this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS, `${!!value}`);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
get use24HourTime() {
|
|
987
|
+
return this._use24HourTime;
|
|
988
|
+
}
|
|
989
|
+
set use24HourTime(value) {
|
|
990
|
+
if (this._use24HourTime !== value) {
|
|
991
|
+
this._use24HourTime = !!value;
|
|
992
|
+
if (this._isInitialized) {
|
|
993
|
+
this._adapter.destroyMask();
|
|
994
|
+
this._formatInputValue();
|
|
995
|
+
this._applyMask();
|
|
996
|
+
}
|
|
997
|
+
this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME, `${!!value}`);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
get allowInvalidTime() {
|
|
1001
|
+
return this._allowInvalidTime;
|
|
1002
|
+
}
|
|
1003
|
+
set allowInvalidTime(value) {
|
|
1004
|
+
if (this._allowInvalidTime !== value) {
|
|
1005
|
+
this._allowInvalidTime = !!value;
|
|
1006
|
+
this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME, `${!!value}`);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
get value() {
|
|
1010
|
+
return millisToTimeString(this._value, true, this._allowSeconds);
|
|
1011
|
+
}
|
|
1012
|
+
set value(value) {
|
|
1013
|
+
if (value && !this._isValidInputValue(value)) {
|
|
1014
|
+
this._warnInvalidFormat(value);
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
const millis = this._validateMillis(this._convertTimeStringToMillis(value, true, true));
|
|
1018
|
+
this._setValue(millis);
|
|
1019
|
+
if (this._isInitialized) {
|
|
1020
|
+
this._applyValue(this._value);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
get min() {
|
|
1024
|
+
return millisToTimeString(this._min, true, this._allowSeconds);
|
|
1025
|
+
}
|
|
1026
|
+
set min(value) {
|
|
1027
|
+
if (this._min !== value) {
|
|
1028
|
+
if (value && !this._isValidInputValue(value)) {
|
|
1029
|
+
this._warnInvalidFormat(value);
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
this._min = this._convertTimeStringToMillis(value, true, this._allowSeconds);
|
|
1033
|
+
const millis = this._validateMillis(this._value);
|
|
1034
|
+
this._setValue(millis);
|
|
1035
|
+
if (this._isInitialized) {
|
|
1036
|
+
this._applyValue(millis);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
get max() {
|
|
1041
|
+
return millisToTimeString(this._max, true, this._allowSeconds);
|
|
1042
|
+
}
|
|
1043
|
+
set max(value) {
|
|
1044
|
+
if (this._max !== value) {
|
|
1045
|
+
if (value && !this._isValidInputValue(value)) {
|
|
1046
|
+
this._warnInvalidFormat(value);
|
|
1047
|
+
return;
|
|
1048
|
+
}
|
|
1049
|
+
this._max = this._convertTimeStringToMillis(value, true, this._allowSeconds);
|
|
1050
|
+
const millis = this._validateMillis(this._value);
|
|
1051
|
+
this._setValue(millis);
|
|
1052
|
+
if (this._isInitialized) {
|
|
1053
|
+
this._applyValue(millis);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
get restrictedTimes() {
|
|
1058
|
+
return this._restrictedTimes.map((t) => millisToTimeString(t, true, this._allowSeconds)).filter((v) => typeof v === "string");
|
|
1059
|
+
}
|
|
1060
|
+
set restrictedTimes(value) {
|
|
1061
|
+
if (!Array.isArray(value)) {
|
|
1062
|
+
value = [];
|
|
1063
|
+
}
|
|
1064
|
+
this._restrictedTimes = value.filter((v) => typeof v === "string").map((v) => this._convertTimeStringToMillis(v, true, true)).filter((v) => typeof v === "number");
|
|
1065
|
+
}
|
|
1066
|
+
get startTime() {
|
|
1067
|
+
return millisToTimeString(this._startTime, true, this._allowSeconds);
|
|
1068
|
+
}
|
|
1069
|
+
set startTime(value) {
|
|
1070
|
+
if (this._startTime !== value) {
|
|
1071
|
+
if (value && !this._isValidInputValue(value)) {
|
|
1072
|
+
this._warnInvalidFormat(value);
|
|
1073
|
+
return;
|
|
1074
|
+
}
|
|
1075
|
+
this._startTime = this._convertTimeStringToMillis(value, true, this._allowSeconds);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
get step() {
|
|
1079
|
+
return this._step;
|
|
1080
|
+
}
|
|
1081
|
+
set step(value) {
|
|
1082
|
+
this._step = value;
|
|
1083
|
+
}
|
|
1084
|
+
get allowInput() {
|
|
1085
|
+
return this._allowInput;
|
|
1086
|
+
}
|
|
1087
|
+
set allowInput(value) {
|
|
1088
|
+
if (this._allowInput !== value) {
|
|
1089
|
+
this._allowInput = value;
|
|
1090
|
+
if (this._isInitialized) {
|
|
1091
|
+
this._applyAllowInput();
|
|
1092
|
+
this._applyMask();
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
get popupTarget() {
|
|
1097
|
+
return this._popupTarget;
|
|
1098
|
+
}
|
|
1099
|
+
set popupTarget(value) {
|
|
1100
|
+
if (this._popupTarget !== value) {
|
|
1101
|
+
this._popupTarget = value;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
get showNow() {
|
|
1105
|
+
return this._showNow;
|
|
1106
|
+
}
|
|
1107
|
+
set showNow(value) {
|
|
1108
|
+
if (this._showNow !== value) {
|
|
1109
|
+
this._showNow = value;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
get customOptions() {
|
|
1113
|
+
return this._customOptions;
|
|
1114
|
+
}
|
|
1115
|
+
set customOptions(value) {
|
|
1116
|
+
this._customOptions = Array.isArray(value) ? value : [];
|
|
1117
|
+
}
|
|
1118
|
+
set validationCallback(cb) {
|
|
1119
|
+
this._validationCallback = cb;
|
|
1120
|
+
if (this._isInitialized) {
|
|
1121
|
+
this._applyMask();
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
set parseCallback(cb) {
|
|
1125
|
+
this._parseCallback = cb;
|
|
1126
|
+
}
|
|
1127
|
+
set formatCallback(cb) {
|
|
1128
|
+
this._formatCallback = cb;
|
|
1129
|
+
}
|
|
1130
|
+
set coercionCallback(cb) {
|
|
1131
|
+
this._coercionCallback = cb;
|
|
1132
|
+
}
|
|
1133
|
+
set prepareMaskCallback(cb) {
|
|
1134
|
+
this._prepareMaskCallback = cb;
|
|
1135
|
+
if (this._isInitialized) {
|
|
1136
|
+
this._applyMask();
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
get disabled() {
|
|
1140
|
+
return this._disabled;
|
|
1141
|
+
}
|
|
1142
|
+
set disabled(value) {
|
|
1143
|
+
if (this._disabled !== value) {
|
|
1144
|
+
this._disabled = !!value;
|
|
1145
|
+
if (this._isInitialized) {
|
|
1146
|
+
this._applyDisabled();
|
|
1147
|
+
}
|
|
1148
|
+
this._adapter.toggleHostAttribute(TIME_PICKER_CONSTANTS.attributes.DISABLED, this._disabled);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
get popupClasses() {
|
|
1152
|
+
if (Array.isArray(this._popupClasses)) {
|
|
1153
|
+
return [...this._popupClasses];
|
|
1154
|
+
}
|
|
1155
|
+
return this._popupClasses;
|
|
1156
|
+
}
|
|
1157
|
+
set popupClasses(value) {
|
|
1158
|
+
if (Array.isArray(value)) {
|
|
1159
|
+
this._popupClasses = [...value];
|
|
1160
|
+
} else {
|
|
1161
|
+
this._popupClasses = [value];
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
get allowDropdown() {
|
|
1165
|
+
return this._allowDropdown;
|
|
1166
|
+
}
|
|
1167
|
+
set allowDropdown(value) {
|
|
1168
|
+
if (this._allowDropdown !== value) {
|
|
1169
|
+
this._allowDropdown = value;
|
|
1170
|
+
if (this._isInitialized) {
|
|
1171
|
+
this._applyAllowDropdown();
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
// dist/build/lib/staging/src/time-picker/time-picker.ts
|
|
1178
|
+
var template = "<template><slot></slot></template>";
|
|
1179
|
+
var styles = ":host{display:block}:host([hidden]){display:none}";
|
|
1180
|
+
var TimePickerComponent = class extends BaseComponent {
|
|
1181
|
+
constructor() {
|
|
1182
|
+
super();
|
|
1183
|
+
IconRegistry.define([tylIconClockOutline, tylIconClose]);
|
|
1184
|
+
attachShadowTemplate(this, template, styles);
|
|
1185
|
+
this._foundation = new TimePickerFoundation(new TimePickerAdapter(this));
|
|
1186
|
+
}
|
|
1187
|
+
static get observedAttributes() {
|
|
1188
|
+
return [
|
|
1189
|
+
TIME_PICKER_CONSTANTS.attributes.VALUE,
|
|
1190
|
+
TIME_PICKER_CONSTANTS.attributes.OPEN,
|
|
1191
|
+
TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS,
|
|
1192
|
+
TIME_PICKER_CONSTANTS.attributes.MASKED,
|
|
1193
|
+
TIME_PICKER_CONSTANTS.attributes.SHOW_MASK_FORMAT,
|
|
1194
|
+
TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME,
|
|
1195
|
+
TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME,
|
|
1196
|
+
TIME_PICKER_CONSTANTS.attributes.MIN,
|
|
1197
|
+
TIME_PICKER_CONSTANTS.attributes.MAX,
|
|
1198
|
+
TIME_PICKER_CONSTANTS.attributes.START_TIME,
|
|
1199
|
+
TIME_PICKER_CONSTANTS.attributes.STEP,
|
|
1200
|
+
TIME_PICKER_CONSTANTS.attributes.ALLOW_INPUT,
|
|
1201
|
+
TIME_PICKER_CONSTANTS.attributes.SHOW_NOW,
|
|
1202
|
+
TIME_PICKER_CONSTANTS.attributes.DISABLED,
|
|
1203
|
+
TIME_PICKER_CONSTANTS.attributes.POPUP_CLASSES,
|
|
1204
|
+
TIME_PICKER_CONSTANTS.attributes.ALLOW_DROPDOWN
|
|
1205
|
+
];
|
|
1206
|
+
}
|
|
1207
|
+
connectedCallback() {
|
|
1208
|
+
if (this.querySelector(TIME_PICKER_CONSTANTS.selectors.INPUT)) {
|
|
1209
|
+
this._foundation.initialize();
|
|
1210
|
+
} else {
|
|
1211
|
+
ensureChild(this, TIME_PICKER_CONSTANTS.selectors.INPUT).then(() => this._foundation.initialize());
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
disconnectedCallback() {
|
|
1215
|
+
this._foundation.disconnect();
|
|
1216
|
+
}
|
|
1217
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
1218
|
+
switch (name) {
|
|
1219
|
+
case TIME_PICKER_CONSTANTS.attributes.VALUE:
|
|
1220
|
+
this.value = newValue;
|
|
1221
|
+
break;
|
|
1222
|
+
case TIME_PICKER_CONSTANTS.attributes.OPEN:
|
|
1223
|
+
this.open = coerceBoolean(newValue);
|
|
1224
|
+
break;
|
|
1225
|
+
case TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS:
|
|
1226
|
+
this.allowSeconds = coerceBoolean(newValue);
|
|
1227
|
+
break;
|
|
1228
|
+
case TIME_PICKER_CONSTANTS.attributes.MASKED:
|
|
1229
|
+
this.masked = coerceBoolean(newValue);
|
|
1230
|
+
break;
|
|
1231
|
+
case TIME_PICKER_CONSTANTS.attributes.SHOW_MASK_FORMAT:
|
|
1232
|
+
this.showMaskFormat = coerceBoolean(newValue);
|
|
1233
|
+
break;
|
|
1234
|
+
case TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME:
|
|
1235
|
+
this.use24HourTime = coerceBoolean(newValue);
|
|
1236
|
+
break;
|
|
1237
|
+
case TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME:
|
|
1238
|
+
this.allowInvalidTime = coerceBoolean(newValue);
|
|
1239
|
+
break;
|
|
1240
|
+
case TIME_PICKER_CONSTANTS.attributes.SHOW_NOW:
|
|
1241
|
+
this.showNow = coerceBoolean(newValue);
|
|
1242
|
+
break;
|
|
1243
|
+
case TIME_PICKER_CONSTANTS.attributes.MIN:
|
|
1244
|
+
this.min = newValue;
|
|
1245
|
+
break;
|
|
1246
|
+
case TIME_PICKER_CONSTANTS.attributes.MAX:
|
|
1247
|
+
this.max = newValue;
|
|
1248
|
+
break;
|
|
1249
|
+
case TIME_PICKER_CONSTANTS.attributes.START_TIME:
|
|
1250
|
+
this.startTime = newValue;
|
|
1251
|
+
break;
|
|
1252
|
+
case TIME_PICKER_CONSTANTS.attributes.STEP:
|
|
1253
|
+
this.step = coerceNumber(newValue);
|
|
1254
|
+
break;
|
|
1255
|
+
case TIME_PICKER_CONSTANTS.attributes.ALLOW_INPUT:
|
|
1256
|
+
this.allowInput = coerceBoolean(newValue);
|
|
1257
|
+
break;
|
|
1258
|
+
case TIME_PICKER_CONSTANTS.attributes.DISABLED:
|
|
1259
|
+
this.disabled = coerceBoolean(newValue);
|
|
1260
|
+
break;
|
|
1261
|
+
case TIME_PICKER_CONSTANTS.attributes.POPUP_CLASSES:
|
|
1262
|
+
this.popupClasses = newValue;
|
|
1263
|
+
break;
|
|
1264
|
+
case TIME_PICKER_CONSTANTS.attributes.ALLOW_DROPDOWN:
|
|
1265
|
+
this.allowDropdown = coerceBoolean(newValue);
|
|
1266
|
+
break;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
__decorateClass([
|
|
1271
|
+
FoundationProperty()
|
|
1272
|
+
], TimePickerComponent.prototype, "value", 2);
|
|
1273
|
+
__decorateClass([
|
|
1274
|
+
FoundationProperty()
|
|
1275
|
+
], TimePickerComponent.prototype, "open", 2);
|
|
1276
|
+
__decorateClass([
|
|
1277
|
+
FoundationProperty()
|
|
1278
|
+
], TimePickerComponent.prototype, "allowSeconds", 2);
|
|
1279
|
+
__decorateClass([
|
|
1280
|
+
FoundationProperty()
|
|
1281
|
+
], TimePickerComponent.prototype, "masked", 2);
|
|
1282
|
+
__decorateClass([
|
|
1283
|
+
FoundationProperty()
|
|
1284
|
+
], TimePickerComponent.prototype, "showMaskFormat", 2);
|
|
1285
|
+
__decorateClass([
|
|
1286
|
+
FoundationProperty()
|
|
1287
|
+
], TimePickerComponent.prototype, "use24HourTime", 2);
|
|
1288
|
+
__decorateClass([
|
|
1289
|
+
FoundationProperty()
|
|
1290
|
+
], TimePickerComponent.prototype, "allowInvalidTime", 2);
|
|
1291
|
+
__decorateClass([
|
|
1292
|
+
FoundationProperty()
|
|
1293
|
+
], TimePickerComponent.prototype, "min", 2);
|
|
1294
|
+
__decorateClass([
|
|
1295
|
+
FoundationProperty()
|
|
1296
|
+
], TimePickerComponent.prototype, "max", 2);
|
|
1297
|
+
__decorateClass([
|
|
1298
|
+
FoundationProperty()
|
|
1299
|
+
], TimePickerComponent.prototype, "restrictedTimes", 2);
|
|
1300
|
+
__decorateClass([
|
|
1301
|
+
FoundationProperty()
|
|
1302
|
+
], TimePickerComponent.prototype, "startTime", 2);
|
|
1303
|
+
__decorateClass([
|
|
1304
|
+
FoundationProperty()
|
|
1305
|
+
], TimePickerComponent.prototype, "step", 2);
|
|
1306
|
+
__decorateClass([
|
|
1307
|
+
FoundationProperty()
|
|
1308
|
+
], TimePickerComponent.prototype, "allowInput", 2);
|
|
1309
|
+
__decorateClass([
|
|
1310
|
+
FoundationProperty()
|
|
1311
|
+
], TimePickerComponent.prototype, "showNow", 2);
|
|
1312
|
+
__decorateClass([
|
|
1313
|
+
FoundationProperty()
|
|
1314
|
+
], TimePickerComponent.prototype, "customOptions", 2);
|
|
1315
|
+
__decorateClass([
|
|
1316
|
+
FoundationProperty()
|
|
1317
|
+
], TimePickerComponent.prototype, "validationCallback", 2);
|
|
1318
|
+
__decorateClass([
|
|
1319
|
+
FoundationProperty()
|
|
1320
|
+
], TimePickerComponent.prototype, "parseCallback", 2);
|
|
1321
|
+
__decorateClass([
|
|
1322
|
+
FoundationProperty()
|
|
1323
|
+
], TimePickerComponent.prototype, "formatCallback", 2);
|
|
1324
|
+
__decorateClass([
|
|
1325
|
+
FoundationProperty()
|
|
1326
|
+
], TimePickerComponent.prototype, "coercionCallback", 2);
|
|
1327
|
+
__decorateClass([
|
|
1328
|
+
FoundationProperty()
|
|
1329
|
+
], TimePickerComponent.prototype, "prepareMaskCallback", 2);
|
|
1330
|
+
__decorateClass([
|
|
1331
|
+
FoundationProperty()
|
|
1332
|
+
], TimePickerComponent.prototype, "disabled", 2);
|
|
1333
|
+
__decorateClass([
|
|
1334
|
+
FoundationProperty()
|
|
1335
|
+
], TimePickerComponent.prototype, "popupClasses", 2);
|
|
1336
|
+
__decorateClass([
|
|
1337
|
+
FoundationProperty()
|
|
1338
|
+
], TimePickerComponent.prototype, "allowDropdown", 2);
|
|
1339
|
+
__decorateClass([
|
|
1340
|
+
FoundationProperty()
|
|
1341
|
+
], TimePickerComponent.prototype, "popupTarget", 2);
|
|
1342
|
+
TimePickerComponent = __decorateClass([
|
|
1343
|
+
CustomElement({
|
|
1344
|
+
name: TIME_PICKER_CONSTANTS.elementName,
|
|
1345
|
+
dependencies: [
|
|
1346
|
+
ListComponent,
|
|
1347
|
+
ListItemComponent,
|
|
1348
|
+
IconButtonComponent,
|
|
1349
|
+
IconComponent,
|
|
1350
|
+
PopupComponent,
|
|
1351
|
+
IconComponent,
|
|
1352
|
+
DialogComponent
|
|
1353
|
+
]
|
|
1354
|
+
})
|
|
1355
|
+
], TimePickerComponent);
|
|
1356
|
+
|
|
1357
|
+
// dist/build/lib/staging/src/time-picker/time-picker-component-delegate.ts
|
|
1358
|
+
var TimePickerComponentDelegate = class extends FormFieldComponentDelegate {
|
|
1359
|
+
constructor(config) {
|
|
1360
|
+
super(config);
|
|
1361
|
+
}
|
|
1362
|
+
_build() {
|
|
1363
|
+
const timePicker = document.createElement(TIME_PICKER_CONSTANTS.elementName);
|
|
1364
|
+
this._attachTextField(timePicker);
|
|
1365
|
+
return timePicker;
|
|
1366
|
+
}
|
|
1367
|
+
get inputElement() {
|
|
1368
|
+
return this._textFieldDelegate.inputElement;
|
|
1369
|
+
}
|
|
1370
|
+
get textFieldElement() {
|
|
1371
|
+
return this._textFieldDelegate.element;
|
|
1372
|
+
}
|
|
1373
|
+
get value() {
|
|
1374
|
+
return this._element.value;
|
|
1375
|
+
}
|
|
1376
|
+
set value(value) {
|
|
1377
|
+
this._element.value = value;
|
|
1378
|
+
}
|
|
1379
|
+
get disabled() {
|
|
1380
|
+
return this._element.disabled;
|
|
1381
|
+
}
|
|
1382
|
+
set disabled(value) {
|
|
1383
|
+
this._element.disabled = value;
|
|
1384
|
+
}
|
|
1385
|
+
get invalid() {
|
|
1386
|
+
return this._textFieldDelegate.invalid || false;
|
|
1387
|
+
}
|
|
1388
|
+
set invalid(value) {
|
|
1389
|
+
this._textFieldDelegate.invalid = value;
|
|
1390
|
+
}
|
|
1391
|
+
onChange(listener) {
|
|
1392
|
+
this._element.addEventListener(TIME_PICKER_CONSTANTS.events.CHANGE, (evt) => {
|
|
1393
|
+
var _a;
|
|
1394
|
+
return listener((_a = evt.detail) != null ? _a : "");
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
onInput(listener) {
|
|
1398
|
+
if (this._element.masked) {
|
|
1399
|
+
this._element.addEventListener(TIME_PICKER_CONSTANTS.events.INPUT, (evt) => {
|
|
1400
|
+
var _a;
|
|
1401
|
+
return listener((_a = evt.detail) != null ? _a : "");
|
|
1402
|
+
});
|
|
1403
|
+
} else {
|
|
1404
|
+
this._textFieldDelegate.inputElement.addEventListener("input", (evt) => listener(evt.target.value));
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
onFocus(listener) {
|
|
1408
|
+
this._textFieldDelegate.inputElement.addEventListener("focus", (evt) => listener(evt));
|
|
1409
|
+
}
|
|
1410
|
+
onBlur(listener) {
|
|
1411
|
+
this._textFieldDelegate.inputElement.addEventListener("blur", (evt) => listener(evt));
|
|
1412
|
+
}
|
|
1413
|
+
_attachTextField(component) {
|
|
1414
|
+
var _a, _b, _c, _d;
|
|
1415
|
+
const textFieldConfig = {
|
|
1416
|
+
props: __spreadValues({}, (_b = (_a = this._config.options) == null ? void 0 : _a.textFieldDelegateConfig) == null ? void 0 : _b.props),
|
|
1417
|
+
options: __spreadValues({}, (_d = (_c = this._config.options) == null ? void 0 : _c.textFieldDelegateConfig) == null ? void 0 : _d.options)
|
|
1418
|
+
};
|
|
1419
|
+
this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);
|
|
1420
|
+
component.appendChild(this._textFieldDelegate.element);
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
// dist/build/lib/staging/src/time-picker/index.ts
|
|
1425
|
+
function defineTimePickerComponent() {
|
|
1426
|
+
defineCustomElement(TimePickerComponent);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export {
|
|
1430
|
+
TIME_PICKER_CONSTANTS,
|
|
1431
|
+
TimePickerAdapter,
|
|
1432
|
+
timeStringToMillis,
|
|
1433
|
+
millisToTimeString,
|
|
1434
|
+
millisToHours,
|
|
1435
|
+
millisToMinutesClamped,
|
|
1436
|
+
millisToMinutes,
|
|
1437
|
+
millisToSecondsClamped,
|
|
1438
|
+
millisToSeconds,
|
|
1439
|
+
hoursToMillis,
|
|
1440
|
+
minutesToMillis,
|
|
1441
|
+
secondsToMillis,
|
|
1442
|
+
stripSecondsFromMillis,
|
|
1443
|
+
getCurrentTimeOfDayMillis,
|
|
1444
|
+
mergeDateWithTime,
|
|
1445
|
+
TimePickerFoundation,
|
|
1446
|
+
TimePickerComponent,
|
|
1447
|
+
TimePickerComponentDelegate,
|
|
1448
|
+
defineTimePickerComponent
|
|
1449
|
+
};
|
|
1450
|
+
//# sourceMappingURL=chunk.2FXYTBYG.js.map
|