agilebuilder-ui 1.2.8-cdnTmp2 → 1.2.8-cdnTmp3

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.
@@ -1,43 +1,42 @@
1
1
  import { getI18n as t } from "./util.mjs";
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();
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();
10
9
  const _ = function(t2) {
11
10
  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;
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);
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);
16
15
  }
17
- if ("process_start" === T && s && null !== s)
18
- f.key_1 = s, i = t().t("workflowHistoryList." + T, f);
16
+ if ("process_start" === T && n && null !== n)
17
+ O.key_1 = n, r = t().t("workflowHistoryList." + T, O);
19
18
  else {
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];
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];
24
23
  }
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;
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;
33
32
  }
34
33
  }
35
- i = t().t("workflowHistoryList." + T, o2);
34
+ r = t().t("workflowHistoryList." + T, o3);
36
35
  }
37
36
  } else
38
- i = t().t("workflowHistoryList." + O.toLowerCase());
39
- return i;
37
+ r = t().t("workflowHistoryList." + i.toLowerCase());
38
+ return r;
40
39
  }
41
40
  export {
42
- n as i18nOperation
41
+ o as i18nOperation
43
42
  };