orion-design 0.1.31 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/index.js +14 -30
  3. package/dist/Throne/index.js.map +1 -1
  4. package/dist/components/Button/index.js +33 -40
  5. package/dist/components/Button/index.js.map +1 -1
  6. package/dist/components/Flex/index.js +89 -122
  7. package/dist/components/Flex/index.js.map +1 -1
  8. package/dist/components/Form/Form.js +2 -2
  9. package/dist/components/Form/Form.js.map +1 -1
  10. package/dist/components/Form/LovInput/LovInput.js +2 -2
  11. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  12. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  13. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  14. package/dist/components/Form/LovInput/index.js +4 -4
  15. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  16. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  17. package/dist/components/Form/hooks/index.js +68 -127
  18. package/dist/components/Form/hooks/index.js.map +1 -1
  19. package/dist/components/Form/index.js +656 -836
  20. package/dist/components/Form/index.js.map +1 -1
  21. package/dist/components/Form/utils/index.js +18 -30
  22. package/dist/components/Form/utils/index.js.map +1 -1
  23. package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
  24. package/dist/components/LovTable/index.d.ts +246 -0
  25. package/dist/components/LovTable/index.js +106 -179
  26. package/dist/components/LovTable/index.js.map +1 -1
  27. package/dist/components/Modal/index.js +56 -111
  28. package/dist/components/Modal/index.js.map +1 -1
  29. package/dist/components/Modal/types.d.ts +1 -1
  30. package/dist/components/Modal/types.js +3 -4
  31. package/dist/components/Modal/types.js.map +1 -1
  32. package/dist/components/Modal/useModal.js +5 -5
  33. package/dist/components/Modal/useModal.js.map +1 -1
  34. package/dist/components/Pagetable/Pagetable.d.ts +92 -1
  35. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  36. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  37. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  38. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  39. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  40. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  41. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  42. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  43. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  44. package/dist/components/Pagetable/index.d.ts +155 -0
  45. package/dist/components/Pagetable/index.js +596 -683
  46. package/dist/components/Pagetable/index.js.map +1 -1
  47. package/dist/components/Pagetable/utils/index.js +54 -92
  48. package/dist/components/Pagetable/utils/index.js.map +1 -1
  49. package/dist/components/Querytable/hooks/useColumns.js +74 -82
  50. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  51. package/dist/components/Querytable/index.js +469 -579
  52. package/dist/components/Querytable/index.js.map +1 -1
  53. package/dist/components/Querytable/utils/index.js +54 -92
  54. package/dist/components/Querytable/utils/index.js.map +1 -1
  55. package/dist/components/RichTextEditor/index.js +74 -100
  56. package/dist/components/RichTextEditor/index.js.map +1 -1
  57. package/dist/components/Tabs/constants.js +2 -2
  58. package/dist/components/Tabs/constants.js.map +1 -1
  59. package/dist/components/Tabs/index.js +358 -603
  60. package/dist/components/Tabs/index.js.map +1 -1
  61. package/dist/components/Tabs/tab-bar.js +6 -6
  62. package/dist/components/Tabs/tab-bar.js.map +1 -1
  63. package/dist/components/Tabs/tab-pane.js +3 -3
  64. package/dist/components/Tabs/tab-pane.js.map +1 -1
  65. package/dist/components/_constants/aria.js +2 -2
  66. package/dist/components/_constants/aria.js.map +1 -1
  67. package/dist/components/_constants/event.js +4 -6
  68. package/dist/components/_constants/event.js.map +1 -1
  69. package/dist/components/_constants/index.js +6 -6
  70. package/dist/components/_hooks/index.js +7 -7
  71. package/dist/components/_hooks/use-namespace/index.js +39 -74
  72. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  73. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  74. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  75. package/dist/components/_util/arrays.js +5 -9
  76. package/dist/components/_util/arrays.js.map +1 -1
  77. package/dist/components/_util/browser.js +6 -6
  78. package/dist/components/_util/browser.js.map +1 -1
  79. package/dist/components/_util/classNames.js +17 -22
  80. package/dist/components/_util/classNames.js.map +1 -1
  81. package/dist/components/_util/dom/aria.js +39 -74
  82. package/dist/components/_util/dom/aria.js.map +1 -1
  83. package/dist/components/_util/dom/element.js +8 -9
  84. package/dist/components/_util/dom/element.js.map +1 -1
  85. package/dist/components/_util/dom/event.js +7 -14
  86. package/dist/components/_util/dom/event.js.map +1 -1
  87. package/dist/components/_util/dom/index.js +36 -36
  88. package/dist/components/_util/dom/position.js +25 -49
  89. package/dist/components/_util/dom/position.js.map +1 -1
  90. package/dist/components/_util/dom/scroll.js +61 -103
  91. package/dist/components/_util/dom/scroll.js.map +1 -1
  92. package/dist/components/_util/dom/style.js +50 -65
  93. package/dist/components/_util/dom/style.js.map +1 -1
  94. package/dist/components/_util/easings.js +4 -8
  95. package/dist/components/_util/easings.js.map +1 -1
  96. package/dist/components/_util/error.js +11 -12
  97. package/dist/components/_util/error.js.map +1 -1
  98. package/dist/components/_util/functions.js +3 -3
  99. package/dist/components/_util/i18n.js +2 -2
  100. package/dist/components/_util/i18n.js.map +1 -1
  101. package/dist/components/_util/index.js +137 -137
  102. package/dist/components/_util/isValid.js +2 -4
  103. package/dist/components/_util/isValid.js.map +1 -1
  104. package/dist/components/_util/objects.js +14 -18
  105. package/dist/components/_util/objects.js.map +1 -1
  106. package/dist/components/_util/props-util/index.js +20 -46
  107. package/dist/components/_util/props-util/index.js.map +1 -1
  108. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  109. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  110. package/dist/components/_util/raf.js +4 -5
  111. package/dist/components/_util/raf.js.map +1 -1
  112. package/dist/components/_util/rand.js +3 -4
  113. package/dist/components/_util/rand.js.map +1 -1
  114. package/dist/components/_util/strings.js +8 -9
  115. package/dist/components/_util/strings.js.map +1 -1
  116. package/dist/components/_util/throttleByRaf.js +10 -16
  117. package/dist/components/_util/throttleByRaf.js.map +1 -1
  118. package/dist/components/_util/type.js +38 -41
  119. package/dist/components/_util/type.js.map +1 -1
  120. package/dist/components/_util/types.js +22 -41
  121. package/dist/components/_util/types.js.map +1 -1
  122. package/dist/components/_util/typescript.js +2 -2
  123. package/dist/components/_util/typescript.js.map +1 -1
  124. package/dist/components/_util/util.js +43 -85
  125. package/dist/components/_util/util.js.map +1 -1
  126. package/dist/components/_util/vue/global-node.js +15 -27
  127. package/dist/components/_util/vue/global-node.js.map +1 -1
  128. package/dist/components/_util/vue/icon.js +25 -29
  129. package/dist/components/_util/vue/icon.js.map +1 -1
  130. package/dist/components/_util/vue/index.js +41 -41
  131. package/dist/components/_util/vue/install.js +18 -35
  132. package/dist/components/_util/vue/install.js.map +1 -1
  133. package/dist/components/_util/vue/props/index.js +6 -6
  134. package/dist/components/_util/vue/props/runtime.js +30 -46
  135. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  136. package/dist/components/_util/vue/refs.js +6 -12
  137. package/dist/components/_util/vue/refs.js.map +1 -1
  138. package/dist/components/_util/vue/size.js +3 -5
  139. package/dist/components/_util/vue/size.js.map +1 -1
  140. package/dist/components/_util/vue/validator.js +4 -5
  141. package/dist/components/_util/vue/validator.js.map +1 -1
  142. package/dist/components/_util/vue/vnode.js +54 -100
  143. package/dist/components/_util/vue/vnode.js.map +1 -1
  144. package/dist/components/_util/vue-types/index.js +220 -231
  145. package/dist/components/_util/vue-types/index.js.map +1 -1
  146. package/dist/components/components.js +20 -20
  147. package/dist/components/index.js +35 -38
  148. package/dist/components/index.js.map +1 -1
  149. package/dist/error/OrionError.js +4 -8
  150. package/dist/error/OrionError.js.map +1 -1
  151. package/dist/index.css +1 -797
  152. package/dist/index.js +36 -36
  153. package/dist/print/LodopFuncs.js +43 -101
  154. package/dist/print/LodopFuncs.js.map +1 -1
  155. package/dist/print/index.js +108 -200
  156. package/dist/print/index.js.map +1 -1
  157. package/dist/request/ErrorHandlerChain.js +14 -17
  158. package/dist/request/ErrorHandlerChain.js.map +1 -1
  159. package/dist/request/RequestFilterChain.js +13 -16
  160. package/dist/request/RequestFilterChain.js.map +1 -1
  161. package/dist/request/ResponseParserChain.js +14 -17
  162. package/dist/request/ResponseParserChain.js.map +1 -1
  163. package/dist/request/disivion/DateSerializer.js +22 -47
  164. package/dist/request/disivion/DateSerializer.js.map +1 -1
  165. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  166. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  167. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  168. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  169. package/dist/request/disivion/index.js +201 -305
  170. package/dist/request/disivion/index.js.map +1 -1
  171. package/dist/request/error/BizExceptionResponseError.js +5 -11
  172. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  173. package/dist/request/error/ExceptionResponseError.js +5 -11
  174. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  175. package/dist/request/error/ResponseError.js +4 -9
  176. package/dist/request/error/ResponseError.js.map +1 -1
  177. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  178. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  179. package/dist/request/index.js +11 -11
  180. package/dist/utils/DateUtil.js +33 -48
  181. package/dist/utils/DateUtil.js.map +1 -1
  182. package/dist/utils/NumberUtil.js +6 -6
  183. package/dist/utils/NumberUtil.js.map +1 -1
  184. package/dist/utils/cloneDeep.js +2 -2
  185. package/dist/utils/delay.js +3 -3
  186. package/dist/utils/delay.js.map +1 -1
  187. package/dist/utils/functions.js +3 -3
  188. package/dist/utils/index.js +12 -12
  189. package/dist/utils/md5.js +93 -191
  190. package/dist/utils/md5.js.map +1 -1
  191. package/dist/utils/uuid.js +25 -35
  192. package/dist/utils/uuid.js.map +1 -1
  193. package/dist/version/index.js +2 -2
  194. package/dist/version/version.d.ts +1 -1
  195. package/dist/version/version.js +2 -2
  196. package/dist/version/version.js.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  199. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  200. package/dist/components-B3d9m_tn.js +0 -27
  201. package/dist/components-B3d9m_tn.js.map +0 -1
  202. package/dist/functions-BeMkokbY.js +0 -63
  203. package/dist/functions-BeMkokbY.js.map +0 -1
  204. package/dist/index-BOKLZnqH.js +0 -54
  205. package/dist/index-BOKLZnqH.js.map +0 -1
  206. package/dist/index-D1m0KTpK.js +0 -69
  207. package/dist/index-D1m0KTpK.js.map +0 -1
  208. package/dist/index-DR5ZP7mD.js +0 -160
  209. package/dist/index-DR5ZP7mD.js.map +0 -1
  210. package/dist/index-DkwIULcN.js +0 -200
  211. package/dist/index-DkwIULcN.js.map +0 -1
