@sellmate/design-system 1.0.77 → 1.0.78
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 +2 -2
- package/dist/cjs/{index-CaGGRpd8.js → index--F2wGuAi.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_4.cjs.entry.js +2 -2
- package/dist/cjs/sd-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/{sd-date-picker.config-B705zdZd.js → sd-date-picker.config-CRgCT5dn.js} +4 -2
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +4 -4
- package/dist/cjs/sd-file-picker.cjs.entry.js +1 -1
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +3 -3
- package/dist/cjs/sd-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-number-input.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_5.cjs.entry.js +17 -5
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_4.cjs.entry.js +1 -1
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +78 -13
- package/dist/cjs/{sd-table.config-hnNodd18.js → sd-table.config-Cb0Ot3C6.js} +1 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +37 -6
- package/dist/cjs/sd-text-link.cjs.entry.js +1 -1
- package/dist/cjs/sd-textarea.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +2 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
- package/dist/cjs/{system-DRemSdU1.js → system-DpTN1vBC.js} +1 -1
- package/dist/cjs/{tooltipArrow-BEff0q3z.js → tooltipArrow-D1-wcNm1.js} +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.config.js +1 -1
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.config.js +1 -1
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.config.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +1 -2
- package/dist/collection/components/sd-table/sd-table.js +75 -10
- package/dist/collection/components/sd-table/sd-td/sd-td.js +55 -5
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +14 -2
- package/dist/components/index.js +1 -1
- package/dist/components/{p-C52iEAqd.js → p-B8jXOXtJ.js} +1 -1
- package/dist/components/{p-mqa9-iql.js → p-BE6TxbtX.js} +1 -1
- package/dist/components/{p-BeNJfxnb.js → p-BJsHakU2.js} +1 -1
- package/dist/components/{p-CJAQuJik.js → p-BStczlLa.js} +1 -1
- package/dist/components/{p-ZH78tQXS.js → p-BcMNA89i.js} +1 -1
- package/dist/components/{p-BEOrkEV1.js → p-BheX6lAy.js} +1 -1
- package/dist/components/{p-NlCzTjK4.js → p-BmYM7-4v.js} +1 -1
- package/dist/components/{p-CkgQbCMR.js → p-BppjYHF6.js} +1 -1
- package/dist/components/{p-BfoLbEZx.js → p-Bvq0Vpln.js} +1 -1
- package/dist/components/{p-D66nhMt3.js → p-BwWDMpJc.js} +1 -1
- package/dist/components/{p-DDDZWrWj.js → p-C5qZtNLl.js} +1 -1
- package/dist/components/{p-BM_PRj8W.js → p-C7DajKYn.js} +1 -1
- package/dist/components/p-CZ4ltUOw.js +1 -0
- package/dist/components/{p-CNm5Qbf-.js → p-CeVMl_M9.js} +1 -1
- package/dist/components/{p-B6KZfiQ5.js → p-D1DpOp6M.js} +1 -1
- package/dist/components/p-D3gjBBCU.js +1 -0
- package/dist/components/{p-ZLsQA11g.js → p-DC-6inj0.js} +1 -1
- package/dist/components/p-DRF0He-x.js +1 -0
- package/dist/components/{p-CQy5JErK.js → p-Dcc2Vm6z.js} +1 -1
- package/dist/components/{p-BJJvCBQs.js → p-DegvQLTF.js} +1 -1
- package/dist/components/{p-DK3vj3bG.js → p-Dey-lS6x.js} +1 -1
- package/dist/components/{p-hTUSl23P.js → p-DfH_fO01.js} +1 -1
- package/dist/components/{p-eGToaKCt.js → p-DkJqVXpD.js} +1 -1
- package/dist/components/{p-DcuLMUdl.js → p-DngV3MT1.js} +1 -1
- package/dist/components/{p-BynnUMVZ.js → p-EbjZr2OA.js} +1 -1
- package/dist/components/{p-CvnC61M9.js → p-LwWOleLJ.js} +1 -1
- package/dist/components/{p-DxXwz3cY.js → p-Nvx13YlG.js} +1 -1
- package/dist/components/{p-D2FOkhao.js → p-TwGlKfsC.js} +1 -1
- package/dist/components/{p-D1SJ2TMu.js → p-ZMpCZhXP.js} +1 -1
- package/dist/components/{p-RpjjrX78.js → p-dNJIFthT.js} +1 -1
- package/dist/components/{p-CJqZcEqD.js → p-q0VWISKA.js} +1 -1
- package/dist/components/{p-C8Dy_x5h.js → p-xnLvZ-xn.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-box.js +1 -1
- package/dist/components/sd-date-picker-calendar.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-linear-progress.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-toggle.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.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-68d0fa15.entry.js → p-0356c195.entry.js} +1 -1
- package/dist/design-system/{p-504033e8.entry.js → p-045bc426.entry.js} +1 -1
- package/dist/design-system/{p-42906763.entry.js → p-12dfd239.entry.js} +1 -1
- package/dist/design-system/{p-3f9d60a0.entry.js → p-16d3a485.entry.js} +1 -1
- package/dist/design-system/{p-80c51996.entry.js → p-1706ed6f.entry.js} +1 -1
- package/dist/design-system/{p-43ffe7b0.entry.js → p-182548f7.entry.js} +1 -1
- package/dist/design-system/{p-c863a31d.entry.js → p-1a79edce.entry.js} +1 -1
- package/dist/design-system/{p-732ee178.entry.js → p-1cf87e87.entry.js} +1 -1
- package/dist/design-system/{p-120df622.entry.js → p-25a08e98.entry.js} +1 -1
- package/dist/design-system/{p-8abc2413.entry.js → p-2812b9ce.entry.js} +1 -1
- package/dist/design-system/{p-ab5a94c8.entry.js → p-33bc3176.entry.js} +1 -1
- package/dist/design-system/p-38f661ea.entry.js +1 -0
- package/dist/design-system/{p-a69d6a99.entry.js → p-3f7bc660.entry.js} +1 -1
- package/dist/design-system/{p-c21f30de.entry.js → p-429dab5c.entry.js} +1 -1
- package/dist/design-system/p-455dccf5.entry.js +1 -0
- package/dist/design-system/{p-bab814c5.entry.js → p-59313838.entry.js} +1 -1
- package/dist/design-system/{p-e84d1bac.entry.js → p-6af01ab0.entry.js} +1 -1
- package/dist/design-system/{p-7d892b68.entry.js → p-6bfe3612.entry.js} +1 -1
- package/dist/design-system/{p-42a8f8a2.entry.js → p-70d4903f.entry.js} +1 -1
- package/dist/design-system/{p-fbb7e090.entry.js → p-767e99f9.entry.js} +1 -1
- package/dist/design-system/{p-d8bb2cb4.entry.js → p-797517b5.entry.js} +1 -1
- package/dist/design-system/p-7c370335.entry.js +1 -0
- package/dist/design-system/{p-cab35b9a.entry.js → p-7fe8be6a.entry.js} +1 -1
- package/dist/design-system/{p-28b727df.entry.js → p-83b262dc.entry.js} +1 -1
- package/dist/design-system/{p-ebbffddb.entry.js → p-881adaa5.entry.js} +1 -1
- package/dist/design-system/{p-704dc1f1.entry.js → p-88d7303c.entry.js} +1 -1
- package/dist/design-system/{p-f06038fd.entry.js → p-8a601e0f.entry.js} +1 -1
- package/dist/design-system/{p-DDDZWrWj.js → p-C5qZtNLl.js} +1 -1
- package/dist/design-system/p-CZ4ltUOw.js +1 -0
- package/dist/design-system/p-Cnwbjz1F.js +2 -0
- package/dist/design-system/{p-DG7d45mX.js → p-DnCBBIoq.js} +1 -1
- package/dist/design-system/{p-889971bc.entry.js → p-a82be987.entry.js} +1 -1
- package/dist/design-system/{p-b9a870bf.entry.js → p-b917c82a.entry.js} +1 -1
- package/dist/design-system/{p-809e616c.entry.js → p-b9f00eef.entry.js} +1 -1
- package/dist/design-system/{p-e04302a2.entry.js → p-bcb53788.entry.js} +1 -1
- package/dist/design-system/{p-dd63e10f.entry.js → p-c24344ac.entry.js} +1 -1
- package/dist/design-system/{p-f80d10ad.entry.js → p-d76192bd.entry.js} +1 -1
- package/dist/design-system/{p-4ad9a5b8.entry.js → p-d9d8c51b.entry.js} +1 -1
- package/dist/design-system/p-de67937d.entry.js +1 -0
- package/dist/design-system/{p-ec02b3e8.entry.js → p-e5cebccd.entry.js} +1 -1
- package/dist/design-system/{p-feb84f87.entry.js → p-ea5e6c2c.entry.js} +1 -1
- package/dist/design-system/p-ead3e688.entry.js +1 -0
- package/dist/design-system/{p-ae626d30.entry.js → p-eeb1cac2.entry.js} +1 -1
- package/dist/design-system/{p-6f9b0b32.entry.js → p-f1a74359.entry.js} +1 -1
- package/dist/design-system/{p-2cd2fb76.entry.js → p-f44786a9.entry.js} +1 -1
- package/dist/design-system/p-f522c91d.entry.js +1 -0
- package/dist/design-system/{p-970f9ea5.entry.js → p-f69c7539.entry.js} +1 -1
- package/dist/design-system/{p-67f88b1a.entry.js → p-fe9cef6a.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-BHmXH7dZ.js → index-Cnwbjz1F.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +1 -1
- package/dist/esm/sd-button-v2_2.entry.js +1 -1
- package/dist/esm/sd-button_4.entry.js +2 -2
- package/dist/esm/sd-calendar.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker-calendar.entry.js +2 -2
- package/dist/esm/sd-date-picker-trigger.entry.js +2 -2
- package/dist/esm/{sd-date-picker.config-DMbVR8K4.js → sd-date-picker.config-C2fDbE9d.js} +4 -2
- package/dist/esm/sd-date-picker.entry.js +2 -2
- package/dist/esm/sd-date-range-picker-calendar.entry.js +2 -2
- package/dist/esm/sd-date-range-picker.entry.js +2 -2
- package/dist/esm/sd-dropdown-button.entry.js +4 -4
- package/dist/esm/sd-file-picker.entry.js +1 -1
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +3 -3
- package/dist/esm/sd-input.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +1 -1
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-number-input.entry.js +1 -1
- package/dist/esm/sd-pagination_5.entry.js +17 -5
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_4.entry.js +1 -1
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-DKkzCQwJ.js → sd-table.config-Bj-EEo7N.js} +1 -1
- package/dist/esm/sd-table.entry.js +78 -13
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-tag.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +37 -6
- package/dist/esm/sd-text-link.entry.js +1 -1
- package/dist/esm/sd-textarea.entry.js +1 -1
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +2 -3
- package/dist/esm/sd-toggle.entry.js +1 -1
- package/dist/esm/{system-CZxeqYuw.js → system-CZ4ltUOw.js} +1 -1
- package/dist/esm/{tooltipArrow-DZ-N5HBq.js → tooltipArrow-D8sr81Xw.js} +1 -1
- package/dist/types/components/sd-table/sd-table.d.ts +8 -0
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +5 -2
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +1 -0
- package/dist/types/components.d.ts +3 -0
- package/hydrate/index.js +139 -29
- package/hydrate/index.mjs +139 -29
- package/package.json +1 -1
- package/dist/components/p-BR_ZAr48.js +0 -1
- package/dist/components/p-Bm8Fue-a.js +0 -1
- package/dist/components/p-CZxeqYuw.js +0 -1
- package/dist/design-system/p-400b3676.entry.js +0 -1
- package/dist/design-system/p-41ea33fb.entry.js +0 -1
- package/dist/design-system/p-64d3c984.entry.js +0 -1
- package/dist/design-system/p-6dc47f4c.entry.js +0 -1
- package/dist/design-system/p-BHmXH7dZ.js +0 -2
- package/dist/design-system/p-CZxeqYuw.js +0 -1
- package/dist/design-system/p-cea424f6.entry.js +0 -1
- package/dist/design-system/p-ed1c4625.entry.js +0 -1
- /package/dist/components/{p-DMbVR8K4.js → p-C2fDbE9d.js} +0 -0
- /package/dist/design-system/{p-DMbVR8K4.js → p-C2fDbE9d.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, d as readTask, f as forceUpdate, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, d as readTask, f as forceUpdate, h, H as Host } from './index-Cnwbjz1F.js';
|
|
2
2
|
import { T as TABLE_ID_ATTR } from './constants-sZMi_32I.js';
|
|
3
|
-
import { T as TABLE_BODY_TYPOGRAPHY, a as TABLE_BORDER, b as TABLE_RADIUS } from './sd-table.config-
|
|
4
|
-
import './system-
|
|
3
|
+
import { T as TABLE_BODY_TYPOGRAPHY, a as TABLE_BORDER, b as TABLE_RADIUS } from './sd-table.config-Bj-EEo7N.js';
|
|
4
|
+
import './system-CZ4ltUOw.js';
|
|
5
5
|
|
|
6
6
|
const urlAlphabet =
|
|
7
7
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
@@ -83,6 +83,36 @@ const SdTable = class {
|
|
|
83
83
|
onScroll;
|
|
84
84
|
// 키: `${rowKey}::${field}` → { rowspan, colspan }
|
|
85
85
|
spanRegistry = new Map();
|
|
86
|
+
// 키: `${rowKey}::${field}` → sd-td의 sdClass 문자열
|
|
87
|
+
// sd-tr가 td를 그릴 때 머지해서 셀-단위 커스텀 클래스를 적용한다.
|
|
88
|
+
cellClassRegistry = new Map();
|
|
89
|
+
// rowKey 문자열 → rows 배열에서의 visual index.
|
|
90
|
+
// rowspan 위쪽 행 스캔에서 "내 위에 있느냐"를 판정하기 위한 시각적 순서 소스.
|
|
91
|
+
// rows prop이 있으면 채워지고, 없으면 비어 있어 Number(rowKey) fallback이 사용된다.
|
|
92
|
+
rowIndexMap = new Map();
|
|
93
|
+
rebuildRowIndexMap() {
|
|
94
|
+
this.rowIndexMap.clear();
|
|
95
|
+
if (!Array.isArray(this.rows))
|
|
96
|
+
return;
|
|
97
|
+
const field = this.rowKey;
|
|
98
|
+
this.rows.forEach((r, i) => {
|
|
99
|
+
const k = r?.[field];
|
|
100
|
+
if (k == null)
|
|
101
|
+
return;
|
|
102
|
+
this.rowIndexMap.set(String(k), i);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
// rowKey의 시각적 행 인덱스를 돌려준다.
|
|
106
|
+
// 1) rows 기반 맵에 있으면 그 값 (임의 문자열 rowKey 지원)
|
|
107
|
+
// 2) 없으면 Number(rowKey) fallback (rows prop 없이 슬롯-온리 + 숫자 rowKey 사용 패턴)
|
|
108
|
+
// 3) 둘 다 안 되면 null — rowspan 평가 스킵
|
|
109
|
+
resolveRowIndex(rowKey) {
|
|
110
|
+
const fromMap = this.rowIndexMap.get(rowKey);
|
|
111
|
+
if (fromMap !== undefined)
|
|
112
|
+
return fromMap;
|
|
113
|
+
const n = Number(rowKey);
|
|
114
|
+
return Number.isFinite(n) ? n : null;
|
|
115
|
+
}
|
|
86
116
|
toFiniteNumber(value, fallback) {
|
|
87
117
|
const n = typeof value === 'number' ? value : Number(value);
|
|
88
118
|
return Number.isFinite(n) ? n : fallback;
|
|
@@ -129,10 +159,14 @@ const SdTable = class {
|
|
|
129
159
|
if (!Array.isArray(newRows))
|
|
130
160
|
return;
|
|
131
161
|
this.rowCount = newRows.length;
|
|
162
|
+
this.rebuildRowIndexMap();
|
|
132
163
|
if (this.useVirtualScroll)
|
|
133
164
|
this.propagateVirtualUpdate(true);
|
|
134
165
|
this.pushRowsToChildren(newRows);
|
|
135
166
|
}
|
|
167
|
+
handleRowKeyChange() {
|
|
168
|
+
this.rebuildRowIndexMap();
|
|
169
|
+
}
|
|
136
170
|
handleTableIdChange() {
|
|
137
171
|
this.syncTableIdAttribute();
|
|
138
172
|
}
|
|
@@ -173,6 +207,7 @@ const SdTable = class {
|
|
|
173
207
|
this.detectChildren();
|
|
174
208
|
this.innerSelected = new Set(this.selected || []);
|
|
175
209
|
this.columnWidths = (this.columns || []).map(c => parseInt(c.width || '120', 10));
|
|
210
|
+
this.rebuildRowIndexMap();
|
|
176
211
|
if (this.pagination?.page) {
|
|
177
212
|
this.currentPage = this.pagination.page;
|
|
178
213
|
}
|
|
@@ -198,6 +233,9 @@ const SdTable = class {
|
|
|
198
233
|
el.getSpanSync = this.getSpanSync.bind(this);
|
|
199
234
|
el.isCoveredSync = this.isCoveredSync.bind(this);
|
|
200
235
|
el.hasRowspanSync = this.hasRowspanSync.bind(this);
|
|
236
|
+
el.registerCellClassSync = this.registerCellClassSync.bind(this);
|
|
237
|
+
el.unregisterCellClassSync = this.unregisterCellClassSync.bind(this);
|
|
238
|
+
el.getCellClassSync = this.getCellClassSync.bind(this);
|
|
201
239
|
if (Array.isArray(this.rows)) {
|
|
202
240
|
this.rowCount = this.rows.length;
|
|
203
241
|
this.pushRowsToChildren(this.rows);
|
|
@@ -533,6 +571,28 @@ const SdTable = class {
|
|
|
533
571
|
getSpanSync(rowKey, field) {
|
|
534
572
|
return this.spanRegistry.get(this.spanKey(rowKey, field));
|
|
535
573
|
}
|
|
574
|
+
// sd-td의 sdClass 등록. 빈/공백만 있는 값은 해제로 취급.
|
|
575
|
+
// span과 달리 다른 셀에 영향이 없으므로 형제 sd-tr 전체를 재렌더하지 않고,
|
|
576
|
+
// sd-td 쪽에서 자기 부모 tr만 bumpSpansVersion으로 새로 그린다.
|
|
577
|
+
registerCellClassSync(rowKey, field, cls) {
|
|
578
|
+
if (rowKey == null || !field)
|
|
579
|
+
return;
|
|
580
|
+
const key = this.spanKey(rowKey, field);
|
|
581
|
+
const safe = (cls ?? '').trim();
|
|
582
|
+
if (!safe) {
|
|
583
|
+
this.cellClassRegistry.delete(key);
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
this.cellClassRegistry.set(key, safe);
|
|
587
|
+
}
|
|
588
|
+
unregisterCellClassSync(rowKey, field) {
|
|
589
|
+
if (rowKey == null || !field)
|
|
590
|
+
return;
|
|
591
|
+
this.cellClassRegistry.delete(this.spanKey(rowKey, field));
|
|
592
|
+
}
|
|
593
|
+
getCellClassSync(rowKey, field) {
|
|
594
|
+
return this.cellClassRegistry.get(this.spanKey(rowKey, field));
|
|
595
|
+
}
|
|
536
596
|
// 레지스트리에 rowspan>1 항목이 하나라도 있으면 true.
|
|
537
597
|
// hover 동작을 끌지 결정하는 데 사용 — colspan만 있는 경우는 그대로 hover 유지.
|
|
538
598
|
hasRowspanSync() {
|
|
@@ -558,9 +618,11 @@ const SdTable = class {
|
|
|
558
618
|
if (i + span.colspan > colIdx)
|
|
559
619
|
return true;
|
|
560
620
|
}
|
|
561
|
-
// 2. 위쪽 행 스캔 —
|
|
562
|
-
|
|
563
|
-
|
|
621
|
+
// 2. 위쪽 행 스캔 — rows 기반 visual index로 "내 위에 있느냐" 판정
|
|
622
|
+
// rows prop이 있으면 rowIndexMap로 임의 문자열 rowKey 지원,
|
|
623
|
+
// 없으면 Number(rowKey) fallback (resolveRowIndex가 처리)
|
|
624
|
+
const myRowIdx = this.resolveRowIndex(rowKey);
|
|
625
|
+
if (myRowIdx == null)
|
|
564
626
|
return false;
|
|
565
627
|
for (const [key, span] of this.spanRegistry) {
|
|
566
628
|
if (span.rowspan <= 1)
|
|
@@ -570,8 +632,8 @@ const SdTable = class {
|
|
|
570
632
|
continue;
|
|
571
633
|
const otherRowKey = key.slice(0, sepIdx);
|
|
572
634
|
const otherField = key.slice(sepIdx + 2);
|
|
573
|
-
const otherRowIdx =
|
|
574
|
-
if (
|
|
635
|
+
const otherRowIdx = this.resolveRowIndex(otherRowKey);
|
|
636
|
+
if (otherRowIdx == null)
|
|
575
637
|
continue;
|
|
576
638
|
if (otherRowIdx >= myRowIdx)
|
|
577
639
|
continue;
|
|
@@ -675,24 +737,24 @@ const SdTable = class {
|
|
|
675
737
|
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
676
738
|
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
677
739
|
};
|
|
678
|
-
return (h(Host, { key: '
|
|
740
|
+
return (h(Host, { key: 'c20a7cc6d5917c9d09c699f2c40ac2b6d07747e1', style: hostStyle }, h("div", { key: '94f76e75da5c6ff9d0ef93b6c2aa3def4ec1766e', class: "sd-table__container", style: {
|
|
679
741
|
'--table-width': this.width,
|
|
680
742
|
'--table-height': this.height,
|
|
681
743
|
'--table-container-height': `calc(${this.height || '100%'} - ${this.pagination && this.rowCount > 0 && !this.useVirtualScroll ? 48 : 0}px)`,
|
|
682
|
-
} }, h("div", { key: '
|
|
744
|
+
} }, h("div", { key: '3b98c828c7dc42de3d4f9bb645279b20d9079ac4', class: {
|
|
683
745
|
'sd-table__clip': true,
|
|
684
746
|
'sd-table__clip--has-pagination': !!(this.pagination &&
|
|
685
747
|
this.pagination.rowsPerPage > 0 &&
|
|
686
748
|
this.rowCount > 0 &&
|
|
687
749
|
!this.useVirtualScroll),
|
|
688
|
-
} }, h("div", { key: '
|
|
750
|
+
} }, h("div", { key: 'b6d04ec953d7b75fb8ad8bc32e2662550d38c5c7', class: {
|
|
689
751
|
'sd-table__wrapper': true,
|
|
690
752
|
'sd-table__wrapper--loading': this.isLoading,
|
|
691
753
|
'sd-table__wrapper--no-data': this.rowCount === 0 && !this.isLoading,
|
|
692
|
-
} }, this.isLoading && (h("div", { key: '
|
|
754
|
+
} }, this.isLoading && (h("div", { key: '3050275c7ecde0aeda3ec881257be4334ebd06fc', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '7a26c4365e4e28a5ebce1c35bb52a302440542f7', indeterminate: true }))), this.rowCount === 0 && !this.isLoading && (h("div", { key: '31442f92321eb4aaf5c36c5995a1c25d8069b6ea', class: "sd-table__no-data" }, h("slot", { key: '42f3208fb1c86d118f50e8b1974bff3ede253032', name: "no-data" }, h("span", { key: 'ce7368c64b3502eee2fae7a28e0508d4d1622c25' }, this.resolvedNoDataLabel)))), h("table", { key: '170203f34b4bb11fce0a064622265d093ccbab2a', class: this.tableClasses }, this.autoThead ? (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange }, h("sd-thead", { rows: this.rows ?? [] }))) : (h("slot", { name: `${resolvedTableId}-head`, onSlotchange: this.handleStructureSlotChange })), this.autoTbody ? (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }, h("sd-tbody", { rows: this.rows ?? [] }, this.renderAutoRows()))) : (h("slot", { name: `${resolvedTableId}-body`, onSlotchange: this.handleStructureSlotChange }))))), this.pagination &&
|
|
693
755
|
this.pagination.rowsPerPage > 0 &&
|
|
694
756
|
this.rowCount > 0 &&
|
|
695
|
-
!this.useVirtualScroll && (h("div", { key: '
|
|
757
|
+
!this.useVirtualScroll && (h("div", { key: 'cfbd5ee8e706c9ef7a2b6a4be8901b7aae47249e', class: "sd-table__pagination" }, h("sd-pagination", { key: '57dad16199d9145fcec0c5ed46beeeac1f08af02', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onSdPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: '1314e296ba913600436045b4af54eb0bc1d95d0d', value: this.useInternalPagination
|
|
696
758
|
? this.innerRowsPerPage
|
|
697
759
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
698
760
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -713,6 +775,9 @@ const SdTable = class {
|
|
|
713
775
|
"rows": [{
|
|
714
776
|
"handleRowsChange": 0
|
|
715
777
|
}],
|
|
778
|
+
"rowKey": [{
|
|
779
|
+
"handleRowKeyChange": 0
|
|
780
|
+
}],
|
|
716
781
|
"tableId": [{
|
|
717
782
|
"handleTableIdChange": 0
|
|
718
783
|
}],
|
package/dist/esm/sd-tag.entry.js
CHANGED
package/dist/esm/sd-td.entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, f as forceUpdate, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, a as getElement, f as forceUpdate, h, H as Host } from './index-Cnwbjz1F.js';
|
|
2
2
|
import { T as TABLE_ID_ATTR } from './constants-sZMi_32I.js';
|
|
3
3
|
|
|
4
4
|
const sdTdCss = () => `sd-td *{box-sizing:border-box}sd-td{display:contents}sd-td.align-left{text-align:left}sd-td.align-center{text-align:center}sd-td.align-right{text-align:right}`;
|
|
@@ -13,20 +13,30 @@ const SdTd = class {
|
|
|
13
13
|
align;
|
|
14
14
|
rowspan;
|
|
15
15
|
colspan;
|
|
16
|
-
|
|
16
|
+
// sd-tr가 그리는 실제 <td>에 머지될 사용자 클래스.
|
|
17
|
+
// <sd-td> 호스트는 display:contents라 호스트의 class는 시각 효과가 없기 때문에,
|
|
18
|
+
// 이 prop을 통해 sd-table 레지스트리에 등록 → sd-tr가 td 렌더 시 합쳐 사용한다.
|
|
19
|
+
sdClass;
|
|
20
|
+
handleFieldChange(_newField, oldField) {
|
|
17
21
|
this.syncSlotName();
|
|
18
22
|
this.syncSpanRegistration();
|
|
23
|
+
this.syncCellClassRegistration(oldField);
|
|
19
24
|
}
|
|
20
|
-
handleRowKeyChange() {
|
|
25
|
+
handleRowKeyChange(_newKey, oldKey) {
|
|
21
26
|
this.syncSlotName();
|
|
22
27
|
this.syncSpanRegistration();
|
|
28
|
+
this.syncCellClassRegistration(undefined, oldKey);
|
|
23
29
|
}
|
|
24
30
|
handleSpanChange() {
|
|
25
31
|
this.syncSpanRegistration();
|
|
26
32
|
}
|
|
33
|
+
handleSdClassChange() {
|
|
34
|
+
this.syncCellClassRegistration();
|
|
35
|
+
}
|
|
27
36
|
componentWillLoad() {
|
|
28
37
|
this.syncSlotName();
|
|
29
38
|
this.syncSpanRegistration();
|
|
39
|
+
this.syncCellClassRegistration();
|
|
30
40
|
// slot 타이밍 엇갈림 대응: 부모 sd-tr forceUpdate로 슬롯 재매칭
|
|
31
41
|
const parentTr = this.el.parentElement;
|
|
32
42
|
if (parentTr?.tagName?.toLowerCase() === 'sd-tr') {
|
|
@@ -36,17 +46,20 @@ const SdTd = class {
|
|
|
36
46
|
componentDidLoad() {
|
|
37
47
|
this.syncSlotName();
|
|
38
48
|
this.syncSpanRegistration();
|
|
49
|
+
this.syncCellClassRegistration();
|
|
39
50
|
}
|
|
40
51
|
// React StrictMode에서는 disconnect/reconnect 사이클이 일어나면서
|
|
41
52
|
// 동일 인스턴스의 componentWillLoad는 더 이상 호출되지 않는다.
|
|
42
53
|
// 재연결 시점에도 등록 상태를 복구해야 rowspan/colspan이 유지된다.
|
|
43
54
|
connectedCallback() {
|
|
44
55
|
this.syncSpanRegistration();
|
|
56
|
+
this.syncCellClassRegistration();
|
|
45
57
|
}
|
|
46
58
|
disconnectedCallback() {
|
|
47
59
|
const table = this.findTable();
|
|
48
|
-
if (table
|
|
49
|
-
table.unregisterSpanSync(String(this.rowKey), this.field);
|
|
60
|
+
if (table && this.field && this.rowKey != null) {
|
|
61
|
+
table.unregisterSpanSync?.(String(this.rowKey), this.field);
|
|
62
|
+
table.unregisterCellClassSync?.(String(this.rowKey), this.field);
|
|
50
63
|
this.requestParentTrUpdate();
|
|
51
64
|
}
|
|
52
65
|
}
|
|
@@ -74,6 +87,21 @@ const SdTd = class {
|
|
|
74
87
|
table.registerSpanSync(String(this.rowKey), this.field, rs, cs);
|
|
75
88
|
this.requestParentTrUpdate();
|
|
76
89
|
}
|
|
90
|
+
// field/rowKey가 바뀌면 이전 키에 등록된 클래스가 남으므로 먼저 해제하고 새 키로 등록한다.
|
|
91
|
+
syncCellClassRegistration(prevField, prevRowKey) {
|
|
92
|
+
const table = this.findTable();
|
|
93
|
+
if (!table)
|
|
94
|
+
return;
|
|
95
|
+
const oldField = prevField ?? this.field;
|
|
96
|
+
const oldRowKey = prevRowKey ?? (this.rowKey != null ? String(this.rowKey) : undefined);
|
|
97
|
+
if (oldField && oldRowKey != null) {
|
|
98
|
+
table.unregisterCellClassSync?.(oldRowKey, oldField);
|
|
99
|
+
}
|
|
100
|
+
if (!table.registerCellClassSync || !this.field || this.rowKey == null)
|
|
101
|
+
return;
|
|
102
|
+
table.registerCellClassSync(String(this.rowKey), this.field, this.sdClass);
|
|
103
|
+
this.requestParentTrUpdate();
|
|
104
|
+
}
|
|
77
105
|
syncSlotName() {
|
|
78
106
|
const table = this.el.closest('sd-table');
|
|
79
107
|
const fromMethod = table?.getTableIdSync?.();
|
|
@@ -86,7 +114,7 @@ const SdTd = class {
|
|
|
86
114
|
}
|
|
87
115
|
}
|
|
88
116
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
117
|
+
return (h(Host, { key: '84ce2fe2ea8ccb3eaf09e4d2559fc917bdb1077a', class: { [`align-${this.align}`]: Boolean(this.align) } }, h("slot", { key: '9b8164a2eac53b927bf59638cb53c35998a75cfe' })));
|
|
90
118
|
}
|
|
91
119
|
static get watchers() { return {
|
|
92
120
|
"field": [{
|
|
@@ -100,6 +128,9 @@ const SdTd = class {
|
|
|
100
128
|
}],
|
|
101
129
|
"colspan": [{
|
|
102
130
|
"handleSpanChange": 0
|
|
131
|
+
}],
|
|
132
|
+
"sdClass": [{
|
|
133
|
+
"handleSdClassChange": 0
|
|
103
134
|
}]
|
|
104
135
|
}; }
|
|
105
136
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-Cnwbjz1F.js';
|
|
2
2
|
import { n as nanoid } from './index-CCwNgVmC.js';
|
|
3
3
|
import { i as inputTokens } from './component.textinput-ByhWX2NK.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Cnwbjz1F.js';
|
|
2
2
|
|
|
3
3
|
const toast = {
|
|
4
4
|
icon: "16",
|
|
@@ -21,8 +21,7 @@ const toast = {
|
|
|
21
21
|
accent: {
|
|
22
22
|
bg: "#005CC9",
|
|
23
23
|
content: "#FFFFFF"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
24
|
+
}};
|
|
26
25
|
var toastTokens = {
|
|
27
26
|
toast: toast
|
|
28
27
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from './index-
|
|
1
|
+
import { h } from './index-Cnwbjz1F.js';
|
|
2
2
|
|
|
3
3
|
const TooltipArrow = (props) => (h("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, h("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
|
|
4
4
|
|
|
@@ -55,6 +55,10 @@ export declare class SdTable {
|
|
|
55
55
|
private scrollContainer;
|
|
56
56
|
private onScroll?;
|
|
57
57
|
private spanRegistry;
|
|
58
|
+
private cellClassRegistry;
|
|
59
|
+
private rowIndexMap;
|
|
60
|
+
private rebuildRowIndexMap;
|
|
61
|
+
private resolveRowIndex;
|
|
58
62
|
private toFiniteNumber;
|
|
59
63
|
private isRowsPerPageValue;
|
|
60
64
|
private isValidTableId;
|
|
@@ -64,6 +68,7 @@ export declare class SdTable {
|
|
|
64
68
|
handleUseVirtualScrollChange(newVal: boolean): void;
|
|
65
69
|
handleColumnsChange(newCols: SdTableColumn[]): void;
|
|
66
70
|
handleRowsChange(newRows?: Row[]): void;
|
|
71
|
+
handleRowKeyChange(): void;
|
|
67
72
|
handleTableIdChange(): void;
|
|
68
73
|
handleNoDataLabelChange(newLabel?: string): void;
|
|
69
74
|
handleConfigChange(): void;
|
|
@@ -125,6 +130,9 @@ export declare class SdTable {
|
|
|
125
130
|
rowspan: number;
|
|
126
131
|
colspan: number;
|
|
127
132
|
} | undefined;
|
|
133
|
+
registerCellClassSync(rowKey: string, field: string, cls: string | undefined | null): void;
|
|
134
|
+
unregisterCellClassSync(rowKey: string, field: string): void;
|
|
135
|
+
getCellClassSync(rowKey: string, field: string): string | undefined;
|
|
128
136
|
hasRowspanSync(): boolean;
|
|
129
137
|
isCoveredSync(rowKey: string, colIdx: number, columns: SdTableColumn[]): boolean;
|
|
130
138
|
setRowCountSync(count: number): void;
|
|
@@ -5,9 +5,11 @@ export declare class SdTd {
|
|
|
5
5
|
align?: 'left' | 'center' | 'right';
|
|
6
6
|
rowspan?: number;
|
|
7
7
|
colspan?: number;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
sdClass?: string;
|
|
9
|
+
handleFieldChange(_newField: string, oldField: string): void;
|
|
10
|
+
handleRowKeyChange(_newKey: string, oldKey: string): void;
|
|
10
11
|
handleSpanChange(): void;
|
|
12
|
+
handleSdClassChange(): void;
|
|
11
13
|
componentWillLoad(): void;
|
|
12
14
|
componentDidLoad(): void;
|
|
13
15
|
connectedCallback(): void;
|
|
@@ -15,6 +17,7 @@ export declare class SdTd {
|
|
|
15
17
|
private findTable;
|
|
16
18
|
private requestParentTrUpdate;
|
|
17
19
|
private syncSpanRegistration;
|
|
20
|
+
private syncCellClassRegistration;
|
|
18
21
|
private syncSlotName;
|
|
19
22
|
render(): any;
|
|
20
23
|
}
|
|
@@ -1639,6 +1639,7 @@ export namespace Components {
|
|
|
1639
1639
|
"field": string;
|
|
1640
1640
|
"rowKey": string;
|
|
1641
1641
|
"rowspan"?: number;
|
|
1642
|
+
"sdClass"?: string;
|
|
1642
1643
|
}
|
|
1643
1644
|
interface SdTextLink {
|
|
1644
1645
|
/**
|
|
@@ -4555,6 +4556,7 @@ declare namespace LocalJSX {
|
|
|
4555
4556
|
"field": string;
|
|
4556
4557
|
"rowKey": string;
|
|
4557
4558
|
"rowspan"?: number;
|
|
4559
|
+
"sdClass"?: string;
|
|
4558
4560
|
}
|
|
4559
4561
|
interface SdTextLink {
|
|
4560
4562
|
/**
|
|
@@ -5241,6 +5243,7 @@ declare namespace LocalJSX {
|
|
|
5241
5243
|
"align": 'left' | 'center' | 'right';
|
|
5242
5244
|
"rowspan": number;
|
|
5243
5245
|
"colspan": number;
|
|
5246
|
+
"sdClass": string;
|
|
5244
5247
|
}
|
|
5245
5248
|
interface SdTextLinkAttributes {
|
|
5246
5249
|
"label": string;
|