@chase-shao/vue-component-lib 1.2.49 → 1.2.50

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