x-block-lib 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +564 -564
- package/dist/{vendor.bxn11l2w.js → vendor.ehacc8mv.js} +223 -231
- package/package.json +5 -8
package/dist/index.js
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
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-67cacda2]{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
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var sn = (t, e, n) =>
|
|
13
|
-
import { provide as
|
|
14
|
-
import { d as f, j as a, O as l, f as
|
|
15
|
-
import { globalObjects as ae, openConfirmDlg as
|
|
16
|
-
import { elements as Y, pkgs as we, getPropTag as dt, parsePixelStr as
|
|
10
|
+
var so = Object.defineProperty;
|
|
11
|
+
var ao = (t, e, n) => e in t ? so(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
12
|
+
var sn = (t, e, n) => ao(t, typeof e != "symbol" ? e + "" : e, n);
|
|
13
|
+
import { provide as co, inject as lo, defineComponent as se, resolveComponent as P, createBlock as ee, openBlock as D, unref as V, withCtx as te, createVNode as B, mergeProps as Xt, useModel as Ye, ref as Ce, computed as j, resolveDirective as uo, withDirectives as ro, createElementBlock as Q, normalizeStyle as q, createElementVNode as X, toDisplayString as _t, withModifiers as Me, mergeModels as Pt, Fragment as gn, renderList as _o, useId as xt, onUnmounted as An, useTemplateRef as Ve, withKeys as In, isRef as Ze, createCommentVNode as me, onMounted as an, nextTick as po, onBeforeUnmount as ho, watch as Be } from "vue";
|
|
14
|
+
import { d as f, j as a, O as l, f as fo, F as On, M as p, E as I, r as cn, u as E, s as mo, X as Te, B as m, i as U, a as y, c as Pe, b as Yt, e as G, g as Ee, h as he, p as xe, k as Z, l as ln, m as R, C as Cn, N as ne, n as To, P as wt, V as Oe, o as Ge, q as kn, t as Eo, S as K, v as et, w as Ue, x as Ie, y as qe, z as Nt, A as Re, D as un, G as Lt, H as go, T as pt, I as yn, J as Ao, K as vn, L as Io, Q as Oo, R as Co, U as ko, W as yo, Y as vo, Z as No } from "./vendor.ehacc8mv.js";
|
|
15
|
+
import { globalObjects as ae, openConfirmDlg as Lo, openPromptDlg as So, messageWarning as Nn, useColor as ht, useSystem as Ln, useViewStack as Jt } from "x-essential-lib";
|
|
16
|
+
import { elements as Y, pkgs as we, getPropTag as dt, parsePixelStr as bo, parsePercentStr as Bo } from "x-runtime-lib";
|
|
17
17
|
import { globalState as g } from "x-state-lib";
|
|
18
18
|
import { useI18n as We } from "vue-i18n";
|
|
19
|
-
import { useDisplay as
|
|
19
|
+
import { useDisplay as Ro } from "vuetify";
|
|
20
20
|
f([
|
|
21
21
|
{
|
|
22
22
|
type: "app_debug_trace_v1",
|
|
@@ -118,9 +118,9 @@ class T extends On {
|
|
|
118
118
|
return "<n/a>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
class
|
|
121
|
+
fo.register("field_dropdown2", T);
|
|
122
|
+
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
123
|
+
class Sn extends I.Abstract {
|
|
124
124
|
constructor() {
|
|
125
125
|
super(...arguments);
|
|
126
126
|
sn(this, "isBlank", !0);
|
|
@@ -129,14 +129,14 @@ class bn extends I.Abstract {
|
|
|
129
129
|
cn.register(
|
|
130
130
|
cn.Type.EVENT,
|
|
131
131
|
"state_change",
|
|
132
|
-
|
|
132
|
+
Sn
|
|
133
133
|
);
|
|
134
134
|
const ke = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", nt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
135
135
|
function ft(t) {
|
|
136
136
|
const e = t.lastIndexOf("V");
|
|
137
137
|
if (e <= 0 || e >= t.length - 1)
|
|
138
138
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
139
|
-
const n =
|
|
139
|
+
const n = mo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
140
140
|
return `${n}_${o}`;
|
|
141
141
|
}
|
|
142
142
|
function ve(t) {
|
|
@@ -149,7 +149,7 @@ function ve(t) {
|
|
|
149
149
|
function N(t) {
|
|
150
150
|
return t.length <= 0 && t.push([p.NO_OPTION, ""]), t;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function S(t) {
|
|
153
153
|
let e = "";
|
|
154
154
|
if (t.type === "string") {
|
|
155
155
|
let n = "";
|
|
@@ -163,7 +163,7 @@ function b(t) {
|
|
|
163
163
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
164
164
|
return E.xml.textToDom(e);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Do(t) {
|
|
167
167
|
let e = 0;
|
|
168
168
|
for (; t; )
|
|
169
169
|
e++, t = t.getParent();
|
|
@@ -181,15 +181,15 @@ function mt(t, e) {
|
|
|
181
181
|
const o = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`, i = E.xml.textToDom(o);
|
|
182
182
|
return Te.domToBlock(i, t);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function bn(t, e) {
|
|
185
185
|
const o = `<block type="${ft(e)}"></block>`, i = E.xml.textToDom(o);
|
|
186
186
|
return Te.domToBlock(i, t);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Bn(t, e) {
|
|
189
189
|
const o = `<block type="${ft(e)}"></block>`, i = E.xml.textToDom(o);
|
|
190
190
|
return Te.domToBlock(i, t);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Rn(t) {
|
|
193
193
|
const n = E.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
194
194
|
return Te.domToBlock(n, t);
|
|
195
195
|
}
|
|
@@ -261,7 +261,7 @@ function St(t, e) {
|
|
|
261
261
|
if (n)
|
|
262
262
|
return n.events.find((o) => o.key === e);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Uo(t) {
|
|
265
265
|
const e = [];
|
|
266
266
|
return Ft(t).forEach(({ key: o, name: i }) => {
|
|
267
267
|
e.push([p[i] ?? i, o]);
|
|
@@ -276,7 +276,7 @@ function bt(t, e) {
|
|
|
276
276
|
if (n)
|
|
277
277
|
return n.methods.find((o) => o.key === e);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Mo(t) {
|
|
280
280
|
const e = [];
|
|
281
281
|
return Kt(t).forEach(({ key: o, name: i }) => {
|
|
282
282
|
e.push([p[i] ?? i, o]);
|
|
@@ -303,7 +303,7 @@ function le(t, e) {
|
|
|
303
303
|
}
|
|
304
304
|
return (u = (c = n[t]) == null ? void 0 : c[s]) == null ? void 0 : u.find((r) => r.keys === e);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Dn(t, e) {
|
|
307
307
|
const { i18n: n } = ae, o = [];
|
|
308
308
|
return Fe(t, e).forEach(({ keys: s, names: c }) => {
|
|
309
309
|
let u = "";
|
|
@@ -362,7 +362,7 @@ function Bt(t, e) {
|
|
|
362
362
|
}
|
|
363
363
|
return o.events.find((i) => i.key === e);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Vo(t) {
|
|
366
366
|
const e = [];
|
|
367
367
|
return $t(t).forEach(({ key: o, name: i }) => {
|
|
368
368
|
e.push([p[i] ?? i, o]);
|
|
@@ -386,7 +386,7 @@ function Rt(t, e) {
|
|
|
386
386
|
}
|
|
387
387
|
return o.methods.find((i) => i.key === e);
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Po(t) {
|
|
390
390
|
const e = [];
|
|
391
391
|
return Ht(t).forEach(({ key: o, name: i }) => {
|
|
392
392
|
e.push([p[i] ?? i, o]);
|
|
@@ -413,7 +413,7 @@ function ue(t, e) {
|
|
|
413
413
|
if (c)
|
|
414
414
|
return (r = (u = n[c.key]) == null ? void 0 : u[s]) == null ? void 0 : r.find((_) => _.keys === e);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Un(t, e) {
|
|
417
417
|
const { i18n: n } = ae, o = [];
|
|
418
418
|
return Ke(t, e).forEach(({ keys: s, names: c }) => {
|
|
419
419
|
let u = "";
|
|
@@ -422,7 +422,7 @@ function Mn(t, e) {
|
|
|
422
422
|
}), o.push([u, s]);
|
|
423
423
|
}), N(o);
|
|
424
424
|
}
|
|
425
|
-
const
|
|
425
|
+
const xo = {
|
|
426
426
|
init: function() {
|
|
427
427
|
this.node = {
|
|
428
428
|
id: "",
|
|
@@ -468,13 +468,13 @@ const Go = {
|
|
|
468
468
|
return Xe("method");
|
|
469
469
|
},
|
|
470
470
|
genMethodOpts_: function() {
|
|
471
|
-
return
|
|
471
|
+
return Po(this.node.id);
|
|
472
472
|
},
|
|
473
473
|
genElementOpts_: function() {
|
|
474
474
|
return Le();
|
|
475
475
|
},
|
|
476
476
|
onchange: function(t) {
|
|
477
|
-
if (t.type ===
|
|
477
|
+
if (t.type === L.STATE_CHANGE)
|
|
478
478
|
this.checkWarning_();
|
|
479
479
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
480
480
|
const e = t;
|
|
@@ -543,7 +543,7 @@ const Go = {
|
|
|
543
543
|
const e = this.method.inputs[t];
|
|
544
544
|
if (!e.type)
|
|
545
545
|
continue;
|
|
546
|
-
const n =
|
|
546
|
+
const n = S({
|
|
547
547
|
type: e.type,
|
|
548
548
|
default: e.default
|
|
549
549
|
});
|
|
@@ -576,14 +576,14 @@ const Go = {
|
|
|
576
576
|
this.setWarningText(p.WARN_METHOD_NOT_AVAILABLE);
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
|
-
if (e.name !== this.method.name && (this.method.name = e.name), !
|
|
579
|
+
if (e.name !== this.method.name && (this.method.name = e.name), !U(e.inputs, this.method.inputs) || !U(e.outputs, this.method.outputs)) {
|
|
580
580
|
this.setWarningText(p.WARN_METHOD_HAS_CHANGED);
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
583
|
this.setWarningText(null);
|
|
584
584
|
}
|
|
585
585
|
};
|
|
586
|
-
m.call_node_method_v1 =
|
|
586
|
+
m.call_node_method_v1 = xo;
|
|
587
587
|
a.forBlock.call_node_method_v1 = function(t) {
|
|
588
588
|
const e = a.quote_, n = t;
|
|
589
589
|
let o = n.node.id;
|
|
@@ -606,7 +606,7 @@ ${s}}
|
|
|
606
606
|
`;
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
|
-
const
|
|
609
|
+
const Yo = {
|
|
610
610
|
init: function() {
|
|
611
611
|
this.element = {
|
|
612
612
|
key: "",
|
|
@@ -651,10 +651,10 @@ const Wo = {
|
|
|
651
651
|
return Le("method");
|
|
652
652
|
},
|
|
653
653
|
genMethodOpts_: function() {
|
|
654
|
-
return
|
|
654
|
+
return Mo(this.element.key);
|
|
655
655
|
},
|
|
656
656
|
onchange: function(t) {
|
|
657
|
-
if (t.type ===
|
|
657
|
+
if (t.type === L.STATE_CHANGE)
|
|
658
658
|
this.checkWarning_();
|
|
659
659
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
660
660
|
const e = t;
|
|
@@ -720,7 +720,7 @@ const Wo = {
|
|
|
720
720
|
const e = this.method.inputs[t];
|
|
721
721
|
if (!e.type)
|
|
722
722
|
continue;
|
|
723
|
-
const n =
|
|
723
|
+
const n = S({
|
|
724
724
|
type: e.type,
|
|
725
725
|
default: e.default
|
|
726
726
|
});
|
|
@@ -749,14 +749,14 @@ const Wo = {
|
|
|
749
749
|
this.setWarningText(p.WARN_METHOD_NOT_AVAILABLE);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
if (e.name !== this.method.name && (this.method.name = e.name), !
|
|
752
|
+
if (e.name !== this.method.name && (this.method.name = e.name), !U(this.method.inputs, e.inputs) || !U(this.method.outputs, e.outputs)) {
|
|
753
753
|
this.setWarningText(p.WARN_METHOD_HAS_CHANGED);
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
756
|
this.setWarningText(null);
|
|
757
757
|
}
|
|
758
758
|
};
|
|
759
|
-
m.call_node_method_as_v1 =
|
|
759
|
+
m.call_node_method_as_v1 = Yo;
|
|
760
760
|
a.forBlock.call_node_method_as_v1 = function(t) {
|
|
761
761
|
const e = a.quote_, n = t, o = a.valueToCode(n, "NODE", l.NONE) || "";
|
|
762
762
|
if (!o)
|
|
@@ -780,7 +780,7 @@ ${s}}
|
|
|
780
780
|
`;
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
|
-
function
|
|
783
|
+
function wo() {
|
|
784
784
|
return g.app.activeObject.type !== "comp" ? !1 : g.app.activeComp.meta.properties.length > 0 || g.app.activeComp.meta.methods.length > 0 || g.app.activeComp.meta.events.length > 0;
|
|
785
785
|
}
|
|
786
786
|
function $e() {
|
|
@@ -789,7 +789,7 @@ function $e() {
|
|
|
789
789
|
function ot(t) {
|
|
790
790
|
return g.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Mn() {
|
|
793
793
|
const t = [];
|
|
794
794
|
return $e().forEach(({ id: n, name: o }) => {
|
|
795
795
|
t.push([o, n]);
|
|
@@ -808,25 +808,25 @@ function Dt(t, e) {
|
|
|
808
808
|
if (n)
|
|
809
809
|
return n.outputs.find((o) => o.id === e);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function Fo(t) {
|
|
812
812
|
const e = [];
|
|
813
813
|
return Gt(t).forEach(({ id: o, name: i }) => {
|
|
814
814
|
e.push([i, o]);
|
|
815
815
|
}), N(e);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Vn() {
|
|
818
818
|
return g.app.activeComp.meta.events;
|
|
819
819
|
}
|
|
820
820
|
function _n(t) {
|
|
821
821
|
return g.app.activeComp.meta.events.find((e) => e.id === t);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Ko() {
|
|
824
824
|
const t = [];
|
|
825
|
-
return
|
|
825
|
+
return Vn().forEach(({ id: n, name: o }) => {
|
|
826
826
|
t.push([o, n]);
|
|
827
827
|
}), N(t);
|
|
828
828
|
}
|
|
829
|
-
const
|
|
829
|
+
const $o = {
|
|
830
830
|
init: function() {
|
|
831
831
|
this.method = {
|
|
832
832
|
id: "",
|
|
@@ -857,10 +857,10 @@ const qo = {
|
|
|
857
857
|
}, 0);
|
|
858
858
|
},
|
|
859
859
|
genMethodOpts_: function() {
|
|
860
|
-
return
|
|
860
|
+
return Mn();
|
|
861
861
|
},
|
|
862
862
|
onchange: function(t) {
|
|
863
|
-
if (t.type ===
|
|
863
|
+
if (t.type === L.STATE_CHANGE)
|
|
864
864
|
this.checkWarning_();
|
|
865
865
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
866
866
|
const e = t;
|
|
@@ -902,21 +902,21 @@ const qo = {
|
|
|
902
902
|
this.setWarningText(p.WARN_METHOD_NOT_AVAILABLE);
|
|
903
903
|
return;
|
|
904
904
|
}
|
|
905
|
-
if (t.name !== this.method.name && (this.method.name = t.name), !
|
|
905
|
+
if (t.name !== this.method.name && (this.method.name = t.name), !U(t.inputs, this.method.inputs)) {
|
|
906
906
|
this.setWarningText(p.WARN_METHOD_HAS_CHANGED);
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
909
909
|
this.setWarningText(null);
|
|
910
910
|
}
|
|
911
911
|
};
|
|
912
|
-
m.comp_method_impl_v1 =
|
|
912
|
+
m.comp_method_impl_v1 = $o;
|
|
913
913
|
a.forBlock.comp_method_impl_v1 = function(t) {
|
|
914
914
|
const e = t;
|
|
915
915
|
return `{
|
|
916
916
|
${a.statementToCode(e, "HANDLE")}}
|
|
917
917
|
`;
|
|
918
918
|
};
|
|
919
|
-
const
|
|
919
|
+
const Ho = (t, e) => {
|
|
920
920
|
const n = ft(t), o = ve(t);
|
|
921
921
|
m[n] = {
|
|
922
922
|
init: function() {
|
|
@@ -939,9 +939,9 @@ const zo = (t, e) => {
|
|
|
939
939
|
for (const t in we) {
|
|
940
940
|
const e = we[t];
|
|
941
941
|
for (const n in e.items)
|
|
942
|
-
|
|
942
|
+
Ho(n, e.items[n]);
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const Go = (t, e) => {
|
|
945
945
|
const n = ft(t), o = ve(t);
|
|
946
946
|
m[n] = {
|
|
947
947
|
init: function() {
|
|
@@ -965,7 +965,7 @@ const Qo = (t, e) => {
|
|
|
965
965
|
return N(s);
|
|
966
966
|
},
|
|
967
967
|
onchange: function(i) {
|
|
968
|
-
if (i.type ===
|
|
968
|
+
if (i.type === L.STATE_CHANGE)
|
|
969
969
|
this.checkWarning_();
|
|
970
970
|
else if (i.type === I.BLOCK_CHANGE) {
|
|
971
971
|
const s = i;
|
|
@@ -996,7 +996,7 @@ const Qo = (t, e) => {
|
|
|
996
996
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
997
997
|
let u, r;
|
|
998
998
|
if (c.ui === "pixelInput") {
|
|
999
|
-
const _ =
|
|
999
|
+
const _ = bo(this.value) ?? 0;
|
|
1000
1000
|
u = new Yt(
|
|
1001
1001
|
_,
|
|
1002
1002
|
c.min,
|
|
@@ -1007,7 +1007,7 @@ const Qo = (t, e) => {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
), r = "px";
|
|
1009
1009
|
} else if (c.ui === "percentInput") {
|
|
1010
|
-
const _ =
|
|
1010
|
+
const _ = Bo(this.value) ?? 0;
|
|
1011
1011
|
u = new Yt(
|
|
1012
1012
|
_,
|
|
1013
1013
|
c.min,
|
|
@@ -1036,9 +1036,9 @@ const Qo = (t, e) => {
|
|
|
1036
1036
|
for (const t in we) {
|
|
1037
1037
|
const e = we[t];
|
|
1038
1038
|
for (const n in e.types)
|
|
1039
|
-
|
|
1039
|
+
Go(n, e.types[n]);
|
|
1040
1040
|
}
|
|
1041
|
-
const
|
|
1041
|
+
const Wo = {
|
|
1042
1042
|
init: function() {
|
|
1043
1043
|
this.node = {
|
|
1044
1044
|
id: "",
|
|
@@ -1072,7 +1072,7 @@ const Zo = {
|
|
|
1072
1072
|
return Xe();
|
|
1073
1073
|
},
|
|
1074
1074
|
onchange: function(t) {
|
|
1075
|
-
if (t.type ===
|
|
1075
|
+
if (t.type === L.STATE_CHANGE)
|
|
1076
1076
|
this.checkWarning_();
|
|
1077
1077
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1078
1078
|
const e = t;
|
|
@@ -1104,12 +1104,12 @@ const Zo = {
|
|
|
1104
1104
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
m.get_node_v1 =
|
|
1107
|
+
m.get_node_v1 = Wo;
|
|
1108
1108
|
a.forBlock.get_node_v1 = function(t) {
|
|
1109
1109
|
const e = t;
|
|
1110
1110
|
return [a.quote_(e.node.id), l.ATOMIC];
|
|
1111
1111
|
};
|
|
1112
|
-
const
|
|
1112
|
+
const jo = {
|
|
1113
1113
|
init: function() {
|
|
1114
1114
|
this.node = {
|
|
1115
1115
|
id: "",
|
|
@@ -1153,10 +1153,10 @@ const ei = {
|
|
|
1153
1153
|
return Xe();
|
|
1154
1154
|
},
|
|
1155
1155
|
genPropOpts_: function() {
|
|
1156
|
-
return
|
|
1156
|
+
return Un(this.node.id);
|
|
1157
1157
|
},
|
|
1158
1158
|
onchange: function(t) {
|
|
1159
|
-
if (t.type ===
|
|
1159
|
+
if (t.type === L.STATE_CHANGE)
|
|
1160
1160
|
this.checkWarning_();
|
|
1161
1161
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1162
1162
|
const e = t;
|
|
@@ -1202,15 +1202,15 @@ const ei = {
|
|
|
1202
1202
|
this.setWarningText(p.WARN_PROP_NOT_AVAIALABLE);
|
|
1203
1203
|
return;
|
|
1204
1204
|
}
|
|
1205
|
-
|
|
1205
|
+
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1206
1206
|
}
|
|
1207
1207
|
};
|
|
1208
|
-
m.get_node_prop_v1 =
|
|
1208
|
+
m.get_node_prop_v1 = jo;
|
|
1209
1209
|
a.forBlock.get_node_prop_v1 = function(t) {
|
|
1210
1210
|
const e = t, n = a.quote_(e.node.id), o = a.quote_(e.prop.keys);
|
|
1211
1211
|
return [`__getNodePropV1__(${n}, ${o})`, l.ATOMIC];
|
|
1212
1212
|
};
|
|
1213
|
-
const
|
|
1213
|
+
const Xo = {
|
|
1214
1214
|
init: function() {
|
|
1215
1215
|
this.element = {
|
|
1216
1216
|
key: "",
|
|
@@ -1253,10 +1253,10 @@ const ti = {
|
|
|
1253
1253
|
return Le();
|
|
1254
1254
|
},
|
|
1255
1255
|
genPropOpts_: function() {
|
|
1256
|
-
return
|
|
1256
|
+
return Dn(this.element.key);
|
|
1257
1257
|
},
|
|
1258
1258
|
onchange: function(t) {
|
|
1259
|
-
if (t.type ===
|
|
1259
|
+
if (t.type === L.STATE_CHANGE)
|
|
1260
1260
|
this.checkWarning_();
|
|
1261
1261
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1262
1262
|
const e = t;
|
|
@@ -1298,18 +1298,18 @@ const ti = {
|
|
|
1298
1298
|
this.setWarningText(p.WARN_PROP_NOT_AVAILABLE);
|
|
1299
1299
|
return;
|
|
1300
1300
|
}
|
|
1301
|
-
|
|
1301
|
+
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1302
1302
|
}
|
|
1303
1303
|
};
|
|
1304
|
-
m.get_node_prop_as_v1 =
|
|
1304
|
+
m.get_node_prop_as_v1 = Xo;
|
|
1305
1305
|
a.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1306
1306
|
const e = t, n = a.valueToCode(e, "NODE", l.ATOMIC) || "null", o = a.quote_(e.prop.keys);
|
|
1307
1307
|
return [`__getNodePropV1__(${n}, ${o})`, l.ATOMIC];
|
|
1308
1308
|
};
|
|
1309
|
-
function
|
|
1309
|
+
function Jo() {
|
|
1310
1310
|
if (g.app.activeObject.type !== "page" || g.app.activePage.meta.arguments.length > 0) return !1;
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Pn() {
|
|
1313
1313
|
return g.app.activePage.meta.arguments;
|
|
1314
1314
|
}
|
|
1315
1315
|
function pn(t) {
|
|
@@ -1317,13 +1317,13 @@ function pn(t) {
|
|
|
1317
1317
|
(e) => e.id === t
|
|
1318
1318
|
);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function qo() {
|
|
1321
1321
|
const t = [];
|
|
1322
|
-
return
|
|
1322
|
+
return Pn().forEach(({ id: n, name: o }) => {
|
|
1323
1323
|
t.push([o, n]);
|
|
1324
1324
|
}), N(t);
|
|
1325
1325
|
}
|
|
1326
|
-
const
|
|
1326
|
+
const zo = {
|
|
1327
1327
|
init: function() {
|
|
1328
1328
|
this.argument = {
|
|
1329
1329
|
id: "",
|
|
@@ -1346,10 +1346,10 @@ const ii = {
|
|
|
1346
1346
|
}, 0);
|
|
1347
1347
|
},
|
|
1348
1348
|
genArgumentOpts_: function() {
|
|
1349
|
-
return
|
|
1349
|
+
return qo();
|
|
1350
1350
|
},
|
|
1351
1351
|
onchange: function(t) {
|
|
1352
|
-
if (t.type ===
|
|
1352
|
+
if (t.type === L.STATE_CHANGE)
|
|
1353
1353
|
this.checkWarning_();
|
|
1354
1354
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1355
1355
|
const e = t;
|
|
@@ -1384,7 +1384,7 @@ const ii = {
|
|
|
1384
1384
|
this.setWarningText(null);
|
|
1385
1385
|
}
|
|
1386
1386
|
};
|
|
1387
|
-
m.get_page_argument_v1 =
|
|
1387
|
+
m.get_page_argument_v1 = zo;
|
|
1388
1388
|
a.forBlock.get_page_argument_v1 = function(t) {
|
|
1389
1389
|
const e = t;
|
|
1390
1390
|
return [`__getPageArgumentV1__(${a.quote_(e.argument.id)})`, l.FUNCTION_CALL];
|
|
@@ -1395,7 +1395,7 @@ function zt() {
|
|
|
1395
1395
|
function hn(t) {
|
|
1396
1396
|
return g.app.appList.find((e) => e.id === t);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function Qo() {
|
|
1399
1399
|
const t = [];
|
|
1400
1400
|
return zt().forEach(({ id: n, name: o }) => {
|
|
1401
1401
|
t.push([o, n]);
|
|
@@ -1410,33 +1410,33 @@ function Ut(t, e) {
|
|
|
1410
1410
|
if (n)
|
|
1411
1411
|
return n.pages.find((o) => o.id === e);
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function Zo(t) {
|
|
1414
1414
|
const e = [];
|
|
1415
1415
|
return Wt(t).forEach(({ id: o, name: i }) => {
|
|
1416
1416
|
e.push([i, o]);
|
|
1417
1417
|
}), N(e);
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1419
|
+
const xn = {
|
|
1420
1420
|
id: "",
|
|
1421
1421
|
groupid: "",
|
|
1422
1422
|
name: "",
|
|
1423
1423
|
position: 0
|
|
1424
1424
|
};
|
|
1425
|
-
function
|
|
1425
|
+
function Yn() {
|
|
1426
1426
|
const { comps: t } = g.app.activeApp;
|
|
1427
|
-
return [
|
|
1427
|
+
return [xn, ...t];
|
|
1428
1428
|
}
|
|
1429
1429
|
function dn(t) {
|
|
1430
|
-
return t === "" ?
|
|
1430
|
+
return t === "" ? xn : g.app.activeApp.comps.find((e) => e.id === t);
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function ei() {
|
|
1433
1433
|
const { i18n: t } = ae, e = [];
|
|
1434
|
-
return
|
|
1434
|
+
return Yn().forEach(({ id: o, name: i }) => {
|
|
1435
1435
|
let s = i;
|
|
1436
1436
|
o === "" && (s = t.global.t("x-runtime-lib.notSet")), e.push([s, o]);
|
|
1437
1437
|
}), N(e);
|
|
1438
1438
|
}
|
|
1439
|
-
const
|
|
1439
|
+
const ti = {
|
|
1440
1440
|
init: function() {
|
|
1441
1441
|
this.app = {
|
|
1442
1442
|
id: "",
|
|
@@ -1482,13 +1482,13 @@ const li = {
|
|
|
1482
1482
|
}, 0);
|
|
1483
1483
|
},
|
|
1484
1484
|
genAppOpts_: function() {
|
|
1485
|
-
return
|
|
1485
|
+
return Qo();
|
|
1486
1486
|
},
|
|
1487
1487
|
genPageOpts_: function() {
|
|
1488
|
-
return
|
|
1488
|
+
return Zo(this.app.id);
|
|
1489
1489
|
},
|
|
1490
1490
|
onchange: function(t) {
|
|
1491
|
-
if (t.type ===
|
|
1491
|
+
if (t.type === L.STATE_CHANGE)
|
|
1492
1492
|
this.checkWarning_();
|
|
1493
1493
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1494
1494
|
const e = t;
|
|
@@ -1533,13 +1533,13 @@ const li = {
|
|
|
1533
1533
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
m.navigate_to_v1 =
|
|
1536
|
+
m.navigate_to_v1 = ti;
|
|
1537
1537
|
a.forBlock.navigate_to_v1 = function(t) {
|
|
1538
1538
|
const e = t, n = a.quote_(e.app.id), o = a.quote_(e.page.id), i = a.quote_(e.getFieldValue("MODE"));
|
|
1539
1539
|
return `__navigateToV1__(${n}, ${o}, ${i});
|
|
1540
1540
|
`;
|
|
1541
1541
|
};
|
|
1542
|
-
const
|
|
1542
|
+
const ni = {
|
|
1543
1543
|
init: function() {
|
|
1544
1544
|
this.node = {
|
|
1545
1545
|
id: "",
|
|
@@ -1584,10 +1584,10 @@ const ui = {
|
|
|
1584
1584
|
return Xe("event");
|
|
1585
1585
|
},
|
|
1586
1586
|
genEventOpts_: function() {
|
|
1587
|
-
return
|
|
1587
|
+
return Vo(this.node.id);
|
|
1588
1588
|
},
|
|
1589
1589
|
onchange: function(t) {
|
|
1590
|
-
if (t.type ===
|
|
1590
|
+
if (t.type === L.STATE_CHANGE)
|
|
1591
1591
|
this.checkWarning_();
|
|
1592
1592
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1593
1593
|
const e = t;
|
|
@@ -1651,14 +1651,14 @@ const ui = {
|
|
|
1651
1651
|
this.setWarningText(p.WARN_EVENT_NOT_AVAILABLE);
|
|
1652
1652
|
return;
|
|
1653
1653
|
}
|
|
1654
|
-
if (e.name !== this.event.name && (this.event.name = e.name), !
|
|
1654
|
+
if (e.name !== this.event.name && (this.event.name = e.name), !U(e.params, this.event.params)) {
|
|
1655
1655
|
this.setWarningText(p.WARN_EVENT_HAS_CHANGED);
|
|
1656
1656
|
return;
|
|
1657
1657
|
}
|
|
1658
1658
|
this.setWarningText(null);
|
|
1659
1659
|
}
|
|
1660
1660
|
};
|
|
1661
|
-
m.on_node_event_v1 =
|
|
1661
|
+
m.on_node_event_v1 = ni;
|
|
1662
1662
|
a.forBlock.on_node_event_v1 = function(t) {
|
|
1663
1663
|
const e = t, n = a.quote_(e.node.id), o = a.quote_(e.event.key);
|
|
1664
1664
|
let i = "";
|
|
@@ -1670,7 +1670,7 @@ a.forBlock.on_node_event_v1 = function(t) {
|
|
|
1670
1670
|
${s}});
|
|
1671
1671
|
`;
|
|
1672
1672
|
};
|
|
1673
|
-
const
|
|
1673
|
+
const oi = {
|
|
1674
1674
|
init: function() {
|
|
1675
1675
|
this.element = {
|
|
1676
1676
|
key: "",
|
|
@@ -1714,10 +1714,10 @@ const ri = {
|
|
|
1714
1714
|
return Le("event");
|
|
1715
1715
|
},
|
|
1716
1716
|
genEventOpts_: function() {
|
|
1717
|
-
return
|
|
1717
|
+
return Uo(this.element.key);
|
|
1718
1718
|
},
|
|
1719
1719
|
onchange: function(t) {
|
|
1720
|
-
if (t.type ===
|
|
1720
|
+
if (t.type === L.STATE_CHANGE)
|
|
1721
1721
|
this.checkWarning_();
|
|
1722
1722
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1723
1723
|
const e = t;
|
|
@@ -1777,14 +1777,14 @@ const ri = {
|
|
|
1777
1777
|
this.setWarningText(p.WARN_EVENT_NOT_AVAILABLE);
|
|
1778
1778
|
return;
|
|
1779
1779
|
}
|
|
1780
|
-
if (e.name !== this.event.name && (this.event.name = e.name), !
|
|
1780
|
+
if (e.name !== this.event.name && (this.event.name = e.name), !U(e.params, this.event.params)) {
|
|
1781
1781
|
this.setWarningText(p.WARN_EVENT_HAS_CHANGED);
|
|
1782
1782
|
return;
|
|
1783
1783
|
}
|
|
1784
1784
|
this.setWarningText(null);
|
|
1785
1785
|
}
|
|
1786
1786
|
};
|
|
1787
|
-
m.on_node_event_as_v1 =
|
|
1787
|
+
m.on_node_event_as_v1 = oi;
|
|
1788
1788
|
a.forBlock.on_node_event_as_v1 = function(t) {
|
|
1789
1789
|
const e = t, n = a.valueToCode(e, "NODE", l.NONE), o = a.quote_(e.event.key);
|
|
1790
1790
|
let i = "";
|
|
@@ -1796,7 +1796,7 @@ a.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1796
1796
|
${s}});
|
|
1797
1797
|
`;
|
|
1798
1798
|
};
|
|
1799
|
-
const
|
|
1799
|
+
const ii = {
|
|
1800
1800
|
init: function() {
|
|
1801
1801
|
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}");
|
|
1802
1802
|
},
|
|
@@ -1814,9 +1814,9 @@ const _i = {
|
|
|
1814
1814
|
updateShadow_: function() {
|
|
1815
1815
|
if (this.isInsertionMarker())
|
|
1816
1816
|
return;
|
|
1817
|
-
const t =
|
|
1817
|
+
const t = S({ type: "string", default: "title" });
|
|
1818
1818
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1819
|
-
const e =
|
|
1819
|
+
const e = S({ type: "string", default: "text" });
|
|
1820
1820
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
1821
1821
|
},
|
|
1822
1822
|
ensureBlocks_: function() {
|
|
@@ -1825,7 +1825,7 @@ const _i = {
|
|
|
1825
1825
|
]);
|
|
1826
1826
|
}
|
|
1827
1827
|
};
|
|
1828
|
-
m.open_confirm_dlg_v1 =
|
|
1828
|
+
m.open_confirm_dlg_v1 = ii;
|
|
1829
1829
|
a.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1830
1830
|
const e = a.valueToCode(t, "TITLE", l.ATOMIC), n = a.valueToCode(t, "TEXT", l.ATOMIC), o = a.statementToCode(t, "HANDLE");
|
|
1831
1831
|
return `{
|
|
@@ -1833,7 +1833,7 @@ a.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1833
1833
|
${o}}
|
|
1834
1834
|
`;
|
|
1835
1835
|
};
|
|
1836
|
-
const
|
|
1836
|
+
const si = {
|
|
1837
1837
|
init: function() {
|
|
1838
1838
|
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}");
|
|
1839
1839
|
},
|
|
@@ -1851,11 +1851,11 @@ const pi = {
|
|
|
1851
1851
|
updateShadow_: function() {
|
|
1852
1852
|
if (this.isInsertionMarker())
|
|
1853
1853
|
return;
|
|
1854
|
-
const t =
|
|
1854
|
+
const t = S({ type: "string", default: "title" });
|
|
1855
1855
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1856
|
-
const e =
|
|
1856
|
+
const e = S({ type: "string", default: "label" });
|
|
1857
1857
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
1858
|
-
const n =
|
|
1858
|
+
const n = S({ type: "string", default: "" });
|
|
1859
1859
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
1860
1860
|
},
|
|
1861
1861
|
ensureBlocks_: function() {
|
|
@@ -1864,7 +1864,7 @@ const pi = {
|
|
|
1864
1864
|
]);
|
|
1865
1865
|
}
|
|
1866
1866
|
};
|
|
1867
|
-
m.open_prompt_dlg_v1 =
|
|
1867
|
+
m.open_prompt_dlg_v1 = si;
|
|
1868
1868
|
a.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1869
1869
|
const e = a.valueToCode(t, "TITLE", l.ATOMIC), n = a.valueToCode(t, "LABEL", l.ATOMIC), o = a.valueToCode(t, "VALUE", l.ATOMIC), i = a.statementToCode(t, "HANDLE");
|
|
1870
1870
|
return `{
|
|
@@ -1904,7 +1904,7 @@ a.forBlock.popup_message_v1 = function(t) {
|
|
|
1904
1904
|
return `__messageV1__(${e}, ${n});
|
|
1905
1905
|
`;
|
|
1906
1906
|
};
|
|
1907
|
-
const
|
|
1907
|
+
const ai = {
|
|
1908
1908
|
init: function() {
|
|
1909
1909
|
this.comp = {
|
|
1910
1910
|
id: void 0,
|
|
@@ -1915,7 +1915,7 @@ const hi = {
|
|
|
1915
1915
|
var n;
|
|
1916
1916
|
if (this.comp.id !== void 0)
|
|
1917
1917
|
return;
|
|
1918
|
-
const t = (n =
|
|
1918
|
+
const t = (n = Yn()) == null ? void 0 : n[0];
|
|
1919
1919
|
if (!t)
|
|
1920
1920
|
return;
|
|
1921
1921
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1934,10 +1934,10 @@ const hi = {
|
|
|
1934
1934
|
}, 0);
|
|
1935
1935
|
},
|
|
1936
1936
|
genCompOpts_: function() {
|
|
1937
|
-
return
|
|
1937
|
+
return ei();
|
|
1938
1938
|
},
|
|
1939
1939
|
onchange: function(t) {
|
|
1940
|
-
if (t.type ===
|
|
1940
|
+
if (t.type === L.STATE_CHANGE)
|
|
1941
1941
|
this.checkWarning_();
|
|
1942
1942
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
1943
1943
|
const e = t;
|
|
@@ -1968,12 +1968,12 @@ const hi = {
|
|
|
1968
1968
|
this.setWarningText(null);
|
|
1969
1969
|
}
|
|
1970
1970
|
};
|
|
1971
|
-
m.select_comp_v1 =
|
|
1971
|
+
m.select_comp_v1 = ai;
|
|
1972
1972
|
a.forBlock.select_comp_v1 = function(t) {
|
|
1973
1973
|
const e = a.quote_, o = t.comp.id ?? "";
|
|
1974
1974
|
return [e(o), l.ATOMIC];
|
|
1975
1975
|
};
|
|
1976
|
-
const
|
|
1976
|
+
const ci = {
|
|
1977
1977
|
init: function() {
|
|
1978
1978
|
this.method = {
|
|
1979
1979
|
id: "",
|
|
@@ -2013,13 +2013,13 @@ const di = {
|
|
|
2013
2013
|
}, 0);
|
|
2014
2014
|
},
|
|
2015
2015
|
genMethodOpts_: function() {
|
|
2016
|
-
return
|
|
2016
|
+
return Mn();
|
|
2017
2017
|
},
|
|
2018
2018
|
genOutputOpts_: function() {
|
|
2019
|
-
return
|
|
2019
|
+
return Fo(this.method.id);
|
|
2020
2020
|
},
|
|
2021
2021
|
onchange: function(t) {
|
|
2022
|
-
if (t.type ===
|
|
2022
|
+
if (t.type === L.STATE_CHANGE)
|
|
2023
2023
|
this.checkWarning_();
|
|
2024
2024
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2025
2025
|
const e = t;
|
|
@@ -2063,7 +2063,7 @@ const di = {
|
|
|
2063
2063
|
return;
|
|
2064
2064
|
let t = null;
|
|
2065
2065
|
const e = this.output.type;
|
|
2066
|
-
e === "string" ? t =
|
|
2066
|
+
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
2067
2067
|
},
|
|
2068
2068
|
checkWarning_: function() {
|
|
2069
2069
|
const t = ot(this.method.id);
|
|
@@ -2084,7 +2084,7 @@ const di = {
|
|
|
2084
2084
|
this.setWarningText(null);
|
|
2085
2085
|
}
|
|
2086
2086
|
};
|
|
2087
|
-
m.set_comp_method_output_v1 =
|
|
2087
|
+
m.set_comp_method_output_v1 = ci;
|
|
2088
2088
|
a.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2089
2089
|
const e = t;
|
|
2090
2090
|
let n = a.valueToCode(e, "VALUE", l.ATOMIC);
|
|
@@ -2111,7 +2111,7 @@ a.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2111
2111
|
return `__setCompMethodOutputV1__(${n});
|
|
2112
2112
|
`;
|
|
2113
2113
|
};
|
|
2114
|
-
const
|
|
2114
|
+
const li = {
|
|
2115
2115
|
init: function() {
|
|
2116
2116
|
this.node = {
|
|
2117
2117
|
id: "",
|
|
@@ -2155,10 +2155,10 @@ const fi = {
|
|
|
2155
2155
|
return Xe();
|
|
2156
2156
|
},
|
|
2157
2157
|
genPropOpts_: function() {
|
|
2158
|
-
return
|
|
2158
|
+
return Un(this.node.id);
|
|
2159
2159
|
},
|
|
2160
2160
|
onchange: function(t) {
|
|
2161
|
-
if (t.type ===
|
|
2161
|
+
if (t.type === L.STATE_CHANGE)
|
|
2162
2162
|
this.checkWarning_();
|
|
2163
2163
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2164
2164
|
const e = t;
|
|
@@ -2198,7 +2198,7 @@ const fi = {
|
|
|
2198
2198
|
n && n.dispose();
|
|
2199
2199
|
let o = null;
|
|
2200
2200
|
const i = t.raw;
|
|
2201
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = pe(this.workspace, i.default) : i.ui === "numInput" ? o = Ne(this.workspace, i.default) : i.ui === "switch" ? o = mt(this.workspace, i.default) : i.ui === "select" ? o =
|
|
2201
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = pe(this.workspace, i.default) : i.ui === "numInput" ? o = Ne(this.workspace, i.default) : i.ui === "switch" ? o = mt(this.workspace, i.default) : i.ui === "select" ? o = bn(this.workspace, i.items) : i.ui === "multiTypes" ? o = Bn(this.workspace, i.types) : i.ui === "compSelect" && (o = Rn(this.workspace)), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2202
2202
|
},
|
|
2203
2203
|
updateCheck_: function() {
|
|
2204
2204
|
const t = ue(this.node.id, this.prop.keys);
|
|
@@ -2223,16 +2223,16 @@ const fi = {
|
|
|
2223
2223
|
this.setWarningText(p.WARN_PROP_NOT_AVAIALABLE);
|
|
2224
2224
|
return;
|
|
2225
2225
|
}
|
|
2226
|
-
|
|
2226
|
+
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2227
2227
|
}
|
|
2228
2228
|
};
|
|
2229
|
-
m.set_node_prop_v1 =
|
|
2229
|
+
m.set_node_prop_v1 = li;
|
|
2230
2230
|
a.forBlock.set_node_prop_v1 = function(t) {
|
|
2231
2231
|
const e = t, n = a.quote_(e.node.id), o = a.quote_(e.prop.keys), i = a.valueToCode(e, "VALUE", l.NONE);
|
|
2232
2232
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2233
2233
|
`;
|
|
2234
2234
|
};
|
|
2235
|
-
const
|
|
2235
|
+
const ui = {
|
|
2236
2236
|
init: function() {
|
|
2237
2237
|
this.element = {
|
|
2238
2238
|
key: "",
|
|
@@ -2275,10 +2275,10 @@ const mi = {
|
|
|
2275
2275
|
return Le();
|
|
2276
2276
|
},
|
|
2277
2277
|
genPropOpts_: function() {
|
|
2278
|
-
return
|
|
2278
|
+
return Dn(this.element.key);
|
|
2279
2279
|
},
|
|
2280
2280
|
onchange: function(t) {
|
|
2281
|
-
if (t.type ===
|
|
2281
|
+
if (t.type === L.STATE_CHANGE)
|
|
2282
2282
|
this.checkWarning_();
|
|
2283
2283
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2284
2284
|
const e = t;
|
|
@@ -2318,7 +2318,7 @@ const mi = {
|
|
|
2318
2318
|
n && n.dispose();
|
|
2319
2319
|
let o = null;
|
|
2320
2320
|
const i = t.raw;
|
|
2321
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = pe(this.workspace, i.default) : i.ui === "numInput" ? o = Ne(this.workspace, i.default) : i.ui === "switch" ? o = mt(this.workspace, i.default) : i.ui === "select" ? o =
|
|
2321
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = pe(this.workspace, i.default) : i.ui === "numInput" ? o = Ne(this.workspace, i.default) : i.ui === "switch" ? o = mt(this.workspace, i.default) : i.ui === "select" ? o = bn(this.workspace, i.items) : i.ui === "multiTypes" ? o = Bn(this.workspace, i.types) : i.ui === "compSelect" && (o = Rn(this.workspace)), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2322
2322
|
},
|
|
2323
2323
|
updateCheck_: function() {
|
|
2324
2324
|
const t = le(this.element.key, this.prop.keys);
|
|
@@ -2343,16 +2343,16 @@ const mi = {
|
|
|
2343
2343
|
this.setWarningText(p.WARN_PROP_NOT_AVAIALABLE);
|
|
2344
2344
|
return;
|
|
2345
2345
|
}
|
|
2346
|
-
|
|
2346
|
+
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2347
2347
|
}
|
|
2348
2348
|
};
|
|
2349
|
-
m.set_node_prop_as_v1 =
|
|
2349
|
+
m.set_node_prop_as_v1 = ui;
|
|
2350
2350
|
a.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2351
2351
|
const e = t, n = a.valueToCode(e, "NODE", l.NONE), o = a.quote_(e.prop.keys), i = a.valueToCode(e, "VALUE", l.NONE);
|
|
2352
2352
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2353
2353
|
`;
|
|
2354
2354
|
};
|
|
2355
|
-
const
|
|
2355
|
+
const ri = {
|
|
2356
2356
|
init: function() {
|
|
2357
2357
|
this.event = {
|
|
2358
2358
|
id: "",
|
|
@@ -2364,7 +2364,7 @@ const Ti = {
|
|
|
2364
2364
|
var n;
|
|
2365
2365
|
if (this.event.id)
|
|
2366
2366
|
return;
|
|
2367
|
-
const t = (n =
|
|
2367
|
+
const t = (n = Vn()) == null ? void 0 : n[0];
|
|
2368
2368
|
if (!t)
|
|
2369
2369
|
return;
|
|
2370
2370
|
this.event.id = t.id, this.event.name = t.name, this.event.params = t.params;
|
|
@@ -2383,10 +2383,10 @@ const Ti = {
|
|
|
2383
2383
|
}, 0);
|
|
2384
2384
|
},
|
|
2385
2385
|
genEventOpts_: function() {
|
|
2386
|
-
return
|
|
2386
|
+
return Ko();
|
|
2387
2387
|
},
|
|
2388
2388
|
onchange: function(t) {
|
|
2389
|
-
if (t.type ===
|
|
2389
|
+
if (t.type === L.STATE_CHANGE)
|
|
2390
2390
|
this.checkWarning_();
|
|
2391
2391
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2392
2392
|
const e = t;
|
|
@@ -2424,7 +2424,7 @@ const Ti = {
|
|
|
2424
2424
|
for (let n = 0; n < this.event.params.length; n++) {
|
|
2425
2425
|
const o = this.event.params[n].type;
|
|
2426
2426
|
let i = null;
|
|
2427
|
-
o === "string" ? i =
|
|
2427
|
+
o === "string" ? i = S({ type: "string", default: "" }) : o === "number" ? i = S({ type: "number", default: 0 }) : o === "boolean" && (i = S({ type: "boolean", default: !1 })), (e = (t = this.getInput("PARAM" + n)) == null ? void 0 : t.connection) == null || e.setShadowDom(i);
|
|
2428
2428
|
}
|
|
2429
2429
|
},
|
|
2430
2430
|
checkWarning_: function() {
|
|
@@ -2433,14 +2433,14 @@ const Ti = {
|
|
|
2433
2433
|
this.setWarningText(p.WARN_EVENT_NOT_AVAILABLE);
|
|
2434
2434
|
return;
|
|
2435
2435
|
}
|
|
2436
|
-
if (t.name !== this.event.name && (this.event.name = t.name), !
|
|
2436
|
+
if (t.name !== this.event.name && (this.event.name = t.name), !U(t.params, this.event.params)) {
|
|
2437
2437
|
this.setWarningText(p.WARN_EVENT_HAS_CHANGED);
|
|
2438
2438
|
return;
|
|
2439
2439
|
}
|
|
2440
2440
|
this.setWarningText(null);
|
|
2441
2441
|
}
|
|
2442
2442
|
};
|
|
2443
|
-
m.trigger_comp_event_v1 =
|
|
2443
|
+
m.trigger_comp_event_v1 = ri;
|
|
2444
2444
|
a.forBlock.trigger_comp_event_v1 = function() {
|
|
2445
2445
|
return "";
|
|
2446
2446
|
};
|
|
@@ -2586,7 +2586,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
2586
2586
|
`
|
|
2587
2587
|
)}(${e}, ${n}, ${o})`, l.FUNCTION_CALL];
|
|
2588
2588
|
};
|
|
2589
|
-
const
|
|
2589
|
+
const _i = E.xml, pi = [
|
|
2590
2590
|
{
|
|
2591
2591
|
type: "add_data_v1",
|
|
2592
2592
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -2648,17 +2648,17 @@ const Ei = E.xml, gi = [
|
|
|
2648
2648
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
2649
2649
|
}
|
|
2650
2650
|
];
|
|
2651
|
-
function
|
|
2651
|
+
function hi(t, e) {
|
|
2652
2652
|
var o, i;
|
|
2653
|
-
const n =
|
|
2653
|
+
const n = pi.find((s) => s.type === t);
|
|
2654
2654
|
return n ? !!((o = n.prefixInputs) != null && o.some((s) => e.startsWith(s)) || (i = n.inputs) != null && i.some((s) => s === e)) : !1;
|
|
2655
2655
|
}
|
|
2656
|
-
const
|
|
2656
|
+
const di = {
|
|
2657
2657
|
init: function() {
|
|
2658
2658
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
2659
2659
|
},
|
|
2660
2660
|
mutationToDom: function() {
|
|
2661
|
-
const t =
|
|
2661
|
+
const t = _i.createElement("mutation");
|
|
2662
2662
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
2663
2663
|
},
|
|
2664
2664
|
domToMutation: function(t) {
|
|
@@ -2688,7 +2688,7 @@ const Ii = {
|
|
|
2688
2688
|
tryDuplicate_: function(t) {
|
|
2689
2689
|
var n;
|
|
2690
2690
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
2691
|
-
if (e &&
|
|
2691
|
+
if (e && hi(e.type, t.oldInputName))
|
|
2692
2692
|
try {
|
|
2693
2693
|
I.disable();
|
|
2694
2694
|
const o = (n = e.getInput(t.oldInputName)) == null ? void 0 : n.connection;
|
|
@@ -2709,7 +2709,7 @@ const Ii = {
|
|
|
2709
2709
|
this.locale ? this.setFieldValue(p[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
2710
2710
|
}
|
|
2711
2711
|
};
|
|
2712
|
-
m.parameter_v1 =
|
|
2712
|
+
m.parameter_v1 = di;
|
|
2713
2713
|
a.forBlock.parameter_v1 = function(t) {
|
|
2714
2714
|
return [t.key, l.ATOMIC];
|
|
2715
2715
|
};
|
|
@@ -2722,7 +2722,7 @@ function Se(t) {
|
|
|
2722
2722
|
function it(t) {
|
|
2723
2723
|
return g.compute.spaces.find((e) => e.id === t);
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2725
|
+
function wn(t) {
|
|
2726
2726
|
const e = [];
|
|
2727
2727
|
return Se().forEach(({ id: o, name: i }) => {
|
|
2728
2728
|
e.push([i, o]);
|
|
@@ -2737,7 +2737,7 @@ function ye(t, e) {
|
|
|
2737
2737
|
if (n)
|
|
2738
2738
|
return n.funcs.find((o) => o.id === e);
|
|
2739
2739
|
}
|
|
2740
|
-
function
|
|
2740
|
+
function Fn(t) {
|
|
2741
2741
|
const e = [];
|
|
2742
2742
|
return He(t).forEach(({ id: o, name: i }) => {
|
|
2743
2743
|
e.push([i, o]);
|
|
@@ -2750,13 +2750,13 @@ function fn(t) {
|
|
|
2750
2750
|
const { outputs: e } = g.compute.activeFunc;
|
|
2751
2751
|
return e.find((n) => n.id === t);
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function fi() {
|
|
2754
2754
|
const t = [], { outputs: e } = g.compute.activeFunc;
|
|
2755
2755
|
return e.forEach(({ id: n, name: o }) => {
|
|
2756
2756
|
t.push([o, n]);
|
|
2757
2757
|
}), N(t);
|
|
2758
2758
|
}
|
|
2759
|
-
const
|
|
2759
|
+
const mi = {
|
|
2760
2760
|
init: function() {
|
|
2761
2761
|
this.space = {
|
|
2762
2762
|
id: "",
|
|
@@ -2798,13 +2798,13 @@ const Ci = {
|
|
|
2798
2798
|
}, 0);
|
|
2799
2799
|
},
|
|
2800
2800
|
genSpaceOpts_: function() {
|
|
2801
|
-
return
|
|
2801
|
+
return wn();
|
|
2802
2802
|
},
|
|
2803
2803
|
genFuncOpts_: function() {
|
|
2804
|
-
return
|
|
2804
|
+
return Fn(this.space.id);
|
|
2805
2805
|
},
|
|
2806
2806
|
onchange: function(t) {
|
|
2807
|
-
if (t.type ===
|
|
2807
|
+
if (t.type === L.STATE_CHANGE)
|
|
2808
2808
|
this.checkWarning_();
|
|
2809
2809
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2810
2810
|
const e = t;
|
|
@@ -2879,7 +2879,7 @@ const Ci = {
|
|
|
2879
2879
|
n = { type: "boolean", default: !1 };
|
|
2880
2880
|
else
|
|
2881
2881
|
continue;
|
|
2882
|
-
this.getInput("INPUT" + t).connection.setShadowDom(
|
|
2882
|
+
this.getInput("INPUT" + t).connection.setShadowDom(S(n));
|
|
2883
2883
|
}
|
|
2884
2884
|
},
|
|
2885
2885
|
ensureBlocks_: function() {
|
|
@@ -2904,18 +2904,18 @@ const Ci = {
|
|
|
2904
2904
|
this.setWarningText(p.WARN_FUNC_NOT_AVAILABLE);
|
|
2905
2905
|
return;
|
|
2906
2906
|
}
|
|
2907
|
-
if (!
|
|
2907
|
+
if (!U(e.inputs, this.func.inputs)) {
|
|
2908
2908
|
this.setWarningText(p.WARN_FUNC_HAS_CHANGED);
|
|
2909
2909
|
return;
|
|
2910
2910
|
}
|
|
2911
|
-
if (!
|
|
2911
|
+
if (!U(e.outputs, this.func.outputs)) {
|
|
2912
2912
|
this.setWarningText(p.WARN_FUNC_HAS_CHANGED);
|
|
2913
2913
|
return;
|
|
2914
2914
|
}
|
|
2915
2915
|
this.setWarningText(null);
|
|
2916
2916
|
}
|
|
2917
2917
|
};
|
|
2918
|
-
m.call_func_v1 =
|
|
2918
|
+
m.call_func_v1 = mi;
|
|
2919
2919
|
a.forBlock.call_func_v1 = function(t) {
|
|
2920
2920
|
const e = a.INDENT, n = a.quote_, o = t, i = n(o.space.id), s = n(o.func.id);
|
|
2921
2921
|
let c = "";
|
|
@@ -2942,7 +2942,7 @@ ${e}var __result__ = __callFuncV1__(${i},${s},__inputs__,__getEnvV1__(),${u});
|
|
|
2942
2942
|
${r}${_}}
|
|
2943
2943
|
`;
|
|
2944
2944
|
};
|
|
2945
|
-
const
|
|
2945
|
+
const Ti = {
|
|
2946
2946
|
init: function() {
|
|
2947
2947
|
this.space = {
|
|
2948
2948
|
id: "",
|
|
@@ -2984,13 +2984,13 @@ const ki = {
|
|
|
2984
2984
|
}, 0);
|
|
2985
2985
|
},
|
|
2986
2986
|
genSpaceOpts_: function() {
|
|
2987
|
-
return
|
|
2987
|
+
return wn();
|
|
2988
2988
|
},
|
|
2989
2989
|
genFuncOpts_: function() {
|
|
2990
|
-
return
|
|
2990
|
+
return Fn(this.space.id);
|
|
2991
2991
|
},
|
|
2992
2992
|
onchange: function(t) {
|
|
2993
|
-
if (t.type ===
|
|
2993
|
+
if (t.type === L.STATE_CHANGE)
|
|
2994
2994
|
this.checkWarning_();
|
|
2995
2995
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
2996
2996
|
const e = t;
|
|
@@ -3065,7 +3065,7 @@ const ki = {
|
|
|
3065
3065
|
n = { type: "boolean", default: !1 };
|
|
3066
3066
|
else
|
|
3067
3067
|
continue;
|
|
3068
|
-
this.getInput("INPUT" + t).connection.setShadowDom(
|
|
3068
|
+
this.getInput("INPUT" + t).connection.setShadowDom(S(n));
|
|
3069
3069
|
}
|
|
3070
3070
|
},
|
|
3071
3071
|
ensureBlocks_: function() {
|
|
@@ -3090,18 +3090,18 @@ const ki = {
|
|
|
3090
3090
|
this.setWarningText(p.WARN_FUNC_NOT_AVAILABLE);
|
|
3091
3091
|
return;
|
|
3092
3092
|
}
|
|
3093
|
-
if (!
|
|
3093
|
+
if (!U(e.inputs, this.func.inputs)) {
|
|
3094
3094
|
this.setWarningText(p.WARN_FUNC_HAS_CHANGED);
|
|
3095
3095
|
return;
|
|
3096
3096
|
}
|
|
3097
|
-
if (!
|
|
3097
|
+
if (!U(e.outputs, this.func.outputs)) {
|
|
3098
3098
|
this.setWarningText(p.WARN_FUNC_HAS_CHANGED);
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
3101
|
this.setWarningText(null);
|
|
3102
3102
|
}
|
|
3103
3103
|
};
|
|
3104
|
-
m.call_func_internal_v1 =
|
|
3104
|
+
m.call_func_internal_v1 = Ti;
|
|
3105
3105
|
a.forBlock.call_func_internal_v1 = function(t) {
|
|
3106
3106
|
const e = a.INDENT, n = a.quote_, o = t, i = n(o.space.id), s = n(o.func.id);
|
|
3107
3107
|
let c = `${e}var __inputs__ = {
|
|
@@ -3153,7 +3153,7 @@ a.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3153
3153
|
return `__debugTraceV1__(${a.valueToCode(t, "OBJECT", l.ATOMIC)});
|
|
3154
3154
|
`;
|
|
3155
3155
|
};
|
|
3156
|
-
const
|
|
3156
|
+
const Ei = {
|
|
3157
3157
|
init: function() {
|
|
3158
3158
|
this.func = {
|
|
3159
3159
|
id: "",
|
|
@@ -3203,14 +3203,14 @@ const yi = {
|
|
|
3203
3203
|
},
|
|
3204
3204
|
checkWarning_: function() {
|
|
3205
3205
|
const { id: t, inputs: e } = jt();
|
|
3206
|
-
if (this.func.id !== t && (this.func.id = t), !
|
|
3206
|
+
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3207
3207
|
this.setWarningText(p.WARN_FUNC_HAS_CHANGED);
|
|
3208
3208
|
return;
|
|
3209
3209
|
}
|
|
3210
3210
|
this.setWarningText(null);
|
|
3211
3211
|
}
|
|
3212
3212
|
};
|
|
3213
|
-
m.func_entry_v1 =
|
|
3213
|
+
m.func_entry_v1 = Ei;
|
|
3214
3214
|
a.forBlock.func_entry_v1 = function(t) {
|
|
3215
3215
|
const e = t, n = a.statementToCode(e, "HANDLE"), o = [];
|
|
3216
3216
|
for (let s = 0; s < e.func.inputs.length; s++) {
|
|
@@ -3220,16 +3220,16 @@ a.forBlock.func_entry_v1 = function(t) {
|
|
|
3220
3220
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3221
3221
|
${n}}`;
|
|
3222
3222
|
};
|
|
3223
|
-
const
|
|
3223
|
+
const gi = {
|
|
3224
3224
|
init: function() {
|
|
3225
3225
|
}
|
|
3226
3226
|
};
|
|
3227
|
-
m.on_flow_state_event_v1 =
|
|
3227
|
+
m.on_flow_state_event_v1 = gi;
|
|
3228
3228
|
a.forBlock.on_flow_state_event_v1 = function() {
|
|
3229
3229
|
return `__onFlowStateEventV1__();
|
|
3230
3230
|
`;
|
|
3231
3231
|
};
|
|
3232
|
-
const
|
|
3232
|
+
const Ai = {
|
|
3233
3233
|
init: function() {
|
|
3234
3234
|
this.output = {
|
|
3235
3235
|
id: "",
|
|
@@ -3256,10 +3256,10 @@ const Ni = {
|
|
|
3256
3256
|
}, 0);
|
|
3257
3257
|
},
|
|
3258
3258
|
genOutputOpts_: function() {
|
|
3259
|
-
return
|
|
3259
|
+
return fi();
|
|
3260
3260
|
},
|
|
3261
3261
|
onchange: function(t) {
|
|
3262
|
-
if (t.type ===
|
|
3262
|
+
if (t.type === L.STATE_CHANGE)
|
|
3263
3263
|
this.checkWarning_();
|
|
3264
3264
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
3265
3265
|
const e = t;
|
|
@@ -3291,7 +3291,7 @@ const Ni = {
|
|
|
3291
3291
|
return;
|
|
3292
3292
|
let t = null;
|
|
3293
3293
|
const e = this.output.type;
|
|
3294
|
-
e === "string" ? t =
|
|
3294
|
+
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
3295
3295
|
},
|
|
3296
3296
|
checkWarning_: function() {
|
|
3297
3297
|
const t = fn(this.output.id);
|
|
@@ -3306,7 +3306,7 @@ const Ni = {
|
|
|
3306
3306
|
this.setWarningText(null);
|
|
3307
3307
|
}
|
|
3308
3308
|
};
|
|
3309
|
-
m.set_func_output_v1 =
|
|
3309
|
+
m.set_func_output_v1 = Ai;
|
|
3310
3310
|
a.forBlock.set_func_output_v1 = function(t) {
|
|
3311
3311
|
const e = a.quote_, n = t, { id: o, type: i } = n.output;
|
|
3312
3312
|
let s = a.valueToCode(n, "VALUE", l.ATOMIC);
|
|
@@ -3379,13 +3379,13 @@ function Mt(t, e, n) {
|
|
|
3379
3379
|
if (s)
|
|
3380
3380
|
return s.columns.find((c) => c.id === n);
|
|
3381
3381
|
}
|
|
3382
|
-
function
|
|
3382
|
+
function Ii(t, e) {
|
|
3383
3383
|
const n = [];
|
|
3384
3384
|
return st(t, e).forEach(({ id: i, name: s }) => {
|
|
3385
3385
|
n.push([s, i]);
|
|
3386
3386
|
}), N(n);
|
|
3387
3387
|
}
|
|
3388
|
-
function
|
|
3388
|
+
function Oi(t) {
|
|
3389
3389
|
var u, r;
|
|
3390
3390
|
const e = t.getInput("TABLE").connection;
|
|
3391
3391
|
if (e.targetBlock())
|
|
@@ -3420,7 +3420,7 @@ function Si(t) {
|
|
|
3420
3420
|
}, c = G.blocks.append(s, t.workspace);
|
|
3421
3421
|
e.connect(c.outputConnection);
|
|
3422
3422
|
}
|
|
3423
|
-
function
|
|
3423
|
+
function Ci(t) {
|
|
3424
3424
|
const e = t.getInput("HANDLE").connection;
|
|
3425
3425
|
if (e.targetBlock())
|
|
3426
3426
|
return;
|
|
@@ -3444,7 +3444,7 @@ function bi(t) {
|
|
|
3444
3444
|
}, o = G.blocks.append(n, t.workspace);
|
|
3445
3445
|
e.connect(o.previousConnection);
|
|
3446
3446
|
}
|
|
3447
|
-
const
|
|
3447
|
+
const ki = {
|
|
3448
3448
|
init: function() {
|
|
3449
3449
|
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}");
|
|
3450
3450
|
},
|
|
@@ -3460,14 +3460,14 @@ const Bi = {
|
|
|
3460
3460
|
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(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3461
3461
|
},
|
|
3462
3462
|
ensureBlocks_: function() {
|
|
3463
|
-
this.isInsertionMarker() || (
|
|
3463
|
+
this.isInsertionMarker() || (Oi(this), w(this, [
|
|
3464
3464
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3465
3465
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3466
3466
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3467
|
-
]),
|
|
3467
|
+
]), Ci(this));
|
|
3468
3468
|
}
|
|
3469
3469
|
};
|
|
3470
|
-
m.add_data_v1 =
|
|
3470
|
+
m.add_data_v1 = ki;
|
|
3471
3471
|
a.forBlock.add_data_v1 = function(t) {
|
|
3472
3472
|
const e = a.INDENT, n = a.valueToCode(t, "TABLE", l.ATOMIC) || "null", o = a.statementToCode(t, "HANDLE");
|
|
3473
3473
|
return `{
|
|
@@ -3483,7 +3483,7 @@ ${e}}
|
|
|
3483
3483
|
${o}}
|
|
3484
3484
|
`;
|
|
3485
3485
|
};
|
|
3486
|
-
const
|
|
3486
|
+
const yi = {
|
|
3487
3487
|
init: function() {
|
|
3488
3488
|
this.space = {
|
|
3489
3489
|
id: "",
|
|
@@ -3545,10 +3545,10 @@ const Ri = {
|
|
|
3545
3545
|
return Et(this.space.id);
|
|
3546
3546
|
},
|
|
3547
3547
|
genColumnOpts_: function() {
|
|
3548
|
-
return
|
|
3548
|
+
return Ii(this.space.id, this.table.id);
|
|
3549
3549
|
},
|
|
3550
3550
|
onchange: function(t) {
|
|
3551
|
-
if (t.type ===
|
|
3551
|
+
if (t.type === L.STATE_CHANGE)
|
|
3552
3552
|
this.checkWarning_();
|
|
3553
3553
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
3554
3554
|
const e = t;
|
|
@@ -3640,7 +3640,7 @@ const Ri = {
|
|
|
3640
3640
|
this.setWarningText(null);
|
|
3641
3641
|
}
|
|
3642
3642
|
};
|
|
3643
|
-
m.cond_atomic_v1 =
|
|
3643
|
+
m.cond_atomic_v1 = yi;
|
|
3644
3644
|
a.forBlock.cond_atomic_v1 = function(t) {
|
|
3645
3645
|
const e = a.quote_, n = t, o = n.column.name, i = a.valueToCode(n, "VALUE", l.ATOMIC) || null, c = {
|
|
3646
3646
|
EQ: "=",
|
|
@@ -3652,19 +3652,19 @@ a.forBlock.cond_atomic_v1 = function(t) {
|
|
|
3652
3652
|
}[n.getFieldValue("OP")];
|
|
3653
3653
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(c)}}`, l.ATOMIC];
|
|
3654
3654
|
};
|
|
3655
|
-
const
|
|
3655
|
+
const vi = {
|
|
3656
3656
|
init: function() {
|
|
3657
3657
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
3658
3658
|
}
|
|
3659
3659
|
};
|
|
3660
|
-
m.cond_logic_container_v1 =
|
|
3661
|
-
const
|
|
3660
|
+
m.cond_logic_container_v1 = vi;
|
|
3661
|
+
const Ni = {
|
|
3662
3662
|
init: function() {
|
|
3663
3663
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
3664
3664
|
}
|
|
3665
3665
|
};
|
|
3666
|
-
m.cond_logic_item_v1 =
|
|
3667
|
-
const
|
|
3666
|
+
m.cond_logic_item_v1 = Ni;
|
|
3667
|
+
const Li = {
|
|
3668
3668
|
init: function() {
|
|
3669
3669
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
3670
3670
|
new T([
|
|
@@ -3740,7 +3740,7 @@ const Mi = {
|
|
|
3740
3740
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
3741
3741
|
}
|
|
3742
3742
|
};
|
|
3743
|
-
m.cond_logic_v1 =
|
|
3743
|
+
m.cond_logic_v1 = Li;
|
|
3744
3744
|
a.forBlock.cond_logic_v1 = function(t) {
|
|
3745
3745
|
const e = a.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], s = a.valueToCode(n, "VALUE", l.ATOMIC) || null;
|
|
3746
3746
|
i.push(s);
|
|
@@ -3750,7 +3750,7 @@ a.forBlock.cond_logic_v1 = function(t) {
|
|
|
3750
3750
|
}
|
|
3751
3751
|
return [`{type:${e(o)},entries:[${i}]}`, l.ATOMIC];
|
|
3752
3752
|
};
|
|
3753
|
-
function
|
|
3753
|
+
function Si(t) {
|
|
3754
3754
|
var c, u;
|
|
3755
3755
|
const e = t.getInput("TABLE").connection;
|
|
3756
3756
|
if (e.targetBlock())
|
|
@@ -3770,7 +3770,7 @@ function Vi(t) {
|
|
|
3770
3770
|
}, s = G.blocks.append(i, t.workspace);
|
|
3771
3771
|
e.connect(s.outputConnection);
|
|
3772
3772
|
}
|
|
3773
|
-
function
|
|
3773
|
+
function bi(t) {
|
|
3774
3774
|
var u, r, _;
|
|
3775
3775
|
const e = t.getInput("CONDITION").connection;
|
|
3776
3776
|
if (e.targetBlock())
|
|
@@ -3796,7 +3796,7 @@ function Pi(t) {
|
|
|
3796
3796
|
}, c = G.blocks.append(s, t.workspace);
|
|
3797
3797
|
e.connect(c.outputConnection);
|
|
3798
3798
|
}
|
|
3799
|
-
function
|
|
3799
|
+
function Bi(t) {
|
|
3800
3800
|
const e = t.getInput("HANDLE").connection;
|
|
3801
3801
|
if (e.targetBlock())
|
|
3802
3802
|
return;
|
|
@@ -3820,7 +3820,7 @@ function xi(t) {
|
|
|
3820
3820
|
}, o = G.blocks.append(n, t.workspace);
|
|
3821
3821
|
e.connect(o.previousConnection);
|
|
3822
3822
|
}
|
|
3823
|
-
const
|
|
3823
|
+
const Ri = {
|
|
3824
3824
|
init: function() {
|
|
3825
3825
|
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}");
|
|
3826
3826
|
},
|
|
@@ -3836,13 +3836,13 @@ const Yi = {
|
|
|
3836
3836
|
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(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
3837
3837
|
},
|
|
3838
3838
|
ensureBlocks_: function() {
|
|
3839
|
-
this.isInsertionMarker() || (
|
|
3839
|
+
this.isInsertionMarker() || (Si(this), bi(this), w(this, [
|
|
3840
3840
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3841
3841
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
3842
|
-
]),
|
|
3842
|
+
]), Bi(this));
|
|
3843
3843
|
}
|
|
3844
3844
|
};
|
|
3845
|
-
m.delete_data_v1 =
|
|
3845
|
+
m.delete_data_v1 = Ri;
|
|
3846
3846
|
a.forBlock.delete_data_v1 = function(t) {
|
|
3847
3847
|
const e = a.INDENT, n = a.valueToCode(t, "TABLE", l.ATOMIC) || "null", o = a.valueToCode(t, "CONDITION", l.ATOMIC) || "null", i = a.statementToCode(t, "HANDLE");
|
|
3848
3848
|
return `{
|
|
@@ -3880,7 +3880,7 @@ a.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
3880
3880
|
return `throw ${a.valueToCode(t, "VALUE", l.NONE) || "''"};
|
|
3881
3881
|
`;
|
|
3882
3882
|
};
|
|
3883
|
-
function
|
|
3883
|
+
function Di(t) {
|
|
3884
3884
|
var u, r;
|
|
3885
3885
|
const e = t.getInput("TABLE").connection;
|
|
3886
3886
|
if (e.targetBlock())
|
|
@@ -3915,7 +3915,7 @@ function wi(t) {
|
|
|
3915
3915
|
}, c = G.blocks.append(s, t.workspace);
|
|
3916
3916
|
e.connect(c.outputConnection);
|
|
3917
3917
|
}
|
|
3918
|
-
function
|
|
3918
|
+
function Ui(t) {
|
|
3919
3919
|
const e = t.getInput("CONDITION").connection;
|
|
3920
3920
|
if (e.targetBlock())
|
|
3921
3921
|
return;
|
|
@@ -3924,7 +3924,7 @@ function Fi(t) {
|
|
|
3924
3924
|
}, o = G.blocks.append(n, t.workspace);
|
|
3925
3925
|
e.connect(o.outputConnection);
|
|
3926
3926
|
}
|
|
3927
|
-
function
|
|
3927
|
+
function Mi(t) {
|
|
3928
3928
|
const e = t.getInput("EXTRA").connection;
|
|
3929
3929
|
if (e.targetBlock())
|
|
3930
3930
|
return;
|
|
@@ -3961,7 +3961,7 @@ function Ki(t) {
|
|
|
3961
3961
|
}, o = G.blocks.append(n, t.workspace);
|
|
3962
3962
|
e.connect(o.outputConnection);
|
|
3963
3963
|
}
|
|
3964
|
-
function
|
|
3964
|
+
function Vi(t) {
|
|
3965
3965
|
const e = t.getInput("HANDLE").connection;
|
|
3966
3966
|
if (e.targetBlock())
|
|
3967
3967
|
return;
|
|
@@ -3999,7 +3999,7 @@ f([
|
|
|
3999
3999
|
style: "procedure_blocks"
|
|
4000
4000
|
}
|
|
4001
4001
|
]);
|
|
4002
|
-
const
|
|
4002
|
+
const Pi = {
|
|
4003
4003
|
init: function() {
|
|
4004
4004
|
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}");
|
|
4005
4005
|
},
|
|
@@ -4015,15 +4015,15 @@ const Hi = {
|
|
|
4015
4015
|
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(y.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4016
4016
|
},
|
|
4017
4017
|
ensureBlocks_: function() {
|
|
4018
|
-
this.isInsertionMarker() || (
|
|
4018
|
+
this.isInsertionMarker() || (Di(this), Ui(this), Mi(this), w(this, [
|
|
4019
4019
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4020
4020
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4021
4021
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4022
4022
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4023
|
-
]),
|
|
4023
|
+
]), Vi(this));
|
|
4024
4024
|
}
|
|
4025
4025
|
};
|
|
4026
|
-
m.query_data_v1 =
|
|
4026
|
+
m.query_data_v1 = Pi;
|
|
4027
4027
|
a.forBlock.query_data_v1 = function(t) {
|
|
4028
4028
|
const e = a.INDENT, n = a.valueToCode(t, "TABLE", l.ATOMIC) || "null", o = a.valueToCode(t, "CONDITION", l.ATOMIC) || "null", i = a.valueToCode(t, "EXTRA", l.ATOMIC) || "null", s = a.statementToCode(t, "HANDLE");
|
|
4029
4029
|
return `{
|
|
@@ -4096,19 +4096,19 @@ a.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4096
4096
|
const e = a.valueToCode(t, "COLUMN", l.ATOMIC) || "''", n = a.valueToCode(t, "DESC", l.ATOMIC) || !1;
|
|
4097
4097
|
return [`{type:'sortby',value:${e},value2:${n}}`, l.ATOMIC];
|
|
4098
4098
|
};
|
|
4099
|
-
const
|
|
4099
|
+
const xi = {
|
|
4100
4100
|
init: function() {
|
|
4101
4101
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4102
4102
|
}
|
|
4103
4103
|
};
|
|
4104
|
-
m.select_column_container_v1 =
|
|
4105
|
-
const
|
|
4104
|
+
m.select_column_container_v1 = xi;
|
|
4105
|
+
const Yi = {
|
|
4106
4106
|
init: function() {
|
|
4107
4107
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4108
4108
|
}
|
|
4109
4109
|
};
|
|
4110
|
-
m.select_column_item_v1 =
|
|
4111
|
-
const
|
|
4110
|
+
m.select_column_item_v1 = Yi;
|
|
4111
|
+
const wi = {
|
|
4112
4112
|
init: function() {
|
|
4113
4113
|
this.space = {
|
|
4114
4114
|
id: "",
|
|
@@ -4168,7 +4168,7 @@ const ji = {
|
|
|
4168
4168
|
},
|
|
4169
4169
|
onchange: function(t) {
|
|
4170
4170
|
var e;
|
|
4171
|
-
if (t.type ===
|
|
4171
|
+
if (t.type === L.STATE_CHANGE)
|
|
4172
4172
|
this.checkWarning_();
|
|
4173
4173
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
4174
4174
|
const n = t;
|
|
@@ -4301,14 +4301,14 @@ const ji = {
|
|
|
4301
4301
|
this.setWarningText(p.WARN_TABLE_NOT_AVAILABLE);
|
|
4302
4302
|
return;
|
|
4303
4303
|
}
|
|
4304
|
-
if (e.name !== this.table.name && (this.table.name = e.name), !
|
|
4304
|
+
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
4305
4305
|
this.setWarningText(p.WARN_TABLE_HAS_CHANGED);
|
|
4306
4306
|
return;
|
|
4307
4307
|
}
|
|
4308
4308
|
this.setWarningText(null);
|
|
4309
4309
|
}
|
|
4310
4310
|
};
|
|
4311
|
-
m.select_column_v1 =
|
|
4311
|
+
m.select_column_v1 = wi;
|
|
4312
4312
|
a.forBlock.select_column_v1 = function(t) {
|
|
4313
4313
|
const e = a.quote_, n = t, o = n.space.id, i = n.table.id, s = [];
|
|
4314
4314
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4320,7 +4320,7 @@ a.forBlock.select_column_v1 = function(t) {
|
|
|
4320
4320
|
h !== 0 && (c += ","), c += `{name:${e(r)},alias:${e(_)}}`;
|
|
4321
4321
|
}), c += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${c}}`, l.ATOMIC];
|
|
4322
4322
|
};
|
|
4323
|
-
const
|
|
4323
|
+
const Fi = {
|
|
4324
4324
|
init: function() {
|
|
4325
4325
|
this.space = {
|
|
4326
4326
|
id: "",
|
|
@@ -4364,7 +4364,7 @@ const Xi = {
|
|
|
4364
4364
|
return Et(this.space.id);
|
|
4365
4365
|
},
|
|
4366
4366
|
onchange: function(t) {
|
|
4367
|
-
if (t.type ===
|
|
4367
|
+
if (t.type === L.STATE_CHANGE)
|
|
4368
4368
|
this.checkWarning_();
|
|
4369
4369
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
4370
4370
|
const e = t;
|
|
@@ -4411,12 +4411,12 @@ const Xi = {
|
|
|
4411
4411
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4412
4412
|
}
|
|
4413
4413
|
};
|
|
4414
|
-
m.select_table_v1 =
|
|
4414
|
+
m.select_table_v1 = Fi;
|
|
4415
4415
|
a.forBlock.select_table_v1 = function(t) {
|
|
4416
4416
|
const e = a.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4417
4417
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, l.ATOMIC];
|
|
4418
4418
|
};
|
|
4419
|
-
const
|
|
4419
|
+
const Ki = {
|
|
4420
4420
|
init: function() {
|
|
4421
4421
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
4422
4422
|
},
|
|
@@ -4438,9 +4438,9 @@ const Ji = {
|
|
|
4438
4438
|
]);
|
|
4439
4439
|
}
|
|
4440
4440
|
};
|
|
4441
|
-
m.transaction_v1 =
|
|
4441
|
+
m.transaction_v1 = Ki;
|
|
4442
4442
|
a.forBlock.transaction_v1 = function(t) {
|
|
4443
|
-
const e = a.INDENT, n = t, o =
|
|
4443
|
+
const e = a.INDENT, n = t, o = Do(n), i = a.statementToCode(n, "HANDLE"), s = a.statementToCode(n, "FINALLY");
|
|
4444
4444
|
return `{
|
|
4445
4445
|
${e}var __error${o}__ = '';
|
|
4446
4446
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4482,19 +4482,19 @@ ${e}}
|
|
|
4482
4482
|
}
|
|
4483
4483
|
`;
|
|
4484
4484
|
};
|
|
4485
|
-
const
|
|
4485
|
+
const $i = {
|
|
4486
4486
|
init: function() {
|
|
4487
4487
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4488
4488
|
}
|
|
4489
4489
|
};
|
|
4490
|
-
m.update_column_container_v1 =
|
|
4491
|
-
const
|
|
4490
|
+
m.update_column_container_v1 = $i;
|
|
4491
|
+
const Hi = {
|
|
4492
4492
|
init: function() {
|
|
4493
4493
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4494
4494
|
}
|
|
4495
4495
|
};
|
|
4496
|
-
m.update_column_item_v1 =
|
|
4497
|
-
const
|
|
4496
|
+
m.update_column_item_v1 = Hi;
|
|
4497
|
+
const Gi = {
|
|
4498
4498
|
init: function() {
|
|
4499
4499
|
this.space = {
|
|
4500
4500
|
id: "",
|
|
@@ -4553,7 +4553,7 @@ const Qi = {
|
|
|
4553
4553
|
}), N(t);
|
|
4554
4554
|
},
|
|
4555
4555
|
onchange: function(t) {
|
|
4556
|
-
if (t.type ===
|
|
4556
|
+
if (t.type === L.STATE_CHANGE)
|
|
4557
4557
|
this.checkWarning_();
|
|
4558
4558
|
else if (t.type === I.BLOCK_CHANGE) {
|
|
4559
4559
|
const e = t;
|
|
@@ -4721,14 +4721,14 @@ const Qi = {
|
|
|
4721
4721
|
this.setWarningText(p.WARN_TABLE_NOT_AVAILABLE);
|
|
4722
4722
|
return;
|
|
4723
4723
|
}
|
|
4724
|
-
if (e.name !== this.table.name && (this.table.name = e.name), !
|
|
4724
|
+
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
4725
4725
|
this.setWarningText(p.WARN_TABLE_HAS_CHANGED);
|
|
4726
4726
|
return;
|
|
4727
4727
|
}
|
|
4728
4728
|
this.setWarningText(null);
|
|
4729
4729
|
}
|
|
4730
4730
|
};
|
|
4731
|
-
m.update_column_v1 =
|
|
4731
|
+
m.update_column_v1 = Gi;
|
|
4732
4732
|
a.forBlock.update_column_v1 = function(t) {
|
|
4733
4733
|
const e = a.quote_, n = t, o = n.space.id, i = n.table.id, s = [];
|
|
4734
4734
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4740,7 +4740,7 @@ a.forBlock.update_column_v1 = function(t) {
|
|
|
4740
4740
|
h !== 0 && (c += ","), c += `{name:${e(r)},value:${_}}`;
|
|
4741
4741
|
}), c += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${c}}`, l.ATOMIC];
|
|
4742
4742
|
};
|
|
4743
|
-
function
|
|
4743
|
+
function Wi(t) {
|
|
4744
4744
|
var u, r;
|
|
4745
4745
|
const e = t.getInput("TABLE").connection;
|
|
4746
4746
|
if (e.targetBlock())
|
|
@@ -4775,7 +4775,7 @@ function Zi(t) {
|
|
|
4775
4775
|
}, c = G.blocks.append(s, t.workspace);
|
|
4776
4776
|
e.connect(c.outputConnection);
|
|
4777
4777
|
}
|
|
4778
|
-
function
|
|
4778
|
+
function ji(t) {
|
|
4779
4779
|
const e = t.getInput("CONDITION").connection;
|
|
4780
4780
|
if (e.targetBlock())
|
|
4781
4781
|
return;
|
|
@@ -4784,7 +4784,7 @@ function es(t) {
|
|
|
4784
4784
|
}, o = G.blocks.append(n, t.workspace);
|
|
4785
4785
|
e.connect(o.outputConnection);
|
|
4786
4786
|
}
|
|
4787
|
-
function
|
|
4787
|
+
function Xi(t) {
|
|
4788
4788
|
const e = t.getInput("HANDLE").connection;
|
|
4789
4789
|
if (e.targetBlock())
|
|
4790
4790
|
return;
|
|
@@ -4808,7 +4808,7 @@ function ts(t) {
|
|
|
4808
4808
|
}, o = G.blocks.append(n, t.workspace);
|
|
4809
4809
|
e.connect(o.previousConnection);
|
|
4810
4810
|
}
|
|
4811
|
-
const
|
|
4811
|
+
const Ji = {
|
|
4812
4812
|
init: function() {
|
|
4813
4813
|
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}");
|
|
4814
4814
|
},
|
|
@@ -4824,14 +4824,14 @@ const ns = {
|
|
|
4824
4824
|
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(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4825
4825
|
},
|
|
4826
4826
|
ensureBlocks: function() {
|
|
4827
|
-
this.isInsertionMarker() || (
|
|
4827
|
+
this.isInsertionMarker() || (Wi(this), ji(this), w(this, [
|
|
4828
4828
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4829
4829
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4830
4830
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
4831
|
-
]),
|
|
4831
|
+
]), Xi(this));
|
|
4832
4832
|
}
|
|
4833
4833
|
};
|
|
4834
|
-
m.update_data_v1 =
|
|
4834
|
+
m.update_data_v1 = Ji;
|
|
4835
4835
|
a.forBlock.update_data_v1 = function(t) {
|
|
4836
4836
|
const e = a.INDENT, n = a.valueToCode(t, "TABLE", l.ATOMIC) || "null", o = a.valueToCode(t, "CONDITION", l.ATOMIC) || "null", i = a.statementToCode(t, "HANDLE");
|
|
4837
4837
|
return `{
|
|
@@ -4848,7 +4848,7 @@ ${e}}
|
|
|
4848
4848
|
${i}}
|
|
4849
4849
|
`;
|
|
4850
4850
|
};
|
|
4851
|
-
const
|
|
4851
|
+
const qi = E.xml, zi = {
|
|
4852
4852
|
init: function() {
|
|
4853
4853
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
4854
4854
|
new Z(ke, 20, 20, void 0, () => {
|
|
@@ -4857,7 +4857,7 @@ const os = E.xml, is = {
|
|
|
4857
4857
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
4858
4858
|
},
|
|
4859
4859
|
mutationToDom: function() {
|
|
4860
|
-
const t =
|
|
4860
|
+
const t = qi.createElement("mutation");
|
|
4861
4861
|
return t.setAttribute("items", String(this.length)), t;
|
|
4862
4862
|
},
|
|
4863
4863
|
domToMutation: function(t) {
|
|
@@ -4909,8 +4909,8 @@ const os = E.xml, is = {
|
|
|
4909
4909
|
this.length--;
|
|
4910
4910
|
}
|
|
4911
4911
|
};
|
|
4912
|
-
m.json_array_v1 =
|
|
4913
|
-
const
|
|
4912
|
+
m.json_array_v1 = zi;
|
|
4913
|
+
const Qi = {
|
|
4914
4914
|
init: function() {
|
|
4915
4915
|
this.appendDummyInput().appendField(
|
|
4916
4916
|
new On([
|
|
@@ -4921,8 +4921,8 @@ const ss = {
|
|
|
4921
4921
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
4922
4922
|
}
|
|
4923
4923
|
};
|
|
4924
|
-
m.json_boolean_v1 =
|
|
4925
|
-
const mn = E.xml,
|
|
4924
|
+
m.json_boolean_v1 = Qi;
|
|
4925
|
+
const mn = E.xml, Zi = {
|
|
4926
4926
|
init: function() {
|
|
4927
4927
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
4928
4928
|
new Z(ke, 20, 20, void 0, () => {
|
|
@@ -4988,38 +4988,38 @@ const mn = E.xml, as = {
|
|
|
4988
4988
|
this.length--;
|
|
4989
4989
|
}
|
|
4990
4990
|
};
|
|
4991
|
-
m.json_map_v1 =
|
|
4992
|
-
const
|
|
4991
|
+
m.json_map_v1 = Zi;
|
|
4992
|
+
const es = {
|
|
4993
4993
|
init: function() {
|
|
4994
4994
|
this.appendDummyInput().appendField(new Yt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
4995
4995
|
}
|
|
4996
4996
|
};
|
|
4997
|
-
m.json_number_v1 =
|
|
4998
|
-
const
|
|
4997
|
+
m.json_number_v1 = es;
|
|
4998
|
+
const ts = {
|
|
4999
4999
|
init: function() {
|
|
5000
5000
|
this.appendDummyInput().setAlign(y.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5001
5001
|
}
|
|
5002
5002
|
};
|
|
5003
|
-
m.json_root_v1 =
|
|
5004
|
-
const
|
|
5003
|
+
m.json_root_v1 = ts;
|
|
5004
|
+
const ns = {
|
|
5005
5005
|
init: function() {
|
|
5006
5006
|
this.appendDummyInput().appendField('"').appendField(new he(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5007
5007
|
}
|
|
5008
5008
|
};
|
|
5009
|
-
m.json_string_v1 =
|
|
5010
|
-
const
|
|
5009
|
+
m.json_string_v1 = ns;
|
|
5010
|
+
const os = E.xml, is = {
|
|
5011
5011
|
init: function() {
|
|
5012
5012
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5013
5013
|
}
|
|
5014
5014
|
};
|
|
5015
|
-
m.list_create_container_v1 =
|
|
5016
|
-
const
|
|
5015
|
+
m.list_create_container_v1 = is;
|
|
5016
|
+
const ss = {
|
|
5017
5017
|
init: function() {
|
|
5018
5018
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5019
5019
|
}
|
|
5020
5020
|
};
|
|
5021
|
-
m.list_create_item_v1 =
|
|
5022
|
-
const
|
|
5021
|
+
m.list_create_item_v1 = ss;
|
|
5022
|
+
const as = {
|
|
5023
5023
|
init: function() {
|
|
5024
5024
|
this.itemCount_ = 0, this.setMutator(
|
|
5025
5025
|
new Ee.MutatorIcon(
|
|
@@ -5029,7 +5029,7 @@ const hs = {
|
|
|
5029
5029
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5030
5030
|
},
|
|
5031
5031
|
mutationToDom: function() {
|
|
5032
|
-
const t =
|
|
5032
|
+
const t = os.createElement("mutation");
|
|
5033
5033
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5034
5034
|
},
|
|
5035
5035
|
domToMutation: function(t) {
|
|
@@ -5103,7 +5103,7 @@ const hs = {
|
|
|
5103
5103
|
this.removeInput("ADD" + t);
|
|
5104
5104
|
}
|
|
5105
5105
|
};
|
|
5106
|
-
m.list_create_v1 =
|
|
5106
|
+
m.list_create_v1 = as;
|
|
5107
5107
|
a.forBlock.list_create_v1 = function(t) {
|
|
5108
5108
|
const e = t, n = new Array(e.itemCount_);
|
|
5109
5109
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5319,7 +5319,7 @@ a.forBlock.list_set_v1 = function(t) {
|
|
|
5319
5319
|
return `${e}[${n}] = ${o};
|
|
5320
5320
|
`;
|
|
5321
5321
|
};
|
|
5322
|
-
const
|
|
5322
|
+
const cs = {
|
|
5323
5323
|
// logic_compare
|
|
5324
5324
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5325
5325
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5331,9 +5331,9 @@ const ds = {
|
|
|
5331
5331
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
5332
5332
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
5333
5333
|
};
|
|
5334
|
-
|
|
5334
|
+
R.register(
|
|
5335
5335
|
"logic_op_tooltip_v1",
|
|
5336
|
-
|
|
5336
|
+
R.buildTooltipForDropdown("OP", cs)
|
|
5337
5337
|
);
|
|
5338
5338
|
f([
|
|
5339
5339
|
{
|
|
@@ -5358,7 +5358,7 @@ f([
|
|
|
5358
5358
|
a.forBlock.logic_boolean_v1 = function(t) {
|
|
5359
5359
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", l.ATOMIC];
|
|
5360
5360
|
};
|
|
5361
|
-
const
|
|
5361
|
+
const ls = {
|
|
5362
5362
|
onchange: function(t) {
|
|
5363
5363
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5364
5364
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5375,10 +5375,10 @@ const fs = {
|
|
|
5375
5375
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
5376
5376
|
}
|
|
5377
5377
|
};
|
|
5378
|
-
|
|
5378
|
+
R.register(
|
|
5379
5379
|
"logic_compare_v1",
|
|
5380
5380
|
function() {
|
|
5381
|
-
this.mixin(
|
|
5381
|
+
this.mixin(ls);
|
|
5382
5382
|
}
|
|
5383
5383
|
);
|
|
5384
5384
|
f([
|
|
@@ -5428,7 +5428,7 @@ a.forBlock.logic_compare_v1 = function(t) {
|
|
|
5428
5428
|
const i = a.valueToCode(t, "A", o) || "0", s = a.valueToCode(t, "B", o) || "0";
|
|
5429
5429
|
return [`${i} ${n} ${s}`, o];
|
|
5430
5430
|
};
|
|
5431
|
-
const
|
|
5431
|
+
const us = {
|
|
5432
5432
|
elseIfCount_: 0,
|
|
5433
5433
|
hasElse_: !1,
|
|
5434
5434
|
mutationToDom: function() {
|
|
@@ -5554,9 +5554,9 @@ const ms = {
|
|
|
5554
5554
|
n == null || n.reconnect(this, "ELSE");
|
|
5555
5555
|
}
|
|
5556
5556
|
};
|
|
5557
|
-
|
|
5557
|
+
R.registerMutator(
|
|
5558
5558
|
"logic_if_v1_mutator",
|
|
5559
|
-
|
|
5559
|
+
us,
|
|
5560
5560
|
void 0,
|
|
5561
5561
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
5562
5562
|
);
|
|
@@ -5702,7 +5702,7 @@ a.forBlock.logic_operation_v1 = function(t) {
|
|
|
5702
5702
|
}
|
|
5703
5703
|
return [`${o} ${e} ${i}`, n];
|
|
5704
5704
|
};
|
|
5705
|
-
const
|
|
5705
|
+
const rs = {
|
|
5706
5706
|
prevParentConnection_: null,
|
|
5707
5707
|
onchange: function(t) {
|
|
5708
5708
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -5717,7 +5717,7 @@ const Ts = {
|
|
|
5717
5717
|
this.prevParentConnection_ = o;
|
|
5718
5718
|
}
|
|
5719
5719
|
};
|
|
5720
|
-
|
|
5720
|
+
R.registerMixin("logic_ternary_v1", rs);
|
|
5721
5721
|
f([
|
|
5722
5722
|
{
|
|
5723
5723
|
type: "logic_ternary_v1",
|
|
@@ -5754,7 +5754,7 @@ a.forBlock.logic_ternary_v1 = function(t) {
|
|
|
5754
5754
|
const e = a.valueToCode(t, "IF", l.CONDITIONAL) || "false", n = a.valueToCode(t, "THEN", l.CONDITIONAL) || "null", o = a.valueToCode(t, "ELSE", l.CONDITIONAL) || "null";
|
|
5755
5755
|
return [e + " ? " + n + " : " + o, l.CONDITIONAL];
|
|
5756
5756
|
};
|
|
5757
|
-
const
|
|
5757
|
+
const _s = {
|
|
5758
5758
|
customContextMenu: function(t) {
|
|
5759
5759
|
if (this.isInFlyout)
|
|
5760
5760
|
return;
|
|
@@ -5774,27 +5774,27 @@ const Es = {
|
|
|
5774
5774
|
}
|
|
5775
5775
|
}
|
|
5776
5776
|
};
|
|
5777
|
-
|
|
5777
|
+
R.registerMixin(
|
|
5778
5778
|
"contextMenu_newGetVariableBlock_v1",
|
|
5779
|
-
|
|
5779
|
+
_s
|
|
5780
5780
|
);
|
|
5781
|
-
|
|
5781
|
+
R.register(
|
|
5782
5782
|
"flow_control_tooltip_v1",
|
|
5783
|
-
|
|
5783
|
+
R.buildTooltipForDropdown("MODE", {
|
|
5784
5784
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
5785
5785
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
5786
5786
|
})
|
|
5787
5787
|
);
|
|
5788
|
-
const
|
|
5788
|
+
const ps = /* @__PURE__ */ new Set([
|
|
5789
5789
|
"repeat_v1",
|
|
5790
5790
|
"for_each_v1",
|
|
5791
5791
|
"for_v1",
|
|
5792
5792
|
"while_until_v1"
|
|
5793
|
-
]),
|
|
5793
|
+
]), hs = {
|
|
5794
5794
|
getSurroundLoop: function() {
|
|
5795
5795
|
let t = this;
|
|
5796
5796
|
do {
|
|
5797
|
-
if (
|
|
5797
|
+
if (ps.has(t.type))
|
|
5798
5798
|
return t;
|
|
5799
5799
|
t = t == null ? void 0 : t.getSurroundParent();
|
|
5800
5800
|
} while (t);
|
|
@@ -5815,9 +5815,9 @@ const gs = /* @__PURE__ */ new Set([
|
|
|
5815
5815
|
}
|
|
5816
5816
|
}
|
|
5817
5817
|
};
|
|
5818
|
-
|
|
5818
|
+
R.registerMixin(
|
|
5819
5819
|
"flow_control_in_loop_check_v1",
|
|
5820
|
-
|
|
5820
|
+
hs
|
|
5821
5821
|
);
|
|
5822
5822
|
f([
|
|
5823
5823
|
{
|
|
@@ -5866,9 +5866,9 @@ a.forBlock.flow_control_v1 = function(t) {
|
|
|
5866
5866
|
throw "unknown mode";
|
|
5867
5867
|
}
|
|
5868
5868
|
};
|
|
5869
|
-
|
|
5869
|
+
R.register(
|
|
5870
5870
|
"for_tooltip_v1",
|
|
5871
|
-
|
|
5871
|
+
R.buildTooltipWithFieldText(
|
|
5872
5872
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
5873
5873
|
"VAR"
|
|
5874
5874
|
)
|
|
@@ -5958,9 +5958,9 @@ ${c}}
|
|
|
5958
5958
|
`, u;
|
|
5959
5959
|
}
|
|
5960
5960
|
};
|
|
5961
|
-
|
|
5961
|
+
R.register(
|
|
5962
5962
|
"for_each_tooltip_v1",
|
|
5963
|
-
|
|
5963
|
+
R.buildTooltipWithFieldText(
|
|
5964
5964
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
5965
5965
|
"VAR"
|
|
5966
5966
|
)
|
|
@@ -6063,9 +6063,9 @@ a.forBlock.repeat_v1 = function(t) {
|
|
|
6063
6063
|
${n}}
|
|
6064
6064
|
`, o;
|
|
6065
6065
|
};
|
|
6066
|
-
|
|
6066
|
+
R.register(
|
|
6067
6067
|
"while_until_tooltip_v1",
|
|
6068
|
-
|
|
6068
|
+
R.buildTooltipForDropdown("MODE", {
|
|
6069
6069
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
6070
6070
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
6071
6071
|
})
|
|
@@ -6119,7 +6119,7 @@ a.forBlock.while_until_v1 = function(t) {
|
|
|
6119
6119
|
${o}}
|
|
6120
6120
|
`;
|
|
6121
6121
|
};
|
|
6122
|
-
const
|
|
6122
|
+
const ds = {
|
|
6123
6123
|
// math_arithmetic
|
|
6124
6124
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6125
6125
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6151,9 +6151,9 @@ const Is = {
|
|
|
6151
6151
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
6152
6152
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
6153
6153
|
};
|
|
6154
|
-
|
|
6154
|
+
R.register(
|
|
6155
6155
|
"math_op_tooltip_v1",
|
|
6156
|
-
|
|
6156
|
+
R.buildTooltipForDropdown("OP", ds)
|
|
6157
6157
|
);
|
|
6158
6158
|
f([
|
|
6159
6159
|
{
|
|
@@ -6756,21 +6756,21 @@ a.forBlock.math_trig_v1 = function(t) {
|
|
|
6756
6756
|
}
|
|
6757
6757
|
return [o, l.DIVISION];
|
|
6758
6758
|
};
|
|
6759
|
-
const
|
|
6759
|
+
const fs = E.xml, ms = {
|
|
6760
6760
|
init: function() {
|
|
6761
6761
|
this.appendDummyInput().appendField(
|
|
6762
6762
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
6763
6763
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6764
6764
|
}
|
|
6765
6765
|
};
|
|
6766
|
-
m.object_create_container_v1 =
|
|
6767
|
-
const
|
|
6766
|
+
m.object_create_container_v1 = ms;
|
|
6767
|
+
const Ts = {
|
|
6768
6768
|
init: function() {
|
|
6769
6769
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6770
6770
|
}
|
|
6771
6771
|
};
|
|
6772
|
-
m.object_create_item_v1 =
|
|
6773
|
-
const
|
|
6772
|
+
m.object_create_item_v1 = Ts;
|
|
6773
|
+
const Es = {
|
|
6774
6774
|
init: function() {
|
|
6775
6775
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
6776
6776
|
new Ee.MutatorIcon(
|
|
@@ -6780,7 +6780,7 @@ const ys = {
|
|
|
6780
6780
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
6781
6781
|
},
|
|
6782
6782
|
mutationToDom: function() {
|
|
6783
|
-
const t =
|
|
6783
|
+
const t = fs.createElement("mutation");
|
|
6784
6784
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
6785
6785
|
},
|
|
6786
6786
|
domToMutation: function(t) {
|
|
@@ -6846,7 +6846,7 @@ const ys = {
|
|
|
6846
6846
|
this.removeInput("ADD" + t);
|
|
6847
6847
|
}
|
|
6848
6848
|
};
|
|
6849
|
-
m.object_create_v1 =
|
|
6849
|
+
m.object_create_v1 = Es;
|
|
6850
6850
|
a.forBlock.object_create_v1 = function(t) {
|
|
6851
6851
|
const e = t;
|
|
6852
6852
|
let n = "{";
|
|
@@ -7104,13 +7104,13 @@ f([
|
|
|
7104
7104
|
a.forBlock.object_to_json_v1 = function(t) {
|
|
7105
7105
|
return [`__jsonStringifyV1__(${a.valueToCode(t, "OBJECT", l.NONE) || "null"})`, l.FUNCTION_CALL];
|
|
7106
7106
|
};
|
|
7107
|
-
const Tn = E.xml,
|
|
7107
|
+
const Tn = E.xml, gs = {
|
|
7108
7108
|
init: function() {
|
|
7109
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7109
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new To(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7110
7110
|
}
|
|
7111
7111
|
};
|
|
7112
|
-
m.procedure_def_container_v1 =
|
|
7113
|
-
const
|
|
7112
|
+
m.procedure_def_container_v1 = gs;
|
|
7113
|
+
const As = {
|
|
7114
7114
|
init: function() {
|
|
7115
7115
|
const t = new he(wt.DEFAULT_ARG);
|
|
7116
7116
|
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;
|
|
@@ -7132,8 +7132,8 @@ const Ns = {
|
|
|
7132
7132
|
return t;
|
|
7133
7133
|
}
|
|
7134
7134
|
};
|
|
7135
|
-
m.procedure_def_item_v1 =
|
|
7136
|
-
const
|
|
7135
|
+
m.procedure_def_item_v1 = As;
|
|
7136
|
+
const Is = {
|
|
7137
7137
|
init: function() {
|
|
7138
7138
|
this.withReturn = !1, this.args = [];
|
|
7139
7139
|
const t = new he(
|
|
@@ -7238,13 +7238,13 @@ const Ls = {
|
|
|
7238
7238
|
}
|
|
7239
7239
|
}
|
|
7240
7240
|
};
|
|
7241
|
-
m.procedure_def_v1 =
|
|
7242
|
-
const
|
|
7241
|
+
m.procedure_def_v1 = Is;
|
|
7242
|
+
const Os = E.xml, Cs = {
|
|
7243
7243
|
init: function() {
|
|
7244
7244
|
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}");
|
|
7245
7245
|
},
|
|
7246
7246
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7247
|
+
const t = Os.createElement("mutation");
|
|
7248
7248
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7249
7249
|
},
|
|
7250
7250
|
domToMutation: function(t) {
|
|
@@ -7264,7 +7264,7 @@ const Ss = E.xml, bs = {
|
|
|
7264
7264
|
},
|
|
7265
7265
|
onchange: function(t) {
|
|
7266
7266
|
var e;
|
|
7267
|
-
if (t.type ===
|
|
7267
|
+
if (t.type === L.STATE_CHANGE)
|
|
7268
7268
|
this.checkWarning_();
|
|
7269
7269
|
else if (t.type === I.BLOCK_DRAG) {
|
|
7270
7270
|
const n = t;
|
|
@@ -7297,14 +7297,14 @@ const Ss = E.xml, bs = {
|
|
|
7297
7297
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7298
7298
|
}
|
|
7299
7299
|
};
|
|
7300
|
-
m.procedure_return_v1 =
|
|
7300
|
+
m.procedure_return_v1 = Cs;
|
|
7301
7301
|
a.forBlock.procedure_return_v1 = function(t) {
|
|
7302
7302
|
const e = t;
|
|
7303
7303
|
return e.withReturn ? `return ${a.valueToCode(e, "VALUE", l.NONE) || "null"};
|
|
7304
7304
|
` : `return;
|
|
7305
7305
|
`;
|
|
7306
7306
|
};
|
|
7307
|
-
const
|
|
7307
|
+
const ks = {
|
|
7308
7308
|
init: function() {
|
|
7309
7309
|
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}");
|
|
7310
7310
|
},
|
|
@@ -7327,7 +7327,7 @@ const Bs = {
|
|
|
7327
7327
|
]);
|
|
7328
7328
|
}
|
|
7329
7329
|
};
|
|
7330
|
-
m.download_resource_v1 =
|
|
7330
|
+
m.download_resource_v1 = ks;
|
|
7331
7331
|
a.forBlock.download_resource_v1 = function(t) {
|
|
7332
7332
|
const e = a.valueToCode(t, "ASSET", l.ATOMIC) || null, n = a.statementToCode(t, "HANDLE");
|
|
7333
7333
|
return `{
|
|
@@ -7339,7 +7339,7 @@ ${n}
|
|
|
7339
7339
|
}
|
|
7340
7340
|
`;
|
|
7341
7341
|
};
|
|
7342
|
-
function
|
|
7342
|
+
function Kn(t) {
|
|
7343
7343
|
const e = g.resource.spaces.find((i) => i.id === t);
|
|
7344
7344
|
if (!e)
|
|
7345
7345
|
return [];
|
|
@@ -7355,13 +7355,13 @@ function $n(t) {
|
|
|
7355
7355
|
}
|
|
7356
7356
|
return o(e.dirTree, ""), n;
|
|
7357
7357
|
}
|
|
7358
|
-
function
|
|
7358
|
+
function ys(t) {
|
|
7359
7359
|
const e = [];
|
|
7360
|
-
return
|
|
7360
|
+
return Kn(t).forEach(({ id: o, name: i }) => {
|
|
7361
7361
|
e.push([i, o]);
|
|
7362
7362
|
}), N(e);
|
|
7363
7363
|
}
|
|
7364
|
-
function
|
|
7364
|
+
function $n(t, e) {
|
|
7365
7365
|
const n = g.resource.spaces.find((i) => i.id === t);
|
|
7366
7366
|
if (!n)
|
|
7367
7367
|
return [];
|
|
@@ -7370,25 +7370,25 @@ function Hn(t, e) {
|
|
|
7370
7370
|
i.dirid === e && o.push(i);
|
|
7371
7371
|
}), o;
|
|
7372
7372
|
}
|
|
7373
|
-
function
|
|
7373
|
+
function vs(t, e) {
|
|
7374
7374
|
const n = [];
|
|
7375
|
-
return
|
|
7375
|
+
return $n(t, e).forEach(({ id: i, name: s }) => {
|
|
7376
7376
|
n.push([s, i]);
|
|
7377
7377
|
}), N(n);
|
|
7378
7378
|
}
|
|
7379
|
-
function
|
|
7379
|
+
function Hn() {
|
|
7380
7380
|
const t = [];
|
|
7381
7381
|
return g.resource.spaces.forEach((e) => {
|
|
7382
7382
|
e.resources.length > 0 && t.push(e);
|
|
7383
7383
|
}), t;
|
|
7384
7384
|
}
|
|
7385
|
-
function
|
|
7385
|
+
function Ns() {
|
|
7386
7386
|
const t = [];
|
|
7387
|
-
return
|
|
7387
|
+
return Hn().forEach(({ id: n, name: o }) => {
|
|
7388
7388
|
t.push([o, n]);
|
|
7389
7389
|
}), N(t);
|
|
7390
7390
|
}
|
|
7391
|
-
const
|
|
7391
|
+
const Ls = {
|
|
7392
7392
|
init: function() {
|
|
7393
7393
|
this.space = {
|
|
7394
7394
|
id: "",
|
|
@@ -7408,19 +7408,19 @@ const Ms = {
|
|
|
7408
7408
|
var c, u, r;
|
|
7409
7409
|
if (this.space.id)
|
|
7410
7410
|
return;
|
|
7411
|
-
const t = (c =
|
|
7411
|
+
const t = (c = Hn()) == null ? void 0 : c[0];
|
|
7412
7412
|
if (!t)
|
|
7413
7413
|
return;
|
|
7414
7414
|
this.space.id = t.id, this.space.name = t.name;
|
|
7415
7415
|
const e = this.getField("SPACE");
|
|
7416
7416
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7417
|
-
const n = (u =
|
|
7417
|
+
const n = (u = Kn(this.space.id)) == null ? void 0 : u[0];
|
|
7418
7418
|
if (!n)
|
|
7419
7419
|
return;
|
|
7420
7420
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7421
7421
|
const o = this.getField("DIR");
|
|
7422
7422
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7423
|
-
const i = (r =
|
|
7423
|
+
const i = (r = $n(this.space.id, this.dir.id)) == null ? void 0 : r[0];
|
|
7424
7424
|
if (!i)
|
|
7425
7425
|
return;
|
|
7426
7426
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7438,20 +7438,20 @@ const Ms = {
|
|
|
7438
7438
|
this.space = Pe(t.space), this.dir = Pe(t.dir), this.resource = Pe(t.resource);
|
|
7439
7439
|
},
|
|
7440
7440
|
genSpaceOpts_: function() {
|
|
7441
|
-
return
|
|
7441
|
+
return Ns();
|
|
7442
7442
|
},
|
|
7443
7443
|
genDirOpts_: function() {
|
|
7444
|
-
return
|
|
7444
|
+
return ys(this.space.id);
|
|
7445
7445
|
},
|
|
7446
7446
|
genResourceOpts_: function() {
|
|
7447
|
-
return
|
|
7447
|
+
return vs(this.space.id, this.dir.id);
|
|
7448
7448
|
}
|
|
7449
7449
|
};
|
|
7450
|
-
m.select_resource_v1 =
|
|
7450
|
+
m.select_resource_v1 = Ls;
|
|
7451
7451
|
a.forBlock.select_resource_v1 = function() {
|
|
7452
7452
|
return "";
|
|
7453
7453
|
};
|
|
7454
|
-
const
|
|
7454
|
+
const Ss = {
|
|
7455
7455
|
init: function() {
|
|
7456
7456
|
this.appendDummyInput().appendField(
|
|
7457
7457
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7472,7 +7472,7 @@ const Vs = {
|
|
|
7472
7472
|
var e, n;
|
|
7473
7473
|
if (this.isInsertionMarker())
|
|
7474
7474
|
return;
|
|
7475
|
-
const t =
|
|
7475
|
+
const t = S({ type: "string", default: "" });
|
|
7476
7476
|
(n = (e = this.getInput("NAME")) == null ? void 0 : e.connection) == null || n.setShadowDom(t);
|
|
7477
7477
|
},
|
|
7478
7478
|
ensureBlocks_: function() {
|
|
@@ -7483,7 +7483,7 @@ const Vs = {
|
|
|
7483
7483
|
]);
|
|
7484
7484
|
}
|
|
7485
7485
|
};
|
|
7486
|
-
m.upload_resource_v1 =
|
|
7486
|
+
m.upload_resource_v1 = Ss;
|
|
7487
7487
|
a.forBlock.upload_resource_v1 = function(t) {
|
|
7488
7488
|
const e = a.valueToCode(t, "NAME", l.ATOMIC) || "''", n = a.valueToCode(t, "DIR", l.ATOMIC) || "null", o = a.valueToCode(t, "DATA", l.ATOMIC) || "null", i = a.statementToCode(t, "HANDLE");
|
|
7489
7489
|
return `{
|
|
@@ -7516,13 +7516,13 @@ f([
|
|
|
7516
7516
|
a.forBlock.text_v1 = function(t) {
|
|
7517
7517
|
return [a.quote_(t.getFieldValue("TEXT")), l.ATOMIC];
|
|
7518
7518
|
};
|
|
7519
|
-
const
|
|
7519
|
+
const bs = /^\s*'([^']|\\')*'\s*$/;
|
|
7520
7520
|
function tt(t) {
|
|
7521
|
-
return
|
|
7521
|
+
return bs.test(t) ? [t, l.ATOMIC] : [`String(${t})`, l.FUNCTION_CALL];
|
|
7522
7522
|
}
|
|
7523
|
-
|
|
7523
|
+
R.register(
|
|
7524
7524
|
"text_append_tooltip_v1",
|
|
7525
|
-
|
|
7525
|
+
R.buildTooltipWithFieldText(
|
|
7526
7526
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
7527
7527
|
"VAR"
|
|
7528
7528
|
)
|
|
@@ -7723,10 +7723,10 @@ f([
|
|
|
7723
7723
|
a.forBlock.text_is_empty_v1 = function(t) {
|
|
7724
7724
|
return [`!${a.valueToCode(t, "VALUE", l.MEMBER) || "''"}.length`, l.LOGICAL_NOT];
|
|
7725
7725
|
};
|
|
7726
|
-
const
|
|
7726
|
+
const Bs = E.xml, Rs = {
|
|
7727
7727
|
itemCount_: 0,
|
|
7728
7728
|
mutationToDom: function() {
|
|
7729
|
-
const t =
|
|
7729
|
+
const t = Bs.createElement("mutation");
|
|
7730
7730
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
7731
7731
|
},
|
|
7732
7732
|
domToMutation: function(t) {
|
|
@@ -7798,13 +7798,13 @@ const xs = E.xml, Ys = {
|
|
|
7798
7798
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7799
7799
|
this.removeInput("ADD" + t);
|
|
7800
7800
|
}
|
|
7801
|
-
},
|
|
7801
|
+
}, Ds = function() {
|
|
7802
7802
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Ee.MutatorIcon(["text_join_item_v1"], this));
|
|
7803
7803
|
};
|
|
7804
|
-
|
|
7804
|
+
R.registerMutator(
|
|
7805
7805
|
"text_join_mutator_v1",
|
|
7806
|
-
|
|
7807
|
-
|
|
7806
|
+
Rs,
|
|
7807
|
+
Ds
|
|
7808
7808
|
);
|
|
7809
7809
|
f([
|
|
7810
7810
|
{
|
|
@@ -8036,7 +8036,7 @@ a.forBlock.text_trim_v1 = function(t) {
|
|
|
8036
8036
|
}[t.getFieldValue("MODE")];
|
|
8037
8037
|
return [`__trimV1__(${e}, ${o})`, l.ATOMIC];
|
|
8038
8038
|
};
|
|
8039
|
-
const
|
|
8039
|
+
const Us = {
|
|
8040
8040
|
init: function() {
|
|
8041
8041
|
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}");
|
|
8042
8042
|
},
|
|
@@ -8052,17 +8052,17 @@ const Fs = {
|
|
|
8052
8052
|
updateShadow_: function() {
|
|
8053
8053
|
var t, e, n, o, i, s, c, u;
|
|
8054
8054
|
this.isInsertionMarker() || ((e = (t = this.getInput("INTERVAL")) == null ? void 0 : t.connection) == null || e.setShadowDom(
|
|
8055
|
-
|
|
8055
|
+
S({ type: "number", default: 1e3 })
|
|
8056
8056
|
), (o = (n = this.getInput("LOOP")) == null ? void 0 : n.connection) == null || o.setShadowDom(
|
|
8057
|
-
|
|
8057
|
+
S({ type: "boolean", default: !1 })
|
|
8058
8058
|
), (s = (i = this.getInput("COUNT")) == null ? void 0 : i.connection) == null || s.setShadowDom(
|
|
8059
|
-
|
|
8059
|
+
S({ type: "number", default: 1 })
|
|
8060
8060
|
), (u = (c = this.getInput("IMMEDIATE")) == null ? void 0 : c.connection) == null || u.setShadowDom(
|
|
8061
|
-
|
|
8061
|
+
S({ type: "boolean", default: !1 })
|
|
8062
8062
|
));
|
|
8063
8063
|
}
|
|
8064
8064
|
};
|
|
8065
|
-
m.create_timer_v1 =
|
|
8065
|
+
m.create_timer_v1 = Us;
|
|
8066
8066
|
a.forBlock.create_timer_v1 = function(t) {
|
|
8067
8067
|
const e = a.valueToCode(t, "INTERVAL", l.ATOMIC) || "1000", n = a.valueToCode(t, "LOOP", l.ATOMIC) || "false", o = a.valueToCode(t, "COUNT", l.ATOMIC) || "1", i = a.valueToCode(t, "IMMEDIATE", l.ATOMIC) || "false", s = a.statementToCode(t, "CALLBACK");
|
|
8068
8068
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8091,18 +8091,18 @@ a.forBlock.delay_v1 = function(t) {
|
|
|
8091
8091
|
return `__delayV1__(${a.valueToCode(t, "DURATION", l.ATOMIC) || "0"});
|
|
8092
8092
|
`;
|
|
8093
8093
|
};
|
|
8094
|
-
const
|
|
8094
|
+
const Ms = {
|
|
8095
8095
|
customContextMenu: function(t) {
|
|
8096
8096
|
if (this.isInFlyout) {
|
|
8097
8097
|
if (this.type === "variable_get_v1") {
|
|
8098
8098
|
const e = {
|
|
8099
8099
|
text: p.RENAME_VARIABLE,
|
|
8100
8100
|
enabled: !0,
|
|
8101
|
-
callback:
|
|
8101
|
+
callback: Vs(this)
|
|
8102
8102
|
}, n = this.getField("VAR").getText(), o = {
|
|
8103
8103
|
text: p.DELETE_VARIABLE.replace("%1", n),
|
|
8104
8104
|
enabled: !0,
|
|
8105
|
-
callback:
|
|
8105
|
+
callback: Ps(this)
|
|
8106
8106
|
};
|
|
8107
8107
|
t.unshift(e), t.unshift(o);
|
|
8108
8108
|
}
|
|
@@ -8120,20 +8120,20 @@ const Ks = {
|
|
|
8120
8120
|
});
|
|
8121
8121
|
}
|
|
8122
8122
|
}
|
|
8123
|
-
},
|
|
8123
|
+
}, Vs = function(t) {
|
|
8124
8124
|
return function() {
|
|
8125
8125
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8126
8126
|
Oe.renameVariable(e, o);
|
|
8127
8127
|
};
|
|
8128
|
-
},
|
|
8128
|
+
}, Ps = function(t) {
|
|
8129
8129
|
return function() {
|
|
8130
8130
|
const n = t.getField("VAR").getVariable();
|
|
8131
8131
|
n && Oe.deleteVariable(n.getWorkspace(), n, t);
|
|
8132
8132
|
};
|
|
8133
8133
|
};
|
|
8134
|
-
|
|
8134
|
+
R.registerMixin(
|
|
8135
8135
|
"context_menu_variable_v1",
|
|
8136
|
-
|
|
8136
|
+
Ms
|
|
8137
8137
|
);
|
|
8138
8138
|
f([
|
|
8139
8139
|
{
|
|
@@ -8190,7 +8190,7 @@ a.forBlock.variable_set_v1 = function(t) {
|
|
|
8190
8190
|
`;
|
|
8191
8191
|
};
|
|
8192
8192
|
const ze = E.xml;
|
|
8193
|
-
function
|
|
8193
|
+
function xs() {
|
|
8194
8194
|
const t = [];
|
|
8195
8195
|
{
|
|
8196
8196
|
const e = ze.createElement("label");
|
|
@@ -8212,107 +8212,107 @@ function Gs() {
|
|
|
8212
8212
|
}
|
|
8213
8213
|
const at = {
|
|
8214
8214
|
name: "INTERFACE_CATEGORY",
|
|
8215
|
-
callback:
|
|
8216
|
-
},
|
|
8217
|
-
function
|
|
8215
|
+
callback: xs
|
|
8216
|
+
}, b = E.xml;
|
|
8217
|
+
function Ys() {
|
|
8218
8218
|
const t = [];
|
|
8219
|
-
if (
|
|
8219
|
+
if (Jo()) {
|
|
8220
8220
|
{
|
|
8221
|
-
const e =
|
|
8221
|
+
const e = b.createElement("label");
|
|
8222
8222
|
e.setAttribute("text", p.LABEL_PAGE), t.push(e);
|
|
8223
8223
|
}
|
|
8224
|
-
if (
|
|
8225
|
-
const e =
|
|
8224
|
+
if (Pn().length > 0) {
|
|
8225
|
+
const e = b.createElement("block");
|
|
8226
8226
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8227
8227
|
}
|
|
8228
8228
|
}
|
|
8229
|
-
if (
|
|
8229
|
+
if (wo()) {
|
|
8230
8230
|
{
|
|
8231
|
-
const e =
|
|
8231
|
+
const e = b.createElement("label");
|
|
8232
8232
|
e.setAttribute("text", p.LABEL_COMP), t.push(e);
|
|
8233
8233
|
}
|
|
8234
8234
|
if ($e().length > 0) {
|
|
8235
8235
|
{
|
|
8236
|
-
const e =
|
|
8236
|
+
const e = b.createElement("block");
|
|
8237
8237
|
e.setAttribute("type", "comp_method_impl_v1"), t.push(e);
|
|
8238
8238
|
}
|
|
8239
8239
|
{
|
|
8240
|
-
const e =
|
|
8240
|
+
const e = b.createElement("block");
|
|
8241
8241
|
e.setAttribute("type", "set_comp_method_output_v1"), t.push(e);
|
|
8242
8242
|
}
|
|
8243
8243
|
}
|
|
8244
8244
|
if ($e().length > 0) {
|
|
8245
|
-
const e =
|
|
8245
|
+
const e = b.createElement("block");
|
|
8246
8246
|
e.setAttribute("type", "trigger_comp_event_v1"), t.push(e);
|
|
8247
8247
|
}
|
|
8248
8248
|
}
|
|
8249
8249
|
{
|
|
8250
|
-
const e =
|
|
8250
|
+
const e = b.createElement("label");
|
|
8251
8251
|
e.setAttribute("text", p.LABEL_EVENT), t.push(e);
|
|
8252
8252
|
}
|
|
8253
8253
|
{
|
|
8254
|
-
const e =
|
|
8254
|
+
const e = b.createElement("block");
|
|
8255
8255
|
e.setAttribute("type", "on_node_event_v1"), t.push(e);
|
|
8256
8256
|
}
|
|
8257
8257
|
{
|
|
8258
|
-
const e =
|
|
8258
|
+
const e = b.createElement("block");
|
|
8259
8259
|
e.setAttribute("type", "on_node_event_as_v1"), t.push(e);
|
|
8260
8260
|
}
|
|
8261
8261
|
{
|
|
8262
|
-
const e =
|
|
8262
|
+
const e = b.createElement("label");
|
|
8263
8263
|
e.setAttribute("text", p.LABEL_METHOD), t.push(e);
|
|
8264
8264
|
}
|
|
8265
8265
|
{
|
|
8266
|
-
const e =
|
|
8266
|
+
const e = b.createElement("block");
|
|
8267
8267
|
e.setAttribute("type", "call_node_method_v1"), t.push(e);
|
|
8268
8268
|
}
|
|
8269
8269
|
{
|
|
8270
|
-
const e =
|
|
8270
|
+
const e = b.createElement("block");
|
|
8271
8271
|
e.setAttribute("type", "call_node_method_as_v1"), t.push(e);
|
|
8272
8272
|
}
|
|
8273
8273
|
{
|
|
8274
|
-
const e =
|
|
8274
|
+
const e = b.createElement("label");
|
|
8275
8275
|
e.setAttribute("text", p.LABEL_PROPERTY), t.push(e);
|
|
8276
8276
|
}
|
|
8277
8277
|
{
|
|
8278
|
-
const e =
|
|
8278
|
+
const e = b.createElement("block");
|
|
8279
8279
|
e.setAttribute("type", "get_node_prop_v1"), t.push(e);
|
|
8280
8280
|
}
|
|
8281
8281
|
{
|
|
8282
|
-
const e =
|
|
8282
|
+
const e = b.createElement("block");
|
|
8283
8283
|
e.setAttribute("type", "get_node_prop_as_v1"), t.push(e);
|
|
8284
8284
|
}
|
|
8285
8285
|
{
|
|
8286
|
-
const e =
|
|
8286
|
+
const e = b.createElement("block");
|
|
8287
8287
|
e.setAttribute("type", "set_node_prop_v1"), t.push(e);
|
|
8288
8288
|
}
|
|
8289
8289
|
{
|
|
8290
|
-
const e =
|
|
8290
|
+
const e = b.createElement("block");
|
|
8291
8291
|
e.setAttribute("type", "set_node_prop_as_v1"), t.push(e);
|
|
8292
8292
|
}
|
|
8293
8293
|
{
|
|
8294
|
-
const e =
|
|
8294
|
+
const e = b.createElement("label");
|
|
8295
8295
|
e.setAttribute("text", p.LABEL_OTHER), t.push(e);
|
|
8296
8296
|
}
|
|
8297
8297
|
{
|
|
8298
|
-
const e =
|
|
8298
|
+
const e = b.createElement("block");
|
|
8299
8299
|
e.setAttribute("type", "get_node_v1"), t.push(e);
|
|
8300
8300
|
}
|
|
8301
8301
|
{
|
|
8302
|
-
const e =
|
|
8302
|
+
const e = b.createElement("block");
|
|
8303
8303
|
e.setAttribute("type", "app_env_v1"), t.push(e);
|
|
8304
8304
|
}
|
|
8305
8305
|
if (zt().length > 0) {
|
|
8306
|
-
const e =
|
|
8306
|
+
const e = b.createElement("block");
|
|
8307
8307
|
e.setAttribute("type", "navigate_to_v1"), t.push(e);
|
|
8308
8308
|
}
|
|
8309
8309
|
return t;
|
|
8310
8310
|
}
|
|
8311
8311
|
const ct = {
|
|
8312
8312
|
name: "UI_CATEGORY",
|
|
8313
|
-
callback:
|
|
8313
|
+
callback: Ys
|
|
8314
8314
|
}, De = E.xml;
|
|
8315
|
-
function
|
|
8315
|
+
function ws() {
|
|
8316
8316
|
const t = [];
|
|
8317
8317
|
{
|
|
8318
8318
|
const e = De.createElement("label");
|
|
@@ -8339,9 +8339,9 @@ function js() {
|
|
|
8339
8339
|
}
|
|
8340
8340
|
const re = {
|
|
8341
8341
|
name: "PROCEDURE_CATEGORY",
|
|
8342
|
-
callback:
|
|
8342
|
+
callback: ws
|
|
8343
8343
|
}, Qe = E.xml;
|
|
8344
|
-
function
|
|
8344
|
+
function Fs() {
|
|
8345
8345
|
const t = Ge(), e = [];
|
|
8346
8346
|
{
|
|
8347
8347
|
const o = Qe.createElement("label");
|
|
@@ -8379,9 +8379,9 @@ function Xs() {
|
|
|
8379
8379
|
}
|
|
8380
8380
|
const _e = {
|
|
8381
8381
|
name: "VARIABLE_CATEGORY",
|
|
8382
|
-
callback:
|
|
8382
|
+
callback: Fs
|
|
8383
8383
|
}, Ae = E.xml;
|
|
8384
|
-
function
|
|
8384
|
+
function Ks(t) {
|
|
8385
8385
|
const e = [];
|
|
8386
8386
|
if (t === "flow") {
|
|
8387
8387
|
{
|
|
@@ -8418,9 +8418,9 @@ function Js(t) {
|
|
|
8418
8418
|
}
|
|
8419
8419
|
const lt = {
|
|
8420
8420
|
name: "FLOW_CATEGORY",
|
|
8421
|
-
callback:
|
|
8421
|
+
callback: Ks
|
|
8422
8422
|
}, ie = E.xml;
|
|
8423
|
-
function
|
|
8423
|
+
function $s(t) {
|
|
8424
8424
|
const { activeFunc: e } = g.compute, n = [];
|
|
8425
8425
|
if (t === "func") {
|
|
8426
8426
|
{
|
|
@@ -8469,9 +8469,9 @@ function qs(t) {
|
|
|
8469
8469
|
}
|
|
8470
8470
|
const ut = {
|
|
8471
8471
|
name: "FUNC_CATEGORY",
|
|
8472
|
-
callback:
|
|
8472
|
+
callback: $s
|
|
8473
8473
|
}, C = E.xml;
|
|
8474
|
-
function
|
|
8474
|
+
function Hs() {
|
|
8475
8475
|
const t = [];
|
|
8476
8476
|
if (z().length > 0) {
|
|
8477
8477
|
{
|
|
@@ -8646,23 +8646,23 @@ function zs() {
|
|
|
8646
8646
|
}
|
|
8647
8647
|
const rt = {
|
|
8648
8648
|
name: "DATA_CATEGORY",
|
|
8649
|
-
callback:
|
|
8649
|
+
callback: Hs
|
|
8650
8650
|
};
|
|
8651
8651
|
kn.setConfirm(async (t, e) => {
|
|
8652
|
-
const n = await
|
|
8652
|
+
const n = await Lo({
|
|
8653
8653
|
title: "",
|
|
8654
8654
|
text: t
|
|
8655
8655
|
});
|
|
8656
8656
|
e(!!n);
|
|
8657
8657
|
});
|
|
8658
8658
|
kn.setPrompt(async (t, e, n) => {
|
|
8659
|
-
const o = await
|
|
8659
|
+
const o = await So({
|
|
8660
8660
|
title: "",
|
|
8661
8661
|
value: e
|
|
8662
8662
|
});
|
|
8663
8663
|
n(String(o));
|
|
8664
8664
|
});
|
|
8665
|
-
const
|
|
8665
|
+
const Gn = (t, e, n) => {
|
|
8666
8666
|
const o = t[e];
|
|
8667
8667
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, s) => {
|
|
8668
8668
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -8676,8 +8676,8 @@ const Wn = (t, e, n) => {
|
|
|
8676
8676
|
});
|
|
8677
8677
|
};
|
|
8678
8678
|
async function En(t) {
|
|
8679
|
-
const e = await
|
|
8680
|
-
|
|
8679
|
+
const e = await Gn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.fj04iwzg.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.os4ap6q2.js") }), `./msg/${t}.ts`, 3);
|
|
8680
|
+
Eo(e.default);
|
|
8681
8681
|
}
|
|
8682
8682
|
function Qt(t) {
|
|
8683
8683
|
const e = Ge();
|
|
@@ -8692,7 +8692,7 @@ function Qt(t) {
|
|
|
8692
8692
|
const i = o.getRelativeToSurfaceXY(), s = i.x * e.scale, c = i.y * e.scale;
|
|
8693
8693
|
e.scroll(-s, -c);
|
|
8694
8694
|
}
|
|
8695
|
-
function
|
|
8695
|
+
function Wn() {
|
|
8696
8696
|
var n;
|
|
8697
8697
|
const t = Ge();
|
|
8698
8698
|
if (!t)
|
|
@@ -8700,7 +8700,7 @@ function jn() {
|
|
|
8700
8700
|
const e = (n = t.getTopBlocks(!0)) == null ? void 0 : n[0];
|
|
8701
8701
|
e && Qt(e.id);
|
|
8702
8702
|
}
|
|
8703
|
-
class
|
|
8703
|
+
class Gs {
|
|
8704
8704
|
init({ contextMenu: e = !0, shortcut: n = !0 } = {
|
|
8705
8705
|
contextMenu: !0,
|
|
8706
8706
|
shortcut: !0
|
|
@@ -8815,7 +8815,7 @@ class Qs {
|
|
|
8815
8815
|
if (!u || !qe(u) || !u.isDeletable() || !Re(u))
|
|
8816
8816
|
return !1;
|
|
8817
8817
|
const r = u.toCopyData();
|
|
8818
|
-
return r ? (localStorage.setItem("blocklyStash", JSON.stringify(r)), u instanceof
|
|
8818
|
+
return r ? (localStorage.setItem("blocklyStash", JSON.stringify(r)), u instanceof go ? u.checkAndDelete() : u.dispose(), !0) : !1;
|
|
8819
8819
|
},
|
|
8820
8820
|
keyCodes: [e, n, o]
|
|
8821
8821
|
};
|
|
@@ -8855,24 +8855,24 @@ class Qs {
|
|
|
8855
8855
|
K.registry.register(i);
|
|
8856
8856
|
}
|
|
8857
8857
|
}
|
|
8858
|
-
function
|
|
8858
|
+
function jn(t) {
|
|
8859
8859
|
const e = t.getParent();
|
|
8860
|
-
return e &&
|
|
8860
|
+
return e && jn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
8861
8861
|
}
|
|
8862
|
-
class
|
|
8862
|
+
class Ws {
|
|
8863
8863
|
init() {
|
|
8864
8864
|
const e = Ue.registry.getItem("blockDisable");
|
|
8865
8865
|
e && (e.preconditionFn = function(n) {
|
|
8866
8866
|
const o = n.block;
|
|
8867
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
8867
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || jn(o) ? "disabled" : "enabled" : "hidden";
|
|
8868
8868
|
});
|
|
8869
8869
|
}
|
|
8870
8870
|
}
|
|
8871
8871
|
K.registry.unregister(et.names.ESCAPE);
|
|
8872
|
-
const
|
|
8873
|
-
|
|
8874
|
-
const
|
|
8875
|
-
|
|
8872
|
+
const js = new Gs();
|
|
8873
|
+
js.init({ contextMenu: !0, shortcut: !0 });
|
|
8874
|
+
const Xs = new Ws();
|
|
8875
|
+
Xs.init();
|
|
8876
8876
|
pt.Classic.blockStyles = {
|
|
8877
8877
|
color_blocks: {
|
|
8878
8878
|
colourPrimary: "#a5745b",
|
|
@@ -9003,7 +9003,7 @@ pt.Classic.categoryStyles = {
|
|
|
9003
9003
|
colour: "#a55b80"
|
|
9004
9004
|
}
|
|
9005
9005
|
};
|
|
9006
|
-
const
|
|
9006
|
+
const Js = yn.defineTheme("light", {
|
|
9007
9007
|
name: "light",
|
|
9008
9008
|
base: pt.Classic,
|
|
9009
9009
|
componentStyles: {
|
|
@@ -9019,7 +9019,7 @@ const na = yn.defineTheme("light", {
|
|
|
9019
9019
|
scrollbarOpacity: 0.4,
|
|
9020
9020
|
cursorColour: ""
|
|
9021
9021
|
}
|
|
9022
|
-
}),
|
|
9022
|
+
}), qs = yn.defineTheme("dark", {
|
|
9023
9023
|
name: "dark",
|
|
9024
9024
|
base: pt.Classic,
|
|
9025
9025
|
componentStyles: {
|
|
@@ -9036,14 +9036,14 @@ const na = yn.defineTheme("light", {
|
|
|
9036
9036
|
cursorColour: ""
|
|
9037
9037
|
}
|
|
9038
9038
|
});
|
|
9039
|
-
function
|
|
9039
|
+
function zs(t) {
|
|
9040
9040
|
const e = Ge();
|
|
9041
9041
|
switch (t) {
|
|
9042
9042
|
case "light":
|
|
9043
|
-
e.setTheme(
|
|
9043
|
+
e.setTheme(Js);
|
|
9044
9044
|
break;
|
|
9045
9045
|
case "dark":
|
|
9046
|
-
e.setTheme(
|
|
9046
|
+
e.setTheme(qs);
|
|
9047
9047
|
break;
|
|
9048
9048
|
}
|
|
9049
9049
|
}
|
|
@@ -9495,7 +9495,7 @@ const gt = {
|
|
|
9495
9495
|
type: "math_on_list_v1"
|
|
9496
9496
|
}
|
|
9497
9497
|
]
|
|
9498
|
-
},
|
|
9498
|
+
}, Xn = {
|
|
9499
9499
|
kind: "category",
|
|
9500
9500
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9501
9501
|
categorystyle: "message_category",
|
|
@@ -9762,7 +9762,7 @@ const gt = {
|
|
|
9762
9762
|
type: "text_reverse_v1"
|
|
9763
9763
|
}
|
|
9764
9764
|
]
|
|
9765
|
-
},
|
|
9765
|
+
}, Jn = {
|
|
9766
9766
|
kind: "category",
|
|
9767
9767
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9768
9768
|
categorystyle: "time_category",
|
|
@@ -9786,7 +9786,7 @@ const gt = {
|
|
|
9786
9786
|
}
|
|
9787
9787
|
}
|
|
9788
9788
|
]
|
|
9789
|
-
},
|
|
9789
|
+
}, Qs = {
|
|
9790
9790
|
kind: "categoryToolbox",
|
|
9791
9791
|
contents: [
|
|
9792
9792
|
{
|
|
@@ -9795,7 +9795,7 @@ const gt = {
|
|
|
9795
9795
|
categorystyle: "ui_category",
|
|
9796
9796
|
custom: ct.name
|
|
9797
9797
|
},
|
|
9798
|
-
|
|
9798
|
+
Xn,
|
|
9799
9799
|
Ot,
|
|
9800
9800
|
It,
|
|
9801
9801
|
Ct,
|
|
@@ -9803,7 +9803,7 @@ const gt = {
|
|
|
9803
9803
|
At,
|
|
9804
9804
|
kt,
|
|
9805
9805
|
gt,
|
|
9806
|
-
|
|
9806
|
+
Jn,
|
|
9807
9807
|
{
|
|
9808
9808
|
kind: "category",
|
|
9809
9809
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9823,7 +9823,7 @@ const gt = {
|
|
|
9823
9823
|
custom: at.name
|
|
9824
9824
|
}
|
|
9825
9825
|
]
|
|
9826
|
-
},
|
|
9826
|
+
}, Zs = {
|
|
9827
9827
|
kind: "categoryToolbox",
|
|
9828
9828
|
contents: [
|
|
9829
9829
|
{
|
|
@@ -9864,7 +9864,7 @@ const gt = {
|
|
|
9864
9864
|
custom: re.name
|
|
9865
9865
|
}
|
|
9866
9866
|
]
|
|
9867
|
-
},
|
|
9867
|
+
}, ea = {
|
|
9868
9868
|
kind: "categoryToolbox",
|
|
9869
9869
|
contents: [
|
|
9870
9870
|
{
|
|
@@ -9905,7 +9905,7 @@ const gt = {
|
|
|
9905
9905
|
custom: re.name
|
|
9906
9906
|
}
|
|
9907
9907
|
]
|
|
9908
|
-
},
|
|
9908
|
+
}, ta = {
|
|
9909
9909
|
kind: "categoryToolbox",
|
|
9910
9910
|
contents: [
|
|
9911
9911
|
{
|
|
@@ -9936,7 +9936,7 @@ const gt = {
|
|
|
9936
9936
|
]
|
|
9937
9937
|
}
|
|
9938
9938
|
]
|
|
9939
|
-
},
|
|
9939
|
+
}, na = {
|
|
9940
9940
|
kind: "categoryToolbox",
|
|
9941
9941
|
contents: [
|
|
9942
9942
|
{
|
|
@@ -9945,7 +9945,7 @@ const gt = {
|
|
|
9945
9945
|
categorystyle: "ui_category",
|
|
9946
9946
|
custom: ct.name
|
|
9947
9947
|
},
|
|
9948
|
-
|
|
9948
|
+
Xn,
|
|
9949
9949
|
Ot,
|
|
9950
9950
|
It,
|
|
9951
9951
|
Ct,
|
|
@@ -9953,7 +9953,7 @@ const gt = {
|
|
|
9953
9953
|
At,
|
|
9954
9954
|
kt,
|
|
9955
9955
|
gt,
|
|
9956
|
-
|
|
9956
|
+
Jn,
|
|
9957
9957
|
{
|
|
9958
9958
|
kind: "category",
|
|
9959
9959
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -9973,14 +9973,14 @@ const gt = {
|
|
|
9973
9973
|
custom: at.name
|
|
9974
9974
|
}
|
|
9975
9975
|
]
|
|
9976
|
-
},
|
|
9977
|
-
function
|
|
9978
|
-
|
|
9976
|
+
}, qn = Symbol();
|
|
9977
|
+
function oa(t) {
|
|
9978
|
+
co(qn, t);
|
|
9979
9979
|
}
|
|
9980
9980
|
function Zt() {
|
|
9981
|
-
return
|
|
9981
|
+
return lo(qn);
|
|
9982
9982
|
}
|
|
9983
|
-
const
|
|
9983
|
+
const ia = /* @__PURE__ */ se({
|
|
9984
9984
|
__name: "index",
|
|
9985
9985
|
props: {
|
|
9986
9986
|
lock: { type: Boolean }
|
|
@@ -9992,7 +9992,7 @@ const _a = /* @__PURE__ */ se({
|
|
|
9992
9992
|
return;
|
|
9993
9993
|
}
|
|
9994
9994
|
if (o.lock) {
|
|
9995
|
-
|
|
9995
|
+
Nn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
9996
9996
|
return;
|
|
9997
9997
|
}
|
|
9998
9998
|
i.workspace.cleanUp();
|
|
@@ -10001,22 +10001,22 @@ const _a = /* @__PURE__ */ se({
|
|
|
10001
10001
|
};
|
|
10002
10002
|
return e({ cleanWorkspace: s }), (u, r) => {
|
|
10003
10003
|
const _ = P("v-btn"), h = P("v-tooltip");
|
|
10004
|
-
return
|
|
10005
|
-
text:
|
|
10004
|
+
return D(), ee(h, {
|
|
10005
|
+
text: V(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10006
10006
|
}, {
|
|
10007
10007
|
activator: te(({ props: d }) => [
|
|
10008
|
-
|
|
10008
|
+
B(_, Xt(d, {
|
|
10009
10009
|
variant: "outlined",
|
|
10010
10010
|
density: "comfortable",
|
|
10011
|
-
icon:
|
|
10011
|
+
icon: "mdi-broom",
|
|
10012
10012
|
onClick: c
|
|
10013
|
-
}), null, 16
|
|
10013
|
+
}), null, 16)
|
|
10014
10014
|
]),
|
|
10015
10015
|
_: 1
|
|
10016
10016
|
}, 8, ["text"]);
|
|
10017
10017
|
};
|
|
10018
10018
|
}
|
|
10019
|
-
}),
|
|
10019
|
+
}), sa = /* @__PURE__ */ se({
|
|
10020
10020
|
__name: "index",
|
|
10021
10021
|
props: {
|
|
10022
10022
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10027,14 +10027,14 @@ const _a = /* @__PURE__ */ se({
|
|
|
10027
10027
|
const { t: e } = We(), n = Ye(t, "modelValue");
|
|
10028
10028
|
return (o, i) => {
|
|
10029
10029
|
const s = P("v-btn"), c = P("v-tooltip");
|
|
10030
|
-
return
|
|
10031
|
-
text:
|
|
10030
|
+
return D(), ee(c, {
|
|
10031
|
+
text: V(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10032
10032
|
}, {
|
|
10033
10033
|
activator: te(({ props: u }) => [
|
|
10034
|
-
|
|
10034
|
+
B(s, Xt(u, {
|
|
10035
10035
|
variant: "outlined",
|
|
10036
10036
|
density: "comfortable",
|
|
10037
|
-
icon: n.value ?
|
|
10037
|
+
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10038
10038
|
onClick: i[0] || (i[0] = (r) => n.value = !n.value)
|
|
10039
10039
|
}), null, 16, ["icon"])
|
|
10040
10040
|
]),
|
|
@@ -10042,7 +10042,7 @@ const _a = /* @__PURE__ */ se({
|
|
|
10042
10042
|
}, 8, ["text"]);
|
|
10043
10043
|
};
|
|
10044
10044
|
}
|
|
10045
|
-
}),
|
|
10045
|
+
}), aa = { class: "text-subtitle-1 ml-6" }, ca = /* @__PURE__ */ se({
|
|
10046
10046
|
__name: "item",
|
|
10047
10047
|
props: {
|
|
10048
10048
|
id: {},
|
|
@@ -10068,22 +10068,22 @@ const _a = /* @__PURE__ */ se({
|
|
|
10068
10068
|
pointerEvents: "none"
|
|
10069
10069
|
}));
|
|
10070
10070
|
return (h, d) => {
|
|
10071
|
-
const O = P("v-spacer"), k = P("v-icon"), A =
|
|
10072
|
-
return
|
|
10071
|
+
const O = P("v-spacer"), k = P("v-icon"), A = uo("ripple");
|
|
10072
|
+
return ro((D(), Q("div", {
|
|
10073
10073
|
class: "d-flex align-center cursor-pointer",
|
|
10074
10074
|
style: q(r.value),
|
|
10075
|
-
onClick: d[1] || (d[1] = (
|
|
10076
|
-
onMouseover: d[2] || (d[2] = (
|
|
10077
|
-
onMouseout: d[3] || (d[3] = (
|
|
10075
|
+
onClick: d[1] || (d[1] = (M) => c("x-click", s.id)),
|
|
10076
|
+
onMouseover: d[2] || (d[2] = (M) => u.value = !0),
|
|
10077
|
+
onMouseout: d[3] || (d[3] = (M) => u.value = !1)
|
|
10078
10078
|
}, [
|
|
10079
|
-
X("span",
|
|
10080
|
-
|
|
10081
|
-
|
|
10079
|
+
X("span", aa, _t(s.title), 1),
|
|
10080
|
+
B(O),
|
|
10081
|
+
B(k, {
|
|
10082
10082
|
class: "x-handle cursor-move mr-3",
|
|
10083
|
-
icon:
|
|
10083
|
+
icon: "mdi-drag-horizontal-variant",
|
|
10084
10084
|
onMousedown: d[0] || (d[0] = Me(() => {
|
|
10085
10085
|
}, ["stop"]))
|
|
10086
|
-
}
|
|
10086
|
+
}),
|
|
10087
10087
|
X("div", {
|
|
10088
10088
|
style: q(_.value)
|
|
10089
10089
|
}, null, 4)
|
|
@@ -10092,10 +10092,10 @@ const _a = /* @__PURE__ */ se({
|
|
|
10092
10092
|
]);
|
|
10093
10093
|
};
|
|
10094
10094
|
}
|
|
10095
|
-
}),
|
|
10095
|
+
}), la = {
|
|
10096
10096
|
key: 1,
|
|
10097
10097
|
class: "text-caption text-grey"
|
|
10098
|
-
},
|
|
10098
|
+
}, ua = /* @__PURE__ */ se({
|
|
10099
10099
|
__name: "index",
|
|
10100
10100
|
props: /* @__PURE__ */ Pt({
|
|
10101
10101
|
lock: { type: Boolean }
|
|
@@ -10114,7 +10114,7 @@ const _a = /* @__PURE__ */ se({
|
|
|
10114
10114
|
const O = [];
|
|
10115
10115
|
i.workspace.getTopBlocks(!0).forEach((A) => {
|
|
10116
10116
|
var ce;
|
|
10117
|
-
const
|
|
10117
|
+
const M = A.id === ((ce = Ie()) == null ? void 0 : ce.id);
|
|
10118
10118
|
let H = "<n/a>";
|
|
10119
10119
|
if (A.type.startsWith("on_node_event_v")) {
|
|
10120
10120
|
const oe = A, ge = Y[oe.node.key];
|
|
@@ -10123,14 +10123,14 @@ const _a = /* @__PURE__ */ se({
|
|
|
10123
10123
|
O.push({
|
|
10124
10124
|
id: A.id,
|
|
10125
10125
|
name: H,
|
|
10126
|
-
select:
|
|
10126
|
+
select: M
|
|
10127
10127
|
});
|
|
10128
10128
|
}), s.value = O;
|
|
10129
10129
|
} });
|
|
10130
10130
|
let u = [];
|
|
10131
10131
|
const r = () => {
|
|
10132
10132
|
if (t.lock) {
|
|
10133
|
-
|
|
10133
|
+
Nn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10134
10134
|
return;
|
|
10135
10135
|
}
|
|
10136
10136
|
const O = [];
|
|
@@ -10155,14 +10155,14 @@ const _a = /* @__PURE__ */ se({
|
|
|
10155
10155
|
console.assert(!1);
|
|
10156
10156
|
return;
|
|
10157
10157
|
}
|
|
10158
|
-
let
|
|
10159
|
-
O.newIndex > O.oldIndex ?
|
|
10158
|
+
let M = "";
|
|
10159
|
+
O.newIndex > O.oldIndex ? M = u[O.newIndex] : O.newIndex > 0 && (M = u[O.newIndex - 1]);
|
|
10160
10160
|
let H = -10;
|
|
10161
|
-
|
|
10162
|
-
|
|
10161
|
+
M !== "" && (H = i.workspace.getBlockById(
|
|
10162
|
+
M
|
|
10163
10163
|
).getRelativeToSurfaceXY().y + 10);
|
|
10164
10164
|
const ce = A.getRelativeToSurfaceXY();
|
|
10165
|
-
A.moveTo(new E.Coordinate(ce.x, H)), i.workspace.cleanUp(),
|
|
10165
|
+
A.moveTo(new E.Coordinate(ce.x, H)), i.workspace.cleanUp(), Wn();
|
|
10166
10166
|
}, d = async (O) => {
|
|
10167
10167
|
if (!i.workspace) {
|
|
10168
10168
|
console.assert(!1);
|
|
@@ -10171,7 +10171,7 @@ const _a = /* @__PURE__ */ se({
|
|
|
10171
10171
|
const k = i.workspace.getBlockById(O);
|
|
10172
10172
|
vn.setSelected(k), Qt(O), o.value = !1;
|
|
10173
10173
|
};
|
|
10174
|
-
return (O, k) => s.value.length > 0 ? (
|
|
10174
|
+
return (O, k) => s.value.length > 0 ? (D(), ee(V(Ao), {
|
|
10175
10175
|
key: 0,
|
|
10176
10176
|
modelValue: s.value,
|
|
10177
10177
|
"onUpdate:modelValue": k[0] || (k[0] = (A) => s.value = A),
|
|
@@ -10183,7 +10183,7 @@ const _a = /* @__PURE__ */ se({
|
|
|
10183
10183
|
onEnd: h
|
|
10184
10184
|
}, {
|
|
10185
10185
|
default: te(() => [
|
|
10186
|
-
(
|
|
10186
|
+
(D(!0), Q(gn, null, _o(s.value, (A) => (D(), ee(ca, {
|
|
10187
10187
|
id: A.id,
|
|
10188
10188
|
key: A.id,
|
|
10189
10189
|
title: A.name,
|
|
@@ -10192,14 +10192,14 @@ const _a = /* @__PURE__ */ se({
|
|
|
10192
10192
|
}, null, 8, ["id", "title", "select"]))), 128))
|
|
10193
10193
|
]),
|
|
10194
10194
|
_: 1
|
|
10195
|
-
}, 8, ["modelValue"])) : (
|
|
10195
|
+
}, 8, ["modelValue"])) : (D(), Q("span", la, _t(V(n)("x-block-lib.noOption")), 1));
|
|
10196
10196
|
}
|
|
10197
|
-
}),
|
|
10197
|
+
}), ra = (t, e) => {
|
|
10198
10198
|
const n = t.__vccOpts || t;
|
|
10199
10199
|
for (const [o, i] of e)
|
|
10200
10200
|
n[o] = i;
|
|
10201
10201
|
return n;
|
|
10202
|
-
},
|
|
10202
|
+
}, _a = /* @__PURE__ */ ra(ua, [["__scopeId", "data-v-67cacda2"]]), pa = /* @__PURE__ */ se({
|
|
10203
10203
|
__name: "index",
|
|
10204
10204
|
props: {
|
|
10205
10205
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10223,18 +10223,18 @@ const _a = /* @__PURE__ */ se({
|
|
|
10223
10223
|
const r = u.getBlockById(c);
|
|
10224
10224
|
vn.setSelected(r), Qt(c), n.value = !1;
|
|
10225
10225
|
};
|
|
10226
|
-
return (c, u) => (
|
|
10226
|
+
return (c, u) => (D(), Q("div", {
|
|
10227
10227
|
onClick: u[0] || (u[0] = (r) => s(""))
|
|
10228
10228
|
}, "blockTree"));
|
|
10229
10229
|
}
|
|
10230
|
-
}),
|
|
10230
|
+
}), ha = { class: "text-subtitle-1" }, da = /* @__PURE__ */ se({
|
|
10231
10231
|
__name: "index",
|
|
10232
10232
|
props: {
|
|
10233
10233
|
type: {},
|
|
10234
10234
|
lock: { type: Boolean }
|
|
10235
10235
|
},
|
|
10236
10236
|
setup(t, { expose: e }) {
|
|
10237
|
-
const { t: n } = We(), o =
|
|
10237
|
+
const { t: n } = We(), o = Ro(), { sysBarAvail: i } = Ln(), { backgroundColor1: s } = ht(), c = j(() => {
|
|
10238
10238
|
let k = "100%";
|
|
10239
10239
|
return o.mdAndUp.value && (k = "400px"), {
|
|
10240
10240
|
background: s.value,
|
|
@@ -10258,10 +10258,10 @@ const _a = /* @__PURE__ */ se({
|
|
|
10258
10258
|
var k, A;
|
|
10259
10259
|
t.type === "list" ? (k = h.value) == null || k.update() : t.type === "tree" && ((A = d.value) == null || A.update());
|
|
10260
10260
|
} }), (k, A) => {
|
|
10261
|
-
const
|
|
10262
|
-
return
|
|
10263
|
-
|
|
10264
|
-
modelValue:
|
|
10261
|
+
const M = P("v-sheet"), H = P("v-btn"), ce = P("v-spacer"), oe = P("v-dialog"), ge = P("v-tooltip");
|
|
10262
|
+
return D(), Q(gn, null, [
|
|
10263
|
+
B(oe, {
|
|
10264
|
+
modelValue: V(_),
|
|
10265
10265
|
"onUpdate:modelValue": A[5] || (A[5] = (x) => Ze(_) ? _.value = x : null),
|
|
10266
10266
|
transition: "scroll-x-reverse-transition",
|
|
10267
10267
|
persistent: "",
|
|
@@ -10280,25 +10280,25 @@ const _a = /* @__PURE__ */ se({
|
|
|
10280
10280
|
class: "elevation-2",
|
|
10281
10281
|
style: q(c.value)
|
|
10282
10282
|
}, [
|
|
10283
|
-
|
|
10283
|
+
V(i) ? (D(), ee(M, {
|
|
10284
10284
|
key: 0,
|
|
10285
10285
|
color: "transparent",
|
|
10286
10286
|
height: 24
|
|
10287
10287
|
})) : me("", !0),
|
|
10288
|
-
|
|
10288
|
+
B(M, {
|
|
10289
10289
|
class: "d-flex align-center px-2",
|
|
10290
10290
|
color: "transparent",
|
|
10291
10291
|
height: 48
|
|
10292
10292
|
}, {
|
|
10293
10293
|
default: te(() => [
|
|
10294
|
-
|
|
10294
|
+
B(H, {
|
|
10295
10295
|
variant: "text",
|
|
10296
10296
|
density: "comfortable",
|
|
10297
|
-
icon:
|
|
10297
|
+
icon: "mdi-close",
|
|
10298
10298
|
onClick: A[0] || (A[0] = (x) => _.value = !1)
|
|
10299
|
-
}
|
|
10300
|
-
X("span",
|
|
10301
|
-
|
|
10299
|
+
}),
|
|
10300
|
+
X("span", ha, _t(V(n)("x-block-lib.navigator")), 1),
|
|
10301
|
+
B(ce)
|
|
10302
10302
|
]),
|
|
10303
10303
|
_: 1
|
|
10304
10304
|
}),
|
|
@@ -10306,18 +10306,18 @@ const _a = /* @__PURE__ */ se({
|
|
|
10306
10306
|
class: "overflow-y-auto",
|
|
10307
10307
|
style: q(u.value)
|
|
10308
10308
|
}, [
|
|
10309
|
-
k.type === "list" ? (
|
|
10309
|
+
k.type === "list" ? (D(), ee(_a, {
|
|
10310
10310
|
key: 0,
|
|
10311
10311
|
ref_key: "blockList",
|
|
10312
10312
|
ref: h,
|
|
10313
|
-
modelValue:
|
|
10313
|
+
modelValue: V(_),
|
|
10314
10314
|
"onUpdate:modelValue": A[1] || (A[1] = (x) => Ze(_) ? _.value = x : null),
|
|
10315
10315
|
lock: k.lock
|
|
10316
|
-
}, null, 8, ["modelValue", "lock"])) : k.type === "tree" ? (
|
|
10316
|
+
}, null, 8, ["modelValue", "lock"])) : k.type === "tree" ? (D(), ee(pa, {
|
|
10317
10317
|
key: 1,
|
|
10318
10318
|
ref_key: "blockTree",
|
|
10319
10319
|
ref: d,
|
|
10320
|
-
modelValue:
|
|
10320
|
+
modelValue: V(_),
|
|
10321
10321
|
"onUpdate:modelValue": A[2] || (A[2] = (x) => Ze(_) ? _.value = x : null)
|
|
10322
10322
|
}, null, 8, ["modelValue"])) : me("", !0),
|
|
10323
10323
|
X("div", {
|
|
@@ -10329,16 +10329,16 @@ const _a = /* @__PURE__ */ se({
|
|
|
10329
10329
|
]),
|
|
10330
10330
|
_: 1
|
|
10331
10331
|
}, 8, ["modelValue"]),
|
|
10332
|
-
|
|
10333
|
-
text:
|
|
10332
|
+
B(ge, {
|
|
10333
|
+
text: V(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10334
10334
|
}, {
|
|
10335
10335
|
activator: te(({ props: x }) => [
|
|
10336
|
-
|
|
10336
|
+
B(H, Xt(x, {
|
|
10337
10337
|
variant: "outlined",
|
|
10338
10338
|
density: "comfortable",
|
|
10339
|
-
icon:
|
|
10339
|
+
icon: "mdi-navigation-variant",
|
|
10340
10340
|
onClick: A[7] || (A[7] = (en) => _.value = !0)
|
|
10341
|
-
}), null, 16
|
|
10341
|
+
}), null, 16)
|
|
10342
10342
|
]),
|
|
10343
10343
|
_: 1
|
|
10344
10344
|
}, 8, ["text"])
|
|
@@ -10371,22 +10371,22 @@ const _a = /* @__PURE__ */ se({
|
|
|
10371
10371
|
wheel: !0
|
|
10372
10372
|
}
|
|
10373
10373
|
};
|
|
10374
|
-
function
|
|
10375
|
-
Vt.theme = o ? "dark" : "light", Vt.toolbox =
|
|
10376
|
-
const i =
|
|
10377
|
-
return
|
|
10374
|
+
function fa(t, e, n, o) {
|
|
10375
|
+
Vt.theme = o ? "dark" : "light", Vt.toolbox = ma(e, n);
|
|
10376
|
+
const i = Io(t, Vt);
|
|
10377
|
+
return Ta(i, e, n), Ea(i), i;
|
|
10378
10378
|
}
|
|
10379
|
-
function
|
|
10379
|
+
function ma(t, e) {
|
|
10380
10380
|
let n;
|
|
10381
|
-
return t === "page" ? e === "v1" && (n =
|
|
10381
|
+
return t === "page" ? e === "v1" && (n = na) : t === "comp" ? e === "v1" && (n = Qs) : t === "func" ? e === "v1" && (n = ea) : t === "flow" ? e === "v1" && (n = Zs) : t === "json" && e === "v1" && (n = ta), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10382
10382
|
}
|
|
10383
|
-
function
|
|
10383
|
+
function Ta(t, e, n) {
|
|
10384
10384
|
function o({ name: i, callback: s }) {
|
|
10385
10385
|
t.registerToolboxCategoryCallback(i, () => s(e));
|
|
10386
10386
|
}
|
|
10387
10387
|
e === "page" || e === "comp" ? n === "v1" && (o(ct), o(_e), o(re), o(at)) : e === "func" ? n === "v1" && (o(ut), o(lt), o(rt), o(_e), o(re)) : e === "flow" && n === "v1" && (o(lt), o(ut), o(rt), o(_e), o(re));
|
|
10388
10388
|
}
|
|
10389
|
-
function
|
|
10389
|
+
function Ea(t) {
|
|
10390
10390
|
const { router: e } = ae;
|
|
10391
10391
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10392
10392
|
const n = e.resolve({
|
|
@@ -10404,7 +10404,7 @@ function ya(t) {
|
|
|
10404
10404
|
}, 100);
|
|
10405
10405
|
});
|
|
10406
10406
|
}
|
|
10407
|
-
function
|
|
10407
|
+
function ga(t, e) {
|
|
10408
10408
|
const n = e.newBlock("json_root_v1");
|
|
10409
10409
|
n.initSvg(), n.render();
|
|
10410
10410
|
const o = (i, s) => {
|
|
@@ -10446,7 +10446,7 @@ function va(t, e) {
|
|
|
10446
10446
|
new (I.get(I.FINISHED_LOADING))(e)
|
|
10447
10447
|
);
|
|
10448
10448
|
}
|
|
10449
|
-
function
|
|
10449
|
+
function Aa(t) {
|
|
10450
10450
|
const e = (o) => {
|
|
10451
10451
|
if (!o)
|
|
10452
10452
|
return null;
|
|
@@ -10478,7 +10478,7 @@ function Na(t) {
|
|
|
10478
10478
|
if (o.type === "json_root_v1")
|
|
10479
10479
|
return e(o);
|
|
10480
10480
|
}
|
|
10481
|
-
const
|
|
10481
|
+
const Ia = { class: "position-relative w-100 h-100" }, Oa = /* @__PURE__ */ se({
|
|
10482
10482
|
__name: "index",
|
|
10483
10483
|
props: /* @__PURE__ */ Pt({
|
|
10484
10484
|
type: {},
|
|
@@ -10494,8 +10494,8 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10494
10494
|
emits: /* @__PURE__ */ Pt(["ready"], ["update:lock", "update:scale"]),
|
|
10495
10495
|
setup(t, { expose: e, emit: n }) {
|
|
10496
10496
|
const o = Ye(t, "lock"), i = Ye(t, "scale"), s = n, c = `blocklyEditor${xt()}`, u = Ce(), r = Ve("parentContainer"), _ = Ve("clean"), h = Ve("navigator"), d = {};
|
|
10497
|
-
|
|
10498
|
-
const O = Ce(!0), k = Ce(!1), A = j(() => t.type === "json" ? "tree" : "list"),
|
|
10497
|
+
oa(d);
|
|
10498
|
+
const O = Ce(!0), k = Ce(!1), A = j(() => t.type === "json" ? "tree" : "list"), M = j(() => ({
|
|
10499
10499
|
position: "absolute",
|
|
10500
10500
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10501
10501
|
top: "1px",
|
|
@@ -10535,21 +10535,21 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10535
10535
|
console.assert(!1);
|
|
10536
10536
|
return;
|
|
10537
10537
|
}
|
|
10538
|
-
|
|
10538
|
+
Oo(r.value), await En(t.locale), d.workspace = fa(u.value, t.type, t.version, t.dark), d.workspace.addChangeListener(I.disableOrphans), d.workspace.addChangeListener(en);
|
|
10539
10539
|
const v = document.querySelector(`#${c} .blocklyFlyout`);
|
|
10540
10540
|
new MutationObserver((vt) => {
|
|
10541
10541
|
vt.forEach((Je) => {
|
|
10542
10542
|
Je.type === "attributes" && Je.attributeName === "style" && (x.value = d.workspace.getFlyout().isVisible());
|
|
10543
10543
|
});
|
|
10544
|
-
}).observe(v, { attributes: !0 }), x.value = d.workspace.getFlyout().isVisible(), tn(), nn(), await
|
|
10545
|
-
}),
|
|
10544
|
+
}).observe(v, { attributes: !0 }), x.value = d.workspace.getFlyout().isVisible(), tn(), nn(), await po(), s("ready");
|
|
10545
|
+
}), ho(() => {
|
|
10546
10546
|
x.value = !1;
|
|
10547
|
-
}),
|
|
10548
|
-
d.workspace &&
|
|
10547
|
+
}), Co(u, () => {
|
|
10548
|
+
d.workspace && ko(d.workspace);
|
|
10549
10549
|
});
|
|
10550
10550
|
async function en(v) {
|
|
10551
10551
|
if (v.type === I.FINISHED_LOADING) {
|
|
10552
|
-
|
|
10552
|
+
Wn(), setTimeout(() => {
|
|
10553
10553
|
var F;
|
|
10554
10554
|
(F = h.value) == null || F.update();
|
|
10555
10555
|
}, 0), O.value = !1;
|
|
@@ -10566,9 +10566,9 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10566
10566
|
}, 0);
|
|
10567
10567
|
}
|
|
10568
10568
|
}
|
|
10569
|
-
const
|
|
10570
|
-
O.value = !0, t.type === "json" ?
|
|
10571
|
-
},
|
|
10569
|
+
const zn = (v) => {
|
|
10570
|
+
O.value = !0, t.type === "json" ? ga(v, d.workspace) : G.workspaces.load(v, d.workspace);
|
|
10571
|
+
}, Qn = () => t.type === "json" ? Aa(d.workspace) : G.workspaces.save(d.workspace), Zn = () => {
|
|
10572
10572
|
if (t.type === "json")
|
|
10573
10573
|
console.assert(!1);
|
|
10574
10574
|
else
|
|
@@ -10577,27 +10577,27 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10577
10577
|
d.workspace.setIsReadOnly(o.value), d.workspace.isReadOnly() && (x.value = !1);
|
|
10578
10578
|
}, nn = () => {
|
|
10579
10579
|
d.workspace.setScale(i.value);
|
|
10580
|
-
},
|
|
10581
|
-
d.workspace.fireChangeListener(new
|
|
10580
|
+
}, eo = () => {
|
|
10581
|
+
d.workspace.fireChangeListener(new Sn());
|
|
10582
10582
|
}, on = (v) => {
|
|
10583
10583
|
if (v.key === "q" && v.ctrlKey) {
|
|
10584
|
-
|
|
10584
|
+
to();
|
|
10585
10585
|
return;
|
|
10586
10586
|
}
|
|
10587
10587
|
if (v.key === "w" && v.ctrlKey) {
|
|
10588
|
-
|
|
10588
|
+
no();
|
|
10589
10589
|
return;
|
|
10590
10590
|
}
|
|
10591
10591
|
if (v.key === "e" && v.ctrlKey) {
|
|
10592
|
-
|
|
10592
|
+
oo();
|
|
10593
10593
|
return;
|
|
10594
10594
|
}
|
|
10595
|
-
},
|
|
10595
|
+
}, to = () => {
|
|
10596
10596
|
var v;
|
|
10597
10597
|
(v = _.value) == null || v.cleanWorkspace();
|
|
10598
|
-
},
|
|
10598
|
+
}, no = () => {
|
|
10599
10599
|
o.value = !o.value;
|
|
10600
|
-
},
|
|
10600
|
+
}, oo = () => {
|
|
10601
10601
|
h.value && (h.value.open = !0);
|
|
10602
10602
|
};
|
|
10603
10603
|
return an(() => {
|
|
@@ -10612,7 +10612,7 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10612
10612
|
), Be(
|
|
10613
10613
|
() => t.dark,
|
|
10614
10614
|
(v) => {
|
|
10615
|
-
|
|
10615
|
+
zs(v ? "dark" : "light");
|
|
10616
10616
|
}
|
|
10617
10617
|
), Be(x, (v) => {
|
|
10618
10618
|
var F;
|
|
@@ -10621,51 +10621,51 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10621
10621
|
tn();
|
|
10622
10622
|
}), Be(i, () => {
|
|
10623
10623
|
nn();
|
|
10624
|
-
}), e({ loading: O, load:
|
|
10624
|
+
}), e({ loading: O, load: zn, save: Qn, generateCode: Zn, fireStateChange: eo }), (v, F) => {
|
|
10625
10625
|
const vt = P("v-icon"), Je = P("x-loading");
|
|
10626
|
-
return
|
|
10626
|
+
return D(), Q("div", Ia, [
|
|
10627
10627
|
X("div", {
|
|
10628
10628
|
id: c,
|
|
10629
10629
|
ref_key: "blocklyDiv",
|
|
10630
10630
|
ref: u,
|
|
10631
10631
|
class: "w-100 h-100"
|
|
10632
10632
|
}, null, 512),
|
|
10633
|
-
k.value ? (
|
|
10633
|
+
k.value ? (D(), Q("div", {
|
|
10634
10634
|
key: 0,
|
|
10635
10635
|
class: "d-flex flex-column justify-center align-center",
|
|
10636
|
-
style: q(
|
|
10636
|
+
style: q(M.value)
|
|
10637
10637
|
}, [
|
|
10638
|
-
|
|
10638
|
+
B(vt, {
|
|
10639
10639
|
size: "x-large",
|
|
10640
|
-
icon:
|
|
10641
|
-
}
|
|
10640
|
+
icon: "mdi-delete"
|
|
10641
|
+
})
|
|
10642
10642
|
], 4)) : me("", !0),
|
|
10643
|
-
O.value ? me("", !0) : (
|
|
10643
|
+
O.value ? me("", !0) : (D(), Q("div", {
|
|
10644
10644
|
key: 1,
|
|
10645
10645
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10646
10646
|
style: q(H.value)
|
|
10647
10647
|
}, [
|
|
10648
|
-
|
|
10648
|
+
B(ia, {
|
|
10649
10649
|
ref_key: "clean",
|
|
10650
10650
|
ref: _,
|
|
10651
10651
|
lock: o.value
|
|
10652
10652
|
}, null, 8, ["lock"]),
|
|
10653
|
-
|
|
10653
|
+
B(sa, {
|
|
10654
10654
|
modelValue: o.value,
|
|
10655
|
-
"onUpdate:modelValue": F[0] || (F[0] = (
|
|
10655
|
+
"onUpdate:modelValue": F[0] || (F[0] = (io) => o.value = io)
|
|
10656
10656
|
}, null, 8, ["modelValue"]),
|
|
10657
|
-
|
|
10657
|
+
B(da, {
|
|
10658
10658
|
ref_key: "navigator",
|
|
10659
10659
|
ref: h,
|
|
10660
10660
|
type: A.value,
|
|
10661
10661
|
lock: o.value
|
|
10662
10662
|
}, null, 8, ["type", "lock"])
|
|
10663
10663
|
], 4)),
|
|
10664
|
-
o.value ? (
|
|
10664
|
+
o.value ? (D(), Q("div", {
|
|
10665
10665
|
key: 2,
|
|
10666
10666
|
style: q(oe.value)
|
|
10667
10667
|
}, null, 4)) : me("", !0),
|
|
10668
|
-
o.value ? (
|
|
10668
|
+
o.value ? (D(), Q("div", {
|
|
10669
10669
|
key: 3,
|
|
10670
10670
|
style: q(ce.value)
|
|
10671
10671
|
}, null, 4)) : me("", !0),
|
|
@@ -10674,31 +10674,31 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10674
10674
|
ref: r,
|
|
10675
10675
|
style: q(ge.value)
|
|
10676
10676
|
}, null, 4),
|
|
10677
|
-
|
|
10677
|
+
B(Je, {
|
|
10678
10678
|
open: O.value,
|
|
10679
10679
|
"z-index": 99
|
|
10680
10680
|
}, null, 8, ["open"])
|
|
10681
10681
|
]);
|
|
10682
10682
|
};
|
|
10683
10683
|
}
|
|
10684
|
-
}),
|
|
10684
|
+
}), Ca = /* @__PURE__ */ se({
|
|
10685
10685
|
__name: "index",
|
|
10686
10686
|
props: {
|
|
10687
10687
|
code: {}
|
|
10688
10688
|
},
|
|
10689
10689
|
setup(t) {
|
|
10690
10690
|
const e = t;
|
|
10691
|
-
|
|
10692
|
-
const n =
|
|
10691
|
+
yo.registerLanguage("javascript", vo);
|
|
10692
|
+
const n = No.component, { backgroundColor2: o } = ht();
|
|
10693
10693
|
return (i, s) => {
|
|
10694
10694
|
const c = P("v-sheet");
|
|
10695
|
-
return
|
|
10696
|
-
color:
|
|
10695
|
+
return D(), ee(c, {
|
|
10696
|
+
color: V(o),
|
|
10697
10697
|
width: "100%",
|
|
10698
10698
|
height: "100%"
|
|
10699
10699
|
}, {
|
|
10700
10700
|
default: te(() => [
|
|
10701
|
-
|
|
10701
|
+
B(V(n), {
|
|
10702
10702
|
language: "js",
|
|
10703
10703
|
code: e.code
|
|
10704
10704
|
}, null, 8, ["code"])
|
|
@@ -10707,10 +10707,10 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10707
10707
|
}, 8, ["color"]);
|
|
10708
10708
|
};
|
|
10709
10709
|
}
|
|
10710
|
-
}),
|
|
10710
|
+
}), ka = { class: "text-subtitle-1" }, ya = { class: "w-100 h-100 overflow-auto" }, va = /* @__PURE__ */ se({
|
|
10711
10711
|
__name: "index",
|
|
10712
10712
|
setup(t) {
|
|
10713
|
-
const { t: e } = We(), { sysBarAvail: n } =
|
|
10713
|
+
const { t: e } = We(), { sysBarAvail: n } = Ln(), { backgroundColor0: o, backgroundColor2: i } = ht(), s = Ce(""), c = j(() => {
|
|
10714
10714
|
let _ = 48;
|
|
10715
10715
|
return n.value && (_ += 24), {
|
|
10716
10716
|
position: "relative",
|
|
@@ -10721,49 +10721,49 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10721
10721
|
}, { open: r } = Jt("sourceDlg", u);
|
|
10722
10722
|
return (_, h) => {
|
|
10723
10723
|
const d = P("v-sheet"), O = P("v-btn"), k = P("v-spacer"), A = P("v-dialog");
|
|
10724
|
-
return
|
|
10725
|
-
modelValue:
|
|
10726
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
|
10724
|
+
return D(), ee(A, {
|
|
10725
|
+
modelValue: V(r),
|
|
10726
|
+
"onUpdate:modelValue": h[1] || (h[1] = (M) => Ze(r) ? r.value = M : null),
|
|
10727
10727
|
transition: "dialog-bottom-transition",
|
|
10728
10728
|
persistent: "",
|
|
10729
10729
|
"no-click-animation": "",
|
|
10730
10730
|
fullscreen: "",
|
|
10731
|
-
onKeydown: h[2] || (h[2] = In(Me((
|
|
10731
|
+
onKeydown: h[2] || (h[2] = In(Me((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10732
10732
|
}, {
|
|
10733
10733
|
default: te(() => [
|
|
10734
|
-
|
|
10735
|
-
color:
|
|
10734
|
+
B(d, {
|
|
10735
|
+
color: V(o),
|
|
10736
10736
|
width: "100%",
|
|
10737
10737
|
height: "100%"
|
|
10738
10738
|
}, {
|
|
10739
10739
|
default: te(() => [
|
|
10740
|
-
|
|
10740
|
+
V(n) ? (D(), ee(d, {
|
|
10741
10741
|
key: 0,
|
|
10742
|
-
color:
|
|
10742
|
+
color: V(i),
|
|
10743
10743
|
height: 24
|
|
10744
10744
|
}, null, 8, ["color"])) : me("", !0),
|
|
10745
|
-
|
|
10745
|
+
B(d, {
|
|
10746
10746
|
class: "d-flex align-center px-2",
|
|
10747
|
-
color:
|
|
10747
|
+
color: V(i),
|
|
10748
10748
|
height: 48
|
|
10749
10749
|
}, {
|
|
10750
10750
|
default: te(() => [
|
|
10751
|
-
|
|
10751
|
+
B(O, {
|
|
10752
10752
|
variant: "text",
|
|
10753
10753
|
density: "comfortable",
|
|
10754
|
-
icon:
|
|
10755
|
-
onClick: h[0] || (h[0] = (
|
|
10756
|
-
}
|
|
10757
|
-
X("span",
|
|
10758
|
-
|
|
10754
|
+
icon: "mdi-close",
|
|
10755
|
+
onClick: h[0] || (h[0] = (M) => r.value = !1)
|
|
10756
|
+
}),
|
|
10757
|
+
X("span", ka, _t(V(e)("x-block-lib.dlg.source.title")), 1),
|
|
10758
|
+
B(k)
|
|
10759
10759
|
]),
|
|
10760
10760
|
_: 1
|
|
10761
10761
|
}, 8, ["color"]),
|
|
10762
10762
|
X("div", {
|
|
10763
10763
|
style: q(c.value)
|
|
10764
10764
|
}, [
|
|
10765
|
-
X("div",
|
|
10766
|
-
|
|
10765
|
+
X("div", ya, [
|
|
10766
|
+
B(Ca, { code: s.value }, null, 8, ["code"])
|
|
10767
10767
|
])
|
|
10768
10768
|
], 4)
|
|
10769
10769
|
]),
|
|
@@ -10774,16 +10774,16 @@ const La = { class: "position-relative w-100 h-100" }, Sa = /* @__PURE__ */ se({
|
|
|
10774
10774
|
}, 8, ["modelValue"]);
|
|
10775
10775
|
};
|
|
10776
10776
|
}
|
|
10777
|
-
}),
|
|
10778
|
-
t.component("XBlockly",
|
|
10777
|
+
}), Na = (t) => {
|
|
10778
|
+
t.component("XBlockly", Oa), t.component("XSourceDlg", va);
|
|
10779
10779
|
};
|
|
10780
|
-
async function
|
|
10781
|
-
return (await
|
|
10780
|
+
async function Va(t) {
|
|
10781
|
+
return (await Gn(/* @__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;
|
|
10782
10782
|
}
|
|
10783
|
-
const
|
|
10783
|
+
const Pa = { install: Na };
|
|
10784
10784
|
export {
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10785
|
+
Oa as XBlockly,
|
|
10786
|
+
Pa as default,
|
|
10787
|
+
Na as install,
|
|
10788
|
+
Va as loadLocaleMessageBlock
|
|
10789
10789
|
};
|