@chase-shao/vue-component-lib 1.2.110 → 1.2.112

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