x-block-lib 0.7.10 → 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/core/locale/msg/en.d.ts +0 -3
- package/dist/core/locale/msg/zhHans.d.ts +0 -3
- package/dist/index.js +425 -431
- package/dist/{msg-en.fj04iwzg.js → msg-en.cb0pu5v6.js} +0 -3
- package/dist/{msg-zhHans.os4ap6q2.js → msg-zhHans.ca0i4cm9.js} +0 -3
- 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",
|
|
@@ -58,7 +58,7 @@ h([
|
|
|
58
58
|
s.forBlock.app_env_v1 = function(t) {
|
|
59
59
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
60
60
|
};
|
|
61
|
-
class
|
|
61
|
+
class m extends dn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -115,7 +115,7 @@ class f extends dn {
|
|
|
115
115
|
return "<n/a>";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
co.register("field_dropdown2",
|
|
118
|
+
co.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
120
|
class In extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
@@ -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: "",
|
|
@@ -426,7 +426,7 @@ const Vo = {
|
|
|
426
426
|
name: "",
|
|
427
427
|
inputs: [],
|
|
428
428
|
outputs: []
|
|
429
|
-
}, this.appendDummyInput("DUMMY").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_TITLE}").appendField(new
|
|
429
|
+
}, this.appendDummyInput("DUMMY").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_TITLE}").appendField(new m(() => this.genNodeOpts_()), "NODE").appendField(new m(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_HELPURL}"), this.initData_();
|
|
430
430
|
},
|
|
431
431
|
initData_: function() {
|
|
432
432
|
if (this.node.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;
|
|
@@ -503,7 +503,7 @@ const Vo = {
|
|
|
503
503
|
return;
|
|
504
504
|
}
|
|
505
505
|
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(
|
|
506
|
-
new
|
|
506
|
+
new m(() => this.genElementOpts_()),
|
|
507
507
|
"EXTRA1"
|
|
508
508
|
);
|
|
509
509
|
},
|
|
@@ -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: "",
|
|
@@ -605,7 +605,7 @@ const Po = {
|
|
|
605
605
|
name: "",
|
|
606
606
|
inputs: [],
|
|
607
607
|
outputs: []
|
|
608
|
-
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TITLE}").appendField(new
|
|
608
|
+
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TITLE}").appendField(new m(() => this.genElementOpts_()), "ELEMENT").appendField(new m(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_AS_HELPURL}"), this.initData_(), this.updateShape_();
|
|
609
609
|
},
|
|
610
610
|
initData_: function() {
|
|
611
611
|
if (this.element.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)
|
|
@@ -678,7 +678,7 @@ const Po = {
|
|
|
678
678
|
console.assert(!1);
|
|
679
679
|
return;
|
|
680
680
|
}
|
|
681
|
-
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new
|
|
681
|
+
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() => ve()), "EXTRA1");
|
|
682
682
|
},
|
|
683
683
|
updateShape2_: function() {
|
|
684
684
|
this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
@@ -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,13 +811,13 @@ 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: "",
|
|
818
818
|
name: "",
|
|
819
819
|
inputs: []
|
|
820
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_COMP_METHOD_IMPL_TITLE}").appendField(new
|
|
820
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_COMP_METHOD_IMPL_TITLE}").appendField(new m(() => this.genMethodOpts_()), "METHOD"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_COMP_METHOD_IMPL_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_COMP_METHOD_IMPL_HELPURL}"), this.initData_();
|
|
821
821
|
},
|
|
822
822
|
initData_: function() {
|
|
823
823
|
if (this.method.id)
|
|
@@ -891,19 +891,19 @@ 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() {
|
|
905
905
|
this.appendDummyInput().appendField(
|
|
906
|
-
new
|
|
906
|
+
new m(() => this.genOpts_()),
|
|
907
907
|
"ITEM"
|
|
908
908
|
), this.setOutput(!0, o), this.setStyle("prop_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
909
909
|
},
|
|
@@ -921,14 +921,14 @@ 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() {
|
|
930
930
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
931
|
-
new
|
|
931
|
+
new m(() => this.genOpts_()),
|
|
932
932
|
"TYPE"
|
|
933
933
|
), this.setOutput(!0, o), this.setStyle("prop_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
|
|
934
934
|
},
|
|
@@ -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,15 +1018,15 @@ 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: "",
|
|
1027
1027
|
key: "",
|
|
1028
1028
|
alias: ""
|
|
1029
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_TITLE}").appendField(new
|
|
1029
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_TITLE}").appendField(new m(() => this.genNodeOpts_()), "NODE"), this.setOutput(!0, "String"), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_HELPURL}");
|
|
1030
1030
|
},
|
|
1031
1031
|
initData_: function() {
|
|
1032
1032
|
if (this.node.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: "",
|
|
@@ -1098,7 +1098,7 @@ const Go = {
|
|
|
1098
1098
|
}, this.prop = {
|
|
1099
1099
|
keys: "",
|
|
1100
1100
|
names: []
|
|
1101
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_PROP_TITLE}").appendField(new
|
|
1101
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_PROP_TITLE}").appendField(new m(() => this.genNodeOpts_()), "NODE").appendField(new m(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_HELPURL}"), this.initData_();
|
|
1102
1102
|
},
|
|
1103
1103
|
initData_: function() {
|
|
1104
1104
|
if (this.node.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: "",
|
|
@@ -1195,7 +1195,7 @@ const Wo = {
|
|
|
1195
1195
|
}, this.prop = {
|
|
1196
1196
|
keys: "",
|
|
1197
1197
|
names: []
|
|
1198
|
-
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_GET_NODE_PROP_AS_TITLE}"), this.appendDummyInput().appendField(new
|
|
1198
|
+
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_GET_NODE_PROP_AS_TITLE}"), this.appendDummyInput().appendField(new m(() => this.genElementOpts_()), "ELEMENT").appendField(new m(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_AS_HELPURL}"), this.initData_();
|
|
1199
1199
|
},
|
|
1200
1200
|
initData_: function() {
|
|
1201
1201
|
if (this.element.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,20 +1291,20 @@ 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: "",
|
|
1304
1304
|
name: "",
|
|
1305
1305
|
type: ""
|
|
1306
1306
|
}, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_PAGE_ARGUMENT_TITLE}").appendField(
|
|
1307
|
-
new
|
|
1307
|
+
new m(() => this.genArgumentOpts_()),
|
|
1308
1308
|
"ARGUMENT"
|
|
1309
1309
|
), this.setOutput(!0, null), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_UI_V1_GET_PAGE_ARGUMENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_PAGE_ARGUMENT_HELPURL}");
|
|
1310
1310
|
},
|
|
@@ -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: "",
|
|
@@ -1417,13 +1417,7 @@ const Zo = {
|
|
|
1417
1417
|
}, this.page = {
|
|
1418
1418
|
id: "",
|
|
1419
1419
|
name: ""
|
|
1420
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_NAVIGATE_TO_TITLE}").appendField(new
|
|
1421
|
-
new f([
|
|
1422
|
-
["%{BKY_UI_NAVIGATE_MODE_PUSH}", "push"],
|
|
1423
|
-
["%{BKY_UI_NAVIGATE_MODE_REPLACE}", "replace"]
|
|
1424
|
-
]),
|
|
1425
|
-
"MODE"
|
|
1426
|
-
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_NAVIGATE_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_NAVIGATE_HELPURL}"), this.initData_();
|
|
1420
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_NAVIGATE_TO_TITLE}").appendField(new m(() => this.genAppOpts_()), "APP").appendField(new m(() => this.genPageOpts_()), "PAGE"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_NAVIGATE_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_NAVIGATE_HELPURL}"), this.initData_();
|
|
1427
1421
|
},
|
|
1428
1422
|
initData_: function() {
|
|
1429
1423
|
if (this.app.id)
|
|
@@ -1453,10 +1447,10 @@ const Zo = {
|
|
|
1453
1447
|
}, 0);
|
|
1454
1448
|
},
|
|
1455
1449
|
genAppOpts_: function() {
|
|
1456
|
-
return
|
|
1450
|
+
return Qo();
|
|
1457
1451
|
},
|
|
1458
1452
|
genPageOpts_: function() {
|
|
1459
|
-
return
|
|
1453
|
+
return zo(this.app.id);
|
|
1460
1454
|
},
|
|
1461
1455
|
onchange: function(t) {
|
|
1462
1456
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1503,13 +1497,13 @@ const Zo = {
|
|
|
1503
1497
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1504
1498
|
}
|
|
1505
1499
|
};
|
|
1506
|
-
d.navigate_to_v1 =
|
|
1500
|
+
d.navigate_to_v1 = ei;
|
|
1507
1501
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1508
|
-
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id)
|
|
1509
|
-
return `__navigateToV1__(${n}, ${o}
|
|
1502
|
+
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
|
+
return `__navigateToV1__(${n}, ${o});
|
|
1510
1504
|
`;
|
|
1511
1505
|
};
|
|
1512
|
-
const
|
|
1506
|
+
const ti = {
|
|
1513
1507
|
init: function() {
|
|
1514
1508
|
this.node = {
|
|
1515
1509
|
id: "",
|
|
@@ -1519,7 +1513,7 @@ const ei = {
|
|
|
1519
1513
|
key: "",
|
|
1520
1514
|
name: "",
|
|
1521
1515
|
params: []
|
|
1522
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_ON_NODE_EVENT_TITLE}").appendField(new
|
|
1516
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_ON_NODE_EVENT_TITLE}").appendField(new m(() => this.genNodeOpts_()), "NODE").appendField(new m(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_HELPURL}"), this.initData_();
|
|
1523
1517
|
},
|
|
1524
1518
|
initData_: function() {
|
|
1525
1519
|
if (this.node.id)
|
|
@@ -1552,7 +1546,7 @@ const ei = {
|
|
|
1552
1546
|
return Ge("event");
|
|
1553
1547
|
},
|
|
1554
1548
|
genEventOpts_: function() {
|
|
1555
|
-
return
|
|
1549
|
+
return Mo(this.node.id);
|
|
1556
1550
|
},
|
|
1557
1551
|
onchange: function(t) {
|
|
1558
1552
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1567,7 +1561,7 @@ const ei = {
|
|
|
1567
1561
|
}
|
|
1568
1562
|
},
|
|
1569
1563
|
onNodeChange_: function(t) {
|
|
1570
|
-
const e =
|
|
1564
|
+
const e = w(t);
|
|
1571
1565
|
if (!e) {
|
|
1572
1566
|
console.assert(!1);
|
|
1573
1567
|
return;
|
|
@@ -1603,7 +1597,7 @@ const ei = {
|
|
|
1603
1597
|
}), t.length > 0 && F(this, t);
|
|
1604
1598
|
},
|
|
1605
1599
|
checkWarning_: function() {
|
|
1606
|
-
const t =
|
|
1600
|
+
const t = w(this.node.id);
|
|
1607
1601
|
if (!t) {
|
|
1608
1602
|
this.setWarningText(_.WARN_NODE_NOT_AVAILABLE);
|
|
1609
1603
|
return;
|
|
@@ -1625,7 +1619,7 @@ const ei = {
|
|
|
1625
1619
|
this.setWarningText(null);
|
|
1626
1620
|
}
|
|
1627
1621
|
};
|
|
1628
|
-
d.on_node_event_v1 =
|
|
1622
|
+
d.on_node_event_v1 = ti;
|
|
1629
1623
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1630
1624
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1631
1625
|
let i = "";
|
|
@@ -1637,7 +1631,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1637
1631
|
${a}});
|
|
1638
1632
|
`;
|
|
1639
1633
|
};
|
|
1640
|
-
const
|
|
1634
|
+
const ni = {
|
|
1641
1635
|
init: function() {
|
|
1642
1636
|
this.element = {
|
|
1643
1637
|
key: "",
|
|
@@ -1646,7 +1640,7 @@ const ti = {
|
|
|
1646
1640
|
key: "",
|
|
1647
1641
|
name: "",
|
|
1648
1642
|
params: []
|
|
1649
|
-
}, this.appendValueInput("NODE").appendField("%{BKY_UI_V1_ON_NODE_EVENT_AS_TITLE}").appendField(new
|
|
1643
|
+
}, this.appendValueInput("NODE").appendField("%{BKY_UI_V1_ON_NODE_EVENT_AS_TITLE}").appendField(new m(() => this.genElementOpts_()), "ELEMENT").appendField(new m(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_AS_HELPURL}"), this.initData_();
|
|
1650
1644
|
},
|
|
1651
1645
|
initData_: function() {
|
|
1652
1646
|
if (this.element.key)
|
|
@@ -1679,7 +1673,7 @@ const ti = {
|
|
|
1679
1673
|
return ve("event");
|
|
1680
1674
|
},
|
|
1681
1675
|
genEventOpts_: function() {
|
|
1682
|
-
return
|
|
1676
|
+
return Do(this.element.key);
|
|
1683
1677
|
},
|
|
1684
1678
|
onchange: function(t) {
|
|
1685
1679
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1748,7 +1742,7 @@ const ti = {
|
|
|
1748
1742
|
this.setWarningText(null);
|
|
1749
1743
|
}
|
|
1750
1744
|
};
|
|
1751
|
-
d.on_node_event_as_v1 =
|
|
1745
|
+
d.on_node_event_as_v1 = ni;
|
|
1752
1746
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1753
1747
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1754
1748
|
let i = "";
|
|
@@ -1760,7 +1754,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1760
1754
|
${a}});
|
|
1761
1755
|
`;
|
|
1762
1756
|
};
|
|
1763
|
-
const
|
|
1757
|
+
const oi = {
|
|
1764
1758
|
init: function() {
|
|
1765
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}");
|
|
1766
1760
|
},
|
|
@@ -1789,7 +1783,7 @@ const ni = {
|
|
|
1789
1783
|
]);
|
|
1790
1784
|
}
|
|
1791
1785
|
};
|
|
1792
|
-
d.open_confirm_dlg_v1 =
|
|
1786
|
+
d.open_confirm_dlg_v1 = oi;
|
|
1793
1787
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1794
1788
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1795
1789
|
return `{
|
|
@@ -1797,7 +1791,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1797
1791
|
${o}}
|
|
1798
1792
|
`;
|
|
1799
1793
|
};
|
|
1800
|
-
const
|
|
1794
|
+
const ii = {
|
|
1801
1795
|
init: function() {
|
|
1802
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}");
|
|
1803
1797
|
},
|
|
@@ -1828,7 +1822,7 @@ const oi = {
|
|
|
1828
1822
|
]);
|
|
1829
1823
|
}
|
|
1830
1824
|
};
|
|
1831
|
-
d.open_prompt_dlg_v1 =
|
|
1825
|
+
d.open_prompt_dlg_v1 = ii;
|
|
1832
1826
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1833
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");
|
|
1834
1828
|
return `{
|
|
@@ -1868,12 +1862,12 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1868
1862
|
return `__messageV1__(${e}, ${n});
|
|
1869
1863
|
`;
|
|
1870
1864
|
};
|
|
1871
|
-
const
|
|
1865
|
+
const si = {
|
|
1872
1866
|
init: function() {
|
|
1873
1867
|
this.comp = {
|
|
1874
1868
|
id: void 0,
|
|
1875
1869
|
name: ""
|
|
1876
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_SELECT_COMP_TITLE}").appendField(new
|
|
1870
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_SELECT_COMP_TITLE}").appendField(new m(() => this.genCompOpts_()), "COMP"), this.setOutput(!0, "Comp"), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SELECT_COMP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SELECT_COMP_HELPURL}"), this.initData_();
|
|
1877
1871
|
},
|
|
1878
1872
|
initData_: function() {
|
|
1879
1873
|
if (this.comp.id !== void 0)
|
|
@@ -1896,7 +1890,7 @@ const ii = {
|
|
|
1896
1890
|
}, 0);
|
|
1897
1891
|
},
|
|
1898
1892
|
genCompOpts_: function() {
|
|
1899
|
-
return
|
|
1893
|
+
return Zo();
|
|
1900
1894
|
},
|
|
1901
1895
|
onchange: function(t) {
|
|
1902
1896
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1930,12 +1924,12 @@ const ii = {
|
|
|
1930
1924
|
this.setWarningText(null);
|
|
1931
1925
|
}
|
|
1932
1926
|
};
|
|
1933
|
-
d.select_comp_v1 =
|
|
1927
|
+
d.select_comp_v1 = si;
|
|
1934
1928
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1935
1929
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1936
1930
|
return [e(o), c.ATOMIC];
|
|
1937
1931
|
};
|
|
1938
|
-
const
|
|
1932
|
+
const ai = {
|
|
1939
1933
|
init: function() {
|
|
1940
1934
|
this.method = {
|
|
1941
1935
|
id: "",
|
|
@@ -1944,7 +1938,7 @@ const si = {
|
|
|
1944
1938
|
id: "",
|
|
1945
1939
|
name: "",
|
|
1946
1940
|
type: ""
|
|
1947
|
-
}, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TITLE}").appendField(new
|
|
1941
|
+
}, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TITLE}").appendField(new m(() => this.genMethodOpts_()), "METHOD").appendField(new m(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_HELPURL}"), this.initData_();
|
|
1948
1942
|
},
|
|
1949
1943
|
initData_: function() {
|
|
1950
1944
|
if (this.method.id)
|
|
@@ -1976,7 +1970,7 @@ const si = {
|
|
|
1976
1970
|
return Nn();
|
|
1977
1971
|
},
|
|
1978
1972
|
genOutputOpts_: function() {
|
|
1979
|
-
return
|
|
1973
|
+
return wo(this.method.id);
|
|
1980
1974
|
},
|
|
1981
1975
|
onchange: function(t) {
|
|
1982
1976
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2043,7 +2037,7 @@ const si = {
|
|
|
2043
2037
|
this.setWarningText(null);
|
|
2044
2038
|
}
|
|
2045
2039
|
};
|
|
2046
|
-
d.set_comp_method_output_v1 =
|
|
2040
|
+
d.set_comp_method_output_v1 = ai;
|
|
2047
2041
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2048
2042
|
const e = t;
|
|
2049
2043
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2070,7 +2064,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2070
2064
|
return `__setCompMethodOutputV1__(${n});
|
|
2071
2065
|
`;
|
|
2072
2066
|
};
|
|
2073
|
-
const
|
|
2067
|
+
const ci = {
|
|
2074
2068
|
init: function() {
|
|
2075
2069
|
this.node = {
|
|
2076
2070
|
id: "",
|
|
@@ -2079,7 +2073,7 @@ const ai = {
|
|
|
2079
2073
|
}, this.prop = {
|
|
2080
2074
|
keys: "",
|
|
2081
2075
|
names: []
|
|
2082
|
-
}, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_NODE_PROP_TITLE}").appendField(new
|
|
2076
|
+
}, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_NODE_PROP_TITLE}").appendField(new m(() => this.genNodeOpts_()), "NODE").appendField(new m(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_HELPURL}"), this.initData_(), this.isInFlyout && (this.ensureBlocks_(), this.updateCheck_());
|
|
2083
2077
|
},
|
|
2084
2078
|
initData_: function() {
|
|
2085
2079
|
if (this.node.id)
|
|
@@ -2127,7 +2121,7 @@ const ai = {
|
|
|
2127
2121
|
}
|
|
2128
2122
|
},
|
|
2129
2123
|
onNodeChange_: function(t) {
|
|
2130
|
-
const e =
|
|
2124
|
+
const e = w(t);
|
|
2131
2125
|
if (!e) {
|
|
2132
2126
|
console.assert(!1);
|
|
2133
2127
|
return;
|
|
@@ -2164,7 +2158,7 @@ const ai = {
|
|
|
2164
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);
|
|
2165
2159
|
},
|
|
2166
2160
|
checkWarning_: function() {
|
|
2167
|
-
const t =
|
|
2161
|
+
const t = w(this.node.id);
|
|
2168
2162
|
if (!t) {
|
|
2169
2163
|
this.setWarningText(_.WARN_NODE_NOT_AVAIALABLE);
|
|
2170
2164
|
return;
|
|
@@ -2182,13 +2176,13 @@ const ai = {
|
|
|
2182
2176
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2183
2177
|
}
|
|
2184
2178
|
};
|
|
2185
|
-
d.set_node_prop_v1 =
|
|
2179
|
+
d.set_node_prop_v1 = ci;
|
|
2186
2180
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2187
2181
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2188
2182
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2189
2183
|
`;
|
|
2190
2184
|
};
|
|
2191
|
-
const
|
|
2185
|
+
const li = {
|
|
2192
2186
|
init: function() {
|
|
2193
2187
|
this.element = {
|
|
2194
2188
|
key: "",
|
|
@@ -2196,7 +2190,7 @@ const ci = {
|
|
|
2196
2190
|
}, this.prop = {
|
|
2197
2191
|
keys: "",
|
|
2198
2192
|
names: []
|
|
2199
|
-
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_SET_NODE_PROP_AS_TITLE}"), this.appendValueInput("VALUE").appendField(new
|
|
2193
|
+
}, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_SET_NODE_PROP_AS_TITLE}"), this.appendValueInput("VALUE").appendField(new m(() => this.genElementOpts_()), "ELEMENT").appendField(new m(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setInputsInline(!0), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_AS_HELPURL}"), this.initData_(), this.isInFlyout && (this.ensureBlocks_(), this.updateCheck_());
|
|
2200
2194
|
},
|
|
2201
2195
|
initData_: function() {
|
|
2202
2196
|
if (this.element.key)
|
|
@@ -2299,19 +2293,19 @@ const ci = {
|
|
|
2299
2293
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2300
2294
|
}
|
|
2301
2295
|
};
|
|
2302
|
-
d.set_node_prop_as_v1 =
|
|
2296
|
+
d.set_node_prop_as_v1 = li;
|
|
2303
2297
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2304
2298
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2305
2299
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2306
2300
|
`;
|
|
2307
2301
|
};
|
|
2308
|
-
const
|
|
2302
|
+
const ui = {
|
|
2309
2303
|
init: function() {
|
|
2310
2304
|
this.event = {
|
|
2311
2305
|
id: "",
|
|
2312
2306
|
name: "",
|
|
2313
2307
|
params: []
|
|
2314
|
-
}, this.appendDummyInput().appendField("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TITLE}").appendField(new
|
|
2308
|
+
}, this.appendDummyInput().appendField("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TITLE}").appendField(new m(() => this.genEventOpts_()), "EVENT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_TRIGGER_COMP_EVENT_HELPURL}"), this.initData_();
|
|
2315
2309
|
},
|
|
2316
2310
|
initData_: function() {
|
|
2317
2311
|
if (this.event.id)
|
|
@@ -2389,7 +2383,7 @@ const li = {
|
|
|
2389
2383
|
this.setWarningText(null);
|
|
2390
2384
|
}
|
|
2391
2385
|
};
|
|
2392
|
-
d.trigger_comp_event_v1 =
|
|
2386
|
+
d.trigger_comp_event_v1 = ui;
|
|
2393
2387
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2394
2388
|
return "";
|
|
2395
2389
|
};
|
|
@@ -3096,7 +3090,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3096
3090
|
`
|
|
3097
3091
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3098
3092
|
};
|
|
3099
|
-
const
|
|
3093
|
+
const ri = v.xml, _i = [
|
|
3100
3094
|
{
|
|
3101
3095
|
type: "add_data_v1",
|
|
3102
3096
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3158,16 +3152,16 @@ const ui = v.xml, ri = [
|
|
|
3158
3152
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3159
3153
|
}
|
|
3160
3154
|
];
|
|
3161
|
-
function
|
|
3162
|
-
const n =
|
|
3155
|
+
function pi(t, e) {
|
|
3156
|
+
const n = _i.find((o) => o.type === t);
|
|
3163
3157
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3164
3158
|
}
|
|
3165
|
-
const
|
|
3159
|
+
const hi = {
|
|
3166
3160
|
init: function() {
|
|
3167
3161
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3168
3162
|
},
|
|
3169
3163
|
mutationToDom: function() {
|
|
3170
|
-
const t =
|
|
3164
|
+
const t = ri.createElement("mutation");
|
|
3171
3165
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3172
3166
|
},
|
|
3173
3167
|
domToMutation: function(t) {
|
|
@@ -3196,7 +3190,7 @@ const pi = {
|
|
|
3196
3190
|
},
|
|
3197
3191
|
tryDuplicate_: function(t) {
|
|
3198
3192
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3199
|
-
if (e &&
|
|
3193
|
+
if (e && pi(e.type, t.oldInputName))
|
|
3200
3194
|
try {
|
|
3201
3195
|
E.disable();
|
|
3202
3196
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -3217,7 +3211,7 @@ const pi = {
|
|
|
3217
3211
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3218
3212
|
}
|
|
3219
3213
|
};
|
|
3220
|
-
d.parameter_v1 =
|
|
3214
|
+
d.parameter_v1 = hi;
|
|
3221
3215
|
s.forBlock.parameter_v1 = function(t) {
|
|
3222
3216
|
return [t.key, c.ATOMIC];
|
|
3223
3217
|
};
|
|
@@ -3236,7 +3230,7 @@ function Rn(t) {
|
|
|
3236
3230
|
e.push([i, o]);
|
|
3237
3231
|
}), N(e);
|
|
3238
3232
|
}
|
|
3239
|
-
function
|
|
3233
|
+
function we(t) {
|
|
3240
3234
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3241
3235
|
return e ? e.funcs : [];
|
|
3242
3236
|
}
|
|
@@ -3247,24 +3241,24 @@ function Oe(t, e) {
|
|
|
3247
3241
|
}
|
|
3248
3242
|
function Dn(t) {
|
|
3249
3243
|
const e = [];
|
|
3250
|
-
return
|
|
3244
|
+
return we(t).forEach(({ id: o, name: i }) => {
|
|
3251
3245
|
e.push([i, o]);
|
|
3252
3246
|
}), N(e);
|
|
3253
3247
|
}
|
|
3254
|
-
function
|
|
3248
|
+
function wt() {
|
|
3255
3249
|
return T.compute.activeFunc;
|
|
3256
3250
|
}
|
|
3257
3251
|
function cn(t) {
|
|
3258
3252
|
const { outputs: e } = T.compute.activeFunc;
|
|
3259
3253
|
return e.find((n) => n.id === t);
|
|
3260
3254
|
}
|
|
3261
|
-
function
|
|
3255
|
+
function di() {
|
|
3262
3256
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3263
3257
|
return e.forEach(({ id: n, name: o }) => {
|
|
3264
3258
|
t.push([o, n]);
|
|
3265
3259
|
}), N(t);
|
|
3266
3260
|
}
|
|
3267
|
-
const
|
|
3261
|
+
const fi = {
|
|
3268
3262
|
init: function() {
|
|
3269
3263
|
this.space = {
|
|
3270
3264
|
id: "",
|
|
@@ -3274,7 +3268,7 @@ const di = {
|
|
|
3274
3268
|
name: "",
|
|
3275
3269
|
inputs: [],
|
|
3276
3270
|
outputs: []
|
|
3277
|
-
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new
|
|
3271
|
+
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_HELPURL}"), this.initData_();
|
|
3278
3272
|
},
|
|
3279
3273
|
initData_: function() {
|
|
3280
3274
|
if (this.space.id)
|
|
@@ -3285,7 +3279,7 @@ const di = {
|
|
|
3285
3279
|
this.space.id = t.id, this.space.name = t.name;
|
|
3286
3280
|
const e = this.getField("SPACE");
|
|
3287
3281
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3288
|
-
const n =
|
|
3282
|
+
const n = we(this.space.id)?.[0];
|
|
3289
3283
|
if (!n)
|
|
3290
3284
|
return;
|
|
3291
3285
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3329,7 +3323,7 @@ const di = {
|
|
|
3329
3323
|
}
|
|
3330
3324
|
let n = !1;
|
|
3331
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)) {
|
|
3332
|
-
const i =
|
|
3326
|
+
const i = we(this.space.id)?.[0];
|
|
3333
3327
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3334
3328
|
}
|
|
3335
3329
|
},
|
|
@@ -3419,15 +3413,15 @@ const di = {
|
|
|
3419
3413
|
this.setWarningText(null);
|
|
3420
3414
|
}
|
|
3421
3415
|
};
|
|
3422
|
-
d.call_func_v1 =
|
|
3416
|
+
d.call_func_v1 = fi;
|
|
3423
3417
|
s.forBlock.call_func_v1 = function(t) {
|
|
3424
3418
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3425
3419
|
let l = "";
|
|
3426
3420
|
l += `${e}var __inputs__ = {
|
|
3427
|
-
`, o.func.inputs.forEach(({ id: I },
|
|
3421
|
+
`, o.func.inputs.forEach(({ id: I }, f) => {
|
|
3428
3422
|
const C = s.valueToCode(
|
|
3429
3423
|
o,
|
|
3430
|
-
"INPUT" +
|
|
3424
|
+
"INPUT" + f,
|
|
3431
3425
|
c.ATOMIC
|
|
3432
3426
|
);
|
|
3433
3427
|
l += `${e}${e}${n(I)}: ${C},
|
|
@@ -3446,7 +3440,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3446
3440
|
${r}${p}}
|
|
3447
3441
|
`;
|
|
3448
3442
|
};
|
|
3449
|
-
const
|
|
3443
|
+
const mi = {
|
|
3450
3444
|
init: function() {
|
|
3451
3445
|
this.space = {
|
|
3452
3446
|
id: "",
|
|
@@ -3456,7 +3450,7 @@ const fi = {
|
|
|
3456
3450
|
name: "",
|
|
3457
3451
|
inputs: [],
|
|
3458
3452
|
outputs: []
|
|
3459
|
-
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new
|
|
3453
|
+
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_HELPURL}"), this.initData_();
|
|
3460
3454
|
},
|
|
3461
3455
|
initData_: function() {
|
|
3462
3456
|
if (this.space.id)
|
|
@@ -3467,7 +3461,7 @@ const fi = {
|
|
|
3467
3461
|
this.space.id = t.id, this.space.name = t.name;
|
|
3468
3462
|
const e = this.getField("SPACE");
|
|
3469
3463
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3470
|
-
const n =
|
|
3464
|
+
const n = we(this.space.id)?.[0];
|
|
3471
3465
|
if (!n)
|
|
3472
3466
|
return;
|
|
3473
3467
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3511,7 +3505,7 @@ const fi = {
|
|
|
3511
3505
|
}
|
|
3512
3506
|
let n = !1;
|
|
3513
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)) {
|
|
3514
|
-
const i =
|
|
3508
|
+
const i = we(this.space.id)?.[0];
|
|
3515
3509
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3516
3510
|
}
|
|
3517
3511
|
},
|
|
@@ -3601,15 +3595,15 @@ const fi = {
|
|
|
3601
3595
|
this.setWarningText(null);
|
|
3602
3596
|
}
|
|
3603
3597
|
};
|
|
3604
|
-
d.call_func_internal_v1 =
|
|
3598
|
+
d.call_func_internal_v1 = mi;
|
|
3605
3599
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3606
3600
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3607
3601
|
let l = `${e}var __inputs__ = {
|
|
3608
3602
|
`;
|
|
3609
|
-
o.func.inputs.forEach(({ id: I },
|
|
3603
|
+
o.func.inputs.forEach(({ id: I }, f) => {
|
|
3610
3604
|
const C = s.valueToCode(
|
|
3611
3605
|
o,
|
|
3612
|
-
"INPUT" +
|
|
3606
|
+
"INPUT" + f,
|
|
3613
3607
|
c.ATOMIC
|
|
3614
3608
|
);
|
|
3615
3609
|
l += `${e}${e}${n(I)}: ${C},
|
|
@@ -3653,7 +3647,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3653
3647
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3654
3648
|
`;
|
|
3655
3649
|
};
|
|
3656
|
-
const
|
|
3650
|
+
const Ti = {
|
|
3657
3651
|
init: function() {
|
|
3658
3652
|
this.func = {
|
|
3659
3653
|
id: "",
|
|
@@ -3663,7 +3657,7 @@ const mi = {
|
|
|
3663
3657
|
initData_: function() {
|
|
3664
3658
|
if (this.func.id)
|
|
3665
3659
|
return;
|
|
3666
|
-
const { id: t, inputs: e } =
|
|
3660
|
+
const { id: t, inputs: e } = wt();
|
|
3667
3661
|
this.func.id = t, this.func.inputs = e;
|
|
3668
3662
|
},
|
|
3669
3663
|
saveExtraState: function() {
|
|
@@ -3700,7 +3694,7 @@ const mi = {
|
|
|
3700
3694
|
F(this, t);
|
|
3701
3695
|
},
|
|
3702
3696
|
checkWarning_: function() {
|
|
3703
|
-
const { id: t, inputs: e } =
|
|
3697
|
+
const { id: t, inputs: e } = wt();
|
|
3704
3698
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3705
3699
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3706
3700
|
return;
|
|
@@ -3708,7 +3702,7 @@ const mi = {
|
|
|
3708
3702
|
this.setWarningText(null);
|
|
3709
3703
|
}
|
|
3710
3704
|
};
|
|
3711
|
-
d.func_entry_v1 =
|
|
3705
|
+
d.func_entry_v1 = Ti;
|
|
3712
3706
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3713
3707
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3714
3708
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3718,27 +3712,27 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3718
3712
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3719
3713
|
${n}}`;
|
|
3720
3714
|
};
|
|
3721
|
-
const
|
|
3715
|
+
const Ei = {
|
|
3722
3716
|
init: function() {
|
|
3723
3717
|
}
|
|
3724
3718
|
};
|
|
3725
|
-
d.on_flow_state_event_v1 =
|
|
3719
|
+
d.on_flow_state_event_v1 = Ei;
|
|
3726
3720
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3727
3721
|
return `__onFlowStateEventV1__();
|
|
3728
3722
|
`;
|
|
3729
3723
|
};
|
|
3730
|
-
const
|
|
3724
|
+
const gi = {
|
|
3731
3725
|
init: function() {
|
|
3732
3726
|
this.output = {
|
|
3733
3727
|
id: "",
|
|
3734
3728
|
name: "",
|
|
3735
3729
|
type: ""
|
|
3736
|
-
}, this.appendValueInput("VALUE").appendField("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TITLE}").appendField(new
|
|
3730
|
+
}, this.appendValueInput("VALUE").appendField("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TITLE}").appendField(new m(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_HELPURL}"), this.initData_();
|
|
3737
3731
|
},
|
|
3738
3732
|
initData_: function() {
|
|
3739
3733
|
if (this.output.id)
|
|
3740
3734
|
return;
|
|
3741
|
-
const t =
|
|
3735
|
+
const t = wt().outputs?.[0];
|
|
3742
3736
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3743
3737
|
},
|
|
3744
3738
|
saveExtraState: function() {
|
|
@@ -3752,7 +3746,7 @@ const Ei = {
|
|
|
3752
3746
|
}, 0);
|
|
3753
3747
|
},
|
|
3754
3748
|
genOutputOpts_: function() {
|
|
3755
|
-
return
|
|
3749
|
+
return di();
|
|
3756
3750
|
},
|
|
3757
3751
|
onchange: function(t) {
|
|
3758
3752
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3802,7 +3796,7 @@ const Ei = {
|
|
|
3802
3796
|
this.setWarningText(null);
|
|
3803
3797
|
}
|
|
3804
3798
|
};
|
|
3805
|
-
d.set_func_output_v1 =
|
|
3799
|
+
d.set_func_output_v1 = gi;
|
|
3806
3800
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3807
3801
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3808
3802
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3875,13 +3869,13 @@ function Lt(t, e, n) {
|
|
|
3875
3869
|
if (a)
|
|
3876
3870
|
return a.columns.find((l) => l.id === n);
|
|
3877
3871
|
}
|
|
3878
|
-
function
|
|
3872
|
+
function Ai(t, e) {
|
|
3879
3873
|
const n = [];
|
|
3880
3874
|
return et(t, e).forEach(({ id: i, name: a }) => {
|
|
3881
3875
|
n.push([a, i]);
|
|
3882
3876
|
}), N(n);
|
|
3883
3877
|
}
|
|
3884
|
-
function
|
|
3878
|
+
function Ii(t) {
|
|
3885
3879
|
const e = t.getInput("TABLE").connection;
|
|
3886
3880
|
if (e.targetBlock())
|
|
3887
3881
|
return;
|
|
@@ -3915,7 +3909,7 @@ function Ai(t) {
|
|
|
3915
3909
|
}, l = $.blocks.append(a, t.workspace);
|
|
3916
3910
|
e.connect(l.outputConnection);
|
|
3917
3911
|
}
|
|
3918
|
-
function
|
|
3912
|
+
function Oi(t) {
|
|
3919
3913
|
const e = t.getInput("HANDLE").connection;
|
|
3920
3914
|
if (e.targetBlock())
|
|
3921
3915
|
return;
|
|
@@ -3939,7 +3933,7 @@ function Ii(t) {
|
|
|
3939
3933
|
}, o = $.blocks.append(n, t.workspace);
|
|
3940
3934
|
e.connect(o.previousConnection);
|
|
3941
3935
|
}
|
|
3942
|
-
const
|
|
3936
|
+
const Ci = {
|
|
3943
3937
|
init: function() {
|
|
3944
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}");
|
|
3945
3939
|
},
|
|
@@ -3955,14 +3949,14 @@ const Oi = {
|
|
|
3955
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"));
|
|
3956
3950
|
},
|
|
3957
3951
|
ensureBlocks_: function() {
|
|
3958
|
-
this.isInsertionMarker() || (
|
|
3952
|
+
this.isInsertionMarker() || (Ii(this), F(this, [
|
|
3959
3953
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3960
3954
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3961
3955
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3962
|
-
]),
|
|
3956
|
+
]), Oi(this));
|
|
3963
3957
|
}
|
|
3964
3958
|
};
|
|
3965
|
-
d.add_data_v1 =
|
|
3959
|
+
d.add_data_v1 = Ci;
|
|
3966
3960
|
s.forBlock.add_data_v1 = function(t) {
|
|
3967
3961
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3968
3962
|
return `{
|
|
@@ -3978,7 +3972,7 @@ ${e}}
|
|
|
3978
3972
|
${o}}
|
|
3979
3973
|
`;
|
|
3980
3974
|
};
|
|
3981
|
-
const
|
|
3975
|
+
const ki = {
|
|
3982
3976
|
init: function() {
|
|
3983
3977
|
this.space = {
|
|
3984
3978
|
id: "",
|
|
@@ -3991,8 +3985,8 @@ const Ci = {
|
|
|
3991
3985
|
name: "",
|
|
3992
3986
|
type: "",
|
|
3993
3987
|
extend: ""
|
|
3994
|
-
}, this.appendValueInput("VALUE").appendField(new
|
|
3995
|
-
new
|
|
3988
|
+
}, this.appendValueInput("VALUE").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE").appendField(new m(() => this.genColumnOpts_()), "COLUMN").appendField(
|
|
3989
|
+
new m([
|
|
3996
3990
|
["=", "EQ"],
|
|
3997
3991
|
["≠", "NEQ"],
|
|
3998
3992
|
["<", "LT"],
|
|
@@ -4038,7 +4032,7 @@ const Ci = {
|
|
|
4038
4032
|
return pt(this.space.id);
|
|
4039
4033
|
},
|
|
4040
4034
|
genColumnOpts_: function() {
|
|
4041
|
-
return
|
|
4035
|
+
return Ai(this.space.id, this.table.id);
|
|
4042
4036
|
},
|
|
4043
4037
|
onchange: function(t) {
|
|
4044
4038
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4131,7 +4125,7 @@ const Ci = {
|
|
|
4131
4125
|
this.setWarningText(null);
|
|
4132
4126
|
}
|
|
4133
4127
|
};
|
|
4134
|
-
d.cond_atomic_v1 =
|
|
4128
|
+
d.cond_atomic_v1 = ki;
|
|
4135
4129
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4136
4130
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4137
4131
|
EQ: "=",
|
|
@@ -4143,22 +4137,22 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4143
4137
|
}[n.getFieldValue("OP")];
|
|
4144
4138
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4145
4139
|
};
|
|
4146
|
-
const
|
|
4140
|
+
const vi = {
|
|
4147
4141
|
init: function() {
|
|
4148
4142
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4143
|
}
|
|
4150
4144
|
};
|
|
4151
|
-
d.cond_logic_container_v1 =
|
|
4152
|
-
const
|
|
4145
|
+
d.cond_logic_container_v1 = vi;
|
|
4146
|
+
const yi = {
|
|
4153
4147
|
init: function() {
|
|
4154
4148
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4155
4149
|
}
|
|
4156
4150
|
};
|
|
4157
|
-
d.cond_logic_item_v1 =
|
|
4158
|
-
const
|
|
4151
|
+
d.cond_logic_item_v1 = yi;
|
|
4152
|
+
const Ni = {
|
|
4159
4153
|
init: function() {
|
|
4160
4154
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4161
|
-
new
|
|
4155
|
+
new m([
|
|
4162
4156
|
["%{BKY_DATA_COND_LOGIC_TYPE_AND}", "AND"],
|
|
4163
4157
|
["%{BKY_DATA_COND_LOGIC_TYPE_OR}", "OR"]
|
|
4164
4158
|
]),
|
|
@@ -4229,7 +4223,7 @@ const yi = {
|
|
|
4229
4223
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4230
4224
|
}
|
|
4231
4225
|
};
|
|
4232
|
-
d.cond_logic_v1 =
|
|
4226
|
+
d.cond_logic_v1 = Ni;
|
|
4233
4227
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4234
4228
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4235
4229
|
i.push(a);
|
|
@@ -4239,7 +4233,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4239
4233
|
}
|
|
4240
4234
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4241
4235
|
};
|
|
4242
|
-
function
|
|
4236
|
+
function Li(t) {
|
|
4243
4237
|
const e = t.getInput("TABLE").connection;
|
|
4244
4238
|
if (e.targetBlock())
|
|
4245
4239
|
return;
|
|
@@ -4258,7 +4252,7 @@ function Ni(t) {
|
|
|
4258
4252
|
}, a = $.blocks.append(i, t.workspace);
|
|
4259
4253
|
e.connect(a.outputConnection);
|
|
4260
4254
|
}
|
|
4261
|
-
function
|
|
4255
|
+
function Si(t) {
|
|
4262
4256
|
const e = t.getInput("CONDITION").connection;
|
|
4263
4257
|
if (e.targetBlock())
|
|
4264
4258
|
return;
|
|
@@ -4283,7 +4277,7 @@ function Li(t) {
|
|
|
4283
4277
|
}, l = $.blocks.append(a, t.workspace);
|
|
4284
4278
|
e.connect(l.outputConnection);
|
|
4285
4279
|
}
|
|
4286
|
-
function
|
|
4280
|
+
function bi(t) {
|
|
4287
4281
|
const e = t.getInput("HANDLE").connection;
|
|
4288
4282
|
if (e.targetBlock())
|
|
4289
4283
|
return;
|
|
@@ -4307,7 +4301,7 @@ function Si(t) {
|
|
|
4307
4301
|
}, o = $.blocks.append(n, t.workspace);
|
|
4308
4302
|
e.connect(o.previousConnection);
|
|
4309
4303
|
}
|
|
4310
|
-
const
|
|
4304
|
+
const Bi = {
|
|
4311
4305
|
init: function() {
|
|
4312
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}");
|
|
4313
4307
|
},
|
|
@@ -4323,13 +4317,13 @@ const bi = {
|
|
|
4323
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"));
|
|
4324
4318
|
},
|
|
4325
4319
|
ensureBlocks_: function() {
|
|
4326
|
-
this.isInsertionMarker() || (
|
|
4320
|
+
this.isInsertionMarker() || (Li(this), Si(this), F(this, [
|
|
4327
4321
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4328
4322
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4329
|
-
]),
|
|
4323
|
+
]), bi(this));
|
|
4330
4324
|
}
|
|
4331
4325
|
};
|
|
4332
|
-
d.delete_data_v1 =
|
|
4326
|
+
d.delete_data_v1 = Bi;
|
|
4333
4327
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4334
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");
|
|
4335
4329
|
return `{
|
|
@@ -4367,7 +4361,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4367
4361
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4368
4362
|
`;
|
|
4369
4363
|
};
|
|
4370
|
-
function
|
|
4364
|
+
function Ri(t) {
|
|
4371
4365
|
const e = t.getInput("TABLE").connection;
|
|
4372
4366
|
if (e.targetBlock())
|
|
4373
4367
|
return;
|
|
@@ -4401,7 +4395,7 @@ function Bi(t) {
|
|
|
4401
4395
|
}, l = $.blocks.append(a, t.workspace);
|
|
4402
4396
|
e.connect(l.outputConnection);
|
|
4403
4397
|
}
|
|
4404
|
-
function
|
|
4398
|
+
function Di(t) {
|
|
4405
4399
|
const e = t.getInput("CONDITION").connection;
|
|
4406
4400
|
if (e.targetBlock())
|
|
4407
4401
|
return;
|
|
@@ -4410,7 +4404,7 @@ function Ri(t) {
|
|
|
4410
4404
|
}, o = $.blocks.append(n, t.workspace);
|
|
4411
4405
|
e.connect(o.outputConnection);
|
|
4412
4406
|
}
|
|
4413
|
-
function
|
|
4407
|
+
function Ui(t) {
|
|
4414
4408
|
const e = t.getInput("EXTRA").connection;
|
|
4415
4409
|
if (e.targetBlock())
|
|
4416
4410
|
return;
|
|
@@ -4447,7 +4441,7 @@ function Di(t) {
|
|
|
4447
4441
|
}, o = $.blocks.append(n, t.workspace);
|
|
4448
4442
|
e.connect(o.outputConnection);
|
|
4449
4443
|
}
|
|
4450
|
-
function
|
|
4444
|
+
function Mi(t) {
|
|
4451
4445
|
const e = t.getInput("HANDLE").connection;
|
|
4452
4446
|
if (e.targetBlock())
|
|
4453
4447
|
return;
|
|
@@ -4485,7 +4479,7 @@ h([
|
|
|
4485
4479
|
style: "procedure_blocks"
|
|
4486
4480
|
}
|
|
4487
4481
|
]);
|
|
4488
|
-
const
|
|
4482
|
+
const Vi = {
|
|
4489
4483
|
init: function() {
|
|
4490
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}");
|
|
4491
4485
|
},
|
|
@@ -4501,15 +4495,15 @@ const Mi = {
|
|
|
4501
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"));
|
|
4502
4496
|
},
|
|
4503
4497
|
ensureBlocks_: function() {
|
|
4504
|
-
this.isInsertionMarker() || (
|
|
4498
|
+
this.isInsertionMarker() || (Ri(this), Di(this), Ui(this), F(this, [
|
|
4505
4499
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4506
4500
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4507
4501
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4508
4502
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4509
|
-
]),
|
|
4503
|
+
]), Mi(this));
|
|
4510
4504
|
}
|
|
4511
4505
|
};
|
|
4512
|
-
d.query_data_v1 =
|
|
4506
|
+
d.query_data_v1 = Vi;
|
|
4513
4507
|
s.forBlock.query_data_v1 = function(t) {
|
|
4514
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");
|
|
4515
4509
|
return `{
|
|
@@ -4582,19 +4576,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4582
4576
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4583
4577
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4584
4578
|
};
|
|
4585
|
-
const
|
|
4579
|
+
const Pi = {
|
|
4586
4580
|
init: function() {
|
|
4587
4581
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4582
|
}
|
|
4589
4583
|
};
|
|
4590
|
-
d.select_column_container_v1 =
|
|
4591
|
-
const
|
|
4584
|
+
d.select_column_container_v1 = Pi;
|
|
4585
|
+
const xi = {
|
|
4592
4586
|
init: function() {
|
|
4593
4587
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4594
4588
|
}
|
|
4595
4589
|
};
|
|
4596
|
-
d.select_column_item_v1 =
|
|
4597
|
-
const
|
|
4590
|
+
d.select_column_item_v1 = xi;
|
|
4591
|
+
const Fi = {
|
|
4598
4592
|
init: function() {
|
|
4599
4593
|
this.space = {
|
|
4600
4594
|
id: "",
|
|
@@ -4603,7 +4597,7 @@ const xi = {
|
|
|
4603
4597
|
id: "",
|
|
4604
4598
|
name: "",
|
|
4605
4599
|
columns: []
|
|
4606
|
-
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new
|
|
4600
|
+
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4607
4601
|
new Te.MutatorIcon(
|
|
4608
4602
|
["select_column_item_v1"],
|
|
4609
4603
|
this
|
|
@@ -4754,7 +4748,7 @@ const xi = {
|
|
|
4754
4748
|
initShape_: function() {
|
|
4755
4749
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4756
4750
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4757
|
-
const e = this.table.columns[t], n = new
|
|
4751
|
+
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new re("");
|
|
4758
4752
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4759
4753
|
}
|
|
4760
4754
|
},
|
|
@@ -4764,7 +4758,7 @@ const xi = {
|
|
|
4764
4758
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
4765
4759
|
if (this.getInput("ADD" + t))
|
|
4766
4760
|
continue;
|
|
4767
|
-
const e = new
|
|
4761
|
+
const e = new m(() => this.genColumnOpts_()), n = new re("");
|
|
4768
4762
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4769
4763
|
const o = this.table.columns[0];
|
|
4770
4764
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
@@ -4789,11 +4783,11 @@ const xi = {
|
|
|
4789
4783
|
this.setWarningText(null);
|
|
4790
4784
|
}
|
|
4791
4785
|
};
|
|
4792
|
-
d.select_column_v1 =
|
|
4786
|
+
d.select_column_v1 = Fi;
|
|
4793
4787
|
s.forBlock.select_column_v1 = function(t) {
|
|
4794
4788
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4795
4789
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
4796
|
-
const p = n.getFieldValue("COLUMN" + r), A = n.table.columns.find((
|
|
4790
|
+
const p = n.getFieldValue("COLUMN" + r), A = n.table.columns.find((f) => f.id === p).name, I = n.getFieldValue("ALIAS" + r);
|
|
4797
4791
|
a.push({ name: A, alias: I });
|
|
4798
4792
|
}
|
|
4799
4793
|
let l = "[";
|
|
@@ -4801,7 +4795,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4801
4795
|
A !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4802
4796
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4803
4797
|
};
|
|
4804
|
-
const
|
|
4798
|
+
const wi = {
|
|
4805
4799
|
init: function() {
|
|
4806
4800
|
this.space = {
|
|
4807
4801
|
id: "",
|
|
@@ -4809,7 +4803,7 @@ const Fi = {
|
|
|
4809
4803
|
}, this.table = {
|
|
4810
4804
|
id: "",
|
|
4811
4805
|
name: ""
|
|
4812
|
-
}, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_TABLE_TITLE}").appendField(new
|
|
4806
|
+
}, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_TABLE_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setOutput(!0, "SelectTable"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_DATA_V1_SELECT_TABLE_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_SELECT_TABLE_HELPURL}"), this.initData_();
|
|
4813
4807
|
},
|
|
4814
4808
|
initData_: function() {
|
|
4815
4809
|
if (this.space.id)
|
|
@@ -4889,7 +4883,7 @@ const Fi = {
|
|
|
4889
4883
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4890
4884
|
}
|
|
4891
4885
|
};
|
|
4892
|
-
d.select_table_v1 =
|
|
4886
|
+
d.select_table_v1 = wi;
|
|
4893
4887
|
s.forBlock.select_table_v1 = function(t) {
|
|
4894
4888
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4895
4889
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
@@ -4918,7 +4912,7 @@ const Yi = {
|
|
|
4918
4912
|
};
|
|
4919
4913
|
d.transaction_v1 = Yi;
|
|
4920
4914
|
s.forBlock.transaction_v1 = function(t) {
|
|
4921
|
-
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");
|
|
4922
4916
|
return `{
|
|
4923
4917
|
${e}var __error${o}__ = '';
|
|
4924
4918
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4960,19 +4954,19 @@ ${e}}
|
|
|
4960
4954
|
}
|
|
4961
4955
|
`;
|
|
4962
4956
|
};
|
|
4963
|
-
const
|
|
4957
|
+
const Ki = {
|
|
4964
4958
|
init: function() {
|
|
4965
4959
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4960
|
}
|
|
4967
4961
|
};
|
|
4968
|
-
d.update_column_container_v1 =
|
|
4969
|
-
const
|
|
4962
|
+
d.update_column_container_v1 = Ki;
|
|
4963
|
+
const $i = {
|
|
4970
4964
|
init: function() {
|
|
4971
4965
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4972
4966
|
}
|
|
4973
4967
|
};
|
|
4974
|
-
d.update_column_item_v1 =
|
|
4975
|
-
const
|
|
4968
|
+
d.update_column_item_v1 = $i;
|
|
4969
|
+
const Hi = {
|
|
4976
4970
|
init: function() {
|
|
4977
4971
|
this.space = {
|
|
4978
4972
|
id: "",
|
|
@@ -4981,7 +4975,7 @@ const $i = {
|
|
|
4981
4975
|
id: "",
|
|
4982
4976
|
name: "",
|
|
4983
4977
|
columns: []
|
|
4984
|
-
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new
|
|
4978
|
+
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4985
4979
|
new Te.MutatorIcon(
|
|
4986
4980
|
["update_column_item_v1"],
|
|
4987
4981
|
this
|
|
@@ -5142,7 +5136,7 @@ const $i = {
|
|
|
5142
5136
|
initShape_: function() {
|
|
5143
5137
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
5144
5138
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
5145
|
-
const e = this.table.columns[t], n = new
|
|
5139
|
+
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_());
|
|
5146
5140
|
this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
5147
5141
|
}
|
|
5148
5142
|
},
|
|
@@ -5154,7 +5148,7 @@ const $i = {
|
|
|
5154
5148
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
5155
5149
|
if (this.getInput("ADD" + t))
|
|
5156
5150
|
continue;
|
|
5157
|
-
const e = new
|
|
5151
|
+
const e = new m(() => this.genColumnOpts_());
|
|
5158
5152
|
this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
5159
5153
|
}
|
|
5160
5154
|
},
|
|
@@ -5201,11 +5195,11 @@ const $i = {
|
|
|
5201
5195
|
this.setWarningText(null);
|
|
5202
5196
|
}
|
|
5203
5197
|
};
|
|
5204
|
-
d.update_column_v1 =
|
|
5198
|
+
d.update_column_v1 = Hi;
|
|
5205
5199
|
s.forBlock.update_column_v1 = function(t) {
|
|
5206
5200
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5207
5201
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
5208
|
-
const p = n.getFieldValue("COLUMN" + r), A = n.table.columns.find((
|
|
5202
|
+
const p = n.getFieldValue("COLUMN" + r), A = n.table.columns.find((f) => f.id === p).name, I = s.valueToCode(n, "ADD" + r, c.ATOMIC) || "null";
|
|
5209
5203
|
a.push({ name: A, value: I });
|
|
5210
5204
|
}
|
|
5211
5205
|
let l = "[";
|
|
@@ -5213,7 +5207,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5213
5207
|
A !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5214
5208
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5215
5209
|
};
|
|
5216
|
-
function
|
|
5210
|
+
function Gi(t) {
|
|
5217
5211
|
const e = t.getInput("TABLE").connection;
|
|
5218
5212
|
if (e.targetBlock())
|
|
5219
5213
|
return;
|
|
@@ -5247,7 +5241,7 @@ function Hi(t) {
|
|
|
5247
5241
|
}, l = $.blocks.append(a, t.workspace);
|
|
5248
5242
|
e.connect(l.outputConnection);
|
|
5249
5243
|
}
|
|
5250
|
-
function
|
|
5244
|
+
function Wi(t) {
|
|
5251
5245
|
const e = t.getInput("CONDITION").connection;
|
|
5252
5246
|
if (e.targetBlock())
|
|
5253
5247
|
return;
|
|
@@ -5256,7 +5250,7 @@ function Gi(t) {
|
|
|
5256
5250
|
}, o = $.blocks.append(n, t.workspace);
|
|
5257
5251
|
e.connect(o.outputConnection);
|
|
5258
5252
|
}
|
|
5259
|
-
function
|
|
5253
|
+
function ji(t) {
|
|
5260
5254
|
const e = t.getInput("HANDLE").connection;
|
|
5261
5255
|
if (e.targetBlock())
|
|
5262
5256
|
return;
|
|
@@ -5280,7 +5274,7 @@ function Wi(t) {
|
|
|
5280
5274
|
}, o = $.blocks.append(n, t.workspace);
|
|
5281
5275
|
e.connect(o.previousConnection);
|
|
5282
5276
|
}
|
|
5283
|
-
const
|
|
5277
|
+
const Xi = {
|
|
5284
5278
|
init: function() {
|
|
5285
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}");
|
|
5286
5280
|
},
|
|
@@ -5296,14 +5290,14 @@ const ji = {
|
|
|
5296
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"));
|
|
5297
5291
|
},
|
|
5298
5292
|
ensureBlocks: function() {
|
|
5299
|
-
this.isInsertionMarker() || (
|
|
5293
|
+
this.isInsertionMarker() || (Gi(this), Wi(this), F(this, [
|
|
5300
5294
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5301
5295
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5302
5296
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5303
|
-
]),
|
|
5297
|
+
]), ji(this));
|
|
5304
5298
|
}
|
|
5305
5299
|
};
|
|
5306
|
-
d.update_data_v1 =
|
|
5300
|
+
d.update_data_v1 = Xi;
|
|
5307
5301
|
s.forBlock.update_data_v1 = function(t) {
|
|
5308
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");
|
|
5309
5303
|
return `{
|
|
@@ -5320,7 +5314,7 @@ ${e}}
|
|
|
5320
5314
|
${i}}
|
|
5321
5315
|
`;
|
|
5322
5316
|
};
|
|
5323
|
-
const
|
|
5317
|
+
const Ji = v.xml, qi = {
|
|
5324
5318
|
init: function() {
|
|
5325
5319
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5326
5320
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5329,7 +5323,7 @@ const Xi = v.xml, Ji = {
|
|
|
5329
5323
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5330
5324
|
},
|
|
5331
5325
|
mutationToDom: function() {
|
|
5332
|
-
const t =
|
|
5326
|
+
const t = Ji.createElement("mutation");
|
|
5333
5327
|
return t.setAttribute("items", String(this.length)), t;
|
|
5334
5328
|
},
|
|
5335
5329
|
domToMutation: function(t) {
|
|
@@ -5381,8 +5375,8 @@ const Xi = v.xml, Ji = {
|
|
|
5381
5375
|
this.length--;
|
|
5382
5376
|
}
|
|
5383
5377
|
};
|
|
5384
|
-
d.json_array_v1 =
|
|
5385
|
-
const
|
|
5378
|
+
d.json_array_v1 = qi;
|
|
5379
|
+
const Qi = {
|
|
5386
5380
|
init: function() {
|
|
5387
5381
|
this.appendDummyInput().appendField(
|
|
5388
5382
|
new dn([
|
|
@@ -5393,8 +5387,8 @@ const qi = {
|
|
|
5393
5387
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5394
5388
|
}
|
|
5395
5389
|
};
|
|
5396
|
-
d.json_boolean_v1 =
|
|
5397
|
-
const ln = v.xml,
|
|
5390
|
+
d.json_boolean_v1 = Qi;
|
|
5391
|
+
const ln = v.xml, zi = {
|
|
5398
5392
|
init: function() {
|
|
5399
5393
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5400
5394
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5460,38 +5454,38 @@ const ln = v.xml, Qi = {
|
|
|
5460
5454
|
this.length--;
|
|
5461
5455
|
}
|
|
5462
5456
|
};
|
|
5463
|
-
d.json_map_v1 =
|
|
5464
|
-
const
|
|
5457
|
+
d.json_map_v1 = zi;
|
|
5458
|
+
const Zi = {
|
|
5465
5459
|
init: function() {
|
|
5466
5460
|
this.appendDummyInput().appendField(new Rt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5467
5461
|
}
|
|
5468
5462
|
};
|
|
5469
|
-
d.json_number_v1 =
|
|
5470
|
-
const
|
|
5463
|
+
d.json_number_v1 = Zi;
|
|
5464
|
+
const es = {
|
|
5471
5465
|
init: function() {
|
|
5472
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("");
|
|
5473
5467
|
}
|
|
5474
5468
|
};
|
|
5475
|
-
d.json_root_v1 =
|
|
5476
|
-
const
|
|
5469
|
+
d.json_root_v1 = es;
|
|
5470
|
+
const ts = {
|
|
5477
5471
|
init: function() {
|
|
5478
5472
|
this.appendDummyInput().appendField('"').appendField(new re(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5479
5473
|
}
|
|
5480
5474
|
};
|
|
5481
|
-
d.json_string_v1 =
|
|
5482
|
-
const
|
|
5475
|
+
d.json_string_v1 = ts;
|
|
5476
|
+
const ns = v.xml, os = {
|
|
5483
5477
|
init: function() {
|
|
5484
5478
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5479
|
}
|
|
5486
5480
|
};
|
|
5487
|
-
d.list_create_container_v1 =
|
|
5488
|
-
const
|
|
5481
|
+
d.list_create_container_v1 = os;
|
|
5482
|
+
const is = {
|
|
5489
5483
|
init: function() {
|
|
5490
5484
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5491
5485
|
}
|
|
5492
5486
|
};
|
|
5493
|
-
d.list_create_item_v1 =
|
|
5494
|
-
const
|
|
5487
|
+
d.list_create_item_v1 = is;
|
|
5488
|
+
const ss = {
|
|
5495
5489
|
init: function() {
|
|
5496
5490
|
this.itemCount_ = 0, this.setMutator(
|
|
5497
5491
|
new Te.MutatorIcon(
|
|
@@ -5501,7 +5495,7 @@ const is = {
|
|
|
5501
5495
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5502
5496
|
},
|
|
5503
5497
|
mutationToDom: function() {
|
|
5504
|
-
const t =
|
|
5498
|
+
const t = ns.createElement("mutation");
|
|
5505
5499
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5506
5500
|
},
|
|
5507
5501
|
domToMutation: function(t) {
|
|
@@ -5574,7 +5568,7 @@ const is = {
|
|
|
5574
5568
|
this.removeInput("ADD" + t);
|
|
5575
5569
|
}
|
|
5576
5570
|
};
|
|
5577
|
-
d.list_create_v1 =
|
|
5571
|
+
d.list_create_v1 = ss;
|
|
5578
5572
|
s.forBlock.list_create_v1 = function(t) {
|
|
5579
5573
|
const e = t, n = new Array(e.itemCount_);
|
|
5580
5574
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5790,7 +5784,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5790
5784
|
return `${e}[${n}] = ${o};
|
|
5791
5785
|
`;
|
|
5792
5786
|
};
|
|
5793
|
-
const
|
|
5787
|
+
const as = {
|
|
5794
5788
|
// logic_compare
|
|
5795
5789
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5796
5790
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5804,7 +5798,7 @@ const ss = {
|
|
|
5804
5798
|
};
|
|
5805
5799
|
R.register(
|
|
5806
5800
|
"logic_op_tooltip_v1",
|
|
5807
|
-
R.buildTooltipForDropdown("OP",
|
|
5801
|
+
R.buildTooltipForDropdown("OP", as)
|
|
5808
5802
|
);
|
|
5809
5803
|
h([
|
|
5810
5804
|
{
|
|
@@ -5829,7 +5823,7 @@ h([
|
|
|
5829
5823
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5830
5824
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5831
5825
|
};
|
|
5832
|
-
const
|
|
5826
|
+
const cs = {
|
|
5833
5827
|
onchange: function(t) {
|
|
5834
5828
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5835
5829
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5849,7 +5843,7 @@ const as = {
|
|
|
5849
5843
|
R.register(
|
|
5850
5844
|
"logic_compare_v1",
|
|
5851
5845
|
function() {
|
|
5852
|
-
this.mixin(
|
|
5846
|
+
this.mixin(cs);
|
|
5853
5847
|
}
|
|
5854
5848
|
);
|
|
5855
5849
|
h([
|
|
@@ -5899,7 +5893,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5899
5893
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5900
5894
|
return [`${i} ${n} ${a}`, o];
|
|
5901
5895
|
};
|
|
5902
|
-
const
|
|
5896
|
+
const ls = {
|
|
5903
5897
|
elseIfCount_: 0,
|
|
5904
5898
|
hasElse_: !1,
|
|
5905
5899
|
mutationToDom: function() {
|
|
@@ -6026,7 +6020,7 @@ const cs = {
|
|
|
6026
6020
|
};
|
|
6027
6021
|
R.registerMutator(
|
|
6028
6022
|
"logic_if_v1_mutator",
|
|
6029
|
-
|
|
6023
|
+
ls,
|
|
6030
6024
|
void 0,
|
|
6031
6025
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6032
6026
|
);
|
|
@@ -6172,7 +6166,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6172
6166
|
}
|
|
6173
6167
|
return [`${o} ${e} ${i}`, n];
|
|
6174
6168
|
};
|
|
6175
|
-
const
|
|
6169
|
+
const us = {
|
|
6176
6170
|
prevParentConnection_: null,
|
|
6177
6171
|
onchange: function(t) {
|
|
6178
6172
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6187,7 +6181,7 @@ const ls = {
|
|
|
6187
6181
|
this.prevParentConnection_ = o;
|
|
6188
6182
|
}
|
|
6189
6183
|
};
|
|
6190
|
-
R.registerMixin("logic_ternary_v1",
|
|
6184
|
+
R.registerMixin("logic_ternary_v1", us);
|
|
6191
6185
|
h([
|
|
6192
6186
|
{
|
|
6193
6187
|
type: "logic_ternary_v1",
|
|
@@ -6224,7 +6218,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6224
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";
|
|
6225
6219
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6226
6220
|
};
|
|
6227
|
-
const
|
|
6221
|
+
const rs = {
|
|
6228
6222
|
customContextMenu: function(t) {
|
|
6229
6223
|
if (this.isInFlyout)
|
|
6230
6224
|
return;
|
|
@@ -6246,7 +6240,7 @@ const us = {
|
|
|
6246
6240
|
};
|
|
6247
6241
|
R.registerMixin(
|
|
6248
6242
|
"contextMenu_newGetVariableBlock_v1",
|
|
6249
|
-
|
|
6243
|
+
rs
|
|
6250
6244
|
);
|
|
6251
6245
|
R.register(
|
|
6252
6246
|
"flow_control_tooltip_v1",
|
|
@@ -6255,16 +6249,16 @@ R.register(
|
|
|
6255
6249
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6256
6250
|
})
|
|
6257
6251
|
);
|
|
6258
|
-
const
|
|
6252
|
+
const _s = /* @__PURE__ */ new Set([
|
|
6259
6253
|
"repeat_v1",
|
|
6260
6254
|
"for_each_v1",
|
|
6261
6255
|
"for_v1",
|
|
6262
6256
|
"while_until_v1"
|
|
6263
|
-
]),
|
|
6257
|
+
]), ps = {
|
|
6264
6258
|
getSurroundLoop: function() {
|
|
6265
6259
|
let t = this;
|
|
6266
6260
|
do {
|
|
6267
|
-
if (
|
|
6261
|
+
if (_s.has(t.type))
|
|
6268
6262
|
return t;
|
|
6269
6263
|
t = t?.getSurroundParent();
|
|
6270
6264
|
} while (t);
|
|
@@ -6287,7 +6281,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
6287
6281
|
};
|
|
6288
6282
|
R.registerMixin(
|
|
6289
6283
|
"flow_control_in_loop_check_v1",
|
|
6290
|
-
|
|
6284
|
+
ps
|
|
6291
6285
|
);
|
|
6292
6286
|
h([
|
|
6293
6287
|
{
|
|
@@ -6589,7 +6583,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6589
6583
|
${o}}
|
|
6590
6584
|
`;
|
|
6591
6585
|
};
|
|
6592
|
-
const
|
|
6586
|
+
const hs = {
|
|
6593
6587
|
// math_arithmetic
|
|
6594
6588
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6595
6589
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6623,7 +6617,7 @@ const ps = {
|
|
|
6623
6617
|
};
|
|
6624
6618
|
R.register(
|
|
6625
6619
|
"math_op_tooltip_v1",
|
|
6626
|
-
R.buildTooltipForDropdown("OP",
|
|
6620
|
+
R.buildTooltipForDropdown("OP", hs)
|
|
6627
6621
|
);
|
|
6628
6622
|
h([
|
|
6629
6623
|
{
|
|
@@ -7226,21 +7220,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7226
7220
|
}
|
|
7227
7221
|
return [o, c.DIVISION];
|
|
7228
7222
|
};
|
|
7229
|
-
const
|
|
7223
|
+
const ds = v.xml, fs = {
|
|
7230
7224
|
init: function() {
|
|
7231
7225
|
this.appendDummyInput().appendField(
|
|
7232
7226
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7233
7227
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7228
|
}
|
|
7235
7229
|
};
|
|
7236
|
-
d.object_create_container_v1 =
|
|
7237
|
-
const
|
|
7230
|
+
d.object_create_container_v1 = fs;
|
|
7231
|
+
const ms = {
|
|
7238
7232
|
init: function() {
|
|
7239
7233
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7240
7234
|
}
|
|
7241
7235
|
};
|
|
7242
|
-
d.object_create_item_v1 =
|
|
7243
|
-
const
|
|
7236
|
+
d.object_create_item_v1 = ms;
|
|
7237
|
+
const Ts = {
|
|
7244
7238
|
init: function() {
|
|
7245
7239
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7246
7240
|
new Te.MutatorIcon(
|
|
@@ -7250,7 +7244,7 @@ const ms = {
|
|
|
7250
7244
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7251
7245
|
},
|
|
7252
7246
|
mutationToDom: function() {
|
|
7253
|
-
const t =
|
|
7247
|
+
const t = ds.createElement("mutation");
|
|
7254
7248
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7255
7249
|
},
|
|
7256
7250
|
domToMutation: function(t) {
|
|
@@ -7314,7 +7308,7 @@ const ms = {
|
|
|
7314
7308
|
this.removeInput("ADD" + t);
|
|
7315
7309
|
}
|
|
7316
7310
|
};
|
|
7317
|
-
d.object_create_v1 =
|
|
7311
|
+
d.object_create_v1 = Ts;
|
|
7318
7312
|
s.forBlock.object_create_v1 = function(t) {
|
|
7319
7313
|
const e = t;
|
|
7320
7314
|
let n = "{";
|
|
@@ -7572,13 +7566,13 @@ h([
|
|
|
7572
7566
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7573
7567
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7574
7568
|
};
|
|
7575
|
-
const un = v.xml,
|
|
7569
|
+
const un = v.xml, Es = {
|
|
7576
7570
|
init: function() {
|
|
7577
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;
|
|
7578
7572
|
}
|
|
7579
7573
|
};
|
|
7580
|
-
d.procedure_def_container_v1 =
|
|
7581
|
-
const
|
|
7574
|
+
d.procedure_def_container_v1 = Es;
|
|
7575
|
+
const gs = {
|
|
7582
7576
|
init: function() {
|
|
7583
7577
|
const t = new re(Dt.DEFAULT_ARG);
|
|
7584
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;
|
|
@@ -7600,8 +7594,8 @@ const Es = {
|
|
|
7600
7594
|
return t;
|
|
7601
7595
|
}
|
|
7602
7596
|
};
|
|
7603
|
-
d.procedure_def_item_v1 =
|
|
7604
|
-
const
|
|
7597
|
+
d.procedure_def_item_v1 = gs;
|
|
7598
|
+
const As = {
|
|
7605
7599
|
init: function() {
|
|
7606
7600
|
this.withReturn = !1, this.args = [];
|
|
7607
7601
|
const t = new re(
|
|
@@ -7705,13 +7699,13 @@ const gs = {
|
|
|
7705
7699
|
}
|
|
7706
7700
|
}
|
|
7707
7701
|
};
|
|
7708
|
-
d.procedure_def_v1 =
|
|
7709
|
-
const
|
|
7702
|
+
d.procedure_def_v1 = As;
|
|
7703
|
+
const Is = v.xml, Os = {
|
|
7710
7704
|
init: function() {
|
|
7711
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}");
|
|
7712
7706
|
},
|
|
7713
7707
|
mutationToDom: function() {
|
|
7714
|
-
const t =
|
|
7708
|
+
const t = Is.createElement("mutation");
|
|
7715
7709
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7716
7710
|
},
|
|
7717
7711
|
domToMutation: function(t) {
|
|
@@ -7762,14 +7756,14 @@ const As = v.xml, Is = {
|
|
|
7762
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");
|
|
7763
7757
|
}
|
|
7764
7758
|
};
|
|
7765
|
-
d.procedure_return_v1 =
|
|
7759
|
+
d.procedure_return_v1 = Os;
|
|
7766
7760
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7767
7761
|
const e = t;
|
|
7768
7762
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7769
7763
|
` : `return;
|
|
7770
7764
|
`;
|
|
7771
7765
|
};
|
|
7772
|
-
const
|
|
7766
|
+
const Cs = {
|
|
7773
7767
|
init: function() {
|
|
7774
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}");
|
|
7775
7769
|
},
|
|
@@ -7792,7 +7786,7 @@ const Os = {
|
|
|
7792
7786
|
]);
|
|
7793
7787
|
}
|
|
7794
7788
|
};
|
|
7795
|
-
d.download_resource_v1 =
|
|
7789
|
+
d.download_resource_v1 = Cs;
|
|
7796
7790
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7797
7791
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7798
7792
|
return `{
|
|
@@ -7820,7 +7814,7 @@ function Un(t) {
|
|
|
7820
7814
|
}
|
|
7821
7815
|
return o(e.dirTree, ""), n;
|
|
7822
7816
|
}
|
|
7823
|
-
function
|
|
7817
|
+
function ks(t) {
|
|
7824
7818
|
const e = [];
|
|
7825
7819
|
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7826
7820
|
e.push([i, o]);
|
|
@@ -7835,7 +7829,7 @@ function Mn(t, e) {
|
|
|
7835
7829
|
i.dirid === e && o.push(i);
|
|
7836
7830
|
}), o;
|
|
7837
7831
|
}
|
|
7838
|
-
function
|
|
7832
|
+
function vs(t, e) {
|
|
7839
7833
|
const n = [];
|
|
7840
7834
|
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7841
7835
|
n.push([a, i]);
|
|
@@ -7847,13 +7841,13 @@ function Vn() {
|
|
|
7847
7841
|
e.resources.length > 0 && t.push(e);
|
|
7848
7842
|
}), t;
|
|
7849
7843
|
}
|
|
7850
|
-
function
|
|
7844
|
+
function ys() {
|
|
7851
7845
|
const t = [];
|
|
7852
7846
|
return Vn().forEach(({ id: n, name: o }) => {
|
|
7853
7847
|
t.push([o, n]);
|
|
7854
7848
|
}), N(t);
|
|
7855
7849
|
}
|
|
7856
|
-
const
|
|
7850
|
+
const Ns = {
|
|
7857
7851
|
init: function() {
|
|
7858
7852
|
this.space = {
|
|
7859
7853
|
id: "",
|
|
@@ -7864,8 +7858,8 @@ const ys = {
|
|
|
7864
7858
|
}, this.resource = {
|
|
7865
7859
|
id: "",
|
|
7866
7860
|
name: ""
|
|
7867
|
-
}, this.appendDummyInput().appendField("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TITLE").appendField(new
|
|
7868
|
-
new
|
|
7861
|
+
}, this.appendDummyInput().appendField("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TITLE").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genDirOpts_()), "DIR").appendField(
|
|
7862
|
+
new m(() => this.genResourceOpts_()),
|
|
7869
7863
|
"RESOURCE"
|
|
7870
7864
|
), this.setOutput(!0, "Resource"), this.setStyle("resource_blocks"), this.setTooltip("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TOOLTIP}"), this.setHelpUrl("%{BKY_RESOURCE_V1_SELECT_RESOURCE_HELPURL}"), this.initData_();
|
|
7871
7865
|
},
|
|
@@ -7902,20 +7896,20 @@ const ys = {
|
|
|
7902
7896
|
this.space = De(t.space), this.dir = De(t.dir), this.resource = De(t.resource);
|
|
7903
7897
|
},
|
|
7904
7898
|
genSpaceOpts_: function() {
|
|
7905
|
-
return
|
|
7899
|
+
return ys();
|
|
7906
7900
|
},
|
|
7907
7901
|
genDirOpts_: function() {
|
|
7908
|
-
return
|
|
7902
|
+
return ks(this.space.id);
|
|
7909
7903
|
},
|
|
7910
7904
|
genResourceOpts_: function() {
|
|
7911
|
-
return
|
|
7905
|
+
return vs(this.space.id, this.dir.id);
|
|
7912
7906
|
}
|
|
7913
7907
|
};
|
|
7914
|
-
d.select_resource_v1 =
|
|
7908
|
+
d.select_resource_v1 = Ns;
|
|
7915
7909
|
s.forBlock.select_resource_v1 = function() {
|
|
7916
7910
|
return "";
|
|
7917
7911
|
};
|
|
7918
|
-
const
|
|
7912
|
+
const Ls = {
|
|
7919
7913
|
init: function() {
|
|
7920
7914
|
this.appendDummyInput().appendField(
|
|
7921
7915
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7946,7 +7940,7 @@ const Ns = {
|
|
|
7946
7940
|
]);
|
|
7947
7941
|
}
|
|
7948
7942
|
};
|
|
7949
|
-
d.upload_resource_v1 =
|
|
7943
|
+
d.upload_resource_v1 = Ls;
|
|
7950
7944
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7951
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");
|
|
7952
7946
|
return `{
|
|
@@ -7979,9 +7973,9 @@ h([
|
|
|
7979
7973
|
s.forBlock.text_v1 = function(t) {
|
|
7980
7974
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7981
7975
|
};
|
|
7982
|
-
const
|
|
7976
|
+
const Ss = /^\s*'([^']|\\')*'\s*$/;
|
|
7983
7977
|
function qe(t) {
|
|
7984
|
-
return
|
|
7978
|
+
return Ss.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7985
7979
|
}
|
|
7986
7980
|
R.register(
|
|
7987
7981
|
"text_append_tooltip_v1",
|
|
@@ -8185,10 +8179,10 @@ h([
|
|
|
8185
8179
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8186
8180
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8187
8181
|
};
|
|
8188
|
-
const
|
|
8182
|
+
const bs = v.xml, Bs = {
|
|
8189
8183
|
itemCount_: 0,
|
|
8190
8184
|
mutationToDom: function() {
|
|
8191
|
-
const t =
|
|
8185
|
+
const t = bs.createElement("mutation");
|
|
8192
8186
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8193
8187
|
},
|
|
8194
8188
|
domToMutation: function(t) {
|
|
@@ -8259,13 +8253,13 @@ const Ss = v.xml, bs = {
|
|
|
8259
8253
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8260
8254
|
this.removeInput("ADD" + t);
|
|
8261
8255
|
}
|
|
8262
|
-
},
|
|
8256
|
+
}, Rs = function() {
|
|
8263
8257
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Te.MutatorIcon(["text_join_item_v1"], this));
|
|
8264
8258
|
};
|
|
8265
8259
|
R.registerMutator(
|
|
8266
8260
|
"text_join_mutator_v1",
|
|
8267
|
-
|
|
8268
|
-
|
|
8261
|
+
Bs,
|
|
8262
|
+
Rs
|
|
8269
8263
|
);
|
|
8270
8264
|
h([
|
|
8271
8265
|
{
|
|
@@ -8497,7 +8491,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8497
8491
|
}[t.getFieldValue("MODE")];
|
|
8498
8492
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8499
8493
|
};
|
|
8500
|
-
const
|
|
8494
|
+
const Ds = {
|
|
8501
8495
|
init: function() {
|
|
8502
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}");
|
|
8503
8497
|
},
|
|
@@ -8522,7 +8516,7 @@ const Rs = {
|
|
|
8522
8516
|
));
|
|
8523
8517
|
}
|
|
8524
8518
|
};
|
|
8525
|
-
d.create_timer_v1 =
|
|
8519
|
+
d.create_timer_v1 = Ds;
|
|
8526
8520
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8527
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");
|
|
8528
8522
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8551,18 +8545,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8551
8545
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8552
8546
|
`;
|
|
8553
8547
|
};
|
|
8554
|
-
const
|
|
8548
|
+
const Us = {
|
|
8555
8549
|
customContextMenu: function(t) {
|
|
8556
8550
|
if (this.isInFlyout) {
|
|
8557
8551
|
if (this.type === "variable_get_v1") {
|
|
8558
8552
|
const e = {
|
|
8559
8553
|
text: _.RENAME_VARIABLE,
|
|
8560
8554
|
enabled: !0,
|
|
8561
|
-
callback:
|
|
8555
|
+
callback: Ms(this)
|
|
8562
8556
|
}, n = this.getField("VAR").getText(), o = {
|
|
8563
8557
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8564
8558
|
enabled: !0,
|
|
8565
|
-
callback:
|
|
8559
|
+
callback: Vs(this)
|
|
8566
8560
|
};
|
|
8567
8561
|
t.unshift(e), t.unshift(o);
|
|
8568
8562
|
}
|
|
@@ -8580,12 +8574,12 @@ const Ds = {
|
|
|
8580
8574
|
});
|
|
8581
8575
|
}
|
|
8582
8576
|
}
|
|
8583
|
-
},
|
|
8577
|
+
}, Ms = function(t) {
|
|
8584
8578
|
return function() {
|
|
8585
8579
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8586
8580
|
ge.renameVariable(e, o);
|
|
8587
8581
|
};
|
|
8588
|
-
},
|
|
8582
|
+
}, Vs = function(t) {
|
|
8589
8583
|
return function() {
|
|
8590
8584
|
const n = t.getField("VAR").getVariable();
|
|
8591
8585
|
n && ge.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -8593,7 +8587,7 @@ const Ds = {
|
|
|
8593
8587
|
};
|
|
8594
8588
|
R.registerMixin(
|
|
8595
8589
|
"context_menu_variable_v1",
|
|
8596
|
-
|
|
8590
|
+
Us
|
|
8597
8591
|
);
|
|
8598
8592
|
h([
|
|
8599
8593
|
{
|
|
@@ -8650,7 +8644,7 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8650
8644
|
`;
|
|
8651
8645
|
};
|
|
8652
8646
|
const je = v.xml;
|
|
8653
|
-
function
|
|
8647
|
+
function Ps() {
|
|
8654
8648
|
const t = [];
|
|
8655
8649
|
{
|
|
8656
8650
|
const e = je.createElement("label");
|
|
@@ -8672,11 +8666,11 @@ function Vs() {
|
|
|
8672
8666
|
}
|
|
8673
8667
|
const tt = {
|
|
8674
8668
|
name: "INTERFACE_CATEGORY",
|
|
8675
|
-
callback:
|
|
8669
|
+
callback: Ps
|
|
8676
8670
|
}, b = v.xml;
|
|
8677
|
-
function
|
|
8671
|
+
function xs() {
|
|
8678
8672
|
const t = [];
|
|
8679
|
-
if (
|
|
8673
|
+
if (Xo()) {
|
|
8680
8674
|
{
|
|
8681
8675
|
const e = b.createElement("label");
|
|
8682
8676
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
@@ -8686,7 +8680,7 @@ function Ps() {
|
|
|
8686
8680
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8687
8681
|
}
|
|
8688
8682
|
}
|
|
8689
|
-
if (
|
|
8683
|
+
if (Fo()) {
|
|
8690
8684
|
{
|
|
8691
8685
|
const e = b.createElement("label");
|
|
8692
8686
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
@@ -8770,9 +8764,9 @@ function Ps() {
|
|
|
8770
8764
|
}
|
|
8771
8765
|
const nt = {
|
|
8772
8766
|
name: "UI_CATEGORY",
|
|
8773
|
-
callback:
|
|
8767
|
+
callback: xs
|
|
8774
8768
|
}, be = v.xml;
|
|
8775
|
-
function
|
|
8769
|
+
function Fs() {
|
|
8776
8770
|
const t = [];
|
|
8777
8771
|
{
|
|
8778
8772
|
const e = be.createElement("label");
|
|
@@ -8799,10 +8793,10 @@ function xs() {
|
|
|
8799
8793
|
}
|
|
8800
8794
|
const ce = {
|
|
8801
8795
|
name: "PROCEDURE_CATEGORY",
|
|
8802
|
-
callback:
|
|
8796
|
+
callback: Fs
|
|
8803
8797
|
}, Xe = v.xml;
|
|
8804
|
-
function
|
|
8805
|
-
const t =
|
|
8798
|
+
function ws() {
|
|
8799
|
+
const t = Ye(), e = [];
|
|
8806
8800
|
{
|
|
8807
8801
|
const o = Xe.createElement("label");
|
|
8808
8802
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
@@ -8839,7 +8833,7 @@ function Fs() {
|
|
|
8839
8833
|
}
|
|
8840
8834
|
const le = {
|
|
8841
8835
|
name: "VARIABLE_CATEGORY",
|
|
8842
|
-
callback:
|
|
8836
|
+
callback: ws
|
|
8843
8837
|
}, Ee = v.xml;
|
|
8844
8838
|
function Ys(t) {
|
|
8845
8839
|
const e = [];
|
|
@@ -8880,7 +8874,7 @@ const ot = {
|
|
|
8880
8874
|
name: "FLOW_CATEGORY",
|
|
8881
8875
|
callback: Ys
|
|
8882
8876
|
}, ne = v.xml;
|
|
8883
|
-
function
|
|
8877
|
+
function Ks(t) {
|
|
8884
8878
|
const { activeFunc: e } = T.compute, n = [];
|
|
8885
8879
|
if (t === "func") {
|
|
8886
8880
|
{
|
|
@@ -8929,9 +8923,9 @@ function ws(t) {
|
|
|
8929
8923
|
}
|
|
8930
8924
|
const it = {
|
|
8931
8925
|
name: "FUNC_CATEGORY",
|
|
8932
|
-
callback:
|
|
8926
|
+
callback: Ks
|
|
8933
8927
|
}, O = v.xml;
|
|
8934
|
-
function
|
|
8928
|
+
function $s() {
|
|
8935
8929
|
const t = [];
|
|
8936
8930
|
if (J().length > 0) {
|
|
8937
8931
|
{
|
|
@@ -9106,17 +9100,17 @@ function Ks() {
|
|
|
9106
9100
|
}
|
|
9107
9101
|
const st = {
|
|
9108
9102
|
name: "DATA_CATEGORY",
|
|
9109
|
-
callback:
|
|
9103
|
+
callback: $s
|
|
9110
9104
|
};
|
|
9111
9105
|
mn.setConfirm(async (t, e) => {
|
|
9112
|
-
const n = await
|
|
9106
|
+
const n = await No({
|
|
9113
9107
|
title: "",
|
|
9114
9108
|
text: t
|
|
9115
9109
|
});
|
|
9116
9110
|
e(!!n);
|
|
9117
9111
|
});
|
|
9118
9112
|
mn.setPrompt(async (t, e, n) => {
|
|
9119
|
-
const o = await
|
|
9113
|
+
const o = await Lo({
|
|
9120
9114
|
title: "",
|
|
9121
9115
|
value: e
|
|
9122
9116
|
});
|
|
@@ -9129,11 +9123,11 @@ const Pn = (t, e, n) => {
|
|
|
9129
9123
|
});
|
|
9130
9124
|
};
|
|
9131
9125
|
async function rn(t) {
|
|
9132
|
-
const e = await Pn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.
|
|
9126
|
+
const e = await Pn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.cb0pu5v6.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ca0i4cm9.js") }), `./msg/${t}.ts`, 3);
|
|
9133
9127
|
ro(e.default);
|
|
9134
9128
|
}
|
|
9135
9129
|
function Wt(t) {
|
|
9136
|
-
const e =
|
|
9130
|
+
const e = Ye();
|
|
9137
9131
|
if (!e)
|
|
9138
9132
|
return;
|
|
9139
9133
|
const n = e.getBlockById(t);
|
|
@@ -9146,7 +9140,7 @@ function Wt(t) {
|
|
|
9146
9140
|
e.scroll(-a, -l);
|
|
9147
9141
|
}
|
|
9148
9142
|
function xn() {
|
|
9149
|
-
const t =
|
|
9143
|
+
const t = Ye();
|
|
9150
9144
|
if (!t)
|
|
9151
9145
|
return;
|
|
9152
9146
|
const e = t.getTopBlocks(!0)?.[0];
|
|
@@ -9156,7 +9150,7 @@ function Fn(t) {
|
|
|
9156
9150
|
const e = t.getParent();
|
|
9157
9151
|
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9158
9152
|
}
|
|
9159
|
-
class
|
|
9153
|
+
class Hs {
|
|
9160
9154
|
init() {
|
|
9161
9155
|
const e = _o.registry.getItem("blockDisable");
|
|
9162
9156
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9167,10 +9161,10 @@ class $s {
|
|
|
9167
9161
|
}
|
|
9168
9162
|
po.registerFieldColour();
|
|
9169
9163
|
ho.registry.unregister(fo.names.ESCAPE);
|
|
9170
|
-
const
|
|
9171
|
-
|
|
9172
|
-
const
|
|
9173
|
-
|
|
9164
|
+
const Gs = new mo.CrossTabCopyPaste();
|
|
9165
|
+
Gs.init({ contextMenu: !0, shortcut: !0 });
|
|
9166
|
+
const Ws = new Hs();
|
|
9167
|
+
Ws.init();
|
|
9174
9168
|
ct.Classic.blockStyles = {
|
|
9175
9169
|
color_blocks: {
|
|
9176
9170
|
colourPrimary: "#a5745b",
|
|
@@ -9301,7 +9295,7 @@ ct.Classic.categoryStyles = {
|
|
|
9301
9295
|
colour: "#a55b80"
|
|
9302
9296
|
}
|
|
9303
9297
|
};
|
|
9304
|
-
const
|
|
9298
|
+
const js = Tn.defineTheme("light", {
|
|
9305
9299
|
name: "light",
|
|
9306
9300
|
base: ct.Classic,
|
|
9307
9301
|
componentStyles: {
|
|
@@ -9317,7 +9311,7 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9317
9311
|
scrollbarOpacity: 0.4,
|
|
9318
9312
|
cursorColour: ""
|
|
9319
9313
|
}
|
|
9320
|
-
}),
|
|
9314
|
+
}), Xs = Tn.defineTheme("dark", {
|
|
9321
9315
|
name: "dark",
|
|
9322
9316
|
base: ct.Classic,
|
|
9323
9317
|
componentStyles: {
|
|
@@ -9334,14 +9328,14 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9334
9328
|
cursorColour: ""
|
|
9335
9329
|
}
|
|
9336
9330
|
});
|
|
9337
|
-
function
|
|
9338
|
-
const e =
|
|
9331
|
+
function Js(t) {
|
|
9332
|
+
const e = Ye();
|
|
9339
9333
|
switch (t) {
|
|
9340
9334
|
case "light":
|
|
9341
|
-
e.setTheme(
|
|
9335
|
+
e.setTheme(js);
|
|
9342
9336
|
break;
|
|
9343
9337
|
case "dark":
|
|
9344
|
-
e.setTheme(
|
|
9338
|
+
e.setTheme(Xs);
|
|
9345
9339
|
break;
|
|
9346
9340
|
}
|
|
9347
9341
|
}
|
|
@@ -9793,7 +9787,7 @@ const ht = {
|
|
|
9793
9787
|
type: "math_on_list_v1"
|
|
9794
9788
|
}
|
|
9795
9789
|
]
|
|
9796
|
-
},
|
|
9790
|
+
}, wn = {
|
|
9797
9791
|
kind: "category",
|
|
9798
9792
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9799
9793
|
categorystyle: "message_category",
|
|
@@ -10060,7 +10054,7 @@ const ht = {
|
|
|
10060
10054
|
type: "text_reverse_v1"
|
|
10061
10055
|
}
|
|
10062
10056
|
]
|
|
10063
|
-
},
|
|
10057
|
+
}, Yn = {
|
|
10064
10058
|
kind: "category",
|
|
10065
10059
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10066
10060
|
categorystyle: "time_category",
|
|
@@ -10084,7 +10078,7 @@ const ht = {
|
|
|
10084
10078
|
}
|
|
10085
10079
|
}
|
|
10086
10080
|
]
|
|
10087
|
-
},
|
|
10081
|
+
}, qs = {
|
|
10088
10082
|
kind: "categoryToolbox",
|
|
10089
10083
|
contents: [
|
|
10090
10084
|
{
|
|
@@ -10093,7 +10087,7 @@ const ht = {
|
|
|
10093
10087
|
categorystyle: "ui_category",
|
|
10094
10088
|
custom: nt.name
|
|
10095
10089
|
},
|
|
10096
|
-
|
|
10090
|
+
wn,
|
|
10097
10091
|
mt,
|
|
10098
10092
|
ft,
|
|
10099
10093
|
Tt,
|
|
@@ -10101,7 +10095,7 @@ const ht = {
|
|
|
10101
10095
|
dt,
|
|
10102
10096
|
Et,
|
|
10103
10097
|
ht,
|
|
10104
|
-
|
|
10098
|
+
Yn,
|
|
10105
10099
|
{
|
|
10106
10100
|
kind: "category",
|
|
10107
10101
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10121,7 +10115,7 @@ const ht = {
|
|
|
10121
10115
|
custom: tt.name
|
|
10122
10116
|
}
|
|
10123
10117
|
]
|
|
10124
|
-
},
|
|
10118
|
+
}, Qs = {
|
|
10125
10119
|
kind: "categoryToolbox",
|
|
10126
10120
|
contents: [
|
|
10127
10121
|
{
|
|
@@ -10162,7 +10156,7 @@ const ht = {
|
|
|
10162
10156
|
custom: ce.name
|
|
10163
10157
|
}
|
|
10164
10158
|
]
|
|
10165
|
-
},
|
|
10159
|
+
}, zs = {
|
|
10166
10160
|
kind: "categoryToolbox",
|
|
10167
10161
|
contents: [
|
|
10168
10162
|
{
|
|
@@ -10203,7 +10197,7 @@ const ht = {
|
|
|
10203
10197
|
custom: ce.name
|
|
10204
10198
|
}
|
|
10205
10199
|
]
|
|
10206
|
-
},
|
|
10200
|
+
}, Zs = {
|
|
10207
10201
|
kind: "categoryToolbox",
|
|
10208
10202
|
contents: [
|
|
10209
10203
|
{
|
|
@@ -10234,7 +10228,7 @@ const ht = {
|
|
|
10234
10228
|
]
|
|
10235
10229
|
}
|
|
10236
10230
|
]
|
|
10237
|
-
},
|
|
10231
|
+
}, ea = {
|
|
10238
10232
|
kind: "categoryToolbox",
|
|
10239
10233
|
contents: [
|
|
10240
10234
|
{
|
|
@@ -10243,7 +10237,7 @@ const ht = {
|
|
|
10243
10237
|
categorystyle: "ui_category",
|
|
10244
10238
|
custom: nt.name
|
|
10245
10239
|
},
|
|
10246
|
-
|
|
10240
|
+
wn,
|
|
10247
10241
|
mt,
|
|
10248
10242
|
ft,
|
|
10249
10243
|
Tt,
|
|
@@ -10251,7 +10245,7 @@ const ht = {
|
|
|
10251
10245
|
dt,
|
|
10252
10246
|
Et,
|
|
10253
10247
|
ht,
|
|
10254
|
-
|
|
10248
|
+
Yn,
|
|
10255
10249
|
{
|
|
10256
10250
|
kind: "category",
|
|
10257
10251
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10272,13 +10266,13 @@ const ht = {
|
|
|
10272
10266
|
}
|
|
10273
10267
|
]
|
|
10274
10268
|
}, Kn = Symbol();
|
|
10275
|
-
function
|
|
10269
|
+
function ta(t) {
|
|
10276
10270
|
Zn(Kn, t);
|
|
10277
10271
|
}
|
|
10278
10272
|
function jt() {
|
|
10279
10273
|
return eo(Kn);
|
|
10280
10274
|
}
|
|
10281
|
-
const
|
|
10275
|
+
const na = /* @__PURE__ */ oe({
|
|
10282
10276
|
__name: "index",
|
|
10283
10277
|
props: {
|
|
10284
10278
|
lock: { type: Boolean }
|
|
@@ -10303,7 +10297,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10303
10297
|
text: V(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10304
10298
|
}, {
|
|
10305
10299
|
activator: ee(({ props: I }) => [
|
|
10306
|
-
B(p,
|
|
10300
|
+
B(p, Yt(I, {
|
|
10307
10301
|
density: "comfortable",
|
|
10308
10302
|
icon: "mdi-broom",
|
|
10309
10303
|
variant: "outlined",
|
|
@@ -10314,7 +10308,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10314
10308
|
}, 8, ["text"]);
|
|
10315
10309
|
};
|
|
10316
10310
|
}
|
|
10317
|
-
}),
|
|
10311
|
+
}), oa = /* @__PURE__ */ oe({
|
|
10318
10312
|
__name: "index",
|
|
10319
10313
|
props: {
|
|
10320
10314
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10329,7 +10323,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10329
10323
|
text: V(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10330
10324
|
}, {
|
|
10331
10325
|
activator: ee(({ props: u }) => [
|
|
10332
|
-
B(a,
|
|
10326
|
+
B(a, Yt(u, {
|
|
10333
10327
|
density: "comfortable",
|
|
10334
10328
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10335
10329
|
variant: "outlined",
|
|
@@ -10340,7 +10334,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10340
10334
|
}, 8, ["text"]);
|
|
10341
10335
|
};
|
|
10342
10336
|
}
|
|
10343
|
-
}),
|
|
10337
|
+
}), ia = { class: "text-subtitle-1 ml-6" }, sa = /* @__PURE__ */ oe({
|
|
10344
10338
|
__name: "item",
|
|
10345
10339
|
props: {
|
|
10346
10340
|
id: {},
|
|
@@ -10366,7 +10360,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10366
10360
|
pointerEvents: "none"
|
|
10367
10361
|
}));
|
|
10368
10362
|
return (A, I) => {
|
|
10369
|
-
const
|
|
10363
|
+
const f = P("v-spacer"), C = P("v-icon"), g = to("ripple");
|
|
10370
10364
|
return no((D(), Q("div", {
|
|
10371
10365
|
class: "d-flex align-center cursor-pointer",
|
|
10372
10366
|
style: W(r.value),
|
|
@@ -10374,8 +10368,8 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10374
10368
|
onMouseout: I[2] || (I[2] = (M) => u.value = !1),
|
|
10375
10369
|
onMouseover: I[3] || (I[3] = (M) => u.value = !0)
|
|
10376
10370
|
}, [
|
|
10377
|
-
j("span",
|
|
10378
|
-
B(
|
|
10371
|
+
j("span", ia, at(a.title), 1),
|
|
10372
|
+
B(f),
|
|
10379
10373
|
B(C, {
|
|
10380
10374
|
class: "x-handle cursor-move mr-3",
|
|
10381
10375
|
icon: "mdi-drag-horizontal-variant",
|
|
@@ -10390,10 +10384,10 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10390
10384
|
]);
|
|
10391
10385
|
};
|
|
10392
10386
|
}
|
|
10393
|
-
}),
|
|
10387
|
+
}), aa = {
|
|
10394
10388
|
key: 1,
|
|
10395
10389
|
class: "text-caption text-grey"
|
|
10396
|
-
},
|
|
10390
|
+
}, ca = /* @__PURE__ */ oe({
|
|
10397
10391
|
__name: "index",
|
|
10398
10392
|
props: /* @__PURE__ */ bt({
|
|
10399
10393
|
lock: { type: Boolean }
|
|
@@ -10409,20 +10403,20 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10409
10403
|
console.assert(!1);
|
|
10410
10404
|
return;
|
|
10411
10405
|
}
|
|
10412
|
-
const
|
|
10406
|
+
const f = [];
|
|
10413
10407
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10414
10408
|
const M = g.id === Eo()?.id;
|
|
10415
|
-
let
|
|
10409
|
+
let Y = "<n/a>";
|
|
10416
10410
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10417
10411
|
const q = g, de = x[q.node.key];
|
|
10418
|
-
de && (
|
|
10419
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10420
|
-
|
|
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
|
+
f.push({
|
|
10421
10415
|
id: g.id,
|
|
10422
|
-
name:
|
|
10416
|
+
name: Y,
|
|
10423
10417
|
select: M
|
|
10424
10418
|
});
|
|
10425
|
-
}), a.value =
|
|
10419
|
+
}), a.value = f;
|
|
10426
10420
|
} });
|
|
10427
10421
|
let u = [];
|
|
10428
10422
|
const r = () => {
|
|
@@ -10430,22 +10424,22 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10430
10424
|
gn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10431
10425
|
return;
|
|
10432
10426
|
}
|
|
10433
|
-
const
|
|
10427
|
+
const f = [];
|
|
10434
10428
|
a.value.forEach(({ id: C }) => {
|
|
10435
|
-
|
|
10436
|
-
}), u =
|
|
10437
|
-
}, p = () => !t.lock, A = (
|
|
10429
|
+
f.push(C);
|
|
10430
|
+
}), u = f;
|
|
10431
|
+
}, p = () => !t.lock, A = (f) => {
|
|
10438
10432
|
if (!i.workspace) {
|
|
10439
10433
|
console.assert(!1);
|
|
10440
10434
|
return;
|
|
10441
10435
|
}
|
|
10442
|
-
if (
|
|
10436
|
+
if (f.oldIndex === void 0 || f.newIndex === void 0) {
|
|
10443
10437
|
console.assert(!1);
|
|
10444
10438
|
return;
|
|
10445
10439
|
}
|
|
10446
|
-
if (
|
|
10440
|
+
if (f.oldIndex === f.newIndex)
|
|
10447
10441
|
return;
|
|
10448
|
-
const C = u[
|
|
10442
|
+
const C = u[f.oldIndex], g = i.workspace.getBlockById(
|
|
10449
10443
|
C
|
|
10450
10444
|
);
|
|
10451
10445
|
if (!g) {
|
|
@@ -10453,22 +10447,22 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10453
10447
|
return;
|
|
10454
10448
|
}
|
|
10455
10449
|
let M = "";
|
|
10456
|
-
|
|
10457
|
-
let
|
|
10458
|
-
M !== "" && (
|
|
10450
|
+
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10451
|
+
let Y = -10;
|
|
10452
|
+
M !== "" && (Y = i.workspace.getBlockById(
|
|
10459
10453
|
M
|
|
10460
10454
|
).getRelativeToSurfaceXY().y + 10);
|
|
10461
10455
|
const q = g.getRelativeToSurfaceXY();
|
|
10462
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10463
|
-
}, I = async (
|
|
10456
|
+
g.moveTo(new v.Coordinate(q.x, Y)), i.workspace.cleanUp(), xn();
|
|
10457
|
+
}, I = async (f) => {
|
|
10464
10458
|
if (!i.workspace) {
|
|
10465
10459
|
console.assert(!1);
|
|
10466
10460
|
return;
|
|
10467
10461
|
}
|
|
10468
|
-
const C = i.workspace.getBlockById(
|
|
10469
|
-
En.setSelected(C), Wt(
|
|
10462
|
+
const C = i.workspace.getBlockById(f);
|
|
10463
|
+
En.setSelected(C), Wt(f), o.value = !1;
|
|
10470
10464
|
};
|
|
10471
|
-
return (
|
|
10465
|
+
return (f, C) => a.value.length > 0 ? (D(), Z(V(To), {
|
|
10472
10466
|
key: 0,
|
|
10473
10467
|
modelValue: a.value,
|
|
10474
10468
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
@@ -10480,7 +10474,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10480
10474
|
onStart: r
|
|
10481
10475
|
}, {
|
|
10482
10476
|
default: ee(() => [
|
|
10483
|
-
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(
|
|
10477
|
+
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(sa, {
|
|
10484
10478
|
id: g.id,
|
|
10485
10479
|
key: g.id,
|
|
10486
10480
|
select: g.select,
|
|
@@ -10489,14 +10483,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10489
10483
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10490
10484
|
]),
|
|
10491
10485
|
_: 1
|
|
10492
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10486
|
+
}, 8, ["modelValue"])) : (D(), Q("span", aa, at(V(n)("x-block-lib.noOption")), 1));
|
|
10493
10487
|
}
|
|
10494
|
-
}),
|
|
10488
|
+
}), la = (t, e) => {
|
|
10495
10489
|
const n = t.__vccOpts || t;
|
|
10496
10490
|
for (const [o, i] of e)
|
|
10497
10491
|
n[o] = i;
|
|
10498
10492
|
return n;
|
|
10499
|
-
},
|
|
10493
|
+
}, ua = /* @__PURE__ */ la(ca, [["__scopeId", "data-v-2ba1be08"]]), ra = /* @__PURE__ */ oe({
|
|
10500
10494
|
__name: "index",
|
|
10501
10495
|
props: {
|
|
10502
10496
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10512,7 +10506,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10512
10506
|
}
|
|
10513
10507
|
} });
|
|
10514
10508
|
const a = (l) => {
|
|
10515
|
-
const u =
|
|
10509
|
+
const u = Ye();
|
|
10516
10510
|
if (!u) {
|
|
10517
10511
|
console.assert(!1);
|
|
10518
10512
|
return;
|
|
@@ -10524,14 +10518,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10524
10518
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10525
10519
|
}, "blockTree"));
|
|
10526
10520
|
}
|
|
10527
|
-
}),
|
|
10521
|
+
}), _a = { class: "text-subtitle-1" }, pa = /* @__PURE__ */ oe({
|
|
10528
10522
|
__name: "index",
|
|
10529
10523
|
props: {
|
|
10530
10524
|
type: {},
|
|
10531
10525
|
lock: { type: Boolean }
|
|
10532
10526
|
},
|
|
10533
10527
|
setup(t, { expose: e }) {
|
|
10534
|
-
const { t: n } = $e(), o =
|
|
10528
|
+
const { t: n } = $e(), o = Bo(), { sysBarAvail: i } = An(), { backgroundColor1: a } = Ke(), l = K(() => {
|
|
10535
10529
|
let C = "100%";
|
|
10536
10530
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10537
10531
|
background: a.value,
|
|
@@ -10554,7 +10548,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10554
10548
|
return e({ open: p, update: () => {
|
|
10555
10549
|
t.type === "list" ? A.value?.update() : t.type === "tree" && I.value?.update();
|
|
10556
10550
|
} }), (C, g) => {
|
|
10557
|
-
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");
|
|
10558
10552
|
return D(), Q(_n, null, [
|
|
10559
10553
|
B(de, {
|
|
10560
10554
|
modelValue: V(p),
|
|
@@ -10587,13 +10581,13 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10587
10581
|
height: 48
|
|
10588
10582
|
}, {
|
|
10589
10583
|
default: ee(() => [
|
|
10590
|
-
B(
|
|
10584
|
+
B(Y, {
|
|
10591
10585
|
density: "comfortable",
|
|
10592
10586
|
icon: "mdi-close",
|
|
10593
10587
|
variant: "text",
|
|
10594
10588
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10595
10589
|
}),
|
|
10596
|
-
j("span",
|
|
10590
|
+
j("span", _a, at(V(n)("x-block-lib.navigator")), 1),
|
|
10597
10591
|
B(q)
|
|
10598
10592
|
]),
|
|
10599
10593
|
_: 1
|
|
@@ -10602,14 +10596,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10602
10596
|
class: "overflow-y-auto",
|
|
10603
10597
|
style: W(u.value)
|
|
10604
10598
|
}, [
|
|
10605
|
-
C.type === "list" ? (D(), Z(
|
|
10599
|
+
C.type === "list" ? (D(), Z(ua, {
|
|
10606
10600
|
key: 0,
|
|
10607
10601
|
ref_key: "blockList",
|
|
10608
10602
|
ref: A,
|
|
10609
10603
|
modelValue: V(p),
|
|
10610
10604
|
"onUpdate:modelValue": g[1] || (g[1] = (G) => Je(p) ? p.value = G : null),
|
|
10611
10605
|
lock: C.lock
|
|
10612
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10606
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ra, {
|
|
10613
10607
|
key: 1,
|
|
10614
10608
|
ref_key: "blockTree",
|
|
10615
10609
|
ref: I,
|
|
@@ -10629,7 +10623,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10629
10623
|
text: V(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10630
10624
|
}, {
|
|
10631
10625
|
activator: ee(({ props: G }) => [
|
|
10632
|
-
B(
|
|
10626
|
+
B(Y, Yt(G, {
|
|
10633
10627
|
density: "comfortable",
|
|
10634
10628
|
icon: "mdi-navigation-variant",
|
|
10635
10629
|
variant: "outlined",
|
|
@@ -10667,22 +10661,22 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10667
10661
|
wheel: !0
|
|
10668
10662
|
}
|
|
10669
10663
|
};
|
|
10670
|
-
function
|
|
10671
|
-
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);
|
|
10672
10666
|
const i = go(t, St);
|
|
10673
|
-
return
|
|
10667
|
+
return i.addChangeListener(Ao.shadowBlockConversionChangeListener), fa(i, e, n), ma(i), i;
|
|
10674
10668
|
}
|
|
10675
|
-
function
|
|
10669
|
+
function da(t, e) {
|
|
10676
10670
|
let n;
|
|
10677
|
-
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;
|
|
10678
10672
|
}
|
|
10679
|
-
function
|
|
10673
|
+
function fa(t, e, n) {
|
|
10680
10674
|
function o({ name: i, callback: a }) {
|
|
10681
10675
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10682
10676
|
}
|
|
10683
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));
|
|
10684
10678
|
}
|
|
10685
|
-
function
|
|
10679
|
+
function ma(t) {
|
|
10686
10680
|
const { router: e } = ie;
|
|
10687
10681
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10688
10682
|
const n = e.resolve({
|
|
@@ -10700,7 +10694,7 @@ function fa(t) {
|
|
|
10700
10694
|
}, 100);
|
|
10701
10695
|
});
|
|
10702
10696
|
}
|
|
10703
|
-
function
|
|
10697
|
+
function Ta(t, e) {
|
|
10704
10698
|
const n = e.newBlock("json_root_v1");
|
|
10705
10699
|
n.initSvg(), n.render();
|
|
10706
10700
|
const o = (i, a) => {
|
|
@@ -10742,7 +10736,7 @@ function ma(t, e) {
|
|
|
10742
10736
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10743
10737
|
);
|
|
10744
10738
|
}
|
|
10745
|
-
function
|
|
10739
|
+
function Ea(t) {
|
|
10746
10740
|
const e = (o) => {
|
|
10747
10741
|
if (!o)
|
|
10748
10742
|
return null;
|
|
@@ -10774,7 +10768,7 @@ function Ta(t) {
|
|
|
10774
10768
|
if (o.type === "json_root_v1")
|
|
10775
10769
|
return e(o);
|
|
10776
10770
|
}
|
|
10777
|
-
const
|
|
10771
|
+
const ga = { class: "position-relative w-100 h-100" }, Aa = /* @__PURE__ */ oe({
|
|
10778
10772
|
__name: "index",
|
|
10779
10773
|
props: /* @__PURE__ */ bt({
|
|
10780
10774
|
type: {},
|
|
@@ -10789,9 +10783,9 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10789
10783
|
}),
|
|
10790
10784
|
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10791
10785
|
setup(t, { expose: e, emit: n }) {
|
|
10792
|
-
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"),
|
|
10793
|
-
|
|
10794
|
-
const C = Ae(!0), g = Ae(!1), M = K(() => t.type === "json" ? "tree" : "list"),
|
|
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
|
+
ta(f);
|
|
10788
|
+
const C = Ae(!0), g = Ae(!1), M = K(() => t.type === "json" ? "tree" : "list"), Y = K(() => ({
|
|
10795
10789
|
width: "100%",
|
|
10796
10790
|
height: "calc(100% - 48px)"
|
|
10797
10791
|
})), q = K(() => ({
|
|
@@ -10840,17 +10834,17 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10840
10834
|
console.assert(!1);
|
|
10841
10835
|
return;
|
|
10842
10836
|
}
|
|
10843
|
-
|
|
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);
|
|
10844
10838
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10845
10839
|
new MutationObserver((It) => {
|
|
10846
10840
|
It.forEach((We) => {
|
|
10847
|
-
We.type === "attributes" && We.attributeName === "style" && (Le.value =
|
|
10841
|
+
We.type === "attributes" && We.attributeName === "style" && (Le.value = f.workspace.getFlyout().isVisible());
|
|
10848
10842
|
});
|
|
10849
|
-
}).observe(y, { attributes: !0 }), Le.value =
|
|
10843
|
+
}).observe(y, { attributes: !0 }), Le.value = f.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10850
10844
|
}), so(() => {
|
|
10851
10845
|
Le.value = !1;
|
|
10852
|
-
}),
|
|
10853
|
-
|
|
10846
|
+
}), Oo(r, () => {
|
|
10847
|
+
f.workspace && Co(f.workspace);
|
|
10854
10848
|
});
|
|
10855
10849
|
async function Hn(y) {
|
|
10856
10850
|
if (y.type === E.FINISHED_LOADING) {
|
|
@@ -10861,7 +10855,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10861
10855
|
}
|
|
10862
10856
|
if (!C.value) {
|
|
10863
10857
|
if (y.type === E.VIEWPORT_CHANGE) {
|
|
10864
|
-
a.value =
|
|
10858
|
+
a.value = f.workspace.getScale();
|
|
10865
10859
|
return;
|
|
10866
10860
|
}
|
|
10867
10861
|
y.type === E.BLOCK_DRAG && (y.isStart ? g.value = !0 : g.value = !1), setTimeout(() => {
|
|
@@ -10870,18 +10864,18 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10870
10864
|
}
|
|
10871
10865
|
}
|
|
10872
10866
|
const Gn = (y) => {
|
|
10873
|
-
C.value = !0, t.type === "json" ?
|
|
10874
|
-
}, 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 = () => {
|
|
10875
10869
|
if (t.type === "json")
|
|
10876
10870
|
console.assert(!1);
|
|
10877
10871
|
else
|
|
10878
|
-
return s.workspaceToCode(
|
|
10872
|
+
return s.workspaceToCode(f.workspace);
|
|
10879
10873
|
}, Jt = () => {
|
|
10880
|
-
|
|
10874
|
+
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (Le.value = !1);
|
|
10881
10875
|
}, qt = () => {
|
|
10882
|
-
|
|
10876
|
+
f.workspace.setScale(a.value);
|
|
10883
10877
|
}, Xn = () => {
|
|
10884
|
-
|
|
10878
|
+
f.workspace.fireChangeListener(new In());
|
|
10885
10879
|
}, Qt = (y) => {
|
|
10886
10880
|
if (y.key === "q" && y.ctrlKey) {
|
|
10887
10881
|
Jn();
|
|
@@ -10914,22 +10908,22 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10914
10908
|
), Se(
|
|
10915
10909
|
() => t.dark,
|
|
10916
10910
|
(y) => {
|
|
10917
|
-
|
|
10911
|
+
Js(y ? "dark" : "light");
|
|
10918
10912
|
}
|
|
10919
10913
|
), Se(Le, (y) => {
|
|
10920
|
-
y ||
|
|
10914
|
+
y || f.workspace?.hideChaff();
|
|
10921
10915
|
}), Se(i, () => {
|
|
10922
10916
|
Jt();
|
|
10923
10917
|
}), Se(a, () => {
|
|
10924
10918
|
qt();
|
|
10925
10919
|
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, fe) => {
|
|
10926
10920
|
const It = P("v-icon"), We = P("x-loading");
|
|
10927
|
-
return D(), Q("div",
|
|
10921
|
+
return D(), Q("div", ga, [
|
|
10928
10922
|
j("div", {
|
|
10929
10923
|
id: u,
|
|
10930
10924
|
ref_key: "blocklyDiv",
|
|
10931
10925
|
ref: r,
|
|
10932
|
-
style: W(
|
|
10926
|
+
style: W(Y.value)
|
|
10933
10927
|
}, null, 4),
|
|
10934
10928
|
j("div", {
|
|
10935
10929
|
style: W(q.value)
|
|
@@ -10951,16 +10945,16 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10951
10945
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10952
10946
|
style: W(At.value)
|
|
10953
10947
|
}, [
|
|
10954
|
-
B(
|
|
10948
|
+
B(na, {
|
|
10955
10949
|
ref_key: "clean",
|
|
10956
10950
|
ref: A,
|
|
10957
10951
|
lock: i.value
|
|
10958
10952
|
}, null, 8, ["lock"]),
|
|
10959
|
-
B(
|
|
10953
|
+
B(oa, {
|
|
10960
10954
|
modelValue: i.value,
|
|
10961
10955
|
"onUpdate:modelValue": fe[0] || (fe[0] = (zn) => i.value = zn)
|
|
10962
10956
|
}, null, 8, ["modelValue"]),
|
|
10963
|
-
B(
|
|
10957
|
+
B(pa, {
|
|
10964
10958
|
ref_key: "navigator",
|
|
10965
10959
|
ref: I,
|
|
10966
10960
|
lock: i.value,
|
|
@@ -10987,15 +10981,15 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10987
10981
|
]);
|
|
10988
10982
|
};
|
|
10989
10983
|
}
|
|
10990
|
-
}),
|
|
10984
|
+
}), Ia = /* @__PURE__ */ oe({
|
|
10991
10985
|
__name: "index",
|
|
10992
10986
|
props: {
|
|
10993
10987
|
code: {}
|
|
10994
10988
|
},
|
|
10995
10989
|
setup(t) {
|
|
10996
10990
|
const e = t;
|
|
10997
|
-
|
|
10998
|
-
const n =
|
|
10991
|
+
ko.registerLanguage("javascript", vo);
|
|
10992
|
+
const n = yo.component, { backgroundColor2: o } = Ke();
|
|
10999
10993
|
return (i, a) => {
|
|
11000
10994
|
const l = P("v-sheet");
|
|
11001
10995
|
return D(), Z(l, {
|
|
@@ -11013,7 +11007,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11013
11007
|
}, 8, ["color"]);
|
|
11014
11008
|
};
|
|
11015
11009
|
}
|
|
11016
|
-
}),
|
|
11010
|
+
}), Oa = { class: "text-subtitle-1" }, Ca = { class: "w-100 h-100 overflow-auto" }, ka = /* @__PURE__ */ oe({
|
|
11017
11011
|
__name: "index",
|
|
11018
11012
|
setup(t) {
|
|
11019
11013
|
const { t: e } = $e(), { sysBarAvail: n } = An(), { backgroundColor0: o, backgroundColor2: i } = Ke(), a = Ae(""), l = K(() => {
|
|
@@ -11026,7 +11020,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11026
11020
|
a.value = p.code;
|
|
11027
11021
|
}, { open: r } = Kt("sourceDlg", u);
|
|
11028
11022
|
return (p, A) => {
|
|
11029
|
-
const I = P("v-sheet"),
|
|
11023
|
+
const I = P("v-sheet"), f = P("v-btn"), C = P("v-spacer"), g = P("v-dialog");
|
|
11030
11024
|
return D(), Z(g, {
|
|
11031
11025
|
modelValue: V(r),
|
|
11032
11026
|
"onUpdate:modelValue": A[1] || (A[1] = (M) => Je(r) ? r.value = M : null),
|
|
@@ -11054,13 +11048,13 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11054
11048
|
height: 48
|
|
11055
11049
|
}, {
|
|
11056
11050
|
default: ee(() => [
|
|
11057
|
-
B(
|
|
11051
|
+
B(f, {
|
|
11058
11052
|
density: "comfortable",
|
|
11059
11053
|
icon: "mdi-close",
|
|
11060
11054
|
variant: "text",
|
|
11061
11055
|
onClick: A[0] || (A[0] = (M) => r.value = !1)
|
|
11062
11056
|
}),
|
|
11063
|
-
j("span",
|
|
11057
|
+
j("span", Oa, at(V(e)("x-block-lib.dlg.source.title")), 1),
|
|
11064
11058
|
B(C)
|
|
11065
11059
|
]),
|
|
11066
11060
|
_: 1
|
|
@@ -11068,8 +11062,8 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11068
11062
|
j("div", {
|
|
11069
11063
|
style: W(l.value)
|
|
11070
11064
|
}, [
|
|
11071
|
-
j("div",
|
|
11072
|
-
B(
|
|
11065
|
+
j("div", Ca, [
|
|
11066
|
+
B(Ia, { code: a.value }, null, 8, ["code"])
|
|
11073
11067
|
])
|
|
11074
11068
|
], 4)
|
|
11075
11069
|
]),
|
|
@@ -11080,16 +11074,16 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11080
11074
|
}, 8, ["modelValue"]);
|
|
11081
11075
|
};
|
|
11082
11076
|
}
|
|
11083
|
-
}),
|
|
11084
|
-
t.component("XBlockly",
|
|
11077
|
+
}), va = (t) => {
|
|
11078
|
+
t.component("XBlockly", Aa), t.component("XSourceDlg", ka);
|
|
11085
11079
|
};
|
|
11086
|
-
async function
|
|
11080
|
+
async function Da(t) {
|
|
11087
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;
|
|
11088
11082
|
}
|
|
11089
|
-
const
|
|
11083
|
+
const Ua = { install: va };
|
|
11090
11084
|
export {
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11085
|
+
Aa as XBlockly,
|
|
11086
|
+
Ua as default,
|
|
11087
|
+
va as install,
|
|
11088
|
+
Da as loadLocaleMessageBlock
|
|
11095
11089
|
};
|