@tylertech/forge 2.24.0 → 2.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/custom-elements.json +93 -108
  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/banner/index.js +1 -1
  11. package/dist/esm/bottom-sheet/index.js +1 -1
  12. package/dist/esm/busy-indicator/index.js +1 -1
  13. package/dist/esm/button/index.js +1 -1
  14. package/dist/esm/button-area/index.js +1 -1
  15. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  16. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  17. package/dist/esm/calendar/index.js +1 -1
  18. package/dist/esm/checkbox/index.js +1 -1
  19. package/dist/esm/chip-field/index.js +1 -1
  20. package/dist/esm/chips/chip/index.js +1 -1
  21. package/dist/esm/chips/chip-set/index.js +1 -1
  22. package/dist/esm/chips/index.js +1 -1
  23. package/dist/esm/chunks/{chunk.UUBAUAER.js → chunk.3MMDUUTN.js} +2 -2
  24. package/dist/esm/chunks/{chunk.KZDQFUNT.js → chunk.3V2VDOOP.js} +2 -2
  25. package/dist/esm/chunks/{chunk.Q2PGK4IA.js → chunk.4KKMVMPN.js} +2 -2
  26. package/dist/esm/chunks/{chunk.WLBRU5HI.js → chunk.5SM7UG6C.js} +2 -2
  27. package/dist/esm/chunks/{chunk.KNNT4CGL.js → chunk.6DVJ22IK.js} +2 -2
  28. package/dist/esm/chunks/{chunk.QRWYYBZC.js → chunk.6NARYF7U.js} +2 -2
  29. package/dist/esm/chunks/{chunk.QRWYYBZC.js.map → chunk.6NARYF7U.js.map} +3 -3
  30. package/dist/esm/chunks/{chunk.4APGDQHF.js → chunk.AFW54X3W.js} +2 -2
  31. package/dist/esm/chunks/chunk.AH4YGLZ4.js +7 -0
  32. package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +7 -0
  33. package/dist/esm/chunks/chunk.AJTQHK25.js +7 -0
  34. package/dist/esm/chunks/chunk.AJTQHK25.js.map +7 -0
  35. package/dist/esm/chunks/{chunk.KMMOZ2SF.js → chunk.C3G25JFG.js} +2 -2
  36. package/dist/esm/chunks/chunk.CL4FTBLR.js +7 -0
  37. package/dist/esm/chunks/chunk.CL4FTBLR.js.map +7 -0
  38. package/dist/esm/chunks/{chunk.POBCKMFO.js → chunk.CYLDP7ML.js} +2 -2
  39. package/dist/esm/chunks/{chunk.HDHGU4L2.js → chunk.E3K6KM57.js} +2 -2
  40. package/dist/esm/chunks/{chunk.PTEWJ5PZ.js → chunk.EQEMCHMB.js} +2 -2
  41. package/dist/esm/chunks/{chunk.QBST3QSM.js → chunk.FEU4FTVQ.js} +2 -2
  42. package/dist/esm/chunks/{chunk.ZN6U7WVM.js → chunk.FIZVVCUB.js} +2 -2
  43. package/dist/esm/chunks/{chunk.BQRXAJTH.js → chunk.JFAOCIGZ.js} +2 -2
  44. package/dist/esm/chunks/{chunk.4QVF44G5.js → chunk.K57IO236.js} +2 -2
  45. package/dist/esm/chunks/{chunk.K2O3KSP7.js → chunk.KGMCBPGV.js} +2 -2
  46. package/dist/esm/chunks/chunk.KYH5GKVI.js +7 -0
  47. package/dist/esm/chunks/chunk.KYH5GKVI.js.map +7 -0
  48. package/dist/esm/chunks/chunk.LEINPSKL.js +7 -0
  49. package/dist/esm/chunks/chunk.LEINPSKL.js.map +7 -0
  50. package/dist/esm/chunks/{chunk.V5L5DKNF.js → chunk.LFBYFJTX.js} +2 -2
  51. package/dist/esm/chunks/chunk.MKHU4IPO.js +7 -0
  52. package/dist/esm/chunks/chunk.MKHU4IPO.js.map +7 -0
  53. package/dist/esm/chunks/chunk.N6MAUMFI.js +7 -0
  54. package/dist/esm/chunks/chunk.N6MAUMFI.js.map +7 -0
  55. package/dist/esm/chunks/{chunk.USKQFX4N.js → chunk.OBBYRQCY.js} +2 -2
  56. package/dist/esm/chunks/chunk.OJ54J4L3.js +7 -0
  57. package/dist/esm/chunks/chunk.OJ54J4L3.js.map +7 -0
  58. package/dist/esm/chunks/chunk.OML7MHH6.js +29 -0
  59. package/dist/esm/chunks/chunk.OML7MHH6.js.map +7 -0
  60. package/dist/esm/chunks/chunk.OUORLMTZ.js +12 -0
  61. package/dist/esm/chunks/chunk.QIGNMZRL.js +7 -0
  62. package/dist/esm/chunks/chunk.QIGNMZRL.js.map +7 -0
  63. package/dist/esm/chunks/{chunk.DNWMURCG.js → chunk.RHXQ2GMV.js} +2 -2
  64. package/dist/esm/chunks/{chunk.OLNY6ZNB.js → chunk.TLXWXBQO.js} +2 -2
  65. package/dist/esm/chunks/chunk.TMEYQXRR.js +7 -0
  66. package/dist/esm/chunks/chunk.TMEYQXRR.js.map +7 -0
  67. package/dist/esm/chunks/{chunk.NHZTE4I4.js → chunk.TUQWDTRA.js} +2 -2
  68. package/dist/esm/chunks/{chunk.NHZTE4I4.js.map → chunk.TUQWDTRA.js.map} +1 -1
  69. package/dist/esm/chunks/{chunk.EPFMWAIO.js → chunk.TVWUZYVG.js} +2 -2
  70. package/dist/esm/chunks/{chunk.AITARMT3.js → chunk.UNFOIEF6.js} +2 -2
  71. package/dist/esm/chunks/{chunk.AITARMT3.js.map → chunk.UNFOIEF6.js.map} +2 -2
  72. package/dist/esm/chunks/{chunk.32AY5G4D.js → chunk.W3DFKTAX.js} +2 -2
  73. package/dist/esm/chunks/{chunk.ATJJ6NAY.js → chunk.WF24FWAT.js} +2 -2
  74. package/dist/esm/chunks/chunk.XINI6PNZ.js +7 -0
  75. package/dist/esm/chunks/chunk.XINI6PNZ.js.map +7 -0
  76. package/dist/esm/chunks/{chunk.WVU4LCVC.js → chunk.XKX2BE6Z.js} +2 -2
  77. package/dist/esm/chunks/{chunk.ZVHFSAID.js → chunk.YVXZ753Q.js} +2 -2
  78. package/dist/esm/chunks/{chunk.QFMQPAT2.js → chunk.Z7Y2RA4P.js} +2 -2
  79. package/dist/esm/color-picker/index.js +1 -1
  80. package/dist/esm/core/index.js +1 -1
  81. package/dist/esm/core/utils/index.js +1 -1
  82. package/dist/esm/date-picker/index.js +1 -1
  83. package/dist/esm/date-range-picker/index.js +1 -1
  84. package/dist/esm/expansion-panel/index.js +1 -1
  85. package/dist/esm/file-picker/index.js +1 -1
  86. package/dist/esm/icon/index.js +1 -1
  87. package/dist/esm/icon-button/index.js +1 -1
  88. package/dist/esm/index.js +1 -1
  89. package/dist/esm/list/index.js +1 -1
  90. package/dist/esm/list/list/index.js +1 -1
  91. package/dist/esm/list/list-item/index.js +1 -1
  92. package/dist/esm/list-dropdown/index.js +1 -1
  93. package/dist/esm/menu/index.js +1 -1
  94. package/dist/esm/open-icon/index.js +1 -1
  95. package/dist/esm/paginator/index.js +1 -1
  96. package/dist/esm/profile-card/index.js +1 -1
  97. package/dist/esm/quantity-field/index.js +1 -1
  98. package/dist/esm/radio/index.js +1 -1
  99. package/dist/esm/select/core/index.js +1 -1
  100. package/dist/esm/select/index.js +1 -1
  101. package/dist/esm/select/option/index.js +1 -1
  102. package/dist/esm/select/select/index.js +1 -1
  103. package/dist/esm/select/select-dropdown/index.js +1 -1
  104. package/dist/esm/slider/index.js +1 -1
  105. package/dist/esm/split-view/index.js +1 -1
  106. package/dist/esm/split-view/split-view/index.js +1 -1
  107. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  108. package/dist/esm/stepper/index.js +1 -1
  109. package/dist/esm/stepper/step/index.js +1 -1
  110. package/dist/esm/stepper/stepper/index.js +1 -1
  111. package/dist/esm/switch/index.js +1 -1
  112. package/dist/esm/table/index.js +1 -1
  113. package/dist/esm/tabs/index.js +1 -1
  114. package/dist/esm/tabs/tab/index.js +1 -1
  115. package/dist/esm/tabs/tab-bar/index.js +1 -1
  116. package/dist/esm/time-picker/index.js +1 -1
  117. package/dist/esm/toast/index.js +1 -1
  118. package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +2 -2
  119. package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +1 -1
  120. package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +3 -3
  121. package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +12 -4
  122. package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +2 -2
  123. package/esm/app-bar/notification-button/app-bar-notification-button.js +2 -2
  124. package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
  125. package/esm/autocomplete/autocomplete-adapter.js +6 -0
  126. package/esm/autocomplete/autocomplete-foundation.js +1 -0
  127. package/esm/core/utils/utils.d.ts +9 -0
  128. package/esm/core/utils/utils.js +22 -0
  129. package/esm/date-picker/date-picker-adapter.js +3 -0
  130. package/esm/date-range-picker/date-range-picker-adapter.js +6 -1
  131. package/esm/list/list-item/list-item-adapter.js +3 -1
  132. package/esm/list-dropdown/list-dropdown-constants.d.ts +1 -0
  133. package/esm/list-dropdown/list-dropdown-utils.js +16 -3
  134. package/esm/menu/menu-adapter.d.ts +2 -0
  135. package/esm/menu/menu-adapter.js +3 -0
  136. package/esm/menu/menu-foundation.js +2 -5
  137. package/esm/select/core/base-select-adapter.d.ts +0 -2
  138. package/esm/select/core/base-select-foundation.js +1 -2
  139. package/esm/select/option/option.d.ts +0 -1
  140. package/esm/select/option/option.js +0 -5
  141. package/esm/select/select/select-adapter.d.ts +0 -1
  142. package/esm/select/select/select-adapter.js +4 -9
  143. package/esm/select/select/select-foundation.js +0 -1
  144. package/esm/select/select-dropdown/select-dropdown-adapter.d.ts +0 -1
  145. package/esm/select/select-dropdown/select-dropdown-adapter.js +0 -11
  146. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  147. package/esm/tabs/tab/tab-adapter.d.ts +1 -3
  148. package/esm/tabs/tab/tab-adapter.js +13 -14
  149. package/esm/tabs/tab/tab-constants.d.ts +2 -1
  150. package/esm/tabs/tab/tab-constants.js +2 -1
  151. package/esm/tabs/tab/tab-foundation.d.ts +0 -2
  152. package/esm/tabs/tab/tab-foundation.js +3 -3
  153. package/esm/tabs/tab/tab.d.ts +0 -1
  154. package/esm/tabs/tab/tab.js +2 -5
  155. package/esm/time-picker/time-picker-adapter.d.ts +2 -0
  156. package/esm/time-picker/time-picker-adapter.js +7 -2
  157. package/esm/time-picker/time-picker-foundation.js +1 -0
  158. package/package.json +1 -1
  159. package/styles/tabs/tab/_mixins.scss +3 -7
  160. package/styles/tabs/tab/tab.scss +4 -0
  161. package/dist/esm/chunks/chunk.36RT7UOR.js +0 -7
  162. package/dist/esm/chunks/chunk.36RT7UOR.js.map +0 -7
  163. package/dist/esm/chunks/chunk.7NUOX3JD.js +0 -12
  164. package/dist/esm/chunks/chunk.E6FHH3CM.js +0 -7
  165. package/dist/esm/chunks/chunk.E6FHH3CM.js.map +0 -7
  166. package/dist/esm/chunks/chunk.F6DMKNFU.js +0 -29
  167. package/dist/esm/chunks/chunk.F6DMKNFU.js.map +0 -7
  168. package/dist/esm/chunks/chunk.HSUOYMJT.js +0 -7
  169. package/dist/esm/chunks/chunk.HSUOYMJT.js.map +0 -7
  170. package/dist/esm/chunks/chunk.HVYDNI2O.js +0 -7
  171. package/dist/esm/chunks/chunk.HVYDNI2O.js.map +0 -7
  172. package/dist/esm/chunks/chunk.KZJYLYWN.js +0 -7
  173. package/dist/esm/chunks/chunk.KZJYLYWN.js.map +0 -7
  174. package/dist/esm/chunks/chunk.LZOAYM6V.js +0 -7
  175. package/dist/esm/chunks/chunk.LZOAYM6V.js.map +0 -7
  176. package/dist/esm/chunks/chunk.M5QM2CPF.js +0 -7
  177. package/dist/esm/chunks/chunk.M5QM2CPF.js.map +0 -7
  178. package/dist/esm/chunks/chunk.MA2P7CG4.js +0 -7
  179. package/dist/esm/chunks/chunk.MA2P7CG4.js.map +0 -7
  180. package/dist/esm/chunks/chunk.MSOMQ4HD.js +0 -7
  181. package/dist/esm/chunks/chunk.MSOMQ4HD.js.map +0 -7
  182. package/dist/esm/chunks/chunk.QRSFRMBF.js +0 -7
  183. package/dist/esm/chunks/chunk.QRSFRMBF.js.map +0 -7
  184. package/dist/esm/chunks/chunk.SDZC7JIX.js +0 -7
  185. package/dist/esm/chunks/chunk.SDZC7JIX.js.map +0 -7
  186. /package/dist/esm/chunks/{chunk.UUBAUAER.js.map → chunk.3MMDUUTN.js.map} +0 -0
  187. /package/dist/esm/chunks/{chunk.KZDQFUNT.js.map → chunk.3V2VDOOP.js.map} +0 -0
  188. /package/dist/esm/chunks/{chunk.Q2PGK4IA.js.map → chunk.4KKMVMPN.js.map} +0 -0
  189. /package/dist/esm/chunks/{chunk.WLBRU5HI.js.map → chunk.5SM7UG6C.js.map} +0 -0
  190. /package/dist/esm/chunks/{chunk.KNNT4CGL.js.map → chunk.6DVJ22IK.js.map} +0 -0
  191. /package/dist/esm/chunks/{chunk.4APGDQHF.js.map → chunk.AFW54X3W.js.map} +0 -0
  192. /package/dist/esm/chunks/{chunk.KMMOZ2SF.js.map → chunk.C3G25JFG.js.map} +0 -0
  193. /package/dist/esm/chunks/{chunk.POBCKMFO.js.map → chunk.CYLDP7ML.js.map} +0 -0
  194. /package/dist/esm/chunks/{chunk.HDHGU4L2.js.map → chunk.E3K6KM57.js.map} +0 -0
  195. /package/dist/esm/chunks/{chunk.PTEWJ5PZ.js.map → chunk.EQEMCHMB.js.map} +0 -0
  196. /package/dist/esm/chunks/{chunk.QBST3QSM.js.map → chunk.FEU4FTVQ.js.map} +0 -0
  197. /package/dist/esm/chunks/{chunk.ZN6U7WVM.js.map → chunk.FIZVVCUB.js.map} +0 -0
  198. /package/dist/esm/chunks/{chunk.BQRXAJTH.js.map → chunk.JFAOCIGZ.js.map} +0 -0
  199. /package/dist/esm/chunks/{chunk.4QVF44G5.js.map → chunk.K57IO236.js.map} +0 -0
  200. /package/dist/esm/chunks/{chunk.K2O3KSP7.js.map → chunk.KGMCBPGV.js.map} +0 -0
  201. /package/dist/esm/chunks/{chunk.V5L5DKNF.js.map → chunk.LFBYFJTX.js.map} +0 -0
  202. /package/dist/esm/chunks/{chunk.USKQFX4N.js.map → chunk.OBBYRQCY.js.map} +0 -0
  203. /package/dist/esm/chunks/{chunk.7NUOX3JD.js.map → chunk.OUORLMTZ.js.map} +0 -0
  204. /package/dist/esm/chunks/{chunk.DNWMURCG.js.map → chunk.RHXQ2GMV.js.map} +0 -0
  205. /package/dist/esm/chunks/{chunk.OLNY6ZNB.js.map → chunk.TLXWXBQO.js.map} +0 -0
  206. /package/dist/esm/chunks/{chunk.EPFMWAIO.js.map → chunk.TVWUZYVG.js.map} +0 -0
  207. /package/dist/esm/chunks/{chunk.32AY5G4D.js.map → chunk.W3DFKTAX.js.map} +0 -0
  208. /package/dist/esm/chunks/{chunk.ATJJ6NAY.js.map → chunk.WF24FWAT.js.map} +0 -0
  209. /package/dist/esm/chunks/{chunk.WVU4LCVC.js.map → chunk.XKX2BE6Z.js.map} +0 -0
  210. /package/dist/esm/chunks/{chunk.ZVHFSAID.js.map → chunk.YVXZ753Q.js.map} +0 -0
  211. /package/dist/esm/chunks/{chunk.QFMQPAT2.js.map → chunk.Z7Y2RA4P.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/select/select/select-constants.ts", "../../src/select/select/select-adapter.ts", "../../src/select/select/select-foundation.ts", "../../src/select/select/select.ts", "../../src/select/select/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}select`;\n\nconst classes = {\n ROOT: 'forge-select',\n OPENED: 'forge-select--opened',\n SELECTED_TEXT: 'forge-select__selected-text',\n DROPDOWN: 'forge-select__dropdown',\n LABEL_FLOAT: 'forge-select--label-float',\n GROUP_WRAPPER: 'forge-select__group-wrapper'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n SELECTED_TEXT: `.${classes.SELECTED_TEXT}`,\n LABEL: 'label#select-label',\n LEADING_SLOT: 'slot[name=leading]',\n ADDON_END_SLOT: 'slot[name=addon-end]'\n};\n\nconst attributes = {\n TYPE: 'type',\n VALUE: 'value',\n LABEL: 'label',\n MULTIPLE: 'multiple',\n DISABLED: 'disabled',\n PLACEHOLDER: 'placeholder',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold'\n};\n\nconst events = {\n SCROLLED_BOTTOM: `${elementName}-scrolled-bottom`\n};\n\nexport const SELECT_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events\n};\n\nexport {\n type FieldDensityType as SelectDensityType,\n type FieldFloatLabelType as SelectFloatLabelType,\n type FieldShapeType as SelectShapeType\n} from '../../field/field-constants';\n", "import { calculateFontWidth, getShadowElement, IFontInfo, toggleClass, toggleAttribute } from '@tylertech/forge-core';\nimport { FloatingLabel, IFloatingLabel } from '../../floating-label/floating-label';\nimport { ISelectComponent } from './select';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IBaseSelectAdapter, BaseSelectAdapter } from '../core';\nimport { IListDropdownConfig } from '../../list-dropdown/list-dropdown-constants';\nimport { FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport type OptionListenerDestructor = () => void;\n\nexport interface ISelectAdapter extends IBaseSelectAdapter {\n initializeFloatingLabel(): IFloatingLabel;\n initializeLabel(): void;\n hasLabel(): boolean;\n setLabel(value: string): void;\n addRootClass(name: string): void;\n removeRootClass(name: string): void;\n setPlaceholderText(value: string): void;\n setSelectedText(value: string): void;\n addMouseDownListener(listener: (evt: MouseEvent) => void): void;\n removeMouseDownListener(listener: (evt: MouseEvent) => void): void;\n setLeadingListener(listener: (evt: Event) => void): void;\n removeLeadingListener(listener: (evt: Event) => void): void;\n setAddonEndListener(listener: (evt: Event) => void): void;\n removeAddonEndListener(listener: (evt: Event) => void): void;\n hasLeadingElement(): boolean;\n setDisabled(isDisabled: boolean): void;\n setInvalid(isInvalid: boolean): void;\n setRequired(isRequired: boolean): void;\n setRoomy(isRoomy: boolean): void;\n setDense(isDense: boolean): void;\n getLabelWidth(fontSize: number, fontFamily: string): number;\n getLabelFontMetrics(): IFontInfo;\n getTargetWidth(): number;\n hasAddonEndNodes(): boolean;\n setFocus(): void;\n isWithinSelf(element: HTMLElement): boolean;\n}\n\n/**\n * The DOM adapter behind the `<forge-select>` component.\n */\nexport class SelectAdapter extends BaseSelectAdapter implements ISelectAdapter {\n private _selectElement: HTMLElement;\n private _labelElement: HTMLLabelElement;\n private _selectedTextElement: HTMLElement;\n private _leadingSlot: HTMLSlotElement;\n private _addonEndSlot: HTMLSlotElement;\n\n constructor(component: ISelectComponent) {\n super(component);\n this._selectElement = getShadowElement(component, SELECT_CONSTANTS.selectors.ROOT);\n this._leadingSlot = getShadowElement(component, SELECT_CONSTANTS.selectors.LEADING_SLOT) as HTMLSlotElement;\n this._addonEndSlot = getShadowElement(this._component, SELECT_CONSTANTS.selectors.ADDON_END_SLOT) as HTMLSlotElement;\n this._selectedTextElement = getShadowElement(component, SELECT_CONSTANTS.selectors.SELECTED_TEXT) as HTMLElement;\n this._targetElement = this._selectElement;\n }\n\n public initializeLabel(): void {\n this._labelElement = getShadowElement(this._component, SELECT_CONSTANTS.selectors.LABEL) as HTMLLabelElement;\n }\n\n public hasLabel(): boolean {\n return !!this._labelElement;\n }\n\n public initializeAccessibility(): void {\n this._component.setAttribute('role', 'combobox');\n this._component.setAttribute('aria-haspopup', 'true');\n this._component.setAttribute('aria-expanded', 'false');\n\n // We need to ensure the host element receives a non-negative tabindex for our interactions to work properly\n if (!this._component.hasAttribute('tabindex') || this._component.tabIndex === -1) {\n this._component.tabIndex = 0;\n }\n }\n\n public initializeFloatingLabel(): IFloatingLabel {\n return new FloatingLabel(this._labelElement);\n }\n\n public setLabel(value: string): void {\n if (!this._component.hasAttribute('aria-label') || this._component.getAttribute('aria-label') === this._labelElement.textContent) {\n this._component.setAttribute('aria-label', value);\n }\n this._labelElement.textContent = value;\n }\n\n public addRootClass(name: string): void {\n this._selectElement.classList.add(name);\n }\n\n public removeRootClass(name: string): void {\n this._selectElement.classList.remove(name);\n }\n\n public setPlaceholderText(value: string): void {\n toggleAttribute(this._selectedTextElement, !!value, 'placeholder', value);\n }\n\n public addClickListener(listener: (evt: Event) => void): void {\n this._component.addEventListener('click', listener);\n }\n\n public removeClickListener(listener: (evt: Event) => void): void {\n this._component.removeEventListener('click', listener);\n }\n\n public addMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.addEventListener('mousedown', listener);\n }\n\n public removeMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.removeEventListener('mousedown', listener);\n }\n\n public addTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.removeEventListener(type, listener);\n }\n\n public open(config: IListDropdownConfig): void {\n super.open(config);\n this._component.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n this._component.setAttribute('aria-expanded', 'true');\n toggleClass(this._selectElement, true, SELECT_CONSTANTS.classes.OPENED);\n }\n\n public close(): void {\n this._component.setAttribute('aria-expanded', 'false');\n this._component.removeAttribute('aria-activedescendant');\n this._component.removeAttribute('aria-controls');\n toggleClass(this._selectElement, false, SELECT_CONSTANTS.classes.OPENED);\n super.close();\n }\n\n public updateActiveDescendant(id: string): void {\n toggleAttribute(this._component, !!id, 'aria-activedescendant', id);\n }\n\n public setSelectedText(value: string): void {\n this._selectedTextElement.textContent = value;\n }\n\n public setLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.addEventListener('slotchange', listener);\n }\n\n public removeLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.removeEventListener('slotchange', listener);\n }\n\n public setAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.addEventListener('slotchange', listener);\n }\n\n public removeAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.removeEventListener('slotchange', listener);\n }\n\n public hasLeadingElement(): boolean {\n return this._leadingSlot.assignedNodes().length > 0;\n }\n\n public setDisabled(isDisabled: boolean): void {\n toggleClass(this._selectElement, isDisabled, FIELD_CONSTANTS.classes.DISABLED);\n toggleAttribute(this._component, isDisabled, 'aria-disabled', 'true');\n this._component.tabIndex = isDisabled ? -1 : 0;\n }\n\n public setInvalid(isInvalid: boolean): void {\n toggleClass(this._selectElement, isInvalid, FIELD_CONSTANTS.classes.INVALID);\n toggleAttribute(this._component, isInvalid, 'aria-invalid', 'true');\n }\n\n public setRequired(isRequired: boolean): void {\n toggleClass(this._selectElement, isRequired, FIELD_CONSTANTS.classes.REQUIRED);\n toggleAttribute(this._component, isRequired, 'aria-required', 'true');\n }\n\n public setRoomy(isRoomy: boolean): void {\n toggleClass(this._selectElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);\n }\n\n public setDense(isDense: boolean): void {\n toggleClass(this._selectElement, isDense, FIELD_CONSTANTS.classes.DENSE);\n }\n\n public setMultiple(multiple: boolean): void {\n if (multiple) {\n this.setHostAttribute('aria-multiselectable', 'true');\n } else {\n this.removeHostAttribute('aria-multiselectable');\n }\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 public getTargetWidth(): number {\n return this._selectElement.getBoundingClientRect().width;\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 setFocus(): void {\n this._component.focus();\n }\n\n public isWithinSelf(element: HTMLElement): boolean {\n const isShadowChild = !!this._component.shadowRoot && this._component.shadowRoot.contains(element);\n return isShadowChild || this._component.contains(element);\n }\n}\n", "import { isDefined, getEventPath } from '@tylertech/forge-core';\nimport { IBaseSelectFoundation, ISelectOption, BaseSelectFoundation } from '../core';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IFloatingLabel } from '../../floating-label';\nimport { ISelectAdapter } from './select-adapter';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport interface ISelectFoundation extends IBaseSelectFoundation {\n label: string;\n disabled: boolean;\n density: FieldDensityType;\n invalid: boolean;\n required: boolean;\n floatLabelType: FieldFloatLabelType;\n placeholder: string;\n}\n\n/**\n * The foundation class behind the `<forge-select>` component.\n */\nexport class SelectFoundation extends BaseSelectFoundation<ISelectAdapter> implements ISelectFoundation {\n private _floatingLabelInstance: IFloatingLabel | undefined;\n private _shape: FieldShapeType = 'default';\n private _label = '';\n private _disabled = false;\n private _invalid = false;\n private _required = false;\n private _floatLabelType: FieldFloatLabelType = 'auto';\n private _placeholder: string;\n private _density: FieldDensityType = 'default';\n private _isInitialized = false;\n private _leadingChangeListener: (evt: Event) => void;\n private _addonEndChangeListener: (evt: Event) => void;\n private _mousedownListener: (evt: MouseEvent) => void;\n\n constructor(adapter: ISelectAdapter) {\n super(adapter);\n this._leadingChangeListener = evt => this._onLeadingSlotChanged(evt);\n this._addonEndChangeListener = evt => this._onAddonEndSlotChanged(evt);\n this._targetWidthCallback = () => this._adapter.getTargetWidth();\n this._mousedownListener = evt => this._onMouseDown(evt);\n }\n\n public initialize(): void {\n super.initialize();\n super.initializeTarget();\n this._initializeLabel();\n this._initializeAccessibility();\n\n this._adapter.setPlaceholderText(this._placeholder);\n this._applyDensity();\n this._setShapeType();\n\n this._detectLeadingElement();\n this._detectAddonEndContent();\n this._adapter.addMouseDownListener(this._mousedownListener);\n this._adapter.setLeadingListener(this._leadingChangeListener);\n this._adapter.setAddonEndListener(this._addonEndChangeListener);\n\n if (this._disabled) {\n this._adapter.setDisabled(true);\n }\n\n if (this._invalid) {\n this._adapter.setInvalid(true);\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n super.disconnect();\n this._adapter.removeMouseDownListener(this._mousedownListener);\n this._adapter.removeLeadingListener(this._leadingChangeListener);\n this._adapter.removeAddonEndListener(this._leadingChangeListener);\n\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n private _initializeLabel(): void {\n this._adapter.initializeLabel();\n this._updateLabel();\n this._floatingLabelInstance = this._adapter.initializeFloatingLabel();\n if (this._floatLabelType === 'always') {\n this._floatLabel(true);\n } else {\n const hasText = !!this._getSelectedText();\n const hasPlaceholder = !!this._placeholder;\n this._floatLabel(hasText || hasPlaceholder);\n }\n }\n\n private _destroyLabel(): void {\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n protected _initializeValue(): void {\n super._initializeValue();\n if (this._selectedValues.length) {\n this._floatLabel(true);\n }\n }\n\n private _initializeAccessibility(): void {\n this._adapter.setMultiple(this._multiple);\n if (this._required) {\n this._adapter.setHostAttribute('aria-required', 'true');\n }\n if (this._disabled) {\n this._adapter.setHostAttribute('aria-disabled', 'true');\n }\n if (this._invalid) {\n this._adapter.setHostAttribute('aria-invalid', 'true');\n }\n }\n\n private _onMouseDown(evt: MouseEvent): void {\n const isElementWithinSelf = this._adapter.isWithinSelf(evt.target as HTMLElement);\n if (isElementWithinSelf) {\n evt.preventDefault();\n }\n }\n\n /** Called when the `slotchange` event fires on the \"leading\" slot element. */\n private _onLeadingSlotChanged(evt: Event): void {\n this._detectLeadingElement();\n }\n\n /** Called when the `slotchange` event fires on the \"addon-end\" slot element. */\n private _onAddonEndSlotChanged(evt: Event): void {\n this._detectAddonEndContent();\n }\n\n /** Updates the component state based on the existance of elements within the \"leading\" slot. */\n private _detectLeadingElement(): void {\n if (this._adapter.hasLeadingElement()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LEADING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LEADING);\n }\n }\n\n private _detectAddonEndContent(): void {\n if (this._adapter.hasAddonEndNodes()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n }\n }\n\n protected _onClick(evt: MouseEvent): void {\n if (this._disabled) {\n return;\n }\n\n // We ignore clicks events that originate from without our addon-end container\n const composedPath = getEventPath(evt);\n if (composedPath.find(el => el.classList && el.classList.contains(FIELD_CONSTANTS.classes.ADDON_END_CONTAINER))) {\n return;\n }\n\n this.setFocus();\n super._onClick(evt);\n }\n\n /** Handles receiving focus on the selected text element. */\n protected _onFocus(evt: Event): void {\n if (this._disabled) {\n return;\n }\n this._setFocused();\n super._onFocus(evt);\n }\n\n protected _floatLabel(value: boolean): void {\n if (!this._floatingLabelInstance) {\n return;\n }\n\n if (value) {\n this._adapter.addRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n } else {\n this._adapter.removeRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n }\n\n if (this._floatLabelType === 'always') {\n value = true;\n }\n\n this._floatingLabelInstance.float(value, this._floatLabelType === 'always');\n }\n\n /** Handles losing focus on the selected text element. */\n protected _onBlur(evt: FocusEvent): void {\n super._onBlur(evt);\n this._setBlurred();\n }\n\n protected _onDismiss(): void {\n super._onDismiss();\n this._setBlurred();\n }\n\n protected _onDropdownScrollEnd(): void {\n this._adapter.emitHostEvent(SELECT_CONSTANTS.events.SCROLLED_BOTTOM);\n }\n\n /**\n * Handles selecting an item in the dropdown.\n * @param {ISelectOption} option The selected option.\n * @param {number} optionIndex The index of the selected option.\n */\n protected async _onSelect(option: ISelectOption, optionIndex: number, closeDropdown = true): Promise<boolean> {\n const result = await super._onSelect(option, optionIndex, closeDropdown);\n if (result) {\n this._adapter.setSelectedText(this._getSelectedText());\n if (closeDropdown && !this._multiple) {\n this._adapter.setFocus();\n }\n }\n return result;\n }\n\n /** Updates the state of the component to contain focus. */\n private _setFocused(): void {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._floatLabel(true);\n }\n\n /** Updates the state of the component to not contain focus. */\n private _setBlurred(): void {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n if (!this._selectedValues.length && !this._placeholder?.length) {\n this._floatLabel(false);\n }\n }\n\n /** Resets the state of the component to original values. */\n protected _reset(): void {\n super._reset();\n this._adapter.setSelectedText('');\n this._floatLabel(!this._placeholder?.length);\n }\n\n private _updateLabel(): void {\n if (this._adapter.hasLabel()) {\n this._adapter.setLabel(this._label);\n }\n if (this._label && this._density !== 'dense') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LABEL);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);\n }\n }\n\n protected _applyValue(value: string | string[]): void {\n super._applyValue(value);\n\n // Update the state of the component based on the existence of a selected value\n const text = this._getSelectedText();\n this._adapter.setSelectedText(text);\n if (!this._open) {\n this._floatLabel(!!text || !!this._placeholder);\n }\n }\n\n private _applyDensity(): void {\n this._adapter.setRoomy(this._density === 'roomy');\n this._adapter.setDense(this._density === 'dense');\n }\n\n protected _setShapeType(): void {\n if (this._shape === 'rounded') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n }\n }\n\n public setFocus(): void {\n this._adapter.setFocus();\n }\n\n /** Gets/sets the label text. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value;\n this._updateLabel();\n if (this._label) {\n this._initializeLabel();\n this._adapter.setHostAttribute(SELECT_CONSTANTS.attributes.LABEL, this._label);\n } else {\n this._destroyLabel();\n this.required = false;\n this._adapter.removeHostAttribute(SELECT_CONSTANTS.attributes.LABEL);\n }\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 /** Gets/sets the disabled state. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._initializeLabel();\n }\n }\n\n /** Gets/sets the invalid state. */\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 this._adapter.setInvalid(this._invalid);\n }\n }\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\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 this._adapter.setRequired(this._required);\n this._adapter.toggleHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED, this._required);\n }\n }\n\n /** Gets/sets the dense state. */\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 this._applyDensity();\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());\n this._initializeLabel(); // This ensures label is removed while dense\n }\n }\n\n /** Gets/sets the floating label type. */\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 this._floatLabel(this._floatLabelType === 'always' || !!this._placeholder);\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE, isDefined(this._floatLabelType) ? this._floatLabelType.toString() : '');\n }\n }\n\n /** Gets/sets the placeholder text. */\n public get placeholder(): string {\n return this._placeholder;\n }\n public set placeholder(value: string) {\n if (this._placeholder !== value) {\n this._placeholder = value;\n this._adapter.setPlaceholderText(this._placeholder);\n this._initializeLabel();\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { tylIconArrowDropDown, tylIconCheckBoxOutlineBlank, tylIconCheckBox } from '@tylertech/tyler-icons/standard';\nimport { SelectAdapter } from './select-adapter';\nimport { SelectFoundation } from './select-foundation';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { OptionComponent } from '../option';\nimport { PopupComponent } from '../../popup';\nimport { ListComponent, ListItemComponent } from '../../list';\nimport { OptionGroupComponent } from '../option-group';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { BaseSelectComponent, BASE_SELECT_CONSTANTS } from '../core';\nimport { CircularProgressComponent } from '../../circular-progress';\nimport { ScaffoldComponent } from '../../scaffold';\nimport { ToolbarComponent } from '../../toolbar';\nimport { IconButtonComponent } from '../../icon-button';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\nimport { IBaseSelectComponent } from '../core/base-select';\n\nconst template = '<template><div class=\\\"forge-select__wrapper\\\" part=\\\"root\\\"><div class=\\\"forge-select forge-field\\\" part=\\\"container\\\"><div class=\\\"forge-select__leading-container\\\" part=\\\"leading-container\\\"><slot name=\\\"leading\\\"></slot></div><div class=\\\"forge-field__label-input-container\\\" part=\\\"label-input-container\\\"><div id=\\\"selected-text\\\" class=\\\"forge-select__selected-text\\\" part=\\\"text\\\" aria-live=\\\"assertive\\\" aria-atomic=\\\"true\\\"></div><label id=\\\"select-label\\\" aria-hidden=\\\"true\\\" part=\\\"label\\\"></label></div><forge-icon class=\\\"forge-select__dropdown-icon\\\" name=\\\"arrow_drop_down\\\" part=\\\"icon\\\"></forge-icon><div class=\\\"forge-field__addon-end-container\\\" part=\\\"addon-end-container\\\"><slot name=\\\"addon-end\\\"></slot></div></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-select{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-select-margin-top,0)}.forge-select.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-select:not(.forge-field--dense):not(.forge-field--roomy){height:3rem;height:var(--forge-select-height,3rem)}.forge-select.forge-field--roomy:not(.forge-field--dense){height:3.5rem;height:var(--forge-select-height,3.5rem)}.forge-select.forge-field--dense:not(.forge-field--roomy){height:1.5rem;height:var(--forge-select-height,1.5rem)}.forge-field::before{content:\\\"\\\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-style:var(--forge-select-border-style,solid);border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-select-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-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));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);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-select__leading-container{display:-webkit-box;display:flex;align-self:center}.forge-field label{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field label[dir=rtl],[dir=rtl] .forge-field label{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) label{display:none}.forge-field--required label::after{content:none}.forge-field--required label::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{font-size:1rem}.forge-field--roomy:not(.forge-field--dense) label{font-size:1rem}.forge-field--disabled label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) label{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{top:1rem}.forge-field--roomy:not(.forge-field--dense) label{top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) label{left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) label{left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) label{padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded label{padding-right:32px}.forge-field label.forge-floating-label--float-above{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled label.forge-floating-label--float-above{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) label.forge-floating-label--float-above{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label.forge-floating-label--float-above{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above{-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above{-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field .forge-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:block;overflow:hidden;text-overflow:ellipsis;align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;white-space:nowrap;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0;font-size:var(--forge-select-font-size, 1rem);padding:0 12px;padding-right:0}.forge-field:not(.forge-field--disabled) .forge-select__selected-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled .forge-select__selected-text{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{font-size:.875rem;font-size:var(--forge-select-font-size, .875rem)}.forge-field .forge-select__selected-text{padding:0 12px}.forge-field--label .forge-select__selected-text{padding-top:24px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-top:29px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-select__selected-text{padding-left:32px}.forge-field--leading .forge-select__selected-text{padding-left:0}.forge-field--label .forge-select__selected-text{padding-bottom:3px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-bottom:8px}.forge-field:not(.forge-field--label):not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height, 3rem)}.forge-field:not(.forge-field--label).forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{line-height:var(--forge-select-height-roomy, 3.5rem)}.forge-field:not(.forge-field--label).forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height-dense, 1.5rem)}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{padding:0 8px}.forge-field .forge-select__selected-text:empty::before{content:attr(placeholder);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field .forge-select--label .forge-select__selected-text{padding-top:25px}.forge-field .forge-select__dropdown-icon{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:24px;height:100%;-webkit-box-flex:0;flex:none;-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);pointer-events:none;margin-right:8px}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) .forge-select__dropdown-icon{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) .forge-select__dropdown-icon{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled .forge-select__dropdown-icon{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__dropdown-icon{margin-right:4px}:host{display:block;contain:layout}:host(:focus){outline:0}:host([hidden]){display:none}';\n\nexport interface ISelectComponent extends IBaseSelectComponent {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n label: string;\n disabled: boolean;\n placeholder: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-select': ISelectComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-select-scrolled-bottom': CustomEvent<void>;\n 'change': CustomEvent<any>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-select>` component.\n * \n * @tag forge-select\n */\n@CustomElement({\n name: SELECT_CONSTANTS.elementName,\n dependencies: [\n OptionComponent,\n OptionGroupComponent,\n PopupComponent,\n ListComponent,\n ListItemComponent,\n CircularProgressComponent,\n IconComponent,\n ScaffoldComponent,\n ToolbarComponent,\n IconButtonComponent\n ]\n})\nexport class SelectComponent extends BaseSelectComponent<SelectFoundation> implements ISelectComponent {\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 SELECT_CONSTANTS.attributes.LABEL,\n SELECT_CONSTANTS.attributes.MULTIPLE,\n SELECT_CONSTANTS.attributes.VALUE,\n SELECT_CONSTANTS.attributes.DISABLED,\n SELECT_CONSTANTS.attributes.PLACEHOLDER,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD,\n BASE_SELECT_CONSTANTS.attributes.POPUP_CLASSES,\n BASE_SELECT_CONSTANTS.attributes.OPTION_LIMIT,\n BASE_SELECT_CONSTANTS.attributes.SYNC_POPUP_WIDTH,\n BASE_SELECT_CONSTANTS.attributes.CONSTRAIN_POPUP_WIDTH,\n BASE_SELECT_CONSTANTS.attributes.WRAP_OPTION_TEXT\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define([tylIconArrowDropDown, tylIconCheckBox, tylIconCheckBoxOutlineBlank]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new SelectFoundation(new SelectAdapter(this));\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 return;\n case FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE:\n this.floatLabelType = newValue as FieldFloatLabelType;\n return;\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 return;\n case FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n return;\n case SELECT_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.PLACEHOLDER:\n this.placeholder = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the label text. */\n @FoundationProperty()\n public declare label: string;\n\n /** Gets/sets the disabled state. */\n @FoundationProperty()\n public declare disabled: boolean;\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public declare invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public declare required: boolean;\n\n /** Controls the density type. */\n @FoundationProperty()\n public declare density: FieldDensityType;\n\n /** Whether the label should always float, never float or float as the user types. */\n @FoundationProperty()\n public declare floatLabelType: FieldFloatLabelType;\n\n /** The shape type to use. */\n @FoundationProperty()\n public declare shape: FieldShapeType;\n\n /** Gets/sets the placeholder text. */\n @FoundationProperty()\n public declare placeholder: string;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SelectComponent } from './select';\n\nexport * from './select-adapter';\nexport * from './select-constants';\nexport * from './select-foundation';\nexport * from './select';\n\nexport function defineSelectComponent(): void {\n defineCustomElement(SelectComponent);\n}\n"],
5
- "mappings": "45BAEA,IAAMA,EAA2C,GAAGC,UAE9CC,EAAU,CACd,KAAM,eACN,OAAQ,uBACR,cAAe,8BACf,SAAU,yBACV,YAAa,4BACb,cAAe,6BACjB,EAEMC,EAAY,CAChB,KAAM,IAAID,EAAQ,OAClB,cAAe,IAAIA,EAAQ,gBAC3B,MAAO,qBACP,aAAc,qBACd,eAAgB,sBAClB,EAEME,EAAa,CACjB,KAAM,OACN,MAAO,QACP,MAAO,QACP,SAAU,WACV,SAAU,WACV,YAAa,cACb,eAAgB,iBAChB,yBAA0B,0BAC5B,EAEMC,EAAS,CACb,gBAAiB,GAAGL,mBACtB,EAEaM,EAAmB,CAC9B,YAAAN,EACA,QAAAE,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,CACF,ECAO,IAAME,EAAN,cAA4BC,CAA4C,CAO7E,YAAYC,EAA6B,CACvC,MAAMA,CAAS,EACf,KAAK,eAAiBC,EAAiBD,EAAWE,EAAiB,UAAU,IAAI,EACjF,KAAK,aAAeD,EAAiBD,EAAWE,EAAiB,UAAU,YAAY,EACvF,KAAK,cAAgBD,EAAiB,KAAK,WAAYC,EAAiB,UAAU,cAAc,EAChG,KAAK,qBAAuBD,EAAiBD,EAAWE,E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YACvB,aAAc,CACZS,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACF,CAAC,GACY5B,GCtDN,SAAS6B,IAA8B,CAC5CC,EAAoBC,CAAe,CACrC",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "events", "SELECT_CONSTANTS", "SelectAdapter", "BaseSelectAdapter", "component", "getShadowElement", "SELECT_CONSTANTS", "FloatingLabel", "value", "name", "toggleAttribute", "listener", "type", "config", "toggleClass", "id", "isDisabled", "FIELD_CONSTANTS", "isInvalid", "isRequired", "isRoomy", "isDense", "multiple", "fontSize", "fontFamily", "calculateFontWidth", "style", "element", "SelectFoundation", "BaseSelectFoundation", "adapter", "evt", "hasText", "hasPlaceholder", "FIELD_CONSTANTS", "getEventPath", "el", "value", "SELECT_CONSTANTS", "option", "optionIndex", "closeDropdown", "result", "_a", "text", "isDefined", "template", "styles", "SelectComponent", "BaseSelectComponent", "IconRegistry", "tylIconArrowDropDown", "tylIconCheckBox", "tylIconCheckBoxOutlineBlank", "attachShadowTemplate", "SelectFoundation", "SelectAdapter", "FIELD_CONSTANTS", "SELECT_CONSTANTS", "BASE_SELECT_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "OptionComponent", "OptionGroupComponent", "PopupComponent", "ListComponent", "ListItemComponent", "CircularProgressComponent", "IconComponent", "ScaffoldComponent", "ToolbarComponent", "IconButtonComponent", "defineSelectComponent", "defineCustomElement", "SelectComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as rt}from"./chunk.LIKJD4SK.js";import{d as at}from"./chunk.TDWRBHQW.js";import{a as f,b as nt}from"./chunk.EYGSUZWX.js";import{h as st}from"./chunk.LZOAYM6V.js";import{c as et}from"./chunk.4QVF44G5.js";import{e as tt}from"./chunk.MA2P7CG4.js";import{e as it}from"./chunk.WCSVKQR2.js";import{a as ot}from"./chunk.HDHGU4L2.js";import{a as C}from"./chunk.MV327MYK.js";import{j as K}from"./chunk.MZLPUI6R.js";import{a as F}from"./chunk.YI4JTY4T.js";import{a as Q,d as Z,l as E}from"./chunk.WHQZNZHW.js";import{a as $}from"./chunk.2KXSGD3S.js";import{g as J}from"./chunk.FVRSGKJD.js";import{j as b,k as X,n as G,o as q,p as Y,q as j}from"./chunk.U6WGJELL.js";import{a as W}from"./chunk.UWYANU5D.js";import{a as u}from"./chunk.KTGSZEAG.js";import{a as R,b as z}from"./chunk.DL7NX432.js";import{a as N,e as H,g as V,i as U,l as B}from"./chunk.LJLEPTLU.js";import{m as A,s as P,u as x}from"./chunk.4LA6HEA7.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as w,f as p}from"./chunk.MCIQXNKY.js";var h=`${z}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){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")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${C.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let a=document.createElement(C.elementName);a.slot="trailing",a.dense=!0,a.densityLevel=3,a.style.marginRight="4px";let r=document.createElement("button");r.type="button",r.tabIndex=-1,r.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",r.appendChild(d),a.appendChild(r),e.appendChild(a),this._toggleElement=a}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P(this._component.ownerDocument)===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function v(o,t,e){if(!o||/^\s*$/.test(o))return null;let i=0,n=0,a=0;if(b.test(o)){let r=G(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0}else if(X.test(o)){let r=q(o);i=+r.hours||0,n=+r.minutes||0,a=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+T(n)+(e?O(a):0)}function c(o,t,e){if(typeof o!="number"||o<0)return null;let i=Math.min(pt(o),23),n=Math.min(ut(o),59),r=o/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(o),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function pt(o){return Math.abs(Math.floor(o/(1e3*60*60)))}function ut(o){return Math.abs(Math.floor(I(o)%60))}function I(o){return o/(1e3*60)}function M(o){return Math.abs(Math.floor(It(o)%60))}function It(o){return o/1e3}function dt(o){return o*60*60*1e3}function T(o){return o*60*1e3}function O(o){return o*1e3}function ct(o){return o-O(M(o))}function S(o){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+T(i)+(o?O(t.getSeconds()):0)}function Rt(o,t,e=!1){o||(o=new Date);let i=v(t,!0,e);if(!i)return o.setHours(0,0,0),o;let n=pt(i),a=828e5;n>a?n=a:n<0&&(n=0);let r=ut(i),d=e?M(i):0;return o.setHours(n,r,d),o}var k=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let a=c(n,!0,this._allowSeconds);this._emitChangeEvent(a)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(ct(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);!this._emitChangeEvent(e)||(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(a=>!a.divider&&!a.disabled),i=[],n=0;if(t.length)if(this._value!=null){let a=this._findClosestOptionIndex(this._value,e);a>=0&&(e[a].value.time===this._value?i=[e[a].value]:n=a)}else if(typeof this._startTime=="number"){let a=this._findClosestOptionIndex(this._startTime,e);a>=0&&a<e.length&&(n=a)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:a=>this._onSelect(a),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:a=>this._adapter.setActiveDescendant(a),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=v(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,a)=>Math.abs((a.value.time||0)-t)<Math.abs((n.value.time||0)-t)?a:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(I(this._min),0):0,e=this._max!=null?Math.min(I(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],a=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=T(d),_t=this._restrictedTimes.includes(_),ht=c(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};a.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});a=[...a,...r]}return a.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),a.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),v(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new k(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([R({name:s.elementName,dependencies:[et,tt,ot,E,it,E,at]})],l);var mt=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){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.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,a,r,d;let i={props:w({},(a=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:a.props),options:w({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function xe(){N(l)}export{s as a,g as b,v as c,c as d,pt as e,ut as f,I as g,M as h,It as i,dt as j,T as k,O as l,ct as m,S as n,Rt as o,k as p,l as q,mt as r,xe as s};
7
- //# sourceMappingURL=chunk.HVYDNI2O.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/time-picker/time-picker-constants.ts", "../../src/time-picker/time-picker-adapter.ts", "../../src/time-picker/time-picker-utils.ts", "../../src/time-picker/time-picker-foundation.ts", "../../src/time-picker/time-picker.ts", "../../src/time-picker/time-picker-component-delegate.ts", "../../src/time-picker/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { IListDropdownOption } from '../list-dropdown/list-dropdown-constants';\nimport IMask, { Masked, InputMask } from 'imask';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}time-picker`;\n\nconst attributes = {\n TOGGLE: 'forge-time-picker-toggle',\n VALUE: 'value',\n OPEN: 'open',\n ALLOW_SECONDS: 'allow-seconds',\n MASKED: 'masked',\n SHOW_MASK_FORMAT: 'show-mask-format',\n USE_24_HOUR_TIME: 'use-24-hour-time',\n ALLOW_INVALID_TIME: 'allow-invalid-time',\n MIN: 'min',\n MAX: 'max',\n START_TIME: 'start-time',\n STEP: 'step',\n ALLOW_INPUT: 'allow-input',\n SHOW_NOW: 'show-now',\n SHOW_HOUR_OPTIONS: 'show-hour-options',\n DISABLED: 'disabled',\n POPUP_CLASSES: 'popup-classes',\n ALLOW_DROPDOWN: 'allow-dropdown'\n};\n\nconst selectors = {\n INPUT: 'input, input[forge-time-picker-input]',\n TOGGLE: `[${attributes.TOGGLE}]`\n};\n\nconst events = {\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`,\n CHANGE: `${elementName}-change`\n};\n\nconst numbers = {\n DEFAULT_MINUTE_STEP: 60,\n MAX_DAY_MILLIS: 86400000,\n MAX_DAY_MINUTES: 1440\n};\n\nexport const TIME_PICKER_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n events,\n numbers\n};\n\nexport type TimePickerValidationCallback = (time: string) => boolean;\nexport type TimePickerParseCallback = (time: string) => number | null;\nexport type TimePickerFormatCallback = (value: number | null) => string;\nexport type TimePickerCustomOptionCallback<T> = (value: T, use24HourTime: boolean, allowSeconds: boolean) => number;\nexport type TimePickerCoercionCallback = (rawValue: string, coercedValue: string, allowSeconds: boolean) => string;\nexport type TimePickerPrepareMaskCallback = (value: string, masked: Masked<string>, flags: IMask.AppendFlags, maskInstance: InputMask<IMask.AnyMaskedOptions>) => string;\n\nexport interface ITimePickerOption<T = any> extends IListDropdownOption<T> {\n toMilliseconds: TimePickerCustomOptionCallback<T>;\n}\nexport interface ITimePickerOptionValue {\n time: number | null;\n metadata?: any;\n isCustom?: boolean;\n customCallback?: TimePickerCustomOptionCallback<any>;\n}\n", "import { getShadowElement, emitEvent, getActiveElement, toggleAttribute } from '@tylertech/forge-core';\nimport { ITimePickerComponent } from './time-picker';\nimport { BaseAdapter } from '../core';\nimport { TIME_PICKER_CONSTANTS } from './time-picker-constants';\nimport { ITimeInputMaskOptions, TimeInputMask } from '../core/mask/time-input-mask';\nimport { TEXT_FIELD_CONSTANTS, ITextFieldComponent } from '../text-field';\nimport { ICON_BUTTON_CONSTANTS, IIconButtonComponent } from '../icon-button';\nimport { ICON_CONSTANTS, IIconComponent } from '../icon';\nimport { IListDropdownConfig, IListDropdownOption } from '../list-dropdown/list-dropdown-constants';\nimport { IListDropdown, ListDropdown } from '../list-dropdown';\n\nexport interface ITimePickerAdapter extends BaseAdapter<ITimePickerComponent> {\n initialize(): void;\n initializeMask(options: ITimeInputMaskOptions): void;\n destroy(): void;\n destroyMask(): void;\n initializeAccessibility(identifier: string): void;\n addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n addToggleListener(type: string, listener: (event: Event) => void): void;\n removeToggleListener(type: string, listener: (event: Event) => void): void;\n hasInputElement(): boolean;\n tryCreateToggle(): void;\n tryFocusInput(): void;\n tryBlurInput(): void;\n selectInputText(): void;\n getInputValue(): string;\n setInputValue(value: string, emitEvents: boolean): void;\n isInputDisabled(): boolean;\n isInputFocused(): boolean;\n setDisabled(isDisabled: boolean): void;\n attachDropdown(config: IListDropdownConfig): void;\n detachDropdown(): void;\n setActiveDescendant(id: string): void;\n propagateKey(key: string): void;\n getTargetElementWidth(selector: string): number;\n emitInputEvent(type: string, data?: any): void;\n setInputReadonly(value: boolean): void;\n setToggleDisabled(value: boolean): void;\n hasActiveOption(): boolean;\n activateOptionByIndex(index: number): void;\n activateFirstOption(): void;\n getActiveOption(): IListDropdownOption | undefined;\n}\n\nexport class TimePickerAdapter extends BaseAdapter<ITimePickerComponent> implements ITimePickerAdapter {\n private _inputElement: HTMLInputElement;\n private _toggleElement?: HTMLElement;\n private _inputMask?: TimeInputMask;\n private _listDropdown?: IListDropdown;\n private _targetElement?: HTMLElement;\n\n constructor(component: ITimePickerComponent) {\n super(component);\n }\n\n public initialize(): void {\n this._inputElement = this._component.querySelector(TIME_PICKER_CONSTANTS.selectors.INPUT) as HTMLInputElement;\n }\n\n public initializeMask(options: ITimeInputMaskOptions): void {\n this.destroyMask();\n this._inputMask = new TimeInputMask(this._inputElement, options);\n }\n\n public destroy(): void {\n this._targetElement = undefined;\n this._toggleElement = undefined as any;\n this._inputElement = undefined as any;\n }\n\n public destroyMask(): void {\n this._inputMask?.destroy();\n this._inputMask = undefined;\n }\n\n public initializeAccessibility(identifier: string): void {\n this._inputElement.setAttribute('autocomplete', 'off');\n this._inputElement.setAttribute('autocorrect', 'off');\n this._inputElement.setAttribute('autocapitalize', 'off');\n this._inputElement.setAttribute('spellcheck', 'false');\n this._inputElement.setAttribute('role', 'combobox');\n this._inputElement.setAttribute('aria-live', 'assertive');\n this._inputElement.setAttribute('aria-atomic', 'true');\n this._inputElement.setAttribute('aria-haspopup', 'true');\n this._inputElement.setAttribute('aria-expanded', 'false');\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._inputElement.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n if (this._inputElement) {\n this._inputElement.removeEventListener(type, listener, { capture });\n }\n }\n\n public addToggleListener(type: string, listener: (event: Event) => void): void {\n if (this._toggleElement) {\n this._toggleElement.addEventListener(type, listener);\n }\n }\n\n public removeToggleListener(type: string, listener: (event: Event) => void): void {\n if (this._toggleElement) {\n this._toggleElement.removeEventListener(type, listener);\n }\n }\n\n public hasInputElement(): boolean {\n return !!this._inputElement;\n }\n\n public tryCreateToggle(): void {\n const textField = this._component.querySelector(TEXT_FIELD_CONSTANTS.elementName) as ITextFieldComponent;\n const toggleElement = this._component.querySelector(TIME_PICKER_CONSTANTS.selectors.TOGGLE);\n if (textField) {\n const existingIconButton = textField.querySelector(`${ICON_BUTTON_CONSTANTS.elementName}[slot=trailing]`);\n if (existingIconButton || toggleElement) {\n this._toggleElement = (existingIconButton || toggleElement) as IIconButtonComponent;\n return;\n }\n\n const iconButtonElement = document.createElement(ICON_BUTTON_CONSTANTS.elementName) as IIconButtonComponent;\n iconButtonElement.slot = 'trailing';\n iconButtonElement.dense = true;\n iconButtonElement.densityLevel = 3;\n iconButtonElement.style.marginRight = '4px'; // Override default trailing slot margin in text-field\n\n const buttonElement = document.createElement('button');\n buttonElement.type = 'button';\n buttonElement.tabIndex = -1;\n buttonElement.setAttribute('aria-label', 'Toggle time dropdown');\n\n const iconElement = document.createElement(ICON_CONSTANTS.elementName) as IIconComponent;\n iconElement.name = 'clock_outline';\n buttonElement.appendChild(iconElement);\n iconButtonElement.appendChild(buttonElement);\n\n textField.appendChild(iconButtonElement);\n this._toggleElement = iconButtonElement;\n } else if (toggleElement) {\n this._toggleElement = toggleElement as HTMLElement;\n }\n }\n\n public tryFocusInput(): void {\n this._inputElement.select();\n }\n\n public tryBlurInput(): void {\n this._inputElement.blur();\n }\n\n public selectInputText(): void {\n this._inputElement.select();\n }\n\n public isInputDisabled(): boolean {\n return this._inputElement.disabled;\n }\n\n public isInputFocused(): boolean {\n const activeElement = getActiveElement(this._component.ownerDocument);\n return activeElement === this._inputElement;\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._inputElement.value === value) {\n return;\n }\n\n this._inputElement.value = value;\n\n if (this._inputMask) {\n this._inputMask.update();\n }\n\n if (emitEvents) {\n this._emitInputEvent('change');\n this._emitInputEvent('input');\n }\n }\n\n public getInputValue(): string {\n return this._inputMask ? this._inputMask.maskedValue : this._inputElement.value;\n }\n\n public setDisabled(isDisabled: boolean): void {\n this._inputElement.disabled = isDisabled;\n this._inputElement.setAttribute('aria-disabled', isDisabled.toString());\n this.setToggleDisabled(isDisabled);\n }\n\n public attachDropdown(config: IListDropdownConfig): void {\n this._listDropdown = new ListDropdown(this._inputElement, config);\n this._listDropdown.open();\n this._inputElement.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n }\n \n public detachDropdown(): void {\n if (this._listDropdown) {\n this._listDropdown.close();\n this._listDropdown.destroy();\n this._listDropdown = undefined;\n }\n this._inputElement.removeAttribute('aria-controls');\n }\n\n public propagateKey(key: string): void {\n this._listDropdown?.handleKey(key);\n }\n\n public setActiveDescendant(id: string): void {\n toggleAttribute(this._inputElement, !!id, 'aria-activedescendant', id);\n }\n\n public getTargetElementWidth(selector: string): number {\n const targetElement = this._getTargetElement(selector);\n return targetElement.getBoundingClientRect().width;\n }\n\n private _emitInputEvent(type: string): void {\n this._inputElement.dispatchEvent(new Event(type));\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._inputElement, type, data);\n }\n\n public setInputReadonly(value: boolean): void {\n this._inputElement.readOnly = value;\n }\n\n public setToggleDisabled(value: boolean): void {\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', value.toString());\n if ('disabled' in this._toggleElement) {\n (this._toggleElement as HTMLButtonElement).disabled = value;\n } else {\n const button = this._toggleElement.querySelector('button') as HTMLButtonElement;\n if (button) {\n button.disabled = value;\n }\n }\n }\n }\n\n public hasActiveOption(): boolean {\n return (this._listDropdown?.getActiveOptionIndex() ?? -1) >= 0;\n }\n\n public activateOptionByIndex(index: number): void {\n this._listDropdown?.activateOption(index);\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public getActiveOption(): IListDropdownOption | undefined {\n return this._listDropdown?.getActiveOption();\n }\n\n private _getTargetElement(selector?: string): HTMLElement {\n if (this._targetElement) {\n return this._targetElement;\n }\n this._targetElement = selector ? this._component.querySelector(selector) as HTMLElement || this._getDefaultTargetElement() : this._getDefaultTargetElement();\n return this._targetElement;\n }\n\n private _getDefaultTargetElement(): HTMLElement {\n // This component is often used with the text-field, if so, let's target our popup around one if its internal elements for proper alignnment\n const textField = this._component.querySelector(TEXT_FIELD_CONSTANTS.elementName) as HTMLElement;\n if (textField && textField.shadowRoot) {\n const textFieldRoot = getShadowElement(textField, TEXT_FIELD_CONSTANTS.selectors.ROOT) as HTMLElement;\n if (textFieldRoot) {\n return textFieldRoot;\n }\n }\n return this._component; // Otherwise we just use the time-picker host as the target\n }\n}\n", "import { tokenize24HourTimeString, tokenize12HourTimeString, TWENTY_FOUR_HOUR_TIME_REGEX, TWELVE_HOUR_TIME_REGEX } from '../core/utils/time-utils';\n\nexport function timeStringToMillis(time: string | null, use24HourTime: boolean, allowSeconds: boolean): number | null {\n if (!time || /^\\s*$/.test(time)) {\n return null;\n }\n\n let hours = 0;\n let minutes = 0;\n let seconds = 0;\n\n if (TWENTY_FOUR_HOUR_TIME_REGEX.test(time)) {\n const tokens = tokenize24HourTimeString(time);\n hours = +tokens.hours || 0;\n minutes = +tokens.minutes || 0;\n seconds = +tokens.seconds || 0;\n } else if (TWELVE_HOUR_TIME_REGEX.test(time)) {\n const tokens = tokenize12HourTimeString(time);\n hours = +tokens.hours || 0;\n minutes = +tokens.minutes || 0;\n seconds = +tokens.seconds || 0;\n if (hours === 12 && tokens.meridiem === 'AM') {\n hours = 0;\n }\n if (hours < 12 && tokens.meridiem === 'PM') {\n hours += 12;\n }\n } else {\n return null;\n }\n\n return hoursToMillis(hours) + minutesToMillis(minutes) + (allowSeconds ? secondsToMillis(seconds) : 0);\n}\n\nexport function millisToTimeString(value: number | null | undefined, use24HourTime: boolean, allowSeconds: boolean): string | null {\n if (typeof value !== 'number' || value < 0) {\n return null;\n }\n\n let hours = Math.min(millisToHours(value), 23);\n const minutes = Math.min(millisToMinutesClamped(value), 59);\n const totalMinutes = value / (1000 * 60);\n const meridiem = totalMinutes < 720 ? 'AM' : 'PM';\n\n if (!use24HourTime) {\n hours = hours <= 12 ? hours : hours - 12;\n if (hours === 0) {\n hours = 12;\n }\n }\n\n let time = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`;\n\n if (allowSeconds) {\n const seconds = Math.min(millisToSecondsClamped(value), 59);\n time += `:${String(seconds).padStart(2, '0')}`;\n }\n\n if (!use24HourTime) {\n time += ` ${meridiem}`;\n }\n\n return time;\n}\n\nexport function millisToHours(millis: number): number {\n return Math.abs(Math.floor(millis / (1000 * 60 * 60)));\n}\n\nexport function millisToMinutesClamped(millis: number): number {\n return Math.abs(Math.floor(millisToMinutes(millis) % 60));\n}\n\nexport function millisToMinutes(millis: number): number {\n return millis / (1000 * 60);\n}\n\nexport function millisToSecondsClamped(millis: number): number {\n return Math.abs(Math.floor(millisToSeconds(millis) % 60));\n}\n\nexport function millisToSeconds(millis: number): number {\n return millis / 1000;\n}\n\nexport function hoursToMillis(hours: number): number {\n return hours * 60 * 60 * 1000;\n}\n\nexport function minutesToMillis(minutes: number): number {\n return minutes * 60 * 1000;\n}\n\nexport function secondsToMillis(seconds: number): number {\n return seconds * 1000;\n}\n\nexport function stripSecondsFromMillis(millis: number): number {\n return millis - secondsToMillis(millisToSecondsClamped(millis));\n}\n\nexport function getCurrentTimeOfDayMillis(allowSeconds: boolean): number {\n const date = new Date();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n return hoursToMillis(hours) + minutesToMillis(minutes) + (allowSeconds ? secondsToMillis(date.getSeconds()) : 0);\n}\n\n/**\n * Combines a `Date` object with a 24-hour time string from the time-picker component.\n * @param date The `Date` object to adjust.\n * @param time The 24-hour time string.\n * @param useSeconds If your 24-hour time string contains seconds, set this to `true`.\n * @returns The same `Date` object that was provided, with the newly adjusted time.\n */\nexport function mergeDateWithTime(date: Date, time: string, useSeconds = false): Date {\n if (!date) {\n date = new Date();\n }\n\n const millis = timeStringToMillis(time, true, useSeconds);\n if (!millis) {\n date.setHours(0, 0, 0);\n return date;\n }\n\n let hours = millisToHours(millis);\n \n const twentyThreeHoursInMillis = 82800000;\n if (hours > twentyThreeHoursInMillis) {\n hours = twentyThreeHoursInMillis;\n } else if (hours < 0) {\n hours = 0;\n }\n\n const minutes = millisToMinutesClamped(millis);\n const seconds = useSeconds ? millisToSecondsClamped(millis) : 0;\n date.setHours(hours, minutes, seconds);\n\n return date;\n}\n", "import { ICustomElementFoundation, Platform, debounce, randomChars } from '@tylertech/forge-core';\nimport { ITimePickerAdapter } from './time-picker-adapter';\nimport { ITimeInputMaskOptions } from '../core/mask/time-input-mask';\nimport { isSupportedTimeFormat, TWENTY_FOUR_HOUR_TIME_REGEX, tryCoerceTimeString } from '../core/utils/time-utils';\nimport {\n TIME_PICKER_CONSTANTS,\n ITimePickerOptionValue,\n ITimePickerOption,\n TimePickerValidationCallback,\n TimePickerParseCallback,\n TimePickerFormatCallback,\n TimePickerCoercionCallback,\n TimePickerPrepareMaskCallback\n} from './time-picker-constants';\nimport { IListDropdownConfig, ListDropdownType, IListDropdownOption } from '../list-dropdown/list-dropdown-constants';\nimport { timeStringToMillis, millisToTimeString, minutesToMillis, getCurrentTimeOfDayMillis, millisToMinutes, stripSecondsFromMillis } from './time-picker-utils';\n\nexport interface ITimePickerFoundation extends ICustomElementFoundation {\n value: string | null | undefined;\n open: boolean;\n allowSeconds: boolean;\n masked: boolean;\n showMaskFormat: boolean;\n use24HourTime: boolean;\n allowInvalidTime: boolean;\n min: string | null | undefined;\n max: string | null | undefined;\n restrictedTimes: string[];\n startTime: string | null | undefined;\n step: number;\n allowInput: boolean;\n showNow: boolean;\n showHourOptions: boolean;\n customOptions: ITimePickerOption[];\n validationCallback: TimePickerValidationCallback;\n parseCallback: TimePickerParseCallback;\n formatCallback: TimePickerFormatCallback;\n coercionCallback: TimePickerCoercionCallback;\n prepareMaskCallback: TimePickerPrepareMaskCallback;\n disabled: boolean;\n popupClasses: string | string[];\n allowDropdown: boolean;\n}\n\nexport class TimePickerFoundation implements ITimePickerFoundation {\n // State vars\n private _value?: number | null = null;\n private _masked = true;\n private _use24HourTime = false;\n private _showMaskFormat = false;\n private _min?: number | null = null;\n private _max?: number | null = null;\n private _restrictedTimes: number[] = [];\n private _startTime?: number | null = null;\n private _step = TIME_PICKER_CONSTANTS.numbers.DEFAULT_MINUTE_STEP;\n private _allowInput = true;\n private _identifier: string;\n private _open = false;\n private _allowSeconds = false;\n private _allowInvalidTime = false;\n private _popupTarget: string;\n private _showNow = false;\n private _showHourOptions = true;\n private _customOptions: ITimePickerOption[] = [];\n private _validationCallback: TimePickerValidationCallback;\n private _parseCallback: TimePickerParseCallback;\n private _formatCallback: TimePickerFormatCallback;\n private _coercionCallback: TimePickerCoercionCallback;\n private _prepareMaskCallback: TimePickerPrepareMaskCallback;\n private _disabled = false;\n private _popupClasses: string[] = [];\n private _allowDropdown = true;\n \n // Internal state vars\n private _isInitialized = false;\n private _dropdownConfig: IListDropdownConfig<ITimePickerOptionValue> | undefined;\n\n // Listeners\n private _inputListener: (evt: Event) => void;\n private _inputKeydownListener: (evt: KeyboardEvent) => void;\n private _toggleMousedownListener: (evt: MouseEvent) => void;\n private _inputFocusListener: (evt: Event) => void;\n private _inputBlurListener: (evt: Event) => void;\n private _inputMousedownListener: (evt: MouseEvent) => void;\n \n constructor(private _adapter: ITimePickerAdapter) {\n this._identifier = randomChars(); // This is a unique identifier for this instance of the time picker (used for a11y purposes)\n\n // Set up listeners\n this._inputListener = evt => this._onInput(evt);\n this._inputKeydownListener = evt => this._onInputKeydown(evt);\n this._toggleMousedownListener = evt => this._onToggleMousedown(evt);\n this._inputFocusListener = evt => this._onInputFocus(evt);\n this._inputBlurListener = evt => this._onInputBlur(evt);\n this._inputMousedownListener = evt => this._onInputMousedown(evt);\n }\n\n public initialize(): void {\n this._adapter.initialize();\n \n // We require an input element to be a child of this component\n if (!this._adapter.hasInputElement()) {\n throw new Error('Unable to locate <input> element to attach to.');\n }\n\n this._adapter.initializeAccessibility(this._identifier);\n\n // Detect if a value already exists in the input and set our values based on that\n if (!this._value) {\n const inputValue = this._adapter.getInputValue();\n this._setValue(this._convertTimeStringToMillis(inputValue, this._use24HourTime, this._allowSeconds));\n }\n\n // Attach required listeners\n this._adapter.addInputListener('focus', this._inputFocusListener);\n this._adapter.addInputListener('blur', this._inputBlurListener);\n this._adapter.addInputListener('keydown', this._inputKeydownListener, true);\n\n // Ensure our input has the correct time format (make sure not to emit input events manually at this point)\n this._formatInputValue(false);\n\n // Apply our state\n if (typeof this._value === 'number') {\n this._applyValue(this._value, false);\n }\n this._applyAllowInput();\n this._applyAllowDropdown();\n this._applyDisabled();\n this._applyMask();\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n\n // Remove listeners\n this._adapter.removeInputListener('input', this._inputListener);\n this._adapter.removeInputListener('focus', this._inputFocusListener);\n this._adapter.removeInputListener('blur', this._inputBlurListener);\n this._adapter.removeToggleListener('mousedown', this._toggleMousedownListener);\n this._adapter.removeInputListener('keydown', this._inputKeydownListener, true);\n\n // If we are using an input mask, let's destroy that now\n if (this._masked) {\n this._adapter.destroyMask();\n }\n\n // Ensure we remove our dropdown\n this._closeDropdown();\n\n // Cleanup any resources used in the adapter\n this._adapter.destroy();\n }\n\n /** Called when the input mask changes or the `input` event occurs on our `<input>` element. */\n private _onInput(evt: Event): void {\n this._handleInput(this._adapter.getInputValue());\n }\n\n private _onInputKeydown(evt: KeyboardEvent): void {\n if (evt.shiftKey) {\n switch (evt.code) {\n case 'Backspace':\n case 'Delete':\n evt.preventDefault();\n const result = this._trySetValue(null);\n if (result) {\n this._formatInputValue();\n }\n return;\n }\n }\n\n switch (evt.code) {\n case 'Tab':\n if (this._open) {\n this._selectActiveOption();\n }\n break;\n case 'Esc':\n case 'Escape':\n if (this._open) {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeDropdown(true);\n }\n break;\n case 'Down':\n case 'ArrowDown':\n if (this._allowDropdown) {\n evt.preventDefault();\n if (!this._open) {\n this._openDropdown();\n if (typeof this._dropdownConfig?.visibleStartIndex === 'number' && this._dropdownConfig.visibleStartIndex >= 0) {\n this._adapter.activateOptionByIndex(this._dropdownConfig?.visibleStartIndex);\n } else {\n this._adapter.activateFirstOption();\n }\n // TODO: Should we cycle the hours, minutes, seconds, or meridiem where the cursor is instead of opening the dropdown?\n } else {\n if (!this._adapter.hasActiveOption()) {\n this._trySetActiveOption();\n } else {\n this._adapter.propagateKey(evt.code);\n }\n }\n }\n break;\n case 'ArrowUp':\n if (this._allowDropdown) {\n evt.preventDefault();\n if (this._open) {\n if (!this._adapter.hasActiveOption()) {\n this._trySetActiveOption();\n } else {\n this._adapter.propagateKey(evt.code);\n }\n } else {\n // TODO: cycle the hours, minutes, seconds, or meridiem where the cursor is\n }\n }\n break;\n case 'Enter':\n case 'NumpadEnter':\n case 'Home':\n case 'End':\n if (this._open) {\n if (evt.code === 'Enter' || evt.code === 'NumpadEnter') {\n evt.stopPropagation();\n }\n evt.preventDefault();\n this._adapter.propagateKey(evt.code);\n }\n break;\n case 'KeyN':\n evt.preventDefault();\n const nowMillis = getCurrentTimeOfDayMillis(this._allowSeconds);\n if (this._value !== nowMillis) {\n const timeString = millisToTimeString(nowMillis, true, this._allowSeconds);\n const canContinue = this._emitChangeEvent(timeString);\n if (canContinue) {\n this._applyValue(nowMillis);\n this._selectInputText();\n }\n }\n break;\n }\n }\n\n private _trySetActiveOption(): void {\n if (!this._adapter.hasActiveOption() && typeof this._dropdownConfig?.visibleStartIndex === 'number' && this._dropdownConfig.visibleStartIndex >= 0) {\n this._adapter.activateOptionByIndex(this._dropdownConfig?.visibleStartIndex);\n }\n }\n\n private _selectActiveOption(): void {\n const activeOption = this._adapter.getActiveOption();\n if (activeOption) {\n this._onSelect(activeOption.value);\n }\n }\n\n private _onToggleMousedown(evt: Event): void {\n if (this._disabled || !this.allowDropdown) {\n return;\n }\n\n evt.stopPropagation();\n\n if (this._adapter.isInputDisabled()) {\n return;\n }\n\n evt.preventDefault();\n\n if (this._open) {\n this._closeDropdown(true);\n } else {\n if (!Platform.isMobile) {\n this._adapter.tryFocusInput();\n } else {\n this._adapter.tryBlurInput();\n }\n this._openDropdown();\n }\n }\n\n private _onInputFocus(evt: Event): void {\n if (this.masked && this._showMaskFormat) {\n this._applyMask();\n }\n\n if (this._allowInput) {\n this._adapter.selectInputText();\n }\n }\n\n private _onInputBlur(evt: Event): void {\n if (this.masked && this._showMaskFormat) {\n this._applyMask();\n }\n\n this._formatInputValue();\n\n if (this._open && !this._adapter.isInputFocused()) {\n this._closeDropdown(true);\n }\n }\n\n private _onInputMousedown(evt: MouseEvent): void {\n if (!this._allowInput && !this._open) {\n this._openDropdown();\n this._adapter.tryFocusInput();\n window.requestAnimationFrame(() => this._adapter.selectInputText());\n }\n }\n\n private _applyDisabled(): void {\n this._adapter.setDisabled(this._disabled);\n }\n\n private _applyMask(): void {\n if (this._masked && this._allowInput) {\n this._adapter.destroyMask();\n const options: ITimeInputMaskOptions = {\n showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),\n use24HourTime: this._use24HourTime,\n showSeconds: this._allowSeconds,\n prepareCallback: this._prepareMaskCallback,\n onChange: debounce((value: string) => this._handleInput(value), 0, true) // debounce this to avoid multiple callbacks for same value\n };\n this._adapter.initializeMask(options);\n } else {\n this._adapter.destroyMask();\n this._formatInputValue();\n }\n }\n\n private _applyAllowInput(): void {\n this._adapter.setInputReadonly(!this._allowInput);\n if (this._allowInput) {\n this._adapter.removeInputListener('mousedown', this._inputMousedownListener);\n // If not using an input mask we need to attach our own `input` listener, otherwise\n // we use the mask to notify us of changes\n if (!this._masked) {\n this._adapter.addInputListener('input', this._inputListener);\n }\n } else {\n this._adapter.addInputListener('mousedown', this._inputMousedownListener);\n this._adapter.removeInputListener('input', this._inputListener);\n }\n }\n\n private _applyAllowDropdown(): void {\n this._adapter.setToggleDisabled(!this._allowDropdown);\n if (this._allowDropdown) {\n this._adapter.removeToggleListener('mousedown', this._toggleMousedownListener);\n this._adapter.tryCreateToggle();\n this._adapter.addToggleListener('mousedown', this._toggleMousedownListener);\n } else if (this._open) {\n this._closeDropdown(true);\n }\n }\n\n private _applyAllowSeconds(): void {\n const originalValue = this._value;\n if (!this._allowSeconds) {\n // If we are not using seconds, we need to remove our seconds from the value\n if (typeof this._value !== 'number') {\n return;\n }\n\n this._setValue(stripSecondsFromMillis(this._value));\n\n if (this._isInitialized && originalValue !== this._value) {\n // We need to emit a change event with our new value which does not include the seconds\n const timeString = millisToTimeString(this._value, true, false);\n this._emitChangeEvent(timeString);\n }\n } else if (this._isInitialized && originalValue !== this._value) {\n // We need to emit a change event with our new value which includes the seconds\n const timeString = millisToTimeString(this._value, true, true);\n this._emitChangeEvent(timeString);\n }\n }\n\n private _handleInput(value: string): void {\n const rawValue = value;\n\n if (!this._allowInput) {\n return;\n }\n\n if (this._open) {\n this._closeDropdown(true);\n }\n\n // Let's attempt to coerce our time string into a known format to help with ease of entry\n value = tryCoerceTimeString(value, this._use24HourTime, this._allowSeconds);\n\n // If we were provided a custom coercion callback then we need to call that now to perform any further coercion by the consumer\n if (typeof this._coercionCallback === 'function') {\n value = this._coercionCallback.call(null, rawValue, value, this._allowSeconds);\n }\n\n // Validate the time format and make sure it's supported\n if (!this._isValidTimeFormat(value)) {\n value = '';\n }\n\n // Convert the time string to milliseconds\n let millis: number | null | undefined;\n if (!this._masked && typeof this._parseCallback === 'function') {\n millis = this._parseCallback.call(null, value);\n } else {\n millis = this._convertTimeStringToMillis(value, this._use24HourTime, this._allowSeconds);\n }\n\n // Validate that our time can be chosen as a valid value\n millis = this._validateMillis(millis);\n\n // Update our value\n this._trySetValue(millis);\n }\n\n private _emitChangeEvent(value: string | null, force = false): boolean {\n return this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.CHANGE, value, true, !force);\n }\n\n private _trySetValue(millis: number | null | undefined): boolean {\n // If our value hasn't changed, we can just return\n if (millis === this._value) {\n return false;\n }\n\n // Convert our milliseconds to a 24-hour time string to use as our normalized value\n const timeString = millisToTimeString(millis, true, this._allowSeconds);\n\n // Dispatch our custom input event to let consumers know raw input occurred (before our change event)\n this._adapter.emitInputEvent(TIME_PICKER_CONSTANTS.events.INPUT, timeString);\n\n // Only emit our change event if the value is different\n if (this._value !== millis) {\n const canContinue = this._emitChangeEvent(timeString);\n if (canContinue) {\n this._setValue(millis);\n return true;\n }\n }\n\n return false;\n }\n\n private _setValue(value: number | null | undefined): void {\n this._value = this._normalizeTimeValue(value);\n }\n\n private _validateMillis(millis: number | null | undefined): number | null | undefined {\n // Trap for min/max validation\n if (typeof millis === 'number') {\n const isBelowMin = typeof this._min === 'number' && millis < this._min;\n const isAboveMax = typeof this._max === 'number' && millis > this._max;\n if (isBelowMin || isAboveMax) {\n millis = null;\n }\n }\n \n // Trap for restricted times\n if (typeof millis === 'number' && this._restrictedTimes.length) {\n if (this._restrictedTimes.includes(millis)) {\n millis = null;\n }\n }\n\n return millis;\n }\n\n private _isValidTimeFormat(value: string): boolean {\n if (!this._masked && typeof this._validationCallback === 'function') {\n return this._validationCallback.call(this, value);\n }\n return isSupportedTimeFormat(value);\n }\n\n private _isValidInputValue(value: string): boolean {\n return TWENTY_FOUR_HOUR_TIME_REGEX.test(value);\n }\n\n private _onSelect(value: ITimePickerOptionValue): void {\n this._closeDropdown(true);\n\n // Check if the \"Now\" option was selected\n if (!value.isCustom && value.metadata === 'now') {\n value.time = getCurrentTimeOfDayMillis(this._allowSeconds);\n }\n\n // Check if this is a custom option, and then call the provided callback for it\n if (value.isCustom) {\n if (typeof value.customCallback === 'function') {\n const result = value.customCallback.call(null, value.metadata);\n if (typeof result !== 'number') {\n throw new Error('Custom options must provide a time of day value in milliseconds.');\n }\n value.time = result;\n } else {\n throw new Error('You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.');\n }\n }\n\n // Make sure the time is different than what is already populated or we can just return\n if (this._value === value.time) {\n return;\n }\n\n // Emit the change event\n const timeString = millisToTimeString(value.time, true, this._allowSeconds);\n const canContinue = this._emitChangeEvent(timeString);\n if (!canContinue) {\n return;\n }\n\n // This will update our state and the UI at once\n this._applyValue(value.time);\n\n // Select full input text\n this._selectInputText();\n }\n\n private _selectInputText(): void {\n // We need to select the text of the input in the next cycle to allow time for the UI to update\n // with the selected text (assuming it still has focus)\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n if (this._adapter.isInputFocused()) {\n this._adapter.selectInputText();\n }\n });\n });\n }\n\n private _applyValue(value: number | null | undefined, emitEvents = true): void {\n this._setValue(value);\n const formattedValue = this._formatValue(this._value);\n if (this._adapter.getInputValue() !== formattedValue) {\n this._adapter.setInputValue(formattedValue, emitEvents);\n }\n }\n\n private _normalizeTimeValue(value: number | null | undefined): number | null {\n if (value == null) {\n return null;\n } else if (value < 0) {\n return 0;\n } else if (value > TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MILLIS) {\n return TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MILLIS;\n }\n return value;\n }\n\n private _openDropdown(): void {\n const options = this._generateTimeOptions();\n\n if (!this.allowDropdown || !options.length) {\n return;\n }\n \n this._formatInputValue();\n this._open = true;\n this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.OPEN);\n \n const selectableOptions = options.filter(o => !o.divider && !o.disabled);\n let selectedValues: ITimePickerOptionValue[] = [];\n let visibleStartIndex = 0;\n \n // Find closest match in list of time options and activate/select it\n if (options.length) {\n if (this._value != null) {\n const optionIndex = this._findClosestOptionIndex(this._value, selectableOptions);\n if (optionIndex >= 0) {\n const isExactMatch = selectableOptions[optionIndex].value.time === this._value;\n if (isExactMatch) {\n selectedValues = [selectableOptions[optionIndex].value];\n } else {\n visibleStartIndex = optionIndex;\n }\n }\n } else if (typeof this._startTime === 'number') {\n const optionIndex = this._findClosestOptionIndex(this._startTime, selectableOptions);\n if (optionIndex >= 0 && optionIndex < selectableOptions.length) {\n visibleStartIndex = optionIndex;\n }\n } else if (this._startTime == null) {\n // If we don't have a start time set then let's scroll the closest time to current time into view\n visibleStartIndex = this._getOptionIndexClosestCurrent(selectableOptions);\n }\n }\n\n this._dropdownConfig = {\n id: `forge-time-picker-${this._identifier}`,\n selectedValues,\n syncWidth: true,\n visibleStartIndex,\n popupClasses: this._popupClasses,\n popupStatic: true,\n type: ListDropdownType.Standard,\n options,\n selectCallback: value => this._onSelect(value),\n closeCallback: () => this._closeDropdown(true),\n activeChangeCallback: id => this._adapter.setActiveDescendant(id),\n targetWidthCallback: () => this._adapter.getTargetElementWidth(this._popupTarget)\n };\n this._adapter.attachDropdown(this._dropdownConfig);\n this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n private _closeDropdown(emitCloseEvent = false): void {\n this._open = false;\n this._dropdownConfig = undefined;\n this._adapter.removeHostAttribute(TIME_PICKER_CONSTANTS.attributes.OPEN);\n this._adapter.detachDropdown();\n if (emitCloseEvent) {\n this._adapter.emitHostEvent(TIME_PICKER_CONSTANTS.events.CLOSE, true, false);\n }\n }\n\n private _getOptionIndexClosestCurrent(options: IListDropdownOption<ITimePickerOptionValue>[]): number {\n const date = new Date();\n const currentTimeString = `${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`;\n const currentTimeMillis = timeStringToMillis(currentTimeString, true, false) as number;\n return this._findClosestOptionIndex(currentTimeMillis, options);\n }\n\n private _findClosestOptionIndex(value: number, options: Array<IListDropdownOption<ITimePickerOptionValue>>): number {\n const closestItem = options.reduce((prev, curr) => {\n return Math.abs((curr.value.time || 0) - value) < Math.abs((prev.value.time || 0) - value) ? curr : prev;\n });\n return options.indexOf(closestItem);\n }\n\n private _formatInputValue(emitEvents = true): void {\n const inputValue = this._adapter.getInputValue();\n \n // If we allow invalid times, we can leave the input value as-is (only when unmasked)\n if (this._allowInvalidTime && !this._masked && inputValue && !this._value) {\n return;\n }\n\n const formattedValue = this._formatValue(this._value);\n \n if (inputValue !== formattedValue) {\n this._adapter.setInputValue(formattedValue, emitEvents);\n this._adapter.emitInputEvent(TIME_PICKER_CONSTANTS.events.INPUT, formattedValue);\n }\n }\n\n private _generateTimeOptions(): Array<IListDropdownOption<ITimePickerOptionValue>> {\n const minMinutes = this._min != null ? Math.max(millisToMinutes(this._min), 0) : 0;\n const maxMinutes = this._max != null ? Math.min(millisToMinutes(this._max), TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) : TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES;\n const minuteStep = this._step;\n const times: IListDropdownOption[] = [];\n let leadingOptions: IListDropdownOption[] = [];\n \n if (this._showHourOptions) {\n for (let totalMinutes = minMinutes; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {\n if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {\n break;\n }\n const millis = minutesToMillis(totalMinutes);\n const disabled = this._restrictedTimes.includes(millis);\n const label = millisToTimeString(millis, this._use24HourTime, false) || '';\n const value: ITimePickerOptionValue = { time: millis };\n times.push({ label, value, disabled });\n }\n\n // Add divider between AM/PM times\n const firstPmIndex = times.findIndex(t => t.value.time / 1000 / 60 >= 720);\n if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {\n times.splice(firstPmIndex, 0, { label: '', value: null, divider: true });\n }\n }\n\n\n // Check if we need to prepend a \"Now\" option\n if (this._showNow) {\n const value: ITimePickerOptionValue = { time: null, metadata: 'now' };\n leadingOptions.push({ label: 'Now', value });\n }\n\n // Check for any custom provided options to prepend\n if (Array.isArray(this._customOptions) && this._customOptions.length) {\n const options = this._customOptions.map(o => {\n const value: ITimePickerOptionValue = { time: null, metadata: o.value, isCustom: true, customCallback: o.toMilliseconds };\n return { label: o.label, value };\n });\n leadingOptions = [...leadingOptions, ...options];\n }\n\n // Append all leading options\n if (leadingOptions.length) {\n if (times.length) {\n times.splice(0, 0, { label: '', value: null, divider: true });\n }\n leadingOptions.forEach((o, index) => times.splice(index, 0, o));\n }\n\n return times;\n }\n\n private _convertTimeStringToMillis(value: string | null, use24HourTime: boolean, allowSeconds: boolean): number | null {\n if (!value || !this._isValidTimeFormat(value)) {\n value = '';\n }\n return timeStringToMillis(value, use24HourTime, allowSeconds);\n }\n\n private _formatValue(value: number | null | undefined): string {\n if (!this._masked && typeof this._formatCallback === 'function') {\n return this._formatCallback.call(null, value, this._use24HourTime, this._allowSeconds);\n }\n return millisToTimeString(this._value, this._use24HourTime, this._allowSeconds) || '';\n }\n\n private _warnInvalidFormat(value: string): void {\n console.warn(`The specified value \"${value}\" does not conform to the required format. The format is \"HH:mm\", \"HH:mm:ss\" where HH is 00-23, mm is 00-59, and ss is 00-59.`);\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n if (this._isInitialized) {\n this._open = value;\n if (this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n }\n\n public get masked(): boolean {\n return this._masked;\n }\n public set masked(value: boolean) {\n if (this._masked !== value) {\n this._masked = value;\n if (this._isInitialized) {\n if (this._masked) {\n this._adapter.removeInputListener('input', this._inputListener);\n this._applyMask();\n } else {\n this._adapter.destroyMask();\n this._formatInputValue();\n this._adapter.addInputListener('input', this._inputListener);\n }\n }\n }\n }\n\n public get showMaskFormat(): boolean {\n return this._showMaskFormat;\n }\n public set showMaskFormat(value: boolean) {\n if (this._showMaskFormat !== value) {\n this._showMaskFormat = value;\n }\n }\n\n public get allowSeconds(): boolean {\n return this._allowSeconds;\n }\n public set allowSeconds(value: boolean) {\n if (this._allowSeconds !== value) {\n this._allowSeconds = !!value;\n this._applyAllowSeconds();\n\n if (this._isInitialized) {\n this._applyMask();\n this._formatInputValue();\n }\n\n this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS, `${!!value}`);\n }\n }\n\n public get use24HourTime(): boolean {\n return this._use24HourTime;\n }\n public set use24HourTime(value: boolean) {\n if (this._use24HourTime !== value) {\n this._use24HourTime = !!value;\n \n if (this._isInitialized) {\n this._applyMask();\n this._formatInputValue();\n }\n\n this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME, `${!!value}`);\n }\n }\n\n public get allowInvalidTime(): boolean {\n return this._allowInvalidTime;\n }\n public set allowInvalidTime(value: boolean) {\n if (this._allowInvalidTime !== value) {\n this._allowInvalidTime = !!value;\n this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME, `${!!value}`);\n }\n }\n\n public get value(): string | null {\n return millisToTimeString(this._value, true, this._allowSeconds);\n }\n public set value(value: string | null) {\n if (value && !this._isValidInputValue(value)) {\n this._warnInvalidFormat(value);\n return;\n }\n const millis = this._validateMillis(this._convertTimeStringToMillis(value, true, true));\n this._setValue(millis);\n if (this._isInitialized) {\n this._applyValue(this._value);\n }\n }\n\n public get min(): string | null {\n return millisToTimeString(this._min, true, this._allowSeconds);\n }\n public set min(value: string | null) {\n if (this._min !== value) {\n if (value && !this._isValidInputValue(value)) {\n this._warnInvalidFormat(value);\n return;\n }\n this._min = this._convertTimeStringToMillis(value, true, this._allowSeconds);\n\n // Validate and reset our millis to ensure within range\n const millis = this._validateMillis(this._value);\n this._setValue(millis);\n\n if (this._isInitialized) {\n this._applyValue(millis);\n }\n }\n }\n\n public get max(): string | null {\n return millisToTimeString(this._max, true, this._allowSeconds);\n }\n public set max(value: string | null) {\n if (this._max !== value) {\n if (value && !this._isValidInputValue(value)) {\n this._warnInvalidFormat(value);\n return;\n }\n this._max = this._convertTimeStringToMillis(value, true, this._allowSeconds);\n \n // Validate and reset our millis to ensure within range\n const millis = this._validateMillis(this._value);\n this._setValue(millis);\n\n if (this._isInitialized) {\n this._applyValue(millis);\n }\n }\n }\n\n public get restrictedTimes(): string[] {\n return this._restrictedTimes\n .map(t => millisToTimeString(t, true, this._allowSeconds))\n .filter(v => typeof v === 'string') as string[];\n }\n public set restrictedTimes(value: string[]) {\n if (!Array.isArray(value)) {\n value = [];\n }\n this._restrictedTimes = value\n .filter(v => typeof v === 'string')\n .map(v => this._convertTimeStringToMillis(v, true, true))\n .filter(v => typeof v === 'number') as number[];\n }\n\n public get startTime(): string | null {\n return millisToTimeString(this._startTime, true, this._allowSeconds);\n }\n public set startTime(value: string | null) {\n if (this._startTime !== value) {\n if (value && !this._isValidInputValue(value)) {\n this._warnInvalidFormat(value);\n return;\n }\n this._startTime = this._convertTimeStringToMillis(value, true, this._allowSeconds);\n }\n }\n\n public get step(): number {\n return this._step;\n }\n public set step(value: number) {\n this._step = value;\n }\n\n public get allowInput(): boolean {\n return this._allowInput;\n }\n public set allowInput(value: boolean) {\n if (this._allowInput !== value) {\n this._allowInput = value;\n if (this._isInitialized) {\n this._applyAllowInput();\n this._applyMask();\n }\n }\n }\n\n public get popupTarget(): string {\n return this._popupTarget;\n }\n public set popupTarget(value: string) {\n if (this._popupTarget !== value) {\n this._popupTarget = value;\n }\n }\n\n public get showNow(): boolean {\n return this._showNow;\n }\n public set showNow(value: boolean) {\n if (this._showNow !== value) {\n this._showNow = value;\n }\n }\n\n public get showHourOptions(): boolean {\n return this._showHourOptions;\n }\n public set showHourOptions(value: boolean) {\n if (this._showHourOptions !== value) {\n this._showHourOptions = value;\n }\n }\n\n public get customOptions(): ITimePickerOption[] {\n return this._customOptions;\n }\n public set customOptions(value: ITimePickerOption[]) {\n this._customOptions = Array.isArray(value) ? value : [];\n }\n\n public set validationCallback(cb: TimePickerValidationCallback) {\n this._validationCallback = cb;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n\n public set parseCallback(cb: TimePickerParseCallback) {\n this._parseCallback = cb;\n }\n\n public set formatCallback(cb: TimePickerFormatCallback) {\n this._formatCallback = cb;\n }\n\n public set coercionCallback(cb: TimePickerCoercionCallback) {\n this._coercionCallback = cb;\n }\n\n public set prepareMaskCallback(cb: TimePickerPrepareMaskCallback) {\n this._prepareMaskCallback = cb;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = !!value;\n if (this._isInitialized) {\n this._applyDisabled();\n }\n this._adapter.toggleHostAttribute(TIME_PICKER_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n public get popupClasses(): string | string[] {\n if (Array.isArray(this._popupClasses)) {\n return [...this._popupClasses];\n }\n\n return this._popupClasses;\n }\n public set popupClasses(value: string | string[]) {\n if (Array.isArray(value)) {\n this._popupClasses = [...value];\n } else {\n this._popupClasses = [value];\n }\n }\n\n public get allowDropdown(): boolean {\n return this._allowDropdown;\n }\n public set allowDropdown(value: boolean) {\n if (this._allowDropdown !== value) {\n this._allowDropdown = value;\n if (this._isInitialized) {\n this._applyAllowDropdown();\n }\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean, coerceNumber, ensureChild } from '@tylertech/forge-core';\nimport { tylIconClockOutline } from '@tylertech/tyler-icons/extended';\nimport { tylIconClose } from '@tylertech/tyler-icons/standard';\nimport { TimePickerAdapter } from './time-picker-adapter';\nimport { TimePickerFoundation } from './time-picker-foundation';\nimport {\n TIME_PICKER_CONSTANTS,\n ITimePickerOption,\n TimePickerParseCallback,\n TimePickerValidationCallback,\n TimePickerFormatCallback,\n TimePickerCoercionCallback,\n TimePickerPrepareMaskCallback\n} from './time-picker-constants';\nimport { IconRegistry, IconComponent } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopupComponent } from '../popup';\nimport { DialogComponent } from '../dialog';\nimport { ListComponent, ListItemComponent } from '../list';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface ITimePickerComponent extends IBaseComponent {\n value: string | null | undefined;\n open: boolean;\n allowSeconds: boolean;\n masked: boolean;\n showMaskFormat: boolean;\n use24HourTime: boolean;\n allowInvalidTime: boolean;\n min: string | null | undefined;\n max: string | null | undefined;\n restrictedTimes: string[];\n startTime: string | null | undefined;\n step: number;\n allowInput: boolean;\n showNow: boolean;\n showHourOptions: boolean;\n customOptions: ITimePickerOption[];\n validationCallback: TimePickerValidationCallback;\n parseCallback: TimePickerParseCallback;\n formatCallback: TimePickerFormatCallback;\n coercionCallback: TimePickerCoercionCallback;\n prepareMaskCallback: TimePickerPrepareMaskCallback;\n disabled: boolean;\n popupClasses: string | string[];\n allowDropdown: boolean;\n popupTarget: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-time-picker': ITimePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-time-picker-open': CustomEvent<void>;\n 'forge-time-picker-close': CustomEvent<void>;\n 'forge-time-picker-input': Event;\n 'forge-time-picker-change': CustomEvent<string | null>;\n }\n}\n\n/**\n * The web component class behind the `<forge-time-picker>` custom element.\n * \n * @tag forge-time-picker\n */\n@CustomElement({\n name: TIME_PICKER_CONSTANTS.elementName,\n dependencies: [\n ListComponent,\n ListItemComponent,\n IconButtonComponent,\n IconComponent,\n PopupComponent,\n IconComponent,\n DialogComponent\n ]\n})\nexport class TimePickerComponent extends BaseComponent implements ITimePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n TIME_PICKER_CONSTANTS.attributes.VALUE,\n TIME_PICKER_CONSTANTS.attributes.OPEN,\n TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS,\n TIME_PICKER_CONSTANTS.attributes.MASKED,\n TIME_PICKER_CONSTANTS.attributes.SHOW_MASK_FORMAT,\n TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME,\n TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME,\n TIME_PICKER_CONSTANTS.attributes.MIN,\n TIME_PICKER_CONSTANTS.attributes.MAX,\n TIME_PICKER_CONSTANTS.attributes.START_TIME,\n TIME_PICKER_CONSTANTS.attributes.STEP,\n TIME_PICKER_CONSTANTS.attributes.ALLOW_INPUT,\n TIME_PICKER_CONSTANTS.attributes.SHOW_NOW,\n TIME_PICKER_CONSTANTS.attributes.SHOW_HOUR_OPTIONS,\n TIME_PICKER_CONSTANTS.attributes.DISABLED,\n TIME_PICKER_CONSTANTS.attributes.POPUP_CLASSES,\n TIME_PICKER_CONSTANTS.attributes.ALLOW_DROPDOWN\n ];\n }\n\n private _foundation: TimePickerFoundation;\n\n constructor() {\n super();\n IconRegistry.define([tylIconClockOutline, tylIconClose]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new TimePickerFoundation(new TimePickerAdapter(this));\n }\n\n public connectedCallback(): void {\n if (this.querySelector(TIME_PICKER_CONSTANTS.selectors.INPUT)) {\n this._foundation.initialize();\n } else {\n ensureChild(this, TIME_PICKER_CONSTANTS.selectors.INPUT).then(() => this._foundation.initialize());\n }\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 TIME_PICKER_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case TIME_PICKER_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.ALLOW_SECONDS:\n this.allowSeconds = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.MASKED:\n this.masked = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.SHOW_MASK_FORMAT:\n this.showMaskFormat = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.USE_24_HOUR_TIME:\n this.use24HourTime = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.ALLOW_INVALID_TIME:\n this.allowInvalidTime = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.SHOW_NOW:\n this.showNow = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.SHOW_HOUR_OPTIONS:\n this.showHourOptions = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.MIN:\n this.min = newValue;\n break;\n case TIME_PICKER_CONSTANTS.attributes.MAX:\n this.max = newValue;\n break;\n case TIME_PICKER_CONSTANTS.attributes.START_TIME:\n this.startTime = newValue;\n break;\n case TIME_PICKER_CONSTANTS.attributes.STEP:\n this.step = coerceNumber(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.ALLOW_INPUT:\n this.allowInput = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case TIME_PICKER_CONSTANTS.attributes.POPUP_CLASSES:\n this.popupClasses = newValue;\n break;\n case TIME_PICKER_CONSTANTS.attributes.ALLOW_DROPDOWN:\n this.allowDropdown = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare value: string | null | undefined;\n\n @FoundationProperty()\n public declare open: boolean;\n\n @FoundationProperty()\n public declare allowSeconds: boolean;\n\n @FoundationProperty()\n public declare masked: boolean;\n\n @FoundationProperty()\n public declare showMaskFormat: boolean;\n\n @FoundationProperty()\n public declare use24HourTime: boolean;\n\n @FoundationProperty()\n public declare allowInvalidTime: boolean;\n\n @FoundationProperty()\n public declare min: string | null | undefined;\n\n @FoundationProperty()\n public declare max: string | null | undefined;\n\n @FoundationProperty()\n public declare restrictedTimes: string[];\n\n @FoundationProperty()\n public declare startTime: string | null | undefined;\n\n @FoundationProperty()\n public declare step: number;\n\n @FoundationProperty()\n public declare allowInput: boolean;\n\n @FoundationProperty()\n public declare showNow: boolean;\n\n /** Whether or not to display hour options in dropdown */\n @FoundationProperty()\n public declare showHourOptions: boolean;\n\n @FoundationProperty()\n public declare customOptions: ITimePickerOption[];\n\n @FoundationProperty()\n public declare validationCallback: TimePickerValidationCallback;\n \n @FoundationProperty()\n public declare parseCallback: TimePickerParseCallback;\n\n @FoundationProperty()\n public declare formatCallback: TimePickerFormatCallback;\n\n @FoundationProperty()\n public declare coercionCallback: TimePickerCoercionCallback;\n\n @FoundationProperty()\n public declare prepareMaskCallback: TimePickerPrepareMaskCallback;\n\n @FoundationProperty()\n public declare disabled: boolean;\n\n @FoundationProperty()\n public declare popupClasses: string | string[];\n\n @FoundationProperty()\n public declare allowDropdown: boolean;\n\n @FoundationProperty()\n public declare popupTarget: string;\n}\n", "import { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { ITextFieldComponent, ITextFieldComponentDelegateConfig, TextFieldComponentDelegate } from '../text-field';\nimport { ITimePickerComponent } from './time-picker';\nimport { TIME_PICKER_CONSTANTS } from './time-picker-constants';\n\nexport type TimePickerComponentDelegateProps = Partial<ITimePickerComponent>;\nexport interface ITimePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\nexport interface ITimePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<ITimePickerComponent, ITimePickerComponentDelegateOptions> {}\n\nexport class TimePickerComponentDelegate extends FormFieldComponentDelegate<ITimePickerComponent, ITimePickerComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n\n constructor(config?: ITimePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): ITimePickerComponent {\n const timePicker = document.createElement(TIME_PICKER_CONSTANTS.elementName);\n this._attachTextField(timePicker);\n return timePicker;\n }\n\n public get inputElement(): HTMLInputElement {\n return this._textFieldDelegate.inputElement;\n }\n\n public get textFieldElement(): ITextFieldComponent {\n return this._textFieldDelegate.element;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textFieldDelegate.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textFieldDelegate.invalid = value;\n }\n\n public onChange(listener: (value: string) => void): void {\n this._element.addEventListener(TIME_PICKER_CONSTANTS.events.CHANGE, (evt: CustomEvent<string>) => listener(evt.detail ?? ''));\n }\n\n public onInput(listener: (value: string) => void): void {\n this._element.addEventListener(TIME_PICKER_CONSTANTS.events.INPUT, (evt: CustomEvent<string>) => listener(evt.detail ?? ''));\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('focus', (evt: FocusEvent) => listener(evt));\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._textFieldDelegate.inputElement.addEventListener('blur', (evt: FocusEvent) => listener(evt));\n }\n\n private _attachTextField(component: ITimePickerComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: { ...this._config.options?.textFieldDelegateConfig?.options }\n };\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n component.appendChild(this._textFieldDelegate.element);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { TimePickerComponent } from './time-picker';\n\nexport * from './time-picker-adapter';\nexport * from './time-picker-component-delegate';\nexport * from './time-picker-constants';\nexport * from './time-picker-foundation';\nexport * from './time-picker-utils';\nexport * from './time-picker';\n\nexport function defineTimePickerComponent(): void {\n defineCustomElement(TimePickerComponent);\n}\n"],
5
- "mappings": "6/BAIA,IAAMA,EAA2C,GAAGC,eAE9CC,GAAa,CACjB,OAAQ,2BACR,MAAO,QACP,KAAM,OACN,cAAe,gBACf,OAAQ,SACR,iBAAkB,mBAClB,iBAAkB,mBAClB,mBAAoB,qBACpB,IAAK,MACL,IAAK,MACL,WAAY,aACZ,KAAM,OACN,YAAa,cACb,SAAU,WACV,kBAAmB,oBACnB,SAAU,WACV,cAAe,gBACf,eAAgB,gBACl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AiBF,EAAsB,OAAO,MAAQG,GAA0B,CA3DlG,IAAAC,EA2DqG,OAAAF,GAASE,EAAAD,EAAI,SAAJ,KAAAC,EAAc,EAAE,EAAC,CAC7H,CAEO,QAAQF,EAA2C,CACxD,KAAK,mBAAmB,aAAa,iBAAiB,QAAUC,GAAoBD,EAASC,CAAG,CAAC,CACnG,CAEO,OAAOD,EAA2C,CACvD,KAAK,mBAAmB,aAAa,iBAAiB,OAASC,GAAoBD,EAASC,CAAG,CAAC,CAClG,CAEQ,iBAAiBE,EAAuC,CAtElE,IAAAD,EAAAE,EAAAC,EAAAC,EAuEI,IAAMC,EAAqD,CACzD,MAAOC,EAAA,IAAKJ,GAAAF,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAE,EAA+C,OAC3D,QAASI,EAAA,IAAKF,GAAAD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,0BAAtB,YAAAC,EAA+C,QAC/D,EACA,KAAK,mBAAqB,IAAIG,GAA2BF,CAAe,EACxEJ,EAAU,YAAY,KAAK,mBAAmB,OAAO,CACvD,CACF,ECnEO,SAASO,IAAkC,CAChDC,EAAoBC,CAAmB,CACzC",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "selectors", "events", "numbers", "TIME_PICKER_CONSTANTS", "TimePickerAdapter", "BaseAdapter", "component", "TIME_PICKER_CONSTANTS", "options", "TimeInputMask", "_a", "identifier", "type", "listener", "capture", "textField", "TEXT_FIELD_CONSTANTS", "toggleElement", "existingIconButton", "ICON_BUTTON_CONSTANTS", "iconButtonElement", "buttonElement", "iconElement", "ICON_CONSTANTS", "getActiveElement", "value", "emitEvents", "isDisabled", "config", "ListDropdown", "key", "id", "toggleAttribute", "selector", "data", "emitEvent", "button", "_b", "index", "textFieldRoot", "getShadowElement", "timeStringToMillis", "time", "use24HourTime", "allowSeconds", "hours", "minutes", "seconds", "TWENTY_FOUR_HOUR_TIME_REGEX", "tokens", "tokenize24HourTimeString", "TWELVE_HOUR_TIME_REGEX", "tokenize12HourTimeString", "hoursToMillis", "minutesToMillis", "secondsToMillis", "millisToTimeString", "value", "millisToHours", "millisToMinutesClamped", "meridiem", "millisToSecondsClamped", "millis", "millisToMinutes", "millisToSeconds", "stripSecondsFromMillis", "getCurrentTimeOfDayMillis", "date", "mergeDateWithTime", "useSeconds", "twentyThreeHoursInMillis", "TimePickerFoundation", "_adapter", "TIME_PICKER_CONSTANTS", "randomChars", "evt", "inputValue", "_a", "_b", "nowMillis", "getCurrentTimeOfDayMillis", "timeString", "millisToTimeString", "activeOption", "Platform", "options", "debounce", "value", "originalValue", "stripSecondsFromMillis", "rawValue", "tryCoerceTimeString", "millis", "force", "isBelowMin", "isAboveMax", "isSupportedTimeFormat", "TWENTY_FOUR_HOUR_TIME_REGEX", "result", "emitEvents", "formattedValue", "selectableOptions", "o", "selectedValues", "visibleStartIndex", "optionIndex", "id", "emitCloseEvent", "date", "currentTimeString", "currentTimeMillis", "timeStringToMillis", "closestItem", "prev", "curr", "minMinutes", "millisToMinutes", "maxMinutes", "minuteStep", "times", "leadingOptions", "totalMinutes", "minutesToMillis", "disabled", "label", "firstPmIndex", "t", "index", "use24HourTime", "allowSeconds", "v", "cb", "template", "styles", "TimePickerComponent", "BaseComponent", "IconRegistry", "tylIconClockOutline", "tylIconClose", "attachShadowTemplate", "TimePickerFoundation", "TimePickerAdapter", "TIME_PICKER_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumber", "__decorateClass", "FoundationProperty", "CustomElement", "ListComponent", "ListItemComponent", "IconButtonComponent", "IconComponent", "PopupComponent", "DialogComponent", "TimePickerComponentDelegate", "FormFieldComponentDelegate", "config", "timePicker", "TIME_PICKER_CONSTANTS", "value", "listener", "evt", "_a", "component", "_b", "_c", "_d", "textFieldConfig", "__spreadValues", "TextFieldComponentDelegate", "defineTimePickerComponent", "defineCustomElement", "TimePickerComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- function p(e,n){let t=e.toLowerCase().indexOf(n.toLowerCase());if(t!==-1){let o=t+n.length,r=document.createElement("span"),i=document.createElement("span");return i.style.fontWeight="bold",i.textContent=e.substring(t,o),r.appendChild(document.createTextNode(e.substring(0,t))),r.appendChild(i),r.appendChild(document.createTextNode(e.substring(o))),r}}function a(e,{capture:n=!0,pointerenter:u=!0,focusin:t=!0}={}){let o,r=()=>{typeof o=="function"&&o()};return{userInteraction:new Promise(m=>{let s={once:!0,capture:n},d=f=>{t&&e.removeEventListener("focusin",c,s),m(f)},c=f=>{u&&e.removeEventListener("pointerenter",d,s),m(f)};o=()=>{u&&e.removeEventListener("pointerenter",d,s),t&&e.removeEventListener("focusin",c,s)},u&&e.addEventListener("pointerenter",d,s),t&&e.addEventListener("focusin",c,s)}),destroy:r}}function v(e,n){return n===0?0:e/100*n}function x(e,n){return n===0?0:e*100/n}function b(e,n,u,t=0,o=100){let r=u-n,i=e-n;return!r||!i?t:i*o/r+t}function E(...e){return Math.min(...e.map(n=>n!=null?n:Number.POSITIVE_INFINITY))}function I(...e){return Math.max(...e.map(n=>n!=null?n:Number.NEGATIVE_INFINITY))}export{p as a,a as b,v as c,x as d,b as e,E as f,I as g};
7
- //# sourceMappingURL=chunk.KZJYLYWN.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/core/utils/utils.ts"],
4
- "sourcesContent": ["/**\n * Highlights text in the given label by converting it to HTML and using a `<span>` tag to show the highlighted text within the original label.\n * @param label The full text.\n * @param highlightText The text to highlight.\n */\nexport function highlightTextHTML(label: string, highlightText: string): HTMLElement | undefined {\n const text = label.toLowerCase();\n const startIndex = text.indexOf(highlightText.toLowerCase());\n\n if (startIndex !== -1) {\n const endIndex = startIndex + highlightText.length;\n const wrapperSpan = document.createElement('span');\n const highlightSpan = document.createElement('span');\n\n highlightSpan.style.fontWeight = 'bold';\n highlightSpan.textContent = label.substring(startIndex, endIndex);\n \n wrapperSpan.appendChild(document.createTextNode(label.substring(0, startIndex)));\n wrapperSpan.appendChild(highlightSpan);\n wrapperSpan.appendChild(document.createTextNode(label.substring(endIndex)));\n \n return wrapperSpan;\n }\n\n return undefined;\n}\n\n\n/**\n * Awaits user interaction on an element in the form of `pointerenter` or `focusin` to let a listener know\n * when the user has attempted to interact with the provided element.\n * \n * The listeners are only called once, and the other is removed after one of the listeners is called.\n * @param element The element to listen to.\n * @param capture Whether to use capturing listeners or not.\n * @returns A `Promise` that will be resolved when either of the listeners has executed.\n */\nexport function createUserInteractionListener(element: HTMLElement, { capture = true, pointerenter = true, focusin = true } = {}): { userInteraction: Promise<Event>; destroy: () => void } {\n let destroyFn: () => void;\n const destroy: () => void = () => {\n if (typeof destroyFn === 'function') {\n destroyFn();\n }\n };\n\n const userInteraction = new Promise<Event>(resolve => {\n const listenerOpts: EventListenerOptions & { once: boolean } = { once: true, capture };\n \n const handlePointerenter = (evt: Event): void => {\n if (focusin) {\n element.removeEventListener('focusin', handleFocusin, listenerOpts);\n }\n resolve(evt);\n };\n \n const handleFocusin = (evt: Event): void => {\n if (pointerenter) {\n element.removeEventListener('pointerenter', handlePointerenter, listenerOpts);\n }\n resolve(evt);\n };\n\n destroyFn = (): void => {\n if (pointerenter) {\n element.removeEventListener('pointerenter', handlePointerenter, listenerOpts);\n }\n if (focusin) {\n element.removeEventListener('focusin', handleFocusin, listenerOpts);\n }\n };\n\n if (pointerenter) {\n element.addEventListener('pointerenter', handlePointerenter, listenerOpts);\n }\n if (focusin) {\n element.addEventListener('focusin', handleFocusin, listenerOpts);\n }\n });\n\n\n return { userInteraction, destroy };\n}\n\n/**\n * Converts a percent value to pixels.\n * @param amount A percent value.\n * @param containerSize The size of the parent element along the relevant axis.\n * @returns A pixel value.\n */\nexport function percentToPixels(amount: number, containerSize: number): number {\n if (containerSize === 0) {\n return 0;\n }\n return amount / 100 * containerSize;\n}\n\n/**\n * Converts a pixel value to a percentage.\n * @param amount A pixel value.\n * @param containerSize The size of the parent element along the relevant axis.\n * @returns A percent value.\n */\nexport function pixelsToPercent(amount: number, containerSize: number): number {\n if (containerSize === 0) {\n return 0;\n }\n return amount * 100 / containerSize;\n}\n\n/**\n * Scales a value from one range to another.\n * @param value The original number value.\n * @param fromMin The lower bound of the input range.\n * @param fromMax The upper bound of the input range.\n * @param toMin The lower bound of the output range (defaults to 0).\n * @param toMax The lower bound of the output range (defaults to 100).\n * @returns A value mapped to the output range.\n */\nexport function scaleValue(value: number, fromMin: number, fromMax: number, toMin = 0, toMax = 100): number {\n const range = fromMax - fromMin;\n const adjustedValue = value - fromMin;\n if (!range || !adjustedValue) {\n return toMin;\n }\n return adjustedValue * toMax / range + toMin;\n}\n\n/**\n * Returns the min of a set of numbers where some values may be undefined.\n * @param args `number` or `undefined` values to compare.\n * @returns The min value or `Number.POSITIVE_INFINITY` if all values are `undefined`.\n */\nexport function safeMin(...args: (number | undefined)[]): number {\n return Math.min(...args.map(arg => arg ?? Number.POSITIVE_INFINITY));\n}\n\n/**\n * Returns the max of a set of numbers where some values may be undefined.\n * @param args `number` or `undefined` values to compare.\n * @returns The max value or `Number.NEGATIVE_INFINITY` if all values are `undefined`.\n */\nexport function safeMax(...args: (number | undefined)[]): number {\n return Math.max(...args.map(arg => arg ?? Number.NEGATIVE_INFINITY));\n}\n"],
5
- "mappings": "AAKO,SAASA,EAAkBC,EAAeC,EAAgD,CAE/F,IAAMC,EADOF,EAAM,YAAY,EACP,QAAQC,EAAc,YAAY,CAAC,EAE3D,GAAIC,IAAe,GAAI,CACrB,IAAMC,EAAWD,EAAaD,EAAc,OACtCG,EAAc,SAAS,cAAc,MAAM,EAC3CC,EAAgB,SAAS,cAAc,MAAM,EAEnD,OAAAA,EAAc,MAAM,WAAa,OACjCA,EAAc,YAAcL,EAAM,UAAUE,EAAYC,CAAQ,EAEhEC,EAAY,YAAY,SAAS,eAAeJ,EAAM,UAAU,EAAGE,CAAU,CAAC,CA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,EAAQC,EAAQF,CACzC,CAOO,SAASI,KAAWC,EAAsC,CAC/D,OAAO,KAAK,IAAI,GAAGA,EAAK,IAAIC,GAAOA,GAAA,KAAAA,EAAO,OAAO,iBAAiB,CAAC,CACrE,CAOO,SAASC,KAAWF,EAAsC,CAC/D,OAAO,KAAK,IAAI,GAAGA,EAAK,IAAIC,GAAOA,GAAA,KAAAA,EAAO,OAAO,iBAAiB,CAAC,CACrE",
6
- "names": ["highlightTextHTML", "label", "highlightText", "startIndex", "endIndex", "wrapperSpan", "highlightSpan", "createUserInteractionListener", "element", "capture", "pointerenter", "focusin", "destroyFn", "destroy", "resolve", "listenerOpts", "handlePointerenter", "evt", "handleFocusin", "percentToPixels", "amount", "containerSize", "pixelsToPercent", "scaleValue", "value", "fromMin", "fromMax", "toMin", "toMax", "range", "adjustedValue", "safeMin", "args", "arg", "safeMax"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as Q}from"./chunk.RQG6GVOI.js";import{a as J,b as N}from"./chunk.MA2P7CG4.js";import{a as V}from"./chunk.6YPD6CQM.js";import{a as Y}from"./chunk.P73BXRKY.js";import{a as $}from"./chunk.4DAIIJ37.js";import{a as b}from"./chunk.WCSVKQR2.js";import{g as I,h as O}from"./chunk.MZLPUI6R.js";import{a as q,d as X}from"./chunk.WHQZNZHW.js";import{d as j}from"./chunk.DL7NX432.js";import{g as H}from"./chunk.LJLEPTLU.js";import{d as U,e as M,f as B,i as K,x as z}from"./chunk.4LA6HEA7.js";import{b as _,d as G,h as P,j as v,n as g,p as R}from"./chunk.J2M2MXP2.js";import{a as A}from"./chunk.MCIQXNKY.js";var me={POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",CONSTRAIN_POPUP_WIDTH:"constrain-popup-width",WRAP_OPTION_TEXT:"wrap-option-text",CHECKBOX_ELEMENT:"data-list-dropdown-checkbox",DATA_ALLOW_FOCUS:"data-list-dropdown-allow-focus"},he={GROUP_WRAPPER:"forge-list-dropdown__group-wrapper"},u={attributes:me,classes:he},Z={options:[],syncWidth:!1,selectedValues:[],multiple:!1},ee=(o=>(o.None="none",o.Standard="standard",o.Menu="menu",o))(ee||{}),te=(t=>(t.Spinner="spinner",t.Skeleton="skeleton",t))(te||{});var E=class{constructor(){this._listenerMap=new Map}_emit(e,t){let o=this._listenerMap.get(e);o&&o.length&&o.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 o=this._listenerMap.get(e);o&&o.push(t)}}removeListener(e,t){let o=this._listenerMap.get(e);o&&o.length&&o.includes(t)&&(o.splice(o.indexOf(t),1),o.length||this._listenerMap.delete(e))}};var f;(function(i){i.Up="up",i.Down="down",i.Left="left",i.Right="right"})(f||(f={}));var c;(function(i){i.Scroll="scroll",i.Scrolled="scrolled",i.ScrolledStart="scrolled-start",i.ScrolledEnd="scrolled-end"})(c||(c={}));var _e=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||_e;this._scrollListener=R(()=>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)&&G(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(c.Scroll,{direction:t,position:e}),this._lastScrollPosition<=this._scrollThreshold&&e>this._scrollThreshold?this._emit(c.Scrolled,!0):this._lastScrollPosition>=this._scrollThreshold&&(this._scrollThreshold>0?e<this._scrollThreshold:e===0)&&this._emit(c.Scrolled,!1);let o=Math.round(e-this._scrollThreshold),n=Math.round(this.scrollSize-e);this._lastScrollPosition>=this._scrollThreshold&&o<=0?this._emit(c.ScrolledStart):this._lastScrollPosition<=this.scrollSize-this._scrollThreshold&&n<=this._scrollThreshold&&this._emit(c.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 oe(i,e){let t=fe(i,e),o=`list-dropdown-popup-${i.id}`;switch(t.addEventListener("mousedown",n=>{let p=$(n);if(p.find(m=>m.nodeType===1&&m.hasAttribute(u.attributes.DATA_ALLOW_FOCUS)))return;p.find(m=>m.id===o||m.id===i.id)&&n.preventDefault()}),i.type){case"menu":t.setAttribute("role","menu"),t.setAttribute("aria-orientation","vertical");break;default:t.setAttribute("role","listbox")}return i.id&&(t.id=o),i.popupClasses&&B(i.popupClasses,t),t}function fe(i,e){var o;let t=document.createElement("forge-popup");switch(t.targetElement=e,t.placement=i.popupPlacement||"bottom-start",t.manageFocus=!1,t.static=!!i.popupStatic,(o=i.popupFallbackPlacements)!=null&&o.length&&(t.fallbackPlacements=i.popupFallbackPlacements),i.constrainViewportWidth&&t.setAttribute(b.attributes.CONSTRAIN_VIEWPORT_WIDTH,""),i.popupOffset&&(t.offset=i.popupOffset),i.type){case"menu":t.animationType="menu";break;case"none":t.animationType="none";break;default:t.animationType="dropdown"}return t}function ne(i){let e=document.createElement(J.elementName);return e.id=`list-dropdown-list-${i.id}`,e.propagateClick=!1,e}function y(i,e,t,o=0,n=!0){let p=ge(t||i.options),a=F(p),L=!!i.optionLimit,m=i.optionLimit||0,ae=o;for(let h of p){let x=e;if(h.builder&&typeof h.builder=="function"){let s=h.builder(h);if(s){let d=document.createElement("div");d.classList.add(u.classes.GROUP_WRAPPER),x=d,typeof s=="string"?d.innerHTML=s:s instanceof HTMLElement&&d.appendChild(s),e.appendChild(d)}}else if(h.text){let s=document.createElement("div");s.classList.add(u.classes.GROUP_WRAPPER);let d=document.createElement("div");d.textContent=h.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",x=s,s.appendChild(d),e.appendChild(s)}for(let s of h.options){if(s.divider){let r=ve();e.appendChild(r);continue}if(L&&--m<0)break;let d=i.selectedValues?i.selectedValues.some(r=>g(r,s.value)):!1;if(!n&&d)continue;let l=document.createElement("forge-list-item");switch(l.value=s.value,l.id=`list-dropdown-option-${i.id}-${ae++}`,l.style.cursor="pointer",i.wrapOptionText&&(l.wrap=!0),s.optionClass&&(typeof s.optionClass=="string"||Array.isArray(s.optionClass)&&s.optionClass.length)&&B(s.optionClass,l),i.type){case"menu":l.setAttribute("role","menuitem");break;case"none":break;default:l.setAttribute("role","option")}if(i.dense&&(l.dense=!0),i.optionBuilder&&typeof i.optionBuilder=="function"){let r=i.optionBuilder(s,l);r&&(typeof r=="string"?l.innerHTML=r:l.appendChild(r))}else if(typeof i.transform!="function")l.textContent=s.label||"";else{let r=i.transform(s.label);typeof r=="string"?l.textContent=r:typeof r=="object"&&r.nodeType!==void 0&&l.appendChild(r)}if(s.secondaryLabel){let r=document.createElement("span");r.slot="subtitle",r.textContent=s.secondaryLabel,l.twoLine=!0,l.appendChild(r)}if(i.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,W)=>{l.setAttribute(W,r)}),s.leadingBuilder){let r=s.leadingBuilder();v(r)&&(r.slot="leading",l.appendChild(r))}else if(s.leadingIcon){let r=ie(s.leadingIconType,s.leadingIcon,s.leadingIconClass||i.iconClass,s.leadingIconComponentProps);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=ie(s.trailingIconType,s.trailingIcon,s.trailingIconClass||i.iconClass,s.trailingIconComponentProps);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"),!s.disabled&&typeof i.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 ce={index:a.filter(ue=>!ue.divider).indexOf(s),options:s.options,parentValue:s.value},k=i.cascadingElementFactory.call(null,ce);k.appendChild(l),l=k}x.appendChild(l)}}}function C(i){let e=document.createElement("forge-icon");return e.setAttribute(u.attributes.CHECKBOX_ELEMENT,""),e.name=i?O.name:I.name,e.slot="leading",e.style.marginRight="16px",e.style.verticalAlign="middle",e}function ve(){let i=document.createElement("forge-divider");return i.setAttribute("aria-hidden","true"),i}function ie(i="font",e,t,o){if(i==="component"){let p=document.createElement("forge-icon");return t&&p.classList.add(t),p.setAttribute("aria-hidden","true"),p.name=e,o&&Object.assign(p,o),p}let n=document.createElement("i");return n.classList.add(t||j),n.setAttribute("aria-hidden","true"),n.textContent=e,n}function se(i){switch(i){case"skeleton":return Le();default:return be()}}function be(){let i=document.createElement("div");i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.style.padding="8px",i.style.boxSizing="border-box";let e=document.createElement("forge-circular-progress");return e.style.setProperty("--forge-circular-progress-size","24px"),i.appendChild(e),i}function Le(){let i=document.createElement("forge-list"),e=document.createElement("div");e.style.minWidth="192px";for(let t=0;t<3;t++){let o=document.createElement(Q.elementName);o.setAttribute("list-item",""),e.appendChild(o)}return i.appendChild(e),i}function re(){let i=document.createElement(Y.elementName);return i.determinate=!1,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.right="0",i.style.width="100%",i}function ge(i){return le(i,1)?i:[{text:"",options:i}]}function le(i,e){let t=i.some(n=>_(n)&&v(n)&&n.hasOwnProperty("options")&&(n.hasOwnProperty("text")||n.hasOwnProperty("builder"))),o=i.some(n=>_(n)&&v(n)&&n.hasOwnProperty("label")&&n.hasOwnProperty("value"));return t&&e===1||o&&e===0}function F(i){return le(i,1)?i.reduce((t,o)=>t.concat(o.options),[]):[...i]}var S=class{constructor(e,t){this._adapter=e;this._open=!1;this._config=Object.assign(A({},Z),A({},t)),this._selectListener=(o,n)=>this._onSelect(o,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 o=this._config.syncWidth===void 0;this._adapter.syncWidth(o)}}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(o=>!o.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):typeof this._config.visibleStartIndex=="number"&&this._nonDividerOptions[this._config.visibleStartIndex]&&this._adapter.scrollOptionIntoView(this._config.visibleStartIndex)}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":case"NumpadEnter":let t=this.getActiveOptionIndex(),o=this._nonDividerOptions[t];if(this._canSelectOption(o)){let a=this._adapter.getActiveOptionIdByIndex(t);a&&this._onSelect(o.value,a)}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":let n=this._nonDividerOptions;if(n.length&&n.every(a=>!this._canSelectOption(a)))return;let p=this._getNextActiveOptionIndex(e);this.activateOption(p);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 o=e<=0?t.length-1:e-1;return t[o].disabled?this._getPreviousHighlightableOptionIndex(o,t):o}_getNextHighlightableOptionIndex(e,t){let o=e===t.length-1?0:e+1;return t[o].disabled?this._getNextHighlightableOptionIndex(o,t):o}get _flatOptions(){return F(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,o){this._dropdownElement=oe(e,this._targetElement),this.syncWidth(!!e.syncWidth,e.targetWidthCallback),e.allowBusy&&(this._busyElement=re(),this._busyElement.style.display="none",this._dropdownElement.appendChild(this._busyElement)),e.headerBuilder&&(this._headerElement=e.headerBuilder(),this._headerElement&&this._headerElement.setAttribute(u.attributes.DATA_ALLOW_FOCUS,"")),e.footerBuilder&&(this._footerElement=e.footerBuilder(),this._footerElement&&this._footerElement.setAttribute(u.attributes.DATA_ALLOW_FOCUS,"")),this._listElement=ne(e),this._listElement.addEventListener(N.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=se(e.asyncStyle),this._dropdownElement.appendChild(this._asyncElement)),this._announcerElement=V(),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 o=H(this._dropdownElement,b.selectors.CONTAINER),n={scrollThreshold:t};this._scrollObserver=new w(o,n),this._scrollObserver.addListener(c.ScrolledEnd,e)}}removeScrollBottomListener(e){this._scrollObserver&&this._scrollObserver.removeListener(c.ScrolledEnd,e)}getActiveOptionIndex(){if(!this._dropdownElement)return-1;let e=this._getListItemElements(),t=[...e].reverse().find(o=>o.active);return t?e.indexOf(t):-1}getSelectedOptionIndex(){return this._getListItemElements().findIndex(t=>t.selected)}getActiveOptionIdByIndex(e){if(!this._dropdownElement)return null;let o=this._getListItemElements()[e];return o?o.id:null}toggleOptionMultiple(e,t){if(!this._dropdownElement)return;let o=this._getListItemElements();o.length&&o[e]&&this._toggleSelectedOption(o[e],t)}scrollOptionIntoView(e,t=!0){let o=this._getListItemElements()[e];o&&this._scrollListItemIntoView(o,t?"smooth":"auto","center")}scrollSelectedOptionIntoView(e=!0){let t=this._getSelectedListItem();this._scrollListItemIntoView(t,e?"smooth":"auto","center")}activateSelectedOption(e){let t=this._getListItemElements();t.length&&t.filter(p=>p.active).forEach(p=>p.active=!1);let o=this._getSelectedListItem();o&&this._activateListOption(o,e.activeChangeCallback)}activateOption(e,t,o=!0){if(!this._dropdownElement)return;let n=this._getListItemElements();n.length&&(n.filter(a=>a.active).forEach(a=>a.active=!1),this._activateListOption(n[e],t),this._scrollListItemIntoView(n[e],o?"smooth":"auto"))}setSelectedValues(e,t=!1){if(!this._dropdownElement)return;let o=this._getListItemElements();for(let n of o){let p=e.some(a=>g(a,n.value));if(n.selected=p,t){let a=n.querySelector(`[${u.attributes.CHECKBOX_ELEMENT}]`);if(a){let L=C(p);M(L,a)}}}}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&&K(this._asyncElement),this._busyElement&&this._busyElement.close(),this._listElement.isConnected||this._dropdownElement.appendChild(this._listElement),U(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,this._listElement.childElementCount,!1)}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(N.elementName)):[]}_toggleSelectedOption(e,t){if(!this._dropdownElement)return;let o=this._getListItemElements();if(o.length){let p=o.filter(a=>a!==e&&a.active);p.length&&p.forEach(a=>a.active=!1)}e.selected=t,e.setAttribute("aria-selected",`${t}`),e.setAttribute("aria-checked",`${t}`),t&&(e.active=!0);let n=e.querySelector(`${q.elementName}[slot=leading]`);if(n){let p=C(t);M(p,n)}}_getTargetElementWidth(e){return e&&P(e)?e():this._targetElement.getBoundingClientRect().width}_activateListOption(e,t){e&&!e.disabled&&(e.active=!0,t&&P(t)&&t(e.id))}_scrollListItemIntoView(e,t="auto",o="nearest"){if(e&&this._dropdownElement&&this._dropdownElement.isConnected){let n=H(this._dropdownElement,b.selectors.CONTAINER);n&&z(n,e,t,o)}}_getSelectedListItem(){return this._getListItemElements().find(t=>t.selected)}};var pe=class{constructor(e,t){this._targetElement=e;X.define([O,I]),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;this._constrainPopupWidth=!0;this._wrapOptionText=!1}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}get constrainPopupWidth(){return this._constrainPopupWidth}set constrainPopupWidth(e){this._constrainPopupWidth=e}get wrapOptionText(){return this._wrapOptionText}set wrapOptionText(e){this._wrapOptionText=e}_applySelection(){}};var de=class extends T{constructor(t){super();this._config=t;this._open=!1;this._options=[];this._childOpen=!1;this._popupHasMouse=!1;this._targetMouseEnterListener=o=>this._onTargetMouseEnter(o),this._targetMouseLeaveListener=o=>this._onTargetMouseLeave(o),this._childPopupMouseEnterListener=()=>this._onChildPopupMouseEnter(),this._childPopupMouseLeaveListener=()=>this._onChildPopupMouseLeave(),this._documentMouseMoveListener=o=>this._mouseCoords={x:o.pageX,y:o.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._setCascadeTargetInactive(),this._closeDropdown())},this._config.popupTimeout)}_onTargetMouseEnter(t){!this._options.length||this._openDropdown({fromKeyboard:!1})}_onTargetMouseLeave(t){this._activeMouseLeaveTimeout=window.setTimeout(()=>{if(!(!this._open||this._childOpen)){if(this._mouseCoords){let o=document.elementFromPoint(this._mouseCoords.x,this._mouseCoords.y);if(o&&this._isOwnElement(o))return}this._setCascadeTargetInactive(),this._closeDropdown()}},this._config.targetTimeout)}_clearMouseLeaveTimeout(){this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout)}};export{u as a,Z as b,ee as c,te as d,le as e,S as f,D as g,pe as h,T as i,de as j};
7
- //# sourceMappingURL=chunk.LZOAYM6V.js.map