@chase-shao/vue-component-lib 1.2.79 → 1.2.81

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