@geelato/web-vue 2.57.1 → 2.58.1

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 (81) hide show
  1. package/dist/arco-vue.js +872 -535
  2. package/dist/arco-vue.js.map +1 -1
  3. package/dist/arco-vue.min.js +1645 -1546
  4. package/dist/arco-vue.min.js.map +1 -1
  5. package/dist/arco.css +39 -8
  6. package/dist/arco.min.css +1 -1
  7. package/es/_components/picker/input-range.d.ts +2 -2
  8. package/es/_components/picker/input.d.ts +1 -1
  9. package/es/_components/virtual-list-v2/virtual-list.d.ts +3 -3
  10. package/es/_utils/array.d.ts +1 -1
  11. package/es/_utils/array.js +18 -1
  12. package/es/date-picker/index.d.ts +7 -7
  13. package/es/date-picker/panels/date/index.d.ts +2 -2
  14. package/es/date-picker/panels/week/index.d.ts +2 -2
  15. package/es/date-picker/picker-panel.d.ts +4 -4
  16. package/es/date-picker/picker.d.ts +5 -5
  17. package/es/date-picker/range-picker-panel.d.ts +4 -4
  18. package/es/date-picker/range-picker.d.ts +7 -7
  19. package/es/drawer/drawer.d.ts +24 -0
  20. package/es/drawer/drawer.js +61 -6
  21. package/es/drawer/index.d.ts +45 -0
  22. package/es/drawer/style/index.css +10 -0
  23. package/es/drawer/style/index.less +12 -0
  24. package/es/index.css +39 -8
  25. package/es/mention/index.d.ts +3 -3
  26. package/es/mention/mention.d.ts +1 -1
  27. package/es/menu/item.d.ts +1 -1
  28. package/es/menu/sub-menu-pop.d.ts +1 -1
  29. package/es/message/message.d.ts +1 -1
  30. package/es/modal/index.d.ts +33 -3
  31. package/es/modal/modal.d.ts +16 -1
  32. package/es/modal/modal.js +23 -6
  33. package/es/modal/modal.vue_vue_type_script_lang.js +26 -2
  34. package/es/modal/style/index.css +7 -1
  35. package/es/modal/style/index.less +8 -1
  36. package/es/pagination/index.d.ts +3 -3
  37. package/es/pagination/pagination.d.ts +1 -1
  38. package/es/table/context.d.ts +3 -0
  39. package/es/table/hooks/use-row-selection.js +5 -3
  40. package/es/table/interface.d.ts +1 -1
  41. package/es/table/style/index.css +22 -7
  42. package/es/table/style/index.less +25 -8
  43. package/es/table/table-operation-td.js +6 -6
  44. package/es/table/table-operation-th.js +19 -7
  45. package/es/table/table-td.js +2 -2
  46. package/es/table/table.js +165 -33
  47. package/es/table/utils.d.ts +1 -1
  48. package/es/table/utils.js +9 -5
  49. package/es/time-picker/index.d.ts +14 -14
  50. package/es/time-picker/panel.d.ts +2 -2
  51. package/es/time-picker/range-panel.d.ts +2 -2
  52. package/es/time-picker/time-picker.d.ts +7 -7
  53. package/es/tree/index.d.ts +6 -6
  54. package/es/tree/tree.d.ts +3 -3
  55. package/es/tree-select/index.d.ts +12 -12
  56. package/es/tree-select/panel.d.ts +6 -6
  57. package/es/tree-select/tree-select.d.ts +6 -6
  58. package/es/typography/index.d.ts +3 -3
  59. package/es/typography/title.d.ts +3 -3
  60. package/json/vetur-attributes.json +2491 -2491
  61. package/json/vetur-tags.json +889 -889
  62. package/json/web-types.json +4726 -4726
  63. package/lib/_utils/array.js +18 -1
  64. package/lib/drawer/drawer.js +63 -8
  65. package/lib/drawer/style/index.css +10 -0
  66. package/lib/drawer/style/index.less +12 -0
  67. package/lib/index.css +39 -8
  68. package/lib/modal/modal.js +23 -6
  69. package/lib/modal/modal.vue_vue_type_script_lang.js +36 -12
  70. package/lib/modal/style/index.css +7 -1
  71. package/lib/modal/style/index.less +8 -1
  72. package/lib/table/hooks/use-row-selection.js +5 -3
  73. package/lib/table/style/index.css +22 -7
  74. package/lib/table/style/index.less +25 -8
  75. package/lib/table/table-operation-td.js +6 -6
  76. package/lib/table/table-operation-th.js +19 -7
  77. package/lib/table/table-td.js +2 -2
  78. package/lib/table/table.js +164 -32
  79. package/lib/table/utils.js +9 -5
  80. package/package.json +25 -24
  81. package/LICENSE +0 -21
