@tylertech/forge 2.23.1 → 2.24.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/custom-elements.json +2566 -2546
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/chunks/{chunk.GRBFFU4E.js → chunk.36RT7UOR.js} +2 -2
- package/dist/esm/chunks/{chunk.4J7MOJUW.js → chunk.4QVF44G5.js} +2 -2
- package/dist/esm/chunks/{chunk.PQNQULWB.js → chunk.5KU2NSKM.js} +2 -2
- package/dist/esm/chunks/{chunk.JNWAGZFT.js → chunk.EPFMWAIO.js} +2 -2
- package/dist/esm/chunks/{chunk.WPF4OVWD.js → chunk.HSUOYMJT.js} +2 -2
- package/dist/esm/chunks/{chunk.6RJ6NEKJ.js → chunk.HVYDNI2O.js} +2 -2
- package/dist/esm/chunks/{chunk.UYR2C32R.js → chunk.IPQDOSLO.js} +2 -2
- package/dist/esm/chunks/{chunk.5SGTPCLX.js → chunk.K2O3KSP7.js} +2 -2
- package/dist/esm/chunks/{chunk.P6C3463W.js → chunk.LJQO5G5I.js} +2 -2
- package/dist/esm/chunks/{chunk.UE4KJ2BZ.js → chunk.LZOAYM6V.js} +2 -2
- package/dist/esm/chunks/chunk.MA2P7CG4.js +7 -0
- package/dist/esm/chunks/chunk.MA2P7CG4.js.map +7 -0
- package/dist/esm/chunks/{chunk.OC3NNLIP.js → chunk.MSOMQ4HD.js} +2 -2
- package/dist/esm/chunks/{chunk.VXCPWDOQ.js → chunk.OLNY6ZNB.js} +2 -2
- package/dist/esm/chunks/{chunk.VXCPWDOQ.js.map → chunk.OLNY6ZNB.js.map} +3 -3
- package/dist/esm/chunks/{chunk.M5SV3NKJ.js → chunk.PTEWJ5PZ.js} +2 -2
- package/dist/esm/chunks/{chunk.3M6GHBEY.js → chunk.QRWYYBZC.js} +2 -2
- package/dist/esm/chunks/chunk.U5DETNRU.js +7 -0
- package/dist/esm/chunks/chunk.U5DETNRU.js.map +7 -0
- package/dist/esm/chunks/chunk.U7SENURF.js +7 -0
- package/dist/esm/chunks/chunk.U7SENURF.js.map +7 -0
- package/dist/esm/chunks/{chunk.UNPZKZ23.js → chunk.VUHUEAJD.js} +2 -2
- package/dist/esm/chunks/{chunk.UNPZKZ23.js.map → chunk.VUHUEAJD.js.map} +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/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/table/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.d.ts +2 -2
- package/esm/app-bar/notification-button/app-bar-notification-button-adapter.js +1 -1
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.d.ts +3 -3
- package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +12 -4
- package/esm/app-bar/notification-button/app-bar-notification-button.d.ts +2 -2
- package/esm/app-bar/notification-button/app-bar-notification-button.js +2 -2
- package/esm/list/list-item/list-item-foundation.d.ts +2 -0
- package/esm/list/list-item/list-item-foundation.js +4 -0
- package/esm/list/list-item/list-item.d.ts +2 -0
- package/esm/list/list-item/list-item.js +3 -0
- package/esm/menu/menu-foundation.js +0 -5
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/table/table-foundation.js +10 -1
- package/package.json +1 -1
- package/dist/esm/chunks/chunk.E6FHH3CM.js +0 -7
- package/dist/esm/chunks/chunk.E6FHH3CM.js.map +0 -7
- package/dist/esm/chunks/chunk.P45M3ZLT.js +0 -7
- package/dist/esm/chunks/chunk.P45M3ZLT.js.map +0 -7
- package/dist/esm/chunks/chunk.QWB7A62L.js +0 -7
- package/dist/esm/chunks/chunk.QWB7A62L.js.map +0 -7
- /package/dist/esm/chunks/{chunk.GRBFFU4E.js.map → chunk.36RT7UOR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4J7MOJUW.js.map → chunk.4QVF44G5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PQNQULWB.js.map → chunk.5KU2NSKM.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JNWAGZFT.js.map → chunk.EPFMWAIO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WPF4OVWD.js.map → chunk.HSUOYMJT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6RJ6NEKJ.js.map → chunk.HVYDNI2O.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UYR2C32R.js.map → chunk.IPQDOSLO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5SGTPCLX.js.map → chunk.K2O3KSP7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.P6C3463W.js.map → chunk.LJQO5G5I.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UE4KJ2BZ.js.map → chunk.LZOAYM6V.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OC3NNLIP.js.map → chunk.MSOMQ4HD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M5SV3NKJ.js.map → chunk.PTEWJ5PZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3M6GHBEY.js.map → chunk.QRWYYBZC.js.map} +0 -0
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as t}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as t}from"./chunk.LZOAYM6V.js";import{a as r}from"./chunk.KTGSZEAG.js";import{l}from"./chunk.LJLEPTLU.js";import{k as p,l as s}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var e=class extends l{constructor(){super()}attributeChangedCallback(a,u,i){switch(a){case t.attributes.POPUP_CLASSES:this.popupClasses=i;break;case t.attributes.OPTION_LIMIT:this.optionLimit=s(i);break;case t.attributes.OBSERVE_SCROLL:this.observeScroll=p(i);break;case t.attributes.OBSERVE_SCROLL_THRESHOLD:this.observeScrollThreshold=s(i);break;case t.attributes.SYNC_POPUP_WIDTH:this.syncPopupWidth=p(i);break;case t.attributes.CONSTRAIN_POPUP_WIDTH:this.constrainPopupWidth=p(i);break;case t.attributes.WRAP_OPTION_TEXT:this.wrapOptionText=p(i);break}}};o([r()],e.prototype,"popupClasses",2),o([r()],e.prototype,"popupHeaderBuilder",2),o([r()],e.prototype,"popupFooterBuilder",2),o([r()],e.prototype,"syncPopupWidth",2),o([r()],e.prototype,"optionLimit",2),o([r()],e.prototype,"observeScroll",2),o([r()],e.prototype,"observeScrollThreshold",2),o([r()],e.prototype,"constrainPopupWidth",2),o([r()],e.prototype,"wrapOptionText",2);export{e as a};
|
|
7
|
+
//# sourceMappingURL=chunk.PTEWJ5PZ.js.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as s,f as D,g as L,h as y}from"./chunk.
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as s,f as D,g as L,h as y}from"./chunk.36RT7UOR.js";import{b as A}from"./chunk.SGTKZRDH.js";import{d as C}from"./chunk.AITARMT3.js";import{b as N}from"./chunk.WEE3TIAW.js";import{c as b}from"./chunk.4QVF44G5.js";import{e as E}from"./chunk.MA2P7CG4.js";import{d as f}from"./chunk.B3LPXCVL.js";import{b as x}from"./chunk.EOZITZSP.js";import{e as v}from"./chunk.WCSVKQR2.js";import{a as S}from"./chunk.HDHGU4L2.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as _,b as h}from"./chunk.DL7NX432.js";import{a as u,e as T}from"./chunk.LJLEPTLU.js";import{k as g}from"./chunk.J2M2MXP2.js";import{a as m,f as a}from"./chunk.MCIQXNKY.js";var O=`${h}select-dropdown`,w={TARGET:"target",SELECTED_TEXT_TARGET:"selected-text-target",SYNC_SELECTED_TEXT:"sync-selected-text"},B=m({},w),M={SCROLLED_BOTTOM:`${O}-scrolled-bottom`},o={elementName:O,attributes:B,events:M};var l=class extends D{constructor(t){super(t);this._syncSelectedText=!1;this._originalTargetText="";this._targetDisconnectedListener=()=>this._onTargetDisconnected()}initialize(){this._tryAttach(),super.initialize()}disconnect(){super.disconnect(),this._adapter.isAttached()&&this._detach()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_applyValue(t){super._applyValue(t),this._applySelection()}_applySelection(){if(super._applySelection(),this._syncSelectedText||typeof this._selectedTextBuilder=="function"){let t=this._getSelectedText();t||(t=this._originalTargetText),this._adapter.setTargetText(t||"",this._selectedTextTarget)}}_tryAttach(){this._adapter.attach(this._target),this._adapter.isAttached()&&(this._targetDisconnectedDestructor=this._adapter.setTargetDisconnectedListener(this._targetDisconnectedListener),this._originalTargetText=this._adapter.getTargetText(this._selectedTextTarget),this.initializeTarget())}_detach(){this._adapter.detach(),this._targetDisconnectedDestructor&&(this._targetDisconnectedDestructor(),this._targetDisconnectedDestructor=void 0)}_onTargetDisconnected(){this._adapter.detach()}get target(){return this._target}set target(t){this._target!==t&&(this._target=t,this._adapter.isAttached()&&this._detach(),this._tryAttach())}get selectedTextTarget(){return this._selectedTextTarget}set selectedTextTarget(t){this._selectedTextTarget!==t&&(this._selectedTextTarget=t)}get syncSelectedText(){return this._syncSelectedText}set syncSelectedText(t){this._syncSelectedText!==t&&(this._syncSelectedText=t)}};var d=class extends y{constructor(e){super(e)}initializeAccessibility(){this._targetElement.setAttribute("role","listbox"),this._targetElement.setAttribute("aria-live","polite"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false")}addClickListener(e){this._targetElement.addEventListener("click",e)}removeClickListener(e){this._targetElement&&this._targetElement.removeEventListener("click",e)}addTargetListener(e,t){let i,r;e==="keydown"&&(i=!1,r=!0),this._targetElement.addEventListener(e,t,{passive:i,capture:r})}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}updateActiveDescendant(e){e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant")}open(e){super.open(e),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._targetElement.setAttribute("aria-expanded","true")}close(){this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-controls"),super.close()}attach(e){let r=(this._component.getRootNode()||HTMLDocument||this._component.ownerDocument||document).querySelector(e);r&&(this._targetElement=r)}detach(){this._targetElement=void 0}setMultiple(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-multiselectable","true"):this._targetElement.removeAttribute("aria-multiselectable"))}setTargetDisconnectedListener(e){if(!this._targetElement||!this._targetElement.parentElement)return()=>{};let t=new MutationObserver(i=>{i.some(I=>Array.from(I.removedNodes).some(R=>R===this._targetElement))&&(t.disconnect(),e())});return t.observe(this._targetElement.parentElement,{childList:!0}),()=>t.disconnect()}isAttached(){return!!this._targetElement}setTargetText(e,t){let i=this._targetElement;if(t){let r=this._getElementBySelector(t);r&&(i=r)}i&&(i.textContent=e)}getTargetText(e){let t=e?this._getElementBySelector(e):this._targetElement;return t?t.innerText:""}_getElementBySelector(e){return this._targetElement.querySelector(e)||this._getRootNode().querySelector(e)}_getRootNode(){return this._component.getRootNode()||this._component.ownerDocument||document}};var P="<template></template>",H=":host{display:none}",n=class extends L{constructor(){super();T(this,P,H),this._foundation=new l(new d(this))}static get observedAttributes(){return[o.attributes.TARGET,o.attributes.SELECTED_TEXT_TARGET,o.attributes.SYNC_SELECTED_TEXT,s.attributes.VALUE,s.attributes.MULTIPLE,s.attributes.OBSERVE_SCROLL,s.attributes.OBSERVE_SCROLL_THRESHOLD,s.attributes.POPUP_CLASSES,s.attributes.OPTION_LIMIT,s.attributes.SYNC_POPUP_WIDTH]}attributeChangedCallback(t,i,r){switch(t){case o.attributes.TARGET:this.target=r;return;case o.attributes.SELECTED_TEXT_TARGET:this.selectedTextTarget=r;return;case o.attributes.SYNC_SELECTED_TEXT:this.syncSelectedText=g(r);return}super.attributeChangedCallback(t,i,r)}};a([c()],n.prototype,"target",2),a([c()],n.prototype,"selectedTextTarget",2),a([c()],n.prototype,"syncSelectedText",2),n=a([_({name:o.elementName,dependencies:[C,A,v,b,E,f,N,x,S]})],n);function pt(){u(n)}export{o as a,l as b,d as c,n as d,pt as e};
|
|
7
|
+
//# sourceMappingURL=chunk.QRWYYBZC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as u,d as A}from"./chunk.BNIUTBJV.js";import{a as E}from"./chunk.HDHGU4L2.js";import{y as I}from"./chunk.MZLPUI6R.js";import{d as O}from"./chunk.TEHQWMFI.js";import{a as T,d as N,l as C}from"./chunk.WHQZNZHW.js";import{a as f}from"./chunk.UWYANU5D.js";import{a as s}from"./chunk.KTGSZEAG.js";import{a as _,b as B}from"./chunk.DL7NX432.js";import{a as h,d as b,h as c,l as g}from"./chunk.LJLEPTLU.js";import{u as m}from"./chunk.4LA6HEA7.js";import{k as p}from"./chunk.J2M2MXP2.js";import{f as n}from"./chunk.MCIQXNKY.js";var r=class extends f{constructor(i){super(i)}setIcon(i){this._iconElement.name=i}initialize(){this._badgeElement=c(this._component,u.elementName),this._iconElement=c(this._component,T.elementName)}setCount(i){this._badgeElement.textContent=i!=null?String(i):""}setBadgeType(i){this._badgeElement.dot=i}setBadgeTheme(i){m(this._badgeElement,!!i,u.attributes.THEME,i)}setBadgeVisible(i){this._badgeElement.open=i}};var v=`${B}app-bar-notification-button`,x={COUNT:"count",DOT:"dot",THEME:"theme",SHOW_BADGE:"show-badge",ICON:"icon"},t={elementName:v,attributes:x};var d=class{constructor(e){this._adapter=e;this._count=0;this._dot=!1;this._showBadge=!1;this._isInitialized=!1;this._icon="notifications"}initialize(){this._adapter.initialize(),this._adapter.setCount(this._count),this._adapter.setBadgeType(this._dot),this._adapter.setBadgeTheme(this._theme),this._adapter.setBadgeVisible(this._showBadge),this._adapter.setIcon(this._icon),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._isInitialized&&(this._adapter.setIcon(this._icon),this._adapter.setHostAttribute(t.attributes.ICON,this._icon)))}get count(){return this._count}set count(e){this._count!==e&&(this._count=e,this._isInitialized&&(this._dot||this._adapter.setCount(this._count),typeof this._count=="string"?this._adapter.setHostAttribute(t.attributes.COUNT,this._count):e==null&&this._adapter.removeHostAttribute(t.attributes.COUNT)))}get dot(){return this._dot}set dot(e){this._dot!==e&&(this._dot=e,this._isInitialized&&(this._adapter.setBadgeType(this._dot),this._dot?this._adapter.setCount(null):this._adapter.setCount(this._count),this._adapter.toggleHostAttribute(t.attributes.DOT,this._dot)))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._isInitialized&&(this._adapter.setBadgeTheme(this._theme),this._adapter.setHostAttribute(t.attributes.THEME,this._theme)))}get showBadge(){return this._showBadge}set showBadge(e){this._showBadge!==e&&(this._showBadge=e,this._isInitialized&&(this._adapter.setBadgeVisible(this._showBadge),this._adapter.setHostAttribute(t.attributes.SHOW_BADGE,this._showBadge)))}};var H='<template><forge-icon-button class="forge-icon-button--with-badge"><button type="button" aria-label="Show notifications"><forge-icon></forge-icon></button><forge-tooltip delay="500" position="bottom">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>',o=class extends g{constructor(){super();N.define(I),this._foundation=new d(new r(this))}static get observedAttributes(){return[t.attributes.COUNT,t.attributes.DOT,t.attributes.THEME,t.attributes.SHOW_BADGE,t.attributes.ICON]}initializedCallback(){b(this,H)}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(i,S,a){switch(i){case t.attributes.COUNT:this.count=a;break;case t.attributes.DOT:this.dot=p(a);break;case t.attributes.THEME:this.theme=a;break;case t.attributes.ICON:this.icon=a;break;case t.attributes.SHOW_BADGE:this.showBadge=p(a);break}}};n([s()],o.prototype,"count",2),n([s()],o.prototype,"dot",2),n([s()],o.prototype,"theme",2),n([s()],o.prototype,"icon",2),n([s()],o.prototype,"showBadge",2),o=n([_({name:t.elementName,dependencies:[E,O,A,C]})],o);function nt(){h(o)}export{r as a,t as b,d as c,o as d,nt as e};
|
|
7
|
+
//# sourceMappingURL=chunk.U5DETNRU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/app-bar/notification-button/app-bar-notification-button-adapter.ts", "../../src/app-bar/notification-button/app-bar-notification-button-constants.ts", "../../src/app-bar/notification-button/app-bar-notification-button-foundation.ts", "../../src/app-bar/notification-button/app-bar-notification-button.ts", "../../src/app-bar/notification-button/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { getLightElement, toggleAttribute } from '@tylertech/forge-core';\nimport { BADGE_CONSTANTS, IBadgeComponent } from '../../badge';\nimport { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';\nimport { IAppBarNotificationButtonComponent } from './app-bar-notification-button';\nimport { ICON_CONSTANTS, IIconComponent } from '../../icon';\n\nexport interface IAppBarNotificationButtonAdapter extends IBaseAdapter {\n initialize(): void;\n setIcon(icon: string): void;\n setCount(value: string | number | null | undefined): void;\n setBadgeType(dot: boolean): void;\n setBadgeTheme(theme: string): void;\n setBadgeVisible(isVisible: boolean): void;\n}\n\nexport class AppBarNotificationButtonAdapter extends BaseAdapter<IAppBarNotificationButtonComponent> implements IAppBarNotificationButtonAdapter {\n private _badgeElement: IBadgeComponent;\n private _iconElement: IIconComponent;\n\n constructor(component: IAppBarNotificationButtonComponent) {\n super(component);\n }\n\n public setIcon(icon: string): void {\n this._iconElement.name = icon;\n }\n\n public initialize(): void {\n this._badgeElement = getLightElement(this._component, BADGE_CONSTANTS.elementName) as IBadgeComponent;\n this._iconElement = getLightElement(this._component, ICON_CONSTANTS.elementName) as IIconComponent;\n }\n\n public setCount(value: string | number | undefined | null): void {\n this._badgeElement.textContent = value != null ? String(value) : '';\n }\n\n public setBadgeType(dot: boolean): void {\n this._badgeElement.dot = dot;\n }\n\n public setBadgeTheme(theme: string): void {\n toggleAttribute(this._badgeElement, !!theme, BADGE_CONSTANTS.attributes.THEME, theme);\n }\n\n public setBadgeVisible(isVisible: boolean): void {\n this._badgeElement.open = isVisible;\n }\n}\n", "import { COMPONENT_NAME_PREFIX } from '../../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}app-bar-notification-button`;\n\nconst attributes = {\n COUNT: 'count',\n DOT: 'dot',\n THEME: 'theme',\n SHOW_BADGE: 'show-badge',\n ICON: 'icon'\n};\n\nexport const APP_BAR_NOTIFICATION_BUTTON_CONSTANTS = {\n elementName,\n attributes\n};\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IAppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\n\nexport interface IAppBarNotificationButtonFoundation extends ICustomElementFoundation {\n count: string | number | null | undefined;\n dot: boolean;\n theme: string;\n showBadge: boolean;\n icon: string;\n}\n\nexport class AppBarNotificationButtonFoundation implements IAppBarNotificationButtonFoundation {\n private _count: string | number | null | undefined = 0;\n private _dot = false;\n private _theme: string;\n private _showBadge = false;\n private _isInitialized = false;\n private _icon = 'notifications';\n\n constructor(private _adapter: IAppBarNotificationButtonAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.setCount(this._count);\n this._adapter.setBadgeType(this._dot);\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setIcon(this._icon);\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n }\n\n public get icon(): string {\n return this._icon;\n }\n public set icon(value: string) {\n if (this._icon !== value) {\n this._icon = value;\n if (this._isInitialized) {\n this._adapter.setIcon(this._icon);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON, this._icon);\n }\n }\n }\n\n public get count(): string | number | null | undefined {\n return this._count;\n }\n public set count(value: string | number | null | undefined) {\n if (this._count !== value) {\n this._count = value;\n if (this._isInitialized) {\n if (!this._dot) {\n this._adapter.setCount(this._count);\n }\n\n if (typeof this._count === 'string') {\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT, this._count);\n } else if (value == null) {\n this._adapter.removeHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT);\n }\n }\n }\n }\n\n public get dot(): boolean {\n return this._dot;\n }\n public set dot(value: boolean) {\n if (this._dot !== value) {\n this._dot = value;\n if (this._isInitialized) {\n this._adapter.setBadgeType(this._dot);\n if (this._dot) {\n this._adapter.setCount(null);\n } else {\n this._adapter.setCount(this._count);\n }\n this._adapter.toggleHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT, this._dot);\n }\n }\n }\n\n public get theme(): string {\n return this._theme;\n }\n public set theme(value: string) {\n if (this._theme !== value) {\n this._theme = value;\n if (this._isInitialized) {\n this._adapter.setBadgeTheme(this._theme);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME, this._theme);\n }\n }\n }\n\n public get showBadge(): boolean {\n return this._showBadge;\n }\n public set showBadge(value: boolean) {\n if (this._showBadge !== value) {\n this._showBadge = value;\n if (this._isInitialized) {\n this._adapter.setBadgeVisible(this._showBadge);\n this._adapter.setHostAttribute(APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE, this._showBadge as any);\n }\n }\n }\n}\n", "import { attachLightTemplate, coerceBoolean, coerceNumber, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconNotifications } from '@tylertech/tyler-icons/standard';\nimport { BadgeComponent } from '../../badge';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { IconComponent, IconRegistry } from '../../icon';\nimport { IconButtonComponent } from '../../icon-button';\nimport { TooltipComponent } from '../../tooltip';\nimport { AppBarNotificationButtonAdapter } from './app-bar-notification-button-adapter';\nimport { APP_BAR_NOTIFICATION_BUTTON_CONSTANTS } from './app-bar-notification-button-constants';\nimport { AppBarNotificationButtonFoundation } from './app-bar-notification-button-foundation';\n\nconst template = '<template><forge-icon-button class=\\\"forge-icon-button--with-badge\\\"><button type=\\\"button\\\" aria-label=\\\"Show notifications\\\"><forge-icon></forge-icon></button><forge-tooltip delay=\\\"500\\\" position=\\\"bottom\\\">Notifications</forge-tooltip><forge-badge positioned app-bar-context></forge-badge></forge-icon-button></template>';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-app-bar-notification-button': IAppBarNotificationButtonComponent;\n }\n}\n\nexport interface IAppBarNotificationButtonComponent extends IBaseComponent {\n count: string | number | null | undefined;\n dot: boolean;\n showBadge: boolean;\n theme: string;\n icon: string;\n}\n/**\n * The web component class behind the `<forge-app-bar-notification-button>` custom element.\n * \n * @tag forge-app-bar-notification-button\n */\n@CustomElement({\n name: APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.elementName,\n dependencies: [\n IconButtonComponent,\n TooltipComponent,\n BadgeComponent,\n IconComponent\n ]\n})\nexport class AppBarNotificationButtonComponent extends BaseComponent implements IAppBarNotificationButtonComponent {\n public static get observedAttributes(): string[] {\n return [\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE,\n APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON\n ];\n }\n\n private _foundation: AppBarNotificationButtonFoundation;\n\n constructor() {\n super();\n IconRegistry.define(tylIconNotifications);\n this._foundation = new AppBarNotificationButtonFoundation(new AppBarNotificationButtonAdapter(this));\n }\n\n public initializedCallback(): void {\n attachLightTemplate(this, template);\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.COUNT:\n this.count = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.DOT:\n this.dot = coerceBoolean(newValue);\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.THEME:\n this.theme = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.ICON:\n this.icon = newValue;\n break;\n case APP_BAR_NOTIFICATION_BUTTON_CONSTANTS.attributes.SHOW_BADGE:\n this.showBadge = coerceBoolean(newValue);\n break;\n }\n }\n\n @FoundationProperty()\n public declare count: string | number | null | undefined;\n\n @FoundationProperty()\n public declare dot: boolean;\n\n @FoundationProperty()\n public declare theme: string;\n\n @FoundationProperty()\n public declare icon: string;\n\n @FoundationProperty()\n public declare showBadge: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { AppBarNotificationButtonComponent } from './app-bar-notification-button';\n\nexport * from './app-bar-notification-button-adapter';\nexport * from './app-bar-notification-button-constants';\nexport * from './app-bar-notification-button-foundation';\nexport * from './app-bar-notification-button';\n\nexport function defineAppBarNotificationButtonComponent(): void {\n defineCustomElement(AppBarNotificationButtonComponent);\n}\n"],
|
|
5
|
+
"mappings": "ihBAeO,IAAMA,EAAN,cAA8CC,CAA4F,CAI/I,YAAYC,EAA+C,CACzD,MAAMA,CAAS,CACjB,CAEO,QAAQC,EAAoB,CACjC,KAAK,aAAa,KAAOA,CAC3B,CAEO,YAAmB,CACxB,KAAK,cAAgBC,EAAgB,KAAK,WAAYC,EAAgB,WAAW,EACjF,KAAK,aAAeD,EAAgB,KAAK,WAAYE,EAAe,WAAW,CACjF,CAEO,SAASC,EAAiD,CAC/D,KAAK,cAAc,YAAcA,GAAS,KAAO,OAAOA,CAAK,EAAI,EACnE,CAEO,aAAaC,EAAoB,CACtC,KAAK,cAAc,IAAMA,CAC3B,CAEO,cAAcC,EAAqB,CACxCC,EAAgB,KAAK,cAAe,CAAC,CAACD,EAAOJ,EAAgB,WAAW,MAAOI,CAAK,CACtF,CAEO,gBAAgBE,EAA0B,CAC/C,KAAK,cAAc,KAAOA,CAC5B,CACF,EC7CA,IAAMC,EAA2C,GAAGC,+BAE9CC,EAAa,CACjB,MAAO,QACP,IAAK,MACL,MAAO,QACP,WAAY,aACZ,KAAM,MACR,EAEaC,EAAwC,CACnD,YAAAH,EACA,WAAAE,CACF,ECHO,IAAME,EAAN,KAAwF,CAQ7F,YAAoBC,EAA4C,CAA5C,cAAAA,EAPpB,KAAQ,OAA6C,EACrD,KAAQ,KAAO,GAEf,KAAQ,WAAa,GACrB,KAAQ,eAAiB,GACzB,KAAQ,MAAQ,eAEiD,CAE1D,YAAmB,CACxB,KAAK,SAAS,WAAW,EACzB,KAAK,SAAS,SAAS,KAAK,MAAM,EAClC,KAAK,SAAS,aAAa,KAAK,IAAI,EACpC,KAAK,SAAS,cAAc,KAAK,MAAM,EACvC,KAAK,SAAS,gBAAgB,KAA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D,CAC9DC,EAAoBC,CAAiC,CACvD",
|
|
6
|
+
"names": ["AppBarNotificationButtonAdapter", "BaseAdapter", "component", "icon", "getLightElement", "BADGE_CONSTANTS", "ICON_CONSTANTS", "value", "dot", "theme", "toggleAttribute", "isVisible", "elementName", "COMPONENT_NAME_PREFIX", "attributes", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "AppBarNotificationButtonFoundation", "_adapter", "value", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "template", "AppBarNotificationButtonComponent", "BaseComponent", "IconRegistry", "tylIconNotifications", "AppBarNotificationButtonFoundation", "AppBarNotificationButtonAdapter", "APP_BAR_NOTIFICATION_BUTTON_CONSTANTS", "attachLightTemplate", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "IconButtonComponent", "TooltipComponent", "BadgeComponent", "IconComponent", "defineAppBarNotificationButtonComponent", "defineCustomElement", "AppBarNotificationButtonComponent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as k}from"./chunk.PTEWJ5PZ.js";import{e as V,h as B,j as H}from"./chunk.LZOAYM6V.js";import{c as x}from"./chunk.4QVF44G5.js";import{a as m,b as N}from"./chunk.MA2P7CG4.js";import{d as K}from"./chunk.B3LPXCVL.js";import{b as A}from"./chunk.P73BXRKY.js";import{e as F}from"./chunk.WCSVKQR2.js";import{d as P}from"./chunk.MZLPUI6R.js";import{d as w}from"./chunk.WHQZNZHW.js";import{a as T}from"./chunk.UWYANU5D.js";import{a as p}from"./chunk.KTGSZEAG.js";import{a as y,b as S,d as D}from"./chunk.DL7NX432.js";import{a as L,e as C}from"./chunk.LJLEPTLU.js";import{m as M}from"./chunk.4LA6HEA7.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,f as a}from"./chunk.MCIQXNKY.js";var l=`${S}menu`,G={POPUP:"forge-menu__popup",MENU:"mdc-menu"},U={TOGGLE:`.${l}__toggle,[${l}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},R={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},$={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},z={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:G,selectors:U,attributes:R,events:$,numbers:z};var u=class extends T{constructor(e){super(e);this._childMenus=new Map}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){!this._targetElement||(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new B(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,f=>{f.stopPropagation(),r(b(c({},f.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(N.elementName)):[]}};var h=class extends H{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){!this._adapter.hasTargetElement()||(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){!this._adapter.hasTargetElement()||(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){!this._adapter.hasTargetElement()||(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return V(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._mapIconToLeadingIcon(),this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=Boolean(e),this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var q="<template><slot></slot></template>",W=":host{display:inline-block}:host([hidden]){display:none}",s=class extends k{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,q,W)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([y({name:i.elementName,dependencies:[F,x,K,A]})],s);function je(){L(s)}export{i as a,u as b,h as c,s as d,je as e};
|
|
7
|
+
//# sourceMappingURL=chunk.U7SENURF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/menu/menu-constants.ts", "../../src/menu/menu-adapter.ts", "../../src/menu/menu-foundation.ts", "../../src/menu/menu.ts", "../../src/menu/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { IListDropdownOption, IListDropdownOptionGroup } from '../list-dropdown';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}menu`;\n\nconst classes = {\n POPUP: 'forge-menu__popup',\n MENU: 'mdc-menu'\n};\n\nconst selectors = {\n TOGGLE: `.${elementName}__toggle,[${elementName}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^=\"-\"])`,\n MENU_LIST: 'forge-list'\n};\n\nconst attributes = {\n OPEN: 'open',\n PLACEMENT: 'placement',\n SELECTED_INDEX: 'selected-index',\n SELECTED_VALUE: 'selected-value',\n DENSE: 'dense',\n ICON_CLASS: 'icon-class',\n PERSIST_SELECTION: 'persist-selection',\n MODE: 'mode',\n SYNC_POPUP_WIDTH: 'sync-popup-width',\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold'\n};\n\nconst events = {\n SELECT: `${elementName}-select`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n ACTIVE_CHANGE: `${elementName}-active-change`\n};\n\nconst numbers = {\n CHILD_MOUSE_LEAVE_TIMEOUT: 300,\n POPUP_MOUSE_LEAVE_TIMEOUT: 500\n};\n\nexport const MENU_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IMenuSelectEventData<T = any, K = any> {\n index: number;\n value?: T;\n parentValue?: K;\n}\n\nexport interface IMenuActiveChangeEventData {\n id: string;\n}\n\nexport interface IMenuOption<T = any> extends IListDropdownOption<T> {\n icon?: string;\n selected?: boolean;\n}\n\nexport interface IMenuOptionGroup extends IListDropdownOptionGroup {}\n\nexport type MenuOptionBuilder = (option: IMenuOption, parentElement: HTMLElement) => HTMLElement | string | void;\nexport type MenuOptionFactory = (() => Array<IMenuOption | IMenuOptionGroup>) | (() => Promise<Array<IMenuOption | IMenuOptionGroup>>);\nexport type MenuMode = 'click' | 'cascade';\n", "import { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { IMenuOption } from './index';\nimport { IMenuComponent } from './menu';\nimport { MENU_CONSTANTS, IMenuSelectEventData, IMenuOptionGroup } from './menu-constants';\nimport { IListDropdownConfig, IListDropdown, ListDropdown } from '../list-dropdown';\nimport { IListComponent, IListItemComponent, LIST_CONSTANTS, LIST_ITEM_CONSTANTS } from '../list';\n\nexport interface IMenuAdapter extends IBaseAdapter {\n getDropdownElement(): HTMLElement | null;\n initializeTarget(): void;\n initializeAccessibility(id: string): void;\n hasTargetElement(): boolean;\n addTargetListener(event: string, callback: (event: Event) => void, bubbles?: boolean): void;\n removeTargetListener(event: string, callback: (event: Event) => void): void;\n attachMenu(config: IListDropdownConfig): void;\n detachMenu(): void;\n setOptions(options: Array<IMenuOption | IMenuOptionGroup>): void;\n getActiveOptionIndex(): number;\n setActiveOption(index: number): void;\n activateFirstOption(): void;\n setCascadeTargetInactive(): void;\n propagateKey(key: string): void;\n proxyKeyboardEventToChild(evt: KeyboardEvent, id: string): void;\n toggleChildMenu(index: number, open?: boolean): void;\n focusTarget(): void;\n isTargetFocused(): boolean;\n updateActiveDescendant(id: string): void;\n isOwnElement(element: Element): boolean;\n addDropdownListener(type: string, listener: (evt: any) => void): void;\n createChildMenu(index: number, parentValue: any, openCb: (index: number) => void, closeCb: (index: number) => void, selectCb: (data: IMenuSelectEventData) => void): IMenuComponent;\n closeOtherChildMenus(excludeIndex?: number): void;\n setSelectedValues(values: any[]): void;\n}\n\nexport class MenuAdapter extends BaseAdapter<IMenuComponent> implements IMenuAdapter {\n private _targetElement: HTMLElement | null;\n private _listDropdown?: IListDropdown;\n private _childMenus = new Map<number, IMenuComponent>();\n\n constructor(component: IMenuComponent) {\n super(component);\n }\n\n public getDropdownElement(): HTMLElement | null {\n return this._listDropdown?.dropdownElement ?? null;\n }\n\n public hasTargetElement(): boolean {\n return !!this._targetElement;\n }\n\n public initializeTarget(): void {\n this._targetElement = this._component.querySelector(MENU_CONSTANTS.selectors.TOGGLE);\n if (!this._targetElement) {\n this._targetElement = this._component.firstElementChild as HTMLElement;\n }\n }\n\n public initializeAccessibility(id: string): void {\n if (!this._targetElement) {\n return;\n }\n\n this._targetElement.setAttribute('aria-atomic', 'true');\n this._targetElement.setAttribute('aria-live', 'assertive');\n this._targetElement.setAttribute('aria-haspopup', 'true');\n this._targetElement.setAttribute('aria-expanded', 'false');\n\n if (!this._targetElement.hasAttribute('aria-label')) {\n this._targetElement.setAttribute('aria-label', this._targetElement.textContent || '');\n }\n }\n\n public addTargetListener(event: string, callback: (event: Event) => void, bubbles = false): void {\n if (this._targetElement) {\n this._targetElement.addEventListener(event, callback, bubbles);\n }\n }\n\n public removeTargetListener(event: string, callback: (event: Event) => void): void {\n if (this._targetElement) {\n this._targetElement.removeEventListener(event, callback);\n }\n }\n\n public attachMenu(config: IListDropdownConfig): void {\n if (this._listDropdown || !this._targetElement) {\n return;\n }\n this._listDropdown = new ListDropdown(this._targetElement as HTMLElement, config);\n this._listDropdown.open();\n this._targetElement.setAttribute('aria-expanded', 'true');\n this._targetElement.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);\n }\n\n public setOptions(options: Array<IMenuOption | IMenuOptionGroup>): void {\n if (this._listDropdown) {\n this._listDropdown.setOptions(options);\n }\n }\n\n public detachMenu(): void {\n if (this._targetElement) {\n this._targetElement.removeAttribute('aria-activedescendant');\n this._targetElement.removeAttribute('aria-expanded');\n this._targetElement.removeAttribute('aria-controls');\n }\n\n if (this._listDropdown) {\n this._listDropdown.close();\n this._listDropdown.destroy();\n this._listDropdown = undefined;\n }\n }\n\n public setActiveOption(index: number): void {\n this._listDropdown?.activateOption(index);\n }\n\n public activateFirstOption(): void {\n this._listDropdown?.activateFirstOption();\n }\n\n public setCascadeTargetInactive(): void {\n const listItem = this._targetElement as IListItemComponent;\n if (listItem?.active) {\n listItem.active = false;\n }\n }\n\n public getActiveOptionIndex(): number {\n return this._listDropdown?.getActiveOptionIndex() ?? -1;\n }\n\n public focusTarget(): void {\n if (this._targetElement) {\n this._targetElement.focus();\n }\n }\n\n public isTargetFocused(): boolean {\n return document.activeElement === this._targetElement;\n }\n\n public updateActiveDescendant(id: string): void {\n if (!this._targetElement) {\n return;\n }\n if (id) {\n this._targetElement.setAttribute('aria-activedescendant', id);\n } else {\n this._targetElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public addDropdownListener(type: string, listener: (evt: any) => void): void {\n if (!this._listDropdown || !this._listDropdown.dropdownElement) {\n return;\n }\n this._listDropdown.dropdownElement.addEventListener(type, listener);\n }\n\n public isOwnElement(el: Element): boolean {\n if (!this._targetElement || !this._listDropdown || !this._listDropdown.dropdownElement) {\n return false;\n }\n return this._targetElement.contains(el) || !!this._listDropdown.dropdownElement.contains(el);\n }\n\n public propagateKey(key: string): void {\n this._listDropdown?.handleKey(key);\n }\n\n public proxyKeyboardEventToChild(evt: KeyboardEvent, id: string): void {\n if (!this.getDropdownElement()) {\n return;\n }\n const openMenu = this._getOpenChildMenu(id);\n if (openMenu) {\n openMenu.propagateKeyEvent(evt);\n }\n }\n\n public toggleChildMenu(index: number, open?: boolean): void {\n const listItems = this._getListItems();\n const listItem = listItems[index];\n const childMenu = listItem.parentElement as IMenuComponent;\n if (childMenu && childMenu.tagName.toLowerCase() === MENU_CONSTANTS.elementName) {\n if (open === undefined) {\n childMenu.open = !childMenu.open;\n } else {\n childMenu.open = open;\n }\n childMenu.activateFirstOption();\n }\n }\n\n public createChildMenu(index: number, parentValue: any, openCb: (index: number) => void, closeCb: (index: number) => void, selectCb: (data: IMenuSelectEventData) => void): IMenuComponent {\n const menu = document.createElement('forge-menu');\n menu.style.display = 'block';\n\n // Set listeners to notify the parent menu when anything important happens within a child menu that needs to be propagated to the root menu\n menu.addEventListener(MENU_CONSTANTS.events.OPEN, () => {\n this._childMenus.set(index, menu);\n openCb(index);\n });\n menu.addEventListener(MENU_CONSTANTS.events.CLOSE, () => {\n this._childMenus.delete(index);\n closeCb(index);\n });\n menu.addEventListener(MENU_CONSTANTS.events.SELECT, (evt: CustomEvent<IMenuSelectEventData>) => {\n evt.stopPropagation();\n selectCb({ ...evt.detail, parentValue });\n });\n\n return menu;\n }\n\n public closeOtherChildMenus(excludeIndex?: number): void {\n const menusToRemove: number[] = [];\n this._childMenus.forEach((menu, index) => {\n if (index !== excludeIndex) {\n menu.open = false;\n menusToRemove.push(index);\n }\n });\n menusToRemove.forEach(index => this._childMenus.delete(index));\n }\n\n public setSelectedValues(values: any[]): void {\n this._listDropdown?.setSelectedValues(values);\n }\n\n private _getOpenChildMenu(id: string): IMenuComponent | null {\n if (!this.getDropdownElement()) {\n return null;\n }\n const list = this._getOwnList(id);\n return list ? list.querySelector(`${MENU_CONSTANTS.elementName}[${MENU_CONSTANTS.attributes.OPEN}]`) : null;\n }\n\n private _getOwnList(id: string): IListComponent | null {\n const popup = this.getDropdownElement();\n if (!popup) {\n return null;\n }\n return popup.querySelector(`${LIST_CONSTANTS.elementName}[id=\"list-dropdown-list-${id}\"]`);\n }\n\n private _getListItems(): IListItemComponent[] {\n const popup = this.getDropdownElement();\n if (!popup) {\n return [];\n }\n const listElement = popup.querySelector(LIST_CONSTANTS.elementName);\n if (listElement) {\n return Array.from(listElement.querySelectorAll(LIST_ITEM_CONSTANTS.elementName)) as IListItemComponent[];\n }\n return [];\n }\n}\n", "import { ICustomElementFoundation, isArray, randomChars } from '@tylertech/forge-core';\nimport { ICON_CLASS_NAME } from '../constants';\nimport { CascadingListDropdownAwareFoundation, IListDropdownCascadingElementFactoryConfig, IListDropdownConfig, ListDropdownAsyncStyle, ListDropdownType } from '../list-dropdown';\nimport { isListDropdownOptionType, ListDropdownOptionType } from '../list-dropdown/list-dropdown-utils';\nimport { IPopupPosition, PopupPlacement } from '../popup';\nimport { IMenuOption } from './index';\nimport { IMenuAdapter } from './menu-adapter';\nimport { IMenuActiveChangeEventData, IMenuOptionGroup, IMenuSelectEventData, MenuMode, MenuOptionBuilder, MenuOptionFactory, MENU_CONSTANTS } from './menu-constants';\n\nexport interface IMenuFoundation extends ICustomElementFoundation {\n initialize(): void;\n disconnect(): void;\n onKeydown(evt: KeyboardEvent): void;\n open: boolean;\n options: Array<IMenuOption | IMenuOptionGroup>;\n optionsFactory: MenuOptionFactory | undefined;\n selectedIndex: number;\n selectedValue: any;\n placement: PopupPlacement;\n fallbackPlacements: PopupPlacement[];\n dense: boolean;\n iconClass: string;\n persistSelection: boolean;\n mode: MenuMode;\n popupOffset: IPopupPosition;\n optionBuilder: MenuOptionBuilder | undefined;\n activateFirstOption(): void;\n}\n\nexport class MenuFoundation extends CascadingListDropdownAwareFoundation<IMenuOption | IMenuOptionGroup> implements IMenuFoundation {\n private _optionsFactory: MenuOptionFactory | undefined;\n private _placement: PopupPlacement = 'bottom-start';\n private _fallbackPlacements: PopupPlacement[] = [];\n private _dense = false;\n private _selectedValue: any;\n private _iconClass = ICON_CLASS_NAME;\n private _persistSelection = false;\n private _mode: MenuMode = 'click';\n private _popupOffset: IPopupPosition;\n private _optionBuilder: MenuOptionBuilder | undefined;\n private _identifier: string;\n private _clickListener: (evt: MouseEvent) => void;\n private _blurListener: (evt: MouseEvent) => void;\n private _selectListener: (value: any) => void;\n private _keydownListener: (evt: KeyboardEvent) => void;\n private _activeChangeListener: (id: string) => void;\n \n constructor(private _adapter: IMenuAdapter) {\n super({\n popupTimeout: MENU_CONSTANTS.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,\n targetTimeout: MENU_CONSTANTS.numbers.CHILD_MOUSE_LEAVE_TIMEOUT\n });\n this._identifier = randomChars();\n this._clickListener = evt => this._onTargetClick(evt);\n this._blurListener = evt => this._onTargetBlur(evt);\n this._selectListener = value => this._handleSelectEvent(value);\n this._keydownListener = evt => this.onKeydown(evt);\n this._activeChangeListener = id => this._onActiveOptionChanged(id);\n }\n\n public initialize(): void {\n this._adapter.initializeTarget();\n this._adapter.initializeAccessibility(this._identifier);\n this._initializeInteractionListeners();\n }\n\n public disconnect(): void {\n if (this._open) {\n this._closeDropdown();\n }\n this._destroyInteractionListeners();\n }\n\n public activateFirstOption(): void {\n this._adapter.activateFirstOption();\n }\n\n private _applyMode(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n\n if (this._mode !== 'cascade') {\n this._adapter.addTargetListener('click', this._clickListener);\n } else {\n this._attachCascadingListeners();\n }\n }\n\n private _initializeInteractionListeners(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n this._applyMode();\n this._adapter.addTargetListener('keydown', this._keydownListener, true);\n this._adapter.addTargetListener('focusout', this._blurListener);\n }\n\n private _destroyInteractionListeners(): void {\n if (!this._adapter.hasTargetElement()) {\n return;\n }\n this._adapter.removeTargetListener('keydown', this._clickListener);\n this._adapter.removeTargetListener('focusout', this._blurListener);\n this._adapter.removeTargetListener('click', this._clickListener);\n this._detachCascadingListeners();\n }\n\n protected _attachCascadingListeners(): void {\n this._adapter.addTargetListener('mouseenter', this._targetMouseEnterListener);\n this._adapter.addTargetListener('mouseleave', this._targetMouseLeaveListener);\n\n // We listen for document mousemove events only to track mouse coords for use when determining\n // if popups should open/close after specific delays\n this._adapter.addDocumentListener('mousemove', this._documentMouseMoveListener);\n }\n\n protected _detachCascadingListeners(): void {\n this._adapter.removeTargetListener('mouseenter', this._targetMouseEnterListener);\n this._adapter.removeTargetListener('mouseleave', this._targetMouseLeaveListener);\n this._adapter.removeDocumentListener('mousemove', this._documentMouseMoveListener);\n }\n\n private get _nonDividerOptions(): IMenuOption[] {\n return this._flatOptions.filter(o => !o.divider);\n }\n\n private get _flatOptions(): IMenuOption[] {\n return this._flattenOptions(this._options);\n }\n\n private _flattenOptions(options: Array<IMenuOption | IMenuOptionGroup>): IMenuOption[] {\n if (isListDropdownOptionType(options, ListDropdownOptionType.Group)) {\n return (options as IMenuOptionGroup[])\n .reduce((previousValue, currentValue) => {\n return currentValue.options ? previousValue.concat(currentValue.options) : previousValue;\n }, [] as IMenuOption[]);\n }\n return options as IMenuOption[];\n }\n\n private _onTargetClick(evt: MouseEvent): void {\n if (this._open) {\n this._closeDropdown();\n return;\n }\n this.open = !this._open;\n if (this._open) {\n this._adapter.focusTarget();\n }\n }\n\n private _onTargetBlur(evt: Event): void {\n if (this._open) {\n this._closeDropdown();\n }\n }\n\n private _onActiveOptionChanged(id: string): void {\n // We need to dispatch an event when the active descendant changes to propagate that to the proper target element\n const data: IMenuActiveChangeEventData = { id };\n const canSetActiveDescendant = this._adapter.emitHostEvent(MENU_CONSTANTS.events.ACTIVE_CHANGE, data, true, true);\n if (this._mode !== 'cascade' && canSetActiveDescendant) {\n this._adapter.updateActiveDescendant(id);\n }\n }\n\n public onKeydown(evt: KeyboardEvent): void {\n // If we have any child menus open, we need to proxy the keyboard events to those and exit\n if (this._childOpen) {\n this._adapter.proxyKeyboardEventToChild(evt, this._identifier);\n return;\n }\n\n switch (evt.code) {\n case 'Escape':\n if (this._open) {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeDropdown();\n }\n break;\n case 'Space':\n evt.preventDefault();\n\n if (this._open) {\n this._closeDropdown();\n } else {\n this._openDropdown({ fromKeyboard: true });\n }\n break;\n case 'Home':\n case 'End':\n if (this._open) {\n evt.preventDefault();\n this._adapter.propagateKey(evt.code);\n }\n break;\n case 'Enter':\n evt.preventDefault();\n\n if (!this._open) {\n evt.preventDefault();\n this._openDropdown({ fromKeyboard: true });\n return;\n }\n\n evt.stopImmediatePropagation();\n\n this._adapter.propagateKey(evt.code);\n\n // Check if we need to toggle the child menu open state\n const activeIndex = this._adapter.getActiveOptionIndex();\n const activeOption = this._nonDividerOptions[activeIndex];\n if (activeOption && activeOption.options && activeOption.options.length) {\n this._adapter.toggleChildMenu(activeIndex);\n }\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n\n evt.preventDefault();\n\n if (!this._open && evt.code === 'ArrowDown') {\n this._openDropdown({ fromKeyboard: true });\n this._adapter.activateFirstOption();\n return;\n }\n\n this._adapter.propagateKey(evt.code);\n break;\n case 'ArrowLeft':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n if (this._mode === 'cascade' && this._open) {\n this._closeDropdown();\n }\n break;\n case 'ArrowRight':\n if (this._open) {\n evt.stopImmediatePropagation();\n }\n if (!this._open) {\n return;\n }\n const hoveredIndex = this._adapter.getActiveOptionIndex();\n const hoveredOption = this._nonDividerOptions[hoveredIndex];\n if (hoveredOption && hoveredOption.options) {\n this._adapter.toggleChildMenu(hoveredIndex, evt.code === 'ArrowRight');\n return;\n }\n break;\n }\n }\n\n private async _openMenu({ fromKeyboard }: { fromKeyboard?: boolean } = {}): Promise<void> {\n this._open = true;\n let options: IMenuOption[] = [];\n\n if (typeof this._optionsFactory === 'function') {\n this._loadOptionsAsync();\n this._options = [];\n } else {\n if (!this._options || !this._options.length) {\n return;\n }\n options = this._options as IMenuOption[];\n }\n\n if (!this._persistSelection) {\n options.forEach(o => o.selected = false);\n }\n\n this._mapIconToLeadingIcon();\n\n const selectedValues = this._persistSelection ? this._getSelectedValues() : [];\n\n const config: IListDropdownConfig = {\n id: this._identifier,\n type: ListDropdownType.Menu,\n options: this._options,\n selectedValues,\n iconClass: this._iconClass,\n dense: this._dense,\n multiple: false,\n popupStatic: true,\n allowBusy: true,\n asyncStyle: ListDropdownAsyncStyle.Spinner,\n optionBuilder: this._optionBuilder,\n optionLimit: this._optionLimit,\n headerBuilder: this._popupHeaderBuilder,\n footerBuilder: this._popupFooterBuilder,\n observeScroll: this._observeScroll,\n observeScrollThreshold: this._observeScrollThreshold,\n popupPlacement: this._placement,\n popupFallbackPlacements: this._fallbackPlacements,\n activeStartIndex: fromKeyboard ? 0 : undefined,\n popupClasses: [\n MENU_CONSTANTS.classes.POPUP,\n MENU_CONSTANTS.classes.MENU,\n ...this._popupClasses as string[]\n ],\n syncWidth: this._syncPopupWidth,\n activeChangeCallback: this._activeChangeListener,\n selectCallback: this._selectListener,\n popupOffset: this._popupOffset,\n cascadingElementFactory: params => this._createCascadingElement(params)\n };\n\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.OPEN, '');\n this._adapter.attachMenu(config);\n\n // If this menu is in a hover mode, we need to listen for mouse enter/leave events to know when the user is hovering over the popup\n if (this._mode === 'cascade') {\n this._adapter.addDropdownListener('mouseenter', this._childPopupMouseEnterListener);\n this._adapter.addDropdownListener('mouseleave', this._childPopupMouseLeaveListener);\n }\n \n this._adapter.addDropdownListener(MENU_CONSTANTS.events.ACTIVE_CHANGE, (evt: CustomEvent<IMenuActiveChangeEventData>) => {\n this._onActiveOptionChanged(evt.detail.id);\n });\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.OPEN);\n }\n\n private _closeMenu(): void {\n this._open = false;\n this._childOpen = false;\n this._adapter.detachMenu();\n\n if (this._activeMouseLeaveTimeout !== undefined) {\n window.clearTimeout(this._activeMouseLeaveTimeout);\n }\n\n this._adapter.removeHostAttribute(MENU_CONSTANTS.attributes.OPEN);\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.CLOSE);\n }\n\n private _loadOptionsAsync(): Promise<void> {\n if (!this._optionsFactory) {\n if (this._open) {\n this._closeMenu();\n }\n return Promise.resolve();\n }\n\n return Promise.resolve(this._optionsFactory())\n .then(results => {\n if (!this._persistSelection) {\n const flatResults = this._flattenOptions(results);\n flatResults.filter(o => o.selected).forEach(o => o.selected = false);\n }\n\n if (this._open) {\n if (results && isArray(results) && results.length) {\n this._options = results;\n this._mapIconToLeadingIcon();\n this._adapter.setOptions(results);\n const selectedValues = this._getSelectedValues();\n if (selectedValues.length) {\n this._adapter.setSelectedValues(selectedValues);\n }\n } else if (this._open) {\n this._closeDropdown();\n }\n }\n })\n .catch(e => {\n console.error('An unexpected error ocurred while opening the menu:', e);\n if (this._open) {\n this._closeDropdown();\n }\n });\n }\n\n private _handleSelectEvent(value: any): void {\n const index = this._nonDividerOptions.findIndex(o => o.value === value);\n if (index < 0) {\n return;\n }\n this._selectOptionByIndex(index);\n }\n\n private _selectActiveOption(): void {\n const index = this._adapter.getActiveOptionIndex();\n if (index >= 0 && this._nonDividerOptions[index]) {\n this._selectOptionByIndex(index);\n }\n }\n\n private _selectOptionByIndex(index: number): void {\n const { options, value } = this._nonDividerOptions[index];\n\n // We ignore selections if the option has child options\n if (options) {\n this._adapter.setActiveOption(index);\n return;\n }\n\n this._closeDropdown();\n \n const data: IMenuSelectEventData = { index, value };\n const isCancelled = !this._adapter.emitHostEvent(MENU_CONSTANTS.events.SELECT, data, true, true);\n if (!isCancelled) {\n this._selectedValue = this._persistSelection ? value : undefined;\n }\n }\n\n private _getSelectedValues(): any[] {\n const values = this._flatOptions.filter(o => o.selected).map(o => o.value);\n if (this._selectedValue !== undefined) {\n values.push(this._selectedValue);\n }\n return values;\n }\n\n /** Called when a child menu option is selected. */\n protected _onCascadingOptionSelected(data: IMenuSelectEventData): void {\n if (this._persistSelection) {\n this._selectedValue = data.value;\n }\n this._adapter.emitHostEvent(MENU_CONSTANTS.events.SELECT, data);\n this._closeDropdown();\n }\n\n /** Called when a child menu is opened off of one of our menu options. */\n protected _onCascadingChildOpen(index: number): void {\n super._clearMouseLeaveTimeout();\n this._adapter.closeOtherChildMenus(index);\n this._childOpen = true;\n this._adapter.setActiveOption(index);\n }\n\n /** Called when a child menu is closed off of one of our menu options. */\n protected _onCascadingChildClose(index: number): void {\n this._childOpen = false;\n }\n\n protected _closeDropdown(): void {\n this._closeMenu();\n }\n\n protected _openDropdown({ fromKeyboard }: { fromKeyboard?: boolean } = {}): void {\n this._openMenu({ fromKeyboard });\n }\n\n protected _setCascadeTargetInactive(): void {\n this._adapter.setCascadeTargetInactive();\n }\n\n protected _isOwnElement(element: Element): boolean {\n return this._adapter.isOwnElement(element);\n }\n\n private _createCascadingElement({ index, options, parentValue }: IListDropdownCascadingElementFactoryConfig): HTMLElement {\n const menu = this._adapter.createChildMenu(\n index,\n parentValue,\n this._onCascadingChildOpen.bind(this),\n this._onCascadingChildClose.bind(this),\n this._onCascadingOptionSelected.bind(this)\n );\n menu.mode = 'cascade';\n menu.popupOffset = { x: 0, y: -8 };\n menu.dense = this._dense;\n menu.placement = 'right-start';\n menu.fallbackPlacements = ['left-start', 'right-start']; // Cascading menus should only fallback to left or right placement if needed\n menu.persistSelection = this._persistSelection;\n if (this._persistSelection) {\n menu.selectedValue = this._selectedValue;\n }\n menu.options = options;\n menu.optionBuilder = this._optionBuilder;\n menu.iconClass = this._iconClass;\n\n return menu;\n }\n\n private _mapIconToLeadingIcon(): void {\n // For backwards compatibility with old API, map the old \"icon\" property to the new \"leadingIcon\" property (if exists)\n this._flatOptions.filter(o => o.icon).forEach(o => o.leadingIcon = o.icon);\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n value = Boolean(value);\n if (this._open !== value) {\n this._open = value;\n if (value) {\n this._openDropdown();\n } else {\n this._closeDropdown();\n }\n }\n }\n\n public set options(options: IMenuOption[]) {\n if (typeof options === 'function') {\n this.optionsFactory = options;\n } else {\n this.optionsFactory = undefined;\n // Intentional shallow copy of member properties. These member objects have properties that are references to functions.\n this._options = options.map(o => ({ ...o }));\n \n if (this._open) {\n this._mapIconToLeadingIcon();\n this._adapter.setOptions(this._options as IMenuOption[]);\n if (this._persistSelection) {\n const selectedValues = this._getSelectedValues();\n if (selectedValues.length) {\n this._adapter.setSelectedValues(selectedValues);\n }\n }\n }\n }\n }\n public get options(): IMenuOption[] {\n if (!this._options) {\n return [];\n }\n\n // Intentional shallow copy of member properties. These member objects have properties that are references to functions.\n return this._flatOptions.map(o => ({ ...o }));\n }\n\n public set optionsFactory(factory: MenuOptionFactory | undefined) {\n this._optionsFactory = factory;\n }\n\n public set selectedIndex(value: number) {\n const option = this._nonDividerOptions[value];\n if (option && option.value !== this._selectedValue) {\n this.selectedValue = option.value;\n }\n }\n public get selectedIndex(): number {\n return this._selectedValue !== undefined ? this._nonDividerOptions.findIndex(o => o.value === this._selectedValue) : -1;\n }\n\n public set selectedValue(value: any) {\n if (this._selectedValue !== value) {\n this._selectedValue = value;\n this._adapter.setSelectedValues(this._selectedValue);\n }\n }\n public get selectedValue(): any {\n return this._selectedValue;\n }\n\n public get placement(): PopupPlacement {\n return this._placement;\n }\n public set placement(value: PopupPlacement) {\n if (this._placement !== value) {\n this._placement = value || 'bottom-start';\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.PLACEMENT, this._placement);\n }\n }\n\n public get fallbackPlacements(): PopupPlacement[] {\n return this._fallbackPlacements;\n }\n public set fallbackPlacements(value: PopupPlacement[]) {\n this._fallbackPlacements = Array.isArray(value) ? value : [];\n }\n\n public get dense(): boolean {\n return this._dense;\n }\n public set dense(value: boolean) {\n this._dense = value;\n }\n\n public get iconClass(): string {\n return this._iconClass;\n }\n public set iconClass(value: string) {\n this._iconClass = value;\n }\n\n public get persistSelection(): boolean {\n return this._persistSelection;\n }\n public set persistSelection(value: boolean) {\n if (this._persistSelection === value) {\n return;\n }\n\n this._persistSelection = value;\n this._adapter.toggleHostAttribute(MENU_CONSTANTS.attributes.PERSIST_SELECTION, this._persistSelection);\n\n if (!this._persistSelection) {\n this._flatOptions.forEach(o => o.selected = false);\n this._selectedValue = undefined;\n }\n }\n\n public get mode(): MenuMode {\n return this._mode;\n }\n public set mode(value: MenuMode) {\n if (this._mode !== value) {\n this._mode = value;\n this._destroyInteractionListeners();\n this._applyMode();\n this._adapter.setHostAttribute(MENU_CONSTANTS.attributes.MODE, this._mode);\n }\n }\n\n public get popupOffset(): IPopupPosition {\n return this._popupOffset;\n }\n public set popupOffset(value: IPopupPosition) {\n this._popupOffset = value;\n }\n\n public get optionBuilder(): MenuOptionBuilder | undefined {\n return this._optionBuilder;\n }\n public set optionBuilder(cb: MenuOptionBuilder | undefined) {\n this._optionBuilder = cb;\n }\n\n public get popupElement(): HTMLElement | null {\n return this._adapter.getDropdownElement();\n }\n}\n", "import { attachShadowTemplate, coerceBoolean, CustomElement, ensureChild, FoundationProperty, isDefined } from '@tylertech/forge-core';\nimport { tylIconArrowRight } from '@tylertech/tyler-icons/standard';\nimport { CircularProgressComponent } from '../circular-progress';\nimport { IconRegistry } from '../icon';\nimport { LinearProgressComponent } from '../linear-progress';\nimport { ListComponent } from '../list';\nimport { IListDropdownAware, ListDropdownAware } from '../list-dropdown/list-dropdown-aware';\nimport { IPopupPosition, PopupComponent, PopupPlacement } from '../popup';\nimport { MenuAdapter } from './menu-adapter';\nimport { IMenuActiveChangeEventData, IMenuOption, IMenuOptionGroup, IMenuSelectEventData, MenuMode, MenuOptionBuilder, MenuOptionFactory, MENU_CONSTANTS } from './menu-constants';\nimport { MenuFoundation } from './menu-foundation';\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:inline-block}:host([hidden]){display:none}';\n\nexport interface IMenuComponent extends IListDropdownAware {\n open: boolean;\n options: Array<IMenuOption | IMenuOptionGroup> | MenuOptionFactory;\n selectedIndex: number;\n selectedValue: number;\n placement: PopupPlacement;\n fallbackPlacements: PopupPlacement[];\n dense: boolean;\n iconClass: string;\n persistSelection: boolean;\n mode: MenuMode;\n popupOffset: IPopupPosition;\n optionBuilder: MenuOptionBuilder | undefined;\n popupElement: HTMLElement | undefined;\n propagateKeyEvent(evt: KeyboardEvent): void;\n activateFirstOption(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-menu': IMenuComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-menu-select': CustomEvent<IMenuSelectEventData>;\n 'forge-menu-open': CustomEvent<void>;\n 'forge-menu-close': CustomEvent<void>;\n 'forge-menu-active-change': CustomEvent<IMenuActiveChangeEventData>;\n }\n}\n\n/**\n * The web component class behind the `<forge-menu>` custom element.\n * \n * @tag forge-menu\n */\n@CustomElement({\n name: MENU_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n ListComponent,\n CircularProgressComponent,\n LinearProgressComponent\n ]\n})\nexport class MenuComponent extends ListDropdownAware implements IMenuComponent {\n public static get observedAttributes(): string[] {\n return [\n MENU_CONSTANTS.attributes.OPEN,\n MENU_CONSTANTS.attributes.PLACEMENT,\n MENU_CONSTANTS.attributes.SELECTED_INDEX,\n MENU_CONSTANTS.attributes.SELECTED_VALUE,\n MENU_CONSTANTS.attributes.DENSE,\n MENU_CONSTANTS.attributes.ICON_CLASS,\n MENU_CONSTANTS.attributes.PERSIST_SELECTION,\n MENU_CONSTANTS.attributes.MODE,\n MENU_CONSTANTS.attributes.SYNC_POPUP_WIDTH,\n MENU_CONSTANTS.attributes.POPUP_CLASSES,\n MENU_CONSTANTS.attributes.OPTION_LIMIT,\n MENU_CONSTANTS.attributes.OBSERVE_SCROLL,\n MENU_CONSTANTS.attributes.OBSERVE_SCROLL_THRESHOLD\n ];\n }\n\n private _foundation: MenuFoundation;\n\n constructor() {\n super();\n IconRegistry.define(tylIconArrowRight);\n this._foundation = new MenuFoundation(new MenuAdapter(this));\n attachShadowTemplate(this, template, styles);\n }\n\n public connectedCallback(): void {\n if (this.querySelector(MENU_CONSTANTS.selectors.TOGGLE)) {\n this._foundation.initialize();\n } else {\n ensureChild(this, MENU_CONSTANTS.selectors.TOGGLE).then(() => this._foundation.initialize());\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n switch (name) {\n case MENU_CONSTANTS.attributes.OPEN:\n this._foundation.open = isDefined(newValue);\n break;\n case MENU_CONSTANTS.attributes.PLACEMENT:\n this._foundation.placement = newValue as PopupPlacement;\n break;\n case MENU_CONSTANTS.attributes.SELECTED_INDEX:\n this._foundation.selectedIndex = Number(newValue);\n break;\n case MENU_CONSTANTS.attributes.SELECTED_VALUE:\n this._foundation.selectedValue = newValue;\n break;\n case MENU_CONSTANTS.attributes.DENSE:\n this._foundation.dense = coerceBoolean(newValue);\n break;\n case MENU_CONSTANTS.attributes.ICON_CLASS:\n this._foundation.iconClass = newValue;\n break;\n case MENU_CONSTANTS.attributes.PERSIST_SELECTION:\n this.persistSelection = coerceBoolean(newValue);\n break;\n case MENU_CONSTANTS.attributes.MODE:\n this.mode = newValue as MenuMode;\n break;\n }\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n /** Gets/sets the open state. */\n @FoundationProperty()\n public declare open: boolean;\n\n /** Gets/sets the array of options to display in the menu. */\n @FoundationProperty()\n public declare options: Array<IMenuOption | IMenuOptionGroup> | MenuOptionFactory;\n\n /** Gets/sets the selected option to the index. Does not support cascading menus. */\n @FoundationProperty()\n public declare selectedIndex: number;\n\n /** Gets/sets the value of the option to select. */\n @FoundationProperty()\n public declare selectedValue: any;\n\n /** Gets/sets the menu placement (default is bottom-left). */\n @FoundationProperty()\n public declare placement: `${PopupPlacement}`;\n\n /** Gets/sets the fallback menu placement for overriding the default of any side. */\n @FoundationProperty()\n public declare fallbackPlacements: `${PopupPlacement}`[];\n\n /** Gets/sets dense state of the list options used in the menu popup. */\n @FoundationProperty()\n public declare dense: boolean;\n\n /** Gets/sets the class name to use for option icons. */\n @FoundationProperty()\n public declare iconClass: string;\n\n /**\n * Gets/sets whether selection of menu items is persisted.\n * @deprecated Please use `<forge-select-dropdown>` for handling selection states.\n */\n @FoundationProperty()\n public declare persistSelection: boolean;\n\n /** Gets/sets the mode that this menu is using. */\n @FoundationProperty()\n public declare mode: MenuMode;\n\n /** Sets the position adjustment on the internal popup element. */\n @FoundationProperty()\n public declare popupOffset: IPopupPosition;\n\n /** Sets the callback that will be executed for each option in the dropdown for producing custom option templates. */\n @FoundationProperty()\n public declare optionBuilder: MenuOptionBuilder;\n\n /**\n * Gets the currently active popup element when the dropdown is open.\n * @readonly\n */\n @FoundationProperty({ set: false })\n public declare popupElement: HTMLElement | undefined;\n\n /** Force propagates the key event from another element this component. */\n public propagateKeyEvent(evt: KeyboardEvent): void {\n this._foundation.onKeydown(evt);\n }\n\n public activateFirstOption(): void {\n this._foundation.activateFirstOption();\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { MenuComponent } from './menu';\n\nexport * from './menu-adapter';\nexport * from './menu-constants';\nexport * from './menu-foundation';\nexport * from './menu';\n\nexport function defineMenuComponent(): void {\n defineCustomElement(MenuComponent);\n}\n"],
|
|
5
|
+
"mappings": "wsBAGA,IAAMA,EAA2C,GAAGC,QAE9CC,EAAU,CACd,MAAO,oBACP,KAAM,UACR,EAEMC,EAAY,CAChB,OAAQ,IAAIH,cAAwBA,iFACpC,UAAW,YACb,EAEMI,EAAa,CACjB,KAAM,OACN,UAAW,YACX,eAAgB,iBAChB,eAAgB,iBAChB,MAAO,QACP,WAAY,aACZ,kBAAmB,oBACnB,KAAM,OACN,iBAAkB,mBAClB,cAAe,gBACf,aAAc,eACd,eAAgB,iBAChB,yBAA0B,0BAC5B,EAEMC,EAAS,CACb,OAAQ,GAAGL,WACX,KAAM,GAAGA,SACT,MAAO,GAAGA,UACV,cAAe,GAAGA,iBACpB,EAEMM,EAAU,CACd,0BAA2B,IAC3B,0BAA2B,GAC7B,EAEaC,EAAiB,CAC5B,YAAAP,EACA,QAAAE,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,EACA,QAAAC,CACF,EChBO,IAAME,EAAN,cAA0BC,CAAoD,CAKnF,YAAYC,EAA2B,CACrC,MAAMA,CAAS,EAHjB,KAAQ,YAAc,IAAI,GAI1B,CAEO,oBAAyC,CA3ClD,IAAAC,EAAAC,EA4CI,OAAOA,GAAAD,EAAA,KAAK,gBAAL,YAAAA,EAAoB,kBAApB,KAAAC,EAAuC,IAChD,CAEO,kBAA4B,CACjC,MAAO,CAAC,CAAC,KAAK,cAChB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BAIAe,EAAA,CADdC,EAAmB,GAlHThB,EAmHI,2BAIAe,EAAA,CADdC,EAAmB,GAtHThB,EAuHI,6BAOAe,EAAA,CADdC,EAAmB,CAAE,IAAK,EAAM,CAAC,GA7HvBhB,EA8HI,4BA9HJA,EAANe,EAAA,CATNE,EAAc,CACb,KAAMV,EAAe,YACrB,aAAc,CACZW,EACAC,EACAC,EACAC,CACF,CACF,CAAC,GACYrB,GClDN,SAASsB,IAA4B,CAC1CC,EAAoBC,CAAa,CACnC",
|
|
6
|
+
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "selectors", "attributes", "events", "numbers", "MENU_CONSTANTS", "MenuAdapter", "BaseAdapter", "component", "_a", "_b", "MENU_CONSTANTS", "id", "event", "callback", "bubbles", "config", "ListDropdown", "options", "index", "listItem", "type", "listener", "el", "key", "evt", "openMenu", "open", "childMenu", "parentValue", "openCb", "closeCb", "selectCb", "menu", "__spreadProps", "__spreadValues", "excludeIndex", "menusToRemove", "values", "list", "popup", "LIST_CONSTANTS", "listElement", "LIST_ITEM_CONSTANTS", "MenuFoundation", "CascadingListDropdownAwareFoundation", "_adapter", "MENU_CONSTANTS", "ICON_CLASS_NAME", "randomChars", "evt", "value", "id", "o", "options", "isListDropdownOptionType", "previousValue", "currentValue", "data", "canSetActiveDescendant", "activeIndex", "activeOption", "hoveredIndex", "hoveredOption", "fromKeyboard", "selectedValues", "config", "params", "results", "isArray", "index", "values", "element", "parentValue", "menu", "__spreadValues", "factory", "option", "cb", "template", "styles", "MenuComponent", "ListDropdownAware", "IconRegistry", "tylIconArrowRight", "MenuFoundation", "MenuAdapter", "attachShadowTemplate", "MENU_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "isDefined", "coerceBoolean", "evt", "__decorateClass", "FoundationProperty", "CustomElement", "PopupComponent", "ListComponent", "CircularProgressComponent", "LinearProgressComponent", "defineMenuComponent", "defineCustomElement", "MenuComponent"]
|
|
7
|
+
}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{b as Y}from"./chunk.LIKJD4SK.js";import{f as Z}from"./chunk.EC5JFSHR.js";import{m as B}from"./chunk.MZLPUI6R.js";import{d as W,l as X}from"./chunk.WHQZNZHW.js";import{b as x}from"./chunk.7XFU2W25.js";import{c as U,e as y,f as m}from"./chunk.KZJYLYWN.js";import{a as K}from"./chunk.UWYANU5D.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as H,b as z}from"./chunk.DL7NX432.js";import{a as N,e as D,g as v,l as M}from"./chunk.LJLEPTLU.js";import{h as k,u as g}from"./chunk.4LA6HEA7.js";import{b as p,k as w,l as R}from"./chunk.J2M2MXP2.js";import{a as f,b as h,f as l}from"./chunk.MCIQXNKY.js";var c=`${z}split-view-panel`,oe={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"},se={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",OVERLAY:"forge-split-view-panel-overlay"},_={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},le={ROOT:`#${_.ROOT}`,HANDLE:`#${_.HANDLE}`,ICON:`#${_.ICON}`,RIPPLE:`#${_.RIPPLE}`,CONTENT:`#${_.CONTENT}`},pe={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`},de={RIPPLE_ACTIVATION_WAIT:200},ue={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:oe,classes:se,ids:_,selectors:le,events:pe,numbers:de,customCssProperties:ue},ce=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(ce||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function G(n,t){let e=n.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function F(n){return h(f({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function q(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=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=C(u,e),n.setContentSize(e.currentSize),E(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(n,S,e),r!==e.currentSize}function j(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=C(a,e),n.setContentSize(e.currentSize),E(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(n,o,e),r!==e.currentSize}function J(n,t){return n.setContentSize(t.min),t.min}function Q(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=m(t.max,e);return n.setContentSize(r),r}function ee(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function C(n,t){return n=Math.max(n,t.min),n=m(n,t.max,t.availableSpace),n}function E(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=m(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function te(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=m(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return y(n,t.min,e)}function O(n,t){if(n==="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(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var o,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=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:r,unit:a}}function b(n,t){let e=me(n);return e.unit==="%"?U(e.amount,t):e.amount}function ne(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}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.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){!this._appliedAllowClose||(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){q(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,r=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:r};!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 r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,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 r=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,r),o=y(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 r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.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=C(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),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=P(e,h(f({},this._state),{availableSpace:r}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:r}))}};var be=`${z}split-view`,fe={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},he={ROOT:"forge-split-view"},re={ROOT:"root"},ve={ROOT:`#${re.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:be,attributes:fe,classes:he,ids:re,selectors:ve,numbers:_e,customCssProperties:we};var A=class extends K{constructor(e){super(e);this._root=v(e,i.selectors.ROOT),this._handle=v(e,i.selectors.HANDLE),this._icon=v(e,i.selectors.ICON),this._ripple=v(e,i.selectors.RIPPLE),this._content=v(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}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 r;return(r=this._parent)==null?void 0:r[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,r=!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),!r){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(!r){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=ne()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var a;(a=this._overlay)==null||a.style.setProperty("cursor",O(e,r))}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,r){if(r==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.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 r=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var Se='<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>',ge='@-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:ud7uvky;animation-name:ud7uvky;-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 ud7uvky{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ud7uvky{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:ud7uvlg;animation-name:ud7uvlg;-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 ud7uvlg{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ud7uvlg{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:ud7uvlp;animation-name:ud7uvlp;-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 ud7uvlp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes ud7uvlp{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:ud7uvmp;animation-name:ud7uvmp;-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 ud7uvmp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes ud7uvmp{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:ud7uvnn;animation-name:ud7uvnn;-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 ud7uvnn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ud7uvnn{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:ud7uvnq;animation-name:ud7uvnq;-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 ud7uvnq{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ud7uvnq{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:ud7uvnv;animation-name:ud7uvnv;-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 ud7uvnv{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes ud7uvnv{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:ud7uvny;animation-name:ud7uvny;-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 ud7uvny{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes ud7uvny{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,Se,ge),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,r,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 St(){N(s)}export{i as a,ce as b,$ as c,G as d,F as e,q as f,j as g,J as h,Q as i,ee as j,C as k,E as l,te as m,P as n,O as o,ie as p,I as q,me as r,b as s,ne as t,L as u,ae as v,A as w,s as x,St as y};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{b as Z}from"./chunk.LIKJD4SK.js";import{f as X}from"./chunk.EC5JFSHR.js";import{m as B}from"./chunk.MZLPUI6R.js";import{d as U,l as W}from"./chunk.WHQZNZHW.js";import{b as k}from"./chunk.7XFU2W25.js";import{c as j,e as y,f as m}from"./chunk.KZJYLYWN.js";import{a as K}from"./chunk.UWYANU5D.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as H,b as z}from"./chunk.DL7NX432.js";import{a as N,e as D,g as _,l as M}from"./chunk.LJLEPTLU.js";import{h as A,u as g}from"./chunk.4LA6HEA7.js";import{b as p,k as w,l as R}from"./chunk.J2M2MXP2.js";import{a as f,b as h,f as l}from"./chunk.MCIQXNKY.js";var c=`${z}split-view-panel`,oe={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"},se={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",OVERLAY:"forge-split-view-panel-overlay"},v={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},le={ROOT:`#${v.ROOT}`,HANDLE:`#${v.HANDLE}`,ICON:`#${v.ICON}`,RIPPLE:`#${v.RIPPLE}`,CONTENT:`#${v.CONTENT}`},pe={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`},de={RIPPLE_ACTIVATION_WAIT:200},ue={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:oe,classes:se,ids:v,selectors:le,events:pe,numbers:de,customCssProperties:ue},ce=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(ce||{});function Y(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function $(n,t){let e=n.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function G(n){return h(f({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function F(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=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=C(u,e),n.setContentSize(e.currentSize),E(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(n,S,e),r!==e.currentSize}function q(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=C(a,e),n.setContentSize(e.currentSize),E(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(n,o,e),r!==e.currentSize}function J(n,t){return n.setContentSize(t.min),t.min}function Q(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=m(t.max,e);return n.setContentSize(r),r}function ee(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function C(n,t){return n=Math.max(n,t.min),n=m(n,t.max,t.availableSpace),n}function E(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=m(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function te(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=m(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return y(n,t.min,e)}function O(n,t){if(n==="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(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var o,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=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:r,unit:a}}function b(n,t){let e=me(n);return e.unit==="%"?j(e.amount,t):e.amount}function ne(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var x=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=Y();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.tryRemoveOverlay(),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):k(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){k(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){F(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=$(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=G(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:r};!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 r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,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 r=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,r),o=y(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 r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.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=C(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),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=P(e,h(f({},this._state),{availableSpace:r}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:r}))}};var be=`${z}split-view`,fe={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},he={ROOT:"forge-split-view"},re={ROOT:"root"},_e={ROOT:`#${re.ROOT}`,PANEL:i.elementName},ve={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:be,attributes:fe,classes:he,ids:re,selectors:_e,numbers:ve,customCssProperties:we};var L=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())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}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 r;return(r=this._parent)==null?void 0:r[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,r=!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),!r){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),A(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),A(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=ne()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var a;(a=this._overlay)==null||a.style.setProperty("cursor",O(e,r))}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,r){if(r==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.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 r=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var Se='<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>',ge='@-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:uwjxatd;animation-name:uwjxatd;-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 uwjxatd{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uwjxatd{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:uwjxatj;animation-name:uwjxatj;-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 uwjxatj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uwjxatj{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:uwjxatt;animation-name:uwjxatt;-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 uwjxatt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uwjxatt{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:uwjxau8;animation-name:uwjxau8;-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 uwjxau8{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uwjxau8{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:uwjxav5;animation-name:uwjxav5;-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 uwjxav5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uwjxav5{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:uwjxavc;animation-name:uwjxavc;-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 uwjxavc{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uwjxavc{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:uwjxavo;animation-name:uwjxavo;-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 uwjxavo{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uwjxavo{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:uwjxaw6;animation-name:uwjxaw6;-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 uwjxaw6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uwjxaw6{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();U.define([Z,B]),D(this,Se,ge),this._foundation=new x(new L(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,r,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:[W,X]})],s);function St(){N(s)}export{i as a,ce as b,Y as c,$ as d,G as e,F as f,q as g,J as h,Q as i,ee as j,C as k,E as l,te as m,P as n,O as o,ie as p,I as q,me as r,b as s,ne as t,x as u,ae as v,L as w,s as x,St as y};
|
|
7
|
+
//# sourceMappingURL=chunk.VUHUEAJD.js.map
|