@tylertech/forge 2.12.2 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +64 -2
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chunks/{chunk.Z5P6EA5L.js → chunk.6QMDYUVT.js} +2 -2
- package/dist/esm/chunks/{chunk.Z5P6EA5L.js.map → chunk.6QMDYUVT.js.map} +0 -0
- package/dist/esm/chunks/{chunk.NTFA7FCB.js → chunk.7ZGIIEIW.js} +2 -2
- package/dist/esm/chunks/{chunk.NTFA7FCB.js.map → chunk.7ZGIIEIW.js.map} +0 -0
- package/dist/esm/chunks/{chunk.OOICAEAX.js → chunk.DCLBX6PX.js} +2 -2
- package/dist/esm/chunks/{chunk.OOICAEAX.js.map → chunk.DCLBX6PX.js.map} +0 -0
- package/dist/esm/chunks/{chunk.6RSXJERY.js → chunk.DVMUMHVM.js} +2 -2
- package/dist/esm/chunks/{chunk.6RSXJERY.js.map → chunk.DVMUMHVM.js.map} +0 -0
- package/dist/esm/chunks/{chunk.TAX3RMGW.js → chunk.EMDSXK65.js} +2 -2
- package/dist/esm/chunks/{chunk.TAX3RMGW.js.map → chunk.EMDSXK65.js.map} +0 -0
- package/dist/esm/chunks/{chunk.DML4YNQF.js → chunk.HSJQA42U.js} +2 -2
- package/dist/esm/chunks/{chunk.DML4YNQF.js.map → chunk.HSJQA42U.js.map} +2 -2
- package/dist/esm/chunks/{chunk.DGOV5RDW.js → chunk.HUWXZ4ZN.js} +2 -2
- package/dist/esm/chunks/{chunk.DGOV5RDW.js.map → chunk.HUWXZ4ZN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.3LZEQWAL.js → chunk.JAEVBPHT.js} +2 -2
- package/dist/esm/chunks/{chunk.3LZEQWAL.js.map → chunk.JAEVBPHT.js.map} +0 -0
- package/dist/esm/chunks/{chunk.2NMN5N7V.js → chunk.MOARJZVS.js} +2 -2
- package/dist/esm/chunks/{chunk.2NMN5N7V.js.map → chunk.MOARJZVS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.YSE5EMB3.js → chunk.NNGE722W.js} +2 -2
- package/dist/esm/chunks/{chunk.YSE5EMB3.js.map → chunk.NNGE722W.js.map} +0 -0
- package/dist/esm/chunks/chunk.VOMWB7Q6.js +7 -0
- package/dist/esm/chunks/chunk.VOMWB7Q6.js.map +7 -0
- package/dist/esm/chunks/{chunk.BXUXNGBH.js → chunk.VW4KKRF5.js} +2 -2
- package/dist/esm/chunks/{chunk.BXUXNGBH.js.map → chunk.VW4KKRF5.js.map} +0 -0
- package/dist/esm/chunks/chunk.WUPPCCF2.js +7 -0
- package/dist/esm/chunks/chunk.WUPPCCF2.js.map +7 -0
- package/dist/esm/chunks/{chunk.V7P3QPNM.js → chunk.Y7Q6QI5V.js} +2 -2
- package/dist/esm/chunks/{chunk.V7P3QPNM.js.map → chunk.Y7Q6QI5V.js.map} +2 -2
- package/dist/esm/chunks/chunk.YPUWII7L.js +7 -0
- package/dist/esm/chunks/{chunk.5PQTSZ7G.js.map → chunk.YPUWII7L.js.map} +2 -2
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +3 -3
- package/esm/file-picker/file-picker.js +1 -1
- package/esm/select/select/select.js +1 -1
- package/esm/split-view/split-view/split-view-constants.d.ts +0 -1
- package/esm/split-view/split-view-panel/split-view-panel-adapter.d.ts +4 -1
- package/esm/split-view/split-view-panel/split-view-panel-adapter.js +17 -6
- package/esm/split-view/split-view-panel/split-view-panel-constants.d.ts +1 -0
- package/esm/split-view/split-view-panel/split-view-panel-constants.js +2 -1
- package/esm/split-view/split-view-panel/split-view-panel-foundation.js +1 -4
- package/esm/split-view/split-view-panel/split-view-panel-utils.d.ts +6 -0
- package/esm/split-view/split-view-panel/split-view-panel-utils.js +17 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.d.ts +1 -0
- package/esm/switch/switch.js +13 -9
- package/esm/text-field/text-field.js +1 -1
- package/package.json +1 -1
- package/styles/field/_base.scss +4 -2
- package/styles/field/_variables.scss +0 -3
- package/dist/esm/chunks/chunk.5D6UB4DL.js +0 -7
- package/dist/esm/chunks/chunk.5D6UB4DL.js.map +0 -7
- package/dist/esm/chunks/chunk.5PQTSZ7G.js +0 -7
- package/dist/esm/chunks/chunk.YE26Y4CT.js +0 -7
- package/dist/esm/chunks/chunk.YE26Y4CT.js.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/select/select/select-constants.ts", "../../src/select/select/select-adapter.ts", "../../src/select/select/select-foundation.ts", "../../src/select/select/select.ts", "../../src/select/select/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}select`;\n\nconst classes = {\n ROOT: 'forge-select',\n OPENED: 'forge-select--opened',\n SELECTED_TEXT: 'forge-select__selected-text',\n DROPDOWN: 'forge-select__dropdown',\n LABEL_FLOAT: 'forge-select--label-float',\n GROUP_WRAPPER: 'forge-select__group-wrapper'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n SELECTED_TEXT: `.${classes.SELECTED_TEXT}`,\n LABEL: 'label#select-label',\n LEADING_SLOT: 'slot[name=leading]',\n ADDON_END_SLOT: 'slot[name=addon-end]'\n};\n\nconst attributes = {\n TYPE: 'type',\n VALUE: 'value',\n LABEL: 'label',\n MULTIPLE: 'multiple',\n DISABLED: 'disabled',\n PLACEHOLDER: 'placeholder',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold'\n};\n\nconst events = {\n SCROLLED_BOTTOM: `${elementName}-scrolled-bottom`\n};\n\nexport const SELECT_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events\n};\n\nexport {\n FieldDensityType as SelectDensityType,\n FieldFloatLabelType as SelectFloatLabelType,\n FieldShapeType as SelectShapeType\n} from '../../field/field-constants';\n", "import { calculateFontWidth, getShadowElement, IFontInfo, toggleClass, toggleAttribute } from '@tylertech/forge-core';\nimport { FloatingLabel, IFloatingLabel } from '../../floating-label/floating-label';\nimport { ISelectComponent } from './select';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IBaseSelectAdapter, BaseSelectAdapter } from '../core';\nimport { IListDropdownConfig } from '../../list-dropdown/list-dropdown-constants';\nimport { FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport type OptionListenerDestructor = () => void;\n\nexport interface ISelectAdapter extends IBaseSelectAdapter {\n initializeFloatingLabel(): IFloatingLabel;\n initializeLabel(): void;\n hasLabel(): boolean;\n setLabel(value: string): void;\n addRootClass(name: string): void;\n removeRootClass(name: string): void;\n setPlaceholderText(value: string): void;\n setSelectedText(value: string): void;\n addMouseDownListener(listener: (evt: MouseEvent) => void): void;\n removeMouseDownListener(listener: (evt: MouseEvent) => void): void;\n setLeadingListener(listener: (evt: Event) => void): void;\n removeLeadingListener(listener: (evt: Event) => void): void;\n setAddonEndListener(listener: (evt: Event) => void): void;\n removeAddonEndListener(listener: (evt: Event) => void): void;\n hasLeadingElement(): boolean;\n setDisabled(isDisabled: boolean): void;\n setInvalid(isInvalid: boolean): void;\n setRequired(isRequired: boolean): void;\n setRoomy(isRoomy: boolean): void;\n setDense(isDense: boolean): void;\n getLabelWidth(fontSize: number, fontFamily: string): number;\n getLabelFontMetrics(): IFontInfo;\n getTargetWidth(): number;\n hasAddonEndNodes(): boolean;\n setFocus(): void;\n isWithinSelf(element: HTMLElement): boolean;\n}\n\n/**\n * The DOM adapter behind the `<forge-select>` component.\n */\nexport class SelectAdapter extends BaseSelectAdapter implements ISelectAdapter {\n private _selectElement: HTMLElement;\n private _labelElement: HTMLLabelElement;\n private _selectedTextElement: HTMLElement;\n private _leadingSlot: HTMLSlotElement;\n private _addonEndSlot: HTMLSlotElement;\n\n constructor(component: ISelectComponent) {\n super(component);\n this._selectElement = getShadowElement(component, SELECT_CONSTANTS.selectors.ROOT);\n this._leadingSlot = getShadowElement(component, SELECT_CONSTANTS.selectors.LEADING_SLOT) as HTMLSlotElement;\n this._addonEndSlot = getShadowElement(this._component, SELECT_CONSTANTS.selectors.ADDON_END_SLOT) as HTMLSlotElement;\n this._selectedTextElement = getShadowElement(component, SELECT_CONSTANTS.selectors.SELECTED_TEXT) as HTMLElement;\n this._targetElement = this._selectElement;\n }\n\n public initializeLabel(): void {\n this._labelElement = getShadowElement(this._component, SELECT_CONSTANTS.selectors.LABEL) as HTMLLabelElement;\n }\n\n public hasLabel(): boolean {\n return !!this._labelElement;\n }\n\n public initializeAccessibility(): void {\n this._component.setAttribute('role', 'combobox');\n this._component.setAttribute('aria-haspopup', 'true');\n this._component.setAttribute('aria-expanded', 'false');\n\n // We need to ensure the host element receives a non-negative tabindex for our interactions to work properly\n if (!this._component.hasAttribute('tabindex') || this._component.tabIndex === -1) {\n this._component.tabIndex = 0;\n }\n }\n\n public initializeFloatingLabel(): IFloatingLabel {\n return new FloatingLabel(this._labelElement);\n }\n\n public setLabel(value: string): void {\n if (!this._component.hasAttribute('aria-label') || this._component.getAttribute('aria-label') === this._labelElement.textContent) {\n this._component.setAttribute('aria-label', value);\n }\n this._labelElement.textContent = value;\n }\n\n public addRootClass(name: string): void {\n this._selectElement.classList.add(name);\n }\n\n public removeRootClass(name: string): void {\n this._selectElement.classList.remove(name);\n }\n\n public setPlaceholderText(value: string): void {\n toggleAttribute(this._selectedTextElement, !!value, 'placeholder', value);\n }\n\n public addClickListener(listener: (evt: Event) => void): void {\n this._component.addEventListener('click', listener);\n }\n\n public removeClickListener(listener: (evt: Event) => void): void {\n this._component.removeEventListener('click', listener);\n }\n\n public addMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.addEventListener('mousedown', listener);\n }\n\n public removeMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.removeEventListener('mousedown', listener);\n }\n\n public addTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.removeEventListener(type, listener);\n }\n\n public open(config: IListDropdownConfig): void {\n super.open(config);\n this._component.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n this._component.setAttribute('aria-expanded', 'true');\n toggleClass(this._selectElement, true, SELECT_CONSTANTS.classes.OPENED);\n }\n\n public close(): void {\n this._component.setAttribute('aria-expanded', 'false');\n this._component.removeAttribute('aria-activedescendant');\n this._component.removeAttribute('aria-controls');\n toggleClass(this._selectElement, false, SELECT_CONSTANTS.classes.OPENED);\n super.close();\n }\n\n public updateActiveDescendant(id: string): void {\n toggleAttribute(this._component, !!id, 'aria-activedescendant', id);\n }\n\n public setSelectedText(value: string): void {\n this._selectedTextElement.textContent = value;\n }\n\n public setLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.addEventListener('slotchange', listener);\n }\n\n public removeLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.removeEventListener('slotchange', listener);\n }\n\n public setAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.addEventListener('slotchange', listener);\n }\n\n public removeAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.removeEventListener('slotchange', listener);\n }\n\n public hasLeadingElement(): boolean {\n return this._leadingSlot.assignedNodes().length > 0;\n }\n\n public setDisabled(isDisabled: boolean): void {\n toggleClass(this._selectElement, isDisabled, FIELD_CONSTANTS.classes.DISABLED);\n toggleAttribute(this._component, isDisabled, 'aria-disabled', 'true');\n this._component.tabIndex = isDisabled ? -1 : 0;\n }\n\n public setInvalid(isInvalid: boolean): void {\n toggleClass(this._selectElement, isInvalid, FIELD_CONSTANTS.classes.INVALID);\n toggleAttribute(this._component, isInvalid, 'aria-invalid', 'true');\n }\n\n public setRequired(isRequired: boolean): void {\n toggleClass(this._selectElement, isRequired, FIELD_CONSTANTS.classes.REQUIRED);\n toggleAttribute(this._component, isRequired, 'aria-required', 'true');\n }\n\n public setRoomy(isRoomy: boolean): void {\n toggleClass(this._selectElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);\n }\n\n public setDense(isDense: boolean): void {\n toggleClass(this._selectElement, isDense, FIELD_CONSTANTS.classes.DENSE);\n }\n\n public setMultiple(multiple: boolean): void {\n if (multiple) {\n this.setHostAttribute('aria-multiselectable', 'true');\n } else {\n this.removeHostAttribute('aria-multiselectable');\n }\n }\n\n public getLabelWidth(fontSize: number, fontFamily: string): number {\n return calculateFontWidth(this._labelElement.innerText, { fontSize, fontFamily });\n }\n\n public getLabelFontMetrics(): IFontInfo {\n const style = getComputedStyle(this._labelElement);\n return {\n fontSize: parseInt(style.fontSize || '16', 10),\n fontFamily: style.fontFamily || 'Roboto'\n };\n }\n\n public getTargetWidth(): number {\n return this._selectElement.getBoundingClientRect().width;\n }\n\n public hasAddonEndNodes(): boolean {\n if (!this._addonEndSlot) {\n return false;\n }\n return this._addonEndSlot.assignedNodes().length > 0;\n }\n\n public setFocus(): void {\n this._component.focus();\n }\n\n public isWithinSelf(element: HTMLElement): boolean {\n const isShadowChild = !!this._component.shadowRoot && this._component.shadowRoot.contains(element);\n return isShadowChild || this._component.contains(element);\n }\n}\n", "import { isDefined, getEventPath } from '@tylertech/forge-core';\nimport { IBaseSelectFoundation, ISelectOption, BaseSelectFoundation } from '../core';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IFloatingLabel } from '../../floating-label';\nimport { ISelectAdapter } from './select-adapter';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport interface ISelectFoundation extends IBaseSelectFoundation {\n label: string;\n disabled: boolean;\n density: FieldDensityType;\n invalid: boolean;\n required: boolean;\n floatLabelType: FieldFloatLabelType;\n placeholder: string;\n}\n\n/**\n * The foundation class behind the `<forge-select>` component.\n */\nexport class SelectFoundation extends BaseSelectFoundation<ISelectAdapter> implements ISelectFoundation {\n private _floatingLabelInstance: IFloatingLabel | undefined;\n private _shape: FieldShapeType = 'default';\n private _label = '';\n private _disabled = false;\n private _invalid = false;\n private _required = false;\n private _floatLabelType: FieldFloatLabelType = 'auto';\n private _placeholder: string;\n private _density: FieldDensityType = 'default';\n private _isInitialized = false;\n private _leadingChangeListener: (evt: Event) => void;\n private _addonEndChangeListener: (evt: Event) => void;\n private _mousedownListener: (evt: MouseEvent) => void;\n\n constructor(adapter: ISelectAdapter) {\n super(adapter);\n this._leadingChangeListener = evt => this._onLeadingSlotChanged(evt);\n this._addonEndChangeListener = evt => this._onAddonEndSlotChanged(evt);\n this._targetWidthCallback = () => this._adapter.getTargetWidth();\n this._mousedownListener = evt => this._onMouseDown(evt);\n }\n\n public initialize(): void {\n super.initialize();\n super.initializeTarget();\n this._initializeLabel();\n this._initializeAccessibility();\n\n this._adapter.setPlaceholderText(this._placeholder);\n this._applyDensity();\n this._setShapeType();\n\n this._detectLeadingElement();\n this._detectAddonEndContent();\n this._adapter.addMouseDownListener(this._mousedownListener);\n this._adapter.setLeadingListener(this._leadingChangeListener);\n this._adapter.setAddonEndListener(this._addonEndChangeListener);\n\n if (this._disabled) {\n this._adapter.setDisabled(true);\n }\n\n if (this._invalid) {\n this._adapter.setInvalid(true);\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n super.disconnect();\n this._adapter.removeMouseDownListener(this._mousedownListener);\n this._adapter.removeLeadingListener(this._leadingChangeListener);\n this._adapter.removeAddonEndListener(this._leadingChangeListener);\n\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n private _initializeLabel(): void {\n this._adapter.initializeLabel();\n this._updateLabel();\n this._floatingLabelInstance = this._adapter.initializeFloatingLabel();\n if (this._floatLabelType === 'always') {\n this._floatLabel(true);\n } else {\n const hasText = !!this._getSelectedText();\n const hasPlaceholder = !!this._placeholder;\n this._floatLabel(hasText || hasPlaceholder);\n }\n }\n\n private _destroyLabel(): void {\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n protected _initializeValue(): void {\n super._initializeValue();\n if (this._selectedValues.length) {\n this._floatLabel(true);\n }\n }\n\n private _initializeAccessibility(): void {\n this._adapter.setMultiple(this._multiple);\n if (this._required) {\n this._adapter.setHostAttribute('aria-required', 'true');\n }\n if (this._disabled) {\n this._adapter.setHostAttribute('aria-disabled', 'true');\n }\n if (this._invalid) {\n this._adapter.setHostAttribute('aria-invalid', 'true');\n }\n }\n\n private _onMouseDown(evt: MouseEvent): void {\n const isElementWithinSelf = this._adapter.isWithinSelf(evt.target as HTMLElement);\n if (isElementWithinSelf) {\n evt.preventDefault();\n }\n }\n\n /** Called when the `slotchange` event fires on the \"leading\" slot element. */\n private _onLeadingSlotChanged(evt: Event): void {\n this._detectLeadingElement();\n }\n\n /** Called when the `slotchange` event fires on the \"addon-end\" slot element. */\n private _onAddonEndSlotChanged(evt: Event): void {\n this._detectAddonEndContent();\n }\n\n /** Updates the component state based on the existance of elements within the \"leading\" slot. */\n private _detectLeadingElement(): void {\n if (this._adapter.hasLeadingElement()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LEADING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LEADING);\n }\n }\n\n private _detectAddonEndContent(): void {\n if (this._adapter.hasAddonEndNodes()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n }\n }\n\n protected _onClick(evt: MouseEvent): void {\n if (this._disabled) {\n return;\n }\n\n // We ignore clicks events that originate from without our addon-end container\n const composedPath = getEventPath(evt);\n if (composedPath.find(el => el.classList && el.classList.contains(FIELD_CONSTANTS.classes.ADDON_END_CONTAINER))) {\n return;\n }\n\n this.setFocus();\n super._onClick(evt);\n }\n\n /** Handles receiving focus on the selected text element. */\n protected _onFocus(evt: Event): void {\n if (this._disabled) {\n return;\n }\n this._setFocused();\n super._onFocus(evt);\n }\n\n protected _floatLabel(value: boolean): void {\n if (!this._floatingLabelInstance) {\n return;\n }\n\n if (value) {\n this._adapter.addRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n } else {\n this._adapter.removeRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n }\n\n if (this._floatLabelType === 'always') {\n value = true;\n }\n\n this._floatingLabelInstance.float(value, this._floatLabelType === 'always');\n }\n\n /** Handles losing focus on the selected text element. */\n protected _onBlur(evt: FocusEvent): void {\n super._onBlur(evt);\n this._setBlurred();\n }\n\n protected _onDismiss(): void {\n super._onDismiss();\n this._setBlurred();\n }\n\n protected _onDropdownScrollEnd(): void {\n this._adapter.emitHostEvent(SELECT_CONSTANTS.events.SCROLLED_BOTTOM);\n }\n\n /**\n * Handles selecting an item in the dropdown.\n * @param {ISelectOption} option The selected option.\n * @param {number} optionIndex The index of the selected option.\n */\n protected async _onSelect(option: ISelectOption, optionIndex: number, closeDropdown = true): Promise<boolean> {\n const result = await super._onSelect(option, optionIndex, closeDropdown);\n if (result) {\n this._adapter.setSelectedText(this._getSelectedText());\n if (closeDropdown && !this._multiple) {\n this._adapter.setFocus();\n }\n }\n return result;\n }\n\n /** Updates the state of the component to contain focus. */\n private _setFocused(): void {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._floatLabel(true);\n }\n\n /** Updates the state of the component to not contain focus. */\n private _setBlurred(): void {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n if (!this._selectedValues.length && !this._placeholder?.length) {\n this._floatLabel(false);\n }\n }\n\n /** Resets the state of the component to original values. */\n protected _reset(): void {\n super._reset();\n this._adapter.setSelectedText('');\n this._floatLabel(!this._placeholder?.length);\n }\n\n private _updateLabel(): void {\n if (this._adapter.hasLabel()) {\n this._adapter.setLabel(this._label);\n }\n if (this._label && this._density !== 'dense') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LABEL);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);\n }\n }\n\n protected _applyValue(value: string | string[]): void {\n super._applyValue(value);\n\n // Update the state of the component based on the existence of a selected value\n const text = this._getSelectedText();\n this._adapter.setSelectedText(text);\n if (!this._open) {\n this._floatLabel(!!text || !!this._placeholder);\n }\n }\n\n private _applyDensity(): void {\n this._adapter.setRoomy(this._density === 'roomy');\n this._adapter.setDense(this._density === 'dense');\n }\n\n protected _setShapeType(): void {\n if (this._shape === 'rounded') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n }\n }\n\n public setFocus(): void {\n this._adapter.setFocus();\n }\n\n /** Gets/sets the label text. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value;\n this._updateLabel();\n if (this._label) {\n this._initializeLabel();\n this._adapter.setHostAttribute(SELECT_CONSTANTS.attributes.LABEL, this._label);\n } else {\n this._destroyLabel();\n this.required = false;\n this._adapter.removeHostAttribute(SELECT_CONSTANTS.attributes.LABEL);\n }\n }\n }\n\n public get shape(): FieldShapeType {\n return this._shape;\n }\n public set shape(value: FieldShapeType) {\n if (this._shape !== value) {\n this._shape = value;\n\n if (this._isInitialized) {\n this._setShapeType();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.SHAPE, this._shape);\n }\n }\n\n /** Gets/sets the disabled state. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._initializeLabel();\n }\n }\n\n /** Gets/sets the invalid state. */\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid !== value) {\n this._invalid = value;\n this._adapter.setInvalid(this._invalid);\n }\n }\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required !== value) {\n this._required = value;\n this._adapter.setRequired(this._required);\n this._adapter.toggleHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED, this._required);\n }\n }\n\n /** Gets/sets the dense state. */\n public get density(): FieldDensityType {\n return this._density;\n }\n public set density(value: FieldDensityType) {\n if (this._density !== value) {\n this._density = value;\n this._applyDensity();\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());\n this._initializeLabel(); // This ensures label is removed while dense\n }\n }\n\n /** Gets/sets the floating label type. */\n public get floatLabelType(): FieldFloatLabelType {\n return this._floatLabelType;\n }\n public set floatLabelType(value: FieldFloatLabelType) {\n if (this._floatLabelType !== value) {\n this._floatLabelType = value;\n this._floatLabel(this._floatLabelType === 'always' || !!this._placeholder);\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE, isDefined(this._floatLabelType) ? this._floatLabelType.toString() : '');\n }\n }\n\n /** Gets/sets the placeholder text. */\n public get placeholder(): string {\n return this._placeholder;\n }\n public set placeholder(value: string) {\n if (this._placeholder !== value) {\n this._placeholder = value;\n this._adapter.setPlaceholderText(this._placeholder);\n this._initializeLabel();\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { tylIconArrowDropDown, tylIconCheckBoxOutlineBlank, tylIconCheckBox } from '@tylertech/tyler-icons/standard';\nimport { SelectAdapter } from './select-adapter';\nimport { SelectFoundation } from './select-foundation';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { OptionComponent } from '../option';\nimport { PopupComponent } from '../../popup';\nimport { ListComponent, ListItemComponent } from '../../list';\nimport { OptionGroupComponent } from '../option-group';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { BaseSelectComponent, BASE_SELECT_CONSTANTS } from '../core';\nimport { CircularProgressComponent } from '../../circular-progress';\nimport { ScaffoldComponent } from '../../scaffold';\nimport { ToolbarComponent } from '../../toolbar';\nimport { IconButtonComponent } from '../../icon-button';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\nimport { IBaseSelectComponent } from '../core/base-select';\n\nconst template = '<template><div class=\\\"forge-select__wrapper\\\" part=\\\"root\\\"><div class=\\\"forge-select forge-field\\\" part=\\\"container\\\"><div class=\\\"forge-select__leading-container\\\" part=\\\"leading-container\\\"><slot name=\\\"leading\\\"></slot></div><div class=\\\"forge-field__label-input-container\\\" part=\\\"label-input-container\\\"><div id=\\\"selected-text\\\" class=\\\"forge-select__selected-text\\\" part=\\\"text\\\"></div><label id=\\\"select-label\\\" aria-hidden=\\\"true\\\" part=\\\"label\\\"></label></div><forge-icon class=\\\"forge-select__dropdown-icon\\\" name=\\\"arrow_drop_down\\\" part=\\\"icon\\\"></forge-icon><div class=\\\"forge-field__addon-end-container\\\" part=\\\"addon-end-container\\\"><slot name=\\\"addon-end\\\"></slot></div></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-select{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-select-margin-top,0)}.forge-select.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-select:not(.forge-field--dense):not(.forge-field--roomy){height:3rem;height:var(--forge-select-height,3rem)}.forge-select.forge-field--roomy:not(.forge-field--dense){height:3.5rem;height:var(--forge-select-height,3.5rem)}.forge-select.forge-field--dense:not(.forge-field--roomy){height:1.5rem;height:var(--forge-select-height,1.5rem)}.forge-field::before{content:\\\"\\\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-select-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;height:auto}.forge-field~::slotted([slot=helper-text])::before{display:inline-block;width:0;height:16px;content:\\\"\\\";vertical-align:0}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-select__leading-container{display:-webkit-box;display:flex;align-self:center}.forge-field label{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field label[dir=rtl],[dir=rtl] .forge-field label{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) label{display:none}.forge-field--required label::after{content:none}.forge-field--required label::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{font-size:1rem}.forge-field--roomy:not(.forge-field--dense) label{font-size:1rem}.forge-field--disabled label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) label{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{top:1rem}.forge-field--roomy:not(.forge-field--dense) label{top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) label{left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) label{left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) label{padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded label{padding-right:32px}.forge-field label.forge-floating-label--float-above{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled label.forge-floating-label--float-above{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) label.forge-floating-label--float-above{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label.forge-floating-label--float-above{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above{-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above{-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field .forge-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:block;overflow:hidden;text-overflow:ellipsis;align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;white-space:nowrap;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0;font-size:var(--forge-select-font-size, 1rem);padding:0 12px;padding-right:0}.forge-field:not(.forge-field--disabled) .forge-select__selected-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled .forge-select__selected-text{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{font-size:.875rem;font-size:var(--forge-select-font-size, .875rem)}.forge-field .forge-select__selected-text{padding:0 12px}.forge-field--label .forge-select__selected-text{padding-top:24px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-top:29px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-select__selected-text{padding-left:32px}.forge-field--leading .forge-select__selected-text{padding-left:0}.forge-field--label .forge-select__selected-text{padding-bottom:3px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-bottom:8px}.forge-field:not(.forge-field--label):not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height, 3rem)}.forge-field:not(.forge-field--label).forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{line-height:var(--forge-select-height-roomy, 3.5rem)}.forge-field:not(.forge-field--label).forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height-dense, 1.5rem)}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{padding:0 8px}.forge-field .forge-select__selected-text:empty::before{content:attr(placeholder);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field .forge-select--label .forge-select__selected-text{padding-top:25px}.forge-field .forge-select__dropdown-icon{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:24px;height:100%;-webkit-box-flex:0;flex:none;-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);pointer-events:none;margin-right:8px}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) .forge-select__dropdown-icon{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) .forge-select__dropdown-icon{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled .forge-select__dropdown-icon{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__dropdown-icon{margin-right:4px}:host{display:block;contain:layout}:host(:focus){outline:0}:host([hidden]){display:none}';\n\nexport interface ISelectComponent extends IBaseSelectComponent {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n label: string;\n disabled: boolean;\n placeholder: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-select': ISelectComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-select-scrolled-bottom': CustomEvent<void>;\n 'change': CustomEvent<any>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-select>` component.\n * \n * @tag forge-select\n */\n@CustomElement({\n name: SELECT_CONSTANTS.elementName,\n dependencies: [\n OptionComponent,\n OptionGroupComponent,\n PopupComponent,\n ListComponent,\n ListItemComponent,\n CircularProgressComponent,\n IconComponent,\n ScaffoldComponent,\n ToolbarComponent,\n IconButtonComponent\n ]\n})\nexport class SelectComponent extends BaseSelectComponent<SelectFoundation> implements ISelectComponent {\n public static get observedAttributes(): string[] {\n return [\n FIELD_CONSTANTS.attributes.DENSITY,\n FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE,\n FIELD_CONSTANTS.attributes.SHAPE,\n FIELD_CONSTANTS.attributes.INVALID,\n FIELD_CONSTANTS.attributes.REQUIRED,\n SELECT_CONSTANTS.attributes.LABEL,\n SELECT_CONSTANTS.attributes.MULTIPLE,\n SELECT_CONSTANTS.attributes.VALUE,\n SELECT_CONSTANTS.attributes.DISABLED,\n SELECT_CONSTANTS.attributes.PLACEHOLDER,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD,\n BASE_SELECT_CONSTANTS.attributes.POPUP_CLASSES,\n BASE_SELECT_CONSTANTS.attributes.OPTION_LIMIT,\n BASE_SELECT_CONSTANTS.attributes.SYNC_POPUP_WIDTH\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define([tylIconArrowDropDown, tylIconCheckBox, tylIconCheckBoxOutlineBlank]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new SelectFoundation(new SelectAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case FIELD_CONSTANTS.attributes.DENSITY:\n this.density = newValue as FieldDensityType;\n return;\n case FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE:\n this.floatLabelType = newValue as FieldFloatLabelType;\n return;\n case FIELD_CONSTANTS.attributes.SHAPE:\n this.shape = newValue as FieldShapeType;\n break;\n case FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n return;\n case FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n return;\n case SELECT_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.PLACEHOLDER:\n this.placeholder = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the label text. */\n @FoundationProperty()\n public label: string;\n\n /** Gets/sets the disabled state. */\n @FoundationProperty()\n public disabled: boolean;\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public required: boolean;\n\n /** Controls the density type. */\n @FoundationProperty()\n public density: FieldDensityType;\n\n /** Whether the label should always float, never float or float as the user types. */\n @FoundationProperty()\n public floatLabelType: FieldFloatLabelType;\n\n /** The shape type to use. */\n @FoundationProperty()\n public shape: FieldShapeType;\n\n /** Gets/sets the placeholder text. */\n @FoundationProperty()\n public placeholder: string;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SelectComponent } from './select';\n\nexport * from './select-adapter';\nexport * from './select-constants';\nexport * from './select-foundation';\nexport * from './select';\n\nexport function defineSelectComponent(): void {\n defineCustomElement(SelectComponent);\n}\n"],
|
|
5
|
-
"mappings": "45BAEA,GAAM,GAA2C,GAAG,UAE9C,EAAU,CACd,KAAM,eACN,OAAQ,uBACR,cAAe,8BACf,SAAU,yBACV,YAAa,4BACb,cAAe,6BACjB,EAEM,EAAY,CAChB,KAAM,IAAI,EAAQ,OAClB,cAAe,IAAI,EAAQ,gBAC3B,MAAO,qBACP,aAAc,qBACd,eAAgB,sBAClB,EAEM,EAAa,CACjB,KAAM,OACN,MAAO,QACP,MAAO,QACP,SAAU,WACV,SAAU,WACV,YAAa,cACb,eAAgB,iBAChB,yBAA0B,0BAC5B,EAEM,EAAS,CACb,gBAAiB,GAAG,mBACtB,EAEa,EAAmB,CAC9B,cACA,UACA,YACA,aACA,QACF,ECAO,GAAM,GAAN,aAA4B,EAA4C,CAO7E,YAAY,EAA6B,CACvC,MAAM,CAAS,EACf,KAAK,eAAiB,EAAiB,EAAW,EAAiB,UAAU,IAAI,EACjF,KAAK,aAAe,EAAiB,EAAW,EAAiB,UAAU,YAAY,EACvF,KAAK,cAAgB,EAAiB,KAAK,WAAY,EAAiB,UAAU,cAAc,EAChG,KAAK,qBAAuB,EAAiB,EAAW,EAAiB,UAAU,aAAa,EAChG,KAAK,eAAiB,KAAK,cAC7B,CAEA,AAAO,iBAAwB,CAC7B,KAAK,cAAgB,EAAiB,KAAK,WAAY,EAAiB,UAAU,KAAK,CACzF,CAEA,AAAO,UAAoB,CACzB,MAAO,CAAC,CAAC,KAAK,aAChB,CAEA,AAAO,yBAAgC,CACrC,KAAK,WAAW,aAAa,OAAQ,UAAU,EAC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aAAuC,CAC5C,EAAoB,CAAe,CACrC",
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}select`;\n\nconst classes = {\n ROOT: 'forge-select',\n OPENED: 'forge-select--opened',\n SELECTED_TEXT: 'forge-select__selected-text',\n DROPDOWN: 'forge-select__dropdown',\n LABEL_FLOAT: 'forge-select--label-float',\n GROUP_WRAPPER: 'forge-select__group-wrapper'\n};\n\nconst selectors = {\n ROOT: `.${classes.ROOT}`,\n SELECTED_TEXT: `.${classes.SELECTED_TEXT}`,\n LABEL: 'label#select-label',\n LEADING_SLOT: 'slot[name=leading]',\n ADDON_END_SLOT: 'slot[name=addon-end]'\n};\n\nconst attributes = {\n TYPE: 'type',\n VALUE: 'value',\n LABEL: 'label',\n MULTIPLE: 'multiple',\n DISABLED: 'disabled',\n PLACEHOLDER: 'placeholder',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold'\n};\n\nconst events = {\n SCROLLED_BOTTOM: `${elementName}-scrolled-bottom`\n};\n\nexport const SELECT_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events\n};\n\nexport {\n FieldDensityType as SelectDensityType,\n FieldFloatLabelType as SelectFloatLabelType,\n FieldShapeType as SelectShapeType\n} from '../../field/field-constants';\n", "import { calculateFontWidth, getShadowElement, IFontInfo, toggleClass, toggleAttribute } from '@tylertech/forge-core';\nimport { FloatingLabel, IFloatingLabel } from '../../floating-label/floating-label';\nimport { ISelectComponent } from './select';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IBaseSelectAdapter, BaseSelectAdapter } from '../core';\nimport { IListDropdownConfig } from '../../list-dropdown/list-dropdown-constants';\nimport { FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport type OptionListenerDestructor = () => void;\n\nexport interface ISelectAdapter extends IBaseSelectAdapter {\n initializeFloatingLabel(): IFloatingLabel;\n initializeLabel(): void;\n hasLabel(): boolean;\n setLabel(value: string): void;\n addRootClass(name: string): void;\n removeRootClass(name: string): void;\n setPlaceholderText(value: string): void;\n setSelectedText(value: string): void;\n addMouseDownListener(listener: (evt: MouseEvent) => void): void;\n removeMouseDownListener(listener: (evt: MouseEvent) => void): void;\n setLeadingListener(listener: (evt: Event) => void): void;\n removeLeadingListener(listener: (evt: Event) => void): void;\n setAddonEndListener(listener: (evt: Event) => void): void;\n removeAddonEndListener(listener: (evt: Event) => void): void;\n hasLeadingElement(): boolean;\n setDisabled(isDisabled: boolean): void;\n setInvalid(isInvalid: boolean): void;\n setRequired(isRequired: boolean): void;\n setRoomy(isRoomy: boolean): void;\n setDense(isDense: boolean): void;\n getLabelWidth(fontSize: number, fontFamily: string): number;\n getLabelFontMetrics(): IFontInfo;\n getTargetWidth(): number;\n hasAddonEndNodes(): boolean;\n setFocus(): void;\n isWithinSelf(element: HTMLElement): boolean;\n}\n\n/**\n * The DOM adapter behind the `<forge-select>` component.\n */\nexport class SelectAdapter extends BaseSelectAdapter implements ISelectAdapter {\n private _selectElement: HTMLElement;\n private _labelElement: HTMLLabelElement;\n private _selectedTextElement: HTMLElement;\n private _leadingSlot: HTMLSlotElement;\n private _addonEndSlot: HTMLSlotElement;\n\n constructor(component: ISelectComponent) {\n super(component);\n this._selectElement = getShadowElement(component, SELECT_CONSTANTS.selectors.ROOT);\n this._leadingSlot = getShadowElement(component, SELECT_CONSTANTS.selectors.LEADING_SLOT) as HTMLSlotElement;\n this._addonEndSlot = getShadowElement(this._component, SELECT_CONSTANTS.selectors.ADDON_END_SLOT) as HTMLSlotElement;\n this._selectedTextElement = getShadowElement(component, SELECT_CONSTANTS.selectors.SELECTED_TEXT) as HTMLElement;\n this._targetElement = this._selectElement;\n }\n\n public initializeLabel(): void {\n this._labelElement = getShadowElement(this._component, SELECT_CONSTANTS.selectors.LABEL) as HTMLLabelElement;\n }\n\n public hasLabel(): boolean {\n return !!this._labelElement;\n }\n\n public initializeAccessibility(): void {\n this._component.setAttribute('role', 'combobox');\n this._component.setAttribute('aria-haspopup', 'true');\n this._component.setAttribute('aria-expanded', 'false');\n\n // We need to ensure the host element receives a non-negative tabindex for our interactions to work properly\n if (!this._component.hasAttribute('tabindex') || this._component.tabIndex === -1) {\n this._component.tabIndex = 0;\n }\n }\n\n public initializeFloatingLabel(): IFloatingLabel {\n return new FloatingLabel(this._labelElement);\n }\n\n public setLabel(value: string): void {\n if (!this._component.hasAttribute('aria-label') || this._component.getAttribute('aria-label') === this._labelElement.textContent) {\n this._component.setAttribute('aria-label', value);\n }\n this._labelElement.textContent = value;\n }\n\n public addRootClass(name: string): void {\n this._selectElement.classList.add(name);\n }\n\n public removeRootClass(name: string): void {\n this._selectElement.classList.remove(name);\n }\n\n public setPlaceholderText(value: string): void {\n toggleAttribute(this._selectedTextElement, !!value, 'placeholder', value);\n }\n\n public addClickListener(listener: (evt: Event) => void): void {\n this._component.addEventListener('click', listener);\n }\n\n public removeClickListener(listener: (evt: Event) => void): void {\n this._component.removeEventListener('click', listener);\n }\n\n public addMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.addEventListener('mousedown', listener);\n }\n\n public removeMouseDownListener(listener: (evt: MouseEvent) => void): void {\n this._component.removeEventListener('mousedown', listener);\n }\n\n public addTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.addEventListener(type, listener);\n }\n\n public removeTargetListener(type: string, listener: (evt: Event) => void): void {\n this._component.removeEventListener(type, listener);\n }\n\n public open(config: IListDropdownConfig): void {\n super.open(config);\n this._component.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n this._component.setAttribute('aria-expanded', 'true');\n toggleClass(this._selectElement, true, SELECT_CONSTANTS.classes.OPENED);\n }\n\n public close(): void {\n this._component.setAttribute('aria-expanded', 'false');\n this._component.removeAttribute('aria-activedescendant');\n this._component.removeAttribute('aria-controls');\n toggleClass(this._selectElement, false, SELECT_CONSTANTS.classes.OPENED);\n super.close();\n }\n\n public updateActiveDescendant(id: string): void {\n toggleAttribute(this._component, !!id, 'aria-activedescendant', id);\n }\n\n public setSelectedText(value: string): void {\n this._selectedTextElement.textContent = value;\n }\n\n public setLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.addEventListener('slotchange', listener);\n }\n\n public removeLeadingListener(listener: (evt: Event) => void): void {\n this._leadingSlot.removeEventListener('slotchange', listener);\n }\n\n public setAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.addEventListener('slotchange', listener);\n }\n\n public removeAddonEndListener(listener: (evt: Event) => void): void {\n this._addonEndSlot.removeEventListener('slotchange', listener);\n }\n\n public hasLeadingElement(): boolean {\n return this._leadingSlot.assignedNodes().length > 0;\n }\n\n public setDisabled(isDisabled: boolean): void {\n toggleClass(this._selectElement, isDisabled, FIELD_CONSTANTS.classes.DISABLED);\n toggleAttribute(this._component, isDisabled, 'aria-disabled', 'true');\n this._component.tabIndex = isDisabled ? -1 : 0;\n }\n\n public setInvalid(isInvalid: boolean): void {\n toggleClass(this._selectElement, isInvalid, FIELD_CONSTANTS.classes.INVALID);\n toggleAttribute(this._component, isInvalid, 'aria-invalid', 'true');\n }\n\n public setRequired(isRequired: boolean): void {\n toggleClass(this._selectElement, isRequired, FIELD_CONSTANTS.classes.REQUIRED);\n toggleAttribute(this._component, isRequired, 'aria-required', 'true');\n }\n\n public setRoomy(isRoomy: boolean): void {\n toggleClass(this._selectElement, isRoomy, FIELD_CONSTANTS.classes.ROOMY);\n }\n\n public setDense(isDense: boolean): void {\n toggleClass(this._selectElement, isDense, FIELD_CONSTANTS.classes.DENSE);\n }\n\n public setMultiple(multiple: boolean): void {\n if (multiple) {\n this.setHostAttribute('aria-multiselectable', 'true');\n } else {\n this.removeHostAttribute('aria-multiselectable');\n }\n }\n\n public getLabelWidth(fontSize: number, fontFamily: string): number {\n return calculateFontWidth(this._labelElement.innerText, { fontSize, fontFamily });\n }\n\n public getLabelFontMetrics(): IFontInfo {\n const style = getComputedStyle(this._labelElement);\n return {\n fontSize: parseInt(style.fontSize || '16', 10),\n fontFamily: style.fontFamily || 'Roboto'\n };\n }\n\n public getTargetWidth(): number {\n return this._selectElement.getBoundingClientRect().width;\n }\n\n public hasAddonEndNodes(): boolean {\n if (!this._addonEndSlot) {\n return false;\n }\n return this._addonEndSlot.assignedNodes().length > 0;\n }\n\n public setFocus(): void {\n this._component.focus();\n }\n\n public isWithinSelf(element: HTMLElement): boolean {\n const isShadowChild = !!this._component.shadowRoot && this._component.shadowRoot.contains(element);\n return isShadowChild || this._component.contains(element);\n }\n}\n", "import { isDefined, getEventPath } from '@tylertech/forge-core';\nimport { IBaseSelectFoundation, ISelectOption, BaseSelectFoundation } from '../core';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { IFloatingLabel } from '../../floating-label';\nimport { ISelectAdapter } from './select-adapter';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\n\nexport interface ISelectFoundation extends IBaseSelectFoundation {\n label: string;\n disabled: boolean;\n density: FieldDensityType;\n invalid: boolean;\n required: boolean;\n floatLabelType: FieldFloatLabelType;\n placeholder: string;\n}\n\n/**\n * The foundation class behind the `<forge-select>` component.\n */\nexport class SelectFoundation extends BaseSelectFoundation<ISelectAdapter> implements ISelectFoundation {\n private _floatingLabelInstance: IFloatingLabel | undefined;\n private _shape: FieldShapeType = 'default';\n private _label = '';\n private _disabled = false;\n private _invalid = false;\n private _required = false;\n private _floatLabelType: FieldFloatLabelType = 'auto';\n private _placeholder: string;\n private _density: FieldDensityType = 'default';\n private _isInitialized = false;\n private _leadingChangeListener: (evt: Event) => void;\n private _addonEndChangeListener: (evt: Event) => void;\n private _mousedownListener: (evt: MouseEvent) => void;\n\n constructor(adapter: ISelectAdapter) {\n super(adapter);\n this._leadingChangeListener = evt => this._onLeadingSlotChanged(evt);\n this._addonEndChangeListener = evt => this._onAddonEndSlotChanged(evt);\n this._targetWidthCallback = () => this._adapter.getTargetWidth();\n this._mousedownListener = evt => this._onMouseDown(evt);\n }\n\n public initialize(): void {\n super.initialize();\n super.initializeTarget();\n this._initializeLabel();\n this._initializeAccessibility();\n\n this._adapter.setPlaceholderText(this._placeholder);\n this._applyDensity();\n this._setShapeType();\n\n this._detectLeadingElement();\n this._detectAddonEndContent();\n this._adapter.addMouseDownListener(this._mousedownListener);\n this._adapter.setLeadingListener(this._leadingChangeListener);\n this._adapter.setAddonEndListener(this._addonEndChangeListener);\n\n if (this._disabled) {\n this._adapter.setDisabled(true);\n }\n\n if (this._invalid) {\n this._adapter.setInvalid(true);\n }\n\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n super.disconnect();\n this._adapter.removeMouseDownListener(this._mousedownListener);\n this._adapter.removeLeadingListener(this._leadingChangeListener);\n this._adapter.removeAddonEndListener(this._leadingChangeListener);\n\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n private _initializeLabel(): void {\n this._adapter.initializeLabel();\n this._updateLabel();\n this._floatingLabelInstance = this._adapter.initializeFloatingLabel();\n if (this._floatLabelType === 'always') {\n this._floatLabel(true);\n } else {\n const hasText = !!this._getSelectedText();\n const hasPlaceholder = !!this._placeholder;\n this._floatLabel(hasText || hasPlaceholder);\n }\n }\n\n private _destroyLabel(): void {\n if (this._floatingLabelInstance) {\n this._floatingLabelInstance.destroy();\n this._floatingLabelInstance = undefined;\n }\n }\n\n protected _initializeValue(): void {\n super._initializeValue();\n if (this._selectedValues.length) {\n this._floatLabel(true);\n }\n }\n\n private _initializeAccessibility(): void {\n this._adapter.setMultiple(this._multiple);\n if (this._required) {\n this._adapter.setHostAttribute('aria-required', 'true');\n }\n if (this._disabled) {\n this._adapter.setHostAttribute('aria-disabled', 'true');\n }\n if (this._invalid) {\n this._adapter.setHostAttribute('aria-invalid', 'true');\n }\n }\n\n private _onMouseDown(evt: MouseEvent): void {\n const isElementWithinSelf = this._adapter.isWithinSelf(evt.target as HTMLElement);\n if (isElementWithinSelf) {\n evt.preventDefault();\n }\n }\n\n /** Called when the `slotchange` event fires on the \"leading\" slot element. */\n private _onLeadingSlotChanged(evt: Event): void {\n this._detectLeadingElement();\n }\n\n /** Called when the `slotchange` event fires on the \"addon-end\" slot element. */\n private _onAddonEndSlotChanged(evt: Event): void {\n this._detectAddonEndContent();\n }\n\n /** Updates the component state based on the existance of elements within the \"leading\" slot. */\n private _detectLeadingElement(): void {\n if (this._adapter.hasLeadingElement()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LEADING);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LEADING);\n }\n }\n\n private _detectAddonEndContent(): void {\n if (this._adapter.hasAddonEndNodes()) {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.ADDON_END);\n }\n }\n\n protected _onClick(evt: MouseEvent): void {\n if (this._disabled) {\n return;\n }\n\n // We ignore clicks events that originate from without our addon-end container\n const composedPath = getEventPath(evt);\n if (composedPath.find(el => el.classList && el.classList.contains(FIELD_CONSTANTS.classes.ADDON_END_CONTAINER))) {\n return;\n }\n\n this.setFocus();\n super._onClick(evt);\n }\n\n /** Handles receiving focus on the selected text element. */\n protected _onFocus(evt: Event): void {\n if (this._disabled) {\n return;\n }\n this._setFocused();\n super._onFocus(evt);\n }\n\n protected _floatLabel(value: boolean): void {\n if (!this._floatingLabelInstance) {\n return;\n }\n\n if (value) {\n this._adapter.addRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n } else {\n this._adapter.removeRootClass(SELECT_CONSTANTS.classes.LABEL_FLOAT);\n }\n\n if (this._floatLabelType === 'always') {\n value = true;\n }\n\n this._floatingLabelInstance.float(value, this._floatLabelType === 'always');\n }\n\n /** Handles losing focus on the selected text element. */\n protected _onBlur(evt: FocusEvent): void {\n super._onBlur(evt);\n this._setBlurred();\n }\n\n protected _onDismiss(): void {\n super._onDismiss();\n this._setBlurred();\n }\n\n protected _onDropdownScrollEnd(): void {\n this._adapter.emitHostEvent(SELECT_CONSTANTS.events.SCROLLED_BOTTOM);\n }\n\n /**\n * Handles selecting an item in the dropdown.\n * @param {ISelectOption} option The selected option.\n * @param {number} optionIndex The index of the selected option.\n */\n protected async _onSelect(option: ISelectOption, optionIndex: number, closeDropdown = true): Promise<boolean> {\n const result = await super._onSelect(option, optionIndex, closeDropdown);\n if (result) {\n this._adapter.setSelectedText(this._getSelectedText());\n if (closeDropdown && !this._multiple) {\n this._adapter.setFocus();\n }\n }\n return result;\n }\n\n /** Updates the state of the component to contain focus. */\n private _setFocused(): void {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n this._floatLabel(true);\n }\n\n /** Updates the state of the component to not contain focus. */\n private _setBlurred(): void {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.FOCUSED);\n if (!this._selectedValues.length && !this._placeholder?.length) {\n this._floatLabel(false);\n }\n }\n\n /** Resets the state of the component to original values. */\n protected _reset(): void {\n super._reset();\n this._adapter.setSelectedText('');\n this._floatLabel(!this._placeholder?.length);\n }\n\n private _updateLabel(): void {\n if (this._adapter.hasLabel()) {\n this._adapter.setLabel(this._label);\n }\n if (this._label && this._density !== 'dense') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.LABEL);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.LABEL);\n }\n }\n\n protected _applyValue(value: string | string[]): void {\n super._applyValue(value);\n\n // Update the state of the component based on the existence of a selected value\n const text = this._getSelectedText();\n this._adapter.setSelectedText(text);\n if (!this._open) {\n this._floatLabel(!!text || !!this._placeholder);\n }\n }\n\n private _applyDensity(): void {\n this._adapter.setRoomy(this._density === 'roomy');\n this._adapter.setDense(this._density === 'dense');\n }\n\n protected _setShapeType(): void {\n if (this._shape === 'rounded') {\n this._adapter.addRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n } else {\n this._adapter.removeRootClass(FIELD_CONSTANTS.classes.SHAPE_ROUNDED);\n }\n }\n\n public setFocus(): void {\n this._adapter.setFocus();\n }\n\n /** Gets/sets the label text. */\n public get label(): string {\n return this._label;\n }\n public set label(value: string) {\n if (this._label !== value) {\n this._label = value;\n this._updateLabel();\n if (this._label) {\n this._initializeLabel();\n this._adapter.setHostAttribute(SELECT_CONSTANTS.attributes.LABEL, this._label);\n } else {\n this._destroyLabel();\n this.required = false;\n this._adapter.removeHostAttribute(SELECT_CONSTANTS.attributes.LABEL);\n }\n }\n }\n\n public get shape(): FieldShapeType {\n return this._shape;\n }\n public set shape(value: FieldShapeType) {\n if (this._shape !== value) {\n this._shape = value;\n\n if (this._isInitialized) {\n this._setShapeType();\n }\n\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.SHAPE, this._shape);\n }\n }\n\n /** Gets/sets the disabled state. */\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._initializeLabel();\n }\n }\n\n /** Gets/sets the invalid state. */\n public get invalid(): boolean {\n return this._invalid;\n }\n public set invalid(value: boolean) {\n if (this._invalid !== value) {\n this._invalid = value;\n this._adapter.setInvalid(this._invalid);\n }\n }\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n public get required(): boolean {\n return this._required;\n }\n public set required(value: boolean) {\n if (this._required !== value) {\n this._required = value;\n this._adapter.setRequired(this._required);\n this._adapter.toggleHostAttribute(FIELD_CONSTANTS.attributes.REQUIRED, this._required);\n }\n }\n\n /** Gets/sets the dense state. */\n public get density(): FieldDensityType {\n return this._density;\n }\n public set density(value: FieldDensityType) {\n if (this._density !== value) {\n this._density = value;\n this._applyDensity();\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.DENSITY, this._density.toString());\n this._initializeLabel(); // This ensures label is removed while dense\n }\n }\n\n /** Gets/sets the floating label type. */\n public get floatLabelType(): FieldFloatLabelType {\n return this._floatLabelType;\n }\n public set floatLabelType(value: FieldFloatLabelType) {\n if (this._floatLabelType !== value) {\n this._floatLabelType = value;\n this._floatLabel(this._floatLabelType === 'always' || !!this._placeholder);\n this._adapter.setHostAttribute(FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE, isDefined(this._floatLabelType) ? this._floatLabelType.toString() : '');\n }\n }\n\n /** Gets/sets the placeholder text. */\n public get placeholder(): string {\n return this._placeholder;\n }\n public set placeholder(value: string) {\n if (this._placeholder !== value) {\n this._placeholder = value;\n this._adapter.setPlaceholderText(this._placeholder);\n this._initializeLabel();\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { tylIconArrowDropDown, tylIconCheckBoxOutlineBlank, tylIconCheckBox } from '@tylertech/tyler-icons/standard';\nimport { SelectAdapter } from './select-adapter';\nimport { SelectFoundation } from './select-foundation';\nimport { SELECT_CONSTANTS } from './select-constants';\nimport { OptionComponent } from '../option';\nimport { PopupComponent } from '../../popup';\nimport { ListComponent, ListItemComponent } from '../../list';\nimport { OptionGroupComponent } from '../option-group';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { BaseSelectComponent, BASE_SELECT_CONSTANTS } from '../core';\nimport { CircularProgressComponent } from '../../circular-progress';\nimport { ScaffoldComponent } from '../../scaffold';\nimport { ToolbarComponent } from '../../toolbar';\nimport { IconButtonComponent } from '../../icon-button';\nimport { FieldDensityType, FieldFloatLabelType, FieldShapeType, FIELD_CONSTANTS } from '../../field/field-constants';\nimport { IBaseSelectComponent } from '../core/base-select';\n\nconst template = '<template><div class=\\\"forge-select__wrapper\\\" part=\\\"root\\\"><div class=\\\"forge-select forge-field\\\" part=\\\"container\\\"><div class=\\\"forge-select__leading-container\\\" part=\\\"leading-container\\\"><slot name=\\\"leading\\\"></slot></div><div class=\\\"forge-field__label-input-container\\\" part=\\\"label-input-container\\\"><div id=\\\"selected-text\\\" class=\\\"forge-select__selected-text\\\" part=\\\"text\\\"></div><label id=\\\"select-label\\\" aria-hidden=\\\"true\\\" part=\\\"label\\\"></label></div><forge-icon class=\\\"forge-select__dropdown-icon\\\" name=\\\"arrow_drop_down\\\" part=\\\"icon\\\"></forge-icon><div class=\\\"forge-field__addon-end-container\\\" part=\\\"addon-end-container\\\"><slot name=\\\"addon-end\\\"></slot></div></div><slot name=\\\"helper-text\\\"></slot></div></template>';\nconst styles = '.forge-select{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;position:relative;z-index:1;z-index:var(--forge-z-index-surface,1);margin-top:0;margin-top:var(--forge-select-margin-top,0)}.forge-select.forge-field--disabled{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);cursor:not-allowed}.forge-select:not(.forge-field--dense):not(.forge-field--roomy){height:3rem;height:var(--forge-select-height,3rem)}.forge-select.forge-field--roomy:not(.forge-field--dense){height:3.5rem;height:var(--forge-select-height,3.5rem)}.forge-select.forge-field--dense:not(.forge-field--roomy){height:1.5rem;height:var(--forge-select-height,1.5rem)}.forge-field::before{content:\\\"\\\";display:-webkit-box;display:flex;position:absolute;top:0;right:0;left:0;z-index:-1;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;max-width:100%;height:100%;pointer-events:none;border-style:solid;border-width:1px;-webkit-transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-color .2s 0s cubic-bezier(0, 0, .2, 1);background-color:transparent;background-color:var(--forge-select-theme-background,transparent);text-align:left}.forge-field[dir=rtl]::before,[dir=rtl] .forge-field::before{text-align:right}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused)::before{border-color:rgba(0,0,0,.38);border-color:var(--mdc-theme-text-icon-on-background,rgba(0,0,0,.38))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid):not(.forge-field--focused):hover::before{border-color:rgba(0,0,0,.87);border-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled)::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-field--invalid:not(.forge-field--disabled)::before{border-color:#b00020;border-color:var(--mdc-theme-error,#b00020)}.forge-field--invalid:not(.forge-field--disabled):not(.forge-field--focused):hover::before{border-color:#db8a98;border-color:var(--forge-theme-error-hover,#db8a98)}.forge-field--disabled::before{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--shape-rounded){border-radius:4px}.forge-field:not(.forge-field--shape-rounded)::before{border-radius:4px}.forge-field--shape-rounded{border-radius:28px}.forge-field--shape-rounded::before{border-radius:28px}.forge-field--disabled::before{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5)}.forge-field--focused::before{border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5);border-width:2px}.forge-field__label-input-container{position:relative;-webkit-box-flex:1;flex:1 1 0.0001px;height:100%;display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-align:center;align-items:center;min-width:0}.forge-field~::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:block;min-height:1.5rem;line-height:normal;padding-top:4px;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-field:not(.forge-field--dense):not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field--roomy:not(.forge-field--dense)~::slotted([slot=helper-text]){font-size:.875rem}.forge-field--dense:not(.forge-field--roomy)~::slotted([slot=helper-text]){font-size:.75rem}.forge-field~::slotted([slot=helper-text]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled)~::slotted([slot=helper-text]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field:not(.forge-field--shape-rounded)~::slotted([slot=helper-text]){margin-left:12px}.forge-field--shape-rounded~::slotted([slot=helper-text]){margin-left:32px}.forge-field ::slotted([slot=leading]){display:-webkit-box;display:flex;align-self:center}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=leading]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=leading]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=leading]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field ::slotted([slot=leading]){margin:0 4px}.forge-field ::slotted([slot=leading]:not(forge-icon-button)){padding:6px}.forge-field__addon-end-container{display:none}.forge-field--addon-end .forge-field__addon-end-container{height:100%;width:auto;display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;padding:0 4px;border-left-width:1px;border-left-style:solid;-webkit-transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1);transition:border-left-color .2s 0s cubic-bezier(0, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.54);border-left-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field:not(.forge-field--disabled):not(.forge-field--focused):not(.forge-field--invalid) .forge-field__addon-end-container:hover{border-left-color:rgba(0,0,0,.87);border-left-color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#3f51b5;border-left-color:var(--mdc-theme-primary,#3f51b5)}.forge-field.forge-field--invalid:not(.forge-field--disabled) .forge-field__addon-end-container{border-left-color:#b00020;border-left-color:var(--mdc-theme-error,#b00020)}.forge-field.forge-field--invalid:not(.forge-field--focused):not(.forge-field--disabled) .forge-field__addon-end-container:hover{border-left-color:#db8a98;border-left-color:var(--forge-theme-error-hover,#db8a98)}.forge-field.forge-field--disabled .forge-field__addon-end-container{border-left-color:rgba(0,0,0,.12);border-left-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) ::slotted([slot=addon-end]){color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) ::slotted([slot=addon-end]){color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled ::slotted([slot=addon-end]){color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-select__leading-container{display:-webkit-box;display:flex;align-self:center}.forge-field label{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65));pointer-events:none;right:0;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight,400);letter-spacing:.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, .009375em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform,inherit);font-size:var(--mdc-typography-subtitle1-font-size, 1rem);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.1rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;-webkit-transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),color 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field label[dir=rtl],[dir=rtl] .forge-field label{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.forge-field--dense:not(.forge-field--roomy) label{display:none}.forge-field--required label::after{content:none}.forge-field--required label::before{color:#b00020;color:var(--mdc-theme-error,#b00020);content:\\\"*\\\";margin-right:4px}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{font-size:1rem}.forge-field--roomy:not(.forge-field--dense) label{font-size:1rem}.forge-field--disabled label{color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-field--invalid:not(.forge-field--disabled) label{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label{top:1rem}.forge-field--roomy:not(.forge-field--dense) label{top:1.285rem}.forge-field:not(.forge-field--shape-rounded):not(.forge-field--leading) label{left:12px!important}.forge-field--shape-rounded:not(.forge-field--leading) label{left:32px!important}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end):not(.forge-field--shape-rounded) label{padding-right:12px}.forge-field:not(.forge-field--trailing):not(.forge-field--addon-end).forge-field--shape-rounded label{padding-right:32px}.forge-field label.forge-floating-label--float-above{color:rgba(0,0,0,.65);color:var(--forge-theme-form-field-label-on-background,rgba(0,0,0,.65))}.forge-field--disabled label.forge-floating-label--float-above{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6))}.forge-field--invalid:not(.forge-field--disabled) label.forge-floating-label--float-above{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--focused:not(.forge-field--invalid):not(.forge-field--disabled) label.forge-floating-label--float-above{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above{-webkit-transform:translateY(-.54rem) scale(.8125);transform:translateY(-.54rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above{-webkit-transform:translateY(-.72rem) scale(.8125);transform:translateY(-.72rem) scale(.8125);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.62rem) scale(1);transform:translateY(-.62rem) scale(1);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--float-above.forge-floating-label--float-above-end-keyframe{-webkit-transition:none;transition:none;font-size:.8125rem;-webkit-transform:translateY(-.8rem) scale(1);transform:translateY(-.8rem) scale(1);cursor:auto}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.62rem) scale(.8125);transform:translateY(-.62rem) scale(.8125);cursor:auto}.forge-field--roomy:not(.forge-field--dense) label.forge-floating-label--unfloat-above-start-keyframe{-webkit-transition:none;transition:none;font-size:1rem;-webkit-transform:translateY(-.8rem) scale(.8125);transform:translateY(-.8rem) scale(.8125);cursor:auto}.forge-field .forge-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:block;overflow:hidden;text-overflow:ellipsis;align-self:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;white-space:nowrap;-webkit-transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);transition:opacity 150ms 0s cubic-bezier(.4, 0, .2, 1);border:none;background:0 0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;line-height:normal;min-width:0;font-size:var(--forge-select-font-size, 1rem);padding:0 12px;padding-right:0}.forge-field:not(.forge-field--disabled) .forge-select__selected-text{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}.forge-field--disabled .forge-select__selected-text{color:rgba(0,0,0,.6);color:var(--forge-theme-form-field-text-disabled-on-background,rgba(0,0,0,.6));cursor:not-allowed}.forge-field:not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{font-size:1rem;font-size:var(--forge-select-font-size, 1rem)}.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{font-size:.875rem;font-size:var(--forge-select-font-size, .875rem)}.forge-field .forge-select__selected-text{padding:0 12px}.forge-field--label .forge-select__selected-text{padding-top:24px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-top:29px}.forge-field--shape-rounded:not(.forge-field--leading) .forge-select__selected-text{padding-left:32px}.forge-field--leading .forge-select__selected-text{padding-left:0}.forge-field--label .forge-select__selected-text{padding-bottom:3px}.forge-field--roomy.forge-field--label .forge-select__selected-text{padding-bottom:8px}.forge-field:not(.forge-field--label):not(.forge-field--dense):not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height, 3rem)}.forge-field:not(.forge-field--label).forge-field--roomy:not(.forge-field--dense) .forge-select__selected-text{line-height:var(--forge-select-height-roomy, 3.5rem)}.forge-field:not(.forge-field--label).forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{line-height:var(--forge-select-height-dense, 1.5rem)}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__selected-text{padding:0 8px}.forge-field .forge-select__selected-text:empty::before{content:attr(placeholder);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));font-size:.875rem}.forge-field .forge-select--label .forge-select__selected-text{padding-top:25px}.forge-field .forge-select__dropdown-icon{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;width:24px;height:100%;-webkit-box-flex:0;flex:none;-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);pointer-events:none;margin-right:8px}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-select--opened .forge-field .forge-select__dropdown-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1);transition:transform 150ms cubic-bezier(.4, 0, .2, 1),-webkit-transform 150ms cubic-bezier(.4, 0, .2, 1)}.forge-field:not(.forge-field--disabled):not(.forge-field--invalid) .forge-select__dropdown-icon{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.forge-field--invalid:not(.forge-field--disabled) .forge-select__dropdown-icon{color:#b00020;color:var(--mdc-theme-error,#b00020)}.forge-field--disabled .forge-select__dropdown-icon{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38));cursor:not-allowed;pointer-events:none}.forge-field.forge-field--dense:not(.forge-field--roomy) .forge-select__dropdown-icon{margin-right:4px}:host{display:block;contain:layout}:host(:focus){outline:0}:host([hidden]){display:none}';\n\nexport interface ISelectComponent extends IBaseSelectComponent {\n density: FieldDensityType;\n floatLabelType: FieldFloatLabelType;\n shape: FieldShapeType;\n invalid: boolean;\n required: boolean;\n label: string;\n disabled: boolean;\n placeholder: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-select': ISelectComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-select-scrolled-bottom': CustomEvent<void>;\n 'change': CustomEvent<any>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-select>` component.\n * \n * @tag forge-select\n */\n@CustomElement({\n name: SELECT_CONSTANTS.elementName,\n dependencies: [\n OptionComponent,\n OptionGroupComponent,\n PopupComponent,\n ListComponent,\n ListItemComponent,\n CircularProgressComponent,\n IconComponent,\n ScaffoldComponent,\n ToolbarComponent,\n IconButtonComponent\n ]\n})\nexport class SelectComponent extends BaseSelectComponent<SelectFoundation> implements ISelectComponent {\n public static get observedAttributes(): string[] {\n return [\n FIELD_CONSTANTS.attributes.DENSITY,\n FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE,\n FIELD_CONSTANTS.attributes.SHAPE,\n FIELD_CONSTANTS.attributes.INVALID,\n FIELD_CONSTANTS.attributes.REQUIRED,\n SELECT_CONSTANTS.attributes.LABEL,\n SELECT_CONSTANTS.attributes.MULTIPLE,\n SELECT_CONSTANTS.attributes.VALUE,\n SELECT_CONSTANTS.attributes.DISABLED,\n SELECT_CONSTANTS.attributes.PLACEHOLDER,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL,\n SELECT_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD,\n BASE_SELECT_CONSTANTS.attributes.POPUP_CLASSES,\n BASE_SELECT_CONSTANTS.attributes.OPTION_LIMIT,\n BASE_SELECT_CONSTANTS.attributes.SYNC_POPUP_WIDTH\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define([tylIconArrowDropDown, tylIconCheckBox, tylIconCheckBoxOutlineBlank]);\n attachShadowTemplate(this, template, styles);\n this._foundation = new SelectFoundation(new SelectAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case FIELD_CONSTANTS.attributes.DENSITY:\n this.density = newValue as FieldDensityType;\n return;\n case FIELD_CONSTANTS.attributes.FLOAT_LABEL_TYPE:\n this.floatLabelType = newValue as FieldFloatLabelType;\n return;\n case FIELD_CONSTANTS.attributes.SHAPE:\n this.shape = newValue as FieldShapeType;\n break;\n case FIELD_CONSTANTS.attributes.INVALID:\n this.invalid = coerceBoolean(newValue);\n return;\n case FIELD_CONSTANTS.attributes.REQUIRED:\n this.required = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n return;\n case SELECT_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n return;\n case SELECT_CONSTANTS.attributes.PLACEHOLDER:\n this.placeholder = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the label text. */\n @FoundationProperty()\n public label: string;\n\n /** Gets/sets the disabled state. */\n @FoundationProperty()\n public disabled: boolean;\n\n /** Gets/sets the invalid state. */\n @FoundationProperty()\n public invalid: boolean;\n\n /** Gets/sets the required state which controls the visibility of the asterisk in the label. */\n @FoundationProperty()\n public required: boolean;\n\n /** Controls the density type. */\n @FoundationProperty()\n public density: FieldDensityType;\n\n /** Whether the label should always float, never float or float as the user types. */\n @FoundationProperty()\n public floatLabelType: FieldFloatLabelType;\n\n /** The shape type to use. */\n @FoundationProperty()\n public shape: FieldShapeType;\n\n /** Gets/sets the placeholder text. */\n @FoundationProperty()\n public placeholder: string;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { SelectComponent } from './select';\n\nexport * from './select-adapter';\nexport * from './select-constants';\nexport * from './select-foundation';\nexport * from './select';\n\nexport function defineSelectComponent(): void {\n defineCustomElement(SelectComponent);\n}\n"],
|
|
5
|
+
"mappings": "45BAEA,GAAM,GAA2C,GAAG,UAE9C,EAAU,CACd,KAAM,eACN,OAAQ,uBACR,cAAe,8BACf,SAAU,yBACV,YAAa,4BACb,cAAe,6BACjB,EAEM,EAAY,CAChB,KAAM,IAAI,EAAQ,OAClB,cAAe,IAAI,EAAQ,gBAC3B,MAAO,qBACP,aAAc,qBACd,eAAgB,sBAClB,EAEM,EAAa,CACjB,KAAM,OACN,MAAO,QACP,MAAO,QACP,SAAU,WACV,SAAU,WACV,YAAa,cACb,eAAgB,iBAChB,yBAA0B,0BAC5B,EAEM,EAAS,CACb,gBAAiB,GAAG,mBACtB,EAEa,EAAmB,CAC9B,cACA,UACA,YACA,aACA,QACF,ECAO,GAAM,GAAN,aAA4B,EAA4C,CAO7E,YAAY,EAA6B,CACvC,MAAM,CAAS,EACf,KAAK,eAAiB,EAAiB,EAAW,EAAiB,UAAU,IAAI,EACjF,KAAK,aAAe,EAAiB,EAAW,EAAiB,UAAU,YAAY,EAC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,GACb,AAxEI,EAwEJ,wBAIA,GADP,AAAC,EAAmB,GACb,AA5EI,EA4EJ,uBAIA,GADP,AAAC,EAAmB,GACb,AAhFI,EAgFJ,8BAIA,GADP,AAAC,EAAmB,GACb,AApFI,EAoFJ,qBAIA,GADP,AAAC,EAAmB,GACb,AAxFI,EAwFJ,2BAxFI,EAAN,GAfP,AAAC,EAAc,CACb,KAAM,EAAiB,YACvB,aAAc,CACZ,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CACF,CACF,CAAC,GACY,GCtDN,aAAuC,CAC5C,EAAoB,CAAe,CACrC",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as I}from"./chunk.DGOV5RDW.js";import{a as P}from"./chunk.NGIBMR3Q.js";import{c as H}from"./chunk.7NXPOEXV.js";import{a as p,d as w}from"./chunk.QJPH24V4.js";import{a as L}from"./chunk.BOENNFXE.js";import{a as O}from"./chunk.A23NSEWA.js";import{a as n}from"./chunk.B3IJU6XJ.js";import{a as M,b as S}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as D,e as x,g as m}from"./chunk.HN4PXH3D.js";import{i as C,r as T,s as y,t as k}from"./chunk.R4NDFXVA.js";import{b,c as f,d as E,k as c}from"./chunk.G76HB2FK.js";import{a as _,f as s}from"./chunk.MCIQXNKY.js";var l=`${S}dialog`,B={ANIMATING:"forge-dialog--animating",OPEN:"forge-dialog--open",ACTION_BUTTON:"forge-dialog__action__button",BUTTON_TEXT:"forge-button__text",SCROLLABLE:"forge-dialog--scrollable",FULLSCREEN:"forge-dialog--fullscreen",MOVEABLE:"forge-dialog--moveable"},v={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",POSITION_TYPE:"position-type",POSITION_X:"position-x",POSITION_Y:"position-y",MOVEABLE:"moveable",MOVE_TARGET:"move-target",OPEN:"forge-dialog-open",INITIAL_FOCUS:"forge-dialog-focus",DFEAULT_MOVE_TARGET:"forge-dialog-move-target"},R={CONTAINER:".forge-dialog",SURFACE:".forge-dialog__surface",BACKDROP:p.elementName,INITIAL_FOCUS:`[${v.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${v.DFEAULT_MOVE_TARGET}]`,CONTENT:".forge-dialog__body"},z={BEFORE_CLOSE:`${l}-before-close`,OPEN:`${l}-open`,CLOSE:`${l}-close`,READY:`${l}-ready`,MOVE_START:`${l}-move-start`,MOVED:`${l}-move`,MOVE_END:`${l}-move-end`},K={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:B,selectors:R,attributes:v,events:z,numbers:K};var g=class{constructor(e){this._adapter=e;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._positionType="absolute";this._positionX=null;this._positionY=null;this._moveable=!1;this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET;this._isAnimating=!1;this._isMoving=!1;this._attachedDocumentKeydownHandler=!1;this._attachedBackdropClickHandler=!1;this._transitionEndHandler=t=>this._onTransitionEnd(),this._documentKeydownHandler=t=>this._onDocumentKeydown(t),this._backdropClickHandler=t=>this._onBackdropClick(t),this._moveTargetMouseDownHandler=t=>this._onMoveTargetMouseDown(t),this._moveTargetMouseMoveHandler=t=>this._onMoveTargetMouseMove(t),this._moveTargetMouseUpHandler=t=>this._onMoveTargetMouseUp(t)}initialize(){this._adapter.initializeAccessibility(),this._open&&this._moveable&&(this._adapter.setMoveable(this._moveable),this._initMoveTarget())}destroy(){this._open&&(this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(e){if(e){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=e,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=e,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(e){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(e){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}_normalizePositionValue(e){return E(e)?`${e}px`:f(e)?e:null}_openDialog(){this._adapter.attach(),this._fullscreen||(this._moveable&&this._adapter.setMoveable(this._moveable),(this._positionX!=null||this._positionY!=null)&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)),this._adapter.setBodyAttribute(i.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._transitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),this._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&this._onTransitionEnd()})},i.numbers.ANIMATION_DURATION)}_closeDialog(){this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.detach(),this._adapter.getOpenDialogs(i.elementName).length||this._adapter.removeBodyAttribute(i.attributes.OPEN)},i.numbers.ANIMATION_DURATION)}_onTransitionEnd(){!this._isAnimating||(this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.setAnimating(!1),this._adapter.emitHostEvent(i.events.READY),this._adapter.tryLayoutChildren(),this._moveable&&this._initMoveTarget(),this._isAnimating=!1)}_initMoveTarget(){!this._fullscreen&&this._moveable&&this._moveTarget&&this._adapter.setMoveTarget(this._moveTarget)&&this._adapter.setMoveTargetHandler("mousedown",this._moveTargetMouseDownHandler)}_removeDragHandlers(){this._adapter.removeDragTargetHandler("mousedown",this._moveTargetMouseDownHandler),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseDown(e){e.preventDefault(),this._adapter.captureActiveElement();let t=this._adapter.getSurfaceBounds();this._moveContext={top:e.clientY-t.top,left:e.clientX-t.left,height:t.height,width:t.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(e){e.preventDefault();let t=this._calculateOffsetPosition(e.pageX,e.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,t,!0,!0)))return;let o=this._clampPosition(t,this._moveContext);if((!this._lastPosition||o.x!==this._lastPosition.x||o.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(i.events.MOVED,o,!0,!0)){this._lastPosition=_({},o);let d=this._normalizePositionValue(o.x),N=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,N,"absolute")}}_onMoveTargetMouseUp(e){this._isMoving&&this._adapter.emitHostEvent(i.events.MOVE_END),this._moveComplete()}_moveComplete(){this._adapter.tryRestoreActiveElement(),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_onDocumentKeydown(e){e.stopPropagation(),e.key&&(e.key==="Escape"||e.key==="Esc")&&this._tryClose()}_onBackdropClick(e){e.stopPropagation(),this._tryClose()}async _tryClose(){if(!!this._adapter.emitHostEvent(i.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())!==!1){this.open=!1;return}}catch(t){return}}}_setBackdropClickListener(e){!this._open||(e&&!this._attachedBackdropClickHandler?(this._adapter.registerBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!0):!e&&this._attachedBackdropClickHandler&&(this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!1))}_setDocumentKeydownListener(e){!this._open||(e&&!this._attachedDocumentKeydownHandler?(this._adapter.setDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!0):!e&&this._attachedDocumentKeydownHandler&&(this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!1))}_calculateOffsetPosition(e,t,o){return{x:e-((o==null?void 0:o.left)||0),y:t-((o==null?void 0:o.top)||0)}}_clampPosition({x:e,y:t},o){let a=0,d=0;return o&&(a=o.width,d=o.height),e<=0?e=0:e+a>=window.innerWidth&&(e=window.innerWidth-a),t<=0?t=0:t+d>=window.innerHeight&&(t=window.innerHeight-d),{x:e,y:t}}set backdropClose(e){e=Boolean(e),this._backdropClose!==e&&(this._backdropClose=e,this._setBackdropClickListener(this._backdropClose),b(this._backdropClose)?this._adapter.setHostAttribute(i.attributes.BACKDROP_CLOSE,this._backdropClose.toString()):this._adapter.removeHostAttribute(i.attributes.BACKDROP_CLOSE))}get backdropClose(){return this._backdropClose}set escapeClose(e){e=Boolean(e),this._escapeClose!==e&&(this._escapeClose=e,this._setDocumentKeydownListener(this._escapeClose),b(this._escapeClose)?this._adapter.setHostAttribute(i.attributes.ESCAPE_CLOSE,this._escapeClose.toString()):this._adapter.removeHostAttribute(i.attributes.ESCAPE_CLOSE))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(e){this._open!==e&&(e=Boolean(e),e!==this._open&&this._applyOpen(e))}get fullscreen(){return this._fullscreen}set fullscreen(e){this._fullscreen!==e&&(this._fullscreen=e,this._adapter.setFullscreen(this._fullscreen))}get openCallback(){return this._openCallback}set openCallback(e){this._openCallback=e}get closeCallback(){return this._closeCallback}set closeCallback(e){this._closeCallback=e}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(e){this._beforeCloseCallback=e}get positionType(){return this._positionType}set positionType(e){this._positionType!==e&&(this._positionType=e,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(e){this._positionX!==e&&(this._positionX=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(e){this._positionY!==e&&(this._positionY=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(e){this._moveable!==e&&(this._moveable=e,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(e){this._moveTarget=e}};var u=class extends O{constructor(t){super(t);this._backdropElement=m(t,i.selectors.BACKDROP),this._containerElement=m(t,i.selectors.CONTAINER),this._surfaceElement=m(t,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(t){t?this._containerElement.classList.add(i.classes.ANIMATING):this._containerElement.classList.remove(i.classes.ANIMATING)}setVisibility(t){t?this._containerElement.classList.add(i.classes.OPEN):this._containerElement.classList.remove(i.classes.OPEN)}attach(){document.body.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),C(this._component)}registerTransitionEndHandler(t){this._surfaceElement.addEventListener("transitionend",t)}deregisterTransitionEndHandler(t){this._surfaceElement.removeEventListener("transitionend",t)}setDocumentListener(t,o){document.addEventListener(t,o)}removeDocumentListener(t,o){document.removeEventListener(t,o)}registerBackdropClickHandler(t){this._backdropElement.addEventListener(p.events.BACKDROP_CLICK,t)}deregisterBackdropClickHandler(t){this._backdropElement.removeEventListener(p.events.BACKDROP_CLICK,t)}getOpenDialogs(t){return document.querySelectorAll(t)}setBodyAttribute(t,o){document.body.setAttribute(t,o)}removeBodyAttribute(t){document.body.removeAttribute(t)}trySetInitialFocus(){let t=T(this._component,i.selectors.INITIAL_FOCUS);t&&t.length&&t[t.length-1].focus()}isScrollable(){let t=this._component.querySelector(i.selectors.CONTENT);return t?t.scrollHeight>t.offsetHeight:!1}addRootClass(t){this._component.classList.add(t)}setFullscreen(t){t?this._containerElement.classList.add(i.classes.FULLSCREEN):this._containerElement.classList.remove(i.classes.FULLSCREEN)}setMoveable(t){k(this._containerElement,t,i.classes.MOVEABLE)}tryLayoutChildren(){let t=[L.elementName,I.elementName,H.elementName,P.elementName];Array.from(this._component.querySelectorAll(t.join(","))).filter(a=>typeof a.layout=="function").forEach(a=>a.layout())}setMoveTarget(t){return t?(this._moveTargetElement=this._component.querySelector(t),!!this._moveTargetElement):!1}setMoveTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.addEventListener(t,o)}removeDragTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.removeEventListener(t,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(t,o,a){this._surfaceElement.style.position=a==="absolute"?a:"relative",o!=null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),t!=null?this._surfaceElement.style.left=t:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){this._activeElement=y(),this._activeElement&&this._activeElement.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var F='<template><div class="forge-dialog" part="root"><forge-backdrop part="scrim"></forge-backdrop><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',U='.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}',r=class extends A{constructor(){super();x(this,F,U),this._foundation=new g(new u(this))}static get observedAttributes(){return[i.attributes.BACKDROP_CLOSE,i.attributes.ESCAPE_CLOSE,i.attributes.OPEN,i.attributes.FULLSCREEN,i.attributes.POSITION_TYPE,i.attributes.POSITION_X,i.attributes.POSITION_Y,i.attributes.MOVEABLE,i.attributes.MOVE_TARGET]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(t,o,a){switch(t){case i.attributes.BACKDROP_CLOSE:this.backdropClose=a==="true";break;case i.attributes.ESCAPE_CLOSE:this.escapeClose=a==="true";break;case i.attributes.OPEN:this.open=c(a);break;case i.attributes.FULLSCREEN:this.fullscreen=c(a);break;case i.attributes.POSITION_TYPE:this.positionType=a;break;case i.attributes.POSITION_X:this.positionX=a;break;case i.attributes.POSITION_Y:this.positionY=a;break;case i.attributes.MOVEABLE:this.moveable=c(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}};s([n()],r.prototype,"backdropClose",2),s([n()],r.prototype,"escapeClose",2),s([n()],r.prototype,"open",2),s([n()],r.prototype,"fullscreen",2),s([n()],r.prototype,"openCallback",2),s([n()],r.prototype,"closeCallback",2),s([n()],r.prototype,"beforeCloseCallback",2),s([n()],r.prototype,"positionType",2),s([n()],r.prototype,"positionX",2),s([n()],r.prototype,"positionY",2),s([n()],r.prototype,"moveable",2),s([n()],r.prototype,"moveTarget",2),r=s([M({name:i.elementName,dependencies:[w]})],r);function xe(){D(r)}export{i as a,g as b,u as c,r as d,xe as e};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as I}from"./chunk.HUWXZ4ZN.js";import{a as P}from"./chunk.NGIBMR3Q.js";import{c as H}from"./chunk.7NXPOEXV.js";import{a as p,d as w}from"./chunk.QJPH24V4.js";import{a as L}from"./chunk.BOENNFXE.js";import{a as O}from"./chunk.A23NSEWA.js";import{a as n}from"./chunk.B3IJU6XJ.js";import{a as M,b as S}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as D,e as x,g as m}from"./chunk.HN4PXH3D.js";import{i as C,r as T,s as y,t as k}from"./chunk.R4NDFXVA.js";import{b,c as f,d as E,k as c}from"./chunk.G76HB2FK.js";import{a as _,f as s}from"./chunk.MCIQXNKY.js";var l=`${S}dialog`,B={ANIMATING:"forge-dialog--animating",OPEN:"forge-dialog--open",ACTION_BUTTON:"forge-dialog__action__button",BUTTON_TEXT:"forge-button__text",SCROLLABLE:"forge-dialog--scrollable",FULLSCREEN:"forge-dialog--fullscreen",MOVEABLE:"forge-dialog--moveable"},v={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",POSITION_TYPE:"position-type",POSITION_X:"position-x",POSITION_Y:"position-y",MOVEABLE:"moveable",MOVE_TARGET:"move-target",OPEN:"forge-dialog-open",INITIAL_FOCUS:"forge-dialog-focus",DFEAULT_MOVE_TARGET:"forge-dialog-move-target"},R={CONTAINER:".forge-dialog",SURFACE:".forge-dialog__surface",BACKDROP:p.elementName,INITIAL_FOCUS:`[${v.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${v.DFEAULT_MOVE_TARGET}]`,CONTENT:".forge-dialog__body"},z={BEFORE_CLOSE:`${l}-before-close`,OPEN:`${l}-open`,CLOSE:`${l}-close`,READY:`${l}-ready`,MOVE_START:`${l}-move-start`,MOVED:`${l}-move`,MOVE_END:`${l}-move-end`},K={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:B,selectors:R,attributes:v,events:z,numbers:K};var g=class{constructor(e){this._adapter=e;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._positionType="absolute";this._positionX=null;this._positionY=null;this._moveable=!1;this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET;this._isAnimating=!1;this._isMoving=!1;this._attachedDocumentKeydownHandler=!1;this._attachedBackdropClickHandler=!1;this._transitionEndHandler=t=>this._onTransitionEnd(),this._documentKeydownHandler=t=>this._onDocumentKeydown(t),this._backdropClickHandler=t=>this._onBackdropClick(t),this._moveTargetMouseDownHandler=t=>this._onMoveTargetMouseDown(t),this._moveTargetMouseMoveHandler=t=>this._onMoveTargetMouseMove(t),this._moveTargetMouseUpHandler=t=>this._onMoveTargetMouseUp(t)}initialize(){this._adapter.initializeAccessibility(),this._open&&this._moveable&&(this._adapter.setMoveable(this._moveable),this._initMoveTarget())}destroy(){this._open&&(this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(e){if(e){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=e,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=e,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(e){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(e){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}_normalizePositionValue(e){return E(e)?`${e}px`:f(e)?e:null}_openDialog(){this._adapter.attach(),this._fullscreen||(this._moveable&&this._adapter.setMoveable(this._moveable),(this._positionX!=null||this._positionY!=null)&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)),this._adapter.setBodyAttribute(i.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._transitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),this._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&this._onTransitionEnd()})},i.numbers.ANIMATION_DURATION)}_closeDialog(){this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._attachedDocumentKeydownHandler&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedBackdropClickHandler&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.detach(),this._adapter.getOpenDialogs(i.elementName).length||this._adapter.removeBodyAttribute(i.attributes.OPEN)},i.numbers.ANIMATION_DURATION)}_onTransitionEnd(){!this._isAnimating||(this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.setAnimating(!1),this._adapter.emitHostEvent(i.events.READY),this._adapter.tryLayoutChildren(),this._moveable&&this._initMoveTarget(),this._isAnimating=!1)}_initMoveTarget(){!this._fullscreen&&this._moveable&&this._moveTarget&&this._adapter.setMoveTarget(this._moveTarget)&&this._adapter.setMoveTargetHandler("mousedown",this._moveTargetMouseDownHandler)}_removeDragHandlers(){this._adapter.removeDragTargetHandler("mousedown",this._moveTargetMouseDownHandler),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseDown(e){e.preventDefault(),this._adapter.captureActiveElement();let t=this._adapter.getSurfaceBounds();this._moveContext={top:e.clientY-t.top,left:e.clientX-t.left,height:t.height,width:t.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(e){e.preventDefault();let t=this._calculateOffsetPosition(e.pageX,e.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,t,!0,!0)))return;let o=this._clampPosition(t,this._moveContext);if((!this._lastPosition||o.x!==this._lastPosition.x||o.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(i.events.MOVED,o,!0,!0)){this._lastPosition=_({},o);let d=this._normalizePositionValue(o.x),N=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,N,"absolute")}}_onMoveTargetMouseUp(e){this._isMoving&&this._adapter.emitHostEvent(i.events.MOVE_END),this._moveComplete()}_moveComplete(){this._adapter.tryRestoreActiveElement(),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_onDocumentKeydown(e){e.stopPropagation(),e.key&&(e.key==="Escape"||e.key==="Esc")&&this._tryClose()}_onBackdropClick(e){e.stopPropagation(),this._tryClose()}async _tryClose(){if(!!this._adapter.emitHostEvent(i.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())!==!1){this.open=!1;return}}catch(t){return}}}_setBackdropClickListener(e){!this._open||(e&&!this._attachedBackdropClickHandler?(this._adapter.registerBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!0):!e&&this._attachedBackdropClickHandler&&(this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._attachedBackdropClickHandler=!1))}_setDocumentKeydownListener(e){!this._open||(e&&!this._attachedDocumentKeydownHandler?(this._adapter.setDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!0):!e&&this._attachedDocumentKeydownHandler&&(this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._attachedDocumentKeydownHandler=!1))}_calculateOffsetPosition(e,t,o){return{x:e-((o==null?void 0:o.left)||0),y:t-((o==null?void 0:o.top)||0)}}_clampPosition({x:e,y:t},o){let a=0,d=0;return o&&(a=o.width,d=o.height),e<=0?e=0:e+a>=window.innerWidth&&(e=window.innerWidth-a),t<=0?t=0:t+d>=window.innerHeight&&(t=window.innerHeight-d),{x:e,y:t}}set backdropClose(e){e=Boolean(e),this._backdropClose!==e&&(this._backdropClose=e,this._setBackdropClickListener(this._backdropClose),b(this._backdropClose)?this._adapter.setHostAttribute(i.attributes.BACKDROP_CLOSE,this._backdropClose.toString()):this._adapter.removeHostAttribute(i.attributes.BACKDROP_CLOSE))}get backdropClose(){return this._backdropClose}set escapeClose(e){e=Boolean(e),this._escapeClose!==e&&(this._escapeClose=e,this._setDocumentKeydownListener(this._escapeClose),b(this._escapeClose)?this._adapter.setHostAttribute(i.attributes.ESCAPE_CLOSE,this._escapeClose.toString()):this._adapter.removeHostAttribute(i.attributes.ESCAPE_CLOSE))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(e){this._open!==e&&(e=Boolean(e),e!==this._open&&this._applyOpen(e))}get fullscreen(){return this._fullscreen}set fullscreen(e){this._fullscreen!==e&&(this._fullscreen=e,this._adapter.setFullscreen(this._fullscreen))}get openCallback(){return this._openCallback}set openCallback(e){this._openCallback=e}get closeCallback(){return this._closeCallback}set closeCallback(e){this._closeCallback=e}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(e){this._beforeCloseCallback=e}get positionType(){return this._positionType}set positionType(e){this._positionType!==e&&(this._positionType=e,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(e){this._positionX!==e&&(this._positionX=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(e){this._positionY!==e&&(this._positionY=this._normalizePositionValue(e),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(e){this._moveable!==e&&(this._moveable=e,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(e){this._moveTarget=e}};var u=class extends O{constructor(t){super(t);this._backdropElement=m(t,i.selectors.BACKDROP),this._containerElement=m(t,i.selectors.CONTAINER),this._surfaceElement=m(t,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(t){t?this._containerElement.classList.add(i.classes.ANIMATING):this._containerElement.classList.remove(i.classes.ANIMATING)}setVisibility(t){t?this._containerElement.classList.add(i.classes.OPEN):this._containerElement.classList.remove(i.classes.OPEN)}attach(){document.body.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),C(this._component)}registerTransitionEndHandler(t){this._surfaceElement.addEventListener("transitionend",t)}deregisterTransitionEndHandler(t){this._surfaceElement.removeEventListener("transitionend",t)}setDocumentListener(t,o){document.addEventListener(t,o)}removeDocumentListener(t,o){document.removeEventListener(t,o)}registerBackdropClickHandler(t){this._backdropElement.addEventListener(p.events.BACKDROP_CLICK,t)}deregisterBackdropClickHandler(t){this._backdropElement.removeEventListener(p.events.BACKDROP_CLICK,t)}getOpenDialogs(t){return document.querySelectorAll(t)}setBodyAttribute(t,o){document.body.setAttribute(t,o)}removeBodyAttribute(t){document.body.removeAttribute(t)}trySetInitialFocus(){let t=T(this._component,i.selectors.INITIAL_FOCUS);t&&t.length&&t[t.length-1].focus()}isScrollable(){let t=this._component.querySelector(i.selectors.CONTENT);return t?t.scrollHeight>t.offsetHeight:!1}addRootClass(t){this._component.classList.add(t)}setFullscreen(t){t?this._containerElement.classList.add(i.classes.FULLSCREEN):this._containerElement.classList.remove(i.classes.FULLSCREEN)}setMoveable(t){k(this._containerElement,t,i.classes.MOVEABLE)}tryLayoutChildren(){let t=[L.elementName,I.elementName,H.elementName,P.elementName];Array.from(this._component.querySelectorAll(t.join(","))).filter(a=>typeof a.layout=="function").forEach(a=>a.layout())}setMoveTarget(t){return t?(this._moveTargetElement=this._component.querySelector(t),!!this._moveTargetElement):!1}setMoveTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.addEventListener(t,o)}removeDragTargetHandler(t,o){this._moveTargetElement&&this._moveTargetElement.removeEventListener(t,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(t,o,a){this._surfaceElement.style.position=a==="absolute"?a:"relative",o!=null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),t!=null?this._surfaceElement.style.left=t:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){this._activeElement=y(),this._activeElement&&this._activeElement.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var F='<template><div class="forge-dialog" part="root"><forge-backdrop part="scrim"></forge-backdrop><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',U='.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}',r=class extends A{constructor(){super();x(this,F,U),this._foundation=new g(new u(this))}static get observedAttributes(){return[i.attributes.BACKDROP_CLOSE,i.attributes.ESCAPE_CLOSE,i.attributes.OPEN,i.attributes.FULLSCREEN,i.attributes.POSITION_TYPE,i.attributes.POSITION_X,i.attributes.POSITION_Y,i.attributes.MOVEABLE,i.attributes.MOVE_TARGET]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(t,o,a){switch(t){case i.attributes.BACKDROP_CLOSE:this.backdropClose=a==="true";break;case i.attributes.ESCAPE_CLOSE:this.escapeClose=a==="true";break;case i.attributes.OPEN:this.open=c(a);break;case i.attributes.FULLSCREEN:this.fullscreen=c(a);break;case i.attributes.POSITION_TYPE:this.positionType=a;break;case i.attributes.POSITION_X:this.positionX=a;break;case i.attributes.POSITION_Y:this.positionY=a;break;case i.attributes.MOVEABLE:this.moveable=c(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}};s([n()],r.prototype,"backdropClose",2),s([n()],r.prototype,"escapeClose",2),s([n()],r.prototype,"open",2),s([n()],r.prototype,"fullscreen",2),s([n()],r.prototype,"openCallback",2),s([n()],r.prototype,"closeCallback",2),s([n()],r.prototype,"beforeCloseCallback",2),s([n()],r.prototype,"positionType",2),s([n()],r.prototype,"positionX",2),s([n()],r.prototype,"positionY",2),s([n()],r.prototype,"moveable",2),s([n()],r.prototype,"moveTarget",2),r=s([M({name:i.elementName,dependencies:[w]})],r);function xe(){D(r)}export{i as a,g as b,u as c,r as d,xe as e};
|
|
7
|
+
//# sourceMappingURL=chunk.NNGE722W.js.map
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as z,b as B,c as H,d as K,e as U}from"./chunk.RKKJB3EE.js";import{E as S}from"./chunk.JB2N65SR.js";import{F as O}from"./chunk.J3NHIF6W.js";import{a as o}from"./chunk.E43TT4RI.js";import{a as m}from"./chunk.IMK2LFWR.js";import{e as D}from"./chunk.AWCBH5KW.js";import{e as w}from"./chunk.3UMBCR4P.js";import{b as N}from"./chunk.BOENNFXE.js";import{l as F}from"./chunk.LZMYHIO2.js";import{a as V}from"./chunk.D4SNVKDA.js";import{d as R,l as x}from"./chunk.YAJT3P6V.js";import{a as M}from"./chunk.24D46RLZ.js";import{b as T}from"./chunk.7ZS4N2FT.js";import{e as p}from"./chunk.KYCC3C3M.js";import{a as C}from"./chunk.B3IJU6XJ.js";import{a as L,b as A}from"./chunk.BSZ2LBJX.js";import{a as y,e as P,i as E}from"./chunk.HN4PXH3D.js";import{s as g}from"./chunk.R4NDFXVA.js";import{f as v,g as k}from"./chunk.G76HB2FK.js";import{f as h}from"./chunk.MCIQXNKY.js";var d=`${A}date-range-picker`,l=class{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new l(this)}},q={FROM:"from",TO:"to",END_VALUE:"end-value"},G={INPUT:"input"},W={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},i={elementName:d,selectors:G,events:W,observedAttributes:q};var _=class extends K{constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(i.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(i.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${i.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new O(t,this._dropdownIdentifier)}initializeMask(t){this._fromInputMask&&this._fromInputMask.destroy(),this._fromInputMask=new T(this._fromInputElement,t)}initializeToMask(t){this._toInputMask&&this._toInputMask.destroy(),this._toInputMask=new T(this._toInputElement,t)}destroy(){super.destroy(),this._destroyToValueChangeListener()}destroyMask(){this._fromInputMask&&(this._fromInputMask.destroy(),this._fromInputMask=void 0),this._toInputMask&&(this._toInputMask.destroy(),this._toInputMask=void 0)}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier))}addInputListener(t,e,n){var a;(a=this._fromInputElement)==null||a.addEventListener(t,e,{capture:n})}addToInputListener(t,e,n){var a;(a=this._toInputElement)==null||a.addEventListener(t,e,{capture:n})}removeInputListener(t,e){var n;(n=this._fromInputElement)==null||n.removeEventListener(t,e)}removeToInputListener(t,e){var n;(n=this._toInputElement)==null||n.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let n=D(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(n)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=D(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(){return this._toInputElement===g()||this._fromInputElement===g()}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){E(this._fromInputElement,t,e)}emitToInputEvent(t,e){E(this._toInputElement,t,e)}_createToggleElement(){return H("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var c=class extends U{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(e),this._toInputBlurListener=e=>this._onToInputBlur(e)}_initializeState(){this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let n=this._getTypedValue(t&&t.from||null),a=this._getTypedValue(t&&t.to||null),u=new l({from:n,to:a});return this._adapter.emitHostEvent(i.events.CHANGE,u,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(i.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(i.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new o({from:this._from||t,to:t}):new o({from:t});this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t)}_onClear(){this._onDateSelected({date:null,range:new o,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(k(e)&&this._isDateValueAcceptable(e)){let n=this._formatDate(e);n&&this._adapter.setToInputValue(n,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let n=this._formatDate(e&&e.from||null),a=this._formatDate(e&&e.to||null);this._adapter.setInputValue(n,this._notifyInputValueChanges),this._adapter.setToInputValue(a,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(a?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new o({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new o({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new o({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new o({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeMask(){if(super._initializeMask(),this._masked){let t={showMaskFormat:this._showMaskFormat,pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,n,a,u)=>this._prepareMaskCallback.call(null,e,n,a,u)),this._adapter.initializeToMask(t)}}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new o({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new o({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(i.events.INPUT,e),!p(n,this._from)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new o({from:n||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(i.events.INPUT,e),!p(n,this._to)&&this._isDateValueAcceptable(n)&&this._emitChangeEvent(new o({from:this._from||void 0,to:n||void 0}))}_onToInputFocus(t){this._adapter.selectToInputText()}_onToInputBlur(t){this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);p(n,this._from)||(this.from=n,this._emitChangeEvent(new o({from:n||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),n=this._coerceDateValue(e);p(n,this._to)||(this.to=n,this._emitChangeEvent(new o({from:this._from||void 0,to:n||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){!t||(t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to})}get from(){let t=this._getTypedValue(this._from);return t?v(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new o({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?v(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new o({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var X="<template><slot></slot></template>",j=":host{display:block}:host([hidden]){display:none}",s=class extends B{constructor(){super();R.define(F),P(this,X,j),this._foundation=new c(new _(this))}static get observedAttributes(){return[...Object.values(z.observedAttributes),i.observedAttributes.FROM,i.observedAttributes.TO]}attributeChangedCallback(t,e,n){switch(t){case i.observedAttributes.FROM:this.from=n;return;case i.observedAttributes.TO:this.to=n;return}super.attributeChangedCallback(t,e,n)}};h([C()],s.prototype,"from",2),h([C()],s.prototype,"to",2),s=h([L({name:i.elementName,dependencies:[w,S,N,x]})],s);var $=class extends M{constructor(t){super(t)}_build(){let t=document.createElement(i.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${m.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(i.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var n,a,u,I,b;this._textField=document.createElement(m.elementName),(n=this._config.options)!=null&&n.required&&(this._textField.required=!0),(a=this._config.options)!=null&&a.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((u=this._config.options)==null?void 0:u.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((b=this._config.options)==null?void 0:b.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function $t(){y(s)}export{l as a,i as b,_ as c,c as d,s as e,$ as f,$t as g};
|
|
7
|
+
//# sourceMappingURL=chunk.VOMWB7Q6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/date-range-picker/date-range-picker-constants.ts", "../../src/date-range-picker/date-range-picker-adapter.ts", "../../src/date-range-picker/date-range-picker-foundation.ts", "../../src/date-range-picker/date-range-picker.ts", "../../src/date-range-picker/date-range-picker-component-delegate.ts", "../../src/date-range-picker/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}date-range-picker`;\n\nexport class DatePickerRange implements IDatePickerRange {\n public from?: Date | string | null;\n public to?: Date | string | null;\n constructor(range?: IDatePickerRange) {\n if (range) {\n this.from = range.from;\n this.to = range.to;\n }\n }\n\n public copy(): DatePickerRange {\n return new DatePickerRange(this);\n }\n}\n\nexport interface IDatePickerRange {\n from?: Date | string | null;\n to?: Date | string | null;\n}\n\nconst observedAttributes = {\n FROM: 'from',\n TO: 'to',\n END_VALUE: 'end-value'\n};\n\nconst selectors = {\n INPUT: 'input'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`\n};\n\nexport const DATE_RANGE_PICKER_CONSTANTS = {\n elementName,\n selectors,\n events,\n observedAttributes\n};\n\n\nexport interface IDateRangePickerChangeEventData extends DatePickerRange {}\n", "import { emitEvent, listenOwnProperty, getActiveElement } from '@tylertech/forge-core';\nimport { CalendarDropdown, ICalendarDropdownPopupConfig } from '../calendar/calendar-dropdown';\nimport { DateInputMask, IDateInputMaskOptions } from '../core';\nimport { BaseDatePickerAdapter, IBaseDatePickerAdapter } from '../date-picker/base/base-date-picker-adapter';\nimport { IDatePickerCalendarDropdownConfig } from '../date-picker/base/base-date-picker-constants';\nimport { createToggleElement } from '../date-picker/base/base-date-picker-utils';\nimport { DateRangePickerComponent, IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS } from './date-range-picker-constants';\n\nexport interface IDateRangePickerAdapter extends IBaseDatePickerAdapter {\n initializeToMask(toOptions: IDateInputMaskOptions): void;\n addToInputListener(type: string, listener: (event: Event) => void): void;\n removeToInputListener(type: string, listener: (event: Event) => void): void;\n setToInputValueChangedListener(context: any, listener: (value: any) => void): void;\n getToInputValue(): string;\n setToInputValue(value: string, emitEvents: boolean): void;\n emitInputEvent(type: string, data?: any): void;\n emitToInputEvent(type: string, data?: any): void;\n tryFocusInput(): void;\n tryBlurInput(): void;\n selectToInputText(): void;\n}\n\nexport class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateRangePickerComponent> implements IDateRangePickerAdapter {\n private _fromInputElement: HTMLInputElement;\n private _toInputElement: HTMLInputElement;\n private _toInputMask: DateInputMask | undefined;\n private _fromInputMask: DateInputMask | undefined;\n private _dropdownIdentifier: string;\n private _toValueChangeListener: (() => void) | undefined;\n\n constructor(component: DateRangePickerComponent) {\n super(component);\n this._dropdownIdentifier = `forge-date-range-picker-${this._identifier}`;\n }\n\n protected _initializeInput(): void {\n this._fromInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[0] as HTMLInputElement;\n this._toInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[1] as HTMLInputElement;\n\n if (!this._fromInputElement || !this._fromInputElement) {\n throw new Error(`The ${DATE_RANGE_PICKER_CONSTANTS.elementName} requires two inputs`);\n }\n }\n\n protected _initializeCalendarDropdown(): void {\n const targetElement = this._getDefaultTargetElement();\n this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);\n }\n\n public initializeMask(fromOptions: IDateInputMaskOptions): void {\n if (this._fromInputMask) {\n this._fromInputMask.destroy();\n }\n this._fromInputMask = new DateInputMask(this._fromInputElement, fromOptions);\n }\n\n public initializeToMask(toOptions: IDateInputMaskOptions): void {\n if (this._toInputMask) {\n this._toInputMask.destroy();\n }\n this._toInputMask = new DateInputMask(this._toInputElement, toOptions);\n }\n\n public destroy(): void {\n super.destroy();\n this._destroyToValueChangeListener();\n }\n\n public destroyMask(): void {\n if (this._fromInputMask) {\n this._fromInputMask.destroy();\n this._fromInputMask = undefined;\n }\n if (this._toInputMask) {\n this._toInputMask.destroy();\n this._toInputMask = undefined;\n }\n }\n\n private _destroyToValueChangeListener(): void {\n if (typeof this._toValueChangeListener === 'function') {\n this._toValueChangeListener();\n }\n }\n\n public initializeAccessibility(): void {\n this._applyToInputs(input => input.setAttribute('autocomplete', 'off'));\n this._applyToInputs(input => input.setAttribute('autocorrect', 'off'));\n this._applyToInputs(input => input.setAttribute('autocapitalize', 'off'));\n this._applyToInputs(input => input.setAttribute('spellcheck', 'false'));\n this._applyToInputs(input => input.setAttribute('role', 'combobox'));\n this._applyToInputs(input => input.setAttribute('aria-live', 'assertive'));\n this._applyToInputs(input => input.setAttribute('aria-atomic', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-haspopup', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-expanded', 'false'));\n this._applyToInputs(input => input.setAttribute('aria-owns', this._dropdownIdentifier));\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._fromInputElement?.addEventListener(type, listener, { capture });\n }\n\n public addToInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._toInputElement?.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void): void {\n this._fromInputElement?.removeEventListener(type, listener);\n }\n \n public removeToInputListener(type: string, listener: (event: Event) => void): void {\n this._toInputElement?.removeEventListener(type, listener);\n }\n\n public setInputValueChangedListener(context: any, listener: (value: any) => void): void {\n if (this._valueChangeListeners.length) {\n this.destroyValueChangeListener();\n }\n const destroyListenerCb = listenOwnProperty(context, this._fromInputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListenerCb);\n }\n\n public setToInputValueChangedListener(context: any, listener: (value: any) => void): void {\n this._destroyToValueChangeListener();\n this._toValueChangeListener = listenOwnProperty(context, this._toInputElement, 'value', listener);\n }\n\n public hasInputElement(): boolean {\n return !!this._fromInputElement && !!this._toInputElement;\n }\n\n public override attachCalendar(calendarConfig: IDatePickerCalendarDropdownConfig<Date | null>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n super.attachCalendar(calendarConfig, dropdownConfig);\n this._fromInputElement.setAttribute('aria-expanded', 'true');\n }\n\n public override detachCalendar(): void {\n super.detachCalendar();\n if (this._fromInputElement) {\n this._fromInputElement.setAttribute('aria-expanded', 'false');\n this._fromInputElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public setActiveDescendant(id: string): void {\n this._fromInputElement.setAttribute('aria-activedescendant', id);\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._fromInputElement.value === value) {\n return;\n }\n\n this._fromInputElement.value = value;\n \n if (this._fromInputMask) {\n this._fromInputMask.updateMask();\n }\n\n if (emitEvents) {\n this._fromInputElement.dispatchEvent(new Event('change'));\n this._fromInputElement.dispatchEvent(new Event('input'));;\n }\n }\n\n public setToInputValue(value: string, emitEvents: boolean): void {\n if (this._toInputElement.value === value) {\n return;\n }\n\n this._toInputElement.value = value;\n \n if (this._toInputMask) {\n this._toInputMask.updateMask();\n }\n \n if (emitEvents) {\n this._toInputElement.dispatchEvent(new Event('change'));\n this._toInputElement.dispatchEvent(new Event('input'));\n }\n }\n\n public isInputDisabled(): boolean {\n return this._fromInputElement.disabled;\n }\n\n public isInputFocused(): boolean {\n return this._toInputElement === getActiveElement() || this._fromInputElement === getActiveElement();\n }\n\n public getInputValue(): string {\n return this._fromInputElement.value;\n }\n\n public getToInputValue(): string {\n return this._toInputElement.value;\n }\n\n public setDisabled(isDisabled: boolean): void {\n this._fromInputElement.disabled = isDisabled;\n this._toInputElement.disabled = isDisabled;\n\n this._toInputElement.setAttribute('aria-disabled', isDisabled.toString());\n this._fromInputElement.setAttribute('aria-disabled', isDisabled.toString());\n\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', isDisabled.toString());\n if (this._toggleElement.hasOwnProperty('disabled')) {\n (this._toggleElement as HTMLButtonElement).disabled = isDisabled;\n }\n }\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._fromInputElement, type, data);\n }\n\n public emitToInputEvent(type: string, data?: any): void {\n emitEvent(this._toInputElement, type, data);\n }\n\n protected override _createToggleElement(): HTMLElement {\n return createToggleElement('date_range');\n }\n\n public tryFocusInput(): void {\n this._fromInputElement.focus();\n }\n\n public tryBlurInput(): void {\n this._fromInputElement.blur();\n }\n\n public selectInputText(): void {\n this._fromInputElement.select();\n }\n\n public selectToInputText(): void {\n this._toInputElement.select();\n }\n\n private _applyToInputs(action: (input: HTMLInputElement) => void): void {\n [this._fromInputElement, this._toInputElement].forEach(action);\n }\n}\n", "import { isDate, isValidDate, Platform } from '@tylertech/forge-core';\nimport { CalendarMode, DateRange, ICalendarDateSelectEventData } from '../calendar';\nimport { isSameDate } from '../core/utils/date-utils';\nimport { IDateInputMaskOptions } from '../core/mask/date-input-mask';\nimport { BaseDatePickerFoundation, IBaseDatePickerFoundation } from '../date-picker/base/base-date-picker-foundation';\nimport { IDateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DatePickerRange, DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport interface IDateRangePickerFoundation extends IBaseDatePickerFoundation<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\nexport class DateRangePickerFoundation extends BaseDatePickerFoundation<IDateRangePickerAdapter, IDatePickerRange> implements IDateRangePickerFoundation {\n protected _mode: CalendarMode = 'range';\n private _from?: Date | null = null;\n private _to?: Date | null = null;\n private _toInputListener: (evt: Event) => void;\n private _toInputKeydownListener: (evt: KeyboardEvent) => void;\n private _toInputFocusListener: (evt: Event) => void;\n private _toInputBlurListener: (evt: Event) => void;\n private _toInputValueChangedListener: (value: string) => void;\n\n constructor(adapter: IDateRangePickerAdapter) {\n super(adapter);\n this._toInputListener = evt => this._onToInput(evt);\n this._toInputValueChangedListener = value => this._onToInputValueChanged(value);\n this._toInputKeydownListener = evt => this._onInputKeydown(evt);\n this._toInputFocusListener = evt => this._onToInputFocus(evt);\n this._toInputBlurListener = evt => this._onToInputBlur(evt);\n }\n\n protected _initializeState(): void {\n if (!this._from) {\n this._from = this._coerceDateValue(this._adapter.getInputValue());\n }\n if (!this._to) {\n this._to = this._coerceDateValue(this._adapter.getToInputValue());\n }\n }\n\n protected override _initializeListeners(): void {\n super._initializeListeners();\n this._adapter.addToInputListener('keydown', this._toInputKeydownListener);\n this._adapter.addToInputListener('focus', this._toInputFocusListener);\n this._adapter.addToInputListener('blur', this._toInputBlurListener);\n }\n\n protected override _initializeValueChangedListeners(): void {\n super._initializeValueChangedListeners();\n this._adapter.setToInputValueChangedListener(this, this._toInputValueChangedListener);\n }\n\n protected override _setInputChangeListeners(): void {\n super._setInputChangeListeners();\n this._adapter.addToInputListener('input', this._toInputListener);\n }\n\n protected override _removeInputChangeListeners(): void {\n super._removeInputChangeListeners();\n this._adapter.removeToInputListener('input', this._toInputListener);\n }\n\n protected override _openCalendar(emitOpenEvent?: boolean): void {\n this._formatToInputValue();\n super._openCalendar(emitOpenEvent);\n\n const currentValue = this._getCurrentValue();\n if (!!currentValue?.to) {\n this._adapter.goToCalendarDate(new Date(currentValue.to));\n } else if (!!currentValue?.from) {\n this._adapter.goToCalendarDate(new Date(currentValue.from));\n }\n }\n\n protected _emitChangeEvent(value: DateRange | null | undefined, force?: boolean): boolean {\n const typedStartValue = this._getTypedValue((value && value.from) || null);\n const typedEndValue = this._getTypedValue((value && value.to) || null);\n const detail: IDateRangePickerChangeEventData = new DatePickerRange({ from: typedStartValue, to: typedEndValue });\n const wasCancelled = !this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, detail, true, !force);\n if (!wasCancelled) {\n this._setValue(this._coerceDateValue((value && value.from) || null));\n this._setToValue(this._coerceDateValue((value && value.to) || null));\n return true;\n }\n return false;\n }\n\n protected _emitOpenEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n protected _emitCloseEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CLOSE, undefined, false);\n }\n \n protected _onToday(): void {\n const today = new Date();\n const range = this._open ? new DateRange({ from: this._from || today, to: today }) : new DateRange({ from: today });\n this.value = range;\n this._onDateSelected({ date: today, range, selected: true, type: 'date' });\n this._adapter.setCalendarActiveDate(today);\n }\n\n protected _onClear(): void {\n this._onDateSelected({ date: null, range: new DateRange(), selected: false, type: 'date' });\n this._closeCalendar(true);\n }\n\n protected _getCurrentValue(): IDatePickerRange | null | undefined {\n return this._value;\n }\n\n private _formatToInputValue(): void {\n const inputValue = this._adapter.getToInputValue();\n if (inputValue) {\n const parsedDate = this._parseDateString(inputValue);\n if (isValidDate(parsedDate) && this._isDateValueAcceptable(parsedDate)) {\n const formattedDate = this._formatDate(parsedDate);\n if (formattedDate) {\n this._adapter.setToInputValue(formattedDate, this._notifyInputValueChanges);\n }\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setToInputValue('', this._notifyInputValueChanges);\n }\n }\n }\n }\n\n protected _setFormattedInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._from);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n private _setFormattedToInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._to);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setToInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n protected _setValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._from = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.from = this._from;\n }\n }\n }\n\n private _setToValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._to = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.to = this._to;\n }\n }\n }\n\n protected _onDateSelected(event: ICalendarDateSelectEventData): void {\n const value = event.range;\n\n if (event.rangeSelectionState === 'to') {\n this._closeCalendar(true);\n }\n\n if (!this._emitChangeEvent(value ?? null)) {\n return;\n }\n\n const formattedFromValue = this._formatDate((value && value.from) || null);\n const formattedToValue = this._formatDate((value && value.to) || null);\n this._adapter.setInputValue(formattedFromValue, this._notifyInputValueChanges);\n this._adapter.setToInputValue(formattedToValue, this._notifyInputValueChanges);\n this._formatInputValue();\n this._formatToInputValue();\n\n this._from = (value && value.from) || null;\n this._to = (value && value.to) || null;\n\n if (!Platform.isMobile) {\n if (formattedToValue) {\n this._adapter.selectToInputText();\n } else {\n this._adapter.selectInputText();\n }\n }\n }\n\n protected override _applyMin(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMin();\n }\n\n protected override _applyMax(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMax();\n }\n\n protected override _initializeMask(): void {\n super._initializeMask();\n\n // We also need to initialize our mask for the \"to\" input\n if (this._masked) {\n const options: IDateInputMaskOptions = {\n showMaskFormat: this._showMaskFormat,\n pattern: this._maskFormat,\n onChange: (value: string) => this._handleToInput(value)\n };\n\n if (this._prepareMaskCallback) {\n options.prepareCallback = (value, masked, flags, maskInstance) => {\n return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);\n };\n }\n\n this._adapter.initializeToMask(options);\n }\n }\n\n protected _applyDisabledDates(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n }\n\n protected _applyDisabledDaysOfWeek(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(null, true);\n this._setFormattedToInputValue();\n }\n }\n\n private _onToInput(evt: Event): void {\n this._handleInput(this._adapter.getInputValue());\n }\n\n protected _handleInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._from) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _handleToInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitToInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._to) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n private _onToInputFocus(evt: Event): void {\n this._adapter.selectToInputText();\n }\n\n private _onToInputBlur(evt: Event): void {\n this._formatToInputValue();\n if (this._open) {\n this._closeCalendar(true);\n }\n }\n\n protected _onInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._from)) {\n this.from = date;\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _onToInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._to)) {\n this.to = date;\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n public get value(): IDatePickerRange {\n return { from: this.from, to: this.to };\n }\n public set value(value: IDatePickerRange) {\n if (!value) {\n return;\n }\n\n if (value.from === undefined) {\n value.from = null;\n }\n\n if (value.to === undefined) {\n value.to = null;\n }\n\n this.from = value.from;\n this.to = value.to;\n\n this._value = { from: this.from, to: this.to };\n }\n\n public get from(): Date | string | null | undefined {\n const date = this._getTypedValue(this._from);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set from(value: Date | string | null | undefined) {\n if (this._from !== value) {\n this._setValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ from: this._coerceDateValue(value) || undefined, to: this._coerceDateValue(this._to) || undefined }));\n }\n }\n }\n }\n\n public get to(): Date | string | null | undefined {\n const date = this._getTypedValue(this._to);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set to(value: Date | string | null | undefined) {\n if (this._to !== value) {\n this._setToValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedToInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ to: this._coerceDateValue(value) || undefined, from: this._coerceDateValue(this._from) || undefined }));\n }\n }\n }\n }\n}\n", "import { attachShadowTemplate, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconDateRange } from '@tylertech/tyler-icons/standard';\nimport { CalendarComponent } from '../calendar';\nimport { BaseDatePickerComponent, IBaseDatePickerComponent } from '../date-picker/base/base-date-picker';\nimport { BASE_DATE_PICKER_CONSTANTS } from '../date-picker/base/base-date-picker-constants';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopupComponent } from '../popup';\nimport { DateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\nimport { DateRangePickerFoundation } from './date-range-picker-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IDateRangePickerComponent extends IBaseDatePickerComponent<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-date-range-picker': IDateRangePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-date-range-picker-change': CustomEvent<IDateRangePickerChangeEventData>;\n 'forge-date-range-picker-open': CustomEvent<void>;\n 'forge-date-range-picker-close': CustomEvent<void>;\n 'forge-date-range-picker-input': CustomEvent<string>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-date-range-picker>` element.\n * \n * @tag forge-date-range-picker\n */\n@CustomElement({\n name: DATE_RANGE_PICKER_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n CalendarComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class DateRangePickerComponent extends BaseDatePickerComponent<IDatePickerRange, IDatePickerRange, DateRangePickerFoundation> implements IDateRangePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_DATE_PICKER_CONSTANTS.observedAttributes),\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM,\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define(tylIconDateRange);\n attachShadowTemplate(this, template, styles);\n this._foundation = new DateRangePickerFoundation(new DateRangePickerAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM:\n this.from = newValue;\n return;\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO:\n this.to = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the \"from\" date range value. */\n @FoundationProperty()\n public from: Date | string | null | undefined;\n\n /** Gets/sets the \"to\" date range value. */\n @FoundationProperty()\n public to: Date | string | null | undefined;\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions, IBaseComponentDelegateConfig } from '../core/delegates';\nimport { FieldDensityType } from '../field/field-constants';\nimport { ITextFieldComponent, TEXT_FIELD_CONSTANTS } from '../text-field';\nimport { IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport type DateRangePickerComponentDelegateProps = Partial<IDateRangePickerComponent>;\nexport interface IDateRangePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n fromPlaceholder?: string;\n toPlaceholder?: string;\n label?: string;\n required?: boolean;\n density?: FieldDensityType;\n}\nexport interface IDateRangePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {}\n\nexport class DateRangeComponentDelegate extends FormFieldComponentDelegate<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {\n private _textField: ITextFieldComponent;\n private _fromInput: HTMLInputElement;\n private _toInput: HTMLInputElement;\n\n constructor(config?: IDateRangePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IDateRangePickerComponent {\n const dateRangePicker = document.createElement(DATE_RANGE_PICKER_CONSTANTS.elementName) as IDateRangePickerComponent;\n this._attachTextField(dateRangePicker);\n return dateRangePicker;\n }\n\n public get fromInput(): HTMLInputElement {\n return this._textField.querySelector(`input[${TEXT_FIELD_CONSTANTS.attributes.MULTI_INPUT}-0]`) as HTMLInputElement;\n }\n\n public get toInput(): HTMLInputElement {\n return this._textField.querySelector(`input[${TEXT_FIELD_CONSTANTS.attributes.MULTI_INPUT}-1]`) as HTMLInputElement;\n }\n\n public get textField(): ITextFieldComponent {\n return this._textField;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textField.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textField.invalid = value;\n }\n\n public onChange(listener: (value: IDateRangePickerChangeEventData) => void): void {\n this._element.addEventListener(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, (evt: CustomEvent<IDateRangePickerChangeEventData>) => listener(evt.detail));\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusin', (evt: FocusEvent) => {\n const isFocusWithin = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusWithin) {\n listener(evt);\n }\n });\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusout', (evt: FocusEvent) => {\n const isFocusOutside = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusOutside) {\n listener(evt);\n }\n });\n }\n\n private _attachTextField(dateRangePicker: IDateRangePickerComponent): void {\n this._textField = document.createElement(TEXT_FIELD_CONSTANTS.elementName);\n\n if (this._config.options?.required) {\n this._textField.required = true;\n }\n if (this._config.options?.density) {\n this._textField.density = this._config.options.density;\n }\n\n this._fromInput = document.createElement('input');\n this._fromInput.type = 'text';\n this._fromInput.placeholder = this._config.options?.fromPlaceholder || 'From';\n this._textField.appendChild(this._fromInput);\n\n this._toInput = document.createElement('input');\n this._toInput.type = 'text';\n this._toInput.placeholder = this._config.options?.toPlaceholder || 'To';\n this._textField.appendChild(this._toInput);\n\n const label = document.createElement('label');\n label.textContent = this._config.options?.label || 'Choose date range';\n this._textField.appendChild(label);\n\n dateRangePicker.appendChild(this._textField);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { DateRangePickerComponent } from './date-range-picker';\n\nexport * from './date-range-picker';\nexport * from './date-range-picker-adapter';\nexport * from './date-range-picker-constants';\nexport * from './date-range-picker-foundation';\nexport * from './date-range-picker-component-delegate';\n\nexport function defineDateRangePickerComponent(): void {\n defineCustomElement(DateRangePickerComponent);\n}\n"],
|
|
5
|
+
"mappings": "+1BAEA,GAAM,GAA2C,GAAG,qBAEvC,EAAN,KAAkD,CAGvD,YAAY,EAA0B,CACpC,AAAI,GACF,MAAK,KAAO,EAAM,KAClB,KAAK,GAAK,EAAM,GAEpB,CAEA,AAAO,MAAwB,CAC7B,MAAO,IAAI,GAAgB,IAAI,C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