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

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