@sdata/web-vue 3.2.0 → 3.3.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.
Files changed (72) hide show
  1. package/README.md +2 -2
  2. package/dist/sd.css +89 -9
  3. package/dist/sd.min.css +1 -1
  4. package/es/_components/select-view/style/index.css +4 -2
  5. package/es/_components/virtual-list-v2/hooks/use-size.d.ts +17 -0
  6. package/es/_components/virtual-list-v2/hooks/use-size.js +95 -0
  7. package/es/_components/virtual-list-v2/index.d.ts +2 -0
  8. package/es/_components/virtual-list-v2/index.js +5 -0
  9. package/es/_components/virtual-list-v2/interface.d.ts +44 -0
  10. package/es/_components/virtual-list-v2/virtual-list-item.d.ts +22 -0
  11. package/es/_components/virtual-list-v2/virtual-list-item.js +37 -0
  12. package/es/_components/virtual-list-v2/virtual-list.js +47 -0
  13. package/es/_components/virtual-list-v2/virtual-list.vue.d.ts +749 -0
  14. package/es/_components/virtual-list-v2/virtual-list.vue_vue_type_script_lang.js +179 -0
  15. package/es/_hooks/use-config-provider-prop.d.ts +1 -1
  16. package/es/_virtual/_plugin-vue_export-helper.js +8 -0
  17. package/es/color-picker/hooks/use-control-block.js +4 -1
  18. package/es/components.d.ts +1 -0
  19. package/es/config-provider/config-provider.vue.d.ts +7 -1
  20. package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +7 -1
  21. package/es/config-provider/context.d.ts +14 -0
  22. package/es/config-provider/index.d.ts +9 -0
  23. package/es/image/hooks/use-image-drag.js +1 -1
  24. package/es/index.css +89 -9
  25. package/es/index.d.ts +2 -0
  26. package/es/index.js +2 -1
  27. package/es/index.scss +1 -0
  28. package/es/input-tag/style/index.css +4 -2
  29. package/es/input-tag/style/input-tag.scss +29 -7
  30. package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/es/pagination/pagination.js +101 -19
  32. package/es/sd-vue.js +2 -0
  33. package/es/table/context.d.ts +1 -1
  34. package/es/table/hooks/use-column-resize.d.ts +3 -2
  35. package/es/table/hooks/use-column-resize.js +21 -48
  36. package/es/table/hooks/use-drag.d.ts +1 -3
  37. package/es/table/hooks/use-drag.js +2 -18
  38. package/es/table/index.d.ts +21 -36
  39. package/es/table/style/index.css +12 -5
  40. package/es/table/style/index.scss +16 -6
  41. package/es/table/table-operation-td.js +15 -12
  42. package/es/table/table-operation-th.js +2 -2
  43. package/es/table/table-tbody.js +3 -1
  44. package/es/table/table-td.js +3 -4
  45. package/es/table/table-th.js +24 -40
  46. package/es/table/table-thead.js +3 -1
  47. package/es/table/table.d.ts +13 -19
  48. package/es/table/table.js +205 -424
  49. package/es/table/utils.d.ts +2 -0
  50. package/es/table/utils.js +11 -1
  51. package/es/tag/index.d.ts +3 -3
  52. package/es/tag/tag.vue.d.ts +2 -2
  53. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +16 -5
  54. package/es/toolbar/index.d.ts +72 -0
  55. package/es/toolbar/index.js +10 -0
  56. package/es/toolbar/style/css.js +2 -0
  57. package/es/toolbar/style/index.css +85 -0
  58. package/es/toolbar/style/index.d.ts +2 -0
  59. package/es/toolbar/style/index.js +2 -0
  60. package/es/toolbar/style/index.scss +97 -0
  61. package/es/toolbar/style/token.scss +25 -0
  62. package/es/toolbar/toolbar.js +5 -0
  63. package/es/toolbar/toolbar.vue.d.ts +44 -0
  64. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +197 -0
  65. package/es/toolbar/types.d.ts +26 -0
  66. package/es/trigger/interface.d.ts +7 -0
  67. package/es/trigger/trigger.js +5 -1
  68. package/json/vetur-attributes.json +76 -1
  69. package/json/vetur-tags.json +24 -0
  70. package/json/web-types.json +163 -7
  71. package/package.json +1 -1
  72. package/es/table/table-col-group.vue.d.ts +0 -29