@@ -4,6 +4,8 @@ import ClientOnly from "../_components/client-only.js";
4
4
  import IconHover from "../_components/icon-hover.js";
5
5
  import Button from "../button/index.js";
6
6
  import IconClose from "../icon/icon-close/index.js";
7
+ import IconFullscreen from "../icon/icon-fullscreen/index.js";
8
+ import IconFullscreenExit from "../icon/icon-fullscreen-exit/index.js";
7
9
  import IconInfoCircleFill from "../icon/icon-info-circle-fill/index.js";
8
10
  import IconCheckCircleFill from "../icon/icon-check-circle-fill/index.js";
9
11
  import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
@@ -23,6 +25,8 @@ var _sfc_main = defineComponent({
23
25
  ArcoButton: Button,
24
26
  IconHover,
25
27
  IconClose,
28
+ IconFullscreen,
29
+ IconFullscreenExit,
26
30
  IconInfoCircleFill,
27
31
  IconCheckCircleFill,
28
32
  IconExclamationCircleFill,
@@ -129,6 +133,10 @@ var _sfc_main = defineComponent({
129
133
  type: Boolean,
130
134
  default: false
131
135
  },
136
+ showFullscreen: {
137
+ type: Boolean,
138
+ default: false
139
+ },
132
140
  maskAnimationName: {
133
141
  type: String,
134
142
  default: (props) => {
@@ -163,6 +171,7 @@ var _sfc_main = defineComponent({
163
171
  },
164
172
  emits: {
165
173
  "update:visible": (visible) => true,
174
+ "update:fullscreen": (fullscreen) => true,
166
175
  "ok": (e) => true,
167
176
  "cancel": (e) => true,
168
177
  "open": () => true,
@@ -191,6 +200,11 @@ var _sfc_main = defineComponent({
191
200
  });
192
201
  const _okLoading = ref(false);
193
202
  const mergedOkLoading = computed(() => props.okLoading || _okLoading.value);
203
+ const _fullscreen = ref(props.fullscreen);
204
+ const mergedFullscreen = computed(() => {
205
+ var _a;
206
+ return (_a = props.fullscreen) != null ? _a : _fullscreen.value;
207
+ });
194
208
  const mergedDraggable = computed(() => props.draggable && !props.fullscreen);
195
209
  const {
196
210
  teleportContainer,
@@ -353,7 +367,15 @@ var _sfc_main = defineComponent({
353
367
  if (position.value) {
354
368
  position.value = void 0;
355
369
  }
370
+ if (_fullscreen.value !== fullscreen.value) {
371
+ _fullscreen.value = !!fullscreen.value;
372
+ }
356
373
  });
374
+ const toggleFullscreen = () => {
375
+ const next = !mergedFullscreen.value;
376
+ _fullscreen.value = next;
377
+ emit("update:fullscreen", next);
378
+ };
357
379
  const wrapperCls = computed(() => [`${prefixCls}-wrapper`, {
358
380
  [`${prefixCls}-wrapper-align-center`]: props.alignCenter && !props.fullscreen,
359
381
  [`${prefixCls}-wrapper-moved`]: Boolean(position.value)
@@ -361,7 +383,7 @@ var _sfc_main = defineComponent({
361
383
  const modalCls = computed(() => [`${prefixCls}`, props.modalClass, {
362
384
  [`${prefixCls}-simple`]: props.simple,
363
385
  [`${prefixCls}-draggable`]: mergedDraggable.value,
364
- [`${prefixCls}-fullscreen`]: props.fullscreen
386
+ [`${prefixCls}-fullscreen`]: mergedFullscreen.value
365
387
  }]);
366
388
  const mergedModalStyle = computed(() => {
367
389
  var _a;
@@ -400,7 +422,9 @@ var _sfc_main = defineComponent({
400
422
  wrapperCls,
401
423
  modalCls,
402
424
  teleportContainer,
403
- handleMoveDown
425
+ handleMoveDown,
426
+ mergedFullscreen,
427
+ toggleFullscreen
404
428
  };
405
429
  }
406
430
  });
@@ -116,7 +116,13 @@
116
116
  margin-left: 12px;
117
117
  }
118
118
  .arco-modal-close-btn {
119
- margin-left: -12px;
119
+ margin-left: 8px;
120
+ color: var(--color-text-1);
121
+ font-size: 12px;
122
+ cursor: pointer;
123
+ }
124
+ .arco-modal-fullscreen-btn {
125
+ margin-left: 8px;
120
126
  color: var(--color-text-1);
121
127
  font-size: 12px;
122
128
  cursor: pointer;
@@ -127,7 +127,14 @@
127
127
  }
128
128
 
129
129
  &-close-btn {
130
- margin-left: -@modal-font-size-close-icon;
130
+ margin-left: 8px;
131
+ color: @modal-color-header-text;
132
+ font-size: @modal-font-size-close-icon;
133
+ cursor: pointer;
134
+ }
135
+
136
+ &-fullscreen-btn {
137
+ margin-left: 8px;
131
138
  color: @modal-color-header-text;
132
139
  font-size: @modal-font-size-close-icon;
133
140
  cursor: pointer;
@@ -75,8 +75,8 @@ declare const Pagination: {
75
75
  };
76
76
  }>> & Readonly<{
77
77
  onChange?: ((current: number) => any) | undefined;
78
- onPageSizeChange?: ((pageSize: number) => any) | undefined;
79
78
  "onUpdate:current"?: ((current: number) => any) | undefined;
79
+ onPageSizeChange?: ((pageSize: number) => any) | undefined;
80
80
  "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
81
81
  }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
82
82
  'update:current': (current: number) => true;
@@ -177,8 +177,8 @@ declare const Pagination: {
177
177
  };
178
178
  }>> & Readonly<{
179
179
  onChange?: ((current: number) => any) | undefined;
180
- onPageSizeChange?: ((pageSize: number) => any) | undefined;
181
180
  "onUpdate:current"?: ((current: number) => any) | undefined;
181
+ onPageSizeChange?: ((pageSize: number) => any) | undefined;
182
182
  "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
183
183
  }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, {
184
184
  disabled: boolean;
@@ -271,8 +271,8 @@ declare const Pagination: {
271
271
  };
272
272
  }>> & Readonly<{
273
273
  onChange?: ((current: number) => any) | undefined;
274
- onPageSizeChange?: ((pageSize: number) => any) | undefined;
275
274
  "onUpdate:current"?: ((current: number) => any) | undefined;
275
+ onPageSizeChange?: ((pageSize: number) => any) | undefined;
276
276
  "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
277
277
  }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
278
278
  'update:current': (current: number) => true;
@@ -149,8 +149,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
149
149
  };
150
150
  }>> & Readonly<{
151
151
  onChange?: ((current: number) => any) | undefined;
152
- onPageSizeChange?: ((pageSize: number) => any) | undefined;
153
152
  "onUpdate:current"?: ((current: number) => any) | undefined;
153
+ onPageSizeChange?: ((pageSize: number) => any) | undefined;
154
154
  "onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
155
155
  }>, {
156
156
  disabled: boolean;
@@ -7,7 +7,10 @@ export interface TableContext {
7
7
  slots: Slots;
8
8
  sorter: Sorter | undefined;
9
9
  currentAllEnabledRowKeys: BaseType[];
10
+ currentAllEnabledRowKeySet?: Set<BaseType>;
10
11
  currentSelectedRowKeys: BaseType[];
12
+ currentSelectedRowKeySet?: Set<BaseType>;
13
+ selectedRowKeySet?: Set<BaseType>;
11
14
  checkStrictly: boolean;
12
15
  filters: Filters;
13
16
  filterIconAlignLeft: boolean;
@@ -23,9 +23,11 @@ const useRowSelection = ({
23
23
  return (_c2 = (_b2 = selectedKeys.value) != null ? _b2 : (_a2 = rowSelection.value) == null ? void 0 : _a2.selectedRowKeys) != null ? _c2 : _selectedRowKeys.value;
24
24
  }
25
25
  );
26
- const currentSelectedRowKeys = computed(
27
- () => selectedRowKeys.value.filter((key) => currentAllRowKeys.value.includes(key))
28
- );
26
+ const currentAllRowKeySet = computed(() => new Set(currentAllRowKeys.value));
27
+ const currentSelectedRowKeys = computed(() => {
28
+ const allKeySet = currentAllRowKeySet.value;
29
+ return selectedRowKeys.value.filter((key) => allKeySet.has(key));
30
+ });
29
31
  const handleSelectAll = (checked) => {
30
32
  const newKeys = union(
31
33
  selectedRowKeys.value,
@@ -2,7 +2,7 @@ import { CSSProperties, RenderFunction, Slots, VNodeChild } from 'vue';
2
2
  import { BaseType, ClassName, Data } from '../_utils/types';
3
3
  import { TriggerProps } from '../trigger';
4
4
  export declare const TABLE_PAGE_POSITION: readonly ["tl", "top", "tr", "bl", "bottom", "br"];
5
- export declare type TablePagePosition = typeof TABLE_PAGE_POSITION[number];
5
+ export declare type TablePagePosition = (typeof TABLE_PAGE_POSITION)[number];
6
6
  export interface TableData {
7
7
  key?: string;
8
8
  expand?: string | RenderFunction;
@@ -275,6 +275,24 @@
275
275
  justify-content: center;
276
276
  padding: 0;
277
277
  }
278
+ .arco-table-th.arco-table-operation.arco-table-checkbox .arco-table-cell,
279
+ .arco-table-td.arco-table-operation.arco-table-checkbox .arco-table-cell,
280
+ .arco-table-th.arco-table-operation.arco-table-radio .arco-table-cell,
281
+ .arco-table-td.arco-table-operation.arco-table-radio .arco-table-cell {
282
+ padding: 0 4px;
283
+ }
284
+ .arco-table-th.arco-table-operation.arco-table-checkbox,
285
+ .arco-table-td.arco-table-operation.arco-table-checkbox {
286
+ position: relative;
287
+ z-index: 11;
288
+ }
289
+ .arco-table-th.arco-table-operation.arco-table-checkbox.arco-table-col-fixed-left,
290
+ .arco-table-td.arco-table-operation.arco-table-checkbox.arco-table-col-fixed-left,
291
+ .arco-table-th.arco-table-operation.arco-table-checkbox.arco-table-col-fixed-right,
292
+ .arco-table-td.arco-table-operation.arco-table-checkbox.arco-table-col-fixed-right {
293
+ position: sticky !important;
294
+ z-index: 12;
295
+ }
278
296
  .arco-table-radio,
279
297
  .arco-table-checkbox {
280
298
  justify-content: center;
@@ -665,13 +683,10 @@
665
683
  .arco-table-virtualized .arco-table-element {
666
684
  table-layout: fixed;
667
685
  }
668
- .arco-table-virtualized div.arco-table-body div.arco-table-tr {
669
- display: flex;
670
- }
671
- .arco-table-virtualized div.arco-table-body div.arco-table-td {
672
- display: flex;
673
- flex: 1;
674
- align-items: center;
686
+ .arco-table-virtualized .arco-table-body .arco-table-td.arco-table-col-fixed-left,
687
+ .arco-table-virtualized .arco-table-body .arco-table-td.arco-table-col-fixed-right {
688
+ position: sticky;
689
+ z-index: 10;
675
690
  }
676
691
  .arco-table-pagination {
677
692
  display: flex;
@@ -349,6 +349,25 @@
349
349
  padding: 0;
350
350
  }
351
351
 
352
+ &-th&-operation&-checkbox &-cell,
353
+ &-td&-operation&-checkbox &-cell,
354
+ &-th&-operation&-radio &-cell,
355
+ &-td&-operation&-radio &-cell {
356
+ padding: 0 @spacing-2;
357
+ }
358
+
359
+ &-th&-operation&-checkbox,
360
+ &-td&-operation&-checkbox {
361
+ position: relative;
362
+ z-index: 11;
363
+
364
+ &.@{table-prefix-cls}-col-fixed-left,
365
+ &.@{table-prefix-cls}-col-fixed-right {
366
+ position: sticky !important;
367
+ z-index: 12;
368
+ }
369
+ }
370
+
352
371
  &-radio,
353
372
  &-checkbox {
354
373
  justify-content: center;
@@ -824,14 +843,12 @@
824
843
  table-layout: fixed;
825
844
  }
826
845
 
827
- &-virtualized div&-body div&-tr {
828
- display: flex;
829
- }
830
-
831
- &-virtualized div&-body div&-td {
832
- display: flex;
833
- flex: 1;
834
- align-items: center;
846
+ &-virtualized .@{table-prefix-cls}-body .@{table-prefix-cls}-td {
847
+ &.@{table-prefix-cls}-col-fixed-left,
848
+ &.@{table-prefix-cls}-col-fixed-right {
849
+ position: sticky;
850
+ z-index: 10;
851
+ }
835
852
  }
836
853
  }
837
854
 
@@ -67,11 +67,11 @@ var OperationTd = defineComponent({
67
67
  }, ...getOperationFixedCls(prefixCls, props.operationColumn)]);
68
68
  const leafKeys = computed(() => getLeafKeys(props.record));
69
69
  const selectionStatus = computed(() => {
70
- var _a;
71
- return getSelectionStatus((_a = tableCtx.currentSelectedRowKeys) != null ? _a : [], leafKeys.value);
70
+ var _a, _b;
71
+ return getSelectionStatus((_b = (_a = tableCtx.currentSelectedRowKeySet) != null ? _a : tableCtx.currentSelectedRowKeys) != null ? _b : [], leafKeys.value);
72
72
  });
73
73
  const renderContent = () => {
74
- var _a, _b, _c, _d, _e, _f;
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
75
75
  if (props.summary) {
76
76
  return null;
77
77
  }
@@ -94,7 +94,7 @@ var OperationTd = defineComponent({
94
94
  }, null);
95
95
  }
96
96
  return createVNode(Checkbox, {
97
- "modelValue": (_b = (_a = props.selectedRowKeys) == null ? void 0 : _a.includes(value)) != null ? _b : false,
97
+ "modelValue": (_d = (_c = (_a = tableCtx.selectedRowKeySet) == null ? void 0 : _a.has(value)) != null ? _c : (_b = props.selectedRowKeys) == null ? void 0 : _b.includes(value)) != null ? _d : false,
98
98
  "disabled": Boolean(props.record.disabled),
99
99
  "uninjectGroupContext": true,
100
100
  "onChange": (checked) => {
@@ -107,7 +107,7 @@ var OperationTd = defineComponent({
107
107
  if (props.operationColumn.name === "selection-radio") {
108
108
  const value = props.record.key;
109
109
  return createVNode(Radio, {
110
- "modelValue": (_d = (_c = props.selectedRowKeys) == null ? void 0 : _c.includes(value)) != null ? _d : false,
110
+ "modelValue": (_h = (_g = (_e = tableCtx.selectedRowKeySet) == null ? void 0 : _e.has(value)) != null ? _g : (_f = props.selectedRowKeys) == null ? void 0 : _f.includes(value)) != null ? _h : false,
111
111
  "disabled": Boolean(props.record.disabled),
112
112
  "uninjectGroupContext": true,
113
113
  "onChange": (checked) => {
@@ -124,7 +124,7 @@ var OperationTd = defineComponent({
124
124
  return null;
125
125
  }
126
126
  if (props.operationColumn.name === "drag-handle") {
127
- return (_f = (_e = slots["drag-handle-icon"]) == null ? void 0 : _e.call(slots)) != null ? _f : createVNode(IconDragDotVertical, null, null);
127
+ return (_j = (_i = slots["drag-handle-icon"]) == null ? void 0 : _i.call(slots)) != null ? _j : createVNode(IconDragDotVertical, null, null);
128
128
  }
129
129
  return null;
130
130
  };
@@ -28,15 +28,27 @@ var OperationTh = defineComponent({
28
28
  const prefixCls = getPrefixCls("table");
29
29
  const tableCtx = inject(tableInjectionKey, {});
30
30
  const checkboxStatus = computed(() => {
31
- var _a, _b, _c, _d;
31
+ var _a, _b, _c, _d, _e;
32
32
  let checked = false;
33
33
  let indeterminate = false;
34
- const currentSelectedEnabledRowKeys = (_b = (_a = tableCtx.currentSelectedRowKeys) == null ? void 0 : _a.filter((key) => {
35
- var _a2, _b2;
36
- return (_b2 = (_a2 = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _a2.includes(key)) != null ? _b2 : true;
37
- })) != null ? _b : [];
38
- const selectedNumber = currentSelectedEnabledRowKeys.length;
39
- const totalEnabledNumber = (_d = (_c = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _c.length) != null ? _d : 0;
34
+ const totalEnabledNumber = (_b = (_a = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _a.length) != null ? _b : 0;
35
+ if (totalEnabledNumber === 0) {
36
+ return {
37
+ checked,
38
+ indeterminate
39
+ };
40
+ }
41
+ const enabledKeySet = (_d = tableCtx.currentAllEnabledRowKeySet) != null ? _d : new Set((_c = tableCtx.currentAllEnabledRowKeys) != null ? _c : []);
42
+ const currentSelectedRowKeys = (_e = tableCtx.currentSelectedRowKeys) != null ? _e : [];
43
+ let selectedNumber = 0;
44
+ for (const key of currentSelectedRowKeys) {
45
+ if (enabledKeySet.has(key)) {
46
+ selectedNumber += 1;
47
+ if (selectedNumber >= totalEnabledNumber) {
48
+ break;
49
+ }
50
+ }
51
+ }
40
52
  if (selectedNumber > 0) {
41
53
  if (selectedNumber >= totalEnabledNumber) {
42
54
  checked = true;
@@ -106,13 +106,13 @@ var Td = defineComponent({
106
106
  };
107
107
  const style = computed(() => {
108
108
  var _a;
109
- const style2 = getStyle(props.column, {
109
+ const fixedStyle = getStyle(props.column, {
110
110
  dataColumns: props.dataColumns,
111
111
  operations: props.operations
112
112
  });
113
113
  const customStyle = getCustomStyle();
114
114
  return {
115
- ...style2,
115
+ ...fixedStyle,
116
116
  ...(_a = props.column) == null ? void 0 : _a.cellStyle,
117
117
  ...customStyle
118
118
  };