@@ -174,6 +174,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
174
174
  total?: number;
175
175
  };
176
176
  };
177
+ paginationTeleported: {
178
+ type: BooleanConstructor;
179
+ default: boolean;
180
+ };
177
181
  showRowNumber: {
178
182
  type: BooleanConstructor;
179
183
  default: boolean;
@@ -190,6 +194,66 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
190
194
  type: import('vue').PropType<"" | "small" | "default" | "large">;
191
195
  default: "" | "small" | "default" | "large";
192
196
  };
197
+ rowClassName: {
198
+ type: import('vue').PropType<string | ((data: {
199
+ rowData: any;
200
+ rowIndex: number;
201
+ }) => string)>;
202
+ default: string | ((data: {
203
+ rowData: any;
204
+ rowIndex: number;
205
+ }) => string);
206
+ };
207
+ rowStyle: {
208
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
209
+ rowData: any;
210
+ rowIndex: number;
211
+ }) => import('vue').CSSProperties)>;
212
+ default: import('vue').CSSProperties | ((data: {
213
+ rowData: any;
214
+ rowIndex: number;
215
+ }) => import('vue').CSSProperties);
216
+ };
217
+ cellClassName: {
218
+ type: import('vue').PropType<string | ((data: {
219
+ rowData: any;
220
+ column: {
221
+ name: string;
222
+ head: string;
223
+ };
224
+ rowIndex: number;
225
+ columnIndex: number;
226
+ }) => string)>;
227
+ default: string | ((data: {
228
+ rowData: any;
229
+ column: {
230
+ name: string;
231
+ head: string;
232
+ };
233
+ rowIndex: number;
234
+ columnIndex: number;
235
+ }) => string);
236
+ };
237
+ cellStyle: {
238
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
239
+ rowData: any;
240
+ column: {
241
+ name: string;
242
+ head: string;
243
+ };
244
+ rowIndex: number;
245
+ columnIndex: number;
246
+ }) => import('vue').CSSProperties)>;
247
+ default: import('vue').CSSProperties | ((data: {
248
+ rowData: any;
249
+ column: {
250
+ name: string;
251
+ head: string;
252
+ };
253
+ rowIndex: number;
254
+ columnIndex: number;
255
+ }) => import('vue').CSSProperties);
256
+ };
193
257
  }>> & Readonly<{
194
258
  onSelectionChange?: ((...args: any[]) => any) | undefined;
195
259
  onCurrentRowChange?: ((...args: any[]) => any) | undefined;
@@ -221,6 +285,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
221
285
  total?: number;
222
286
  };