@@ -0,0 +1,26 @@
1
+ import type { JsonFormSchema } from '../json-form';
2
+ export type ToolbarModelValue = Record<string, unknown>;
3
+ export interface ToolbarProps {
4
+ schemas?: JsonFormSchema<string>[];
5
+ loading?: boolean;
6
+ showSearch?: boolean;
7
+ showReset?: boolean;
8
+ showActions?: boolean;
9
+ searchText?: string;
10
+ resetText?: string;
11
+ expandText?: string;
12
+ collapseText?: string;
13
+ allowExpand?: boolean;
14
+ defaultExpand?: boolean;
15
+ itemHeight?: number;
16
+ spanWidth?: number;
17
+ itemMaxWidth?: string;
18
+ showBorderBottom?: boolean;
19
+ resetSkipKeys?: string[];
20
+ }
21
+ export interface ToolbarEmits {
22
+ search: [params: ToolbarModelValue];
23
+ reset: [];
24
+ }
25
+ export type ToolbarSearchEventHandler = (params: ToolbarModelValue) => void;
26
+ export type ToolbarResetEventHandler = () => void;
@@ -37,5 +37,12 @@ export interface TriggerProps {
37
37
  autoFixPosition?: boolean;
38
38
  popupContainer?: string | HTMLElement;
39
39
  updateAtScroll?: boolean;
40
+ autoFitTransformOrigin?: boolean;
41
+ hideEmpty?: boolean;
42
+ opendClass?: string | string[] | Record<string, boolean>;
40
43
  autoFitPosition?: boolean;
44
+ renderToBody?: boolean;
45
+ preventFocus?: boolean;
46
+ scrollToClose?: boolean;
47
+ scrollToCloseDistance?: number;
41
48
  }
