@sellmate/design-system 1.0.78 → 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-CMqGfEui.js +66 -0
- package/dist/cjs/design-system.cjs.js +2 -2
- package/dist/cjs/{index--F2wGuAi.js → index-Cw-78mnC.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resolveColor-LhfOKtTZ.js → resolveColor-B0hzQNLG.js} +2 -2
- package/dist/cjs/sd-action-modal.cjs.entry.js +3 -3
- package/dist/cjs/sd-badge.cjs.entry.js +2 -3
- package/dist/cjs/sd-barcode-input.cjs.entry.js +3 -3
- package/dist/cjs/{sd-button-v2.config-CnqCQQMi.js → sd-button.config-DH08UNfl.js} +114 -28
- package/dist/cjs/{sd-button-v2_2.cjs.entry.js → sd-button_2.cjs.entry.js} +102 -85
- package/dist/cjs/sd-calendar.cjs.entry.js +15 -15
- package/dist/cjs/sd-card.cjs.entry.js +2 -2
- package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/sd-chip.cjs.entry.js +4 -4
- package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +19 -11
- package/dist/cjs/sd-date-box.cjs.entry.js +9 -4
- package/dist/cjs/{sd-date-picker-calendar.cjs.entry.js → sd-date-picker-calendar_2.cjs.entry.js} +59 -6
- package/dist/cjs/{sd-date-picker.config-CRgCT5dn.js → sd-date-picker.config-CjvrFpYK.js} +1 -2
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1235 -0
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +14 -14
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +32 -27
- package/dist/cjs/{sd-button_4.cjs.entry.js → sd-field_3.cjs.entry.js} +47 -102
- package/dist/cjs/sd-form.cjs.entry.js +5 -5
- package/dist/cjs/sd-ghost-button.cjs.entry.js +12 -10
- package/dist/cjs/sd-guide.cjs.entry.js +11 -11
- package/dist/cjs/sd-key-value-table.cjs.entry.js +230 -0
- package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
- package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
- package/dist/cjs/sd-modal-container.cjs.entry.js +3 -3
- package/dist/cjs/{sd-pagination_5.cjs.entry.js → sd-pagination_4.cjs.entry.js} +136 -325
- package/dist/cjs/sd-popover.cjs.entry.js +18 -11
- package/dist/cjs/sd-popup.cjs.entry.js +112 -0
- package/dist/cjs/sd-portal.cjs.entry.js +3 -3
- package/dist/cjs/sd-radio-button.cjs.entry.js +9 -6
- package/dist/cjs/sd-radio.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +159 -0
- package/dist/cjs/sd-select.config-B19ptCT2.js +178 -0
- package/dist/cjs/{sd-select-list-item_4.cjs.entry.js → sd-select_3.cjs.entry.js} +296 -323
- package/dist/cjs/sd-switch.cjs.entry.js +2 -2
- package/dist/cjs/sd-table.cjs.entry.js +188 -48
- package/dist/cjs/sd-table.config-BIpldZtw.js +76 -0
- package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
- package/dist/cjs/sd-tag.cjs.entry.js +56 -21
- package/dist/cjs/sd-td.cjs.entry.js +52 -10
- package/dist/cjs/sd-text-link.cjs.entry.js +13 -5
- package/dist/cjs/sd-toast-container.cjs.entry.js +5 -5
- package/dist/cjs/sd-toast.cjs.entry.js +35 -5
- package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{system-DpTN1vBC.js → system-VmZRYp6V.js} +4 -2
- package/dist/cjs/{tooltipArrow-D1-wcNm1.js → tooltipArrow-BjSFKIUq.js} +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/assets/CheckboxCheck.js +5 -0
- package/dist/collection/components/assets/CheckboxIndeterminate.js +5 -0
- package/dist/collection/components/assets/index.js +4 -0
- package/dist/collection/components/sd-action-modal/sd-action-modal.css +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +7 -7
- package/dist/collection/components/sd-badge/sd-badge.config.js +10 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -22
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +4 -4
- package/dist/collection/components/{sd-button-v2/sd-button-v2.config.js → sd-button/sd-button.config.js} +1 -1
- package/dist/collection/components/sd-button/sd-button.css +47 -93
- package/dist/collection/components/sd-button/sd-button.js +100 -173
- package/dist/collection/components/sd-calendar/sd-calendar.js +14 -14
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
- package/dist/collection/components/sd-chip/sd-chip.js +4 -4
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +13 -8
- package/dist/collection/components/sd-date-box/sd-date-box.js +8 -3
- 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.css +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +13 -6
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +4 -4
- 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 +5 -5
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +7 -3
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +13 -11
- package/dist/collection/components/sd-field/sd-field.css +6 -2
- package/dist/collection/components/sd-field/sd-field.js +48 -22
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +10 -5
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.css +1 -3
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +6 -6
- package/dist/collection/components/sd-form/sd-form.js +4 -4
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +12 -10
- package/dist/collection/components/sd-guide/sd-guide.css +8 -172
- package/dist/collection/components/sd-guide/sd-guide.js +8 -6
- package/dist/collection/components/sd-icon/sd-icon.js +4 -4
- package/dist/collection/components/sd-input/sd-input.css +4 -2
- package/dist/collection/components/sd-input/sd-input.js +6 -6
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +36 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +119 -0
- package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +301 -0
- package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +6 -3
- package/dist/collection/components/sd-modal-container/sd-modal-container.js +2 -2
- package/dist/collection/components/sd-number-input/sd-number-input.css +7 -0
- package/dist/collection/components/sd-number-input/sd-number-input.js +8 -5
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +129 -36
- package/dist/collection/components/sd-popup/sd-popup.config.js +34 -0
- package/dist/collection/components/sd-popup/sd-popup.css +73 -0
- package/dist/collection/components/sd-popup/sd-popup.js +163 -0
- package/dist/collection/components/sd-portal/sd-portal.js +2 -2
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +8 -5
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +2 -2
- 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.css +4 -4
- 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 +8 -8
- package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
- package/dist/collection/components/sd-select/sd-select.js +6 -6
- package/dist/collection/components/sd-switch/sd-switch.js +1 -1
- package/dist/collection/components/sd-table/sd-table.config.js +6 -2
- package/dist/collection/components/sd-table/sd-table.css +30 -11
- package/dist/collection/components/sd-table/sd-table.js +233 -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 +24 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +116 -19
- package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
- package/dist/collection/components/sd-tag/sd-tag.config.js +43 -11
- package/dist/collection/components/sd-tag/sd-tag.js +13 -7
- package/dist/collection/components/sd-text-link/sd-text-link.css +1 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +10 -4
- package/dist/collection/components/sd-textarea/sd-textarea.css +3 -0
- package/dist/collection/components/sd-textarea/sd-textarea.js +2 -2
- package/dist/collection/components/sd-toast/sd-toast.config.js +14 -0
- package/dist/collection/components/sd-toast/sd-toast.css +3 -5
- package/dist/collection/components/sd-toast/sd-toast.js +52 -5
- package/dist/collection/components/sd-toast-container/sd-toast-container.js +4 -4
- package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +77 -30
- package/dist/collection/utils/color/resolveColor.js +2 -2
- package/dist/collection/utils/dropdown-manager.js +1 -1
- package/dist/collection/utils/modal.js +1 -1
- package/dist/collection/utils/toast.js +4 -4
- 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-TwGlKfsC.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-Dcc2Vm6z.js → p-BorUSgEK.js} +1 -1
- package/dist/components/{p-Bvq0Vpln.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-CK9ciBIR.js +1 -0
- package/dist/components/p-CQI40kiY.js +1 -0
- package/dist/components/p-CRL7TjSB.js +1 -0
- package/dist/components/p-CdOHomUp.js +1 -0
- package/dist/components/p-Ch5Yu1qd.js +1 -0
- package/dist/components/p-Cktiasfd.js +1 -0
- 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-DdLntfiw.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-DyAnn9ea.js +1 -0
- package/dist/components/p-GBlVDmy4.js +1 -0
- package/dist/components/p-Jts7ueOa.js +1 -0
- package/dist/components/p-arZfxxPn.js +1 -0
- package/dist/components/p-mmdt-WnS.js +1 -0
- package/dist/components/p-nOCYbyW4.js +1 -0
- package/dist/components/p-teN3CfOr.js +1 -0
- package/dist/components/p-u8teDaMa.js +1 -0
- package/dist/components/p-wCNRlKLa.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/sd-key-value-table.js +1 -0
- 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-button-v2.d.ts → sd-popup.d.ts} +4 -4
- package/dist/components/sd-popup.js +1 -0
- 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-04fdb4b1.entry.js +1 -0
- package/dist/design-system/p-05611ff7.entry.js +1 -0
- package/dist/design-system/p-0U6dRjlq.js +2 -0
- package/dist/design-system/{p-fe9cef6a.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-33bc3176.entry.js → p-435ae69e.entry.js} +1 -1
- package/dist/design-system/p-43e97572.entry.js +1 -0
- package/dist/design-system/p-44d05570.entry.js +1 -0
- package/dist/design-system/p-501fae20.entry.js +1 -0
- package/dist/design-system/{p-ead3e688.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-77690440.entry.js +1 -0
- package/dist/design-system/p-78cc0289.entry.js +1 -0
- package/dist/design-system/p-790165f8.entry.js +1 -0
- package/dist/design-system/p-80466582.entry.js +1 -0
- package/dist/design-system/{p-e5cebccd.entry.js → p-857c44e8.entry.js} +1 -1
- package/dist/design-system/{p-f522c91d.entry.js → p-87c868c3.entry.js} +1 -1
- package/dist/design-system/p-8db7d8f2.entry.js +1 -0
- package/dist/design-system/p-8ee990bd.entry.js +1 -0
- package/dist/design-system/p-8f22106e.entry.js +1 -0
- package/dist/design-system/p-BDjErF_K.js +1 -0
- package/dist/design-system/p-BnfUIhUj.js +1 -0
- package/dist/{components/p-DkJqVXpD.js → design-system/p-C29HUShl.js} +1 -1
- package/dist/design-system/{p-BxPyZJaz.js → p-Ce0cmS4R.js} +1 -1
- package/dist/design-system/p-CxOCk_ge.js +1 -0
- package/dist/design-system/p-GBlVDmy4.js +1 -0
- 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-797517b5.entry.js → p-aeccfb2b.entry.js} +1 -1
- package/dist/design-system/p-b0aad445.entry.js +1 -0
- package/dist/design-system/p-b3c144ff.entry.js +1 -0
- package/dist/design-system/p-caee95b0.entry.js +1 -0
- package/dist/design-system/p-d30c823e.entry.js +1 -0
- package/dist/design-system/{p-3f7bc660.entry.js → p-d3212544.entry.js} +1 -1
- package/dist/design-system/p-d8c41313.entry.js +1 -0
- package/dist/design-system/{p-6bfe3612.entry.js → p-de8bb9ba.entry.js} +1 -1
- package/dist/design-system/p-e2334c1c.entry.js +1 -0
- package/dist/design-system/p-f4d73a0c.entry.js +1 -0
- 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-BnfUIhUj.js +64 -0
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-Cnwbjz1F.js → index-0U6dRjlq.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{resolveColor-BxPyZJaz.js → resolveColor-Ce0cmS4R.js} +2 -2
- package/dist/esm/sd-action-modal.entry.js +3 -3
- package/dist/esm/sd-badge.entry.js +2 -3
- package/dist/esm/sd-barcode-input.entry.js +3 -3
- package/dist/esm/{sd-button-v2.config-CV4xelxV.js → sd-button.config-BDjErF_K.js} +88 -3
- package/dist/esm/{sd-button-v2_2.entry.js → sd-button_2.entry.js} +102 -85
- package/dist/esm/sd-calendar.entry.js +15 -15
- package/dist/esm/sd-card.entry.js +2 -2
- package/dist/esm/sd-checkbox.entry.js +4 -4
- package/dist/esm/sd-chip.entry.js +4 -4
- package/dist/esm/sd-circle-progress.entry.js +3 -3
- package/dist/esm/sd-confirm-modal_2.entry.js +19 -11
- package/dist/esm/sd-date-box.entry.js +9 -4
- package/dist/esm/{sd-date-picker-calendar.entry.js → sd-date-picker-calendar_2.entry.js} +59 -7
- package/dist/esm/{sd-date-picker.config-C2fDbE9d.js → sd-date-picker.config-B6cqMQaM.js} +1 -2
- package/dist/esm/sd-date-picker_7.entry.js +1227 -0
- package/dist/esm/sd-date-range-picker-calendar.entry.js +14 -14
- package/dist/esm/sd-dropdown-button.entry.js +21 -16
- package/dist/esm/{sd-button_4.entry.js → sd-field_3.entry.js} +48 -102
- package/dist/esm/sd-form.entry.js +5 -5
- package/dist/esm/sd-ghost-button.entry.js +12 -10
- package/dist/esm/sd-guide.entry.js +11 -11
- package/dist/esm/sd-key-value-table.entry.js +228 -0
- package/dist/esm/sd-linear-progress.entry.js +3 -3
- package/dist/esm/sd-loading-container.entry.js +3 -3
- package/dist/esm/sd-modal-container.entry.js +3 -3
- package/dist/esm/{sd-pagination_5.entry.js → sd-pagination_4.entry.js} +137 -325
- package/dist/esm/sd-popover.entry.js +18 -11
- package/dist/esm/sd-popup.entry.js +110 -0
- package/dist/esm/sd-portal.entry.js +3 -3
- package/dist/esm/sd-radio-button.entry.js +9 -6
- package/dist/esm/sd-radio.entry.js +2 -2
- package/dist/esm/sd-select-list-item_2.entry.js +156 -0
- package/dist/esm/sd-select.config-CxOCk_ge.js +165 -0
- package/dist/esm/{sd-select-list-item_4.entry.js → sd-select_3.entry.js} +281 -307
- package/dist/esm/sd-switch.entry.js +2 -2
- package/dist/esm/{sd-table.config-Bj-EEo7N.js → sd-table.config-B-VgXXT7.js} +16 -46
- package/dist/esm/sd-table.entry.js +188 -48
- package/dist/esm/sd-tabs.entry.js +8 -3
- package/dist/esm/sd-tag.entry.js +56 -21
- package/dist/esm/sd-td.entry.js +52 -10
- package/dist/esm/sd-text-link.entry.js +13 -5
- package/dist/esm/sd-toast-container.entry.js +5 -5
- package/dist/esm/sd-toast.entry.js +35 -5
- package/dist/esm/sd-toggle.entry.js +2 -2
- package/dist/esm/{system-CZ4ltUOw.js → system-GBlVDmy4.js} +4 -2
- package/dist/esm/{tooltipArrow-D8sr81Xw.js → tooltipArrow-O5LOsHae.js} +1 -1
- package/dist/types/components/assets/CheckboxCheck.d.ts +1 -0
- package/dist/types/components/assets/CheckboxIndeterminate.d.ts +1 -0
- package/dist/types/components/assets/index.d.ts +2 -0
- package/dist/types/components/sd-action-modal/sd-action-modal.d.ts +2 -2
- package/dist/types/components/sd-badge/sd-badge.d.ts +0 -1
- package/dist/types/components/{sd-button-v2/sd-button-v2.config.d.ts → sd-button/sd-button.config.d.ts} +9 -15
- package/dist/types/components/sd-button/sd-button.d.ts +11 -13
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.config.d.ts +3 -3
- package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +2 -1
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +6 -5
- package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
- package/dist/types/components/sd-field/sd-field.d.ts +1 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +105 -0
- package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +38 -0
- package/dist/types/components/sd-loading-modal/sd-loading-modal.config.d.ts +2 -2
- package/dist/types/components/sd-loading-modal/sd-loading-modal.d.ts +1 -0
- package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
- package/dist/types/components/sd-popover/sd-popover.d.ts +16 -10
- package/dist/types/components/sd-popup/sd-popup.config.d.ts +30 -0
- package/dist/types/components/sd-popup/sd-popup.d.ts +11 -0
- 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 +21 -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 +9 -0
- package/dist/types/components/sd-tag/sd-tag.d.ts +2 -0
- package/dist/types/components/sd-toast/sd-toast.config.d.ts +5 -1
- package/dist/types/components/sd-toast/sd-toast.d.ts +2 -0
- package/dist/types/components/sd-toast-container/sd-toast-container.config.d.ts +2 -0
- package/dist/types/components/sd-tooltip/sd-tooltip.config.d.ts +2 -13
- package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +6 -4
- package/dist/types/components.d.ts +278 -192
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/form.d.ts +1 -1
- package/dist/types/types/global.d.ts +14 -13
- package/dist/types/utils/toast.d.ts +1 -1
- package/hydrate/index.js +5513 -4761
- package/hydrate/index.mjs +5513 -4761
- package/package.json +111 -97
- package/readme.md +13 -7
- package/dist/cjs/component.button-cqV-iCG5.js +0 -90
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +0 -51
- package/dist/cjs/sd-date-picker.cjs.entry.js +0 -117
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +0 -123
- package/dist/cjs/sd-file-picker.cjs.entry.js +0 -244
- package/dist/cjs/sd-input.cjs.entry.js +0 -175
- package/dist/cjs/sd-number-input.cjs.entry.js +0 -409
- package/dist/cjs/sd-radio-group.cjs.entry.js +0 -46
- package/dist/cjs/sd-table.config-Cb0Ot3C6.js +0 -105
- package/dist/cjs/sd-textarea.cjs.entry.js +0 -146
- package/dist/collection/components/sd-button-v2/sd-button-v2.css +0 -125
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +0 -273
- package/dist/components/p-B1XBwjCW.js +0 -1
- package/dist/components/p-B8jXOXtJ.js +0 -1
- package/dist/components/p-BE6TxbtX.js +0 -1
- package/dist/components/p-BJsHakU2.js +0 -1
- package/dist/components/p-BStczlLa.js +0 -1
- package/dist/components/p-BcMNA89i.js +0 -1
- package/dist/components/p-BheX6lAy.js +0 -1
- package/dist/components/p-BmYM7-4v.js +0 -1
- package/dist/components/p-BppjYHF6.js +0 -1
- package/dist/components/p-BwWDMpJc.js +0 -1
- package/dist/components/p-C-kw2p2a.js +0 -1
- package/dist/components/p-C5qZtNLl.js +0 -1
- package/dist/components/p-C7DajKYn.js +0 -1
- package/dist/components/p-CZ4ltUOw.js +0 -1
- package/dist/components/p-CeVMl_M9.js +0 -1
- package/dist/components/p-D1DpOp6M.js +0 -1
- package/dist/components/p-D3gjBBCU.js +0 -1
- package/dist/components/p-DC-6inj0.js +0 -1
- package/dist/components/p-DRF0He-x.js +0 -1
- package/dist/components/p-DegvQLTF.js +0 -1
- package/dist/components/p-Dey-lS6x.js +0 -1
- package/dist/components/p-DfH_fO01.js +0 -1
- package/dist/components/p-DngV3MT1.js +0 -1
- package/dist/components/p-EbjZr2OA.js +0 -1
- package/dist/components/p-LwWOleLJ.js +0 -1
- package/dist/components/p-Nvx13YlG.js +0 -1
- package/dist/components/p-ZMpCZhXP.js +0 -1
- package/dist/components/p-dNJIFthT.js +0 -1
- package/dist/components/p-q0VWISKA.js +0 -1
- package/dist/components/p-xnLvZ-xn.js +0 -1
- package/dist/components/sd-button-v2.js +0 -1
- package/dist/design-system/p-0356c195.entry.js +0 -1
- package/dist/design-system/p-045bc426.entry.js +0 -1
- package/dist/design-system/p-12dfd239.entry.js +0 -1
- package/dist/design-system/p-16d3a485.entry.js +0 -1
- package/dist/design-system/p-1706ed6f.entry.js +0 -1
- package/dist/design-system/p-182548f7.entry.js +0 -1
- package/dist/design-system/p-1a79edce.entry.js +0 -1
- package/dist/design-system/p-1cf87e87.entry.js +0 -1
- package/dist/design-system/p-25a08e98.entry.js +0 -1
- package/dist/design-system/p-2812b9ce.entry.js +0 -1
- package/dist/design-system/p-38f661ea.entry.js +0 -1
- package/dist/design-system/p-429dab5c.entry.js +0 -1
- package/dist/design-system/p-455dccf5.entry.js +0 -1
- package/dist/design-system/p-59313838.entry.js +0 -1
- package/dist/design-system/p-6af01ab0.entry.js +0 -1
- package/dist/design-system/p-70d4903f.entry.js +0 -1
- package/dist/design-system/p-767e99f9.entry.js +0 -1
- package/dist/design-system/p-7c370335.entry.js +0 -1
- package/dist/design-system/p-7fe8be6a.entry.js +0 -1
- package/dist/design-system/p-83b262dc.entry.js +0 -1
- package/dist/design-system/p-881adaa5.entry.js +0 -1
- package/dist/design-system/p-88d7303c.entry.js +0 -1
- package/dist/design-system/p-8a601e0f.entry.js +0 -1
- package/dist/design-system/p-B1XBwjCW.js +0 -1
- package/dist/design-system/p-BsrEibf7.js +0 -1
- package/dist/design-system/p-C5qZtNLl.js +0 -1
- package/dist/design-system/p-CZ4ltUOw.js +0 -1
- package/dist/design-system/p-Cnwbjz1F.js +0 -2
- package/dist/design-system/p-DnCBBIoq.js +0 -1
- package/dist/design-system/p-a82be987.entry.js +0 -1
- package/dist/design-system/p-b917c82a.entry.js +0 -1
- package/dist/design-system/p-b9f00eef.entry.js +0 -1
- package/dist/design-system/p-bcb53788.entry.js +0 -1
- package/dist/design-system/p-c24344ac.entry.js +0 -1
- package/dist/design-system/p-d76192bd.entry.js +0 -1
- package/dist/design-system/p-d9d8c51b.entry.js +0 -1
- package/dist/design-system/p-de67937d.entry.js +0 -1
- package/dist/design-system/p-ea5e6c2c.entry.js +0 -1
- package/dist/design-system/p-eeb1cac2.entry.js +0 -1
- package/dist/design-system/p-f1a74359.entry.js +0 -1
- package/dist/design-system/p-f44786a9.entry.js +0 -1
- package/dist/design-system/p-f69c7539.entry.js +0 -1
- package/dist/esm/component.button-B1XBwjCW.js +0 -88
- package/dist/esm/sd-date-picker-trigger.entry.js +0 -49
- package/dist/esm/sd-date-picker.entry.js +0 -115
- package/dist/esm/sd-date-range-picker.entry.js +0 -121
- package/dist/esm/sd-file-picker.entry.js +0 -242
- package/dist/esm/sd-input.entry.js +0 -173
- package/dist/esm/sd-number-input.entry.js +0 -407
- package/dist/esm/sd-radio-group.entry.js +0 -44
- package/dist/esm/sd-textarea.entry.js +0 -144
- package/dist/types/components/sd-button-v2/sd-button-v2.d.ts +0 -19
- /package/dist/components/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
- /package/dist/design-system/{p-C2fDbE9d.js → p-B6cqMQaM.js} +0 -0
|
@@ -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;
|
|
@@ -17,15 +17,22 @@ export class SdTable {
|
|
|
17
17
|
height;
|
|
18
18
|
stickyHeader = false;
|
|
19
19
|
stickyColumn = { left: 0, right: 0 };
|
|
20
|
+
radius = 'default';
|
|
20
21
|
noDataLabel = SdTable.DEFAULT_NO_DATA_LABEL;
|
|
21
22
|
resolvedNoDataLabel = SdTable.DEFAULT_NO_DATA_LABEL;
|
|
22
23
|
isLoading = false;
|
|
23
24
|
pagination;
|
|
24
25
|
useInternalPagination = false;
|
|
25
26
|
useRowsPerPageSelect = false;
|
|
27
|
+
dense = false;
|
|
26
28
|
// ─── Virtual Scroll ───────────────────────────────────────────────
|
|
27
29
|
useVirtualScroll = false;
|
|
28
|
-
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
|
+
}
|
|
29
36
|
virtualBuffer = 5;
|
|
30
37
|
virtualEndThreshold = 10;
|
|
31
38
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -48,6 +55,7 @@ export class SdTable {
|
|
|
48
55
|
scrolledRight = false;
|
|
49
56
|
rowCount = 0;
|
|
50
57
|
loadingScrollTop = 0;
|
|
58
|
+
noDataBodyHeight = 60;
|
|
51
59
|
// light DOM에 sd-thead / sd-tbody 자식이 없으면 sd-table이 직접 렌더해야 함을 알리는 플래그.
|
|
52
60
|
// componentWillLoad에서 한 번 결정되며, 이후 동적 토글은 지원하지 않는다.
|
|
53
61
|
autoThead = false;
|
|
@@ -56,12 +64,19 @@ export class SdTable {
|
|
|
56
64
|
vsEnd = 0;
|
|
57
65
|
lastReachEndNotifiedRowCount = -1;
|
|
58
66
|
scrollContainer = null;
|
|
67
|
+
noDataContentEl = null;
|
|
68
|
+
noDataContentResizeObserver;
|
|
59
69
|
onScroll;
|
|
60
70
|
// 키: `${rowKey}::${field}` → { rowspan, colspan }
|
|
61
71
|
spanRegistry = new Map();
|
|
72
|
+
// rowKey → Set<field>: useFrame=true인 sd-td가 있는 행을 추적한다.
|
|
73
|
+
// 하나라도 등록되면 해당 행은 dense를 무시하고 default 레이아웃으로 렌더된다.
|
|
74
|
+
useFrameRegistry = new Map();
|
|
62
75
|
// 키: `${rowKey}::${field}` → sd-td의 sdClass 문자열
|
|
63
76
|
// sd-tr가 td를 그릴 때 머지해서 셀-단위 커스텀 클래스를 적용한다.
|
|
64
77
|
cellClassRegistry = new Map();
|
|
78
|
+
// separator 직전 행의 시각적 인덱스 집합
|
|
79
|
+
separatorPrevIndices = new Set();
|
|
65
80
|
// rowKey 문자열 → rows 배열에서의 visual index.
|
|
66
81
|
// rowspan 위쪽 행 스캔에서 "내 위에 있느냐"를 판정하기 위한 시각적 순서 소스.
|
|
67
82
|
// rows prop이 있으면 채워지고, 없으면 비어 있어 Number(rowKey) fallback이 사용된다.
|
|
@@ -120,6 +135,7 @@ export class SdTable {
|
|
|
120
135
|
if (newVal) {
|
|
121
136
|
this.loadingScrollTop = this.scrollContainer?.scrollTop ?? 0;
|
|
122
137
|
}
|
|
138
|
+
this.syncNoDataContentObserver();
|
|
123
139
|
}
|
|
124
140
|
handleUseVirtualScrollChange(newVal) {
|
|
125
141
|
if (newVal) {
|
|
@@ -128,7 +144,7 @@ export class SdTable {
|
|
|
128
144
|
}
|
|
129
145
|
}
|
|
130
146
|
handleColumnsChange(newCols) {
|
|
131
|
-
this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
|
|
147
|
+
this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
|
|
132
148
|
this.refreshChildrenConfig();
|
|
133
149
|
}
|
|
134
150
|
handleRowsChange(newRows) {
|
|
@@ -139,6 +155,7 @@ export class SdTable {
|
|
|
139
155
|
if (this.useVirtualScroll)
|
|
140
156
|
this.propagateVirtualUpdate(true);
|
|
141
157
|
this.pushRowsToChildren(newRows);
|
|
158
|
+
this.syncNoDataContentObserver();
|
|
142
159
|
}
|
|
143
160
|
handleRowKeyChange() {
|
|
144
161
|
this.rebuildRowIndexMap();
|
|
@@ -164,10 +181,10 @@ export class SdTable {
|
|
|
164
181
|
this.innerSelected = new Set(newSelected);
|
|
165
182
|
}
|
|
166
183
|
handlePaginationChange(newVal) {
|
|
167
|
-
if (newVal?.page && newVal.page !== this.currentPage) {
|
|
184
|
+
if (newVal?.page != null && newVal.page !== this.currentPage) {
|
|
168
185
|
this.currentPage = newVal.page;
|
|
169
186
|
}
|
|
170
|
-
if (newVal?.rowsPerPage && newVal.rowsPerPage !== this.innerRowsPerPage) {
|
|
187
|
+
if (newVal?.rowsPerPage != null && newVal.rowsPerPage !== this.innerRowsPerPage) {
|
|
171
188
|
this.innerRowsPerPage = newVal.rowsPerPage;
|
|
172
189
|
}
|
|
173
190
|
}
|
|
@@ -182,12 +199,12 @@ export class SdTable {
|
|
|
182
199
|
this.handleNoDataLabelChange(this.noDataLabel);
|
|
183
200
|
this.detectChildren();
|
|
184
201
|
this.innerSelected = new Set(this.selected || []);
|
|
185
|
-
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));
|
|
186
203
|
this.rebuildRowIndexMap();
|
|
187
|
-
if (this.pagination?.page) {
|
|
204
|
+
if (this.pagination?.page != null) {
|
|
188
205
|
this.currentPage = this.pagination.page;
|
|
189
206
|
}
|
|
190
|
-
if (this.pagination?.rowsPerPage) {
|
|
207
|
+
if (this.pagination?.rowsPerPage != null) {
|
|
191
208
|
this.innerRowsPerPage = this.pagination.rowsPerPage;
|
|
192
209
|
}
|
|
193
210
|
const el = this.el;
|
|
@@ -208,10 +225,17 @@ export class SdTable {
|
|
|
208
225
|
el.unregisterSpanSync = this.unregisterSpanSync.bind(this);
|
|
209
226
|
el.getSpanSync = this.getSpanSync.bind(this);
|
|
210
227
|
el.isCoveredSync = this.isCoveredSync.bind(this);
|
|
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);
|
|
211
232
|
el.hasRowspanSync = this.hasRowspanSync.bind(this);
|
|
212
233
|
el.registerCellClassSync = this.registerCellClassSync.bind(this);
|
|
213
234
|
el.unregisterCellClassSync = this.unregisterCellClassSync.bind(this);
|
|
214
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);
|
|
215
239
|
if (Array.isArray(this.rows)) {
|
|
216
240
|
this.rowCount = this.rows.length;
|
|
217
241
|
this.pushRowsToChildren(this.rows);
|
|
@@ -222,7 +246,7 @@ export class SdTable {
|
|
|
222
246
|
this.pushRowsToChildren(this.rows);
|
|
223
247
|
}
|
|
224
248
|
readTask(() => {
|
|
225
|
-
const wrapper = this.el.shadowRoot?.querySelector('.sd-
|
|
249
|
+
const wrapper = this.el.shadowRoot?.querySelector('.sd-table__scroll-container');
|
|
226
250
|
if (!wrapper)
|
|
227
251
|
return;
|
|
228
252
|
let rafPending = false;
|
|
@@ -254,11 +278,43 @@ export class SdTable {
|
|
|
254
278
|
this.propagateVirtualUpdate(); // 초기 렌더
|
|
255
279
|
}
|
|
256
280
|
});
|
|
281
|
+
this.syncNoDataContentObserver();
|
|
257
282
|
}
|
|
258
283
|
disconnectedCallback() {
|
|
259
284
|
if (this.scrollContainer && this.onScroll) {
|
|
260
285
|
this.scrollContainer.removeEventListener('scroll', this.onScroll);
|
|
261
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);
|
|
262
318
|
}
|
|
263
319
|
// light DOM(manual mode 자식)과 shadow DOM(autoThead/autoTbody fallback) 양쪽 모두에서 자식을 찾는다.
|
|
264
320
|
queryChildEl(selector) {
|
|
@@ -323,8 +379,8 @@ export class SdTable {
|
|
|
323
379
|
return;
|
|
324
380
|
this.vsStart = start;
|
|
325
381
|
this.vsEnd = end;
|
|
326
|
-
const topHeight = start * this.
|
|
327
|
-
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);
|
|
328
384
|
const tbody = this.queryChildEl('sd-tbody');
|
|
329
385
|
tbody?.setSpacersSync?.(topHeight, bottomHeight);
|
|
330
386
|
if (rangeChanged) {
|
|
@@ -338,7 +394,7 @@ export class SdTable {
|
|
|
338
394
|
getVirtualScrollConfigSync() {
|
|
339
395
|
return {
|
|
340
396
|
useVirtualScroll: this.useVirtualScroll,
|
|
341
|
-
rowHeight: this.
|
|
397
|
+
rowHeight: this.effectiveRowHeight,
|
|
342
398
|
virtualBuffer: this.virtualBuffer,
|
|
343
399
|
vsStart: this.vsStart,
|
|
344
400
|
vsEnd: this.vsEnd,
|
|
@@ -355,10 +411,35 @@ export class SdTable {
|
|
|
355
411
|
scrolledLeft: this.scrolledLeft,
|
|
356
412
|
scrolledRight: this.scrolledRight,
|
|
357
413
|
columnWidths: this.columnWidths,
|
|
414
|
+
dense: this.dense,
|
|
358
415
|
};
|
|
359
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
|
+
}
|
|
360
441
|
isRowSelectedSync(row) {
|
|
361
|
-
return Array.from(this.innerSelected).some(r => r[this.rowKey] === row[this.rowKey]);
|
|
442
|
+
return Array.from(this.innerSelected).some(r => r[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id']);
|
|
362
443
|
}
|
|
363
444
|
async isRowSelected(row) {
|
|
364
445
|
return this.isRowSelectedSync(row);
|
|
@@ -367,7 +448,7 @@ export class SdTable {
|
|
|
367
448
|
const selectedArray = Array.from(this.innerSelected);
|
|
368
449
|
const exists = this.isRowSelectedSync(row);
|
|
369
450
|
const newSelected = exists
|
|
370
|
-
? selectedArray.filter(r => r[this.rowKey] !== row[this.rowKey])
|
|
451
|
+
? selectedArray.filter(r => r[this.rowKey ?? 'id'] !== row[this.rowKey ?? 'id'])
|
|
371
452
|
: [...selectedArray, row];
|
|
372
453
|
if (newSelected.length === selectedArray.length)
|
|
373
454
|
return;
|
|
@@ -385,8 +466,8 @@ export class SdTable {
|
|
|
385
466
|
this.innerSelected = new Set([...this.innerSelected, ...pageRows]);
|
|
386
467
|
}
|
|
387
468
|
else {
|
|
388
|
-
const currentPageKeys = rows.map(r => r[this.rowKey]);
|
|
389
|
-
this.innerSelected = new Set([...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])));
|
|
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'])));
|
|
390
471
|
}
|
|
391
472
|
this.selected = Array.from(this.innerSelected);
|
|
392
473
|
this.sdSelectChange.emit(Array.from(this.innerSelected));
|
|
@@ -397,7 +478,7 @@ export class SdTable {
|
|
|
397
478
|
}
|
|
398
479
|
getIsAllCheckedSync(rows) {
|
|
399
480
|
const total = rows.length;
|
|
400
|
-
const selectedCount = rows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey] === row[this.rowKey])).length;
|
|
481
|
+
const selectedCount = rows.filter(row => Array.from(this.innerSelected).some(selectedRow => selectedRow[this.rowKey ?? 'id'] === row[this.rowKey ?? 'id'])).length;
|
|
401
482
|
if (selectedCount === 0)
|
|
402
483
|
return false;
|
|
403
484
|
if (selectedCount === total)
|
|
@@ -420,7 +501,7 @@ export class SdTable {
|
|
|
420
501
|
this.queryAllTr().forEach(tr => tr?.updateVisibility?.());
|
|
421
502
|
}
|
|
422
503
|
changeRowsPerPage(perPage) {
|
|
423
|
-
const changedRowsPerPage = perPage ? Number(perPage) : 0;
|
|
504
|
+
const changedRowsPerPage = perPage != null && perPage !== '' ? Number(perPage) : 0;
|
|
424
505
|
if (!this.useInternalPagination) {
|
|
425
506
|
this.sdRowsPerPageChange.emit(changedRowsPerPage);
|
|
426
507
|
return;
|
|
@@ -447,7 +528,7 @@ export class SdTable {
|
|
|
447
528
|
const startWidth = this.columnWidths[index];
|
|
448
529
|
const handleMouseMove = (moveEvent) => {
|
|
449
530
|
const col = this.columns[index];
|
|
450
|
-
if (
|
|
531
|
+
if (col == null)
|
|
451
532
|
return;
|
|
452
533
|
const minWidth = col.minWidth || 50;
|
|
453
534
|
const maxWidth = col.maxWidth || 9999;
|
|
@@ -482,13 +563,17 @@ export class SdTable {
|
|
|
482
563
|
this.columns.filter(c => c.visible !== false).length -
|
|
483
564
|
(this.stickyColumn?.right || 0) && i > colIdx)
|
|
484
565
|
.reduce((a, b) => a + b, 0);
|
|
485
|
-
|
|
566
|
+
const visibleCol = this.columns.filter(c => c.visible !== false)[colIdx];
|
|
567
|
+
const base = {
|
|
486
568
|
'--sticky-left-offset': `${leftOffset}px`,
|
|
487
569
|
'--sticky-right-offset': `${rightOffset}px`,
|
|
488
|
-
'width': `${this.columnWidths[colIdx]}px`,
|
|
489
|
-
'minWidth': `${this.columnWidths[colIdx]}px`,
|
|
490
|
-
'maxWidth': `${this.columnWidths[colIdx]}px`,
|
|
491
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;
|
|
492
577
|
}
|
|
493
578
|
async getStickyStyle(colIdx) {
|
|
494
579
|
return this.getStickyStyleSync(colIdx);
|
|
@@ -517,7 +602,7 @@ export class SdTable {
|
|
|
517
602
|
});
|
|
518
603
|
}
|
|
519
604
|
registerSpanSync(rowKey, field, rowspan, colspan) {
|
|
520
|
-
if (rowKey == null ||
|
|
605
|
+
if (rowKey == null || field === '')
|
|
521
606
|
return;
|
|
522
607
|
const safeRowspan = Math.max(1, Math.floor(rowspan || 1));
|
|
523
608
|
const safeColspan = Math.max(1, Math.floor(colspan || 1));
|
|
@@ -536,7 +621,7 @@ export class SdTable {
|
|
|
536
621
|
this.requestAllTrUpdate();
|
|
537
622
|
}
|
|
538
623
|
unregisterSpanSync(rowKey, field) {
|
|
539
|
-
if (rowKey == null ||
|
|
624
|
+
if (rowKey == null || field === '')
|
|
540
625
|
return;
|
|
541
626
|
const key = this.spanKey(rowKey, field);
|
|
542
627
|
if (!this.spanRegistry.has(key))
|
|
@@ -551,18 +636,18 @@ export class SdTable {
|
|
|
551
636
|
// span과 달리 다른 셀에 영향이 없으므로 형제 sd-tr 전체를 재렌더하지 않고,
|
|
552
637
|
// sd-td 쪽에서 자기 부모 tr만 bumpSpansVersion으로 새로 그린다.
|
|
553
638
|
registerCellClassSync(rowKey, field, cls) {
|
|
554
|
-
if (rowKey == null ||
|
|
639
|
+
if (rowKey == null || field === '')
|
|
555
640
|
return;
|
|
556
641
|
const key = this.spanKey(rowKey, field);
|
|
557
642
|
const safe = (cls ?? '').trim();
|
|
558
|
-
if (
|
|
643
|
+
if (safe === '') {
|
|
559
644
|
this.cellClassRegistry.delete(key);
|
|
560
645
|
return;
|
|
561
646
|
}
|
|
562
647
|
this.cellClassRegistry.set(key, safe);
|
|
563
648
|
}
|
|
564
649
|
unregisterCellClassSync(rowKey, field) {
|
|
565
|
-
if (rowKey == null ||
|
|
650
|
+
if (rowKey == null || field === '')
|
|
566
651
|
return;
|
|
567
652
|
this.cellClassRegistry.delete(this.spanKey(rowKey, field));
|
|
568
653
|
}
|
|
@@ -585,7 +670,7 @@ export class SdTable {
|
|
|
585
670
|
// 1. 같은 행 왼쪽 스캔 — colspan으로 이 위치를 덮는 셀이 있는가
|
|
586
671
|
for (let i = 0; i < colIdx; i++) {
|
|
587
672
|
const c = visibleCols[i];
|
|
588
|
-
if (
|
|
673
|
+
if (c == null)
|
|
589
674
|
continue;
|
|
590
675
|
const field = typeof c.field === 'string' ? c.field : c.name;
|
|
591
676
|
const span = this.spanRegistry.get(this.spanKey(rowKey, field));
|
|
@@ -623,6 +708,50 @@ export class SdTable {
|
|
|
623
708
|
}
|
|
624
709
|
return false;
|
|
625
710
|
}
|
|
711
|
+
// rowspan을 반영한 셀의 시각적 하단 행 인덱스를 반환한다.
|
|
712
|
+
// isVisualLastRowSync·isVisualLastRowBeforeSeparatorSync 공통 헬퍼.
|
|
713
|
+
resolveVisualBottom(rowKey, field) {
|
|
714
|
+
const myRowIdx = this.resolveRowIndex(rowKey);
|
|
715
|
+
if (myRowIdx == null)
|
|
716
|
+
return null;
|
|
717
|
+
const span = this.spanRegistry.get(this.spanKey(rowKey, field));
|
|
718
|
+
const rs = Math.max(1, span?.rowspan ?? 1);
|
|
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;
|
|
729
|
+
const pageInfo = this.getPaginationInfoSync();
|
|
730
|
+
const lastVisibleIdx = pageInfo
|
|
731
|
+
? Math.min(pageInfo.endIndex - 1, this.rowCount - 1)
|
|
732
|
+
: this.rowCount - 1;
|
|
733
|
+
return visualBottom === lastVisibleIdx;
|
|
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
|
+
}
|
|
626
755
|
setRowCountSync(count) {
|
|
627
756
|
const safeCount = Math.max(0, Math.floor(this.toFiniteNumber(count, 0)));
|
|
628
757
|
if (safeCount !== this.rowCount) {
|
|
@@ -637,7 +766,7 @@ export class SdTable {
|
|
|
637
766
|
this.setRowCountSync(count);
|
|
638
767
|
}
|
|
639
768
|
calculateVisibleRange(scrollTop, containerHeight) {
|
|
640
|
-
const safeRowHeight = Math.max(1, this.toFiniteNumber(this.
|
|
769
|
+
const safeRowHeight = Math.max(1, this.toFiniteNumber(this.effectiveRowHeight, 40));
|
|
641
770
|
const safeBuffer = Math.max(0, Math.floor(this.toFiniteNumber(this.virtualBuffer, 5)));
|
|
642
771
|
const safeScrollTop = Math.max(0, this.toFiniteNumber(scrollTop, 0));
|
|
643
772
|
const safeContainerHeight = Math.max(0, this.toFiniteNumber(containerHeight, 0));
|
|
@@ -703,6 +832,12 @@ export class SdTable {
|
|
|
703
832
|
}
|
|
704
833
|
render() {
|
|
705
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%';
|
|
706
841
|
const hostStyle = {
|
|
707
842
|
'--table-radius': `${TABLE_RADIUS}px`,
|
|
708
843
|
'--table-border-color': TABLE_BORDER.color,
|
|
@@ -713,24 +848,25 @@ export class SdTable {
|
|
|
713
848
|
'--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
|
|
714
849
|
'--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
|
|
715
850
|
};
|
|
716
|
-
return (h(Host, { key: '
|
|
851
|
+
return (h(Host, { key: 'f7d92943fcb354f69d99c1e4fd37749cc06185c7', style: hostStyle }, h("div", { key: '53d6ac0eedc2c2a56c05bf5a751be43bc18f9fe7', class: "sd-table__container", style: {
|
|
717
852
|
'--table-width': this.width,
|
|
718
|
-
'--table-height':
|
|
719
|
-
'--table-container-height': `calc(${
|
|
720
|
-
} }, h("div", { key: '
|
|
721
|
-
'sd-table__clip': true,
|
|
722
|
-
'sd-table__clip--has-pagination': !!(this.pagination &&
|
|
723
|
-
this.pagination.rowsPerPage > 0 &&
|
|
724
|
-
this.rowCount > 0 &&
|
|
725
|
-
!this.useVirtualScroll),
|
|
726
|
-
} }, h("div", { key: 'b6d04ec953d7b75fb8ad8bc32e2662550d38c5c7', class: {
|
|
853
|
+
'--table-height': effectiveTableHeight,
|
|
854
|
+
'--table-container-height': `calc(${effectiveTableHeight} - ${paginationHeight}px)`,
|
|
855
|
+
} }, h("div", { key: 'b85980b8307b2a50ee1554262d025b58bad42e87', class: {
|
|
727
856
|
'sd-table__wrapper': true,
|
|
728
|
-
'sd-table__wrapper--
|
|
729
|
-
|
|
730
|
-
|
|
857
|
+
'sd-table__wrapper--radius-use-top': this.radius === 'useTop',
|
|
858
|
+
} }, h("div", { key: 'acf9816ceaaea06b807056606d684befebe9dcd0', class: {
|
|
859
|
+
'sd-table__scroll-container': true,
|
|
860
|
+
'sd-table__scroll-container--loading': this.isLoading,
|
|
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 &&
|
|
731
867
|
this.pagination.rowsPerPage > 0 &&
|
|
732
868
|
this.rowCount > 0 &&
|
|
733
|
-
!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
|
|
734
870
|
? this.innerRowsPerPage
|
|
735
871
|
: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", emitValue: true, onSdUpdate: e => {
|
|
736
872
|
if (!this.isRowsPerPageValue(e.detail))
|
|
@@ -989,6 +1125,26 @@ export class SdTable {
|
|
|
989
1125
|
"setter": false,
|
|
990
1126
|
"defaultValue": "{ left: 0, right: 0 }"
|
|
991
1127
|
},
|
|
1128
|
+
"radius": {
|
|
1129
|
+
"type": "string",
|
|
1130
|
+
"mutable": false,
|
|
1131
|
+
"complexType": {
|
|
1132
|
+
"original": "'default' | 'useTop'",
|
|
1133
|
+
"resolved": "\"default\" | \"useTop\"",
|
|
1134
|
+
"references": {}
|
|
1135
|
+
},
|
|
1136
|
+
"required": false,
|
|
1137
|
+
"optional": false,
|
|
1138
|
+
"docs": {
|
|
1139
|
+
"tags": [],
|
|
1140
|
+
"text": ""
|
|
1141
|
+
},
|
|
1142
|
+
"getter": false,
|
|
1143
|
+
"setter": false,
|
|
1144
|
+
"reflect": false,
|
|
1145
|
+
"attribute": "radius",
|
|
1146
|
+
"defaultValue": "'default'"
|
|
1147
|
+
},
|
|
992
1148
|
"noDataLabel": {
|
|
993
1149
|
"type": "string",
|
|
994
1150
|
"mutable": false,
|
|
@@ -1093,6 +1249,26 @@ export class SdTable {
|
|
|
1093
1249
|
"attribute": "use-rows-per-page-select",
|
|
1094
1250
|
"defaultValue": "false"
|
|
1095
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
|
+
},
|
|
1096
1272
|
"useVirtualScroll": {
|
|
1097
1273
|
"type": "boolean",
|
|
1098
1274
|
"mutable": false,
|
|
@@ -1118,11 +1294,11 @@ export class SdTable {
|
|
|
1118
1294
|
"mutable": false,
|
|
1119
1295
|
"complexType": {
|
|
1120
1296
|
"original": "number",
|
|
1121
|
-
"resolved": "number",
|
|
1297
|
+
"resolved": "number | undefined",
|
|
1122
1298
|
"references": {}
|
|
1123
1299
|
},
|
|
1124
1300
|
"required": false,
|
|
1125
|
-
"optional":
|
|
1301
|
+
"optional": true,
|
|
1126
1302
|
"docs": {
|
|
1127
1303
|
"tags": [],
|
|
1128
1304
|
"text": ""
|
|
@@ -1130,8 +1306,7 @@ export class SdTable {
|
|
|
1130
1306
|
"getter": false,
|
|
1131
1307
|
"setter": false,
|
|
1132
1308
|
"reflect": false,
|
|
1133
|
-
"attribute": "row-height"
|
|
1134
|
-
"defaultValue": "40"
|
|
1309
|
+
"attribute": "row-height"
|
|
1135
1310
|
},
|
|
1136
1311
|
"virtualBuffer": {
|
|
1137
1312
|
"type": "number",
|
|
@@ -1211,6 +1386,7 @@ export class SdTable {
|
|
|
1211
1386
|
"scrolledRight": {},
|
|
1212
1387
|
"rowCount": {},
|
|
1213
1388
|
"loadingScrollTop": {},
|
|
1389
|
+
"noDataBodyHeight": {},
|
|
1214
1390
|
"autoThead": {},
|
|
1215
1391
|
"autoTbody": {}
|
|
1216
1392
|
};
|
|
@@ -1416,7 +1592,7 @@ export class SdTable {
|
|
|
1416
1592
|
},
|
|
1417
1593
|
"getStickyStyle": {
|
|
1418
1594
|
"complexType": {
|
|
1419
|
-
"signature": "(colIdx: number) => Promise<
|
|
1595
|
+
"signature": "(colIdx: number) => Promise<Record<string, string>>",
|
|
1420
1596
|
"parameters": [{
|
|
1421
1597
|
"name": "colIdx",
|
|
1422
1598
|
"type": "number",
|
|
@@ -1426,9 +1602,13 @@ export class SdTable {
|
|
|
1426
1602
|
"Promise": {
|
|
1427
1603
|
"location": "global",
|
|
1428
1604
|
"id": "global::Promise"
|
|
1605
|
+
},
|
|
1606
|
+
"Record": {
|
|
1607
|
+
"location": "global",
|
|
1608
|
+
"id": "global::Record"
|
|
1429
1609
|
}
|
|
1430
1610
|
},
|
|
1431
|
-
"return": "Promise<
|
|
1611
|
+
"return": "Promise<Record<string, string>>"
|
|
1432
1612
|
},
|
|
1433
1613
|
"docs": {
|
|
1434
1614
|
"text": "",
|
|
@@ -1510,6 +1690,9 @@ export class SdTable {
|
|
|
1510
1690
|
}, {
|
|
1511
1691
|
"propName": "stickyHeader",
|
|
1512
1692
|
"methodName": "handleConfigChange"
|
|
1693
|
+
}, {
|
|
1694
|
+
"propName": "dense",
|
|
1695
|
+
"methodName": "handleConfigChange"
|
|
1513
1696
|
}, {
|
|
1514
1697
|
"propName": "selected",
|
|
1515
1698
|
"methodName": "handleSelectedChange"
|
|
@@ -45,7 +45,7 @@ let StoryVirtualTable = class StoryVirtualTable extends LitElement {
|
|
|
45
45
|
disconnectedCallback() {
|
|
46
46
|
super.disconnectedCallback();
|
|
47
47
|
this.detachListener?.();
|
|
48
|
-
if (this.syncRafId)
|
|
48
|
+
if (this.syncRafId !== undefined)
|
|
49
49
|
cancelAnimationFrame(this.syncRafId);
|
|
50
50
|
}
|
|
51
51
|
firstUpdated() {
|
|
@@ -59,8 +59,7 @@ let StoryVirtualTable = class StoryVirtualTable extends LitElement {
|
|
|
59
59
|
el.addEventListener('sdVirtualUpdate', onUpdate);
|
|
60
60
|
this.detachListener = () => el.removeEventListener('sdVirtualUpdate', onUpdate);
|
|
61
61
|
const trySync = () => {
|
|
62
|
-
const r = el
|
|
63
|
-
.getVirtualScrollRangeSync?.();
|
|
62
|
+
const r = el.getVirtualScrollRangeSync?.();
|
|
64
63
|
if (r && typeof r.from === 'number' && typeof r.to === 'number') {
|
|
65
64
|
this.range = { from: r.from, to: r.to };
|
|
66
65
|
}
|
|
@@ -37,17 +37,17 @@ export class SdTbody {
|
|
|
37
37
|
this.tableEl = table;
|
|
38
38
|
const fromMethod = table?.getTableIdSync?.();
|
|
39
39
|
const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
|
|
40
|
-
const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
41
|
-
(fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
40
|
+
const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
|
|
41
|
+
(fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
|
|
42
42
|
'';
|
|
43
|
-
if (resolvedTableId && resolvedTableId !== this.tableId) {
|
|
43
|
+
if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
|
|
44
44
|
this.tableId = resolvedTableId;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
48
|
+
return (h(Host, { key: '5b55bfd73916ff1402329375de1e1fc2a7629cbd', slot: `${this.tableId}-body` }, h("tbody", { key: 'a09a532d1510166a36d592c2e59ec1765803bbbe', class: { tbody: true } }, [
|
|
49
49
|
this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
|
|
50
|
-
h("slot", { key: '
|
|
50
|
+
h("slot", { key: 'da3827a9c2fe7a74ec3cb3eb8dee3ab039ea0535' }),
|
|
51
51
|
this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
|
|
52
52
|
])));
|
|
53
53
|
}
|