orion-design 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/components/Form/index.js +230 -220
  2. package/dist/components/Form/index.js.map +1 -1
  3. package/dist/components/LovTable/LovPagetable.d.ts +2 -0
  4. package/dist/components/LovTable/LovQuerytable.d.ts +2 -0
  5. package/dist/components/LovTable/index.d.ts +5 -0
  6. package/dist/components/LovTable/index.js +54 -0
  7. package/dist/components/LovTable/index.js.map +1 -0
  8. package/dist/components/Pagetable/Pagetable.d.ts +2 -1
  9. package/dist/components/Pagetable/hooks/useColumns.js +36 -35
  10. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  11. package/dist/components/Pagetable/index.d.ts +2 -1
  12. package/dist/components/Pagetable/index.js +151 -148
  13. package/dist/components/Pagetable/index.js.map +1 -1
  14. package/dist/components/Querytable/Querytable.d.ts +2 -1
  15. package/dist/components/Querytable/hooks/useColumns.js +16 -15
  16. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  17. package/dist/components/Querytable/index.d.ts +2 -1
  18. package/dist/components/Querytable/index.js +163 -160
  19. package/dist/components/Querytable/index.js.map +1 -1
  20. package/dist/components/components.d.ts +2 -0
  21. package/dist/components/components.js +18 -10
  22. package/dist/components/components.js.map +1 -1
  23. package/dist/components/index.js +21 -13
  24. package/dist/components/index.js.map +1 -1
  25. package/dist/components-1bMIJYPN.js +78 -0
  26. package/dist/{components-OIbu7HLW.js.map → components-1bMIJYPN.js.map} +1 -1
  27. package/dist/index.js +24 -16
  28. package/dist/index.js.map +1 -1
  29. package/dist/request/disivion/index.d.ts +11 -12
  30. package/dist/request/disivion/index.js +137 -134
  31. package/dist/request/disivion/index.js.map +1 -1
  32. package/dist/request/index.d.ts +1 -1
  33. package/dist/request/index.js +11 -8
  34. package/dist/version/version.d.ts +1 -1
  35. package/dist/version/version.js +1 -1
  36. package/dist/version/version.js.map +1 -1
  37. package/package.json +4 -2
  38. package/dist/components-OIbu7HLW.js +0 -70
@@ -2,83 +2,84 @@ import "lodash-es";
2
2
  import { defineComponent as C, ref as U, computed as W, createVNode as o, createTextVNode as X, isVNode as j } from "vue";
3
3
  import { withInstall as Z } from "../_util/vue/install.js";
4
4
  import { ElTable as ee, ElTableColumn as w, ElButton as te } from "element-plus";
5
- import ne from "../_util/classNames.js";
6
- import { arrayType as re, booleanType as v, stringType as n, someType as s, numberType as oe } from "../_util/type.js";
7
- import { number2string as le, formatDate as R, getSingleCodeContent as q, getMultiCodeContent as M } from "./utils/index.js";
5
+ import re from "../_util/classNames.js";
6
+ import { arrayType as ne, booleanType as D, stringType as r, someType as u, numberType as oe } from "../_util/type.js";
7
+ import { number2string as le, formatDate as N, getSingleCodeContent as q, getMultiCodeContent as M } from "./utils/index.js";
8
8
  import ae from "dayjs";
9
9
  import { S as se } from "../../index-BbsXWo7C.js";
10
10
  import ue from "../../error/OrionError.js";
11
11
  import ie from "./hooks/useColumns.js";
12
12
  import P from "../../Throne/index.js";
