@chase-shao/vue-component-lib 1.2.31 → 1.2.32

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.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ref as k, defineComponent as D, mergeModels as G, useModel as oe, resolveComponent as N, createBlock as x, openBlock as g, onMounted as Q, computed as z, withCtx as U, createElementBlock as I, Fragment as P, renderList as j, createVNode as H, nextTick as De, createTextVNode as ae, useTemplateRef as fe, createElementVNode as h, createCommentVNode as J, toDisplayString as E, resolveDynamicComponent as ge, renderSlot as K, inject as ie, getCurrentInstance as Ve, reactive as ve, unref as Re, onActivated as Fe } from "vue";
1
+ import { ref as k, defineComponent as D, mergeModels as G, useModel as oe, resolveComponent as N, createBlock as x, openBlock as g, onMounted as Q, computed as z, withCtx as U, createElementBlock as I, Fragment as P, renderList as j, createVNode as H, nextTick as De, createTextVNode as ae, useTemplateRef as ge, createElementVNode as h, createCommentVNode as J, toDisplayString as E, resolveDynamicComponent as ve, renderSlot as K, inject as ie, getCurrentInstance as Ve, reactive as _e, unref as Re, onActivated as Fe } from "vue";
2
2
  import Ee from "axios";
3
3
  import { defineStore as Be } from "pinia";
4
4
  import { useRouter as Pe } from "vue-router";
