@byteluck-fe/runtime-engine 2.0.22 → 2.0.24
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/runtime-engine.js +45 -40
- package/package.json +1 -1
package/dist/runtime-engine.js
CHANGED
|
@@ -5,7 +5,7 @@ import { FieldTypes as Q, loadRemoteControl as _i, loadRemoteControls as Wl, loa
|
|
|
5
5
|
import * as Kn from "@byteluck-fe/model-driven-engine";
|
|
6
6
|
import { loopDataViewControl as Su, parseModule as zn, Engine as Bt, ES6ModulePlugin as wu, LifecycleEventPlugin as Tu, ControlsEventPlugin as _u, StylePlugin as Ou } from "@byteluck-fe/model-driven-engine";
|
|
7
7
|
import * as Wn from "@byteluck-fe/global-shared";
|
|
8
|
-
import { getCustomRequestHeader as Iu, client as $, getFetch as ve, CacheManager as Cu, path as
|
|
8
|
+
import { getCustomRequestHeader as Iu, client as $, getFetch as ve, CacheManager as Cu, path as pe, isArray as ge, isString as se, ModelFieldTypes as ie, isDef as Ei, cacheManager as Ee, formatDisplayData as Au, isObject as qi, isEmpty as Qe, HttpCodes as Eu, customUpdateCurrentTab as qu, customInit as ku, TenantInitUtil as Du, ProjectType as xu, Postmate as Ru, getBrowserType as Vu, isFunction as Lu, customClose as Nu } from "@byteluck-fe/global-shared";
|
|
9
9
|
import Mu, { get as Ft, debounce as Bu, isEqual as Pr, map as Fu, isNil as ht, uniqBy as ju, cloneDeep as Se, isArray as De, mapValues as Uu, keyBy as $u, isEmpty as Gu, keys as ea, uniq as Hu, merge as Ku, set as zu } from "lodash";
|
|
10
10
|
import R from "moment";
|
|
11
11
|
import * as Wu from "@byteluck-fe/locale-message";
|
|
@@ -8544,7 +8544,7 @@ const fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8544
8544
|
loadScriptFromFetch: Jl,
|
|
8545
8545
|
loadScriptFromTag: Yl,
|
|
8546
8546
|
nativeFetch: Oi,
|
|
8547
|
-
path:
|
|
8547
|
+
path: pe
|
|
8548
8548
|
}, Symbol.toStringTag, { value: "Module" })), hc = "context";
|
|
8549
8549
|
function yc(r) {
|
|
8550
8550
|
Pa(hc, r);
|
|
@@ -8894,22 +8894,22 @@ const { toString: Sc } = Object.prototype, { getPrototypeOf: ln } = Object, xa =
|
|
|
8894
8894
|
return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
|
|
8895
8895
|
})(/* @__PURE__ */ Object.create(null)), Pe = (r) => (r = r.toLowerCase(), (e) => xa(e) === r), Ra = (r) => (e) => typeof e === r, { isArray: mt } = Array, jt = Ra("undefined");
|
|
8896
8896
|
function wc(r) {
|
|
8897
|
-
return r !== null && !jt(r) && r.constructor !== null && !jt(r.constructor) &&
|
|
8897
|
+
return r !== null && !jt(r) && r.constructor !== null && !jt(r.constructor) && ce(r.constructor.isBuffer) && r.constructor.isBuffer(r);
|
|
8898
8898
|
}
|
|
8899
8899
|
const Ui = Pe("ArrayBuffer");
|
|
8900
8900
|
function Tc(r) {
|
|
8901
8901
|
let e;
|
|
8902
8902
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(r) : e = r && r.buffer && Ui(r.buffer), e;
|
|
8903
8903
|
}
|
|
8904
|
-
const _c = Ra("string"),
|
|
8904
|
+
const _c = Ra("string"), ce = Ra("function"), $i = Ra("number"), Va = (r) => r !== null && typeof r == "object", Oc = (r) => r === !0 || r === !1, da = (r) => {
|
|
8905
8905
|
if (xa(r) !== "object")
|
|
8906
8906
|
return !1;
|
|
8907
8907
|
const e = ln(r);
|
|
8908
8908
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
|
|
8909
|
-
}, Ic = Pe("Date"), Cc = Pe("File"), Ac = Pe("Blob"), Ec = Pe("FileList"), qc = (r) => Va(r) &&
|
|
8909
|
+
}, Ic = Pe("Date"), Cc = Pe("File"), Ac = Pe("Blob"), Ec = Pe("FileList"), qc = (r) => Va(r) && ce(r.pipe), kc = (r) => {
|
|
8910
8910
|
let e;
|
|
8911
|
-
return r && (typeof FormData == "function" && r instanceof FormData ||
|
|
8912
|
-
e === "object" &&
|
|
8911
|
+
return r && (typeof FormData == "function" && r instanceof FormData || ce(r.append) && ((e = xa(r)) === "formdata" || // detect form-data instance
|
|
8912
|
+
e === "object" && ce(r.toString) && r.toString() === "[object FormData]"));
|
|
8913
8913
|
}, Dc = Pe("URLSearchParams"), [xc, Rc, Vc, Lc] = ["ReadableStream", "Request", "Response", "Headers"].map(Pe), Nc = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
8914
8914
|
function Wt(r, e, { allOwnKeys: t = !1 } = {}) {
|
|
8915
8915
|
if (r === null || typeof r > "u")
|
|
@@ -8945,7 +8945,7 @@ function Tr() {
|
|
|
8945
8945
|
return e;
|
|
8946
8946
|
}
|
|
8947
8947
|
const Mc = (r, e, t, { allOwnKeys: a } = {}) => (Wt(e, (n, s) => {
|
|
8948
|
-
t &&
|
|
8948
|
+
t && ce(n) ? r[s] = ji(n, t) : r[s] = n;
|
|
8949
8949
|
}, { allOwnKeys: a }), r), Bc = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), Fc = (r, e, t, a) => {
|
|
8950
8950
|
r.prototype = Object.create(e.prototype, a), r.prototype.constructor = r, Object.defineProperty(r, "super", {
|
|
8951
8951
|
value: e.prototype
|
|
@@ -9003,10 +9003,10 @@ const Mc = (r, e, t, { allOwnKeys: a } = {}) => (Wt(e, (n, s) => {
|
|
|
9003
9003
|
}), Object.defineProperties(r, a);
|
|
9004
9004
|
}, Yc = (r) => {
|
|
9005
9005
|
Ki(r, (e, t) => {
|
|
9006
|
-
if (
|
|
9006
|
+
if (ce(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
9007
9007
|
return !1;
|
|
9008
9008
|
const a = r[t];
|
|
9009
|
-
if (
|
|
9009
|
+
if (ce(a)) {
|
|
9010
9010
|
if (e.enumerable = !1, "writable" in e) {
|
|
9011
9011
|
e.writable = !1;
|
|
9012
9012
|
return;
|
|
@@ -9036,7 +9036,7 @@ const Mc = (r, e, t, { allOwnKeys: a } = {}) => (Wt(e, (n, s) => {
|
|
|
9036
9036
|
return t;
|
|
9037
9037
|
};
|
|
9038
9038
|
function td(r) {
|
|
9039
|
-
return !!(r &&
|
|
9039
|
+
return !!(r && ce(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
|
|
9040
9040
|
}
|
|
9041
9041
|
const ad = (r) => {
|
|
9042
9042
|
const e = new Array(10), t = (a, n) => {
|
|
@@ -9055,13 +9055,13 @@ const ad = (r) => {
|
|
|
9055
9055
|
return a;
|
|
9056
9056
|
};
|
|
9057
9057
|
return t(r, 0);
|
|
9058
|
-
}, rd = Pe("AsyncFunction"), nd = (r) => r && (Va(r) ||
|
|
9058
|
+
}, rd = Pe("AsyncFunction"), nd = (r) => r && (Va(r) || ce(r)) && ce(r.then) && ce(r.catch), Wi = ((r, e) => r ? setImmediate : e ? ((t, a) => (Ge.addEventListener("message", ({ source: n, data: s }) => {
|
|
9059
9059
|
n === Ge && s === t && a.length && a.shift()();
|
|
9060
9060
|
}, !1), (n) => {
|
|
9061
9061
|
a.push(n), Ge.postMessage(t, "*");
|
|
9062
9062
|
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
|
|
9063
9063
|
typeof setImmediate == "function",
|
|
9064
|
-
|
|
9064
|
+
ce(Ge.postMessage)
|
|
9065
9065
|
), sd = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ge) : typeof process < "u" && process.nextTick || Wi, A = {
|
|
9066
9066
|
isArray: mt,
|
|
9067
9067
|
isArrayBuffer: Ui,
|
|
@@ -9082,7 +9082,7 @@ const ad = (r) => {
|
|
|
9082
9082
|
isFile: Cc,
|
|
9083
9083
|
isBlob: Ac,
|
|
9084
9084
|
isRegExp: Jc,
|
|
9085
|
-
isFunction:
|
|
9085
|
+
isFunction: ce,
|
|
9086
9086
|
isStream: qc,
|
|
9087
9087
|
isURLSearchParams: Dc,
|
|
9088
9088
|
isTypedArray: Gc,
|
|
@@ -12876,7 +12876,7 @@ const aa = () => [
|
|
|
12876
12876
|
col: 3,
|
|
12877
12877
|
time: [
|
|
12878
12878
|
+R().startOf("month").subtract(1, "months"),
|
|
12879
|
-
+R(
|
|
12879
|
+
+R().startOf("month").subtract(1, "day")
|
|
12880
12880
|
]
|
|
12881
12881
|
},
|
|
12882
12882
|
{
|
|
@@ -16106,7 +16106,7 @@ class kn {
|
|
|
16106
16106
|
const n = this.engine.getAction().actionUtils;
|
|
16107
16107
|
switch (e) {
|
|
16108
16108
|
case "prefix_path":
|
|
16109
|
-
a =
|
|
16109
|
+
a = pe.getPrefixPath();
|
|
16110
16110
|
break;
|
|
16111
16111
|
case "app_id":
|
|
16112
16112
|
a = this.engine.externalParams.appId;
|
|
@@ -19100,7 +19100,7 @@ window.okuiConfig = {
|
|
|
19100
19100
|
env: "PRD",
|
|
19101
19101
|
apiPath: fi,
|
|
19102
19102
|
sourceHost: CP,
|
|
19103
|
-
basePath:
|
|
19103
|
+
basePath: pe.getFullPath("/apps"),
|
|
19104
19104
|
options: el,
|
|
19105
19105
|
cardPath: fi
|
|
19106
19106
|
};
|
|
@@ -19148,7 +19148,7 @@ async function tl(r) {
|
|
|
19148
19148
|
window.open(p);
|
|
19149
19149
|
else if (P === jr.currentTab)
|
|
19150
19150
|
if (a)
|
|
19151
|
-
e.href === p ? vo(k(u)) : new RegExp("^(http://|https://)", "ig").test(p) ? window.location.href = p : (/^\/apps/.test(p) && (p = p.replace("/apps", "")), p =
|
|
19151
|
+
e.href === p ? vo(k(u)) : new RegExp("^(http://|https://)", "ig").test(p) ? window.location.href = p : (/^\/apps/.test(p) && (p = p.replace("/apps", "")), p = pe.getPrefixPath() + $.isPc() ? p.replace("/desktop", "") : p.replace("/mobile", ""), h(p));
|
|
19152
19152
|
else {
|
|
19153
19153
|
const _ = p.indexOf("?") > -1 ? "&" : "?";
|
|
19154
19154
|
window.location.href = p + `${_}header=none`;
|
|
@@ -19902,12 +19902,12 @@ function MP() {
|
|
|
19902
19902
|
const { query: r, params: e } = L.config.globalProperties.$route, { resolve: t } = L.config.globalProperties.$router, { state: a } = L.config.globalProperties.$store;
|
|
19903
19903
|
return {
|
|
19904
19904
|
cancelHandle: (s) => {
|
|
19905
|
-
if (
|
|
19905
|
+
if (pe.getFullPath("/"), r.listUrl)
|
|
19906
19906
|
window.location.href = decodeURIComponent(
|
|
19907
19907
|
r.listUrl
|
|
19908
19908
|
);
|
|
19909
19909
|
else if (r.menuId)
|
|
19910
|
-
if (process.env.VUE_APP_CODE_OUT === "codeout"
|
|
19910
|
+
if (process.env.VUE_APP_CODE_OUT === "codeout")
|
|
19911
19911
|
window.location.href = t({
|
|
19912
19912
|
name: "platform-form-complete",
|
|
19913
19913
|
params: e,
|
|
@@ -19922,15 +19922,20 @@ function MP() {
|
|
|
19922
19922
|
name: "platform-form-complete",
|
|
19923
19923
|
params: e,
|
|
19924
19924
|
query: r
|
|
19925
|
-
}).href : window.location.href = `${
|
|
19925
|
+
}).href : window.location.href = `${pe.getFullPath(
|
|
19926
19926
|
a.userInfo.task_redirect_url_bo.mobile_my_approval
|
|
19927
19927
|
)}?type=draft`;
|
|
19928
19928
|
else if (history.state?.back) {
|
|
19929
19929
|
const i = window.location.href;
|
|
19930
19930
|
let o;
|
|
19931
|
-
process.env.VUE_APP_CODE_OUT === "codeout"
|
|
19931
|
+
if (process.env.VUE_APP_CODE_OUT === "codeout") {
|
|
19932
|
+
history.back();
|
|
19933
|
+
return;
|
|
19934
|
+
} else
|
|
19935
|
+
o = `${i.slice(0, location.href.indexOf("sapp") - 1)}${history.state.back}`;
|
|
19936
|
+
window.location.href = o;
|
|
19932
19937
|
} else
|
|
19933
|
-
window.location.href =
|
|
19938
|
+
window.location.href = pe.getFullPath("/");
|
|
19934
19939
|
}
|
|
19935
19940
|
};
|
|
19936
19941
|
}
|
|
@@ -20026,7 +20031,7 @@ const BP = async (r, e) => {
|
|
|
20026
20031
|
type: l
|
|
20027
20032
|
}
|
|
20028
20033
|
};
|
|
20029
|
-
window.location.href =
|
|
20034
|
+
window.location.href = pe.getFullPath(
|
|
20030
20035
|
a.resolve(v).href
|
|
20031
20036
|
);
|
|
20032
20037
|
}
|
|
@@ -20290,7 +20295,7 @@ const KP = async (r) => {
|
|
|
20290
20295
|
header: o.query.header,
|
|
20291
20296
|
open_mode: o.query.open_mode
|
|
20292
20297
|
}
|
|
20293
|
-
}, l =
|
|
20298
|
+
}, l = pe.getFullPath(i.resolve(u).href);
|
|
20294
20299
|
return s ? ($.openWindow(l), window.multipleTabs.closePage({ hasTip: !1 })) : window.opener !== void 0 ? window.location.href = l : ($.openWindow(l), window.closeIframe()), !1;
|
|
20295
20300
|
}
|
|
20296
20301
|
return !0;
|
|
@@ -23140,7 +23145,7 @@ const xS = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration")
|
|
|
23140
23145
|
function RS(r) {
|
|
23141
23146
|
return !rt(r) || !r.hasOwnProperty(xS);
|
|
23142
23147
|
}
|
|
23143
|
-
const { assign:
|
|
23148
|
+
const { assign: de } = Object;
|
|
23144
23149
|
function gi(r) {
|
|
23145
23150
|
return !!(et(r) && r.effect);
|
|
23146
23151
|
}
|
|
@@ -23153,7 +23158,7 @@ function vi(r, e, t, a) {
|
|
|
23153
23158
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
23154
23159
|
$n(H(n ? n() : {}).value)
|
|
23155
23160
|
) : $n(t.state.value[r]);
|
|
23156
|
-
return
|
|
23161
|
+
return de(c, s, Object.keys(i || {}).reduce((d, p) => (process.env.NODE_ENV !== "production" && p in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${r}".`), d[p] = $e(U(() => {
|
|
23157
23162
|
zt(t);
|
|
23158
23163
|
const f = t._s.get(r);
|
|
23159
23164
|
return i[p].call(f, f);
|
|
@@ -23163,7 +23168,7 @@ function vi(r, e, t, a) {
|
|
|
23163
23168
|
}
|
|
23164
23169
|
function tn(r, e, t = {}, a, n, s) {
|
|
23165
23170
|
let i;
|
|
23166
|
-
const o =
|
|
23171
|
+
const o = de({ actions: {} }, t);
|
|
23167
23172
|
if (process.env.NODE_ENV !== "production" && !a._e.active)
|
|
23168
23173
|
throw new Error("Pinia destroyed");
|
|
23169
23174
|
const u = {
|
|
@@ -23198,7 +23203,7 @@ function tn(r, e, t = {}, a, n, s) {
|
|
|
23198
23203
|
const _ = s ? function() {
|
|
23199
23204
|
const { state: T } = t, q = T ? T() : {};
|
|
23200
23205
|
this.$patch((D) => {
|
|
23201
|
-
|
|
23206
|
+
de(D, q);
|
|
23202
23207
|
});
|
|
23203
23208
|
} : (
|
|
23204
23209
|
/* istanbul ignore next */
|
|
@@ -23254,11 +23259,11 @@ function tn(r, e, t = {}, a, n, s) {
|
|
|
23254
23259
|
type: we.direct,
|
|
23255
23260
|
events: f
|
|
23256
23261
|
}, V);
|
|
23257
|
-
},
|
|
23262
|
+
}, de({}, u, T)));
|
|
23258
23263
|
return q;
|
|
23259
23264
|
},
|
|
23260
23265
|
$dispose: S
|
|
23261
|
-
}, y = qa(process.env.NODE_ENV !== "production" || Mt ?
|
|
23266
|
+
}, y = qa(process.env.NODE_ENV !== "production" || Mt ? de(
|
|
23262
23267
|
{
|
|
23263
23268
|
_hmrPayload: O,
|
|
23264
23269
|
_customProperties: $e(/* @__PURE__ */ new Set())
|
|
@@ -23284,13 +23289,13 @@ function tn(r, e, t = {}, a, n, s) {
|
|
|
23284
23289
|
) : T, Ka && (E._getters || // @ts-expect-error: same
|
|
23285
23290
|
(E._getters = $e([]))).push(C));
|
|
23286
23291
|
}
|
|
23287
|
-
if (
|
|
23292
|
+
if (de(y, E), de(Ze(y), E), Object.defineProperty(y, "$state", {
|
|
23288
23293
|
get: () => process.env.NODE_ENV !== "production" && n ? v.value : a.state.value[r],
|
|
23289
23294
|
set: (C) => {
|
|
23290
23295
|
if (process.env.NODE_ENV !== "production" && n)
|
|
23291
23296
|
throw new Error("cannot set hotState");
|
|
23292
23297
|
P((T) => {
|
|
23293
|
-
|
|
23298
|
+
de(T, C);
|
|
23294
23299
|
});
|
|
23295
23300
|
}
|
|
23296
23301
|
}), process.env.NODE_ENV !== "production" && (y._hotUpdate = $e((C) => {
|
|
@@ -23329,7 +23334,7 @@ function tn(r, e, t = {}, a, n, s) {
|
|
|
23329
23334
|
enumerable: !1
|
|
23330
23335
|
};
|
|
23331
23336
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((T) => {
|
|
23332
|
-
Object.defineProperty(y, T,
|
|
23337
|
+
Object.defineProperty(y, T, de({ value: y[T] }, C));
|
|
23333
23338
|
});
|
|
23334
23339
|
}
|
|
23335
23340
|
return a._p.forEach((C) => {
|
|
@@ -23340,9 +23345,9 @@ function tn(r, e, t = {}, a, n, s) {
|
|
|
23340
23345
|
pinia: a,
|
|
23341
23346
|
options: o
|
|
23342
23347
|
}));
|
|
23343
|
-
Object.keys(T || {}).forEach((q) => y._customProperties.add(q)),
|
|
23348
|
+
Object.keys(T || {}).forEach((q) => y._customProperties.add(q)), de(y, T);
|
|
23344
23349
|
} else
|
|
23345
|
-
|
|
23350
|
+
de(y, i.run(() => C({
|
|
23346
23351
|
store: y,
|
|
23347
23352
|
app: a._a,
|
|
23348
23353
|
pinia: a,
|
|
@@ -23370,7 +23375,7 @@ This will fail in production.`);
|
|
|
23370
23375
|
o = Vt, o._s.has(a) || (s ? tn(a, e, n, o) : vi(a, n, o), process.env.NODE_ENV !== "production" && (i._pinia = o));
|
|
23371
23376
|
const c = o._s.get(a);
|
|
23372
23377
|
if (process.env.NODE_ENV !== "production" && u) {
|
|
23373
|
-
const d = "__hot:" + a, p = s ? tn(d, e, n, o, !0) : vi(d,
|
|
23378
|
+
const d = "__hot:" + a, p = s ? tn(d, e, n, o, !0) : vi(d, de({}, n), o, !0);
|
|
23374
23379
|
u._hotUpdate(p), delete o.state.value[d], o._s.delete(d);
|
|
23375
23380
|
}
|
|
23376
23381
|
if (process.env.NODE_ENV !== "production" && Ka) {
|
|
@@ -24842,9 +24847,9 @@ function mw(r) {
|
|
|
24842
24847
|
const _ = a?.multipleTabs[i.sappId]?.panesList, S = window.multipleTabs?.isInternally();
|
|
24843
24848
|
if (c && S && i.sappId !== "sappId") {
|
|
24844
24849
|
const b = _?.map((O) => O.key);
|
|
24845
|
-
(!_ || !b?.includes(u)) && (process.env.NODE_ENV === "production" ? window.location.href =
|
|
24850
|
+
(!_ || !b?.includes(u)) && (process.env.NODE_ENV === "production" ? window.location.href = pe.getFullPath(
|
|
24846
24851
|
"/apps/desktop/multipleTabs?app=processcenter"
|
|
24847
|
-
) : window.location.href =
|
|
24852
|
+
) : window.location.href = pe.getFullPath(
|
|
24848
24853
|
"/desktop/multipleTabs?app=processcenter"
|
|
24849
24854
|
)), NP({ type: "removeApp" }), p.emit("header-remove-tab", {});
|
|
24850
24855
|
} else
|
|
@@ -24852,7 +24857,7 @@ function mw(r) {
|
|
|
24852
24857
|
name: "platform-form-complete",
|
|
24853
24858
|
params: i,
|
|
24854
24859
|
query: l
|
|
24855
|
-
}).href : window.location.href =
|
|
24860
|
+
}).href : window.location.href = pe.getFullPath(
|
|
24856
24861
|
a.userInfo.task_redirect_url_bo.pc_todo_task
|
|
24857
24862
|
);
|
|
24858
24863
|
};
|