orion-design 0.1.32 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  2. package/dist/Throne/hooks/use-throne-context.js +15 -0
  3. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  4. package/dist/Throne/index.d.ts +1 -1
  5. package/dist/Throne/index.js +3 -3
  6. package/dist/Throne/index.js.map +1 -1
  7. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  8. package/dist/components/Button/index.js +19 -17
  9. package/dist/components/Button/index.js.map +1 -1
  10. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  11. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  12. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  13. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  14. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  15. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  16. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  17. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  18. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  19. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  20. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  21. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  22. package/dist/components/Form/hooks/index.js +46 -45
  23. package/dist/components/Form/hooks/index.js.map +1 -1
  24. package/dist/components/Form/index.d.ts +3 -0
  25. package/dist/components/Form/index.js +542 -401
  26. package/dist/components/Form/index.js.map +1 -1
  27. package/dist/components/LovTable/LovPagetable.vue.d.ts +18 -6
  28. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  29. package/dist/components/LovTable/index.d.ts +243 -5
  30. package/dist/components/LovTable/index.js +11 -13
  31. package/dist/components/LovTable/index.js.map +1 -1
  32. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  33. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  34. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  35. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  36. package/dist/components/Pagetable/Pagetable.d.ts +4 -2
  37. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +1 -1
  38. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +1 -1
  39. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  40. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +1 -1
  41. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +1 -1
  42. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +1 -1
  43. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +1 -1
  44. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +1 -1
  45. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  46. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  47. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  48. package/dist/components/Pagetable/index.d.ts +4 -2
  49. package/dist/components/Pagetable/index.js +338 -334
  50. package/dist/components/Pagetable/index.js.map +1 -1
  51. package/dist/components/Querytable/Querytable.d.ts +80 -2
  52. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  53. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  54. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  55. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  56. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  57. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  58. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  59. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  60. package/dist/components/Querytable/hooks/useColumns.js +16 -11
  61. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  62. package/dist/components/Querytable/index.d.ts +147 -1
  63. package/dist/components/Querytable/index.js +404 -347
  64. package/dist/components/Querytable/index.js.map +1 -1
  65. package/dist/components/Tabs/index.js +1 -1
  66. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  67. package/dist/components/_util/vue/icon.js +1 -1
  68. package/dist/components/components.d.ts +2 -0
  69. package/dist/components/components.js +22 -18
  70. package/dist/components/components.js.map +1 -1
  71. package/dist/components/index.js +41 -33
  72. package/dist/components/index.js.map +1 -1
  73. package/dist/components-DP9bnDLm.js +48 -0
  74. package/dist/components-DP9bnDLm.js.map +1 -0
  75. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  76. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  77. package/dist/index.d.ts +1 -0
  78. package/dist/index.js +41 -31
  79. package/dist/index.js.map +1 -1
  80. package/dist/version/version.d.ts +1 -1
  81. package/dist/version/version.js +1 -1
  82. package/dist/version/version.js.map +1 -1
  83. package/package.json +1 -1
  84. package/dist/components-8oZ2kpUC.js +0 -27
  85. package/dist/components-8oZ2kpUC.js.map +0 -1
