@chase-shao/vue-component-lib 1.2.83 → 1.2.85

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,11 +1,11 @@
1
- import { ref as m, getCurrentInstance as pe, defineComponent as z, mergeModels as ce, useModel as ye, resolveComponent as k, createBlock as B, openBlock as u, onMounted as ue, computed as X, withCtx as S, createElementBlock as V, Fragment as $, renderList as G, createVNode as H, nextTick as nt, createTextVNode as re, useTemplateRef as He, createElementVNode as x, createCommentVNode as ae, toDisplayString as te, resolveDynamicComponent as Be, renderSlot as de, inject as me, normalizeStyle as ot, normalizeClass as at, reactive as rt, onActivated as st } from "vue";
2
- import it from "axios";
3
- import { defineStore as lt } from "pinia";
4
- import { Modal as ct } from "@arco-design/web-vue";
5
- import { useRouter as dt } from "vue-router";
6
- const ut = lt("main", () => ({
1
+ import { ref as m, getCurrentInstance as pe, defineComponent as E, mergeModels as ce, useModel as ye, resolveComponent as w, createBlock as F, openBlock as f, onMounted as ue, computed as W, withCtx as x, createElementBlock as V, Fragment as M, renderList as q, createVNode as B, nextTick as lt, createTextVNode as re, inject as me, normalizeStyle as qe, normalizeClass as Ye, createElementVNode as y, useTemplateRef as Fe, createCommentVNode as ne, toDisplayString as te, resolveDynamicComponent as He, renderSlot as de, reactive as ct, onActivated as dt } from "vue";
2
+ import ut from "axios";
3
+ import { defineStore as ft } from "pinia";
4
+ import { Modal as pt } from "@arco-design/web-vue";
5
+ import { useRouter as mt } from "vue-router";
6
+ const gt = ft("main", () => ({
7
7
  token: m(void 0)
8
- })), ft = async (t) => new Promise((n) => setTimeout(n, t)), pt = async (t, n, a, e = void 0) => {
8
+ })), _t = async (t) => new Promise((n) => setTimeout(n, t)), vt = async (t, n, a, e = void 0) => {
9
9
  if (t[n] === void 0)
10
10
  try {
11
11
  t[n] = null, t[n] = await a() || e;
@@ -13,7 +13,7 @@ const ut = lt("main", () => ({
13
13
  console.error(o), t[n] = void 0;
14
14
  }
15
15
  for (; t[n] === null; )
16
- await ft(100);
16
+ await _t(100);
17
17
  return t[n];
18
18
  }, he = (t) => {
19
19
  const n = `0${t}`;
@@ -42,28 +42,28 @@ const ut = lt("main", () => ({
42
42
  } catch {
43
43
  return t.toLocaleString();
44
44
  }
45
- }, mt = (t, n) => {
45
+ }, bt = (t, n) => {
46
46
  let a;
47
47
  t instanceof Blob ? a = t : a = new Blob([t]);
48
48
  const e = document.createElement("a"), o = window.URL.createObjectURL(a);
49
49
  e.href = o, e.download = n, e.click(), window.URL.revokeObjectURL(o);
50
50
  };
51
- let De = {};
52
- function gt(t) {
53
- De = { ...De, ...t };
51
+ let Be = {};
52
+ function ht(t) {
53
+ Be = { ...Be, ...t };
54
54
  }
55
- function Fe() {
56
- return De;
55
+ function Le() {
56
+ return Be;
57
57
  }
58
- const _t = pe();
59
- function Ge() {
60
- const t = Fe();
58
+ const yt = pe();
59
+ function Qe() {
60
+ const t = Le();
61
61
  return {
62
62
  apiBase: t.apiBase || void 0 || "",
63
63
  appSecret: t.appSecret || void 0 || ""
64
64
  };
65
65
  }
66
- function vt(t) {
66
+ function wt(t) {
67
67
  if (!t?.data?.statusCode)
68
68
  return t;
69
69
  switch (t.data.statusCode) {
@@ -71,22 +71,22 @@ function vt(t) {
71
71
  return t.data.data = t.data.result, t.data;
72
72
  case 0:
73
73
  default:
74
- return _t?.appContext.config.globalProperties.$notification.error(t.data.msg), null;
74
+ return yt?.appContext.config.globalProperties.$notification.error(t.data.msg), null;
75
75
  }
76
76
  }
77
- function qe() {
78
- const { apiBase: t } = Ge(), n = it.create({
77
+ function Je() {
78
+ const { apiBase: t } = Qe(), n = ut.create({
79
79
  baseURL: t,
80
80
  timeout: 20 * 1e3,
81
81
  // 20s
82
82
  // headers: { 'Content-Type': 'application/json' },
83
83
  withCredentials: !0
84
84
  });
85
- return n.interceptors.response.use(vt), n;
85
+ return n.interceptors.response.use(wt), n;
86
86
  }
87
- const Ye = async () => {
88
- const { apiBase: t, appSecret: n } = Ge(), a = qe(), e = ut();
89
- return await pt(e, "token", async () => {
87
+ const Xe = async () => {
88
+ const { apiBase: t, appSecret: n } = Qe(), a = Je(), e = gt();
89
+ return await vt(e, "token", async () => {
90
90
  const o = await a.get(`${t}/GenerateToken`, {
91
91
  params: {
92
92
  appid: "bpm",
@@ -97,8 +97,8 @@ const Ye = async () => {
97
97
  e.token = void 0;
98
98
  }, (o.data?.expireSeconds ?? 3600) * 1e3), o?.data?.token;
99
99
  });
100
- }, E = async () => {
101
- const t = await Ye(), n = qe();
100
+ }, z = async () => {
101
+ const t = await Xe(), n = Je();
102
102
  return n.defaults.headers.common.Authorization = `Bearer ${t}`, n;
103
103
  }, Pe = {
104
104
  CurrentUserEmail: (t) => t.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
@@ -110,31 +110,31 @@ const Ye = async () => {
110
110
  }, K = [];
111
111
  for (let t = 0; t < 256; ++t)
112
112
  K.push((t + 256).toString(16).slice(1));
113
- function bt(t, n = 0) {
113
+ function kt(t, n = 0) {
114
114
  return (K[t[n + 0]] + K[t[n + 1]] + K[t[n + 2]] + K[t[n + 3]] + "-" + K[t[n + 4]] + K[t[n + 5]] + "-" + K[t[n + 6]] + K[t[n + 7]] + "-" + K[t[n + 8]] + K[t[n + 9]] + "-" + K[t[n + 10]] + K[t[n + 11]] + K[t[n + 12]] + K[t[n + 13]] + K[t[n + 14]] + K[t[n + 15]]).toLowerCase();
115
115
  }
116
116
  let Ne;
117
- const ht = new Uint8Array(16);
118
- function yt() {
117
+ const Ct = new Uint8Array(16);
118
+ function St() {
119
119
  if (!Ne) {
120
120
  if (typeof crypto > "u" || !crypto.getRandomValues)
121
121
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
122
122
  Ne = crypto.getRandomValues.bind(crypto);
123
123
  }
124
- return Ne(ht);
124
+ return Ne(Ct);
125
125
  }
126
- const wt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), $e = { randomUUID: wt };
127
- function Je(t, n, a) {
128
- if ($e.randomUUID && !t)
129
- return $e.randomUUID();
126
+ const xt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ee = { randomUUID: xt };
127
+ function Ze(t, n, a) {
128
+ if (Ee.randomUUID && !t)
129
+ return Ee.randomUUID();
130
130
  t = t || {};
131
- const e = t.random ?? t.rng?.() ?? yt();
131
+ const e = t.random ?? t.rng?.() ?? St();
132
132
  if (e.length < 16)
133
133
  throw new Error("Random bytes length must be >= 16");
134
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, bt(e);
134
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, kt(e);
135
135
  }
136
- var q = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(q || {}), fe = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t[t.ReCreate = 5] = "ReCreate", t))(fe || {});
137
- function kt(t, n, a) {
136
+ var Y = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(Y || {}), fe = /* @__PURE__ */ ((t) => (t[t.Create = 0] = "Create", t[t.Update = 1] = "Update", t[t.Details = 2] = "Details", t[t.List = 3] = "List", t[t.ReCreate = 5] = "ReCreate", t))(fe || {});
137
+ function At(t, n, a) {
138
138
  const e = {
139
139
  pageType: "",
140
140
  fields: {},
@@ -158,7 +158,7 @@ function kt(t, n, a) {
158
158
  const l = o.showToRoles.split(",").map((c) => c.trim()), s = a.bpmStore().employeeInfo.roleList.some((c) => l.includes(c.name)) || o.showToRoles === "";
159
159
  if (o.widget === "Tab") {
160
160
  e.tabs || (e.tabs = []), s && e.tabs.push({
161
- key: Je(),
161
+ key: Ze(),
162
162
  title: o.title,
163
163
  filters: o.filters ? JSON.parse(o.filters) : [],
164
164
  order: o.order
@@ -174,7 +174,7 @@ function kt(t, n, a) {
174
174
  redirectUrl: o.redirectUrl,
175
175
  redirectType: o.redirectType,
176
176
  title: o.title,
177
- widget: o.widget === "Link" ? q.Link : o.widget === "Submit" ? q.Submit : q.Button,
177
+ widget: o.widget === "Link" ? Y.Link : o.widget === "Submit" ? Y.Submit : Y.Button,
178
178
  location: o.location,
179
179
  attributeType: o.attributeType,
180
180
  readonly: o.readonly,
@@ -217,12 +217,12 @@ function kt(t, n, a) {
217
217
  }), e.fields[o] = s;
218
218
  }), e;
219
219
  }
220
- const Ee = async (t, n, a, e) => {
221
- const l = await (await E()).get(`/General/${n}/${t}/page`, { params: e });
222
- return kt(l?.data, t, a);
223
- }, Ct = async (t, n, a) => (await (await E()).post(`/${n}/${t}/button/List`, null, { params: a }))?.data;
224
- async function St(t, n) {
225
- const e = await (await E()).post(`/General/${t}/list`, n);
220
+ const ze = async (t, n, a, e) => {
221
+ const l = await (await z()).get(`/General/${n}/${t}/page`, { params: e });
222
+ return At(l?.data, t, a);
223
+ }, Vt = async (t, n, a) => (await (await z()).post(`/${n}/${t}/button/List`, null, { params: a }))?.data;
224
+ async function It(t, n) {
225
+ const e = await (await z()).post(`/General/${t}/list`, n);
226
226
  return {
227
227
  data: e.data.data,
228
228
  totalCount: e.data.totalCount
@@ -241,109 +241,109 @@ async function St(t, n) {
241
241
  // ),
242
242
  };
243
243
  }
244
- async function xt(t, n, a) {
245
- return (await (await E()).post(a, n, {
244
+ async function Tt(t, n, a) {
245
+ return (await (await z()).post(a, n, {
246
246
  params: {
247
247
  className: t
248
248
  }
249
249
  })).data;
250
250
  }
251
- async function At(t, n, a, e) {
252
- const o = await E(), l = Re(e, n);
251
+ async function Pt(t, n, a, e) {
252
+ const o = await z(), l = Re(e, n);
253
253
  return (await o.put(l, a))?.data;
254
254
  }
255
255
  function Re(t, n) {
256
256
  return t.replace(/{WorkflowId}/g, n);
257
257
  }
258
- function Vt(t, n) {
258
+ function Nt(t, n) {
259
259
  return t.replace(/{ApproverEmail}/g, encodeURIComponent(n));
260
260
  }
261
- function Tt(t, n) {
261
+ function Ut(t, n) {
262
262
  return t.replace(/{WorkFlowReason}/g, encodeURIComponent(n));
263
263
  }
264
- function It(t, n) {
264
+ function Dt(t, n) {
265
265
  return t.replace(/{Status}/g, n);
266
266
  }
267
- function Pt(t, n) {
267
+ function Bt(t, n) {
268
268
  return t.replace(/{IfTriggerGlobal_RandP_Approval}/g, n);
269
269
  }
270
- function Nt(t, n) {
270
+ function Ft(t, n) {
271
271
  return t.replace(/{ClassName}/g, encodeURIComponent(n));
272
272
  }
273
- async function Ut(t, n, a, e, o, l, s, c) {
274
- const i = await E();
273
+ async function Ht(t, n, a, e, o, l, s, c) {
274
+ const i = await z();
275
275
  let r = Re(l, n);
276
- return r = Vt(r, a), r = Tt(r, e), r = It(r, s), r = Pt(r, c), r = Nt(r, t), (await i.put(r, o))?.data;
276
+ return r = Nt(r, a), r = Ut(r, e), r = Dt(r, s), r = Bt(r, c), r = Ft(r, t), (await i.put(r, o))?.data;
277
277
  }
278
- async function Dt(t, n) {
279
- const o = (await (await E()).get(t, { params: { value: n } }))?.data;
278
+ async function Lt(t, n) {
279
+ const o = (await (await z()).get(t, { params: { value: n } }))?.data;
280
280
  return Object.entries(o).map(([l, s]) => ({
281
281
  value: l,
282
282
  label: s
283
283
  }));
284
284
  }
285
- async function Ht(t, n) {
286
- return (await (await E()).get(`/General/${t}/${n}/process`))?.data;
285
+ async function Rt(t, n) {
286
+ return (await (await z()).get(`/General/${t}/${n}/process`))?.data;
287
287
  }
288
- function Bt(t) {
288
+ function jt(t) {
289
289
  return {
290
- uid: t.id ?? Je(),
290
+ uid: t.id ?? Ze(),
291
291
  name: t.attachmentName ?? "unknown",
292
292
  url: t.attachmentKey ?? ""
293
293
  };
294
294
  }
295
- async function Ft(t, n) {
296
- return (await (await E()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
295
+ async function $t(t, n) {
296
+ return (await (await z()).get(`/General/${t}/${n}/upload/get`))?.data.reduce((l, s) => {
297
297
  const { category: c } = s;
298
- return l[c] || (l[c] = []), l[c].push(Bt(s)), l;
298
+ return l[c] || (l[c] = []), l[c].push(jt(s)), l;
299
299
  }, {});
300
300
  }
301
- async function Rt(t, n) {
302
- return (await E()).post(`/General/${t}/${n}/delete/attachment`);
301
+ async function Ot(t, n) {
302
+ return (await z()).post(`/General/${t}/${n}/delete/attachment`);
303
303
  }
304
- async function Lt() {
305
- const n = await (await E()).get("/Grading/dropdown/approvers");
304
+ async function Mt() {
305
+ const n = await (await z()).get("/Grading/dropdown/approvers");
306
306
  return Object.entries(n?.data).map(([a, e]) => ({
307
307
  label: a,
308
308
  value: e
309
309
  }));
310
310
  }
311
- async function jt(t, n) {
312
- return await (await E()).post(`Grading/AssignComments/${t}/${encodeURIComponent(n)}`);
311
+ async function Et(t, n) {
312
+ return await (await z()).post(`Grading/AssignComments/${t}/${encodeURIComponent(n)}`);
313
313
  }
314
- async function Mt(t, n, a) {
315
- return await (await E()).post(`Grading/AddComments/${t}/${encodeURIComponent(n)}`, a, {
314
+ async function zt(t, n, a) {
315
+ return await (await z()).post(`Grading/AddComments/${t}/${encodeURIComponent(n)}`, a, {
316
316
  headers: { "Content-Type": "application/json;charset=UTF-8" }
317
317
  });
318
318
  }
319
- async function Ot(t) {
320
- return (await (await E()).get(`Grading/GetComments/${t}`))?.data;
319
+ async function Kt(t) {
320
+ return (await (await z()).get(`Grading/GetComments/${t}`))?.data;
321
321
  }
322
- async function $t(t) {
323
- return (await (await E()).get(`Grading/GetAssociator/${t}`))?.data;
322
+ async function Wt(t) {
323
+ return (await (await z()).get(`Grading/GetAssociator/${t}`))?.data;
324
324
  }
325
- async function Et(t) {
326
- return await (await E()).delete(`Grading/DeleteAssociator/${t}`);
325
+ async function Gt(t) {
326
+ return await (await z()).delete(`Grading/DeleteAssociator/${t}`);
327
327
  }
328
- async function Kt(t, n = null) {
329
- const e = await (await E()).post(t, n, {
328
+ async function qt(t, n = null) {
329
+ const e = await (await z()).post(t, n, {
330
330
  responseType: "blob"
331
331
  });
332
- mt(e?.data, "WorkflowData.xlsx");
332
+ bt(e?.data, "WorkflowData.xlsx");
333
333
  }
334
334
  const ge = (t, n) => {
335
335
  let a = "";
336
336
  return { res: t.every((o) => {
337
- const l = zt(o, n);
337
+ const l = Yt(o, n);
338
338
  return l || (a = o.errorMessage), l;
339
339
  }), errorMessages: a };
340
- }, zt = (t, n) => {
340
+ }, Yt = (t, n) => {
341
341
  const { ruleName: a, ruleParameter: e } = t;
342
- return Wt[a](e, n);
343
- }, Wt = {
342
+ return Qt[a](e, n);
343
+ }, Qt = {
344
344
  Regex: (t, n) => new RegExp(t).test(n),
345
345
  Required: (t, n) => !!n
346
- }, Gt = /* @__PURE__ */ z({
346
+ }, Jt = /* @__PURE__ */ E({
347
347
  __name: "InputText",
348
348
  props: /* @__PURE__ */ ce({
349
349
  fieldKey: {},
@@ -375,15 +375,15 @@ const ge = (t, n) => {
375
375
  const r = { props: e, emits: o, model: l, validate: s, inputHandler: c, changeHandler: i };
376
376
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
377
377
  }
378
- }), Y = (t, n) => {
378
+ }), Q = (t, n) => {
379
379
  const a = t.__vccOpts || t;
380
380
  for (const [e, o] of n)
381
381
  a[e] = o;
382
382
  return a;
383
383
  };
384
- function qt(t, n, a, e, o, l) {
385
- const s = k("AInput");
386
- return u(), B(s, {
384
+ function Xt(t, n, a, e, o, l) {
385
+ const s = w("AInput");
386
+ return f(), F(s, {
387
387
  modelValue: e.model,
388
388
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
389
389
  "allow-clear": "",
@@ -392,7 +392,7 @@ function qt(t, n, a, e, o, l) {
392
392
  onChange: e.changeHandler
393
393
  }, null, 8, ["modelValue", "disabled"]);
394
394
  }
395
- const Ke = /* @__PURE__ */ Y(Gt, [["render", qt], ["__file", "InputText.vue"]]), Yt = /* @__PURE__ */ z({
395
+ const Ke = /* @__PURE__ */ Q(Jt, [["render", Xt], ["__file", "InputText.vue"]]), Zt = /* @__PURE__ */ E({
396
396
  __name: "InputNumber",
397
397
  props: /* @__PURE__ */ ce({
398
398
  fieldKey: {},
@@ -416,9 +416,9 @@ const Ke = /* @__PURE__ */ Y(Gt, [["render", qt], ["__file", "InputText.vue"]]),
416
416
  const i = (_) => ge(e.validations, _), r = (_) => {
417
417
  o("input", _);
418
418
  }, d = (_) => {
419
- const b = i(_);
420
- o("error", b.res ? "" : b.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
421
- f.event === "change" && o(f.event, f.handlerName, _);
419
+ const k = i(_);
420
+ o("error", k.res ? "" : k.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((u) => {
421
+ u.event === "change" && o(u.event, u.handlerName, _);
422
422
  });
423
423
  };
424
424
  n({
@@ -431,9 +431,9 @@ const Ke = /* @__PURE__ */ Y(Gt, [["render", qt], ["__file", "InputText.vue"]]),
431
431
  return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
432
432
  }
433
433
  });
434
- function Jt(t, n, a, e, o, l) {
435
- const s = k("AInputNumber");
436
- return u(), B(s, {
434
+ function en(t, n, a, e, o, l) {
435
+ const s = w("AInputNumber");
436
+ return f(), F(s, {
437
437
  modelValue: e.model,
438
438
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
439
439
  clearable: "",
@@ -443,7 +443,7 @@ function Jt(t, n, a, e, o, l) {
443
443
  onChange: e.changeHandler
444
444
  }, null, 8, ["modelValue", "disabled", "min"]);
445
445
  }
446
- const Xt = /* @__PURE__ */ Y(Yt, [["render", Jt], ["__file", "InputNumber.vue"]]), Qt = /* @__PURE__ */ z({
446
+ const tn = /* @__PURE__ */ Q(Zt, [["render", en], ["__file", "InputNumber.vue"]]), nn = /* @__PURE__ */ E({
447
447
  __name: "SelectList",
448
448
  props: /* @__PURE__ */ ce({
449
449
  fieldKey: {},
@@ -458,39 +458,39 @@ const Xt = /* @__PURE__ */ Y(Yt, [["render", Jt], ["__file", "InputNumber.vue"]]
458
458
  }),
459
459
  emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
460
460
  setup(t, { expose: n, emit: a }) {
461
- const e = t, o = a, l = m(!1), s = m(e.config.options ?? []), c = ye(t, "modelValue"), i = (b) => ge(e.validations, b), r = X(() => {
462
- const b = {};
463
- return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
464
- b[f.event] = (p) => {
465
- o(f.event, f.handlerName, p);
466
- const C = i(p);
467
- o("error", C.res ? "" : C.errorMessages);
461
+ const e = t, o = a, l = m(!1), s = m(e.config.options ?? []), c = ye(t, "modelValue"), i = (k) => ge(e.validations, k), r = W(() => {
462
+ const k = {};
463
+ return e.triggers && e.triggers.length > 0 && e.triggers.forEach((u) => {
464
+ k[u.event] = (p) => {
465
+ o(u.event, u.handlerName, p);
466
+ const A = i(p);
467
+ o("error", A.res ? "" : A.errorMessages);
468
468
  };
469
- }), b;
469
+ }), k;
470
470
  }), d = async () => {
471
- e.config.dataSourceProvider && (s.value = await Dt(e.config.dataSourceProvider));
471
+ e.config.dataSourceProvider && (s.value = await Lt(e.config.dataSourceProvider));
472
472
  };
473
473
  ue(d);
474
- const g = (b) => {
475
- o("update:modelValue", b);
476
- const f = i(b);
477
- o("error", f.res ? "" : f.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
478
- p.event === "change" && o(p.event, p.handlerName, b);
474
+ const g = (k) => {
475
+ o("update:modelValue", k);
476
+ const u = i(k);
477
+ o("error", u.res ? "" : u.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
478
+ p.event === "change" && o(p.event, p.handlerName, k);
479
479
  });
480
480
  };
481
481
  n({
482
482
  validate() {
483
- const b = i(e.modelValue);
484
- return o("error", b.res ? "" : b.errorMessages), b.res;
483
+ const k = i(e.modelValue);
484
+ return o("error", k.res ? "" : k.errorMessages), k.res;
485
485
  }
486
486
  });
487
487
  const _ = { props: e, emits: o, loading: l, _options: s, model: c, validate: i, eventHandlers: r, loadOptions: d, changeHandler: g };
488
488
  return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
489
489
  }
490
490
  });
491
- function Zt(t, n, a, e, o, l) {
492
- const s = k("AOption"), c = k("ASelect");
493
- return u(), B(c, {
491
+ function on(t, n, a, e, o, l) {
492
+ const s = w("AOption"), c = w("ASelect");
493
+ return f(), F(c, {
494
494
  "allow-clear": "",
495
495
  modelValue: e.model,
496
496
  "onUpdate:modelValue": n[0] || (n[0] = (i) => e.model = i),
@@ -500,8 +500,8 @@ function Zt(t, n, a, e, o, l) {
500
500
  disabled: e.props.config.readonly,
501
501
  onChange: e.changeHandler
502
502
  }, {
503
- default: S(() => [
504
- (u(!0), V($, null, G(e._options, (i) => (u(), B(s, {
503
+ default: x(() => [
504
+ (f(!0), V(M, null, q(e._options, (i) => (f(), F(s, {
505
505
  key: i.value,
506
506
  value: i.value,
507
507
  label: i.label
@@ -510,7 +510,7 @@ function Zt(t, n, a, e, o, l) {
510
510
  _: 1
511
511
  }, 8, ["modelValue", "loading", "disabled"]);
512
512
  }
513
- const ze = /* @__PURE__ */ Y(Qt, [["render", Zt], ["__file", "SelectList.vue"]]), en = /* @__PURE__ */ z({
513
+ const We = /* @__PURE__ */ Q(nn, [["render", on], ["__file", "SelectList.vue"]]), an = /* @__PURE__ */ E({
514
514
  __name: "Cascader",
515
515
  props: {
516
516
  modelValue: {},
@@ -525,7 +525,7 @@ const ze = /* @__PURE__ */ Y(Qt, [["render", Zt], ["__file", "SelectList.vue"]])
525
525
  if (e.config) {
526
526
  const r = e.config.dataSourceProvider;
527
527
  if (r) {
528
- const g = await (await E()).get(r);
528
+ const g = await (await z()).get(r);
529
529
  l.value = g.data;
530
530
  }
531
531
  }
@@ -540,14 +540,14 @@ const ze = /* @__PURE__ */ Y(Qt, [["render", Zt], ["__file", "SelectList.vue"]])
540
540
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
541
541
  }
542
542
  });
543
- function tn(t, n, a, e, o, l) {
544
- const s = k("ACascader"), c = k("ASpace");
545
- return u(), B(c, {
543
+ function rn(t, n, a, e, o, l) {
544
+ const s = w("ACascader"), c = w("ASpace");
545
+ return f(), F(c, {
546
546
  direction: "vertical",
547
547
  size: "large"
548
548
  }, {
549
- default: S(() => [
550
- H(s, {
549
+ default: x(() => [
550
+ B(s, {
551
551
  "field-names": e.fieldNames,
552
552
  "model-value": a.modelValue,
553
553
  options: e._options,
@@ -559,7 +559,7 @@ function tn(t, n, a, e, o, l) {
559
559
  _: 1
560
560
  });
561
561
  }
562
- const nn = /* @__PURE__ */ Y(en, [["render", tn], ["__file", "Cascader.vue"]]), on = /* @__PURE__ */ z({
562
+ const sn = /* @__PURE__ */ Q(an, [["render", rn], ["__file", "Cascader.vue"]]), ln = /* @__PURE__ */ E({
563
563
  __name: "FileUpload",
564
564
  props: {
565
565
  className: {},
@@ -574,66 +574,66 @@ const nn = /* @__PURE__ */ Y(en, [["render", tn], ["__file", "Cascader.vue"]]),
574
574
  setup(t, { expose: n, emit: a }) {
575
575
  const e = t, o = a, l = m({});
576
576
  ue(async () => {
577
- const h = await Ye();
577
+ const C = await Xe();
578
578
  l.value = {
579
- Authorization: `Bearer ${h}`
579
+ Authorization: `Bearer ${C}`
580
580
  };
581
581
  });
582
- const s = (h) => ge(e.validations, h), c = Fe(), i = c.apiBase, r = m(null), d = m("");
583
- function g(h, y, T) {
584
- return h.replace(/{WorkflowId}/g, y).replace(/{ClassName}/g, T);
582
+ const s = (C) => ge(e.validations, C), c = Le(), i = c.apiBase, r = m(null), d = m("");
583
+ function g(C, b, h) {
584
+ return C.replace(/{WorkflowId}/g, b).replace(/{ClassName}/g, h);
585
585
  }
586
- const _ = X(() => {
586
+ const _ = W(() => {
587
587
  if (e.config.uploadURL) {
588
- const h = i + e.config.uploadURL;
589
- return g(h, d.value, e.className);
588
+ const C = i + e.config.uploadURL;
589
+ return g(C, d.value, e.className);
590
590
  }
591
591
  return "";
592
- }), b = (h) => {
593
- h.stopPropagation(), r.value.submit();
592
+ }), k = (C) => {
593
+ C.stopPropagation(), r.value.submit();
594
594
  };
595
- function f(h) {
596
- const { file: y, name: T } = h, A = T ?? y.name;
597
- return new Promise((w, U) => {
598
- ct.confirm({
595
+ function u(C) {
596
+ const { file: b, name: h } = C, I = h ?? b.name;
597
+ return new Promise((S, U) => {
598
+ pt.confirm({
599
599
  title: "Confirm Delete",
600
- content: `Are you sure you want to delete ${A}?`,
600
+ content: `Are you sure you want to delete ${I}?`,
601
601
  async onOk() {
602
- if (h.status !== "init" && e.config.removeFile)
603
- return await e.config.removeFile(h.uid), w(!0);
604
- w(!0);
602
+ if (C.status !== "init" && e.config.removeFile)
603
+ return await e.config.removeFile(C.uid), S(!0);
604
+ S(!0);
605
605
  },
606
606
  onCancel: () => U("cancel")
607
607
  });
608
608
  });
609
609
  }
610
- const p = m(null), C = m(null), J = (h) => {
611
- p.value && (p.value(h), p.value = null, C.value = null);
612
- }, Z = (h) => {
613
- C.value && (C.value(h), p.value = null, C.value = null);
614
- }, M = m([]), Q = (h) => {
615
- M.value = h.filter((y) => y.status === "init");
610
+ const p = m(null), A = m(null), J = (C) => {
611
+ p.value && (p.value(C), p.value = null, A.value = null);
612
+ }, Z = (C) => {
613
+ A.value && (A.value(C), p.value = null, A.value = null);
614
+ }, $ = m([]), X = (C) => {
615
+ $.value = C.filter((b) => b.status === "init");
616
616
  };
617
617
  n({
618
- submit(h) {
619
- return new Promise((y, T) => {
620
- r.value ? (e.config.uploadURL && (d.value = h), p.value = y, C.value = T, M.value.length ? nt(() => {
618
+ submit(C) {
619
+ return new Promise((b, h) => {
620
+ r.value ? (e.config.uploadURL && (d.value = C), p.value = b, A.value = h, $.value.length ? lt(() => {
621
621
  r.value?.submit();
622
- }) : y(h)) : y(h);
622
+ }) : b(C)) : b(C);
623
623
  });
624
624
  },
625
625
  validate() {
626
- const h = s(e.modelValue);
626
+ const C = e.config.files ?? [], b = [...$.value, ...C].length > 0 ? "hasFile" : "", h = s(b);
627
627
  return o("error", h.res ? "" : h.errorMessages), h.res;
628
628
  }
629
629
  });
630
- const ne = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: d, replaceIdAndClassName: g, action: _, submit: b, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: C, handleUploadSuccess: J, handleUploadError: Z, readyFiles: M, onChange: Q };
631
- return Object.defineProperty(ne, "__isScriptSetup", { enumerable: !1, value: !0 }), ne;
630
+ const oe = { props: e, emits: o, headers: l, validate: s, config: c, ApiBase: i, uploadRef: r, id: d, replaceIdAndClassName: g, action: _, submit: k, onBeforeRemove: u, uploadPromiseResolve: p, uploadPromiseReject: A, handleUploadSuccess: J, handleUploadError: Z, readyFiles: $, onChange: X };
631
+ return Object.defineProperty(oe, "__isScriptSetup", { enumerable: !1, value: !0 }), oe;
632
632
  }
633
633
  });
634
- function an(t, n, a, e, o, l) {
635
- const s = k("a-button"), c = k("a-upload");
636
- return u(), B(c, {
634
+ function cn(t, n, a, e, o, l) {
635
+ const s = w("a-button"), c = w("a-upload");
636
+ return f(), F(c, {
637
637
  ref: "uploadRef",
638
638
  "default-file-list": e.props.config.files,
639
639
  action: e.action,
@@ -646,10 +646,10 @@ function an(t, n, a, e, o, l) {
646
646
  onSuccess: e.handleUploadSuccess,
647
647
  onError: e.handleUploadError
648
648
  }, {
649
- "start-icon": S(() => n[0] || (n[0] = [])),
650
- "upload-button": S(() => [
651
- H(s, { type: "primary" }, {
652
- default: S(() => n[1] || (n[1] = [
649
+ "start-icon": x(() => n[0] || (n[0] = [])),
650
+ "upload-button": x(() => [
651
+ B(s, { type: "primary" }, {
652
+ default: x(() => n[1] || (n[1] = [
653
653
  re("Select File", -1)
654
654
  ])),
655
655
  _: 1,
@@ -659,7 +659,7 @@ function an(t, n, a, e, o, l) {
659
659
  _: 1
660
660
  }, 8, ["default-file-list", "action", "limit", "headers"]);
661
661
  }
662
- const rn = /* @__PURE__ */ Y(on, [["render", an], ["__file", "FileUpload.vue"]]), sn = /* @__PURE__ */ z({
662
+ const dn = /* @__PURE__ */ Q(ln, [["render", cn], ["__file", "FileUpload.vue"]]), un = /* @__PURE__ */ E({
663
663
  __name: "TextArea",
664
664
  props: {
665
665
  fieldKey: {},
@@ -690,9 +690,9 @@ const rn = /* @__PURE__ */ Y(on, [["render", an], ["__file", "FileUpload.vue"]])
690
690
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
691
691
  }
692
692
  });
693
- function ln(t, n, a, e, o, l) {
694
- const s = k("ATextarea");
695
- return u(), B(s, {
693
+ function fn(t, n, a, e, o, l) {
694
+ const s = w("ATextarea");
695
+ return f(), F(s, {
696
696
  "model-value": e.props.modelValue,
697
697
  placeholder: "Please enter something",
698
698
  "allow-clear": "",
@@ -701,7 +701,7 @@ function ln(t, n, a, e, o, l) {
701
701
  onChange: e.changeHandler
702
702
  }, null, 8, ["model-value", "disabled"]);
703
703
  }
704
- const cn = /* @__PURE__ */ Y(sn, [["render", ln], ["__file", "TextArea.vue"]]), dn = /* @__PURE__ */ z({
704
+ const pn = /* @__PURE__ */ Q(un, [["render", fn], ["__file", "TextArea.vue"]]), mn = /* @__PURE__ */ E({
705
705
  __name: "CheckBox",
706
706
  props: /* @__PURE__ */ ce({
707
707
  fieldKey: {},
@@ -732,23 +732,163 @@ const cn = /* @__PURE__ */ Y(sn, [["render", ln], ["__file", "TextArea.vue"]]),
732
732
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
733
733
  }
734
734
  });
735
- function un(t, n, a, e, o, l) {
736
- const s = k("ACheckbox");
737
- return u(), B(s, {
735
+ function gn(t, n, a, e, o, l) {
736
+ const s = w("ACheckbox");
737
+ return f(), F(s, {
738
738
  modelValue: e.model,
739
739
  "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
740
740
  clearable: "",
741
741
  disabled: e.props.readonly || e.props.config.Readonly,
742
742
  onChange: e.changeHandler
743
743
  }, {
744
- default: S(() => n[1] || (n[1] = [
744
+ default: x(() => n[1] || (n[1] = [
745
745
  re("Yes", -1)
746
746
  ])),
747
747
  _: 1,
748
748
  __: [1]
749
749
  }, 8, ["modelValue", "disabled"]);
750
750
  }
751
- const fn = /* @__PURE__ */ Y(dn, [["render", un], ["__file", "CheckBox.vue"]]), pn = /* @__PURE__ */ z({
751
+ const _n = /* @__PURE__ */ Q(mn, [["render", gn], ["__file", "CheckBox.vue"]]), vn = Symbol("ArcoConfigProvider"), bn = "arco", hn = "$arco", et = (t) => {
752
+ var n, a, e;
753
+ const o = pe(), l = me(vn, void 0);
754
+ return `${(e = (a = l?.prefixCls) != null ? a : (n = o?.appContext.config.globalProperties[hn]) == null ? void 0 : n.classPrefix) != null ? e : bn}-${t}`;
755
+ }, yn = Object.prototype.toString;
756
+ function tt(t) {
757
+ return yn.call(t) === "[object Number]" && t === t;
758
+ }
759
+ var nt = (t, n) => {
760
+ for (const [a, e] of n)
761
+ t[a] = e;
762
+ return t;
763
+ };
764
+ const wn = E({
765
+ name: "IconQuestionCircle",
766
+ props: {
767
+ size: {
768
+ type: [Number, String]
769
+ },
770
+ strokeWidth: {
771
+ type: Number,
772
+ default: 4
773
+ },
774
+ strokeLinecap: {
775
+ type: String,
776
+ default: "butt",
777
+ validator: (t) => ["butt", "round", "square"].includes(t)
778
+ },
779
+ strokeLinejoin: {
780
+ type: String,
781
+ default: "miter",
782
+ validator: (t) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(t)
783
+ },
784
+ rotate: Number,
785
+ spin: Boolean
786
+ },
787
+ emits: {
788
+ click: (t) => !0
789
+ },
790
+ setup(t, { emit: n }) {
791
+ const a = et("icon"), e = W(() => [a, `${a}-question-circle`, { [`${a}-spin`]: t.spin }]), o = W(() => {
792
+ const s = {};
793
+ return t.size && (s.fontSize = tt(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
794
+ });
795
+ return {
796
+ cls: e,
797
+ innerStyle: o,
798
+ onClick: (s) => {
799
+ n("click", s);
800
+ }
801
+ };
802
+ }
803
+ }), kn = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
804
+ function Cn(t, n, a, e, o, l) {
805
+ return f(), V("svg", {
806
+ viewBox: "0 0 48 48",
807
+ fill: "none",
808
+ xmlns: "http://www.w3.org/2000/svg",
809
+ stroke: "currentColor",
810
+ class: Ye(t.cls),
811
+ style: qe(t.innerStyle),
812
+ "stroke-width": t.strokeWidth,
813
+ "stroke-linecap": t.strokeLinecap,
814
+ "stroke-linejoin": t.strokeLinejoin,
815
+ onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
816
+ }, n[1] || (n[1] = [
817
+ y("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
818
+ y("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
819
+ ]), 14, kn);
820
+ }
821
+ var Ue = /* @__PURE__ */ nt(wn, [["render", Cn]]);
822
+ const Sn = Object.assign(Ue, {
823
+ install: (t, n) => {
824
+ var a;
825
+ const e = (a = n?.iconPrefix) != null ? a : "";
826
+ t.component(e + Ue.name, Ue);
827
+ }
828
+ }), xn = E({
829
+ name: "IconDownload",
830
+ props: {
831
+ size: {
832
+ type: [Number, String]
833
+ },
834
+ strokeWidth: {
835
+ type: Number,
836
+ default: 4
837
+ },
838
+ strokeLinecap: {
839
+ type: String,
840
+ default: "butt",
841
+ validator: (t) => ["butt", "round", "square"].includes(t)
842
+ },
843
+ strokeLinejoin: {
844
+ type: String,
845
+ default: "miter",
846
+ validator: (t) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(t)
847
+ },
848
+ rotate: Number,
849
+ spin: Boolean
850
+ },
851
+ emits: {
852
+ click: (t) => !0
853
+ },
854
+ setup(t, { emit: n }) {
855
+ const a = et("icon"), e = W(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = W(() => {
856
+ const s = {};
857
+ return t.size && (s.fontSize = tt(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
858
+ });
859
+ return {
860
+ cls: e,
861
+ innerStyle: o,
862
+ onClick: (s) => {
863
+ n("click", s);
864
+ }
865
+ };
866
+ }
867
+ }), An = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
868
+ function Vn(t, n, a, e, o, l) {
869
+ return f(), V("svg", {
870
+ viewBox: "0 0 48 48",
871
+ fill: "none",
872
+ xmlns: "http://www.w3.org/2000/svg",
873
+ stroke: "currentColor",
874
+ class: Ye(t.cls),
875
+ style: qe(t.innerStyle),
876
+ "stroke-width": t.strokeWidth,
877
+ "stroke-linecap": t.strokeLinecap,
878
+ "stroke-linejoin": t.strokeLinejoin,
879
+ onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
880
+ }, n[1] || (n[1] = [
881
+ y("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
882
+ ]), 14, An);
883
+ }
884
+ var De = /* @__PURE__ */ nt(xn, [["render", Vn]]);
885
+ const In = Object.assign(De, {
886
+ install: (t, n) => {
887
+ var a;
888
+ const e = (a = n?.iconPrefix) != null ? a : "";
889
+ t.component(e + De.name, De);
890
+ }
891
+ }), Tn = /* @__PURE__ */ E({
752
892
  __name: "index",
753
893
  props: /* @__PURE__ */ ce({
754
894
  config: {},
@@ -764,41 +904,44 @@ const fn = /* @__PURE__ */ Y(dn, [["render", un], ["__file", "CheckBox.vue"]]),
764
904
  }),
765
905
  emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
766
906
  setup(t, { expose: n, emit: a }) {
767
- const e = t, o = a, l = ye(t, "modelValue"), s = He("widgetRef"), c = X(() => {
907
+ const e = t, o = a, l = ye(t, "modelValue"), s = Fe("widgetRef"), c = W(() => {
768
908
  switch (e.config?.widget?.widget) {
769
909
  case "TextBox":
770
910
  return Ke;
771
911
  case "Number":
772
- return Xt;
912
+ return tn;
773
913
  case "SelectList":
774
- return ze;
914
+ return We;
775
915
  case "Cascade":
776
- return nn;
916
+ return sn;
777
917
  case "File":
778
- return rn;
918
+ return dn;
779
919
  case "TextArea":
780
- return cn;
920
+ return pn;
781
921
  case "DropDown":
782
- return ze;
922
+ return We;
783
923
  case "CheckBox":
784
- return fn;
924
+ return _n;
785
925
  default:
786
926
  return Ke;
787
927
  }
788
- }), i = m(""), r = (b) => {
789
- i.value = b;
790
- }, d = (b, f) => {
791
- o("change", b, f);
928
+ }), i = m(""), r = (u) => {
929
+ i.value = u;
930
+ }, d = (u, p) => {
931
+ o("change", u, p);
792
932
  };
793
933
  function g() {
794
934
  return e.config?.widget?.widget === "File";
795
935
  }
936
+ function _(u) {
937
+ return u === "OtherInformationText" ? "Other Information" : u === "Other Information" ? "" : u;
938
+ }
796
939
  n({
797
940
  isFileUpload() {
798
941
  return e.config?.widget?.widget === "File";
799
942
  },
800
- submit(b) {
801
- return g() ? s.value.submit(b) : Promise.resolve(b);
943
+ submit(u) {
944
+ return g() ? s.value.submit(u) : Promise.resolve(u);
802
945
  },
803
946
  validate() {
804
947
  return s.value?.validate();
@@ -807,27 +950,39 @@ const fn = /* @__PURE__ */ Y(dn, [["render", un], ["__file", "CheckBox.vue"]]),
807
950
  return e?.config?.widget?.title;
808
951
  }
809
952
  });
810
- const _ = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: d, isFileUpload: g };
811
- return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
953
+ const k = { props: e, emits: o, model: l, widgetRef: s, curComp: c, errMsg: i, errHandler: r, changeHandler: d, isFileUpload: g, formatTitle: _, get IconQuestionCircle() {
954
+ return Sn;
955
+ } };
956
+ return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
812
957
  }
813
- }), mn = { class: "title" }, gn = {
958
+ }), Pn = { class: "title" }, Nn = {
814
959
  key: 0,
815
960
  class: "required"
816
- }, _n = {
961
+ }, Un = {
817
962
  key: 0,
818
963
  class: "err-msg"
819
964
  };
820
- function vn(t, n, a, e, o, l) {
821
- return u(), V("div", null, [
822
- x("div", mn, [
823
- re(te(e.props?.config?.widget?.title) + " ", 1),
824
- e.props.config.validations.length ? (u(), V("span", gn, "*")) : ae("", !0)
965
+ function Dn(t, n, a, e, o, l) {
966
+ const s = w("a-tooltip");
967
+ return f(), V("div", null, [
968
+ y("div", Pn, [
969
+ re(te(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
970
+ e.props.config.validations.length ? (f(), V("span", Nn, "*")) : ne("", !0),
971
+ e.props.config.widget.isVisible ? (f(), F(s, {
972
+ key: 1,
973
+ content: e.props.config.outputText
974
+ }, {
975
+ default: x(() => [
976
+ B(e.IconQuestionCircle, { class: "icon" })
977
+ ]),
978
+ _: 1
979
+ }, 8, ["content"])) : ne("", !0)
825
980
  ]),
826
- x("div", null, [
827
- (u(), B(Be(e.curComp), {
981
+ y("div", null, [
982
+ (f(), F(He(e.curComp), {
828
983
  ref: "widgetRef",
829
984
  modelValue: e.model,
830
- "onUpdate:modelValue": n[0] || (n[0] = (s) => e.model = s),
985
+ "onUpdate:modelValue": n[0] || (n[0] = (c) => e.model = c),
831
986
  "field-key": e.props.fieldKey,
832
987
  config: e.props.config.widget,
833
988
  validations: e.props.config.validations,
@@ -836,11 +991,11 @@ function vn(t, n, a, e, o, l) {
836
991
  onError: e.errHandler,
837
992
  onChange: e.changeHandler
838
993
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
839
- e.errMsg.length > 0 ? (u(), V("div", _n, te(e.errMsg), 1)) : ae("", !0)
994
+ e.errMsg.length > 0 ? (f(), V("div", Un, te(e.errMsg), 1)) : ne("", !0)
840
995
  ])
841
996
  ]);
842
997
  }
843
- const Le = /* @__PURE__ */ Y(pn, [["render", vn], ["__scopeId", "data-v-4bc9e33b"], ["__file", "index.vue"]]), bn = /* @__PURE__ */ z({
998
+ const je = /* @__PURE__ */ Q(Tn, [["render", Dn], ["__scopeId", "data-v-08801578"], ["__file", "index.vue"]]), Bn = /* @__PURE__ */ E({
844
999
  __name: "SubmitButton",
845
1000
  props: {
846
1001
  url: {},
@@ -858,20 +1013,20 @@ const Le = /* @__PURE__ */ Y(pn, [["render", vn], ["__scopeId", "data-v-4bc9e33b
858
1013
  return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
859
1014
  }
860
1015
  });
861
- function hn(t, n, a, e, o, l) {
862
- const s = k("AButton");
863
- return u(), B(s, {
1016
+ function Fn(t, n, a, e, o, l) {
1017
+ const s = w("AButton");
1018
+ return f(), F(s, {
864
1019
  loading: a.loading,
865
1020
  type: "primary",
866
1021
  onClick: e.clickHandler
867
1022
  }, {
868
- default: S(() => [
1023
+ default: x(() => [
869
1024
  de(t.$slots, "default")
870
1025
  ]),
871
1026
  _: 3
872
1027
  }, 8, ["loading"]);
873
1028
  }
874
- const We = /* @__PURE__ */ Y(bn, [["render", hn], ["__file", "SubmitButton.vue"]]), yn = /* @__PURE__ */ z({
1029
+ const Ge = /* @__PURE__ */ Q(Bn, [["render", Fn], ["__file", "SubmitButton.vue"]]), Hn = /* @__PURE__ */ E({
875
1030
  __name: "DetailLink",
876
1031
  props: {
877
1032
  url: {},
@@ -889,16 +1044,16 @@ const We = /* @__PURE__ */ Y(bn, [["render", hn], ["__file", "SubmitButton.vue"]
889
1044
  return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
890
1045
  }
891
1046
  });
892
- function wn(t, n, a, e, o, l) {
893
- const s = k("ALink");
894
- return u(), B(s, { onClick: e.clickHandler }, {
895
- default: S(() => [
1047
+ function Ln(t, n, a, e, o, l) {
1048
+ const s = w("ALink");
1049
+ return f(), F(s, { onClick: e.clickHandler }, {
1050
+ default: x(() => [
896
1051
  de(t.$slots, "default")
897
1052
  ]),
898
1053
  _: 3
899
1054
  });
900
1055
  }
901
- const kn = /* @__PURE__ */ Y(yn, [["render", wn], ["__file", "DetailLink.vue"]]), Cn = /* @__PURE__ */ z({
1056
+ const Rn = /* @__PURE__ */ Q(Hn, [["render", Ln], ["__file", "DetailLink.vue"]]), jn = /* @__PURE__ */ E({
902
1057
  __name: "index",
903
1058
  props: {
904
1059
  config: {},
@@ -911,50 +1066,50 @@ const kn = /* @__PURE__ */ Y(yn, [["render", wn], ["__file", "DetailLink.vue"]])
911
1066
  function l(d, g) {
912
1067
  o("click", e.config.widget, d, g, e.config.title);
913
1068
  }
914
- const s = X(() => {
1069
+ const s = W(() => {
915
1070
  switch (e.config.location) {
916
1071
  case "InOperation":
917
- return We;
1072
+ return Ge;
918
1073
  case "InTable":
919
- return kn;
1074
+ return Rn;
920
1075
  default:
921
- return We;
1076
+ return Ge;
922
1077
  }
923
- }), c = X(() => e.config.widget === q.Submit ? e.config.requestUrl ?? "" : e.config.widget === q.Link ? e.config.redirectUrl ?? "" : ""), i = X(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
1078
+ }), c = W(() => e.config.widget === Y.Submit ? e.config.requestUrl ?? "" : e.config.widget === Y.Link ? e.config.redirectUrl ?? "" : ""), i = W(() => e.config.redirectType ?? "Details"), r = { props: e, emits: o, clickHandler: l, curComp: s, curUrl: c, redirectType: i };
924
1079
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
925
1080
  }
926
1081
  });
927
- function Sn(t, n, a, e, o, l) {
928
- return u(), B(Be(e.curComp), {
1082
+ function $n(t, n, a, e, o, l) {
1083
+ return f(), F(He(e.curComp), {
929
1084
  url: e.curUrl,
930
1085
  "redirect-type": e.redirectType,
931
1086
  loading: a.loading,
932
1087
  onClick: e.clickHandler
933
1088
  }, {
934
- default: S(() => [
1089
+ default: x(() => [
935
1090
  re(te(e.props.config.title), 1)
936
1091
  ]),
937
1092
  _: 1
938
1093
  }, 8, ["url", "redirect-type", "loading"]);
939
1094
  }
940
- const Se = /* @__PURE__ */ Y(Cn, [["render", Sn], ["__file", "index.vue"]]), Xe = Symbol("library-router");
1095
+ const Se = /* @__PURE__ */ Q(jn, [["render", $n], ["__file", "index.vue"]]), ot = Symbol("library-router");
941
1096
  function xe() {
942
- const t = me(Xe, null);
943
- return t || dt();
1097
+ const t = me(ot, null);
1098
+ return t || mt();
944
1099
  }
945
- const Qe = Symbol("library-triggers");
946
- function je() {
947
- const t = me(Qe, null);
1100
+ const at = Symbol("library-triggers");
1101
+ function $e() {
1102
+ const t = me(at, null);
948
1103
  return t || {};
949
1104
  }
950
- const xn = Symbol("library-pinia"), Ze = Symbol("library-bpmStore"), et = Symbol("library-svrStore");
1105
+ const On = Symbol("library-pinia"), rt = Symbol("library-bpmStore"), st = Symbol("library-svrStore");
951
1106
  function Ae() {
952
- return me(Ze, null);
1107
+ return me(rt, null);
953
1108
  }
954
1109
  function Ve() {
955
- return me(et, null);
1110
+ return me(st, null);
956
1111
  }
957
- const An = /* @__PURE__ */ z({
1112
+ const Mn = /* @__PURE__ */ E({
958
1113
  __name: "TopBar",
959
1114
  props: {
960
1115
  title: {},
@@ -966,26 +1121,26 @@ const An = /* @__PURE__ */ z({
966
1121
  const a = {};
967
1122
  return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
968
1123
  }
969
- }), Vn = { class: "top-bar" }, Tn = { class: "banner-info" }, In = { class: "page-title" }, Pn = { class: "page-subtitle" }, Nn = { class: "avatar-wrapper" }, Un = { class: "user-email" };
970
- function Dn(t, n, a, e, o, l) {
971
- const s = k("a-avatar"), c = k("a-popover");
972
- return u(), V("div", Vn, [
973
- x("div", Tn, [
974
- x("div", In, te(a.title), 1),
975
- x("div", Pn, te(a.subTitle), 1)
1124
+ }), En = { class: "top-bar" }, zn = { class: "banner-info" }, Kn = { class: "page-title" }, Wn = { class: "page-subtitle" }, Gn = { class: "avatar-wrapper" }, qn = { class: "user-email" };
1125
+ function Yn(t, n, a, e, o, l) {
1126
+ const s = w("a-avatar"), c = w("a-popover");
1127
+ return f(), V("div", En, [
1128
+ y("div", zn, [
1129
+ y("div", Kn, te(a.title), 1),
1130
+ y("div", Wn, te(a.subTitle), 1)
976
1131
  ]),
977
- x("div", Nn, [
978
- H(c, { trigger: "click" }, {
979
- content: S(() => [
980
- x("div", Un, te(a.email), 1)
1132
+ y("div", Gn, [
1133
+ B(c, { trigger: "click" }, {
1134
+ content: x(() => [
1135
+ y("div", qn, te(a.email), 1)
981
1136
  ]),
982
- default: S(() => [
983
- H(s, {
1137
+ default: x(() => [
1138
+ B(s, {
984
1139
  size: 48,
985
1140
  autoFixFontSize: "",
986
1141
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
987
1142
  }, {
988
- default: S(() => [
1143
+ default: x(() => [
989
1144
  re(te(a.email.charAt(0).toUpperCase()), 1)
990
1145
  ]),
991
1146
  _: 1
@@ -996,9 +1151,9 @@ function Dn(t, n, a, e, o, l) {
996
1151
  ])
997
1152
  ]);
998
1153
  }
999
- const Te = /* @__PURE__ */ Y(An, [["render", Dn], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
1000
- function Me(t) {
1001
- const n = Fe(), a = [];
1154
+ const Ie = /* @__PURE__ */ Q(Mn, [["render", Yn], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
1155
+ function Oe(t) {
1156
+ const n = Le(), a = [];
1002
1157
  if (n.fieldsGroup) {
1003
1158
  n.fieldsGroup.forEach((l) => {
1004
1159
  const s = l.keys.map((c) => t.find((i) => i.fieldKey === c)).filter(Boolean);
@@ -1008,7 +1163,7 @@ function Me(t) {
1008
1163
  return o.length && a.push({ name: "Previous Grading (if applicable)", fields: o }), a;
1009
1164
  }
1010
1165
  }
1011
- class Ie {
1166
+ class Te {
1012
1167
  pageActionType;
1013
1168
  className = "";
1014
1169
  store = { svrStore: {}, bpmStore: {} };
@@ -1047,40 +1202,40 @@ class Ce {
1047
1202
  this.pageActionType = n, this.className = a, this.store = e, o && (this.opt = o);
1048
1203
  }
1049
1204
  getPageData() {
1050
- return this.opt ? Ee(this.pageActionType, this.className, this.store, this.opt) : Ee(this.pageActionType, this.className, this.store);
1205
+ return this.opt ? ze(this.pageActionType, this.className, this.store, this.opt) : ze(this.pageActionType, this.className, this.store);
1051
1206
  }
1052
1207
  getBtnList() {
1053
- return Ct(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
1208
+ return Vt(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
1054
1209
  }
1055
1210
  getFiles() {
1056
- return this.getWorkflowId() ? Ft(this.className, this.getWorkflowId()) : Promise.resolve({});
1211
+ return this.getWorkflowId() ? $t(this.className, this.getWorkflowId()) : Promise.resolve({});
1057
1212
  }
1058
1213
  removeFile(n) {
1059
- return Rt(this.className, n);
1214
+ return Ot(this.className, n);
1060
1215
  }
1061
1216
  getProcess() {
1062
- return Ht(this.className, this.getWorkflowId());
1217
+ return Rt(this.className, this.getWorkflowId());
1063
1218
  }
1064
1219
  getCommentsHistory() {
1065
- return Ot(this.getWorkflowId());
1220
+ return Kt(this.getWorkflowId());
1066
1221
  }
1067
1222
  getAssociator() {
1068
- return $t(this.getWorkflowId());
1223
+ return Wt(this.getWorkflowId());
1069
1224
  }
1070
1225
  getApprovers() {
1071
- return Lt();
1226
+ return Mt();
1072
1227
  }
1073
1228
  assignApprover(n) {
1074
- return jt(this.getWorkflowId(), n);
1229
+ return Et(this.getWorkflowId(), n);
1075
1230
  }
1076
1231
  addComments(n) {
1077
- return Mt(this.getWorkflowId(), this.getApproverEmail(), n);
1232
+ return zt(this.getWorkflowId(), this.getApproverEmail(), n);
1078
1233
  }
1079
1234
  deleteAssociator(n) {
1080
- return Et(n);
1235
+ return Gt(n);
1081
1236
  }
1082
1237
  }
1083
- const Hn = /* @__PURE__ */ z({
1238
+ const Qn = /* @__PURE__ */ E({
1084
1239
  __name: "CreateView",
1085
1240
  props: {
1086
1241
  className: {},
@@ -1088,7 +1243,7 @@ const Hn = /* @__PURE__ */ z({
1088
1243
  },
1089
1244
  setup(t, { expose: n }) {
1090
1245
  n();
1091
- const a = Ae(), e = Ve(), o = xe(), l = je(), s = He("dataWidgets"), c = pe(), i = t, r = m({
1246
+ const a = Ae(), e = Ve(), o = xe(), l = $e(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
1092
1247
  pageType: "",
1093
1248
  fields: {},
1094
1249
  globalValidations: [],
@@ -1097,103 +1252,103 @@ const Hn = /* @__PURE__ */ z({
1097
1252
  subTitle: ""
1098
1253
  }
1099
1254
  }), d = m([]), g = m({});
1100
- function _(T) {
1101
- return T ? Object.entries(T).map(([w, U]) => ({
1102
- fieldKey: w,
1255
+ function _(h) {
1256
+ return h ? Object.entries(h).map(([S, U]) => ({
1257
+ fieldKey: S,
1103
1258
  ...U
1104
- })).filter((w) => w.widget && w.widget.widget !== "Hidden").filter((w) => !Q.value.includes(w.fieldKey)) : [];
1259
+ })).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !X.value.includes(S.fieldKey)) : [];
1105
1260
  }
1106
- function b(T) {
1107
- return T ? Object.entries(T).filter(([w, U]) => U.dependent).reduce((w, [U, j]) => (w[U] = j.dependent, w), {}) : [];
1261
+ function k(h) {
1262
+ return h ? Object.entries(h).filter(([S, U]) => U.dependent).reduce((S, [U, j]) => (S[U] = j.dependent, S), {}) : [];
1108
1263
  }
1109
- const f = X(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), C = m(!1);
1264
+ const u = W(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), A = m(!1);
1110
1265
  ue(async () => {
1111
- C.value = !0;
1112
- const T = new Ie().setWorkflowId(i.workflowId).setClassName(i.className).setStore({ svrStore: e, bpmStore: a }).build();
1113
- r.value = await T.getPageData(), d.value = _(r.value.fields), g.value = b(r.value.fields);
1114
- for (const A in r.value.fields) {
1115
- if (r.value.fields[A].widget?.widget === "File") {
1116
- const w = d.value.find((U) => U.fieldKey === A);
1117
- w && w.widget && (w.widget.files = []);
1266
+ A.value = !0;
1267
+ const h = new Te().setWorkflowId(i.workflowId).setClassName(i.className).setStore({ svrStore: e, bpmStore: a }).build();
1268
+ r.value = await h.getPageData(), d.value = _(r.value.fields), g.value = k(r.value.fields);
1269
+ for (const I in r.value.fields) {
1270
+ if (r.value.fields[I].widget?.widget === "File") {
1271
+ const S = d.value.find((U) => U.fieldKey === I);
1272
+ S && S.widget && (S.widget.files = []);
1118
1273
  }
1119
- p.value[A] = r.value.fields[A].modelValue;
1274
+ p.value[I] = r.value.fields[I].modelValue;
1120
1275
  }
1121
- C.value = !1;
1276
+ A.value = !1;
1122
1277
  });
1123
1278
  function J() {
1124
1279
  return e()?.userInfo?.email_address ?? "";
1125
1280
  }
1126
- async function Z(T, A, w, U, j) {
1127
- switch (A) {
1128
- case q.Submit:
1129
- let R = !0;
1130
- if (s.value?.forEach((W) => {
1131
- W?.validate && (W.validate() || (R = !1));
1132
- }), !R) {
1281
+ async function Z(h, I, S, U, j) {
1282
+ switch (I) {
1283
+ case Y.Submit:
1284
+ let L = !0;
1285
+ if (s.value?.forEach((G) => {
1286
+ G?.validate && (G.validate() || (L = !1));
1287
+ }), !L) {
1133
1288
  c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1134
1289
  return;
1135
1290
  }
1136
- C.value = !0;
1291
+ A.value = !0;
1137
1292
  try {
1138
- const W = await xt(i.className, { ...p.value, ...g.value }, w), se = s.value?.map((ie) => ie?.submit ? ie.submit(W.toString()) : Promise.resolve()) || [];
1139
- await Promise.all(se), C.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${W.toString()}.`), o.push({ name: "Details", params: { workflowId: W.toString() } });
1293
+ const G = await Tt(i.className, { ...p.value, ...g.value }, S), se = s.value?.map((ie) => ie?.submit ? ie.submit(G.toString()) : Promise.resolve()) || [];
1294
+ await Promise.all(se), A.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() } });
1140
1295
  } catch {
1141
- c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), C.value = !1;
1296
+ c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), A.value = !1;
1142
1297
  }
1143
1298
  break;
1144
- case q.Link:
1299
+ case Y.Link:
1145
1300
  try {
1146
- await l[T.eventName || ""]?.(p.value, Q), o.push({ name: U, params: { className: i.className } });
1147
- } catch (W) {
1148
- console.error("Error in link action trigger:", W);
1301
+ await l[h.eventName || ""]?.(p.value, X), o.push({ name: U, params: { className: i.className } });
1302
+ } catch (G) {
1303
+ console.error("Error in link action trigger:", G);
1149
1304
  }
1150
1305
  break;
1151
1306
  default:
1152
- console.warn("Unknown action type:", A);
1307
+ console.warn("Unknown action type:", I);
1153
1308
  }
1154
1309
  }
1155
- const M = [
1310
+ const $ = [
1156
1311
  "jobScpope",
1157
1312
  "currentWorkdayId",
1158
1313
  "originalGrade",
1159
1314
  "jobTitlePrevious",
1160
1315
  "jobAttachmentPrevious",
1161
1316
  "positionId"
1162
- ], Q = m(M);
1163
- function ne(T, A) {
1164
- l[T]?.({ fieldValue: A, hiddenFields: Q, formData: p }), r.value && (d.value = _(r.value.fields));
1317
+ ], X = m($);
1318
+ function oe(h, I) {
1319
+ l[h]?.({ fieldValue: I, hiddenFields: X, formData: p }), r.value && (d.value = _(r.value.fields));
1165
1320
  }
1166
- const h = X(() => Me(d.value)), y = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: b, reversedActions: f, _data: p, loading: C, getApproverEmail: J, clickHandler: Z, newHiddenFields: M, hiddenFields: Q, changeHandler: ne, groupedFields: h, DataWidgets: Le, ActionButton: Se, TopBar: Te };
1167
- return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
1321
+ const C = W(() => Oe(d.value)), b = { bpmStore: a, svrStore: e, router: o, triggers: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: k, reversedActions: u, _data: p, loading: A, getApproverEmail: J, clickHandler: Z, newHiddenFields: $, hiddenFields: X, changeHandler: oe, groupedFields: C, DataWidgets: je, ActionButton: Se, TopBar: Ie };
1322
+ return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
1168
1323
  }
1169
- }), Bn = { class: "page-container" }, Fn = { class: "page-body" }, Rn = { class: "form-card" }, Ln = { class: "form-fields-vertical" }, jn = { class: "form-fields" }, Mn = {
1324
+ }), Jn = { class: "page-container" }, Xn = { class: "page-body" }, Zn = { class: "form-card" }, eo = { class: "form-fields-vertical" }, to = { class: "form-fields" }, no = {
1170
1325
  key: 0,
1171
1326
  class: "form-content"
1172
- }, On = { class: "page-footer" }, $n = { class: "action-container" }, En = { class: "action-buttons" };
1173
- function Kn(t, n, a, e, o, l) {
1174
- const s = k("a-card"), c = k("a-spin");
1175
- return u(), V("div", Bn, [
1176
- H(e.TopBar, {
1327
+ }, oo = { class: "page-footer" }, ao = { class: "action-container" }, ro = { class: "action-buttons" };
1328
+ function so(t, n, a, e, o, l) {
1329
+ const s = w("a-card"), c = w("a-spin");
1330
+ return f(), V("div", Jn, [
1331
+ B(e.TopBar, {
1177
1332
  title: e.pageData.banner.title,
1178
1333
  subTitle: e.pageData.banner.subTitle,
1179
1334
  email: e.getApproverEmail()
1180
1335
  }, null, 8, ["title", "subTitle", "email"]),
1181
- x("div", Fn, [
1182
- H(c, {
1336
+ y("div", Xn, [
1337
+ B(c, {
1183
1338
  loading: e.loading,
1184
1339
  class: "form-container"
1185
1340
  }, {
1186
- default: S(() => [
1187
- x("div", Rn, [
1188
- x("div", Ln, [
1189
- (u(!0), V($, null, G(e.groupedFields, (i) => (u(), B(s, {
1341
+ default: x(() => [
1342
+ y("div", Zn, [
1343
+ y("div", eo, [
1344
+ (f(!0), V(M, null, q(e.groupedFields, (i) => (f(), F(s, {
1190
1345
  key: i.name,
1191
1346
  title: i.name,
1192
1347
  style: { "margin-bottom": "24px" }
1193
1348
  }, {
1194
- default: S(() => [
1195
- x("div", jn, [
1196
- (u(!0), V($, null, G(i.fields, (r) => (u(), B(e.DataWidgets, {
1349
+ default: x(() => [
1350
+ y("div", to, [
1351
+ (f(!0), V(M, null, q(i.fields, (r) => (f(), F(e.DataWidgets, {
1197
1352
  key: r.fieldKey,
1198
1353
  ref_for: !0,
1199
1354
  ref: "dataWidgets",
@@ -1210,20 +1365,20 @@ function Kn(t, n, a, e, o, l) {
1210
1365
  _: 2
1211
1366
  }, 1032, ["title"]))), 128))
1212
1367
  ]),
1213
- t.$slots.content ? (u(), V("div", Mn, [
1368
+ t.$slots.content ? (f(), V("div", no, [
1214
1369
  de(t.$slots, "content", {}, void 0, !0)
1215
- ])) : ae("", !0)
1370
+ ])) : ne("", !0)
1216
1371
  ])
1217
1372
  ]),
1218
1373
  _: 3
1219
1374
  }, 8, ["loading"])
1220
1375
  ]),
1221
- x("div", On, [
1222
- x("div", $n, [
1376
+ y("div", oo, [
1377
+ y("div", ao, [
1223
1378
  de(t.$slots, "action", {}, void 0, !0),
1224
- x("div", En, [
1225
- (u(!0), V($, null, G(e.reversedActions, (i) => (u(), B(e.ActionButton, {
1226
- key: i.Title,
1379
+ y("div", ro, [
1380
+ (f(!0), V(M, null, q(e.reversedActions, (i) => (f(), F(e.ActionButton, {
1381
+ key: i.title,
1227
1382
  loading: e.loading,
1228
1383
  config: i,
1229
1384
  class: "action-button",
@@ -1234,7 +1389,7 @@ function Kn(t, n, a, e, o, l) {
1234
1389
  ])
1235
1390
  ]);
1236
1391
  }
1237
- const zn = /* @__PURE__ */ Y(Hn, [["render", Kn], ["__scopeId", "data-v-68ab1bc3"], ["__file", "CreateView.vue"]]), Wn = /* @__PURE__ */ z({
1392
+ const io = /* @__PURE__ */ Q(Qn, [["render", so], ["__scopeId", "data-v-2fce8732"], ["__file", "CreateView.vue"]]), lo = /* @__PURE__ */ E({
1238
1393
  __name: "UpdateView",
1239
1394
  props: {
1240
1395
  className: {},
@@ -1242,7 +1397,7 @@ const zn = /* @__PURE__ */ Y(Hn, [["render", Kn], ["__scopeId", "data-v-68ab1bc3
1242
1397
  },
1243
1398
  setup(t, { expose: n }) {
1244
1399
  n();
1245
- const a = xe(), e = je(), o = Ve(), l = Ae(), s = He("dataWidgets"), c = pe(), i = t, r = m({
1400
+ const a = xe(), e = $e(), o = Ve(), l = Ae(), s = Fe("dataWidgets"), c = pe(), i = t, r = m({
1246
1401
  pageType: "",
1247
1402
  fields: {},
1248
1403
  globalValidations: [],
@@ -1251,102 +1406,102 @@ const zn = /* @__PURE__ */ Y(Hn, [["render", Kn], ["__scopeId", "data-v-68ab1bc3
1251
1406
  subTitle: ""
1252
1407
  }
1253
1408
  }), d = m([]), g = m({});
1254
- function _(y) {
1255
- return y ? Object.entries(y).map(([A, w]) => ({
1256
- fieldKey: A,
1257
- ...w
1258
- })).filter((A) => A.widget && A.widget.widget !== "Hidden").filter((A) => !M.value.includes(A.fieldKey)) : [];
1409
+ function _(b) {
1410
+ return b ? Object.entries(b).map(([I, S]) => ({
1411
+ fieldKey: I,
1412
+ ...S
1413
+ })).filter((I) => I.widget && I.widget.widget !== "Hidden").filter((I) => !$.value.includes(I.fieldKey)) : [];
1259
1414
  }
1260
- function b(y) {
1261
- return y ? Object.entries(y).filter(([A, w]) => w.dependent).reduce((A, [w, U]) => (A[w] = U.dependent, A), {}) : [];
1415
+ function k(b) {
1416
+ return b ? Object.entries(b).filter(([I, S]) => S.dependent).reduce((I, [S, U]) => (I[S] = U.dependent, I), {}) : [];
1262
1417
  }
1263
- const f = X(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), C = m(!1);
1418
+ const u = W(() => r.value?.actions ? [...r.value.actions].reverse() : []), p = m({}), A = m(!1);
1264
1419
  ue(async () => {
1265
- C.value = !0;
1266
- const y = new Ie().setPageActionType(fe.Update).setClassName(i.className).setStore({ svrStore: o, bpmStore: l }).setWorkflowId(i.workflowId).build();
1267
- r.value = await y.getPageData();
1268
- const T = await y.getBtnList(), A = await y.getFiles();
1420
+ A.value = !0;
1421
+ const b = new Te().setPageActionType(fe.Update).setClassName(i.className).setStore({ svrStore: o, bpmStore: l }).setWorkflowId(i.workflowId).build();
1422
+ r.value = await b.getPageData();
1423
+ const h = await b.getBtnList(), I = await b.getFiles();
1269
1424
  r.value.actions = r.value.actions?.filter((U) => {
1270
- const j = T.find((R) => R.button === U.title);
1425
+ const j = h.find((L) => L.button === U.title);
1271
1426
  return j ? j.isShow : !0;
1272
1427
  });
1273
- const w = r.value.fields.requestType.modelValue;
1274
- e.Test?.({ fieldValue: w, hiddenFields: M, formData: p }), d.value = _(r.value.fields), g.value = b(r.value.fields);
1428
+ const S = r.value.fields.requestType.modelValue;
1429
+ e.Test?.({ fieldValue: S, hiddenFields: $, formData: p }), d.value = _(r.value.fields), g.value = k(r.value.fields);
1275
1430
  for (const U in r.value.fields) {
1276
1431
  if (r.value.fields[U].widget?.widget === "File") {
1277
- const j = d.value.find((R) => R.fieldKey === U);
1278
- j && j.widget && (j.widget.files = A[U] ?? [], j.widget.removeFile = (R) => y.removeFile(R));
1432
+ const j = d.value.find((L) => L.fieldKey === U);
1433
+ j && j.widget && (j.widget.files = I[U] ?? [], j.widget.removeFile = (L) => b.removeFile(L));
1279
1434
  }
1280
1435
  p.value[U] = r.value.fields[U].modelValue;
1281
1436
  }
1282
- C.value = !1;
1437
+ A.value = !1;
1283
1438
  });
1284
1439
  function J() {
1285
1440
  return o()?.userInfo?.email_address ?? "";
1286
1441
  }
1287
- async function Z(y, T, A, w, U) {
1288
- switch (T) {
1289
- case q.Submit:
1442
+ async function Z(b, h, I, S, U) {
1443
+ switch (h) {
1444
+ case Y.Submit:
1290
1445
  let j = !0;
1291
- if (s.value?.forEach((R) => {
1292
- R?.validate && (R.validate() || (j = !1));
1446
+ if (s.value?.forEach((L) => {
1447
+ L?.validate && (L.validate() || (j = !1));
1293
1448
  }), !j) {
1294
1449
  c?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1295
1450
  return;
1296
1451
  }
1297
- C.value = !0;
1452
+ A.value = !0;
1298
1453
  try {
1299
- const R = await At(i.className, i.workflowId, { ...p.value, ...g.value }, A), W = s.value?.map((se) => se?.submit ? se.submit(R.toString()) : Promise.resolve()) || [];
1300
- await Promise.all(W), C.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${R.toString()}.`);
1454
+ const L = await Pt(i.className, i.workflowId, { ...p.value, ...g.value }, I), G = s.value?.map((se) => se?.submit ? se.submit(L.toString()) : Promise.resolve()) || [];
1455
+ await Promise.all(G), A.value = !1, c?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${L.toString()}.`);
1301
1456
  } catch {
1302
- c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), C.value = !1;
1457
+ c?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), A.value = !1;
1303
1458
  }
1304
1459
  break;
1305
- case q.Link:
1460
+ case Y.Link:
1306
1461
  try {
1307
- await e[y.eventName || ""]?.(p.value, M), a.push({ name: w, params: { className: i.className } });
1462
+ await e[b.eventName || ""]?.(p.value, $), a.push({ name: S, params: { className: i.className } });
1308
1463
  } catch {
1309
1464
  }
1310
1465
  break;
1311
1466
  default:
1312
- console.warn("Unknown action type:", T);
1467
+ console.warn("Unknown action type:", h);
1313
1468
  }
1314
1469
  }
1315
- const M = m([]);
1316
- function Q(y, T) {
1317
- e[y]?.({ fieldValue: T, hiddenFields: M, formData: p }), r.value && (d.value = _(r.value.fields));
1470
+ const $ = m([]);
1471
+ function X(b, h) {
1472
+ e[b]?.({ fieldValue: h, hiddenFields: $, formData: p }), r.value && (d.value = _(r.value.fields));
1318
1473
  }
1319
- const ne = X(() => Me(d.value)), h = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: b, reversedActions: f, _data: p, loading: C, getApproverEmail: J, clickHandler: Z, hiddenFields: M, changeHandler: Q, groupedFields: ne, DataWidgets: Le, ActionButton: Se, TopBar: Te };
1320
- return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
1474
+ const oe = W(() => Oe(d.value)), C = { router: a, triggers: e, svrStore: o, bpmStore: l, dataWidgetsRefs: s, instance: c, props: i, pageData: r, _fields: d, _dependent: g, genField: _, genDependentField: k, reversedActions: u, _data: p, loading: A, getApproverEmail: J, clickHandler: Z, hiddenFields: $, changeHandler: X, groupedFields: oe, DataWidgets: je, ActionButton: Se, TopBar: Ie };
1475
+ return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
1321
1476
  }
1322
- }), Gn = { class: "page-container" }, qn = { class: "page-body" }, Yn = { class: "form-card" }, Jn = { class: "form-fields-vertical" }, Xn = { class: "form-fields" }, Qn = {
1477
+ }), co = { class: "page-container" }, uo = { class: "page-body" }, fo = { class: "form-card" }, po = { class: "form-fields-vertical" }, mo = { class: "form-fields" }, go = {
1323
1478
  key: 0,
1324
1479
  class: "form-content"
1325
- }, Zn = { class: "page-footer" }, eo = { class: "action-container" }, to = { class: "action-buttons" };
1326
- function no(t, n, a, e, o, l) {
1327
- const s = k("a-card"), c = k("a-spin");
1328
- return u(), V("div", Gn, [
1329
- H(e.TopBar, {
1480
+ }, _o = { class: "page-footer" }, vo = { class: "action-container" }, bo = { class: "action-buttons" };
1481
+ function ho(t, n, a, e, o, l) {
1482
+ const s = w("a-card"), c = w("a-spin");
1483
+ return f(), V("div", co, [
1484
+ B(e.TopBar, {
1330
1485
  title: e.pageData.banner.title,
1331
1486
  subTitle: e.pageData.banner.subTitle,
1332
1487
  email: e.getApproverEmail()
1333
1488
  }, null, 8, ["title", "subTitle", "email"]),
1334
- x("div", qn, [
1335
- H(c, {
1489
+ y("div", uo, [
1490
+ B(c, {
1336
1491
  loading: e.loading,
1337
1492
  class: "form-container"
1338
1493
  }, {
1339
- default: S(() => [
1340
- x("div", Yn, [
1341
- x("div", Jn, [
1342
- (u(!0), V($, null, G(e.groupedFields, (i) => (u(), B(s, {
1494
+ default: x(() => [
1495
+ y("div", fo, [
1496
+ y("div", po, [
1497
+ (f(!0), V(M, null, q(e.groupedFields, (i) => (f(), F(s, {
1343
1498
  key: i.name,
1344
1499
  title: i.name,
1345
1500
  style: { "margin-bottom": "24px" }
1346
1501
  }, {
1347
- default: S(() => [
1348
- x("div", Xn, [
1349
- (u(!0), V($, null, G(i.fields, (r) => (u(), B(e.DataWidgets, {
1502
+ default: x(() => [
1503
+ y("div", mo, [
1504
+ (f(!0), V(M, null, q(i.fields, (r) => (f(), F(e.DataWidgets, {
1350
1505
  key: r.fieldKey,
1351
1506
  ref_for: !0,
1352
1507
  ref: "dataWidgets",
@@ -1363,20 +1518,20 @@ function no(t, n, a, e, o, l) {
1363
1518
  _: 2
1364
1519
  }, 1032, ["title"]))), 128))
1365
1520
  ]),
1366
- t.$slots.content ? (u(), V("div", Qn, [
1521
+ t.$slots.content ? (f(), V("div", go, [
1367
1522
  de(t.$slots, "content", {}, void 0, !0)
1368
- ])) : ae("", !0)
1523
+ ])) : ne("", !0)
1369
1524
  ])
1370
1525
  ]),
1371
1526
  _: 3
1372
1527
  }, 8, ["loading"])
1373
1528
  ]),
1374
- x("div", Zn, [
1375
- x("div", eo, [
1529
+ y("div", _o, [
1530
+ y("div", vo, [
1376
1531
  de(t.$slots, "action", {}, void 0, !0),
1377
- x("div", to, [
1378
- (u(!0), V($, null, G(e.reversedActions, (i) => (u(), B(e.ActionButton, {
1379
- key: i.Title,
1532
+ y("div", bo, [
1533
+ (f(!0), V(M, null, q(e.reversedActions, (i) => (f(), F(e.ActionButton, {
1534
+ key: i.title,
1380
1535
  loading: e.loading,
1381
1536
  config: i,
1382
1537
  class: "action-button",
@@ -1387,87 +1542,11 @@ function no(t, n, a, e, o, l) {
1387
1542
  ])
1388
1543
  ]);
1389
1544
  }
1390
- const oo = /* @__PURE__ */ Y(Wn, [["render", no], ["__scopeId", "data-v-c638b3c1"], ["__file", "UpdateView.vue"]]), tt = Symbol("library-custom-comp");
1391
- function ao() {
1392
- return me(tt, null);
1393
- }
1394
- const ro = Symbol("ArcoConfigProvider"), so = "arco", io = "$arco", lo = (t) => {
1395
- var n, a, e;
1396
- const o = pe(), l = me(ro, void 0);
1397
- return `${(e = (a = l?.prefixCls) != null ? a : (n = o?.appContext.config.globalProperties[io]) == null ? void 0 : n.classPrefix) != null ? e : so}-${t}`;
1398
- }, co = Object.prototype.toString;
1399
- function uo(t) {
1400
- return co.call(t) === "[object Number]" && t === t;
1401
- }
1402
- var fo = (t, n) => {
1403
- for (const [a, e] of n)
1404
- t[a] = e;
1405
- return t;
1406
- };
1407
- const po = z({
1408
- name: "IconDownload",
1409
- props: {
1410
- size: {
1411
- type: [Number, String]
1412
- },
1413
- strokeWidth: {
1414
- type: Number,
1415
- default: 4
1416
- },
1417
- strokeLinecap: {
1418
- type: String,
1419
- default: "butt",
1420
- validator: (t) => ["butt", "round", "square"].includes(t)
1421
- },
1422
- strokeLinejoin: {
1423
- type: String,
1424
- default: "miter",
1425
- validator: (t) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(t)
1426
- },
1427
- rotate: Number,
1428
- spin: Boolean
1429
- },
1430
- emits: {
1431
- click: (t) => !0
1432
- },
1433
- setup(t, { emit: n }) {
1434
- const a = lo("icon"), e = X(() => [a, `${a}-download`, { [`${a}-spin`]: t.spin }]), o = X(() => {
1435
- const s = {};
1436
- return t.size && (s.fontSize = uo(t.size) ? `${t.size}px` : t.size), t.rotate && (s.transform = `rotate(${t.rotate}deg)`), s;
1437
- });
1438
- return {
1439
- cls: e,
1440
- innerStyle: o,
1441
- onClick: (s) => {
1442
- n("click", s);
1443
- }
1444
- };
1445
- }
1446
- }), mo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
1447
- function go(t, n, a, e, o, l) {
1448
- return u(), V("svg", {
1449
- viewBox: "0 0 48 48",
1450
- fill: "none",
1451
- xmlns: "http://www.w3.org/2000/svg",
1452
- stroke: "currentColor",
1453
- class: at(t.cls),
1454
- style: ot(t.innerStyle),
1455
- "stroke-width": t.strokeWidth,
1456
- "stroke-linecap": t.strokeLinecap,
1457
- "stroke-linejoin": t.strokeLinejoin,
1458
- onClick: n[0] || (n[0] = (...s) => t.onClick && t.onClick(...s))
1459
- }, n[1] || (n[1] = [
1460
- x("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
1461
- ]), 14, mo);
1545
+ const yo = /* @__PURE__ */ Q(lo, [["render", ho], ["__scopeId", "data-v-a0ee3911"], ["__file", "UpdateView.vue"]]), it = Symbol("library-custom-comp");
1546
+ function wo() {
1547
+ return me(it, null);
1462
1548
  }
1463
- var Ue = /* @__PURE__ */ fo(po, [["render", go]]);
1464
- const _o = Object.assign(Ue, {
1465
- install: (t, n) => {
1466
- var a;
1467
- const e = (a = n?.iconPrefix) != null ? a : "";
1468
- t.component(e + Ue.name, Ue);
1469
- }
1470
- }), vo = /* @__PURE__ */ z({
1549
+ const ko = /* @__PURE__ */ E({
1471
1550
  __name: "DetailView",
1472
1551
  props: {
1473
1552
  className: {},
@@ -1475,7 +1554,7 @@ const _o = Object.assign(Ue, {
1475
1554
  },
1476
1555
  setup(t, { expose: n }) {
1477
1556
  n();
1478
- const a = Ve(), e = Ae(), o = je(), l = xe(), s = ao(), c = pe(), i = t;
1557
+ const a = Ve(), e = Ae(), o = $e(), l = xe(), s = wo(), c = pe(), i = t;
1479
1558
  let r;
1480
1559
  const d = m({
1481
1560
  pageType: "",
@@ -1487,16 +1566,16 @@ const _o = Object.assign(Ue, {
1487
1566
  }
1488
1567
  }), g = m([]);
1489
1568
  function _(P) {
1490
- return P ? Object.entries(P).map(([O, I]) => (typeof I.modelValue == "boolean" ? I.fieldValue = I.modelValue ? "Yes" : "No" : I.fieldValue = I.modelValue, {
1569
+ return P ? Object.entries(P).map(([O, T]) => (typeof T.modelValue == "boolean" ? T.fieldValue = T.modelValue ? "Yes" : "No" : T.fieldValue = T.modelValue, {
1491
1570
  fieldKey: O,
1492
- ...I
1493
- })).filter((O) => O.widget && O.widget.widget !== "Hidden").filter((O) => !y.value.includes(O.fieldKey)) : [];
1571
+ ...T
1572
+ })).filter((O) => O.widget && O.widget.widget !== "Hidden").filter((O) => !b.value.includes(O.fieldKey)) : [];
1494
1573
  }
1495
- const b = X(() => Me(g.value)), f = X(() => d.value?.actions ? [...d.value.actions].reverse() : []), p = m(!0), C = (P, F) => {
1496
- const O = P.findIndex((I) => I.isCurrent);
1497
- return P.map((I, oe) => {
1574
+ const k = W(() => Oe(g.value)), u = W(() => d.value?.actions ? [...d.value.actions].reverse() : []), p = m(!0), A = (P, H) => {
1575
+ const O = P.findIndex((T) => T.isCurrent);
1576
+ return P.map((T, ae) => {
1498
1577
  const D = {
1499
- id: I.id,
1578
+ id: T.id,
1500
1579
  title: "",
1501
1580
  proxy: "",
1502
1581
  sub: "",
@@ -1504,93 +1583,93 @@ const _o = Object.assign(Ue, {
1504
1583
  status: 1,
1505
1584
  time: ""
1506
1585
  };
1507
- D.title = I.workflowProcessApprovers[0]?.name;
1508
- const ve = I.workflowProcessApprovers[I.workflowProcessApprovers.length - 1], we = I.workflowHistorys[I.workflowHistorys.length - 1], be = we?.workflowHistoryApprovers[we?.workflowHistoryApprovers?.length - 1];
1509
- if (ve && be && ve?.email?.toLowerCase() !== be?.approverEmail?.toLowerCase() && (D.title = `${be.name}`, D.proxy = `Proxy: ${ve.name}`), I.sort > 1 ? D.sub = "Approver Role: " + I.nodeName.replace("Submit", "").replace("Approve", "") : D.sub = "Submit Application", I.isCurrent && F !== -1)
1586
+ D.title = T.workflowProcessApprovers[0]?.name;
1587
+ const ve = T.workflowProcessApprovers[T.workflowProcessApprovers.length - 1], we = T.workflowHistorys[T.workflowHistorys.length - 1], be = we?.workflowHistoryApprovers[we?.workflowHistoryApprovers?.length - 1];
1588
+ if (ve && be && ve?.email?.toLowerCase() !== be?.approverEmail?.toLowerCase() && (D.title = `${be.name}`, D.proxy = `Proxy: ${ve.name}`), T.sort > 1 ? D.sub = "Approver Role: " + T.nodeName.replace("Submit", "").replace("Approve", "") : D.sub = "Submit Application", T.isCurrent && H !== -1)
1510
1589
  D.desc = "In Approval", D.status = 1;
1511
1590
  else {
1512
- const ee = I.workflowHistorys[I.workflowHistorys.length - 1];
1591
+ const ee = T.workflowHistorys[T.workflowHistorys.length - 1];
1513
1592
  if (ee && ee.status === 100)
1514
1593
  D.time = ke(ee.takeActionAt, "yyyy-MM-dd hh:mm:ss"), D.status = 2, D.desc = "approve success!";
1515
1594
  else if (ee && ee.status === 999)
1516
1595
  D.time = ke(ee.takeActionAt, "yyyy-MM-dd hh:mm:ss"), D.status = 0, D.desc = "approve reject!";
1517
1596
  else if (ee)
1518
- if (D.time = ke(ee.takeActionAt, "yyyy-MM-dd hh:mm:ss"), I.sort === 1)
1597
+ if (D.time = ke(ee.takeActionAt, "yyyy-MM-dd hh:mm:ss"), T.sort === 1)
1519
1598
  D.status = 2, D.desc = "";
1520
1599
  else {
1521
- const Oe = ee.workflowHistoryApprovers[0];
1522
- D.status = 3, D.desc = Oe?.reason ? `Rejected reason: ${Oe.reason}` : "Rejected";
1600
+ const Me = ee.workflowHistoryApprovers[0];
1601
+ D.status = 3, D.desc = Me?.reason ? `Rejected reason: ${Me.reason}` : "Rejected";
1523
1602
  }
1524
- else oe < O || O === -1 ? (D.status = 0, D.desc = "Skipped") : (D.status = 0, D.desc = "Pending Approval");
1603
+ else ae < O || O === -1 ? (D.status = 0, D.desc = "Skipped") : (D.status = 0, D.desc = "Pending Approval");
1525
1604
  ee && ee.status;
1526
1605
  }
1527
1606
  return D;
1528
1607
  });
1529
- }, J = m([]), Z = m(!1), M = m(!1), Q = m(!1), ne = m(!1);
1530
- async function h() {
1608
+ }, J = m([]), Z = m(!1), $ = m(!1), X = m(!1), oe = m(!1);
1609
+ async function C() {
1531
1610
  const P = await r.getBtnList();
1532
- d.value.actions = d.value.actions?.filter((F) => {
1533
- const O = P.find((I) => I.button === F.title);
1611
+ d.value.actions = d.value.actions?.filter((H) => {
1612
+ const O = P.find((T) => T.button === H.title);
1534
1613
  return O ? O.isShow : !0;
1535
- }), Z.value = P.find((F) => F.button === "IsGlobal")?.isShow ?? !1, M.value = P.find((F) => F.button === "AssignButton")?.isShow ?? !1, Q.value = P.find((F) => F.button === "AssignList")?.isShow ?? !1, ne.value = P.find((F) => F.button === "AddCommentsButton")?.isShow ?? !1;
1614
+ }), Z.value = P.find((H) => H.button === "IsGlobal")?.isShow ?? !1, $.value = P.find((H) => H.button === "AssignButton")?.isShow ?? !1, X.value = P.find((H) => H.button === "AssignList")?.isShow ?? !1, oe.value = P.find((H) => H.button === "AddCommentsButton")?.isShow ?? !1;
1536
1615
  }
1537
- const y = m([]);
1538
- async function T() {
1539
- p.value = !0, r = new Ie().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(), d.value = await r.getPageData();
1616
+ const b = m([]);
1617
+ async function h() {
1618
+ p.value = !0, r = new Te().setPageActionType(fe.Details).setClassName(i.className).setStore({ svrStore: a, bpmStore: e }).setWorkflowId(i.workflowId).build(), d.value = await r.getPageData();
1540
1619
  const P = await r.getFiles();
1541
- se.value = await r.getApprovers(), R.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(), h();
1542
- const F = d.value.fields.requestType.modelValue;
1543
- o.Test?.({ fieldValue: F, hiddenFields: y }), g.value = _(d.value.fields);
1544
- for (const I in d.value.fields)
1545
- if (d.value.fields[I].widget?.widget === "File") {
1546
- const oe = g.value.find((D) => D.fieldKey === I);
1547
- oe && oe.widget && (oe.widget.files = P[I] ?? []);
1620
+ se.value = await r.getApprovers(), L.value = await r.getCommentsHistory(), ie.value = await r.getAssociator(), C();
1621
+ const H = d.value.fields.requestType.modelValue;
1622
+ o.Test?.({ fieldValue: H, hiddenFields: b }), g.value = _(d.value.fields);
1623
+ for (const T in d.value.fields)
1624
+ if (d.value.fields[T].widget?.widget === "File") {
1625
+ const ae = g.value.find((D) => D.fieldKey === T);
1626
+ ae && ae.widget && (ae.widget.files = P[T] ?? []);
1548
1627
  }
1549
1628
  const O = await r.getProcess();
1550
- J.value = C(O, 0), p.value = !1;
1629
+ J.value = A(O, 0), p.value = !1;
1551
1630
  }
1552
- ue(T);
1553
- async function A(P, F) {
1554
- return o[P]?.(F);
1631
+ ue(h);
1632
+ async function I(P, H) {
1633
+ return o[P]?.(H);
1555
1634
  }
1556
- function w() {
1635
+ function S() {
1557
1636
  return a()?.userInfo?.email_address ?? "";
1558
1637
  }
1559
- async function U(P, F, O, I, oe) {
1638
+ async function U(P, H, O, T, ae) {
1560
1639
  try {
1561
- switch (F) {
1562
- case q.Submit:
1563
- const { reason: D, ifGlobal: ve } = await A(oe, { isGlobal: Z.value });
1640
+ switch (H) {
1641
+ case Y.Submit:
1642
+ const { reason: D, ifGlobal: ve } = await I(ae, { isGlobal: Z.value });
1564
1643
  p.value = !0;
1565
- const we = oe === "Approve" ? "100" : "-1";
1566
- await Ut(i.className, i.workflowId, w(), D, [Number(i.workflowId)], O, we, ve), p.value = !1;
1567
- const be = oe === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
1568
- c?.appContext.config.globalProperties.$notification.success(be), T();
1644
+ const we = ae === "Approve" ? "100" : "-1";
1645
+ await Ht(i.className, i.workflowId, S(), D, [Number(i.workflowId)], O, we, ve), p.value = !1;
1646
+ const be = ae === "Approve" ? `Request ID ${i.workflowId} has been approved.` : `Request ID ${i.workflowId} has been rejected.`;
1647
+ c?.appContext.config.globalProperties.$notification.success(be), h();
1569
1648
  break;
1570
- case q.Link:
1649
+ case Y.Link:
1571
1650
  try {
1572
- await o[P.eventName || ""]?.(), l.push({ name: I, params: { className: i.className, workflowId: i.workflowId } });
1651
+ await o[P.eventName || ""]?.(), l.push({ name: T, params: { className: i.className, workflowId: i.workflowId } });
1573
1652
  } catch (ee) {
1574
1653
  console.error("Error in link action trigger:", ee);
1575
1654
  }
1576
1655
  break;
1577
- case q.Button:
1656
+ case Y.Button:
1578
1657
  await o[P.eventName || ""]?.({
1579
1658
  approvers: se,
1580
1659
  associators: ie,
1581
- isShowAssignSelect: M,
1582
- isShowAssignList: Q,
1660
+ isShowAssignSelect: $,
1661
+ isShowAssignList: X,
1583
1662
  assignCallback: _e,
1584
1663
  deleteAssociatorCallback: N
1585
1664
  });
1586
1665
  break;
1587
1666
  default:
1588
- console.warn("Unknown action type:", F);
1667
+ console.warn("Unknown action type:", H);
1589
1668
  }
1590
1669
  } catch {
1591
1670
  }
1592
1671
  }
1593
- const j = m(""), R = m([]), W = m(""), se = m([]), ie = m([]);
1672
+ const j = m(""), L = m([]), G = m(""), se = m([]), ie = m([]);
1594
1673
  async function _e(P) {
1595
1674
  if (!P) {
1596
1675
  c?.appContext.config.globalProperties.$message.error("Please select an approver");
@@ -1598,25 +1677,25 @@ const _o = Object.assign(Ue, {
1598
1677
  }
1599
1678
  await v("Confirm Assign Approver", "Do you want to assign the selected approver?");
1600
1679
  try {
1601
- await r.assignApprover(P), ie.value = await r.getAssociator(), h(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1602
- } catch (F) {
1603
- if (F.status === 409) {
1680
+ await r.assignApprover(P), ie.value = await r.getAssociator(), C(), c?.appContext.config.globalProperties.$notification.success("Assign Approver clicked!");
1681
+ } catch (H) {
1682
+ if (H.status === 409) {
1604
1683
  c?.appContext.config.globalProperties.$notification.error("This user is already an associator");
1605
1684
  return;
1606
1685
  }
1607
1686
  c?.appContext.config.globalProperties.$notification.error("Failed to assign approver");
1608
1687
  }
1609
1688
  }
1610
- async function v(P, F) {
1689
+ async function v(P, H) {
1611
1690
  const { Modal: O } = await import("@arco-design/web-vue");
1612
- return new Promise((I, oe) => {
1691
+ return new Promise((T, ae) => {
1613
1692
  O.confirm({
1614
1693
  title: P,
1615
- content: F,
1694
+ content: H,
1616
1695
  okText: "OK",
1617
1696
  cancelText: "Cancel",
1618
- onOk: () => I(!0),
1619
- onCancel: () => oe()
1697
+ onOk: () => T(!0),
1698
+ onCancel: () => ae()
1620
1699
  });
1621
1700
  });
1622
1701
  }
@@ -1632,155 +1711,155 @@ const _o = Object.assign(Ue, {
1632
1711
  c?.appContext.config.globalProperties.$notification.error("Failed to delete associator");
1633
1712
  }
1634
1713
  }
1635
- async function L() {
1714
+ async function R() {
1636
1715
  if (!j.value.trim()) {
1637
1716
  c?.appContext.config.globalProperties.$message.error("Comment cannot be empty");
1638
1717
  return;
1639
1718
  }
1640
- await r.addComments(j.value.trim()), j.value = "", R.value = await r.getCommentsHistory(), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1719
+ await r.addComments(j.value.trim()), j.value = "", L.value = await r.getCommentsHistory(), c?.appContext.config.globalProperties.$notification.success("Add Comment clicked!");
1641
1720
  }
1642
1721
  const le = { svrStore: a, bpmStore: e, triggers: o, router: l, customComps: s, instance: c, props: i, get page() {
1643
1722
  return r;
1644
1723
  }, set page(P) {
1645
1724
  r = P;
1646
- }, pageData: d, _fields: g, genField: _, groupedFields: b, reversedActions: f, loading: p, mapWorkflowSteps: C, steps: J, isGlobal: Z, isShowAssignSelect: M, isShowAssignList: Q, isShowCommentTextArea: ne, reloadButtonList: h, hiddenFields: y, load: T, triggerFn: A, getApproverEmail: w, clickHandler: U, comment: j, commentsHistory: R, selectedApprover: W, approvers: se, associators: ie, onAssignApprover: _e, confirmDialog: v, onDeleteAssociator: N, onAddComment: L, ActionButton: Se, get IconDownload() {
1647
- return _o;
1648
- }, TopBar: Te, get formatDate() {
1725
+ }, pageData: d, _fields: g, genField: _, groupedFields: k, reversedActions: u, loading: p, mapWorkflowSteps: A, steps: J, isGlobal: Z, isShowAssignSelect: $, isShowAssignList: X, isShowCommentTextArea: oe, reloadButtonList: C, hiddenFields: b, load: h, triggerFn: I, getApproverEmail: S, clickHandler: U, comment: j, commentsHistory: L, selectedApprover: G, approvers: se, associators: ie, onAssignApprover: _e, confirmDialog: v, onDeleteAssociator: N, onAddComment: R, ActionButton: Se, get IconDownload() {
1726
+ return In;
1727
+ }, TopBar: Ie, get formatDate() {
1649
1728
  return ke;
1650
1729
  } };
1651
1730
  return Object.defineProperty(le, "__isScriptSetup", { enumerable: !1, value: !0 }), le;
1652
1731
  }
1653
- }), bo = { class: "page-container" }, ho = { class: "page-body" }, yo = { class: "detail-card" }, wo = { class: "form-fields-vertical" }, ko = { class: "detail-fields" }, Co = { class: "detail-field" }, So = { class: "field-label" }, xo = {
1732
+ }), Co = { class: "page-container" }, So = { class: "page-body" }, xo = { class: "detail-card" }, Ao = { class: "form-fields-vertical" }, Vo = { class: "detail-fields" }, Io = { class: "detail-field" }, To = { class: "field-label" }, Po = {
1654
1733
  key: 1,
1655
1734
  class: "field-value"
1656
- }, Ao = {
1735
+ }, No = {
1657
1736
  key: 2,
1658
1737
  class: "detail-field-wrapper"
1659
- }, Vo = { class: "detail-field" }, To = {
1738
+ }, Uo = { class: "detail-field" }, Do = {
1660
1739
  key: 0,
1661
1740
  class: "detail-content"
1662
- }, Io = { class: "page-footer" }, Po = { class: "action-container" }, No = { class: "action-buttons" };
1663
- function Uo(t, n, a, e, o, l) {
1664
- const s = k("a-link"), c = k("a-space"), i = k("a-card");
1665
- k("a-option"), k("a-select");
1666
- const r = k("a-button"), d = k("a-list-item"), g = k("a-list"), _ = k("a-textarea"), b = k("a-spin");
1667
- return u(), V("div", bo, [
1668
- H(e.TopBar, {
1741
+ }, Bo = { class: "page-footer" }, Fo = { class: "action-container" }, Ho = { class: "action-buttons" };
1742
+ function Lo(t, n, a, e, o, l) {
1743
+ const s = w("a-link"), c = w("a-space"), i = w("a-card");
1744
+ w("a-option"), w("a-select");
1745
+ const r = w("a-button"), d = w("a-list-item"), g = w("a-list"), _ = w("a-textarea"), k = w("a-spin");
1746
+ return f(), V("div", Co, [
1747
+ B(e.TopBar, {
1669
1748
  title: e.pageData.banner.title,
1670
1749
  subTitle: e.pageData.banner.subTitle,
1671
1750
  email: e.getApproverEmail()
1672
1751
  }, null, 8, ["title", "subTitle", "email"]),
1673
- x("div", ho, [
1674
- H(b, {
1752
+ y("div", So, [
1753
+ B(k, {
1675
1754
  loading: e.loading,
1676
1755
  class: "detail-container"
1677
1756
  }, {
1678
- default: S(() => [
1679
- x("div", yo, [
1680
- (u(), B(Be(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
1681
- x("div", wo, [
1682
- (u(!0), V($, null, G(e.groupedFields, (f) => (u(), B(i, {
1683
- key: f.name,
1684
- title: f.name,
1757
+ default: x(() => [
1758
+ y("div", xo, [
1759
+ (f(), F(He(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
1760
+ y("div", Ao, [
1761
+ (f(!0), V(M, null, q(e.groupedFields, (u) => (f(), F(i, {
1762
+ key: u.name,
1763
+ title: u.name,
1685
1764
  style: { "margin-bottom": "24px" }
1686
1765
  }, {
1687
- default: S(() => [
1688
- x("div", ko, [
1689
- (u(!0), V($, null, G(f.fields, (p) => (u(), V("div", {
1766
+ default: x(() => [
1767
+ y("div", Vo, [
1768
+ (f(!0), V(M, null, q(u.fields, (p) => (f(), V("div", {
1690
1769
  key: p.fieldKey,
1691
1770
  class: "detail-field-wrapper"
1692
1771
  }, [
1693
- x("div", Co, [
1694
- x("div", So, te(p.widget?.title), 1),
1695
- p.widget?.widget === "File" ? (u(!0), V($, { key: 0 }, G(p.widget.files, (C) => (u(), V("div", {
1772
+ y("div", Io, [
1773
+ y("div", To, te(p.widget?.title), 1),
1774
+ p.widget?.widget === "File" ? (f(!0), V(M, { key: 0 }, q(p.widget.files, (A) => (f(), V("div", {
1696
1775
  class: "field-value",
1697
- key: C.id
1776
+ key: A.id
1698
1777
  }, [
1699
- H(c, null, {
1700
- default: S(() => [
1701
- re(te(C.name) + " ", 1),
1702
- H(s, {
1703
- href: C.url,
1778
+ B(c, null, {
1779
+ default: x(() => [
1780
+ re(te(A.name) + " ", 1),
1781
+ B(s, {
1782
+ href: A.url,
1704
1783
  target: "_blank"
1705
1784
  }, {
1706
- default: S(() => [
1707
- H(e.IconDownload, { style: { color: "#7A00E6" } })
1785
+ default: x(() => [
1786
+ B(e.IconDownload, { style: { color: "#7A00E6" } })
1708
1787
  ]),
1709
1788
  _: 2
1710
1789
  }, 1032, ["href"])
1711
1790
  ]),
1712
1791
  _: 2
1713
1792
  }, 1024)
1714
- ]))), 128)) : (u(), V("div", xo, te(p.fieldValue), 1))
1793
+ ]))), 128)) : (f(), V("div", Po, te(p.fieldValue), 1))
1715
1794
  ])
1716
1795
  ]))), 128))
1717
1796
  ])
1718
1797
  ]),
1719
1798
  _: 2
1720
1799
  }, 1032, ["title"]))), 128)),
1721
- ae("", !0),
1722
- ae("", !0),
1723
- e.isShowCommentTextArea ? (u(), V("div", Ao, [
1724
- x("div", Vo, [
1725
- n[6] || (n[6] = x("div", { class: "field-label" }, "Comment", -1)),
1726
- H(_, {
1800
+ ne("", !0),
1801
+ ne("", !0),
1802
+ e.isShowCommentTextArea ? (f(), V("div", No, [
1803
+ y("div", Uo, [
1804
+ n[6] || (n[6] = y("div", { class: "field-label" }, "Comment", -1)),
1805
+ B(_, {
1727
1806
  modelValue: e.comment,
1728
- "onUpdate:modelValue": n[1] || (n[1] = (f) => e.comment = f)
1807
+ "onUpdate:modelValue": n[1] || (n[1] = (u) => e.comment = u)
1729
1808
  }, null, 8, ["modelValue"]),
1730
- H(r, {
1809
+ B(r, {
1731
1810
  type: "primary",
1732
1811
  onClick: e.onAddComment
1733
1812
  }, {
1734
- default: S(() => n[5] || (n[5] = [
1813
+ default: x(() => n[5] || (n[5] = [
1735
1814
  re("Add Comment", -1)
1736
1815
  ])),
1737
1816
  _: 1,
1738
1817
  __: [5]
1739
1818
  })
1740
1819
  ])
1741
- ])) : ae("", !0),
1742
- e.commentsHistory.length ? (u(), B(g, { key: 3 }, {
1743
- header: S(() => n[7] || (n[7] = [
1820
+ ])) : ne("", !0),
1821
+ e.commentsHistory.length ? (f(), F(g, { key: 3 }, {
1822
+ header: x(() => n[7] || (n[7] = [
1744
1823
  re(" Comments History ", -1)
1745
1824
  ])),
1746
- default: S(() => [
1747
- (u(!0), V($, null, G(e.commentsHistory, (f) => (u(), B(d, {
1748
- key: f.associator
1825
+ default: x(() => [
1826
+ (f(!0), V(M, null, q(e.commentsHistory, (u) => (f(), F(d, {
1827
+ key: u.associator
1749
1828
  }, {
1750
- default: S(() => [
1751
- re(te(f.associator) + ": " + te(f.comments) + " (" + te(e.formatDate(f.createdAt)) + ") ", 1)
1829
+ default: x(() => [
1830
+ re(te(u.associator) + ": " + te(u.comments) + " (" + te(e.formatDate(u.createdAt)) + ") ", 1)
1752
1831
  ]),
1753
1832
  _: 2
1754
1833
  }, 1024))), 128))
1755
1834
  ]),
1756
1835
  _: 1
1757
- })) : ae("", !0)
1836
+ })) : ne("", !0)
1758
1837
  ]),
1759
- t.$slots.content ? (u(), V("div", To, [
1838
+ t.$slots.content ? (f(), V("div", Do, [
1760
1839
  de(t.$slots, "content", {}, void 0, !0)
1761
- ])) : ae("", !0)
1840
+ ])) : ne("", !0)
1762
1841
  ])
1763
1842
  ]),
1764
1843
  _: 3
1765
1844
  }, 8, ["loading"])
1766
1845
  ]),
1767
- x("div", Io, [
1768
- x("div", Po, [
1846
+ y("div", Bo, [
1847
+ y("div", Fo, [
1769
1848
  de(t.$slots, "action", {}, void 0, !0),
1770
- x("div", No, [
1771
- (u(!0), V($, null, G(e.reversedActions, (f) => (u(), B(e.ActionButton, {
1772
- key: f.Title,
1849
+ y("div", Ho, [
1850
+ (f(!0), V(M, null, q(e.reversedActions, (u) => (f(), F(e.ActionButton, {
1851
+ key: u.title,
1773
1852
  loading: e.loading,
1774
- config: f,
1853
+ config: u,
1775
1854
  class: "action-button",
1776
- onClick: (...p) => e.clickHandler(f, ...p)
1855
+ onClick: (...p) => e.clickHandler(u, ...p)
1777
1856
  }, null, 8, ["loading", "config", "onClick"]))), 128))
1778
1857
  ])
1779
1858
  ])
1780
1859
  ])
1781
1860
  ]);
1782
1861
  }
1783
- const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef"], ["__file", "DetailView.vue"]]), Ho = /* @__PURE__ */ z({
1862
+ const Ro = /* @__PURE__ */ Q(ko, [["render", Lo], ["__scopeId", "data-v-180a216d"], ["__file", "DetailView.vue"]]), jo = /* @__PURE__ */ E({
1784
1863
  name: "ListView",
1785
1864
  __name: "ListView",
1786
1865
  props: {
@@ -1788,7 +1867,7 @@ const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef
1788
1867
  },
1789
1868
  setup(t, { expose: n }) {
1790
1869
  n();
1791
- const a = Ve(), e = Ae(), o = xe(), l = pe(), s = t, c = m(), i = rt({
1870
+ const a = Ve(), e = Ae(), o = xe(), l = pe(), s = t, c = m(), i = ct({
1792
1871
  current: 1,
1793
1872
  total: 0,
1794
1873
  pageSize: 10,
@@ -1798,9 +1877,9 @@ const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef
1798
1877
  filters: []
1799
1878
  });
1800
1879
  function r() {
1801
- const v = Object.entries(w.value).filter(([, { value: N }]) => N && N !== "").map(([N, { value: L, operator: le }]) => ({
1880
+ const v = Object.entries(S.value).filter(([, { value: N }]) => N && N !== "").map(([N, { value: R, operator: le }]) => ({
1802
1881
  key: N,
1803
- value: L,
1882
+ value: R,
1804
1883
  operator: le
1805
1884
  // 根据实际需要调整操作符
1806
1885
  }));
@@ -1814,14 +1893,14 @@ const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef
1814
1893
  }]
1815
1894
  };
1816
1895
  }
1817
- const d = X(() => ({
1818
- x: b.value.length * 150 + 250
1896
+ const d = W(() => ({
1897
+ x: k.value.length * 150 + 250
1819
1898
  // 只设置横向滚动
1820
1899
  // 移除 y 属性,让表格高度自适应
1821
1900
  })), g = (v) => {
1822
- const N = Object.entries(v).filter(([, L]) => L.widget?.column).map(([L, le], P) => ({
1901
+ const N = Object.entries(v).filter(([, R]) => R.widget?.column).map(([R, le], P) => ({
1823
1902
  title: le.widget.title,
1824
- dataIndex: L.charAt(0).toLowerCase() + L.slice(1),
1903
+ dataIndex: R.charAt(0).toLowerCase() + R.slice(1),
1825
1904
  order: le.order,
1826
1905
  ellipsis: !0,
1827
1906
  tooltip: !0,
@@ -1830,7 +1909,7 @@ const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef
1830
1909
  // 启用最小宽度
1831
1910
  resizable: !0
1832
1911
  // 启用列宽调整
1833
- })).sort((L, le) => L.order - le.order);
1912
+ })).sort((R, le) => R.order - le.order);
1834
1913
  N.push({
1835
1914
  title: "Actions",
1836
1915
  slotName: "optional",
@@ -1839,148 +1918,148 @@ const Do = /* @__PURE__ */ Y(vo, [["render", Uo], ["__scopeId", "data-v-9de406ef
1839
1918
  minWidth: 200,
1840
1919
  fixed: "right",
1841
1920
  resizable: !1
1842
- }), b.value = N;
1843
- }, _ = m([]), b = m([]), f = m(!0), p = m(!0), C = m(), J = async () => {
1921
+ }), k.value = N;
1922
+ }, _ = m([]), k = m([]), u = m(!0), p = m(!0), A = m(), J = async () => {
1844
1923
  p.value = !0;
1845
- const v = await St(s.className, r());
1924
+ const v = await It(s.className, r());
1846
1925
  _.value = v.data, i.total = v.totalCount, p.value = !1;
1847
1926
  }, Z = m(!1);
1848
1927
  ue(async () => {
1849
- f.value = !0;
1850
- const v = new Ie().setPageActionType(fe.List).setClassName(s.className).setStore({ svrStore: a, bpmStore: e }).build();
1851
- c.value = await v.getPageData(), g(c.value.fields), j(c.value.fields), R(), A(c.value?.tabs?.[0]?.key || ""), C.value = c.value.actions, f.value = !1, Z.value = !0;
1852
- }), st(() => {
1928
+ u.value = !0;
1929
+ const v = new Te().setPageActionType(fe.List).setClassName(s.className).setStore({ svrStore: a, bpmStore: e }).build();
1930
+ c.value = await v.getPageData(), g(c.value.fields), j(c.value.fields), L(), I(c.value?.tabs?.[0]?.key || ""), A.value = c.value.actions, u.value = !1, Z.value = !0;
1931
+ }), dt(() => {
1853
1932
  Z.value && J();
1854
1933
  });
1855
- const M = (v) => {
1934
+ const $ = (v) => {
1856
1935
  i.current = v, J();
1857
- }, Q = (v) => {
1936
+ }, X = (v) => {
1858
1937
  i.pageSize = v, J();
1859
1938
  };
1860
- function ne(v, N, L, le, P) {
1939
+ function oe(v, N, R, le, P) {
1861
1940
  switch (v) {
1862
- case q.Link:
1863
- o.push({ name: L, params: { workflowId: P } });
1941
+ case Y.Link:
1942
+ o.push({ name: R, params: { workflowId: P } });
1864
1943
  break;
1865
1944
  default:
1866
1945
  console.warn("Unknown action type:", v);
1867
1946
  }
1868
1947
  }
1869
- function h(v, N, L) {
1948
+ function C(v, N, R) {
1870
1949
  switch (v) {
1871
- case q.Submit:
1872
- Kt(N, { filters: [{ key: "approverList", value: y(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
1950
+ case Y.Submit:
1951
+ qt(N, { filters: [{ key: "approverList", value: b(), operator: 2 }] }), l?.appContext.config.globalProperties.$notification.success("submit success!");
1873
1952
  break;
1874
- case q.Link:
1875
- o.push({ name: L });
1953
+ case Y.Link:
1954
+ o.push({ name: R });
1876
1955
  break;
1877
1956
  default:
1878
1957
  console.warn("Unknown action type:", v);
1879
1958
  }
1880
1959
  }
1881
- function y() {
1960
+ function b() {
1882
1961
  return a()?.userInfo?.email_address ?? "";
1883
1962
  }
1884
- function T(v, N) {
1963
+ function h(v, N) {
1885
1964
  return typeof v != "string" || v.indexOf("{currentUserEmail}") === -1 ? v : v.replace(/{currentUserEmail}/g, N);
1886
1965
  }
1887
- function A(v) {
1888
- const N = c.value?.tabs?.find((L) => L.key === v)?.filters;
1889
- i.filters = N?.map((L) => ({
1890
- ...L,
1891
- value: T(L.value, y())
1966
+ function I(v) {
1967
+ const N = c.value?.tabs?.find((R) => R.key === v)?.filters;
1968
+ i.filters = N?.map((R) => ({
1969
+ ...R,
1970
+ value: h(R.value, b())
1892
1971
  })) || [], i.current = 1, J();
1893
1972
  }
1894
- const w = m({}), U = m([]);
1973
+ const S = m({}), U = m([]);
1895
1974
  function j(v) {
1896
1975
  if (!v) return [];
1897
- U.value = Object.entries(v).filter(([, N]) => N.isFiltered).map(([N, L]) => ({ fieldKey: N, fieldConfig: L }));
1976
+ U.value = Object.entries(v).filter(([, N]) => N.isFiltered).map(([N, R]) => ({ fieldKey: N, fieldConfig: R }));
1898
1977
  }
1899
- const R = () => {
1978
+ const L = () => {
1900
1979
  const v = {};
1901
- U.value.forEach(({ fieldKey: N, fieldConfig: L }) => {
1902
- v[N] = {}, v[N].value = L.modelValue, v[N].operator = L.operator;
1903
- }), w.value = v;
1904
- }, W = () => {
1980
+ U.value.forEach(({ fieldKey: N, fieldConfig: R }) => {
1981
+ v[N] = {}, v[N].value = R.modelValue, v[N].operator = R.operator;
1982
+ }), S.value = v;
1983
+ }, G = () => {
1905
1984
  i.current = 1, J();
1906
1985
  }, se = () => {
1907
- c.value && R(), W();
1986
+ c.value && L(), G();
1908
1987
  };
1909
1988
  function ie(v, N) {
1910
1989
  return !(v.location !== "InTable" || v.title === "Update" && (N.status === 100 || N.status === -1));
1911
1990
  }
1912
- const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: d, mapColumns: g, _data: _, _columns: b, loadingPage: f, loadingTable: p, actions: C, loadData: J, mounted: Z, pageChangeHandler: M, pageSizeChangeHandler: Q, clickHandler: ne, createHandler: h, getApproverEmail: y, replaceEmail: T, tabHandler: A, searchForm: w, searchableFields: U, mapSearchableFields: j, initSearchForm: R, handleSearch: W, handleReset: se, judgeHiddenActions: ie, ActionButton: Se, DataWidgets: Le, TopBar: Te };
1991
+ const _e = { svrStore: a, bpmStore: e, router: o, instance: l, props: s, pageData: c, paging: i, createListParams: r, scroll: d, mapColumns: g, _data: _, _columns: k, loadingPage: u, loadingTable: p, actions: A, loadData: J, mounted: Z, pageChangeHandler: $, pageSizeChangeHandler: X, clickHandler: oe, createHandler: C, getApproverEmail: b, replaceEmail: h, tabHandler: I, searchForm: S, searchableFields: U, mapSearchableFields: j, initSearchForm: L, handleSearch: G, handleReset: se, judgeHiddenActions: ie, ActionButton: Se, DataWidgets: je, TopBar: Ie };
1913
1992
  return Object.defineProperty(_e, "__isScriptSetup", { enumerable: !1, value: !0 }), _e;
1914
1993
  }
1915
- }), Bo = { class: "list-container" }, Fo = { class: "query-title" };
1916
- function Ro(t, n, a, e, o, l) {
1917
- const s = k("a-space"), c = k("a-col"), i = k("a-button"), r = k("a-row"), d = k("a-card"), g = k("a-tab-pane"), _ = k("a-tabs"), b = k("a-table");
1918
- return u(), V("div", Bo, [
1919
- H(e.TopBar, {
1994
+ }), $o = { class: "list-container" }, Oo = { class: "query-title" };
1995
+ function Mo(t, n, a, e, o, l) {
1996
+ const s = w("a-space"), c = w("a-col"), i = w("a-button"), r = w("a-row"), d = w("a-card"), g = w("a-tab-pane"), _ = w("a-tabs"), k = w("a-table");
1997
+ return f(), V("div", $o, [
1998
+ B(e.TopBar, {
1920
1999
  title: e.pageData?.banner.title ?? "",
1921
2000
  subTitle: e.pageData?.banner.subTitle ?? "",
1922
2001
  email: e.getApproverEmail()
1923
2002
  }, null, 8, ["title", "subTitle", "email"]),
1924
- H(d, null, {
1925
- default: S(() => [
1926
- x("div", Fo, [
1927
- n[0] || (n[0] = x("h3", null, "Search Conditions", -1)),
1928
- H(s, { size: "medium" }, {
1929
- default: S(() => [
1930
- (u(!0), V($, null, G(e.actions, (f) => (u(), V($, {
1931
- key: f.title
2003
+ B(d, null, {
2004
+ default: x(() => [
2005
+ y("div", Oo, [
2006
+ n[0] || (n[0] = y("h3", null, "Search Conditions", -1)),
2007
+ B(s, { size: "medium" }, {
2008
+ default: x(() => [
2009
+ (f(!0), V(M, null, q(e.actions, (u) => (f(), V(M, {
2010
+ key: u.title
1932
2011
  }, [
1933
- f.location === "InOperation" ? (u(), B(e.ActionButton, {
2012
+ u.location === "InOperation" ? (f(), F(e.ActionButton, {
1934
2013
  key: 0,
1935
- config: f,
2014
+ config: u,
1936
2015
  onClick: e.createHandler
1937
- }, null, 8, ["config"])) : ae("", !0)
2016
+ }, null, 8, ["config"])) : ne("", !0)
1938
2017
  ], 64))), 128))
1939
2018
  ]),
1940
2019
  _: 1
1941
2020
  })
1942
2021
  ]),
1943
- H(r, { gutter: [24, 20] }, {
1944
- default: S(() => [
1945
- (u(!0), V($, null, G(e.searchableFields, (f) => (u(), B(c, {
1946
- key: f.fieldKey,
2022
+ B(r, { gutter: [24, 20] }, {
2023
+ default: x(() => [
2024
+ (f(!0), V(M, null, q(e.searchableFields, (u) => (f(), F(c, {
2025
+ key: u.fieldKey,
1947
2026
  span: 6,
1948
2027
  class: "search-col"
1949
2028
  }, {
1950
- default: S(() => [
1951
- H(e.DataWidgets, {
1952
- name: f.fieldKey,
1953
- config: f.fieldConfig,
1954
- modelValue: e.searchForm[f.fieldKey].value,
1955
- "onUpdate:modelValue": (p) => e.searchForm[f.fieldKey].value = p,
2029
+ default: x(() => [
2030
+ B(e.DataWidgets, {
2031
+ name: u.fieldKey,
2032
+ config: u.fieldConfig,
2033
+ modelValue: e.searchForm[u.fieldKey].value,
2034
+ "onUpdate:modelValue": (p) => e.searchForm[u.fieldKey].value = p,
1956
2035
  class: "form-field"
1957
2036
  }, null, 8, ["name", "config", "modelValue", "onUpdate:modelValue"])
1958
2037
  ]),
1959
2038
  _: 2
1960
2039
  }, 1024))), 128)),
1961
- H(c, {
2040
+ B(c, {
1962
2041
  span: 6,
1963
2042
  class: "search-col form-buttons"
1964
2043
  }, {
1965
- default: S(() => [
1966
- H(s, { size: "medium" }, {
1967
- default: S(() => [
1968
- H(i, {
2044
+ default: x(() => [
2045
+ B(s, { size: "medium" }, {
2046
+ default: x(() => [
2047
+ B(i, {
1969
2048
  type: "primary",
1970
2049
  size: "medium",
1971
2050
  onClick: e.handleSearch
1972
2051
  }, {
1973
- default: S(() => n[1] || (n[1] = [
2052
+ default: x(() => n[1] || (n[1] = [
1974
2053
  re(" Search ", -1)
1975
2054
  ])),
1976
2055
  _: 1,
1977
2056
  __: [1]
1978
2057
  }),
1979
- H(i, {
2058
+ B(i, {
1980
2059
  size: "medium",
1981
2060
  onClick: e.handleReset
1982
2061
  }, {
1983
- default: S(() => n[2] || (n[2] = [
2062
+ default: x(() => n[2] || (n[2] = [
1984
2063
  re(" Reset ", -1)
1985
2064
  ])),
1986
2065
  _: 1,
@@ -1998,19 +2077,19 @@ function Ro(t, n, a, e, o, l) {
1998
2077
  ]),
1999
2078
  _: 1
2000
2079
  }),
2001
- H(_, {
2080
+ B(_, {
2002
2081
  size: "large",
2003
2082
  onTabClick: e.tabHandler
2004
2083
  }, {
2005
- default: S(() => [
2006
- (u(!0), V($, null, G(e.pageData?.tabs, (f) => (u(), B(g, {
2007
- key: f.key,
2008
- title: f.title
2084
+ default: x(() => [
2085
+ (f(!0), V(M, null, q(e.pageData?.tabs, (u) => (f(), F(g, {
2086
+ key: u.key,
2087
+ title: u.title
2009
2088
  }, null, 8, ["title"]))), 128))
2010
2089
  ]),
2011
2090
  _: 1
2012
2091
  }),
2013
- H(b, {
2092
+ B(k, {
2014
2093
  columns: e._columns,
2015
2094
  data: e._data,
2016
2095
  stripe: "",
@@ -2029,18 +2108,18 @@ function Ro(t, n, a, e, o, l) {
2029
2108
  onPageChange: e.pageChangeHandler,
2030
2109
  onPageSizeChange: e.pageSizeChangeHandler
2031
2110
  }, {
2032
- optional: S(({ record: f }) => [
2033
- H(s, { size: "small" }, {
2034
- default: S(() => [
2035
- (u(!0), V($, null, G(e.actions, (p) => (u(), V($, {
2111
+ optional: x(({ record: u }) => [
2112
+ B(s, { size: "small" }, {
2113
+ default: x(() => [
2114
+ (f(!0), V(M, null, q(e.actions, (p) => (f(), V(M, {
2036
2115
  key: p.title
2037
2116
  }, [
2038
- e.judgeHiddenActions(p, f) ? (u(), B(e.ActionButton, {
2117
+ e.judgeHiddenActions(p, u) ? (f(), F(e.ActionButton, {
2039
2118
  key: 0,
2040
2119
  config: p,
2041
2120
  size: "small",
2042
- onClick: (...C) => e.clickHandler(...C, f.workflowId)
2043
- }, null, 8, ["config", "onClick"])) : ae("", !0)
2121
+ onClick: (...A) => e.clickHandler(...A, u.workflowId)
2122
+ }, null, 8, ["config", "onClick"])) : ne("", !0)
2044
2123
  ], 64))), 128))
2045
2124
  ]),
2046
2125
  _: 2
@@ -2050,12 +2129,12 @@ function Ro(t, n, a, e, o, l) {
2050
2129
  }, 8, ["columns", "data", "pagination", "loading", "scroll"])
2051
2130
  ]);
2052
2131
  }
2053
- const Lo = /* @__PURE__ */ Y(Ho, [["render", Ro], ["__scopeId", "data-v-639f4f42"], ["__file", "ListView.vue"]]), Ko = {
2132
+ const Eo = /* @__PURE__ */ Q(jo, [["render", Mo], ["__scopeId", "data-v-639f4f42"], ["__file", "ListView.vue"]]), Yo = {
2054
2133
  install(t, n = {}) {
2055
- n.config && gt(n.config), n.router && t.provide(Xe, n.router), n.pinia && t.provide(xn, n.pinia), n.useBpmStore && t.provide(Ze, n.useBpmStore), n.useSvrStore && t.provide(et, n.useSvrStore), n.triggers && t.provide(Qe, n.triggers), n.customComps && t.provide(tt, n.customComps), t.component("CreateView", zn), t.component("UpdateView", oo), t.component("DetailView", Do), t.component("ListView", Lo);
2134
+ n.config && ht(n.config), n.router && t.provide(ot, n.router), n.pinia && t.provide(On, n.pinia), n.useBpmStore && t.provide(rt, n.useBpmStore), n.useSvrStore && t.provide(st, n.useSvrStore), n.triggers && t.provide(at, n.triggers), n.customComps && t.provide(it, n.customComps), t.component("CreateView", io), t.component("UpdateView", yo), t.component("DetailView", Ro), t.component("ListView", Eo);
2056
2135
  }
2057
2136
  };
2058
2137
  export {
2059
- Ko as default
2138
+ Yo as default
2060
2139
  };
2061
2140
  //# sourceMappingURL=index.es.js.map