@sellmate/design-system 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{component.table-B7brIpIQ.js → component.table-CMqGfEui.js} +11 -1
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index-BlxrCRYi.js → index-Cw-78mnC.js} +1 -1
- package/dist/cjs/index.cjs.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_2.cjs.entry.js +10 -9
- 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 +4 -4
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-box.cjs.entry.js +8 -3
- package/dist/cjs/sd-date-picker-calendar_2.cjs.entry.js +13 -8
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +22 -17
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +13 -13
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +7 -3
- package/dist/cjs/sd-field_3.cjs.entry.js +31 -30
- package/dist/cjs/sd-form.cjs.entry.js +5 -5
- package/dist/cjs/sd-ghost-button.cjs.entry.js +4 -4
- package/dist/cjs/sd-guide.cjs.entry.js +5 -5
- package/dist/cjs/sd-key-value-table.cjs.entry.js +10 -10
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-modal-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-pagination_4.cjs.entry.js +113 -40
- package/dist/cjs/sd-popover.cjs.entry.js +6 -6
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- package/dist/cjs/sd-portal.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +7 -4
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +15 -11
- package/dist/cjs/sd-select_3.cjs.entry.js +20 -15
- package/dist/cjs/sd-switch.cjs.entry.js +1 -1
- package/dist/cjs/sd-table.cjs.entry.js +170 -47
- package/dist/cjs/{sd-table.config-CDyioyE2.js → sd-table.config-BIpldZtw.js} +13 -2
- package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
- package/dist/cjs/sd-tag.cjs.entry.js +10 -10
- package/dist/cjs/sd-td.cjs.entry.js +52 -10
- package/dist/cjs/sd-text-link.cjs.entry.js +9 -4
- package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-toast.cjs.entry.js +3 -3
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{tooltipArrow-N6nQ1QT-.js → tooltipArrow-BjSFKIUq.js} +1 -1
- package/dist/collection/components/sd-button/sd-button.js +9 -8
- package/dist/collection/components/sd-chip/sd-chip.js +4 -4
- package/dist/collection/components/sd-date-box/sd-date-box.js +7 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +4 -4
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +8 -3
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +12 -12
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +3 -3
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +6 -2
- package/dist/collection/components/sd-field/sd-field.js +23 -22
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +7 -2
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +4 -4
- package/dist/collection/components/sd-form/sd-form.js +4 -4
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
- package/dist/collection/components/sd-guide/sd-guide.js +4 -4
- package/dist/collection/components/sd-input/sd-input.js +3 -3
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +8 -8
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +2 -2
- package/dist/collection/components/sd-number-input/sd-number-input.js +6 -6
- package/dist/collection/components/sd-popover/sd-popover.js +4 -4
- package/dist/collection/components/sd-portal/sd-portal.js +2 -2
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -3
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +7 -3
- package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +7 -7
- package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +5 -5
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
- package/dist/collection/components/sd-select/sd-select.js +5 -5
- package/dist/collection/components/sd-table/sd-table.config.js +4 -0
- package/dist/collection/components/sd-table/sd-table.css +22 -3
- package/dist/collection/components/sd-table/sd-table.js +197 -50
- package/dist/collection/components/sd-table/sd-table.stories.helpers.js +2 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +5 -5
- package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -9
- package/dist/collection/components/sd-table/sd-thead/sd-thead.js +30 -16
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +20 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +97 -18
- package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
- package/dist/collection/components/sd-tag/sd-tag.config.js +3 -3
- package/dist/collection/components/sd-tag/sd-tag.js +6 -3
- package/dist/collection/components/sd-text-link/sd-text-link.js +8 -3
- package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
- package/dist/collection/components/sd-toast/sd-toast.js +2 -2
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
- package/dist/collection/utils/modal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-2wB9cing.js +1 -0
- package/dist/components/p-B-sK7I83.js +1 -0
- package/dist/components/p-B3D43x7F.js +1 -0
- package/dist/components/p-B7mpdnNl.js +1 -0
- package/dist/components/{p-DG45uNxd.js → p-BAcmO7w0.js} +1 -1
- package/dist/components/p-BL0ZcHK8.js +1 -0
- package/dist/components/p-BXCyVrle.js +1 -0
- package/dist/components/p-BY1LGlfc.js +1 -0
- package/dist/components/p-BjkROjjt.js +1 -0
- package/dist/components/p-Bm3W_eBv.js +1 -0
- package/dist/components/p-BnfUIhUj.js +1 -0
- package/dist/components/{p-D5TRyquv.js → p-BorUSgEK.js} +1 -1
- package/dist/components/{p-BfkuCNCI.js → p-BsM-fwYd.js} +1 -1
- package/dist/components/p-C5CH-s6a.js +1 -0
- package/dist/components/p-C7WLft_0.js +1 -0
- package/dist/components/{p-CGBnxqG2.js → p-CK9ciBIR.js} +1 -1
- package/dist/components/{p-BeK8amzx.js → p-CQI40kiY.js} +1 -1
- package/dist/components/{p-Dr1AMbBj.js → p-CRL7TjSB.js} +1 -1
- package/dist/components/p-CdOHomUp.js +1 -0
- package/dist/components/p-Ch5Yu1qd.js +1 -0
- package/dist/components/{p-D8WAP9T3.js → p-Cktiasfd.js} +1 -1
- package/dist/components/p-CsVAx6KV.js +1 -0
- package/dist/components/p-D0Jiw-Zk.js +1 -0
- package/dist/components/p-D5F7wCNo.js +1 -0
- package/dist/components/p-DBFgk0rX.js +1 -0
- package/dist/components/p-DFLCjX1a.js +1 -0
- package/dist/components/p-DL1ac1QS.js +1 -0
- package/dist/components/p-DeQcDHpn.js +1 -0
- package/dist/components/p-DfK4DiDI.js +1 -0
- package/dist/components/p-DhTcn6jX.js +1 -0
- package/dist/components/p-Dl8TIEQu.js +1 -0
- package/dist/components/{p--t9jBTYS.js → p-DyAnn9ea.js} +1 -1
- package/dist/components/p-Jts7ueOa.js +1 -0
- package/dist/components/{p-B1MabGRR.js → p-arZfxxPn.js} +1 -1
- package/dist/components/p-mmdt-WnS.js +1 -0
- package/dist/components/p-nOCYbyW4.js +1 -0
- package/dist/components/{p-MQTl8fGT.js → p-teN3CfOr.js} +1 -1
- package/dist/components/{p-ofkgu5aS.js → p-u8teDaMa.js} +1 -1
- package/dist/components/{p-BPsOJlCP.js → p-wCNRlKLa.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.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-key-value-table.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-popup.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/index.esm.js +1 -1
- package/dist/design-system/{p-b96c694c.entry.js → p-04fdb4b1.entry.js} +1 -1
- package/dist/design-system/p-05611ff7.entry.js +1 -0
- package/dist/design-system/p-0U6dRjlq.js +2 -0
- package/dist/design-system/{p-cd8e4dd6.entry.js → p-0fe603a4.entry.js} +1 -1
- package/dist/design-system/p-100f5887.entry.js +1 -0
- package/dist/design-system/p-18c5ae1a.entry.js +1 -0
- package/dist/design-system/p-1baa05ae.entry.js +1 -0
- package/dist/design-system/p-2a1ef965.entry.js +1 -0
- package/dist/design-system/p-2c63404f.entry.js +1 -0
- package/dist/design-system/{p-feeb0cc5.entry.js → p-435ae69e.entry.js} +1 -1
- package/dist/design-system/{p-cbda9194.entry.js → p-43e97572.entry.js} +1 -1
- package/dist/design-system/{p-e1c0a3c9.entry.js → p-44d05570.entry.js} +1 -1
- package/dist/design-system/{p-328fae12.entry.js → p-501fae20.entry.js} +1 -1
- package/dist/design-system/{p-b6ca4461.entry.js → p-5705e6d6.entry.js} +1 -1
- package/dist/design-system/p-5cbaf1db.entry.js +1 -0
- package/dist/design-system/p-5ed0becf.entry.js +1 -0
- package/dist/design-system/p-5f1c39b8.entry.js +1 -0
- package/dist/design-system/p-66af0ba0.entry.js +1 -0
- package/dist/design-system/{p-a942dfbe.entry.js → p-77690440.entry.js} +1 -1
- package/dist/design-system/p-78cc0289.entry.js +1 -0
- package/dist/design-system/{p-b04b22c6.entry.js → p-790165f8.entry.js} +1 -1
- package/dist/design-system/p-80466582.entry.js +1 -0
- package/dist/design-system/{p-c0f60b00.entry.js → p-857c44e8.entry.js} +1 -1
- package/dist/design-system/{p-4e2953eb.entry.js → p-87c868c3.entry.js} +1 -1
- package/dist/design-system/{p-f60cc7be.entry.js → p-8db7d8f2.entry.js} +1 -1
- package/dist/design-system/{p-18466728.entry.js → p-8ee990bd.entry.js} +1 -1
- package/dist/design-system/p-8f22106e.entry.js +1 -0
- package/dist/design-system/p-BnfUIhUj.js +1 -0
- package/dist/{components/p-CT3dfy3K.js → design-system/p-C29HUShl.js} +1 -1
- package/dist/design-system/p-a6545130.entry.js +1 -0
- package/dist/design-system/p-ae2d45a2.entry.js +1 -0
- package/dist/design-system/{p-f3cfff78.entry.js → p-aeccfb2b.entry.js} +1 -1
- package/dist/design-system/{p-20a50702.entry.js → p-b0aad445.entry.js} +1 -1
- package/dist/design-system/p-b3c144ff.entry.js +1 -0
- package/dist/design-system/{p-b1bb0d72.entry.js → p-caee95b0.entry.js} +1 -1
- package/dist/design-system/p-d30c823e.entry.js +1 -0
- package/dist/design-system/{p-f5576a0d.entry.js → p-d3212544.entry.js} +1 -1
- package/dist/design-system/p-d8c41313.entry.js +1 -0
- package/dist/design-system/{p-7882e388.entry.js → p-de8bb9ba.entry.js} +1 -1
- package/dist/design-system/{p-29ed11e5.entry.js → p-e2334c1c.entry.js} +1 -1
- package/dist/design-system/{p-d78fbe16.entry.js → p-f4d73a0c.entry.js} +1 -1
- package/dist/design-system/p-fc973500.entry.js +1 -0
- package/dist/design-system/p-fe0a5368.entry.js +1 -0
- package/dist/design-system/p-mmdt-WnS.js +1 -0
- package/dist/esm/{component.table-BQ6at17Y.js → component.table-BnfUIhUj.js} +11 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-CLCoul8o.js → index-0U6dRjlq.js} +1 -1
- package/dist/esm/index.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_2.entry.js +10 -9
- 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 +4 -4
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +1 -1
- package/dist/esm/sd-date-box.entry.js +8 -3
- package/dist/esm/sd-date-picker-calendar_2.entry.js +13 -8
- package/dist/esm/sd-date-picker_7.entry.js +22 -17
- package/dist/esm/sd-date-range-picker-calendar.entry.js +13 -13
- package/dist/esm/sd-dropdown-button.entry.js +7 -3
- package/dist/esm/sd-field_3.entry.js +31 -30
- package/dist/esm/sd-form.entry.js +5 -5
- package/dist/esm/sd-ghost-button.entry.js +4 -4
- package/dist/esm/sd-guide.entry.js +5 -5
- package/dist/esm/sd-key-value-table.entry.js +10 -10
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +1 -1
- package/dist/esm/sd-modal-container.entry.js +3 -3
- package/dist/esm/sd-pagination_4.entry.js +113 -40
- package/dist/esm/sd-popover.entry.js +6 -6
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-portal.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +7 -4
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +15 -11
- package/dist/esm/sd-select_3.entry.js +20 -15
- package/dist/esm/sd-switch.entry.js +1 -1
- package/dist/esm/{sd-table.config-0Te8GLCI.js → sd-table.config-B-VgXXT7.js} +13 -3
- package/dist/esm/sd-table.entry.js +170 -47
- package/dist/esm/sd-tabs.entry.js +8 -3
- package/dist/esm/sd-tag.entry.js +10 -10
- package/dist/esm/sd-td.entry.js +52 -10
- package/dist/esm/sd-text-link.entry.js +9 -4
- package/dist/esm/sd-toast-container.entry.js +2 -2
- package/dist/esm/sd-toast.entry.js +3 -3
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{tooltipArrow-Bc-yw2nt.js → tooltipArrow-O5LOsHae.js} +1 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +3 -2
- package/dist/types/components/sd-table/constants.d.ts +2 -0
- package/dist/types/components/sd-table/sd-table.config.d.ts +4 -0
- package/dist/types/components/sd-table/sd-table.d.ts +19 -15
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +6 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +7 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +1 -0
- package/dist/types/components.d.ts +41 -8
- package/hydrate/index.js +552 -244
- package/hydrate/index.mjs +552 -244
- package/package.json +1 -1
- package/dist/components/p-At6nBeyO.js +0 -1
- package/dist/components/p-B73VhbYi.js +0 -1
- package/dist/components/p-BDQQllAo.js +0 -1
- package/dist/components/p-BDr27lvk.js +0 -1
- package/dist/components/p-BQ6at17Y.js +0 -1
- package/dist/components/p-BW_sBt7X.js +0 -1
- package/dist/components/p-BX3TJuQY.js +0 -1
- package/dist/components/p-Bm_T3qE0.js +0 -1
- package/dist/components/p-BnzK4uU4.js +0 -1
- package/dist/components/p-BqkJ0rZv.js +0 -1
- package/dist/components/p-C4PmGpW8.js +0 -1
- package/dist/components/p-C9CszVFl.js +0 -1
- package/dist/components/p-CGQWERwE.js +0 -1
- package/dist/components/p-CZmKBmKx.js +0 -1
- package/dist/components/p-CnarDyZi.js +0 -1
- package/dist/components/p-Cr2ghUra.js +0 -1
- package/dist/components/p-Cspm6LxP.js +0 -1
- package/dist/components/p-Cx3jXw9J.js +0 -1
- package/dist/components/p-DG-4Ifco.js +0 -1
- package/dist/components/p-DfXAgw0E.js +0 -1
- package/dist/components/p-MMkRcTBd.js +0 -1
- package/dist/components/p-ZstG0XdT.js +0 -1
- package/dist/components/p-h7eBUL4i.js +0 -1
- package/dist/components/p-lyB7zSp-.js +0 -1
- package/dist/components/p-oIM6jNZe.js +0 -1
- package/dist/components/p-oKHZl8yu.js +0 -1
- package/dist/design-system/p-02289728.entry.js +0 -1
- package/dist/design-system/p-17d66d85.entry.js +0 -1
- package/dist/design-system/p-1bb86d69.entry.js +0 -1
- package/dist/design-system/p-21874054.entry.js +0 -1
- package/dist/design-system/p-282cbefa.entry.js +0 -1
- package/dist/design-system/p-35dce399.entry.js +0 -1
- package/dist/design-system/p-39ff56b4.entry.js +0 -1
- package/dist/design-system/p-3cb712a6.entry.js +0 -1
- package/dist/design-system/p-7610153d.entry.js +0 -1
- package/dist/design-system/p-7722ddeb.entry.js +0 -1
- package/dist/design-system/p-7bfa0cf9.entry.js +0 -1
- package/dist/design-system/p-824ecfb5.entry.js +0 -1
- package/dist/design-system/p-9a04b341.entry.js +0 -1
- package/dist/design-system/p-BQ6at17Y.js +0 -1
- package/dist/design-system/p-CGQWERwE.js +0 -1
- package/dist/design-system/p-CLCoul8o.js +0 -2
- package/dist/design-system/p-Dmf0PYdM.js +0 -1
- package/dist/design-system/p-a7a0ca14.entry.js +0 -1
- package/dist/design-system/p-baed13e4.entry.js +0 -1
- package/dist/design-system/p-bd45e65d.entry.js +0 -1
- package/dist/design-system/p-bf4156d8.entry.js +0 -1
- package/dist/design-system/p-c228c2c7.entry.js +0 -1
- package/dist/design-system/p-cf382479.entry.js +0 -1
- package/dist/design-system/p-d0de34fd.entry.js +0 -1
|
@@ -26,7 +26,7 @@ export class SdSelectTrigger {
|
|
|
26
26
|
this.triggerBlur.emit();
|
|
27
27
|
};
|
|
28
28
|
render() {
|
|
29
|
-
const hasValue =
|
|
29
|
+
const hasValue = this.displayText !== '';
|
|
30
30
|
const cssVars = {
|
|
31
31
|
'--trigger-padding-x': `${SELECT_LAYOUT.paddingX}px`,
|
|
32
32
|
'--trigger-gap': `${SELECT_LAYOUT.gap}px`,
|
|
@@ -42,13 +42,18 @@ export class SdSelectTrigger {
|
|
|
42
42
|
? SELECT_COLORS.icon.disabled
|
|
43
43
|
: SELECT_COLORS.icon.default,
|
|
44
44
|
};
|
|
45
|
-
return (h("div", { key: '
|
|
45
|
+
return (h("div", { key: '67cb0ffaf0197a3ad12c402810317801ce69d4a1', ref: el => {
|
|
46
46
|
this.triggerEl = el;
|
|
47
|
-
}, tabindex: this.disabled ? -1 : 0, class: {
|
|
47
|
+
}, role: "button", "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, class: {
|
|
48
48
|
'sd-select-trigger': true,
|
|
49
49
|
'sd-select-trigger--open': this.isOpen,
|
|
50
50
|
'sd-select-trigger--disabled': this.disabled,
|
|
51
|
-
}, style: cssVars, onClick: this.handleClick,
|
|
51
|
+
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
52
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
this.handleClick();
|
|
55
|
+
}
|
|
56
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '4c28c852054fd7b09e5c45c9eb13882540f66553', class: "sd-select-trigger__content" }, h("span", { key: 'df415c9ac8d00a58e5539c8c655f12ebd49208a4', class: "sd-select-trigger__text" }, hasValue ? this.displayText : (this.placeholder ?? '선택')), h("sd-icon", { key: '429008e1edaf778e8a85f945a681cd675f2489b7', name: "chevronDown", size: 12, color: "var(--trigger-icon-color)", class: {
|
|
52
57
|
'sd-select-trigger__icon': true,
|
|
53
58
|
'sd-select-trigger__icon--open': this.isOpen,
|
|
54
59
|
} }))));
|
|
@@ -110,7 +110,7 @@ export class SdSelect {
|
|
|
110
110
|
}
|
|
111
111
|
getSelectedOptions() {
|
|
112
112
|
const val = this.value;
|
|
113
|
-
if (
|
|
113
|
+
if (val == null || !Array.isArray(val))
|
|
114
114
|
return [];
|
|
115
115
|
if (this.emitValue) {
|
|
116
116
|
return val
|
|
@@ -254,15 +254,15 @@ export class SdSelect {
|
|
|
254
254
|
this.closeDropdown();
|
|
255
255
|
},
|
|
256
256
|
};
|
|
257
|
-
return (h("sd-field", { key: '
|
|
257
|
+
return (h("sd-field", { key: '668df27ea03b5c2479f89649c494375bacd762ec', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
|
|
258
258
|
this.hovered = true;
|
|
259
259
|
}, onMouseLeave: () => {
|
|
260
260
|
this.hovered = false;
|
|
261
|
-
} }, h("div", { key: '
|
|
261
|
+
} }, h("div", { key: '7d391d2c0719c165e9d19f5fdc34d39c374401e9', class: "sd-select", ref: el => {
|
|
262
262
|
this.triggerRef = el;
|
|
263
|
-
} }, h("sd-select-trigger", { key: '
|
|
263
|
+
} }, h("sd-select-trigger", { key: 'b09a0f9dcb0071b79a21c8184deb7d07ba54185f', ref: el => {
|
|
264
264
|
this.triggerComponentRef = el;
|
|
265
|
-
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '
|
|
265
|
+
}, displayText: this.displayText, placeholder: this.placeholder ?? '선택', disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '2ae67c5e98c66c2a74ba96f4602ea14d53dd0177', ...portalProps }, h("sd-select-listbox", { key: '97ee517fa777abd4926f8105fd046e39dfeeb5ff', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
|
|
266
266
|
}
|
|
267
267
|
static get is() { return "sd-select"; }
|
|
268
268
|
static get originalStyleUrls() {
|
|
@@ -45,6 +45,10 @@ export const TABLE_BORDER = {
|
|
|
45
45
|
color: tableTokens.table.border.color,
|
|
46
46
|
width: tableTokens.table.border.width,
|
|
47
47
|
};
|
|
48
|
+
export const TABLE_SEPARATOR = {
|
|
49
|
+
color: tableTokens.table.separator.color,
|
|
50
|
+
width: tableTokens.table.separator.Width,
|
|
51
|
+
};
|
|
48
52
|
export const TABLE_RADIUS = tableTokens.table.radius;
|
|
49
53
|
// ── Content Tokens ──
|
|
50
54
|
export const TABLE_CONTENT = {
|
|
@@ -57,7 +57,10 @@ sd-table *,
|
|
|
57
57
|
|
|
58
58
|
.sd-table__no-data {
|
|
59
59
|
position: absolute;
|
|
60
|
-
|
|
60
|
+
top: 36px;
|
|
61
|
+
left: 0;
|
|
62
|
+
right: 0;
|
|
63
|
+
bottom: 0;
|
|
61
64
|
display: flex;
|
|
62
65
|
align-items: center;
|
|
63
66
|
justify-content: center;
|
|
@@ -67,9 +70,25 @@ sd-table *,
|
|
|
67
70
|
z-index: 200;
|
|
68
71
|
background: rgba(255, 255, 255, 0.6);
|
|
69
72
|
}
|
|
70
|
-
|
|
71
|
-
.sd-table__no-data
|
|
73
|
+
|
|
74
|
+
.sd-table__no-data-header-overlay {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
right: 0;
|
|
79
|
+
height: 36px;
|
|
80
|
+
background: rgba(255, 255, 255, 0.6);
|
|
81
|
+
z-index: 210;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sd-table__no-data-content {
|
|
72
86
|
pointer-events: auto;
|
|
87
|
+
min-height: 60px;
|
|
88
|
+
width: 100%;
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
73
92
|
}
|
|
74
93
|
|
|
75
94
|
.sd-table__loading {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host, readTask, forceUpdate, } from "@stencil/core";
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
3
|
import { TABLE_ID_ATTR, } from "./constants";
|
|
4
|
-
import { TABLE_RADIUS, TABLE_BORDER, TABLE_BODY_TYPOGRAPHY } from "./sd-table.config";
|
|
4
|
+
import { TABLE_RADIUS, TABLE_BORDER, TABLE_BODY_TYPOGRAPHY, TABLE_BODY_LAYOUT } from "./sd-table.config";
|
|
5
5
|
export class SdTable {
|
|
6
6
|
static DEFAULT_NO_DATA_LABEL = '데이터가 없습니다.';
|
|
7
7
|
el;
|
|
@@ -24,9 +24,15 @@ export class SdTable {
|
|
|
24
24
|
pagination;
|
|
25
25
|
useInternalPagination = false;
|
|
26
26
|
useRowsPerPageSelect = false;
|
|
27
|
+
dense = false;
|
|
27
28
|
// ─── Virtual Scroll ───────────────────────────────────────────────
|
|
28
29
|
useVirtualScroll = false;
|
|
29
|
-
rowHeight
|
|
30
|
+
rowHeight;
|
|
31
|
+
get effectiveRowHeight() {
|
|
32
|
+
if (this.rowHeight != null)
|
|
33
|
+
return this.rowHeight;
|
|
34
|
+
return this.dense ? Number(TABLE_BODY_LAYOUT.dense.height) : Number(TABLE_BODY_LAYOUT.default.height);
|
|
35
|
+
}
|
|
30
36
|
virtualBuffer = 5;
|
|
31
37
|
virtualEndThreshold = 10;
|
|
32
38
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -49,6 +55,7 @@ export class SdTable {
|
|
|
49
55
|
scrolledRight = false;
|
|
50
56
|
rowCount = 0;
|
|
51
57
|
loadingScrollTop = 0;
|
|
58
|
+
noDataBodyHeight = 60;
|
|
52
59
|
// light DOM에 sd-thead / sd-tbody 자식이 없으면 sd-table이 직접 렌더해야 함을 알리는 플래그.
|
|
53
60
|
// componentWillLoad에서 한 번 결정되며, 이후 동적 토글은 지원하지 않는다.
|
|
54
61
|
autoThead = false;
|
|
@@ -57,12 +64,19 @@ export class SdTable {
|
|
|
57
64
|
vsEnd = 0;
|
|
58
65
|
lastReachEndNotifiedRowCount = -1;
|
|
59
66
|
scrollContainer = null;
|
|
67
|
+
noDataContentEl = null;
|
|
68
|
+
noDataContentResizeObserver;
|
|
60
69
|
onScroll;
|
|
61
70
|
// 키: `${rowKey}::${field}` → { rowspan, colspan }
|
|
62
71
|
spanRegistry = new Map();
|
|
72
|
+
// rowKey → Set<field>: useFrame=true인 sd-td가 있는 행을 추적한다.
|
|
73
|
+
// 하나라도 등록되면 해당 행은 dense를 무시하고 default 레이아웃으로 렌더된다.
|
|
74
|
+
useFrameRegistry = new Map();
|
|
63
75
|
// 키: `${rowKey}::${field}` → sd-td의 sdClass 문자열
|
|
64
76
|
// sd-tr가 td를 그릴 때 머지해서 셀-단위 커스텀 클래스를 적용한다.
|
|
65
77
|
cellClassRegistry = new Map();
|
|
78
|
+
// separator 직전 행의 시각적 인덱스 집합
|
|
79
|
+
separatorPrevIndices = new Set();
|
|
66
80
|
// rowKey 문자열 → rows 배열에서의 visual index.
|
|
67
81
|
// rowspan 위쪽 행 스캔에서 "내 위에 있느냐"를 판정하기 위한 시각적 순서 소스.
|
|
68
82
|
// rows prop이 있으면 채워지고, 없으면 비어 있어 Number(rowKey) fallback이 사용된다.
|
|
@@ -121,6 +135,7 @@ export class SdTable {
|
|
|
121
135
|
if (newVal) {
|
|
122
136
|
this.loadingScrollTop = this.scrollContainer?.scrollTop ?? 0;
|
|
123
137
|
}
|
|
138
|
+
this.syncNoDataContentObserver();
|
|
124
139
|
}
|
|
125
140
|
handleUseVirtualScrollChange(newVal) {
|
|
126
141
|
if (newVal) {
|
|
@@ -129,7 +144,7 @@ export class SdTable {
|
|
|
129
144
|
}
|
|
130
145
|
}
|
|
131
146
|
handleColumnsChange(newCols) {
|
|
132
|
-
this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
|
|
147
|
+
this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
|
|
133
148
|
this.refreshChildrenConfig();
|
|
134
149
|
}
|
|
135
150
|
handleRowsChange(newRows) {
|
|
@@ -140,6 +155,7 @@ export class SdTable {
|
|
|
140
155
|
if (this.useVirtualScroll)
|
|
141
156
|
this.propagateVirtualUpdate(true);
|
|
142
157
|
this.pushRowsToChildren(newRows);
|
|
158
|
+
this.syncNoDataContentObserver();
|
|
143
159
|
}
|
|
144
160
|
handleRowKeyChange() {
|
|
145
161
|
this.rebuildRowIndexMap();
|
|
@@ -165,10 +181,10 @@ export class SdTable {
|
|
|
165
181
|
this.innerSelected = new Set(newSelected);
|
|
166
182
|
}
|
|
167
183
|
handlePaginationChange(newVal) {
|
|
168
|
-
if (newVal?.page && newVal.page !== this.currentPage) {
|
|
184
|
+
if (newVal?.page != null && newVal.page !== this.currentPage) {
|
|
169
185
|
this.currentPage = newVal.page;
|
|
170
186
|
}
|
|
171
|
-
if (newVal?.rowsPerPage && newVal.rowsPerPage !== this.innerRowsPerPage) {
|
|
187
|
+
if (newVal?.rowsPerPage != null && newVal.rowsPerPage !== this.innerRowsPerPage) {
|
|
172
188
|
this.innerRowsPerPage = newVal.rowsPerPage;
|
|
173
189
|
}
|
|
174
190
|
}
|
|
@@ -183,12 +199,12 @@ export class SdTable {
|
|
|
183
199
|
this.handleNoDataLabelChange(this.noDataLabel);
|
|
184
200
|
this.detectChildren();
|
|
185
201
|
this.innerSelected = new Set(this.selected || []);
|
|
186
|
-
this.columnWidths = (this.columns || []).map(c => parseInt(c.width || '120', 10));
|
|
202
|
+
this.columnWidths = (this.columns || []).map(c => c.autoWidth ? 0 : parseInt(c.width || '120', 10));
|
|
187
203
|
this.rebuildRowIndexMap();
|
|
188
|
-
if (this.pagination?.page) {
|
|
204
|
+
if (this.pagination?.page != null) {
|
|
189
205
|
this.currentPage = this.pagination.page;
|
|
190
206
|
}
|
|
191
|
-
if (this.pagination?.rowsPerPage) {
|
|
207
|
+
if (this.pagination?.rowsPerPage != null) {
|
|
192
208
|
this.innerRowsPerPage = this.pagination.rowsPerPage;
|
|
193
209
|
}
|
|
194
210
|
const el = this.el;
|
|
@@ -210,10 +226,16 @@ export class SdTable {
|
|
|
210
226
|
el.getSpanSync = this.getSpanSync.bind(this);
|
|
211
227
|
el.isCoveredSync = this.isCoveredSync.bind(this);
|
|
212
228
|
el.isVisualLastRowSync = this.isVisualLastRowSync.bind(this);
|
|
229
|
+
el.registerSeparatorSync = this.registerSeparatorSync.bind(this);
|
|
230
|
+
el.unregisterSeparatorSync = this.unregisterSeparatorSync.bind(this);
|
|
231
|
+
el.isVisualLastRowBeforeSeparatorSync = this.isVisualLastRowBeforeSeparatorSync.bind(this);
|
|
213
232
|
el.hasRowspanSync = this.hasRowspanSync.bind(this);
|
|
214
233
|
el.registerCellClassSync = this.registerCellClassSync.bind(this);
|
|
215
234
|
el.unregisterCellClassSync = this.unregisterCellClassSync.bind(this);
|
|
216
235
|
el.getCellClassSync = this.getCellClassSync.bind(this);
|
|
236
|
+
el.registerUseFrameSync = this.registerUseFrameSync.bind(this);
|
|
237
|
+
el.unregisterUseFrameSync = this.unregisterUseFrameSync.bind(this);
|
|
238
|
+
el.hasUseFrameInRowSync = this.hasUseFrameInRowSync.bind(this);
|
|
217
239
|
if (Array.isArray(this.rows)) {
|
|
218
240
|
this.rowCount = this.rows.length;
|
|
219
241
|
this.pushRowsToChildren(this.rows);
|
|
@@ -256,11 +278,43 @@ export class SdTable {
|
|
|
256
278
|
this.propagateVirtualUpdate(); // 초기 렌더
|
|
257
279
|
}
|
|
258
280
|
});
|
|
281
|
+
this.syncNoDataContentObserver();
|
|
259
282
|
}
|
|
260
283
|
disconnectedCallback() {
|
|
261
284
|
if (this.scrollContainer && this.onScroll) {
|
|
262
285
|
this.scrollContainer.removeEventListener('scroll', this.onScroll);
|
|
263
286
|
}
|
|
287
|
+
this.noDataContentResizeObserver?.disconnect();
|
|
288
|
+
this.noDataContentResizeObserver = undefined;
|
|
289
|
+
}
|
|
290
|
+
syncNoDataContentObserver() {
|
|
291
|
+
const isNoData = this.rowCount === 0 && !this.isLoading;
|
|
292
|
+
if (!isNoData) {
|
|
293
|
+
this.noDataContentResizeObserver?.disconnect();
|
|
294
|
+
this.noDataContentResizeObserver = undefined;
|
|
295
|
+
this.noDataBodyHeight = 60;
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
this.observeNoDataContentHeight();
|
|
299
|
+
}
|
|
300
|
+
// observer를 붙이고 콘텐츠 높이를 측정해 noDataBodyHeight를 갱신하는 함수
|
|
301
|
+
observeNoDataContentHeight() {
|
|
302
|
+
if (typeof ResizeObserver === 'undefined')
|
|
303
|
+
return;
|
|
304
|
+
const target = this.noDataContentEl;
|
|
305
|
+
if (!target)
|
|
306
|
+
return;
|
|
307
|
+
this.noDataContentResizeObserver?.disconnect();
|
|
308
|
+
this.noDataContentResizeObserver = new ResizeObserver(() => {
|
|
309
|
+
const measured = Math.ceil(target.scrollHeight);
|
|
310
|
+
const nextHeight = Math.max(60, measured);
|
|
311
|
+
if (nextHeight !== this.noDataBodyHeight) {
|
|
312
|
+
this.noDataBodyHeight = nextHeight;
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
this.noDataContentResizeObserver.observe(target);
|
|
316
|
+
const measured = Math.ceil(target.scrollHeight);
|
|
317
|
+
this.noDataBodyHeight = Math.max(60, measured);
|
|
264
318
|
}
|
|
265
319
|
// light DOM(manual mode 자식)과 shadow DOM(autoThead/autoTbody fallback) 양쪽 모두에서 자식을 찾는다.
|
|
266
320
|
queryChildEl(selector) {
|
|
@@ -325,8 +379,8 @@ export class SdTable {
|
|
|
325
379
|
return;
|
|
326
380
|
this.vsStart = start;
|
|
327
381
|
this.vsEnd = end;
|
|
328
|
-
const topHeight = start * this.
|
|
329
|
-
const bottomHeight = Math.max(0, (this.rowCount - end) * this.
|
|
382
|
+
const topHeight = start * this.effectiveRowHeight;
|
|
383
|
+
const bottomHeight = Math.max(0, (this.rowCount - end) * this.effectiveRowHeight);
|
|
330
384
|
const tbody = this.queryChildEl('sd-tbody');
|
|
331
385
|
tbody?.setSpacersSync?.(topHeight, bottomHeight);
|
|
332
386
|
if (rangeChanged) {
|
|
@@ -340,7 +394,7 @@ export class SdTable {
|
|
|
340
394
|
getVirtualScrollConfigSync() {
|
|
341
395
|
return {
|
|
342
396
|
useVirtualScroll: this.useVirtualScroll,
|
|
343
|
-
rowHeight: this.
|
|
397
|
+
rowHeight: this.effectiveRowHeight,
|
|
344
398
|
virtualBuffer: this.virtualBuffer,
|
|
345
399
|
vsStart: this.vsStart,
|
|
346
400
|
vsEnd: this.vsEnd,
|
|
@@ -357,10 +411,35 @@ export class SdTable {
|
|
|
357
411
|
scrolledLeft: this.scrolledLeft,
|
|
358
412
|
scrolledRight: this.scrolledRight,
|
|
359
413
|
columnWidths: this.columnWidths,
|
|
414
|
+
dense: this.dense,
|
|
360
415
|
};
|
|
361
416
|
}
|
|
417
|
+
registerUseFrameSync(rowKey, field) {
|
|
418
|
+
if (rowKey == null || field === '')
|
|
419
|
+
return;
|
|
420
|
+
let fields = this.useFrameRegistry.get(rowKey);
|
|
421
|
+
if (!fields) {
|
|
422
|
+
fields = new Set();
|
|
423
|
+
this.useFrameRegistry.set(rowKey, fields);
|
|
424
|
+
}
|
|
425
|
+
fields.add(field);
|
|
426
|
+
}
|
|
427
|
+
unregisterUseFrameSync(rowKey, field) {
|
|
428
|
+
if (rowKey == null || field === '')
|
|
429
|
+
return;
|
|
430
|
+
const fields = this.useFrameRegistry.get(rowKey);
|
|
431
|
+
if (!fields)
|
|
432
|
+
return;
|
|
433
|
+
fields.delete(field);
|
|
434
|
+
if (fields.size === 0)
|
|
435
|
+
this.useFrameRegistry.delete(rowKey);
|
|
436
|
+
}
|
|
437
|
+
hasUseFrameInRowSync(rowKey) {
|
|
438
|
+
const fields = this.useFrameRegistry.get(rowKey);
|
|
439
|
+
return fields != null && fields.size > 0;
|
|
440
|
+
}
|
|
362
441
|
isRowSelectedSync(row) {
|
|
363
|
-
return Array.from(this.innerSelected).some(r => r[
|
|
442
|
+
return Array.from(this.innerSelected).some(r => r[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id']);
|
|
364
443
|
}
|
|
365
444
|
async isRowSelected(row) {
|
|
366
445
|
return this.isRowSelectedSync(row);
|
|
@@ -369,7 +448,7 @@ export class SdTable {
|
|
|
369
448
|
const selectedArray = Array.from(this.innerSelected);
|
|
370
449
|
const exists = this.isRowSelectedSync(row);
|
|
371
450
|
const newSelected = exists
|
|
372
|
-
? selectedArray.filter(r => r[
|
|
451
|
+
? selectedArray.filter(r => r[this.rowKey ?? 'id'] !== row[this.rowKey ?? 'id'])
|
|
373
452
|
: [...selectedArray, row];
|
|
374
453
|
if (newSelected.length === selectedArray.length)
|
|
375
454
|
return;
|
|
@@ -387,8 +466,8 @@ export class SdTable {
|
|
|
387
466
|
this.innerSelected = new Set([...this.innerSelected, ...pageRows]);
|
|
388
467
|
}
|
|
389
468
|
else {
|
|
390
|
-
const currentPageKeys = rows.map(r => r[
|
|
391
|
-
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[
|
|
469
|
+
const currentPageKeys = rows.map(r => r[this.rowKey ?? 'id']);
|
|
470
|
+
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey ?? 'id'])));
|
|
392
471
|
}
|
|
393
472
|
this.selected = Array.from(this.innerSelected);
|
|
394
473
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
@@ -399,7 +478,7 @@ export class SdTable {
|
|
|
399
478
|
}
|
|
400
479
|
getIsAllCheckedSync(rows) {
|
|
401
480
|
const total = rows.length;
|
|
402
|
-
const selectedCount = rows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[
|
|
481
|
+
const selectedCount = rows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id'])).length;
|
|
403
482
|
if (selectedCount === 0)
|
|
404
483
|
return false;
|
|
405
484
|
if (selectedCount === total)
|
|
@@ -422,7 +501,7 @@ export class SdTable {
|
|
|
422
501
|
this.queryAllTr().forEach(tr => tr?.updateVisibility?.());
|
|
423
502
|
}
|
|
424
503
|
changeRowsPerPage(perPage) {
|
|
425
|
-
const changedRowsPerPage = perPage ? Number(perPage) : 0;
|
|
504
|
+
const changedRowsPerPage = perPage != null && perPage !== '' ? Number(perPage) : 0;
|
|
426
505
|
if (!this.useInternalPagination) {
|
|
427
506
|
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
428
507
|
return;
|
|
@@ -449,7 +528,7 @@ export class SdTable {
|
|
|
449
528
|
const startWidth = this.columnWidths[index];
|
|
450
529
|
const handleMouseMove = (moveEvent) => {
|
|
451
530
|
const col = this.columns[index];
|
|
452
|
-
if (
|
|
531
|
+
if (col == null)
|
|
453
532
|
return;
|
|
454
533
|
const minWidth = col.minWidth || 50;
|
|
455
534
|
const maxWidth = col.maxWidth || 9999;
|
|
@@ -484,13 +563,17 @@ export class SdTable {
|
|
|
484
563
|
this.columns.filter(c => c.visible !== false).length -
|
|
485
564
|
(this.stickyColumn?.right || 0) && i > colIdx)
|
|
486
565
|
.reduce((a, b) => a + b, 0);
|
|
487
|
-
|
|
566
|
+
const visibleCol = this.columns.filter(c => c.visible !== false)[colIdx];
|
|
567
|
+
const base = {
|
|
488
568
|
'--sticky-left-offset': `${leftOffset}px`,
|
|
489
569
|
'--sticky-right-offset': `${rightOffset}px`,
|
|
490
|
-
'width': `${this.columnWidths[colIdx]}px`,
|
|
491
|
-
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
492
|
-
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
493
570
|
};
|
|
571
|
+
if (!visibleCol?.autoWidth) {
|
|
572
|
+
base['width'] = `${this.columnWidths[colIdx]}px`;
|
|
573
|
+
base['minWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
574
|
+
base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
|
|
575
|
+
}
|
|
576
|
+
return base;
|
|
494
577
|
}
|
|
495
578
|
async getStickyStyle(colIdx) {
|
|
496
579
|
return this.getStickyStyleSync(colIdx);
|
|
@@ -519,7 +602,7 @@ export class SdTable {
|
|
|
519
602
|
});
|
|
520
603
|
}
|
|
521
604
|
registerSpanSync(rowKey, field, rowspan, colspan) {
|
|
522
|
-
if (rowKey == null ||
|
|
605
|
+
if (rowKey == null || field === '')
|
|
523
606
|
return;
|
|
524
607
|
const safeRowspan = Math.max(1, Math.floor(rowspan || 1));
|
|
525
608
|
const safeColspan = Math.max(1, Math.floor(colspan || 1));
|
|
@@ -538,7 +621,7 @@ export class SdTable {
|
|
|
538
621
|
this.requestAllTrUpdate();
|
|
539
622
|
}
|
|
540
623
|
unregisterSpanSync(rowKey, field) {
|
|
541
|
-
if (rowKey == null ||
|
|
624
|
+
if (rowKey == null || field === '')
|
|
542
625
|
return;
|
|
543
626
|
const key = this.spanKey(rowKey, field);
|
|
544
627
|
if (!this.spanRegistry.has(key))
|
|
@@ -553,18 +636,18 @@ export class SdTable {
|
|
|
553
636
|
// span과 달리 다른 셀에 영향이 없으므로 형제 sd-tr 전체를 재렌더하지 않고,
|
|
554
637
|
// sd-td 쪽에서 자기 부모 tr만 bumpSpansVersion으로 새로 그린다.
|
|
555
638
|
registerCellClassSync(rowKey, field, cls) {
|
|
556
|
-
if (rowKey == null ||
|
|
639
|
+
if (rowKey == null || field === '')
|
|
557
640
|
return;
|
|
558
641
|
const key = this.spanKey(rowKey, field);
|
|
559
642
|
const safe = (cls ?? '').trim();
|
|
560
|
-
if (
|
|
643
|
+
if (safe === '') {
|
|
561
644
|
this.cellClassRegistry.delete(key);
|
|
562
645
|
return;
|
|
563
646
|
}
|
|
564
647
|
this.cellClassRegistry.set(key, safe);
|
|
565
648
|
}
|
|
566
649
|
unregisterCellClassSync(rowKey, field) {
|
|
567
|
-
if (rowKey == null ||
|
|
650
|
+
if (rowKey == null || field === '')
|
|
568
651
|
return;
|
|
569
652
|
this.cellClassRegistry.delete(this.spanKey(rowKey, field));
|
|
570
653
|
}
|
|
@@ -587,7 +670,7 @@ export class SdTable {
|
|
|
587
670
|
// 1. 같은 행 왼쪽 스캔 — colspan으로 이 위치를 덮는 셀이 있는가
|
|
588
671
|
for (let i = 0; i < colIdx; i++) {
|
|
589
672
|
const c = visibleCols[i];
|
|
590
|
-
if (
|
|
673
|
+
if (c == null)
|
|
591
674
|
continue;
|
|
592
675
|
const field = typeof c.field === 'string' ? c.field : c.name;
|
|
593
676
|
const span = this.spanRegistry.get(this.spanKey(rowKey, field));
|
|
@@ -625,23 +708,50 @@ export class SdTable {
|
|
|
625
708
|
}
|
|
626
709
|
return false;
|
|
627
710
|
}
|
|
628
|
-
//
|
|
629
|
-
//
|
|
630
|
-
|
|
631
|
-
if (this.rowCount <= 0)
|
|
632
|
-
return false;
|
|
711
|
+
// rowspan을 반영한 셀의 시각적 하단 행 인덱스를 반환한다.
|
|
712
|
+
// isVisualLastRowSync·isVisualLastRowBeforeSeparatorSync 공통 헬퍼.
|
|
713
|
+
resolveVisualBottom(rowKey, field) {
|
|
633
714
|
const myRowIdx = this.resolveRowIndex(rowKey);
|
|
634
715
|
if (myRowIdx == null)
|
|
635
|
-
return
|
|
716
|
+
return null;
|
|
636
717
|
const span = this.spanRegistry.get(this.spanKey(rowKey, field));
|
|
637
718
|
const rs = Math.max(1, span?.rowspan ?? 1);
|
|
638
|
-
|
|
719
|
+
return myRowIdx + rs - 1;
|
|
720
|
+
}
|
|
721
|
+
// 셀의 시각적 하단이 테이블(또는 현재 페이지)의 마지막 행인지 판정.
|
|
722
|
+
// 마지막 행에 border-bottom: none을 적용하기 위함.
|
|
723
|
+
isVisualLastRowSync(rowKey, field) {
|
|
724
|
+
if (this.rowCount <= 0)
|
|
725
|
+
return false;
|
|
726
|
+
const visualBottom = this.resolveVisualBottom(rowKey, field);
|
|
727
|
+
if (visualBottom == null)
|
|
728
|
+
return false;
|
|
639
729
|
const pageInfo = this.getPaginationInfoSync();
|
|
640
730
|
const lastVisibleIdx = pageInfo
|
|
641
731
|
? Math.min(pageInfo.endIndex - 1, this.rowCount - 1)
|
|
642
732
|
: this.rowCount - 1;
|
|
643
733
|
return visualBottom === lastVisibleIdx;
|
|
644
734
|
}
|
|
735
|
+
registerSeparatorSync(prevRowKey) {
|
|
736
|
+
const idx = this.resolveRowIndex(prevRowKey);
|
|
737
|
+
if (idx != null)
|
|
738
|
+
this.separatorPrevIndices.add(idx);
|
|
739
|
+
}
|
|
740
|
+
unregisterSeparatorSync(prevRowKey) {
|
|
741
|
+
const idx = this.resolveRowIndex(prevRowKey);
|
|
742
|
+
if (idx != null)
|
|
743
|
+
this.separatorPrevIndices.delete(idx);
|
|
744
|
+
}
|
|
745
|
+
// 셀의 시각적 하단이 separator 바로 앞 행인지 판정.
|
|
746
|
+
// 해당 셀에 border-bottom: none을 적용하기 위함.
|
|
747
|
+
isVisualLastRowBeforeSeparatorSync(rowKey, field) {
|
|
748
|
+
if (this.separatorPrevIndices.size === 0)
|
|
749
|
+
return false;
|
|
750
|
+
const visualBottom = this.resolveVisualBottom(rowKey, field);
|
|
751
|
+
if (visualBottom == null)
|
|
752
|
+
return false;
|
|
753
|
+
return this.separatorPrevIndices.has(visualBottom);
|
|
754
|
+
}
|
|
645
755
|
setRowCountSync(count) {
|
|
646
756
|
const safeCount = Math.max(0, Math.floor(this.toFiniteNumber(count, 0)));
|
|
647
757
|
if (safeCount !== this.rowCount) {
|
|
@@ -656,7 +766,7 @@ export class SdTable {
|
|
|
656
766
|
this.setRowCountSync(count);
|
|
657
767
|
}
|
|
658
768
|
calculateVisibleRange(scrollTop, containerHeight) {
|
|
659
|
-
const safeRowHeight = Math.max(1, this.toFiniteNumber(this.
|
|
769
|
+
const safeRowHeight = Math.max(1, this.toFiniteNumber(this.effectiveRowHeight, 40));
|
|
660
770
|
const safeBuffer = Math.max(0, Math.floor(this.toFiniteNumber(this.virtualBuffer, 5)));
|
|
661
771
|
const safeScrollTop = Math.max(0, this.toFiniteNumber(scrollTop, 0));
|
|
662
772
|
const safeContainerHeight = Math.max(0, this.toFiniteNumber(containerHeight, 0));
|
|
@@ -722,6 +832,12 @@ export class SdTable {
|
|
|
722
832
|
}
|
|
723
833
|
render() {
|
|
724
834
|
const resolvedTableId = this.getResolvedTableId();
|
|
835
|
+
const isNoData = this.rowCount === 0 && !this.isLoading;
|
|
836
|
+
const paginationHeight = this.pagination && this.rowCount > 0 && !this.useVirtualScroll ? 48 : 0;
|
|
837
|
+
const noDataTotalHeight = 36 + this.noDataBodyHeight;
|
|
838
|
+
const effectiveTableHeight = isNoData
|
|
839
|
+
? `max(${this.height || '96px'}, ${noDataTotalHeight}px)`
|
|
840
|
+
: this.height || '100%';
|
|
725
841
|
const hostStyle = {
|
|
726
842
|
'--table-radius': `${TABLE_RADIUS}px`,
|
|
727
843
|
'--table-border-color': TABLE_BORDER.color,
|
|
@@ -732,21 +848,25 @@ export class SdTable {
|
|
|
732
848
|
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
733
849
|
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
734
850
|
};
|
|
735
|
-
return (h(Host, { key: '
|
|
851
|
+
return (h(Host, { key: 'f7d92943fcb354f69d99c1e4fd37749cc06185c7', style: hostStyle }, h("div", { key: '53d6ac0eedc2c2a56c05bf5a751be43bc18f9fe7', class: "sd-table__container", style: {
|
|
736
852
|
'--table-width': this.width,
|
|
737
|
-
'--table-height':
|
|
738
|
-
'--table-container-height': `calc(${
|
|
739
|
-
} }, h("div", { key: '
|
|
853
|
+
'--table-height': effectiveTableHeight,
|
|
854
|
+
'--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
|
|
855
|
+
} }, h("div", { key: 'b85980b8307b2a50ee1554262d025b58bad42e87', class: {
|
|
740
856
|
'sd-table__wrapper': true,
|
|
741
857
|
'sd-table__wrapper--radius-use-top': this.radius === 'useTop',
|
|
742
|
-
} }, h("div", { key: '
|
|
858
|
+
} }, h("div", { key: 'acf9816ceaaea06b807056606d684befebe9dcd0', class: {
|
|
743
859
|
'sd-table__scroll-container': true,
|
|
744
860
|
'sd-table__scroll-container--loading': this.isLoading,
|
|
745
|
-
'sd-table__scroll-container--no-data':
|
|
746
|
-
} }, this.isLoading && (h("div", { key: '
|
|
861
|
+
'sd-table__scroll-container--no-data': isNoData,
|
|
862
|
+
} }, this.isLoading && (h("div", { key: '8a1a18cbf500a8e9ad519438a59e084186d9f339', class: "sd-table__loading", style: { top: `${this.loadingScrollTop}px` } }, h("sd-circle-progress", { key: '443ffcfb06edbae8ac94be7e8e5a94c1e2b68588', indeterminate: true }))), isNoData && (h(h.Fragment, null, h("div", { key: '3aefe27935a816df9658ec89adf261d11c0e8e77', class: "sd-table__no-data-header-overlay" }), h("div", { key: 'db89a7d1cbbf041bdd30be9e0a205147073891e2', class: "sd-table__no-data" }, h("div", { key: 'a9bf47e80db21c30ffa651b03b203e5e205134c9', class: "sd-table__no-data-content", ref: el => {
|
|
863
|
+
this.noDataContentEl = el;
|
|
864
|
+
if (el)
|
|
865
|
+
this.syncNoDataContentObserver();
|
|
866
|
+
} }, h("slot", { key: '20f0c0b43534ef344864bf2450abb4c2a8fb704b', name: "no-data" }, h("span", { key: 'a19688e4da7961e7c828694124819c4e60a6700f' }, this.resolvedNoDataLabel)))))), h("table", { key: '2b03aa5c5d59e0ac85051f90a022b59b8dbb871a', 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 &&
|
|
747
867
|
this.pagination.rowsPerPage > 0 &&
|
|
748
868
|
this.rowCount > 0 &&
|
|
749
|
-
!this.useVirtualScroll && (h("div", { key: '
|
|
869
|
+
!this.useVirtualScroll && (h("div", { key: 'dc4a0132898490ef7e87e26a75fca8e3b2056a49', class: "sd-table__pagination" }, h("sd-pagination", { key: '9030b0965e8d2c1a54fce07cfc4067f49edb2375', 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: '0d95ba3138da081d6c15202748ff3db1e23def01', value: this.useInternalPagination
|
|
750
870
|
? this.innerRowsPerPage
|
|
751
871
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
752
872
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -1129,6 +1249,26 @@ export class SdTable {
|
|
|
1129
1249
|
"attribute": "use-rows-per-page-select",
|
|
1130
1250
|
"defaultValue": "false"
|
|
1131
1251
|
},
|
|
1252
|
+
"dense": {
|
|
1253
|
+
"type": "boolean",
|
|
1254
|
+
"mutable": false,
|
|
1255
|
+
"complexType": {
|
|
1256
|
+
"original": "boolean",
|
|
1257
|
+
"resolved": "boolean",
|
|
1258
|
+
"references": {}
|
|
1259
|
+
},
|
|
1260
|
+
"required": false,
|
|
1261
|
+
"optional": false,
|
|
1262
|
+
"docs": {
|
|
1263
|
+
"tags": [],
|
|
1264
|
+
"text": ""
|
|
1265
|
+
},
|
|
1266
|
+
"getter": false,
|
|
1267
|
+
"setter": false,
|
|
1268
|
+
"reflect": false,
|
|
1269
|
+
"attribute": "dense",
|
|
1270
|
+
"defaultValue": "false"
|
|
1271
|
+
},
|
|
1132
1272
|
"useVirtualScroll": {
|
|
1133
1273
|
"type": "boolean",
|
|
1134
1274
|
"mutable": false,
|
|
@@ -1154,11 +1294,11 @@ export class SdTable {
|
|
|
1154
1294
|
"mutable": false,
|
|
1155
1295
|
"complexType": {
|
|
1156
1296
|
"original": "number",
|
|
1157
|
-
"resolved": "number",
|
|
1297
|
+
"resolved": "number | undefined",
|
|
1158
1298
|
"references": {}
|
|
1159
1299
|
},
|
|
1160
1300
|
"required": false,
|
|
1161
|
-
"optional":
|
|
1301
|
+
"optional": true,
|
|
1162
1302
|
"docs": {
|
|
1163
1303
|
"tags": [],
|
|
1164
1304
|
"text": ""
|
|
@@ -1166,8 +1306,7 @@ export class SdTable {
|
|
|
1166
1306
|
"getter": false,
|
|
1167
1307
|
"setter": false,
|
|
1168
1308
|
"reflect": false,
|
|
1169
|
-
"attribute": "row-height"
|
|
1170
|
-
"defaultValue": "40"
|
|
1309
|
+
"attribute": "row-height"
|
|
1171
1310
|
},
|
|
1172
1311
|
"virtualBuffer": {
|
|
1173
1312
|
"type": "number",
|
|
@@ -1247,6 +1386,7 @@ export class SdTable {
|
|
|
1247
1386
|
"scrolledRight": {},
|
|
1248
1387
|
"rowCount": {},
|
|
1249
1388
|
"loadingScrollTop": {},
|
|
1389
|
+
"noDataBodyHeight": {},
|
|
1250
1390
|
"autoThead": {},
|
|
1251
1391
|
"autoTbody": {}
|
|
1252
1392
|
};
|
|
@@ -1452,7 +1592,7 @@ export class SdTable {
|
|
|
1452
1592
|
},
|
|
1453
1593
|
"getStickyStyle": {
|
|
1454
1594
|
"complexType": {
|
|
1455
|
-
"signature": "(colIdx: number) => Promise<
|
|
1595
|
+
"signature": "(colIdx: number) => Promise<Record<string, string>>",
|
|
1456
1596
|
"parameters": [{
|
|
1457
1597
|
"name": "colIdx",
|
|
1458
1598
|
"type": "number",
|
|
@@ -1462,9 +1602,13 @@ export class SdTable {
|
|
|
1462
1602
|
"Promise": {
|
|
1463
1603
|
"location": "global",
|
|
1464
1604
|
"id": "global::Promise"
|
|
1605
|
+
},
|
|
1606
|
+
"Record": {
|
|
1607
|
+
"location": "global",
|
|
1608
|
+
"id": "global::Record"
|
|
1465
1609
|
}
|
|
1466
1610
|
},
|
|
1467
|
-
"return": "Promise<
|
|
1611
|
+
"return": "Promise<Record<string, string>>"
|
|
1468
1612
|
},
|
|
1469
1613
|
"docs": {
|
|
1470
1614
|
"text": "",
|
|
@@ -1546,6 +1690,9 @@ export class SdTable {
|
|
|
1546
1690
|
}, {
|
|
1547
1691
|
"propName": "stickyHeader",
|
|
1548
1692
|
"methodName": "handleConfigChange"
|
|
1693
|
+
}, {
|
|
1694
|
+
"propName": "dense",
|
|
1695
|
+
"methodName": "handleConfigChange"
|
|
1549
1696
|
}, {
|
|
1550
1697
|
"propName": "selected",
|
|
1551
1698
|
"methodName": "handleSelectedChange"
|