agilebuilder-ui 1.2.8-cdnTmp1 → 1.2.8-cdnTmp2

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.
@@ -0,0 +1,7 @@
1
+ function t(t2, o) {
2
+ const n = "workflowButton." + o;
3
+ return t2.te(n) ? t2.t(n) : o;
4
+ }
5
+ export {
6
+ t as resolveOperationLabel
7
+ };
@@ -1,42 +1,43 @@
1
1
  import { getI18n as t } from "./util.mjs";
2
- function o(o2, n, s, e) {
3
- let r = o2.transactionResult;
4
- const i = o2.historyType;
5
- if (!o2.current && i)
6
- if (o2.transactionParams) {
7
- const O = JSON.parse(o2.transactionParams);
8
- let T = i.toLowerCase();
2
+ import { resolveOperationLabel as o } from "./workflow-operation-label.mjs";
3
+ function n(n2, s, e, r) {
4
+ let i = n2.transactionResult;
5
+ const O = n2.historyType;
6
+ if (!n2.current && O)
7
+ if (n2.transactionParams) {
8
+ const f = JSON.parse(n2.transactionParams);
9
+ let T = O.toLowerCase();
9
10
  const _ = function(t2) {
10
11
  return "HISTORY_SUBMIT" === t2 || "HISTORY_AGREE" === t2 || "HISTORY_DISAGREE" === t2 || "HISTORY_AGREEMENT" === t2 || "HISTORY_OPPOSE" === t2 || "HISTORY_KIKEN" === t2 || "HISTORY_SIGNOFF" === t2 || "HISTORY_SEND" === t2 || "HISTORY_DISTRIBUTE" === t2 || "HISTORY_READED" === t2 || "HISTORY_RETRIEVE" === t2;
11
- }(i);
12
- if (_ ? T = "commonButtonOperation" : "process_end" === T && (T = "processEnd"), _ || "HISTORY_COMPLETE_TRANSFER" === i || "CANCEL_TRUST_TASK_COMPLETE_TASK" === i) {
13
- const o3 = O[2];
14
- O.key_2 = t().t("workflowButton." + o3), 0 === O[2].indexOf("workflowButton.") && (O[2] = o3);
12
+ }(O);
13
+ if (_ ? T = "commonButtonOperation" : "process_end" === T && (T = "processEnd"), _ || "HISTORY_COMPLETE_TRANSFER" === O || "CANCEL_TRUST_TASK_COMPLETE_TASK" === O) {
14
+ const n3 = f[2];
15
+ f.key_2 = o(t(), n3), 0 === f[2].indexOf("workflowButton.") && (f[2] = n3);
15
16
  }
16
- if ("process_start" === T && n && null !== n)
17
- O.key_1 = n, r = t().t("workflowHistoryList." + T, O);
17
+ if ("process_start" === T && s && null !== s)
18
+ f.key_1 = s, i = t().t("workflowHistoryList." + T, f);
18
19
  else {
19
- const o3 = {};
20
- for (const t2 in O) {
21
- let n2 = t2 + "";
22
- (t2 + "").indexOf("key_") < 0 && (n2 = "key_" + n2), o3[n2] = O[t2];
20
+ const o2 = {};
21
+ for (const t2 in f) {
22
+ let n3 = t2 + "";
23
+ (t2 + "").indexOf("key_") < 0 && (n3 = "key_" + n3), o2[n3] = f[t2];
23
24
  }
24
- if (s && e)
25
- for (const t2 in O) {
26
- let n2 = t2 + "";
27
- (t2 + "").indexOf("key_") < 0 && (n2 = "key_" + n2), o3[n2] = O[t2];
28
- const r2 = O[t2];
29
- if (r2.indexOf("${taskNodeId:") >= 0) {
30
- const t3 = r2.substring(r2.indexOf(":") + 1, r2.indexOf("##")), i2 = r2.substring(r2.indexOf("##") + 2, r2.lastIndexOf("}")), O2 = s[t3];
31
- O2 && O2[e] && "" !== O2[e] ? o3[n2] = O2[e] : o3[n2] = i2;
25
+ if (e && r)
26
+ for (const t2 in f) {
27
+ let n3 = t2 + "";
28
+ (t2 + "").indexOf("key_") < 0 && (n3 = "key_" + n3), o2[n3] = f[t2];
29
+ const s2 = f[t2];
30
+ if (s2.indexOf("${taskNodeId:") >= 0) {
31
+ const t3 = s2.substring(s2.indexOf(":") + 1, s2.indexOf("##")), i2 = s2.substring(s2.indexOf("##") + 2, s2.lastIndexOf("}")), O2 = e[t3];
32
+ O2 && O2[r] && "" !== O2[r] ? o2[n3] = O2[r] : o2[n3] = i2;
32
33
  }
33
34
  }
34
- r = t().t("workflowHistoryList." + T, o3);
35
+ i = t().t("workflowHistoryList." + T, o2);
35
36
  }
36
37
  } else
37
- r = t().t("workflowHistoryList." + i.toLowerCase());
38
- return r;
38
+ i = t().t("workflowHistoryList." + O.toLowerCase());
39
+ return i;
39
40
  }
40
41
  export {
41
- o as i18nOperation
42
+ n as i18nOperation
42
43
  };