@chase-shao/vue-component-lib 1.2.100 → 1.2.102

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