223
287
  };
288
+ paginationTeleported: {
289
+ type: BooleanConstructor;
290
+ default: boolean;
291
+ };
224
292
  showRowNumber: {
225
293
  type: BooleanConstructor;
226
294
  default: boolean;
@@ -237,6 +305,66 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
237
305
  type: import('vue').PropType<"" | "small" | "default" | "large">;
238
306
  default: "" | "small" | "default" | "large";
239
307
  };
308
+ rowClassName: {
309
+ type: import('vue').PropType<string | ((data: {
310
+ rowData: any;
311
+ rowIndex: number;
312
+ }) => string)>;
313
+ default: string | ((data: {
314
+ rowData: any;
315
+ rowIndex: number;
316
+ }) => string);
317
+ };
318
+ rowStyle: {
319
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
320
+ rowData: any;
321
+ rowIndex: number;
322
+ }) => import('vue').CSSProperties)>;
323
+ default: import('vue').CSSProperties | ((data: {
324
+ rowData: any;
325
+ rowIndex: number;
326
+ }) => import('vue').CSSProperties);
327
+ };
328
+ cellClassName: {
329
+ type: import('vue').PropType<string | ((data: {
330
+ rowData: any;
331
+ column: {
332
+ name: string;
333
+ head: string;
334
+ };
335
+ rowIndex: number;
336
+ columnIndex: number;
337
+ }) => string)>;
338
+ default: string | ((data: {
339
+ rowData: any;
340
+ column: {
341
+ name: string;
342
+ head: string;
343
+ };
344
+ rowIndex: number;
345
+ columnIndex: number;
346
+ }) => string);
347
+ };
348
+ cellStyle: {
349
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
350
+ rowData: any;
351
+ column: {
352
+ name: string;
353
+ head: string;
354
+ };
355
+ rowIndex: number;
356
+ columnIndex: number;
357
+ }) => import('vue').CSSProperties)>;
358
+ default: import('vue').CSSProperties | ((data: {
359
+ rowData: any;
360
+ column: {
361
+ name: string;
362
+ head: string;
363
+ };
364
+ rowIndex: number;
365
+ columnIndex: number;
366
+ }) => import('vue').CSSProperties);
367
+ };
240
368
  }>> & Readonly<{
241
369
  onSelectionChange?: ((...args: any[]) => any) | undefined;
242
370
  onCurrentRowChange?: ((...args: any[]) => any) | undefined;
@@ -255,9 +383,36 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
255
383
  total?: number;
256
384
  };
