@sellmate/design-system 1.7.2 → 1.8.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.
Files changed (54) hide show
  1. package/dist/cjs/{sanitize-inline-html-BZCCwH_U.js → sanitize-inline-html-CRCAeQ46.js} +28 -2
  2. package/dist/cjs/sd-callout.cjs.entry.js +2 -2
  3. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
  4. package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
  5. package/dist/cjs/sd-guide.cjs.entry.js +1 -1
  6. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -2
  7. package/dist/cjs/sd-select_3.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-table.cjs.entry.js +14 -12
  9. package/dist/collection/components/sd-callout/sd-callout.css +2 -2
  10. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +3 -3
  11. package/dist/collection/components/sd-table/sd-table.css +3 -2
  12. package/dist/collection/components/sd-table/sd-table.js +13 -11
  13. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -2
  14. package/dist/collection/utils/html/sanitize-inline-html.js +28 -2
  15. package/dist/components/p-BE4tnQ2Z.js +1 -0
  16. package/dist/components/{p-CwRItc2J.js → p-Bx9dlLbs.js} +1 -1
  17. package/dist/components/p-D7g33VZR.js +1 -0
  18. package/dist/components/{p-ZSGGRCNc.js → p-DKwnEkHE.js} +1 -1
  19. package/dist/components/p-gqfJ-KUj.js +1 -0
  20. package/dist/components/sd-callout.js +1 -1
  21. package/dist/components/sd-confirm-modal.js +1 -1
  22. package/dist/components/sd-dropdown-button.js +1 -1
  23. package/dist/components/sd-guide.js +1 -1
  24. package/dist/components/sd-key-value-table.js +1 -1
  25. package/dist/components/sd-modal-container.js +1 -1
  26. package/dist/components/sd-select-listbox.js +1 -1
  27. package/dist/components/sd-select.js +1 -1
  28. package/dist/components/sd-table.js +1 -1
  29. package/dist/components/sd-tr.js +1 -1
  30. package/dist/design-system/design-system.esm.js +1 -1
  31. package/dist/design-system/{p-c73cadc7.entry.js → p-1632a28d.entry.js} +1 -1
  32. package/dist/design-system/p-25204798.entry.js +1 -0
  33. package/dist/design-system/{p-bd4e5141.entry.js → p-8528ba1e.entry.js} +1 -1
  34. package/dist/design-system/p-BE4tnQ2Z.js +1 -0
  35. package/dist/design-system/{p-969665c0.entry.js → p-aa28712a.entry.js} +1 -1
  36. package/dist/design-system/{p-54086285.entry.js → p-cf685d90.entry.js} +1 -1
  37. package/dist/design-system/{p-78c2fd6d.entry.js → p-db826b91.entry.js} +1 -1
  38. package/dist/design-system/{p-2d3d25bd.entry.js → p-eb18d812.entry.js} +1 -1
  39. package/dist/esm/{sanitize-inline-html-DopVneZA.js → sanitize-inline-html-BE4tnQ2Z.js} +28 -2
  40. package/dist/esm/sd-callout.entry.js +2 -2
  41. package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
  42. package/dist/esm/sd-dropdown-button.entry.js +1 -1
  43. package/dist/esm/sd-guide.entry.js +1 -1
  44. package/dist/esm/sd-pagination_4.entry.js +0 -2
  45. package/dist/esm/sd-select_3.entry.js +3 -3
  46. package/dist/esm/sd-table.entry.js +14 -12
  47. package/hydrate/index.js +46 -20
  48. package/hydrate/index.mjs +46 -20
  49. package/package.json +1 -1
  50. package/dist/components/p-CARYLqH9.js +0 -1
  51. package/dist/components/p-DopVneZA.js +0 -1
  52. package/dist/components/p-_zllPZMm.js +0 -1
  53. package/dist/design-system/p-97b405aa.entry.js +0 -1
  54. package/dist/design-system/p-DopVneZA.js +0 -1