@@ -0,0 +1,462 @@
1
+ declare const _default: import('../_util').SFCWithInstall<{
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
+ data: any[];
4
+ width: number | string;
5
+ height: number | string;
6
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{
7
+ data: any[];
8
+ width: number | string;
9
+ height: number | string;
10
+ }> & Readonly<{}>, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
11
+ table: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
12
+ data: {
13
+ type: import('vue').PropType<any[]>;
14
+ default: any[];
15
+ };
16
+ tailData: {
17
+ type: import('vue').PropType<Record<string, any>>;
18
+ default: Record<string, any>;
19
+ };
20
+ pagination: {
21
+ type: import('vue').PropType<{
22
+ currentPage?: number;
23
+ pageSize?: number;
24
+ pageSizes?: number[];
25
+ total?: number;
26
+ }>;
27
+ default: {
28
+ currentPage?: number;
29
+ pageSize?: number;
30
+ pageSizes?: number[];
31
+ total?: number;
32
+ };
33
+ };
34
+ paginationTeleported: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ showRowNumber: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ selectionMode: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ currentRowMode: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
50
+ size: {
51
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
52
+ default: "" | "small" | "default" | "large";
53
+ };
54
+ rowClassName: {
55
+ type: import('vue').PropType<string | ((data: {
56
+ rowData: any;
57
+ rowIndex: number;
58
+ }) => string)>;
59
+ default: string | ((data: {
60
+ rowData: any;
61
+ rowIndex: number;
62
+ }) => string);
63
+ };
64
+ rowStyle: {
65
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
66
+ rowData: any;
67
+ rowIndex: number;
68
+ }) => import('vue').CSSProperties)>;
69
+ default: import('vue').CSSProperties | ((data: {
70
+ rowData: any;
71
+ rowIndex: number;
72
+ }) => import('vue').CSSProperties);
73
+ };
74
+ cellClassName: {
75
+ type: import('vue').PropType<string | ((data: {
76
+ rowData: any;
77
+ column: {
78
+ name: string;
79
+ head: string;
80
+ };
81
+ rowIndex: number;
82
+ columnIndex: number;
83
+ }) => string)>;
84
+ default: string | ((data: {
85
+ rowData: any;
86
+ column: {
87
+ name: string;
88
+ head: string;
89
+ };
90
+ rowIndex: number;
91
+ columnIndex: number;
92
+ }) => string);
93
+ };
94
+ cellStyle: {
95
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
96
+ rowData: any;
97
+ column: {
98
+ name: string;
99
+ head: string;
100
+ };
101
+ rowIndex: number;
102
+ columnIndex: number;
103
+ }) => import('vue').CSSProperties)>;
104
+ default: import('vue').CSSProperties | ((data: {
105
+ rowData: any;
106
+ column: {
107
+ name: string;
108
+ head: string;
109
+ };
110
+ rowIndex: number;
111
+ columnIndex: number;
112
+ }) => import('vue').CSSProperties);
113
+ };
114
+ }>> & Readonly<{
115
+ onSelect?: ((...args: any[]) => any) | undefined;
116
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
117
+ onSelectionChange?: ((...args: any[]) => any) | undefined;
118
+ onCurrentRowChange?: ((...args: any[]) => any) | undefined;
119
+ "onUpdate:pagination"?: ((...args: any[]) => any) | undefined;
120
+ onRowClick?: ((...args: any[]) => any) | undefined;
121
+ onRowDblclick?: ((...args: any[]) => any) | undefined;
122
+ onCellClick?: ((...args: any[]) => any) | undefined;
123
+ onCellDblclick?: ((...args: any[]) => any) | undefined;
124
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "select-all" | "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick")[], import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
125
+ data: {
126
+ type: import('vue').PropType<any[]>;
127
+ default: any[];
128
+ };
129
+ tailData: {
130
+ type: import('vue').PropType<Record<string, any>>;
131
+ default: Record<string, any>;
132
+ };
133
+ pagination: {
134
+ type: import('vue').PropType<{
135
+ currentPage?: number;
136
+ pageSize?: number;
137
+ pageSizes?: number[];
138
+ total?: number;
139
+ }>;
140
+ default: {
141
+ currentPage?: number;
142
+ pageSize?: number;
143
+ pageSizes?: number[];
144
+ total?: number;
145
+ };
146
+ };
147
+ paginationTeleported: {
148
+ type: BooleanConstructor;
149
+ default: boolean;
150
+ };
151
+ showRowNumber: {
152
+ type: BooleanConstructor;
153
+ default: boolean;
154
+ };
155
+ selectionMode: {
156
+ type: BooleanConstructor;
157
+ default: boolean;
158
+ };
159
+ currentRowMode: {
160
+ type: BooleanConstructor;
161
+ default: boolean;
162
+ };
163
+ size: {
164
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
165
+ default: "" | "small" | "default" | "large";
166
+ };
167
+ rowClassName: {
168
+ type: import('vue').PropType<string | ((data: {
169
+ rowData: any;
170
+ rowIndex: number;
171
+ }) => string)>;
172
+ default: string | ((data: {
173
+ rowData: any;
174
+ rowIndex: number;
175
+ }) => string);
176
+ };
177
+ rowStyle: {
178
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
179
+ rowData: any;
180
+ rowIndex: number;
181
+ }) => import('vue').CSSProperties)>;
182
+ default: import('vue').CSSProperties | ((data: {
183
+ rowData: any;
184
+ rowIndex: number;
185
+ }) => import('vue').CSSProperties);
186
+ };
187
+ cellClassName: {
188
+ type: import('vue').PropType<string | ((data: {
189
+ rowData: any;
190
+ column: {
191
+ name: string;
192
+ head: string;
193
+ };
194
+ rowIndex: number;
195
+ columnIndex: number;
196
+ }) => string)>;
197
+ default: string | ((data: {
198
+ rowData: any;
199
+ column: {
200
+ name: string;
201
+ head: string;
202
+ };
203
+ rowIndex: number;
204
+ columnIndex: number;
205
+ }) => string);
206
+ };
207
+ cellStyle: {
208
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
209
+ rowData: any;
210
+ column: {
211
+ name: string;
212
+ head: string;
213
+ };
214
+ rowIndex: number;
215
+ columnIndex: number;
216
+ }) => import('vue').CSSProperties)>;
217
+ default: import('vue').CSSProperties | ((data: {
218
+ rowData: any;
219
+ column: {
220
+ name: string;
221
+ head: string;
222
+ };
223
+ rowIndex: number;
224
+ columnIndex: number;
225
+ }) => import('vue').CSSProperties);
226
+ };
227
+ }>> & Readonly<{
228
+ onSelect?: ((...args: any[]) => any) | undefined;
229
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
230
+ onSelectionChange?: ((...args: any[]) => any) | undefined;
231
+ onCurrentRowChange?: ((...args: any[]) => any) | undefined;
232
+ "onUpdate:pagination"?: ((...args: any[]) => any) | undefined;
233
+ onRowClick?: ((...args: any[]) => any) | undefined;
234
+ onRowDblclick?: ((...args: any[]) => any) | undefined;
235
+ onCellClick?: ((...args: any[]) => any) | undefined;
236
+ onCellDblclick?: ((...args: any[]) => any) | undefined;
237
+ }>, {
238
+ size: "" | "small" | "default" | "large";
239
+ data: any[];
240
+ pagination: {
241
+ currentPage?: number;
242
+ pageSize?: number;
243
+ pageSizes?: number[];
244
+ total?: number;
245
+ };
246
+ tailData: Record<string, any>;
247
+ paginationTeleported: boolean;
248
+ showRowNumber: boolean;
249
+ selectionMode: boolean;
250
+ currentRowMode: boolean;
251
+ rowClassName: string | ((data: {
252
+ rowData: any;
253
+ rowIndex: number;
254
+ }) => string);
255
+ rowStyle: import('vue').CSSProperties | ((data: {
256
+ rowData: any;
257
+ rowIndex: number;
258
+ }) => import('vue').CSSProperties);
259
+ cellClassName: string | ((data: {
260
+ rowData: any;
261
+ column: {
262
+ name: string;
263
+ head: string;
264
+ };
265
+ rowIndex: number;
266
+ columnIndex: number;
267
+ }) => string);
268
+ cellStyle: import('vue').CSSProperties | ((data: {
269
+ rowData: any;
270
+ column: {
271
+ name: string;
272
+ head: string;
273
+ };
274
+ rowIndex: number;
275
+ columnIndex: number;
276
+ }) => import('vue').CSSProperties);
277
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
278
+ P: {};
279
+ B: {};
280
+ D: {};
281
+ C: {};
282
+ M: {};
283
+ Defaults: {};
284
+ }, Readonly<import('vue').ExtractPropTypes<{
285
+ data: {
286
+ type: import('vue').PropType<any[]>;
287
+ default: any[];
288
+ };
289
+ tailData: {
290
+ type: import('vue').PropType<Record<string, any>>;
291
+ default: Record<string, any>;
292
+ };
293
+ pagination: {
294
+ type: import('vue').PropType<{
295
+ currentPage?: number;
296
+ pageSize?: number;
297
+ pageSizes?: number[];
298
+ total?: number;
299
+ }>;
300
+ default: {
301
+ currentPage?: number;
302
+ pageSize?: number;
303
+ pageSizes?: number[];
304
+ total?: number;
305
+ };
306
+ };
307
+ paginationTeleported: {
308
+ type: BooleanConstructor;
309
+ default: boolean;
310
+ };
311
+ showRowNumber: {
312
+ type: BooleanConstructor;
313
+ default: boolean;
314
+ };
315
+ selectionMode: {
316
+ type: BooleanConstructor;
317
+ default: boolean;
318
+ };
319
+ currentRowMode: {
320
+ type: BooleanConstructor;
321
+ default: boolean;
322
+ };
323
+ size: {
324
+ type: import('vue').PropType<"" | "small" | "default" | "large">;
325
+ default: "" | "small" | "default" | "large";
326
+ };
327
+ rowClassName: {
328
+ type: import('vue').PropType<string | ((data: {
329
+ rowData: any;
330
+ rowIndex: number;
331
+ }) => string)>;
332
+ default: string | ((data: {
333
+ rowData: any;
334
+ rowIndex: number;
335
+ }) => string);
336
+ };
337
+ rowStyle: {
338
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
339
+ rowData: any;
340
+ rowIndex: number;
341
+ }) => import('vue').CSSProperties)>;
342
+ default: import('vue').CSSProperties | ((data: {
343
+ rowData: any;
344
+ rowIndex: number;
345
+ }) => import('vue').CSSProperties);
346
+ };
347
+ cellClassName: {
348
+ type: import('vue').PropType<string | ((data: {
349
+ rowData: any;
350
+ column: {
351
+ name: string;
352
+ head: string;
353
+ };
354
+ rowIndex: number;
355
+ columnIndex: number;
356
+ }) => string)>;
357
+ default: string | ((data: {
358
+ rowData: any;
359
+ column: {
360
+ name: string;
361
+ head: string;
362
+ };
363
+ rowIndex: number;
364
+ columnIndex: number;
365
+ }) => string);
366
+ };
367
+ cellStyle: {
368
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
369
+ rowData: any;
370
+ column: {
371
+ name: string;
372
+ head: string;
373
+ };
374
+ rowIndex: number;
375
+ columnIndex: number;
376
+ }) => import('vue').CSSProperties)>;
377
+ default: import('vue').CSSProperties | ((data: {
378
+ rowData: any;
379
+ column: {
380
+ name: string;
381
+ head: string;
382
+ };
383
+ rowIndex: number;
384
+ columnIndex: number;
385
+ }) => import('vue').CSSProperties);
386
+ };
387
+ }>> & Readonly<{
388
+ onSelect?: ((...args: any[]) => any) | undefined;
389
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
390
+ onSelectionChange?: ((...args: any[]) => any) | undefined;
391
+ onCurrentRowChange?: ((...args: any[]) => any) | undefined;
392
+ "onUpdate:pagination"?: ((...args: any[]) => any) | undefined;
393
+ onRowClick?: ((...args: any[]) => any) | undefined;
394
+ onRowDblclick?: ((...args: any[]) => any) | undefined;
395
+ onCellClick?: ((...args: any[]) => any) | undefined;
396
+ onCellDblclick?: ((...args: any[]) => any) | undefined;
397
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
398
+ size: "" | "small" | "default" | "large";
399
+ data: any[];
400
+ pagination: {
401
+ currentPage?: number;
402
+ pageSize?: number;
403
+ pageSizes?: number[];
404
+ total?: number;
405
+ };
406
+ tailData: Record<string, any>;
407
+ paginationTeleported: boolean;
408
+ showRowNumber: boolean;
409
+ selectionMode: boolean;
410
+ currentRowMode: boolean;
411
+ rowClassName: string | ((data: {
412
+ rowData: any;
413
+ rowIndex: number;
414
+ }) => string);
415
+ rowStyle: import('vue').CSSProperties | ((data: {
416
+ rowData: any;
417
+ rowIndex: number;
418
+ }) => import('vue').CSSProperties);
419
+ cellClassName: string | ((data: {
420
+ rowData: any;
421
+ column: {
422
+ name: string;
423
+ head: string;
424
+ };
425
+ rowIndex: number;
426
+ columnIndex: number;
427
+ }) => string);
428
+ cellStyle: import('vue').CSSProperties | ((data: {
429
+ rowData: any;
430
+ column: {
431
+ name: string;
432
+ head: string;
433
+ };
434
+ rowIndex: number;
435
+ columnIndex: number;
436
+ }) => import('vue').CSSProperties);
437
+ }> | null;
438
+ }, any, import('vue').ComponentProvideOptions, {
439
+ P: {};
440
+ B: {};
441
+ D: {};
442
+ C: {};
443
+ M: {};
444
+ Defaults: {};
445
+ }, Readonly<{
446
+ data: any[];
447
+ width: number | string;
448
+ height: number | string;
449
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
450
+ __isFragment?: never;
451
+ __isTeleport?: never;
452
+ __isSuspense?: never;
453
+ } & import('vue').ComponentOptionsBase<Readonly<{
454
+ data: any[];
455
+ width: number | string;
456
+ height: number | string;
457
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
458
+ $slots: {
459
+ default?(_: {}): any;
460
+ };
461
+ })> & {};
462
+ export default _default;
@@ -0,0 +1,164 @@
1
+ import { intersectionWith as b, isEqual as S, find as c, remove as x } from "lodash-es";
2
+ import { defineComponent as I, computed as y, useTemplateRef as L, ref as O, watch as k, nextTick as U, resolveComponent as u, openBlock as f, createBlock as w, normalizeStyle as W, withCtx as l, createVNode as n, unref as r, createElementBlock as m, Fragment as E, renderList as T, createTextVNode as d, toDisplayString as C, mergeProps as j, renderSlot as G } from "vue";
3
+ import { withInstall as H } from "../_util/vue/install.js";
4
+ import { ElTooltip as J, ElTag as z, ElScrollbar as K } from "element-plus";
5
+ import Q from "../Pagetable/index.js";
6
+ import { addUnit as P } from "../_util/dom/style.js";
7
+ import X from "../Form/MultiTableSelect/hooks/useMultiTableSelect.js";
8
+ const Y = { style: { margin: "5px", display: "inline-block" } }, Z = /* @__PURE__ */ I({
9
+ name: "OTableselectPagetable",
10
+ inheritAttrs: !0,
11
+ __name: "MultiTableSelectPagetable",
12
+ props: {
13
+ data: {},
14
+ width: { default: 600 },
15
+ height: { default: 300 }
16
+ },
17
+ setup(i) {
18
+ const R = y(() => ({
19
+ width: P(i.width),
20
+ height: P(i.height)
21
+ })), g = L("table"), o = O([]), h = y(() => o.value.map((a) => e == null ? void 0 : e.tag(a))), B = (a, t) => {
22
+ c(a, t) ? c(o.value, t) || o.value.push(t) : c(o.value, t) && x(o.value, t), e == null || e.onSelect(o.value);
23
+ }, D = (a) => {
24
+ a.length > 0 ? a.forEach((t) => {
25
+ c(o.value, t) || o.value.push(t);
26
+ }) : x(o.value, (t) => c(i.data, t)), e == null || e.onSelect(o.value);
27
+ }, e = X(), A = () => {
28
+ e == null || e.selectDone();
29
+ }, M = () => {
30
+ N(), o.value = [], e == null || e.onSelect([], !0);
31
+ };
32
+ k(
33
+ () => i.data,
34
+ async () => {
35
+ i.data.length > 0 && (await U(), v());
36
+ }
37
+ ), k(() => e == null ? void 0 : e.selection, () => {
38
+ e != null && e.selection && e.selection.length > 0 && (o.value = e.selection, v());
39
+ });
40
+ const v = () => {
41
+ b(i.data, o.value, S).forEach((t) => {
42
+ g.value.toggleRowSelection(t, !0);
43
+ });
44
+ }, N = () => {
45
+ b(i.data, o.value, S).forEach((t) => {
46
+ g.value.toggleRowSelection(t, !1);
47
+ });
48
+ };
49
+ return (a, t) => {
50
+ const V = u("o-space"), s = u("o-flexitem"), _ = u("o-button"), $ = u("o-buttongroup"), q = u("o-rowflex"), F = u("o-colflex");
51
+ return f(), w(F, {
52
+ style: W(R.value)
53
+ }, {
54
+ default: l(() => [
55
+ n(s, { "flex-basic": "need" }, {
56
+ default: l(() => [
57
+ n(q, null, {
58
+ default: l(() => [
59
+ n(s, { style: { overflow: "hidden", padding: "5px" } }, {
60
+ default: l(() => [
61
+ n(r(J), {
62
+ effect: "light",
63
+ teleported: !1
64
+ }, {
65
+ default: l(() => [
66
+ n(V, null, {
67
+ default: l(() => [
68
+ (f(!0), m(E, null, T(h.value, (p) => (f(), w(r(z), { type: "info" }, {
69
+ default: l(() => [
70
+ d(C(p), 1)
71
+ ]),
72
+ _: 2
73
+ }, 1024))), 256))
74
+ ]),
75
+ _: 1
76
+ })
77
+ ]),
78
+ content: l(() => [
79
+ n(r(K), { "max-height": "100" }, {
80
+ default: l(() => [
81
+ (f(!0), m(E, null, T(h.value, (p) => (f(), m("div", Y, [
82
+ n(r(z), { type: "info" }, {
83
+ default: l(() => [
84
+ d(C(p), 1)
85
+ ]),
86
+ _: 2
87
+ }, 1024)
88
+ ]))), 256))
89
+ ]),
90
+ _: 1
91
+ })
92
+ ]),
93
+ _: 1
94
+ })
95
+ ]),
96
+ _: 1
97
+ }),
98
+ n(s, {
99
+ "flex-basic": "need",
100
+ style: { padding: "5px" }
101
+ }, {
102
+ default: l(() => [
103
+ n($, null, {
104
+ default: l(() => [
105
+ n(_, {
106
+ type: "primary",
107
+ size: "small",
108
+ onClick: A
109
+ }, {
110
+ default: l(() => t[0] || (t[0] = [
111
+ d("确定")
112
+ ])),
113
+ _: 1
114
+ }),
115
+ n(_, {
116
+ size: "small",
117
+ onClick: M
118
+ }, {
119
+ default: l(() => t[1] || (t[1] = [
120
+ d("清空")
121
+ ])),
122
+ _: 1
123
+ })
124
+ ]),
125
+ _: 1
126
+ })
127
+ ]),
128
+ _: 1
129
+ })
130
+ ]),
131
+ _: 1
132
+ })
133
+ ]),
134
+ _: 1
135
+ }),
136
+ n(s, null, {
137
+ default: l(() => [
138
+ n(r(Q), j({
139
+ ref: "table",
140
+ data: a.data,
141
+ "selection-mode": "",
142
+ size: "small",
143
+ "pagination-teleported": !1,
144
+ onSelect: B,
145
+ onSelectAll: D
146
+ }, a.$attrs), {
147
+ default: l(() => [
148
+ G(a.$slots, "default")
149
+ ]),
150
+ _: 3
151
+ }, 16, ["data"])
152
+ ]),
153
+ _: 3
154
+ })
155
+ ]),
156
+ _: 3
157
+ }, 8, ["style"]);
158
+ };
159
+ }
160
+ }), ue = H(Z, {});
161
+ export {
162
+ ue as default
163
+ };
164
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue","../../../src/components/MultiTableSelectPagetable/index.ts"],"sourcesContent":["<template>\r\n <o-colflex :style=\"style\">\r\n <o-flexitem flex-basic=\"need\">\r\n <o-rowflex>\r\n <o-flexitem style=\"overflow: hidden;padding: 5px;\">\r\n <el-tooltip effect=\"light\" :teleported=\"false\">\r\n <template #default>\r\n <o-space>\r\n <el-tag v-for=\"tag in tags\" type=\"info\">{{ tag }}</el-tag>\r\n </o-space>\r\n </template>\r\n <template #content>\r\n <el-scrollbar max-height=\"100\">\r\n <div v-for=\"tag in tags\" style=\"margin: 5px;display: inline-block;\">\r\n <el-tag type=\"info\">{{ tag }}</el-tag>\r\n </div>\r\n </el-scrollbar>\r\n </template>\r\n </el-tooltip>\r\n </o-flexitem>\r\n <o-flexitem flex-basic=\"need\" style=\"padding: 5px;\">\r\n <o-buttongroup>\r\n <o-button type=\"primary\" size=\"small\" @click=\"selectDone\">确定</o-button>\r\n <o-button size=\"small\" @click=\"clearSelection\">清空</o-button>\r\n </o-buttongroup>\r\n </o-flexitem>\r\n </o-rowflex>\r\n </o-flexitem>\r\n <o-flexitem>\r\n <pagetable ref=\"table\" :data=\"data\" selection-mode size=\"small\" :pagination-teleported=\"false\"\r\n @select=\"onSelect\" @select-all=\"onSelectAll\" v-bind=\"$attrs\">\r\n <slot></slot>\r\n </pagetable>\r\n </o-flexitem>\r\n </o-colflex>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { ElTag, ElTooltip, ElScrollbar } from 'element-plus'\r\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\r\nimport { find, intersectionWith, isEqual, remove } from 'lodash-es';\r\nimport { addUnit } from '../_util';\r\nimport useMultiTableSelect from '../Form/MultiTableSelect/hooks/useMultiTableSelect'\r\n\r\ndefineOptions({ name: 'OTableselectPagetable', inheritAttrs: true })\r\n\r\nconst { data, width = 600, height = 300 } = defineProps<{ data: any[], width: number | string, height: number | string }>()\r\nconst style = computed(() => {\r\n return {\r\n width: addUnit(width),\r\n height: addUnit(height)\r\n }\r\n})\r\nconst tableRef = useTemplateRef('table')\r\nconst tableSelection = ref<any[]>([])\r\nconst tags = computed(() => tableSelection.value.map((item) => mtselect?.tag(item)))\r\n\r\nconst onSelect = (selection: any[], row: any) => {\r\n if (find(selection, row)) {\r\n if (!find(tableSelection.value, row)) {\r\n tableSelection.value.push(row)\r\n }\r\n } else {\r\n if (find(tableSelection.value, row)) {\r\n remove(tableSelection.value, row)\r\n }\r\n }\r\n mtselect?.onSelect(tableSelection.value)\r\n}\r\nconst onSelectAll = (selection: any[]) => {\r\n if (selection.length > 0) {\r\n selection.forEach((item) => {\r\n if (!find(tableSelection.value, item)) {\r\n tableSelection.value.push(item)\r\n }\r\n })\r\n } else {\r\n remove(tableSelection.value, (item) => find(data, item))\r\n }\r\n mtselect?.onSelect(tableSelection.value)\r\n}\r\n\r\nconst mtselect = useMultiTableSelect()\r\nconst selectDone = () => {\r\n mtselect?.selectDone()\r\n}\r\nconst clearSelection = () => {\r\n uncheckSelection()\r\n tableSelection.value = []\r\n mtselect?.onSelect([], true)\r\n}\r\n\r\nwatch(\r\n () => data,\r\n async () => {\r\n if (data.length > 0) {\r\n await nextTick()\r\n checkSelection()\r\n }\r\n }\r\n)\r\nwatch(() => mtselect?.selection, () => {\r\n if (mtselect?.selection && mtselect.selection.length > 0) {\r\n tableSelection.value = mtselect.selection\r\n checkSelection()\r\n }\r\n})\r\n\r\nconst checkSelection = () => {\r\n const selection = intersectionWith(data, tableSelection.value, isEqual)\r\n selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, true)\r\n })\r\n}\r\n\r\nconst uncheckSelection = () => {\r\n const selection = intersectionWith(data, tableSelection.value, isEqual)\r\n selection.forEach((row) => {\r\n //@ts-ignore\r\n tableRef.value!.toggleRowSelection(row, false)\r\n })\r\n}\r\n</script>","import { withInstall } from '../_util'\r\n\r\nimport MultiTableSelectPagetable from './MultiTableSelectPagetable.vue'\r\n\r\nexport default withInstall(MultiTableSelectPagetable, {})\r\n"],"names":["style","computed","addUnit","__props","tableRef","useTemplateRef","tableSelection","ref","tags","item","mtselect","onSelect","selection","row","find","remove","onSelectAll","useMultiTableSelect","selectDone","clearSelection","uncheckSelection","watch","nextTick","checkSelection","intersectionWith","isEqual","index","withInstall","MultiTableSelectPagetable"],"mappings":";;;;;;;;;;;;;;;;;AA+CM,UAAAA,IAAQC,EAAS,OACZ;AAAA,MACH,OAAOC,EAAQC,EAAA,KAAK;AAAA,MACpB,QAAQD,EAAQC,EAAM,MAAA;AAAA,IAAA,EAE7B,GACKC,IAAWC,EAAe,OAAO,GACjCC,IAAiBC,EAAW,CAAA,CAAE,GAC9BC,IAAOP,EAAS,MAAMK,EAAe,MAAM,IAAI,CAACG,MAASC,KAAA,gBAAAA,EAAU,IAAID,EAAK,CAAC,GAE7EE,IAAW,CAACC,GAAkBC,MAAa;AACzC,MAAAC,EAAKF,GAAWC,CAAG,IACdC,EAAKR,EAAe,OAAOO,CAAG,KAChBP,EAAA,MAAM,KAAKO,CAAG,IAG7BC,EAAKR,EAAe,OAAOO,CAAG,KACvBE,EAAAT,EAAe,OAAOO,CAAG,GAG9BH,KAAA,QAAAA,EAAA,SAASJ,EAAe;AAAA,IAAK,GAErCU,IAAc,CAACJ,MAAqB;AAClC,MAAAA,EAAU,SAAS,IACTA,EAAA,QAAQ,CAACH,MAAS;AACxB,QAAKK,EAAKR,EAAe,OAAOG,CAAI,KACjBH,EAAA,MAAM,KAAKG,CAAI;AAAA,MAClC,CACH,IAEMM,EAAAT,EAAe,OAAO,CAACG,MAASK,EAAKX,EAAA,MAAMM,CAAI,CAAC,GAEjDC,KAAA,QAAAA,EAAA,SAASJ,EAAe;AAAA,IAAK,GAGrCI,IAAWO,KACXC,IAAa,MAAM;AACrB,MAAAR,KAAA,QAAAA,EAAU;AAAA,IAAW,GAEnBS,IAAiB,MAAM;AACR,MAAAC,KACjBd,EAAe,QAAQ,IACbI,KAAA,QAAAA,EAAA,SAAS,IAAI;AAAA,IAAI;AAG/B,IAAAW;AAAA,MACI,MAAMlB,EAAI;AAAA,MACV,YAAY;AACJ,QAAAA,EAAI,KAAC,SAAS,MACd,MAAMmB,EAAS,GACAC;MAEvB;AAAA,IAAA,GAEEF,EAAA,MAAMX,KAAA,gBAAAA,EAAU,WAAW,MAAM;AACnC,MAAIA,KAAA,QAAAA,EAAU,aAAaA,EAAS,UAAU,SAAS,MACnDJ,EAAe,QAAQI,EAAS,WACjBa;IACnB,CACH;AAED,UAAMA,IAAiB,MAAM;AAEf,MADQC,EAAiBrB,EAAA,MAAMG,EAAe,OAAOmB,CAAO,EAC5D,QAAQ,CAACZ,MAAQ;AAEd,QAAAT,EAAA,MAAO,mBAAmBS,GAAK,EAAI;AAAA,MAAA,CAC/C;AAAA,IAAA,GAGCO,IAAmB,MAAM;AAEjB,MADQI,EAAiBrB,EAAA,MAAMG,EAAe,OAAOmB,CAAO,EAC5D,QAAQ,CAACZ,MAAQ;AAEd,QAAAT,EAAA,MAAO,mBAAmBS,GAAK,EAAK;AAAA,MAAA,CAChD;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICrHLa,KAAeC,EAAYC,GAA2B,EAAE;"}
@@ -145,7 +145,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
145
145
  type: PropType<CSSProperties | cellStyleFn>;
