@chase-shao/vue-component-lib 1.2.68 → 1.2.70

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 g, defineComponent as G, mergeModels as re, useModel as we, resolveComponent as S, createBlock as L, openBlock as u, onMounted as de, computed as X, withCtx as p, createElementBlock as V, Fragment as K, renderList as z, createVNode as F, nextTick as rt, createTextVNode as q, useTemplateRef as De, createElementVNode as T, createCommentVNode as se, toDisplayString as J, resolveDynamicComponent as Pe, renderSlot as ue, inject as me, getCurrentInstance as be, reactive as Me, normalizeStyle as it, normalizeClass as lt, unref as Te, onActivated as ct } from "vue";
1
+ import { ref as g, defineComponent as G, mergeModels as re, useModel as ye, resolveComponent as S, createBlock as L, openBlock as u, onMounted as de, computed as X, withCtx as p, createElementBlock as V, Fragment as K, renderList as z, createVNode as F, nextTick as rt, createTextVNode as q, useTemplateRef as Re, createElementVNode as T, createCommentVNode as se, toDisplayString as J, resolveDynamicComponent as Pe, renderSlot as ue, inject as me, getCurrentInstance as be, reactive as Me, normalizeStyle as it, normalizeClass as lt, unref as Te, onActivated as ct } from "vue";
2
2
  import ut from "axios";
3
3
  import { defineStore as dt } from "pinia";
4
4
  import { Modal as ft } from "@arco-design/web-vue";
