x-runtime-lib 0.8.182 → 0.8.184
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/element/finalProperties.d.ts +2 -2
- package/dist/index.js +41 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,10 +29,10 @@ var Xe = (n, t, e) => {
|
|
|
29
29
|
};
|
|
30
30
|
return s();
|
|
31
31
|
};
|
|
32
|
-
import { defineComponent as S, createElementBlock as oe, createCommentVNode as ce, unref as r, openBlock as g, createElementVNode as Ne, computed as x, renderSlot as N, normalizeStyle as ge, ref as G, watch as pe, onUnmounted as xe, onBeforeMount as $t, watchEffect as Ee, h as D, createVNode as j, createBlock as C, useTemplateRef as Di, onMounted as Ki, nextTick as
|
|
32
|
+
import { defineComponent as S, createElementBlock as oe, createCommentVNode as ce, unref as r, openBlock as g, createElementVNode as Ne, computed as x, renderSlot as N, normalizeStyle as ge, ref as G, watch as pe, onUnmounted as xe, onBeforeMount as $t, watchEffect as Ee, h as D, createVNode as j, createBlock as C, useTemplateRef as Di, onMounted as Ki, nextTick as Le, withCtx as E, toDisplayString as ji, useAttrs as Vt, resolveComponent as W, isRef as se, mergeModels as _n, useModel as tt, createSlots as gn, renderList as Co, useId as Ni, withModifiers as $o, normalizeClass as Vo, inject as me, provide as fe, readonly as xn } from "vue";
|
|
33
33
|
import { globalObjects as Se, waitUtil as Oi, useViewStack as Hi, eventBus as Gi, messageInfo as Po, messageSuccess as Eo, messageWarning as Ji, messageError as qi, createAxios as Ao, openConfirmDlg as zo, openPromptDlg as Lo, getTypeDefault as Bn } from "x-essential-lib";
|
|
34
34
|
import { CameraHelper as Xi, DirectionalLightHelper as To, PointLightHelper as Mo, SpotLightHelper as Uo } from "three";
|
|
35
|
-
import { i as
|
|
35
|
+
import { i as Te, c as Bo, a as rt, K as Ro, M as Wo, O as Fo, u as Do, r as Yi, e as Zi, b as Ko, d as jo, f as No, g as Oo, h as Ho, j as Go, k as Jo, l as qo, m as O, H as Xo, n as Qi, o as Yo, p as Zo, q as Qo } from "./vendor.fe0c1tv5.js";
|
|
36
36
|
import { useTheme as es } from "vuetify";
|
|
37
37
|
import { getErrorMessage as ts } from "x-error-lib";
|
|
38
38
|
const Rn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
@@ -1117,7 +1117,7 @@ function a(n, t, e) {
|
|
|
1117
1117
|
e
|
|
1118
1118
|
) : i.value = await Gs(n.value, t, e);
|
|
1119
1119
|
}), pe(i, async (s, l) => {
|
|
1120
|
-
|
|
1120
|
+
Te(s, l) || (o ? await Hs(
|
|
1121
1121
|
o,
|
|
1122
1122
|
n.value.basic.id,
|
|
1123
1123
|
t,
|
|
@@ -1958,7 +1958,7 @@ const Al = /* @__PURE__ */ S({
|
|
|
1958
1958
|
y
|
|
1959
1959
|
],
|
|
1960
1960
|
async () => {
|
|
1961
|
-
await
|
|
1961
|
+
await Le(), L();
|
|
1962
1962
|
}
|
|
1963
1963
|
), pe([i], () => {
|
|
1964
1964
|
Z(), A();
|
|
@@ -2020,7 +2020,7 @@ const Al = /* @__PURE__ */ S({
|
|
|
2020
2020
|
y
|
|
2021
2021
|
],
|
|
2022
2022
|
async () => {
|
|
2023
|
-
await
|
|
2023
|
+
await Le(), L();
|
|
2024
2024
|
}
|
|
2025
2025
|
), pe([i], () => {
|
|
2026
2026
|
Z(), A();
|
|
@@ -6318,7 +6318,7 @@ $(qt);
|
|
|
6318
6318
|
function Lu(n, t) {
|
|
6319
6319
|
const e = F(n, t), o = Xt.properties[e], i = U();
|
|
6320
6320
|
R(i, o), i.basic.id = M(16), i.basic.key = Xt.key;
|
|
6321
|
-
const s =
|
|
6321
|
+
const s = Be(n, t, "chip1", "chip 1"), l = Be(n, t, "chip2", "chip 2"), u = Be(n, t, "chip3", "chip 3"), d = Be(n, t, "chip4", "chip 4"), c = Be(n, t, "chip5", "chip 5"), m = Be(n, t, "chip6", "chip 6");
|
|
6322
6322
|
return {
|
|
6323
6323
|
nodeLite: B(i, [
|
|
6324
6324
|
s.nodeLite,
|
|
@@ -6339,7 +6339,7 @@ function Lu(n, t) {
|
|
|
6339
6339
|
}
|
|
6340
6340
|
};
|
|
6341
6341
|
}
|
|
6342
|
-
function
|
|
6342
|
+
function Be(n, t, e, o) {
|
|
6343
6343
|
const i = F(n, t), s = qt.properties[i], l = U();
|
|
6344
6344
|
return R(l, s), l.basic.id = M(16), l.basic.key = qt.key, l.settings.value = e, l.settings.text = o, {
|
|
6345
6345
|
nodeLite: B(l),
|
|
@@ -8499,8 +8499,8 @@ const Ai = {
|
|
|
8499
8499
|
};
|
|
8500
8500
|
$(pn);
|
|
8501
8501
|
function rc(n, t) {
|
|
8502
|
-
const e = F(n, t), o =
|
|
8503
|
-
return R(i, o), i.basic.id = M(16), i.basic.key =
|
|
8502
|
+
const e = F(n, t), o = Ue.properties[e], i = U();
|
|
8503
|
+
return R(i, o), i.basic.id = M(16), i.basic.key = Ue.key, i.settings.text = "text", {
|
|
8504
8504
|
nodeLite: B(i),
|
|
8505
8505
|
nodes: {
|
|
8506
8506
|
[i.basic.id]: i
|
|
@@ -8593,7 +8593,7 @@ const zi = {
|
|
|
8593
8593
|
default: !1
|
|
8594
8594
|
}
|
|
8595
8595
|
]
|
|
8596
|
-
},
|
|
8596
|
+
}, Ue = {
|
|
8597
8597
|
key: "ui_text_v1",
|
|
8598
8598
|
name: "x-runtime-lib.text",
|
|
8599
8599
|
comp: za,
|
|
@@ -8604,7 +8604,7 @@ const zi = {
|
|
|
8604
8604
|
leaf: !0,
|
|
8605
8605
|
spawn: rc
|
|
8606
8606
|
};
|
|
8607
|
-
$(
|
|
8607
|
+
$(Ue);
|
|
8608
8608
|
function lc(n, t) {
|
|
8609
8609
|
const e = F(n, t), o = mn.properties[e], i = U();
|
|
8610
8610
|
return R(i, o), i.basic.id = M(16), i.basic.key = mn.key, i.settings.label = "label", {
|
|
@@ -8734,8 +8734,8 @@ function Wt(n, t, e) {
|
|
|
8734
8734
|
};
|
|
8735
8735
|
}
|
|
8736
8736
|
function uc(n, t, e) {
|
|
8737
|
-
const o = F(n, t), i =
|
|
8738
|
-
return R(s, i), s.basic.id = M(16), s.basic.key =
|
|
8737
|
+
const o = F(n, t), i = Ue.properties[o], s = U();
|
|
8738
|
+
return R(s, i), s.basic.id = M(16), s.basic.key = Ue.key, s.settings.text = e, {
|
|
8739
8739
|
nodeLite: B(s),
|
|
8740
8740
|
nodes: {
|
|
8741
8741
|
[s.basic.id]: s
|
|
@@ -8880,8 +8880,8 @@ function mc(n, t, e) {
|
|
|
8880
8880
|
};
|
|
8881
8881
|
}
|
|
8882
8882
|
function fc(n, t, e) {
|
|
8883
|
-
const o = F(n, t), i =
|
|
8884
|
-
return R(s, i), s.basic.id = M(16), s.basic.key =
|
|
8883
|
+
const o = F(n, t), i = Ue.properties[o], s = U();
|
|
8884
|
+
return R(s, i), s.basic.id = M(16), s.basic.key = Ue.key, s.settings.text = e, s.settings.style.xs = "h6", {
|
|
8885
8885
|
nodeLite: B(s),
|
|
8886
8886
|
nodes: {
|
|
8887
8887
|
[s.basic.id]: s
|
|
@@ -9240,7 +9240,7 @@ function Bi(n) {
|
|
|
9240
9240
|
function Fe(n, t, e) {
|
|
9241
9241
|
return `${n}.${t}.${e}`;
|
|
9242
9242
|
}
|
|
9243
|
-
function
|
|
9243
|
+
function Re(n) {
|
|
9244
9244
|
const t = n.split(".");
|
|
9245
9245
|
if (t.length !== 3)
|
|
9246
9246
|
throw new Error("unwrap property key of element slot failed");
|
|
@@ -9483,7 +9483,7 @@ function Ac(n) {
|
|
|
9483
9483
|
const { vm: t } = n;
|
|
9484
9484
|
t.newFunction("__getEnvV1__", () => t.getProp(t.global, "__env__")).consume((e) => t.setProp(t.global, "__getEnvV1__", e));
|
|
9485
9485
|
}
|
|
9486
|
-
function
|
|
9486
|
+
function Me(n, t) {
|
|
9487
9487
|
if (t === void 0)
|
|
9488
9488
|
return n.undefined;
|
|
9489
9489
|
if (t === null)
|
|
@@ -9502,7 +9502,7 @@ function Te(n, t) {
|
|
|
9502
9502
|
for (const u of Object.keys(t)) {
|
|
9503
9503
|
var e = [];
|
|
9504
9504
|
try {
|
|
9505
|
-
const d = Xe(e,
|
|
9505
|
+
const d = Xe(e, Me(n, t[u]));
|
|
9506
9506
|
n.setProp(l, u, d);
|
|
9507
9507
|
} catch (o) {
|
|
9508
9508
|
var i = o, s = !0;
|
|
@@ -9708,7 +9708,7 @@ function zc(n) {
|
|
|
9708
9708
|
return d.settled.then(t.runtime.executePendingJobs), d.handle;
|
|
9709
9709
|
}).consume((e) => t.setProp(t.global, "__callMethodV1__", e)), t.newFunction("__getStateV1__", (e) => {
|
|
9710
9710
|
const o = t.getString(e), i = n.getState(o);
|
|
9711
|
-
return
|
|
9711
|
+
return Me(t, i);
|
|
9712
9712
|
}).consume((e) => t.setProp(t.global, "__getStateV1__", e)), t.newFunction("__setStateV1__", (e, o) => {
|
|
9713
9713
|
const i = t.getString(e), s = t.dump(o);
|
|
9714
9714
|
n.setState(i, s);
|
|
@@ -9839,9 +9839,9 @@ class Mc {
|
|
|
9839
9839
|
create() {
|
|
9840
9840
|
const t = this.currPromiseId++, e = this.vm.newPromise();
|
|
9841
9841
|
return this.promises[t] = e, { promise: e, resolve: (s) => {
|
|
9842
|
-
this.vm && (
|
|
9842
|
+
this.vm && (Me(this.vm, s).consume((l) => e.resolve(l)), delete this.promises[t]);
|
|
9843
9843
|
}, reject: (s) => {
|
|
9844
|
-
this.vm && (
|
|
9844
|
+
this.vm && (Me(this.vm, s).consume((l) => e.reject(l)), delete this.promises[t]);
|
|
9845
9845
|
} };
|
|
9846
9846
|
}
|
|
9847
9847
|
}
|
|
@@ -9891,7 +9891,7 @@ class Uc {
|
|
|
9891
9891
|
this.meta.value = t.value, this.data.value = e.value, this.resetCustomProperties(o), this.resetCustomSlotProperties(o), this.resetStates();
|
|
9892
9892
|
}
|
|
9893
9893
|
async createVm(t, e) {
|
|
9894
|
-
this.vm = t.newContext(), this.promiseManager = new Mc(this.vm), Lc(this), this.vm.evalCode(Tc), this.setGlobalVariable("__env__", this.env), this.vm.evalCode(e), await this.callFunctionAsync(
|
|
9894
|
+
this.vm = t.newContext(), this.promiseManager = new Mc(this.vm), Lc(this), this.vm.evalCode(Tc), this.setGlobalVariable("__env__", this.env), this.vm.evalCode(e), await Le(), await this.callFunctionAsync(
|
|
9895
9895
|
"__triggerEventV1__",
|
|
9896
9896
|
le("elementEvent", "globality", "startup"),
|
|
9897
9897
|
""
|
|
@@ -9904,7 +9904,7 @@ class Uc {
|
|
|
9904
9904
|
const { vm: o } = this;
|
|
9905
9905
|
if (!o)
|
|
9906
9906
|
throw new Error("vm not available");
|
|
9907
|
-
o.setProp(o.global, t,
|
|
9907
|
+
o.setProp(o.global, t, Me(o, e));
|
|
9908
9908
|
}
|
|
9909
9909
|
getGlobalVariable(t) {
|
|
9910
9910
|
const { vm: e } = this;
|
|
@@ -9923,7 +9923,7 @@ class Uc {
|
|
|
9923
9923
|
const s = Xe(d, o.getProp(o.global, t));
|
|
9924
9924
|
if (o.typeof(s) !== "function")
|
|
9925
9925
|
throw new Error(`function<${t}> not available`);
|
|
9926
|
-
const l = e.map((y) =>
|
|
9926
|
+
const l = e.map((y) => Me(o, y));
|
|
9927
9927
|
const u = o.unwrapResult(o.callFunction(s, o.undefined, ...l)).consume((y) => o.dump(y));
|
|
9928
9928
|
l.forEach((y) => y.dispose());
|
|
9929
9929
|
return u;
|
|
@@ -9944,7 +9944,7 @@ class Uc {
|
|
|
9944
9944
|
const s = Xe(c, o.getProp(o.global, t));
|
|
9945
9945
|
if (o.typeof(s) !== "function")
|
|
9946
9946
|
throw new Error(`function<${t}> not available`);
|
|
9947
|
-
const l = e.map((b) =>
|
|
9947
|
+
const l = e.map((b) => Me(o, b));
|
|
9948
9948
|
const u = o.unwrapResult(o.callFunction(s, o.undefined, ...l)).consume((b) => o.resolvePromise(b));
|
|
9949
9949
|
o.runtime.executePendingJobs();
|
|
9950
9950
|
l.map((b) => b.dispose());
|
|
@@ -9990,12 +9990,12 @@ class Uc {
|
|
|
9990
9990
|
o
|
|
9991
9991
|
), new Error("node not found");
|
|
9992
9992
|
const s = Kt(i, e);
|
|
9993
|
-
|
|
9993
|
+
Te(o, s) || (no(i, e, o), this.hooks.onElementPropertyChange(
|
|
9994
9994
|
i.basic.id,
|
|
9995
9995
|
e,
|
|
9996
9996
|
o,
|
|
9997
9997
|
s
|
|
9998
|
-
), await
|
|
9998
|
+
), await Le());
|
|
9999
9999
|
}
|
|
10000
10000
|
//--------------------------
|
|
10001
10001
|
// 元素插槽属性
|
|
@@ -10005,7 +10005,7 @@ class Uc {
|
|
|
10005
10005
|
elementKey: e,
|
|
10006
10006
|
slotKey: o,
|
|
10007
10007
|
propertyKey: i
|
|
10008
|
-
} =
|
|
10008
|
+
} = Re(t), s = he[e];
|
|
10009
10009
|
if (!s || !s.slots)
|
|
10010
10010
|
return !1;
|
|
10011
10011
|
const l = s.slots.find((d) => d.key === o);
|
|
@@ -10014,7 +10014,7 @@ class Uc {
|
|
|
10014
10014
|
));
|
|
10015
10015
|
}
|
|
10016
10016
|
async getElementSlotProperty(t) {
|
|
10017
|
-
const { slotKey: e, propertyKey: o } =
|
|
10017
|
+
const { slotKey: e, propertyKey: o } = Re(t), i = We(
|
|
10018
10018
|
"elementSlotProperty",
|
|
10019
10019
|
"placeholder",
|
|
10020
10020
|
Fe("placeholder", e, o)
|
|
@@ -10022,12 +10022,12 @@ class Uc {
|
|
|
10022
10022
|
return this.eventBus.emit(`${i}/get`, { result: s }), s.value;
|
|
10023
10023
|
}
|
|
10024
10024
|
async setElementSlotProperty(t, e) {
|
|
10025
|
-
const { slotKey: o, propertyKey: i } =
|
|
10025
|
+
const { slotKey: o, propertyKey: i } = Re(t), s = We(
|
|
10026
10026
|
"elementSlotProperty",
|
|
10027
10027
|
"placeholder",
|
|
10028
10028
|
Fe("placeholder", o, i)
|
|
10029
10029
|
);
|
|
10030
|
-
this.eventBus.emit(`${s}/set`, e), await
|
|
10030
|
+
this.eventBus.emit(`${s}/set`, e), await Le();
|
|
10031
10031
|
}
|
|
10032
10032
|
//--------------------------
|
|
10033
10033
|
// 多重元素插槽属性
|
|
@@ -10037,7 +10037,7 @@ class Uc {
|
|
|
10037
10037
|
elementKey: e,
|
|
10038
10038
|
slotKey: o,
|
|
10039
10039
|
propertyKey: i
|
|
10040
|
-
} =
|
|
10040
|
+
} = Re(t), s = he[e];
|
|
10041
10041
|
if (!s || !s.slots)
|
|
10042
10042
|
return !1;
|
|
10043
10043
|
const l = s.slots.find((d) => d.key === o);
|
|
@@ -10046,7 +10046,7 @@ class Uc {
|
|
|
10046
10046
|
));
|
|
10047
10047
|
}
|
|
10048
10048
|
async getMultipleElementSlotProperty(t, e) {
|
|
10049
|
-
const { slotKey: o, propertyKey: i } =
|
|
10049
|
+
const { slotKey: o, propertyKey: i } = Re(e), s = We(
|
|
10050
10050
|
"multipleElementSlotProperty",
|
|
10051
10051
|
"placeholder",
|
|
10052
10052
|
Fe("placeholder", o, i)
|
|
@@ -10054,7 +10054,7 @@ class Uc {
|
|
|
10054
10054
|
return this.eventBus.emit(`${t}/${s}/get`, { result: l }), l.value;
|
|
10055
10055
|
}
|
|
10056
10056
|
async setMultipeElementSlotProperty(t, e, o) {
|
|
10057
|
-
const { slotKey: i, propertyKey: s } =
|
|
10057
|
+
const { slotKey: i, propertyKey: s } = Re(e), l = We(
|
|
10058
10058
|
"multipleElementSlotProperty",
|
|
10059
10059
|
"placeholder",
|
|
10060
10060
|
Fe("placeholder", i, s)
|
|
@@ -10078,7 +10078,7 @@ class Uc {
|
|
|
10078
10078
|
}
|
|
10079
10079
|
async setCustomProperty(t, e) {
|
|
10080
10080
|
const o = this.customProperties[t];
|
|
10081
|
-
|
|
10081
|
+
Te(e, o) || (this.customProperties[t] = e, this.hooks.onCustomPropertyChange(t, e, o), await Le());
|
|
10082
10082
|
}
|
|
10083
10083
|
//--------------------------
|
|
10084
10084
|
// 自定义插槽属性
|
|
@@ -10097,7 +10097,7 @@ class Uc {
|
|
|
10097
10097
|
}
|
|
10098
10098
|
async setCustomSlotProperty(t, e) {
|
|
10099
10099
|
const o = this.customSlotProperties[t];
|
|
10100
|
-
|
|
10100
|
+
Te(e, o) || (this.customSlotProperties[t] = e, this.hooks.onCustomSlotPropetyChange(t, e, o), await Le());
|
|
10101
10101
|
}
|
|
10102
10102
|
//--------------------------
|
|
10103
10103
|
// 方法
|
|
@@ -10137,7 +10137,7 @@ class Uc {
|
|
|
10137
10137
|
}
|
|
10138
10138
|
setState(t, e) {
|
|
10139
10139
|
const o = this.states[t];
|
|
10140
|
-
|
|
10140
|
+
Te(e, o) || (this.states[t] = e, this.hooks.onStateChange(t, e, o));
|
|
10141
10141
|
}
|
|
10142
10142
|
}
|
|
10143
10143
|
function Pe(n, t, e, o, i, s, l) {
|
|
@@ -10200,13 +10200,13 @@ function Pe(n, t, e, o, i, s, l) {
|
|
|
10200
10200
|
);
|
|
10201
10201
|
async function v(L, A, w, K) {
|
|
10202
10202
|
if (f.vm) {
|
|
10203
|
-
if (
|
|
10203
|
+
if (Te(A, ["settings", "slot"])) {
|
|
10204
10204
|
const ne = s.value?.view.nodeLites.find(
|
|
10205
10205
|
(ie) => ie.id === L
|
|
10206
10206
|
);
|
|
10207
10207
|
ne ? ne.slotId = w : console.assert(!1);
|
|
10208
10208
|
}
|
|
10209
|
-
if (
|
|
10209
|
+
if (Te(A, ["settings", "comp"])) {
|
|
10210
10210
|
const ne = s.value?.view.nodeLites.find(
|
|
10211
10211
|
(ie) => ie.id === L
|
|
10212
10212
|
);
|
|
@@ -10488,7 +10488,7 @@ export {
|
|
|
10488
10488
|
dn as tabV1,
|
|
10489
10489
|
pn as tabsV1,
|
|
10490
10490
|
en as textFieldV1,
|
|
10491
|
-
|
|
10491
|
+
Ue as textV1,
|
|
10492
10492
|
mn as textareaV1,
|
|
10493
10493
|
fn as timelineItemV1,
|
|
10494
10494
|
yn as timelineV1,
|
|
@@ -10506,7 +10506,7 @@ export {
|
|
|
10506
10506
|
Ri as unwrapMethodKeyOfElementSlot,
|
|
10507
10507
|
Bi as unwrapPropertyId,
|
|
10508
10508
|
bd as unwrapPropertyKeyOfCustomSlot,
|
|
10509
|
-
|
|
10509
|
+
Re as unwrapPropertyKeyOfElementSlot,
|
|
10510
10510
|
wd as unwrapSlotId,
|
|
10511
10511
|
Ve as useDepend,
|
|
10512
10512
|
Id as useRuntime,
|