257
385
  tailData: Record<string, any>;
386
+ paginationTeleported: boolean;
258
387
  showRowNumber: boolean;
259
388
  selectionMode: boolean;
260
389
  currentRowMode: boolean;
390
+ rowClassName: string | ((data: {
391
+ rowData: any;
392
+ rowIndex: number;
393
+ }) => string);
394
+ rowStyle: import('vue').CSSProperties | ((data: {
395
+ rowData: any;
396
+ rowIndex: number;
397
+ }) => import('vue').CSSProperties);
398
+ cellClassName: string | ((data: {
399
+ rowData: any;
400
+ column: {
401
+ name: string;
402
+ head: string;
403
+ };
404
+ rowIndex: number;
405
+ columnIndex: number;
406
+ }) => string);
407
+ cellStyle: import('vue').CSSProperties | ((data: {
408
+ rowData: any;
409
+ column: {
410
+ name: string;
411
+ head: string;
412
+ };
413
+ rowIndex: number;
414
+ columnIndex: number;
415
+ }) => import('vue').CSSProperties);
261
416
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
262
417
  P: {};
263
418
  B: {};
@@ -288,6 +443,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
288
443
  total?: number;
289
444
  };
290
445
  };
446
+ paginationTeleported: {
447
+ type: BooleanConstructor;
448
+ default: boolean;
449
+ };
291
450
  showRowNumber: {
292
451
  type: BooleanConstructor;
293
452
  default: boolean;
@@ -304,6 +463,66 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
304
463
  type: import('vue').PropType<"" | "small" | "default" | "large">;
305
464
  default: "" | "small" | "default" | "large";
306
465
  };
