super-page-runtime 2.2.92-sit9 → 2.3.0-sit1

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.
@@ -5,21 +5,21 @@ import l from "agilebuilder-ui/src/utils/request";
5
5
  import { getFormData as c, getAdditionalParamMap as u, refreshPage as f } from "../events/standard-event.js";
6
6
  import { dynamicControlTableEdit as m, disabledAllFields as p, updateFormItemEditState as d } from "../events/validator-util.js";
7
7
  import { deepCopy as g, getBaseUrl as y } from "../common-util.js";
8
- import { isMobileBrowser as b } from "agilebuilder-ui/src/utils/common-util";
9
- import { getFormModelFields as h, getModelFields as E } from "../page-init-util.js";
10
- import { getCustomFunc as P } from "../events/event-util.js";
11
- const C = { showElement: function(e2, t2, n2) {
12
- n2 ? $(e2, "showElement", t2) : t2.forEach((t3) => {
8
+ import { replacePrefix as b, isMobileBrowser as h } from "agilebuilder-ui/src/utils/common-util";
9
+ import { getFormModelFields as E, getModelFields as P } from "../page-init-util.js";
10
+ import { getCustomFunc as C } from "../events/event-util.js";
11
+ const k = { showElement: function(e2, t2, n2) {
12
+ n2 ? j(e2, "showElement", t2) : t2.forEach((t3) => {
13
13
  const n3 = r(e2, t3);
14
14
  n3 && n3.show();
15
15
  });
16
16
  }, hideElement: function(e2, t2, n2) {
17
- n2 ? $(e2, "hideElement", t2) : t2.forEach((t3) => {
17
+ n2 ? j(e2, "hideElement", t2) : t2.forEach((t3) => {
18
18
  const n3 = r(e2, t3);
19
19
  n3 && n3.hide();
20
20
  });
21
21
  }, enableElement: function(e2, t2, n2) {
22
- n2 ? $(e2, "enableElement", t2) : t2.forEach((t3) => {
22
+ n2 ? j(e2, "enableElement", t2) : t2.forEach((t3) => {
23
23
  const n3 = r(e2, t3);
24
24
  if (n3) {
25
25
  const e3 = n3.getConfigure();
@@ -27,7 +27,7 @@ const C = { showElement: function(e2, t2, n2) {
27
27
  }
28
28
  });
29
29
  }, disableElement: function(e2, t2, n2) {
30
- n2 ? $(e2, "disableElement", t2) : t2.forEach((t3) => {
30
+ n2 ? j(e2, "disableElement", t2) : t2.forEach((t3) => {
31
31
  const n3 = r(e2, t3);
32
32
  if (n3) {
33
33
  const e3 = n3.getConfigure();
@@ -47,7 +47,7 @@ const C = { showElement: function(e2, t2, n2) {
47
47
  o(e2.entity, i2.startsWith("${") ? i2 : "${" + t2 + "." + i2 + "}", n2[i2]);
48
48
  });
49
49
  }, dynamicControlFormEdit: function(e2, t2, n2) {
50
- n2 ? $(e2, "dynamicControlFormEdit", t2) : d(e2, t2);
50
+ n2 ? j(e2, "dynamicControlFormEdit", t2) : d(e2, t2);
51
51
  }, disabledAllFields(e2) {
52
52
  p(e2);
53
53
  }, dynamicControlTableEdit(e2, t2, n2) {
@@ -80,7 +80,7 @@ const C = { showElement: function(e2, t2, n2) {
80
80
  }, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) => y(e2.backendUrl, false), getPlateBackendUrl: () => window.$vueApp.config.globalProperties.baseAPI, getEntity: (e2) => e2.entity.data, getEntityValue: (e2, t2) => e2.entity.data ? e2.entity.data[t2] : null, getPageData: (e2) => e2.entity.page, getPageDataValue: (e2, t2) => e2.entity.page ? e2.entity.page[t2] : null, getAdditionalParams: (e2) => u(e2), getAdditionalParamValue(e2, t2) {
81
81
  const n2 = u(e2);
82
82
  return n2 ? n2[t2] : null;
83
- }, isMobile: () => b(), getComponentRefByProp: (e2, t2) => r(e2, t2), getComponentRefByCode: (e2, t2) => a(e2, t2), getFormViewData(o2) {
83
+ }, isMobile: () => h(), getComponentRefByProp: (e2, t2) => r(e2, t2), getComponentRefByCode: (e2, t2) => a(e2, t2), getFormViewData(o2) {
84
84
  var _a, _b, _c, _d, _e, _f, _g, _h;
85
85
  const r2 = o2.entity ? o2.entity : {}, s2 = g(r2), l2 = e(o2);
86
86
  for (const e2 in l2) {
@@ -88,13 +88,13 @@ const C = { showElement: function(e2, t2, n2) {
88
88
  if (l3) {
89
89
  const e3 = l3.getConfigure();
90
90
  if (e3 && ((_b = (_a = e3.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && ("static" === ((_d = (_c = e3.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) || "optionGroup" === ((_f = (_e = e3.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType))) if (e3.name && ("select" === e3.name && ((_h = (_g = e3.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || "checkbox" === e3.name)) {
91
- const t2 = h(o2, e3), a2 = n(s2, t2);
91
+ const t2 = E(o2, e3), a2 = n(s2, t2);
92
92
  if (a2) {
93
- const e4 = v(a2.split(","), r3);
93
+ const e4 = V(a2.split(","), r3);
94
94
  i(s2, t2, e4);
95
95
  }
96
96
  } else {
97
- const t2 = h(o2, e3), a2 = v(n(s2, t2), r3);
97
+ const t2 = E(o2, e3), a2 = V(n(s2, t2), r3);
98
98
  i(s2, t2, a2);
99
99
  }
100
100
  }
@@ -105,34 +105,34 @@ const C = { showElement: function(e2, t2, n2) {
105
105
  if (e2.indexOf("__") > 0 && (t2 = e2.substring(e2.lastIndexOf("__") + 2)), t2) {
106
106
  const i2 = a(o2, t2);
107
107
  if (i2) {
108
- const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 = E(t3, o3), r3 = n(s2, a2);
109
- k(i2.getTableSelectOptions(e2), r3);
108
+ const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 = P(t3, o3), r3 = n(s2, a2);
109
+ v(i2.getTableSelectOptions(e2), r3);
110
110
  }
111
111
  }
112
112
  }
113
113
  return s2.data;
114
- }, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => P(e2, t2) };
115
- function k(e2, t2) {
114
+ }, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => C(e2, t2), replaceUrlPrefix: (e2) => b(e2) };
115
+ function v(e2, t2) {
116
116
  e2 && t2 && t2.forEach((t3) => {
117
117
  Object.keys(e2).forEach((n2) => {
118
118
  const i2 = t3[n2], o2 = e2[n2], a2 = o2.options, r2 = o2.column;
119
119
  let s2;
120
120
  if (r2 && r2.componentType && ("multiselect" === r2.componentType || "checkbox" === r2.componentType)) {
121
121
  if (i2) {
122
- s2 = v(i2.split(","), a2);
122
+ s2 = V(i2.split(","), a2);
123
123
  }
124
- } else s2 = v(i2, a2);
124
+ } else s2 = V(i2, a2);
125
125
  t3[n2] = s2;
126
126
  });
127
127
  });
128
128
  }
129
- function v(e2, t2) {
129
+ function V(e2, t2) {
130
130
  let n2;
131
131
  return null != e2 && t2 && (Array.isArray(e2) ? (n2 = "", e2.forEach((i2) => {
132
- n2 = n2 + V(e2, t2) + ",";
133
- }), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = V(e2, t2))), n2;
132
+ n2 = n2 + $(e2, t2) + ",";
133
+ }), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = $(e2, t2))), n2;
134
134
  }
135
- function V(e2, t2) {
135
+ function $(e2, t2) {
136
136
  let n2 = e2;
137
137
  if (null != e2 && t2) for (let i2 = 0; i2 < t2.length; i2++) {
138
138
  const o2 = t2[i2].value, a2 = t2[i2].label ? t2[i2].label : t2[i2].name;
@@ -143,9 +143,9 @@ function V(e2, t2) {
143
143
  }
144
144
  return n2;
145
145
  }
146
- function $(e2, t2, n2) {
146
+ function j(e2, t2, n2) {
147
147
  e2.initInfo || (e2.initInfo = {}), e2.initInfo[t2] = n2;
148
148
  }
149
149
  export {
150
- C as functions
150
+ k as functions
151
151
  };