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

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