x-block-lib 0.7.11 → 0.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/blockly/lock/index.vue.d.ts +1 -1
- package/dist/components/blockly/navigator/blockList/item.vue.d.ts +1 -1
- package/dist/components/sourceDlg/content/index.vue.d.ts +1 -1
- package/dist/components/sourceDlg/index.vue.d.ts +1 -1
- package/dist/core/locale/msg/en.d.ts +23 -0
- package/dist/core/locale/msg/zhHans.d.ts +23 -0
- package/dist/index.js +500 -500
- package/dist/{msg-en.cb0pu5v6.js → msg-en.k914lhgs.js} +24 -0
- package/dist/{msg-zhHans.ca0i4cm9.js → msg-zhHans.ib2kecyn.js} +24 -0
- package/dist/{vendor.k6kjk1km.js → vendor.gwcdj52j.js} +5636 -5541
- package/package.json +18 -17
- package/dist/core/plugins/crossTabCopyPaste/index.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-2ba1be08]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:10px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as
|
|
11
|
-
import { d as h, j as s, O as c, f as co, F as dn, M as _, E, r as Zt, u as v, s as lo, X as he, B as d, i as U, a as k, c as De, b as Rt, e as $, g as Te, h as re, p as Ue, k as z, l as en, m as R, C as fn, N as te, n as uo, P as Dt, V as ge, o as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as
|
|
13
|
-
import { elements as x, pkgs as
|
|
10
|
+
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as Yt, useModel as Me, ref as Ie, computed as K, resolveDirective as to, withDirectives as no, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as at, withModifiers as Be, mergeModels as bt, Fragment as _n, renderList as oo, useId as Bt, onUnmounted as pn, useTemplateRef as Re, withKeys as hn, isRef as Je, createCommentVNode as me, onMounted as zt, nextTick as io, onBeforeUnmount as so, watch as Se, renderSlot as ao } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as co, F as dn, M as _, E, r as Zt, u as v, s as lo, X as he, B as d, i as U, a as k, c as De, b as Rt, e as $, g as Te, h as re, p as Ue, k as z, l as en, m as R, C as fn, N as te, n as uo, P as Dt, V as ge, o as Ye, q as mn, t as ro, v as _o, w as po, S as ho, x as fo, y as mo, T as ct, z as Tn, A as To, D as Eo, G as En, H as go, I as Io, J as Ao, K as Oo, L as Co, Q as ko, R as vo, U as yo } from "./vendor.gwcdj52j.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as No, openPromptDlg as Lo, messageWarning as gn, useColor as Ke, useSystem as In, useViewStack as Kt } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Pe, getPropTag as lt, parsePixelStr as So, parsePercentStr as bo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
15
|
import { useI18n as $e } from "vue-i18n";
|
|
16
|
-
import { useDisplay as
|
|
16
|
+
import { useDisplay as Bo } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
19
19
|
type: "app_debug_trace_v1",
|
|
@@ -117,15 +117,15 @@ class m extends dn {
|
|
|
117
117
|
}
|
|
118
118
|
co.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class An extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
123
|
Zt.register(
|
|
124
124
|
Zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
An
|
|
127
127
|
);
|
|
128
|
-
const
|
|
128
|
+
const Ae = "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)
|
|
@@ -157,7 +157,7 @@ function S(t) {
|
|
|
157
157
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
158
158
|
return v.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ro(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
@@ -229,7 +229,7 @@ function F(t, e) {
|
|
|
229
229
|
}
|
|
230
230
|
function He(t) {
|
|
231
231
|
const { version: e } = T.app.activeObject;
|
|
232
|
-
if (!
|
|
232
|
+
if (!Pe[e])
|
|
233
233
|
return console.assert(!1, "invalid pkg version", e), [];
|
|
234
234
|
const o = [];
|
|
235
235
|
for (const i in x) {
|
|
@@ -258,7 +258,7 @@ function Ot(t, e) {
|
|
|
258
258
|
if (n)
|
|
259
259
|
return n.events.find((o) => o.key === e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Do(t) {
|
|
262
262
|
const e = [];
|
|
263
263
|
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
264
264
|
e.push([_[i] ?? i, o]);
|
|
@@ -273,13 +273,13 @@ function Ct(t, e) {
|
|
|
273
273
|
if (n)
|
|
274
274
|
return n.methods.find((o) => o.key === e);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Uo(t) {
|
|
277
277
|
const e = [];
|
|
278
278
|
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
279
279
|
e.push([_[i] ?? i, o]);
|
|
280
280
|
}), N(e);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Ve(t, e) {
|
|
283
283
|
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = lt(o, i);
|
|
284
284
|
if (!a)
|
|
285
285
|
return console.assert(!1, "invalid prop tag", o, i), [];
|
|
@@ -300,7 +300,7 @@ function se(t, e) {
|
|
|
300
300
|
}
|
|
301
301
|
function vn(t, e) {
|
|
302
302
|
const { i18n: n } = ie, o = [];
|
|
303
|
-
return
|
|
303
|
+
return Ve(t, e).forEach(({ keys: a, names: l }) => {
|
|
304
304
|
let u = "";
|
|
305
305
|
l.forEach((r, p) => {
|
|
306
306
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
@@ -324,7 +324,7 @@ function Ne(t) {
|
|
|
324
324
|
}
|
|
325
325
|
return n;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function w(t) {
|
|
328
328
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
329
329
|
}
|
|
330
330
|
function Ge(t) {
|
|
@@ -339,15 +339,15 @@ function Ge(t) {
|
|
|
339
339
|
l && (r += ` / ${l}`), n.push([r, i]);
|
|
340
340
|
}), N(n);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
const e =
|
|
342
|
+
function Pt(t) {
|
|
343
|
+
const e = w(t);
|
|
344
344
|
if (!e)
|
|
345
345
|
return [];
|
|
346
346
|
const n = x[e.key];
|
|
347
347
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
348
348
|
}
|
|
349
349
|
function kt(t, e) {
|
|
350
|
-
const n =
|
|
350
|
+
const n = w(t);
|
|
351
351
|
if (!n)
|
|
352
352
|
return;
|
|
353
353
|
const o = x[n.key];
|
|
@@ -357,21 +357,21 @@ function kt(t, e) {
|
|
|
357
357
|
}
|
|
358
358
|
return o.events.find((i) => i.key === e);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Mo(t) {
|
|
361
361
|
const e = [];
|
|
362
|
-
return
|
|
362
|
+
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
363
363
|
e.push([_[i] ?? i, o]);
|
|
364
364
|
}), N(e);
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
const e =
|
|
366
|
+
function Vt(t) {
|
|
367
|
+
const e = w(t);
|
|
368
368
|
if (!e)
|
|
369
369
|
return [];
|
|
370
370
|
const n = x[e.key];
|
|
371
371
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
372
372
|
}
|
|
373
373
|
function vt(t, e) {
|
|
374
|
-
const n =
|
|
374
|
+
const n = w(t);
|
|
375
375
|
if (!n)
|
|
376
376
|
return;
|
|
377
377
|
const o = x[n.key];
|
|
@@ -381,9 +381,9 @@ function vt(t, e) {
|
|
|
381
381
|
}
|
|
382
382
|
return o.methods.find((i) => i.key === e);
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Po(t) {
|
|
385
385
|
const e = [];
|
|
386
|
-
return
|
|
386
|
+
return Vt(t).forEach(({ key: o, name: i }) => {
|
|
387
387
|
e.push([_[i] ?? i, o]);
|
|
388
388
|
}), N(e);
|
|
389
389
|
}
|
|
@@ -391,7 +391,7 @@ function xe(t, e) {
|
|
|
391
391
|
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = lt(o, i);
|
|
392
392
|
if (!l)
|
|
393
393
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
394
|
-
const u =
|
|
394
|
+
const u = w(t);
|
|
395
395
|
return u ? x[u.key] ? (n[u.key]?.[l]?.forEach((p) => {
|
|
396
396
|
e && (!p.raw.ui || p.raw.readonly || p.keys === "alias") || a.push(p);
|
|
397
397
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
@@ -402,7 +402,7 @@ function ae(t, e) {
|
|
|
402
402
|
console.assert(!1, "invalid prop tag", o, i);
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
|
-
const l =
|
|
405
|
+
const l = w(t);
|
|
406
406
|
if (l)
|
|
407
407
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
408
408
|
}
|
|
@@ -437,7 +437,7 @@ const Vo = {
|
|
|
437
437
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
438
438
|
const e = this.getField("NODE");
|
|
439
439
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
440
|
-
const n =
|
|
440
|
+
const n = Vt(this.node.id)?.[0];
|
|
441
441
|
if (!n)
|
|
442
442
|
return;
|
|
443
443
|
this.method.key = n.key, this.method.name = n.name, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -459,7 +459,7 @@ const Vo = {
|
|
|
459
459
|
return Ge("method");
|
|
460
460
|
},
|
|
461
461
|
genMethodOpts_: function() {
|
|
462
|
-
return
|
|
462
|
+
return Po(this.node.id);
|
|
463
463
|
},
|
|
464
464
|
genElementOpts_: function() {
|
|
465
465
|
return ve();
|
|
@@ -477,7 +477,7 @@ const Vo = {
|
|
|
477
477
|
}
|
|
478
478
|
},
|
|
479
479
|
onNodeChange_: function(t) {
|
|
480
|
-
const e =
|
|
480
|
+
const e = w(t);
|
|
481
481
|
if (!e) {
|
|
482
482
|
console.assert(!1);
|
|
483
483
|
return;
|
|
@@ -486,7 +486,7 @@ const Vo = {
|
|
|
486
486
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
487
487
|
const o = this.getField("METHOD");
|
|
488
488
|
if (o.getOptions(!1), n || !vt(this.node.id, this.method.key)) {
|
|
489
|
-
const a =
|
|
489
|
+
const a = Vt(this.node.id)?.[0]?.key ?? "";
|
|
490
490
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
491
491
|
}
|
|
492
492
|
},
|
|
@@ -550,9 +550,9 @@ const Vo = {
|
|
|
550
550
|
t.length > 0 && F(this, t);
|
|
551
551
|
},
|
|
552
552
|
checkWarning_: function() {
|
|
553
|
-
const t =
|
|
553
|
+
const t = w(this.node.id);
|
|
554
554
|
if (!t) {
|
|
555
|
-
this.setWarningText(_.
|
|
555
|
+
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
556
556
|
return;
|
|
557
557
|
}
|
|
558
558
|
if (t.key !== this.node.key) {
|
|
@@ -562,7 +562,7 @@ const Vo = {
|
|
|
562
562
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
563
563
|
const e = vt(this.node.id, this.method.key);
|
|
564
564
|
if (!e) {
|
|
565
|
-
this.setWarningText(_.
|
|
565
|
+
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
568
|
if (e.name !== this.method.name && (this.method.name = e.name), !U(e.inputs, this.method.inputs) || !U(e.outputs, this.method.outputs)) {
|
|
@@ -595,7 +595,7 @@ ${a}}
|
|
|
595
595
|
`;
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
const
|
|
598
|
+
const xo = {
|
|
599
599
|
init: function() {
|
|
600
600
|
this.element = {
|
|
601
601
|
key: "",
|
|
@@ -638,7 +638,7 @@ const Po = {
|
|
|
638
638
|
return ve("method");
|
|
639
639
|
},
|
|
640
640
|
genMethodOpts_: function() {
|
|
641
|
-
return
|
|
641
|
+
return Uo(this.element.key);
|
|
642
642
|
},
|
|
643
643
|
onchange: function(t) {
|
|
644
644
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -725,13 +725,13 @@ const Po = {
|
|
|
725
725
|
checkWarning_: function() {
|
|
726
726
|
const t = _e(this.element.key);
|
|
727
727
|
if (!t) {
|
|
728
|
-
this.setWarningText(_.
|
|
728
|
+
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
731
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
732
732
|
const e = Ct(this.element.key, this.method.key);
|
|
733
733
|
if (!e) {
|
|
734
|
-
this.setWarningText(_.
|
|
734
|
+
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
737
|
if (e.name !== this.method.name && (this.method.name = e.name), !U(this.method.inputs, e.inputs) || !U(this.method.outputs, e.outputs)) {
|
|
@@ -741,7 +741,7 @@ const Po = {
|
|
|
741
741
|
this.setWarningText(null);
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
d.call_node_method_as_v1 =
|
|
744
|
+
d.call_node_method_as_v1 = xo;
|
|
745
745
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
746
746
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
747
747
|
if (!o)
|
|
@@ -765,7 +765,7 @@ ${a}}
|
|
|
765
765
|
`;
|
|
766
766
|
}
|
|
767
767
|
};
|
|
768
|
-
function
|
|
768
|
+
function Fo() {
|
|
769
769
|
return T.app.activeObject.type !== "comp" ? !1 : T.app.activeComp.meta.properties.length > 0 || T.app.activeComp.meta.methods.length > 0 || T.app.activeComp.meta.events.length > 0;
|
|
770
770
|
}
|
|
771
771
|
function Fe() {
|
|
@@ -793,7 +793,7 @@ function yt(t, e) {
|
|
|
793
793
|
if (n)
|
|
794
794
|
return n.outputs.find((o) => o.id === e);
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function wo(t) {
|
|
797
797
|
const e = [];
|
|
798
798
|
return xt(t).forEach(({ id: o, name: i }) => {
|
|
799
799
|
e.push([i, o]);
|
|
@@ -811,7 +811,7 @@ function Yo() {
|
|
|
811
811
|
t.push([o, n]);
|
|
812
812
|
}), N(t);
|
|
813
813
|
}
|
|
814
|
-
const
|
|
814
|
+
const Ko = {
|
|
815
815
|
init: function() {
|
|
816
816
|
this.method = {
|
|
817
817
|
id: "",
|
|
@@ -881,7 +881,7 @@ const wo = {
|
|
|
881
881
|
checkWarning_: function() {
|
|
882
882
|
const t = ze(this.method.id);
|
|
883
883
|
if (!t) {
|
|
884
|
-
this.setWarningText(_.
|
|
884
|
+
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
887
887
|
if (t.name !== this.method.name && (this.method.name = t.name), !U(t.inputs, this.method.inputs)) {
|
|
@@ -891,14 +891,14 @@ const wo = {
|
|
|
891
891
|
this.setWarningText(null);
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
|
-
d.comp_method_impl_v1 =
|
|
894
|
+
d.comp_method_impl_v1 = Ko;
|
|
895
895
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
896
896
|
const e = t;
|
|
897
897
|
return `{
|
|
898
898
|
${s.statementToCode(e, "HANDLE")}}
|
|
899
899
|
`;
|
|
900
900
|
};
|
|
901
|
-
const
|
|
901
|
+
const $o = (t, e) => {
|
|
902
902
|
const n = ut(t), o = Ce(t);
|
|
903
903
|
d[n] = {
|
|
904
904
|
init: function() {
|
|
@@ -918,12 +918,12 @@ const Ko = (t, e) => {
|
|
|
918
918
|
return [a(l), c.ATOMIC];
|
|
919
919
|
};
|
|
920
920
|
};
|
|
921
|
-
for (const t in
|
|
922
|
-
const e =
|
|
921
|
+
for (const t in Pe) {
|
|
922
|
+
const e = Pe[t];
|
|
923
923
|
for (const n in e.items)
|
|
924
|
-
|
|
924
|
+
$o(n, e.items[n]);
|
|
925
925
|
}
|
|
926
|
-
const
|
|
926
|
+
const Ho = (t, e) => {
|
|
927
927
|
const n = ut(t), o = Ce(t);
|
|
928
928
|
d[n] = {
|
|
929
929
|
init: function() {
|
|
@@ -978,25 +978,25 @@ const $o = (t, e) => {
|
|
|
978
978
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
979
979
|
let u, r;
|
|
980
980
|
if (l.ui === "pixelInput") {
|
|
981
|
-
const p =
|
|
981
|
+
const p = So(this.value) ?? 0;
|
|
982
982
|
u = new Rt(
|
|
983
983
|
p,
|
|
984
984
|
l.min,
|
|
985
985
|
l.max,
|
|
986
986
|
l.precision ? 1 / Math.pow(10, l.precision) : null,
|
|
987
|
-
(
|
|
988
|
-
this.value =
|
|
987
|
+
(I) => {
|
|
988
|
+
this.value = I + "px";
|
|
989
989
|
}
|
|
990
990
|
), r = "px";
|
|
991
991
|
} else if (l.ui === "percentInput") {
|
|
992
|
-
const p =
|
|
992
|
+
const p = bo(this.value) ?? 0;
|
|
993
993
|
u = new Rt(
|
|
994
994
|
p,
|
|
995
995
|
l.min,
|
|
996
996
|
l.max,
|
|
997
997
|
l.precision ? 1 / Math.pow(10, l.precision) : null,
|
|
998
|
-
(
|
|
999
|
-
this.value =
|
|
998
|
+
(I) => {
|
|
999
|
+
this.value = I + "%";
|
|
1000
1000
|
}
|
|
1001
1001
|
), r = "%";
|
|
1002
1002
|
}
|
|
@@ -1005,7 +1005,7 @@ const $o = (t, e) => {
|
|
|
1005
1005
|
checkWarning_: function() {
|
|
1006
1006
|
let i = this.value;
|
|
1007
1007
|
if (i || (i = void 0), !e.find((l) => l.validator(i))) {
|
|
1008
|
-
this.setWarningText(_.
|
|
1008
|
+
this.setWarningText(_.WARN_TYPE_NOT_FOUND);
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
1011
|
this.setWarningText(null);
|
|
@@ -1015,12 +1015,12 @@ const $o = (t, e) => {
|
|
|
1015
1015
|
return [a(i.value), c.ATOMIC];
|
|
1016
1016
|
};
|
|
1017
1017
|
};
|
|
1018
|
-
for (const t in
|
|
1019
|
-
const e =
|
|
1018
|
+
for (const t in Pe) {
|
|
1019
|
+
const e = Pe[t];
|
|
1020
1020
|
for (const n in e.types)
|
|
1021
|
-
|
|
1021
|
+
Ho(n, e.types[n]);
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1023
|
+
const Go = {
|
|
1024
1024
|
init: function() {
|
|
1025
1025
|
this.node = {
|
|
1026
1026
|
id: "",
|
|
@@ -1064,7 +1064,7 @@ const Ho = {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
},
|
|
1066
1066
|
onNodeChange_: function(t) {
|
|
1067
|
-
const e =
|
|
1067
|
+
const e = w(t);
|
|
1068
1068
|
if (!e) {
|
|
1069
1069
|
console.assert(!1);
|
|
1070
1070
|
return;
|
|
@@ -1072,9 +1072,9 @@ const Ho = {
|
|
|
1072
1072
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1073
1073
|
},
|
|
1074
1074
|
checkWarning_: function() {
|
|
1075
|
-
const t =
|
|
1075
|
+
const t = w(this.node.id);
|
|
1076
1076
|
if (!t) {
|
|
1077
|
-
this.setWarningText(_.
|
|
1077
|
+
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1078
1078
|
return;
|
|
1079
1079
|
}
|
|
1080
1080
|
if (this.node.key !== t.key) {
|
|
@@ -1084,12 +1084,12 @@ const Ho = {
|
|
|
1084
1084
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1085
1085
|
}
|
|
1086
1086
|
};
|
|
1087
|
-
d.get_node_v1 =
|
|
1087
|
+
d.get_node_v1 = Go;
|
|
1088
1088
|
s.forBlock.get_node_v1 = function(t) {
|
|
1089
1089
|
const e = t;
|
|
1090
1090
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1091
1091
|
};
|
|
1092
|
-
const
|
|
1092
|
+
const Wo = {
|
|
1093
1093
|
init: function() {
|
|
1094
1094
|
this.node = {
|
|
1095
1095
|
id: "",
|
|
@@ -1146,7 +1146,7 @@ const Go = {
|
|
|
1146
1146
|
}
|
|
1147
1147
|
},
|
|
1148
1148
|
onNodeChange_: function(t) {
|
|
1149
|
-
const e =
|
|
1149
|
+
const e = w(t);
|
|
1150
1150
|
if (!e) {
|
|
1151
1151
|
console.assert(!1);
|
|
1152
1152
|
return;
|
|
@@ -1164,9 +1164,9 @@ const Go = {
|
|
|
1164
1164
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1165
1165
|
},
|
|
1166
1166
|
checkWarning_: function() {
|
|
1167
|
-
const t =
|
|
1167
|
+
const t = w(this.node.id);
|
|
1168
1168
|
if (!t) {
|
|
1169
|
-
this.setWarningText(_.
|
|
1169
|
+
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1170
1170
|
return;
|
|
1171
1171
|
}
|
|
1172
1172
|
if (t.key !== this.node.key) {
|
|
@@ -1176,18 +1176,18 @@ const Go = {
|
|
|
1176
1176
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1177
1177
|
const e = ae(this.node.id, this.prop.keys);
|
|
1178
1178
|
if (!e) {
|
|
1179
|
-
this.setWarningText(_.
|
|
1179
|
+
this.setWarningText(_.WARN_PROP_NOT_FOUND);
|
|
1180
1180
|
return;
|
|
1181
1181
|
}
|
|
1182
1182
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1183
1183
|
}
|
|
1184
1184
|
};
|
|
1185
|
-
d.get_node_prop_v1 =
|
|
1185
|
+
d.get_node_prop_v1 = Wo;
|
|
1186
1186
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1187
1187
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1188
1188
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1189
1189
|
};
|
|
1190
|
-
const
|
|
1190
|
+
const jo = {
|
|
1191
1191
|
init: function() {
|
|
1192
1192
|
this.element = {
|
|
1193
1193
|
key: "",
|
|
@@ -1206,7 +1206,7 @@ const Wo = {
|
|
|
1206
1206
|
this.element.key = t.key, this.element.name = t.name;
|
|
1207
1207
|
const e = this.getField("ELEMENT");
|
|
1208
1208
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1209
|
-
const n =
|
|
1209
|
+
const n = Ve(this.element.key)?.[0];
|
|
1210
1210
|
if (!n)
|
|
1211
1211
|
return;
|
|
1212
1212
|
this.prop.keys = n.keys, this.prop.names = De(n.names);
|
|
@@ -1252,7 +1252,7 @@ const Wo = {
|
|
|
1252
1252
|
this.element.key = e.key, this.element.name = e.name;
|
|
1253
1253
|
const o = this.getField("PROP");
|
|
1254
1254
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
1255
|
-
const a =
|
|
1255
|
+
const a = Ve(this.element.key)?.[0]?.keys ?? "";
|
|
1256
1256
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1257
1257
|
}
|
|
1258
1258
|
},
|
|
@@ -1263,24 +1263,24 @@ const Wo = {
|
|
|
1263
1263
|
checkWarning_: function() {
|
|
1264
1264
|
const t = _e(this.element.key);
|
|
1265
1265
|
if (!t) {
|
|
1266
|
-
this.setWarningText(_.
|
|
1266
|
+
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1267
1267
|
return;
|
|
1268
1268
|
}
|
|
1269
1269
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
1270
1270
|
const e = se(this.element.key, this.prop.keys);
|
|
1271
1271
|
if (!e) {
|
|
1272
|
-
this.setWarningText(_.
|
|
1272
|
+
this.setWarningText(_.WARN_PROP_NOT_FOUND);
|
|
1273
1273
|
return;
|
|
1274
1274
|
}
|
|
1275
1275
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1276
1276
|
}
|
|
1277
1277
|
};
|
|
1278
|
-
d.get_node_prop_as_v1 =
|
|
1278
|
+
d.get_node_prop_as_v1 = jo;
|
|
1279
1279
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1280
1280
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1281
1281
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1282
1282
|
};
|
|
1283
|
-
function
|
|
1283
|
+
function Xo() {
|
|
1284
1284
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1285
1285
|
}
|
|
1286
1286
|
function Sn() {
|
|
@@ -1291,13 +1291,13 @@ function on(t) {
|
|
|
1291
1291
|
(e) => e.id === t
|
|
1292
1292
|
);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Jo() {
|
|
1295
1295
|
const t = [];
|
|
1296
1296
|
return Sn().forEach(({ id: n, name: o }) => {
|
|
1297
1297
|
t.push([o, n]);
|
|
1298
1298
|
}), N(t);
|
|
1299
1299
|
}
|
|
1300
|
-
const
|
|
1300
|
+
const qo = {
|
|
1301
1301
|
init: function() {
|
|
1302
1302
|
this.argument = {
|
|
1303
1303
|
id: "",
|
|
@@ -1319,7 +1319,7 @@ const Jo = {
|
|
|
1319
1319
|
}, 0);
|
|
1320
1320
|
},
|
|
1321
1321
|
genArgumentOpts_: function() {
|
|
1322
|
-
return
|
|
1322
|
+
return Jo();
|
|
1323
1323
|
},
|
|
1324
1324
|
onchange: function(t) {
|
|
1325
1325
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1347,7 +1347,7 @@ const Jo = {
|
|
|
1347
1347
|
checkWarning_: function() {
|
|
1348
1348
|
const t = on(this.argument.id);
|
|
1349
1349
|
if (!t) {
|
|
1350
|
-
this.setWarningText(_.
|
|
1350
|
+
this.setWarningText(_.WARN_ARGUMENT_NOT_FOUND);
|
|
1351
1351
|
return;
|
|
1352
1352
|
}
|
|
1353
1353
|
if (t.name !== this.argument.name && (this.argument.name = t.name), t.type !== this.argument.type) {
|
|
@@ -1357,7 +1357,7 @@ const Jo = {
|
|
|
1357
1357
|
this.setWarningText(null);
|
|
1358
1358
|
}
|
|
1359
1359
|
};
|
|
1360
|
-
d.get_page_argument_v1 =
|
|
1360
|
+
d.get_page_argument_v1 = qo;
|
|
1361
1361
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1362
1362
|
const e = t;
|
|
1363
1363
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
@@ -1368,7 +1368,7 @@ function Gt() {
|
|
|
1368
1368
|
function sn(t) {
|
|
1369
1369
|
return T.app.appList.find((e) => e.id === t);
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Qo() {
|
|
1372
1372
|
const t = [];
|
|
1373
1373
|
return Gt().forEach(({ id: n, name: o }) => {
|
|
1374
1374
|
t.push([o, n]);
|
|
@@ -1383,7 +1383,7 @@ function Nt(t, e) {
|
|
|
1383
1383
|
if (n)
|
|
1384
1384
|
return n.pages.find((o) => o.id === e);
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function zo(t) {
|
|
1387
1387
|
const e = [];
|
|
1388
1388
|
return Ft(t).forEach(({ id: o, name: i }) => {
|
|
1389
1389
|
e.push([i, o]);
|
|
@@ -1402,14 +1402,14 @@ function Bn() {
|
|
|
1402
1402
|
function an(t) {
|
|
1403
1403
|
return t === "" ? bn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function Zo() {
|
|
1406
1406
|
const { i18n: t } = ie, e = [];
|
|
1407
1407
|
return Bn().forEach(({ id: o, name: i }) => {
|
|
1408
1408
|
let a = i;
|
|
1409
1409
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1410
1410
|
}), N(e);
|
|
1411
1411
|
}
|
|
1412
|
-
const
|
|
1412
|
+
const ei = {
|
|
1413
1413
|
init: function() {
|
|
1414
1414
|
this.app = {
|
|
1415
1415
|
id: "",
|
|
@@ -1447,10 +1447,10 @@ const Zo = {
|
|
|
1447
1447
|
}, 0);
|
|
1448
1448
|
},
|
|
1449
1449
|
genAppOpts_: function() {
|
|
1450
|
-
return
|
|
1450
|
+
return Qo();
|
|
1451
1451
|
},
|
|
1452
1452
|
genPageOpts_: function() {
|
|
1453
|
-
return
|
|
1453
|
+
return zo(this.app.id);
|
|
1454
1454
|
},
|
|
1455
1455
|
onchange: function(t) {
|
|
1456
1456
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1485,25 +1485,25 @@ const Zo = {
|
|
|
1485
1485
|
checkWarning_: function() {
|
|
1486
1486
|
const t = sn(this.app.id);
|
|
1487
1487
|
if (!t) {
|
|
1488
|
-
this.setWarningText(_.
|
|
1488
|
+
this.setWarningText(_.WARN_APP_NOT_FOUND);
|
|
1489
1489
|
return;
|
|
1490
1490
|
}
|
|
1491
1491
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1492
1492
|
const e = Nt(this.app.id, this.page.id);
|
|
1493
1493
|
if (!e) {
|
|
1494
|
-
this.setWarningText(_.
|
|
1494
|
+
this.setWarningText(_.WARN_PAGE_NOT_FOUND);
|
|
1495
1495
|
return;
|
|
1496
1496
|
}
|
|
1497
1497
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1498
1498
|
}
|
|
1499
1499
|
};
|
|
1500
|
-
d.navigate_to_v1 =
|
|
1500
|
+
d.navigate_to_v1 = ei;
|
|
1501
1501
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1502
1502
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
1503
|
return `__navigateToV1__(${n}, ${o});
|
|
1504
1504
|
`;
|
|
1505
1505
|
};
|
|
1506
|
-
const
|
|
1506
|
+
const ti = {
|
|
1507
1507
|
init: function() {
|
|
1508
1508
|
this.node = {
|
|
1509
1509
|
id: "",
|
|
@@ -1524,7 +1524,7 @@ const ei = {
|
|
|
1524
1524
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1525
1525
|
const e = this.getField("NODE");
|
|
1526
1526
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1527
|
-
const n =
|
|
1527
|
+
const n = Pt(this.node.id)?.[0];
|
|
1528
1528
|
if (!n)
|
|
1529
1529
|
return;
|
|
1530
1530
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1546,7 +1546,7 @@ const ei = {
|
|
|
1546
1546
|
return Ge("event");
|
|
1547
1547
|
},
|
|
1548
1548
|
genEventOpts_: function() {
|
|
1549
|
-
return
|
|
1549
|
+
return Mo(this.node.id);
|
|
1550
1550
|
},
|
|
1551
1551
|
onchange: function(t) {
|
|
1552
1552
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1561,7 +1561,7 @@ const ei = {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
},
|
|
1563
1563
|
onNodeChange_: function(t) {
|
|
1564
|
-
const e =
|
|
1564
|
+
const e = w(t);
|
|
1565
1565
|
if (!e) {
|
|
1566
1566
|
console.assert(!1);
|
|
1567
1567
|
return;
|
|
@@ -1570,7 +1570,7 @@ const ei = {
|
|
|
1570
1570
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1571
1571
|
const o = this.getField("EVENT");
|
|
1572
1572
|
if (o.getOptions(!1), n || !kt(this.node.id, this.event.key)) {
|
|
1573
|
-
const a =
|
|
1573
|
+
const a = Pt(this.node.id)?.[0]?.key ?? "";
|
|
1574
1574
|
o.setValue(a), this.event.key === a && this.onEventChange_(a);
|
|
1575
1575
|
}
|
|
1576
1576
|
},
|
|
@@ -1597,9 +1597,9 @@ const ei = {
|
|
|
1597
1597
|
}), t.length > 0 && F(this, t);
|
|
1598
1598
|
},
|
|
1599
1599
|
checkWarning_: function() {
|
|
1600
|
-
const t =
|
|
1600
|
+
const t = w(this.node.id);
|
|
1601
1601
|
if (!t) {
|
|
1602
|
-
this.setWarningText(_.
|
|
1602
|
+
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1603
1603
|
return;
|
|
1604
1604
|
}
|
|
1605
1605
|
if (t.key !== this.node.key) {
|
|
@@ -1609,7 +1609,7 @@ const ei = {
|
|
|
1609
1609
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1610
1610
|
const e = kt(this.node.id, this.event.key);
|
|
1611
1611
|
if (!e) {
|
|
1612
|
-
this.setWarningText(_.
|
|
1612
|
+
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
1615
1615
|
if (e.name !== this.event.name && (this.event.name = e.name), !U(e.params, this.event.params)) {
|
|
@@ -1619,7 +1619,7 @@ const ei = {
|
|
|
1619
1619
|
this.setWarningText(null);
|
|
1620
1620
|
}
|
|
1621
1621
|
};
|
|
1622
|
-
d.on_node_event_v1 =
|
|
1622
|
+
d.on_node_event_v1 = ti;
|
|
1623
1623
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1624
1624
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1625
1625
|
let i = "";
|
|
@@ -1631,7 +1631,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1631
1631
|
${a}});
|
|
1632
1632
|
`;
|
|
1633
1633
|
};
|
|
1634
|
-
const
|
|
1634
|
+
const ni = {
|
|
1635
1635
|
init: function() {
|
|
1636
1636
|
this.element = {
|
|
1637
1637
|
key: "",
|
|
@@ -1673,7 +1673,7 @@ const ti = {
|
|
|
1673
1673
|
return ve("event");
|
|
1674
1674
|
},
|
|
1675
1675
|
genEventOpts_: function() {
|
|
1676
|
-
return
|
|
1676
|
+
return Do(this.element.key);
|
|
1677
1677
|
},
|
|
1678
1678
|
onchange: function(t) {
|
|
1679
1679
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1726,13 +1726,13 @@ const ti = {
|
|
|
1726
1726
|
checkWarning_: function() {
|
|
1727
1727
|
const t = _e(this.element.key);
|
|
1728
1728
|
if (!t) {
|
|
1729
|
-
this.setWarningText(_.
|
|
1729
|
+
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1730
1730
|
return;
|
|
1731
1731
|
}
|
|
1732
1732
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
1733
1733
|
const e = Ot(this.element.key, this.event.key);
|
|
1734
1734
|
if (!e) {
|
|
1735
|
-
this.setWarningText(_.
|
|
1735
|
+
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1736
1736
|
return;
|
|
1737
1737
|
}
|
|
1738
1738
|
if (e.name !== this.event.name && (this.event.name = e.name), !U(e.params, this.event.params)) {
|
|
@@ -1742,7 +1742,7 @@ const ti = {
|
|
|
1742
1742
|
this.setWarningText(null);
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
|
-
d.on_node_event_as_v1 =
|
|
1745
|
+
d.on_node_event_as_v1 = ni;
|
|
1746
1746
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1747
1747
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1748
1748
|
let i = "";
|
|
@@ -1754,7 +1754,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1754
1754
|
${a}});
|
|
1755
1755
|
`;
|
|
1756
1756
|
};
|
|
1757
|
-
const
|
|
1757
|
+
const oi = {
|
|
1758
1758
|
init: function() {
|
|
1759
1759
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1760
1760
|
},
|
|
@@ -1783,7 +1783,7 @@ const ni = {
|
|
|
1783
1783
|
]);
|
|
1784
1784
|
}
|
|
1785
1785
|
};
|
|
1786
|
-
d.open_confirm_dlg_v1 =
|
|
1786
|
+
d.open_confirm_dlg_v1 = oi;
|
|
1787
1787
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1788
1788
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1789
1789
|
return `{
|
|
@@ -1791,7 +1791,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1791
1791
|
${o}}
|
|
1792
1792
|
`;
|
|
1793
1793
|
};
|
|
1794
|
-
const
|
|
1794
|
+
const ii = {
|
|
1795
1795
|
init: function() {
|
|
1796
1796
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
1797
1797
|
},
|
|
@@ -1822,7 +1822,7 @@ const oi = {
|
|
|
1822
1822
|
]);
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
1825
|
-
d.open_prompt_dlg_v1 =
|
|
1825
|
+
d.open_prompt_dlg_v1 = ii;
|
|
1826
1826
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1827
1827
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1828
1828
|
return `{
|
|
@@ -1862,7 +1862,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1862
1862
|
return `__messageV1__(${e}, ${n});
|
|
1863
1863
|
`;
|
|
1864
1864
|
};
|
|
1865
|
-
const
|
|
1865
|
+
const si = {
|
|
1866
1866
|
init: function() {
|
|
1867
1867
|
this.comp = {
|
|
1868
1868
|
id: void 0,
|
|
@@ -1890,7 +1890,7 @@ const ii = {
|
|
|
1890
1890
|
}, 0);
|
|
1891
1891
|
},
|
|
1892
1892
|
genCompOpts_: function() {
|
|
1893
|
-
return
|
|
1893
|
+
return Zo();
|
|
1894
1894
|
},
|
|
1895
1895
|
onchange: function(t) {
|
|
1896
1896
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1914,22 +1914,22 @@ const ii = {
|
|
|
1914
1914
|
},
|
|
1915
1915
|
checkWarning_: function() {
|
|
1916
1916
|
if (this.comp.id === void 0) {
|
|
1917
|
-
this.setWarningText(_.
|
|
1917
|
+
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1918
1918
|
return;
|
|
1919
1919
|
}
|
|
1920
1920
|
if (!an(this.comp.id)) {
|
|
1921
|
-
this.setWarningText(_.
|
|
1921
|
+
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1922
1922
|
return;
|
|
1923
1923
|
}
|
|
1924
1924
|
this.setWarningText(null);
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
|
-
d.select_comp_v1 =
|
|
1927
|
+
d.select_comp_v1 = si;
|
|
1928
1928
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1929
1929
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1930
1930
|
return [e(o), c.ATOMIC];
|
|
1931
1931
|
};
|
|
1932
|
-
const
|
|
1932
|
+
const ai = {
|
|
1933
1933
|
init: function() {
|
|
1934
1934
|
this.method = {
|
|
1935
1935
|
id: "",
|
|
@@ -1970,7 +1970,7 @@ const si = {
|
|
|
1970
1970
|
return Nn();
|
|
1971
1971
|
},
|
|
1972
1972
|
genOutputOpts_: function() {
|
|
1973
|
-
return
|
|
1973
|
+
return wo(this.method.id);
|
|
1974
1974
|
},
|
|
1975
1975
|
onchange: function(t) {
|
|
1976
1976
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2021,13 +2021,13 @@ const si = {
|
|
|
2021
2021
|
checkWarning_: function() {
|
|
2022
2022
|
const t = ze(this.method.id);
|
|
2023
2023
|
if (!t) {
|
|
2024
|
-
this.setWarningText(_.
|
|
2024
|
+
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
2025
2025
|
return;
|
|
2026
2026
|
}
|
|
2027
2027
|
t.name !== this.method.name && (this.method.name = t.name);
|
|
2028
2028
|
const e = yt(this.method.id, this.output.id);
|
|
2029
2029
|
if (!e) {
|
|
2030
|
-
this.setWarningText(_.
|
|
2030
|
+
this.setWarningText(_.WARN_OUTPUT_NOT_FOUND);
|
|
2031
2031
|
return;
|
|
2032
2032
|
}
|
|
2033
2033
|
if (e.name !== this.output.name && (this.output.name = e.name), e.type !== this.output.type) {
|
|
@@ -2037,7 +2037,7 @@ const si = {
|
|
|
2037
2037
|
this.setWarningText(null);
|
|
2038
2038
|
}
|
|
2039
2039
|
};
|
|
2040
|
-
d.set_comp_method_output_v1 =
|
|
2040
|
+
d.set_comp_method_output_v1 = ai;
|
|
2041
2041
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2042
2042
|
const e = t;
|
|
2043
2043
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2064,7 +2064,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2064
2064
|
return `__setCompMethodOutputV1__(${n});
|
|
2065
2065
|
`;
|
|
2066
2066
|
};
|
|
2067
|
-
const
|
|
2067
|
+
const ci = {
|
|
2068
2068
|
init: function() {
|
|
2069
2069
|
this.node = {
|
|
2070
2070
|
id: "",
|
|
@@ -2121,7 +2121,7 @@ const ai = {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
},
|
|
2123
2123
|
onNodeChange_: function(t) {
|
|
2124
|
-
const e =
|
|
2124
|
+
const e = w(t);
|
|
2125
2125
|
if (!e) {
|
|
2126
2126
|
console.assert(!1);
|
|
2127
2127
|
return;
|
|
@@ -2158,9 +2158,9 @@ const ai = {
|
|
|
2158
2158
|
n.ui === "strInput" ? e.setCheck("String") : n.ui === "numInput" ? e.setCheck("Number") : n.ui === "switch" ? e.setCheck("Boolean") : n.ui === "colorPicker" ? e.setCheck("Color") : n.ui === "select" ? e.setCheck(Ce(n.items)) : n.ui === "multiTypes" ? e.setCheck(Ce(n.types)) : n.ui === "compSelect" ? e.setCheck("Comp") : e.setCheck(null);
|
|
2159
2159
|
},
|
|
2160
2160
|
checkWarning_: function() {
|
|
2161
|
-
const t =
|
|
2161
|
+
const t = w(this.node.id);
|
|
2162
2162
|
if (!t) {
|
|
2163
|
-
this.setWarningText(_.
|
|
2163
|
+
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
2164
2164
|
return;
|
|
2165
2165
|
}
|
|
2166
2166
|
if (t.key !== this.node.key) {
|
|
@@ -2170,19 +2170,19 @@ const ai = {
|
|
|
2170
2170
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2171
2171
|
const e = ae(this.node.id, this.prop.keys);
|
|
2172
2172
|
if (!e) {
|
|
2173
|
-
this.setWarningText(_.
|
|
2173
|
+
this.setWarningText(_.WARN_PROP_NOT_FOUND);
|
|
2174
2174
|
return;
|
|
2175
2175
|
}
|
|
2176
2176
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2177
2177
|
}
|
|
2178
2178
|
};
|
|
2179
|
-
d.set_node_prop_v1 =
|
|
2179
|
+
d.set_node_prop_v1 = ci;
|
|
2180
2180
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2181
2181
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2182
2182
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2183
2183
|
`;
|
|
2184
2184
|
};
|
|
2185
|
-
const
|
|
2185
|
+
const li = {
|
|
2186
2186
|
init: function() {
|
|
2187
2187
|
this.element = {
|
|
2188
2188
|
key: "",
|
|
@@ -2201,7 +2201,7 @@ const ci = {
|
|
|
2201
2201
|
this.element.key = t.key, this.element.name = t.name;
|
|
2202
2202
|
const e = this.getField("ELEMENT");
|
|
2203
2203
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
2204
|
-
const n =
|
|
2204
|
+
const n = Ve(this.element.key, !0)?.[0];
|
|
2205
2205
|
if (!n)
|
|
2206
2206
|
return;
|
|
2207
2207
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2247,7 +2247,7 @@ const ci = {
|
|
|
2247
2247
|
this.element.key = e.key, this.element.name = e.name;
|
|
2248
2248
|
const o = this.getField("PROP");
|
|
2249
2249
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
2250
|
-
const a =
|
|
2250
|
+
const a = Ve(this.element.key)?.[0]?.keys ?? "";
|
|
2251
2251
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2252
2252
|
}
|
|
2253
2253
|
},
|
|
@@ -2277,7 +2277,7 @@ const ci = {
|
|
|
2277
2277
|
checkWarning_: function() {
|
|
2278
2278
|
const t = _e(this.element.key);
|
|
2279
2279
|
if (!t) {
|
|
2280
|
-
this.setWarningText(_.
|
|
2280
|
+
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
2281
2281
|
return;
|
|
2282
2282
|
}
|
|
2283
2283
|
if (t.key !== this.element.key) {
|
|
@@ -2287,19 +2287,19 @@ const ci = {
|
|
|
2287
2287
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
2288
2288
|
const e = se(this.element.key, this.prop.keys);
|
|
2289
2289
|
if (!e) {
|
|
2290
|
-
this.setWarningText(_.
|
|
2290
|
+
this.setWarningText(_.WARN_PROP_NOT_FOUND);
|
|
2291
2291
|
return;
|
|
2292
2292
|
}
|
|
2293
2293
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2294
2294
|
}
|
|
2295
2295
|
};
|
|
2296
|
-
d.set_node_prop_as_v1 =
|
|
2296
|
+
d.set_node_prop_as_v1 = li;
|
|
2297
2297
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2298
2298
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2299
2299
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2300
2300
|
`;
|
|
2301
2301
|
};
|
|
2302
|
-
const
|
|
2302
|
+
const ui = {
|
|
2303
2303
|
init: function() {
|
|
2304
2304
|
this.event = {
|
|
2305
2305
|
id: "",
|
|
@@ -2373,7 +2373,7 @@ const li = {
|
|
|
2373
2373
|
checkWarning_: function() {
|
|
2374
2374
|
const t = nn(this.event.id);
|
|
2375
2375
|
if (!t) {
|
|
2376
|
-
this.setWarningText(_.
|
|
2376
|
+
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
2377
2377
|
return;
|
|
2378
2378
|
}
|
|
2379
2379
|
if (t.name !== this.event.name && (this.event.name = t.name), !U(t.params, this.event.params)) {
|
|
@@ -2383,7 +2383,7 @@ const li = {
|
|
|
2383
2383
|
this.setWarningText(null);
|
|
2384
2384
|
}
|
|
2385
2385
|
};
|
|
2386
|
-
d.trigger_comp_event_v1 =
|
|
2386
|
+
d.trigger_comp_event_v1 = ui;
|
|
2387
2387
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2388
2388
|
return "";
|
|
2389
2389
|
};
|
|
@@ -3090,7 +3090,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3090
3090
|
`
|
|
3091
3091
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3092
3092
|
};
|
|
3093
|
-
const
|
|
3093
|
+
const ri = v.xml, _i = [
|
|
3094
3094
|
{
|
|
3095
3095
|
type: "add_data_v1",
|
|
3096
3096
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3152,16 +3152,16 @@ const ui = v.xml, ri = [
|
|
|
3152
3152
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3153
3153
|
}
|
|
3154
3154
|
];
|
|
3155
|
-
function
|
|
3156
|
-
const n =
|
|
3155
|
+
function pi(t, e) {
|
|
3156
|
+
const n = _i.find((o) => o.type === t);
|
|
3157
3157
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3158
3158
|
}
|
|
3159
|
-
const
|
|
3159
|
+
const hi = {
|
|
3160
3160
|
init: function() {
|
|
3161
3161
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3162
3162
|
},
|
|
3163
3163
|
mutationToDom: function() {
|
|
3164
|
-
const t =
|
|
3164
|
+
const t = ri.createElement("mutation");
|
|
3165
3165
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3166
3166
|
},
|
|
3167
3167
|
domToMutation: function(t) {
|
|
@@ -3190,7 +3190,7 @@ const pi = {
|
|
|
3190
3190
|
},
|
|
3191
3191
|
tryDuplicate_: function(t) {
|
|
3192
3192
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3193
|
-
if (e &&
|
|
3193
|
+
if (e && pi(e.type, t.oldInputName))
|
|
3194
3194
|
try {
|
|
3195
3195
|
E.disable();
|
|
3196
3196
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -3211,7 +3211,7 @@ const pi = {
|
|
|
3211
3211
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3212
3212
|
}
|
|
3213
3213
|
};
|
|
3214
|
-
d.parameter_v1 =
|
|
3214
|
+
d.parameter_v1 = hi;
|
|
3215
3215
|
s.forBlock.parameter_v1 = function(t) {
|
|
3216
3216
|
return [t.key, c.ATOMIC];
|
|
3217
3217
|
};
|
|
@@ -3230,7 +3230,7 @@ function Rn(t) {
|
|
|
3230
3230
|
e.push([i, o]);
|
|
3231
3231
|
}), N(e);
|
|
3232
3232
|
}
|
|
3233
|
-
function
|
|
3233
|
+
function we(t) {
|
|
3234
3234
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3235
3235
|
return e ? e.funcs : [];
|
|
3236
3236
|
}
|
|
@@ -3241,24 +3241,24 @@ function Oe(t, e) {
|
|
|
3241
3241
|
}
|
|
3242
3242
|
function Dn(t) {
|
|
3243
3243
|
const e = [];
|
|
3244
|
-
return
|
|
3244
|
+
return we(t).forEach(({ id: o, name: i }) => {
|
|
3245
3245
|
e.push([i, o]);
|
|
3246
3246
|
}), N(e);
|
|
3247
3247
|
}
|
|
3248
|
-
function
|
|
3248
|
+
function wt() {
|
|
3249
3249
|
return T.compute.activeFunc;
|
|
3250
3250
|
}
|
|
3251
3251
|
function cn(t) {
|
|
3252
3252
|
const { outputs: e } = T.compute.activeFunc;
|
|
3253
3253
|
return e.find((n) => n.id === t);
|
|
3254
3254
|
}
|
|
3255
|
-
function
|
|
3255
|
+
function di() {
|
|
3256
3256
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3257
3257
|
return e.forEach(({ id: n, name: o }) => {
|
|
3258
3258
|
t.push([o, n]);
|
|
3259
3259
|
}), N(t);
|
|
3260
3260
|
}
|
|
3261
|
-
const
|
|
3261
|
+
const fi = {
|
|
3262
3262
|
init: function() {
|
|
3263
3263
|
this.space = {
|
|
3264
3264
|
id: "",
|
|
@@ -3279,7 +3279,7 @@ const di = {
|
|
|
3279
3279
|
this.space.id = t.id, this.space.name = t.name;
|
|
3280
3280
|
const e = this.getField("SPACE");
|
|
3281
3281
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3282
|
-
const n =
|
|
3282
|
+
const n = we(this.space.id)?.[0];
|
|
3283
3283
|
if (!n)
|
|
3284
3284
|
return;
|
|
3285
3285
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3323,7 +3323,7 @@ const di = {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
let n = !1;
|
|
3325
3325
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Oe(this.space.id, this.func.id)) {
|
|
3326
|
-
const i =
|
|
3326
|
+
const i = we(this.space.id)?.[0];
|
|
3327
3327
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3328
3328
|
}
|
|
3329
3329
|
},
|
|
@@ -3393,13 +3393,13 @@ const di = {
|
|
|
3393
3393
|
checkWarning_: function() {
|
|
3394
3394
|
const t = Ze(this.space.id);
|
|
3395
3395
|
if (!t) {
|
|
3396
|
-
this.setWarningText(_.
|
|
3396
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3397
3397
|
return;
|
|
3398
3398
|
}
|
|
3399
3399
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3400
3400
|
const e = Oe(this.space.id, this.func.id);
|
|
3401
3401
|
if (!e) {
|
|
3402
|
-
this.setWarningText(_.
|
|
3402
|
+
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3403
3403
|
return;
|
|
3404
3404
|
}
|
|
3405
3405
|
if (!U(e.inputs, this.func.inputs)) {
|
|
@@ -3413,24 +3413,24 @@ const di = {
|
|
|
3413
3413
|
this.setWarningText(null);
|
|
3414
3414
|
}
|
|
3415
3415
|
};
|
|
3416
|
-
d.call_func_v1 =
|
|
3416
|
+
d.call_func_v1 = fi;
|
|
3417
3417
|
s.forBlock.call_func_v1 = function(t) {
|
|
3418
3418
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3419
3419
|
let l = "";
|
|
3420
3420
|
l += `${e}var __inputs__ = {
|
|
3421
|
-
`, o.func.inputs.forEach(({ id:
|
|
3421
|
+
`, o.func.inputs.forEach(({ id: A }, f) => {
|
|
3422
3422
|
const C = s.valueToCode(
|
|
3423
3423
|
o,
|
|
3424
3424
|
"INPUT" + f,
|
|
3425
3425
|
c.ATOMIC
|
|
3426
3426
|
);
|
|
3427
|
-
l += `${e}${e}${n(
|
|
3427
|
+
l += `${e}${e}${n(A)}: ${C},
|
|
3428
3428
|
`;
|
|
3429
3429
|
}), l += `${e}};`;
|
|
3430
3430
|
const u = n(o.space.name + "/" + o.func.name);
|
|
3431
3431
|
let r = "";
|
|
3432
|
-
o.func.outputs.forEach(({ id:
|
|
3433
|
-
r += `${e}var __output_${
|
|
3432
|
+
o.func.outputs.forEach(({ id: A }) => {
|
|
3433
|
+
r += `${e}var __output_${A}__ = __result__[${n(A)}];
|
|
3434
3434
|
`;
|
|
3435
3435
|
});
|
|
3436
3436
|
const p = s.statementToCode(o, "CALLBACK");
|
|
@@ -3440,7 +3440,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3440
3440
|
${r}${p}}
|
|
3441
3441
|
`;
|
|
3442
3442
|
};
|
|
3443
|
-
const
|
|
3443
|
+
const mi = {
|
|
3444
3444
|
init: function() {
|
|
3445
3445
|
this.space = {
|
|
3446
3446
|
id: "",
|
|
@@ -3461,7 +3461,7 @@ const fi = {
|
|
|
3461
3461
|
this.space.id = t.id, this.space.name = t.name;
|
|
3462
3462
|
const e = this.getField("SPACE");
|
|
3463
3463
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3464
|
-
const n =
|
|
3464
|
+
const n = we(this.space.id)?.[0];
|
|
3465
3465
|
if (!n)
|
|
3466
3466
|
return;
|
|
3467
3467
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3505,7 +3505,7 @@ const fi = {
|
|
|
3505
3505
|
}
|
|
3506
3506
|
let n = !1;
|
|
3507
3507
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Oe(this.space.id, this.func.id)) {
|
|
3508
|
-
const i =
|
|
3508
|
+
const i = we(this.space.id)?.[0];
|
|
3509
3509
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3510
3510
|
}
|
|
3511
3511
|
},
|
|
@@ -3575,13 +3575,13 @@ const fi = {
|
|
|
3575
3575
|
checkWarning_: function() {
|
|
3576
3576
|
const t = Ze(this.space.id);
|
|
3577
3577
|
if (!t) {
|
|
3578
|
-
this.setWarningText(_.
|
|
3578
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3579
3579
|
return;
|
|
3580
3580
|
}
|
|
3581
3581
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3582
3582
|
const e = Oe(this.space.id, this.func.id);
|
|
3583
3583
|
if (!e) {
|
|
3584
|
-
this.setWarningText(_.
|
|
3584
|
+
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3585
3585
|
return;
|
|
3586
3586
|
}
|
|
3587
3587
|
if (!U(e.inputs, this.func.inputs)) {
|
|
@@ -3595,24 +3595,24 @@ const fi = {
|
|
|
3595
3595
|
this.setWarningText(null);
|
|
3596
3596
|
}
|
|
3597
3597
|
};
|
|
3598
|
-
d.call_func_internal_v1 =
|
|
3598
|
+
d.call_func_internal_v1 = mi;
|
|
3599
3599
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3600
3600
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3601
3601
|
let l = `${e}var __inputs__ = {
|
|
3602
3602
|
`;
|
|
3603
|
-
o.func.inputs.forEach(({ id:
|
|
3603
|
+
o.func.inputs.forEach(({ id: A }, f) => {
|
|
3604
3604
|
const C = s.valueToCode(
|
|
3605
3605
|
o,
|
|
3606
3606
|
"INPUT" + f,
|
|
3607
3607
|
c.ATOMIC
|
|
3608
3608
|
);
|
|
3609
|
-
l += `${e}${e}${n(
|
|
3609
|
+
l += `${e}${e}${n(A)}: ${C},
|
|
3610
3610
|
`;
|
|
3611
3611
|
}), l += `${e}};`;
|
|
3612
3612
|
const u = o.space.name + "/" + o.func.name;
|
|
3613
3613
|
let r = "";
|
|
3614
|
-
o.func.outputs.forEach(({ id:
|
|
3615
|
-
r += `${e}var __output_${
|
|
3614
|
+
o.func.outputs.forEach(({ id: A }) => {
|
|
3615
|
+
r += `${e}var __output_${A}__ = __result__.outputs[${n(A)}];
|
|
3616
3616
|
`;
|
|
3617
3617
|
});
|
|
3618
3618
|
const p = s.statementToCode(o, "CALLBACK");
|
|
@@ -3647,7 +3647,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3647
3647
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3648
3648
|
`;
|
|
3649
3649
|
};
|
|
3650
|
-
const
|
|
3650
|
+
const Ti = {
|
|
3651
3651
|
init: function() {
|
|
3652
3652
|
this.func = {
|
|
3653
3653
|
id: "",
|
|
@@ -3657,7 +3657,7 @@ const mi = {
|
|
|
3657
3657
|
initData_: function() {
|
|
3658
3658
|
if (this.func.id)
|
|
3659
3659
|
return;
|
|
3660
|
-
const { id: t, inputs: e } =
|
|
3660
|
+
const { id: t, inputs: e } = wt();
|
|
3661
3661
|
this.func.id = t, this.func.inputs = e;
|
|
3662
3662
|
},
|
|
3663
3663
|
saveExtraState: function() {
|
|
@@ -3694,7 +3694,7 @@ const mi = {
|
|
|
3694
3694
|
F(this, t);
|
|
3695
3695
|
},
|
|
3696
3696
|
checkWarning_: function() {
|
|
3697
|
-
const { id: t, inputs: e } =
|
|
3697
|
+
const { id: t, inputs: e } = wt();
|
|
3698
3698
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3699
3699
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3700
3700
|
return;
|
|
@@ -3702,7 +3702,7 @@ const mi = {
|
|
|
3702
3702
|
this.setWarningText(null);
|
|
3703
3703
|
}
|
|
3704
3704
|
};
|
|
3705
|
-
d.func_entry_v1 =
|
|
3705
|
+
d.func_entry_v1 = Ti;
|
|
3706
3706
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3707
3707
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3708
3708
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3712,16 +3712,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3712
3712
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3713
3713
|
${n}}`;
|
|
3714
3714
|
};
|
|
3715
|
-
const
|
|
3715
|
+
const Ei = {
|
|
3716
3716
|
init: function() {
|
|
3717
3717
|
}
|
|
3718
3718
|
};
|
|
3719
|
-
d.on_flow_state_event_v1 =
|
|
3719
|
+
d.on_flow_state_event_v1 = Ei;
|
|
3720
3720
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3721
3721
|
return `__onFlowStateEventV1__();
|
|
3722
3722
|
`;
|
|
3723
3723
|
};
|
|
3724
|
-
const
|
|
3724
|
+
const gi = {
|
|
3725
3725
|
init: function() {
|
|
3726
3726
|
this.output = {
|
|
3727
3727
|
id: "",
|
|
@@ -3732,7 +3732,7 @@ const Ei = {
|
|
|
3732
3732
|
initData_: function() {
|
|
3733
3733
|
if (this.output.id)
|
|
3734
3734
|
return;
|
|
3735
|
-
const t =
|
|
3735
|
+
const t = wt().outputs?.[0];
|
|
3736
3736
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3737
3737
|
},
|
|
3738
3738
|
saveExtraState: function() {
|
|
@@ -3746,7 +3746,7 @@ const Ei = {
|
|
|
3746
3746
|
}, 0);
|
|
3747
3747
|
},
|
|
3748
3748
|
genOutputOpts_: function() {
|
|
3749
|
-
return
|
|
3749
|
+
return di();
|
|
3750
3750
|
},
|
|
3751
3751
|
onchange: function(t) {
|
|
3752
3752
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3796,7 +3796,7 @@ const Ei = {
|
|
|
3796
3796
|
this.setWarningText(null);
|
|
3797
3797
|
}
|
|
3798
3798
|
};
|
|
3799
|
-
d.set_func_output_v1 =
|
|
3799
|
+
d.set_func_output_v1 = gi;
|
|
3800
3800
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3801
3801
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3802
3802
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3869,7 +3869,7 @@ function Lt(t, e, n) {
|
|
|
3869
3869
|
if (a)
|
|
3870
3870
|
return a.columns.find((l) => l.id === n);
|
|
3871
3871
|
}
|
|
3872
|
-
function
|
|
3872
|
+
function Ii(t, e) {
|
|
3873
3873
|
const n = [];
|
|
3874
3874
|
return et(t, e).forEach(({ id: i, name: a }) => {
|
|
3875
3875
|
n.push([a, i]);
|
|
@@ -3909,7 +3909,7 @@ function Ai(t) {
|
|
|
3909
3909
|
}, l = $.blocks.append(a, t.workspace);
|
|
3910
3910
|
e.connect(l.outputConnection);
|
|
3911
3911
|
}
|
|
3912
|
-
function
|
|
3912
|
+
function Oi(t) {
|
|
3913
3913
|
const e = t.getInput("HANDLE").connection;
|
|
3914
3914
|
if (e.targetBlock())
|
|
3915
3915
|
return;
|
|
@@ -3933,7 +3933,7 @@ function Ii(t) {
|
|
|
3933
3933
|
}, o = $.blocks.append(n, t.workspace);
|
|
3934
3934
|
e.connect(o.previousConnection);
|
|
3935
3935
|
}
|
|
3936
|
-
const
|
|
3936
|
+
const Ci = {
|
|
3937
3937
|
init: function() {
|
|
3938
3938
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
3939
3939
|
},
|
|
@@ -3953,10 +3953,10 @@ const Oi = {
|
|
|
3953
3953
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3954
3954
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3955
3955
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3956
|
-
]),
|
|
3956
|
+
]), Oi(this));
|
|
3957
3957
|
}
|
|
3958
3958
|
};
|
|
3959
|
-
d.add_data_v1 =
|
|
3959
|
+
d.add_data_v1 = Ci;
|
|
3960
3960
|
s.forBlock.add_data_v1 = function(t) {
|
|
3961
3961
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3962
3962
|
return `{
|
|
@@ -3972,7 +3972,7 @@ ${e}}
|
|
|
3972
3972
|
${o}}
|
|
3973
3973
|
`;
|
|
3974
3974
|
};
|
|
3975
|
-
const
|
|
3975
|
+
const ki = {
|
|
3976
3976
|
init: function() {
|
|
3977
3977
|
this.space = {
|
|
3978
3978
|
id: "",
|
|
@@ -4032,7 +4032,7 @@ const Ci = {
|
|
|
4032
4032
|
return pt(this.space.id);
|
|
4033
4033
|
},
|
|
4034
4034
|
genColumnOpts_: function() {
|
|
4035
|
-
return
|
|
4035
|
+
return Ii(this.space.id, this.table.id);
|
|
4036
4036
|
},
|
|
4037
4037
|
onchange: function(t) {
|
|
4038
4038
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4099,13 +4099,13 @@ const Ci = {
|
|
|
4099
4099
|
checkWarning_: function() {
|
|
4100
4100
|
const t = pe(this.space.id);
|
|
4101
4101
|
if (!t) {
|
|
4102
|
-
this.setWarningText(_.
|
|
4102
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4103
4103
|
return;
|
|
4104
4104
|
}
|
|
4105
4105
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
4106
4106
|
const e = X(this.space.id, this.table.id);
|
|
4107
4107
|
if (!e) {
|
|
4108
|
-
this.setWarningText(_.
|
|
4108
|
+
this.setWarningText(_.WARN_TABLE_NOT_FOUND);
|
|
4109
4109
|
return;
|
|
4110
4110
|
}
|
|
4111
4111
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
@@ -4115,7 +4115,7 @@ const Ci = {
|
|
|
4115
4115
|
this.column.id
|
|
4116
4116
|
);
|
|
4117
4117
|
if (!n) {
|
|
4118
|
-
this.setWarningText(_.
|
|
4118
|
+
this.setWarningText(_.WARN_COLUMN_NOT_FOUND);
|
|
4119
4119
|
return;
|
|
4120
4120
|
}
|
|
4121
4121
|
if (n.name !== this.column.name && (this.column.name = n.name), n.type !== this.column.type || n.extend !== this.column.extend) {
|
|
@@ -4125,7 +4125,7 @@ const Ci = {
|
|
|
4125
4125
|
this.setWarningText(null);
|
|
4126
4126
|
}
|
|
4127
4127
|
};
|
|
4128
|
-
d.cond_atomic_v1 =
|
|
4128
|
+
d.cond_atomic_v1 = ki;
|
|
4129
4129
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4130
4130
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4131
4131
|
EQ: "=",
|
|
@@ -4137,19 +4137,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4137
4137
|
}[n.getFieldValue("OP")];
|
|
4138
4138
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4139
4139
|
};
|
|
4140
|
-
const
|
|
4140
|
+
const vi = {
|
|
4141
4141
|
init: function() {
|
|
4142
4142
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4143
4143
|
}
|
|
4144
4144
|
};
|
|
4145
|
-
d.cond_logic_container_v1 =
|
|
4146
|
-
const
|
|
4145
|
+
d.cond_logic_container_v1 = vi;
|
|
4146
|
+
const yi = {
|
|
4147
4147
|
init: function() {
|
|
4148
4148
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4149
|
}
|
|
4150
4150
|
};
|
|
4151
|
-
d.cond_logic_item_v1 =
|
|
4152
|
-
const
|
|
4151
|
+
d.cond_logic_item_v1 = yi;
|
|
4152
|
+
const Ni = {
|
|
4153
4153
|
init: function() {
|
|
4154
4154
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4155
4155
|
new m([
|
|
@@ -4223,7 +4223,7 @@ const yi = {
|
|
|
4223
4223
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4224
4224
|
}
|
|
4225
4225
|
};
|
|
4226
|
-
d.cond_logic_v1 =
|
|
4226
|
+
d.cond_logic_v1 = Ni;
|
|
4227
4227
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4228
4228
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4229
4229
|
i.push(a);
|
|
@@ -4233,7 +4233,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4233
4233
|
}
|
|
4234
4234
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4235
4235
|
};
|
|
4236
|
-
function
|
|
4236
|
+
function Li(t) {
|
|
4237
4237
|
const e = t.getInput("TABLE").connection;
|
|
4238
4238
|
if (e.targetBlock())
|
|
4239
4239
|
return;
|
|
@@ -4252,7 +4252,7 @@ function Ni(t) {
|
|
|
4252
4252
|
}, a = $.blocks.append(i, t.workspace);
|
|
4253
4253
|
e.connect(a.outputConnection);
|
|
4254
4254
|
}
|
|
4255
|
-
function
|
|
4255
|
+
function Si(t) {
|
|
4256
4256
|
const e = t.getInput("CONDITION").connection;
|
|
4257
4257
|
if (e.targetBlock())
|
|
4258
4258
|
return;
|
|
@@ -4277,7 +4277,7 @@ function Li(t) {
|
|
|
4277
4277
|
}, l = $.blocks.append(a, t.workspace);
|
|
4278
4278
|
e.connect(l.outputConnection);
|
|
4279
4279
|
}
|
|
4280
|
-
function
|
|
4280
|
+
function bi(t) {
|
|
4281
4281
|
const e = t.getInput("HANDLE").connection;
|
|
4282
4282
|
if (e.targetBlock())
|
|
4283
4283
|
return;
|
|
@@ -4301,7 +4301,7 @@ function Si(t) {
|
|
|
4301
4301
|
}, o = $.blocks.append(n, t.workspace);
|
|
4302
4302
|
e.connect(o.previousConnection);
|
|
4303
4303
|
}
|
|
4304
|
-
const
|
|
4304
|
+
const Bi = {
|
|
4305
4305
|
init: function() {
|
|
4306
4306
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
4307
4307
|
},
|
|
@@ -4317,13 +4317,13 @@ const bi = {
|
|
|
4317
4317
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4318
4318
|
},
|
|
4319
4319
|
ensureBlocks_: function() {
|
|
4320
|
-
this.isInsertionMarker() || (
|
|
4320
|
+
this.isInsertionMarker() || (Li(this), Si(this), F(this, [
|
|
4321
4321
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4322
4322
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4323
|
-
]),
|
|
4323
|
+
]), bi(this));
|
|
4324
4324
|
}
|
|
4325
4325
|
};
|
|
4326
|
-
d.delete_data_v1 =
|
|
4326
|
+
d.delete_data_v1 = Bi;
|
|
4327
4327
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4328
4328
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4329
4329
|
return `{
|
|
@@ -4361,7 +4361,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4361
4361
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4362
4362
|
`;
|
|
4363
4363
|
};
|
|
4364
|
-
function
|
|
4364
|
+
function Ri(t) {
|
|
4365
4365
|
const e = t.getInput("TABLE").connection;
|
|
4366
4366
|
if (e.targetBlock())
|
|
4367
4367
|
return;
|
|
@@ -4395,7 +4395,7 @@ function Bi(t) {
|
|
|
4395
4395
|
}, l = $.blocks.append(a, t.workspace);
|
|
4396
4396
|
e.connect(l.outputConnection);
|
|
4397
4397
|
}
|
|
4398
|
-
function
|
|
4398
|
+
function Di(t) {
|
|
4399
4399
|
const e = t.getInput("CONDITION").connection;
|
|
4400
4400
|
if (e.targetBlock())
|
|
4401
4401
|
return;
|
|
@@ -4404,7 +4404,7 @@ function Ri(t) {
|
|
|
4404
4404
|
}, o = $.blocks.append(n, t.workspace);
|
|
4405
4405
|
e.connect(o.outputConnection);
|
|
4406
4406
|
}
|
|
4407
|
-
function
|
|
4407
|
+
function Ui(t) {
|
|
4408
4408
|
const e = t.getInput("EXTRA").connection;
|
|
4409
4409
|
if (e.targetBlock())
|
|
4410
4410
|
return;
|
|
@@ -4441,7 +4441,7 @@ function Di(t) {
|
|
|
4441
4441
|
}, o = $.blocks.append(n, t.workspace);
|
|
4442
4442
|
e.connect(o.outputConnection);
|
|
4443
4443
|
}
|
|
4444
|
-
function
|
|
4444
|
+
function Mi(t) {
|
|
4445
4445
|
const e = t.getInput("HANDLE").connection;
|
|
4446
4446
|
if (e.targetBlock())
|
|
4447
4447
|
return;
|
|
@@ -4479,7 +4479,7 @@ h([
|
|
|
4479
4479
|
style: "procedure_blocks"
|
|
4480
4480
|
}
|
|
4481
4481
|
]);
|
|
4482
|
-
const
|
|
4482
|
+
const Pi = {
|
|
4483
4483
|
init: function() {
|
|
4484
4484
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
4485
4485
|
},
|
|
@@ -4495,15 +4495,15 @@ const Mi = {
|
|
|
4495
4495
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4496
4496
|
},
|
|
4497
4497
|
ensureBlocks_: function() {
|
|
4498
|
-
this.isInsertionMarker() || (
|
|
4498
|
+
this.isInsertionMarker() || (Ri(this), Di(this), Ui(this), F(this, [
|
|
4499
4499
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4500
4500
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4501
4501
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4502
4502
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4503
|
-
]),
|
|
4503
|
+
]), Mi(this));
|
|
4504
4504
|
}
|
|
4505
4505
|
};
|
|
4506
|
-
d.query_data_v1 =
|
|
4506
|
+
d.query_data_v1 = Pi;
|
|
4507
4507
|
s.forBlock.query_data_v1 = function(t) {
|
|
4508
4508
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4509
4509
|
return `{
|
|
@@ -4582,13 +4582,13 @@ const Vi = {
|
|
|
4582
4582
|
}
|
|
4583
4583
|
};
|
|
4584
4584
|
d.select_column_container_v1 = Vi;
|
|
4585
|
-
const
|
|
4585
|
+
const xi = {
|
|
4586
4586
|
init: function() {
|
|
4587
4587
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4588
|
}
|
|
4589
4589
|
};
|
|
4590
|
-
d.select_column_item_v1 =
|
|
4591
|
-
const
|
|
4590
|
+
d.select_column_item_v1 = xi;
|
|
4591
|
+
const Fi = {
|
|
4592
4592
|
init: function() {
|
|
4593
4593
|
this.space = {
|
|
4594
4594
|
id: "",
|
|
@@ -4767,13 +4767,13 @@ const xi = {
|
|
|
4767
4767
|
checkWarning_: function() {
|
|
4768
4768
|
const t = pe(this.space.id);
|
|
4769
4769
|
if (!t) {
|
|
4770
|
-
this.setWarningText(_.
|
|
4770
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4771
4771
|
return;
|
|
4772
4772
|
}
|
|
4773
4773
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
4774
4774
|
const e = X(this.space.id, this.table.id);
|
|
4775
4775
|
if (!e) {
|
|
4776
|
-
this.setWarningText(_.
|
|
4776
|
+
this.setWarningText(_.WARN_TABLE_NOT_FOUND);
|
|
4777
4777
|
return;
|
|
4778
4778
|
}
|
|
4779
4779
|
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
@@ -4783,19 +4783,19 @@ const xi = {
|
|
|
4783
4783
|
this.setWarningText(null);
|
|
4784
4784
|
}
|
|
4785
4785
|
};
|
|
4786
|
-
d.select_column_v1 =
|
|
4786
|
+
d.select_column_v1 = Fi;
|
|
4787
4787
|
s.forBlock.select_column_v1 = function(t) {
|
|
4788
4788
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4789
4789
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
4790
|
-
const p = n.getFieldValue("COLUMN" + r),
|
|
4791
|
-
a.push({ name:
|
|
4790
|
+
const p = n.getFieldValue("COLUMN" + r), I = n.table.columns.find((f) => f.id === p).name, A = n.getFieldValue("ALIAS" + r);
|
|
4791
|
+
a.push({ name: I, alias: A });
|
|
4792
4792
|
}
|
|
4793
4793
|
let l = "[";
|
|
4794
|
-
return a.forEach(({ name: r, alias: p },
|
|
4795
|
-
|
|
4794
|
+
return a.forEach(({ name: r, alias: p }, I) => {
|
|
4795
|
+
I !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4796
4796
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4797
4797
|
};
|
|
4798
|
-
const
|
|
4798
|
+
const wi = {
|
|
4799
4799
|
init: function() {
|
|
4800
4800
|
this.space = {
|
|
4801
4801
|
id: "",
|
|
@@ -4871,19 +4871,19 @@ const Fi = {
|
|
|
4871
4871
|
checkWarning_: function() {
|
|
4872
4872
|
const t = pe(this.space.id);
|
|
4873
4873
|
if (!t) {
|
|
4874
|
-
this.setWarningText(_.
|
|
4874
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4875
4875
|
return;
|
|
4876
4876
|
}
|
|
4877
4877
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
4878
4878
|
const e = X(this.space.id, this.table.id);
|
|
4879
4879
|
if (!e) {
|
|
4880
|
-
this.setWarningText(_.
|
|
4880
|
+
this.setWarningText(_.WARN_TABLE_NOT_FOUND);
|
|
4881
4881
|
return;
|
|
4882
4882
|
}
|
|
4883
4883
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4884
4884
|
}
|
|
4885
4885
|
};
|
|
4886
|
-
d.select_table_v1 =
|
|
4886
|
+
d.select_table_v1 = wi;
|
|
4887
4887
|
s.forBlock.select_table_v1 = function(t) {
|
|
4888
4888
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4889
4889
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
@@ -4912,7 +4912,7 @@ const Yi = {
|
|
|
4912
4912
|
};
|
|
4913
4913
|
d.transaction_v1 = Yi;
|
|
4914
4914
|
s.forBlock.transaction_v1 = function(t) {
|
|
4915
|
-
const e = s.INDENT, n = t, o =
|
|
4915
|
+
const e = s.INDENT, n = t, o = Ro(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4916
4916
|
return `{
|
|
4917
4917
|
${e}var __error${o}__ = '';
|
|
4918
4918
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4954,19 +4954,19 @@ ${e}}
|
|
|
4954
4954
|
}
|
|
4955
4955
|
`;
|
|
4956
4956
|
};
|
|
4957
|
-
const
|
|
4957
|
+
const Ki = {
|
|
4958
4958
|
init: function() {
|
|
4959
4959
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
4962
|
-
d.update_column_container_v1 =
|
|
4963
|
-
const
|
|
4962
|
+
d.update_column_container_v1 = Ki;
|
|
4963
|
+
const $i = {
|
|
4964
4964
|
init: function() {
|
|
4965
4965
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4966
|
}
|
|
4967
4967
|
};
|
|
4968
|
-
d.update_column_item_v1 =
|
|
4969
|
-
const
|
|
4968
|
+
d.update_column_item_v1 = $i;
|
|
4969
|
+
const Hi = {
|
|
4970
4970
|
init: function() {
|
|
4971
4971
|
this.space = {
|
|
4972
4972
|
id: "",
|
|
@@ -5179,13 +5179,13 @@ const $i = {
|
|
|
5179
5179
|
checkWarning_: function() {
|
|
5180
5180
|
const t = pe(this.space.id);
|
|
5181
5181
|
if (!t) {
|
|
5182
|
-
this.setWarningText(_.
|
|
5182
|
+
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
5183
5183
|
return;
|
|
5184
5184
|
}
|
|
5185
5185
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
5186
5186
|
const e = X(this.space.id, this.table.id);
|
|
5187
5187
|
if (!e) {
|
|
5188
|
-
this.setWarningText(_.
|
|
5188
|
+
this.setWarningText(_.WARN_TABLE_NOT_FOUND);
|
|
5189
5189
|
return;
|
|
5190
5190
|
}
|
|
5191
5191
|
if (e.name !== this.table.name && (this.table.name = e.name), !U(e.columns, this.table.columns)) {
|
|
@@ -5195,19 +5195,19 @@ const $i = {
|
|
|
5195
5195
|
this.setWarningText(null);
|
|
5196
5196
|
}
|
|
5197
5197
|
};
|
|
5198
|
-
d.update_column_v1 =
|
|
5198
|
+
d.update_column_v1 = Hi;
|
|
5199
5199
|
s.forBlock.update_column_v1 = function(t) {
|
|
5200
5200
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5201
5201
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
5202
|
-
const p = n.getFieldValue("COLUMN" + r),
|
|
5203
|
-
a.push({ name:
|
|
5202
|
+
const p = n.getFieldValue("COLUMN" + r), I = n.table.columns.find((f) => f.id === p).name, A = s.valueToCode(n, "ADD" + r, c.ATOMIC) || "null";
|
|
5203
|
+
a.push({ name: I, value: A });
|
|
5204
5204
|
}
|
|
5205
5205
|
let l = "[";
|
|
5206
|
-
return a.forEach(({ name: r, value: p },
|
|
5207
|
-
|
|
5206
|
+
return a.forEach(({ name: r, value: p }, I) => {
|
|
5207
|
+
I !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5208
5208
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5209
5209
|
};
|
|
5210
|
-
function
|
|
5210
|
+
function Gi(t) {
|
|
5211
5211
|
const e = t.getInput("TABLE").connection;
|
|
5212
5212
|
if (e.targetBlock())
|
|
5213
5213
|
return;
|
|
@@ -5241,7 +5241,7 @@ function Hi(t) {
|
|
|
5241
5241
|
}, l = $.blocks.append(a, t.workspace);
|
|
5242
5242
|
e.connect(l.outputConnection);
|
|
5243
5243
|
}
|
|
5244
|
-
function
|
|
5244
|
+
function Wi(t) {
|
|
5245
5245
|
const e = t.getInput("CONDITION").connection;
|
|
5246
5246
|
if (e.targetBlock())
|
|
5247
5247
|
return;
|
|
@@ -5250,7 +5250,7 @@ function Gi(t) {
|
|
|
5250
5250
|
}, o = $.blocks.append(n, t.workspace);
|
|
5251
5251
|
e.connect(o.outputConnection);
|
|
5252
5252
|
}
|
|
5253
|
-
function
|
|
5253
|
+
function ji(t) {
|
|
5254
5254
|
const e = t.getInput("HANDLE").connection;
|
|
5255
5255
|
if (e.targetBlock())
|
|
5256
5256
|
return;
|
|
@@ -5274,7 +5274,7 @@ function Wi(t) {
|
|
|
5274
5274
|
}, o = $.blocks.append(n, t.workspace);
|
|
5275
5275
|
e.connect(o.previousConnection);
|
|
5276
5276
|
}
|
|
5277
|
-
const
|
|
5277
|
+
const Xi = {
|
|
5278
5278
|
init: function() {
|
|
5279
5279
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
5280
5280
|
},
|
|
@@ -5290,14 +5290,14 @@ const ji = {
|
|
|
5290
5290
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5291
5291
|
},
|
|
5292
5292
|
ensureBlocks: function() {
|
|
5293
|
-
this.isInsertionMarker() || (
|
|
5293
|
+
this.isInsertionMarker() || (Gi(this), Wi(this), F(this, [
|
|
5294
5294
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5295
5295
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5296
5296
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5297
|
-
]),
|
|
5297
|
+
]), ji(this));
|
|
5298
5298
|
}
|
|
5299
5299
|
};
|
|
5300
|
-
d.update_data_v1 =
|
|
5300
|
+
d.update_data_v1 = Xi;
|
|
5301
5301
|
s.forBlock.update_data_v1 = function(t) {
|
|
5302
5302
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5303
5303
|
return `{
|
|
@@ -5314,16 +5314,16 @@ ${e}}
|
|
|
5314
5314
|
${i}}
|
|
5315
5315
|
`;
|
|
5316
5316
|
};
|
|
5317
|
-
const
|
|
5317
|
+
const Ji = v.xml, qi = {
|
|
5318
5318
|
init: function() {
|
|
5319
5319
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5320
|
-
new z(
|
|
5320
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5321
5321
|
this.isInFlyout || this.addEntry_();
|
|
5322
5322
|
})
|
|
5323
5323
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5324
5324
|
},
|
|
5325
5325
|
mutationToDom: function() {
|
|
5326
|
-
const t =
|
|
5326
|
+
const t = Ji.createElement("mutation");
|
|
5327
5327
|
return t.setAttribute("items", String(this.length)), t;
|
|
5328
5328
|
},
|
|
5329
5329
|
domToMutation: function(t) {
|
|
@@ -5336,7 +5336,7 @@ const Xi = v.xml, Ji = {
|
|
|
5336
5336
|
for (let t = 0; t < this.length; t++) {
|
|
5337
5337
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5338
5338
|
n.appendField(
|
|
5339
|
-
new z(
|
|
5339
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5340
5340
|
this.isInFlyout || this.addEntry_(n);
|
|
5341
5341
|
})
|
|
5342
5342
|
), n.appendField(new en(String(t))), n.appendField(
|
|
@@ -5355,7 +5355,7 @@ const Xi = v.xml, Ji = {
|
|
|
5355
5355
|
}
|
|
5356
5356
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5357
5357
|
n.appendField(
|
|
5358
|
-
new z(
|
|
5358
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5359
5359
|
this.isInFlyout || this.addEntry_(n);
|
|
5360
5360
|
})
|
|
5361
5361
|
), n.appendField(new en(String(e))), n.appendField(
|
|
@@ -5375,8 +5375,8 @@ const Xi = v.xml, Ji = {
|
|
|
5375
5375
|
this.length--;
|
|
5376
5376
|
}
|
|
5377
5377
|
};
|
|
5378
|
-
d.json_array_v1 =
|
|
5379
|
-
const
|
|
5378
|
+
d.json_array_v1 = qi;
|
|
5379
|
+
const Qi = {
|
|
5380
5380
|
init: function() {
|
|
5381
5381
|
this.appendDummyInput().appendField(
|
|
5382
5382
|
new dn([
|
|
@@ -5387,11 +5387,11 @@ const qi = {
|
|
|
5387
5387
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5388
5388
|
}
|
|
5389
5389
|
};
|
|
5390
|
-
d.json_boolean_v1 =
|
|
5391
|
-
const ln = v.xml,
|
|
5390
|
+
d.json_boolean_v1 = Qi;
|
|
5391
|
+
const ln = v.xml, zi = {
|
|
5392
5392
|
init: function() {
|
|
5393
5393
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5394
|
-
new z(
|
|
5394
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5395
5395
|
this.isInFlyout || this.addEntry_();
|
|
5396
5396
|
})
|
|
5397
5397
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5419,7 +5419,7 @@ const ln = v.xml, Qi = {
|
|
|
5419
5419
|
for (let e = 0; e < t.length; e++) {
|
|
5420
5420
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5421
5421
|
i.appendField(
|
|
5422
|
-
new z(
|
|
5422
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5423
5423
|
this.isInFlyout || this.addEntry_(i);
|
|
5424
5424
|
})
|
|
5425
5425
|
), i.appendField(new re(n), "KEY" + e), i.appendField(
|
|
@@ -5436,7 +5436,7 @@ const ln = v.xml, Qi = {
|
|
|
5436
5436
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5437
5437
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5438
5438
|
n.appendField(
|
|
5439
|
-
new z(
|
|
5439
|
+
new z(Ae, 20, 20, void 0, () => {
|
|
5440
5440
|
this.isInFlyout || this.addEntry_(n);
|
|
5441
5441
|
})
|
|
5442
5442
|
), n.appendField(new re("key"), "KEY" + e), n.appendField(
|
|
@@ -5454,38 +5454,38 @@ const ln = v.xml, Qi = {
|
|
|
5454
5454
|
this.length--;
|
|
5455
5455
|
}
|
|
5456
5456
|
};
|
|
5457
|
-
d.json_map_v1 =
|
|
5458
|
-
const
|
|
5457
|
+
d.json_map_v1 = zi;
|
|
5458
|
+
const Zi = {
|
|
5459
5459
|
init: function() {
|
|
5460
5460
|
this.appendDummyInput().appendField(new Rt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5461
5461
|
}
|
|
5462
5462
|
};
|
|
5463
|
-
d.json_number_v1 =
|
|
5464
|
-
const
|
|
5463
|
+
d.json_number_v1 = Zi;
|
|
5464
|
+
const es = {
|
|
5465
5465
|
init: function() {
|
|
5466
5466
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5467
5467
|
}
|
|
5468
5468
|
};
|
|
5469
|
-
d.json_root_v1 =
|
|
5470
|
-
const
|
|
5469
|
+
d.json_root_v1 = es;
|
|
5470
|
+
const ts = {
|
|
5471
5471
|
init: function() {
|
|
5472
5472
|
this.appendDummyInput().appendField('"').appendField(new re(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5473
5473
|
}
|
|
5474
5474
|
};
|
|
5475
|
-
d.json_string_v1 =
|
|
5476
|
-
const
|
|
5475
|
+
d.json_string_v1 = ts;
|
|
5476
|
+
const ns = v.xml, os = {
|
|
5477
5477
|
init: function() {
|
|
5478
5478
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5479
5479
|
}
|
|
5480
5480
|
};
|
|
5481
|
-
d.list_create_container_v1 =
|
|
5482
|
-
const
|
|
5481
|
+
d.list_create_container_v1 = os;
|
|
5482
|
+
const is = {
|
|
5483
5483
|
init: function() {
|
|
5484
5484
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5485
|
}
|
|
5486
5486
|
};
|
|
5487
|
-
d.list_create_item_v1 =
|
|
5488
|
-
const
|
|
5487
|
+
d.list_create_item_v1 = is;
|
|
5488
|
+
const ss = {
|
|
5489
5489
|
init: function() {
|
|
5490
5490
|
this.itemCount_ = 0, this.setMutator(
|
|
5491
5491
|
new Te.MutatorIcon(
|
|
@@ -5495,7 +5495,7 @@ const is = {
|
|
|
5495
5495
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5496
5496
|
},
|
|
5497
5497
|
mutationToDom: function() {
|
|
5498
|
-
const t =
|
|
5498
|
+
const t = ns.createElement("mutation");
|
|
5499
5499
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5500
5500
|
},
|
|
5501
5501
|
domToMutation: function(t) {
|
|
@@ -5568,7 +5568,7 @@ const is = {
|
|
|
5568
5568
|
this.removeInput("ADD" + t);
|
|
5569
5569
|
}
|
|
5570
5570
|
};
|
|
5571
|
-
d.list_create_v1 =
|
|
5571
|
+
d.list_create_v1 = ss;
|
|
5572
5572
|
s.forBlock.list_create_v1 = function(t) {
|
|
5573
5573
|
const e = t, n = new Array(e.itemCount_);
|
|
5574
5574
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5784,7 +5784,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5784
5784
|
return `${e}[${n}] = ${o};
|
|
5785
5785
|
`;
|
|
5786
5786
|
};
|
|
5787
|
-
const
|
|
5787
|
+
const as = {
|
|
5788
5788
|
// logic_compare
|
|
5789
5789
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5790
5790
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5798,7 +5798,7 @@ const ss = {
|
|
|
5798
5798
|
};
|
|
5799
5799
|
R.register(
|
|
5800
5800
|
"logic_op_tooltip_v1",
|
|
5801
|
-
R.buildTooltipForDropdown("OP",
|
|
5801
|
+
R.buildTooltipForDropdown("OP", as)
|
|
5802
5802
|
);
|
|
5803
5803
|
h([
|
|
5804
5804
|
{
|
|
@@ -5823,7 +5823,7 @@ h([
|
|
|
5823
5823
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5824
5824
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5825
5825
|
};
|
|
5826
|
-
const
|
|
5826
|
+
const cs = {
|
|
5827
5827
|
onchange: function(t) {
|
|
5828
5828
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5829
5829
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5843,7 +5843,7 @@ const as = {
|
|
|
5843
5843
|
R.register(
|
|
5844
5844
|
"logic_compare_v1",
|
|
5845
5845
|
function() {
|
|
5846
|
-
this.mixin(
|
|
5846
|
+
this.mixin(cs);
|
|
5847
5847
|
}
|
|
5848
5848
|
);
|
|
5849
5849
|
h([
|
|
@@ -5893,7 +5893,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5893
5893
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5894
5894
|
return [`${i} ${n} ${a}`, o];
|
|
5895
5895
|
};
|
|
5896
|
-
const
|
|
5896
|
+
const ls = {
|
|
5897
5897
|
elseIfCount_: 0,
|
|
5898
5898
|
hasElse_: !1,
|
|
5899
5899
|
mutationToDom: function() {
|
|
@@ -6020,7 +6020,7 @@ const cs = {
|
|
|
6020
6020
|
};
|
|
6021
6021
|
R.registerMutator(
|
|
6022
6022
|
"logic_if_v1_mutator",
|
|
6023
|
-
|
|
6023
|
+
ls,
|
|
6024
6024
|
void 0,
|
|
6025
6025
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6026
6026
|
);
|
|
@@ -6166,7 +6166,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6166
|
}
|
|
6167
6167
|
return [`${o} ${e} ${i}`, n];
|
|
6168
6168
|
};
|
|
6169
|
-
const
|
|
6169
|
+
const us = {
|
|
6170
6170
|
prevParentConnection_: null,
|
|
6171
6171
|
onchange: function(t) {
|
|
6172
6172
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6181,7 +6181,7 @@ const ls = {
|
|
|
6181
6181
|
this.prevParentConnection_ = o;
|
|
6182
6182
|
}
|
|
6183
6183
|
};
|
|
6184
|
-
R.registerMixin("logic_ternary_v1",
|
|
6184
|
+
R.registerMixin("logic_ternary_v1", us);
|
|
6185
6185
|
h([
|
|
6186
6186
|
{
|
|
6187
6187
|
type: "logic_ternary_v1",
|
|
@@ -6218,7 +6218,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6218
6218
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6219
6219
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6220
6220
|
};
|
|
6221
|
-
const
|
|
6221
|
+
const rs = {
|
|
6222
6222
|
customContextMenu: function(t) {
|
|
6223
6223
|
if (this.isInFlyout)
|
|
6224
6224
|
return;
|
|
@@ -6240,7 +6240,7 @@ const us = {
|
|
|
6240
6240
|
};
|
|
6241
6241
|
R.registerMixin(
|
|
6242
6242
|
"contextMenu_newGetVariableBlock_v1",
|
|
6243
|
-
|
|
6243
|
+
rs
|
|
6244
6244
|
);
|
|
6245
6245
|
R.register(
|
|
6246
6246
|
"flow_control_tooltip_v1",
|
|
@@ -6249,16 +6249,16 @@ R.register(
|
|
|
6249
6249
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6250
6250
|
})
|
|
6251
6251
|
);
|
|
6252
|
-
const
|
|
6252
|
+
const _s = /* @__PURE__ */ new Set([
|
|
6253
6253
|
"repeat_v1",
|
|
6254
6254
|
"for_each_v1",
|
|
6255
6255
|
"for_v1",
|
|
6256
6256
|
"while_until_v1"
|
|
6257
|
-
]),
|
|
6257
|
+
]), ps = {
|
|
6258
6258
|
getSurroundLoop: function() {
|
|
6259
6259
|
let t = this;
|
|
6260
6260
|
do {
|
|
6261
|
-
if (
|
|
6261
|
+
if (_s.has(t.type))
|
|
6262
6262
|
return t;
|
|
6263
6263
|
t = t?.getSurroundParent();
|
|
6264
6264
|
} while (t);
|
|
@@ -6281,7 +6281,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
6281
6281
|
};
|
|
6282
6282
|
R.registerMixin(
|
|
6283
6283
|
"flow_control_in_loop_check_v1",
|
|
6284
|
-
|
|
6284
|
+
ps
|
|
6285
6285
|
);
|
|
6286
6286
|
h([
|
|
6287
6287
|
{
|
|
@@ -6408,16 +6408,16 @@ ${l}}
|
|
|
6408
6408
|
te.NameType.VARIABLE
|
|
6409
6409
|
), u += `var ${p} = ${i};
|
|
6410
6410
|
`);
|
|
6411
|
-
const
|
|
6411
|
+
const I = s.nameDB_.getDistinctName(
|
|
6412
6412
|
`${n}_by`,
|
|
6413
6413
|
te.NameType.VARIABLE
|
|
6414
6414
|
);
|
|
6415
|
-
return u += `var ${
|
|
6415
|
+
return u += `var ${I} = `, v.string.isNumber(a) ? u += `${Math.abs(Number(a))};
|
|
6416
6416
|
` : u += `Math.abs(${a});
|
|
6417
6417
|
`, u += `if (${r} > ${p}) {
|
|
6418
|
-
${e}${
|
|
6418
|
+
${e}${I} = -${I};
|
|
6419
6419
|
}
|
|
6420
|
-
`, u += `for (${n} = ${r}; ${
|
|
6420
|
+
`, u += `for (${n} = ${r}; ${I} >= 0 ? ${n} <= ${p} : ${n} >= ${p}; ${n} += ${I}) {
|
|
6421
6421
|
${l}}
|
|
6422
6422
|
`, u;
|
|
6423
6423
|
}
|
|
@@ -6583,7 +6583,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6583
6583
|
${o}}
|
|
6584
6584
|
`;
|
|
6585
6585
|
};
|
|
6586
|
-
const
|
|
6586
|
+
const hs = {
|
|
6587
6587
|
// math_arithmetic
|
|
6588
6588
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6589
6589
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6617,7 +6617,7 @@ const ps = {
|
|
|
6617
6617
|
};
|
|
6618
6618
|
R.register(
|
|
6619
6619
|
"math_op_tooltip_v1",
|
|
6620
|
-
R.buildTooltipForDropdown("OP",
|
|
6620
|
+
R.buildTooltipForDropdown("OP", hs)
|
|
6621
6621
|
);
|
|
6622
6622
|
h([
|
|
6623
6623
|
{
|
|
@@ -7220,21 +7220,21 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7220
7220
|
}
|
|
7221
7221
|
return [o, c.DIVISION];
|
|
7222
7222
|
};
|
|
7223
|
-
const
|
|
7223
|
+
const ds = v.xml, fs = {
|
|
7224
7224
|
init: function() {
|
|
7225
7225
|
this.appendDummyInput().appendField(
|
|
7226
7226
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7227
7227
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7228
7228
|
}
|
|
7229
7229
|
};
|
|
7230
|
-
d.object_create_container_v1 =
|
|
7231
|
-
const
|
|
7230
|
+
d.object_create_container_v1 = fs;
|
|
7231
|
+
const ms = {
|
|
7232
7232
|
init: function() {
|
|
7233
7233
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7234
|
}
|
|
7235
7235
|
};
|
|
7236
|
-
d.object_create_item_v1 =
|
|
7237
|
-
const
|
|
7236
|
+
d.object_create_item_v1 = ms;
|
|
7237
|
+
const Ts = {
|
|
7238
7238
|
init: function() {
|
|
7239
7239
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7240
7240
|
new Te.MutatorIcon(
|
|
@@ -7244,7 +7244,7 @@ const ms = {
|
|
|
7244
7244
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7245
7245
|
},
|
|
7246
7246
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7247
|
+
const t = ds.createElement("mutation");
|
|
7248
7248
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7249
7249
|
},
|
|
7250
7250
|
domToMutation: function(t) {
|
|
@@ -7308,7 +7308,7 @@ const ms = {
|
|
|
7308
7308
|
this.removeInput("ADD" + t);
|
|
7309
7309
|
}
|
|
7310
7310
|
};
|
|
7311
|
-
d.object_create_v1 =
|
|
7311
|
+
d.object_create_v1 = Ts;
|
|
7312
7312
|
s.forBlock.object_create_v1 = function(t) {
|
|
7313
7313
|
const e = t;
|
|
7314
7314
|
let n = "{";
|
|
@@ -7566,13 +7566,13 @@ h([
|
|
|
7566
7566
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7567
7567
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7568
7568
|
};
|
|
7569
|
-
const un = v.xml,
|
|
7569
|
+
const un = v.xml, Es = {
|
|
7570
7570
|
init: function() {
|
|
7571
7571
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new uo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7572
7572
|
}
|
|
7573
7573
|
};
|
|
7574
|
-
d.procedure_def_container_v1 =
|
|
7575
|
-
const
|
|
7574
|
+
d.procedure_def_container_v1 = Es;
|
|
7575
|
+
const gs = {
|
|
7576
7576
|
init: function() {
|
|
7577
7577
|
const t = new re(Dt.DEFAULT_ARG);
|
|
7578
7578
|
t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
@@ -7594,8 +7594,8 @@ const Es = {
|
|
|
7594
7594
|
return t;
|
|
7595
7595
|
}
|
|
7596
7596
|
};
|
|
7597
|
-
d.procedure_def_item_v1 =
|
|
7598
|
-
const
|
|
7597
|
+
d.procedure_def_item_v1 = gs;
|
|
7598
|
+
const Is = {
|
|
7599
7599
|
init: function() {
|
|
7600
7600
|
this.withReturn = !1, this.args = [];
|
|
7601
7601
|
const t = new re(
|
|
@@ -7699,8 +7699,8 @@ const gs = {
|
|
|
7699
7699
|
}
|
|
7700
7700
|
}
|
|
7701
7701
|
};
|
|
7702
|
-
d.procedure_def_v1 =
|
|
7703
|
-
const As = v.xml,
|
|
7702
|
+
d.procedure_def_v1 = Is;
|
|
7703
|
+
const As = v.xml, Os = {
|
|
7704
7704
|
init: function() {
|
|
7705
7705
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
7706
7706
|
},
|
|
@@ -7756,14 +7756,14 @@ const As = v.xml, Is = {
|
|
|
7756
7756
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7757
7757
|
}
|
|
7758
7758
|
};
|
|
7759
|
-
d.procedure_return_v1 =
|
|
7759
|
+
d.procedure_return_v1 = Os;
|
|
7760
7760
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7761
7761
|
const e = t;
|
|
7762
7762
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7763
7763
|
` : `return;
|
|
7764
7764
|
`;
|
|
7765
7765
|
};
|
|
7766
|
-
const
|
|
7766
|
+
const Cs = {
|
|
7767
7767
|
init: function() {
|
|
7768
7768
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
7769
7769
|
},
|
|
@@ -7786,7 +7786,7 @@ const Os = {
|
|
|
7786
7786
|
]);
|
|
7787
7787
|
}
|
|
7788
7788
|
};
|
|
7789
|
-
d.download_resource_v1 =
|
|
7789
|
+
d.download_resource_v1 = Cs;
|
|
7790
7790
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7791
7791
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7792
7792
|
return `{
|
|
@@ -7814,7 +7814,7 @@ function Un(t) {
|
|
|
7814
7814
|
}
|
|
7815
7815
|
return o(e.dirTree, ""), n;
|
|
7816
7816
|
}
|
|
7817
|
-
function
|
|
7817
|
+
function ks(t) {
|
|
7818
7818
|
const e = [];
|
|
7819
7819
|
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7820
7820
|
e.push([i, o]);
|
|
@@ -7829,25 +7829,25 @@ function Mn(t, e) {
|
|
|
7829
7829
|
i.dirid === e && o.push(i);
|
|
7830
7830
|
}), o;
|
|
7831
7831
|
}
|
|
7832
|
-
function
|
|
7832
|
+
function vs(t, e) {
|
|
7833
7833
|
const n = [];
|
|
7834
7834
|
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7835
7835
|
n.push([a, i]);
|
|
7836
7836
|
}), N(n);
|
|
7837
7837
|
}
|
|
7838
|
-
function
|
|
7838
|
+
function Pn() {
|
|
7839
7839
|
const t = [];
|
|
7840
7840
|
return T.resource.spaces.forEach((e) => {
|
|
7841
7841
|
e.resources.length > 0 && t.push(e);
|
|
7842
7842
|
}), t;
|
|
7843
7843
|
}
|
|
7844
|
-
function
|
|
7844
|
+
function ys() {
|
|
7845
7845
|
const t = [];
|
|
7846
|
-
return
|
|
7846
|
+
return Pn().forEach(({ id: n, name: o }) => {
|
|
7847
7847
|
t.push([o, n]);
|
|
7848
7848
|
}), N(t);
|
|
7849
7849
|
}
|
|
7850
|
-
const
|
|
7850
|
+
const Ns = {
|
|
7851
7851
|
init: function() {
|
|
7852
7852
|
this.space = {
|
|
7853
7853
|
id: "",
|
|
@@ -7866,7 +7866,7 @@ const ys = {
|
|
|
7866
7866
|
initData_: function() {
|
|
7867
7867
|
if (this.space.id)
|
|
7868
7868
|
return;
|
|
7869
|
-
const t =
|
|
7869
|
+
const t = Pn()?.[0];
|
|
7870
7870
|
if (!t)
|
|
7871
7871
|
return;
|
|
7872
7872
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -7896,20 +7896,20 @@ const ys = {
|
|
|
7896
7896
|
this.space = De(t.space), this.dir = De(t.dir), this.resource = De(t.resource);
|
|
7897
7897
|
},
|
|
7898
7898
|
genSpaceOpts_: function() {
|
|
7899
|
-
return
|
|
7899
|
+
return ys();
|
|
7900
7900
|
},
|
|
7901
7901
|
genDirOpts_: function() {
|
|
7902
|
-
return
|
|
7902
|
+
return ks(this.space.id);
|
|
7903
7903
|
},
|
|
7904
7904
|
genResourceOpts_: function() {
|
|
7905
|
-
return
|
|
7905
|
+
return vs(this.space.id, this.dir.id);
|
|
7906
7906
|
}
|
|
7907
7907
|
};
|
|
7908
|
-
d.select_resource_v1 =
|
|
7908
|
+
d.select_resource_v1 = Ns;
|
|
7909
7909
|
s.forBlock.select_resource_v1 = function() {
|
|
7910
7910
|
return "";
|
|
7911
7911
|
};
|
|
7912
|
-
const
|
|
7912
|
+
const Ls = {
|
|
7913
7913
|
init: function() {
|
|
7914
7914
|
this.appendDummyInput().appendField(
|
|
7915
7915
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7940,7 +7940,7 @@ const Ns = {
|
|
|
7940
7940
|
]);
|
|
7941
7941
|
}
|
|
7942
7942
|
};
|
|
7943
|
-
d.upload_resource_v1 =
|
|
7943
|
+
d.upload_resource_v1 = Ls;
|
|
7944
7944
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7945
7945
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7946
7946
|
return `{
|
|
@@ -7973,9 +7973,9 @@ h([
|
|
|
7973
7973
|
s.forBlock.text_v1 = function(t) {
|
|
7974
7974
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7975
7975
|
};
|
|
7976
|
-
const
|
|
7976
|
+
const Ss = /^\s*'([^']|\\')*'\s*$/;
|
|
7977
7977
|
function qe(t) {
|
|
7978
|
-
return
|
|
7978
|
+
return Ss.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7979
7979
|
}
|
|
7980
7980
|
R.register(
|
|
7981
7981
|
"text_append_tooltip_v1",
|
|
@@ -8179,10 +8179,10 @@ h([
|
|
|
8179
8179
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8180
8180
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8181
8181
|
};
|
|
8182
|
-
const
|
|
8182
|
+
const bs = v.xml, Bs = {
|
|
8183
8183
|
itemCount_: 0,
|
|
8184
8184
|
mutationToDom: function() {
|
|
8185
|
-
const t =
|
|
8185
|
+
const t = bs.createElement("mutation");
|
|
8186
8186
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8187
8187
|
},
|
|
8188
8188
|
domToMutation: function(t) {
|
|
@@ -8253,13 +8253,13 @@ const Ss = v.xml, bs = {
|
|
|
8253
8253
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8254
8254
|
this.removeInput("ADD" + t);
|
|
8255
8255
|
}
|
|
8256
|
-
},
|
|
8256
|
+
}, Rs = function() {
|
|
8257
8257
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Te.MutatorIcon(["text_join_item_v1"], this));
|
|
8258
8258
|
};
|
|
8259
8259
|
R.registerMutator(
|
|
8260
8260
|
"text_join_mutator_v1",
|
|
8261
|
-
|
|
8262
|
-
|
|
8261
|
+
Bs,
|
|
8262
|
+
Rs
|
|
8263
8263
|
);
|
|
8264
8264
|
h([
|
|
8265
8265
|
{
|
|
@@ -8491,7 +8491,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8491
8491
|
}[t.getFieldValue("MODE")];
|
|
8492
8492
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8493
8493
|
};
|
|
8494
|
-
const
|
|
8494
|
+
const Ds = {
|
|
8495
8495
|
init: function() {
|
|
8496
8496
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
8497
8497
|
},
|
|
@@ -8516,7 +8516,7 @@ const Rs = {
|
|
|
8516
8516
|
));
|
|
8517
8517
|
}
|
|
8518
8518
|
};
|
|
8519
|
-
d.create_timer_v1 =
|
|
8519
|
+
d.create_timer_v1 = Ds;
|
|
8520
8520
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8521
8521
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8522
8522
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8545,18 +8545,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8545
8545
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8546
8546
|
`;
|
|
8547
8547
|
};
|
|
8548
|
-
const
|
|
8548
|
+
const Us = {
|
|
8549
8549
|
customContextMenu: function(t) {
|
|
8550
8550
|
if (this.isInFlyout) {
|
|
8551
8551
|
if (this.type === "variable_get_v1") {
|
|
8552
8552
|
const e = {
|
|
8553
8553
|
text: _.RENAME_VARIABLE,
|
|
8554
8554
|
enabled: !0,
|
|
8555
|
-
callback:
|
|
8555
|
+
callback: Ms(this)
|
|
8556
8556
|
}, n = this.getField("VAR").getText(), o = {
|
|
8557
8557
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8558
8558
|
enabled: !0,
|
|
8559
|
-
callback:
|
|
8559
|
+
callback: Ps(this)
|
|
8560
8560
|
};
|
|
8561
8561
|
t.unshift(e), t.unshift(o);
|
|
8562
8562
|
}
|
|
@@ -8574,12 +8574,12 @@ const Ds = {
|
|
|
8574
8574
|
});
|
|
8575
8575
|
}
|
|
8576
8576
|
}
|
|
8577
|
-
},
|
|
8577
|
+
}, Ms = function(t) {
|
|
8578
8578
|
return function() {
|
|
8579
8579
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8580
8580
|
ge.renameVariable(e, o);
|
|
8581
8581
|
};
|
|
8582
|
-
},
|
|
8582
|
+
}, Ps = function(t) {
|
|
8583
8583
|
return function() {
|
|
8584
8584
|
const n = t.getField("VAR").getVariable();
|
|
8585
8585
|
n && ge.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -8587,7 +8587,7 @@ const Ds = {
|
|
|
8587
8587
|
};
|
|
8588
8588
|
R.registerMixin(
|
|
8589
8589
|
"context_menu_variable_v1",
|
|
8590
|
-
|
|
8590
|
+
Us
|
|
8591
8591
|
);
|
|
8592
8592
|
h([
|
|
8593
8593
|
{
|
|
@@ -8668,9 +8668,9 @@ const tt = {
|
|
|
8668
8668
|
name: "INTERFACE_CATEGORY",
|
|
8669
8669
|
callback: Vs
|
|
8670
8670
|
}, b = v.xml;
|
|
8671
|
-
function
|
|
8671
|
+
function xs() {
|
|
8672
8672
|
const t = [];
|
|
8673
|
-
if (
|
|
8673
|
+
if (Xo()) {
|
|
8674
8674
|
{
|
|
8675
8675
|
const e = b.createElement("label");
|
|
8676
8676
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
@@ -8680,7 +8680,7 @@ function Ps() {
|
|
|
8680
8680
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8681
8681
|
}
|
|
8682
8682
|
}
|
|
8683
|
-
if (
|
|
8683
|
+
if (Fo()) {
|
|
8684
8684
|
{
|
|
8685
8685
|
const e = b.createElement("label");
|
|
8686
8686
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
@@ -8764,9 +8764,9 @@ function Ps() {
|
|
|
8764
8764
|
}
|
|
8765
8765
|
const nt = {
|
|
8766
8766
|
name: "UI_CATEGORY",
|
|
8767
|
-
callback:
|
|
8767
|
+
callback: xs
|
|
8768
8768
|
}, be = v.xml;
|
|
8769
|
-
function
|
|
8769
|
+
function Fs() {
|
|
8770
8770
|
const t = [];
|
|
8771
8771
|
{
|
|
8772
8772
|
const e = be.createElement("label");
|
|
@@ -8793,10 +8793,10 @@ function xs() {
|
|
|
8793
8793
|
}
|
|
8794
8794
|
const ce = {
|
|
8795
8795
|
name: "PROCEDURE_CATEGORY",
|
|
8796
|
-
callback:
|
|
8796
|
+
callback: Fs
|
|
8797
8797
|
}, Xe = v.xml;
|
|
8798
|
-
function
|
|
8799
|
-
const t =
|
|
8798
|
+
function ws() {
|
|
8799
|
+
const t = Ye(), e = [];
|
|
8800
8800
|
{
|
|
8801
8801
|
const o = Xe.createElement("label");
|
|
8802
8802
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
@@ -8833,7 +8833,7 @@ function Fs() {
|
|
|
8833
8833
|
}
|
|
8834
8834
|
const le = {
|
|
8835
8835
|
name: "VARIABLE_CATEGORY",
|
|
8836
|
-
callback:
|
|
8836
|
+
callback: ws
|
|
8837
8837
|
}, Ee = v.xml;
|
|
8838
8838
|
function Ys(t) {
|
|
8839
8839
|
const e = [];
|
|
@@ -8874,7 +8874,7 @@ const ot = {
|
|
|
8874
8874
|
name: "FLOW_CATEGORY",
|
|
8875
8875
|
callback: Ys
|
|
8876
8876
|
}, ne = v.xml;
|
|
8877
|
-
function
|
|
8877
|
+
function Ks(t) {
|
|
8878
8878
|
const { activeFunc: e } = T.compute, n = [];
|
|
8879
8879
|
if (t === "func") {
|
|
8880
8880
|
{
|
|
@@ -8923,9 +8923,9 @@ function ws(t) {
|
|
|
8923
8923
|
}
|
|
8924
8924
|
const it = {
|
|
8925
8925
|
name: "FUNC_CATEGORY",
|
|
8926
|
-
callback:
|
|
8926
|
+
callback: Ks
|
|
8927
8927
|
}, O = v.xml;
|
|
8928
|
-
function
|
|
8928
|
+
function $s() {
|
|
8929
8929
|
const t = [];
|
|
8930
8930
|
if (J().length > 0) {
|
|
8931
8931
|
{
|
|
@@ -9100,34 +9100,34 @@ function Ks() {
|
|
|
9100
9100
|
}
|
|
9101
9101
|
const st = {
|
|
9102
9102
|
name: "DATA_CATEGORY",
|
|
9103
|
-
callback:
|
|
9103
|
+
callback: $s
|
|
9104
9104
|
};
|
|
9105
9105
|
mn.setConfirm(async (t, e) => {
|
|
9106
|
-
const n = await
|
|
9106
|
+
const n = await No({
|
|
9107
9107
|
title: "",
|
|
9108
9108
|
text: t
|
|
9109
9109
|
});
|
|
9110
9110
|
e(!!n);
|
|
9111
9111
|
});
|
|
9112
9112
|
mn.setPrompt(async (t, e, n) => {
|
|
9113
|
-
const o = await
|
|
9113
|
+
const o = await Lo({
|
|
9114
9114
|
title: "",
|
|
9115
9115
|
value: e
|
|
9116
9116
|
});
|
|
9117
9117
|
o !== void 0 && n(String(o));
|
|
9118
9118
|
});
|
|
9119
|
-
const
|
|
9119
|
+
const Vn = (t, e, n) => {
|
|
9120
9120
|
const o = t[e];
|
|
9121
9121
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
9122
9122
|
(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." : ""))));
|
|
9123
9123
|
});
|
|
9124
9124
|
};
|
|
9125
9125
|
async function rn(t) {
|
|
9126
|
-
const e = await
|
|
9126
|
+
const e = await Vn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.k914lhgs.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ib2kecyn.js") }), `./msg/${t}.ts`, 3);
|
|
9127
9127
|
ro(e.default);
|
|
9128
9128
|
}
|
|
9129
9129
|
function Wt(t) {
|
|
9130
|
-
const e =
|
|
9130
|
+
const e = Ye();
|
|
9131
9131
|
if (!e)
|
|
9132
9132
|
return;
|
|
9133
9133
|
const n = e.getBlockById(t);
|
|
@@ -9140,7 +9140,7 @@ function Wt(t) {
|
|
|
9140
9140
|
e.scroll(-a, -l);
|
|
9141
9141
|
}
|
|
9142
9142
|
function xn() {
|
|
9143
|
-
const t =
|
|
9143
|
+
const t = Ye();
|
|
9144
9144
|
if (!t)
|
|
9145
9145
|
return;
|
|
9146
9146
|
const e = t.getTopBlocks(!0)?.[0];
|
|
@@ -9150,7 +9150,7 @@ function Fn(t) {
|
|
|
9150
9150
|
const e = t.getParent();
|
|
9151
9151
|
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9152
9152
|
}
|
|
9153
|
-
class
|
|
9153
|
+
class Hs {
|
|
9154
9154
|
init() {
|
|
9155
9155
|
const e = _o.registry.getItem("blockDisable");
|
|
9156
9156
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9161,10 +9161,10 @@ class $s {
|
|
|
9161
9161
|
}
|
|
9162
9162
|
po.registerFieldColour();
|
|
9163
9163
|
ho.registry.unregister(fo.names.ESCAPE);
|
|
9164
|
-
const
|
|
9165
|
-
|
|
9166
|
-
const
|
|
9167
|
-
|
|
9164
|
+
const Gs = new mo.CrossTabCopyPaste();
|
|
9165
|
+
Gs.init({ contextMenu: !0, shortcut: !0 });
|
|
9166
|
+
const Ws = new Hs();
|
|
9167
|
+
Ws.init();
|
|
9168
9168
|
ct.Classic.blockStyles = {
|
|
9169
9169
|
color_blocks: {
|
|
9170
9170
|
colourPrimary: "#a5745b",
|
|
@@ -9295,7 +9295,7 @@ ct.Classic.categoryStyles = {
|
|
|
9295
9295
|
colour: "#a55b80"
|
|
9296
9296
|
}
|
|
9297
9297
|
};
|
|
9298
|
-
const
|
|
9298
|
+
const js = Tn.defineTheme("light", {
|
|
9299
9299
|
name: "light",
|
|
9300
9300
|
base: ct.Classic,
|
|
9301
9301
|
componentStyles: {
|
|
@@ -9311,7 +9311,7 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9311
9311
|
scrollbarOpacity: 0.4,
|
|
9312
9312
|
cursorColour: ""
|
|
9313
9313
|
}
|
|
9314
|
-
}),
|
|
9314
|
+
}), Xs = Tn.defineTheme("dark", {
|
|
9315
9315
|
name: "dark",
|
|
9316
9316
|
base: ct.Classic,
|
|
9317
9317
|
componentStyles: {
|
|
@@ -9328,14 +9328,14 @@ const Ws = Tn.defineTheme("light", {
|
|
|
9328
9328
|
cursorColour: ""
|
|
9329
9329
|
}
|
|
9330
9330
|
});
|
|
9331
|
-
function
|
|
9332
|
-
const e =
|
|
9331
|
+
function Js(t) {
|
|
9332
|
+
const e = Ye();
|
|
9333
9333
|
switch (t) {
|
|
9334
9334
|
case "light":
|
|
9335
|
-
e.setTheme(
|
|
9335
|
+
e.setTheme(js);
|
|
9336
9336
|
break;
|
|
9337
9337
|
case "dark":
|
|
9338
|
-
e.setTheme(
|
|
9338
|
+
e.setTheme(Xs);
|
|
9339
9339
|
break;
|
|
9340
9340
|
}
|
|
9341
9341
|
}
|
|
@@ -9787,7 +9787,7 @@ const ht = {
|
|
|
9787
9787
|
type: "math_on_list_v1"
|
|
9788
9788
|
}
|
|
9789
9789
|
]
|
|
9790
|
-
},
|
|
9790
|
+
}, wn = {
|
|
9791
9791
|
kind: "category",
|
|
9792
9792
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9793
9793
|
categorystyle: "message_category",
|
|
@@ -10054,7 +10054,7 @@ const ht = {
|
|
|
10054
10054
|
type: "text_reverse_v1"
|
|
10055
10055
|
}
|
|
10056
10056
|
]
|
|
10057
|
-
},
|
|
10057
|
+
}, Yn = {
|
|
10058
10058
|
kind: "category",
|
|
10059
10059
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10060
10060
|
categorystyle: "time_category",
|
|
@@ -10078,7 +10078,7 @@ const ht = {
|
|
|
10078
10078
|
}
|
|
10079
10079
|
}
|
|
10080
10080
|
]
|
|
10081
|
-
},
|
|
10081
|
+
}, qs = {
|
|
10082
10082
|
kind: "categoryToolbox",
|
|
10083
10083
|
contents: [
|
|
10084
10084
|
{
|
|
@@ -10087,7 +10087,7 @@ const ht = {
|
|
|
10087
10087
|
categorystyle: "ui_category",
|
|
10088
10088
|
custom: nt.name
|
|
10089
10089
|
},
|
|
10090
|
-
|
|
10090
|
+
wn,
|
|
10091
10091
|
mt,
|
|
10092
10092
|
ft,
|
|
10093
10093
|
Tt,
|
|
@@ -10095,7 +10095,7 @@ const ht = {
|
|
|
10095
10095
|
dt,
|
|
10096
10096
|
Et,
|
|
10097
10097
|
ht,
|
|
10098
|
-
|
|
10098
|
+
Yn,
|
|
10099
10099
|
{
|
|
10100
10100
|
kind: "category",
|
|
10101
10101
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10115,7 +10115,7 @@ const ht = {
|
|
|
10115
10115
|
custom: tt.name
|
|
10116
10116
|
}
|
|
10117
10117
|
]
|
|
10118
|
-
},
|
|
10118
|
+
}, Qs = {
|
|
10119
10119
|
kind: "categoryToolbox",
|
|
10120
10120
|
contents: [
|
|
10121
10121
|
{
|
|
@@ -10156,7 +10156,7 @@ const ht = {
|
|
|
10156
10156
|
custom: ce.name
|
|
10157
10157
|
}
|
|
10158
10158
|
]
|
|
10159
|
-
},
|
|
10159
|
+
}, zs = {
|
|
10160
10160
|
kind: "categoryToolbox",
|
|
10161
10161
|
contents: [
|
|
10162
10162
|
{
|
|
@@ -10197,7 +10197,7 @@ const ht = {
|
|
|
10197
10197
|
custom: ce.name
|
|
10198
10198
|
}
|
|
10199
10199
|
]
|
|
10200
|
-
},
|
|
10200
|
+
}, Zs = {
|
|
10201
10201
|
kind: "categoryToolbox",
|
|
10202
10202
|
contents: [
|
|
10203
10203
|
{
|
|
@@ -10228,7 +10228,7 @@ const ht = {
|
|
|
10228
10228
|
]
|
|
10229
10229
|
}
|
|
10230
10230
|
]
|
|
10231
|
-
},
|
|
10231
|
+
}, ea = {
|
|
10232
10232
|
kind: "categoryToolbox",
|
|
10233
10233
|
contents: [
|
|
10234
10234
|
{
|
|
@@ -10237,7 +10237,7 @@ const ht = {
|
|
|
10237
10237
|
categorystyle: "ui_category",
|
|
10238
10238
|
custom: nt.name
|
|
10239
10239
|
},
|
|
10240
|
-
|
|
10240
|
+
wn,
|
|
10241
10241
|
mt,
|
|
10242
10242
|
ft,
|
|
10243
10243
|
Tt,
|
|
@@ -10245,7 +10245,7 @@ const ht = {
|
|
|
10245
10245
|
dt,
|
|
10246
10246
|
Et,
|
|
10247
10247
|
ht,
|
|
10248
|
-
|
|
10248
|
+
Yn,
|
|
10249
10249
|
{
|
|
10250
10250
|
kind: "category",
|
|
10251
10251
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10266,13 +10266,13 @@ const ht = {
|
|
|
10266
10266
|
}
|
|
10267
10267
|
]
|
|
10268
10268
|
}, Kn = Symbol();
|
|
10269
|
-
function
|
|
10269
|
+
function ta(t) {
|
|
10270
10270
|
Zn(Kn, t);
|
|
10271
10271
|
}
|
|
10272
10272
|
function jt() {
|
|
10273
10273
|
return eo(Kn);
|
|
10274
10274
|
}
|
|
10275
|
-
const
|
|
10275
|
+
const na = /* @__PURE__ */ oe({
|
|
10276
10276
|
__name: "index",
|
|
10277
10277
|
props: {
|
|
10278
10278
|
lock: { type: Boolean }
|
|
@@ -10292,12 +10292,12 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10292
10292
|
a();
|
|
10293
10293
|
};
|
|
10294
10294
|
return e({ cleanWorkspace: a }), (u, r) => {
|
|
10295
|
-
const p =
|
|
10296
|
-
return D(), Z(
|
|
10297
|
-
text:
|
|
10295
|
+
const p = V("v-btn"), I = V("v-tooltip");
|
|
10296
|
+
return D(), Z(I, {
|
|
10297
|
+
text: P(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10298
10298
|
}, {
|
|
10299
|
-
activator: ee(({ props:
|
|
10300
|
-
B(p,
|
|
10299
|
+
activator: ee(({ props: A }) => [
|
|
10300
|
+
B(p, Yt(A, {
|
|
10301
10301
|
density: "comfortable",
|
|
10302
10302
|
icon: "mdi-broom",
|
|
10303
10303
|
variant: "outlined",
|
|
@@ -10308,7 +10308,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10308
10308
|
}, 8, ["text"]);
|
|
10309
10309
|
};
|
|
10310
10310
|
}
|
|
10311
|
-
}),
|
|
10311
|
+
}), oa = /* @__PURE__ */ oe({
|
|
10312
10312
|
__name: "index",
|
|
10313
10313
|
props: {
|
|
10314
10314
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10318,12 +10318,12 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10318
10318
|
setup(t) {
|
|
10319
10319
|
const { t: e } = $e(), n = Me(t, "modelValue");
|
|
10320
10320
|
return (o, i) => {
|
|
10321
|
-
const a =
|
|
10321
|
+
const a = V("v-btn"), l = V("v-tooltip");
|
|
10322
10322
|
return D(), Z(l, {
|
|
10323
|
-
text:
|
|
10323
|
+
text: P(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10324
10324
|
}, {
|
|
10325
10325
|
activator: ee(({ props: u }) => [
|
|
10326
|
-
B(a,
|
|
10326
|
+
B(a, Yt(u, {
|
|
10327
10327
|
density: "comfortable",
|
|
10328
10328
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10329
10329
|
variant: "outlined",
|
|
@@ -10334,7 +10334,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10334
10334
|
}, 8, ["text"]);
|
|
10335
10335
|
};
|
|
10336
10336
|
}
|
|
10337
|
-
}),
|
|
10337
|
+
}), ia = { class: "text-subtitle-1 ml-6" }, sa = /* @__PURE__ */ oe({
|
|
10338
10338
|
__name: "item",
|
|
10339
10339
|
props: {
|
|
10340
10340
|
id: {},
|
|
@@ -10343,7 +10343,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10343
10343
|
},
|
|
10344
10344
|
emits: ["x-click"],
|
|
10345
10345
|
setup(t, { emit: e }) {
|
|
10346
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ke(), a = t, l = e, u =
|
|
10346
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ke(), a = t, l = e, u = Ie(!1), r = K(() => ({
|
|
10347
10347
|
position: "relative",
|
|
10348
10348
|
background: u.value ? i.value : o.value,
|
|
10349
10349
|
height: "48px",
|
|
@@ -10359,21 +10359,21 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10359
10359
|
border: "1px solid " + n.value,
|
|
10360
10360
|
pointerEvents: "none"
|
|
10361
10361
|
}));
|
|
10362
|
-
return (
|
|
10363
|
-
const f =
|
|
10362
|
+
return (I, A) => {
|
|
10363
|
+
const f = V("v-spacer"), C = V("v-icon"), g = to("ripple");
|
|
10364
10364
|
return no((D(), Q("div", {
|
|
10365
10365
|
class: "d-flex align-center cursor-pointer",
|
|
10366
10366
|
style: W(r.value),
|
|
10367
|
-
onClick:
|
|
10368
|
-
onMouseout:
|
|
10369
|
-
onMouseover:
|
|
10367
|
+
onClick: A[1] || (A[1] = (M) => l("x-click", a.id)),
|
|
10368
|
+
onMouseout: A[2] || (A[2] = (M) => u.value = !1),
|
|
10369
|
+
onMouseover: A[3] || (A[3] = (M) => u.value = !0)
|
|
10370
10370
|
}, [
|
|
10371
|
-
j("span",
|
|
10371
|
+
j("span", ia, at(a.title), 1),
|
|
10372
10372
|
B(f),
|
|
10373
10373
|
B(C, {
|
|
10374
10374
|
class: "x-handle cursor-move mr-3",
|
|
10375
10375
|
icon: "mdi-drag-horizontal-variant",
|
|
10376
|
-
onMousedown:
|
|
10376
|
+
onMousedown: A[0] || (A[0] = Be(() => {
|
|
10377
10377
|
}, ["stop"]))
|
|
10378
10378
|
}),
|
|
10379
10379
|
j("div", {
|
|
@@ -10384,10 +10384,10 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10384
10384
|
]);
|
|
10385
10385
|
};
|
|
10386
10386
|
}
|
|
10387
|
-
}),
|
|
10387
|
+
}), aa = {
|
|
10388
10388
|
key: 1,
|
|
10389
10389
|
class: "text-caption text-grey"
|
|
10390
|
-
},
|
|
10390
|
+
}, ca = /* @__PURE__ */ oe({
|
|
10391
10391
|
__name: "index",
|
|
10392
10392
|
props: /* @__PURE__ */ bt({
|
|
10393
10393
|
lock: { type: Boolean }
|
|
@@ -10397,7 +10397,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10397
10397
|
}),
|
|
10398
10398
|
emits: ["update:modelValue"],
|
|
10399
10399
|
setup(t, { expose: e }) {
|
|
10400
|
-
const { t: n } = $e(), o = Me(t, "modelValue"), i = jt(), a =
|
|
10400
|
+
const { t: n } = $e(), o = Me(t, "modelValue"), i = jt(), a = Ie([]);
|
|
10401
10401
|
e({ update: () => {
|
|
10402
10402
|
if (!i.workspace) {
|
|
10403
10403
|
console.assert(!1);
|
|
@@ -10406,14 +10406,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10406
10406
|
const f = [];
|
|
10407
10407
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10408
10408
|
const M = g.id === Eo()?.id;
|
|
10409
|
-
let
|
|
10409
|
+
let Y = "<n/a>";
|
|
10410
10410
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10411
10411
|
const q = g, de = x[q.node.key];
|
|
10412
|
-
de && (
|
|
10413
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10412
|
+
de && (Y = n(de.name), q.node.alias && (Y += " / " + q.node.alias), Y += " - " + _[q.event.name]);
|
|
10413
|
+
} else g.type.startsWith("func_entry_v") ? Y = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? (console.log(g), Y = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME")) : Y = n("x-block-lib.temporaryBlock");
|
|
10414
10414
|
f.push({
|
|
10415
10415
|
id: g.id,
|
|
10416
|
-
name:
|
|
10416
|
+
name: Y,
|
|
10417
10417
|
select: M
|
|
10418
10418
|
});
|
|
10419
10419
|
}), a.value = f;
|
|
@@ -10428,7 +10428,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10428
10428
|
a.value.forEach(({ id: C }) => {
|
|
10429
10429
|
f.push(C);
|
|
10430
10430
|
}), u = f;
|
|
10431
|
-
}, p = () => !t.lock,
|
|
10431
|
+
}, p = () => !t.lock, I = (f) => {
|
|
10432
10432
|
if (!i.workspace) {
|
|
10433
10433
|
console.assert(!1);
|
|
10434
10434
|
return;
|
|
@@ -10448,13 +10448,13 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10448
10448
|
}
|
|
10449
10449
|
let M = "";
|
|
10450
10450
|
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10451
|
-
let
|
|
10452
|
-
M !== "" && (
|
|
10451
|
+
let Y = -10;
|
|
10452
|
+
M !== "" && (Y = i.workspace.getBlockById(
|
|
10453
10453
|
M
|
|
10454
10454
|
).getRelativeToSurfaceXY().y + 10);
|
|
10455
10455
|
const q = g.getRelativeToSurfaceXY();
|
|
10456
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10457
|
-
},
|
|
10456
|
+
g.moveTo(new v.Coordinate(q.x, Y)), i.workspace.cleanUp(), xn();
|
|
10457
|
+
}, A = async (f) => {
|
|
10458
10458
|
if (!i.workspace) {
|
|
10459
10459
|
console.assert(!1);
|
|
10460
10460
|
return;
|
|
@@ -10462,35 +10462,35 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10462
10462
|
const C = i.workspace.getBlockById(f);
|
|
10463
10463
|
En.setSelected(C), Wt(f), o.value = !1;
|
|
10464
10464
|
};
|
|
10465
|
-
return (f, C) => a.value.length > 0 ? (D(), Z(
|
|
10465
|
+
return (f, C) => a.value.length > 0 ? (D(), Z(P(To), {
|
|
10466
10466
|
key: 0,
|
|
10467
10467
|
modelValue: a.value,
|
|
10468
10468
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
10469
10469
|
animation: 150,
|
|
10470
10470
|
"ghost-class": "ghost",
|
|
10471
10471
|
handle: ".x-handle",
|
|
10472
|
-
onEnd:
|
|
10472
|
+
onEnd: I,
|
|
10473
10473
|
onMove: p,
|
|
10474
10474
|
onStart: r
|
|
10475
10475
|
}, {
|
|
10476
10476
|
default: ee(() => [
|
|
10477
|
-
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(
|
|
10477
|
+
(D(!0), Q(_n, null, oo(a.value, (g) => (D(), Z(sa, {
|
|
10478
10478
|
id: g.id,
|
|
10479
10479
|
key: g.id,
|
|
10480
10480
|
select: g.select,
|
|
10481
10481
|
title: g.name,
|
|
10482
|
-
onXClick:
|
|
10482
|
+
onXClick: A
|
|
10483
10483
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10484
10484
|
]),
|
|
10485
10485
|
_: 1
|
|
10486
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10486
|
+
}, 8, ["modelValue"])) : (D(), Q("span", aa, at(P(n)("x-block-lib.noOption")), 1));
|
|
10487
10487
|
}
|
|
10488
|
-
}),
|
|
10488
|
+
}), la = (t, e) => {
|
|
10489
10489
|
const n = t.__vccOpts || t;
|
|
10490
10490
|
for (const [o, i] of e)
|
|
10491
10491
|
n[o] = i;
|
|
10492
10492
|
return n;
|
|
10493
|
-
},
|
|
10493
|
+
}, ua = /* @__PURE__ */ la(ca, [["__scopeId", "data-v-2ba1be08"]]), ra = /* @__PURE__ */ oe({
|
|
10494
10494
|
__name: "index",
|
|
10495
10495
|
props: {
|
|
10496
10496
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10506,7 +10506,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10506
10506
|
}
|
|
10507
10507
|
} });
|
|
10508
10508
|
const a = (l) => {
|
|
10509
|
-
const u =
|
|
10509
|
+
const u = Ye();
|
|
10510
10510
|
if (!u) {
|
|
10511
10511
|
console.assert(!1);
|
|
10512
10512
|
return;
|
|
@@ -10518,14 +10518,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10518
10518
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10519
10519
|
}, "blockTree"));
|
|
10520
10520
|
}
|
|
10521
|
-
}),
|
|
10521
|
+
}), _a = { class: "text-subtitle-1" }, pa = /* @__PURE__ */ oe({
|
|
10522
10522
|
__name: "index",
|
|
10523
10523
|
props: {
|
|
10524
10524
|
type: {},
|
|
10525
10525
|
lock: { type: Boolean }
|
|
10526
10526
|
},
|
|
10527
10527
|
setup(t, { expose: e }) {
|
|
10528
|
-
const { t: n } = $e(), o =
|
|
10528
|
+
const { t: n } = $e(), o = Bo(), { sysBarAvail: i } = In(), { backgroundColor1: a } = Ke(), l = K(() => {
|
|
10529
10529
|
let C = "100%";
|
|
10530
10530
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10531
10531
|
background: a.value,
|
|
@@ -10544,14 +10544,14 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10544
10544
|
pn(() => {
|
|
10545
10545
|
p.value = !1;
|
|
10546
10546
|
});
|
|
10547
|
-
const
|
|
10547
|
+
const I = Re("blockList"), A = Re("blockTree");
|
|
10548
10548
|
return e({ open: p, update: () => {
|
|
10549
|
-
t.type === "list" ?
|
|
10549
|
+
t.type === "list" ? I.value?.update() : t.type === "tree" && A.value?.update();
|
|
10550
10550
|
} }), (C, g) => {
|
|
10551
|
-
const M =
|
|
10551
|
+
const M = V("v-sheet"), Y = V("v-btn"), q = V("v-spacer"), de = V("v-dialog"), It = V("v-tooltip");
|
|
10552
10552
|
return D(), Q(_n, null, [
|
|
10553
10553
|
B(de, {
|
|
10554
|
-
modelValue:
|
|
10554
|
+
modelValue: P(p),
|
|
10555
10555
|
"onUpdate:modelValue": g[5] || (g[5] = (G) => Je(p) ? p.value = G : null),
|
|
10556
10556
|
eager: "",
|
|
10557
10557
|
fullscreen: "",
|
|
@@ -10570,7 +10570,7 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10570
10570
|
class: "elevation-2",
|
|
10571
10571
|
style: W(l.value)
|
|
10572
10572
|
}, [
|
|
10573
|
-
|
|
10573
|
+
P(i) ? (D(), Z(M, {
|
|
10574
10574
|
key: 0,
|
|
10575
10575
|
color: "transparent",
|
|
10576
10576
|
height: 24
|
|
@@ -10581,13 +10581,13 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10581
10581
|
height: 48
|
|
10582
10582
|
}, {
|
|
10583
10583
|
default: ee(() => [
|
|
10584
|
-
B(
|
|
10584
|
+
B(Y, {
|
|
10585
10585
|
density: "comfortable",
|
|
10586
10586
|
icon: "mdi-close",
|
|
10587
10587
|
variant: "text",
|
|
10588
10588
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10589
10589
|
}),
|
|
10590
|
-
j("span",
|
|
10590
|
+
j("span", _a, at(P(n)("x-block-lib.navigator")), 1),
|
|
10591
10591
|
B(q)
|
|
10592
10592
|
]),
|
|
10593
10593
|
_: 1
|
|
@@ -10596,18 +10596,18 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10596
10596
|
class: "overflow-y-auto",
|
|
10597
10597
|
style: W(u.value)
|
|
10598
10598
|
}, [
|
|
10599
|
-
C.type === "list" ? (D(), Z(
|
|
10599
|
+
C.type === "list" ? (D(), Z(ua, {
|
|
10600
10600
|
key: 0,
|
|
10601
10601
|
ref_key: "blockList",
|
|
10602
|
-
ref:
|
|
10603
|
-
modelValue:
|
|
10602
|
+
ref: I,
|
|
10603
|
+
modelValue: P(p),
|
|
10604
10604
|
"onUpdate:modelValue": g[1] || (g[1] = (G) => Je(p) ? p.value = G : null),
|
|
10605
10605
|
lock: C.lock
|
|
10606
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10606
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ra, {
|
|
10607
10607
|
key: 1,
|
|
10608
10608
|
ref_key: "blockTree",
|
|
10609
|
-
ref:
|
|
10610
|
-
modelValue:
|
|
10609
|
+
ref: A,
|
|
10610
|
+
modelValue: P(p),
|
|
10611
10611
|
"onUpdate:modelValue": g[2] || (g[2] = (G) => Je(p) ? p.value = G : null)
|
|
10612
10612
|
}, null, 8, ["modelValue"])) : me("", !0),
|
|
10613
10613
|
j("div", {
|
|
@@ -10619,11 +10619,11 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10619
10619
|
]),
|
|
10620
10620
|
_: 1
|
|
10621
10621
|
}, 8, ["modelValue"]),
|
|
10622
|
-
B(
|
|
10623
|
-
text:
|
|
10622
|
+
B(It, {
|
|
10623
|
+
text: P(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10624
10624
|
}, {
|
|
10625
10625
|
activator: ee(({ props: G }) => [
|
|
10626
|
-
B(
|
|
10626
|
+
B(Y, Yt(G, {
|
|
10627
10627
|
density: "comfortable",
|
|
10628
10628
|
icon: "mdi-navigation-variant",
|
|
10629
10629
|
variant: "outlined",
|
|
@@ -10661,22 +10661,22 @@ const ta = /* @__PURE__ */ oe({
|
|
|
10661
10661
|
wheel: !0
|
|
10662
10662
|
}
|
|
10663
10663
|
};
|
|
10664
|
-
function
|
|
10665
|
-
St.theme = o ? "dark" : "light", St.toolbox =
|
|
10664
|
+
function ha(t, e, n, o) {
|
|
10665
|
+
St.theme = o ? "dark" : "light", St.toolbox = da(e, n);
|
|
10666
10666
|
const i = go(t, St);
|
|
10667
|
-
return
|
|
10667
|
+
return i.addChangeListener(Io.shadowBlockConversionChangeListener), fa(i, e, n), ma(i), i;
|
|
10668
10668
|
}
|
|
10669
|
-
function
|
|
10669
|
+
function da(t, e) {
|
|
10670
10670
|
let n;
|
|
10671
|
-
return t === "page" ? e === "v1" && (n =
|
|
10671
|
+
return t === "page" ? e === "v1" && (n = ea) : t === "comp" ? e === "v1" && (n = qs) : t === "func" ? e === "v1" && (n = zs) : t === "flow" ? e === "v1" && (n = Qs) : t === "json" && e === "v1" && (n = Zs), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10672
10672
|
}
|
|
10673
|
-
function
|
|
10673
|
+
function fa(t, e, n) {
|
|
10674
10674
|
function o({ name: i, callback: a }) {
|
|
10675
10675
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10676
10676
|
}
|
|
10677
10677
|
e === "page" || e === "comp" ? n === "v1" && (o(nt), o(le), o(ce), o(tt)) : e === "func" ? n === "v1" && (o(it), o(ot), o(st), o(le), o(ce)) : e === "flow" && n === "v1" && (o(ot), o(it), o(st), o(le), o(ce));
|
|
10678
10678
|
}
|
|
10679
|
-
function
|
|
10679
|
+
function ma(t) {
|
|
10680
10680
|
const { router: e } = ie;
|
|
10681
10681
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10682
10682
|
const n = e.resolve({
|
|
@@ -10694,7 +10694,7 @@ function fa(t) {
|
|
|
10694
10694
|
}, 100);
|
|
10695
10695
|
});
|
|
10696
10696
|
}
|
|
10697
|
-
function
|
|
10697
|
+
function Ta(t, e) {
|
|
10698
10698
|
const n = e.newBlock("json_root_v1");
|
|
10699
10699
|
n.initSvg(), n.render();
|
|
10700
10700
|
const o = (i, a) => {
|
|
@@ -10723,8 +10723,8 @@ function ma(t, e) {
|
|
|
10723
10723
|
r.push(p);
|
|
10724
10724
|
u.initData(r);
|
|
10725
10725
|
for (let p = 0; p < r.length; p++) {
|
|
10726
|
-
const
|
|
10727
|
-
o(i[
|
|
10726
|
+
const I = r[p], A = u.getInput("ENTRY" + p);
|
|
10727
|
+
o(i[I], A.connection);
|
|
10728
10728
|
}
|
|
10729
10729
|
} else if (l === "json_array_v1") {
|
|
10730
10730
|
u.initData(i.length);
|
|
@@ -10736,7 +10736,7 @@ function ma(t, e) {
|
|
|
10736
10736
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10737
10737
|
);
|
|
10738
10738
|
}
|
|
10739
|
-
function
|
|
10739
|
+
function Ea(t) {
|
|
10740
10740
|
const e = (o) => {
|
|
10741
10741
|
if (!o)
|
|
10742
10742
|
return null;
|
|
@@ -10768,7 +10768,7 @@ function Ta(t) {
|
|
|
10768
10768
|
if (o.type === "json_root_v1")
|
|
10769
10769
|
return e(o);
|
|
10770
10770
|
}
|
|
10771
|
-
const
|
|
10771
|
+
const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
10772
10772
|
__name: "index",
|
|
10773
10773
|
props: /* @__PURE__ */ bt({
|
|
10774
10774
|
type: {},
|
|
@@ -10783,9 +10783,9 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10783
10783
|
}),
|
|
10784
10784
|
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10785
10785
|
setup(t, { expose: e, emit: n }) {
|
|
10786
|
-
const { backgroundColor2: o } = Ke(), i = Me(t, "lock"), a = Me(t, "scale"), l = n, u = `blocklyEditor${Bt()}`, r =
|
|
10787
|
-
|
|
10788
|
-
const C =
|
|
10786
|
+
const { backgroundColor2: o } = Ke(), i = Me(t, "lock"), a = Me(t, "scale"), l = n, u = `blocklyEditor${Bt()}`, r = Ie(), p = Re("parentContainer"), I = Re("clean"), A = Re("navigator"), f = {};
|
|
10787
|
+
ta(f);
|
|
10788
|
+
const C = Ie(!0), g = Ie(!1), M = K(() => t.type === "json" ? "tree" : "list"), Y = K(() => ({
|
|
10789
10789
|
width: "100%",
|
|
10790
10790
|
height: "calc(100% - 48px)"
|
|
10791
10791
|
})), q = K(() => ({
|
|
@@ -10802,7 +10802,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10802
10802
|
width: "56px",
|
|
10803
10803
|
height: "calc(100% - 49px)",
|
|
10804
10804
|
zIndex: 999
|
|
10805
|
-
})),
|
|
10805
|
+
})), It = K(() => ({
|
|
10806
10806
|
position: "absolute",
|
|
10807
10807
|
top: "0px",
|
|
10808
10808
|
right: "0px",
|
|
@@ -10834,22 +10834,22 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10834
10834
|
console.assert(!1);
|
|
10835
10835
|
return;
|
|
10836
10836
|
}
|
|
10837
|
-
Ao(p.value), await rn(t.locale), f.workspace =
|
|
10837
|
+
Ao(p.value), await rn(t.locale), f.workspace = ha(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Hn);
|
|
10838
10838
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10839
|
-
new MutationObserver((
|
|
10840
|
-
|
|
10839
|
+
new MutationObserver((At) => {
|
|
10840
|
+
At.forEach((We) => {
|
|
10841
10841
|
We.type === "attributes" && We.attributeName === "style" && (Le.value = f.workspace.getFlyout().isVisible());
|
|
10842
10842
|
});
|
|
10843
10843
|
}).observe(y, { attributes: !0 }), Le.value = f.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10844
10844
|
}), so(() => {
|
|
10845
10845
|
Le.value = !1;
|
|
10846
|
-
}),
|
|
10847
|
-
f.workspace &&
|
|
10846
|
+
}), Oo(r, () => {
|
|
10847
|
+
f.workspace && Co(f.workspace);
|
|
10848
10848
|
});
|
|
10849
10849
|
async function Hn(y) {
|
|
10850
10850
|
if (y.type === E.FINISHED_LOADING) {
|
|
10851
10851
|
xn(), setTimeout(() => {
|
|
10852
|
-
|
|
10852
|
+
A.value?.update();
|
|
10853
10853
|
}, 0), C.value = !1;
|
|
10854
10854
|
return;
|
|
10855
10855
|
}
|
|
@@ -10859,13 +10859,13 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10859
10859
|
return;
|
|
10860
10860
|
}
|
|
10861
10861
|
y.type === E.BLOCK_DRAG && (y.isStart ? g.value = !0 : g.value = !1), setTimeout(() => {
|
|
10862
|
-
|
|
10862
|
+
A.value?.update();
|
|
10863
10863
|
}, 0);
|
|
10864
10864
|
}
|
|
10865
10865
|
}
|
|
10866
10866
|
const Gn = (y) => {
|
|
10867
|
-
C.value = !0, t.type === "json" ?
|
|
10868
|
-
}, Wn = () => t.type === "json" ?
|
|
10867
|
+
C.value = !0, t.type === "json" ? Ta(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10868
|
+
}, Wn = () => t.type === "json" ? Ea(f.workspace) : $.workspaces.save(f.workspace), jn = () => {
|
|
10869
10869
|
if (t.type === "json")
|
|
10870
10870
|
console.assert(!1);
|
|
10871
10871
|
else
|
|
@@ -10875,7 +10875,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10875
10875
|
}, qt = () => {
|
|
10876
10876
|
f.workspace.setScale(a.value);
|
|
10877
10877
|
}, Xn = () => {
|
|
10878
|
-
f.workspace.fireChangeListener(new
|
|
10878
|
+
f.workspace.fireChangeListener(new An());
|
|
10879
10879
|
}, Qt = (y) => {
|
|
10880
10880
|
if (y.key === "q" && y.ctrlKey) {
|
|
10881
10881
|
Jn();
|
|
@@ -10890,11 +10890,11 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10890
10890
|
return;
|
|
10891
10891
|
}
|
|
10892
10892
|
}, Jn = () => {
|
|
10893
|
-
|
|
10893
|
+
I.value?.cleanWorkspace();
|
|
10894
10894
|
}, qn = () => {
|
|
10895
10895
|
i.value = !i.value;
|
|
10896
10896
|
}, Qn = () => {
|
|
10897
|
-
|
|
10897
|
+
A.value && (A.value.open = !0);
|
|
10898
10898
|
};
|
|
10899
10899
|
return zt(() => {
|
|
10900
10900
|
window.addEventListener("keydown", Qt, !1);
|
|
@@ -10908,7 +10908,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10908
10908
|
), Se(
|
|
10909
10909
|
() => t.dark,
|
|
10910
10910
|
(y) => {
|
|
10911
|
-
|
|
10911
|
+
Js(y ? "dark" : "light");
|
|
10912
10912
|
}
|
|
10913
10913
|
), Se(Le, (y) => {
|
|
10914
10914
|
y || f.workspace?.hideChaff();
|
|
@@ -10917,13 +10917,13 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10917
10917
|
}), Se(a, () => {
|
|
10918
10918
|
qt();
|
|
10919
10919
|
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, fe) => {
|
|
10920
|
-
const
|
|
10921
|
-
return D(), Q("div",
|
|
10920
|
+
const At = V("v-icon"), We = V("x-loading");
|
|
10921
|
+
return D(), Q("div", ga, [
|
|
10922
10922
|
j("div", {
|
|
10923
10923
|
id: u,
|
|
10924
10924
|
ref_key: "blocklyDiv",
|
|
10925
10925
|
ref: r,
|
|
10926
|
-
style: W(
|
|
10926
|
+
style: W(Y.value)
|
|
10927
10927
|
}, null, 4),
|
|
10928
10928
|
j("div", {
|
|
10929
10929
|
style: W(q.value)
|
|
@@ -10935,7 +10935,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10935
10935
|
class: "d-flex flex-column justify-center align-center",
|
|
10936
10936
|
style: W(de.value)
|
|
10937
10937
|
}, [
|
|
10938
|
-
B(
|
|
10938
|
+
B(At, {
|
|
10939
10939
|
icon: "mdi-delete",
|
|
10940
10940
|
size: "x-large"
|
|
10941
10941
|
})
|
|
@@ -10943,20 +10943,20 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10943
10943
|
C.value ? me("", !0) : (D(), Q("div", {
|
|
10944
10944
|
key: 1,
|
|
10945
10945
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10946
|
-
style: W(
|
|
10946
|
+
style: W(It.value)
|
|
10947
10947
|
}, [
|
|
10948
|
-
B(
|
|
10948
|
+
B(na, {
|
|
10949
10949
|
ref_key: "clean",
|
|
10950
|
-
ref:
|
|
10950
|
+
ref: I,
|
|
10951
10951
|
lock: i.value
|
|
10952
10952
|
}, null, 8, ["lock"]),
|
|
10953
|
-
B(
|
|
10953
|
+
B(oa, {
|
|
10954
10954
|
modelValue: i.value,
|
|
10955
10955
|
"onUpdate:modelValue": fe[0] || (fe[0] = (zn) => i.value = zn)
|
|
10956
10956
|
}, null, 8, ["modelValue"]),
|
|
10957
|
-
B(
|
|
10957
|
+
B(pa, {
|
|
10958
10958
|
ref_key: "navigator",
|
|
10959
|
-
ref:
|
|
10959
|
+
ref: A,
|
|
10960
10960
|
lock: i.value,
|
|
10961
10961
|
type: M.value
|
|
10962
10962
|
}, null, 8, ["lock", "type"])
|
|
@@ -10988,17 +10988,17 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
10988
10988
|
},
|
|
10989
10989
|
setup(t) {
|
|
10990
10990
|
const e = t;
|
|
10991
|
-
|
|
10992
|
-
const n =
|
|
10991
|
+
ko.registerLanguage("javascript", vo);
|
|
10992
|
+
const n = yo.component, { backgroundColor2: o } = Ke();
|
|
10993
10993
|
return (i, a) => {
|
|
10994
|
-
const l =
|
|
10994
|
+
const l = V("v-sheet");
|
|
10995
10995
|
return D(), Z(l, {
|
|
10996
|
-
color:
|
|
10996
|
+
color: P(o),
|
|
10997
10997
|
height: "100%",
|
|
10998
10998
|
width: "100%"
|
|
10999
10999
|
}, {
|
|
11000
11000
|
default: ee(() => [
|
|
11001
|
-
B(
|
|
11001
|
+
B(P(n), {
|
|
11002
11002
|
code: e.code,
|
|
11003
11003
|
language: "js"
|
|
11004
11004
|
}, null, 8, ["code"])
|
|
@@ -11007,10 +11007,10 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11007
11007
|
}, 8, ["color"]);
|
|
11008
11008
|
};
|
|
11009
11009
|
}
|
|
11010
|
-
}),
|
|
11010
|
+
}), Oa = { class: "text-subtitle-1" }, Ca = { class: "w-100 h-100 overflow-auto" }, ka = /* @__PURE__ */ oe({
|
|
11011
11011
|
__name: "index",
|
|
11012
11012
|
setup(t) {
|
|
11013
|
-
const { t: e } = $e(), { sysBarAvail: n } =
|
|
11013
|
+
const { t: e } = $e(), { sysBarAvail: n } = In(), { backgroundColor0: o, backgroundColor2: i } = Ke(), a = Ie(""), l = K(() => {
|
|
11014
11014
|
let p = 48;
|
|
11015
11015
|
return n.value && (p += 24), {
|
|
11016
11016
|
position: "relative",
|
|
@@ -11019,32 +11019,32 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11019
11019
|
}), u = (p) => {
|
|
11020
11020
|
a.value = p.code;
|
|
11021
11021
|
}, { open: r } = Kt("sourceDlg", u);
|
|
11022
|
-
return (p,
|
|
11023
|
-
const
|
|
11022
|
+
return (p, I) => {
|
|
11023
|
+
const A = V("v-sheet"), f = V("v-btn"), C = V("v-spacer"), g = V("v-dialog");
|
|
11024
11024
|
return D(), Z(g, {
|
|
11025
|
-
modelValue:
|
|
11026
|
-
"onUpdate:modelValue":
|
|
11025
|
+
modelValue: P(r),
|
|
11026
|
+
"onUpdate:modelValue": I[1] || (I[1] = (M) => Je(r) ? r.value = M : null),
|
|
11027
11027
|
fullscreen: "",
|
|
11028
11028
|
"no-click-animation": "",
|
|
11029
11029
|
persistent: "",
|
|
11030
11030
|
transition: "dialog-bottom-transition",
|
|
11031
|
-
onKeydown:
|
|
11031
|
+
onKeydown: I[2] || (I[2] = hn(Be((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11032
11032
|
}, {
|
|
11033
11033
|
default: ee(() => [
|
|
11034
|
-
B(
|
|
11035
|
-
color:
|
|
11034
|
+
B(A, {
|
|
11035
|
+
color: P(o),
|
|
11036
11036
|
height: "100%",
|
|
11037
11037
|
width: "100%"
|
|
11038
11038
|
}, {
|
|
11039
11039
|
default: ee(() => [
|
|
11040
|
-
|
|
11040
|
+
P(n) ? (D(), Z(A, {
|
|
11041
11041
|
key: 0,
|
|
11042
|
-
color:
|
|
11042
|
+
color: P(i),
|
|
11043
11043
|
height: 24
|
|
11044
11044
|
}, null, 8, ["color"])) : me("", !0),
|
|
11045
|
-
B(
|
|
11045
|
+
B(A, {
|
|
11046
11046
|
class: "d-flex align-center px-2",
|
|
11047
|
-
color:
|
|
11047
|
+
color: P(i),
|
|
11048
11048
|
height: 48
|
|
11049
11049
|
}, {
|
|
11050
11050
|
default: ee(() => [
|
|
@@ -11052,9 +11052,9 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11052
11052
|
density: "comfortable",
|
|
11053
11053
|
icon: "mdi-close",
|
|
11054
11054
|
variant: "text",
|
|
11055
|
-
onClick:
|
|
11055
|
+
onClick: I[0] || (I[0] = (M) => r.value = !1)
|
|
11056
11056
|
}),
|
|
11057
|
-
j("span",
|
|
11057
|
+
j("span", Oa, at(P(e)("x-block-lib.dlg.source.title")), 1),
|
|
11058
11058
|
B(C)
|
|
11059
11059
|
]),
|
|
11060
11060
|
_: 1
|
|
@@ -11062,7 +11062,7 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11062
11062
|
j("div", {
|
|
11063
11063
|
style: W(l.value)
|
|
11064
11064
|
}, [
|
|
11065
|
-
j("div",
|
|
11065
|
+
j("div", Ca, [
|
|
11066
11066
|
B(Aa, { code: a.value }, null, 8, ["code"])
|
|
11067
11067
|
])
|
|
11068
11068
|
], 4)
|
|
@@ -11074,16 +11074,16 @@ const Ea = { class: "position-relative w-100 h-100" }, ga = /* @__PURE__ */ oe({
|
|
|
11074
11074
|
}, 8, ["modelValue"]);
|
|
11075
11075
|
};
|
|
11076
11076
|
}
|
|
11077
|
-
}),
|
|
11078
|
-
t.component("XBlockly",
|
|
11077
|
+
}), va = (t) => {
|
|
11078
|
+
t.component("XBlockly", Ia), t.component("XSourceDlg", ka);
|
|
11079
11079
|
};
|
|
11080
|
-
async function
|
|
11081
|
-
return (await
|
|
11080
|
+
async function Da(t) {
|
|
11081
|
+
return (await Vn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.j5qa8fnp.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11082
11082
|
}
|
|
11083
|
-
const
|
|
11083
|
+
const Ua = { install: va };
|
|
11084
11084
|
export {
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11085
|
+
Ia as XBlockly,
|
|
11086
|
+
Ua as default,
|
|
11087
|
+
va as install,
|
|
11088
|
+
Da as loadLocaleMessageBlock
|
|
11089
11089
|
};
|