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

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