@chase-shao/vue-component-lib 1.2.76 → 1.2.77

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 _, getCurrentInstance as pe, defineComponent as G, mergeModels as ie, useModel as ye, resolveComponent as S, createBlock as U, openBlock as d, onMounted as de, computed as ee, withCtx as v, createElementBlock as C, Fragment as j, renderList as E, createVNode as P, nextTick as ot, createTextVNode as X, useTemplateRef as Ne, createElementVNode as V, createCommentVNode as se, toDisplayString as Z, resolveDynamicComponent as He, renderSlot as ce, inject as me, reactive as Le, normalizeStyle as at, normalizeClass as rt, onActivated as st } from "vue";
1
+ import { ref as _, getCurrentInstance as pe, defineComponent as q, mergeModels as ie, useModel as ye, resolveComponent as x, createBlock as U, openBlock as d, onMounted as ce, computed as te, withCtx as v, createElementBlock as S, Fragment as j, renderList as K, createVNode as P, nextTick as ot, createTextVNode as Q, useTemplateRef as Ne, createElementVNode as V, createCommentVNode as se, toDisplayString as ee, resolveDynamicComponent as He, renderSlot as le, inject as me, reactive as Le, normalizeStyle as at, normalizeClass as rt, onActivated as st } from "vue";
2
2
  import it from "axios";
3
3
  import { defineStore as lt } from "pinia";
4
4
  import { Modal as ct } from "@arco-design/web-vue";
@@ -52,12 +52,12 @@ let De = {};
52
52
  function gt(t) {
53
53
  De = { ...De, ...t };
54
54
  }
55
- function Re() {
55
+ function Fe() {
56
56
  return De;
57
57
  }
58
58
  const _t = pe();
59
59
  function Ge() {
60
- const t = Re();
60
+ const t = Fe();
61
61
  return {
62
62
  apiBase: t.apiBase || void 0 || "",
63
63
  appSecret: t.appSecret || void 0 || ""
@@ -97,7 +97,7 @@ const qe = async () => {
97
97
  e.token = void 0;
98
98
  }, (o.data?.expireSeconds ?? 3600) * 1e3), o?.data?.token;
99
99
  });
100
- }, $ = async () => {
100
+ }, z = async () => {
101
101
  const t = await qe(), n = We();
102
102
  return n.defaults.headers.common.Authorization = `Bearer ${t}`, n;
103
103
  }, Ie = {
@@ -107,11 +107,11 @@ const qe = async () => {
107
107
  ApproverEmail: (t) => t.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
108
108
  ApproverPositionCode: (t) => t.bpmStore()?.positionCode ?? 999,
109
109
  RejectReason: () => "Test Reject Reason"
110
- }, z = [];
110
+ }, W = [];
111
111
  for (let t = 0; t < 256; ++t)
112
- z.push((t + 256).toString(16).slice(1));
112
+ W.push((t + 256).toString(16).slice(1));
113
113
  function bt(t, n = 0) {
114
- return (z[t[n + 0]] + z[t[n + 1]] + z[t[n + 2]] + z[t[n + 3]] + "-" + z[t[n + 4]] + z[t[n + 5]] + "-" + z[t[n + 6]] + z[t[n + 7]] + "-" + z[t[n + 8]] + z[t[n + 9]] + "-" + z[t[n + 10]] + z[t[n + 11]] + z[t[n + 12]] + z[t[n + 13]] + z[t[n + 14]] + z[t[n + 15]]).toLowerCase();
114
+ return (W[t[n + 0]] + W[t[n + 1]] + W[t[n + 2]] + W[t[n + 3]] + "-" + W[t[n + 4]] + W[t[n + 5]] + "-" + W[t[n + 6]] + W[t[n + 7]] + "-" + W[t[n + 8]] + W[t[n + 9]] + "-" + W[t[n + 10]] + W[t[n + 11]] + W[t[n + 12]] + W[t[n + 13]] + W[t[n + 14]] + W[t[n + 15]]).toLowerCase();
115
115
  }
116
116
  let Te;
117
117
  const yt = new Uint8Array(16);
@@ -133,7 +133,7 @@ function Ye(t, n, a) {
133
133
  throw new Error("Random bytes length must be >= 16");
134
134
  return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, bt(e);
135
135
  }
136
- var te = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t))(te || {}), fe = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t))(fe || {});
136
+ var ne = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t))(ne || {}), fe = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t))(fe || {});
137
137
  function kt(t, n, a) {
138
138
  const e = {
139
139
  pageType: "",
@@ -171,13 +171,13 @@ function kt(t, n, a) {
171
171
  redirectUrl: o.redirectUrl,
172
172
  redirectType: o.redirectType,
173
173
  title: o.title,
174
- widget: o.widget === "Link" ? te.Link : te.Submit,
174
+ widget: o.widget === "Link" ? ne.Link : ne.Submit,
175
175
  location: o.location,
176
176
  attributeType: o.attributeType,
177
177
  readonly: o.readonly,
178
178
  eventName: o.eventName
179
179
  });
180
- } else o.attributeType === "Banner" && (e.banner.title = o.title, e.banner.subTitle = n === 0 ? o.subTitle : Be(o.subTitle, t.workflowId.propertyValue));
180
+ } else o.attributeType === "Banner" && (e.banner.title = o.title, e.banner.subTitle = n === 0 ? o.subTitle : Re(o.subTitle, t.workflowId.propertyValue));
181
181
  }), e.tabs && (e.tabs = e.tabs.sort((o, l) => o.order - l.order)), Object.entries(t).forEach(([o, l]) => {
182
182
  if (o === "__ClassAttributes" || o === "className" || o === "id" || o === "deleteFlag" || o === "status" || o === "workFlowReason" || n !== 3 && o === "workflowId")
183
183
  return;
@@ -214,11 +214,11 @@ function kt(t, n, a) {
214
214
  }), e;
215
215
  }
