@tylertech/forge 2.11.0 → 2.12.1

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 (194) hide show
  1. package/custom-elements.json +220 -4
  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/calendar/calendar-dropdown/index.js +1 -1
  15. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  16. package/dist/esm/calendar/index.js +1 -1
  17. package/dist/esm/checkbox/index.js +1 -1
  18. package/dist/esm/chip-field/index.js +1 -1
  19. package/dist/esm/chips/chip/index.js +1 -1
  20. package/dist/esm/chips/chip-set/index.js +1 -1
  21. package/dist/esm/chips/index.js +1 -1
  22. package/dist/esm/chunks/{chunk.I33ZJKOX.js → chunk.2SAHWDGJ.js} +2 -2
  23. package/dist/esm/chunks/{chunk.I33ZJKOX.js.map → chunk.2SAHWDGJ.js.map} +0 -0
  24. package/dist/esm/chunks/{chunk.5SRA2RH3.js → chunk.3LZEQWAL.js} +2 -2
  25. package/dist/esm/chunks/{chunk.5SRA2RH3.js.map → chunk.3LZEQWAL.js.map} +0 -0
  26. package/dist/esm/chunks/chunk.3UMBCR4P.js +7 -0
  27. package/dist/esm/chunks/chunk.3UMBCR4P.js.map +7 -0
  28. package/dist/esm/chunks/{chunk.DGQAYNAF.js → chunk.4KBQ5AJJ.js} +2 -2
  29. package/dist/esm/chunks/{chunk.DGQAYNAF.js.map → chunk.4KBQ5AJJ.js.map} +0 -0
  30. package/dist/esm/chunks/{chunk.NJHQA266.js → chunk.4T5TGQFG.js} +2 -2
  31. package/dist/esm/chunks/{chunk.NJHQA266.js.map → chunk.4T5TGQFG.js.map} +0 -0
  32. package/dist/esm/chunks/{chunk.EM3OQRZP.js → chunk.5D6UB4DL.js} +2 -2
  33. package/dist/esm/chunks/{chunk.EM3OQRZP.js.map → chunk.5D6UB4DL.js.map} +0 -0
  34. package/dist/esm/chunks/{chunk.55JE4FLS.js → chunk.5PQTSZ7G.js} +2 -2
  35. package/dist/esm/chunks/{chunk.55JE4FLS.js.map → chunk.5PQTSZ7G.js.map} +0 -0
  36. package/dist/esm/chunks/{chunk.KLHXGSZU.js → chunk.7O7V3N4A.js} +2 -2
  37. package/dist/esm/chunks/{chunk.KLHXGSZU.js.map → chunk.7O7V3N4A.js.map} +0 -0
  38. package/dist/esm/chunks/{chunk.WAEWHBHE.js → chunk.APGFXXJ7.js} +2 -2
  39. package/dist/esm/chunks/{chunk.WAEWHBHE.js.map → chunk.APGFXXJ7.js.map} +0 -0
  40. package/dist/esm/chunks/{chunk.5GFDXNIU.js → chunk.BFNAQQCU.js} +2 -2
  41. package/dist/esm/chunks/{chunk.5GFDXNIU.js.map → chunk.BFNAQQCU.js.map} +0 -0
  42. package/dist/esm/chunks/{chunk.G5BCWBD5.js → chunk.BOENNFXE.js} +2 -2
  43. package/dist/esm/chunks/{chunk.G5BCWBD5.js.map → chunk.BOENNFXE.js.map} +0 -0
  44. package/dist/esm/chunks/{chunk.24BSMZM3.js → chunk.CYJBOJMX.js} +2 -2
  45. package/dist/esm/chunks/{chunk.24BSMZM3.js.map → chunk.CYJBOJMX.js.map} +0 -0
  46. package/dist/esm/chunks/{chunk.XURVHDKR.js → chunk.F3W3XMGT.js} +2 -2
  47. package/dist/esm/chunks/{chunk.XURVHDKR.js.map → chunk.F3W3XMGT.js.map} +0 -0
  48. package/dist/esm/chunks/{chunk.RS5NH2NG.js → chunk.FPV4XEUK.js} +2 -2
  49. package/dist/esm/chunks/{chunk.RS5NH2NG.js.map → chunk.FPV4XEUK.js.map} +0 -0
  50. package/dist/esm/chunks/{chunk.VEVOKTUX.js → chunk.G5Q2CUUE.js} +2 -2
  51. package/dist/esm/chunks/{chunk.VEVOKTUX.js.map → chunk.G5Q2CUUE.js.map} +0 -0
  52. package/dist/esm/chunks/{chunk.WZRXUTYC.js → chunk.G77PXLAU.js} +2 -2
  53. package/dist/esm/chunks/{chunk.WZRXUTYC.js.map → chunk.G77PXLAU.js.map} +0 -0
  54. package/dist/esm/chunks/{chunk.2A3CKLXJ.js → chunk.I2YRKTG7.js} +2 -2
  55. package/dist/esm/chunks/{chunk.2A3CKLXJ.js.map → chunk.I2YRKTG7.js.map} +0 -0
  56. package/dist/esm/chunks/{chunk.AFZB3MG5.js → chunk.IFZXG3LI.js} +2 -2
  57. package/dist/esm/chunks/{chunk.AFZB3MG5.js.map → chunk.IFZXG3LI.js.map} +0 -0
  58. package/dist/esm/chunks/{chunk.23VA56ZY.js → chunk.J3NHIF6W.js} +2 -2
  59. package/dist/esm/chunks/{chunk.23VA56ZY.js.map → chunk.J3NHIF6W.js.map} +0 -0
  60. package/dist/esm/chunks/{chunk.5HUDHTAK.js → chunk.JB2N65SR.js} +2 -2
  61. package/dist/esm/chunks/{chunk.5HUDHTAK.js.map → chunk.JB2N65SR.js.map} +0 -0
  62. package/dist/esm/chunks/{chunk.OHCHNL3V.js → chunk.JNOCXQVB.js} +2 -2
  63. package/dist/esm/chunks/{chunk.OHCHNL3V.js.map → chunk.JNOCXQVB.js.map} +2 -2
  64. package/dist/esm/chunks/{chunk.77WNSJ3T.js → chunk.K32ME33N.js} +2 -2
  65. package/dist/esm/chunks/{chunk.77WNSJ3T.js.map → chunk.K32ME33N.js.map} +0 -0
  66. package/dist/esm/chunks/{chunk.WGE5R5JK.js → chunk.KGW63HJX.js} +2 -2
  67. package/dist/esm/chunks/{chunk.WGE5R5JK.js.map → chunk.KGW63HJX.js.map} +0 -0
  68. package/dist/esm/chunks/chunk.KYCC3C3M.js +7 -0
  69. package/dist/esm/chunks/{chunk.AABG6MSC.js.map → chunk.KYCC3C3M.js.map} +2 -2
  70. package/dist/esm/chunks/{chunk.NEGJYSPB.js → chunk.LLHA3SQR.js} +2 -2
  71. package/dist/esm/chunks/{chunk.NEGJYSPB.js.map → chunk.LLHA3SQR.js.map} +0 -0
  72. package/dist/esm/chunks/chunk.MUY647D6.js +7 -0
  73. package/dist/esm/chunks/chunk.MUY647D6.js.map +7 -0
  74. package/dist/esm/chunks/chunk.NTFA7FCB.js +7 -0
  75. package/dist/esm/chunks/chunk.NTFA7FCB.js.map +7 -0
  76. package/dist/esm/chunks/{chunk.JXQZMASB.js → chunk.OAKTW64X.js} +2 -2
  77. package/dist/esm/chunks/{chunk.JXQZMASB.js.map → chunk.OAKTW64X.js.map} +0 -0
  78. package/dist/esm/chunks/{chunk.CSOY4C7A.js → chunk.OG2BI3UW.js} +2 -2
  79. package/dist/esm/chunks/{chunk.CSOY4C7A.js.map → chunk.OG2BI3UW.js.map} +2 -2
  80. package/dist/esm/chunks/{chunk.AHOQXJRN.js → chunk.P6B3UWJ5.js} +2 -2
  81. package/dist/esm/chunks/{chunk.AHOQXJRN.js.map → chunk.P6B3UWJ5.js.map} +0 -0
  82. package/dist/esm/chunks/{chunk.ESW45SN4.js → chunk.PFD2SVJ4.js} +2 -2
  83. package/dist/esm/chunks/{chunk.ESW45SN4.js.map → chunk.PFD2SVJ4.js.map} +0 -0
  84. package/dist/esm/chunks/{chunk.W7UTHKBF.js → chunk.Q6L7T6OJ.js} +2 -2
  85. package/dist/esm/chunks/{chunk.W7UTHKBF.js.map → chunk.Q6L7T6OJ.js.map} +0 -0
  86. package/dist/esm/chunks/{chunk.WKKNDQYZ.js → chunk.RKKJB3EE.js} +2 -2
  87. package/dist/esm/chunks/{chunk.WKKNDQYZ.js.map → chunk.RKKJB3EE.js.map} +0 -0
  88. package/dist/esm/chunks/chunk.SALQP6J3.js +7 -0
  89. package/dist/esm/chunks/{chunk.JB6U32SJ.js.map → chunk.SALQP6J3.js.map} +2 -2
  90. package/dist/esm/chunks/{chunk.DJSOBAWA.js → chunk.SJSLC6XF.js} +2 -2
  91. package/dist/esm/chunks/{chunk.DJSOBAWA.js.map → chunk.SJSLC6XF.js.map} +0 -0
  92. package/dist/esm/chunks/chunk.SZL74RTY.js +7 -0
  93. package/dist/esm/chunks/{chunk.SFFYXKJW.js.map → chunk.SZL74RTY.js.map} +2 -2
  94. package/dist/esm/chunks/chunk.TCCPCDJK.js +7 -0
  95. package/dist/esm/chunks/chunk.TCCPCDJK.js.map +7 -0
  96. package/dist/esm/chunks/{chunk.WMO47F6Z.js → chunk.TLHI6K2R.js} +2 -2
  97. package/dist/esm/chunks/{chunk.WMO47F6Z.js.map → chunk.TLHI6K2R.js.map} +0 -0
  98. package/dist/esm/chunks/{chunk.6BKOGBE6.js → chunk.TR64DV3G.js} +2 -2
  99. package/dist/esm/chunks/{chunk.6BKOGBE6.js.map → chunk.TR64DV3G.js.map} +0 -0
  100. package/dist/esm/chunks/{chunk.MTMZFAWU.js → chunk.V7P3QPNM.js} +2 -2
  101. package/dist/esm/chunks/{chunk.MTMZFAWU.js.map → chunk.V7P3QPNM.js.map} +0 -0
  102. package/dist/esm/chunks/{chunk.DFUNN5IP.js → chunk.VH3PVW2V.js} +2 -2
  103. package/dist/esm/chunks/{chunk.DFUNN5IP.js.map → chunk.VH3PVW2V.js.map} +0 -0
  104. package/dist/esm/chunks/chunk.WDIL7ZO7.js +12 -0
  105. package/dist/esm/chunks/{chunk.52JUDHTJ.js.map → chunk.WDIL7ZO7.js.map} +0 -0
  106. package/dist/esm/chunks/{chunk.YFIDBZ7V.js → chunk.WUIIZZQD.js} +2 -2
  107. package/dist/esm/chunks/{chunk.YFIDBZ7V.js.map → chunk.WUIIZZQD.js.map} +0 -0
  108. package/dist/esm/chunks/{chunk.SNGELGOD.js → chunk.WV45FGTW.js} +2 -2
  109. package/dist/esm/chunks/{chunk.SNGELGOD.js.map → chunk.WV45FGTW.js.map} +0 -0
  110. package/dist/esm/chunks/{chunk.RZL6S3K3.js → chunk.Y6MPWPZU.js} +2 -2
  111. package/dist/esm/chunks/{chunk.RZL6S3K3.js.map → chunk.Y6MPWPZU.js.map} +0 -0
  112. package/dist/esm/chunks/{chunk.7TQYFMM4.js → chunk.YAJT3P6V.js} +2 -2
  113. package/dist/esm/chunks/{chunk.7TQYFMM4.js.map → chunk.YAJT3P6V.js.map} +0 -0
  114. package/dist/esm/chunks/{chunk.57XBS3DF.js → chunk.YSE5EMB3.js} +2 -2
  115. package/dist/esm/chunks/{chunk.57XBS3DF.js.map → chunk.YSE5EMB3.js.map} +0 -0
  116. package/dist/esm/chunks/{chunk.KZHMDZVS.js → chunk.YWKKZLZ2.js} +2 -2
  117. package/dist/esm/chunks/{chunk.KZHMDZVS.js.map → chunk.YWKKZLZ2.js.map} +0 -0
  118. package/dist/esm/chunks/{chunk.7WWP6WI6.js → chunk.Z5P6EA5L.js} +2 -2
  119. package/dist/esm/chunks/{chunk.7WWP6WI6.js.map → chunk.Z5P6EA5L.js.map} +0 -0
  120. package/dist/esm/color-picker/index.js +1 -1
  121. package/dist/esm/core/index.js +1 -1
  122. package/dist/esm/core/utils/index.js +1 -1
  123. package/dist/esm/date-picker/index.js +1 -1
  124. package/dist/esm/date-range-picker/index.js +1 -1
  125. package/dist/esm/dialog/index.js +1 -1
  126. package/dist/esm/expansion-panel/index.js +1 -1
  127. package/dist/esm/file-picker/index.js +1 -1
  128. package/dist/esm/icon/index.js +1 -1
  129. package/dist/esm/icon-button/index.js +1 -1
  130. package/dist/esm/index.js +1 -1
  131. package/dist/esm/list-dropdown/index.js +1 -1
  132. package/dist/esm/menu/index.js +1 -1
  133. package/dist/esm/open-icon/index.js +1 -1
  134. package/dist/esm/paginator/index.js +1 -1
  135. package/dist/esm/popup/index.js +1 -1
  136. package/dist/esm/profile-card/index.js +1 -1
  137. package/dist/esm/quantity-field/index.js +1 -1
  138. package/dist/esm/select/core/index.js +1 -1
  139. package/dist/esm/select/index.js +1 -1
  140. package/dist/esm/select/select/index.js +1 -1
  141. package/dist/esm/select/select-dropdown/index.js +1 -1
  142. package/dist/esm/slider/index.js +1 -1
  143. package/dist/esm/split-view/index.js +1 -1
  144. package/dist/esm/split-view/split-view/index.js +1 -1
  145. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  146. package/dist/esm/stepper/index.js +1 -1
  147. package/dist/esm/stepper/step/index.js +1 -1
  148. package/dist/esm/stepper/stepper/index.js +1 -1
  149. package/dist/esm/switch/index.js +1 -1
  150. package/dist/esm/table/index.js +1 -1
  151. package/dist/esm/tabs/index.js +1 -1
  152. package/dist/esm/tabs/tab-bar/index.js +1 -1
  153. package/dist/esm/time-picker/index.js +1 -1
  154. package/dist/esm/toast/index.js +1 -1
  155. package/dist/esm/toolbar/index.js +1 -1
  156. package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
  157. package/esm/autocomplete/autocomplete-adapter.js +10 -0
  158. package/esm/autocomplete/autocomplete-foundation.d.ts +1 -0
  159. package/esm/autocomplete/autocomplete-foundation.js +9 -0
  160. package/esm/core/utils/utils.d.ts +6 -0
  161. package/esm/core/utils/utils.js +10 -0
  162. package/esm/expansion-panel/expansion-panel-foundation.js +2 -2
  163. package/esm/menu/menu-foundation.d.ts +1 -0
  164. package/esm/menu/menu-foundation.js +6 -3
  165. package/esm/popup/popup-adapter.js +5 -0
  166. package/esm/select/core/base-select-adapter.d.ts +2 -0
  167. package/esm/select/core/base-select-adapter.js +17 -7
  168. package/esm/select/core/base-select-foundation.d.ts +1 -0
  169. package/esm/select/core/base-select-foundation.js +7 -0
  170. package/esm/split-view/split-view/split-view-adapter.d.ts +4 -0
  171. package/esm/split-view/split-view/split-view-adapter.js +7 -1
  172. package/esm/split-view/split-view/split-view-foundation.d.ts +4 -0
  173. package/esm/split-view/split-view/split-view-foundation.js +12 -0
  174. package/esm/split-view/split-view/split-view.d.ts +5 -0
  175. package/esm/split-view/split-view/split-view.js +5 -0
  176. package/esm/split-view/split-view-panel/split-view-panel-foundation.js +2 -2
  177. package/esm/split-view/split-view-panel/split-view-panel.d.ts +5 -0
  178. package/esm/split-view/split-view-panel/split-view-panel.js +6 -1
  179. package/esm/toolbar/toolbar.js +1 -1
  180. package/package.json +1 -1
  181. package/styles/toolbar/_mixins.scss +2 -2
  182. package/styles/toolbar/toolbar.scss +6 -0
  183. package/dist/esm/chunks/chunk.52JUDHTJ.js +0 -12
  184. package/dist/esm/chunks/chunk.AABG6MSC.js +0 -7
  185. package/dist/esm/chunks/chunk.DRFU6POI.js +0 -7
  186. package/dist/esm/chunks/chunk.DRFU6POI.js.map +0 -7
  187. package/dist/esm/chunks/chunk.HMZ24WLE.js +0 -7
  188. package/dist/esm/chunks/chunk.HMZ24WLE.js.map +0 -7
  189. package/dist/esm/chunks/chunk.JB6U32SJ.js +0 -7
  190. package/dist/esm/chunks/chunk.OWTGOW7S.js +0 -7
  191. package/dist/esm/chunks/chunk.OWTGOW7S.js.map +0 -7
  192. package/dist/esm/chunks/chunk.SFFYXKJW.js +0 -7
  193. package/dist/esm/chunks/chunk.WSGJIPQJ.js +0 -7
  194. package/dist/esm/chunks/chunk.WSGJIPQJ.js.map +0 -7
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/popup/popup-constants.ts", "../../src/popup/popup-adapter.ts", "../../src/popup/popup-foundation.ts", "../../src/popup/popup.ts", "../../src/popup/index.ts"],
4
- "sourcesContent": ["import { PositionPlacement } from '@tylertech/forge-core';\nimport { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}popup`;\n\nconst attributes = {\n CONTAINER: 'forge-popup',\n OPEN: 'open',\n PLACEMENT: 'placement',\n MANAGE_FOCUS: 'manage-focus',\n ANIMATION_TYPE: 'animation-type',\n STATIC: 'static',\n HIDE_WHEN_CLIPPED: 'hide-when-clipped',\n HOST: 'forge-popup-host',\n INITIAL_FOCUS: 'forge-popup-focus'\n};\n\nconst classes = {\n OPEN: 'forge-popup--open',\n OPENING: 'forge-popup--opening',\n CLOSED: 'forge-popup--closed',\n SELECT: 'forge-popup--select'\n};\n\nconst selectors = {\n HOST: `.forge-popup-host, [${attributes.HOST}]`,\n CONTAINER: '.forge-popup',\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`\n};\n\nconst events = {\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n POSITION: `${elementName}-position`,\n BLUR: `${elementName}-blur`\n};\n\nconst numbers = {\n ANIMATION_DURATION: 120\n};\n\nexport const POPUP_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IPopupPosition {\n x: number;\n y: number;\n}\n\nexport type PopupPlacement = PositionPlacement;\n\nexport enum PopupAnimationType {\n None = 'none',\n Menu = 'menu',\n Dropdown = 'dropdown'\n}\n\nexport interface IPopupPositionEventData extends IPopupPosition {\n visibility: 'visible' | 'hidden';\n}\n\nexport type PopupStateCallback = () => boolean | void | Promise<boolean | void>;\n", "import { addClass, closestElement, emitEvent, getShadowElement, IPositionElementConfig, notChildEventListener, positionElementAsync, removeClass, removeElement, deepQuerySelectorAll, getActiveElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IPopupComponent } from './popup';\nimport { IPopupPositionEventData, POPUP_CONSTANTS } from './popup-constants';\n\nexport interface IPopupAdapter extends IBaseAdapter {\n setAttribute(attribute: string, value: string, element?: HTMLElement): void;\n removeAttribute(attribute: string, element?: HTMLElement): void;\n positionPopup(): void;\n addPopup(targetElement: HTMLElement, manageFocus: boolean): void;\n removePopup(manageFocus: boolean): void;\n manageWindowEvents(add: boolean): void;\n dispatchEvent(type: string, data?: any, bubbles?: boolean, cancellable?: boolean): boolean;\n addClass(classes: string | string[]): void;\n removeClass(classes: string | string[]): void;\n setAnimationEndListener(listener: (evt: TransitionEvent) => void, classes?: string | string[]): void;\n removeEventListener(type: string, listener: (evt: Event) => void): void;\n setBlurListener(listener: () => void): () => void;\n trySetInitialFocus(): void;\n}\n\nexport class PopupAdapter extends BaseAdapter<IPopupComponent> implements IPopupAdapter {\n private _windowEventCallback?: (evt: Event) => void;\n private _previouslyFocusedElement?: HTMLElement;\n private _hostElement?: HTMLElement;\n private _rootElement: HTMLElement;\n\n constructor(component: IPopupComponent) {\n super(component);\n this._rootElement = getShadowElement(component, POPUP_CONSTANTS.selectors.CONTAINER);\n }\n\n public setAttribute(attribute: string, value: string, element?: HTMLElement): void {\n if (element) {\n element.setAttribute(attribute, value);\n } else {\n this._component.setAttribute(attribute, value);\n }\n }\n\n public removeAttribute(attribute: string, element?: HTMLElement): void {\n if (element) {\n element.removeAttribute(attribute);\n } else {\n this._component.removeAttribute(attribute);\n }\n }\n\n public async positionPopup(): Promise<void> {\n const config: IPositionElementConfig = {\n element: this._component,\n targetElement: this._component.targetElement,\n placement: this._component.placement,\n hide: this._component.hideWhenClipped\n };\n if (this._component.offset) {\n config.offset = this._component.offset;\n }\n const data: IPopupPositionEventData = await positionElementAsync(config);\n emitEvent(this._component, POPUP_CONSTANTS.events.POSITION, data);\n }\n\n public addPopup(targetElement: HTMLElement, manageFocus: boolean): void {\n this._component.setAttribute('tabindex', '-1');\n this._component.setAttribute(POPUP_CONSTANTS.attributes.HOST, '');\n const hostDocument = targetElement.ownerDocument || document;\n this._hostElement = (closestElement(POPUP_CONSTANTS.selectors.HOST, targetElement) as HTMLElement) || hostDocument.body;\n this._hostElement.appendChild(this._component);\n this.positionPopup();\n\n if (manageFocus) {\n this._previouslyFocusedElement = getActiveElement() as HTMLElement;\n this._component.focus();\n }\n }\n\n public removePopup(manageFocus: boolean): void {\n removeElement(this._component);\n\n if (manageFocus) {\n window.requestAnimationFrame(() => {\n if (this._previouslyFocusedElement) {\n const activeElement = getActiveElement();\n if (!activeElement || activeElement === document.body) {\n this._previouslyFocusedElement.focus();\n }\n this._previouslyFocusedElement = undefined;\n }\n });\n }\n\n this._hostElement = undefined;\n }\n\n public manageWindowEvents(add = false): void {\n if (add) {\n this._windowEventCallback = evt => this._windowInteraction(evt);\n window.addEventListener('scroll', this._windowEventCallback, true);\n window.addEventListener('resize', this._windowEventCallback, true);\n } else {\n if (this._windowEventCallback) {\n window.removeEventListener('scroll', this._windowEventCallback, true);\n window.removeEventListener('resize', this._windowEventCallback, true);\n this._windowEventCallback = undefined;\n }\n }\n }\n\n public dispatchEvent(type: string, data?: any, bubbles?: boolean, cancelable?: boolean): boolean {\n if (this._component.targetElement) {\n return !emitEvent(this._component.targetElement, type, data, bubbles, cancelable);\n }\n return false;\n }\n\n public addClass(classes: string | string[]): void {\n addClass(classes, this._rootElement);\n }\n\n public removeClass(classes: string | string[]): void {\n removeClass(classes, this._rootElement);\n }\n\n public setAnimationEndListener(listener: (evt: TransitionEvent) => void, classes?: string | string[]): void {\n window.requestAnimationFrame(() => {\n if (classes && classes.length) {\n addClass(classes, this._rootElement);\n }\n this._rootElement.addEventListener('transitionend', listener);\n });\n }\n\n public removeEventListener(type: string, listener: (evt: Event) => void): void {\n this._rootElement.removeEventListener(type, listener);\n }\n\n public setBlurListener(listener: () => void): () => void {\n return notChildEventListener(this._component, activeElement => {\n if (!this._component.contains(activeElement)) {\n listener();\n }\n }, true );\n }\n\n public trySetInitialFocus(): void {\n window.requestAnimationFrame(() => {\n const elements = deepQuerySelectorAll(this._component, POPUP_CONSTANTS.selectors.INITIAL_FOCUS);\n if (elements && elements.length) {\n const initialElement = elements[elements.length - 1] as HTMLElement;\n initialElement.focus();\n }\n });\n }\n\n private _windowInteraction(evt: Event): void {\n if (!this._component.open) {\n return;\n }\n\n switch (evt.type) {\n case 'scroll':\n case 'resize':\n this.positionPopup();\n break;\n default:\n break;\n }\n }\n}\n", "import { ICustomElementFoundation, isElement } from '@tylertech/forge-core';\nimport { IPopupAdapter } from './popup-adapter';\nimport { IPopupPosition, PopupAnimationType, PopupPlacement, PopupStateCallback, POPUP_CONSTANTS as constants, POPUP_CONSTANTS } from './popup-constants';\n\nexport interface IPopupFoundation extends ICustomElementFoundation {\n targetElement: HTMLElement;\n placement: PopupPlacement;\n open: boolean;\n manageFocus: boolean;\n animationType: PopupAnimationType;\n static: boolean;\n offset: IPopupPosition;\n hideWhenClipped: boolean;\n position(): void;\n openCallback: PopupStateCallback;\n closeCallback: PopupStateCallback;\n}\n\nexport class PopupFoundation implements IPopupFoundation {\n private _targetElement: HTMLElement;\n private _placement: PopupPlacement = 'bottom-start';\n private _open = false;\n private _manageFocus = false;\n private _animationType = PopupAnimationType.None;\n private _static = false;\n private _offset?: IPopupPosition;\n private _hideWhenClipped = false;\n private _destroyBlurListener: (() => void) | undefined;\n private _openCallback: PopupStateCallback;\n private _closeCallback: PopupStateCallback;\n private _blurListener: () => void;\n\n constructor(private _adapter: IPopupAdapter) {\n this._blurListener = () => this._onBlur();\n }\n\n public disconnect(): void {\n if (this.open) {\n this.open = false;\n }\n }\n\n private _openPopup(): void {\n if (this._animationType !== PopupAnimationType.None) {\n this._applyOpenAnimation();\n\n if (this._animationType === PopupAnimationType.Dropdown) {\n this._adapter.addClass(POPUP_CONSTANTS.classes.SELECT);\n }\n } else {\n this._adapter.addClass(POPUP_CONSTANTS.classes.OPEN);\n }\n\n this._adapter.setAttribute(POPUP_CONSTANTS.attributes.OPEN, '');\n this._adapter.addPopup(this.targetElement, this._manageFocus);\n this._adapter.trySetInitialFocus();\n\n if (this._destroyBlurListener) {\n this._destroyBlurListener();\n }\n\n if (!this._static) {\n this._destroyBlurListener = this._adapter.setBlurListener(this._blurListener);\n }\n\n this._adapter.manageWindowEvents(true);\n this._adapter.dispatchEvent(constants.events.OPEN);\n }\n\n private _closePopup(): void {\n if (this._destroyBlurListener) {\n this._destroyBlurListener();\n this._destroyBlurListener = undefined;\n }\n\n if (this._animationType !== PopupAnimationType.None) {\n this._applyCloseAnimation();\n } else {\n this._destroyPopup();\n }\n }\n\n private _destroyPopup(): void {\n this._adapter.manageWindowEvents(false);\n this._adapter.removePopup(this._manageFocus);\n this._adapter.dispatchEvent(constants.events.CLOSE);\n this._adapter.removeAttribute(POPUP_CONSTANTS.attributes.OPEN);\n }\n\n private _applyOpenAnimation(): void {\n switch (this._animationType) {\n case PopupAnimationType.Dropdown:\n case PopupAnimationType.Menu:\n this._adapter.addClass(POPUP_CONSTANTS.classes.OPENING);\n const transitionEndListener = (evt: TransitionEvent): void => {\n if (evt.propertyName === 'transform') {\n this._adapter.removeClass(POPUP_CONSTANTS.classes.OPENING);\n this._adapter.removeEventListener('transitionend', transitionEndListener);\n }\n };\n this._adapter.setAnimationEndListener(transitionEndListener, POPUP_CONSTANTS.classes.OPEN);\n break;\n }\n }\n\n private _applyCloseAnimation(): void {\n switch (this._animationType) {\n case PopupAnimationType.Dropdown:\n case PopupAnimationType.Menu:\n this._adapter.removeClass(POPUP_CONSTANTS.classes.OPEN);\n this._adapter.addClass(POPUP_CONSTANTS.classes.CLOSED);\n const transitionEndListener = (evt: TransitionEvent): void => {\n if (evt.propertyName === 'opacity') {\n if (fallbackTimer) {\n clearTimeout(fallbackTimer);\n }\n this._destroyPopup();\n }\n };\n this._adapter.setAnimationEndListener(transitionEndListener);\n const fallbackTimer = setTimeout(() => this._destroyPopup(), POPUP_CONSTANTS.numbers.ANIMATION_DURATION);\n break;\n }\n }\n\n private _onBlur(): void {\n const cancelled = this._adapter.dispatchEvent(POPUP_CONSTANTS.events.BLUR, undefined, true, true);\n if (!cancelled) {\n this.open = false;\n }\n }\n\n private _applyOpen(): void {\n if (this._open) {\n if (!this.targetElement || !isElement(this.targetElement)) {\n throw new Error('targetElement on Popup component must be an HTMLElement');\n }\n\n if (typeof this._openCallback === 'function') {\n this._executeOpenCallback();\n } else {\n this._openPopup();\n }\n } else {\n if (typeof this._closeCallback === 'function') {\n this._executeCloseCallback();\n } else {\n this._closePopup();\n }\n }\n }\n\n private async _executeOpenCallback(): Promise<void> {\n try {\n if (await Promise.resolve(this._openCallback()) !== false) {\n this._openPopup();\n } else {\n this._open = false;\n }\n } catch (e) {\n this._open = false;\n }\n }\n\n private async _executeCloseCallback(): Promise<void> {\n try {\n if (await Promise.resolve(this._closeCallback()) !== false) {\n this._closePopup();\n } else {\n this._open = true;\n }\n } catch (e) {\n this._open = true;\n }\n }\n\n public get targetElement(): HTMLElement {\n return this._targetElement;\n }\n public set targetElement(element: HTMLElement) {\n if (!element || !isElement(element)) {\n throw new Error('targetElement on Popup component must be an HTMLElement');\n }\n this._targetElement = element;\n }\n\n public get placement(): PopupPlacement {\n return this._placement;\n }\n public set placement(value: PopupPlacement) {\n if (this._placement !== value) {\n this._placement = value || 'bottom-start';\n this._adapter.setAttribute(POPUP_CONSTANTS.attributes.PLACEMENT, this._placement);\n }\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n this._open = value;\n this._applyOpen();\n }\n }\n\n public get manageFocus(): boolean {\n return this._manageFocus;\n }\n public set manageFocus(value: boolean) {\n if (this._manageFocus !== value) {\n this._manageFocus = value;\n }\n }\n\n public get animationType(): PopupAnimationType {\n return this._animationType;\n }\n public set animationType(value: PopupAnimationType) {\n if (this._animationType !== value) {\n this._animationType = value;\n }\n }\n\n public get static(): boolean {\n return this._static;\n }\n public set static(value: boolean) {\n if (this._static !== value) {\n this._static = value;\n if (this._static && this._destroyBlurListener) {\n this._destroyBlurListener();\n this._destroyBlurListener = undefined;\n }\n }\n }\n\n public get hideWhenClipped(): boolean {\n return this._hideWhenClipped;\n }\n public set hideWhenClipped(value: boolean) {\n if (this._hideWhenClipped !== value) {\n this._hideWhenClipped = value;\n }\n }\n\n public get offset(): IPopupPosition {\n return this._offset ?? { x: 0, y: 0 };\n }\n public set offset(value: IPopupPosition) {\n if (!value) {\n this._offset = undefined;\n } else {\n this._offset = {\n x: value.x ?? 0,\n y: value.y ?? 0\n };\n }\n if (this._open) {\n this._adapter.positionPopup();\n }\n }\n\n public get openCallback(): PopupStateCallback {\n return this._openCallback;\n }\n public set openCallback(callback: PopupStateCallback) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): PopupStateCallback {\n return this._closeCallback;\n }\n public set closeCallback(callback: PopupStateCallback) {\n this._closeCallback = callback;\n }\n\n public position(): void {\n this._adapter.positionPopup();\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, FoundationProperty, isDefined } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { PopupAdapter } from './popup-adapter';\nimport { IPopupPosition, IPopupPositionEventData, PopupAnimationType, PopupPlacement, PopupStateCallback, POPUP_CONSTANTS } from './popup-constants';\nimport { PopupFoundation } from './popup-foundation';\n\n\nconst template = '<template><div class=\\\"forge-popup\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '.forge-popup{min-width:112px;min-width:var(--min-width,112px);background-color:#fff;background-color:var(--forge-theme-elevated-surface,#fff);-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));box-shadow:var(--forge-theme-popup-elevation,0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12));color:#000;color:var(--mdc-theme-on-surface,#000);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:none;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:100%;margin:0;padding:0;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 24px 0;transform-origin:50% 24px 0;opacity:0;will-change:transform,opacity;-webkit-transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,-webkit-transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1);transition:opacity 120ms linear,transform 120ms cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms cubic-bezier(0, 0, .2, 1)}.forge-popup::-webkit-scrollbar{width:16px;width:var(--forge-scrollbar-width,16px);height:16px;height:var(--forge-scrollbar-height,16px)}.forge-popup::-webkit-scrollbar-corner{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track{background-color:#f0f0f0;background-color:var(--forge-theme-scrollbar-track,#f0f0f0)}.forge-popup::-webkit-scrollbar-track:hover{background-color:#ececec;background-color:var(--forge-theme-scrollbar-track-hover,#ececec)}.forge-popup::-webkit-scrollbar-thumb{background-color:#bdbdbd;background-color:var(--forge-theme-scrollbar-thumb,#bdbdbd);height:32px;height:var(--forge-scrollbar-min-height,32px);width:32px;width:var(--forge-scrollbar-min-width,32px);border-radius:10px;border-radius:var(--forge-scrollbar-border-radius,10px);border-width:3px;border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-clip:content-box}.forge-popup::-webkit-scrollbar-thumb:hover{background-color:#9e9e9e;background-color:var(--forge-theme-scrollbar-thumb-hover,#9e9e9e)}.forge-popup--opening{display:block;-webkit-transform:scale(.8);transform:scale(.8);opacity:0}.forge-popup--closed{display:block;opacity:0;-webkit-transition:opacity 120ms linear;transition:opacity 120ms linear}.forge-popup--open{display:block;-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-popup--select{border-top-left-radius:0;border-top-right-radius:0;max-height:256px;overflow-y:auto}:host{z-index:10;z-index:var(--forge-z-index-popup,10);border-radius:4px;border-radius:var(--mdc-shape-medium,4px);display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;position:absolute;overflow:visible}:host([hidden]){display:none}';\n\nexport interface IPopupComponent extends IBaseComponent {\n targetElement: HTMLElement;\n placement: PopupPlacement;\n open: boolean;\n manageFocus: boolean;\n animationType: `${PopupAnimationType}`;\n static: boolean;\n offset: IPopupPosition;\n hideWhenClipped: boolean;\n position(): void;\n openCallback: PopupStateCallback;\n closeCallback: PopupStateCallback;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-popup': IPopupComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-popup-open': CustomEvent<void>;\n 'forge-popup-close': CustomEvent<void>;\n 'forge-popup-position': CustomEvent<IPopupPositionEventData>;\n 'forge-popup-blur': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-popup>` custom element.\n * \n * @tag forge-popup\n */\n@CustomElement({\n name: POPUP_CONSTANTS.elementName\n})\nexport class PopupComponent extends BaseComponent implements IPopupComponent {\n private _foundation: PopupFoundation;\n\n public static get observedAttributes(): string[] {\n return [\n POPUP_CONSTANTS.attributes.OPEN,\n POPUP_CONSTANTS.attributes.PLACEMENT,\n POPUP_CONSTANTS.attributes.MANAGE_FOCUS,\n POPUP_CONSTANTS.attributes.ANIMATION_TYPE,\n POPUP_CONSTANTS.attributes.STATIC,\n POPUP_CONSTANTS.attributes.HIDE_WHEN_CLIPPED\n ];\n }\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new PopupFoundation(new PopupAdapter(this));\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 POPUP_CONSTANTS.attributes.OPEN:\n this.open = isDefined(newValue);\n break;\n case POPUP_CONSTANTS.attributes.PLACEMENT:\n this.placement = newValue as PopupPlacement;\n break;\n case POPUP_CONSTANTS.attributes.MANAGE_FOCUS:\n this.manageFocus = coerceBoolean(newValue);\n break;\n case POPUP_CONSTANTS.attributes.ANIMATION_TYPE:\n this.animationType = newValue as PopupAnimationType;\n break;\n case POPUP_CONSTANTS.attributes.STATIC:\n this.static = coerceBoolean(newValue);\n break;\n case POPUP_CONSTANTS.attributes.HIDE_WHEN_CLIPPED:\n this.hideWhenClipped = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public targetElement: HTMLElement;\n\n @FoundationProperty()\n public placement: `${PopupPlacement}`;\n\n @FoundationProperty()\n public open: boolean;\n\n @FoundationProperty()\n public manageFocus: boolean;\n\n @FoundationProperty()\n public animationType: `${PopupAnimationType}`;\n\n @FoundationProperty()\n public static: boolean;\n\n @FoundationProperty()\n public hideWhenClipped: boolean;\n\n @FoundationProperty()\n public openCallback: PopupStateCallback;\n\n @FoundationProperty()\n public closeCallback: PopupStateCallback;\n\n @FoundationProperty()\n public offset: IPopupPosition;\n\n public position(): void {\n this._foundation.position();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { PopupComponent } from './popup';\n\nexport * from './popup-adapter';\nexport * from './popup-constants';\nexport * from './popup-foundation';\nexport * from './popup';\n\nexport function definePopupComponent(): void {\n defineCustomElement(PopupComponent);\n}\n"],
5
- "mappings": "ubAGA,GAAM,GAA2C,GAAG,SAE9C,EAAa,CACjB,UAAW,cACX,KAAM,OACN,UAAW,YACX,aAAc,eACd,eAAgB,iBAChB,OAAQ,SACR,kBAAmB,oBACnB,KAAM,mBACN,cAAe,mBACjB,EAEM,EAAU,CACd,KAAM,oBACN,QAAS,uBACT,OAAQ,sBACR,OAAQ,qBACV,EAEM,EAAY,CAChB,KAAM,uBAAuB,EAAW,QACxC,UAAW,eACX,cAAe,IAAI,EAAW,gBAChC,EAEM,EAAS,CACb,KAAM,GAAG,SACT,MAAO,GAAG,UACV,SAAU,GAAG,aACb,KAAM,GAAG,QACX,EAEM,EAAU,CACd,mBAAoB,GACtB,EAEa,EAAkB,CAC7B,cACA,UACA,YACA,aACA,SACA,SACF,EASY,EAAL,CAAK,GACV,QAAO,OACP,OAAO,OACP,WAAW,WAHD,WCpCL,GAAM,GAAN,aAA2B,EAAsD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K,gBAAkB,EAAc,CAAQ,EAC7C,MAEN,CAgCA,AAAO,UAAiB,CACtB,KAAK,YAAY,SAAS,CAC5B,CACF,EAhCS,GADP,AAAC,EAAmB,GACb,AAhDI,EAgDJ,6BAGA,GADP,AAAC,EAAmB,GACb,AAnDI,EAmDJ,yBAGA,GADP,AAAC,EAAmB,GACb,AAtDI,EAsDJ,oBAGA,GADP,AAAC,EAAmB,GACb,AAzDI,EAyDJ,2BAGA,GADP,AAAC,EAAmB,GACb,AA5DI,EA4DJ,6BAGA,GADP,AAAC,EAAmB,GACb,AA/DI,EA+DJ,sBAGA,GADP,AAAC,EAAmB,GACb,AAlEI,EAkEJ,+BAGA,GADP,AAAC,EAAmB,GACb,AArEI,EAqEJ,4BAGA,GADP,AAAC,EAAmB,GACb,AAxEI,EAwEJ,6BAGA,GADP,AAAC,EAAmB,GACb,AA3EI,EA2EJ,sBA3EI,EAAN,GAHP,AAAC,EAAc,CACb,KAAM,EAAgB,WACxB,CAAC,GACY,GCpCN,aAAsC,CAC3C,EAAoB,CAAc,CACpC",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as E,u as i,w as A}from"./chunk.JB6U32SJ.js";import{a as T}from"./chunk.A23NSEWA.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as I}from"./chunk.BSZ2LBJX.js";import{a as k}from"./chunk.3E5QKMHL.js";import{a as w,e as C,g as y}from"./chunk.HN4PXH3D.js";import{k as b,l as _,p as S}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(e,t,s){var a,n;r._targets.has(e)&&((a=r._observer)===null||a===void 0||a.unobserve(e)),r._targets.set(e,t),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(e,s)}static unobserve(e){var t;r._targets.delete(e),(t=r._observer)===null||t===void 0||t.unobserve(e),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(e=>{var t;(t=r._targets.get(e.target))===null||t===void 0||t(e)})};var h=class extends T{constructor(t){super(t);this._root=y(t,i.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}observeResize(t){r.observe(this._root,t)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(t)}refitSlottedPanels(t){let s=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),n=a.map(p=>{var u;let l=(u=p.shadowRoot)==null?void 0:u.querySelector(E.selectors.ROOT),m=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return m!=null?m:0}).reduce((p,l)=>p+l,0);if(n<=s)return;let g=n-s;a.reverse().forEach(p=>{if(g<=0)return;let l=p.getContentSize(),m=p.getCollapsibleSize(),u=Math.min(g,m),P=l-u;p.setContentSize(P),g-=u})}};var v=class{constructor(e){this._adapter=e;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=t=>this._onSlotChange(t),this._resizeObserverCallback=S(t=>this._onResize(t),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(e){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onResize(e){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let e=this._adapter.getSlottedPanels();e.length<2||e.some(t=>t.resizable!=="off")||e.slice(1).forEach(t=>t.resizable="start")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(e){this._allowClose!==e&&(this._allowClose=e,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(e){this._autoClose!==e&&(this._autoClose=e,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(e){this._autoCloseThreshold!==e&&(this._autoCloseThreshold=e,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(e){let t=this._adapter.getSlottedPanels(),s=e.resizable==="start"?1:-1,a=e.resizable==="start"?1:3;t.forEach(n=>{(n===e||a===2)&&(a+=s),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(t=>{t.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(e){this._adapter.getSlottedPanels().forEach(s=>{s.update(e)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var z='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',O='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',o=class extends k{constructor(){super();C(this,z,O),this._foundation=new v(new h(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,s,a){switch(t){case i.attributes.ORIENTATION:this.orientation=a;break;case i.attributes.DISABLED:this.disabled=b(a);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(a);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(a);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=_(a);break}}layerSlottedPanels(t){this._foundation.layerSlottedPanels(t)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(t){this._foundation.update(t)}refit(){this._foundation.refitSlottedPanels()}};d([c()],o.prototype,"orientation",2),d([c()],o.prototype,"disabled",2),d([c()],o.prototype,"allowClose",2),d([c()],o.prototype,"autoClose",2),d([c()],o.prototype,"autoCloseThreshold",2),o=d([I({name:i.elementName,dependencies:[A]})],o);function de(){w(o)}export{h as a,v as b,o as c,de as d};
7
- //# sourceMappingURL=chunk.HMZ24WLE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../node_modules/@tylertech/forge-core/esm/resize/resize-observer.js", "../../src/split-view/split-view/split-view-adapter.ts", "../../src/split-view/split-view/split-view-foundation.ts", "../../src/split-view/split-view/split-view.ts", "../../src/split-view/split-view/index.ts"],
4
- "sourcesContent": ["/**\n * Provides a set of methods for observing and responding to resizing of elements.\n */\nexport class ForgeResizeObserver {\n /**\n * Initiates the observing of a specified `Element`. Calling with an already observed `Element`\n * overwrites the exisiting observation. It is expected that the consumer will eventually\n * {@link unobserve} the `Element` to avoid memory leaks.\n *\n * @param target An `Element` reference.\n * @param callback A function that accepts a `ResizeObserverEntry` for the `Element`.\n * @param options An options object allowing you to set options for the observation.\n */\n static observe(target, callback, options) {\n var _a, _b;\n if (ForgeResizeObserver._targets.has(target)) {\n (_a = ForgeResizeObserver._observer) === null || _a === void 0 ? void 0 : _a.unobserve(target);\n }\n ForgeResizeObserver._targets.set(target, callback);\n ForgeResizeObserver._countTargets();\n (_b = ForgeResizeObserver._observer) === null || _b === void 0 ? void 0 : _b.observe(target, options);\n }\n /**\n * Ends the observing of a specified `Element`.\n *\n * @param target An `Element` reference.\n */\n static unobserve(target) {\n var _a;\n ForgeResizeObserver._targets.delete(target);\n (_a = ForgeResizeObserver._observer) === null || _a === void 0 ? void 0 : _a.unobserve(target);\n ForgeResizeObserver._countTargets();\n }\n /**\n * Creates or destroys the `ResizeObserver` based on whether targets exist.\n */\n static _countTargets() {\n if (ForgeResizeObserver._observer) {\n // If there are no targets destroy the observer\n if (ForgeResizeObserver._targets.size < 1) {\n ForgeResizeObserver._observer = undefined;\n }\n }\n else {\n // If there are targets create the observer\n if (ForgeResizeObserver._targets.size) {\n ForgeResizeObserver._observer = new ResizeObserver(ForgeResizeObserver._handleResize);\n }\n }\n }\n}\nForgeResizeObserver._targets = new Map();\n/**\n * Runs the callback function of targets when they are resized.\n *\n * @param entries An array of `ResizeObserverEntry`s.\n */\nForgeResizeObserver._handleResize = entries => {\n entries.forEach(entry => {\n var _a;\n (_a = ForgeResizeObserver._targets.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n });\n};\n", "import { ForgeResizeObserver, getShadowElement } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { ISplitViewPanelComponent, SPLIT_VIEW_PANEL_CONSTANTS } from '../split-view-panel';\nimport { ISplitViewComponent } from './split-view';\nimport { SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\n\nexport interface ISplitViewAdapter extends IBaseAdapter {\n registerSlotListener(listener: (evt: Event) => void): void;\n observeResize(callback: (entry: ResizeObserverEntry) => void): void;\n unobserveResize(): void;\n getSlottedPanels(): ISplitViewPanelComponent[];\n refitSlottedPanels(orientation: SplitViewOrientation): void;\n}\n\nexport class SplitViewAdapter extends BaseAdapter<ISplitViewComponent> implements ISplitViewAdapter {\n private _root: HTMLElement;\n\n constructor(component: ISplitViewComponent) {\n super(component);\n this._root = getShadowElement(component, SPLIT_VIEW_CONSTANTS.selectors.ROOT);\n }\n\n public registerSlotListener(listener: (evt: Event) => void): void {\n this._root.addEventListener('slotchange', listener);\n }\n\n public observeResize(callback: (entry: ResizeObserverEntry) => void): void {\n ForgeResizeObserver.observe(this._root, callback);\n }\n \n public unobserveResize(): void {\n ForgeResizeObserver.unobserve(this._root);\n }\n \n /**\n * Gets all child panels.\n * @returns All child panels.\n */\n public getSlottedPanels(): ISplitViewPanelComponent[] {\n const nodeList = this._component.querySelectorAll<ISplitViewPanelComponent>(SPLIT_VIEW_CONSTANTS.selectors.PANEL);\n return Array.from(nodeList);\n }\n\n public refitSlottedPanels(orientation: SplitViewOrientation): void {\n // Check if the combined panel size is greater than the split view size along the relevant axis\n const size = orientation === 'horizontal' ? this._root.clientWidth : this._root.clientHeight;\n const panels = this.getSlottedPanels();\n const combinedPanelSize = panels.map(panel => {\n const panelRoot = panel.shadowRoot?.querySelector(SPLIT_VIEW_PANEL_CONSTANTS.selectors.ROOT);\n const panelSize = orientation === 'horizontal' ? panelRoot?.clientWidth : panelRoot?.clientHeight;\n return panelSize ?? 0;\n }).reduce((cur, acc) => cur + acc, 0);\n\n // Do nothing if all the panels fit\n if (combinedPanelSize <= size) {\n return;\n }\n\n // Get the size adjustment needed to fit\n let diff = combinedPanelSize - size;\n\n // Size down the panels as needed in reverse order, adjusting diff accordingly\n panels.reverse().forEach(panel => {\n if (diff <= 0) {\n return;\n }\n\n const panelSize = panel.getContentSize();\n const collapsibleSize = panel.getCollapsibleSize();\n const reduceBy = Math.min(diff, collapsibleSize);\n const newSize = panelSize - reduceBy;\n\n panel.setContentSize(newSize);\n\n diff -= reduceBy;\n });\n\n // If there's still overflow nothing else can be done\n }\n}\n", "import { ForgeResizeObserverCallback, ICustomElementFoundation, throttle } from '@tylertech/forge-core';\n\nimport { ISplitViewBase } from '../core/split-view-base';\nimport { ISplitViewPanelComponent, SplitViewAnimatingLayer } from '../split-view-panel';\nimport { ISplitViewAdapter } from './split-view-adapter';\nimport { ISplitViewUpdateConfig, SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\n\nexport interface ISplitViewFoundation extends ISplitViewBase, ICustomElementFoundation {\n orientation: SplitViewOrientation;\n layerSlottedPanels(target: ISplitViewPanelComponent): void;\n unlayerSlottedPanels(): void;\n update(config: ISplitViewUpdateConfig): void;\n refitSlottedPanels(): void;\n}\n\nexport class SplitViewFoundation implements ISplitViewFoundation {\n private _orientation: SplitViewOrientation = 'horizontal';\n private _disabled = false;\n private _allowClose = false;\n private _autoClose = false;\n private _autoCloseThreshold = 0;\n private _slotListener: (evt: Event) => void;\n private _resizeObserverCallback: ForgeResizeObserverCallback;\n private _isInitialized = false;\n\n constructor(private _adapter: ISplitViewAdapter) {\n this._slotListener = evt => this._onSlotChange(evt);\n this._resizeObserverCallback = throttle((entry: ResizeObserverEntry) => this._onResize(entry), SPLIT_VIEW_CONSTANTS.numbers.RESIZE_THROTTLE_THRESHOLD);\n }\n\n public initialize(): void {\n this._adapter.registerSlotListener(this._slotListener);\n this._adapter.observeResize(this._resizeObserverCallback);\n \n this._applyOrientation();\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._adapter.unobserveResize();\n }\n\n private _onSlotChange(evt: Event): void {\n this._layoutSlottedPanels();\n this.update({ accessibility: true, cursor: true, orientation: this._orientation });\n }\n\n private _onResize(entry: ResizeObserverEntry): void {\n this.update({ accessibility: true, cursor: true, size: true });\n }\n\n /**\n * Sets the resizable value of slotted panels with no resizable value set.\n */\n private _layoutSlottedPanels(): void {\n const panels = this._adapter.getSlottedPanels();\n\n // A single panel should have resizable set to off. Just leave it alone.\n if (panels.length < 2) {\n return;\n }\n\n // Don't change any panels if resizable is already set.\n if (panels.some(panel => panel.resizable !== 'off')) {\n return;\n }\n\n // All panels after the first have resizable set to start.\n panels.slice(1).forEach(panel => panel.resizable = 'start');\n }\n\n /**\n * Get/set whether panels are arranged horizontally or vertically.\n */\n public get orientation(): SplitViewOrientation {\n return this._orientation;\n }\n public set orientation(value: SplitViewOrientation) {\n if (this._orientation !== value) {\n this._orientation = value;\n this._applyOrientation();\n }\n }\n\n private _applyOrientation(): void {\n this._adapter.setHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION, this._orientation);\n this.update({ orientation: this._orientation });\n\n if (this._isInitialized) {\n this._adapter.refitSlottedPanels(this._orientation);\n }\n this.update({ accessibility: true, cursor: true });\n }\n\n /**\n * Get/set whether interactions are disabled.\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 this._applyDisabled();\n }\n }\n\n private _applyDisabled(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.DISABLED, this._disabled);\n this.update({ properties: { disabled: this._disabled } });\n }\n\n /**\n * Get/set whether closing the panel is disabled.\n */\n public get allowClose(): boolean {\n return this._allowClose;\n }\n public set allowClose(value: boolean) {\n if (this._allowClose !== value) {\n this._allowClose = value;\n this._applyAllowClose();\n }\n }\n\n private _applyAllowClose(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE, this._allowClose);\n this.update({ properties: { allowClose: this._allowClose } });\n }\n\n /**\n * Get/set whether the panel closes when a threshold size is reached.\n */\n public get autoClose(): boolean {\n return this._autoClose;\n }\n public set autoClose(value: boolean) {\n if (this._autoClose !== value) {\n this._autoClose = value;\n this._applyAutoClose();\n }\n }\n\n private _applyAutoClose(): void {\n this._adapter.toggleHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE, this._autoClose);\n this.update({ properties: { autoClose: this._autoClose } });\n }\n\n /**\n * Get/set the size at which panels auto close.\n */\n public get autoCloseThreshold(): number {\n return this._autoCloseThreshold;\n }\n public set autoCloseThreshold(value: number) {\n if (this._autoCloseThreshold !== value) {\n this._autoCloseThreshold = value;\n this._applyAutoCloseThreshold();\n }\n }\n\n private _applyAutoCloseThreshold(): void {\n this._adapter.setHostAttribute(SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD, this._autoCloseThreshold.toString());\n this.update({ properties: { autoCloseThreshold: this._autoCloseThreshold } });\n }\n\n /**\n * Layers panels in a set order during an animation. Panels that the target is animating toward\n * stack above it and other layers stack under it.\n * @param target The animating panel.\n */\n public layerSlottedPanels(target: ISplitViewPanelComponent): void {\n const panels = this._adapter.getSlottedPanels();\n const increment = target.resizable === 'start' ? 1 : -1;\n let layer = target.resizable === 'start' ? SplitViewAnimatingLayer.Under : SplitViewAnimatingLayer.Above;\n\n panels.forEach(panel => {\n // Increment the layer if moving into or out of the target panel\n if (panel === target || layer === SplitViewAnimatingLayer.Active) {\n layer += increment;\n }\n panel.style.setProperty(SPLIT_VIEW_CONSTANTS.customCssProperties.ANIMATING_LAYER, layer.toString());\n });\n }\n\n /**\n * Removes layering after an animation.\n */\n public unlayerSlottedPanels(): void {\n const panels = this._adapter.getSlottedPanels();\n panels.forEach(panel => {\n panel.style.removeProperty(SPLIT_VIEW_CONSTANTS.customCssProperties.ANIMATING_LAYER);\n });\n }\n\n /**\n * Updates the provided characteristics of each panel.\n * @param config An update configuration.\n */\n public update(config: ISplitViewUpdateConfig): void {\n const panels = this._adapter.getSlottedPanels();\n panels.forEach(panel => {\n panel.update(config);\n });\n }\n\n /**\n * Resizes panels within the split view to avoid overflow.\n */\n public refitSlottedPanels(): void {\n this._adapter.refitSlottedPanels(this._orientation);\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean, coerceNumber } from '@tylertech/forge-core';\n\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { SplitViewAdapter } from './split-view-adapter';\nimport { SplitViewFoundation } from './split-view-foundation';\nimport { ISplitViewUpdateConfig, SplitViewOrientation, SPLIT_VIEW_CONSTANTS } from './split-view-constants';\nimport { ISplitViewPanelComponent, SplitViewPanelComponent } from '../split-view-panel';\nimport { ISplitViewBase } from '../core/split-view-base';\n\nconst template = '<template><div class=\\\"forge-split-view\\\" id=\\\"root\\\" part=\\\"root\\\"><slot></slot></div></template>';\nconst styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}';\n\nexport interface ISplitViewComponent extends ISplitViewBase, IBaseComponent {\n orientation: SplitViewOrientation;\n layerSlottedPanels(target: ISplitViewPanelComponent): void;\n unlayerSlottedPanels(): void;\n update(config: ISplitViewUpdateConfig): void;\n refit(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-split-view': ISplitViewComponent;\n }\n}\n\n@CustomElement({\n name: SPLIT_VIEW_CONSTANTS.elementName,\n dependencies: [SplitViewPanelComponent]\n})\nexport class SplitViewComponent extends BaseComponent implements ISplitViewComponent {\n public static get observedAttributes(): string[] {\n return [\n SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION,\n SPLIT_VIEW_CONSTANTS.attributes.DISABLED,\n SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE,\n SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE,\n SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD\n ];\n }\n\n private _foundation: SplitViewFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new SplitViewFoundation(new SplitViewAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case SPLIT_VIEW_CONSTANTS.attributes.ORIENTATION:\n this.orientation = newValue as SplitViewOrientation;\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.ALLOW_CLOSE:\n this.allowClose = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE:\n this.autoClose = coerceBoolean(newValue);\n break;\n case SPLIT_VIEW_CONSTANTS.attributes.AUTO_CLOSE_THRESHOLD:\n this.autoCloseThreshold = coerceNumber(newValue);\n break;\n }\n }\n\n /**\n * Whether child split view panels are laid out and resize horizontally or vertically.\n */\n @FoundationProperty()\n public orientation: SplitViewOrientation;\n\n /**\n * Whether child split view panels have resize interactions disabled or enabled.\n */\n @FoundationProperty()\n public disabled: boolean;\n\n /**\n * Whether child split view panels can be closed via keyboard interaction.\n */\n @FoundationProperty()\n public allowClose: boolean;\n\n /**\n * Whether child split view panels automatically close when they reach a size of 0.\n */\n @FoundationProperty()\n public autoClose: boolean;\n\n /**\n * The size at which panels auto close.\n */\n @FoundationProperty()\n public autoCloseThreshold: number;\n\n /**\n * Arranges split view panels to avoid overlapping during animations.\n * @param target The originating split view panel component.\n */\n public layerSlottedPanels(target: ISplitViewPanelComponent): void {\n this._foundation.layerSlottedPanels(target);\n }\n\n /**\n * Removes presentation data set during an animation.\n */\n public unlayerSlottedPanels(): void {\n this._foundation.unlayerSlottedPanels();\n }\n\n /**\n * Updates the provided characteristics of each slotted panel.\n * @param config An update configuration.\n */\n public update(config: ISplitViewUpdateConfig): void {\n this._foundation.update(config);\n }\n\n /**\n * Resizes panels within the split view to avoid overflow.\n */\n public refit(): void {\n this._foundation.refitSlottedPanels();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SplitViewComponent } from './split-view';\n\nexport * from './split-view-adapter';\nexport * from './split-view-constants';\nexport * from './split-view-foundation';\nexport * from './split-view';\n\nexport function defineSplitViewComponent(): void {\n defineCustomElement(SplitViewComponent);\n}\n"],
5
- "mappings": "0WAGO,GAAM,GAAN,KAA0B,CAU7B,MAAO,SAAQ,EAAQ,EAAU,EAAS,CACtC,GAAI,GAAI,EACR,AAAI,EAAoB,SAAS,IAAI,CAAM,GACtC,IAAK,EAAoB,aAAe,MAAQ,IAAO,QAAkB,EAAG,UAAU,CAAM,GAEjG,EAAoB,SAAS,IAAI,EAAQ,CAAQ,EACjD,EAAoB,cAAc,EACjC,GAAK,EAAoB,aAAe,MAAQ,IAAO,QAAkB,EAAG,QAAQ,EAAQ,CAAO,CACxG,CAMA,MAAO,WAAU,EAAQ,CACrB,GAAI,GACJ,EAAoB,SAAS,OAAO,CAAM,EACzC,GAAK,EAAoB,aAAe,MAAQ,IAAO,QAAkB,EAAG,UAAU,CAAM,EAC7F,EAAoB,cAAc,CACtC,CAIA,MAAO,gBAAgB,CACnB,AAAI,EAAoB,UAEhB,EAAoB,SAAS,KAAO,GACpC,GAAoB,UAAY,QAKhC,EAAoB,SAAS,MAC7B,GAAoB,UAAY,GAAI,gBAAe,EAAoB,aAAa,EAGhG,CACJ,EACA,EAAoB,SAAW,GAAI,KAMnC,EAAoB,cAAgB,GAAW,CAC3C,EAAQ,QAAQ,GAAS,CACrB,GAAI,GACJ,AAAC,GAAK,EAAoB,SAAS,IAAI,EAAM,MAAM,KAAO,MAAQ,IAAO,QAAkB,EAAG,CAAK,CACvG,CAAC,CACL,EC/CO,GAAM,GAAN,aAA+B,EAA8D,CAGlG,YAAY,EAAgC,CAC1C,MAAM,CAAS,EACf,KAAK,MAAQ,EAAiB,EAAW,EAAqB,UAAU,IAAI,CAC9E,CAEA,AAAO,qBAAqB,EAAsC,CAChE,KAAK,MAAM,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AO,EAAsC,CAClD,KAAK,YAAY,OAAO,CAAM,CAChC,CAKA,AAAO,OAAc,CACnB,KAAK,YAAY,mBAAmB,CACtC,CACF,EAvDS,GADP,AAAC,EAAmB,GACb,AAnDI,EAmDJ,2BAMA,GADP,AAAC,EAAmB,GACb,AAzDI,EAyDJ,wBAMA,GADP,AAAC,EAAmB,GACb,AA/DI,EA+DJ,0BAMA,GADP,AAAC,EAAmB,GACb,AArEI,EAqEJ,yBAMA,GADP,AAAC,EAAmB,GACb,AA3EI,EA2EJ,kCA3EI,EAAN,GAJP,AAAC,EAAc,CACb,KAAM,EAAqB,YAC3B,aAAc,CAAC,CAAuB,CACxC,CAAC,GACY,GCrBN,aAA0C,CAC/C,EAAoB,CAAkB,CACxC",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{b as Y}from"./chunk.E37HEAJ5.js";import{f as Z}from"./chunk.QXLPBYMX.js";import{m as B}from"./chunk.LZMYHIO2.js";import{d as W,l as X}from"./chunk.7TQYFMM4.js";import{s as U,u as C,v as m}from"./chunk.AABG6MSC.js";import{b as x}from"./chunk.GVQVA7P3.js";import{a as K}from"./chunk.A23NSEWA.js";import{a as d}from"./chunk.B3IJU6XJ.js";import{a as H,b as z}from"./chunk.BSZ2LBJX.js";import{a as M}from"./chunk.3E5QKMHL.js";import{a as N,e as D,g as _}from"./chunk.HN4PXH3D.js";import{h as k,u as g}from"./chunk.R4NDFXVA.js";import{b as p,k as w,l as R}from"./chunk.G76HB2FK.js";import{a as f,b as h,f as l}from"./chunk.MCIQXNKY.js";var c=`${z}split-view-panel`,ae={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},oe={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},se={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,RIPPLE:`#${v.RIPPLE}`,CONTENT:`#${v.CONTENT}`},le={WILL_RESIZE:`${c}-will-resize`,RESIZE_START:`${c}-resize-start`,RESIZE_END:`${c}-resize-end`,RESIZE:`${c}-resize`,DID_OPEN:`${c}-did-open`,DID_CLOSE:`${c}-did-close`,WILL_OPEN:`${c}-will-open`,WILL_CLOSE:`${c}-will-close`},pe={RIPPLE_ACTIVATION_WAIT:200},de={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:ae,classes:oe,ids:v,selectors:se,events:le,numbers:pe,customCssProperties:de},ue=(n=>(n[n.Under=1]="Under",n[n.Active=2]="Active",n[n.Above=3]="Above",n))(ue||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function q(r,t){let e=r.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:r.getAvailableSpace(t.orientation,t.resizable),siblingSize:r.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function G(r){return h(f({},r),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function F(r,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let n=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,o=e.startPoint-a;e.resizable==="start"&&(o*=-1);let u=e.startSize-o;e.currentSize=y(u,e),r.setContentSize(e.currentSize),E(r,e,"pointer"),r.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(r,S,e),n!==e.currentSize}function j(r,t,e){if(e.startSize===void 0)return!1;let n=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=y(a,e),r.setContentSize(e.currentSize),E(r,e,"keyboard"),r.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(r,o,e),n!==e.currentSize}function J(r,t){return r.setContentSize(t.min),t.min}function Q(r,t){let e=r.getAvailableSpace(t.orientation,t.resizable),n=m(t.max,e);return r.setContentSize(n),n}function ee(r,t,e){if(e.siblingSize!==void 0){let n=e.siblingSize+t;r.setSiblingContentSize(n)}}function y(r,t){return r=Math.max(r,t.min),r=m(r,t.max,t.availableSpace),r}function E(r,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(r.activateRipple(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let n=m(t.max,t.availableSpace);return t.currentSize>=n?(t.isAtMax||(r.activateRipple(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&r.setBodyCursor(t.orientation),!1)}function te(r,t,e){if(t<=e.min)return r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let n=m(e.max,e.availableSpace);return t>=n?(r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(r.setHandleCursor(e.orientation),!1)}function P(r,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return C(r,t.min,e)}function O(r,t){if(r==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ie(r){return r==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(r){let t=r.resizable;if(t==="off")return;let e=r;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function ce(r){var o,u;if(!isNaN(+r))return{amount:+r,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=r.match(t),n=e!=null&&e[1]?+e[1]:-1,a=(u=(o=e==null?void 0:e[2])==null?void 0:o.toLowerCase())!=null?u:"";return{amount:n,unit:a}}function b(r,t){let e=ce(r);return e.unit==="%"?U(e.amount,t):e.amount}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=$();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){!this._appliedAllowClose||(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){F(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=q(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=G(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,n=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:n};!this._adapter.emitHostEvent(a,o,!0,!0)||(this._open=t,this._applyOpen(o))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let n=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=n,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let n=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,n),o=C(e,this._pixelMin,a);this._adapter.setValuenow(o),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=b(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var n;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(n=this._max)==null?void 0:n.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=b(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=y(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=b(this._min,a),this._pixelMax=p(this._max)?b(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),n=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility){let a=P(e,h(f({},this._state),{availableSpace:n}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:n})),t.clearCursor&&this._adapter.setHandleCursor()}};var me=`${z}split-view`,be={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},fe={ROOT:"forge-split-view"},ne={ROOT:"root"},he={ROOT:`#${ne.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},ve={ANIMATING_LAYER:"--forge-split-view-animating-layer"},re={elementName:me,attributes:be,classes:fe,ids:ne,selectors:he,numbers:_e,customCssProperties:ve};var A=class extends K{constructor(e){super(e);this._root=_(e,i.selectors.ROOT),this._handle=_(e,i.selectors.HANDLE),this._icon=_(e,i.selectors.ICON),this._ripple=_(e,i.selectors.RIPPLE),this._content=_(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===re.elementName&&(this._parent=e)}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var n;return(n=this._parent)==null?void 0:n[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ie(e))}setOpen(e,n=!0,a){var u,S;let o=()=>{var V,T;e||this._root.classList.add(i.classes.CLOSED),a&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,a),(V=this._parent)==null||V.unlayerSlottedPanels(),(T=this._parent)==null||T.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!n){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),k(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!n){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var n;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),(n=this._parent)==null||n.update({clearCursor:!0}),e||document.body.style.removeProperty("cursor")}setHandleCursor(e,n){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,n)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,n){document.body.style.setProperty("cursor",O(e,n))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,n){if(n==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var n;let e=I(this._component);return(n=e==null?void 0:e.getContentSize())!=null?n:0}setSiblingContentSize(e){let n=I(this._component);n==null||n.setContentSize(e)}activateRipple(e){e?(this._ripple.deactivate(),window.setTimeout(()=>{this._ripple.activate()},i.numbers.RIPPLE_ACTIVATION_WAIT)):(this._ripple.activate(),this._ripple.deactivate())}deactivateRipple(){this._ripple.deactivate()}getParentSize(e){var a,o;let n=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return n!=null?n:0}updateParent(e){var n;(n=this._parent)==null||n.update(e)}};var we='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-ripple id="ripple" part="ripple"></forge-ripple></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',Se='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usus0pi;animation-name:usus0pi;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usus0pi{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes usus0pi{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:usus0pq;animation-name:usus0pq;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usus0pq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes usus0pq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usus0q6;animation-name:usus0q6;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usus0q6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes usus0q6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:usus0q7;animation-name:usus0q7;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usus0q7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes usus0q7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usus0qn;animation-name:usus0qn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usus0qn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes usus0qn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:usus0rf;animation-name:usus0rf;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes usus0rf{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes usus0rf{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:usus0s2;animation-name:usus0s2;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usus0s2{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes usus0s2{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:usus0sk;animation-name:usus0sk;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes usus0sk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes usus0sk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}',s=class extends M{constructor(){super();W.define([Y,B]),D(this,we,Se),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,n,a){switch(e){case i.attributes.RESIZABLE:this.resizable=a;break;case i.attributes.SIZE:this.size=a;break;case i.attributes.MIN:this.min=a;break;case i.attributes.MAX:a?this.max=a:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case i.attributes.OPEN:this.open=w(a);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=w(a):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=w(a):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=w(a):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=R(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[X,Z]})],s);function ft(){N(s)}export{i as a,ue as b,$ as c,q as d,G as e,F as f,j as g,J as h,Q as i,ee as j,y as k,E as l,te as m,P as n,O as o,ie as p,I as q,ce as r,b as s,L as t,re as u,A as v,s as w,ft as x};
7
- //# sourceMappingURL=chunk.JB6U32SJ.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{c as re}from"./chunk.DML4YNQF.js";import{a as se,b as le}from"./chunk.IMK2LFWR.js";import{b as X}from"./chunk.YHHIPP2F.js";import{a as x}from"./chunk.55JE4FLS.js";import{a as ne}from"./chunk.Y6FFG7XO.js";import{a as te}from"./chunk.XURVHDKR.js";import{h as pe,i as ae}from"./chunk.WGE5R5JK.js";import{b as oe}from"./chunk.54QFNVMG.js";import{c as ee}from"./chunk.D3DLVPPE.js";import{e as Z}from"./chunk.7JTKKFL4.js";import{b as Q}from"./chunk.XYBFFTXS.js";import{a as y,e as ie}from"./chunk.DRFU6POI.js";import{g as V,h as z}from"./chunk.LZMYHIO2.js";import{a as C}from"./chunk.D4SNVKDA.js";import{d as Y,l as J,m as j}from"./chunk.7TQYFMM4.js";import{a as q}from"./chunk.24D46RLZ.js";import{q as $}from"./chunk.AABG6MSC.js";import{a as G}from"./chunk.A23NSEWA.js";import{a}from"./chunk.B3IJU6XJ.js";import{a as R,b as K,c as W}from"./chunk.BSZ2LBJX.js";import{a as H,e as U,g as A}from"./chunk.HN4PXH3D.js";import{m as M,r as N,s as k,u as L}from"./chunk.R4NDFXVA.js";import{a as S,b as h,c as F,j as T,k as g,l as P,n as D,o as B}from"./chunk.G76HB2FK.js";import{a as w,f as p}from"./chunk.MCIQXNKY.js";var O=`${K}autocomplete`,me={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},fe={INPUT:ne.selectors.INPUT,DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},ve={DEFAULT_DEBOUNCE_TIME:500,NUM_SKELETON_ITEMS:3},ge={CHANGE:`${O}-change`,SELECT:`${O}-select`,SCROLLED_BOTTOM:`${O}-scrolled-bottom`},o={elementName:O,attributes:me,selectors:fe,numbers:ve,events:ge},ue=(e=>(e.Default="default",e.Stateless="stateless",e))(ue||{});var I=class extends G{constructor(e){super(e);this.setInputElement()}setInputElement(){let e=N(this._component,o.selectors.INPUT,!1);return e.length&&(this._inputElement=e[0]),this._inputElement}setInputAttribute(e,t){this._inputElement.setAttribute(e,t)}addInputListener(e,t){this._inputElement.addEventListener(e,t)}removeInputListener(e,t){this._inputElement.removeEventListener(e,t)}intializeInputAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list")}isWrappingChipField(){return!!this._component.querySelector(x.elementName)}show(e,t){this._targetElement=this._getTargetElement(t),this._targetElement&&(this._listDropdown=new pe(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._tryToggleDropdownIconRotation(!0))}hide(e){if(!this._listDropdown)return;let{targetElement:t}=this._listDropdown.dropdownElement;t.removeEventListener(y.events.BLUR,e),this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),this._inputElement.removeAttribute("aria-activedescendant"),this._inputElement.removeAttribute("aria-controls"),this._inputElement.setAttribute("aria-expanded","false"),this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(e){var t;(t=this._listDropdown)==null||t.setBusyVisibility(e)}toggleOptionMultiple(e,t){var i;(i=this._listDropdown)==null||i.toggleOptionMultiple(e,t)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(y.events.BLUR,e)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}appendOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setSelectedText(e){this._inputElement.value=e}getInputValue(){return this._inputElement.value}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}hasFocus(){let e=k();return e===this._inputElement||this.isFocusWithinPopup(e)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.addEventListener(e,t)})}removeDropdownIconListener(e,t){let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.removeEventListener(e,t)}setClearButtonListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.addEventListener(e,t)})}removeClearButtonListener(e,t){let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.removeEventListener(e,t)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}updateActiveDescendant(e){!this._targetElement||L(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._targetElement||(this._targetElement=this._getTargetElement(e)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateOptionByIndex(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:null}clearActiveOption(){var e;(e=this._listDropdown)==null||e.clearActiveOption()}setSelectedOptions(e){if(this._listDropdown){let t=e.map(i=>i.value);this._listDropdown.setSelectedValues(t)}}_getTargetElement(e){return e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let e=this._component.querySelector("forge-text-field");if(e&&e.shadowRoot){let i=A(e,se.selectors.ROOT);if(i)return i}let t=this._component.querySelector("forge-chip-field");if(t&&t.shadowRoot){let i=A(t,x.selectors.ROOT);if(i)return i}return this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(e){let t=this._component.querySelector(o.selectors.DROPDOWN_ICON);t&&L(t,e,o.attributes.DROPDOWN_ICON_OPEN)}};var de=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(de||{});function b(u,d){let e=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("options")&&(i.hasOwnProperty("text")||i.hasOwnProperty("builder"))),t=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("label")&&i.hasOwnProperty("value"));return e&&d===1||t&&d===0}function ce(u,d){return u.find(e=>e.value===d)}function v(u,d,e=null){return e?!(e in u.value)||!(e in d)?!1:D(u.value[e],d[e]):D(u.value,d)}var E=class extends ae{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=o.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=t=>this._onClick(t),this._focusListener=()=>this._onFocus(),this._blurListener=t=>this._onBlur(t),this._keydownListener=t=>this._onKeydown(t),this._dropdownIconClickListener=t=>this._onDropdownIconClick(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=t=>this._onDropdownIconMouseDown(t),this._clearButtonListener=t=>this._onClear(t),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=t=>this._adapter.updateActiveDescendant(t),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=S()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}disconnect(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._isDropdownOpen&&this._closeDropdown()}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=h(this._debounce)&&this._debounce>0?B(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.intializeInputAccessibility(this._identifier)}get _flatOptions(){return b(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus&&this._showDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!C.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter(){if(!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let e=this._filterText,t=this._executeFilter();this._pendingFilterPromises.push(t),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await t}catch(i){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(e===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let i=this._pendingFilterPromises.indexOf(t);i!==-1&&this._pendingFilterPromises.splice(i,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let t=e.target,i=this._adapter.getInputValue(),n=t.value.substring(t.selectionStart,t.selectionEnd)===t.value,l=i.length===1&&t.selectionEnd===1,c=i.length===1&&t.selectionEnd===0,_=!i||n||l||c;!this._adapter.isWrappingChipField()&&_&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,t=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let i=this._filter,n=e?this._filterText:"",l=t?this._getValue():null;return new Promise((c,_)=>Promise.resolve(i(n,l)).then(s=>{this._options=s,c(this._options)}).catch(s=>_(`An unexpected error occurred while filtering: ${s}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:t=!0,activateFirst:i=!1,activateSelected:n=!1}={}){let l=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let c;if(this._optionBuilder){let s=this._optionBuilder;c=(m,f)=>s(m,this._filterText,f)}let _={options:this._options,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",optionLimit:this._optionLimit,popupClasses:this._popupClasses,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:s=>{if(this._filterText){let m=$(s,this._filterText);if(m)return m}return s},allowBusy:!0,optionBuilder:c,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:s=>this._onSelect(s),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(_,this._popupTarget),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(l)}catch(s){console.error(s)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:t,activateFirst:i,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:t=!1,activateSelected:i=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),i&&this._selectedOptions.length?this._adapter.activateSelectedOption():t&&this._adapter.activateFirstOption()}_closeDropdown(){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&b(this._options,0)){let e=[],t=[];this._options.forEach(i=>{this._selectedOptions.find(n=>v(n,i.value,this._matchKey))?e.push(i):t.push(i)}),this._options=[...e,...t]}}async _onSelect(e,t=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(o.events.SELECT,n,!0,!0)&&(this._filterText="",this._closeDropdown());return}let i=()=>{let n=this._flatOptions,l=n.find(s=>v(s,e,this._matchKey)),c=l?l.value:"",_=l?l.label:"";if(this._multiple){let s=n.findIndex(f=>v(f,e,this._matchKey));if(s>=0){let f=this._selectedOptions.some(_e=>v(_e,e,this._matchKey));this._adapter.toggleOptionMultiple(s,f)}let m=ce(this._selectedOptions,c);if(m){let f=this._selectedOptions.indexOf(m);this._selectedOptions.splice(f,1)}else this._selectedOptions.push(l)}else h(c)?(this._selectedOptions[0]=l,this._filterText=_):(this._selectedOptions=[],this._filterText="");if(this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(s=>s.value),this._adapter.setSelectedText(this._getSelectedText()),!C.isMobile&&t&&this._adapter.selectInputValue(),this._multiple){let s=n.findIndex(f=>v(f,e,this._matchKey)),m=this._values.includes(e);this._adapter.toggleOptionMultiple(s,m)}this._emitChangeEvent()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging&&i(),this._valueChanging=void 0):i()}_selectActiveOption(e=!0){let t=this._adapter.getActiveOptionIndex();if(typeof t=="number"&&t>=0){let i=this._flatOptions[t];i&&this._onSelect(i.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(o.events.CHANGE,this._getValue(),!0)}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?`${this._values.length} ${this._values.length===1?"option":"options"} selected`:"":this._selectedOptions.filter(e=>e&&e.label).map(e=>e.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let t=[];this._selectedOptions=[],Array.isArray(e)?t=e:t=h(e)?[e]:[],!this._multiple&&t.length>1&&(t=[t[0]]),b(t,0)?(this._values=t.map(n=>n.value),this._selectedOptions=t):this._values=t;let i=this._flatOptions;if(t.length&&i.length&&this._updateSelectedOptions(t),this._values.length&&!this._selectedOptions.length&&!!this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let t=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),b(e,0))for(let i of e){let n=t.find(l=>v(l,i.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(i)}else for(let i of e){let n=t.find(l=>v(l,i,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:i,value:i})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(o.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(o.attributes.MULTIPLE,h(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let t=[];e==null?t=[]:Array.isArray(e)?t=JSON.parse(JSON.stringify(e)):F(e)?t=[e]:t=[JSON.parse(JSON.stringify(e))],(t.length!==this._values.length||t.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(o.attributes.FILTER_ON_FOCUS,h(this._filterOnFocus)?this._filterOnFocus.toString():""))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,h(this._allowUnmatched)&&this._adapter.setHostAttribute(o.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(o.attributes.DEBOUNCE,h(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&!!this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){!this._isDropdownOpen||(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var be="<template><slot></slot></template>",Oe=":host{display:block}:host([hidden]){display:none}",r=class extends te{constructor(){super();Y.define([z,V]),U(this,be,Oe),this._foundation=new E(new I(this))}static get observedAttributes(){return[o.attributes.MODE,o.attributes.MULTIPLE,o.attributes.DEBOUNCE,o.attributes.FILTER_ON_FOCUS,o.attributes.ALLOW_UNMATCHED,o.attributes.POPUP_TARGET,o.attributes.POPUP_CLASSES,o.attributes.OBSERVE_SCROLL,o.attributes.OBSERVE_SCROLL_THRESHOLD,o.attributes.OPTION_LIMIT,o.attributes.SYNC_POPUP_WIDTH,o.attributes.OPEN,o.attributes.MATCH_KEY]}connectedCallback(){this.querySelector(o.selectors.INPUT)?this._foundation.initialize():M(this,o.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case o.attributes.MODE:this.mode=i;break;case o.attributes.MULTIPLE:this.multiple=g(i);break;case o.attributes.DEBOUNCE:this.debounce=P(i);break;case o.attributes.FILTER_ON_FOCUS:this.filterOnFocus=g(i);break;case o.attributes.ALLOW_UNMATCHED:this.allowUnmatched=g(i);break;case o.attributes.POPUP_TARGET:this.popupTarget=i;break;case o.attributes.OPEN:this.open=g(i);break;case o.attributes.MATCH_KEY:this.matchKey=i;break}}appendOptions(e){this._foundation.appendOptions(e)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}};p([a()],r.prototype,"mode",2),p([a()],r.prototype,"multiple",2),p([a()],r.prototype,"value",2),p([a()],r.prototype,"debounce",2),p([a()],r.prototype,"filterOnFocus",2),p([a()],r.prototype,"allowUnmatched",2),p([a()],r.prototype,"popupTarget",2),p([a()],r.prototype,"optionBuilder",2),p([a()],r.prototype,"filter",2),p([a()],r.prototype,"selectedTextBuilder",2),p([a()],r.prototype,"open",2),p([a()],r.prototype,"matchKey",2),p([a({set:!1})],r.prototype,"isInitialized",2),p([a({set:!1})],r.prototype,"popupElement",2),p([a()],r.prototype,"beforeValueChange",2),r=p([R({name:o.elementName,dependencies:[re,ie,ee,Z,X,oe,Q,J]})],r);var he=class extends q{constructor(e){super(e)}_build(){let e=document.createElement(o.elementName);return this._attachTextField(e),e}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(e){this._textFieldDelegate.inputElement.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(o.events.CHANGE,t=>e(t.detail))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,n,l,c,_,s;let t={props:w({},(n=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:n.props),options:w({},(c=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:c.options)};t.options||(t.options={}),((_=this._config.options)==null?void 0:_.useDropdownIcon)!==!1&&!((s=t.options)!=null&&s.trailingElement)&&(t.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new le(t),e.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let e={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new j(e).element}};function Nt(){H(r)}export{o as a,ue as b,I as c,de as d,b as e,ce as f,v as g,E as h,r as i,he as j,Nt as k};
7
- //# sourceMappingURL=chunk.OWTGOW7S.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/autocomplete/autocomplete-constants.ts", "../../src/autocomplete/autocomplete-adapter.ts", "../../src/autocomplete/autocomplete-utils.ts", "../../src/autocomplete/autocomplete-foundation.ts", "../../src/autocomplete/autocomplete.ts", "../../src/autocomplete/autocomplete-component-delegate.ts", "../../src/autocomplete/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX, KEYSTROKE_DEBOUNCE_THRESHOLD } from '../constants';\nimport { IOption } from '../select';\nimport { IListItemComponent } from '../list';\nimport { IListDropdownConfig } from '../list-dropdown';\nimport { IPopupPosition } from '../popup';\nimport { FIELD_CONSTANTS } from '../field/field-constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}autocomplete`;\n\nconst attributes = {\n MODE: 'mode',\n MULTIPLE: 'multiple',\n DEBOUNCE: 'debounce',\n FILTER_ON_FOCUS: 'filter-on-focus',\n ALLOW_UNMATCHED: 'allow-unmatched',\n POPUP_TARGET: 'popup-target',\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold',\n SYNC_POPUP_WIDTH: 'sync-popup-width',\n OPEN: 'open',\n MATCH_KEY: 'match-key',\n DROPDOWN_ICON_OPEN: 'data-forge-dropdown-icon-open'\n};\n\nconst selectors = {\n INPUT: FIELD_CONSTANTS.selectors.INPUT,\n DROPDOWN_ICON: '[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon',\n CLEAR_BUTTON: '[data-forge-autocomplete-clear],[forge-autocomplete-clear]'\n};\n\nconst numbers = {\n DEFAULT_DEBOUNCE_TIME: KEYSTROKE_DEBOUNCE_THRESHOLD,\n NUM_SKELETON_ITEMS: 3\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n SELECT: `${elementName}-select`,\n SCROLLED_BOTTOM: `${elementName}-scrolled-bottom`\n};\n\nexport const AUTOCOMPLETE_CONSTANTS = {\n elementName,\n attributes,\n selectors,\n numbers,\n events\n};\n\nexport type AutocompleteOptionBuilder<T = any> = (option: IOption<T>, filterText: string, parentElement: IListItemComponent) => HTMLElement;\nexport type AutocompleteOptionGroupBuilder<T = any> = (option: IAutocompleteOptionGroup<T>) => HTMLElement;\nexport type AutocompleteFilterCallback<T = any> = (filterText: string, value: T | null) => Array<IOption<T>> | IAutocompleteOptionGroup[] | Promise<Array<IOption<T>> | IAutocompleteOptionGroup[]>;\nexport type AutocompleteSelectedTextBuilder<T = any> = (selectedOptions: Array<IOption<T>>) => string;\n\nexport enum AutocompleteMode {\n Default = 'default',\n Stateless = 'stateless'\n}\n\nexport interface IAutocompleteOptionGroup<T = any> {\n text?: string;\n builder?: AutocompleteOptionGroupBuilder;\n options: Array<IOption<T>>;\n}\n\nexport interface IAutocompletePopupConfiguration {\n filterText: string;\n popupTarget: string;\n dropdownConfig: IListDropdownConfig;\n popupClasses: string[];\n popupOffset: IPopupPosition;\n syncPopupWidth: boolean;\n listener: (value: string) => void;\n scrollEndListener: () => void;\n}\n\nexport interface IAutocompleteSelectEventData {\n value: any;\n}\n", "import { getShadowElement, deepQuerySelectorAll, getActiveElement, toggleAttribute } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IOption } from '../select';\nimport { IAutocompleteComponent } from './autocomplete';\nimport { AUTOCOMPLETE_CONSTANTS, IAutocompleteOptionGroup } from './autocomplete-constants';\nimport { TEXT_FIELD_CONSTANTS } from '../text-field';\nimport { IListDropdown, IListDropdownConfig, ListDropdown } from '../list-dropdown';\nimport { CHIP_FIELD_CONSTANTS } from '../chip-field';\nimport { IPopupComponent, POPUP_CONSTANTS } from '../popup';\n\nexport interface IAutocompleteAdapter extends IBaseAdapter {\n setInputElement(): HTMLInputElement;\n setInputAttribute(name: string, value: string): void;\n addInputListener(type: string, listener: (evt: Event) => void): void;\n removeInputListener(type: string, listener: (evt: Event) => void): void;\n intializeInputAccessibility(identifier: string): void;\n isWrappingChipField(): boolean;\n show(config: IListDropdownConfig, popupTarget: string): void;\n hide(listener: () => void): void;\n focus(): void;\n setOptions(options: IOption[] | IAutocompleteOptionGroup[]): void;\n appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void;\n setSelectedText(value: string): void;\n getInputValue(): string;\n selectInputValue(): void;\n setDismissListener(listener: () => void): void;\n toggleOptionMultiple(index: number, selected: boolean): void;\n isFocusWithinPopup(target: HTMLElement): boolean;\n hasFocus(): boolean;\n hasInputElement(): boolean;\n setDropdownIconListener(type: string, listener: EventListener): void;\n removeDropdownIconListener(type: string, listener: EventListener): void;\n setClearButtonListener(type: string, listener: EventListener): void;\n removeClearButtonListener(type: string, listener: EventListener): void;\n getPopupElement(): HTMLElement | null;\n propagateKey(key: string): void;\n updateActiveDescendant(id: string): void;\n getTargetElementWidth(selector: string): number;\n activateFirstOption(): void;\n activateSelectedOption(): void;\n activateOptionByIndex(value: number): void;\n setBusyVisibility(busy: boolean): void;\n getActiveOptionIndex(): number | null;\n clearActiveOption(): void;\n setSelectedOptions(options: IOption[]): void;\n}\n\n/**\n * The DOM adapter for the `<forge-autocomplete>` element.\n */\nexport class AutocompleteAdapter extends BaseAdapter<IAutocompleteComponent> implements IAutocompleteAdapter {\n private _inputElement: HTMLInputElement;\n private _listDropdown?: IListDropdown;\n private _targetElement?: HTMLElement;\n \n constructor(component: IAutocompleteComponent) {\n super(component);\n this.setInputElement();\n }\n\n public setInputElement(): HTMLInputElement {\n const inputElements = deepQuerySelectorAll(this._component, AUTOCOMPLETE_CONSTANTS.selectors.INPUT, false);\n if (inputElements.length) {\n this._inputElement = inputElements[0] as HTMLInputElement;\n }\n return this._inputElement;\n }\n\n public setInputAttribute(name: string, value: string): void {\n this._inputElement.setAttribute(name, value);\n }\n\n public addInputListener(type: string, listener: (evt: Event) => void): void {\n this._inputElement.addEventListener(type, listener);\n }\n\n public removeInputListener(type: string, listener: (evt: Event) => void): void {\n this._inputElement.removeEventListener(type, listener);\n }\n\n public intializeInputAccessibility(identifier: string): void {\n this._inputElement.setAttribute('autocomplete', 'off');\n this._inputElement.setAttribute('role', 'combobox');\n this._inputElement.setAttribute('aria-live', 'polite');\n this._inputElement.setAttribute('aria-atomic', 'true');\n this._inputElement.setAttribute('aria-haspopup', 'true');\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._inputElement.setAttribute('aria-autocomplete', 'list');\n }\n\n public isWrappingChipField(): boolean {\n return !!this._component.querySelector(CHIP_FIELD_CONSTANTS.elementName);\n }\n\n public show(config: IListDropdownConfig, popupTarget: string): void {\n this._targetElement = this._getTargetElement(popupTarget);\n if (!this._targetElement) {\n return;\n }\n this._listDropdown = new ListDropdown(this._targetElement, config);\n this._listDropdown.open();\n this._inputElement.setAttribute('aria-expanded', 'true');\n this._inputElement.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n this._tryToggleDropdownIconRotation(true);\n }\n\n public hide(listener: () => void): void {\n if (!this._listDropdown) {\n return;\n }\n const { targetElement } = this._listDropdown.dropdownElement as IPopupComponent;\n targetElement.removeEventListener(POPUP_CONSTANTS.events.BLUR, listener);\n this.setBusyVisibility(false);\n this._tryToggleDropdownIconRotation(false);\n this._inputElement.removeAttribute('aria-activedescendant');\n this._inputElement.removeAttribute('aria-controls');\n this._inputElement.setAttribute('aria-expanded', 'false');\n this._listDropdown.close();\n this._listDropdown = undefined;\n }\n\n\n public setBusyVisibility(isVisible: boolean): void {\n this._listDropdown?.setBusyVisibility(isVisible);\n }\n\n public toggleOptionMultiple(index: number, selected: boolean): void {\n this._listDropdown?.toggleOptionMultiple(index, selected);\n }\n\n public setDismissListener(listener: () => void): void {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return;\n }\n const dropdownElement = this._listDropdown.dropdownElement as IPopupComponent;\n if (dropdownElement.targetElement) {\n dropdownElement.targetElement.addEventListener(POPUP_CONSTANTS.events.BLUR, listener);\n }\n }\n\n public focus(): void {\n window.requestAnimationFrame(() => this._inputElement.focus());\n }\n\n public setOptions(options: IOption[] | IAutocompleteOptionGroup[]): void {\n this._listDropdown?.setOptions(options);\n }\n\n public appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void {\n this._listDropdown?.appendOptions(options);\n }\n\n public setSelectedText(value: string): void {\n this._inputElement.value = value;\n }\n\n public getInputValue(): string {\n return this._inputElement.value;\n }\n\n public selectInputValue(): void {\n window.requestAnimationFrame(() => this._inputElement.select());\n }\n\n public isFocusWithinPopup(target: HTMLElement): boolean {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return false;\n }\n return this._listDropdown.dropdownElement.contains(target);\n }\n\n public hasFocus(): boolean {\n const activeElement = getActiveElement() as HTMLElement;\n return activeElement === this._inputElement || this.isFocusWithinPopup(activeElement);\n }\n\n public hasInputElement(): boolean {\n return !!this._inputElement;\n }\n\n public setDropdownIconListener(type: string, listener: EventListener): void {\n window.requestAnimationFrame(() => {\n const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON);\n if (dropdownIcon) {\n dropdownIcon.addEventListener(type, listener);\n }\n });\n }\n\n public removeDropdownIconListener(type: string, listener: EventListener): void {\n const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON);\n if (dropdownIcon) {\n dropdownIcon.removeEventListener(type, listener);\n }\n }\n\n public setClearButtonListener(type: string, listener: EventListener): void {\n window.requestAnimationFrame(() => {\n const clearButton = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.CLEAR_BUTTON);\n if (clearButton) {\n clearButton.addEventListener(type, listener);\n }\n });\n }\n\n public removeClearButtonListener(type: string, listener: EventListener): void {\n const clearButton = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.CLEAR_BUTTON);\n if (clearButton) {\n clearButton.removeEventListener(type, listener);\n }\n }\n\n public propagateKey(key: string): void {\n this._listDropdown?.handleKey(key);\n }\n\n public updateActiveDescendant(id: string): void {\n if (!this._targetElement) {\n return;\n }\n toggleAttribute(this._inputElement, !!id, 'aria-activedescendant', id);\n }\n\n public getTargetElementWidth(selector: string): number {\n if (!this._targetElement) {\n this._targetElement = this._getTargetElement(selector);\n }\n return this._targetElement.getBoundingClientRect().width;\n }\n\n public getPopupElement(): HTMLElement | null {\n return this._listDropdown?.dropdownElement ?? null;\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public activateSelectedOption(): void {\n this._listDropdown?.activateSelectedOption();\n }\n\n public activateOptionByIndex(value: number): void {\n this._listDropdown?.activateOption(value);\n }\n\n public getActiveOptionIndex(): number | null {\n return this._listDropdown?.getActiveOptionIndex() ?? null;\n }\n\n public clearActiveOption(): void {\n this._listDropdown?.clearActiveOption();\n }\n\n public setSelectedOptions(options: IOption[]): void {\n if (this._listDropdown) {\n const values = options.map(o => o.value);\n this._listDropdown.setSelectedValues(values);\n }\n }\n\n private _getTargetElement(selector?: string): HTMLElement {\n return selector ? this._component.querySelector(selector) || this._getDefaultTargetElement() : this._getDefaultTargetElement();\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('forge-text-field');\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\n // This component is often used with the chip-field, if so, let's target our popup around one if its internal elements for proper alignnment\n const chipField = this._component.querySelector('forge-chip-field');\n if (chipField && chipField.shadowRoot) {\n const chipFieldRoot = getShadowElement(chipField, CHIP_FIELD_CONSTANTS.selectors.ROOT) as HTMLElement;\n if (chipFieldRoot) {\n return chipFieldRoot;\n }\n }\n\n return this._component.querySelector('input') || this._component;\n }\n\n private _tryToggleDropdownIconRotation(state: boolean): void {\n const dropdownIcon = this._component.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.DROPDOWN_ICON) as HTMLElement;\n if (dropdownIcon) {\n toggleAttribute(dropdownIcon, state, AUTOCOMPLETE_CONSTANTS.attributes.DROPDOWN_ICON_OPEN);\n }\n }\n}\n", "import { IOption } from '../select';\nimport { IAutocompleteOptionGroup } from './autocomplete-constants';\nimport { isDefined, isObject, isDeepEqual } from '@tylertech/forge-core';\n\n/** The available option types. */\nexport enum OptionType { Option, Group }\n\n/**\n * Determines if the provided options are of the specified type.\n * @param options The options either grouped or individual.\n * @param type The type of option to detect.\n */\nexport function isOptionType(options: IOption[] | IAutocompleteOptionGroup[], type: OptionType): boolean {\n const isOptionGroups = options.some((o: IOption | IAutocompleteOptionGroup) => isDefined(o) && isObject(o) && o.hasOwnProperty('options') && (o.hasOwnProperty('text') || o.hasOwnProperty('builder')));\n const isOptionTypes = options.some((o: IOption | IAutocompleteOptionGroup) => isDefined(o) && isObject(o) && o.hasOwnProperty('label') && o.hasOwnProperty('value'));\n return (isOptionGroups && type === OptionType.Group) || (isOptionTypes && type === OptionType.Option);\n}\n\n/** A utility function to find the matching option in the provided options by the value provided. */\nexport function getSelectedOption(options: IOption[], value: string): IOption | undefined {\n return options.find(o => o.value === value);\n}\n\n/** A predicate function that will determine if an option value is equal regardless of primitive type or complex object type. */\nexport function optionEqualPredicate(option: IOption, value: any, property: string | null = null): boolean {\n if (property) {\n if (!(property in option.value) || !(property in value)) {\n return false;\n }\n return isDeepEqual(option.value[property], value[property]);\n }\n return isDeepEqual(option.value, value);\n}\n", "import { debounce, isDefined, isString, Platform, randomChars } from '@tylertech/forge-core';\nimport { highlightTextHTML } from '../core';\nimport { IListItemComponent } from '../list';\nimport { IListDropdownConfig, IListDropdownOption, ListDropdownAsyncStyle, ListDropdownFooterBuilder, ListDropdownHeaderBuilder, ListDropdownOptionBuilder } from '../list-dropdown';\nimport { IListDropdownAwareFoundation, ListDropdownAwareFoundation } from '../list-dropdown/list-dropdown-aware-foundation';\nimport { IOption, IOptionGroup } from '../select';\nimport { IAutocompleteAdapter } from './autocomplete-adapter';\nimport { AutocompleteFilterCallback, AutocompleteMode, AutocompleteOptionBuilder, AutocompleteSelectedTextBuilder, AUTOCOMPLETE_CONSTANTS, IAutocompleteOptionGroup, IAutocompleteSelectEventData } from './autocomplete-constants';\nimport { getSelectedOption, isOptionType, optionEqualPredicate, OptionType } from './autocomplete-utils';\n\nexport interface IAutocompleteFoundation extends IListDropdownAwareFoundation {\n mode: AutocompleteMode;\n multiple: boolean;\n value: string | string[] | IOption | IOption[] | null | undefined;\n debounce: number;\n filterOnFocus: boolean;\n allowUnmatched: boolean;\n popupTarget: string;\n optionBuilder: AutocompleteOptionBuilder | null | undefined;\n filter: AutocompleteFilterCallback | null | undefined;\n selectedTextBuilder: AutocompleteSelectedTextBuilder;\n isInitialized: boolean;\n open: boolean;\n matchKey: string | null | undefined;\n appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void;\n beforeValueChange: (value: any) => boolean | Promise<boolean>;\n}\n\n/**\n * The foundation class behind the `<forge-autocomplete>` element.\n */\nexport class AutocompleteFoundation extends ListDropdownAwareFoundation implements IAutocompleteFoundation {\n private _isInitialized = false;\n private _isDropdownOpen = false;\n private _mode: AutocompleteMode = AutocompleteMode.Default;\n private _multiple = false;\n private _debounce = AUTOCOMPLETE_CONSTANTS.numbers.DEFAULT_DEBOUNCE_TIME;\n private _allowUnmatched = false;\n private _popupTarget: string;\n private _filterOnFocus = true;\n private _optionBuilder?: AutocompleteOptionBuilder | null;\n private _filter?: AutocompleteFilterCallback | null;\n private _selectedTextBuilder: AutocompleteSelectedTextBuilder;\n private _options: IOption[] | IAutocompleteOptionGroup[] = [];\n private _filterText = '';\n private _selectedOptions: IOption[] = [];\n private _values: any[] = [];\n private _pendingFilterPromises: Array<Promise<IOption[] | IOptionGroup[]>> = [];\n private _identifier: string;\n private _matchKey?: string | null = null;\n private _filterFn: () => Promise<void>;\n private _clickListener: (evt: MouseEvent) => void;\n private _focusListener: (evt: FocusEvent) => void;\n private _blurListener: (evt: FocusEvent) => void;\n private _inputListener: (evt: KeyboardEvent) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _dropdownIconClickListener: (evt: MouseEvent) => void;\n private _dropdownIconMouseDownListener: (evt: MouseEvent) => void;\n private _clearButtonListener: (evt: MouseEvent) => void;\n private _dropdownScrollEndListener: () => void;\n private _dismissListener: () => void;\n private _activeChangeListener: (id: string) => void;\n private _targetWidthCallback: () => number;\n private _beforeValueChange: (value: any) => boolean | Promise<boolean>;\n private _valueChanging: Promise<boolean> | undefined;\n\n constructor(private _adapter: IAutocompleteAdapter) {\n super();\n this._clickListener = evt => this._onClick(evt);\n this._focusListener = () => this._onFocus();\n this._blurListener = evt => this._onBlur(evt);\n this._keydownListener = evt => this._onKeydown(evt);\n this._dropdownIconClickListener = evt => this._onDropdownIconClick(evt);\n this._dropdownScrollEndListener = () => this._onDropdownScrollEnd();\n this._dropdownIconMouseDownListener = evt => this._onDropdownIconMouseDown(evt);\n this._clearButtonListener = evt => this._onClear(evt);\n this._dismissListener = () => this._onDismiss();\n this._activeChangeListener = id => this._adapter.updateActiveDescendant(id);\n this._targetWidthCallback = () => this._adapter.getTargetElementWidth(this._popupTarget);\n this._identifier = randomChars();\n }\n\n public async initialize(): Promise<void> {\n if (!this._adapter.hasInputElement() && !this._adapter.setInputElement()) {\n throw new Error('An input element is required as a child of the autocomplete component.');\n }\n\n this._setInputListener();\n this._setFilterCallback();\n this._attachListeners();\n this._initializeAccessibility();\n\n if (this._values.length) {\n if (!this._selectedOptions.length) {\n try {\n await this._executeFilter();\n } catch (e) {\n console.error(e);\n }\n this._updateSelectedOptions(this._values);\n }\n this._adapter.setSelectedText(this._getSelectedText());\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n if (this._isInitialized) {\n this._detachListeners();\n this._isInitialized = false;\n }\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n }\n\n private _attachListeners(): void {\n this._adapter.addInputListener('click', this._clickListener);\n this._adapter.addInputListener('focus', this._focusListener);\n this._adapter.addInputListener('blur', this._blurListener);\n this._adapter.addInputListener('input', this._inputListener);\n this._adapter.addInputListener('keydown', this._keydownListener);\n this._adapter.setDropdownIconListener('click', this._dropdownIconClickListener);\n this._adapter.setDropdownIconListener('mousedown', this._dropdownIconMouseDownListener);\n this._adapter.setClearButtonListener('click', this._clearButtonListener);\n }\n\n private _detachListeners(): void {\n this._adapter.removeInputListener('click', this._clickListener);\n this._adapter.removeInputListener('focus', this._focusListener);\n this._adapter.removeInputListener('blur', this._blurListener);\n this._adapter.removeInputListener('input', this._inputListener);\n this._adapter.removeInputListener('keydown', this._keydownListener);\n this._adapter.removeDropdownIconListener('click', this._dropdownIconClickListener);\n this._adapter.removeDropdownIconListener('mousedown', this._dropdownIconMouseDownListener);\n this._adapter.removeClearButtonListener('click', this._clearButtonListener);\n }\n\n private _setInputListener(): void {\n this._inputListener = (evt: KeyboardEvent) => this._onInput(evt);\n }\n\n private _setFilterCallback(): void {\n this._filterFn = isDefined(this._debounce) && this._debounce > 0 ? debounce(this._debounceFilter, this._debounce, false) : this._debounceFilter;\n }\n\n private _initializeAccessibility(): void {\n this._adapter.intializeInputAccessibility(this._identifier);\n }\n\n private get _flatOptions(): IOption[] {\n if (isOptionType(this._options, OptionType.Group)) {\n return (this._options as IAutocompleteOptionGroup[]).reduce((previousValue, currentValue) => previousValue.concat(currentValue.options), [] as IOption[]) as IOption[];\n }\n return this._options as IOption[];\n }\n\n private _onClick(evt: MouseEvent): void {\n if (!this._isDropdownOpen && this._filterOnFocus) {\n this._showDropdown();\n }\n }\n\n private _onDropdownIconMouseDown(evt: MouseEvent): void {\n evt.preventDefault(); // Always avoid changing focus when clicking the dropdown\n }\n\n private _onDropdownIconClick(evt: MouseEvent): void {\n if (!this._isDropdownOpen) {\n this._adapter.focus();\n window.requestAnimationFrame(() => this._showDropdown());\n } else {\n this._closeDropdown();\n }\n }\n\n private _onClear(evt: MouseEvent): void {\n this._clearValue();\n this._adapter.setSelectedText(this._getSelectedText());\n }\n\n private _onDropdownScrollEnd(): void {\n this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SCROLLED_BOTTOM);\n }\n\n private _onFocus(): void {\n if (!this._isDropdownOpen && this._adapter.getInputValue() && !Platform.isMobile) {\n this._adapter.selectInputValue();\n }\n }\n\n private _onBlur(evt: FocusEvent): void {\n // If the blur event was triggered by an element within the popup then ignore it\n if (this._adapter.isFocusWithinPopup(evt.relatedTarget as HTMLElement)) {\n return;\n }\n\n this._applyBlur();\n }\n\n private _applyBlur(): void {\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n\n // If we are in stateless mode, we don't need to do anything further\n if (this._mode === AutocompleteMode.Stateless) {\n return;\n }\n\n if (!this._selectedOptions.length) {\n if (!this._allowUnmatched) {\n this._filterText = '';\n this._adapter.setSelectedText('');\n }\n } else {\n this._adapter.setSelectedText(this._getSelectedText());\n }\n }\n\n private _onInput(evt: KeyboardEvent): void {\n if (this._selectedOptions.length && !this._multiple && (!this._adapter.getInputValue() || this._allowUnmatched) && !this._adapter.isWrappingChipField()) {\n this._selectedOptions = [];\n this._values = [];\n this._emitChangeEvent();\n }\n this._filterText = this._adapter.getInputValue();\n this._filterFn();\n }\n\n private async _debounceFilter(): Promise<void> {\n // There is the potential that the user could have started a filter, then moved focus to another element\n // while a debounced filter is running. This check detects that scenario and stops all pending filters.\n if (!this._adapter.hasFocus()) {\n this._pendingFilterPromises = [];\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n return;\n }\n\n // Keep track of these variables so we can use them when each filter callback completes\n const filterText = this._filterText; // Filter text just before the execution\n const filterPromise = this._executeFilter(); // Execute the filter and keep track of the filter promise object for use after it resolves\n\n // Keep track of all pending promises\n this._pendingFilterPromises.push(filterPromise);\n\n // If the dropdown is open, show the spinner and execute the filter. If not open, then we need to\n // show the dropdown (which will handle showing the spinner and executing the filter for us) so\n // we use the promise from that method instead.\n if (this._isDropdownOpen) {\n this._adapter.setBusyVisibility(true);\n } else {\n this._showDropdown({ filter: false });\n }\n\n try {\n await filterPromise;\n } catch {\n // When an exception occurs, we just flush the pending promises and clean up\n this._pendingFilterPromises = [];\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n return;\n }\n\n // We only continue if the filter text before this result matches the latest filter text\n if (filterText === this._filterText) {\n this._pendingFilterPromises = [];\n this._onFilterComplete();\n } else {\n // If this is not the latest filter result, we ignore it and remove it from the pending promises\n const promiseIndex = this._pendingFilterPromises.indexOf(filterPromise);\n if (promiseIndex !== -1) {\n this._pendingFilterPromises.splice(promiseIndex, 1);\n }\n }\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n switch (evt.key) {\n case 'Tab':\n if (this._isDropdownOpen && !this._multiple) {\n this._selectActiveOption(false);\n }\n break;\n case 'Esc':\n case 'Escape':\n if (this._isDropdownOpen) {\n evt.preventDefault();\n this._closeDropdown();\n }\n break;\n case 'Down':\n case 'ArrowDown':\n evt.preventDefault();\n if (!this._isDropdownOpen) {\n this._showDropdown({ activateFirst: true, activateSelected: true });\n } else {\n this._adapter.propagateKey(evt.key);\n }\n break;\n case 'Up':\n case 'ArrowUp':\n evt.preventDefault();\n if (this._isDropdownOpen) {\n this._adapter.propagateKey(evt.key);\n }\n break;\n case 'Enter':\n case 'Home':\n case 'End':\n if (this._isDropdownOpen) {\n if (evt.key === 'Enter') {\n evt.stopPropagation();\n }\n evt.preventDefault();\n this._adapter.propagateKey(evt.key);\n }\n break;\n case 'Backspace':\n case 'Delete':\n const input = evt.target as HTMLInputElement;\n const value = this._adapter.getInputValue();\n const isRemovingAllChars = input.value.substring(input.selectionStart as number, input.selectionEnd as number) === input.value;\n const isBackspacingLastChar = value.length === 1 && input.selectionEnd === 1;\n const isDeletingLastChar = value.length === 1 && input.selectionEnd === 0;\n const isEmpty = !value || isRemovingAllChars || isBackspacingLastChar || isDeletingLastChar;\n \n // We only clear the value on empty when not around a chip-field and NOT in multiple mode\n if (!this._adapter.isWrappingChipField() && isEmpty && !this._multiple && this._values.length) {\n this._clearValue();\n }\n break;\n }\n }\n\n private _executeFilter(sendFilterText = true, sendValue = false): Promise<IOption[] | IAutocompleteOptionGroup[]> {\n if (!this._filter || typeof this._filter !== 'function') {\n throw new Error('A filter callback must be provided. Did you set the \"filter\" property?');\n }\n const filter = this._filter;\n\n const filterText = sendFilterText ? this._filterText : '';\n const value = sendValue ? this._getValue() : null;\n\n return new Promise<IOption[] | IAutocompleteOptionGroup[]>((resolve, reject) => {\n return Promise.resolve(filter(filterText, value))\n .then(options => {\n this._options = options;\n resolve(this._options);\n })\n .catch(e => reject(`An unexpected error occurred while filtering: ${e}`));\n });\n }\n\n private _onFilterComplete(): void {\n if (!this._adapter.hasFocus()) {\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n return;\n }\n\n if (this._options.length) {\n const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;\n this._dropdownReady({ userTriggered: sendFilterText });\n if (this._filterText) {\n this._adapter.activateFirstOption();\n }\n } else {\n this._closeDropdown();\n }\n }\n\n private _clearValue(): void {\n this._selectedOptions = [];\n this._values = [];\n\n if (this._isDropdownOpen) {\n this._adapter.setSelectedOptions([]);\n this._adapter.clearActiveOption();\n }\n\n this._emitChangeEvent();\n }\n\n private async _showDropdown({ filter = true, userTriggered = true, activateFirst = false, activateSelected = false } = {}): Promise<void> {\n const sendFilterText = this._allowUnmatched && !this._selectedOptions.length;\n this._isDropdownOpen = true;\n let listOptionBuilder: ListDropdownOptionBuilder<HTMLElement> | undefined;\n if (this._optionBuilder) {\n const optionBuilder = this._optionBuilder;\n listOptionBuilder = (option: IListDropdownOption, parentElement: HTMLElement) => {\n return optionBuilder(option, this._filterText, parentElement as IListItemComponent);\n };\n }\n const config: IListDropdownConfig = {\n options: this._options,\n multiple: this._multiple,\n selectedValues: [...this._values],\n id: `forge-autocomplete-${this._identifier}`,\n asyncStyle: ListDropdownAsyncStyle.Skeleton,\n optionLimit: this._optionLimit,\n popupClasses: this._popupClasses,\n headerBuilder: this._popupHeaderBuilder,\n footerBuilder: this._popupFooterBuilder,\n transform: label => {\n if (this._filterText) {\n // Highlight the filter text within the label\n const highlightElement = highlightTextHTML(label, this._filterText);\n if (highlightElement) {\n return highlightElement;\n }\n }\n return label;\n },\n allowBusy: true,\n optionBuilder: listOptionBuilder,\n syncWidth: this._syncPopupWidth,\n observeScroll: this._observeScroll,\n observeScrollThreshold: this._observeScrollThreshold,\n scrollEndListener: this._dropdownScrollEndListener,\n activeChangeCallback: this._activeChangeListener,\n targetWidthCallback: this._targetWidthCallback,\n selectCallback: (value: any) => this._onSelect(value),\n closeCallback: () => this._closeDropdown()\n };\n\n this._adapter.show(config, this._popupTarget);\n this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);\n\n if (filter) {\n if (this._options.length) {\n this._adapter.setBusyVisibility(true);\n }\n try {\n await this._executeFilter(sendFilterText);\n } catch (e) {\n console.error(e);\n }\n this._updateSelectedOptions(this._values);\n }\n\n // If we have any pending filter promises, then we will let those complete and update the dropdown separately after\n if (this._pendingFilterPromises.length) {\n return;\n }\n\n this._dropdownReady({ userTriggered, activateFirst, activateSelected });\n }\n\n private _dropdownReady({ userTriggered = true, activateFirst = false, activateSelected = false } = {}): void {\n if (!this._isDropdownOpen || !this._options.length || (userTriggered && !this._adapter.hasFocus())) {\n this._closeDropdown();\n return;\n }\n\n this._sortSelectedOptions();\n this._adapter.setBusyVisibility(false);\n this._adapter.setOptions(this._options);\n this._adapter.setSelectedOptions(this._selectedOptions);\n this._adapter.setDismissListener(this._dismissListener);\n\n if (activateSelected && this._selectedOptions.length) {\n this._adapter.activateSelectedOption();\n } else if (activateFirst) {\n this._adapter.activateFirstOption();\n }\n }\n\n private _closeDropdown(): void {\n if (this._multiple) {\n this._filterText = '';\n }\n this._isDropdownOpen = false;\n this._adapter.hide(this._dismissListener);\n this._sortSelectedOptions();\n this._adapter.toggleHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.OPEN, this._isDropdownOpen);\n }\n\n private _sortSelectedOptions(): void {\n // When in multiple selection mode, we need to make sure that the selected options appear at the top of the list\n if (this._multiple && this._selectedOptions.length && isOptionType(this._options, OptionType.Option)) {\n const selectedOptions: IOption[] = [];\n const unselectedOptions: IOption[] = [];\n\n (this._options as IOption[]).forEach(option => {\n if (this._selectedOptions.find(o => optionEqualPredicate(o, option.value, this._matchKey))) {\n selectedOptions.push(option);\n } else {\n unselectedOptions.push(option);\n }\n });\n\n this._options = [...selectedOptions, ...unselectedOptions];\n }\n }\n\n /**\n * Handles selecting an item in the dropdown.\n * @param {string} selectedValue The string value to select.\n */\n private async _onSelect(selectedValue: string, keepFocus = true): Promise<void> {\n if (this._valueChanging) {\n return;\n }\n\n // If we are in stateless mode, then we need to just emit an event when selecting an option. The\n // selected values are not tracked in stateless mode\n if (this._mode === AutocompleteMode.Stateless) {\n const data: IAutocompleteSelectEventData = { value: selectedValue };\n const result = this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.SELECT, data, true, true);\n if (result) {\n this._filterText = '';\n this._closeDropdown();\n }\n return;\n }\n\n const select = (): void => {\n const flatOptions = this._flatOptions;\n const option = flatOptions.find(o => optionEqualPredicate(o, selectedValue, this._matchKey)) as IOption;\n const value = option ? option.value : '';\n const label = option ? option.label : '';\n\n if (this._multiple) {\n const optionIndex = flatOptions.findIndex(o => optionEqualPredicate(o, selectedValue, this._matchKey));\n if (optionIndex >= 0) {\n const selected = this._selectedOptions.some(o => optionEqualPredicate(o, selectedValue, this._matchKey));\n this._adapter.toggleOptionMultiple(optionIndex, selected);\n }\n const selectedOption = getSelectedOption(this._selectedOptions, value);\n if (selectedOption) {\n const index = this._selectedOptions.indexOf(selectedOption);\n this._selectedOptions.splice(index, 1);\n } else {\n this._selectedOptions.push(option);\n }\n } else {\n if (isDefined(value)) {\n this._selectedOptions[0] = option;\n this._filterText = label;\n } else {\n this._selectedOptions = [];\n this._filterText = '';\n }\n }\n\n // Update the dropdown selection status if its open\n if (this._isDropdownOpen) {\n this._adapter.setSelectedOptions(this._selectedOptions);\n }\n\n // Keep the values in sync with the currently selected options\n this._values = this._selectedOptions.map(o => o.value);\n\n // Update the selected text in the input\n this._adapter.setSelectedText(this._getSelectedText());\n\n // Select the text in the input to allow for the next filter\n if (!Platform.isMobile && keepFocus) {\n this._adapter.selectInputValue();\n }\n\n if (this._multiple) {\n // If we're in multiselect mode, we need to toggle the selected option\n const index = flatOptions.findIndex(o => optionEqualPredicate(o, selectedValue, this._matchKey));\n const isSelected = this._values.includes(selectedValue);\n this._adapter.toggleOptionMultiple(index, isSelected);\n }\n\n this._emitChangeEvent();\n };\n\n // We close the dropdown immediately if in single selection mode\n if (this._isDropdownOpen && !this._multiple) {\n this._closeDropdown();\n }\n\n if (typeof this._beforeValueChange === 'function') {\n this._valueChanging = Promise.resolve(this._beforeValueChange.call(null, selectedValue, this._matchKey));\n const shouldContinue = await this._valueChanging;\n if (shouldContinue) {\n select();\n }\n this._valueChanging = undefined;\n } else {\n select();\n }\n }\n\n private _selectActiveOption(keepFocus = true): void {\n const activeOptionIndex = this._adapter.getActiveOptionIndex();\n if (typeof activeOptionIndex === 'number' && activeOptionIndex >= 0) {\n const option = this._flatOptions[activeOptionIndex];\n if (option) {\n this._onSelect(option.value, keepFocus);\n }\n }\n }\n\n private _emitChangeEvent(): void {\n this._adapter.emitHostEvent(AUTOCOMPLETE_CONSTANTS.events.CHANGE, this._getValue(), true);\n }\n\n /**\n * Retrieves the current value(s) from the selected options array based on whether\n * we are in multi-select mode or not.\n */\n private _getValue(): string | string[] | null | undefined {\n if (!this._values) {\n return null;\n }\n\n if (!this._values.length) {\n return this._multiple ? [] : null;\n }\n\n return this._multiple ? [...this._values] : this._values[0];\n }\n\n /**\n * Creates the selected text value from the selected label values.\n */\n private _getSelectedText(): string {\n if (this._adapter.isWrappingChipField()) {\n return '';\n }\n\n if (this._selectedTextBuilder) {\n return this._selectedTextBuilder(this._selectedOptions);\n } else {\n if (this._multiple) {\n if (this._values.length) {\n return `${this._values.length} ${this._values.length === 1 ? 'option' : 'options'} selected`;\n } else {\n return '';\n }\n } else {\n return this._selectedOptions.filter(o => o && o.label).map(o => o.label).join(' ').trim();\n }\n }\n }\n\n /**\n * Handles the user dismissing the dropdown. This is only called if the blur event was triggered\n * from within the popup element itself (in a custom template most likely).\n * @param keepFocus Keep focus on the dropdown or not.\n */\n private _onDismiss(): void {\n this._closeDropdown();\n }\n\n private async _applyValue(value: string | string[] | IOption | IOption[] | null | undefined): Promise<void> {\n let values: any[] = [];\n this._selectedOptions = [];\n\n if (!Array.isArray(value)) {\n values = isDefined(value) ? [value] : [];\n } else {\n values = value;\n }\n\n // If this is not a multi-select, then make sure we only allow one selected value\n if (!this._multiple && values.length > 1) {\n values = [values[0]];\n }\n\n if (isOptionType(values, OptionType.Option)) {\n this._values = values.map((o: IOption) => o.value);\n this._selectedOptions = values as IOption[];\n } else {\n this._values = values as any[];\n }\n\n // Ensure that the values passed are actually existing options\n const allOptions = this._flatOptions;\n if (values.length && allOptions.length) {\n this._updateSelectedOptions(values);\n }\n\n // Execute the filter now if we have a value, but not options yet (only if it has been initialized already)\n if (this._values.length && !this._selectedOptions.length && !!this._filter && this._isInitialized) {\n try {\n await this._executeFilter(false, true);\n } catch (e) {\n console.error(e);\n }\n this._updateSelectedOptions(this._values);\n }\n\n // Update filter text to match the label when on in multiselect mode\n if (!this._multiple) {\n this._filterText = this._selectedOptions.length ? this._selectedOptions[0].label : '';\n } else {\n this._filterText = '';\n }\n\n // Update the state of the component based on the existence of a selected value\n if (this._isInitialized) {\n this._adapter.setSelectedText(this._getSelectedText());\n }\n\n // When the value is changed programmatically we should update the selected options\n if (this._isDropdownOpen) {\n this._adapter.setSelectedOptions(this._selectedOptions);\n }\n }\n\n private _updateSelectedOptions(values: Array<any | IOption>): void {\n const flatOptions = [...this._flatOptions, ...this._selectedOptions];\n\n if (this._selectedOptions.length) {\n this._selectedOptions = [];\n }\n\n if (isOptionType(values, OptionType.Option)) {\n for (const option of values as IOption[]) {\n const actualOption = flatOptions.find(o => optionEqualPredicate(o, option.value, this._matchKey));\n if (actualOption) {\n this._selectedOptions.push(actualOption);\n } else {\n this._selectedOptions.push(option);\n }\n }\n } else {\n for (const value of values as any[]) {\n const actualOption = flatOptions.find(o => optionEqualPredicate(o, value, this._matchKey));\n if (actualOption) {\n this._selectedOptions.push(actualOption);\n } else if (this._allowUnmatched) {\n this._selectedOptions.push({ label: value, value });\n }\n }\n }\n }\n\n /** Gets/sets the mode state. */\n public get mode(): AutocompleteMode {\n return this._mode;\n }\n public set mode(value: AutocompleteMode) {\n if (this._mode !== value) {\n this._mode = value;\n if (this._mode === AutocompleteMode.Stateless) {\n this._selectedOptions = [];\n if (this._isDropdownOpen) {\n this._closeDropdown();\n }\n }\n this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MODE, this._mode);\n }\n }\n\n /** Gets/sets the multi-select state. */\n public get multiple(): boolean {\n return this._multiple;\n }\n public set multiple(value: boolean) {\n if (this._multiple !== value) {\n this._multiple = value;\n this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE, isDefined(this._multiple) ? this._multiple.toString() : '');\n }\n }\n\n /** Gets/sets the value of the component. */\n public get value(): string | string[] | IOption | IOption[] | null | undefined {\n return this._getValue();\n }\n public set value(value: string | string[] | IOption | IOption[] | null | undefined) {\n let values: Array<string | IOption | IOption[] | string[]> = [];\n\n if (value == null) {\n values = [];\n } else if (Array.isArray(value)) {\n values = JSON.parse(JSON.stringify(value));\n } else if (isString(value)) {\n values = [value];\n } else {\n values = [JSON.parse(JSON.stringify(value))];\n }\n\n const hasNewValue = values.length !== this._values.length || values.some(v => !this._values.includes(v));\n if (!hasNewValue) {\n return;\n }\n\n // We only apply the new values if they have actually changed\n this._applyValue(value);\n }\n\n\n /** Gets/sets filter on focus settings which controls whether the dropdown displays automatically when focused. */\n public get filterOnFocus(): boolean {\n return this._filterOnFocus;\n }\n public set filterOnFocus(value: boolean) {\n if (this._filterOnFocus !== value) {\n this._filterOnFocus = value;\n this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS, isDefined(this._filterOnFocus) ? this._filterOnFocus.toString() : '');\n }\n }\n\n /** Controls whether unmatched text entered by the user will stay visible an option in the dropdown is not found. */\n public get allowUnmatched(): boolean {\n return this._allowUnmatched;\n }\n public set allowUnmatched(value: boolean) {\n if (this._allowUnmatched !== value) {\n this._allowUnmatched = value;\n\n if (isDefined(this._allowUnmatched)) {\n this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED, this._allowUnmatched.toString());\n }\n }\n }\n\n /** Gets/sets the property key to match the value to an option. */\n public get matchKey(): string | null | undefined {\n return this._matchKey;\n }\n public set matchKey(value: string | null | undefined) {\n if (this._matchKey !== value) {\n this._matchKey = value;\n }\n }\n\n /** Gets/sets the selector that will be used to find an element to attach the popup to. Defaults to the input element. */\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 /** Gets/sets the list of classes to apply to the popup element. */\n public get popupClasses(): string | string[] {\n return Array.isArray(this._popupClasses) ? [...this._popupClasses] : [this._popupClasses];\n }\n public set popupClasses(value: string | string[]) {\n if (this._popupClasses !== value) {\n this._popupClasses = Array.isArray(value) ? [...value] : [value];\n }\n }\n\n /** Gets/sets the builder callback to use for the popup header. */\n public set popupHeaderBuilder(value: ListDropdownHeaderBuilder) {\n this._popupHeaderBuilder = value;\n }\n\n /** Gets/sets the builder callback to use for the popup footer. */\n public set popupFooterBuilder(value: ListDropdownFooterBuilder) {\n this._popupFooterBuilder = value;\n }\n\n /** Gets/sets whether the popup width is synchronized with the popup target. */\n public get syncPopupWidth(): boolean {\n return this._syncPopupWidth;\n }\n public set syncPopupWidth(value: boolean) {\n if (this._syncPopupWidth !== value) {\n this._syncPopupWidth = value;\n }\n }\n\n /** Gets/sets the maximum number of options to display in the dropdown. */\n public get optionLimit(): number {\n return this._optionLimit;\n }\n public set optionLimit(value: number) {\n if (this._optionLimit !== value) {\n this._optionLimit = value;\n }\n }\n\n /** Gets/sets the debounce delay (milliseconds) for keyboard events. */\n public get debounce(): number {\n return this._debounce;\n }\n public set debounce(value: number) {\n if (this._debounce !== value) {\n this._debounce = value;\n\n if (this._isInitialized) {\n this._setFilterCallback();\n }\n\n this._adapter.setHostAttribute(AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE, isDefined(this._debounce) ? this._debounce.toString() : '');\n }\n }\n\n /** Sets the item builder callback that will be executed when building the option list in the dropdown. */\n public get optionBuilder(): AutocompleteOptionBuilder | null | undefined {\n return this._optionBuilder;\n }\n public set optionBuilder(fn: AutocompleteOptionBuilder | null | undefined) {\n this._optionBuilder = fn;\n }\n\n /** Sets the filter callback that will be executed when fetching options for the autocomplete dropdown. */\n public get filter(): AutocompleteFilterCallback | null | undefined {\n return this._filter;\n }\n public set filter(cb: AutocompleteFilterCallback | null | undefined) {\n if (this._filter !== cb) {\n this._filter = cb;\n\n // If we have a value, but don't have any options yet then execute the filter\n if (this._isInitialized && this._values.length && !this._flatOptions.length && !!this._filter) {\n this._executeFilter().then(() => {\n this._updateSelectedOptions(this._values);\n this._adapter.setSelectedText(this._getSelectedText());\n });\n }\n }\n }\n\n /** Sets the selected text builder callback that will be executed when getting the selected text. */\n public get selectedTextBuilder(): AutocompleteSelectedTextBuilder {\n return this._selectedTextBuilder;\n }\n public set selectedTextBuilder(fn: AutocompleteSelectedTextBuilder) {\n this._selectedTextBuilder = fn;\n\n // If there are selected options, set the selected text again\n if (this._selectedOptions.length) {\n this._adapter.setSelectedText(this._getSelectedText());\n }\n }\n\n public get observeScroll(): boolean {\n return this._observeScroll;\n }\n public set observeScroll(value: boolean) {\n this._observeScroll = value;\n }\n\n public get observeScrollThreshold(): number {\n return this._observeScrollThreshold;\n }\n public set observeScrollThreshold(value: number) {\n this._observeScrollThreshold = value;\n }\n\n public appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void {\n if (!this._isDropdownOpen) {\n return;\n }\n this._options = [...this._options, ...options] as IOption[] | IAutocompleteOptionGroup[];\n this._adapter.appendOptions(options);\n }\n\n public get isInitialized(): boolean {\n return this._isInitialized;\n }\n\n public get open(): boolean {\n return this._isDropdownOpen;\n }\n public set open(value: boolean) {\n if (this._isDropdownOpen !== value) {\n if (value) {\n this._showDropdown({ userTriggered: false });\n } else {\n this._closeDropdown();\n }\n }\n }\n\n public get beforeValueChange(): (value: any) => boolean | Promise<boolean> {\n return this._beforeValueChange;\n }\n public set beforeValueChange(value: (value: any) => boolean | Promise<boolean>) {\n if (value !== this._beforeValueChange) {\n this._beforeValueChange = value;\n }\n }\n\n public get popupElement(): HTMLElement | null {\n return this._adapter.getPopupElement();\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, coerceNumber, CustomElement, ensureChild, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconCheckBox, tylIconCheckBoxOutlineBlank } from '@tylertech/tyler-icons/standard';\nimport { DividerComponent } from '../divider';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { LinearProgressComponent } from '../linear-progress';\nimport { ListComponent, ListItemComponent } from '../list';\nimport { IListDropdownAware, ListDropdownAware } from '../list-dropdown/list-dropdown-aware';\nimport { PopupComponent } from '../popup';\nimport { IOption } from '../select';\nimport { SkeletonComponent } from '../skeleton';\nimport { TextFieldComponent } from '../text-field';\nimport { AutocompleteAdapter } from './autocomplete-adapter';\nimport { AutocompleteFilterCallback, AutocompleteMode, AutocompleteOptionBuilder, AutocompleteSelectedTextBuilder, AUTOCOMPLETE_CONSTANTS, IAutocompleteOptionGroup, IAutocompleteSelectEventData } from './autocomplete-constants';\nimport { AutocompleteFoundation } from './autocomplete-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IAutocompleteComponent extends IListDropdownAware {\n mode: `${AutocompleteMode}`;\n multiple: boolean;\n value: any;\n debounce: number;\n filterOnFocus: boolean;\n allowUnmatched: boolean;\n matchKey: string | null | undefined;\n popupTarget: string;\n filter: AutocompleteFilterCallback | null | undefined;\n optionBuilder: AutocompleteOptionBuilder | null | undefined;\n selectedTextBuilder: AutocompleteSelectedTextBuilder;\n popupElement: HTMLElement | null;\n beforeValueChange: (value: any) => boolean | Promise<boolean>;\n isInitialized: boolean;\n open: boolean;\n appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void;\n openDropdown(): void;\n closeDropdown(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-autocomplete': IAutocompleteComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-autocomplete-change': CustomEvent<any>;\n 'forge-autocomplete-select': CustomEvent<IAutocompleteSelectEventData>;\n 'forge-autocomplete-scrolled-bottom': CustomEvent<void>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-autocomplete>` element.\n * \n * @tag forge-autocomplete\n */\n@CustomElement({\n name: AUTOCOMPLETE_CONSTANTS.elementName,\n dependencies: [\n TextFieldComponent,\n PopupComponent,\n ListComponent,\n ListItemComponent,\n DividerComponent,\n SkeletonComponent,\n LinearProgressComponent,\n IconComponent\n ]\n})\nexport class AutocompleteComponent extends ListDropdownAware implements IAutocompleteComponent {\n public static get observedAttributes(): string[] {\n return [\n AUTOCOMPLETE_CONSTANTS.attributes.MODE,\n AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE,\n AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE,\n AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS,\n AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED,\n AUTOCOMPLETE_CONSTANTS.attributes.POPUP_TARGET,\n AUTOCOMPLETE_CONSTANTS.attributes.POPUP_CLASSES,\n AUTOCOMPLETE_CONSTANTS.attributes.OBSERVE_SCROLL,\n AUTOCOMPLETE_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD,\n AUTOCOMPLETE_CONSTANTS.attributes.OPTION_LIMIT,\n AUTOCOMPLETE_CONSTANTS.attributes.SYNC_POPUP_WIDTH,\n AUTOCOMPLETE_CONSTANTS.attributes.OPEN,\n AUTOCOMPLETE_CONSTANTS.attributes.MATCH_KEY\n ];\n }\n\n private _foundation: AutocompleteFoundation;\n\n constructor() {\n super();\n IconRegistry.define([tylIconCheckBox, tylIconCheckBoxOutlineBlank]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new AutocompleteFoundation(new AutocompleteAdapter(this));\n }\n\n public connectedCallback(): void {\n if (this.querySelector(AUTOCOMPLETE_CONSTANTS.selectors.INPUT)) {\n this._foundation.initialize();\n } else {\n ensureChild(this, AUTOCOMPLETE_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 super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case AUTOCOMPLETE_CONSTANTS.attributes.MODE:\n this.mode = newValue as AutocompleteMode;\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.MULTIPLE:\n this.multiple = coerceBoolean(newValue);\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.DEBOUNCE:\n this.debounce = coerceNumber(newValue);\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.FILTER_ON_FOCUS:\n this.filterOnFocus = coerceBoolean(newValue);\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.ALLOW_UNMATCHED:\n this.allowUnmatched = coerceBoolean(newValue);\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.POPUP_TARGET:\n this.popupTarget = newValue;\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case AUTOCOMPLETE_CONSTANTS.attributes.MATCH_KEY:\n this.matchKey = newValue;\n break;\n }\n }\n\n /** Gets/sets the interaction mode. */\n @FoundationProperty()\n public mode: `${AutocompleteMode}`;\n\n /** Gets/sets the multi-select state. */\n @FoundationProperty()\n public multiple: boolean;\n\n /** Gets/sets the value. */\n @FoundationProperty()\n public value: any;\n\n /** Gets/sets the debounce delay (milliseconds) for keyboard events. */\n @FoundationProperty()\n public debounce: number;\n\n /** Gets/sets filter on focus settings which controls whether the dropdown displays automatically when focused. */\n @FoundationProperty()\n public filterOnFocus: boolean;\n\n /** Controls whether unmatched text entered by the user will stay visible an option in the dropdown is not found. */\n @FoundationProperty()\n public allowUnmatched: boolean;\n\n /** Gets/sets the selector that will be used to find an element to attach the popup to. Defaults to the input element. */\n @FoundationProperty()\n public popupTarget: string;\n\n /** Sets the option builder callback that will be executed when building the option list in the dropdown. */\n @FoundationProperty()\n public optionBuilder: AutocompleteOptionBuilder | null | undefined;\n\n /** Sets the filter callback that will be executed when fetching options for the autocomplete dropdown. */\n @FoundationProperty()\n public filter: AutocompleteFilterCallback | null | undefined;\n\n /** Sets the selected text builder callback that will be executed when getting the selected text. */\n @FoundationProperty()\n public selectedTextBuilder: AutocompleteSelectedTextBuilder;\n\n /** Controls the open state of the dropdown. */\n @FoundationProperty()\n public open: boolean;\n\n /** Gets/sets the property key to match the value to an option. */\n @FoundationProperty()\n public matchKey: string | null | undefined;\n\n /** Returns whether the component has been initialized or not yet. */\n @FoundationProperty({ set: false })\n public isInitialized: boolean;\n\n /** Gets the currently active popup element when the dropdown is open. */\n @FoundationProperty({ set: false })\n public popupElement: HTMLElement | null;\n\n /** Sets the callback to be executed when the user selects an option, before the UI is updated to allow for validation. */\n @FoundationProperty()\n public beforeValueChange: (value: any) => boolean | Promise<boolean>;\n\n /** Adds options to the dropdown while it is open. Has no effect if the dropdown is closed. */\n public appendOptions(options: IOption[] | IAutocompleteOptionGroup[]): void {\n this._foundation.appendOptions(options);\n }\n\n /** Opens the dropdown. */\n public openDropdown(): void {\n this.open = true;\n }\n\n /** Closes the dropdown. */\n public closeDropdown(): void {\n this.open = false;\n }\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions } from '../core/delegates/form-field-component-delegate';\nimport { ITextFieldComponent, TextFieldComponentDelegate, ITextFieldComponentDelegateOptions } from '../text-field';\nimport { IAutocompleteComponent } from './autocomplete';\nimport { AUTOCOMPLETE_CONSTANTS } from './autocomplete-constants';\nimport { IconComponentDelegate, IIconComponentDelegateConfig } from '../icon';\nimport { IBaseComponentDelegateConfig } from '../core/delegates/base-component-delegate';\nimport { ITextFieldComponentDelegateConfig } from '../text-field/text-field-component-delegate';\n\nexport type AutocompleteComponentDelegateProps = Partial<IAutocompleteComponent>;\nexport interface IAutocompleteComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n textFieldDelegateConfig?: ITextFieldComponentDelegateConfig;\n}\n\nexport interface IAutocompleteComponentDelegateConfig extends IBaseComponentDelegateConfig<IAutocompleteComponent, IAutocompleteComponentDelegateOptions> {}\n\nexport class AutocompleteComponentDelegate extends FormFieldComponentDelegate<IAutocompleteComponent, IAutocompleteComponentDelegateOptions> {\n private _textFieldDelegate: TextFieldComponentDelegate;\n\n constructor(config?: IAutocompleteComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IAutocompleteComponent {\n const autocomplete = document.createElement(AUTOCOMPLETE_CONSTANTS.elementName) as IAutocompleteComponent;\n this._attachTextField(autocomplete);\n return autocomplete;\n }\n\n public get textFieldDelegate(): TextFieldComponentDelegate {\n return this._textFieldDelegate;\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._textFieldDelegate.inputElement.disabled;\n }\n public set disabled(value: boolean) {\n this._textFieldDelegate.inputElement.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(AUTOCOMPLETE_CONSTANTS.events.CHANGE, (evt: CustomEvent) => 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(autocomplete: IAutocompleteComponent): void {\n const textFieldConfig: ITextFieldComponentDelegateConfig = {\n props: { ...this._config.options?.textFieldDelegateConfig?.props },\n options: { ...this._config.options?.textFieldDelegateConfig?.options }\n };\n\n if (!textFieldConfig.options) {\n textFieldConfig.options = {};\n }\n\n if (this._config.options?.useDropdownIcon !== false && !textFieldConfig.options?.trailingElement) {\n textFieldConfig.options.trailingElement = this._createDropdownIconElement();\n }\n\n this._textFieldDelegate = new TextFieldComponentDelegate(textFieldConfig);\n autocomplete.appendChild(this._textFieldDelegate.element);\n }\n\n private _createDropdownIconElement(): HTMLElement {\n const config: IIconComponentDelegateConfig = {\n props: {\n slot: 'trailing',\n name: 'arrow_drop_down'\n },\n options: {\n attributes: { 'forge-dropdown-icon': '' }\n }\n };\n return new IconComponentDelegate(config).element;\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { AutocompleteComponent } from './autocomplete';\n\nexport * from './autocomplete-adapter';\nexport * from './autocomplete-component-delegate';\nexport * from './autocomplete-constants';\nexport * from './autocomplete-foundation';\nexport * from './autocomplete-utils';\nexport * from './autocomplete';\n\nexport function defineAutocompleteComponent(): void {\n defineCustomElement(AutocompleteComponent);\n}\n"],
5
- "mappings": "wlCAOA,GAAM,GAA2C,GAAG,gBAE9C,GAAa,CACjB,KAAM,OACN,SAAU,WACV,SAAU,WACV,gBAAiB,kBACjB,gBAAiB,kBACjB,aAAc,eACd,cAAe,gBACf,aAAc,eACd,eAAgB,iBAChB,yBAA0B,2BAC1B,iBAAkB,mBAClB,KAAM,OACN,UAAW,YACX,mBAAoB,+BACtB,EAEM,GAAY,CAChB,MAAO,GAAgB,UAAU,MACjC,cAAe,mGACf,aAAc,4DAChB,EAEM,GAAU,CACd,sBAAuB,IACvB,mBAAoB,CACtB,EAEM,GAAS,CACb,OAAQ,GAAG,WACX,OAAQ,GAAG,WACX,gBAAiB,GAAG,mBACtB,EAEa,EAAyB,CACpC,cACA,cACA,aACA,WACA,SACF,EAOY,GAAL,CAAK,GACV,WAAU,UACV,YAAY,YAFF,YCNL,GAAM,GAAN,aA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