@@ -48,12 +48,12 @@ const mt = dt("main", () => ({
48
48
  const o = document.createElement("a"), n = window.URL.createObjectURL(a);
49
49
  o.href = n, o.download = t, o.click(), window.URL.revokeObjectURL(n);
50
50
  };
51
- let Re = {};
52
- function yt(e) {
53
- Re = { ...Re, ...e };
51
+ let De = {};
52
+ function wt(e) {
53
+ De = { ...De, ...e };
54
54
  }
55
55
  function Be() {
56
- return Re;
56
+ return De;
57
57
  }
58
58
  function qe() {
59
59
  const e = Be();
@@ -98,7 +98,7 @@ const Je = async () => {
98
98
  }, O = [];
99
99
  for (let e = 0; e < 256; ++e)
100
100
  O.push((e + 256).toString(16).slice(1));
101
- function wt(e, t = 0) {
101
+ function yt(e, t = 0) {
102
102
  return (O[e[t + 0]] + O[e[t + 1]] + O[e[t + 2]] + O[e[t + 3]] + "-" + O[e[t + 4]] + O[e[t + 5]] + "-" + O[e[t + 6]] + O[e[t + 7]] + "-" + O[e[t + 8]] + O[e[t + 9]] + "-" + O[e[t + 10]] + O[e[t + 11]] + O[e[t + 12]] + O[e[t + 13]] + O[e[t + 14]] + O[e[t + 15]]).toLowerCase();
103
103
  }
104
104
  let Ne;
@@ -119,7 +119,7 @@ function Xe(e, t, a) {
119
119
  const o = e.random ?? e.rng?.() ?? ht();
120
120
  if (o.length < 16)
121
121
  throw new Error("Random bytes length must be >= 16");
122
- return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, wt(o);
122
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, yt(o);
123
123
  }
124
124
  var Z = /* @__PURE__ */ ((e) => (e[e.Submit = 0] = "Submit", e[e.Link = 1] = "Link", e))(Z || {}), pe = /* @__PURE__ */ ((e) => (e[e.Create = 0] = "Create", e[e.Update = 1] = "Update", e[e.Details = 2] = "Details", e[e.List = 3] = "List", e))(pe || {});
125
125
  function Ct(e, t, a) {
@@ -173,7 +173,7 @@ function Ct(e, t, a) {
173
173
  isFiltered: !1,
174
174
  dependent: "",
175
175
  operator: ""
176
- }, { attributes: l, propertyValue: s } = c;
176
+ }, { attributes: i, propertyValue: s } = c;
177
177
  switch (s) {
178
178
  case null:
179
179
  r.modelValue = "";
@@ -185,16 +185,16 @@ function Ct(e, t, a) {
185
185
  r.modelValue = s;
186
186
  break;
187
187
  }
188
- n === "onBehalf" && t === 0 && (r.modelValue = Ue.CurrentUserEmail(a)), t === 1 && (n === "directReports" || n === "employeesInTheTeam") && r.modelValue && (r.modelValue = Number(r.modelValue)), l?.forEach((i) => {
189
- i.order || i.Order ? r.order = i.order ?? i.Order : i.attributeType === "UIControl" ? r.widget = {
190
- ...i,
188
+ n === "onBehalf" && t === 0 && (r.modelValue = Ue.CurrentUserEmail(a)), t === 1 && (n === "directReports" || n === "employeesInTheTeam") && r.modelValue && (r.modelValue = Number(r.modelValue)), i?.forEach((l) => {
189
+ l.order || l.Order ? r.order = l.order ?? l.Order : l.attributeType === "UIControl" ? r.widget = {
190
+ ...l,
191
191
  column: !0
192
- } : i.attributeType === "UIValidationControl" && t !== 3 ? r.widget?.widget !== "CheckBox" && r.validations.push(i) : i.attributeType === "UIListed" ? r.widget = {
193
- ...i,
192
+ } : l.attributeType === "UIValidationControl" && t !== 3 ? r.widget?.widget !== "CheckBox" && r.validations.push(l) : l.attributeType === "UIListed" ? r.widget = {
193
+ ...l,
194
194
  column: !0
195
- } : i.attributeType === "UIFiltered" ? (r.isFiltered = !0, r.operator = i.operatorType) : i.dependentType ? r.dependent = Ue[i.dependentType] ? Ue[i.dependentType](a) : "" : i.eventType === "Change" && r.triggers?.push({
195
+ } : l.attributeType === "UIFiltered" ? (r.isFiltered = !0, r.operator = l.operatorType) : l.dependentType ? r.dependent = Ue[l.dependentType] ? Ue[l.dependentType](a) : "" : l.eventType === "Change" && r.triggers?.push({
196
196
  event: "change",
197
- handlerName: i.eventName
197
+ handlerName: l.eventName
198
198
  });
199
199
  }), o.fields[n] = r;
200
200
  }), o;
@@ -252,10 +252,10 @@ function Tt(e, t) {
252
252
  function Ut(e, t) {
253
253
  return e.replace(/{ClassName}/g, encodeURIComponent(t));
254
254
  }
255
- async function Nt(e, t, a, o, n, c, r, l) {
255
+ async function Nt(e, t, a, o, n, c, r, i) {
256
256
  const s = await j();
257
- let i = He(c, t);
258
- return i = $t(i, a), i = At(i, o), i = It(i, r), i = Tt(i, l), i = Ut(i, e), (await s.put(i, n))?.data;
257
+ let l = He(c, t);
258
+ return l = $t(l, a), l = At(l, o), l = It(l, r), l = Tt(l, i), l = Ut(l, e), (await s.put(l, n))?.data;
259
259
  }
260
260
  async function Lt(e, t) {
261
261
  const n = (await (await j()).get(e, { params: { value: t } }))?.data;
@@ -267,7 +267,7 @@ async function Lt(e, t) {
267
267
  async function Ft(e, t) {
268
268
  return (await (await j()).get(`/General/${e}/${t}/process`))?.data;
269
269
  }
270
- function Rt(e) {
270
+ function Dt(e) {
271
271
  return {
272
272
  uid: e.id ?? Xe(),
273
273
  name: e.attachmentName ?? "unknown",
@@ -276,11 +276,11 @@ function Rt(e) {
276
276
  }
277
277
  async function Ze(e, t) {
278
278
  return (await (await j()).get(`/General/${e}/${t}/upload/get`))?.data.reduce((c, r) => {
279
- const { category: l } = r;
280
- return c[l] || (c[l] = []), c[l].push(Rt(r)), c;
279
+ const { category: i } = r;
280
+ return c[i] || (c[i] = []), c[i].push(Dt(r)), c;
281
281
  }, {});
282
282
  }
283
- async function Dt(e, t) {
283
+ async function Rt(e, t) {
284
284
  return (await j()).post(`/General/${e}/${t}/delete/attachment`);
285
285
  }
286
286
  async function Pt() {
@@ -340,27 +340,27 @@ const ge = (e, t) => {
340
340
  }),
341
341
  emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
342
342
  setup(e, { expose: t, emit: a }) {
343
- const o = e, n = a, c = we(e, "modelValue"), r = (i) => ge(o.validations, i), l = (i) => {
344
- n("input", i);
345
- }, s = (i) => {
346
- const _ = r(i);
343
+ const o = e, n = a, c = ye(e, "modelValue"), r = (l) => ge(o.validations, l), i = (l) => {
344
+ n("input", l);
345
+ }, s = (l) => {
346
+ const _ = r(l);
347
347
  n("error", _.res ? "" : _.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((d) => {
348
- d.event === "change" && n(d.event, d.handlerName, i);
348
+ d.event === "change" && n(d.event, d.handlerName, l);
349
349
  });
350
350
  };
351
351
  return t({
352
352
  validate() {
353
- const i = r(o.modelValue);
354
- return n("error", i.res ? "" : i.errorMessages), i.res;
353
+ const l = r(o.modelValue);
354
+ return n("error", l.res ? "" : l.errorMessages), l.res;
355
355
  }
356
- }), (i, _) => {
356
+ }), (l, _) => {
357
357
  const d = S("AInput");
358
358
  return u(), L(d, {
359
359
  modelValue: c.value,
360
360
  "onUpdate:modelValue": _[0] || (_[0] = (h) => c.value = h),
361
361
  "allow-clear": "",
362
362
  disabled: o.readonly || o.config.Readonly,
363
- onInput: l,
363
+ onInput: i,
364
364
  onChange: s
365
365
  }, null, 8, ["modelValue", "disabled"]);
366
366
  };
@@ -380,13 +380,13 @@ const ge = (e, t) => {
380
380
  }),
381
381
  emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
382
382
  setup(e, { expose: t, emit: a }) {
383
- const o = e, n = a, c = we(e, "modelValue"), r = g(100), l = g(1);
383
+ const o = e, n = a, c = ye(e, "modelValue"), r = g(100), i = g(1);
384
384
  de(() => {
385
385
  o.validations && o.validations.forEach((d) => {
386
- d.ruleName === "Max" && (r.value = d.ruleParameter), d.ruleName === "Min" && (l.value = d.ruleParameter);
386
+ d.ruleName === "Max" && (r.value = d.ruleParameter), d.ruleName === "Min" && (i.value = d.ruleParameter);
387
387
  });
388
388
  });
389
- const s = (d) => ge(o.validations, d), i = (d) => {
389
+ const s = (d) => ge(o.validations, d), l = (d) => {
390
390
  n("input", d);
391
391
  }, _ = (d) => {
392
392
  const h = s(d);
@@ -406,8 +406,8 @@ const ge = (e, t) => {
406
406
  "onUpdate:modelValue": h[0] || (h[0] = (m) => c.value = m),
407
407
  clearable: "",
408
408
  disabled: o.readonly,
409
- min: l.value,
410
- onInput: i,
409
+ min: i.value,
410
+ onInput: l,
411
411
  onChange: _
412
412
  }, null, 8, ["modelValue", "disabled", "min"]);
413
413
  };
@@ -427,7 +427,7 @@ const ge = (e, t) => {
427
427
  }),
428
428
  emits: /* @__PURE__ */ re(["update:modelValue", "change"], ["update:modelValue"]),
429
429
  setup(e, { expose: t, emit: a }) {
430
- const o = e, n = a, c = g(!1), r = g(o.config.options ?? []), l = we(e, "modelValue"), s = (d) => ge(o.validations, d);
430
+ const o = e, n = a, c = g(!1), r = g(o.config.options ?? []), i = ye(e, "modelValue"), s = (d) => ge(o.validations, d);
431
431
  X(() => {
432
432
  const d = {};
433
433
  return o.triggers && o.triggers.length > 0 && o.triggers.forEach((h) => {
@@ -456,8 +456,8 @@ const ge = (e, t) => {
456
456
  const x = S("AOption"), m = S("ASelect");
457
457
  return u(), L(m, {
458
458
  "allow-clear": "",
459
- modelValue: l.value,
460
- "onUpdate:modelValue": h[0] || (h[0] = (k) => l.value = k),
459
+ modelValue: i.value,
460
+ "onUpdate:modelValue": h[0] || (h[0] = (k) => i.value = k),
461
461
  loading: c.value,
462
462
  "filter-option": !0,
463
463
  "allow-search": !0,
@@ -495,12 +495,12 @@ const ge = (e, t) => {
495
495
  }
496
496
  }
497
497
  });
498
- const l = { value: "key", label: "value" };
498
+ const i = { value: "key", label: "value" };
499
499
  return t({
500
500
  validate() {
501
501
  return !0;
502
502
  }
503
- }), (s, i) => {
503
+ }), (s, l) => {
504
504
  const _ = S("ACascader"), d = S("ASpace");
505
505
  return u(), L(d, {
506
506
  direction: "vertical",
@@ -508,7 +508,7 @@ const ge = (e, t) => {
508
508
  }, {
509
509
  default: p(() => [
510
510
  F(_, {
511
- "field-names": l,
511
+ "field-names": i,
512
512
  "model-value": s.modelValue,
513
513
  options: c.value,
514
514
  style: { width: "320px" },
@@ -540,7 +540,7 @@ const ge = (e, t) => {
540
540
  Authorization: `Bearer ${m}`
541
541
  };
542
542
  });
543
- const r = (m) => ge(o.validations, m), s = Be().apiBase, i = g(null), _ = g("");
543
+ const r = (m) => ge(o.validations, m), s = Be().apiBase, l = g(null), _ = g("");
544
544
  function d(m, k, E) {
545
545
  return m.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, E);
546
546
  }
@@ -568,8 +568,8 @@ const ge = (e, t) => {
568
568
  }
569
569
  return t({
570
570
  submit(m) {
571
- i.value && (o.config.uploadURL && (_.value = m), rt(() => {
572
- i.value.submit();
571
+ l.value && (o.config.uploadURL && (_.value = m), rt(() => {
572
+ l.value.submit();
573
573
  }));
574
574
  },
575
575
  validate() {
@@ -580,7 +580,7 @@ const ge = (e, t) => {
580
580
  const E = S("a-button"), ee = S("a-upload");
581
581
  return u(), L(ee, {
582
582
  ref_key: "uploadRef",
583
- ref: i,
583
+ ref: l,
584
584
  "default-file-list": o.config.files,
585
585
  action: h.value,
586
586
  limit: o.config.allowedNumber,
@@ -617,10 +617,10 @@ const ge = (e, t) => {
617
617
  setup(e, { expose: t, emit: a }) {
618
618
  const o = e, n = a, c = (s) => ge(o.validations, s), r = (s) => {
619
619
  n("update:modelValue", s), n("input", s);
620
- }, l = (s) => {
620
+ }, i = (s) => {
621
621
  n("update:modelValue", s);
622
- const i = c(s);
623
- n("error", i.res ? "" : i.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
622
+ const l = c(s);
623
+ n("error", l.res ? "" : l.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
624
624
  _.event === "change" && n(_.event, _.handlerName, s);
625
625
  });
626
626
  };
@@ -629,7 +629,7 @@ const ge = (e, t) => {
629
629
  const s = c(o.modelValue);
630
630
  return n("error", s.res ? "" : s.errorMessages), s.res;
631
631
  }
632
- }), (s, i) => {
632
+ }), (s, l) => {
633
633
  const _ = S("ATextarea");
634
634
  return u(), L(_, {
635
635
  "model-value": o.modelValue,
@@ -637,7 +637,7 @@ const ge = (e, t) => {
637
637
  "allow-clear": "",
638
638
  disabled: o.readonly,
639
639
  onInput: r,
640
- onChange: l
640
+ onChange: i
641
641
  }, null, 8, ["model-value", "disabled"]);
642
642
  };
643
643
  }
@@ -656,9 +656,9 @@ const ge = (e, t) => {
656
656
  }),
657
657
  emits: /* @__PURE__ */ re(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
658
658
  setup(e, { expose: t, emit: a }) {
659
- const o = e, n = a, c = we(e, "modelValue"), r = (s) => ge(o.validations, s), l = (s) => {
660
- const i = r(s);
661
- n("error", i.res ? "" : i.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
659
+ const o = e, n = a, c = ye(e, "modelValue"), r = (s) => ge(o.validations, s), i = (s) => {
660
+ const l = r(s);
661
+ n("error", l.res ? "" : l.errorMessages), o.triggers && o.triggers.length > 0 && o.triggers.forEach((_) => {
662
662
  _.event === "change" && n(_.event, _.handlerName, s);
663
663
  });
664
664
  };
@@ -667,16 +667,16 @@ const ge = (e, t) => {
667
667
  const s = r(o.modelValue);
668
668
  return n("error", s.res ? "" : s.errorMessages), s.res;
669
669
  }
670
- }), (s, i) => {
670
+ }), (s, l) => {
671
671
  const _ = S("ACheckbox");
672
672
  return u(), L(_, {
673
673
  modelValue: c.value,
674
- "onUpdate:modelValue": i[0] || (i[0] = (d) => c.value = d),
674
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => c.value = d),
675
675
  clearable: "",
676
676
  disabled: o.readonly || o.config.Readonly,
677
- onChange: l
677
+ onChange: i
678
678
  }, {
679
- default: p(() => i[1] || (i[1] = [
679
+ default: p(() => l[1] || (l[1] = [
680
680
  q("Yes", -1)
681
681
  ])),
682
682
  _: 1,
@@ -706,7 +706,7 @@ const ge = (e, t) => {
706
706
  }),
707
707
  emits: /* @__PURE__ */ re(["update:modelValue", "change", "error"], ["update:modelValue"]),
708
708
  setup(e, { expose: t, emit: a }) {
709
- const o = e, n = a, c = we(e, "modelValue"), r = De("widgetRef"), l = X(() => {
709
+ const o = e, n = a, c = ye(e, "modelValue"), r = Re("widgetRef"), i = X(() => {
710
710
  switch (o.config?.widget?.widget) {
711
711
  case "TextBox":
712
712
  return Ge;
@@ -727,7 +727,7 @@ const ge = (e, t) => {
727
727
  default:
728
728
  return Ge;
729
729
  }
730
- }), s = g(""), i = (h) => {
730
+ }), s = g(""), l = (h) => {
731
731
  s.value = h;
732
732
  }, _ = (h, x) => {
733
733
  n("change", h, x);
@@ -754,7 +754,7 @@ const ge = (e, t) => {
754
754
  o.config.validations.length ? (u(), V("span", Jt, "*")) : se("", !0)
755
755
  ]),
756
756
  T("div", null, [
757
- (u(), L(Pe(l.value), {
757
+ (u(), L(Pe(i.value), {
758
758
  ref_key: "widgetRef",
759
759
  ref: r,
760
760
  modelValue: c.value,
@@ -764,7 +764,7 @@ const ge = (e, t) => {
764
764
  validations: o.config.validations,
765
765
  triggers: o.config.triggers,
766
766
  "class-name": o.className,
767
- onError: i,
767
+ onError: l,
768
768
  onChange: _
769
769
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
770
770
  s.value.length > 0 ? (u(), V("div", Xt, J(s.value), 1)) : se("", !0)
@@ -790,8 +790,8 @@ const ge = (e, t) => {
790
790
  o("click", a.url, a.redirectType);
791
791
  }
792
792
  return (c, r) => {
793
- const l = S("AButton");
794
- return u(), L(l, {
793
+ const i = S("AButton");
794
+ return u(), L(i, {
795
795
  loading: c.loading,
796
796
  type: "primary",
797
797
  onClick: n
@@ -817,8 +817,8 @@ const ge = (e, t) => {
817
817
  o("click", a.url, a.redirectType);
818
818
  }
819
819
  return (c, r) => {
820
- const l = S("ALink");
821
- return u(), L(l, { onClick: n }, {
820
+ const i = S("ALink");
821
+ return u(), L(i, { onClick: n }, {
822
822
  default: p(() => [
823
823
  ue(c.$slots, "default")
824
824
  ]),
@@ -826,7 +826,7 @@ const ge = (e, t) => {
826
826
  });
827
827
  };
828
828
  }
829
- }), ye = /* @__PURE__ */ G({
829
+ }), we = /* @__PURE__ */ G({
830
830
  __name: "index",
831
831
  props: {
832
832
  config: {},
@@ -835,8 +835,8 @@ const ge = (e, t) => {
835
835
  emits: ["click"],
836
836
  setup(e, { emit: t }) {
837
837
  const a = e, o = t;
838
- function n(s, i) {
839
- o("click", a.config.widget, s, i, a.config.title);
838
+ function n(s, l) {
839
+ o("click", a.config.widget, s, l, a.config.title);
840
840
  }
841
841
  const c = X(() => {
842
842
  switch (a.config.location) {
@@ -846,10 +846,10 @@ const ge = (e, t) => {
846
846
  default:
847
847
  return eo;
848
848
  }
849
- }), r = X(() => a.config.widget === Z.Submit ? a.config.requestUrl ?? "" : a.config.widget === Z.Link ? a.config.redirectUrl ?? "" : ""), l = X(() => a.config.redirectType ?? "Details");
850
- return (s, i) => (u(), L(Pe(c.value), {
849
+ }), r = X(() => a.config.widget === Z.Submit ? a.config.requestUrl ?? "" : a.config.widget === Z.Link ? a.config.redirectUrl ?? "" : ""), i = X(() => a.config.redirectType ?? "Details");
850
+ return (s, l) => (u(), L(Pe(c.value), {
851
851
  url: r.value,
852
- "redirect-type": l.value,
852
+ "redirect-type": i.value,
853
853
  loading: s.loading,
854
854
  onClick: n
855
855
  }, {
@@ -919,23 +919,23 @@ function ze(e) {
919
919
  const t = Be(), a = [];
920
920
  if (t.fieldsGroup) {
921
921
  t.fieldsGroup.forEach((c) => {
922
- const r = c.keys.map((l) => e.find((s) => s.fieldKey === l)).filter(Boolean);
922
+ const r = c.keys.map((i) => e.find((s) => s.fieldKey === i)).filter(Boolean);
923
923
  r.length && a.push({ name: c.name, fields: r });
924
924
  });
925
925
  const o = t.fieldsGroup.flatMap((c) => c.keys), n = e.filter((c) => !o.includes(c.fieldKey));
926
- return n.length && a.push({ name: "未分组字段", fields: n }), console.log("🚀 ~ genFieldsGroup ~ groups:", a), a;
926
+ return n.length && a.push({ name: "未分组字段", fields: n }), a;
927
927
  }
928
928
  }
929
929
  const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { class: "form-card" }, po = { class: "form-fields-vertical" }, mo = { class: "form-fields" }, go = {
930
930
  key: 0,
931
931
  class: "form-content"
932
- }, vo = { class: "page-footer" }, _o = { class: "action-container" }, yo = { class: "action-buttons" }, wo = /* @__PURE__ */ G({
932
+ }, vo = { class: "page-footer" }, _o = { class: "action-container" }, wo = { class: "action-buttons" }, yo = /* @__PURE__ */ G({
933
933
  __name: "CreateView",
934
934
  props: {
935
935
  className: {}
936
936
  },
937
937
  setup(e) {
938
- const t = Se(), a = xe(), o = Ve(), n = Ee(), c = De("dataWidgets"), r = be(), l = e, s = g({
938
+ const t = Se(), a = xe(), o = Ve(), n = Ee(), c = Re("dataWidgets"), r = be(), i = e, s = g({
939
939
  pageType: "",
940
940
  fields: {},
941
941
  globalValidations: [],
@@ -943,7 +943,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
943
943
  title: "",
944
944
  subTitle: ""
945
945
  }
946
- }), i = g([]), _ = g({});
946
+ }), l = g([]), _ = g({});
947
947
  function d($) {
948
948
  return $ ? Object.entries($).map(([v, A]) => ({
949
949
  fieldKey: v,
@@ -951,17 +951,17 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
951
951
  })).filter((v) => v.widget && v.widget.widget !== "Hidden").filter((v) => !ne.value.includes(v.fieldKey)) : [];
952
952
  }
953
953
  function h($) {
954
- return $ ? Object.entries($).filter(([v, A]) => A.dependent).reduce((v, [A, w]) => (v[A] = w.dependent, v), {}) : [];
954
+ return $ ? Object.entries($).filter(([v, A]) => A.dependent).reduce((v, [A, y]) => (v[A] = y.dependent, v), {}) : [];
955
955
  }
956
956
  const x = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = Me({}), k = g(!1);
957
957
  de(async () => {
958
- k.value = !0, s.value = await Ce(pe.Create, l.className, {
958
+ k.value = !0, s.value = await Ce(pe.Create, i.className, {
959
959
  svrStore: a,
960
960
  bpmStore: t
961
- }), i.value = d(s.value.fields), _.value = h(s.value.fields);
961
+ }), l.value = d(s.value.fields), _.value = h(s.value.fields);
962
962
  for (const $ in s.value.fields) {
963
963
  if (s.value.fields[$].widget?.widget === "File") {
964
- const U = i.value.find((v) => v.fieldKey === $);
964
+ const U = l.value.find((v) => v.fieldKey === $);
965
965
  U && U.widget && (U.widget.files = []);
966
966
  }
967
967
  m[$] = s.value.fields[$].modelValue;
@@ -971,24 +971,24 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
971
971
  function E() {
972
972
  return a()?.userInfo?.email_address ?? "";
973
973
  }
974
- async function ee($, U, v, A, w) {
974
+ async function ee($, U, v, A, y) {
975
975
  switch (U) {
976
976
  case Z.Submit:
977
- let D = !0;
977
+ let R = !0;
978
978
  if (c.value?.forEach((ae) => {
979
- ae?.validate && (ae.validate() || (D = !1));
980
- }), !D) {
979
+ ae?.validate && (ae.validate() || (R = !1));
980
+ }), !R) {
981
981
  r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
982
982
  return;
983
983
  }
984
984
  k.value = !0;
985
- const te = await St(l.className, { ...m, ..._.value }, v);
985
+ const te = await St(i.className, { ...m, ..._.value }, v);
986
986
  k.value = !1, c.value?.forEach((ae) => {
987
987
  ae?.submit && ae.submit(te.toString());
988
- }), console.log("🚀 ~ clickHandler ~ res.toString():", te.toString()), r?.appContext.config.globalProperties.$notification.success("create success!"), o.push({ name: "Details", params: { workflowId: te.toString() } });
988
+ }), r?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${te.toString()}.`), o.push({ name: "Details", params: { workflowId: te.toString() } });
989
989
  break;
990
990
  case Z.Link:
991
- A === "List" && o.push({ name: "List", params: { className: l.className } });
991
+ A === "List" && o.push({ name: "List", params: { className: i.className } });
992
992
  break;
993
993
  default:
994
994
  console.warn("Unknown action type:", U);
@@ -1003,9 +1003,9 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1003
1003
  "positionId"
1004
1004
  ]);
1005
1005
  function le($, U) {
1006
- n[$]?.(U, ne), s.value && (i.value = d(s.value.fields));
1006
+ n[$]?.(U, ne), s.value && (l.value = d(s.value.fields));
1007
1007
  }
1008
- const B = X(() => ze(i.value));
1008
+ const B = X(() => ze(l.value));
1009
1009
  return ($, U) => {
1010
1010
  const v = S("a-card"), A = S("a-spin");
1011
1011
  return u(), V("div", co, [
@@ -1022,22 +1022,22 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1022
1022
  default: p(() => [
1023
1023
  T("div", fo, [
1024
1024
  T("div", po, [
1025
- (u(!0), V(K, null, z(B.value, (w) => (u(), L(v, {
1026
- key: w.name,
1027
- title: w.name,
1025
+ (u(!0), V(K, null, z(B.value, (y) => (u(), L(v, {
1026
+ key: y.name,
1027
+ title: y.name,
1028
1028
  style: { "margin-bottom": "24px" }
1029
1029
  }, {
1030
1030
  default: p(() => [
1031
1031
  T("div", mo, [
1032
- (u(!0), V(K, null, z(w.fields, (D) => (u(), L(Ke, {
1033
- key: D.fieldKey,
1032
+ (u(!0), V(K, null, z(y.fields, (R) => (u(), L(Ke, {
1033
+ key: R.fieldKey,
1034
1034
  ref_for: !0,
1035
1035
  ref: "dataWidgets",
1036
- "field-key": D.fieldKey,
1037
- config: D,
1036
+ "field-key": R.fieldKey,
1037
+ config: R,
1038
1038
  "class-name": $.className,
1039
- modelValue: m[D.fieldKey],
1040
- "onUpdate:modelValue": (te) => m[D.fieldKey] = te,
1039
+ modelValue: m[R.fieldKey],
1040
+ "onUpdate:modelValue": (te) => m[R.fieldKey] = te,
1041
1041
  class: "form-field",
1042
1042
  onChange: le
1043
1043
  }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
@@ -1057,13 +1057,13 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1057
1057
  T("div", vo, [
1058
1058
  T("div", _o, [
1059
1059
  ue($.$slots, "action", {}, void 0, !0),
1060
- T("div", yo, [
1061
- (u(!0), V(K, null, z(x.value, (w) => (u(), L(ye, {
1062
- key: w.Title,
1060
+ T("div", wo, [
1061
+ (u(!0), V(K, null, z(x.value, (y) => (u(), L(we, {
1062
+ key: y.Title,
1063
1063
  loading: k.value,
1064
- config: w,
1064
+ config: y,
1065
1065
  class: "action-button",
1066
- onClick: (...D) => ee(w, ...D)
1066
+ onClick: (...R) => ee(y, ...R)
1067
1067
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1068
1068
  ])
1069
1069
  ])
@@ -1071,7 +1071,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1071
1071
  ]);
1072
1072
  };
1073
1073
  }
1074
- }), bo = /* @__PURE__ */ ve(wo, [["__scopeId", "data-v-cc26a7e0"]]), ho = { class: "page-container" }, ko = { class: "page-body" }, Co = { class: "form-card" }, Vo = { class: "form-fields-vertical" }, So = { class: "form-fields" }, xo = {
1074
+ }), bo = /* @__PURE__ */ ve(yo, [["__scopeId", "data-v-f3f47e02"]]), ho = { class: "page-container" }, ko = { class: "page-body" }, Co = { class: "form-card" }, Vo = { class: "form-fields-vertical" }, So = { class: "form-fields" }, xo = {
1075
1075
  key: 0,
1076
1076
  class: "form-content"
1077
1077
  }, $o = { class: "page-footer" }, Ao = { class: "action-container" }, Io = { class: "action-buttons" }, To = /* @__PURE__ */ G({
@@ -1081,7 +1081,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1081
1081
  workflowId: {}
1082
1082
  },
1083
1083
  setup(e) {
1084
- const t = Ve(), a = Ee(), o = xe(), n = Se(), c = De("dataWidgets"), r = be(), l = e, s = g({
1084
+ const t = Ve(), a = Ee(), o = xe(), n = Se(), c = Re("dataWidgets"), r = be(), i = e, s = g({
1085
1085
  pageType: "",
1086
1086
  fields: {},
1087
1087
  globalValidations: [],
@@ -1089,7 +1089,7 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1089
1089
  title: "",
1090
1090
  subTitle: ""
1091
1091
  }
1092
- }), i = g([]), _ = g({});
1092
+ }), l = g([]), _ = g({});
1093
1093
  function d(B) {
1094
1094
  return B ? Object.entries(B).map(([U, v]) => ({
1095
1095
  fieldKey: U,
@@ -1101,23 +1101,23 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1101
1101
  }
1102
1102
  const x = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), m = Me({}), k = g(!1);
1103
1103
  de(async () => {
1104
- k.value = !0, s.value = await Ce(pe.Update, l.className, {
1104
+ k.value = !0, s.value = await Ce(pe.Update, i.className, {
1105
1105
  svrStore: o,
1106
1106
  bpmStore: n
1107
1107
  }, {
1108
- workflowId: l.workflowId
1108
+ workflowId: i.workflowId
1109
1109
  });
1110
- const B = await Qe(pe.Update, l.className, { workflowId: l.workflowId, email: E() }), $ = await Ze(l.className, l.workflowId);
1110
+ const B = await Qe(pe.Update, i.className, { workflowId: i.workflowId, email: E() }), $ = await Ze(i.className, i.workflowId);
1111
1111
  s.value.actions = s.value.actions?.filter((v) => {
1112
- const A = B.find((w) => w.button === v.title);
1112
+ const A = B.find((y) => y.button === v.title);
1113
1113
  return A ? A.isShow : !0;
1114
1114
  });
1115
1115
  const U = s.value.fields.requestType.modelValue;
1116
- a.Test?.(U, oe), i.value = d(s.value.fields), _.value = h(s.value.fields);
1116
+ a.Test?.(U, oe), l.value = d(s.value.fields), _.value = h(s.value.fields);
1117
1117
  for (const v in s.value.fields) {
1118
1118
  if (s.value.fields[v].widget?.widget === "File") {
1119
- const A = i.value.find((w) => w.fieldKey === v);
1120
- A && A.widget && (A.widget.files = $[v] ?? [], A.widget.removeFile = (w) => Dt(l.className, w));
1119
+ const A = l.value.find((y) => y.fieldKey === v);
1120
+ A && A.widget && (A.widget.files = $[v] ?? [], A.widget.removeFile = (y) => Rt(i.className, y));
1121
1121
  }
1122
1122
  m[v] = s.value.fields[v].modelValue;
1123
1123
  }
@@ -1129,19 +1129,19 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1129
1129
  async function ee(B, $, U, v, A) {
1130
1130
  switch ($) {
1131
1131
  case Z.Submit:
1132
- let w = !0;
1133
- if (c.value?.forEach((D) => {
1134
- D?.validate && (D.validate() || (w = !1));
1135
- }), !w) {
1132
+ let y = !0;
1133
+ if (c.value?.forEach((R) => {
1134
+ R?.validate && (R.validate() || (y = !1));
1135
+ }), !y) {
1136
1136
  r?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1137
1137
  return;
1138
1138
  }
1139
- k.value = !0, await xt(l.className, l.workflowId, { ...m, ..._.value }, U), k.value = !1, c.value?.forEach((D) => {
1140
- D?.submit && D.submit(l.workflowId);
1141
- }), r?.appContext.config.globalProperties.$notification.success("update success!");
1139
+ k.value = !0, await xt(i.className, i.workflowId, { ...m, ..._.value }, U), k.value = !1, c.value?.forEach((R) => {
1140
+ R?.submit && R.submit(i.workflowId);
1141
+ }), r?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${i.workflowId}.`);
1142
1142
  break;
1143
1143
  case Z.Link:
1144
- t.push({ name: v, params: { className: l.className } });
1144
+ t.push({ name: v, params: { className: i.className } });
1145
1145
  break;
1146
1146
  default:
1147
1147
  console.warn("Unknown action type:", $);
@@ -1149,9 +1149,9 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1149
1149
  }
1150
1150
  const oe = g([]);
1151
1151
  function ne(B, $) {
1152
- a[B]?.($, oe), s.value && (i.value = d(s.value.fields));
1152
+ a[B]?.($, oe), s.value && (l.value = d(s.value.fields));
1153
1153
  }
1154
- const le = X(() => ze(i.value));
1154
+ const le = X(() => ze(l.value));
1155
1155
  return (B, $) => {
1156
1156
  const U = S("a-card"), v = S("a-spin");
1157
1157
  return u(), V("div", ho, [
@@ -1175,15 +1175,15 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1175
1175
  }, {
1176
1176
  default: p(() => [
1177
1177
  T("div", So, [
1178
- (u(!0), V(K, null, z(A.fields, (w) => (u(), L(Ke, {
1179
- key: w.fieldKey,
1178
+ (u(!0), V(K, null, z(A.fields, (y) => (u(), L(Ke, {
1179
+ key: y.fieldKey,
1180
1180
  ref_for: !0,
1181
1181
  ref: "dataWidgets",
1182
- "field-key": w.fieldKey,
1183
- config: w,
1182
+ "field-key": y.fieldKey,
1183
+ config: y,
1184
1184
  "class-name": B.className,
1185
- modelValue: m[w.fieldKey],
1186
- "onUpdate:modelValue": (D) => m[w.fieldKey] = D,
1185
+ modelValue: m[y.fieldKey],
1186
+ "onUpdate:modelValue": (R) => m[y.fieldKey] = R,
1187
1187
  class: "form-field",
1188
1188
  onChange: ne
1189
1189
  }, null, 8, ["field-key", "config", "class-name", "modelValue", "onUpdate:modelValue"]))), 128))
@@ -1204,12 +1204,12 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1204
1204
  T("div", Ao, [
1205
1205
  ue(B.$slots, "action", {}, void 0, !0),
1206
1206
  T("div", Io, [
1207
- (u(!0), V(K, null, z(x.value, (A) => (u(), L(ye, {
1207
+ (u(!0), V(K, null, z(x.value, (A) => (u(), L(we, {
1208
1208
  key: A.Title,
1209
1209
  loading: k.value,
1210
1210
  config: A,
1211
1211
  class: "action-button",
1212
- onClick: (...w) => ee(A, ...w)
1212
+ onClick: (...y) => ee(A, ...y)
1213
1213
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1214
1214
  ])
1215
1215
  ])
@@ -1217,14 +1217,14 @@ const co = { class: "page-container" }, uo = { class: "page-body" }, fo = { clas
1217
1217
  ]);
1218
1218
  };
1219
1219
  }
1220
- }), Uo = /* @__PURE__ */ ve(To, [["__scopeId", "data-v-1621b609"]]), at = Symbol("library-custom-comp");
1220
+ }), Uo = /* @__PURE__ */ ve(To, [["__scopeId", "data-v-8d95324e"]]), at = Symbol("library-custom-comp");
1221
1221
  function No() {
1222
1222
  return me(at, null);
1223
1223
  }
1224
- const Lo = Symbol("ArcoConfigProvider"), Fo = "arco", Ro = "$arco", Do = (e) => {
1224
+ const Lo = Symbol("ArcoConfigProvider"), Fo = "arco", Do = "$arco", Ro = (e) => {
1225
1225
  var t, a, o;
1226
1226
  const n = be(), c = me(Lo, void 0);
1227
- return `${(o = (a = c?.prefixCls) != null ? a : (t = n?.appContext.config.globalProperties[Ro]) == null ? void 0 : t.classPrefix) != null ? o : Fo}-${e}`;
1227
+ return `${(o = (a = c?.prefixCls) != null ? a : (t = n?.appContext.config.globalProperties[Do]) == null ? void 0 : t.classPrefix) != null ? o : Fo}-${e}`;
1228
1228
  }, Po = Object.prototype.toString;
1229
1229
  function Mo(e) {
1230
1230
  return Po.call(e) === "[object Number]" && e === e;
@@ -1261,7 +1261,7 @@ const Ho = G({
1261
1261
  click: (e) => !0
1262
1262
  },
1263
1263
  setup(e, { emit: t }) {
1264
- const a = Do("icon"), o = X(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), n = X(() => {
1264
+ const a = Ro("icon"), o = X(() => [a, `${a}-download`, { [`${a}-spin`]: e.spin }]), n = X(() => {
1265
1265
  const r = {};
1266
1266
  return e.size && (r.fontSize = Mo(e.size) ? `${e.size}px` : e.size), e.rotate && (r.transform = `rotate(${e.rotate}deg)`), r;
1267
1267
  });
@@ -1313,7 +1313,7 @@ const zo = Object.assign(Fe, {
1313
1313
  workflowId: {}
1314
1314
  },
1315
1315
  setup(e) {
1316
- const t = xe(), a = Se(), o = Ee(), n = Ve(), c = No(), r = be(), l = e, s = g({
1316
+ const t = xe(), a = Se(), o = Ee(), n = Ve(), c = No(), r = be(), i = e, s = g({
1317
1317
  pageType: "",
1318
1318
  fields: {},
1319
1319
  globalValidations: [],
@@ -1321,14 +1321,14 @@ const zo = Object.assign(Fe, {
1321
1321
  title: "",
1322
1322
  subTitle: ""
1323
1323
  }
1324
- }), i = g([]);
1324
+ }), l = g([]);
1325
1325
  function _(b) {
1326
1326
  return b ? Object.entries(b).map(([H, C]) => (typeof C.modelValue == "boolean" ? C.fieldValue = C.modelValue ? "Yes" : "No" : C.fieldValue = C.modelValue, {
1327
1327
  fieldKey: H,
1328
1328
  ...C
1329
1329
  })).filter((H) => H.widget && H.widget.widget !== "Hidden").filter((H) => !B.value.includes(H.fieldKey)) : [];
1330
1330
  }
1331
- const d = X(() => ze(i.value)), h = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), x = g(!0), m = (b, f) => {
1331
+ const d = X(() => ze(l.value)), h = X(() => s.value?.actions ? [...s.value.actions].reverse() : []), x = g(!0), m = (b, f) => {
1332
1332
  const H = b.findIndex((C) => C.isCurrent);
1333
1333
  return b.map((C, Y) => {
1334
1334
  const N = {
@@ -1364,7 +1364,7 @@ const zo = Object.assign(Fe, {
1364
1364
  });
1365
1365
  }, k = g([]), E = g(!1), ee = g(!1), oe = g(!1), ne = g(!1);
1366
1366
  async function le() {
1367
- const b = await Qe(pe.Details, l.className, { workflowId: l.workflowId, email: v() });
1367
+ const b = await Qe(pe.Details, i.className, { workflowId: i.workflowId, email: v() });
1368
1368
  s.value.actions = s.value.actions?.filter((f) => {
1369
1369
  const H = b.find((C) => C.button === f.title);
1370
1370
  return H ? H.isShow : !0;
@@ -1372,22 +1372,22 @@ const zo = Object.assign(Fe, {
1372
1372
  }
1373
1373
  const B = g([]);
1374
1374
  async function $() {
1375
- x.value = !0, s.value = await Ce(pe.Details, l.className, {
1375
+ x.value = !0, s.value = await Ce(pe.Details, i.className, {
1376
1376
  svrStore: t,
1377
1377
  bpmStore: a
1378
1378
  }, {
1379
- workflowId: l.workflowId
1379
+ workflowId: i.workflowId
1380
1380
  });
1381
- const b = await Ze(l.className, l.workflowId);
1382
- ae.value = await Pt(), D.value = await Oe(l.workflowId), fe.value = await Le(l.workflowId), le();
1381
+ const b = await Ze(i.className, i.workflowId);
1382
+ ae.value = await Pt(), R.value = await Oe(i.workflowId), fe.value = await Le(i.workflowId), le();
1383
1383
  const f = s.value.fields.requestType.modelValue;
1384
- o.Test?.(f, B), i.value = _(s.value.fields);
1384
+ o.Test?.(f, B), l.value = _(s.value.fields);
1385
1385
  for (const C in s.value.fields)
1386
1386
  if (s.value.fields[C].widget?.widget === "File") {
1387
- const Y = i.value.find((N) => N.fieldKey === C);
1387
+ const Y = l.value.find((N) => N.fieldKey === C);
1388
1388
  Y && Y.widget && (Y.widget.files = b[C] ?? []);
1389
1389
  }
1390
- const H = await Ft(l.className, l.workflowId);
1390
+ const H = await Ft(i.className, i.workflowId);
1391
1391
  k.value = m(H, 0), x.value = !1;
1392
1392
  }
1393
1393
  de($);
@@ -1404,12 +1404,12 @@ const zo = Object.assign(Fe, {
1404
1404
  const { reason: N, ifGlobal: ie } = await U(Y, { isGlobal: E.value });
1405
1405
  x.value = !0;
1406
1406
  const P = Y === "Approve" ? "100" : "-1";
1407
- await Nt(l.className, l.workflowId, v(), N, [Number(l.workflowId)], H, P, ie), x.value = !1;
1407
+ await Nt(i.className, i.workflowId, v(), N, [Number(i.workflowId)], H, P, ie), x.value = !1;
1408
1408
  const Q = Y === "Approve" ? "approve success!" : "approve reject!";
1409
1409
  r?.appContext.config.globalProperties.$notification.success(Q), $();
1410
1410
  break;
1411
1411
  case Z.Link:
1412
- C === "List" && n.push({ name: "List", params: { className: l.className } });
1412
+ C === "List" && n.push({ name: "List", params: { className: i.className } });
1413
1413
  break;
1414
1414
  default:
1415
1415
  console.warn("Unknown action type:", f);
@@ -1417,15 +1417,15 @@ const zo = Object.assign(Fe, {
1417
1417
  } catch {
1418
1418
  }
1419
1419
  }
1420
- const w = g(""), D = g([]), te = g(""), ae = g([]), fe = g([]);
1420
+ const y = g(""), R = g([]), te = g(""), ae = g([]), fe = g([]);
1421
1421
  async function Ae() {
1422
1422
  if (!te.value) {
1423
1423
  r?.appContext.config.globalProperties.$message.error("Please select an approver");
1424
1424
  return;
1425
1425
  }
1426
- await y("Confirm Assign Approver", "Do you want to assign the selected approver?");
1426
+ await w("Confirm Assign Approver", "Do you want to assign the selected approver?");
1427
1427
  try {
1428
- await Mt(l.workflowId, te.value), fe.value = await Le(l.workflowId), le(), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1428
+ await Mt(i.workflowId, te.value), fe.value = await Le(i.workflowId), le(), r?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1429
1429
  } catch (b) {
1430
1430
  if (b.status === 409) {
1431
1431
  r?.appContext.config.globalProperties.$notification.error("This user is already an associator");
@@ -1434,7 +1434,7 @@ const zo = Object.assign(Fe, {
1434
1434
  r?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
1435
1435
  }
1436
1436
  }
1437
- async function y(b, f) {
1437
+ async function w(b, f) {
1438
1438
  const { Modal: H } = await import("@arco-design/web-vue");
1439
1439
  return new Promise((C, Y) => {
1440
1440
  H.confirm({
@@ -1449,22 +1449,22 @@ const zo = Object.assign(Fe, {
1449
1449
  }
1450
1450
  async function I(b) {
1451
1451
  try {
1452
- await y("Confirm Delete Associator", "Do you want to delete this associator?");
1452
+ await w("Confirm Delete Associator", "Do you want to delete this associator?");
1453
1453
  } catch {
1454
1454
  return;
1455
1455
  }
1456
1456
  try {
1457
- await Ht(String(b)), fe.value = await Le(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1457
+ await Ht(String(b)), fe.value = await Le(i.workflowId), r?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1458
1458
  } catch {
1459
1459
  r?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
1460
1460
  }
1461
1461
  }
1462
- async function R() {
1463
- if (!w.value.trim()) {
1462
+ async function D() {
1463
+ if (!y.value.trim()) {
1464
1464
  r?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
1465
1465
  return;
1466
1466
  }
1467
- await Bt(l.workflowId, v(), w.value), w.value = "", D.value = await Oe(l.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1467
+ await Bt(i.workflowId, v(), y.value), y.value = "", R.value = await Oe(i.workflowId), r?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1468
1468
  }
1469
1469
  return (b, f) => {
1470
1470
  const H = S("a-link"), C = S("a-space"), Y = S("a-card"), N = S("a-option"), ie = S("a-select"), P = S("a-button"), Q = S("a-list-item"), W = S("a-list"), he = S("a-textarea"), st = S("a-spin");
@@ -1587,12 +1587,12 @@ const zo = Object.assign(Fe, {
1587
1587
  T("div", Zo, [
1588
1588
  f[6] || (f[6] = T("div", { class: "field-label" }, "Comment", -1)),
1589
1589
  F(he, {
1590
- modelValue: w.value,
1591
- "onUpdate:modelValue": f[1] || (f[1] = (M) => w.value = M)
1590
+ modelValue: y.value,
1591
+ "onUpdate:modelValue": f[1] || (f[1] = (M) => y.value = M)
1592
1592
  }, null, 8, ["modelValue"]),
1593
1593
  F(P, {
1594
1594
  type: "primary",
1595
- onClick: R
1595
+ onClick: D
1596
1596
  }, {
1597
1597
  default: p(() => f[5] || (f[5] = [
1598
1598
  q("Add Comment", -1)
@@ -1602,12 +1602,12 @@ const zo = Object.assign(Fe, {
1602
1602
  })
1603
1603
  ])
1604
1604
  ])) : se("", !0),
1605
- D.value.length ? (u(), L(W, { key: 3 }, {
1605
+ R.value.length ? (u(), L(W, { key: 3 }, {
1606
1606
  header: p(() => f[7] || (f[7] = [
1607
1607
  q(" Comments History ", -1)
1608
1608
  ])),
1609
1609
  default: p(() => [
1610
- (u(!0), V(K, null, z(D.value, (M) => (u(), L(Q, {
1610
+ (u(!0), V(K, null, z(R.value, (M) => (u(), L(Q, {
1611
1611
  key: M.associator
1612
1612
  }, {
1613
1613
  default: p(() => [
@@ -1631,7 +1631,7 @@ const zo = Object.assign(Fe, {
1631
1631
  T("div", on, [
1632
1632
  ue(b.$slots, "action", {}, void 0, !0),
1633
1633
  T("div", nn, [
1634
- (u(!0), V(K, null, z(h.value, (M) => (u(), L(ye, {
1634
+ (u(!0), V(K, null, z(h.value, (M) => (u(), L(we, {
1635
1635
  key: M.Title,
1636
1636
  loading: x.value,
1637
1637
  config: M,
@@ -1651,7 +1651,7 @@ const zo = Object.assign(Fe, {
1651
1651
  className: {}
1652
1652
  },
1653
1653
  setup(e) {
1654
- const t = xe(), a = Se(), o = Ve(), n = be(), c = e, r = g(), l = Me({
1654
+ const t = xe(), a = Se(), o = Ve(), n = be(), c = e, r = g(), i = Me({
1655
1655
  current: 1,
1656
1656
  total: 0,
1657
1657
  pageSize: 10,
@@ -1661,30 +1661,30 @@ const zo = Object.assign(Fe, {
1661
1661
  filters: []
1662
1662
  });
1663
1663
  function s() {
1664
- const y = Object.entries(A.value).filter(([, { value: I }]) => I && I !== "").map(([I, { value: R, operator: b }]) => ({
1664
+ const w = Object.entries(A.value).filter(([, { value: I }]) => I && I !== "").map(([I, { value: D, operator: b }]) => ({
1665
1665
  key: I,
1666
- value: R,
1666
+ value: D,
1667
1667
  operator: b
1668
1668
  // 根据实际需要调整操作符
1669
1669
  }));
1670
1670
  return {
1671
- pageNumber: l.current,
1672
- pageSize: l.pageSize,
1673
- filters: [...l.filters, ...y],
1671
+ pageNumber: i.current,
1672
+ pageSize: i.pageSize,
1673
+ filters: [...i.filters, ...w],
1674
1674
  sorts: [{
1675
1675
  key: "status",
1676
1676
  type: 0
1677
1677
  }]
1678
1678
  };
1679
1679
  }
1680
- const i = X(() => ({
1680
+ const l = X(() => ({
1681
1681
  x: h.value.length * 150 + 250
1682
1682
  // 只设置横向滚动
1683
1683
  // 移除 y 属性,让表格高度自适应
1684
- })), _ = (y) => {
1685
- const I = Object.entries(y).filter(([, R]) => R.widget?.column).map(([R, b], f) => ({
1684
+ })), _ = (w) => {
1685
+ const I = Object.entries(w).filter(([, D]) => D.widget?.column).map(([D, b], f) => ({
1686
1686
  title: b.widget.title,
1687
- dataIndex: R.charAt(0).toLowerCase() + R.slice(1),
1687
+ dataIndex: D.charAt(0).toLowerCase() + D.slice(1),
1688
1688
  order: b.order,
1689
1689
  ellipsis: !0,
1690
1690
  tooltip: !0,
@@ -1693,7 +1693,7 @@ const zo = Object.assign(Fe, {
1693
1693
  // 启用最小宽度
1694
1694
  resizable: !0
1695
1695
  // 启用列宽调整
1696
- })).sort((R, b) => R.order - b.order);
1696
+ })).sort((D, b) => D.order - b.order);
1697
1697
  I.push({
1698
1698
  title: "Actions",
1699
1699
  slotName: "optional",
@@ -1705,76 +1705,76 @@ const zo = Object.assign(Fe, {
1705
1705
  }), h.value = I;
1706
1706
  }, d = g([]), h = g([]), x = g(!0), m = g(!0), k = g(), E = async () => {
1707
1707
  m.value = !0;
1708
- const y = await Vt(c.className, s());
1709
- d.value = y.data, console.log("🚀 ~ loadData ~ _data.value:", d.value), l.total = y.totalCount, m.value = !1;
1708
+ const w = await Vt(c.className, s());
1709
+ d.value = w.data, console.log("🚀 ~ loadData ~ _data.value:", d.value), i.total = w.totalCount, m.value = !1;
1710
1710
  }, ee = g(!1);
1711
1711
  de(async () => {
1712
1712
  x.value = !0, r.value = await Ce(3, c.className, {
1713
1713
  svrStore: t,
1714
1714
  bpmStore: a
1715
- }), _(r.value.fields), D(r.value.fields), te(), v(r.value?.tabs?.[0]?.key || ""), k.value = r.value.actions, x.value = !1, ee.value = !0;
1715
+ }), _(r.value.fields), R(r.value.fields), te(), v(r.value?.tabs?.[0]?.key || ""), k.value = r.value.actions, x.value = !1, ee.value = !0;
1716
1716
  }), ct(() => {
1717
1717
  ee.value && E();
1718
1718
  });
1719
- const oe = (y) => {
1720
- l.current = y, E();
1721
- }, ne = (y) => {
1722
- l.pageSize = y, E();
1719
+ const oe = (w) => {
1720
+ i.current = w, E();
1721
+ }, ne = (w) => {
1722
+ i.pageSize = w, E();
1723
1723
  };
1724
- function le(y, I, R, b, f) {
1725
- switch (y) {
1724
+ function le(w, I, D, b, f) {
1725
+ switch (w) {
1726
1726
  case Z.Link:
1727
- o.push({ name: R, params: { workflowId: f } });
1727
+ o.push({ name: D, params: { workflowId: f } });
1728
1728
  break;
1729
1729
  default:
1730
- console.warn("Unknown action type:", y);
1730
+ console.warn("Unknown action type:", w);
1731
1731
  }
1732
1732
  }
1733
- function B(y, I, R) {
1734
- switch (y) {
1733
+ function B(w, I, D) {
1734
+ switch (w) {
1735
1735
  case Z.Submit:
1736
1736
  Kt(I, { filters: [{ key: "approverList", value: $(), operator: 2 }] }), n?.appContext.config.globalProperties.$notification.success("submit success!");
1737
1737
  break;
1738
1738
  case Z.Link:
1739
- o.push({ name: R });
1739
+ o.push({ name: D });
1740
1740
  break;
1741
1741
  default:
1742
- console.warn("Unknown action type:", y);
1742
+ console.warn("Unknown action type:", w);
1743
1743
  }
1744
1744
  }
1745
1745
  function $() {
1746
1746
  return t()?.userInfo?.email_address ?? "";
1747
1747
  }
1748
- function U(y, I) {
1749
- return typeof y != "string" || y.indexOf("{currentUserEmail}") === -1 ? y : y.replace(/{currentUserEmail}/g, I);
1748
+ function U(w, I) {
1749
+ return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g, I);
1750
1750
  }
1751
- function v(y) {
1752
- const I = r.value?.tabs?.find((R) => R.key === y)?.filters;
1753
- l.filters = I?.map((R) => ({
1754
- ...R,
1755
- value: U(R.value, $())
1751
+ function v(w) {
1752
+ const I = r.value?.tabs?.find((D) => D.key === w)?.filters;
1753
+ i.filters = I?.map((D) => ({
1754
+ ...D,
1755
+ value: U(D.value, $())
1756
1756
  })) || [], E();
1757
1757
  }
1758
- const A = g({}), w = g([]);
1759
- function D(y) {
1760
- if (!y) return [];
1761
- w.value = Object.entries(y).filter(([, I]) => I.isFiltered).map(([I, R]) => ({ fieldKey: I, fieldConfig: R }));
1758
+ const A = g({}), y = g([]);
1759
+ function R(w) {
1760
+ if (!w) return [];
1761
+ y.value = Object.entries(w).filter(([, I]) => I.isFiltered).map(([I, D]) => ({ fieldKey: I, fieldConfig: D }));
1762
1762
  }
1763
1763
  const te = () => {
1764
- const y = {};
1765
- w.value.forEach(({ fieldKey: I, fieldConfig: R }) => {
1766
- y[I] = {}, y[I].value = R.modelValue, y[I].operator = R.operator;
1767
- }), A.value = y;
1764
+ const w = {};
1765
+ y.value.forEach(({ fieldKey: I, fieldConfig: D }) => {
1766
+ w[I] = {}, w[I].value = D.modelValue, w[I].operator = D.operator;
1767
+ }), A.value = w;
1768
1768
  }, ae = () => {
1769
- l.current = 1, E();
1769
+ i.current = 1, E();
1770
1770
  }, fe = () => {
1771
1771
  r.value && te(), ae();
1772
1772
  };
1773
- function Ae(y, I) {
1774
- return !(y.location !== "InTable" || y.title === "Update" && (I.status === 100 || I.status === -1));
1773
+ function Ae(w, I) {
1774
+ return !(w.location !== "InTable" || w.title === "Update" && (I.status === 100 || I.status === -1));
1775
1775
  }
1776
- return (y, I) => {
1777
- const R = S("a-space"), b = S("a-col"), f = S("a-button"), H = S("a-row"), C = S("a-card"), Y = S("a-tab-pane"), N = S("a-tabs"), ie = S("a-table");
1776
+ return (w, I) => {
1777
+ const D = S("a-space"), b = S("a-col"), f = S("a-button"), H = S("a-row"), C = S("a-card"), Y = S("a-tab-pane"), N = S("a-tabs"), ie = S("a-table");
1778
1778
  return u(), V("div", rn, [
1779
1779
  F($e, {
1780
1780
  title: r.value?.banner.title ?? "",
@@ -1785,12 +1785,12 @@ const zo = Object.assign(Fe, {
1785
1785
  default: p(() => [
1786
1786
  T("div", ln, [
1787
1787
  I[0] || (I[0] = T("h3", null, "Search Conditions", -1)),
1788
- F(R, { size: "medium" }, {
1788
+ F(D, { size: "medium" }, {
1789
1789
  default: p(() => [
1790
1790
  (u(!0), V(K, null, z(k.value, (P) => (u(), V(K, {
1791
1791
  key: P.title
1792
1792
  }, [
1793
- P.location === "InOperation" ? (u(), L(ye, {
1793
+ P.location === "InOperation" ? (u(), L(we, {
1794
1794
  key: 0,
1795
1795
  config: P,
1796
1796
  onClick: B
@@ -1802,7 +1802,7 @@ const zo = Object.assign(Fe, {
1802
1802
  ]),
1803
1803
  F(H, { gutter: [24, 20] }, {
1804
1804
  default: p(() => [
1805
- (u(!0), V(K, null, z(w.value, (P) => (u(), L(b, {
1805
+ (u(!0), V(K, null, z(y.value, (P) => (u(), L(b, {
1806
1806
  key: P.fieldKey,
1807
1807
  span: 6,
1808
1808
  class: "search-col"
@@ -1823,7 +1823,7 @@ const zo = Object.assign(Fe, {
1823
1823
  class: "search-col form-buttons"
1824
1824
  }, {
1825
1825
  default: p(() => [
1826
- F(R, { size: "medium" }, {
1826
+ F(D, { size: "medium" }, {
1827
1827
  default: p(() => [
1828
1828
  F(f, {
1829
1829
  type: "primary",
@@ -1876,27 +1876,27 @@ const zo = Object.assign(Fe, {
1876
1876
  stripe: "",
1877
1877
  border: "",
1878
1878
  pagination: {
1879
- current: l.current,
1880
- total: l.total,
1881
- pageSize: l.pageSize,
1882
- showTotal: l.showTotal,
1883
- showPageSize: l.showPageSize,
1879
+ current: i.current,
1880
+ total: i.total,
1881
+ pageSize: i.pageSize,
1882
+ showTotal: i.showTotal,
1883
+ showPageSize: i.showPageSize,
1884
1884
  showJumper: !0,
1885
1885
  pageSizeOptions: [10, 20, 50, 100]
1886
1886
  },
1887
1887
  loading: m.value,
1888
1888
  size: "medium",
1889
- scroll: i.value,
1889
+ scroll: l.value,
1890
1890
  onPageChange: oe,
1891
1891
  onPageSizeChange: ne
1892
1892
  }, {
1893
1893
  optional: p(({ record: P }) => [
1894
- F(R, { size: "small" }, {
1894
+ F(D, { size: "small" }, {
1895
1895
  default: p(() => [
1896
1896
  (u(!0), V(K, null, z(k.value, (Q) => (u(), V(K, {
1897
1897
  key: Q.title
1898
1898
  }, [
1899
- Ae(Q, P) ? (u(), L(ye, {
1899
+ Ae(Q, P) ? (u(), L(we, {
1900
1900
  key: 0,
1901
1901
  config: Q,
1902
1902
  size: "small",
@@ -1914,7 +1914,7 @@ const zo = Object.assign(Fe, {
1914
1914
  }
1915
1915
  }), un = /* @__PURE__ */ ve(cn, [["__scopeId", "data-v-a83216cf"]]), vn = {
1916
1916
  install(e, t = {}) {
1917
- t.config && yt(t.config), t.router && e.provide(et, t.router), t.pinia && e.provide(to, t.pinia), t.useBpmStore && e.provide(ot, t.useBpmStore), t.useSvrStore && e.provide(nt, t.useSvrStore), t.triggers && e.provide(tt, t.triggers), t.customComps && e.provide(at, t.customComps), e.component("CreateView", bo), e.component("UpdateView", Uo), e.component("DetailView", sn), e.component("ListView", un);
1917
+ t.config && wt(t.config), t.router && e.provide(et, t.router), t.pinia && e.provide(to, t.pinia), t.useBpmStore && e.provide(ot, t.useBpmStore), t.useSvrStore && e.provide(nt, t.useSvrStore), t.triggers && e.provide(tt, t.triggers), t.customComps && e.provide(at, t.customComps), e.component("CreateView", bo), e.component("UpdateView", Uo), e.component("DetailView", sn), e.component("ListView", un);
1918
1918
  }
1919
1919
  };
1920
1920
  export {