orion-design 0.1.13 → 0.1.14

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 (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 +130 -128
  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 +90 -88
  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
@@ -1,36 +1,36 @@
1
1
  import "lodash-es";
2
- import { defineComponent as C, ref as W, computed as X, createVNode as o, createTextVNode as Z, isVNode as k } from "vue";
2
+ import { defineComponent as C, ref as W, computed as X, createVNode as o, createTextVNode as Z, isVNode as V } from "vue";
3
3
  import { withInstall as ee } from "../_util/vue/install.js";
4
4
  import { ElTable as te, ElPagination as ne, ElTableColumn as S, ElButton as oe } from "element-plus";
5
5
  import le from "../_util/classNames.js";
6
- import { arrayType as re, objectType as ae, booleanType as T, stringType as n, someType as s, numberType as se } from "../_util/type.js";
7
- import { number2string as ie, formatDate as j, getSingleCodeContent as M, getMultiCodeContent as I } from "./utils/index.js";
6
+ import { arrayType as re, objectType as ae, booleanType as R, stringType as n, someType as i, numberType as se } from "../_util/type.js";
7
+ import { number2string as ie, formatDate as j, getSingleCodeContent as M, getMultiCodeContent as k } from "./utils/index.js";
8
8
  import ue from "dayjs";
9
9
  import { S as pe } from "../../index-BbsXWo7C.js";
10
10
  import de from "../../error/OrionError.js";
11
11
  import ce from "./hooks/useColumns.js";
12
- import V from "../../Throne/index.js";
12
+ import I from "../../Throne/index.js";
13
13
  function ge(l) {
14
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !k(l);
14
+ return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !V(l);
15
15
  }
16
16
  const me = () => ({
17
17
  data: re(),
18
18
  pagination: ae(),
19
- showRowNumber: T(!0),
20
- selectionMode: T(!1),
21
- currentRowMode: T(!1)
19
+ showRowNumber: R(!0),
20
+ selectionMode: R(!1),
21
+ currentRowMode: R(!1)
22
22
  }), he = /* @__PURE__ */ C({
23
23
  name: "OPagetable",
24
24
  inheritAttrs: !1,
25
25
  props: me(),
26
- emits: ["selectionChange", "currentRowChange", "update:pagination"],
26
+ emits: ["selectionChange", "currentRowChange", "update:pagination", "rowClick"],
27
27
  setup(l, {
28
- slots: d,
28
+ slots: c,
29
29
  attrs: b,
30
- emit: c,
30
+ emit: u,
31
31
  expose: w
32
32
  }) {
33
- const A = W(), B = X(() => ({})), D = ce(d);
33
+ const A = W(), B = X(() => ({})), D = ce(c);
34
34
  return w({
35
35
  clearSelection: () => {
36
36
  A.value.clearSelection();
@@ -47,10 +47,10 @@ const me = () => ({
47
47
  } = l, {
48
48
  pagination: v
49
49
  } = l, {
50
- showRowNumber: z = !0
50
+ showRowNumber: $ = !0
51
51
  } = l, {
52
- currentRowMode: Y = !1
53
- } = l, $ = le("orion-pagetbale"), F = () => o(S, {
52
+ currentRowMode: z = !1
53
+ } = l, Y = le("orion-pagetbale"), F = () => o(S, {
54
54
  type: "index",
55
55
  label: "No",
56
56
  width: 56,
@@ -64,14 +64,14 @@ const me = () => ({
64
64
  }, null), _ = (e) => {
65
65
  const {
66
66
  name: t,
67
- head: i,
68
- headAlign: u,
67
+ head: s,
68
+ headAlign: p,
69
69
  width: g,
70
70
  fixed: m
71
71
  } = e;
72
72
  return o(S, {
73
- label: i,
74
- headerAlign: u,
73
+ label: s,
74
+ headerAlign: p,
75
75
  prop: t,
76
76
  width: g,
77
77
  fixed: m,
@@ -80,18 +80,18 @@ const me = () => ({
80
80
  }, U = (e) => {
81
81
  const {
82
82
  name: t,
83
- head: i,
84
- headAlign: u,
83
+ head: s,
84
+ headAlign: p,
85
85
  width: g,
86
86
  fixed: m
87
87
  } = e, {
88
88
  thousandsSeparator: r = !0,
89
- precision: p = -1,
89
+ precision: d = -1,
90
90
  percentage: a = !1
91
91
  } = e;
92
92
  return o(S, {
93
- label: i,
94
- headerAlign: u,
93
+ label: s,
94
+ headerAlign: p,
95
95
  align: "right",
96
96
  prop: t,
97
97
  width: g,
@@ -105,22 +105,22 @@ const me = () => ({
105
105
  } = h;
106
106
  return o("span", {
107
107
  class: "cell-numbercolumn"
108
- }, [ie(y[f.property], r, p, a === !0 || a === "")]);
108
+ }, [ie(y[f.property], r, d, a === !0 || a === "")]);
109
109
  }
110
110
  });
111
111
  }, q = (e) => {
112
112
  const {
113
113
  name: t,
114
- head: i,
115
- headAlign: u,
114
+ head: s,
115
+ headAlign: p,
116
116
  width: g,
117
117
  fixed: m,
118
118
  sourceFormat: r,
119
- format: p = "YYYYMMDDHHmmss"
119
+ format: d = "YYYYMMDDHHmmss"
120
120
  } = e;
121
121
  return o(S, {
122
- label: i,
123
- headerAlign: u,
122
+ label: s,
123
+ headerAlign: p,
124
124
  prop: t,
125
125
  width: g,
126
126
  fixed: m,
@@ -131,134 +131,134 @@ const me = () => ({
131
131
  row: h,
132
132
  column: y
133
133
  } = a, f = h[y.property];
134
- return f instanceof Date || ue.isDayjs(f) ? o("div", null, [j(f, p)]) : r && p ? o("div", null, [j(f, r, p)]) : o("div", null, [f]);
134
+ return f instanceof Date || ue.isDayjs(f) ? o("div", null, [j(f, d)]) : r && d ? o("div", null, [j(f, r, d)]) : o("div", null, [f]);
135
135
  }
136
136
  });
137
137
  }, G = (e) => {
138
138
  const {
139
139
  name: t,
140
- head: i,
141
- headAlign: u,
140
+ head: s,
141
+ headAlign: p,
142
142
  width: g,
143
143
  fixed: m
144
144
  } = e, {
145
145
  code: r
146
146
  } = e;
147
147
  return o(S, {
148
- label: i,
149
- headerAlign: u,
148
+ label: s,
149
+ headerAlign: p,
150
150
  prop: t,
151
151
  width: g,
152
152
  fixed: m,
153
153
  showOverflowTooltip: !0
154
154
  }, {
155
- default: (p) => {
155
+ default: (d) => {
156
156
  const {
157
157
  row: a,
158
158
  column: h
159
- } = p, y = a[h.property];
160
- let f, x, P;
161
- return r ? typeof r == "string" ? (f = r, x = V.getCode(f), P = M(x.value, y)) : (x = r, P = M(x, y)) : P = null, o("span", {
159
+ } = d, y = a[h.property];
160
+ let f, P, x;
161
+ return r ? typeof r == "string" ? (f = r, P = I.getCode(f), x = M(P.value, y)) : (P = r, x = M(P, y)) : x = null, o("span", {
162
162
  class: "cell-singleselect"
163
- }, [P]);
163
+ }, [x]);
164
164
  }
165
165
  });
166
166
  }, J = (e) => {
167
167
  const {
168
168
  name: t,
169
- head: i,
170
- headAlign: u,
169
+ head: s,
170
+ headAlign: p,
171
171
  width: g,
172
172
  fixed: m
173
173
  } = e, {
174
174
  code: r
175
175
  } = e;
176
176
  return o(S, {
177
- label: i,
178
- headerAlign: u,
177
+ label: s,
178
+ headerAlign: p,
179
179
  prop: t,
180
180
  width: g,
181
181
  fixed: m,
182
182
  showOverflowTooltip: !0
183
183
  }, {
184
- default: (p) => {
184
+ default: (d) => {
185
185
  const {
186
186
  row: a,
187
187
  column: h
188
- } = p, y = a[h.property];
189
- let f, x, P;
190
- return r ? typeof r == "string" ? (f = r, x = V.getCode(f), P = I(x.value, y)) : (x = r, P = I(x, y)) : P = null, o("span", {
188
+ } = d, y = a[h.property];
189
+ let f, P, x;
190
+ return r ? typeof r == "string" ? (f = r, P = I.getCode(f), x = k(P.value, y)) : (P = r, x = k(P, y)) : x = null, o("span", {
191
191
  class: "cell-multiselect"
192
- }, [P]);
192
+ }, [x]);
193
193
  }
194
194
  });
195
195
  }, K = (e) => {
196
196
  const {
197
197
  name: t,
198
- head: i,
199
- headAlign: u,
198
+ head: s,
199
+ headAlign: p,
200
200
  width: g,
201
201
  fixed: m
202
202
  } = e;
203
203
  return o(S, {
204
- label: i,
205
- headerAlign: u,
204
+ label: s,
205
+ headerAlign: p,
206
206
  prop: t,
207
207
  width: g,
208
208
  fixed: m
209
209
  }, {
210
210
  default: (r) => {
211
211
  var a, h;
212
- const p = (h = (a = e.children) == null ? void 0 : a.default) == null ? void 0 : h.call(a, {
212
+ const d = (h = (a = e.children) == null ? void 0 : a.default) == null ? void 0 : h.call(a, {
213
213
  rowData: r.row,
214
214
  column: e,
215
215
  rowIndex: r.$index
216
216
  });
217
217
  return o("div", {
218
218
  class: "cell-buttongroup"
219
- }, [o(pe, null, ge(p) ? p : {
220
- default: () => [p]
219
+ }, [o(pe, null, ge(d) ? d : {
220
+ default: () => [d]
221
221
  })]);
222
222
  }
223
223
  });
224
224
  }, L = (e) => {
225
225
  const {
226
226
  head: t,
227
- headAlign: i
227
+ headAlign: s
228
228
  } = e, {
229
- children: u
229
+ children: p
230
230
  } = e;
231
231
  return o(S, {
232
232
  label: t,
233
- headerAlign: i
233
+ headerAlign: s
234
234
  }, {
235
- default: (g) => N(u)
235
+ default: (g) => N(p)
236
236
  });
237
237
  }, Q = (e) => {
238
238
  const {
239
239
  name: t,
240
- head: i,
241
- headAlign: u,
240
+ head: s,
241
+ headAlign: p,
242
242
  width: g,
243
243
  fixed: m
244
244
  } = e;
245
245
  return o(S, {
246
- label: i,
247
- headerAlign: u,
246
+ label: s,
247
+ headerAlign: p,
248
248
  prop: t,
249
249
  width: g,
250
250
  fixed: m
251
251
  }, {
252
252
  default: (r) => {
253
253
  var a, h;
254
- const p = (h = (a = e.children) == null ? void 0 : a.default) == null ? void 0 : h.call(a, {
254
+ const d = (h = (a = e.children) == null ? void 0 : a.default) == null ? void 0 : h.call(a, {
255
255
  rowData: r.row,
256
256
  column: e,
257
257
  rowIndex: r.$index
258
258
  });
259
259
  return o("div", {
260
260
  class: "cell-diy"
261
- }, [p, Z(" ")]);
261
+ }, [d, Z(" ")]);
262
262
  }
263
263
  });
264
264
  }, N = (e) => e == null ? void 0 : e.map((t) => {
@@ -281,28 +281,30 @@ const me = () => ({
281
281
  throw new de(`OPagetable不能正确渲染'${t.type.name}'子组件。`);
282
282
  });
283
283
  return o("div", {
284
- class: [$, b.class],
284
+ class: [Y, b.class],
285
285
  style: [B.value, b.style]
286
286
  }, [o("div", {
287
287
  class: "pagetable-wrapper"
288
288
  }, [o(te, {
289
+ border: !0,
289
290
  ref: A,
290
291
  data: O,
291
292
  height: "100%",
292
293
  style: {
293
294
  width: "100%"
294
295
  },
295
- "onSelection-change": (e) => c("selectionChange", e),
296
- "highlight-current-row": Y,
297
- "onCurrent-change": (e, t) => c("currentRowChange", e, t)
296
+ "onSelection-change": (e) => u("selectionChange", e),
297
+ "highlight-current-row": z,
298
+ "onCurrent-change": (e, t) => u("currentRowChange", e, t),
299
+ "onRow-click": (e, t, s) => u("rowClick", e, t, s)
298
300
  }, {
299
- default: () => [z && F(), E && H(), N(D.value)]
301
+ default: () => [$ && F(), E && H(), N(D.value)]
300
302
  })]), o("div", {
301
303
  class: "pagination-wrapper"
302
304
  }, [o(ne, {
303
305
  currentPage: v.currentPage,
304
306
  "onUpdate:current-page": (e) => {
305
- c("update:pagination", {
307
+ u("update:pagination", {
306
308
  ...v,
307
309
  currentPage: e
308
310
  });
@@ -318,9 +320,9 @@ const me = () => ({
318
320
  inheritAttrs: !1,
319
321
  props: fe(),
320
322
  setup(l, {
321
- slots: d,
323
+ slots: c,
322
324
  attrs: b,
323
- emit: c,
325
+ emit: u,
324
326
  expose: w
325
327
  }) {
326
328
  return () => null;
@@ -329,16 +331,16 @@ const me = () => ({
329
331
  head: n(),
330
332
  headAlign: n(),
331
333
  name: n(),
332
- width: s([Boolean, String]),
333
- fixed: s([Boolean, String])
334
+ width: i([Boolean, String]),
335
+ fixed: i([Boolean, String])
334
336
  }), Ce = /* @__PURE__ */ C({
335
337
  name: "OPagetableColumnString",
336
338
  inheritAttrs: !1,
337
339
  props: we(),
338
340
  setup(l, {
339
- slots: d,
341
+ slots: c,
340
342
  attrs: b,
341
- emit: c,
343
+ emit: u,
342
344
  expose: w
343
345
  }) {
344
346
  return () => null;
@@ -347,40 +349,40 @@ const me = () => ({
347
349
  head: n(),
348
350
  headAlign: n(),
349
351
  name: n(),
350
- width: s([Boolean, String]),
351
- fixed: s([Boolean, String]),
352
- thousandsSeparator: T(!0),
352
+ width: i([Boolean, String]),
353
+ fixed: i([Boolean, String]),
354
+ thousandsSeparator: R(!0),
353
355
  precision: se(-1),
354
- percentage: T(!1)
356
+ percentage: R(!1)
355
357
  }), ye = /* @__PURE__ */ C({
356
358
  name: "OPagetableColumnNumber",
357
359
  inheritAttrs: !1,
358
360
  props: Se(),
359
361
  setup(l, {
360
- slots: d,
362
+ slots: c,
361
363
  attrs: b,
362
- emit: c,
364
+ emit: u,
363
365
  expose: w
364
366
  }) {
365
367
  return () => null;
366
368
  }
367
- }), xe = () => ({
369
+ }), Pe = () => ({
368
370
  head: n(),
369
371
  headAlign: n(),
370
372
  name: n(),
371
- width: s([Boolean, String]),
372
- fixed: s([Boolean, String]),
373
+ width: i([Boolean, String]),
374
+ fixed: i([Boolean, String]),
373
375
  // Date
374
376
  format: n(),
375
377
  sourceFormat: n()
376
- }), Pe = /* @__PURE__ */ C({
378
+ }), xe = /* @__PURE__ */ C({
377
379
  name: "OPagetableColumnDate",
378
380
  inheritAttrs: !1,
379
- props: xe(),
381
+ props: Pe(),
380
382
  setup(l, {
381
- slots: d,
383
+ slots: c,
382
384
  attrs: b,
383
- emit: c,
385
+ emit: u,
384
386
  expose: w
385
387
  }) {
386
388
  return () => null;
@@ -389,17 +391,17 @@ const me = () => ({
389
391
  head: n(),
390
392
  headAlign: n(),
391
393
  name: n(),
392
- width: s([Boolean, String]),
393
- fixed: s([Boolean, String]),
394
- code: s([String, Array])
394
+ width: i([Boolean, String]),
395
+ fixed: i([Boolean, String]),
396
+ code: i([String, Array])
395
397
  }), Oe = /* @__PURE__ */ C({
396
398
  name: "OPagetableColumnSingleselect",
397
399
  inheritAttrs: !1,
398
400
  props: Ae(),
399
401
  setup(l, {
400
- slots: d,
402
+ slots: c,
401
403
  attrs: b,
402
- emit: c,
404
+ emit: u,
403
405
  expose: w
404
406
  }) {
405
407
  return () => null;
@@ -408,17 +410,17 @@ const me = () => ({
408
410
  head: n(),
409
411
  headAlign: n(),
410
412
  name: n(),
411
- width: s([Boolean, String]),
412
- fixed: s([Boolean, String]),
413
- code: s([String, Array])
413
+ width: i([Boolean, String]),
414
+ fixed: i([Boolean, String]),
415
+ code: i([String, Array])
414
416
  }), Be = /* @__PURE__ */ C({
415
417
  name: "OPagetableColumnMultiselect",
416
418
  inheritAttrs: !1,
417
419
  props: ve(),
418
420
  setup(l, {
419
- slots: d,
421
+ slots: c,
420
422
  attrs: b,
421
- emit: c,
423
+ emit: u,
422
424
  expose: w
423
425
  }) {
424
426
  return () => null;
@@ -427,24 +429,24 @@ const me = () => ({
427
429
  head: n(),
428
430
  headAlign: n(),
429
431
  name: n(),
430
- width: s([Boolean, String]),
431
- fixed: s([Boolean, String])
432
- }), Te = /* @__PURE__ */ C({
432
+ width: i([Boolean, String]),
433
+ fixed: i([Boolean, String])
434
+ }), Re = /* @__PURE__ */ C({
433
435
  name: "OPagetableColumnButtongroup",
434
436
  inheritAttrs: !1,
435
437
  props: De(),
436
438
  slots: Object,
437
439
  setup(l, {
438
- slots: d,
440
+ slots: c,
439
441
  attrs: b,
440
- emit: c,
442
+ emit: u,
441
443
  expose: w
442
444
  }) {
443
445
  return () => null;
444
446
  }
445
447
  });
446
- function Re(l) {
447
- return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !k(l);
448
+ function Te(l) {
449
+ return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !V(l);
448
450
  }
449
451
  const Ne = () => ({
450
452
  type: n()
@@ -454,25 +456,25 @@ const Ne = () => ({
454
456
  props: Ne(),
455
457
  emits: ["click"],
456
458
  setup(l, {
457
- slots: d,
459
+ slots: c,
458
460
  attrs: b,
459
- emit: c,
461
+ emit: u,
460
462
  expose: w
461
463
  }) {
462
464
  const A = (B) => {
463
- c("click", B);
465
+ u("click", B);
464
466
  };
465
467
  return () => {
466
- var R;
468
+ var T;
467
469
  const {
468
470
  type: B
469
- } = l, D = (R = d.default) == null ? void 0 : R.call(d);
471
+ } = l, D = (T = c.default) == null ? void 0 : T.call(c);
470
472
  return o(oe, {
471
473
  link: !0,
472
474
  type: B,
473
475
  size: "small",
474
476
  onClick: A
475
- }, Re(D) ? D : {
477
+ }, Te(D) ? D : {
476
478
  default: () => [D]
477
479
  });
478
480
  };
@@ -480,33 +482,33 @@ const Ne = () => ({
480
482
  }), Me = () => ({
481
483
  head: n(),
482
484
  headAlign: n()
483
- }), Ie = /* @__PURE__ */ C({
485
+ }), ke = /* @__PURE__ */ C({
484
486
  name: "OPagetableColumngroup",
485
487
  inheritAttrs: !1,
486
488
  props: Me(),
487
489
  setup(l, {
488
- slots: d,
490
+ slots: c,
489
491
  attrs: b,
490
- emit: c,
492
+ emit: u,
491
493
  expose: w
492
494
  }) {
493
495
  return () => null;
494
496
  }
495
- }), Ve = () => ({
497
+ }), Ie = () => ({
496
498
  head: n(),
497
499
  headAlign: n(),
498
500
  name: n(),
499
- width: s([Boolean, String]),
500
- fixed: s([Boolean, String])
501
- }), ke = /* @__PURE__ */ C({
501
+ width: i([Boolean, String]),
502
+ fixed: i([Boolean, String])
503
+ }), Ve = /* @__PURE__ */ C({
502
504
  name: "OPagetableColumnDiy",
503
505
  inheritAttrs: !1,
504
- props: Ve(),
506
+ props: Ie(),
505
507
  slots: Object,
506
508
  setup(l, {
507
- slots: d,
509
+ slots: c,
508
510
  attrs: b,
509
- emit: c,
511
+ emit: u,
510
512
  expose: w
511
513
  }) {
512
514
  return () => null;
@@ -515,13 +517,13 @@ const Ne = () => ({
515
517
  PagetableColumnIndex: be,
516
518
  PagetableColumnString: Ce,
517
519
  PagetableColumnNumber: ye,
518
- PagetableColumnDate: Pe,
520
+ PagetableColumnDate: xe,
519
521
  PagetableColumnSingleselect: Oe,
520
522
  PagetableColumnMultiselect: Be,
521
- PagetableColumnButtongroup: Te,
523
+ PagetableColumnButtongroup: Re,
522
524
  PagetableCellButton: je,
523
- PagetableColumngroup: Ie,
524
- PagetableColumnDiy: ke
525
+ PagetableColumngroup: ke,
526
+ PagetableColumnDiy: Ve
525
527
  });
526
528
  export {
527
529
  Ze as default