@chase-shao/vue-component-lib 1.2.80 → 1.2.82

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