@sellmate/design-system 1.0.57 → 1.0.58
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/dist/cjs/sd-modal-container.cjs.entry.js +20 -0
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +20 -0
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-fbac6160.entry.js +1 -0
- package/dist/esm/sd-modal-container.entry.js +20 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +3 -0
- package/hydrate/index.js +20 -0
- package/hydrate/index.mjs +20 -0
- package/package.json +1 -1
- package/dist/design-system/p-aedd45f7.entry.js +0 -1
|
@@ -16,6 +16,8 @@ const SdModalContainer = class {
|
|
|
16
16
|
isBackdropVisible = false;
|
|
17
17
|
contentRef;
|
|
18
18
|
containerDismissTimerId;
|
|
19
|
+
previousBodyOverflow = null;
|
|
20
|
+
bodyScrollLocked = false;
|
|
19
21
|
handleKeydown(e) {
|
|
20
22
|
if (e.key === 'Escape') {
|
|
21
23
|
const top = this.getTopEntry();
|
|
@@ -71,6 +73,7 @@ const SdModalContainer = class {
|
|
|
71
73
|
},
|
|
72
74
|
];
|
|
73
75
|
this.isVisible = true;
|
|
76
|
+
this.setBodyScrollLock(true);
|
|
74
77
|
requestAnimationFrame(() => {
|
|
75
78
|
if (!this.contentRef)
|
|
76
79
|
return;
|
|
@@ -156,6 +159,22 @@ const SdModalContainer = class {
|
|
|
156
159
|
});
|
|
157
160
|
if (this.containerDismissTimerId)
|
|
158
161
|
clearTimeout(this.containerDismissTimerId);
|
|
162
|
+
this.setBodyScrollLock(false);
|
|
163
|
+
}
|
|
164
|
+
setBodyScrollLock(lock) {
|
|
165
|
+
if (typeof document === 'undefined')
|
|
166
|
+
return;
|
|
167
|
+
if (lock === this.bodyScrollLocked)
|
|
168
|
+
return;
|
|
169
|
+
if (lock) {
|
|
170
|
+
this.previousBodyOverflow = document.body.style.overflow || '';
|
|
171
|
+
document.body.style.overflow = 'hidden';
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
document.body.style.overflow = this.previousBodyOverflow ?? '';
|
|
175
|
+
this.previousBodyOverflow = null;
|
|
176
|
+
}
|
|
177
|
+
this.bodyScrollLocked = lock;
|
|
159
178
|
}
|
|
160
179
|
getTopEntry() {
|
|
161
180
|
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
@@ -190,6 +209,7 @@ const SdModalContainer = class {
|
|
|
190
209
|
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
191
210
|
this.entries = nextEntries;
|
|
192
211
|
if (nextEntries.length === 0) {
|
|
212
|
+
this.setBodyScrollLock(false);
|
|
193
213
|
this.containerDismissTimerId = setTimeout(() => {
|
|
194
214
|
if ((this.entries ?? []).length === 0) {
|
|
195
215
|
this.isVisible = false;
|
|
@@ -8,6 +8,8 @@ export class SdModalContainer {
|
|
|
8
8
|
isBackdropVisible = false;
|
|
9
9
|
contentRef;
|
|
10
10
|
containerDismissTimerId;
|
|
11
|
+
previousBodyOverflow = null;
|
|
12
|
+
bodyScrollLocked = false;
|
|
11
13
|
handleKeydown(e) {
|
|
12
14
|
if (e.key === 'Escape') {
|
|
13
15
|
const top = this.getTopEntry();
|
|
@@ -63,6 +65,7 @@ export class SdModalContainer {
|
|
|
63
65
|
},
|
|
64
66
|
];
|
|
65
67
|
this.isVisible = true;
|
|
68
|
+
this.setBodyScrollLock(true);
|
|
66
69
|
requestAnimationFrame(() => {
|
|
67
70
|
if (!this.contentRef)
|
|
68
71
|
return;
|
|
@@ -148,6 +151,22 @@ export class SdModalContainer {
|
|
|
148
151
|
});
|
|
149
152
|
if (this.containerDismissTimerId)
|
|
150
153
|
clearTimeout(this.containerDismissTimerId);
|
|
154
|
+
this.setBodyScrollLock(false);
|
|
155
|
+
}
|
|
156
|
+
setBodyScrollLock(lock) {
|
|
157
|
+
if (typeof document === 'undefined')
|
|
158
|
+
return;
|
|
159
|
+
if (lock === this.bodyScrollLocked)
|
|
160
|
+
return;
|
|
161
|
+
if (lock) {
|
|
162
|
+
this.previousBodyOverflow = document.body.style.overflow || '';
|
|
163
|
+
document.body.style.overflow = 'hidden';
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
document.body.style.overflow = this.previousBodyOverflow ?? '';
|
|
167
|
+
this.previousBodyOverflow = null;
|
|
168
|
+
}
|
|
169
|
+
this.bodyScrollLocked = lock;
|
|
151
170
|
}
|
|
152
171
|
getTopEntry() {
|
|
153
172
|
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
@@ -182,6 +201,7 @@ export class SdModalContainer {
|
|
|
182
201
|
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
183
202
|
this.entries = nextEntries;
|
|
184
203
|
if (nextEntries.length === 0) {
|
|
204
|
+
this.setBodyScrollLock(false);
|
|
185
205
|
this.containerDismissTimerId = setTimeout(() => {
|
|
186
206
|
if ((this.entries ?? []).length === 0) {
|
|
187
207
|
this.isVisible = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as e,t as i}from"./p-D-pFdq6g.js";import{d as o}from"./p-DkMewZNL.js";import{d as a}from"./p-CKl79fdN.js";import{d as n}from"./p-B3CfLqLu.js";import{d}from"./p-DSYw-7RA.js";import{d as r}from"./p-C9GMwYKA.js";let l=0;const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const e="modal-"+ ++l,i=this.createConfirmModal(e,t);return this.attachModalEventListeners(e,i),this.registerEntry(e,i,s,{persistent:!!t.persistent}),e}async createCustom(t,s,e){const i="modal-"+ ++l;return t.setAttribute("data-modal-id",i),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(i,t),this.registerEntry(i,t,e,{persistent:!!s.persistent}),i}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,e,i){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,modalRef:e,persistent:i.persistent,closing:!1}],this.isVisible=!0,requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async dismissById(t,s){this.requestDismiss(t,s)}async update(t,s){const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&this.applyProps(e.modalEl,s)}createConfirmModal(t,s){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",t),e.classList.add("sd-modal-container__modal"),this.applyProps(e,s),e}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const e=(this.entries??[]).find((s=>s.id===t));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const i=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:i}:s)),"confirm"===s?e.modalRef._triggerOk():"cancel"===s?e.modalRef._triggerCancel():"close"===s&&e.modalRef._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const e=(this.entries??[]).filter((s=>s.id!==t));this.entries=e,0===e.length&&(this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.modalRef._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,e){null!=e&&t.setAttribute(s,e)}render(){return this.isVisible?e("div",{class:"sd-modal-container"},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),e("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}static get style(){return"sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 9999);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}"}},[512,"sd-modal-container",{entries:[32],isVisible:[32],isBackdropVisible:[32],open:[64],createCustom:[64],dismissById:[64],update:[64]},[[8,"keydown","handleKeydown"]]]),m=c,h=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button-v2","sd-confirm-modal","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-modal-container":customElements.get(i(t))||customElements.define(i(t),c);break;case"sd-button-v2":customElements.get(i(t))||o();break;case"sd-confirm-modal":customElements.get(i(t))||a();break;case"sd-ghost-button":customElements.get(i(t))||n();break;case"sd-icon":customElements.get(i(t))||d();break;case"sd-tag":customElements.get(i(t))||r()}}))};export{m as SdModalContainer,h as defineCustomElement}
|
|
1
|
+
import{p as t,H as s,h as e,t as i}from"./p-D-pFdq6g.js";import{d as o}from"./p-DkMewZNL.js";import{d as a}from"./p-CKl79fdN.js";import{d as n}from"./p-B3CfLqLu.js";import{d}from"./p-DSYw-7RA.js";import{d as r}from"./p-C9GMwYKA.js";let l=0;const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;previousBodyOverflow=null;bodyScrollLocked=!1;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const e="modal-"+ ++l,i=this.createConfirmModal(e,t);return this.attachModalEventListeners(e,i),this.registerEntry(e,i,s,{persistent:!!t.persistent}),e}async createCustom(t,s,e){const i="modal-"+ ++l;return t.setAttribute("data-modal-id",i),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(i,t),this.registerEntry(i,t,e,{persistent:!!s.persistent}),i}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,e,i){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,modalRef:e,persistent:i.persistent,closing:!1}],this.isVisible=!0,this.setBodyScrollLock(!0),requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async dismissById(t,s){this.requestDismiss(t,s)}async update(t,s){const e=(this.entries??[]).find((s=>s.id===t));e&&!e.closing&&this.applyProps(e.modalEl,s)}createConfirmModal(t,s){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",t),e.classList.add("sd-modal-container__modal"),this.applyProps(e,s),e}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId),this.setBodyScrollLock(!1)}setBodyScrollLock(t){"undefined"!=typeof document&&t!==this.bodyScrollLocked&&(t?(this.previousBodyOverflow=document.body.style.overflow||"",document.body.style.overflow="hidden"):(document.body.style.overflow=this.previousBodyOverflow??"",this.previousBodyOverflow=null),this.bodyScrollLocked=t)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const e=(this.entries??[]).find((s=>s.id===t));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const i=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:i}:s)),"confirm"===s?e.modalRef._triggerOk():"cancel"===s?e.modalRef._triggerCancel():"close"===s&&e.modalRef._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const e=(this.entries??[]).filter((s=>s.id!==t));this.entries=e,0===e.length&&(this.setBodyScrollLock(!1),this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.modalRef._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,e){null!=e&&t.setAttribute(s,e)}render(){return this.isVisible?e("div",{class:"sd-modal-container"},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),e("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}static get style(){return"sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 9999);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}"}},[512,"sd-modal-container",{entries:[32],isVisible:[32],isBackdropVisible:[32],open:[64],createCustom:[64],dismissById:[64],update:[64]},[[8,"keydown","handleKeydown"]]]),m=c,h=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button-v2","sd-confirm-modal","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-modal-container":customElements.get(i(t))||customElements.define(i(t),c);break;case"sd-button-v2":customElements.get(i(t))||o();break;case"sd-confirm-modal":customElements.get(i(t))||a();break;case"sd-ghost-button":customElements.get(i(t))||n();break;case"sd-icon":customElements.get(i(t))||d();break;case"sd-tag":customElements.get(i(t))||r()}}))};export{m as SdModalContainer,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-DsU722JF.js";export{s as setNonce}from"./p-DsU722JF.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l(JSON.parse('[["p-1cf60275",[[512,"sd-button-v2",{"name":[1],"label":[1],"icon":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1]}],[512,"sd-icon",{"name":[1],"size":[8],"color":[1],"rotate":[2],"label":[1],"iconStyle":[16]}]]],["p-3686b44e",[[772,"sd-table",{"columns":[16],"rows":[1040],"selected":[1040],"rowKey":[1,"row-key"],"selectable":[4],"resizable":[4],"width":[1],"height":[1],"stickyHeader":[4,"sticky-header"],"stickyColumn":[16],"noDataLabel":[1,"no-data-label"],"isLoading":[4,"is-loading"],"pagination":[16],"useInternalPagination":[4,"use-internal-pagination"],"useRowsPerPageSelect":[4,"use-rows-per-page-select"],"rowsPerPageOption":[16],"useVirtualScroll":[16],"virtualRowHeight":[2,"virtual-row-height"],"virtualColumnWidth":[2,"virtual-column-width"],"virtualBufferSize":[16],"currentPage":[32],"innerRows":[32],"innerSelected":[32],"columnWidths":[32],"scrolledLeft":[32],"scrolledRight":[32],"virtualStartIndex":[32],"virtualEndIndex":[32],"scrollTopPosition":[32],"virtualStartColIdx":[32],"virtualEndColIdx":[32],"scrollLeftPosition":[32]},null,{"columns":[{"handleColumnsChange":0}],"useVirtualScroll":[{"handleUseVirtualScrollChange":0}],"virtualColumnWidth":[{"handleVirtualColumnWidthChange":0}],"selectable":[{"handleSelectableChange":0}],"stickyColumn":[{"handleStickyColumnChange":0}],"columnWidths":[{"handleColumnWidthsChange":0}],"rows":[{"handleRowsChange":0}],"selected":[{"handleSelectedChange":0}],"pagination":[{"handlePaginationChange":0}]}]]],["p-cf7d46cf",[[512,"sd-select-multiple",{"value":[1040],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"useAll":[4,"use-all"],"useCheckbox":[4,"use-checkbox"],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"optionRenderer":[16],"isOpen":[32],"itemIndex":[32],"isScrolled":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"isOpen":[{"isOpenChanged":0}]}]]],["p-6aaacaef",[[772,"sd-select-group",{"value":[1032],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"containerStyle":[16],"triggerStyle":[16],"dropdownStyle":[16],"optionStyle":[16],"labelStyle":[16],"optionRenderer":[16],"filteredOptions":[32],"isOpen":[32],"searchText":[32],"itemIndex":[32],"isScrolled":[32],"isDropdownReady":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"options":[{"optionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}],"isOpen":[{"isOpenChanged":0}]}]]],["p-cee768a2",[[772,"sd-select-multiple-group",{"value":[1040],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"clearable":[4],"searchable":[4],"useCheckbox":[4,"use-checkbox"],"useAll":[4,"use-all"],"allCheckedLabel":[1,"all-checked-label"],"allCheckOptionLabel":[1,"all-check-option-label"],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"containerStyle":[16],"triggerStyle":[16],"dropdownStyle":[16],"optionStyle":[16],"labelStyle":[16],"optionRenderer":[16],"filteredOptions":[32],"isOpen":[32],"searchText":[32],"itemIndex":[32],"isScrolled":[32],"isDropdownReady":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"options":[{"optionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}],"isOpen":[{"isOpenChanged":0}]}]]],["p-d8a3e32d",[[512,"sd-select-v2",{"name":[1],"value":[1032],"options":[16],"placeholder":[1],"maxDropdownWidth":[1,"max-dropdown-width"],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"label":[1],"addonLabel":[1,"addon-label"],"error":[1028],"hint":[1],"errorMessage":[1,"error-message"],"fieldName":[1,"field-name"],"rules":[16],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"emitValue":[4,"emit-value"],"width":[8],"isOpen":[32],"isAnimatingOut":[32],"triggerWidth":[32],"resolvedDropdownHeight":[32],"resolvedMaxDropdownWidth":[32],"focused":[32],"hovered":[32]},null,{"isOpen":[{"watchIsOpen":0}]}]]],["p-8187020e",[[514,"sd-date-picker",{"value":[1537],"label":[1],"selectable":[16],"disabled":[4],"placeholder":[1],"isOpen":[32]}]]],["p-5ba8caa2",[[514,"sd-date-range-picker",{"value":[1040],"label":[1],"selectable":[16],"maxRange":[2,"max-range"],"disabled":[4],"placeholder":[1],"isOpen":[32],"dateRange":[32],"hoverDate":[32],"prevYear":[32],"prevMonth":[32]},null,{"value":[{"onValueChange":0}]}]]],["p-efe684e6",[[772,"sd-barcode-input",{"value":[1032],"size":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"clearable":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputClass":[1,"input-class"],"readonly":[4],"error":[1028],"focused":[1028],"hovered":[1028],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-dee605b1",[[512,"sd-file-picker",{"value":[1040],"placeholder":[1],"disabled":[4],"inline":[4],"multiple":[4],"accept":[1],"maxFileSize":[8,"max-file-size"],"maxTotalSize":[8,"max-total-size"],"maxFiles":[8,"max-files"],"name":[1],"label":[1],"addonLabel":[1,"addon-label"],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"rules":[16],"error":[1028],"status":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"focused":[1028],"hovered":[1028],"internalValue":[32],"showTooltip":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"value":[{"valueChanged":0}]}]]],["p-aedd45f7",[[512,"sd-modal-container",{"entries":[32],"isVisible":[32],"isBackdropVisible":[32],"open":[64],"createCustom":[64],"dismissById":[64],"update":[64]},[[8,"keydown","handleKeydown"]]]]],["p-dea33b4d",[[512,"sd-number-input",{"size":[1],"min":[2],"max":[2],"step":[2],"useButton":[4,"use-button"],"useDecimal":[4,"use-decimal"],"value":[1032],"label":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputPrefix":[1,"input-prefix"],"inputSuffix":[1,"input-suffix"],"inputClass":[1,"input-class"],"readonly":[4],"inputStyle":[16],"error":[1028],"focused":[1028],"hovered":[1028],"internalValue":[32],"displayValue":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-c2a0f10d",[[512,"sd-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"readonly":[4],"autoFocus":[4,"auto-focus"],"textareaClass":[1,"textarea-class"],"textareaStyle":[16],"maxLength":[2,"max-length"],"rows":[2],"spellcheck":[4],"width":[8],"label":[1],"addonLabel":[1,"addon-label"],"hint":[1],"errorMessage":[1,"error-message"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[1028],"status":[1],"focused":[1028],"hovered":[1028],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-5db2b37b",[[512,"sd-popover",{"show":[1028],"placement":[513],"color":[513],"icon":[513],"iconSize":[514,"icon-size"],"label":[1],"buttonSize":[513,"button-size"],"buttonVariant":[513,"button-variant"],"menuTitle":[513,"title"],"messages":[16],"buttons":[16],"menuClass":[1,"menu-class"],"noHover":[4,"no-hover"],"useClose":[4,"use-close"],"showPopover":[32],"slotContent":[32]},null,{"show":[{"watchShowHandler":0}]}]]],["p-10dd9343",[[772,"sd-action-modal",{"modalTitle":[1,"modal-title"],"buttonProps":[16]}]]],["p-3fdfb2ed",[[512,"sd-guide",{"type":[1],"label":[1],"message":[1],"guideUrl":[1,"guide-url"],"popupTitle":[1,"popup-title"],"popupWidth":[2,"popup-width"],"popupShow":[32]}]]],["p-184649a9",[[512,"sd-toast",{"icon":[1],"message":[1],"link":[1],"linkLabel":[1,"link-label"],"useClose":[4,"use-close"],"type":[1]}]]],["p-266ff86b",[[512,"sd-toast-container",{"position":[1],"maxVisible":[2,"max-visible"],"defaultDuration":[2,"default-duration"],"zIndex":[2,"z-index"],"toasts":[32],"expanded":[32],"create":[64],"dismiss":[64],"dismissAll":[64]}]]],["p-99bcc635",[[512,"sd-dropdown-button",{"name":[1],"label":[1],"items":[16],"disabled":[4],"isOpen":[32],"isAnimatingOut":[32],"itemIndex":[32],"sdOpen":[64],"sdClose":[64]},null,{"isOpen":[{"handleOpenChange":0}]}]]],["p-fd11ac4d",[[512,"sd-tag",{"name":[1],"label":[1],"icon":[1],"isLeft":[4,"is-left"]}]]],["p-43512d46",[[512,"sd-tabs",{"value":[1537],"tabs":[1040],"size":[1],"isSub":[4,"is-sub"]},null,{"value":[{"valueChanged":0}]}]]],["p-74079256",[[512,"sd-radio-group",{"value":[1032],"options":[1040],"direction":[1],"disabled":[4],"groupName":[1,"group-name"]},null,{"value":[{"valueChanged":0}]}]]],["p-8f947287",[[512,"sd-text-link",{"label":[1],"icon":[1],"iconColor":[1,"icon-color"],"labelClass":[1,"label-class"],"useArrow":[4,"use-arrow"],"underline":[4],"disabled":[4]}]]],["p-3b824d36",[[512,"sd-badge",{"color":[1],"label":[1]}]]],["p-3fff78c7",[[772,"sd-card",{"bordered":[4],"sdClass":[1,"sd-class"]}]]],["p-eb11f6cc",[[772,"sd-form",{"formClass":[1,"form-class"],"sdRegisterField":[64],"sdUnregisterField":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64]}]]],["p-4e13256e",[[512,"sd-progress",{"type":[1],"error":[4],"percentage":[2],"size":[2],"strokeWidth":[2,"stroke-width"],"label":[1]}]]],["p-0c026571",[[512,"sd-radio-button-group",{"value":[1032],"options":[1040],"size":[1],"disabled":[4],"name":[1]}]]],["p-99b6157f",[[512,"sd-toggle",{"value":[1028],"label":[1],"disabled":[4]}]]],["p-391cf704",[[512,"sd-toggle-button",{"value":[1540],"label":[1],"disabled":[4],"isActive":[32]}]]],["p-00e236e1",[[772,"sd-confirm-modal",{"type":[1],"modalTitle":[1,"modal-title"],"titleClass":[1,"title-class"],"topMessage":[16],"bottomMessage":[16],"mainButtonName":[1,"main-button-name"],"mainButtonLabel":[1,"main-button-label"],"subButtonLabel":[1,"sub-button-label"],"tagPreset":[1,"tag-preset"],"tagLabel":[1,"tag-label"],"slotLabel":[1,"slot-label"],"tagContents":[16],"hasSlottedContent":[32]}]]],["p-7a18a52b",[[514,"sd-calendar",{"value":[1537],"selectable":[16],"events":[16],"eventColors":[16],"currentYear":[32],"currentMonth":[32],"eventsRevision":[32]},null,{"value":[{"handleValueChange":0}],"events":[{"handleEventsChange":0}],"eventColors":[{"handleEventsChange":0}]}]]],["p-2a25b3dc",[[512,"sd-radio",{"value":[1032],"disabled":[4],"val":[8],"label":[1]}]]],["p-d5b5cfc7",[[512,"sd-checkbox",{"value":[1028],"val":[8],"disabled":[4],"label":[1],"isChecked":[32]},null,{"value":[{"watchValueHandler":0}]}]]],["p-c7c0aa6c",[[512,"sd-select-v2-listbox",{"name":[1],"options":[16],"value":[8],"emitValue":[4,"emit-value"],"triggerWidth":[1,"trigger-width"],"maxWidth":[1,"max-width"],"maxHeight":[1,"max-height"],"searchKeyword":[32],"isScrolled":[32],"focusedIndex":[32]},null,{"searchKeyword":[{"resetFocusOnFilter":0}]}],[512,"sd-select-v2-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"isOpen":[4,"is-open"]}]]],["p-3f657bf8",[[512,"sd-select-option-group",{"option":[16],"index":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"optionStyle":[16],"disabled":[4],"useCheckbox":[4,"use-checkbox"],"useIndicator":[4,"use-indicator"],"countInfo":[16],"isHovered":[32],"isDisabled":[64]}]]],["p-47f068ca",[[772,"sd-portal",{"to":[1],"parentRef":[16],"offset":[16],"viewportPadding":[2,"viewport-padding"],"zIndex":[2,"z-index"],"open":[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]],{"open":[{"handleOpenChange":0}]}]]],["p-5213773b",[[512,"sd-ghost-button",{"icon":[1],"size":[1],"intent":[1],"ariaLabel":[1,"aria-label"],"disabled":[4]}]]],["p-fdf7ed87",[[772,"sd-field",{"name":[1],"rules":[16],"error":[1028],"disabled":[1028],"hovered":[1028],"focused":[1028],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"errorMsg":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64],"sdFocus":[64]}],[512,"sd-tooltip",{"trigger":[1],"placement":[1],"color":[1],"tooltipType":[1,"tooltip-type"],"icon":[1],"iconSize":[2,"icon-size"],"label":[1],"buttonSize":[1,"button-size"],"buttonVariant":[1,"button-variant"],"noHover":[4,"no-hover"],"sdClass":[1,"sd-class"],"showTooltip":[32],"slotContentHTML":[32]}],[772,"sd-floating-portal",{"to":[1],"parentRef":[16],"offset":[16],"zIndex":[2,"z-index"],"placement":[1],"open":[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]]],[512,"sd-button",{"variant":[1],"size":[1],"color":[1],"label":[1],"disabled":[4],"type":[1],"icon":[1],"iconColor":[1,"icon-color"],"iconSize":[2,"icon-size"],"iconRight":[1,"icon-right"],"noHover":[4,"no-hover"],"sdClass":[1,"sd-class"]}]]],["p-a7e4994e",[[512,"sd-select",{"value":[1032],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"optionRenderer":[16],"isOpen":[32],"itemIndex":[32],"isScrolled":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"isOpen":[{"isOpenChanged":0}]}],[512,"sd-pagination",{"currentPage":[2,"current-page"],"lastPage":[2,"last-page"],"simple":[4]}],[512,"sd-loading-spinner",{"color":[1]}]]],["p-85e22acd",[[514,"sd-date-box",{"date":[8],"disabled":[4],"selected":[4],"isStartDate":[4,"is-start-date"],"isEndDate":[4,"is-end-date"],"isToday":[4,"is-today"],"inRange":[4,"in-range"],"type":[1]}]]],["p-15c051cb",[[512,"sd-select-v2-list-item",{"option":[16],"depth":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"useCheckbox":[4,"use-checkbox"],"countInfo":[16]}],[512,"sd-select-v2-list-item-search",{"isScrolled":[4,"is-scrolled"],"searchText":[32],"sdFocus":[64]}]]],["p-4e9413c0",[[512,"sd-select-search-input",{"isScrolled":[4,"is-scrolled"],"searchText":[1,"search-text"],"sdGetNativeElement":[64],"sdSearchInputFocus":[64]}],[772,"sd-input",{"value":[1032],"type":[1],"size":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"clearable":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"autocomplete":[1],"maxlength":[2],"minlength":[2],"inputmode":[1],"enterkeyhint":[1],"spellcheck":[4],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputClass":[1,"input-class"],"readonly":[4],"error":[1028],"focused":[1028],"hovered":[1028],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"internalValue":[32],"passwordVisible":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-09369f2c",[[772,"sd-select-dropdown",{"itemIndex":[1026,"item-index"],"value":[8],"options":[16],"width":[1],"dropdownHeight":[1,"dropdown-height"],"searchable":[4],"optionPlaceholder":[1,"option-placeholder"],"useCheckbox":[4,"use-checkbox"],"useAll":[4,"use-all"],"filteredOptions":[32],"searchText":[32],"isScrolled":[32],"isDropdownReady":[32]},null,{"filteredOptions":[{"filteredOptionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}]}],[512,"sd-select-option",{"option":[16],"index":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"optionStyle":[16],"disabled":[4],"useCheckbox":[4,"use-checkbox"],"isHovered":[32],"sdIsDisabled":[64]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as l}from"./p-DsU722JF.js";export{s as setNonce}from"./p-DsU722JF.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l(JSON.parse('[["p-1cf60275",[[512,"sd-button-v2",{"name":[1],"label":[1],"icon":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1]}],[512,"sd-icon",{"name":[1],"size":[8],"color":[1],"rotate":[2],"label":[1],"iconStyle":[16]}]]],["p-3686b44e",[[772,"sd-table",{"columns":[16],"rows":[1040],"selected":[1040],"rowKey":[1,"row-key"],"selectable":[4],"resizable":[4],"width":[1],"height":[1],"stickyHeader":[4,"sticky-header"],"stickyColumn":[16],"noDataLabel":[1,"no-data-label"],"isLoading":[4,"is-loading"],"pagination":[16],"useInternalPagination":[4,"use-internal-pagination"],"useRowsPerPageSelect":[4,"use-rows-per-page-select"],"rowsPerPageOption":[16],"useVirtualScroll":[16],"virtualRowHeight":[2,"virtual-row-height"],"virtualColumnWidth":[2,"virtual-column-width"],"virtualBufferSize":[16],"currentPage":[32],"innerRows":[32],"innerSelected":[32],"columnWidths":[32],"scrolledLeft":[32],"scrolledRight":[32],"virtualStartIndex":[32],"virtualEndIndex":[32],"scrollTopPosition":[32],"virtualStartColIdx":[32],"virtualEndColIdx":[32],"scrollLeftPosition":[32]},null,{"columns":[{"handleColumnsChange":0}],"useVirtualScroll":[{"handleUseVirtualScrollChange":0}],"virtualColumnWidth":[{"handleVirtualColumnWidthChange":0}],"selectable":[{"handleSelectableChange":0}],"stickyColumn":[{"handleStickyColumnChange":0}],"columnWidths":[{"handleColumnWidthsChange":0}],"rows":[{"handleRowsChange":0}],"selected":[{"handleSelectedChange":0}],"pagination":[{"handlePaginationChange":0}]}]]],["p-cf7d46cf",[[512,"sd-select-multiple",{"value":[1040],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"useAll":[4,"use-all"],"useCheckbox":[4,"use-checkbox"],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"optionRenderer":[16],"isOpen":[32],"itemIndex":[32],"isScrolled":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"isOpen":[{"isOpenChanged":0}]}]]],["p-6aaacaef",[[772,"sd-select-group",{"value":[1032],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"containerStyle":[16],"triggerStyle":[16],"dropdownStyle":[16],"optionStyle":[16],"labelStyle":[16],"optionRenderer":[16],"filteredOptions":[32],"isOpen":[32],"searchText":[32],"itemIndex":[32],"isScrolled":[32],"isDropdownReady":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"options":[{"optionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}],"isOpen":[{"isOpenChanged":0}]}]]],["p-cee768a2",[[772,"sd-select-multiple-group",{"value":[1040],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"clearable":[4],"searchable":[4],"useCheckbox":[4,"use-checkbox"],"useAll":[4,"use-all"],"allCheckedLabel":[1,"all-checked-label"],"allCheckOptionLabel":[1,"all-check-option-label"],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"containerStyle":[16],"triggerStyle":[16],"dropdownStyle":[16],"optionStyle":[16],"labelStyle":[16],"optionRenderer":[16],"filteredOptions":[32],"isOpen":[32],"searchText":[32],"itemIndex":[32],"isScrolled":[32],"isDropdownReady":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"options":[{"optionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}],"isOpen":[{"isOpenChanged":0}]}]]],["p-d8a3e32d",[[512,"sd-select-v2",{"name":[1],"value":[1032],"options":[16],"placeholder":[1],"maxDropdownWidth":[1,"max-dropdown-width"],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"label":[1],"addonLabel":[1,"addon-label"],"error":[1028],"hint":[1],"errorMessage":[1,"error-message"],"fieldName":[1,"field-name"],"rules":[16],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"emitValue":[4,"emit-value"],"width":[8],"isOpen":[32],"isAnimatingOut":[32],"triggerWidth":[32],"resolvedDropdownHeight":[32],"resolvedMaxDropdownWidth":[32],"focused":[32],"hovered":[32]},null,{"isOpen":[{"watchIsOpen":0}]}]]],["p-8187020e",[[514,"sd-date-picker",{"value":[1537],"label":[1],"selectable":[16],"disabled":[4],"placeholder":[1],"isOpen":[32]}]]],["p-5ba8caa2",[[514,"sd-date-range-picker",{"value":[1040],"label":[1],"selectable":[16],"maxRange":[2,"max-range"],"disabled":[4],"placeholder":[1],"isOpen":[32],"dateRange":[32],"hoverDate":[32],"prevYear":[32],"prevMonth":[32]},null,{"value":[{"onValueChange":0}]}]]],["p-efe684e6",[[772,"sd-barcode-input",{"value":[1032],"size":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"clearable":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputClass":[1,"input-class"],"readonly":[4],"error":[1028],"focused":[1028],"hovered":[1028],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-dee605b1",[[512,"sd-file-picker",{"value":[1040],"placeholder":[1],"disabled":[4],"inline":[4],"multiple":[4],"accept":[1],"maxFileSize":[8,"max-file-size"],"maxTotalSize":[8,"max-total-size"],"maxFiles":[8,"max-files"],"name":[1],"label":[1],"addonLabel":[1,"addon-label"],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"rules":[16],"error":[1028],"status":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"focused":[1028],"hovered":[1028],"internalValue":[32],"showTooltip":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"value":[{"valueChanged":0}]}]]],["p-fbac6160",[[512,"sd-modal-container",{"entries":[32],"isVisible":[32],"isBackdropVisible":[32],"open":[64],"createCustom":[64],"dismissById":[64],"update":[64]},[[8,"keydown","handleKeydown"]]]]],["p-dea33b4d",[[512,"sd-number-input",{"size":[1],"min":[2],"max":[2],"step":[2],"useButton":[4,"use-button"],"useDecimal":[4,"use-decimal"],"value":[1032],"label":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputPrefix":[1,"input-prefix"],"inputSuffix":[1,"input-suffix"],"inputClass":[1,"input-class"],"readonly":[4],"inputStyle":[16],"error":[1028],"focused":[1028],"hovered":[1028],"internalValue":[32],"displayValue":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-c2a0f10d",[[512,"sd-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"readonly":[4],"autoFocus":[4,"auto-focus"],"textareaClass":[1,"textarea-class"],"textareaStyle":[16],"maxLength":[2,"max-length"],"rows":[2],"spellcheck":[4],"width":[8],"label":[1],"addonLabel":[1,"addon-label"],"hint":[1],"errorMessage":[1,"error-message"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[1028],"status":[1],"focused":[1028],"hovered":[1028],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-5db2b37b",[[512,"sd-popover",{"show":[1028],"placement":[513],"color":[513],"icon":[513],"iconSize":[514,"icon-size"],"label":[1],"buttonSize":[513,"button-size"],"buttonVariant":[513,"button-variant"],"menuTitle":[513,"title"],"messages":[16],"buttons":[16],"menuClass":[1,"menu-class"],"noHover":[4,"no-hover"],"useClose":[4,"use-close"],"showPopover":[32],"slotContent":[32]},null,{"show":[{"watchShowHandler":0}]}]]],["p-10dd9343",[[772,"sd-action-modal",{"modalTitle":[1,"modal-title"],"buttonProps":[16]}]]],["p-3fdfb2ed",[[512,"sd-guide",{"type":[1],"label":[1],"message":[1],"guideUrl":[1,"guide-url"],"popupTitle":[1,"popup-title"],"popupWidth":[2,"popup-width"],"popupShow":[32]}]]],["p-184649a9",[[512,"sd-toast",{"icon":[1],"message":[1],"link":[1],"linkLabel":[1,"link-label"],"useClose":[4,"use-close"],"type":[1]}]]],["p-266ff86b",[[512,"sd-toast-container",{"position":[1],"maxVisible":[2,"max-visible"],"defaultDuration":[2,"default-duration"],"zIndex":[2,"z-index"],"toasts":[32],"expanded":[32],"create":[64],"dismiss":[64],"dismissAll":[64]}]]],["p-99bcc635",[[512,"sd-dropdown-button",{"name":[1],"label":[1],"items":[16],"disabled":[4],"isOpen":[32],"isAnimatingOut":[32],"itemIndex":[32],"sdOpen":[64],"sdClose":[64]},null,{"isOpen":[{"handleOpenChange":0}]}]]],["p-fd11ac4d",[[512,"sd-tag",{"name":[1],"label":[1],"icon":[1],"isLeft":[4,"is-left"]}]]],["p-43512d46",[[512,"sd-tabs",{"value":[1537],"tabs":[1040],"size":[1],"isSub":[4,"is-sub"]},null,{"value":[{"valueChanged":0}]}]]],["p-74079256",[[512,"sd-radio-group",{"value":[1032],"options":[1040],"direction":[1],"disabled":[4],"groupName":[1,"group-name"]},null,{"value":[{"valueChanged":0}]}]]],["p-8f947287",[[512,"sd-text-link",{"label":[1],"icon":[1],"iconColor":[1,"icon-color"],"labelClass":[1,"label-class"],"useArrow":[4,"use-arrow"],"underline":[4],"disabled":[4]}]]],["p-3b824d36",[[512,"sd-badge",{"color":[1],"label":[1]}]]],["p-3fff78c7",[[772,"sd-card",{"bordered":[4],"sdClass":[1,"sd-class"]}]]],["p-eb11f6cc",[[772,"sd-form",{"formClass":[1,"form-class"],"sdRegisterField":[64],"sdUnregisterField":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64]}]]],["p-4e13256e",[[512,"sd-progress",{"type":[1],"error":[4],"percentage":[2],"size":[2],"strokeWidth":[2,"stroke-width"],"label":[1]}]]],["p-0c026571",[[512,"sd-radio-button-group",{"value":[1032],"options":[1040],"size":[1],"disabled":[4],"name":[1]}]]],["p-99b6157f",[[512,"sd-toggle",{"value":[1028],"label":[1],"disabled":[4]}]]],["p-391cf704",[[512,"sd-toggle-button",{"value":[1540],"label":[1],"disabled":[4],"isActive":[32]}]]],["p-00e236e1",[[772,"sd-confirm-modal",{"type":[1],"modalTitle":[1,"modal-title"],"titleClass":[1,"title-class"],"topMessage":[16],"bottomMessage":[16],"mainButtonName":[1,"main-button-name"],"mainButtonLabel":[1,"main-button-label"],"subButtonLabel":[1,"sub-button-label"],"tagPreset":[1,"tag-preset"],"tagLabel":[1,"tag-label"],"slotLabel":[1,"slot-label"],"tagContents":[16],"hasSlottedContent":[32]}]]],["p-7a18a52b",[[514,"sd-calendar",{"value":[1537],"selectable":[16],"events":[16],"eventColors":[16],"currentYear":[32],"currentMonth":[32],"eventsRevision":[32]},null,{"value":[{"handleValueChange":0}],"events":[{"handleEventsChange":0}],"eventColors":[{"handleEventsChange":0}]}]]],["p-2a25b3dc",[[512,"sd-radio",{"value":[1032],"disabled":[4],"val":[8],"label":[1]}]]],["p-d5b5cfc7",[[512,"sd-checkbox",{"value":[1028],"val":[8],"disabled":[4],"label":[1],"isChecked":[32]},null,{"value":[{"watchValueHandler":0}]}]]],["p-c7c0aa6c",[[512,"sd-select-v2-listbox",{"name":[1],"options":[16],"value":[8],"emitValue":[4,"emit-value"],"triggerWidth":[1,"trigger-width"],"maxWidth":[1,"max-width"],"maxHeight":[1,"max-height"],"searchKeyword":[32],"isScrolled":[32],"focusedIndex":[32]},null,{"searchKeyword":[{"resetFocusOnFilter":0}]}],[512,"sd-select-v2-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"isOpen":[4,"is-open"]}]]],["p-3f657bf8",[[512,"sd-select-option-group",{"option":[16],"index":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"optionStyle":[16],"disabled":[4],"useCheckbox":[4,"use-checkbox"],"useIndicator":[4,"use-indicator"],"countInfo":[16],"isHovered":[32],"isDisabled":[64]}]]],["p-47f068ca",[[772,"sd-portal",{"to":[1],"parentRef":[16],"offset":[16],"viewportPadding":[2,"viewport-padding"],"zIndex":[2,"z-index"],"open":[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]],{"open":[{"handleOpenChange":0}]}]]],["p-5213773b",[[512,"sd-ghost-button",{"icon":[1],"size":[1],"intent":[1],"ariaLabel":[1,"aria-label"],"disabled":[4]}]]],["p-fdf7ed87",[[772,"sd-field",{"name":[1],"rules":[16],"error":[1028],"disabled":[1028],"hovered":[1028],"focused":[1028],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"errorMsg":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64],"sdFocus":[64]}],[512,"sd-tooltip",{"trigger":[1],"placement":[1],"color":[1],"tooltipType":[1,"tooltip-type"],"icon":[1],"iconSize":[2,"icon-size"],"label":[1],"buttonSize":[1,"button-size"],"buttonVariant":[1,"button-variant"],"noHover":[4,"no-hover"],"sdClass":[1,"sd-class"],"showTooltip":[32],"slotContentHTML":[32]}],[772,"sd-floating-portal",{"to":[1],"parentRef":[16],"offset":[16],"zIndex":[2,"z-index"],"placement":[1],"open":[4]},[[9,"scroll","updatePosition"],[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"]]],[512,"sd-button",{"variant":[1],"size":[1],"color":[1],"label":[1],"disabled":[4],"type":[1],"icon":[1],"iconColor":[1,"icon-color"],"iconSize":[2,"icon-size"],"iconRight":[1,"icon-right"],"noHover":[4,"no-hover"],"sdClass":[1,"sd-class"]}]]],["p-a7e4994e",[[512,"sd-select",{"value":[1032],"options":[1040],"placeholder":[1],"optionPlaceholder":[1,"option-placeholder"],"width":[1],"dropdownHeight":[1,"dropdown-height"],"autoFocus":[4,"auto-focus"],"disabled":[4],"clearable":[4],"searchable":[4],"label":[1],"addonLabel":[1,"addon-label"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[4],"optionRenderer":[16],"isOpen":[32],"itemIndex":[32],"isScrolled":[32],"sdOpen":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"isOpen":[{"isOpenChanged":0}]}],[512,"sd-pagination",{"currentPage":[2,"current-page"],"lastPage":[2,"last-page"],"simple":[4]}],[512,"sd-loading-spinner",{"color":[1]}]]],["p-85e22acd",[[514,"sd-date-box",{"date":[8],"disabled":[4],"selected":[4],"isStartDate":[4,"is-start-date"],"isEndDate":[4,"is-end-date"],"isToday":[4,"is-today"],"inRange":[4,"in-range"],"type":[1]}]]],["p-15c051cb",[[512,"sd-select-v2-list-item",{"option":[16],"depth":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"useCheckbox":[4,"use-checkbox"],"countInfo":[16]}],[512,"sd-select-v2-list-item-search",{"isScrolled":[4,"is-scrolled"],"searchText":[32],"sdFocus":[64]}]]],["p-4e9413c0",[[512,"sd-select-search-input",{"isScrolled":[4,"is-scrolled"],"searchText":[1,"search-text"],"sdGetNativeElement":[64],"sdSearchInputFocus":[64]}],[772,"sd-input",{"value":[1032],"type":[1],"size":[1],"addonLabel":[1,"addon-label"],"placeholder":[1],"disabled":[4],"clearable":[4],"width":[8],"rules":[16],"autoFocus":[4,"auto-focus"],"autocomplete":[1],"maxlength":[2],"minlength":[2],"inputmode":[1],"enterkeyhint":[1],"spellcheck":[4],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"inputClass":[1,"input-class"],"readonly":[4],"error":[1028],"focused":[1028],"hovered":[1028],"label":[1],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"internalValue":[32],"passwordVisible":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-09369f2c",[[772,"sd-select-dropdown",{"itemIndex":[1026,"item-index"],"value":[8],"options":[16],"width":[1],"dropdownHeight":[1,"dropdown-height"],"searchable":[4],"optionPlaceholder":[1,"option-placeholder"],"useCheckbox":[4,"use-checkbox"],"useAll":[4,"use-all"],"filteredOptions":[32],"searchText":[32],"isScrolled":[32],"isDropdownReady":[32]},null,{"filteredOptions":[{"filteredOptionsChanged":0}],"searchText":[{"searchTextChanged":0}],"itemIndex":[{"itemIndexChanged":0}]}],[512,"sd-select-option",{"option":[16],"index":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"optionStyle":[16],"disabled":[4],"useCheckbox":[4,"use-checkbox"],"isHovered":[32],"sdIsDisabled":[64]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as s,h as i}from"./p-DsU722JF.js";let e=0;const o=class{constructor(s){t(this,s)}get el(){return s(this)}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;previousBodyOverflow=null;bodyScrollLocked=!1;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const i="modal-"+ ++e,o=this.createConfirmModal(i,t);return this.attachModalEventListeners(i,o),this.registerEntry(i,o,s,{persistent:!!t.persistent}),i}async createCustom(t,s,i){const o="modal-"+ ++e;return t.setAttribute("data-modal-id",o),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(o,t),this.registerEntry(o,t,i,{persistent:!!s.persistent}),o}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,i,e){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,modalRef:i,persistent:e.persistent,closing:!1}],this.isVisible=!0,this.setBodyScrollLock(!0),requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async dismissById(t,s){this.requestDismiss(t,s)}async update(t,s){const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&this.applyProps(i.modalEl,s)}createConfirmModal(t,s){const i=document.createElement("sd-confirm-modal");return i.setAttribute("data-modal-id",t),i.classList.add("sd-modal-container__modal"),this.applyProps(i,s),i}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId),this.setBodyScrollLock(!1)}setBodyScrollLock(t){"undefined"!=typeof document&&t!==this.bodyScrollLocked&&(t?(this.previousBodyOverflow=document.body.style.overflow||"",document.body.style.overflow="hidden"):(document.body.style.overflow=this.previousBodyOverflow??"",this.previousBodyOverflow=null),this.bodyScrollLocked=t)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const i=(this.entries??[]).find((s=>s.id===t));if(!i||i.closing)return;i.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const e=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:e}:s)),"confirm"===s?i.modalRef._triggerOk():"cancel"===s?i.modalRef._triggerCancel():"close"===s&&i.modalRef._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const i=(this.entries??[]).filter((s=>s.id!==t));this.entries=i,0===i.length&&(this.setBodyScrollLock(!1),this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.modalRef._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,i){null!=i&&t.setAttribute(s,i)}render(){return this.isVisible?i("div",{class:"sd-modal-container"},i("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),i("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}};o.style="sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 9999);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}";export{o as sd_modal_container}
|
|
@@ -14,6 +14,8 @@ const SdModalContainer = class {
|
|
|
14
14
|
isBackdropVisible = false;
|
|
15
15
|
contentRef;
|
|
16
16
|
containerDismissTimerId;
|
|
17
|
+
previousBodyOverflow = null;
|
|
18
|
+
bodyScrollLocked = false;
|
|
17
19
|
handleKeydown(e) {
|
|
18
20
|
if (e.key === 'Escape') {
|
|
19
21
|
const top = this.getTopEntry();
|
|
@@ -69,6 +71,7 @@ const SdModalContainer = class {
|
|
|
69
71
|
},
|
|
70
72
|
];
|
|
71
73
|
this.isVisible = true;
|
|
74
|
+
this.setBodyScrollLock(true);
|
|
72
75
|
requestAnimationFrame(() => {
|
|
73
76
|
if (!this.contentRef)
|
|
74
77
|
return;
|
|
@@ -154,6 +157,22 @@ const SdModalContainer = class {
|
|
|
154
157
|
});
|
|
155
158
|
if (this.containerDismissTimerId)
|
|
156
159
|
clearTimeout(this.containerDismissTimerId);
|
|
160
|
+
this.setBodyScrollLock(false);
|
|
161
|
+
}
|
|
162
|
+
setBodyScrollLock(lock) {
|
|
163
|
+
if (typeof document === 'undefined')
|
|
164
|
+
return;
|
|
165
|
+
if (lock === this.bodyScrollLocked)
|
|
166
|
+
return;
|
|
167
|
+
if (lock) {
|
|
168
|
+
this.previousBodyOverflow = document.body.style.overflow || '';
|
|
169
|
+
document.body.style.overflow = 'hidden';
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
document.body.style.overflow = this.previousBodyOverflow ?? '';
|
|
173
|
+
this.previousBodyOverflow = null;
|
|
174
|
+
}
|
|
175
|
+
this.bodyScrollLocked = lock;
|
|
157
176
|
}
|
|
158
177
|
getTopEntry() {
|
|
159
178
|
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
@@ -188,6 +207,7 @@ const SdModalContainer = class {
|
|
|
188
207
|
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
189
208
|
this.entries = nextEntries;
|
|
190
209
|
if (nextEntries.length === 0) {
|
|
210
|
+
this.setBodyScrollLock(false);
|
|
191
211
|
this.containerDismissTimerId = setTimeout(() => {
|
|
192
212
|
if ((this.entries ?? []).length === 0) {
|
|
193
213
|
this.isVisible = false;
|
|
@@ -6,6 +6,8 @@ export declare class SdModalContainer {
|
|
|
6
6
|
isBackdropVisible: boolean;
|
|
7
7
|
private contentRef?;
|
|
8
8
|
private containerDismissTimerId?;
|
|
9
|
+
private previousBodyOverflow;
|
|
10
|
+
private bodyScrollLocked;
|
|
9
11
|
handleKeydown(e: KeyboardEvent): void;
|
|
10
12
|
open(options: ConfirmModalOptions, modalRef: ModalDialogRefLike): Promise<string>;
|
|
11
13
|
createCustom(element: HTMLElement, options: SdModalCreateOptions, modalRef: ModalDialogRefLike): Promise<string>;
|
|
@@ -19,6 +21,7 @@ export declare class SdModalContainer {
|
|
|
19
21
|
private handleBackdropClick;
|
|
20
22
|
private shakeModal;
|
|
21
23
|
disconnectedCallback(): void;
|
|
24
|
+
private setBodyScrollLock;
|
|
22
25
|
private getTopEntry;
|
|
23
26
|
private requestDismiss;
|
|
24
27
|
private finalizeDismiss;
|
package/hydrate/index.js
CHANGED
|
@@ -8902,6 +8902,8 @@ class SdModalContainer {
|
|
|
8902
8902
|
isBackdropVisible = false;
|
|
8903
8903
|
contentRef;
|
|
8904
8904
|
containerDismissTimerId;
|
|
8905
|
+
previousBodyOverflow = null;
|
|
8906
|
+
bodyScrollLocked = false;
|
|
8905
8907
|
handleKeydown(e) {
|
|
8906
8908
|
if (e.key === 'Escape') {
|
|
8907
8909
|
const top = this.getTopEntry();
|
|
@@ -8957,6 +8959,7 @@ class SdModalContainer {
|
|
|
8957
8959
|
},
|
|
8958
8960
|
];
|
|
8959
8961
|
this.isVisible = true;
|
|
8962
|
+
this.setBodyScrollLock(true);
|
|
8960
8963
|
requestAnimationFrame(() => {
|
|
8961
8964
|
if (!this.contentRef)
|
|
8962
8965
|
return;
|
|
@@ -9042,6 +9045,22 @@ class SdModalContainer {
|
|
|
9042
9045
|
});
|
|
9043
9046
|
if (this.containerDismissTimerId)
|
|
9044
9047
|
clearTimeout(this.containerDismissTimerId);
|
|
9048
|
+
this.setBodyScrollLock(false);
|
|
9049
|
+
}
|
|
9050
|
+
setBodyScrollLock(lock) {
|
|
9051
|
+
if (typeof document === 'undefined')
|
|
9052
|
+
return;
|
|
9053
|
+
if (lock === this.bodyScrollLocked)
|
|
9054
|
+
return;
|
|
9055
|
+
if (lock) {
|
|
9056
|
+
this.previousBodyOverflow = document.body.style.overflow || '';
|
|
9057
|
+
document.body.style.overflow = 'hidden';
|
|
9058
|
+
}
|
|
9059
|
+
else {
|
|
9060
|
+
document.body.style.overflow = this.previousBodyOverflow ?? '';
|
|
9061
|
+
this.previousBodyOverflow = null;
|
|
9062
|
+
}
|
|
9063
|
+
this.bodyScrollLocked = lock;
|
|
9045
9064
|
}
|
|
9046
9065
|
getTopEntry() {
|
|
9047
9066
|
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
@@ -9076,6 +9095,7 @@ class SdModalContainer {
|
|
|
9076
9095
|
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
9077
9096
|
this.entries = nextEntries;
|
|
9078
9097
|
if (nextEntries.length === 0) {
|
|
9098
|
+
this.setBodyScrollLock(false);
|
|
9079
9099
|
this.containerDismissTimerId = setTimeout(() => {
|
|
9080
9100
|
if ((this.entries ?? []).length === 0) {
|
|
9081
9101
|
this.isVisible = false;
|
package/hydrate/index.mjs
CHANGED
|
@@ -8900,6 +8900,8 @@ class SdModalContainer {
|
|
|
8900
8900
|
isBackdropVisible = false;
|
|
8901
8901
|
contentRef;
|
|
8902
8902
|
containerDismissTimerId;
|
|
8903
|
+
previousBodyOverflow = null;
|
|
8904
|
+
bodyScrollLocked = false;
|
|
8903
8905
|
handleKeydown(e) {
|
|
8904
8906
|
if (e.key === 'Escape') {
|
|
8905
8907
|
const top = this.getTopEntry();
|
|
@@ -8955,6 +8957,7 @@ class SdModalContainer {
|
|
|
8955
8957
|
},
|
|
8956
8958
|
];
|
|
8957
8959
|
this.isVisible = true;
|
|
8960
|
+
this.setBodyScrollLock(true);
|
|
8958
8961
|
requestAnimationFrame(() => {
|
|
8959
8962
|
if (!this.contentRef)
|
|
8960
8963
|
return;
|
|
@@ -9040,6 +9043,22 @@ class SdModalContainer {
|
|
|
9040
9043
|
});
|
|
9041
9044
|
if (this.containerDismissTimerId)
|
|
9042
9045
|
clearTimeout(this.containerDismissTimerId);
|
|
9046
|
+
this.setBodyScrollLock(false);
|
|
9047
|
+
}
|
|
9048
|
+
setBodyScrollLock(lock) {
|
|
9049
|
+
if (typeof document === 'undefined')
|
|
9050
|
+
return;
|
|
9051
|
+
if (lock === this.bodyScrollLocked)
|
|
9052
|
+
return;
|
|
9053
|
+
if (lock) {
|
|
9054
|
+
this.previousBodyOverflow = document.body.style.overflow || '';
|
|
9055
|
+
document.body.style.overflow = 'hidden';
|
|
9056
|
+
}
|
|
9057
|
+
else {
|
|
9058
|
+
document.body.style.overflow = this.previousBodyOverflow ?? '';
|
|
9059
|
+
this.previousBodyOverflow = null;
|
|
9060
|
+
}
|
|
9061
|
+
this.bodyScrollLocked = lock;
|
|
9043
9062
|
}
|
|
9044
9063
|
getTopEntry() {
|
|
9045
9064
|
return [...(this.entries ?? [])].reverse().find(entry => !entry.closing);
|
|
@@ -9074,6 +9093,7 @@ class SdModalContainer {
|
|
|
9074
9093
|
const nextEntries = (this.entries ?? []).filter(item => item.id !== id);
|
|
9075
9094
|
this.entries = nextEntries;
|
|
9076
9095
|
if (nextEntries.length === 0) {
|
|
9096
|
+
this.setBodyScrollLock(false);
|
|
9077
9097
|
this.containerDismissTimerId = setTimeout(() => {
|
|
9078
9098
|
if ((this.entries ?? []).length === 0) {
|
|
9079
9099
|
this.isVisible = false;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as s,h as i}from"./p-DsU722JF.js";let e=0;const a=class{constructor(s){t(this,s)}get el(){return s(this)}entries=[];isVisible=!1;isBackdropVisible=!1;contentRef;containerDismissTimerId;handleKeydown(t){if("Escape"===t.key){const t=this.getTopEntry();if(!t)return;if(t.persistent)return void this.shakeModal(t.modalEl);this.dispatchClose(t.modalEl)}}async open(t,s){const i="modal-"+ ++e,a=this.createConfirmModal(i,t);return this.attachModalEventListeners(i,a),this.registerEntry(i,a,s,{persistent:!!t.persistent}),i}async createCustom(t,s,i){const a="modal-"+ ++e;return t.setAttribute("data-modal-id",a),t.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(a,t),this.registerEntry(a,t,i,{persistent:!!s.persistent}),a}attachModalEventListeners(t,s){s.addEventListener("sdOk",(()=>this.requestDismiss(t,"confirm"))),s.addEventListener("sdCancel",(()=>this.requestDismiss(t,"cancel"))),s.addEventListener("sdClose",(()=>this.requestDismiss(t,"close")))}dispatchClose(t){t.dispatchEvent(new CustomEvent("sdClose"))}registerEntry(t,s,i,e){this.containerDismissTimerId&&(clearTimeout(this.containerDismissTimerId),this.containerDismissTimerId=void 0),this.entries=[...this.entries??[],{id:t,modalEl:s,modalRef:i,persistent:e.persistent,closing:!1}],this.isVisible=!0,requestAnimationFrame((()=>{this.contentRef&&(this.contentRef.appendChild(s),this.waitForModalReady(s).then((()=>{requestAnimationFrame((()=>{const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&s.isConnected&&(this.isBackdropVisible=!0,s.classList.add("sd-modal-container__modal--visible"))}))})))}))}async dismissById(t,s){this.requestDismiss(t,s)}async update(t,s){const i=(this.entries??[]).find((s=>s.id===t));i&&!i.closing&&this.applyProps(i.modalEl,s)}createConfirmModal(t,s){const i=document.createElement("sd-confirm-modal");return i.setAttribute("data-modal-id",t),i.classList.add("sd-modal-container__modal"),this.applyProps(i,s),i}applyProps(t,s){this.hasOwnProp(s,"type")&&this.setAttr(t,"type",s.type),this.hasOwnProp(s,"title")&&this.setAttr(t,"modal-title",s.title),this.hasOwnProp(s,"titleClass")&&this.setAttr(t,"title-class",s.titleClass),this.hasOwnProp(s,"mainButtonLabel")&&this.setAttr(t,"main-button-label",s.mainButtonLabel),this.hasOwnProp(s,"mainButtonName")&&this.setAttr(t,"main-button-name",s.mainButtonName),this.hasOwnProp(s,"subButtonLabel")&&this.setAttr(t,"sub-button-label",s.subButtonLabel),this.hasOwnProp(s,"tagPreset")&&this.setAttr(t,"tag-preset",s.tagPreset),this.hasOwnProp(s,"tagLabel")&&this.setAttr(t,"tag-label",s.tagLabel),this.hasOwnProp(s,"slotLabel")&&this.setAttr(t,"slot-label",s.slotLabel),this.hasOwnProp(s,"topMessage")&&(t.topMessage=s.topMessage??[]),this.hasOwnProp(s,"bottomMessage")&&(t.bottomMessage=s.bottomMessage??[]),this.hasOwnProp(s,"tagContents")&&(t.tagContents=s.tagContents)}handleBackdropClick=()=>{const t=this.getTopEntry();t&&(t.persistent?this.shakeModal(t.modalEl):this.dispatchClose(t.modalEl))};shakeModal(t){const s="sd-modal-container__modal--shake";t.classList.remove(s),t.addEventListener("animationend",(()=>t.classList.remove(s)),{once:!0}),requestAnimationFrame((()=>{t.classList.add(s)}))}disconnectedCallback(){(this.entries??[]).forEach((t=>{t.dismissTimerId&&clearTimeout(t.dismissTimerId)})),this.containerDismissTimerId&&clearTimeout(this.containerDismissTimerId)}getTopEntry(){return[...this.entries??[]].reverse().find((t=>!t.closing))}requestDismiss(t,s){const i=(this.entries??[]).find((s=>s.id===t));if(!i||i.closing)return;i.modalEl.classList.remove("sd-modal-container__modal--visible"),0===(this.entries??[]).filter((s=>s.id!==t&&!s.closing)).length&&(this.isBackdropVisible=!1);const e=setTimeout((()=>{this.finalizeDismiss(t)}),350);this.entries=(this.entries??[]).map((s=>s.id===t?{...s,closing:!0,dismissTimerId:e}:s)),"confirm"===s?i.modalRef._triggerOk():"cancel"===s?i.modalRef._triggerCancel():"close"===s&&i.modalRef._triggerClose()}finalizeDismiss(t){const s=(this.entries??[]).find((s=>s.id===t));if(!s)return;s.dismissTimerId&&clearTimeout(s.dismissTimerId),s.modalEl.remove();const i=(this.entries??[]).filter((s=>s.id!==t));this.entries=i,0===i.length&&(this.containerDismissTimerId=setTimeout((()=>{0===(this.entries??[]).length&&(this.isVisible=!1),this.containerDismissTimerId=void 0}),350)),s.modalRef._triggerDismissed()}waitForModalReady(t){const s=t.componentOnReady;return"function"==typeof s?s.call(t).then((()=>{})):new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>t()))}))}))}hasOwnProp(t,s){return Object.prototype.hasOwnProperty.call(t,s)}setAttr(t,s,i){null!=i&&t.setAttribute(s,i)}render(){return this.isVisible?i("div",{class:"sd-modal-container"},i("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":this.isBackdropVisible},onClick:this.handleBackdropClick}),i("div",{class:"sd-modal-container__content",ref:t=>{this.contentRef=t}})):null}};a.style="sd-modal-container{display:block}sd-modal-container .sd-modal-container{position:fixed;inset:0;z-index:var(--sd-modal-container-z-index, 9999);display:flex;align-items:center;justify-content:center}sd-modal-container .sd-modal-container__backdrop{position:absolute;inset:0;background:rgba(0, 0, 0, 0.4);opacity:0;transition:opacity 0.3s ease-out}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1}sd-modal-container .sd-modal-container__content{position:relative;z-index:1;display:grid;place-items:center}sd-modal-container .sd-modal-container__content>*{grid-row:1;grid-column:1}sd-modal-container .sd-modal-container__modal{opacity:0;transform:scale(0);transition:opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}sd-modal-container .sd-modal-container__modal--visible{opacity:1;transform:scale(1)}sd-modal-container .sd-modal-container__modal--shake{animation:modal-shake 0.3s ease-out}@keyframes modal-shake{0%,100%{transform:scale(1)}25%{transform:scale(1.03)}50%{transform:scale(0.97)}75%{transform:scale(1.01)}}";export{a as sd_modal_container}
|