orion-design 0.1.40 → 0.1.42

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
1
+ # Vue 3 + TypeScript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
@@ -1 +1 @@
1
- {"version":3,"file":"use-throne-context.js","sources":["../../../src/Throne/hooks/use-throne-context.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\r\n\r\nimport type { InjectionKey } from 'vue'\r\n\r\nexport const throneContextKey: InjectionKey<Ref<Record<string, any> | undefined>> = Symbol('throneContext')\r\n\r\nimport type { App, Ref } from 'vue'\r\nimport type { ThroneContextProviderContext } from '../../components/Throne/ThroneContextProvider'\r\n\r\n\r\nexport function useThroneContext(): Ref<Record<string, any> | undefined> | undefined {\r\n const context = inject(throneContextKey, undefined)\r\n return context\r\n}\r\n\r\nexport const provideThroneContext = (props: ThroneContextProviderContext) => {\r\n const context = computed(() => {\r\n return props.context || undefined\r\n })\r\n\r\n provide(throneContextKey, context)\r\n\r\n return context\r\n}\r\n"],"names":["throneContextKey","useThroneContext","inject","provideThroneContext","props","context","computed","provide"],"mappings":";AAIa,MAAAA,IAAuE,OAAO,eAAe;AAMnG,SAASC,IAAqE;AAE5E,SADSC,EAAOF,GAAkB,MAAS;AAEpD;AAEa,MAAAG,IAAuB,CAACC,MAAwC;AACrE,QAAAC,IAAUC,EAAS,MAChBF,EAAM,WAAW,MACzB;AAED,SAAAG,EAAQP,GAAkBK,CAAO,GAE1BA;AACT;"}
1
+ {"version":3,"file":"use-throne-context.js","sources":["../../../src/Throne/hooks/use-throne-context.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\n\nimport type { InjectionKey } from 'vue'\n\nexport const throneContextKey: InjectionKey<Ref<Record<string, any> | undefined>> = Symbol('throneContext')\n\nimport type { App, Ref } from 'vue'\nimport type { ThroneContextProviderContext } from '../../components/Throne/ThroneContextProvider'\n\n\nexport function useThroneContext(): Ref<Record<string, any> | undefined> | undefined {\n const context = inject(throneContextKey, undefined)\n return context\n}\n\nexport const provideThroneContext = (props: ThroneContextProviderContext) => {\n const context = computed(() => {\n return props.context || undefined\n })\n\n provide(throneContextKey, context)\n\n return context\n}\n"],"names":["throneContextKey","useThroneContext","inject","provideThroneContext","props","context","computed","provide"],"mappings":";AAIa,MAAAA,IAAuE,OAAO,eAAe;AAMnG,SAASC,IAAqE;AAE5E,SADSC,EAAOF,GAAkB,MAAS;AAEpD;AAEa,MAAAG,IAAuB,CAACC,MAAwC;AACrE,QAAAC,IAAUC,EAAS,MAChBF,EAAM,WAAW,MACzB;AAED,SAAAG,EAAQP,GAAkBK,CAAO,GAE1BA;AACT;"}
@@ -1,7 +1,7 @@
1
1
  import "lodash-es";
2
2
  import { defineComponent as x, ref as ie, computed as $, createVNode as a, createTextVNode as se, isVNode as U } from "vue";
3
3
  import { withInstall as ue } from "../_util/vue/install.js";
4
- import { ElTable as pe, ElTableColumn as S, ElPagination as ce, ElButton as de } from "element-plus";
4
+ import { ElTable as ce, ElTableColumn as S, ElPagination as pe, ElButton as de } from "element-plus";
5
5
  import ge from "../_util/classNames.js";
6
6
  import { arrayType as me, objectType as L, booleanType as R, stringType as n, someType as r, numberType as fe } from "../_util/type.js";
7
7
  import { number2string as he, formatDate as Y, getSingleCodeContent as we, getMultiCodeContent as be } from "./utils/index.js";
