x-block-lib 0.8.24 → 0.8.26
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/index.js
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-6cb62cd6]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { E as I, r as En, M as Dn, s as Co, a as ko, X as Mn, u as C, B as g, j as s, O as r, F as O, b as
|
|
10
|
+
import { E as I, r as En, M as Dn, s as Co, a as ko, X as Mn, u as C, B as g, j as s, O as r, F as O, b as $e, i as v, c as mt, d as No, e as M, f as m, g as Lo, h as K, k as dt, p as Yt, l as Z, m as gn, n as B, C as Un, N as tt, o as So, P as He, q as Me, V as kt, t as Vn, W as Bo, v as bo, w as Po, S as Ro, x as Do, y as Mo, z as Wt, T as Ae, A as xn, D as Uo, G as Vo, H as Yn, I as xo, J as Yo, K as Fo, L as wo, Q as Ko, R as $o, U as Ho, Y as Go } from "./vendor.txua272r.js";
|
|
11
11
|
import { globalState as T } from "x-state-lib";
|
|
12
12
|
import { globalObjects as yt, openConfirmDlg as Wo, openPromptDlg as jo, messageWarning as Fn, useColor as jt, useSystem as wn, useViewStack as tn, eventBus as Ct } from "x-essential-lib";
|
|
13
|
-
import { pkgs as ie, parsePixelStr as Xo, parsePercentStr as Jo, getPropertyTag as Mt, unwrapEventId as en, elements as q, makeEventId as at, toEventName as Ie, unwrapMethodId as nn, makeMethodId as ee, toMethodName as on, unwrapPropertyId as sn, makePropertyId as Zt, toPropertyName as Kn, isLocaleOfMethodKind as
|
|
14
|
-
import { provide as qo, inject as Qo, defineComponent as st, resolveComponent as D, createBlock as et, openBlock as S, unref as R, withCtx as nt, createVNode as L, mergeProps as an, useModel as Kt, ref as Nt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as J, normalizeStyle as G, createElementVNode as w, createCommentVNode as ct, toDisplayString as
|
|
13
|
+
import { pkgs as ie, parsePixelStr as Xo, parsePercentStr as Jo, getPropertyTag as Mt, unwrapEventId as en, elements as q, makeEventId as at, toEventName as Ie, unwrapMethodId as nn, makeMethodId as ee, toMethodName as on, unwrapPropertyId as sn, makePropertyId as Zt, toPropertyName as Kn, isLocaleOfMethodKind as $n, makeTriggerId as It } from "x-runtime-lib";
|
|
14
|
+
import { provide as qo, inject as Qo, defineComponent as st, resolveComponent as D, createBlock as et, openBlock as S, unref as R, withCtx as nt, createVNode as L, mergeProps as an, useModel as Kt, ref as Nt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as J, normalizeStyle as G, createElementVNode as w, createCommentVNode as ct, toDisplayString as $t, withModifiers as Ft, mergeModels as Ge, Fragment as Hn, renderList as ti, useId as We, onUnmounted as ei, useTemplateRef as wt, withKeys as Gn, isRef as ne, onMounted as An, nextTick as ni, onBeforeUnmount as In, watch as Vt, renderSlot as oi } from "vue";
|
|
15
15
|
import { useI18n as Xt } from "vue-i18n";
|
|
16
16
|
import { useDisplay as ii } from "vuetify";
|
|
17
17
|
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
@@ -30,7 +30,7 @@ const jn = (t, e, n) => {
|
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
32
|
async function On(t) {
|
|
33
|
-
const e = await jn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.
|
|
33
|
+
const e = await jn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.n1dap9o0.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.m1pmgr3r.js") }), `./msg/${t}.ts`, 3);
|
|
34
34
|
Co(e.default);
|
|
35
35
|
}
|
|
36
36
|
function h(t) {
|
|
@@ -339,7 +339,7 @@ const gi = (t, e) => {
|
|
|
339
339
|
let u, l;
|
|
340
340
|
if (c.ui === "pixelInput") {
|
|
341
341
|
const _ = Xo(this.value) ?? 0;
|
|
342
|
-
u = new
|
|
342
|
+
u = new $e(
|
|
343
343
|
_,
|
|
344
344
|
c.min,
|
|
345
345
|
c.max,
|
|
@@ -350,7 +350,7 @@ const gi = (t, e) => {
|
|
|
350
350
|
), l = "px";
|
|
351
351
|
} else if (c.ui === "percentInput") {
|
|
352
352
|
const _ = Jo(this.value) ?? 0;
|
|
353
|
-
u = new
|
|
353
|
+
u = new $e(
|
|
354
354
|
_,
|
|
355
355
|
c.min,
|
|
356
356
|
c.max,
|
|
@@ -1094,7 +1094,7 @@ function ve(t) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return k(n);
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function Ht(t, e) {
|
|
1098
1098
|
const { properties: n } = T.runtime, { activeObject: o, activeComp: i, depends: a } = T.app, c = [], u = Mt(o.type, o.subtype);
|
|
1099
1099
|
if (!u)
|
|
1100
1100
|
return c;
|
|
@@ -1233,7 +1233,7 @@ function Ot(t) {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
1235
|
function no(t, e) {
|
|
1236
|
-
const n = [], o =
|
|
1236
|
+
const n = [], o = Ht(t, e);
|
|
1237
1237
|
for (const { id: i, kind: a, names: c } of o)
|
|
1238
1238
|
n.push([Kn(a, c), i]);
|
|
1239
1239
|
return k(n);
|
|
@@ -1343,7 +1343,7 @@ const Mi = {
|
|
|
1343
1343
|
for (let e = 0; e < this.event.params.length; e++)
|
|
1344
1344
|
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1345
1345
|
const { kind: t } = en(this.event.id);
|
|
1346
|
-
if (t === "
|
|
1346
|
+
if (t === "multipleRefEvent")
|
|
1347
1347
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1348
1348
|
else if (this.getInput("REF_KEY")) {
|
|
1349
1349
|
const e = this.getInput("REF_KEY").connection.targetBlock();
|
|
@@ -1354,10 +1354,10 @@ const Mi = {
|
|
|
1354
1354
|
if (this.isInsertionMarker())
|
|
1355
1355
|
return;
|
|
1356
1356
|
const t = [];
|
|
1357
|
-
this.event.kind === "referenceEvent" && t.push(["REF_KEY", "
|
|
1357
|
+
this.event.kind === "referenceEvent" && t.push(["REF_KEY", "__refKey__", "x-runtime-lib.refKey", !0]);
|
|
1358
1358
|
let e = !0;
|
|
1359
1359
|
(this.event.kind === "referenceEvent" || this.event.kind === "customEvent") && (e = !1), this.event.params.forEach(({ key: n, name: o }, i) => {
|
|
1360
|
-
t.push(["PARAM" + i, n
|
|
1360
|
+
t.push(["PARAM" + i, `__param$${n}__`, o, e]);
|
|
1361
1361
|
}), t.length > 0 && Y(this, t);
|
|
1362
1362
|
},
|
|
1363
1363
|
checkWarning_: function() {
|
|
@@ -1392,7 +1392,7 @@ s.forBlock.on_app_event_v1 = function(t) {
|
|
|
1392
1392
|
const e = s.quote_, n = t;
|
|
1393
1393
|
let o = "";
|
|
1394
1394
|
n.event.params.forEach((c, u) => {
|
|
1395
|
-
u !== 0 && (o += ", "), o += c.key
|
|
1395
|
+
u !== 0 && (o += ", "), o += `__param$${c.key}__`;
|
|
1396
1396
|
});
|
|
1397
1397
|
const i = s.statementToCode(n, "HANDLE");
|
|
1398
1398
|
return `__onEventV1__(${e(n.event.id)}, function(${o}) {
|
|
@@ -1490,8 +1490,8 @@ const Ui = {
|
|
|
1490
1490
|
};
|
|
1491
1491
|
g.trigger_app_event_v1 = Ui;
|
|
1492
1492
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1493
|
-
const
|
|
1494
|
-
return `__triggerEventV1__
|
|
1493
|
+
const n = [t.event.id];
|
|
1494
|
+
return `__callFunctionUpV1__('__triggerEventV1__', ${JSON.stringify(n)});
|
|
1495
1495
|
`;
|
|
1496
1496
|
};
|
|
1497
1497
|
m([
|
|
@@ -1766,10 +1766,10 @@ const Yi = {
|
|
|
1766
1766
|
ensureBlocks_: function() {
|
|
1767
1767
|
if (this.isInsertionMarker())
|
|
1768
1768
|
return;
|
|
1769
|
-
const { kind: t } = nn(this.method.id), e =
|
|
1769
|
+
const { kind: t } = nn(this.method.id), e = $n(t), n = [];
|
|
1770
1770
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1771
1771
|
const { key: i, name: a } = this.method.outputs[o];
|
|
1772
|
-
n.push(["OUTPUT" + o, i
|
|
1772
|
+
n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
|
|
1773
1773
|
}
|
|
1774
1774
|
n.length > 0 && Y(this, n);
|
|
1775
1775
|
},
|
|
@@ -1877,10 +1877,10 @@ const Fi = {
|
|
|
1877
1877
|
ensureBlocks_: function() {
|
|
1878
1878
|
if (this.isInsertionMarker() || !this.method.id)
|
|
1879
1879
|
return;
|
|
1880
|
-
const t =
|
|
1880
|
+
const t = $n(this.method.kind), e = [];
|
|
1881
1881
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
1882
1882
|
const { key: o, name: i } = this.method.inputs[n];
|
|
1883
|
-
e.push(["INPUT" + n, o
|
|
1883
|
+
e.push(["INPUT" + n, `__input$${o}__`, i, t]);
|
|
1884
1884
|
}
|
|
1885
1885
|
Y(this, e);
|
|
1886
1886
|
},
|
|
@@ -2166,7 +2166,7 @@ s.forBlock.navigate_to_v1 = function(t) {
|
|
|
2166
2166
|
return `__navigateToV1__(${n}, ${o});
|
|
2167
2167
|
`;
|
|
2168
2168
|
};
|
|
2169
|
-
const
|
|
2169
|
+
const $i = {
|
|
2170
2170
|
init: function() {
|
|
2171
2171
|
this.comp = {
|
|
2172
2172
|
id: void 0,
|
|
@@ -2226,12 +2226,12 @@ const Hi = {
|
|
|
2226
2226
|
this.setWarningText(null);
|
|
2227
2227
|
}
|
|
2228
2228
|
};
|
|
2229
|
-
g.select_comp_v1 =
|
|
2229
|
+
g.select_comp_v1 = $i;
|
|
2230
2230
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2231
2231
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2232
2232
|
return [e(o), r.ATOMIC];
|
|
2233
2233
|
};
|
|
2234
|
-
const
|
|
2234
|
+
const Hi = {
|
|
2235
2235
|
init: function() {
|
|
2236
2236
|
this.node = {
|
|
2237
2237
|
id: "",
|
|
@@ -2255,7 +2255,7 @@ const $i = {
|
|
|
2255
2255
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2256
2256
|
const e = this.getField("NODE");
|
|
2257
2257
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2258
|
-
const n =
|
|
2258
|
+
const n = Ht(this.node.id, "read")?.[0];
|
|
2259
2259
|
if (!n)
|
|
2260
2260
|
return;
|
|
2261
2261
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2299,7 +2299,7 @@ const $i = {
|
|
|
2299
2299
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2300
2300
|
const o = this.getField("PROPERTY");
|
|
2301
2301
|
if (o.getOptions(!1), n || !Ot(this.property.id)) {
|
|
2302
|
-
const i =
|
|
2302
|
+
const i = Ht(this.node.id, "read")?.[0];
|
|
2303
2303
|
o.setValue(i?.id ?? "");
|
|
2304
2304
|
}
|
|
2305
2305
|
this.onPropChange_(o.getValue());
|
|
@@ -2331,7 +2331,7 @@ const $i = {
|
|
|
2331
2331
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2332
2332
|
}
|
|
2333
2333
|
};
|
|
2334
|
-
g.get_app_property_v1 =
|
|
2334
|
+
g.get_app_property_v1 = Hi;
|
|
2335
2335
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
2336
2336
|
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } = sn(n.property.id);
|
|
2337
2337
|
return [`__getPropertyV1__(${e(o)}, ${e(i)}, ${e(a)})`, r.ATOMIC];
|
|
@@ -2360,7 +2360,7 @@ const Gi = {
|
|
|
2360
2360
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2361
2361
|
const e = this.getField("NODE");
|
|
2362
2362
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2363
|
-
const n =
|
|
2363
|
+
const n = Ht(this.node.id, "write")?.[0];
|
|
2364
2364
|
if (!n)
|
|
2365
2365
|
return;
|
|
2366
2366
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2404,7 +2404,7 @@ const Gi = {
|
|
|
2404
2404
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2405
2405
|
const o = this.getField("PROPERTY");
|
|
2406
2406
|
if (o.getOptions(!1), n || !Ot(this.property.id)) {
|
|
2407
|
-
const i =
|
|
2407
|
+
const i = Ht(this.node.id, "write")?.[0];
|
|
2408
2408
|
o.setValue(i?.id ?? "");
|
|
2409
2409
|
}
|
|
2410
2410
|
this.onPropChange_(o.getValue());
|
|
@@ -3600,7 +3600,7 @@ const ts = {
|
|
|
3600
3600
|
const t = [];
|
|
3601
3601
|
for (let e = 0; e < this.func.outputs.length; e++) {
|
|
3602
3602
|
const { id: n, name: o } = this.func.outputs[e];
|
|
3603
|
-
t.push(["OUTPUT" + e, `
|
|
3603
|
+
t.push(["OUTPUT" + e, `__output$${n}__`, o, !1]);
|
|
3604
3604
|
}
|
|
3605
3605
|
Y(this, t);
|
|
3606
3606
|
},
|
|
@@ -3644,7 +3644,7 @@ s.forBlock.call_func_v1 = function(t) {
|
|
|
3644
3644
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3645
3645
|
let l = "";
|
|
3646
3646
|
o.func.outputs.forEach(({ id: f }) => {
|
|
3647
|
-
l += `${e}var
|
|
3647
|
+
l += `${e}var __output${f}__ = __result__[${n(f)}];
|
|
3648
3648
|
`;
|
|
3649
3649
|
});
|
|
3650
3650
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3774,7 +3774,7 @@ const es = {
|
|
|
3774
3774
|
const t = [];
|
|
3775
3775
|
for (let e = 0; e < this.func.outputs.length; e++) {
|
|
3776
3776
|
const { id: n, name: o } = this.func.outputs[e];
|
|
3777
|
-
t.push(["OUTPUT" + e, `
|
|
3777
|
+
t.push(["OUTPUT" + e, `__output$${n}__`, o, !1]);
|
|
3778
3778
|
}
|
|
3779
3779
|
Y(this, t);
|
|
3780
3780
|
},
|
|
@@ -3818,7 +3818,7 @@ s.forBlock.call_func_internal_v1 = function(t) {
|
|
|
3818
3818
|
const u = o.space.name + "/" + o.func.name;
|
|
3819
3819
|
let l = "";
|
|
3820
3820
|
o.func.outputs.forEach(({ id: f }) => {
|
|
3821
|
-
l += `${e}var
|
|
3821
|
+
l += `${e}var __output$${f}__ = __result__.outputs[${n(f)}];
|
|
3822
3822
|
`;
|
|
3823
3823
|
});
|
|
3824
3824
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
@@ -3873,7 +3873,7 @@ const ns = {
|
|
|
3873
3873
|
const t = [];
|
|
3874
3874
|
for (let e = 0; e < this.func.inputs.length; e++) {
|
|
3875
3875
|
const { id: n, name: o } = this.func.inputs[e];
|
|
3876
|
-
t.push(["INPUT" + e, `
|
|
3876
|
+
t.push(["INPUT" + e, `__input$${n}__`, o, !1]);
|
|
3877
3877
|
}
|
|
3878
3878
|
Y(this, t);
|
|
3879
3879
|
},
|
|
@@ -3891,7 +3891,7 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3891
3891
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3892
3892
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
3893
3893
|
const { id: c } = e.func.inputs[a];
|
|
3894
|
-
o.push(`
|
|
3894
|
+
o.push(`__input$${c}__`);
|
|
3895
3895
|
}
|
|
3896
3896
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3897
3897
|
${n}}`;
|
|
@@ -4059,7 +4059,7 @@ function Ce() {
|
|
|
4059
4059
|
t.push([o, n]);
|
|
4060
4060
|
}), k(t);
|
|
4061
4061
|
}
|
|
4062
|
-
function
|
|
4062
|
+
function $(t) {
|
|
4063
4063
|
const { spaces: e } = T.data, n = e.find((o) => o.id === t);
|
|
4064
4064
|
return n ? n.tables : [];
|
|
4065
4065
|
}
|
|
@@ -4070,7 +4070,7 @@ function j(t, e) {
|
|
|
4070
4070
|
}
|
|
4071
4071
|
function ke(t) {
|
|
4072
4072
|
const e = [];
|
|
4073
|
-
return
|
|
4073
|
+
return $(t).forEach(({ id: o, name: i }) => {
|
|
4074
4074
|
e.push([i, o]);
|
|
4075
4075
|
}), k(e);
|
|
4076
4076
|
}
|
|
@@ -4102,7 +4102,7 @@ function ss(t) {
|
|
|
4102
4102
|
let n, o;
|
|
4103
4103
|
const i = Q()?.[0];
|
|
4104
4104
|
if (i) {
|
|
4105
|
-
const u =
|
|
4105
|
+
const u = $(i.id)?.[0];
|
|
4106
4106
|
if (u) {
|
|
4107
4107
|
n = {
|
|
4108
4108
|
space: {
|
|
@@ -4235,7 +4235,7 @@ const rs = {
|
|
|
4235
4235
|
if (!t)
|
|
4236
4236
|
return;
|
|
4237
4237
|
this.space.id = t.id, this.space.name = t.name;
|
|
4238
|
-
const e =
|
|
4238
|
+
const e = $(this.space.id)?.[0];
|
|
4239
4239
|
if (!e)
|
|
4240
4240
|
return;
|
|
4241
4241
|
this.table.id = e.id, this.table.name = e.name;
|
|
@@ -4281,7 +4281,7 @@ const rs = {
|
|
|
4281
4281
|
}
|
|
4282
4282
|
const n = e.id !== this.space.id;
|
|
4283
4283
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4284
|
-
const o =
|
|
4284
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4285
4285
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4286
4286
|
}
|
|
4287
4287
|
},
|
|
@@ -4465,7 +4465,7 @@ function ps(t) {
|
|
|
4465
4465
|
const e = t.getInput("TABLE").connection;
|
|
4466
4466
|
if (e.targetBlock())
|
|
4467
4467
|
return;
|
|
4468
|
-
const n = Q()?.[0], o =
|
|
4468
|
+
const n = Q()?.[0], o = $(n?.id ?? "")?.[0], i = {
|
|
4469
4469
|
type: "select_table_v1",
|
|
4470
4470
|
extraState: {
|
|
4471
4471
|
space: {
|
|
@@ -4484,7 +4484,7 @@ function ds(t) {
|
|
|
4484
4484
|
const e = t.getInput("CONDITION").connection;
|
|
4485
4485
|
if (e.targetBlock())
|
|
4486
4486
|
return;
|
|
4487
|
-
const n = Q()?.[0], o =
|
|
4487
|
+
const n = Q()?.[0], o = $(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4488
4488
|
type: "cond_atomic_v1",
|
|
4489
4489
|
extraState: {
|
|
4490
4490
|
space: {
|
|
@@ -4596,7 +4596,7 @@ function ms(t) {
|
|
|
4596
4596
|
let n, o;
|
|
4597
4597
|
const i = Q()?.[0];
|
|
4598
4598
|
if (i) {
|
|
4599
|
-
const u =
|
|
4599
|
+
const u = $(i.id)?.[0];
|
|
4600
4600
|
if (u) {
|
|
4601
4601
|
n = {
|
|
4602
4602
|
space: {
|
|
@@ -4847,7 +4847,7 @@ const ys = {
|
|
|
4847
4847
|
this.space.id = t.id, this.space.name = t.name;
|
|
4848
4848
|
const e = this.getField("SPACE");
|
|
4849
4849
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4850
|
-
const n =
|
|
4850
|
+
const n = $(this.space.id)?.[0];
|
|
4851
4851
|
if (!n)
|
|
4852
4852
|
return;
|
|
4853
4853
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4908,7 +4908,7 @@ const ys = {
|
|
|
4908
4908
|
}
|
|
4909
4909
|
const n = e.id !== this.space.id;
|
|
4910
4910
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4911
|
-
const o =
|
|
4911
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4912
4912
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4913
4913
|
}
|
|
4914
4914
|
},
|
|
@@ -5062,7 +5062,7 @@ const vs = {
|
|
|
5062
5062
|
this.space.id = t.id, this.space.name = t.name;
|
|
5063
5063
|
const e = this.getField("SPACE");
|
|
5064
5064
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
5065
|
-
const n =
|
|
5065
|
+
const n = $(this.space.id)?.[0];
|
|
5066
5066
|
if (!n)
|
|
5067
5067
|
return;
|
|
5068
5068
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -5102,7 +5102,7 @@ const vs = {
|
|
|
5102
5102
|
}
|
|
5103
5103
|
let n = !1;
|
|
5104
5104
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !j(this.space.id, this.table.id)) {
|
|
5105
|
-
const i =
|
|
5105
|
+
const i = $(this.space.id)?.[0];
|
|
5106
5106
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5107
5107
|
}
|
|
5108
5108
|
},
|
|
@@ -5243,7 +5243,7 @@ const Ls = {
|
|
|
5243
5243
|
this.space.id = t.id, this.space.name = t.name;
|
|
5244
5244
|
const e = this.getField("SPACE");
|
|
5245
5245
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
5246
|
-
const n =
|
|
5246
|
+
const n = $(this.space.id)?.[0];
|
|
5247
5247
|
if (!n)
|
|
5248
5248
|
return;
|
|
5249
5249
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5304,7 +5304,7 @@ const Ls = {
|
|
|
5304
5304
|
}
|
|
5305
5305
|
const n = e.id !== this.space.id;
|
|
5306
5306
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
5307
|
-
const o =
|
|
5307
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5308
5308
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5309
5309
|
}
|
|
5310
5310
|
},
|
|
@@ -5475,7 +5475,7 @@ function Ss(t) {
|
|
|
5475
5475
|
let n, o;
|
|
5476
5476
|
const i = Q()?.[0];
|
|
5477
5477
|
if (i) {
|
|
5478
|
-
const u =
|
|
5478
|
+
const u = $(i.id)?.[0];
|
|
5479
5479
|
if (u) {
|
|
5480
5480
|
n = {
|
|
5481
5481
|
space: {
|
|
@@ -5718,7 +5718,7 @@ const Sn = C.xml, Us = {
|
|
|
5718
5718
|
g.json_map_v1 = Us;
|
|
5719
5719
|
const Vs = {
|
|
5720
5720
|
init: function() {
|
|
5721
|
-
this.appendDummyInput().appendField(new
|
|
5721
|
+
this.appendDummyInput().appendField(new $e(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5722
5722
|
}
|
|
5723
5723
|
};
|
|
5724
5724
|
g.json_number_v1 = Vs;
|
|
@@ -5746,7 +5746,7 @@ const Ks = {
|
|
|
5746
5746
|
}
|
|
5747
5747
|
};
|
|
5748
5748
|
g.list_create_item_v1 = Ks;
|
|
5749
|
-
const
|
|
5749
|
+
const $s = {
|
|
5750
5750
|
init: function() {
|
|
5751
5751
|
this.itemCount_ = 0, this.setMutator(
|
|
5752
5752
|
new mt.MutatorIcon(
|
|
@@ -5828,7 +5828,7 @@ const Hs = {
|
|
|
5828
5828
|
this.removeInput("ADD" + t);
|
|
5829
5829
|
}
|
|
5830
5830
|
};
|
|
5831
|
-
g.list_create_v1 =
|
|
5831
|
+
g.list_create_v1 = $s;
|
|
5832
5832
|
s.forBlock.list_create_v1 = function(t) {
|
|
5833
5833
|
const e = t, n = new Array(e.itemCount_);
|
|
5834
5834
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -6044,7 +6044,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
6044
6044
|
return `${e}[${n}] = ${o};
|
|
6045
6045
|
`;
|
|
6046
6046
|
};
|
|
6047
|
-
const
|
|
6047
|
+
const Hs = {
|
|
6048
6048
|
// logic_compare
|
|
6049
6049
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6050
6050
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6058,7 +6058,7 @@ const $s = {
|
|
|
6058
6058
|
};
|
|
6059
6059
|
B.register(
|
|
6060
6060
|
"logic_op_tooltip_v1",
|
|
6061
|
-
B.buildTooltipForDropdown("OP",
|
|
6061
|
+
B.buildTooltipForDropdown("OP", Hs)
|
|
6062
6062
|
);
|
|
6063
6063
|
m([
|
|
6064
6064
|
{
|
|
@@ -7816,7 +7816,7 @@ const Bn = C.xml, na = {
|
|
|
7816
7816
|
g.procedure_def_container_v1 = na;
|
|
7817
7817
|
const oa = {
|
|
7818
7818
|
init: function() {
|
|
7819
|
-
const t = new dt(
|
|
7819
|
+
const t = new dt(He.DEFAULT_ARG);
|
|
7820
7820
|
t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7821
7821
|
},
|
|
7822
7822
|
validator_: function(t) {
|
|
@@ -7841,9 +7841,9 @@ const ia = {
|
|
|
7841
7841
|
init: function() {
|
|
7842
7842
|
this.withReturn = !1, this.args = [];
|
|
7843
7843
|
const t = new dt(
|
|
7844
|
-
|
|
7844
|
+
He.findLegalName("", this)
|
|
7845
7845
|
);
|
|
7846
|
-
t.setValidator(
|
|
7846
|
+
t.setValidator(He.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7847
7847
|
new mt.MutatorIcon(
|
|
7848
7848
|
["procedure_def_item_v1"],
|
|
7849
7849
|
this
|
|
@@ -9451,8 +9451,8 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9451
9451
|
onMouseover: f[3] || (f[3] = (P) => u.value = !0)
|
|
9452
9452
|
}, [
|
|
9453
9453
|
w("div", Va, [
|
|
9454
|
-
w("span", xa,
|
|
9455
|
-
a.desc ? (S(), J("span", Ya,
|
|
9454
|
+
w("span", xa, $t(a.title), 1),
|
|
9455
|
+
a.desc ? (S(), J("span", Ya, $t(a.desc), 1)) : ct("", !0)
|
|
9456
9456
|
]),
|
|
9457
9457
|
L(p),
|
|
9458
9458
|
L(E, {
|
|
@@ -9561,7 +9561,7 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9561
9561
|
onStart: l
|
|
9562
9562
|
}, {
|
|
9563
9563
|
default: nt(() => [
|
|
9564
|
-
(S(!0), J(
|
|
9564
|
+
(S(!0), J(Hn, null, ti(a.value, (A) => (S(), et(Fa, {
|
|
9565
9565
|
id: A.id,
|
|
9566
9566
|
key: A.id,
|
|
9567
9567
|
desc: A.desc,
|
|
@@ -9571,14 +9571,14 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9571
9571
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9572
9572
|
]),
|
|
9573
9573
|
_: 1
|
|
9574
|
-
}, 8, ["modelValue"])) : (S(), J("span", wa,
|
|
9574
|
+
}, 8, ["modelValue"])) : (S(), J("span", wa, $t(R(n)("x-block-lib.noOption")), 1));
|
|
9575
9575
|
}
|
|
9576
|
-
}),
|
|
9576
|
+
}), $a = (t, e) => {
|
|
9577
9577
|
const n = t.__vccOpts || t;
|
|
9578
9578
|
for (const [o, i] of e)
|
|
9579
9579
|
n[o] = i;
|
|
9580
9580
|
return n;
|
|
9581
|
-
},
|
|
9581
|
+
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-6cb62cd6"]]), Ga = /* @__PURE__ */ st({
|
|
9582
9582
|
__name: "index",
|
|
9583
9583
|
props: {
|
|
9584
9584
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9637,22 +9637,22 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9637
9637
|
t.type === "list" ? d.value?.update() : t.type === "tree" && f.value?.update();
|
|
9638
9638
|
} }), (E, A) => {
|
|
9639
9639
|
const P = D("v-sheet"), U = D("v-btn"), gt = D("v-spacer"), z = D("v-dialog"), vt = D("v-tooltip");
|
|
9640
|
-
return S(), J(
|
|
9640
|
+
return S(), J(Hn, null, [
|
|
9641
9641
|
L(z, {
|
|
9642
9642
|
modelValue: R(_),
|
|
9643
|
-
"onUpdate:modelValue": A[5] || (A[5] = (
|
|
9643
|
+
"onUpdate:modelValue": A[5] || (A[5] = (H) => ne(_) ? _.value = H : null),
|
|
9644
9644
|
eager: "",
|
|
9645
9645
|
fullscreen: "",
|
|
9646
9646
|
"no-click-animation": "",
|
|
9647
9647
|
persistent: "",
|
|
9648
9648
|
transition: "scroll-x-reverse-transition",
|
|
9649
|
-
onKeydown: A[6] || (A[6] = Gn(Ft((
|
|
9649
|
+
onKeydown: A[6] || (A[6] = Gn(Ft((H) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9650
9650
|
}, {
|
|
9651
9651
|
default: nt(() => [
|
|
9652
9652
|
w("div", {
|
|
9653
9653
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9654
|
-
onClick: A[3] || (A[3] = Ft((
|
|
9655
|
-
onContextmenu: A[4] || (A[4] = Ft((
|
|
9654
|
+
onClick: A[3] || (A[3] = Ft((H) => _.value = !1, ["self"])),
|
|
9655
|
+
onContextmenu: A[4] || (A[4] = Ft((H) => _.value = !1, ["self", "prevent"]))
|
|
9656
9656
|
}, [
|
|
9657
9657
|
w("div", {
|
|
9658
9658
|
class: "elevation-2",
|
|
@@ -9673,9 +9673,9 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9673
9673
|
density: "comfortable",
|
|
9674
9674
|
icon: "mdi-close",
|
|
9675
9675
|
variant: "text",
|
|
9676
|
-
onClick: A[0] || (A[0] = (
|
|
9676
|
+
onClick: A[0] || (A[0] = (H) => _.value = !1)
|
|
9677
9677
|
}),
|
|
9678
|
-
w("span", Wa,
|
|
9678
|
+
w("span", Wa, $t(R(n)("x-block-lib.navigator")), 1),
|
|
9679
9679
|
L(gt)
|
|
9680
9680
|
]),
|
|
9681
9681
|
_: 1
|
|
@@ -9684,19 +9684,19 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9684
9684
|
class: "overflow-y-auto",
|
|
9685
9685
|
style: G(u.value)
|
|
9686
9686
|
}, [
|
|
9687
|
-
t.type === "list" ? (S(), et(
|
|
9687
|
+
t.type === "list" ? (S(), et(Ha, {
|
|
9688
9688
|
key: 0,
|
|
9689
9689
|
ref_key: "blockList",
|
|
9690
9690
|
ref: d,
|
|
9691
9691
|
modelValue: R(_),
|
|
9692
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
9692
|
+
"onUpdate:modelValue": A[1] || (A[1] = (H) => ne(_) ? _.value = H : null),
|
|
9693
9693
|
lock: t.lock
|
|
9694
9694
|
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), et(Ga, {
|
|
9695
9695
|
key: 1,
|
|
9696
9696
|
ref_key: "blockTree",
|
|
9697
9697
|
ref: f,
|
|
9698
9698
|
modelValue: R(_),
|
|
9699
|
-
"onUpdate:modelValue": A[2] || (A[2] = (
|
|
9699
|
+
"onUpdate:modelValue": A[2] || (A[2] = (H) => ne(_) ? _.value = H : null)
|
|
9700
9700
|
}, null, 8, ["modelValue"])) : ct("", !0),
|
|
9701
9701
|
w("div", {
|
|
9702
9702
|
style: G(l.value)
|
|
@@ -9710,8 +9710,8 @@ const Ma = /* @__PURE__ */ st({
|
|
|
9710
9710
|
L(vt, {
|
|
9711
9711
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9712
9712
|
}, {
|
|
9713
|
-
activator: nt(({ props:
|
|
9714
|
-
L(U, an(
|
|
9713
|
+
activator: nt(({ props: H }) => [
|
|
9714
|
+
L(U, an(H, {
|
|
9715
9715
|
density: "comfortable",
|
|
9716
9716
|
icon: "mdi-navigation-variant",
|
|
9717
9717
|
variant: "outlined",
|
|
@@ -11049,7 +11049,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ st({
|
|
|
11049
11049
|
top: "0px",
|
|
11050
11050
|
right: "0px",
|
|
11051
11051
|
zIndex: 20
|
|
11052
|
-
})),
|
|
11052
|
+
})), H = F(() => ({
|
|
11053
11053
|
position: "absolute",
|
|
11054
11054
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
11055
11055
|
top: "0px",
|
|
@@ -11203,7 +11203,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ st({
|
|
|
11203
11203
|
}, null, 4)) : ct("", !0),
|
|
11204
11204
|
i.value ? (S(), J("div", {
|
|
11205
11205
|
key: 3,
|
|
11206
|
-
style: G(
|
|
11206
|
+
style: G(H.value)
|
|
11207
11207
|
}, null, 4)) : ct("", !0),
|
|
11208
11208
|
w("div", {
|
|
11209
11209
|
ref_key: "parentContainer",
|
|
@@ -11224,7 +11224,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ st({
|
|
|
11224
11224
|
},
|
|
11225
11225
|
setup(t) {
|
|
11226
11226
|
const e = t;
|
|
11227
|
-
|
|
11227
|
+
$o.registerLanguage("javascript", Ho);
|
|
11228
11228
|
const n = Go.component, { backgroundColor2: o } = jt();
|
|
11229
11229
|
return (i, a) => {
|
|
11230
11230
|
const c = D("v-sheet");
|
|
@@ -11290,7 +11290,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ st({
|
|
|
11290
11290
|
variant: "text",
|
|
11291
11291
|
onClick: d[0] || (d[0] = (P) => l.value = !1)
|
|
11292
11292
|
}),
|
|
11293
|
-
w("span", Lc,
|
|
11293
|
+
w("span", Lc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11294
11294
|
L(E)
|
|
11295
11295
|
]),
|
|
11296
11296
|
_: 1
|
|
@@ -58,6 +58,7 @@ const _ = {
|
|
|
58
58
|
CATEGORY_TIME: "时间",
|
|
59
59
|
CATEGORY_VARIABLE: "变量",
|
|
60
60
|
// label
|
|
61
|
+
LABEL_ARGUMENT: "参数",
|
|
61
62
|
LABEL_BOOLEAN: "布尔",
|
|
62
63
|
LABEL_BRANCH: "分支",
|
|
63
64
|
LABEL_CONDITION: "条件",
|
|
@@ -512,7 +513,7 @@ const _ = {
|
|
|
512
513
|
TIME_DO: "执行",
|
|
513
514
|
TIME_IMMEDIATE: "立即",
|
|
514
515
|
TIME_INTERVAL_MS: "间隔(ms)",
|
|
515
|
-
TIME_LOOP: "
|
|
516
|
+
TIME_LOOP: "循环",
|
|
516
517
|
TIME_V1_CREATE_TIMER_TITLE: "创建定时器",
|
|
517
518
|
TIME_V1_DELAY_TITLE: "延迟(ms)%1",
|
|
518
519
|
// variable
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.26",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vue-router": "^4.6.3",
|
|
39
39
|
"vuetify": "^3.10.7",
|
|
40
40
|
"x-essential-lib": "^0.9.2",
|
|
41
|
-
"x-runtime-lib": "^0.8.
|
|
41
|
+
"x-runtime-lib": "^0.8.48",
|
|
42
42
|
"x-state-lib": "^0.3.23"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|