@chase-shao/vue-component-lib 1.2.63 → 1.2.65

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