466
+ rowClassName: {
467
+ type: import('vue').PropType<string | ((data: {
468
+ rowData: any;
469
+ rowIndex: number;
470
+ }) => string)>;
471
+ default: string | ((data: {
472
+ rowData: any;
473
+ rowIndex: number;
474
+ }) => string);
475
+ };
476
+ rowStyle: {
477
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
478
+ rowData: any;
479
+ rowIndex: number;
480
+ }) => import('vue').CSSProperties)>;
481
+ default: import('vue').CSSProperties | ((data: {
482
+ rowData: any;
483
+ rowIndex: number;
484
+ }) => import('vue').CSSProperties);
485
+ };
486
+ cellClassName: {
487
+ type: import('vue').PropType<string | ((data: {
488
+ rowData: any;
489
+ column: {
490
+ name: string;
491
+ head: string;
492
+ };
493
+ rowIndex: number;
494
+ columnIndex: number;
495
+ }) => string)>;
496
+ default: string | ((data: {
497
+ rowData: any;
498
+ column: {
499
+ name: string;
500
+ head: string;
501
+ };
502
+ rowIndex: number;
503
+ columnIndex: number;
504
+ }) => string);
505
+ };
506
+ cellStyle: {
507
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
508
+ rowData: any;
509
+ column: {
510
+ name: string;
511
+ head: string;
512
+ };
513
+ rowIndex: number;
514
+ columnIndex: number;
515
+ }) => import('vue').CSSProperties)>;
516
+ default: import('vue').CSSProperties | ((data: {
517
+ rowData: any;
518
+ column: {
519
+ name: string;
520
+ head: string;
521
+ };
522
+ rowIndex: number;
523
+ columnIndex: number;
524
+ }) => import('vue').CSSProperties);
525
+ };
307
526
  }>> & Readonly<{
308
527
  onSelectionChange?: ((...args: any[]) => any) | undefined;
309
528
  onCurrentRowChange?: ((...args: any[]) => any) | undefined;
@@ -322,9 +541,36 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
322
541
  total?: number;
323
542
  };
324
543
  tailData: Record<string, any>;
544
+ paginationTeleported: boolean;
325
545
  showRowNumber: boolean;
326
546
  selectionMode: boolean;
327
547
  currentRowMode: boolean;
548
+ rowClassName: string | ((data: {
549
+ rowData: any;
550
+ rowIndex: number;
551
+ }) => string);
552
+ rowStyle: import('vue').CSSProperties | ((data: {
553
+ rowData: any;
554
+ rowIndex: number;
555
+ }) => import('vue').CSSProperties);
556
+ cellClassName: string | ((data: {
557
+ rowData: any;
558
+ column: {
559
+ name: string;
560
+ head: string;
561
+ };
562
+ rowIndex: number;
563
+ columnIndex: number;
564
+ }) => string);
565
+ cellStyle: import('vue').CSSProperties | ((data: {
566
+ rowData: any;
567
+ column: {
568
+ name: string;
569
+ head: string;
570
+ };
571
+ rowIndex: number;
572
+ columnIndex: number;
573
+ }) => import('vue').CSSProperties);
328
574
  }> | null;
