@sellmate/design-system-vue 1.27.1 → 1.29.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/README.md +0 -20
- package/dist/components.d.ts +0 -5
- package/dist/components.js +8 -76
- package/dist/define-custom-elements.js +0 -10
- package/dist/index.d.ts +1 -3
- package/dist/index.js +0 -1
- package/lib/components.ts +8 -87
- package/lib/define-custom-elements.ts +0 -10
- package/lib/index.ts +0 -8
- package/package.json +2 -2
- package/lib/composables/useSdTableVirtualScroll.ts +0 -84
package/README.md
CHANGED
|
@@ -183,7 +183,6 @@ sdLoading.show({ message: "처리 중..." });
|
|
|
183
183
|
| `SdField` | 폼 필드 래퍼 (label + input + error) |
|
|
184
184
|
| `SdForm` | 폼 유효성 검사 컨테이너 |
|
|
185
185
|
| `SdTabs` | 탭 네비게이션 |
|
|
186
|
-
| `SdTable` | 데이터 테이블 |
|
|
187
186
|
| `SdPagination` | 페이지네이션 |
|
|
188
187
|
|
|
189
188
|
### 모달 / 알림
|
|
@@ -203,9 +202,6 @@ sdLoading.show({ message: "처리 중..." });
|
|
|
203
202
|
|
|
204
203
|
```ts
|
|
205
204
|
import type {
|
|
206
|
-
// Table
|
|
207
|
-
SdTableColumn,
|
|
208
|
-
SdTableRow,
|
|
209
205
|
// Select
|
|
210
206
|
SelectOption,
|
|
211
207
|
// Radio
|
|
@@ -232,22 +228,6 @@ import type {
|
|
|
232
228
|
|
|
233
229
|
---
|
|
234
230
|
|
|
235
|
-
## Composables
|
|
236
|
-
|
|
237
|
-
### `useSdTableVirtualScroll`
|
|
238
|
-
|
|
239
|
-
```ts
|
|
240
|
-
import { useSdTableVirtualScroll } from "@sellmate/design-system-vue";
|
|
241
|
-
|
|
242
|
-
const { virtualRows, totalHeight, scrollToIndex } = useSdTableVirtualScroll({
|
|
243
|
-
rowCount: data.length,
|
|
244
|
-
rowHeight: 48,
|
|
245
|
-
containerHeight: 400,
|
|
246
|
-
});
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
231
|
## Requirements
|
|
252
232
|
|
|
253
233
|
- Vue 3.0.0 or higher
|
package/dist/components.d.ts
CHANGED
|
@@ -46,16 +46,11 @@ export declare const SdSelectListItemSearch: StencilVueComponent<JSX.SdSelectLis
|
|
|
46
46
|
export declare const SdSelectListbox: StencilVueComponent<JSX.SdSelectListbox>;
|
|
47
47
|
export declare const SdSelectTrigger: StencilVueComponent<JSX.SdSelectTrigger>;
|
|
48
48
|
export declare const SdSwitch: StencilVueComponent<JSX.SdSwitch, JSX.SdSwitch["value"]>;
|
|
49
|
-
export declare const SdTable: StencilVueComponent<JSX.SdTable, JSX.SdTable["selected"]>;
|
|
50
49
|
export declare const SdTabs: StencilVueComponent<JSX.SdTabs, JSX.SdTabs["value"]>;
|
|
51
50
|
export declare const SdTag: StencilVueComponent<JSX.SdTag>;
|
|
52
|
-
export declare const SdTbody: StencilVueComponent<JSX.SdTbody>;
|
|
53
|
-
export declare const SdTd: StencilVueComponent<JSX.SdTd>;
|
|
54
51
|
export declare const SdTextLink: StencilVueComponent<JSX.SdTextLink>;
|
|
55
52
|
export declare const SdTextarea: StencilVueComponent<JSX.SdTextarea, JSX.SdTextarea["value"]>;
|
|
56
|
-
export declare const SdThead: StencilVueComponent<JSX.SdThead>;
|
|
57
53
|
export declare const SdToast: StencilVueComponent<JSX.SdToast>;
|
|
58
54
|
export declare const SdToastContainer: StencilVueComponent<JSX.SdToastContainer>;
|
|
59
55
|
export declare const SdToggle: StencilVueComponent<JSX.SdToggle, JSX.SdToggle["value"]>;
|
|
60
56
|
export declare const SdTooltip: StencilVueComponent<JSX.SdTooltip>;
|
|
61
|
-
export declare const SdTr: StencilVueComponent<JSX.SdTr>;
|
package/dist/components.js
CHANGED
|
@@ -151,7 +151,8 @@ export const SdCircleProgress = /*@__PURE__*/ defineContainer('sd-circle-progres
|
|
|
151
151
|
'indeterminate',
|
|
152
152
|
'value',
|
|
153
153
|
'type',
|
|
154
|
-
'label'
|
|
154
|
+
'label',
|
|
155
|
+
'innerValue'
|
|
155
156
|
]);
|
|
156
157
|
export const SdConfirmModal = /*@__PURE__*/ defineContainer('sd-confirm-modal', undefined, [
|
|
157
158
|
'type',
|
|
@@ -165,7 +166,6 @@ export const SdConfirmModal = /*@__PURE__*/ defineContainer('sd-confirm-modal',
|
|
|
165
166
|
'tagPreset',
|
|
166
167
|
'tagLabel',
|
|
167
168
|
'slotLabel',
|
|
168
|
-
'tagContents',
|
|
169
169
|
'sdClose',
|
|
170
170
|
'sdCancel',
|
|
171
171
|
'sdOk'
|
|
@@ -304,6 +304,7 @@ export const SdFilePicker = /*@__PURE__*/ defineContainer('sd-file-picker', unde
|
|
|
304
304
|
'disabled',
|
|
305
305
|
'inline',
|
|
306
306
|
'multiple',
|
|
307
|
+
'useMultipleListBox',
|
|
307
308
|
'accept',
|
|
308
309
|
'maxFileSize',
|
|
309
310
|
'maxTotalSize',
|
|
@@ -419,6 +420,7 @@ export const SdInput = /*@__PURE__*/ defineContainer('sd-input', undefined, [
|
|
|
419
420
|
], 'value', 'sdUpdate', undefined);
|
|
420
421
|
export const SdKeyValueTable = /*@__PURE__*/ defineContainer('sd-key-value-table', undefined, [
|
|
421
422
|
'fields',
|
|
423
|
+
'values',
|
|
422
424
|
'search',
|
|
423
425
|
'radius',
|
|
424
426
|
'sdChange',
|
|
@@ -442,9 +444,11 @@ export const SdLoadingModal = /*@__PURE__*/ defineContainer('sd-loading-modal',
|
|
|
442
444
|
'width',
|
|
443
445
|
'height',
|
|
444
446
|
'progress',
|
|
445
|
-
'sdClick'
|
|
447
|
+
'sdClick',
|
|
448
|
+
'sdClose'
|
|
446
449
|
], [
|
|
447
|
-
'sdClick'
|
|
450
|
+
'sdClick',
|
|
451
|
+
'sdClose'
|
|
448
452
|
]);
|
|
449
453
|
export const SdModalContainer = /*@__PURE__*/ defineContainer('sd-modal-container', undefined, [
|
|
450
454
|
'autoRemove'
|
|
@@ -653,42 +657,6 @@ export const SdSwitch = /*@__PURE__*/ defineContainer('sd-switch', undefined, [
|
|
|
653
657
|
], [
|
|
654
658
|
'sdUpdate'
|
|
655
659
|
], 'value', 'sdUpdate', undefined);
|
|
656
|
-
export const SdTable = /*@__PURE__*/ defineContainer('sd-table', undefined, [
|
|
657
|
-
'tableId',
|
|
658
|
-
'columns',
|
|
659
|
-
'rows',
|
|
660
|
-
'selected',
|
|
661
|
-
'rowKey',
|
|
662
|
-
'selectable',
|
|
663
|
-
'resizable',
|
|
664
|
-
'width',
|
|
665
|
-
'height',
|
|
666
|
-
'stickyHeader',
|
|
667
|
-
'stickyColumn',
|
|
668
|
-
'radius',
|
|
669
|
-
'noDataLabel',
|
|
670
|
-
'isLoading',
|
|
671
|
-
'pagination',
|
|
672
|
-
'useInternalPagination',
|
|
673
|
-
'useRowsPerPageSelect',
|
|
674
|
-
'dense',
|
|
675
|
-
'useVirtualScroll',
|
|
676
|
-
'rowHeight',
|
|
677
|
-
'virtualBuffer',
|
|
678
|
-
'virtualEndThreshold',
|
|
679
|
-
'rowsPerPageOption',
|
|
680
|
-
'sdSelectChange',
|
|
681
|
-
'sdPageChange',
|
|
682
|
-
'sdRowsPerPageChange',
|
|
683
|
-
'sdVirtualUpdate',
|
|
684
|
-
'sdVirtualReachEnd'
|
|
685
|
-
], [
|
|
686
|
-
'sdSelectChange',
|
|
687
|
-
'sdPageChange',
|
|
688
|
-
'sdRowsPerPageChange',
|
|
689
|
-
'sdVirtualUpdate',
|
|
690
|
-
'sdVirtualReachEnd'
|
|
691
|
-
], 'selected', 'sdSelectChange', undefined);
|
|
692
660
|
export const SdTabs = /*@__PURE__*/ defineContainer('sd-tabs', undefined, [
|
|
693
661
|
'value',
|
|
694
662
|
'tabs',
|
|
@@ -706,20 +674,6 @@ export const SdTag = /*@__PURE__*/ defineContainer('sd-tag', undefined, [
|
|
|
706
674
|
'isLeft',
|
|
707
675
|
'width'
|
|
708
676
|
]);
|
|
709
|
-
export const SdTbody = /*@__PURE__*/ defineContainer('sd-tbody', undefined, [
|
|
710
|
-
'rows'
|
|
711
|
-
]);
|
|
712
|
-
export const SdTd = /*@__PURE__*/ defineContainer('sd-td', undefined, [
|
|
713
|
-
'field',
|
|
714
|
-
'rowKey',
|
|
715
|
-
'align',
|
|
716
|
-
'rowspan',
|
|
717
|
-
'colspan',
|
|
718
|
-
'sdClass',
|
|
719
|
-
'dividerLeft',
|
|
720
|
-
'dividerRight',
|
|
721
|
-
'useFrame'
|
|
722
|
-
]);
|
|
723
677
|
export const SdTextLink = /*@__PURE__*/ defineContainer('sd-text-link', undefined, [
|
|
724
678
|
'label',
|
|
725
679
|
'icon',
|
|
@@ -769,20 +723,6 @@ export const SdTextarea = /*@__PURE__*/ defineContainer('sd-textarea', undefined
|
|
|
769
723
|
'sdFocus',
|
|
770
724
|
'sdBlur'
|
|
771
725
|
], 'value', 'sdUpdate', undefined);
|
|
772
|
-
export const SdThead = /*@__PURE__*/ defineContainer('sd-thead', undefined, [
|
|
773
|
-
'columns',
|
|
774
|
-
'selectable',
|
|
775
|
-
'resizable',
|
|
776
|
-
'stickyColumn',
|
|
777
|
-
'stickyHeader',
|
|
778
|
-
'scrolledLeft',
|
|
779
|
-
'scrolledRight',
|
|
780
|
-
'rows',
|
|
781
|
-
'columnWidths',
|
|
782
|
-
'sdColumnSort'
|
|
783
|
-
], [
|
|
784
|
-
'sdColumnSort'
|
|
785
|
-
]);
|
|
786
726
|
export const SdToast = /*@__PURE__*/ defineContainer('sd-toast', undefined, [
|
|
787
727
|
'icon',
|
|
788
728
|
'message',
|
|
@@ -835,11 +775,3 @@ export const SdTooltip = /*@__PURE__*/ defineContainer('sd-tooltip', undefined,
|
|
|
835
775
|
'triggerClass',
|
|
836
776
|
'triggerStyle'
|
|
837
777
|
]);
|
|
838
|
-
export const SdTr = /*@__PURE__*/ defineContainer('sd-tr', undefined, [
|
|
839
|
-
'columns',
|
|
840
|
-
'selectable',
|
|
841
|
-
'stickyColumn',
|
|
842
|
-
'rowKey',
|
|
843
|
-
'row',
|
|
844
|
-
'separator'
|
|
845
|
-
]);
|
|
@@ -3,11 +3,6 @@ import { defineCustomElements as defineLazyCustomElements } from '@sellmate/desi
|
|
|
3
3
|
import { defineCustomElement as defineSdCircleProgress } from '@sellmate/design-system/dist/components/sd-circle-progress.js';
|
|
4
4
|
import { defineCustomElement as defineSdLinearProgress } from '@sellmate/design-system/dist/components/sd-linear-progress.js';
|
|
5
5
|
import { defineCustomElement as defineSdLoadingModal } from '@sellmate/design-system/dist/components/sd-loading-modal.js';
|
|
6
|
-
import { defineCustomElement as defineSdTable } from '@sellmate/design-system/dist/components/sd-table.js';
|
|
7
|
-
import { defineCustomElement as defineSdTbody } from '@sellmate/design-system/dist/components/sd-tbody.js';
|
|
8
|
-
import { defineCustomElement as defineSdTd } from '@sellmate/design-system/dist/components/sd-td.js';
|
|
9
|
-
import { defineCustomElement as defineSdThead } from '@sellmate/design-system/dist/components/sd-thead.js';
|
|
10
|
-
import { defineCustomElement as defineSdTr } from '@sellmate/design-system/dist/components/sd-tr.js';
|
|
11
6
|
import { defineCustomElement as defineSdDivider } from '@sellmate/design-system/dist/components/sd-divider.js';
|
|
12
7
|
export function defineCustomElements() {
|
|
13
8
|
if (typeof customElements === 'undefined')
|
|
@@ -16,11 +11,6 @@ export function defineCustomElements() {
|
|
|
16
11
|
defineSdCircleProgress();
|
|
17
12
|
defineSdLinearProgress();
|
|
18
13
|
defineSdLoadingModal();
|
|
19
|
-
defineSdTable();
|
|
20
|
-
defineSdTbody();
|
|
21
|
-
defineSdTd();
|
|
22
|
-
defineSdThead();
|
|
23
|
-
defineSdTr();
|
|
24
14
|
defineSdDivider();
|
|
25
15
|
// 나머지 컴포넌트는 Stencil loader가 lazy 등록
|
|
26
16
|
defineLazyCustomElements();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import '@sellmate/design-system/styles.css';
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './plugin';
|
|
4
|
-
export { useSdTableVirtualScroll } from './composables/useSdTableVirtualScroll';
|
|
5
|
-
export type { VirtualRow } from './composables/useSdTableVirtualScroll';
|
|
6
4
|
export { sdModal, SdModalVuePlugin } from './sdModal';
|
|
7
5
|
export { sdLoading } from '@sellmate/design-system/utils';
|
|
8
6
|
export type { SdLoadingShowOptions } from '@sellmate/design-system/utils';
|
|
9
|
-
export type { ButtonName, ButtonProps, ButtonType, ButtonSize, GhostButtonIntent, GhostButtonSize, DropdownButtonItem, DropdownButtonName, DropdownButtonSize, DropdownButtonValue, BadgeColor, FieldAddonAlign, FieldSize, Rule, FieldIdentifier, ValidatableField, InputSize, NumberInputSize, BarcodeInputSize, ChipInputSize, SdTooltipProps, TooltipType, CalloutType, CalendarEventGroup, CheckedType, RadioValue, RadioOption, SelectOption, SelectOptionSelectDetail, SelectType, SelectValue, ConfirmModalMainButton, ConfirmModalType, ConfirmModalOptions, TagName, SdModalCreateOptions, ModalDialogRefLike, SdLoadingShowArgs, LoadingModalState, LoadingModalOptions, Type as DateBoxType, DatePickerSize, DateRangeValue, SdKeyValueField, SdKeyValueChangeDetail, LinearProgressType, CircleProgressType, PopoverButton, PopoverLink, PopupType, GuideType, TextLinkSize, TabOption, TabSize, ToastType, ToastPosition, ToastEntry, ToastNotifyOptions,
|
|
7
|
+
export type { ButtonName, ButtonProps, ButtonType, ButtonSize, GhostButtonIntent, GhostButtonSize, DropdownButtonItem, DropdownButtonName, DropdownButtonSize, DropdownButtonValue, BadgeColor, FieldAddonAlign, FieldSize, Rule, FieldIdentifier, ValidatableField, InputSize, NumberInputSize, BarcodeInputSize, ChipInputSize, SdTooltipProps, TooltipType, CalloutType, CalendarEventGroup, CheckedType, RadioValue, RadioOption, SelectOption, SelectOptionSelectDetail, SelectType, SelectValue, ConfirmModalMainButton, ConfirmModalType, ConfirmModalOptions, TagName, SdModalCreateOptions, ModalDialogRefLike, SdLoadingShowArgs, LoadingModalState, LoadingModalOptions, Type as DateBoxType, DatePickerSize, DateRangeValue, SdKeyValueField, SdKeyValueChangeDetail, LinearProgressType, CircleProgressType, PopoverButton, PopoverLink, PopupType, GuideType, TextLinkSize, TabOption, TabSize, ToastType, ToastPosition, ToastEntry, ToastNotifyOptions, } from '@sellmate/design-system';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '@sellmate/design-system/styles.css';
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './plugin';
|
|
4
|
-
export { useSdTableVirtualScroll } from './composables/useSdTableVirtualScroll';
|
|
5
4
|
export { sdModal, SdModalVuePlugin } from './sdModal';
|
|
6
5
|
export { sdLoading } from '@sellmate/design-system/utils';
|
package/lib/components.ts
CHANGED
|
@@ -182,7 +182,8 @@ export const SdCircleProgress: StencilVueComponent<JSX.SdCircleProgress> = /*@__
|
|
|
182
182
|
'indeterminate',
|
|
183
183
|
'value',
|
|
184
184
|
'type',
|
|
185
|
-
'label'
|
|
185
|
+
'label',
|
|
186
|
+
'innerValue'
|
|
186
187
|
]);
|
|
187
188
|
|
|
188
189
|
|
|
@@ -198,7 +199,6 @@ export const SdConfirmModal: StencilVueComponent<JSX.SdConfirmModal> = /*@__PURE
|
|
|
198
199
|
'tagPreset',
|
|
199
200
|
'tagLabel',
|
|
200
201
|
'slotLabel',
|
|
201
|
-
'tagContents',
|
|
202
202
|
'sdClose',
|
|
203
203
|
'sdCancel',
|
|
204
204
|
'sdOk'
|
|
@@ -357,6 +357,7 @@ export const SdFilePicker: StencilVueComponent<JSX.SdFilePicker, JSX.SdFilePicke
|
|
|
357
357
|
'disabled',
|
|
358
358
|
'inline',
|
|
359
359
|
'multiple',
|
|
360
|
+
'useMultipleListBox',
|
|
360
361
|
'accept',
|
|
361
362
|
'maxFileSize',
|
|
362
363
|
'maxTotalSize',
|
|
@@ -488,6 +489,7 @@ export const SdInput: StencilVueComponent<JSX.SdInput, JSX.SdInput["value"]> = /
|
|
|
488
489
|
|
|
489
490
|
export const SdKeyValueTable: StencilVueComponent<JSX.SdKeyValueTable> = /*@__PURE__*/ defineContainer<JSX.SdKeyValueTable>('sd-key-value-table', undefined, [
|
|
490
491
|
'fields',
|
|
492
|
+
'values',
|
|
491
493
|
'search',
|
|
492
494
|
'radius',
|
|
493
495
|
'sdChange',
|
|
@@ -517,9 +519,11 @@ export const SdLoadingModal: StencilVueComponent<JSX.SdLoadingModal> = /*@__PURE
|
|
|
517
519
|
'width',
|
|
518
520
|
'height',
|
|
519
521
|
'progress',
|
|
520
|
-
'sdClick'
|
|
522
|
+
'sdClick',
|
|
523
|
+
'sdClose'
|
|
521
524
|
], [
|
|
522
|
-
'sdClick'
|
|
525
|
+
'sdClick',
|
|
526
|
+
'sdClose'
|
|
523
527
|
]);
|
|
524
528
|
|
|
525
529
|
|
|
@@ -767,45 +771,6 @@ export const SdSwitch: StencilVueComponent<JSX.SdSwitch, JSX.SdSwitch["value"]>
|
|
|
767
771
|
'value', 'sdUpdate', undefined);
|
|
768
772
|
|
|
769
773
|
|
|
770
|
-
export const SdTable: StencilVueComponent<JSX.SdTable, JSX.SdTable["selected"]> = /*@__PURE__*/ defineContainer<JSX.SdTable, JSX.SdTable["selected"]>('sd-table', undefined, [
|
|
771
|
-
'tableId',
|
|
772
|
-
'columns',
|
|
773
|
-
'rows',
|
|
774
|
-
'selected',
|
|
775
|
-
'rowKey',
|
|
776
|
-
'selectable',
|
|
777
|
-
'resizable',
|
|
778
|
-
'width',
|
|
779
|
-
'height',
|
|
780
|
-
'stickyHeader',
|
|
781
|
-
'stickyColumn',
|
|
782
|
-
'radius',
|
|
783
|
-
'noDataLabel',
|
|
784
|
-
'isLoading',
|
|
785
|
-
'pagination',
|
|
786
|
-
'useInternalPagination',
|
|
787
|
-
'useRowsPerPageSelect',
|
|
788
|
-
'dense',
|
|
789
|
-
'useVirtualScroll',
|
|
790
|
-
'rowHeight',
|
|
791
|
-
'virtualBuffer',
|
|
792
|
-
'virtualEndThreshold',
|
|
793
|
-
'rowsPerPageOption',
|
|
794
|
-
'sdSelectChange',
|
|
795
|
-
'sdPageChange',
|
|
796
|
-
'sdRowsPerPageChange',
|
|
797
|
-
'sdVirtualUpdate',
|
|
798
|
-
'sdVirtualReachEnd'
|
|
799
|
-
], [
|
|
800
|
-
'sdSelectChange',
|
|
801
|
-
'sdPageChange',
|
|
802
|
-
'sdRowsPerPageChange',
|
|
803
|
-
'sdVirtualUpdate',
|
|
804
|
-
'sdVirtualReachEnd'
|
|
805
|
-
],
|
|
806
|
-
'selected', 'sdSelectChange', undefined);
|
|
807
|
-
|
|
808
|
-
|
|
809
774
|
export const SdTabs: StencilVueComponent<JSX.SdTabs, JSX.SdTabs["value"]> = /*@__PURE__*/ defineContainer<JSX.SdTabs, JSX.SdTabs["value"]>('sd-tabs', undefined, [
|
|
810
775
|
'value',
|
|
811
776
|
'tabs',
|
|
@@ -828,24 +793,6 @@ export const SdTag: StencilVueComponent<JSX.SdTag> = /*@__PURE__*/ defineContain
|
|
|
828
793
|
]);
|
|
829
794
|
|
|
830
795
|
|
|
831
|
-
export const SdTbody: StencilVueComponent<JSX.SdTbody> = /*@__PURE__*/ defineContainer<JSX.SdTbody>('sd-tbody', undefined, [
|
|
832
|
-
'rows'
|
|
833
|
-
]);
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
export const SdTd: StencilVueComponent<JSX.SdTd> = /*@__PURE__*/ defineContainer<JSX.SdTd>('sd-td', undefined, [
|
|
837
|
-
'field',
|
|
838
|
-
'rowKey',
|
|
839
|
-
'align',
|
|
840
|
-
'rowspan',
|
|
841
|
-
'colspan',
|
|
842
|
-
'sdClass',
|
|
843
|
-
'dividerLeft',
|
|
844
|
-
'dividerRight',
|
|
845
|
-
'useFrame'
|
|
846
|
-
]);
|
|
847
|
-
|
|
848
|
-
|
|
849
796
|
export const SdTextLink: StencilVueComponent<JSX.SdTextLink> = /*@__PURE__*/ defineContainer<JSX.SdTextLink>('sd-text-link', undefined, [
|
|
850
797
|
'label',
|
|
851
798
|
'icon',
|
|
@@ -900,22 +847,6 @@ export const SdTextarea: StencilVueComponent<JSX.SdTextarea, JSX.SdTextarea["val
|
|
|
900
847
|
'value', 'sdUpdate', undefined);
|
|
901
848
|
|
|
902
849
|
|
|
903
|
-
export const SdThead: StencilVueComponent<JSX.SdThead> = /*@__PURE__*/ defineContainer<JSX.SdThead>('sd-thead', undefined, [
|
|
904
|
-
'columns',
|
|
905
|
-
'selectable',
|
|
906
|
-
'resizable',
|
|
907
|
-
'stickyColumn',
|
|
908
|
-
'stickyHeader',
|
|
909
|
-
'scrolledLeft',
|
|
910
|
-
'scrolledRight',
|
|
911
|
-
'rows',
|
|
912
|
-
'columnWidths',
|
|
913
|
-
'sdColumnSort'
|
|
914
|
-
], [
|
|
915
|
-
'sdColumnSort'
|
|
916
|
-
]);
|
|
917
|
-
|
|
918
|
-
|
|
919
850
|
export const SdToast: StencilVueComponent<JSX.SdToast> = /*@__PURE__*/ defineContainer<JSX.SdToast>('sd-toast', undefined, [
|
|
920
851
|
'icon',
|
|
921
852
|
'message',
|
|
@@ -976,13 +907,3 @@ export const SdTooltip: StencilVueComponent<JSX.SdTooltip> = /*@__PURE__*/ defin
|
|
|
976
907
|
'triggerStyle'
|
|
977
908
|
]);
|
|
978
909
|
|
|
979
|
-
|
|
980
|
-
export const SdTr: StencilVueComponent<JSX.SdTr> = /*@__PURE__*/ defineContainer<JSX.SdTr>('sd-tr', undefined, [
|
|
981
|
-
'columns',
|
|
982
|
-
'selectable',
|
|
983
|
-
'stickyColumn',
|
|
984
|
-
'rowKey',
|
|
985
|
-
'row',
|
|
986
|
-
'separator'
|
|
987
|
-
]);
|
|
988
|
-
|
|
@@ -4,11 +4,6 @@ import { defineCustomElements as defineLazyCustomElements } from '@sellmate/desi
|
|
|
4
4
|
import { defineCustomElement as defineSdCircleProgress } from '@sellmate/design-system/dist/components/sd-circle-progress.js';
|
|
5
5
|
import { defineCustomElement as defineSdLinearProgress } from '@sellmate/design-system/dist/components/sd-linear-progress.js';
|
|
6
6
|
import { defineCustomElement as defineSdLoadingModal } from '@sellmate/design-system/dist/components/sd-loading-modal.js';
|
|
7
|
-
import { defineCustomElement as defineSdTable } from '@sellmate/design-system/dist/components/sd-table.js';
|
|
8
|
-
import { defineCustomElement as defineSdTbody } from '@sellmate/design-system/dist/components/sd-tbody.js';
|
|
9
|
-
import { defineCustomElement as defineSdTd } from '@sellmate/design-system/dist/components/sd-td.js';
|
|
10
|
-
import { defineCustomElement as defineSdThead } from '@sellmate/design-system/dist/components/sd-thead.js';
|
|
11
|
-
import { defineCustomElement as defineSdTr } from '@sellmate/design-system/dist/components/sd-tr.js';
|
|
12
7
|
import { defineCustomElement as defineSdDivider } from '@sellmate/design-system/dist/components/sd-divider.js';
|
|
13
8
|
|
|
14
9
|
export function defineCustomElements(): void {
|
|
@@ -18,11 +13,6 @@ export function defineCustomElements(): void {
|
|
|
18
13
|
defineSdCircleProgress();
|
|
19
14
|
defineSdLinearProgress();
|
|
20
15
|
defineSdLoadingModal();
|
|
21
|
-
defineSdTable();
|
|
22
|
-
defineSdTbody();
|
|
23
|
-
defineSdTd();
|
|
24
|
-
defineSdThead();
|
|
25
|
-
defineSdTr();
|
|
26
16
|
defineSdDivider();
|
|
27
17
|
|
|
28
18
|
// 나머지 컴포넌트는 Stencil loader가 lazy 등록
|
package/lib/index.ts
CHANGED
|
@@ -2,8 +2,6 @@ import '@sellmate/design-system/styles.css';
|
|
|
2
2
|
|
|
3
3
|
export * from './components';
|
|
4
4
|
export * from './plugin';
|
|
5
|
-
export { useSdTableVirtualScroll } from './composables/useSdTableVirtualScroll';
|
|
6
|
-
export type { VirtualRow } from './composables/useSdTableVirtualScroll';
|
|
7
5
|
export { sdModal, SdModalVuePlugin } from './sdModal';
|
|
8
6
|
export { sdLoading } from '@sellmate/design-system/utils';
|
|
9
7
|
export type { SdLoadingShowOptions } from '@sellmate/design-system/utils';
|
|
@@ -92,10 +90,4 @@ export type {
|
|
|
92
90
|
ToastPosition,
|
|
93
91
|
ToastEntry,
|
|
94
92
|
ToastNotifyOptions,
|
|
95
|
-
// Table types
|
|
96
|
-
SdTableColumn,
|
|
97
|
-
Row as SdTableRow,
|
|
98
|
-
SdTablePagination,
|
|
99
|
-
SdTableStickyColumn,
|
|
100
|
-
SdTableConfig,
|
|
101
93
|
} from '@sellmate/design-system';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellmate/design-system-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.0",
|
|
4
4
|
"description": "Design System - Vue Component Wrappers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vue": "^3.4.38"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@sellmate/design-system": "^1.
|
|
50
|
+
"@sellmate/design-system": "^1.29.0",
|
|
51
51
|
"@stencil/vue-output-target": "^0.11.8"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ref, computed, onMounted, onUnmounted, type Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface VirtualRow<T = Record<string, any>> {
|
|
4
|
-
/** 전체 rows 기준 절대 인덱스 — sd-tr의 rowKey로 사용 */
|
|
5
|
-
index: number;
|
|
6
|
-
row: T;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface SdVirtualUpdateDetail {
|
|
10
|
-
from: number;
|
|
11
|
-
to: number;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function useSdTableVirtualScroll<T extends Record<string, any>>(
|
|
15
|
-
tableRef: Ref<any>,
|
|
16
|
-
rows: Ref<T[]>,
|
|
17
|
-
) {
|
|
18
|
-
const range = ref<{ from: number; to: number } | null>(null);
|
|
19
|
-
|
|
20
|
-
let targetEl: HTMLElement | null = null;
|
|
21
|
-
let rafId = 0;
|
|
22
|
-
|
|
23
|
-
const onVirtualUpdate = (e: Event) => {
|
|
24
|
-
const { from, to } = (e as CustomEvent<SdVirtualUpdateDetail>).detail;
|
|
25
|
-
range.value = { from, to };
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const syncRange = (el: HTMLElement): boolean => {
|
|
29
|
-
const currentRange = (el as any).getVirtualScrollRangeSync?.();
|
|
30
|
-
if (
|
|
31
|
-
currentRange &&
|
|
32
|
-
typeof currentRange.from === 'number' &&
|
|
33
|
-
typeof currentRange.to === 'number'
|
|
34
|
-
) {
|
|
35
|
-
range.value = { from: currentRange.from, to: currentRange.to };
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const attachWhenReady = () => {
|
|
42
|
-
// Stencil Vue 래퍼는 expose()를 사용하지 않으므로 $el로 실제 custom element에 접근
|
|
43
|
-
const raw = (tableRef.value as any)?.$el ?? tableRef.value;
|
|
44
|
-
const el: HTMLElement | null = raw instanceof HTMLElement ? raw : null;
|
|
45
|
-
if (!el) {
|
|
46
|
-
rafId = requestAnimationFrame(attachWhenReady);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
targetEl = el;
|
|
51
|
-
targetEl.addEventListener('sdVirtualUpdate', onVirtualUpdate);
|
|
52
|
-
|
|
53
|
-
const trySync = () => {
|
|
54
|
-
if (!targetEl) return;
|
|
55
|
-
if (!syncRange(targetEl)) {
|
|
56
|
-
rafId = requestAnimationFrame(trySync);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
trySync();
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
onMounted(() => {
|
|
64
|
-
attachWhenReady();
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
onUnmounted(() => {
|
|
68
|
-
cancelAnimationFrame(rafId);
|
|
69
|
-
targetEl?.removeEventListener('sdVirtualUpdate', onVirtualUpdate);
|
|
70
|
-
targetEl = null;
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const virtualRows = computed<VirtualRow<T>[]>(() => {
|
|
74
|
-
if (!range.value) return [];
|
|
75
|
-
const { from, to } = range.value;
|
|
76
|
-
return rows.value.slice(from, to).map((row, i) => ({ index: from + i, row }));
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
virtualRows,
|
|
81
|
-
from: computed(() => range.value?.from ?? 0),
|
|
82
|
-
to: computed(() => range.value?.to ?? 0),
|
|
83
|
-
};
|
|
84
|
-
}
|