@tylertech/forge 2.13.0-next.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/custom-elements.json +117 -108
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- 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.32SMESZX.js → chunk.4RNKUXN3.js} +2 -2
- package/dist/esm/chunks/{chunk.32SMESZX.js.map → chunk.4RNKUXN3.js.map} +0 -0
- 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.WUIIZZQD.js → chunk.6VYFW76H.js} +2 -2
- package/dist/esm/chunks/{chunk.WUIIZZQD.js.map → chunk.6VYFW76H.js.map} +0 -0
- package/dist/esm/chunks/{chunk.D3DLVPPE.js → chunk.73G2CH2D.js} +2 -2
- package/dist/esm/chunks/{chunk.D3DLVPPE.js.map → chunk.73G2CH2D.js.map} +0 -0
- package/dist/esm/chunks/chunk.75LTLEZ7.js +7 -0
- package/dist/esm/chunks/chunk.75LTLEZ7.js.map +7 -0
- package/dist/esm/chunks/{chunk.G5Q2CUUE.js → chunk.AVIF5W7A.js} +2 -2
- package/dist/esm/chunks/{chunk.G5Q2CUUE.js.map → chunk.AVIF5W7A.js.map} +0 -0
- package/dist/esm/chunks/{chunk.KGW63HJX.js → chunk.CNL6EUCO.js} +2 -2
- package/dist/esm/chunks/{chunk.KGW63HJX.js.map → chunk.CNL6EUCO.js.map} +0 -0
- package/dist/esm/chunks/{chunk.K32ME33N.js → chunk.D3LMXSX6.js} +2 -2
- package/dist/esm/chunks/{chunk.K32ME33N.js.map → chunk.D3LMXSX6.js.map} +0 -0
- package/dist/esm/chunks/{chunk.E4ZTNVXI.js → chunk.DPCNIOLL.js} +2 -2
- package/dist/esm/chunks/{chunk.E4ZTNVXI.js.map → chunk.DPCNIOLL.js.map} +0 -0
- package/dist/esm/chunks/chunk.EJ4ASQET.js +7 -0
- package/dist/esm/chunks/chunk.EJ4ASQET.js.map +7 -0
- package/dist/esm/chunks/{chunk.F3W3XMGT.js → chunk.ELS7SQAV.js} +2 -2
- package/dist/esm/chunks/{chunk.F3W3XMGT.js.map → chunk.ELS7SQAV.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.KLK2FBDP.js +7 -0
- package/dist/esm/chunks/chunk.KLK2FBDP.js.map +7 -0
- package/dist/esm/chunks/{chunk.NTFA7FCB.js → chunk.LV7GGIUI.js} +2 -2
- package/dist/esm/chunks/{chunk.NTFA7FCB.js.map → chunk.LV7GGIUI.js.map} +0 -0
- package/dist/esm/chunks/{chunk.VH3PVW2V.js → chunk.NLZKJ53B.js} +2 -2
- package/dist/esm/chunks/{chunk.VH3PVW2V.js.map → chunk.NLZKJ53B.js.map} +0 -0
- package/dist/esm/chunks/chunk.NNGE722W.js +7 -0
- package/dist/esm/chunks/chunk.NNGE722W.js.map +7 -0
- package/dist/esm/chunks/{chunk.2ZSAAJDN.js → chunk.O4Y6QT46.js} +2 -2
- package/dist/esm/chunks/{chunk.2ZSAAJDN.js.map → chunk.O4Y6QT46.js.map} +0 -0
- package/dist/esm/chunks/chunk.QOZLQPKE.js +7 -0
- package/dist/esm/chunks/chunk.QOZLQPKE.js.map +7 -0
- package/dist/esm/chunks/{chunk.SZL74RTY.js → chunk.VWSC3NDJ.js} +2 -2
- package/dist/esm/chunks/{chunk.SZL74RTY.js.map → chunk.VWSC3NDJ.js.map} +0 -0
- package/dist/esm/chunks/chunk.WQE6OCJR.js +7 -0
- package/dist/esm/chunks/chunk.WQE6OCJR.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/chunks/chunk.ZMH4OL2E.js +7 -0
- package/dist/esm/chunks/{chunk.CYJBOJMX.js.map → chunk.ZMH4OL2E.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/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/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.d.ts +1 -0
- package/esm/date-range-picker/date-range-picker-foundation.js +13 -1
- package/esm/dialog/dialog-adapter.d.ts +5 -5
- package/esm/dialog/dialog-adapter.js +31 -30
- package/esm/dialog/dialog-foundation.d.ts +2 -4
- package/esm/dialog/dialog-foundation.js +38 -55
- package/esm/dialog/dialog.d.ts +0 -4
- package/esm/dialog/dialog.js +1 -7
- package/esm/file-picker/file-picker.js +1 -1
- package/esm/list/list-item/list-item-adapter.d.ts +10 -2
- package/esm/list/list-item/list-item-adapter.js +14 -4
- package/esm/list/list-item/list-item-foundation.js +17 -4
- package/esm/list/list-item/list-item.d.ts +1 -1
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/select/core/base-select-adapter.js +11 -1
- package/esm/select/core/base-select-foundation.js +7 -3
- package/esm/select/option/option-constants.d.ts +3 -0
- package/esm/select/option/option-constants.js +5 -1
- package/esm/select/option/option-foundation.d.ts +2 -2
- package/esm/select/option/option-foundation.js +1 -0
- 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.7JTKKFL4.js +0 -7
- package/dist/esm/chunks/chunk.7JTKKFL4.js.map +0 -7
- package/dist/esm/chunks/chunk.CYJBOJMX.js +0 -7
- package/dist/esm/chunks/chunk.IGMTMR3D.js +0 -7
- package/dist/esm/chunks/chunk.IGMTMR3D.js.map +0 -7
- package/dist/esm/chunks/chunk.TCCPCDJK.js +0 -7
- package/dist/esm/chunks/chunk.TCCPCDJK.js.map +0 -7
- package/dist/esm/chunks/chunk.VQKRN5IQ.js +0 -7
- package/dist/esm/chunks/chunk.VQKRN5IQ.js.map +0 -7
- package/dist/esm/chunks/chunk.YK2PXI6D.js +0 -7
- package/dist/esm/chunks/chunk.YK2PXI6D.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as b}from"./chunk.A23NSEWA.js";import{a as r}from"./chunk.B3IJU6XJ.js";import{a as c,b as _}from"./chunk.BSZ2LBJX.js";import{a as d}from"./chunk.3E5QKMHL.js";import{a as g}from"./chunk.HN4PXH3D.js";import{k as p}from"./chunk.G76HB2FK.js";import{f as s}from"./chunk.MCIQXNKY.js";var o=class extends b{constructor(t){super(t)}};var u=`${_}option`,h={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",VALUE:"value"},i={elementName:u,attributes:h};var l=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(i.attributes.LABEL,!!this._label,this._label))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(i.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(a=>a&&!/\s+/.test(a)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(i.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(i.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(i.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}};var e=class extends d{constructor(){super();this._foundation=new l(new o(this))}static get observedAttributes(){return[i.attributes.VALUE,i.attributes.LABEL,i.attributes.DISABLED,i.attributes.DIVIDER,i.attributes.OPTION_CLASS,i.attributes.LEADING_ICON,i.attributes.LEADING_ICON_CLASS,i.attributes.LEADING_ICON_TYPE,i.attributes.TRAILING_ICON,i.attributes.TRAILING_ICON_CLASS,i.attributes.TRAILING_ICON_TYPE]}initializedCallback(){this.hasAttribute("role")||this.setAttribute("role","option")}attributeChangedCallback(a,T,n){switch(a){case i.attributes.VALUE:this.value=n;break;case i.attributes.LABEL:this.label=n;break;case i.attributes.DISABLED:this.disabled=p(n);break;case i.attributes.DIVIDER:this.divider=this.hasAttribute(i.attributes.DIVIDER);break;case i.attributes.OPTION_CLASS:this.optionClass=n;break;case i.attributes.LEADING_ICON:this.leadingIcon=n;break;case i.attributes.LEADING_ICON_CLASS:this.leadingIconClass=n;break;case i.attributes.LEADING_ICON_TYPE:this.leadingIconType=n;break;case i.attributes.TRAILING_ICON:this.trailingIcon=n;break;case i.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=n;break;case i.attributes.TRAILING_ICON_TYPE:this.trailingIconType=n;break}}};s([r()],e.prototype,"value",2),s([r()],e.prototype,"label",2),s([r()],e.prototype,"disabled",2),s([r()],e.prototype,"divider",2),s([r()],e.prototype,"optionClass",2),s([r()],e.prototype,"leadingIcon",2),s([r()],e.prototype,"leadingIconClass",2),s([r()],e.prototype,"leadingIconType",2),s([r()],e.prototype,"trailingIcon",2),s([r()],e.prototype,"trailingIconClass",2),s([r()],e.prototype,"trailingIconType",2),s([r()],e.prototype,"leadingBuilder",2),s([r()],e.prototype,"trailingBuilder",2),e=s([c({name:i.elementName})],e);function P(){g(e)}export{o as a,i as b,l as c,e as d,P as e};
|
|
7
|
-
//# sourceMappingURL=chunk.IGMTMR3D.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/select/option/option-adapter.ts", "../../src/select/option/option-constants.ts", "../../src/select/option/option-foundation.ts", "../../src/select/option/option.ts", "../../src/select/option/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IOptionComponent } from './option';\n\nexport interface IOptionAdapter extends IBaseAdapter {\n setHostAttribute(name: string, value: string): void;\n removeHostAttribute(name: string): void;\n}\n\n/**\n * The DOM adapter behind the `<forge-option>` element.\n */\nexport class OptionAdapter extends BaseAdapter<IOptionComponent> {\n constructor(component: IOptionComponent) {\n super(component);\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}option`;\n\nconst attributes = {\n DISABLED: 'disabled',\n DIVIDER: 'divider',\n LABEL: 'label',\n LEADING_ICON_CLASS: 'leading-icon-class',\n LEADING_ICON_TYPE: 'leading-icon-type',\n LEADING_ICON: 'leading-icon',\n OPTION_CLASS: 'option-class',\n TRAILING_ICON_CLASS: 'trailing-icon-class',\n TRAILING_ICON_TYPE: 'trailing-icon-type',\n TRAILING_ICON: 'trailing-icon',\n VALUE: 'value'\n};\n\nexport const OPTION_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IBaseListDropdownOption, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { IOptionAdapter } from './option-adapter';\nimport { OPTION_CONSTANTS } from './option-constants';\n\nexport interface IOptionFoundation extends ICustomElementFoundation, Required<IBaseListDropdownOption> {}\n\n/** The foundation class behind the `<forge-option>` element. */\nexport class OptionFoundation implements IOptionFoundation {\n private _value: any;\n private _label: string;\n private _disabled = false;\n private _divider = false;\n private _optionClass: string[] = [];\n private _leadingIcon: string;\n private _leadingIconClass: string;\n private _leadingIconType: ListDropdownIconType;\n private _trailingIcon: string;\n private _trailingIconClass: string;\n private _trailingIconType: ListDropdownIconType;\n private _leadingBuilder: () => HTMLElement;\n private _trailingBuilder: () => HTMLElement;\n\n constructor(private _adapter: IOptionAdapter) {}\n\n /** Gets/sets the value of this option. */\n public get value(): string {\n return this._value;\n }\n public set value(value: string) {\n if (this._value !== value) {\n this._value = value;\n }\n }\n\n /** Gets/sets the label of this option. */\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._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LABEL, !!this._label, this._label);\n }\n }\n\n /** Gets/sets the disabled status of this option. */\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.toggleHostAttribute(OPTION_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n\n /** Gets/sets the whether this option is a divider. */\n public get divider(): boolean {\n return this._divider;\n }\n public set divider(value: boolean) {\n if (this._divider !== value) {\n this._divider = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.DIVIDER, this._divider);\n }\n }\n\n /** Gets/sets the classes of this option. */\n public get optionClass(): string | string[] {\n return this._optionClass;\n }\n public set optionClass(value: string | string[]) {\n if (!value) {\n value = [];\n } else if (typeof value === 'string') {\n value = value.split(' ');\n }\n\n value = value.filter(v => v && !/\\s+/.test(v));\n\n if (this._optionClass.toString() !== value.toString()) {\n this._optionClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS, this._optionClass && !!this._optionClass.length, this._optionClass.join(' '));\n }\n }\n\n /** Gets/sets the leading icon of this option. */\n public get leadingIcon(): string {\n return this._leadingIcon;\n }\n public set leadingIcon(value: string) {\n if (this._leadingIcon !== value) {\n this._leadingIcon = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON, !!this._leadingIcon, this._leadingIcon);\n }\n }\n\n /** Gets/sets the leading icon class of this option. */\n public get leadingIconClass(): string {\n return this._leadingIconClass;\n }\n public set leadingIconClass(value: string) {\n if (this._leadingIconClass !== value) {\n this._leadingIconClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS, !!this._leadingIconClass, this._leadingIconClass);\n }\n }\n\n /** Gets/sets the leading icon type of this option. */\n public get leadingIconType(): ListDropdownIconType {\n return this._leadingIconType;\n }\n public set leadingIconType(value: ListDropdownIconType) {\n if (this._leadingIconType !== value) {\n this._leadingIconType = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE, !!this._leadingIconType, this._leadingIconType);\n }\n }\n\n /** Gets/sets the trailing icon of this option. */\n public get trailingIcon(): string {\n return this._trailingIcon;\n }\n public set trailingIcon(value: string) {\n if (this._trailingIcon !== value) {\n this._trailingIcon = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON, !!this._trailingIcon, this._trailingIcon);\n }\n }\n\n /** Gets/sets the trailing icon class of this option. */\n public get trailingIconClass(): string {\n return this._trailingIconClass;\n }\n public set trailingIconClass(value: string) {\n if (this._trailingIconClass !== value) {\n this._trailingIconClass = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS, !!this._trailingIconClass, this._trailingIconClass);\n }\n }\n\n /** Gets/sets the trailing icon type of this option. */\n public get trailingIconType(): ListDropdownIconType {\n return this._trailingIconType;\n }\n public set trailingIconType(value: ListDropdownIconType) {\n if (this._trailingIconType !== value) {\n this._trailingIconType = value;\n this._adapter.toggleHostAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE, !!this._trailingIconType, this._trailingIconType);\n }\n }\n\n /** Gets/sets the leading builder of this option. */\n public get leadingBuilder(): (() => HTMLElement) {\n return this._leadingBuilder;\n }\n public set leadingBuilder(value: (() => HTMLElement)) {\n if (this._leadingBuilder !== value) {\n this._leadingBuilder = value;\n }\n }\n\n /** Gets/sets the trailing builder of this option. */\n public get trailingBuilder(): (() => HTMLElement) {\n return this._trailingBuilder;\n }\n public set trailingBuilder(value: (() => HTMLElement)) {\n if (this._trailingBuilder !== value) {\n this._trailingBuilder = value;\n }\n }\n}\n", "import { coerceBoolean, CustomElement, FoundationProperty, ICustomElement } from '@tylertech/forge-core';\nimport { BaseComponent } from '../../core/base/base-component';\nimport { IBaseListDropdownOption, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { OptionAdapter } from './option-adapter';\nimport { OPTION_CONSTANTS } from './option-constants';\nimport { OptionFoundation } from './option-foundation';\n\nexport interface IOptionComponent extends ICustomElement, Required<IBaseListDropdownOption> {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-option': IOptionComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-option>` element.\n * \n * @tag forge-option\n */\n@CustomElement({\n name: OPTION_CONSTANTS.elementName\n})\nexport class OptionComponent extends BaseComponent implements IOptionComponent {\n public static get observedAttributes(): string[] {\n return [\n OPTION_CONSTANTS.attributes.VALUE,\n OPTION_CONSTANTS.attributes.LABEL,\n OPTION_CONSTANTS.attributes.DISABLED,\n OPTION_CONSTANTS.attributes.DIVIDER,\n OPTION_CONSTANTS.attributes.OPTION_CLASS,\n OPTION_CONSTANTS.attributes.LEADING_ICON,\n OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS,\n OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE,\n OPTION_CONSTANTS.attributes.TRAILING_ICON,\n OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS,\n OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE\n ];\n }\n\n private _foundation: OptionFoundation;\n\n constructor() {\n super();\n this._foundation = new OptionFoundation(new OptionAdapter(this));\n }\n\n public initializedCallback(): void {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'option');\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case OPTION_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LABEL:\n this.label = newValue;\n break;\n case OPTION_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case OPTION_CONSTANTS.attributes.DIVIDER:\n this.divider = this.hasAttribute(OPTION_CONSTANTS.attributes.DIVIDER);\n break;\n case OPTION_CONSTANTS.attributes.OPTION_CLASS:\n this.optionClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON:\n this.leadingIcon = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS:\n this.leadingIconClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE:\n this.leadingIconType = newValue as ListDropdownIconType;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON:\n this.trailingIcon = newValue;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS:\n this.trailingIconClass = newValue;\n break;\n case OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE:\n this.trailingIconType = newValue as ListDropdownIconType;\n break;\n }\n }\n\n /** Gets/sets the value of this option. */\n @FoundationProperty()\n public value: any;\n\n /** Gets/sets the label of this option. */\n @FoundationProperty()\n public label: string;\n\n /** Gets/sets the disabled status of this option. */\n @FoundationProperty()\n public disabled: boolean;\n\n /** Gets/sets the whether this option is a divider. */\n @FoundationProperty()\n public divider: boolean;\n\n /** Gets/sets the classes of this option. */\n @FoundationProperty()\n public optionClass: string | string[];\n\n /** Gets/sets the leading icon of this option. */\n @FoundationProperty()\n public leadingIcon: string;\n\n /** Gets/sets the leading icon class of this option. */\n @FoundationProperty()\n public leadingIconClass: string;\n\n /** Gets/sets the leading icon type of this option. */\n @FoundationProperty()\n public leadingIconType: ListDropdownIconType;\n\n /** Gets/sets the trailing icon of this option. */\n @FoundationProperty()\n public trailingIcon: string;\n\n /** Gets/sets the trailing icon class of this option. */\n @FoundationProperty()\n public trailingIconClass: string;\n\n /** Gets/sets the trailing icon type of this option. */\n @FoundationProperty()\n public trailingIconType: ListDropdownIconType;\n\n /** Gets/sets the leading builder of this option. */\n @FoundationProperty()\n public leadingBuilder: () => HTMLElement;\n\n /** Gets/sets the trailing builder of this option. */\n @FoundationProperty()\n public trailingBuilder: () => HTMLElement;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { OptionComponent } from './option';\n\nexport * from './option-adapter';\nexport * from './option-constants';\nexport * from './option-foundation';\nexport * from './option';\n\nexport function defineOptionComponent(): void {\n defineCustomElement(OptionComponent);\n}\n"],
|
|
5
|
-
"mappings": "+RAWO,GAAM,GAAN,aAA4B,EAA8B,CAC/D,YAAY,EAA6B,CACvC,MAAM,CAAS,CACjB,CACF,ECbA,GAAM,GAA2C,GAAG,UAE9C,EAAa,CACjB,SAAU,WACV,QAAS,UACT,MAAO,QACP,mBAAoB,qBACpB,kBAAmB,oBACnB,aAAc,eACd,aAAc,eACd,oBAAqB,sBACrB,mBAAoB,qBACpB,cAAe,gBACf,MAAO,OACT,EAEa,EAAmB,CAC9B,cACA,YACF,ECbO,GAAM,GAAN,KAAoD,CAezD,YAAoB,EAA0B,CAA1B,gBAZpB,KAAQ,UAAY,GACpB,KAAQ,SAAW,GACnB,KAAQ,aAAyB,CAAC,CAUa,CAG/C,GAAW,QAAgB,CACzB,MAAO,MAAK,MACd,CACA,GAAW,OAAM,EAAe,CAC9B,AAAI,KAAK,SAAW,GAClB,MAAK,OAAS,EAElB,CAGA,GAAW,QAAgB,CACzB,MAAO,MAAK,MACd,CACA,GAAW,OAAM,EAAe,CAC9B,AAAI,KAAK,SAAW,GAClB,MAAK,OAAS,EACd,KAAK,SAAS,oBAAoB,EAAiB,WAAW,MAAO,CAAC,CAAC,KAAK,OAAQ,KAAK,MAAM,EAEnG,CAGA,GAAW,WAAoB,CAC7B,MAAO,MAAK,SACd,CACA,GAAW,UAAS,EAAgB,CAClC,AAAI,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AIA,GADP,AAAC,EAAmB,GACb,AA1GI,EA0GJ,iCAIA,GADP,AAAC,EAAmB,GACb,AA9GI,EA8GJ,gCAIA,GADP,AAAC,EAAmB,GACb,AAlHI,EAkHJ,8BAIA,GADP,AAAC,EAAmB,GACb,AAtHI,EAsHJ,+BAtHI,EAAN,GAHP,AAAC,EAAc,CACb,KAAM,EAAiB,WACzB,CAAC,GACY,GCdN,YAAuC,CAC5C,EAAoB,CAAe,CACrC",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as D}from"./chunk.B5ABD4CZ.js";import{b as o}from"./chunk.IGMTMR3D.js";import{a as G}from"./chunk.F3W3XMGT.js";import{h as k,i as P}from"./chunk.KGW63HJX.js";import{a as V}from"./chunk.3UMBCR4P.js";import{x as C}from"./chunk.KYCC3C3M.js";import{a as B}from"./chunk.A23NSEWA.js";import{a}from"./chunk.B3IJU6XJ.js";import{i as L}from"./chunk.R4NDFXVA.js";import{a as T,b as c,j as S,k as y,n as x}from"./chunk.G76HB2FK.js";import{a as O,f as d}from"./chunk.MCIQXNKY.js";var M={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width"},U=O({},M),W={CHANGE:"change"},m={attributes:U,events:W};var N=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(N||{});function w(l,b){let e=l.some(i=>E(i)),t=l.some(i=>R(i));return e&&b===1||t&&b===0}function E(l){return c(l)&&S(l)&&l.hasOwnProperty("options")&&l.hasOwnProperty("text")}function R(l){return c(l)&&S(l)&&l.hasOwnProperty("label")&&l.hasOwnProperty("value")}var H=class extends P{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=t=>this._onFocus(t),this._blurListener=t=>this._onBlur(t),this._clickListener=t=>this._onClick(t),this._keydownListener=t=>this._onKeydown(t),this._optionsChangedListener=t=>this._onOptionsChanged(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=T()}_onFocus(e){}initialize(){this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.setMultiple(this._multiple),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}disconnect(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._open&&this._closeDropdown(),this._optionListenerDestructor&&this._optionListenerDestructor()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return w(this._options,1)?[].concat.apply([],this._options.map(e=>e.options)):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();c(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:t=>{let i=this._flatOptions,s=i.find(r=>r.value===t);if(s){let r=i.indexOf(s);this._onSelect(s,r,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,t,i=!0){return new Promise(async s=>{if(this._valueChanging)return Promise.resolve(!1);let r=e?e.value:"",u=e?e.label:"",v=[...this._selectedValues],f=[...this._selectedLabels],g=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(r)){let _=this._selectedValues.indexOf(r);this._selectedValues.splice(_,1),this._selectedLabels.splice(_,1),this._selectedIndexes.splice(_,1)}else this._selectedValues.push(r),this._selectedLabels.push(u),this._selectedIndexes.push(t);else c(r)?(this._selectedValues[0]=r,this._selectedLabels[0]=u,this._selectedIndexes[0]=t):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);let I=()=>{this._selectedValues=[...v],this._selectedLabels=[...f],this._selectedIndexes=[...g]},n=()=>{if(this._value=[...this._selectedValues],this._multiple){let _=this._selectedIndexes.includes(t);this._adapter.toggleOptionMultiple(t,_)}this._applySelection()},h=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&i&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,h));let _=await this._valueChanging;if(this._valueChanging=void 0,!_)return I(),this._tryUpdateDropdownPosition(),s(!1)}let A=!this._adapter.emitHostEvent(m.events.CHANGE,h,!0,!0);A?I():n(),this._tryUpdateDropdownPosition(),s(!A)})}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_tryUpdateDropdownPosition(){this._open&&this._adapter.queueDropdownPositionUpdate()}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let t of e){this._value.includes(t)||this._value.push(t);let i=this._flatOptions.find(s=>x(s.value,t));i&&(this._selectedValues.push(i.value),this._selectedLabels.push(i.label))}this._selectedIndexes=this._selectedValues.map(t=>this._flatOptions.findIndex(i=>i.value===t)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(t=>this._selectedValues.includes(t.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?`${this._selectedLabels.length} ${this._selectedLabels.length===1?"option":"options"} selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let t=e.key==="Escape"||e.keyCode===27,i=e.key==="Enter"||e.keyCode===13,s=e.key==="Space"||e.keyCode===32,r=e.key==="ArrowDown"||e.keyCode===40,u=e.key==="ArrowUp"||e.keyCode===38,v=e.keyCode>=48&&e.keyCode<=90,f=e.key==="Home"||e.keyCode===36,g=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!v&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),t&&(e.preventDefault(),this._open)){this._closeDropdown();return}if(s)e.preventDefault(),this._open?this._closeDropdown():this._openDropdown();else if(i)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(u||r){if(e.preventDefault(),this._multiple&&!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let n=0;this._open?(n=this._adapter.getActiveOptionIndex(),n===-1&&(n=this._getFirstSelectedOptionIndex())):n=this._getFirstSelectedOptionIndex(),u?n=this._getPreviousHighlightableOptionIndex(n,this._nonDividerOptions):n=this._getNextHighlightableOptionIndex(n,this._nonDividerOptions),this._open?this._adapter.highlightActiveOption(n):this._onSelect(this._nonDividerOptions[n],n)}else if(f)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(n=>!n.disabled)));else if(g){if(this._open){e.preventDefault();let n=this._nonDividerOptions;for(let h=n.length-1;h>=0;h--)if(!n[h].disabled){this._adapter.highlightActiveOption(h);break}}}else v&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,t){let i=e;return i<=0?i=t.length-1:i--,t[i].disabled?this._getPreviousHighlightableOptionIndex(i,t):i}_getNextHighlightableOptionIndex(e,t){let i=e;return i===t.length-1?i=0:i++,t[i].disabled?this._getNextHighlightableOptionIndex(i,t):i}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let t=this._flatOptions.find(i=>!i.disabled&&i.label.toLowerCase().startsWith(this._filterString));if(t){let i=this._flatOptions.indexOf(t);this._open?this._adapter.highlightActiveOption(i):this._multiple||this._onSelect(t,i,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._selectedValues]:this._selectedValues[0]}set value(e){let t;Array.isArray(e)?t=[...e]:t=e,this._applyValue(t)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let t;if(Array.isArray(e)?t=[...e]:t=[e],t.sort(),this.multiple)this.value=t.map(i=>this._flatOptions[i]).filter(i=>i).map(i=>i.value);else{let i=this._flatOptions[t[t.length-1]];if(!i)return;this.value=i.value}}get options(){return this._adapter.getOptions()}set options(e){let t;w(e,1)?t=e.map(i=>O({},i)):t=e.map(i=>O({},i)),this._options=t,this._adapter.setOptions(t),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(t)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown(),this._adapter.setMultiple(this._multiple))}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var p=class extends G{constructor(){super()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case m.attributes.MULTIPLE:this.multiple=y(i);break;case m.attributes.VALUE:this.value=i;break}}appendOptions(e){this._foundation.appendOptions(e)}selectAll(){this._foundation.selectAll()}deselectAll(){this._foundation.deselectAll()}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}};d([a()],p.prototype,"value",2),d([a()],p.prototype,"selectedIndex",2),d([a()],p.prototype,"options",2),d([a()],p.prototype,"multiple",2),d([a()],p.prototype,"open",2),d([a()],p.prototype,"optionBuilder",2),d([a()],p.prototype,"selectedTextBuilder",2),d([a()],p.prototype,"beforeValueChange",2),d([a({set:!1})],p.prototype,"popupElement",2);var F=class extends B{constructor(e){super(e)}get popupElement(){var e;return(e=this._listDropdown)==null?void 0:e.dropdownElement}getOptions(){let e=Array.from(this._component.querySelectorAll(D.elementName));if(e.length)return e.map(t=>{let i=Array.from(t.querySelectorAll(o.elementName)),s=this._createOptionsFromElements(i);return{text:t.label,options:s}});{let t=Array.from(this._component.querySelectorAll(o.elementName));return this._createOptionsFromElements(t)}}_createOptionsFromElements(e){return e.map(t=>{let i=t.hasAttribute(o.attributes.OPTION_CLASS)?t.getAttribute(o.attributes.OPTION_CLASS):t.optionClass;return typeof i=="string"&&(i=i.split(" ")),{label:t.hasAttribute(o.attributes.LABEL)?t.getAttribute(o.attributes.LABEL):c(t.label)?t.label:t.innerText,value:t.hasAttribute(o.attributes.VALUE)?t.getAttribute(o.attributes.VALUE):t.value,disabled:t.hasAttribute(o.attributes.DISABLED),divider:t.hasAttribute(o.attributes.DIVIDER),optionClass:i,leadingIcon:t.hasAttribute(o.attributes.LEADING_ICON)?t.getAttribute(o.attributes.LEADING_ICON):t.leadingIcon,leadingIconClass:t.hasAttribute(o.attributes.LEADING_ICON_CLASS)?t.getAttribute(o.attributes.LEADING_ICON_CLASS):t.leadingIconClass,leadingIconType:t.hasAttribute(o.attributes.LEADING_ICON_TYPE)?t.getAttribute(o.attributes.LEADING_ICON_TYPE):t.leadingIconType,trailingIcon:t.hasAttribute(o.attributes.TRAILING_ICON)?t.getAttribute(o.attributes.TRAILING_ICON):t.trailingIcon,trailingIconClass:t.hasAttribute(o.attributes.TRAILING_ICON_CLASS)?t.getAttribute(o.attributes.TRAILING_ICON_CLASS):t.trailingIconClass,trailingIconType:t.hasAttribute(o.attributes.TRAILING_ICON_TYPE)?t.getAttribute(o.attributes.TRAILING_ICON_TYPE):t.trailingIconType,leadingBuilder:t.leadingBuilder,trailingBuilder:t.trailingBuilder}})}open(e){this._listDropdown=new k(this._targetElement,e),this._listDropdown.open()}close(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(V.events.BLUR,e)}toggleOptionMultiple(e,t){var i;(i=this._listDropdown)==null||i.toggleOptionMultiple(e,t)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}highlightActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}patchSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}setOptionsListener(e){let t=new MutationObserver(()=>e(this.getOptions()));return t.observe(this._component,{childList:!0,subtree:!0}),()=>t.disconnect()}setOptions(e,t=!0){t&&this._clearOptions();for(let i of e)if(E(i)){let s=this._createOptionGroupElement(i);for(let r of i.options){let u=this._createOptionElement(r);s.appendChild(u)}this._component.appendChild(s)}else{let s=this._createOptionElement(i);this._component.appendChild(s)}}appendDropdownOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setDropdownOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}scrollSelectedOptionIntoView(){var e;(e=this._listDropdown)==null||e.scrollSelectedOptionIntoView()}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}queueDropdownPositionUpdate(){!this.popupElement||window.requestAnimationFrame(()=>{let e=this.popupElement;e==null||e.position()})}_clearOptions(){Array.from(this._component.querySelectorAll(D.elementName)).forEach(i=>L(i)),Array.from(this._component.querySelectorAll(o.elementName)).forEach(i=>L(i))}_createOptionGroupElement(e){var i;let t=document.createElement("forge-option-group");return C(e,t),t.label=(i=e.text)!=null?i:"",t}_createOptionElement(e){let t=document.createElement("forge-option");return C(e,t),t.textContent=e.label,t}};export{m as a,N as b,w as c,E as d,R as e,H as f,p as g,F as h};
|
|
7
|
-
//# sourceMappingURL=chunk.TCCPCDJK.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/select/core/base-select-constants.ts", "../../src/select/core/select-utils.ts", "../../src/select/core/base-select-foundation.ts", "../../src/select/core/base-select.ts", "../../src/select/core/base-select-adapter.ts"],
|
|
4
|
-
"sourcesContent": ["import { IListDropdownOption, IListDropdownOptionGroup } from '../../list-dropdown/list-dropdown-constants';\n\nexport type SelectOptionBuilder = (option: ISelectOption, parentElement: HTMLElement) => HTMLElement;\nexport type SelectSelectedTextBuilder = (selectedOptions: IListDropdownOption[]) => string;\nexport type SelectOptionListenerDestructor = () => void;\nexport type SelectBeforeValueChangeCallback<T> = (value: T | T[]) => boolean | Promise<boolean>;\n\nexport interface ISelectOption extends IListDropdownOption {}\nexport interface ISelectOptionGroup extends IListDropdownOptionGroup {}\n\nconst observedAttributes = {\n VALUE: 'value',\n MULTIPLE: 'multiple',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold',\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n SYNC_POPUP_WIDTH: 'sync-popup-width'\n};\n\nconst attributes = {\n ...observedAttributes\n};\n\nconst events = {\n CHANGE: 'change'\n};\n\nexport const BASE_SELECT_CONSTANTS = {\n attributes,\n events\n};\n", "import { isDefined, isObject } from '@tylertech/forge-core';\nimport { ISelectOption, ISelectOptionGroup } from './base-select-constants';\n\nexport enum SelectOptionType { Option, Group }\n\n/**\n * Determines if the provided options are of the specified type.\n * @param options The options either grouped or individual.\n * @param type The type of option to detect.\n */\nexport function isSelectOptionType(options: ISelectOption[] | ISelectOptionGroup[], type: SelectOptionType): boolean {\n const isOptionGroups = options.some((o: ISelectOption | ISelectOptionGroup) => isOptionGroupObject(o));\n const isOptionTypes = options.some((o: ISelectOption | ISelectOptionGroup) => isOptionObject(o));\n return (isOptionGroups && type === SelectOptionType.Group) || (isOptionTypes && type === SelectOptionType.Option);\n}\n\nexport function isOptionGroupObject(o: ISelectOption | ISelectOptionGroup): o is ISelectOptionGroup {\n return isDefined(o) && isObject(o) && o.hasOwnProperty('options') && o.hasOwnProperty('text');\n}\n\nexport function isOptionObject(o: ISelectOption | ISelectOptionGroup): o is ISelectOption {\n return isDefined(o) && isObject(o) && o.hasOwnProperty('label') && o.hasOwnProperty('value');\n}\n", "import { isDefined, isDeepEqual, randomChars } from '@tylertech/forge-core';\nimport { OptionListenerDestructor } from '../select/select-adapter';\nimport { ISelectOption, ISelectOptionGroup, SelectSelectedTextBuilder, SelectOptionBuilder, BASE_SELECT_CONSTANTS, SelectBeforeValueChangeCallback } from './base-select-constants';\nimport { isSelectOptionType, SelectOptionType } from './select-utils';\nimport { IListDropdownConfig, ListDropdownHeaderBuilder, ListDropdownFooterBuilder } from '../../list-dropdown/list-dropdown-constants';\nimport { IBaseSelectAdapter } from './base-select-adapter';\nimport { IListDropdownAwareFoundation, ListDropdownAwareFoundation } from '../../list-dropdown/list-dropdown-aware-foundation';\n\nexport interface IBaseSelectFoundation extends IListDropdownAwareFoundation {\n value: any;\n selectedIndex: number | number[];\n options: ISelectOption[] | ISelectOptionGroup[];\n multiple: boolean;\n open: boolean;\n popupElement: HTMLElement | undefined;\n optionBuilder: SelectOptionBuilder;\n selectedTextBuilder: SelectSelectedTextBuilder;\n observeScroll: boolean;\n observeScrollThreshold: number;\n syncPopupWidth: boolean;\n beforeValueChange: SelectBeforeValueChangeCallback<any>;\n appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n selectAll(): void;\n deselectAll(): void;\n initialize(): void;\n initializeTarget(): void;\n disconnect(): void;\n}\n\nexport abstract class BaseSelectFoundation<T extends IBaseSelectAdapter> extends ListDropdownAwareFoundation implements IBaseSelectFoundation {\n protected _options: ISelectOption[] | ISelectOptionGroup[] = [];\n protected _value: any = [];\n protected _multiple = false;\n protected _open = false;\n protected _optionBuilder: SelectOptionBuilder;\n protected _selectedTextBuilder: SelectSelectedTextBuilder;\n protected _selectedValues: string[] = [];\n protected _selectedLabels: string[] = [];\n protected _selectedIndexes: number[] = [];\n protected _filterTimeout: number | undefined;\n protected _filterString = '';\n protected _identifier: string;\n protected _targetWidthCallback: () => number;\n protected _beforeValueChange: SelectBeforeValueChangeCallback<unknown>;\n private _focusListener: (evt: Event) => void;\n private _blurListener: (evt: FocusEvent) => void;\n private _clickListener: (evt: MouseEvent) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _optionsChangedListener: (options: ISelectOption[] | ISelectOptionGroup[]) => void;\n private _optionListenerDestructor: OptionListenerDestructor;\n private _activeChangeListener: (id: string) => void;\n private _dropdownScrollEndListener: () => void;\n private _valueChanging: Promise<boolean> | undefined;\n private _dismissListener: () => void;\n\n constructor(protected _adapter: T) {\n super();\n this._focusListener = evt => this._onFocus(evt);\n this._blurListener = evt => this._onBlur(evt);\n this._clickListener = evt => this._onClick(evt);\n this._keydownListener = evt => this._onKeydown(evt);\n this._optionsChangedListener = options => this._onOptionsChanged(options);\n this._activeChangeListener = id => this._onActiveOptionChanged(id);\n this._dropdownScrollEndListener = () => this._onDropdownScrollEnd();\n this._dismissListener = () => this._onDismiss();\n this._identifier = randomChars();\n }\n\n protected abstract _onDropdownScrollEnd(): void;\n protected _onFocus(evt: Event): void {}\n\n public initialize(): void {\n this._optionListenerDestructor = this._adapter.setOptionsListener(this._optionsChangedListener);\n this._initializeValue();\n }\n\n public initializeTarget(): void {\n this._adapter.initializeAccessibility();\n this._adapter.setMultiple(this._multiple);\n this._adapter.addClickListener(this._clickListener);\n this._adapter.addTargetListener('blur', this._blurListener);\n this._adapter.addTargetListener('focus', this._focusListener);\n this._adapter.addTargetListener('keydown', this._keydownListener);\n }\n\n public disconnect(): void {\n this._adapter.removeClickListener(this._clickListener);\n this._adapter.removeTargetListener('blur', this._blurListener);\n this._adapter.removeTargetListener('focus', this._focusListener);\n this._adapter.removeTargetListener('keydown', this._keydownListener);\n\n if (this._open) {\n this._closeDropdown();\n }\n\n if (this._optionListenerDestructor) {\n this._optionListenerDestructor();\n }\n }\n\n public appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._adapter.setOptions(options, false);\n if (this._open) {\n this._adapter.appendDropdownOptions(options);\n }\n }\n\n public selectAll(): void {\n if (this._multiple) {\n this.value = this._flatOptions.map(o => o.value);\n }\n }\n\n public deselectAll(): void {\n if (this._multiple) {\n this.value = [];\n }\n }\n\n protected get _flatOptions(): ISelectOption[] {\n if (isSelectOptionType(this._options, SelectOptionType.Group)) {\n return [].concat.apply([], (this._options as ISelectOptionGroup[]).map(g => g.options)) as ISelectOption[];\n }\n return this._options as ISelectOption[];\n }\n\n private get _nonDividerOptions(): ISelectOption[] {\n return this._flatOptions.filter(o => !o.divider);\n }\n\n protected _initializeValue(): void {\n const options = (this._options.length && this._options) || this._adapter.getOptions();\n if (isDefined(this._value) && options.length) {\n this._applyValue(this._value);\n }\n }\n\n protected _onClick(evt: MouseEvent): void {\n if (evt.button !== 0) {\n return;\n }\n if (!this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n\n protected _onBlur(evt: FocusEvent): void {\n // If the blur event was triggered by an element within the popup then ignore it\n if (this._adapter.isFocusWithinPopup(evt.relatedTarget as HTMLElement)) {\n return;\n }\n\n if (this._open) {\n this._closeDropdown();\n }\n }\n\n\n protected _openDropdown(): void {\n this._options = this._adapter.getOptions();\n\n if (!this._flatOptions.length) {\n return;\n }\n\n this._open = true;\n const config: IListDropdownConfig = {\n options: this._options,\n multiple: this._multiple,\n selectedValues: [...this._selectedValues],\n id: this._identifier,\n optionBuilder: this._optionBuilder,\n syncWidth: this._syncPopupWidth,\n observeScroll: this._observeScroll,\n observeScrollThreshold: this._observeScrollThreshold,\n scrollEndListener: this._dropdownScrollEndListener,\n activeChangeCallback: this._activeChangeListener,\n targetWidthCallback: this._targetWidthCallback,\n popupClasses: this._popupClasses,\n optionLimit: this._optionLimit,\n headerBuilder: this._popupHeaderBuilder,\n footerBuilder: this._popupFooterBuilder,\n closeCallback: () => this._closeDropdown(),\n selectCallback: (value: any) => {\n const flatOptions = this._flatOptions;\n const option = flatOptions.find(o => o.value === value);\n if (option) {\n const index = flatOptions.indexOf(option);\n this._onSelect(option, index, true);\n }\n }\n };\n this._adapter.open(config);\n this._adapter.setDismissListener(this._dismissListener);\n }\n\n /**\n * Closes the dropdown.\n */\n protected _closeDropdown(): void {\n this._open = false;\n this._adapter.close();\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 return new Promise(async resolve => {\n if (this._valueChanging) {\n return Promise.resolve(false);\n }\n\n const value = option ? option.value : '';\n const label = option ? option.label : '';\n\n // Store the current selections in case we need to rollback (if the event was cancelled)\n const prevSelectedValues = [...this._selectedValues];\n const prevSelectedLabels = [...this._selectedLabels];\n const prevSelectedIndexes = [...this._selectedIndexes];\n\n if (this._multiple) {\n if (this._selectedValues.includes(value)) {\n const index = this._selectedValues.indexOf(value);\n this._selectedValues.splice(index, 1);\n this._selectedLabels.splice(index, 1);\n this._selectedIndexes.splice(index, 1);\n } else {\n this._selectedValues.push(value);\n this._selectedLabels.push(label);\n this._selectedIndexes.push(optionIndex);\n }\n } else {\n if (isDefined(value)) {\n this._selectedValues[0] = value;\n this._selectedLabels[0] = label;\n this._selectedIndexes[0] = optionIndex;\n } else {\n this._selectedValues = [];\n this._selectedLabels = [];\n this._selectedIndexes = [];\n }\n }\n\n const rollbackValue = (): void => {\n this._selectedValues = [...prevSelectedValues];\n this._selectedLabels = [...prevSelectedLabels];\n this._selectedIndexes = [...prevSelectedIndexes];\n };\n\n const applyValue = (): void => {\n // Always keep the internal value in sync in case the component needs to reinitialize with the existing value later on\n this._value = [...this._selectedValues];\n\n // If we're in multiselect mode, we need to toggle the selected option\n if (this._multiple) {\n const isSelected = this._selectedIndexes.includes(optionIndex);\n this._adapter.toggleOptionMultiple(optionIndex, isSelected);\n }\n\n this._applySelection();\n };\n\n const data = this.multiple ? [...this._selectedValues] : this._selectedValues[0];\n\n // We close the dropdown immediately if in single selection mode\n if (this._open && closeDropdown && !this._multiple) {\n this._closeDropdown();\n }\n\n // First we check to see if there is an before change callback and execute that\n if (typeof this._beforeValueChange === 'function') {\n this._valueChanging = Promise.resolve(this._beforeValueChange.call(null, data));\n const shouldContinue = await this._valueChanging;\n this._valueChanging = undefined;\n if (!shouldContinue) {\n rollbackValue();\n this._tryUpdateDropdownPosition();\n return resolve(false);\n }\n }\n\n // Now we can emit the change event AFTER the before change callback has been executed and returned true\n const cancelled = !this._adapter.emitHostEvent(BASE_SELECT_CONSTANTS.events.CHANGE, data, true, true);\n if (!cancelled) {\n applyValue();\n } else {\n rollbackValue();\n }\n\n this._tryUpdateDropdownPosition();\n resolve(!cancelled);\n });\n }\n\n private _selectActiveOption(): void {\n const activeOptionIndex = this._adapter.getActiveOptionIndex();\n if (activeOptionIndex >= 0 && this._nonDividerOptions[activeOptionIndex]) {\n this._onSelect(this._nonDividerOptions[activeOptionIndex], activeOptionIndex);\n }\n }\n\n protected _tryUpdateDropdownPosition(): void {\n if (this._open) {\n this._adapter.queueDropdownPositionUpdate();\n }\n }\n\n protected _reset(): void {\n this._selectedValues = [];\n this._selectedLabels = [];\n this._selectedIndexes = [];\n }\n\n protected _applyValue(value: string | string[]): void {\n this._selectedValues = [];\n this._selectedLabels = [];\n\n this._options = this._adapter.getOptions();\n\n if (!Array.isArray(value)) {\n value = [value];\n }\n\n this._value = [];\n\n // Ensure that the values passed are actually existing options\n for (const val of value) {\n if (!this._value.includes(val)) {\n this._value.push(val);\n }\n const option = this._flatOptions.find(o => isDeepEqual(o.value, val));\n if (option) {\n this._selectedValues.push(option.value);\n this._selectedLabels.push(option.label);\n }\n }\n\n // Update the selected indexes based on the values that are now selected\n this._selectedIndexes = this._selectedValues.map(val => this._flatOptions.findIndex(o => o.value === val));\n\n // Update the selected options in the dropdown\n this._adapter.patchSelectedValues(this._selectedValues);\n }\n \n /**\n * Handles the user dismissing the dropdown.\n */\n protected _onDismiss(): void {\n this._closeDropdown();\n }\n\n /** Creates the selected text value from the selected label values. */\n protected _getSelectedText(): string {\n if (typeof this._selectedTextBuilder === 'function') {\n const selectedOptions = this._flatOptions.filter(o => this._selectedValues.includes(o.value));\n return this._selectedTextBuilder(selectedOptions);\n }\n\n if (this._multiple) {\n if (this._selectedLabels.length) {\n return `${this._selectedLabels.length} ${this._selectedLabels.length === 1 ? 'option' : 'options'} selected`;\n } else {\n return '';\n }\n }\n \n return this._selectedLabels\n .filter(v => v && v.length)\n .join(' ')\n .trim();\n }\n\n private _onKeydown(evt: KeyboardEvent): void {\n const isEscapeKey = evt.key === 'Escape' || evt.keyCode === 27;\n const isEnter = evt.key === 'Enter' || evt.keyCode === 13;\n const isSpace = evt.key === 'Space' || evt.keyCode === 32;\n const isArrowDown = evt.key === 'ArrowDown' || evt.keyCode === 40;\n const isArrowUp = evt.key === 'ArrowUp' || evt.keyCode === 38;\n const isFilterableCharacter = evt.keyCode >= 48 && evt.keyCode <= 90;\n const isHomeKey = evt.key === 'Home' || evt.keyCode === 36;\n const isEndKey = evt.key === 'End' || evt.keyCode === 35;\n const isTabKey = evt.key === 'Tab';\n\n // We automatically select the active option if the dropdown is open and in single selection mode\n if (isTabKey && this._open && !this._multiple) {\n this._selectActiveOption();\n return;\n }\n\n // If an active filter was started, clear it now\n if (!isFilterableCharacter && this._filterTimeout) {\n window.clearTimeout(this._filterTimeout);\n this._filterString = '';\n this._filterTimeout = undefined;\n }\n\n if (isEscapeKey) {\n evt.preventDefault();\n if (this._open) {\n this._closeDropdown();\n return;\n }\n }\n\n if (isSpace) {\n evt.preventDefault();\n\n if (!this._open) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n } else if (isEnter) {\n if (this._open) {\n evt.stopPropagation();\n evt.preventDefault();\n this._options = this._adapter.getOptions();\n this._selectActiveOption();\n }\n } else if (isArrowUp || isArrowDown) {\n evt.preventDefault();\n\n if (this._multiple && !this._open) {\n this._openDropdown();\n this._adapter.activateFirstOption();\n return;\n }\n\n if (this._flatOptions.length === 0) {\n return;\n }\n\n let optionIndex = 0;\n if (this._open) {\n optionIndex = this._adapter.getActiveOptionIndex();\n if (optionIndex === -1) {\n optionIndex = this._getFirstSelectedOptionIndex();\n }\n } else {\n optionIndex = this._getFirstSelectedOptionIndex();\n }\n\n if (isArrowUp) {\n optionIndex = this._getPreviousHighlightableOptionIndex(optionIndex, this._nonDividerOptions);\n } else {\n optionIndex = this._getNextHighlightableOptionIndex(optionIndex, this._nonDividerOptions);\n }\n\n // If the dropdown is open then we just move the active index, otherwise we change the selection (to mimic the native <select>)\n if (this._open) {\n this._adapter.highlightActiveOption(optionIndex);\n } else {\n this._onSelect(this._nonDividerOptions[optionIndex], optionIndex);\n }\n } else if (isHomeKey) {\n if (this._open) {\n evt.preventDefault();\n this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(o => !o.disabled));\n }\n } else if (isEndKey) {\n if (this._open) {\n evt.preventDefault();\n const options = this._nonDividerOptions;\n for (let i = options.length - 1; i >= 0; i--) {\n if (!options[i].disabled) {\n this._adapter.highlightActiveOption(i);\n break;\n }\n }\n }\n } else if (isFilterableCharacter) {\n this._filter(evt.key);\n }\n }\n\n private _getFirstSelectedOptionIndex(): number {\n return this._nonDividerOptions.findIndex(option => this._selectedValues.includes(option.value));\n }\n\n private _getPreviousHighlightableOptionIndex(startIndex: number, options: ISelectOption[]): number {\n let index = startIndex;\n if (index <= 0) {\n index = options.length - 1;\n } else {\n index--;\n }\n if (options[index].disabled) {\n return this._getPreviousHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private _getNextHighlightableOptionIndex(startIndex: number, options: ISelectOption[]): number {\n let index = startIndex;\n if (index === options.length - 1) {\n index = 0;\n } else {\n index++;\n }\n if (options[index].disabled) {\n return this._getNextHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private _filter(key: string): void {\n // This allows for typing numbers and/or characters while the select is focused to auto-select the closest match\n if (this._filterTimeout) {\n window.clearTimeout(this._filterTimeout);\n this._filterTimeout = undefined;\n }\n this._filterString += key;\n this._filterTimeout = window.setTimeout(() => {\n this._filterString = '';\n this._filterTimeout = undefined;\n }, 300);\n this._options = this._adapter.getOptions();\n // TODO(kieran.nichols): Enhance this to cycle through closest matches (see the native select)\n const matchedOption = this._flatOptions.find(option => !option.disabled && option.label.toLowerCase().startsWith(this._filterString));\n if (matchedOption) {\n const optionIndex = this._flatOptions.indexOf(matchedOption);\n if (this._open) {\n this._adapter.highlightActiveOption(optionIndex);\n } else if (!this._multiple) {\n this._onSelect(matchedOption, optionIndex, false);\n }\n }\n }\n\n private _onOptionsChanged(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._options = options;\n this._applyValue(this._value);\n }\n\n private _onActiveOptionChanged(id: string): void {\n this._adapter.updateActiveDescendant(id);\n }\n\n /** Gets/sets the value of the component. */\n public get value(): any {\n return this._multiple ? [...this._selectedValues] : this._selectedValues[0];\n }\n public set value(value: any) {\n let _value: string | string[];\n \n if (Array.isArray(value)) {\n _value = [ ...value ];\n } else {\n _value = value;\n }\n\n this._applyValue(_value);\n }\n\n /** Gets/sets the selected index(s). */\n public get selectedIndex(): number | number[] {\n return this._multiple ? [ ...this._selectedIndexes ] : this._selectedIndexes[0];\n }\n public set selectedIndex(indexes: number | number[]) {\n this._options = this._adapter.getOptions();\n\n let indicies: number [];\n if (Array.isArray(indexes)) {\n indicies = [ ...indexes ];\n } else {\n indicies = [indexes];\n }\n\n indicies.sort();\n\n if (this.multiple) {\n this.value = indicies\n .map(index => this._flatOptions[index])\n .filter(o => o)\n .map(o => o.value);\n } else {\n const option = this._flatOptions[indicies[indicies.length - 1]];\n if (!option) {\n return;\n }\n this.value = option.value;\n }\n }\n\n /** Gets/sets the available options. */\n public get options(): ISelectOption[] | ISelectOptionGroup[] {\n return this._adapter.getOptions();\n }\n public set options(value: ISelectOption[] | ISelectOptionGroup[]) {\n let _value: ISelectOption[] | ISelectOptionGroup[];\n if (isSelectOptionType(value, SelectOptionType.Group)) {\n _value = (value as ISelectOptionGroup[]).map(v => ({ ...v }));\n } else {\n _value = (value as ISelectOption[]).map(v => ({ ...v }));\n }\n\n this._options = _value;\n this._adapter.setOptions(_value); // Must set options before intializing value\n this._initializeValue();\n\n if (this._open) {\n this._adapter.setDropdownOptions(_value);\n }\n }\n\n /** Gets/sets the multiple select state. */\n public get multiple(): boolean {\n return this._multiple;\n }\n public set multiple(value: boolean) {\n if (this._multiple !== value) {\n this._multiple = value;\n this._reset();\n if (this._open) {\n this._closeDropdown();\n }\n this._adapter.setMultiple(this._multiple);\n }\n }\n\n /** Gets/sets the open state of the dropdown. */\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n if (value) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n\n /** Gets/sets the builder callback to use when building options. */\n public get optionBuilder(): SelectOptionBuilder {\n return this._optionBuilder;\n }\n public set optionBuilder(value: SelectOptionBuilder) {\n this._optionBuilder = value;\n }\n\n /** Sets the selected text builder callback that will be executed when getting the selected text to display in the field. */\n public get selectedTextBuilder(): SelectSelectedTextBuilder {\n return this._selectedTextBuilder;\n }\n public set selectedTextBuilder(fn: SelectSelectedTextBuilder) {\n this._selectedTextBuilder = fn;\n }\n\n public get observeScroll(): boolean {\n return this._observeScroll;\n }\n public set observeScroll(value: boolean) {\n this._observeScroll = value;\n }\n\n public get observeScrollThreshold(): number {\n return this._observeScrollThreshold;\n }\n public set observeScrollThreshold(value: number) {\n this._observeScrollThreshold = value;\n }\n\n public get syncPopupWidth(): boolean {\n return this._syncPopupWidth;\n }\n public set syncPopupWidth(value: boolean) {\n this._syncPopupWidth = value;\n }\n\n\n public get optionLimit(): number {\n return this._optionLimit;\n }\n public set optionLimit(value: number) {\n this._optionLimit = value;\n }\n \n public get popupClasses(): string | string[] {\n return this._popupClasses;\n }\n public set popupClasses(value: string | string[]) {\n this._popupClasses = value;\n }\n\n public get popupHeaderBuilder(): ListDropdownHeaderBuilder {\n return this._popupHeaderBuilder;\n }\n public set popupHeaderBuilder(value: ListDropdownHeaderBuilder) {\n this._popupHeaderBuilder = value;\n }\n\n public get popupFooterBuilder(): ListDropdownFooterBuilder {\n return this._popupFooterBuilder;\n }\n public set popupFooterBuilder(value: ListDropdownFooterBuilder) {\n this._popupFooterBuilder = value;\n }\n\n /** Gets the currently active popup element when the dropdown is open. */\n public get popupElement(): HTMLElement | undefined {\n return this._adapter.popupElement;\n }\n\n /** Sets the callback to be executed when the user selects a value. */\n public get beforeValueChange(): SelectBeforeValueChangeCallback<any> {\n return this._beforeValueChange;\n }\n public set beforeValueChange(value: SelectBeforeValueChangeCallback<any>) {\n this._beforeValueChange = value;\n }\n}\n", "import { coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport {\n SelectOptionBuilder,\n SelectSelectedTextBuilder,\n ISelectOption,\n ISelectOptionGroup,\n SelectBeforeValueChangeCallback,\n BASE_SELECT_CONSTANTS\n} from './base-select-constants';\nimport { IBaseSelectFoundation } from './base-select-foundation';\nimport { IListDropdownAware, ListDropdownAware } from '../../list-dropdown/list-dropdown-aware';\nimport { IPopupComponent } from '../../popup';\n\n\nexport interface IBaseSelectComponent extends IListDropdownAware {\n value: any;\n selectedIndex: number | number[];\n options: ISelectOption[] | ISelectOptionGroup[];\n multiple: boolean;\n open: boolean;\n optionBuilder: SelectOptionBuilder;\n selectedTextBuilder: SelectSelectedTextBuilder;\n popupElement: IPopupComponent | undefined;\n beforeValueChange: SelectBeforeValueChangeCallback<any>;\n appendOptions(options: ISelectOption[] | ISelectOption[]): void;\n selectAll(): void;\n deselectAll(): void;\n}\n\nexport abstract class BaseSelectComponent<T extends IBaseSelectFoundation> extends ListDropdownAware implements IBaseSelectComponent {\n protected _foundation: T;\n\n constructor() {\n super();\n }\n\n /** Gets/sets the value. */\n @FoundationProperty()\n public value: any;\n \n /** Gets/sets the selected index. */\n @FoundationProperty()\n public selectedIndex: number | number[];\n \n /** Gets/sets the available options. */\n @FoundationProperty()\n public options: ISelectOption[] | ISelectOptionGroup[];\n\n /** Gets/sets the multiple select state. */\n @FoundationProperty()\n public multiple: boolean;\n \n /** Gets the open state of the dropdown. */\n @FoundationProperty()\n public open: boolean;\n \n /** Sets the option builder callback that will be executed when building the option list in the dropdown. */\n @FoundationProperty()\n public optionBuilder: SelectOptionBuilder;\n \n /** Sets the selected text builder callback that will be executed when getting the selected text to display in the field. */\n @FoundationProperty()\n public selectedTextBuilder: SelectSelectedTextBuilder;\n\n /** Sets the callback to be executed when the user selects a value. */\n @FoundationProperty()\n public beforeValueChange: SelectBeforeValueChangeCallback<any>;\n\n /** Gets the popup element (when the dropdown is open). */\n @FoundationProperty({ set: false })\n public popupElement: IPopupComponent | undefined;\n \n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case BASE_SELECT_CONSTANTS.attributes.MULTIPLE:\n this.multiple = coerceBoolean(newValue);\n break;\n case BASE_SELECT_CONSTANTS.attributes.VALUE:\n this.value = newValue;\n break;\n }\n }\n\n public appendOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._foundation.appendOptions(options);\n }\n\n public selectAll(): void {\n this._foundation.selectAll();\n }\n \n public deselectAll(): void {\n this._foundation.deselectAll();\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n}\n", "import { isDefined, removeElement } from '@tylertech/forge-core';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IBaseSelectComponent } from './base-select';\nimport { ListDropdown, IListDropdown } from '../../list-dropdown';\nimport { IListDropdownConfig, ListDropdownIconType } from '../../list-dropdown/list-dropdown-constants';\nimport { IOptionComponent, OPTION_CONSTANTS } from '../option';\nimport { IOptionGroupComponent, OPTION_GROUP_CONSTANTS } from '../option-group';\nimport { ISelectOption, ISelectOptionGroup, SelectOptionListenerDestructor } from './base-select-constants';\nimport { isOptionGroupObject } from './select-utils';\nimport { IPopupComponent, POPUP_CONSTANTS } from '../../popup';\nimport { assignMatchingProperties } from '../../core/utils/utils';\n\nexport interface IBaseSelectAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n addClickListener(listener: (evt: Event) => void): void;\n removeClickListener(listener: (evt: Event) => void): void;\n addTargetListener(type: string, listener: (evt: Event) => void): void;\n removeTargetListener(type: string, listener: (evt: Event) => void): void;\n getOptions(): ISelectOption[] | ISelectOptionGroup[];\n setOptions(options: ISelectOption[] | ISelectOptionGroup[], clear?: boolean): void;\n open(config: IListDropdownConfig): void;\n close(): void;\n setDismissListener(listener: () => void): void;\n scrollSelectedOptionIntoView(): void;\n activateSelectedOption(): void;\n activateFirstOption(): void;\n getActiveOptionIndex(): number;\n highlightActiveOption(index: number): void;\n toggleOptionMultiple(index: number, isSelected: boolean): void;\n patchSelectedValues(selectedValues: string[]): void;\n updateActiveDescendant(id: string): void;\n setOptionsListener(listener: (options: ISelectOption[] | ISelectOptionGroup[]) => void): SelectOptionListenerDestructor;\n setDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n appendDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void;\n setMultiple(multiple: boolean): void;\n isFocusWithinPopup(target: HTMLElement): boolean;\n queueDropdownPositionUpdate(): void;\n popupElement: HTMLElement | undefined;\n}\n\nexport abstract class BaseSelectAdapter extends BaseAdapter<IBaseSelectComponent> implements IBaseSelectAdapter {\n private _listDropdown?: IListDropdown;\n protected _targetElement: HTMLElement;\n\n constructor(component: IBaseSelectComponent) {\n super(component);\n }\n\n public abstract initializeAccessibility(): void;\n public abstract updateActiveDescendant(id: string): void;\n public abstract addClickListener(listener: (evt: Event) => void): void;\n public abstract removeClickListener(listener: (evt: Event) => void): void;\n public abstract addTargetListener(type: string, listener: (evt: Event) => void): void;\n public abstract removeTargetListener(type: string, listener: (evt: Event) => void): void;\n public abstract setMultiple(multiple: boolean): void;\n\n public get popupElement(): HTMLElement | undefined {\n return this._listDropdown?.dropdownElement;\n }\n\n public getOptions(): ISelectOption[] | ISelectOptionGroup[] {\n const optionGroupElements = Array.from(this._component.querySelectorAll(OPTION_GROUP_CONSTANTS.elementName)) as IOptionGroupComponent[];\n if (optionGroupElements.length) {\n return optionGroupElements.map(optionGroupElement => {\n const optionElements = Array.from(optionGroupElement.querySelectorAll(OPTION_CONSTANTS.elementName)) as IOptionComponent[];\n const options = this._createOptionsFromElements(optionElements);\n return { text: optionGroupElement.label, options } as ISelectOptionGroup;\n });\n } else {\n const optionElements = Array.from(this._component.querySelectorAll(OPTION_CONSTANTS.elementName)) as IOptionComponent[];\n return this._createOptionsFromElements(optionElements);\n }\n }\n\n private _createOptionsFromElements(optionElements: IOptionComponent[]): ISelectOption[] {\n return optionElements.map(o => {\n let optionClass = o.hasAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.OPTION_CLASS) as string : o.optionClass;\n if (typeof optionClass === 'string') {\n optionClass = optionClass.split(' ');\n }\n\n return {\n // eslint-disable-next-line @typescript-eslint/no-extra-parens\n label: o.hasAttribute(OPTION_CONSTANTS.attributes.LABEL) ? o.getAttribute(OPTION_CONSTANTS.attributes.LABEL) as string : (isDefined(o.label) ? o.label : o.innerText),\n value: o.hasAttribute(OPTION_CONSTANTS.attributes.VALUE) ? o.getAttribute(OPTION_CONSTANTS.attributes.VALUE) : o.value,\n disabled: o.hasAttribute(OPTION_CONSTANTS.attributes.DISABLED),\n divider: o.hasAttribute(OPTION_CONSTANTS.attributes.DIVIDER),\n optionClass,\n leadingIcon: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON) as string : o.leadingIcon,\n leadingIconClass: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_CLASS) as string : o.leadingIconClass,\n leadingIconType: o.hasAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE) ? o.getAttribute(OPTION_CONSTANTS.attributes.LEADING_ICON_TYPE) as ListDropdownIconType : o.leadingIconType,\n trailingIcon: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON) as string : o.trailingIcon,\n trailingIconClass: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_CLASS) as string : o.trailingIconClass,\n trailingIconType: o.hasAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE) ? o.getAttribute(OPTION_CONSTANTS.attributes.TRAILING_ICON_TYPE) as ListDropdownIconType : o.trailingIconType,\n leadingBuilder: o.leadingBuilder,\n trailingBuilder: o.trailingBuilder\n };\n });\n }\n\n public open(config: IListDropdownConfig): void {\n this._listDropdown = new ListDropdown(this._targetElement, config);\n this._listDropdown.open();\n }\n\n public close(): void {\n if (this._listDropdown) {\n this._listDropdown.close();\n this._listDropdown.destroy();\n this._listDropdown = undefined;\n }\n }\n\n public setDismissListener(listener: () => void): void {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return;\n }\n const dropdownElement = this._listDropdown.dropdownElement as IPopupComponent;\n if (dropdownElement.targetElement) {\n dropdownElement.targetElement.addEventListener(POPUP_CONSTANTS.events.BLUR, listener);\n }\n }\n\n public toggleOptionMultiple(index: number, isSelected: boolean): void {\n this._listDropdown?.toggleOptionMultiple(index, isSelected);\n }\n\n public getActiveOptionIndex(): number {\n return this._listDropdown?.getActiveOptionIndex() ?? -1;\n }\n\n public activateSelectedOption(): void {\n this._listDropdown?.activateSelectedOption();\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public highlightActiveOption(index: number): void {\n this._listDropdown?.activateOption(index);\n }\n\n public patchSelectedValues(selectedValues: string[]): void {\n this._listDropdown?.setSelectedValues(selectedValues);\n }\n\n public setOptionsListener(listener: (options: ISelectOption[] | ISelectOptionGroup[]) => void): SelectOptionListenerDestructor {\n const observer = new MutationObserver(() => listener(this.getOptions()));\n observer.observe(this._component, { childList: true, subtree: true });\n return () => observer.disconnect();\n }\n\n public setOptions(options: ISelectOption[] | ISelectOptionGroup[], clear = true): void {\n if (clear) {\n this._clearOptions();\n }\n\n for (const opt of options) {\n if (isOptionGroupObject(opt)) {\n const optionGroupElement = this._createOptionGroupElement(opt);\n for (const option of opt.options) {\n const optionElement = this._createOptionElement(option);\n optionGroupElement.appendChild(optionElement);\n }\n this._component.appendChild(optionGroupElement);\n } else {\n const optionElement = this._createOptionElement(opt);\n this._component.appendChild(optionElement);\n }\n }\n }\n\n public appendDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._listDropdown?.appendOptions(options);\n }\n\n public setDropdownOptions(options: ISelectOption[] | ISelectOptionGroup[]): void {\n this._listDropdown?.setOptions(options);\n }\n\n public scrollSelectedOptionIntoView(): void {\n this._listDropdown?.scrollSelectedOptionIntoView();\n }\n\n public isFocusWithinPopup(target: HTMLElement): boolean {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return false;\n }\n return this._listDropdown.dropdownElement.contains(target);\n }\n\n public queueDropdownPositionUpdate(): void {\n if (!this.popupElement) {\n return;\n }\n // We need to wait for the next animation frame to ensure that the layout has been updated\n window.requestAnimationFrame(() => {\n const dropdownEl = this.popupElement as IPopupComponent | undefined;\n dropdownEl?.position();\n });\n }\n\n private _clearOptions(): void {\n // First we remove all option group elements\n const existingOptionGroupElements = Array.from(this._component.querySelectorAll(OPTION_GROUP_CONSTANTS.elementName));\n existingOptionGroupElements.forEach((optGroup: IOptionGroupComponent) => removeElement(optGroup));\n\n // Then find all top-level option elements that aren't inside of a group, and ensure that those are removed as well\n const existingOptionElements = Array.from(this._component.querySelectorAll(OPTION_CONSTANTS.elementName));\n existingOptionElements.forEach((o: HTMLElement) => removeElement(o));\n }\n\n private _createOptionGroupElement(group: ISelectOptionGroup): HTMLElement {\n const optionGroupElement = document.createElement('forge-option-group');\n assignMatchingProperties(group, optionGroupElement);\n optionGroupElement.label = group.text ?? '';\n return optionGroupElement;\n }\n\n private _createOptionElement(option: ISelectOption): HTMLElement {\n const optionElement = document.createElement('forge-option');\n assignMatchingProperties(option, optionElement);\n optionElement.textContent = option.label;\n return optionElement;\n }\n}\n"],
|
|
5
|
-
"mappings": "6dAUA,GAAM,GAAqB,CACzB,MAAO,QACP,SAAU,WACV,eAAgB,iBAChB,yBAA0B,2BAC1B,cAAe,gBACf,aAAc,eACd,iBAAkB,kBACpB,EAEM,EAAa,KACd,GAGC,EAAS,CACb,OAAQ,QACV,EAEa,EAAwB,CACnC,aACA,QACF,EC5BO,GAAK,GAAL,CAAK,GAAmB,wBAAQ,qBAA3B,WAOL,WAA4B,EAAiD,EAAiC,CACnH,GAAM,GAAiB,EAAQ,KAAK,AAAC,GAA0C,EAAoB,CAAC,CAAC,EAC/F,EAAgB,EAAQ,KAAK,AAAC,GAA0C,EAAe,CAAC,CAAC,EAC/F,MAAQ,IAAkB,IAAS,GAA4B,GAAiB,IAAS,CAC3F,CAEO,WAA6B,EAAgE,CAClG,MAAO,GAAU,CAAC,GAAK,EAAS,CAAC,GAAK,EAAE,eAAe,SAAS,GAAK,EAAE,eAAe,MAAM,CAC9F,CAEO,WAAwB,EAA2D,CACxF,MAAO,GAAU,CAAC,GAAK,EAAS,CAAC,GAAK,EAAE,eAAe,OA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CAC3D,CAEA,AAAO,6BAAoC,CACzC,AAAI,CAAC,KAAK,cAIV,OAAO,sBAAsB,IAAM,CACjC,GAAM,GAAa,KAAK,aACxB,WAAY,UACd,CAAC,CACH,CAEA,AAAQ,eAAsB,CAG5B,AADoC,MAAM,KAAK,KAAK,WAAW,iBAAiB,EAAuB,WAAW,CAAC,EACvF,QAAQ,AAAC,GAAoC,EAAc,CAAQ,CAAC,EAIhG,AAD+B,MAAM,KAAK,KAAK,WAAW,iBAAiB,EAAiB,WAAW,CAAC,EACjF,QAAQ,AAAC,GAAmB,EAAc,CAAC,CAAC,CACrE,CAEA,AAAQ,0BAA0B,EAAwC,CArN5E,MAsNI,GAAM,GAAqB,SAAS,cAAc,oBAAoB,EACtE,SAAyB,EAAO,CAAkB,EAClD,EAAmB,MAAQ,KAAM,OAAN,OAAc,GAClC,CACT,CAEA,AAAQ,qBAAqB,EAAoC,CAC/D,GAAM,GAAgB,SAAS,cAAc,cAAc,EAC3D,SAAyB,EAAQ,CAAa,EAC9C,EAAc,YAAc,EAAO,MAC5B,CACT,CACF",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as H}from"./chunk.DGOV5RDW.js";import{a as I}from"./chunk.NGIBMR3Q.js";import{c as L}from"./chunk.7NXPOEXV.js";import{a as c,d as w}from"./chunk.QJPH24V4.js";import{a as P}from"./chunk.BOENNFXE.js";import{a as O}from"./chunk.A23NSEWA.js";import{a as s}from"./chunk.B3IJU6XJ.js";import{a as x,b as S}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as M,e as D,g as v}from"./chunk.HN4PXH3D.js";import{i as T,r as y,s as k,t as p}from"./chunk.R4NDFXVA.js";import{b as g,c as E,d as C,k as m}from"./chunk.G76HB2FK.js";import{a as f,f as n}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"},h={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:c.elementName,INITIAL_FOCUS:`[${h.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${h.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`},F={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:B,selectors:R,attributes:h,events:z,numbers:F};var u=class{constructor(t){this._adapter=t;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._transitionEndHandler=e=>this._onTransitionEnd(),this._documentKeydownHandler=e=>this._onDocumentKeydown(e),this._backdropClickHandler=e=>this._onBackdropClick(e),this._moveTargetMouseDownHandler=e=>this._onMoveTargetMouseDown(e),this._moveTargetMouseMoveHandler=e=>this._onMoveTargetMouseMove(e),this._moveTargetMouseUpHandler=e=>this._onMoveTargetMouseUp(e)}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._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(t){if(t){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=t,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=t,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(t){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(t){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}async show(t){this._open||(this._open=!0,this._adapter.isConnected||this._adapter.attach(t),await this._openDialog())}async hide(t){!this._open||(this._open=!1,await this._closeDialog(),t&&this._adapter.detach())}_normalizePositionValue(t){return C(t)?`${t}px`:E(t)?t:null}_openDialog(){return 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._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._setBackdropClickListener(this._backdropClose),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),new Promise(t=>{window.setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&(this._onTransitionEnd(),t())})},i.numbers.ANIMATION_DURATION)})}_closeDialog(){return this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._escapeClose&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._backdropClose&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._moveContext=void 0,this._lastPosition=void 0,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),this._adapter.setSurfacePosition(null,null,null),new Promise(t=>{setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.getOpenDialogs(`${i.elementName}[${i.attributes.OPEN}]`).length||this._adapter.removeBodyAttribute(i.attributes.OPEN),this._adapter.setAnimating(!1),t()},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(t){t.preventDefault(),this._adapter.captureActiveElement();let e=this._adapter.getSurfaceBounds();this._moveContext={top:t.clientY-e.top,left:t.clientX-e.left,height:e.height,width:e.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(t){t.preventDefault();let e=this._calculateOffsetPosition(t.pageX,t.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,e,!0,!0)))return;let o=this._clampPosition(e,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=f({},o);let d=this._normalizePositionValue(o.x),N=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,N,"absolute")}}_onMoveTargetMouseUp(t){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(t){t.stopPropagation(),t.key&&(t.key==="Escape"||t.key==="Esc")&&this._tryClose()}_onBackdropClick(t){t.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(e){return}}}_setBackdropClickListener(t){!this._open||(t&&this._backdropClose?this._adapter.registerBackdropClickHandler(this._backdropClickHandler):t||this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setDocumentKeydownListener(t){!this._open||(t&&this._escapeClose?this._adapter.setDocumentListener("keydown",this._documentKeydownHandler):t||this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler))}_calculateOffsetPosition(t,e,o){return{x:t-((o==null?void 0:o.left)||0),y:e-((o==null?void 0:o.top)||0)}}_clampPosition({x:t,y:e},o){let a=0,d=0;return o&&(a=o.width,d=o.height),t<=0?t=0:t+a>=window.innerWidth&&(t=window.innerWidth-a),e<=0?e=0:e+d>=window.innerHeight&&(e=window.innerHeight-d),{x:t,y:e}}set backdropClose(t){t=Boolean(t),this._backdropClose!==t&&(this._backdropClose=t,this._setBackdropClickListener(this._backdropClose),g(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(t){t=Boolean(t),this._escapeClose!==t&&(this._escapeClose=t,this._setDocumentKeydownListener(this._escapeClose),g(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(t){this._open!==t&&(t=Boolean(t),t!==this._open&&this._applyOpen(t))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen))}get openCallback(){return this._openCallback}set openCallback(t){this._openCallback=t}get closeCallback(){return this._closeCallback}set closeCallback(t){this._closeCallback=t}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(t){this._beforeCloseCallback=t}get positionType(){return this._positionType}set positionType(t){this._positionType!==t&&(this._positionType=t,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(t){this._positionX!==t&&(this._positionX=this._normalizePositionValue(t),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(t){this._positionY!==t&&(this._positionY=this._normalizePositionValue(t),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(t){this._moveable!==t&&(this._moveable=t,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(t){this._moveTarget=t}};var b=class extends O{constructor(e){super(e);this._containerElement=v(e,i.selectors.CONTAINER),this._surfaceElement=v(e,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(e){p(this._containerElement,e,i.classes.ANIMATING)}setVisibility(e){p(this._containerElement,e,i.classes.OPEN),this._backdropElement||(this._backdropElement=document.createElement("forge-backdrop"),this._backdropElement.setAttribute("part","scrim"),this._containerElement.appendChild(this._backdropElement)),e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}attach(e=document.body){e.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),T(this._component)}registerTransitionEndHandler(e){this._surfaceElement.addEventListener("transitionend",e)}deregisterTransitionEndHandler(e){this._surfaceElement.removeEventListener("transitionend",e)}setDocumentListener(e,o){document.addEventListener(e,o)}removeDocumentListener(e,o){document.removeEventListener(e,o)}registerBackdropClickHandler(e){var o;(o=this._backdropElement)==null||o.addEventListener(c.events.BACKDROP_CLICK,e)}deregisterBackdropClickHandler(e){var o;(o=this._backdropElement)==null||o.removeEventListener(c.events.BACKDROP_CLICK,e)}getOpenDialogs(e){return document.querySelectorAll(e)}setBodyAttribute(e,o){document.body.setAttribute(e,o)}removeBodyAttribute(e){document.body.removeAttribute(e)}trySetInitialFocus(){let e=y(this._component,i.selectors.INITIAL_FOCUS);e&&e.length&&e[e.length-1].focus()}isScrollable(){let e=this._component.querySelector(i.selectors.CONTENT);return e?e.scrollHeight>e.offsetHeight:!1}addRootClass(e){this._component.classList.add(e)}setFullscreen(e){p(this._containerElement,e,i.classes.FULLSCREEN)}setMoveable(e){p(this._containerElement,e,i.classes.MOVEABLE)}tryLayoutChildren(){let e=[P.elementName,H.elementName,L.elementName,I.elementName];Array.from(this._component.querySelectorAll(e.join(","))).filter(a=>typeof a.layout=="function").forEach(a=>a.layout())}setMoveTarget(e){return e?(this._moveTargetElement=this._component.querySelector(e),!!this._moveTargetElement):!1}setMoveTargetHandler(e,o){var a;(a=this._moveTargetElement)==null||a.addEventListener(e,o)}removeDragTargetHandler(e,o){var a;(a=this._moveTargetElement)==null||a.removeEventListener(e,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(e,o,a){a?this._surfaceElement.style.position=a==="absolute"?a:"relative":this._surfaceElement.style.removeProperty("position"),o!==null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),e!==null?this._surfaceElement.style.left=e:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){var e;this._activeElement=k(),(e=this._activeElement)==null||e.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var U='<template><div class="forge-dialog" part="root"><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',K='.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();D(this,U,K),this._foundation=new u(new b(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(e,o,a){switch(e){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=m(a);break;case i.attributes.FULLSCREEN:this.fullscreen=m(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=m(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}show(e){return this._foundation.show(e)}hide(e){return this._foundation.hide(e)}};n([s()],r.prototype,"backdropClose",2),n([s()],r.prototype,"escapeClose",2),n([s()],r.prototype,"open",2),n([s()],r.prototype,"fullscreen",2),n([s()],r.prototype,"openCallback",2),n([s()],r.prototype,"closeCallback",2),n([s()],r.prototype,"beforeCloseCallback",2),n([s()],r.prototype,"positionType",2),n([s()],r.prototype,"positionX",2),n([s()],r.prototype,"positionY",2),n([s()],r.prototype,"moveable",2),n([s()],r.prototype,"moveTarget",2),r=n([x({name:i.elementName,dependencies:[w]})],r);function De(){M(r)}export{i as a,u as b,b as c,r as d,De as e};
|
|
7
|
-
//# sourceMappingURL=chunk.VQKRN5IQ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/dialog/dialog-constants.ts", "../../src/dialog/dialog-foundation.ts", "../../src/dialog/dialog-adapter.ts", "../../src/dialog/dialog.ts", "../../src/dialog/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { BACKDROP_CONSTANTS } from '../backdrop';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}dialog`;\n\nconst classes = {\n ANIMATING: 'forge-dialog--animating',\n OPEN: 'forge-dialog--open',\n ACTION_BUTTON: 'forge-dialog__action__button',\n BUTTON_TEXT: 'forge-button__text',\n SCROLLABLE: 'forge-dialog--scrollable',\n FULLSCREEN: 'forge-dialog--fullscreen',\n MOVEABLE: 'forge-dialog--moveable'\n};\n\nconst attributes = {\n BACKDROP_CLOSE: 'backdrop-close',\n ESCAPE_CLOSE: 'escape-close',\n FULLSCREEN: 'fullscreen',\n POSITION_TYPE: 'position-type',\n POSITION_X: 'position-x',\n POSITION_Y: 'position-y',\n MOVEABLE: 'moveable',\n MOVE_TARGET: 'move-target',\n OPEN: 'forge-dialog-open',\n INITIAL_FOCUS: 'forge-dialog-focus',\n DFEAULT_MOVE_TARGET: 'forge-dialog-move-target'\n};\n\nconst selectors = {\n CONTAINER: '.forge-dialog',\n SURFACE: '.forge-dialog__surface',\n BACKDROP: BACKDROP_CONSTANTS.elementName,\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`,\n DFEAULT_MOVE_TARGET: `[${attributes.DFEAULT_MOVE_TARGET}]`,\n CONTENT: '.forge-dialog__body'\n};\n\nconst events = {\n BEFORE_CLOSE: `${elementName}-before-close`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n READY: `${elementName}-ready`,\n MOVE_START: `${elementName}-move-start`,\n MOVED: `${elementName}-move`,\n MOVE_END: `${elementName}-move-end`\n};\n\nconst numbers = {\n ANIMATION_DURATION: 150,\n BACKDROP_MAX_OPACITY: 0.3\n};\n\nexport const DIALOG_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IDialogMoveEventData {\n x: number;\n y: number;\n}\n\nexport interface IDialogMoveContext {\n top: number;\n left: number;\n height: number;\n width: number;\n}\n\nexport interface IDialogMoveStartEventData extends IDialogMoveEventData {}\n\nexport type DialogPositionType = 'absolute' | 'relative';\nexport type DialogStateCallback = () => boolean | void | Promise<boolean | void>;\n", "import { ICustomElementFoundation, isDefined, isNumber, isString } from '@tylertech/forge-core';\nimport { IDialogAdapter } from './dialog-adapter';\nimport { DialogPositionType, DialogStateCallback, DIALOG_CONSTANTS, IDialogMoveContext, IDialogMoveStartEventData } from './dialog-constants';\n\nexport interface IDialogFoundation extends ICustomElementFoundation {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: DialogStateCallback;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n show(parent?: HTMLElement): Promise<void>;\n hide(remove?: boolean): Promise<void>;\n}\n\nexport class DialogFoundation implements IDialogFoundation {\n // Private vars\n private _open = false;\n private _backdropClose = true;\n private _escapeClose = true;\n private _fullscreen = false;\n private _openCallback: DialogStateCallback;\n private _closeCallback: DialogStateCallback;\n private _beforeCloseCallback: DialogStateCallback;\n private _positionType: DialogPositionType = 'absolute';\n private _positionX: string | null = null;\n private _positionY: string | null = null;\n private _moveable = false;\n private _moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n private _isAnimating = false;\n private _isMoving = false;\n private _moveContext: IDialogMoveContext | undefined;\n private _lastPosition: { x: number; y: number } | undefined;\n\n // Event handlers\n private _transitionEndHandler: (evt: TransitionEvent) => void;\n private _documentKeydownHandler: (evt: KeyboardEvent) => void;\n private _backdropClickHandler: (evt: CustomEvent) => void;\n private _moveTargetMouseDownHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseMoveHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseUpHandler: (evt: MouseEvent) => void;\n\n constructor(public _adapter: IDialogAdapter) {\n this._transitionEndHandler = (evt: TransitionEvent) => this._onTransitionEnd();\n this._documentKeydownHandler = (evt: KeyboardEvent) => this._onDocumentKeydown(evt);\n this._backdropClickHandler = (evt: CustomEvent) => this._onBackdropClick(evt);\n this._moveTargetMouseDownHandler = (evt: MouseEvent) => this._onMoveTargetMouseDown(evt);\n this._moveTargetMouseMoveHandler = (evt: MouseEvent) => this._onMoveTargetMouseMove(evt);\n this._moveTargetMouseUpHandler = (evt: MouseEvent) => this._onMoveTargetMouseUp(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n if (this._open) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n this._initMoveTarget();\n }\n }\n }\n\n public destroy(): void {\n if (this._open) {\n this._removeDragHandlers();\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private async _applyOpen(value: boolean): Promise<void> {\n if (value) {\n if (typeof this._openCallback === 'function' && !await this._executeOpenCallback()) {\n return;\n }\n this._open = value;\n this._openDialog();\n } else {\n if (typeof this._closeCallback === 'function' && !await this._executeCloseCallback()) {\n return;\n }\n this._open = value;\n this._closeDialog();\n }\n\n this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private async _executeOpenCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._openCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n private async _executeCloseCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._closeCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n public initializeMoveTarget(): void {\n if (!this._moveTarget) {\n this._moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n }\n this._initMoveTarget();\n }\n\n public resetPosition(): void {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n\n public async show(parent?: HTMLElement): Promise<void> {\n if (this._open) {\n return;\n }\n \n this._open = true;\n if (!this._adapter.isConnected) {\n this._adapter.attach(parent);\n }\n await this._openDialog();\n }\n\n public async hide(remove?: boolean): Promise<void> {\n if (!this._open) {\n return;\n }\n\n this._open = false;\n await this._closeDialog();\n if (remove) {\n this._adapter.detach();\n }\n }\n\n private _normalizePositionValue(value: number | string | null | undefined): string | null {\n if (isNumber(value)) {\n return `${value}px`;\n } else if (isString(value)) {\n return value;\n }\n return null;\n }\n\n private _openDialog(): Promise<void> {\n if (!this._fullscreen) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n }\n if (this._positionX !== null || this._positionY !== null) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n\n this._adapter.setBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN, 'true');\n this._adapter.registerTransitionEndHandler(this._transitionEndHandler);\n this._setDocumentKeydownListener(this._escapeClose);\n this._adapter.setAnimating(true);\n this._isAnimating = true;\n\n // Ensure transitions are triggered properly\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n this._adapter.setVisibility(true);\n this._setBackdropClickListener(this._backdropClose); // Must come after setting visibility because the backdrop may not yet exist\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.OPEN);\n this._adapter.trySetInitialFocus();\n if (this._adapter.isScrollable()) {\n this._adapter.addRootClass(DIALOG_CONSTANTS.classes.SCROLLABLE);\n }\n });\n });\n\n return new Promise<void>(resolve => {\n // Wait for the dialog to finish animating open, then emit the ready event and attach any listeners\n window.setTimeout(() => {\n window.requestAnimationFrame(() => {\n if (this._open && this._isAnimating) {\n this._onTransitionEnd();\n resolve();\n }\n });\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n });\n }\n\n private _closeDialog(): Promise<void> {\n if (this._moveTarget) {\n this._removeDragHandlers();\n }\n\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n\n if (this._escapeClose) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n if (this._backdropClose) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n\n this._isAnimating = false;\n this._moveContext = undefined;\n this._lastPosition = undefined;\n this._adapter.setAnimating(true);\n this._adapter.setVisibility(false);\n this._adapter.setSurfacePosition(null, null, null);\n\n return new Promise<void>(resolve => {\n setTimeout(() => {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.CLOSE);\n const openDialogs = this._adapter.getOpenDialogs(`${DIALOG_CONSTANTS.elementName}[${DIALOG_CONSTANTS.attributes.OPEN}]`);\n if (!openDialogs.length) {\n this._adapter.removeBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN);\n }\n this._adapter.setAnimating(false);\n resolve();\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n });\n }\n\n private _onTransitionEnd(): void {\n if (!this._isAnimating) {\n return;\n }\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n this._adapter.setAnimating(false);\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.READY);\n this._adapter.tryLayoutChildren();\n if (this._moveable) {\n this._initMoveTarget();\n }\n this._isAnimating = false;\n }\n\n private _initMoveTarget(): void {\n if (!this._fullscreen && this._moveable && this._moveTarget && this._adapter.setMoveTarget(this._moveTarget)) {\n this._adapter.setMoveTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n }\n }\n\n private _removeDragHandlers(): void {\n this._adapter.removeDragTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseDown(evt: MouseEvent): void {\n evt.preventDefault();\n this._adapter.captureActiveElement();\n const bounds = this._adapter.getSurfaceBounds();\n this._moveContext = {\n top: evt.clientY - bounds.top,\n left: evt.clientX - bounds.left,\n height: bounds.height,\n width: bounds.width\n };\n this._adapter.setDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.setDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseMove(evt: MouseEvent): void {\n evt.preventDefault();\n const position = this._calculateOffsetPosition(evt.pageX, evt.pageY, this._moveContext);\n\n // If this is the beginning of the move sequence, we emit the start event (to allow for preventing default) and\n // then update the surface position if not prevented\n if (!this._isMoving) {\n this._isMoving = true;\n const canDrag = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_START, position as IDialogMoveStartEventData, true, true);\n if (!canDrag) {\n return;\n }\n }\n\n // Ensure that the surface position stays within the bounds of the screen\n const newPosition = this._clampPosition(position, this._moveContext);\n\n // Only update the position if it actually changed\n if (!this._lastPosition || newPosition.x !== this._lastPosition.x || newPosition.y !== this._lastPosition.y) {\n const canMove = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVED, newPosition as IDialogMoveStartEventData, true, true);\n if (canMove) {\n this._lastPosition = { ...newPosition };\n const newX = this._normalizePositionValue(newPosition.x);\n const newY = this._normalizePositionValue(newPosition.y);\n this._adapter.setSurfacePosition(newX, newY, 'absolute');\n }\n }\n }\n\n private _onMoveTargetMouseUp(evt: MouseEvent): void {\n if (this._isMoving) {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_END);\n }\n this._moveComplete();\n }\n\n private _moveComplete(): void {\n this._adapter.tryRestoreActiveElement();\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n this._lastPosition = undefined;\n this._moveContext = undefined;\n this._isMoving = false;\n }\n\n private _onDocumentKeydown(evt: KeyboardEvent): void {\n evt.stopPropagation();\n if (evt.key && (evt.key === 'Escape' || evt.key === 'Esc')) {\n this._tryClose();\n }\n }\n\n private _onBackdropClick(evt: CustomEvent): void {\n evt.stopPropagation();\n this._tryClose();\n }\n\n private async _tryClose(): Promise<void> {\n const isCancelled = !this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.BEFORE_CLOSE, undefined, undefined, true);\n if (isCancelled) {\n return;\n }\n\n if (!this._beforeCloseCallback) {\n this.open = false;\n return;\n }\n\n try {\n const shouldClose = await Promise.resolve(this._beforeCloseCallback()) !== false;\n if (shouldClose) {\n this.open = false;\n return;\n }\n } catch (err) {\n return;\n }\n }\n\n private _setBackdropClickListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && this._backdropClose) {\n this._adapter.registerBackdropClickHandler(this._backdropClickHandler);\n } else if (!attach) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private _setDocumentKeydownListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && this._escapeClose) {\n this._adapter.setDocumentListener('keydown', this._documentKeydownHandler);\n } else if (!attach) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n }\n\n private _calculateOffsetPosition(pageX: number, pageY: number, context?: IDialogMoveContext): { x: number; y: number } {\n return {\n x: pageX - (context?.left || 0),\n y: pageY - (context?.top || 0)\n };\n }\n\n private _clampPosition({ x, y }: { x: number; y: number }, context?: IDialogMoveContext): { x: number; y: number } {\n let width = 0;\n let height = 0;\n\n if (context) {\n width = context.width;\n height = context.height;\n }\n\n if (x <= 0) {\n x = 0;\n } else if (x + width >= window.innerWidth) {\n x = window.innerWidth - width;\n }\n\n if (y <= 0) {\n y = 0;\n } else if (y + height >= window.innerHeight) {\n y = window.innerHeight - height;\n }\n\n return { x, y };\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. */\n public set backdropClose(value: boolean) {\n value = Boolean(value);\n if (this._backdropClose !== value) {\n this._backdropClose = value;\n\n this._setBackdropClickListener(this._backdropClose);\n\n if (isDefined(this._backdropClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE);\n }\n }\n }\n public get backdropClose(): boolean {\n return this._backdropClose;\n }\n\n /** Controls whether pressing the escape key closes the dialog or not. */\n public set escapeClose(value: boolean) {\n value = Boolean(value);\n if (this._escapeClose !== value) {\n this._escapeClose = value;\n this._setDocumentKeydownListener(this._escapeClose);\n if (isDefined(this._escapeClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE);\n }\n }\n }\n public get escapeClose(): boolean {\n return this._escapeClose;\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n value = Boolean(value);\n if (value !== this._open) {\n this._applyOpen(value);\n }\n }\n }\n\n public get fullscreen(): boolean {\n return this._fullscreen;\n }\n public set fullscreen(value: boolean) {\n if (this._fullscreen !== value) {\n this._fullscreen = value;\n this._adapter.setFullscreen(this._fullscreen);\n }\n }\n\n public get openCallback(): DialogStateCallback {\n return this._openCallback;\n }\n public set openCallback(callback: DialogStateCallback) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): DialogStateCallback {\n return this._closeCallback;\n }\n public set closeCallback(callback: DialogStateCallback) {\n this._closeCallback = callback;\n }\n\n public get beforeCloseCallback(): DialogStateCallback {\n return this._beforeCloseCallback;\n }\n public set beforeCloseCallback(callback: DialogStateCallback) {\n this._beforeCloseCallback = callback;\n }\n\n public get positionType(): DialogPositionType {\n return this._positionType;\n }\n public set positionType(value: DialogPositionType) {\n if (this._positionType !== value) {\n this._positionType = value;\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionX(): number | string | null | undefined {\n return this._positionX;\n }\n public set positionX(value: number | string | null | undefined) {\n if (this._positionX !== value) {\n this._positionX = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionY(): number | string | null | undefined {\n return this._positionY;\n }\n public set positionY(value: number | string | null | undefined) {\n if (this._positionY !== value) {\n this._positionY = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get moveable(): boolean {\n return this._moveable;\n }\n public set moveable(value: boolean) {\n if (this._moveable !== value) {\n this._moveable = value;\n if (this._open) {\n this._adapter.setMoveable(this._moveable);\n if (this._moveable) {\n this._initMoveTarget();\n } else {\n this._removeDragHandlers();\n this._isMoving = false;\n }\n }\n }\n }\n\n public get moveTarget(): string {\n return this._moveTarget;\n }\n public set moveTarget(value: string) {\n this._moveTarget = value;\n }\n}\n", "import { getShadowElement, removeElement, deepQuerySelectorAll, getActiveElement, toggleClass } from '@tylertech/forge-core';\nimport { BACKDROP_CONSTANTS, IBackdropComponent } from '../backdrop';\nimport { CHECKBOX_CONSTANTS } from '../checkbox';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { ICON_BUTTON_CONSTANTS } from '../icon-button';\nimport { RADIO_CONSTANTS } from '../radio';\nimport { SWITCH_CONSTANTS } from '../switch';\nimport { IDialogComponent } from './dialog';\nimport { DialogPositionType, DIALOG_CONSTANTS } from './dialog-constants';\n\nexport interface IDialogAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n setAnimating(animating: boolean): void;\n setVisibility(visible: boolean): void;\n attach(parent?: HTMLElement): void;\n detach(): void;\n setDocumentListener(type: string, listener: (evt: Event) => void): void;\n removeDocumentListener(type: string, listener: (evt: Event) => void): void;\n registerTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n deregisterTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n registerBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n deregisterBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n getOpenDialogs: (selector: string) => NodeListOf<HTMLElement>;\n setBodyAttribute: (name: string, value: string) => void;\n removeBodyAttribute: (name: string) => void;\n trySetInitialFocus: () => void;\n isScrollable(): boolean;\n addRootClass(name: string): void;\n setFullscreen(value: boolean): void;\n setMoveable(value: boolean): void;\n tryLayoutChildren(): void;\n setMoveTarget(selector: string): boolean;\n setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n getSurfaceBounds(): DOMRect;\n setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void;\n captureActiveElement(): void;\n tryRestoreActiveElement(): void;\n}\n\n/**\n * Provides facilities for interacting with the internal DOM of `DialogComponent`.\n */\nexport class DialogAdapter extends BaseAdapter<IDialogComponent> implements IDialogAdapter {\n private _backdropElement?: IBackdropComponent;\n private _containerElement: HTMLElement;\n private _surfaceElement: HTMLElement;\n private _moveTargetElement: HTMLElement | null;\n private _activeElement: HTMLElement | undefined;\n\n constructor(component: IDialogComponent) {\n super(component);\n this._containerElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.CONTAINER);\n this._surfaceElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.SURFACE);\n }\n\n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'dialog');\n }\n this._component.setAttribute('aria-modal', 'true');\n }\n\n public setAnimating(animating: boolean): void {\n toggleClass(this._containerElement, animating, DIALOG_CONSTANTS.classes.ANIMATING);\n }\n\n public setVisibility(visible: boolean): void {\n toggleClass(this._containerElement, visible, DIALOG_CONSTANTS.classes.OPEN);\n\n if (!this._backdropElement) {\n this._backdropElement = document.createElement('forge-backdrop');\n this._backdropElement.setAttribute('part', 'scrim');\n this._containerElement.appendChild(this._backdropElement);\n }\n \n if (visible) {\n this._backdropElement.fadeIn();\n } else {\n this._backdropElement.fadeOut();\n }\n }\n\n public attach(parent: HTMLElement = document.body): void {\n parent.appendChild(this._component);\n }\n\n public detach(): void {\n if (this._activeElement) {\n this._activeElement = undefined;\n }\n removeElement(this._component);\n }\n\n public registerTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.addEventListener('transitionend', handler);\n }\n\n public deregisterTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.removeEventListener('transitionend', handler);\n }\n\n public setDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.addEventListener(type, listener);\n }\n\n public removeDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.removeEventListener(type, listener);\n }\n\n public registerBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement?.addEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public deregisterBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement?.removeEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public getOpenDialogs(selector: string): NodeListOf<HTMLElement> {\n return document.querySelectorAll(selector);\n }\n\n public setBodyAttribute(name: string, value: string): void {\n document.body.setAttribute(name, value);\n }\n\n public removeBodyAttribute(name: string): void {\n document.body.removeAttribute(name);\n }\n\n public trySetInitialFocus(): void {\n const elements = deepQuerySelectorAll(this._component, DIALOG_CONSTANTS.selectors.INITIAL_FOCUS);\n if (elements && elements.length) {\n const initialElement = elements[elements.length - 1] as HTMLElement;\n initialElement.focus();\n }\n }\n\n public isScrollable(): boolean {\n const contentElement = this._component.querySelector(DIALOG_CONSTANTS.selectors.CONTENT) as HTMLElement;\n if (contentElement) {\n return contentElement.scrollHeight > contentElement.offsetHeight;\n }\n return false;\n }\n\n public addRootClass(name: string): void {\n this._component.classList.add(name);\n }\n\n public setFullscreen(value: boolean): void {\n toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.FULLSCREEN);\n }\n\n public setMoveable(value: boolean): void {\n toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.MOVEABLE);\n }\n\n public tryLayoutChildren(): void {\n const layoutChildren = [ICON_BUTTON_CONSTANTS.elementName, SWITCH_CONSTANTS.elementName, CHECKBOX_CONSTANTS.elementName, RADIO_CONSTANTS.elementName];\n const commonLayoutElements = Array.from(this._component.querySelectorAll(layoutChildren.join(','))) as any[];\n commonLayoutElements.filter(el => typeof el.layout === 'function').forEach(el => el.layout());\n }\n\n public setMoveTarget(selector: string): boolean {\n if (!selector) {\n return false;\n }\n this._moveTargetElement = this._component.querySelector(selector);\n return !!this._moveTargetElement;\n }\n\n public setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._moveTargetElement?.addEventListener(type, listener);\n }\n\n public removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._moveTargetElement?.removeEventListener(type, listener);\n }\n\n public getSurfaceBounds(): DOMRect {\n return this._surfaceElement.getBoundingClientRect() as DOMRect;\n }\n\n public setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void {\n if (positionType) {\n this._surfaceElement.style.position = positionType === 'absolute' ? positionType : 'relative';\n } else {\n this._surfaceElement.style.removeProperty('position');\n }\n\n if (y !== null) {\n this._surfaceElement.style.top = y;\n } else {\n this._surfaceElement.style.removeProperty('top');\n }\n\n if (x !== null) {\n this._surfaceElement.style.left = x;\n } else {\n this._surfaceElement.style.removeProperty('left');\n }\n }\n\n public captureActiveElement(): void {\n this._activeElement = getActiveElement() as HTMLElement;\n this._activeElement?.blur();\n }\n\n public tryRestoreActiveElement(): void {\n if (this._activeElement) {\n if (this._activeElement.isConnected) {\n this._activeElement.focus();\n }\n this._activeElement = undefined;\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport { DialogFoundation } from './dialog-foundation';\nimport { DialogAdapter } from './dialog-adapter';\nimport { DIALOG_CONSTANTS, DialogPositionType, IDialogMoveStartEventData, IDialogMoveEventData, DialogStateCallback } from './dialog-constants';\nimport { BackdropComponent } from '../backdrop';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-dialog\\\" part=\\\"root\\\"><div class=\\\"forge-dialog__surface\\\" part=\\\"surface\\\"><slot></slot></div></div></template>';\nconst styles = '.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}';\n\nexport interface IDialogComponent extends IBaseComponent {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: () => boolean | Promise<boolean>;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n show(parent?: HTMLElement): Promise<void>;\n hide(remove?: boolean): Promise<void>;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-dialog': IDialogComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-dialog-before-close': CustomEvent<void>;\n 'forge-dialog-open': CustomEvent<void>;\n 'forge-dialog-close': CustomEvent<void>;\n 'forge-dialog-ready': CustomEvent<void>;\n 'forge-dialog-move-start': CustomEvent<IDialogMoveStartEventData>;\n 'forge-dialog-move': CustomEvent<IDialogMoveEventData>;\n 'forge-dialog-move-end': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-dialog>` custom element.\n * \n * @tag forge-dialog\n */\n@CustomElement({\n name: DIALOG_CONSTANTS.elementName,\n dependencies: [BackdropComponent]\n})\nexport class DialogComponent extends BaseComponent implements IDialogComponent {\n public static get observedAttributes(): string[] {\n return [\n DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE,\n DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE,\n DIALOG_CONSTANTS.attributes.OPEN,\n DIALOG_CONSTANTS.attributes.FULLSCREEN,\n DIALOG_CONSTANTS.attributes.POSITION_TYPE,\n DIALOG_CONSTANTS.attributes.POSITION_X,\n DIALOG_CONSTANTS.attributes.POSITION_Y,\n DIALOG_CONSTANTS.attributes.MOVEABLE,\n DIALOG_CONSTANTS.attributes.MOVE_TARGET\n ];\n }\n\n private _foundation: DialogFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new DialogFoundation(new DialogAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE:\n this.backdropClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE:\n this.escapeClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.FULLSCREEN:\n this.fullscreen = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_TYPE:\n this.positionType = newValue as DialogPositionType;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_X:\n this.positionX = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_Y:\n this.positionY = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.MOVEABLE:\n this.moveable = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.MOVE_TARGET:\n this.moveTarget = newValue;\n break;\n }\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. Default is true. */\n @FoundationProperty()\n public backdropClose: boolean;\n\n /** Controls whether pressing the escape key closes the dialog or not. Default is true. */\n @FoundationProperty()\n public escapeClose: boolean;\n\n /** Controls whether the dialog is open or not. Default is false. */\n @FoundationProperty()\n public open: boolean;\n\n /** Controls whether the dialog is full screen or not. Default is false. */\n @FoundationProperty()\n public fullscreen: boolean;\n\n /** The function to call when the dialog wants to open. */\n @FoundationProperty()\n public openCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public closeCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public beforeCloseCallback: () => boolean | Promise<boolean>;\n\n /** Gets/sets the position type when using custom positioning values. Default is 'absolute'. */\n @FoundationProperty()\n public positionType: DialogPositionType;\n\n /** Controls the horizontal position of the dialog surface. */\n @FoundationProperty()\n public positionX: number | string | null | undefined;\n\n /** Controls the vertical position of the dialog surface. */\n @FoundationProperty()\n public positionY: number | string | null | undefined;\n\n /** Gets/sets whether the dialog surface can be moved or not. */\n @FoundationProperty()\n public moveable: boolean;\n\n /** Gets/sets the selector used to target the element that is used as the drag target. */\n @FoundationProperty()\n public moveTarget: string;\n\n public initializeMoveTarget(): void {\n this._foundation.initializeMoveTarget();\n }\n\n public resetPosition(): void {\n this._foundation.resetPosition();\n }\n\n public show(parent?: HTMLElement): Promise<void> {\n return this._foundation.show(parent);\n }\n public hide(remove?: boolean): Promise<void> {\n return this._foundation.hide(remove);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { DialogComponent } from './dialog';\n\nexport * from './dialog-adapter';\nexport * from './dialog-constants';\nexport * from './dialog-foundation';\nexport * from './dialog';\n\nexport function defineDialogComponent(): void {\n defineCustomElement(DialogComponent);\n}\n"],
|
|
5
|
-
"mappings": "qlBAGA,GAAM,GAA2C,GAAG,UAE9C,EAAU,CACd,UAAW,0BACX,KAAM,qBACN,cAAe,+BACf,YAAa,qBACb,WAAY,2BACZ,WAAY,2BACZ,SAAU,wBACZ,EAEM,EAAa,CACjB,eAAgB,iBAChB,aAAc,eACd,WAAY,aACZ,cAAe,gBACf,WAAY,aACZ,WAAY,aACZ,SAAU,WACV,YAAa,cACb,KAAM,oBACN,cAAe,qBACf,oBAAqB,0BACvB,EAEM,EAAY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AAAO,sBAA6B,CAClC,KAAK,YAAY,qBAAqB,CACxC,CAEA,AAAO,eAAsB,CAC3B,KAAK,YAAY,cAAc,CACjC,CAEA,AAAO,KAAK,EAAqC,CAC/C,MAAO,MAAK,YAAY,KAAK,CAAM,CACrC,CACA,AAAO,KAAK,EAAiC,CAC3C,MAAO,MAAK,YAAY,KAAK,CAAM,CACrC,CACF,EA5DS,GADP,AAAC,EAAmB,GACb,AAjEI,EAiEJ,6BAIA,GADP,AAAC,EAAmB,GACb,AArEI,EAqEJ,2BAIA,GADP,AAAC,EAAmB,GACb,AAzEI,EAyEJ,oBAIA,GADP,AAAC,EAAmB,GACb,AA7EI,EA6EJ,0BAIA,GADP,AAAC,EAAmB,GACb,AAjFI,EAiFJ,4BAIA,GADP,AAAC,EAAmB,GACb,AArFI,EAqFJ,6BAIA,GADP,AAAC,EAAmB,GACb,AAzFI,EAyFJ,mCAIA,GADP,AAAC,EAAmB,GACb,AA7FI,EA6FJ,4BAIA,GADP,AAAC,EAAmB,GACb,AAjGI,EAiGJ,yBAIA,GADP,AAAC,EAAmB,GACb,AArGI,EAqGJ,yBAIA,GADP,AAAC,EAAmB,GACb,AAzGI,EAyGJ,wBAIA,GADP,AAAC,EAAmB,GACb,AA7GI,EA6GJ,0BA7GI,EAAN,GAJP,AAAC,EAAc,CACb,KAAM,EAAiB,YACvB,aAAc,CAAC,CAAiB,CAClC,CAAC,GACY,GC9CN,aAAuC,CAC5C,EAAoB,CAAe,CACrC",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b as Y}from"./chunk.E37HEAJ5.js";import{f as Z}from"./chunk.QXLPBYMX.js";import{m as B}from"./chunk.LZMYHIO2.js";import{d as W,l as X}from"./chunk.YAJT3P6V.js";import{s as U,u as C,v as m}from"./chunk.KYCC3C3M.js";import{b as x}from"./chunk.GVQVA7P3.js";import{a as K}from"./chunk.A23NSEWA.js";import{a as d}from"./chunk.B3IJU6XJ.js";import{a as H,b as z}from"./chunk.BSZ2LBJX.js";import{a as M}from"./chunk.3E5QKMHL.js";import{a as N,e as D,g as _}from"./chunk.HN4PXH3D.js";import{h as k,u as g}from"./chunk.R4NDFXVA.js";import{b as p,k as w,l as R}from"./chunk.G76HB2FK.js";import{a as f,b as h,f as l}from"./chunk.MCIQXNKY.js";var c=`${z}split-view-panel`,ae={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},oe={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},se={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,RIPPLE:`#${v.RIPPLE}`,CONTENT:`#${v.CONTENT}`},le={WILL_RESIZE:`${c}-will-resize`,RESIZE_START:`${c}-resize-start`,RESIZE_END:`${c}-resize-end`,RESIZE:`${c}-resize`,DID_OPEN:`${c}-did-open`,DID_CLOSE:`${c}-did-close`,WILL_OPEN:`${c}-will-open`,WILL_CLOSE:`${c}-will-close`},pe={RIPPLE_ACTIVATION_WAIT:200},de={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:ae,classes:oe,ids:v,selectors:se,events:le,numbers:pe,customCssProperties:de},ue=(n=>(n[n.Under=1]="Under",n[n.Active=2]="Active",n[n.Above=3]="Above",n))(ue||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function G(r,t){let e=r.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:r.getAvailableSpace(t.orientation,t.resizable),siblingSize:r.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function F(r){return h(f({},r),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function j(r,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let n=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,o=e.startPoint-a;e.resizable==="start"&&(o*=-1);let u=e.startSize-o;e.currentSize=y(u,e),r.setContentSize(e.currentSize),E(r,e,"pointer"),r.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(r,S,e),n!==e.currentSize}function q(r,t,e){if(e.startSize===void 0)return!1;let n=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=y(a,e),r.setContentSize(e.currentSize),E(r,e,"keyboard"),r.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(r,o,e),n!==e.currentSize}function J(r,t){return r.setContentSize(t.min),t.min}function Q(r,t){let e=r.getAvailableSpace(t.orientation,t.resizable),n=m(t.max,e);return r.setContentSize(n),n}function ee(r,t,e){if(e.siblingSize!==void 0){let n=e.siblingSize+t;r.setSiblingContentSize(n)}}function y(r,t){return r=Math.max(r,t.min),r=m(r,t.max,t.availableSpace),r}function E(r,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(r.activateRipple(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let n=m(t.max,t.availableSpace);return t.currentSize>=n?(t.isAtMax||(r.activateRipple(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&r.setBodyCursor(t.orientation),!1)}function te(r,t,e){if(t<=e.min)return r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let n=m(e.max,e.availableSpace);return t>=n?(r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(r.setHandleCursor(e.orientation),!1)}function P(r,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return C(r,t.min,e)}function O(r,t){if(r==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ie(r){return r==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(r){let t=r.resizable;if(t==="off")return;let e=r;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function ce(r){var o,u;if(!isNaN(+r))return{amount:+r,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=r.match(t),n=e!=null&&e[1]?+e[1]:-1,a=(u=(o=e==null?void 0:e[2])==null?void 0:o.toLowerCase())!=null?u:"";return{amount:n,unit:a}}function b(r,t){let e=ce(r);return e.unit==="%"?U(e.amount,t):e.amount}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=$();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){!this._appliedAllowClose||(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){q(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=G(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=F(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,n=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:n};!this._adapter.emitHostEvent(a,o,!0,!0)||(this._open=t,this._applyOpen(o))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let n=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=n,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let n=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,n),o=C(e,this._pixelMin,a);this._adapter.setValuenow(o),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=b(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var n;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(n=this._max)==null?void 0:n.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=b(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=y(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=b(this._min,a),this._pixelMax=p(this._max)?b(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),n=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=P(e,h(f({},this._state),{availableSpace:n}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:n})),t.clearCursor&&this._adapter.setHandleCursor()}};var me=`${z}split-view`,be={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},fe={ROOT:"forge-split-view"},ne={ROOT:"root"},he={ROOT:`#${ne.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},ve={ANIMATING_LAYER:"--forge-split-view-animating-layer"},re={elementName:me,attributes:be,classes:fe,ids:ne,selectors:he,numbers:_e,customCssProperties:ve};var A=class extends K{constructor(e){super(e);this._root=_(e,i.selectors.ROOT),this._handle=_(e,i.selectors.HANDLE),this._icon=_(e,i.selectors.ICON),this._ripple=_(e,i.selectors.RIPPLE),this._content=_(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===re.elementName&&(this._parent=e)}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var n;return(n=this._parent)==null?void 0:n[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ie(e))}setOpen(e,n=!0,a){var u,S;let o=()=>{var V,T;e||this._root.classList.add(i.classes.CLOSED),a&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,a),(V=this._parent)==null||V.unlayerSlottedPanels(),(T=this._parent)==null||T.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!n){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),k(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!n){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var n;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),(n=this._parent)==null||n.update({clearCursor:!0}),e||document.body.style.removeProperty("cursor")}setHandleCursor(e,n){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,n)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,n){document.body.style.setProperty("cursor",O(e,n))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,n){if(n==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var n;let e=I(this._component);return(n=e==null?void 0:e.getContentSize())!=null?n:0}setSiblingContentSize(e){let n=I(this._component);n==null||n.setContentSize(e)}activateRipple(e){e?(this._ripple.deactivate(),window.setTimeout(()=>{this._ripple.activate()},i.numbers.RIPPLE_ACTIVATION_WAIT)):(this._ripple.activate(),this._ripple.deactivate())}deactivateRipple(){this._ripple.deactivate()}getParentSize(e){var a,o;let n=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return n!=null?n:0}updateParent(e){var n;(n=this._parent)==null||n.update(e)}};var we='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-ripple id="ripple" part="ripple"></forge-ripple></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',Se='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ul3ec85;animation-name:ul3ec85;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ul3ec85{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ul3ec85{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ul3ec8z;animation-name:ul3ec8z;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ul3ec8z{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ul3ec8z{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ul3ec9t;animation-name:ul3ec9t;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ul3ec9t{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ul3ec9t{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:ul3eca1;animation-name:ul3eca1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ul3eca1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ul3eca1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ul3ecaa;animation-name:ul3ecaa;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ul3ecaa{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ul3ecaa{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ul3ecaz;animation-name:ul3ecaz;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes ul3ecaz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ul3ecaz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:ul3ecbk;animation-name:ul3ecbk;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ul3ecbk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ul3ecbk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:ul3ecch;animation-name:ul3ecch;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes ul3ecch{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ul3ecch{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}',s=class extends M{constructor(){super();W.define([Y,B]),D(this,we,Se),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,n,a){switch(e){case i.attributes.RESIZABLE:this.resizable=a;break;case i.attributes.SIZE:this.size=a;break;case i.attributes.MIN:this.min=a;break;case i.attributes.MAX:a?this.max=a:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case i.attributes.OPEN:this.open=w(a);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=w(a):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=w(a):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=w(a):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=R(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[X,Z]})],s);function ft(){N(s)}export{i as a,ue as b,$ as c,G as d,F as e,j as f,q as g,J as h,Q as i,ee as j,y as k,E as l,te as m,P as n,O as o,ie as p,I as q,ce as r,b as s,L as t,re as u,A as v,s as w,ft as x};
|
|
7
|
-
//# sourceMappingURL=chunk.YK2PXI6D.js.map
|