x-block-lib 0.7.11 → 0.7.12
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/components/blockly/lock/index.vue.d.ts +1 -1
- package/dist/components/blockly/navigator/blockList/item.vue.d.ts +1 -1
- package/dist/components/sourceDlg/content/index.vue.d.ts +1 -1
- package/dist/components/sourceDlg/index.vue.d.ts +1 -1
- package/dist/index.js +352 -352
- package/dist/{vendor.k6kjk1km.js → vendor.btniuih9.js} +5634 -5541
- package/package.json +18 -17
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
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-2ba1be08]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:10px!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 { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as P, createBlock as Z, openBlock as D, unref as V, withCtx as ee, createVNode as B, mergeProps as
|
|
11
|
-
import { d as h, j as s, O as c, f as co, F as dn, M as _, E, r as Zt, u as v, s as lo, X as he, B as d, i as U, a as k, c as De, b as Rt, e as $, g as Te, h as re, p as Ue, k as z, l as en, m as R, C as fn, N as te, n as uo, P as Dt, V as ge, o as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as
|
|
13
|
-
import { elements as x, pkgs as Ve, getPropTag as lt, parsePixelStr as
|
|
10
|
+
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as P, createBlock as Z, openBlock as D, unref as V, withCtx as ee, createVNode as B, mergeProps as Yt, useModel as Me, ref as Ae, computed as K, resolveDirective as to, withDirectives as no, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as at, withModifiers as Be, mergeModels as bt, Fragment as _n, renderList as oo, useId as Bt, onUnmounted as pn, useTemplateRef as Re, withKeys as hn, isRef as Je, createCommentVNode as me, onMounted as zt, nextTick as io, onBeforeUnmount as so, watch as Se, renderSlot as ao } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as co, F as dn, M as _, E, r as Zt, u as v, s as lo, X as he, B as d, i as U, a as k, c as De, b as Rt, e as $, g as Te, h as re, p as Ue, k as z, l as en, m as R, C as fn, N as te, n as uo, P as Dt, V as ge, o as Ye, q as mn, t as ro, v as _o, w as po, S as ho, x as fo, y as mo, T as ct, z as Tn, A as To, D as Eo, G as En, H as go, I as Ao, J as Io, K as Oo, L as Co, Q as ko, R as vo, U as yo } from "./vendor.btniuih9.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as No, openPromptDlg as Lo, messageWarning as gn, useColor as Ke, useSystem as An, useViewStack as Kt } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Ve, getPropTag as lt, parsePixelStr as So, parsePercentStr as bo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
15
|
import { useI18n as $e } from "vue-i18n";
|
|
16
|
-
import { useDisplay as
|
|
16
|
+
import { useDisplay as Bo } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
19
19
|
type: "app_debug_trace_v1",
|
|
@@ -157,7 +157,7 @@ function S(t) {
|
|
|
157
157
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
158
158
|
return v.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ro(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
@@ -258,7 +258,7 @@ function Ot(t, e) {
|
|
|
258
258
|
if (n)
|
|
259
259
|
return n.events.find((o) => o.key === e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Do(t) {
|
|
262
262
|
const e = [];
|
|
263
263
|
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
264
264
|
e.push([_[i] ?? i, o]);
|
|
@@ -273,7 +273,7 @@ function Ct(t, e) {
|
|
|
273
273
|
if (n)
|
|
274
274
|
return n.methods.find((o) => o.key === e);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Uo(t) {
|
|
277
277
|
const e = [];
|
|
278
278
|
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
279
279
|
e.push([_[i] ?? i, o]);
|
|
@@ -324,7 +324,7 @@ function Ne(t) {
|
|
|
324
324
|
}
|
|
325
325
|
return n;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function w(t) {
|
|
328
328
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
329
329
|
}
|
|
330
330
|
function Ge(t) {
|
|
@@ -340,14 +340,14 @@ function Ge(t) {
|
|
|
340
340
|
}), N(n);
|
|
341
341
|
}
|
|
342
342
|
function Vt(t) {
|
|
343
|
-
const e =
|
|
343
|
+
const e = w(t);
|
|
344
344
|
if (!e)
|
|
345
345
|
return [];
|
|
346
346
|
const n = x[e.key];
|
|
347
347
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
348
348
|
}
|
|
349
349
|
function kt(t, e) {
|
|
350
|
-
const n =
|
|
350
|
+
const n = w(t);
|
|
351
351
|
if (!n)
|
|
352
352
|
return;
|
|
353
353
|
const o = x[n.key];
|
|
@@ -357,21 +357,21 @@ function kt(t, e) {
|
|
|
357
357
|
}
|
|
358
358
|
return o.events.find((i) => i.key === e);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Mo(t) {
|
|
361
361
|
const e = [];
|
|
362
362
|
return Vt(t).forEach(({ key: o, name: i }) => {
|
|
363
363
|
e.push([_[i] ?? i, o]);
|
|
364
364
|
}), N(e);
|
|
365
365
|
}
|
|
366
366
|
function Pt(t) {
|
|
367
|
-
const e =
|
|
367
|
+
const e = w(t);
|
|
368
368
|
if (!e)
|
|
369
369
|
return [];
|
|
370
370
|
const n = x[e.key];
|
|
371
371
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
372
372
|
}
|
|
373
373
|
function vt(t, e) {
|
|
374
|
-
const n =
|
|
374
|
+
const n = w(t);
|
|
375
375
|
if (!n)
|
|
376
376
|
return;
|
|
377
377
|
const o = x[n.key];
|
|
@@ -381,7 +381,7 @@ function vt(t, e) {
|
|
|
381
381
|
}
|
|
382
382
|
return o.methods.find((i) => i.key === e);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Vo(t) {
|
|
385
385
|
const e = [];
|
|
386
386
|
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
387
387
|
e.push([_[i] ?? i, o]);
|
|
@@ -391,7 +391,7 @@ function xe(t, e) {
|
|
|
391
391
|
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = lt(o, i);
|
|
392
392
|
if (!l)
|
|
393
393
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
394
|
-
const u =
|
|
394
|
+
const u = w(t);
|
|
395
395
|
return u ? x[u.key] ? (n[u.key]?.[l]?.forEach((p) => {
|
|
396
396
|
e && (!p.raw.ui || p.raw.readonly || p.keys === "alias") || a.push(p);
|
|
397
397
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
@@ -402,7 +402,7 @@ function ae(t, e) {
|
|
|
402
402
|
console.assert(!1, "invalid prop tag", o, i);
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
|
-
const l =
|
|
405
|
+
const l = w(t);
|
|
406
406
|
if (l)
|
|
407
407
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
408
408
|
}
|
|
@@ -415,7 +415,7 @@ function yn(t, e) {
|
|
|
415
415
|
}), o.push([u, a]);
|
|
416
416
|
}), N(o);
|
|
417
417
|
}
|
|
418
|
-
const
|
|
418
|
+
const Po = {
|
|
419
419
|
init: function() {
|
|
420
420
|
this.node = {
|
|
421
421
|
id: "",
|
|
@@ -459,7 +459,7 @@ const Vo = {
|
|
|
459
459
|
return Ge("method");
|
|
460
460
|
},
|
|
461
461
|
genMethodOpts_: function() {
|
|
462
|
-
return
|
|
462
|
+
return Vo(this.node.id);
|
|
463
463
|
},
|
|
464
464
|
genElementOpts_: function() {
|
|
465
465
|
return ve();
|
|
@@ -477,7 +477,7 @@ const Vo = {
|
|
|
477
477
|
}
|
|
478
478
|
},
|
|
479
479
|
onNodeChange_: function(t) {
|
|
480
|
-
const e =
|
|
480
|
+
const e = w(t);
|
|
481
481
|
if (!e) {
|
|
482
482
|
console.assert(!1);
|
|
483
483
|
return;
|
|
@@ -550,7 +550,7 @@ const Vo = {
|
|
|
550
550
|
t.length > 0 && F(this, t);
|
|
551
551
|
},
|
|
552
552
|
checkWarning_: function() {
|
|
553
|
-
const t =
|
|
553
|
+
const t = w(this.node.id);
|
|
554
554
|
if (!t) {
|
|
555
555
|
this.setWarningText(_.WARN_NODE_NOT_AVAILABLE);
|
|
556
556
|
return;
|
|
@@ -572,7 +572,7 @@ const Vo = {
|
|
|
572
572
|
this.setWarningText(null);
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
|
-
d.call_node_method_v1 =
|
|
575
|
+
d.call_node_method_v1 = Po;
|
|
576
576
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
577
577
|
const e = s.quote_, n = t;
|
|
578
578
|
let o = n.node.id;
|
|
@@ -595,7 +595,7 @@ ${a}}
|
|
|
595
595
|
`;
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
const
|
|
598
|
+
const xo = {
|
|
599
599
|
init: function() {
|
|
600
600
|
this.element = {
|
|
601
601
|
key: "",
|
|
@@ -638,7 +638,7 @@ const Po = {
|
|
|
638
638
|
return ve("method");
|
|
639
639
|
},
|
|
640
640
|
genMethodOpts_: function() {
|
|
641
|
-
return
|
|
641
|
+
return Uo(this.element.key);
|
|
642
642
|
},
|
|
643
643
|
onchange: function(t) {
|
|
644
644
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -741,7 +741,7 @@ const Po = {
|
|
|
741
741
|
this.setWarningText(null);
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
d.call_node_method_as_v1 =
|
|
744
|
+
d.call_node_method_as_v1 = xo;
|
|
745
745
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
746
746
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
747
747
|
if (!o)
|
|
@@ -765,7 +765,7 @@ ${a}}
|
|
|
765
765
|
`;
|
|
766
766
|
}
|
|
767
767
|
};
|
|
768
|
-
function
|
|
768
|
+
function Fo() {
|
|
769
769
|
return T.app.activeObject.type !== "comp" ? !1 : T.app.activeComp.meta.properties.length > 0 || T.app.activeComp.meta.methods.length > 0 || T.app.activeComp.meta.events.length > 0;
|
|
770
770
|
}
|
|
771
771
|
function Fe() {
|
|
@@ -793,7 +793,7 @@ function yt(t, e) {
|
|
|
793
793
|
if (n)
|
|
794
794
|
return n.outputs.find((o) => o.id === e);
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function wo(t) {
|
|
797
797
|
const e = [];
|
|
798
798
|
return xt(t).forEach(({ id: o, name: i }) => {
|
|
799
799
|
e.push([i, o]);
|
|
@@ -811,7 +811,7 @@ function Yo() {
|
|
|
811
811
|
t.push([o, n]);
|
|
812
812
|
}), N(t);
|
|
813
813
|
}
|
|
814
|
-
const
|
|
814
|
+
const Ko = {
|
|
815
815
|
init: function() {
|
|
816
816
|
this.method = {
|
|
817
817
|
id: "",
|
|
@@ -891,14 +891,14 @@ const wo = {
|
|
|
891
891
|
this.setWarningText(null);
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
|
-
d.comp_method_impl_v1 =
|
|
894
|
+
d.comp_method_impl_v1 = Ko;
|
|
895
895
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
896
896
|
const e = t;
|
|
897
897
|
return `{
|
|
898
898
|
${s.statementToCode(e, "HANDLE")}}
|
|
899
899
|
`;
|
|
900
900
|
};
|
|
901
|
-
const
|
|
901
|
+
const $o = (t, e) => {
|
|
902
902
|
const n = ut(t), o = Ce(t);
|
|
903
903
|
d[n] = {
|
|
904
904
|
init: function() {
|
|
@@ -921,9 +921,9 @@ const Ko = (t, e) => {
|
|
|
921
921
|
for (const t in Ve) {
|
|
922
922
|
const e = Ve[t];
|
|
923
923
|
for (const n in e.items)
|
|
924
|
-
|
|
924
|
+
$o(n, e.items[n]);
|
|
925
925
|
}
|
|
926
|
-
const
|
|
926
|
+
const Ho = (t, e) => {
|
|
927
927
|
const n = ut(t), o = Ce(t);
|
|
928
928
|
d[n] = {
|
|
929
929
|
init: function() {
|
|
@@ -978,7 +978,7 @@ const $o = (t, e) => {
|
|
|
978
978
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
979
979
|
let u, r;
|
|
980
980
|
if (l.ui === "pixelInput") {
|
|
981
|
-
const p =
|
|
981
|
+
const p = So(this.value) ?? 0;
|
|
982
982
|
u = new Rt(
|
|
983
983
|
p,
|
|
984
984
|
l.min,
|
|
@@ -989,7 +989,7 @@ const $o = (t, e) => {
|
|
|
989
989
|
}
|
|
990
990
|
), r = "px";
|
|
991
991
|
} else if (l.ui === "percentInput") {
|
|
992
|
-
const p =
|
|
992
|
+
const p = bo(this.value) ?? 0;
|
|
993
993
|
u = new Rt(
|
|
994
994
|
p,
|
|
995
995
|
l.min,
|
|
@@ -1018,9 +1018,9 @@ const $o = (t, e) => {
|
|
|
1018
1018
|
for (const t in Ve) {
|
|
1019
1019
|
const e = Ve[t];
|
|
1020
1020
|
for (const n in e.types)
|
|
1021
|
-
|
|
1021
|
+
Ho(n, e.types[n]);
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1023
|
+
const Go = {
|
|
1024
1024
|
init: function() {
|
|
1025
1025
|
this.node = {
|
|
1026
1026
|
id: "",
|
|
@@ -1064,7 +1064,7 @@ const Ho = {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
},
|
|
1066
1066
|
onNodeChange_: function(t) {
|
|
1067
|
-
const e =
|
|
1067
|
+
const e = w(t);
|
|
1068
1068
|
if (!e) {
|
|
1069
1069
|
console.assert(!1);
|
|
1070
1070
|
return;
|
|
@@ -1072,7 +1072,7 @@ const Ho = {
|
|
|
1072
1072
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1073
1073
|
},
|
|
1074
1074
|
checkWarning_: function() {
|
|
1075
|
-
const t =
|
|
1075
|
+
const t = w(this.node.id);
|
|
1076
1076
|
if (!t) {
|
|
1077
1077
|
this.setWarningText(_.WARN_NODE_NOT_AVAIALABLE);
|
|
1078
1078
|
return;
|
|
@@ -1084,12 +1084,12 @@ const Ho = {
|
|
|
1084
1084
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1085
1085
|
}
|
|
1086
1086
|
};
|
|
1087
|
-
d.get_node_v1 =
|
|
1087
|
+
d.get_node_v1 = Go;
|
|
1088
1088
|
s.forBlock.get_node_v1 = function(t) {
|
|
1089
1089
|
const e = t;
|
|
1090
1090
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1091
1091
|
};
|
|
1092
|
-
const
|
|
1092
|
+
const Wo = {
|
|
1093
1093
|
init: function() {
|
|
1094
1094
|
this.node = {
|
|
1095
1095
|
id: "",
|
|
@@ -1146,7 +1146,7 @@ const Go = {
|
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
1148
|
onNodeChange_: function(t) {
|
|
1149
|
-
const e =
|
|
1149
|
+
const e = w(t);
|
|
1150
1150
|
if (!e) {
|
|
1151
1151
|
console.assert(!1);
|
|
1152
1152
|
return;
|
|
@@ -1164,7 +1164,7 @@ const Go = {
|
|
|
1164
1164
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1165
1165
|
},
|
|
1166
1166
|
checkWarning_: function() {
|
|
1167
|
-
const t =
|
|
1167
|
+
const t = w(this.node.id);
|
|
1168
1168
|
if (!t) {
|
|
1169
1169
|
this.setWarningText(_.WARN_NODE_NOT_AVAIALABLE);
|
|
1170
1170
|
return;
|
|
@@ -1182,12 +1182,12 @@ const Go = {
|
|
|
1182
1182
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1183
1183
|
}
|
|
1184
1184
|
};
|
|
1185
|
-
d.get_node_prop_v1 =
|
|
1185
|
+
d.get_node_prop_v1 = Wo;
|
|
1186
1186
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1187
1187
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1188
1188
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1189
1189
|
};
|
|
1190
|
-
const
|
|
1190
|
+
const jo = {
|
|
1191
1191
|
init: function() {
|
|
1192
1192
|
this.element = {
|
|
1193
1193
|
key: "",
|
|
@@ -1275,12 +1275,12 @@ const Wo = {
|
|
|
1275
1275
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
|
-
d.get_node_prop_as_v1 =
|
|
1278
|
+
d.get_node_prop_as_v1 = jo;
|
|
1279
1279
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1280
1280
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1281
1281
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function Xo() {
|
|
1284
1284
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1285
1285
|
}
|
|
1286
1286
|
function Sn() {
|
|
@@ -1291,13 +1291,13 @@ function on(t) {
|
|
|
1291
1291
|
(e) => e.id === t
|
|
1292
1292
|
);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Jo() {
|
|
1295
1295
|
const t = [];
|
|
1296
1296
|
return Sn().forEach(({ id: n, name: o }) => {
|
|
1297
1297
|
t.push([o, n]);
|
|
1298
1298
|
}), N(t);
|
|
1299
1299
|
}
|
|
1300
|
-
const
|
|
1300
|
+
const qo = {
|
|
1301
1301
|
init: function() {
|
|
1302
1302
|
this.argument = {
|
|
1303
1303
|
id: "",
|
|
@@ -1319,7 +1319,7 @@ const Jo = {
|
|
|
1319
1319
|
}, 0);
|
|
1320
1320
|
},
|
|
1321
1321
|
genArgumentOpts_: function() {
|
|
1322
|
-
return
|
|
1322
|
+
return Jo();
|
|
1323
1323
|
},
|
|
1324
1324
|
onchange: function(t) {
|
|
1325
1325
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1357,7 +1357,7 @@ const Jo = {
|
|
|
1357
1357
|
this.setWarningText(null);
|
|
1358
1358
|
}
|
|
1359
1359
|
};
|
|
1360
|
-
d.get_page_argument_v1 =
|
|
1360
|
+
d.get_page_argument_v1 = qo;
|
|
1361
1361
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1362
1362
|
const e = t;
|
|
1363
1363
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
@@ -1368,7 +1368,7 @@ function Gt() {
|
|
|
1368
1368
|
function sn(t) {
|
|
1369
1369
|
return T.app.appList.find((e) => e.id === t);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Qo() {
|
|
1372
1372
|
const t = [];
|
|
1373
1373
|
return Gt().forEach(({ id: n, name: o }) => {
|
|
1374
1374
|
t.push([o, n]);
|
|
@@ -1383,7 +1383,7 @@ function Nt(t, e) {
|
|
|
1383
1383
|
if (n)
|
|
1384
1384
|
return n.pages.find((o) => o.id === e);
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function zo(t) {
|
|
1387
1387
|
const e = [];
|
|
1388
1388
|
return Ft(t).forEach(({ id: o, name: i }) => {
|
|
1389
1389
|
e.push([i, o]);
|
|
@@ -1402,14 +1402,14 @@ function Bn() {
|
|
|
1402
1402
|
function an(t) {
|
|
1403
1403
|
return t === "" ? bn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function Zo() {
|
|
1406
1406
|
const { i18n: t } = ie, e = [];
|
|
1407
1407
|
return Bn().forEach(({ id: o, name: i }) => {
|
|
1408
1408
|
let a = i;
|
|
1409
1409
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1410
1410
|
}), N(e);
|
|
1411
1411
|
}
|
|
1412
|
-
const
|
|
1412
|
+
const ei = {
|
|
1413
1413
|
init: function() {
|
|
1414
1414
|
this.app = {
|
|
1415
1415
|
id: "",
|
|
@@ -1447,10 +1447,10 @@ const Zo = {
|
|
|
1447
1447
|
}, 0);
|
|
1448
1448
|
},
|
|
1449
1449
|
genAppOpts_: function() {
|
|
1450
|
-
return
|
|
1450
|
+
return Qo();
|
|
1451
1451
|
},
|
|
1452
1452
|
genPageOpts_: function() {
|
|
1453
|
-
return
|
|
1453
|
+
return zo(this.app.id);
|
|
1454
1454
|
},
|
|
1455
1455
|
onchange: function(t) {
|
|
1456
1456
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1497,13 +1497,13 @@ const Zo = {
|
|
|
1497
1497
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1498
1498
|
}
|
|
1499
1499
|
};
|
|
1500
|
-
d.navigate_to_v1 =
|
|
1500
|
+
d.navigate_to_v1 = ei;
|
|
1501
1501
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1502
1502
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
1503
|
return `__navigateToV1__(${n}, ${o});
|
|
1504
1504
|
`;
|
|
1505
1505
|
};
|
|
1506
|
-
const
|
|
1506
|
+
const ti = {
|
|
1507
1507
|
init: function() {
|
|
1508
1508
|
this.node = {
|
|
1509
1509
|
id: "",
|
|
@@ -1546,7 +1546,7 @@ const ei = {
|
|
|
1546
1546
|
return Ge("event");
|
|
1547
1547
|
},
|
|
1548
1548
|
genEventOpts_: function() {
|
|
1549
|
-
return
|
|
1549
|
+
return Mo(this.node.id);
|
|
1550
1550
|
},
|
|
1551
1551
|
onchange: function(t) {
|
|
1552
1552
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1561,7 +1561,7 @@ const ei = {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
},
|
|
1563
1563
|
onNodeChange_: function(t) {
|
|
1564
|
-
const e =
|
|
1564
|
+
const e = w(t);
|
|
1565
1565
|
if (!e) {
|
|
1566
1566
|
console.assert(!1);
|
|
1567
1567
|
return;
|
|
@@ -1597,7 +1597,7 @@ const ei = {
|
|
|
1597
1597
|
}), t.length > 0 && F(this, t);
|
|
1598
1598
|
},
|
|
1599
1599
|
checkWarning_: function() {
|
|
1600
|
-
const t =
|
|
1600
|
+
const t = w(this.node.id);
|
|
1601
1601
|
if (!t) {
|
|
1602
1602
|
this.setWarningText(_.WARN_NODE_NOT_AVAILABLE);
|
|
1603
1603
|
return;
|
|
@@ -1619,7 +1619,7 @@ const ei = {
|
|
|
1619
1619
|
this.setWarningText(null);
|
|
1620
1620
|
}
|
|
1621
1621
|
};
|
|
1622
|
-
d.on_node_event_v1 =
|
|
1622
|
+
d.on_node_event_v1 = ti;
|
|
1623
1623
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1624
1624
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1625
1625
|
let i = "";
|
|
@@ -1631,7 +1631,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1631
1631
|
${a}});
|
|
1632
1632
|
`;
|
|
1633
1633
|
};
|
|
1634
|
-
const
|
|
1634
|
+
const ni = {
|
|
1635
1635
|
init: function() {
|
|
1636
1636
|
this.element = {
|
|
1637
1637
|
key: "",
|
|
@@ -1673,7 +1673,7 @@ const ti = {
|
|
|
1673
1673
|
return ve("event");
|
|
1674
1674
|
},
|
|
1675
1675
|
genEventOpts_: function() {
|
|
1676
|
-
return
|
|
1676
|
+
return Do(this.element.key);
|
|
1677
1677
|
},
|
|
1678
1678
|
onchange: function(t) {
|
|
1679
1679
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1742,7 +1742,7 @@ const ti = {
|
|
|
1742
1742
|
this.setWarningText(null);
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
|
-
d.on_node_event_as_v1 =
|
|
1745
|
+
d.on_node_event_as_v1 = ni;
|
|
1746
1746
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1747
1747
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1748
1748
|
let i = "";
|
|
@@ -1754,7 +1754,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1754
1754
|
${a}});
|
|
1755
1755
|
`;
|
|
1756
1756
|
};
|
|
1757
|
-
const
|
|
1757
|
+
const oi = {
|
|
1758
1758
|
init: function() {
|
|
1759
1759
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1760
1760
|
},
|
|
@@ -1783,7 +1783,7 @@ const ni = {
|
|
|
1783
1783
|
]);
|
|
1784
1784
|
}
|
|
1785
1785
|
};
|
|
1786
|
-
d.open_confirm_dlg_v1 =
|
|
1786
|
+
d.open_confirm_dlg_v1 = oi;
|
|
1787
1787
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1788
1788
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1789
1789
|
return `{
|
|
@@ -1791,7 +1791,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1791
1791
|
${o}}
|
|
1792
1792
|
`;
|
|
1793
1793
|
};
|
|
1794
|
-
const
|
|
1794
|
+
const ii = {
|
|
1795
1795
|
init: function() {
|
|
1796
1796
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
1797
1797
|
},
|
|
@@ -1822,7 +1822,7 @@ const oi = {
|
|
|
1822
1822
|
]);
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
1825
|
-
d.open_prompt_dlg_v1 =
|
|
1825
|
+
d.open_prompt_dlg_v1 = ii;
|
|
1826
1826
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1827
1827
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1828
1828
|
return `{
|
|
@@ -1862,7 +1862,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1862
1862
|
return `__messageV1__(${e}, ${n});
|
|
1863
1863
|
`;
|
|
1864
1864
|
};
|
|
1865
|
-
const
|
|
1865
|
+
const si = {
|
|
1866
1866
|
init: function() {
|
|
1867
1867
|
this.comp = {
|
|
1868
1868
|
id: void 0,
|
|
@@ -1890,7 +1890,7 @@ const ii = {
|
|
|
1890
1890
|
}, 0);
|
|
1891
1891
|
},
|
|
1892
1892
|
genCompOpts_: function() {
|
|
1893
|
-
return
|
|
1893
|
+
return Zo();
|
|
1894
1894
|
},
|
|
1895
1895
|
onchange: function(t) {
|
|
1896
1896
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1924,12 +1924,12 @@ const ii = {
|
|
|
1924
1924
|
this.setWarningText(null);
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
|
-
d.select_comp_v1 =
|
|
1927
|
+
d.select_comp_v1 = si;
|
|
1928
1928
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1929
1929
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1930
1930
|
return [e(o), c.ATOMIC];
|
|
1931
1931
|
};
|
|
1932
|
-
const
|
|
1932
|
+
const ai = {
|
|
1933
1933
|
init: function() {
|
|
1934
1934
|
this.method = {
|
|
1935
1935
|
id: "",
|
|
@@ -1970,7 +1970,7 @@ const si = {
|
|
|
1970
1970
|
return Nn();
|
|
1971
1971
|
},
|
|
1972
1972
|
genOutputOpts_: function() {
|
|
1973
|
-
return
|
|
1973
|
+
return wo(this.method.id);
|
|
1974
1974
|
},
|
|
1975
1975
|
onchange: function(t) {
|
|
1976
1976
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2037,7 +2037,7 @@ const si = {
|
|
|
2037
2037
|
this.setWarningText(null);
|
|
2038
2038
|
}
|
|
2039
2039
|
};
|
|
2040
|
-
d.set_comp_method_output_v1 =
|
|
2040
|
+
d.set_comp_method_output_v1 = ai;
|
|
2041
2041
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2042
2042
|
const e = t;
|
|
2043
2043
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2064,7 +2064,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2064
2064
|
return `__setCompMethodOutputV1__(${n});
|
|
2065
2065
|
`;
|
|
2066
2066
|
};
|
|
2067
|
-
const
|
|
2067
|
+
const ci = {
|
|
2068
2068
|
init: function() {
|
|
2069
2069
|
this.node = {
|
|
2070
2070
|
id: "",
|
|
@@ -2121,7 +2121,7 @@ const ai = {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
},
|
|
2123
2123
|
onNodeChange_: function(t) {
|
|
2124
|
-
const e =
|
|
2124
|
+
const e = w(t);
|
|
2125
2125
|
if (!e) {
|
|
2126
2126
|
console.assert(!1);
|
|
2127
2127
|
return;
|
|
@@ -2158,7 +2158,7 @@ const ai = {
|
|
|
2158
2158
|
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Color") : n.ui === "select" ? e.setCheck(Ce(n.items)) : n.ui === "multiTypes" ? e.setCheck(Ce(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2159
2159
|
},
|
|
2160
2160
|
checkWarning_: function() {
|
|
2161
|
-
const t =
|
|
2161
|
+
const t = w(this.node.id);
|
|
2162
2162
|
if (!t) {
|
|
2163
2163
|
this.setWarningText(_.WARN_NODE_NOT_AVAIALABLE);
|
|
2164
2164
|
return;
|
|
@@ -2176,13 +2176,13 @@ const ai = {
|
|
|
2176
2176
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2177
2177
|
}
|
|
2178
2178
|
};
|
|
2179
|
-
d.set_node_prop_v1 =
|
|
2179
|
+
d.set_node_prop_v1 = ci;
|
|
2180
2180
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2181
2181
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2182
2182
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2183
2183
|
`;
|
|
2184
2184
|
};
|
|
2185
|
-
const
|
|
2185
|
+
const li = {
|
|
2186
2186
|
init: function() {
|
|
2187
2187
|
this.element = {
|
|
2188
2188
|
key: "",
|
|
@@ -2293,13 +2293,13 @@ const ci = {
|
|
|
2293
2293
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2294
2294
|
}
|
|
2295
2295
|
};
|
|
2296
|
-
d.set_node_prop_as_v1 =
|
|
2296
|
+
d.set_node_prop_as_v1 = li;
|
|
2297
2297
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2298
2298
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2299
2299
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2300
2300
|
`;
|
|
2301
2301
|
};
|
|
2302
|
-
const
|
|
2302
|
+
const ui = {
|
|
2303
2303
|
init: function() {
|
|
2304
2304
|
this.event = {
|
|
2305
2305
|
id: "",
|
|
@@ -2383,7 +2383,7 @@ const li = {
|
|
|
2383
2383
|
this.setWarningText(null);
|
|
2384
2384
|
}
|
|
2385
2385
|
};
|
|
2386
|
-
d.trigger_comp_event_v1 =
|
|
2386
|
+
d.trigger_comp_event_v1 = ui;
|
|
2387
2387
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2388
2388
|
return "";
|
|
2389
2389
|
};
|
|
@@ -3090,7 +3090,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3090
3090
|
`
|
|
3091
3091
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3092
3092
|
};
|
|
3093
|
-
const
|
|
3093
|
+
const ri = v.xml, _i = [
|
|
3094
3094
|
{
|
|
3095
3095
|
type: "add_data_v1",
|
|
3096
3096
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3152,16 +3152,16 @@ const ui = v.xml, ri = [
|
|
|
3152
3152
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3153
3153
|
}
|
|
3154
3154
|
];
|
|
3155
|
-
function
|
|
3156
|
-
const n =
|
|
3155
|
+
function pi(t, e) {
|
|
3156
|
+
const n = _i.find((o) => o.type === t);
|
|
3157
3157
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3158
3158
|
}
|
|
3159
|
-
const
|
|
3159
|
+
const hi = {
|
|
3160
3160
|
init: function() {
|
|
3161
3161
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3162
3162
|
},
|
|
3163
3163
|
mutationToDom: function() {
|
|
3164
|
-
const t =
|
|
3164
|
+
const t = ri.createElement("mutation");
|
|
3165
3165
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3166
3166
|
},
|
|
3167
3167
|
domToMutation: function(t) {
|
|
@@ -3190,7 +3190,7 @@ const pi = {
|
|
|
3190
3190
|
},
|
|
3191
3191
|
tryDuplicate_: function(t) {
|
|
3192
3192
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3193
|
-
if (e &&
|
|
3193
|
+
if (e && pi(e.type, t.oldInputName))
|
|
3194
3194
|
try {
|
|
3195
3195
|
E.disable();
|
|
3196
3196
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -3211,7 +3211,7 @@ const pi = {
|
|
|
3211
3211
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3212
3212
|
}
|
|
3213
3213
|
};
|
|
3214
|
-
d.parameter_v1 =
|
|
3214
|
+
d.parameter_v1 = hi;
|
|
3215
3215
|
s.forBlock.parameter_v1 = function(t) {
|
|
3216
3216
|
return [t.key, c.ATOMIC];
|
|
3217
3217
|
};
|
|
@@ -3230,7 +3230,7 @@ function Rn(t) {
|
|
|
3230
3230
|
e.push([i, o]);
|
|
3231
3231
|
}), N(e);
|
|
3232
3232
|
}
|
|
3233
|
-
function
|
|
3233
|
+
function we(t) {
|
|
3234
3234
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3235
3235
|
return e ? e.funcs : [];
|
|
3236
3236
|
}
|
|
@@ -3241,24 +3241,24 @@ function Oe(t, e) {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
function Dn(t) {
|
|
3243
3243
|
const e = [];
|
|
3244
|
-
return
|
|
3244
|
+
return we(t).forEach(({ id: o, name: i }) => {
|
|
3245
3245
|
e.push([i, o]);
|
|
3246
3246
|
}), N(e);
|
|
3247
3247
|
}
|
|
3248
|
-
function
|
|
3248
|
+
function wt() {
|
|
3249
3249
|
return T.compute.activeFunc;
|
|
3250
3250
|
}
|
|
3251
3251
|
function cn(t) {
|
|
3252
3252
|
const { outputs: e } = T.compute.activeFunc;
|
|
3253
3253
|
return e.find((n) => n.id === t);
|
|
3254
3254
|
}
|
|
3255
|
-
function
|
|
3255
|
+
function di() {
|
|
3256
3256
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3257
3257
|
return e.forEach(({ id: n, name: o }) => {
|
|
3258
3258
|
t.push([o, n]);
|
|
3259
3259
|
}), N(t);
|
|
3260
3260
|
}
|
|
3261
|
-
const
|
|
3261
|
+
const fi = {
|
|
3262
3262
|
init: function() {
|
|
3263
3263
|
this.space = {
|
|
3264
3264
|
id: "",
|
|
@@ -3279,7 +3279,7 @@ const di = {
|
|
|
3279
3279
|
this.space.id = t.id, this.space.name = t.name;
|
|
3280
3280
|
const e = this.getField("SPACE");
|
|
3281
3281
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3282
|
-
const n =
|
|
3282
|
+
const n = we(this.space.id)?.[0];
|
|
3283
3283
|
if (!n)
|
|
3284
3284
|
return;
|
|
3285
3285
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3323,7 +3323,7 @@ const di = {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
let n = !1;
|
|
3325
3325
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Oe(this.space.id, this.func.id)) {
|
|
3326
|
-
const i =
|
|
3326
|
+
const i = we(this.space.id)?.[0];
|
|
3327
3327
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3328
3328
|
}
|
|
3329
3329
|
},
|
|
@@ -3413,7 +3413,7 @@ const di = {
|
|
|
3413
3413
|
this.setWarningText(null);
|
|
3414
3414
|
}
|
|
3415
3415
|
};
|
|
3416
|
-
d.call_func_v1 =
|
|
3416
|
+
d.call_func_v1 = fi;
|
|
3417
3417
|
s.forBlock.call_func_v1 = function(t) {
|
|
3418
3418
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3419
3419
|
let l = "";
|
|
@@ -3440,7 +3440,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3440
3440
|
${r}${p}}
|
|
3441
3441
|
`;
|
|
3442
3442
|
};
|
|
3443
|
-
const
|
|
3443
|
+
const mi = {
|
|
3444
3444
|
init: function() {
|
|
3445
3445
|
this.space = {
|
|
3446
3446
|
id: "",
|
|
@@ -3461,7 +3461,7 @@ const fi = {
|
|
|
3461
3461
|
this.space.id = t.id, this.space.name = t.name;
|
|
3462
3462
|
const e = this.getField("SPACE");
|
|
3463
3463
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3464
|
-
const n =
|
|
3464
|
+
const n = we(this.space.id)?.[0];
|
|
3465
3465
|
if (!n)
|
|
3466
3466
|
return;
|
|
3467
3467
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3505,7 +3505,7 @@ const fi = {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
let n = !1;
|
|
3507
3507
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Oe(this.space.id, this.func.id)) {
|
|
3508
|
-
const i =
|
|
3508
|
+
const i = we(this.space.id)?.[0];
|
|
3509
3509
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3510
3510
|
}
|
|
3511
3511
|
},
|
|
@@ -3595,7 +3595,7 @@ const fi = {
|
|
|
3595
3595
|
this.setWarningText(null);
|
|
3596
3596
|
}
|
|
3597
3597
|
};
|
|
3598
|
-
d.call_func_internal_v1 =
|
|
3598
|
+
d.call_func_internal_v1 = mi;
|
|
3599
3599
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3600
3600
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3601
3601
|
let l = `${e}var __inputs__ = {
|
|
@@ -3647,7 +3647,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3647
3647
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3648
3648
|
`;
|
|
3649
3649
|
};
|
|
3650
|
-
const
|
|
3650
|
+
const Ti = {
|
|
3651
3651
|
init: function() {
|
|
3652
3652
|
this.func = {
|
|
3653
3653
|
id: "",
|
|
@@ -3657,7 +3657,7 @@ const mi = {
|
|
|
3657
3657
|
initData_: function() {
|
|
3658
3658
|
if (this.func.id)
|
|
3659
3659
|
return;
|
|
3660
|
-
const { id: t, inputs: e } =
|
|
3660
|
+
const { id: t, inputs: e } = wt();
|
|
3661
3661
|
this.func.id = t, this.func.inputs = e;
|
|
3662
3662
|
},
|
|
3663
3663
|
saveExtraState: function() {
|
|
@@ -3694,7 +3694,7 @@ const mi = {
|
|
|
3694
3694
|
F(this, t);
|
|
3695
3695
|
},
|
|
3696
3696
|
checkWarning_: function() {
|
|
3697
|
-
const { id: t, inputs: e } =
|
|
3697
|
+
const { id: t, inputs: e } = wt();
|
|
3698
3698
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3699
3699
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3700
3700
|
return;
|
|
@@ -3702,7 +3702,7 @@ const mi = {
|
|
|
3702
3702
|
this.setWarningText(null);
|
|
3703
3703
|
}
|
|
3704
3704
|
};
|
|
3705
|
-
d.func_entry_v1 =
|
|
3705
|
+
d.func_entry_v1 = Ti;
|
|
3706
3706
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3707
3707
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3708
3708
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3712,16 +3712,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3712
3712
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3713
3713
|
${n}}`;
|
|
3714
3714
|
};
|
|
3715
|
-
const
|
|
3715
|
+
const Ei = {
|
|
3716
3716
|
init: function() {
|
|
3717
3717
|
}
|
|
3718
3718
|
};
|
|
3719
|
-
d.on_flow_state_event_v1 =
|
|
3719
|
+
d.on_flow_state_event_v1 = Ei;
|
|
3720
3720
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3721
3721
|
return `__onFlowStateEventV1__();
|
|
3722
3722
|
`;
|
|
3723
3723
|
};
|
|
3724
|
-
const
|
|
3724
|
+
const gi = {
|
|
3725
3725
|
init: function() {
|
|
3726
3726
|
this.output = {
|
|
3727
3727
|
id: "",
|
|
@@ -3732,7 +3732,7 @@ const Ei = {
|
|
|
3732
3732
|
initData_: function() {
|
|
3733
3733
|
if (this.output.id)
|
|
3734
3734
|
return;
|
|
3735
|
-
const t =
|
|
3735
|
+
const t = wt().outputs?.[0];
|
|
3736
3736
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3737
3737
|
},
|
|
3738
3738
|
saveExtraState: function() {
|
|
@@ -3746,7 +3746,7 @@ const Ei = {
|
|
|
3746
3746
|
}, 0);
|
|
3747
3747
|
},
|
|
3748
3748
|
genOutputOpts_: function() {
|
|
3749
|
-
return
|
|
3749
|
+
return di();
|
|
3750
3750
|
},
|
|
3751
3751
|
onchange: function(t) {
|
|
3752
3752
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3796,7 +3796,7 @@ const Ei = {
|
|
|
3796
3796
|
this.setWarningText(null);
|
|
3797
3797
|
}
|
|
3798
3798
|
};
|
|
3799
|
-
d.set_func_output_v1 =
|
|
3799
|
+
d.set_func_output_v1 = gi;
|
|
3800
3800
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3801
3801
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3802
3802
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3869,13 +3869,13 @@ function Lt(t, e, n) {
|
|
|
3869
3869
|
if (a)
|
|
3870
3870
|
return a.columns.find((l) => l.id === n);
|
|
3871
3871
|
}
|
|
3872
|
-
function
|
|
3872
|
+
function Ai(t, e) {
|
|
3873
3873
|
const n = [];
|
|
3874
3874
|
return et(t, e).forEach(({ id: i, name: a }) => {
|
|
3875
3875
|
n.push([a, i]);
|
|
3876
3876
|
}), N(n);
|
|
3877
3877
|
}
|
|
3878
|
-
function
|
|
3878
|
+
function Ii(t) {
|
|
3879
3879
|
const e = t.getInput("TABLE").connection;
|
|
3880
3880
|
if (e.targetBlock())
|
|
3881
3881
|
return;
|
|
@@ -3909,7 +3909,7 @@ function Ai(t) {
|
|
|
3909
3909
|
}, l = $.blocks.append(a, t.workspace);
|
|
3910
3910
|
e.connect(l.outputConnection);
|
|
3911
3911
|
}
|
|
3912
|
-
function
|
|
3912
|
+
function Oi(t) {
|
|
3913
3913
|
const e = t.getInput("HANDLE").connection;
|
|
3914
3914
|
if (e.targetBlock())
|
|
3915
3915
|
return;
|
|
@@ -3933,7 +3933,7 @@ function Ii(t) {
|
|
|
3933
3933
|
}, o = $.blocks.append(n, t.workspace);
|
|
3934
3934
|
e.connect(o.previousConnection);
|
|
3935
3935
|
}
|
|
3936
|
-
const
|
|
3936
|
+
const Ci = {
|
|
3937
3937
|
init: function() {
|
|
3938
3938
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
3939
3939
|
},
|
|
@@ -3949,14 +3949,14 @@ const Oi = {
|
|
|
3949
3949
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3950
3950
|
},
|
|
3951
3951
|
ensureBlocks_: function() {
|
|
3952
|
-
this.isInsertionMarker() || (
|
|
3952
|
+
this.isInsertionMarker() || (Ii(this), F(this, [
|
|
3953
3953
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3954
3954
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3955
3955
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3956
|
-
]),
|
|
3956
|
+
]), Oi(this));
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
|
-
d.add_data_v1 =
|
|
3959
|
+
d.add_data_v1 = Ci;
|
|
3960
3960
|
s.forBlock.add_data_v1 = function(t) {
|
|
3961
3961
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3962
3962
|
return `{
|
|
@@ -3972,7 +3972,7 @@ ${e}}
|
|
|
3972
3972
|
${o}}
|
|
3973
3973
|
`;
|
|
3974
3974
|
};
|
|
3975
|
-
const
|
|
3975
|
+
const ki = {
|
|
3976
3976
|
init: function() {
|
|
3977
3977
|
this.space = {
|
|
3978
3978
|
id: "",
|
|
@@ -4032,7 +4032,7 @@ const Ci = {
|
|
|
4032
4032
|
return pt(this.space.id);
|
|
4033
4033
|
},
|
|
4034
4034
|
genColumnOpts_: function() {
|
|
4035
|
-
return
|
|
4035
|
+
return Ai(this.space.id, this.table.id);
|
|
4036
4036
|
},
|
|
4037
4037
|
onchange: function(t) {
|
|
4038
4038
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4125,7 +4125,7 @@ const Ci = {
|
|
|
4125
4125
|
this.setWarningText(null);
|
|
4126
4126
|
}
|
|
4127
4127
|
};
|
|
4128
|
-
d.cond_atomic_v1 =
|
|
4128
|
+
d.cond_atomic_v1 = ki;
|
|
4129
4129
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4130
4130
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4131
4131
|
EQ: "=",
|
|
@@ -4137,19 +4137,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4137
4137
|
}[n.getFieldValue("OP")];
|
|
4138
4138
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4139
4139
|
};
|
|
4140
|
-
const
|
|
4140
|
+
const vi = {
|
|
4141
4141
|
init: function() {
|
|
4142
4142
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4143
4143
|
}
|
|
4144
4144
|
};
|
|
4145
|
-
d.cond_logic_container_v1 =
|
|
4146
|
-
const
|
|
4145
|
+
d.cond_logic_container_v1 = vi;
|
|
4146
|
+
const yi = {
|
|
4147
4147
|
init: function() {
|
|
4148
4148
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4149
|
}
|
|
4150
4150
|
};
|
|
4151
|
-
d.cond_logic_item_v1 =
|
|
4152
|
-
const
|
|
4151
|
+
d.cond_logic_item_v1 = yi;
|
|
4152
|
+
const Ni = {
|
|
4153
4153
|
init: function() {
|
|
4154
4154
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4155
4155
|
new m([
|
|
@@ -4223,7 +4223,7 @@ const yi = {
|
|
|
4223
4223
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4224
4224
|
}
|
|
4225
4225
|
};
|
|
4226
|
-
d.cond_logic_v1 =
|
|
4226
|
+
d.cond_logic_v1 = Ni;
|
|
4227
4227
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4228
4228
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4229
4229
|
i.push(a);
|
|
@@ -4233,7 +4233,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4233
4233
|
}
|
|
4234
4234
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4235
4235
|
};
|
|
4236
|
-
function
|
|
4236
|
+
function Li(t) {
|
|
4237
4237
|
const e = t.getInput("TABLE").connection;
|
|
4238
4238
|
if (e.targetBlock())
|
|
4239
4239
|
return;
|
|
@@ -4252,7 +4252,7 @@ function Ni(t) {
|
|
|
4252
4252
|
}, a = $.blocks.append(i, t.workspace);
|
|
4253
4253
|
e.connect(a.outputConnection);
|
|
4254
4254
|
}
|
|
4255
|
-
function
|
|
4255
|
+
function Si(t) {
|
|
4256
4256
|
const e = t.getInput("CONDITION").connection;
|
|
4257
4257
|
if (e.targetBlock())
|
|
4258
4258
|
return;
|
|
@@ -4277,7 +4277,7 @@ function Li(t) {
|
|
|
4277
4277
|
}, l = $.blocks.append(a, t.workspace);
|
|
4278
4278
|
e.connect(l.outputConnection);
|
|
4279
4279
|
}
|
|
4280
|
-
function
|
|
4280
|
+
function bi(t) {
|
|
4281
4281
|
const e = t.getInput("HANDLE").connection;
|
|
4282
4282
|
if (e.targetBlock())
|
|
4283
4283
|
return;
|
|
@@ -4301,7 +4301,7 @@ function Si(t) {
|
|
|
4301
4301
|
}, o = $.blocks.append(n, t.workspace);
|
|
4302
4302
|
e.connect(o.previousConnection);
|
|
4303
4303
|
}
|
|
4304
|
-
const
|
|
4304
|
+
const Bi = {
|
|
4305
4305
|
init: function() {
|
|
4306
4306
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
4307
4307
|
},
|
|
@@ -4317,13 +4317,13 @@ const bi = {
|
|
|
4317
4317
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4318
4318
|
},
|
|
4319
4319
|
ensureBlocks_: function() {
|
|
4320
|
-
this.isInsertionMarker() || (
|
|
4320
|
+
this.isInsertionMarker() || (Li(this), Si(this), F(this, [
|
|
4321
4321
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4322
4322
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4323
|
-
]),
|
|
4323
|
+
]), bi(this));
|
|
4324
4324
|
}
|
|
4325
4325
|
};
|
|
4326
|
-
d.delete_data_v1 =
|
|
4326
|
+
d.delete_data_v1 = Bi;
|
|
4327
4327
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4328
4328
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4329
4329
|
return `{
|
|
@@ -4361,7 +4361,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4361
4361
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4362
4362
|
`;
|
|
4363
4363
|
};
|
|
4364
|
-
function
|
|
4364
|
+
function Ri(t) {
|
|
4365
4365
|
const e = t.getInput("TABLE").connection;
|
|
4366
4366
|
if (e.targetBlock())
|
|
4367
4367
|
return;
|
|
@@ -4395,7 +4395,7 @@ function Bi(t) {
|
|
|
4395
4395
|
}, l = $.blocks.append(a, t.workspace);
|
|
4396
4396
|
e.connect(l.outputConnection);
|
|
4397
4397
|
}
|
|
4398
|
-
function
|
|
4398
|
+
function Di(t) {
|
|
4399
4399
|
const e = t.getInput("CONDITION").connection;
|
|
4400
4400
|
if (e.targetBlock())
|
|
4401
4401
|
return;
|
|
@@ -4404,7 +4404,7 @@ function Ri(t) {
|
|
|
4404
4404
|
}, o = $.blocks.append(n, t.workspace);
|
|
4405
4405
|
e.connect(o.outputConnection);
|
|
4406
4406
|
}
|
|
4407
|
-
function
|
|
4407
|
+
function Ui(t) {
|
|
4408
4408
|
const e = t.getInput("EXTRA").connection;
|
|
4409
4409
|
if (e.targetBlock())
|
|
4410
4410
|
return;
|
|
@@ -4441,7 +4441,7 @@ function Di(t) {
|
|
|
4441
4441
|
}, o = $.blocks.append(n, t.workspace);
|
|
4442
4442
|
e.connect(o.outputConnection);
|
|
4443
4443
|
}
|
|
4444
|
-
function
|
|
4444
|
+
function Mi(t) {
|
|
4445
4445
|
const e = t.getInput("HANDLE").connection;
|
|
4446
4446
|
if (e.targetBlock())
|
|
4447
4447
|
return;
|
|
@@ -4479,7 +4479,7 @@ h([
|
|
|
4479
4479
|
style: "procedure_blocks"
|
|
4480
4480
|
}
|
|
4481
4481
|
]);
|
|
4482
|
-
const
|
|
4482
|
+
const Vi = {
|
|
4483
4483
|
init: function() {
|
|
4484
4484
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
4485
4485
|
},
|
|
@@ -4495,15 +4495,15 @@ const Mi = {
|
|
|
4495
4495
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4496
4496
|
},
|
|
4497
4497
|
ensureBlocks_: function() {
|
|
4498
|
-
this.isInsertionMarker() || (
|
|
4498
|
+
this.isInsertionMarker() || (Ri(this), Di(this), Ui(this), F(this, [
|
|
4499
4499
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4500
4500
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4501
4501
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4502
4502
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4503
|
-
]),
|
|
4503
|
+
]), Mi(this));
|
|
4504
4504
|
}
|
|
4505
4505
|
};
|
|
4506
|
-
d.query_data_v1 =
|
|
4506
|
+
d.query_data_v1 = Vi;
|
|
4507
4507
|
s.forBlock.query_data_v1 = function(t) {
|
|
4508
4508
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4509
4509
|
return `{
|
|
@@ -4576,19 +4576,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4576
4576
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4577
4577
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4578
4578
|
};
|
|
4579
|
-
const
|
|
4579
|
+
const Pi = {
|
|
4580
4580
|
init: function() {
|
|
4581
4581
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4582
4582
|
}
|
|
4583
4583
|
};
|
|
4584
|
-
d.select_column_container_v1 =
|
|
4585
|
-
const
|
|
4584
|
+
d.select_column_container_v1 = Pi;
|
|
4585
|
+
const xi = {
|
|
4586
4586
|
init: function() {
|
|
4587
4587
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4588
|
}
|
|
4589
4589
|
};
|
|
4590
|
-
d.select_column_item_v1 =
|
|
4591
|
-
const
|
|
4590
|
+
d.select_column_item_v1 = xi;
|
|
4591
|
+
const Fi = {
|
|
4592
4592
|
init: function() {
|
|
4593
4593
|
this.space = {
|
|
4594
4594
|
id: "",
|
|
@@ -4783,7 +4783,7 @@ const xi = {
|
|
|
4783
4783
|
this.setWarningText(null);
|
|
4784
4784
|
}
|
|
4785
4785
|
};
|
|
4786
|
-
d.select_column_v1 =
|
|
4786
|
+
d.select_column_v1 = Fi;
|
|
4787
4787
|
s.forBlock.select_column_v1 = function(t) {
|
|
4788
4788
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4789
4789
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4795,7 +4795,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4795
4795
|
A !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4796
4796
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4797
4797
|
};
|
|
4798
|
-
const
|
|
4798
|
+
const wi = {
|
|
4799
4799
|
init: function() {
|
|
4800
4800
|
this.space = {
|
|
4801
4801
|
id: "",
|
|
@@ -4883,7 +4883,7 @@ const Fi = {
|
|
|
4883
4883
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4884
4884
|
}
|
|
4885
4885
|
};
|
|
4886
|
-
d.select_table_v1 =
|
|
4886
|
+
d.select_table_v1 = wi;
|
|
4887
4887
|
s.forBlock.select_table_v1 = function(t) {
|
|
4888
4888
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4889
4889
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
@@ -4912,7 +4912,7 @@ const Yi = {
|
|
|
4912
4912
|
};
|
|
4913
4913
|
d.transaction_v1 = Yi;
|
|
4914
4914
|
s.forBlock.transaction_v1 = function(t) {
|
|
4915
|
-
const e = s.INDENT, n = t, o =
|
|
4915
|
+
const e = s.INDENT, n = t, o = Ro(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4916
4916
|
return `{
|
|
4917
4917
|
${e}var __error${o}__ = '';
|
|
4918
4918
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4954,19 +4954,19 @@ ${e}}
|
|
|
4954
4954
|
}
|
|
4955
4955
|
`;
|
|
4956
4956
|
};
|
|
4957
|
-
const
|
|
4957
|
+
const Ki = {
|
|
4958
4958
|
init: function() {
|
|
4959
4959
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
4962
|
-
d.update_column_container_v1 =
|
|
4963
|
-
const
|
|
4962
|
+
d.update_column_container_v1 = Ki;
|
|
4963
|
+
const $i = {
|
|
4964
4964
|
init: function() {
|
|
4965
4965
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4966
|
}
|
|
4967
4967
|
};
|
|
4968
|
-
d.update_column_item_v1 =
|
|
4969
|
-
const
|
|
4968
|
+
d.update_column_item_v1 = $i;
|
|
4969
|
+
const Hi = {
|
|
4970
4970
|
init: function() {
|
|
4971
4971
|
this.space = {
|
|
4972
4972
|
id: "",
|
|
@@ -5195,7 +5195,7 @@ const $i = {
|
|
|
5195
5195
|
this.setWarningText(null);
|
|
5196
5196
|
}
|
|
5197
5197
|
};
|
|
5198
|
-
d.update_column_v1 =
|
|
5198
|
+
d.update_column_v1 = Hi;
|
|
5199
5199
|
s.forBlock.update_column_v1 = function(t) {
|
|
5200
5200
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5201
5201
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5207,7 +5207,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5207
5207
|
A !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5208
5208
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5209
5209
|
};
|
|
5210
|
-
function
|
|
5210
|
+
function Gi(t) {
|
|
5211
5211
|
const e = t.getInput("TABLE").connection;
|
|
5212
5212
|
if (e.targetBlock())
|
|
5213
5213
|
return;
|
|
@@ -5241,7 +5241,7 @@ function Hi(t) {
|
|
|
5241
5241
|
}, l = $.blocks.append(a, t.workspace);
|
|
5242
5242
|
e.connect(l.outputConnection);
|
|
5243
5243
|
}
|
|
5244
|
-
function
|
|
5244
|
+
function Wi(t) {
|
|
5245
5245
|
const e = t.getInput("CONDITION").connection;
|
|
5246
5246
|
if (e.targetBlock())
|
|
5247
5247
|
return;
|
|
@@ -5250,7 +5250,7 @@ function Gi(t) {
|
|
|
5250
5250
|
}, o = $.blocks.append(n, t.workspace);
|
|
5251
5251
|
e.connect(o.outputConnection);
|
|
5252
5252
|
}
|
|
5253
|
-
function
|
|
5253
|
+
function ji(t) {
|
|
5254
5254
|
const e = t.getInput("HANDLE").connection;
|
|
5255
5255
|
if (e.targetBlock())
|
|
5256
5256
|
return;
|
|
@@ -5274,7 +5274,7 @@ function Wi(t) {
|
|
|
5274
5274
|
}, o = $.blocks.append(n, t.workspace);
|
|
5275
5275
|
e.connect(o.previousConnection);
|
|
5276
5276
|
}
|
|
5277
|
-
const
|
|
5277
|
+
const Xi = {
|
|
5278
5278
|
init: function() {
|
|
5279
5279
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
5280
5280
|
},
|
|
@@ -5290,14 +5290,14 @@ const ji = {
|
|
|
5290
5290
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5291
5291
|
},
|
|
5292
5292
|
ensureBlocks: function() {
|
|
5293
|
-
this.isInsertionMarker() || (
|
|
5293
|
+
this.isInsertionMarker() || (Gi(this), Wi(this), F(this, [
|
|
5294
5294
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5295
5295
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5296
5296
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5297
|
-
]),
|
|
5297
|
+
]), ji(this));
|
|
5298
5298
|
}
|
|
5299
5299
|
};
|
|
5300
|
-
d.update_data_v1 =
|
|
5300
|
+
d.update_data_v1 = Xi;
|
|
5301
5301
|
s.forBlock.update_data_v1 = function(t) {
|
|
5302
5302
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5303
5303
|
return `{
|
|
@@ -5314,7 +5314,7 @@ ${e}}
|
|
|
5314
5314
|
${i}}
|
|
5315
5315
|
`;
|
|
5316
5316
|
};
|
|
5317
|
-
const
|
|
5317
|
+
const Ji = v.xml, qi = {
|
|
5318
5318
|
init: function() {
|
|
5319
5319
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5320
5320
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5323,7 +5323,7 @@ const Xi = v.xml, Ji = {
|
|
|
5323
5323
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5324
5324
|
},
|
|
5325
5325
|
mutationToDom: function() {
|
|
5326
|
-
const t =
|
|
5326
|
+
const t = Ji.createElement("mutation");
|
|
5327
5327
|
return t.setAttribute("items", String(this.length)), t;
|
|
5328
5328
|
},
|
|
5329
5329
|
domToMutation: function(t) {
|
|
@@ -5375,8 +5375,8 @@ const Xi = v.xml, Ji = {
|
|
|
5375
5375
|
this.length--;
|
|
5376
5376
|
}
|
|
5377
5377
|
};
|
|
5378
|
-
d.json_array_v1 =
|
|
5379
|
-
const
|
|
5378
|
+
d.json_array_v1 = qi;
|
|
5379
|
+
const Qi = {
|
|
5380
5380
|
init: function() {
|
|
5381
5381
|
this.appendDummyInput().appendField(
|
|
5382
5382
|
new dn([
|
|
@@ -5387,8 +5387,8 @@ const qi = {
|
|
|
5387
5387
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5388
5388
|
}
|
|
5389
5389
|
};
|
|
5390
|
-
d.json_boolean_v1 =
|
|
5391
|
-
const ln = v.xml,
|
|
5390
|
+
d.json_boolean_v1 = Qi;
|
|
5391
|
+
const ln = v.xml, zi = {
|
|
5392
5392
|
init: function() {
|
|
5393
5393
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5394
5394
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5454,38 +5454,38 @@ const ln = v.xml, Qi = {
|
|
|
5454
5454
|
this.length--;
|
|
5455
5455
|
}
|
|
5456
5456
|
};
|
|
5457
|
-
d.json_map_v1 =
|
|
5458
|
-
const
|
|
5457
|
+
d.json_map_v1 = zi;
|
|
5458
|
+
const Zi = {
|
|
5459
5459
|
init: function() {
|
|
5460
5460
|
this.appendDummyInput().appendField(new Rt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5461
5461
|
}
|
|
5462
5462
|
};
|
|
5463
|
-
d.json_number_v1 =
|
|
5464
|
-
const
|
|
5463
|
+
d.json_number_v1 = Zi;
|
|
5464
|
+
const es = {
|
|
5465
5465
|
init: function() {
|
|
5466
5466
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5467
5467
|
}
|
|
5468
5468
|
};
|
|
5469
|
-
d.json_root_v1 =
|
|
5470
|
-
const
|
|
5469
|
+
d.json_root_v1 = es;
|
|
5470
|
+
const ts = {
|
|
5471
5471
|
init: function() {
|
|
5472
5472
|
this.appendDummyInput().appendField('"').appendField(new re(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5473
5473
|
}
|
|
5474
5474
|
};
|
|
5475
|
-
d.json_string_v1 =
|
|
5476
|
-
const
|
|
5475
|
+
d.json_string_v1 = ts;
|
|
5476
|
+
const ns = v.xml, os = {
|
|
5477
5477
|
init: function() {
|
|
5478
5478
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5479
5479
|
}
|
|
5480
5480
|
};
|
|
5481
|
-
d.list_create_container_v1 =
|
|
5482
|
-
const
|
|
5481
|
+
d.list_create_container_v1 = os;
|
|
5482
|
+
const is = {
|
|
5483
5483
|
init: function() {
|
|
5484
5484
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5485
|
}
|
|
5486
5486
|
};
|
|
5487
|
-
d.list_create_item_v1 =
|
|
5488
|
-
const
|
|
5487
|
+
d.list_create_item_v1 = is;
|
|
5488
|
+
const ss = {
|
|
5489
5489
|
init: function() {
|
|
5490
5490
|
this.itemCount_ = 0, this.setMutator(
|
|
5491
5491
|
new Te.MutatorIcon(
|
|
@@ -5495,7 +5495,7 @@ const is = {
|
|
|
5495
5495
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5496
5496
|
},
|
|
5497
5497
|
mutationToDom: function() {
|
|
5498
|
-
const t =
|
|
5498
|
+
const t = ns.createElement("mutation");
|
|
5499
5499
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5500
5500
|
},
|
|
5501
5501
|
domToMutation: function(t) {
|
|
@@ -5568,7 +5568,7 @@ const is = {
|
|
|
5568
5568
|
this.removeInput("ADD" + t);
|
|
5569
5569
|
}
|
|
5570
5570
|
};
|
|
5571
|
-
d.list_create_v1 =
|
|
5571
|
+
d.list_create_v1 = ss;
|
|
5572
5572
|
s.forBlock.list_create_v1 = function(t) {
|
|
5573
5573
|
const e = t, n = new Array(e.itemCount_);
|
|
5574
5574
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5784,7 +5784,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5784
5784
|
return `${e}[${n}] = ${o};
|
|
5785
5785
|
`;
|
|
5786
5786
|
};
|
|
5787
|
-
const
|
|
5787
|
+
const as = {
|
|
5788
5788
|
// logic_compare
|
|
5789
5789
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5790
5790
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5798,7 +5798,7 @@ const ss = {
|
|
|
5798
5798
|
};
|
|
5799
5799
|
R.register(
|
|
5800
5800
|
"logic_op_tooltip_v1",
|
|
5801
|
-
R.buildTooltipForDropdown("OP",
|
|
5801
|
+
R.buildTooltipForDropdown("OP", as)
|
|
5802
5802
|
);
|
|
5803
5803
|
h([
|
|
5804
5804
|
{
|
|
@@ -5823,7 +5823,7 @@ h([
|
|
|
5823
5823
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5824
5824
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5825
5825
|
};
|
|
5826
|
-
const
|
|
5826
|
+
const cs = {
|
|
5827
5827
|
onchange: function(t) {
|
|
5828
5828
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5829
5829
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5843,7 +5843,7 @@ const as = {
|
|
|
5843
5843
|
R.register(
|
|
5844
5844
|
"logic_compare_v1",
|
|
5845
5845
|
function() {
|
|
5846
|
-
this.mixin(
|
|
5846
|
+
this.mixin(cs);
|
|
5847
5847
|
}
|
|
5848
5848
|
);
|
|
5849
5849
|
h([
|
|
@@ -5893,7 +5893,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5893
5893
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5894
5894
|
return [`${i} ${n} ${a}`, o];
|
|
5895
5895
|
};
|
|
5896
|
-
const
|
|
5896
|
+
const ls = {
|
|
5897
5897
|
elseIfCount_: 0,
|
|
5898
5898
|
hasElse_: !1,
|
|
5899
5899
|
mutationToDom: function() {
|
|
@@ -6020,7 +6020,7 @@ const cs = {
|
|
|
6020
6020
|
};
|
|
6021
6021
|
R.registerMutator(
|
|
6022
6022
|
"logic_if_v1_mutator",
|
|
6023
|
-
|
|
6023
|
+
ls,
|
|
6024
6024
|
void 0,
|
|
6025
6025
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6026
6026
|
);
|
|
@@ -6166,7 +6166,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6166
|
}
|
|
6167
6167
|
return [`${o} ${e} ${i}`, n];
|
|
6168
6168
|
};
|
|
6169
|
-
const
|
|
6169
|
+
const us = {
|
|
6170
6170
|
prevParentConnection_: null,
|
|
6171
6171
|
onchange: function(t) {
|
|
6172
6172
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6181,7 +6181,7 @@ const ls = {
|
|
|
6181
6181
|
this.prevParentConnection_ = o;
|
|
6182
6182
|
}
|
|
6183
6183
|
};
|
|
6184
|
-
R.registerMixin("logic_ternary_v1",
|
|
6184
|
+
R.registerMixin("logic_ternary_v1", us);
|
|
6185
6185
|
h([
|
|
6186
6186
|
{
|
|
6187
6187
|
type: "logic_ternary_v1",
|
|
@@ -6218,7 +6218,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6218
6218
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6219
6219
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6220
6220
|
};
|
|
6221
|
-
const
|
|
6221
|
+
const rs = {
|
|
6222
6222
|
customContextMenu: function(t) {
|
|
6223
6223
|
if (this.isInFlyout)
|
|
6224
6224
|
return;
|
|
@@ -6240,7 +6240,7 @@ const us = {
|
|
|
6240
6240
|
};
|
|
6241
6241
|
R.registerMixin(
|
|
6242
6242
|
"contextMenu_newGetVariableBlock_v1",
|
|
6243
|
-
|
|
6243
|
+
rs
|
|
6244
6244
|
);
|
|
6245
6245
|
R.register(
|
|
6246
6246
|
"flow_control_tooltip_v1",
|
|
@@ -6249,16 +6249,16 @@ R.register(
|
|
|
6249
6249
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6250
6250
|
})
|
|
6251
6251
|
);
|
|
6252
|
-
const
|
|
6252
|
+
const _s = /* @__PURE__ */ new Set([
|
|
6253
6253
|
"repeat_v1",
|
|
6254
6254
|
"for_each_v1",
|
|
6255
6255
|
"for_v1",
|
|
6256
6256
|
"while_until_v1"
|
|
6257
|
-
]),
|
|
6257
|
+
]), ps = {
|
|
6258
6258
|
getSurroundLoop: function() {
|
|
6259
6259
|
let t = this;
|
|
6260
6260
|
do {
|
|
6261
|
-
if (
|
|
6261
|
+
if (_s.has(t.type))
|
|
6262
6262
|
return t;
|
|
6263
6263
|
t = t?.getSurroundParent();
|
|
6264
6264
|
} while (t);
|
|
@@ -6281,7 +6281,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
6281
6281
|
};
|
|
6282
6282
|
R.registerMixin(
|
|
6283
6283
|
"flow_control_in_loop_check_v1",
|
|
6284
|
-
|
|
6284
|
+
ps
|
|
6285
6285
|
);
|
|
6286
6286
|
h([
|
|
6287
6287
|
{
|
|
@@ -6583,7 +6583,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6583
6583
|
${o}}
|
|
6584
6584
|
`;
|
|
6585
6585
|
};
|
|
6586
|
-
const
|
|
6586
|
+
const hs = {
|
|
6587
6587
|
// math_arithmetic
|
|
6588
6588
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6589
6589
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6617,7 +6617,7 @@ const ps = {
|
|
|
6617
6617
|
};
|
|
6618
6618
|
R.register(
|
|
6619
6619
|
"math_op_tooltip_v1",
|
|
6620
|
-
R.buildTooltipForDropdown("OP",
|
|
6620
|
+
R.buildTooltipForDropdown("OP", hs)
|
|
6621
6621
|
);
|
|
6622
6622
|
h([
|
|
6623
6623
|
{
|
|
@@ -7220,21 +7220,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7220
7220
|
}
|
|
7221
7221
|
return [o, c.DIVISION];
|
|
7222
7222
|
};
|
|
7223
|
-
const
|
|
7223
|
+
const ds = v.xml, fs = {
|
|
7224
7224
|
init: function() {
|
|
7225
7225
|
this.appendDummyInput().appendField(
|
|
7226
7226
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7227
7227
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7228
7228
|
}
|
|
7229
7229
|
};
|
|
7230
|
-
d.object_create_container_v1 =
|
|
7231
|
-
const
|
|
7230
|
+
d.object_create_container_v1 = fs;
|
|
7231
|
+
const ms = {
|
|
7232
7232
|
init: function() {
|
|
7233
7233
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7234
|
}
|
|
7235
7235
|
};
|
|
7236
|
-
d.object_create_item_v1 =
|
|
7237
|
-
const
|
|
7236
|
+
d.object_create_item_v1 = ms;
|
|
7237
|
+
const Ts = {
|
|
7238
7238
|
init: function() {
|
|
7239
7239
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7240
7240
|
new Te.MutatorIcon(
|
|
@@ -7244,7 +7244,7 @@ const ms = {
|
|
|
7244
7244
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7245
7245
|
},
|
|
7246
7246
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7247
|
+
const t = ds.createElement("mutation");
|
|
7248
7248
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7249
7249
|
},
|
|
7250
7250
|
domToMutation: function(t) {
|
|
@@ -7308,7 +7308,7 @@ const ms = {
|
|
|
7308
7308
|
this.removeInput("ADD" + t);
|
|
7309
7309
|
}
|
|
7310
7310
|
};
|
|
7311
|
-
d.object_create_v1 =
|
|
7311
|
+
d.object_create_v1 = Ts;
|
|
7312
7312
|
s.forBlock.object_create_v1 = function(t) {
|
|
7313
7313
|
const e = t;
|
|
7314
7314
|
let n = "{";
|
|
@@ -7566,13 +7566,13 @@ h([
|
|
|
7566
7566
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7567
7567
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7568
7568
|
};
|
|
7569
|
-
const un = v.xml,
|
|
7569
|
+
const un = v.xml, Es = {
|
|
7570
7570
|
init: function() {
|
|
7571
7571
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new uo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7572
7572
|
}
|
|
7573
7573
|
};
|
|
7574
|
-
d.procedure_def_container_v1 =
|
|
7575
|
-
const
|
|
7574
|
+
d.procedure_def_container_v1 = Es;
|
|
7575
|
+
const gs = {
|
|
7576
7576
|
init: function() {
|
|
7577
7577
|
const t = new re(Dt.DEFAULT_ARG);
|
|
7578
7578
|
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;
|
|
@@ -7594,8 +7594,8 @@ const Es = {
|
|
|
7594
7594
|
return t;
|
|
7595
7595
|
}
|
|
7596
7596
|
};
|
|
7597
|
-
d.procedure_def_item_v1 =
|
|
7598
|
-
const
|
|
7597
|
+
d.procedure_def_item_v1 = gs;
|
|
7598
|
+
const As = {
|
|
7599
7599
|
init: function() {
|
|
7600
7600
|
this.withReturn = !1, this.args = [];
|
|
7601
7601
|
const t = new re(
|
|
@@ -7699,13 +7699,13 @@ const gs = {
|
|
|
7699
7699
|
}
|
|
7700
7700
|
}
|
|
7701
7701
|
};
|
|
7702
|
-
d.procedure_def_v1 =
|
|
7703
|
-
const
|
|
7702
|
+
d.procedure_def_v1 = As;
|
|
7703
|
+
const Is = v.xml, Os = {
|
|
7704
7704
|
init: function() {
|
|
7705
7705
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
7706
7706
|
},
|
|
7707
7707
|
mutationToDom: function() {
|
|
7708
|
-
const t =
|
|
7708
|
+
const t = Is.createElement("mutation");
|
|
7709
7709
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7710
7710
|
},
|
|
7711
7711
|
domToMutation: function(t) {
|
|
@@ -7756,14 +7756,14 @@ const As = v.xml, Is = {
|
|
|
7756
7756
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7757
7757
|
}
|
|
7758
7758
|
};
|
|
7759
|
-
d.procedure_return_v1 =
|
|
7759
|
+
d.procedure_return_v1 = Os;
|
|
7760
7760
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7761
7761
|
const e = t;
|
|
7762
7762
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7763
7763
|
` : `return;
|
|
7764
7764
|
`;
|
|
7765
7765
|
};
|
|
7766
|
-
const
|
|
7766
|
+
const Cs = {
|
|
7767
7767
|
init: function() {
|
|
7768
7768
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
7769
7769
|
},
|
|
@@ -7786,7 +7786,7 @@ const Os = {
|
|
|
7786
7786
|
]);
|
|
7787
7787
|
}
|
|
7788
7788
|
};
|
|
7789
|
-
d.download_resource_v1 =
|
|
7789
|
+
d.download_resource_v1 = Cs;
|
|
7790
7790
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7791
7791
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7792
7792
|
return `{
|
|
@@ -7814,7 +7814,7 @@ function Un(t) {
|
|
|
7814
7814
|
}
|
|
7815
7815
|
return o(e.dirTree, ""), n;
|
|
7816
7816
|
}
|
|
7817
|
-
function
|
|
7817
|
+
function ks(t) {
|
|
7818
7818
|
const e = [];
|
|
7819
7819
|
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7820
7820
|
e.push([i, o]);
|
|
@@ -7829,7 +7829,7 @@ function Mn(t, e) {
|
|
|
7829
7829
|
i.dirid === e && o.push(i);
|
|
7830
7830
|
}), o;
|
|
7831
7831
|
}
|
|
7832
|
-
function
|
|
7832
|
+
function vs(t, e) {
|
|
7833
7833
|
const n = [];
|
|
7834
7834
|
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7835
7835
|
n.push([a, i]);
|
|
@@ -7841,13 +7841,13 @@ function Vn() {
|
|
|
7841
7841
|
e.resources.length > 0 && t.push(e);
|
|
7842
7842
|
}), t;
|
|
7843
7843
|
}
|
|
7844
|
-
function
|
|
7844
|
+
function ys() {
|
|
7845
7845
|
const t = [];
|
|
7846
7846
|
return Vn().forEach(({ id: n, name: o }) => {
|
|
7847
7847
|
t.push([o, n]);
|
|
7848
7848
|
}), N(t);
|
|
7849
7849
|
}
|
|
7850
|
-
const
|
|
7850
|
+
const Ns = {
|
|
7851
7851
|
init: function() {
|
|
7852
7852
|
this.space = {
|
|
7853
7853
|
id: "",
|
|
@@ -7896,20 +7896,20 @@ const ys = {
|
|
|
7896
7896
|
this.space = De(t.space), this.dir = De(t.dir), this.resource = De(t.resource);
|
|
7897
7897
|
},
|
|
7898
7898
|
genSpaceOpts_: function() {
|
|
7899
|
-
return
|
|
7899
|
+
return ys();
|
|
7900
7900
|
},
|
|
7901
7901
|
genDirOpts_: function() {
|
|
7902
|
-
return
|
|
7902
|
+
return ks(this.space.id);
|
|
7903
7903
|
},
|
|
7904
7904
|
genResourceOpts_: function() {
|
|
7905
|
-
return
|
|
7905
|
+
return vs(this.space.id, this.dir.id);
|
|
7906
7906
|
}
|
|
7907
7907
|
};
|
|
7908
|
-
d.select_resource_v1 =
|
|
7908
|
+
d.select_resource_v1 = Ns;
|
|
7909
7909
|
s.forBlock.select_resource_v1 = function() {
|
|
7910
7910
|
return "";
|
|
7911
7911
|
};
|
|
7912
|
-
const
|
|
7912
|
+
const Ls = {
|
|
7913
7913
|
init: function() {
|
|
7914
7914
|
this.appendDummyInput().appendField(
|
|
7915
7915
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7940,7 +7940,7 @@ const Ns = {
|
|
|
7940
7940
|
]);
|
|
7941
7941
|
}
|
|
7942
7942
|
};
|
|
7943
|
-
d.upload_resource_v1 =
|
|
7943
|
+
d.upload_resource_v1 = Ls;
|
|
7944
7944
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7945
7945
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7946
7946
|
return `{
|
|
@@ -7973,9 +7973,9 @@ h([
|
|
|
7973
7973
|
s.forBlock.text_v1 = function(t) {
|
|
7974
7974
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7975
7975
|
};
|
|
7976
|
-
const
|
|
7976
|
+
const Ss = /^\s*'([^']|\\')*'\s*$/;
|
|
7977
7977
|
function qe(t) {
|
|
7978
|
-
return
|
|
7978
|
+
return Ss.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7979
7979
|
}
|
|
7980
7980
|
R.register(
|
|
7981
7981
|
"text_append_tooltip_v1",
|
|
@@ -8179,10 +8179,10 @@ h([
|
|
|
8179
8179
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8180
8180
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8181
8181
|
};
|
|
8182
|
-
const
|
|
8182
|
+
const bs = v.xml, Bs = {
|
|
8183
8183
|
itemCount_: 0,
|
|
8184
8184
|
mutationToDom: function() {
|
|
8185
|
-
const t =
|
|
8185
|
+
const t = bs.createElement("mutation");
|
|
8186
8186
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8187
8187
|
},
|
|
8188
8188
|
domToMutation: function(t) {
|
|
@@ -8253,13 +8253,13 @@ const Ss = v.xml, bs = {
|
|
|
8253
8253
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8254
8254
|
this.removeInput("ADD" + t);
|
|
8255
8255
|
}
|
|
8256
|
-
},
|
|
8256
|
+
}, Rs = function() {
|
|
8257
8257
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Te.MutatorIcon(["text_join_item_v1"], this));
|
|
8258
8258
|
};
|
|
8259
8259
|
R.registerMutator(
|
|
8260
8260
|
"text_join_mutator_v1",
|
|
8261
|
-
|
|
8262
|
-
|
|
8261
|
+
Bs,
|
|
8262
|
+
Rs
|
|
8263
8263
|
);
|
|
8264
8264
|
h([
|
|
8265
8265
|
{
|
|
@@ -8491,7 +8491,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8491
8491
|
}[t.getFieldValue("MODE")];
|
|
8492
8492
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8493
8493
|
};
|
|
8494
|
-
const
|
|
8494
|
+
const Ds = {
|
|
8495
8495
|
init: function() {
|
|
8496
8496
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
8497
8497
|
},
|
|
@@ -8516,7 +8516,7 @@ const Rs = {
|
|
|
8516
8516
|
));
|
|
8517
8517
|
}
|
|
8518
8518
|
};
|
|
8519
|
-
d.create_timer_v1 =
|
|
8519
|
+
d.create_timer_v1 = Ds;
|
|
8520
8520
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8521
8521
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8522
8522
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8545,18 +8545,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8545
8545
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8546
8546
|
`;
|
|
8547
8547
|
};
|
|
8548
|
-
const
|
|
8548
|
+
const Us = {
|
|
8549
8549
|
customContextMenu: function(t) {
|
|
8550
8550
|
if (this.isInFlyout) {
|
|
8551
8551
|
if (this.type === "variable_get_v1") {
|
|
8552
8552
|
const e = {
|
|
8553
8553
|
text: _.RENAME_VARIABLE,
|
|
8554
8554
|
enabled: !0,
|
|
8555
|
-
callback:
|
|
8555
|
+
callback: Ms(this)
|
|
8556
8556
|
}, n = this.getField("VAR").getText(), o = {
|
|
8557
8557
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8558
8558
|
enabled: !0,
|
|
8559
|
-
callback:
|
|
8559
|
+
callback: Vs(this)
|
|
8560
8560
|
};
|
|
8561
8561
|
t.unshift(e), t.unshift(o);
|
|
8562
8562
|
}
|
|
@@ -8574,12 +8574,12 @@ const Ds = {
|
|
|
8574
8574
|
});
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
|
-
},
|
|
8577
|
+
}, Ms = function(t) {
|
|
8578
8578
|
return function() {
|
|
8579
8579
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8580
8580
|
ge.renameVariable(e, o);
|
|
8581
8581
|
};
|
|
8582
|
-
},
|
|
8582
|
+
}, Vs = function(t) {
|
|
8583
8583
|
return function() {
|
|
8584
8584
|
const n = t.getField("VAR").getVariable();
|
|
8585
8585
|
n && ge.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -8587,7 +8587,7 @@ const Ds = {
|
|
|
8587
8587
|
};
|
|
8588
8588
|
R.registerMixin(
|
|
8589
8589
|
"context_menu_variable_v1",
|
|
8590
|
-
|
|
8590
|
+
Us
|
|
8591
8591
|
);
|
|
8592
8592
|
h([
|
|
8593
8593
|
{
|
|
@@ -8644,7 +8644,7 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8644
8644
|
`;
|
|
8645
8645
|
};
|
|
8646
8646
|
const je = v.xml;
|
|
8647
|
-
function
|
|
8647
|
+
function Ps() {
|
|
8648
8648
|
const t = [];
|
|
8649
8649
|
{
|
|
8650
8650
|
const e = je.createElement("label");
|
|
@@ -8666,11 +8666,11 @@ function Vs() {
|
|
|
8666
8666
|
}
|
|
8667
8667
|
const tt = {
|
|
8668
8668
|
name: "INTERFACE_CATEGORY",
|
|
8669
|
-
callback:
|
|
8669
|
+
callback: Ps
|
|
8670
8670
|
}, b = v.xml;
|
|
8671
|
-
function
|
|
8671
|
+
function xs() {
|
|
8672
8672
|
const t = [];
|
|
8673
|
-
if (
|
|
8673
|
+
if (Xo()) {
|
|
8674
8674
|
{
|
|
8675
8675
|
const e = b.createElement("label");
|
|
8676
8676
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
@@ -8680,7 +8680,7 @@ function Ps() {
|
|
|
8680
8680
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8681
8681
|
}
|
|
8682
8682
|
}
|
|
8683
|
-
if (
|
|
8683
|
+
if (Fo()) {
|
|
8684
8684
|
{
|
|
8685
8685
|
const e = b.createElement("label");
|
|
8686
8686
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
@@ -8764,9 +8764,9 @@ function Ps() {
|
|
|
8764
8764
|
}
|
|
8765
8765
|
const nt = {
|
|
8766
8766
|
name: "UI_CATEGORY",
|
|
8767
|
-
callback:
|
|
8767
|
+
callback: xs
|
|
8768
8768
|
}, be = v.xml;
|
|
8769
|
-
function
|
|
8769
|
+
function Fs() {
|
|
8770
8770
|
const t = [];
|
|
8771
8771
|
{
|
|
8772
8772
|
const e = be.createElement("label");
|
|
@@ -8793,10 +8793,10 @@ function xs() {
|
|
|
8793
8793
|
}
|
|
8794
8794
|
const ce = {
|
|
8795
8795
|
name: "PROCEDURE_CATEGORY",
|
|
8796
|
-
callback:
|
|
8796
|
+
callback: Fs
|
|
8797
8797
|
}, Xe = v.xml;
|
|
8798
|
-
function
|
|
8799
|
-
const t =
|
|
8798
|
+
function ws() {
|
|
8799
|
+
const t = Ye(), e = [];
|
|
8800
8800
|
{
|
|
8801
8801
|
const o = Xe.createElement("label");
|
|
8802
8802
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
@@ -8833,7 +8833,7 @@ function Fs() {
|
|
|
8833
8833
|
}
|
|
8834
8834
|
const le = {
|
|
8835
8835
|
name: "VARIABLE_CATEGORY",
|
|
8836
|
-
callback:
|
|
8836
|
+
callback: ws
|
|
8837
8837
|
}, Ee = v.xml;
|
|
8838
8838
|
function Ys(t) {
|
|
8839
8839
|
const e = [];
|
|
@@ -8874,7 +8874,7 @@ const ot = {
|
|
|
8874
8874
|
name: "FLOW_CATEGORY",
|
|
8875
8875
|
callback: Ys
|
|
8876
8876
|
}, ne = v.xml;
|
|
8877
|
-
function
|
|
8877
|
+
function Ks(t) {
|
|
8878
8878
|
const { activeFunc: e } = T.compute, n = [];
|
|
8879
8879
|
if (t === "func") {
|
|
8880
8880
|
{
|
|
@@ -8923,9 +8923,9 @@ function ws(t) {
|
|
|
8923
8923
|
}
|
|
8924
8924
|
const it = {
|
|
8925
8925
|
name: "FUNC_CATEGORY",
|
|
8926
|
-
callback:
|
|
8926
|
+
callback: Ks
|
|
8927
8927
|
}, O = v.xml;
|
|
8928
|
-
function
|
|
8928
|
+
function $s() {
|
|
8929
8929
|
const t = [];
|
|
8930
8930
|
if (J().length > 0) {
|
|
8931
8931
|
{
|
|
@@ -9100,17 +9100,17 @@ function Ks() {
|
|
|
9100
9100
|
}
|
|
9101
9101
|
const st = {
|
|
9102
9102
|
name: "DATA_CATEGORY",
|
|
9103
|
-
callback:
|
|
9103
|
+
callback: $s
|
|
9104
9104
|
};
|
|
9105
9105
|
mn.setConfirm(async (t, e) => {
|
|
9106
|
-
const n = await
|
|
9106
|
+
const n = await No({
|
|
9107
9107
|
title: "",
|
|
9108
9108
|
text: t
|
|
9109
9109
|
});
|
|
9110
9110
|
e(!!n);
|
|
9111
9111
|
});
|
|
9112
9112
|
mn.setPrompt(async (t, e, n) => {
|
|
9113
|
-
const o = await
|
|
9113
|
+
const o = await Lo({
|
|
9114
9114
|
title: "",
|
|
9115
9115
|
value: e
|
|
9116
9116
|
});
|
|
@@ -9127,7 +9127,7 @@ async function rn(t) {
|
|
|
9127
9127
|
ro(e.default);
|
|
9128
9128
|
}
|
|
9129
9129
|
function Wt(t) {
|
|
9130
|
-
const e =
|
|
9130
|
+
const e = Ye();
|
|
9131
9131
|
if (!e)
|
|
9132
9132
|
return;
|
|
9133
9133
|
const n = e.getBlockById(t);
|
|
@@ -9140,7 +9140,7 @@ function Wt(t) {
|
|
|
9140
9140
|
e.scroll(-a, -l);
|
|
9141
9141
|
}
|
|
9142
9142
|
function xn() {
|
|
9143
|
-
const t =
|
|
9143
|
+
const t = Ye();
|
|
9144
9144
|
if (!t)
|
|
9145
9145
|
return;
|
|
9146
9146
|
const e = t.getTopBlocks(!0)?.[0];
|
|
@@ -9150,7 +9150,7 @@ function Fn(t) {
|
|
|
9150
9150
|
const e = t.getParent();
|
|
9151
9151
|
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9152
9152
|
}
|
|
9153
|
-
class
|
|
9153
|
+
class Hs {
|
|
9154
9154
|
init() {
|
|
9155
9155
|
const e = _o.registry.getItem("blockDisable");
|
|
9156
9156
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9161,10 +9161,10 @@ class $s {
|
|
|
9161
9161
|
}
|
|
9162
9162
|
po.registerFieldColour();
|
|
9163
9163
|
ho.registry.unregister(fo.names.ESCAPE);
|
|
9164
|
-
const
|
|
9165
|
-
|
|
9166
|
-
const
|
|
9167
|
-
|
|
9164
|
+
const Gs = new mo.CrossTabCopyPaste();
|
|
9165
|
+
Gs.init({ contextMenu: !0, shortcut: !0 });
|
|
9166
|
+
const Ws = new Hs();
|
|
9167
|
+
Ws.init();
|
|
9168
9168
|
ct.Classic.blockStyles = {
|
|
9169
9169
|
color_blocks: {
|
|
9170
9170
|
colourPrimary: "#a5745b",
|
|
@@ -9295,7 +9295,7 @@ ct.Classic.categoryStyles = {
|
|
|
9295
9295
|
colour: "#a55b80"
|
|
9296
9296
|
}
|
|
9297
9297
|
};
|
|
9298
|
-
const
|
|
9298
|
+
const js = Tn.defineTheme("light", {
|
|
9299
9299
|
name: "light",
|
|
9300
9300
|
base: ct.Classic,
|
|
9301
9301
|
componentStyles: {
|
|
@@ -9311,7 +9311,7 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9311
9311
|
scrollbarOpacity: 0.4,
|
|
9312
9312
|
cursorColour: ""
|
|
9313
9313
|
}
|
|
9314
|
-
}),
|
|
9314
|
+
}), Xs = Tn.defineTheme("dark", {
|
|
9315
9315
|
name: "dark",
|
|
9316
9316
|
base: ct.Classic,
|
|
9317
9317
|
componentStyles: {
|
|
@@ -9328,14 +9328,14 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9328
9328
|
cursorColour: ""
|
|
9329
9329
|
}
|
|
9330
9330
|
});
|
|
9331
|
-
function
|
|
9332
|
-
const e =
|
|
9331
|
+
function Js(t) {
|
|
9332
|
+
const e = Ye();
|
|
9333
9333
|
switch (t) {
|
|
9334
9334
|
case "light":
|
|
9335
|
-
e.setTheme(
|
|
9335
|
+
e.setTheme(js);
|
|
9336
9336
|
break;
|
|
9337
9337
|
case "dark":
|
|
9338
|
-
e.setTheme(
|
|
9338
|
+
e.setTheme(Xs);
|
|
9339
9339
|
break;
|
|
9340
9340
|
}
|
|
9341
9341
|
}
|
|
@@ -9787,7 +9787,7 @@ const ht = {
|
|
|
9787
9787
|
type: "math_on_list_v1"
|
|
9788
9788
|
}
|
|
9789
9789
|
]
|
|
9790
|
-
},
|
|
9790
|
+
}, wn = {
|
|
9791
9791
|
kind: "category",
|
|
9792
9792
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9793
9793
|
categorystyle: "message_category",
|
|
@@ -10054,7 +10054,7 @@ const ht = {
|
|
|
10054
10054
|
type: "text_reverse_v1"
|
|
10055
10055
|
}
|
|
10056
10056
|
]
|
|
10057
|
-
},
|
|
10057
|
+
}, Yn = {
|
|
10058
10058
|
kind: "category",
|
|
10059
10059
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10060
10060
|
categorystyle: "time_category",
|
|
@@ -10078,7 +10078,7 @@ const ht = {
|
|
|
10078
10078
|
}
|
|
10079
10079
|
}
|
|
10080
10080
|
]
|
|
10081
|
-
},
|
|
10081
|
+
}, qs = {
|
|
10082
10082
|
kind: "categoryToolbox",
|
|
10083
10083
|
contents: [
|
|
10084
10084
|
{
|
|
@@ -10087,7 +10087,7 @@ const ht = {
|
|
|
10087
10087
|
categorystyle: "ui_category",
|
|
10088
10088
|
custom: nt.name
|
|
10089
10089
|
},
|
|
10090
|
-
|
|
10090
|
+
wn,
|
|
10091
10091
|
mt,
|
|
10092
10092
|
ft,
|
|
10093
10093
|
Tt,
|
|
@@ -10095,7 +10095,7 @@ const ht = {
|
|
|
10095
10095
|
dt,
|
|
10096
10096
|
Et,
|
|
10097
10097
|
ht,
|
|
10098
|
-
|
|
10098
|
+
Yn,
|
|
10099
10099
|
{
|
|
10100
10100
|
kind: "category",
|
|
10101
10101
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10115,7 +10115,7 @@ const ht = {
|
|
|
10115
10115
|
custom: tt.name
|
|
10116
10116
|
}
|
|
10117
10117
|
]
|
|
10118
|
-
},
|
|
10118
|
+
}, Qs = {
|
|
10119
10119
|
kind: "categoryToolbox",
|
|
10120
10120
|
contents: [
|
|
10121
10121
|
{
|
|
@@ -10156,7 +10156,7 @@ const ht = {
|
|
|
10156
10156
|
custom: ce.name
|
|
10157
10157
|
}
|
|
10158
10158
|
]
|
|
10159
|
-
},
|
|
10159
|
+
}, zs = {
|
|
10160
10160
|
kind: "categoryToolbox",
|
|
10161
10161
|
contents: [
|
|
10162
10162
|
{
|
|
@@ -10197,7 +10197,7 @@ const ht = {
|
|
|
10197
10197
|
custom: ce.name
|
|
10198
10198
|
}
|
|
10199
10199
|
]
|
|
10200
|
-
},
|
|
10200
|
+
}, Zs = {
|
|
10201
10201
|
kind: "categoryToolbox",
|
|
10202
10202
|
contents: [
|
|
10203
10203
|
{
|
|
@@ -10228,7 +10228,7 @@ const ht = {
|
|
|
10228
10228
|
]
|
|
10229
10229
|
}
|
|
10230
10230
|
]
|
|
10231
|
-
},
|
|
10231
|
+
}, ea = {
|
|
10232
10232
|
kind: "categoryToolbox",
|
|
10233
10233
|
contents: [
|
|
10234
10234
|
{
|
|
@@ -10237,7 +10237,7 @@ const ht = {
|
|
|
10237
10237
|
categorystyle: "ui_category",
|
|
10238
10238
|
custom: nt.name
|
|
10239
10239
|
},
|
|
10240
|
-
|
|
10240
|
+
wn,
|
|
10241
10241
|
mt,
|
|
10242
10242
|
ft,
|
|
10243
10243
|
Tt,
|
|
@@ -10245,7 +10245,7 @@ const ht = {
|
|
|
10245
10245
|
dt,
|
|
10246
10246
|
Et,
|
|
10247
10247
|
ht,
|
|
10248
|
-
|
|
10248
|
+
Yn,
|
|
10249
10249
|
{
|
|
10250
10250
|
kind: "category",
|
|
10251
10251
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10266,13 +10266,13 @@ const ht = {
|
|
|
10266
10266
|
}
|
|
10267
10267
|
]
|
|
10268
10268
|
}, Kn = Symbol();
|
|
10269
|
-
function
|
|
10269
|
+
function ta(t) {
|
|
10270
10270
|
Zn(Kn, t);
|
|
10271
10271
|
}
|
|
10272
10272
|
function jt() {
|
|
10273
10273
|
return eo(Kn);
|
|
10274
10274
|
}
|
|
10275
|
-
const
|
|
10275
|
+
const na = /* @__PURE__ */ oe({
|
|
10276
10276
|
__name: "index",
|
|
10277
10277
|
props: {
|
|
10278
10278
|
lock: { type: Boolean }
|
|
@@ -10297,7 +10297,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10297
10297
|
text: V(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10298
10298
|
}, {
|
|
10299
10299
|
activator: ee(({ props: I }) => [
|
|
10300
|
-
B(p,
|
|
10300
|
+
B(p, Yt(I, {
|
|
10301
10301
|
density: "comfortable",
|
|
10302
10302
|
icon: "mdi-broom",
|
|
10303
10303
|
variant: "outlined",
|
|
@@ -10308,7 +10308,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10308
10308
|
}, 8, ["text"]);
|
|
10309
10309
|
};
|
|
10310
10310
|
}
|
|
10311
|
-
}),
|
|
10311
|
+
}), oa = /* @__PURE__ */ oe({
|
|
10312
10312
|
__name: "index",
|
|
10313
10313
|
props: {
|
|
10314
10314
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10323,7 +10323,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10323
10323
|
text: V(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10324
10324
|
}, {
|
|
10325
10325
|
activator: ee(({ props: u }) => [
|
|
10326
|
-
B(a,
|
|
10326
|
+
B(a, Yt(u, {
|
|
10327
10327
|
density: "comfortable",
|
|
10328
10328
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10329
10329
|
variant: "outlined",
|
|
@@ -10334,7 +10334,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10334
10334
|
}, 8, ["text"]);
|
|
10335
10335
|
};
|
|
10336
10336
|
}
|
|
10337
|
-
}),
|
|
10337
|
+
}), ia = { class: "text-subtitle-1 ml-6" }, sa = /* @__PURE__ */ oe({
|
|
10338
10338
|
__name: "item",
|
|
10339
10339
|
props: {
|
|
10340
10340
|
id: {},
|
|
@@ -10368,7 +10368,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10368
10368
|
onMouseout: I[2] || (I[2] = (M) => u.value = !1),
|
|
10369
10369
|
onMouseover: I[3] || (I[3] = (M) => u.value = !0)
|
|
10370
10370
|
}, [
|
|
10371
|
-
j("span",
|
|
10371
|
+
j("span", ia, at(a.title), 1),
|
|
10372
10372
|
B(f),
|
|
10373
10373
|
B(C, {
|
|
10374
10374
|
class: "x-handle cursor-move mr-3",
|
|
@@ -10384,10 +10384,10 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10384
10384
|
]);
|
|
10385
10385
|
};
|
|
10386
10386
|
}
|
|
10387
|
-
}),
|
|
10387
|
+
}), aa = {
|
|
10388
10388
|
key: 1,
|
|
10389
10389
|
class: "text-caption text-grey"
|
|
10390
|
-
},
|
|
10390
|
+
}, ca = /* @__PURE__ */ oe({
|
|
10391
10391
|
__name: "index",
|
|
10392
10392
|
props: /* @__PURE__ */ bt({
|
|
10393
10393
|
lock: { type: Boolean }
|
|
@@ -10406,14 +10406,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10406
10406
|
const f = [];
|
|
10407
10407
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10408
10408
|
const M = g.id === Eo()?.id;
|
|
10409
|
-
let
|
|
10409
|
+
let Y = "<n/a>";
|
|
10410
10410
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10411
10411
|
const q = g, de = x[q.node.key];
|
|
10412
|
-
de && (
|
|
10413
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10412
|
+
de && (Y = n(de.name), q.node.alias && (Y += " / " + q.node.alias), Y += " - " + _[q.event.name]);
|
|
10413
|
+
} else g.type.startsWith("func_entry_v") ? Y = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? (console.log(g), Y = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME")) : Y = n("x-block-lib.temporaryBlock");
|
|
10414
10414
|
f.push({
|
|
10415
10415
|
id: g.id,
|
|
10416
|
-
name:
|
|
10416
|
+
name: Y,
|
|
10417
10417
|
select: M
|
|
10418
10418
|
});
|
|
10419
10419
|
}), a.value = f;
|
|
@@ -10448,12 +10448,12 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10448
10448
|
}
|
|
10449
10449
|
let M = "";
|
|
10450
10450
|
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10451
|
-
let
|
|
10452
|
-
M !== "" && (
|
|
10451
|
+
let Y = -10;
|
|
10452
|
+
M !== "" && (Y = i.workspace.getBlockById(
|
|
10453
10453
|
M
|
|
10454
10454
|
).getRelativeToSurfaceXY().y + 10);
|
|
10455
10455
|
const q = g.getRelativeToSurfaceXY();
|
|
10456
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10456
|
+
g.moveTo(new v.Coordinate(q.x, Y)), i.workspace.cleanUp(), xn();
|
|
10457
10457
|
}, I = async (f) => {
|
|
10458
10458
|
if (!i.workspace) {
|
|
10459
10459
|
console.assert(!1);
|
|
@@ -10474,7 +10474,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10474
10474
|
onStart: r
|
|
10475
10475
|
}, {
|
|
10476
10476
|
default: ee(() => [
|
|
10477
|
-
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(
|
|
10477
|
+
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(sa, {
|
|
10478
10478
|
id: g.id,
|
|
10479
10479
|
key: g.id,
|
|
10480
10480
|
select: g.select,
|
|
@@ -10483,14 +10483,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10483
10483
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10484
10484
|
]),
|
|
10485
10485
|
_: 1
|
|
10486
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10486
|
+
}, 8, ["modelValue"])) : (D(), Q("span", aa, at(V(n)("x-block-lib.noOption")), 1));
|
|
10487
10487
|
}
|
|
10488
|
-
}),
|
|
10488
|
+
}), la = (t, e) => {
|
|
10489
10489
|
const n = t.__vccOpts || t;
|
|
10490
10490
|
for (const [o, i] of e)
|
|
10491
10491
|
n[o] = i;
|
|
10492
10492
|
return n;
|
|
10493
|
-
},
|
|
10493
|
+
}, ua = /* @__PURE__ */ la(ca, [["__scopeId", "data-v-2ba1be08"]]), ra = /* @__PURE__ */ oe({
|
|
10494
10494
|
__name: "index",
|
|
10495
10495
|
props: {
|
|
10496
10496
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10506,7 +10506,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10506
10506
|
}
|
|
10507
10507
|
} });
|
|
10508
10508
|
const a = (l) => {
|
|
10509
|
-
const u =
|
|
10509
|
+
const u = Ye();
|
|
10510
10510
|
if (!u) {
|
|
10511
10511
|
console.assert(!1);
|
|
10512
10512
|
return;
|
|
@@ -10518,14 +10518,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10518
10518
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10519
10519
|
}, "blockTree"));
|
|
10520
10520
|
}
|
|
10521
|
-
}),
|
|
10521
|
+
}), _a = { class: "text-subtitle-1" }, pa = /* @__PURE__ */ oe({
|
|
10522
10522
|
__name: "index",
|
|
10523
10523
|
props: {
|
|
10524
10524
|
type: {},
|
|
10525
10525
|
lock: { type: Boolean }
|
|
10526
10526
|
},
|
|
10527
10527
|
setup(t, { expose: e }) {
|
|
10528
|
-
const { t: n } = $e(), o =
|
|
10528
|
+
const { t: n } = $e(), o = Bo(), { sysBarAvail: i } = An(), { backgroundColor1: a } = Ke(), l = K(() => {
|
|
10529
10529
|
let C = "100%";
|
|
10530
10530
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10531
10531
|
background: a.value,
|
|
@@ -10548,7 +10548,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10548
10548
|
return e({ open: p, update: () => {
|
|
10549
10549
|
t.type === "list" ? A.value?.update() : t.type === "tree" && I.value?.update();
|
|
10550
10550
|
} }), (C, g) => {
|
|
10551
|
-
const M = P("v-sheet"),
|
|
10551
|
+
const M = P("v-sheet"), Y = P("v-btn"), q = P("v-spacer"), de = P("v-dialog"), At = P("v-tooltip");
|
|
10552
10552
|
return D(), Q(_n, null, [
|
|
10553
10553
|
B(de, {
|
|
10554
10554
|
modelValue: V(p),
|
|
@@ -10581,13 +10581,13 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10581
10581
|
height: 48
|
|
10582
10582
|
}, {
|
|
10583
10583
|
default: ee(() => [
|
|
10584
|
-
B(
|
|
10584
|
+
B(Y, {
|
|
10585
10585
|
density: "comfortable",
|
|
10586
10586
|
icon: "mdi-close",
|
|
10587
10587
|
variant: "text",
|
|
10588
10588
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10589
10589
|
}),
|
|
10590
|
-
j("span",
|
|
10590
|
+
j("span", _a, at(V(n)("x-block-lib.navigator")), 1),
|
|
10591
10591
|
B(q)
|
|
10592
10592
|
]),
|
|
10593
10593
|
_: 1
|
|
@@ -10596,14 +10596,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10596
10596
|
class: "overflow-y-auto",
|
|
10597
10597
|
style: W(u.value)
|
|
10598
10598
|
}, [
|
|
10599
|
-
C.type === "list" ? (D(), Z(
|
|
10599
|
+
C.type === "list" ? (D(), Z(ua, {
|
|
10600
10600
|
key: 0,
|
|
10601
10601
|
ref_key: "blockList",
|
|
10602
10602
|
ref: A,
|
|
10603
10603
|
modelValue: V(p),
|
|
10604
10604
|
"onUpdate:modelValue": g[1] || (g[1] = (G) => Je(p) ? p.value = G : null),
|
|
10605
10605
|
lock: C.lock
|
|
10606
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10606
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ra, {
|
|
10607
10607
|
key: 1,
|
|
10608
10608
|
ref_key: "blockTree",
|
|
10609
10609
|
ref: I,
|
|
@@ -10623,7 +10623,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10623
10623
|
text: V(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10624
10624
|
}, {
|
|
10625
10625
|
activator: ee(({ props: G }) => [
|
|
10626
|
-
B(
|
|
10626
|
+
B(Y, Yt(G, {
|
|
10627
10627
|
density: "comfortable",
|
|
10628
10628
|
icon: "mdi-navigation-variant",
|
|
10629
10629
|
variant: "outlined",
|
|
@@ -10661,22 +10661,22 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10661
10661
|
wheel: !0
|
|
10662
10662
|
}
|
|
10663
10663
|
};
|
|
10664
|
-
function
|
|
10665
|
-
St.theme = o ? "dark" : "light", St.toolbox =
|
|
10664
|
+
function ha(t, e, n, o) {
|
|
10665
|
+
St.theme = o ? "dark" : "light", St.toolbox = da(e, n);
|
|
10666
10666
|
const i = go(t, St);
|
|
10667
|
-
return
|
|
10667
|
+
return i.addChangeListener(Ao.shadowBlockConversionChangeListener), fa(i, e, n), ma(i), i;
|
|
10668
10668
|
}
|
|
10669
|
-
function
|
|
10669
|
+
function da(t, e) {
|
|
10670
10670
|
let n;
|
|
10671
|
-
return t === "page" ? e === "v1" && (n =
|
|
10671
|
+
return t === "page" ? e === "v1" && (n = ea) : t === "comp" ? e === "v1" && (n = qs) : t === "func" ? e === "v1" && (n = zs) : t === "flow" ? e === "v1" && (n = Qs) : t === "json" && e === "v1" && (n = Zs), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10672
10672
|
}
|
|
10673
|
-
function
|
|
10673
|
+
function fa(t, e, n) {
|
|
10674
10674
|
function o({ name: i, callback: a }) {
|
|
10675
10675
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10676
10676
|
}
|
|
10677
10677
|
e === "page" || e === "comp" ? n === "v1" && (o(nt), o(le), o(ce), o(tt)) : e === "func" ? n === "v1" && (o(it), o(ot), o(st), o(le), o(ce)) : e === "flow" && n === "v1" && (o(ot), o(it), o(st), o(le), o(ce));
|
|
10678
10678
|
}
|
|
10679
|
-
function
|
|
10679
|
+
function ma(t) {
|
|
10680
10680
|
const { router: e } = ie;
|
|
10681
10681
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10682
10682
|
const n = e.resolve({
|
|
@@ -10694,7 +10694,7 @@ function fa(t) {
|
|
|
10694
10694
|
}, 100);
|
|
10695
10695
|
});
|
|
10696
10696
|
}
|
|
10697
|
-
function
|
|
10697
|
+
function Ta(t, e) {
|
|
10698
10698
|
const n = e.newBlock("json_root_v1");
|
|
10699
10699
|
n.initSvg(), n.render();
|
|
10700
10700
|
const o = (i, a) => {
|
|
@@ -10736,7 +10736,7 @@ function ma(t, e) {
|
|
|
10736
10736
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10737
10737
|
);
|
|
10738
10738
|
}
|
|
10739
|
-
function
|
|
10739
|
+
function Ea(t) {
|
|
10740
10740
|
const e = (o) => {
|
|
10741
10741
|
if (!o)
|
|
10742
10742
|
return null;
|
|
@@ -10768,7 +10768,7 @@ function Ta(t) {
|
|
|
10768
10768
|
if (o.type === "json_root_v1")
|
|
10769
10769
|
return e(o);
|
|
10770
10770
|
}
|
|
10771
|
-
const
|
|
10771
|
+
const ga = { class: "position-relative w-100 h-100" }, Aa = /* @__PURE__ */ oe({
|
|
10772
10772
|
__name: "index",
|
|
10773
10773
|
props: /* @__PURE__ */ bt({
|
|
10774
10774
|
type: {},
|
|
@@ -10784,8 +10784,8 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10784
10784
|
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10785
10785
|
setup(t, { expose: e, emit: n }) {
|
|
10786
10786
|
const { backgroundColor2: o } = Ke(), i = Me(t, "lock"), a = Me(t, "scale"), l = n, u = `blocklyEditor${Bt()}`, r = Ae(), p = Re("parentContainer"), A = Re("clean"), I = Re("navigator"), f = {};
|
|
10787
|
-
|
|
10788
|
-
const C = Ae(!0), g = Ae(!1), M = K(() => t.type === "json" ? "tree" : "list"),
|
|
10787
|
+
ta(f);
|
|
10788
|
+
const C = Ae(!0), g = Ae(!1), M = K(() => t.type === "json" ? "tree" : "list"), Y = K(() => ({
|
|
10789
10789
|
width: "100%",
|
|
10790
10790
|
height: "calc(100% - 48px)"
|
|
10791
10791
|
})), q = K(() => ({
|
|
@@ -10834,7 +10834,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10834
10834
|
console.assert(!1);
|
|
10835
10835
|
return;
|
|
10836
10836
|
}
|
|
10837
|
-
|
|
10837
|
+
Io(p.value), await rn(t.locale), f.workspace = ha(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Hn);
|
|
10838
10838
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10839
10839
|
new MutationObserver((It) => {
|
|
10840
10840
|
It.forEach((We) => {
|
|
@@ -10843,8 +10843,8 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10843
10843
|
}).observe(y, { attributes: !0 }), Le.value = f.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10844
10844
|
}), so(() => {
|
|
10845
10845
|
Le.value = !1;
|
|
10846
|
-
}),
|
|
10847
|
-
f.workspace &&
|
|
10846
|
+
}), Oo(r, () => {
|
|
10847
|
+
f.workspace && Co(f.workspace);
|
|
10848
10848
|
});
|
|
10849
10849
|
async function Hn(y) {
|
|
10850
10850
|
if (y.type === E.FINISHED_LOADING) {
|
|
@@ -10864,8 +10864,8 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10864
10864
|
}
|
|
10865
10865
|
}
|
|
10866
10866
|
const Gn = (y) => {
|
|
10867
|
-
C.value = !0, t.type === "json" ?
|
|
10868
|
-
}, Wn = () => t.type === "json" ?
|
|
10867
|
+
C.value = !0, t.type === "json" ? Ta(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10868
|
+
}, Wn = () => t.type === "json" ? Ea(f.workspace) : $.workspaces.save(f.workspace), jn = () => {
|
|
10869
10869
|
if (t.type === "json")
|
|
10870
10870
|
console.assert(!1);
|
|
10871
10871
|
else
|
|
@@ -10908,7 +10908,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10908
10908
|
), Se(
|
|
10909
10909
|
() => t.dark,
|
|
10910
10910
|
(y) => {
|
|
10911
|
-
|
|
10911
|
+
Js(y ? "dark" : "light");
|
|
10912
10912
|
}
|
|
10913
10913
|
), Se(Le, (y) => {
|
|
10914
10914
|
y || f.workspace?.hideChaff();
|
|
@@ -10918,12 +10918,12 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10918
10918
|
qt();
|
|
10919
10919
|
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, fe) => {
|
|
10920
10920
|
const It = P("v-icon"), We = P("x-loading");
|
|
10921
|
-
return D(), Q("div",
|
|
10921
|
+
return D(), Q("div", ga, [
|
|
10922
10922
|
j("div", {
|
|
10923
10923
|
id: u,
|
|
10924
10924
|
ref_key: "blocklyDiv",
|
|
10925
10925
|
ref: r,
|
|
10926
|
-
style: W(
|
|
10926
|
+
style: W(Y.value)
|
|
10927
10927
|
}, null, 4),
|
|
10928
10928
|
j("div", {
|
|
10929
10929
|
style: W(q.value)
|
|
@@ -10945,16 +10945,16 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10945
10945
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10946
10946
|
style: W(At.value)
|
|
10947
10947
|
}, [
|
|
10948
|
-
B(
|
|
10948
|
+
B(na, {
|
|
10949
10949
|
ref_key: "clean",
|
|
10950
10950
|
ref: A,
|
|
10951
10951
|
lock: i.value
|
|
10952
10952
|
}, null, 8, ["lock"]),
|
|
10953
|
-
B(
|
|
10953
|
+
B(oa, {
|
|
10954
10954
|
modelValue: i.value,
|
|
10955
10955
|
"onUpdate:modelValue": fe[0] || (fe[0] = (zn) => i.value = zn)
|
|
10956
10956
|
}, null, 8, ["modelValue"]),
|
|
10957
|
-
B(
|
|
10957
|
+
B(pa, {
|
|
10958
10958
|
ref_key: "navigator",
|
|
10959
10959
|
ref: I,
|
|
10960
10960
|
lock: i.value,
|
|
@@ -10981,15 +10981,15 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10981
10981
|
]);
|
|
10982
10982
|
};
|
|
10983
10983
|
}
|
|
10984
|
-
}),
|
|
10984
|
+
}), Ia = /* @__PURE__ */ oe({
|
|
10985
10985
|
__name: "index",
|
|
10986
10986
|
props: {
|
|
10987
10987
|
code: {}
|
|
10988
10988
|
},
|
|
10989
10989
|
setup(t) {
|
|
10990
10990
|
const e = t;
|
|
10991
|
-
|
|
10992
|
-
const n =
|
|
10991
|
+
ko.registerLanguage("javascript", vo);
|
|
10992
|
+
const n = yo.component, { backgroundColor2: o } = Ke();
|
|
10993
10993
|
return (i, a) => {
|
|
10994
10994
|
const l = P("v-sheet");
|
|
10995
10995
|
return D(), Z(l, {
|
|
@@ -11007,7 +11007,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11007
11007
|
}, 8, ["color"]);
|
|
11008
11008
|
};
|
|
11009
11009
|
}
|
|
11010
|
-
}),
|
|
11010
|
+
}), Oa = { class: "text-subtitle-1" }, Ca = { class: "w-100 h-100 overflow-auto" }, ka = /* @__PURE__ */ oe({
|
|
11011
11011
|
__name: "index",
|
|
11012
11012
|
setup(t) {
|
|
11013
11013
|
const { t: e } = $e(), { sysBarAvail: n } = An(), { backgroundColor0: o, backgroundColor2: i } = Ke(), a = Ae(""), l = K(() => {
|
|
@@ -11054,7 +11054,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11054
11054
|
variant: "text",
|
|
11055
11055
|
onClick: A[0] || (A[0] = (M) => r.value = !1)
|
|
11056
11056
|
}),
|
|
11057
|
-
j("span",
|
|
11057
|
+
j("span", Oa, at(V(e)("x-block-lib.dlg.source.title")), 1),
|
|
11058
11058
|
B(C)
|
|
11059
11059
|
]),
|
|
11060
11060
|
_: 1
|
|
@@ -11062,8 +11062,8 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11062
11062
|
j("div", {
|
|
11063
11063
|
style: W(l.value)
|
|
11064
11064
|
}, [
|
|
11065
|
-
j("div",
|
|
11066
|
-
B(
|
|
11065
|
+
j("div", Ca, [
|
|
11066
|
+
B(Ia, { code: a.value }, null, 8, ["code"])
|
|
11067
11067
|
])
|
|
11068
11068
|
], 4)
|
|
11069
11069
|
]),
|
|
@@ -11074,16 +11074,16 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11074
11074
|
}, 8, ["modelValue"]);
|
|
11075
11075
|
};
|
|
11076
11076
|
}
|
|
11077
|
-
}),
|
|
11078
|
-
t.component("XBlockly",
|
|
11077
|
+
}), va = (t) => {
|
|
11078
|
+
t.component("XBlockly", Aa), t.component("XSourceDlg", ka);
|
|
11079
11079
|
};
|
|
11080
|
-
async function
|
|
11080
|
+
async function Da(t) {
|
|
11081
11081
|
return (await Pn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.j5qa8fnp.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11082
11082
|
}
|
|
11083
|
-
const
|
|
11083
|
+
const Ua = { install: va };
|
|
11084
11084
|
export {
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11085
|
+
Aa as XBlockly,
|
|
11086
|
+
Ua as default,
|
|
11087
|
+
va as install,
|
|
11088
|
+
Da as loadLocaleMessageBlock
|
|
11089
11089
|
};
|