x-block-lib 0.6.56 → 0.6.58
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.
|
@@ -30,8 +30,6 @@ declare const _default: {
|
|
|
30
30
|
TODAY: string;
|
|
31
31
|
UNDO: string;
|
|
32
32
|
UNNAMED_KEY: string;
|
|
33
|
-
VARIABLE_GET_CREATE_SET: string;
|
|
34
|
-
VARIABLE_SET_CREATE_GET: string;
|
|
35
33
|
CROSS_TAB_COPY: string;
|
|
36
34
|
CROSS_TAB_PASTE: string;
|
|
37
35
|
NO_OPTION: string;
|
|
@@ -490,10 +488,10 @@ declare const _default: {
|
|
|
490
488
|
UI_V1_TRIGGER_COMP_EVENT_TITLE: string;
|
|
491
489
|
UI_V1_TRIGGER_COMP_EVENT_TOOLTIP: string;
|
|
492
490
|
UI_V1_TRIGGER_COMP_EVENT_HELPURL: string;
|
|
493
|
-
|
|
491
|
+
VARIABLE_GET_CREATE_SET: string;
|
|
492
|
+
VARIABLE_SET_CREATE_GET: string;
|
|
494
493
|
VARIABLE_V1_GET_TOOLTIP: string;
|
|
495
494
|
VARIABLE_V1_GET_HELPURL: string;
|
|
496
|
-
VARIABLE_V1_SET_CREATE_GET: string;
|
|
497
495
|
VARIABLE_V1_SET_TITLE: string;
|
|
498
496
|
VARIABLE_V1_SET_TOOLTIP: string;
|
|
499
497
|
VARIABLE_V1_SET_HELPURL: string;
|
|
@@ -30,8 +30,6 @@ declare const _default: {
|
|
|
30
30
|
TODAY: string;
|
|
31
31
|
UNDO: string;
|
|
32
32
|
UNNAMED_KEY: string;
|
|
33
|
-
VARIABLE_GET_CREATE_SET: string;
|
|
34
|
-
VARIABLE_SET_CREATE_GET: string;
|
|
35
33
|
CROSS_TAB_COPY: string;
|
|
36
34
|
CROSS_TAB_PASTE: string;
|
|
37
35
|
NO_OPTION: string;
|
|
@@ -490,10 +488,10 @@ declare const _default: {
|
|
|
490
488
|
UI_V1_TRIGGER_COMP_EVENT_TITLE: string;
|
|
491
489
|
UI_V1_TRIGGER_COMP_EVENT_TOOLTIP: string;
|
|
492
490
|
UI_V1_TRIGGER_COMP_EVENT_HELPURL: string;
|
|
493
|
-
|
|
491
|
+
VARIABLE_GET_CREATE_SET: string;
|
|
492
|
+
VARIABLE_SET_CREATE_GET: string;
|
|
494
493
|
VARIABLE_V1_GET_TOOLTIP: string;
|
|
495
494
|
VARIABLE_V1_GET_HELPURL: string;
|
|
496
|
-
VARIABLE_V1_SET_CREATE_GET: string;
|
|
497
495
|
VARIABLE_V1_SET_TITLE: string;
|
|
498
496
|
VARIABLE_V1_SET_TOOLTIP: string;
|
|
499
497
|
VARIABLE_V1_SET_HELPURL: string;
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
var so = Object.defineProperty;
|
|
11
11
|
var ao = (t, e, n) => e in t ? so(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
12
12
|
var on = (t, e, n) => ao(t, typeof e != "symbol" ? e + "" : e, n);
|
|
13
|
-
import { provide as co, inject as lo, defineComponent as se, resolveComponent as P, createBlock as ee, openBlock as U, unref as L, withCtx as te, createVNode as R, mergeProps as jt, useModel as xe, ref as
|
|
14
|
-
import { d as f, j as a, O as l, f as fo, F as In, M as p, E as I, r as an, u as g, s as mo, X as me, B as m, i as M, a as y, c as Ve, b as xt, e as G, g as Te, h as pe, p as Pe, k as Z, l as cn, m as D, C as On, N as ne, n as To, P as Yt, V as
|
|
13
|
+
import { provide as co, inject as lo, defineComponent as se, resolveComponent as P, createBlock as ee, openBlock as U, unref as L, withCtx as te, createVNode as R, mergeProps as jt, useModel as xe, ref as Oe, computed as j, resolveDirective as uo, withDirectives as ro, createElementBlock as Q, normalizeStyle as q, createElementVNode as X, toDisplayString as rt, withModifiers as Ue, mergeModels as Vt, Fragment as En, renderList as _o, useId as Pt, onUnmounted as gn, useTemplateRef as Me, withKeys as An, isRef as Qe, createCommentVNode as fe, onMounted as sn, nextTick as po, onBeforeUnmount as ho, watch as be } from "vue";
|
|
14
|
+
import { d as f, j as a, O as l, f as fo, F as In, M as p, E as I, r as an, u as g, s as mo, X as me, B as m, i as M, a as y, c as Ve, b as xt, e as G, g as Te, h as pe, p as Pe, k as Z, l as cn, m as D, C as On, N as ne, n as To, P as Yt, V as Ie, o as He, q as Cn, t as Eo, S as K, v as Ze, w as De, x as Ae, y as Je, z as vt, A as Be, D as ln, G as Nt, H as go, T as _t, I as kn, J as Ao, K as Io, L as Oo, Q as Co, R as ko, U as yn, W as vn, Y as yo, Z as vo, _ as No, $ as Lo, a0 as So, a1 as bo, a2 as Bo, a3 as Ro, a4 as Do } from "./vendor.bxn11l2w.js";
|
|
15
15
|
import { openConfirmDlg as Uo, openPromptDlg as Mo, messageWarning as Nn, useColor as pt, useSystem as Ln, useViewStack as Xt } from "x-essential-lib";
|
|
16
16
|
import { elements as Y, pkgs as Ye, getPropTag as ht, parsePixelStr as Vo, parsePercentStr as Po } from "x-runtime-lib";
|
|
17
17
|
import { globalState as T } from "x-state-lib";
|
|
@@ -131,7 +131,7 @@ an.register(
|
|
|
131
131
|
"state_change",
|
|
132
132
|
Sn
|
|
133
133
|
);
|
|
134
|
-
const
|
|
134
|
+
const Ce = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", tt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
135
135
|
function dt(t) {
|
|
136
136
|
const e = t.lastIndexOf("V");
|
|
137
137
|
if (e <= 0 || e >= t.length - 1)
|
|
@@ -139,7 +139,7 @@ function dt(t) {
|
|
|
139
139
|
const n = mo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
140
140
|
return `${n}_${o}`;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function ye(t) {
|
|
143
143
|
const e = t.lastIndexOf("V");
|
|
144
144
|
if (e <= 0 || e >= t.length - 1)
|
|
145
145
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -173,7 +173,7 @@ function _e(t, e) {
|
|
|
173
173
|
const n = `<block type="text_v1"><field name="TEXT">${e}</field></block>`, o = g.xml.textToDom(n);
|
|
174
174
|
return me.domToBlock(o, t);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function ve(t, e) {
|
|
177
177
|
const n = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`, o = g.xml.textToDom(n);
|
|
178
178
|
return me.domToBlock(o, t);
|
|
179
179
|
}
|
|
@@ -195,7 +195,7 @@ function Rn(t) {
|
|
|
195
195
|
}
|
|
196
196
|
function un(t, e) {
|
|
197
197
|
let n = null;
|
|
198
|
-
return e === "string" ? n = _e(t, "") : e === "integer" || e === "float" ? n =
|
|
198
|
+
return e === "string" ? n = _e(t, "") : e === "integer" || e === "float" ? n = ve(t, 0) : e === "boolean" ? n = ft(t, !1) : (e === "enum" || e === "dateTime") && (n = _e(t, "")), n;
|
|
199
199
|
}
|
|
200
200
|
function Jt(t, e, n, o) {
|
|
201
201
|
const i = `
|
|
@@ -246,7 +246,7 @@ function he(t) {
|
|
|
246
246
|
if (e)
|
|
247
247
|
return e;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Ne(t) {
|
|
250
250
|
const { i18n: e } = T.base, n = [];
|
|
251
251
|
return We(t).forEach(({ key: i, name: s }) => {
|
|
252
252
|
n.push([e.global.t(s), i]);
|
|
@@ -312,7 +312,7 @@ function Dn(t, e) {
|
|
|
312
312
|
}), o.push([u, s]);
|
|
313
313
|
}), N(o);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Se(t) {
|
|
316
316
|
const { nodes: e } = T.app.activeObject, n = [];
|
|
317
317
|
for (const o in e) {
|
|
318
318
|
const i = e[o], s = Y[i.key];
|
|
@@ -334,7 +334,7 @@ function $(t) {
|
|
|
334
334
|
}
|
|
335
335
|
function je(t) {
|
|
336
336
|
const { i18n: e } = T.base, n = [];
|
|
337
|
-
return
|
|
337
|
+
return Se(t).forEach(({ id: i, key: s, alias: c }) => {
|
|
338
338
|
const u = Y[s];
|
|
339
339
|
if (!u) {
|
|
340
340
|
console.assert(!1, "invalid element", s);
|
|
@@ -439,7 +439,7 @@ const Ho = {
|
|
|
439
439
|
var i, s;
|
|
440
440
|
if (this.node.id)
|
|
441
441
|
return;
|
|
442
|
-
const t = (i =
|
|
442
|
+
const t = (i = Se()) == null ? void 0 : i[0];
|
|
443
443
|
if (!t)
|
|
444
444
|
return;
|
|
445
445
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -471,7 +471,7 @@ const Ho = {
|
|
|
471
471
|
return $o(this.node.id);
|
|
472
472
|
},
|
|
473
473
|
genElementOpts_: function() {
|
|
474
|
-
return
|
|
474
|
+
return Ne();
|
|
475
475
|
},
|
|
476
476
|
onchange: function(t) {
|
|
477
477
|
if (t.type === S.STATE_CHANGE)
|
|
@@ -648,7 +648,7 @@ const Go = {
|
|
|
648
648
|
}, 0);
|
|
649
649
|
},
|
|
650
650
|
genElementOpts_: function() {
|
|
651
|
-
return
|
|
651
|
+
return Ne("method");
|
|
652
652
|
},
|
|
653
653
|
genMethodOpts_: function() {
|
|
654
654
|
return Fo(this.element.key);
|
|
@@ -692,7 +692,7 @@ const Go = {
|
|
|
692
692
|
console.assert(!1);
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
|
-
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new E(() =>
|
|
695
|
+
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new E(() => Ne()), "EXTRA1");
|
|
696
696
|
},
|
|
697
697
|
updateShape2_: function() {
|
|
698
698
|
var t, e;
|
|
@@ -912,10 +912,12 @@ const Jo = {
|
|
|
912
912
|
m.comp_method_impl_v1 = Jo;
|
|
913
913
|
a.forBlock.comp_method_impl_v1 = function(t) {
|
|
914
914
|
const e = t;
|
|
915
|
-
return `{
|
|
915
|
+
return `{
|
|
916
|
+
${a.statementToCode(e, "HANDLE")}}
|
|
917
|
+
`;
|
|
916
918
|
};
|
|
917
919
|
const qo = (t, e) => {
|
|
918
|
-
const n = dt(t), o =
|
|
920
|
+
const n = dt(t), o = ye(t);
|
|
919
921
|
m[n] = {
|
|
920
922
|
init: function() {
|
|
921
923
|
this.appendDummyInput().appendField(
|
|
@@ -940,7 +942,7 @@ for (const t in Ye) {
|
|
|
940
942
|
qo(n, e.items[n]);
|
|
941
943
|
}
|
|
942
944
|
const zo = (t, e) => {
|
|
943
|
-
const n = dt(t), o =
|
|
945
|
+
const n = dt(t), o = ye(t);
|
|
944
946
|
m[n] = {
|
|
945
947
|
init: function() {
|
|
946
948
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -1048,7 +1050,7 @@ const Qo = {
|
|
|
1048
1050
|
var n;
|
|
1049
1051
|
if (this.node.id)
|
|
1050
1052
|
return;
|
|
1051
|
-
const t = (n =
|
|
1053
|
+
const t = (n = Se()) == null ? void 0 : n[0];
|
|
1052
1054
|
if (!t)
|
|
1053
1055
|
return;
|
|
1054
1056
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1122,7 +1124,7 @@ const Zo = {
|
|
|
1122
1124
|
var i, s;
|
|
1123
1125
|
if (this.node.id)
|
|
1124
1126
|
return;
|
|
1125
|
-
const t = (i =
|
|
1127
|
+
const t = (i = Se()) == null ? void 0 : i[0];
|
|
1126
1128
|
if (!t)
|
|
1127
1129
|
return;
|
|
1128
1130
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1248,7 +1250,7 @@ const ei = {
|
|
|
1248
1250
|
}, 0);
|
|
1249
1251
|
},
|
|
1250
1252
|
genElementOpts_: function() {
|
|
1251
|
-
return
|
|
1253
|
+
return Ne();
|
|
1252
1254
|
},
|
|
1253
1255
|
genPropOpts_: function() {
|
|
1254
1256
|
return Dn(this.element.key);
|
|
@@ -1553,7 +1555,7 @@ const li = {
|
|
|
1553
1555
|
var i, s;
|
|
1554
1556
|
if (this.node.id)
|
|
1555
1557
|
return;
|
|
1556
|
-
const t = (i =
|
|
1558
|
+
const t = (i = Se("event")) == null ? void 0 : i[0];
|
|
1557
1559
|
if (!t)
|
|
1558
1560
|
return;
|
|
1559
1561
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1709,7 +1711,7 @@ const ui = {
|
|
|
1709
1711
|
}, 0);
|
|
1710
1712
|
},
|
|
1711
1713
|
genElementOpts_: function() {
|
|
1712
|
-
return
|
|
1714
|
+
return Ne("event");
|
|
1713
1715
|
},
|
|
1714
1716
|
genEventOpts_: function() {
|
|
1715
1717
|
return wo(this.element.key);
|
|
@@ -2124,7 +2126,7 @@ const di = {
|
|
|
2124
2126
|
var i, s;
|
|
2125
2127
|
if (this.node.id)
|
|
2126
2128
|
return;
|
|
2127
|
-
const t = (i =
|
|
2129
|
+
const t = (i = Se()) == null ? void 0 : i[0];
|
|
2128
2130
|
if (!t)
|
|
2129
2131
|
return;
|
|
2130
2132
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -2196,14 +2198,14 @@ const di = {
|
|
|
2196
2198
|
n && n.dispose();
|
|
2197
2199
|
let o = null;
|
|
2198
2200
|
const i = t.raw;
|
|
2199
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = _e(this.workspace, i.default) : i.ui === "numInput" ? o =
|
|
2201
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = _e(this.workspace, i.default) : i.ui === "numInput" ? o = ve(this.workspace, i.default) : i.ui === "switch" ? o = ft(this.workspace, i.default) : i.ui === "select" ? o = bn(this.workspace, i.items) : i.ui === "multiTypes" ? o = Bn(this.workspace, i.types) : i.ui === "compSelect" && (o = Rn(this.workspace)), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2200
2202
|
},
|
|
2201
2203
|
updateCheck_: function() {
|
|
2202
2204
|
const t = le(this.node.id, this.prop.keys);
|
|
2203
2205
|
if (!t)
|
|
2204
2206
|
return;
|
|
2205
2207
|
const e = this.getInput("VALUE"), n = t.raw;
|
|
2206
|
-
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Colour") : n.ui === "select" ? e.setCheck(
|
|
2208
|
+
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Colour") : n.ui === "select" ? e.setCheck(ye(n.items)) : n.ui === "multiTypes" ? e.setCheck(ye(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2207
2209
|
},
|
|
2208
2210
|
checkWarning_: function() {
|
|
2209
2211
|
const t = $(this.node.id);
|
|
@@ -2270,7 +2272,7 @@ const fi = {
|
|
|
2270
2272
|
}, 0);
|
|
2271
2273
|
},
|
|
2272
2274
|
genElementOpts_: function() {
|
|
2273
|
-
return
|
|
2275
|
+
return Ne();
|
|
2274
2276
|
},
|
|
2275
2277
|
genPropOpts_: function() {
|
|
2276
2278
|
return Dn(this.element.key);
|
|
@@ -2316,14 +2318,14 @@ const fi = {
|
|
|
2316
2318
|
n && n.dispose();
|
|
2317
2319
|
let o = null;
|
|
2318
2320
|
const i = t.raw;
|
|
2319
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = _e(this.workspace, i.default) : i.ui === "numInput" ? o =
|
|
2321
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = _e(this.workspace, i.default) : i.ui === "numInput" ? o = ve(this.workspace, i.default) : i.ui === "switch" ? o = ft(this.workspace, i.default) : i.ui === "select" ? o = bn(this.workspace, i.items) : i.ui === "multiTypes" ? o = Bn(this.workspace, i.types) : i.ui === "compSelect" && (o = Rn(this.workspace)), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2320
2322
|
},
|
|
2321
2323
|
updateCheck_: function() {
|
|
2322
2324
|
const t = ce(this.element.key, this.prop.keys);
|
|
2323
2325
|
if (!t)
|
|
2324
2326
|
return;
|
|
2325
2327
|
const e = this.getInput("VALUE"), n = t.raw;
|
|
2326
|
-
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Colour") : n.ui === "select" ? e.setCheck(
|
|
2328
|
+
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Colour") : n.ui === "select" ? e.setCheck(ye(n.items)) : n.ui === "multiTypes" ? e.setCheck(ye(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2327
2329
|
},
|
|
2328
2330
|
checkWarning_: function() {
|
|
2329
2331
|
const t = he(this.element.key);
|
|
@@ -2711,7 +2713,7 @@ m.parameter_v1 = Ai;
|
|
|
2711
2713
|
a.forBlock.parameter_v1 = function(t) {
|
|
2712
2714
|
return [t.key, l.ATOMIC];
|
|
2713
2715
|
};
|
|
2714
|
-
function
|
|
2716
|
+
function Le(t) {
|
|
2715
2717
|
const e = [];
|
|
2716
2718
|
return T.compute.spaces.forEach((n) => {
|
|
2717
2719
|
n.funcs.length > 0 && e.push(n);
|
|
@@ -2722,7 +2724,7 @@ function ot(t) {
|
|
|
2722
2724
|
}
|
|
2723
2725
|
function wn(t) {
|
|
2724
2726
|
const e = [];
|
|
2725
|
-
return
|
|
2727
|
+
return Le().forEach(({ id: o, name: i }) => {
|
|
2726
2728
|
e.push([i, o]);
|
|
2727
2729
|
}), N(e);
|
|
2728
2730
|
}
|
|
@@ -2730,7 +2732,7 @@ function $e(t) {
|
|
|
2730
2732
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
2731
2733
|
return e ? e.funcs : [];
|
|
2732
2734
|
}
|
|
2733
|
-
function
|
|
2735
|
+
function ke(t, e) {
|
|
2734
2736
|
const n = T.compute.spaces.find((o) => o.id === t);
|
|
2735
2737
|
if (n)
|
|
2736
2738
|
return n.funcs.find((o) => o.id === e);
|
|
@@ -2770,7 +2772,7 @@ const Oi = {
|
|
|
2770
2772
|
var i, s;
|
|
2771
2773
|
if (this.space.id)
|
|
2772
2774
|
return;
|
|
2773
|
-
const t = (i =
|
|
2775
|
+
const t = (i = Le()) == null ? void 0 : i[0];
|
|
2774
2776
|
if (!t)
|
|
2775
2777
|
return;
|
|
2776
2778
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -2821,13 +2823,13 @@ const Oi = {
|
|
|
2821
2823
|
return;
|
|
2822
2824
|
}
|
|
2823
2825
|
let n = !1;
|
|
2824
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
2826
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !ke(this.space.id, this.func.id)) {
|
|
2825
2827
|
const s = (i = $e(this.space.id)) == null ? void 0 : i[0];
|
|
2826
2828
|
this.setFieldValue((s == null ? void 0 : s.id) ?? "", "FUNC");
|
|
2827
2829
|
}
|
|
2828
2830
|
},
|
|
2829
2831
|
onFuncChange_: function(t) {
|
|
2830
|
-
const e =
|
|
2832
|
+
const e = ke(this.space.id, t);
|
|
2831
2833
|
if (!e) {
|
|
2832
2834
|
console.assert(!1);
|
|
2833
2835
|
return;
|
|
@@ -2897,7 +2899,7 @@ const Oi = {
|
|
|
2897
2899
|
return;
|
|
2898
2900
|
}
|
|
2899
2901
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
2900
|
-
const e =
|
|
2902
|
+
const e = ke(this.space.id, this.func.id);
|
|
2901
2903
|
if (!e) {
|
|
2902
2904
|
this.setWarningText(p.WARN_FUNC_NOT_AVAILABLE);
|
|
2903
2905
|
return;
|
|
@@ -2956,7 +2958,7 @@ const Ci = {
|
|
|
2956
2958
|
var i, s;
|
|
2957
2959
|
if (this.space.id)
|
|
2958
2960
|
return;
|
|
2959
|
-
const t = (i =
|
|
2961
|
+
const t = (i = Le()) == null ? void 0 : i[0];
|
|
2960
2962
|
if (!t)
|
|
2961
2963
|
return;
|
|
2962
2964
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -3007,13 +3009,13 @@ const Ci = {
|
|
|
3007
3009
|
return;
|
|
3008
3010
|
}
|
|
3009
3011
|
let n = !1;
|
|
3010
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3012
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !ke(this.space.id, this.func.id)) {
|
|
3011
3013
|
const s = (i = $e(this.space.id)) == null ? void 0 : i[0];
|
|
3012
3014
|
s ? this.setFieldValue(s.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3013
3015
|
}
|
|
3014
3016
|
},
|
|
3015
3017
|
onFuncChange_: function(t) {
|
|
3016
|
-
const e =
|
|
3018
|
+
const e = ke(this.space.id, t);
|
|
3017
3019
|
if (!e) {
|
|
3018
3020
|
console.assert(!1);
|
|
3019
3021
|
return;
|
|
@@ -3083,7 +3085,7 @@ const Ci = {
|
|
|
3083
3085
|
return;
|
|
3084
3086
|
}
|
|
3085
3087
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3086
|
-
const e =
|
|
3088
|
+
const e = ke(this.space.id, this.func.id);
|
|
3087
3089
|
if (!e) {
|
|
3088
3090
|
this.setWarningText(p.WARN_FUNC_NOT_AVAILABLE);
|
|
3089
3091
|
return;
|
|
@@ -3603,7 +3605,7 @@ const Bi = {
|
|
|
3603
3605
|
return;
|
|
3604
3606
|
let o = null;
|
|
3605
3607
|
const { type: i } = this.column;
|
|
3606
|
-
i === "string" ? o = _e(this.workspace, "") : i === "integer" ? o =
|
|
3608
|
+
i === "string" ? o = _e(this.workspace, "") : i === "integer" ? o = ve(this.workspace, 0) : i === "float" ? o = ve(this.workspace, 0) : i === "boolean" ? o = ft(this.workspace, !1) : i === "enum" ? o = _e(this.workspace, "") : i === "dateTime" && (o = _e(this.workspace, "")), o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
3607
3609
|
},
|
|
3608
3610
|
updateCheck_: function() {
|
|
3609
3611
|
const { type: t } = this.column, e = this.getInput("VALUE");
|
|
@@ -4849,7 +4851,7 @@ ${i}}
|
|
|
4849
4851
|
const ns = g.xml, os = {
|
|
4850
4852
|
init: function() {
|
|
4851
4853
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
4852
|
-
new Z(
|
|
4854
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4853
4855
|
this.isInFlyout || this.addEntry_();
|
|
4854
4856
|
})
|
|
4855
4857
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -4868,7 +4870,7 @@ const ns = g.xml, os = {
|
|
|
4868
4870
|
for (let t = 0; t < this.length; t++) {
|
|
4869
4871
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
4870
4872
|
n.appendField(
|
|
4871
|
-
new Z(
|
|
4873
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4872
4874
|
this.isInFlyout || this.addEntry_(n);
|
|
4873
4875
|
})
|
|
4874
4876
|
), n.appendField(new cn(String(t))), n.appendField(
|
|
@@ -4887,7 +4889,7 @@ const ns = g.xml, os = {
|
|
|
4887
4889
|
}
|
|
4888
4890
|
const n = this.appendValueInput("ENTRY" + e);
|
|
4889
4891
|
n.appendField(
|
|
4890
|
-
new Z(
|
|
4892
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4891
4893
|
this.isInFlyout || this.addEntry_(n);
|
|
4892
4894
|
})
|
|
4893
4895
|
), n.appendField(new cn(String(e))), n.appendField(
|
|
@@ -4923,7 +4925,7 @@ m.json_boolean_v1 = is;
|
|
|
4923
4925
|
const fn = g.xml, ss = {
|
|
4924
4926
|
init: function() {
|
|
4925
4927
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
4926
|
-
new Z(
|
|
4928
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4927
4929
|
this.isInFlyout || this.addEntry_();
|
|
4928
4930
|
})
|
|
4929
4931
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -4951,7 +4953,7 @@ const fn = g.xml, ss = {
|
|
|
4951
4953
|
for (let e = 0; e < t.length; e++) {
|
|
4952
4954
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
4953
4955
|
i.appendField(
|
|
4954
|
-
new Z(
|
|
4956
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4955
4957
|
this.isInFlyout || this.addEntry_(i);
|
|
4956
4958
|
})
|
|
4957
4959
|
), i.appendField(new pe(n), "KEY" + e), i.appendField(
|
|
@@ -4968,7 +4970,7 @@ const fn = g.xml, ss = {
|
|
|
4968
4970
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
4969
4971
|
const n = this.appendValueInput("ENTRY" + e);
|
|
4970
4972
|
n.appendField(
|
|
4971
|
-
new Z(
|
|
4973
|
+
new Z(Ce, 20, 20, void 0, () => {
|
|
4972
4974
|
this.isInFlyout || this.addEntry_(n);
|
|
4973
4975
|
})
|
|
4974
4976
|
), n.appendField(new pe("key"), "KEY" + e), n.appendField(
|
|
@@ -8092,7 +8094,7 @@ a.forBlock.delay_v1 = function(t) {
|
|
|
8092
8094
|
const Fs = {
|
|
8093
8095
|
customContextMenu: function(t) {
|
|
8094
8096
|
if (this.isInFlyout) {
|
|
8095
|
-
if (this.type === "
|
|
8097
|
+
if (this.type === "variable_get_v1") {
|
|
8096
8098
|
const e = {
|
|
8097
8099
|
text: p.RENAME_VARIABLE,
|
|
8098
8100
|
enabled: !0,
|
|
@@ -8106,7 +8108,7 @@ const Fs = {
|
|
|
8106
8108
|
}
|
|
8107
8109
|
} else {
|
|
8108
8110
|
let e, n;
|
|
8109
|
-
this.type === "
|
|
8111
|
+
this.type === "variable_get_v1" ? (e = "variable_set_v1", n = p.VARIABLE_GET_CREATE_SET) : this.type === "variable_set_v1" ? (e = "variable_get_v1", n = p.VARIABLE_SET_CREATE_GET) : console.assert(!1);
|
|
8110
8112
|
const o = this.getField("VAR"), i = {
|
|
8111
8113
|
type: e,
|
|
8112
8114
|
fields: { VAR: o.saveState(!0) }
|
|
@@ -8121,12 +8123,12 @@ const Fs = {
|
|
|
8121
8123
|
}, Ks = function(t) {
|
|
8122
8124
|
return function() {
|
|
8123
8125
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8124
|
-
|
|
8126
|
+
Ie.renameVariable(e, o);
|
|
8125
8127
|
};
|
|
8126
8128
|
}, $s = function(t) {
|
|
8127
8129
|
return function() {
|
|
8128
|
-
const
|
|
8129
|
-
|
|
8130
|
+
const n = t.getField("VAR").getVariable();
|
|
8131
|
+
n && Ie.deleteVariable(n.getWorkspace(), n, t);
|
|
8130
8132
|
};
|
|
8131
8133
|
};
|
|
8132
8134
|
D.registerMixin(
|
|
@@ -8309,20 +8311,20 @@ function Gs() {
|
|
|
8309
8311
|
const at = {
|
|
8310
8312
|
name: "UI_CATEGORY",
|
|
8311
8313
|
callback: Gs
|
|
8312
|
-
},
|
|
8314
|
+
}, Re = g.xml;
|
|
8313
8315
|
function Ws() {
|
|
8314
8316
|
const t = [];
|
|
8315
8317
|
{
|
|
8316
|
-
const e =
|
|
8318
|
+
const e = Re.createElement("label");
|
|
8317
8319
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8318
8320
|
}
|
|
8319
8321
|
{
|
|
8320
|
-
const e =
|
|
8322
|
+
const e = Re.createElement("block");
|
|
8321
8323
|
e.setAttribute("type", "procedure_def_v1");
|
|
8322
8324
|
{
|
|
8323
|
-
const n =
|
|
8325
|
+
const n = Re.createElement("field");
|
|
8324
8326
|
n.setAttribute("name", "NAME");
|
|
8325
|
-
const o =
|
|
8327
|
+
const o = Re.createTextNode(
|
|
8326
8328
|
p.PROCEDURE_DEFAULT_NAME
|
|
8327
8329
|
);
|
|
8328
8330
|
n.appendChild(o), e.appendChild(n);
|
|
@@ -8330,7 +8332,7 @@ function Ws() {
|
|
|
8330
8332
|
t.push(e);
|
|
8331
8333
|
}
|
|
8332
8334
|
{
|
|
8333
|
-
const e =
|
|
8335
|
+
const e = Re.createElement("block");
|
|
8334
8336
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8335
8337
|
}
|
|
8336
8338
|
return t;
|
|
@@ -8350,7 +8352,7 @@ function js() {
|
|
|
8350
8352
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
8351
8353
|
"CREATE_VARIABLE",
|
|
8352
8354
|
function(i) {
|
|
8353
|
-
|
|
8355
|
+
Ie.createVariableButtonHandler(
|
|
8354
8356
|
i.getTargetWorkspace()
|
|
8355
8357
|
);
|
|
8356
8358
|
}
|
|
@@ -8359,7 +8361,7 @@ function js() {
|
|
|
8359
8361
|
const n = t.getVariablesOfType("");
|
|
8360
8362
|
if (n.length <= 0)
|
|
8361
8363
|
return e;
|
|
8362
|
-
n.sort(
|
|
8364
|
+
n.sort(Ie.compareByName);
|
|
8363
8365
|
{
|
|
8364
8366
|
const o = ze.createElement("label");
|
|
8365
8367
|
o.setAttribute("text", p.LABEL_CREATED), e.push(o);
|
|
@@ -8367,11 +8369,11 @@ function js() {
|
|
|
8367
8369
|
return n.forEach((o) => {
|
|
8368
8370
|
{
|
|
8369
8371
|
const i = ze.createElement("block");
|
|
8370
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
8372
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Ie.generateVariableFieldDom(o)), e.push(i);
|
|
8371
8373
|
}
|
|
8372
8374
|
{
|
|
8373
8375
|
const i = ze.createElement("block");
|
|
8374
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
8376
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Ie.generateVariableFieldDom(o)), e.push(i);
|
|
8375
8377
|
}
|
|
8376
8378
|
}), e;
|
|
8377
8379
|
}
|
|
@@ -8406,7 +8408,7 @@ function Xs(t) {
|
|
|
8406
8408
|
e.push(n);
|
|
8407
8409
|
}
|
|
8408
8410
|
} else if (t === "func") {
|
|
8409
|
-
if (
|
|
8411
|
+
if (Le().length > 0) {
|
|
8410
8412
|
const n = ge.createElement("block");
|
|
8411
8413
|
n.setAttribute("type", "call_func_internal_v1"), e.push(n);
|
|
8412
8414
|
}
|
|
@@ -8433,7 +8435,7 @@ function Js(t) {
|
|
|
8433
8435
|
const o = ie.createElement("block");
|
|
8434
8436
|
o.setAttribute("type", "procedure_return_v1"), n.push(o);
|
|
8435
8437
|
}
|
|
8436
|
-
if (
|
|
8438
|
+
if (Le().length > 0) {
|
|
8437
8439
|
const o = ie.createElement("block");
|
|
8438
8440
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8439
8441
|
}
|
|
@@ -8457,7 +8459,7 @@ function Js(t) {
|
|
|
8457
8459
|
n.push(o);
|
|
8458
8460
|
}
|
|
8459
8461
|
} else if (t === "flow") {
|
|
8460
|
-
if (
|
|
8462
|
+
if (Le().length > 0) {
|
|
8461
8463
|
const o = ie.createElement("block");
|
|
8462
8464
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8463
8465
|
}
|
|
@@ -8674,7 +8676,7 @@ const Gn = (t, e, n) => {
|
|
|
8674
8676
|
});
|
|
8675
8677
|
};
|
|
8676
8678
|
async function Tn(t) {
|
|
8677
|
-
const e = await Gn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.
|
|
8679
|
+
const e = await Gn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.fj04iwzg.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.os4ap6q2.js") }), `./msg/${t}.ts`, 3);
|
|
8678
8680
|
Eo(e.default);
|
|
8679
8681
|
}
|
|
8680
8682
|
function zt(t) {
|
|
@@ -8718,7 +8720,7 @@ class zs {
|
|
|
8718
8720
|
},
|
|
8719
8721
|
preconditionFn: function() {
|
|
8720
8722
|
const n = Ae();
|
|
8721
|
-
return !n || !Je(n) || !n.isDeletable() || !vt(n) || !n.isMovable() || !
|
|
8723
|
+
return !n || !Je(n) || !n.isDeletable() || !vt(n) || !n.isMovable() || !Be(n) ? "disabled" : "enabled";
|
|
8722
8724
|
},
|
|
8723
8725
|
callback: function(n) {
|
|
8724
8726
|
var o;
|
|
@@ -8775,12 +8777,12 @@ class zs {
|
|
|
8775
8777
|
if (s.options.readOnly || Nt.inProgress())
|
|
8776
8778
|
return !1;
|
|
8777
8779
|
const c = Ae();
|
|
8778
|
-
return !(!c || !Je(c) || !c.isDeletable() || !vt(c) || !c.isMovable() || !
|
|
8780
|
+
return !(!c || !Je(c) || !c.isDeletable() || !vt(c) || !c.isMovable() || !Be(c));
|
|
8779
8781
|
},
|
|
8780
8782
|
callback: function(s, c) {
|
|
8781
8783
|
c.preventDefault();
|
|
8782
8784
|
const u = Ae();
|
|
8783
|
-
if (!u || !
|
|
8785
|
+
if (!u || !Be(u))
|
|
8784
8786
|
return !1;
|
|
8785
8787
|
const r = u.toCopyData();
|
|
8786
8788
|
return r ? (s.hideChaff(), localStorage.setItem("blocklyStash", JSON.stringify(r)), !0) : !1;
|
|
@@ -8805,12 +8807,12 @@ class zs {
|
|
|
8805
8807
|
if (s.options.readOnly || Nt.inProgress())
|
|
8806
8808
|
return !1;
|
|
8807
8809
|
const c = Ae();
|
|
8808
|
-
return !(!c || !Je(c) || !c.isDeletable() || !vt(c) || !c.isMovable() || !
|
|
8810
|
+
return !(!c || !Je(c) || !c.isDeletable() || !vt(c) || !c.isMovable() || !Be(c) || c.workspace.isFlyout);
|
|
8809
8811
|
},
|
|
8810
8812
|
callback: function(s, c) {
|
|
8811
8813
|
c.preventDefault();
|
|
8812
8814
|
const u = Ae();
|
|
8813
|
-
if (!u || !Je(u) || !u.isDeletable() || !
|
|
8815
|
+
if (!u || !Je(u) || !u.isDeletable() || !Be(u))
|
|
8814
8816
|
return !1;
|
|
8815
8817
|
const r = u.toCopyData();
|
|
8816
8818
|
return r ? (localStorage.setItem("blocklyStash", JSON.stringify(r)), u instanceof go ? u.checkAndDelete() : u.dispose(), !0) : !1;
|
|
@@ -10049,7 +10051,7 @@ const ra = /* @__PURE__ */ se({
|
|
|
10049
10051
|
},
|
|
10050
10052
|
emits: ["x-click"],
|
|
10051
10053
|
setup(t, { emit: e }) {
|
|
10052
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = pt(), s = t, c = e, u =
|
|
10054
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = pt(), s = t, c = e, u = Oe(!1), r = j(() => ({
|
|
10053
10055
|
position: "relative",
|
|
10054
10056
|
background: u.value ? i.value : o.value,
|
|
10055
10057
|
height: "48px",
|
|
@@ -10103,7 +10105,7 @@ const ra = /* @__PURE__ */ se({
|
|
|
10103
10105
|
}),
|
|
10104
10106
|
emits: ["update:modelValue"],
|
|
10105
10107
|
setup(t, { expose: e }) {
|
|
10106
|
-
const { t: n } = Ge(), o = xe(t, "modelValue"), i = Qt(), s =
|
|
10108
|
+
const { t: n } = Ge(), o = xe(t, "modelValue"), i = Qt(), s = Oe([]);
|
|
10107
10109
|
e({ update: () => {
|
|
10108
10110
|
if (!i.workspace) {
|
|
10109
10111
|
console.assert(!1);
|
|
@@ -10491,9 +10493,9 @@ const Na = { class: "position-relative w-100 h-100" }, La = /* @__PURE__ */ se({
|
|
|
10491
10493
|
}),
|
|
10492
10494
|
emits: /* @__PURE__ */ Vt(["ready"], ["update:lock", "update:scale"]),
|
|
10493
10495
|
setup(t, { expose: e, emit: n }) {
|
|
10494
|
-
const o = xe(t, "lock"), i = xe(t, "scale"), s = n, c = `blocklyEditor${Pt()}`, u =
|
|
10496
|
+
const o = xe(t, "lock"), i = xe(t, "scale"), s = n, c = `blocklyEditor${Pt()}`, u = Oe(), r = Me("parentContainer"), _ = Me("clean"), h = Me("navigator"), d = {};
|
|
10495
10497
|
ua(d);
|
|
10496
|
-
const O =
|
|
10498
|
+
const O = Oe(!0), k = Oe(!1), A = j(() => t.type === "json" ? "tree" : "list"), V = j(() => ({
|
|
10497
10499
|
position: "absolute",
|
|
10498
10500
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10499
10501
|
top: "1px",
|
|
@@ -10602,22 +10604,22 @@ const Na = { class: "position-relative w-100 h-100" }, La = /* @__PURE__ */ se({
|
|
|
10602
10604
|
window.addEventListener("keydown", nn, !1);
|
|
10603
10605
|
}), gn(() => {
|
|
10604
10606
|
window.removeEventListener("keydown", nn, !1);
|
|
10605
|
-
}),
|
|
10607
|
+
}), be(
|
|
10606
10608
|
() => t.locale,
|
|
10607
10609
|
(v) => {
|
|
10608
10610
|
Tn(v);
|
|
10609
10611
|
}
|
|
10610
|
-
),
|
|
10612
|
+
), be(
|
|
10611
10613
|
() => t.dark,
|
|
10612
10614
|
(v) => {
|
|
10613
10615
|
oa(v ? "dark" : "light");
|
|
10614
10616
|
}
|
|
10615
|
-
),
|
|
10617
|
+
), be(x, (v) => {
|
|
10616
10618
|
var F;
|
|
10617
10619
|
v || (F = d.workspace) == null || F.hideChaff();
|
|
10618
|
-
}),
|
|
10620
|
+
}), be(o, () => {
|
|
10619
10621
|
en();
|
|
10620
|
-
}),
|
|
10622
|
+
}), be(i, () => {
|
|
10621
10623
|
tn();
|
|
10622
10624
|
}), e({ loading: O, load: zn, save: Qn, generateCode: Zn, fireStateChange: eo }), (v, F) => {
|
|
10623
10625
|
const yt = P("v-icon"), Xe = P("x-loading");
|
|
@@ -10708,7 +10710,7 @@ const Na = { class: "position-relative w-100 h-100" }, La = /* @__PURE__ */ se({
|
|
|
10708
10710
|
}), ba = { class: "text-subtitle-1" }, Ba = { class: "w-100 h-100 overflow-auto" }, Ra = /* @__PURE__ */ se({
|
|
10709
10711
|
__name: "index",
|
|
10710
10712
|
setup(t) {
|
|
10711
|
-
const { t: e } = Ge(), { sysBarAvail: n } = Ln(), { backgroundColor0: o, backgroundColor2: i } = pt(), s =
|
|
10713
|
+
const { t: e } = Ge(), { sysBarAvail: n } = Ln(), { backgroundColor0: o, backgroundColor2: i } = pt(), s = Oe(""), c = j(() => {
|
|
10712
10714
|
let _ = 48;
|
|
10713
10715
|
return n.value && (_ += 24), {
|
|
10714
10716
|
position: "relative",
|
|
@@ -31,8 +31,6 @@ const _ = {
|
|
|
31
31
|
TODAY: "Today",
|
|
32
32
|
UNDO: "Undo",
|
|
33
33
|
UNNAMED_KEY: "unnamed",
|
|
34
|
-
VARIABLE_GET_CREATE_SET: "Create 'Set %1'",
|
|
35
|
-
VARIABLE_SET_CREATE_GET: "Create 'Get %1'",
|
|
36
34
|
CROSS_TAB_COPY: "Copy",
|
|
37
35
|
CROSS_TAB_PASTE: "Paste",
|
|
38
36
|
NO_OPTION: "No Option",
|
|
@@ -511,10 +509,10 @@ const _ = {
|
|
|
511
509
|
UI_V1_TRIGGER_COMP_EVENT_TOOLTIP: "UI_V1_TRIGGER_COMP_EVENT_TOOLTIP",
|
|
512
510
|
UI_V1_TRIGGER_COMP_EVENT_HELPURL: "UI_V1_TRIGGER_COMP_EVENT_HELPURL",
|
|
513
511
|
// variable
|
|
514
|
-
|
|
512
|
+
VARIABLE_GET_CREATE_SET: 'create "set %1"',
|
|
513
|
+
VARIABLE_SET_CREATE_GET: 'create "get %1"',
|
|
515
514
|
VARIABLE_V1_GET_TOOLTIP: "VARIABLE_V1_GET_TOOLTIP",
|
|
516
515
|
VARIABLE_V1_GET_HELPURL: "VARIABLE_V1_GET_HELPURL",
|
|
517
|
-
VARIABLE_V1_SET_CREATE_GET: 'create "get %1"',
|
|
518
516
|
VARIABLE_V1_SET_TITLE: "set %1 to %2",
|
|
519
517
|
VARIABLE_V1_SET_TOOLTIP: "VARIABLE_V1_SET_TOOLTIP",
|
|
520
518
|
VARIABLE_V1_SET_HELPURL: "VARIABLE_V1_SET_HELPURL"
|
|
@@ -5,10 +5,10 @@ const _ = {
|
|
|
5
5
|
COLLAPSED_WARNINGS_WARNING: "已折叠的块内包含警告。",
|
|
6
6
|
COLLAPSE_ALL: "折叠所有块",
|
|
7
7
|
COLLAPSE_BLOCK: "折叠块",
|
|
8
|
-
DELETE_ALL_BLOCKS: "
|
|
8
|
+
DELETE_ALL_BLOCKS: "删除所有块(%1个)吗?",
|
|
9
9
|
DELETE_BLOCK: "删除块",
|
|
10
|
-
DELETE_VARIABLE: "
|
|
11
|
-
DELETE_VARIABLE_CONFIRMATION: "
|
|
10
|
+
DELETE_VARIABLE: "删除变量“%1”",
|
|
11
|
+
DELETE_VARIABLE_CONFIRMATION: "要删除对变量“%2”的%1个引用吗?",
|
|
12
12
|
DELETE_X_BLOCKS: "删除%1个块",
|
|
13
13
|
DIALOG_CANCEL: "取消",
|
|
14
14
|
DIALOG_OK: "确认",
|
|
@@ -27,12 +27,10 @@ const _ = {
|
|
|
27
27
|
REDO: "重做",
|
|
28
28
|
REMOVE_COMMENT: "删除注释",
|
|
29
29
|
RENAME_VARIABLE: "重命名变量",
|
|
30
|
-
RENAME_VARIABLE_TITLE: "
|
|
30
|
+
RENAME_VARIABLE_TITLE: "将所有“%1”变量重命名为:",
|
|
31
31
|
TODAY: "今天",
|
|
32
32
|
UNDO: "撤销",
|
|
33
33
|
UNNAMED_KEY: "未命名",
|
|
34
|
-
VARIABLE_GET_CREATE_SET: "创建「设置%1」",
|
|
35
|
-
VARIABLE_SET_CREATE_GET: "创建「获取%1」",
|
|
36
34
|
CROSS_TAB_COPY: "拷贝",
|
|
37
35
|
CROSS_TAB_PASTE: "黏贴",
|
|
38
36
|
NO_OPTION: "没有选项",
|
|
@@ -511,10 +509,10 @@ const _ = {
|
|
|
511
509
|
UI_V1_TRIGGER_COMP_EVENT_TOOLTIP: "UI_V1_TRIGGER_COMP_EVENT_TOOLTIP",
|
|
512
510
|
UI_V1_TRIGGER_COMP_EVENT_HELPURL: "UI_V1_TRIGGER_COMP_EVENT_HELPURL",
|
|
513
511
|
// variable
|
|
514
|
-
|
|
512
|
+
VARIABLE_GET_CREATE_SET: "创建”设置%1“",
|
|
513
|
+
VARIABLE_SET_CREATE_GET: "创建”获取%1“",
|
|
515
514
|
VARIABLE_V1_GET_TOOLTIP: "VARIABLE_V1_GET_TOOLTIP",
|
|
516
515
|
VARIABLE_V1_GET_HELPURL: "VARIABLE_V1_GET_HELPURL",
|
|
517
|
-
VARIABLE_V1_SET_CREATE_GET: "创建”获取%1“",
|
|
518
516
|
VARIABLE_V1_SET_TITLE: "将变量%1设置为%2",
|
|
519
517
|
VARIABLE_V1_SET_TOOLTIP: "VARIABLE_V1_SET_TOOLTIP",
|
|
520
518
|
VARIABLE_V1_SET_HELPURL: "VARIABLE_V1_SET_HELPURL"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.58",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -28,35 +28,35 @@
|
|
|
28
28
|
"blockly": "^12.1.0",
|
|
29
29
|
"highlight.js": "^11.11.1",
|
|
30
30
|
"lodash-es": "^4.17.21",
|
|
31
|
-
"vue": "^3.5.
|
|
31
|
+
"vue": "^3.5.16",
|
|
32
32
|
"vue-draggable-plus": "^0.6.0",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"x-
|
|
33
|
+
"vue-i18n": "^11.1.5",
|
|
34
|
+
"vue-router": "^4.5.1",
|
|
35
|
+
"vuetify": "^3.8.9",
|
|
36
|
+
"x-essential-lib": "^0.8.13",
|
|
37
|
+
"x-runtime-lib": "^0.6.53",
|
|
38
|
+
"x-state-lib": "^0.2.3"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@eslint/js": "^9.
|
|
41
|
+
"@eslint/js": "^9.28.0",
|
|
40
42
|
"@types/lodash-es": "^4.17.12",
|
|
41
|
-
"@types/node": "^
|
|
43
|
+
"@types/node": "^24.0.1",
|
|
42
44
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
43
|
-
"eslint": "^9.
|
|
45
|
+
"eslint": "^9.28.0",
|
|
44
46
|
"eslint-config-prettier": "^10.1.5",
|
|
45
|
-
"eslint-plugin-prettier": "^5.4.
|
|
46
|
-
"eslint-plugin-vue": "^10.
|
|
47
|
-
"globals": "^16.
|
|
47
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
48
|
+
"eslint-plugin-vue": "^10.2.0",
|
|
49
|
+
"globals": "^16.2.0",
|
|
48
50
|
"husky": "^9.1.7",
|
|
49
|
-
"lint-staged": "^
|
|
51
|
+
"lint-staged": "^16.1.0",
|
|
50
52
|
"prettier": "3.5.3",
|
|
51
|
-
"sass": "^1.
|
|
53
|
+
"sass": "^1.89.2",
|
|
52
54
|
"typescript": "^5.8.3",
|
|
53
|
-
"typescript-eslint": "^8.
|
|
55
|
+
"typescript-eslint": "^8.34.0",
|
|
54
56
|
"vite": "^6.3.5",
|
|
55
57
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
56
58
|
"vite-plugin-vuetify": "^2.1.1",
|
|
57
59
|
"vue-eslint-parser": "^10.1.3",
|
|
58
|
-
"vue-i18n": "^11.1.3",
|
|
59
|
-
"vue-router": "^4.5.1",
|
|
60
60
|
"vue-tsc": "^2.2.10"
|
|
61
61
|
}
|
|
62
62
|
}
|