@tylertech/forge 2.12.1 → 2.13.0-next.0
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 +91 -25
- package/dist/esm/chunks/{chunk.WDIL7ZO7.js → chunk.2ZSAAJDN.js} +2 -2
- package/dist/esm/chunks/{chunk.WDIL7ZO7.js.map → chunk.2ZSAAJDN.js.map} +0 -0
- package/dist/esm/chunks/{chunk.3LZEQWAL.js → chunk.32SMESZX.js} +2 -2
- package/dist/esm/chunks/{chunk.3LZEQWAL.js.map → chunk.32SMESZX.js.map} +0 -0
- package/dist/esm/chunks/{chunk.MUY647D6.js → chunk.E4ZTNVXI.js} +2 -2
- package/dist/esm/chunks/{chunk.MUY647D6.js.map → chunk.E4ZTNVXI.js.map} +0 -0
- package/dist/esm/chunks/chunk.VQKRN5IQ.js +7 -0
- package/dist/esm/chunks/chunk.VQKRN5IQ.js.map +7 -0
- package/dist/esm/chunks/{chunk.SALQP6J3.js → chunk.YK2PXI6D.js} +2 -2
- package/dist/esm/chunks/{chunk.SALQP6J3.js.map → chunk.YK2PXI6D.js.map} +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/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/time-picker/index.js +1 -1
- package/esm/dialog/dialog-adapter.d.ts +5 -5
- package/esm/dialog/dialog-adapter.js +30 -31
- package/esm/dialog/dialog-foundation.d.ts +4 -2
- package/esm/dialog/dialog-foundation.js +55 -38
- package/esm/dialog/dialog.d.ts +4 -0
- package/esm/dialog/dialog.js +7 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
- package/dist/esm/chunks/chunk.YSE5EMB3.js +0 -7
- package/dist/esm/chunks/chunk.YSE5EMB3.js.map +0 -7
package/custom-elements.json
CHANGED
|
@@ -35688,10 +35688,9 @@
|
|
|
35688
35688
|
"kind": "field",
|
|
35689
35689
|
"name": "_backdropElement",
|
|
35690
35690
|
"type": {
|
|
35691
|
-
"text": "IBackdropComponent"
|
|
35691
|
+
"text": "IBackdropComponent | undefined"
|
|
35692
35692
|
},
|
|
35693
|
-
"privacy": "private"
|
|
35694
|
-
"default": "getShadowElement(component, DIALOG_CONSTANTS.selectors.BACKDROP)"
|
|
35693
|
+
"privacy": "private"
|
|
35695
35694
|
},
|
|
35696
35695
|
{
|
|
35697
35696
|
"kind": "field",
|
|
@@ -35779,7 +35778,16 @@
|
|
|
35779
35778
|
"type": {
|
|
35780
35779
|
"text": "void"
|
|
35781
35780
|
}
|
|
35782
|
-
}
|
|
35781
|
+
},
|
|
35782
|
+
"parameters": [
|
|
35783
|
+
{
|
|
35784
|
+
"name": "parent",
|
|
35785
|
+
"default": "document.body",
|
|
35786
|
+
"type": {
|
|
35787
|
+
"text": "HTMLElement"
|
|
35788
|
+
}
|
|
35789
|
+
}
|
|
35790
|
+
]
|
|
35783
35791
|
},
|
|
35784
35792
|
{
|
|
35785
35793
|
"kind": "method",
|
|
@@ -36168,7 +36176,7 @@
|
|
|
36168
36176
|
{
|
|
36169
36177
|
"name": "positionType",
|
|
36170
36178
|
"type": {
|
|
36171
|
-
"text": "DialogPositionType"
|
|
36179
|
+
"text": "DialogPositionType | null"
|
|
36172
36180
|
}
|
|
36173
36181
|
}
|
|
36174
36182
|
]
|
|
@@ -36766,24 +36774,6 @@
|
|
|
36766
36774
|
},
|
|
36767
36775
|
"privacy": "private"
|
|
36768
36776
|
},
|
|
36769
|
-
{
|
|
36770
|
-
"kind": "field",
|
|
36771
|
-
"name": "_attachedDocumentKeydownHandler",
|
|
36772
|
-
"type": {
|
|
36773
|
-
"text": "boolean"
|
|
36774
|
-
},
|
|
36775
|
-
"privacy": "private",
|
|
36776
|
-
"default": "false"
|
|
36777
|
-
},
|
|
36778
|
-
{
|
|
36779
|
-
"kind": "field",
|
|
36780
|
-
"name": "_attachedBackdropClickHandler",
|
|
36781
|
-
"type": {
|
|
36782
|
-
"text": "boolean"
|
|
36783
|
-
},
|
|
36784
|
-
"privacy": "private",
|
|
36785
|
-
"default": "false"
|
|
36786
|
-
},
|
|
36787
36777
|
{
|
|
36788
36778
|
"kind": "method",
|
|
36789
36779
|
"name": "initialize",
|
|
@@ -36862,6 +36852,44 @@
|
|
|
36862
36852
|
}
|
|
36863
36853
|
}
|
|
36864
36854
|
},
|
|
36855
|
+
{
|
|
36856
|
+
"kind": "method",
|
|
36857
|
+
"name": "show",
|
|
36858
|
+
"privacy": "public",
|
|
36859
|
+
"return": {
|
|
36860
|
+
"type": {
|
|
36861
|
+
"text": "Promise<void>"
|
|
36862
|
+
}
|
|
36863
|
+
},
|
|
36864
|
+
"parameters": [
|
|
36865
|
+
{
|
|
36866
|
+
"name": "parent",
|
|
36867
|
+
"optional": true,
|
|
36868
|
+
"type": {
|
|
36869
|
+
"text": "HTMLElement"
|
|
36870
|
+
}
|
|
36871
|
+
}
|
|
36872
|
+
]
|
|
36873
|
+
},
|
|
36874
|
+
{
|
|
36875
|
+
"kind": "method",
|
|
36876
|
+
"name": "hide",
|
|
36877
|
+
"privacy": "public",
|
|
36878
|
+
"return": {
|
|
36879
|
+
"type": {
|
|
36880
|
+
"text": "Promise<void>"
|
|
36881
|
+
}
|
|
36882
|
+
},
|
|
36883
|
+
"parameters": [
|
|
36884
|
+
{
|
|
36885
|
+
"name": "remove",
|
|
36886
|
+
"optional": true,
|
|
36887
|
+
"type": {
|
|
36888
|
+
"text": "boolean"
|
|
36889
|
+
}
|
|
36890
|
+
}
|
|
36891
|
+
]
|
|
36892
|
+
},
|
|
36865
36893
|
{
|
|
36866
36894
|
"kind": "method",
|
|
36867
36895
|
"name": "_normalizePositionValue",
|
|
@@ -36886,7 +36914,7 @@
|
|
|
36886
36914
|
"privacy": "private",
|
|
36887
36915
|
"return": {
|
|
36888
36916
|
"type": {
|
|
36889
|
-
"text": "void"
|
|
36917
|
+
"text": "Promise<void>"
|
|
36890
36918
|
}
|
|
36891
36919
|
}
|
|
36892
36920
|
},
|
|
@@ -36896,7 +36924,7 @@
|
|
|
36896
36924
|
"privacy": "private",
|
|
36897
36925
|
"return": {
|
|
36898
36926
|
"type": {
|
|
36899
|
-
"text": "void"
|
|
36927
|
+
"text": "Promise<void>"
|
|
36900
36928
|
}
|
|
36901
36929
|
}
|
|
36902
36930
|
},
|
|
@@ -37389,6 +37417,44 @@
|
|
|
37389
37417
|
"text": "void"
|
|
37390
37418
|
}
|
|
37391
37419
|
}
|
|
37420
|
+
},
|
|
37421
|
+
{
|
|
37422
|
+
"kind": "method",
|
|
37423
|
+
"name": "show",
|
|
37424
|
+
"privacy": "public",
|
|
37425
|
+
"return": {
|
|
37426
|
+
"type": {
|
|
37427
|
+
"text": "Promise<void>"
|
|
37428
|
+
}
|
|
37429
|
+
},
|
|
37430
|
+
"parameters": [
|
|
37431
|
+
{
|
|
37432
|
+
"name": "parent",
|
|
37433
|
+
"optional": true,
|
|
37434
|
+
"type": {
|
|
37435
|
+
"text": "HTMLElement"
|
|
37436
|
+
}
|
|
37437
|
+
}
|
|
37438
|
+
]
|
|
37439
|
+
},
|
|
37440
|
+
{
|
|
37441
|
+
"kind": "method",
|
|
37442
|
+
"name": "hide",
|
|
37443
|
+
"privacy": "public",
|
|
37444
|
+
"return": {
|
|
37445
|
+
"type": {
|
|
37446
|
+
"text": "Promise<void>"
|
|
37447
|
+
}
|
|
37448
|
+
},
|
|
37449
|
+
"parameters": [
|
|
37450
|
+
{
|
|
37451
|
+
"name": "remove",
|
|
37452
|
+
"optional": true,
|
|
37453
|
+
"type": {
|
|
37454
|
+
"text": "boolean"
|
|
37455
|
+
}
|
|
37456
|
+
}
|
|
37457
|
+
]
|
|
37392
37458
|
}
|
|
37393
37459
|
],
|
|
37394
37460
|
"superclass": {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{f as To}from"./chunk.33Q5FK2H.js";import{b as go}from"./chunk.DIYJJHWP.js";import{f as So}from"./chunk.YWKKZLZ2.js";import{d as Bo}from"./chunk.OOBE3XRM.js";import{q as so}from"./chunk.
|
|
6
|
+
import{f as To}from"./chunk.33Q5FK2H.js";import{b as go}from"./chunk.DIYJJHWP.js";import{f as So}from"./chunk.YWKKZLZ2.js";import{d as Bo}from"./chunk.OOBE3XRM.js";import{q as so}from"./chunk.32SMESZX.js";import{d as Po}from"./chunk.2SAHWDGJ.js";import{c as ao}from"./chunk.E4ZTNVXI.js";import{d as co}from"./chunk.TLHI6K2R.js";import{d as lo}from"./chunk.SJSLC6XF.js";import{h as uo}from"./chunk.TR64DV3G.js";import{b as xo}from"./chunk.T7ZJDAXV.js";import{d as io}from"./chunk.444GNOS4.js";import{d as Co}from"./chunk.Q6L7T6OJ.js";import{b as ro}from"./chunk.VMWS5OOZ.js";import{d as fo}from"./chunk.K32ME33N.js";import{d as eo}from"./chunk.WUIIZZQD.js";import{d as no}from"./chunk.CYJBOJMX.js";import{b as po}from"./chunk.BCUBTR5O.js";import{b as to}from"./chunk.B5ABD4CZ.js";import{d as mo}from"./chunk.IGMTMR3D.js";import{b as U}from"./chunk.5WMEFHVN.js";import{j as _}from"./chunk.5XQVZQ4U.js";import{d as j}from"./chunk.X77WVI2H.js";import{b as G}from"./chunk.SHT6BCLY.js";import{b as H}from"./chunk.6APYGKNX.js";import{d as N}from"./chunk.URBXDOF7.js";import{d as K}from"./chunk.V7P3QPNM.js";import{b as Q}from"./chunk.XXA6KNXT.js";import{d as y}from"./chunk.4T5TGQFG.js";import{e as v}from"./chunk.5D6UB4DL.js";import{d as R}from"./chunk.VQKRN5IQ.js";import{f as V}from"./chunk.LLHA3SQR.js";import{E as L}from"./chunk.JB2N65SR.js";import{b as O}from"./chunk.MGTNCCW3.js";import{i as B}from"./chunk.NTFA7FCB.js";import{c as l}from"./chunk.DML4YNQF.js";import{b as e}from"./chunk.YHHIPP2F.js";import{d}from"./chunk.5PQTSZ7G.js";import{c as u}from"./chunk.G77PXLAU.js";import{e as c}from"./chunk.Y6MPWPZU.js";import{d as A}from"./chunk.7O7V3N4A.js";import{d as D}from"./chunk.Z5P6EA5L.js";import{b as k}from"./chunk.DGOV5RDW.js";import{b as w}from"./chunk.NGIBMR3Q.js";import{f as h}from"./chunk.7NXPOEXV.js";import{d as M}from"./chunk.I2YRKTG7.js";import{d as s}from"./chunk.QJPH24V4.js";import{d as F}from"./chunk.5K5SIZRX.js";import{d as E}from"./chunk.WNOSTPQQ.js";import{d as p}from"./chunk.IFZXG3LI.js";import{d as t}from"./chunk.OG2BI3UW.js";import{d as m}from"./chunk.P6B3UWJ5.js";import{e as z}from"./chunk.CV5E5W6I.js";import{d as Y}from"./chunk.G5Q2CUUE.js";import{d as q}from"./chunk.SZL74RTY.js";import{b as a}from"./chunk.54QFNVMG.js";import{c as C}from"./chunk.D3DLVPPE.js";import{e as i}from"./chunk.7JTKKFL4.js";import{d as I}from"./chunk.K753A3KI.js";import{b as n}from"./chunk.XYBFFTXS.js";import{b as W}from"./chunk.APGFXXJ7.js";import{d as X}from"./chunk.BFNAQQCU.js";import{d as P}from"./chunk.MNBJMPJ6.js";import{d as oo}from"./chunk.PFD2SVJ4.js";import{d as $}from"./chunk.FPV4XEUK.js";import{b as Z}from"./chunk.JNOCXQVB.js";import{d as S}from"./chunk.35U4OX7S.js";import{b}from"./chunk.OAKTW64X.js";import{e as x}from"./chunk.3UMBCR4P.js";import{b as g}from"./chunk.BOENNFXE.js";import{f}from"./chunk.QXLPBYMX.js";import{e as J}from"./chunk.4KBQ5AJJ.js";import{d as T}from"./chunk.OUEF6VQ6.js";import{l as r}from"./chunk.YAJT3P6V.js";import{b as o}from"./chunk.HN4PXH3D.js";var Ao=[p,S,s,P,A,D,M,b,E,F,L,O,h,c,u,d,I,V,y,v,R,e,G,H,N,t,K,Q,io,r,g,U,_,j,n,C,i,q,z,J,W,X,Y,oo,$,m,mo,to,ro,fo,x,Co,w,f,po,no,eo,a,xo,ao,co,lo,k,So,Bo,uo,l,so,Po,Z,T,To,go,B];function Mr(){o(Ao)}export{Mr as a};
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright (c) 2022 Tyler Technologies, Inc.
|
|
10
10
|
* License: Apache-2.0
|
|
11
11
|
*/
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.2ZSAAJDN.js.map
|
|
File without changes
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as rt}from"./chunk.E37HEAJ5.js";import{d as at}from"./chunk.YSE5EMB3.js";import{a as f,b as nt}from"./chunk.IMK2LFWR.js";import{h as st}from"./chunk.KGW63HJX.js";import{c as et}from"./chunk.D3DLVPPE.js";import{e as tt}from"./chunk.7JTKKFL4.js";import{e as it}from"./chunk.3UMBCR4P.js";import{a as E,b as ot}from"./chunk.BOENNFXE.js";import{j as K}from"./chunk.LZMYHIO2.js";import{a as F}from"./chunk.D4SNVKDA.js";import{a as Q,d as Z,l as w}from"./chunk.YAJT3P6V.js";import{a as $}from"./chunk.24D46RLZ.js";import{g as J}from"./chunk.7ZS4N2FT.js";import{j as b,k as X,m as G,n as q,o as Y,p as j}from"./chunk.KYCC3C3M.js";import{a as z}from"./chunk.A23NSEWA.js";import{a as u}from"./chunk.B3IJU6XJ.js";import{a as R,b as B}from"./chunk.BSZ2LBJX.js";import{a as W}from"./chunk.3E5QKMHL.js";import{a as N,e as H,g as V,i as U}from"./chunk.HN4PXH3D.js";import{m as A,s as P,u as x}from"./chunk.R4NDFXVA.js";import{a as S,k as c,l as L,o as y}from"./chunk.G76HB2FK.js";import{a as k,f as p}from"./chunk.MCIQXNKY.js";var h=`${B}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends z{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this._inputMask&&this._inputMask.destroy(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){this._inputMask&&(this._inputMask.destroy(),this._inputMask=void 0)}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${E.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let l=document.createElement(E.elementName);l.slot="trailing",l.dense=!0,l.densityLevel=3,l.style.marginRight="4px";let o=document.createElement("button");o.type="button",o.tabIndex=-1,o.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",o.appendChild(d),l.appendChild(o),e.appendChild(l),this._toggleElement=l}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P()===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function C(a,t,e){if(!a||/^\s*$/.test(a))return null;let i=0,n=0,l=0;if(b.test(a)){let o=G(a);i=+o.hours||0,n=+o.minutes||0,l=+o.seconds||0}else if(X.test(a)){let o=q(a);i=+o.hours||0,n=+o.minutes||0,l=+o.seconds||0,i===12&&o.meridiem==="AM"&&(i=0),i<12&&o.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+I(n)+(e?O(l):0)}function m(a,t,e){if(typeof a!="number"||a<0)return null;let i=Math.min(pt(a),23),n=Math.min(ut(a),59),o=a/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(a),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${o}`),d}function pt(a){return Math.abs(Math.floor(a/(1e3*60*60)))}function ut(a){return Math.abs(Math.floor(v(a)%60))}function v(a){return a/(1e3*60)}function M(a){return Math.abs(Math.floor(It(a)%60))}function It(a){return a/1e3}function dt(a){return a*60*60*1e3}function I(a){return a*60*1e3}function O(a){return a*1e3}function mt(a){return a-O(M(a))}function D(a){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+I(i)+(a?O(t.getSeconds()):0)}function Rt(a,t,e=!1){a||(a=new Date);let i=C(t,!0,e);if(!i)return a.setHours(0,0,0),a;let n=pt(i),l=828e5;n>l?n=l:n<0&&(n=0);let o=ut(i),d=e?M(i):0;return a.setHours(n,o,d),a}var T=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=S(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.propagateKey(t.code):(this._openDropdown(),this._adapter.activateFirstOption()));break;case"Up":case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&this._adapter.propagateKey(t.code));break;case"Enter":case"Home":case"End":this._open&&(t.code==="Enter"&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let e=D(this._allowSeconds);if(this._value!==e){let i=m(e,!0,this._allowSeconds);this._emitChangeEvent(i)&&(this._applyValue(e),this._selectInputText())}break}}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){let t={showMaskFormat:this._showMaskFormat,use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:y(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=m(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(mt(this._value)),this._isInitialized&&t!==this._value){let e=m(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=m(t,!0,this._allowSeconds);return this._masked&&this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=D(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=m(t.time,!0,this._allowSeconds);!this._emitChangeEvent(e)||(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(o=>!o.divider&&!o.disabled),i=[],n;if(t.length){if(this._value!=null){let o=this._findClosestOptionIndex(this._value,e);o>=0&&(e[o].value.time===this._value?i=[e[o].value]:n=o)}else if(typeof this._startTime=="number"){let o=this._findClosestOptionIndex(this._startTime,e);o>=0&&o<e.length&&(n=o)}}let l={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,activeStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:o=>this._onSelect(o),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:o=>this._adapter.setActiveDescendant(o),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)};this._adapter.attachDropdown(l),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_findClosestOptionIndex(t,e){let i=e.reduce((n,l)=>Math.abs((l.value.time||0)-t)<Math.abs((n.value.time||0)-t)?l:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&this._adapter.setInputValue(i,t)}_generateTimeOptions(){let t=this._min!=null?Math.max(v(this._min),0):0,e=this._max!=null?Math.min(v(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],l=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=I(d),_t=this._restrictedTimes.includes(_),ht=m(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let o=n.findIndex(d=>d.value.time/1e3/60>=720);o>=0&&o<n.length-1&&n.splice(o,0,{label:"",value:null,divider:!0})}if(this._showNow){let o={time:null,metadata:"now"};l.push({label:"Now",value:o})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let o=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});l=[...l,...o]}return l.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),l.forEach((o,d)=>n.splice(d,0,o))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),C(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):m(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t,this._isInitialized&&this._applyMask())}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._adapter.destroyMask(),this._formatInputValue(),this._applyMask()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return m(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return m(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return m(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>m(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return m(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",r=class extends W{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new T(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=c(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=c(n);break;case s.attributes.MASKED:this.masked=c(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=c(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=c(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=c(n);break;case s.attributes.SHOW_NOW:this.showNow=c(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=c(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=L(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=c(n);break;case s.attributes.DISABLED:this.disabled=c(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=c(n);break}}};p([u()],r.prototype,"value",2),p([u()],r.prototype,"open",2),p([u()],r.prototype,"allowSeconds",2),p([u()],r.prototype,"masked",2),p([u()],r.prototype,"showMaskFormat",2),p([u()],r.prototype,"use24HourTime",2),p([u()],r.prototype,"allowInvalidTime",2),p([u()],r.prototype,"min",2),p([u()],r.prototype,"max",2),p([u()],r.prototype,"restrictedTimes",2),p([u()],r.prototype,"startTime",2),p([u()],r.prototype,"step",2),p([u()],r.prototype,"allowInput",2),p([u()],r.prototype,"showNow",2),p([u()],r.prototype,"showHourOptions",2),p([u()],r.prototype,"customOptions",2),p([u()],r.prototype,"validationCallback",2),p([u()],r.prototype,"parseCallback",2),p([u()],r.prototype,"formatCallback",2),p([u()],r.prototype,"coercionCallback",2),p([u()],r.prototype,"prepareMaskCallback",2),p([u()],r.prototype,"disabled",2),p([u()],r.prototype,"popupClasses",2),p([u()],r.prototype,"allowDropdown",2),p([u()],r.prototype,"popupTarget",2),r=p([R({name:s.elementName,dependencies:[et,tt,ot,w,it,w,at]})],r);var ct=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.masked?this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")}):this._textFieldDelegate.inputElement.addEventListener("input",i=>e(i.target.value))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,l,o,d;let i={props:k({},(l=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:l.props),options:k({},(d=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function xe(){N(r)}export{s as a,g as b,C as c,m as d,pt as e,ut as f,v as g,M as h,It as i,dt as j,I as k,O as l,mt as m,D as n,Rt as o,T as p,r as q,ct as r,xe as s};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as rt}from"./chunk.E37HEAJ5.js";import{d as at}from"./chunk.VQKRN5IQ.js";import{a as f,b as nt}from"./chunk.IMK2LFWR.js";import{h as st}from"./chunk.KGW63HJX.js";import{c as et}from"./chunk.D3DLVPPE.js";import{e as tt}from"./chunk.7JTKKFL4.js";import{e as it}from"./chunk.3UMBCR4P.js";import{a as E,b as ot}from"./chunk.BOENNFXE.js";import{j as K}from"./chunk.LZMYHIO2.js";import{a as F}from"./chunk.D4SNVKDA.js";import{a as Q,d as Z,l as w}from"./chunk.YAJT3P6V.js";import{a as $}from"./chunk.24D46RLZ.js";import{g as J}from"./chunk.7ZS4N2FT.js";import{j as b,k as X,m as G,n as q,o as Y,p as j}from"./chunk.KYCC3C3M.js";import{a as z}from"./chunk.A23NSEWA.js";import{a as u}from"./chunk.B3IJU6XJ.js";import{a as R,b as B}from"./chunk.BSZ2LBJX.js";import{a as W}from"./chunk.3E5QKMHL.js";import{a as N,e as H,g as V,i as U}from"./chunk.HN4PXH3D.js";import{m as A,s as P,u as x}from"./chunk.R4NDFXVA.js";import{a as S,k as c,l as L,o as y}from"./chunk.G76HB2FK.js";import{a as k,f as p}from"./chunk.MCIQXNKY.js";var h=`${B}time-picker`,lt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},ft={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${lt.TOGGLE}]`},gt={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},vt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:lt,selectors:ft,events:gt,numbers:vt};var g=class extends z{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this._inputMask&&this._inputMask.destroy(),this._inputMask=new J(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){this._inputMask&&(this._inputMask.destroy(),this._inputMask=void 0)}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(f.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${E.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let l=document.createElement(E.elementName);l.slot="trailing",l.dense=!0,l.densityLevel=3,l.style.marginRight="4px";let o=document.createElement("button");o.type="button",o.tabIndex=-1,o.setAttribute("aria-label","Toggle time dropdown");let d=document.createElement(Q.elementName);d.name="clock_outline",o.appendChild(d),l.appendChild(o),e.appendChild(l),this._toggleElement=l}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P()===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._listDropdown=new st(this._inputElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}detachDropdown(){this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){U(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){let e=this._component.querySelector(f.elementName);if(e&&e.shadowRoot){let i=V(e,f.selectors.ROOT);if(i)return i}return this._component}};function C(a,t,e){if(!a||/^\s*$/.test(a))return null;let i=0,n=0,l=0;if(b.test(a)){let o=G(a);i=+o.hours||0,n=+o.minutes||0,l=+o.seconds||0}else if(X.test(a)){let o=q(a);i=+o.hours||0,n=+o.minutes||0,l=+o.seconds||0,i===12&&o.meridiem==="AM"&&(i=0),i<12&&o.meridiem==="PM"&&(i+=12)}else return null;return dt(i)+I(n)+(e?O(l):0)}function m(a,t,e){if(typeof a!="number"||a<0)return null;let i=Math.min(pt(a),23),n=Math.min(ut(a),59),o=a/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(a),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${o}`),d}function pt(a){return Math.abs(Math.floor(a/(1e3*60*60)))}function ut(a){return Math.abs(Math.floor(v(a)%60))}function v(a){return a/(1e3*60)}function M(a){return Math.abs(Math.floor(It(a)%60))}function It(a){return a/1e3}function dt(a){return a*60*60*1e3}function I(a){return a*60*1e3}function O(a){return a*1e3}function mt(a){return a-O(M(a))}function D(a){let t=new Date,e=t.getHours(),i=t.getMinutes();return dt(e)+I(i)+(a?O(t.getSeconds()):0)}function Rt(a,t,e=!1){a||(a=new Date);let i=C(t,!0,e);if(!i)return a.setHours(0,0,0),a;let n=pt(i),l=828e5;n>l?n=l:n<0&&(n=0);let o=ut(i),d=e?M(i):0;return a.setHours(n,o,d),a}var T=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=S(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown(),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),this._closeDropdown(!0));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.propagateKey(t.code):(this._openDropdown(),this._adapter.activateFirstOption()));break;case"Up":case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&this._adapter.propagateKey(t.code));break;case"Enter":case"Home":case"End":this._open&&(t.code==="Enter"&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let e=D(this._allowSeconds);if(this._value!==e){let i=m(e,!0,this._allowSeconds);this._emitChangeEvent(i)&&(this._applyValue(e),this._selectInputText())}break}}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown(!0):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown(!0)}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){let t={showMaskFormat:this._showMaskFormat,use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:y(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown(!0)}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=m(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(mt(this._value)),this._isInitialized&&t!==this._value){let e=m(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown(!0),t=j(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=m(t,!0,this._allowSeconds);return this._masked&&this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):Y(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown(!0),!t.isCustom&&t.metadata==="now"&&(t.time=D(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=m(t.time,!0,this._allowSeconds);!this._emitChangeEvent(e)||(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(o=>!o.divider&&!o.disabled),i=[],n;if(t.length){if(this._value!=null){let o=this._findClosestOptionIndex(this._value,e);o>=0&&(e[o].value.time===this._value?i=[e[o].value]:n=o)}else if(typeof this._startTime=="number"){let o=this._findClosestOptionIndex(this._startTime,e);o>=0&&o<e.length&&(n=o)}}let l={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,activeStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:o=>this._onSelect(o),closeCallback:()=>this._closeDropdown(!0),activeChangeCallback:o=>this._adapter.setActiveDescendant(o),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)};this._adapter.attachDropdown(l),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown(t=!1){this._open=!1,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown(),t&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_findClosestOptionIndex(t,e){let i=e.reduce((n,l)=>Math.abs((l.value.time||0)-t)<Math.abs((n.value.time||0)-t)?l:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&this._adapter.setInputValue(i,t)}_generateTimeOptions(){let t=this._min!=null?Math.max(v(this._min),0):0,e=this._max!=null?Math.min(v(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],l=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=I(d),_t=this._restrictedTimes.includes(_),ht=m(_,this._use24HourTime,!1)||"",bt={time:_};n.push({label:ht,value:bt,disabled:_t})}let o=n.findIndex(d=>d.value.time/1e3/60>=720);o>=0&&o<n.length-1&&n.splice(o,0,{label:"",value:null,divider:!0})}if(this._showNow){let o={time:null,metadata:"now"};l.push({label:"Now",value:o})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let o=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});l=[...l,...o]}return l.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),l.forEach((o,d)=>n.splice(d,0,o))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),C(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):m(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t,this._isInitialized&&this._applyMask())}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._adapter.destroyMask(),this._formatInputValue(),this._applyMask()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return m(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return m(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return m(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>m(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return m(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var Tt="<template><slot></slot></template>",kt=":host{display:block}:host([hidden]){display:none}",r=class extends W{constructor(){super();Z.define([rt,K]),H(this,Tt,kt),this._foundation=new T(new g(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=c(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=c(n);break;case s.attributes.MASKED:this.masked=c(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=c(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=c(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=c(n);break;case s.attributes.SHOW_NOW:this.showNow=c(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=c(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=L(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=c(n);break;case s.attributes.DISABLED:this.disabled=c(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=c(n);break}}};p([u()],r.prototype,"value",2),p([u()],r.prototype,"open",2),p([u()],r.prototype,"allowSeconds",2),p([u()],r.prototype,"masked",2),p([u()],r.prototype,"showMaskFormat",2),p([u()],r.prototype,"use24HourTime",2),p([u()],r.prototype,"allowInvalidTime",2),p([u()],r.prototype,"min",2),p([u()],r.prototype,"max",2),p([u()],r.prototype,"restrictedTimes",2),p([u()],r.prototype,"startTime",2),p([u()],r.prototype,"step",2),p([u()],r.prototype,"allowInput",2),p([u()],r.prototype,"showNow",2),p([u()],r.prototype,"showHourOptions",2),p([u()],r.prototype,"customOptions",2),p([u()],r.prototype,"validationCallback",2),p([u()],r.prototype,"parseCallback",2),p([u()],r.prototype,"formatCallback",2),p([u()],r.prototype,"coercionCallback",2),p([u()],r.prototype,"prepareMaskCallback",2),p([u()],r.prototype,"disabled",2),p([u()],r.prototype,"popupClasses",2),p([u()],r.prototype,"allowDropdown",2),p([u()],r.prototype,"popupTarget",2),r=p([R({name:s.elementName,dependencies:[et,tt,ot,w,it,w,at]})],r);var ct=class extends ${constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.masked?this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")}):this._textFieldDelegate.inputElement.addEventListener("input",i=>e(i.target.value))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,l,o,d;let i={props:k({},(l=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:l.props),options:k({},(d=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new nt(i),e.appendChild(this._textFieldDelegate.element)}};function xe(){N(r)}export{s as a,g as b,C as c,m as d,pt as e,ut as f,v as g,M as h,It as i,dt as j,I as k,O as l,mt as m,D as n,Rt as o,T as p,r as q,ct as r,xe as s};
|
|
7
|
+
//# sourceMappingURL=chunk.32SMESZX.js.map
|
|
File without changes
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import{a as h,u as i,w as k}from"./chunk.SALQP6J3.js";import{a as E}from"./chunk.A23NSEWA.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as O}from"./chunk.BSZ2LBJX.js";import{a as L}from"./chunk.3E5QKMHL.js";import{a as C,e as y,g as I}from"./chunk.HN4PXH3D.js";import{k as b,l as S,p as w}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var o,n;r._targets.has(t)&&((o=r._observer)===null||o===void 0||o.unobserve(t)),r._targets.set(t,e),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends E{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),n=o.map(p=>{var m;let s=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?s==null?void 0:s.clientWidth:s==null?void 0:s.clientHeight;return u!=null?u:0}).reduce((p,s)=>p+s,0);if(n<=l)return;let _=n-l;o.slice().reverse().forEach(p=>{if(_<=0)return;let s=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=s-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=l),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',a=class extends L{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,o){switch(e){case i.attributes.ORIENTATION:this.orientation=o;break;case i.attributes.DISABLED:this.disabled=b(o);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(o);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(o);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(o);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],a.prototype,"orientation",2),d([c()],a.prototype,"disabled",2),d([c()],a.prototype,"allowClose",2),d([c()],a.prototype,"autoClose",2),d([c()],a.prototype,"autoCloseThreshold",2),a=d([O({name:i.elementName,dependencies:[k]})],a);function de(){C(a)}export{v as a,g as b,a as c,de as d};
|
|
7
|
-
//# sourceMappingURL=chunk.
|
|
6
|
+
import{a as h,u as i,w as k}from"./chunk.YK2PXI6D.js";import{a as E}from"./chunk.A23NSEWA.js";import{a as c}from"./chunk.B3IJU6XJ.js";import{a as O}from"./chunk.BSZ2LBJX.js";import{a as L}from"./chunk.3E5QKMHL.js";import{a as C,e as y,g as I}from"./chunk.HN4PXH3D.js";import{k as b,l as S,p as w}from"./chunk.G76HB2FK.js";import{f as d}from"./chunk.MCIQXNKY.js";var r=class{static observe(t,e,l){var o,n;r._targets.has(t)&&((o=r._observer)===null||o===void 0||o.unobserve(t)),r._targets.set(t,e),r._countTargets(),(n=r._observer)===null||n===void 0||n.observe(t,l)}static unobserve(t){var e;r._targets.delete(t),(e=r._observer)===null||e===void 0||e.unobserve(t),r._countTargets()}static _countTargets(){r._observer?r._targets.size<1&&(r._observer=void 0):r._targets.size&&(r._observer=new ResizeObserver(r._handleResize))}};r._targets=new Map;r._handleResize=f=>{f.forEach(t=>{var e;(e=r._targets.get(t.target))===null||e===void 0||e(t)})};var v=class extends E{constructor(e){super(e);this._root=I(e,i.selectors.ROOT)}registerSlotListener(e){this._root.addEventListener("slotchange",e)}registerDidOpenListener(e){this._root.addEventListener(h.events.DID_OPEN,e)}registerDidCloseListener(e){this._root.addEventListener(h.events.DID_CLOSE,e)}observeResize(e){r.observe(this._root,e)}unobserveResize(){r.unobserve(this._root)}getSlottedPanels(){let e=this._component.querySelectorAll(i.selectors.PANEL);return Array.from(e)}refitSlottedPanels(e){let l=e==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),n=o.map(p=>{var m;let s=(m=p.shadowRoot)==null?void 0:m.querySelector(h.selectors.ROOT),u=e==="horizontal"?s==null?void 0:s.clientWidth:s==null?void 0:s.clientHeight;return u!=null?u:0}).reduce((p,s)=>p+s,0);if(n<=l)return;let _=n-l;o.slice().reverse().forEach(p=>{if(_<=0)return;let s=p.getContentSize(),u=p.getCollapsibleSize(),m=Math.min(_,u),T=s-m;p.setContentSize(T),_-=m})}};var g=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=w(e=>this._onResize(e),i.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}disconnect(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(i.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(i.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),l=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=l),n.style.setProperty(i.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(i.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(l=>{l.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var P='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',A='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view{display:-webkit-box;display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden;contain:paint size}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}:host([orientation=vertical]) .forge-split-view{-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}',a=class extends L{constructor(){super();y(this,P,A),this._foundation=new g(new v(this))}static get observedAttributes(){return[i.attributes.ORIENTATION,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,l,o){switch(e){case i.attributes.ORIENTATION:this.orientation=o;break;case i.attributes.DISABLED:this.disabled=b(o);break;case i.attributes.ALLOW_CLOSE:this.allowClose=b(o);break;case i.attributes.AUTO_CLOSE:this.autoClose=b(o);break;case i.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=S(o);break}}layerSlottedPanels(e){this._foundation.layerSlottedPanels(e)}unlayerSlottedPanels(){this._foundation.unlayerSlottedPanels()}update(e){this._foundation.update(e)}refit(){this._foundation.refitSlottedPanels()}};d([c()],a.prototype,"orientation",2),d([c()],a.prototype,"disabled",2),d([c()],a.prototype,"allowClose",2),d([c()],a.prototype,"autoClose",2),d([c()],a.prototype,"autoCloseThreshold",2),a=d([O({name:i.elementName,dependencies:[k]})],a);function de(){C(a)}export{v as a,g as b,a as c,de as d};
|
|
7
|
+
//# sourceMappingURL=chunk.E4ZTNVXI.js.map
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{a as H}from"./chunk.DGOV5RDW.js";import{a as I}from"./chunk.NGIBMR3Q.js";import{c as L}from"./chunk.7NXPOEXV.js";import{a as c,d as w}from"./chunk.QJPH24V4.js";import{a as P}from"./chunk.BOENNFXE.js";import{a as O}from"./chunk.A23NSEWA.js";import{a as s}from"./chunk.B3IJU6XJ.js";import{a as x,b as S}from"./chunk.BSZ2LBJX.js";import{a as A}from"./chunk.3E5QKMHL.js";import{a as M,e as D,g as v}from"./chunk.HN4PXH3D.js";import{i as T,r as y,s as k,t as p}from"./chunk.R4NDFXVA.js";import{b as g,c as E,d as C,k as m}from"./chunk.G76HB2FK.js";import{a as f,f as n}from"./chunk.MCIQXNKY.js";var l=`${S}dialog`,B={ANIMATING:"forge-dialog--animating",OPEN:"forge-dialog--open",ACTION_BUTTON:"forge-dialog__action__button",BUTTON_TEXT:"forge-button__text",SCROLLABLE:"forge-dialog--scrollable",FULLSCREEN:"forge-dialog--fullscreen",MOVEABLE:"forge-dialog--moveable"},h={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",POSITION_TYPE:"position-type",POSITION_X:"position-x",POSITION_Y:"position-y",MOVEABLE:"moveable",MOVE_TARGET:"move-target",OPEN:"forge-dialog-open",INITIAL_FOCUS:"forge-dialog-focus",DFEAULT_MOVE_TARGET:"forge-dialog-move-target"},R={CONTAINER:".forge-dialog",SURFACE:".forge-dialog__surface",BACKDROP:c.elementName,INITIAL_FOCUS:`[${h.INITIAL_FOCUS}]`,DFEAULT_MOVE_TARGET:`[${h.DFEAULT_MOVE_TARGET}]`,CONTENT:".forge-dialog__body"},z={BEFORE_CLOSE:`${l}-before-close`,OPEN:`${l}-open`,CLOSE:`${l}-close`,READY:`${l}-ready`,MOVE_START:`${l}-move-start`,MOVED:`${l}-move`,MOVE_END:`${l}-move-end`},F={ANIMATION_DURATION:150,BACKDROP_MAX_OPACITY:.3},i={elementName:l,classes:B,selectors:R,attributes:h,events:z,numbers:F};var u=class{constructor(t){this._adapter=t;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._positionType="absolute";this._positionX=null;this._positionY=null;this._moveable=!1;this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET;this._isAnimating=!1;this._isMoving=!1;this._transitionEndHandler=e=>this._onTransitionEnd(),this._documentKeydownHandler=e=>this._onDocumentKeydown(e),this._backdropClickHandler=e=>this._onBackdropClick(e),this._moveTargetMouseDownHandler=e=>this._onMoveTargetMouseDown(e),this._moveTargetMouseMoveHandler=e=>this._onMoveTargetMouseMove(e),this._moveTargetMouseUpHandler=e=>this._onMoveTargetMouseUp(e)}initialize(){this._adapter.initializeAccessibility(),this._open&&this._moveable&&(this._adapter.setMoveable(this._moveable),this._initMoveTarget())}destroy(){this._open&&(this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}async _applyOpen(t){if(t){if(typeof this._openCallback=="function"&&!await this._executeOpenCallback())return;this._open=t,this._openDialog()}else{if(typeof this._closeCallback=="function"&&!await this._executeCloseCallback())return;this._open=t,this._closeDialog()}this._adapter.toggleHostAttribute(i.attributes.OPEN,this._open)}async _executeOpenCallback(){try{return await Promise.resolve(this._openCallback())!==!1}catch(t){return!1}}async _executeCloseCallback(){try{return await Promise.resolve(this._closeCallback())!==!1}catch(t){return!1}}initializeMoveTarget(){this._moveTarget||(this._moveTarget=i.selectors.DFEAULT_MOVE_TARGET),this._initMoveTarget()}resetPosition(){this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)}async show(t){this._open||(this._open=!0,this._adapter.isConnected||this._adapter.attach(t),await this._openDialog())}async hide(t){!this._open||(this._open=!1,await this._closeDialog(),t&&this._adapter.detach())}_normalizePositionValue(t){return C(t)?`${t}px`:E(t)?t:null}_openDialog(){return this._fullscreen||(this._moveable&&this._adapter.setMoveable(this._moveable),(this._positionX!==null||this._positionY!==null)&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType)),this._adapter.setBodyAttribute(i.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._transitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._adapter.setAnimating(!0),this._isAnimating=!0,window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._setBackdropClickListener(this._backdropClose),this._adapter.emitHostEvent(i.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.isScrollable()&&this._adapter.addRootClass(i.classes.SCROLLABLE)})}),new Promise(t=>{window.setTimeout(()=>{window.requestAnimationFrame(()=>{this._open&&this._isAnimating&&(this._onTransitionEnd(),t())})},i.numbers.ANIMATION_DURATION)})}_closeDialog(){return this._moveTarget&&this._removeDragHandlers(),this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._escapeClose&&this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._backdropClose&&this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._isAnimating=!1,this._moveContext=void 0,this._lastPosition=void 0,this._adapter.setAnimating(!0),this._adapter.setVisibility(!1),this._adapter.setSurfacePosition(null,null,null),new Promise(t=>{setTimeout(()=>{this._adapter.emitHostEvent(i.events.CLOSE),this._adapter.getOpenDialogs(`${i.elementName}[${i.attributes.OPEN}]`).length||this._adapter.removeBodyAttribute(i.attributes.OPEN),this._adapter.setAnimating(!1),t()},i.numbers.ANIMATION_DURATION)})}_onTransitionEnd(){!this._isAnimating||(this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler),this._adapter.setAnimating(!1),this._adapter.emitHostEvent(i.events.READY),this._adapter.tryLayoutChildren(),this._moveable&&this._initMoveTarget(),this._isAnimating=!1)}_initMoveTarget(){!this._fullscreen&&this._moveable&&this._moveTarget&&this._adapter.setMoveTarget(this._moveTarget)&&this._adapter.setMoveTargetHandler("mousedown",this._moveTargetMouseDownHandler)}_removeDragHandlers(){this._adapter.removeDragTargetHandler("mousedown",this._moveTargetMouseDownHandler),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseDown(t){t.preventDefault(),this._adapter.captureActiveElement();let e=this._adapter.getSurfaceBounds();this._moveContext={top:t.clientY-e.top,left:t.clientX-e.left,height:e.height,width:e.width},this._adapter.setDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.setDocumentListener("mouseup",this._moveTargetMouseUpHandler)}_onMoveTargetMouseMove(t){t.preventDefault();let e=this._calculateOffsetPosition(t.pageX,t.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,!this._adapter.emitHostEvent(i.events.MOVE_START,e,!0,!0)))return;let o=this._clampPosition(e,this._moveContext);if((!this._lastPosition||o.x!==this._lastPosition.x||o.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(i.events.MOVED,o,!0,!0)){this._lastPosition=f({},o);let d=this._normalizePositionValue(o.x),N=this._normalizePositionValue(o.y);this._adapter.setSurfacePosition(d,N,"absolute")}}_onMoveTargetMouseUp(t){this._isMoving&&this._adapter.emitHostEvent(i.events.MOVE_END),this._moveComplete()}_moveComplete(){this._adapter.tryRestoreActiveElement(),this._adapter.removeDocumentListener("mousemove",this._moveTargetMouseMoveHandler),this._adapter.removeDocumentListener("mouseup",this._moveTargetMouseUpHandler),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_onDocumentKeydown(t){t.stopPropagation(),t.key&&(t.key==="Escape"||t.key==="Esc")&&this._tryClose()}_onBackdropClick(t){t.stopPropagation(),this._tryClose()}async _tryClose(){if(!!this._adapter.emitHostEvent(i.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())!==!1){this.open=!1;return}}catch(e){return}}}_setBackdropClickListener(t){!this._open||(t&&this._backdropClose?this._adapter.registerBackdropClickHandler(this._backdropClickHandler):t||this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setDocumentKeydownListener(t){!this._open||(t&&this._escapeClose?this._adapter.setDocumentListener("keydown",this._documentKeydownHandler):t||this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler))}_calculateOffsetPosition(t,e,o){return{x:t-((o==null?void 0:o.left)||0),y:e-((o==null?void 0:o.top)||0)}}_clampPosition({x:t,y:e},o){let a=0,d=0;return o&&(a=o.width,d=o.height),t<=0?t=0:t+a>=window.innerWidth&&(t=window.innerWidth-a),e<=0?e=0:e+d>=window.innerHeight&&(e=window.innerHeight-d),{x:t,y:e}}set backdropClose(t){t=Boolean(t),this._backdropClose!==t&&(this._backdropClose=t,this._setBackdropClickListener(this._backdropClose),g(this._backdropClose)?this._adapter.setHostAttribute(i.attributes.BACKDROP_CLOSE,this._backdropClose.toString()):this._adapter.removeHostAttribute(i.attributes.BACKDROP_CLOSE))}get backdropClose(){return this._backdropClose}set escapeClose(t){t=Boolean(t),this._escapeClose!==t&&(this._escapeClose=t,this._setDocumentKeydownListener(this._escapeClose),g(this._escapeClose)?this._adapter.setHostAttribute(i.attributes.ESCAPE_CLOSE,this._escapeClose.toString()):this._adapter.removeHostAttribute(i.attributes.ESCAPE_CLOSE))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(t){this._open!==t&&(t=Boolean(t),t!==this._open&&this._applyOpen(t))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen))}get openCallback(){return this._openCallback}set openCallback(t){this._openCallback=t}get closeCallback(){return this._closeCallback}set closeCallback(t){this._closeCallback=t}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(t){this._beforeCloseCallback=t}get positionType(){return this._positionType}set positionType(t){this._positionType!==t&&(this._positionType=t,this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionX(){return this._positionX}set positionX(t){this._positionX!==t&&(this._positionX=this._normalizePositionValue(t),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get positionY(){return this._positionY}set positionY(t){this._positionY!==t&&(this._positionY=this._normalizePositionValue(t),this._open&&this._adapter.setSurfacePosition(this._positionX,this._positionY,this._positionType))}get moveable(){return this._moveable}set moveable(t){this._moveable!==t&&(this._moveable=t,this._open&&(this._adapter.setMoveable(this._moveable),this._moveable?this._initMoveTarget():(this._removeDragHandlers(),this._isMoving=!1)))}get moveTarget(){return this._moveTarget}set moveTarget(t){this._moveTarget=t}};var b=class extends O{constructor(e){super(e);this._containerElement=v(e,i.selectors.CONTAINER),this._surfaceElement=v(e,i.selectors.SURFACE)}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true")}setAnimating(e){p(this._containerElement,e,i.classes.ANIMATING)}setVisibility(e){p(this._containerElement,e,i.classes.OPEN),this._backdropElement||(this._backdropElement=document.createElement("forge-backdrop"),this._backdropElement.setAttribute("part","scrim"),this._containerElement.appendChild(this._backdropElement)),e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}attach(e=document.body){e.appendChild(this._component)}detach(){this._activeElement&&(this._activeElement=void 0),T(this._component)}registerTransitionEndHandler(e){this._surfaceElement.addEventListener("transitionend",e)}deregisterTransitionEndHandler(e){this._surfaceElement.removeEventListener("transitionend",e)}setDocumentListener(e,o){document.addEventListener(e,o)}removeDocumentListener(e,o){document.removeEventListener(e,o)}registerBackdropClickHandler(e){var o;(o=this._backdropElement)==null||o.addEventListener(c.events.BACKDROP_CLICK,e)}deregisterBackdropClickHandler(e){var o;(o=this._backdropElement)==null||o.removeEventListener(c.events.BACKDROP_CLICK,e)}getOpenDialogs(e){return document.querySelectorAll(e)}setBodyAttribute(e,o){document.body.setAttribute(e,o)}removeBodyAttribute(e){document.body.removeAttribute(e)}trySetInitialFocus(){let e=y(this._component,i.selectors.INITIAL_FOCUS);e&&e.length&&e[e.length-1].focus()}isScrollable(){let e=this._component.querySelector(i.selectors.CONTENT);return e?e.scrollHeight>e.offsetHeight:!1}addRootClass(e){this._component.classList.add(e)}setFullscreen(e){p(this._containerElement,e,i.classes.FULLSCREEN)}setMoveable(e){p(this._containerElement,e,i.classes.MOVEABLE)}tryLayoutChildren(){let e=[P.elementName,H.elementName,L.elementName,I.elementName];Array.from(this._component.querySelectorAll(e.join(","))).filter(a=>typeof a.layout=="function").forEach(a=>a.layout())}setMoveTarget(e){return e?(this._moveTargetElement=this._component.querySelector(e),!!this._moveTargetElement):!1}setMoveTargetHandler(e,o){var a;(a=this._moveTargetElement)==null||a.addEventListener(e,o)}removeDragTargetHandler(e,o){var a;(a=this._moveTargetElement)==null||a.removeEventListener(e,o)}getSurfaceBounds(){return this._surfaceElement.getBoundingClientRect()}setSurfacePosition(e,o,a){a?this._surfaceElement.style.position=a==="absolute"?a:"relative":this._surfaceElement.style.removeProperty("position"),o!==null?this._surfaceElement.style.top=o:this._surfaceElement.style.removeProperty("top"),e!==null?this._surfaceElement.style.left=e:this._surfaceElement.style.removeProperty("left")}captureActiveElement(){var e;this._activeElement=k(),(e=this._activeElement)==null||e.blur()}tryRestoreActiveElement(){this._activeElement&&(this._activeElement.isConnected&&this._activeElement.focus(),this._activeElement=void 0)}};var U='<template><div class="forge-dialog" part="root"><div class="forge-dialog__surface" part="surface"><slot></slot></div></div></template>',K='.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}',r=class extends A{constructor(){super();D(this,U,K),this._foundation=new u(new b(this))}static get observedAttributes(){return[i.attributes.BACKDROP_CLOSE,i.attributes.ESCAPE_CLOSE,i.attributes.OPEN,i.attributes.FULLSCREEN,i.attributes.POSITION_TYPE,i.attributes.POSITION_X,i.attributes.POSITION_Y,i.attributes.MOVEABLE,i.attributes.MOVE_TARGET]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,o,a){switch(e){case i.attributes.BACKDROP_CLOSE:this.backdropClose=a==="true";break;case i.attributes.ESCAPE_CLOSE:this.escapeClose=a==="true";break;case i.attributes.OPEN:this.open=m(a);break;case i.attributes.FULLSCREEN:this.fullscreen=m(a);break;case i.attributes.POSITION_TYPE:this.positionType=a;break;case i.attributes.POSITION_X:this.positionX=a;break;case i.attributes.POSITION_Y:this.positionY=a;break;case i.attributes.MOVEABLE:this.moveable=m(a);break;case i.attributes.MOVE_TARGET:this.moveTarget=a;break}}initializeMoveTarget(){this._foundation.initializeMoveTarget()}resetPosition(){this._foundation.resetPosition()}show(e){return this._foundation.show(e)}hide(e){return this._foundation.hide(e)}};n([s()],r.prototype,"backdropClose",2),n([s()],r.prototype,"escapeClose",2),n([s()],r.prototype,"open",2),n([s()],r.prototype,"fullscreen",2),n([s()],r.prototype,"openCallback",2),n([s()],r.prototype,"closeCallback",2),n([s()],r.prototype,"beforeCloseCallback",2),n([s()],r.prototype,"positionType",2),n([s()],r.prototype,"positionX",2),n([s()],r.prototype,"positionY",2),n([s()],r.prototype,"moveable",2),n([s()],r.prototype,"moveTarget",2),r=n([x({name:i.elementName,dependencies:[w]})],r);function De(){M(r)}export{i as a,u as b,b as c,r as d,De as e};
|
|
7
|
+
//# sourceMappingURL=chunk.VQKRN5IQ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/dialog/dialog-constants.ts", "../../src/dialog/dialog-foundation.ts", "../../src/dialog/dialog-adapter.ts", "../../src/dialog/dialog.ts", "../../src/dialog/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\nimport { BACKDROP_CONSTANTS } from '../backdrop';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}dialog`;\n\nconst classes = {\n ANIMATING: 'forge-dialog--animating',\n OPEN: 'forge-dialog--open',\n ACTION_BUTTON: 'forge-dialog__action__button',\n BUTTON_TEXT: 'forge-button__text',\n SCROLLABLE: 'forge-dialog--scrollable',\n FULLSCREEN: 'forge-dialog--fullscreen',\n MOVEABLE: 'forge-dialog--moveable'\n};\n\nconst attributes = {\n BACKDROP_CLOSE: 'backdrop-close',\n ESCAPE_CLOSE: 'escape-close',\n FULLSCREEN: 'fullscreen',\n POSITION_TYPE: 'position-type',\n POSITION_X: 'position-x',\n POSITION_Y: 'position-y',\n MOVEABLE: 'moveable',\n MOVE_TARGET: 'move-target',\n OPEN: 'forge-dialog-open',\n INITIAL_FOCUS: 'forge-dialog-focus',\n DFEAULT_MOVE_TARGET: 'forge-dialog-move-target'\n};\n\nconst selectors = {\n CONTAINER: '.forge-dialog',\n SURFACE: '.forge-dialog__surface',\n BACKDROP: BACKDROP_CONSTANTS.elementName,\n INITIAL_FOCUS: `[${attributes.INITIAL_FOCUS}]`,\n DFEAULT_MOVE_TARGET: `[${attributes.DFEAULT_MOVE_TARGET}]`,\n CONTENT: '.forge-dialog__body'\n};\n\nconst events = {\n BEFORE_CLOSE: `${elementName}-before-close`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n READY: `${elementName}-ready`,\n MOVE_START: `${elementName}-move-start`,\n MOVED: `${elementName}-move`,\n MOVE_END: `${elementName}-move-end`\n};\n\nconst numbers = {\n ANIMATION_DURATION: 150,\n BACKDROP_MAX_OPACITY: 0.3\n};\n\nexport const DIALOG_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes,\n events,\n numbers\n};\n\nexport interface IDialogMoveEventData {\n x: number;\n y: number;\n}\n\nexport interface IDialogMoveContext {\n top: number;\n left: number;\n height: number;\n width: number;\n}\n\nexport interface IDialogMoveStartEventData extends IDialogMoveEventData {}\n\nexport type DialogPositionType = 'absolute' | 'relative';\nexport type DialogStateCallback = () => boolean | void | Promise<boolean | void>;\n", "import { ICustomElementFoundation, isDefined, isNumber, isString } from '@tylertech/forge-core';\nimport { IDialogAdapter } from './dialog-adapter';\nimport { DialogPositionType, DialogStateCallback, DIALOG_CONSTANTS, IDialogMoveContext, IDialogMoveStartEventData } from './dialog-constants';\n\nexport interface IDialogFoundation extends ICustomElementFoundation {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: DialogStateCallback;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n show(parent?: HTMLElement): Promise<void>;\n hide(remove?: boolean): Promise<void>;\n}\n\nexport class DialogFoundation implements IDialogFoundation {\n // Private vars\n private _open = false;\n private _backdropClose = true;\n private _escapeClose = true;\n private _fullscreen = false;\n private _openCallback: DialogStateCallback;\n private _closeCallback: DialogStateCallback;\n private _beforeCloseCallback: DialogStateCallback;\n private _positionType: DialogPositionType = 'absolute';\n private _positionX: string | null = null;\n private _positionY: string | null = null;\n private _moveable = false;\n private _moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n private _isAnimating = false;\n private _isMoving = false;\n private _moveContext: IDialogMoveContext | undefined;\n private _lastPosition: { x: number; y: number } | undefined;\n\n // Event handlers\n private _transitionEndHandler: (evt: TransitionEvent) => void;\n private _documentKeydownHandler: (evt: KeyboardEvent) => void;\n private _backdropClickHandler: (evt: CustomEvent) => void;\n private _moveTargetMouseDownHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseMoveHandler: (evt: MouseEvent) => void;\n private _moveTargetMouseUpHandler: (evt: MouseEvent) => void;\n\n constructor(public _adapter: IDialogAdapter) {\n this._transitionEndHandler = (evt: TransitionEvent) => this._onTransitionEnd();\n this._documentKeydownHandler = (evt: KeyboardEvent) => this._onDocumentKeydown(evt);\n this._backdropClickHandler = (evt: CustomEvent) => this._onBackdropClick(evt);\n this._moveTargetMouseDownHandler = (evt: MouseEvent) => this._onMoveTargetMouseDown(evt);\n this._moveTargetMouseMoveHandler = (evt: MouseEvent) => this._onMoveTargetMouseMove(evt);\n this._moveTargetMouseUpHandler = (evt: MouseEvent) => this._onMoveTargetMouseUp(evt);\n }\n\n public initialize(): void {\n this._adapter.initializeAccessibility();\n if (this._open) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n this._initMoveTarget();\n }\n }\n }\n\n public destroy(): void {\n if (this._open) {\n this._removeDragHandlers();\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private async _applyOpen(value: boolean): Promise<void> {\n if (value) {\n if (typeof this._openCallback === 'function' && !await this._executeOpenCallback()) {\n return;\n }\n this._open = value;\n this._openDialog();\n } else {\n if (typeof this._closeCallback === 'function' && !await this._executeCloseCallback()) {\n return;\n }\n this._open = value;\n this._closeDialog();\n }\n\n this._adapter.toggleHostAttribute(DIALOG_CONSTANTS.attributes.OPEN, this._open);\n }\n\n private async _executeOpenCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._openCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n private async _executeCloseCallback(): Promise<boolean> {\n try {\n return await Promise.resolve(this._closeCallback()) !== false;\n } catch (e) {\n return false;\n }\n }\n\n public initializeMoveTarget(): void {\n if (!this._moveTarget) {\n this._moveTarget = DIALOG_CONSTANTS.selectors.DFEAULT_MOVE_TARGET;\n }\n this._initMoveTarget();\n }\n\n public resetPosition(): void {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n\n public async show(parent?: HTMLElement): Promise<void> {\n if (this._open) {\n return;\n }\n \n this._open = true;\n if (!this._adapter.isConnected) {\n this._adapter.attach(parent);\n }\n await this._openDialog();\n }\n\n public async hide(remove?: boolean): Promise<void> {\n if (!this._open) {\n return;\n }\n\n this._open = false;\n await this._closeDialog();\n if (remove) {\n this._adapter.detach();\n }\n }\n\n private _normalizePositionValue(value: number | string | null | undefined): string | null {\n if (isNumber(value)) {\n return `${value}px`;\n } else if (isString(value)) {\n return value;\n }\n return null;\n }\n\n private _openDialog(): Promise<void> {\n if (!this._fullscreen) {\n if (this._moveable) {\n this._adapter.setMoveable(this._moveable);\n }\n if (this._positionX !== null || this._positionY !== null) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n\n this._adapter.setBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN, 'true');\n this._adapter.registerTransitionEndHandler(this._transitionEndHandler);\n this._setDocumentKeydownListener(this._escapeClose);\n this._adapter.setAnimating(true);\n this._isAnimating = true;\n\n // Ensure transitions are triggered properly\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n this._adapter.setVisibility(true);\n this._setBackdropClickListener(this._backdropClose); // Must come after setting visibility because the backdrop may not yet exist\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.OPEN);\n this._adapter.trySetInitialFocus();\n if (this._adapter.isScrollable()) {\n this._adapter.addRootClass(DIALOG_CONSTANTS.classes.SCROLLABLE);\n }\n });\n });\n\n return new Promise<void>(resolve => {\n // Wait for the dialog to finish animating open, then emit the ready event and attach any listeners\n window.setTimeout(() => {\n window.requestAnimationFrame(() => {\n if (this._open && this._isAnimating) {\n this._onTransitionEnd();\n resolve();\n }\n });\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n });\n }\n\n private _closeDialog(): Promise<void> {\n if (this._moveTarget) {\n this._removeDragHandlers();\n }\n\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n\n if (this._escapeClose) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n if (this._backdropClose) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n\n this._isAnimating = false;\n this._moveContext = undefined;\n this._lastPosition = undefined;\n this._adapter.setAnimating(true);\n this._adapter.setVisibility(false);\n this._adapter.setSurfacePosition(null, null, null);\n\n return new Promise<void>(resolve => {\n setTimeout(() => {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.CLOSE);\n const openDialogs = this._adapter.getOpenDialogs(`${DIALOG_CONSTANTS.elementName}[${DIALOG_CONSTANTS.attributes.OPEN}]`);\n if (!openDialogs.length) {\n this._adapter.removeBodyAttribute(DIALOG_CONSTANTS.attributes.OPEN);\n }\n this._adapter.setAnimating(false);\n resolve();\n }, DIALOG_CONSTANTS.numbers.ANIMATION_DURATION);\n });\n }\n\n private _onTransitionEnd(): void {\n if (!this._isAnimating) {\n return;\n }\n this._adapter.deregisterTransitionEndHandler(this._transitionEndHandler);\n this._adapter.setAnimating(false);\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.READY);\n this._adapter.tryLayoutChildren();\n if (this._moveable) {\n this._initMoveTarget();\n }\n this._isAnimating = false;\n }\n\n private _initMoveTarget(): void {\n if (!this._fullscreen && this._moveable && this._moveTarget && this._adapter.setMoveTarget(this._moveTarget)) {\n this._adapter.setMoveTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n }\n }\n\n private _removeDragHandlers(): void {\n this._adapter.removeDragTargetHandler('mousedown', this._moveTargetMouseDownHandler);\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseDown(evt: MouseEvent): void {\n evt.preventDefault();\n this._adapter.captureActiveElement();\n const bounds = this._adapter.getSurfaceBounds();\n this._moveContext = {\n top: evt.clientY - bounds.top,\n left: evt.clientX - bounds.left,\n height: bounds.height,\n width: bounds.width\n };\n this._adapter.setDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.setDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n }\n\n private _onMoveTargetMouseMove(evt: MouseEvent): void {\n evt.preventDefault();\n const position = this._calculateOffsetPosition(evt.pageX, evt.pageY, this._moveContext);\n\n // If this is the beginning of the move sequence, we emit the start event (to allow for preventing default) and\n // then update the surface position if not prevented\n if (!this._isMoving) {\n this._isMoving = true;\n const canDrag = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_START, position as IDialogMoveStartEventData, true, true);\n if (!canDrag) {\n return;\n }\n }\n\n // Ensure that the surface position stays within the bounds of the screen\n const newPosition = this._clampPosition(position, this._moveContext);\n\n // Only update the position if it actually changed\n if (!this._lastPosition || newPosition.x !== this._lastPosition.x || newPosition.y !== this._lastPosition.y) {\n const canMove = this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVED, newPosition as IDialogMoveStartEventData, true, true);\n if (canMove) {\n this._lastPosition = { ...newPosition };\n const newX = this._normalizePositionValue(newPosition.x);\n const newY = this._normalizePositionValue(newPosition.y);\n this._adapter.setSurfacePosition(newX, newY, 'absolute');\n }\n }\n }\n\n private _onMoveTargetMouseUp(evt: MouseEvent): void {\n if (this._isMoving) {\n this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.MOVE_END);\n }\n this._moveComplete();\n }\n\n private _moveComplete(): void {\n this._adapter.tryRestoreActiveElement();\n this._adapter.removeDocumentListener('mousemove', this._moveTargetMouseMoveHandler);\n this._adapter.removeDocumentListener('mouseup', this._moveTargetMouseUpHandler);\n this._lastPosition = undefined;\n this._moveContext = undefined;\n this._isMoving = false;\n }\n\n private _onDocumentKeydown(evt: KeyboardEvent): void {\n evt.stopPropagation();\n if (evt.key && (evt.key === 'Escape' || evt.key === 'Esc')) {\n this._tryClose();\n }\n }\n\n private _onBackdropClick(evt: CustomEvent): void {\n evt.stopPropagation();\n this._tryClose();\n }\n\n private async _tryClose(): Promise<void> {\n const isCancelled = !this._adapter.emitHostEvent(DIALOG_CONSTANTS.events.BEFORE_CLOSE, undefined, undefined, true);\n if (isCancelled) {\n return;\n }\n\n if (!this._beforeCloseCallback) {\n this.open = false;\n return;\n }\n\n try {\n const shouldClose = await Promise.resolve(this._beforeCloseCallback()) !== false;\n if (shouldClose) {\n this.open = false;\n return;\n }\n } catch (err) {\n return;\n }\n }\n\n private _setBackdropClickListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && this._backdropClose) {\n this._adapter.registerBackdropClickHandler(this._backdropClickHandler);\n } else if (!attach) {\n this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler);\n }\n }\n\n private _setDocumentKeydownListener(attach: boolean): void {\n if (!this._open) {\n return;\n }\n\n if (attach && this._escapeClose) {\n this._adapter.setDocumentListener('keydown', this._documentKeydownHandler);\n } else if (!attach) {\n this._adapter.removeDocumentListener('keydown', this._documentKeydownHandler);\n }\n }\n\n private _calculateOffsetPosition(pageX: number, pageY: number, context?: IDialogMoveContext): { x: number; y: number } {\n return {\n x: pageX - (context?.left || 0),\n y: pageY - (context?.top || 0)\n };\n }\n\n private _clampPosition({ x, y }: { x: number; y: number }, context?: IDialogMoveContext): { x: number; y: number } {\n let width = 0;\n let height = 0;\n\n if (context) {\n width = context.width;\n height = context.height;\n }\n\n if (x <= 0) {\n x = 0;\n } else if (x + width >= window.innerWidth) {\n x = window.innerWidth - width;\n }\n\n if (y <= 0) {\n y = 0;\n } else if (y + height >= window.innerHeight) {\n y = window.innerHeight - height;\n }\n\n return { x, y };\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. */\n public set backdropClose(value: boolean) {\n value = Boolean(value);\n if (this._backdropClose !== value) {\n this._backdropClose = value;\n\n this._setBackdropClickListener(this._backdropClose);\n\n if (isDefined(this._backdropClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE, this._backdropClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE);\n }\n }\n }\n public get backdropClose(): boolean {\n return this._backdropClose;\n }\n\n /** Controls whether pressing the escape key closes the dialog or not. */\n public set escapeClose(value: boolean) {\n value = Boolean(value);\n if (this._escapeClose !== value) {\n this._escapeClose = value;\n this._setDocumentKeydownListener(this._escapeClose);\n if (isDefined(this._escapeClose)) {\n this._adapter.setHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE, this._escapeClose.toString());\n } else {\n this._adapter.removeHostAttribute(DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE);\n }\n }\n }\n public get escapeClose(): boolean {\n return this._escapeClose;\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n value = Boolean(value);\n if (value !== this._open) {\n this._applyOpen(value);\n }\n }\n }\n\n public get fullscreen(): boolean {\n return this._fullscreen;\n }\n public set fullscreen(value: boolean) {\n if (this._fullscreen !== value) {\n this._fullscreen = value;\n this._adapter.setFullscreen(this._fullscreen);\n }\n }\n\n public get openCallback(): DialogStateCallback {\n return this._openCallback;\n }\n public set openCallback(callback: DialogStateCallback) {\n this._openCallback = callback;\n }\n\n public get closeCallback(): DialogStateCallback {\n return this._closeCallback;\n }\n public set closeCallback(callback: DialogStateCallback) {\n this._closeCallback = callback;\n }\n\n public get beforeCloseCallback(): DialogStateCallback {\n return this._beforeCloseCallback;\n }\n public set beforeCloseCallback(callback: DialogStateCallback) {\n this._beforeCloseCallback = callback;\n }\n\n public get positionType(): DialogPositionType {\n return this._positionType;\n }\n public set positionType(value: DialogPositionType) {\n if (this._positionType !== value) {\n this._positionType = value;\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionX(): number | string | null | undefined {\n return this._positionX;\n }\n public set positionX(value: number | string | null | undefined) {\n if (this._positionX !== value) {\n this._positionX = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get positionY(): number | string | null | undefined {\n return this._positionY;\n }\n public set positionY(value: number | string | null | undefined) {\n if (this._positionY !== value) {\n this._positionY = this._normalizePositionValue(value);\n if (this._open) {\n this._adapter.setSurfacePosition(this._positionX, this._positionY, this._positionType);\n }\n }\n }\n\n public get moveable(): boolean {\n return this._moveable;\n }\n public set moveable(value: boolean) {\n if (this._moveable !== value) {\n this._moveable = value;\n if (this._open) {\n this._adapter.setMoveable(this._moveable);\n if (this._moveable) {\n this._initMoveTarget();\n } else {\n this._removeDragHandlers();\n this._isMoving = false;\n }\n }\n }\n }\n\n public get moveTarget(): string {\n return this._moveTarget;\n }\n public set moveTarget(value: string) {\n this._moveTarget = value;\n }\n}\n", "import { getShadowElement, removeElement, deepQuerySelectorAll, getActiveElement, toggleClass } from '@tylertech/forge-core';\nimport { BACKDROP_CONSTANTS, IBackdropComponent } from '../backdrop';\nimport { CHECKBOX_CONSTANTS } from '../checkbox';\nimport { BaseAdapter, IBaseAdapter } from '../core/base/base-adapter';\nimport { ICON_BUTTON_CONSTANTS } from '../icon-button';\nimport { RADIO_CONSTANTS } from '../radio';\nimport { SWITCH_CONSTANTS } from '../switch';\nimport { IDialogComponent } from './dialog';\nimport { DialogPositionType, DIALOG_CONSTANTS } from './dialog-constants';\n\nexport interface IDialogAdapter extends IBaseAdapter {\n initializeAccessibility(): void;\n setAnimating(animating: boolean): void;\n setVisibility(visible: boolean): void;\n attach(parent?: HTMLElement): void;\n detach(): void;\n setDocumentListener(type: string, listener: (evt: Event) => void): void;\n removeDocumentListener(type: string, listener: (evt: Event) => void): void;\n registerTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n deregisterTransitionEndHandler: (handler: (evt: TransitionEvent) => void) => void;\n registerBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n deregisterBackdropClickHandler: (handler: (evt: CustomEvent) => void) => void;\n getOpenDialogs: (selector: string) => NodeListOf<HTMLElement>;\n setBodyAttribute: (name: string, value: string) => void;\n removeBodyAttribute: (name: string) => void;\n trySetInitialFocus: () => void;\n isScrollable(): boolean;\n addRootClass(name: string): void;\n setFullscreen(value: boolean): void;\n setMoveable(value: boolean): void;\n tryLayoutChildren(): void;\n setMoveTarget(selector: string): boolean;\n setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void;\n getSurfaceBounds(): DOMRect;\n setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void;\n captureActiveElement(): void;\n tryRestoreActiveElement(): void;\n}\n\n/**\n * Provides facilities for interacting with the internal DOM of `DialogComponent`.\n */\nexport class DialogAdapter extends BaseAdapter<IDialogComponent> implements IDialogAdapter {\n private _backdropElement?: IBackdropComponent;\n private _containerElement: HTMLElement;\n private _surfaceElement: HTMLElement;\n private _moveTargetElement: HTMLElement | null;\n private _activeElement: HTMLElement | undefined;\n\n constructor(component: IDialogComponent) {\n super(component);\n this._containerElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.CONTAINER);\n this._surfaceElement = getShadowElement(component, DIALOG_CONSTANTS.selectors.SURFACE);\n }\n\n public initializeAccessibility(): void {\n if (!this._component.hasAttribute('role')) {\n this._component.setAttribute('role', 'dialog');\n }\n this._component.setAttribute('aria-modal', 'true');\n }\n\n public setAnimating(animating: boolean): void {\n toggleClass(this._containerElement, animating, DIALOG_CONSTANTS.classes.ANIMATING);\n }\n\n public setVisibility(visible: boolean): void {\n toggleClass(this._containerElement, visible, DIALOG_CONSTANTS.classes.OPEN);\n\n if (!this._backdropElement) {\n this._backdropElement = document.createElement('forge-backdrop');\n this._backdropElement.setAttribute('part', 'scrim');\n this._containerElement.appendChild(this._backdropElement);\n }\n \n if (visible) {\n this._backdropElement.fadeIn();\n } else {\n this._backdropElement.fadeOut();\n }\n }\n\n public attach(parent: HTMLElement = document.body): void {\n parent.appendChild(this._component);\n }\n\n public detach(): void {\n if (this._activeElement) {\n this._activeElement = undefined;\n }\n removeElement(this._component);\n }\n\n public registerTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.addEventListener('transitionend', handler);\n }\n\n public deregisterTransitionEndHandler(handler: (evt: TransitionEvent) => void): void {\n this._surfaceElement.removeEventListener('transitionend', handler);\n }\n\n public setDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.addEventListener(type, listener);\n }\n\n public removeDocumentListener(type: string, listener: (evt: Event) => void): void {\n document.removeEventListener(type, listener);\n }\n\n public registerBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement?.addEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public deregisterBackdropClickHandler(handler: (evt: CustomEvent) => void): void {\n this._backdropElement?.removeEventListener(BACKDROP_CONSTANTS.events.BACKDROP_CLICK, handler);\n }\n\n public getOpenDialogs(selector: string): NodeListOf<HTMLElement> {\n return document.querySelectorAll(selector);\n }\n\n public setBodyAttribute(name: string, value: string): void {\n document.body.setAttribute(name, value);\n }\n\n public removeBodyAttribute(name: string): void {\n document.body.removeAttribute(name);\n }\n\n public trySetInitialFocus(): void {\n const elements = deepQuerySelectorAll(this._component, DIALOG_CONSTANTS.selectors.INITIAL_FOCUS);\n if (elements && elements.length) {\n const initialElement = elements[elements.length - 1] as HTMLElement;\n initialElement.focus();\n }\n }\n\n public isScrollable(): boolean {\n const contentElement = this._component.querySelector(DIALOG_CONSTANTS.selectors.CONTENT) as HTMLElement;\n if (contentElement) {\n return contentElement.scrollHeight > contentElement.offsetHeight;\n }\n return false;\n }\n\n public addRootClass(name: string): void {\n this._component.classList.add(name);\n }\n\n public setFullscreen(value: boolean): void {\n toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.FULLSCREEN);\n }\n\n public setMoveable(value: boolean): void {\n toggleClass(this._containerElement, value, DIALOG_CONSTANTS.classes.MOVEABLE);\n }\n\n public tryLayoutChildren(): void {\n const layoutChildren = [ICON_BUTTON_CONSTANTS.elementName, SWITCH_CONSTANTS.elementName, CHECKBOX_CONSTANTS.elementName, RADIO_CONSTANTS.elementName];\n const commonLayoutElements = Array.from(this._component.querySelectorAll(layoutChildren.join(','))) as any[];\n commonLayoutElements.filter(el => typeof el.layout === 'function').forEach(el => el.layout());\n }\n\n public setMoveTarget(selector: string): boolean {\n if (!selector) {\n return false;\n }\n this._moveTargetElement = this._component.querySelector(selector);\n return !!this._moveTargetElement;\n }\n\n public setMoveTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._moveTargetElement?.addEventListener(type, listener);\n }\n\n public removeDragTargetHandler(type: string, listener: (evt: MouseEvent) => void): void {\n this._moveTargetElement?.removeEventListener(type, listener);\n }\n\n public getSurfaceBounds(): DOMRect {\n return this._surfaceElement.getBoundingClientRect() as DOMRect;\n }\n\n public setSurfacePosition(x: string | null, y: string | null, positionType: DialogPositionType | null): void {\n if (positionType) {\n this._surfaceElement.style.position = positionType === 'absolute' ? positionType : 'relative';\n } else {\n this._surfaceElement.style.removeProperty('position');\n }\n\n if (y !== null) {\n this._surfaceElement.style.top = y;\n } else {\n this._surfaceElement.style.removeProperty('top');\n }\n\n if (x !== null) {\n this._surfaceElement.style.left = x;\n } else {\n this._surfaceElement.style.removeProperty('left');\n }\n }\n\n public captureActiveElement(): void {\n this._activeElement = getActiveElement() as HTMLElement;\n this._activeElement?.blur();\n }\n\n public tryRestoreActiveElement(): void {\n if (this._activeElement) {\n if (this._activeElement.isConnected) {\n this._activeElement.focus();\n }\n this._activeElement = undefined;\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, coerceBoolean, FoundationProperty } from '@tylertech/forge-core';\n\nimport { DialogFoundation } from './dialog-foundation';\nimport { DialogAdapter } from './dialog-adapter';\nimport { DIALOG_CONSTANTS, DialogPositionType, IDialogMoveStartEventData, IDialogMoveEventData, DialogStateCallback } from './dialog-constants';\nimport { BackdropComponent } from '../backdrop';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\n\nconst template = '<template><div class=\\\"forge-dialog\\\" part=\\\"root\\\"><div class=\\\"forge-dialog__surface\\\" part=\\\"surface\\\"><slot></slot></div></div></template>';\nconst styles = '.forge-dialog{position:fixed;top:0;bottom:0;left:0;right:0;z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-align:center;align-items:center;-webkit-box-align:var(--forge-dialog-align-items,center);align-items:var(--forge-dialog-align-items,center);top:0;top:var(--forge-dialog-top,0);padding:24px;padding:var(--forge-dialog-padding,24px);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;visibility:hidden}@media (max-width:599px){.forge-dialog{padding:0}}.forge-dialog--moveable:not(.forge-dialog--fullscreen) ::slotted([forge-dialog-move-target]){cursor:move}.forge-dialog--animating{visibility:visible}.forge-dialog--animating .forge-dialog--open .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--animating .forge-dialog__surface{-webkit-transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 150ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 150ms 0s cubic-bezier(0, 0, .2, 1)}.forge-dialog--scrollable .forge-dialog__footer,.forge-dialog--scrollable .forge-dialog__title{border-color:rgba(0,0,0,.12)}.forge-dialog--open{visibility:visible!important}.forge-dialog--open .forge-dialog__surface{-webkit-transform:scale(1);transform:scale(1);opacity:1}.forge-dialog__surface{-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface,#fff);width:auto;width:var(--forge-dialog-width,auto);height:auto;height:var(--forge-dialog-height,auto);min-width:280px;min-width:var(--forge-dialog-min-width,280px);max-width:100%;max-width:var(--forge-dialog-max-width,100%);max-height:100%;max-height:var(--forge-dialog-max-height,100%);border-radius:4px;border-radius:var(--forge-dialog-border-radius,var(--mdc-shape-medium,4px));display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:scale(.8);transform:scale(.8);opacity:0;overflow:hidden;z-index:inherit}.forge-dialog__header{margin:0;padding:0 24px 9px;border-bottom:1px solid transparent}.forge-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;font-size:var(--forge-typography-title-font-size, 1.25rem);line-height:2rem;line-height:var(--forge-typography-title-line-height, 2rem);font-weight:400;font-weight:var(--forge-typography-title-font-weight,400);letter-spacing:.0125em;letter-spacing:var(--forge-typography-title-letter-spacing, .0125em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-title-text-decoration,inherit);text-decoration:var(--forge-typography-title-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-title-text-transform,inherit);-webkit-box-sizing:border-box;box-sizing:border-box;margin:0}.forge-dialog__title::before{display:inline-block;width:0;height:40px;content:\\\"\\\";vertical-align:0}.forge-dialog__body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight,400);letter-spacing:.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, .03125em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-decoration:var(--mdc-typography-body1-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform,inherit);padding-top:20px;padding:0 24px 24px;overflow:auto}.forge-dialog__body--scrollable{max-height:195px;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);overflow-x:auto;overflow-y:scroll;-webkit-overflow-scrolling:touch}.forge-dialog__footer{display:-webkit-box;display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;-webkit-box-align:center;align-items:center;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-sizing:border-box;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}.forge-dialog--fullscreen{padding:0}.forge-dialog--fullscreen .forge-dialog__surface{height:100%;width:100%;min-width:auto;max-width:100%;border-radius:0}:host{display:block}:host([hidden]){display:none}';\n\nexport interface IDialogComponent extends IBaseComponent {\n backdropClose: boolean;\n escapeClose: boolean;\n open: boolean;\n fullscreen: boolean;\n openCallback: DialogStateCallback;\n closeCallback: DialogStateCallback;\n beforeCloseCallback: () => boolean | Promise<boolean>;\n positionType: DialogPositionType;\n positionX: number | string | null | undefined;\n positionY: number | string | null | undefined;\n moveable: boolean;\n moveTarget: string;\n initializeMoveTarget(): void;\n resetPosition(): void;\n show(parent?: HTMLElement): Promise<void>;\n hide(remove?: boolean): Promise<void>;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-dialog': IDialogComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-dialog-before-close': CustomEvent<void>;\n 'forge-dialog-open': CustomEvent<void>;\n 'forge-dialog-close': CustomEvent<void>;\n 'forge-dialog-ready': CustomEvent<void>;\n 'forge-dialog-move-start': CustomEvent<IDialogMoveStartEventData>;\n 'forge-dialog-move': CustomEvent<IDialogMoveEventData>;\n 'forge-dialog-move-end': CustomEvent<void>;\n }\n}\n\n/**\n * The web component class behind the `<forge-dialog>` custom element.\n * \n * @tag forge-dialog\n */\n@CustomElement({\n name: DIALOG_CONSTANTS.elementName,\n dependencies: [BackdropComponent]\n})\nexport class DialogComponent extends BaseComponent implements IDialogComponent {\n public static get observedAttributes(): string[] {\n return [\n DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE,\n DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE,\n DIALOG_CONSTANTS.attributes.OPEN,\n DIALOG_CONSTANTS.attributes.FULLSCREEN,\n DIALOG_CONSTANTS.attributes.POSITION_TYPE,\n DIALOG_CONSTANTS.attributes.POSITION_X,\n DIALOG_CONSTANTS.attributes.POSITION_Y,\n DIALOG_CONSTANTS.attributes.MOVEABLE,\n DIALOG_CONSTANTS.attributes.MOVE_TARGET\n ];\n }\n\n private _foundation: DialogFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new DialogFoundation(new DialogAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.destroy();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DIALOG_CONSTANTS.attributes.BACKDROP_CLOSE:\n this.backdropClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.ESCAPE_CLOSE:\n this.escapeClose = newValue === 'true';\n break;\n case DIALOG_CONSTANTS.attributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.FULLSCREEN:\n this.fullscreen = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_TYPE:\n this.positionType = newValue as DialogPositionType;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_X:\n this.positionX = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.POSITION_Y:\n this.positionY = newValue;\n break;\n case DIALOG_CONSTANTS.attributes.MOVEABLE:\n this.moveable = coerceBoolean(newValue);\n break;\n case DIALOG_CONSTANTS.attributes.MOVE_TARGET:\n this.moveTarget = newValue;\n break;\n }\n }\n\n /** Controls whether clicking the backdrop closes the dialog or not. Default is true. */\n @FoundationProperty()\n public backdropClose: boolean;\n\n /** Controls whether pressing the escape key closes the dialog or not. Default is true. */\n @FoundationProperty()\n public escapeClose: boolean;\n\n /** Controls whether the dialog is open or not. Default is false. */\n @FoundationProperty()\n public open: boolean;\n\n /** Controls whether the dialog is full screen or not. Default is false. */\n @FoundationProperty()\n public fullscreen: boolean;\n\n /** The function to call when the dialog wants to open. */\n @FoundationProperty()\n public openCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public closeCallback: DialogStateCallback;\n\n /** the function to call when the dialog wants to close. */\n @FoundationProperty()\n public beforeCloseCallback: () => boolean | Promise<boolean>;\n\n /** Gets/sets the position type when using custom positioning values. Default is 'absolute'. */\n @FoundationProperty()\n public positionType: DialogPositionType;\n\n /** Controls the horizontal position of the dialog surface. */\n @FoundationProperty()\n public positionX: number | string | null | undefined;\n\n /** Controls the vertical position of the dialog surface. */\n @FoundationProperty()\n public positionY: number | string | null | undefined;\n\n /** Gets/sets whether the dialog surface can be moved or not. */\n @FoundationProperty()\n public moveable: boolean;\n\n /** Gets/sets the selector used to target the element that is used as the drag target. */\n @FoundationProperty()\n public moveTarget: string;\n\n public initializeMoveTarget(): void {\n this._foundation.initializeMoveTarget();\n }\n\n public resetPosition(): void {\n this._foundation.resetPosition();\n }\n\n public show(parent?: HTMLElement): Promise<void> {\n return this._foundation.show(parent);\n }\n public hide(remove?: boolean): Promise<void> {\n return this._foundation.hide(remove);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { DialogComponent } from './dialog';\n\nexport * from './dialog-adapter';\nexport * from './dialog-constants';\nexport * from './dialog-foundation';\nexport * from './dialog';\n\nexport function defineDialogComponent(): void {\n defineCustomElement(DialogComponent);\n}\n"],
|
|
5
|
+
"mappings": "qlBAGA,GAAM,GAA2C,GAAG,UAE9C,EAAU,CACd,UAAW,0BACX,KAAM,qBACN,cAAe,+BACf,YAAa,qBACb,WAAY,2BACZ,WAAY,2BACZ,SAAU,wBACZ,EAEM,EAAa,CACjB,eAAgB,iBAChB,aAAc,eACd,WAAY,aACZ,cAAe,gBACf,WAAY,aACZ,WAAY,aACZ,SAAU,WACV,YAAa,cACb,KAAM,oBACN,cAAe,qBACf,oBAAqB,0BACvB,EAEM,EAAY,CAChB,UAAW,gBACX,QAAS,yBACT,SAAU,EAAmB,YAC7B,cAAe,IAAI,EAAW,iBAC9B,oBAAqB,IAAI,EAAW,uBACpC,QAAS,qBACX,EAEM,EAAS,CACb,aAAc,GAAG,iBACjB,KAAM,GAAG,SACT,MAAO,GAAG,UACV,MAAO,GAAG,UACV,WAAY,GAAG,eACf,MAAO,GAAG,SACV,SAAU,GAAG,YACf,EAEM,EAAU,CACd,mBAAoB,IACpB,qBAAsB,EACxB,EAEa,EAAmB,CAC9B,cACA,UACA,YACA,aACA,SACA,SACF,ECrCO,GAAM,GAAN,KAAoD,CA2B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