216
216
  const ke = async (t, n, a, e) => {
217
- const l = await (await $()).get(`/General/${n}/${t}/page`, { params: e });
217
+ const l = await (await z()).get(`/General/${n}/${t}/page`, { params: e });
218
218
  return kt(l?.data, t, a);
219
- }, Je = async (t, n, a) => (await (await $()).post(`/${n}/${t}/button/List`, null, { params: a }))?.data;
219
+ }, Je = async (t, n, a) => (await (await z()).post(`/${n}/${t}/button/List`, null, { params: a }))?.data;
220
220
  async function Ct(t, n) {
221
- const e = await (await $()).post(`/General/${t}/list`, n);
221
+ const e = await (await z()).post(`/General/${t}/list`, n);
222
222
  return {
223
223
  data: e.data.data,
224
224
  totalCount: e.data.totalCount
@@ -238,17 +238,17 @@ async function Ct(t, n) {
238
238
  };
239
239
  }
240
240
  async function St(t, n, a) {
241
- return (await (await $()).post(a, n, {
241
+ return (await (await z()).post(a, n, {
242
242
  params: {
243
243
  className: t
244
244
  }
245
245
  })).data;
246
246
  }
247
247
  async function xt(t, n, a, e) {
248
- const o = await $(), l = Be(e, n);
248
+ const o = await z(), l = Re(e, n);
249
249
  return (await o.put(l, a))?.data;
250
250
  }
251
- function Be(t, n) {
251
+ function Re(t, n) {
252
252
  return t.replace(/{WorkflowId}/g, n);
253
253
  }
254
254
  function Vt(t, n) {
@@ -267,19 +267,19 @@ function Ut(t, n) {
267
267
  return t.replace(/{ClassName}/g, encodeURIComponent(n));
268
268
  }
269
269
  async function Pt(t, n, a, e, o, l, s, c) {
270
- const i = await $();
271
- let r = Be(l, n);
270
+ const i = await z();
271
+ let r = Re(l, n);
272
272
  return r = Vt(r, a), r = At(r, e), r = It(r, s), r = Tt(r, c), r = Ut(r, t), (await i.put(r, o))?.data;
273
273
  }
274
274
  async function Dt(t, n) {
275
- const o = (await (await $()).get(t, { params: { value: n } }))?.data;
275
+ const o = (await (await z()).get(t, { params: { value: n } }))?.data;
276
276
  return Object.entries(o).map(([l, s]) => ({
277
277
  value: l,
278
278
  label: s
279
279
  }));
280
280
  }
281
281
  async function Nt(t, n) {
282
- return (await (await $()).get(`/General/${t}/${n}/process`))?.data;
282
+ return (await (await z()).get(`/General/${t}/${n}/process`))?.data;
283
283
  }
284
284
  function Ht(t) {
285
285
  return {
@@ -289,40 +289,40 @@ function Ht(t) {
289
289
  };
290
290
  }
291
291
  async function Xe(t, n) {
292
- return (await (await $()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
292
+ return (await (await z()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
293
293
  const { category: c } = s;
294
294
  return l[c] || (l[c] = []), l[c].push(Ht(s)), l;
295
295
  }, {});
296
296
  }
297
297
  async function Lt(t, n) {
298
- return (await $()).post(`/General/${t}/${n}/delete/attachment`);
298
+ return (await z()).post(`/General/${t}/${n}/delete/attachment`);
299
299
  }
300
- async function Rt() {
301
- const n = await (await $()).get("/Grading/dropdown/approvers");
300
+ async function Ft() {
301
+ const n = await (await z()).get("/Grading/dropdown/approvers");
302
302
  return Object.entries(n?.data).map(([a, e]) => ({
303
303
  label: a,
304
304
  value: e
305
305
  }));
306
306
  }
307
- async function Bt(t, n) {
308
- return await (await $()).post(`Grading/AssignComments/${t}/${encodeURIComponent(n)}`);
307
+ async function Rt(t, n) {
308
+ return await (await z()).post(`Grading/AssignComments/${t}/${encodeURIComponent(n)}`);
309
309
  }
310
- async function Ft(t, n, a) {
311
- return await (await $()).post(`Grading/AddComments/${t}/${encodeURIComponent(n)}`, a, {
310
+ async function Bt(t, n, a) {
311
+ return await (await z()).post(`Grading/AddComments/${t}/${encodeURIComponent(n)}`, a, {
312
312
  headers: { "Content-Type": "application/json;charset=UTF-8" }
313
313
  });
314
314
  }
315
315
  async function $e(t) {
316
- return (await (await $()).get(`Grading/GetComments/${t}`))?.data;
316
+ return (await (await z()).get(`Grading/GetComments/${t}`))?.data;
317
317
  }
318
318
  async function Ue(t) {
319
- return (await (await $()).get(`Grading/GetAssociator/${t}`))?.data;
319
+ return (await (await z()).get(`Grading/GetAssociator/${t}`))?.data;
320
320
  }
321
321
  async function jt(t) {
322
- return await (await $()).delete(`Grading/DeleteAssociator/${t}`);
322
+ return await (await z()).delete(`Grading/DeleteAssociator/${t}`);
323
323
  }
324
324
  async function Mt(t, n = null) {
325
- const e = await (await $()).post(t, n, {
325
+ const e = await (await z()).post(t, n, {
326
326
  responseType: "blob"
327
327
  });
328
328
  mt(e?.data, "WorkflowData.xlsx");
@@ -339,7 +339,7 @@ const ge = (t, n) => {
339
339
  }, Et = {
340
340
  Regex: (t, n) => new RegExp(t).test(n),
341
341
  Required: (t, n) => !!n
342
- }, $t = /* @__PURE__ */ G({
342
+ }, $t = /* @__PURE__ */ q({
343
343
  __name: "InputText",
344
344
  props: /* @__PURE__ */ ie({
345
345
  fieldKey: {},
@@ -371,14 +371,14 @@ const ge = (t, n) => {
371
371
  const r = { props: e, emits: o, model: l, validate: s, inputHandler: c, changeHandler: i };
372
372
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
373
373
  }
374
- }), Q = (t, n) => {
374
+ }), Z = (t, n) => {
375
375
  const a = t.__vccOpts || t;
376
376
  for (const [e, o] of n)
377
377
  a[e] = o;
378
378
  return a;
379
379
  };
380
380
  function Kt(t, n, a, e, o, l) {
381
- const s = S("AInput");
381
+ const s = x("AInput");
382
382
  return d(), U(s, {
383
383
  modelValue: e.model,
384
384
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
@@ -388,7 +388,7 @@ function Kt(t, n, a, e, o, l) {
388
388
  onChange: e.changeHandler
389
389
  }, null, 8, ["modelValue", "disabled"]);
390
390
  }
391
- const Ke = /* @__PURE__ */ Q($t, [["render", Kt], ["__file", "InputText.vue"]]), zt = /* @__PURE__ */ G({
391
+ const Ke = /* @__PURE__ */ Z($t, [["render", Kt], ["__file", "InputText.vue"]]), zt = /* @__PURE__ */ q({
392
392
  __name: "InputNumber",
393
393
  props: /* @__PURE__ */ ie({
394
394
  fieldKey: {},
@@ -404,7 +404,7 @@ const Ke = /* @__PURE__ */ Q($t, [["render", Kt], ["__file", "InputText.vue"]]),
404
404
  emits: /* @__PURE__ */ ie(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
405
405
  setup(t, { expose: n, emit: a }) {
406
406
  const e = t, o = a, l = ye(t, "modelValue"), s = _(100), c = _(1);
407
- de(() => {
407
+ ce(() => {
408
408
  e.validations && e.validations.forEach((g) => {
409
409
  g.ruleName === "Max" && (s.value = g.ruleParameter), g.ruleName === "Min" && (c.value = g.ruleParameter);
410
410
  });
@@ -428,7 +428,7 @@ const Ke = /* @__PURE__ */ Q($t, [["render", Kt], ["__file", "InputText.vue"]]),
428
428
  }
429
429
  });
430
430
  function Gt(t, n, a, e, o, l) {
431
- const s = S("AInputNumber");
431
+ const s = x("AInputNumber");
432
432
  return d(), U(s, {
433
433
  modelValue: e.model,
434
434
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
@@ -439,7 +439,7 @@ function Gt(t, n, a, e, o, l) {
439
439
  onChange: e.changeHandler
440
440
  }, null, 8, ["modelValue", "disabled", "min"]);
441
441
  }
442
- const Wt = /* @__PURE__ */ Q(zt, [["render", Gt], ["__file", "InputNumber.vue"]]), qt = /* @__PURE__ */ G({
442
+ const Wt = /* @__PURE__ */ Z(zt, [["render", Gt], ["__file", "InputNumber.vue"]]), qt = /* @__PURE__ */ q({
443
443
  __name: "SelectList",
444
444
  props: /* @__PURE__ */ ie({
445
445
  fieldKey: {},
@@ -454,7 +454,7 @@ const Wt = /* @__PURE__ */ Q(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
454
454
  }),
455
455
  emits: /* @__PURE__ */ ie(["update:modelValue", "change"], ["update:modelValue"]),
456
456
  setup(t, { expose: n, emit: a }) {
457
- const e = t, o = a, l = _(!1), s = _(e.config.options ?? []), c = ye(t, "modelValue"), i = (b) => ge(e.validations, b), r = ee(() => {
457
+ const e = t, o = a, l = _(!1), s = _(e.config.options ?? []), c = ye(t, "modelValue"), i = (b) => ge(e.validations, b), r = te(() => {
458
458
  const b = {};
459
459
  return e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
460
460
  b[p.event] = (y) => {
@@ -466,7 +466,7 @@ const Wt = /* @__PURE__ */ Q(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
466
466
  }), u = async () => {
467
467
  e.config.dataSourceProvider && (s.value = await Dt(e.config.dataSourceProvider));
468
468
  };
469
- de(u);
469
+ ce(u);
470
470
  const m = (b) => {
471
471
  o("update:modelValue", b);
472
472
  const p = i(b);
@@ -485,7 +485,7 @@ const Wt = /* @__PURE__ */ Q(zt, [["render", Gt], ["__file", "InputNumber.vue"]]
485
485
  }
486
486
  });
487
487
  function Yt(t, n, a, e, o, l) {
488
- const s = S("AOption"), c = S("ASelect");
488
+ const s = x("AOption"), c = x("ASelect");
489
489
  return d(), U(c, {
490
490
  "allow-clear": "",
491
491
  modelValue: e.model,
@@ -497,7 +497,7 @@ function Yt(t, n, a, e, o, l) {
497
497
  onChange: e.changeHandler
498
498
  }, {
499
499
  default: v(() => [
500
- (d(!0), C(j, null, E(e._options, (i) => (d(), U(s, {
500
+ (d(!0), S(j, null, K(e._options, (i) => (d(), U(s, {
501
501
  key: i.value,
502
502
  value: i.value,
503
503
  label: i.label
@@ -506,7 +506,7 @@ function Yt(t, n, a, e, o, l) {
506
506
  _: 1
507
507
  }, 8, ["modelValue", "loading", "disabled"]);
508
508
  }
509
- const ze = /* @__PURE__ */ Q(qt, [["render", Yt], ["__file", "SelectList.vue"]]), Jt = /* @__PURE__ */ G({
509
+ const ze = /* @__PURE__ */ Z(qt, [["render", Yt], ["__file", "SelectList.vue"]]), Jt = /* @__PURE__ */ q({
510
510
  __name: "Cascader",
511
511
  props: {
512
512
  modelValue: {},
@@ -517,11 +517,11 @@ const ze = /* @__PURE__ */ Q(qt, [["render", Yt], ["__file", "SelectList.vue"]])
517
517
  const e = t, o = a, l = _(e.config.options ?? []), s = (r) => {
518
518
  o("update:modelValue", r), o("change", r);
519
519
  };
520
- de(async () => {
520
+ ce(async () => {
521
521
  if (e.config) {
522
522
  const r = e.config.dataSourceProvider;
523
523
  if (r) {
524
- const m = await (await $()).get(r);
524
+ const m = await (await z()).get(r);
525
525
  l.value = m.data;
526
526
  }
527
527
  }
@@ -537,7 +537,7 @@ const ze = /* @__PURE__ */ Q(qt, [["render", Yt], ["__file", "SelectList.vue"]])
537
537
  }
538
538
  });
539
539
  function Xt(t, n, a, e, o, l) {
540
- const s = S("ACascader"), c = S("ASpace");
540
+ const s = x("ACascader"), c = x("ASpace");
541
541
  return d(), U(c, {
542
542
  direction: "vertical",
543
543
  size: "large"
@@ -555,7 +555,7 @@ function Xt(t, n, a, e, o, l) {
555
555
  _: 1
556
556
  });
557
557
  }
558
- const Qt = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "Cascader.vue"]]), Zt = /* @__PURE__ */ G({
558
+ const Qt = /* @__PURE__ */ Z(Jt, [["render", Xt], ["__file", "Cascader.vue"]]), Zt = /* @__PURE__ */ q({
559
559
  __name: "FileUpload",
560
560
  props: {
561
561
  className: {},
@@ -569,17 +569,17 @@ const Qt = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "Cascader.vue"]]),
569
569
  emits: ["update:modelValue", "change", "error", "input"],
570
570
  setup(t, { expose: n, emit: a }) {
571
571
  const e = t, o = a, l = _({});
572
- de(async () => {
572
+ ce(async () => {
573
573
  const h = await qe();
574
574
  l.value = {
575
575
  Authorization: `Bearer ${h}`
576
576
  };
577
577
  });
578
- const s = (h) => ge(e.validations, h), c = Re(), i = c.apiBase, r = _(null), u = _("");
579
- function m(h, K, Y) {
580
- return h.replace(/{WorkflowId}/g, K).replace(/{ClassName}/g, Y);
578
+ const s = (h) => ge(e.validations, h), c = Fe(), i = c.apiBase, r = _(null), u = _("");
579
+ function m(h, M, X) {
580
+ return h.replace(/{WorkflowId}/g, M).replace(/{ClassName}/g, X);
581
581
  }
582
- const g = ee(() => {
582
+ const g = te(() => {
583
583
  if (e.config.uploadURL) {
584
584
  const h = i + e.config.uploadURL;
585
585
  return m(h, u.value, e.className);
@@ -589,31 +589,38 @@ const Qt = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "Cascader.vue"]]),
589
589
  h.stopPropagation(), r.value.submit();
590
590
  };
591
591
  function p(h) {
592
- const { file: K, name: Y } = h, F = Y ?? K.name;
593
- return new Promise((A, x) => {
592
+ const { file: M, name: X } = h, R = X ?? M.name;
593
+ return new Promise((A, k) => {
594
594
  ct.confirm({
595
595
  title: "Confirm Delete",
596
- content: `Are you sure you want to delete ${F}?`,
596
+ content: `Are you sure you want to delete ${R}?`,
597
597
  async onOk() {
598
598
  if (h.status !== "init" && e.config.removeFile)
599
599
  return await e.config.removeFile(h.uid), A(!0);
600
600
  A(!0);
601
601
  },
602
- onCancel: () => x("cancel")
602
+ onCancel: () => k("cancel")
603
603
  });
604
604
  });
605
605
  }
606
606
  const y = _(null), f = _(null), L = (h) => {
607
607
  y.value && (y.value(h), y.value = null, f.value = null);
608
- }, W = (h) => {
608
+ }, Y = (h) => {
609
609
  f.value && (f.value(h), y.value = null, f.value = null);
610
610
  };
611
611
  n({
612
612
  submit(h) {
613
- return new Promise((K, Y) => {
614
- r.value ? (e.config.uploadURL && (u.value = h), y.value = K, f.value = Y, ot(() => {
615
- r.value?.submit();
616
- })) : K(h);
613
+ return new Promise((M, X) => {
614
+ if (r.value) {
615
+ if (e.config.uploadURL && (u.value = h), !(r.value.fileList || []).some((k) => k.status === "init")) {
616
+ M(h);
617
+ return;
618
+ }
619
+ y.value = M, f.value = X, ot(() => {
620
+ r.value?.submit();
621
+ });
622
+ } else
623
+ M(h);
617
624
  });
618
625
  },
619
626
  validate() {
@@ -621,12 +628,12 @@ const Qt = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "Cascader.vue"]]),
621
628
  return o("error", h.res ? "" : h.errorMessages), h.res;
622
629
  }
623
630
  });
624
- const q = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: u, replaceIdAndClassName: m, action: g, submit: b, onBeforeRemove: p, uploadPromiseResolve: y, uploadPromiseReject: f, handleUploadSuccess: L, handleUploadError: W };
625
- return Object.defineProperty(q, "__isScriptSetup", { enumerable: !1, value: !0 }), q;
631
+ const J = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: u, replaceIdAndClassName: m, action: g, submit: b, onBeforeRemove: p, uploadPromiseResolve: y, uploadPromiseReject: f, handleUploadSuccess: L, handleUploadError: Y };
632
+ return Object.defineProperty(J, "__isScriptSetup", { enumerable: !1, value: !0 }), J;
626
633
  }
627
634
  });
628
635
  function en(t, n, a, e, o, l) {
629
- const s = S("a-button"), c = S("a-upload");
636
+ const s = x("a-button"), c = x("a-upload");
630
637
  return d(), U(c, {
631
638
  ref: "uploadRef",
632
639
  "default-file-list": e.props.config.files,
@@ -643,7 +650,7 @@ function en(t, n, a, e, o, l) {
643
650
  "upload-button": v(() => [
644
651
  P(s, { type: "primary" }, {
645
652
  default: v(() => n[1] || (n[1] = [
646
- X("Select File", -1)
653
+ Q("Select File", -1)
647
654
  ])),
648
655
  _: 1,
649
656
  __: [1]
@@ -652,7 +659,7 @@ function en(t, n, a, e, o, l) {
652
659
  _: 1
653
660
  }, 8, ["default-file-list", "action", "limit", "headers"]);
654
661
  }
655
- const tn = /* @__PURE__ */ Q(Zt, [["render", en], ["__file", "FileUpload.vue"]]), nn = /* @__PURE__ */ G({
662
+ const tn = /* @__PURE__ */ Z(Zt, [["render", en], ["__file", "FileUpload.vue"]]), nn = /* @__PURE__ */ q({
656
663
  __name: "TextArea",
657
664
  props: {
658
665
  fieldKey: {},
@@ -684,7 +691,7 @@ const tn = /* @__PURE__ */ Q(Zt, [["render", en], ["__file", "FileUpload.vue"]])
684
691
  }
685
692
  });
686
693
  function on(t, n, a, e, o, l) {
687
- const s = S("ATextarea");
694
+ const s = x("ATextarea");
688
695
  return d(), U(s, {
689
696
  "model-value": e.props.modelValue,
690
697
  placeholder: "Please enter something",
@@ -694,7 +701,7 @@ function on(t, n, a, e, o, l) {
694
701
  onChange: e.changeHandler
695
702
  }, null, 8, ["model-value", "disabled"]);
696
703
  }
697
- const an = /* @__PURE__ */ Q(nn, [["render", on], ["__file", "TextArea.vue"]]), rn = /* @__PURE__ */ G({
704
+ const an = /* @__PURE__ */ Z(nn, [["render", on], ["__file", "TextArea.vue"]]), rn = /* @__PURE__ */ q({
698
705
  __name: "CheckBox",
699
706
  props: /* @__PURE__ */ ie({
700
707
  fieldKey: {},
@@ -726,7 +733,7 @@ const an = /* @__PURE__ */ Q(nn, [["render", on], ["__file", "TextArea.vue"]]),
726
733
  }
727
734
  });
728
735
  function sn(t, n, a, e, o, l) {
729
- const s = S("ACheckbox");
736
+ const s = x("ACheckbox");
730
737
  return d(), U(s, {
731
738
  modelValue: e.model,
732
739
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
@@ -735,13 +742,13 @@ function sn(t, n, a, e, o, l) {
735
742
  onChange: e.changeHandler
736
743
  }, {
737
744
  default: v(() => n[1] || (n[1] = [
738
- X("Yes", -1)
745
+ Q("Yes", -1)
739
746
  ])),
740
747
  _: 1,
741
748
  __: [1]
742
749
  }, 8, ["modelValue", "disabled"]);
743
750
  }
744
- const ln = /* @__PURE__ */ Q(rn, [["render", sn], ["__file", "CheckBox.vue"]]), cn = /* @__PURE__ */ G({
751
+ const ln = /* @__PURE__ */ Z(rn, [["render", sn], ["__file", "CheckBox.vue"]]), cn = /* @__PURE__ */ q({
745
752
  __name: "index",
746
753
  props: /* @__PURE__ */ ie({
747
754
  config: {},
@@ -757,7 +764,7 @@ const ln = /* @__PURE__ */ Q(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
757
764
  }),
758
765
  emits: /* @__PURE__ */ ie(["update:modelValue", "change", "error"], ["update:modelValue"]),
759
766
  setup(t, { expose: n, emit: a }) {
760
- const e = t, o = a, l = ye(t, "modelValue"), s = Ne("widgetRef"), c = ee(() => {
767
+ const e = t, o = a, l = ye(t, "modelValue"), s = Ne("widgetRef"), c = te(() => {
761
768
  switch (e.config?.widget?.widget) {
762
769
  case "TextBox":
763
770
  return Ke;
@@ -811,10 +818,10 @@ const ln = /* @__PURE__ */ Q(rn, [["render", sn], ["__file", "CheckBox.vue"]]),
811
818
  class: "err-msg"
812
819
  };
813
820
  function pn(t, n, a, e, o, l) {
814
- return d(), C("div", null, [
821
+ return d(), S("div", null, [
815
822
  V("div", dn, [
816
- X(Z(e.props?.config?.widget?.title) + " ", 1),
817
- e.props.config.validations.length ? (d(), C("span", un, "*")) : se("", !0)
823
+ Q(ee(e.props?.config?.widget?.title) + " ", 1),
824
+ e.props.config.validations.length ? (d(), S("span", un, "*")) : se("", !0)
818
825
  ]),
819
826
  V("div", null, [
820
827
  (d(), U(He(e.curComp), {
@@ -829,11 +836,11 @@ function pn(t, n, a, e, o, l) {
829
836
  onError: e.errHandler,
830
837
  onChange: e.changeHandler
831
838
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
832
- e.errMsg.length > 0 ? (d(), C("div", fn, Z(e.errMsg), 1)) : se("", !0)
839
+ e.errMsg.length > 0 ? (d(), S("div", fn, ee(e.errMsg), 1)) : se("", !0)
833
840
  ])
834
841
  ]);
835
842
  }
836
- const Fe = /* @__PURE__ */ Q(cn, [["render", pn], ["__scopeId", "data-v-4bc9e33b"], ["__file", "index.vue"]]), mn = /* @__PURE__ */ G({
843
+ const Be = /* @__PURE__ */ Z(cn, [["render", pn], ["__scopeId", "data-v-4bc9e33b"], ["__file", "index.vue"]]), mn = /* @__PURE__ */ q({
837
844
  __name: "SubmitButton",
838
845
  props: {
839
846
  url: {},
@@ -852,19 +859,19 @@ const Fe = /* @__PURE__ */ Q(cn, [["render", pn], ["__scopeId", "data-v-4bc9e33b
852
859
  }
853
860
  });
854
861
  function gn(t, n, a, e, o, l) {
855
- const s = S("AButton");
862
+ const s = x("AButton");
856
863
  return d(), U(s, {
857
864
  loading: a.loading,
858
865
  type: "primary",
859
866
  onClick: e.clickHandler
860
867
  }, {
861
868
  default: v(() => [
862
- ce(t.$slots, "default")
869
+ le(t.$slots, "default")
863
870
  ]),
864
871
  _: 3
865
872
  }, 8, ["loading"]);
866
873
  }
867
- const _n = /* @__PURE__ */ Q(mn, [["render", gn], ["__file", "SubmitButton.vue"]]), vn = /* @__PURE__ */ G({
874
+ const _n = /* @__PURE__ */ Z(mn, [["render", gn], ["__file", "SubmitButton.vue"]]), vn = /* @__PURE__ */ q({
868
875
  __name: "DetailLink",
869
876
  props: {
870
877
  url: {},
@@ -883,15 +890,15 @@ const _n = /* @__PURE__ */ Q(mn, [["render", gn], ["__file", "SubmitButton.vue"]
883
890
  }
884
891
  });
885
892
  function bn(t, n, a, e, o, l) {
886
- const s = S("ALink");
893
+ const s = x("ALink");
887
894
  return d(), U(s, { onClick: e.clickHandler }, {
888
895
  default: v(() => [
889
- ce(t.$slots, "default")
896
+ le(t.$slots, "default")
890
897
  ]),
891
898
  _: 3
892
899
  });
893
900
  }
894
- const yn = /* @__PURE__ */ Q(vn, [["render", bn], ["__file", "DetailLink.vue"]]), wn = /* @__PURE__ */ G({
901
+ const yn = /* @__PURE__ */ Z(vn, [["render", bn], ["__file", "DetailLink.vue"]]), wn = /* @__PURE__ */ q({
895
902
  __name: "index",
896
903
  props: {
897
904
  config: {},
@@ -904,7 +911,7 @@ const yn = /* @__PURE__ */ Q(vn, [["render", bn], ["__file", "DetailLink.vue"]])
904
911
  function l(u, m) {
905
912
  o("click", e.config.widget, u, m, e.config.title);
906
913
  }
907
- const s = ee(() => {
914
+ const s = te(() => {
908
915
  switch (e.config.location) {
909
916
  case "InOperation":
910
917
  return _n;
@@ -912,7 +919,7 @@ const yn = /* @__PURE__ */ Q(vn, [["render", bn], ["__file", "DetailLink.vue"]])
912
919
  default:
913
920
  return yn;
914
921
  }
915
- }), c = ee(() => e.config.widget === te.Submit ? e.config.requestUrl ?? "" : e.config.widget === te.Link ? e.config.redirectUrl ?? "" : ""), i = ee(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
922
+ }), c = te(() => e.config.widget === ne.Submit ? e.config.requestUrl ?? "" : e.config.widget === ne.Link ? e.config.redirectUrl ?? "" : ""), i = te(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
916
923
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
917
924
  }
918
925
  });
@@ -924,12 +931,12 @@ function hn(t, n, a, e, o, l) {
924
931
  onClick: e.clickHandler
925
932
  }, {
926
933
  default: v(() => [
927
- X(Z(e.props.config.title), 1)
934
+ Q(ee(e.props.config.title), 1)
928
935
  ]),
929
936
  _: 1
930
937
  }, 8, ["url", "redirect-type", "loading"]);
931
938
  }
932
- const Ce = /* @__PURE__ */ Q(wn, [["render", hn], ["__file", "index.vue"]]), Qe = Symbol("library-router");
939
+ const Ce = /* @__PURE__ */ Z(wn, [["render", hn], ["__file", "index.vue"]]), Qe = Symbol("library-router");
933
940
  function Se() {
934
941
  const t = me(Qe, null);
935
942
  return t || dt();
@@ -946,7 +953,7 @@ function xe() {
946
953
  function Ve() {
947
954
  return me(tt, null);
948
955
  }
949
- const Cn = /* @__PURE__ */ G({
956
+ const Cn = /* @__PURE__ */ q({
950
957
  __name: "TopBar",
951
958
  props: {
952
959
  title: {},
@@ -960,16 +967,16 @@ const Cn = /* @__PURE__ */ G({
960
967
  }
961
968
  }), Sn = { class: "top-bar" }, xn = { class: "banner-info" }, Vn = { class: "page-title" }, An = { class: "page-subtitle" }, In = { class: "avatar-wrapper" }, Tn = { class: "user-email" };
962
969
  function Un(t, n, a, e, o, l) {
963
- const s = S("a-avatar"), c = S("a-popover");
964
- return d(), C("div", Sn, [
970
+ const s = x("a-avatar"), c = x("a-popover");
971
+ return d(), S("div", Sn, [
965
972
  V("div", xn, [
966
- V("div", Vn, Z(a.title), 1),
967
- V("div", An, Z(a.subTitle), 1)
973
+ V("div", Vn, ee(a.title), 1),
974
+ V("div", An, ee(a.subTitle), 1)
968
975
  ]),
969
976
  V("div", In, [
970
977
  P(c, { trigger: "click" }, {
971
978
  content: v(() => [
972
- V("div", Tn, Z(a.email), 1)
979
+ V("div", Tn, ee(a.email), 1)
973
980
  ]),
974
981
  default: v(() => [
975
982
  P(s, {
@@ -978,7 +985,7 @@ function Un(t, n, a, e, o, l) {
978
985
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
979
986
  }, {
980
987
  default: v(() => [
981
- X(Z(a.email.charAt(0).toUpperCase()), 1)
988
+ Q(ee(a.email.charAt(0).toUpperCase()), 1)
982
989
  ]),
983
990
  _: 1
984
991
  })
@@ -988,9 +995,9 @@ function Un(t, n, a, e, o, l) {
988
995
  ])
989
996
  ]);
990
997
  }
991
- const Ae = /* @__PURE__ */ Q(Cn, [["render", Un], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
998
+ const Ae = /* @__PURE__ */ Z(Cn, [["render", Un], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
992
999
  function Me(t) {
993
- const n = Re(), a = [];
1000
+ const n = Fe(), a = [];
994
1001
  if (n.fieldsGroup) {
995
1002
  n.fieldsGroup.forEach((l) => {
996
1003
  const s = l.keys.map((c) => t.find((i) => i.fieldKey === c)).filter(Boolean);
@@ -1000,7 +1007,7 @@ function Me(t) {
1000
1007
  return o.length && a.push({ name: "Previous Grading (if applicable)", fields: o }), a;
1001
1008
  }
1002
1009
  }
1003
- const Pn = /* @__PURE__ */ G({
1010
+ const Pn = /* @__PURE__ */ q({
1004
1011
  __name: "CreateView",
1005
1012
  props: {
1006
1013
  className: {}
@@ -1017,24 +1024,24 @@ const Pn = /* @__PURE__ */ G({
1017
1024
  }
1018
1025
  }), u = _([]), m = _({});
1019
1026
  function g(A) {
1020
- return A ? Object.entries(A).map(([k, H]) => ({
1021
- fieldKey: k,
1027
+ return A ? Object.entries(A).map(([C, H]) => ({
1028
+ fieldKey: C,
1022
1029
  ...H
1023
- })).filter((k) => k.widget && k.widget.widget !== "Hidden").filter((k) => !h.value.includes(k.fieldKey)) : [];
1030
+ })).filter((C) => C.widget && C.widget.widget !== "Hidden").filter((C) => !h.value.includes(C.fieldKey)) : [];
1024
1031
  }
1025
1032
  function b(A) {
1026
- return A ? Object.entries(A).filter(([k, H]) => H.dependent).reduce((k, [H, M]) => (k[H] = M.dependent, k), {}) : [];
1033
+ return A ? Object.entries(A).filter(([C, H]) => H.dependent).reduce((C, [H, O]) => (C[H] = O.dependent, C), {}) : [];
1027
1034
  }
1028
- const p = ee(() => r.value?.actions ? [...r.value.actions].reverse() : []), y = Le({}), f = _(!1);
1029
- de(async () => {
1035
+ const p = te(() => r.value?.actions ? [...r.value.actions].reverse() : []), y = Le({}), f = _(!1);
1036
+ ce(async () => {
1030
1037
  f.value = !0, r.value = await ke(fe.Create, i.className, {
1031
1038
  svrStore: e,
1032
1039
  bpmStore: a
1033
1040
  }), u.value = g(r.value.fields), m.value = b(r.value.fields);
1034
1041
  for (const A in r.value.fields) {
1035
1042
  if (r.value.fields[A].widget?.widget === "File") {
1036
- const x = u.value.find((k) => k.fieldKey === A);
1037
- x && x.widget && (x.widget.files = []);
1043
+ const k = u.value.find((C) => C.fieldKey === A);
1044
+ k && k.widget && (k.widget.files = []);
1038
1045
  }
1039
1046
  y[A] = r.value.fields[A].modelValue;
1040
1047
  }
@@ -1043,54 +1050,56 @@ const Pn = /* @__PURE__ */ G({
1043
1050
  function L() {
1044
1051
  return e()?.userInfo?.email_address ?? "";
1045
1052
  }
1046
- async function W(A, x, k, H, M) {
1047
- switch (x) {
1048
- case te.Submit:
1049
- let oe = !0;
1050
- if (s.value?.forEach((ae) => {
1051
- ae?.validate && (ae.validate() || (oe = !1));
1052
- }), !oe) {
1053
+ async function Y(A, k, C, H, O) {
1054
+ switch (k) {
1055
+ case ne.Submit:
1056
+ let E = !0;
1057
+ if (s.value?.forEach((G) => {
1058
+ G?.validate && (G.validate() || (E = !1));
1059
+ }), !E) {
1053
1060
  c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1054
1061
  return;
1055
1062
  }
1056
1063
  f.value = !0;
1057
- const J = await St(i.className, { ...y, ...m.value }, k);
1058
- f.value = !1;
1059
- const le = s.value?.map((ae) => ae?.submit ? ae.submit(J.toString()) : Promise.resolve()) || [];
1060
- await Promise.all(le), c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${J.toString()}.`), o.push({ name: "Details", params: { workflowId: J.toString() } });
1064
+ try {
1065
+ const G = await St(i.className, { ...y, ...m.value }, C), ae = s.value?.map((de) => de?.submit ? de.submit(G.toString()) : Promise.resolve()) || [];
1066
+ await Promise.all(ae), f.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${G.toString()}.`), o.push({ name: "Details", params: { workflowId: G.toString() } });
1067
+ } catch {
1068
+ c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), f.value = !1;
1069
+ }
1061
1070
  break;
1062
- case te.Link:
1071
+ case ne.Link:
1063
1072
  try {
1064
1073
  await l[A.eventName || ""]?.(y, h), o.push({ name: H, params: { className: i.className } });
1065
- } catch (ae) {
1066
- console.error("Error in link action trigger:", ae);
1074
+ } catch (G) {
1075
+ console.error("Error in link action trigger:", G);
1067
1076
  }
1068
1077
  break;
1069
1078
  default:
1070
- console.warn("Unknown action type:", x);
1079
+ console.warn("Unknown action type:", k);
1071
1080
  }
1072
1081
  }
1073
- const q = [
1082
+ const J = [
1074
1083
  "jobScpope",
1075
1084
  "currentWorkdayId",
1076
1085
  "originalGrade",
1077
1086
  "jobTitlePrevious",
1078
1087
  "jobAttachmentPrevious",
1079
1088
  "positionId"
1080
- ], h = _(q);
1081
- function K(A, x) {
1082
- l[A]?.(x, h), r.value && (u.value = g(r.value.fields));
1089
+ ], h = _(J);
1090
+ function M(A, k) {
1091
+ l[A]?.(k, h), r.value && (u.value = g(r.value.fields));
1083
1092
  }
1084
- const Y = ee(() => Me(u.value)), F = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: m, genField: g, genDependentField: b, reversedActions: p, _data: y, loading: f, getApproverEmail: L, clickHandler: W, newHiddenFields: q, hiddenFields: h, changeHandler: K, groupedFields: Y, DataWidgets: Fe, ActionButton: Ce, TopBar: Ae };
1085
- return Object.defineProperty(F, "__isScriptSetup", { enumerable: !1, value: !0 }), F;
1093
+ const X = te(() => Me(u.value)), R = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: m, genField: g, genDependentField: b, reversedActions: p, _data: y, loading: f, getApproverEmail: L, clickHandler: Y, newHiddenFields: J, hiddenFields: h, changeHandler: M, groupedFields: X, DataWidgets: Be, ActionButton: Ce, TopBar: Ae };
1094
+ return Object.defineProperty(R, "__isScriptSetup", { enumerable: !1, value: !0 }), R;
1086
1095
  }
1087
- }), Dn = { class: "page-container" }, Nn = { class: "page-body" }, Hn = { class: "form-card" }, Ln = { class: "form-fields-vertical" }, Rn = { class: "form-fields" }, Bn = {
1096
+ }), Dn = { class: "page-container" }, Nn = { class: "page-body" }, Hn = { class: "form-card" }, Ln = { class: "form-fields-vertical" }, Fn = { class: "form-fields" }, Rn = {
1088
1097
  key: 0,
1089
1098
  class: "form-content"
1090
- }, Fn = { class: "page-footer" }, jn = { class: "action-container" }, Mn = { class: "action-buttons" };
1099
+ }, Bn = { class: "page-footer" }, jn = { class: "action-container" }, Mn = { class: "action-buttons" };
1091
1100
  function On(t, n, a, e, o, l) {
1092
- const s = S("a-card"), c = S("a-spin");
1093
- return d(), C("div", Dn, [
1101
+ const s = x("a-card"), c = x("a-spin");
1102
+ return d(), S("div", Dn, [
1094
1103
  P(e.TopBar, {
1095
1104
  title: e.pageData.banner.title,
1096
1105
  subTitle: e.pageData.banner.subTitle,
@@ -1104,14 +1113,14 @@ function On(t, n, a, e, o, l) {
1104
1113
  default: v(() => [
1105
1114
  V("div", Hn, [
1106
1115
  V("div", Ln, [
1107
- (d(!0), C(j, null, E(e.groupedFields, (i) => (d(), U(s, {
1116
+ (d(!0), S(j, null, K(e.groupedFields, (i) => (d(), U(s, {
1108
1117
  key: i.name,
1109
1118
  title: i.name,
1110
1119
  style: { "margin-bottom": "24px" }
1111
1120
  }, {
1112
1121
  default: v(() => [
1113
- V("div", Rn, [
1114
- (d(!0), C(j, null, E(i.fields, (r) => (d(), U(e.DataWidgets, {
1122
+ V("div", Fn, [
1123
+ (d(!0), S(j, null, K(i.fields, (r) => (d(), U(e.DataWidgets, {
1115
1124
  key: r.fieldKey,
1116
1125
  ref_for: !0,
1117
1126
  ref: "dataWidgets",
@@ -1128,19 +1137,19 @@ function On(t, n, a, e, o, l) {
1128
1137
  _: 2
1129
1138
  }, 1032, ["title"]))), 128))
1130
1139
  ]),
1131
- t.$slots.content ? (d(), C("div", Bn, [
1132
- ce(t.$slots, "content", {}, void 0, !0)
1140
+ t.$slots.content ? (d(), S("div", Rn, [
1141
+ le(t.$slots, "content", {}, void 0, !0)
1133
1142
  ])) : se("", !0)
1134
1143
  ])
1135
1144
  ]),
1136
1145
  _: 3
1137
1146
  }, 8, ["loading"])
1138
1147
  ]),
1139
- V("div", Fn, [
1148
+ V("div", Bn, [
1140
1149
  V("div", jn, [
1141
- ce(t.$slots, "action", {}, void 0, !0),
1150
+ le(t.$slots, "action", {}, void 0, !0),
1142
1151
  V("div", Mn, [
1143
- (d(!0), C(j, null, E(e.reversedActions, (i) => (d(), U(e.ActionButton, {
1152
+ (d(!0), S(j, null, K(e.reversedActions, (i) => (d(), U(e.ActionButton, {
1144
1153
  key: i.Title,
1145
1154
  loading: e.loading,
1146
1155
  config: i,
@@ -1152,7 +1161,7 @@ function On(t, n, a, e, o, l) {
1152
1161
  ])
1153
1162
  ]);
1154
1163
  }
1155
- const En = /* @__PURE__ */ Q(Pn, [["render", On], ["__scopeId", "data-v-531a10e7"], ["__file", "CreateView.vue"]]), $n = /* @__PURE__ */ G({
1164
+ const En = /* @__PURE__ */ Z(Pn, [["render", On], ["__scopeId", "data-v-7b45a965"], ["__file", "CreateView.vue"]]), $n = /* @__PURE__ */ q({
1156
1165
  __name: "UpdateView",
1157
1166
  props: {
1158
1167
  className: {},
@@ -1169,59 +1178,63 @@ const En = /* @__PURE__ */ Q(Pn, [["render", On], ["__scopeId", "data-v-531a10e7
1169
1178
  subTitle: ""
1170
1179
  }
1171
1180
  }), u = _([]), m = _({});
1172
- function g(F) {
1173
- return F ? Object.entries(F).map(([x, k]) => ({
1174
- fieldKey: x,
1175
- ...k
1176
- })).filter((x) => x.widget && x.widget.widget !== "Hidden").filter((x) => !q.value.includes(x.fieldKey)) : [];
1181
+ function g(R) {
1182
+ return R ? Object.entries(R).map(([k, C]) => ({
1183
+ fieldKey: k,
1184
+ ...C
1185
+ })).filter((k) => k.widget && k.widget.widget !== "Hidden").filter((k) => !J.value.includes(k.fieldKey)) : [];
1177
1186
  }
1178
- function b(F) {
1179
- return F ? Object.entries(F).filter(([x, k]) => k.dependent).reduce((x, [k, H]) => (x[k] = H.dependent, x), {}) : [];
1187
+ function b(R) {
1188
+ return R ? Object.entries(R).filter(([k, C]) => C.dependent).reduce((k, [C, H]) => (k[C] = H.dependent, k), {}) : [];
1180
1189
  }
1181
- const p = ee(() => r.value?.actions ? [...r.value.actions].reverse() : []), y = Le({}), f = _(!1);
1182
- de(async () => {
1190
+ const p = te(() => r.value?.actions ? [...r.value.actions].reverse() : []), y = Le({}), f = _(!1);
1191
+ ce(async () => {
1183
1192
  f.value = !0, r.value = await ke(fe.Update, i.className, {
1184
1193
  svrStore: o,
1185
1194
  bpmStore: l
1186
1195
  }, {
1187
1196
  workflowId: i.workflowId
1188
1197
  });
1189
- const F = await Je(fe.Update, i.className, { workflowId: i.workflowId, email: L() }), A = await Xe(i.className, i.workflowId);
1190
- r.value.actions = r.value.actions?.filter((k) => {
1191
- const H = F.find((M) => M.button === k.title);
1198
+ const R = await Je(fe.Update, i.className, { workflowId: i.workflowId, email: L() }), A = await Xe(i.className, i.workflowId);
1199
+ r.value.actions = r.value.actions?.filter((C) => {
1200
+ const H = R.find((O) => O.button === C.title);
1192
1201
  return H ? H.isShow : !0;
1193
1202
  });
1194
- const x = r.value.fields.requestType.modelValue;
1195
- e.Test?.(x, q), u.value = g(r.value.fields), m.value = b(r.value.fields);
1196
- for (const k in r.value.fields) {
1197
- if (r.value.fields[k].widget?.widget === "File") {
1198
- const H = u.value.find((M) => M.fieldKey === k);
1199
- H && H.widget && (H.widget.files = A[k] ?? [], H.widget.removeFile = (M) => Lt(i.className, M));
1203
+ const k = r.value.fields.requestType.modelValue;
1204
+ e.Test?.(k, J), u.value = g(r.value.fields), m.value = b(r.value.fields);
1205
+ for (const C in r.value.fields) {
1206
+ if (r.value.fields[C].widget?.widget === "File") {
1207
+ const H = u.value.find((O) => O.fieldKey === C);
1208
+ H && H.widget && (H.widget.files = A[C] ?? [], H.widget.removeFile = (O) => Lt(i.className, O));
1200
1209
  }
1201
- y[k] = r.value.fields[k].modelValue;
1210
+ y[C] = r.value.fields[C].modelValue;
1202
1211
  }
1203
1212
  f.value = !1;
1204
1213
  });
1205
1214
  function L() {
1206
1215
  return o()?.userInfo?.email_address ?? "";
1207
1216
  }
1208
- async function W(F, A, x, k, H) {
1217
+ async function Y(R, A, k, C, H) {
1209
1218
  switch (A) {
1210
- case te.Submit:
1211
- let M = !0;
1212
- if (s.value?.forEach((J) => {
1213
- J?.validate && (J.validate() || (M = !1));
1214
- }), !M) {
1219
+ case ne.Submit:
1220
+ let O = !0;
1221
+ if (s.value?.forEach((E) => {
1222
+ E?.validate && (E.validate() || (O = !1));
1223
+ }), !O) {
1215
1224
  c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1216
1225
  return;
1217
1226
  }
1218
- f.value = !0, await xt(i.className, i.workflowId, { ...y, ...m.value }, x), f.value = !1;
1219
- const oe = s.value?.map((J) => J?.submit ? J.submit(i.workflowId) : Promise.resolve()) || [];
1220
- await Promise.all(oe), c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${i.workflowId}.`);
1227
+ f.value = !0;
1228
+ try {
1229
+ const E = await xt(i.className, i.workflowId, { ...y, ...m.value }, k), G = s.value?.map((ae) => ae?.submit ? ae.submit(E.toString()) : Promise.resolve()) || [];
1230
+ await Promise.all(G), f.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${E.toString()}.`);
1231
+ } catch {
1232
+ c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), f.value = !1;
1233
+ }
1221
1234
  break;
1222
- case te.Link:
1235
+ case ne.Link:
1223
1236
  try {
1224
- await e[F.eventName || ""]?.(y, q), a.push({ name: k, params: { className: i.className } });
1237
+ await e[R.eventName || ""]?.(y, J), a.push({ name: C, params: { className: i.className } });
1225
1238
  } catch {
1226
1239
  }
1227
1240
  break;
@@ -1229,20 +1242,20 @@ const En = /* @__PURE__ */ Q(Pn, [["render", On], ["__scopeId", "data-v-531a10e7
1229
1242
  console.warn("Unknown action type:", A);
1230
1243
  }
1231
1244
  }
1232
- const q = _([]);
1233
- function h(F, A) {
1234
- e[F]?.(A, q), r.value && (u.value = g(r.value.fields));
1245
+ const J = _([]);
1246
+ function h(R, A) {
1247
+ e[R]?.(A, J), r.value && (u.value = g(r.value.fields));
1235
1248
  }
1236
- const K = ee(() => Me(u.value)), Y = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: m, genField: g, genDependentField: b, reversedActions: p, _data: y, loading: f, getApproverEmail: L, clickHandler: W, hiddenFields: q, changeHandler: h, groupedFields: K, DataWidgets: Fe, ActionButton: Ce, TopBar: Ae };
1237
- return Object.defineProperty(Y, "__isScriptSetup", { enumerable: !1, value: !0 }), Y;
1249
+ const M = te(() => Me(u.value)), X = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: u, _dependent: m, genField: g, genDependentField: b, reversedActions: p, _data: y, loading: f, getApproverEmail: L, clickHandler: Y, hiddenFields: J, changeHandler: h, groupedFields: M, DataWidgets: Be, ActionButton: Ce, TopBar: Ae };
1250
+ return Object.defineProperty(X, "__isScriptSetup", { enumerable: !1, value: !0 }), X;
1238
1251
  }
1239
1252
  }), Kn = { class: "page-container" }, zn = { class: "page-body" }, Gn = { class: "form-card" }, Wn = { class: "form-fields-vertical" }, qn = { class: "form-fields" }, Yn = {
1240
1253
  key: 0,
1241
1254
  class: "form-content"
1242
1255
  }, Jn = { class: "page-footer" }, Xn = { class: "action-container" }, Qn = { class: "action-buttons" };
1243
1256
  function Zn(t, n, a, e, o, l) {
1244
- const s = S("a-card"), c = S("a-spin");
1245
- return d(), C("div", Kn, [
1257
+ const s = x("a-card"), c = x("a-spin");
1258
+ return d(), S("div", Kn, [
1246
1259
  P(e.TopBar, {
1247
1260
  title: e.pageData.banner.title,
1248
1261
  subTitle: e.pageData.banner.subTitle,
@@ -1256,14 +1269,14 @@ function Zn(t, n, a, e, o, l) {
1256
1269
  default: v(() => [
1257
1270
  V("div", Gn, [
1258
1271
  V("div", Wn, [
1259
- (d(!0), C(j, null, E(e.groupedFields, (i) => (d(), U(s, {
1272
+ (d(!0), S(j, null, K(e.groupedFields, (i) => (d(), U(s, {
1260
1273
  key: i.name,
1261
1274
  title: i.name,
1262
1275
  style: { "margin-bottom": "24px" }
1263
1276
  }, {
1264
1277
  default: v(() => [
1265
1278
  V("div", qn, [
1266
- (d(!0), C(j, null, E(i.fields, (r) => (d(), U(e.DataWidgets, {
1279
+ (d(!0), S(j, null, K(i.fields, (r) => (d(), U(e.DataWidgets, {
1267
1280
  key: r.fieldKey,
1268
1281
  ref_for: !0,
1269
1282
  ref: "dataWidgets",
@@ -1280,8 +1293,8 @@ function Zn(t, n, a, e, o, l) {
1280
1293
  _: 2
1281
1294
  }, 1032, ["title"]))), 128))
1282
1295
  ]),
1283
- t.$slots.content ? (d(), C("div", Yn, [
1284
- ce(t.$slots, "content", {}, void 0, !0)
1296
+ t.$slots.content ? (d(), S("div", Yn, [
1297
+ le(t.$slots, "content", {}, void 0, !0)
1285
1298
  ])) : se("", !0)
1286
1299
  ])
1287
1300
  ]),
@@ -1290,9 +1303,9 @@ function Zn(t, n, a, e, o, l) {
1290
1303
  ]),
1291
1304
  V("div", Jn, [
1292
1305
  V("div", Xn, [
1293
- ce(t.$slots, "action", {}, void 0, !0),
1306
+ le(t.$slots, "action", {}, void 0, !0),
1294
1307
  V("div", Qn, [
1295
- (d(!0), C(j, null, E(e.reversedActions, (i) => (d(), U(e.ActionButton, {
1308
+ (d(!0), S(j, null, K(e.reversedActions, (i) => (d(), U(e.ActionButton, {
1296
1309
  key: i.Title,
1297
1310
  loading: e.loading,
1298
1311
  config: i,
@@ -1304,7 +1317,7 @@ function Zn(t, n, a, e, o, l) {
1304
1317
  ])
1305
1318
  ]);
1306
1319
  }
1307
- const eo = /* @__PURE__ */ Q($n, [["render", Zn], ["__scopeId", "data-v-0195d20b"], ["__file", "UpdateView.vue"]]), nt = Symbol("library-custom-comp");
1320
+ const eo = /* @__PURE__ */ Z($n, [["render", Zn], ["__scopeId", "data-v-72d4c7ff"], ["__file", "UpdateView.vue"]]), nt = Symbol("library-custom-comp");
1308
1321
  function to() {
1309
1322
  return me(nt, null);
1310
1323
  }
@@ -1321,7 +1334,7 @@ var lo = (t, n) => {
1321
1334
  t[a] = e;
1322
1335
  return t;
1323
1336
  };
1324
- const co = G({
1337
+ const co = q({
1325
1338
  name: "IconDownload",
1326
1339
  props: {
1327
1340
  size: {
@@ -1348,7 +1361,7 @@ const co = G({
1348
1361
  click: (t) => !0
1349
1362
  },
1350
1363
  setup(t, { emit: n }) {
1351
- const a = ro("icon"), e = ee(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = ee(() => {
1364
+ const a = ro("icon"), e = te(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = te(() => {
1352
1365
  const s = {};
1353
1366
  return t.size && (s.fontSize = io(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
1354
1367
  });
@@ -1362,7 +1375,7 @@ const co = G({
1362
1375
  }
1363
1376
  }), uo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1364
1377
  function fo(t, n, a, e, o, l) {
1365
- return d(), C("svg", {
1378
+ return d(), S("svg", {
1366
1379
  viewBox: "0 0 48 48",
1367
1380
  fill: "none",
1368
1381
  xmlns: "http://www.w3.org/2000/svg",
@@ -1384,7 +1397,7 @@ const po = Object.assign(Pe, {
1384
1397
  const e = (a = n?.iconPrefix) != null ? a : "";
1385
1398
  t.component(e + Pe.name, Pe);
1386
1399
  }
1387
- }), mo = /* @__PURE__ */ G({
1400
+ }), mo = /* @__PURE__ */ q({
1388
1401
  __name: "DetailView",
1389
1402
  props: {
1390
1403
  className: {},
@@ -1402,13 +1415,13 @@ const po = Object.assign(Pe, {
1402
1415
  }
1403
1416
  }), u = _([]);
1404
1417
  function m(I) {
1405
- return I ? Object.entries(I).map(([O, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
1406
- fieldKey: O,
1418
+ return I ? Object.entries(I).map(([$, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
1419
+ fieldKey: $,
1407
1420
  ...T
1408
- })).filter((O) => O.widget && O.widget.widget !== "Hidden").filter((O) => !Y.value.includes(O.fieldKey)) : [];
1421
+ })).filter(($) => $.widget && $.widget.widget !== "Hidden").filter(($) => !X.value.includes($.fieldKey)) : [];
1409
1422
  }
1410
- const g = ee(() => Me(u.value)), b = ee(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = _(!0), y = (I, R) => {
1411
- const O = I.findIndex((T) => T.isCurrent);
1423
+ const g = te(() => Me(u.value)), b = te(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = _(!0), y = (I, F) => {
1424
+ const $ = I.findIndex((T) => T.isCurrent);
1412
1425
  return I.map((T, re) => {
1413
1426
  const N = {
1414
1427
  id: T.id,
@@ -1421,36 +1434,36 @@ const po = Object.assign(Pe, {
1421
1434
  };
1422
1435
  N.title = T.workflowProcessApprovers[0]?.name;
1423
1436
  const _e = T.workflowProcessApprovers[T.workflowProcessApprovers.length - 1], we = T.workflowHistorys[T.workflowHistorys.length - 1], ve = we?.workflowHistoryApprovers[we?.workflowHistoryApprovers?.length - 1];
1424
- if (_e && ve && _e?.email?.toLowerCase() !== ve?.approverEmail?.toLowerCase() && (N.title = `${ve.name}`, N.proxy = `Proxy: ${_e.name}`), T.sort > 1 ? N.sub = "Approver Role: " + T.nodeName.replace("Submit", "").replace("Approve", "") : N.sub = "Submit Application", T.isCurrent && R !== -1)
1437
+ if (_e && ve && _e?.email?.toLowerCase() !== ve?.approverEmail?.toLowerCase() && (N.title = `${ve.name}`, N.proxy = `Proxy: ${_e.name}`), T.sort > 1 ? N.sub = "Approver Role: " + T.nodeName.replace("Submit", "").replace("Approve", "") : N.sub = "Submit Application", T.isCurrent && F !== -1)
1425
1438
  N.desc = "In Approval", N.status = 1;
1426
1439
  else {
1427
- const ne = T.workflowHistorys[T.workflowHistorys.length - 1];
1428
- if (ne && ne.status === 100)
1429
- N.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 2, N.desc = "approve success!";
1430
- else if (ne && ne.status === 999)
1431
- N.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 0, N.desc = "approve reject!";
1432
- else if (ne)
1433
- if (N.time = he(ne.takeActionAt, "yyyy-MM-dd hh:mm:ss"), T.sort === 1)
1440
+ const oe = T.workflowHistorys[T.workflowHistorys.length - 1];
1441
+ if (oe && oe.status === 100)
1442
+ N.time = he(oe.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 2, N.desc = "approve success!";
1443
+ else if (oe && oe.status === 999)
1444
+ N.time = he(oe.takeActionAt, "yyyy-MM-dd hh:mm:ss"), N.status = 0, N.desc = "approve reject!";
1445
+ else if (oe)
1446
+ if (N.time = he(oe.takeActionAt, "yyyy-MM-dd hh:mm:ss"), T.sort === 1)
1434
1447
  N.status = 2, N.desc = "";
1435
1448
  else {
1436
- const Oe = ne.workflowHistoryApprovers[0];
1449
+ const Oe = oe.workflowHistoryApprovers[0];
1437
1450
  N.status = 3, N.desc = Oe?.reason ? `Rejected reason: ${Oe.reason}` : "Rejected";
1438
1451
  }
1439
- else re < O || O === -1 ? (N.status = 0, N.desc = "Skipped") : (N.status = 0, N.desc = "Pending Approval");
1440
- ne && ne.status;
1452
+ else re < $ || $ === -1 ? (N.status = 0, N.desc = "Skipped") : (N.status = 0, N.desc = "Pending Approval");
1453
+ oe && oe.status;
1441
1454
  }
1442
1455
  return N;
1443
1456
  });
1444
- }, f = _([]), L = _(!1), W = _(!1), q = _(!1), h = _(!1);
1445
- async function K() {
1446
- const I = await Je(fe.Details, i.className, { workflowId: i.workflowId, email: x() });
1447
- r.value.actions = r.value.actions?.filter((R) => {
1448
- const O = I.find((T) => T.button === R.title);
1449
- return O ? O.isShow : !0;
1450
- }), L.value = I.find((R) => R.button === "IsGlobal")?.isShow ?? !1, W.value = I.find((R) => R.button === "AssignButton")?.isShow ?? !1, q.value = I.find((R) => R.button === "AssignList")?.isShow ?? !1, h.value = I.find((R) => R.button === "AddCommentsButton")?.isShow ?? !1;
1457
+ }, f = _([]), L = _(!1), Y = _(!1), J = _(!1), h = _(!1);
1458
+ async function M() {
1459
+ const I = await Je(fe.Details, i.className, { workflowId: i.workflowId, email: k() });
1460
+ r.value.actions = r.value.actions?.filter((F) => {
1461
+ const $ = I.find((T) => T.button === F.title);
1462
+ return $ ? $.isShow : !0;
1463
+ }), L.value = I.find((F) => F.button === "IsGlobal")?.isShow ?? !1, Y.value = I.find((F) => F.button === "AssignButton")?.isShow ?? !1, J.value = I.find((F) => F.button === "AssignList")?.isShow ?? !1, h.value = I.find((F) => F.button === "AddCommentsButton")?.isShow ?? !1;
1451
1464
  }
1452
- const Y = _([]);
1453
- async function F() {
1465
+ const X = _([]);
1466
+ async function R() {
1454
1467
  p.value = !0, r.value = await ke(fe.Details, i.className, {
1455
1468
  svrStore: a,
1456
1469
  bpmStore: e
@@ -1458,57 +1471,57 @@ const po = Object.assign(Pe, {
1458
1471
  workflowId: i.workflowId
1459
1472
  });
1460
1473
  const I = await Xe(i.className, i.workflowId);
1461
- J.value = await Rt(), M.value = await $e(i.workflowId), le.value = await Ue(i.workflowId), K();
1462
- const R = r.value.fields.requestType.modelValue;
1463
- o.Test?.(R, Y), u.value = m(r.value.fields);
1474
+ G.value = await Ft(), O.value = await $e(i.workflowId), ae.value = await Ue(i.workflowId), M();
1475
+ const F = r.value.fields.requestType.modelValue;
1476
+ o.Test?.(F, X), u.value = m(r.value.fields);
1464
1477
  for (const T in r.value.fields)
1465
1478
  if (r.value.fields[T].widget?.widget === "File") {
1466
1479
  const re = u.value.find((N) => N.fieldKey === T);
1467
1480
  re && re.widget && (re.widget.files = I[T] ?? []);
1468
1481
  }
1469
- const O = await Nt(i.className, i.workflowId);
1470
- f.value = y(O, 0), p.value = !1;
1482
+ const $ = await Nt(i.className, i.workflowId);
1483
+ f.value = y($, 0), p.value = !1;
1471
1484
  }
1472
- de(F);
1473
- async function A(I, R) {
1474
- return o[I]?.(R);
1485
+ ce(R);
1486
+ async function A(I, F) {
1487
+ return o[I]?.(F);
1475
1488
  }
1476
- function x() {
1489
+ function k() {
1477
1490
  return a()?.userInfo?.email_address ?? "";
1478
1491
  }
1479
- async function k(I, R, O, T, re) {
1492
+ async function C(I, F, $, T, re) {
1480
1493
  try {
1481
- switch (R) {
1482
- case te.Submit:
1494
+ switch (F) {
1495
+ case ne.Submit:
1483
1496
  const { reason: N, ifGlobal: _e } = await A(re, { isGlobal: L.value });
1484
1497
  p.value = !0;
1485
1498
  const we = re === "Approve" ? "100" : "-1";
1486
- await Pt(i.className, i.workflowId, x(), N, [Number(i.workflowId)], O, we, _e), p.value = !1;
1499
+ await Pt(i.className, i.workflowId, k(), N, [Number(i.workflowId)], $, we, _e), p.value = !1;
1487
1500
  const ve = re === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
1488
- c?.appContext.config.globalProperties.$notification.success(ve), F();
1501
+ c?.appContext.config.globalProperties.$notification.success(ve), R();
1489
1502
  break;
1490
- case te.Link:
1503
+ case ne.Link:
1491
1504
  try {
1492
1505
  await o[I.eventName || ""]?.(), l.push({ name: T, params: { className: i.className } });
1493
- } catch (ne) {
1494
- console.error("Error in link action trigger:", ne);
1506
+ } catch (oe) {
1507
+ console.error("Error in link action trigger:", oe);
1495
1508
  }
1496
1509
  break;
1497
1510
  default:
1498
- console.warn("Unknown action type:", R);
1511
+ console.warn("Unknown action type:", F);
1499
1512
  }
1500
1513
  } catch {
1501
1514
  }
1502
1515
  }
1503
- const H = _(""), M = _([]), oe = _(""), J = _([]), le = _([]);
1504
- async function ae() {
1505
- if (!oe.value) {
1516
+ const H = _(""), O = _([]), E = _(""), G = _([]), ae = _([]);
1517
+ async function de() {
1518
+ if (!E.value) {
1506
1519
  c?.appContext.config.globalProperties.$message.error("Please select an approver");
1507
1520
  return;
1508
1521
  }
1509
1522
  await ue("Confirm Assign Approver", "Do you want to assign the selected approver?");
1510
1523
  try {
1511
- await Bt(i.workflowId, oe.value), le.value = await Ue(i.workflowId), K(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1524
+ await Rt(i.workflowId, E.value), ae.value = await Ue(i.workflowId), M(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1512
1525
  } catch (I) {
1513
1526
  if (I.status === 409) {
1514
1527
  c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
@@ -1517,12 +1530,12 @@ const po = Object.assign(Pe, {
1517
1530
  c?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
1518
1531
  }
1519
1532
  }
1520
- async function ue(I, R) {
1521
- const { Modal: O } = await import("@arco-design/web-vue");
1533
+ async function ue(I, F) {
1534
+ const { Modal: $ } = await import("@arco-design/web-vue");
1522
1535
  return new Promise((T, re) => {
1523
- O.confirm({
1536
+ $.confirm({
1524
1537
  title: I,
1525
- content: R,
1538
+ content: F,
1526
1539
  okText: "OK",
1527
1540
  cancelText: "Cancel",
1528
1541
  onOk: () => T(!0),
@@ -1537,7 +1550,7 @@ const po = Object.assign(Pe, {
1537
1550
  return;
1538
1551
  }
1539
1552
  try {
1540
- await jt(String(I)), le.value = await Ue(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1553
+ await jt(String(I)), ae.value = await Ue(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Associator deleted successfully!");
1541
1554
  } catch {
1542
1555
  c?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
1543
1556
  }
@@ -1547,9 +1560,9 @@ const po = Object.assign(Pe, {
1547
1560
  c?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
1548
1561
  return;
1549
1562
  }
1550
- await Ft(i.workflowId, x(), H.value), H.value = "", M.value = await $e(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1563
+ await Bt(i.workflowId, k(), H.value), H.value = "", O.value = await $e(i.workflowId), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1551
1564
  }
1552
- const B = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, pageData: r, _fields: u, genField: m, groupedFields: g, reversedActions: b, loading: p, mapWorkflowSteps: y, steps: f, isGlobal: L, isShowAssignSelect: W, isShowAssignList: q, isShowCommentTextArea: h, reloadButtonList: K, hiddenFields: Y, load: F, triggerFn: A, getApproverEmail: x, clickHandler: k, comment: H, commentsHistory: M, selectedApprover: oe, approvers: J, associators: le, onAssignApprover: ae, confirmDialog: ue, onDeleteAssociator: w, onAddComment: D, ActionButton: Ce, get IconDownload() {
1565
+ const B = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, pageData: r, _fields: u, genField: m, groupedFields: g, reversedActions: b, loading: p, mapWorkflowSteps: y, steps: f, isGlobal: L, isShowAssignSelect: Y, isShowAssignList: J, isShowCommentTextArea: h, reloadButtonList: M, hiddenFields: X, load: R, triggerFn: A, getApproverEmail: k, clickHandler: C, comment: H, commentsHistory: O, selectedApprover: E, approvers: G, associators: ae, onAssignApprover: de, confirmDialog: ue, onDeleteAssociator: w, onAddComment: D, ActionButton: Ce, get IconDownload() {
1553
1566
  return po;
1554
1567
  }, TopBar: Ae, get formatDate() {
1555
1568
  return he;
@@ -1567,8 +1580,8 @@ const po = Object.assign(Pe, {
1567
1580
  class: "detail-content"
1568
1581
  }, Vo = { class: "page-footer" }, Ao = { class: "action-container" }, Io = { class: "action-buttons" };
1569
1582
  function To(t, n, a, e, o, l) {
1570
- const s = S("a-link"), c = S("a-space"), i = S("a-card"), r = S("a-option"), u = S("a-select"), m = S("a-button"), g = S("a-list-item"), b = S("a-list"), p = S("a-textarea"), y = S("a-spin");
1571
- return d(), C("div", go, [
1583
+ const s = x("a-link"), c = x("a-space"), i = x("a-card"), r = x("a-option"), u = x("a-select"), m = x("a-button"), g = x("a-list-item"), b = x("a-list"), p = x("a-textarea"), y = x("a-spin");
1584
+ return d(), S("div", go, [
1572
1585
  P(e.TopBar, {
1573
1586
  title: e.pageData.banner.title,
1574
1587
  subTitle: e.pageData.banner.subTitle,
@@ -1583,28 +1596,28 @@ function To(t, n, a, e, o, l) {
1583
1596
  V("div", vo, [
1584
1597
  (d(), U(He(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
1585
1598
  V("div", bo, [
1586
- (d(!0), C(j, null, E(e.groupedFields, (f) => (d(), U(i, {
1599
+ (d(!0), S(j, null, K(e.groupedFields, (f) => (d(), U(i, {
1587
1600
  key: f.name,
1588
1601
  title: f.name,
1589
1602
  style: { "margin-bottom": "24px" }
1590
1603
  }, {
1591
1604
  default: v(() => [
1592
1605
  V("div", yo, [
1593
- (d(!0), C(j, null, E(f.fields, (L) => (d(), C("div", {
1606
+ (d(!0), S(j, null, K(f.fields, (L) => (d(), S("div", {
1594
1607
  key: L.fieldKey,
1595
1608
  class: "detail-field-wrapper"
1596
1609
  }, [
1597
1610
  V("div", wo, [
1598
- V("div", ho, Z(L.widget?.title), 1),
1599
- L.widget?.widget === "File" ? (d(!0), C(j, { key: 0 }, E(L.widget.files, (W) => (d(), C("div", {
1611
+ V("div", ho, ee(L.widget?.title), 1),
1612
+ L.widget?.widget === "File" ? (d(!0), S(j, { key: 0 }, K(L.widget.files, (Y) => (d(), S("div", {
1600
1613
  class: "field-value",
1601
- key: W.id
1614
+ key: Y.id
1602
1615
  }, [
1603
1616
  P(c, null, {
1604
1617
  default: v(() => [
1605
- X(Z(W.name) + " ", 1),
1618
+ Q(ee(Y.name) + " ", 1),
1606
1619
  P(s, {
1607
- href: W.url,
1620
+ href: Y.url,
1608
1621
  target: "_blank"
1609
1622
  }, {
1610
1623
  default: v(() => [
@@ -1615,7 +1628,7 @@ function To(t, n, a, e, o, l) {
1615
1628
  ]),
1616
1629
  _: 2
1617
1630
  }, 1024)
1618
- ]))), 128)) : (d(), C("div", ko, Z(L.fieldValue), 1))
1631
+ ]))), 128)) : (d(), S("div", ko, ee(L.fieldValue), 1))
1619
1632
  ])
1620
1633
  ]))), 128))
1621
1634
  ])
@@ -1629,12 +1642,12 @@ function To(t, n, a, e, o, l) {
1629
1642
  "onUpdate:modelValue": n[0] || (n[0] = (f) => e.selectedApprover = f)
1630
1643
  }, {
1631
1644
  default: v(() => [
1632
- (d(!0), C(j, null, E(e.approvers, (f) => (d(), U(r, {
1645
+ (d(!0), S(j, null, K(e.approvers, (f) => (d(), U(r, {
1633
1646
  key: f.value,
1634
1647
  value: f.value
1635
1648
  }, {
1636
1649
  default: v(() => [
1637
- X(Z(f.label), 1)
1650
+ Q(ee(f.label), 1)
1638
1651
  ]),
1639
1652
  _: 2
1640
1653
  }, 1032, ["value"]))), 128))
@@ -1646,7 +1659,7 @@ function To(t, n, a, e, o, l) {
1646
1659
  onClick: e.onAssignApprover
1647
1660
  }, {
1648
1661
  default: v(() => n[2] || (n[2] = [
1649
- X("Assign for comment", -1)
1662
+ Q("Assign for comment", -1)
1650
1663
  ])),
1651
1664
  _: 1,
1652
1665
  __: [2]
@@ -1656,10 +1669,10 @@ function To(t, n, a, e, o, l) {
1656
1669
  })) : se("", !0),
1657
1670
  e.isShowAssignList ? (d(), U(b, { key: 1 }, {
1658
1671
  header: v(() => n[3] || (n[3] = [
1659
- X(" Associators ", -1)
1672
+ Q(" Associators ", -1)
1660
1673
  ])),
1661
1674
  default: v(() => [
1662
- (d(!0), C(j, null, E(e.associators, (f) => (d(), U(g, {
1675
+ (d(!0), S(j, null, K(e.associators, (f) => (d(), U(g, {
1663
1676
  key: f.id
1664
1677
  }, {
1665
1678
  actions: v(() => [
@@ -1669,21 +1682,21 @@ function To(t, n, a, e, o, l) {
1669
1682
  onClick: (L) => e.onDeleteAssociator(f.id)
1670
1683
  }, {
1671
1684
  default: v(() => n[4] || (n[4] = [
1672
- X(" Delete ", -1)
1685
+ Q(" Delete ", -1)
1673
1686
  ])),
1674
1687
  _: 2,
1675
1688
  __: [4]
1676
1689
  }, 1032, ["onClick"])
1677
1690
  ]),
1678
1691
  default: v(() => [
1679
- X(" " + Z(f.associator), 1)
1692
+ Q(" " + ee(f.associator), 1)
1680
1693
  ]),
1681
1694
  _: 2
1682
1695
  }, 1024))), 128))
1683
1696
  ]),
1684
1697
  _: 1
1685
1698
  })) : se("", !0),
1686
- e.isShowCommentTextArea ? (d(), C("div", Co, [
1699
+ e.isShowCommentTextArea ? (d(), S("div", Co, [
1687
1700
  V("div", So, [
1688
1701
  n[6] || (n[6] = V("div", { class: "field-label" }, "Comment", -1)),
1689
1702
  P(p, {
@@ -1695,7 +1708,7 @@ function To(t, n, a, e, o, l) {
1695
1708
  onClick: e.onAddComment
1696
1709
  }, {
1697
1710
  default: v(() => n[5] || (n[5] = [
1698
- X("Add Comment", -1)
1711
+ Q("Add Comment", -1)
1699
1712
  ])),
1700
1713
  _: 1,
1701
1714
  __: [5]
@@ -1704,14 +1717,14 @@ function To(t, n, a, e, o, l) {
1704
1717
  ])) : se("", !0),
1705
1718
  e.commentsHistory.length ? (d(), U(b, { key: 3 }, {
1706
1719
  header: v(() => n[7] || (n[7] = [
1707
- X(" Comments History ", -1)
1720
+ Q(" Comments History ", -1)
1708
1721
  ])),
1709
1722
  default: v(() => [
1710
- (d(!0), C(j, null, E(e.commentsHistory, (f) => (d(), U(g, {
1723
+ (d(!0), S(j, null, K(e.commentsHistory, (f) => (d(), U(g, {
1711
1724
  key: f.associator
1712
1725
  }, {
1713
1726
  default: v(() => [
1714
- X(Z(f.associator) + ": " + Z(f.comments) + " (" + Z(e.formatDate(f.createdAt)) + ") ", 1)
1727
+ Q(ee(f.associator) + ": " + ee(f.comments) + " (" + ee(e.formatDate(f.createdAt)) + ") ", 1)
1715
1728
  ]),
1716
1729
  _: 2
1717
1730
  }, 1024))), 128))
@@ -1719,8 +1732,8 @@ function To(t, n, a, e, o, l) {
1719
1732
  _: 1
1720
1733
  })) : se("", !0)
1721
1734
  ]),
1722
- t.$slots.content ? (d(), C("div", xo, [
1723
- ce(t.$slots, "content", {}, void 0, !0)
1735
+ t.$slots.content ? (d(), S("div", xo, [
1736
+ le(t.$slots, "content", {}, void 0, !0)
1724
1737
  ])) : se("", !0)
1725
1738
  ])
1726
1739
  ]),
@@ -1729,9 +1742,9 @@ function To(t, n, a, e, o, l) {
1729
1742
  ]),
1730
1743
  V("div", Vo, [
1731
1744
  V("div", Ao, [
1732
- ce(t.$slots, "action", {}, void 0, !0),
1745
+ le(t.$slots, "action", {}, void 0, !0),
1733
1746
  V("div", Io, [
1734
- (d(!0), C(j, null, E(e.reversedActions, (f) => (d(), U(e.ActionButton, {
1747
+ (d(!0), S(j, null, K(e.reversedActions, (f) => (d(), U(e.ActionButton, {
1735
1748
  key: f.Title,
1736
1749
  loading: e.loading,
1737
1750
  config: f,
@@ -1743,7 +1756,7 @@ function To(t, n, a, e, o, l) {
1743
1756
  ])
1744
1757
  ]);
1745
1758
  }
1746
- const Uo = /* @__PURE__ */ Q(mo, [["render", To], ["__scopeId", "data-v-07443410"], ["__file", "DetailView.vue"]]), Po = /* @__PURE__ */ G({
1759
+ const Uo = /* @__PURE__ */ Z(mo, [["render", To], ["__scopeId", "data-v-07443410"], ["__file", "DetailView.vue"]]), Po = /* @__PURE__ */ q({
1747
1760
  name: "ListView",
1748
1761
  __name: "ListView",
1749
1762
  props: {
@@ -1761,7 +1774,7 @@ const Uo = /* @__PURE__ */ Q(mo, [["render", To], ["__scopeId", "data-v-07443410
1761
1774
  filters: []
1762
1775
  });
1763
1776
  function r() {
1764
- const w = Object.entries(k.value).filter(([, { value: D }]) => D && D !== "").map(([D, { value: B, operator: I }]) => ({
1777
+ const w = Object.entries(C.value).filter(([, { value: D }]) => D && D !== "").map(([D, { value: B, operator: I }]) => ({
1765
1778
  key: D,
1766
1779
  value: B,
1767
1780
  operator: I
@@ -1777,12 +1790,12 @@ const Uo = /* @__PURE__ */ Q(mo, [["render", To], ["__scopeId", "data-v-07443410
1777
1790
  }]
1778
1791
  };
1779
1792
  }
1780
- const u = ee(() => ({
1793
+ const u = te(() => ({
1781
1794
  x: b.value.length * 150 + 250
1782
1795
  // 只设置横向滚动
1783
1796
  // 移除 y 属性,让表格高度自适应
1784
1797
  })), m = (w) => {
1785
- const D = Object.entries(w).filter(([, B]) => B.widget?.column).map(([B, I], R) => ({
1798
+ const D = Object.entries(w).filter(([, B]) => B.widget?.column).map(([B, I], F) => ({
1786
1799
  title: I.widget.title,
1787
1800
  dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
1788
1801
  order: I.order,
@@ -1807,79 +1820,79 @@ const Uo = /* @__PURE__ */ Q(mo, [["render", To], ["__scopeId", "data-v-07443410
1807
1820
  y.value = !0;
1808
1821
  const w = await Ct(s.className, r());
1809
1822
  g.value = w.data, i.total = w.totalCount, y.value = !1;
1810
- }, W = _(!1);
1811
- de(async () => {
1823
+ }, Y = _(!1);
1824
+ ce(async () => {
1812
1825
  p.value = !0, c.value = await ke(3, s.className, {
1813
1826
  svrStore: a,
1814
1827
  bpmStore: e
1815
- }), m(c.value.fields), M(c.value.fields), oe(), x(c.value?.tabs?.[0]?.key || ""), f.value = c.value.actions, p.value = !1, W.value = !0;
1828
+ }), m(c.value.fields), O(c.value.fields), E(), k(c.value?.tabs?.[0]?.key || ""), f.value = c.value.actions, p.value = !1, Y.value = !0;
1816
1829
  }), st(() => {
1817
- W.value && L();
1830
+ Y.value && L();
1818
1831
  });
1819
- const q = (w) => {
1832
+ const J = (w) => {
1820
1833
  i.current = w, L();
1821
1834
  }, h = (w) => {
1822
1835
  i.pageSize = w, L();
1823
1836
  };
1824
- function K(w, D, B, I, R) {
1837
+ function M(w, D, B, I, F) {
1825
1838
  switch (w) {
1826
- case te.Link:
1827
- o.push({ name: B, params: { workflowId: R } });
1839
+ case ne.Link:
1840
+ o.push({ name: B, params: { workflowId: F } });
1828
1841
  break;
1829
1842
  default:
1830
1843
  console.warn("Unknown action type:", w);
1831
1844
  }
1832
1845
  }
1833
- function Y(w, D, B) {
1846
+ function X(w, D, B) {
1834
1847
  switch (w) {
1835
- case te.Submit:
1836
- Mt(D, { filters: [{ key: "approverList", value: F(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
1848
+ case ne.Submit:
1849
+ Mt(D, { filters: [{ key: "approverList", value: R(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
1837
1850
  break;
1838
- case te.Link:
1851
+ case ne.Link:
1839
1852
  o.push({ name: B });
1840
1853
  break;
1841
1854
  default:
1842
1855
  console.warn("Unknown action type:", w);
1843
1856
  }
1844
1857
  }
1845
- function F() {
1858
+ function R() {
1846
1859
  return a()?.userInfo?.email_address ?? "";
1847
1860
  }
1848
1861
  function A(w, D) {
1849
1862
  return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g, D);
1850
1863
  }
1851
- function x(w) {
1864
+ function k(w) {
1852
1865
  const D = c.value?.tabs?.find((B) => B.key === w)?.filters;
1853
1866
  i.filters = D?.map((B) => ({
1854
1867
  ...B,
1855
- value: A(B.value, F())
1868
+ value: A(B.value, R())
1856
1869
  })) || [], i.current = 1, L();
1857
1870
  }
1858
- const k = _({}), H = _([]);
1859
- function M(w) {
1871
+ const C = _({}), H = _([]);
1872
+ function O(w) {
1860
1873
  if (!w) return [];
1861
1874
  H.value = Object.entries(w).filter(([, D]) => D.isFiltered).map(([D, B]) => ({ fieldKey: D, fieldConfig: B }));
1862
1875
  }
1863
- const oe = () => {
1876
+ const E = () => {
1864
1877
  const w = {};
1865
1878
  H.value.forEach(({ fieldKey: D, fieldConfig: B }) => {
1866
1879
  w[D] = {}, w[D].value = B.modelValue, w[D].operator = B.operator;
1867
- }), k.value = w;
1868
- }, J = () => {
1880
+ }), C.value = w;
1881
+ }, G = () => {
1869
1882
  i.current = 1, L();
1870
- }, le = () => {
1871
- c.value && oe(), J();
1883
+ }, ae = () => {
1884
+ c.value && E(), G();
1872
1885
  };
1873
- function ae(w, D) {
1886
+ function de(w, D) {
1874
1887
  return !(w.location !== "InTable" || w.title === "Update" && (D.status === 100 || D.status === -1));
1875
1888
  }
1876
- const ue = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: m, _data: g, _columns: b, loadingPage: p, loadingTable: y, actions: f, loadData: L, mounted: W, pageChangeHandler: q, pageSizeChangeHandler: h, clickHandler: K, createHandler: Y, getApproverEmail: F, replaceEmail: A, tabHandler: x, searchForm: k, searchableFields: H, mapSearchableFields: M, initSearchForm: oe, handleSearch: J, handleReset: le, judgeHiddenActions: ae, ActionButton: Ce, DataWidgets: Fe, TopBar: Ae };
1889
+ const ue = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: u, mapColumns: m, _data: g, _columns: b, loadingPage: p, loadingTable: y, actions: f, loadData: L, mounted: Y, pageChangeHandler: J, pageSizeChangeHandler: h, clickHandler: M, createHandler: X, getApproverEmail: R, replaceEmail: A, tabHandler: k, searchForm: C, searchableFields: H, mapSearchableFields: O, initSearchForm: E, handleSearch: G, handleReset: ae, judgeHiddenActions: de, ActionButton: Ce, DataWidgets: Be, TopBar: Ae };
1877
1890
  return Object.defineProperty(ue, "__isScriptSetup", { enumerable: !1, value: !0 }), ue;
1878
1891
  }
1879
1892
  }), Do = { class: "list-container" }, No = { class: "query-title" };
1880
1893
  function Ho(t, n, a, e, o, l) {
1881
- const s = S("a-space"), c = S("a-col"), i = S("a-button"), r = S("a-row"), u = S("a-card"), m = S("a-tab-pane"), g = S("a-tabs"), b = S("a-table");
1882
- return d(), C("div", Do, [
1894
+ const s = x("a-space"), c = x("a-col"), i = x("a-button"), r = x("a-row"), u = x("a-card"), m = x("a-tab-pane"), g = x("a-tabs"), b = x("a-table");
1895
+ return d(), S("div", Do, [
1883
1896
  P(e.TopBar, {
1884
1897
  title: e.pageData?.banner.title ?? "",
1885
1898
  subTitle: e.pageData?.banner.subTitle ?? "",
@@ -1891,7 +1904,7 @@ function Ho(t, n, a, e, o, l) {
1891
1904
  n[0] || (n[0] = V("h3", null, "Search Conditions", -1)),
1892
1905
  P(s, { size: "medium" }, {
1893
1906
  default: v(() => [
1894
- (d(!0), C(j, null, E(e.actions, (p) => (d(), C(j, {
1907
+ (d(!0), S(j, null, K(e.actions, (p) => (d(), S(j, {
1895
1908
  key: p.title
1896
1909
  }, [
1897
1910
  p.location === "InOperation" ? (d(), U(e.ActionButton, {
@@ -1906,7 +1919,7 @@ function Ho(t, n, a, e, o, l) {
1906
1919
  ]),
1907
1920
  P(r, { gutter: [24, 20] }, {
1908
1921
  default: v(() => [
1909
- (d(!0), C(j, null, E(e.searchableFields, (p) => (d(), U(c, {
1922
+ (d(!0), S(j, null, K(e.searchableFields, (p) => (d(), U(c, {
1910
1923
  key: p.fieldKey,
1911
1924
  span: 6,
1912
1925
  class: "search-col"
@@ -1935,7 +1948,7 @@ function Ho(t, n, a, e, o, l) {
1935
1948
  onClick: e.handleSearch
1936
1949
  }, {
1937
1950
  default: v(() => n[1] || (n[1] = [
1938
- X(" Search ", -1)
1951
+ Q(" Search ", -1)
1939
1952
  ])),
1940
1953
  _: 1,
1941
1954
  __: [1]
@@ -1945,7 +1958,7 @@ function Ho(t, n, a, e, o, l) {
1945
1958
  onClick: e.handleReset
1946
1959
  }, {
1947
1960
  default: v(() => n[2] || (n[2] = [
1948
- X(" Reset ", -1)
1961
+ Q(" Reset ", -1)
1949
1962
  ])),
1950
1963
  _: 1,
1951
1964
  __: [2]
@@ -1967,7 +1980,7 @@ function Ho(t, n, a, e, o, l) {
1967
1980
  onTabClick: e.tabHandler
1968
1981
  }, {
1969
1982
  default: v(() => [
1970
- (d(!0), C(j, null, E(e.pageData?.tabs, (p) => (d(), U(m, {
1983
+ (d(!0), S(j, null, K(e.pageData?.tabs, (p) => (d(), U(m, {
1971
1984
  key: p.key,
1972
1985
  title: p.title
1973
1986
  }, null, 8, ["title"]))), 128))
@@ -1996,7 +2009,7 @@ function Ho(t, n, a, e, o, l) {
1996
2009
  optional: v(({ record: p }) => [
1997
2010
  P(s, { size: "small" }, {
1998
2011
  default: v(() => [
1999
- (d(!0), C(j, null, E(e.actions, (y) => (d(), C(j, {
2012
+ (d(!0), S(j, null, K(e.actions, (y) => (d(), S(j, {
2000
2013
  key: y.title
2001
2014
  }, [
2002
2015
  e.judgeHiddenActions(y, p) ? (d(), U(e.ActionButton, {
@@ -2014,7 +2027,7 @@ function Ho(t, n, a, e, o, l) {
2014
2027
  }, 8, ["columns", "data", "pagination", "loading", "scroll"])
2015
2028
  ]);
2016
2029
  }
2017
- const Lo = /* @__PURE__ */ Q(Po, [["render", Ho], ["__scopeId", "data-v-a82f2228"], ["__file", "ListView.vue"]]), Oo = {
2030
+ const Lo = /* @__PURE__ */ Z(Po, [["render", Ho], ["__scopeId", "data-v-a82f2228"], ["__file", "ListView.vue"]]), Oo = {
2018
2031
  install(t, n = {}) {
2019
2032
  n.config && gt(n.config), n.router && t.provide(Qe, n.router), n.pinia && t.provide(kn, n.pinia), n.useBpmStore && t.provide(et, n.useBpmStore), n.useSvrStore && t.provide(tt, n.useSvrStore), n.triggers && t.provide(Ze, n.triggers), n.customComps && t.provide(nt, n.customComps), t.component("CreateView", En), t.component("UpdateView", eo), t.component("DetailView", Uo), t.component("ListView", Lo);
2020
2033
  }