@tylertech/forge 2.10.1 → 2.12.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 (215) hide show
  1. package/custom-elements.json +221 -5
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/app-bar/help-button/index.js +1 -1
  4. package/dist/esm/app-bar/index.js +1 -1
  5. package/dist/esm/app-bar/menu-button/index.js +1 -1
  6. package/dist/esm/app-bar/notification-button/index.js +1 -1
  7. package/dist/esm/app-bar/profile-button/index.js +1 -1
  8. package/dist/esm/app-bar/search/index.js +1 -1
  9. package/dist/esm/autocomplete/index.js +1 -1
  10. package/dist/esm/badge/index.js +1 -1
  11. package/dist/esm/banner/index.js +1 -1
  12. package/dist/esm/bottom-sheet/index.js +1 -1
  13. package/dist/esm/busy-indicator/index.js +1 -1
  14. package/dist/esm/button/index.js +1 -1
  15. package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
  16. package/dist/esm/button-toggle/index.js +1 -1
  17. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  18. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  19. package/dist/esm/calendar/index.js +1 -1
  20. package/dist/esm/checkbox/index.js +1 -1
  21. package/dist/esm/chip-field/index.js +1 -1
  22. package/dist/esm/chips/chip/index.js +1 -1
  23. package/dist/esm/chips/chip-set/index.js +1 -1
  24. package/dist/esm/chips/index.js +1 -1
  25. package/dist/esm/chunks/{chunk.I33ZJKOX.js → chunk.2SAHWDGJ.js} +2 -2
  26. package/dist/esm/chunks/{chunk.I33ZJKOX.js.map → chunk.2SAHWDGJ.js.map} +0 -0
  27. package/dist/esm/chunks/chunk.2VFX652S.js +12 -0
  28. package/dist/esm/chunks/{chunk.4DS3GUQ5.js.map → chunk.2VFX652S.js.map} +0 -0
  29. package/dist/esm/chunks/{chunk.IBQVV4HR.js → chunk.4HI4HGZ6.js} +2 -2
  30. package/dist/esm/chunks/{chunk.IBQVV4HR.js.map → chunk.4HI4HGZ6.js.map} +0 -0
  31. package/dist/esm/chunks/{chunk.DGQAYNAF.js → chunk.4KBQ5AJJ.js} +2 -2
  32. package/dist/esm/chunks/{chunk.DGQAYNAF.js.map → chunk.4KBQ5AJJ.js.map} +0 -0
  33. package/dist/esm/chunks/{chunk.XURVHDKR.js → chunk.4WFU5CVF.js} +2 -2
  34. package/dist/esm/chunks/{chunk.XURVHDKR.js.map → chunk.4WFU5CVF.js.map} +0 -0
  35. package/dist/esm/chunks/chunk.5K5SIZRX.js +7 -0
  36. package/dist/esm/chunks/chunk.5K5SIZRX.js.map +7 -0
  37. package/dist/esm/chunks/{chunk.2YGKMENJ.js → chunk.5PQTSZ7G.js} +2 -2
  38. package/dist/esm/chunks/{chunk.2YGKMENJ.js.map → chunk.5PQTSZ7G.js.map} +0 -0
  39. package/dist/esm/chunks/{chunk.EM3OQRZP.js → chunk.77FVTUTL.js} +2 -2
  40. package/dist/esm/chunks/{chunk.EM3OQRZP.js.map → chunk.77FVTUTL.js.map} +0 -0
  41. package/dist/esm/chunks/chunk.7GTCDP5H.js +7 -0
  42. package/dist/esm/chunks/{chunk.YWQZURLM.js.map → chunk.7GTCDP5H.js.map} +2 -2
  43. package/dist/esm/chunks/{chunk.KLHXGSZU.js → chunk.7O7V3N4A.js} +2 -2
  44. package/dist/esm/chunks/{chunk.KLHXGSZU.js.map → chunk.7O7V3N4A.js.map} +0 -0
  45. package/dist/esm/chunks/{chunk.ESW45SN4.js → chunk.7PHGAX6P.js} +2 -2
  46. package/dist/esm/chunks/{chunk.ESW45SN4.js.map → chunk.7PHGAX6P.js.map} +0 -0
  47. package/dist/esm/chunks/{chunk.VEVOKTUX.js → chunk.7TKJAZTM.js} +2 -2
  48. package/dist/esm/chunks/{chunk.VEVOKTUX.js.map → chunk.7TKJAZTM.js.map} +0 -0
  49. package/dist/esm/chunks/{chunk.WAEWHBHE.js → chunk.APGFXXJ7.js} +2 -2
  50. package/dist/esm/chunks/{chunk.WAEWHBHE.js.map → chunk.APGFXXJ7.js.map} +0 -0
  51. package/dist/esm/chunks/{chunk.A6I4EIPW.js → chunk.BFNAQQCU.js} +2 -2
  52. package/dist/esm/chunks/{chunk.A6I4EIPW.js.map → chunk.BFNAQQCU.js.map} +0 -0
  53. package/dist/esm/chunks/{chunk.G5BCWBD5.js → chunk.BOENNFXE.js} +2 -2
  54. package/dist/esm/chunks/{chunk.G5BCWBD5.js.map → chunk.BOENNFXE.js.map} +0 -0
  55. package/dist/esm/chunks/chunk.CVJTQY2T.js +7 -0
  56. package/dist/esm/chunks/chunk.CVJTQY2T.js.map +7 -0
  57. package/dist/esm/chunks/{chunk.WYVYTAFS.js → chunk.DML4YNQF.js} +2 -2
  58. package/dist/esm/chunks/{chunk.WYVYTAFS.js.map → chunk.DML4YNQF.js.map} +0 -0
  59. package/dist/esm/chunks/{chunk.RS5NH2NG.js → chunk.FPV4XEUK.js} +2 -2
  60. package/dist/esm/chunks/{chunk.RS5NH2NG.js.map → chunk.FPV4XEUK.js.map} +0 -0
  61. package/dist/esm/chunks/{chunk.WZRXUTYC.js → chunk.G77PXLAU.js} +2 -2
  62. package/dist/esm/chunks/{chunk.WZRXUTYC.js.map → chunk.G77PXLAU.js.map} +0 -0
  63. package/dist/esm/chunks/{chunk.2A3CKLXJ.js → chunk.I2YRKTG7.js} +2 -2
  64. package/dist/esm/chunks/{chunk.2A3CKLXJ.js.map → chunk.I2YRKTG7.js.map} +0 -0
  65. package/dist/esm/chunks/{chunk.AFZB3MG5.js → chunk.IFZXG3LI.js} +2 -2
  66. package/dist/esm/chunks/{chunk.AFZB3MG5.js.map → chunk.IFZXG3LI.js.map} +0 -0
  67. package/dist/esm/chunks/{chunk.OHCHNL3V.js → chunk.JNOCXQVB.js} +2 -2
  68. package/dist/esm/chunks/{chunk.OHCHNL3V.js.map → chunk.JNOCXQVB.js.map} +2 -2
  69. package/dist/esm/chunks/chunk.K6LZM6DS.js +7 -0
  70. package/dist/esm/chunks/{chunk.SFFYXKJW.js.map → chunk.K6LZM6DS.js.map} +2 -2
  71. package/dist/esm/chunks/{chunk.5SRA2RH3.js → chunk.KKF2ZZMD.js} +2 -2
  72. package/dist/esm/chunks/{chunk.5SRA2RH3.js.map → chunk.KKF2ZZMD.js.map} +0 -0
  73. package/dist/esm/chunks/chunk.KYCC3C3M.js +7 -0
  74. package/dist/esm/chunks/{chunk.AABG6MSC.js.map → chunk.KYCC3C3M.js.map} +2 -2
  75. package/dist/esm/chunks/{chunk.NEGJYSPB.js → chunk.LLHA3SQR.js} +2 -2
  76. package/dist/esm/chunks/{chunk.NEGJYSPB.js.map → chunk.LLHA3SQR.js.map} +0 -0
  77. package/dist/esm/chunks/chunk.MNBJMPJ6.js +7 -0
  78. package/dist/esm/chunks/chunk.MNBJMPJ6.js.map +7 -0
  79. package/dist/esm/chunks/{chunk.JXQZMASB.js → chunk.OAKTW64X.js} +2 -2
  80. package/dist/esm/chunks/{chunk.JXQZMASB.js.map → chunk.OAKTW64X.js.map} +0 -0
  81. package/dist/esm/chunks/{chunk.CSOY4C7A.js → chunk.OG2BI3UW.js} +2 -2
  82. package/dist/esm/chunks/{chunk.CSOY4C7A.js.map → chunk.OG2BI3UW.js.map} +2 -2
  83. package/dist/esm/chunks/{chunk.NJHQA266.js → chunk.OPTMTRWL.js} +2 -2
  84. package/dist/esm/chunks/{chunk.NJHQA266.js.map → chunk.OPTMTRWL.js.map} +0 -0
  85. package/dist/esm/chunks/{chunk.AHOQXJRN.js → chunk.P6B3UWJ5.js} +2 -2
  86. package/dist/esm/chunks/{chunk.AHOQXJRN.js.map → chunk.P6B3UWJ5.js.map} +0 -0
  87. package/dist/esm/chunks/{chunk.W7UTHKBF.js → chunk.Q6L7T6OJ.js} +2 -2
  88. package/dist/esm/chunks/{chunk.W7UTHKBF.js.map → chunk.Q6L7T6OJ.js.map} +0 -0
  89. package/dist/esm/chunks/{chunk.WGE5R5JK.js → chunk.QBDE7M3E.js} +2 -2
  90. package/dist/esm/chunks/{chunk.WGE5R5JK.js.map → chunk.QBDE7M3E.js.map} +0 -0
  91. package/dist/esm/chunks/{chunk.J6ERQLHJ.js → chunk.RPPBBBYG.js} +2 -2
  92. package/dist/esm/chunks/{chunk.J6ERQLHJ.js.map → chunk.RPPBBBYG.js.map} +2 -2
  93. package/dist/esm/chunks/{chunk.DJSOBAWA.js → chunk.SJSLC6XF.js} +2 -2
  94. package/dist/esm/chunks/{chunk.DJSOBAWA.js.map → chunk.SJSLC6XF.js.map} +0 -0
  95. package/dist/esm/chunks/{chunk.YFIDBZ7V.js → chunk.SLZFPWOH.js} +2 -2
  96. package/dist/esm/chunks/{chunk.YFIDBZ7V.js.map → chunk.SLZFPWOH.js.map} +0 -0
  97. package/dist/esm/chunks/{chunk.WKKNDQYZ.js → chunk.SVHVGMKS.js} +2 -2
  98. package/dist/esm/chunks/{chunk.WKKNDQYZ.js.map → chunk.SVHVGMKS.js.map} +0 -0
  99. package/dist/esm/chunks/{chunk.WMO47F6Z.js → chunk.TLHI6K2R.js} +2 -2
  100. package/dist/esm/chunks/{chunk.WMO47F6Z.js.map → chunk.TLHI6K2R.js.map} +0 -0
  101. package/dist/esm/chunks/{chunk.6BKOGBE6.js → chunk.TR64DV3G.js} +2 -2
  102. package/dist/esm/chunks/{chunk.6BKOGBE6.js.map → chunk.TR64DV3G.js.map} +0 -0
  103. package/dist/esm/chunks/chunk.UHVCXKB4.js +7 -0
  104. package/dist/esm/chunks/chunk.UHVCXKB4.js.map +7 -0
  105. package/dist/esm/chunks/{chunk.MTMZFAWU.js → chunk.V7P3QPNM.js} +2 -2
  106. package/dist/esm/chunks/{chunk.MTMZFAWU.js.map → chunk.V7P3QPNM.js.map} +0 -0
  107. package/dist/esm/chunks/{chunk.ZHCQBWAG.js → chunk.WALEAV54.js} +2 -2
  108. package/dist/esm/chunks/{chunk.ZHCQBWAG.js.map → chunk.WALEAV54.js.map} +0 -0
  109. package/dist/esm/chunks/{chunk.SNGELGOD.js → chunk.WV45FGTW.js} +2 -2
  110. package/dist/esm/chunks/{chunk.SNGELGOD.js.map → chunk.WV45FGTW.js.map} +0 -0
  111. package/dist/esm/chunks/chunk.Y6FFG7XO.js +7 -0
  112. package/dist/esm/chunks/chunk.Y6FFG7XO.js.map +7 -0
  113. package/dist/esm/chunks/{chunk.RZL6S3K3.js → chunk.Y6MPWPZU.js} +2 -2
  114. package/dist/esm/chunks/{chunk.RZL6S3K3.js.map → chunk.Y6MPWPZU.js.map} +0 -0
  115. package/dist/esm/chunks/{chunk.7TQYFMM4.js → chunk.YAJT3P6V.js} +2 -2
  116. package/dist/esm/chunks/{chunk.7TQYFMM4.js.map → chunk.YAJT3P6V.js.map} +0 -0
  117. package/dist/esm/chunks/{chunk.57XBS3DF.js → chunk.YSE5EMB3.js} +2 -2
  118. package/dist/esm/chunks/{chunk.57XBS3DF.js.map → chunk.YSE5EMB3.js.map} +0 -0
  119. package/dist/esm/chunks/{chunk.KZHMDZVS.js → chunk.YWKKZLZ2.js} +2 -2
  120. package/dist/esm/chunks/{chunk.KZHMDZVS.js.map → chunk.YWKKZLZ2.js.map} +0 -0
  121. package/dist/esm/chunks/{chunk.UNTTQM6V.js → chunk.YX5SWK3O.js} +2 -2
  122. package/dist/esm/chunks/{chunk.UNTTQM6V.js.map → chunk.YX5SWK3O.js.map} +0 -0
  123. package/dist/esm/chunks/{chunk.7WWP6WI6.js → chunk.Z5P6EA5L.js} +2 -2
  124. package/dist/esm/chunks/{chunk.7WWP6WI6.js.map → chunk.Z5P6EA5L.js.map} +0 -0
  125. package/dist/esm/chunks/chunk.ZFUVXYDL.js +7 -0
  126. package/dist/esm/chunks/chunk.ZFUVXYDL.js.map +7 -0
  127. package/dist/esm/chunks/{chunk.5HUDHTAK.js → chunk.ZHXPL2MS.js} +2 -2
  128. package/dist/esm/chunks/{chunk.5HUDHTAK.js.map → chunk.ZHXPL2MS.js.map} +0 -0
  129. package/dist/esm/color-picker/index.js +1 -1
  130. package/dist/esm/core/index.js +1 -1
  131. package/dist/esm/core/utils/index.js +1 -1
  132. package/dist/esm/date-picker/index.js +1 -1
  133. package/dist/esm/date-range-picker/index.js +1 -1
  134. package/dist/esm/dialog/index.js +1 -1
  135. package/dist/esm/expansion-panel/index.js +1 -1
  136. package/dist/esm/file-picker/index.js +1 -1
  137. package/dist/esm/icon/index.js +1 -1
  138. package/dist/esm/icon-button/index.js +1 -1
  139. package/dist/esm/index.js +1 -1
  140. package/dist/esm/label-value/index.js +1 -1
  141. package/dist/esm/list-dropdown/index.js +1 -1
  142. package/dist/esm/menu/index.js +1 -1
  143. package/dist/esm/open-icon/index.js +1 -1
  144. package/dist/esm/paginator/index.js +1 -1
  145. package/dist/esm/profile-card/index.js +1 -1
  146. package/dist/esm/quantity-field/index.js +1 -1
  147. package/dist/esm/select/core/index.js +1 -1
  148. package/dist/esm/select/index.js +1 -1
  149. package/dist/esm/select/select/index.js +1 -1
  150. package/dist/esm/select/select-dropdown/index.js +1 -1
  151. package/dist/esm/slider/index.js +1 -1
  152. package/dist/esm/split-view/index.js +1 -1
  153. package/dist/esm/split-view/split-view/index.js +1 -1
  154. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  155. package/dist/esm/stepper/index.js +1 -1
  156. package/dist/esm/stepper/step/index.js +1 -1
  157. package/dist/esm/stepper/stepper/index.js +1 -1
  158. package/dist/esm/switch/index.js +1 -1
  159. package/dist/esm/table/index.js +1 -1
  160. package/dist/esm/tabs/index.js +1 -1
  161. package/dist/esm/tabs/tab-bar/index.js +1 -1
  162. package/dist/esm/text-field/index.js +1 -1
  163. package/dist/esm/time-picker/index.js +1 -1
  164. package/dist/esm/toast/index.js +1 -1
  165. package/dist/esm/toolbar/index.js +1 -1
  166. package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
  167. package/esm/autocomplete/autocomplete-adapter.js +10 -0
  168. package/esm/autocomplete/autocomplete-constants.js +2 -1
  169. package/esm/autocomplete/autocomplete-foundation.d.ts +1 -0
  170. package/esm/autocomplete/autocomplete-foundation.js +9 -0
  171. package/esm/badge/badge.js +2 -2
  172. package/esm/button-toggle/button-toggle-group/button-toggle-group-constants.d.ts +1 -1
  173. package/esm/button-toggle/button-toggle-group/button-toggle-group.d.ts +4 -1
  174. package/esm/core/utils/utils.d.ts +6 -0
  175. package/esm/core/utils/utils.js +10 -0
  176. package/esm/expansion-panel/expansion-panel-foundation.js +2 -2
  177. package/esm/field/field-constants.d.ts +3 -0
  178. package/esm/field/field-constants.js +4 -0
  179. package/esm/field/field.js +3 -3
  180. package/esm/menu/menu-foundation.d.ts +1 -0
  181. package/esm/menu/menu-foundation.js +6 -3
  182. package/esm/select/core/base-select-adapter.d.ts +2 -0
  183. package/esm/select/core/base-select-adapter.js +17 -7
  184. package/esm/select/core/base-select-foundation.d.ts +1 -0
  185. package/esm/select/core/base-select-foundation.js +7 -0
  186. package/esm/split-view/split-view/split-view-adapter.d.ts +4 -0
  187. package/esm/split-view/split-view/split-view-adapter.js +7 -1
  188. package/esm/split-view/split-view/split-view-foundation.d.ts +4 -0
  189. package/esm/split-view/split-view/split-view-foundation.js +12 -0
  190. package/esm/split-view/split-view/split-view.d.ts +5 -0
  191. package/esm/split-view/split-view/split-view.js +5 -0
  192. package/esm/split-view/split-view-panel/split-view-panel-foundation.js +2 -2
  193. package/esm/split-view/split-view-panel/split-view-panel.d.ts +5 -0
  194. package/esm/split-view/split-view-panel/split-view-panel.js +6 -1
  195. package/esm/toolbar/toolbar.js +1 -1
  196. package/package.json +1 -1
  197. package/styles/badge/_mixins.scss +5 -1
  198. package/styles/toolbar/_mixins.scss +2 -2
  199. package/styles/toolbar/toolbar.scss +6 -0
  200. package/dist/esm/chunks/chunk.4DS3GUQ5.js +0 -12
  201. package/dist/esm/chunks/chunk.5QK7XR2W.js +0 -7
  202. package/dist/esm/chunks/chunk.5QK7XR2W.js.map +0 -7
  203. package/dist/esm/chunks/chunk.7GT5LOI3.js +0 -7
  204. package/dist/esm/chunks/chunk.7GT5LOI3.js.map +0 -7
  205. package/dist/esm/chunks/chunk.AABG6MSC.js +0 -7
  206. package/dist/esm/chunks/chunk.GP7WDYWQ.js +0 -7
  207. package/dist/esm/chunks/chunk.GP7WDYWQ.js.map +0 -7
  208. package/dist/esm/chunks/chunk.R46EDURP.js +0 -7
  209. package/dist/esm/chunks/chunk.R46EDURP.js.map +0 -7
  210. package/dist/esm/chunks/chunk.SFFYXKJW.js +0 -7
  211. package/dist/esm/chunks/chunk.SHSR5RZ4.js +0 -7
  212. package/dist/esm/chunks/chunk.SHSR5RZ4.js.map +0 -7
  213. package/dist/esm/chunks/chunk.WSGJIPQJ.js +0 -7
  214. package/dist/esm/chunks/chunk.WSGJIPQJ.js.map +0 -7
  215. package/dist/esm/chunks/chunk.YWQZURLM.js +0 -7
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as w,b as L,d as O,e as B}from"./chunk.WKKNDQYZ.js";import{E as N}from"./chunk.5HUDHTAK.js";import{F as S}from"./chunk.23VA56ZY.js";import{b as y}from"./chunk.IMK2LFWR.js";import{e as g}from"./chunk.AWCBH5KW.js";import{e as V}from"./chunk.DRFU6POI.js";import{b as M}from"./chunk.G5BCWBD5.js";import{p as P}from"./chunk.LZMYHIO2.js";import{a as D}from"./chunk.D4SNVKDA.js";import{d as T,l as F}from"./chunk.7TQYFMM4.js";import{a as x}from"./chunk.24D46RLZ.js";import{b as A}from"./chunk.7ZS4N2FT.js";import{e as m}from"./chunk.AABG6MSC.js";import{a as b,b as k}from"./chunk.BSZ2LBJX.js";import{a as E,e as C,i as I}from"./chunk.HN4PXH3D.js";import{s as f}from"./chunk.R4NDFXVA.js";import{f as v}from"./chunk.G76HB2FK.js";import{a as d,f as _}from"./chunk.MCIQXNKY.js";var r=`${k}date-picker`,z={VALUE:"value"},U={INPUT:"input,input[forge-date-picker-input]"},R={CHANGE:`${r}-change`,OPEN:`${r}-open`,CLOSE:`${r}-close`,INPUT:`${r}-input`},n={elementName:r,selectors:U,events:R,observedAttributes:z};var l=class extends O{constructor(e){super(e);this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(n.selectors.INPUT)}_initializeCalendarDropdown(){let e=this._getDefaultTargetElement();this._calendarDropdown=new S(e,this._dropdownIdentifier)}initializeMask(e){this._inputMask&&this._inputMask.destroy(),this._inputMask=new A(this._inputElement,e)}destroyMask(){this._inputMask&&(this._inputMask.destroy(),this._inputMask=void 0)}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier)}addInputListener(e,t,i){var a;(a=this._inputElement)==null||a.addEventListener(e,t,{capture:i})}removeInputListener(e,t,i){var a;(a=this._inputElement)==null||a.removeEventListener(e,t,{capture:i})}setInputValueChangedListener(e,t){this.destroyValueChangeListener();let i=g(e,this._inputElement,"value",t);this._valueChangeListeners.push(i)}hasInputElement(){return!!this._inputElement}attachCalendar(e,t){super.attachCalendar(e,t),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(e){this._inputElement.setAttribute("aria-activedescendant",e)}setInputValue(e,t){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.updateMask(),t&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return f()===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",e.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=e))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(e,t){I(this._inputElement,e,t)}};var p=class extends B{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,t){let i=this._getTypedValue(e);return this._adapter.emitHostEvent(n.events.CHANGE,i,!0,!t)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let t=this._formatDate(this._value);t?this._adapter.setInputValue(t,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let t=e.date;if(e.type==="date"&&this._closeCalendar(!0),!this._emitChangeEvent(t))return;let i=this._formatDate(t);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._formatInputValue(),D.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let t=this._getCurrentValue();t&&this._adapter.goToCalendarDate(new Date(t))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let t=this._getSanitizedDateString(e),i=this._coerceDateValue(t);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,t),!m(i,this._value)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(i)}_onInputValueChanged(e){let t=this._getSanitizedDateString(e);if(this._masked&&t)return;let i=this._coerceDateValue(t);!m(i,this._value)&&this._isDateValueAcceptable(i)&&(this.value=i,this._emitChangeEvent(this._value))}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?v(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var K="<template><slot></slot></template>",$=":host{display:block}:host([hidden]){display:none}",o=class extends L{static get observedAttributes(){return[...Object.values(w.observedAttributes),n.observedAttributes.VALUE]}constructor(){super(),T.define(P),C(this,K,$),this._foundation=new p(new l(this))}attributeChangedCallback(s,e,t){switch(s){case n.observedAttributes.VALUE:this.value=t;return}super.attributeChangedCallback(s,e,t)}};o=_([b({name:n.elementName,dependencies:[V,N,M,F]})],o);var H=class extends x{constructor(e){super(e)}_build(){let e=document.createElement(n.elementName);return this._attachTextField(e),e}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.target.value)):this.getInputElement().addEventListener("input",t=>e(t.target.value))}onInput(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.detail)):this._textFieldDelegate.inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,a,c,h;let t={props:d({},(a=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(h=(c=this._config.options)==null?void 0:c.textFieldDelegateConfig)==null?void 0:h.options)};this._textFieldDelegate=new y(t),e.appendChild(this._textFieldDelegate.element)}};function Fe(){E(o)}export{n as a,l as b,p as c,o as d,H as e,Fe as f};
7
- //# sourceMappingURL=chunk.NJHQA266.js.map
6
+ import{a as w,b as L,d as O,e as B}from"./chunk.SVHVGMKS.js";import{E as N}from"./chunk.ZHXPL2MS.js";import{F as S}from"./chunk.23VA56ZY.js";import{b as y}from"./chunk.IMK2LFWR.js";import{e as g}from"./chunk.AWCBH5KW.js";import{e as V}from"./chunk.DRFU6POI.js";import{b as M}from"./chunk.BOENNFXE.js";import{p as P}from"./chunk.LZMYHIO2.js";import{a as D}from"./chunk.D4SNVKDA.js";import{d as T,l as F}from"./chunk.YAJT3P6V.js";import{a as x}from"./chunk.24D46RLZ.js";import{b as A}from"./chunk.7ZS4N2FT.js";import{e as m}from"./chunk.KYCC3C3M.js";import{a as b,b as k}from"./chunk.BSZ2LBJX.js";import{a as E,e as C,i as I}from"./chunk.HN4PXH3D.js";import{s as f}from"./chunk.R4NDFXVA.js";import{f as v}from"./chunk.G76HB2FK.js";import{a as d,f as _}from"./chunk.MCIQXNKY.js";var r=`${k}date-picker`,z={VALUE:"value"},U={INPUT:"input,input[forge-date-picker-input]"},R={CHANGE:`${r}-change`,OPEN:`${r}-open`,CLOSE:`${r}-close`,INPUT:`${r}-input`},n={elementName:r,selectors:U,events:R,observedAttributes:z};var l=class extends O{constructor(e){super(e);this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(n.selectors.INPUT)}_initializeCalendarDropdown(){let e=this._getDefaultTargetElement();this._calendarDropdown=new S(e,this._dropdownIdentifier)}initializeMask(e){this._inputMask&&this._inputMask.destroy(),this._inputMask=new A(this._inputElement,e)}destroyMask(){this._inputMask&&(this._inputMask.destroy(),this._inputMask=void 0)}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier)}addInputListener(e,t,i){var a;(a=this._inputElement)==null||a.addEventListener(e,t,{capture:i})}removeInputListener(e,t,i){var a;(a=this._inputElement)==null||a.removeEventListener(e,t,{capture:i})}setInputValueChangedListener(e,t){this.destroyValueChangeListener();let i=g(e,this._inputElement,"value",t);this._valueChangeListeners.push(i)}hasInputElement(){return!!this._inputElement}attachCalendar(e,t){super.attachCalendar(e,t),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(e){this._inputElement.setAttribute("aria-activedescendant",e)}setInputValue(e,t){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.updateMask(),t&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return f()===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",e.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=e))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(e,t){I(this._inputElement,e,t)}};var p=class extends B{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,t){let i=this._getTypedValue(e);return this._adapter.emitHostEvent(n.events.CHANGE,i,!0,!t)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let t=this._formatDate(this._value);t?this._adapter.setInputValue(t,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let t=e.date;if(e.type==="date"&&this._closeCalendar(!0),!this._emitChangeEvent(t))return;let i=this._formatDate(t);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._formatInputValue(),D.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let t=this._getCurrentValue();t&&this._adapter.goToCalendarDate(new Date(t))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let t=this._getSanitizedDateString(e),i=this._coerceDateValue(t);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,t),!m(i,this._value)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(i)}_onInputValueChanged(e){let t=this._getSanitizedDateString(e);if(this._masked&&t)return;let i=this._coerceDateValue(t);!m(i,this._value)&&this._isDateValueAcceptable(i)&&(this.value=i,this._emitChangeEvent(this._value))}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?v(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var K="<template><slot></slot></template>",$=":host{display:block}:host([hidden]){display:none}",o=class extends L{static get observedAttributes(){return[...Object.values(w.observedAttributes),n.observedAttributes.VALUE]}constructor(){super(),T.define(P),C(this,K,$),this._foundation=new p(new l(this))}attributeChangedCallback(s,e,t){switch(s){case n.observedAttributes.VALUE:this.value=t;return}super.attributeChangedCallback(s,e,t)}};o=_([b({name:n.elementName,dependencies:[V,N,M,F]})],o);var H=class extends x{constructor(e){super(e)}_build(){let e=document.createElement(n.elementName);return this._attachTextField(e),e}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.target.value)):this.getInputElement().addEventListener("input",t=>e(t.target.value))}onInput(e){this._element.masked?this._element.addEventListener(n.events.INPUT,t=>e(t.detail)):this._textFieldDelegate.inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,a,c,h;let t={props:d({},(a=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(h=(c=this._config.options)==null?void 0:c.textFieldDelegateConfig)==null?void 0:h.options)};this._textFieldDelegate=new y(t),e.appendChild(this._textFieldDelegate.element)}};function Fe(){E(o)}export{n as a,l as b,p as c,o as d,H as e,Fe as f};
7
+ //# sourceMappingURL=chunk.OPTMTRWL.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{q as g,r as u}from"./chunk.LZMYHIO2.js";import{a as h,d as C,l as T}from"./chunk.7TQYFMM4.js";import{a as _}from"./chunk.A23NSEWA.js";import{a as p}from"./chunk.B3IJU6XJ.js";import{a as f,b}from"./chunk.BSZ2LBJX.js";import{a as N}from"./chunk.3E5QKMHL.js";import{a as O,e as d,g as s}from"./chunk.HN4PXH3D.js";import{t as I}from"./chunk.R4NDFXVA.js";import{k as l}from"./chunk.G76HB2FK.js";import{f as i}from"./chunk.MCIQXNKY.js";var E=`${b}open-icon`,A={ICON:"forge-open-icon",ICON_OPEN:"forge-open-icon--open"},x={OPEN:"open",ORIENTATION:"orientation"},S={ORIENTATION_VERTICAL:"vertical",ORIENTATION_HORIZONTAL:"horizontal"},o={elementName:E,classes:A,attributes:x,strings:S};var r=class{constructor(t){this._adapter=t;this._open=!1;this._orientation=o.strings.ORIENTATION_VERTICAL}initialize(){this._adapter.setOrientation(this._orientation),this._adapter.setOpenState(this._open)}get open(){return this._open}set open(t){t=Boolean(t),this._open!==t&&(this._open=t,this._adapter.setOpenState(this._open))}get orientation(){return this._orientation}set orientation(t){this._orientation=t,this._adapter.setOrientation(this._orientation)}};var a=class extends _{constructor(e){super(e);this._openIcon=s(e,`.${o.classes.ICON}`),this._iconElement=s(e,h.elementName)}setOrientation(e){e===o.strings.ORIENTATION_HORIZONTAL?this._iconElement.name="keyboard_arrow_right":this._iconElement.name="keyboard_arrow_down"}setOpenState(e){I(this._openIcon,e,o.classes.ICON_OPEN)}};var w='<template><span class="forge-open-icon" part="root"><forge-icon class="icon" part="icon"></forge-icon></span></template>',v=".forge-open-icon{color:#757575;color:var(--forge-theme-icon-color,#757575)}.forge-open-icon .icon{-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.forge-open-icon.forge-open-icon--open .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{line-height:.5}:host([hidden]){display:none}",n=class extends N{constructor(){super();C.define([u,g]),d(this,w,v),this._foundation=new r(new a(this))}static get observedAttributes(){return[o.attributes.OPEN,o.attributes.ORIENTATION]}initializedCallback(){this._foundation.initialize()}attributeChangedCallback(e,R,c){switch(e){case o.attributes.OPEN:this.open=l(c);break;case o.attributes.ORIENTATION:this.orientation=c;break}}};i([p()],n.prototype,"open",2),i([p()],n.prototype,"orientation",2),n=i([f({name:o.elementName,dependencies:[T]})],n);function Y(){O(n)}export{o as a,r as b,a as c,n as d,Y as e};
7
- //# sourceMappingURL=chunk.AHOQXJRN.js.map
6
+ import{q as g,r as u}from"./chunk.LZMYHIO2.js";import{a as h,d as C,l as T}from"./chunk.YAJT3P6V.js";import{a as _}from"./chunk.A23NSEWA.js";import{a as p}from"./chunk.B3IJU6XJ.js";import{a as f,b}from"./chunk.BSZ2LBJX.js";import{a as N}from"./chunk.3E5QKMHL.js";import{a as O,e as d,g as s}from"./chunk.HN4PXH3D.js";import{t as I}from"./chunk.R4NDFXVA.js";import{k as l}from"./chunk.G76HB2FK.js";import{f as i}from"./chunk.MCIQXNKY.js";var E=`${b}open-icon`,A={ICON:"forge-open-icon",ICON_OPEN:"forge-open-icon--open"},x={OPEN:"open",ORIENTATION:"orientation"},S={ORIENTATION_VERTICAL:"vertical",ORIENTATION_HORIZONTAL:"horizontal"},o={elementName:E,classes:A,attributes:x,strings:S};var r=class{constructor(t){this._adapter=t;this._open=!1;this._orientation=o.strings.ORIENTATION_VERTICAL}initialize(){this._adapter.setOrientation(this._orientation),this._adapter.setOpenState(this._open)}get open(){return this._open}set open(t){t=Boolean(t),this._open!==t&&(this._open=t,this._adapter.setOpenState(this._open))}get orientation(){return this._orientation}set orientation(t){this._orientation=t,this._adapter.setOrientation(this._orientation)}};var a=class extends _{constructor(e){super(e);this._openIcon=s(e,`.${o.classes.ICON}`),this._iconElement=s(e,h.elementName)}setOrientation(e){e===o.strings.ORIENTATION_HORIZONTAL?this._iconElement.name="keyboard_arrow_right":this._iconElement.name="keyboard_arrow_down"}setOpenState(e){I(this._openIcon,e,o.classes.ICON_OPEN)}};var w='<template><span class="forge-open-icon" part="root"><forge-icon class="icon" part="icon"></forge-icon></span></template>',v=".forge-open-icon{color:#757575;color:var(--forge-theme-icon-color,#757575)}.forge-open-icon .icon{-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.forge-open-icon.forge-open-icon--open .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{line-height:.5}:host([hidden]){display:none}",n=class extends N{constructor(){super();C.define([u,g]),d(this,w,v),this._foundation=new r(new a(this))}static get observedAttributes(){return[o.attributes.OPEN,o.attributes.ORIENTATION]}initializedCallback(){this._foundation.initialize()}attributeChangedCallback(e,R,c){switch(e){case o.attributes.OPEN:this.open=l(c);break;case o.attributes.ORIENTATION:this.orientation=c;break}}};i([p()],n.prototype,"open",2),i([p()],n.prototype,"orientation",2),n=i([f({name:o.elementName,dependencies:[T]})],n);function Y(){O(n)}export{o as a,r as b,a as c,n as d,Y as e};
7
+ //# sourceMappingURL=chunk.P6B3UWJ5.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{b as N}from"./chunk.IMK2LFWR.js";import{b as F,c as S}from"./chunk.G5BCWBD5.js";import{k as _,z as f}from"./chunk.LZMYHIO2.js";import{d as A}from"./chunk.7TQYFMM4.js";import{a as L}from"./chunk.24D46RLZ.js";import{a as B}from"./chunk.A23NSEWA.js";import{a as g}from"./chunk.B3IJU6XJ.js";import{a as I,b as C}from"./chunk.BSZ2LBJX.js";import{a as D}from"./chunk.3E5QKMHL.js";import{a as x,e as T,g as u}from"./chunk.HN4PXH3D.js";import{k as b}from"./chunk.G76HB2FK.js";import{a as v,b as y,f as m}from"./chunk.MCIQXNKY.js";var R=`${C}quantity-field`,q={INVALID:"invalid",REQUIRED:"required",DISABLED:"disabled"},M={ROOT:"forge-quantity-field",INVALID:"forge-quantity-field--invalid",REQUIRED:"forge-quantity-field--required"},a={INCREMENT_BUTTON:"increment-button",DECREMENT_BUTTON:"decrement-button",LABEL:"label",HELPER_TEXT:"helper-text"},w={ROOT:`.${M.ROOT}`,INCREMENT_BUTTON_SLOT:`slot[name=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON_SLOT:`slot[name=${a.DECREMENT_BUTTON}]`,INCREMENT_BUTTON:`[slot=${a.INCREMENT_BUTTON}] button, button[slot=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON:`[slot=${a.DECREMENT_BUTTON}] button, button[slot=${a.DECREMENT_BUTTON}]`,TEXT_FIELD:"forge-text-field",INPUT:"input[type=number]",LABEL:`[slot=${a.LABEL}]`,HELPER_TEXT:`[slot=${a.HELPER_TEXT}]`},i={elementName:R,classes:M,slots:a,selectors:w,attributes:q};var p=class extends B{constructor(t){super(t);this._rootElement=u(t,i.selectors.ROOT),this._incrementButtonSlot=u(this._component,i.selectors.INCREMENT_BUTTON_SLOT),this._decrementButtonSlot=u(this._component,i.selectors.DECREMENT_BUTTON_SLOT)}addRootClass(t){this._rootElement.classList.add(t)}removeRootClass(t){this._rootElement.classList.remove(t)}inputHasAttribute(t){return this.inputElement?this.inputElement.hasAttribute(t):!1}addIncrementButtonSlotListener(t){this._incrementButtonSlot.addEventListener("slotchange",t)}removeIncrementButtonSlotListener(t){this._incrementButtonSlot&&this._incrementButtonSlot.removeEventListener("slotchange",t)}addDecrementButtonSlotListener(t){this._decrementButtonSlot.addEventListener("slotchange",t)}removeDecrementButtonSlotListener(t){this._decrementButtonSlot&&this._decrementButtonSlot.removeEventListener("slotchange",t)}addTextFieldAttribute(t,e=""){this._textFieldComponent&&this._textFieldComponent.setAttribute(t,e)}removeTextFieldAttribute(t){this._textFieldComponent&&this._textFieldComponent.removeAttribute(t)}addIncrementEventListener(t,e){this._incrementButtonElement.addEventListener(t,e)}removeIncrementEventListener(t,e){this._incrementButtonElement&&this._incrementButtonElement.removeEventListener(t,e)}addDecrementEventListener(t,e){this._decrementButtonElement.addEventListener(t,e)}removeDecrementEventListener(t,e){this._decrementButtonElement&&this._decrementButtonElement.removeEventListener(t,e)}addIncrementButtonAttribute(t,e=""){this._incrementButtonElement.setAttribute(t,e)}removeIncrementButtonAttribute(t){this._incrementButtonElement.removeAttribute(t)}addDecrementButtonAttribute(t,e=""){this._decrementButtonElement.setAttribute(t,e)}removeDecrementButtonAttribute(t){this._decrementButtonElement.removeAttribute(t)}increment(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e+this._inputStep).toFixed(n));!!this._inputMax&&this._inputMax<o&&(o=this._inputMax),this._setInputValue(o)}decrement(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e-this._inputStep).toFixed(n));!!this._inputMin&&this._inputMin>o&&(o=this._inputMin),this._setInputValue(o)}addInputDisabledAttributeChangeListener(t){this._setupInputDisabledAttributeMutationObserver(t)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}_setInputValue(t){!this.inputElement||(this.inputElement.value=`${t}`,this.inputElement.dispatchEvent(new Event("input")),this.inputElement.dispatchEvent(new Event("change")))}_isNullOrUndefinedOrEmpty(t){return t==null||t===""}_setupInputDisabledAttributeMutationObserver(t){if(!this.inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let e=o=>this._inputDisabledAttributeMutationCallback(o,t);this._inputAttributeMutationObserver=new MutationObserver(e);let n={attributes:!0,attributeOldValue:!0,attributeFilter:[i.attributes.DISABLED]};this._inputAttributeMutationObserver.observe(this.inputElement,n)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(t,e){for(let n of t)n.type!=="attributes"||!n.attributeName||n.attributeName!==i.attributes.DISABLED||n.target[n.attributeName]===n.oldValue||e()}get _incrementButtonElement(){return this._incrementButton||(this._incrementButton=this._component.querySelector(i.selectors.INCREMENT_BUTTON)),this._incrementButton}get _decrementButtonElement(){return this._decrementButton||(this._decrementButton=this._component.querySelector(i.selectors.DECREMENT_BUTTON)),this._decrementButton}get _textFieldComponent(){return this._textField||(this._textField=this._component.querySelector(i.selectors.TEXT_FIELD)),this._textField}get inputElement(){return this._inputElement||(this._inputElement=this._component.querySelector(i.selectors.INPUT)),this._inputElement}get _inputStep(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.step)?1:+t.step}get _inputMax(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.max)?null:+t.max}get _inputMin(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.min)?null:+t.min}_calcPrecision(t){let e=String(t);return e.includes(".")?e.split(".")[1].length:0}};var c=class{constructor(r){this._adapter=r;this._incrementValue=()=>this._adapter.increment(),this._decrementValue=()=>this._adapter.decrement(),this._incrementButtonSlotChanged=()=>this._onIncrementButtonSlotChanged(),this._decrementButtonSlotChanged=()=>this._onDecrementButtonSlotChanged(),this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged),this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged)}connect(){this._adapter.addInputDisabledAttributeChangeListener(()=>this._syncDisabledStateOfButtons()),this._syncDisabledStateOfButtons()}disconnect(){this._removeIncrementEventListener(),this._removeDecrementEventListener(),this._removeIncrementButtonSlotListener(),this._removeDecrementButtonSlotListener(),this._adapter.removeInputDisabledAttributeChangeListener()}_onIncrementButtonSlotChanged(){this._addIncrementEventListener()}_onDecrementButtonSlotChanged(){this._addDecrementEventListener()}_addIncrementEventListener(){this._adapter.addIncrementEventListener("click",this._incrementValue)}_addDecrementEventListener(){this._adapter.addDecrementEventListener("click",this._decrementValue)}_removeIncrementEventListener(){this._adapter.removeIncrementEventListener("click",this._incrementValue)}_removeDecrementEventListener(){this._adapter.removeDecrementEventListener("click",this._decrementValue)}_removeIncrementButtonSlotListener(){this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged)}_removeDecrementButtonSlotListener(){this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged)}_syncDisabledStateOfButtons(){this._adapter.inputHasAttribute(i.attributes.DISABLED)?(this._adapter.addDecrementButtonAttribute(i.attributes.DISABLED),this._adapter.addIncrementButtonAttribute(i.attributes.DISABLED)):(this._adapter.removeIncrementButtonAttribute(i.attributes.DISABLED),this._adapter.removeDecrementButtonAttribute(i.attributes.DISABLED))}get required(){return this._required}set required(r){this._required!==r&&(this._required=r,this._required?(this._adapter.setHostAttribute(i.attributes.REQUIRED),this._adapter.addRootClass(i.classes.REQUIRED)):(this._adapter.removeHostAttribute(i.attributes.REQUIRED),this._adapter.removeRootClass(i.classes.REQUIRED)))}get invalid(){return this._invalid}set invalid(r){this._invalid!==r&&(this._invalid=r,this._invalid?(this._adapter.setHostAttribute(i.attributes.INVALID),this._adapter.addRootClass(i.classes.INVALID),this._adapter.addTextFieldAttribute(i.attributes.INVALID)):(this._adapter.removeHostAttribute(i.attributes.INVALID),this._adapter.removeRootClass(i.classes.INVALID),this._adapter.removeTextFieldAttribute(i.attributes.INVALID)))}};var U='<template><div class="forge-quantity-field" part="root"><slot name="label"></slot><div class="forge-quantity-field__row" part="row"><slot name="decrement-button"></slot><slot></slot><slot name="increment-button"></slot></div><slot name="helper-text"></slot></div></template>',k='.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}',s=class extends D{constructor(){super();T(this,U,k),this._foundation=new c(new p(this))}static get observedAttributes(){return[i.attributes.INVALID,i.attributes.REQUIRED]}connectedCallback(){this._requiredElementsPresent()?this._foundation.connect():this._ensureElementsPresent().then(()=>{this._foundation.connect()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,e,n){switch(t){case i.attributes.INVALID:this.invalid=b(n);break;case i.attributes.REQUIRED:this.required=b(n);break}}_ensureElementsPresent(){return new Promise(t=>{if(this._requiredElementsPresent()){t();return}let e=new MutationObserver(n=>{n.reduce((l,d)=>l+d.addedNodes.length,0)>0&&this._requiredElementsPresent()&&(e.disconnect(),t())});e.observe(this,{childList:!0,subtree:!0})})}_requiredElementsPresent(){let t=this.querySelector(i.selectors.INPUT),e=this.querySelector(i.selectors.DECREMENT_BUTTON),n=this.querySelector(i.selectors.INCREMENT_BUTTON);return!!t&&!!e&&!!n}};m([g()],s.prototype,"invalid",2),m([g()],s.prototype,"required",2),s=m([I({name:i.elementName,dependencies:[F]})],s);var O=class extends L{constructor(t){super(t);A.define([f,_])}_build(){let t=document.createElement(i.elementName);return this._attachButton(t,f.name,"decrement-button"),this._attachTextField(t),this._attachButton(t,_.name,"increment-button"),t}_configure(){var t,e,n,o,l;this.inputElement.value=(e=(t=this._config.options)==null?void 0:t.value)!=null?e:"0",this.inputElement.style.textAlign="center",this.inputElement.style.width="64px",(n=this._config.options)!=null&&n.helperText&&this.setHelperText(this._config.options.helperText),typeof((o=this._config.options)==null?void 0:o.label)=="string"&&this._createLabel(this._config.options.label),((l=this._config.options)==null?void 0:l.step)!==void 0&&(this.inputElement.step=this._config.options.step)}get value(){return this._textFieldDelegate.inputElement.value}set value(t){this._textFieldDelegate.inputElement.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._textFieldDelegate.inputElement}get labelElement(){return this._labelElement}onChange(t){this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var n,o,l,d,E;let e={props:v({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:y(v({},(d=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:d.options),{id:(E=this._config.options)==null?void 0:E.id,type:"number"})};this._textFieldDelegate=new N(e),t.appendChild(this._textFieldDelegate.element)}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_attachButton(t,e,n){return new S({options:{iconName:e,parent:t,attributes:{slot:n}}})}};function vt(){x(s)}export{i as a,p as b,c,s as d,O as e,vt as f};
7
- //# sourceMappingURL=chunk.W7UTHKBF.js.map
6
+ import{b as N}from"./chunk.IMK2LFWR.js";import{b as F,c as S}from"./chunk.BOENNFXE.js";import{k as _,z as f}from"./chunk.LZMYHIO2.js";import{d as A}from"./chunk.YAJT3P6V.js";import{a as L}from"./chunk.24D46RLZ.js";import{a as B}from"./chunk.A23NSEWA.js";import{a as g}from"./chunk.B3IJU6XJ.js";import{a as I,b as C}from"./chunk.BSZ2LBJX.js";import{a as D}from"./chunk.3E5QKMHL.js";import{a as x,e as T,g as u}from"./chunk.HN4PXH3D.js";import{k as b}from"./chunk.G76HB2FK.js";import{a as v,b as y,f as m}from"./chunk.MCIQXNKY.js";var R=`${C}quantity-field`,q={INVALID:"invalid",REQUIRED:"required",DISABLED:"disabled"},M={ROOT:"forge-quantity-field",INVALID:"forge-quantity-field--invalid",REQUIRED:"forge-quantity-field--required"},a={INCREMENT_BUTTON:"increment-button",DECREMENT_BUTTON:"decrement-button",LABEL:"label",HELPER_TEXT:"helper-text"},w={ROOT:`.${M.ROOT}`,INCREMENT_BUTTON_SLOT:`slot[name=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON_SLOT:`slot[name=${a.DECREMENT_BUTTON}]`,INCREMENT_BUTTON:`[slot=${a.INCREMENT_BUTTON}] button, button[slot=${a.INCREMENT_BUTTON}]`,DECREMENT_BUTTON:`[slot=${a.DECREMENT_BUTTON}] button, button[slot=${a.DECREMENT_BUTTON}]`,TEXT_FIELD:"forge-text-field",INPUT:"input[type=number]",LABEL:`[slot=${a.LABEL}]`,HELPER_TEXT:`[slot=${a.HELPER_TEXT}]`},i={elementName:R,classes:M,slots:a,selectors:w,attributes:q};var p=class extends B{constructor(t){super(t);this._rootElement=u(t,i.selectors.ROOT),this._incrementButtonSlot=u(this._component,i.selectors.INCREMENT_BUTTON_SLOT),this._decrementButtonSlot=u(this._component,i.selectors.DECREMENT_BUTTON_SLOT)}addRootClass(t){this._rootElement.classList.add(t)}removeRootClass(t){this._rootElement.classList.remove(t)}inputHasAttribute(t){return this.inputElement?this.inputElement.hasAttribute(t):!1}addIncrementButtonSlotListener(t){this._incrementButtonSlot.addEventListener("slotchange",t)}removeIncrementButtonSlotListener(t){this._incrementButtonSlot&&this._incrementButtonSlot.removeEventListener("slotchange",t)}addDecrementButtonSlotListener(t){this._decrementButtonSlot.addEventListener("slotchange",t)}removeDecrementButtonSlotListener(t){this._decrementButtonSlot&&this._decrementButtonSlot.removeEventListener("slotchange",t)}addTextFieldAttribute(t,e=""){this._textFieldComponent&&this._textFieldComponent.setAttribute(t,e)}removeTextFieldAttribute(t){this._textFieldComponent&&this._textFieldComponent.removeAttribute(t)}addIncrementEventListener(t,e){this._incrementButtonElement.addEventListener(t,e)}removeIncrementEventListener(t,e){this._incrementButtonElement&&this._incrementButtonElement.removeEventListener(t,e)}addDecrementEventListener(t,e){this._decrementButtonElement.addEventListener(t,e)}removeDecrementEventListener(t,e){this._decrementButtonElement&&this._decrementButtonElement.removeEventListener(t,e)}addIncrementButtonAttribute(t,e=""){this._incrementButtonElement.setAttribute(t,e)}removeIncrementButtonAttribute(t){this._incrementButtonElement.removeAttribute(t)}addDecrementButtonAttribute(t,e=""){this._decrementButtonElement.setAttribute(t,e)}removeDecrementButtonAttribute(t){this._decrementButtonElement.removeAttribute(t)}increment(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e+this._inputStep).toFixed(n));!!this._inputMax&&this._inputMax<o&&(o=this._inputMax),this._setInputValue(o)}decrement(){let t=this.inputElement;if(!t)return;let e=+t.value,n=this._calcPrecision(this._inputStep),o=parseFloat((e-this._inputStep).toFixed(n));!!this._inputMin&&this._inputMin>o&&(o=this._inputMin),this._setInputValue(o)}addInputDisabledAttributeChangeListener(t){this._setupInputDisabledAttributeMutationObserver(t)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}_setInputValue(t){!this.inputElement||(this.inputElement.value=`${t}`,this.inputElement.dispatchEvent(new Event("input")),this.inputElement.dispatchEvent(new Event("change")))}_isNullOrUndefinedOrEmpty(t){return t==null||t===""}_setupInputDisabledAttributeMutationObserver(t){if(!this.inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let e=o=>this._inputDisabledAttributeMutationCallback(o,t);this._inputAttributeMutationObserver=new MutationObserver(e);let n={attributes:!0,attributeOldValue:!0,attributeFilter:[i.attributes.DISABLED]};this._inputAttributeMutationObserver.observe(this.inputElement,n)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(t,e){for(let n of t)n.type!=="attributes"||!n.attributeName||n.attributeName!==i.attributes.DISABLED||n.target[n.attributeName]===n.oldValue||e()}get _incrementButtonElement(){return this._incrementButton||(this._incrementButton=this._component.querySelector(i.selectors.INCREMENT_BUTTON)),this._incrementButton}get _decrementButtonElement(){return this._decrementButton||(this._decrementButton=this._component.querySelector(i.selectors.DECREMENT_BUTTON)),this._decrementButton}get _textFieldComponent(){return this._textField||(this._textField=this._component.querySelector(i.selectors.TEXT_FIELD)),this._textField}get inputElement(){return this._inputElement||(this._inputElement=this._component.querySelector(i.selectors.INPUT)),this._inputElement}get _inputStep(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.step)?1:+t.step}get _inputMax(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.max)?null:+t.max}get _inputMin(){let t=this.inputElement;return!t||this._isNullOrUndefinedOrEmpty(t.min)?null:+t.min}_calcPrecision(t){let e=String(t);return e.includes(".")?e.split(".")[1].length:0}};var c=class{constructor(r){this._adapter=r;this._incrementValue=()=>this._adapter.increment(),this._decrementValue=()=>this._adapter.decrement(),this._incrementButtonSlotChanged=()=>this._onIncrementButtonSlotChanged(),this._decrementButtonSlotChanged=()=>this._onDecrementButtonSlotChanged(),this._adapter.addIncrementButtonSlotListener(this._incrementButtonSlotChanged),this._adapter.addDecrementButtonSlotListener(this._decrementButtonSlotChanged)}connect(){this._adapter.addInputDisabledAttributeChangeListener(()=>this._syncDisabledStateOfButtons()),this._syncDisabledStateOfButtons()}disconnect(){this._removeIncrementEventListener(),this._removeDecrementEventListener(),this._removeIncrementButtonSlotListener(),this._removeDecrementButtonSlotListener(),this._adapter.removeInputDisabledAttributeChangeListener()}_onIncrementButtonSlotChanged(){this._addIncrementEventListener()}_onDecrementButtonSlotChanged(){this._addDecrementEventListener()}_addIncrementEventListener(){this._adapter.addIncrementEventListener("click",this._incrementValue)}_addDecrementEventListener(){this._adapter.addDecrementEventListener("click",this._decrementValue)}_removeIncrementEventListener(){this._adapter.removeIncrementEventListener("click",this._incrementValue)}_removeDecrementEventListener(){this._adapter.removeDecrementEventListener("click",this._decrementValue)}_removeIncrementButtonSlotListener(){this._adapter.removeIncrementButtonSlotListener(this._incrementButtonSlotChanged)}_removeDecrementButtonSlotListener(){this._adapter.removeDecrementButtonSlotListener(this._decrementButtonSlotChanged)}_syncDisabledStateOfButtons(){this._adapter.inputHasAttribute(i.attributes.DISABLED)?(this._adapter.addDecrementButtonAttribute(i.attributes.DISABLED),this._adapter.addIncrementButtonAttribute(i.attributes.DISABLED)):(this._adapter.removeIncrementButtonAttribute(i.attributes.DISABLED),this._adapter.removeDecrementButtonAttribute(i.attributes.DISABLED))}get required(){return this._required}set required(r){this._required!==r&&(this._required=r,this._required?(this._adapter.setHostAttribute(i.attributes.REQUIRED),this._adapter.addRootClass(i.classes.REQUIRED)):(this._adapter.removeHostAttribute(i.attributes.REQUIRED),this._adapter.removeRootClass(i.classes.REQUIRED)))}get invalid(){return this._invalid}set invalid(r){this._invalid!==r&&(this._invalid=r,this._invalid?(this._adapter.setHostAttribute(i.attributes.INVALID),this._adapter.addRootClass(i.classes.INVALID),this._adapter.addTextFieldAttribute(i.attributes.INVALID)):(this._adapter.removeHostAttribute(i.attributes.INVALID),this._adapter.removeRootClass(i.classes.INVALID),this._adapter.removeTextFieldAttribute(i.attributes.INVALID)))}};var U='<template><div class="forge-quantity-field" part="root"><slot name="label"></slot><div class="forge-quantity-field__row" part="row"><slot name="decrement-button"></slot><slot></slot><slot name="increment-button"></slot></div><slot name="helper-text"></slot></div></template>',k='.forge-quantity-field ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-quantity-field ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.forge-quantity-field__row{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center}.forge-quantity-field ::slotted(forge-icon-button:first-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-right:4px}.forge-quantity-field ::slotted(forge-icon-button:last-of-type){color:var(--mdc-theme-text-secondary-on-light);margin-left:4px}.forge-quantity-field ::slotted(forge-text-field){--forge-text-field-margin-top:0;--forge-text-field-margin-bottom:0}.forge-quantity-field--required ::slotted([slot=label])::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:"*";margin-right:4px}.forge-quantity-field--invalid ::slotted([slot=label]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);height:1rem;color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-quantity-field--invalid ::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}:host{display:inline-block}:host([hidden]){display:none}',s=class extends D{constructor(){super();T(this,U,k),this._foundation=new c(new p(this))}static get observedAttributes(){return[i.attributes.INVALID,i.attributes.REQUIRED]}connectedCallback(){this._requiredElementsPresent()?this._foundation.connect():this._ensureElementsPresent().then(()=>{this._foundation.connect()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,e,n){switch(t){case i.attributes.INVALID:this.invalid=b(n);break;case i.attributes.REQUIRED:this.required=b(n);break}}_ensureElementsPresent(){return new Promise(t=>{if(this._requiredElementsPresent()){t();return}let e=new MutationObserver(n=>{n.reduce((l,d)=>l+d.addedNodes.length,0)>0&&this._requiredElementsPresent()&&(e.disconnect(),t())});e.observe(this,{childList:!0,subtree:!0})})}_requiredElementsPresent(){let t=this.querySelector(i.selectors.INPUT),e=this.querySelector(i.selectors.DECREMENT_BUTTON),n=this.querySelector(i.selectors.INCREMENT_BUTTON);return!!t&&!!e&&!!n}};m([g()],s.prototype,"invalid",2),m([g()],s.prototype,"required",2),s=m([I({name:i.elementName,dependencies:[F]})],s);var O=class extends L{constructor(t){super(t);A.define([f,_])}_build(){let t=document.createElement(i.elementName);return this._attachButton(t,f.name,"decrement-button"),this._attachTextField(t),this._attachButton(t,_.name,"increment-button"),t}_configure(){var t,e,n,o,l;this.inputElement.value=(e=(t=this._config.options)==null?void 0:t.value)!=null?e:"0",this.inputElement.style.textAlign="center",this.inputElement.style.width="64px",(n=this._config.options)!=null&&n.helperText&&this.setHelperText(this._config.options.helperText),typeof((o=this._config.options)==null?void 0:o.label)=="string"&&this._createLabel(this._config.options.label),((l=this._config.options)==null?void 0:l.step)!==void 0&&(this.inputElement.step=this._config.options.step)}get value(){return this._textFieldDelegate.inputElement.value}set value(t){this._textFieldDelegate.inputElement.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._textFieldDelegate.inputElement}get labelElement(){return this._labelElement}onChange(t){this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var n,o,l,d,E;let e={props:v({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:y(v({},(d=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:d.options),{id:(E=this._config.options)==null?void 0:E.id,type:"number"})};this._textFieldDelegate=new N(e),t.appendChild(this._textFieldDelegate.element)}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_attachButton(t,e,n){return new S({options:{iconName:e,parent:t,attributes:{slot:n}}})}};function vt(){x(s)}export{i as a,p as b,c,s as d,O as e,vt as f};
7
+ //# sourceMappingURL=chunk.Q6L7T6OJ.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as Y}from"./chunk.54QFNVMG.js";import{a as X,b as L}from"./chunk.7JTKKFL4.js";import{a as k}from"./chunk.AMFXGOSA.js";import{a as z}from"./chunk.EC6JSIQW.js";import{a as q}from"./chunk.XYBFFTXS.js";import{a as g}from"./chunk.DRFU6POI.js";import{g as O,h as I}from"./chunk.LZMYHIO2.js";import{a as K,d as j}from"./chunk.7TQYFMM4.js";import{d as $}from"./chunk.BSZ2LBJX.js";import{g as P}from"./chunk.HN4PXH3D.js";import{d as G,e as M,f as B,i as R,x as U}from"./chunk.R4NDFXVA.js";import{b as _,d as W,h as A,j as v,n as b,p as V}from"./chunk.G76HB2FK.js";import{a as x}from"./chunk.MCIQXNKY.js";var de={POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",CHECKBOX_ELEMENT:"data-list-dropdown-checkbox",DATA_ALLOW_FOCUS:"data-list-dropdown-allow-focus"},ae={GROUP_WRAPPER:"forge-list-dropdown__group-wrapper"},h={attributes:de,classes:ae},J={options:[],syncWidth:!1,selectedValues:[],multiple:!1},Q=(i=>(i.None="none",i.Standard="standard",i.Menu="menu",i))(Q||{}),Z=(t=>(t.Spinner="spinner",t.Skeleton="skeleton",t))(Z||{});var E=class{constructor(){this._listenerMap=new Map}_emit(e,t){let i=this._listenerMap.get(e);i&&i.length&&i.forEach(n=>n({type:e,data:t}))}hasListeners(e){return e?this._listenerMap.has(e):this._listenerMap.size>0}addListener(e,t){if(!this._listenerMap.has(e))this._listenerMap.set(e,[t]);else{let i=this._listenerMap.get(e);i&&i.push(t)}}removeListener(e,t){let i=this._listenerMap.get(e);i&&i.length&&i.includes(t)&&(i.splice(i.indexOf(t),1),i.length||this._listenerMap.delete(e))}};var f;(function(o){o.Up="up",o.Down="down",o.Left="left",o.Right="right"})(f||(f={}));var u;(function(o){o.Scroll="scroll",o.Scrolled="scrolled",o.ScrolledStart="scrolled-start",o.ScrolledEnd="scrolled-end"})(u||(u={}));var ce=100,w=class extends E{constructor(e,t={}){super(),this._element=e,this._config=t,this._axis="vertical",this._scrollThreshold=0,this._lastScrollPosition=0,this._lastScrollTop=0,this._lastScrollLeft=0,this._isListening=!1,this._initialize()}destroy(){this.stop()}start(){this._isListening||(this._element.addEventListener("scroll",this._scrollListener),this._isListening=!0)}stop(){this._element.removeEventListener("scroll",this._scrollListener),this._isListening=!1}_initialize(){if(this._config.throttle){let e=this._config.throttleTime||ce;this._scrollListener=V(()=>this._onScroll(),e)}else this._scrollListener=()=>this._onScroll();(!_(this._config.paused)||!this._config.paused)&&this.start(),_(this._config.axis)&&(this._axis=this._config.axis),_(this._config.scrollThreshold)&&W(this._config.scrollThreshold)&&(this._scrollThreshold=this._config.scrollThreshold)}_isScrollAxis(){let e=this._lastScrollTop!==this._element.scrollTop,t=this._lastScrollLeft!==this._element.scrollLeft;return this._axis==="vertical"&&e||this._axis==="horizontal"&&t}_onScroll(){if(!this._isScrollAxis())return;let e=this.scrollPosition,t=this._lastScrollPosition-e<0?this._axis==="vertical"?f.Down:f.Right:this._axis==="vertical"?f.Up:f.Left;this._emit(u.Scroll,{direction:t,position:e}),this._lastScrollPosition<=this._scrollThreshold&&e>this._scrollThreshold?this._emit(u.Scrolled,!0):this._lastScrollPosition>=this._scrollThreshold&&(this._scrollThreshold>0?e<this._scrollThreshold:e===0)&&this._emit(u.Scrolled,!1);let i=Math.round(e-this._scrollThreshold),n=Math.round(this.scrollSize-e);this._lastScrollPosition>=this._scrollThreshold&&i<=0?this._emit(u.ScrolledStart):this._lastScrollPosition<=this.scrollSize-this._scrollThreshold&&n<=this._scrollThreshold&&this._emit(u.ScrolledEnd),this._lastScrollPosition=e||0,this._lastScrollTop=this._element.scrollTop||0,this._lastScrollLeft=this._element.scrollLeft||0}get scrollPosition(){return this._axis==="vertical"?this._element.scrollTop:this._element.scrollLeft}get isScrolled(){return this.scrollPosition>this._scrollThreshold}get isScrolledStart(){return this.scrollPosition===0}get isScrolledEnd(){return this.scrollPosition===this._element.scrollWidth}get isScrollable(){return this._axis==="vertical"?this._element.scrollHeight>this._element.clientHeight:this._element.scrollWidth>this._element.clientWidth}get scrollSize(){return(this._axis==="vertical"?this._element.scrollHeight:this._element.scrollWidth)-this.elementSize}get elementSize(){return this._axis==="vertical"?this._element.clientHeight:this._element.clientWidth}setScrollPosition(e){this._axis==="vertical"?this._element.scrollTop=e:this._element.scrollLeft=e}};function te(o,e){let t=ue(o,e),i=`list-dropdown-popup-${o.id}`;switch(t.addEventListener("mousedown",n=>{let a=z(n);if(a.find(m=>m.nodeType===1&&m.hasAttribute(h.attributes.DATA_ALLOW_FOCUS)))return;a.find(m=>m.id===i||m.id===o.id)&&n.preventDefault()}),o.type){case"menu":t.setAttribute("role","menu"),t.setAttribute("aria-orientation","vertical");break;default:t.setAttribute("role","listbox")}return o.id&&(t.id=i),o.popupClasses&&B(o.popupClasses,t),t}function ue(o,e){let t=document.createElement(g.elementName);switch(t.targetElement=e,t.placement=o.popupPlacement||"bottom-start",t.manageFocus=!1,t.static=!!o.popupStatic,o.popupOffset&&(t.offset=o.popupOffset),o.type){case"menu":t.animationType="menu";break;case"none":t.animationType="none";break;default:t.animationType="dropdown"}return t}function ie(o){let e=document.createElement(X.elementName);return e.id=`list-dropdown-list-${o.id}`,e.propagateClick=!1,e}function y(o,e,t){let i=fe(t||o.options),n=!!o.optionLimit,a=o.optionLimit||0,p=0;for(let c of i){let m=e;if(c.builder&&typeof c.builder=="function"){let s=c.builder(c);if(s){let d=document.createElement("div");d.classList.add(h.classes.GROUP_WRAPPER),m=d,d.appendChild(s),e.appendChild(d)}}else if(c.text){let s=document.createElement("div");s.classList.add(h.classes.GROUP_WRAPPER);let d=document.createElement("div");d.textContent=c.text,d.classList.add("forge-typography--overline"),d.style.fontFamily="Roboto,sans-serif",d.style.fontSize="0.75rem",d.style.lineHeight="2rem",d.style.letterSpacing="0.16667em",d.style.fontWeight="500",d.style.margin="4px 8px",m=s,s.appendChild(d),e.appendChild(s)}for(let s of c.options){if(s.divider){let r=me();e.appendChild(r);continue}if(n&&--a<0)break;p++;let d=o.selectedValues?o.selectedValues.some(r=>b(r,s.value)):!1,l=document.createElement(L.elementName);switch(l.value=s.value,l.id=`list-dropdown-option-${o.id}-${p}`,l.style.cursor="pointer",s.optionClass&&(typeof s.optionClass=="string"||Array.isArray(s.optionClass)&&s.optionClass.length)&&B(s.optionClass,l),o.type){case"menu":l.setAttribute("role","menuitem");break;case"none":break;default:l.setAttribute("role","option")}if(o.dense&&(l.dense=!0),o.optionBuilder&&typeof o.optionBuilder=="function"){let r=o.optionBuilder(s,l);r&&(typeof r=="string"?l.innerHTML=r:l.appendChild(r))}else if(typeof o.transform!="function")l.textContent=s.label||"";else{let r=o.transform(s.label);typeof r=="string"?l.textContent=r:typeof r=="object"&&r.nodeType!==void 0&&l.appendChild(r)}if(s.leadingBuilder){let r=s.leadingBuilder();v(r)&&(r.slot="leading",l.appendChild(r))}else if(s.leadingIcon){let r=ee(s.leadingIconType,s.leadingIcon,s.leadingIconClass||o.iconClass);r.slot="leading",l.appendChild(r)}if(s.trailingBuilder){let r=s.trailingBuilder();v(r)&&(r.slot="trailing",l.appendChild(r))}else if(s.trailingIcon){let r=ee(s.trailingIconType,s.trailingIcon,s.trailingIconClass||o.iconClass);r.slot="trailing",l.appendChild(r)}if(s.disabled?(l.disabled=s.disabled,l.setAttribute("aria-disabled","true")):(l.style.cursor="pointer",l.setAttribute("aria-disabled","false")),d&&(l.selected=!0),l.setAttribute("aria-selected",d?"true":"false"),o.multiple){let r=C(d);l.appendChild(r),l.setAttribute("aria-selected",`${d}`),l.setAttribute("aria-checked",`${d}`)}if(s.elementAttributes&&s.elementAttributes.forEach((r,N)=>{l.setAttribute(N,r)}),!s.disabled&&typeof o.cascadingElementFactory=="function"&&Array.isArray(s.options)&&s.options.length){let r=document.createElement("forge-icon");r.name="arrow_right",r.slot="trailing",l.appendChild(r);let le={index:c.options.filter(pe=>!pe.divider).indexOf(s),options:s.options,parentValue:s.value},F=o.cascadingElementFactory.call(null,le);F.appendChild(l),l=F}m.appendChild(l)}}}function C(o){let e=document.createElement("forge-icon");return e.setAttribute(h.attributes.CHECKBOX_ELEMENT,""),e.name=o?I.name:O.name,e.slot="leading",e.style.marginRight="16px",e.style.verticalAlign="middle",e}function me(){let o=document.createElement("forge-divider");return o.setAttribute("aria-hidden","true"),o}function ee(o="font",e,t){if(o==="component"){let n=document.createElement("forge-icon");return t&&n.classList.add(t),n.setAttribute("aria-hidden","true"),n.name=e,n}let i=document.createElement("i");return i.classList.add(t||$),i.setAttribute("aria-hidden","true"),i.textContent=e,i}function oe(o){switch(o){case"skeleton":return _e();default:return he()}}function he(){let o=document.createElement("div");o.style.display="flex",o.style.justifyContent="center",o.style.alignItems="center",o.style.padding="8px",o.style.boxSizing="border-box";let e=document.createElement("forge-circular-progress");return e.style.setProperty("--forge-circular-progress-size","24px"),o.appendChild(e),o}function _e(){let o=document.createElement("forge-list"),e=document.createElement("div");e.style.minWidth="192px";for(let t=0;t<3;t++){let i=document.createElement(Y.elementName);i.setAttribute("list-item",""),e.appendChild(i)}return o.appendChild(e),o}function ne(){let o=document.createElement(q.elementName);return o.determinate=!1,o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.right="0",o.style.width="100%",o}function fe(o){return H(o,1)?o:[{text:"",options:o}]}function H(o,e){let t=o.some(n=>_(n)&&v(n)&&n.hasOwnProperty("options")&&(n.hasOwnProperty("text")||n.hasOwnProperty("builder"))),i=o.some(n=>_(n)&&v(n)&&n.hasOwnProperty("label")&&n.hasOwnProperty("value"));return t&&e===1||i&&e===0}var S=class{constructor(e,t){this._adapter=e;this._open=!1;this._config=Object.assign(x({},J),x({},t)),this._selectListener=(i,n)=>this._onSelect(i,n),this._closeListener=()=>{typeof this._config.closeCallback=="function"&&this._config.closeCallback()},this._scrollEndListener=()=>{this._config.observeScroll&&typeof this._config.scrollEndListener=="function"&&this._config.scrollEndListener()}}destroy(){this._open&&this.close()}open(){this._open||(this._open=!0,this._adapter.open(this._config,this._selectListener,this._closeListener),window.requestAnimationFrame(()=>{this._open&&this.activateInitialOption()}),this._config.observeScroll&&this._config.scrollEndListener&&this._adapter.setScrollBottomListener(this._scrollEndListener,this._config.observeScrollThreshold||0))}close(){this._open&&(this._open=!1,this._adapter.close(),this._config.observeScroll&&this._config.scrollEndListener&&this._adapter.removeScrollBottomListener(this._scrollEndListener))}_onSelect(e,t){if(typeof this._config.activeChangeCallback=="function"&&this._config.activeChangeCallback(t),typeof this._config.selectCallback=="function"&&this._config.selectCallback(e),this._open){let i=this._config.syncWidth===void 0;this._adapter.syncWidth(i)}}getActiveOptionIndex(){return this._adapter.getActiveOptionIndex()}getActiveOption(){let e=this.getActiveOptionIndex();return e>=0?this._nonDividerOptions[e]:void 0}toggleOptionMultiple(e,t){return this._adapter.toggleOptionMultiple(e,t)}activateSelectedOption(){this._adapter.activateSelectedOption(this._config)}activateFirstOption(){let e=this._nonDividerOptions.findIndex(t=>!t.disabled);return e!==-1&&this.activateOption(e),e}activateLastOption(){let e=this._nonDividerOptions,t=e.length-1-e.findIndex(i=>!i.disabled);return t!==-1&&this.activateOption(t),t}activateOption(e,t){return this._adapter.activateOption(e,this._config.activeChangeCallback,t)}activateInitialOption(){typeof this._config.activeStartIndex=="number"&&this._nonDividerOptions[this._config.activeStartIndex]?(this.activateOption(this._config.activeStartIndex,!1),this._adapter.scrollSelectedOptionIntoView(!1)):this._config.selectedValues&&this._config.selectedValues.length&&this._adapter.scrollSelectedOptionIntoView(!1)}setSelectedValues(e){Array.isArray(e)||(e=[e]),!this._config.multiple&&e.length>1&&(e=[e[0]]),this._config.selectedValues=e,this._adapter.setSelectedValues(e,this._config.multiple)}clearActiveOption(){this._adapter.clearActiveOption()}setOptions(e){this._config.options=e,this._open&&(this._adapter.setOptions(this._config),this.activateInitialOption())}appendOptions(e){this._config.options=[...this._config.options,...e],this._open&&this._adapter.appendOptions(e,this._config)}get dropdownElement(){return this._adapter.dropdownElement}scrollSelectedOptionIntoView(e=!0){this._adapter.scrollSelectedOptionIntoView(e)}setScrollBottomListener(e,t){this._config.scrollEndListener=e,this._config.observeScroll=!0,this._config.observeScrollThreshold=t,this._adapter.setScrollBottomListener(this._scrollEndListener,this._config.observeScrollThreshold||0)}removeScrollBottomListener(){this._config.scrollEndListener=void 0,this._adapter.removeScrollBottomListener(this._scrollEndListener)}setBusyVisibility(e){!this._config.allowBusy||this._adapter.setBusyVisibility(e)}handleKey(e){switch(e){case"Enter":let t=this.getActiveOptionIndex(),i=this._nonDividerOptions[t];if(this._canSelectOption(i)){let p=this._adapter.getActiveOptionIdByIndex(t);p&&this._onSelect(i.value,p)}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":let n=this._nonDividerOptions;if(n.length&&n.every(p=>!this._canSelectOption(p)))return;let a=this._getNextActiveOptionIndex(e);this.activateOption(a);break;case"Home":this.activateFirstOption();break;case"End":this.activateLastOption();break}}_canSelectOption(e){return e&&!e.disabled&&!e.divider}_getNextActiveOptionIndex(e){let t=this._adapter.getActiveOptionIndex();return t===-1&&(t=this._adapter.getSelectedOptionIndex()),e==="ArrowUp"||e==="Up"?this._getPreviousHighlightableOptionIndex(t,this._nonDividerOptions):this._getNextHighlightableOptionIndex(t,this._nonDividerOptions)}_getPreviousHighlightableOptionIndex(e,t){let i=e<=0?t.length-1:e-1;return t[i].disabled?this._getPreviousHighlightableOptionIndex(i,t):i}_getNextHighlightableOptionIndex(e,t){let i=e===t.length-1?0:e+1;return t[i].disabled?this._getNextHighlightableOptionIndex(i,t):i}get _flatOptions(){return H(this._config.options,1)?this._config.options.reduce((t,i)=>t.concat(i.options),[]):[...this._config.options]}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}};var D=class{constructor(e){this._targetElement=e}get dropdownElement(){return this._dropdownElement}open(e,t,i){this._dropdownElement=te(e,this._targetElement),this.syncWidth(!!e.syncWidth,e.targetWidthCallback),e.allowBusy&&(this._busyElement=ne(),this._busyElement.style.display="none",this._dropdownElement.appendChild(this._busyElement)),e.headerBuilder&&(this._headerElement=e.headerBuilder(),this._headerElement&&this._headerElement.setAttribute(h.attributes.DATA_ALLOW_FOCUS,"")),e.footerBuilder&&(this._footerElement=e.footerBuilder(),this._footerElement&&this._footerElement.setAttribute(h.attributes.DATA_ALLOW_FOCUS,"")),this._listElement=ie(e),this._listElement.addEventListener(L.events.SELECT,n=>{n.detail.listItem.setAttribute("aria-selected","true"),t(n.detail.value,n.detail.listItem.id)}),e.options.length?(y(e,this._listElement),this._dropdownElement.appendChild(this._listElement),this._headerElement&&this._dropdownElement.insertAdjacentElement("afterbegin",this._headerElement),this._footerElement&&this._dropdownElement.appendChild(this._footerElement)):e.allowBusy&&(this._asyncElement=oe(e.asyncStyle),this._dropdownElement.appendChild(this._asyncElement)),this._announcerElement=k(),this._announcerElement.id=`${e.id}-activedescendant`,this._dropdownElement.appendChild(this._announcerElement),this._dropdownElement.open=!0}close(){!this._dropdownElement||(this._dropdownElement.open=!1,this._dropdownElement=void 0,this._listElement=void 0,this._announcerElement=void 0)}setScrollBottomListener(e,t){if(this._dropdownElement&&!this._scrollObserver){let i=P(this._dropdownElement,g.selectors.CONTAINER),n={scrollThreshold:t};this._scrollObserver=new w(i,n),this._scrollObserver.addListener(u.ScrolledEnd,e)}}removeScrollBottomListener(e){this._scrollObserver&&this._scrollObserver.removeListener(u.ScrolledEnd,e)}getActiveOptionIndex(){if(!this._dropdownElement)return-1;let e=this._getListItemElements(),t=[...e].reverse().find(i=>i.active);return t?e.indexOf(t):-1}getSelectedOptionIndex(){return this._getListItemElements().findIndex(t=>t.selected)}getActiveOptionIdByIndex(e){if(!this._dropdownElement)return null;let i=this._getListItemElements()[e];return i?i.id:null}toggleOptionMultiple(e,t){if(!this._dropdownElement)return;let i=this._getListItemElements();i.length&&i[e]&&this._toggleSelectedOption(i[e],t)}scrollSelectedOptionIntoView(e=!0){let t=this._getSelectedListItem();this._scrollListItemIntoView(t,e?"smooth":"auto","center")}activateSelectedOption(e){let t=this._getListItemElements();t.length&&t.filter(a=>a.active).forEach(a=>a.active=!1);let i=this._getSelectedListItem();i&&this._activateListOption(i,e.activeChangeCallback)}activateOption(e,t,i=!0){if(!this._dropdownElement)return;let n=this._getListItemElements();n.length&&(n.filter(p=>p.active).forEach(p=>p.active=!1),this._activateListOption(n[e],t),this._scrollListItemIntoView(n[e],i?"smooth":"auto"))}setSelectedValues(e,t=!1){if(!this._dropdownElement)return;let i=this._getListItemElements();for(let n of i){let a=e.some(p=>b(p,n.value));if(n.selected=a,t){let p=n.querySelector(`[${h.attributes.CHECKBOX_ELEMENT}]`);if(p){let c=C(a);M(c,p)}}}}clearActiveOption(){this._getListItemElements().forEach(t=>t.active=!1)}syncWidth(e,t){this._dropdownElement&&(this._dropdownElement.style[e?"width":"minWidth"]=`${this._getTargetElementWidth(t)}px`)}setOptions(e){!this._dropdownElement||!this._listElement||(this._asyncElement&&this._asyncElement.isConnected&&R(this._asyncElement),this._busyElement&&this._busyElement.close(),this._listElement.isConnected||this._dropdownElement.appendChild(this._listElement),G(this._listElement),y(e,this._listElement),this._headerElement&&!this._headerElement.isConnected&&this._dropdownElement.insertAdjacentElement("afterbegin",this._headerElement),this._footerElement&&!this._footerElement.isConnected&&this._dropdownElement.insertAdjacentElement("beforeend",this._footerElement),"position"in this._dropdownElement&&typeof this._dropdownElement.position=="function"&&this._dropdownElement.position())}appendOptions(e,t){!this._dropdownElement||!this._listElement||y(t,this._listElement,e)}setBusyVisibility(e){!this._dropdownElement||(e?(this._busyElement.style.removeProperty("display"),this._busyElement.open()):this._busyElement.close())}getScreenWidth(){return window.innerWidth}_getListItemElements(){return this._dropdownElement?Array.from(this._dropdownElement.querySelectorAll(L.elementName)):[]}_toggleSelectedOption(e,t){if(!this._dropdownElement)return;let i=this._getListItemElements();if(i.length){let a=i.filter(p=>p!==e&&p.active);a.length&&a.forEach(p=>p.active=!1)}e.selected=t,e.setAttribute("aria-selected",`${t}`),e.setAttribute("aria-checked",`${t}`),t&&(e.active=!0);let n=e.querySelector(`${K.elementName}[slot=leading]`);if(n){let a=C(t);M(a,n)}}_getTargetElementWidth(e){return e&&A(e)?e():this._targetElement.getBoundingClientRect().width}_activateListOption(e,t){e&&!e.disabled&&(e.active=!0,t&&A(t)&&t(e.id))}_scrollListItemIntoView(e,t="auto",i="nearest"){if(e&&this._dropdownElement&&this._dropdownElement.isConnected){let n=P(this._dropdownElement,g.selectors.CONTAINER);n&&U(n,e,t,i)}}_getSelectedListItem(){return this._getListItemElements().find(t=>t.selected)}};var se=class{constructor(e,t){this._targetElement=e;j.define([I,O]),this._foundation=new S(new D(this._targetElement),t)}destroy(){this._foundation.destroy()}open(){this._foundation.open()}close(){this._foundation.close()}getActiveOptionIndex(){return this._foundation.getActiveOptionIndex()}getActiveOption(){return this._foundation.getActiveOption()}toggleOptionMultiple(e,t){return this._foundation.toggleOptionMultiple(e,t)}activateSelectedOption(){this._foundation.activateSelectedOption()}activateFirstOption(){return this._foundation.activateFirstOption()}activateOption(e){return this._foundation.activateOption(e)}activateInitialOption(){return this._foundation.activateInitialOption()}clearActiveOption(){this._foundation.clearActiveOption()}setSelectedValues(e){return this._foundation.setSelectedValues(e)}get dropdownElement(){return this._foundation.dropdownElement}setOptions(e){this._foundation.setOptions(e)}appendOptions(e){this._foundation.appendOptions(e)}scrollSelectedOptionIntoView(e){this._foundation.scrollSelectedOptionIntoView()}setScrollBottomListener(e,t){this._foundation.setScrollBottomListener(e,t)}removeScrollBottomListener(){this._foundation.removeScrollBottomListener()}setBusyVisibility(e){this._foundation.setBusyVisibility(e)}handleKey(e){this._foundation.handleKey(e)}};var T=class{constructor(){this._popupClasses=[];this._syncPopupWidth=!1;this._optionLimit=0;this._observeScroll=!1;this._observeScrollThreshold=0}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth=e}get popupClasses(){return this._popupClasses}set popupClasses(e){typeof e=="string"&&(e=[e]),Array.isArray(e)&&(this._popupClasses=e)}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}_applySelection(){}};var re=class extends T{constructor(t){super();this._config=t;this._open=!1;this._options=[];this._childOpen=!1;this._popupHasMouse=!1;this._targetMouseEnterListener=i=>this._onTargetMouseEnter(i),this._targetMouseLeaveListener=i=>this._onTargetMouseLeave(i),this._childPopupMouseEnterListener=()=>this._onChildPopupMouseEnter(),this._childPopupMouseLeaveListener=()=>this._onChildPopupMouseLeave(),this._documentMouseMoveListener=i=>this._mouseCoords={x:i.pageX,y:i.pageY}}_onChildPopupMouseEnter(){this._popupHasMouse=!0}_onChildPopupMouseLeave(){this._popupHasMouse=!1,setTimeout(()=>{let t=document.elementFromPoint(this._mouseCoords.x,this._mouseCoords.y);!this._popupHasMouse&&!this._childOpen&&(!t||!this._isOwnElement(t))&&this._closeDropdown()},this._config.popupTimeout)}_onTargetMouseEnter(t){!this._options.length||this._openDropdown()}_onTargetMouseLeave(t){this._activeMouseLeaveTimeout=window.setTimeout(()=>{if(!(!this._open||this._childOpen)){if(this._mouseCoords){let i=document.elementFromPoint(this._mouseCoords.x,this._mouseCoords.y);if(i&&this._isOwnElement(i))return}this._closeDropdown()}},this._config.targetTimeout)}_clearMouseLeaveTimeout(){this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout)}};export{h as a,J as b,Q as c,Z as d,H as e,S as f,D as g,se as h,T as i,re as j};
7
- //# sourceMappingURL=chunk.WGE5R5JK.js.map
6
+ import{a as Y}from"./chunk.54QFNVMG.js";import{a as X,b as L}from"./chunk.7JTKKFL4.js";import{a as k}from"./chunk.AMFXGOSA.js";import{a as z}from"./chunk.EC6JSIQW.js";import{a as q}from"./chunk.XYBFFTXS.js";import{a as g}from"./chunk.DRFU6POI.js";import{g as O,h as I}from"./chunk.LZMYHIO2.js";import{a as K,d as j}from"./chunk.YAJT3P6V.js";import{d as $}from"./chunk.BSZ2LBJX.js";import{g as P}from"./chunk.HN4PXH3D.js";import{d as G,e as M,f as B,i as R,x as U}from"./chunk.R4NDFXVA.js";import{b as _,d as W,h as A,j as v,n as b,p as V}from"./chunk.G76HB2FK.js";import{a as x}from"./chunk.MCIQXNKY.js";var de={POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",CHECKBOX_ELEMENT:"data-list-dropdown-checkbox",DATA_ALLOW_FOCUS:"data-list-dropdown-allow-focus"},ae={GROUP_WRAPPER:"forge-list-dropdown__group-wrapper"},h={attributes:de,classes:ae},J={options:[],syncWidth:!1,selectedValues:[],multiple:!1},Q=(i=>(i.None="none",i.Standard="standard",i.Menu="menu",i))(Q||{}),Z=(t=>(t.Spinner="spinner",t.Skeleton="skeleton",t))(Z||{});var E=class{constructor(){this._listenerMap=new Map}_emit(e,t){let i=this._listenerMap.get(e);i&&i.length&&i.forEach(n=>n({type:e,data:t}))}hasListeners(e){return e?this._listenerMap.has(e):this._listenerMap.size>0}addListener(e,t){if(!this._listenerMap.has(e))this._listenerMap.set(e,[t]);else{let i=this._listenerMap.get(e);i&&i.push(t)}}removeListener(e,t){let i=this._listenerMap.get(e);i&&i.length&&i.includes(t)&&(i.splice(i.indexOf(t),1),i.length||this._listenerMap.delete(e))}};var f;(function(o){o.Up="up",o.Down="down",o.Left="left",o.Right="right"})(f||(f={}));var u;(function(o){o.Scroll="scroll",o.Scrolled="scrolled",o.ScrolledStart="scrolled-start",o.ScrolledEnd="scrolled-end"})(u||(u={}));var ce=100,w=class extends E{constructor(e,t={}){super(),this._element=e,this._config=t,this._axis="vertical",this._scrollThreshold=0,this._lastScrollPosition=0,this._lastScrollTop=0,this._lastScrollLeft=0,this._isListening=!1,this._initialize()}destroy(){this.stop()}start(){this._isListening||(this._element.addEventListener("scroll",this._scrollListener),this._isListening=!0)}stop(){this._element.removeEventListener("scroll",this._scrollListener),this._isListening=!1}_initialize(){if(this._config.throttle){let e=this._config.throttleTime||ce;this._scrollListener=V(()=>this._onScroll(),e)}else this._scrollListener=()=>this._onScroll();(!_(this._config.paused)||!this._config.paused)&&this.start(),_(this._config.axis)&&(this._axis=this._config.axis),_(this._config.scrollThreshold)&&W(this._config.scrollThreshold)&&(this._scrollThreshold=this._config.scrollThreshold)}_isScrollAxis(){let e=this._lastScrollTop!==this._element.scrollTop,t=this._lastScrollLeft!==this._element.scrollLeft;return this._axis==="vertical"&&e||this._axis==="horizontal"&&t}_onScroll(){if(!this._isScrollAxis())return;let e=this.scrollPosition,t=this._lastScrollPosition-e<0?this._axis==="vertical"?f.Down:f.Right:this._axis==="vertical"?f.Up:f.Left;this._emit(u.Scroll,{direction:t,position:e}),this._lastScrollPosition<=this._scrollThreshold&&e>this._scrollThreshold?this._emit(u.Scrolled,!0):this._lastScrollPosition>=this._scrollThreshold&&(this._scrollThreshold>0?e<this._scrollThreshold:e===0)&&this._emit(u.Scrolled,!1);let i=Math.round(e-this._scrollThreshold),n=Math.round(this.scrollSize-e);this._lastScrollPosition>=this._scrollThreshold&&i<=0?this._emit(u.ScrolledStart):this._lastScrollPosition<=this.scrollSize-this._scrollThreshold&&n<=this._scrollThreshold&&this._emit(u.ScrolledEnd),this._lastScrollPosition=e||0,this._lastScrollTop=this._element.scrollTop||0,this._lastScrollLeft=this._element.scrollLeft||0}get scrollPosition(){return this._axis==="vertical"?this._element.scrollTop:this._element.scrollLeft}get isScrolled(){return this.scrollPosition>this._scrollThreshold}get isScrolledStart(){return this.scrollPosition===0}get isScrolledEnd(){return this.scrollPosition===this._element.scrollWidth}get isScrollable(){return this._axis==="vertical"?this._element.scrollHeight>this._element.clientHeight:this._element.scrollWidth>this._element.clientWidth}get scrollSize(){return(this._axis==="vertical"?this._element.scrollHeight:this._element.scrollWidth)-this.elementSize}get elementSize(){return this._axis==="vertical"?this._element.clientHeight:this._element.clientWidth}setScrollPosition(e){this._axis==="vertical"?this._element.scrollTop=e:this._element.scrollLeft=e}};function te(o,e){let t=ue(o,e),i=`list-dropdown-popup-${o.id}`;switch(t.addEventListener("mousedown",n=>{let a=z(n);if(a.find(m=>m.nodeType===1&&m.hasAttribute(h.attributes.DATA_ALLOW_FOCUS)))return;a.find(m=>m.id===i||m.id===o.id)&&n.preventDefault()}),o.type){case"menu":t.setAttribute("role","menu"),t.setAttribute("aria-orientation","vertical");break;default:t.setAttribute("role","listbox")}return o.id&&(t.id=i),o.popupClasses&&B(o.popupClasses,t),t}function ue(o,e){let t=document.createElement(g.elementName);switch(t.targetElement=e,t.placement=o.popupPlacement||"bottom-start",t.manageFocus=!1,t.static=!!o.popupStatic,o.popupOffset&&(t.offset=o.popupOffset),o.type){case"menu":t.animationType="menu";break;case"none":t.animationType="none";break;default:t.animationType="dropdown"}return t}function ie(o){let e=document.createElement(X.elementName);return e.id=`list-dropdown-list-${o.id}`,e.propagateClick=!1,e}function y(o,e,t){let i=fe(t||o.options),n=!!o.optionLimit,a=o.optionLimit||0,p=0;for(let c of i){let m=e;if(c.builder&&typeof c.builder=="function"){let s=c.builder(c);if(s){let d=document.createElement("div");d.classList.add(h.classes.GROUP_WRAPPER),m=d,d.appendChild(s),e.appendChild(d)}}else if(c.text){let s=document.createElement("div");s.classList.add(h.classes.GROUP_WRAPPER);let d=document.createElement("div");d.textContent=c.text,d.classList.add("forge-typography--overline"),d.style.fontFamily="Roboto,sans-serif",d.style.fontSize="0.75rem",d.style.lineHeight="2rem",d.style.letterSpacing="0.16667em",d.style.fontWeight="500",d.style.margin="4px 8px",m=s,s.appendChild(d),e.appendChild(s)}for(let s of c.options){if(s.divider){let r=me();e.appendChild(r);continue}if(n&&--a<0)break;p++;let d=o.selectedValues?o.selectedValues.some(r=>b(r,s.value)):!1,l=document.createElement(L.elementName);switch(l.value=s.value,l.id=`list-dropdown-option-${o.id}-${p}`,l.style.cursor="pointer",s.optionClass&&(typeof s.optionClass=="string"||Array.isArray(s.optionClass)&&s.optionClass.length)&&B(s.optionClass,l),o.type){case"menu":l.setAttribute("role","menuitem");break;case"none":break;default:l.setAttribute("role","option")}if(o.dense&&(l.dense=!0),o.optionBuilder&&typeof o.optionBuilder=="function"){let r=o.optionBuilder(s,l);r&&(typeof r=="string"?l.innerHTML=r:l.appendChild(r))}else if(typeof o.transform!="function")l.textContent=s.label||"";else{let r=o.transform(s.label);typeof r=="string"?l.textContent=r:typeof r=="object"&&r.nodeType!==void 0&&l.appendChild(r)}if(s.leadingBuilder){let r=s.leadingBuilder();v(r)&&(r.slot="leading",l.appendChild(r))}else if(s.leadingIcon){let r=ee(s.leadingIconType,s.leadingIcon,s.leadingIconClass||o.iconClass);r.slot="leading",l.appendChild(r)}if(s.trailingBuilder){let r=s.trailingBuilder();v(r)&&(r.slot="trailing",l.appendChild(r))}else if(s.trailingIcon){let r=ee(s.trailingIconType,s.trailingIcon,s.trailingIconClass||o.iconClass);r.slot="trailing",l.appendChild(r)}if(s.disabled?(l.disabled=s.disabled,l.setAttribute("aria-disabled","true")):(l.style.cursor="pointer",l.setAttribute("aria-disabled","false")),d&&(l.selected=!0),l.setAttribute("aria-selected",d?"true":"false"),o.multiple){let r=C(d);l.appendChild(r),l.setAttribute("aria-selected",`${d}`),l.setAttribute("aria-checked",`${d}`)}if(s.elementAttributes&&s.elementAttributes.forEach((r,N)=>{l.setAttribute(N,r)}),!s.disabled&&typeof o.cascadingElementFactory=="function"&&Array.isArray(s.options)&&s.options.length){let r=document.createElement("forge-icon");r.name="arrow_right",r.slot="trailing",l.appendChild(r);let le={index:c.options.filter(pe=>!pe.divider).indexOf(s),options:s.options,parentValue:s.value},F=o.cascadingElementFactory.call(null,le);F.appendChild(l),l=F}m.appendChild(l)}}}function C(o){let e=document.createElement("forge-icon");return e.setAttribute(h.attributes.CHECKBOX_ELEMENT,""),e.name=o?I.name:O.name,e.slot="leading",e.style.marginRight="16px",e.style.verticalAlign="middle",e}function me(){let o=document.createElement("forge-divider");return o.setAttribute("aria-hidden","true"),o}function ee(o="font",e,t){if(o==="component"){let n=document.createElement("forge-icon");return t&&n.classList.add(t),n.setAttribute("aria-hidden","true"),n.name=e,n}let i=document.createElement("i");return i.classList.add(t||$),i.setAttribute("aria-hidden","true"),i.textContent=e,i}function oe(o){switch(o){case"skeleton":return _e();default:return he()}}function he(){let o=document.createElement("div");o.style.display="flex",o.style.justifyContent="center",o.style.alignItems="center",o.style.padding="8px",o.style.boxSizing="border-box";let e=document.createElement("forge-circular-progress");return e.style.setProperty("--forge-circular-progress-size","24px"),o.appendChild(e),o}function _e(){let o=document.createElement("forge-list"),e=document.createElement("div");e.style.minWidth="192px";for(let t=0;t<3;t++){let i=document.createElement(Y.elementName);i.setAttribute("list-item",""),e.appendChild(i)}return o.appendChild(e),o}function ne(){let o=document.createElement(q.elementName);return o.determinate=!1,o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.right="0",o.style.width="100%",o}function fe(o){return H(o,1)?o:[{text:"",options:o}]}function H(o,e){let t=o.some(n=>_(n)&&v(n)&&n.hasOwnProperty("options")&&(n.hasOwnProperty("text")||n.hasOwnProperty("builder"))),i=o.some(n=>_(n)&&v(n)&&n.hasOwnProperty("label")&&n.hasOwnProperty("value"));return t&&e===1||i&&e===0}var S=class{constructor(e,t){this._adapter=e;this._open=!1;this._config=Object.assign(x({},J),x({},t)),this._selectListener=(i,n)=>this._onSelect(i,n),this._closeListener=()=>{typeof this._config.closeCallback=="function"&&this._config.closeCallback()},this._scrollEndListener=()=>{this._config.observeScroll&&typeof this._config.scrollEndListener=="function"&&this._config.scrollEndListener()}}destroy(){this._open&&this.close()}open(){this._open||(this._open=!0,this._adapter.open(this._config,this._selectListener,this._closeListener),window.requestAnimationFrame(()=>{this._open&&this.activateInitialOption()}),this._config.observeScroll&&this._config.scrollEndListener&&this._adapter.setScrollBottomListener(this._scrollEndListener,this._config.observeScrollThreshold||0))}close(){this._open&&(this._open=!1,this._adapter.close(),this._config.observeScroll&&this._config.scrollEndListener&&this._adapter.removeScrollBottomListener(this._scrollEndListener))}_onSelect(e,t){if(typeof this._config.activeChangeCallback=="function"&&this._config.activeChangeCallback(t),typeof this._config.selectCallback=="function"&&this._config.selectCallback(e),this._open){let i=this._config.syncWidth===void 0;this._adapter.syncWidth(i)}}getActiveOptionIndex(){return this._adapter.getActiveOptionIndex()}getActiveOption(){let e=this.getActiveOptionIndex();return e>=0?this._nonDividerOptions[e]:void 0}toggleOptionMultiple(e,t){return this._adapter.toggleOptionMultiple(e,t)}activateSelectedOption(){this._adapter.activateSelectedOption(this._config)}activateFirstOption(){let e=this._nonDividerOptions.findIndex(t=>!t.disabled);return e!==-1&&this.activateOption(e),e}activateLastOption(){let e=this._nonDividerOptions,t=e.length-1-e.findIndex(i=>!i.disabled);return t!==-1&&this.activateOption(t),t}activateOption(e,t){return this._adapter.activateOption(e,this._config.activeChangeCallback,t)}activateInitialOption(){typeof this._config.activeStartIndex=="number"&&this._nonDividerOptions[this._config.activeStartIndex]?(this.activateOption(this._config.activeStartIndex,!1),this._adapter.scrollSelectedOptionIntoView(!1)):this._config.selectedValues&&this._config.selectedValues.length&&this._adapter.scrollSelectedOptionIntoView(!1)}setSelectedValues(e){Array.isArray(e)||(e=[e]),!this._config.multiple&&e.length>1&&(e=[e[0]]),this._config.selectedValues=e,this._adapter.setSelectedValues(e,this._config.multiple)}clearActiveOption(){this._adapter.clearActiveOption()}setOptions(e){this._config.options=e,this._open&&(this._adapter.setOptions(this._config),this.activateInitialOption())}appendOptions(e){this._config.options=[...this._config.options,...e],this._open&&this._adapter.appendOptions(e,this._config)}get dropdownElement(){return this._adapter.dropdownElement}scrollSelectedOptionIntoView(e=!0){this._adapter.scrollSelectedOptionIntoView(e)}setScrollBottomListener(e,t){this._config.scrollEndListener=e,this._config.observeScroll=!0,this._config.observeScrollThreshold=t,this._adapter.setScrollBottomListener(this._scrollEndListener,this._config.observeScrollThreshold||0)}removeScrollBottomListener(){this._config.scrollEndListener=void 0,this._adapter.removeScrollBottomListener(this._scrollEndListener)}setBusyVisibility(e){!this._config.allowBusy||this._adapter.setBusyVisibility(e)}handleKey(e){switch(e){case"Enter":let t=this.getActiveOptionIndex(),i=this._nonDividerOptions[t];if(this._canSelectOption(i)){let p=this._adapter.getActiveOptionIdByIndex(t);p&&this._onSelect(i.value,p)}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":let n=this._nonDividerOptions;if(n.length&&n.every(p=>!this._canSelectOption(p)))return;let a=this._getNextActiveOptionIndex(e);this.activateOption(a);break;case"Home":this.activateFirstOption();break;case"End":this.activateLastOption();break}}_canSelectOption(e){return e&&!e.disabled&&!e.divider}_getNextActiveOptionIndex(e){let t=this._adapter.getActiveOptionIndex();return t===-1&&(t=this._adapter.getSelectedOptionIndex()),e==="ArrowUp"||e==="Up"?this._getPreviousHighlightableOptionIndex(t,this._nonDividerOptions):this._getNextHighlightableOptionIndex(t,this._nonDividerOptions)}_getPreviousHighlightableOptionIndex(e,t){let i=e<=0?t.length-1:e-1;return t[i].disabled?this._getPreviousHighlightableOptionIndex(i,t):i}_getNextHighlightableOptionIndex(e,t){let i=e===t.length-1?0:e+1;return t[i].disabled?this._getNextHighlightableOptionIndex(i,t):i}get _flatOptions(){return H(this._config.options,1)?this._config.options.reduce((t,i)=>t.concat(i.options),[]):[...this._config.options]}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}};var D=class{constructor(e){this._targetElement=e}get dropdownElement(){return this._dropdownElement}open(e,t,i){this._dropdownElement=te(e,this._targetElement),this.syncWidth(!!e.syncWidth,e.targetWidthCallback),e.allowBusy&&(this._busyElement=ne(),this._busyElement.style.display="none",this._dropdownElement.appendChild(this._busyElement)),e.headerBuilder&&(this._headerElement=e.headerBuilder(),this._headerElement&&this._headerElement.setAttribute(h.attributes.DATA_ALLOW_FOCUS,"")),e.footerBuilder&&(this._footerElement=e.footerBuilder(),this._footerElement&&this._footerElement.setAttribute(h.attributes.DATA_ALLOW_FOCUS,"")),this._listElement=ie(e),this._listElement.addEventListener(L.events.SELECT,n=>{n.detail.listItem.setAttribute("aria-selected","true"),t(n.detail.value,n.detail.listItem.id)}),e.options.length?(y(e,this._listElement),this._dropdownElement.appendChild(this._listElement),this._headerElement&&this._dropdownElement.insertAdjacentElement("afterbegin",this._headerElement),this._footerElement&&this._dropdownElement.appendChild(this._footerElement)):e.allowBusy&&(this._asyncElement=oe(e.asyncStyle),this._dropdownElement.appendChild(this._asyncElement)),this._announcerElement=k(),this._announcerElement.id=`${e.id}-activedescendant`,this._dropdownElement.appendChild(this._announcerElement),this._dropdownElement.open=!0}close(){!this._dropdownElement||(this._dropdownElement.open=!1,this._dropdownElement=void 0,this._listElement=void 0,this._announcerElement=void 0)}setScrollBottomListener(e,t){if(this._dropdownElement&&!this._scrollObserver){let i=P(this._dropdownElement,g.selectors.CONTAINER),n={scrollThreshold:t};this._scrollObserver=new w(i,n),this._scrollObserver.addListener(u.ScrolledEnd,e)}}removeScrollBottomListener(e){this._scrollObserver&&this._scrollObserver.removeListener(u.ScrolledEnd,e)}getActiveOptionIndex(){if(!this._dropdownElement)return-1;let e=this._getListItemElements(),t=[...e].reverse().find(i=>i.active);return t?e.indexOf(t):-1}getSelectedOptionIndex(){return this._getListItemElements().findIndex(t=>t.selected)}getActiveOptionIdByIndex(e){if(!this._dropdownElement)return null;let i=this._getListItemElements()[e];return i?i.id:null}toggleOptionMultiple(e,t){if(!this._dropdownElement)return;let i=this._getListItemElements();i.length&&i[e]&&this._toggleSelectedOption(i[e],t)}scrollSelectedOptionIntoView(e=!0){let t=this._getSelectedListItem();this._scrollListItemIntoView(t,e?"smooth":"auto","center")}activateSelectedOption(e){let t=this._getListItemElements();t.length&&t.filter(a=>a.active).forEach(a=>a.active=!1);let i=this._getSelectedListItem();i&&this._activateListOption(i,e.activeChangeCallback)}activateOption(e,t,i=!0){if(!this._dropdownElement)return;let n=this._getListItemElements();n.length&&(n.filter(p=>p.active).forEach(p=>p.active=!1),this._activateListOption(n[e],t),this._scrollListItemIntoView(n[e],i?"smooth":"auto"))}setSelectedValues(e,t=!1){if(!this._dropdownElement)return;let i=this._getListItemElements();for(let n of i){let a=e.some(p=>b(p,n.value));if(n.selected=a,t){let p=n.querySelector(`[${h.attributes.CHECKBOX_ELEMENT}]`);if(p){let c=C(a);M(c,p)}}}}clearActiveOption(){this._getListItemElements().forEach(t=>t.active=!1)}syncWidth(e,t){this._dropdownElement&&(this._dropdownElement.style[e?"width":"minWidth"]=`${this._getTargetElementWidth(t)}px`)}setOptions(e){!this._dropdownElement||!this._listElement||(this._asyncElement&&this._asyncElement.isConnected&&R(this._asyncElement),this._busyElement&&this._busyElement.close(),this._listElement.isConnected||this._dropdownElement.appendChild(this._listElement),G(this._listElement),y(e,this._listElement),this._headerElement&&!this._headerElement.isConnected&&this._dropdownElement.insertAdjacentElement("afterbegin",this._headerElement),this._footerElement&&!this._footerElement.isConnected&&this._dropdownElement.insertAdjacentElement("beforeend",this._footerElement),"position"in this._dropdownElement&&typeof this._dropdownElement.position=="function"&&this._dropdownElement.position())}appendOptions(e,t){!this._dropdownElement||!this._listElement||y(t,this._listElement,e)}setBusyVisibility(e){!this._dropdownElement||(e?(this._busyElement.style.removeProperty("display"),this._busyElement.open()):this._busyElement.close())}getScreenWidth(){return window.innerWidth}_getListItemElements(){return this._dropdownElement?Array.from(this._dropdownElement.querySelectorAll(L.elementName)):[]}_toggleSelectedOption(e,t){if(!this._dropdownElement)return;let i=this._getListItemElements();if(i.length){let a=i.filter(p=>p!==e&&p.active);a.length&&a.forEach(p=>p.active=!1)}e.selected=t,e.setAttribute("aria-selected",`${t}`),e.setAttribute("aria-checked",`${t}`),t&&(e.active=!0);let n=e.querySelector(`${K.elementName}[slot=leading]`);if(n){let a=C(t);M(a,n)}}_getTargetElementWidth(e){return e&&A(e)?e():this._targetElement.getBoundingClientRect().width}_activateListOption(e,t){e&&!e.disabled&&(e.active=!0,t&&A(t)&&t(e.id))}_scrollListItemIntoView(e,t="auto",i="nearest"){if(e&&this._dropdownElement&&this._dropdownElement.isConnected){let n=P(this._dropdownElement,g.selectors.CONTAINER);n&&U(n,e,t,i)}}_getSelectedListItem(){return this._getListItemElements().find(t=>t.selected)}};var se=class{constructor(e,t){this._targetElement=e;j.define([I,O]),this._foundation=new S(new D(this._targetElement),t)}destroy(){this._foundation.destroy()}open(){this._foundation.open()}close(){this._foundation.close()}getActiveOptionIndex(){return this._foundation.getActiveOptionIndex()}getActiveOption(){return this._foundation.getActiveOption()}toggleOptionMultiple(e,t){return this._foundation.toggleOptionMultiple(e,t)}activateSelectedOption(){this._foundation.activateSelectedOption()}activateFirstOption(){return this._foundation.activateFirstOption()}activateOption(e){return this._foundation.activateOption(e)}activateInitialOption(){return this._foundation.activateInitialOption()}clearActiveOption(){this._foundation.clearActiveOption()}setSelectedValues(e){return this._foundation.setSelectedValues(e)}get dropdownElement(){return this._foundation.dropdownElement}setOptions(e){this._foundation.setOptions(e)}appendOptions(e){this._foundation.appendOptions(e)}scrollSelectedOptionIntoView(e){this._foundation.scrollSelectedOptionIntoView()}setScrollBottomListener(e,t){this._foundation.setScrollBottomListener(e,t)}removeScrollBottomListener(){this._foundation.removeScrollBottomListener()}setBusyVisibility(e){this._foundation.setBusyVisibility(e)}handleKey(e){this._foundation.handleKey(e)}};var T=class{constructor(){this._popupClasses=[];this._syncPopupWidth=!1;this._optionLimit=0;this._observeScroll=!1;this._observeScrollThreshold=0}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth=e}get popupClasses(){return this._popupClasses}set popupClasses(e){typeof e=="string"&&(e=[e]),Array.isArray(e)&&(this._popupClasses=e)}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}_applySelection(){}};var re=class extends T{constructor(t){super();this._config=t;this._open=!1;this._options=[];this._childOpen=!1;this._popupHasMouse=!1;this._targetMouseEnterListener=i=>this._onTargetMouseEnter(i),this._targetMouseLeaveListener=i=>this._onTargetMouseLeave(i),this._childPopupMouseEnterListener=()=>this._onChildPopupMouseEnter(),this._childPopupMouseLeaveListener=()=>this._onChildPopupMouseLeave(),this._documentMouseMoveListener=i=>this._mouseCoords={x:i.pageX,y:i.pageY}}_onChildPopupMouseEnter(){this._popupHasMouse=!0}_onChildPopupMouseLeave(){this._popupHasMouse=!1,setTimeout(()=>{let t=document.elementFromPoint(this._mouseCoords.x,this._mouseCoords.y);!this._popupHasMouse&&!this._childOpen&&(!t||!this._isOwnElement(t))&&this._closeDropdown()},this._config.popupTimeout)}_onTargetMouseEnter(t){!this._options.length||this._openDropdown()}_onTargetMouseLeave(t){this._activeMouseLeaveTimeout=window.setTimeout(()=>{if(!(!this._open||this._childOpen)){if(this._mouseCoords){let i=document.elementFromPoint(this._mouseCoords.x,this._mouseCoords.y);if(i&&this._isOwnElement(i))return}this._closeDropdown()}},this._config.targetTimeout)}_clearMouseLeaveTimeout(){this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout)}};export{h as a,J as b,Q as c,Z as d,H as e,S as f,D as g,se as h,T as i,re as j};
7
+ //# sourceMappingURL=chunk.QBDE7M3E.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2022 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{e as E}from"./chunk.AWCBH5KW.js";import{d as f}from"./chunk.F5I55MXD.js";import{a as t}from"./chunk.R46EDURP.js";import{a as g}from"./chunk.A23NSEWA.js";import{a as d}from"./chunk.B3IJU6XJ.js";import{a as m}from"./chunk.3E5QKMHL.js";import{g as n}from"./chunk.HN4PXH3D.js";import{f as _,g as b,l as u,o as L,s as v,t as h,z as c}from"./chunk.R4NDFXVA.js";import{k as r}from"./chunk.G76HB2FK.js";import{f as o}from"./chunk.MCIQXNKY.js";var S=class extends g{constructor(e){super(e);this._valueChangeListeners=[]}initialize(e){this._rootElement=n(this._component,e),this._labelSlot=n(this._component,"slot[name=label]"),this._leadingSlot=n(this._component,"slot[name=leading]"),this._trailingSlot=n(this._component,"slot[name=trailing]"),this._addonEndSlot=n(this._component,"slot[name=addon-end]"),this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])"),this.detectLabel()}destroy(){this._inputMutationObserver&&this._inputMutationObserver.disconnect()}hasLabel(){return!!this._labelElement}ensureSlottedLabel(){this._labelElement.slot="label"}ensureLabelOrder(){if(this._labelElement){let e=Array.from(this._component.children);e.length>1&&e.indexOf(this._labelElement)<e.indexOf(this._inputElement)&&this._component.appendChild(this._labelElement)}}addLabelSlotListener(e){this._labelSlot.addEventListener("slotchange",e)}removeLabelSlotListener(e){this._labelSlot&&this._labelSlot.removeEventListener("slotchange",e)}addLeadingSlotListener(e){this._leadingSlot.addEventListener("slotchange",e)}removeLeadingSlotListener(e){this._leadingSlot&&this._leadingSlot.removeEventListener("slotchange",e)}addTrailingSlotListener(e){this._trailingSlot.addEventListener("slotchange",e)}removeTrailingSlotListener(e){this._trailingSlot&&this._trailingSlot.removeEventListener("slotchange",e)}addAddonEndSlotListener(e){this._addonEndSlot.addEventListener("slotchange",e)}removeAddonEndSlotListener(e){this._addonEndSlot&&this._addonEndSlot.removeEventListener("slotchange",e)}addInputListener(e,s){this._inputElement.addEventListener(e,s)}removeInputListener(e,s){this._inputElement&&this._inputElement.removeEventListener(e,s)}setValueChangedListener(e,s){this.destroyValueChangeListener();let a=E(e,this._inputElement,"value",s);this._valueChangeListeners.push(a)}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}detectLabel(){this._labelElement=this._component.querySelector("label")}initializeFloatingLabel(){return new f(this._labelElement)}inputHasValue(){return this._inputElement.value?this._inputElement.value.trim().length>0:!1}fieldHasValue(){return this.inputHasValue()}hasPlaceholder(){return this._inputElement.placeholder?this._inputElement.placeholder.trim().length>0:!1}inputHasFocus(){return this._inputElement===v()}setLabelClass(e){this._labelElement&&this._labelElement.classList.add(e)}removeLabelClass(e){this._labelElement&&this._labelElement.classList.remove(e)}setRoomy(e){h(this._rootElement,e,t.classes.ROOMY)}setDense(e){h(this._rootElement,e,t.classes.DENSE)}hasLeadingNodes(){return this._leadingSlot?this._leadingSlot.assignedNodes().length>0:!1}hasTrailingNodes(){return this._trailingSlot?this._trailingSlot.assignedNodes().length>0:!1}hasAddonEndNodes(){return this._addonEndSlot?this._addonEndSlot.assignedNodes().length>0:!1}setInputClass(e){this._inputElement.classList.add(e)}removeInputClass(e){this._inputElement.classList.remove(e)}setRootClass(e){_(e,this._rootElement)}removeRootClass(e){b(e,this._rootElement)}setInputAttributeObserver(e){this._inputMutationObserver=c(this._inputElement,e,t.observedInputAttributes)}isDisabled(){return this._inputElement.hasAttribute("disabled")}isReadonly(){return this._inputElement.hasAttribute("readonly")}getLabelWidth(e,s){return L(this._labelElement.innerText,{fontSize:e,fontFamily:s})}getLabelFontMetrics(){let e=getComputedStyle(this._labelElement);return{fontSize:parseInt(e.fontSize||"16",10),fontFamily:e.fontFamily||"Roboto"}}};var y=class{constructor(i){this._adapter=i;this._density="default";this._shape="default";this._invalid=!1;this._required=!1;this._floatLabelType="auto";this._isInitialized=!1;this._labelSlotListener=e=>this._onLabelSlotChanged(e),this._leadingSlotListener=e=>this._onLeadingSlotChanged(e),this._trailingSlotListener=e=>this._onTrailingSlotChanged(e),this._addonEndSlotListener=e=>this._onAddonEndSlotChanged(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e),this._valueChangedListener=e=>this._onValueChanged(e),this._inputAttributeChangedListener=(e,s)=>this._onInputAttributeChanged(e,s)}initialize(){this._adapter.initialize(""),this._adapter.hasLabel()&&this._adapter.ensureSlottedLabel(),this._initializeLabel(),this._adapter.hasPlaceholder()&&(this._floatLabelType="always"),this._detectSlottedContent(),this._adapter.addLabelSlotListener(this._labelSlotListener),this._adapter.addLeadingSlotListener(this._leadingSlotListener),this._adapter.addTrailingSlotListener(this._trailingSlotListener),this._adapter.addAddonEndSlotListener(this._addonEndSlotListener),this._adapter.setValueChangedListener(this,this._valueChangedListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener),this._applyDensity(),this._setShapeType(),this._setValidity(),this._adapter.isDisabled()?this._adapter.setRootClass(t.classes.DISABLED):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):this._adapter.removeRootClass(t.classes.READONLY),this._floatLabelType==="always"&&this.floatLabel(!0),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.destroy(),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=void 0),this._adapter.removeLabelSlotListener(this._labelSlotListener),this._adapter.removeLeadingSlotListener(this._leadingSlotListener),this._adapter.removeTrailingSlotListener(this._trailingSlotListener),this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.destroyValueChangeListener()}get density(){return this._density}set density(i){this._density!==i&&(this._density=i,this._isInitialized&&(this._applyDensity(),this._initializeLabel()),this._adapter.setHostAttribute(t.attributes.DENSITY,this._density.toString()))}get floatLabelType(){return this._floatLabelType}set floatLabelType(i){this._floatLabelType!==i&&(this._floatLabelType=i,this._isInitialized&&this.floatLabel(this._floatLabelType==="always"),this._adapter.setHostAttribute(t.attributes.FLOAT_LABEL_TYPE,this._floatLabelType))}get shape(){return this._shape}set shape(i){this._shape!==i&&(this._shape=i,this._isInitialized&&this._setShapeType(),this._adapter.setHostAttribute(t.attributes.SHAPE,this._shape))}get invalid(){return this._invalid}set invalid(i){this._invalid!==i&&(this._invalid=i,this._isInitialized&&this._setValidity())}get required(){return this._required}set required(i){this._required!==i&&(this._required=i,this._isInitialized&&this._setValidity(),this._required?this._adapter.setHostAttribute(t.attributes.REQUIRED):this._adapter.removeHostAttribute(t.attributes.REQUIRED))}floatLabel(i){var e;if(((e=this._floatingLabel)==null?void 0:e.isFloating)!==i){if(!i&&this._floatLabelType==="always"){this._floatingLabel&&this._floatingLabel.float(!0,!0),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"");return}this._floatingLabel&&(this._floatingLabel.float(i,this._floatLabelType==="always"),i?(this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"")):(this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}}_onLabelSlotChanged(i){this._initializeLabel()}_onLeadingSlotChanged(i){this._detectLeadingContent()}_onTrailingSlotChanged(i){this._detectTrailingContent()}_onAddonEndSlotChanged(i){this._detectAddonEndContent()}_initializeLabel(){this._floatingLabel&&this._floatingLabel.destroy(),this._adapter.detectLabel(),this._adapter.hasLabel()&&this._density!=="dense"?(this._floatingLabel=this._adapter.initializeFloatingLabel(),this._adapter.ensureLabelOrder(),this.floatLabel(this._floatLabelType==="always"||this._adapter.fieldHasValue()||this._adapter.hasPlaceholder()),this._adapter.setRootClass(t.classes.LABEL)):(this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this._adapter.removeRootClass(t.classes.LABEL),this._floatingLabel=void 0)}_detectLeadingContent(){this._adapter.hasLeadingNodes()?this._adapter.setRootClass(t.classes.LEADING):this._adapter.removeRootClass(t.classes.LEADING)}_detectTrailingContent(){this._adapter.hasTrailingNodes()?this._adapter.setRootClass(t.classes.TRAILING):this._adapter.removeRootClass(t.classes.TRAILING)}_detectAddonEndContent(){this._adapter.hasAddonEndNodes()?this._adapter.setRootClass(t.classes.ADDON_END):this._adapter.removeRootClass(t.classes.ADDON_END)}_detectSlottedContent(){this._detectLeadingContent(),this._detectTrailingContent(),this._detectAddonEndContent()}_onFocus(i){this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED),this.floatLabel(!0)}_onBlur(i){this._adapter.inputHasFocus()||(this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&(this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this.floatLabel(!1)))}_onValueChanged(i){this._adapter.fieldHasValue()?this.floatLabel(!0):!this._adapter.inputHasFocus()&&!this._adapter.hasPlaceholder()&&this.floatLabel(!1)}_onInputAttributeChanged(i,e){switch(this._adapter.isDisabled()?(this._adapter.setRootClass(t.classes.DISABLED),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&this._floatingLabel&&this.floatLabel(!1)):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):(this._adapter.removeRootClass(t.classes.READONLY),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED)),i){case"readonly":case"disabled":this._adapter.inputHasFocus()&&(this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED));break;case"value":this._floatingLabel&&this.floatLabel(this._adapter.fieldHasValue());break;case"placeholder":if(this._floatingLabel){let s=!!e&&!!e.trim()||this._adapter.fieldHasValue();s!==this._floatingLabel.isFloating&&this.floatLabel(s)}break}}_setShapeType(){this._shape==="rounded"?this._adapter.setRootClass(t.classes.SHAPE_ROUNDED):this._adapter.removeRootClass(t.classes.SHAPE_ROUNDED)}_setValidity(){this._invalid?this._adapter.setRootClass(t.classes.INVALID):this._adapter.removeRootClass(t.classes.INVALID),this._required?this._adapter.setRootClass(t.classes.REQUIRED):this._adapter.removeRootClass(t.classes.REQUIRED)}_applyDensity(){this._adapter.setRoomy(this._density==="roomy"),this._adapter.setDense(this._density==="dense")}};var l=class extends m{constructor(){super()}static get observedAttributes(){return[t.attributes.DENSITY,t.attributes.FLOAT_LABEL_TYPE,t.attributes.SHAPE,t.attributes.INVALID,t.attributes.REQUIRED]}connectedCallback(){this.children.length?this._initialize():u(this).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,a){switch(e){case t.attributes.DENSITY:this.density=a;break;case t.attributes.FLOAT_LABEL_TYPE:this.floatLabelType=a;break;case t.attributes.SHAPE:this.shape=a;break;case t.attributes.INVALID:this.invalid=r(a);break;case t.attributes.REQUIRED:this.required=r(a);break}}floatLabel(e){this._foundation.floatLabel(e)}};o([d()],l.prototype,"density",2),o([d()],l.prototype,"floatLabelType",2),o([d()],l.prototype,"shape",2),o([d()],l.prototype,"invalid",2),o([d()],l.prototype,"required",2);export{S as a,y as b,l as c};
7
- //# sourceMappingURL=chunk.J6ERQLHJ.js.map
6
+ import{e as E}from"./chunk.AWCBH5KW.js";import{d as f}from"./chunk.F5I55MXD.js";import{a as t}from"./chunk.Y6FFG7XO.js";import{a as g}from"./chunk.A23NSEWA.js";import{a as r}from"./chunk.B3IJU6XJ.js";import{a as m}from"./chunk.3E5QKMHL.js";import{g as n}from"./chunk.HN4PXH3D.js";import{f as _,g as b,m as u,o as L,s as v,t as h,z as c}from"./chunk.R4NDFXVA.js";import{k as d}from"./chunk.G76HB2FK.js";import{f as o}from"./chunk.MCIQXNKY.js";var S=class extends g{constructor(e){super(e);this._valueChangeListeners=[]}initialize(e){this._rootElement=n(this._component,e),this._labelSlot=n(this._component,"slot[name=label]"),this._leadingSlot=n(this._component,"slot[name=leading]"),this._trailingSlot=n(this._component,"slot[name=trailing]"),this._addonEndSlot=n(this._component,"slot[name=addon-end]"),this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])"),this.detectLabel()}destroy(){this._inputMutationObserver&&this._inputMutationObserver.disconnect()}hasLabel(){return!!this._labelElement}ensureSlottedLabel(){this._labelElement.slot="label"}ensureLabelOrder(){if(this._labelElement){let e=Array.from(this._component.children);e.length>1&&e.indexOf(this._labelElement)<e.indexOf(this._inputElement)&&this._component.appendChild(this._labelElement)}}addLabelSlotListener(e){this._labelSlot.addEventListener("slotchange",e)}removeLabelSlotListener(e){this._labelSlot&&this._labelSlot.removeEventListener("slotchange",e)}addLeadingSlotListener(e){this._leadingSlot.addEventListener("slotchange",e)}removeLeadingSlotListener(e){this._leadingSlot&&this._leadingSlot.removeEventListener("slotchange",e)}addTrailingSlotListener(e){this._trailingSlot.addEventListener("slotchange",e)}removeTrailingSlotListener(e){this._trailingSlot&&this._trailingSlot.removeEventListener("slotchange",e)}addAddonEndSlotListener(e){this._addonEndSlot.addEventListener("slotchange",e)}removeAddonEndSlotListener(e){this._addonEndSlot&&this._addonEndSlot.removeEventListener("slotchange",e)}addInputListener(e,s){this._inputElement.addEventListener(e,s)}removeInputListener(e,s){this._inputElement&&this._inputElement.removeEventListener(e,s)}setValueChangedListener(e,s){this.destroyValueChangeListener();let a=E(e,this._inputElement,"value",s);this._valueChangeListeners.push(a)}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}detectLabel(){this._labelElement=this._component.querySelector("label")}initializeFloatingLabel(){return new f(this._labelElement)}inputHasValue(){return this._inputElement.value?this._inputElement.value.trim().length>0:!1}fieldHasValue(){return this.inputHasValue()}hasPlaceholder(){return this._inputElement.placeholder?this._inputElement.placeholder.trim().length>0:!1}inputHasFocus(){return this._inputElement===v()}setLabelClass(e){this._labelElement&&this._labelElement.classList.add(e)}removeLabelClass(e){this._labelElement&&this._labelElement.classList.remove(e)}setRoomy(e){h(this._rootElement,e,t.classes.ROOMY)}setDense(e){h(this._rootElement,e,t.classes.DENSE)}hasLeadingNodes(){return this._leadingSlot?this._leadingSlot.assignedNodes().length>0:!1}hasTrailingNodes(){return this._trailingSlot?this._trailingSlot.assignedNodes().length>0:!1}hasAddonEndNodes(){return this._addonEndSlot?this._addonEndSlot.assignedNodes().length>0:!1}setInputClass(e){this._inputElement.classList.add(e)}removeInputClass(e){this._inputElement.classList.remove(e)}setRootClass(e){_(e,this._rootElement)}removeRootClass(e){b(e,this._rootElement)}setInputAttributeObserver(e){this._inputMutationObserver=c(this._inputElement,e,t.observedInputAttributes)}isDisabled(){return this._inputElement.hasAttribute("disabled")}isReadonly(){return this._inputElement.hasAttribute("readonly")}getLabelWidth(e,s){return L(this._labelElement.innerText,{fontSize:e,fontFamily:s})}getLabelFontMetrics(){let e=getComputedStyle(this._labelElement);return{fontSize:parseInt(e.fontSize||"16",10),fontFamily:e.fontFamily||"Roboto"}}};var y=class{constructor(i){this._adapter=i;this._density="default";this._shape="default";this._invalid=!1;this._required=!1;this._floatLabelType="auto";this._isInitialized=!1;this._labelSlotListener=e=>this._onLabelSlotChanged(e),this._leadingSlotListener=e=>this._onLeadingSlotChanged(e),this._trailingSlotListener=e=>this._onTrailingSlotChanged(e),this._addonEndSlotListener=e=>this._onAddonEndSlotChanged(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e),this._valueChangedListener=e=>this._onValueChanged(e),this._inputAttributeChangedListener=(e,s)=>this._onInputAttributeChanged(e,s)}initialize(){this._adapter.initialize(""),this._adapter.hasLabel()&&this._adapter.ensureSlottedLabel(),this._initializeLabel(),this._adapter.hasPlaceholder()&&(this._floatLabelType="always"),this._detectSlottedContent(),this._adapter.addLabelSlotListener(this._labelSlotListener),this._adapter.addLeadingSlotListener(this._leadingSlotListener),this._adapter.addTrailingSlotListener(this._trailingSlotListener),this._adapter.addAddonEndSlotListener(this._addonEndSlotListener),this._adapter.setValueChangedListener(this,this._valueChangedListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener),this._applyDensity(),this._setShapeType(),this._setValidity(),this._adapter.isDisabled()?this._adapter.setRootClass(t.classes.DISABLED):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):this._adapter.removeRootClass(t.classes.READONLY),this._floatLabelType==="always"&&this.floatLabel(!0),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.destroy(),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=void 0),this._adapter.removeLabelSlotListener(this._labelSlotListener),this._adapter.removeLeadingSlotListener(this._leadingSlotListener),this._adapter.removeTrailingSlotListener(this._trailingSlotListener),this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.destroyValueChangeListener()}get density(){return this._density}set density(i){this._density!==i&&(this._density=i,this._isInitialized&&(this._applyDensity(),this._initializeLabel()),this._adapter.setHostAttribute(t.attributes.DENSITY,this._density.toString()))}get floatLabelType(){return this._floatLabelType}set floatLabelType(i){this._floatLabelType!==i&&(this._floatLabelType=i,this._isInitialized&&this.floatLabel(this._floatLabelType==="always"),this._adapter.setHostAttribute(t.attributes.FLOAT_LABEL_TYPE,this._floatLabelType))}get shape(){return this._shape}set shape(i){this._shape!==i&&(this._shape=i,this._isInitialized&&this._setShapeType(),this._adapter.setHostAttribute(t.attributes.SHAPE,this._shape))}get invalid(){return this._invalid}set invalid(i){this._invalid!==i&&(this._invalid=i,this._isInitialized&&this._setValidity())}get required(){return this._required}set required(i){this._required!==i&&(this._required=i,this._isInitialized&&this._setValidity(),this._required?this._adapter.setHostAttribute(t.attributes.REQUIRED):this._adapter.removeHostAttribute(t.attributes.REQUIRED))}floatLabel(i){var e;if(((e=this._floatingLabel)==null?void 0:e.isFloating)!==i){if(!i&&this._floatLabelType==="always"){this._floatingLabel&&this._floatingLabel.float(!0,!0),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"");return}this._floatingLabel&&(this._floatingLabel.float(i,this._floatLabelType==="always"),i?(this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"")):(this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}}_onLabelSlotChanged(i){this._initializeLabel()}_onLeadingSlotChanged(i){this._detectLeadingContent()}_onTrailingSlotChanged(i){this._detectTrailingContent()}_onAddonEndSlotChanged(i){this._detectAddonEndContent()}_initializeLabel(){this._floatingLabel&&this._floatingLabel.destroy(),this._adapter.detectLabel(),this._adapter.hasLabel()&&this._density!=="dense"?(this._floatingLabel=this._adapter.initializeFloatingLabel(),this._adapter.ensureLabelOrder(),this.floatLabel(this._floatLabelType==="always"||this._adapter.fieldHasValue()||this._adapter.hasPlaceholder()),this._adapter.setRootClass(t.classes.LABEL)):(this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this._adapter.removeRootClass(t.classes.LABEL),this._floatingLabel=void 0)}_detectLeadingContent(){this._adapter.hasLeadingNodes()?this._adapter.setRootClass(t.classes.LEADING):this._adapter.removeRootClass(t.classes.LEADING)}_detectTrailingContent(){this._adapter.hasTrailingNodes()?this._adapter.setRootClass(t.classes.TRAILING):this._adapter.removeRootClass(t.classes.TRAILING)}_detectAddonEndContent(){this._adapter.hasAddonEndNodes()?this._adapter.setRootClass(t.classes.ADDON_END):this._adapter.removeRootClass(t.classes.ADDON_END)}_detectSlottedContent(){this._detectLeadingContent(),this._detectTrailingContent(),this._detectAddonEndContent()}_onFocus(i){this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED),this.floatLabel(!0)}_onBlur(i){this._adapter.inputHasFocus()||(this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&(this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this.floatLabel(!1)))}_onValueChanged(i){this._adapter.fieldHasValue()?this.floatLabel(!0):!this._adapter.inputHasFocus()&&!this._adapter.hasPlaceholder()&&this.floatLabel(!1)}_onInputAttributeChanged(i,e){switch(this._adapter.isDisabled()?(this._adapter.setRootClass(t.classes.DISABLED),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&this._floatingLabel&&this.floatLabel(!1)):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):(this._adapter.removeRootClass(t.classes.READONLY),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED)),i){case"readonly":case"disabled":this._adapter.inputHasFocus()&&(this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED));break;case"value":this._floatingLabel&&this.floatLabel(this._adapter.fieldHasValue());break;case"placeholder":if(this._floatingLabel){let s=!!e&&!!e.trim()||this._adapter.fieldHasValue();s!==this._floatingLabel.isFloating&&this.floatLabel(s)}break}}_setShapeType(){this._shape==="rounded"?this._adapter.setRootClass(t.classes.SHAPE_ROUNDED):this._adapter.removeRootClass(t.classes.SHAPE_ROUNDED)}_setValidity(){this._invalid?this._adapter.setRootClass(t.classes.INVALID):this._adapter.removeRootClass(t.classes.INVALID),this._required?this._adapter.setRootClass(t.classes.REQUIRED):this._adapter.removeRootClass(t.classes.REQUIRED)}_applyDensity(){this._adapter.setRoomy(this._density==="roomy"),this._adapter.setDense(this._density==="dense")}};var l=class extends m{constructor(){super()}static get observedAttributes(){return[t.attributes.DENSITY,t.attributes.FLOAT_LABEL_TYPE,t.attributes.SHAPE,t.attributes.INVALID,t.attributes.REQUIRED]}connectedCallback(){this.querySelector(t.selectors.INPUT)?this._initialize():u(this,t.selectors.INPUT).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,a){switch(e){case t.attributes.DENSITY:this.density=a;break;case t.attributes.FLOAT_LABEL_TYPE:this.floatLabelType=a;break;case t.attributes.SHAPE:this.shape=a;break;case t.attributes.INVALID:this.invalid=d(a);break;case t.attributes.REQUIRED:this.required=d(a);break}}floatLabel(e){this._foundation.floatLabel(e)}};o([r()],l.prototype,"density",2),o([r()],l.prototype,"floatLabelType",2),o([r()],l.prototype,"shape",2),o([r()],l.prototype,"invalid",2),o([r()],l.prototype,"required",2);export{S as a,y as b,l as c};
7
+ //# sourceMappingURL=chunk.RPPBBBYG.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/field/field-adapter.ts", "../../src/field/field-foundation.ts", "../../src/field/field.ts"],
4
- "sourcesContent": ["import { addClass, calculateFontWidth, getShadowElement, IFontInfo, listenOwnProperty, Platform, removeClass, getActiveElement, createElementAttributeObserver, toggleClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { FloatingLabel, IFloatingLabel } from '../floating-label/floating-label';\nimport { IFieldComponent } from './field';\nimport { FIELD_CONSTANTS } from './field-constants';\n\nexport interface IFieldAdapter extends IBaseAdapter {\n // root\n setRootClass(classes: string | string[]): void;\n removeRootClass(classes: string | string[]): void;\n\n // input\n addInputListener(type: string, listener: (evt: Event) => void): void;\n removeInputListener(type: string, listener: (evt: Event) => void): void;\n setInputClass(className: string): void;\n removeInputClass(className: string): void;\n\n // label\n addLabelSlotListener(listener: (evt: Event) => void): void;\n removeLabelSlotListener(listener: (evt: Event) => void): void;\n setLabelClass(name: string): void;\n removeLabelClass(name: string): void;\n\n // leading\n addLeadingSlotListener(listener: (evt: Event) => void): void;\n removeLeadingSlotListener(listener: (evt: Event) => void): void;\n\n // trailing\n addTrailingSlotListener(listener: (evt: Event) => void): void;\n removeTrailingSlotListener(listener: (evt: Event) => void): void;\n\n // add on end\n addAddonEndSlotListener(listener: (evt: Event) => void): void;\n removeAddonEndSlotListener(listener: (evt: Event) => void): void;\n\n // state selectors\n hasAddonEndNodes(): boolean;\n hasLabel(): boolean;\n hasLeadingNodes(): boolean;\n hasPlaceholder(): boolean;\n hasTrailingNodes(): boolean;\n inputHasFocus(): boolean;\n inputHasValue(): boolean;\n fieldHasValue(): boolean;\n isDisabled(): boolean;\n isReadonly(): boolean;\n getLabelFontMetrics(): IFontInfo;\n getLabelWidth(fontSize: number, fontFamily: string): number;\n\n // state actions\n initialize(rootSelector: string): void;\n initializeFloatingLabel(): IFloatingLabel;\n ensureLabelOrder(): void;\n ensureSlottedLabel(): void;\n destroy(): void;\n setValueChangedListener(context: any, listener: (value: any) => void): void;\n destroyValueChangeListener(): void;\n detectLabel(): void;\n setRoomy(isRoomy: boolean): void;\n setDense(isDense: boolean): void;\n setInputAttributeObserver(listener: (name: string, value: string | null) => void): void;\n}\n\nexport class FieldAdapter extends BaseAdapter<IFieldComponent> implements IFieldAdapter {\n protected _rootElement: HTMLElement;\n protected _labelSlot: HTMLSlotElement;\n protected _leadingSlot: HTMLSlotElement;\n protected _trailingSlot: HTMLSlotElement;\n protected _addonEndSlot: HTMLSlotElement;\n protected _labelElement: HTMLLabelElement;\n protected _inputElement: HTMLInputElement;\n protected _inputMutationObserver: MutationObserver;\n protected _valueChangeListeners: Array<() => void> = [];\n\n constructor(component: IFieldComponent) {\n super(component);\n }\n\n public initialize(rootSelector: string): void {\n this._rootElement = getShadowElement(this._component, rootSelector);\n this._labelSlot = getShadowElement(this._component, 'slot[name=label]') as HTMLSlotElement;\n this._leadingSlot = getShadowElement(this._component, 'slot[name=leading]') as HTMLSlotElement;\n this._trailingSlot = getShadowElement(this._component, 'slot[name=trailing]') as HTMLSlotElement;\n this._addonEndSlot = getShadowElement(this._component, 'slot[name=addon-end]') as HTMLSlotElement;\n this._inputElement = this._component.querySelector('input:not([type=checkbox]):not([type=radio])') as HTMLInputElement;\n this.detectLabel();\n }\n\n public destroy(): void {\n if (this._inputMutationObserver) {\n this._inputMutationObserver.disconnect();\n }\n }\n\n public hasLabel(): boolean {\n return !!this._labelElement;\n }\n\n public ensureSlottedLabel(): void {\n this._labelElement.slot = 'label';\n }\n\n public ensureLabelOrder(): void {\n if (this._labelElement) {\n const children = Array.from(this._component.children);\n if (children.length > 1 && children.indexOf(this._labelElement) < children.indexOf(this._inputElement)) {\n this._component.appendChild(this._labelElement);\n }\n }\n }\n\n public addLabelSlotListener(listener: (evt: Event) => void): void {\n this._labelSlot.addEventListener('slotchange', listener);\n }\n\n public removeLabelSlotListener(listener: (evt: Event) => void): void {\n if (this._labelSlot) {\n this._labelSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addLeadingSlotListener(listener: (evt: Event) => void): void {\n this._leadingSlot.addEventListener('slotchange', listener);\n }\n\n public removeLeadingSlotListener(listener: (evt: Event) => void): void {\n if (this._leadingSlot) {\n this._leadingSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addTrailingSlotListener(listener: (evt: Event) => void): void {\n this._trailingSlot.addEventListener('slotchange', listener);\n }\n\n public removeTrailingSlotListener(listener: (evt: Event) => void): void {\n if (this._trailingSlot) {\n this._trailingSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addAddonEndSlotListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.addEventListener('slotchange', listener);\n }\n\n public removeAddonEndSlotListener(listener: (evt: Event) => void): void {\n if (this._addonEndSlot) {\n this._addonEndSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addInputListener(type: string, listener: (evt: Event) => void): void {\n this._inputElement.addEventListener(type, listener);\n }\n public removeInputListener(type: string, listener: (evt: Event) => void): void {\n if (this._inputElement) {\n this._inputElement.removeEventListener(type, listener);\n }\n }\n\n public setValueChangedListener(context: any, listener: (value: any) => void): void {\n this.destroyValueChangeListener();\n const destroyListener = listenOwnProperty(context, this._inputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListener);\n }\n\n public destroyValueChangeListener(): void {\n this._valueChangeListeners.forEach(cb => cb());\n }\n\n public detectLabel(): void {\n this._labelElement = this._component.querySelector('label') as HTMLLabelElement;\n }\n\n public initializeFloatingLabel(): IFloatingLabel {\n return new FloatingLabel(this._labelElement);\n }\n\n public inputHasValue(): boolean {\n return this._inputElement.value ? this._inputElement.value.trim().length > 0 : false;\n }\n\n // An overrideable method for more generic field values where input.value is not the value.\n public fieldHasValue(): boolean {\n return this.inputHasValue();\n }\n\n public hasPlaceholder(): boolean {\n return this._inputElement.placeholder ? this._inputElement.placeholder.trim().length > 0 : false;\n }\n\n public inputHasFocus(): boolean {\n return this._inputElement === getActiveElement();\n }\n\n public setLabelClass(name: string): void {\n if (this._labelElement) {\n this._labelElement.classList.add(name);\n }\n }\n\n public removeLabelClass(name: string): void {\n if (this._labelElement) {\n this._labelElement.classList.remove(name);\n }\n }\n\n public setRoomy(isRoomy: boolean): void {\n toggleClass(this._rootElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);\n }\n\n public setDense(isDense: boolean): void {\n toggleClass(this._rootElement, isDense, FIELD_CONSTANTS.classes.DENSE);\n }\n\n public hasLeadingNodes(): boolean {\n if (!this._leadingSlot) {\n return false;\n }\n return this._leadingSlot.assignedNodes().length > 0;\n }\n\n public hasTrailingNodes(): boolean {\n if (!this._trailingSlot) {\n return false;\n }\n return this._trailingSlot.assignedNodes().length > 0;\n }\n\n public hasAddonEndNodes(): boolean {\n if (!this._addonEndSlot) {\n return false;\n }\n return this._addonEndSlot.assignedNodes().length > 0;\n }\n\n public setInputClass(className: string): void {\n this._inputElement.classList.add(className);\n }\n\n public removeInputClass(className: string): void {\n this._inputElement.classList.remove(className);\n }\n\n public setRootClass(classes: string | string[]): void {\n addClass(classes, this._rootElement);\n }\n\n public removeRootClass(classes: string | string[]): void {\n removeClass(classes, this._rootElement);\n }\n\n public setInputAttributeObserver(listener: (name: string, value: string | null) => void): void {\n this._inputMutationObserver = createElementAttributeObserver(this._inputElement, listener, FIELD_CONSTANTS.observedInputAttributes);\n }\n\n public isDisabled(): boolean {\n return this._inputElement.hasAttribute('disabled');\n }\n\n public isReadonly(): boolean {\n return this._inputElement.hasAttribute('readonly');\n }\n\n public getLabelWidth(fontSize: number, fontFamily: string): number {\n return calculateFontWidth(this._labelElement.innerText, { fontSize, fontFamily });\n }\n\n public getLabelFontMetrics(): IFontInfo {\n const style = getComputedStyle(this._labelElement);\n return {\n fontSize: parseInt(style.fontSize || '16', 10),\n fontFamily: style.fontFamily || 'Roboto'\n };\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IFloatingLabel } from '../floating-label/floating-label';\nimport { IFieldAdapter } from './field-adapter';\nimport { FIELD_CONSTANTS, FieldFloatLabelType, FieldShapeType, FieldDensityType } from './field-constants';\n\nexport interface IFieldFoundation extends ICustomElementFoundation {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n floatLabel(value: boolean, alwaysFloat?: boolean): void;\n}\n\nexport class FieldFoundation {\n protected _density: FieldDensityType = 'default';\n protected _floatingLabel: IFloatingLabel | undefined;\n protected _shape: FieldShapeType = 'default';\n protected _invalid = false;\n protected _required = false;\n protected _floatLabelType: FieldFloatLabelType = 'auto';\n protected _isInitialized = false;\n protected _labelSlotListener: (evt: Event) => void;\n protected _leadingSlotListener: (evt: Event) => void;\n protected _trailingSlotListener: (evt: Event) => void;\n protected _addonEndSlotListener: (evt: Event) => void;\n protected _focusListener: (evt: Event) => void;\n protected _blurListener: (evt: Event) => void;\n protected _valueChangedListener: (value: any) => void;\n protected _inputAttributeChangedListener: (name: string, value: string) => void;\n\n constructor(protected _adapter: IFieldAdapter) {\n this._labelSlotListener = evt => this._onLabelSlotChanged(evt);\n this._leadingSlotListener = evt => this._onLeadingSlotChanged(evt);\n this._trailingSlotListener = evt => this._onTrailingSlotChanged(evt);\n this._addonEndSlotListener = evt => this._onAddonEndSlotChanged(evt);\n this._focusListener = (evt: Event) => this._onFocus(evt);\n this._blurListener = (evt: Event) => this._onBlur(evt);\n this._valueChangedListener = (value: any) => this._onValueChanged(value);\n this._inputAttributeChangedListener = (name, value) => this._onInputAttributeChanged(name, value);\n }\n\n //\n // Public\n //\n\n public initialize(): void {\n this._adapter.initialize('');\n\n if (this._adapter.hasLabel()) {\n this._adapter.ensureSlottedLabel();\n }\n\n this._initializeLabel();\n\n if (this._adapter.hasPlaceholder()) {\n this._floatLabelType = 'always';\n }\n\n this._detectSlottedContent();\n this._adapter.addLabelSlotListener(this._labelSlotListener);\n this._adapter.addLeadingSlotListener(this._leadingSlotListener);\n this._adapter.addTrailingSlotListener(this._trailingSlotListener);\n this._adapter.addAddonEndSlotListener(this._addonEndSlotListener);\n this._adapter.setValueChangedListener(this, this._valueChangedListener);\n this._adapter.addInputListener('focus', this._focusListener);\n this._adapter.addInputListener('blur', this._blurListener);\n this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener);\n this._applyDensity();\n this._setShapeType();\n this._setValidity();\n\n if (this._adapter.isDisabled()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.DISABLED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.DISABLED);\n }\n\n if (this._adapter.isReadonly()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.READONLY);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.READONLY);\n }\n\n if (this._floatLabelType === 'always') {\n this.floatLabel(true);\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n this._adapter.destroy();\n\n if (this._floatingLabel) {\n this._floatingLabel.destroy();\n this._floatingLabel = undefined;\n }\n\n this._adapter.removeLabelSlotListener(this._labelSlotListener);\n this._adapter.removeLeadingSlotListener(this._leadingSlotListener);\n this._adapter.removeTrailingSlotListener(this._trailingSlotListener);\n this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener);\n this._adapter.removeInputListener('focus', this._focusListener);\n this._adapter.removeInputListener('blur', this._blurListener);\n this._adapter.destroyValueChangeListener();\n }\n\n public get density(): FieldDensityType {\n return this._density;\n }\n public set density(value: FieldDensityType) {\n if (this._density !== value) {\n this._density = value;\n\n if (this._isInitialized) {\n this._applyDensity();\n this._initializeLabel();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());\n }\n }\n\n public get floatLabelType(): FieldFloatLabelType {\n return this._floatLabelType;\n }\n public set floatLabelType(value: FieldFloatLabelType) {\n if (this._floatLabelType !== value) {\n this._floatLabelType = value;\n\n if (this._isInitialized) {\n this.floatLabel(this._floatLabelType === 'always');\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE, this._floatLabelType);\n }\n }\n\n public get shape(): FieldShapeType {\n return this._shape;\n }\n public set shape(value: FieldShapeType) {\n if (this._shape !== value) {\n this._shape = value;\n\n if (this._isInitialized) {\n this._setShapeType();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.SHAPE, this._shape);\n }\n }\n\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid !== value) {\n this._invalid = value;\n\n if (this._isInitialized) {\n this._setValidity();\n }\n }\n }\n\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required !== value) {\n this._required = value;\n\n if (this._isInitialized) {\n this._setValidity();\n }\n\n if (this._required) {\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED);\n } else {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED);\n }\n }\n }\n\n public floatLabel(value: boolean): void {\n if (this._floatingLabel?.isFloating === value) {\n return;\n }\n\n if (!value && this._floatLabelType === 'always') {\n if (this._floatingLabel) {\n this._floatingLabel.float(true, true);\n }\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING, '');\n return;\n }\n\n if (this._floatingLabel) {\n this._floatingLabel.float(value, this._floatLabelType === 'always');\n\n if (value) {\n this._adapter.setInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING, '');\n } else {\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n }\n }\n }\n\n //\n // Protected\n //\n\n protected _onLabelSlotChanged(evt: Event): void {\n this._initializeLabel();\n }\n\n protected _onLeadingSlotChanged(evt: Event): void {\n this._detectLeadingContent();\n }\n\n protected _onTrailingSlotChanged(evt: Event): void {\n this._detectTrailingContent();\n }\n\n protected _onAddonEndSlotChanged(evt: Event): void {\n this._detectAddonEndContent();\n }\n\n protected _initializeLabel(): void {\n if (this._floatingLabel) {\n this._floatingLabel.destroy();\n }\n this._adapter.detectLabel();\n if (this._adapter.hasLabel() && this._density !== 'dense') {\n this._floatingLabel = this._adapter.initializeFloatingLabel();\n this._adapter.ensureLabelOrder();\n this.floatLabel(this._floatLabelType === 'always' || this._adapter.fieldHasValue() || this._adapter.hasPlaceholder());\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.LABEL);\n } else {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);\n this._floatingLabel = undefined;\n }\n }\n\n protected _detectLeadingContent(): void {\n if (this._adapter.hasLeadingNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.LEADING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LEADING);\n }\n }\n\n protected _detectTrailingContent(): void {\n if (this._adapter.hasTrailingNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.TRAILING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.TRAILING);\n }\n }\n\n protected _detectAddonEndContent(): void {\n if (this._adapter.hasAddonEndNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n }\n }\n\n protected _detectSlottedContent(): void {\n this._detectLeadingContent();\n this._detectTrailingContent();\n this._detectAddonEndContent();\n }\n\n protected _onFocus(event: Event): void {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.setLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n this.floatLabel(true);\n }\n\n protected _onBlur(event: Event): void {\n if (this._adapter.inputHasFocus()) {\n return;\n }\n\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n\n if (!this._adapter.fieldHasValue() && !this._adapter.hasPlaceholder()) {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n this.floatLabel(false);\n }\n }\n\n protected _onValueChanged(value: any): void {\n if (this._adapter.fieldHasValue()) {\n this.floatLabel(true);\n } else if (!this._adapter.inputHasFocus() && !this._adapter.hasPlaceholder()) {\n this.floatLabel(false);\n }\n }\n\n protected _onInputAttributeChanged(name: string, value: string | null): void {\n if (this._adapter.isDisabled()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.DISABLED);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.removeLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n\n if (!this._adapter.fieldHasValue() && !this._adapter.hasPlaceholder() && this._floatingLabel) {\n this.floatLabel(false);\n }\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.DISABLED);\n }\n\n if (this._adapter.isReadonly()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.READONLY);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.READONLY);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n }\n\n switch (name) {\n case 'readonly':\n case 'disabled':\n // If we are changing the readonly or disabled attribute, we want to make sure that we apply\n // the focus state properly if the input element also now has focus\n if (this._adapter.inputHasFocus()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.setInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.setLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n }\n break;\n case 'value':\n if (this._floatingLabel) {\n this.floatLabel(this._adapter.fieldHasValue());\n }\n break;\n case 'placeholder':\n if (this._floatingLabel) {\n const float = (!!value && !!value.trim()) || this._adapter.fieldHasValue();\n if (float !== this._floatingLabel.isFloating) {\n this.floatLabel(float);\n }\n }\n break;\n }\n }\n\n protected _setShapeType(): void {\n if (this._shape === 'rounded') {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n }\n }\n\n protected _setValidity(): void {\n if (this._invalid) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.INVALID);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.INVALID);\n }\n\n if (this._required) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.REQUIRED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.REQUIRED);\n }\n }\n\n protected _applyDensity(): void {\n this._adapter.setRoomy(this._density === 'roomy');\n this._adapter.setDense(this._density === 'dense');\n }\n}\n", "import { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from './field-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { FieldFoundation } from './field-foundation';\nimport { coerceBoolean, ensureChildren, FoundationProperty } from '@tylertech/forge-core';\n\nexport interface IFieldComponent extends IBaseComponent {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n floatLabel(value: boolean): void;\n}\n\nexport abstract class FieldComponent<T extends FieldFoundation> extends BaseComponent implements IFieldComponent {\n public static get observedAttributes(): string[] {\n return [\n FIELD_CONSTANTS.attributes.DENSITY,\n FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE,\n FIELD_CONSTANTS.attributes.SHAPE,\n FIELD_CONSTANTS.attributes.INVALID,\n FIELD_CONSTANTS.attributes.REQUIRED\n ];\n }\n\n protected _foundation: T;\n\n constructor() {\n super();\n }\n\n public connectedCallback(): void {\n if (this.children.length) {\n this._initialize();\n } else {\n ensureChildren(this).then(() => this._initialize());\n }\n }\n\n private _initialize(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case FIELD_CONSTANTS.attributes.DENSITY:\n this.density = newValue as FieldDensityType;\n break;\n case FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE:\n this.floatLabelType = newValue as FieldFloatLabelType;\n break;\n case FIELD_CONSTANTS.attributes.SHAPE:\n this.shape = newValue as FieldShapeType;\n break;\n case FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n break;\n case FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Controls the density type. */\n @FoundationProperty()\n public density: FieldDensityType;\n\n /** Whether the label should always float, never float or float as the user types. */\n @FoundationProperty()\n public floatLabelType: FieldFloatLabelType;\n\n /** The shape type to use. */\n @FoundationProperty()\n public shape: FieldShapeType;\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public required: boolean;\n\n /**\n * Controls whether the label should be floating or not.\n * @param {boolean} value\n */\n public floatLabel(value: boolean): void {\n this._foundation.floatLabel(value);\n }\n}\n\n"],
5
- "mappings": "0bA+DO,GAAM,GAAN,aAA2B,EAAsD,CAWtF,YAAY,EAA4B,CACtC,MAAM,CAAS,EAHjB,KAAU,sBAA2C,CAAC,CAItD,CAEA,AAAO,WAAW,EAA4B,CAC5C,KAAK,aAAe,EAAiB,KAAK,WAAY,CAAY,EAClE,KAAK,WAAa,EAAiB,KAAK,WAAY,kBAAkB,EACtE,KAAK,aAAe,EAAiB,KAAK,WAAY,oBAAoB,EAC1E,KAAK,cAAgB,EAAiB,KAAK,WAAY,qBAAqB,EAC5E,KAAK,cAAgB,EAAiB,KAAK,WAAY,sBAAsB,EAC7E,KAAK,cAAgB,KAAK,WAAW,cAAc,8CAA8C,EACjG,KAAK,YAAY,CACnB,CAEA,AAAO,SAAgB,CACrB,AAAI,KAAK,wBACP,KAAK,uBAAuB,WAAW,CAE3C,CAEA,AAAO,UAAoB,CACzB,MAAO,CAAC,CAAC,KAAK,aAChB,CAEA,AAAO,oBAA2B,CAChC,KAAK,cAAc,KAAO,OAC5B,CAEA,AAAO,kBAAyB,CAC9B,GAAI,KAAK,cAAe,CACtB,GAAM,GAAW,MAAM,KAAK,KAAK,WAAW,QAAQ,EACpD,AAAI,EAAS,OAAS,GAAK,EAAS,QAAQ,KAAK,aAAa,EAAI,EAAS,QAAQ,KAAK,aAAa,GACnG,KAAK,WAAW,YAAY,KAAK,aAAa,CAElD,CACF,CAEA,AAAO,qBAAqB,EAAsC,CAChE,KAAK,WAAW,iBAAiB,aAAc,CAAQ,CACzD,CAEA,AAAO,wBAAwB,EAAsC,CACnE,AAAI,KAAK,YACP,KAAK,WAAW,oBAAoB,aAAc,CAAQ,CAE9D,CAEA,AAAO,uBAAuB,EAAsC,CAClE,KAAK,aAAa,iBAAiB,aAAc,CAAQ,CAC3D,CAEA,AAAO,0BAA0B,EAAsC,CACrE,AAAI,KAAK,cACP,KAA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,YAAY,CAAC,CAEtD,CAEA,AAAQ,aAAoB,CAC1B,KAAK,YAAY,WAAW,CAC9B,CAEA,AAAO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEA,AAAO,yBAAyB,EAAc,EAAkB,EAAwB,CACtF,OAAQ,OACD,GAAgB,WAAW,QAC9B,KAAK,QAAU,EACf,UACG,GAAgB,WAAW,iBAC9B,KAAK,eAAiB,EACtB,UACG,GAAgB,WAAW,MAC9B,KAAK,MAAQ,EACb,UACG,GAAgB,WAAW,QAC9B,KAAK,QAAU,EAAc,CAAQ,EACrC,UACG,GAAgB,WAAW,SAC9B,KAAK,SAAW,EAAc,CAAQ,EACtC,MAEN,CA0BA,AAAO,WAAW,EAAsB,CACtC,KAAK,YAAY,WAAW,CAAK,CACnC,CACF,EAzBS,GADP,AAAC,EAAmB,GACb,AAvDa,EAuDb,uBAIA,GADP,AAAC,EAAmB,GACb,AA3Da,EA2Db,8BAIA,GADP,AAAC,EAAmB,GACb,AA/Da,EA+Db,qBAIA,GADP,AAAC,EAAmB,GACb,AAnEa,EAmEb,uBAIA,GADP,AAAC,EAAmB,GACb,AAvEa,EAuEb",
4
+ "sourcesContent": ["import { addClass, calculateFontWidth, getShadowElement, IFontInfo, listenOwnProperty, Platform, removeClass, getActiveElement, createElementAttributeObserver, toggleClass } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { FloatingLabel, IFloatingLabel } from '../floating-label/floating-label';\nimport { IFieldComponent } from './field';\nimport { FIELD_CONSTANTS } from './field-constants';\n\nexport interface IFieldAdapter extends IBaseAdapter {\n // root\n setRootClass(classes: string | string[]): void;\n removeRootClass(classes: string | string[]): void;\n\n // input\n addInputListener(type: string, listener: (evt: Event) => void): void;\n removeInputListener(type: string, listener: (evt: Event) => void): void;\n setInputClass(className: string): void;\n removeInputClass(className: string): void;\n\n // label\n addLabelSlotListener(listener: (evt: Event) => void): void;\n removeLabelSlotListener(listener: (evt: Event) => void): void;\n setLabelClass(name: string): void;\n removeLabelClass(name: string): void;\n\n // leading\n addLeadingSlotListener(listener: (evt: Event) => void): void;\n removeLeadingSlotListener(listener: (evt: Event) => void): void;\n\n // trailing\n addTrailingSlotListener(listener: (evt: Event) => void): void;\n removeTrailingSlotListener(listener: (evt: Event) => void): void;\n\n // add on end\n addAddonEndSlotListener(listener: (evt: Event) => void): void;\n removeAddonEndSlotListener(listener: (evt: Event) => void): void;\n\n // state selectors\n hasAddonEndNodes(): boolean;\n hasLabel(): boolean;\n hasLeadingNodes(): boolean;\n hasPlaceholder(): boolean;\n hasTrailingNodes(): boolean;\n inputHasFocus(): boolean;\n inputHasValue(): boolean;\n fieldHasValue(): boolean;\n isDisabled(): boolean;\n isReadonly(): boolean;\n getLabelFontMetrics(): IFontInfo;\n getLabelWidth(fontSize: number, fontFamily: string): number;\n\n // state actions\n initialize(rootSelector: string): void;\n initializeFloatingLabel(): IFloatingLabel;\n ensureLabelOrder(): void;\n ensureSlottedLabel(): void;\n destroy(): void;\n setValueChangedListener(context: any, listener: (value: any) => void): void;\n destroyValueChangeListener(): void;\n detectLabel(): void;\n setRoomy(isRoomy: boolean): void;\n setDense(isDense: boolean): void;\n setInputAttributeObserver(listener: (name: string, value: string | null) => void): void;\n}\n\nexport class FieldAdapter extends BaseAdapter<IFieldComponent> implements IFieldAdapter {\n protected _rootElement: HTMLElement;\n protected _labelSlot: HTMLSlotElement;\n protected _leadingSlot: HTMLSlotElement;\n protected _trailingSlot: HTMLSlotElement;\n protected _addonEndSlot: HTMLSlotElement;\n protected _labelElement: HTMLLabelElement;\n protected _inputElement: HTMLInputElement;\n protected _inputMutationObserver: MutationObserver;\n protected _valueChangeListeners: Array<() => void> = [];\n\n constructor(component: IFieldComponent) {\n super(component);\n }\n\n public initialize(rootSelector: string): void {\n this._rootElement = getShadowElement(this._component, rootSelector);\n this._labelSlot = getShadowElement(this._component, 'slot[name=label]') as HTMLSlotElement;\n this._leadingSlot = getShadowElement(this._component, 'slot[name=leading]') as HTMLSlotElement;\n this._trailingSlot = getShadowElement(this._component, 'slot[name=trailing]') as HTMLSlotElement;\n this._addonEndSlot = getShadowElement(this._component, 'slot[name=addon-end]') as HTMLSlotElement;\n this._inputElement = this._component.querySelector('input:not([type=checkbox]):not([type=radio])') as HTMLInputElement;\n this.detectLabel();\n }\n\n public destroy(): void {\n if (this._inputMutationObserver) {\n this._inputMutationObserver.disconnect();\n }\n }\n\n public hasLabel(): boolean {\n return !!this._labelElement;\n }\n\n public ensureSlottedLabel(): void {\n this._labelElement.slot = 'label';\n }\n\n public ensureLabelOrder(): void {\n if (this._labelElement) {\n const children = Array.from(this._component.children);\n if (children.length > 1 && children.indexOf(this._labelElement) < children.indexOf(this._inputElement)) {\n this._component.appendChild(this._labelElement);\n }\n }\n }\n\n public addLabelSlotListener(listener: (evt: Event) => void): void {\n this._labelSlot.addEventListener('slotchange', listener);\n }\n\n public removeLabelSlotListener(listener: (evt: Event) => void): void {\n if (this._labelSlot) {\n this._labelSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addLeadingSlotListener(listener: (evt: Event) => void): void {\n this._leadingSlot.addEventListener('slotchange', listener);\n }\n\n public removeLeadingSlotListener(listener: (evt: Event) => void): void {\n if (this._leadingSlot) {\n this._leadingSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addTrailingSlotListener(listener: (evt: Event) => void): void {\n this._trailingSlot.addEventListener('slotchange', listener);\n }\n\n public removeTrailingSlotListener(listener: (evt: Event) => void): void {\n if (this._trailingSlot) {\n this._trailingSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addAddonEndSlotListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.addEventListener('slotchange', listener);\n }\n\n public removeAddonEndSlotListener(listener: (evt: Event) => void): void {\n if (this._addonEndSlot) {\n this._addonEndSlot.removeEventListener('slotchange', listener);\n }\n }\n\n public addInputListener(type: string, listener: (evt: Event) => void): void {\n this._inputElement.addEventListener(type, listener);\n }\n public removeInputListener(type: string, listener: (evt: Event) => void): void {\n if (this._inputElement) {\n this._inputElement.removeEventListener(type, listener);\n }\n }\n\n public setValueChangedListener(context: any, listener: (value: any) => void): void {\n this.destroyValueChangeListener();\n const destroyListener = listenOwnProperty(context, this._inputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListener);\n }\n\n public destroyValueChangeListener(): void {\n this._valueChangeListeners.forEach(cb => cb());\n }\n\n public detectLabel(): void {\n this._labelElement = this._component.querySelector('label') as HTMLLabelElement;\n }\n\n public initializeFloatingLabel(): IFloatingLabel {\n return new FloatingLabel(this._labelElement);\n }\n\n public inputHasValue(): boolean {\n return this._inputElement.value ? this._inputElement.value.trim().length > 0 : false;\n }\n\n // An overrideable method for more generic field values where input.value is not the value.\n public fieldHasValue(): boolean {\n return this.inputHasValue();\n }\n\n public hasPlaceholder(): boolean {\n return this._inputElement.placeholder ? this._inputElement.placeholder.trim().length > 0 : false;\n }\n\n public inputHasFocus(): boolean {\n return this._inputElement === getActiveElement();\n }\n\n public setLabelClass(name: string): void {\n if (this._labelElement) {\n this._labelElement.classList.add(name);\n }\n }\n\n public removeLabelClass(name: string): void {\n if (this._labelElement) {\n this._labelElement.classList.remove(name);\n }\n }\n\n public setRoomy(isRoomy: boolean): void {\n toggleClass(this._rootElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);\n }\n\n public setDense(isDense: boolean): void {\n toggleClass(this._rootElement, isDense, FIELD_CONSTANTS.classes.DENSE);\n }\n\n public hasLeadingNodes(): boolean {\n if (!this._leadingSlot) {\n return false;\n }\n return this._leadingSlot.assignedNodes().length > 0;\n }\n\n public hasTrailingNodes(): boolean {\n if (!this._trailingSlot) {\n return false;\n }\n return this._trailingSlot.assignedNodes().length > 0;\n }\n\n public hasAddonEndNodes(): boolean {\n if (!this._addonEndSlot) {\n return false;\n }\n return this._addonEndSlot.assignedNodes().length > 0;\n }\n\n public setInputClass(className: string): void {\n this._inputElement.classList.add(className);\n }\n\n public removeInputClass(className: string): void {\n this._inputElement.classList.remove(className);\n }\n\n public setRootClass(classes: string | string[]): void {\n addClass(classes, this._rootElement);\n }\n\n public removeRootClass(classes: string | string[]): void {\n removeClass(classes, this._rootElement);\n }\n\n public setInputAttributeObserver(listener: (name: string, value: string | null) => void): void {\n this._inputMutationObserver = createElementAttributeObserver(this._inputElement, listener, FIELD_CONSTANTS.observedInputAttributes);\n }\n\n public isDisabled(): boolean {\n return this._inputElement.hasAttribute('disabled');\n }\n\n public isReadonly(): boolean {\n return this._inputElement.hasAttribute('readonly');\n }\n\n public getLabelWidth(fontSize: number, fontFamily: string): number {\n return calculateFontWidth(this._labelElement.innerText, { fontSize, fontFamily });\n }\n\n public getLabelFontMetrics(): IFontInfo {\n const style = getComputedStyle(this._labelElement);\n return {\n fontSize: parseInt(style.fontSize || '16', 10),\n fontFamily: style.fontFamily || 'Roboto'\n };\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IFloatingLabel } from '../floating-label/floating-label';\nimport { IFieldAdapter } from './field-adapter';\nimport { FIELD_CONSTANTS, FieldFloatLabelType, FieldShapeType, FieldDensityType } from './field-constants';\n\nexport interface IFieldFoundation extends ICustomElementFoundation {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n floatLabel(value: boolean, alwaysFloat?: boolean): void;\n}\n\nexport class FieldFoundation {\n protected _density: FieldDensityType = 'default';\n protected _floatingLabel: IFloatingLabel | undefined;\n protected _shape: FieldShapeType = 'default';\n protected _invalid = false;\n protected _required = false;\n protected _floatLabelType: FieldFloatLabelType = 'auto';\n protected _isInitialized = false;\n protected _labelSlotListener: (evt: Event) => void;\n protected _leadingSlotListener: (evt: Event) => void;\n protected _trailingSlotListener: (evt: Event) => void;\n protected _addonEndSlotListener: (evt: Event) => void;\n protected _focusListener: (evt: Event) => void;\n protected _blurListener: (evt: Event) => void;\n protected _valueChangedListener: (value: any) => void;\n protected _inputAttributeChangedListener: (name: string, value: string) => void;\n\n constructor(protected _adapter: IFieldAdapter) {\n this._labelSlotListener = evt => this._onLabelSlotChanged(evt);\n this._leadingSlotListener = evt => this._onLeadingSlotChanged(evt);\n this._trailingSlotListener = evt => this._onTrailingSlotChanged(evt);\n this._addonEndSlotListener = evt => this._onAddonEndSlotChanged(evt);\n this._focusListener = (evt: Event) => this._onFocus(evt);\n this._blurListener = (evt: Event) => this._onBlur(evt);\n this._valueChangedListener = (value: any) => this._onValueChanged(value);\n this._inputAttributeChangedListener = (name, value) => this._onInputAttributeChanged(name, value);\n }\n\n //\n // Public\n //\n\n public initialize(): void {\n this._adapter.initialize('');\n\n if (this._adapter.hasLabel()) {\n this._adapter.ensureSlottedLabel();\n }\n\n this._initializeLabel();\n\n if (this._adapter.hasPlaceholder()) {\n this._floatLabelType = 'always';\n }\n\n this._detectSlottedContent();\n this._adapter.addLabelSlotListener(this._labelSlotListener);\n this._adapter.addLeadingSlotListener(this._leadingSlotListener);\n this._adapter.addTrailingSlotListener(this._trailingSlotListener);\n this._adapter.addAddonEndSlotListener(this._addonEndSlotListener);\n this._adapter.setValueChangedListener(this, this._valueChangedListener);\n this._adapter.addInputListener('focus', this._focusListener);\n this._adapter.addInputListener('blur', this._blurListener);\n this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener);\n this._applyDensity();\n this._setShapeType();\n this._setValidity();\n\n if (this._adapter.isDisabled()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.DISABLED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.DISABLED);\n }\n\n if (this._adapter.isReadonly()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.READONLY);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.READONLY);\n }\n\n if (this._floatLabelType === 'always') {\n this.floatLabel(true);\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n this._adapter.destroy();\n\n if (this._floatingLabel) {\n this._floatingLabel.destroy();\n this._floatingLabel = undefined;\n }\n\n this._adapter.removeLabelSlotListener(this._labelSlotListener);\n this._adapter.removeLeadingSlotListener(this._leadingSlotListener);\n this._adapter.removeTrailingSlotListener(this._trailingSlotListener);\n this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener);\n this._adapter.removeInputListener('focus', this._focusListener);\n this._adapter.removeInputListener('blur', this._blurListener);\n this._adapter.destroyValueChangeListener();\n }\n\n public get density(): FieldDensityType {\n return this._density;\n }\n public set density(value: FieldDensityType) {\n if (this._density !== value) {\n this._density = value;\n\n if (this._isInitialized) {\n this._applyDensity();\n this._initializeLabel();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());\n }\n }\n\n public get floatLabelType(): FieldFloatLabelType {\n return this._floatLabelType;\n }\n public set floatLabelType(value: FieldFloatLabelType) {\n if (this._floatLabelType !== value) {\n this._floatLabelType = value;\n\n if (this._isInitialized) {\n this.floatLabel(this._floatLabelType === 'always');\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE, this._floatLabelType);\n }\n }\n\n public get shape(): FieldShapeType {\n return this._shape;\n }\n public set shape(value: FieldShapeType) {\n if (this._shape !== value) {\n this._shape = value;\n\n if (this._isInitialized) {\n this._setShapeType();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.SHAPE, this._shape);\n }\n }\n\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid !== value) {\n this._invalid = value;\n\n if (this._isInitialized) {\n this._setValidity();\n }\n }\n }\n\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required !== value) {\n this._required = value;\n\n if (this._isInitialized) {\n this._setValidity();\n }\n\n if (this._required) {\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED);\n } else {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED);\n }\n }\n }\n\n public floatLabel(value: boolean): void {\n if (this._floatingLabel?.isFloating === value) {\n return;\n }\n\n if (!value && this._floatLabelType === 'always') {\n if (this._floatingLabel) {\n this._floatingLabel.float(true, true);\n }\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING, '');\n return;\n }\n\n if (this._floatingLabel) {\n this._floatingLabel.float(value, this._floatLabelType === 'always');\n\n if (value) {\n this._adapter.setInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING, '');\n } else {\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n }\n }\n }\n\n //\n // Protected\n //\n\n protected _onLabelSlotChanged(evt: Event): void {\n this._initializeLabel();\n }\n\n protected _onLeadingSlotChanged(evt: Event): void {\n this._detectLeadingContent();\n }\n\n protected _onTrailingSlotChanged(evt: Event): void {\n this._detectTrailingContent();\n }\n\n protected _onAddonEndSlotChanged(evt: Event): void {\n this._detectAddonEndContent();\n }\n\n protected _initializeLabel(): void {\n if (this._floatingLabel) {\n this._floatingLabel.destroy();\n }\n this._adapter.detectLabel();\n if (this._adapter.hasLabel() && this._density !== 'dense') {\n this._floatingLabel = this._adapter.initializeFloatingLabel();\n this._adapter.ensureLabelOrder();\n this.floatLabel(this._floatLabelType === 'always' || this._adapter.fieldHasValue() || this._adapter.hasPlaceholder());\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.LABEL);\n } else {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);\n this._floatingLabel = undefined;\n }\n }\n\n protected _detectLeadingContent(): void {\n if (this._adapter.hasLeadingNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.LEADING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LEADING);\n }\n }\n\n protected _detectTrailingContent(): void {\n if (this._adapter.hasTrailingNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.TRAILING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.TRAILING);\n }\n }\n\n protected _detectAddonEndContent(): void {\n if (this._adapter.hasAddonEndNodes()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n }\n }\n\n protected _detectSlottedContent(): void {\n this._detectLeadingContent();\n this._detectTrailingContent();\n this._detectAddonEndContent();\n }\n\n protected _onFocus(event: Event): void {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.setLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n this.floatLabel(true);\n }\n\n protected _onBlur(event: Event): void {\n if (this._adapter.inputHasFocus()) {\n return;\n }\n\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n\n if (!this._adapter.fieldHasValue() && !this._adapter.hasPlaceholder()) {\n this._adapter.removeHostAttribute(FIELD_CONSTANTS.attributes.HOST_LABEL_FLOATING);\n this.floatLabel(false);\n }\n }\n\n protected _onValueChanged(value: any): void {\n if (this._adapter.fieldHasValue()) {\n this.floatLabel(true);\n } else if (!this._adapter.inputHasFocus() && !this._adapter.hasPlaceholder()) {\n this.floatLabel(false);\n }\n }\n\n protected _onInputAttributeChanged(name: string, value: string | null): void {\n if (this._adapter.isDisabled()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.DISABLED);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.removeLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n\n if (!this._adapter.fieldHasValue() && !this._adapter.hasPlaceholder() && this._floatingLabel) {\n this.floatLabel(false);\n }\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.DISABLED);\n }\n\n if (this._adapter.isReadonly()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.READONLY);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.READONLY);\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.removeInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n }\n\n switch (name) {\n case 'readonly':\n case 'disabled':\n // If we are changing the readonly or disabled attribute, we want to make sure that we apply\n // the focus state properly if the input element also now has focus\n if (this._adapter.inputHasFocus()) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._adapter.setInputClass(FIELD_CONSTANTS.classes.INPUT_FOCUSED);\n this._adapter.setLabelClass(FIELD_CONSTANTS.classes.LABEL_FOCUSED);\n }\n break;\n case 'value':\n if (this._floatingLabel) {\n this.floatLabel(this._adapter.fieldHasValue());\n }\n break;\n case 'placeholder':\n if (this._floatingLabel) {\n const float = (!!value && !!value.trim()) || this._adapter.fieldHasValue();\n if (float !== this._floatingLabel.isFloating) {\n this.floatLabel(float);\n }\n }\n break;\n }\n }\n\n protected _setShapeType(): void {\n if (this._shape === 'rounded') {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n }\n }\n\n protected _setValidity(): void {\n if (this._invalid) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.INVALID);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.INVALID);\n }\n\n if (this._required) {\n this._adapter.setRootClass(FIELD_CONSTANTS.classes.REQUIRED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.REQUIRED);\n }\n }\n\n protected _applyDensity(): void {\n this._adapter.setRoomy(this._density === 'roomy');\n this._adapter.setDense(this._density === 'dense');\n }\n}\n", "import { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from './field-constants';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { FieldFoundation } from './field-foundation';\nimport { coerceBoolean, ensureChild, FoundationProperty } from '@tylertech/forge-core';\n\nexport interface IFieldComponent extends IBaseComponent {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n floatLabel(value: boolean): void;\n}\n\nexport abstract class FieldComponent<T extends FieldFoundation> extends BaseComponent implements IFieldComponent {\n public static get observedAttributes(): string[] {\n return [\n FIELD_CONSTANTS.attributes.DENSITY,\n FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE,\n FIELD_CONSTANTS.attributes.SHAPE,\n FIELD_CONSTANTS.attributes.INVALID,\n FIELD_CONSTANTS.attributes.REQUIRED\n ];\n }\n\n protected _foundation: T;\n\n constructor() {\n super();\n }\n\n public connectedCallback(): void {\n if (this.querySelector(FIELD_CONSTANTS.selectors.INPUT)) {\n this._initialize();\n } else {\n ensureChild(this, FIELD_CONSTANTS.selectors.INPUT).then(() => this._initialize());\n }\n }\n\n private _initialize(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case FIELD_CONSTANTS.attributes.DENSITY:\n this.density = newValue as FieldDensityType;\n break;\n case FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE:\n this.floatLabelType = newValue as FieldFloatLabelType;\n break;\n case FIELD_CONSTANTS.attributes.SHAPE:\n this.shape = newValue as FieldShapeType;\n break;\n case FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n break;\n case FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Controls the density type. */\n @FoundationProperty()\n public density: FieldDensityType;\n\n /** Whether the label should always float, never float or float as the user types. */\n @FoundationProperty()\n public floatLabelType: FieldFloatLabelType;\n\n /** The shape type to use. */\n @FoundationProperty()\n public shape: FieldShapeType;\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public required: boolean;\n\n /**\n * Controls whether the label should be floating or not.\n * @param {boolean} value\n */\n public floatLabel(value: boolean): void {\n this._foundation.floatLabel(value);\n }\n}\n\n"],
5
+ "mappings": "0bA+DO,GAAM,GAAN,aAA2B,EAAsD,CAWtF,YAAY,EAA4B,CACtC,MAAM,CAAS,EAHjB,KAAU,sBAA2C,CAAC,CAItD,CAEA,AAAO,WAAW,EAA4B,CAC5C,KAAK,aAAe,EAAiB,KAAK,WAAY,CAAY,EAClE,KAAK,WAAa,EAAiB,KAAK,WAAY,kBAAkB,EACtE,KAAK,aAAe,EAAiB,KAAK,WAAY,oBAAoB,EAC1E,KAAK,cAAgB,EAAiB,KAAK,WAAY,qBAAqB,EAC5E,KAAK,cAAgB,EAAiB,KAAK,WAAY,sBAAsB,EAC7E,KAAK,cAAgB,KAAK,WAAW,cAAc,8CAA8C,EACjG,KAAK,YAAY,CACnB,CAEA,AAAO,SAAgB,CACrB,AAAI,KAAK,wBACP,KAAK,uBAAuB,WAAW,CAE3C,CAEA,AAAO,UAAoB,CACzB,MAAO,CAAC,CAAC,KAAK,aAChB,CAEA,AAAO,oBAA2B,CAChC,KAAK,cAAc,KAAO,OAC5B,CAEA,AAAO,kBAAyB,CAC9B,GAAI,KAAK,cAAe,CACtB,GAAM,GAAW,MAAM,KAAK,KAAK,WAAW,QAAQ,EACpD,AAAI,EAAS,OAAS,GAAK,EAAS,QAAQ,KAAK,aAAa,EAAI,EAAS,QAAQ,KAAK,aAAa,GACnG,KAAK,WAAW,YAAY,KAAK,aAAa,CAElD,CACF,CAEA,AAAO,qBAAqB,EAAsC,CAChE,KAAK,WAAW,iBA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