@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.
Files changed (444) hide show
  1. package/README.md +30 -13
  2. package/dist/esm/accordion/index.js +39 -0
  3. package/dist/esm/accordion/index.js.map +7 -0
  4. package/dist/esm/app-bar/help-button/index.js +58 -0
  5. package/dist/esm/app-bar/help-button/index.js.map +7 -0
  6. package/dist/esm/app-bar/index.js +136 -0
  7. package/dist/esm/app-bar/index.js.map +7 -0
  8. package/dist/esm/app-bar/menu-button/index.js +41 -0
  9. package/dist/esm/app-bar/menu-button/index.js.map +7 -0
  10. package/dist/esm/app-bar/notification-button/index.js +46 -0
  11. package/dist/esm/app-bar/notification-button/index.js.map +7 -0
  12. package/dist/esm/app-bar/profile-button/index.js +51 -0
  13. package/dist/esm/app-bar/profile-button/index.js.map +7 -0
  14. package/dist/esm/app-bar/search/index.js +43 -0
  15. package/dist/esm/app-bar/search/index.js.map +7 -0
  16. package/dist/esm/autocomplete/index.js +77 -0
  17. package/dist/esm/autocomplete/index.js.map +7 -0
  18. package/dist/esm/avatar/index.js +33 -0
  19. package/dist/esm/avatar/index.js.map +7 -0
  20. package/dist/esm/backdrop/index.js +28 -0
  21. package/dist/esm/backdrop/index.js.map +7 -0
  22. package/dist/esm/badge/index.js +31 -0
  23. package/dist/esm/badge/index.js.map +7 -0
  24. package/dist/esm/banner/index.js +45 -0
  25. package/dist/esm/banner/index.js.map +7 -0
  26. package/dist/esm/bottom-sheet/index.js +45 -0
  27. package/dist/esm/bottom-sheet/index.js.map +7 -0
  28. package/dist/esm/busy-indicator/index.js +37 -0
  29. package/dist/esm/busy-indicator/index.js.map +7 -0
  30. package/dist/esm/button/index.js +29 -0
  31. package/dist/esm/button/index.js.map +7 -0
  32. package/dist/esm/button-toggle/button-toggle/index.js +33 -0
  33. package/dist/esm/button-toggle/button-toggle/index.js.map +7 -0
  34. package/dist/esm/button-toggle/button-toggle-group/index.js +32 -0
  35. package/dist/esm/button-toggle/button-toggle-group/index.js.map +7 -0
  36. package/dist/esm/button-toggle/index.js +46 -0
  37. package/dist/esm/button-toggle/index.js.map +7 -0
  38. package/dist/esm/calendar/calendar-dropdown/index.js +35 -0
  39. package/dist/esm/calendar/calendar-dropdown/index.js.map +7 -0
  40. package/dist/esm/calendar/calendar-menu/index.js +48 -0
  41. package/dist/esm/calendar/calendar-menu/index.js.map +7 -0
  42. package/dist/esm/calendar/core/index.js +13 -0
  43. package/dist/esm/calendar/core/index.js.map +7 -0
  44. package/dist/esm/calendar/index.js +199 -0
  45. package/dist/esm/calendar/index.js.map +7 -0
  46. package/dist/esm/card/index.js +22 -0
  47. package/dist/esm/card/index.js.map +7 -0
  48. package/dist/esm/checkbox/index.js +44 -0
  49. package/dist/esm/checkbox/index.js.map +7 -0
  50. package/dist/esm/chip-field/index.js +51 -0
  51. package/dist/esm/chip-field/index.js.map +7 -0
  52. package/dist/esm/chips/chip/index.js +42 -0
  53. package/dist/esm/chips/chip/index.js.map +7 -0
  54. package/dist/esm/chips/chip-set/index.js +42 -0
  55. package/dist/esm/chips/chip-set/index.js.map +7 -0
  56. package/dist/esm/chips/index.js +55 -0
  57. package/dist/esm/chips/index.js.map +7 -0
  58. package/dist/esm/chunks/chunk.2F6PST3N.js +476 -0
  59. package/dist/esm/chunks/chunk.2F6PST3N.js.map +7 -0
  60. package/dist/esm/chunks/chunk.2FXYTBYG.js +1450 -0
  61. package/dist/esm/chunks/chunk.2FXYTBYG.js.map +7 -0
  62. package/dist/esm/chunks/chunk.2LQMHAC7.js +187 -0
  63. package/dist/esm/chunks/chunk.2LQMHAC7.js.map +7 -0
  64. package/dist/esm/chunks/chunk.2LSEVYAC.js +342 -0
  65. package/dist/esm/chunks/chunk.2LSEVYAC.js.map +7 -0
  66. package/dist/esm/chunks/chunk.2NUAEZY7.js +221 -0
  67. package/dist/esm/chunks/chunk.2NUAEZY7.js.map +7 -0
  68. package/dist/esm/chunks/chunk.35U3UPDV.js +70 -0
  69. package/dist/esm/chunks/chunk.35U3UPDV.js.map +7 -0
  70. package/dist/esm/chunks/chunk.3KCCCXWS.js +344 -0
  71. package/dist/esm/chunks/chunk.3KCCCXWS.js.map +7 -0
  72. package/dist/esm/chunks/chunk.3NOZRZ7R.js +145 -0
  73. package/dist/esm/chunks/chunk.3NOZRZ7R.js.map +7 -0
  74. package/dist/esm/chunks/chunk.3ZKORL4I.js +212 -0
  75. package/dist/esm/chunks/chunk.3ZKORL4I.js.map +7 -0
  76. package/dist/esm/chunks/chunk.4BG22DGY.js +317 -0
  77. package/dist/esm/chunks/chunk.4BG22DGY.js.map +7 -0
  78. package/dist/esm/chunks/chunk.4HQ5VELO.js +793 -0
  79. package/dist/esm/chunks/chunk.4HQ5VELO.js.map +7 -0
  80. package/dist/esm/chunks/chunk.4JURZYE4.js +410 -0
  81. package/dist/esm/chunks/chunk.4JURZYE4.js.map +7 -0
  82. package/dist/esm/chunks/chunk.4UKSUUTX.js +296 -0
  83. package/dist/esm/chunks/chunk.4UKSUUTX.js.map +7 -0
  84. package/dist/esm/chunks/chunk.4V5O2CPU.js +417 -0
  85. package/dist/esm/chunks/chunk.4V5O2CPU.js.map +7 -0
  86. package/dist/esm/chunks/chunk.52F6VUCF.js +273 -0
  87. package/dist/esm/chunks/chunk.52F6VUCF.js.map +7 -0
  88. package/dist/esm/chunks/chunk.5EEEKOOK.js +552 -0
  89. package/dist/esm/chunks/chunk.5EEEKOOK.js.map +7 -0
  90. package/dist/esm/chunks/chunk.5NXVVSTU.js +243 -0
  91. package/dist/esm/chunks/chunk.5NXVVSTU.js.map +7 -0
  92. package/dist/esm/chunks/chunk.5VKAVHLM.js +610 -0
  93. package/dist/esm/chunks/chunk.5VKAVHLM.js.map +7 -0
  94. package/dist/esm/chunks/chunk.6KTLOA7V.js +6 -0
  95. package/dist/esm/chunks/chunk.6KTLOA7V.js.map +7 -0
  96. package/dist/esm/chunks/chunk.6V463G4I.js +105 -0
  97. package/dist/esm/chunks/chunk.6V463G4I.js.map +7 -0
  98. package/dist/esm/chunks/chunk.7FC5CPLE.js +603 -0
  99. package/dist/esm/chunks/chunk.7FC5CPLE.js.map +7 -0
  100. package/dist/esm/chunks/chunk.7G2S3DCM.js +458 -0
  101. package/dist/esm/chunks/chunk.7G2S3DCM.js.map +7 -0
  102. package/dist/esm/chunks/chunk.7I2XNJBL.js +593 -0
  103. package/dist/esm/chunks/chunk.7I2XNJBL.js.map +7 -0
  104. package/dist/esm/chunks/chunk.7KILTPJ6.js +72 -0
  105. package/dist/esm/chunks/chunk.7KILTPJ6.js.map +7 -0
  106. package/dist/esm/chunks/chunk.7XGNGXLR.js +648 -0
  107. package/dist/esm/chunks/chunk.7XGNGXLR.js.map +7 -0
  108. package/dist/esm/chunks/chunk.7Y4NHCJH.js +338 -0
  109. package/dist/esm/chunks/chunk.7Y4NHCJH.js.map +7 -0
  110. package/dist/esm/chunks/chunk.AHQ6QX3J.js +716 -0
  111. package/dist/esm/chunks/chunk.AHQ6QX3J.js.map +7 -0
  112. package/dist/esm/chunks/chunk.AYOZGYGO.js +21 -0
  113. package/dist/esm/chunks/chunk.AYOZGYGO.js.map +7 -0
  114. package/dist/esm/chunks/chunk.BKMWXPAS.js +439 -0
  115. package/dist/esm/chunks/chunk.BKMWXPAS.js.map +7 -0
  116. package/dist/esm/chunks/chunk.BOWCSPCH.js +2428 -0
  117. package/dist/esm/chunks/chunk.BOWCSPCH.js.map +7 -0
  118. package/dist/esm/chunks/chunk.BYN27JXZ.js +51 -0
  119. package/dist/esm/chunks/chunk.BYN27JXZ.js.map +7 -0
  120. package/dist/esm/chunks/chunk.BZPQIDQP.js +602 -0
  121. package/dist/esm/chunks/chunk.BZPQIDQP.js.map +7 -0
  122. package/dist/esm/chunks/chunk.C2MR3RDF.js +202 -0
  123. package/dist/esm/chunks/chunk.C2MR3RDF.js.map +7 -0
  124. package/dist/esm/chunks/chunk.C64YUJHS.js +55 -0
  125. package/dist/esm/chunks/chunk.C64YUJHS.js.map +7 -0
  126. package/dist/esm/chunks/chunk.CGHKW6S6.js +683 -0
  127. package/dist/esm/chunks/chunk.CGHKW6S6.js.map +7 -0
  128. package/dist/esm/chunks/chunk.CKS5A4YN.js +6 -0
  129. package/dist/esm/chunks/chunk.CKS5A4YN.js.map +7 -0
  130. package/dist/esm/chunks/chunk.COF6DD6T.js +293 -0
  131. package/dist/esm/chunks/chunk.COF6DD6T.js.map +7 -0
  132. package/dist/esm/chunks/chunk.D4XU5MZN.js +1203 -0
  133. package/dist/esm/chunks/chunk.D4XU5MZN.js.map +7 -0
  134. package/dist/esm/chunks/chunk.D5DMZ7ZG.js +350 -0
  135. package/dist/esm/chunks/chunk.D5DMZ7ZG.js.map +7 -0
  136. package/dist/esm/chunks/chunk.DB7ZQBES.js +244 -0
  137. package/dist/esm/chunks/chunk.DB7ZQBES.js.map +7 -0
  138. package/dist/esm/chunks/chunk.E4NCI7MS.js +6 -0
  139. package/dist/esm/chunks/chunk.E4NCI7MS.js.map +7 -0
  140. package/dist/esm/chunks/chunk.EA7XMXI5.js +200 -0
  141. package/dist/esm/chunks/chunk.EA7XMXI5.js.map +7 -0
  142. package/dist/esm/chunks/chunk.EARNUKJ2.js +401 -0
  143. package/dist/esm/chunks/chunk.EARNUKJ2.js.map +7 -0
  144. package/dist/esm/chunks/chunk.EKIW7VYG.js +419 -0
  145. package/dist/esm/chunks/chunk.EKIW7VYG.js.map +7 -0
  146. package/dist/esm/chunks/chunk.EL6B2ODN.js +52 -0
  147. package/dist/esm/chunks/chunk.EL6B2ODN.js.map +7 -0
  148. package/dist/esm/chunks/chunk.ETP6HSXO.js +513 -0
  149. package/dist/esm/chunks/chunk.ETP6HSXO.js.map +7 -0
  150. package/dist/esm/chunks/chunk.ETQIBLKP.js +978 -0
  151. package/dist/esm/chunks/chunk.ETQIBLKP.js.map +7 -0
  152. package/dist/esm/chunks/chunk.EWQENJ4W.js +505 -0
  153. package/dist/esm/chunks/chunk.EWQENJ4W.js.map +7 -0
  154. package/dist/esm/chunks/chunk.EY57VTRF.js +33 -0
  155. package/dist/esm/chunks/chunk.EY57VTRF.js.map +7 -0
  156. package/dist/esm/chunks/chunk.FBUQQD2T.js +732 -0
  157. package/dist/esm/chunks/chunk.FBUQQD2T.js.map +7 -0
  158. package/dist/esm/chunks/chunk.FMMPWQKC.js +439 -0
  159. package/dist/esm/chunks/chunk.FMMPWQKC.js.map +7 -0
  160. package/dist/esm/chunks/chunk.FWJ7SIFA.js +433 -0
  161. package/dist/esm/chunks/chunk.FWJ7SIFA.js.map +7 -0
  162. package/dist/esm/chunks/chunk.FZQCBRPK.js +6 -0
  163. package/dist/esm/chunks/chunk.FZQCBRPK.js.map +7 -0
  164. package/dist/esm/chunks/chunk.G6FY472A.js +658 -0
  165. package/dist/esm/chunks/chunk.G6FY472A.js.map +7 -0
  166. package/dist/esm/chunks/chunk.GS2AXUCN.js +150 -0
  167. package/dist/esm/chunks/chunk.GS2AXUCN.js.map +7 -0
  168. package/dist/esm/chunks/chunk.HHHMDDTU.js +297 -0
  169. package/dist/esm/chunks/chunk.HHHMDDTU.js.map +7 -0
  170. package/dist/esm/chunks/chunk.HZISALRH.js +20 -0
  171. package/dist/esm/chunks/chunk.HZISALRH.js.map +7 -0
  172. package/dist/esm/chunks/chunk.IBH5GL7A.js +258 -0
  173. package/dist/esm/chunks/chunk.IBH5GL7A.js.map +7 -0
  174. package/dist/esm/chunks/chunk.IWXT6VVJ.js +222 -0
  175. package/dist/esm/chunks/chunk.IWXT6VVJ.js.map +7 -0
  176. package/dist/esm/chunks/chunk.J6LOWXOG.js +654 -0
  177. package/dist/esm/chunks/chunk.J6LOWXOG.js.map +7 -0
  178. package/dist/esm/chunks/chunk.JICZQ2BO.js +168 -0
  179. package/dist/esm/chunks/chunk.JICZQ2BO.js.map +7 -0
  180. package/dist/esm/chunks/chunk.JKC5PU23.js +42 -0
  181. package/dist/esm/chunks/chunk.JKC5PU23.js.map +7 -0
  182. package/dist/esm/chunks/chunk.JQQOZMKQ.js +2994 -0
  183. package/dist/esm/chunks/chunk.JQQOZMKQ.js.map +7 -0
  184. package/dist/esm/chunks/chunk.JVQP6BJ3.js +1591 -0
  185. package/dist/esm/chunks/chunk.JVQP6BJ3.js.map +7 -0
  186. package/dist/esm/chunks/chunk.K2PCTUVN.js +139 -0
  187. package/dist/esm/chunks/chunk.K2PCTUVN.js.map +7 -0
  188. package/dist/esm/chunks/chunk.KCK3G74Y.js +634 -0
  189. package/dist/esm/chunks/chunk.KCK3G74Y.js.map +7 -0
  190. package/dist/esm/chunks/chunk.KI3IHPS2.js +801 -0
  191. package/dist/esm/chunks/chunk.KI3IHPS2.js.map +7 -0
  192. package/dist/esm/chunks/chunk.KRW2IAIU.js +445 -0
  193. package/dist/esm/chunks/chunk.KRW2IAIU.js.map +7 -0
  194. package/dist/esm/chunks/chunk.KZ2QNQK2.js +21 -0
  195. package/dist/esm/chunks/chunk.KZ2QNQK2.js.map +7 -0
  196. package/dist/esm/chunks/chunk.KZATVOA6.js +68 -0
  197. package/dist/esm/chunks/chunk.KZATVOA6.js.map +7 -0
  198. package/dist/esm/chunks/chunk.LCWRP2UI.js +59 -0
  199. package/dist/esm/chunks/chunk.LCWRP2UI.js.map +7 -0
  200. package/dist/esm/chunks/chunk.LM5TVNZY.js +71 -0
  201. package/dist/esm/chunks/chunk.LM5TVNZY.js.map +7 -0
  202. package/dist/esm/chunks/chunk.MAGJQ2PP.js +964 -0
  203. package/dist/esm/chunks/chunk.MAGJQ2PP.js.map +7 -0
  204. package/dist/esm/chunks/chunk.MEFT5FQC.js +158 -0
  205. package/dist/esm/chunks/chunk.MEFT5FQC.js.map +7 -0
  206. package/dist/esm/chunks/chunk.MHEJZJT3.js +6 -0
  207. package/dist/esm/chunks/chunk.MHEJZJT3.js.map +7 -0
  208. package/dist/esm/chunks/chunk.MMIZOYAS.js +147 -0
  209. package/dist/esm/chunks/chunk.MMIZOYAS.js.map +7 -0
  210. package/dist/esm/chunks/chunk.MNFGVNDI.js +6 -0
  211. package/dist/esm/chunks/chunk.MNFGVNDI.js.map +7 -0
  212. package/dist/esm/chunks/chunk.NQOD2XB3.js +840 -0
  213. package/dist/esm/chunks/chunk.NQOD2XB3.js.map +7 -0
  214. package/dist/esm/chunks/chunk.NRI7SWVX.js +1347 -0
  215. package/dist/esm/chunks/chunk.NRI7SWVX.js.map +7 -0
  216. package/dist/esm/chunks/chunk.NX5SKZLU.js +50 -0
  217. package/dist/esm/chunks/chunk.NX5SKZLU.js.map +7 -0
  218. package/dist/esm/chunks/chunk.O6UHX6FK.js +463 -0
  219. package/dist/esm/chunks/chunk.O6UHX6FK.js.map +7 -0
  220. package/dist/esm/chunks/chunk.OJI6ZRYW.js +561 -0
  221. package/dist/esm/chunks/chunk.OJI6ZRYW.js.map +7 -0
  222. package/dist/esm/chunks/chunk.OQRMHHPB.js +1335 -0
  223. package/dist/esm/chunks/chunk.OQRMHHPB.js.map +7 -0
  224. package/dist/esm/chunks/chunk.OYO6NUZY.js +52 -0
  225. package/dist/esm/chunks/chunk.OYO6NUZY.js.map +7 -0
  226. package/dist/esm/chunks/chunk.P43Z3YAS.js +507 -0
  227. package/dist/esm/chunks/chunk.P43Z3YAS.js.map +7 -0
  228. package/dist/esm/chunks/chunk.P7NOYP4O.js +73 -0
  229. package/dist/esm/chunks/chunk.P7NOYP4O.js.map +7 -0
  230. package/dist/esm/chunks/chunk.PBGL3BRX.js +27 -0
  231. package/dist/esm/chunks/chunk.PBGL3BRX.js.map +7 -0
  232. package/dist/esm/chunks/chunk.PCYIY5OY.js +461 -0
  233. package/dist/esm/chunks/chunk.PCYIY5OY.js.map +7 -0
  234. package/dist/esm/chunks/chunk.Q4YMHFRY.js +155 -0
  235. package/dist/esm/chunks/chunk.Q4YMHFRY.js.map +7 -0
  236. package/dist/esm/chunks/chunk.QD7EPCL6.js +144 -0
  237. package/dist/esm/chunks/chunk.QD7EPCL6.js.map +7 -0
  238. package/dist/esm/chunks/chunk.QQDDGRY6.js +6 -0
  239. package/dist/esm/chunks/chunk.QQDDGRY6.js.map +7 -0
  240. package/dist/esm/chunks/chunk.RNPIV3BY.js +540 -0
  241. package/dist/esm/chunks/chunk.RNPIV3BY.js.map +7 -0
  242. package/dist/esm/chunks/chunk.RR7HDQU6.js +236 -0
  243. package/dist/esm/chunks/chunk.RR7HDQU6.js.map +7 -0
  244. package/dist/esm/chunks/chunk.RV3E762Y.js +73 -0
  245. package/dist/esm/chunks/chunk.RV3E762Y.js.map +7 -0
  246. package/dist/esm/chunks/chunk.RWCC6E4O.js +52 -0
  247. package/dist/esm/chunks/chunk.RWCC6E4O.js.map +7 -0
  248. package/dist/esm/chunks/chunk.SJZ54RE3.js +56 -0
  249. package/dist/esm/chunks/chunk.SJZ54RE3.js.map +7 -0
  250. package/dist/esm/chunks/chunk.SKISCNSC.js +559 -0
  251. package/dist/esm/chunks/chunk.SKISCNSC.js.map +7 -0
  252. package/dist/esm/chunks/chunk.SKLCDWYQ.js +6 -0
  253. package/dist/esm/chunks/chunk.SKLCDWYQ.js.map +7 -0
  254. package/dist/esm/chunks/chunk.SNAZ6JSS.js +22 -0
  255. package/dist/esm/chunks/chunk.SNAZ6JSS.js.map +7 -0
  256. package/dist/esm/chunks/chunk.ST3R6JEE.js +73 -0
  257. package/dist/esm/chunks/chunk.ST3R6JEE.js.map +7 -0
  258. package/dist/esm/chunks/chunk.TLCGGWBO.js +6 -0
  259. package/dist/esm/chunks/chunk.TLCGGWBO.js.map +7 -0
  260. package/dist/esm/chunks/chunk.U35QQZVK.js +422 -0
  261. package/dist/esm/chunks/chunk.U35QQZVK.js.map +7 -0
  262. package/dist/esm/chunks/chunk.U6FJJGO3.js +6 -0
  263. package/dist/esm/chunks/chunk.U6FJJGO3.js.map +7 -0
  264. package/dist/esm/chunks/chunk.VAPJ75PS.js +21 -0
  265. package/dist/esm/chunks/chunk.VAPJ75PS.js.map +7 -0
  266. package/dist/esm/chunks/chunk.VHO7NUMI.js +37 -0
  267. package/dist/esm/chunks/chunk.VHO7NUMI.js.map +7 -0
  268. package/dist/esm/chunks/chunk.VK6LIH3B.js +13 -0
  269. package/dist/esm/chunks/chunk.VK6LIH3B.js.map +7 -0
  270. package/dist/esm/chunks/chunk.VTXXZ5KT.js +450 -0
  271. package/dist/esm/chunks/chunk.VTXXZ5KT.js.map +7 -0
  272. package/dist/esm/chunks/chunk.WAJDLUSQ.js +56 -0
  273. package/dist/esm/chunks/chunk.WAJDLUSQ.js.map +7 -0
  274. package/dist/esm/chunks/chunk.WF2MFLG4.js +6 -0
  275. package/dist/esm/chunks/chunk.WF2MFLG4.js.map +7 -0
  276. package/dist/esm/chunks/chunk.WINL2C7Q.js +6 -0
  277. package/dist/esm/chunks/chunk.WINL2C7Q.js.map +7 -0
  278. package/dist/esm/chunks/chunk.WIYLQTSX.js +3550 -0
  279. package/dist/esm/chunks/chunk.WIYLQTSX.js.map +7 -0
  280. package/dist/esm/chunks/chunk.WT4W2IFT.js +92 -0
  281. package/dist/esm/chunks/chunk.WT4W2IFT.js.map +7 -0
  282. package/dist/esm/chunks/chunk.WXFCZJJI.js +52 -0
  283. package/dist/esm/chunks/chunk.WXFCZJJI.js.map +7 -0
  284. package/dist/esm/chunks/chunk.XEF6G5NS.js +248 -0
  285. package/dist/esm/chunks/chunk.XEF6G5NS.js.map +7 -0
  286. package/dist/esm/chunks/chunk.XGMOOPIE.js +136 -0
  287. package/dist/esm/chunks/chunk.XGMOOPIE.js.map +7 -0
  288. package/dist/esm/chunks/chunk.XIDZXGD4.js +912 -0
  289. package/dist/esm/chunks/chunk.XIDZXGD4.js.map +7 -0
  290. package/dist/esm/chunks/chunk.XJVLHRVJ.js +59 -0
  291. package/dist/esm/chunks/chunk.XJVLHRVJ.js.map +7 -0
  292. package/dist/esm/chunks/chunk.XO3XVXWW.js +72 -0
  293. package/dist/esm/chunks/chunk.XO3XVXWW.js.map +7 -0
  294. package/dist/esm/chunks/chunk.XY3ZHN7Y.js +649 -0
  295. package/dist/esm/chunks/chunk.XY3ZHN7Y.js.map +7 -0
  296. package/dist/esm/chunks/chunk.Y2TDQIA4.js +307 -0
  297. package/dist/esm/chunks/chunk.Y2TDQIA4.js.map +7 -0
  298. package/dist/esm/chunks/chunk.YCW56AVX.js +176 -0
  299. package/dist/esm/chunks/chunk.YCW56AVX.js.map +7 -0
  300. package/dist/esm/chunks/chunk.YDPSV74L.js +742 -0
  301. package/dist/esm/chunks/chunk.YDPSV74L.js.map +7 -0
  302. package/dist/esm/chunks/chunk.YJ5X3WZ4.js +110 -0
  303. package/dist/esm/chunks/chunk.YJ5X3WZ4.js.map +7 -0
  304. package/dist/esm/chunks/chunk.ZABF5CI6.js +760 -0
  305. package/dist/esm/chunks/chunk.ZABF5CI6.js.map +7 -0
  306. package/dist/esm/chunks/chunk.ZG4NZM2P.js +173 -0
  307. package/dist/esm/chunks/chunk.ZG4NZM2P.js.map +7 -0
  308. package/dist/esm/chunks/chunk.ZUM5YLB2.js +291 -0
  309. package/dist/esm/chunks/chunk.ZUM5YLB2.js.map +7 -0
  310. package/dist/esm/circular-progress/index.js +28 -0
  311. package/dist/esm/circular-progress/index.js.map +7 -0
  312. package/dist/esm/color-picker/index.js +49 -0
  313. package/dist/esm/color-picker/index.js.map +7 -0
  314. package/dist/esm/core/base/index.js +21 -0
  315. package/dist/esm/core/base/index.js.map +7 -0
  316. package/dist/esm/core/delegates/index.js +20 -0
  317. package/dist/esm/core/delegates/index.js.map +7 -0
  318. package/dist/esm/core/index.js +83 -0
  319. package/dist/esm/core/index.js.map +7 -0
  320. package/dist/esm/core/mask/index.js +26 -0
  321. package/dist/esm/core/mask/index.js.map +7 -0
  322. package/dist/esm/core/utils/index.js +46 -0
  323. package/dist/esm/core/utils/index.js.map +7 -0
  324. package/dist/esm/date-picker/index.js +62 -0
  325. package/dist/esm/date-picker/index.js.map +7 -0
  326. package/dist/esm/date-range-picker/index.js +64 -0
  327. package/dist/esm/date-range-picker/index.js.map +7 -0
  328. package/dist/esm/dialog/index.js +44 -0
  329. package/dist/esm/dialog/index.js.map +7 -0
  330. package/dist/esm/divider/index.js +22 -0
  331. package/dist/esm/divider/index.js.map +7 -0
  332. package/dist/esm/drawer/base/index.js +25 -0
  333. package/dist/esm/drawer/base/index.js.map +7 -0
  334. package/dist/esm/drawer/drawer/index.js +25 -0
  335. package/dist/esm/drawer/drawer/index.js.map +7 -0
  336. package/dist/esm/drawer/index.js +56 -0
  337. package/dist/esm/drawer/index.js.map +7 -0
  338. package/dist/esm/drawer/mini-drawer/index.js +25 -0
  339. package/dist/esm/drawer/mini-drawer/index.js.map +7 -0
  340. package/dist/esm/drawer/modal-drawer/index.js +30 -0
  341. package/dist/esm/drawer/modal-drawer/index.js.map +7 -0
  342. package/dist/esm/expansion-panel/index.js +38 -0
  343. package/dist/esm/expansion-panel/index.js.map +7 -0
  344. package/dist/esm/file-picker/index.js +41 -0
  345. package/dist/esm/file-picker/index.js.map +7 -0
  346. package/dist/esm/floating-action-button/index.js +29 -0
  347. package/dist/esm/floating-action-button/index.js.map +7 -0
  348. package/dist/esm/floating-label/index.js +23 -0
  349. package/dist/esm/floating-label/index.js.map +7 -0
  350. package/dist/esm/icon/index.js +53 -0
  351. package/dist/esm/icon/index.js.map +7 -0
  352. package/dist/esm/icon-button/index.js +37 -0
  353. package/dist/esm/icon-button/index.js.map +7 -0
  354. package/dist/esm/index.js +1275 -0
  355. package/dist/esm/index.js.map +7 -0
  356. package/dist/esm/inline-message/index.js +22 -0
  357. package/dist/esm/inline-message/index.js.map +7 -0
  358. package/dist/esm/keyboard-shortcut/index.js +41 -0
  359. package/dist/esm/keyboard-shortcut/index.js.map +7 -0
  360. package/dist/esm/label-value/index.js +32 -0
  361. package/dist/esm/label-value/index.js.map +7 -0
  362. package/dist/esm/linear-progress/index.js +24 -0
  363. package/dist/esm/linear-progress/index.js.map +7 -0
  364. package/dist/esm/list/index.js +44 -0
  365. package/dist/esm/list/index.js.map +7 -0
  366. package/dist/esm/list/list/index.js +33 -0
  367. package/dist/esm/list/list/index.js.map +7 -0
  368. package/dist/esm/list/list-item/index.js +31 -0
  369. package/dist/esm/list/list-item/index.js.map +7 -0
  370. package/dist/esm/list-dropdown/index.js +55 -0
  371. package/dist/esm/list-dropdown/index.js.map +7 -0
  372. package/dist/esm/menu/index.js +53 -0
  373. package/dist/esm/menu/index.js.map +7 -0
  374. package/dist/esm/open-icon/index.js +37 -0
  375. package/dist/esm/open-icon/index.js.map +7 -0
  376. package/dist/esm/page-state/index.js +22 -0
  377. package/dist/esm/page-state/index.js.map +7 -0
  378. package/dist/esm/paginator/index.js +66 -0
  379. package/dist/esm/paginator/index.js.map +7 -0
  380. package/dist/esm/popup/index.js +31 -0
  381. package/dist/esm/popup/index.js.map +7 -0
  382. package/dist/esm/product-icon/index.js +29 -0
  383. package/dist/esm/product-icon/index.js.map +7 -0
  384. package/dist/esm/profile-card/index.js +37 -0
  385. package/dist/esm/profile-card/index.js.map +7 -0
  386. package/dist/esm/quantity-field/index.js +46 -0
  387. package/dist/esm/quantity-field/index.js.map +7 -0
  388. package/dist/esm/radio/index.js +26 -0
  389. package/dist/esm/radio/index.js.map +7 -0
  390. package/dist/esm/ripple/index.js +32 -0
  391. package/dist/esm/ripple/index.js.map +7 -0
  392. package/dist/esm/scaffold/index.js +22 -0
  393. package/dist/esm/scaffold/index.js.map +7 -0
  394. package/dist/esm/select/core/index.js +60 -0
  395. package/dist/esm/select/core/index.js.map +7 -0
  396. package/dist/esm/select/index.js +114 -0
  397. package/dist/esm/select/index.js.map +7 -0
  398. package/dist/esm/select/option/index.js +28 -0
  399. package/dist/esm/select/option/index.js.map +7 -0
  400. package/dist/esm/select/option-group/index.js +22 -0
  401. package/dist/esm/select/option-group/index.js.map +7 -0
  402. package/dist/esm/select/select/index.js +63 -0
  403. package/dist/esm/select/select/index.js.map +7 -0
  404. package/dist/esm/select/select-dropdown/index.js +59 -0
  405. package/dist/esm/select/select-dropdown/index.js.map +7 -0
  406. package/dist/esm/skeleton/index.js +22 -0
  407. package/dist/esm/skeleton/index.js.map +7 -0
  408. package/dist/esm/slider/index.js +35 -0
  409. package/dist/esm/slider/index.js.map +7 -0
  410. package/dist/esm/stepper/index.js +55 -0
  411. package/dist/esm/stepper/index.js.map +7 -0
  412. package/dist/esm/stepper/step/index.js +40 -0
  413. package/dist/esm/stepper/step/index.js.map +7 -0
  414. package/dist/esm/stepper/stepper/index.js +43 -0
  415. package/dist/esm/stepper/stepper/index.js.map +7 -0
  416. package/dist/esm/switch/index.js +34 -0
  417. package/dist/esm/switch/index.js.map +7 -0
  418. package/dist/esm/table/index.js +57 -0
  419. package/dist/esm/table/index.js.map +7 -0
  420. package/dist/esm/tabs/index.js +61 -0
  421. package/dist/esm/tabs/index.js.map +7 -0
  422. package/dist/esm/tabs/tab/index.js +33 -0
  423. package/dist/esm/tabs/tab/index.js.map +7 -0
  424. package/dist/esm/tabs/tab-bar/index.js +47 -0
  425. package/dist/esm/tabs/tab-bar/index.js.map +7 -0
  426. package/dist/esm/text-field/index.js +39 -0
  427. package/dist/esm/text-field/index.js.map +7 -0
  428. package/dist/esm/theme/index.js +17 -0
  429. package/dist/esm/theme/index.js.map +7 -0
  430. package/dist/esm/time-picker/index.js +92 -0
  431. package/dist/esm/time-picker/index.js.map +7 -0
  432. package/dist/esm/toast/index.js +42 -0
  433. package/dist/esm/toast/index.js.map +7 -0
  434. package/dist/esm/toolbar/index.js +22 -0
  435. package/dist/esm/toolbar/index.js.map +7 -0
  436. package/dist/esm/tooltip/index.js +34 -0
  437. package/dist/esm/tooltip/index.js.map +7 -0
  438. package/dist/esm/utils/index.js +17 -0
  439. package/dist/esm/utils/index.js.map +7 -0
  440. package/dist/esm/view-switcher/index.js +40 -0
  441. package/dist/esm/view-switcher/index.js.map +7 -0
  442. package/dist/esm/view-switcher/view/index.js +22 -0
  443. package/dist/esm/view-switcher/view/index.js.map +7 -0
  444. package/package.json +1 -1