146
146
  default: CSSProperties | cellStyleFn;
147
147
  };
148
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick")[], "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick", import('vue').PublicProps, Readonly<ExtractPropTypes<{
148
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "select-all" | "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick")[], "select" | "select-all" | "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick", import('vue').PublicProps, Readonly<ExtractPropTypes<{
149
149
  data: {
150
150
  type: PropType<any[]>;
151
151
  default: any[];
@@ -205,6 +205,8 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
205
205
  default: CSSProperties | cellStyleFn;
206
206
  };
207
207
  }>> & Readonly<{
208
+ onSelect?: ((...args: any[]) => any) | undefined;
209
+ "onSelect-all"?: ((...args: any[]) => any) | undefined;
208
210
  onSelectionChange?: ((...args: any[]) => any) | undefined;
209
211
  onCurrentRowChange?: ((...args: any[]) => any) | undefined;
210
212
  "onUpdate:pagination"?: ((...args: any[]) => any) | undefined;
@@ -213,8 +215,8 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
213
215
  onCellClick?: ((...args: any[]) => any) | undefined;
214
216
  onCellDblclick?: ((...args: any[]) => any) | undefined;
215
217
  }>, {
216
- data: any[];
217
218
  size: "" | "small" | "default" | "large";
219
+ data: any[];
218
220
  pagination: {
219
221
  currentPage?: number;
220
222
  pageSize?: number;
@@ -91,10 +91,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
91
91
  default: string | boolean;
92
92
  };
93
93
  }>> & Readonly<{}>, {
94
+ name: string;
94
95
  fixed: FixedType;
95
96
  head: string;
96
97
  width: string | boolean;
97
- name: string;
98
98
  bodyAlign: "center" | "left" | "right";
99
99
  tail: string | boolean;
100
100
  headAlign: "center" | "left" | "right";