@@ -563,7 +563,11 @@ var trigger_default = /* @__PURE__ */ defineComponent({
563
563
  const handlePopupMouseDown = (e) => {
564
564
  if (props.preventFocus) e.preventDefault();
565
565
  };
566
- if (popupRef.value) triggerCtx === null || triggerCtx === void 0 || triggerCtx.addChildRef(popupRef.value);
566
+ watch(popupRef, (el, _oldEl, onCleanup) => {
567
+ if (!el) return;
568
+ triggerCtx === null || triggerCtx === void 0 || triggerCtx.addChildRef(el);
569
+ onCleanup(() => triggerCtx === null || triggerCtx === void 0 ? void 0 : triggerCtx.removeChildRef(el));
570
+ }, { immediate: true });
567
571
  const triggerCls = computed(() => {
568
572
  return computedVisible.value ? props.openedClass : void 0;
569
573
  });
@@ -661,6 +661,9 @@
661
661
  "sd-config-provider/drawer": {
662
662
  "description": "Default config for Drawer"
663
663
  },
664
+ "sd-config-provider/pagination": {
665
+ "description": "Default config for Pagination"
666
+ },
664
667
  "sd-config-provider/json-form": {
665
668
  "description": "Default config for JsonForm"
666
669
  },
@@ -3184,6 +3187,10 @@
3184
3187
  "sd-table/size": {
3185
3188
  "description": "The size of the table"
3186
3189
  },
3190
+ "sd-table/table-layout-fixed": {
3191
+ "description": "The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.",
3192
+ "type": "boolean"
3193
+ },
3187
3194
  "sd-table/loading": {
3188
3195
  "description": "Whether it is loading state",
3189
3196
  "type": "boolean|object"
@@ -3518,7 +3525,7 @@
3518
3525
  "type": "string"
3519
3526
  },
3520
3527
  "sd-tag/background-alpha": {
3521
- "description": "Background opacity for custom color tags, only effective when using a custom color, default 0.8",
3528
+ "description": "Background opacity for custom color tags, only effective when using a custom color. When not explicitly set, uses the color's own opacity if it has one, otherwise 0.8",
3522
3529
  "type": "number"
3523
3530
  },
3524
3531
  "sd-textarea/input": {
@@ -3711,6 +3718,74 @@
3711
3718
  "sd-timeline/label-position": {
3712
3719
  "description": "Position of label text"
3713
3720
  },
3721
+ "sd-toolbar/search": {
3722
+ "description": "Emitted when the search button is clicked, Enter is pressed, or `search()` is called"
3723
+ },
3724
+ "sd-toolbar/reset": {
3725
+ "description": "Emitted when the reset button is clicked or `reset()` is called"
3726
+ },
3727
+ "sd-toolbar/schemas": {
3728
+ "description": "Schema-driven filter items; the form is not rendered when empty and the default slot is absent"
3729
+ },
3730
+ "sd-toolbar/loading": {
3731
+ "description": "Whether the toolbar is loading (an overlay over the content)",
3732
+ "type": "boolean"
3733
+ },
3734
+ "sd-toolbar/show-search": {
3735
+ "description": "Whether to show the search button",
3736
+ "type": "boolean"
3737
+ },
3738
+ "sd-toolbar/show-reset": {
3739
+ "description": "Whether to show the reset button",
3740
+ "type": "boolean"
3741
+ },
3742
+ "sd-toolbar/show-actions": {
3743
+ "description": "Whether to show the right-side action area",
3744
+ "type": "boolean"
3745
+ },
3746
+ "sd-toolbar/search-text": {
3747
+ "description": "Text of the search button",
3748
+ "type": "string"
3749
+ },
3750
+ "sd-toolbar/reset-text": {
3751
+ "description": "Text of the reset button",
3752
+ "type": "string"
3753
+ },
3754
+ "sd-toolbar/expand-text": {
3755
+ "description": "Text shown when the toolbar can be expanded",
3756
+ "type": "string"
3757
+ },
3758
+ "sd-toolbar/collapse-text": {
3759
+ "description": "Text shown when the toolbar can be collapsed",
3760
+ "type": "string"
3761
+ },
3762
+ "sd-toolbar/allow-expand": {
3763
+ "description": "Whether to allow expand/collapse when content overflows",
3764
+ "type": "boolean"
3765
+ },
3766
+ "sd-toolbar/default-expand": {
3767
+ "description": "Whether the toolbar is expanded initially (uncontrolled)",
3768
+ "type": "boolean"
3769
+ },
3770
+ "sd-toolbar/item-height": {
3771
+ "description": "Single row height in px, used for collapsed clipping and overflow detection",
3772
+ "type": "number"
3773
+ },
3774
+ "sd-toolbar/span-width": {
3775
+ "description": "Minimum column width in px for each filter item",
3776
+ "type": "number"
3777
+ },
3778
+ "sd-toolbar/item-max-width": {
3779
+ "description": "Maximum width of each filter item (any CSS width value); defaults to `unset` (unlimited)",
3780
+ "type": "string"
3781
+ },
3782
+ "sd-toolbar/show-border-bottom": {
3783
+ "description": "Whether to show the bottom divider",
3784
+ "type": "boolean"
3785
+ },
3786
+ "sd-toolbar/reset-skip-keys": {
3787
+ "description": "Field names whose current values should be preserved (not reset) on reset"
3788
+ },
3714
3789
  "sd-tooltip/popup-visible-change": {
3715
3790
  "description": "Emitted when the tooltip display status changes"
3716
3791
  },
@@ -296,6 +296,7 @@
296
296
  "date-picker",
297
297
  "modal",
298
298
  "drawer",
299
+ "pagination",
299
300
  "json-form",
300
301
  "theme",
301
302
  "theme-mode"
@@ -1304,6 +1305,7 @@
1304
1305
  "hoverable",
1305
1306
  "stripe",
1306
1307
  "size",
1308
+ "table-layout-fixed",
1307
1309
  "loading",
1308
1310
  "row-selection",
1309
1311
  "expandable",
@@ -1511,6 +1513,28 @@
1511
1513
  "label-position"
1512
1514
  ]
1513
1515
  },
1516
+ "sd-toolbar": {
1517
+ "attributes": [
1518
+ "search",
1519
+ "reset",
1520
+ "schemas",
1521
+ "loading",
1522
+ "show-search",
1523
+ "show-reset",
1524
+ "show-actions",
1525
+ "search-text",
1526
+ "reset-text",
1527
+ "expand-text",
1528
+ "collapse-text",
1529
+ "allow-expand",
1530
+ "default-expand",
1531
+ "item-height",
1532
+ "span-width",
1533
+ "item-max-width",
1534
+ "show-border-bottom",
1535
+ "reset-skip-keys"
1536
+ ]
1537
+ },
1514
1538
  "sd-tooltip": {
1515
1539
  "attributes": [
1516
1540
  "popup-visible-change",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "@sdata/web-vue",
5
- "version": "3.1.0",
5
+ "version": "3.2.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -1721,6 +1721,14 @@
1721
1721
  "kind": "expression"
1722
1722
  }
1723
1723
  },
1724
+ {
1725
+ "name": "pagination",
1726
+ "description": "Default config for Pagination",
1727
+ "value": {
1728
+ "type": "ConfigProviderPagination",
1729
+ "kind": "expression"
1730
+ }
1731
+ },
1724
1732
  {
1725
1733
  "name": "json-form",
1726
1734
  "description": "Default config for JsonForm",
@@ -7601,6 +7609,14 @@
7601
7609
  "kind": "expression"
7602
7610
  }
7603
7611
  },
