@chase-shao/vue-component-lib 1.2.106 → 1.2.107

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,15 @@
1
- import { ref as m, getCurrentInstance as ve, defineComponent as z, mergeModels as ce, useModel as ke, resolveComponent as V, createBlock as D, openBlock as u, onMounted as fe, computed as K, withCtx as x, createElementBlock as _, Fragment as $, renderList as M, createVNode as U, nextTick as pt, createTextVNode as ae, inject as ye, normalizeStyle as Je, normalizeClass as Xe, createElementVNode as b, createCommentVNode as re, toDisplayString as Q, useTemplateRef as Te, resolveDynamicComponent as $e, renderSlot as ue, reactive as mt, onActivated as gt } from "vue";
2
- import _t from "axios";
3
- import { defineStore as vt } from "pinia";
4
- import { Modal as yt } from "@arco-design/web-vue";
5
- import { useRouter as bt } from "vue-router";
6
- const wt = vt("main", () => ({
7
- token: m(void 0)
8
- })), ht = async (t) => new Promise((o) => setTimeout(o, t)), kt = async (t, o, n, e = void 0) => {
1
+ import { ref as m, getCurrentInstance as me, inject as ye, defineComponent as z, mergeModels as ce, useModel as Ce, resolveComponent as V, createBlock as D, openBlock as u, onMounted as ge, computed as K, withCtx as x, createElementBlock as _, Fragment as $, renderList as M, createVNode as R, nextTick as _t, createTextVNode as ae, normalizeStyle as Xe, normalizeClass as Ze, createElementVNode as y, createCommentVNode as re, toDisplayString as Q, useTemplateRef as Ae, resolveDynamicComponent as je, renderSlot as ue, reactive as vt, onActivated as bt } from "vue";
2
+ import yt from "axios";
3
+ import { defineStore as ht } from "pinia";
4
+ import { useRouter as wt } from "vue-router";
5
+ import { Modal as kt } from "@arco-design/web-vue";
6
+ const et = ht("main", () => {
7
+ const t = m(void 0), o = m(null);
8
+ return {
9
+ token: t,
10
+ error: o
11
+ };
12
+ }), Ct = async (t) => new Promise((o) => setTimeout(o, t)), St = async (t, o, n, e = void 0) => {
9
13
  if (t[o] === void 0)
10
14
  try {
11
15
  t[o] = null, t[o] = await n() || e;
@@ -13,27 +17,27 @@ const wt = vt("main", () => ({
13
17
  console.error(r), t[o] = void 0;
14
18
  }
15
19
  for (; t[o] === null; )
16
- await ht(100);
20
+ await Ct(100);
17
21
  return t[o];
18
- }, he = (t) => {
22
+ }, ke = (t) => {
19
23
  const o = `0${t}`;
20
24
  return o.substring(o.length - 2);
21
- }, xe = (t, o = "yyyy-MM-dd hh:mm:ss") => {
25
+ }, Ve = (t, o = "yyyy-MM-dd hh:mm:ss") => {
22
26
  if (!t || typeof t == "string" && t.length === 0)
23
27
  return "";
24
28
  try {
25
29
  const n = new Date(t), e = [
26
30
  ["yyyy", n.getFullYear()],
27
31
  ["yy", n.getFullYear().toString().substring(2)],
28
- ["MM", he(n.getMonth() + 1)],
32
+ ["MM", ke(n.getMonth() + 1)],
29
33
  ["M", n.getMonth() + 1],
30
- ["dd", he(n.getDate())],
34
+ ["dd", ke(n.getDate())],
31
35
  ["d", n.getDate()],
32
- ["hh", he(n.getHours())],
36
+ ["hh", ke(n.getHours())],
33
37
  ["h", n.getHours()],
34
- ["mm", he(n.getMinutes())],
38
+ ["mm", ke(n.getMinutes())],
35
39
  ["m", n.getMinutes()],
36
- ["ss", he(n.getSeconds())],
40
+ ["ss", ke(n.getSeconds())],
37
41
  ["s", n.getSeconds()]
38
42
  ];
39
43
  for (const [r, a] of e)
@@ -42,28 +46,42 @@ const wt = vt("main", () => ({
42
46
  } catch {
43
47
  return t.toLocaleString();
44
48
  }
45
- }, Ct = (t, o) => {
49
+ }, xt = (t, o) => {
46
50
  let n;
47
51
  t instanceof Blob ? n = t : n = new Blob([t]);
48
52
  const e = document.createElement("a"), r = window.URL.createObjectURL(n);
49
53
  e.href = r, e.download = o, e.click(), window.URL.revokeObjectURL(r);
50
54
  };
51
55
  let Oe = {};
52
- function St(t) {
56
+ function Vt(t) {
53
57
  Oe = { ...Oe, ...t };
54
58
  }
55
- function je() {
59
+ function Me() {
56
60
  return Oe;
57
61
  }
58
- const xt = ve();
59
- function Ze() {
60
- const t = je();
62
+ const tt = Symbol("library-router");
63
+ let $e = null;
64
+ function Tt(t) {
65
+ $e = t ?? null;
66
+ }
67
+ function ve() {
68
+ if (me()) {
69
+ const o = ye(tt, null);
70
+ return o || wt();
71
+ }
72
+ if ($e)
73
+ return $e;
74
+ throw new Error("Router is unavailable. Pass router when installing the plugin before using useLibraryRouter outside setup().");
75
+ }
76
+ const ot = me();
77
+ function nt() {
78
+ const t = Me();
61
79
  return {
62
80
  apiBase: t.apiBase || void 0 || "",
63
81
  appSecret: t.appSecret || void 0 || ""
64
82
  };
65
83
  }
66
- function Vt(t) {
84
+ function At(t) {
67
85
  if (!t?.data?.statusCode)
68
86
  return t;
69
87
  switch (t.data.statusCode) {
@@ -71,22 +89,35 @@ function Vt(t) {
71
89
  return t.data.data = t.data.result, t.data;
72
90
  case 0:
73
91
  default:
74
- return xt?.appContext.config.globalProperties.$notification.error(t.data.msg), null;
92
+ return ot?.appContext.config.globalProperties.$notification.error(t.data.msg), null;
75
93
  }
76
94
  }
77
- function et() {
78
- const { apiBase: t } = Ze(), o = _t.create({
95
+ const It = (t) => {
96
+ if (t.response) {
97
+ if (t.response.status !== 400) {
98
+ if (t.response.status === 401)
99
+ ve().push("/error/401");
100
+ else if (t.response.status >= 500) {
101
+ const o = et();
102
+ o.error = t, ve().push("/error/500");
103
+ }
104
+ }
105
+ } else t.request ? console.error("error with request", t.request) : console.error("Error", t.message);
106
+ t.message.includes("timeout") && ot?.appContext.config.globalProperties.$notification.error("请求超时,请检查网络");
107
+ };
108
+ function at() {
109
+ const { apiBase: t } = nt(), o = yt.create({
79
110
  baseURL: t,
80
111
  timeout: 20 * 1e3,
81
112
  // 20s
82
113
  // headers: { 'Content-Type': 'application/json' },
83
114
  withCredentials: !0
84
115
  });
85
- return o.interceptors.response.use(Vt), o;
116
+ return o.interceptors.response.use(At, It), o;
86
117
  }
87
- const tt = async () => {
88
- const { apiBase: t, appSecret: o } = Ze(), n = et(), e = wt();
89
- return await kt(e, "token", async () => {
118
+ const rt = async () => {
119
+ const { apiBase: t, appSecret: o } = nt(), n = at(), e = et();
120
+ return await St(e, "token", async () => {
90
121
  const r = await n.post(`${t}/GenerateToken`, {
91
122
  appid: "bpm",
92
123
  appsecret: o
@@ -96,7 +127,7 @@ const tt = async () => {
96
127
  }, (r.data?.expireSeconds ?? 3600) * 1e3), r?.data?.token;
97
128
  });
98
129
  }, q = async () => {
99
- const t = await tt(), o = et();
130
+ const t = await rt(), o = at();
100
131
  return o.defaults.headers.common.Authorization = `Bearer ${t}`, o;
101
132
  }, De = {
102
133
  CurrentUserEmail: (t) => t.svrStore()?.userInfo?.email_address ?? "test.email@dataGetter.ts",
@@ -108,31 +139,31 @@ const tt = async () => {
108
139
  }, Y = [];
109
140
  for (let t = 0; t < 256; ++t)
110
141
  Y.push((t + 256).toString(16).slice(1));
111
- function Tt(t, o = 0) {
142
+ function Pt(t, o = 0) {
112
143
  return (Y[t[o + 0]] + Y[t[o + 1]] + Y[t[o + 2]] + Y[t[o + 3]] + "-" + Y[t[o + 4]] + Y[t[o + 5]] + "-" + Y[t[o + 6]] + Y[t[o + 7]] + "-" + Y[t[o + 8]] + Y[t[o + 9]] + "-" + Y[t[o + 10]] + Y[t[o + 11]] + Y[t[o + 12]] + Y[t[o + 13]] + Y[t[o + 14]] + Y[t[o + 15]]).toLowerCase();
113
144
  }
114
145
  let Be;
115
- const At = new Uint8Array(16);
116
- function It() {
146
+ const Nt = new Uint8Array(16);
147
+ function Ft() {
117
148
  if (!Be) {
118
149
  if (typeof crypto > "u" || !crypto.getRandomValues)
119
150
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
120
151
  Be = crypto.getRandomValues.bind(crypto);
121
152
  }
122
- return Be(At);
153
+ return Be(Nt);
123
154
  }
124
- const Pt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), We = { randomUUID: Pt };
125
- function ot(t, o, n) {
126
- if (We.randomUUID && !t)
127
- return We.randomUUID();
155
+ const Rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ge = { randomUUID: Rt };
156
+ function st(t, o, n) {
157
+ if (Ge.randomUUID && !t)
158
+ return Ge.randomUUID();
128
159
  t = t || {};
129
- const e = t.random ?? t.rng?.() ?? It();
160
+ const e = t.random ?? t.rng?.() ?? Ft();
130
161
  if (e.length < 16)
131
162
  throw new Error("Random bytes length must be >= 16");
132
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Tt(e);
163
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, Pt(e);
133
164
  }
134
- var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), _e = /* @__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))(_e || {});
135
- function Nt(t, o, n) {
165
+ var X = /* @__PURE__ */ ((t) => (t[t.Submit = 0] = "Submit", t[t.Link = 1] = "Link", t[t.Button = 2] = "Button", t))(X || {}), be = /* @__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))(be || {});
166
+ function Ut(t, o, n) {
136
167
  const e = {
137
168
  pageType: "",
138
169
  fields: {},
@@ -163,7 +194,7 @@ function Nt(t, o, n) {
163
194
  const i = a.showToRoles.split(",").map((c) => c.trim()), l = n.bpmStore().employeeInfo.roleList.some((c) => i.includes(c.name)) || a.showToRoles === "";
164
195
  if (a.widget === "Tab") {
165
196
  e.tabs || (e.tabs = []), l && e.tabs.push({
166
- key: ot(),
197
+ key: st(),
167
198
  title: a.title,
168
199
  filters: a.filters ? JSON.parse(a.filters) : [],
169
200
  order: a.order
@@ -186,7 +217,7 @@ function Nt(t, o, n) {
186
217
  eventName: a.eventName
187
218
  });
188
219
  }
189
- } else a.attributeType === "Banner" && (e.banner.title = a.title, o === 0 || o === 5 ? e.banner.subTitle = a.subTitle : e.banner.subTitle = Me(a.subTitle, t.workflowId.propertyValue));
220
+ } else a.attributeType === "Banner" && (e.banner.title = a.title, o === 0 || o === 5 ? e.banner.subTitle = a.subTitle : e.banner.subTitle = Ee(a.subTitle, t.workflowId.propertyValue));
190
221
  }), e.tabs && (e.tabs = e.tabs.sort((a, i) => a.order - i.order));
191
222
  const r = {
192
223
  id: "",
@@ -235,11 +266,11 @@ function Nt(t, o, n) {
235
266
  }), e.fields[a] = l;
236
267
  }), e.pageFields = r, e;
237
268
  }
238
- const Ge = async (t, o, n, e) => {
269
+ const qe = async (t, o, n, e) => {
239
270
  const a = await (await q()).get(`/General/${o}/${t}/page`, { params: e });
240
- return Nt(a?.data, t, n);
241
- }, Ft = async (t, o, n) => (await (await q()).post(`/${o}/${t}/button/List`, null, { params: n }))?.data;
242
- async function Ut(t, o) {
271
+ return Ut(a?.data, t, n);
272
+ }, Dt = async (t, o, n) => (await (await q()).post(`/${o}/${t}/button/List`, null, { params: n }))?.data;
273
+ async function Bt(t, o) {
243
274
  const e = await (await q()).post(`/General/${t}/list`, o);
244
275
  return {
245
276
  data: e.data.data,
@@ -259,109 +290,109 @@ async function Ut(t, o) {
259
290
  // ),
260
291
  };
261
292
  }
262
- async function Rt(t, o, n) {
293
+ async function Lt(t, o, n) {
263
294
  return (await (await q()).post(n, o, {
264
295
  params: {
265
296
  className: t
266
297
  }
267
298
  })).data;
268
299
  }
269
- async function Dt(t, o, n, e) {
270
- const r = await q(), a = Me(e, o);
300
+ async function Ht(t, o, n, e) {
301
+ const r = await q(), a = Ee(e, o);
271
302
  return (await r.put(a, n))?.data;
272
303
  }
273
- function Me(t, o) {
304
+ function Ee(t, o) {
274
305
  return t.replace(/{WorkflowId}/g, encodeURIComponent(o));
275
306
  }
276
- function Bt(t, o) {
307
+ function Ot(t, o) {
277
308
  return t.replace(/{ApproverEmail}/g, encodeURIComponent(o));
278
309
  }
279
- function Ht(t, o) {
310
+ function $t(t, o) {
280
311
  return t.replace(/{WorkFlowReason}/g, encodeURIComponent(o));
281
312
  }
282
- function Lt(t, o) {
313
+ function jt(t, o) {
283
314
  return t.replace(/{Status}/g, o);
284
315
  }
285
- function Ot(t, o) {
316
+ function Mt(t, o) {
286
317
  return t.replace(/{IfTriggerGlobal_RandP_Approval}/g, o);
287
318
  }
288
- function $t(t, o) {
319
+ function Et(t, o) {
289
320
  return t.replace(/{ClassName}/g, encodeURIComponent(o));
290
321
  }
291
- async function jt(t, o, n, e, r, a, i, l) {
322
+ async function Kt(t, o, n, e, r, a, i, l) {
292
323
  const c = await q();
293
- let s = Me(r, o);
294
- return s = Bt(s, n), s = Ht(s, e), s = Lt(s, a), s = Ot(s, i), s = $t(s, t), (await c.put(s, l))?.data;
324
+ let s = Ee(r, o);
325
+ return s = Ot(s, n), s = $t(s, e), s = jt(s, a), s = Mt(s, i), s = Et(s, t), (await c.put(s, l))?.data;
295
326
  }
296
- async function Mt(t, o) {
327
+ async function zt(t, o) {
297
328
  const r = (await (await q()).get(t, { params: { value: o } }))?.data;
298
329
  return Object.entries(r).map(([a, i]) => ({
299
330
  value: a,
300
331
  label: i
301
332
  }));
302
333
  }
303
- async function Et(t, o) {
334
+ async function Wt(t, o) {
304
335
  return (await (await q()).get(`/General/${t}/${o}/process`))?.data;
305
336
  }
306
- function Kt(t) {
337
+ function Gt(t) {
307
338
  return {
308
- uid: t.id ?? ot(),
339
+ uid: t.id ?? st(),
309
340
  name: t.attachmentName ?? "unknown",
310
341
  url: t.attachmentKey ?? ""
311
342
  };
312
343
  }
313
- async function zt(t, o) {
344
+ async function qt(t, o) {
314
345
  return (await (await q()).get(`/General/${t}/${o}/upload/get`))?.data.reduce((a, i) => {
315
346
  const { category: l } = i;
316
- return a[l] || (a[l] = []), a[l].push(Kt(i)), a;
347
+ return a[l] || (a[l] = []), a[l].push(Gt(i)), a;
317
348
  }, {});
318
349
  }
319
- async function Wt(t, o) {
350
+ async function Yt(t, o) {
320
351
  return (await q()).post(`/General/${t}/${o}/delete/attachment`);
321
352
  }
322
- async function Gt() {
353
+ async function Qt() {
323
354
  const o = await (await q()).get("/Grading/dropdown/approvers");
324
355
  return Object.entries(o?.data).map(([n, e]) => ({
325
356
  label: n,
326
357
  value: e
327
358
  }));
328
359
  }
329
- async function qt(t, o) {
360
+ async function Jt(t, o) {
330
361
  return await (await q()).post(`Grading/AssignComments/${t}/${encodeURIComponent(o)}`);
331
362
  }
332
- async function Yt(t, o, n) {
363
+ async function Xt(t, o, n) {
333
364
  return await (await q()).post(`Grading/AddComments/${t}/${encodeURIComponent(o)}`, n, {
334
365
  headers: { "Content-Type": "application/json;charset=UTF-8" }
335
366
  });
336
367
  }
337
- async function Qt(t) {
368
+ async function Zt(t) {
338
369
  return (await (await q()).get(`Grading/GetComments/${t}`))?.data;
339
370
  }
340
- async function Jt(t) {
371
+ async function eo(t) {
341
372
  return (await (await q()).get(`Grading/GetAssociator/${t}`))?.data;
342
373
  }
343
- async function Xt(t) {
374
+ async function to(t) {
344
375
  return await (await q()).delete(`Grading/DeleteAssociator/${t}`);
345
376
  }
346
- async function Zt(t, o = null) {
377
+ async function oo(t, o = null) {
347
378
  const e = await (await q()).post(t, o, {
348
379
  responseType: "blob"
349
380
  });
350
- Ct(e?.data, "WorkflowData.xlsx");
381
+ xt(e?.data, "WorkflowData.xlsx");
351
382
  }
352
- const be = (t, o) => {
383
+ const he = (t, o) => {
353
384
  let n = "";
354
385
  return { res: t.every((r) => {
355
- const a = eo(r, o);
386
+ const a = no(r, o);
356
387
  return a || (n = r.errorMessage), a;
357
388
  }), errorMessages: n };
358
- }, eo = (t, o) => {
389
+ }, no = (t, o) => {
359
390
  const { ruleName: n, ruleParameter: e } = t;
360
- return to[n](e, o);
361
- }, to = {
391
+ return ao[n](e, o);
392
+ }, ao = {
362
393
  Regex: (t, o) => new RegExp(t).test(o),
363
394
  Required: (t, o) => !!o
364
- }, oo = /* @__PURE__ */ z({
395
+ }, ro = /* @__PURE__ */ z({
365
396
  __name: "InputText",
366
397
  props: /* @__PURE__ */ ce({
367
398
  fieldKey: {},
@@ -376,7 +407,7 @@ const be = (t, o) => {
376
407
  }),
377
408
  emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
378
409
  setup(t, { expose: o, emit: n }) {
379
- const e = t, r = n, a = ke(t, "modelValue"), i = (d) => be(e.validations, d), l = (d) => {
410
+ const e = t, r = n, a = Ce(t, "modelValue"), i = (d) => he(e.validations, d), l = (d) => {
380
411
  r("input", d);
381
412
  }, c = (d) => {
382
413
  const g = i(d);
@@ -399,7 +430,7 @@ const be = (t, o) => {
399
430
  n[e] = r;
400
431
  return n;
401
432
  };
402
- function no(t, o, n, e, r, a) {
433
+ function so(t, o, n, e, r, a) {
403
434
  const i = V("AInput");
404
435
  return u(), D(i, {
405
436
  modelValue: e.model,
@@ -410,7 +441,7 @@ function no(t, o, n, e, r, a) {
410
441
  onChange: e.changeHandler
411
442
  }, null, 8, ["modelValue", "disabled"]);
412
443
  }
413
- const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]), ao = /* @__PURE__ */ z({
444
+ const Ye = /* @__PURE__ */ J(ro, [["render", so], ["__file", "InputText.vue"]]), io = /* @__PURE__ */ z({
414
445
  __name: "InputNumber",
415
446
  props: /* @__PURE__ */ ce({
416
447
  fieldKey: {},
@@ -425,17 +456,17 @@ const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]),
425
456
  }),
426
457
  emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
427
458
  setup(t, { expose: o, emit: n }) {
428
- const e = t, r = n, a = ke(t, "modelValue"), i = m(100), l = m(1);
429
- fe(() => {
459
+ const e = t, r = n, a = Ce(t, "modelValue"), i = m(100), l = m(1);
460
+ ge(() => {
430
461
  e.validations && e.validations.forEach((v) => {
431
462
  v.ruleName === "Max" && (i.value = v.ruleParameter), v.ruleName === "Min" && (l.value = v.ruleParameter);
432
463
  });
433
464
  });
434
- const c = (v) => be(e.validations, v), s = (v) => {
465
+ const c = (v) => he(e.validations, v), s = (v) => {
435
466
  r("input", v);
436
467
  }, d = (v) => {
437
- const y = c(v);
438
- r("error", y.res ? "" : y.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
468
+ const b = c(v);
469
+ r("error", b.res ? "" : b.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
439
470
  f.event === "change" && r(f.event, f.handlerName, v);
440
471
  });
441
472
  };
@@ -449,7 +480,7 @@ const qe = /* @__PURE__ */ J(oo, [["render", no], ["__file", "InputText.vue"]]),
449
480
  return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
450
481
  }
451
482
  });
452
- function ro(t, o, n, e, r, a) {
483
+ function lo(t, o, n, e, r, a) {
453
484
  const i = V("AInputNumber");
454
485
  return u(), D(i, {
455
486
  modelValue: e.model,
@@ -461,7 +492,7 @@ function ro(t, o, n, e, r, a) {
461
492
  onChange: e.changeHandler
462
493
  }, null, 8, ["modelValue", "disabled", "min"]);
463
494
  }
464
- const so = /* @__PURE__ */ J(ao, [["render", ro], ["__file", "InputNumber.vue"]]), io = /* @__PURE__ */ z({
495
+ const co = /* @__PURE__ */ J(io, [["render", lo], ["__file", "InputNumber.vue"]]), uo = /* @__PURE__ */ z({
465
496
  __name: "SelectList",
466
497
  props: /* @__PURE__ */ ce({
467
498
  fieldKey: {},
@@ -476,41 +507,41 @@ const so = /* @__PURE__ */ J(ao, [["render", ro], ["__file", "InputNumber.vue"]]
476
507
  }),
477
508
  emits: /* @__PURE__ */ ce(["update:modelValue", "change"], ["update:modelValue"]),
478
509
  setup(t, { expose: o, emit: n }) {
479
- const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l = ke(t, "modelValue"), c = (y) => be(e.validations, y), s = K(() => {
480
- const y = {};
510
+ const e = t, r = n, a = m(!1), i = m(e.config.options ?? []), l = Ce(t, "modelValue"), c = (b) => he(e.validations, b), s = K(() => {
511
+ const b = {};
481
512
  return e.triggers && e.triggers.length > 0 && e.triggers.forEach((f) => {
482
- y[f.event] = (p) => {
513
+ b[f.event] = (p) => {
483
514
  r(f.event, f.handlerName, p);
484
- const h = c(p);
485
- r("error", h.res ? "" : h.errorMessages);
515
+ const w = c(p);
516
+ r("error", w.res ? "" : w.errorMessages);
486
517
  };
487
- }), y;
518
+ }), b;
488
519
  }), d = async () => {
489
520
  if (e.config.dataSourceProvider) {
490
- i.value = await Mt(e.config.dataSourceProvider);
491
- const y = e.modelValue;
492
- y != null && y !== "" && (i.value.some((p) => p.value === y) || r("update:modelValue", ""));
521
+ i.value = await zt(e.config.dataSourceProvider);
522
+ const b = e.modelValue;
523
+ b != null && b !== "" && (i.value.some((p) => p.value === b) || r("update:modelValue", ""));
493
524
  }
494
525
  };
495
- fe(d);
496
- const g = (y) => {
497
- r("update:modelValue", y);
498
- const f = c(y);
526
+ ge(d);
527
+ const g = (b) => {
528
+ r("update:modelValue", b);
529
+ const f = c(b);
499
530
  r("error", f.res ? "" : f.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((p) => {
500
- p.event === "change" && r(p.event, p.handlerName, y);
531
+ p.event === "change" && r(p.event, p.handlerName, b);
501
532
  });
502
533
  };
503
534
  o({
504
535
  validate() {
505
- const y = c(e.modelValue);
506
- return r("error", y.res ? "" : y.errorMessages), y.res;
536
+ const b = c(e.modelValue);
537
+ return r("error", b.res ? "" : b.errorMessages), b.res;
507
538
  }
508
539
  });
509
540
  const v = { props: e, emits: r, loading: a, _options: i, model: l, validate: c, eventHandlers: s, loadOptions: d, changeHandler: g };
510
541
  return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
511
542
  }
512
543
  });
513
- function lo(t, o, n, e, r, a) {
544
+ function fo(t, o, n, e, r, a) {
514
545
  const i = V("AOption"), l = V("ASelect");
515
546
  return u(), D(l, {
516
547
  "allow-clear": "",
@@ -532,7 +563,7 @@ function lo(t, o, n, e, r, a) {
532
563
  _: 1
533
564
  }, 8, ["modelValue", "loading", "disabled"]);
534
565
  }
535
- const Ye = /* @__PURE__ */ J(io, [["render", lo], ["__file", "SelectList.vue"]]), co = /* @__PURE__ */ z({
566
+ const Qe = /* @__PURE__ */ J(uo, [["render", fo], ["__file", "SelectList.vue"]]), po = /* @__PURE__ */ z({
536
567
  __name: "Cascader",
537
568
  props: {
538
569
  modelValue: {},
@@ -543,7 +574,7 @@ const Ye = /* @__PURE__ */ J(io, [["render", lo], ["__file", "SelectList.vue"]])
543
574
  const e = t, r = n, a = m(e.config.options ?? []), i = (s) => {
544
575
  r("update:modelValue", s), r("change", s);
545
576
  };
546
- fe(async () => {
577
+ ge(async () => {
547
578
  if (e.config) {
548
579
  const s = e.config.dataSourceProvider;
549
580
  if (s) {
@@ -562,14 +593,14 @@ const Ye = /* @__PURE__ */ J(io, [["render", lo], ["__file", "SelectList.vue"]])
562
593
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
563
594
  }
564
595
  });
565
- function uo(t, o, n, e, r, a) {
596
+ function mo(t, o, n, e, r, a) {
566
597
  const i = V("ACascader"), l = V("ASpace");
567
598
  return u(), D(l, {
568
599
  direction: "vertical",
569
600
  size: "large"
570
601
  }, {
571
602
  default: x(() => [
572
- U(i, {
603
+ R(i, {
573
604
  "field-names": e.fieldNames,
574
605
  "model-value": n.modelValue,
575
606
  options: e._options,
@@ -581,7 +612,7 @@ function uo(t, o, n, e, r, a) {
581
612
  _: 1
582
613
  });
583
614
  }
584
- const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]), po = /* @__PURE__ */ z({
615
+ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "Cascader.vue"]]), _o = /* @__PURE__ */ z({
585
616
  __name: "FileUpload",
586
617
  props: {
587
618
  className: {},
@@ -594,66 +625,63 @@ const fo = /* @__PURE__ */ J(co, [["render", uo], ["__file", "Cascader.vue"]]),
594
625
  },
595
626
  emits: ["update:modelValue", "change", "error", "input"],
596
627
  setup(t, { expose: o, emit: n }) {
597
- const e = t, r = n, a = m({});
598
- fe(async () => {
599
- const T = await tt();
600
- a.value = {
601
- Authorization: `Bearer ${T}`
602
- };
603
- });
604
- const i = (T) => be(e.validations, T), l = je(), c = l.apiBase, s = m(null), d = m("");
605
- function g(T, k, C) {
606
- return T.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, C);
628
+ const e = t, r = n, a = m({}), i = (A) => he(e.validations, A), l = Me(), c = l.apiBase, s = m(null), d = m("");
629
+ function g(A, k, C) {
630
+ return A.replace(/{WorkflowId}/g, k).replace(/{ClassName}/g, C);
607
631
  }
608
632
  const v = K(() => {
609
633
  if (e.config.uploadURL) {
610
- const T = c + e.config.uploadURL;
611
- return g(T, d.value, e.className);
634
+ const A = c + e.config.uploadURL;
635
+ return g(A, d.value, e.className);
612
636
  }
613
637
  return "";
614
- }), y = (T) => {
615
- T.stopPropagation(), s.value.submit();
638
+ }), b = (A) => {
639
+ A.stopPropagation(), s.value.submit();
616
640
  };
617
- function f(T) {
618
- const { file: k, name: C } = T, A = C ?? k.name;
641
+ function f(A) {
642
+ const { file: k, name: C } = A, T = C ?? k.name;
619
643
  return new Promise((S, I) => {
620
- yt.confirm({
644
+ kt.confirm({
621
645
  title: "Confirm Delete",
622
- content: `Are you sure you want to delete ${A}?`,
646
+ content: `Are you sure you want to delete ${T}?`,
623
647
  async onOk() {
624
- if (T.status !== "init" && e.config.removeFile)
625
- return await e.config.removeFile(T.uid), S(!0);
648
+ if (A.status !== "init" && e.config.removeFile)
649
+ return await e.config.removeFile(A.uid), S(!0);
626
650
  S(!0);
627
651
  },
628
652
  onCancel: () => I("cancel")
629
653
  });
630
654
  });
631
655
  }
632
- const p = m(null), h = m(null), Z = (T) => {
633
- p.value && (p.value(T), p.value = null, h.value = null);
634
- }, oe = (T) => {
635
- h.value && (h.value(T), p.value = null, h.value = null);
636
- }, E = m([]), ee = (T) => {
637
- E.value = T.filter((k) => k.status === "init");
656
+ const p = m(null), w = m(null), Z = (A) => {
657
+ p.value && (p.value(A), p.value = null, w.value = null);
658
+ }, oe = (A) => {
659
+ w.value && (w.value(A), p.value = null, w.value = null);
660
+ }, E = m([]), ee = (A) => {
661
+ E.value = A.filter((k) => k.status === "init");
638
662
  };
639
663
  o({
640
- submit(T) {
664
+ submit(A) {
641
665
  return new Promise((k, C) => {
642
- s.value ? (e.config.uploadURL && (d.value = T), p.value = k, h.value = C, E.value.length ? pt(() => {
643
- s.value?.submit();
644
- }) : k(T)) : k(T);
666
+ s.value ? (e.config.uploadURL && (d.value = A), p.value = k, w.value = C, E.value.length ? rt().then((T) => {
667
+ a.value = {
668
+ Authorization: `Bearer ${T}`
669
+ }, _t(() => {
670
+ s.value?.submit();
671
+ });
672
+ }) : k(A)) : k(A);
645
673
  });
646
674
  },
647
675
  validate() {
648
- const T = e.config.files ?? [], k = [...E.value, ...T].length > 0 ? "hasFile" : "", C = i(k);
676
+ const A = e.config.files ?? [], k = [...E.value, ...A].length > 0 ? "hasFile" : "", C = i(k);
649
677
  return r("error", C.res ? "" : C.errorMessages), C.res;
650
678
  }
651
679
  });
652
- const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit: y, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: h, handleUploadSuccess: Z, handleUploadError: oe, readyFiles: E, onChange: ee };
680
+ const ne = { props: e, emits: r, headers: a, validate: i, config: l, ApiBase: c, uploadRef: s, id: d, replaceIdAndClassName: g, action: v, submit: b, onBeforeRemove: f, uploadPromiseResolve: p, uploadPromiseReject: w, handleUploadSuccess: Z, handleUploadError: oe, readyFiles: E, onChange: ee };
653
681
  return Object.defineProperty(ne, "__isScriptSetup", { enumerable: !1, value: !0 }), ne;
654
682
  }
655
683
  });
656
- function mo(t, o, n, e, r, a) {
684
+ function vo(t, o, n, e, r, a) {
657
685
  const i = V("a-button"), l = V("a-upload");
658
686
  return u(), D(l, {
659
687
  ref: "uploadRef",
@@ -670,7 +698,7 @@ function mo(t, o, n, e, r, a) {
670
698
  }, {
671
699
  "start-icon": x(() => o[0] || (o[0] = [])),
672
700
  "upload-button": x(() => [
673
- U(i, { type: "primary" }, {
701
+ R(i, { type: "primary" }, {
674
702
  default: x(() => o[1] || (o[1] = [
675
703
  ae("Select File", -1)
676
704
  ])),
@@ -681,7 +709,7 @@ function mo(t, o, n, e, r, a) {
681
709
  _: 1
682
710
  }, 8, ["default-file-list", "action", "limit", "headers"]);
683
711
  }
684
- const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]]), _o = /* @__PURE__ */ z({
712
+ const bo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "FileUpload.vue"]]), yo = /* @__PURE__ */ z({
685
713
  __name: "TextArea",
686
714
  props: {
687
715
  fieldKey: {},
@@ -693,7 +721,7 @@ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]])
693
721
  },
694
722
  emits: ["update:modelValue", "change", "error", "input"],
695
723
  setup(t, { expose: o, emit: n }) {
696
- const e = t, r = n, a = (s) => be(e.validations, s), i = (s) => {
724
+ const e = t, r = n, a = (s) => he(e.validations, s), i = (s) => {
697
725
  r("update:modelValue", s), r("input", s);
698
726
  }, l = (s) => {
699
727
  r("update:modelValue", s);
@@ -712,7 +740,7 @@ const go = /* @__PURE__ */ J(po, [["render", mo], ["__file", "FileUpload.vue"]])
712
740
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
713
741
  }
714
742
  });
715
- function vo(t, o, n, e, r, a) {
743
+ function ho(t, o, n, e, r, a) {
716
744
  const i = V("ATextarea");
717
745
  return u(), D(i, {
718
746
  "model-value": e.props.modelValue,
@@ -723,7 +751,7 @@ function vo(t, o, n, e, r, a) {
723
751
  onChange: e.changeHandler
724
752
  }, null, 8, ["model-value", "disabled"]);
725
753
  }
726
- const yo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]), bo = /* @__PURE__ */ z({
754
+ const wo = /* @__PURE__ */ J(yo, [["render", ho], ["__file", "TextArea.vue"]]), ko = /* @__PURE__ */ z({
727
755
  __name: "CheckBox",
728
756
  props: /* @__PURE__ */ ce({
729
757
  fieldKey: {},
@@ -738,7 +766,7 @@ const yo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]),
738
766
  }),
739
767
  emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error", "input"], ["update:modelValue"]),
740
768
  setup(t, { expose: o, emit: n }) {
741
- const e = t, r = n, a = ke(t, "modelValue"), i = (s) => be(e.validations, s), l = (s) => {
769
+ const e = t, r = n, a = Ce(t, "modelValue"), i = (s) => he(e.validations, s), l = (s) => {
742
770
  const d = i(s);
743
771
  r("error", d.res ? "" : d.errorMessages), e.triggers && e.triggers.length > 0 && e.triggers.forEach((g) => {
744
772
  g.event === "change" && r(g.event, g.handlerName, s);
@@ -754,7 +782,7 @@ const yo = /* @__PURE__ */ J(_o, [["render", vo], ["__file", "TextArea.vue"]]),
754
782
  return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
755
783
  }
756
784
  });
757
- function wo(t, o, n, e, r, a) {
785
+ function Co(t, o, n, e, r, a) {
758
786
  const i = V("ACheckbox");
759
787
  return u(), D(i, {
760
788
  modelValue: e.model,
@@ -770,20 +798,20 @@ function wo(t, o, n, e, r, a) {
770
798
  __: [1]
771
799
  }, 8, ["modelValue", "disabled"]);
772
800
  }
773
- const ho = /* @__PURE__ */ J(bo, [["render", wo], ["__file", "CheckBox.vue"]]), ko = Symbol("ArcoConfigProvider"), Co = "arco", So = "$arco", nt = (t) => {
801
+ const So = /* @__PURE__ */ J(ko, [["render", Co], ["__file", "CheckBox.vue"]]), xo = Symbol("ArcoConfigProvider"), Vo = "arco", To = "$arco", it = (t) => {
774
802
  var o, n, e;
775
- const r = ve(), a = ye(ko, void 0);
776
- return `${(e = (n = a?.prefixCls) != null ? n : (o = r?.appContext.config.globalProperties[So]) == null ? void 0 : o.classPrefix) != null ? e : Co}-${t}`;
777
- }, xo = Object.prototype.toString;
778
- function at(t) {
779
- return xo.call(t) === "[object Number]" && t === t;
803
+ const r = me(), a = ye(xo, void 0);
804
+ return `${(e = (n = a?.prefixCls) != null ? n : (o = r?.appContext.config.globalProperties[To]) == null ? void 0 : o.classPrefix) != null ? e : Vo}-${t}`;
805
+ }, Ao = Object.prototype.toString;
806
+ function lt(t) {
807
+ return Ao.call(t) === "[object Number]" && t === t;
780
808
  }
781
- var rt = (t, o) => {
809
+ var ct = (t, o) => {
782
810
  for (const [n, e] of o)
783
811
  t[n] = e;
784
812
  return t;
785
813
  };
786
- const Vo = z({
814
+ const Io = z({
787
815
  name: "IconQuestionCircle",
788
816
  props: {
789
817
  size: {
@@ -810,9 +838,9 @@ const Vo = z({
810
838
  click: (t) => !0
811
839
  },
812
840
  setup(t, { emit: o }) {
813
- const n = nt("icon"), e = K(() => [n, `${n}-question-circle`, { [`${n}-spin`]: t.spin }]), r = K(() => {
841
+ const n = it("icon"), e = K(() => [n, `${n}-question-circle`, { [`${n}-spin`]: t.spin }]), r = K(() => {
814
842
  const i = {};
815
- return t.size && (i.fontSize = at(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
843
+ return t.size && (i.fontSize = lt(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
816
844
  });
817
845
  return {
818
846
  cls: e,
@@ -822,32 +850,32 @@ const Vo = z({
822
850
  }
823
851
  };
824
852
  }
825
- }), To = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
826
- function Ao(t, o, n, e, r, a) {
853
+ }), Po = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
854
+ function No(t, o, n, e, r, a) {
827
855
  return u(), _("svg", {
828
856
  viewBox: "0 0 48 48",
829
857
  fill: "none",
830
858
  xmlns: "http://www.w3.org/2000/svg",
831
859
  stroke: "currentColor",
832
- class: Xe(t.cls),
833
- style: Je(t.innerStyle),
860
+ class: Ze(t.cls),
861
+ style: Xe(t.innerStyle),
834
862
  "stroke-width": t.strokeWidth,
835
863
  "stroke-linecap": t.strokeLinecap,
836
864
  "stroke-linejoin": t.strokeLinejoin,
837
865
  onClick: o[0] || (o[0] = (...i) => t.onClick && t.onClick(...i))
838
866
  }, o[1] || (o[1] = [
839
- b("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),
840
- b("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)
841
- ]), 14, To);
867
+ 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),
868
+ 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)
869
+ ]), 14, Po);
842
870
  }
843
- var He = /* @__PURE__ */ rt(Vo, [["render", Ao]]);
844
- const Io = Object.assign(He, {
871
+ var Le = /* @__PURE__ */ ct(Io, [["render", No]]);
872
+ const Fo = Object.assign(Le, {
845
873
  install: (t, o) => {
846
874
  var n;
847
875
  const e = (n = o?.iconPrefix) != null ? n : "";
848
- t.component(e + He.name, He);
876
+ t.component(e + Le.name, Le);
849
877
  }
850
- }), Po = z({
878
+ }), Ro = z({
851
879
  name: "IconDownload",
852
880
  props: {
853
881
  size: {
@@ -874,9 +902,9 @@ const Io = Object.assign(He, {
874
902
  click: (t) => !0
875
903
  },
876
904
  setup(t, { emit: o }) {
877
- const n = nt("icon"), e = K(() => [n, `${n}-download`, { [`${n}-spin`]: t.spin }]), r = K(() => {
905
+ const n = it("icon"), e = K(() => [n, `${n}-download`, { [`${n}-spin`]: t.spin }]), r = K(() => {
878
906
  const i = {};
879
- return t.size && (i.fontSize = at(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
907
+ return t.size && (i.fontSize = lt(t.size) ? `${t.size}px` : t.size), t.rotate && (i.transform = `rotate(${t.rotate}deg)`), i;
880
908
  });
881
909
  return {
882
910
  cls: e,
@@ -886,31 +914,31 @@ const Io = Object.assign(He, {
886
914
  }
887
915
  };
888
916
  }
889
- }), No = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
890
- function Fo(t, o, n, e, r, a) {
917
+ }), Uo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
918
+ function Do(t, o, n, e, r, a) {
891
919
  return u(), _("svg", {
892
920
  viewBox: "0 0 48 48",
893
921
  fill: "none",
894
922
  xmlns: "http://www.w3.org/2000/svg",
895
923
  stroke: "currentColor",
896
- class: Xe(t.cls),
897
- style: Je(t.innerStyle),
924
+ class: Ze(t.cls),
925
+ style: Xe(t.innerStyle),
898
926
  "stroke-width": t.strokeWidth,
899
927
  "stroke-linecap": t.strokeLinecap,
900
928
  "stroke-linejoin": t.strokeLinejoin,
901
929
  onClick: o[0] || (o[0] = (...i) => t.onClick && t.onClick(...i))
902
930
  }, o[1] || (o[1] = [
903
- b("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
904
- ]), 14, No);
931
+ y("path", { d: "m33.072 22.071-9.07 9.071-9.072-9.07M24 5v26m16 4v6H8v-6" }, null, -1)
932
+ ]), 14, Uo);
905
933
  }
906
- var Le = /* @__PURE__ */ rt(Po, [["render", Fo]]);
907
- const Uo = Object.assign(Le, {
934
+ var He = /* @__PURE__ */ ct(Ro, [["render", Do]]);
935
+ const Bo = Object.assign(He, {
908
936
  install: (t, o) => {
909
937
  var n;
910
938
  const e = (n = o?.iconPrefix) != null ? n : "";
911
- t.component(e + Le.name, Le);
939
+ t.component(e + He.name, He);
912
940
  }
913
- }), Ro = /* @__PURE__ */ z({
941
+ }), Lo = /* @__PURE__ */ z({
914
942
  __name: "ToolTip",
915
943
  props: {
916
944
  isVisible: { type: Boolean },
@@ -919,12 +947,12 @@ const Uo = Object.assign(Le, {
919
947
  setup(t, { expose: o }) {
920
948
  o();
921
949
  const n = t, e = (l) => l.length > 0 && typeof l[0] != "string", r = K(() => e(n.outputText) ? [] : n.outputText), a = K(() => e(n.outputText) ? n.outputText : []), i = { props: n, isTreeArray: e, stringOutput: r, treeOutput: a, get IconQuestionCircle() {
922
- return Io;
950
+ return Fo;
923
951
  } };
924
952
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
925
953
  }
926
- }), Do = { class: "list-unstyled" }, Bo = { class: "list-style-square" };
927
- function Ho(t, o, n, e, r, a) {
954
+ }), Ho = { class: "list-unstyled" }, Oo = { class: "list-style-square" };
955
+ function $o(t, o, n, e, r, a) {
928
956
  const i = V("a-tooltip");
929
957
  return e.props.isVisible ? (u(), D(i, {
930
958
  key: 0,
@@ -935,14 +963,14 @@ function Ho(t, o, n, e, r, a) {
935
963
  key: l.title,
936
964
  class: "list-unstyled"
937
965
  }, [
938
- b("li", null, [
939
- b("b", null, Q(l.title), 1),
940
- b("ul", Do, [
966
+ y("li", null, [
967
+ y("b", null, Q(l.title), 1),
968
+ y("ul", Ho, [
941
969
  (u(!0), _($, null, M(l.items, (c) => (u(), _("li", {
942
970
  key: c.title
943
971
  }, [
944
- b("u", null, Q(c.title), 1),
945
- b("ul", Bo, [
972
+ y("u", null, Q(c.title), 1),
973
+ y("ul", Oo, [
946
974
  (u(!0), _($, null, M(c.items, (s) => (u(), _("li", null, Q(s), 1))), 256))
947
975
  ])
948
976
  ]))), 128))
@@ -951,12 +979,12 @@ function Ho(t, o, n, e, r, a) {
951
979
  ]))), 128))
952
980
  ]),
953
981
  default: x(() => [
954
- U(e.IconQuestionCircle, { class: "icon" })
982
+ R(e.IconQuestionCircle, { class: "icon" })
955
983
  ]),
956
984
  _: 1
957
985
  })) : re("", !0);
958
986
  }
959
- const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1"], ["__file", "ToolTip.vue"]]), Lo = /* @__PURE__ */ z({
987
+ const dt = /* @__PURE__ */ J(Lo, [["render", $o], ["__scopeId", "data-v-1d3893b1"], ["__file", "ToolTip.vue"]]), jo = /* @__PURE__ */ z({
960
988
  __name: "index",
961
989
  props: /* @__PURE__ */ ce({
962
990
  config: {},
@@ -973,26 +1001,26 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
973
1001
  }),
974
1002
  emits: /* @__PURE__ */ ce(["update:modelValue", "change", "error"], ["update:modelValue"]),
975
1003
  setup(t, { expose: o, emit: n }) {
976
- const e = t, r = n, a = ke(t, "modelValue"), i = Te("widgetRef"), l = K(() => {
1004
+ const e = t, r = n, a = Ce(t, "modelValue"), i = Ae("widgetRef"), l = K(() => {
977
1005
  switch (e.config?.widget?.widget) {
978
1006
  case "TextBox":
979
- return qe;
1007
+ return Ye;
980
1008
  case "Number":
981
- return so;
1009
+ return co;
982
1010
  case "SelectList":
983
- return Ye;
1011
+ return Qe;
984
1012
  case "Cascade":
985
- return fo;
986
- case "File":
987
1013
  return go;
1014
+ case "File":
1015
+ return bo;
988
1016
  case "TextArea":
989
- return yo;
1017
+ return wo;
990
1018
  case "DropDown":
991
- return Ye;
1019
+ return Qe;
992
1020
  case "CheckBox":
993
- return ho;
1021
+ return So;
994
1022
  default:
995
- return qe;
1023
+ return Ye;
996
1024
  }
997
1025
  }), c = m(""), s = (f) => {
998
1026
  c.value = f;
@@ -1019,28 +1047,28 @@ const st = /* @__PURE__ */ J(Ro, [["render", Ho], ["__scopeId", "data-v-1d3893b1
1019
1047
  return e?.config?.widget?.title;
1020
1048
  }
1021
1049
  });
1022
- const y = { props: e, emits: r, model: a, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: g, formatTitle: v, ToolTip: st };
1023
- return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
1050
+ const b = { props: e, emits: r, model: a, widgetRef: i, curComp: l, errMsg: c, errHandler: s, changeHandler: d, isFileUpload: g, formatTitle: v, ToolTip: dt };
1051
+ return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
1024
1052
  }
1025
- }), Oo = { class: "title" }, $o = {
1053
+ }), Mo = { class: "title" }, Eo = {
1026
1054
  key: 0,
1027
1055
  class: "required"
1028
- }, jo = {
1056
+ }, Ko = {
1029
1057
  key: 0,
1030
1058
  class: "err-msg"
1031
1059
  };
1032
- function Mo(t, o, n, e, r, a) {
1060
+ function zo(t, o, n, e, r, a) {
1033
1061
  return u(), _("div", null, [
1034
- b("div", Oo, [
1062
+ y("div", Mo, [
1035
1063
  ae(Q(e.formatTitle(e.props?.config?.widget?.title)) + " ", 1),
1036
- e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), _("span", $o, " * ")) : re("", !0),
1037
- U(e.ToolTip, {
1064
+ e.props.required || e.props.config.validations.some((i) => i.ruleName === "Required") ? (u(), _("span", Eo, " * ")) : re("", !0),
1065
+ R(e.ToolTip, {
1038
1066
  "is-visible": e.props.config.widget?.isVisible ?? !1,
1039
1067
  "output-text": e.props.config.widget?.outputText ?? []
1040
1068
  }, null, 8, ["is-visible", "output-text"])
1041
1069
  ]),
1042
- b("div", null, [
1043
- (u(), D($e(e.curComp), {
1070
+ y("div", null, [
1071
+ (u(), D(je(e.curComp), {
1044
1072
  ref: "widgetRef",
1045
1073
  modelValue: e.model,
1046
1074
  "onUpdate:modelValue": o[0] || (o[0] = (i) => e.model = i),
@@ -1052,11 +1080,11 @@ function Mo(t, o, n, e, r, a) {
1052
1080
  onError: e.errHandler,
1053
1081
  onChange: e.changeHandler
1054
1082
  }, null, 40, ["modelValue", "field-key", "config", "validations", "triggers", "class-name"])),
1055
- e.errMsg.length > 0 ? (u(), _("div", jo, Q(e.errMsg), 1)) : re("", !0)
1083
+ e.errMsg.length > 0 ? (u(), _("div", Ko, Q(e.errMsg), 1)) : re("", !0)
1056
1084
  ])
1057
1085
  ]);
1058
1086
  }
1059
- const Ae = /* @__PURE__ */ J(Lo, [["render", Mo], ["__scopeId", "data-v-67595df1"], ["__file", "index.vue"]]), Eo = /* @__PURE__ */ z({
1087
+ const Ie = /* @__PURE__ */ J(jo, [["render", zo], ["__scopeId", "data-v-67595df1"], ["__file", "index.vue"]]), Wo = /* @__PURE__ */ z({
1060
1088
  __name: "SubmitButton",
1061
1089
  props: {
1062
1090
  url: {},
@@ -1074,7 +1102,7 @@ const Ae = /* @__PURE__ */ J(Lo, [["render", Mo], ["__scopeId", "data-v-67595df1
1074
1102
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
1075
1103
  }
1076
1104
  });
1077
- function Ko(t, o, n, e, r, a) {
1105
+ function Go(t, o, n, e, r, a) {
1078
1106
  const i = V("AButton");
1079
1107
  return u(), D(i, {
1080
1108
  loading: n.loading,
@@ -1087,7 +1115,7 @@ function Ko(t, o, n, e, r, a) {
1087
1115
  _: 3
1088
1116
  }, 8, ["loading"]);
1089
1117
  }
1090
- const Qe = /* @__PURE__ */ J(Eo, [["render", Ko], ["__file", "SubmitButton.vue"]]), zo = /* @__PURE__ */ z({
1118
+ const Je = /* @__PURE__ */ J(Wo, [["render", Go], ["__file", "SubmitButton.vue"]]), qo = /* @__PURE__ */ z({
1091
1119
  __name: "DetailLink",
1092
1120
  props: {
1093
1121
  url: {},
@@ -1105,7 +1133,7 @@ const Qe = /* @__PURE__ */ J(Eo, [["render", Ko], ["__file", "SubmitButton.vue"]
1105
1133
  return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
1106
1134
  }
1107
1135
  });
1108
- function Wo(t, o, n, e, r, a) {
1136
+ function Yo(t, o, n, e, r, a) {
1109
1137
  const i = V("ALink");
1110
1138
  return u(), D(i, { onClick: e.clickHandler }, {
1111
1139
  default: x(() => [
@@ -1114,7 +1142,7 @@ function Wo(t, o, n, e, r, a) {
1114
1142
  _: 3
1115
1143
  });
1116
1144
  }
1117
- const Go = /* @__PURE__ */ J(zo, [["render", Wo], ["__file", "DetailLink.vue"]]), qo = /* @__PURE__ */ z({
1145
+ const Qo = /* @__PURE__ */ J(qo, [["render", Yo], ["__file", "DetailLink.vue"]]), Jo = /* @__PURE__ */ z({
1118
1146
  __name: "index",
1119
1147
  props: {
1120
1148
  config: {},
@@ -1130,18 +1158,18 @@ const Go = /* @__PURE__ */ J(zo, [["render", Wo], ["__file", "DetailLink.vue"]])
1130
1158
  const i = K(() => {
1131
1159
  switch (e.config.location) {
1132
1160
  case "InOperation":
1133
- return Qe;
1161
+ return Je;
1134
1162
  case "InTable":
1135
- return Go;
1163
+ return Qo;
1136
1164
  default:
1137
- return Qe;
1165
+ return Je;
1138
1166
  }
1139
1167
  }), l = K(() => e.config.widget === X.Submit ? e.config.requestUrl ?? "" : e.config.widget === X.Link ? e.config.redirectUrl ?? "" : ""), c = K(() => e.config.redirectType ?? "Details"), s = { props: e, emits: r, clickHandler: a, curComp: i, curUrl: l, redirectType: c };
1140
1168
  return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
1141
1169
  }
1142
1170
  });
1143
- function Yo(t, o, n, e, r, a) {
1144
- return u(), D($e(e.curComp), {
1171
+ function Xo(t, o, n, e, r, a) {
1172
+ return u(), D(je(e.curComp), {
1145
1173
  url: e.curUrl,
1146
1174
  "redirect-type": e.redirectType,
1147
1175
  loading: n.loading,
@@ -1153,24 +1181,19 @@ function Yo(t, o, n, e, r, a) {
1153
1181
  _: 1
1154
1182
  }, 8, ["url", "redirect-type", "loading"]);
1155
1183
  }
1156
- const Ie = /* @__PURE__ */ J(qo, [["render", Yo], ["__file", "index.vue"]]), it = Symbol("library-router");
1157
- function Pe() {
1158
- const t = ye(it, null);
1159
- return t || bt();
1160
- }
1161
- const lt = Symbol("library-triggers");
1162
- function Ee() {
1163
- const t = ye(lt, null);
1184
+ const Pe = /* @__PURE__ */ J(Jo, [["render", Xo], ["__file", "index.vue"]]), ut = Symbol("library-triggers");
1185
+ function Ke() {
1186
+ const t = ye(ut, null);
1164
1187
  return t || {};
1165
1188
  }
1166
- const Qo = Symbol("library-pinia"), ct = Symbol("library-bpmStore"), dt = Symbol("library-svrStore");
1189
+ const Zo = Symbol("library-pinia"), ft = Symbol("library-bpmStore"), pt = Symbol("library-svrStore");
1167
1190
  function Ne() {
1168
- return ye(ct, null);
1191
+ return ye(ft, null);
1169
1192
  }
1170
1193
  function Fe() {
1171
- return ye(dt, null);
1194
+ return ye(pt, null);
1172
1195
  }
1173
- const Jo = /* @__PURE__ */ z({
1196
+ const en = /* @__PURE__ */ z({
1174
1197
  __name: "TopBar",
1175
1198
  props: {
1176
1199
  title: {},
@@ -1182,21 +1205,21 @@ const Jo = /* @__PURE__ */ z({
1182
1205
  const n = {};
1183
1206
  return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
1184
1207
  }
1185
- }), Xo = { class: "top-bar" }, Zo = { class: "banner-info" }, en = { class: "page-title" }, tn = { class: "page-subtitle" }, on = { class: "avatar-wrapper" }, nn = { class: "user-email" };
1186
- function an(t, o, n, e, r, a) {
1208
+ }), tn = { class: "top-bar" }, on = { class: "banner-info" }, nn = { class: "page-title" }, an = { class: "page-subtitle" }, rn = { class: "avatar-wrapper" }, sn = { class: "user-email" };
1209
+ function ln(t, o, n, e, r, a) {
1187
1210
  const i = V("a-avatar"), l = V("a-popover");
1188
- return u(), _("div", Xo, [
1189
- b("div", Zo, [
1190
- b("div", en, Q(n.title), 1),
1191
- b("div", tn, Q(n.subTitle), 1)
1211
+ return u(), _("div", tn, [
1212
+ y("div", on, [
1213
+ y("div", nn, Q(n.title), 1),
1214
+ y("div", an, Q(n.subTitle), 1)
1192
1215
  ]),
1193
- b("div", on, [
1194
- U(l, { trigger: "click" }, {
1216
+ y("div", rn, [
1217
+ R(l, { trigger: "click" }, {
1195
1218
  content: x(() => [
1196
- b("div", nn, Q(n.email), 1)
1219
+ y("div", sn, Q(n.email), 1)
1197
1220
  ]),
1198
1221
  default: x(() => [
1199
- U(i, {
1222
+ R(i, {
1200
1223
  size: 48,
1201
1224
  autoFixFontSize: "",
1202
1225
  style: { cursor: "pointer", background: "#165DFF", color: "#fff" }
@@ -1212,9 +1235,9 @@ function an(t, o, n, e, r, a) {
1212
1235
  ])
1213
1236
  ]);
1214
1237
  }
1215
- const Ue = /* @__PURE__ */ J(Jo, [["render", an], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
1216
- function Ke(t) {
1217
- const o = je(), n = [];
1238
+ const Re = /* @__PURE__ */ J(en, [["render", ln], ["__scopeId", "data-v-c0457235"], ["__file", "TopBar.vue"]]);
1239
+ function ze(t) {
1240
+ const o = Me(), n = [];
1218
1241
  if (o.fieldsGroup) {
1219
1242
  o.fieldsGroup.forEach((a) => {
1220
1243
  const i = a.keys.map((l) => t.find((c) => c.fieldKey === l)).filter(Boolean);
@@ -1224,7 +1247,7 @@ function Ke(t) {
1224
1247
  return r.length && n.push({ name: "Grading Review History (For example: re-submit the grading request)", fields: r }), n;
1225
1248
  }
1226
1249
  }
1227
- class Re {
1250
+ class Ue {
1228
1251
  pageActionType;
1229
1252
  className = "";
1230
1253
  store = { svrStore: {}, bpmStore: {} };
@@ -1245,10 +1268,10 @@ class Re {
1245
1268
  return this.opt = o, this;
1246
1269
  }
1247
1270
  build() {
1248
- return this.pageActionType ? this.opt.workflowId ? new Ve(this.pageActionType, this.className, this.store, this.opt) : new Ve(this.pageActionType, this.className, this.store) : this.opt.workflowId ? new Ve(_e.ReCreate, this.className, this.store, this.opt) : new Ve(_e.Create, this.className, this.store);
1271
+ return this.pageActionType ? this.opt.workflowId ? new Te(this.pageActionType, this.className, this.store, this.opt) : new Te(this.pageActionType, this.className, this.store) : this.opt.workflowId ? new Te(be.ReCreate, this.className, this.store, this.opt) : new Te(be.Create, this.className, this.store);
1249
1272
  }
1250
1273
  }
1251
- class Ve {
1274
+ class Te {
1252
1275
  pageActionType;
1253
1276
  className;
1254
1277
  store;
@@ -1263,40 +1286,40 @@ class Ve {
1263
1286
  this.pageActionType = o, this.className = n, this.store = e, r && (this.opt = r);
1264
1287
  }
1265
1288
  getPageData() {
1266
- return this.opt ? Ge(this.pageActionType, this.className, this.store, this.opt) : Ge(this.pageActionType, this.className, this.store);
1289
+ return this.opt ? qe(this.pageActionType, this.className, this.store, this.opt) : qe(this.pageActionType, this.className, this.store);
1267
1290
  }
1268
1291
  getBtnList() {
1269
- return Ft(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
1292
+ return Dt(this.pageActionType, this.className, { workflowId: this.getWorkflowId(), email: this.getApproverEmail() });
1270
1293
  }
1271
1294
  getFiles() {
1272
- return this.getWorkflowId() ? zt(this.className, this.getWorkflowId()) : Promise.resolve({});
1295
+ return this.getWorkflowId() ? qt(this.className, this.getWorkflowId()) : Promise.resolve({});
1273
1296
  }
1274
1297
  removeFile(o) {
1275
- return Wt(this.className, o);
1298
+ return Yt(this.className, o);
1276
1299
  }
1277
1300
  getProcess() {
1278
- return Et(this.className, this.getWorkflowId());
1301
+ return Wt(this.className, this.getWorkflowId());
1279
1302
  }
1280
1303
  getCommentsHistory() {
1281
- return Qt(this.getWorkflowId());
1304
+ return Zt(this.getWorkflowId());
1282
1305
  }
1283
1306
  getAssociator() {
1284
- return Jt(this.getWorkflowId());
1307
+ return eo(this.getWorkflowId());
1285
1308
  }
1286
1309
  getApprovers() {
1287
- return Gt();
1310
+ return Qt();
1288
1311
  }
1289
1312
  assignApprover(o) {
1290
- return qt(this.getWorkflowId(), o);
1313
+ return Jt(this.getWorkflowId(), o);
1291
1314
  }
1292
1315
  addComments(o) {
1293
- return Yt(this.getWorkflowId(), this.getApproverEmail(), o);
1316
+ return Xt(this.getWorkflowId(), this.getApproverEmail(), o);
1294
1317
  }
1295
1318
  deleteAssociator(o) {
1296
- return Xt(o);
1319
+ return to(o);
1297
1320
  }
1298
1321
  }
1299
- const rn = /* @__PURE__ */ z({
1322
+ const cn = /* @__PURE__ */ z({
1300
1323
  __name: "CreateView",
1301
1324
  props: {
1302
1325
  className: {},
@@ -1304,7 +1327,7 @@ const rn = /* @__PURE__ */ z({
1304
1327
  },
1305
1328
  setup(t, { expose: o }) {
1306
1329
  o();
1307
- const n = Ne(), e = Fe(), r = Pe(), a = Ee(), i = Te("dataWidgets"), l = ve(), c = t, s = m({
1330
+ const n = Ne(), e = Fe(), r = ve(), a = Ke(), i = Ae("dataWidgets"), l = me(), c = t, s = m({
1308
1331
  pageType: "",
1309
1332
  fields: {},
1310
1333
  globalValidations: [],
@@ -1326,19 +1349,19 @@ const rn = /* @__PURE__ */ z({
1326
1349
  ...I
1327
1350
  })).filter((S) => S.widget && S.widget.widget !== "Hidden").filter((S) => !ee.value.includes(S.fieldKey)) : [];
1328
1351
  }
1329
- function y(C) {
1352
+ function b(C) {
1330
1353
  return C ? Object.entries(C).filter(([S, I]) => I.dependent).reduce(
1331
1354
  (S, [I, O]) => (S[I] = O.dependent, S),
1332
1355
  {}
1333
1356
  ) : [];
1334
1357
  }
1335
- const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), h = m(!1);
1336
- fe(async () => {
1337
- h.value = !0;
1338
- const C = new Re().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
1358
+ const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), w = m(!1);
1359
+ ge(async () => {
1360
+ w.value = !0;
1361
+ const C = new Ue().setWorkflowId(c.workflowId).setClassName(c.className).setStore({ svrStore: e, bpmStore: n }).build();
1339
1362
  s.value = await C.getPageData();
1340
- const A = s.value.fields.requestType.modelValue;
1341
- a.Test?.({ fieldValue: A, hiddenFields: ee, formData: p }), d.value = v(s.value.fields), g.value = y(s.value.fields);
1363
+ const T = s.value.fields.requestType.modelValue;
1364
+ a.Test?.({ fieldValue: T, hiddenFields: ee, formData: p }), d.value = v(s.value.fields), g.value = b(s.value.fields);
1342
1365
  for (const S in s.value.fields) {
1343
1366
  if (s.value.fields[S].widget?.widget === "File") {
1344
1367
  const I = d.value.find((O) => O.fieldKey === S);
@@ -1346,24 +1369,24 @@ const rn = /* @__PURE__ */ z({
1346
1369
  }
1347
1370
  p.value[S] = s.value.fields[S].modelValue;
1348
1371
  }
1349
- h.value = !1;
1372
+ w.value = !1;
1350
1373
  });
1351
1374
  function Z() {
1352
1375
  return e()?.userInfo?.email_address ?? "";
1353
1376
  }
1354
- async function oe(C, A, S, I, O) {
1355
- switch (A) {
1377
+ async function oe(C, T, S, I, O) {
1378
+ switch (T) {
1356
1379
  case X.Submit:
1357
- let H = !0;
1380
+ let L = !0;
1358
1381
  if (i.value?.forEach((W) => {
1359
- W?.validate && (W.validate() || (H = !1));
1360
- }), !H) {
1382
+ W?.validate && (W.validate() || (L = !1));
1383
+ }), !L) {
1361
1384
  l?.appContext.config.globalProperties.$message.error(
1362
1385
  "form validation failed, please check the input fields"
1363
1386
  );
1364
1387
  return;
1365
1388
  }
1366
- h.value = !0;
1389
+ w.value = !0;
1367
1390
  try {
1368
1391
  a[O]?.({ message: `${O} action triggered` });
1369
1392
  const W = {
@@ -1371,7 +1394,7 @@ const rn = /* @__PURE__ */ z({
1371
1394
  ...g.value
1372
1395
  };
1373
1396
  a.createPageBeforeSubmit?.(W);
1374
- const ie = await Rt(
1397
+ const ie = await Lt(
1375
1398
  c.className,
1376
1399
  W,
1377
1400
  S
@@ -1382,13 +1405,13 @@ const rn = /* @__PURE__ */ z({
1382
1405
  res: ie
1383
1406
  });
1384
1407
  const le = i.value?.map((se) => se?.submit ? se.submit(ie.toString()) : Promise.resolve()) || [];
1385
- await Promise.all(le), h.value = !1, l?.appContext.config.globalProperties.$notification.success(
1408
+ await Promise.all(le), w.value = !1, l?.appContext.config.globalProperties.$notification.success(
1386
1409
  `Your grading request has been submitted, ID is ${ie.toString()}.`
1387
1410
  ), r.push({ name: "Details", params: { workflowId: ie.toString() } });
1388
1411
  } catch {
1389
1412
  l?.appContext.config.globalProperties.$notification.error(
1390
1413
  "Failed to submit your grading request"
1391
- ), h.value = !1;
1414
+ ), w.value = !1;
1392
1415
  }
1393
1416
  break;
1394
1417
  case X.Link:
@@ -1404,7 +1427,7 @@ const rn = /* @__PURE__ */ z({
1404
1427
  }
1405
1428
  break;
1406
1429
  default:
1407
- console.warn("Unknown action type:", A);
1430
+ console.warn("Unknown action type:", T);
1408
1431
  }
1409
1432
  }
1410
1433
  const E = [
@@ -1415,39 +1438,39 @@ const rn = /* @__PURE__ */ z({
1415
1438
  "jobAttachmentPrevious",
1416
1439
  "positionId"
1417
1440
  ], ee = m(E);
1418
- function ne(C, A) {
1419
- a[C]?.({ fieldValue: A, hiddenFields: ee, formData: p }), s.value && (d.value = v(s.value.fields));
1441
+ function ne(C, T) {
1442
+ a[C]?.({ fieldValue: T, hiddenFields: ee, formData: p }), s.value && (d.value = v(s.value.fields));
1420
1443
  }
1421
- const T = K(() => Ke(d.value)), k = { bpmStore: n, svrStore: e, router: r, triggers: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: y, reversedActions: f, _data: p, loading: h, getApproverEmail: Z, clickHandler: oe, newHiddenFields: E, hiddenFields: ee, changeHandler: ne, groupedFields: T, DataWidgets: Ae, ActionButton: Ie, TopBar: Ue };
1444
+ const A = K(() => ze(d.value)), k = { bpmStore: n, svrStore: e, router: r, triggers: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: b, reversedActions: f, _data: p, loading: w, getApproverEmail: Z, clickHandler: oe, newHiddenFields: E, hiddenFields: ee, changeHandler: ne, groupedFields: A, DataWidgets: Ie, ActionButton: Pe, TopBar: Re };
1422
1445
  return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
1423
1446
  }
1424
- }), sn = { class: "page-container" }, ln = { class: "page-body" }, cn = { class: "form-card" }, dn = { class: "form-fields-vertical" }, un = { class: "form-fields" }, fn = {
1447
+ }), dn = { class: "page-container" }, un = { class: "page-body" }, fn = { class: "form-card" }, pn = { class: "form-fields-vertical" }, mn = { class: "form-fields" }, gn = {
1425
1448
  key: 0,
1426
1449
  class: "form-content"
1427
- }, pn = { class: "page-footer" }, mn = { class: "action-container" }, gn = { class: "action-buttons" };
1428
- function _n(t, o, n, e, r, a) {
1450
+ }, _n = { class: "page-footer" }, vn = { class: "action-container" }, bn = { class: "action-buttons" };
1451
+ function yn(t, o, n, e, r, a) {
1429
1452
  const i = V("a-card"), l = V("a-spin");
1430
- return u(), _("div", sn, [
1431
- U(e.TopBar, {
1453
+ return u(), _("div", dn, [
1454
+ R(e.TopBar, {
1432
1455
  title: e.pageData.banner.title,
1433
1456
  subTitle: e.pageData.banner.subTitle,
1434
1457
  email: e.getApproverEmail()
1435
1458
  }, null, 8, ["title", "subTitle", "email"]),
1436
- b("div", ln, [
1437
- U(l, {
1459
+ y("div", un, [
1460
+ R(l, {
1438
1461
  loading: e.loading,
1439
1462
  class: "form-container"
1440
1463
  }, {
1441
1464
  default: x(() => [
1442
- b("div", cn, [
1443
- b("div", dn, [
1465
+ y("div", fn, [
1466
+ y("div", pn, [
1444
1467
  (u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
1445
1468
  key: c.name,
1446
1469
  title: c.name,
1447
1470
  style: { "margin-bottom": "24px" }
1448
1471
  }, {
1449
1472
  default: x(() => [
1450
- b("div", un, [
1473
+ y("div", mn, [
1451
1474
  (u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
1452
1475
  key: s.fieldKey,
1453
1476
  ref_for: !0,
@@ -1465,7 +1488,7 @@ function _n(t, o, n, e, r, a) {
1465
1488
  _: 2
1466
1489
  }, 1032, ["title"]))), 128))
1467
1490
  ]),
1468
- t.$slots.content ? (u(), _("div", fn, [
1491
+ t.$slots.content ? (u(), _("div", gn, [
1469
1492
  ue(t.$slots, "content", {}, void 0, !0)
1470
1493
  ])) : re("", !0)
1471
1494
  ])
@@ -1473,10 +1496,10 @@ function _n(t, o, n, e, r, a) {
1473
1496
  _: 3
1474
1497
  }, 8, ["loading"])
1475
1498
  ]),
1476
- b("div", pn, [
1477
- b("div", mn, [
1499
+ y("div", _n, [
1500
+ y("div", vn, [
1478
1501
  ue(t.$slots, "action", {}, void 0, !0),
1479
- b("div", gn, [
1502
+ y("div", bn, [
1480
1503
  (u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
1481
1504
  key: c.title,
1482
1505
  loading: e.loading,
@@ -1489,7 +1512,7 @@ function _n(t, o, n, e, r, a) {
1489
1512
  ])
1490
1513
  ]);
1491
1514
  }
1492
- const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-31413447"], ["__file", "CreateView.vue"]]), yn = /* @__PURE__ */ z({
1515
+ const hn = /* @__PURE__ */ J(cn, [["render", yn], ["__scopeId", "data-v-31413447"], ["__file", "CreateView.vue"]]), wn = /* @__PURE__ */ z({
1493
1516
  __name: "UpdateView",
1494
1517
  props: {
1495
1518
  className: {},
@@ -1497,7 +1520,7 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-31413447
1497
1520
  },
1498
1521
  setup(t, { expose: o }) {
1499
1522
  o();
1500
- const n = Pe(), e = Ee(), r = Fe(), a = Ne(), i = Te("dataWidgets"), l = ve(), c = t, s = m({
1523
+ const n = ve(), e = Ke(), r = Fe(), a = Ne(), i = Ae("dataWidgets"), l = me(), c = t, s = m({
1501
1524
  pageType: "",
1502
1525
  fields: {},
1503
1526
  globalValidations: [],
@@ -1514,56 +1537,56 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-31413447
1514
1537
  }
1515
1538
  }), d = m([]), g = m({});
1516
1539
  function v(k) {
1517
- return k ? Object.entries(k).map(([A, S]) => ({
1518
- fieldKey: A,
1540
+ return k ? Object.entries(k).map(([T, S]) => ({
1541
+ fieldKey: T,
1519
1542
  ...S
1520
- })).filter((A) => A.widget && A.widget.widget !== "Hidden").filter((A) => !E.value.includes(A.fieldKey)) : [];
1543
+ })).filter((T) => T.widget && T.widget.widget !== "Hidden").filter((T) => !E.value.includes(T.fieldKey)) : [];
1521
1544
  }
1522
- function y(k) {
1523
- return k ? Object.entries(k).filter(([A, S]) => S.dependent).reduce((A, [S, I]) => (A[S] = I.dependent, A), {}) : [];
1545
+ function b(k) {
1546
+ return k ? Object.entries(k).filter(([T, S]) => S.dependent).reduce((T, [S, I]) => (T[S] = I.dependent, T), {}) : [];
1524
1547
  }
1525
- const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), h = m(!1);
1526
- fe(async () => {
1527
- h.value = !0;
1528
- const k = new Re().setPageActionType(_e.Update).setClassName(c.className).setStore({ svrStore: r, bpmStore: a }).setWorkflowId(c.workflowId).build();
1548
+ const f = K(() => s.value?.actions ? [...s.value.actions].reverse() : []), p = m({}), w = m(!1);
1549
+ ge(async () => {
1550
+ w.value = !0;
1551
+ const k = new Ue().setPageActionType(be.Update).setClassName(c.className).setStore({ svrStore: r, bpmStore: a }).setWorkflowId(c.workflowId).build();
1529
1552
  s.value = await k.getPageData();
1530
- const C = await k.getBtnList(), A = await k.getFiles();
1553
+ const C = await k.getBtnList(), T = await k.getFiles();
1531
1554
  s.value.actions = s.value.actions?.filter((I) => {
1532
- const O = C.find((H) => H.button === I.title);
1555
+ const O = C.find((L) => L.button === I.title);
1533
1556
  return O ? O.isShow : !0;
1534
1557
  });
1535
1558
  const S = s.value.fields.requestType.modelValue;
1536
- e.Test?.({ fieldValue: S, hiddenFields: E, formData: p }), d.value = v(s.value.fields), g.value = y(s.value.fields);
1559
+ e.Test?.({ fieldValue: S, hiddenFields: E, formData: p }), d.value = v(s.value.fields), g.value = b(s.value.fields);
1537
1560
  for (const I in s.value.fields) {
1538
1561
  if (s.value.fields[I].widget?.widget === "File") {
1539
- const O = d.value.find((H) => H.fieldKey === I);
1540
- O && O.widget && (O.widget.files = A[I] ?? [], O.widget.removeFile = (H) => k.removeFile(H));
1562
+ const O = d.value.find((L) => L.fieldKey === I);
1563
+ O && O.widget && (O.widget.files = T[I] ?? [], O.widget.removeFile = (L) => k.removeFile(L));
1541
1564
  }
1542
1565
  p.value[I] = s.value.fields[I].modelValue;
1543
1566
  }
1544
- h.value = !1;
1567
+ w.value = !1;
1545
1568
  });
1546
1569
  function Z() {
1547
1570
  return r()?.userInfo?.email_address ?? "";
1548
1571
  }
1549
- async function oe(k, C, A, S, I) {
1572
+ async function oe(k, C, T, S, I) {
1550
1573
  switch (C) {
1551
1574
  case X.Submit:
1552
1575
  let O = !0;
1553
- if (i.value?.forEach((H) => {
1554
- H?.validate && (H.validate() || (O = !1));
1576
+ if (i.value?.forEach((L) => {
1577
+ L?.validate && (L.validate() || (O = !1));
1555
1578
  }), !O) {
1556
1579
  l?.appContext.config.globalProperties.$message.error("form validation failed, please check the input fields");
1557
1580
  return;
1558
1581
  }
1559
- h.value = !0;
1582
+ w.value = !0;
1560
1583
  try {
1561
- const H = { ...p.value, ...g.value };
1562
- e.updatePageBeforeSubmit?.(H, a().employeeInfo);
1563
- const W = await Dt(c.className, c.workflowId, H, A), ie = i.value?.map((le) => le?.submit ? le.submit(W.toString()) : Promise.resolve()) || [];
1564
- await Promise.all(ie), h.value = !1, l?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${W.toString()}.`);
1584
+ const L = { ...p.value, ...g.value };
1585
+ e.updatePageBeforeSubmit?.(L, a().employeeInfo);
1586
+ const W = await Ht(c.className, c.workflowId, L, T), ie = i.value?.map((le) => le?.submit ? le.submit(W.toString()) : Promise.resolve()) || [];
1587
+ await Promise.all(ie), w.value = !1, l?.appContext.config.globalProperties.$notification.success(`Your grading request has been submitted, ID is ${W.toString()}.`);
1565
1588
  } catch {
1566
- l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), h.value = !1;
1589
+ l?.appContext.config.globalProperties.$notification.error("Failed to submit your grading request"), w.value = !1;
1567
1590
  }
1568
1591
  break;
1569
1592
  case X.Link:
@@ -1580,36 +1603,36 @@ const vn = /* @__PURE__ */ J(rn, [["render", _n], ["__scopeId", "data-v-31413447
1580
1603
  function ee(k, C) {
1581
1604
  e[k]?.({ fieldValue: C, hiddenFields: E, formData: p }), s.value && (d.value = v(s.value.fields));
1582
1605
  }
1583
- const ne = K(() => Ke(d.value)), T = { router: n, triggers: e, svrStore: r, bpmStore: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: y, reversedActions: f, _data: p, loading: h, getApproverEmail: Z, clickHandler: oe, hiddenFields: E, changeHandler: ee, groupedFields: ne, DataWidgets: Ae, ActionButton: Ie, TopBar: Ue };
1584
- return Object.defineProperty(T, "__isScriptSetup", { enumerable: !1, value: !0 }), T;
1606
+ const ne = K(() => ze(d.value)), A = { router: n, triggers: e, svrStore: r, bpmStore: a, dataWidgetsRefs: i, instance: l, props: c, pageData: s, _fields: d, _dependent: g, genField: v, genDependentField: b, reversedActions: f, _data: p, loading: w, getApproverEmail: Z, clickHandler: oe, hiddenFields: E, changeHandler: ee, groupedFields: ne, DataWidgets: Ie, ActionButton: Pe, TopBar: Re };
1607
+ return Object.defineProperty(A, "__isScriptSetup", { enumerable: !1, value: !0 }), A;
1585
1608
  }
1586
- }), bn = { class: "page-container" }, wn = { class: "page-body" }, hn = { class: "form-card" }, kn = { class: "form-fields-vertical" }, Cn = { class: "form-fields" }, Sn = {
1609
+ }), kn = { class: "page-container" }, Cn = { class: "page-body" }, Sn = { class: "form-card" }, xn = { class: "form-fields-vertical" }, Vn = { class: "form-fields" }, Tn = {
1587
1610
  key: 0,
1588
1611
  class: "form-content"
1589
- }, xn = { class: "page-footer" }, Vn = { class: "action-container" }, Tn = { class: "action-buttons" };
1590
- function An(t, o, n, e, r, a) {
1612
+ }, An = { class: "page-footer" }, In = { class: "action-container" }, Pn = { class: "action-buttons" };
1613
+ function Nn(t, o, n, e, r, a) {
1591
1614
  const i = V("a-card"), l = V("a-spin");
1592
- return u(), _("div", bn, [
1593
- U(e.TopBar, {
1615
+ return u(), _("div", kn, [
1616
+ R(e.TopBar, {
1594
1617
  title: e.pageData.banner.title,
1595
1618
  subTitle: e.pageData.banner.subTitle,
1596
1619
  email: e.getApproverEmail()
1597
1620
  }, null, 8, ["title", "subTitle", "email"]),
1598
- b("div", wn, [
1599
- U(l, {
1621
+ y("div", Cn, [
1622
+ R(l, {
1600
1623
  loading: e.loading,
1601
1624
  class: "form-container"
1602
1625
  }, {
1603
1626
  default: x(() => [
1604
- b("div", hn, [
1605
- b("div", kn, [
1627
+ y("div", Sn, [
1628
+ y("div", xn, [
1606
1629
  (u(!0), _($, null, M(e.groupedFields, (c) => (u(), D(i, {
1607
1630
  key: c.name,
1608
1631
  title: c.name,
1609
1632
  style: { "margin-bottom": "24px" }
1610
1633
  }, {
1611
1634
  default: x(() => [
1612
- b("div", Cn, [
1635
+ y("div", Vn, [
1613
1636
  (u(!0), _($, null, M(c.fields, (s) => (u(), D(e.DataWidgets, {
1614
1637
  key: s.fieldKey,
1615
1638
  ref_for: !0,
@@ -1627,7 +1650,7 @@ function An(t, o, n, e, r, a) {
1627
1650
  _: 2
1628
1651
  }, 1032, ["title"]))), 128))
1629
1652
  ]),
1630
- t.$slots.content ? (u(), _("div", Sn, [
1653
+ t.$slots.content ? (u(), _("div", Tn, [
1631
1654
  ue(t.$slots, "content", {}, void 0, !0)
1632
1655
  ])) : re("", !0)
1633
1656
  ])
@@ -1635,10 +1658,10 @@ function An(t, o, n, e, r, a) {
1635
1658
  _: 3
1636
1659
  }, 8, ["loading"])
1637
1660
  ]),
1638
- b("div", xn, [
1639
- b("div", Vn, [
1661
+ y("div", An, [
1662
+ y("div", In, [
1640
1663
  ue(t.$slots, "action", {}, void 0, !0),
1641
- b("div", Tn, [
1664
+ y("div", Pn, [
1642
1665
  (u(!0), _($, null, M(e.reversedActions, (c) => (u(), D(e.ActionButton, {
1643
1666
  key: c.title,
1644
1667
  loading: e.loading,
@@ -1651,11 +1674,11 @@ function An(t, o, n, e, r, a) {
1651
1674
  ])
1652
1675
  ]);
1653
1676
  }
1654
- const In = /* @__PURE__ */ J(yn, [["render", An], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), ut = Symbol("library-custom-comp");
1655
- function Pn() {
1656
- return ye(ut, null);
1677
+ const Fn = /* @__PURE__ */ J(wn, [["render", Nn], ["__scopeId", "data-v-605f261e"], ["__file", "UpdateView.vue"]]), mt = Symbol("library-custom-comp");
1678
+ function Rn() {
1679
+ return ye(mt, null);
1657
1680
  }
1658
- const Nn = /* @__PURE__ */ z({
1681
+ const Un = /* @__PURE__ */ z({
1659
1682
  __name: "DetailView",
1660
1683
  props: {
1661
1684
  className: {},
@@ -1663,7 +1686,7 @@ const Nn = /* @__PURE__ */ z({
1663
1686
  },
1664
1687
  setup(t, { expose: o }) {
1665
1688
  o();
1666
- const n = Fe(), e = Ne(), r = Ee(), a = Pe(), i = Pn(), l = ve(), c = t;
1689
+ const n = Fe(), e = Ne(), r = Ke(), a = ve(), i = Rn(), l = me(), c = t;
1667
1690
  let s;
1668
1691
  const d = m({
1669
1692
  pageType: "",
@@ -1680,8 +1703,8 @@ const Nn = /* @__PURE__ */ z({
1680
1703
  workFlowReason: "",
1681
1704
  workflowId: ""
1682
1705
  }
1683
- }), g = m([]), v = Te("dataWidgets");
1684
- function y(N) {
1706
+ }), g = m([]), v = Ae("dataWidgets");
1707
+ function b(N) {
1685
1708
  return N ? Object.entries(N).map(([G, F]) => {
1686
1709
  typeof F.modelValue == "boolean" ? F.fieldValue = F.modelValue ? "Yes" : "No" : F.fieldValue = F.modelValue;
1687
1710
  const j = {
@@ -1689,7 +1712,7 @@ const Nn = /* @__PURE__ */ z({
1689
1712
  ...F
1690
1713
  };
1691
1714
  return j.widget?.readonly || j.validations?.some(
1692
- (me) => me.ruleName === "Required"
1715
+ (pe) => pe.ruleName === "Required"
1693
1716
  ) ? j : {
1694
1717
  ...j,
1695
1718
  validations: [
@@ -1697,16 +1720,16 @@ const Nn = /* @__PURE__ */ z({
1697
1720
  {
1698
1721
  ruleName: "Required",
1699
1722
  ruleParameter: "",
1700
- errorMessage: `${pe(j.widget?.title) || j.fieldKey} is required`
1723
+ errorMessage: `${fe(j.widget?.title) || j.fieldKey} is required`
1701
1724
  }
1702
1725
  ]
1703
1726
  };
1704
1727
  }).filter((G) => G.widget && G.widget.widget !== "Hidden").filter((G) => !C.value.includes(G.fieldKey)) : [];
1705
1728
  }
1706
- const f = K(() => Ke(g.value)), p = K(() => d.value?.actions ? [...d.value.actions].reverse() : []), h = m(!0), Z = (N, L) => {
1729
+ const f = K(() => ze(g.value)), p = K(() => d.value?.actions ? [...d.value.actions].reverse() : []), w = m(!0), Z = (N, H) => {
1707
1730
  const G = N.findIndex((F) => F.isCurrent);
1708
1731
  return N.map((F, j) => {
1709
- const R = {
1732
+ const U = {
1710
1733
  id: F.id,
1711
1734
  title: "",
1712
1735
  proxy: "",
@@ -1715,95 +1738,95 @@ const Nn = /* @__PURE__ */ z({
1715
1738
  status: 1,
1716
1739
  time: ""
1717
1740
  };
1718
- R.title = F.workflowProcessApprovers[0]?.name;
1719
- const me = F.workflowProcessApprovers[F.workflowProcessApprovers.length - 1], Ce = F.workflowHistorys[F.workflowHistorys.length - 1], we = Ce?.workflowHistoryApprovers[Ce?.workflowHistoryApprovers?.length - 1];
1720
- if (me && we && me?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (R.title = `${we.name}`, R.proxy = `Proxy: ${me.name}`), F.sort > 1 ? R.sub = "Approver Role: " + F.nodeName.replace("Submit", "").replace("Approve", "") : R.sub = "Submit Application", F.isCurrent && L !== -1)
1721
- R.desc = "In Approval", R.status = 1;
1741
+ U.title = F.workflowProcessApprovers[0]?.name;
1742
+ const pe = F.workflowProcessApprovers[F.workflowProcessApprovers.length - 1], Se = F.workflowHistorys[F.workflowHistorys.length - 1], we = Se?.workflowHistoryApprovers[Se?.workflowHistoryApprovers?.length - 1];
1743
+ if (pe && we && pe?.email?.toLowerCase() !== we?.approverEmail?.toLowerCase() && (U.title = `${we.name}`, U.proxy = `Proxy: ${pe.name}`), F.sort > 1 ? U.sub = "Approver Role: " + F.nodeName.replace("Submit", "").replace("Approve", "") : U.sub = "Submit Application", F.isCurrent && H !== -1)
1744
+ U.desc = "In Approval", U.status = 1;
1722
1745
  else {
1723
1746
  const te = F.workflowHistorys[F.workflowHistorys.length - 1];
1724
1747
  if (te && te.status === 100)
1725
- R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 2, R.desc = "approve success!";
1748
+ U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 2, U.desc = "approve success!";
1726
1749
  else if (te && te.status === 999)
1727
- R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), R.status = 0, R.desc = "approve reject!";
1750
+ U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), U.status = 0, U.desc = "approve reject!";
1728
1751
  else if (te)
1729
- if (R.time = xe(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.sort === 1)
1730
- R.status = 2, R.desc = "";
1752
+ if (U.time = Ve(te.takeActionAt, "yyyy-MM-dd hh:mm:ss"), F.sort === 1)
1753
+ U.status = 2, U.desc = "";
1731
1754
  else {
1732
- const Se = te.workflowHistoryApprovers[0];
1733
- R.status = 3, R.desc = Se?.reason ? `Rejected reason: ${Se.reason}` : "Rejected";
1755
+ const xe = te.workflowHistoryApprovers[0];
1756
+ U.status = 3, U.desc = xe?.reason ? `Rejected reason: ${xe.reason}` : "Rejected";
1734
1757
  }
1735
- else j < G || G === -1 ? (R.status = 0, R.desc = "Skipped") : (R.status = 0, R.desc = "Pending Approval");
1758
+ else j < G || G === -1 ? (U.status = 0, U.desc = "Skipped") : (U.status = 0, U.desc = "Pending Approval");
1736
1759
  te && te.status;
1737
1760
  }
1738
- return R;
1761
+ return U;
1739
1762
  });
1740
- }, oe = m([]), E = m(!1), ee = m(!1), ne = m(!1), T = m(!1);
1763
+ }, oe = m([]), E = m(!1), ee = m(!1), ne = m(!1), A = m(!1);
1741
1764
  async function k() {
1742
1765
  const N = await s.getBtnList();
1743
- d.value.actions = d.value.actions?.filter((L) => {
1744
- const G = N.find((F) => F.button === L.title);
1766
+ d.value.actions = d.value.actions?.filter((H) => {
1767
+ const G = N.find((F) => F.button === H.title);
1745
1768
  return G ? G.isShow : !0;
1746
- }), E.value = N.find((L) => L.button === "IsGlobal")?.isShow ?? !1, ee.value = N.find((L) => L.button === "AssignButton")?.isShow ?? !1, ne.value = N.find((L) => L.button === "AssignList")?.isShow ?? !1, T.value = N.find((L) => L.button === "AddCommentsButton")?.isShow ?? !1;
1769
+ }), E.value = N.find((H) => H.button === "IsGlobal")?.isShow ?? !1, ee.value = N.find((H) => H.button === "AssignButton")?.isShow ?? !1, ne.value = N.find((H) => H.button === "AssignList")?.isShow ?? !1, A.value = N.find((H) => H.button === "AddCommentsButton")?.isShow ?? !1;
1747
1770
  }
1748
1771
  const C = m([]);
1749
- async function A() {
1750
- h.value = !0, s = new Re().setPageActionType(_e.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await s.getPageData();
1772
+ async function T() {
1773
+ w.value = !0, s = new Ue().setPageActionType(be.Details).setClassName(c.className).setStore({ svrStore: n, bpmStore: e }).setWorkflowId(c.workflowId).build(), d.value = await s.getPageData();
1751
1774
  const N = await s.getFiles();
1752
1775
  le.value = await s.getApprovers(), W.value = await s.getCommentsHistory(), se.value = await s.getAssociator(), await k(), r.detailPageLoaded?.(d, e().employeeInfo);
1753
- const L = d.value.fields.requestType.modelValue;
1754
- r.Test?.({ fieldValue: L, hiddenFields: C }), g.value = y(d.value.fields);
1776
+ const H = d.value.fields.requestType.modelValue;
1777
+ r.Test?.({ fieldValue: H, hiddenFields: C }), g.value = b(d.value.fields);
1755
1778
  for (const F in d.value.fields)
1756
1779
  if (d.value.fields[F].widget?.widget === "File") {
1757
- const j = g.value.find((R) => R.fieldKey === F);
1780
+ const j = g.value.find((U) => U.fieldKey === F);
1758
1781
  j && j.widget && (j.widget.files = N[F] ?? []);
1759
1782
  }
1760
1783
  const G = await s.getProcess();
1761
- oe.value = Z(G, 0), h.value = !1;
1784
+ oe.value = Z(G, 0), w.value = !1;
1762
1785
  }
1763
- fe(A);
1764
- async function S(N, L) {
1765
- return r[N]?.(L);
1786
+ ge(T);
1787
+ async function S(N, H) {
1788
+ return r[N]?.(H);
1766
1789
  }
1767
1790
  function I() {
1768
1791
  return n()?.userInfo?.email_address ?? "";
1769
1792
  }
1770
- async function O(N, L, G, F, j) {
1793
+ async function O(N, H, G, F, j) {
1771
1794
  try {
1772
- switch (L) {
1795
+ switch (H) {
1773
1796
  case X.Submit:
1774
- let R = !0;
1775
- if (v.value?.forEach((ge) => {
1776
- ge?.validate && !ge.validate() && (R = !1);
1777
- }), !R) {
1797
+ let U = !0;
1798
+ if (v.value?.forEach((_e) => {
1799
+ _e?.validate && !_e.validate() && (U = !1);
1800
+ }), !U) {
1778
1801
  l?.appContext.config.globalProperties.$message.error(
1779
1802
  "Please complete all required fields before submit."
1780
1803
  );
1781
1804
  return;
1782
1805
  }
1783
- const { reason: me, ifGlobal: Ce } = await S(j, {
1806
+ const { reason: pe, ifGlobal: Se } = await S(j, {
1784
1807
  isGlobal: E.value
1785
1808
  });
1786
- h.value = !0;
1787
- const we = g.value.find((ge) => ge.fieldKey === "approvedGrade")?.modelValue, te = j === "Approve" ? "100" : "-1", Se = await jt(
1809
+ w.value = !0;
1810
+ const we = g.value.find((_e) => _e.fieldKey === "approvedGrade")?.modelValue, te = j === "Approve" ? "100" : "-1", xe = await Kt(
1788
1811
  c.className,
1789
1812
  c.workflowId,
1790
1813
  I(),
1791
- me,
1814
+ pe,
1792
1815
  G,
1793
1816
  te,
1794
- Ce,
1817
+ Se,
1795
1818
  {
1796
1819
  approvedGrade: we
1797
1820
  }
1798
1821
  );
1799
1822
  await S(`${j}Success`, {
1800
1823
  workflowId: c.workflowId,
1801
- res: Se
1802
- }), h.value = !1;
1803
- const ft = j === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
1824
+ res: xe
1825
+ }), w.value = !1;
1826
+ const gt = j === "Approve" ? `Request ID ${c.workflowId} has been approved.` : `Request ID ${c.workflowId} has been rejected.`;
1804
1827
  l?.appContext.config.globalProperties.$notification.success(
1805
- ft
1806
- ), A();
1828
+ gt
1829
+ ), T();
1807
1830
  break;
1808
1831
  case X.Link:
1809
1832
  try {
@@ -1811,8 +1834,8 @@ const Nn = /* @__PURE__ */ z({
1811
1834
  name: F,
1812
1835
  params: { className: c.className, workflowId: c.workflowId }
1813
1836
  });
1814
- } catch (ge) {
1815
- console.error("Error in link action trigger:", ge);
1837
+ } catch (_e) {
1838
+ console.error("Error in link action trigger:", _e);
1816
1839
  }
1817
1840
  break;
1818
1841
  case X.Button:
@@ -1821,18 +1844,18 @@ const Nn = /* @__PURE__ */ z({
1821
1844
  associators: se,
1822
1845
  isShowAssignSelect: ee,
1823
1846
  isShowAssignList: ne,
1824
- assignCallback: w,
1847
+ assignCallback: h,
1825
1848
  deleteAssociatorCallback: B
1826
1849
  });
1827
1850
  break;
1828
1851
  default:
1829
- console.warn("Unknown action type:", L);
1852
+ console.warn("Unknown action type:", H);
1830
1853
  }
1831
1854
  } catch {
1832
1855
  }
1833
1856
  }
1834
- const H = m(""), W = m([]), ie = m(""), le = m([]), se = m([]);
1835
- async function w(N) {
1857
+ const L = m(""), W = m([]), ie = m(""), le = m([]), se = m([]);
1858
+ async function h(N) {
1836
1859
  if (!N) {
1837
1860
  l?.appContext.config.globalProperties.$message.error(
1838
1861
  "Please select an approver"
@@ -1847,8 +1870,8 @@ const Nn = /* @__PURE__ */ z({
1847
1870
  await s.assignApprover(N), se.value = await s.getAssociator(), k(), l?.appContext.config.globalProperties.$notification.success(
1848
1871
  "Assign Approver clicked!"
1849
1872
  );
1850
- } catch (L) {
1851
- if (L.status === 409) {
1873
+ } catch (H) {
1874
+ if (H.status === 409) {
1852
1875
  l?.appContext.config.globalProperties.$notification.error(
1853
1876
  "This user is already an associator"
1854
1877
  );
@@ -1859,12 +1882,12 @@ const Nn = /* @__PURE__ */ z({
1859
1882
  );
1860
1883
  }
1861
1884
  }
1862
- async function P(N, L) {
1885
+ async function P(N, H) {
1863
1886
  const { Modal: G } = await import("@arco-design/web-vue");
1864
1887
  return new Promise((F, j) => {
1865
1888
  G.confirm({
1866
1889
  title: N,
1867
- content: L,
1890
+ content: H,
1868
1891
  okText: "OK",
1869
1892
  cancelText: "Cancel",
1870
1893
  onOk: () => F(!0),
@@ -1892,104 +1915,104 @@ const Nn = /* @__PURE__ */ z({
1892
1915
  }
1893
1916
  }
1894
1917
  async function de() {
1895
- if (!H.value.trim()) {
1918
+ if (!L.value.trim()) {
1896
1919
  l?.appContext.config.globalProperties.$message.error(
1897
1920
  "Comment cannot be empty"
1898
1921
  );
1899
1922
  return;
1900
1923
  }
1901
- await s.addComments(H.value.trim()), H.value = "", W.value = await s.getCommentsHistory(), l?.appContext.config.globalProperties.$notification.success(
1924
+ await s.addComments(L.value.trim()), L.value = "", W.value = await s.getCommentsHistory(), l?.appContext.config.globalProperties.$notification.success(
1902
1925
  "Add Comment clicked!"
1903
1926
  );
1904
1927
  }
1905
- function pe(N) {
1928
+ function fe(N) {
1906
1929
  return N ? N === "OtherInformationText" ? "Other Information" : N : "";
1907
1930
  }
1908
- const ze = { svrStore: n, bpmStore: e, triggers: r, router: a, customComps: i, instance: l, props: c, get page() {
1931
+ const We = { svrStore: n, bpmStore: e, triggers: r, router: a, customComps: i, instance: l, props: c, get page() {
1909
1932
  return s;
1910
1933
  }, set page(N) {
1911
1934
  s = N;
1912
- }, pageData: d, _fields: g, dataWidgetsRefs: v, genField: y, groupedFields: f, reversedActions: p, loading: h, mapWorkflowSteps: Z, steps: oe, isGlobal: E, isShowAssignSelect: ee, isShowAssignList: ne, isShowCommentTextArea: T, reloadButtonList: k, hiddenFields: C, load: A, triggerFn: S, getApproverEmail: I, clickHandler: O, comment: H, commentsHistory: W, selectedApprover: ie, approvers: le, associators: se, onAssignApprover: w, confirmDialog: P, onDeleteAssociator: B, onAddComment: de, formatTitle: pe, ActionButton: Ie, get IconDownload() {
1913
- return Uo;
1914
- }, TopBar: Ue, get formatDate() {
1915
- return xe;
1916
- }, ToolTip: st, DataWidgets: Ae };
1917
- return Object.defineProperty(ze, "__isScriptSetup", { enumerable: !1, value: !0 }), ze;
1935
+ }, pageData: d, _fields: g, dataWidgetsRefs: v, genField: b, groupedFields: f, reversedActions: p, loading: w, mapWorkflowSteps: Z, steps: oe, isGlobal: E, isShowAssignSelect: ee, isShowAssignList: ne, isShowCommentTextArea: A, reloadButtonList: k, hiddenFields: C, load: T, triggerFn: S, getApproverEmail: I, clickHandler: O, comment: L, commentsHistory: W, selectedApprover: ie, approvers: le, associators: se, onAssignApprover: h, confirmDialog: P, onDeleteAssociator: B, onAddComment: de, formatTitle: fe, ActionButton: Pe, get IconDownload() {
1936
+ return Bo;
1937
+ }, TopBar: Re, get formatDate() {
1938
+ return Ve;
1939
+ }, ToolTip: dt, DataWidgets: Ie };
1940
+ return Object.defineProperty(We, "__isScriptSetup", { enumerable: !1, value: !0 }), We;
1918
1941
  }
1919
- }), Fn = { class: "page-container" }, Un = { class: "page-body" }, Rn = { class: "detail-card" }, Dn = { class: "form-fields-vertical" }, Bn = { class: "detail-fields" }, Hn = { class: "detail-field" }, Ln = {
1942
+ }), Dn = { class: "page-container" }, Bn = { class: "page-body" }, Ln = { class: "detail-card" }, Hn = { class: "form-fields-vertical" }, On = { class: "detail-fields" }, $n = { class: "detail-field" }, jn = {
1920
1943
  key: 0,
1921
1944
  class: "detail-field"
1922
- }, On = { class: "field-label" }, $n = {
1945
+ }, Mn = { class: "field-label" }, En = {
1923
1946
  key: 1,
1924
1947
  class: "field-value"
1925
- }, jn = {
1948
+ }, Kn = {
1926
1949
  key: 2,
1927
1950
  class: "detail-field-wrapper"
1928
- }, Mn = { class: "detail-field" }, En = {
1951
+ }, zn = { class: "detail-field" }, Wn = {
1929
1952
  key: 0,
1930
1953
  class: "detail-content"
1931
- }, Kn = { class: "page-footer" }, zn = { class: "action-container" }, Wn = { class: "action-buttons" };
1932
- function Gn(t, o, n, e, r, a) {
1954
+ }, Gn = { class: "page-footer" }, qn = { class: "action-container" }, Yn = { class: "action-buttons" };
1955
+ function Qn(t, o, n, e, r, a) {
1933
1956
  const i = V("a-link"), l = V("a-space"), c = V("a-card");
1934
1957
  V("a-option"), V("a-select");
1935
- const s = V("a-button"), d = V("a-list-item"), g = V("a-list"), v = V("a-textarea"), y = V("a-spin");
1936
- return u(), _("div", Fn, [
1937
- U(e.TopBar, {
1958
+ const s = V("a-button"), d = V("a-list-item"), g = V("a-list"), v = V("a-textarea"), b = V("a-spin");
1959
+ return u(), _("div", Dn, [
1960
+ R(e.TopBar, {
1938
1961
  title: e.pageData.banner.title,
1939
1962
  subTitle: e.pageData.banner.subTitle,
1940
1963
  email: e.getApproverEmail()
1941
1964
  }, null, 8, ["title", "subTitle", "email"]),
1942
- b("div", Un, [
1943
- U(y, {
1965
+ y("div", Bn, [
1966
+ R(b, {
1944
1967
  loading: e.loading,
1945
1968
  class: "detail-container"
1946
1969
  }, {
1947
1970
  default: x(() => [
1948
- b("div", Rn, [
1949
- (u(), D($e(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
1950
- b("div", Dn, [
1971
+ y("div", Ln, [
1972
+ (u(), D(je(e.customComps.Steps), { steps: e.steps }, null, 8, ["steps"])),
1973
+ y("div", Hn, [
1951
1974
  (u(!0), _($, null, M(e.groupedFields, (f) => (u(), D(c, {
1952
1975
  key: f.name,
1953
1976
  title: f.name,
1954
1977
  style: { "margin-bottom": "24px" }
1955
1978
  }, {
1956
1979
  default: x(() => [
1957
- b("div", Bn, [
1980
+ y("div", On, [
1958
1981
  (u(!0), _($, null, M(f.fields, (p) => (u(), _("div", {
1959
1982
  key: p.fieldKey,
1960
1983
  class: "detail-field-wrapper"
1961
1984
  }, [
1962
- b("div", Hn, [
1985
+ y("div", $n, [
1963
1986
  p.widget?.readonly ? (u(), _($, { key: 1 }, [
1964
- b("div", On, [
1987
+ y("div", Mn, [
1965
1988
  ae(Q(e.formatTitle(p.widget?.title)) + " ", 1),
1966
- U(e.ToolTip, {
1989
+ R(e.ToolTip, {
1967
1990
  "is-visible": p.widget?.isVisible ?? !1,
1968
1991
  "output-text": p.widget?.outputText ?? []
1969
1992
  }, null, 8, ["is-visible", "output-text"])
1970
1993
  ]),
1971
- p.widget?.widget === "File" ? (u(!0), _($, { key: 0 }, M(p.widget.files, (h) => (u(), _("div", {
1994
+ p.widget?.widget === "File" ? (u(!0), _($, { key: 0 }, M(p.widget.files, (w) => (u(), _("div", {
1972
1995
  class: "field-value",
1973
- key: h.id
1996
+ key: w.id
1974
1997
  }, [
1975
- U(l, null, {
1998
+ R(l, null, {
1976
1999
  default: x(() => [
1977
- ae(Q(h.name) + " ", 1),
1978
- U(i, {
1979
- href: h.url,
2000
+ ae(Q(w.name) + " ", 1),
2001
+ R(i, {
2002
+ href: w.url,
1980
2003
  target: "_blank"
1981
2004
  }, {
1982
2005
  default: x(() => [
1983
- U(e.IconDownload, { style: { color: "#7A00E6" } })
2006
+ R(e.IconDownload, { style: { color: "#7A00E6" } })
1984
2007
  ]),
1985
2008
  _: 2
1986
2009
  }, 1032, ["href"])
1987
2010
  ]),
1988
2011
  _: 2
1989
2012
  }, 1024)
1990
- ]))), 128)) : (u(), _("div", $n, Q(p.fieldValue), 1))
1991
- ], 64)) : (u(), _("div", Ln, [
1992
- U(e.DataWidgets, {
2013
+ ]))), 128)) : (u(), _("div", En, Q(p.fieldValue), 1))
2014
+ ], 64)) : (u(), _("div", jn, [
2015
+ R(e.DataWidgets, {
1993
2016
  ref_for: !0,
1994
2017
  ref: "dataWidgets",
1995
2018
  "field-key": p.fieldKey,
@@ -1997,7 +2020,7 @@ function Gn(t, o, n, e, r, a) {
1997
2020
  config: p,
1998
2021
  "class-name": n.className,
1999
2022
  modelValue: p.modelValue,
2000
- "onUpdate:modelValue": (h) => p.modelValue = h,
2023
+ "onUpdate:modelValue": (w) => p.modelValue = w,
2001
2024
  class: "form-field"
2002
2025
  }, null, 8, ["field-key", "name", "config", "class-name", "modelValue", "onUpdate:modelValue"])
2003
2026
  ]))
@@ -2009,14 +2032,14 @@ function Gn(t, o, n, e, r, a) {
2009
2032
  }, 1032, ["title"]))), 128)),
2010
2033
  re("", !0),
2011
2034
  re("", !0),
2012
- e.isShowCommentTextArea ? (u(), _("div", jn, [
2013
- b("div", Mn, [
2014
- o[6] || (o[6] = b("div", { class: "field-label" }, "Comment", -1)),
2015
- U(v, {
2035
+ e.isShowCommentTextArea ? (u(), _("div", Kn, [
2036
+ y("div", zn, [
2037
+ o[6] || (o[6] = y("div", { class: "field-label" }, "Comment", -1)),
2038
+ R(v, {
2016
2039
  modelValue: e.comment,
2017
2040
  "onUpdate:modelValue": o[1] || (o[1] = (f) => e.comment = f)
2018
2041
  }, null, 8, ["modelValue"]),
2019
- U(s, {
2042
+ R(s, {
2020
2043
  type: "primary",
2021
2044
  onClick: e.onAddComment
2022
2045
  }, {
@@ -2045,7 +2068,7 @@ function Gn(t, o, n, e, r, a) {
2045
2068
  _: 1
2046
2069
  })) : re("", !0)
2047
2070
  ]),
2048
- t.$slots.content ? (u(), _("div", En, [
2071
+ t.$slots.content ? (u(), _("div", Wn, [
2049
2072
  ue(t.$slots, "content", {}, void 0, !0)
2050
2073
  ])) : re("", !0)
2051
2074
  ])
@@ -2053,10 +2076,10 @@ function Gn(t, o, n, e, r, a) {
2053
2076
  _: 3
2054
2077
  }, 8, ["loading"])
2055
2078
  ]),
2056
- b("div", Kn, [
2057
- b("div", zn, [
2079
+ y("div", Gn, [
2080
+ y("div", qn, [
2058
2081
  ue(t.$slots, "action", {}, void 0, !0),
2059
- b("div", Wn, [
2082
+ y("div", Yn, [
2060
2083
  (u(!0), _($, null, M(e.reversedActions, (f) => (u(), D(e.ActionButton, {
2061
2084
  key: f.title,
2062
2085
  loading: e.loading,
@@ -2069,7 +2092,7 @@ function Gn(t, o, n, e, r, a) {
2069
2092
  ])
2070
2093
  ]);
2071
2094
  }
2072
- const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a"], ["__file", "DetailView.vue"]]), Yn = /* @__PURE__ */ z({
2095
+ const Jn = /* @__PURE__ */ J(Un, [["render", Qn], ["__scopeId", "data-v-117ace1a"], ["__file", "DetailView.vue"]]), Xn = /* @__PURE__ */ z({
2073
2096
  name: "ListView",
2074
2097
  __name: "ListView",
2075
2098
  props: {
@@ -2077,7 +2100,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
2077
2100
  },
2078
2101
  setup(t, { expose: o }) {
2079
2102
  o();
2080
- const n = Fe(), e = Ne(), r = Pe(), a = ve(), i = t, l = m(), c = mt({
2103
+ const n = Fe(), e = Ne(), r = ve(), a = me(), i = t, l = m(), c = vt({
2081
2104
  current: 1,
2082
2105
  total: 0,
2083
2106
  pageSize: 10,
@@ -2087,11 +2110,11 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
2087
2110
  filters: []
2088
2111
  });
2089
2112
  function s() {
2090
- const w = Object.entries(S.value).filter(([, { value: P }]) => P && P !== "").map(([P, { value: B, operator: de }]) => {
2091
- const pe = typeof B == "string" ? B.trim() : B;
2113
+ const h = Object.entries(S.value).filter(([, { value: P }]) => P && P !== "").map(([P, { value: B, operator: de }]) => {
2114
+ const fe = typeof B == "string" ? B.trim() : B;
2092
2115
  return {
2093
2116
  key: P,
2094
- value: pe,
2117
+ value: fe,
2095
2118
  operator: de
2096
2119
  // 根据实际需要调整操作符
2097
2120
  };
@@ -2099,7 +2122,7 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
2099
2122
  return {
2100
2123
  pageNumber: c.current,
2101
2124
  pageSize: c.pageSize,
2102
- filters: [...c.filters, ...w],
2125
+ filters: [...c.filters, ...h],
2103
2126
  sorts: [{
2104
2127
  key: "workflowId",
2105
2128
  type: 1
@@ -2107,11 +2130,11 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
2107
2130
  };
2108
2131
  }
2109
2132
  const d = K(() => ({
2110
- x: y.value.length * 150 + 250
2133
+ x: b.value.length * 150 + 250
2111
2134
  // 只设置横向滚动
2112
2135
  // 移除 y 属性,让表格高度自适应
2113
- })), g = (w) => {
2114
- const P = Object.entries(w).filter(([, B]) => B.widget?.column).map(([B, de], pe) => ({
2136
+ })), g = (h) => {
2137
+ const P = Object.entries(h).filter(([, B]) => B.widget?.column).map(([B, de], fe) => ({
2115
2138
  title: de.widget.title,
2116
2139
  dataIndex: B.charAt(0).toLowerCase() + B.slice(1),
2117
2140
  order: de.order,
@@ -2131,93 +2154,93 @@ const qn = /* @__PURE__ */ J(Nn, [["render", Gn], ["__scopeId", "data-v-117ace1a
2131
2154
  minWidth: 200,
2132
2155
  fixed: "right",
2133
2156
  resizable: !1
2134
- }), y.value = P;
2135
- }, v = m([]), y = m([]), f = m(!0), p = m(!0), h = m(), Z = async () => {
2157
+ }), b.value = P;
2158
+ }, v = m([]), b = m([]), f = m(!0), p = m(!0), w = m(), Z = async () => {
2136
2159
  p.value = !0;
2137
- const w = await Ut(i.className, s());
2138
- v.value = w.data, c.total = w.totalCount, p.value = !1;
2160
+ const h = await Bt(i.className, s());
2161
+ v.value = h.data, c.total = h.totalCount, p.value = !1;
2139
2162
  }, oe = m(!1);
2140
- fe(async () => {
2163
+ ge(async () => {
2141
2164
  f.value = !0;
2142
- const w = new Re().setPageActionType(_e.List).setClassName(i.className).setStore({ svrStore: n, bpmStore: e }).build();
2143
- l.value = await w.getPageData(), g(l.value.fields), O(l.value.fields), H(), A(l.value?.tabs?.[0]?.key || ""), h.value = l.value.actions, f.value = !1, oe.value = !0;
2144
- }), gt(() => {
2165
+ const h = new Ue().setPageActionType(be.List).setClassName(i.className).setStore({ svrStore: n, bpmStore: e }).build();
2166
+ l.value = await h.getPageData(), g(l.value.fields), O(l.value.fields), L(), T(l.value?.tabs?.[0]?.key || ""), w.value = l.value.actions, f.value = !1, oe.value = !0;
2167
+ }), bt(() => {
2145
2168
  oe.value && Z();
2146
2169
  });
2147
- const E = (w) => {
2148
- c.current = w, Z();
2149
- }, ee = (w) => {
2150
- c.pageSize = w, Z();
2170
+ const E = (h) => {
2171
+ c.current = h, Z();
2172
+ }, ee = (h) => {
2173
+ c.pageSize = h, Z();
2151
2174
  };
2152
- function ne(w, P, B, de, pe) {
2153
- switch (w) {
2175
+ function ne(h, P, B, de, fe) {
2176
+ switch (h) {
2154
2177
  case X.Link:
2155
- r.push({ name: B, params: { workflowId: pe } });
2178
+ r.push({ name: B, params: { workflowId: fe } });
2156
2179
  break;
2157
2180
  default:
2158
- console.warn("Unknown action type:", w);
2181
+ console.warn("Unknown action type:", h);
2159
2182
  }
2160
2183
  }
2161
- function T(w, P, B) {
2162
- switch (w) {
2184
+ function A(h, P, B) {
2185
+ switch (h) {
2163
2186
  case X.Submit:
2164
- Zt(P, { filters: [{ key: "approverList", value: k(), operator: 2 }] }), a?.appContext.config.globalProperties.$notification.success("submit success!");
2187
+ oo(P, { filters: [{ key: "approverList", value: k(), operator: 2 }] }), a?.appContext.config.globalProperties.$notification.success("submit success!");
2165
2188
  break;
2166
2189
  case X.Link:
2167
2190
  r.push({ name: B });
2168
2191
  break;
2169
2192
  default:
2170
- console.warn("Unknown action type:", w);
2193
+ console.warn("Unknown action type:", h);
2171
2194
  }
2172
2195
  }
2173
2196
  function k() {
2174
2197
  return n()?.userInfo?.email_address ?? "";
2175
2198
  }
2176
- function C(w, P) {
2177
- return typeof w != "string" || w.indexOf("{currentUserEmail}") === -1 ? w : w.replace(/{currentUserEmail}/g, P);
2199
+ function C(h, P) {
2200
+ return typeof h != "string" || h.indexOf("{currentUserEmail}") === -1 ? h : h.replace(/{currentUserEmail}/g, P);
2178
2201
  }
2179
- function A(w) {
2180
- const P = l.value?.tabs?.find((B) => B.key === w)?.filters;
2202
+ function T(h) {
2203
+ const P = l.value?.tabs?.find((B) => B.key === h)?.filters;
2181
2204
  c.filters = P?.map((B) => ({
2182
2205
  ...B,
2183
2206
  value: C(B.value, k())
2184
2207
  })) || [], c.current = 1, Z();
2185
2208
  }
2186
2209
  const S = m({}), I = m([]);
2187
- function O(w) {
2188
- if (!w) return [];
2189
- I.value = Object.entries(w).filter(([, P]) => P.isFiltered).map(([P, B]) => ({ fieldKey: P, fieldConfig: B }));
2210
+ function O(h) {
2211
+ if (!h) return [];
2212
+ I.value = Object.entries(h).filter(([, P]) => P.isFiltered).map(([P, B]) => ({ fieldKey: P, fieldConfig: B }));
2190
2213
  }
2191
- const H = () => {
2192
- const w = {};
2214
+ const L = () => {
2215
+ const h = {};
2193
2216
  I.value.forEach(({ fieldKey: P, fieldConfig: B }) => {
2194
- w[P] = {}, w[P].value = B.modelValue, w[P].operator = B.operator;
2195
- }), S.value = w;
2217
+ h[P] = {}, h[P].value = B.modelValue, h[P].operator = B.operator;
2218
+ }), S.value = h;
2196
2219
  }, W = () => {
2197
2220
  c.current = 1, Z();
2198
2221
  }, ie = () => {
2199
- l.value && H(), W();
2222
+ l.value && L(), W();
2200
2223
  };
2201
- function le(w, P) {
2202
- return !(w.location !== "InTable" || w.title === "Update" && (P.sort === 3 || P.status === 100 || P.status === -1));
2224
+ function le(h, P) {
2225
+ return !(h.location !== "InTable" || h.title === "Update" && (P.sort === 3 || P.status === 100 || P.status === -1));
2203
2226
  }
2204
- const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns: y, loadingPage: f, loadingTable: p, actions: h, loadData: Z, mounted: oe, pageChangeHandler: E, pageSizeChangeHandler: ee, clickHandler: ne, createHandler: T, getApproverEmail: k, replaceEmail: C, tabHandler: A, searchForm: S, searchableFields: I, mapSearchableFields: O, initSearchForm: H, handleSearch: W, handleReset: ie, judgeHiddenActions: le, ActionButton: Ie, DataWidgets: Ae, TopBar: Ue };
2227
+ const se = { svrStore: n, bpmStore: e, router: r, instance: a, props: i, pageData: l, paging: c, createListParams: s, scroll: d, mapColumns: g, _data: v, _columns: b, loadingPage: f, loadingTable: p, actions: w, loadData: Z, mounted: oe, pageChangeHandler: E, pageSizeChangeHandler: ee, clickHandler: ne, createHandler: A, getApproverEmail: k, replaceEmail: C, tabHandler: T, searchForm: S, searchableFields: I, mapSearchableFields: O, initSearchForm: L, handleSearch: W, handleReset: ie, judgeHiddenActions: le, ActionButton: Pe, DataWidgets: Ie, TopBar: Re };
2205
2228
  return Object.defineProperty(se, "__isScriptSetup", { enumerable: !1, value: !0 }), se;
2206
2229
  }
2207
- }), Qn = { class: "list-container" }, Jn = { class: "query-title" };
2208
- function Xn(t, o, n, e, r, a) {
2209
- const i = V("a-space"), l = V("a-col"), c = V("a-button"), s = V("a-row"), d = V("a-card"), g = V("a-tab-pane"), v = V("a-tabs"), y = V("a-table");
2210
- return u(), _("div", Qn, [
2211
- U(e.TopBar, {
2230
+ }), Zn = { class: "list-container" }, ea = { class: "query-title" };
2231
+ function ta(t, o, n, e, r, a) {
2232
+ const i = V("a-space"), l = V("a-col"), c = V("a-button"), s = V("a-row"), d = V("a-card"), g = V("a-tab-pane"), v = V("a-tabs"), b = V("a-table");
2233
+ return u(), _("div", Zn, [
2234
+ R(e.TopBar, {
2212
2235
  title: e.pageData?.banner.title ?? "",
2213
2236
  subTitle: e.pageData?.banner.subTitle ?? "",
2214
2237
  email: e.getApproverEmail()
2215
2238
  }, null, 8, ["title", "subTitle", "email"]),
2216
- U(d, null, {
2239
+ R(d, null, {
2217
2240
  default: x(() => [
2218
- b("div", Jn, [
2219
- o[0] || (o[0] = b("h3", null, "Search Conditions", -1)),
2220
- U(i, { size: "medium" }, {
2241
+ y("div", ea, [
2242
+ o[0] || (o[0] = y("h3", null, "Search Conditions", -1)),
2243
+ R(i, { size: "medium" }, {
2221
2244
  default: x(() => [
2222
2245
  (u(!0), _($, null, M(e.actions, (f) => (u(), _($, {
2223
2246
  key: f.title
@@ -2232,7 +2255,7 @@ function Xn(t, o, n, e, r, a) {
2232
2255
  _: 1
2233
2256
  })
2234
2257
  ]),
2235
- U(s, { gutter: [24, 20] }, {
2258
+ R(s, { gutter: [24, 20] }, {
2236
2259
  default: x(() => [
2237
2260
  (u(!0), _($, null, M(e.searchableFields, (f) => (u(), D(l, {
2238
2261
  key: f.fieldKey,
@@ -2240,7 +2263,7 @@ function Xn(t, o, n, e, r, a) {
2240
2263
  class: "search-col"
2241
2264
  }, {
2242
2265
  default: x(() => [
2243
- U(e.DataWidgets, {
2266
+ R(e.DataWidgets, {
2244
2267
  name: f.fieldKey,
2245
2268
  config: f.fieldConfig,
2246
2269
  modelValue: e.searchForm[f.fieldKey].value,
@@ -2250,14 +2273,14 @@ function Xn(t, o, n, e, r, a) {
2250
2273
  ]),
2251
2274
  _: 2
2252
2275
  }, 1024))), 128)),
2253
- U(l, {
2276
+ R(l, {
2254
2277
  span: 6,
2255
2278
  class: "search-col form-buttons"
2256
2279
  }, {
2257
2280
  default: x(() => [
2258
- U(i, { size: "medium" }, {
2281
+ R(i, { size: "medium" }, {
2259
2282
  default: x(() => [
2260
- U(c, {
2283
+ R(c, {
2261
2284
  type: "primary",
2262
2285
  size: "medium",
2263
2286
  onClick: e.handleSearch
@@ -2268,7 +2291,7 @@ function Xn(t, o, n, e, r, a) {
2268
2291
  _: 1,
2269
2292
  __: [1]
2270
2293
  }),
2271
- U(c, {
2294
+ R(c, {
2272
2295
  size: "medium",
2273
2296
  onClick: e.handleReset
2274
2297
  }, {
@@ -2290,7 +2313,7 @@ function Xn(t, o, n, e, r, a) {
2290
2313
  ]),
2291
2314
  _: 1
2292
2315
  }),
2293
- U(v, {
2316
+ R(v, {
2294
2317
  size: "large",
2295
2318
  onTabClick: e.tabHandler
2296
2319
  }, {
@@ -2302,7 +2325,7 @@ function Xn(t, o, n, e, r, a) {
2302
2325
  ]),
2303
2326
  _: 1
2304
2327
  }),
2305
- U(y, {
2328
+ R(b, {
2306
2329
  columns: e._columns,
2307
2330
  data: e._data,
2308
2331
  stripe: "",
@@ -2322,7 +2345,7 @@ function Xn(t, o, n, e, r, a) {
2322
2345
  onPageSizeChange: e.pageSizeChangeHandler
2323
2346
  }, {
2324
2347
  optional: x(({ record: f }) => [
2325
- U(i, { size: "small" }, {
2348
+ R(i, { size: "small" }, {
2326
2349
  default: x(() => [
2327
2350
  (u(!0), _($, null, M(e.actions, (p) => (u(), _($, {
2328
2351
  key: p.title
@@ -2331,7 +2354,7 @@ function Xn(t, o, n, e, r, a) {
2331
2354
  key: 0,
2332
2355
  config: p,
2333
2356
  size: "small",
2334
- onClick: (...h) => e.clickHandler(...h, f.workflowId)
2357
+ onClick: (...w) => e.clickHandler(...w, f.workflowId)
2335
2358
  }, null, 8, ["config", "onClick"])) : re("", !0)
2336
2359
  ], 64))), 128))
2337
2360
  ]),
@@ -2342,12 +2365,12 @@ function Xn(t, o, n, e, r, a) {
2342
2365
  }, 8, ["columns", "data", "pagination", "loading", "scroll"])
2343
2366
  ]);
2344
2367
  }
2345
- const Zn = /* @__PURE__ */ J(Yn, [["render", Xn], ["__scopeId", "data-v-a24e1b40"], ["__file", "ListView.vue"]]), ra = {
2368
+ const oa = /* @__PURE__ */ J(Xn, [["render", ta], ["__scopeId", "data-v-a24e1b40"], ["__file", "ListView.vue"]]), la = {
2346
2369
  install(t, o = {}) {
2347
- o.config && St(o.config), o.router && t.provide(it, o.router), o.pinia && t.provide(Qo, o.pinia), o.useBpmStore && t.provide(ct, o.useBpmStore), o.useSvrStore && t.provide(dt, o.useSvrStore), o.triggers && t.provide(lt, o.triggers), o.customComps && t.provide(ut, o.customComps), t.component("CreateView", vn), t.component("UpdateView", In), t.component("DetailView", qn), t.component("ListView", Zn);
2370
+ o.config && Vt(o.config), o.router && (Tt(o.router), t.provide(tt, o.router)), o.pinia && t.provide(Zo, o.pinia), o.useBpmStore && t.provide(ft, o.useBpmStore), o.useSvrStore && t.provide(pt, o.useSvrStore), o.triggers && t.provide(ut, o.triggers), o.customComps && t.provide(mt, o.customComps), t.component("CreateView", hn), t.component("UpdateView", Fn), t.component("DetailView", Jn), t.component("ListView", oa);
2348
2371
  }
2349
2372
  };
2350
2373
  export {
2351
- ra as default
2374
+ la as default
2352
2375
  };
2353
2376
  //# sourceMappingURL=index.es.js.map