@@ -0,0 +1,1347 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import {
7
+ TextFieldComponent
8
+ } from "./chunk.YCW56AVX.js";
9
+ import {
10
+ TEXT_FIELD_CONSTANTS,
11
+ TextFieldComponentDelegate
12
+ } from "./chunk.Q4YMHFRY.js";
13
+ import {
14
+ DividerComponent
15
+ } from "./chunk.WAJDLUSQ.js";
16
+ import {
17
+ CHIP_FIELD_CONSTANTS
18
+ } from "./chunk.EARNUKJ2.js";
19
+ import {
20
+ ListDropdownAware
21
+ } from "./chunk.ST3R6JEE.js";
22
+ import {
23
+ ListDropdown,
24
+ ListDropdownAwareFoundation
25
+ } from "./chunk.D4XU5MZN.js";
26
+ import {
27
+ SkeletonComponent
28
+ } from "./chunk.EL6B2ODN.js";
29
+ import {
30
+ ListComponent
31
+ } from "./chunk.4UKSUUTX.js";
32
+ import {
33
+ ListItemComponent
34
+ } from "./chunk.G6FY472A.js";
35
+ import {
36
+ LinearProgressComponent
37
+ } from "./chunk.RNPIV3BY.js";
38
+ import {
39
+ POPUP_CONSTANTS,
40
+ PopupComponent
41
+ } from "./chunk.5EEEKOOK.js";
42
+ import {
43
+ tylIconCheckBox,
44
+ tylIconCheckBoxOutlineBlank
45
+ } from "./chunk.GS2AXUCN.js";
46
+ import {
47
+ Platform
48
+ } from "./chunk.BYN27JXZ.js";
49
+ import {
50
+ IconComponent,
51
+ IconComponentDelegate,
52
+ IconRegistry
53
+ } from "./chunk.P43Z3YAS.js";
54
+ import {
55
+ FormFieldComponentDelegate
56
+ } from "./chunk.HZISALRH.js";
57
+ import {
58
+ highlightTextHTML
59
+ } from "./chunk.52F6VUCF.js";
60
+ import {
61
+ BaseAdapter
62
+ } from "./chunk.KZATVOA6.js";
63
+ import {
64
+ FoundationProperty
65
+ } from "./chunk.MMIZOYAS.js";
66
+ import {
67
+ COMPONENT_NAME_PREFIX,
68
+ CustomElement,
69
+ KEYSTROKE_DEBOUNCE_THRESHOLD
70
+ } from "./chunk.35U3UPDV.js";
71
+ import {
72
+ attachShadowTemplate,
73
+ defineCustomElement,
74
+ getShadowElement
75
+ } from "./chunk.K2PCTUVN.js";
76
+ import {
77
+ deepQuerySelectorAll,
78
+ ensureChild,
79
+ getActiveElement,
80
+ toggleAttribute
81
+ } from "./chunk.4JURZYE4.js";
82
+ import {
83
+ coerceBoolean,
84
+ coerceNumber,
85
+ debounce,
86
+ isDeepEqual,
87
+ isDefined,
88
+ isObject,
89
+ isString,
90
+ randomChars
91
+ } from "./chunk.MEFT5FQC.js";
92
+ import {
93
+ __decorateClass,
94
+ __spreadValues
95
+ } from "./chunk.LM5TVNZY.js";
96
+
97
+ // dist/build/lib/staging/src/autocomplete/autocomplete-constants.ts
98
+ var elementName = `${COMPONENT_NAME_PREFIX}autocomplete`;
99
+ var attributes = {
100
+ MODE: "mode",
101
+ MULTIPLE: "multiple",
102
+ DEBOUNCE: "debounce",
103
+ FILTER_ON_FOCUS: "filter-on-focus",
104
+ ALLOW_UNMATCHED: "allow-unmatched",
105
+ POPUP_TARGET: "popup-target",
106
+ POPUP_CLASSES: "popup-classes",
107
+ OPTION_LIMIT: "option-limit",
108
+ OBSERVE_SCROLL: "observe-scroll",
109
+ OBSERVE_SCROLL_THRESHOLD: "observe-scroll-threshold",
110
+ SYNC_POPUP_WIDTH: "sync-popup-width",
111
+ OPEN: "open",
112
+ MATCH_KEY: "match-key",
113
+ DROPDOWN_ICON_OPEN: "data-forge-dropdown-icon-open"
114
+ };
115
+ var selectors = {
116
+ INPUT: "input,textarea",
117
+ DROPDOWN_ICON: "[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",
118
+ CLEAR_BUTTON: "[data-forge-autocomplete-clear],[forge-autocomplete-clear]"
119
+ };
120
+ var numbers = {
121
+ DEFAULT_DEBOUNCE_TIME: KEYSTROKE_DEBOUNCE_THRESHOLD,
122
+ NUM_SKELETON_ITEMS: 3
123
+ };
124
+ var events = {
125
+ CHANGE: `${elementName}-change`,
126
+ SELECT: `${elementName}-select`,
127
+ SCROLLED_BOTTOM: `${elementName}-scrolled-bottom`
128
+ };
129
+ var AUTOCOMPLETE_CONSTANTS = {
130
+ elementName,
131
+ attributes,
132
+ selectors,
133
+ numbers,
134
+ events
135
+ };
136
+ var AutocompleteMode = /* @__PURE__ */ ((AutocompleteMode3) => {
137
+ AutocompleteMode3["Default"] = "default";
138
+ AutocompleteMode3["Stateless"] = "stateless";
139
+ return AutocompleteMode3;
140
+ })(AutocompleteMode || {});
141
+
142
+ // dist/build/lib/staging/src/autocomplete/autocomplete-adapter.ts
143
+ var AutocompleteAdapter = class extends BaseAdapter {
144
+ constructor(component) {
145
+ super(component);
146
+ this.setInputElement();
147
+ }
148
+ setInputElement() {
149
+ const inputElements = deepQuerySelectorAll(this._component, AUTOCOMPLETE_CONSTANTS.selectors.INPUT, false);
150
+ if (inputElements.length) {
151
+ this._inputElement = inputElements[0];
152
+ }
153
+ return this._inputElement;
154
+ }
155
+ setInputAttribute(name, value) {
156
+ this._inputElement.setAttribute(name, value);
157
+ }
158
+ addInputListener(type, listener) {
159
+ this._inputElement.addEventListener(type, listener);
160
+ }
161
+ removeInputListener(type, listener) {
162
+ this._inputElement.removeEventListener(type, listener);
163
+ }
164
+ intializeInputAccessibility(identifier) {
165
+ this._inputElement.setAttribute("autocomplete", "off");
166
+ this._inputElement.setAttribute("role", "combobox");
167
+ this._inputElement.setAttribute("aria-live", "polite");
168
+ this._inputElement.setAttribute("aria-atomic", "true");
169
+ this._inputElement.setAttribute("aria-haspopup", "true");
170
+ this._inputElement.setAttribute("aria-expanded", "false");
171
+ this._inputElement.setAttribute("aria-autocomplete", "list");
172
+ }
173
+ isWrappingChipField() {
174
+ return !!this._component.querySelector(CHIP_FIELD_CONSTANTS.elementName);
175
+ }
176
+ show(config, popupTarget) {
177
+ this._targetElement = this._getTargetElement(popupTarget);
178
+ if (!this._targetElement) {
179
+ return;
180
+ }
181
+ this._listDropdown = new ListDropdown(this._targetElement, config);
182
+ this._listDropdown.open();
183
+ this._inputElement.setAttribute("aria-expanded", "true");
184
+ this._inputElement.setAttribute("aria-controls", `list-dropdown-popup-${config.id}`);
185
+ this._tryToggleDropdownIconRotation(true);
186
+ }
187
+ hide(listener) {
188
+ if (!this._listDropdown) {
189
+ return;
190
+ }
191
+ const { targetElement } = this._listDropdown.dropdownElement;
192
+ targetElement.removeEventListener(POPUP_CONSTANTS.events.BLUR, listener);
193
+ this.setBusyVisibility(false);
194
+ this._tryToggleDropdownIconRotation(false);
195
+ this._inputElement.removeAttribute("aria-activedescendant");
196
+ this._inputElement.removeAttribute("aria-controls");
197
+ this._inputElement.setAttribute("aria-expanded", "false");
198
+ this._listDropdown.close();
199
+ this._listDropdown = void 0;
200
+ }
201
+ setBusyVisibility(isVisible) {
202
+ var _a;
203
+ (_a = this._listDropdown) == null ? void 0 : _a.setBusyVisibility(isVisible);
204
+ }
205
+ toggleOptionMultiple(index, selected) {
206
+ var _a;
207
+ (_a = this._listDropdown) == null ? void 0 : _a.toggleOptionMultiple(index, selected);
208
+ }
209
+ setDismissListener(listener) {
210
+ if (!this._listDropdown || !this._listDropdown.dropdownElement) {
211
+ return;
212
+ }
213
+ const dropdownElement = this._listDropdown.dropdownElement;
214
+ if (dropdownElement.targetElement) {
215
+ dropdownElement.targetElement.addEventListener(POPUP_CONSTANTS.events.BLUR, listener);
216
+ }
217
+ }
218
+ focus() {
219
+ window.requestAnimationFrame(() => this._inputElement.focus());
220
+ }
221
+ setOptions(options) {
222
+ var _a;
223
+ (_a = this._listDropdown) == null ? void 0 : _a.setOptions(options);
224
+ }
225
+ appendOptions(options) {
226
+ var _a;
227
+ (_a = this._listDropdown) == null ? void 0 : _a.appendOptions(options);
228
+ }
229
+ setSelectedText(value) {
230
+ this._inputElement.value = value;
231
+ }
232
+ getInputValue() {
233
+ return this._inputElement.value;
234
+ }
235
+ selectInputValue() {
236
+ window.requestAnimationFrame(() => this._inputElement.select());
237
+ }
238
+ isFocusWithinPopup(target) {
239
+ if (!this._listDropdown || !this._listDropdown.dropdownElement) {
240
+ return false;
241
+ }
242
+ return this._listDropdown.dropdownElement.contains(target);
243
+ }
244
+ hasFocus() {
245
+ const activeElement = getActiveElement();
246
+ return activeElement === this._inputElement || this.isFocusWithinPopup(activeElement);
247
+ }
248
+ hasInputElement() {
249
+ return !!this._inputElement;
250
+ }
251
+ setDropdownIconListener(type, listener) {
252
+ window.requestAnimationFrame(() => {
253
+ const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON);
254
+ if (dropdownIcon) {
255
+ dropdownIcon.addEventListener(type, listener);
256
+ }
257
+ });
258
+ }
259
+ removeDropdownIconListener(type, listener) {
260
+ const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON);
261
+ if (dropdownIcon) {
262
+ dropdownIcon.removeEventListener(type, listener);
263
+ }
264
+ }
265
+ setClearButtonListener(type, listener) {
266
+ window.requestAnimationFrame(() => {
267
+ const clearButton = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.CLEAR_BUTTON);
268
+ if (clearButton) {
269
+ clearButton.addEventListener(type, listener);
270
+ }
271
+ });
272
+ }
273
+ removeClearButtonListener(type, listener) {
274
+ const clearButton = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.CLEAR_BUTTON);
275
+ if (clearButton) {
276
+ clearButton.removeEventListener(type, listener);
277
+ }
278
+ }
279
+ propagateKey(key) {
280
+ var _a;
281
+ (_a = this._listDropdown) == null ? void 0 : _a.handleKey(key);
282
+ }
283
+ updateActiveDescendant(id) {
284
+ if (!this._targetElement) {
285
+ return;
286
+ }
287
+ toggleAttribute(this._inputElement, !!id, "aria-activedescendant", id);
288
+ }
289
+ getTargetElementWidth(selector) {
290
+ if (!this._targetElement) {
291
+ this._targetElement = this._getTargetElement(selector);
292
+ }
293
+ return this._targetElement.getBoundingClientRect().width;
294
+ }
295
+ getPopupElement() {
296
+ var _a, _b;
297
+ return (_b = (_a = this._listDropdown) == null ? void 0 : _a.dropdownElement) != null ? _b : null;
298
+ }
299
+ activateFirstOption() {
300
+ var _a;
301
+ (_a = this._listDropdown) == null ? void 0 : _a.activateFirstOption();
302
+ }
303
+ activateOptionByIndex(value) {
304
+ var _a;
305
+ (_a = this._listDropdown) == null ? void 0 : _a.activateOption(value);
306
+ }
307
+ getActiveOptionIndex() {
308
+ var _a, _b;
309
+ return (_b = (_a = this._listDropdown) == null ? void 0 : _a.getActiveOptionIndex()) != null ? _b : null;
310
+ }
311
+ clearActiveOption() {
312
+ var _a;
313
+ (_a = this._listDropdown) == null ? void 0 : _a.clearActiveOption();
314
+ }
315
+ setSelectedOptions(options) {
316
+ if (this._listDropdown) {
317
+ const values = options.map((o) => o.value);
318
+ this._listDropdown.setSelectedValues(values);
319
+ }
320
+ }
321
+ _getTargetElement(selector) {
322
+ return selector ? this._component.querySelector(selector) || this._getDefaultTargetElement() : this._getDefaultTargetElement();
323
+ }
324
+ _getDefaultTargetElement() {
325
+ const textField = this._component.querySelector("forge-text-field");
326
+ if (textField && textField.shadowRoot) {
327
+ const textFieldRoot = getShadowElement(textField, TEXT_FIELD_CONSTANTS.selectors.ROOT);
328
+ if (textFieldRoot) {
329
+ return textFieldRoot;
330
+ }
331
+ }
332
+ const chipField = this._component.querySelector("forge-chip-field");
333
+ if (chipField && chipField.shadowRoot) {
334
+ const chipFieldRoot = getShadowElement(chipField, CHIP_FIELD_CONSTANTS.selectors.ROOT);
335
+ if (chipFieldRoot) {
336
+ return chipFieldRoot;
337
+ }
338
+ }
339
+ return this._component.querySelector("input") || this._component;
340
+ }
341
+ _tryToggleDropdownIconRotation(state) {
342
+ const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON);
343
+ if (dropdownIcon) {
344
+ toggleAttribute(dropdownIcon, state, AUTOCOMPLETE_CONSTANTS.attributes.DROPDOWN_ICON_OPEN);
345
+ }
346
+ }
347
+ };
348
+
349
+ // dist/build/lib/staging/src/autocomplete/autocomplete-utils.ts
350
+ var OptionType = /* @__PURE__ */ ((OptionType2) => {
351
+ OptionType2[OptionType2["Option"] = 0] = "Option";
352
+ OptionType2[OptionType2["Group"] = 1] = "Group";
353
+ return OptionType2;
354
+ })(OptionType || {});
355
+ function isOptionType(options, type) {
356
+ const isOptionGroups = options.some((o) => isDefined(o) && isObject(o) && o.hasOwnProperty("options") && (o.hasOwnProperty("text") || o.hasOwnProperty("builder")));
357
+ const isOptionTypes = options.some((o) => isDefined(o) && isObject(o) && o.hasOwnProperty("label") && o.hasOwnProperty("value"));
358
+ return isOptionGroups && type === 1 /* Group */ || isOptionTypes && type === 0 /* Option */;
359
+ }
360
+ function getSelectedOption(options, value) {
361
+ return options.find((o) => o.value === value);
362
+ }
363
+ function optionEqualPredicate(option, value, property = null) {
364
+ if (property) {
365
+ if (!(property in option.value) || !(property in value)) {
366
+ return false;
367
+ }
368
+ return isDeepEqual(option.value[property], value[property]);
369
+ }
370
+ return isDeepEqual(option.value, value);
371
+ }
372
+
373
+ // dist/build/lib/staging/src/autocomplete/autocomplete-foundation.ts
374
+ var AutocompleteFoundation = class extends ListDropdownAwareFoundation {
375
+ constructor(_adapter) {
376
+ super();
377
+ this._adapter = _adapter;
378
+ this._isInitialized = false;
379
+ this._isDropdownOpen = false;
380
+ this._mode = "default" /* Default */;
381
+ this._multiple = false;
382
+ this._debounce = AUTOCOMPLETE_CONSTANTS.numbers.DEFAULT_DEBOUNCE_TIME;
383
+ this._allowUnmatched = false;
384
+ this._filterOnFocus = true;
385
+ this._options = [];
386
+ this._filterText = "";
387
+ this._selectedOptions = [];
388
+ this._values = [];
389
+ this._pendingFilterPromises = [];
390
+ this._matchKey = null;
391
+ this._clickListener = (evt) => this._onClick(evt);
392
+ this._focusListener = () => this._onFocus();
393
+ this._blurListener = (evt) => this._onBlur(evt);
394
+ this._keydownListener = (evt) => this._onKeydown(evt);
395
+ this._dropdownIconClickListener = (evt) => this._onDropdownIconClick(evt);
396
+ this._dropdownScrollEndListener = () => this._onDropdownScrollEnd();
397
+ this._dropdownIconMouseDownListener = (evt) => this._onDropdownIconMouseDown(evt);
398
+ this._clearButtonListener = (evt) => this._onClear(evt);
399
+ this._dismissListener = () => this._onDismiss();
400
+ this._activeChangeListener = (id) => this._adapter.updateActiveDescendant(id);
401
+ this._targetWidthCallback = () => this._adapter.getTargetElementWidth(this._popupTarget);
402
+ this._optionBuilderCallback = (option, parentElement) => {
403
+ return this._optionBuilder(option, this._filterText, parentElement);
404
+ };
405
+ this._identifier = randomChars();
406
+ }
407
+ async initialize() {
408
+ if (!this._adapter.hasInputElement() && !this._adapter.setInputElement()) {
409
+ throw new Error("An input element is required as a child of the autocomplete component.");
410
+ }
411
+ this._setInputListener();
412
+ this._setFilterCallback();
413
+ this._attachListeners();
414
+ this._initializeAccessibility();
415
+ if (this._values.length) {
416
+ if (!this._selectedOptions.length) {
417
+ try {
418
+ await this._executeFilter();
419
+ } catch (e) {
420
+ console.error(e);
421
+ }
422
+ this._updateSelectedOptions(this._values);
423
+ }
424
+ this._adapter.setSelectedText(this._getSelectedText());
425
+ }
426
+ this._isInitialized = true;
427
+ }
428
+ disconnect() {
429
+ if (this._isInitialized) {
430
+ this._detachListeners();
431
+ this._isInitialized = false;
432
+ }
433
+ if (this._isDropdownOpen) {
434
+ this._closeDropdown();
435
+ }
436
+ }
437
+ _attachListeners() {
438
+ this._adapter.addInputListener("click", this._clickListener);
439
+ this._adapter.addInputListener("focus", this._focusListener);
440
+ this._adapter.addInputListener("blur", this._blurListener);
441
+ this._adapter.addInputListener("input", this._inputListener);
442
+ this._adapter.addInputListener("keydown", this._keydownListener);
443
+ this._adapter.setDropdownIconListener("click", this._dropdownIconClickListener);
444
+ this._adapter.setDropdownIconListener("mousedown", this._dropdownIconMouseDownListener);
445
+ this._adapter.setClearButtonListener("click", this._clearButtonListener);
446
+ }
447
+ _detachListeners() {
448
+ this._adapter.removeInputListener("click", this._clickListener);
449
+ this._adapter.removeInputListener("focus", this._focusListener);
450
+ this._adapter.removeInputListener("blur", this._blurListener);
451
+ this._adapter.removeInputListener("input", this._inputListener);
452
+ this._adapter.removeInputListener("keydown", this._keydownListener);
453
+ this._adapter.removeDropdownIconListener("click", this._dropdownIconClickListener);
454
+ this._adapter.removeDropdownIconListener("mousedown", this._dropdownIconMouseDownListener);
455
+ this._adapter.removeClearButtonListener("click", this._clearButtonListener);
456
+ }
457
+ _setInputListener() {
458
+ this._inputListener = (evt) => this._onInput(evt);
459
+ }
460
+ _setFilterCallback() {
461
+ this._filterFn = isDefined(this._debounce) && this._debounce > 0 ? debounce(this._debounceFilter, this._debounce, false) : this._debounceFilter;
462
+ }
463
+ _initializeAccessibility() {
464
+ this._adapter.intializeInputAccessibility(this._identifier);
465
+ }
466
+ get _flatOptions() {
467
+ if (isOptionType(this._options, 1 /* Group */)) {
468
+ return this._options.reduce((previousValue, currentValue) => previousValue.concat(currentValue.options), []);
469
+ }
470
+ return this._options;
471
+ }
472
+ _onClick(evt) {
473
+ if (!this._isDropdownOpen && this._filterOnFocus) {
474
+ this._showDropdown();
475
+ }
476
+ }
477
+ _onDropdownIconMouseDown(evt) {
478
+ evt.preventDefault();
479
+ }
480
+ _onDropdownIconClick(evt) {
481
+ if (!this._isDropdownOpen) {
482
+ this._adapter.focus();
483
+ window.requestAnimationFrame(() => this._showDropdown());
484
+ } else {
485
+ this._closeDropdown();
486
+ }
487
+ }
488
+ _onClear(evt) {
489
+ this._clearValue();
490
+ this._adapter.setSelectedText(this._getSelectedText());
491
+ }
492
+ _onDropdownScrollEnd() {
493
+ this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SCROLLED_BOTTOM);
494
+ }
495
+ _onFocus() {
496
+ if (!this._isDropdownOpen && this._adapter.getInputValue() && !Platform.isMobile) {
497
+ this._adapter.selectInputValue();
498
+ }
499
+ }
500
+ _onBlur(evt) {
501
+ if (this._adapter.isFocusWithinPopup(evt.relatedTarget)) {
502
+ return;
503
+ }
504
+ this._applyBlur();
505
+ }
506
+ _applyBlur() {
507
+ if (this._isDropdownOpen) {
508
+ this._closeDropdown();
509
+ }
510
+ if (this._mode === "stateless" /* Stateless */) {
511
+ return;
512
+ }
513
+ if (!this._selectedOptions.length) {
514
+ if (!this._allowUnmatched) {
515
+ this._filterText = "";
516
+ this._adapter.setSelectedText("");
517
+ }
518
+ } else {
519
+ this._adapter.setSelectedText(this._getSelectedText());
520
+ }
521
+ }
522
+ _onInput(evt) {
523
+ if (this._selectedOptions.length && !this._multiple && (!this._adapter.getInputValue() || this._allowUnmatched) && !this._adapter.isWrappingChipField()) {
524
+ this._selectedOptions = [];
525
+ this._values = [];
526
+ this._emitChangeEvent();
527
+ }
528
+ this._filterText = this._adapter.getInputValue();
529
+ this._filterFn();
530
+ }
531
+ async _debounceFilter() {
532
+ if (!this._adapter.hasFocus()) {
533
+ this._pendingFilterPromises = [];
534
+ if (this._isDropdownOpen) {
535
+ this._closeDropdown();
536
+ }
537
+ return;
538
+ }
539
+ const filterText = this._filterText;
540
+ const filterPromise = this._executeFilter();
541
+ this._pendingFilterPromises.push(filterPromise);
542
+ if (this._isDropdownOpen) {
543
+ this._adapter.setBusyVisibility(true);
544
+ } else {
545
+ this._showDropdown({ filter: false });
546
+ }
547
+ try {
548
+ await filterPromise;
549
+ } catch (e) {
550
+ this._pendingFilterPromises = [];
551
+ if (this._isDropdownOpen) {
552
+ this._closeDropdown();
553
+ }
554
+ return;
555
+ }
556
+ if (filterText === this._filterText) {
557
+ this._pendingFilterPromises = [];
558
+ this._onFilterComplete();
559
+ } else {
560
+ const promiseIndex = this._pendingFilterPromises.indexOf(filterPromise);
561
+ if (promiseIndex !== -1) {
562
+ this._pendingFilterPromises.splice(promiseIndex, 1);
563
+ }
564
+ }
565
+ }
566
+ _onKeydown(evt) {
567
+ switch (evt.key) {
568
+ case "Tab":
569
+ if (this._isDropdownOpen && !this._multiple) {
570
+ this._selectActiveOption(false);
571
+ }
572
+ break;
573
+ case "Esc":
574
+ case "Escape":
575
+ if (this._isDropdownOpen) {
576
+ evt.preventDefault();
577
+ this._closeDropdown();
578
+ }
579
+ break;
580
+ case "Down":
581
+ case "ArrowDown":
582
+ evt.preventDefault();
583
+ if (!this._isDropdownOpen) {
584
+ this._showDropdown({ activateFirst: true });
585
+ } else {
586
+ this._adapter.propagateKey(evt.key);
587
+ }
588
+ break;
589
+ case "Up":
590
+ case "ArrowUp":
591
+ evt.preventDefault();
592
+ if (this._isDropdownOpen) {
593
+ this._adapter.propagateKey(evt.key);
594
+ }
595
+ break;
596
+ case "Enter":
597
+ case "Home":
598
+ case "End":
599
+ if (this._isDropdownOpen) {
600
+ if (evt.key === "Enter") {
601
+ evt.stopPropagation();
602
+ }
603
+ evt.preventDefault();
604
+ this._adapter.propagateKey(evt.key);
605
+ }
606
+ break;
607
+ case "Backspace":
608
+ case "Delete":
609
+ const input = evt.target;
610
+ const value = this._adapter.getInputValue();
611
+ const isRemovingAllChars = input.value.substring(input.selectionStart, input.selectionEnd) === input.value;
612
+ const isBackspacingLastChar = value.length === 1 && input.selectionEnd === 1;
613
+ const isDeletingLastChar = value.length === 1 && input.selectionEnd === 0;
614
+ const isEmpty = !value || isRemovingAllChars || isBackspacingLastChar || isDeletingLastChar;
615
+ if (!this._adapter.isWrappingChipField() && isEmpty && !this._multiple && this._values.length) {
616
+ this._clearValue();
617
+ }
618
+ break;
619
+ }
620
+ }
621
+ _executeFilter(sendFilterText = true, sendValue = false) {
622
+ if (!this._filter || typeof this._filter !== "function") {
623
+ throw new Error('A filter callback must be provided. Did you set the "filter" property?');
624
+ }
625
+ const filterText = sendFilterText ? this._filterText : "";
626
+ const value = sendValue ? this._getValue() : null;
627
+ return new Promise((resolve, reject) => {
628
+ return Promise.resolve(this._filter(filterText, value)).then((options) => {
629
+ this._options = options;
630
+ resolve(this._options);
631
+ }).catch((e) => reject(`An unexpected error occurred while filtering: ${e}`));
632
+ });
633
+ }
634
+ _onFilterComplete() {
635
+ if (!this._adapter.hasFocus()) {
636
+ if (this._isDropdownOpen) {
637
+ this._closeDropdown();
638
+ }
639
+ return;
640
+ }
641
+ if (this._options.length) {
642
+ const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;
643
+ this._dropdownReady({ userTriggered: sendFilterText });
644
+ if (this._filterText) {
645
+ this._adapter.activateFirstOption();
646
+ }
647
+ } else {
648
+ this._closeDropdown();
649
+ }
650
+ }
651
+ _clearValue() {
652
+ this._selectedOptions = [];
653
+ this._values = [];
654
+ if (this._isDropdownOpen) {
655
+ this._adapter.setSelectedOptions([]);
656
+ this._adapter.clearActiveOption();
657
+ }
658
+ this._emitChangeEvent();
659
+ }
660
+ async _showDropdown({ filter = true, userTriggered = true, activateFirst = false } = {}) {
661
+ const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;
662
+ this._isDropdownOpen = true;
663
+ const config = {
664
+ options: this._options,
665
+ multiple: this._multiple,
666
+ selectedValues: [...this._values],
667
+ id: `forge-autocomplete-${this._identifier}`,
668
+ asyncStyle: "skeleton" /* Skeleton */,
669
+ optionLimit: this._optionLimit,
670
+ popupClasses: this._popupClasses,
671
+ headerBuilder: this._popupHeaderBuilder,
672
+ footerBuilder: this._popupFooterBuilder,
673
+ transform: (label) => {
674
+ if (this._filterText) {
675
+ const highlightElement = highlightTextHTML(label, this._filterText);
676
+ if (highlightElement) {
677
+ return highlightElement;
678
+ }
679
+ }
680
+ return label;
681
+ },
682
+ allowBusy: true,
683
+ optionBuilder: !!this._optionBuilder ? this._optionBuilderCallback : void 0,
684
+ syncWidth: this._syncPopupWidth,
685
+ observeScroll: this._observeScroll,
686
+ observeScrollThreshold: this._observeScrollThreshold,
687
+ scrollEndListener: this._dropdownScrollEndListener,
688
+ activeChangeCallback: this._activeChangeListener,
689
+ targetWidthCallback: this._targetWidthCallback,
690
+ selectCallback: (value) => this._onSelect(value),
691
+ closeCallback: () => this._closeDropdown()
692
+ };
693
+ this._adapter.show(config, this._popupTarget);
694
+ this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);
695
+ if (filter) {
696
+ if (this._options.length) {
697
+ this._adapter.setBusyVisibility(true);
698
+ }
699
+ try {
700
+ await this._executeFilter(sendFilterText);
701
+ } catch (e) {
702
+ console.error(e);
703
+ }
704
+ this._updateSelectedOptions(this._values);
705
+ }
706
+ if (this._pendingFilterPromises.length) {
707
+ return;
708
+ }
709
+ this._dropdownReady({ userTriggered, activateFirst });
710
+ }
711
+ _dropdownReady({ userTriggered = true, activateFirst = false } = {}) {
712
+ if (!this._isDropdownOpen || !this._options.length || userTriggered && !this._adapter.hasFocus()) {
713
+ this._closeDropdown();
714
+ return;
715
+ }
716
+ this._sortSelectedOptions();
717
+ this._adapter.setBusyVisibility(false);
718
+ this._adapter.setOptions(this._options);
719
+ this._adapter.setSelectedOptions(this._selectedOptions);
720
+ this._adapter.setDismissListener(this._dismissListener);
721
+ if (activateFirst) {
722
+ this._adapter.activateFirstOption();
723
+ }
724
+ }
725
+ _closeDropdown() {
726
+ if (this._multiple) {
727
+ this._filterText = "";
728
+ }
729
+ this._isDropdownOpen = false;
730
+ this._adapter.hide(this._dismissListener);
731
+ this._sortSelectedOptions();
732
+ this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);
733
+ }
734
+ _sortSelectedOptions() {
735
+ if (this._multiple && this._selectedOptions.length && isOptionType(this._options, 0 /* Option */)) {
736
+ const selectedOptions = [];
737
+ const unselectedOptions = [];
738
+ this._options.forEach((option) => {
739
+ if (this._selectedOptions.find((o) => optionEqualPredicate(o, option.value, this._matchKey))) {
740
+ selectedOptions.push(option);
741
+ } else {
742
+ unselectedOptions.push(option);
743
+ }
744
+ });
745
+ this._options = [...selectedOptions, ...unselectedOptions];
746
+ }
747
+ }
748
+ async _onSelect(selectedValue, keepFocus = true) {
749
+ if (this._valueChanging) {
750
+ return;
751
+ }
752
+ if (this._mode === "stateless" /* Stateless */) {
753
+ const data = { value: selectedValue };
754
+ const result = this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SELECT, data, true, true);
755
+ if (result) {
756
+ this._filterText = "";
757
+ this._closeDropdown();
758
+ }
759
+ return;
760
+ }
761
+ const select = () => {
762
+ const flatOptions = this._flatOptions;
763
+ const option = flatOptions.find((o) => optionEqualPredicate(o, selectedValue, this._matchKey));
764
+ const value = option ? option.value : "";
765
+ const label = option ? option.label : "";
766
+ if (this._multiple) {
767
+ const optionIndex = flatOptions.findIndex((o) => optionEqualPredicate(o, selectedValue, this._matchKey));
768
+ if (optionIndex >= 0) {
769
+ const selected = this._selectedOptions.some((o) => optionEqualPredicate(o, selectedValue, this._matchKey));
770
+ this._adapter.toggleOptionMultiple(optionIndex, selected);
771
+ }
772
+ const selectedOption = getSelectedOption(this._selectedOptions, value);
773
+ if (selectedOption) {
774
+ const index = this._selectedOptions.indexOf(selectedOption);
775
+ this._selectedOptions.splice(index, 1);
776
+ } else {
777
+ this._selectedOptions.push(option);
778
+ }
779
+ } else {
780
+ if (isDefined(value)) {
781
+ this._selectedOptions[0] = option;
782
+ this._filterText = label;
783
+ } else {
784
+ this._selectedOptions = [];
785
+ this._filterText = "";
786
+ }
787
+ }
788
+ if (this._isDropdownOpen) {
789
+ this._adapter.setSelectedOptions(this._selectedOptions);
790
+ }
791
+ this._values = this._selectedOptions.map((o) => o.value);
792
+ this._adapter.setSelectedText(this._getSelectedText());
793
+ if (!Platform.isMobile && keepFocus) {
794
+ this._adapter.selectInputValue();
795
+ }
796
+ if (this._multiple) {
797
+ const index = flatOptions.findIndex((o) => optionEqualPredicate(o, selectedValue, this._matchKey));
798
+ const isSelected = this._values.includes(selectedValue);
799
+ this._adapter.toggleOptionMultiple(index, isSelected);
800
+ }
801
+ this._emitChangeEvent();
802
+ };
803
+ if (this._isDropdownOpen && !this._multiple) {
804
+ this._closeDropdown();
805
+ }
806
+ if (typeof this._beforeValueChange === "function") {
807
+ this._valueChanging = Promise.resolve(this._beforeValueChange.call(null, selectedValue, this._matchKey));
808
+ const shouldContinue = await this._valueChanging;
809
+ if (shouldContinue) {
810
+ select();
811
+ }
812
+ this._valueChanging = void 0;
813
+ } else {
814
+ select();
815
+ }
816
+ }
817
+ _selectActiveOption(keepFocus = true) {
818
+ const activeOptionIndex = this._adapter.getActiveOptionIndex();
819
+ if (typeof activeOptionIndex === "number" && activeOptionIndex >= 0) {
820
+ const option = this._flatOptions[activeOptionIndex];
821
+ if (option) {
822
+ this._onSelect(option.value, keepFocus);
823
+ }
824
+ }
825
+ }
826
+ _emitChangeEvent() {
827
+ this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.CHANGE, this._getValue(), true);
828
+ }
829
+ _getValue() {
830
+ if (!this._values) {
831
+ return null;
832
+ }
833
+ if (!this._values.length) {
834
+ return this._multiple ? [] : null;
835
+ }
836
+ return this._multiple ? [...this._values] : this._values[0];
837
+ }
838
+ _getSelectedText() {
839
+ if (this._adapter.isWrappingChipField()) {
840
+ return "";
841
+ }
842
+ if (this._selectedTextBuilder) {
843
+ return this._selectedTextBuilder(this._selectedOptions);
844
+ } else {
845
+ if (this._multiple) {
846
+ if (this._values.length) {
847
+ return `${this._values.length} ${this._values.length === 1 ? "option" : "options"} selected`;
848
+ } else {
849
+ return "";
850
+ }
851
+ } else {
852
+ return this._selectedOptions.filter((o) => o && o.label).map((o) => o.label).join(" ").trim();
853
+ }
854
+ }
855
+ }
856
+ _onDismiss() {
857
+ this._closeDropdown();
858
+ }
859
+ async _applyValue(value) {
860
+ let values = [];
861
+ this._selectedOptions = [];
862
+ if (!Array.isArray(value)) {
863
+ values = isDefined(value) ? [value] : [];
864
+ } else {
865
+ values = value;
866
+ }
867
+ if (!this._multiple && values.length > 1) {
868
+ values = [values[0]];
869
+ }
870
+ if (isOptionType(values, 0 /* Option */)) {
871
+ this._values = values.map((o) => o.value);
872
+ this._selectedOptions = values;
873
+ } else {
874
+ this._values = values;
875
+ }
876
+ const allOptions = this._flatOptions;
877
+ if (values.length && allOptions.length) {
878
+ this._updateSelectedOptions(values);
879
+ }
880
+ if (this._values.length && !this._selectedOptions.length && this._filter && this._isInitialized) {
881
+ try {
882
+ await this._executeFilter(false, true);
883
+ } catch (e) {
884
+ console.error(e);
885
+ }
886
+ this._updateSelectedOptions(this._values);
887
+ }
888
+ if (!this._multiple) {
889
+ this._filterText = this._selectedOptions.length ? this._selectedOptions[0].label : "";
890
+ } else {
891
+ this._filterText = "";
892
+ }
893
+ if (this._isInitialized) {
894
+ this._adapter.setSelectedText(this._getSelectedText());
895
+ }
896
+ if (this._isDropdownOpen) {
897
+ this._adapter.setSelectedOptions(this._selectedOptions);
898
+ }
899
+ }
900
+ _updateSelectedOptions(values) {
901
+ const flatOptions = [...this._flatOptions, ...this._selectedOptions];
902
+ if (this._selectedOptions.length) {
903
+ this._selectedOptions = [];
904
+ }
905
+ if (isOptionType(values, 0 /* Option */)) {
906
+ for (const option of values) {
907
+ const actualOption = flatOptions.find((o) => optionEqualPredicate(o, option.value, this._matchKey));
908
+ if (actualOption) {
909
+ this._selectedOptions.push(actualOption);
910
+ } else {
911
+ this._selectedOptions.push(option);
912
+ }
913
+ }
914
+ } else {
915
+ for (const value of values) {
916
+ const actualOption = flatOptions.find((o) => optionEqualPredicate(o, value, this._matchKey));
917
+ if (actualOption) {
918
+ this._selectedOptions.push(actualOption);
919
+ } else if (this._allowUnmatched) {
920
+ this._selectedOptions.push({ label: value, value });
921
+ }
922
+ }
923
+ }
924
+ }
925
+ get mode() {
926
+ return this._mode;
927
+ }
928
+ set mode(value) {
929
+ if (this._mode !== value) {
930
+ this._mode = value;
931
+ if (this._mode === "stateless" /* Stateless */) {
932
+ this._selectedOptions = [];
933
+ if (this._isDropdownOpen) {
934
+ this._closeDropdown();
935
+ }
936
+ }
937
+ this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MODE, this._mode);
938
+ }
939
+ }
940
+ get multiple() {
941
+ return this._multiple;
942
+ }
943
+ set multiple(value) {
944
+ if (this._multiple !== value) {
945
+ this._multiple = value;
946
+ this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE, isDefined(this._multiple) ? this._multiple.toString() : "");
947
+ }
948
+ }
949
+ get value() {
950
+ return this._getValue();
951
+ }
952
+ set value(value) {
953
+ let values = [];
954
+ if (value === null || value === void 0) {
955
+ values = [];
956
+ } else if (Array.isArray(value)) {
957
+ values = JSON.parse(JSON.stringify(value));
958
+ } else if (isString(value)) {
959
+ values = [value];
960
+ } else {
961
+ values = [JSON.parse(JSON.stringify(value))];
962
+ }
963
+ const hasNewValue = values.length !== this._values.length || values.some((v) => !this._values.includes(v));
964
+ if (!hasNewValue) {
965
+ return;
966
+ }
967
+ this._applyValue(value);
968
+ }
969
+ get filterOnFocus() {
970
+ return this._filterOnFocus;
971
+ }
972
+ set filterOnFocus(value) {
973
+ if (this._filterOnFocus !== value) {
974
+ this._filterOnFocus = value;
975
+ this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS, isDefined(this._filterOnFocus) ? this._filterOnFocus.toString() : "");
976
+ }
977
+ }
978
+ get allowUnmatched() {
979
+ return this._allowUnmatched;
980
+ }
981
+ set allowUnmatched(value) {
982
+ if (this._allowUnmatched !== value) {
983
+ this._allowUnmatched = value;
984
+ if (isDefined(this._allowUnmatched)) {
985
+ this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED, this._allowUnmatched.toString());
986
+ }
987
+ }
988
+ }
989
+ get matchKey() {
990
+ return this._matchKey;
991
+ }
992
+ set matchKey(value) {
993
+ if (this._matchKey !== value) {
994
+ this._matchKey = value;
995
+ }
996
+ }
997
+ get popupTarget() {
998
+ return this._popupTarget;
999
+ }
1000
+ set popupTarget(value) {
1001
+ if (this._popupTarget !== value) {
1002
+ this._popupTarget = value;
1003
+ }
1004
+ }
1005
+ get popupClasses() {
1006
+ return Array.isArray(this._popupClasses) ? [...this._popupClasses] : [this._popupClasses];
1007
+ }
1008
+ set popupClasses(value) {
1009
+ if (this._popupClasses !== value) {
1010
+ this._popupClasses = Array.isArray(value) ? [...value] : [value];
1011
+ }
1012
+ }
1013
+ set popupHeaderBuilder(value) {
1014
+ this._popupHeaderBuilder = value;
1015
+ }
1016
+ set popupFooterBuilder(value) {
1017
+ this._popupFooterBuilder = value;
1018
+ }
1019
+ get syncPopupWidth() {
1020
+ return this._syncPopupWidth;
1021
+ }
1022
+ set syncPopupWidth(value) {
1023
+ if (this._syncPopupWidth !== value) {
1024
+ this._syncPopupWidth = value;
1025
+ }
1026
+ }
1027
+ get optionLimit() {
1028
+ return this._optionLimit;
1029
+ }
1030
+ set optionLimit(value) {
1031
+ if (this._optionLimit !== value) {
1032
+ this._optionLimit = value;
1033
+ }
1034
+ }
1035
+ get debounce() {
1036
+ return this._debounce;
1037
+ }
1038
+ set debounce(value) {
1039
+ if (this._debounce !== value) {
1040
+ this._debounce = value;
1041
+ if (this._isInitialized) {
1042
+ this._setFilterCallback();
1043
+ }
1044
+ this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE, isDefined(this._debounce) ? this._debounce.toString() : "");
1045
+ }
1046
+ }
1047
+ get optionBuilder() {
1048
+ return this._optionBuilder;
1049
+ }
1050
+ set optionBuilder(fn) {
1051
+ this._optionBuilder = fn;
1052
+ }
1053
+ get filter() {
1054
+ return this._filter;
1055
+ }
1056
+ set filter(cb) {
1057
+ if (this._filter !== cb) {
1058
+ this._filter = cb;
1059
+ if (this._isInitialized && this._values.length && !this._flatOptions.length && this._filter) {
1060
+ this._executeFilter().then(() => {
1061
+ this._updateSelectedOptions(this._values);
1062
+ this._adapter.setSelectedText(this._getSelectedText());
1063
+ });
1064
+ }
1065
+ }
1066
+ }
1067
+ get selectedTextBuilder() {
1068
+ return this._selectedTextBuilder;
1069
+ }
1070
+ set selectedTextBuilder(fn) {
1071
+ this._selectedTextBuilder = fn;
1072
+ if (this._selectedOptions.length) {
1073
+ this._adapter.setSelectedText(this._getSelectedText());
1074
+ }
1075
+ }
1076
+ get observeScroll() {
1077
+ return this._observeScroll;
1078
+ }
1079
+ set observeScroll(value) {
1080
+ this._observeScroll = value;
1081
+ }
1082
+ get observeScrollThreshold() {
1083
+ return this._observeScrollThreshold;
1084
+ }
1085
+ set observeScrollThreshold(value) {
1086
+ this._observeScrollThreshold = value;
1087
+ }
1088
+ appendOptions(options) {
1089
+ if (!this._isDropdownOpen) {
1090
+ return;
1091
+ }
1092
+ this._options = [...this._options, ...options];
1093
+ this._adapter.appendOptions(options);
1094
+ }
1095
+ get isInitialized() {
1096
+ return this._isInitialized;
1097
+ }
1098
+ get open() {
1099
+ return this._isDropdownOpen;
1100
+ }
1101
+ set open(value) {
1102
+ if (this._isDropdownOpen !== value) {
1103
+ if (value) {
1104
+ this._showDropdown({ userTriggered: false });
1105
+ } else {
1106
+ this._closeDropdown();
1107
+ }
1108
+ }
1109
+ }
1110
+ get beforeValueChange() {
1111
+ return this._beforeValueChange;
1112
+ }
1113
+ set beforeValueChange(value) {
1114
+ if (value !== this._beforeValueChange) {
1115
+ this._beforeValueChange = value;
1116
+ }
1117
+ }
1118
+ get popupElement() {
1119
+ return this._adapter.getPopupElement();
1120
+ }
1121
+ };
1122
+
1123
+ // dist/build/lib/staging/src/autocomplete/autocomplete.ts
1124
+ var template = "<template><slot></slot></template>";
1125
+ var styles = ":host{display:block}:host([hidden]){display:none}";
1126
+ var AutocompleteComponent = class extends ListDropdownAware {
1127
+ constructor() {
1128
+ super();
1129
+ IconRegistry.define([tylIconCheckBox, tylIconCheckBoxOutlineBlank]);
1130
+ attachShadowTemplate(this, template, styles);
1131
+ this._foundation = new AutocompleteFoundation(new AutocompleteAdapter(this));
1132
+ }
1133
+ static get observedAttributes() {
1134
+ return [
1135
+ AUTOCOMPLETE_CONSTANTS.attributes.MODE,
1136
+ AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE,
1137
+ AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE,
1138
+ AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS,
1139
+ AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED,
1140
+ AUTOCOMPLETE_CONSTANTS.attributes.POPUP_TARGET,
1141
+ AUTOCOMPLETE_CONSTANTS.attributes.POPUP_CLASSES,
1142
+ AUTOCOMPLETE_CONSTANTS.attributes.OBSERVE_SCROLL,
1143
+ AUTOCOMPLETE_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD,
1144
+ AUTOCOMPLETE_CONSTANTS.attributes.OPTION_LIMIT,
1145
+ AUTOCOMPLETE_CONSTANTS.attributes.SYNC_POPUP_WIDTH,
1146
+ AUTOCOMPLETE_CONSTANTS.attributes.OPEN,
1147
+ AUTOCOMPLETE_CONSTANTS.attributes.MATCH_KEY
1148
+ ];
1149
+ }
1150
+ connectedCallback() {
1151
+ if (this.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.INPUT)) {
1152
+ this._foundation.initialize();
1153
+ } else {
1154
+ ensureChild(this, AUTOCOMPLETE_CONSTANTS.selectors.INPUT).then(() => this._foundation.initialize());
1155
+ }
1156
+ }
1157
+ disconnectedCallback() {
1158
+ this._foundation.disconnect();
1159
+ }
1160
+ attributeChangedCallback(name, oldValue, newValue) {
1161
+ super.attributeChangedCallback(name, oldValue, newValue);
1162
+ switch (name) {
1163
+ case AUTOCOMPLETE_CONSTANTS.attributes.MODE:
1164
+ this.mode = newValue;
1165
+ break;
1166
+ case AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE:
1167
+ this.multiple = coerceBoolean(newValue);
1168
+ break;
1169
+ case AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE:
1170
+ this.debounce = coerceNumber(newValue);
1171
+ break;
1172
+ case AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS:
1173
+ this.filterOnFocus = coerceBoolean(newValue);
1174
+ break;
1175
+ case AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED:
1176
+ this.allowUnmatched = coerceBoolean(newValue);
1177
+ break;
1178
+ case AUTOCOMPLETE_CONSTANTS.attributes.POPUP_TARGET:
1179
+ this.popupTarget = newValue;
1180
+ break;
1181
+ case AUTOCOMPLETE_CONSTANTS.attributes.OPEN:
1182
+ this.open = coerceBoolean(newValue);
1183
+ break;
1184
+ case AUTOCOMPLETE_CONSTANTS.attributes.MATCH_KEY:
1185
+ this.matchKey = newValue;
1186
+ break;
1187
+ }
1188
+ }
1189
+ appendOptions(options) {
1190
+ this._foundation.appendOptions(options);
1191
+ }
1192
+ openDropdown() {
1193
+ this.open = true;
1194
+ }
1195
+ closeDropdown() {
1196
+ this.open = false;
1197
+ }
1198
+ };
1199
+ __decorateClass([
1200
+ FoundationProperty()
1201
+ ], AutocompleteComponent.prototype, "mode", 2);
1202
+ __decorateClass([
1203
+ FoundationProperty()
1204
+ ], AutocompleteComponent.prototype, "multiple", 2);
1205
+ __decorateClass([
1206
+ FoundationProperty()
1207
+ ], AutocompleteComponent.prototype, "value", 2);
1208
+ __decorateClass([
1209
+ FoundationProperty()
1210
+ ], AutocompleteComponent.prototype, "debounce", 2);
1211
+ __decorateClass([
1212
+ FoundationProperty()
1213
+ ], AutocompleteComponent.prototype, "filterOnFocus", 2);
1214
+ __decorateClass([
1215
+ FoundationProperty()
1216
+ ], AutocompleteComponent.prototype, "allowUnmatched", 2);
1217
+ __decorateClass([
1218
+ FoundationProperty()
1219
+ ], AutocompleteComponent.prototype, "popupTarget", 2);
1220
+ __decorateClass([
1221
+ FoundationProperty()
1222
+ ], AutocompleteComponent.prototype, "optionBuilder", 2);
1223
+ __decorateClass([
1224
+ FoundationProperty()
1225
+ ], AutocompleteComponent.prototype, "filter", 2);
1226
+ __decorateClass([
1227
+ FoundationProperty()
1228
+ ], AutocompleteComponent.prototype, "selectedTextBuilder", 2);
1229
+ __decorateClass([
1230
+ FoundationProperty()
1231
+ ], AutocompleteComponent.prototype, "open", 2);
1232
+ __decorateClass([
1233
+ FoundationProperty()
1234
+ ], AutocompleteComponent.prototype, "matchKey", 2);
1235
+ __decorateClass([
1236
+ FoundationProperty({ set: false })
1237
+ ], AutocompleteComponent.prototype, "isInitialized", 2);
1238
+ __decorateClass([
1239
+ FoundationProperty({ set: false })
1240
+ ], AutocompleteComponent.prototype, "popupElement", 2);
1241
+ __decorateClass([
1242
+ FoundationProperty()
1243
+ ], AutocompleteComponent.prototype, "beforeValueChange", 2);
1244
+ AutocompleteComponent = __decorateClass([
1245
+ CustomElement({
1246
+ name: AUTOCOMPLETE_CONSTANTS.elementName,
1247
+ dependencies: [
1248
+ TextFieldComponent,
1249
+ PopupComponent,
1250
+ ListComponent,
1251
+ ListItemComponent,
1252
+ DividerComponent,
1253
+ SkeletonComponent,
1254
+ LinearProgressComponent,
1255
+ IconComponent
1256
+ ]
1257
+ })
1258
+ ], AutocompleteComponent);
1259
+
1260
+ // dist/build/lib/staging/src/autocomplete/autocomplete-component-delegate.ts
1261
+ var AutocompleteComponentDelegate = class extends FormFieldComponentDelegate {
1262
+ constructor(config) {
1263
+ super(config);
1264
+ }
1265
+ _build() {
1266
+ const autocomplete = document.createElement(AUTOCOMPLETE_CONSTANTS.elementName);
1267
+ this._attachTextField(autocomplete);
1268
+ return autocomplete;
1269
+ }
1270
+ get textFieldDelegate() {
1271
+ return this._textFieldDelegate;
1272
+ }
1273
+ get value() {
1274
+ return this._element.value;
1275
+ }
1276
+ set value(value) {
1277
+ this._element.value = value;
1278
+ }
1279
+ get disabled() {
1280
+ return this._textFieldDelegate.inputElement.disabled;
1281
+ }
1282
+ set disabled(value) {
1283
+ this._textFieldDelegate.inputElement.disabled = value;
1284
+ }
1285
+ get invalid() {
1286
+ return this._textFieldDelegate.invalid || false;
1287
+ }
1288
+ set invalid(value) {
1289
+ this._textFieldDelegate.invalid = value;
1290
+ }
1291
+ onChange(listener) {
1292
+ this._element.addEventListener(AUTOCOMPLETE_CONSTANTS.events.CHANGE, (evt) => listener(evt.detail));
1293
+ }
1294
+ onFocus(listener) {
1295
+ this._textFieldDelegate.inputElement.addEventListener("focus", (evt) => listener(evt));
1296
+ }
1297
+ onBlur(listener) {
1298
+ this._textFieldDelegate.inputElement.addEventListener("blur", (evt) => listener(evt));
1299
+ }
1300
+ _attachTextField(autocomplete) {
1301
+ var _a, _b, _c, _d, _e, _f;
1302
+ const textFieldConfig = {
1303
+ props: __spreadValues({}, (_b = (_a = this._config.options) == null ? void 0 : _a.textFieldDelegateConfig) == null ? void 0 : _b.props),
1304
+ options: __spreadValues({}, (_d = (_c = this._config.options) == null ? void 0 : _c.textFieldDelegateConfig) == null ? void 0 : _d.options)
1305
+ };
1306
+ if (!textFieldConfig.options) {
1307
+ textFieldConfig.options = {};
1308
+ }
1309
+ if (((_e = this._config.options) == null ? void 0 : _e.useDropdownIcon) !== false && !((_f = textFieldConfig.options) == null ? void 0 : _f.trailingElement)) {
1310
+ textFieldConfig.options.trailingElement = this._createDropdownIconElement();
1311
+ }
1312
+ this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);
1313
+ autocomplete.appendChild(this._textFieldDelegate.element);
1314
+ }
1315
+ _createDropdownIconElement() {
1316
+ const config = {
1317
+ props: {
1318
+ slot: "trailing",
1319
+ name: "arrow_drop_down"
1320
+ },
1321
+ options: {
1322
+ attributes: { "forge-dropdown-icon": "" }
1323
+ }
1324
+ };
1325
+ return new IconComponentDelegate(config).element;
1326
+ }
1327
+ };
1328
+
1329
+ // dist/build/lib/staging/src/autocomplete/index.ts
1330
+ function defineAutocompleteComponent() {
1331
+ defineCustomElement(AutocompleteComponent);
1332
+ }
1333
+
1334
+ export {
1335
+ AUTOCOMPLETE_CONSTANTS,
1336
+ AutocompleteMode,
1337
+ AutocompleteAdapter,
1338
+ OptionType,
1339
+ isOptionType,
1340
+ getSelectedOption,
1341
+ optionEqualPredicate,
1342
+ AutocompleteFoundation,
1343
+ AutocompleteComponent,
1344
+ AutocompleteComponentDelegate,
1345
+ defineAutocompleteComponent
1346
+ };
1347
+ //# sourceMappingURL=chunk.NRI7SWVX.js.map