7612
+ {
7613
+ "name": "table-layout-fixed",
7614
+ "description": "The table-layout property of the table is set to fixed. After it is set to fixed, the width of the table will not be stretched beyond 100% by the content.",
7615
+ "value": {
7616
+ "type": "boolean",
7617
+ "kind": "expression"
7618
+ }
7619
+ },
7604
7620
  {
7605
7621
  "name": "loading",
7606
7622
  "description": "Whether it is loading state",
@@ -7677,7 +7693,7 @@
7677
7693
  "name": "virtual-list-props",
7678
7694
  "description": "Pass the virtual list attribute, pass in this parameter to turn on virtual scrolling [VirtualListProps](#VirtualListProps)",
7679
7695
  "value": {
7680
- "type": "TableVirtualListProps",
7696
+ "type": "VirtualListProps",
7681
7697
  "kind": "expression"
7682
7698
  }
7683
7699
  },
@@ -7925,10 +7941,6 @@
7925
7941
  "name": "thead",
7926
7942
  "description": "Custom thead element"
7927
7943
  },
7928
- {
7929
- "name": "append",
7930
- "description": "Content inserted after the last table row"
7931
- },
7932
7944
  {
7933
7945
  "name": "empty",
7934
7946
  "description": "Empty"
@@ -8561,7 +8573,7 @@
8561
8573
  },
8562
8574
  {
8563
8575
  "name": "background-alpha",
8564
- "description": "Background opacity for custom color tags, only effective when using a custom color, default 0.8",
8576
+ "description": "Background opacity for custom color tags, only effective when using a custom color. When not explicitly set, uses the color's own opacity if it has one, otherwise 0.8",
8565
8577
  "value": {
8566
8578
  "type": "number",
8567
8579
  "kind": "expression"
@@ -9025,6 +9037,150 @@
9025
9037
  }
9026
9038
  ]
9027
9039
  },
