x-block-lib 0.7.6 → 0.7.8
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/core/utils/common/block.d.ts +1 -0
- package/dist/index.js +523 -519
- package/dist/{vendor.1v4zfi9x.js → vendor.k6kjk1km.js} +5794 -5507
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
Website: https://highlightjs.org/
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
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-
|
|
10
|
-
import { provide as
|
|
11
|
-
import { d as h, j as s, O as c, f as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as
|
|
13
|
-
import { elements as x, pkgs as Ve, getPropTag as lt, parsePixelStr as
|
|
9
|
+
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-2ba1be08]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:10px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
+
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as P, createBlock as Z, openBlock as D, unref as V, withCtx as ee, createVNode as B, mergeProps as wt, useModel as Me, ref as Ae, computed as K, resolveDirective as to, withDirectives as no, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as at, withModifiers as Be, mergeModels as bt, Fragment as _n, renderList as oo, useId as Bt, onUnmounted as pn, useTemplateRef as Re, withKeys as hn, isRef as Je, createCommentVNode as me, onMounted as zt, nextTick as io, onBeforeUnmount as so, watch as Se, renderSlot as ao } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as co, F as dn, M as _, E, r as Zt, u as v, s as lo, X as he, B as d, i as U, a as k, c as De, b as Rt, e as $, g as Te, h as re, p as Ue, k as z, l as en, m as R, C as fn, N as te, n as uo, P as Dt, V as ge, o as we, q as mn, t as ro, v as _o, w as po, S as ho, x as fo, y as mo, T as ct, z as Tn, A as To, D as Eo, G as En, H as go, I as Ao, J as Io, K as Oo, L as Co, Q as ko, R as vo } from "./vendor.k6kjk1km.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as yo, openPromptDlg as No, messageWarning as gn, useColor as Ke, useSystem as An, useViewStack as Kt } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Ve, getPropTag as lt, parsePixelStr as Lo, parsePercentStr as So } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
15
|
import { useI18n as $e } from "vue-i18n";
|
|
16
|
-
import { useDisplay as
|
|
16
|
+
import { useDisplay as bo } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
19
19
|
type: "app_debug_trace_v1",
|
|
@@ -58,7 +58,7 @@ h([
|
|
|
58
58
|
s.forBlock.app_env_v1 = function(t) {
|
|
59
59
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
60
60
|
};
|
|
61
|
-
class f extends
|
|
61
|
+
class f extends dn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -115,22 +115,22 @@ class f extends hn {
|
|
|
115
115
|
return "<n/a>";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
co.register("field_dropdown2", f);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class In extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
Zt.register(
|
|
124
|
+
Zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
In
|
|
127
127
|
);
|
|
128
128
|
const Ie = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Qe = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
129
129
|
function ut(t) {
|
|
130
130
|
const e = t.lastIndexOf("V");
|
|
131
131
|
if (e <= 0 || e >= t.length - 1)
|
|
132
132
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
133
|
-
const n =
|
|
133
|
+
const n = lo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
134
134
|
return `${n}_${o}`;
|
|
135
135
|
}
|
|
136
136
|
function Ce(t) {
|
|
@@ -157,7 +157,7 @@ function S(t) {
|
|
|
157
157
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
158
158
|
return v.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Bo(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
@@ -165,39 +165,43 @@ function bo(t) {
|
|
|
165
165
|
}
|
|
166
166
|
function ue(t, e) {
|
|
167
167
|
const n = `<block type="text_v1"><field name="TEXT">${e}</field></block>`, o = v.xml.textToDom(n);
|
|
168
|
-
return
|
|
168
|
+
return he.domToBlock(o, t);
|
|
169
169
|
}
|
|
170
170
|
function ke(t, e) {
|
|
171
171
|
const n = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`, o = v.xml.textToDom(n);
|
|
172
|
-
return
|
|
172
|
+
return he.domToBlock(o, t);
|
|
173
173
|
}
|
|
174
174
|
function rt(t, e) {
|
|
175
175
|
const o = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`, i = v.xml.textToDom(o);
|
|
176
|
-
return
|
|
176
|
+
return he.domToBlock(i, t);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function On(t, e) {
|
|
179
179
|
const o = `<block type="${ut(e)}"></block>`, i = v.xml.textToDom(o);
|
|
180
|
-
return
|
|
180
|
+
return he.domToBlock(i, t);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Cn(t, e) {
|
|
183
183
|
const o = `<block type="${ut(e)}"></block>`, i = v.xml.textToDom(o);
|
|
184
|
-
return
|
|
184
|
+
return he.domToBlock(i, t);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function kn(t) {
|
|
187
187
|
const n = v.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
188
|
-
return
|
|
188
|
+
return he.domToBlock(n, t);
|
|
189
|
+
}
|
|
190
|
+
function $t(t, e) {
|
|
191
|
+
const n = `<block type="color_picker_v1"><field name="COLOR">${e}</field></block>`, o = v.xml.textToDom(n);
|
|
192
|
+
return he.domToBlock(o, t);
|
|
189
193
|
}
|
|
190
|
-
function
|
|
194
|
+
function tn(t, e) {
|
|
191
195
|
let n = null;
|
|
192
|
-
return e === "string" ? n = ue(t, "") : e === "integer" || e === "float" ? n = ke(t, 0) : e === "boolean" ? n = rt(t, !1) :
|
|
196
|
+
return e === "string" ? n = ue(t, "") : e === "integer" || e === "float" ? n = ke(t, 0) : e === "boolean" ? n = rt(t, !1) : e === "enum" || e === "dateTime" ? n = ue(t, "") : e === "colorPicker" && (n = $t(t, "#ff0000")), n;
|
|
193
197
|
}
|
|
194
|
-
function
|
|
198
|
+
function Ht(t, e, n, o) {
|
|
195
199
|
const i = `
|
|
196
200
|
<block type="parameter_v1">
|
|
197
201
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
198
202
|
</block>
|
|
199
203
|
`, a = v.xml.textToDom(i);
|
|
200
|
-
return
|
|
204
|
+
return he.domToBlock(a, t);
|
|
201
205
|
}
|
|
202
206
|
function F(t, e) {
|
|
203
207
|
try {
|
|
@@ -212,7 +216,7 @@ function F(t, e) {
|
|
|
212
216
|
return;
|
|
213
217
|
r.dispose();
|
|
214
218
|
}
|
|
215
|
-
r =
|
|
219
|
+
r = Ht(
|
|
216
220
|
t.workspace,
|
|
217
221
|
i,
|
|
218
222
|
a,
|
|
@@ -254,7 +258,7 @@ function Ot(t, e) {
|
|
|
254
258
|
if (n)
|
|
255
259
|
return n.events.find((o) => o.key === e);
|
|
256
260
|
}
|
|
257
|
-
function
|
|
261
|
+
function Ro(t) {
|
|
258
262
|
const e = [];
|
|
259
263
|
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
260
264
|
e.push([_[i] ?? i, o]);
|
|
@@ -269,7 +273,7 @@ function Ct(t, e) {
|
|
|
269
273
|
if (n)
|
|
270
274
|
return n.methods.find((o) => o.key === e);
|
|
271
275
|
}
|
|
272
|
-
function
|
|
276
|
+
function Do(t) {
|
|
273
277
|
const e = [];
|
|
274
278
|
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
275
279
|
e.push([_[i] ?? i, o]);
|
|
@@ -294,7 +298,7 @@ function se(t, e) {
|
|
|
294
298
|
}
|
|
295
299
|
return n[t]?.[a]?.find((l) => l.keys === e);
|
|
296
300
|
}
|
|
297
|
-
function
|
|
301
|
+
function vn(t, e) {
|
|
298
302
|
const { i18n: n } = ie, o = [];
|
|
299
303
|
return Pe(t, e).forEach(({ keys: a, names: l }) => {
|
|
300
304
|
let u = "";
|
|
@@ -353,7 +357,7 @@ function kt(t, e) {
|
|
|
353
357
|
}
|
|
354
358
|
return o.events.find((i) => i.key === e);
|
|
355
359
|
}
|
|
356
|
-
function
|
|
360
|
+
function Uo(t) {
|
|
357
361
|
const e = [];
|
|
358
362
|
return Vt(t).forEach(({ key: o, name: i }) => {
|
|
359
363
|
e.push([_[i] ?? i, o]);
|
|
@@ -377,7 +381,7 @@ function vt(t, e) {
|
|
|
377
381
|
}
|
|
378
382
|
return o.methods.find((i) => i.key === e);
|
|
379
383
|
}
|
|
380
|
-
function
|
|
384
|
+
function Mo(t) {
|
|
381
385
|
const e = [];
|
|
382
386
|
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
383
387
|
e.push([_[i] ?? i, o]);
|
|
@@ -402,7 +406,7 @@ function ae(t, e) {
|
|
|
402
406
|
if (l)
|
|
403
407
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
404
408
|
}
|
|
405
|
-
function
|
|
409
|
+
function yn(t, e) {
|
|
406
410
|
const { i18n: n } = ie, o = [];
|
|
407
411
|
return xe(t, e).forEach(({ keys: a, names: l }) => {
|
|
408
412
|
let u = "";
|
|
@@ -411,7 +415,7 @@ function vn(t, e) {
|
|
|
411
415
|
}), o.push([u, a]);
|
|
412
416
|
}), N(o);
|
|
413
417
|
}
|
|
414
|
-
const
|
|
418
|
+
const Vo = {
|
|
415
419
|
init: function() {
|
|
416
420
|
this.node = {
|
|
417
421
|
id: "",
|
|
@@ -455,7 +459,7 @@ const Mo = {
|
|
|
455
459
|
return Ge("method");
|
|
456
460
|
},
|
|
457
461
|
genMethodOpts_: function() {
|
|
458
|
-
return
|
|
462
|
+
return Mo(this.node.id);
|
|
459
463
|
},
|
|
460
464
|
genElementOpts_: function() {
|
|
461
465
|
return ve();
|
|
@@ -568,7 +572,7 @@ const Mo = {
|
|
|
568
572
|
this.setWarningText(null);
|
|
569
573
|
}
|
|
570
574
|
};
|
|
571
|
-
d.call_node_method_v1 =
|
|
575
|
+
d.call_node_method_v1 = Vo;
|
|
572
576
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
573
577
|
const e = s.quote_, n = t;
|
|
574
578
|
let o = n.node.id;
|
|
@@ -591,7 +595,7 @@ ${a}}
|
|
|
591
595
|
`;
|
|
592
596
|
}
|
|
593
597
|
};
|
|
594
|
-
const
|
|
598
|
+
const Po = {
|
|
595
599
|
init: function() {
|
|
596
600
|
this.element = {
|
|
597
601
|
key: "",
|
|
@@ -634,7 +638,7 @@ const Vo = {
|
|
|
634
638
|
return ve("method");
|
|
635
639
|
},
|
|
636
640
|
genMethodOpts_: function() {
|
|
637
|
-
return
|
|
641
|
+
return Do(this.element.key);
|
|
638
642
|
},
|
|
639
643
|
onchange: function(t) {
|
|
640
644
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -737,7 +741,7 @@ const Vo = {
|
|
|
737
741
|
this.setWarningText(null);
|
|
738
742
|
}
|
|
739
743
|
};
|
|
740
|
-
d.call_node_method_as_v1 =
|
|
744
|
+
d.call_node_method_as_v1 = Po;
|
|
741
745
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
742
746
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
743
747
|
if (!o)
|
|
@@ -761,7 +765,7 @@ ${a}}
|
|
|
761
765
|
`;
|
|
762
766
|
}
|
|
763
767
|
};
|
|
764
|
-
function
|
|
768
|
+
function xo() {
|
|
765
769
|
return T.app.activeObject.type !== "comp" ? !1 : T.app.activeComp.meta.properties.length > 0 || T.app.activeComp.meta.methods.length > 0 || T.app.activeComp.meta.events.length > 0;
|
|
766
770
|
}
|
|
767
771
|
function Fe() {
|
|
@@ -770,7 +774,7 @@ function Fe() {
|
|
|
770
774
|
function ze(t) {
|
|
771
775
|
return T.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
772
776
|
}
|
|
773
|
-
function
|
|
777
|
+
function Nn() {
|
|
774
778
|
const t = [];
|
|
775
779
|
return Fe().forEach(({ id: n, name: o }) => {
|
|
776
780
|
t.push([o, n]);
|
|
@@ -789,25 +793,25 @@ function yt(t, e) {
|
|
|
789
793
|
if (n)
|
|
790
794
|
return n.outputs.find((o) => o.id === e);
|
|
791
795
|
}
|
|
792
|
-
function
|
|
796
|
+
function Fo(t) {
|
|
793
797
|
const e = [];
|
|
794
798
|
return xt(t).forEach(({ id: o, name: i }) => {
|
|
795
799
|
e.push([i, o]);
|
|
796
800
|
}), N(e);
|
|
797
801
|
}
|
|
798
|
-
function
|
|
802
|
+
function Ln() {
|
|
799
803
|
return T.app.activeComp.meta.events;
|
|
800
804
|
}
|
|
801
|
-
function
|
|
805
|
+
function nn(t) {
|
|
802
806
|
return T.app.activeComp.meta.events.find((e) => e.id === t);
|
|
803
807
|
}
|
|
804
|
-
function
|
|
808
|
+
function Yo() {
|
|
805
809
|
const t = [];
|
|
806
|
-
return
|
|
810
|
+
return Ln().forEach(({ id: n, name: o }) => {
|
|
807
811
|
t.push([o, n]);
|
|
808
812
|
}), N(t);
|
|
809
813
|
}
|
|
810
|
-
const
|
|
814
|
+
const wo = {
|
|
811
815
|
init: function() {
|
|
812
816
|
this.method = {
|
|
813
817
|
id: "",
|
|
@@ -836,7 +840,7 @@ const Yo = {
|
|
|
836
840
|
}, 0);
|
|
837
841
|
},
|
|
838
842
|
genMethodOpts_: function() {
|
|
839
|
-
return
|
|
843
|
+
return Nn();
|
|
840
844
|
},
|
|
841
845
|
onchange: function(t) {
|
|
842
846
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -887,14 +891,14 @@ const Yo = {
|
|
|
887
891
|
this.setWarningText(null);
|
|
888
892
|
}
|
|
889
893
|
};
|
|
890
|
-
d.comp_method_impl_v1 =
|
|
894
|
+
d.comp_method_impl_v1 = wo;
|
|
891
895
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
892
896
|
const e = t;
|
|
893
897
|
return `{
|
|
894
898
|
${s.statementToCode(e, "HANDLE")}}
|
|
895
899
|
`;
|
|
896
900
|
};
|
|
897
|
-
const
|
|
901
|
+
const Ko = (t, e) => {
|
|
898
902
|
const n = ut(t), o = Ce(t);
|
|
899
903
|
d[n] = {
|
|
900
904
|
init: function() {
|
|
@@ -917,9 +921,9 @@ const wo = (t, e) => {
|
|
|
917
921
|
for (const t in Ve) {
|
|
918
922
|
const e = Ve[t];
|
|
919
923
|
for (const n in e.items)
|
|
920
|
-
|
|
924
|
+
Ko(n, e.items[n]);
|
|
921
925
|
}
|
|
922
|
-
const
|
|
926
|
+
const $o = (t, e) => {
|
|
923
927
|
const n = ut(t), o = Ce(t);
|
|
924
928
|
d[n] = {
|
|
925
929
|
init: function() {
|
|
@@ -974,7 +978,7 @@ const Ko = (t, e) => {
|
|
|
974
978
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
975
979
|
let u, r;
|
|
976
980
|
if (l.ui === "pixelInput") {
|
|
977
|
-
const p =
|
|
981
|
+
const p = Lo(this.value) ?? 0;
|
|
978
982
|
u = new Rt(
|
|
979
983
|
p,
|
|
980
984
|
l.min,
|
|
@@ -985,7 +989,7 @@ const Ko = (t, e) => {
|
|
|
985
989
|
}
|
|
986
990
|
), r = "px";
|
|
987
991
|
} else if (l.ui === "percentInput") {
|
|
988
|
-
const p =
|
|
992
|
+
const p = So(this.value) ?? 0;
|
|
989
993
|
u = new Rt(
|
|
990
994
|
p,
|
|
991
995
|
l.min,
|
|
@@ -1014,9 +1018,9 @@ const Ko = (t, e) => {
|
|
|
1014
1018
|
for (const t in Ve) {
|
|
1015
1019
|
const e = Ve[t];
|
|
1016
1020
|
for (const n in e.types)
|
|
1017
|
-
|
|
1021
|
+
$o(n, e.types[n]);
|
|
1018
1022
|
}
|
|
1019
|
-
const
|
|
1023
|
+
const Ho = {
|
|
1020
1024
|
init: function() {
|
|
1021
1025
|
this.node = {
|
|
1022
1026
|
id: "",
|
|
@@ -1080,12 +1084,12 @@ const $o = {
|
|
|
1080
1084
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1081
1085
|
}
|
|
1082
1086
|
};
|
|
1083
|
-
d.get_node_v1 =
|
|
1087
|
+
d.get_node_v1 = Ho;
|
|
1084
1088
|
s.forBlock.get_node_v1 = function(t) {
|
|
1085
1089
|
const e = t;
|
|
1086
1090
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1087
1091
|
};
|
|
1088
|
-
const
|
|
1092
|
+
const Go = {
|
|
1089
1093
|
init: function() {
|
|
1090
1094
|
this.node = {
|
|
1091
1095
|
id: "",
|
|
@@ -1127,7 +1131,7 @@ const Ho = {
|
|
|
1127
1131
|
return Ge();
|
|
1128
1132
|
},
|
|
1129
1133
|
genPropOpts_: function() {
|
|
1130
|
-
return
|
|
1134
|
+
return yn(this.node.id);
|
|
1131
1135
|
},
|
|
1132
1136
|
onchange: function(t) {
|
|
1133
1137
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1178,12 +1182,12 @@ const Ho = {
|
|
|
1178
1182
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1179
1183
|
}
|
|
1180
1184
|
};
|
|
1181
|
-
d.get_node_prop_v1 =
|
|
1185
|
+
d.get_node_prop_v1 = Go;
|
|
1182
1186
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1183
1187
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1184
1188
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1185
1189
|
};
|
|
1186
|
-
const
|
|
1190
|
+
const Wo = {
|
|
1187
1191
|
init: function() {
|
|
1188
1192
|
this.element = {
|
|
1189
1193
|
key: "",
|
|
@@ -1224,7 +1228,7 @@ const Go = {
|
|
|
1224
1228
|
return ve();
|
|
1225
1229
|
},
|
|
1226
1230
|
genPropOpts_: function() {
|
|
1227
|
-
return
|
|
1231
|
+
return vn(this.element.key);
|
|
1228
1232
|
},
|
|
1229
1233
|
onchange: function(t) {
|
|
1230
1234
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1271,29 +1275,29 @@ const Go = {
|
|
|
1271
1275
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1272
1276
|
}
|
|
1273
1277
|
};
|
|
1274
|
-
d.get_node_prop_as_v1 =
|
|
1278
|
+
d.get_node_prop_as_v1 = Wo;
|
|
1275
1279
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1276
1280
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1277
1281
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1278
1282
|
};
|
|
1279
|
-
function
|
|
1283
|
+
function jo() {
|
|
1280
1284
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1281
1285
|
}
|
|
1282
|
-
function
|
|
1286
|
+
function Sn() {
|
|
1283
1287
|
return T.app.activePage.meta.arguments;
|
|
1284
1288
|
}
|
|
1285
|
-
function
|
|
1289
|
+
function on(t) {
|
|
1286
1290
|
return T.app.activePage.meta.arguments.find(
|
|
1287
1291
|
(e) => e.id === t
|
|
1288
1292
|
);
|
|
1289
1293
|
}
|
|
1290
|
-
function
|
|
1294
|
+
function Xo() {
|
|
1291
1295
|
const t = [];
|
|
1292
|
-
return
|
|
1296
|
+
return Sn().forEach(({ id: n, name: o }) => {
|
|
1293
1297
|
t.push([o, n]);
|
|
1294
1298
|
}), N(t);
|
|
1295
1299
|
}
|
|
1296
|
-
const
|
|
1300
|
+
const Jo = {
|
|
1297
1301
|
init: function() {
|
|
1298
1302
|
this.argument = {
|
|
1299
1303
|
id: "",
|
|
@@ -1315,7 +1319,7 @@ const Xo = {
|
|
|
1315
1319
|
}, 0);
|
|
1316
1320
|
},
|
|
1317
1321
|
genArgumentOpts_: function() {
|
|
1318
|
-
return
|
|
1322
|
+
return Xo();
|
|
1319
1323
|
},
|
|
1320
1324
|
onchange: function(t) {
|
|
1321
1325
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1330,7 +1334,7 @@ const Xo = {
|
|
|
1330
1334
|
}
|
|
1331
1335
|
},
|
|
1332
1336
|
onArgumentChange_: function(t) {
|
|
1333
|
-
const e =
|
|
1337
|
+
const e = on(t);
|
|
1334
1338
|
if (!e) {
|
|
1335
1339
|
console.assert(!1);
|
|
1336
1340
|
return;
|
|
@@ -1341,7 +1345,7 @@ const Xo = {
|
|
|
1341
1345
|
this.argument.type === "string" ? this.setOutput(!0, "String") : this.argument.type === "number" ? this.setOutput(!0, "Number") : this.argument.type === "boolean" ? this.setOutput(!0, "Boolean") : this.argument.type === "list" ? this.setOutput(!0, "Array") : this.argument.type === "object" ? this.setOutput(!0, "Object") : this.setOutput(!0, null);
|
|
1342
1346
|
},
|
|
1343
1347
|
checkWarning_: function() {
|
|
1344
|
-
const t =
|
|
1348
|
+
const t = on(this.argument.id);
|
|
1345
1349
|
if (!t) {
|
|
1346
1350
|
this.setWarningText(_.WARN_ARGUMENT_NOT_AVAILABLE);
|
|
1347
1351
|
return;
|
|
@@ -1353,20 +1357,20 @@ const Xo = {
|
|
|
1353
1357
|
this.setWarningText(null);
|
|
1354
1358
|
}
|
|
1355
1359
|
};
|
|
1356
|
-
d.get_page_argument_v1 =
|
|
1360
|
+
d.get_page_argument_v1 = Jo;
|
|
1357
1361
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1358
1362
|
const e = t;
|
|
1359
1363
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
1360
1364
|
};
|
|
1361
|
-
function
|
|
1365
|
+
function Gt() {
|
|
1362
1366
|
return T.app.appList;
|
|
1363
1367
|
}
|
|
1364
|
-
function
|
|
1368
|
+
function sn(t) {
|
|
1365
1369
|
return T.app.appList.find((e) => e.id === t);
|
|
1366
1370
|
}
|
|
1367
|
-
function
|
|
1371
|
+
function qo() {
|
|
1368
1372
|
const t = [];
|
|
1369
|
-
return
|
|
1373
|
+
return Gt().forEach(({ id: n, name: o }) => {
|
|
1370
1374
|
t.push([o, n]);
|
|
1371
1375
|
}), N(t);
|
|
1372
1376
|
}
|
|
@@ -1379,33 +1383,33 @@ function Nt(t, e) {
|
|
|
1379
1383
|
if (n)
|
|
1380
1384
|
return n.pages.find((o) => o.id === e);
|
|
1381
1385
|
}
|
|
1382
|
-
function
|
|
1386
|
+
function Qo(t) {
|
|
1383
1387
|
const e = [];
|
|
1384
1388
|
return Ft(t).forEach(({ id: o, name: i }) => {
|
|
1385
1389
|
e.push([i, o]);
|
|
1386
1390
|
}), N(e);
|
|
1387
1391
|
}
|
|
1388
|
-
const
|
|
1392
|
+
const bn = {
|
|
1389
1393
|
id: "",
|
|
1390
1394
|
groupid: "",
|
|
1391
1395
|
name: "",
|
|
1392
1396
|
position: 0
|
|
1393
1397
|
};
|
|
1394
|
-
function
|
|
1398
|
+
function Bn() {
|
|
1395
1399
|
const { comps: t } = T.app.activeApp;
|
|
1396
|
-
return [
|
|
1400
|
+
return [bn, ...t];
|
|
1397
1401
|
}
|
|
1398
|
-
function
|
|
1399
|
-
return t === "" ?
|
|
1402
|
+
function an(t) {
|
|
1403
|
+
return t === "" ? bn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1400
1404
|
}
|
|
1401
|
-
function
|
|
1405
|
+
function zo() {
|
|
1402
1406
|
const { i18n: t } = ie, e = [];
|
|
1403
|
-
return
|
|
1407
|
+
return Bn().forEach(({ id: o, name: i }) => {
|
|
1404
1408
|
let a = i;
|
|
1405
1409
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1406
1410
|
}), N(e);
|
|
1407
1411
|
}
|
|
1408
|
-
const
|
|
1412
|
+
const Zo = {
|
|
1409
1413
|
init: function() {
|
|
1410
1414
|
this.app = {
|
|
1411
1415
|
id: "",
|
|
@@ -1424,7 +1428,7 @@ const zo = {
|
|
|
1424
1428
|
initData_: function() {
|
|
1425
1429
|
if (this.app.id)
|
|
1426
1430
|
return;
|
|
1427
|
-
const t =
|
|
1431
|
+
const t = Gt()?.[0];
|
|
1428
1432
|
if (!t)
|
|
1429
1433
|
return;
|
|
1430
1434
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -1449,10 +1453,10 @@ const zo = {
|
|
|
1449
1453
|
}, 0);
|
|
1450
1454
|
},
|
|
1451
1455
|
genAppOpts_: function() {
|
|
1452
|
-
return
|
|
1456
|
+
return qo();
|
|
1453
1457
|
},
|
|
1454
1458
|
genPageOpts_: function() {
|
|
1455
|
-
return
|
|
1459
|
+
return Qo(this.app.id);
|
|
1456
1460
|
},
|
|
1457
1461
|
onchange: function(t) {
|
|
1458
1462
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1467,7 +1471,7 @@ const zo = {
|
|
|
1467
1471
|
}
|
|
1468
1472
|
},
|
|
1469
1473
|
onAppChange_: function(t) {
|
|
1470
|
-
const e =
|
|
1474
|
+
const e = sn(t);
|
|
1471
1475
|
if (!e) {
|
|
1472
1476
|
console.assert(!1);
|
|
1473
1477
|
return;
|
|
@@ -1485,7 +1489,7 @@ const zo = {
|
|
|
1485
1489
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1486
1490
|
},
|
|
1487
1491
|
checkWarning_: function() {
|
|
1488
|
-
const t =
|
|
1492
|
+
const t = sn(this.app.id);
|
|
1489
1493
|
if (!t) {
|
|
1490
1494
|
this.setWarningText(_.WARN_APP_NOT_AVAIALABLE);
|
|
1491
1495
|
return;
|
|
@@ -1499,13 +1503,13 @@ const zo = {
|
|
|
1499
1503
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1500
1504
|
}
|
|
1501
1505
|
};
|
|
1502
|
-
d.navigate_to_v1 =
|
|
1506
|
+
d.navigate_to_v1 = Zo;
|
|
1503
1507
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1504
1508
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id), i = s.quote_(e.getFieldValue("MODE"));
|
|
1505
1509
|
return `__navigateToV1__(${n}, ${o}, ${i});
|
|
1506
1510
|
`;
|
|
1507
1511
|
};
|
|
1508
|
-
const
|
|
1512
|
+
const ei = {
|
|
1509
1513
|
init: function() {
|
|
1510
1514
|
this.node = {
|
|
1511
1515
|
id: "",
|
|
@@ -1548,7 +1552,7 @@ const Zo = {
|
|
|
1548
1552
|
return Ge("event");
|
|
1549
1553
|
},
|
|
1550
1554
|
genEventOpts_: function() {
|
|
1551
|
-
return
|
|
1555
|
+
return Uo(this.node.id);
|
|
1552
1556
|
},
|
|
1553
1557
|
onchange: function(t) {
|
|
1554
1558
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1621,7 +1625,7 @@ const Zo = {
|
|
|
1621
1625
|
this.setWarningText(null);
|
|
1622
1626
|
}
|
|
1623
1627
|
};
|
|
1624
|
-
d.on_node_event_v1 =
|
|
1628
|
+
d.on_node_event_v1 = ei;
|
|
1625
1629
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1626
1630
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1627
1631
|
let i = "";
|
|
@@ -1633,7 +1637,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1633
1637
|
${a}});
|
|
1634
1638
|
`;
|
|
1635
1639
|
};
|
|
1636
|
-
const
|
|
1640
|
+
const ti = {
|
|
1637
1641
|
init: function() {
|
|
1638
1642
|
this.element = {
|
|
1639
1643
|
key: "",
|
|
@@ -1675,7 +1679,7 @@ const ei = {
|
|
|
1675
1679
|
return ve("event");
|
|
1676
1680
|
},
|
|
1677
1681
|
genEventOpts_: function() {
|
|
1678
|
-
return
|
|
1682
|
+
return Ro(this.element.key);
|
|
1679
1683
|
},
|
|
1680
1684
|
onchange: function(t) {
|
|
1681
1685
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1744,7 +1748,7 @@ const ei = {
|
|
|
1744
1748
|
this.setWarningText(null);
|
|
1745
1749
|
}
|
|
1746
1750
|
};
|
|
1747
|
-
d.on_node_event_as_v1 =
|
|
1751
|
+
d.on_node_event_as_v1 = ti;
|
|
1748
1752
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1749
1753
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1750
1754
|
let i = "";
|
|
@@ -1756,7 +1760,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1756
1760
|
${a}});
|
|
1757
1761
|
`;
|
|
1758
1762
|
};
|
|
1759
|
-
const
|
|
1763
|
+
const ni = {
|
|
1760
1764
|
init: function() {
|
|
1761
1765
|
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}");
|
|
1762
1766
|
},
|
|
@@ -1785,7 +1789,7 @@ const ti = {
|
|
|
1785
1789
|
]);
|
|
1786
1790
|
}
|
|
1787
1791
|
};
|
|
1788
|
-
d.open_confirm_dlg_v1 =
|
|
1792
|
+
d.open_confirm_dlg_v1 = ni;
|
|
1789
1793
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1790
1794
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1791
1795
|
return `{
|
|
@@ -1793,7 +1797,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1793
1797
|
${o}}
|
|
1794
1798
|
`;
|
|
1795
1799
|
};
|
|
1796
|
-
const
|
|
1800
|
+
const oi = {
|
|
1797
1801
|
init: function() {
|
|
1798
1802
|
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}");
|
|
1799
1803
|
},
|
|
@@ -1824,7 +1828,7 @@ const ni = {
|
|
|
1824
1828
|
]);
|
|
1825
1829
|
}
|
|
1826
1830
|
};
|
|
1827
|
-
d.open_prompt_dlg_v1 =
|
|
1831
|
+
d.open_prompt_dlg_v1 = oi;
|
|
1828
1832
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1829
1833
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1830
1834
|
return `{
|
|
@@ -1864,7 +1868,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1864
1868
|
return `__messageV1__(${e}, ${n});
|
|
1865
1869
|
`;
|
|
1866
1870
|
};
|
|
1867
|
-
const
|
|
1871
|
+
const ii = {
|
|
1868
1872
|
init: function() {
|
|
1869
1873
|
this.comp = {
|
|
1870
1874
|
id: void 0,
|
|
@@ -1874,7 +1878,7 @@ const oi = {
|
|
|
1874
1878
|
initData_: function() {
|
|
1875
1879
|
if (this.comp.id !== void 0)
|
|
1876
1880
|
return;
|
|
1877
|
-
const t =
|
|
1881
|
+
const t = Bn()?.[0];
|
|
1878
1882
|
if (!t)
|
|
1879
1883
|
return;
|
|
1880
1884
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1892,7 +1896,7 @@ const oi = {
|
|
|
1892
1896
|
}, 0);
|
|
1893
1897
|
},
|
|
1894
1898
|
genCompOpts_: function() {
|
|
1895
|
-
return
|
|
1899
|
+
return zo();
|
|
1896
1900
|
},
|
|
1897
1901
|
onchange: function(t) {
|
|
1898
1902
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1907,7 +1911,7 @@ const oi = {
|
|
|
1907
1911
|
}
|
|
1908
1912
|
},
|
|
1909
1913
|
onCompChange_: function(t) {
|
|
1910
|
-
const e =
|
|
1914
|
+
const e = an(t);
|
|
1911
1915
|
if (!e) {
|
|
1912
1916
|
console.assert(!1);
|
|
1913
1917
|
return;
|
|
@@ -1919,19 +1923,19 @@ const oi = {
|
|
|
1919
1923
|
this.setWarningText(_.WARN_COMP_NOT_AVAIALABLE);
|
|
1920
1924
|
return;
|
|
1921
1925
|
}
|
|
1922
|
-
if (!
|
|
1926
|
+
if (!an(this.comp.id)) {
|
|
1923
1927
|
this.setWarningText(_.WARN_COMP_NOT_AVAIALABLE);
|
|
1924
1928
|
return;
|
|
1925
1929
|
}
|
|
1926
1930
|
this.setWarningText(null);
|
|
1927
1931
|
}
|
|
1928
1932
|
};
|
|
1929
|
-
d.select_comp_v1 =
|
|
1933
|
+
d.select_comp_v1 = ii;
|
|
1930
1934
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1931
1935
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1932
1936
|
return [e(o), c.ATOMIC];
|
|
1933
1937
|
};
|
|
1934
|
-
const
|
|
1938
|
+
const si = {
|
|
1935
1939
|
init: function() {
|
|
1936
1940
|
this.method = {
|
|
1937
1941
|
id: "",
|
|
@@ -1969,10 +1973,10 @@ const ii = {
|
|
|
1969
1973
|
}, 0);
|
|
1970
1974
|
},
|
|
1971
1975
|
genMethodOpts_: function() {
|
|
1972
|
-
return
|
|
1976
|
+
return Nn();
|
|
1973
1977
|
},
|
|
1974
1978
|
genOutputOpts_: function() {
|
|
1975
|
-
return
|
|
1979
|
+
return Fo(this.method.id);
|
|
1976
1980
|
},
|
|
1977
1981
|
onchange: function(t) {
|
|
1978
1982
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2039,7 +2043,7 @@ const ii = {
|
|
|
2039
2043
|
this.setWarningText(null);
|
|
2040
2044
|
}
|
|
2041
2045
|
};
|
|
2042
|
-
d.set_comp_method_output_v1 =
|
|
2046
|
+
d.set_comp_method_output_v1 = si;
|
|
2043
2047
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2044
2048
|
const e = t;
|
|
2045
2049
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2066,7 +2070,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2066
2070
|
return `__setCompMethodOutputV1__(${n});
|
|
2067
2071
|
`;
|
|
2068
2072
|
};
|
|
2069
|
-
const
|
|
2073
|
+
const ai = {
|
|
2070
2074
|
init: function() {
|
|
2071
2075
|
this.node = {
|
|
2072
2076
|
id: "",
|
|
@@ -2108,7 +2112,7 @@ const si = {
|
|
|
2108
2112
|
return Ge();
|
|
2109
2113
|
},
|
|
2110
2114
|
genPropOpts_: function() {
|
|
2111
|
-
return
|
|
2115
|
+
return yn(this.node.id);
|
|
2112
2116
|
},
|
|
2113
2117
|
onchange: function(t) {
|
|
2114
2118
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2150,14 +2154,14 @@ const si = {
|
|
|
2150
2154
|
n && n.dispose();
|
|
2151
2155
|
let o = null;
|
|
2152
2156
|
const i = t.raw;
|
|
2153
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o =
|
|
2157
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2154
2158
|
},
|
|
2155
2159
|
updateCheck_: function() {
|
|
2156
2160
|
const t = ae(this.node.id, this.prop.keys);
|
|
2157
2161
|
if (!t)
|
|
2158
2162
|
return;
|
|
2159
2163
|
const e = this.getInput("VALUE"), n = t.raw;
|
|
2160
|
-
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("
|
|
2164
|
+
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Color") : n.ui === "select" ? e.setCheck(Ce(n.items)) : n.ui === "multiTypes" ? e.setCheck(Ce(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2161
2165
|
},
|
|
2162
2166
|
checkWarning_: function() {
|
|
2163
2167
|
const t = Y(this.node.id);
|
|
@@ -2178,13 +2182,13 @@ const si = {
|
|
|
2178
2182
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2179
2183
|
}
|
|
2180
2184
|
};
|
|
2181
|
-
d.set_node_prop_v1 =
|
|
2185
|
+
d.set_node_prop_v1 = ai;
|
|
2182
2186
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2183
2187
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2184
2188
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2185
2189
|
`;
|
|
2186
2190
|
};
|
|
2187
|
-
const
|
|
2191
|
+
const ci = {
|
|
2188
2192
|
init: function() {
|
|
2189
2193
|
this.element = {
|
|
2190
2194
|
key: "",
|
|
@@ -2225,7 +2229,7 @@ const ai = {
|
|
|
2225
2229
|
return ve();
|
|
2226
2230
|
},
|
|
2227
2231
|
genPropOpts_: function() {
|
|
2228
|
-
return
|
|
2232
|
+
return vn(this.element.key);
|
|
2229
2233
|
},
|
|
2230
2234
|
onchange: function(t) {
|
|
2231
2235
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2267,14 +2271,14 @@ const ai = {
|
|
|
2267
2271
|
n && n.dispose();
|
|
2268
2272
|
let o = null;
|
|
2269
2273
|
const i = t.raw;
|
|
2270
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o =
|
|
2274
|
+
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2271
2275
|
},
|
|
2272
2276
|
updateCheck_: function() {
|
|
2273
2277
|
const t = se(this.element.key, this.prop.keys);
|
|
2274
2278
|
if (!t)
|
|
2275
2279
|
return;
|
|
2276
2280
|
const e = this.getInput("VALUE"), n = t.raw;
|
|
2277
|
-
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("
|
|
2281
|
+
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Color") : n.ui === "select" ? e.setCheck(Ce(n.items)) : n.ui === "multiTypes" ? e.setCheck(Ce(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2278
2282
|
},
|
|
2279
2283
|
checkWarning_: function() {
|
|
2280
2284
|
const t = _e(this.element.key);
|
|
@@ -2295,13 +2299,13 @@ const ai = {
|
|
|
2295
2299
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2296
2300
|
}
|
|
2297
2301
|
};
|
|
2298
|
-
d.set_node_prop_as_v1 =
|
|
2302
|
+
d.set_node_prop_as_v1 = ci;
|
|
2299
2303
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2300
2304
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2301
2305
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2302
2306
|
`;
|
|
2303
2307
|
};
|
|
2304
|
-
const
|
|
2308
|
+
const li = {
|
|
2305
2309
|
init: function() {
|
|
2306
2310
|
this.event = {
|
|
2307
2311
|
id: "",
|
|
@@ -2312,7 +2316,7 @@ const ci = {
|
|
|
2312
2316
|
initData_: function() {
|
|
2313
2317
|
if (this.event.id)
|
|
2314
2318
|
return;
|
|
2315
|
-
const t =
|
|
2319
|
+
const t = Ln()?.[0];
|
|
2316
2320
|
if (!t)
|
|
2317
2321
|
return;
|
|
2318
2322
|
this.event.id = t.id, this.event.name = t.name, this.event.params = t.params;
|
|
@@ -2330,7 +2334,7 @@ const ci = {
|
|
|
2330
2334
|
}, 0);
|
|
2331
2335
|
},
|
|
2332
2336
|
genEventOpts_: function() {
|
|
2333
|
-
return
|
|
2337
|
+
return Yo();
|
|
2334
2338
|
},
|
|
2335
2339
|
onchange: function(t) {
|
|
2336
2340
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2345,7 +2349,7 @@ const ci = {
|
|
|
2345
2349
|
}
|
|
2346
2350
|
},
|
|
2347
2351
|
onEventChange_: function(t) {
|
|
2348
|
-
const e =
|
|
2352
|
+
const e = nn(t);
|
|
2349
2353
|
e ? (this.event.id = e.id, this.event.name = e.name, this.event.params = e.params) : (this.event.id = "", this.event.name = "", this.event.params = []);
|
|
2350
2354
|
},
|
|
2351
2355
|
updateShape_: function() {
|
|
@@ -2373,7 +2377,7 @@ const ci = {
|
|
|
2373
2377
|
}
|
|
2374
2378
|
},
|
|
2375
2379
|
checkWarning_: function() {
|
|
2376
|
-
const t =
|
|
2380
|
+
const t = nn(this.event.id);
|
|
2377
2381
|
if (!t) {
|
|
2378
2382
|
this.setWarningText(_.WARN_EVENT_NOT_AVAILABLE);
|
|
2379
2383
|
return;
|
|
@@ -2385,7 +2389,7 @@ const ci = {
|
|
|
2385
2389
|
this.setWarningText(null);
|
|
2386
2390
|
}
|
|
2387
2391
|
};
|
|
2388
|
-
d.trigger_comp_event_v1 =
|
|
2392
|
+
d.trigger_comp_event_v1 = li;
|
|
2389
2393
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2390
2394
|
return "";
|
|
2391
2395
|
};
|
|
@@ -3092,7 +3096,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3092
3096
|
`
|
|
3093
3097
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3094
3098
|
};
|
|
3095
|
-
const
|
|
3099
|
+
const ui = v.xml, ri = [
|
|
3096
3100
|
{
|
|
3097
3101
|
type: "add_data_v1",
|
|
3098
3102
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3154,16 +3158,16 @@ const li = v.xml, ui = [
|
|
|
3154
3158
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3155
3159
|
}
|
|
3156
3160
|
];
|
|
3157
|
-
function
|
|
3158
|
-
const n =
|
|
3161
|
+
function _i(t, e) {
|
|
3162
|
+
const n = ri.find((o) => o.type === t);
|
|
3159
3163
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3160
3164
|
}
|
|
3161
|
-
const
|
|
3165
|
+
const pi = {
|
|
3162
3166
|
init: function() {
|
|
3163
3167
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3164
3168
|
},
|
|
3165
3169
|
mutationToDom: function() {
|
|
3166
|
-
const t =
|
|
3170
|
+
const t = ui.createElement("mutation");
|
|
3167
3171
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3168
3172
|
},
|
|
3169
3173
|
domToMutation: function(t) {
|
|
@@ -3192,12 +3196,12 @@ const _i = {
|
|
|
3192
3196
|
},
|
|
3193
3197
|
tryDuplicate_: function(t) {
|
|
3194
3198
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3195
|
-
if (e &&
|
|
3199
|
+
if (e && _i(e.type, t.oldInputName))
|
|
3196
3200
|
try {
|
|
3197
3201
|
E.disable();
|
|
3198
3202
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3199
3203
|
if (n) {
|
|
3200
|
-
const o =
|
|
3204
|
+
const o = Ht(
|
|
3201
3205
|
this.workspace,
|
|
3202
3206
|
this.key,
|
|
3203
3207
|
this.name,
|
|
@@ -3213,7 +3217,7 @@ const _i = {
|
|
|
3213
3217
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3214
3218
|
}
|
|
3215
3219
|
};
|
|
3216
|
-
d.parameter_v1 =
|
|
3220
|
+
d.parameter_v1 = pi;
|
|
3217
3221
|
s.forBlock.parameter_v1 = function(t) {
|
|
3218
3222
|
return [t.key, c.ATOMIC];
|
|
3219
3223
|
};
|
|
@@ -3226,7 +3230,7 @@ function ye(t) {
|
|
|
3226
3230
|
function Ze(t) {
|
|
3227
3231
|
return T.compute.spaces.find((e) => e.id === t);
|
|
3228
3232
|
}
|
|
3229
|
-
function
|
|
3233
|
+
function Rn(t) {
|
|
3230
3234
|
const e = [];
|
|
3231
3235
|
return ye().forEach(({ id: o, name: i }) => {
|
|
3232
3236
|
e.push([i, o]);
|
|
@@ -3241,7 +3245,7 @@ function Oe(t, e) {
|
|
|
3241
3245
|
if (n)
|
|
3242
3246
|
return n.funcs.find((o) => o.id === e);
|
|
3243
3247
|
}
|
|
3244
|
-
function
|
|
3248
|
+
function Dn(t) {
|
|
3245
3249
|
const e = [];
|
|
3246
3250
|
return Ye(t).forEach(({ id: o, name: i }) => {
|
|
3247
3251
|
e.push([i, o]);
|
|
@@ -3250,17 +3254,17 @@ function Rn(t) {
|
|
|
3250
3254
|
function Yt() {
|
|
3251
3255
|
return T.compute.activeFunc;
|
|
3252
3256
|
}
|
|
3253
|
-
function
|
|
3257
|
+
function cn(t) {
|
|
3254
3258
|
const { outputs: e } = T.compute.activeFunc;
|
|
3255
3259
|
return e.find((n) => n.id === t);
|
|
3256
3260
|
}
|
|
3257
|
-
function
|
|
3261
|
+
function hi() {
|
|
3258
3262
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3259
3263
|
return e.forEach(({ id: n, name: o }) => {
|
|
3260
3264
|
t.push([o, n]);
|
|
3261
3265
|
}), N(t);
|
|
3262
3266
|
}
|
|
3263
|
-
const
|
|
3267
|
+
const di = {
|
|
3264
3268
|
init: function() {
|
|
3265
3269
|
this.space = {
|
|
3266
3270
|
id: "",
|
|
@@ -3300,10 +3304,10 @@ const hi = {
|
|
|
3300
3304
|
}, 0);
|
|
3301
3305
|
},
|
|
3302
3306
|
genSpaceOpts_: function() {
|
|
3303
|
-
return
|
|
3307
|
+
return Rn();
|
|
3304
3308
|
},
|
|
3305
3309
|
genFuncOpts_: function() {
|
|
3306
|
-
return
|
|
3310
|
+
return Dn(this.space.id);
|
|
3307
3311
|
},
|
|
3308
3312
|
onchange: function(t) {
|
|
3309
3313
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3415,7 +3419,7 @@ const hi = {
|
|
|
3415
3419
|
this.setWarningText(null);
|
|
3416
3420
|
}
|
|
3417
3421
|
};
|
|
3418
|
-
d.call_func_v1 =
|
|
3422
|
+
d.call_func_v1 = di;
|
|
3419
3423
|
s.forBlock.call_func_v1 = function(t) {
|
|
3420
3424
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3421
3425
|
let l = "";
|
|
@@ -3442,7 +3446,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3442
3446
|
${r}${p}}
|
|
3443
3447
|
`;
|
|
3444
3448
|
};
|
|
3445
|
-
const
|
|
3449
|
+
const fi = {
|
|
3446
3450
|
init: function() {
|
|
3447
3451
|
this.space = {
|
|
3448
3452
|
id: "",
|
|
@@ -3482,10 +3486,10 @@ const di = {
|
|
|
3482
3486
|
}, 0);
|
|
3483
3487
|
},
|
|
3484
3488
|
genSpaceOpts_: function() {
|
|
3485
|
-
return
|
|
3489
|
+
return Rn();
|
|
3486
3490
|
},
|
|
3487
3491
|
genFuncOpts_: function() {
|
|
3488
|
-
return
|
|
3492
|
+
return Dn(this.space.id);
|
|
3489
3493
|
},
|
|
3490
3494
|
onchange: function(t) {
|
|
3491
3495
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3597,7 +3601,7 @@ const di = {
|
|
|
3597
3601
|
this.setWarningText(null);
|
|
3598
3602
|
}
|
|
3599
3603
|
};
|
|
3600
|
-
d.call_func_internal_v1 =
|
|
3604
|
+
d.call_func_internal_v1 = fi;
|
|
3601
3605
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3602
3606
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3603
3607
|
let l = `${e}var __inputs__ = {
|
|
@@ -3649,7 +3653,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3649
3653
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3650
3654
|
`;
|
|
3651
3655
|
};
|
|
3652
|
-
const
|
|
3656
|
+
const mi = {
|
|
3653
3657
|
init: function() {
|
|
3654
3658
|
this.func = {
|
|
3655
3659
|
id: "",
|
|
@@ -3704,7 +3708,7 @@ const fi = {
|
|
|
3704
3708
|
this.setWarningText(null);
|
|
3705
3709
|
}
|
|
3706
3710
|
};
|
|
3707
|
-
d.func_entry_v1 =
|
|
3711
|
+
d.func_entry_v1 = mi;
|
|
3708
3712
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3709
3713
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3710
3714
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3714,16 +3718,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3714
3718
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3715
3719
|
${n}}`;
|
|
3716
3720
|
};
|
|
3717
|
-
const
|
|
3721
|
+
const Ti = {
|
|
3718
3722
|
init: function() {
|
|
3719
3723
|
}
|
|
3720
3724
|
};
|
|
3721
|
-
d.on_flow_state_event_v1 =
|
|
3725
|
+
d.on_flow_state_event_v1 = Ti;
|
|
3722
3726
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3723
3727
|
return `__onFlowStateEventV1__();
|
|
3724
3728
|
`;
|
|
3725
3729
|
};
|
|
3726
|
-
const
|
|
3730
|
+
const Ei = {
|
|
3727
3731
|
init: function() {
|
|
3728
3732
|
this.output = {
|
|
3729
3733
|
id: "",
|
|
@@ -3748,7 +3752,7 @@ const Ti = {
|
|
|
3748
3752
|
}, 0);
|
|
3749
3753
|
},
|
|
3750
3754
|
genOutputOpts_: function() {
|
|
3751
|
-
return
|
|
3755
|
+
return hi();
|
|
3752
3756
|
},
|
|
3753
3757
|
onchange: function(t) {
|
|
3754
3758
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3763,7 +3767,7 @@ const Ti = {
|
|
|
3763
3767
|
}
|
|
3764
3768
|
},
|
|
3765
3769
|
onOutputChange_: function(t) {
|
|
3766
|
-
const e =
|
|
3770
|
+
const e = cn(t);
|
|
3767
3771
|
if (!e) {
|
|
3768
3772
|
console.assert(!1);
|
|
3769
3773
|
return;
|
|
@@ -3786,7 +3790,7 @@ const Ti = {
|
|
|
3786
3790
|
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);
|
|
3787
3791
|
},
|
|
3788
3792
|
checkWarning_: function() {
|
|
3789
|
-
const t =
|
|
3793
|
+
const t = cn(this.output.id);
|
|
3790
3794
|
if (!t) {
|
|
3791
3795
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3792
3796
|
return;
|
|
@@ -3798,7 +3802,7 @@ const Ti = {
|
|
|
3798
3802
|
this.setWarningText(null);
|
|
3799
3803
|
}
|
|
3800
3804
|
};
|
|
3801
|
-
d.set_func_output_v1 =
|
|
3805
|
+
d.set_func_output_v1 = Ei;
|
|
3802
3806
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3803
3807
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3804
3808
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3871,13 +3875,13 @@ function Lt(t, e, n) {
|
|
|
3871
3875
|
if (a)
|
|
3872
3876
|
return a.columns.find((l) => l.id === n);
|
|
3873
3877
|
}
|
|
3874
|
-
function
|
|
3878
|
+
function gi(t, e) {
|
|
3875
3879
|
const n = [];
|
|
3876
3880
|
return et(t, e).forEach(({ id: i, name: a }) => {
|
|
3877
3881
|
n.push([a, i]);
|
|
3878
3882
|
}), N(n);
|
|
3879
3883
|
}
|
|
3880
|
-
function
|
|
3884
|
+
function Ai(t) {
|
|
3881
3885
|
const e = t.getInput("TABLE").connection;
|
|
3882
3886
|
if (e.targetBlock())
|
|
3883
3887
|
return;
|
|
@@ -3911,7 +3915,7 @@ function gi(t) {
|
|
|
3911
3915
|
}, l = $.blocks.append(a, t.workspace);
|
|
3912
3916
|
e.connect(l.outputConnection);
|
|
3913
3917
|
}
|
|
3914
|
-
function
|
|
3918
|
+
function Ii(t) {
|
|
3915
3919
|
const e = t.getInput("HANDLE").connection;
|
|
3916
3920
|
if (e.targetBlock())
|
|
3917
3921
|
return;
|
|
@@ -3935,7 +3939,7 @@ function Ai(t) {
|
|
|
3935
3939
|
}, o = $.blocks.append(n, t.workspace);
|
|
3936
3940
|
e.connect(o.previousConnection);
|
|
3937
3941
|
}
|
|
3938
|
-
const
|
|
3942
|
+
const Oi = {
|
|
3939
3943
|
init: function() {
|
|
3940
3944
|
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}");
|
|
3941
3945
|
},
|
|
@@ -3951,14 +3955,14 @@ const Ii = {
|
|
|
3951
3955
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3952
3956
|
},
|
|
3953
3957
|
ensureBlocks_: function() {
|
|
3954
|
-
this.isInsertionMarker() || (
|
|
3958
|
+
this.isInsertionMarker() || (Ai(this), F(this, [
|
|
3955
3959
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3956
3960
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3957
3961
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3958
|
-
]),
|
|
3962
|
+
]), Ii(this));
|
|
3959
3963
|
}
|
|
3960
3964
|
};
|
|
3961
|
-
d.add_data_v1 =
|
|
3965
|
+
d.add_data_v1 = Oi;
|
|
3962
3966
|
s.forBlock.add_data_v1 = function(t) {
|
|
3963
3967
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3964
3968
|
return `{
|
|
@@ -3974,7 +3978,7 @@ ${e}}
|
|
|
3974
3978
|
${o}}
|
|
3975
3979
|
`;
|
|
3976
3980
|
};
|
|
3977
|
-
const
|
|
3981
|
+
const Ci = {
|
|
3978
3982
|
init: function() {
|
|
3979
3983
|
this.space = {
|
|
3980
3984
|
id: "",
|
|
@@ -4034,7 +4038,7 @@ const Oi = {
|
|
|
4034
4038
|
return pt(this.space.id);
|
|
4035
4039
|
},
|
|
4036
4040
|
genColumnOpts_: function() {
|
|
4037
|
-
return
|
|
4041
|
+
return gi(this.space.id, this.table.id);
|
|
4038
4042
|
},
|
|
4039
4043
|
onchange: function(t) {
|
|
4040
4044
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4127,7 +4131,7 @@ const Oi = {
|
|
|
4127
4131
|
this.setWarningText(null);
|
|
4128
4132
|
}
|
|
4129
4133
|
};
|
|
4130
|
-
d.cond_atomic_v1 =
|
|
4134
|
+
d.cond_atomic_v1 = Ci;
|
|
4131
4135
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4132
4136
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4133
4137
|
EQ: "=",
|
|
@@ -4139,19 +4143,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4139
4143
|
}[n.getFieldValue("OP")];
|
|
4140
4144
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4141
4145
|
};
|
|
4142
|
-
const
|
|
4146
|
+
const ki = {
|
|
4143
4147
|
init: function() {
|
|
4144
4148
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4145
4149
|
}
|
|
4146
4150
|
};
|
|
4147
|
-
d.cond_logic_container_v1 =
|
|
4148
|
-
const
|
|
4151
|
+
d.cond_logic_container_v1 = ki;
|
|
4152
|
+
const vi = {
|
|
4149
4153
|
init: function() {
|
|
4150
4154
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4151
4155
|
}
|
|
4152
4156
|
};
|
|
4153
|
-
d.cond_logic_item_v1 =
|
|
4154
|
-
const
|
|
4157
|
+
d.cond_logic_item_v1 = vi;
|
|
4158
|
+
const yi = {
|
|
4155
4159
|
init: function() {
|
|
4156
4160
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4157
4161
|
new f([
|
|
@@ -4225,7 +4229,7 @@ const vi = {
|
|
|
4225
4229
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4226
4230
|
}
|
|
4227
4231
|
};
|
|
4228
|
-
d.cond_logic_v1 =
|
|
4232
|
+
d.cond_logic_v1 = yi;
|
|
4229
4233
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4230
4234
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4231
4235
|
i.push(a);
|
|
@@ -4235,7 +4239,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4235
4239
|
}
|
|
4236
4240
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4237
4241
|
};
|
|
4238
|
-
function
|
|
4242
|
+
function Ni(t) {
|
|
4239
4243
|
const e = t.getInput("TABLE").connection;
|
|
4240
4244
|
if (e.targetBlock())
|
|
4241
4245
|
return;
|
|
@@ -4254,7 +4258,7 @@ function yi(t) {
|
|
|
4254
4258
|
}, a = $.blocks.append(i, t.workspace);
|
|
4255
4259
|
e.connect(a.outputConnection);
|
|
4256
4260
|
}
|
|
4257
|
-
function
|
|
4261
|
+
function Li(t) {
|
|
4258
4262
|
const e = t.getInput("CONDITION").connection;
|
|
4259
4263
|
if (e.targetBlock())
|
|
4260
4264
|
return;
|
|
@@ -4279,7 +4283,7 @@ function Ni(t) {
|
|
|
4279
4283
|
}, l = $.blocks.append(a, t.workspace);
|
|
4280
4284
|
e.connect(l.outputConnection);
|
|
4281
4285
|
}
|
|
4282
|
-
function
|
|
4286
|
+
function Si(t) {
|
|
4283
4287
|
const e = t.getInput("HANDLE").connection;
|
|
4284
4288
|
if (e.targetBlock())
|
|
4285
4289
|
return;
|
|
@@ -4303,7 +4307,7 @@ function Li(t) {
|
|
|
4303
4307
|
}, o = $.blocks.append(n, t.workspace);
|
|
4304
4308
|
e.connect(o.previousConnection);
|
|
4305
4309
|
}
|
|
4306
|
-
const
|
|
4310
|
+
const bi = {
|
|
4307
4311
|
init: function() {
|
|
4308
4312
|
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}");
|
|
4309
4313
|
},
|
|
@@ -4319,13 +4323,13 @@ const Si = {
|
|
|
4319
4323
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4320
4324
|
},
|
|
4321
4325
|
ensureBlocks_: function() {
|
|
4322
|
-
this.isInsertionMarker() || (
|
|
4326
|
+
this.isInsertionMarker() || (Ni(this), Li(this), F(this, [
|
|
4323
4327
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4324
4328
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4325
|
-
]),
|
|
4329
|
+
]), Si(this));
|
|
4326
4330
|
}
|
|
4327
4331
|
};
|
|
4328
|
-
d.delete_data_v1 =
|
|
4332
|
+
d.delete_data_v1 = bi;
|
|
4329
4333
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4330
4334
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4331
4335
|
return `{
|
|
@@ -4363,7 +4367,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4363
4367
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4364
4368
|
`;
|
|
4365
4369
|
};
|
|
4366
|
-
function
|
|
4370
|
+
function Bi(t) {
|
|
4367
4371
|
const e = t.getInput("TABLE").connection;
|
|
4368
4372
|
if (e.targetBlock())
|
|
4369
4373
|
return;
|
|
@@ -4397,7 +4401,7 @@ function bi(t) {
|
|
|
4397
4401
|
}, l = $.blocks.append(a, t.workspace);
|
|
4398
4402
|
e.connect(l.outputConnection);
|
|
4399
4403
|
}
|
|
4400
|
-
function
|
|
4404
|
+
function Ri(t) {
|
|
4401
4405
|
const e = t.getInput("CONDITION").connection;
|
|
4402
4406
|
if (e.targetBlock())
|
|
4403
4407
|
return;
|
|
@@ -4406,7 +4410,7 @@ function Bi(t) {
|
|
|
4406
4410
|
}, o = $.blocks.append(n, t.workspace);
|
|
4407
4411
|
e.connect(o.outputConnection);
|
|
4408
4412
|
}
|
|
4409
|
-
function
|
|
4413
|
+
function Di(t) {
|
|
4410
4414
|
const e = t.getInput("EXTRA").connection;
|
|
4411
4415
|
if (e.targetBlock())
|
|
4412
4416
|
return;
|
|
@@ -4443,7 +4447,7 @@ function Ri(t) {
|
|
|
4443
4447
|
}, o = $.blocks.append(n, t.workspace);
|
|
4444
4448
|
e.connect(o.outputConnection);
|
|
4445
4449
|
}
|
|
4446
|
-
function
|
|
4450
|
+
function Ui(t) {
|
|
4447
4451
|
const e = t.getInput("HANDLE").connection;
|
|
4448
4452
|
if (e.targetBlock())
|
|
4449
4453
|
return;
|
|
@@ -4481,7 +4485,7 @@ h([
|
|
|
4481
4485
|
style: "procedure_blocks"
|
|
4482
4486
|
}
|
|
4483
4487
|
]);
|
|
4484
|
-
const
|
|
4488
|
+
const Mi = {
|
|
4485
4489
|
init: function() {
|
|
4486
4490
|
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}");
|
|
4487
4491
|
},
|
|
@@ -4497,15 +4501,15 @@ const Ui = {
|
|
|
4497
4501
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4498
4502
|
},
|
|
4499
4503
|
ensureBlocks_: function() {
|
|
4500
|
-
this.isInsertionMarker() || (
|
|
4504
|
+
this.isInsertionMarker() || (Bi(this), Ri(this), Di(this), F(this, [
|
|
4501
4505
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4502
4506
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4503
4507
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4504
4508
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4505
|
-
]),
|
|
4509
|
+
]), Ui(this));
|
|
4506
4510
|
}
|
|
4507
4511
|
};
|
|
4508
|
-
d.query_data_v1 =
|
|
4512
|
+
d.query_data_v1 = Mi;
|
|
4509
4513
|
s.forBlock.query_data_v1 = function(t) {
|
|
4510
4514
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4511
4515
|
return `{
|
|
@@ -4578,19 +4582,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4578
4582
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4579
4583
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4580
4584
|
};
|
|
4581
|
-
const
|
|
4585
|
+
const Vi = {
|
|
4582
4586
|
init: function() {
|
|
4583
4587
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4584
4588
|
}
|
|
4585
4589
|
};
|
|
4586
|
-
d.select_column_container_v1 =
|
|
4587
|
-
const
|
|
4590
|
+
d.select_column_container_v1 = Vi;
|
|
4591
|
+
const Pi = {
|
|
4588
4592
|
init: function() {
|
|
4589
4593
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4590
4594
|
}
|
|
4591
4595
|
};
|
|
4592
|
-
d.select_column_item_v1 =
|
|
4593
|
-
const
|
|
4596
|
+
d.select_column_item_v1 = Pi;
|
|
4597
|
+
const xi = {
|
|
4594
4598
|
init: function() {
|
|
4595
4599
|
this.space = {
|
|
4596
4600
|
id: "",
|
|
@@ -4785,7 +4789,7 @@ const Pi = {
|
|
|
4785
4789
|
this.setWarningText(null);
|
|
4786
4790
|
}
|
|
4787
4791
|
};
|
|
4788
|
-
d.select_column_v1 =
|
|
4792
|
+
d.select_column_v1 = xi;
|
|
4789
4793
|
s.forBlock.select_column_v1 = function(t) {
|
|
4790
4794
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4791
4795
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4797,7 +4801,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4797
4801
|
A !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4798
4802
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4799
4803
|
};
|
|
4800
|
-
const
|
|
4804
|
+
const Fi = {
|
|
4801
4805
|
init: function() {
|
|
4802
4806
|
this.space = {
|
|
4803
4807
|
id: "",
|
|
@@ -4885,12 +4889,12 @@ const xi = {
|
|
|
4885
4889
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4886
4890
|
}
|
|
4887
4891
|
};
|
|
4888
|
-
d.select_table_v1 =
|
|
4892
|
+
d.select_table_v1 = Fi;
|
|
4889
4893
|
s.forBlock.select_table_v1 = function(t) {
|
|
4890
4894
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4891
4895
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4892
4896
|
};
|
|
4893
|
-
const
|
|
4897
|
+
const Yi = {
|
|
4894
4898
|
init: function() {
|
|
4895
4899
|
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}");
|
|
4896
4900
|
},
|
|
@@ -4912,9 +4916,9 @@ const Fi = {
|
|
|
4912
4916
|
]);
|
|
4913
4917
|
}
|
|
4914
4918
|
};
|
|
4915
|
-
d.transaction_v1 =
|
|
4919
|
+
d.transaction_v1 = Yi;
|
|
4916
4920
|
s.forBlock.transaction_v1 = function(t) {
|
|
4917
|
-
const e = s.INDENT, n = t, o =
|
|
4921
|
+
const e = s.INDENT, n = t, o = Bo(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4918
4922
|
return `{
|
|
4919
4923
|
${e}var __error${o}__ = '';
|
|
4920
4924
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4956,19 +4960,19 @@ ${e}}
|
|
|
4956
4960
|
}
|
|
4957
4961
|
`;
|
|
4958
4962
|
};
|
|
4959
|
-
const
|
|
4963
|
+
const wi = {
|
|
4960
4964
|
init: function() {
|
|
4961
4965
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4962
4966
|
}
|
|
4963
4967
|
};
|
|
4964
|
-
d.update_column_container_v1 =
|
|
4965
|
-
const
|
|
4968
|
+
d.update_column_container_v1 = wi;
|
|
4969
|
+
const Ki = {
|
|
4966
4970
|
init: function() {
|
|
4967
4971
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4968
4972
|
}
|
|
4969
4973
|
};
|
|
4970
|
-
d.update_column_item_v1 =
|
|
4971
|
-
const
|
|
4974
|
+
d.update_column_item_v1 = Ki;
|
|
4975
|
+
const $i = {
|
|
4972
4976
|
init: function() {
|
|
4973
4977
|
this.space = {
|
|
4974
4978
|
id: "",
|
|
@@ -5081,7 +5085,7 @@ const Ki = {
|
|
|
5081
5085
|
}
|
|
5082
5086
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5083
5087
|
i && i.dispose();
|
|
5084
|
-
const a =
|
|
5088
|
+
const a = tn(this.workspace, n.type);
|
|
5085
5089
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5086
5090
|
},
|
|
5087
5091
|
decompose: function(t) {
|
|
@@ -5165,7 +5169,7 @@ const Ki = {
|
|
|
5165
5169
|
const i = this.getFieldValue("COLUMN" + e), a = this.table.columns.find((u) => u.id === i);
|
|
5166
5170
|
if (!a)
|
|
5167
5171
|
continue;
|
|
5168
|
-
const l =
|
|
5172
|
+
const l = tn(this.workspace, a.type);
|
|
5169
5173
|
l && (n.setCheck(null), n.connect(l.outputConnection));
|
|
5170
5174
|
}
|
|
5171
5175
|
},
|
|
@@ -5197,7 +5201,7 @@ const Ki = {
|
|
|
5197
5201
|
this.setWarningText(null);
|
|
5198
5202
|
}
|
|
5199
5203
|
};
|
|
5200
|
-
d.update_column_v1 =
|
|
5204
|
+
d.update_column_v1 = $i;
|
|
5201
5205
|
s.forBlock.update_column_v1 = function(t) {
|
|
5202
5206
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5203
5207
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5209,7 +5213,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5209
5213
|
A !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5210
5214
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5211
5215
|
};
|
|
5212
|
-
function
|
|
5216
|
+
function Hi(t) {
|
|
5213
5217
|
const e = t.getInput("TABLE").connection;
|
|
5214
5218
|
if (e.targetBlock())
|
|
5215
5219
|
return;
|
|
@@ -5243,7 +5247,7 @@ function $i(t) {
|
|
|
5243
5247
|
}, l = $.blocks.append(a, t.workspace);
|
|
5244
5248
|
e.connect(l.outputConnection);
|
|
5245
5249
|
}
|
|
5246
|
-
function
|
|
5250
|
+
function Gi(t) {
|
|
5247
5251
|
const e = t.getInput("CONDITION").connection;
|
|
5248
5252
|
if (e.targetBlock())
|
|
5249
5253
|
return;
|
|
@@ -5252,7 +5256,7 @@ function Hi(t) {
|
|
|
5252
5256
|
}, o = $.blocks.append(n, t.workspace);
|
|
5253
5257
|
e.connect(o.outputConnection);
|
|
5254
5258
|
}
|
|
5255
|
-
function
|
|
5259
|
+
function Wi(t) {
|
|
5256
5260
|
const e = t.getInput("HANDLE").connection;
|
|
5257
5261
|
if (e.targetBlock())
|
|
5258
5262
|
return;
|
|
@@ -5276,7 +5280,7 @@ function Gi(t) {
|
|
|
5276
5280
|
}, o = $.blocks.append(n, t.workspace);
|
|
5277
5281
|
e.connect(o.previousConnection);
|
|
5278
5282
|
}
|
|
5279
|
-
const
|
|
5283
|
+
const ji = {
|
|
5280
5284
|
init: function() {
|
|
5281
5285
|
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}");
|
|
5282
5286
|
},
|
|
@@ -5292,14 +5296,14 @@ const Wi = {
|
|
|
5292
5296
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5293
5297
|
},
|
|
5294
5298
|
ensureBlocks: function() {
|
|
5295
|
-
this.isInsertionMarker() || (
|
|
5299
|
+
this.isInsertionMarker() || (Hi(this), Gi(this), F(this, [
|
|
5296
5300
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5297
5301
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5298
5302
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5299
|
-
]),
|
|
5303
|
+
]), Wi(this));
|
|
5300
5304
|
}
|
|
5301
5305
|
};
|
|
5302
|
-
d.update_data_v1 =
|
|
5306
|
+
d.update_data_v1 = ji;
|
|
5303
5307
|
s.forBlock.update_data_v1 = function(t) {
|
|
5304
5308
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5305
5309
|
return `{
|
|
@@ -5316,7 +5320,7 @@ ${e}}
|
|
|
5316
5320
|
${i}}
|
|
5317
5321
|
`;
|
|
5318
5322
|
};
|
|
5319
|
-
const
|
|
5323
|
+
const Xi = v.xml, Ji = {
|
|
5320
5324
|
init: function() {
|
|
5321
5325
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5322
5326
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5325,7 +5329,7 @@ const ji = v.xml, Xi = {
|
|
|
5325
5329
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5326
5330
|
},
|
|
5327
5331
|
mutationToDom: function() {
|
|
5328
|
-
const t =
|
|
5332
|
+
const t = Xi.createElement("mutation");
|
|
5329
5333
|
return t.setAttribute("items", String(this.length)), t;
|
|
5330
5334
|
},
|
|
5331
5335
|
domToMutation: function(t) {
|
|
@@ -5341,7 +5345,7 @@ const ji = v.xml, Xi = {
|
|
|
5341
5345
|
new z(Ie, 20, 20, void 0, () => {
|
|
5342
5346
|
this.isInFlyout || this.addEntry_(n);
|
|
5343
5347
|
})
|
|
5344
|
-
), n.appendField(new
|
|
5348
|
+
), n.appendField(new en(String(t))), n.appendField(
|
|
5345
5349
|
new z(Qe, 20, 20, void 0, () => {
|
|
5346
5350
|
this.isInFlyout || this.removeEntry_(n);
|
|
5347
5351
|
})
|
|
@@ -5360,7 +5364,7 @@ const ji = v.xml, Xi = {
|
|
|
5360
5364
|
new z(Ie, 20, 20, void 0, () => {
|
|
5361
5365
|
this.isInFlyout || this.addEntry_(n);
|
|
5362
5366
|
})
|
|
5363
|
-
), n.appendField(new
|
|
5367
|
+
), n.appendField(new en(String(e))), n.appendField(
|
|
5364
5368
|
new z(Qe, 20, 20, void 0, () => {
|
|
5365
5369
|
this.isInFlyout || this.removeEntry_(n);
|
|
5366
5370
|
})
|
|
@@ -5377,11 +5381,11 @@ const ji = v.xml, Xi = {
|
|
|
5377
5381
|
this.length--;
|
|
5378
5382
|
}
|
|
5379
5383
|
};
|
|
5380
|
-
d.json_array_v1 =
|
|
5381
|
-
const
|
|
5384
|
+
d.json_array_v1 = Ji;
|
|
5385
|
+
const qi = {
|
|
5382
5386
|
init: function() {
|
|
5383
5387
|
this.appendDummyInput().appendField(
|
|
5384
|
-
new
|
|
5388
|
+
new dn([
|
|
5385
5389
|
["false", "false"],
|
|
5386
5390
|
["true", "true"]
|
|
5387
5391
|
]),
|
|
@@ -5389,8 +5393,8 @@ const Ji = {
|
|
|
5389
5393
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5390
5394
|
}
|
|
5391
5395
|
};
|
|
5392
|
-
d.json_boolean_v1 =
|
|
5393
|
-
const
|
|
5396
|
+
d.json_boolean_v1 = qi;
|
|
5397
|
+
const ln = v.xml, Qi = {
|
|
5394
5398
|
init: function() {
|
|
5395
5399
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5396
5400
|
new z(Ie, 20, 20, void 0, () => {
|
|
@@ -5399,9 +5403,9 @@ const cn = v.xml, qi = {
|
|
|
5399
5403
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5400
5404
|
},
|
|
5401
5405
|
mutationToDom: function() {
|
|
5402
|
-
const t =
|
|
5406
|
+
const t = ln.createElement("mutation");
|
|
5403
5407
|
for (let e = 0; e < this.length; e++) {
|
|
5404
|
-
const n =
|
|
5408
|
+
const n = ln.createElement("item");
|
|
5405
5409
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5406
5410
|
}
|
|
5407
5411
|
return t;
|
|
@@ -5456,38 +5460,38 @@ const cn = v.xml, qi = {
|
|
|
5456
5460
|
this.length--;
|
|
5457
5461
|
}
|
|
5458
5462
|
};
|
|
5459
|
-
d.json_map_v1 =
|
|
5460
|
-
const
|
|
5463
|
+
d.json_map_v1 = Qi;
|
|
5464
|
+
const zi = {
|
|
5461
5465
|
init: function() {
|
|
5462
5466
|
this.appendDummyInput().appendField(new Rt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5463
5467
|
}
|
|
5464
5468
|
};
|
|
5465
|
-
d.json_number_v1 =
|
|
5466
|
-
const
|
|
5469
|
+
d.json_number_v1 = zi;
|
|
5470
|
+
const Zi = {
|
|
5467
5471
|
init: function() {
|
|
5468
5472
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5469
5473
|
}
|
|
5470
5474
|
};
|
|
5471
|
-
d.json_root_v1 =
|
|
5472
|
-
const
|
|
5475
|
+
d.json_root_v1 = Zi;
|
|
5476
|
+
const es = {
|
|
5473
5477
|
init: function() {
|
|
5474
5478
|
this.appendDummyInput().appendField('"').appendField(new re(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5475
5479
|
}
|
|
5476
5480
|
};
|
|
5477
|
-
d.json_string_v1 =
|
|
5478
|
-
const
|
|
5481
|
+
d.json_string_v1 = es;
|
|
5482
|
+
const ts = v.xml, ns = {
|
|
5479
5483
|
init: function() {
|
|
5480
5484
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5481
5485
|
}
|
|
5482
5486
|
};
|
|
5483
|
-
d.list_create_container_v1 =
|
|
5484
|
-
const
|
|
5487
|
+
d.list_create_container_v1 = ns;
|
|
5488
|
+
const os = {
|
|
5485
5489
|
init: function() {
|
|
5486
5490
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5487
5491
|
}
|
|
5488
5492
|
};
|
|
5489
|
-
d.list_create_item_v1 =
|
|
5490
|
-
const
|
|
5493
|
+
d.list_create_item_v1 = os;
|
|
5494
|
+
const is = {
|
|
5491
5495
|
init: function() {
|
|
5492
5496
|
this.itemCount_ = 0, this.setMutator(
|
|
5493
5497
|
new Te.MutatorIcon(
|
|
@@ -5497,7 +5501,7 @@ const os = {
|
|
|
5497
5501
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5498
5502
|
},
|
|
5499
5503
|
mutationToDom: function() {
|
|
5500
|
-
const t =
|
|
5504
|
+
const t = ts.createElement("mutation");
|
|
5501
5505
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5502
5506
|
},
|
|
5503
5507
|
domToMutation: function(t) {
|
|
@@ -5570,7 +5574,7 @@ const os = {
|
|
|
5570
5574
|
this.removeInput("ADD" + t);
|
|
5571
5575
|
}
|
|
5572
5576
|
};
|
|
5573
|
-
d.list_create_v1 =
|
|
5577
|
+
d.list_create_v1 = is;
|
|
5574
5578
|
s.forBlock.list_create_v1 = function(t) {
|
|
5575
5579
|
const e = t, n = new Array(e.itemCount_);
|
|
5576
5580
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5786,7 +5790,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5786
5790
|
return `${e}[${n}] = ${o};
|
|
5787
5791
|
`;
|
|
5788
5792
|
};
|
|
5789
|
-
const
|
|
5793
|
+
const ss = {
|
|
5790
5794
|
// logic_compare
|
|
5791
5795
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5792
5796
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5800,7 +5804,7 @@ const is = {
|
|
|
5800
5804
|
};
|
|
5801
5805
|
R.register(
|
|
5802
5806
|
"logic_op_tooltip_v1",
|
|
5803
|
-
R.buildTooltipForDropdown("OP",
|
|
5807
|
+
R.buildTooltipForDropdown("OP", ss)
|
|
5804
5808
|
);
|
|
5805
5809
|
h([
|
|
5806
5810
|
{
|
|
@@ -5825,7 +5829,7 @@ h([
|
|
|
5825
5829
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5826
5830
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5827
5831
|
};
|
|
5828
|
-
const
|
|
5832
|
+
const as = {
|
|
5829
5833
|
onchange: function(t) {
|
|
5830
5834
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5831
5835
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5845,7 +5849,7 @@ const ss = {
|
|
|
5845
5849
|
R.register(
|
|
5846
5850
|
"logic_compare_v1",
|
|
5847
5851
|
function() {
|
|
5848
|
-
this.mixin(
|
|
5852
|
+
this.mixin(as);
|
|
5849
5853
|
}
|
|
5850
5854
|
);
|
|
5851
5855
|
h([
|
|
@@ -5895,7 +5899,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5895
5899
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5896
5900
|
return [`${i} ${n} ${a}`, o];
|
|
5897
5901
|
};
|
|
5898
|
-
const
|
|
5902
|
+
const cs = {
|
|
5899
5903
|
elseIfCount_: 0,
|
|
5900
5904
|
hasElse_: !1,
|
|
5901
5905
|
mutationToDom: function() {
|
|
@@ -6022,7 +6026,7 @@ const as = {
|
|
|
6022
6026
|
};
|
|
6023
6027
|
R.registerMutator(
|
|
6024
6028
|
"logic_if_v1_mutator",
|
|
6025
|
-
|
|
6029
|
+
cs,
|
|
6026
6030
|
void 0,
|
|
6027
6031
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6028
6032
|
);
|
|
@@ -6168,7 +6172,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6168
6172
|
}
|
|
6169
6173
|
return [`${o} ${e} ${i}`, n];
|
|
6170
6174
|
};
|
|
6171
|
-
const
|
|
6175
|
+
const ls = {
|
|
6172
6176
|
prevParentConnection_: null,
|
|
6173
6177
|
onchange: function(t) {
|
|
6174
6178
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6183,7 +6187,7 @@ const cs = {
|
|
|
6183
6187
|
this.prevParentConnection_ = o;
|
|
6184
6188
|
}
|
|
6185
6189
|
};
|
|
6186
|
-
R.registerMixin("logic_ternary_v1",
|
|
6190
|
+
R.registerMixin("logic_ternary_v1", ls);
|
|
6187
6191
|
h([
|
|
6188
6192
|
{
|
|
6189
6193
|
type: "logic_ternary_v1",
|
|
@@ -6220,7 +6224,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6220
6224
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6221
6225
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6222
6226
|
};
|
|
6223
|
-
const
|
|
6227
|
+
const us = {
|
|
6224
6228
|
customContextMenu: function(t) {
|
|
6225
6229
|
if (this.isInFlyout)
|
|
6226
6230
|
return;
|
|
@@ -6235,14 +6239,14 @@ const ls = {
|
|
|
6235
6239
|
t.push({
|
|
6236
6240
|
enabled: !0,
|
|
6237
6241
|
text: _.VARIABLE_SET_CREATE_GET.replace("%1", o),
|
|
6238
|
-
callback:
|
|
6242
|
+
callback: fn.callbackFactory(this, i)
|
|
6239
6243
|
});
|
|
6240
6244
|
}
|
|
6241
6245
|
}
|
|
6242
6246
|
};
|
|
6243
6247
|
R.registerMixin(
|
|
6244
6248
|
"contextMenu_newGetVariableBlock_v1",
|
|
6245
|
-
|
|
6249
|
+
us
|
|
6246
6250
|
);
|
|
6247
6251
|
R.register(
|
|
6248
6252
|
"flow_control_tooltip_v1",
|
|
@@ -6251,16 +6255,16 @@ R.register(
|
|
|
6251
6255
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6252
6256
|
})
|
|
6253
6257
|
);
|
|
6254
|
-
const
|
|
6258
|
+
const rs = /* @__PURE__ */ new Set([
|
|
6255
6259
|
"repeat_v1",
|
|
6256
6260
|
"for_each_v1",
|
|
6257
6261
|
"for_v1",
|
|
6258
6262
|
"while_until_v1"
|
|
6259
|
-
]),
|
|
6263
|
+
]), _s = {
|
|
6260
6264
|
getSurroundLoop: function() {
|
|
6261
6265
|
let t = this;
|
|
6262
6266
|
do {
|
|
6263
|
-
if (
|
|
6267
|
+
if (rs.has(t.type))
|
|
6264
6268
|
return t;
|
|
6265
6269
|
t = t?.getSurroundParent();
|
|
6266
6270
|
} while (t);
|
|
@@ -6283,7 +6287,7 @@ const us = /* @__PURE__ */ new Set([
|
|
|
6283
6287
|
};
|
|
6284
6288
|
R.registerMixin(
|
|
6285
6289
|
"flow_control_in_loop_check_v1",
|
|
6286
|
-
|
|
6290
|
+
_s
|
|
6287
6291
|
);
|
|
6288
6292
|
h([
|
|
6289
6293
|
{
|
|
@@ -6585,7 +6589,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6585
6589
|
${o}}
|
|
6586
6590
|
`;
|
|
6587
6591
|
};
|
|
6588
|
-
const
|
|
6592
|
+
const ps = {
|
|
6589
6593
|
// math_arithmetic
|
|
6590
6594
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6591
6595
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6619,7 +6623,7 @@ const _s = {
|
|
|
6619
6623
|
};
|
|
6620
6624
|
R.register(
|
|
6621
6625
|
"math_op_tooltip_v1",
|
|
6622
|
-
R.buildTooltipForDropdown("OP",
|
|
6626
|
+
R.buildTooltipForDropdown("OP", ps)
|
|
6623
6627
|
);
|
|
6624
6628
|
h([
|
|
6625
6629
|
{
|
|
@@ -7222,21 +7226,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7222
7226
|
}
|
|
7223
7227
|
return [o, c.DIVISION];
|
|
7224
7228
|
};
|
|
7225
|
-
const
|
|
7229
|
+
const hs = v.xml, ds = {
|
|
7226
7230
|
init: function() {
|
|
7227
7231
|
this.appendDummyInput().appendField(
|
|
7228
7232
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7229
7233
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7230
7234
|
}
|
|
7231
7235
|
};
|
|
7232
|
-
d.object_create_container_v1 =
|
|
7233
|
-
const
|
|
7236
|
+
d.object_create_container_v1 = ds;
|
|
7237
|
+
const fs = {
|
|
7234
7238
|
init: function() {
|
|
7235
7239
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7236
7240
|
}
|
|
7237
7241
|
};
|
|
7238
|
-
d.object_create_item_v1 =
|
|
7239
|
-
const
|
|
7242
|
+
d.object_create_item_v1 = fs;
|
|
7243
|
+
const ms = {
|
|
7240
7244
|
init: function() {
|
|
7241
7245
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7242
7246
|
new Te.MutatorIcon(
|
|
@@ -7246,7 +7250,7 @@ const fs = {
|
|
|
7246
7250
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7247
7251
|
},
|
|
7248
7252
|
mutationToDom: function() {
|
|
7249
|
-
const t =
|
|
7253
|
+
const t = hs.createElement("mutation");
|
|
7250
7254
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7251
7255
|
},
|
|
7252
7256
|
domToMutation: function(t) {
|
|
@@ -7310,7 +7314,7 @@ const fs = {
|
|
|
7310
7314
|
this.removeInput("ADD" + t);
|
|
7311
7315
|
}
|
|
7312
7316
|
};
|
|
7313
|
-
d.object_create_v1 =
|
|
7317
|
+
d.object_create_v1 = ms;
|
|
7314
7318
|
s.forBlock.object_create_v1 = function(t) {
|
|
7315
7319
|
const e = t;
|
|
7316
7320
|
let n = "{";
|
|
@@ -7568,13 +7572,13 @@ h([
|
|
|
7568
7572
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7569
7573
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7570
7574
|
};
|
|
7571
|
-
const
|
|
7575
|
+
const un = v.xml, Ts = {
|
|
7572
7576
|
init: function() {
|
|
7573
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7577
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new uo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7574
7578
|
}
|
|
7575
7579
|
};
|
|
7576
|
-
d.procedure_def_container_v1 =
|
|
7577
|
-
const
|
|
7580
|
+
d.procedure_def_container_v1 = Ts;
|
|
7581
|
+
const Es = {
|
|
7578
7582
|
init: function() {
|
|
7579
7583
|
const t = new re(Dt.DEFAULT_ARG);
|
|
7580
7584
|
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;
|
|
@@ -7596,8 +7600,8 @@ const Ts = {
|
|
|
7596
7600
|
return t;
|
|
7597
7601
|
}
|
|
7598
7602
|
};
|
|
7599
|
-
d.procedure_def_item_v1 =
|
|
7600
|
-
const
|
|
7603
|
+
d.procedure_def_item_v1 = Es;
|
|
7604
|
+
const gs = {
|
|
7601
7605
|
init: function() {
|
|
7602
7606
|
this.withReturn = !1, this.args = [];
|
|
7603
7607
|
const t = new re(
|
|
@@ -7611,9 +7615,9 @@ const Es = {
|
|
|
7611
7615
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7612
7616
|
},
|
|
7613
7617
|
mutationToDom: function() {
|
|
7614
|
-
const t =
|
|
7618
|
+
const t = un.createElement("mutation");
|
|
7615
7619
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7616
|
-
const n =
|
|
7620
|
+
const n = un.createElement("arg");
|
|
7617
7621
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7618
7622
|
}), t;
|
|
7619
7623
|
},
|
|
@@ -7689,7 +7693,7 @@ const Es = {
|
|
|
7689
7693
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7690
7694
|
else
|
|
7691
7695
|
try {
|
|
7692
|
-
E.disable(), o =
|
|
7696
|
+
E.disable(), o = Ht(
|
|
7693
7697
|
this.workspace,
|
|
7694
7698
|
`__param@${e.id}__`,
|
|
7695
7699
|
e.name,
|
|
@@ -7701,13 +7705,13 @@ const Es = {
|
|
|
7701
7705
|
}
|
|
7702
7706
|
}
|
|
7703
7707
|
};
|
|
7704
|
-
d.procedure_def_v1 =
|
|
7705
|
-
const
|
|
7708
|
+
d.procedure_def_v1 = gs;
|
|
7709
|
+
const As = v.xml, Is = {
|
|
7706
7710
|
init: function() {
|
|
7707
7711
|
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}");
|
|
7708
7712
|
},
|
|
7709
7713
|
mutationToDom: function() {
|
|
7710
|
-
const t =
|
|
7714
|
+
const t = As.createElement("mutation");
|
|
7711
7715
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7712
7716
|
},
|
|
7713
7717
|
domToMutation: function(t) {
|
|
@@ -7758,14 +7762,14 @@ const gs = v.xml, As = {
|
|
|
7758
7762
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7759
7763
|
}
|
|
7760
7764
|
};
|
|
7761
|
-
d.procedure_return_v1 =
|
|
7765
|
+
d.procedure_return_v1 = Is;
|
|
7762
7766
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7763
7767
|
const e = t;
|
|
7764
7768
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7765
7769
|
` : `return;
|
|
7766
7770
|
`;
|
|
7767
7771
|
};
|
|
7768
|
-
const
|
|
7772
|
+
const Os = {
|
|
7769
7773
|
init: function() {
|
|
7770
7774
|
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}");
|
|
7771
7775
|
},
|
|
@@ -7788,7 +7792,7 @@ const Is = {
|
|
|
7788
7792
|
]);
|
|
7789
7793
|
}
|
|
7790
7794
|
};
|
|
7791
|
-
d.download_resource_v1 =
|
|
7795
|
+
d.download_resource_v1 = Os;
|
|
7792
7796
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7793
7797
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7794
7798
|
return `{
|
|
@@ -7800,7 +7804,7 @@ ${n}
|
|
|
7800
7804
|
}
|
|
7801
7805
|
`;
|
|
7802
7806
|
};
|
|
7803
|
-
function
|
|
7807
|
+
function Un(t) {
|
|
7804
7808
|
const e = T.resource.spaces.find((i) => i.id === t);
|
|
7805
7809
|
if (!e)
|
|
7806
7810
|
return [];
|
|
@@ -7816,13 +7820,13 @@ function Dn(t) {
|
|
|
7816
7820
|
}
|
|
7817
7821
|
return o(e.dirTree, ""), n;
|
|
7818
7822
|
}
|
|
7819
|
-
function
|
|
7823
|
+
function Cs(t) {
|
|
7820
7824
|
const e = [];
|
|
7821
|
-
return
|
|
7825
|
+
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7822
7826
|
e.push([i, o]);
|
|
7823
7827
|
}), N(e);
|
|
7824
7828
|
}
|
|
7825
|
-
function
|
|
7829
|
+
function Mn(t, e) {
|
|
7826
7830
|
const n = T.resource.spaces.find((i) => i.id === t);
|
|
7827
7831
|
if (!n)
|
|
7828
7832
|
return [];
|
|
@@ -7831,25 +7835,25 @@ function Un(t, e) {
|
|
|
7831
7835
|
i.dirid === e && o.push(i);
|
|
7832
7836
|
}), o;
|
|
7833
7837
|
}
|
|
7834
|
-
function
|
|
7838
|
+
function ks(t, e) {
|
|
7835
7839
|
const n = [];
|
|
7836
|
-
return
|
|
7840
|
+
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7837
7841
|
n.push([a, i]);
|
|
7838
7842
|
}), N(n);
|
|
7839
7843
|
}
|
|
7840
|
-
function
|
|
7844
|
+
function Vn() {
|
|
7841
7845
|
const t = [];
|
|
7842
7846
|
return T.resource.spaces.forEach((e) => {
|
|
7843
7847
|
e.resources.length > 0 && t.push(e);
|
|
7844
7848
|
}), t;
|
|
7845
7849
|
}
|
|
7846
|
-
function
|
|
7850
|
+
function vs() {
|
|
7847
7851
|
const t = [];
|
|
7848
|
-
return
|
|
7852
|
+
return Vn().forEach(({ id: n, name: o }) => {
|
|
7849
7853
|
t.push([o, n]);
|
|
7850
7854
|
}), N(t);
|
|
7851
7855
|
}
|
|
7852
|
-
const
|
|
7856
|
+
const ys = {
|
|
7853
7857
|
init: function() {
|
|
7854
7858
|
this.space = {
|
|
7855
7859
|
id: "",
|
|
@@ -7868,19 +7872,19 @@ const vs = {
|
|
|
7868
7872
|
initData_: function() {
|
|
7869
7873
|
if (this.space.id)
|
|
7870
7874
|
return;
|
|
7871
|
-
const t =
|
|
7875
|
+
const t = Vn()?.[0];
|
|
7872
7876
|
if (!t)
|
|
7873
7877
|
return;
|
|
7874
7878
|
this.space.id = t.id, this.space.name = t.name;
|
|
7875
7879
|
const e = this.getField("SPACE");
|
|
7876
7880
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7877
|
-
const n =
|
|
7881
|
+
const n = Un(this.space.id)?.[0];
|
|
7878
7882
|
if (!n)
|
|
7879
7883
|
return;
|
|
7880
7884
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7881
7885
|
const o = this.getField("DIR");
|
|
7882
7886
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7883
|
-
const i =
|
|
7887
|
+
const i = Mn(this.space.id, this.dir.id)?.[0];
|
|
7884
7888
|
if (!i)
|
|
7885
7889
|
return;
|
|
7886
7890
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7898,20 +7902,20 @@ const vs = {
|
|
|
7898
7902
|
this.space = De(t.space), this.dir = De(t.dir), this.resource = De(t.resource);
|
|
7899
7903
|
},
|
|
7900
7904
|
genSpaceOpts_: function() {
|
|
7901
|
-
return
|
|
7905
|
+
return vs();
|
|
7902
7906
|
},
|
|
7903
7907
|
genDirOpts_: function() {
|
|
7904
|
-
return
|
|
7908
|
+
return Cs(this.space.id);
|
|
7905
7909
|
},
|
|
7906
7910
|
genResourceOpts_: function() {
|
|
7907
|
-
return
|
|
7911
|
+
return ks(this.space.id, this.dir.id);
|
|
7908
7912
|
}
|
|
7909
7913
|
};
|
|
7910
|
-
d.select_resource_v1 =
|
|
7914
|
+
d.select_resource_v1 = ys;
|
|
7911
7915
|
s.forBlock.select_resource_v1 = function() {
|
|
7912
7916
|
return "";
|
|
7913
7917
|
};
|
|
7914
|
-
const
|
|
7918
|
+
const Ns = {
|
|
7915
7919
|
init: function() {
|
|
7916
7920
|
this.appendDummyInput().appendField(
|
|
7917
7921
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7942,7 +7946,7 @@ const ys = {
|
|
|
7942
7946
|
]);
|
|
7943
7947
|
}
|
|
7944
7948
|
};
|
|
7945
|
-
d.upload_resource_v1 =
|
|
7949
|
+
d.upload_resource_v1 = Ns;
|
|
7946
7950
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7947
7951
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7948
7952
|
return `{
|
|
@@ -7975,9 +7979,9 @@ h([
|
|
|
7975
7979
|
s.forBlock.text_v1 = function(t) {
|
|
7976
7980
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7977
7981
|
};
|
|
7978
|
-
const
|
|
7982
|
+
const Ls = /^\s*'([^']|\\')*'\s*$/;
|
|
7979
7983
|
function qe(t) {
|
|
7980
|
-
return
|
|
7984
|
+
return Ls.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7981
7985
|
}
|
|
7982
7986
|
R.register(
|
|
7983
7987
|
"text_append_tooltip_v1",
|
|
@@ -8181,10 +8185,10 @@ h([
|
|
|
8181
8185
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8182
8186
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8183
8187
|
};
|
|
8184
|
-
const
|
|
8188
|
+
const Ss = v.xml, bs = {
|
|
8185
8189
|
itemCount_: 0,
|
|
8186
8190
|
mutationToDom: function() {
|
|
8187
|
-
const t =
|
|
8191
|
+
const t = Ss.createElement("mutation");
|
|
8188
8192
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8189
8193
|
},
|
|
8190
8194
|
domToMutation: function(t) {
|
|
@@ -8255,13 +8259,13 @@ const Ls = v.xml, Ss = {
|
|
|
8255
8259
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8256
8260
|
this.removeInput("ADD" + t);
|
|
8257
8261
|
}
|
|
8258
|
-
},
|
|
8262
|
+
}, Bs = function() {
|
|
8259
8263
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Te.MutatorIcon(["text_join_item_v1"], this));
|
|
8260
8264
|
};
|
|
8261
8265
|
R.registerMutator(
|
|
8262
8266
|
"text_join_mutator_v1",
|
|
8263
|
-
|
|
8264
|
-
|
|
8267
|
+
bs,
|
|
8268
|
+
Bs
|
|
8265
8269
|
);
|
|
8266
8270
|
h([
|
|
8267
8271
|
{
|
|
@@ -8493,7 +8497,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8493
8497
|
}[t.getFieldValue("MODE")];
|
|
8494
8498
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8495
8499
|
};
|
|
8496
|
-
const
|
|
8500
|
+
const Rs = {
|
|
8497
8501
|
init: function() {
|
|
8498
8502
|
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}");
|
|
8499
8503
|
},
|
|
@@ -8518,7 +8522,7 @@ const Bs = {
|
|
|
8518
8522
|
));
|
|
8519
8523
|
}
|
|
8520
8524
|
};
|
|
8521
|
-
d.create_timer_v1 =
|
|
8525
|
+
d.create_timer_v1 = Rs;
|
|
8522
8526
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8523
8527
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8524
8528
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8547,18 +8551,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8547
8551
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8548
8552
|
`;
|
|
8549
8553
|
};
|
|
8550
|
-
const
|
|
8554
|
+
const Ds = {
|
|
8551
8555
|
customContextMenu: function(t) {
|
|
8552
8556
|
if (this.isInFlyout) {
|
|
8553
8557
|
if (this.type === "variable_get_v1") {
|
|
8554
8558
|
const e = {
|
|
8555
8559
|
text: _.RENAME_VARIABLE,
|
|
8556
8560
|
enabled: !0,
|
|
8557
|
-
callback:
|
|
8561
|
+
callback: Us(this)
|
|
8558
8562
|
}, n = this.getField("VAR").getText(), o = {
|
|
8559
8563
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8560
8564
|
enabled: !0,
|
|
8561
|
-
callback:
|
|
8565
|
+
callback: Ms(this)
|
|
8562
8566
|
};
|
|
8563
8567
|
t.unshift(e), t.unshift(o);
|
|
8564
8568
|
}
|
|
@@ -8572,16 +8576,16 @@ const Rs = {
|
|
|
8572
8576
|
t.push({
|
|
8573
8577
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8574
8578
|
text: n.replace("%1", o.getText()),
|
|
8575
|
-
callback:
|
|
8579
|
+
callback: fn.callbackFactory(this, i)
|
|
8576
8580
|
});
|
|
8577
8581
|
}
|
|
8578
8582
|
}
|
|
8579
|
-
},
|
|
8583
|
+
}, Us = function(t) {
|
|
8580
8584
|
return function() {
|
|
8581
8585
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8582
8586
|
ge.renameVariable(e, o);
|
|
8583
8587
|
};
|
|
8584
|
-
},
|
|
8588
|
+
}, Ms = function(t) {
|
|
8585
8589
|
return function() {
|
|
8586
8590
|
const n = t.getField("VAR").getVariable();
|
|
8587
8591
|
n && ge.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -8589,7 +8593,7 @@ const Rs = {
|
|
|
8589
8593
|
};
|
|
8590
8594
|
R.registerMixin(
|
|
8591
8595
|
"context_menu_variable_v1",
|
|
8592
|
-
|
|
8596
|
+
Ds
|
|
8593
8597
|
);
|
|
8594
8598
|
h([
|
|
8595
8599
|
{
|
|
@@ -8646,7 +8650,7 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8646
8650
|
`;
|
|
8647
8651
|
};
|
|
8648
8652
|
const je = v.xml;
|
|
8649
|
-
function
|
|
8653
|
+
function Vs() {
|
|
8650
8654
|
const t = [];
|
|
8651
8655
|
{
|
|
8652
8656
|
const e = je.createElement("label");
|
|
@@ -8668,21 +8672,21 @@ function Ms() {
|
|
|
8668
8672
|
}
|
|
8669
8673
|
const tt = {
|
|
8670
8674
|
name: "INTERFACE_CATEGORY",
|
|
8671
|
-
callback:
|
|
8675
|
+
callback: Vs
|
|
8672
8676
|
}, b = v.xml;
|
|
8673
|
-
function
|
|
8677
|
+
function Ps() {
|
|
8674
8678
|
const t = [];
|
|
8675
|
-
if (
|
|
8679
|
+
if (jo()) {
|
|
8676
8680
|
{
|
|
8677
8681
|
const e = b.createElement("label");
|
|
8678
8682
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
8679
8683
|
}
|
|
8680
|
-
if (
|
|
8684
|
+
if (Sn().length > 0) {
|
|
8681
8685
|
const e = b.createElement("block");
|
|
8682
8686
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8683
8687
|
}
|
|
8684
8688
|
}
|
|
8685
|
-
if (
|
|
8689
|
+
if (xo()) {
|
|
8686
8690
|
{
|
|
8687
8691
|
const e = b.createElement("label");
|
|
8688
8692
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
@@ -8758,7 +8762,7 @@ function Vs() {
|
|
|
8758
8762
|
const e = b.createElement("block");
|
|
8759
8763
|
e.setAttribute("type", "app_env_v1"), t.push(e);
|
|
8760
8764
|
}
|
|
8761
|
-
if (
|
|
8765
|
+
if (Gt().length > 0) {
|
|
8762
8766
|
const e = b.createElement("block");
|
|
8763
8767
|
e.setAttribute("type", "navigate_to_v1"), t.push(e);
|
|
8764
8768
|
}
|
|
@@ -8766,9 +8770,9 @@ function Vs() {
|
|
|
8766
8770
|
}
|
|
8767
8771
|
const nt = {
|
|
8768
8772
|
name: "UI_CATEGORY",
|
|
8769
|
-
callback:
|
|
8773
|
+
callback: Ps
|
|
8770
8774
|
}, be = v.xml;
|
|
8771
|
-
function
|
|
8775
|
+
function xs() {
|
|
8772
8776
|
const t = [];
|
|
8773
8777
|
{
|
|
8774
8778
|
const e = be.createElement("label");
|
|
@@ -8795,9 +8799,9 @@ function Ps() {
|
|
|
8795
8799
|
}
|
|
8796
8800
|
const ce = {
|
|
8797
8801
|
name: "PROCEDURE_CATEGORY",
|
|
8798
|
-
callback:
|
|
8802
|
+
callback: xs
|
|
8799
8803
|
}, Xe = v.xml;
|
|
8800
|
-
function
|
|
8804
|
+
function Fs() {
|
|
8801
8805
|
const t = we(), e = [];
|
|
8802
8806
|
{
|
|
8803
8807
|
const o = Xe.createElement("label");
|
|
@@ -8835,9 +8839,9 @@ function xs() {
|
|
|
8835
8839
|
}
|
|
8836
8840
|
const le = {
|
|
8837
8841
|
name: "VARIABLE_CATEGORY",
|
|
8838
|
-
callback:
|
|
8842
|
+
callback: Fs
|
|
8839
8843
|
}, Ee = v.xml;
|
|
8840
|
-
function
|
|
8844
|
+
function Ys(t) {
|
|
8841
8845
|
const e = [];
|
|
8842
8846
|
if (t === "flow") {
|
|
8843
8847
|
{
|
|
@@ -8874,9 +8878,9 @@ function Fs(t) {
|
|
|
8874
8878
|
}
|
|
8875
8879
|
const ot = {
|
|
8876
8880
|
name: "FLOW_CATEGORY",
|
|
8877
|
-
callback:
|
|
8881
|
+
callback: Ys
|
|
8878
8882
|
}, ne = v.xml;
|
|
8879
|
-
function
|
|
8883
|
+
function ws(t) {
|
|
8880
8884
|
const { activeFunc: e } = T.compute, n = [];
|
|
8881
8885
|
if (t === "func") {
|
|
8882
8886
|
{
|
|
@@ -8925,9 +8929,9 @@ function Ys(t) {
|
|
|
8925
8929
|
}
|
|
8926
8930
|
const it = {
|
|
8927
8931
|
name: "FUNC_CATEGORY",
|
|
8928
|
-
callback:
|
|
8932
|
+
callback: ws
|
|
8929
8933
|
}, O = v.xml;
|
|
8930
|
-
function
|
|
8934
|
+
function Ks() {
|
|
8931
8935
|
const t = [];
|
|
8932
8936
|
if (J().length > 0) {
|
|
8933
8937
|
{
|
|
@@ -9102,33 +9106,33 @@ function ws() {
|
|
|
9102
9106
|
}
|
|
9103
9107
|
const st = {
|
|
9104
9108
|
name: "DATA_CATEGORY",
|
|
9105
|
-
callback:
|
|
9109
|
+
callback: Ks
|
|
9106
9110
|
};
|
|
9107
|
-
|
|
9108
|
-
const n = await
|
|
9111
|
+
mn.setConfirm(async (t, e) => {
|
|
9112
|
+
const n = await yo({
|
|
9109
9113
|
title: "",
|
|
9110
9114
|
text: t
|
|
9111
9115
|
});
|
|
9112
9116
|
e(!!n);
|
|
9113
9117
|
});
|
|
9114
|
-
|
|
9115
|
-
const o = await
|
|
9118
|
+
mn.setPrompt(async (t, e, n) => {
|
|
9119
|
+
const o = await No({
|
|
9116
9120
|
title: "",
|
|
9117
9121
|
value: e
|
|
9118
9122
|
});
|
|
9119
9123
|
n(String(o));
|
|
9120
9124
|
});
|
|
9121
|
-
const
|
|
9125
|
+
const Pn = (t, e, n) => {
|
|
9122
9126
|
const o = t[e];
|
|
9123
9127
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
9124
9128
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
9125
9129
|
});
|
|
9126
9130
|
};
|
|
9127
|
-
async function
|
|
9128
|
-
const e = await
|
|
9129
|
-
|
|
9131
|
+
async function rn(t) {
|
|
9132
|
+
const e = await Pn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.fj04iwzg.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.os4ap6q2.js") }), `./msg/${t}.ts`, 3);
|
|
9133
|
+
ro(e.default);
|
|
9130
9134
|
}
|
|
9131
|
-
function
|
|
9135
|
+
function Wt(t) {
|
|
9132
9136
|
const e = we();
|
|
9133
9137
|
if (!e)
|
|
9134
9138
|
return;
|
|
@@ -9141,32 +9145,32 @@ function Gt(t) {
|
|
|
9141
9145
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, l = i.y * e.scale;
|
|
9142
9146
|
e.scroll(-a, -l);
|
|
9143
9147
|
}
|
|
9144
|
-
function
|
|
9148
|
+
function xn() {
|
|
9145
9149
|
const t = we();
|
|
9146
9150
|
if (!t)
|
|
9147
9151
|
return;
|
|
9148
9152
|
const e = t.getTopBlocks(!0)?.[0];
|
|
9149
|
-
e &&
|
|
9153
|
+
e && Wt(e.id);
|
|
9150
9154
|
}
|
|
9151
|
-
function
|
|
9155
|
+
function Fn(t) {
|
|
9152
9156
|
const e = t.getParent();
|
|
9153
|
-
return e &&
|
|
9157
|
+
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9154
9158
|
}
|
|
9155
|
-
class
|
|
9159
|
+
class $s {
|
|
9156
9160
|
init() {
|
|
9157
|
-
const e =
|
|
9161
|
+
const e = _o.registry.getItem("blockDisable");
|
|
9158
9162
|
e && (e.preconditionFn = function(n) {
|
|
9159
9163
|
const o = n.block;
|
|
9160
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9164
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Fn(o) ? "disabled" : "enabled" : "hidden";
|
|
9161
9165
|
});
|
|
9162
9166
|
}
|
|
9163
9167
|
}
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
const
|
|
9167
|
-
|
|
9168
|
-
const
|
|
9169
|
-
|
|
9168
|
+
po.registerFieldColour();
|
|
9169
|
+
ho.registry.unregister(fo.names.ESCAPE);
|
|
9170
|
+
const Hs = new mo.CrossTabCopyPaste();
|
|
9171
|
+
Hs.init({ contextMenu: !0, shortcut: !0 });
|
|
9172
|
+
const Gs = new $s();
|
|
9173
|
+
Gs.init();
|
|
9170
9174
|
ct.Classic.blockStyles = {
|
|
9171
9175
|
color_blocks: {
|
|
9172
9176
|
colourPrimary: "#a5745b",
|
|
@@ -9297,7 +9301,7 @@ ct.Classic.categoryStyles = {
|
|
|
9297
9301
|
colour: "#a55b80"
|
|
9298
9302
|
}
|
|
9299
9303
|
};
|
|
9300
|
-
const
|
|
9304
|
+
const Ws = Tn.defineTheme("light", {
|
|
9301
9305
|
name: "light",
|
|
9302
9306
|
base: ct.Classic,
|
|
9303
9307
|
componentStyles: {
|
|
@@ -9313,7 +9317,7 @@ const Gs = mn.defineTheme("light", {
|
|
|
9313
9317
|
scrollbarOpacity: 0.4,
|
|
9314
9318
|
cursorColour: ""
|
|
9315
9319
|
}
|
|
9316
|
-
}),
|
|
9320
|
+
}), js = Tn.defineTheme("dark", {
|
|
9317
9321
|
name: "dark",
|
|
9318
9322
|
base: ct.Classic,
|
|
9319
9323
|
componentStyles: {
|
|
@@ -9330,14 +9334,14 @@ const Gs = mn.defineTheme("light", {
|
|
|
9330
9334
|
cursorColour: ""
|
|
9331
9335
|
}
|
|
9332
9336
|
});
|
|
9333
|
-
function
|
|
9337
|
+
function Xs(t) {
|
|
9334
9338
|
const e = we();
|
|
9335
9339
|
switch (t) {
|
|
9336
9340
|
case "light":
|
|
9337
|
-
e.setTheme(
|
|
9341
|
+
e.setTheme(Ws);
|
|
9338
9342
|
break;
|
|
9339
9343
|
case "dark":
|
|
9340
|
-
e.setTheme(
|
|
9344
|
+
e.setTheme(js);
|
|
9341
9345
|
break;
|
|
9342
9346
|
}
|
|
9343
9347
|
}
|
|
@@ -9789,7 +9793,7 @@ const ht = {
|
|
|
9789
9793
|
type: "math_on_list_v1"
|
|
9790
9794
|
}
|
|
9791
9795
|
]
|
|
9792
|
-
},
|
|
9796
|
+
}, Yn = {
|
|
9793
9797
|
kind: "category",
|
|
9794
9798
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9795
9799
|
categorystyle: "message_category",
|
|
@@ -10056,7 +10060,7 @@ const ht = {
|
|
|
10056
10060
|
type: "text_reverse_v1"
|
|
10057
10061
|
}
|
|
10058
10062
|
]
|
|
10059
|
-
},
|
|
10063
|
+
}, wn = {
|
|
10060
10064
|
kind: "category",
|
|
10061
10065
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10062
10066
|
categorystyle: "time_category",
|
|
@@ -10080,7 +10084,7 @@ const ht = {
|
|
|
10080
10084
|
}
|
|
10081
10085
|
}
|
|
10082
10086
|
]
|
|
10083
|
-
},
|
|
10087
|
+
}, Js = {
|
|
10084
10088
|
kind: "categoryToolbox",
|
|
10085
10089
|
contents: [
|
|
10086
10090
|
{
|
|
@@ -10089,7 +10093,7 @@ const ht = {
|
|
|
10089
10093
|
categorystyle: "ui_category",
|
|
10090
10094
|
custom: nt.name
|
|
10091
10095
|
},
|
|
10092
|
-
|
|
10096
|
+
Yn,
|
|
10093
10097
|
mt,
|
|
10094
10098
|
ft,
|
|
10095
10099
|
Tt,
|
|
@@ -10097,7 +10101,7 @@ const ht = {
|
|
|
10097
10101
|
dt,
|
|
10098
10102
|
Et,
|
|
10099
10103
|
ht,
|
|
10100
|
-
|
|
10104
|
+
wn,
|
|
10101
10105
|
{
|
|
10102
10106
|
kind: "category",
|
|
10103
10107
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10117,7 +10121,7 @@ const ht = {
|
|
|
10117
10121
|
custom: tt.name
|
|
10118
10122
|
}
|
|
10119
10123
|
]
|
|
10120
|
-
},
|
|
10124
|
+
}, qs = {
|
|
10121
10125
|
kind: "categoryToolbox",
|
|
10122
10126
|
contents: [
|
|
10123
10127
|
{
|
|
@@ -10158,7 +10162,7 @@ const ht = {
|
|
|
10158
10162
|
custom: ce.name
|
|
10159
10163
|
}
|
|
10160
10164
|
]
|
|
10161
|
-
},
|
|
10165
|
+
}, Qs = {
|
|
10162
10166
|
kind: "categoryToolbox",
|
|
10163
10167
|
contents: [
|
|
10164
10168
|
{
|
|
@@ -10199,7 +10203,7 @@ const ht = {
|
|
|
10199
10203
|
custom: ce.name
|
|
10200
10204
|
}
|
|
10201
10205
|
]
|
|
10202
|
-
},
|
|
10206
|
+
}, zs = {
|
|
10203
10207
|
kind: "categoryToolbox",
|
|
10204
10208
|
contents: [
|
|
10205
10209
|
{
|
|
@@ -10230,7 +10234,7 @@ const ht = {
|
|
|
10230
10234
|
]
|
|
10231
10235
|
}
|
|
10232
10236
|
]
|
|
10233
|
-
},
|
|
10237
|
+
}, Zs = {
|
|
10234
10238
|
kind: "categoryToolbox",
|
|
10235
10239
|
contents: [
|
|
10236
10240
|
{
|
|
@@ -10239,7 +10243,7 @@ const ht = {
|
|
|
10239
10243
|
categorystyle: "ui_category",
|
|
10240
10244
|
custom: nt.name
|
|
10241
10245
|
},
|
|
10242
|
-
|
|
10246
|
+
Yn,
|
|
10243
10247
|
mt,
|
|
10244
10248
|
ft,
|
|
10245
10249
|
Tt,
|
|
@@ -10247,7 +10251,7 @@ const ht = {
|
|
|
10247
10251
|
dt,
|
|
10248
10252
|
Et,
|
|
10249
10253
|
ht,
|
|
10250
|
-
|
|
10254
|
+
wn,
|
|
10251
10255
|
{
|
|
10252
10256
|
kind: "category",
|
|
10253
10257
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10267,26 +10271,26 @@ const ht = {
|
|
|
10267
10271
|
custom: tt.name
|
|
10268
10272
|
}
|
|
10269
10273
|
]
|
|
10270
|
-
},
|
|
10271
|
-
function
|
|
10272
|
-
|
|
10274
|
+
}, Kn = Symbol();
|
|
10275
|
+
function ea(t) {
|
|
10276
|
+
Zn(Kn, t);
|
|
10273
10277
|
}
|
|
10274
|
-
function
|
|
10275
|
-
return
|
|
10278
|
+
function jt() {
|
|
10279
|
+
return eo(Kn);
|
|
10276
10280
|
}
|
|
10277
|
-
const
|
|
10281
|
+
const ta = /* @__PURE__ */ oe({
|
|
10278
10282
|
__name: "index",
|
|
10279
10283
|
props: {
|
|
10280
10284
|
lock: { type: Boolean }
|
|
10281
10285
|
},
|
|
10282
10286
|
setup(t, { expose: e }) {
|
|
10283
|
-
const { t: n } = $e(), o = t, i =
|
|
10287
|
+
const { t: n } = $e(), o = t, i = jt(), a = () => {
|
|
10284
10288
|
if (!i.workspace) {
|
|
10285
10289
|
console.assert(!1);
|
|
10286
10290
|
return;
|
|
10287
10291
|
}
|
|
10288
10292
|
if (o.lock) {
|
|
10289
|
-
|
|
10293
|
+
gn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10290
10294
|
return;
|
|
10291
10295
|
}
|
|
10292
10296
|
i.workspace.cleanUp();
|
|
@@ -10300,9 +10304,9 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10300
10304
|
}, {
|
|
10301
10305
|
activator: ee(({ props: I }) => [
|
|
10302
10306
|
B(p, wt(I, {
|
|
10303
|
-
variant: "outlined",
|
|
10304
10307
|
density: "comfortable",
|
|
10305
10308
|
icon: "mdi-broom",
|
|
10309
|
+
variant: "outlined",
|
|
10306
10310
|
onClick: l
|
|
10307
10311
|
}), null, 16)
|
|
10308
10312
|
]),
|
|
@@ -10310,7 +10314,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10310
10314
|
}, 8, ["text"]);
|
|
10311
10315
|
};
|
|
10312
10316
|
}
|
|
10313
|
-
}),
|
|
10317
|
+
}), na = /* @__PURE__ */ oe({
|
|
10314
10318
|
__name: "index",
|
|
10315
10319
|
props: {
|
|
10316
10320
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10326,9 +10330,9 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10326
10330
|
}, {
|
|
10327
10331
|
activator: ee(({ props: u }) => [
|
|
10328
10332
|
B(a, wt(u, {
|
|
10329
|
-
variant: "outlined",
|
|
10330
10333
|
density: "comfortable",
|
|
10331
10334
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10335
|
+
variant: "outlined",
|
|
10332
10336
|
onClick: i[0] || (i[0] = (r) => n.value = !n.value)
|
|
10333
10337
|
}), null, 16, ["icon"])
|
|
10334
10338
|
]),
|
|
@@ -10336,7 +10340,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10336
10340
|
}, 8, ["text"]);
|
|
10337
10341
|
};
|
|
10338
10342
|
}
|
|
10339
|
-
}),
|
|
10343
|
+
}), oa = { class: "text-subtitle-1 ml-6" }, ia = /* @__PURE__ */ oe({
|
|
10340
10344
|
__name: "item",
|
|
10341
10345
|
props: {
|
|
10342
10346
|
id: {},
|
|
@@ -10362,15 +10366,15 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10362
10366
|
pointerEvents: "none"
|
|
10363
10367
|
}));
|
|
10364
10368
|
return (A, I) => {
|
|
10365
|
-
const m = P("v-spacer"), C = P("v-icon"), g =
|
|
10366
|
-
return
|
|
10369
|
+
const m = P("v-spacer"), C = P("v-icon"), g = to("ripple");
|
|
10370
|
+
return no((D(), Q("div", {
|
|
10367
10371
|
class: "d-flex align-center cursor-pointer",
|
|
10368
10372
|
style: W(r.value),
|
|
10369
10373
|
onClick: I[1] || (I[1] = (M) => l("x-click", a.id)),
|
|
10370
|
-
|
|
10371
|
-
|
|
10374
|
+
onMouseout: I[2] || (I[2] = (M) => u.value = !1),
|
|
10375
|
+
onMouseover: I[3] || (I[3] = (M) => u.value = !0)
|
|
10372
10376
|
}, [
|
|
10373
|
-
j("span",
|
|
10377
|
+
j("span", oa, at(a.title), 1),
|
|
10374
10378
|
B(m),
|
|
10375
10379
|
B(C, {
|
|
10376
10380
|
class: "x-handle cursor-move mr-3",
|
|
@@ -10386,10 +10390,10 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10386
10390
|
]);
|
|
10387
10391
|
};
|
|
10388
10392
|
}
|
|
10389
|
-
}),
|
|
10393
|
+
}), sa = {
|
|
10390
10394
|
key: 1,
|
|
10391
10395
|
class: "text-caption text-grey"
|
|
10392
|
-
},
|
|
10396
|
+
}, aa = /* @__PURE__ */ oe({
|
|
10393
10397
|
__name: "index",
|
|
10394
10398
|
props: /* @__PURE__ */ bt({
|
|
10395
10399
|
lock: { type: Boolean }
|
|
@@ -10399,7 +10403,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10399
10403
|
}),
|
|
10400
10404
|
emits: ["update:modelValue"],
|
|
10401
10405
|
setup(t, { expose: e }) {
|
|
10402
|
-
const { t: n } = $e(), o = Me(t, "modelValue"), i =
|
|
10406
|
+
const { t: n } = $e(), o = Me(t, "modelValue"), i = jt(), a = Ae([]);
|
|
10403
10407
|
e({ update: () => {
|
|
10404
10408
|
if (!i.workspace) {
|
|
10405
10409
|
console.assert(!1);
|
|
@@ -10407,11 +10411,11 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10407
10411
|
}
|
|
10408
10412
|
const m = [];
|
|
10409
10413
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10410
|
-
const M = g.id ===
|
|
10414
|
+
const M = g.id === Eo()?.id;
|
|
10411
10415
|
let w = "<n/a>";
|
|
10412
10416
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10413
|
-
const q = g,
|
|
10414
|
-
|
|
10417
|
+
const q = g, de = x[q.node.key];
|
|
10418
|
+
de && (w = n(de.name), q.node.alias && (w += " / " + q.node.alias), w += " - " + _[q.event.name]);
|
|
10415
10419
|
} else g.type.startsWith("func_entry_v") ? w = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? (console.log(g), w = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME")) : w = n("x-block-lib.temporaryBlock");
|
|
10416
10420
|
m.push({
|
|
10417
10421
|
id: g.id,
|
|
@@ -10423,7 +10427,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10423
10427
|
let u = [];
|
|
10424
10428
|
const r = () => {
|
|
10425
10429
|
if (t.lock) {
|
|
10426
|
-
|
|
10430
|
+
gn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10427
10431
|
return;
|
|
10428
10432
|
}
|
|
10429
10433
|
const m = [];
|
|
@@ -10455,44 +10459,44 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10455
10459
|
M
|
|
10456
10460
|
).getRelativeToSurfaceXY().y + 10);
|
|
10457
10461
|
const q = g.getRelativeToSurfaceXY();
|
|
10458
|
-
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(),
|
|
10462
|
+
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(), xn();
|
|
10459
10463
|
}, I = async (m) => {
|
|
10460
10464
|
if (!i.workspace) {
|
|
10461
10465
|
console.assert(!1);
|
|
10462
10466
|
return;
|
|
10463
10467
|
}
|
|
10464
10468
|
const C = i.workspace.getBlockById(m);
|
|
10465
|
-
|
|
10469
|
+
En.setSelected(C), Wt(m), o.value = !1;
|
|
10466
10470
|
};
|
|
10467
|
-
return (m, C) => a.value.length > 0 ? (D(), Z(V(
|
|
10471
|
+
return (m, C) => a.value.length > 0 ? (D(), Z(V(To), {
|
|
10468
10472
|
key: 0,
|
|
10469
10473
|
modelValue: a.value,
|
|
10470
10474
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
10471
10475
|
animation: 150,
|
|
10472
10476
|
"ghost-class": "ghost",
|
|
10473
10477
|
handle: ".x-handle",
|
|
10474
|
-
|
|
10478
|
+
onEnd: A,
|
|
10475
10479
|
onMove: p,
|
|
10476
|
-
|
|
10480
|
+
onStart: r
|
|
10477
10481
|
}, {
|
|
10478
10482
|
default: ee(() => [
|
|
10479
|
-
(D(!0), Q(
|
|
10483
|
+
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(ia, {
|
|
10480
10484
|
id: g.id,
|
|
10481
10485
|
key: g.id,
|
|
10482
|
-
title: g.name,
|
|
10483
10486
|
select: g.select,
|
|
10487
|
+
title: g.name,
|
|
10484
10488
|
onXClick: I
|
|
10485
|
-
}, null, 8, ["id", "
|
|
10489
|
+
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10486
10490
|
]),
|
|
10487
10491
|
_: 1
|
|
10488
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10492
|
+
}, 8, ["modelValue"])) : (D(), Q("span", sa, at(V(n)("x-block-lib.noOption")), 1));
|
|
10489
10493
|
}
|
|
10490
|
-
}),
|
|
10494
|
+
}), ca = (t, e) => {
|
|
10491
10495
|
const n = t.__vccOpts || t;
|
|
10492
10496
|
for (const [o, i] of e)
|
|
10493
10497
|
n[o] = i;
|
|
10494
10498
|
return n;
|
|
10495
|
-
},
|
|
10499
|
+
}, la = /* @__PURE__ */ ca(aa, [["__scopeId", "data-v-2ba1be08"]]), ua = /* @__PURE__ */ oe({
|
|
10496
10500
|
__name: "index",
|
|
10497
10501
|
props: {
|
|
10498
10502
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10500,7 +10504,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10500
10504
|
},
|
|
10501
10505
|
emits: ["update:modelValue"],
|
|
10502
10506
|
setup(t, { expose: e }) {
|
|
10503
|
-
const n = Me(t, "modelValue"), o =
|
|
10507
|
+
const n = Me(t, "modelValue"), o = jt();
|
|
10504
10508
|
e({ update: () => {
|
|
10505
10509
|
if (!o.workspace) {
|
|
10506
10510
|
console.assert(!1);
|
|
@@ -10514,20 +10518,20 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10514
10518
|
return;
|
|
10515
10519
|
}
|
|
10516
10520
|
const r = u.getBlockById(l);
|
|
10517
|
-
|
|
10521
|
+
En.setSelected(r), Wt(l), n.value = !1;
|
|
10518
10522
|
};
|
|
10519
10523
|
return (l, u) => (D(), Q("div", {
|
|
10520
10524
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10521
10525
|
}, "blockTree"));
|
|
10522
10526
|
}
|
|
10523
|
-
}),
|
|
10527
|
+
}), ra = { class: "text-subtitle-1" }, _a = /* @__PURE__ */ oe({
|
|
10524
10528
|
__name: "index",
|
|
10525
10529
|
props: {
|
|
10526
10530
|
type: {},
|
|
10527
10531
|
lock: { type: Boolean }
|
|
10528
10532
|
},
|
|
10529
10533
|
setup(t, { expose: e }) {
|
|
10530
|
-
const { t: n } = $e(), o =
|
|
10534
|
+
const { t: n } = $e(), o = bo(), { sysBarAvail: i } = An(), { backgroundColor1: a } = Ke(), l = K(() => {
|
|
10531
10535
|
let C = "100%";
|
|
10532
10536
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10533
10537
|
background: a.value,
|
|
@@ -10543,24 +10547,24 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10543
10547
|
}), r = K(() => ({
|
|
10544
10548
|
height: "60px"
|
|
10545
10549
|
})), { open: p } = Kt(`blocklyNavigatorDlg${Bt()}`);
|
|
10546
|
-
|
|
10550
|
+
pn(() => {
|
|
10547
10551
|
p.value = !1;
|
|
10548
10552
|
});
|
|
10549
10553
|
const A = Re("blockList"), I = Re("blockTree");
|
|
10550
10554
|
return e({ open: p, update: () => {
|
|
10551
10555
|
t.type === "list" ? A.value?.update() : t.type === "tree" && I.value?.update();
|
|
10552
10556
|
} }), (C, g) => {
|
|
10553
|
-
const M = P("v-sheet"), w = P("v-btn"), q = P("v-spacer"),
|
|
10554
|
-
return D(), Q(
|
|
10555
|
-
B(
|
|
10557
|
+
const M = P("v-sheet"), w = P("v-btn"), q = P("v-spacer"), de = P("v-dialog"), At = P("v-tooltip");
|
|
10558
|
+
return D(), Q(_n, null, [
|
|
10559
|
+
B(de, {
|
|
10556
10560
|
modelValue: V(p),
|
|
10557
10561
|
"onUpdate:modelValue": g[5] || (g[5] = (G) => Je(p) ? p.value = G : null),
|
|
10558
|
-
transition: "scroll-x-reverse-transition",
|
|
10559
|
-
persistent: "",
|
|
10560
|
-
"no-click-animation": "",
|
|
10561
|
-
fullscreen: "",
|
|
10562
10562
|
eager: "",
|
|
10563
|
-
|
|
10563
|
+
fullscreen: "",
|
|
10564
|
+
"no-click-animation": "",
|
|
10565
|
+
persistent: "",
|
|
10566
|
+
transition: "scroll-x-reverse-transition",
|
|
10567
|
+
onKeydown: g[6] || (g[6] = hn(Be((G) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10564
10568
|
}, {
|
|
10565
10569
|
default: ee(() => [
|
|
10566
10570
|
j("div", {
|
|
@@ -10576,7 +10580,7 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10576
10580
|
key: 0,
|
|
10577
10581
|
color: "transparent",
|
|
10578
10582
|
height: 24
|
|
10579
|
-
})) :
|
|
10583
|
+
})) : me("", !0),
|
|
10580
10584
|
B(M, {
|
|
10581
10585
|
class: "d-flex align-center px-2",
|
|
10582
10586
|
color: "transparent",
|
|
@@ -10584,12 +10588,12 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10584
10588
|
}, {
|
|
10585
10589
|
default: ee(() => [
|
|
10586
10590
|
B(w, {
|
|
10587
|
-
variant: "text",
|
|
10588
10591
|
density: "comfortable",
|
|
10589
10592
|
icon: "mdi-close",
|
|
10593
|
+
variant: "text",
|
|
10590
10594
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10591
10595
|
}),
|
|
10592
|
-
j("span",
|
|
10596
|
+
j("span", ra, at(V(n)("x-block-lib.navigator")), 1),
|
|
10593
10597
|
B(q)
|
|
10594
10598
|
]),
|
|
10595
10599
|
_: 1
|
|
@@ -10598,20 +10602,20 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10598
10602
|
class: "overflow-y-auto",
|
|
10599
10603
|
style: W(u.value)
|
|
10600
10604
|
}, [
|
|
10601
|
-
C.type === "list" ? (D(), Z(
|
|
10605
|
+
C.type === "list" ? (D(), Z(la, {
|
|
10602
10606
|
key: 0,
|
|
10603
10607
|
ref_key: "blockList",
|
|
10604
10608
|
ref: A,
|
|
10605
10609
|
modelValue: V(p),
|
|
10606
10610
|
"onUpdate:modelValue": g[1] || (g[1] = (G) => Je(p) ? p.value = G : null),
|
|
10607
10611
|
lock: C.lock
|
|
10608
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10612
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ua, {
|
|
10609
10613
|
key: 1,
|
|
10610
10614
|
ref_key: "blockTree",
|
|
10611
10615
|
ref: I,
|
|
10612
10616
|
modelValue: V(p),
|
|
10613
10617
|
"onUpdate:modelValue": g[2] || (g[2] = (G) => Je(p) ? p.value = G : null)
|
|
10614
|
-
}, null, 8, ["modelValue"])) :
|
|
10618
|
+
}, null, 8, ["modelValue"])) : me("", !0),
|
|
10615
10619
|
j("div", {
|
|
10616
10620
|
style: W(r.value)
|
|
10617
10621
|
}, null, 4)
|
|
@@ -10626,10 +10630,10 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10626
10630
|
}, {
|
|
10627
10631
|
activator: ee(({ props: G }) => [
|
|
10628
10632
|
B(w, wt(G, {
|
|
10629
|
-
variant: "outlined",
|
|
10630
10633
|
density: "comfortable",
|
|
10631
10634
|
icon: "mdi-navigation-variant",
|
|
10632
|
-
|
|
10635
|
+
variant: "outlined",
|
|
10636
|
+
onClick: g[7] || (g[7] = (Xt) => p.value = !0)
|
|
10633
10637
|
}), null, 16)
|
|
10634
10638
|
]),
|
|
10635
10639
|
_: 1
|
|
@@ -10663,22 +10667,22 @@ const ea = /* @__PURE__ */ oe({
|
|
|
10663
10667
|
wheel: !0
|
|
10664
10668
|
}
|
|
10665
10669
|
};
|
|
10666
|
-
function
|
|
10667
|
-
St.theme = o ? "dark" : "light", St.toolbox =
|
|
10668
|
-
const i =
|
|
10669
|
-
return
|
|
10670
|
+
function pa(t, e, n, o) {
|
|
10671
|
+
St.theme = o ? "dark" : "light", St.toolbox = ha(e, n);
|
|
10672
|
+
const i = go(t, St);
|
|
10673
|
+
return da(i, e, n), fa(i), i;
|
|
10670
10674
|
}
|
|
10671
|
-
function
|
|
10675
|
+
function ha(t, e) {
|
|
10672
10676
|
let n;
|
|
10673
|
-
return t === "page" ? e === "v1" && (n =
|
|
10677
|
+
return t === "page" ? e === "v1" && (n = Zs) : t === "comp" ? e === "v1" && (n = Js) : t === "func" ? e === "v1" && (n = Qs) : t === "flow" ? e === "v1" && (n = qs) : t === "json" && e === "v1" && (n = zs), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10674
10678
|
}
|
|
10675
|
-
function
|
|
10679
|
+
function da(t, e, n) {
|
|
10676
10680
|
function o({ name: i, callback: a }) {
|
|
10677
10681
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10678
10682
|
}
|
|
10679
10683
|
e === "page" || e === "comp" ? n === "v1" && (o(nt), o(le), o(ce), o(tt)) : e === "func" ? n === "v1" && (o(it), o(ot), o(st), o(le), o(ce)) : e === "flow" && n === "v1" && (o(ot), o(it), o(st), o(le), o(ce));
|
|
10680
10684
|
}
|
|
10681
|
-
function
|
|
10685
|
+
function fa(t) {
|
|
10682
10686
|
const { router: e } = ie;
|
|
10683
10687
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10684
10688
|
const n = e.resolve({
|
|
@@ -10696,7 +10700,7 @@ function da(t) {
|
|
|
10696
10700
|
}, 100);
|
|
10697
10701
|
});
|
|
10698
10702
|
}
|
|
10699
|
-
function
|
|
10703
|
+
function ma(t, e) {
|
|
10700
10704
|
const n = e.newBlock("json_root_v1");
|
|
10701
10705
|
n.initSvg(), n.render();
|
|
10702
10706
|
const o = (i, a) => {
|
|
@@ -10738,7 +10742,7 @@ function fa(t, e) {
|
|
|
10738
10742
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10739
10743
|
);
|
|
10740
10744
|
}
|
|
10741
|
-
function
|
|
10745
|
+
function Ta(t) {
|
|
10742
10746
|
const e = (o) => {
|
|
10743
10747
|
if (!o)
|
|
10744
10748
|
return null;
|
|
@@ -10770,7 +10774,7 @@ function ma(t) {
|
|
|
10770
10774
|
if (o.type === "json_root_v1")
|
|
10771
10775
|
return e(o);
|
|
10772
10776
|
}
|
|
10773
|
-
const
|
|
10777
|
+
const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
10774
10778
|
__name: "index",
|
|
10775
10779
|
props: /* @__PURE__ */ bt({
|
|
10776
10780
|
type: {},
|
|
@@ -10786,7 +10790,7 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10786
10790
|
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10787
10791
|
setup(t, { expose: e, emit: n }) {
|
|
10788
10792
|
const { backgroundColor2: o } = Ke(), i = Me(t, "lock"), a = Me(t, "scale"), l = n, u = `blocklyEditor${Bt()}`, r = Ae(), p = Re("parentContainer"), A = Re("clean"), I = Re("navigator"), m = {};
|
|
10789
|
-
|
|
10793
|
+
ea(m);
|
|
10790
10794
|
const C = Ae(!0), g = Ae(!1), M = K(() => t.type === "json" ? "tree" : "list"), w = K(() => ({
|
|
10791
10795
|
width: "100%",
|
|
10792
10796
|
height: "calc(100% - 48px)"
|
|
@@ -10796,7 +10800,7 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10796
10800
|
bottom: "0px",
|
|
10797
10801
|
width: "100%",
|
|
10798
10802
|
height: "48px"
|
|
10799
|
-
})),
|
|
10803
|
+
})), de = K(() => ({
|
|
10800
10804
|
position: "absolute",
|
|
10801
10805
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10802
10806
|
top: "1px",
|
|
@@ -10817,7 +10821,7 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10817
10821
|
width: "100%",
|
|
10818
10822
|
height: "calc(100% - 48px)",
|
|
10819
10823
|
pointerEvents: "none"
|
|
10820
|
-
})),
|
|
10824
|
+
})), Xt = K(() => ({
|
|
10821
10825
|
position: "absolute",
|
|
10822
10826
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10823
10827
|
top: "1px",
|
|
@@ -10825,32 +10829,32 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10825
10829
|
width: "56px",
|
|
10826
10830
|
height: "calc(100% - 49px)",
|
|
10827
10831
|
zIndex: 999
|
|
10828
|
-
})),
|
|
10832
|
+
})), $n = K(() => ({
|
|
10829
10833
|
position: "fixed",
|
|
10830
10834
|
top: 0,
|
|
10831
10835
|
left: 0,
|
|
10832
10836
|
zIndex: 3e3
|
|
10833
10837
|
})), { open: Le } = Kt(`blocklyEditorFlyout${Bt()}`);
|
|
10834
|
-
|
|
10838
|
+
zt(async () => {
|
|
10835
10839
|
if (!r.value || !p.value) {
|
|
10836
10840
|
console.assert(!1);
|
|
10837
10841
|
return;
|
|
10838
10842
|
}
|
|
10839
|
-
|
|
10843
|
+
Ao(p.value), await rn(t.locale), m.workspace = pa(r.value, t.type, t.version, t.dark), m.workspace.addChangeListener(E.disableOrphans), m.workspace.addChangeListener(Hn);
|
|
10840
10844
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10841
10845
|
new MutationObserver((It) => {
|
|
10842
10846
|
It.forEach((We) => {
|
|
10843
10847
|
We.type === "attributes" && We.attributeName === "style" && (Le.value = m.workspace.getFlyout().isVisible());
|
|
10844
10848
|
});
|
|
10845
|
-
}).observe(y, { attributes: !0 }), Le.value = m.workspace.getFlyout().isVisible(),
|
|
10846
|
-
}),
|
|
10849
|
+
}).observe(y, { attributes: !0 }), Le.value = m.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10850
|
+
}), so(() => {
|
|
10847
10851
|
Le.value = !1;
|
|
10848
|
-
}),
|
|
10849
|
-
m.workspace &&
|
|
10852
|
+
}), Io(r, () => {
|
|
10853
|
+
m.workspace && Oo(m.workspace);
|
|
10850
10854
|
});
|
|
10851
|
-
async function
|
|
10855
|
+
async function Hn(y) {
|
|
10852
10856
|
if (y.type === E.FINISHED_LOADING) {
|
|
10853
|
-
|
|
10857
|
+
xn(), setTimeout(() => {
|
|
10854
10858
|
I.value?.update();
|
|
10855
10859
|
}, 0), C.value = !1;
|
|
10856
10860
|
return;
|
|
@@ -10865,62 +10869,62 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10865
10869
|
}, 0);
|
|
10866
10870
|
}
|
|
10867
10871
|
}
|
|
10868
|
-
const
|
|
10869
|
-
C.value = !0, t.type === "json" ?
|
|
10870
|
-
},
|
|
10872
|
+
const Gn = (y) => {
|
|
10873
|
+
C.value = !0, t.type === "json" ? ma(y, m.workspace) : $.workspaces.load(y, m.workspace);
|
|
10874
|
+
}, Wn = () => t.type === "json" ? Ta(m.workspace) : $.workspaces.save(m.workspace), jn = () => {
|
|
10871
10875
|
if (t.type === "json")
|
|
10872
10876
|
console.assert(!1);
|
|
10873
10877
|
else
|
|
10874
10878
|
return s.workspaceToCode(m.workspace);
|
|
10875
|
-
}, Xt = () => {
|
|
10876
|
-
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (Le.value = !1);
|
|
10877
10879
|
}, Jt = () => {
|
|
10880
|
+
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (Le.value = !1);
|
|
10881
|
+
}, qt = () => {
|
|
10878
10882
|
m.workspace.setScale(a.value);
|
|
10879
|
-
},
|
|
10880
|
-
m.workspace.fireChangeListener(new
|
|
10881
|
-
},
|
|
10883
|
+
}, Xn = () => {
|
|
10884
|
+
m.workspace.fireChangeListener(new In());
|
|
10885
|
+
}, Qt = (y) => {
|
|
10882
10886
|
if (y.key === "q" && y.ctrlKey) {
|
|
10883
|
-
|
|
10887
|
+
Jn();
|
|
10884
10888
|
return;
|
|
10885
10889
|
}
|
|
10886
10890
|
if (y.key === "w" && y.ctrlKey) {
|
|
10887
|
-
|
|
10891
|
+
qn();
|
|
10888
10892
|
return;
|
|
10889
10893
|
}
|
|
10890
10894
|
if (y.key === "e" && y.ctrlKey) {
|
|
10891
|
-
|
|
10895
|
+
Qn();
|
|
10892
10896
|
return;
|
|
10893
10897
|
}
|
|
10894
|
-
}, Xn = () => {
|
|
10895
|
-
A.value?.cleanWorkspace();
|
|
10896
10898
|
}, Jn = () => {
|
|
10897
|
-
|
|
10899
|
+
A.value?.cleanWorkspace();
|
|
10898
10900
|
}, qn = () => {
|
|
10901
|
+
i.value = !i.value;
|
|
10902
|
+
}, Qn = () => {
|
|
10899
10903
|
I.value && (I.value.open = !0);
|
|
10900
10904
|
};
|
|
10901
|
-
return
|
|
10902
|
-
window.addEventListener("keydown",
|
|
10903
|
-
}),
|
|
10904
|
-
window.removeEventListener("keydown",
|
|
10905
|
+
return zt(() => {
|
|
10906
|
+
window.addEventListener("keydown", Qt, !1);
|
|
10907
|
+
}), pn(() => {
|
|
10908
|
+
window.removeEventListener("keydown", Qt, !1);
|
|
10905
10909
|
}), Se(
|
|
10906
10910
|
() => t.locale,
|
|
10907
10911
|
(y) => {
|
|
10908
|
-
|
|
10912
|
+
rn(y);
|
|
10909
10913
|
}
|
|
10910
10914
|
), Se(
|
|
10911
10915
|
() => t.dark,
|
|
10912
10916
|
(y) => {
|
|
10913
|
-
|
|
10917
|
+
Xs(y ? "dark" : "light");
|
|
10914
10918
|
}
|
|
10915
10919
|
), Se(Le, (y) => {
|
|
10916
10920
|
y || m.workspace?.hideChaff();
|
|
10917
10921
|
}), Se(i, () => {
|
|
10918
|
-
Xt();
|
|
10919
|
-
}), Se(a, () => {
|
|
10920
10922
|
Jt();
|
|
10921
|
-
}),
|
|
10923
|
+
}), Se(a, () => {
|
|
10924
|
+
qt();
|
|
10925
|
+
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, fe) => {
|
|
10922
10926
|
const It = P("v-icon"), We = P("x-loading");
|
|
10923
|
-
return D(), Q("div",
|
|
10927
|
+
return D(), Q("div", Ea, [
|
|
10924
10928
|
j("div", {
|
|
10925
10929
|
id: u,
|
|
10926
10930
|
ref_key: "blocklyDiv",
|
|
@@ -10930,51 +10934,51 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10930
10934
|
j("div", {
|
|
10931
10935
|
style: W(q.value)
|
|
10932
10936
|
}, [
|
|
10933
|
-
|
|
10937
|
+
ao(y.$slots, "bottom")
|
|
10934
10938
|
], 4),
|
|
10935
10939
|
g.value ? (D(), Q("div", {
|
|
10936
10940
|
key: 0,
|
|
10937
10941
|
class: "d-flex flex-column justify-center align-center",
|
|
10938
|
-
style: W(
|
|
10942
|
+
style: W(de.value)
|
|
10939
10943
|
}, [
|
|
10940
10944
|
B(It, {
|
|
10941
|
-
|
|
10942
|
-
|
|
10945
|
+
icon: "mdi-delete",
|
|
10946
|
+
size: "x-large"
|
|
10943
10947
|
})
|
|
10944
|
-
], 4)) :
|
|
10945
|
-
C.value ?
|
|
10948
|
+
], 4)) : me("", !0),
|
|
10949
|
+
C.value ? me("", !0) : (D(), Q("div", {
|
|
10946
10950
|
key: 1,
|
|
10947
10951
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10948
10952
|
style: W(At.value)
|
|
10949
10953
|
}, [
|
|
10950
|
-
B(
|
|
10954
|
+
B(ta, {
|
|
10951
10955
|
ref_key: "clean",
|
|
10952
10956
|
ref: A,
|
|
10953
10957
|
lock: i.value
|
|
10954
10958
|
}, null, 8, ["lock"]),
|
|
10955
|
-
B(
|
|
10959
|
+
B(na, {
|
|
10956
10960
|
modelValue: i.value,
|
|
10957
|
-
"onUpdate:modelValue":
|
|
10961
|
+
"onUpdate:modelValue": fe[0] || (fe[0] = (zn) => i.value = zn)
|
|
10958
10962
|
}, null, 8, ["modelValue"]),
|
|
10959
|
-
B(
|
|
10963
|
+
B(_a, {
|
|
10960
10964
|
ref_key: "navigator",
|
|
10961
10965
|
ref: I,
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
}, null, 8, ["
|
|
10966
|
+
lock: i.value,
|
|
10967
|
+
type: M.value
|
|
10968
|
+
}, null, 8, ["lock", "type"])
|
|
10965
10969
|
], 4)),
|
|
10966
10970
|
i.value ? (D(), Q("div", {
|
|
10967
10971
|
key: 2,
|
|
10968
|
-
style: W(
|
|
10969
|
-
}, null, 4)) :
|
|
10972
|
+
style: W(Xt.value)
|
|
10973
|
+
}, null, 4)) : me("", !0),
|
|
10970
10974
|
i.value ? (D(), Q("div", {
|
|
10971
10975
|
key: 3,
|
|
10972
10976
|
style: W(G.value)
|
|
10973
|
-
}, null, 4)) :
|
|
10977
|
+
}, null, 4)) : me("", !0),
|
|
10974
10978
|
j("div", {
|
|
10975
10979
|
ref_key: "parentContainer",
|
|
10976
10980
|
ref: p,
|
|
10977
|
-
style: W(
|
|
10981
|
+
style: W($n.value)
|
|
10978
10982
|
}, null, 4),
|
|
10979
10983
|
B(We, {
|
|
10980
10984
|
open: C.value,
|
|
@@ -10983,36 +10987,36 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
10983
10987
|
]);
|
|
10984
10988
|
};
|
|
10985
10989
|
}
|
|
10986
|
-
}),
|
|
10990
|
+
}), Aa = /* @__PURE__ */ oe({
|
|
10987
10991
|
__name: "index",
|
|
10988
10992
|
props: {
|
|
10989
10993
|
code: {}
|
|
10990
10994
|
},
|
|
10991
10995
|
setup(t) {
|
|
10992
10996
|
const e = t;
|
|
10993
|
-
|
|
10994
|
-
const n =
|
|
10997
|
+
Co.registerLanguage("javascript", ko);
|
|
10998
|
+
const n = vo.component, { backgroundColor2: o } = Ke();
|
|
10995
10999
|
return (i, a) => {
|
|
10996
11000
|
const l = P("v-sheet");
|
|
10997
11001
|
return D(), Z(l, {
|
|
10998
11002
|
color: V(o),
|
|
10999
|
-
|
|
11000
|
-
|
|
11003
|
+
height: "100%",
|
|
11004
|
+
width: "100%"
|
|
11001
11005
|
}, {
|
|
11002
11006
|
default: ee(() => [
|
|
11003
11007
|
B(V(n), {
|
|
11004
|
-
|
|
11005
|
-
|
|
11008
|
+
code: e.code,
|
|
11009
|
+
language: "js"
|
|
11006
11010
|
}, null, 8, ["code"])
|
|
11007
11011
|
]),
|
|
11008
11012
|
_: 1
|
|
11009
11013
|
}, 8, ["color"]);
|
|
11010
11014
|
};
|
|
11011
11015
|
}
|
|
11012
|
-
}),
|
|
11016
|
+
}), Ia = { class: "text-subtitle-1" }, Oa = { class: "w-100 h-100 overflow-auto" }, Ca = /* @__PURE__ */ oe({
|
|
11013
11017
|
__name: "index",
|
|
11014
11018
|
setup(t) {
|
|
11015
|
-
const { t: e } = $e(), { sysBarAvail: n } =
|
|
11019
|
+
const { t: e } = $e(), { sysBarAvail: n } = An(), { backgroundColor0: o, backgroundColor2: i } = Ke(), a = Ae(""), l = K(() => {
|
|
11016
11020
|
let p = 48;
|
|
11017
11021
|
return n.value && (p += 24), {
|
|
11018
11022
|
position: "relative",
|
|
@@ -11026,24 +11030,24 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
11026
11030
|
return D(), Z(g, {
|
|
11027
11031
|
modelValue: V(r),
|
|
11028
11032
|
"onUpdate:modelValue": A[1] || (A[1] = (M) => Je(r) ? r.value = M : null),
|
|
11029
|
-
transition: "dialog-bottom-transition",
|
|
11030
|
-
persistent: "",
|
|
11031
|
-
"no-click-animation": "",
|
|
11032
11033
|
fullscreen: "",
|
|
11033
|
-
|
|
11034
|
+
"no-click-animation": "",
|
|
11035
|
+
persistent: "",
|
|
11036
|
+
transition: "dialog-bottom-transition",
|
|
11037
|
+
onKeydown: A[2] || (A[2] = hn(Be((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11034
11038
|
}, {
|
|
11035
11039
|
default: ee(() => [
|
|
11036
11040
|
B(I, {
|
|
11037
11041
|
color: V(o),
|
|
11038
|
-
|
|
11039
|
-
|
|
11042
|
+
height: "100%",
|
|
11043
|
+
width: "100%"
|
|
11040
11044
|
}, {
|
|
11041
11045
|
default: ee(() => [
|
|
11042
11046
|
V(n) ? (D(), Z(I, {
|
|
11043
11047
|
key: 0,
|
|
11044
11048
|
color: V(i),
|
|
11045
11049
|
height: 24
|
|
11046
|
-
}, null, 8, ["color"])) :
|
|
11050
|
+
}, null, 8, ["color"])) : me("", !0),
|
|
11047
11051
|
B(I, {
|
|
11048
11052
|
class: "d-flex align-center px-2",
|
|
11049
11053
|
color: V(i),
|
|
@@ -11051,12 +11055,12 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
11051
11055
|
}, {
|
|
11052
11056
|
default: ee(() => [
|
|
11053
11057
|
B(m, {
|
|
11054
|
-
variant: "text",
|
|
11055
11058
|
density: "comfortable",
|
|
11056
11059
|
icon: "mdi-close",
|
|
11060
|
+
variant: "text",
|
|
11057
11061
|
onClick: A[0] || (A[0] = (M) => r.value = !1)
|
|
11058
11062
|
}),
|
|
11059
|
-
j("span",
|
|
11063
|
+
j("span", Ia, at(V(e)("x-block-lib.dlg.source.title")), 1),
|
|
11060
11064
|
B(C)
|
|
11061
11065
|
]),
|
|
11062
11066
|
_: 1
|
|
@@ -11064,8 +11068,8 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
11064
11068
|
j("div", {
|
|
11065
11069
|
style: W(l.value)
|
|
11066
11070
|
}, [
|
|
11067
|
-
j("div",
|
|
11068
|
-
B(
|
|
11071
|
+
j("div", Oa, [
|
|
11072
|
+
B(Aa, { code: a.value }, null, 8, ["code"])
|
|
11069
11073
|
])
|
|
11070
11074
|
], 4)
|
|
11071
11075
|
]),
|
|
@@ -11076,16 +11080,16 @@ const Ta = { class: "position-relative w-100 h-100" }, Ea = /* @__PURE__ */ oe({
|
|
|
11076
11080
|
}, 8, ["modelValue"]);
|
|
11077
11081
|
};
|
|
11078
11082
|
}
|
|
11079
|
-
}),
|
|
11080
|
-
t.component("XBlockly",
|
|
11083
|
+
}), ka = (t) => {
|
|
11084
|
+
t.component("XBlockly", ga), t.component("XSourceDlg", Ca);
|
|
11081
11085
|
};
|
|
11082
|
-
async function
|
|
11083
|
-
return (await
|
|
11086
|
+
async function Ra(t) {
|
|
11087
|
+
return (await Pn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.j5qa8fnp.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11084
11088
|
}
|
|
11085
|
-
const
|
|
11089
|
+
const Da = { install: ka };
|
|
11086
11090
|
export {
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
+
ga as XBlockly,
|
|
11092
|
+
Da as default,
|
|
11093
|
+
ka as install,
|
|
11094
|
+
Ra as loadLocaleMessageBlock
|
|
11091
11095
|
};
|