@@ -1 +1 @@
1
- import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-DopVneZA.js";import{B as e,g as i,b as a,P as p,a as u,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-DCFqtVBm.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=u,y=p,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},F={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},A={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":F[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:A[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),H=N,L=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{H as SdDropdownButton,L as defineCustomElement}
1
+ import{H as t,p as o,c as n,h as d,t as r}from"./p-pwNG5WaX.js";import{s}from"./p-BE4tnQ2Z.js";import{B as e,g as i,b as a,P as u,a as p,c as b,d as l}from"./p-CvfW21oo.js";import{s as h}from"./p-j2khhcHY.js";import{d as c}from"./p-DQj-S8AC.js";import{d as w}from"./p-DCFqtVBm.js";class g{static instance;activeDropdowns=new Set;static getInstance(){return void 0===g.instance&&(g.instance=new g),g.instance}register(t){this.activeDropdowns.add(t)}unregister(t){this.activeDropdowns.delete(t)}openDropdown(t){this.activeDropdowns.forEach((o=>{o!==t&&o.isOpen&&o.closeDropdown()}))}closeAllDropdowns(){this.activeDropdowns.forEach((t=>{t.isOpen&&t.closeDropdown()}))}}const m=g.getInstance(),v=class extends t{constructor(){super(!1)}documentClickHandler;documentKeydownHandler;initializeEvent(){m.register(this),this.initializeEventHandlers()}cleanupEvent(){m.unregister(this),this.cleanup()}initializeEventHandlers(){this.documentClickHandler=t=>this.handleDocumentClick(t),this.documentKeydownHandler=t=>this.handleDocumentKeydown(t)}addGlobalEventListeners(){this.documentClickHandler&&document.addEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.addEventListener("keydown",this.documentKeydownHandler)}removeGlobalEventListeners(){this.documentClickHandler&&document.removeEventListener("click",this.documentClickHandler),this.documentKeydownHandler&&document.removeEventListener("keydown",this.documentKeydownHandler)}onDropdownToggle(t){t&&!this.disabled?(m.openDropdown(this),this.addGlobalEventListeners()):this.removeGlobalEventListeners()}cleanup(){this.removeGlobalEventListeners()}closeDropdown(){this.isOpen=!1}},_=(()=>{const t=Object.keys(e).filter((t=>!t.endsWith("_lg")));return Object.fromEntries(t.map((t=>[t,e[t]])))})(),x=b,f=p,y=u,C={primary:a.button.dropdown.brand.strong.split,secondary:a.button.dropdown.brand.subtle.split,primary_outline:y.primary_outline,neutral_outline:y.neutral_outline,danger:a.button.dropdown.danger.strong.split,danger_outline:y.danger_outline},k=h.color.fg.secondary,E=h.color.bg.accent.default,D=h.color.fg.inverse,z={primary:k,secondary:k,primary_outline:k,neutral_outline:k,danger:k,danger_outline:k},O={primary:E,secondary:E,primary_outline:E,neutral_outline:E,danger:E,danger_outline:E},F={primary:D,secondary:D,primary_outline:D,neutral_outline:D,danger:D,danger_outline:D},A={xs:12,sm:12,md:16},j=a.button.bg.disabled,T=a.button.text.disabled,I=a.button.border.disabled,S=t=>i(t),N=o(class t extends v{constructor(t){super(!1),!1!==t&&this.__registerHost(),this.click=n(this,"sdClick",7),this.buttonClick=n(this,"sdButtonClick",7),this.dropDownShow=n(this,"sdDropDownShow",7)}get el(){return this}name="primary_sm";label="";items=[];disabled=!1;split=!1;static CLOSE_ANIMATION_DURATION=150;isOpen=!1;isAnimatingOut=!1;itemIndex=-1;triggerRef;menuRef;closeAnimationTimer;click;buttonClick;dropDownShow;handleOpenChange(t){this.onDropdownToggle(t),this.dropDownShow.emit({isOpen:t}),t||(this.itemIndex=-1)}componentWillLoad(){this.initializeEvent()}disconnectedCallback(){this.cleanupEvent(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}async sdOpen(){this.disabled||0===this.items.length||(this.isOpen=!0)}async sdClose(){this.closeDropdown()}closeDropdown=()=>{this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))};handleDocumentClick(t){const o=t.target;o&&(this.el.contains(o)||this.menuRef?.contains(o)||this.closeDropdown())}handleDocumentKeydown(t){if(this.isOpen&&["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key))switch(t.preventDefault(),t.stopPropagation(),t.key){case"ArrowDown":this.itemIndex=this.getNextEnabledIndex(1);break;case"ArrowUp":this.itemIndex=this.getNextEnabledIndex(-1);break;case"Enter":if(this.itemIndex<0)return;this.selectItem(this.items[this.itemIndex]);break;case"Escape":this.closeDropdown()}}get resolvedName(){if(!(()=>this.name in _)())throw Error(`Invalid sd-dropdown-button name: "${this.name}"`);return this.name}get resolvedConfig(){const t=this.resolvedName;return{config:_[t],preset:S(t)}}getNextEnabledIndex(t){const o=this.items.reduce(((t,o,n)=>(o.disabled||t.push(n),t)),[]);if(0===o.length)return-1;const n=o.indexOf(this.itemIndex);return-1===n?1===t?o[0]:o[o.length-1]:o[(n+t+o.length)%o.length]}toggleDropdown=t=>{t.stopPropagation(),this.disabled||0===this.items.length||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleButtonClick=t=>{t.stopPropagation(),this.disabled||(this.buttonClick.emit(),this.closeDropdown())};selectItem(t,o){o?.stopPropagation(),t&&!t.disabled&&(this.click.emit(t.value),this.closeDropdown())}getTriggerClasses(t,o,n,d,r){const s=["sd-dropdown-button__trigger","sd-dropdown-button__trigger--"+t,"sd-dropdown-button__trigger--"+o];return n&&s.push("sd-dropdown-button__trigger--disabled"),d&&s.push("sd-dropdown-button__trigger--open"),void 0!==r&&s.push(`sd-dropdown-button__trigger--${r}-part`),s.join(" ")}getTriggerStyle(t,o){return{"--sd-dropdown-button-bg":t.color,"--sd-dropdown-button-bg-hover":x[o],"--sd-dropdown-button-border":y[o],"--sd-dropdown-button-content":f[o],"--sd-dropdown-button-divider":C[o],"--sd-dropdown-button-accent":l,"--sd-dropdown-button-disabled-bg":j,"--sd-dropdown-button-disabled-content":T,"--sd-dropdown-button-disabled-border":I}}getMenuItemClasses(t,o){const n=["sd-dropdown-button__menu-item"];return t&&n.push("sd-dropdown-button__menu-item--active"),o&&n.push("sd-dropdown-button__menu-item--disabled"),n.join(" ")}renderDropdown(t){return(this.isOpen||this.isAnimatingOut)&&this.triggerRef?d("sd-portal",{open:this.isOpen,parentRef:this.triggerRef,onSdClose:this.closeDropdown},d("div",{style:{position:"absolute",width:"0px",height:"0px"}},d("div",{class:"sd-dropdown-button__menu",role:"menu",ref:t=>this.menuRef=t,style:{"--sd-dropdown-button-menu-min-width":this.triggerRef.offsetWidth+"px","--sd-dropdown-button-menu-item-color":z[t],"--sd-dropdown-button-menu-item-active-bg":O[t],"--sd-dropdown-button-menu-item-active-color":F[t],"--sd-dropdown-button-menu-border":"transparent"===y[t]?C[t]:y[t]}},this.items.map(((t,o)=>d("button",{type:"button",role:"menuitem",class:this.getMenuItemClasses(this.itemIndex===o&&!t.disabled,!!t.disabled),disabled:t.disabled,onClick:o=>this.selectItem(t,o),onMouseEnter:()=>{t.disabled||(this.itemIndex=o)}},t.icon&&d("sd-icon",{class:"sd-dropdown-button__menu-item-icon",name:t.icon,size:12,color:"var(--sd-dropdown-button-menu-item-current-color)"}),d("span",{class:"sd-dropdown-button__menu-item-label",innerHTML:s(t.label)}))))))):null}renderChevron(t){return d("span",{class:{"sd-dropdown-button__trigger-icon":!0,"sd-dropdown-button__trigger-icon--open":this.isOpen&&!this.split},"aria-hidden":"true"},d("sd-icon",{name:this.split?"etc":"caretDown",size:A[t],color:"var(--sd-dropdown-button-current-content)"}))}render(){const{config:t,preset:o}=this.resolvedConfig,n=this.getTriggerStyle(t,o);return this.split?d("div",{class:"sd-dropdown-button sd-dropdown-button--split"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"label"),disabled:this.disabled,onClick:this.handleButtonClick,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label)),d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen,"chevron"),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"","aria-label":"dropdown toggle",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},this.renderChevron(t.size)),this.renderDropdown(o)):d("div",{class:"sd-dropdown-button"},d("button",{type:"button",class:this.getTriggerClasses(o,t.size,this.disabled,this.isOpen),disabled:this.disabled,"aria-haspopup":"menu","aria-expanded":this.isOpen+"",onClick:this.toggleDropdown,ref:t=>this.triggerRef=t,style:n},d("span",{class:"sd-dropdown-button__trigger-label"},this.label),this.renderChevron(t.size)),this.renderDropdown(o))}static get watchers(){return{isOpen:[{handleOpenChange:0}]}}static get style(){return"sd-dropdown-button{display:inline-flex;width:fit-content;height:fit-content}.sd-dropdown-button{display:inline-flex;position:relative}.sd-dropdown-button__trigger{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var(--sd-button-button-md-typography-text-decoration, none);--sd-dropdown-button-bg:#025497;--sd-dropdown-button-bg-hover:#004177;--sd-dropdown-button-border:transparent;--sd-dropdown-button-content:#FFFFFF;--sd-dropdown-button-current-content:var(--sd-dropdown-button-content);--sd-dropdown-button-divider:#006AC1;--sd-dropdown-button-accent:#0075FF;--sd-dropdown-button-disabled-bg:var(--sd-button-button-bg-disabled, #E1E1E1);--sd-dropdown-button-disabled-content:var(--sd-button-button-text-disabled, #888888);--sd-dropdown-button-disabled-border:var(--sd-button-button-border-disabled, #CCCCCC);display:inline-flex;align-items:stretch;justify-content:space-between;min-height:var(--sd-dropdown-button-height);padding:0;border:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-border);border-radius:var(--sd-button-button-radius-sm, 4px);background:var(--sd-dropdown-button-bg);color:var(--sd-dropdown-button-current-content);cursor:pointer;box-sizing:border-box;font-family:var(--sd-dropdown-button-font-family);font-size:var(--sd-dropdown-button-font-size);font-weight:var(--sd-dropdown-button-font-weight);line-height:1;text-decoration:var(--sd-dropdown-button-text-decoration);transition:background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;white-space:nowrap}.sd-dropdown-button__trigger:hover:not(.sd-dropdown-button__trigger--disabled){background:var(--sd-dropdown-button-bg-hover)}.sd-dropdown-button__trigger:focus-visible{outline:0;box-shadow:0 0 0 2px var(--sd-dropdown-button-accent)}.sd-dropdown-button__trigger--xs{--sd-dropdown-button-height:var(--sd-button-button-xs-height, 24px);--sd-dropdown-button-padding-x:var(--sd-button-button-xs-padding-x, 8px);--sd-dropdown-button-gap:var(--sd-button-button-xs-gap, 4px);--sd-dropdown-button-font-family:var(--sd-button-button-xs-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-xs-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-xs-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-xs-typography-text-decoration, none )}.sd-dropdown-button__trigger--sm{--sd-dropdown-button-height:var(--sd-button-button-sm-height, 28px);--sd-dropdown-button-padding-x:var(--sd-button-button-sm-padding-x, 12px);--sd-dropdown-button-gap:var(--sd-button-button-sm-gap, 6px);--sd-dropdown-button-font-family:var(--sd-button-button-sm-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-sm-typography-font-size, 12px);--sd-dropdown-button-font-weight:var(--sd-button-button-sm-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-sm-typography-text-decoration, none )}.sd-dropdown-button__trigger--md{--sd-dropdown-button-height:var(--sd-button-button-md-height, 36px);--sd-dropdown-button-padding-x:var(--sd-button-button-md-padding-x, 20px);--sd-dropdown-button-gap:var(--sd-button-button-md-gap, 8px);--sd-dropdown-button-font-family:var(--sd-button-button-md-typography-font-family, inherit);--sd-dropdown-button-font-size:var(--sd-button-button-md-typography-font-size, 16px);--sd-dropdown-button-font-weight:var(--sd-button-button-md-typography-font-weight, 500);--sd-dropdown-button-text-decoration:var( --sd-button-button-md-typography-text-decoration, none );border-radius:var(--sd-button-button-radius-md, 6px)}.sd-dropdown-button__trigger--disabled{border-color:var(--sd-dropdown-button-disabled-border);background:var(--sd-dropdown-button-disabled-bg);--sd-dropdown-button-current-content:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger{gap:var(--sd-dropdown-button-gap);padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-label{padding:0}.sd-dropdown-button:not(.sd-dropdown-button--split) .sd-dropdown-button__trigger-icon{min-width:0;padding:0}.sd-dropdown-button--split{display:inline-flex;align-items:stretch}.sd-dropdown-button--split .sd-dropdown-button__trigger--label-part{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part{border-top-left-radius:0;border-bottom-left-radius:0;border-left:var(--sd-button-button-border-width-default, 1px) solid var(--sd-dropdown-button-divider)}.sd-dropdown-button--split .sd-dropdown-button__trigger--chevron-part.sd-dropdown-button__trigger--disabled{border-left-color:var(--sd-dropdown-button-disabled-border)}.sd-dropdown-button__trigger-label,.sd-dropdown-button__trigger-icon{display:inline-flex;align-items:center;justify-content:center}.sd-dropdown-button__trigger-label{flex:1 1 auto;min-width:0;padding:0 var(--sd-dropdown-button-padding-x)}.sd-dropdown-button__trigger-icon{flex:0 0 auto;min-width:calc(var(--sd-dropdown-button-height) - 2px);padding:0 calc(var(--sd-dropdown-button-gap) + 2px);transition:transform 0.2s ease}.sd-dropdown-button__trigger-icon--open{transform:rotate(180deg)}.sd-dropdown-button__menu{position:relative;display:grid;width:max-content;min-width:var(--sd-dropdown-button-menu-min-width, max-content);max-width:calc(100vw - 24px);padding:4px 0;border:0;border-radius:4px;background:#FFFFFF;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1019607843);box-sizing:border-box;overflow:hidden}.sd-dropdown-button__menu-item{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-color);display:inline-flex;align-items:center;gap:8px;min-height:28px;width:100%;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--sd-dropdown-button-menu-item-current-color);cursor:pointer;box-sizing:border-box;font:inherit;text-align:left;transition:background-color 0.15s ease, color 0.15s ease}.sd-dropdown-button__menu-item--active{background:var(--sd-dropdown-button-menu-item-active-bg);--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-menu-item-active-color)}.sd-dropdown-button__menu-item--disabled{--sd-dropdown-button-menu-item-current-color:var(--sd-dropdown-button-disabled-content);cursor:not-allowed}.sd-dropdown-button__menu-item-icon{flex:0 0 auto}.sd-dropdown-button__menu-item-label{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;font-size:12px}"}},[512,"sd-dropdown-button",{name:[1],label:[1],items:[16],disabled:[4],split:[4],isOpen:[32],isAnimatingOut:[32],itemIndex:[32],sdOpen:[64],sdClose:[64]},void 0,{isOpen:[{handleOpenChange:0}]}]),B=N,H=function(){"undefined"!=typeof customElements&&["sd-dropdown-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-dropdown-button":customElements.get(r(t))||customElements.define(r(t),N);break;case"sd-icon":customElements.get(r(t))||c();break;case"sd-portal":customElements.get(r(t))||w()}}))};export{B as SdDropdownButton,H as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as i,t as o}from"./p-pwNG5WaX.js";import{s as d}from"./p-j2khhcHY.js";import{s as n}from"./p-DopVneZA.js";import{d as s}from"./p-B6L3bPm2.js";import{d as u}from"./p-DhtKHJ7-.js";import{d as g}from"./p-DQj-S8AC.js";import{d as a}from"./p-DCFqtVBm.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},c=d.color.fg.primary,b={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:c,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:c,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=b;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=b,e=this.popupShow,o=l[this.type??"tip"],d=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||o,icon:d,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"94e12fa797748a02334b97e13c5012ab95bc2bce",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"6fc71032016e7a3be0581508ef0ecc6772981185",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"385c0c18bc888be6a654525dc6f4359a56ad6de9",class:"sd-guide__popup__header"},i("sd-icon",{key:"34624d2ac3397ba15b2dc7ba23dc460a87cb878b",name:d,size:24,color:n}),i("h3",{key:"dd3527ec329698b0fd1ec82f2a7d0cf5865802c2",class:"sd-guide__popup__title"},this.popupTitle||o)),i("ul",{key:"429357d0203acdf31177353ceb45d9ac41fadae7",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const o=t.map((t=>this.renderListItem(t,e+1)));i.push(...o.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(o(t))||customElements.define(o(t),h);break;case"sd-button":customElements.get(o(t))||s();break;case"sd-ghost-button":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||g();break;case"sd-portal":customElements.get(o(t))||a()}}))};export{f as SdGuide,m as defineCustomElement}
1
+ import{p as t,H as e,h as i,t as o}from"./p-pwNG5WaX.js";import{s as d}from"./p-j2khhcHY.js";import{s as n}from"./p-BE4tnQ2Z.js";import{d as s}from"./p-B6L3bPm2.js";import{d as u}from"./p-DhtKHJ7-.js";import{d as g}from"./p-DQj-S8AC.js";import{d as a}from"./p-DCFqtVBm.js";const{button:p,contents:r}={button:{height:"28",paddingX:"12",radius:"9999",gap:"6",typography:{fontSize:"12",fontWeight:"500",lineHeight:"20"},icon:{default:"#00973C",active:"#FFFFFF"},border:{width:"1",default:"#E1E1E1"},bg:{default:"#FFFFFF",tip:"#00973C",notion:"#1F8AE1"},text:{default:"#222222",active:"#FFFFFF"}},contents:{paddingX:"24",paddingY:"20",gap:"12",title:{gap:"8"},row:{gap:"8"},body:{gap:"2"},typography:{title:{fontWeight:"700",fontSize:"16",lineHeight:"26"},body:{fontWeight:"400",fontSize:"12",lineHeight:"20"},color:"#222222"},icon:"#00973C",radius:"8"}},c=d.color.fg.primary,b={button:{height:p.height+"px",paddingX:p.paddingX+"px",radius:p.radius+"px",gap:p.gap+"px",fontSize:p.typography.fontSize+"px",fontWeight:p.typography.fontWeight,lineHeight:p.typography.lineHeight+"px",iconColorDefault:p.icon.default,iconColorActive:p.icon.active,iconColorNotion:c,borderWidth:p.border.width+"px",borderColor:p.border.default,bgDefault:p.bg.default,bgTip:p.bg.tip,bgNotion:p.bg.notion,textDefault:p.text.default,textActive:p.text.active},contents:{paddingX:r.paddingX+"px",paddingY:r.paddingY+"px",gap:r.gap+"px",rowGap:r.row.gap+"px",bodyGap:r.body.gap+"px",titleGap:r.title.gap+"px",radius:r.radius+"px",iconColor:r.icon,iconColorNotion:c,titleFontSize:r.typography.title.fontSize+"px",titleFontWeight:r.typography.title.fontWeight,titleLineHeight:r.typography.title.lineHeight+"px",bodyFontSize:r.typography.body.fontSize+"px",bodyFontWeight:r.typography.body.fontWeight,bodyLineHeight:r.typography.body.lineHeight+"px",textColor:r.typography.color}},l={tip:"활용 TIP",notion:"사용법 안내"},_={tip:"helpOutline",notion:"notion"},h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}get el(){return this}type="tip";label="";message="";url="";popupTitle="";popupWidth;popupShow=!1;guideRef;handleClickGuide=()=>{"notion"!==this.type?this.popupShow=!this.popupShow:""!==this.url&&window.open(this.url,"_blank","noopener,noreferrer")};closeDropdown=()=>{this.popupShow=!1};get guideStyle(){const{button:t,contents:e}=b;return{"--sd-guide-button-height":t.height,"--sd-guide-button-padding-x":t.paddingX,"--sd-guide-button-radius":t.radius,"--sd-guide-button-gap":t.gap,"--sd-guide-button-font-size":t.fontSize,"--sd-guide-button-font-weight":t.fontWeight,"--sd-guide-button-line-height":t.lineHeight,"--sd-guide-button-border-width":t.borderWidth,"--sd-guide-button-border-color":t.borderColor,"--sd-guide-button-bg-default":t.bgDefault,"--sd-guide-button-bg-tip":t.bgTip,"--sd-guide-button-bg-notion":t.bgNotion,"--sd-guide-button-text-default":t.textDefault,"--sd-guide-button-text-active":t.textActive,"--sd-guide-button-icon-color-default":t.iconColorDefault,"--sd-guide-button-icon-color-active":t.iconColorActive,"--sd-guide-button-icon-color-notion":t.iconColorNotion,"--sd-guide-contents-padding-x":e.paddingX,"--sd-guide-contents-padding-y":e.paddingY,"--sd-guide-contents-gap":e.gap,"--sd-guide-contents-row-gap":e.rowGap,"--sd-guide-contents-body-gap":e.bodyGap,"--sd-guide-contents-title-gap":e.titleGap,"--sd-guide-contents-radius":e.radius,"--sd-guide-contents-title-font-size":e.titleFontSize,"--sd-guide-contents-title-font-weight":e.titleFontWeight,"--sd-guide-contents-title-line-height":e.titleLineHeight,"--sd-guide-contents-body-font-size":e.bodyFontSize,"--sd-guide-contents-body-font-weight":e.bodyFontWeight,"--sd-guide-contents-body-line-height":e.bodyLineHeight,"--sd-guide-contents-text-color":e.textColor}}render(){const{contents:t}=b,e=this.popupShow,o=l[this.type??"tip"],d=_[this.type??"tip"],n="notion"===(this.type??"tip")?t.iconColorNotion:t.iconColor,s=["sd-guide__button","sd-guide__button--type-"+(this.type??"tip")];return e&&s.push("sd-guide__button--active"),i("div",{key:"ea4f220faf6165f7650360f74a19d9f781b81489",class:"sd-guide",style:this.guideStyle},i("sd-button",{key:"c90eaa6cc42a9a2f20b8fc79db16697db0cf2ff2",ref:t=>this.guideRef=t,class:s.join(" "),name:e?"primary_sm":"neutral_outline_sm",label:this.label||o,icon:d,onSdClick:this.handleClickGuide}),this.popupShow&&i("sd-portal",{key:"21f57a739141ffa36f3b799a2688ca5b3c1bd428",open:this.popupShow,parentRef:this.guideRef,onSdClose:this.closeDropdown,offset:[0,4]},i("div",{key:"94e12fa797748a02334b97e13c5012ab95bc2bce",class:"sd-guide__popup",style:{...this.guideStyle,width:null!=this.popupWidth?this.popupWidth+"px":"426px"}},i("sd-ghost-button",{key:"6fc71032016e7a3be0581508ef0ecc6772981185",class:"sd-guide__popup__close",icon:"close",ariaLabel:"close",size:"sm",onSdClick:this.closeDropdown}),i("div",{key:"385c0c18bc888be6a654525dc6f4359a56ad6de9",class:"sd-guide__popup__header"},i("sd-icon",{key:"34624d2ac3397ba15b2dc7ba23dc460a87cb878b",name:d,size:24,color:n}),i("h3",{key:"dd3527ec329698b0fd1ec82f2a7d0cf5865802c2",class:"sd-guide__popup__title"},this.popupTitle||o)),i("ul",{key:"429357d0203acdf31177353ceb45d9ac41fadae7",class:"sd-guide__popup__list"},this.renderListItem(this.message)))))}renderListItem(t,e=0){const i=[];if(Array.isArray(t)){const o=t.map((t=>this.renderListItem(t,e+1)));i.push(...o.flat())}else i.push(this.renderLi(t,e));return i}renderLi=(t,e)=>i("li",{class:"sd-guide__popup__list__item sd-guide__popup__list__item--depth-"+e},i("p",{innerHTML:n(t)}));static get style(){return'@charset "UTF-8";sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide{display:inline-flex;align-items:center;height:fit-content;width:fit-content}.sd-guide .sd-guide__button .sd-button{min-height:var(--sd-guide-button-height);padding:0 var(--sd-guide-button-padding-x);border-radius:var(--sd-guide-button-radius);border:var(--sd-guide-button-border-width) solid var(--sd-guide-button-border-color);background:var(--sd-guide-button-bg-default);color:var(--sd-guide-button-text-default) !important;transition:none;display:flex;align-items:center;gap:var(--sd-guide-button-gap);--sd-button-bg-hover:var(--sd-guide-button-bg-default);--sd-button-current-icon:var(--sd-guide-button-icon-color-default)}.sd-guide .sd-guide__button .sd-button .sd-button__content{color:var(--sd-guide-button-text-default) !important;gap:var(--sd-guide-button-gap)}.sd-guide .sd-guide__button .sd-button .sd-button__content .sd-button__label{margin-left:0;color:var(--sd-guide-button-text-default) !important;font-size:var(--sd-guide-button-font-size);font-weight:var(--sd-guide-button-font-weight);line-height:var(--sd-guide-button-line-height)}.sd-guide .sd-guide__button--type-notion .sd-button{--sd-button-current-icon:var(--sd-guide-button-icon-color-notion)}.sd-guide .sd-guide__button--active .sd-button{color:var(--sd-guide-button-text-active) !important;--sd-button-current-icon:var(--sd-guide-button-icon-color-active)}.sd-guide .sd-guide__button--active .sd-button .sd-button__content{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--active .sd-button .sd-button__content .sd-button__label{color:var(--sd-guide-button-text-active) !important}.sd-guide .sd-guide__button--type-tip.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-tip);border-color:var(--sd-guide-button-bg-tip);--sd-button-bg-hover:var(--sd-guide-button-bg-tip)}.sd-guide .sd-guide__button--type-notion.sd-guide__button--active .sd-button{background:var(--sd-guide-button-bg-notion);border-color:var(--sd-guide-button-bg-notion);--sd-button-bg-hover:var(--sd-guide-button-bg-notion)}.sd-guide__popup{position:relative;padding:var(--sd-guide-contents-padding-y) var(--sd-guide-contents-padding-x);border-radius:var(--sd-guide-contents-radius);box-shadow:4px 4px 24px 4px rgba(0, 0, 0, 0.1);background:white}.sd-guide__popup>.sd-guide__popup__close{position:absolute;top:12px;right:12px}.sd-guide__popup__header{display:flex;align-items:center;gap:var(--sd-guide-contents-title-gap);margin-bottom:var(--sd-guide-contents-gap)}.sd-guide__popup__header .sd-guide__popup__title{margin-top:0;margin-bottom:0;font-size:var(--sd-guide-contents-title-font-size);font-weight:var(--sd-guide-contents-title-font-weight);line-height:var(--sd-guide-contents-title-line-height);color:var(--sd-guide-contents-text-color)}.sd-guide__popup__list{width:100%;padding:0;margin:0}.sd-guide__popup__list__item{display:flex;width:100%;align-items:start;list-style:none;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height)}.sd-guide__popup__list__item p{width:100%;padding:0;margin:0;word-wrap:break-word;word-break:break-word;white-space:normal;overflow-wrap:break-word;min-width:0}.sd-guide__popup__list__item::before{display:block;content:"-";width:6px;color:var(--sd-guide-contents-text-color);font-size:var(--sd-guide-contents-body-font-size);font-weight:var(--sd-guide-contents-body-font-weight);line-height:var(--sd-guide-contents-body-line-height);margin-left:10px;margin-right:12px;flex-shrink:0}.sd-guide__popup__list__item--depth-1:not(:first-child){margin-top:var(--sd-guide-contents-row-gap)}.sd-guide__popup__list__item--depth-2{margin-top:var(--sd-guide-contents-body-gap)}.sd-guide__popup__list__item--depth-2::before{content:"•"}.sd-guide__popup__list__item--depth-2{padding-left:26px}'}},[512,"sd-guide",{type:[513],label:[513],message:[1],url:[1],popupTitle:[1,"popup-title"],popupWidth:[2,"popup-width"],popupShow:[32]}]),f=h,m=function(){"undefined"!=typeof customElements&&["sd-guide","sd-button","sd-ghost-button","sd-icon","sd-portal"].forEach((t=>{switch(t){case"sd-guide":customElements.get(o(t))||customElements.define(o(t),h);break;case"sd-button":customElements.get(o(t))||s();break;case"sd-ghost-button":customElements.get(o(t))||u();break;case"sd-icon":customElements.get(o(t))||g();break;case"sd-portal":customElements.get(o(t))||a()}}))};export{f as SdGuide,m as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,c as s,h as a,t as d}from"./p-pwNG5WaX.js";import{s as l}from"./p-j2khhcHY.js";import{t as r}from"./p-D6GUzecR.js";import{d as i}from"./p-B6L3bPm2.js";import{d as o}from"./p-B6JOxZKP.js";import{d as n}from"./p-Cye8r1MG.js";import{d as c}from"./p-DMrXwfmf.js";import{d as u}from"./p-f10Mw7qM.js";import{d as p}from"./p-DISZkQqT.js";import{d as b}from"./p-cX2DD74L.js";import{d as k}from"./p-B6G64i5a.js";import{d as v}from"./p-DmDGMDzt.js";import{d as m}from"./p-C8c6MuKQ.js";import{d as h}from"./p-CwQTEZWO.js";import{d as y}from"./p-DhtKHJ7-.js";import{d as f}from"./p-DQj-S8AC.js";import{d as g}from"./p-I9SoAcVO.js";import{d as _}from"./p-Bhh7ig9Q.js";import{d as w}from"./p-DCFqtVBm.js";import{d as x}from"./p-CTuKWVTh.js";import{d as j}from"./p-B45aOf4I.js";import{d as E}from"./p-ZSGGRCNc.js";import{d as S}from"./p-DP0Dp12H.js";import{d as D}from"./p-EcuI_UmK.js";import{d as N}from"./p-CARYLqH9.js";import{d as z}from"./p-DoREs-rv.js";import{d as C}from"./p-BWJtQGYo.js";import{d as U}from"./p-D6cUtm8p.js";const q=r.table,B=Number(q.keyValue.height),F=Number(q.radius),T=Number(q.body.paddingX),G=Number(q.keyValue.body.padding),H=Number(q.header.gap),M=Number(q.content.gap),A=Number(q.border.width),I=Number(q.keyValue.search.paddingX),L={border:q.border.color,thBg:q.header.bg,thLabel:l.color.fg.primary,required:l.color.fg.accent,helpIcon:l.color.fg.success,tdBg:l.color.bg.frame,tdText:l.color.fg.primary,searchBg:q.keyValue.search.bg},Q={labelFontFamily:q.header.typography.fontFamily,labelFontSize:Number(q.header.typography.fontSize),labelFontWeight:Number(q.header.typography.fontWeight),labelLineHeight:Number(q.header.typography.lineHeight),tdFontFamily:q.body.typography.fontFamily,tdFontSize:Number(q.body.typography.fontSize),tdFontWeight:Number(q.body.typography.fontWeight),tdLineHeight:Number(q.body.typography.lineHeight)},W=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.change=s(this,"sdChange",7),this.searchEvent=s(this,"sdSearch",7)}fields=[];search=!1;useTop=!1;change;searchEvent;emit=(e,t)=>{this.change.emit({name:e,value:t})};handleSearchClick=()=>{this.searchEvent.emit()};renderField(e){const t=t=>this.emit(e.name,t.detail);switch(e.type){case"input":return a("sd-input",{width:"100%",...e.options??{},onSdUpdate:t});case"textarea":return a("sd-textarea",{width:"100%",...e.options??{},onSdUpdate:t});case"number-input":return a("sd-number-input",{width:"100%",...e.options??{},onSdUpdate:t});case"select":return a("sd-select",{width:"100%",...e.options??{},onSdUpdate:t});case"radio":{const{value:s,direction:d,...l}=e.options??{};return a("sd-radio-group",{...l,value:s,direction:d??"horizontal",onSdUpdate:t})}case"checkbox":{const{value:s,...d}=e.options??{};return a("sd-checkbox",{...d,value:s,onSdUpdate:t})}case"date-picker":return a("sd-date-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"date-range-picker":return a("sd-date-range-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"file-picker":return a("sd-file-picker",{width:"100%",...e.options??{},onSdUpdate:t});default:return a("span",{class:"sd-key-value-table__text"},e.options?.value??"")}}renderHelpIcon(e){return a("span",{class:"sd-key-value-table__help"},a("sd-tooltip",{icon:"helpOutline",iconSize:16,color:L.helpIcon,trigger:"hover"},e))}computeAutoSkipTh(){const e=this.fields.map((e=>e.map((()=>!1))));return this.fields.forEach(((t,s)=>{t.forEach(((t,a)=>{const d=null!=t.thRowSpan&&t.thRowSpan>1?t.thRowSpan:1;if(!(d<=1))for(let t=1;t<d;t++){const d=e[s+t];d&&a<d.length&&(d[a]=!0)}}))})),e}computeMaxCols(e){let t=0;return this.fields.forEach(((s,a)=>{let d=0;s.forEach(((t,s)=>{let l;l=t.hideTh?0:e[a]?.[s]?1:null!=t.thColSpan&&t.thColSpan>1?t.thColSpan:1,d+=l+(null!=t.tdColSpan&&t.tdColSpan>1?t.tdColSpan:1)})),d>t&&(t=d)})),t}renderTh(e,t,s){const d=null!=e.thRowSpan&&e.thRowSpan>1?e.thRowSpan:void 0,l=null!=e.thColSpan&&e.thColSpan>1?e.thColSpan:void 0,r={"sd-key-value-table__th":!0};return"string"==typeof e.thClass?r[e.thClass]=!0:Array.isArray(e.thClass)&&e.thClass.forEach((e=>r[e]=!0)),a("th",{key:`th-${t}-${s}`,class:r,style:e.thStyle,scope:"row",rowSpan:d,colSpan:l},a("div",{class:"sd-key-value-table__th-inner"},a("span",{class:"sd-key-value-table__label"},e.label,e.required&&a("sd-icon",{class:"sd-key-value-table__required",name:"star",size:12,color:L.required,label:"required"})),e.helpText&&this.renderHelpIcon(e.helpText)))}renderTd(e,t,s){return a("td",{key:`td-${t}-${s}`,class:"sd-key-value-table__td",rowSpan:null!=e.tdRowSpan&&e.tdRowSpan>1?e.tdRowSpan:void 0,colSpan:null!=e.tdColSpan&&e.tdColSpan>1?e.tdColSpan:void 0},a("div",{class:"sd-key-value-table__td-inner"},a("slot",{name:"field-"+e.name},this.renderField(e))))}warnDuplicateNames(){const e=new Set,t=new Set;this.fields.forEach((s=>s.forEach((s=>{e.has(s.name)?t.add(s.name):e.add(s.name)})))),t.size>0&&console.warn(`[sd-key-value-table] Duplicate field name(s) detected: ${[...t].join(", ")}. Slot names ("field-{name}") and sdChange events rely on unique names.`)}render(){if(0===this.fields.length)return null;const e={"--sd-kvt-row-height":B+"px","--sd-kvt-th-width":"120px","--sd-kvt-radius":F+"px","--sd-kvt-padding-x":T+"px","--sd-kvt-padding-y":G+"px","--sd-kvt-gap":H+"px","--sd-kvt-label-gap":M+"px","--sd-kvt-border-width":A+"px","--sd-kvt-border-color":L.border,"--sd-kvt-th-bg":L.thBg,"--sd-kvt-th-color":L.thLabel,"--sd-kvt-required-color":L.required,"--sd-kvt-td-bg":L.tdBg,"--sd-kvt-td-color":L.tdText,"--sd-kvt-label-font-family":Q.labelFontFamily,"--sd-kvt-label-font-size":Q.labelFontSize+"px","--sd-kvt-label-font-weight":""+Q.labelFontWeight,"--sd-kvt-label-line-height":Q.labelLineHeight+"px","--sd-kvt-td-font-family":Q.tdFontFamily,"--sd-kvt-td-font-size":Q.tdFontSize+"px","--sd-kvt-td-font-weight":""+Q.tdFontWeight,"--sd-kvt-td-line-height":Q.tdLineHeight+"px","--sd-kvt-search-bg":L.searchBg,"--sd-kvt-search-padding-x":I+"px"};this.warnDuplicateNames();const t=this.computeAutoSkipTh(),s=this.computeMaxCols(t),d=a("table",{class:{"sd-key-value-table":!0,"sd-key-value-table--use-top":this.useTop},style:e},a("colgroup",null,Array.from({length:s},((e,t)=>a("col",{key:"col-"+t,style:t%2==0?{width:"120px"}:void 0})))),a("tbody",null,this.fields.map(((e,s)=>a("tr",{class:"sd-key-value-table__row",key:"row-"+s},e.map(((e,a)=>[e.hideTh||t[s][a]?null:this.renderTh(e,s,a),this.renderTd(e,s,a)])))))));return this.search?a("div",{class:{"sd-key-value-table__wrapper":!0,"sd-key-value-table__wrapper--use-top":this.useTop},style:e},d,a("div",{class:"sd-key-value-table__search-panel"},a("sd-button",{label:"검색",name:"neutral_outline_md",onSdClick:this.handleSearchClick}))):d}static get style(){return"sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__search-panel{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:var(--sd-kvt-padding-y) var(--sd-kvt-search-padding-x);background:var(--sd-kvt-search-bg);border-left:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table{width:100%;table-layout:fixed;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);border-collapse:separate;border-spacing:0;overflow:hidden}sd-key-value-table .sd-key-value-table.sd-key-value-table--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__th,sd-key-value-table .sd-key-value-table__td{height:var(--sd-kvt-row-height);padding:var(--sd-kvt-padding-y) var(--sd-kvt-padding-x);box-sizing:border-box;vertical-align:middle;text-align:left;font-weight:normal;border-top:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__th,sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__td{border-top:0}sd-key-value-table .sd-key-value-table__th{width:var(--sd-kvt-th-width);background:var(--sd-kvt-th-bg);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__th-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--sd-kvt-gap);width:100%;height:100%}sd-key-value-table .sd-key-value-table__label{display:inline-flex;align-items:center;gap:var(--sd-kvt-label-gap);font-family:var(--sd-kvt-label-font-family);font-size:var(--sd-kvt-label-font-size);font-weight:var(--sd-kvt-label-font-weight);line-height:var(--sd-kvt-label-line-height);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__required{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__help{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__td{background:var(--sd-kvt-td-bg);color:var(--sd-kvt-td-color)}sd-key-value-table .sd-key-value-table__td-inner{display:flex;align-items:center;width:100%;height:100%}sd-key-value-table .sd-key-value-table__td-inner>slot{display:block;flex:1 1 auto;min-width:0}sd-key-value-table .sd-key-value-table__td-inner sd-input,sd-key-value-table .sd-key-value-table__td-inner sd-textarea,sd-key-value-table .sd-key-value-table__td-inner sd-number-input,sd-key-value-table .sd-key-value-table__td-inner sd-select,sd-key-value-table .sd-key-value-table__td-inner sd-date-picker,sd-key-value-table .sd-key-value-table__td-inner sd-date-range-picker,sd-key-value-table .sd-key-value-table__td-inner sd-file-picker{width:100%}sd-key-value-table .sd-key-value-table__text{font-family:var(--sd-kvt-td-font-family);font-size:var(--sd-kvt-td-font-size);font-weight:var(--sd-kvt-td-font-weight);line-height:var(--sd-kvt-td-line-height);color:var(--sd-kvt-td-color)}"}},[772,"sd-key-value-table",{fields:[16],search:[4],useTop:[4,"use-top"]}]),K=W,O=function(){"undefined"!=typeof customElements&&["sd-key-value-table","sd-button","sd-calendar","sd-checkbox","sd-chip","sd-date-picker","sd-date-picker-trigger","sd-date-range-picker","sd-date-range-picker-calendar","sd-field","sd-file-picker","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-number-input","sd-portal","sd-radio","sd-radio-group","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-textarea","sd-tooltip"].forEach((e=>{switch(e){case"sd-key-value-table":customElements.get(d(e))||customElements.define(d(e),W);break;case"sd-button":customElements.get(d(e))||i();break;case"sd-calendar":customElements.get(d(e))||o();break;case"sd-checkbox":customElements.get(d(e))||n();break;case"sd-chip":customElements.get(d(e))||c();break;case"sd-date-picker":customElements.get(d(e))||u();break;case"sd-date-picker-trigger":customElements.get(d(e))||p();break;case"sd-date-range-picker":customElements.get(d(e))||b();break;case"sd-date-range-picker-calendar":customElements.get(d(e))||k();break;case"sd-field":customElements.get(d(e))||v();break;case"sd-file-picker":customElements.get(d(e))||m();break;case"sd-floating-portal":customElements.get(d(e))||h();break;case"sd-ghost-button":customElements.get(d(e))||y();break;case"sd-icon":customElements.get(d(e))||f();break;case"sd-input":customElements.get(d(e))||g();break;case"sd-number-input":customElements.get(d(e))||_();break;case"sd-portal":customElements.get(d(e))||w();break;case"sd-radio":customElements.get(d(e))||x();break;case"sd-radio-group":customElements.get(d(e))||j();break;case"sd-select":customElements.get(d(e))||E();break;case"sd-select-list-item":customElements.get(d(e))||S();break;case"sd-select-list-item-search":customElements.get(d(e))||D();break;case"sd-select-listbox":customElements.get(d(e))||N();break;case"sd-select-trigger":customElements.get(d(e))||z();break;case"sd-textarea":customElements.get(d(e))||C();break;case"sd-tooltip":customElements.get(d(e))||U()}}))};export{K as SdKeyValueTable,O as defineCustomElement}
1
+ import{p as e,H as t,c as s,h as a,t as d}from"./p-pwNG5WaX.js";import{s as l}from"./p-j2khhcHY.js";import{t as r}from"./p-D6GUzecR.js";import{d as i}from"./p-B6L3bPm2.js";import{d as o}from"./p-B6JOxZKP.js";import{d as n}from"./p-Cye8r1MG.js";import{d as u}from"./p-DMrXwfmf.js";import{d as c}from"./p-f10Mw7qM.js";import{d as p}from"./p-DISZkQqT.js";import{d as k}from"./p-cX2DD74L.js";import{d as b}from"./p-B6G64i5a.js";import{d as v}from"./p-DmDGMDzt.js";import{d as m}from"./p-C8c6MuKQ.js";import{d as h}from"./p-CwQTEZWO.js";import{d as y}from"./p-DhtKHJ7-.js";import{d as f}from"./p-DQj-S8AC.js";import{d as g}from"./p-I9SoAcVO.js";import{d as _}from"./p-Bhh7ig9Q.js";import{d as w}from"./p-DCFqtVBm.js";import{d as x}from"./p-CTuKWVTh.js";import{d as E}from"./p-B45aOf4I.js";import{d as j}from"./p-DKwnEkHE.js";import{d as S}from"./p-DP0Dp12H.js";import{d as D}from"./p-EcuI_UmK.js";import{d as N}from"./p-D7g33VZR.js";import{d as z}from"./p-DoREs-rv.js";import{d as U}from"./p-BWJtQGYo.js";import{d as C}from"./p-D6cUtm8p.js";const B=r.table,F=Number(B.keyValue.height),T=Number(B.radius),q=Number(B.body.paddingX),H=Number(B.keyValue.body.padding),M=Number(B.header.gap),G=Number(B.content.gap),I=Number(B.border.width),K=Number(B.keyValue.search.paddingX),Q={border:B.border.color,thBg:B.header.bg,thLabel:l.color.fg.primary,required:l.color.fg.accent,helpIcon:l.color.fg.success,tdBg:l.color.bg.frame,tdText:l.color.fg.primary,searchBg:B.keyValue.search.bg},W={labelFontFamily:B.header.typography.fontFamily,labelFontSize:Number(B.header.typography.fontSize),labelFontWeight:Number(B.header.typography.fontWeight),labelLineHeight:Number(B.header.typography.lineHeight),tdFontFamily:B.body.typography.fontFamily,tdFontSize:Number(B.body.typography.fontSize),tdFontWeight:Number(B.body.typography.fontWeight),tdLineHeight:Number(B.body.typography.lineHeight)},A=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.change=s(this,"sdChange",7),this.searchEvent=s(this,"sdSearch",7)}fields=[];search=!1;useTop=!1;change;searchEvent;emit=(e,t)=>{this.change.emit({name:e,value:t})};handleSearchClick=()=>{this.searchEvent.emit()};renderField(e){const t=t=>this.emit(e.name,t.detail);switch(e.type){case"input":return a("sd-input",{width:"100%",...e.options??{},onSdUpdate:t});case"textarea":return a("sd-textarea",{width:"100%",...e.options??{},onSdUpdate:t});case"number-input":return a("sd-number-input",{width:"100%",...e.options??{},onSdUpdate:t});case"select":return a("sd-select",{width:"100%",...e.options??{},onSdUpdate:t});case"radio":{const{value:s,direction:d,...l}=e.options??{};return a("sd-radio-group",{...l,value:s,direction:d??"horizontal",onSdUpdate:t})}case"checkbox":{const{value:s,...d}=e.options??{};return a("sd-checkbox",{...d,value:s,onSdUpdate:t})}case"date-picker":return a("sd-date-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"date-range-picker":return a("sd-date-range-picker",{width:"100%",...e.options??{},onSdUpdate:t});case"file-picker":return a("sd-file-picker",{width:"100%",...e.options??{},onSdUpdate:t});default:return a("span",{class:"sd-key-value-table__text"},e.options?.value??"")}}renderHelpIcon(e){return a("span",{class:"sd-key-value-table__help"},a("sd-tooltip",{icon:"helpOutline",iconSize:16,color:Q.helpIcon,trigger:"hover"},e))}computeAutoSkipTh(){const e=this.fields.map((e=>e.map((()=>!1))));return this.fields.forEach(((t,s)=>{t.forEach(((t,a)=>{const d=null!=t.thRowSpan&&t.thRowSpan>1?t.thRowSpan:1;if(!(d<=1))for(let t=1;t<d;t++){const d=e[s+t];d&&a<d.length&&(d[a]=!0)}}))})),e}computeMaxCols(e){let t=0;return this.fields.forEach(((s,a)=>{let d=0;s.forEach(((t,s)=>{let l;l=t.hideTh?0:e[a]?.[s]?1:null!=t.thColSpan&&t.thColSpan>1?t.thColSpan:1,d+=l+(null!=t.tdColSpan&&t.tdColSpan>1?t.tdColSpan:1)})),d>t&&(t=d)})),t}renderTh(e,t,s){const d=null!=e.thRowSpan&&e.thRowSpan>1?e.thRowSpan:void 0,l=null!=e.thColSpan&&e.thColSpan>1?e.thColSpan:void 0,r={"sd-key-value-table__th":!0};return"string"==typeof e.thClass?r[e.thClass]=!0:Array.isArray(e.thClass)&&e.thClass.forEach((e=>r[e]=!0)),a("th",{key:`th-${t}-${s}`,class:r,style:e.thStyle,scope:"row",rowSpan:d,colSpan:l},a("div",{class:"sd-key-value-table__th-inner"},a("span",{class:"sd-key-value-table__label"},e.label,e.required&&a("sd-icon",{class:"sd-key-value-table__required",name:"star",size:12,color:Q.required,label:"required"})),e.helpText&&this.renderHelpIcon(e.helpText)))}renderTd(e,t,s){return a("td",{key:`td-${t}-${s}`,class:"sd-key-value-table__td",rowSpan:null!=e.tdRowSpan&&e.tdRowSpan>1?e.tdRowSpan:void 0,colSpan:null!=e.tdColSpan&&e.tdColSpan>1?e.tdColSpan:void 0},a("div",{class:"sd-key-value-table__td-inner"},a("slot",{name:"field-"+e.name},this.renderField(e))))}warnDuplicateNames(){const e=new Set,t=new Set;this.fields.forEach((s=>s.forEach((s=>{e.has(s.name)?t.add(s.name):e.add(s.name)})))),t.size>0&&console.warn(`[sd-key-value-table] Duplicate field name(s) detected: ${[...t].join(", ")}. Slot names ("field-{name}") and sdChange events rely on unique names.`)}render(){if(0===this.fields.length)return null;const e={"--sd-kvt-row-height":F+"px","--sd-kvt-th-width":"120px","--sd-kvt-radius":T+"px","--sd-kvt-padding-x":q+"px","--sd-kvt-padding-y":H+"px","--sd-kvt-gap":M+"px","--sd-kvt-label-gap":G+"px","--sd-kvt-border-width":I+"px","--sd-kvt-border-color":Q.border,"--sd-kvt-th-bg":Q.thBg,"--sd-kvt-th-color":Q.thLabel,"--sd-kvt-required-color":Q.required,"--sd-kvt-td-bg":Q.tdBg,"--sd-kvt-td-color":Q.tdText,"--sd-kvt-label-font-family":W.labelFontFamily,"--sd-kvt-label-font-size":W.labelFontSize+"px","--sd-kvt-label-font-weight":""+W.labelFontWeight,"--sd-kvt-label-line-height":W.labelLineHeight+"px","--sd-kvt-td-font-family":W.tdFontFamily,"--sd-kvt-td-font-size":W.tdFontSize+"px","--sd-kvt-td-font-weight":""+W.tdFontWeight,"--sd-kvt-td-line-height":W.tdLineHeight+"px","--sd-kvt-search-bg":Q.searchBg,"--sd-kvt-search-padding-x":K+"px"};this.warnDuplicateNames();const t=this.computeAutoSkipTh(),s=this.computeMaxCols(t),d=a("table",{class:{"sd-key-value-table":!0,"sd-key-value-table--use-top":this.useTop},style:e},a("colgroup",null,Array.from({length:s},((e,t)=>a("col",{key:"col-"+t,style:t%2==0?{width:"120px"}:void 0})))),a("tbody",null,this.fields.map(((e,s)=>a("tr",{class:"sd-key-value-table__row",key:"row-"+s},e.map(((e,a)=>[e.hideTh||t[s][a]?null:this.renderTh(e,s,a),this.renderTd(e,s,a)])))))));return this.search?a("div",{class:{"sd-key-value-table__wrapper":!0,"sd-key-value-table__wrapper--use-top":this.useTop},style:e},d,a("div",{class:"sd-key-value-table__search-panel"},a("sd-button",{label:"검색",name:"neutral_outline_md",onSdClick:this.handleSearchClick}))):d}static get style(){return"sd-key-value-table{display:block}sd-key-value-table .sd-key-value-table__wrapper{display:flex;align-items:stretch;width:100%;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);overflow:hidden}sd-key-value-table .sd-key-value-table__wrapper .sd-key-value-table{flex:1 1 auto;border:0;border-radius:0}sd-key-value-table .sd-key-value-table__wrapper.sd-key-value-table__wrapper--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__search-panel{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:var(--sd-kvt-padding-y) var(--sd-kvt-search-padding-x);background:var(--sd-kvt-search-bg);border-left:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table{width:100%;table-layout:fixed;border:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color);border-radius:var(--sd-kvt-radius);border-collapse:separate;border-spacing:0;overflow:hidden}sd-key-value-table .sd-key-value-table.sd-key-value-table--use-top{border-top-left-radius:0;border-top-right-radius:0}sd-key-value-table .sd-key-value-table__th,sd-key-value-table .sd-key-value-table__td{height:var(--sd-kvt-row-height);padding:var(--sd-kvt-padding-y) var(--sd-kvt-padding-x);box-sizing:border-box;vertical-align:middle;text-align:left;font-weight:normal;border-top:var(--sd-kvt-border-width) solid var(--sd-kvt-border-color)}sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__th,sd-key-value-table .sd-key-value-table tbody>tr:first-child>.sd-key-value-table__td{border-top:0}sd-key-value-table .sd-key-value-table__th{width:var(--sd-kvt-th-width);background:var(--sd-kvt-th-bg);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__th-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--sd-kvt-gap);width:100%;height:100%}sd-key-value-table .sd-key-value-table__label{display:inline-flex;align-items:center;gap:var(--sd-kvt-label-gap);font-family:var(--sd-kvt-label-font-family);font-size:var(--sd-kvt-label-font-size);font-weight:var(--sd-kvt-label-font-weight);line-height:var(--sd-kvt-label-line-height);color:var(--sd-kvt-th-color)}sd-key-value-table .sd-key-value-table__required{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__help{display:inline-flex;align-items:center;flex-shrink:0}sd-key-value-table .sd-key-value-table__td{background:var(--sd-kvt-td-bg);color:var(--sd-kvt-td-color)}sd-key-value-table .sd-key-value-table__td-inner{display:flex;align-items:center;width:100%;height:100%}sd-key-value-table .sd-key-value-table__td-inner>slot{display:block;flex:1 1 auto;min-width:0}sd-key-value-table .sd-key-value-table__td-inner sd-input,sd-key-value-table .sd-key-value-table__td-inner sd-textarea,sd-key-value-table .sd-key-value-table__td-inner sd-number-input,sd-key-value-table .sd-key-value-table__td-inner sd-select,sd-key-value-table .sd-key-value-table__td-inner sd-date-picker,sd-key-value-table .sd-key-value-table__td-inner sd-date-range-picker,sd-key-value-table .sd-key-value-table__td-inner sd-file-picker{width:100%}sd-key-value-table .sd-key-value-table__text{font-family:var(--sd-kvt-td-font-family);font-size:var(--sd-kvt-td-font-size);font-weight:var(--sd-kvt-td-font-weight);line-height:var(--sd-kvt-td-line-height);color:var(--sd-kvt-td-color)}"}},[772,"sd-key-value-table",{fields:[16],search:[4],useTop:[4,"use-top"]}]),L=A,O=function(){"undefined"!=typeof customElements&&["sd-key-value-table","sd-button","sd-calendar","sd-checkbox","sd-chip","sd-date-picker","sd-date-picker-trigger","sd-date-range-picker","sd-date-range-picker-calendar","sd-field","sd-file-picker","sd-floating-portal","sd-ghost-button","sd-icon","sd-input","sd-number-input","sd-portal","sd-radio","sd-radio-group","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-textarea","sd-tooltip"].forEach((e=>{switch(e){case"sd-key-value-table":customElements.get(d(e))||customElements.define(d(e),A);break;case"sd-button":customElements.get(d(e))||i();break;case"sd-calendar":customElements.get(d(e))||o();break;case"sd-checkbox":customElements.get(d(e))||n();break;case"sd-chip":customElements.get(d(e))||u();break;case"sd-date-picker":customElements.get(d(e))||c();break;case"sd-date-picker-trigger":customElements.get(d(e))||p();break;case"sd-date-range-picker":customElements.get(d(e))||k();break;case"sd-date-range-picker-calendar":customElements.get(d(e))||b();break;case"sd-field":customElements.get(d(e))||v();break;case"sd-file-picker":customElements.get(d(e))||m();break;case"sd-floating-portal":customElements.get(d(e))||h();break;case"sd-ghost-button":customElements.get(d(e))||y();break;case"sd-icon":customElements.get(d(e))||f();break;case"sd-input":customElements.get(d(e))||g();break;case"sd-number-input":customElements.get(d(e))||_();break;case"sd-portal":customElements.get(d(e))||w();break;case"sd-radio":customElements.get(d(e))||x();break;case"sd-radio-group":customElements.get(d(e))||E();break;case"sd-select":customElements.get(d(e))||j();break;case"sd-select-list-item":customElements.get(d(e))||S();break;case"sd-select-list-item-search":customElements.get(d(e))||D();break;case"sd-select-listbox":customElements.get(d(e))||N();break;case"sd-select-trigger":customElements.get(d(e))||z();break;case"sd-textarea":customElements.get(d(e))||U();break;case"sd-tooltip":customElements.get(d(e))||C()}}))};export{L as SdKeyValueTable,O as defineCustomElement}
@@ -1 +1 @@
1
- import{p as s,H as t,h as e,t as o}from"./p-pwNG5WaX.js";import{u as i,r as a,s as n,i as d,a as r}from"./p-DRVnqiWc.js";import{d as l}from"./p-B6L3bPm2.js";import{d as c}from"./p-p4bNikji.js";import{d as m}from"./p-CwRItc2J.js";import{d as h}from"./p-DhtKHJ7-.js";import{d as u}from"./p-DQj-S8AC.js";import{d as p}from"./p-DhmsCQrB.js";import{d as b}from"./p-wLoP3KMv.js";let f=0;const g=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}get el(){return this}autoRemove=!1;entries=[];layerRefs=new Map;async open(s,t){const e="modal-"+ ++f,o=this.createConfirmModal(e,s);return this.attachModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async openLoading(s,t){const e="modal-"+ ++f,o=this.createLoadingModal(e,s);return this.attachLoadingModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async createCustom(s,t,e){const o="modal-"+ ++f;return s.setAttribute("data-modal-id",o),s.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(o,s),this.mountEntry({id:o,modalEl:s,modalRef:e,persistent:!!t.persistent,closing:!1,backdropVisible:!1}),o}componentDidRender(){if(Array.isArray(this.entries))for(const s of this.entries){if(s.closing||s.modalEl.isConnected)continue;const t=this.layerRefs.get(s.id);if(!t)continue;const{id:e,modalEl:o}=s;t.appendChild(o),this.waitForModalReady(o).then((()=>{requestAnimationFrame((()=>{const s=this.entries.find((s=>s.id===e));s&&!s.closing&&o.isConnected&&(this.entries=this.entries.map((s=>s.id===e?{...s,backdropVisible:!0}:s)),o.classList.add("sd-modal-container__modal--visible"))}))}))}}disconnectedCallback(){for(const s of this.entries??[])s.dismissTimerId&&clearTimeout(s.dismissTimerId),i(s.id)}async dismissById(s,t){this.entries.find((t=>t.id===s))&&this.requestDismiss(s,t)}async update(s,t){const e=this.entries.find((t=>t.id===s&&!t.closing));e&&("sd-loading-modal"!==e.modalEl.tagName.toLowerCase()?this.applyProps(e.modalEl,t):this.applyLoadingProps(e.modalEl,t))}mountEntry(s){this.entries=[...this.entries??[],s],a({id:s.id,persistent:s.persistent,requestClose:()=>this.dispatchClose(s.id),shake:()=>this.shakeModal(s.modalEl),setZIndex:s=>{this.el.style.setProperty("--sd-modal-container-z-index",s+"")}})}attachModalEventListeners(s,t){t.addEventListener("sdOk",(()=>this.requestDismiss(s,"confirm"))),t.addEventListener("sdCancel",(()=>this.requestDismiss(s,"cancel"))),t.addEventListener("sdClose",(()=>this.requestDismiss(s,"close")))}attachLoadingModalEventListeners(s,t){t.addEventListener("sdClick",(()=>{const t=this.entries.find((t=>t.id===s));t?.modalRef._triggerClick?.()}))}dispatchClose(s){const t=this.entries.find((t=>t.id===s));t?.modalEl.dispatchEvent(new CustomEvent("sdClose"))}requestDismiss(s,t){const e=this.entries.find((t=>t.id===s));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible");const o=setTimeout((()=>{this.finalizeDismiss(s)}),350);n(s,!1),this.entries=(this.entries??[]).map((t=>t.id===s?{...t,closing:!0,dismissTimerId:o,backdropVisible:!1}:t)),"confirm"===t?e.modalRef._triggerOk():"cancel"===t?e.modalRef._triggerCancel():"close"===t&&e.modalRef._triggerClose()}finalizeDismiss(s){const t=this.entries.find((t=>t.id===s));t&&(t.dismissTimerId&&clearTimeout(t.dismissTimerId),t.modalEl.remove(),i(s),t.modalRef._triggerDismissed(),this.layerRefs.delete(s),this.entries=(this.entries??[]).filter((t=>t.id!==s)),this.autoRemove&&0===this.entries.length&&this.el.remove())}createConfirmModal(s,t){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyProps(e,t),e}createLoadingModal(s,t){const e=document.createElement("sd-loading-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyLoadingProps(e,t),e}applyLoadingProps(s,t){this.hasOwnProp(t,"state")&&this.setAttr(s,"state",t.state),this.hasOwnProp(t,"message")&&(Array.isArray(t.message)?s.message=t.message:this.setAttr(s,"message",t.message)),this.hasOwnProp(t,"useButton")&&(t.useButton?s.setAttribute("use-button",""):s.removeAttribute("use-button")),this.hasOwnProp(t,"buttonLabel")&&this.setAttr(s,"button-label",t.buttonLabel),this.hasOwnProp(t,"width")&&this.setAttr(s,"width",null!=t.width?t.width+"":void 0),this.hasOwnProp(t,"height")&&this.setAttr(s,"height",null!=t.height?t.height+"":void 0),this.hasOwnProp(t,"progress")&&(s.progress=t.progress)}applyProps(s,t){this.hasOwnProp(t,"type")&&this.setAttr(s,"type",t.type),this.hasOwnProp(t,"title")&&this.setAttr(s,"modal-title",t.title),this.hasOwnProp(t,"titleClass")&&this.setAttr(s,"title-class",t.titleClass),this.hasOwnProp(t,"mainButtonLabel")&&this.setAttr(s,"main-button-label",t.mainButtonLabel),this.hasOwnProp(t,"mainButtonName")&&this.setAttr(s,"main-button-name",t.mainButtonName),this.hasOwnProp(t,"subButtonLabel")&&this.setAttr(s,"sub-button-label",t.subButtonLabel),this.hasOwnProp(t,"tagPreset")&&this.setAttr(s,"tag-preset",t.tagPreset),this.hasOwnProp(t,"tagLabel")&&this.setAttr(s,"tag-label",t.tagLabel),this.hasOwnProp(t,"slotLabel")&&this.setAttr(s,"slot-label",t.slotLabel),this.hasOwnProp(t,"topMessage")&&(s.topMessage=t.topMessage??[]),this.hasOwnProp(t,"bottomMessage")&&(s.bottomMessage=t.bottomMessage??[]),this.hasOwnProp(t,"tagContents")&&(s.tagContents=t.tagContents)}handleBackdropClick(s){d(s)&&r(s)}shakeModal(s){const t="sd-modal-container__modal--shake";s.classList.remove(t),s.addEventListener("animationend",(()=>s.classList.remove(t)),{once:!0}),requestAnimationFrame((()=>{s.classList.add(t)}))}waitForModalReady(s){const t=s.componentOnReady;return"function"==typeof t?t.call(s).then((()=>{})):new Promise((s=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>s()))}))}))}hasOwnProp(s,t){return Object.prototype.hasOwnProperty.call(s,t)}setAttr(s,t,e){null!=e&&s.setAttribute(t,e)}render(){return 0===(this.entries?.length??0)?null:e("div",{class:"sd-modal-container"},this.entries.map(((s,t)=>e("div",{key:s.id,class:"sd-modal-container__layer",style:{zIndex:t+1+""},"data-modal-id":s.id,ref:t=>{t&&this.layerRefs.set(s.id,t)}},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":s.backdropVisible},onClick:()=>this.handleBackdropClick(s.id)})))))}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, 997);pointer-events:none}sd-modal-container .sd-modal-container__layer{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}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;pointer-events:none}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1;pointer-events:auto}sd-modal-container .sd-modal-container__modal{position:relative;z-index:1;opacity:0;transform:scale(0);pointer-events:auto;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",{autoRemove:[4,"auto-remove"],entries:[32],open:[64],openLoading:[64],createCustom:[64],dismissById:[64],update:[64]}]),k=g,y=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button","sd-circle-progress","sd-confirm-modal","sd-ghost-button","sd-icon","sd-loading-modal","sd-tag"].forEach((s=>{switch(s){case"sd-modal-container":customElements.get(o(s))||customElements.define(o(s),g);break;case"sd-button":customElements.get(o(s))||l();break;case"sd-circle-progress":customElements.get(o(s))||c();break;case"sd-confirm-modal":customElements.get(o(s))||m();break;case"sd-ghost-button":customElements.get(o(s))||h();break;case"sd-icon":customElements.get(o(s))||u();break;case"sd-loading-modal":customElements.get(o(s))||p();break;case"sd-tag":customElements.get(o(s))||b()}}))};export{k as SdModalContainer,y as defineCustomElement}
1
+ import{p as s,H as t,h as e,t as o}from"./p-pwNG5WaX.js";import{u as i,r as a,s as n,i as d,a as r}from"./p-DRVnqiWc.js";import{d as l}from"./p-B6L3bPm2.js";import{d as c}from"./p-p4bNikji.js";import{d as m}from"./p-Bx9dlLbs.js";import{d as h}from"./p-DhtKHJ7-.js";import{d as u}from"./p-DQj-S8AC.js";import{d as p}from"./p-DhmsCQrB.js";import{d as b}from"./p-wLoP3KMv.js";let f=0;const g=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost()}get el(){return this}autoRemove=!1;entries=[];layerRefs=new Map;async open(s,t){const e="modal-"+ ++f,o=this.createConfirmModal(e,s);return this.attachModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async openLoading(s,t){const e="modal-"+ ++f,o=this.createLoadingModal(e,s);return this.attachLoadingModalEventListeners(e,o),this.mountEntry({id:e,modalEl:o,modalRef:t,persistent:!!s.persistent,closing:!1,backdropVisible:!1}),e}async createCustom(s,t,e){const o="modal-"+ ++f;return s.setAttribute("data-modal-id",o),s.classList.add("sd-modal-container__modal"),this.attachModalEventListeners(o,s),this.mountEntry({id:o,modalEl:s,modalRef:e,persistent:!!t.persistent,closing:!1,backdropVisible:!1}),o}componentDidRender(){if(Array.isArray(this.entries))for(const s of this.entries){if(s.closing||s.modalEl.isConnected)continue;const t=this.layerRefs.get(s.id);if(!t)continue;const{id:e,modalEl:o}=s;t.appendChild(o),this.waitForModalReady(o).then((()=>{requestAnimationFrame((()=>{const s=this.entries.find((s=>s.id===e));s&&!s.closing&&o.isConnected&&(this.entries=this.entries.map((s=>s.id===e?{...s,backdropVisible:!0}:s)),o.classList.add("sd-modal-container__modal--visible"))}))}))}}disconnectedCallback(){for(const s of this.entries??[])s.dismissTimerId&&clearTimeout(s.dismissTimerId),i(s.id)}async dismissById(s,t){this.entries.find((t=>t.id===s))&&this.requestDismiss(s,t)}async update(s,t){const e=this.entries.find((t=>t.id===s&&!t.closing));e&&("sd-loading-modal"!==e.modalEl.tagName.toLowerCase()?this.applyProps(e.modalEl,t):this.applyLoadingProps(e.modalEl,t))}mountEntry(s){this.entries=[...this.entries??[],s],a({id:s.id,persistent:s.persistent,requestClose:()=>this.dispatchClose(s.id),shake:()=>this.shakeModal(s.modalEl),setZIndex:s=>{this.el.style.setProperty("--sd-modal-container-z-index",s+"")}})}attachModalEventListeners(s,t){t.addEventListener("sdOk",(()=>this.requestDismiss(s,"confirm"))),t.addEventListener("sdCancel",(()=>this.requestDismiss(s,"cancel"))),t.addEventListener("sdClose",(()=>this.requestDismiss(s,"close")))}attachLoadingModalEventListeners(s,t){t.addEventListener("sdClick",(()=>{const t=this.entries.find((t=>t.id===s));t?.modalRef._triggerClick?.()}))}dispatchClose(s){const t=this.entries.find((t=>t.id===s));t?.modalEl.dispatchEvent(new CustomEvent("sdClose"))}requestDismiss(s,t){const e=this.entries.find((t=>t.id===s));if(!e||e.closing)return;e.modalEl.classList.remove("sd-modal-container__modal--visible");const o=setTimeout((()=>{this.finalizeDismiss(s)}),350);n(s,!1),this.entries=(this.entries??[]).map((t=>t.id===s?{...t,closing:!0,dismissTimerId:o,backdropVisible:!1}:t)),"confirm"===t?e.modalRef._triggerOk():"cancel"===t?e.modalRef._triggerCancel():"close"===t&&e.modalRef._triggerClose()}finalizeDismiss(s){const t=this.entries.find((t=>t.id===s));t&&(t.dismissTimerId&&clearTimeout(t.dismissTimerId),t.modalEl.remove(),i(s),t.modalRef._triggerDismissed(),this.layerRefs.delete(s),this.entries=(this.entries??[]).filter((t=>t.id!==s)),this.autoRemove&&0===this.entries.length&&this.el.remove())}createConfirmModal(s,t){const e=document.createElement("sd-confirm-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyProps(e,t),e}createLoadingModal(s,t){const e=document.createElement("sd-loading-modal");return e.setAttribute("data-modal-id",s),e.classList.add("sd-modal-container__modal"),this.applyLoadingProps(e,t),e}applyLoadingProps(s,t){this.hasOwnProp(t,"state")&&this.setAttr(s,"state",t.state),this.hasOwnProp(t,"message")&&(Array.isArray(t.message)?s.message=t.message:this.setAttr(s,"message",t.message)),this.hasOwnProp(t,"useButton")&&(t.useButton?s.setAttribute("use-button",""):s.removeAttribute("use-button")),this.hasOwnProp(t,"buttonLabel")&&this.setAttr(s,"button-label",t.buttonLabel),this.hasOwnProp(t,"width")&&this.setAttr(s,"width",null!=t.width?t.width+"":void 0),this.hasOwnProp(t,"height")&&this.setAttr(s,"height",null!=t.height?t.height+"":void 0),this.hasOwnProp(t,"progress")&&(s.progress=t.progress)}applyProps(s,t){this.hasOwnProp(t,"type")&&this.setAttr(s,"type",t.type),this.hasOwnProp(t,"title")&&this.setAttr(s,"modal-title",t.title),this.hasOwnProp(t,"titleClass")&&this.setAttr(s,"title-class",t.titleClass),this.hasOwnProp(t,"mainButtonLabel")&&this.setAttr(s,"main-button-label",t.mainButtonLabel),this.hasOwnProp(t,"mainButtonName")&&this.setAttr(s,"main-button-name",t.mainButtonName),this.hasOwnProp(t,"subButtonLabel")&&this.setAttr(s,"sub-button-label",t.subButtonLabel),this.hasOwnProp(t,"tagPreset")&&this.setAttr(s,"tag-preset",t.tagPreset),this.hasOwnProp(t,"tagLabel")&&this.setAttr(s,"tag-label",t.tagLabel),this.hasOwnProp(t,"slotLabel")&&this.setAttr(s,"slot-label",t.slotLabel),this.hasOwnProp(t,"topMessage")&&(s.topMessage=t.topMessage??[]),this.hasOwnProp(t,"bottomMessage")&&(s.bottomMessage=t.bottomMessage??[]),this.hasOwnProp(t,"tagContents")&&(s.tagContents=t.tagContents)}handleBackdropClick(s){d(s)&&r(s)}shakeModal(s){const t="sd-modal-container__modal--shake";s.classList.remove(t),s.addEventListener("animationend",(()=>s.classList.remove(t)),{once:!0}),requestAnimationFrame((()=>{s.classList.add(t)}))}waitForModalReady(s){const t=s.componentOnReady;return"function"==typeof t?t.call(s).then((()=>{})):new Promise((s=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>s()))}))}))}hasOwnProp(s,t){return Object.prototype.hasOwnProperty.call(s,t)}setAttr(s,t,e){null!=e&&s.setAttribute(t,e)}render(){return 0===(this.entries?.length??0)?null:e("div",{class:"sd-modal-container"},this.entries.map(((s,t)=>e("div",{key:s.id,class:"sd-modal-container__layer",style:{zIndex:t+1+""},"data-modal-id":s.id,ref:t=>{t&&this.layerRefs.set(s.id,t)}},e("div",{class:{"sd-modal-container__backdrop":!0,"sd-modal-container__backdrop--visible":s.backdropVisible},onClick:()=>this.handleBackdropClick(s.id)})))))}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, 997);pointer-events:none}sd-modal-container .sd-modal-container__layer{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}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;pointer-events:none}sd-modal-container .sd-modal-container__backdrop--visible{opacity:1;pointer-events:auto}sd-modal-container .sd-modal-container__modal{position:relative;z-index:1;opacity:0;transform:scale(0);pointer-events:auto;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",{autoRemove:[4,"auto-remove"],entries:[32],open:[64],openLoading:[64],createCustom:[64],dismissById:[64],update:[64]}]),k=g,y=function(){"undefined"!=typeof customElements&&["sd-modal-container","sd-button","sd-circle-progress","sd-confirm-modal","sd-ghost-button","sd-icon","sd-loading-modal","sd-tag"].forEach((s=>{switch(s){case"sd-modal-container":customElements.get(o(s))||customElements.define(o(s),g);break;case"sd-button":customElements.get(o(s))||l();break;case"sd-circle-progress":customElements.get(o(s))||c();break;case"sd-confirm-modal":customElements.get(o(s))||m();break;case"sd-ghost-button":customElements.get(o(s))||h();break;case"sd-icon":customElements.get(o(s))||u();break;case"sd-loading-modal":customElements.get(o(s))||p();break;case"sd-tag":customElements.get(o(s))||b()}}))};export{k as SdModalContainer,y as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-CARYLqH9.js";const p=o,r=s;export{p as SdSelectListbox,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-D7g33VZR.js";const p=o,r=s;export{p as SdSelectListbox,r as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-ZSGGRCNc.js";const p=o,r=s;export{p as SdSelect,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-DKwnEkHE.js";const p=o,r=s;export{p as SdSelect,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,e as i,f as a,h as n,d as h,t as o}from"./p-pwNG5WaX.js";import{T as l}from"./p-sZMi_32I.js";import{T as r,a as d,b as c,c as u,d as b}from"./p-DGyTYauz.js";import{d as g}from"./p-B6L3bPm2.js";import{d as f}from"./p-Cye8r1MG.js";import{d as p}from"./p-p4bNikji.js";import{d as m}from"./p-DmDGMDzt.js";import{d as y}from"./p-CwQTEZWO.js";import{d as w}from"./p-DQj-S8AC.js";import{d as C}from"./p-lOVBaLB7.js";import{d as S}from"./p-DCFqtVBm.js";import{d as v}from"./p-ZSGGRCNc.js";import{d as k}from"./p-DP0Dp12H.js";import{d as x}from"./p-EcuI_UmK.js";import{d as _}from"./p-CARYLqH9.js";import{d as R}from"./p-DoREs-rv.js";import{d as P}from"./p-uVZjhyvS.js";import{d as E}from"./p-y_6iWhDy.js";import{d as M}from"./p-D6cUtm8p.js";import{d as A}from"./p-_zllPZMm.js";let I=(t=21)=>{let e="",s=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&s[t]];return e};const D=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.sdSelectChange=s(this,"sdSelectChange",7),this.sdPageChange=s(this,"sdPageChange",7),this.sdRowsPerPageChange=s(this,"sdRowsPerPageChange",7),this.sdVirtualUpdate=s(this,"sdVirtualUpdate",7),this.sdVirtualReachEnd=s(this,"sdVirtualReachEnd",7)}static DEFAULT_NO_DATA_LABEL="데이터가 없습니다.";get el(){return this}tableId=I(8);fallbackTableId=I(8);columns=[];rows;selected=[];rowKey="id";selectable=!1;resizable=!1;width;height;stickyHeader=!1;stickyColumn={left:0,right:0};useTop=!1;noDataLabel=t.DEFAULT_NO_DATA_LABEL;resolvedNoDataLabel=t.DEFAULT_NO_DATA_LABEL;isLoading=!1;pagination;useInternalPagination=!1;useRowsPerPageSelect=!1;dense=!1;useVirtualScroll=!1;rowHeight;get effectiveRowHeight(){return null!=this.rowHeight?this.rowHeight:Number(this.dense?r.dense.height:r.default.height)}virtualBuffer=5;virtualEndThreshold=10;rowsPerPageOption=[{label:"10개씩 보기",value:10},{label:"25개씩 보기",value:25},{label:"50개씩 보기",value:50},{label:"100개씩 보기",value:100}];sdSelectChange;sdPageChange;sdRowsPerPageChange;sdVirtualUpdate;sdVirtualReachEnd;currentPage=1;innerRowsPerPage=10;innerSelected=new Set;columnWidths=[];scrolledLeft=!1;scrolledRight=!1;rowCount=0;loadingScrollTop=0;noDataBodyHeight=60;autoThead=!1;autoTbody=!1;vsStart=0;vsEnd=0;lastReachEndNotifiedRowCount=-1;scrollContainer=null;noDataContentEl=null;noDataContentResizeObserver;onScroll;spanRegistry=new Map;useFrameRegistry=new Map;cellClassRegistry=new Map;rowIndexMap=new Map;rebuildRowIndexMap(){if(this.rowIndexMap.clear(),!Array.isArray(this.rows))return;const t=this.rowKey;this.rows.forEach(((e,s)=>{const i=e?.[t];null!=i&&this.rowIndexMap.set(i+"",s)}))}resolveRowIndex(t){const e=this.rowIndexMap.get(t);if(void 0!==e)return e;const s=Number(t);return Number.isFinite(s)?s:null}toFiniteNumber(t,e){const s="number"==typeof t?t:Number(t);return Number.isFinite(s)?s:e}isRowsPerPageValue(t){return null===t||"string"==typeof t||"number"==typeof t}isValidTableId(t){return"string"==typeof t&&t.trim().length>0&&"undefined"!==t&&"null"!==t}getResolvedTableId(){if(this.isValidTableId(this.tableId))return this.tableId;const t=this.el?.getAttribute(l);return this.isValidTableId(t)?t:this.fallbackTableId}syncTableIdAttribute(){const t=this.getResolvedTableId();this.el?.getAttribute(l)!==t&&this.el.setAttribute(l,t)}handleIsLoadingChange(t){t&&(this.loadingScrollTop=this.scrollContainer?.scrollTop??0),this.syncNoDataContentObserver()}handleUseVirtualScrollChange(t){t&&i((()=>this.propagateVirtualUpdate()))}handleColumnsChange(t){this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.refreshChildrenConfig()}handleRowsChange(t){Array.isArray(t)&&(this.rowCount=t.length,this.rebuildRowIndexMap(),this.useVirtualScroll&&this.propagateVirtualUpdate(!0),this.pushRowsToChildren(t),this.syncNoDataContentObserver())}handleRowKeyChange(){this.rebuildRowIndexMap()}handleTableIdChange(){this.syncTableIdAttribute()}handleNoDataLabelChange(e){this.resolvedNoDataLabel="string"==typeof e&&e.trim().length>0&&"undefined"!==e&&"null"!==e?e:t.DEFAULT_NO_DATA_LABEL}handleConfigChange(){this.refreshChildrenConfig()}handleSelectedChange(t){this.innerSelected=new Set(t)}handlePaginationChange(t){null!=t?.page&&t.page!==this.currentPage&&(this.currentPage=t.page),null!=t?.rowsPerPage&&t.rowsPerPage!==this.innerRowsPerPage&&(this.innerRowsPerPage=t.rowsPerPage)}detectChildren(){const t=!!this.el.querySelector(":scope > sd-thead"),e=!!this.el.querySelector(":scope > sd-tbody");this.autoThead=!t,this.autoTbody=!e}componentWillLoad(){this.syncTableIdAttribute(),this.handleNoDataLabelChange(this.noDataLabel),this.detectChildren(),this.innerSelected=new Set(this.selected||[]),this.columnWidths=(this.columns||[]).map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.rebuildRowIndexMap(),null!=this.pagination?.page&&(this.currentPage=this.pagination.page),null!=this.pagination?.rowsPerPage&&(this.innerRowsPerPage=this.pagination.rowsPerPage);const t=this.el;t.isRowSelectedSync=this.isRowSelectedSync.bind(this),t.updateRowSelectSync=this.updateRowSelectSync.bind(this),t.toggleSelectAllSync=this.toggleSelectAllSync.bind(this),t.getIsAllCheckedSync=this.getIsAllCheckedSync.bind(this),t.getStickyStyleSync=this.getStickyStyleSync.bind(this),t.setRowCountSync=this.setRowCountSync.bind(this),t.handleResize=this.handleResize.bind(this),t.getPaginationInfoSync=this.getPaginationInfoSync.bind(this),t.getVirtualScrollRangeSync=this.getVirtualScrollRangeSync.bind(this),t.getConfigSync=this.getConfigSync.bind(this),t.getTableIdSync=()=>this.getResolvedTableId(),t.getVirtualScrollConfigSync=this.getVirtualScrollConfigSync.bind(this),t.calculateVisibleRange=this.calculateVisibleRange.bind(this),t.registerSpanSync=this.registerSpanSync.bind(this),t.unregisterSpanSync=this.unregisterSpanSync.bind(this),t.getSpanSync=this.getSpanSync.bind(this),t.isCoveredSync=this.isCoveredSync.bind(this),t.hasRowspanSync=this.hasRowspanSync.bind(this),t.registerCellClassSync=this.registerCellClassSync.bind(this),t.unregisterCellClassSync=this.unregisterCellClassSync.bind(this),t.getCellClassSync=this.getCellClassSync.bind(this),t.registerUseFrameSync=this.registerUseFrameSync.bind(this),t.unregisterUseFrameSync=this.unregisterUseFrameSync.bind(this),t.hasUseFrameInRowSync=this.hasUseFrameInRowSync.bind(this),t.isCellUseFrameSync=this.isCellUseFrameSync.bind(this),Array.isArray(this.rows)&&(this.rowCount=this.rows.length,this.pushRowsToChildren(this.rows))}componentDidLoad(){Array.isArray(this.rows)&&this.pushRowsToChildren(this.rows),i((()=>{const t=this.el.shadowRoot?.querySelector(".sd-table__scroll-container");if(!t)return;let e=!1;this.onScroll=()=>{const s=t.scrollLeft,i=s>0,a=s+t.clientWidth<t.scrollWidth;this.scrolledLeft===i&&this.scrolledRight===a||(this.scrolledLeft=i,this.scrolledRight=a,this.refreshChildrenConfig()),this.useVirtualScroll&&!e&&(e=!0,requestAnimationFrame((()=>{e=!1,this.propagateVirtualUpdate()})))},this.scrollContainer=t,t.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll(),this.useVirtualScroll&&this.propagateVirtualUpdate()})),this.syncNoDataContentObserver()}disconnectedCallback(){this.scrollContainer&&this.onScroll&&this.scrollContainer.removeEventListener("scroll",this.onScroll),this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=void 0}syncNoDataContentObserver(){if(0!==this.rowCount||this.isLoading)return this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=void 0,void(this.noDataBodyHeight=60);this.observeNoDataContentHeight()}observeNoDataContentHeight(){if("undefined"==typeof ResizeObserver)return;const t=this.noDataContentEl;t&&(this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=new ResizeObserver((()=>{const e=Math.max(60,Math.ceil(t.scrollHeight));e!==this.noDataBodyHeight&&(this.noDataBodyHeight=e)})),this.noDataContentResizeObserver.observe(t),i((()=>{if(!this.noDataContentEl)return;const t=Math.max(60,Math.ceil(this.noDataContentEl.scrollHeight));t!==this.noDataBodyHeight&&(this.noDataBodyHeight=t)})))}queryChildEl(t){return this.el.querySelector(t)??this.el.shadowRoot?.querySelector(t)??null}queryAllTr(){return[...Array.from(this.el.querySelectorAll("sd-tr")),...Array.from(this.el.shadowRoot?.querySelectorAll("sd-tr")??[])]}pushRowsToChildren(t){const e=this.queryChildEl("sd-tbody");e&&(e.rows=t);const s=this.queryChildEl("sd-thead");s&&(s.rows=t)}handleStructureSlotChange=()=>{Array.isArray(this.rows)&&this.pushRowsToChildren(this.rows),this.refreshChildrenConfig()};refreshChildrenSelection(){const t=this.queryChildEl("sd-thead");t?.refreshSelection?.(),this.queryAllTr().forEach((t=>t.refreshSelection?.()))}refreshChildrenConfig(){const t=this.queryChildEl("sd-thead");t?.refreshConfig?.(),this.queryAllTr().forEach((t=>t.refreshConfig?.()))}maybeEmitVirtualReachEnd(t,e){const s=Math.max(1,this.virtualEndThreshold);e>=Math.max(0,this.rowCount-s)&&this.lastReachEndNotifiedRowCount!==this.rowCount&&(this.lastReachEndNotifiedRowCount=this.rowCount,this.sdVirtualReachEnd.emit({from:t,to:e,rowCount:this.rowCount,threshold:s}))}propagateVirtualUpdate(t=!1){if(!this.scrollContainer||!this.useVirtualScroll)return;const e=this.toFiniteNumber(this.scrollContainer.scrollTop,0),s=this.toFiniteNumber(this.scrollContainer.clientHeight,0),{start:i,end:a}=this.calculateVisibleRange(e,s);if(!Number.isFinite(i)||!Number.isFinite(a))return;const n=this.vsStart!==i||this.vsEnd!==a;if(!n&&!t)return;this.vsStart=i,this.vsEnd=a;const h=i*this.effectiveRowHeight,o=Math.max(0,(this.rowCount-a)*this.effectiveRowHeight),l=this.queryChildEl("sd-tbody");l?.setSpacersSync?.(h,o),n&&this.sdVirtualUpdate.emit({from:i,to:a}),this.maybeEmitVirtualReachEnd(i,a)}getVirtualScrollConfigSync(){return{useVirtualScroll:this.useVirtualScroll,rowHeight:this.effectiveRowHeight,virtualBuffer:this.virtualBuffer,vsStart:this.vsStart,vsEnd:this.vsEnd,rowCount:this.rowCount}}getConfigSync(){return{columns:this.columns,selectable:this.selectable,resizable:this.resizable,stickyColumn:this.stickyColumn,stickyHeader:this.stickyHeader,scrolledLeft:this.scrolledLeft,scrolledRight:this.scrolledRight,columnWidths:this.columnWidths,dense:this.dense}}registerUseFrameSync(t,e){if(null==t||""===e)return;let s=this.useFrameRegistry.get(t);s||(s=new Set,this.useFrameRegistry.set(t,s)),s.add(e)}unregisterUseFrameSync(t,e){if(null==t||""===e)return;const s=this.useFrameRegistry.get(t);s&&(s.delete(e),0===s.size&&this.useFrameRegistry.delete(t))}hasUseFrameInRowSync(t){const e=this.useFrameRegistry.get(t);return null!=e&&e.size>0}isCellUseFrameSync(t,e){return this.useFrameRegistry.get(t)?.has(e)??!1}isRowSelectedSync(t){return Array.from(this.innerSelected).some((e=>e[this.rowKey??"id"]===t[this.rowKey??"id"]))}async isRowSelected(t){return this.isRowSelectedSync(t)}updateRowSelectSync(t){const e=Array.from(this.innerSelected),s=this.isRowSelectedSync(t)?e.filter((e=>e[this.rowKey??"id"]!==t[this.rowKey??"id"])):[...e,t];s.length!==e.length&&(this.innerSelected=new Set(s),this.selected=Array.from(this.innerSelected),this.sdSelectChange.emit(Array.from(this.innerSelected)),this.refreshChildrenSelection())}async updateRowSelect(t){this.updateRowSelectSync(t)}toggleSelectAllSync(t,e){if(t){const t=new Set([...e]);this.innerSelected=new Set([...this.innerSelected,...t])}else{const t=e.map((t=>t[this.rowKey??"id"]));this.innerSelected=new Set([...this.innerSelected].filter((e=>!t.includes(e[this.rowKey??"id"]))))}this.selected=Array.from(this.innerSelected),this.sdSelectChange.emit(Array.from(this.innerSelected)),this.refreshChildrenSelection()}async toggleSelectAll(t,e){this.toggleSelectAllSync(t,e)}getIsAllCheckedSync(t){const e=t.length,s=t.filter((t=>Array.from(this.innerSelected).some((e=>e[this.rowKey??"id"]===t[this.rowKey??"id"])))).length;return 0!==s&&(s===e||null)}async getIsAllChecked(t){return this.getIsAllCheckedSync(t)}changePage(t){this.useInternalPagination?(this.currentPage=t,this.sdPageChange.emit(this.currentPage),this.updateRowsVisibility()):this.sdPageChange.emit(t)}updateRowsVisibility(){this.queryAllTr().forEach((t=>t.updateVisibility?.()))}changeRowsPerPage(t){const e=null!=t&&""!==t?Number(t):0;if(!this.useInternalPagination)return void this.sdRowsPerPageChange.emit(e);this.innerRowsPerPage=e;const s=Math.max(1,Math.ceil(this.rowCount/e));this.currentPage>s&&(this.currentPage=s),this.sdRowsPerPageChange.emit(e),this.updateRowsVisibility()}get lastPageNumber(){if(this.useInternalPagination)return Math.max(1,Math.ceil(this.rowCount/this.innerRowsPerPage));const{lastPage:t,rowsPerPage:e=10}=this.pagination||{};return t??Math.max(1,Math.ceil(this.rowCount/e))}handleResize(t,e,s=!1){if("undefined"==typeof document)return;const i=e.clientX,a=this.columnWidths[t],n=e=>{const n=this.columns[t];if(null==n)return;const h=n.maxWidth||9999,o=e.clientX-i,l=Math.min(Math.max(a+(s?-o:o),n.minWidth||50),h);this.columnWidths=this.columnWidths.map(((e,s)=>s===t?l:e));const r=this.queryChildEl("sd-thead");r?.setColumnWidths?.(this.columnWidths),this.queryAllTr().forEach((t=>t.setColumnWidths?.(this.columnWidths)));const d=this.stickyColumn?.right||0,c=this.columns.filter((t=>!1!==t.visible)).length;d>0&&t===c-d&&requestAnimationFrame((()=>{this.onScroll?.()}))},h=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",h)}getStickyStyleSync(t){const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),this.selectable?d:0),s=this.columnWidths.filter(((e,s)=>s>=this.columns.filter((t=>!1!==t.visible)).length-(this.stickyColumn?.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.columns.filter((t=>!1!==t.visible))[t],a={"--sticky-left-offset":e+"px","--sticky-right-offset":s+"px"};return i?.autoWidth||(a.width=this.columnWidths[t]+"px",a.minWidth=this.columnWidths[t]+"px",a.maxWidth=this.columnWidths[t]+"px"),a}async getStickyStyle(t){return this.getStickyStyleSync(t)}spanKey(t,e){return`${t}::${e}`}requestAllTrUpdate(){this.queryAllTr().forEach((t=>{"function"==typeof t.bumpSpansVersion?t.bumpSpansVersion():a(t)}))}registerSpanSync(t,e,s,i){if(null==t||""===e)return;const a=Math.max(1,Math.floor(s||1)),n=Math.max(1,Math.floor(i||1)),h=this.spanKey(t,e),o=this.spanRegistry.get(h);if(1===a&&1===n){if(!o)return;return this.spanRegistry.delete(h),void this.requestAllTrUpdate()}o&&o.rowspan===a&&o.colspan===n||(this.spanRegistry.set(h,{rowspan:a,colspan:n}),this.requestAllTrUpdate())}unregisterSpanSync(t,e){if(null==t||""===e)return;const s=this.spanKey(t,e);this.spanRegistry.has(s)&&(this.spanRegistry.delete(s),this.requestAllTrUpdate())}getSpanSync(t,e){return this.spanRegistry.get(this.spanKey(t,e))}registerCellClassSync(t,e,s){if(null==t||""===e)return;const i=this.spanKey(t,e),a=(s??"").trim();""!==a?this.cellClassRegistry.set(i,a):this.cellClassRegistry.delete(i)}unregisterCellClassSync(t,e){null!=t&&""!==e&&this.cellClassRegistry.delete(this.spanKey(t,e))}getCellClassSync(t,e){return this.cellClassRegistry.get(this.spanKey(t,e))}hasRowspanSync(){for(const t of this.spanRegistry.values())if(t.rowspan>1)return!0;return!1}isCoveredSync(t,e,s){if(0===this.spanRegistry.size)return!1;const i=s.filter((t=>!1!==t.visible));for(let s=0;s<e;s++){const a=i[s];if(null==a)continue;const n=this.spanRegistry.get(this.spanKey(t,"string"==typeof a.field?a.field:a.name));if(n&&s+n.colspan>e)return!0}const a=this.resolveRowIndex(t);if(null==a)return!1;for(const[t,s]of this.spanRegistry){if(s.rowspan<=1)continue;const n=t.indexOf("::");if(n<0)continue;const h=t.slice(0,n),o=t.slice(n+2),l=this.resolveRowIndex(h);if(null==l)continue;if(l>=a)continue;if(l+s.rowspan<=a)continue;const r=i.findIndex((t=>("string"==typeof t.field?t.field:t.name)===o));if(!(r<0)&&r<=e&&r+s.colspan>e)return!0}return!1}setRowCountSync(t){const e=Math.max(0,Math.floor(this.toFiniteNumber(t,0)));e!==this.rowCount&&(this.lastReachEndNotifiedRowCount=-1),this.rowCount=e,this.useVirtualScroll&&this.propagateVirtualUpdate(!0)}async setRowCount(t){this.setRowCountSync(t)}calculateVisibleRange(t,e){const s=Math.max(1,this.toFiniteNumber(this.effectiveRowHeight,40)),i=Math.max(0,Math.floor(this.toFiniteNumber(this.virtualBuffer,5))),a=Math.max(0,this.toFiniteNumber(t,0)),n=Math.max(0,this.toFiniteNumber(e,0)),h=Math.max(0,Math.floor(this.toFiniteNumber(this.rowCount,0))),o=Math.floor(a/s),l=Math.ceil(n/s);return{start:Math.max(0,o-i),end:Math.min(h,o+l+i)}}getPaginationInfoSync(){if(!this.useInternalPagination||!this.pagination)return null;const t=(this.currentPage-1)*this.innerRowsPerPage;return{startIndex:t,endIndex:t+this.innerRowsPerPage,currentPage:this.currentPage,rowsPerPage:this.innerRowsPerPage}}async getPaginationInfo(){return this.getPaginationInfoSync()}getVirtualScrollRangeSync(){return this.useVirtualScroll&&this.vsEnd>0?{from:this.vsStart,to:this.vsEnd}:null}renderAutoRows(){if(this.useVirtualScroll)return null;const t=this.rows??[],e=this.getPaginationInfoSync(),s=e?.startIndex??0;return(e?t.slice(e.startIndex,e.endIndex):t).map(((t,e)=>{const i=s+e;return n("sd-tr",{key:i,"row-key":i+"",row:t})}))}get tableClasses(){return["sd-table",this.stickyHeader&&"sd-table--sticky-header",this.selectable&&"sd-table--selectable",this.resizable&&"sd-table--resizable",(this.selectable||(this.stickyColumn?.left??0)>0||(this.stickyColumn?.right??0)>0)&&"sd-table--sticky-column",this.scrolledLeft&&"sd-table--scrolled-left",this.scrolledRight&&"sd-table--scrolled-right",0===this.rowCount&&!this.isLoading&&"sd-table--no-data"].filter(Boolean).join(" ")}render(){const t=this.getResolvedTableId(),e=0===this.rowCount&&!this.isLoading,s=e?`max(${this.height||"96px"}, ${36+this.noDataBodyHeight}px)`:this.height||"100%";return n(h,{key:"4596e04bd57aca00fa6378fd26ce33a06a795eaf",style:{"--table-radius":b+"px","--table-border-color":u.color,"--table-border-width":u.width+"px","--table-body-font-family":c.fontFamily,"--table-body-font-weight":c.fontWeight,"--table-body-font-size":c.fontSize+"px","--table-body-line-height":c.lineHeight+"px","--table-body-text-decoration":c.textDecoration,"--table-selectable-width":d+"px"}},n("div",{key:"11a20d327410b0be659cede32917164e036e796c",class:"sd-table__container",style:{"--table-width":this.width,"--table-height":s,"--table-container-height":`calc(${s} - ${this.pagination&&this.rowCount>0&&!this.useVirtualScroll?48:0}px)`}},n("div",{key:"f4f3acf584dc4eacdae25b11aa2b62b73ffab949",class:{"sd-table__wrapper":!0,"sd-table__wrapper--use-top":this.useTop}},n("div",{key:"c8ab618b9c990a22b8e9466a5bfb5f02f4de8b12",class:{"sd-table__scroll-container":!0,"sd-table__scroll-container--loading":this.isLoading,"sd-table__scroll-container--no-data":e}},this.isLoading&&n("div",{key:"a696933a70799ba282fc743281d0af27fd691a2e",class:"sd-table__loading",style:{top:this.loadingScrollTop+"px"}},n("sd-circle-progress",{key:"cba6ac47367ef6499bf338b9b757ee74fdd7e6c1",indeterminate:!0})),e&&n(n.Fragment,null,n("div",{key:"6e22156bf5b0fb9814d9bf9cad57506758c6284b",class:"sd-table__no-data-header-overlay"}),n("div",{key:"b72f9fabcc8acb8e700ad55acc4d7aff08355a1c",class:"sd-table__no-data"},n("div",{key:"43f271a8803121362f16e8153748328658f073ec",class:"sd-table__no-data-content",ref:t=>{this.noDataContentEl=t,t&&this.syncNoDataContentObserver()}},n("slot",{key:"4b8533115bbc81962b80c9c2533fe4b44a87193c",name:"no-data"},n("span",{key:"d94c4f7cf9eca7901b99434f712480a7b20c869a"},this.resolvedNoDataLabel))))),n("table",{key:"a9a353aca09124ed8a82fcd2f8a0a7de09b234f5",class:this.tableClasses},this.autoThead?n("slot",{name:t+"-head",onSlotchange:this.handleStructureSlotChange},n("sd-thead",{rows:this.rows??[]})):n("slot",{name:t+"-head",onSlotchange:this.handleStructureSlotChange}),this.autoTbody?n("slot",{name:t+"-body",onSlotchange:this.handleStructureSlotChange},n("sd-tbody",{rows:this.rows??[]},this.renderAutoRows())):n("slot",{name:t+"-body",onSlotchange:this.handleStructureSlotChange})))),this.pagination&&this.pagination.rowsPerPage>0&&this.rowCount>0&&!this.useVirtualScroll&&n("div",{key:"8afeb9398c3d7540a54b9a3660fb9685ae1cddca",class:"sd-table__pagination"},n("sd-pagination",{key:"e2cbb3f7414f65b81ab2d33eaec5d9f28bed6cc8",currentPage:this.useInternalPagination?this.currentPage:this.pagination.page,lastPage:this.useInternalPagination?this.lastPageNumber:this.pagination.lastPage,onSdPageChange:t=>this.changePage(t.detail)}),this.useRowsPerPageSelect&&n("sd-select",{key:"ce723544dbc7e4cc0d77ced3b685b8575cf67e6f",value:this.useInternalPagination?this.innerRowsPerPage:this.pagination.rowsPerPage,options:this.rowsPerPageOption,width:"128px",emitValue:!0,onSdUpdate:t=>{this.isRowsPerPageValue(t.detail)&&this.changeRowsPerPage(t.detail)}}))))}static get watchers(){return{isLoading:[{handleIsLoadingChange:0}],useVirtualScroll:[{handleUseVirtualScrollChange:0}],columns:[{handleColumnsChange:0}],rows:[{handleRowsChange:0}],rowKey:[{handleRowKeyChange:0}],tableId:[{handleTableIdChange:0}],noDataLabel:[{handleNoDataLabelChange:0}],selectable:[{handleConfigChange:0}],resizable:[{handleConfigChange:0}],stickyColumn:[{handleConfigChange:0}],stickyHeader:[{handleConfigChange:0}],dense:[{handleConfigChange:0}],selected:[{handleSelectedChange:0}],pagination:[{handlePaginationChange:0}]}}static get style(){return"sd-table,:host{display:block;width:100%;max-width:100%;min-width:0}sd-table *,:host *{box-sizing:border-box}.sd-table__container{height:var(--table-height, 100%);width:var(--table-width, 100%);max-width:100%;min-width:0;color:#222222;display:flex;flex-direction:column}.sd-table__wrapper{width:100%;min-width:0;height:var(--table-container-height, 400px);border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);border-radius:var(--table-radius, 8px);overflow:hidden}.sd-table__wrapper--use-top{border-radius:0 0 var(--table-radius, 8px) var(--table-radius, 8px)}.sd-table__scroll-container{width:100%;height:100%;display:flex;flex-direction:column;position:relative;font-family:var(--table-body-font-family, inherit);font-weight:var(--table-body-font-weight, 400);font-size:var(--table-body-font-size, 12px);line-height:var(--table-body-line-height, 20px);text-decoration:var(--table-body-text-decoration, none);overflow:auto;background:#FFFFFF}.sd-table__scroll-container--loading{overflow:hidden !important;pointer-events:none}.sd-table__scroll-container--no-data{overflow:hidden;pointer-events:none}.sd-table__no-data{position:absolute;top:36px;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;font-size:var(--table-body-font-size, 12px);color:#888888;pointer-events:none;z-index:200;background:rgba(255, 255, 255, 0.6)}.sd-table__no-data-header-overlay{position:absolute;top:0;left:0;right:0;height:36px;background:rgba(255, 255, 255, 0.6);z-index:210;pointer-events:none}.sd-table__no-data-content{pointer-events:auto;min-height:60px;width:100%;display:flex;align-items:center;justify-content:center}.sd-table__loading{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center;pointer-events:none}.sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table--selectable sd-thead,.sd-table--selectable sd-tbody{--selectable:true}.sd-table--sticky-header sd-thead thead{position:sticky;top:0;z-index:120}.sd-table--sticky-column sd-thead,.sd-table--sticky-column sd-tbody{--sticky-column:true}.sd-table--scrolled-left sd-thead,.sd-table--scrolled-left sd-tbody{--scrolled-left:true}.sd-table--scrolled-right sd-thead,.sd-table--scrolled-right sd-tbody{--scrolled-right:true}.sd-table--resizable sd-thead{--resizable:true}.sd-table--no-data sd-thead{opacity:0.4}.sd-table__pagination{position:relative;background:#F9F9F9;height:48px;display:flex;align-items:center;justify-content:center;border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);margin-top:-1px;border-radius:var(--table-radius, 8px)}.sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}"}},[769,"sd-table",{tableId:[513,"table-id"],columns:[16],rows:[16],selected:[1040],rowKey:[1,"row-key"],selectable:[4],resizable:[4],width:[1],height:[1],stickyHeader:[4,"sticky-header"],stickyColumn:[16],useTop:[4,"use-top"],noDataLabel:[1,"no-data-label"],isLoading:[4,"is-loading"],pagination:[16],useInternalPagination:[4,"use-internal-pagination"],useRowsPerPageSelect:[4,"use-rows-per-page-select"],dense:[4],useVirtualScroll:[4,"use-virtual-scroll"],rowHeight:[2,"row-height"],virtualBuffer:[2,"virtual-buffer"],virtualEndThreshold:[2,"virtual-end-threshold"],rowsPerPageOption:[16],resolvedNoDataLabel:[32],currentPage:[32],innerRowsPerPage:[32],innerSelected:[32],columnWidths:[32],scrolledLeft:[32],scrolledRight:[32],rowCount:[32],loadingScrollTop:[32],noDataBodyHeight:[32],autoThead:[32],autoTbody:[32],isRowSelected:[64],updateRowSelect:[64],toggleSelectAll:[64],getIsAllChecked:[64],getStickyStyle:[64],setRowCount:[64],getPaginationInfo:[64]},void 0,{isLoading:[{handleIsLoadingChange:0}],useVirtualScroll:[{handleUseVirtualScrollChange:0}],columns:[{handleColumnsChange:0}],rows:[{handleRowsChange:0}],rowKey:[{handleRowKeyChange:0}],tableId:[{handleTableIdChange:0}],noDataLabel:[{handleNoDataLabelChange:0}],selectable:[{handleConfigChange:0}],resizable:[{handleConfigChange:0}],stickyColumn:[{handleConfigChange:0}],stickyHeader:[{handleConfigChange:0}],dense:[{handleConfigChange:0}],selected:[{handleSelectedChange:0}],pagination:[{handlePaginationChange:0}]}]),j=D,L=function(){"undefined"!=typeof customElements&&["sd-table","sd-button","sd-checkbox","sd-circle-progress","sd-field","sd-floating-portal","sd-icon","sd-pagination","sd-portal","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tbody","sd-thead","sd-tooltip","sd-tr"].forEach((t=>{switch(t){case"sd-table":customElements.get(o(t))||customElements.define(o(t),D);break;case"sd-button":customElements.get(o(t))||g();break;case"sd-checkbox":customElements.get(o(t))||f();break;case"sd-circle-progress":customElements.get(o(t))||p();break;case"sd-field":customElements.get(o(t))||m();break;case"sd-floating-portal":customElements.get(o(t))||y();break;case"sd-icon":customElements.get(o(t))||w();break;case"sd-pagination":customElements.get(o(t))||C();break;case"sd-portal":customElements.get(o(t))||S();break;case"sd-select":customElements.get(o(t))||v();break;case"sd-select-list-item":customElements.get(o(t))||k();break;case"sd-select-list-item-search":customElements.get(o(t))||x();break;case"sd-select-listbox":customElements.get(o(t))||_();break;case"sd-select-trigger":customElements.get(o(t))||R();break;case"sd-tbody":customElements.get(o(t))||P();break;case"sd-thead":customElements.get(o(t))||E();break;case"sd-tooltip":customElements.get(o(t))||M();break;case"sd-tr":customElements.get(o(t))||A()}}))};export{j as SdTable,L as defineCustomElement}
1
+ import{p as t,H as e,c as s,e as i,f as a,h as n,d as h,t as o}from"./p-pwNG5WaX.js";import{T as r}from"./p-sZMi_32I.js";import{T as l,a as d,b as c,c as u,d as b}from"./p-DGyTYauz.js";import{d as g}from"./p-B6L3bPm2.js";import{d as f}from"./p-Cye8r1MG.js";import{d as p}from"./p-p4bNikji.js";import{d as m}from"./p-DmDGMDzt.js";import{d as y}from"./p-CwQTEZWO.js";import{d as w}from"./p-DQj-S8AC.js";import{d as C}from"./p-lOVBaLB7.js";import{d as S}from"./p-DCFqtVBm.js";import{d as v}from"./p-DKwnEkHE.js";import{d as k}from"./p-DP0Dp12H.js";import{d as x}from"./p-EcuI_UmK.js";import{d as _}from"./p-D7g33VZR.js";import{d as R}from"./p-DoREs-rv.js";import{d as P}from"./p-uVZjhyvS.js";import{d as E}from"./p-y_6iWhDy.js";import{d as M}from"./p-D6cUtm8p.js";import{d as A}from"./p-gqfJ-KUj.js";let I=(t=21)=>{let e="",s=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&s[t]];return e};const D=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.sdSelectChange=s(this,"sdSelectChange",7),this.sdPageChange=s(this,"sdPageChange",7),this.sdRowsPerPageChange=s(this,"sdRowsPerPageChange",7),this.sdVirtualUpdate=s(this,"sdVirtualUpdate",7),this.sdVirtualReachEnd=s(this,"sdVirtualReachEnd",7)}static DEFAULT_NO_DATA_LABEL="데이터가 없습니다.";get el(){return this}tableId=I(8);fallbackTableId=I(8);columns=[];rows;selected=[];rowKey="id";selectable=!1;resizable=!1;width;height;stickyHeader=!1;stickyColumn={left:0,right:0};useTop=!1;noDataLabel=t.DEFAULT_NO_DATA_LABEL;resolvedNoDataLabel=t.DEFAULT_NO_DATA_LABEL;isLoading=!1;pagination;useInternalPagination=!1;useRowsPerPageSelect=!1;dense=!1;useVirtualScroll=!1;rowHeight;get effectiveRowHeight(){return null!=this.rowHeight?this.rowHeight:Number(this.dense?l.dense.height:l.default.height)}virtualBuffer=5;virtualEndThreshold=10;rowsPerPageOption=[{label:"10개씩 보기",value:10},{label:"25개씩 보기",value:25},{label:"50개씩 보기",value:50},{label:"100개씩 보기",value:100}];sdSelectChange;sdPageChange;sdRowsPerPageChange;sdVirtualUpdate;sdVirtualReachEnd;currentPage=1;innerRowsPerPage=10;innerSelected=new Set;columnWidths=[];scrolledLeft=!1;scrolledRight=!1;rowCount=0;loadingScrollTop=0;noDataBodyHeight=60;autoThead=!1;autoTbody=!1;vsStart=0;vsEnd=0;lastReachEndNotifiedRowCount=-1;scrollContainer=null;noDataContentEl=null;noDataContentResizeObserver;onScroll;spanRegistry=new Map;useFrameRegistry=new Map;cellClassRegistry=new Map;rowIndexMap=new Map;rebuildRowIndexMap(){if(this.rowIndexMap.clear(),!Array.isArray(this.rows))return;const t=this.rowKey;this.rows.forEach(((e,s)=>{const i=e?.[t];null!=i&&this.rowIndexMap.set(i+"",s)}))}resolveRowIndex(t){const e=this.rowIndexMap.get(t);if(void 0!==e)return e;const s=Number(t);return Number.isFinite(s)?s:null}toFiniteNumber(t,e){const s="number"==typeof t?t:Number(t);return Number.isFinite(s)?s:e}isRowsPerPageValue(t){return null===t||"string"==typeof t||"number"==typeof t}isValidTableId(t){return"string"==typeof t&&t.trim().length>0&&"undefined"!==t&&"null"!==t}getResolvedTableId(){if(this.isValidTableId(this.tableId))return this.tableId;const t=this.el?.getAttribute(r);return this.isValidTableId(t)?t:this.fallbackTableId}syncTableIdAttribute(){const t=this.getResolvedTableId();this.el?.getAttribute(r)!==t&&this.el.setAttribute(r,t)}handleIsLoadingChange(t){t&&(this.loadingScrollTop=this.scrollContainer?.scrollTop??0),this.syncNoDataContentObserver()}handleUseVirtualScrollChange(t){t&&i((()=>this.propagateVirtualUpdate()))}handleColumnsChange(t){this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.refreshChildrenConfig()}handleRowsChange(t){Array.isArray(t)&&(this.rowCount=t.length,this.rebuildRowIndexMap(),this.useVirtualScroll&&this.propagateVirtualUpdate(!0),this.pushRowsToChildren(t),this.syncNoDataContentObserver())}handleRowKeyChange(){this.rebuildRowIndexMap()}handleTableIdChange(){this.syncTableIdAttribute()}handleNoDataLabelChange(e){this.resolvedNoDataLabel="string"==typeof e&&e.trim().length>0&&"undefined"!==e&&"null"!==e?e:t.DEFAULT_NO_DATA_LABEL}handleConfigChange(){this.refreshChildrenConfig()}handleSelectedChange(t){this.innerSelected=new Set(t)}handlePaginationChange(t){null!=t?.page&&t.page!==this.currentPage&&(this.currentPage=t.page),null!=t?.rowsPerPage&&t.rowsPerPage!==this.innerRowsPerPage&&(this.innerRowsPerPage=t.rowsPerPage)}detectChildren(){const t=!!this.el.querySelector(":scope > sd-thead"),e=!!this.el.querySelector(":scope > sd-tbody");this.autoThead=!t,this.autoTbody=!e}componentWillLoad(){this.syncTableIdAttribute(),this.handleNoDataLabelChange(this.noDataLabel),this.detectChildren(),this.innerSelected=new Set(this.selected||[]),this.columnWidths=(this.columns||[]).map((t=>t.autoWidth?0:parseInt(t.width||"120",10))),this.rebuildRowIndexMap(),null!=this.pagination?.page&&(this.currentPage=this.pagination.page),null!=this.pagination?.rowsPerPage&&(this.innerRowsPerPage=this.pagination.rowsPerPage);const t=this.el;t.isRowSelectedSync=this.isRowSelectedSync.bind(this),t.updateRowSelectSync=this.updateRowSelectSync.bind(this),t.toggleSelectAllSync=this.toggleSelectAllSync.bind(this),t.getIsAllCheckedSync=this.getIsAllCheckedSync.bind(this),t.getStickyStyleSync=this.getStickyStyleSync.bind(this),t.setRowCountSync=this.setRowCountSync.bind(this),t.handleResize=this.handleResize.bind(this),t.getPaginationInfoSync=this.getPaginationInfoSync.bind(this),t.getVirtualScrollRangeSync=this.getVirtualScrollRangeSync.bind(this),t.getConfigSync=this.getConfigSync.bind(this),t.getTableIdSync=()=>this.getResolvedTableId(),t.getVirtualScrollConfigSync=this.getVirtualScrollConfigSync.bind(this),t.calculateVisibleRange=this.calculateVisibleRange.bind(this),t.registerSpanSync=this.registerSpanSync.bind(this),t.unregisterSpanSync=this.unregisterSpanSync.bind(this),t.getSpanSync=this.getSpanSync.bind(this),t.isCoveredSync=this.isCoveredSync.bind(this),t.hasRowspanSync=this.hasRowspanSync.bind(this),t.registerCellClassSync=this.registerCellClassSync.bind(this),t.unregisterCellClassSync=this.unregisterCellClassSync.bind(this),t.getCellClassSync=this.getCellClassSync.bind(this),t.registerUseFrameSync=this.registerUseFrameSync.bind(this),t.unregisterUseFrameSync=this.unregisterUseFrameSync.bind(this),t.hasUseFrameInRowSync=this.hasUseFrameInRowSync.bind(this),t.isCellUseFrameSync=this.isCellUseFrameSync.bind(this),Array.isArray(this.rows)&&(this.rowCount=this.rows.length,this.pushRowsToChildren(this.rows))}componentDidLoad(){Array.isArray(this.rows)&&this.pushRowsToChildren(this.rows),i((()=>{const t=this.el.shadowRoot?.querySelector(".sd-table__scroll-container");if(!t)return;let e=!1;this.onScroll=()=>{const s=t.scrollLeft,i=s>0,a=s+t.clientWidth<t.scrollWidth;this.scrolledLeft===i&&this.scrolledRight===a||(this.scrolledLeft=i,this.scrolledRight=a,this.refreshChildrenConfig()),this.useVirtualScroll&&!e&&(e=!0,requestAnimationFrame((()=>{e=!1,this.propagateVirtualUpdate()})))},this.scrollContainer=t,t.addEventListener("scroll",this.onScroll,{passive:!0}),this.onScroll(),this.useVirtualScroll&&this.propagateVirtualUpdate()})),this.syncNoDataContentObserver()}disconnectedCallback(){this.scrollContainer&&this.onScroll&&this.scrollContainer.removeEventListener("scroll",this.onScroll),this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=void 0}syncNoDataContentObserver(){if(0!==this.rowCount||this.isLoading)return this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=void 0,void(this.noDataBodyHeight=60);this.observeNoDataContentHeight()}observeNoDataContentHeight(){if("undefined"==typeof ResizeObserver)return;const t=this.noDataContentEl;t&&(this.noDataContentResizeObserver?.disconnect(),this.noDataContentResizeObserver=new ResizeObserver((()=>{const e=Math.max(60,Math.ceil(t.scrollHeight));e!==this.noDataBodyHeight&&(this.noDataBodyHeight=e)})),this.noDataContentResizeObserver.observe(t),i((()=>{if(!this.noDataContentEl)return;const t=Math.max(60,Math.ceil(this.noDataContentEl.scrollHeight));t!==this.noDataBodyHeight&&(this.noDataBodyHeight=t)})))}queryChildEl(t){return this.el.querySelector(t)??this.el.shadowRoot?.querySelector(t)??null}queryAllTr(){return[...Array.from(this.el.querySelectorAll("sd-tr")),...Array.from(this.el.shadowRoot?.querySelectorAll("sd-tr")??[])]}pushRowsToChildren(t){const e=this.queryChildEl("sd-tbody");e&&(e.rows=t);const s=this.queryChildEl("sd-thead");s&&(s.rows=t)}handleStructureSlotChange=()=>{Array.isArray(this.rows)&&this.pushRowsToChildren(this.rows),this.refreshChildrenConfig()};refreshChildrenSelection(){const t=this.queryChildEl("sd-thead");t?.refreshSelection?.(),this.queryAllTr().forEach((t=>t.refreshSelection?.()))}refreshChildrenConfig(){const t=this.queryChildEl("sd-thead");t?.refreshConfig?.(),this.queryAllTr().forEach((t=>t.refreshConfig?.()))}maybeEmitVirtualReachEnd(t,e){const s=Math.max(1,this.virtualEndThreshold);e>=Math.max(0,this.rowCount-s)&&this.lastReachEndNotifiedRowCount!==this.rowCount&&(this.lastReachEndNotifiedRowCount=this.rowCount,this.sdVirtualReachEnd.emit({from:t,to:e,rowCount:this.rowCount,threshold:s}))}propagateVirtualUpdate(t=!1){if(!this.scrollContainer||!this.useVirtualScroll)return;const e=this.toFiniteNumber(this.scrollContainer.scrollTop,0),s=this.toFiniteNumber(this.scrollContainer.clientHeight,0),{start:i,end:a}=this.calculateVisibleRange(e,s);if(!Number.isFinite(i)||!Number.isFinite(a))return;const n=this.vsStart!==i||this.vsEnd!==a;if(!n&&!t)return;this.vsStart=i,this.vsEnd=a;const h=i*this.effectiveRowHeight,o=Math.max(0,(this.rowCount-a)*this.effectiveRowHeight),r=this.queryChildEl("sd-tbody");r?.setSpacersSync?.(h,o),n&&this.sdVirtualUpdate.emit({from:i,to:a}),this.maybeEmitVirtualReachEnd(i,a)}getVirtualScrollConfigSync(){return{useVirtualScroll:this.useVirtualScroll,rowHeight:this.effectiveRowHeight,virtualBuffer:this.virtualBuffer,vsStart:this.vsStart,vsEnd:this.vsEnd,rowCount:this.rowCount}}getConfigSync(){return{columns:this.columns,selectable:this.selectable,resizable:this.resizable,stickyColumn:this.stickyColumn,stickyHeader:this.stickyHeader,scrolledLeft:this.scrolledLeft,scrolledRight:this.scrolledRight,columnWidths:this.columnWidths,dense:this.dense}}registerUseFrameSync(t,e){if(null==t||""===e)return;let s=this.useFrameRegistry.get(t);s||(s=new Set,this.useFrameRegistry.set(t,s)),s.add(e)}unregisterUseFrameSync(t,e){if(null==t||""===e)return;const s=this.useFrameRegistry.get(t);s&&(s.delete(e),0===s.size&&this.useFrameRegistry.delete(t))}hasUseFrameInRowSync(t){const e=this.useFrameRegistry.get(t);return null!=e&&e.size>0}isCellUseFrameSync(t,e){return this.useFrameRegistry.get(t)?.has(e)??!1}isRowSelectedSync(t){return Array.from(this.innerSelected).some((e=>e[this.rowKey??"id"]===t[this.rowKey??"id"]))}async isRowSelected(t){return this.isRowSelectedSync(t)}updateRowSelectSync(t){const e=Array.from(this.innerSelected),s=this.isRowSelectedSync(t)?e.filter((e=>e[this.rowKey??"id"]!==t[this.rowKey??"id"])):[...e,t];s.length!==e.length&&(this.innerSelected=new Set(s),this.selected=Array.from(this.innerSelected),this.sdSelectChange.emit(Array.from(this.innerSelected)),this.refreshChildrenSelection())}async updateRowSelect(t){this.updateRowSelectSync(t)}toggleSelectAllSync(t,e){if(t){const t=new Set([...e]);this.innerSelected=new Set([...this.innerSelected,...t])}else{const t=e.map((t=>t[this.rowKey??"id"]));this.innerSelected=new Set([...this.innerSelected].filter((e=>!t.includes(e[this.rowKey??"id"]))))}this.selected=Array.from(this.innerSelected),this.sdSelectChange.emit(Array.from(this.innerSelected)),this.refreshChildrenSelection()}async toggleSelectAll(t,e){this.toggleSelectAllSync(t,e)}getIsAllCheckedSync(t){const e=t.length,s=t.filter((t=>Array.from(this.innerSelected).some((e=>e[this.rowKey??"id"]===t[this.rowKey??"id"])))).length;return 0!==s&&(s===e||null)}async getIsAllChecked(t){return this.getIsAllCheckedSync(t)}changePage(t){this.useInternalPagination?(this.currentPage=t,this.sdPageChange.emit(this.currentPage),this.updateRowsVisibility()):this.sdPageChange.emit(t)}updateRowsVisibility(){this.queryAllTr().forEach((t=>t.updateVisibility?.()))}changeRowsPerPage(t){const e=null!=t&&""!==t?Number(t):0;if(!this.useInternalPagination)return void this.sdRowsPerPageChange.emit(e);this.innerRowsPerPage=e;const s=Math.max(1,Math.ceil(this.rowCount/e));this.currentPage>s&&(this.currentPage=s),this.sdRowsPerPageChange.emit(e),this.updateRowsVisibility()}get lastPageNumber(){if(this.useInternalPagination)return Math.max(1,Math.ceil(this.rowCount/this.innerRowsPerPage));const{lastPage:t,rowsPerPage:e=10}=this.pagination||{};return t??Math.max(1,Math.ceil(this.rowCount/e))}handleResize(t,e,s=!1){if("undefined"==typeof document)return;const i=e.clientX,a=this.columnWidths[t],n=e=>{const n=this.columns[t];if(null==n)return;const h=n.maxWidth||9999,o=e.clientX-i,r=Math.min(Math.max(a+(s?-o:o),n.minWidth||50),h);this.columnWidths=this.columnWidths.map(((e,s)=>s===t?r:e));const l=this.queryChildEl("sd-thead");l?.setColumnWidths?.(this.columnWidths),this.queryAllTr().forEach((t=>t.setColumnWidths?.(this.columnWidths)));const d=this.stickyColumn?.right||0,c=this.columns.filter((t=>!1!==t.visible)).length;d>0&&t===c-d&&requestAnimationFrame((()=>{this.onScroll?.()}))},h=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",h)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",h)}getStickyStyleSync(t){const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),this.selectable?d:0),s=this.columnWidths.filter(((e,s)=>s>=this.columns.filter((t=>!1!==t.visible)).length-(this.stickyColumn?.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.columns.filter((t=>!1!==t.visible))[t],a={"--sticky-left-offset":e+"px","--sticky-right-offset":s+"px"};return i?.autoWidth||(a.width=this.columnWidths[t]+"px",a.minWidth=this.columnWidths[t]+"px",a.maxWidth=this.columnWidths[t]+"px"),a}async getStickyStyle(t){return this.getStickyStyleSync(t)}spanKey(t,e){return`${t}::${e}`}requestAllTrUpdate(){this.queryAllTr().forEach((t=>{"function"==typeof t.bumpSpansVersion?t.bumpSpansVersion():a(t)}))}registerSpanSync(t,e,s,i){if(null==t||""===e)return;const a=Math.max(1,Math.floor(s||1)),n=Math.max(1,Math.floor(i||1)),h=this.spanKey(t,e),o=this.spanRegistry.get(h);if(1===a&&1===n){if(!o)return;return this.spanRegistry.delete(h),void this.requestAllTrUpdate()}o&&o.rowspan===a&&o.colspan===n||(this.spanRegistry.set(h,{rowspan:a,colspan:n}),this.requestAllTrUpdate())}unregisterSpanSync(t,e){if(null==t||""===e)return;const s=this.spanKey(t,e);this.spanRegistry.has(s)&&(this.spanRegistry.delete(s),this.requestAllTrUpdate())}getSpanSync(t,e){return this.spanRegistry.get(this.spanKey(t,e))}registerCellClassSync(t,e,s){if(null==t||""===e)return;const i=this.spanKey(t,e),a=(s??"").trim();""!==a?this.cellClassRegistry.set(i,a):this.cellClassRegistry.delete(i)}unregisterCellClassSync(t,e){null!=t&&""!==e&&this.cellClassRegistry.delete(this.spanKey(t,e))}getCellClassSync(t,e){return this.cellClassRegistry.get(this.spanKey(t,e))}hasRowspanSync(){for(const t of this.spanRegistry.values())if(t.rowspan>1)return!0;return!1}isCoveredSync(t,e,s){if(0===this.spanRegistry.size)return!1;const i=s.filter((t=>!1!==t.visible));for(let s=0;s<e;s++){const a=i[s];if(null==a)continue;const n=this.spanRegistry.get(this.spanKey(t,"string"==typeof a.field?a.field:a.name));if(n&&s+n.colspan>e)return!0}const a=this.resolveRowIndex(t);if(null==a)return!1;for(const[t,s]of this.spanRegistry){if(s.rowspan<=1)continue;const n=t.indexOf("::");if(n<0)continue;const h=t.slice(0,n),o=t.slice(n+2),r=this.resolveRowIndex(h);if(null==r)continue;if(r>=a)continue;if(r+s.rowspan<=a)continue;const l=i.findIndex((t=>("string"==typeof t.field?t.field:t.name)===o));if(!(l<0)&&l<=e&&l+s.colspan>e)return!0}return!1}setRowCountSync(t){const e=Math.max(0,Math.floor(this.toFiniteNumber(t,0)));e!==this.rowCount&&(this.lastReachEndNotifiedRowCount=-1),this.rowCount=e,this.useVirtualScroll&&this.propagateVirtualUpdate(!0)}async setRowCount(t){this.setRowCountSync(t)}calculateVisibleRange(t,e){const s=Math.max(1,this.toFiniteNumber(this.effectiveRowHeight,40)),i=Math.max(0,Math.floor(this.toFiniteNumber(this.virtualBuffer,5))),a=Math.max(0,this.toFiniteNumber(t,0)),n=Math.max(0,this.toFiniteNumber(e,0)),h=Math.max(0,Math.floor(this.toFiniteNumber(this.rowCount,0))),o=Math.floor(a/s),r=Math.ceil(n/s);return{start:Math.max(0,o-i),end:Math.min(h,o+r+i)}}getPaginationInfoSync(){if(!this.useInternalPagination||!this.pagination)return null;const t=(this.currentPage-1)*this.innerRowsPerPage;return{startIndex:t,endIndex:t+this.innerRowsPerPage,currentPage:this.currentPage,rowsPerPage:this.innerRowsPerPage}}async getPaginationInfo(){return this.getPaginationInfoSync()}getVirtualScrollRangeSync(){return this.useVirtualScroll&&this.vsEnd>0?{from:this.vsStart,to:this.vsEnd}:null}renderAutoRows(){if(this.useVirtualScroll)return null;const t=this.rows??[],e=this.getPaginationInfoSync(),s=e?.startIndex??0;return(e?t.slice(e.startIndex,e.endIndex):t).map(((t,e)=>{const i=s+e;return n("sd-tr",{key:i,"row-key":i+"",row:t})}))}get tableClasses(){return["sd-table",this.stickyHeader&&"sd-table--sticky-header",this.selectable&&"sd-table--selectable",this.resizable&&"sd-table--resizable",(this.selectable||(this.stickyColumn?.left??0)>0||(this.stickyColumn?.right??0)>0)&&"sd-table--sticky-column",this.scrolledLeft&&"sd-table--scrolled-left",this.scrolledRight&&"sd-table--scrolled-right",0===this.rowCount&&!this.isLoading&&"sd-table--no-data"].filter(Boolean).join(" ")}render(){const t=this.getResolvedTableId(),e=0===this.rowCount&&!this.isLoading,s=36+this.noDataBodyHeight;return n(h,{key:"57f92f3d10b928ca964c2ac9917f7dd64991591f",style:{"--table-radius":b+"px","--table-border-color":u.color,"--table-border-width":u.width+"px","--table-body-font-family":c.fontFamily,"--table-body-font-weight":c.fontWeight,"--table-body-font-size":c.fontSize+"px","--table-body-line-height":c.lineHeight+"px","--table-body-text-decoration":c.textDecoration,"--table-selectable-width":d+"px","--table-host-height":e?void 0!==this.height?`max(${this.height}, ${s}px)`:`max(${s}px, 100%)`:this.height??"100%"}},n("div",{key:"ea3de705492e1c6c7f99d251e9d6e07136c72ce1",class:"sd-table__container",style:{"--table-width":this.width,"--pagination-height":(this.pagination&&this.rowCount>0&&!this.useVirtualScroll?48:0)+"px"}},n("div",{key:"12ef88f9b81c94980806038924b194d143d3895a",class:{"sd-table__wrapper":!0,"sd-table__wrapper--use-top":this.useTop}},n("div",{key:"b592db122ecf7f22903c9a49ebfb36138f7e18d6",class:{"sd-table__scroll-container":!0,"sd-table__scroll-container--loading":this.isLoading,"sd-table__scroll-container--no-data":e}},this.isLoading&&n("div",{key:"5e6badf9334ed7390f19d3c5df7335ea0efa25c4",class:"sd-table__loading",style:{top:this.loadingScrollTop+"px"}},n("sd-circle-progress",{key:"70bd57550b67c5d737bf8c6e7984703b963637f9",indeterminate:!0})),e&&n(n.Fragment,null,n("div",{key:"280a829ddf5275c62a8310d3fe6914863e6b79d5",class:"sd-table__no-data-header-overlay"}),n("div",{key:"35f7584702b61c076ebcf61d16fedb30390e7cca",class:"sd-table__no-data"},n("div",{key:"a67af0bf322ebfa55fc515a63b6c299676fa4aa5",class:"sd-table__no-data-content",ref:t=>{this.noDataContentEl=t,t&&this.syncNoDataContentObserver()}},n("slot",{key:"5bc8cf68c461359358edddfa085ee4121d6a3c24",name:"no-data"},n("span",{key:"01cb29dc03a084530ef47170515066da65110aa3"},this.resolvedNoDataLabel))))),n("table",{key:"e0f05c5ceab477809b0b26ddf2dc7a3fc5963076",class:this.tableClasses},this.autoThead?n("slot",{name:t+"-head",onSlotchange:this.handleStructureSlotChange},n("sd-thead",{rows:this.rows??[]})):n("slot",{name:t+"-head",onSlotchange:this.handleStructureSlotChange}),this.autoTbody?n("slot",{name:t+"-body",onSlotchange:this.handleStructureSlotChange},n("sd-tbody",{rows:this.rows??[]},this.renderAutoRows())):n("slot",{name:t+"-body",onSlotchange:this.handleStructureSlotChange})))),this.pagination&&this.pagination.rowsPerPage>0&&this.rowCount>0&&!this.useVirtualScroll&&n("div",{key:"6f06c639cfc61e6be21ca9b598054ad17a07b879",class:"sd-table__pagination"},n("sd-pagination",{key:"2edf2f1b0db1a34b080c82c99da5ff416fb6a325",currentPage:this.useInternalPagination?this.currentPage:this.pagination.page,lastPage:this.useInternalPagination?this.lastPageNumber:this.pagination.lastPage,onSdPageChange:t=>this.changePage(t.detail)}),this.useRowsPerPageSelect&&n("sd-select",{key:"427db7075794819ebe0ce11e063480e87defc8b9",value:this.useInternalPagination?this.innerRowsPerPage:this.pagination.rowsPerPage,options:this.rowsPerPageOption,width:"128px",emitValue:!0,onSdUpdate:t=>{this.isRowsPerPageValue(t.detail)&&this.changeRowsPerPage(t.detail)}}))))}static get watchers(){return{isLoading:[{handleIsLoadingChange:0}],useVirtualScroll:[{handleUseVirtualScrollChange:0}],columns:[{handleColumnsChange:0}],rows:[{handleRowsChange:0}],rowKey:[{handleRowKeyChange:0}],tableId:[{handleTableIdChange:0}],noDataLabel:[{handleNoDataLabelChange:0}],selectable:[{handleConfigChange:0}],resizable:[{handleConfigChange:0}],stickyColumn:[{handleConfigChange:0}],stickyHeader:[{handleConfigChange:0}],dense:[{handleConfigChange:0}],selected:[{handleSelectedChange:0}],pagination:[{handlePaginationChange:0}]}}static get style(){return"sd-table,:host{display:block;width:100%;height:var(--table-host-height);max-width:100%;min-width:0}sd-table *,:host *{box-sizing:border-box}.sd-table__container{height:100%;width:var(--table-width, 100%);max-width:100%;min-width:0;color:#222222;display:flex;flex-direction:column}.sd-table__wrapper{width:100%;min-width:0;height:calc(100% - var(--pagination-height, 0px));border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);border-radius:var(--table-radius, 8px);overflow:hidden}.sd-table__wrapper--use-top{border-radius:0 0 var(--table-radius, 8px) var(--table-radius, 8px)}.sd-table__scroll-container{width:100%;height:100%;display:flex;flex-direction:column;position:relative;font-family:var(--table-body-font-family, inherit);font-weight:var(--table-body-font-weight, 400);font-size:var(--table-body-font-size, 12px);line-height:var(--table-body-line-height, 20px);text-decoration:var(--table-body-text-decoration, none);overflow:auto;background:#FFFFFF}.sd-table__scroll-container--loading{overflow:hidden !important;pointer-events:none}.sd-table__scroll-container--no-data{overflow:hidden;pointer-events:none}.sd-table__no-data{position:absolute;top:36px;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;font-size:var(--table-body-font-size, 12px);color:#888888;pointer-events:none;z-index:200;background:rgba(255, 255, 255, 0.6)}.sd-table__no-data-header-overlay{position:absolute;top:0;left:0;right:0;height:36px;background:rgba(255, 255, 255, 0.6);z-index:210;pointer-events:none}.sd-table__no-data-content{pointer-events:auto;min-height:60px;width:100%;display:flex;align-items:center;justify-content:center}.sd-table__loading{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center;pointer-events:none}.sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table--selectable sd-thead,.sd-table--selectable sd-tbody{--selectable:true}.sd-table--sticky-header sd-thead thead{position:sticky;top:0;z-index:120}.sd-table--sticky-column sd-thead,.sd-table--sticky-column sd-tbody{--sticky-column:true}.sd-table--scrolled-left sd-thead,.sd-table--scrolled-left sd-tbody{--scrolled-left:true}.sd-table--scrolled-right sd-thead,.sd-table--scrolled-right sd-tbody{--scrolled-right:true}.sd-table--resizable sd-thead{--resizable:true}.sd-table--no-data sd-thead{opacity:0.4}.sd-table__pagination{position:relative;background:#F9F9F9;height:48px;display:flex;align-items:center;justify-content:center;border:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);margin-top:-1px;border-radius:var(--table-radius, 8px)}.sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}"}},[769,"sd-table",{tableId:[513,"table-id"],columns:[16],rows:[16],selected:[1040],rowKey:[1,"row-key"],selectable:[4],resizable:[4],width:[1],height:[1],stickyHeader:[4,"sticky-header"],stickyColumn:[16],useTop:[4,"use-top"],noDataLabel:[1,"no-data-label"],isLoading:[4,"is-loading"],pagination:[16],useInternalPagination:[4,"use-internal-pagination"],useRowsPerPageSelect:[4,"use-rows-per-page-select"],dense:[4],useVirtualScroll:[4,"use-virtual-scroll"],rowHeight:[2,"row-height"],virtualBuffer:[2,"virtual-buffer"],virtualEndThreshold:[2,"virtual-end-threshold"],rowsPerPageOption:[16],resolvedNoDataLabel:[32],currentPage:[32],innerRowsPerPage:[32],innerSelected:[32],columnWidths:[32],scrolledLeft:[32],scrolledRight:[32],rowCount:[32],loadingScrollTop:[32],noDataBodyHeight:[32],autoThead:[32],autoTbody:[32],isRowSelected:[64],updateRowSelect:[64],toggleSelectAll:[64],getIsAllChecked:[64],getStickyStyle:[64],setRowCount:[64],getPaginationInfo:[64]},void 0,{isLoading:[{handleIsLoadingChange:0}],useVirtualScroll:[{handleUseVirtualScrollChange:0}],columns:[{handleColumnsChange:0}],rows:[{handleRowsChange:0}],rowKey:[{handleRowKeyChange:0}],tableId:[{handleTableIdChange:0}],noDataLabel:[{handleNoDataLabelChange:0}],selectable:[{handleConfigChange:0}],resizable:[{handleConfigChange:0}],stickyColumn:[{handleConfigChange:0}],stickyHeader:[{handleConfigChange:0}],dense:[{handleConfigChange:0}],selected:[{handleSelectedChange:0}],pagination:[{handlePaginationChange:0}]}]),j=D,L=function(){"undefined"!=typeof customElements&&["sd-table","sd-button","sd-checkbox","sd-circle-progress","sd-field","sd-floating-portal","sd-icon","sd-pagination","sd-portal","sd-select","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tbody","sd-thead","sd-tooltip","sd-tr"].forEach((t=>{switch(t){case"sd-table":customElements.get(o(t))||customElements.define(o(t),D);break;case"sd-button":customElements.get(o(t))||g();break;case"sd-checkbox":customElements.get(o(t))||f();break;case"sd-circle-progress":customElements.get(o(t))||p();break;case"sd-field":customElements.get(o(t))||m();break;case"sd-floating-portal":customElements.get(o(t))||y();break;case"sd-icon":customElements.get(o(t))||w();break;case"sd-pagination":customElements.get(o(t))||C();break;case"sd-portal":customElements.get(o(t))||S();break;case"sd-select":customElements.get(o(t))||v();break;case"sd-select-list-item":customElements.get(o(t))||k();break;case"sd-select-list-item-search":customElements.get(o(t))||x();break;case"sd-select-listbox":customElements.get(o(t))||_();break;case"sd-select-trigger":customElements.get(o(t))||R();break;case"sd-tbody":customElements.get(o(t))||P();break;case"sd-thead":customElements.get(o(t))||E();break;case"sd-tooltip":customElements.get(o(t))||M();break;case"sd-tr":customElements.get(o(t))||A()}}))};export{j as SdTable,L as defineCustomElement}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-_zllPZMm.js";const m=o,p=s;export{m as SdTr,p as defineCustomElement}
1
+ import{S as o,d as s}from"./p-gqfJ-KUj.js";const p=o,r=s;export{p as SdTr,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,g as l,b as a}from"./p-DNWwGHho.js";export{s as setNonce}from"./p-DNWwGHho.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await l(),a(JSON.parse('[["p-f3dff8b8",[[512,"sd-button",{"name":[1],"label":[1],"icon":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1]}],[512,"sd-icon",{"name":[1],"size":[8],"color":[1],"rotate":[2],"label":[1],"iconStyle":[16]}]]],["p-8fc49d2d",[[772,"sd-key-value-table",{"fields":[16],"search":[4],"useTop":[4,"use-top"]}]]],["p-969665c0",[[769,"sd-table",{"tableId":[513,"table-id"],"columns":[16],"rows":[16],"selected":[1040],"rowKey":[1,"row-key"],"selectable":[4],"resizable":[4],"width":[1],"height":[1],"stickyHeader":[4,"sticky-header"],"stickyColumn":[16],"useTop":[4,"use-top"],"noDataLabel":[1,"no-data-label"],"isLoading":[4,"is-loading"],"pagination":[16],"useInternalPagination":[4,"use-internal-pagination"],"useRowsPerPageSelect":[4,"use-rows-per-page-select"],"dense":[4],"useVirtualScroll":[4,"use-virtual-scroll"],"rowHeight":[2,"row-height"],"virtualBuffer":[2,"virtual-buffer"],"virtualEndThreshold":[2,"virtual-end-threshold"],"rowsPerPageOption":[16],"resolvedNoDataLabel":[32],"currentPage":[32],"innerRowsPerPage":[32],"innerSelected":[32],"columnWidths":[32],"scrolledLeft":[32],"scrolledRight":[32],"rowCount":[32],"loadingScrollTop":[32],"noDataBodyHeight":[32],"autoThead":[32],"autoTbody":[32],"isRowSelected":[64],"updateRowSelect":[64],"toggleSelectAll":[64],"getIsAllChecked":[64],"getStickyStyle":[64],"setRowCount":[64],"getPaginationInfo":[64]},null,{"isLoading":[{"handleIsLoadingChange":0}],"useVirtualScroll":[{"handleUseVirtualScrollChange":0}],"columns":[{"handleColumnsChange":0}],"rows":[{"handleRowsChange":0}],"rowKey":[{"handleRowKeyChange":0}],"tableId":[{"handleTableIdChange":0}],"noDataLabel":[{"handleNoDataLabelChange":0}],"selectable":[{"handleConfigChange":0}],"resizable":[{"handleConfigChange":0}],"stickyColumn":[{"handleConfigChange":0}],"stickyHeader":[{"handleConfigChange":0}],"dense":[{"handleConfigChange":0}],"selected":[{"handleSelectedChange":0}],"pagination":[{"handlePaginationChange":0}]}]]],["p-9e75a5dc",[[512,"sd-modal-container",{"autoRemove":[4,"auto-remove"],"entries":[32],"open":[64],"openLoading":[64],"createCustom":[64],"dismissById":[64],"update":[64]}]]],["p-5d5d8220",[[772,"sd-barcode-input",{"value":[1032],"size":[1],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"name":[1],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-60b80bf3",[[512,"sd-popover",{"show":[1028],"placement":[513],"color":[513],"icon":[513],"iconSize":[514,"icon-size"],"label":[1],"name":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1],"menuTitle":[1,"menu-title"],"leftLink":[16],"button":[16],"menuClass":[1,"menu-class"],"slotContentHTML":[32]}]]],["p-78c2fd6d",[[512,"sd-guide",{"type":[513],"label":[513],"message":[1],"url":[1],"popupTitle":[1,"popup-title"],"popupWidth":[2,"popup-width"],"popupShow":[32]}]]],["p-1aafbc7b",[[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-cce38339",[[772,"sd-action-modal",{"modalTitle":[1,"modal-title"],"buttonProps":[16],"width":[8],"height":[8]}]]],["p-54086285",[[512,"sd-dropdown-button",{"name":[1],"label":[1],"items":[16],"disabled":[4],"split":[4],"isOpen":[32],"isAnimatingOut":[32],"itemIndex":[32],"sdOpen":[64],"sdClose":[64]},null,{"isOpen":[{"handleOpenChange":0}]}]]],["p-2c0a8333",[[772,"sd-popup",{"popupTitle":[1,"popup-title"],"type":[1],"useFooter":[4,"use-footer"],"submitButtonProps":[16]}]]],["p-95bbba4f",[[512,"sd-tabs",{"value":[1537],"tabs":[1040],"size":[513],"isSub":[516,"is-sub"]},null,{"value":[{"valueChanged":0}]}]]],["p-2d3d25bd",[[512,"sd-callout",{"type":[513],"message":[16]}]]],["p-a5930cbd",[[512,"sd-loading-container",{"visible":[32],"message":[32],"show":[64],"hide":[64]}]]],["p-78b0b759",[[512,"sd-badge",{"color":[1]}]]],["p-8674d868",[[772,"sd-card",{"bordered":[4],"sdClass":[1,"sd-class"]}]]],["p-25fad267",[[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-18057222",[[512,"sd-divider",{"vertical":[516]}]]],["p-d8292621",[[772,"sd-form",{"formClass":[1,"form-class"],"sdRegisterField":[64],"sdUnregisterField":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64]}]]],["p-ff33d019",[[512,"sd-linear-progress",{"indeterminate":[516],"value":[2],"type":[513],"label":[1]}]]],["p-f14962bd",[[512,"sd-radio-button",{"value":[1032],"options":[1040],"size":[1],"disabled":[4],"name":[1]}]]],["p-1219699a",[[512,"sd-switch",{"value":[1028],"label":[1],"disabled":[4]}]]],["p-07b0d118",[[772,"sd-td",{"field":[1],"rowKey":[1,"row-key"],"align":[1],"rowspan":[2],"colspan":[2],"sdClass":[1,"sd-class"],"dividerLeft":[4,"divider-left"],"dividerRight":[4,"divider-right"],"useFrame":[4,"use-frame"]},null,{"field":[{"handleFieldChange":0}],"rowKey":[{"handleRowKeyChange":0}],"rowspan":[{"handleSpanChange":0}],"colspan":[{"handleSpanChange":0}],"sdClass":[{"handleSdClassChange":0}],"dividerLeft":[{"handleDividerChange":0}],"dividerRight":[{"handleDividerChange":0}],"useFrame":[{"handleUseFrameChange":0}]}]]],["p-18d3ae55",[[512,"sd-toggle",{"value":[1540],"label":[1],"disabled":[4]}]]],["p-e6bd8ab1",[[512,"sd-toast",{"icon":[1],"message":[1],"link":[1],"linkLabel":[1,"link-label"],"buttonLabel":[1,"button-label"],"useClose":[4,"use-close"],"type":[1]}]]],["p-4c3ead1b",[[512,"sd-text-link",{"label":[1],"icon":[1],"iconColor":[1,"icon-color"],"labelClass":[1,"label-class"],"useArrow":[516,"use-arrow"],"underline":[516],"disabled":[516]}]]],["p-74b3e95b",[[512,"sd-tag",{"name":[1],"label":[1],"icon":[1],"isLeft":[4,"is-left"]}]]],["p-bd4e5141",[[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]}],[512,"sd-loading-modal",{"state":[513],"message":[1],"useButton":[516,"use-button"],"buttonLabel":[1,"button-label"],"width":[8],"height":[8],"progress":[2]}]]],["p-9d34518e",[[512,"sd-chip",{"name":[1],"value":[1025],"error":[1028],"disabled":[4],"placeholder":[1],"rules":[16],"internalValue":[32],"isEditing":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdResetValidation":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}]}]]],["p-e81cb8c9",[[512,"sd-date-range-picker-calendar",{"value":[16],"selectable":[16],"maxRange":[2,"max-range"],"currentYear":[32],"currentMonth":[32],"pendingStart":[32],"hoverDate":[32],"displayValue":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-ea586c5e",[[512,"sd-radio",{"value":[1032],"val":[8],"disabled":[4],"label":[1]},null,{"value":[{"valueChanged":0}]}]]],["p-c73cadc7",[[512,"sd-thead",{"columns":[16],"selectable":[4],"resizable":[4],"stickyColumn":[16],"stickyHeader":[4,"sticky-header"],"scrolledLeft":[4,"scrolled-left"],"scrolledRight":[4,"scrolled-right"],"rows":[16],"columnWidths":[1040],"tableId":[32],"_columns":[32],"_selectable":[32],"_resizable":[32],"_stickyColumn":[32],"_stickyHeader":[32],"_scrolledLeft":[32],"_scrolledRight":[32],"refreshConfig":[64],"setColumnWidths":[64],"refreshSelection":[64]},null,{"columns":[{"handleColumnsChange":0}]}],[772,"sd-tr",{"columns":[16],"selectable":[4],"stickyColumn":[16],"rowKey":[1,"row-key"],"row":[16],"separator":[8],"tableId":[32],"columnWidths":[32],"isVisible":[32],"spansVersion":[32],"_columns":[32],"_selectable":[32],"_stickyColumn":[32],"_scrolledLeft":[32],"_scrolledRight":[32],"_dense":[32],"refreshConfig":[64],"bumpSpansVersion":[64],"updateVisibility":[64],"setColumnWidths":[64],"refreshSelection":[64]}],[512,"sd-pagination",{"currentPage":[1026,"current-page"],"lastPage":[2,"last-page"],"simple":[4]}],[769,"sd-tbody",{"rows":[16],"tableId":[32],"topSpacerHeight":[32],"bottomSpacerHeight":[32]},null,{"rows":[{"handleRowsChange":0}]}]]],["p-5c4fd9c1",[[512,"sd-circle-progress",{"indeterminate":[516],"value":[2],"type":[513],"label":[1]}]]],["p-46faa7ed",[[512,"sd-ghost-button",{"icon":[1],"size":[1],"intent":[1],"ariaLabel":[1,"aria-label"],"disabled":[4]}]]],["p-c1bac61e",[[512,"sd-calendar",{"value":[1025],"selectable":[16],"events":[16],"elevated":[4],"currentYear":[32],"currentMonth":[32]},null,{"value":[{"handleValueChange":0}]}],[512,"sd-date-picker-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"size":[1]}]]],["p-cffa6da7",[[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-3e2b5e01",[[512,"sd-date-picker",{"value":[1025],"size":[513],"placeholder":[513],"selectable":[16],"disabled":[516],"width":[8],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"error":[1028],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"focused":[32],"hovered":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[512,"sd-date-range-picker",{"value":[1040],"size":[513],"placeholder":[513],"selectable":[16],"maxRange":[2,"max-range"],"disabled":[516],"width":[8],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"error":[1028],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"focused":[32],"hovered":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[512,"sd-file-picker",{"value":[1040],"placeholder":[513],"disabled":[516],"inline":[516],"multiple":[516],"accept":[1],"maxFileSize":[8,"max-file-size"],"maxTotalSize":[8,"max-total-size"],"maxFiles":[8,"max-files"],"name":[1],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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}]}],[772,"sd-input",{"value":[1032],"type":[1],"size":[1],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"name":[1],"internalValue":[32],"passwordVisible":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[512,"sd-number-input",{"size":[1],"min":[2],"max":[2],"step":[2],"useButton":[4,"use-button"],"useDecimal":[4,"use-decimal"],"value":[1032],"label":[1],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"name":[1],"internalValue":[32],"displayValue":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[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],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[1028],"status":[1],"focused":[1028],"hovered":[1028],"name":[1],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[512,"sd-radio-group",{"value":[1032],"options":[1040],"direction":[1],"disabled":[4],"groupName":[1,"group-name"]},null,{"value":[{"valueChanged":0}]}]]],["p-4b43648c",[[512,"sd-checkbox",{"value":[1028],"val":[8],"disabled":[516],"inverse":[516],"label":[1],"isChecked":[32]},null,{"value":[{"watchValueHandler":0}]}]]],["p-deec1ef0",[[512,"sd-select-list-item",{"option":[16],"depth":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"useCheckbox":[4,"use-checkbox"],"countInfo":[16]}],[512,"sd-select-list-item-search",{"isScrolled":[4,"is-scrolled"],"searchText":[32],"sdFocus":[64]}]]],["p-0de5a53b",[[772,"sd-field",{"name":[1],"rules":[16],"error":[1028],"disabled":[1028],"readonly":[1028],"hovered":[1028],"focused":[1028],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"size":[513],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"name":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1],"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"],[8,"keydown","handleKeydown"]]]]],["p-97b405aa",[[512,"sd-select",{"type":[1],"value":[1032],"options":[16],"placeholder":[1],"maxDropdownWidth":[1,"max-dropdown-width"],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"error":[1028],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"emitValue":[4,"emit-value"],"width":[8],"useSearch":[4,"use-search"],"allSelectedLabel":[1,"all-selected-label"],"useSelectAll":[4,"use-select-all"],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"triggerWidth":[32],"resolvedDropdownHeight":[32],"resolvedMaxDropdownWidth":[32],"focused":[32],"hovered":[32],"sdFocus":[64],"sdOpen":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[513,"sd-select-listbox",{"type":[1],"options":[16],"value":[8],"emitValue":[4,"emit-value"],"useSearch":[4,"use-search"],"useSelectAll":[4,"use-select-all"],"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-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"isOpen":[4,"is-open"],"sdFocus":[64]}]]]]'),e))));
1
+ import{p as e,g as a,b as l}from"./p-DNWwGHho.js";export{s as setNonce}from"./p-DNWwGHho.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await a(),l(JSON.parse('[["p-f3dff8b8",[[512,"sd-button",{"name":[1],"label":[1],"icon":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1]}],[512,"sd-icon",{"name":[1],"size":[8],"color":[1],"rotate":[2],"label":[1],"iconStyle":[16]}]]],["p-8fc49d2d",[[772,"sd-key-value-table",{"fields":[16],"search":[4],"useTop":[4,"use-top"]}]]],["p-aa28712a",[[769,"sd-table",{"tableId":[513,"table-id"],"columns":[16],"rows":[16],"selected":[1040],"rowKey":[1,"row-key"],"selectable":[4],"resizable":[4],"width":[1],"height":[1],"stickyHeader":[4,"sticky-header"],"stickyColumn":[16],"useTop":[4,"use-top"],"noDataLabel":[1,"no-data-label"],"isLoading":[4,"is-loading"],"pagination":[16],"useInternalPagination":[4,"use-internal-pagination"],"useRowsPerPageSelect":[4,"use-rows-per-page-select"],"dense":[4],"useVirtualScroll":[4,"use-virtual-scroll"],"rowHeight":[2,"row-height"],"virtualBuffer":[2,"virtual-buffer"],"virtualEndThreshold":[2,"virtual-end-threshold"],"rowsPerPageOption":[16],"resolvedNoDataLabel":[32],"currentPage":[32],"innerRowsPerPage":[32],"innerSelected":[32],"columnWidths":[32],"scrolledLeft":[32],"scrolledRight":[32],"rowCount":[32],"loadingScrollTop":[32],"noDataBodyHeight":[32],"autoThead":[32],"autoTbody":[32],"isRowSelected":[64],"updateRowSelect":[64],"toggleSelectAll":[64],"getIsAllChecked":[64],"getStickyStyle":[64],"setRowCount":[64],"getPaginationInfo":[64]},null,{"isLoading":[{"handleIsLoadingChange":0}],"useVirtualScroll":[{"handleUseVirtualScrollChange":0}],"columns":[{"handleColumnsChange":0}],"rows":[{"handleRowsChange":0}],"rowKey":[{"handleRowKeyChange":0}],"tableId":[{"handleTableIdChange":0}],"noDataLabel":[{"handleNoDataLabelChange":0}],"selectable":[{"handleConfigChange":0}],"resizable":[{"handleConfigChange":0}],"stickyColumn":[{"handleConfigChange":0}],"stickyHeader":[{"handleConfigChange":0}],"dense":[{"handleConfigChange":0}],"selected":[{"handleSelectedChange":0}],"pagination":[{"handlePaginationChange":0}]}]]],["p-9e75a5dc",[[512,"sd-modal-container",{"autoRemove":[4,"auto-remove"],"entries":[32],"open":[64],"openLoading":[64],"createCustom":[64],"dismissById":[64],"update":[64]}]]],["p-5d5d8220",[[772,"sd-barcode-input",{"value":[1032],"size":[1],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"name":[1],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}]]],["p-60b80bf3",[[512,"sd-popover",{"show":[1028],"placement":[513],"color":[513],"icon":[513],"iconSize":[514,"icon-size"],"label":[1],"name":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1],"menuTitle":[1,"menu-title"],"leftLink":[16],"button":[16],"menuClass":[1,"menu-class"],"slotContentHTML":[32]}]]],["p-db826b91",[[512,"sd-guide",{"type":[513],"label":[513],"message":[1],"url":[1],"popupTitle":[1,"popup-title"],"popupWidth":[2,"popup-width"],"popupShow":[32]}]]],["p-1aafbc7b",[[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-cce38339",[[772,"sd-action-modal",{"modalTitle":[1,"modal-title"],"buttonProps":[16],"width":[8],"height":[8]}]]],["p-cf685d90",[[512,"sd-dropdown-button",{"name":[1],"label":[1],"items":[16],"disabled":[4],"split":[4],"isOpen":[32],"isAnimatingOut":[32],"itemIndex":[32],"sdOpen":[64],"sdClose":[64]},null,{"isOpen":[{"handleOpenChange":0}]}]]],["p-2c0a8333",[[772,"sd-popup",{"popupTitle":[1,"popup-title"],"type":[1],"useFooter":[4,"use-footer"],"submitButtonProps":[16]}]]],["p-95bbba4f",[[512,"sd-tabs",{"value":[1537],"tabs":[1040],"size":[513],"isSub":[516,"is-sub"]},null,{"value":[{"valueChanged":0}]}]]],["p-eb18d812",[[512,"sd-callout",{"type":[513],"message":[16]}]]],["p-a5930cbd",[[512,"sd-loading-container",{"visible":[32],"message":[32],"show":[64],"hide":[64]}]]],["p-78b0b759",[[512,"sd-badge",{"color":[1]}]]],["p-8674d868",[[772,"sd-card",{"bordered":[4],"sdClass":[1,"sd-class"]}]]],["p-25fad267",[[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-18057222",[[512,"sd-divider",{"vertical":[516]}]]],["p-d8292621",[[772,"sd-form",{"formClass":[1,"form-class"],"sdRegisterField":[64],"sdUnregisterField":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidation":[64]}]]],["p-ff33d019",[[512,"sd-linear-progress",{"indeterminate":[516],"value":[2],"type":[513],"label":[1]}]]],["p-f14962bd",[[512,"sd-radio-button",{"value":[1032],"options":[1040],"size":[1],"disabled":[4],"name":[1]}]]],["p-1219699a",[[512,"sd-switch",{"value":[1028],"label":[1],"disabled":[4]}]]],["p-07b0d118",[[772,"sd-td",{"field":[1],"rowKey":[1,"row-key"],"align":[1],"rowspan":[2],"colspan":[2],"sdClass":[1,"sd-class"],"dividerLeft":[4,"divider-left"],"dividerRight":[4,"divider-right"],"useFrame":[4,"use-frame"]},null,{"field":[{"handleFieldChange":0}],"rowKey":[{"handleRowKeyChange":0}],"rowspan":[{"handleSpanChange":0}],"colspan":[{"handleSpanChange":0}],"sdClass":[{"handleSdClassChange":0}],"dividerLeft":[{"handleDividerChange":0}],"dividerRight":[{"handleDividerChange":0}],"useFrame":[{"handleUseFrameChange":0}]}]]],["p-18d3ae55",[[512,"sd-toggle",{"value":[1540],"label":[1],"disabled":[4]}]]],["p-e6bd8ab1",[[512,"sd-toast",{"icon":[1],"message":[1],"link":[1],"linkLabel":[1,"link-label"],"buttonLabel":[1,"button-label"],"useClose":[4,"use-close"],"type":[1]}]]],["p-4c3ead1b",[[512,"sd-text-link",{"label":[1],"icon":[1],"iconColor":[1,"icon-color"],"labelClass":[1,"label-class"],"useArrow":[516,"use-arrow"],"underline":[516],"disabled":[516]}]]],["p-74b3e95b",[[512,"sd-tag",{"name":[1],"label":[1],"icon":[1],"isLeft":[4,"is-left"]}]]],["p-8528ba1e",[[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]}],[512,"sd-loading-modal",{"state":[513],"message":[1],"useButton":[516,"use-button"],"buttonLabel":[1,"button-label"],"width":[8],"height":[8],"progress":[2]}]]],["p-9d34518e",[[512,"sd-chip",{"name":[1],"value":[1025],"error":[1028],"disabled":[4],"placeholder":[1],"rules":[16],"internalValue":[32],"isEditing":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdResetValidation":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}]}]]],["p-e81cb8c9",[[512,"sd-date-range-picker-calendar",{"value":[16],"selectable":[16],"maxRange":[2,"max-range"],"currentYear":[32],"currentMonth":[32],"pendingStart":[32],"hoverDate":[32],"displayValue":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-ea586c5e",[[512,"sd-radio",{"value":[1032],"val":[8],"disabled":[4],"label":[1]},null,{"value":[{"valueChanged":0}]}]]],["p-1632a28d",[[512,"sd-thead",{"columns":[16],"selectable":[4],"resizable":[4],"stickyColumn":[16],"stickyHeader":[4,"sticky-header"],"scrolledLeft":[4,"scrolled-left"],"scrolledRight":[4,"scrolled-right"],"rows":[16],"columnWidths":[1040],"tableId":[32],"_columns":[32],"_selectable":[32],"_resizable":[32],"_stickyColumn":[32],"_stickyHeader":[32],"_scrolledLeft":[32],"_scrolledRight":[32],"refreshConfig":[64],"setColumnWidths":[64],"refreshSelection":[64]},null,{"columns":[{"handleColumnsChange":0}]}],[772,"sd-tr",{"columns":[16],"selectable":[4],"stickyColumn":[16],"rowKey":[1,"row-key"],"row":[16],"separator":[8],"tableId":[32],"columnWidths":[32],"isVisible":[32],"spansVersion":[32],"_columns":[32],"_selectable":[32],"_stickyColumn":[32],"_scrolledLeft":[32],"_scrolledRight":[32],"_dense":[32],"refreshConfig":[64],"bumpSpansVersion":[64],"updateVisibility":[64],"setColumnWidths":[64],"refreshSelection":[64]}],[512,"sd-pagination",{"currentPage":[1026,"current-page"],"lastPage":[2,"last-page"],"simple":[4]}],[769,"sd-tbody",{"rows":[16],"tableId":[32],"topSpacerHeight":[32],"bottomSpacerHeight":[32]},null,{"rows":[{"handleRowsChange":0}]}]]],["p-5c4fd9c1",[[512,"sd-circle-progress",{"indeterminate":[516],"value":[2],"type":[513],"label":[1]}]]],["p-46faa7ed",[[512,"sd-ghost-button",{"icon":[1],"size":[1],"intent":[1],"ariaLabel":[1,"aria-label"],"disabled":[4]}]]],["p-c1bac61e",[[512,"sd-calendar",{"value":[1025],"selectable":[16],"events":[16],"elevated":[4],"currentYear":[32],"currentMonth":[32]},null,{"value":[{"handleValueChange":0}]}],[512,"sd-date-picker-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"size":[1]}]]],["p-cffa6da7",[[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-3e2b5e01",[[512,"sd-date-picker",{"value":[1025],"size":[513],"placeholder":[513],"selectable":[16],"disabled":[516],"width":[8],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"error":[1028],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"focused":[32],"hovered":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[512,"sd-date-range-picker",{"value":[1040],"size":[513],"placeholder":[513],"selectable":[16],"maxRange":[2,"max-range"],"disabled":[516],"width":[8],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"error":[1028],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"focused":[32],"hovered":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[512,"sd-file-picker",{"value":[1040],"placeholder":[513],"disabled":[516],"inline":[516],"multiple":[516],"accept":[1],"maxFileSize":[8,"max-file-size"],"maxTotalSize":[8,"max-total-size"],"maxFiles":[8,"max-files"],"name":[1],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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}]}],[772,"sd-input",{"value":[1032],"type":[1],"size":[1],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"inputStyle":[16],"name":[1],"internalValue":[32],"passwordVisible":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[512,"sd-number-input",{"size":[1],"min":[2],"max":[2],"step":[2],"useButton":[4,"use-button"],"useDecimal":[4,"use-decimal"],"value":[1032],"label":[1],"labelWidth":[8,"label-width"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"name":[1],"internalValue":[32],"displayValue":[32],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64],"sdGetNativeElement":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[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],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"hint":[1],"errorMessage":[1,"error-message"],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"rules":[16],"error":[1028],"status":[1],"focused":[1028],"hovered":[1028],"name":[1],"internalValue":[32],"sdGetNativeElement":[64],"sdValidate":[64],"sdReset":[64],"sdResetValidate":[64],"sdFocus":[64]},null,{"value":[{"valueChanged":0}],"internalValue":[{"internalValueChanged":0}]}],[512,"sd-radio-group",{"value":[1032],"options":[1040],"direction":[1],"disabled":[4],"groupName":[1,"group-name"]},null,{"value":[{"valueChanged":0}]}]]],["p-4b43648c",[[512,"sd-checkbox",{"value":[1028],"val":[8],"disabled":[516],"inverse":[516],"label":[1],"isChecked":[32]},null,{"value":[{"watchValueHandler":0}]}]]],["p-deec1ef0",[[512,"sd-select-list-item",{"option":[16],"depth":[2],"isSelected":[4,"is-selected"],"isFocused":[4,"is-focused"],"useCheckbox":[4,"use-checkbox"],"countInfo":[16]}],[512,"sd-select-list-item-search",{"isScrolled":[4,"is-scrolled"],"searchText":[32],"sdFocus":[64]}]]],["p-0de5a53b",[[772,"sd-field",{"name":[1],"rules":[16],"error":[1028],"disabled":[1028],"readonly":[1028],"hovered":[1028],"focused":[1028],"status":[1],"hint":[1],"errorMessage":[1,"error-message"],"width":[8],"size":[513],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"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],"name":[1],"rightIcon":[1,"right-icon"],"ariaLabel":[1,"aria-label"],"disabled":[4],"type":[1],"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"],[8,"keydown","handleKeydown"]]]]],["p-25204798",[[512,"sd-select",{"type":[1],"value":[1032],"options":[16],"placeholder":[1],"maxDropdownWidth":[1,"max-dropdown-width"],"dropdownHeight":[1,"dropdown-height"],"disabled":[4],"label":[1],"labelWidth":[8,"label-width"],"addonLabel":[1,"addon-label"],"addonAlign":[1,"addon-align"],"error":[1028],"hint":[1],"errorMessage":[1,"error-message"],"rules":[16],"icon":[16],"labelTooltip":[1,"label-tooltip"],"labelTooltipProps":[16],"emitValue":[4,"emit-value"],"width":[8],"useSearch":[4,"use-search"],"allSelectedLabel":[1,"all-selected-label"],"useSelectAll":[4,"use-select-all"],"name":[1],"isOpen":[32],"isAnimatingOut":[32],"triggerWidth":[32],"resolvedDropdownHeight":[32],"resolvedMaxDropdownWidth":[32],"focused":[32],"hovered":[32],"sdFocus":[64],"sdOpen":[64]},null,{"isOpen":[{"watchIsOpen":0}]}],[513,"sd-select-listbox",{"type":[1],"options":[16],"value":[8],"emitValue":[4,"emit-value"],"useSearch":[4,"use-search"],"useSelectAll":[4,"use-select-all"],"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-trigger",{"displayText":[1,"display-text"],"placeholder":[1],"disabled":[4],"isOpen":[4,"is-open"],"sdFocus":[64]}]]]]'),e))));