9040
+ {
9041
+ "name": "sd-toolbar",
9042
+ "attributes": [
9043
+ {
9044
+ "name": "schemas",
9045
+ "description": "Schema-driven filter items; the form is not rendered when empty and the default slot is absent",
9046
+ "value": {
9047
+ "type": "Array",
9048
+ "kind": "expression"
9049
+ }
9050
+ },
9051
+ {
9052
+ "name": "loading",
9053
+ "description": "Whether the toolbar is loading (an overlay over the content)",
9054
+ "value": {
9055
+ "type": "boolean",
9056
+ "kind": "expression"
9057
+ }
9058
+ },
9059
+ {
9060
+ "name": "show-search",
9061
+ "description": "Whether to show the search button",
9062
+ "value": {
9063
+ "type": "boolean",
9064
+ "kind": "expression"
9065
+ }
9066
+ },
9067
+ {
9068
+ "name": "show-reset",
9069
+ "description": "Whether to show the reset button",
9070
+ "value": {
9071
+ "type": "boolean",
9072
+ "kind": "expression"
9073
+ }
9074
+ },
9075
+ {
9076
+ "name": "show-actions",
9077
+ "description": "Whether to show the right-side action area",
9078
+ "value": {
9079
+ "type": "boolean",
9080
+ "kind": "expression"
9081
+ }
9082
+ },
9083
+ {
9084
+ "name": "search-text",
9085
+ "description": "Text of the search button",
9086
+ "value": {
9087
+ "type": "string",
9088
+ "kind": "expression"
9089
+ }
9090
+ },
9091
+ {
9092
+ "name": "reset-text",
9093
+ "description": "Text of the reset button",
9094
+ "value": {
9095
+ "type": "string",
9096
+ "kind": "expression"
9097
+ }
9098
+ },
9099
+ {
9100
+ "name": "expand-text",
9101
+ "description": "Text shown when the toolbar can be expanded",
9102
+ "value": {
9103
+ "type": "string",
9104
+ "kind": "expression"
9105
+ }
9106
+ },
9107
+ {
9108
+ "name": "collapse-text",
9109
+ "description": "Text shown when the toolbar can be collapsed",
9110
+ "value": {
9111
+ "type": "string",
9112
+ "kind": "expression"
9113
+ }
9114
+ },
9115
+ {
9116
+ "name": "allow-expand",
9117
+ "description": "Whether to allow expand/collapse when content overflows",
9118
+ "value": {
9119
+ "type": "boolean",
9120
+ "kind": "expression"
9121
+ }
9122
+ },
9123
+ {
9124
+ "name": "default-expand",
9125
+ "description": "Whether the toolbar is expanded initially (uncontrolled)",
9126
+ "value": {
9127
+ "type": "boolean",
9128
+ "kind": "expression"
9129
+ }
9130
+ },
9131
+ {
9132
+ "name": "item-height",
9133
+ "description": "Single row height in px, used for collapsed clipping and overflow detection",
9134
+ "value": {
9135
+ "type": "number",
9136
+ "kind": "expression"
9137
+ }
9138
+ },
9139
+ {
9140
+ "name": "span-width",
9141
+ "description": "Minimum column width in px for each filter item",
9142
+ "value": {
9143
+ "type": "number",
9144
+ "kind": "expression"
9145
+ }
9146
+ },
9147
+ {
9148
+ "name": "item-max-width",
9149
+ "description": "Maximum width of each filter item (any CSS width value); defaults to `unset` (unlimited)",
9150
+ "value": {
9151
+ "type": "string",
9152
+ "kind": "expression"
9153
+ }
9154
+ },
9155
+ {
9156
+ "name": "show-border-bottom",
9157
+ "description": "Whether to show the bottom divider",
9158
+ "value": {
9159
+ "type": "boolean",
9160
+ "kind": "expression"
9161
+ }
9162
+ },
9163
+ {
9164
+ "name": "reset-skip-keys",
9165
+ "description": "Field names whose current values should be preserved (not reset) on reset",
9166
+ "value": {
9167
+ "type": "Array",
9168
+ "kind": "expression"
9169
+ }
9170
+ }
9171
+ ],
9172
+ "events": [
9173
+ {
9174
+ "name": "search",
9175
+ "description": "Emitted when the search button is clicked, Enter is pressed, or `search()` is called"
9176
+ },
9177
+ {
9178
+ "name": "reset",
9179
+ "description": "Emitted when the reset button is clicked or `reset()` is called"
9180
+ }
9181
+ ],
9182
+ "slots": []
9183
+ },
9028
9184
  {
9029
9185
  "name": "sd-tooltip",
9030
9186
  "attributes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdata/web-vue",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "SD Design Vue: A Vue.js 3 UI Library",
5
5
  "keywords": [
6
6
  "sd",
@@ -1,29 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { TableColumnData, TableOperationColumn } from './interface';
3
- declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- dataColumns: {
5
- type: PropType<TableColumnData[]>;
6
- required: true;
7
- };
8
- operations: {
9
- type: PropType<TableOperationColumn[]>;
10
- required: true;
11
- };
12
- columnWidth: {
13
- type: PropType<Record<string, number>>;
14
- };
15
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
- dataColumns: {
17
- type: PropType<TableColumnData[]>;
18
- required: true;
19
- };
20
- operations: {
21
- type: PropType<TableOperationColumn[]>;
22
- required: true;
23
- };
24
- columnWidth: {
25
- type: PropType<Record<string, number>>;
26
- };
27
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
- declare const _default: typeof __VLS_export;
29
- export default _default;