13
- function de(r) {
14
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !j(r);
13
+ function de(n) {
14
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !j(n);
15
15
  }
16
- const pe = () => ({
17
- data: re(),
18
- showRowNumber: v(!0),
19
- selectionMode: v(!1),
20
- currentRowMode: v(!1)
21
- }), ce = /* @__PURE__ */ C({
16
+ const ce = () => ({
17
+ data: ne(),
18
+ showRowNumber: D(!0),
19
+ selectionMode: D(!1),
20
+ currentRowMode: D(!1)
21
+ }), pe = /* @__PURE__ */ C({
22
22
  name: "OQuerytable",
23
23
  inheritAttrs: !1,
24
- props: pe(),
25
- emits: ["selectionChange", "currentRowChange"],
26
- setup(r, {
27
- slots: p,
24
+ props: ce(),
25
+ emits: ["selectionChange", "currentRowChange", "rowClick"],
26
+ setup(n, {
27
+ slots: c,
28
28
  attrs: y,
29
- emit: m,
29
+ emit: p,
30
30
  expose: b
31
31
  }) {
32
- const O = U(), Q = W(() => ({})), B = ie(p);
32
+ const O = U(), B = W(() => ({})), v = ie(c);
33
33
  return b({
34
34
  clearSelection: () => {
35
35
  O.value.clearSelection();
36
36
  },
37
37
  getSelectionRows: () => O.value.getSelectionRows(),
38
- toggleRowSelection: (...D) => O.value.toggleRowSelection(...D),
39
- toggleAllSelection: () => O.value.toggleAllSelection()
38
+ toggleRowSelection: (...Q) => O.value.toggleRowSelection(...Q),
39
+ toggleAllSelection: () => O.value.toggleAllSelection(),
40
+ setCurrentRow: (...Q) => O.value.setCurrentRow(...Q)
40
41
  }), () => {
41
42
  const {
42
- data: D
43
- } = r, {
44
- selectionMode: I = !1
45
- } = r, {
46
- showRowNumber: V = !0
47
- } = r, {
48
- currentRowMode: k = !1
49
- } = r, E = ne("orion-querytable"), Y = () => o(w, {
43
+ data: Q
44
+ } = n, {
45
+ selectionMode: k = !1
46
+ } = n, {
47
+ showRowNumber: I = !0
48
+ } = n, {
49
+ currentRowMode: V = !1
50
+ } = n, $ = re("orion-querytable"), E = () => o(w, {
50
51
  type: "index",
51
52
  label: "No",
52
53
  width: 56,
53
54
  fixed: "left",
54
55
  showOverflowTooltip: !0,
55
56
  index: (t) => t + 1
56
- }, null), $ = () => o(w, {
57
+ }, null), Y = () => o(w, {
57
58
  type: "selection",
58
59
  width: 40,
59
60
  fixed: "left"
60
61
  }, null), F = (t) => {
61
62
  const {
62
63
  name: e,
63
- head: u,
64
+ head: s,
64
65
  headAlign: i,
65
- width: c,
66
+ width: m,
66
67
  fixed: h
67
68
  } = t;
68
69
  return o(w, {
69
- label: u,
70
+ label: s,
70
71
  headerAlign: i,
71
72
  prop: e,
72
- width: c,
73
+ width: m,
73
74
  fixed: h,
74
75
  showOverflowTooltip: !0
75
76
  }, null);
76
77
  }, H = (t) => {
77
78
  const {
78
79
  name: e,
79
- head: u,
80
+ head: s,
80
81
  headAlign: i,
81
- width: c,
82
+ width: m,
82
83
  fixed: h
83
84
  } = t, {
84
85
  thousandsSeparator: l = !0,
@@ -86,11 +87,11 @@ const pe = () => ({
86
87
  percentage: a = !1
87
88
  } = t;
88
89
  return o(w, {
89
- label: u,
90
+ label: s,
90
91
  headerAlign: i,
91
92
  align: "right",
92
93
  prop: e,
93
- width: c,
94
+ width: m,
94
95
  fixed: h,
95
96
  showOverflowTooltip: !0
96
97
  }, {
@@ -107,18 +108,18 @@ const pe = () => ({
107
108
  }, _ = (t) => {
108
109
  const {
109
110
  name: e,
110
- head: u,
111
+ head: s,
111
112
  headAlign: i,
112
- width: c,
113
+ width: m,
113
114
  fixed: h,
114
115
  sourceFormat: l,
115
116
  format: d = "YYYYMMDDHHmmss"
116
117
  } = t;
117
118
  return o(w, {
118
- label: u,
119
+ label: s,
119
120
  headerAlign: i,
120
121
  prop: e,
121
- width: c,
122
+ width: m,
122
123
  fixed: h,
123
124
  showOverflowTooltip: !0
124
125
  }, {
@@ -127,24 +128,24 @@ const pe = () => ({
127
128
  row: f,
128
129
  column: S
129
130
  } = a, g = f[S.property];
130
- return g instanceof Date || ae.isDayjs(g) ? o("div", null, [R(g, d)]) : l && d ? o("div", null, [R(g, l, d)]) : o("div", null, [g]);
131
+ return g instanceof Date || ae.isDayjs(g) ? o("div", null, [N(g, d)]) : l && d ? o("div", null, [N(g, l, d)]) : o("div", null, [g]);
131
132
  }
132
133
  });
133
134
  }, z = (t) => {
134
135
  const {
135
136
  name: e,
136
- head: u,
137
+ head: s,
137
138
  headAlign: i,
138
- width: c,
139
+ width: m,
139
140
  fixed: h
140
141
  } = t, {
141
142
  code: l
142
143
  } = t;
143
144
  return o(w, {
144
- label: u,
145
+ label: s,
145
146
  headerAlign: i,
146
147
  prop: e,
147
- width: c,
148
+ width: m,
148
149
  fixed: h,
149
150
  showOverflowTooltip: !0
150
151
  }, {
@@ -162,18 +163,18 @@ const pe = () => ({
162
163
  }, G = (t) => {
163
164
  const {
164
165
  name: e,
165
- head: u,
166
+ head: s,
166
167
  headAlign: i,
167
- width: c,
168
+ width: m,
168
169
  fixed: h
169
170
  } = t, {
170
171
  code: l
171
172
  } = t;
172
173
  return o(w, {
173
- label: u,
174
+ label: s,
174
175
  headerAlign: i,
175
176
  prop: e,
176
- width: c,
177
+ width: m,
177
178
  fixed: h,
178
179
  showOverflowTooltip: !0
179
180
  }, {
@@ -191,16 +192,16 @@ const pe = () => ({
191
192
  }, J = (t) => {
192
193
  const {
193
194
  name: e,
194
- head: u,
195
+ head: s,
195
196
  headAlign: i,
196
- width: c,
197
+ width: m,
197
198
  fixed: h
198
199
  } = t;
199
200
  return o(w, {
200
- label: u,
201
+ label: s,
201
202
  headerAlign: i,
202
203
  prop: e,
203
- width: c,
204
+ width: m,
204
205
  fixed: h
205
206
  }, {
206
207
  default: (l) => {
@@ -220,29 +221,29 @@ const pe = () => ({
220
221
  }, K = (t) => {
221
222
  const {
222
223
  head: e,
223
- headAlign: u
224
+ headAlign: s
224
225
  } = t, {
225
226
  children: i
226
227
  } = t;
227
228
  return o(w, {
228
229
  label: e,
229
- headerAlign: u
230
+ headerAlign: s
230
231
  }, {
231
- default: (c) => N(i)
232
+ default: (m) => T(i)
232
233
  });
233
234
  }, L = (t) => {
234
235
  const {
235
236
  name: e,
236
- head: u,
237
+ head: s,
237
238
  headAlign: i,
238
- width: c,
239
+ width: m,
239
240
  fixed: h
240
241
  } = t;
241
242
  return o(w, {
242
- label: u,
243
+ label: s,
243
244
  headerAlign: i,
244
245
  prop: e,
245
- width: c,
246
+ width: m,
246
247
  fixed: h
247
248
  }, {
248
249
  default: (l) => {
@@ -257,7 +258,7 @@ const pe = () => ({
257
258
  }, [d, X(" ")]);
258
259
  }
259
260
  });
260
- }, N = (t) => t == null ? void 0 : t.map((e) => {
261
+ }, T = (t) => t == null ? void 0 : t.map((e) => {
261
262
  if (e.type === "OQuerytableColumnString")
262
263
  return F(e);
263
264
  if (e.type === "OQuerytableColumnNumber")
@@ -277,20 +278,22 @@ const pe = () => ({
277
278
  throw new ue(`OQuerytable不能正确渲染'${e.type.name}'子组件。`);
278
279
  });
279
280
  return o("div", {
280
- class: [E, y.class],
281
- style: [Q.value, y.style]
281
+ class: [$, y.class],
282
+ style: [B.value, y.style]
282
283
  }, [o(ee, {
283
284
  ref: O,
284
- data: D,
285
+ border: !0,
286
+ data: Q,
285
287
  height: "100%",
286
288
  style: {
287
289
  width: "100%"
288
290
  },
289
- "onSelection-change": (t) => m("selectionChange", t),
290
- "highlight-current-row": k,
291
- "onCurrent-change": (t, e) => m("currentRowChange", t, e)
291
+ "onSelection-change": (t) => p("selectionChange", t),
292
+ "highlight-current-row": V,
293
+ "onCurrent-change": (t, e) => p("currentRowChange", t, e),
294
+ "onRow-click": (t, e, s) => p("rowClick", t, e, s)
292
295
  }, {
293
- default: () => [V && Y(), I && $(), N(B.value)]
296
+ default: () => [I && E(), k && Y(), T(v.value)]
294
297
  })]);
295
298
  };
296
299
  }
@@ -298,201 +301,201 @@ const pe = () => ({
298
301
  name: "OQuerytableColumnIndex",
299
302
  inheritAttrs: !1,
300
303
  props: me(),
301
- setup(r, {
302
- slots: p,
304
+ setup(n, {
305
+ slots: c,
303
306
  attrs: y,
304
- emit: m,
307
+ emit: p,
305
308
  expose: b
306
309
  }) {
307
310
  return () => null;
308
311
  }
309
312
  }), fe = () => ({
310
- head: n(),
311
- headAlign: n(),
312
- name: n(),
313
- width: s([Boolean, String]),
314
- fixed: s([Boolean, String])
313
+ head: r(),
314
+ headAlign: r(),
315
+ name: r(),
316
+ width: u([Boolean, String]),
317
+ fixed: u([Boolean, String])
315
318
  }), ge = /* @__PURE__ */ C({
316
319
  name: "OQuerytableColumnString",
317
320
  inheritAttrs: !1,
318
321
  props: fe(),
319
- setup(r, {
320
- slots: p,
322
+ setup(n, {
323
+ slots: c,
321
324
  attrs: y,
322
- emit: m,
325
+ emit: p,
323
326
  expose: b
324
327
  }) {
325
328
  return () => null;
326
329
  }
327
330
  }), ye = () => ({
328
- head: n(),
329
- headAlign: n(),
330
- name: n(),
331
- width: s([Boolean, String]),
332
- fixed: s([Boolean, String]),
333
- thousandsSeparator: v(!0),
331
+ head: r(),
332
+ headAlign: r(),
333
+ name: r(),
334
+ width: u([Boolean, String]),
335
+ fixed: u([Boolean, String]),
336
+ thousandsSeparator: D(!0),
334
337
  precision: oe(-1),
335
- percentage: v(!1)
338
+ percentage: D(!1)
336
339
  }), be = /* @__PURE__ */ C({
337
340
  name: "OQuerytableColumnNumber",
338
341
  inheritAttrs: !1,
339
342
  props: ye(),
340
- setup(r, {
341
- slots: p,
343
+ setup(n, {
344
+ slots: c,
342
345
  attrs: y,
343
- emit: m,
346
+ emit: p,
344
347
  expose: b
345
348
  }) {
346
349
  return () => null;
347
350
  }
348
351
  }), Ce = () => ({
349
- head: n(),
350
- headAlign: n(),
351
- name: n(),
352
- width: s([Boolean, String]),
353
- fixed: s([Boolean, String]),
352
+ head: r(),
353
+ headAlign: r(),
354
+ name: r(),
355
+ width: u([Boolean, String]),
356
+ fixed: u([Boolean, String]),
354
357
  // Date
355
- format: n(),
356
- sourceFormat: n()
358
+ format: r(),
359
+ sourceFormat: r()
357
360
  }), we = /* @__PURE__ */ C({
358
361
  name: "OQuerytableColumnDate",
359
362
  inheritAttrs: !1,
360
363
  props: Ce(),
361
- setup(r, {
362
- slots: p,
364
+ setup(n, {
365
+ slots: c,
363
366
  attrs: y,
364
- emit: m,
367
+ emit: p,
365
368
  expose: b
366
369
  }) {
367
370
  return () => null;
368
371
  }
369
372
  }), Se = () => ({
370
- head: n(),
371
- headAlign: n(),
372
- name: n(),
373
- width: s([Boolean, String]),
374
- fixed: s([Boolean, String]),
375
- code: s([String, Array])
373
+ head: r(),
374
+ headAlign: r(),
375
+ name: r(),
376
+ width: u([Boolean, String]),
377
+ fixed: u([Boolean, String]),
378
+ code: u([String, Array])
376
379
  }), xe = /* @__PURE__ */ C({
377
380
  name: "OQuerytableColumnSingleselect",
378
381
  inheritAttrs: !1,
379
382
  props: Se(),
380
- setup(r, {
381
- slots: p,
383
+ setup(n, {
384
+ slots: c,
382
385
  attrs: y,
383
- emit: m,
386
+ emit: p,
384
387
  expose: b
385
388
  }) {
386
389
  return () => null;
387
390
  }
388
391
  }), Ae = () => ({
389
- head: n(),
390
- headAlign: n(),
391
- name: n(),
392
- width: s([Boolean, String]),
393
- fixed: s([Boolean, String]),
394
- code: s([String, Array])
392
+ head: r(),
393
+ headAlign: r(),
394
+ name: r(),
395
+ width: u([Boolean, String]),
396
+ fixed: u([Boolean, String]),
397
+ code: u([String, Array])
395
398
  }), Oe = /* @__PURE__ */ C({
396
399
  name: "OQuerytableColumnMultiselect",
397
400
  inheritAttrs: !1,
398
401
  props: Ae(),
399
- setup(r, {
400
- slots: p,
402
+ setup(n, {
403
+ slots: c,
401
404
  attrs: y,
402
- emit: m,
405
+ emit: p,
403
406
  expose: b
404
407
  }) {
405
408
  return () => null;
406
409
  }
407
410
  }), Qe = () => ({
408
- head: n(),
409
- headAlign: n(),
410
- name: n(),
411
- width: s([Boolean, String]),
412
- fixed: s([Boolean, String])
411
+ head: r(),
412
+ headAlign: r(),
413
+ name: r(),
414
+ width: u([Boolean, String]),
415
+ fixed: u([Boolean, String])
413
416
  }), Be = /* @__PURE__ */ C({
414
417
  name: "OQuerytableColumnButtongroup",
415
418
  inheritAttrs: !1,
416
419
  props: Qe(),
417
420
  slots: Object,
418
- setup(r, {
419
- slots: p,
421
+ setup(n, {
422
+ slots: c,
420
423
  attrs: y,
421
- emit: m,
424
+ emit: p,
422
425
  expose: b
423
426
  }) {
424
427
  return () => null;
425
428
  }
426
429
  });
427
- function ve(r) {
428
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !j(r);
430
+ function ve(n) {
431
+ return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !j(n);
429
432
  }
430
433
  const De = () => ({
431
- type: n()
432
- }), Te = /* @__PURE__ */ C({
434
+ type: r()
435
+ }), Re = /* @__PURE__ */ C({
433
436
  name: "OQuerytableCellButton",
434
437
  inheritAttrs: !1,
435
438
  props: De(),
436
439
  emits: ["click"],
437
- setup(r, {
438
- slots: p,
440
+ setup(n, {
441
+ slots: c,
439
442
  attrs: y,
440
- emit: m,
443
+ emit: p,
441
444
  expose: b
442
445
  }) {
443
- const O = (Q) => {
444
- m("click", Q);
446
+ const O = (B) => {
447
+ p("click", B);
445
448
  };
446
449
  return () => {
447
- var T;
450
+ var R;
448
451
  const {
449
- type: Q
450
- } = r, B = (T = p.default) == null ? void 0 : T.call(p);
452
+ type: B
453
+ } = n, v = (R = c.default) == null ? void 0 : R.call(c);
451
454
  return o(te, {
452
455
  link: !0,
453
- type: Q,
456
+ type: B,
454
457
  size: "small",
455
458
  onClick: O
456
- }, ve(B) ? B : {
457
- default: () => [B]
459
+ }, ve(v) ? v : {
460
+ default: () => [v]
458
461
  });
459
462
  };
460
463
  }
461
- }), Ne = () => ({
462
- head: n(),
463
- headAlign: n()
464
- }), Re = /* @__PURE__ */ C({
464
+ }), Te = () => ({
465
+ head: r(),
466
+ headAlign: r()
467
+ }), Ne = /* @__PURE__ */ C({
465
468
  name: "OQuerytableColumngroup",
466
469
  inheritAttrs: !1,
467
- props: Ne(),
468
- setup(r, {
469
- slots: p,
470
+ props: Te(),
471
+ setup(n, {
472
+ slots: c,
470
473
  attrs: y,
471
- emit: m,
474
+ emit: p,
472
475
  expose: b
473
476
  }) {
474
477
  return () => null;
475
478
  }
476
479
  }), qe = () => ({
477
- head: n(),
478
- headAlign: n(),
479
- name: n(),
480
- width: s([Boolean, String]),
481
- fixed: s([Boolean, String])
480
+ head: r(),
481
+ headAlign: r(),
482
+ name: r(),
483
+ width: u([Boolean, String]),
484
+ fixed: u([Boolean, String])
482
485
  }), Me = /* @__PURE__ */ C({
483
486
  name: "OQuerytableColumnDiy",
484
487
  inheritAttrs: !1,
485
488
  props: qe(),
486
489
  slots: Object,
487
- setup(r, {
488
- slots: p,
490
+ setup(n, {
491
+ slots: c,
489
492
  attrs: y,
490
- emit: m,
493
+ emit: p,
491
494
  expose: b
492
495
  }) {
493
496
  return () => null;
494
497
  }
495
- }), Le = Z(ce, {
498
+ }), Ue = Z(pe, {
496
499
  QuerytableColumnIndex: he,
497
500
  QuerytableColumnString: ge,
498
501
  QuerytableColumnNumber: be,
@@ -500,11 +503,11 @@ const De = () => ({
500
503
  QuerytableColumnSingleselect: xe,
501
504
  QuerytableColumnMultiselect: Oe,
502
505
  QuerytableColumnButtongroup: Be,
503
- QuerytableCellButton: Te,
504
- QuerytableColumngroup: Re,
506
+ QuerytableCellButton: Re,
507
+ QuerytableColumngroup: Ne,
505
508
  QuerytableColumnDiy: Me
506
509
  });
507
510
  export {
508
- Le as default
511
+ Ue as default
509
512
  };
510
513
  //# sourceMappingURL=index.js.map