@@ -43,7 +43,7 @@ const Ke = async () => {
43
43
  }, q = async () => {
44
44
  const e = await Ke(), a = Ce();
45
45
  return a.defaults.headers.common.Authorization = `Bearer ${e}`, a;
46
- }, we = {
46
+ }, pe = {
47
47
  CurrentUserEmail: (e) => e()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
48
48
  CurrentUserPositionCode: (e) => e()?.userInfo?.position_code ?? 888,
49
49
  CurrentDatetime: () => (/* @__PURE__ */ new Date()).toISOString(),
@@ -56,15 +56,15 @@ for (let e = 0; e < 256; ++e)
56
56
  function We(e, a = 0) {
57
57
  return (M[e[a + 0]] + M[e[a + 1]] + M[e[a + 2]] + M[e[a + 3]] + "-" + M[e[a + 4]] + M[e[a + 5]] + "-" + M[e[a + 6]] + M[e[a + 7]] + "-" + M[e[a + 8]] + M[e[a + 9]] + "-" + M[e[a + 10]] + M[e[a + 11]] + M[e[a + 12]] + M[e[a + 13]] + M[e[a + 14]] + M[e[a + 15]]).toLowerCase();
58
58
  }
59
- let pe;
59
+ let me;
60
60
  const Ge = new Uint8Array(16);
61
61
  function qe() {
62
- if (!pe) {
62
+ if (!me) {
63
63
  if (typeof crypto > "u" || !crypto.getRandomValues)
64
64
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
65
- pe = crypto.getRandomValues.bind(crypto);
65
+ me = crypto.getRandomValues.bind(crypto);
66
66
  }
67
- return pe(Ge);
67
+ return me(Ge);
68
68
  }
69
69
  const Ye = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ye = { randomUUID: Ye };
70
70
  function Je(e, a, o) {
@@ -117,35 +117,35 @@ function Qe(e, a, o) {
117
117
  }), Object.entries(e).forEach(([n, r]) => {
118
118
  if (n === "__ClassAttributes" || n === "className" || n === "id" || n === "deleteFlag" || n === "status" || n === "workFlowReason" || a !== 3 && n === "workflowId")
119
119
  return;
120
- const u = {
120
+ const i = {
121
121
  validations: [],
122
122
  triggers: [],
123
123
  isFiltered: !1,
124
124
  dependent: ""
125
- }, { attributes: d, propertyValue: i } = r;
126
- switch (i) {
125
+ }, { attributes: d, propertyValue: c } = r;
126
+ switch (c) {
127
127
  case null:
128
- u.modelValue = "";
128
+ i.modelValue = "";
129
129
  break;
130
130
  case void 0:
131
- u.modelValue = "";
131
+ i.modelValue = "";
132
132
  break;
133
133
  default:
134
- u.modelValue = i;
134
+ i.modelValue = c;
135
135
  break;
136
136
  }
137
- d?.forEach((s) => {
138
- s.order || s.Order ? u.order = s.order ?? s.Order : s.attributeType === "UIControl" ? u.widget = {
137
+ n === "onBehalf" && (i.modelValue = pe.CurrentUserEmail(o)), d?.forEach((s) => {
138
+ s.order || s.Order ? i.order = s.order ?? s.Order : s.attributeType === "UIControl" ? i.widget = {
139
139
  ...s,
140
140
  column: !0
141
- } : s.attributeType === "UIValidationControl" && a !== 3 ? u.widget?.widget !== "CheckBox" && u.validations.push(s) : s.attributeType === "UIListed" ? u.widget = {
141
+ } : s.attributeType === "UIValidationControl" && a !== 3 ? i.widget?.widget !== "CheckBox" && i.validations.push(s) : s.attributeType === "UIListed" ? i.widget = {
142
142
  ...s,
143
143
  column: !0
144
- } : s.attributeType === "UIFiltered" ? u.isFiltered = !0 : s.dependentType ? u.dependent = we[s.dependentType] ? we[s.dependentType](o) : "" : s.eventType === "Change" && u.triggers?.push({
144
+ } : s.attributeType === "UIFiltered" ? i.isFiltered = !0 : s.dependentType ? i.dependent = pe[s.dependentType] ? pe[s.dependentType](o) : "" : s.eventType === "Change" && i.triggers?.push({
145
145
  event: "change",
146
146
  handlerName: s.eventName
147
147
  });
148
- }), t.fields[n] = u;
148
+ }), t.fields[n] = i;
149
149
  }), t;
150
150
  }
151
151
  const ce = async (e, a, o, t) => {
@@ -206,10 +206,10 @@ function ot(e, a) {
206
206
  function rt(e, a) {
207
207
  return e.replace(/{IfTriggerGlobal_RandP_Approval}/g, a);
208
208
  }
209
- async function lt(e, a, o, t, n, r, u, d) {
210
- const i = await q();
209
+ async function lt(e, a, o, t, n, r, i, d) {
210
+ const c = await q();
211
211
  let s = at(r, a);
212
- return s = nt(s, o), s = st(s, t), s = ot(s, u), s = rt(s, d), (await i.put(s, n, {
212
+ return s = nt(s, o), s = st(s, t), s = ot(s, i), s = rt(s, d), (await c.put(s, n, {
213
213
  params: {
214
214
  className: e,
215
215
  reason: t
@@ -218,9 +218,9 @@ async function lt(e, a, o, t, n, r, u, d) {
218
218
  }
219
219
  async function it(e, a) {
220
220
  const n = (await (await q()).get(e, { params: { value: a } }))?.data;
221
- return Object.entries(n).map(([r, u]) => ({
221
+ return Object.entries(n).map(([r, i]) => ({
222
222
  value: r,
223
- label: u
223
+ label: i
224
224
  }));
225
225
  }
226
226
  async function ct(e, a) {
@@ -252,17 +252,17 @@ const Z = (e, a) => {
252
252
  }),
253
253
  emits: /* @__PURE__ */ G(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
254
254
  setup(e, { expose: a, emit: o }) {
255
- const t = e, n = o, r = oe(e, "modelValue"), u = (s) => Z(t.validations, s), d = (s) => {
255
+ const t = e, n = o, r = oe(e, "modelValue"), i = (s) => Z(t.validations, s), d = (s) => {
256
256
  n("input", s);
257
- }, i = (s) => {
258
- const v = u(s);
257
+ }, c = (s) => {
258
+ const v = i(s);
259
259
  n("error", v.res ? "" : v.errorMessages), t.triggers && t.triggers.length > 0 && t.triggers.forEach((p) => {
260
260
  p.event === "change" && n(p.event, p.handlerName, s);
261
261
  });
262
262
  };
263
263
  return a({
264
264
  validate() {
265
- const s = u(t.modelValue);
265
+ const s = i(t.modelValue);
266
266
  return n("error", s.res ? "" : s.errorMessages), s.res;
267
267
  }
268
268
  }), (s, v) => {
@@ -273,7 +273,7 @@ const Z = (e, a) => {
273
273
  "allow-clear": "",
274
274
  disabled: t.readonly || t.config.Readonly,
275
275
  onInput: d,
276
- onChange: i
276
+ onChange: c
277
277
  }, null, 8, ["modelValue", "disabled"]);
278
278
  };
279
279
  }
@@ -291,23 +291,23 @@ const Z = (e, a) => {
291
291
  }),
292
292
  emits: /* @__PURE__ */ G(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
293
293
  setup(e, { expose: a, emit: o }) {
294
- const t = e, n = o, r = oe(e, "modelValue"), u = k(100), d = k(0);
294
+ const t = e, n = o, r = oe(e, "modelValue"), i = k(100), d = k(0);
295
295
  Q(() => {
296
296
  t.validations && t.validations.forEach((p) => {
297
- p.ruleName === "Max" && (u.value = p.ruleParameter), p.ruleName === "Min" && (d.value = p.ruleParameter);
297
+ p.ruleName === "Max" && (i.value = p.ruleParameter), p.ruleName === "Min" && (d.value = p.ruleParameter);
298
298
  });
299
299
  });
300
- const i = (p) => Z(t.validations, p), s = (p) => {
300
+ const c = (p) => Z(t.validations, p), s = (p) => {
301
301
  n("input", p);
302
302
  }, v = (p) => {
303
- const w = i(p);
303
+ const w = c(p);
304
304
  n("error", w.res ? "" : w.errorMessages), t.triggers && t.triggers.length > 0 && t.triggers.forEach((f) => {
305
305
  f.event === "change" && n(f.event, f.handlerName, p);
306
306
  });
307
307
  };
308
308
  return a({
309
309
  validate() {
310
- const p = i(t.modelValue);
310
+ const p = c(t.modelValue);
311
311
  return n("error", p.res ? "" : p.errorMessages), p.res;
312
312
  }
313
313
  }), (p, w) => {
@@ -318,7 +318,7 @@ const Z = (e, a) => {
318
318
  clearable: "",
319
319
  disabled: t.readonly,
320
320
  min: d.value,
321
- max: u.value,
321
+ max: i.value,
322
322
  onInput: s,
323
323
  onChange: v
324
324
  }, null, 8, ["modelValue", "disabled", "min", "max"]);
@@ -338,29 +338,29 @@ const Z = (e, a) => {
338
338
  }),
339
339
  emits: /* @__PURE__ */ G(["update:modelValue", "change"], ["update:modelValue"]),
340
340
  setup(e, { expose: a, emit: o }) {
341
- const t = e, n = o, r = k(!1), u = k(t.config.options ?? []), d = oe(e, "modelValue"), i = (p) => Z(t.validations, p);
341
+ const t = e, n = o, r = k(!1), i = k(t.config.options ?? []), d = oe(e, "modelValue"), c = (p) => Z(t.validations, p);
342
342
  z(() => {
343
343
  const p = {};
344
344
  return t.triggers && t.triggers.length > 0 && t.triggers.forEach((w) => {
345
345
  p[w.event] = (f) => {
346
346
  n(w.event, w.handlerName, f);
347
- const y = i(f);
347
+ const y = c(f);
348
348
  n("error", y.res ? "" : y.errorMessages);
349
349
  };
350
350
  }), p;
351
351
  }), Q(async () => {
352
- t.config.dataSourceProvider && (u.value = await it(t.config.dataSourceProvider));
352
+ t.config.dataSourceProvider && (i.value = await it(t.config.dataSourceProvider));
353
353
  });
354
354
  const v = (p) => {
355
355
  n("update:modelValue", p);
356
- const w = i(p);
356
+ const w = c(p);
357
357
  n("error", w.res ? "" : w.errorMessages), t.triggers && t.triggers.length > 0 && t.triggers.forEach((f) => {
358
358
  f.event === "change" && n(f.event, f.handlerName, p);
359
359
  });
360
360
  };
361
361
  return a({
362
362
  validate() {
363
- const p = i(t.modelValue);
363
+ const p = c(t.modelValue);
364
364
  return n("error", p.res ? "" : p.errorMessages), p.res;
365
365
  }
366
366
  }), (p, w) => {
@@ -375,7 +375,7 @@ const Z = (e, a) => {
375
375
  onChange: v
376
376
  }, {
377
377
  default: U(() => [
378
- (g(!0), I(P, null, j(u.value, (L) => (g(), x(f, {
378
+ (g(!0), I(P, null, j(i.value, (L) => (g(), x(f, {
379
379
  key: L.value,
380
380
  value: L.value,
381
381
  label: L.label
@@ -393,14 +393,14 @@ const Z = (e, a) => {
393
393
  },
394
394
  emits: ["update:modelValue", "change"],
395
395
  setup(e, { expose: a, emit: o }) {
396
- const t = e, n = o, r = k(t.config.options ?? []), u = (i) => {
397
- n("update:modelValue", i), n("change", i);
396
+ const t = e, n = o, r = k(t.config.options ?? []), i = (c) => {
397
+ n("update:modelValue", c), n("change", c);
398
398
  };
399
399
  Q(async () => {
400
400
  if (t.config) {
401
- const i = t.config.dataSourceProvider;
402
- if (i) {
403
- const v = await (await q()).get(i);
401
+ const c = t.config.dataSourceProvider;
402
+ if (c) {
403
+ const v = await (await q()).get(c);
404
404
  r.value = v.data;
405
405
  }
406
406
  }
@@ -410,7 +410,7 @@ const Z = (e, a) => {
410
410
  validate() {
411
411
  return !0;
412
412
  }
413
- }), (i, s) => {
413
+ }), (c, s) => {
414
414
  const v = N("ACascader"), p = N("ASpace");
415
415
  return g(), x(p, {
416
416
  direction: "vertical",
@@ -419,11 +419,11 @@ const Z = (e, a) => {
419
419
  default: U(() => [
420
420
  H(v, {
421
421
  "field-names": d,
422
- "model-value": i.modelValue,
422
+ "model-value": c.modelValue,
423
423
  options: r.value,
424
424
  style: { width: "320px" },
425
425
  placeholder: "Please select ...",
426
- onChange: u
426
+ onChange: i
427
427
  }, null, 8, ["model-value", "options"])
428
428
  ]),
429
429
  _: 1
@@ -442,14 +442,14 @@ const Z = (e, a) => {
442
442
  },
443
443
  emits: ["update:modelValue", "change", "error", "input"],
444
444
  setup(e, { expose: a, emit: o }) {
445
- const t = e, n = o, r = (f) => Z(t.validations, f), u = "", d = k(null), i = k(0), s = k([]);
445
+ const t = e, n = o, r = (f) => Z(t.validations, f), i = "", d = k(null), c = k(0), s = k([]);
446
446
  function v(f, y, L) {
447
447
  return f.replace(/{WorkflowId}/g, y).replace(/{ClassName}/g, L);
448
448
  }
449
449
  const p = z(() => {
450
450
  if (t.config.uploadURL) {
451
- const f = u + t.config.uploadURL;
452
- return v(f, i.value.toString(), t.className);
451
+ const f = i + t.config.uploadURL;
452
+ return v(f, c.value.toString(), t.className);
453
453
  }
454
454
  return "";
455
455
  }), w = (f) => {
@@ -459,7 +459,7 @@ const Z = (e, a) => {
459
459
  };
460
460
  return a({
461
461
  submit(f) {
462
- d.value && (t.config.uploadURL && (i.value = f), De(() => {
462
+ d.value && (t.config.uploadURL && (c.value = f), De(() => {
463
463
  d.value.submit();
464
464
  }));
465
465
  },
@@ -495,28 +495,28 @@ const Z = (e, a) => {
495
495
  },
496
496
  emits: ["update:modelValue", "change", "error", "input"],
497
497
  setup(e, { expose: a, emit: o }) {
498
- const t = e, n = o, r = (i) => Z(t.validations, i), u = (i) => {
499
- n("update:modelValue", i), n("input", i);
500
- }, d = (i) => {
501
- n("update:modelValue", i);
502
- const s = r(i);
498
+ const t = e, n = o, r = (c) => Z(t.validations, c), i = (c) => {
499
+ n("update:modelValue", c), n("input", c);
500
+ }, d = (c) => {
501
+ n("update:modelValue", c);
502
+ const s = r(c);
503
503
  n("error", s.res ? "" : s.errorMessages), t.triggers && t.triggers.length > 0 && t.triggers.forEach((v) => {
504
- v.event === "change" && n(v.event, v.handlerName, i);
504
+ v.event === "change" && n(v.event, v.handlerName, c);
505
505
  });
506
506
  };
507
507
  return a({
508
508
  validate() {
509
- const i = r(t.modelValue);
510
- return n("error", i.res ? "" : i.errorMessages), i.res;
509
+ const c = r(t.modelValue);
510
+ return n("error", c.res ? "" : c.errorMessages), c.res;
511
511
  }
512
- }), (i, s) => {
512
+ }), (c, s) => {
513
513
  const v = N("ATextarea");
514
514
  return g(), x(v, {
515
515
  "model-value": t.modelValue,
516
516
  placeholder: "Please enter something",
517
517
  "allow-clear": "",
518
518
  disabled: t.readonly,
519
- onInput: u,
519
+ onInput: i,
520
520
  onChange: d
521
521
  }, null, 8, ["model-value", "disabled"]);
522
522
  };
@@ -535,18 +535,18 @@ const Z = (e, a) => {
535
535
  }),
536
536
  emits: /* @__PURE__ */ G(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
537
537
  setup(e, { expose: a, emit: o }) {
538
- const t = e, n = o, r = oe(e, "modelValue"), u = (i) => Z(t.validations, i), d = (i) => {
539
- const s = u(i);
538
+ const t = e, n = o, r = oe(e, "modelValue"), i = (c) => Z(t.validations, c), d = (c) => {
539
+ const s = i(c);
540
540
  n("error", s.res ? "" : s.errorMessages), t.triggers && t.triggers.length > 0 && t.triggers.forEach((v) => {
541
- v.event === "change" && n(v.event, v.handlerName, i);
541
+ v.event === "change" && n(v.event, v.handlerName, c);
542
542
  });
543
543
  };
544
544
  return a({
545
545
  validate() {
546
- const i = u(t.modelValue);
547
- return n("error", i.res ? "" : i.errorMessages), i.res;
546
+ const c = i(t.modelValue);
547
+ return n("error", c.res ? "" : c.errorMessages), c.res;
548
548
  }
549
- }), (i, s) => {
549
+ }), (c, s) => {
550
550
  const v = N("ACheckbox");
551
551
  return g(), x(v, {
552
552
  modelValue: r.value,
@@ -584,7 +584,7 @@ const Z = (e, a) => {
584
584
  }),
585
585
  emits: /* @__PURE__ */ G(["update:modelValue", "change", "error"], ["update:modelValue"]),
586
586
  setup(e, { expose: a, emit: o }) {
587
- const t = e, n = o, r = oe(e, "modelValue"), u = fe("widgetRef"), d = z(() => {
587
+ const t = e, n = o, r = oe(e, "modelValue"), i = ge("widgetRef"), d = z(() => {
588
588
  switch (t.config?.widget?.widget) {
589
589
  case "TextBox":
590
590
  return be;
@@ -605,8 +605,8 @@ const Z = (e, a) => {
605
605
  default:
606
606
  return be;
607
607
  }
608
- }), i = k(""), s = (w) => {
609
- i.value = w;
608
+ }), c = k(""), s = (w) => {
609
+ c.value = w;
610
610
  }, v = (w, f) => {
611
611
  n("change", w, f);
612
612
  };
@@ -618,10 +618,10 @@ const Z = (e, a) => {
618
618
  return t.config?.widget?.widget === "File";
619
619
  },
620
620
  submit(w) {
621
- p() && u.value.submit(w);
621
+ p() && i.value.submit(w);
622
622
  },
623
623
  validate() {
624
- return u.value?.validate();
624
+ return i.value?.validate();
625
625
  },
626
626
  getCompName() {
627
627
  return t?.config?.widget?.title;
@@ -633,9 +633,9 @@ const Z = (e, a) => {
633
633
  ]),
634
634
  h("div", yt, [
635
635
  h("div", bt, [
636
- (g(), x(ge(d.value), {
636
+ (g(), x(ve(d.value), {
637
637
  ref_key: "widgetRef",
638
- ref: u,
638
+ ref: i,
639
639
  modelValue: r.value,
640
640
  "onUpdate:modelValue": f[0] || (f[0] = (y) => r.value = y),
641
641
  config: t.config.widget,
@@ -646,7 +646,7 @@ const Z = (e, a) => {
646
646
  onChange: v
647
647
  }, null, 40, ["modelValue", "config", "validations", "triggers", "class-name"]))
648
648
  ]),
649
- i.value.length > 0 ? (g(), I("div", kt, E(i.value), 1)) : J("", !0)
649
+ c.value.length > 0 ? (g(), I("div", kt, E(c.value), 1)) : J("", !0)
650
650
  ])
651
651
  ]));
652
652
  }
@@ -655,7 +655,7 @@ const Z = (e, a) => {
655
655
  for (const [t, n] of a)
656
656
  o[t] = n;
657
657
  return o;
658
- }, _e = /* @__PURE__ */ re(Vt, [["__scopeId", "data-v-18c3fe02"]]), St = /* @__PURE__ */ D({
658
+ }, he = /* @__PURE__ */ re(Vt, [["__scopeId", "data-v-18c3fe02"]]), St = /* @__PURE__ */ D({
659
659
  __name: "SubmitButton",
660
660
  props: {
661
661
  url: {},
@@ -667,7 +667,7 @@ const Z = (e, a) => {
667
667
  function n() {
668
668
  t("click", o.url, o.redirectType);
669
669
  }
670
- return (r, u) => {
670
+ return (r, i) => {
671
671
  const d = N("AButton");
672
672
  return g(), x(d, {
673
673
  type: "primary",
@@ -692,7 +692,7 @@ const Z = (e, a) => {
692
692
  function n() {
693
693
  t("click", o.url, o.redirectType);
694
694
  }
695
- return (r, u) => {
695
+ return (r, i) => {
696
696
  const d = N("ALink");
697
697
  return g(), x(d, { onClick: n }, {
698
698
  default: U(() => [
@@ -710,8 +710,8 @@ const Z = (e, a) => {
710
710
  emits: ["click"],
711
711
  setup(e, { emit: a }) {
712
712
  const o = e, t = a;
713
- function n(i, s) {
714
- t("click", o.config.widget, i, s, o.config.title);
713
+ function n(c, s) {
714
+ t("click", o.config.widget, c, s, o.config.title);
715
715
  }
716
716
  const r = z(() => {
717
717
  switch (o.config.location) {
@@ -721,9 +721,9 @@ const Z = (e, a) => {
721
721
  default:
722
722
  return Ct;
723
723
  }
724
- }), u = z(() => o.config.widget === O.Submit ? o.config.requestUrl ?? "" : o.config.widget === O.Link ? o.config.redirectUrl ?? "" : ""), d = z(() => o.config.redirectType ?? "Details");
725
- return (i, s) => (g(), x(ge(r.value), {
726
- url: u.value,
724
+ }), i = z(() => o.config.widget === O.Submit ? o.config.requestUrl ?? "" : o.config.widget === O.Link ? o.config.redirectUrl ?? "" : ""), d = z(() => o.config.redirectType ?? "Details");
725
+ return (c, s) => (g(), x(ve(r.value), {
726
+ url: i.value,
727
727
  "redirect-type": d.value,
728
728
  onClick: n
729
729
  }, {
@@ -739,7 +739,7 @@ function ue() {
739
739
  return e || Pe();
740
740
  }
741
741
  const Ne = Symbol("library-triggers");
742
- function he() {
742
+ function we() {
743
743
  const e = ie(Ne, null);
744
744
  return e || {};
745
745
  }
@@ -756,7 +756,7 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
756
756
  className: {}
757
757
  },
758
758
  setup(e) {
759
- const a = se(), o = ue(), t = he(), n = fe("dataWidgets"), r = Ve(), u = e, d = k(), i = k([]), s = k({});
759
+ const a = se(), o = ue(), t = we(), n = ge("dataWidgets"), r = Ve(), i = e, d = k(), c = k([]), s = k({});
760
760
  function v(m) {
761
761
  return m ? Object.entries(m).map(([_, l]) => ({
762
762
  fieldKey: _,
@@ -766,14 +766,14 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
766
766
  function p(m) {
767
767
  return m ? Object.entries(m).filter(([_, l]) => l.dependent).reduce((_, [l, b]) => (_[l] = b.dependent, _), {}) : [];
768
768
  }
769
- const w = z(() => d.value?.actions ? [...d.value.actions].reverse() : []), f = ve({}), y = k(!1);
769
+ const w = z(() => d.value?.actions ? [...d.value.actions].reverse() : []), f = _e({}), y = k(!1);
770
770
  Q(async () => {
771
- y.value = !0, d.value = await ce(X.Create, u.className, a), i.value = v(d.value.fields), s.value = p(d.value.fields);
771
+ y.value = !0, d.value = await ce(X.Create, i.className, a), c.value = v(d.value.fields), s.value = p(d.value.fields);
772
772
  for (const m in d.value.fields)
773
773
  f[m] = d.value.fields[m].modelValue;
774
774
  y.value = !1;
775
775
  });
776
- async function L(m, c, _) {
776
+ async function L(m, u, _) {
777
777
  switch (m) {
778
778
  case O.Submit:
779
779
  let l = !0;
@@ -783,13 +783,13 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
783
783
  r?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
784
784
  return;
785
785
  }
786
- const b = await Ze(u.className, { ...f, ...s.value }, c);
786
+ const b = await Ze(i.className, { ...f, ...s.value }, u);
787
787
  n.value?.forEach((A) => {
788
788
  A?.submit && A.submit(b);
789
- }), o.push({ name: "List", params: { className: u.className } });
789
+ }), o.push({ name: "List", params: { className: i.className } });
790
790
  break;
791
791
  case O.Link:
792
- _ === "List" && o.push({ name: "List", params: { className: u.className } });
792
+ _ === "List" && o.push({ name: "List", params: { className: i.className } });
793
793
  break;
794
794
  default:
795
795
  console.warn("Unknown action type:", m);
@@ -802,10 +802,10 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
802
802
  "jobTitlePrevious",
803
803
  "positionId"
804
804
  ]);
805
- function T(m, c) {
806
- t[m]?.(c, S), d.value && (i.value = v(d.value.fields));
805
+ function T(m, u) {
806
+ t[m]?.(u, S), d.value && (c.value = v(d.value.fields));
807
807
  }
808
- return (m, c) => {
808
+ return (m, u) => {
809
809
  const _ = N("a-spin");
810
810
  return g(), I("div", Nt, [
811
811
  h("div", Ut, [
@@ -822,11 +822,11 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
822
822
  default: U(() => [
823
823
  h("div", Tt, [
824
824
  h("div", Mt, [
825
- (g(!0), I(P, null, j(i.value, (l, b) => (g(), I("div", {
825
+ (g(!0), I(P, null, j(c.value, (l, b) => (g(), I("div", {
826
826
  key: l.fieldKey,
827
827
  class: "form-field-wrapper"
828
828
  }, [
829
- H(_e, {
829
+ H(he, {
830
830
  ref_for: !0,
831
831
  ref: "dataWidgets",
832
832
  name: b,
@@ -873,26 +873,26 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
873
873
  workflowId: {}
874
874
  },
875
875
  setup(e) {
876
- const a = ue(), o = he(), t = se(), n = fe("dataWidgets"), r = Ve(), u = e, d = k(), i = k([]), s = k({});
877
- function v(c) {
878
- return c ? Object.entries(c).map(([l, b]) => ({
876
+ const a = ue(), o = we(), t = se(), n = ge("dataWidgets"), r = Ve(), i = e, d = k(), c = k([]), s = k({});
877
+ function v(u) {
878
+ return u ? Object.entries(u).map(([l, b]) => ({
879
879
  fieldKey: l,
880
880
  ...b
881
881
  })).filter((l) => l.widget && l.widget.widget !== "Hidden").filter((l) => !T.value.includes(l.fieldKey)) : [];
882
882
  }
883
- function p(c) {
884
- return c ? Object.entries(c).filter(([l, b]) => b.dependent).reduce((l, [b, A]) => (l[b] = A.dependent, l), {}) : [];
883
+ function p(u) {
884
+ return u ? Object.entries(u).filter(([l, b]) => b.dependent).reduce((l, [b, A]) => (l[b] = A.dependent, l), {}) : [];
885
885
  }
886
- const w = z(() => d.value?.actions ? [...d.value.actions].reverse() : []), f = ve({}), y = k(!1);
886
+ const w = z(() => d.value?.actions ? [...d.value.actions].reverse() : []), f = _e({}), y = k(!1);
887
887
  Q(async () => {
888
- y.value = !0, d.value = await ce(X.Update, u.className, se, {
889
- workflowId: u.workflowId
888
+ y.value = !0, d.value = await ce(X.Update, i.className, se, {
889
+ workflowId: i.workflowId
890
890
  });
891
- const c = await Ie(X.Update, u.className, { workflowId: u.workflowId, email: L() });
891
+ const u = await Ie(X.Update, i.className, { workflowId: i.workflowId, email: L() });
892
892
  d.value.actions = d.value.actions?.filter((_) => {
893
- const l = c.find((b) => b.button === _.title);
893
+ const l = u.find((b) => b.button === _.title);
894
894
  return l ? l.isShow : !0;
895
- }), i.value = v(d.value.fields), s.value = p(d.value.fields);
895
+ }), c.value = v(d.value.fields), s.value = p(d.value.fields);
896
896
  for (const _ in d.value.fields)
897
897
  f[_] = d.value.fields[_].modelValue;
898
898
  y.value = !1;
@@ -900,8 +900,8 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
900
900
  function L() {
901
901
  return t()?.userInfo?.email_address ?? "";
902
902
  }
903
- async function Y(c, _, l) {
904
- switch (c) {
903
+ async function Y(u, _, l) {
904
+ switch (u) {
905
905
  case O.Submit:
906
906
  let b = !0;
907
907
  if (n.value?.forEach((R) => {
@@ -910,16 +910,16 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
910
910
  r?.appContext.config.globalProperties.$message.error("表单验证未通过,请检查输入项");
911
911
  return;
912
912
  }
913
- const A = await tt(u.className, u.workflowId, { ...f, ...s.value }, _);
913
+ const A = await tt(i.className, i.workflowId, { ...f, ...s.value }, _);
914
914
  n.value?.forEach((R) => {
915
915
  R?.submit && R.submit(A);
916
- }), a.push({ name: "List", params: { className: u.className } });
916
+ }), a.push({ name: "List", params: { className: i.className } });
917
917
  break;
918
918
  case O.Link:
919
- a.push({ name: l, params: { className: u.className } });
919
+ a.push({ name: l, params: { className: i.className } });
920
920
  break;
921
921
  default:
922
- console.warn("Unknown action type:", c);
922
+ console.warn("Unknown action type:", u);
923
923
  }
924
924
  }
925
925
  const T = k([
@@ -929,16 +929,16 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
929
929
  "jobTitlePrevious",
930
930
  "positionId"
931
931
  ]);
932
- function m(c, _) {
933
- o[c]?.(_, T), d.value && (i.value = v(d.value.fields));
932
+ function m(u, _) {
933
+ o[u]?.(_, T), d.value && (c.value = v(d.value.fields));
934
934
  }
935
- return (c, _) => {
935
+ return (u, _) => {
936
936
  const l = N("a-spin");
937
937
  return g(), I("div", Pt, [
938
938
  h("div", Ot, [
939
- K(c.$slots, "title", {}, () => [
940
- h("h1", jt, "编辑 " + E(c.className), 1),
941
- h("p", zt, "修改以下信息来更新 " + E(c.className) + " 记录 (ID: " + E(c.workflowId) + ")", 1)
939
+ K(u.$slots, "title", {}, () => [
940
+ h("h1", jt, "编辑 " + E(u.className), 1),
941
+ h("p", zt, "修改以下信息来更新 " + E(u.className) + " 记录 (ID: " + E(u.workflowId) + ")", 1)
942
942
  ], !0)
943
943
  ]),
944
944
  h("div", Kt, [
@@ -949,11 +949,11 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
949
949
  default: U(() => [
950
950
  h("div", Wt, [
951
951
  h("div", Gt, [
952
- (g(!0), I(P, null, j(i.value, (b, A) => (g(), I("div", {
952
+ (g(!0), I(P, null, j(c.value, (b, A) => (g(), I("div", {
953
953
  key: b.fieldKey,
954
954
  class: "form-field-wrapper"
955
955
  }, [
956
- H(_e, {
956
+ H(he, {
957
957
  ref_for: !0,
958
958
  ref: "dataWidgets",
959
959
  name: A,
@@ -965,8 +965,8 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
965
965
  }, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
966
966
  ]))), 128))
967
967
  ]),
968
- c.$slots.content ? (g(), I("div", qt, [
969
- K(c.$slots, "content", {}, void 0, !0)
968
+ u.$slots.content ? (g(), I("div", qt, [
969
+ K(u.$slots, "content", {}, void 0, !0)
970
970
  ])) : J("", !0)
971
971
  ])
972
972
  ]),
@@ -975,7 +975,7 @@ const Nt = { class: "page-container" }, Ut = { class: "page-header" }, xt = { cl
975
975
  ]),
976
976
  h("div", Yt, [
977
977
  h("div", Jt, [
978
- K(c.$slots, "action", {}, void 0, !0),
978
+ K(u.$slots, "action", {}, void 0, !0),
979
979
  h("div", Qt, [
980
980
  (g(!0), I(P, null, j(w.value, (b) => (g(), x(ne, {
981
981
  key: b.Title,
@@ -1003,20 +1003,20 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1003
1003
  workflowId: {}
1004
1004
  },
1005
1005
  setup(e) {
1006
- const a = se(), o = he(), t = ue(), n = ea();
1006
+ const a = se(), o = we(), t = ue(), n = ea();
1007
1007
  console.log("🚀 ~ customComps:", n.Steps);
1008
- const r = e, u = k(), d = k([]);
1009
- function i(S) {
1010
- return S ? Object.entries(S).map(([m, c]) => (typeof c.modelValue == "boolean" ? c.fieldValue = c.modelValue ? "Yes" : "No" : c.fieldValue = c.modelValue, {
1008
+ const r = e, i = k(), d = k([]);
1009
+ function c(S) {
1010
+ return S ? Object.entries(S).map(([m, u]) => (typeof u.modelValue == "boolean" ? u.fieldValue = u.modelValue ? "Yes" : "No" : u.fieldValue = u.modelValue, {
1011
1011
  fieldKey: m,
1012
- ...c
1012
+ ...u
1013
1013
  })).filter((m) => m.widget && m.widget.widget !== "Hidden") : [];
1014
1014
  }
1015
- const s = z(() => u.value?.actions ? [...u.value.actions].reverse() : []), v = k(!0), p = (S, T = "yyyy-MM-dd hh:mm:ss.fff") => {
1015
+ const s = z(() => i.value?.actions ? [...i.value.actions].reverse() : []), v = k(!0), p = (S, T = "yyyy-MM-dd hh:mm:ss.fff") => {
1016
1016
  const m = new Date(S);
1017
1017
  if (isNaN(m.getTime()))
1018
1018
  return S;
1019
- const c = {
1019
+ const u = {
1020
1020
  yyyy: m.getFullYear(),
1021
1021
  yy: m.getFullYear().toString().substring(2),
1022
1022
  MM: (m.getMonth() + 1).toString().padStart(2, "0"),
@@ -1033,14 +1033,14 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1033
1033
  f: m.getMilliseconds()
1034
1034
  };
1035
1035
  let _ = T;
1036
- for (const l of Object.keys(c))
1037
- _ = _.replace(l, c[l]);
1036
+ for (const l of Object.keys(u))
1037
+ _ = _.replace(l, u[l]);
1038
1038
  return _;
1039
1039
  }, w = (S, T) => {
1040
- const m = S.findIndex((c) => c.isCurrent);
1041
- return S.map((c, _) => {
1040
+ const m = S.findIndex((u) => u.isCurrent);
1041
+ return S.map((u, _) => {
1042
1042
  const l = {
1043
- id: c.id,
1043
+ id: u.id,
1044
1044
  title: "",
1045
1045
  proxy: "",
1046
1046
  sub: "",
@@ -1048,18 +1048,18 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1048
1048
  status: 1,
1049
1049
  time: ""
1050
1050
  };
1051
- l.title = c.workflowProcessApprovers[0]?.name;
1052
- const b = c.workflowProcessApprovers[c.workflowProcessApprovers.length - 1], A = c.workflowHistorys[c.workflowHistorys.length - 1], R = A?.workflowHistoryApprovers[A?.workflowHistoryApprovers?.length - 1];
1053
- if (b && R && b?.email?.toLowerCase() !== R?.approverEmail?.toLowerCase() && (l.title = `${R.name}`, l.proxy = `代理: ${b.name}`), c.sort > 1 ? l.sub = "审批角色:" + c.nodeName.replace("Submit", "").replace("Approve", "") : l.sub = "提交申请", c.isCurrent && T !== -1)
1051
+ l.title = u.workflowProcessApprovers[0]?.name;
1052
+ const b = u.workflowProcessApprovers[u.workflowProcessApprovers.length - 1], A = u.workflowHistorys[u.workflowHistorys.length - 1], R = A?.workflowHistoryApprovers[A?.workflowHistoryApprovers?.length - 1];
1053
+ if (b && R && b?.email?.toLowerCase() !== R?.approverEmail?.toLowerCase() && (l.title = `${R.name}`, l.proxy = `代理: ${b.name}`), u.sort > 1 ? l.sub = "审批角色:" + u.nodeName.replace("Submit", "").replace("Approve", "") : l.sub = "提交申请", u.isCurrent && T !== -1)
1054
1054
  l.desc = "审批中", l.status = 1;
1055
1055
  else {
1056
- const B = c.workflowHistorys[c.workflowHistorys.length - 1];
1056
+ const B = u.workflowHistorys[u.workflowHistorys.length - 1];
1057
1057
  if (B && B.status === 100)
1058
1058
  l.time = p(B.takeActionAt, "yyyy-MM-dd hh:mm:ss"), l.status = 2, l.desc = "已审批";
1059
1059
  else if (B && B.status === 999)
1060
1060
  l.time = p(B.takeActionAt, "yyyy-MM-dd hh:mm:ss"), l.status = 0, l.desc = "已跳过";
1061
1061
  else if (B)
1062
- if (l.time = p(B.takeActionAt, "yyyy-MM-dd hh:mm:ss"), c.sort === 1)
1062
+ if (l.time = p(B.takeActionAt, "yyyy-MM-dd hh:mm:ss"), u.sort === 1)
1063
1063
  l.status = 2, l.desc = "";
1064
1064
  else {
1065
1065
  const le = B.workflowHistoryApprovers[0];
@@ -1072,14 +1072,14 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1072
1072
  });
1073
1073
  }, f = k([]);
1074
1074
  Q(async () => {
1075
- v.value = !0, u.value = await ce(X.Details, r.className, a, {
1075
+ v.value = !0, i.value = await ce(X.Details, r.className, a, {
1076
1076
  workflowId: r.workflowId
1077
1077
  });
1078
1078
  const S = await Ie(X.Details, r.className, { workflowId: r.workflowId, email: L() });
1079
- u.value.actions = u.value.actions?.filter((m) => {
1080
- const c = S.find((_) => _.button === m.title);
1081
- return c ? c.isShow : !0;
1082
- }), d.value = i(u.value.fields);
1079
+ i.value.actions = i.value.actions?.filter((m) => {
1080
+ const u = S.find((_) => _.button === m.title);
1081
+ return u ? u.isShow : !0;
1082
+ }), d.value = c(i.value.fields);
1083
1083
  const T = await ct(r.className, r.workflowId);
1084
1084
  console.log("🚀 ~ process:", T), f.value = w(T, 0), v.value = !1;
1085
1085
  });
@@ -1089,11 +1089,11 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1089
1089
  function L() {
1090
1090
  return a()?.userInfo?.email_address ?? "";
1091
1091
  }
1092
- async function Y(S, T, m, c) {
1092
+ async function Y(S, T, m, u) {
1093
1093
  try {
1094
1094
  switch (S) {
1095
1095
  case O.Submit:
1096
- const { reason: _, ifGlobal: l } = await y(c), b = c === "Approve" ? "100" : "-1";
1096
+ const { reason: _, ifGlobal: l } = await y(u), b = u === "Approve" ? "100" : "-1";
1097
1097
  await lt(r.className, r.workflowId, L(), _, [r.workflowId], T, b, l), t.push({ name: "List", params: { className: r.className } });
1098
1098
  break;
1099
1099
  case O.Link:
@@ -1121,15 +1121,15 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1121
1121
  }, {
1122
1122
  default: U(() => [
1123
1123
  h("div", ra, [
1124
- (g(), x(ge(Re(n).Steps), { steps: f.value }, null, 8, ["steps"])),
1124
+ (g(), x(ve(Re(n).Steps), { steps: f.value }, null, 8, ["steps"])),
1125
1125
  h("div", la, [
1126
- (g(!0), I(P, null, j(d.value, (c) => (g(), I("div", {
1127
- key: c.fieldKey,
1126
+ (g(!0), I(P, null, j(d.value, (u) => (g(), I("div", {
1127
+ key: u.fieldKey,
1128
1128
  class: "detail-field-wrapper"
1129
1129
  }, [
1130
1130
  h("div", ia, [
1131
- h("div", ca, E(c.widget?.title), 1),
1132
- h("div", ua, E(c.fieldValue), 1)
1131
+ h("div", ca, E(u.widget?.title), 1),
1132
+ h("div", ua, E(u.fieldValue), 1)
1133
1133
  ])
1134
1134
  ]))), 128))
1135
1135
  ]),
@@ -1145,9 +1145,9 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1145
1145
  h("div", ma, [
1146
1146
  K(S.$slots, "action", {}, void 0, !0),
1147
1147
  h("div", fa, [
1148
- (g(!0), I(P, null, j(s.value, (c) => (g(), x(ne, {
1149
- key: c.Title,
1150
- config: c,
1148
+ (g(!0), I(P, null, j(s.value, (u) => (g(), x(ne, {
1149
+ key: u.Title,
1150
+ config: u,
1151
1151
  class: "action-button",
1152
1152
  onClick: Y
1153
1153
  }, null, 8, ["config"]))), 128))
@@ -1164,7 +1164,7 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1164
1164
  className: {}
1165
1165
  },
1166
1166
  setup(e) {
1167
- const a = se(), o = ue(), t = e, n = k(), r = ve({
1167
+ const a = se(), o = ue(), t = e, n = k(), r = _e({
1168
1168
  current: 1,
1169
1169
  total: 0,
1170
1170
  pageSize: 10,
@@ -1173,7 +1173,7 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1173
1173
  showPageSize: !0,
1174
1174
  filters: []
1175
1175
  });
1176
- function u() {
1176
+ function i() {
1177
1177
  const V = Object.entries(l.value).filter(([, C]) => C && C !== "").map(([C, $]) => ({
1178
1178
  key: C,
1179
1179
  value: $
@@ -1193,7 +1193,7 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1193
1193
  x: v.value.length * 150 + 250
1194
1194
  // 只设置横向滚动
1195
1195
  // 移除 y 属性,让表格高度自适应
1196
- })), i = (V) => {
1196
+ })), c = (V) => {
1197
1197
  const C = Object.entries(V).filter(([, $]) => $.widget?.column).map(([$, W], ee) => ({
1198
1198
  title: W.widget.title,
1199
1199
  dataIndex: $.charAt(0).toLowerCase() + $.slice(1),
@@ -1217,11 +1217,11 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1217
1217
  }), v.value = C;
1218
1218
  }, s = k([]), v = k([]), p = k(!0), w = k(!0), f = k(), y = async () => {
1219
1219
  w.value = !0;
1220
- const V = await Xe(t.className, u());
1220
+ const V = await Xe(t.className, i());
1221
1221
  s.value = V.data, r.total = V.totalCount, w.value = !1;
1222
1222
  };
1223
1223
  Q(async () => {
1224
- p.value = !0, n.value = await ce(3, t.className, a), i(n.value.fields), A(n.value.fields), y(), f.value = n.value.actions, p.value = !1;
1224
+ p.value = !0, n.value = await ce(3, t.className, a), c(n.value.fields), A(n.value.fields), y(), f.value = n.value.actions, p.value = !1;
1225
1225
  }), Fe(() => {
1226
1226
  y();
1227
1227
  });
@@ -1251,14 +1251,14 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1251
1251
  function m() {
1252
1252
  return a()?.userInfo?.email_address ?? "";
1253
1253
  }
1254
- function c(V, C) {
1254
+ function u(V, C) {
1255
1255
  return V.replace(/{currentUserEmail}/g, C);
1256
1256
  }
1257
1257
  function _(V) {
1258
1258
  const C = n.value?.tabs?.find(($) => $.key === V)?.filters;
1259
1259
  r.filters = C?.map(($) => ({
1260
1260
  ...$,
1261
- value: c($.value, m())
1261
+ value: u($.value, m())
1262
1262
  })) || [], y();
1263
1263
  }
1264
1264
  const l = k({}), b = z(() => n.value?.fields ? Object.entries(n.value.fields).filter(([, V]) => V.isFiltered) : []), A = (V) => {
@@ -1305,7 +1305,7 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1305
1305
  class: "search-col"
1306
1306
  }, {
1307
1307
  default: U(() => [
1308
- H(_e, {
1308
+ H(he, {
1309
1309
  name: F,
1310
1310
  config: te,
1311
1311
  modelValue: l.value[F],
@@ -1412,12 +1412,12 @@ const ta = { class: "page-container" }, aa = { class: "page-header" }, na = { cl
1412
1412
  };
1413
1413
  }
1414
1414
  }), ka = /* @__PURE__ */ re(ba, [["__scopeId", "data-v-03c430a9"]]);
1415
- let me = {};
1415
+ let fe = {};
1416
1416
  function Va(e) {
1417
- me = { ...me, ...e };
1417
+ fe = { ...fe, ...e };
1418
1418
  }
1419
1419
  function Sa() {
1420
- return me;
1420
+ return fe;
1421
1421
  }
1422
1422
  const Ua = {
1423
1423
  install(e, a = {}) {