@sellmate/design-system 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/{index-DXo1Fhkn.js → index-Bxead0A0.js} +4 -2
- package/dist/cjs/{index-DXo1Fhkn.js.map → index-Bxead0A0.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +2 -2
- package/dist/cjs/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +1 -1
- package/dist/cjs/sd-button_12.cjs.entry.js +206 -105
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -3
- package/dist/cjs/sd-guide.cjs.entry.js +4 -4
- package/dist/cjs/sd-modal-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-popover.cjs.entry.js +4 -4
- package/dist/cjs/sd-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +3 -3
- package/dist/cjs/sd-select-option-group.cjs.entry.js +4 -4
- package/dist/cjs/sd-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +2 -2
- package/dist/cjs/sd-tbody_3.cjs.entry.js +4 -4
- package/dist/cjs/sd-td.cjs.entry.js +3 -3
- package/dist/cjs/{tooltipArrow-DNiGFQNW.js → tooltipArrow-C7cIAuTo.js} +3 -3
- package/dist/cjs/{tooltipArrow-DNiGFQNW.js.map → tooltipArrow-C7cIAuTo.js.map} +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.js +3 -3
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +2 -2
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
- package/dist/collection/components/sd-table/sd-td/sd-td.js +2 -2
- package/dist/collection/components/sd-table/sd-th/sd-th.js +1 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +1 -1
- package/dist/collection/components/sd-table-backup/sd-table-backup.css +17 -15
- package/dist/collection/components/sd-table-backup/sd-table-backup.js +191 -90
- package/dist/collection/components/sd-table-backup/sd-table-backup.js.map +1 -1
- package/dist/collection/components/sd-tag/sd-tag.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
- package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Bn_wuPsh.js → p-BAhPNR2w.js} +8 -8
- package/dist/components/{p-Bn_wuPsh.js.map → p-BAhPNR2w.js.map} +1 -1
- package/dist/components/{p-C9qV_qzP.js → p-BozMKCTh.js} +6 -6
- package/dist/components/{p-C9qV_qzP.js.map → p-BozMKCTh.js.map} +1 -1
- package/dist/components/{p-BvuTaRpn.js → p-BpNH68jy.js} +3 -3
- package/dist/components/{p-BvuTaRpn.js.map → p-BpNH68jy.js.map} +1 -1
- package/dist/components/{p-CIkSynaQ.js → p-C930Kn80.js} +4 -4
- package/dist/components/{p-CIkSynaQ.js.map → p-C930Kn80.js.map} +1 -1
- package/dist/components/{p-Cb33bhDR.js → p-CRB0WJnC.js} +4 -4
- package/dist/components/{p-Cb33bhDR.js.map → p-CRB0WJnC.js.map} +1 -1
- package/dist/components/{p-DWfls6IE.js → p-CVDnYikl.js} +11 -11
- package/dist/components/{p-DWfls6IE.js.map → p-CVDnYikl.js.map} +1 -1
- package/dist/components/{p-BBhUxTuK.js → p-CaLViLir.js} +9 -9
- package/dist/components/{p-BBhUxTuK.js.map → p-CaLViLir.js.map} +1 -1
- package/dist/components/{p-BlDZogGu.js → p-CePRmFej.js} +4 -4
- package/dist/components/{p-BlDZogGu.js.map → p-CePRmFej.js.map} +1 -1
- package/dist/components/{p-lS2AF6uZ.js → p-CxKXdl1J.js} +6 -6
- package/dist/components/{p-lS2AF6uZ.js.map → p-CxKXdl1J.js.map} +1 -1
- package/dist/components/{p-D2rvzY8X.js → p-D2YMmHfl.js} +4 -4
- package/dist/components/{p-D2rvzY8X.js.map → p-D2YMmHfl.js.map} +1 -1
- package/dist/components/{p-B6GiEilD.js → p-D2aGA3BX.js} +4 -4
- package/dist/components/{p-B6GiEilD.js.map → p-D2aGA3BX.js.map} +1 -1
- package/dist/components/{p-CMcI4ZlP.js → p-DC5fpNnQ.js} +4 -4
- package/dist/components/{p-CMcI4ZlP.js.map → p-DC5fpNnQ.js.map} +1 -1
- package/dist/components/{p-Cafw-qR4.js → p-DY6t0qQj.js} +3 -3
- package/dist/components/{p-Cafw-qR4.js.map → p-DY6t0qQj.js.map} +1 -1
- package/dist/components/{p-DsXAGqf9.js → p-Dg_O2miv.js} +4 -4
- package/dist/components/{p-DsXAGqf9.js.map → p-Dg_O2miv.js.map} +1 -1
- package/dist/components/{p-DCDoqfn8.js → p-LziGti_p.js} +4 -4
- package/dist/components/{p-DCDoqfn8.js.map → p-LziGti_p.js.map} +1 -1
- package/dist/components/{p-WhZES_rm.js → p-RZm_wGW3.js} +6 -6
- package/dist/components/{p-WhZES_rm.js.map → p-RZm_wGW3.js.map} +1 -1
- package/dist/components/{p-CbnL1UUF.js → p-TFWJruz2.js} +4 -3
- package/dist/components/p-TFWJruz2.js.map +1 -0
- package/dist/components/{p-t7JZlmXM.js → p-cOQWi_dD.js} +4 -4
- package/dist/components/{p-t7JZlmXM.js.map → p-cOQWi_dD.js.map} +1 -1
- package/dist/components/{p-wA4KCOG0.js → p-gnOKrd57.js} +3 -3
- package/dist/components/{p-wA4KCOG0.js.map → p-gnOKrd57.js.map} +1 -1
- package/dist/components/sd-badge.js +2 -2
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-card.js +2 -2
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker.js +6 -6
- package/dist/components/sd-date-range-picker.js +7 -7
- package/dist/components/sd-guide.js +7 -7
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-modal-card.js +3 -3
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +7 -7
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-progress.js +3 -3
- package/dist/components/sd-select-multiple-group.js +7 -7
- package/dist/components/sd-select-multiple.js +9 -9
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table-backup.js +203 -102
- package/dist/components/sd-table-backup.js.map +1 -1
- package/dist/components/sd-table.js +14 -14
- package/dist/components/sd-tag.js +2 -2
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +3 -3
- package/dist/components/sd-th.js +1 -1
- package/dist/components/sd-tooltip-portal.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-390283f7.entry.js → p-037de6ce.entry.js} +2 -2
- package/dist/design-system/p-0cada447.entry.js +2 -0
- package/dist/design-system/p-154958ba.entry.js +2 -0
- package/dist/design-system/{p-826c6517.entry.js → p-2285c061.entry.js} +2 -2
- package/dist/design-system/{p-d4b5575e.entry.js → p-267985b3.entry.js} +2 -2
- package/dist/design-system/p-328d7e6c.entry.js +2 -0
- package/dist/design-system/{p-8734ded6.entry.js → p-45bb29cf.entry.js} +2 -2
- package/dist/design-system/{p-871c8d66.entry.js → p-6d81e6f8.entry.js} +2 -2
- package/dist/design-system/p-6f16399e.entry.js +2 -0
- package/dist/design-system/{p-6320b9c6.entry.js.map → p-6f16399e.entry.js.map} +1 -1
- package/dist/design-system/{p-f9d01bdb.entry.js → p-74c0eee4.entry.js} +2 -2
- package/dist/design-system/{p-3574f319.entry.js → p-8d1a2a13.entry.js} +2 -2
- package/dist/design-system/p-927b3333.entry.js +2 -0
- package/dist/design-system/p-927b3333.entry.js.map +1 -0
- package/dist/design-system/p-ClyGLKUd.js +3 -0
- package/dist/design-system/{p-B2T3tS5r.js.map → p-ClyGLKUd.js.map} +1 -1
- package/dist/design-system/p-DXZjHQmQ.js +2 -0
- package/dist/design-system/{p-BE6EMCXm.js.map → p-DXZjHQmQ.js.map} +1 -1
- package/dist/design-system/{p-4386db36.entry.js → p-bea456ad.entry.js} +2 -2
- package/dist/design-system/{p-ce8fe1fd.entry.js → p-d7fe0919.entry.js} +2 -2
- package/dist/design-system/{p-0d776157.entry.js → p-dc6681a7.entry.js} +2 -2
- package/dist/design-system/p-ecb38b6a.entry.js +2 -0
- package/dist/design-system/{p-db0f705b.entry.js.map → p-ecb38b6a.entry.js.map} +1 -1
- package/dist/design-system/p-fb4d628a.entry.js +2 -0
- package/dist/design-system/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +1 -1
- package/dist/esm/design-system.js +2 -2
- package/dist/esm/{index-B2T3tS5r.js → index-ClyGLKUd.js} +4 -3
- package/dist/esm/{index-B2T3tS5r.js.map → index-ClyGLKUd.js.map} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sd-badge.entry.js +2 -2
- package/dist/esm/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.js.map +1 -1
- package/dist/esm/sd-button_12.entry.js +206 -105
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker.entry.js +2 -2
- package/dist/esm/sd-date-range-picker.entry.js +3 -3
- package/dist/esm/sd-guide.entry.js +4 -4
- package/dist/esm/sd-modal-card.entry.js +1 -1
- package/dist/esm/sd-popover.entry.js +4 -4
- package/dist/esm/sd-progress.entry.js +3 -3
- package/dist/esm/sd-select-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-multiple.entry.js +3 -3
- package/dist/esm/sd-select-option-group.entry.js +4 -4
- package/dist/esm/sd-table.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +2 -2
- package/dist/esm/sd-tbody_3.entry.js +4 -4
- package/dist/esm/sd-td.entry.js +3 -3
- package/dist/esm/{tooltipArrow-Pa2XQhpp.js → tooltipArrow-BwO7_hdW.js} +3 -3
- package/dist/esm/{tooltipArrow-Pa2XQhpp.js.map → tooltipArrow-BwO7_hdW.js.map} +1 -1
- package/dist/types/components/sd-table-backup/sd-table-backup.d.ts +15 -0
- package/hydrate/index.js +236 -126
- package/hydrate/index.mjs +236 -126
- package/package.json +2 -2
- package/dist/components/p-CbnL1UUF.js.map +0 -1
- package/dist/design-system/p-043b7fd1.entry.js +0 -2
- package/dist/design-system/p-043b7fd1.entry.js.map +0 -1
- package/dist/design-system/p-059ca6cb.entry.js +0 -2
- package/dist/design-system/p-6320b9c6.entry.js +0 -2
- package/dist/design-system/p-7b4fe5bf.entry.js +0 -2
- package/dist/design-system/p-7e8db11c.entry.js +0 -2
- package/dist/design-system/p-B2T3tS5r.js +0 -3
- package/dist/design-system/p-BE6EMCXm.js +0 -2
- package/dist/design-system/p-d4e043c5.entry.js +0 -2
- package/dist/design-system/p-db0f705b.entry.js +0 -2
- /package/dist/design-system/{p-390283f7.entry.js.map → p-037de6ce.entry.js.map} +0 -0
- /package/dist/design-system/{p-7b4fe5bf.entry.js.map → p-0cada447.entry.js.map} +0 -0
- /package/dist/design-system/{p-059ca6cb.entry.js.map → p-154958ba.entry.js.map} +0 -0
- /package/dist/design-system/{p-826c6517.entry.js.map → p-2285c061.entry.js.map} +0 -0
- /package/dist/design-system/{p-d4b5575e.entry.js.map → p-267985b3.entry.js.map} +0 -0
- /package/dist/design-system/{p-7e8db11c.entry.js.map → p-328d7e6c.entry.js.map} +0 -0
- /package/dist/design-system/{p-8734ded6.entry.js.map → p-45bb29cf.entry.js.map} +0 -0
- /package/dist/design-system/{p-871c8d66.entry.js.map → p-6d81e6f8.entry.js.map} +0 -0
- /package/dist/design-system/{p-f9d01bdb.entry.js.map → p-74c0eee4.entry.js.map} +0 -0
- /package/dist/design-system/{p-3574f319.entry.js.map → p-8d1a2a13.entry.js.map} +0 -0
- /package/dist/design-system/{p-4386db36.entry.js.map → p-bea456ad.entry.js.map} +0 -0
- /package/dist/design-system/{p-ce8fe1fd.entry.js.map → p-d7fe0919.entry.js.map} +0 -0
- /package/dist/design-system/{p-0d776157.entry.js.map → p-dc6681a7.entry.js.map} +0 -0
- /package/dist/design-system/{p-d4e043c5.entry.js.map → p-fb4d628a.entry.js.map} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-
|
|
2
|
-
import { d as defineCustomElement$c } from './p-
|
|
3
|
-
import { d as defineCustomElement$b } from './p-
|
|
4
|
-
import { d as defineCustomElement$a } from './p-
|
|
5
|
-
import { d as defineCustomElement$9 } from './p-
|
|
6
|
-
import { d as defineCustomElement$8 } from './p-
|
|
7
|
-
import { d as defineCustomElement$7 } from './p-
|
|
8
|
-
import { d as defineCustomElement$6 } from './p-
|
|
9
|
-
import { d as defineCustomElement$5 } from './p-
|
|
10
|
-
import { d as defineCustomElement$4 } from './p-
|
|
11
|
-
import { d as defineCustomElement$3 } from './p-
|
|
12
|
-
import { d as defineCustomElement$2 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, d as createEvent, e as readTask, h, c as Host } from './p-TFWJruz2.js';
|
|
2
|
+
import { d as defineCustomElement$c } from './p-DC5fpNnQ.js';
|
|
3
|
+
import { d as defineCustomElement$b } from './p-D2YMmHfl.js';
|
|
4
|
+
import { d as defineCustomElement$a } from './p-D2aGA3BX.js';
|
|
5
|
+
import { d as defineCustomElement$9 } from './p-RZm_wGW3.js';
|
|
6
|
+
import { d as defineCustomElement$8 } from './p-C930Kn80.js';
|
|
7
|
+
import { d as defineCustomElement$7 } from './p-BozMKCTh.js';
|
|
8
|
+
import { d as defineCustomElement$6 } from './p-LziGti_p.js';
|
|
9
|
+
import { d as defineCustomElement$5 } from './p-CaLViLir.js';
|
|
10
|
+
import { d as defineCustomElement$4 } from './p-CxKXdl1J.js';
|
|
11
|
+
import { d as defineCustomElement$3 } from './p-CVDnYikl.js';
|
|
12
|
+
import { d as defineCustomElement$2 } from './p-CRB0WJnC.js';
|
|
13
13
|
|
|
14
|
-
const sdTableBackupCss = ".sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:var(--table-container-height, auto);position:relative;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden;background:#ffffff}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position}.sd-table__wrapper .sd-table__container .sd-table__middle--scrollable{height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--loading{overflow:hidden !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll{position:relative;height:var(--total-virtual-height, --table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr:not([aria-hidden=true]){width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]{padding:0;border:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]:not(.sd-table__virtual-row-spacer) td{display:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:\"\";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:\"\";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody
|
|
14
|
+
const sdTableBackupCss = ".sd-table__wrapper .sd-table__container .sd-table__middle{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:horizontal{height:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar:vertical{width:8px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-table__wrapper .sd-table__container .sd-table__middle::-webkit-scrollbar-track{background-color:transparent}.sd-table__wrapper{height:var(--table-height, auto);width:var(--table-width, 100%);color:#222222}.sd-table__wrapper .sd-table__container{width:100%;height:var(--table-container-height, auto);position:relative;border:1px solid #e1e1e1;border-radius:8px;font-size:12px;overflow:hidden;background:#ffffff}.sd-table__wrapper .sd-table__container .sd-table__middle{overflow:auto;will-change:scroll-position;min-height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--scrollable{height:var(--table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle--loading{overflow:hidden !important;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle--loading__spinner{position:absolute;top:0;left:0;width:var(--table-width, 100%);height:var(--table-container-height, 100%);min-height:var(--table-container-height, 100%);background:rgba(255, 255, 255, 0.6);z-index:200;display:flex;align-items:center;justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table{background-color:white;display:table;width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll{position:relative;height:var(--total-virtual-height, --table-container-height, auto)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr:not([aria-hidden=true]){width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]{padding:0;border:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody.sd-table-tbody--virtual-scroll tr[aria-hidden=true]:not(.sd-table__virtual-row-spacer) td{display:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable td.sd-td--selected,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--selectable th.sd-th--selected{width:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-header thead{position:sticky;top:0;z-index:120}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-right{position:sticky;background-color:#f5faff;z-index:110 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-left,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-right{position:sticky;background-color:white;z-index:100 !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-left{left:var(--sticky-left-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column .sticky-right{right:var(--sticky-right-offset, 0)}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column th.sticky-cell{position:sticky;z-index:102;background-color:#f5faff}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--sticky-column td.sticky-cell{position:sticky;z-index:101;background-color:white}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left th.sticky-left-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-left td.sticky-left-edge:after{content:\"\";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge{overflow:visible}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right th.sticky-right-edge:after,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--scrolled-right td.sticky-right-edge:after{content:\"\";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:1;pointer-events:none}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead{opacity:0.4}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table--no-data thead tr th.sd-th{border-bottom:1px solid rgba(225, 225, 225, 0.4) !important}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-td,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table sd-th,.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table .sd-th__content--label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead{height:36px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr{width:100%}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th{background:#f5faff;height:36px;padding:0 16px;font-weight:500;vertical-align:middle;border-bottom:1px solid #e1e1e1;-webkit-user-select:none;user-select:none;position:relative}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:4px}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--left{justify-content:flex-start}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--center{justify-content:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__content--right{justify-content:flex-end}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table thead tr th.sd-th .sd-th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:16px;cursor:col-resize;z-index:3;border-left:1px solid #cccccc;border-right:1px solid #cccccc}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td{height:44px;padding:0 16px;border-bottom:1px solid #e1e1e1;background:white;vertical-align:middle}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--left{text-align:left}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--center{text-align:center}.sd-table__wrapper .sd-table__container .sd-table__middle .sd-table tbody tr td.sd-td--right{text-align:right}.sd-table__wrapper .sd-table__container .sd-table__bottom{background:white;text-align:center}.sd-table__wrapper .sd-table__container .sd-table__bottom .sd-table__no-data{padding-top:15%;color:#888888}.sd-table__wrapper .sd-table__pagination{position:relative;background:#f9f9f9;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid #e1e1e1;border-top:none;border-radius:8px}.sd-table__wrapper .sd-table__pagination sd-select{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.sd-table__wrapper .sd-table__virtual-spacer,.sd-table__wrapper .sd-table__virtual-row-spacer{padding:0 !important}.sd-table__wrapper .sd-table__virtual-spacer td,.sd-table__wrapper .sd-table__virtual-row-spacer td{padding:0 !important;border:none}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton{width:100%;height:100%;background-image:repeating-linear-gradient(0deg, rgba(246, 246, 246, 0.3) 0px, rgba(225, 225, 225, 0.5) calc(var(--row-height, 44px) / 2), rgba(246, 246, 246, 0.3) var(--row-height, 44px));background-size:100% 200%;animation:skeleton-loading 1.5s ease-in-out infinite;position:relative}.sd-table__wrapper .sd-table__virtual-spacer .sd-table__skeleton::before,.sd-table__wrapper .sd-table__virtual-row-spacer .sd-table__skeleton::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background-image:repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row-height, 44px) - 1px), #e1e1e1 calc(var(--row-height, 44px) - 1px), #e1e1e1 var(--row-height, 44px));pointer-events:none}.sd-table__wrapper .sd-table__skeleton-cell{width:100%;height:20px;background:linear-gradient(90deg, rgba(246, 246, 246, 0.3) 0%, rgba(225, 225, 225, 0.5) 50%, rgba(246, 246, 246, 0.3) 100%);background-size:200% 100%;animation:skeleton-loading 1.5s ease-in-out infinite;border-radius:4px}@keyframes skeleton-loading{0%{background-position:0% 0%}50%{background-position:100% 100%}100%{background-position:0% 0%}}";
|
|
15
15
|
|
|
16
16
|
const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
17
17
|
constructor(registerHost) {
|
|
@@ -73,6 +73,7 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
73
73
|
virtualStartColIdx = 0;
|
|
74
74
|
virtualEndColIdx = 0;
|
|
75
75
|
scrollLeftPosition = 0;
|
|
76
|
+
// 가상 스크롤 Raf(Request Animation Frame) 관리
|
|
76
77
|
scrollRequestAnimationFrame = null;
|
|
77
78
|
scrollContainer = null;
|
|
78
79
|
rafScheduled = false;
|
|
@@ -80,19 +81,39 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
80
81
|
vertical: false,
|
|
81
82
|
horizontal: false,
|
|
82
83
|
};
|
|
84
|
+
// 상태 캐시값
|
|
85
|
+
cachedVisibleColumns = null;
|
|
86
|
+
lastColumnsRef = null;
|
|
87
|
+
cachedVirtualRows = null;
|
|
88
|
+
cachedVirtualIndexKey = '';
|
|
89
|
+
cachedColumnOrder = null;
|
|
90
|
+
lastColumnOrderKey = '';
|
|
91
|
+
// DOM 측정 캐시값
|
|
92
|
+
cachedContainerHeight = 0;
|
|
93
|
+
cachedContainerWidth = 0;
|
|
94
|
+
// 스타일 캐시
|
|
95
|
+
stickyStyleCache = new Map();
|
|
96
|
+
// isAllChecked 캐시
|
|
97
|
+
cachedIsAllChecked;
|
|
98
|
+
lastSelectionKey = '';
|
|
99
|
+
onScroll;
|
|
83
100
|
handleColumnsChange(newCols) {
|
|
84
101
|
this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
|
|
102
|
+
this.cleanUpVirtualCache();
|
|
103
|
+
this.stickyStyleCache.clear();
|
|
85
104
|
if (this.useVirtualScroll.horizontal) {
|
|
86
105
|
this.scheduleUpdate('horizontal');
|
|
87
106
|
}
|
|
88
107
|
}
|
|
89
108
|
handleColumnWidthsChange() {
|
|
109
|
+
this.stickyStyleCache.clear();
|
|
90
110
|
if (this.useVirtualScroll.horizontal) {
|
|
91
111
|
this.scheduleUpdate('horizontal');
|
|
92
112
|
}
|
|
93
113
|
}
|
|
94
114
|
handleRowsChange(newRows) {
|
|
95
115
|
this.innerRows = [...newRows];
|
|
116
|
+
this.cleanUpVirtualCache();
|
|
96
117
|
if (this.useVirtualScroll.vertical) {
|
|
97
118
|
this.scheduleUpdate('vertical');
|
|
98
119
|
}
|
|
@@ -100,11 +121,19 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
100
121
|
handleSelectedChange(newSelected) {
|
|
101
122
|
this.innerSelected = new Set(newSelected);
|
|
102
123
|
}
|
|
124
|
+
cleanUpVirtualCache() {
|
|
125
|
+
this.cachedVisibleColumns = null;
|
|
126
|
+
this.lastColumnsRef = null;
|
|
127
|
+
this.cachedVirtualRows = null;
|
|
128
|
+
this.cachedVirtualIndexKey = '';
|
|
129
|
+
this.cachedColumnOrder = null;
|
|
130
|
+
this.lastColumnOrderKey = '';
|
|
131
|
+
}
|
|
103
132
|
handlePaginationChange(newVal) {
|
|
104
133
|
if (newVal?.page && newVal.page !== this.currentPage) {
|
|
105
134
|
this.currentPage = newVal.page;
|
|
106
135
|
if (this.useVirtualScroll.vertical && this.scrollContainer) {
|
|
107
|
-
this.scrollContainer.
|
|
136
|
+
this.scrollContainer.scrollTo({ top: 0, behavior: 'instant' });
|
|
108
137
|
this.scrollTopPosition = 0;
|
|
109
138
|
this.calculateVisibleRange();
|
|
110
139
|
}
|
|
@@ -119,66 +148,120 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
119
148
|
}
|
|
120
149
|
}
|
|
121
150
|
componentDidLoad() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
cancelAnimationFrame(this.scrollRequestAnimationFrame);
|
|
151
|
+
readTask(() => {
|
|
152
|
+
const middle = this.el.querySelector('.sd-table__middle');
|
|
153
|
+
if (!middle)
|
|
154
|
+
return;
|
|
155
|
+
this.onScroll = () => {
|
|
156
|
+
const scrollLeft = middle.scrollLeft;
|
|
157
|
+
const scrollWidth = middle.scrollWidth;
|
|
158
|
+
const clientWidth = middle.clientWidth;
|
|
159
|
+
const scrollTop = middle.scrollTop;
|
|
160
|
+
const verticalChanged = this.useVirtualScroll.vertical && this.scrollTopPosition !== scrollTop;
|
|
161
|
+
const horizontalChanged = this.useVirtualScroll.horizontal && this.scrollLeftPosition !== scrollLeft;
|
|
162
|
+
const newScrolledLeft = scrollLeft > 0;
|
|
163
|
+
const newScrolledRight = scrollLeft + clientWidth < scrollWidth;
|
|
164
|
+
if (this.scrolledLeft !== newScrolledLeft || this.scrolledRight !== newScrolledRight) {
|
|
165
|
+
this.scrolledLeft = newScrolledLeft;
|
|
166
|
+
this.scrolledRight = newScrolledRight;
|
|
139
167
|
}
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
this.
|
|
143
|
-
this.calculateVisibleRange();
|
|
144
|
-
}
|
|
145
|
-
if (horizontalChanged) {
|
|
146
|
-
this.scrollLeftPosition = scrollLeft;
|
|
147
|
-
this.calculateVisibleColumnRange();
|
|
168
|
+
if (verticalChanged || horizontalChanged) {
|
|
169
|
+
if (this.scrollRequestAnimationFrame !== null) {
|
|
170
|
+
cancelAnimationFrame(this.scrollRequestAnimationFrame);
|
|
148
171
|
}
|
|
149
|
-
this.scrollRequestAnimationFrame =
|
|
150
|
-
|
|
151
|
-
|
|
172
|
+
this.scrollRequestAnimationFrame = requestAnimationFrame(() => {
|
|
173
|
+
if (verticalChanged) {
|
|
174
|
+
this.scrollTopPosition = scrollTop;
|
|
175
|
+
this.calculateVisibleRange();
|
|
176
|
+
}
|
|
177
|
+
if (horizontalChanged) {
|
|
178
|
+
this.scrollLeftPosition = scrollLeft;
|
|
179
|
+
this.calculateVisibleColumnRange();
|
|
180
|
+
}
|
|
181
|
+
this.scrollRequestAnimationFrame = null;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this.scrollContainer = middle;
|
|
186
|
+
requestAnimationFrame(() => {
|
|
187
|
+
if (this.scrollContainer && this.onScroll) {
|
|
188
|
+
this.cachedContainerHeight = this.scrollContainer.clientHeight;
|
|
189
|
+
this.cachedContainerWidth = this.scrollContainer.clientWidth;
|
|
190
|
+
middle.addEventListener('scroll', this.onScroll, { passive: true });
|
|
191
|
+
this.onScroll();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
changePage(page) {
|
|
197
|
+
if (!this.useInternalPagination) {
|
|
198
|
+
this.sdPageChange.emit(page);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
this.currentPage = page;
|
|
202
|
+
this.sdPageChange.emit(this.currentPage);
|
|
203
|
+
}
|
|
204
|
+
changeRowsPerPage(perPage) {
|
|
205
|
+
const changedRowsPerPage = perPage ? Number(perPage) : 0;
|
|
206
|
+
if (!this.useInternalPagination) {
|
|
207
|
+
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const newRowsPerPage = Number(perPage || 0);
|
|
211
|
+
let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));
|
|
212
|
+
let newCurrentPage = this.currentPage;
|
|
213
|
+
if (newCurrentPage > newLastPage) {
|
|
214
|
+
newCurrentPage = newLastPage;
|
|
215
|
+
}
|
|
216
|
+
this.pagination = {
|
|
217
|
+
page: newCurrentPage,
|
|
218
|
+
rowsPerPage: newRowsPerPage,
|
|
219
|
+
lastPage: newLastPage,
|
|
152
220
|
};
|
|
153
|
-
|
|
154
|
-
|
|
221
|
+
this.currentPage = newCurrentPage;
|
|
222
|
+
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
155
223
|
}
|
|
156
224
|
disconnectedCallback() {
|
|
225
|
+
if (this.scrollContainer && this.onScroll) {
|
|
226
|
+
this.scrollContainer.removeEventListener('scroll', this.onScroll);
|
|
227
|
+
}
|
|
157
228
|
if (this.scrollRequestAnimationFrame !== null) {
|
|
158
229
|
cancelAnimationFrame(this.scrollRequestAnimationFrame);
|
|
159
230
|
}
|
|
160
231
|
}
|
|
161
232
|
// ----- Derived getters -----
|
|
162
233
|
get visibleColumns() {
|
|
163
|
-
|
|
234
|
+
if (this.cachedVisibleColumns && this.lastColumnsRef === this.columns) {
|
|
235
|
+
return this.cachedVisibleColumns;
|
|
236
|
+
}
|
|
237
|
+
this.lastColumnsRef = this.columns;
|
|
238
|
+
this.cachedVisibleColumns = this.columns.filter(col => col.visible !== false);
|
|
239
|
+
return this.cachedVisibleColumns;
|
|
164
240
|
}
|
|
165
241
|
get paginatedRows() {
|
|
166
242
|
if (!this.pagination || !this.useInternalPagination)
|
|
167
243
|
return this.innerRows;
|
|
168
244
|
const { rowsPerPage = this.rows.length } = this.pagination || {};
|
|
169
|
-
|
|
170
|
-
return result;
|
|
245
|
+
return this.innerRows.slice((this.currentPage - 1) * rowsPerPage, this.currentPage * rowsPerPage);
|
|
171
246
|
}
|
|
172
247
|
get virtualRows() {
|
|
248
|
+
const newVirtualIndexKey = `${this.virtualStartIndex}-${this.virtualEndIndex}`;
|
|
249
|
+
if (this.cachedVirtualRows && this.cachedVirtualIndexKey === newVirtualIndexKey) {
|
|
250
|
+
return this.cachedVirtualRows;
|
|
251
|
+
}
|
|
252
|
+
this.cachedVirtualIndexKey = newVirtualIndexKey;
|
|
173
253
|
if (!this.useVirtualScroll.vertical) {
|
|
174
|
-
|
|
254
|
+
this.cachedVirtualRows = this.paginatedRows.map((row, idx) => ({ row, actualIndex: idx }));
|
|
175
255
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
256
|
+
else {
|
|
257
|
+
this.cachedVirtualRows = this.paginatedRows
|
|
258
|
+
.slice(this.virtualStartIndex, this.virtualEndIndex + 1)
|
|
259
|
+
.map((row, relativeIdx) => ({
|
|
260
|
+
row,
|
|
261
|
+
actualIndex: this.virtualStartIndex + relativeIdx,
|
|
262
|
+
}));
|
|
263
|
+
}
|
|
264
|
+
return this.cachedVirtualRows;
|
|
182
265
|
}
|
|
183
266
|
get topSpacerHeight() {
|
|
184
267
|
if (!this.useVirtualScroll.vertical || this.virtualStartIndex === 0)
|
|
@@ -251,6 +334,7 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
251
334
|
if (newSelected.length === selectedArray.length)
|
|
252
335
|
return;
|
|
253
336
|
this.innerSelected = new Set(newSelected);
|
|
337
|
+
this.cachedIsAllChecked = undefined;
|
|
254
338
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
255
339
|
}
|
|
256
340
|
toggleSelectAll(checked) {
|
|
@@ -262,16 +346,29 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
262
346
|
const currentPageKeys = this.paginatedRows.map(r => r[this.rowKey]);
|
|
263
347
|
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])));
|
|
264
348
|
}
|
|
349
|
+
this.cachedIsAllChecked = undefined;
|
|
265
350
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
266
351
|
}
|
|
267
352
|
get isAllChecked() {
|
|
353
|
+
const selectionKey = `${this.paginatedRows.length}-${this.innerSelected.size}`;
|
|
354
|
+
if (this.cachedIsAllChecked !== undefined && this.lastSelectionKey === selectionKey) {
|
|
355
|
+
return this.cachedIsAllChecked;
|
|
356
|
+
}
|
|
268
357
|
const total = this.paginatedRows.length;
|
|
269
358
|
const selectedCount = this.paginatedRows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey] === row[this.rowKey])).length;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
359
|
+
let result;
|
|
360
|
+
if (selectedCount === 0) {
|
|
361
|
+
result = false; // 아무것도 안 선택됨
|
|
362
|
+
}
|
|
363
|
+
else if (selectedCount === total) {
|
|
364
|
+
result = true; // 전부 선택됨
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
result = null; // 일부만 선택됨
|
|
368
|
+
}
|
|
369
|
+
this.cachedIsAllChecked = result;
|
|
370
|
+
this.lastSelectionKey = selectionKey;
|
|
371
|
+
return result;
|
|
275
372
|
}
|
|
276
373
|
// RAF 통합 관리
|
|
277
374
|
scheduleUpdate(type) {
|
|
@@ -297,13 +394,22 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
297
394
|
return;
|
|
298
395
|
}
|
|
299
396
|
const scrollTop = this.scrollTopPosition;
|
|
300
|
-
|
|
397
|
+
let containerHeight = this.cachedContainerHeight;
|
|
398
|
+
if (containerHeight === 0 && this.scrollContainer) {
|
|
399
|
+
containerHeight = this.scrollContainer.clientHeight;
|
|
400
|
+
this.cachedContainerHeight = containerHeight;
|
|
401
|
+
}
|
|
402
|
+
const bufferSize = this.virtualBufferSize.vertical || 5;
|
|
301
403
|
const startIndex = Math.floor(scrollTop / this.virtualRowHeight);
|
|
302
404
|
const visibleCount = Math.ceil(containerHeight / this.virtualRowHeight);
|
|
303
|
-
const endIndex = startIndex + visibleCount;
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
405
|
+
const endIndex = startIndex + visibleCount - 1;
|
|
406
|
+
const newStartIndex = Math.max(0, startIndex - bufferSize);
|
|
407
|
+
const newEndIndex = Math.min(this.paginatedRows.length - 1, endIndex + bufferSize);
|
|
408
|
+
// 실제로 변경된 경우에만 상태 업데이트
|
|
409
|
+
if (this.virtualStartIndex !== newStartIndex || this.virtualEndIndex !== newEndIndex) {
|
|
410
|
+
this.virtualStartIndex = newStartIndex;
|
|
411
|
+
this.virtualEndIndex = newEndIndex;
|
|
412
|
+
}
|
|
307
413
|
}
|
|
308
414
|
// 가로 가상 스크롤 렌더링 계산
|
|
309
415
|
calculateVisibleColumnRange() {
|
|
@@ -313,7 +419,12 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
313
419
|
return;
|
|
314
420
|
}
|
|
315
421
|
const scrollLeft = this.scrollLeftPosition;
|
|
316
|
-
|
|
422
|
+
// 캐시된 값 사용, 없으면 측정 후 캐시
|
|
423
|
+
let containerWidth = this.cachedContainerWidth;
|
|
424
|
+
if (containerWidth === 0 && this.scrollContainer) {
|
|
425
|
+
containerWidth = this.scrollContainer.clientWidth;
|
|
426
|
+
this.cachedContainerWidth = containerWidth;
|
|
427
|
+
}
|
|
317
428
|
const stickyLeftCount = this.stickyColumn.left || 0;
|
|
318
429
|
const stickyRightCount = this.stickyColumn.right || 0;
|
|
319
430
|
// 가상 스크롤 컬럼 - sticky column 제외
|
|
@@ -353,22 +464,34 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
353
464
|
}
|
|
354
465
|
}
|
|
355
466
|
const bufferSize = this.virtualBufferSize.horizontal || 5;
|
|
356
|
-
|
|
357
|
-
|
|
467
|
+
const newStartColIdx = Math.max(0, startIdx - bufferSize);
|
|
468
|
+
const newEndColIdx = Math.min(virtualColumns.length - 1, endIdx + bufferSize);
|
|
469
|
+
// 실제로 변경된 경우에만 상태 업데이트
|
|
470
|
+
if (this.virtualStartColIdx !== newStartColIdx || this.virtualEndColIdx !== newEndColIdx) {
|
|
471
|
+
this.virtualStartColIdx = newStartColIdx;
|
|
472
|
+
this.virtualEndColIdx = newEndColIdx;
|
|
473
|
+
}
|
|
358
474
|
}
|
|
359
475
|
// ----- Helpers -----
|
|
360
476
|
getStickyStyle(colIdx) {
|
|
477
|
+
// 캐시된 스타일이 있으면 반환
|
|
478
|
+
if (this.stickyStyleCache.has(colIdx)) {
|
|
479
|
+
return this.stickyStyleCache.get(colIdx);
|
|
480
|
+
}
|
|
361
481
|
const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this.selectable ? 52 : 0);
|
|
362
482
|
const rightOffset = this.columnWidths
|
|
363
483
|
.filter((_, i) => i >= this.visibleColumns.length - (this.stickyColumn.right || 0) && i > colIdx)
|
|
364
484
|
.reduce((a, b) => a + b, 0);
|
|
365
|
-
|
|
485
|
+
const style = {
|
|
366
486
|
'--sticky-left-offset': `${leftOffset}px`,
|
|
367
487
|
'--sticky-right-offset': `${rightOffset}px`,
|
|
368
488
|
'width': `${this.columnWidths[colIdx]}px`,
|
|
369
489
|
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
370
490
|
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
371
491
|
};
|
|
492
|
+
// 스타일 캐시에 저장
|
|
493
|
+
this.stickyStyleCache.set(colIdx, style);
|
|
494
|
+
return style;
|
|
372
495
|
}
|
|
373
496
|
handleResize(index, event) {
|
|
374
497
|
// SSR 환경 체크
|
|
@@ -398,6 +521,10 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
398
521
|
return format ? format(value, row) : value;
|
|
399
522
|
}
|
|
400
523
|
getColumnRenderedInOrder() {
|
|
524
|
+
const orderKey = `${this.visibleColumns.length}-${this.virtualStartColIdx}-${this.virtualEndColIdx}`;
|
|
525
|
+
if (this.cachedColumnOrder && this.lastColumnOrderKey === orderKey) {
|
|
526
|
+
return this.cachedColumnOrder;
|
|
527
|
+
}
|
|
401
528
|
const stickyLeftCount = this.stickyColumn.left || 0;
|
|
402
529
|
const stickyRightCount = this.stickyColumn.right || 0;
|
|
403
530
|
// Sticky left 컬럼들
|
|
@@ -408,13 +535,15 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
408
535
|
.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount)
|
|
409
536
|
.slice(this.virtualStartColIdx, this.virtualEndColIdx + 1)
|
|
410
537
|
: this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
|
|
411
|
-
|
|
538
|
+
this.cachedColumnOrder = {
|
|
412
539
|
stickyLeftCount,
|
|
413
540
|
stickyRightCount,
|
|
414
541
|
stickyLeftCols,
|
|
415
542
|
middleCols,
|
|
416
543
|
stickyRightCols,
|
|
417
544
|
};
|
|
545
|
+
this.lastColumnOrderKey = orderKey;
|
|
546
|
+
return this.cachedColumnOrder;
|
|
418
547
|
}
|
|
419
548
|
// ----- Render -----
|
|
420
549
|
renderHead() {
|
|
@@ -452,7 +581,7 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
452
581
|
}))));
|
|
453
582
|
}
|
|
454
583
|
renderBody() {
|
|
455
|
-
return (h("tbody", { ...(!this.paginatedRows.length && { part: 'tbody-empty' }), class: `sd-table-tbody ${this.useVirtualScroll.vertical ? 'sd-table-tbody--virtual-scroll' : ''}`, style: { '--total-virtual-height': `${this.totalVirtualHeight}px` } }, this.
|
|
584
|
+
return (h("tbody", { ...(!this.paginatedRows.length && { part: 'tbody-empty' }), class: `sd-table-tbody ${this.useVirtualScroll.vertical ? 'sd-table-tbody--virtual-scroll' : ''}`, style: { '--total-virtual-height': `${this.totalVirtualHeight}px` } }, this.useVirtualScroll.vertical && this.topSpacerHeight > 0 && this.renderSpacerRow('top'), this.paginatedRows.length > 0 &&
|
|
456
585
|
this.virtualRows.map(({ row, actualIndex }) => this.renderRow(row, actualIndex)), this.useVirtualScroll.vertical &&
|
|
457
586
|
this.bottomSpacerHeight > 0 &&
|
|
458
587
|
this.renderSpacerRow('bottom')));
|
|
@@ -522,44 +651,16 @@ const SdTable = /*@__PURE__*/ proxyCustomElement(class SdTable extends H {
|
|
|
522
651
|
}, "aria-hidden": "true" }, h("div", { class: "sd-table__skeleton-cell" })));
|
|
523
652
|
}
|
|
524
653
|
render() {
|
|
525
|
-
return (h(Host, { key: '
|
|
654
|
+
return (h(Host, { key: '8c01d8c3b3428d0fccb37e337fd12412c7aee51a' }, h("div", { key: 'be41d64f4b9daaa1440f2a89e253ce487894758e', class: "sd-table__wrapper", style: {
|
|
526
655
|
'--table-width': this.width,
|
|
527
656
|
'--table-height': this.height,
|
|
528
|
-
} }, h("div", { key: '
|
|
657
|
+
} }, h("div", { key: '580c4ca69d5374585eeacc756561e5caf2ea6e29', class: "sd-table__container", style: {
|
|
529
658
|
'--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
|
|
530
|
-
} }, h("div", { key: '
|
|
659
|
+
} }, h("div", { key: '2832a6e9078923daeefa28512450950abfca0aad', class: {
|
|
531
660
|
'sd-table__middle': true,
|
|
532
661
|
'sd-table__middle--scrollable': this.paginatedRows.length > 0,
|
|
533
662
|
'sd-table__middle--loading': this.isLoading,
|
|
534
|
-
} }, h("table", { key: '
|
|
535
|
-
if (!this.useInternalPagination) {
|
|
536
|
-
this.sdPageChange.emit(e.detail);
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
539
|
-
this.currentPage = e.detail;
|
|
540
|
-
this.sdPageChange.emit(this.currentPage);
|
|
541
|
-
}
|
|
542
|
-
} }), this.useRowsPerPageSelect && (h("sd-select", { key: '3f65639b064a27993dc62a8e4a5dc86b16aec4f8', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => {
|
|
543
|
-
const changedRowsPerPage = e.detail.value ? Number(e.detail.value) : 0;
|
|
544
|
-
if (!this.useInternalPagination) {
|
|
545
|
-
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
546
|
-
}
|
|
547
|
-
else {
|
|
548
|
-
const newRowsPerPage = Number(e.detail.value || 0);
|
|
549
|
-
let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));
|
|
550
|
-
let newCurrentPage = this.currentPage;
|
|
551
|
-
if (newCurrentPage > newLastPage) {
|
|
552
|
-
newCurrentPage = newLastPage;
|
|
553
|
-
}
|
|
554
|
-
this.pagination = {
|
|
555
|
-
page: newCurrentPage,
|
|
556
|
-
rowsPerPage: newRowsPerPage,
|
|
557
|
-
lastPage: newLastPage,
|
|
558
|
-
};
|
|
559
|
-
this.currentPage = newCurrentPage;
|
|
560
|
-
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
561
|
-
}
|
|
562
|
-
} })))))));
|
|
663
|
+
} }, this.isLoading && (h("div", { key: '696cc35d6d3c58dabf92aa49dbff9a7034a0ed64', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: '8cbd272006b64c4a6e10c87c58313a0792358451' }))), h("table", { key: 'de78dba38361cfebe39f8c3cddb57a1c93861ff6', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), h("div", { key: '662407b29c2ea446d96553dd548bec11e8179185', class: "sd-table__bottom" }, !this.paginatedRows.length && (h("div", { key: '3a475142c5da9cc40f92b761923415893a1366fa', class: "sd-table__no-data" }, h("slot", { key: '49e90e85516b6656c7019b4b33a50f6b36d949a8', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: '460a669cb3841fdc7745e4acb774729910890b42', class: "sd-table__pagination" }, h("sd-pagination", { key: '971f5e41f8df09f4455cdf41f969e5f47d2aac99', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: 'ed37b8efc95ae51bf4c903a5c7c5a068ec9bfcca', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => this.changeRowsPerPage(e.detail.value) })))))));
|
|
563
664
|
}
|
|
564
665
|
static get watchers() { return {
|
|
565
666
|
"columns": ["handleColumnsChange"],
|