329
575
  }, any, import('vue').ComponentProvideOptions, {
330
576
  P: {};
@@ -1,211 +1,138 @@
1
- import { findIndex } from "lodash-es";
2
- import { defineComponent, useTemplateRef, ref, watch, openBlock, createBlock, unref, withCtx, renderSlot } from "vue";
3
- import { withInstall } from "../_util/vue/install.js";
1
+ import { findIndex as P } from "lodash-es";
2
+ import { defineComponent as A, useTemplateRef as x, ref as v, watch as k, openBlock as y, createBlock as I, unref as L, withCtx as S, renderSlot as z } from "vue";
3
+ import { withInstall as U } from "../_util/vue/install.js";
4
4
  import "element-plus";
5
- import Querytable from "../Querytable/index.js";
5
+ import T from "../Querytable/index.js";
6
6
  import "../Form/index.js";
7
- import useLov from "../Form/LovInput/hooks/useLov.js";
8
- import Pagetable from "../Pagetable/index.js";
9
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10
- ...{ name: "OLovQuerytable", inheritAttrs: true },
7
+ import D from "../Form/LovInput/hooks/useLov.js";
8
+ import q from "../Pagetable/index.js";
9
+ const B = /* @__PURE__ */ A({
10
+ name: "OLovQuerytable",
11
+ inheritAttrs: !0,
11
12
  __name: "LovQuerytable",
12
13
  props: {
13
14
  data: {}
14
15
  },
15
- setup(__props) {
16
- const tableRef = useTemplateRef("table");
17
- const currentRowIndex = ref();
18
- const currentRowData = ref();
19
- const lov = useLov();
20
- lov == null ? void 0 : lov.registerKeydownHandler((code) => {
21
- if (code == "ArrowUp") {
22
- let nextRow;
23
- if (currentRowIndex.value == 0) {
24
- nextRow = __props.data[__props.data.length - 1];
25
- } else {
26
- nextRow = __props.data[currentRowIndex.value - 1];
27
- }
28
- tableRef.value.setCurrentRow(nextRow);
29
- scrollToRow(currentRowIndex.value);
30
- } else if (code == "ArrowDown") {
31
- let nextRow;
32
- if (currentRowIndex.value == __props.data.length - 1) {
33
- nextRow = __props.data[0];
34
- } else {
35
- nextRow = __props.data[currentRowIndex.value + 1];
36
- }
37
- tableRef.value.setCurrentRow(nextRow);
38
- scrollToRow(currentRowIndex.value);
39
- } else if (code == "Enter") {
40
- currentRowData.value && (lov == null ? void 0 : lov.backfill(currentRowData.value));
41
- }
16
+ setup(e) {
17
+ const d = x("table"), i = v(), s = v(), l = D();
18
+ l == null || l.registerKeydownHandler((a) => {
19
+ if (a == "ArrowUp") {
20
+ let o;
21
+ i.value == 0 ? o = e.data[e.data.length - 1] : o = e.data[i.value - 1], d.value.setCurrentRow(o), r(i.value);
22
+ } else if (a == "ArrowDown") {
23
+ let o;
24
+ i.value == e.data.length - 1 ? o = e.data[0] : o = e.data[i.value + 1], d.value.setCurrentRow(o), r(i.value);
25
+ } else a == "Enter" && s.value && (l == null || l.backfill(s.value));
42
26
  });
43
- const scrollToRow = (index2) => {
44
- var _a;
45
- const $table = (_a = tableRef.value) == null ? void 0 : _a.$el;
46
- const $row = $table.querySelectorAll(".el-table__row")[index2];
47
- $row.scrollIntoViewIfNeeded();
48
- };
49
- const onRowClick = (row) => {
50
- lov == null ? void 0 : lov.backfill(row);
27
+ const r = (a) => {
28
+ var t;
29
+ ((t = d.value) == null ? void 0 : t.$el).querySelectorAll(".el-table__row")[a].scrollIntoViewIfNeeded();
30
+ }, f = (a) => {
31
+ l == null || l.backfill(a);
32
+ }, u = (a) => {
33
+ const o = P(e.data, a);
34
+ o == -1 ? (i.value = 0, s.value = e.data[0]) : (i.value = o, s.value = a);
51
35
  };
52
- const handleCurrentRowChange = (row) => {
53
- const index2 = findIndex(__props.data, row);
54
- if (index2 == -1) {
55
- currentRowIndex.value = 0;
56
- currentRowData.value = __props.data[0];
57
- } else {
58
- currentRowIndex.value = index2;
59
- currentRowData.value = row;
60
- }
61
- };
62
- watch(
63
- () => __props.data,
36
+ return k(
37
+ () => e.data,
64
38
  () => {
65
- if (__props.data.length > 0) {
66
- tableRef.value.setCurrentRow(__props.data[0]);
67
- }
39
+ e.data.length > 0 && d.value.setCurrentRow(e.data[0]);
68
40
  }
69
- );
70
- return (_ctx, _cache) => {
71
- return openBlock(), createBlock(unref(Querytable), {
72
- ref: "table",
73
- data: _ctx.data,
74
- onRowClick,
75
- "current-row-mode": "",
76
- onCurrentRowChange: handleCurrentRowChange,
77
- size: "small"
78
- }, {
79
- default: withCtx(() => [
80
- renderSlot(_ctx.$slots, "default")
81
- ]),
82
- _: 3
83
- }, 8, ["data"]);
84
- };
41
+ ), (a, o) => (y(), I(L(T), {
42
+ ref: "table",
43
+ data: a.data,
44
+ onRowClick: f,
45
+ "current-row-mode": "",
46
+ onCurrentRowChange: u,
47
+ size: "small"
48
+ }, {
49
+ default: S(() => [
50
+ z(a.$slots, "default")
51
+ ]),
52
+ _: 3
53
+ }, 8, ["data"]));
85
54
  }
86
- });
87
- const _sfc_main = /* @__PURE__ */ defineComponent({
88
- ...{ name: "OLovPagetable", inheritAttrs: true },
55
+ }), E = /* @__PURE__ */ A({
56
+ name: "OLovPagetable",
57
+ inheritAttrs: !0,
89
58
  __name: "LovPagetable",
90
59
  props: {
91
60
  data: {},
92
61
  pagination: {}
93
62
  },
94
63
  emits: ["update:pagination"],
95
- setup(__props, { emit: __emit }) {
96
- const emits = __emit;
97
- const onUpdatePagination = (data) => {
98
- emits("update:pagination", data);
99
- };
100
- const tableRef = useTemplateRef("table");
101
- const currentRowIndex = ref();
102
- const currentRowData = ref();
103
- const lov = useLov();
104
- lov == null ? void 0 : lov.registerKeydownHandler((code) => {
105
- var _a, _b, _c, _d, _e, _f;
106
- if (code == "ArrowUp") {
107
- let nextRow;
108
- if (currentRowIndex.value == 0) {
109
- nextRow = __props.data[__props.data.length - 1];
110
- } else {
111
- nextRow = __props.data[currentRowIndex.value - 1];
112
- }
113
- tableRef.value.setCurrentRow(nextRow);
114
- scrollToRow(currentRowIndex.value);
115
- } else if (code == "ArrowDown") {
116
- let nextRow;
117
- if (currentRowIndex.value == __props.data.length - 1) {
118
- nextRow = __props.data[0];
119
- } else {
120
- nextRow = __props.data[currentRowIndex.value + 1];
121
- }
122
- tableRef.value.setCurrentRow(nextRow);
123
- scrollToRow(currentRowIndex.value);
124
- } else if (code == "Enter") {
125
- currentRowData.value && (lov == null ? void 0 : lov.backfill(currentRowData.value));
126
- } else if (code == "ArrowLeft") {
127
- const currentPage = (_a = __props.pagination) == null ? void 0 : _a.currentPage;
128
- const pageSize = (_b = __props.pagination) == null ? void 0 : _b.pageSize;
129
- const total = (_c = __props.pagination) == null ? void 0 : _c.total;
130
- if (!currentPage || !pageSize || !total) {
64
+ setup(e, { emit: d }) {
65
+ const i = d, s = (t) => {
66
+ i("update:pagination", t);
67
+ }, l = x("table"), r = v(), f = v(), u = D();
68
+ u == null || u.registerKeydownHandler((t) => {
69
+ var c, R, g, h, C, $;
70
+ if (t == "ArrowUp") {
71
+ let n;
72
+ r.value == 0 ? n = e.data[e.data.length - 1] : n = e.data[r.value - 1], l.value.setCurrentRow(n), a(r.value);
73
+ } else if (t == "ArrowDown") {
74
+ let n;
75
+ r.value == e.data.length - 1 ? n = e.data[0] : n = e.data[r.value + 1], l.value.setCurrentRow(n), a(r.value);
76
+ } else if (t == "Enter")
77
+ f.value && (u == null || u.backfill(f.value));
78
+ else if (t == "ArrowLeft") {
79
+ const n = (c = e.pagination) == null ? void 0 : c.currentPage, w = (R = e.pagination) == null ? void 0 : R.pageSize, m = (g = e.pagination) == null ? void 0 : g.total;
80
+ if (!n || !w || !m)
131
81
  return;
132
- }
133
- if (currentPage > 1) {
134
- emits("update:pagination", {
135
- ...__props.pagination,
136
- currentPage: currentPage - 1
137
- });
138
- }
139
- } else if (code == "ArrowRight") {
140
- const currentPage = (_d = __props.pagination) == null ? void 0 : _d.currentPage;
141
- const pageSize = (_e = __props.pagination) == null ? void 0 : _e.pageSize;
142
- const total = (_f = __props.pagination) == null ? void 0 : _f.total;
143
- if (!currentPage || !pageSize || !total) {
82
+ n > 1 && i("update:pagination", {
83
+ ...e.pagination,
84
+ currentPage: n - 1
85
+ });
86
+ } else if (t == "ArrowRight") {
87
+ const n = (h = e.pagination) == null ? void 0 : h.currentPage, w = (C = e.pagination) == null ? void 0 : C.pageSize, m = ($ = e.pagination) == null ? void 0 : $.total;
88
+ if (!n || !w || !m)
144
89
  return;
145
- }
146
- const totalPage = Math.ceil(total / pageSize);
147
- if (currentPage < totalPage) {
148
- emits("update:pagination", {
149
- ...__props.pagination,
150
- currentPage: currentPage + 1
151
- });
152
- }
90
+ const Q = Math.ceil(m / w);
91
+ n < Q && i("update:pagination", {
92
+ ...e.pagination,
93
+ currentPage: n + 1
94
+ });
153
95
  }
154
96
  });
155
- const scrollToRow = (index2) => {
156
- var _a;
157
- const $table = (_a = tableRef.value) == null ? void 0 : _a.$el;
158
- const $row = $table.querySelectorAll(".el-table__row")[index2];
159
- $row.scrollIntoViewIfNeeded();
160
- };
161
- const onRowClick = (row) => {
162
- lov == null ? void 0 : lov.backfill(row);
97
+ const a = (t) => {
98
+ var g;
99
+ ((g = l.value) == null ? void 0 : g.$el).querySelectorAll(".el-table__row")[t].scrollIntoViewIfNeeded();
100
+ }, o = (t) => {
101
+ u == null || u.backfill(t);
102
+ }, b = (t) => {
103
+ const c = P(e.data, t);
104
+ c == -1 ? (r.value = 0, f.value = e.data[0]) : (r.value = c, f.value = t);
163
105
  };
164
- const handleCurrentRowChange = (row) => {
165
- const index2 = findIndex(__props.data, row);
166
- if (index2 == -1) {
167
- currentRowIndex.value = 0;
168
- currentRowData.value = __props.data[0];
169
- } else {
170
- currentRowIndex.value = index2;
171
- currentRowData.value = row;
172
- }
173
- };
174
- watch(
175
- () => __props.data,
106
+ return k(
107
+ () => e.data,
176
108
  () => {
177
- if (__props.data.length > 0) {
178
- tableRef.value.setCurrentRow(__props.data[0]);
179
- }
109
+ e.data.length > 0 && l.value.setCurrentRow(e.data[0]);
180
110
  }
181
- );
182
- return (_ctx, _cache) => {
183
- return openBlock(), createBlock(unref(Pagetable), {
184
- ref: "table",
185
- data: _ctx.data,
186
- onRowClick,
187
- "current-row-mode": "",
188
- onCurrentRowChange: handleCurrentRowChange,
189
- pagination: _ctx.pagination,
190
- "onUpdate:pagination": onUpdatePagination,
191
- size: "small"
192
- }, {
193
- default: withCtx(() => [
194
- renderSlot(_ctx.$slots, "default")
195
- ]),
196
- _: 3
197
- }, 8, ["data", "pagination"]);
198
- };
111
+ ), (t, c) => (y(), I(L(q), {
112
+ ref: "table",
113
+ data: t.data,
114
+ onRowClick: o,
115
+ "current-row-mode": "",
116
+ onCurrentRowChange: b,
117
+ pagination: t.pagination,
118
+ "onUpdate:pagination": s,
119
+ size: "small",
120
+ "pagination-teleported": !1
121
+ }, {
122
+ default: S(() => [
123
+ z(t.$slots, "default")
124
+ ]),
125
+ _: 3
126
+ }, 8, ["data", "pagination"]));
199
127
  }
200
- });
201
- const index = withInstall(
128
+ }), G = U(
202
129
  {},
203
130
  {
204
- LovQuerytable: _sfc_main$1,
205
- LovPagetable: _sfc_main
131
+ LovQuerytable: B,
132
+ LovPagetable: E
206
133
  }
207
134
  );
208
135
  export {
209
- index as default
136
+ G as default
210
137
  };
211
138
  //# sourceMappingURL=index.js.map