@@ -32,12 +32,12 @@ const Ae = () => ({
32
32
  props: Ae(),
33
33
  emits: ["selectionChange", "currentRowChange", "update:pagination", "paginationChange", "rowClick", "rowDblclick", "cellClick", "cellDblclick", "select", "select-all"],
34
34
  setup(o, {
35
- slots: p,
35
+ slots: c,
36
36
  attrs: y,
37
37
  emit: s,
38
38
  expose: C
39
39
  }) {
40
- const v = ie(), k = $(() => ({})), B = Se(p), _ = $(() => {
40
+ const v = ie(), k = $(() => ({})), B = Se(c), _ = $(() => {
41
41
  let m = [];
42
42
  o.showRowNumber && m.push({
43
43
  type: "__showRowNumber__"
@@ -122,19 +122,20 @@ const Ae = () => ({
122
122
  headerAlign: "center",
123
123
  align: "center",
124
124
  width: 56,
125
- fixed: p.expandedRowRender ? !1 : "left",
125
+ fixed: c.expandedRowRender ? !1 : "left",
126
126
  showOverflowTooltip: !0,
127
- index: (e) => (d.currentPage - 1) * d.pageSize + e + 1
127
+ index: (t) => (d.currentPage - 1) * d.pageSize + t + 1
128
128
  }, null), W = () => a(S, {
129
129
  type: "selection",
130
+ headerAlign: "center",
130
131
  align: "center",
131
132
  width: 40,
132
- fixed: p.expandedRowRender ? !1 : "left"
133
+ fixed: c.expandedRowRender ? !1 : "left"
133
134
  }, null), X = (e) => {
134
135
  const {
135
136
  name: t,
136
137
  head: l,
137
- headAlign: i,
138
+ headAlign: i = "center",
138
139
  bodyAlign: u,
139
140
  width: h,
140
141
  fixed: f
@@ -152,7 +153,7 @@ const Ae = () => ({
152
153
  const {
153
154
  name: t,
154
155
  head: l,
155
- headAlign: i,
156
+ headAlign: i = "center",
156
157
  bodyAlign: u,
157
158
  width: h,
158
159
  fixed: f
@@ -168,25 +169,25 @@ const Ae = () => ({
168
169
  }, {
169
170
  default: (w) => {
170
171
  const {
171
- row: c,
172
+ row: p,
172
173
  column: g
173
174
  } = w;
174
175
  return a("span", {
175
176
  class: "cell-linkcolumn"
176
- }, [c[g.property]]);
177
+ }, [p[g.property]]);
177
178
  }
178
179
  });
179
180
  }, ee = (e) => {
180
181
  const {
181
182
  name: t,
182
183
  head: l,
183
- headAlign: i,
184
+ headAlign: i = "center",
184
185
  bodyAlign: u = "right",
185
186
  width: h,
186
187
  fixed: f
187
188
  } = e, {
188
189
  thousandsSeparator: w = !0,
189
- precision: c = -1,
190
+ precision: p = -1,
190
191
  percentage: g = !1
191
192
  } = e;
192
193
  return a(S, {
@@ -205,19 +206,19 @@ const Ae = () => ({
205
206
  } = P;
206
207
  return a("span", {
207
208
  class: "cell-numbercolumn"
208
- }, [he(D[b.property], w, c, g === !0 || g === "")]);
209
+ }, [he(D[b.property], w, p, g === !0 || g === "")]);
209
210
  }
210
211
  });
211
212
  }, te = (e) => {
212
213
  const {
213
214
  name: t,
214
215
  head: l,
215
- headAlign: i,
216
- bodyAlign: u,
216
+ headAlign: i = "center",
217
+ bodyAlign: u = "center",
217
218
  width: h,
218
219
  fixed: f,
219
220
  sourceFormat: w,
220
- format: c = "YYYYMMDDHHmmss"
221
+ format: p = "YYYYMMDDHHmmss"
221
222
  } = e;
222
223
  return a(S, {
223
224
  label: l,
@@ -233,14 +234,14 @@ const Ae = () => ({
233
234
  row: P,
234
235
  column: D
235
236
  } = g, b = P[D.property];
236
- return b instanceof Date || ye.isDayjs(b) ? a("div", null, [Y(b, c)]) : w && c ? a("div", null, [Y(b, w, c)]) : a("div", null, [b]);
237
+ return b instanceof Date || ye.isDayjs(b) ? a("div", null, [Y(b, p)]) : w && p ? a("div", null, [Y(b, w, p)]) : a("div", null, [b]);
237
238
  }
238
239
  });
239
240
  }, ne = (e) => {
240
241
  const {
241
242
  name: t,
242
243
  head: l,
243
- headAlign: i,
244
+ headAlign: i = "center",
244
245
  bodyAlign: u,
245
246
  width: h,
246
247
  fixed: f
@@ -256,11 +257,11 @@ const Ae = () => ({
256
257
  fixed: f,
257
258
  showOverflowTooltip: !0
258
259
  }, {
259
- default: (c) => {
260
+ default: (p) => {
260
261
  const {
261
262
  row: g,
262
263
  column: P
263
- } = c, D = g[P.property];
264
+ } = p, D = g[P.property];
264
265
  let b;
265
266
  const N = H(w);
266
267
  return N.value ? b = we(N.value, D) : b = null, a("span", {
@@ -272,7 +273,7 @@ const Ae = () => ({
272
273
  const {
273
274
  name: t,
274
275
  head: l,
275
- headAlign: i,
276
+ headAlign: i = "center",
276
277
  bodyAlign: u,
277
278
  width: h,
278
279
  fixed: f
@@ -288,11 +289,11 @@ const Ae = () => ({
288
289
  fixed: f,
289
290
  showOverflowTooltip: !0
290
291
  }, {
291
- default: (c) => {
292
+ default: (p) => {
292
293
  const {
293
294
  row: g,
294
295
  column: P
295
- } = c, D = g[P.property];
296
+ } = p, D = g[P.property];
296
297
  let b;
297
298
  const N = H(w);
298
299
  return N.value ? b = be(N.value, D) : b = null, a("span", {
@@ -304,7 +305,7 @@ const Ae = () => ({
304
305
  const {
305
306
  name: t,
306
307
  head: l,
307
- headAlign: i,
308
+ headAlign: i = "center",
308
309
  bodyAlign: u,
309
310
  width: h,
310
311
  fixed: f
@@ -319,22 +320,22 @@ const Ae = () => ({
319
320
  }, {
320
321
  default: (w) => {
321
322
  var g, P;
322
- const c = (P = (g = e.children) == null ? void 0 : g.default) == null ? void 0 : P.call(g, {
323
+ const p = (P = (g = e.children) == null ? void 0 : g.default) == null ? void 0 : P.call(g, {
323
324
  rowData: w.row,
324
325
  column: e,
325
326
  rowIndex: w.$index
326
327
  });
327
328
  return a("div", {
328
329
  class: "cell-buttongroup"
329
- }, [a(Ce, null, xe(c) ? c : {
330
- default: () => [c]
330
+ }, [a(Ce, null, xe(p) ? p : {
331
+ default: () => [p]
331
332
  })]);
332
333
  }
333
334
  });
334
335
  }, re = (e) => {
335
336
  const {
336
337
  head: t,
337
- headAlign: l
338
+ headAlign: l = "center"
338
339
  } = e, {
339
340
  children: i
340
341
  } = e;
@@ -348,7 +349,7 @@ const Ae = () => ({
348
349
  const {
349
350
  name: t,
350
351
  head: l,
351
- headAlign: i,
352
+ headAlign: i = "center",
352
353
  width: u,
353
354
  fixed: h
354
355
  } = e;
@@ -360,8 +361,8 @@ const Ae = () => ({
360
361
  fixed: h
361
362
  }, {
362
363
  default: (f) => {
363
- var c, g;
364
- const w = (g = (c = e.children) == null ? void 0 : c.default) == null ? void 0 : g.call(c, {
364
+ var p, g;
365
+ const w = (g = (p = e.children) == null ? void 0 : p.default) == null ? void 0 : g.call(p, {
365
366
  rowData: f.row,
366
367
  column: e,
367
368
  rowIndex: f.$index
@@ -397,7 +398,7 @@ const Ae = () => ({
397
398
  style: [k.value, y.style]
398
399
  }, [a("div", {
399
400
  class: "pagetable-wrapper"
400
- }, [a(pe, {
401
+ }, [a(ce, {
401
402
  showSummary: q.value,
402
403
  summaryMethod: J,
403
404
  border: !0,
@@ -456,13 +457,13 @@ const Ae = () => ({
456
457
  columnIndex: e.columnIndex
457
458
  }) : typeof z == "object" ? z : {}
458
459
  }, {
459
- default: () => [p.expandedRowRender && a(S, {
460
+ default: () => [c.expandedRowRender && a(S, {
460
461
  type: "expand",
461
462
  fixed: !1
462
463
  }, {
463
464
  default: (e) => {
464
465
  var l;
465
- const t = (l = p.expandedRowRender) == null ? void 0 : l.call(p, {
466
+ const t = (l = c.expandedRowRender) == null ? void 0 : l.call(c, {
466
467
  rowData: e.row,
467
468
  rowIndex: e.$index
468
469
  });
@@ -473,7 +474,7 @@ const Ae = () => ({
473
474
  }), T && Q(), O && W(), E(B.value)]
474
475
  })]), a("div", {
475
476
  class: "pagination-wrapper"
476
- }, [a(ce, {
477
+ }, [a(pe, {
477
478
  currentPage: d.currentPage,
478
479
  "onUpdate:current-page": (e) => {
479
480
  s("update:pagination", {
@@ -502,7 +503,7 @@ const Ae = () => ({
502
503
  inheritAttrs: !1,
503
504
  props: ve(),
504
505
  setup(o, {
505
- slots: p,
506
+ slots: c,
506
507
  attrs: y,
507
508
  emit: s,
508
509
  expose: C
@@ -522,7 +523,7 @@ const Ae = () => ({
522
523
  inheritAttrs: !1,
523
524
  props: Be(),
524
525
  setup(o, {
525
- slots: p,
526
+ slots: c,
526
527
  attrs: y,
527
528
  emit: s,
528
529
  expose: C
@@ -542,7 +543,7 @@ const Ae = () => ({
542
543
  inheritAttrs: !1,
543
544
  props: Re(),
544
545
  setup(o, {
545
- slots: p,
546
+ slots: c,
546
547
  attrs: y,
547
548
  emit: s,
548
549
  expose: C
@@ -565,7 +566,7 @@ const Ae = () => ({
565
566
  inheritAttrs: !1,
566
567
  props: Te(),
567
568
  setup(o, {
568
- slots: p,
569
+ slots: c,
569
570
  attrs: y,
570
571
  emit: s,
571
572
  expose: C
@@ -588,7 +589,7 @@ const Ae = () => ({
588
589
  inheritAttrs: !1,
589
590
  props: _e(),
590
591
  setup(o, {
591
- slots: p,
592
+ slots: c,
592
593
  attrs: y,
593
594
  emit: s,
594
595
  expose: C
@@ -609,7 +610,7 @@ const Ae = () => ({
609
610
  inheritAttrs: !1,
610
611
  props: Me(),
611
612
  setup(o, {
612
- slots: p,
613
+ slots: c,
613
614
  attrs: y,
614
615
  emit: s,
615
616
  expose: C
@@ -630,7 +631,7 @@ const Ae = () => ({
630
631
  inheritAttrs: !1,
631
632
  props: ze(),
632
633
  setup(o, {
633
- slots: p,
634
+ slots: c,
634
635
  attrs: y,
635
636
  emit: s,
636
637
  expose: C
@@ -651,7 +652,7 @@ const Ae = () => ({
651
652
  props: Ve(),
652
653
  slots: Object,
653
654
  setup(o, {
654
- slots: p,
655
+ slots: c,
655
656
  attrs: y,
656
657
  emit: s,
657
658
  expose: C
@@ -670,7 +671,7 @@ const Ye = () => ({
670
671
  props: Ye(),
671
672
  emits: ["click"],
672
673
  setup(o, {
673
- slots: p,
674
+ slots: c,
674
675
  attrs: y,
675
676
  emit: s,
676
677
  expose: C
@@ -682,7 +683,7 @@ const Ye = () => ({
682
683
  var _;
683
684
  const {
684
685
  type: k
685
- } = o, B = (_ = p.default) == null ? void 0 : _.call(p);
686
+ } = o, B = (_ = c.default) == null ? void 0 : _.call(c);
686
687
  return a(de, {
687
688
  link: !0,
688
689
  type: k,
@@ -701,7 +702,7 @@ const Ye = () => ({
701
702
  inheritAttrs: !1,
702
703
  props: He(),
703
704
  setup(o, {
704
- slots: p,
705
+ slots: c,
705
706
  attrs: y,
706
707
  emit: s,
707
708
  expose: C
@@ -721,7 +722,7 @@ const Ye = () => ({
721
722
  props: qe(),
722
723
  slots: Object,
723
724
  setup(o, {
724
- slots: p,
725
+ slots: c,
725
726
  attrs: y,
726
727
  emit: s,
727
728
  expose: C