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

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