x-block-lib 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +418 -414
- package/dist/{vendor.k8hjxofe.js → vendor.omuaiksa.js} +2454 -2453
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode("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-a77ed323]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!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(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { E as v, r as Sn, M as xo, s as wo, a as Fo, X as Hn, u as L, B as I, j as i, O as h, F as O, b as en, i as k, c as kt, d as Yo, e as $, f as g, g as Ko, h as Z, k as vt, p as jt, l as pt, m as Ln, n as x, C as Gn, N as _t, o as $o, P as nn, q as We, V as xt, t as Wn, W as Ho, v as Go, w as Wo, S as jo, x as Xo, y as Jo, z as ne, T as Be, A as jn, D as qo, G as Qo, H as Xn, I as zo, J as Zo, K as ts, L as es, Q as ns, R as os, U as ss, Y as is } from "./vendor.
|
|
2
|
+
import { E as v, r as Sn, M as xo, s as wo, a as Fo, X as Hn, u as L, B as I, j as i, O as h, F as O, b as en, i as k, c as kt, d as Yo, e as $, f as g, g as Ko, h as Z, k as vt, p as jt, l as pt, m as Ln, n as x, C as Gn, N as _t, o as $o, P as nn, q as We, V as xt, t as Wn, W as Ho, v as Go, w as Wo, S as jo, x as Xo, y as Jo, z as ne, T as Be, A as jn, D as qo, G as Qo, H as Xn, I as zo, J as Zo, K as ts, L as es, Q as ns, R as os, U as ss, Y as is } from "./vendor.omuaiksa.js";
|
|
3
3
|
import { globalState as A } from "x-state-lib";
|
|
4
|
-
import { globalObjects as Nt, openConfirmDlg as as, openPromptDlg as cs, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as
|
|
5
|
-
import { pkgs as de, parsePixelStr as rs, parsePercentStr as ls, getTag as $t, unwrapEventId as Qn, elements as B, unwrapEventKeyOfCustomSlot as bt, unwrapEventKeyOfElementSlot as us, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as ue, unwrapSlotId as Dt, makeEventKeyOfElementSlot as ps, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as se, unwrapMethodKeyOfCustomSlot as he, unwrapMethodKeyOfElementSlot as _s, makeMethodId as ft, makeMethodKeyOfElementSlot as ds, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as hs, makePropertyId as Tt, toPropertyName as eo,
|
|
6
|
-
import { provide as
|
|
4
|
+
import { globalObjects as Nt, openConfirmDlg as as, openPromptDlg as cs, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as Ut } from "x-essential-lib";
|
|
5
|
+
import { pkgs as de, parsePixelStr as rs, parsePercentStr as ls, getTag as $t, unwrapEventId as Qn, elements as B, unwrapEventKeyOfCustomSlot as bt, unwrapEventKeyOfElementSlot as us, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as ue, unwrapSlotId as Dt, makeEventKeyOfElementSlot as ps, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as se, unwrapMethodKeyOfCustomSlot as he, unwrapMethodKeyOfElementSlot as _s, makeMethodId as ft, makeMethodKeyOfElementSlot as ds, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as hs, makePropertyId as Tt, toPropertyName as eo, addIndent as fs, isLocaleOfEventKind as ms, getImplementMethodName as no, isLocaleOfMethodKind as oo, makeTriggerId as Pt } from "x-runtime-lib";
|
|
6
|
+
import { provide as Ts, inject as Es, defineComponent as mt, computed as H, resolveComponent as K, createBlock as dt, openBlock as U, unref as F, withCtx as ht, createVNode as V, mergeProps as mn, useModel as Qt, ref as wt, resolveDirective as gs, withDirectives as As, createElementBlock as lt, normalizeStyle as ot, createElementVNode as Q, createCommentVNode as Et, toDisplayString as zt, withModifiers as Jt, mergeModels as sn, Fragment as so, renderList as Is, useId as an, onUnmounted as ys, useTemplateRef as qt, withKeys as io, isRef as pe, onMounted as Bn, nextTick as Os, onBeforeUnmount as bn, watch as Gt, renderSlot as vs } from "vue";
|
|
7
7
|
import { useDisplay as Tn } from "vuetify";
|
|
8
8
|
import { useI18n as ie } from "vue-i18n";
|
|
9
9
|
var R = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(R || {});
|
|
@@ -46,7 +46,7 @@ function me(t) {
|
|
|
46
46
|
function b(t) {
|
|
47
47
|
return t.length <= 0 && t.push([E("NO_OPTION"), ""]), t;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Cs(t) {
|
|
50
50
|
let e = 0;
|
|
51
51
|
for (; t; )
|
|
52
52
|
e++, t = t.getParent();
|
|
@@ -81,17 +81,17 @@ function Rn(t) {
|
|
|
81
81
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
82
82
|
return L.xml.textToDom(e);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ks(t) {
|
|
85
85
|
return L.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
86
86
|
}
|
|
87
87
|
function cn(t, e) {
|
|
88
88
|
let n = null;
|
|
89
|
-
return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n =
|
|
89
|
+
return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n = ks() : e === "enum" || e === "dateTime" ? n = je("") : console.assert(!1), n ? Hn.domToBlock(n, t) : null;
|
|
90
90
|
}
|
|
91
91
|
function St(t) {
|
|
92
92
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Ns(t) {
|
|
95
95
|
return t.array ? "Array" : t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? me(t.items) : t.ui === "multiTypes" ? me(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
96
96
|
}
|
|
97
97
|
function lo(t) {
|
|
@@ -144,36 +144,36 @@ function Ee(t) {
|
|
|
144
144
|
function uo() {
|
|
145
145
|
return L.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ss() {
|
|
148
148
|
return L.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ls(t) {
|
|
151
151
|
const e = `<shadow type="${Re(t)}"></shadow>`;
|
|
152
152
|
return L.xml.textToDom(e);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Bs(t) {
|
|
155
155
|
const e = `<shadow type="${Re(t)}"></shadow>`;
|
|
156
156
|
return L.xml.textToDom(e);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function bs() {
|
|
159
159
|
return L.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ps() {
|
|
162
162
|
return L.xml.textToDom('<shadow type="select_slot_v1"></shadow>');
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Rs(t) {
|
|
165
165
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
166
166
|
return L.xml.textToDom(e);
|
|
167
167
|
}
|
|
168
168
|
function rt(t) {
|
|
169
169
|
let e = null;
|
|
170
|
-
return t === "string" ? e = yt("") : t === "number" ? e = Te(0) : t === "boolean" ? e = Ee(!1) : t === "array" ? e = uo() : t === "object" ? e =
|
|
170
|
+
return t === "string" ? e = yt("") : t === "number" ? e = Te(0) : t === "boolean" ? e = Ee(!1) : t === "array" ? e = uo() : t === "object" ? e = Ss() : console.assert(!1), e;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Ds(t) {
|
|
173
173
|
let e = null;
|
|
174
|
-
return t.array ? e = uo() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = yt(t.default) : t.ui === "numInput" ? e = Te(t.default) : t.ui === "switch" ? e = Ee(t.default) : t.ui === "select" ? e =
|
|
174
|
+
return t.array ? e = uo() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = yt(t.default) : t.ui === "numInput" ? e = Te(t.default) : t.ui === "switch" ? e = Ee(t.default) : t.ui === "select" ? e = Ls(t.items) : t.ui === "multiTypes" ? e = Bs(t.types) : t.ui === "selectComp" ? e = bs() : t.ui === "selectSlot" ? e = Ps() : t.ui === "colorPicker" ? e = Rs(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Ms() {
|
|
177
177
|
const { activeObject: t, activePage: e } = A.app, n = [];
|
|
178
178
|
if (t.type === "page" && e.meta.arguments)
|
|
179
179
|
for (const { id: o, name: s, type: a } of e.meta.arguments)
|
|
@@ -192,9 +192,9 @@ function Dn(t) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Vs() {
|
|
196
196
|
const t = [];
|
|
197
|
-
return
|
|
197
|
+
return Ms().forEach(({ key: n, name: o }) => {
|
|
198
198
|
t.push([o, n]);
|
|
199
199
|
}), b(t);
|
|
200
200
|
}
|
|
@@ -220,7 +220,7 @@ const Us = {
|
|
|
220
220
|
}, 0);
|
|
221
221
|
},
|
|
222
222
|
genArgumentOpts_: function() {
|
|
223
|
-
return
|
|
223
|
+
return Vs();
|
|
224
224
|
},
|
|
225
225
|
onchange: function(t) {
|
|
226
226
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -261,7 +261,7 @@ i.forBlock.get_page_argument_v1 = function(t) {
|
|
|
261
261
|
const e = t;
|
|
262
262
|
return [`__getPageArgumentV1__(${i.quote_(e.argument.key)})`, h.FUNCTION_CALL];
|
|
263
263
|
};
|
|
264
|
-
const
|
|
264
|
+
const xs = (t, e) => {
|
|
265
265
|
const n = Re(t), o = me(t);
|
|
266
266
|
I[n] = {
|
|
267
267
|
init: function() {
|
|
@@ -284,9 +284,9 @@ const Vs = (t, e) => {
|
|
|
284
284
|
for (const t in de) {
|
|
285
285
|
const e = de[t];
|
|
286
286
|
for (const n in e.items)
|
|
287
|
-
|
|
287
|
+
xs(n, e.items[n]);
|
|
288
288
|
}
|
|
289
|
-
const
|
|
289
|
+
const ws = (t, e) => {
|
|
290
290
|
const n = Re(t), o = me(t);
|
|
291
291
|
I[n] = {
|
|
292
292
|
init: function() {
|
|
@@ -379,23 +379,23 @@ const xs = (t, e) => {
|
|
|
379
379
|
for (const t in de) {
|
|
380
380
|
const e = de[t];
|
|
381
381
|
for (const n in e.types)
|
|
382
|
-
|
|
382
|
+
ws(n, e.types[n]);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const Fs = L.xml, Ys = {
|
|
385
385
|
init: function() {
|
|
386
386
|
this.appendDummyInput().appendField(
|
|
387
387
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
388
388
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
I.app_bind_container_v1 =
|
|
392
|
-
const
|
|
391
|
+
I.app_bind_container_v1 = Ys;
|
|
392
|
+
const Ks = {
|
|
393
393
|
init: function() {
|
|
394
394
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
|
-
I.app_bind_item_v1 =
|
|
398
|
-
const
|
|
397
|
+
I.app_bind_item_v1 = Ks;
|
|
398
|
+
const $s = {
|
|
399
399
|
init: function() {
|
|
400
400
|
this.itemCount_ = 0, this.setMutator(
|
|
401
401
|
new kt.MutatorIcon(
|
|
@@ -407,7 +407,7 @@ const Ks = {
|
|
|
407
407
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
408
408
|
},
|
|
409
409
|
mutationToDom: function() {
|
|
410
|
-
const t =
|
|
410
|
+
const t = Fs.createElement("mutation");
|
|
411
411
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
412
412
|
},
|
|
413
413
|
domToMutation: function(t) {
|
|
@@ -513,7 +513,7 @@ const Ks = {
|
|
|
513
513
|
this.setWarningText(null);
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
I.app_bind_v1 =
|
|
516
|
+
I.app_bind_v1 = $s;
|
|
517
517
|
i.forBlock.app_bind_v1 = function() {
|
|
518
518
|
return "";
|
|
519
519
|
};
|
|
@@ -531,7 +531,7 @@ function Mn(t) {
|
|
|
531
531
|
name: n.name
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Hs() {
|
|
535
535
|
const t = [];
|
|
536
536
|
return po().forEach(({ id: n, name: o }) => {
|
|
537
537
|
t.push([o, n]);
|
|
@@ -543,7 +543,7 @@ function _o() {
|
|
|
543
543
|
e.push({ id: n, name: o });
|
|
544
544
|
return e;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Vn(t) {
|
|
547
547
|
const { activeApp: e } = A.app;
|
|
548
548
|
if (!t)
|
|
549
549
|
return { id: "", name: "" };
|
|
@@ -554,7 +554,7 @@ function Un(t) {
|
|
|
554
554
|
name: n.name
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Gs() {
|
|
558
558
|
const { i18n: t } = Nt, e = [];
|
|
559
559
|
return _o().forEach(({ id: o, name: s }) => {
|
|
560
560
|
let a = s;
|
|
@@ -1076,7 +1076,7 @@ function Xe(t) {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function Ws(t) {
|
|
1080
1080
|
const e = [], n = rn(t);
|
|
1081
1081
|
let o;
|
|
1082
1082
|
for (const { id: s, kind: a, names: c } of n)
|
|
@@ -1180,7 +1180,7 @@ function Je(t) {
|
|
|
1180
1180
|
};
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function js(t) {
|
|
1184
1184
|
const e = [], n = ln(t);
|
|
1185
1185
|
let o;
|
|
1186
1186
|
for (const { id: s, kind: a, names: c } of n)
|
|
@@ -1418,7 +1418,7 @@ function qe(t) {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1421
|
+
function Xs(t) {
|
|
1422
1422
|
const e = [], n = un(t);
|
|
1423
1423
|
let o;
|
|
1424
1424
|
for (const { id: s, kind: a, names: c } of n)
|
|
@@ -1546,14 +1546,14 @@ function Qe(t, e) {
|
|
|
1546
1546
|
if (n)
|
|
1547
1547
|
return n.outputs?.find((o) => o.key === e);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Js(t) {
|
|
1550
1550
|
const e = [], n = pn(t);
|
|
1551
1551
|
if (n)
|
|
1552
1552
|
for (const { name: o, key: s } of n)
|
|
1553
1553
|
e.push([o, s]);
|
|
1554
1554
|
return b(e);
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function qs(t, e, n, o, s) {
|
|
1557
1557
|
const { properties: a } = A.runtime, { activeObject: c, activePage: l, activeComp: p, depends: _ } = A.app;
|
|
1558
1558
|
if (t.events && t.events.length > 0)
|
|
1559
1559
|
return !1;
|
|
@@ -1631,7 +1631,7 @@ function Js(t, e, n, o, s) {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
return !0;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function Qs(t, e) {
|
|
1635
1635
|
const { activeObject: n, activeComp: o } = A.app;
|
|
1636
1636
|
if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
|
|
1637
1637
|
const s = o.meta.slots.find((a) => a.id === e);
|
|
@@ -1645,7 +1645,7 @@ function qs(t, e) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
return !(N(t.key) && n.type === "comp" && o.meta.events && o.meta.events.length > 0);
|
|
1647
1647
|
}
|
|
1648
|
-
function
|
|
1648
|
+
function zs(t, e, n) {
|
|
1649
1649
|
const { activeObject: o, activeComp: s, depends: a } = A.app;
|
|
1650
1650
|
if (t.methods && t.methods.length > 0)
|
|
1651
1651
|
return !1;
|
|
@@ -1681,7 +1681,7 @@ function Qs(t, e, n) {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
return !0;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function Zs(t, e) {
|
|
1685
1685
|
const { activeObject: n, activeComp: o } = A.app;
|
|
1686
1686
|
if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
|
|
1687
1687
|
const s = o.meta.slots.find((a) => a.id === e);
|
|
@@ -1695,7 +1695,7 @@ function zs(t, e) {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
return !(N(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0);
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function ti(t, e, n, o, s) {
|
|
1699
1699
|
const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
|
|
1700
1700
|
if (a[t.key] && a[t.key][e] && a[t.key][e].length > 0)
|
|
1701
1701
|
return !1;
|
|
@@ -1741,7 +1741,7 @@ function Zs(t, e, n, o, s) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
return !0;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function ei(t, e, n, o, s) {
|
|
1745
1745
|
const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
|
|
1746
1746
|
if (a[t.key] && a[t.key][e]) {
|
|
1747
1747
|
for (const { keys: _, raw: r } of a[t.key][e])
|
|
@@ -1791,7 +1791,7 @@ function ti(t, e, n, o, s) {
|
|
|
1791
1791
|
return !0;
|
|
1792
1792
|
}
|
|
1793
1793
|
function fo(t, e, n, o, s, a) {
|
|
1794
|
-
return t ? t === "onEvent" ?
|
|
1794
|
+
return t ? t === "onEvent" ? qs(e, n, o, s, a) : t === "triggerEvent" ? Qs(e, o) : t === "callMethod" ? zs(e, s, a) : t === "implementMethod" ? Zs(e, o) : t === "getProperty" ? ti(e, n, o, s, a) : t === "setProperty" ? ei(e, n, o, s, a) : !1 : !1;
|
|
1795
1795
|
}
|
|
1796
1796
|
function st(t) {
|
|
1797
1797
|
const { activeObject: e } = A.app, n = $t(e.type, e.subtype);
|
|
@@ -1814,7 +1814,7 @@ function Lt(t) {
|
|
|
1814
1814
|
console.assert(!1, "invalid element", s.key);
|
|
1815
1815
|
continue;
|
|
1816
1816
|
}
|
|
1817
|
-
fo(t, a, o, s.slot, s.comp) || n.push({
|
|
1817
|
+
fo(t, a, o, s.slot, s.comp, s.adaptSlot) || n.push({
|
|
1818
1818
|
id: s.id,
|
|
1819
1819
|
key: s.key,
|
|
1820
1820
|
name: a.name,
|
|
@@ -1866,7 +1866,7 @@ function ze(t, e) {
|
|
|
1866
1866
|
name: s.name
|
|
1867
1867
|
};
|
|
1868
1868
|
}
|
|
1869
|
-
function
|
|
1869
|
+
function ni(t) {
|
|
1870
1870
|
const e = [];
|
|
1871
1871
|
return _n(t).forEach(({ id: o, name: s }) => {
|
|
1872
1872
|
e.push([s, o]);
|
|
@@ -2171,7 +2171,7 @@ function To() {
|
|
|
2171
2171
|
n.push({ id: o, name: s });
|
|
2172
2172
|
return n;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function Un(t) {
|
|
2175
2175
|
const { activeObject: e, activeComp: n } = A.app;
|
|
2176
2176
|
if (e.type !== "comp" || !n.meta.slots)
|
|
2177
2177
|
return;
|
|
@@ -2184,7 +2184,7 @@ function Vn(t) {
|
|
|
2184
2184
|
name: o.name
|
|
2185
2185
|
};
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function oi() {
|
|
2188
2188
|
const { i18n: t } = Nt, e = [], n = To();
|
|
2189
2189
|
for (const { id: o, name: s } of n) {
|
|
2190
2190
|
let a = s;
|
|
@@ -2209,7 +2209,7 @@ function Eo() {
|
|
|
2209
2209
|
t.push([o, n]);
|
|
2210
2210
|
return b(t);
|
|
2211
2211
|
}
|
|
2212
|
-
const
|
|
2212
|
+
const si = {
|
|
2213
2213
|
init: function() {
|
|
2214
2214
|
this.node = {
|
|
2215
2215
|
id: "",
|
|
@@ -2255,7 +2255,7 @@ const oi = {
|
|
|
2255
2255
|
return Mt("onEvent");
|
|
2256
2256
|
},
|
|
2257
2257
|
genEventOpts_: function() {
|
|
2258
|
-
return
|
|
2258
|
+
return Ws(this.node.id);
|
|
2259
2259
|
},
|
|
2260
2260
|
onchange: function(t) {
|
|
2261
2261
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2320,7 +2320,7 @@ const oi = {
|
|
|
2320
2320
|
return;
|
|
2321
2321
|
const t = [];
|
|
2322
2322
|
this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
2323
|
-
const e =
|
|
2323
|
+
const e = ms(this.event.kind);
|
|
2324
2324
|
if (this.event.params)
|
|
2325
2325
|
for (let n = 0; n < this.event.params.length; n++) {
|
|
2326
2326
|
const { key: o, name: s } = this.event.params[n];
|
|
@@ -2355,7 +2355,7 @@ const oi = {
|
|
|
2355
2355
|
this.setWarningText(null);
|
|
2356
2356
|
}
|
|
2357
2357
|
};
|
|
2358
|
-
I.on_app_event_v1 =
|
|
2358
|
+
I.on_app_event_v1 = si;
|
|
2359
2359
|
i.forBlock.on_app_event_v1 = function(t) {
|
|
2360
2360
|
const e = i.quote_, n = t;
|
|
2361
2361
|
let o = "__instance__";
|
|
@@ -2364,10 +2364,14 @@ i.forBlock.on_app_event_v1 = function(t) {
|
|
|
2364
2364
|
o && (o += ", "), o += `__param$${c}__`;
|
|
2365
2365
|
const s = i.statementToCode(n, "HANDLE");
|
|
2366
2366
|
return `__onEventV1__(${e(n.event.id)}, async (${o}) => {
|
|
2367
|
-
|
|
2367
|
+
try {
|
|
2368
|
+
${fs(s, 2)} } catch (e) {
|
|
2369
|
+
__messageV1__('error', e.message);
|
|
2370
|
+
}
|
|
2371
|
+
});
|
|
2368
2372
|
`;
|
|
2369
2373
|
};
|
|
2370
|
-
const
|
|
2374
|
+
const ii = {
|
|
2371
2375
|
init: function() {
|
|
2372
2376
|
this.node = {
|
|
2373
2377
|
id: "",
|
|
@@ -2413,7 +2417,7 @@ const si = {
|
|
|
2413
2417
|
return Mt("triggerEvent");
|
|
2414
2418
|
},
|
|
2415
2419
|
genEventOpts_: function() {
|
|
2416
|
-
return
|
|
2420
|
+
return js(this.node.id);
|
|
2417
2421
|
},
|
|
2418
2422
|
onchange: function(t) {
|
|
2419
2423
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2518,7 +2522,7 @@ const si = {
|
|
|
2518
2522
|
this.setWarningText(null);
|
|
2519
2523
|
}
|
|
2520
2524
|
};
|
|
2521
|
-
I.trigger_app_event_v1 =
|
|
2525
|
+
I.trigger_app_event_v1 = ii;
|
|
2522
2526
|
i.forBlock.trigger_app_event_v1 = function(t) {
|
|
2523
2527
|
const e = i.quote_, n = t;
|
|
2524
2528
|
let o = "''";
|
|
@@ -2581,7 +2585,7 @@ i.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
2581
2585
|
return `__debugTraceV1__(${i.valueToCode(t, "OBJECT", h.NONE)});
|
|
2582
2586
|
`;
|
|
2583
2587
|
};
|
|
2584
|
-
const
|
|
2588
|
+
const ai = {
|
|
2585
2589
|
init: function() {
|
|
2586
2590
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
2587
2591
|
},
|
|
@@ -2610,7 +2614,7 @@ const ii = {
|
|
|
2610
2614
|
]);
|
|
2611
2615
|
}
|
|
2612
2616
|
};
|
|
2613
|
-
I.open_confirm_dlg_v1 =
|
|
2617
|
+
I.open_confirm_dlg_v1 = ai;
|
|
2614
2618
|
i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
2615
2619
|
const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "TEXT", h.ATOMIC), o = i.statementToCode(t, "HANDLE");
|
|
2616
2620
|
return `{
|
|
@@ -2618,7 +2622,7 @@ i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
2618
2622
|
${o}}
|
|
2619
2623
|
`;
|
|
2620
2624
|
};
|
|
2621
|
-
const
|
|
2625
|
+
const ci = {
|
|
2622
2626
|
init: function() {
|
|
2623
2627
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
2624
2628
|
},
|
|
@@ -2649,7 +2653,7 @@ const ai = {
|
|
|
2649
2653
|
]);
|
|
2650
2654
|
}
|
|
2651
2655
|
};
|
|
2652
|
-
I.open_prompt_dlg_v1 =
|
|
2656
|
+
I.open_prompt_dlg_v1 = ci;
|
|
2653
2657
|
i.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
2654
2658
|
const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "LABEL", h.ATOMIC), o = i.valueToCode(t, "VALUE", h.ATOMIC), s = i.statementToCode(t, "HANDLE");
|
|
2655
2659
|
return `{
|
|
@@ -2689,7 +2693,7 @@ i.forBlock.popup_message_v1 = function(t) {
|
|
|
2689
2693
|
return `__messageV1__(${e}, ${n});
|
|
2690
2694
|
`;
|
|
2691
2695
|
};
|
|
2692
|
-
const
|
|
2696
|
+
const ri = {
|
|
2693
2697
|
init: function() {
|
|
2694
2698
|
this.node = {
|
|
2695
2699
|
id: "",
|
|
@@ -2735,7 +2739,7 @@ const ci = {
|
|
|
2735
2739
|
return Mt("callMethod");
|
|
2736
2740
|
},
|
|
2737
2741
|
genMethodOpts_: function() {
|
|
2738
|
-
return
|
|
2742
|
+
return Xs(this.node.id);
|
|
2739
2743
|
},
|
|
2740
2744
|
onchange: function(t) {
|
|
2741
2745
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2869,7 +2873,7 @@ const ci = {
|
|
|
2869
2873
|
this.setWarningText(null);
|
|
2870
2874
|
}
|
|
2871
2875
|
};
|
|
2872
|
-
I.call_app_method_v1 =
|
|
2876
|
+
I.call_app_method_v1 = ri;
|
|
2873
2877
|
i.forBlock.call_app_method_v1 = function(t) {
|
|
2874
2878
|
const e = i.INDENT, n = i.quote_, o = t;
|
|
2875
2879
|
let s = "''";
|
|
@@ -2948,7 +2952,7 @@ ${c}${l}} catch (e) {
|
|
|
2948
2952
|
}
|
|
2949
2953
|
`;
|
|
2950
2954
|
};
|
|
2951
|
-
const
|
|
2955
|
+
const li = {
|
|
2952
2956
|
init: function() {
|
|
2953
2957
|
this.node = {
|
|
2954
2958
|
id: "",
|
|
@@ -3087,7 +3091,7 @@ const ri = {
|
|
|
3087
3091
|
this.setWarningText(null);
|
|
3088
3092
|
}
|
|
3089
3093
|
};
|
|
3090
|
-
I.implement_app_method_v1 =
|
|
3094
|
+
I.implement_app_method_v1 = li;
|
|
3091
3095
|
i.forBlock.implement_app_method_v1 = function(t) {
|
|
3092
3096
|
const e = i.INDENT, n = i.quote_, o = t, { kind: s, nodeId: a, methodKey: c } = se(o.method.id);
|
|
3093
3097
|
let l = "";
|
|
@@ -3102,7 +3106,7 @@ ${p}${e}return __outputs__;
|
|
|
3102
3106
|
}
|
|
3103
3107
|
`;
|
|
3104
3108
|
};
|
|
3105
|
-
const
|
|
3109
|
+
const ui = {
|
|
3106
3110
|
init: function() {
|
|
3107
3111
|
this.node = {
|
|
3108
3112
|
id: "",
|
|
@@ -3165,7 +3169,7 @@ const li = {
|
|
|
3165
3169
|
return ho(this.node.id);
|
|
3166
3170
|
},
|
|
3167
3171
|
genOutputOpts_: function() {
|
|
3168
|
-
return
|
|
3172
|
+
return Js(this.method.id);
|
|
3169
3173
|
},
|
|
3170
3174
|
onchange: function(t) {
|
|
3171
3175
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3265,7 +3269,7 @@ const li = {
|
|
|
3265
3269
|
this.setWarningText(null);
|
|
3266
3270
|
}
|
|
3267
3271
|
};
|
|
3268
|
-
I.set_app_method_output_v1 =
|
|
3272
|
+
I.set_app_method_output_v1 = ui;
|
|
3269
3273
|
i.forBlock.set_app_method_output_v1 = function(t) {
|
|
3270
3274
|
const e = i.quote_, n = t;
|
|
3271
3275
|
let o = i.valueToCode(n, "VALUE", h.ATOMIC);
|
|
@@ -3315,7 +3319,7 @@ g([
|
|
|
3315
3319
|
i.forBlock.app_env_is_v1 = function(t) {
|
|
3316
3320
|
return [`__getEnvV1__() === ${i.quote_(t.getFieldValue("ENV"))}`, h.ATOMIC];
|
|
3317
3321
|
};
|
|
3318
|
-
const
|
|
3322
|
+
const pi = {
|
|
3319
3323
|
init: function() {
|
|
3320
3324
|
this.app = {
|
|
3321
3325
|
id: "",
|
|
@@ -3353,10 +3357,10 @@ const ui = {
|
|
|
3353
3357
|
}, 0);
|
|
3354
3358
|
},
|
|
3355
3359
|
genAppOpts_: function() {
|
|
3356
|
-
return
|
|
3360
|
+
return Hs();
|
|
3357
3361
|
},
|
|
3358
3362
|
genPageOpts_: function() {
|
|
3359
|
-
return
|
|
3363
|
+
return ni(this.app.id);
|
|
3360
3364
|
},
|
|
3361
3365
|
onchange: function(t) {
|
|
3362
3366
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3405,13 +3409,13 @@ const ui = {
|
|
|
3405
3409
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
3406
3410
|
}
|
|
3407
3411
|
};
|
|
3408
|
-
I.navigate_to_v1 =
|
|
3412
|
+
I.navigate_to_v1 = pi;
|
|
3409
3413
|
i.forBlock.navigate_to_v1 = function(t) {
|
|
3410
3414
|
const e = t, n = i.quote_(e.app.id), o = i.quote_(e.page.id);
|
|
3411
3415
|
return `__navigateToV1__(${n}, ${o});
|
|
3412
3416
|
`;
|
|
3413
3417
|
};
|
|
3414
|
-
const
|
|
3418
|
+
const _i = {
|
|
3415
3419
|
init: function() {
|
|
3416
3420
|
this.comp = {
|
|
3417
3421
|
id: "",
|
|
@@ -3439,7 +3443,7 @@ const pi = {
|
|
|
3439
3443
|
}, 0);
|
|
3440
3444
|
},
|
|
3441
3445
|
genCompOpts_: function() {
|
|
3442
|
-
return
|
|
3446
|
+
return Gs();
|
|
3443
3447
|
},
|
|
3444
3448
|
onchange: function(t) {
|
|
3445
3449
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3452,7 +3456,7 @@ const pi = {
|
|
|
3452
3456
|
}
|
|
3453
3457
|
},
|
|
3454
3458
|
onCompChange_: function(t) {
|
|
3455
|
-
const e =
|
|
3459
|
+
const e = Vn(t);
|
|
3456
3460
|
if (!e) {
|
|
3457
3461
|
console.assert(!1);
|
|
3458
3462
|
return;
|
|
@@ -3460,7 +3464,7 @@ const pi = {
|
|
|
3460
3464
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3461
3465
|
},
|
|
3462
3466
|
checkWarning_: function() {
|
|
3463
|
-
const t =
|
|
3467
|
+
const t = Vn(this.comp.id);
|
|
3464
3468
|
if (!t) {
|
|
3465
3469
|
this.setWarningText(E("WARN_COMP_NOT_FOUND"));
|
|
3466
3470
|
return;
|
|
@@ -3468,12 +3472,12 @@ const pi = {
|
|
|
3468
3472
|
t.name !== this.comp.name && (this.comp.name = t.name), this.setWarningText(null);
|
|
3469
3473
|
}
|
|
3470
3474
|
};
|
|
3471
|
-
I.select_comp_v1 =
|
|
3475
|
+
I.select_comp_v1 = _i;
|
|
3472
3476
|
i.forBlock.select_comp_v1 = function(t) {
|
|
3473
3477
|
const e = i.quote_, o = t.comp.id;
|
|
3474
3478
|
return [e(o), h.ATOMIC];
|
|
3475
3479
|
};
|
|
3476
|
-
const
|
|
3480
|
+
const di = {
|
|
3477
3481
|
init: function() {
|
|
3478
3482
|
this.slot = {
|
|
3479
3483
|
id: "",
|
|
@@ -3501,7 +3505,7 @@ const _i = {
|
|
|
3501
3505
|
}, 0);
|
|
3502
3506
|
},
|
|
3503
3507
|
genSlotOpts_: function() {
|
|
3504
|
-
return
|
|
3508
|
+
return oi();
|
|
3505
3509
|
},
|
|
3506
3510
|
onchange: function(t) {
|
|
3507
3511
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3514,7 +3518,7 @@ const _i = {
|
|
|
3514
3518
|
}
|
|
3515
3519
|
},
|
|
3516
3520
|
onSlotChange_: function(t) {
|
|
3517
|
-
const e =
|
|
3521
|
+
const e = Un(t);
|
|
3518
3522
|
if (!e) {
|
|
3519
3523
|
console.assert(!1);
|
|
3520
3524
|
return;
|
|
@@ -3522,7 +3526,7 @@ const _i = {
|
|
|
3522
3526
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3523
3527
|
},
|
|
3524
3528
|
checkWarning_: function() {
|
|
3525
|
-
const t =
|
|
3529
|
+
const t = Un(this.slot.id);
|
|
3526
3530
|
if (!t) {
|
|
3527
3531
|
this.setWarningText(E("WARN_SLOT_NOT_FOUND"));
|
|
3528
3532
|
return;
|
|
@@ -3530,12 +3534,12 @@ const _i = {
|
|
|
3530
3534
|
t.name !== this.slot.name && (this.slot.name = t.name), this.setWarningText(null);
|
|
3531
3535
|
}
|
|
3532
3536
|
};
|
|
3533
|
-
I.select_slot_v1 =
|
|
3537
|
+
I.select_slot_v1 = di;
|
|
3534
3538
|
i.forBlock.select_slot_v1 = function(t) {
|
|
3535
3539
|
const e = i.quote_, o = t.slot.id;
|
|
3536
3540
|
return [e(o), h.ATOMIC];
|
|
3537
3541
|
};
|
|
3538
|
-
const
|
|
3542
|
+
const hi = {
|
|
3539
3543
|
init: function() {
|
|
3540
3544
|
this.node = {
|
|
3541
3545
|
id: "",
|
|
@@ -3663,13 +3667,13 @@ const di = {
|
|
|
3663
3667
|
$(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3664
3668
|
}
|
|
3665
3669
|
};
|
|
3666
|
-
I.get_app_property_v1 =
|
|
3670
|
+
I.get_app_property_v1 = hi;
|
|
3667
3671
|
i.forBlock.get_app_property_v1 = function(t) {
|
|
3668
3672
|
const e = i.quote_, n = t;
|
|
3669
3673
|
let o = "''";
|
|
3670
3674
|
return n.getInput("INSTANCE") && (o = i.valueToCode(n, "INSTANCE", h.NONE) || "''"), [`__getPropertyV1__(${e(n.property.id)}, ${o})`, h.ATOMIC];
|
|
3671
3675
|
};
|
|
3672
|
-
const
|
|
3676
|
+
const fi = {
|
|
3673
3677
|
init: function() {
|
|
3674
3678
|
this.node = {
|
|
3675
3679
|
id: "",
|
|
@@ -3780,7 +3784,7 @@ const hi = {
|
|
|
3780
3784
|
if (n) {
|
|
3781
3785
|
n.setShadowDom(null);
|
|
3782
3786
|
const o = n.connection?.targetBlock();
|
|
3783
|
-
o && o.dispose(), t.meta.element ? n.setCheck(
|
|
3787
|
+
o && o.dispose(), t.meta.element ? n.setCheck(Ns(t.meta.raw)).setShadowDom(Ds(t.meta.raw)) : n.setCheck(St(t.meta.raw.type)).setShadowDom(rt(t.meta.raw.type));
|
|
3784
3788
|
}
|
|
3785
3789
|
},
|
|
3786
3790
|
checkWarning_: function() {
|
|
@@ -3806,7 +3810,7 @@ const hi = {
|
|
|
3806
3810
|
$(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3807
3811
|
}
|
|
3808
3812
|
};
|
|
3809
|
-
I.set_app_property_v1 =
|
|
3813
|
+
I.set_app_property_v1 = fi;
|
|
3810
3814
|
i.forBlock.set_app_property_v1 = function(t) {
|
|
3811
3815
|
const e = i.quote_, n = t;
|
|
3812
3816
|
let o = "''";
|
|
@@ -3819,7 +3823,7 @@ i.forBlock.set_app_property_v1 = function(t) {
|
|
|
3819
3823
|
return `await __setPropertyV1__(${e(n.property.id)}, ${s}, ${o});
|
|
3820
3824
|
`;
|
|
3821
3825
|
};
|
|
3822
|
-
const
|
|
3826
|
+
const mi = {
|
|
3823
3827
|
init: function() {
|
|
3824
3828
|
this.state = {
|
|
3825
3829
|
id: "",
|
|
@@ -3882,12 +3886,12 @@ const fi = {
|
|
|
3882
3886
|
this.setWarningText(null);
|
|
3883
3887
|
}
|
|
3884
3888
|
};
|
|
3885
|
-
I.get_app_state_v1 =
|
|
3889
|
+
I.get_app_state_v1 = mi;
|
|
3886
3890
|
i.forBlock.get_app_state_v1 = function(t) {
|
|
3887
3891
|
const e = i.quote_;
|
|
3888
3892
|
return [`__getStateV1__(${e(t.state.id)})`, h.ATOMIC];
|
|
3889
3893
|
};
|
|
3890
|
-
const
|
|
3894
|
+
const Ti = {
|
|
3891
3895
|
init: function() {
|
|
3892
3896
|
this.state = {
|
|
3893
3897
|
id: "",
|
|
@@ -3955,7 +3959,7 @@ const mi = {
|
|
|
3955
3959
|
this.setWarningText(null);
|
|
3956
3960
|
}
|
|
3957
3961
|
};
|
|
3958
|
-
I.set_app_state_v1 =
|
|
3962
|
+
I.set_app_state_v1 = Ti;
|
|
3959
3963
|
i.forBlock.set_app_state_v1 = function(t) {
|
|
3960
3964
|
const e = i.quote_, n = t, o = i.valueToCode(n, "VALUE", h.NONE);
|
|
3961
3965
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -4664,7 +4668,7 @@ function ${i.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
4664
4668
|
`
|
|
4665
4669
|
)}(${e}, ${n}, ${o})`, h.FUNCTION_CALL];
|
|
4666
4670
|
};
|
|
4667
|
-
const
|
|
4671
|
+
const Ei = L.xml, gi = [
|
|
4668
4672
|
{
|
|
4669
4673
|
type: "add_data_v1",
|
|
4670
4674
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -4728,16 +4732,16 @@ const Ti = L.xml, Ei = [
|
|
|
4728
4732
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
4729
4733
|
}
|
|
4730
4734
|
];
|
|
4731
|
-
function
|
|
4732
|
-
const n =
|
|
4735
|
+
function Ai(t, e) {
|
|
4736
|
+
const n = gi.find((o) => o.type === t);
|
|
4733
4737
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
4734
4738
|
}
|
|
4735
|
-
const
|
|
4739
|
+
const Ii = {
|
|
4736
4740
|
init: function() {
|
|
4737
4741
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
4738
4742
|
},
|
|
4739
4743
|
mutationToDom: function() {
|
|
4740
|
-
const t =
|
|
4744
|
+
const t = Ei.createElement("mutation");
|
|
4741
4745
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
4742
4746
|
},
|
|
4743
4747
|
domToMutation: function(t) {
|
|
@@ -4766,7 +4770,7 @@ const Ai = {
|
|
|
4766
4770
|
},
|
|
4767
4771
|
tryDuplicate_: function(t) {
|
|
4768
4772
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
4769
|
-
if (e &&
|
|
4773
|
+
if (e && Ai(e.type, t.oldInputName))
|
|
4770
4774
|
try {
|
|
4771
4775
|
v.disable();
|
|
4772
4776
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -4791,15 +4795,15 @@ const Ai = {
|
|
|
4791
4795
|
this.setFieldValue(this.name, "LABEL");
|
|
4792
4796
|
}
|
|
4793
4797
|
};
|
|
4794
|
-
I.parameter_v1 =
|
|
4798
|
+
I.parameter_v1 = Ii;
|
|
4795
4799
|
i.forBlock.parameter_v1 = function(t) {
|
|
4796
4800
|
return [t.key, h.ATOMIC];
|
|
4797
4801
|
};
|
|
4798
|
-
const
|
|
4802
|
+
const yi = {
|
|
4799
4803
|
init: function() {
|
|
4800
4804
|
}
|
|
4801
4805
|
};
|
|
4802
|
-
I.on_flow_state_event_v1 =
|
|
4806
|
+
I.on_flow_state_event_v1 = yi;
|
|
4803
4807
|
i.forBlock.on_flow_state_event_v1 = function() {
|
|
4804
4808
|
return `__onFlowStateEventV1__();
|
|
4805
4809
|
`;
|
|
@@ -4826,7 +4830,7 @@ function xn(t) {
|
|
|
4826
4830
|
const { activeFunc: e } = A.compute;
|
|
4827
4831
|
return e.outputs?.find((n) => n.id === t);
|
|
4828
4832
|
}
|
|
4829
|
-
function
|
|
4833
|
+
function Oi() {
|
|
4830
4834
|
const { activeFunc: t } = A.compute, e = [];
|
|
4831
4835
|
return t.outputs?.forEach(({ id: n, name: o }) => {
|
|
4832
4836
|
e.push([o, n]);
|
|
@@ -4847,7 +4851,7 @@ function Ao(t) {
|
|
|
4847
4851
|
e.push([s, o]);
|
|
4848
4852
|
}), b(e);
|
|
4849
4853
|
}
|
|
4850
|
-
const
|
|
4854
|
+
const vi = {
|
|
4851
4855
|
init: function() {
|
|
4852
4856
|
this.space = {
|
|
4853
4857
|
id: "",
|
|
@@ -4994,7 +4998,7 @@ const Oi = {
|
|
|
4994
4998
|
this.setWarningText(null);
|
|
4995
4999
|
}
|
|
4996
5000
|
};
|
|
4997
|
-
I.call_func_v1 =
|
|
5001
|
+
I.call_func_v1 = vi;
|
|
4998
5002
|
i.forBlock.call_func_v1 = function(t) {
|
|
4999
5003
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
5000
5004
|
let c = "";
|
|
@@ -5021,7 +5025,7 @@ ${e}var __result__ = __callFuncV1__(${s},${a},__inputs__,__getEnvV1__(),${l});
|
|
|
5021
5025
|
${p}${_}}
|
|
5022
5026
|
`;
|
|
5023
5027
|
};
|
|
5024
|
-
const
|
|
5028
|
+
const Ci = {
|
|
5025
5029
|
init: function() {
|
|
5026
5030
|
this.space = {
|
|
5027
5031
|
id: "",
|
|
@@ -5168,7 +5172,7 @@ const vi = {
|
|
|
5168
5172
|
this.setWarningText(null);
|
|
5169
5173
|
}
|
|
5170
5174
|
};
|
|
5171
|
-
I.call_func_internal_v1 =
|
|
5175
|
+
I.call_func_internal_v1 = Ci;
|
|
5172
5176
|
i.forBlock.call_func_internal_v1 = function(t) {
|
|
5173
5177
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
5174
5178
|
let c = `${e}var __inputs__ = {
|
|
@@ -5198,7 +5202,7 @@ ${e}}
|
|
|
5198
5202
|
${p}${_}}
|
|
5199
5203
|
`;
|
|
5200
5204
|
};
|
|
5201
|
-
const
|
|
5205
|
+
const ki = {
|
|
5202
5206
|
init: function() {
|
|
5203
5207
|
this.func = {
|
|
5204
5208
|
id: ""
|
|
@@ -5254,7 +5258,7 @@ const Ci = {
|
|
|
5254
5258
|
this.setWarningText(null);
|
|
5255
5259
|
}
|
|
5256
5260
|
};
|
|
5257
|
-
I.func_entry_v1 =
|
|
5261
|
+
I.func_entry_v1 = ki;
|
|
5258
5262
|
i.forBlock.func_entry_v1 = function(t) {
|
|
5259
5263
|
const e = t, n = i.statementToCode(e, "HANDLE"), o = [];
|
|
5260
5264
|
if (e.func.inputs)
|
|
@@ -5265,7 +5269,7 @@ i.forBlock.func_entry_v1 = function(t) {
|
|
|
5265
5269
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
5266
5270
|
${n}}`;
|
|
5267
5271
|
};
|
|
5268
|
-
const
|
|
5272
|
+
const Ni = {
|
|
5269
5273
|
init: function() {
|
|
5270
5274
|
this.output = {
|
|
5271
5275
|
id: "",
|
|
@@ -5293,7 +5297,7 @@ const ki = {
|
|
|
5293
5297
|
}, 0);
|
|
5294
5298
|
},
|
|
5295
5299
|
genOutputOpts_: function() {
|
|
5296
|
-
return
|
|
5300
|
+
return Oi();
|
|
5297
5301
|
},
|
|
5298
5302
|
onchange: function(t) {
|
|
5299
5303
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -5340,7 +5344,7 @@ const ki = {
|
|
|
5340
5344
|
this.setWarningText(null);
|
|
5341
5345
|
}
|
|
5342
5346
|
};
|
|
5343
|
-
I.set_func_output_v1 =
|
|
5347
|
+
I.set_func_output_v1 = Ni;
|
|
5344
5348
|
i.forBlock.set_func_output_v1 = function(t) {
|
|
5345
5349
|
const e = i.quote_, n = t, { id: o, type: s } = n.output;
|
|
5346
5350
|
let a = i.valueToCode(n, "VALUE", h.ATOMIC);
|
|
@@ -5437,7 +5441,7 @@ function ct(t, e) {
|
|
|
5437
5441
|
if (o)
|
|
5438
5442
|
return o.tables.find((s) => s.id === e);
|
|
5439
5443
|
}
|
|
5440
|
-
function
|
|
5444
|
+
function Ve(t) {
|
|
5441
5445
|
const e = [];
|
|
5442
5446
|
return et(t).forEach(({ id: o, name: s }) => {
|
|
5443
5447
|
e.push([s, o]);
|
|
@@ -5458,13 +5462,13 @@ function Ze(t, e, n) {
|
|
|
5458
5462
|
if (a)
|
|
5459
5463
|
return a.columns.find((c) => c.id === n);
|
|
5460
5464
|
}
|
|
5461
|
-
function
|
|
5465
|
+
function Si(t, e) {
|
|
5462
5466
|
const n = [];
|
|
5463
5467
|
return Ie(t, e).forEach(({ id: s, name: a }) => {
|
|
5464
5468
|
n.push([a, s]);
|
|
5465
5469
|
}), b(n);
|
|
5466
5470
|
}
|
|
5467
|
-
function
|
|
5471
|
+
function Li(t) {
|
|
5468
5472
|
const e = t.getInput("TABLE").connection;
|
|
5469
5473
|
if (e.targetBlock())
|
|
5470
5474
|
return;
|
|
@@ -5498,7 +5502,7 @@ function Si(t) {
|
|
|
5498
5502
|
}, c = Z.blocks.append(a, t.workspace);
|
|
5499
5503
|
e.connect(c.outputConnection);
|
|
5500
5504
|
}
|
|
5501
|
-
function
|
|
5505
|
+
function Bi(t) {
|
|
5502
5506
|
const e = t.getInput("HANDLE").connection;
|
|
5503
5507
|
if (e.targetBlock())
|
|
5504
5508
|
return;
|
|
@@ -5522,7 +5526,7 @@ function Li(t) {
|
|
|
5522
5526
|
}, o = Z.blocks.append(n, t.workspace);
|
|
5523
5527
|
e.connect(o.previousConnection);
|
|
5524
5528
|
}
|
|
5525
|
-
const
|
|
5529
|
+
const bi = {
|
|
5526
5530
|
init: function() {
|
|
5527
5531
|
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}");
|
|
5528
5532
|
},
|
|
@@ -5538,14 +5542,14 @@ const Bi = {
|
|
|
5538
5542
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
5539
5543
|
},
|
|
5540
5544
|
ensureBlocks_: function() {
|
|
5541
|
-
this.isInsertionMarker() || (
|
|
5545
|
+
this.isInsertionMarker() || (Li(this), q(this, [
|
|
5542
5546
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5543
5547
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
5544
5548
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
5545
|
-
]),
|
|
5549
|
+
]), Bi(this));
|
|
5546
5550
|
}
|
|
5547
5551
|
};
|
|
5548
|
-
I.add_data_v1 =
|
|
5552
|
+
I.add_data_v1 = bi;
|
|
5549
5553
|
i.forBlock.add_data_v1 = function(t) {
|
|
5550
5554
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.statementToCode(t, "HANDLE");
|
|
5551
5555
|
return `{
|
|
@@ -5561,7 +5565,7 @@ ${e}}
|
|
|
5561
5565
|
${o}}
|
|
5562
5566
|
`;
|
|
5563
5567
|
};
|
|
5564
|
-
const
|
|
5568
|
+
const Pi = {
|
|
5565
5569
|
init: function() {
|
|
5566
5570
|
this.space = {
|
|
5567
5571
|
id: "",
|
|
@@ -5627,10 +5631,10 @@ const bi = {
|
|
|
5627
5631
|
return Me();
|
|
5628
5632
|
},
|
|
5629
5633
|
genTableOpts_: function() {
|
|
5630
|
-
return
|
|
5634
|
+
return Ve(this.space.id);
|
|
5631
5635
|
},
|
|
5632
5636
|
genColumnOpts_: function() {
|
|
5633
|
-
return
|
|
5637
|
+
return Si(this.space.id, this.table.id);
|
|
5634
5638
|
},
|
|
5635
5639
|
onchange: function(t) {
|
|
5636
5640
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -5726,7 +5730,7 @@ const bi = {
|
|
|
5726
5730
|
this.setWarningText(null);
|
|
5727
5731
|
}
|
|
5728
5732
|
};
|
|
5729
|
-
I.cond_atomic_v1 =
|
|
5733
|
+
I.cond_atomic_v1 = Pi;
|
|
5730
5734
|
i.forBlock.cond_atomic_v1 = function(t) {
|
|
5731
5735
|
const e = i.quote_, n = t, o = n.column.name, s = i.valueToCode(n, "VALUE", h.ATOMIC) || null, c = {
|
|
5732
5736
|
EQ: "=",
|
|
@@ -5738,19 +5742,19 @@ i.forBlock.cond_atomic_v1 = function(t) {
|
|
|
5738
5742
|
}[n.getFieldValue("OP")];
|
|
5739
5743
|
return [`{type:'ATOMIC',key:${e(o)},value:${s},operator:${e(c)}}`, h.ATOMIC];
|
|
5740
5744
|
};
|
|
5741
|
-
const
|
|
5745
|
+
const Ri = {
|
|
5742
5746
|
init: function() {
|
|
5743
5747
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5744
5748
|
}
|
|
5745
5749
|
};
|
|
5746
|
-
I.cond_logic_container_v1 =
|
|
5747
|
-
const
|
|
5750
|
+
I.cond_logic_container_v1 = Ri;
|
|
5751
|
+
const Di = {
|
|
5748
5752
|
init: function() {
|
|
5749
5753
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5750
5754
|
}
|
|
5751
5755
|
};
|
|
5752
|
-
I.cond_logic_item_v1 =
|
|
5753
|
-
const
|
|
5756
|
+
I.cond_logic_item_v1 = Di;
|
|
5757
|
+
const Mi = {
|
|
5754
5758
|
init: function() {
|
|
5755
5759
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
5756
5760
|
new O([
|
|
@@ -5824,7 +5828,7 @@ const Di = {
|
|
|
5824
5828
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
5825
5829
|
}
|
|
5826
5830
|
};
|
|
5827
|
-
I.cond_logic_v1 =
|
|
5831
|
+
I.cond_logic_v1 = Mi;
|
|
5828
5832
|
i.forBlock.cond_logic_v1 = function(t) {
|
|
5829
5833
|
const e = i.quote_, n = t, o = n.getFieldValue("TYPE"), s = [], a = i.valueToCode(n, "VALUE", h.ATOMIC) || null;
|
|
5830
5834
|
s.push(a);
|
|
@@ -5834,7 +5838,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5834
5838
|
}
|
|
5835
5839
|
return [`{type:${e(o)},entries:[${s}]}`, h.ATOMIC];
|
|
5836
5840
|
};
|
|
5837
|
-
function
|
|
5841
|
+
function Vi(t) {
|
|
5838
5842
|
const e = t.getInput("TABLE").connection;
|
|
5839
5843
|
if (e.targetBlock())
|
|
5840
5844
|
return;
|
|
@@ -5878,7 +5882,7 @@ function Ui(t) {
|
|
|
5878
5882
|
}, c = Z.blocks.append(a, t.workspace);
|
|
5879
5883
|
e.connect(c.outputConnection);
|
|
5880
5884
|
}
|
|
5881
|
-
function
|
|
5885
|
+
function xi(t) {
|
|
5882
5886
|
const e = t.getInput("HANDLE").connection;
|
|
5883
5887
|
if (e.targetBlock())
|
|
5884
5888
|
return;
|
|
@@ -5902,7 +5906,7 @@ function Vi(t) {
|
|
|
5902
5906
|
}, o = Z.blocks.append(n, t.workspace);
|
|
5903
5907
|
e.connect(o.previousConnection);
|
|
5904
5908
|
}
|
|
5905
|
-
const
|
|
5909
|
+
const wi = {
|
|
5906
5910
|
init: function() {
|
|
5907
5911
|
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}");
|
|
5908
5912
|
},
|
|
@@ -5918,13 +5922,13 @@ const xi = {
|
|
|
5918
5922
|
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"));
|
|
5919
5923
|
},
|
|
5920
5924
|
ensureBlocks_: function() {
|
|
5921
|
-
this.isInsertionMarker() || (
|
|
5925
|
+
this.isInsertionMarker() || (Vi(this), Ui(this), q(this, [
|
|
5922
5926
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5923
5927
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5924
|
-
]),
|
|
5928
|
+
]), xi(this));
|
|
5925
5929
|
}
|
|
5926
5930
|
};
|
|
5927
|
-
I.delete_data_v1 =
|
|
5931
|
+
I.delete_data_v1 = wi;
|
|
5928
5932
|
i.forBlock.delete_data_v1 = function(t) {
|
|
5929
5933
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
5930
5934
|
return `{
|
|
@@ -5962,7 +5966,7 @@ i.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
5962
5966
|
return `throw ${i.valueToCode(t, "VALUE", h.NONE) || "''"};
|
|
5963
5967
|
`;
|
|
5964
5968
|
};
|
|
5965
|
-
function
|
|
5969
|
+
function Fi(t) {
|
|
5966
5970
|
const e = t.getInput("TABLE").connection;
|
|
5967
5971
|
if (e.targetBlock())
|
|
5968
5972
|
return;
|
|
@@ -5996,7 +6000,7 @@ function wi(t) {
|
|
|
5996
6000
|
}, c = Z.blocks.append(a, t.workspace);
|
|
5997
6001
|
e.connect(c.outputConnection);
|
|
5998
6002
|
}
|
|
5999
|
-
function
|
|
6003
|
+
function Yi(t) {
|
|
6000
6004
|
const e = t.getInput("CONDITION").connection;
|
|
6001
6005
|
if (e.targetBlock())
|
|
6002
6006
|
return;
|
|
@@ -6005,7 +6009,7 @@ function Fi(t) {
|
|
|
6005
6009
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6006
6010
|
e.connect(o.outputConnection);
|
|
6007
6011
|
}
|
|
6008
|
-
function
|
|
6012
|
+
function Ki(t) {
|
|
6009
6013
|
const e = t.getInput("EXTRA").connection;
|
|
6010
6014
|
if (e.targetBlock())
|
|
6011
6015
|
return;
|
|
@@ -6042,7 +6046,7 @@ function Yi(t) {
|
|
|
6042
6046
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6043
6047
|
e.connect(o.outputConnection);
|
|
6044
6048
|
}
|
|
6045
|
-
function
|
|
6049
|
+
function $i(t) {
|
|
6046
6050
|
const e = t.getInput("HANDLE").connection;
|
|
6047
6051
|
if (e.targetBlock())
|
|
6048
6052
|
return;
|
|
@@ -6080,7 +6084,7 @@ g([
|
|
|
6080
6084
|
style: "procedure_blocks"
|
|
6081
6085
|
}
|
|
6082
6086
|
]);
|
|
6083
|
-
const
|
|
6087
|
+
const Hi = {
|
|
6084
6088
|
init: function() {
|
|
6085
6089
|
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}");
|
|
6086
6090
|
},
|
|
@@ -6096,15 +6100,15 @@ const $i = {
|
|
|
6096
6100
|
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"));
|
|
6097
6101
|
},
|
|
6098
6102
|
ensureBlocks_: function() {
|
|
6099
|
-
this.isInsertionMarker() || (
|
|
6103
|
+
this.isInsertionMarker() || (Fi(this), Yi(this), Ki(this), q(this, [
|
|
6100
6104
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6101
6105
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6102
6106
|
["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
|
|
6103
6107
|
["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
|
|
6104
|
-
]),
|
|
6108
|
+
]), $i(this));
|
|
6105
6109
|
}
|
|
6106
6110
|
};
|
|
6107
|
-
I.query_data_v1 =
|
|
6111
|
+
I.query_data_v1 = Hi;
|
|
6108
6112
|
i.forBlock.query_data_v1 = function(t) {
|
|
6109
6113
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.valueToCode(t, "EXTRA", h.ATOMIC) || "null", a = i.statementToCode(t, "HANDLE");
|
|
6110
6114
|
return `{
|
|
@@ -6177,19 +6181,19 @@ i.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
6177
6181
|
const e = i.valueToCode(t, "COLUMN", h.ATOMIC) || "''", n = i.valueToCode(t, "DESC", h.ATOMIC) || !1;
|
|
6178
6182
|
return [`{type:'sortby',value:${e},value2:${n}}`, h.ATOMIC];
|
|
6179
6183
|
};
|
|
6180
|
-
const
|
|
6184
|
+
const Gi = {
|
|
6181
6185
|
init: function() {
|
|
6182
6186
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6183
6187
|
}
|
|
6184
6188
|
};
|
|
6185
|
-
I.select_column_container_v1 =
|
|
6186
|
-
const
|
|
6189
|
+
I.select_column_container_v1 = Gi;
|
|
6190
|
+
const Wi = {
|
|
6187
6191
|
init: function() {
|
|
6188
6192
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6189
6193
|
}
|
|
6190
6194
|
};
|
|
6191
|
-
I.select_column_item_v1 =
|
|
6192
|
-
const
|
|
6195
|
+
I.select_column_item_v1 = Wi;
|
|
6196
|
+
const ji = {
|
|
6193
6197
|
init: function() {
|
|
6194
6198
|
this.space = {
|
|
6195
6199
|
id: "",
|
|
@@ -6243,7 +6247,7 @@ const Wi = {
|
|
|
6243
6247
|
return Me();
|
|
6244
6248
|
},
|
|
6245
6249
|
genTableOpts_: function() {
|
|
6246
|
-
return
|
|
6250
|
+
return Ve(this.space.id);
|
|
6247
6251
|
},
|
|
6248
6252
|
genColumnOpts_: function() {
|
|
6249
6253
|
const t = [];
|
|
@@ -6398,7 +6402,7 @@ const Wi = {
|
|
|
6398
6402
|
this.setWarningText(null);
|
|
6399
6403
|
}
|
|
6400
6404
|
};
|
|
6401
|
-
I.select_column_v1 =
|
|
6405
|
+
I.select_column_v1 = ji;
|
|
6402
6406
|
i.forBlock.select_column_v1 = function(t) {
|
|
6403
6407
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6404
6408
|
for (let p = 0; p < n.itemCount_; p++) {
|
|
@@ -6410,7 +6414,7 @@ i.forBlock.select_column_v1 = function(t) {
|
|
|
6410
6414
|
r !== 0 && (c += ","), c += `{name:${e(p)},alias:${e(_)}}`;
|
|
6411
6415
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
|
|
6412
6416
|
};
|
|
6413
|
-
const
|
|
6417
|
+
const Xi = {
|
|
6414
6418
|
init: function() {
|
|
6415
6419
|
this.space = {
|
|
6416
6420
|
id: "",
|
|
@@ -6455,7 +6459,7 @@ const ji = {
|
|
|
6455
6459
|
return Me();
|
|
6456
6460
|
},
|
|
6457
6461
|
genTableOpts_: function() {
|
|
6458
|
-
return
|
|
6462
|
+
return Ve(this.space.id);
|
|
6459
6463
|
},
|
|
6460
6464
|
onchange: function(t) {
|
|
6461
6465
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6502,12 +6506,12 @@ const ji = {
|
|
|
6502
6506
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
6503
6507
|
}
|
|
6504
6508
|
};
|
|
6505
|
-
I.select_table_v1 =
|
|
6509
|
+
I.select_table_v1 = Xi;
|
|
6506
6510
|
i.forBlock.select_table_v1 = function(t) {
|
|
6507
6511
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id;
|
|
6508
6512
|
return [`{spaceId:${e(o)},tableId:${e(s)}}`, h.ATOMIC];
|
|
6509
6513
|
};
|
|
6510
|
-
const
|
|
6514
|
+
const Ji = {
|
|
6511
6515
|
init: function() {
|
|
6512
6516
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
6513
6517
|
},
|
|
@@ -6529,9 +6533,9 @@ const Xi = {
|
|
|
6529
6533
|
]);
|
|
6530
6534
|
}
|
|
6531
6535
|
};
|
|
6532
|
-
I.transaction_v1 =
|
|
6536
|
+
I.transaction_v1 = Ji;
|
|
6533
6537
|
i.forBlock.transaction_v1 = function(t) {
|
|
6534
|
-
const e = i.INDENT, n = t, o =
|
|
6538
|
+
const e = i.INDENT, n = t, o = Cs(n), s = i.statementToCode(n, "HANDLE"), a = i.statementToCode(n, "FINALLY");
|
|
6535
6539
|
return `{
|
|
6536
6540
|
${e}var __error${o}__ = '';
|
|
6537
6541
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -6573,19 +6577,19 @@ ${e}}
|
|
|
6573
6577
|
}
|
|
6574
6578
|
`;
|
|
6575
6579
|
};
|
|
6576
|
-
const
|
|
6580
|
+
const qi = {
|
|
6577
6581
|
init: function() {
|
|
6578
6582
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6579
6583
|
}
|
|
6580
6584
|
};
|
|
6581
|
-
I.update_column_container_v1 =
|
|
6582
|
-
const
|
|
6585
|
+
I.update_column_container_v1 = qi;
|
|
6586
|
+
const Qi = {
|
|
6583
6587
|
init: function() {
|
|
6584
6588
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6585
6589
|
}
|
|
6586
6590
|
};
|
|
6587
|
-
I.update_column_item_v1 =
|
|
6588
|
-
const
|
|
6591
|
+
I.update_column_item_v1 = Qi;
|
|
6592
|
+
const zi = {
|
|
6589
6593
|
init: function() {
|
|
6590
6594
|
this.space = {
|
|
6591
6595
|
id: "",
|
|
@@ -6639,7 +6643,7 @@ const Qi = {
|
|
|
6639
6643
|
return Me();
|
|
6640
6644
|
},
|
|
6641
6645
|
genTableOpts_: function() {
|
|
6642
|
-
return
|
|
6646
|
+
return Ve(this.space.id);
|
|
6643
6647
|
},
|
|
6644
6648
|
genColumnOpts_: function() {
|
|
6645
6649
|
const t = [];
|
|
@@ -6829,7 +6833,7 @@ const Qi = {
|
|
|
6829
6833
|
this.setWarningText(null);
|
|
6830
6834
|
}
|
|
6831
6835
|
};
|
|
6832
|
-
I.update_column_v1 =
|
|
6836
|
+
I.update_column_v1 = zi;
|
|
6833
6837
|
i.forBlock.update_column_v1 = function(t) {
|
|
6834
6838
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6835
6839
|
for (let p = 0; p < n.itemCount_; p++) {
|
|
@@ -6841,7 +6845,7 @@ i.forBlock.update_column_v1 = function(t) {
|
|
|
6841
6845
|
r !== 0 && (c += ","), c += `{name:${e(p)},value:${_}}`;
|
|
6842
6846
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
|
|
6843
6847
|
};
|
|
6844
|
-
function
|
|
6848
|
+
function Zi(t) {
|
|
6845
6849
|
const e = t.getInput("TABLE").connection;
|
|
6846
6850
|
if (e.targetBlock())
|
|
6847
6851
|
return;
|
|
@@ -6875,7 +6879,7 @@ function zi(t) {
|
|
|
6875
6879
|
}, c = Z.blocks.append(a, t.workspace);
|
|
6876
6880
|
e.connect(c.outputConnection);
|
|
6877
6881
|
}
|
|
6878
|
-
function
|
|
6882
|
+
function ta(t) {
|
|
6879
6883
|
const e = t.getInput("CONDITION").connection;
|
|
6880
6884
|
if (e.targetBlock())
|
|
6881
6885
|
return;
|
|
@@ -6884,7 +6888,7 @@ function Zi(t) {
|
|
|
6884
6888
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6885
6889
|
e.connect(o.outputConnection);
|
|
6886
6890
|
}
|
|
6887
|
-
function
|
|
6891
|
+
function ea(t) {
|
|
6888
6892
|
const e = t.getInput("HANDLE").connection;
|
|
6889
6893
|
if (e.targetBlock())
|
|
6890
6894
|
return;
|
|
@@ -6908,7 +6912,7 @@ function ta(t) {
|
|
|
6908
6912
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6909
6913
|
e.connect(o.previousConnection);
|
|
6910
6914
|
}
|
|
6911
|
-
const
|
|
6915
|
+
const na = {
|
|
6912
6916
|
init: function() {
|
|
6913
6917
|
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}");
|
|
6914
6918
|
},
|
|
@@ -6924,14 +6928,14 @@ const ea = {
|
|
|
6924
6928
|
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"));
|
|
6925
6929
|
},
|
|
6926
6930
|
ensureBlocks: function() {
|
|
6927
|
-
this.isInsertionMarker() || (
|
|
6931
|
+
this.isInsertionMarker() || (Zi(this), ta(this), q(this, [
|
|
6928
6932
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6929
6933
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6930
6934
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
6931
|
-
]),
|
|
6935
|
+
]), ea(this));
|
|
6932
6936
|
}
|
|
6933
6937
|
};
|
|
6934
|
-
I.update_data_v1 =
|
|
6938
|
+
I.update_data_v1 = na;
|
|
6935
6939
|
i.forBlock.update_data_v1 = function(t) {
|
|
6936
6940
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
6937
6941
|
return `{
|
|
@@ -6948,7 +6952,7 @@ ${e}}
|
|
|
6948
6952
|
${s}}
|
|
6949
6953
|
`;
|
|
6950
6954
|
};
|
|
6951
|
-
const
|
|
6955
|
+
const oa = L.xml, sa = {
|
|
6952
6956
|
init: function() {
|
|
6953
6957
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
6954
6958
|
new pt(Ft, 20, 20, void 0, () => {
|
|
@@ -6957,7 +6961,7 @@ const na = L.xml, oa = {
|
|
|
6957
6961
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
6958
6962
|
},
|
|
6959
6963
|
mutationToDom: function() {
|
|
6960
|
-
const t =
|
|
6964
|
+
const t = oa.createElement("mutation");
|
|
6961
6965
|
return t.setAttribute("items", String(this.length)), t;
|
|
6962
6966
|
},
|
|
6963
6967
|
domToMutation: function(t) {
|
|
@@ -7009,8 +7013,8 @@ const na = L.xml, oa = {
|
|
|
7009
7013
|
this.length--;
|
|
7010
7014
|
}
|
|
7011
7015
|
};
|
|
7012
|
-
I.json_array_v1 =
|
|
7013
|
-
const
|
|
7016
|
+
I.json_array_v1 = sa;
|
|
7017
|
+
const ia = {
|
|
7014
7018
|
init: function() {
|
|
7015
7019
|
this.appendDummyInput().appendField(
|
|
7016
7020
|
new O([
|
|
@@ -7021,8 +7025,8 @@ const sa = {
|
|
|
7021
7025
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
7022
7026
|
}
|
|
7023
7027
|
};
|
|
7024
|
-
I.json_boolean_v1 =
|
|
7025
|
-
const wn = L.xml,
|
|
7028
|
+
I.json_boolean_v1 = ia;
|
|
7029
|
+
const wn = L.xml, aa = {
|
|
7026
7030
|
init: function() {
|
|
7027
7031
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
7028
7032
|
new pt(Ft, 20, 20, void 0, () => {
|
|
@@ -7088,38 +7092,38 @@ const wn = L.xml, ia = {
|
|
|
7088
7092
|
this.length--;
|
|
7089
7093
|
}
|
|
7090
7094
|
};
|
|
7091
|
-
I.json_map_v1 =
|
|
7092
|
-
const
|
|
7095
|
+
I.json_map_v1 = aa;
|
|
7096
|
+
const ca = {
|
|
7093
7097
|
init: function() {
|
|
7094
7098
|
this.appendDummyInput().appendField(new en(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
7095
7099
|
}
|
|
7096
7100
|
};
|
|
7097
|
-
I.json_number_v1 =
|
|
7098
|
-
const
|
|
7101
|
+
I.json_number_v1 = ca;
|
|
7102
|
+
const ra = {
|
|
7099
7103
|
init: function() {
|
|
7100
7104
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
7101
7105
|
}
|
|
7102
7106
|
};
|
|
7103
|
-
I.json_root_v1 =
|
|
7104
|
-
const
|
|
7107
|
+
I.json_root_v1 = ra;
|
|
7108
|
+
const la = {
|
|
7105
7109
|
init: function() {
|
|
7106
7110
|
this.appendDummyInput().appendField('"').appendField(new vt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
7107
7111
|
}
|
|
7108
7112
|
};
|
|
7109
|
-
I.json_string_v1 =
|
|
7110
|
-
const
|
|
7113
|
+
I.json_string_v1 = la;
|
|
7114
|
+
const ua = L.xml, pa = {
|
|
7111
7115
|
init: function() {
|
|
7112
7116
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
7113
7117
|
}
|
|
7114
7118
|
};
|
|
7115
|
-
I.list_create_container_v1 =
|
|
7116
|
-
const
|
|
7119
|
+
I.list_create_container_v1 = pa;
|
|
7120
|
+
const _a = {
|
|
7117
7121
|
init: function() {
|
|
7118
7122
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
7119
7123
|
}
|
|
7120
7124
|
};
|
|
7121
|
-
I.list_create_item_v1 =
|
|
7122
|
-
const
|
|
7125
|
+
I.list_create_item_v1 = _a;
|
|
7126
|
+
const da = {
|
|
7123
7127
|
init: function() {
|
|
7124
7128
|
this.itemCount_ = 0, this.setMutator(
|
|
7125
7129
|
new kt.MutatorIcon(
|
|
@@ -7129,7 +7133,7 @@ const _a = {
|
|
|
7129
7133
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
7130
7134
|
},
|
|
7131
7135
|
mutationToDom: function() {
|
|
7132
|
-
const t =
|
|
7136
|
+
const t = ua.createElement("mutation");
|
|
7133
7137
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7134
7138
|
},
|
|
7135
7139
|
domToMutation: function(t) {
|
|
@@ -7201,7 +7205,7 @@ const _a = {
|
|
|
7201
7205
|
this.removeInput("ADD" + t);
|
|
7202
7206
|
}
|
|
7203
7207
|
};
|
|
7204
|
-
I.list_create_v1 =
|
|
7208
|
+
I.list_create_v1 = da;
|
|
7205
7209
|
i.forBlock.list_create_v1 = function(t) {
|
|
7206
7210
|
const e = t, n = new Array(e.itemCount_);
|
|
7207
7211
|
for (let s = 0; s < e.itemCount_; s++)
|
|
@@ -7417,7 +7421,7 @@ i.forBlock.list_set_v1 = function(t) {
|
|
|
7417
7421
|
return `${e}[${n}] = ${o};
|
|
7418
7422
|
`;
|
|
7419
7423
|
};
|
|
7420
|
-
const
|
|
7424
|
+
const ha = {
|
|
7421
7425
|
// logic_compare
|
|
7422
7426
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
7423
7427
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -7431,7 +7435,7 @@ const da = {
|
|
|
7431
7435
|
};
|
|
7432
7436
|
x.register(
|
|
7433
7437
|
"logic_op_tooltip_v1",
|
|
7434
|
-
x.buildTooltipForDropdown("OP",
|
|
7438
|
+
x.buildTooltipForDropdown("OP", ha)
|
|
7435
7439
|
);
|
|
7436
7440
|
g([
|
|
7437
7441
|
{
|
|
@@ -7456,7 +7460,7 @@ g([
|
|
|
7456
7460
|
i.forBlock.logic_boolean_v1 = function(t) {
|
|
7457
7461
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", h.ATOMIC];
|
|
7458
7462
|
};
|
|
7459
|
-
const
|
|
7463
|
+
const fa = {
|
|
7460
7464
|
onchange: function(t) {
|
|
7461
7465
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
7462
7466
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -7476,7 +7480,7 @@ const ha = {
|
|
|
7476
7480
|
x.register(
|
|
7477
7481
|
"logic_compare_v1",
|
|
7478
7482
|
function() {
|
|
7479
|
-
this.mixin(
|
|
7483
|
+
this.mixin(fa);
|
|
7480
7484
|
}
|
|
7481
7485
|
);
|
|
7482
7486
|
g([
|
|
@@ -7526,7 +7530,7 @@ i.forBlock.logic_compare_v1 = function(t) {
|
|
|
7526
7530
|
const s = i.valueToCode(t, "A", o) || "0", a = i.valueToCode(t, "B", o) || "0";
|
|
7527
7531
|
return [`${s} ${n} ${a}`, o];
|
|
7528
7532
|
};
|
|
7529
|
-
const
|
|
7533
|
+
const ma = {
|
|
7530
7534
|
elseIfCount_: 0,
|
|
7531
7535
|
hasElse_: !1,
|
|
7532
7536
|
mutationToDom: function() {
|
|
@@ -7653,7 +7657,7 @@ const fa = {
|
|
|
7653
7657
|
};
|
|
7654
7658
|
x.registerMutator(
|
|
7655
7659
|
"logic_if_v1_mutator",
|
|
7656
|
-
|
|
7660
|
+
ma,
|
|
7657
7661
|
void 0,
|
|
7658
7662
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
7659
7663
|
);
|
|
@@ -7799,7 +7803,7 @@ i.forBlock.logic_operation_v1 = function(t) {
|
|
|
7799
7803
|
}
|
|
7800
7804
|
return [`${o} ${e} ${s}`, n];
|
|
7801
7805
|
};
|
|
7802
|
-
const
|
|
7806
|
+
const Ta = {
|
|
7803
7807
|
prevParentConnection_: null,
|
|
7804
7808
|
onchange: function(t) {
|
|
7805
7809
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -7814,7 +7818,7 @@ const ma = {
|
|
|
7814
7818
|
this.prevParentConnection_ = o;
|
|
7815
7819
|
}
|
|
7816
7820
|
};
|
|
7817
|
-
x.registerMixin("logic_ternary_v1",
|
|
7821
|
+
x.registerMixin("logic_ternary_v1", Ta);
|
|
7818
7822
|
g([
|
|
7819
7823
|
{
|
|
7820
7824
|
type: "logic_ternary_v1",
|
|
@@ -7851,7 +7855,7 @@ i.forBlock.logic_ternary_v1 = function(t) {
|
|
|
7851
7855
|
const e = i.valueToCode(t, "IF", h.CONDITIONAL) || "false", n = i.valueToCode(t, "THEN", h.CONDITIONAL) || "null", o = i.valueToCode(t, "ELSE", h.CONDITIONAL) || "null";
|
|
7852
7856
|
return [e + " ? " + n + " : " + o, h.CONDITIONAL];
|
|
7853
7857
|
};
|
|
7854
|
-
const
|
|
7858
|
+
const Ea = {
|
|
7855
7859
|
customContextMenu: function(t) {
|
|
7856
7860
|
if (this.isInFlyout)
|
|
7857
7861
|
return;
|
|
@@ -7873,7 +7877,7 @@ const Ta = {
|
|
|
7873
7877
|
};
|
|
7874
7878
|
x.registerMixin(
|
|
7875
7879
|
"contextMenu_newGetVariableBlock_v1",
|
|
7876
|
-
|
|
7880
|
+
Ea
|
|
7877
7881
|
);
|
|
7878
7882
|
x.register(
|
|
7879
7883
|
"flow_control_tooltip_v1",
|
|
@@ -7882,16 +7886,16 @@ x.register(
|
|
|
7882
7886
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
7883
7887
|
})
|
|
7884
7888
|
);
|
|
7885
|
-
const
|
|
7889
|
+
const ga = /* @__PURE__ */ new Set([
|
|
7886
7890
|
"repeat_v1",
|
|
7887
7891
|
"for_each_v1",
|
|
7888
7892
|
"for_v1",
|
|
7889
7893
|
"while_until_v1"
|
|
7890
|
-
]),
|
|
7894
|
+
]), Aa = {
|
|
7891
7895
|
getSurroundLoop: function() {
|
|
7892
7896
|
let t = this;
|
|
7893
7897
|
do {
|
|
7894
|
-
if (
|
|
7898
|
+
if (ga.has(t.type))
|
|
7895
7899
|
return t;
|
|
7896
7900
|
t = t?.getSurroundParent();
|
|
7897
7901
|
} while (t);
|
|
@@ -7912,7 +7916,7 @@ const Ea = /* @__PURE__ */ new Set([
|
|
|
7912
7916
|
};
|
|
7913
7917
|
x.registerMixin(
|
|
7914
7918
|
"flow_control_in_loop_check_v1",
|
|
7915
|
-
|
|
7919
|
+
Aa
|
|
7916
7920
|
);
|
|
7917
7921
|
g([
|
|
7918
7922
|
{
|
|
@@ -8214,7 +8218,7 @@ i.forBlock.while_until_v1 = function(t) {
|
|
|
8214
8218
|
${o}}
|
|
8215
8219
|
`;
|
|
8216
8220
|
};
|
|
8217
|
-
const
|
|
8221
|
+
const Ia = {
|
|
8218
8222
|
// math_arithmetic
|
|
8219
8223
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
8220
8224
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -8248,7 +8252,7 @@ const Aa = {
|
|
|
8248
8252
|
};
|
|
8249
8253
|
x.register(
|
|
8250
8254
|
"math_op_tooltip_v1",
|
|
8251
|
-
x.buildTooltipForDropdown("OP",
|
|
8255
|
+
x.buildTooltipForDropdown("OP", Ia)
|
|
8252
8256
|
);
|
|
8253
8257
|
g([
|
|
8254
8258
|
{
|
|
@@ -8848,21 +8852,21 @@ i.forBlock.math_trig_v1 = function(t) {
|
|
|
8848
8852
|
}
|
|
8849
8853
|
return [o, h.DIVISION];
|
|
8850
8854
|
};
|
|
8851
|
-
const
|
|
8855
|
+
const ya = L.xml, Oa = {
|
|
8852
8856
|
init: function() {
|
|
8853
8857
|
this.appendDummyInput().appendField(
|
|
8854
8858
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
8855
8859
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8856
8860
|
}
|
|
8857
8861
|
};
|
|
8858
|
-
I.object_create_container_v1 =
|
|
8859
|
-
const
|
|
8862
|
+
I.object_create_container_v1 = Oa;
|
|
8863
|
+
const va = {
|
|
8860
8864
|
init: function() {
|
|
8861
8865
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8862
8866
|
}
|
|
8863
8867
|
};
|
|
8864
|
-
I.object_create_item_v1 =
|
|
8865
|
-
const
|
|
8868
|
+
I.object_create_item_v1 = va;
|
|
8869
|
+
const Ca = {
|
|
8866
8870
|
init: function() {
|
|
8867
8871
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
8868
8872
|
new kt.MutatorIcon(
|
|
@@ -8872,7 +8876,7 @@ const va = {
|
|
|
8872
8876
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
8873
8877
|
},
|
|
8874
8878
|
mutationToDom: function() {
|
|
8875
|
-
const t =
|
|
8879
|
+
const t = ya.createElement("mutation");
|
|
8876
8880
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
8877
8881
|
},
|
|
8878
8882
|
domToMutation: function(t) {
|
|
@@ -8936,7 +8940,7 @@ const va = {
|
|
|
8936
8940
|
this.removeInput("ADD" + t);
|
|
8937
8941
|
}
|
|
8938
8942
|
};
|
|
8939
|
-
I.object_create_v1 =
|
|
8943
|
+
I.object_create_v1 = Ca;
|
|
8940
8944
|
i.forBlock.object_create_v1 = function(t) {
|
|
8941
8945
|
const e = t;
|
|
8942
8946
|
let n = "{";
|
|
@@ -9178,13 +9182,13 @@ g([
|
|
|
9178
9182
|
i.forBlock.object_to_json_v1 = function(t) {
|
|
9179
9183
|
return [`__jsonStringifyV1__(${i.valueToCode(t, "OBJECT", h.NONE) || "null"})`, h.FUNCTION_CALL];
|
|
9180
9184
|
};
|
|
9181
|
-
const Fn = L.xml,
|
|
9185
|
+
const Fn = L.xml, ka = {
|
|
9182
9186
|
init: function() {
|
|
9183
9187
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new $o(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
9184
9188
|
}
|
|
9185
9189
|
};
|
|
9186
|
-
I.procedure_def_container_v1 =
|
|
9187
|
-
const
|
|
9190
|
+
I.procedure_def_container_v1 = ka;
|
|
9191
|
+
const Na = {
|
|
9188
9192
|
init: function() {
|
|
9189
9193
|
const t = new vt(nn.DEFAULT_ARG);
|
|
9190
9194
|
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;
|
|
@@ -9206,8 +9210,8 @@ const ka = {
|
|
|
9206
9210
|
return t;
|
|
9207
9211
|
}
|
|
9208
9212
|
};
|
|
9209
|
-
I.procedure_def_item_v1 =
|
|
9210
|
-
const
|
|
9213
|
+
I.procedure_def_item_v1 = Na;
|
|
9214
|
+
const Sa = {
|
|
9211
9215
|
init: function() {
|
|
9212
9216
|
this.withReturn = !1, this.args = [];
|
|
9213
9217
|
const t = new vt(
|
|
@@ -9311,13 +9315,13 @@ const Na = {
|
|
|
9311
9315
|
}
|
|
9312
9316
|
}
|
|
9313
9317
|
};
|
|
9314
|
-
I.procedure_def_v1 =
|
|
9315
|
-
const
|
|
9318
|
+
I.procedure_def_v1 = Sa;
|
|
9319
|
+
const La = L.xml, Ba = {
|
|
9316
9320
|
init: function() {
|
|
9317
9321
|
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}");
|
|
9318
9322
|
},
|
|
9319
9323
|
mutationToDom: function() {
|
|
9320
|
-
const t =
|
|
9324
|
+
const t = La.createElement("mutation");
|
|
9321
9325
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
9322
9326
|
},
|
|
9323
9327
|
domToMutation: function(t) {
|
|
@@ -9368,14 +9372,14 @@ const Sa = L.xml, La = {
|
|
|
9368
9372
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
9369
9373
|
}
|
|
9370
9374
|
};
|
|
9371
|
-
I.procedure_return_v1 =
|
|
9375
|
+
I.procedure_return_v1 = Ba;
|
|
9372
9376
|
i.forBlock.procedure_return_v1 = function(t) {
|
|
9373
9377
|
const e = t;
|
|
9374
9378
|
return e.withReturn ? `return ${i.valueToCode(e, "VALUE", h.NONE) || "null"};
|
|
9375
9379
|
` : `return;
|
|
9376
9380
|
`;
|
|
9377
9381
|
};
|
|
9378
|
-
const
|
|
9382
|
+
const ba = {
|
|
9379
9383
|
init: function() {
|
|
9380
9384
|
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}");
|
|
9381
9385
|
},
|
|
@@ -9398,7 +9402,7 @@ const Ba = {
|
|
|
9398
9402
|
]);
|
|
9399
9403
|
}
|
|
9400
9404
|
};
|
|
9401
|
-
I.download_resource_v1 =
|
|
9405
|
+
I.download_resource_v1 = ba;
|
|
9402
9406
|
i.forBlock.download_resource_v1 = function(t) {
|
|
9403
9407
|
const e = i.valueToCode(t, "ASSET", h.ATOMIC) || null, n = i.statementToCode(t, "HANDLE");
|
|
9404
9408
|
return `{
|
|
@@ -9426,7 +9430,7 @@ function Io(t) {
|
|
|
9426
9430
|
}
|
|
9427
9431
|
return o(e.dirTree, ""), n;
|
|
9428
9432
|
}
|
|
9429
|
-
function
|
|
9433
|
+
function Pa(t) {
|
|
9430
9434
|
const e = [];
|
|
9431
9435
|
return Io(t).forEach(({ id: o, name: s }) => {
|
|
9432
9436
|
e.push([s, o]);
|
|
@@ -9441,7 +9445,7 @@ function yo(t, e) {
|
|
|
9441
9445
|
s.dirid === e && o.push(s);
|
|
9442
9446
|
}), o;
|
|
9443
9447
|
}
|
|
9444
|
-
function
|
|
9448
|
+
function Ra(t, e) {
|
|
9445
9449
|
const n = [];
|
|
9446
9450
|
return yo(t, e).forEach(({ id: s, name: a }) => {
|
|
9447
9451
|
n.push([a, s]);
|
|
@@ -9453,13 +9457,13 @@ function Oo() {
|
|
|
9453
9457
|
e.resources.length > 0 && t.push(e);
|
|
9454
9458
|
}), t;
|
|
9455
9459
|
}
|
|
9456
|
-
function
|
|
9460
|
+
function Da() {
|
|
9457
9461
|
const t = [];
|
|
9458
9462
|
return Oo().forEach(({ id: n, name: o }) => {
|
|
9459
9463
|
t.push([o, n]);
|
|
9460
9464
|
}), b(t);
|
|
9461
9465
|
}
|
|
9462
|
-
const
|
|
9466
|
+
const Ma = {
|
|
9463
9467
|
init: function() {
|
|
9464
9468
|
this.space = {
|
|
9465
9469
|
id: "",
|
|
@@ -9511,20 +9515,20 @@ const Da = {
|
|
|
9511
9515
|
this.space = We(t.space), this.dir = We(t.dir), this.resource = We(t.resource);
|
|
9512
9516
|
},
|
|
9513
9517
|
genSpaceOpts_: function() {
|
|
9514
|
-
return
|
|
9518
|
+
return Da();
|
|
9515
9519
|
},
|
|
9516
9520
|
genDirOpts_: function() {
|
|
9517
|
-
return
|
|
9521
|
+
return Pa(this.space.id);
|
|
9518
9522
|
},
|
|
9519
9523
|
genResourceOpts_: function() {
|
|
9520
|
-
return
|
|
9524
|
+
return Ra(this.space.id, this.dir.id);
|
|
9521
9525
|
}
|
|
9522
9526
|
};
|
|
9523
|
-
I.select_resource_v1 =
|
|
9527
|
+
I.select_resource_v1 = Ma;
|
|
9524
9528
|
i.forBlock.select_resource_v1 = function() {
|
|
9525
9529
|
return "";
|
|
9526
9530
|
};
|
|
9527
|
-
const
|
|
9531
|
+
const Va = {
|
|
9528
9532
|
init: function() {
|
|
9529
9533
|
this.appendDummyInput().appendField(
|
|
9530
9534
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -9555,7 +9559,7 @@ const Ma = {
|
|
|
9555
9559
|
]);
|
|
9556
9560
|
}
|
|
9557
9561
|
};
|
|
9558
|
-
I.upload_resource_v1 =
|
|
9562
|
+
I.upload_resource_v1 = Va;
|
|
9559
9563
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
9560
9564
|
const e = i.valueToCode(t, "NAME", h.ATOMIC) || "''", n = i.valueToCode(t, "DIR", h.ATOMIC) || "null", o = i.valueToCode(t, "DATA", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
9561
9565
|
return `{
|
|
@@ -9794,10 +9798,10 @@ g([
|
|
|
9794
9798
|
i.forBlock.text_is_empty_v1 = function(t) {
|
|
9795
9799
|
return [`!${i.valueToCode(t, "VALUE", h.MEMBER) || "''"}.length`, h.LOGICAL_NOT];
|
|
9796
9800
|
};
|
|
9797
|
-
const
|
|
9801
|
+
const xa = L.xml, wa = {
|
|
9798
9802
|
itemCount_: 0,
|
|
9799
9803
|
mutationToDom: function() {
|
|
9800
|
-
const t =
|
|
9804
|
+
const t = xa.createElement("mutation");
|
|
9801
9805
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
9802
9806
|
},
|
|
9803
9807
|
domToMutation: function(t) {
|
|
@@ -9868,13 +9872,13 @@ const Va = L.xml, xa = {
|
|
|
9868
9872
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
9869
9873
|
this.removeInput("ADD" + t);
|
|
9870
9874
|
}
|
|
9871
|
-
},
|
|
9875
|
+
}, Fa = function() {
|
|
9872
9876
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new kt.MutatorIcon(["text_join_item_v1"], this));
|
|
9873
9877
|
};
|
|
9874
9878
|
x.registerMutator(
|
|
9875
9879
|
"text_join_mutator_v1",
|
|
9876
|
-
|
|
9877
|
-
|
|
9880
|
+
wa,
|
|
9881
|
+
Fa
|
|
9878
9882
|
);
|
|
9879
9883
|
g([
|
|
9880
9884
|
{
|
|
@@ -10106,7 +10110,7 @@ i.forBlock.text_trim_v1 = function(t) {
|
|
|
10106
10110
|
}[t.getFieldValue("MODE")];
|
|
10107
10111
|
return [`__trimV1__(${e}, ${o})`, h.ATOMIC];
|
|
10108
10112
|
};
|
|
10109
|
-
const
|
|
10113
|
+
const Ya = {
|
|
10110
10114
|
init: function() {
|
|
10111
10115
|
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}");
|
|
10112
10116
|
},
|
|
@@ -10132,7 +10136,7 @@ const Fa = {
|
|
|
10132
10136
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
10133
10137
|
}
|
|
10134
10138
|
};
|
|
10135
|
-
I.create_timer_v1 =
|
|
10139
|
+
I.create_timer_v1 = Ya;
|
|
10136
10140
|
i.forBlock.create_timer_v1 = function(t) {
|
|
10137
10141
|
const e = i.valueToCode(t, "INTERVAL", h.ATOMIC) || "1000", n = i.valueToCode(t, "LOOP", h.ATOMIC) || "false", o = i.valueToCode(t, "COUNT", h.ATOMIC) || "1", s = i.valueToCode(t, "IMMEDIATE", h.ATOMIC) || "false", a = i.statementToCode(t, "CALLBACK");
|
|
10138
10142
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${s}, async function() {
|
|
@@ -10161,18 +10165,18 @@ i.forBlock.delay_v1 = function(t) {
|
|
|
10161
10165
|
return `await __delayV1__(${i.valueToCode(t, "DURATION", h.ATOMIC) || "0"});
|
|
10162
10166
|
`;
|
|
10163
10167
|
};
|
|
10164
|
-
const
|
|
10168
|
+
const Ka = {
|
|
10165
10169
|
customContextMenu: function(t) {
|
|
10166
10170
|
if (this.isInFlyout) {
|
|
10167
10171
|
if (this.type === "variable_get_v1") {
|
|
10168
10172
|
const e = {
|
|
10169
10173
|
text: E("RENAME_VARIABLE"),
|
|
10170
10174
|
enabled: !0,
|
|
10171
|
-
callback:
|
|
10175
|
+
callback: $a(this)
|
|
10172
10176
|
}, n = this.getField("VAR").getText(), o = {
|
|
10173
10177
|
text: E("DELETE_VARIABLE").replace("%1", n),
|
|
10174
10178
|
enabled: !0,
|
|
10175
|
-
callback:
|
|
10179
|
+
callback: Ha(this)
|
|
10176
10180
|
};
|
|
10177
10181
|
t.unshift(e), t.unshift(o);
|
|
10178
10182
|
}
|
|
@@ -10190,12 +10194,12 @@ const Ya = {
|
|
|
10190
10194
|
});
|
|
10191
10195
|
}
|
|
10192
10196
|
}
|
|
10193
|
-
},
|
|
10197
|
+
}, $a = function(t) {
|
|
10194
10198
|
return function() {
|
|
10195
10199
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
10196
10200
|
xt.renameVariable(e, o);
|
|
10197
10201
|
};
|
|
10198
|
-
},
|
|
10202
|
+
}, Ha = function(t) {
|
|
10199
10203
|
return function() {
|
|
10200
10204
|
const n = t.getField("VAR").getVariable();
|
|
10201
10205
|
n && xt.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -10203,7 +10207,7 @@ const Ya = {
|
|
|
10203
10207
|
};
|
|
10204
10208
|
x.registerMixin(
|
|
10205
10209
|
"context_menu_variable_v1",
|
|
10206
|
-
|
|
10210
|
+
Ka
|
|
10207
10211
|
);
|
|
10208
10212
|
g([
|
|
10209
10213
|
{
|
|
@@ -10277,14 +10281,14 @@ const ce = O.prototype;
|
|
|
10277
10281
|
ce.doClassValidation_ = function(t) {
|
|
10278
10282
|
return t;
|
|
10279
10283
|
};
|
|
10280
|
-
const
|
|
10284
|
+
const Ga = ce.doValueUpdate_;
|
|
10281
10285
|
ce.doValueUpdate_ = function(t) {
|
|
10282
|
-
|
|
10286
|
+
Ga.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
10283
10287
|
};
|
|
10284
|
-
const
|
|
10288
|
+
const Wa = ce.getText_;
|
|
10285
10289
|
ce.getText_ = function() {
|
|
10286
10290
|
if (this.selectedOption)
|
|
10287
|
-
return
|
|
10291
|
+
return Wa.call(this);
|
|
10288
10292
|
const { i18n: t } = Nt, e = this.getSourceBlock();
|
|
10289
10293
|
if (this.name === "APP")
|
|
10290
10294
|
return e.app.name;
|
|
@@ -10353,7 +10357,7 @@ function vo(t) {
|
|
|
10353
10357
|
const e = t.getParent();
|
|
10354
10358
|
return e && vo(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
10355
10359
|
}
|
|
10356
|
-
class
|
|
10360
|
+
class ja {
|
|
10357
10361
|
init() {
|
|
10358
10362
|
const e = Go.registry.getItem("blockDisable");
|
|
10359
10363
|
e && (e.preconditionFn = function(n) {
|
|
@@ -10364,10 +10368,10 @@ class Wa {
|
|
|
10364
10368
|
}
|
|
10365
10369
|
Wo.registerFieldColour();
|
|
10366
10370
|
jo.registry.unregister(Xo.names.ESCAPE);
|
|
10367
|
-
const
|
|
10368
|
-
|
|
10369
|
-
const
|
|
10370
|
-
|
|
10371
|
+
const Xa = new Jo.CrossTabCopyPaste();
|
|
10372
|
+
Xa.init({ contextMenu: !0, shortcut: !0 });
|
|
10373
|
+
const Ja = new ja();
|
|
10374
|
+
Ja.init();
|
|
10371
10375
|
function An(t) {
|
|
10372
10376
|
const e = ne();
|
|
10373
10377
|
if (!e)
|
|
@@ -10539,7 +10543,7 @@ Be.Classic.categoryStyles = {
|
|
|
10539
10543
|
colour: "#a55b80"
|
|
10540
10544
|
}
|
|
10541
10545
|
};
|
|
10542
|
-
const
|
|
10546
|
+
const qa = jn.defineTheme("light", {
|
|
10543
10547
|
name: "light",
|
|
10544
10548
|
base: Be.Classic,
|
|
10545
10549
|
componentStyles: {
|
|
@@ -10555,7 +10559,7 @@ const Ja = jn.defineTheme("light", {
|
|
|
10555
10559
|
scrollbarOpacity: 0.4,
|
|
10556
10560
|
cursorColour: ""
|
|
10557
10561
|
}
|
|
10558
|
-
}),
|
|
10562
|
+
}), Qa = jn.defineTheme("dark", {
|
|
10559
10563
|
name: "dark",
|
|
10560
10564
|
base: Be.Classic,
|
|
10561
10565
|
componentStyles: {
|
|
@@ -10572,14 +10576,14 @@ const Ja = jn.defineTheme("light", {
|
|
|
10572
10576
|
cursorColour: ""
|
|
10573
10577
|
}
|
|
10574
10578
|
});
|
|
10575
|
-
function
|
|
10579
|
+
function za(t) {
|
|
10576
10580
|
const e = ne();
|
|
10577
10581
|
switch (t) {
|
|
10578
10582
|
case "light":
|
|
10579
|
-
e.setTheme(
|
|
10583
|
+
e.setTheme(qa);
|
|
10580
10584
|
break;
|
|
10581
10585
|
case "dark":
|
|
10582
|
-
e.setTheme(
|
|
10586
|
+
e.setTheme(Qa);
|
|
10583
10587
|
break;
|
|
10584
10588
|
}
|
|
10585
10589
|
}
|
|
@@ -10587,7 +10591,7 @@ const hn = ["get_app_property_v1", "get_app_state_v1"];
|
|
|
10587
10591
|
function gt(t, e) {
|
|
10588
10592
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
10589
10593
|
}
|
|
10590
|
-
function
|
|
10594
|
+
function Za(t) {
|
|
10591
10595
|
const e = [];
|
|
10592
10596
|
function n(o) {
|
|
10593
10597
|
for (const s of o.getChildren(!0))
|
|
@@ -10595,7 +10599,7 @@ function za(t) {
|
|
|
10595
10599
|
}
|
|
10596
10600
|
return n(t), e;
|
|
10597
10601
|
}
|
|
10598
|
-
function
|
|
10602
|
+
function tc(t) {
|
|
10599
10603
|
const e = [];
|
|
10600
10604
|
for (const n of t)
|
|
10601
10605
|
if (n.type === "get_app_property_v1") {
|
|
@@ -10611,7 +10615,7 @@ function Za(t) {
|
|
|
10611
10615
|
} else n.type === "get_app_state_v1" ? gt(e, Pt({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
10612
10616
|
return e;
|
|
10613
10617
|
}
|
|
10614
|
-
function
|
|
10618
|
+
function ec(t) {
|
|
10615
10619
|
const e = [];
|
|
10616
10620
|
for (const n of t.getChildren(!0))
|
|
10617
10621
|
if (hn.includes(n.type))
|
|
@@ -10622,7 +10626,7 @@ function tc(t) {
|
|
|
10622
10626
|
}
|
|
10623
10627
|
return e;
|
|
10624
10628
|
}
|
|
10625
|
-
function
|
|
10629
|
+
function nc(t) {
|
|
10626
10630
|
const e = [], n = [];
|
|
10627
10631
|
for (const o of t)
|
|
10628
10632
|
if (o.type === "get_app_property_v1") {
|
|
@@ -10686,7 +10690,7 @@ function ec(t) {
|
|
|
10686
10690
|
console.assert(!1);
|
|
10687
10691
|
return e;
|
|
10688
10692
|
}
|
|
10689
|
-
function
|
|
10693
|
+
function oc(t) {
|
|
10690
10694
|
const e = {
|
|
10691
10695
|
watchEffect: {},
|
|
10692
10696
|
bind: {
|
|
@@ -10698,11 +10702,11 @@ function nc(t) {
|
|
|
10698
10702
|
return e;
|
|
10699
10703
|
for (const o of n)
|
|
10700
10704
|
if (o.type === "watch_effect_v1") {
|
|
10701
|
-
const s =
|
|
10705
|
+
const s = Za(o), a = tc(s);
|
|
10702
10706
|
for (const c of a)
|
|
10703
10707
|
e.watchEffect[c] || (e.watchEffect[c] = []), gt(e.watchEffect[c], o.id);
|
|
10704
10708
|
} else if (o.type === "app_bind_v1") {
|
|
10705
|
-
const s =
|
|
10709
|
+
const s = ec(o), a = nc(s);
|
|
10706
10710
|
e.bind.sets[o.id] = a;
|
|
10707
10711
|
for (const c of a) {
|
|
10708
10712
|
const l = Pt(c);
|
|
@@ -10712,13 +10716,13 @@ function nc(t) {
|
|
|
10712
10716
|
return e;
|
|
10713
10717
|
}
|
|
10714
10718
|
const ko = /* @__PURE__ */ Symbol();
|
|
10715
|
-
function
|
|
10716
|
-
|
|
10719
|
+
function sc(t) {
|
|
10720
|
+
Ts(ko, t);
|
|
10717
10721
|
}
|
|
10718
10722
|
function In() {
|
|
10719
|
-
return
|
|
10723
|
+
return Es(ko);
|
|
10720
10724
|
}
|
|
10721
|
-
const
|
|
10725
|
+
const ic = /* @__PURE__ */ mt({
|
|
10722
10726
|
__name: "index",
|
|
10723
10727
|
props: {
|
|
10724
10728
|
lock: { type: Boolean }
|
|
@@ -10739,12 +10743,12 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10739
10743
|
};
|
|
10740
10744
|
return e({ cleanWorkspace: l }), (_, r) => {
|
|
10741
10745
|
const u = K("v-btn"), d = K("v-tooltip");
|
|
10742
|
-
return
|
|
10746
|
+
return U(), dt(d, {
|
|
10743
10747
|
disabled: c.value,
|
|
10744
10748
|
text: F(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10745
10749
|
}, {
|
|
10746
10750
|
activator: ht(({ props: f }) => [
|
|
10747
|
-
|
|
10751
|
+
V(u, mn(f, {
|
|
10748
10752
|
density: "comfortable",
|
|
10749
10753
|
icon: "mdi-broom",
|
|
10750
10754
|
variant: "outlined",
|
|
@@ -10755,7 +10759,7 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10755
10759
|
}, 8, ["disabled", "text"]);
|
|
10756
10760
|
};
|
|
10757
10761
|
}
|
|
10758
|
-
}),
|
|
10762
|
+
}), ac = /* @__PURE__ */ mt({
|
|
10759
10763
|
__name: "index",
|
|
10760
10764
|
props: {
|
|
10761
10765
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10766,12 +10770,12 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10766
10770
|
const { t: e } = ie(), n = Tn(), o = Qt(t, "modelValue"), s = H(() => n.smAndDown.value);
|
|
10767
10771
|
return (a, c) => {
|
|
10768
10772
|
const l = K("v-btn"), p = K("v-tooltip");
|
|
10769
|
-
return
|
|
10773
|
+
return U(), dt(p, {
|
|
10770
10774
|
disabled: s.value,
|
|
10771
10775
|
text: F(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10772
10776
|
}, {
|
|
10773
10777
|
activator: ht(({ props: _ }) => [
|
|
10774
|
-
|
|
10778
|
+
V(l, mn(_, {
|
|
10775
10779
|
density: "comfortable",
|
|
10776
10780
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
10777
10781
|
variant: "outlined",
|
|
@@ -10782,11 +10786,11 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10782
10786
|
}, 8, ["disabled", "text"]);
|
|
10783
10787
|
};
|
|
10784
10788
|
}
|
|
10785
|
-
}),
|
|
10789
|
+
}), cc = { class: "d-flex flex-column" }, rc = { class: "text-subtitle-1 ml-6" }, lc = {
|
|
10786
10790
|
key: 0,
|
|
10787
10791
|
class: "text-caption text-grey text-truncate ml-6",
|
|
10788
10792
|
style: { maxWidth: "340px" }
|
|
10789
|
-
},
|
|
10793
|
+
}, uc = /* @__PURE__ */ mt({
|
|
10790
10794
|
__name: "item",
|
|
10791
10795
|
props: {
|
|
10792
10796
|
id: {},
|
|
@@ -10814,20 +10818,20 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10814
10818
|
pointerEvents: "none"
|
|
10815
10819
|
}));
|
|
10816
10820
|
return (r, u) => {
|
|
10817
|
-
const d = K("v-spacer"), f = K("v-icon"), m =
|
|
10818
|
-
return
|
|
10821
|
+
const d = K("v-spacer"), f = K("v-icon"), m = gs("ripple");
|
|
10822
|
+
return As((U(), lt("div", {
|
|
10819
10823
|
class: "d-flex align-center cursor-pointer",
|
|
10820
10824
|
style: ot(p.value),
|
|
10821
10825
|
onClick: u[1] || (u[1] = (T) => c("x-click", a.id)),
|
|
10822
10826
|
onMouseout: u[2] || (u[2] = (T) => l.value = !1),
|
|
10823
10827
|
onMouseover: u[3] || (u[3] = (T) => l.value = !0)
|
|
10824
10828
|
}, [
|
|
10825
|
-
Q("div",
|
|
10826
|
-
Q("span",
|
|
10827
|
-
a.desc ? (
|
|
10829
|
+
Q("div", cc, [
|
|
10830
|
+
Q("span", rc, zt(a.title), 1),
|
|
10831
|
+
a.desc ? (U(), lt("span", lc, zt(a.desc), 1)) : Et("", !0)
|
|
10828
10832
|
]),
|
|
10829
|
-
|
|
10830
|
-
|
|
10833
|
+
V(d),
|
|
10834
|
+
V(f, {
|
|
10831
10835
|
class: "x-handle cursor-move mr-3",
|
|
10832
10836
|
icon: "mdi-drag-horizontal-variant",
|
|
10833
10837
|
onMousedown: u[0] || (u[0] = Jt(() => {
|
|
@@ -10841,10 +10845,10 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10841
10845
|
]);
|
|
10842
10846
|
};
|
|
10843
10847
|
}
|
|
10844
|
-
}),
|
|
10848
|
+
}), pc = {
|
|
10845
10849
|
key: 1,
|
|
10846
10850
|
class: "text-caption text-grey"
|
|
10847
|
-
},
|
|
10851
|
+
}, _c = /* @__PURE__ */ mt({
|
|
10848
10852
|
__name: "index",
|
|
10849
10853
|
props: /* @__PURE__ */ sn({
|
|
10850
10854
|
lock: { type: Boolean }
|
|
@@ -10865,8 +10869,8 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10865
10869
|
const T = m.id === Qo()?.id;
|
|
10866
10870
|
let y = "";
|
|
10867
10871
|
if (m.type.startsWith("on_app_event_v")) {
|
|
10868
|
-
const D = m,
|
|
10869
|
-
|
|
10872
|
+
const D = m, Vt = B[D.node.key];
|
|
10873
|
+
Vt && (y = n(Vt.name), D.node.alias && (y += " / " + D.node.alias), y += " - " + be(D.event.kind, D.event.names));
|
|
10870
10874
|
} else if (m.type.startsWith("watch_effect_v"))
|
|
10871
10875
|
y = n("x-block-lib.watchEffect");
|
|
10872
10876
|
else if (m.type.startsWith("app_bind_v"))
|
|
@@ -10928,7 +10932,7 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10928
10932
|
const f = s.workspace.getBlockById(d);
|
|
10929
10933
|
Xn.setSelected(f), An(d), o.value = !1;
|
|
10930
10934
|
};
|
|
10931
|
-
return (d, f) => a.value.length > 0 ? (
|
|
10935
|
+
return (d, f) => a.value.length > 0 ? (U(), dt(F(qo), {
|
|
10932
10936
|
key: 0,
|
|
10933
10937
|
modelValue: a.value,
|
|
10934
10938
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => a.value = m),
|
|
@@ -10940,7 +10944,7 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10940
10944
|
onStart: p
|
|
10941
10945
|
}, {
|
|
10942
10946
|
default: ht(() => [
|
|
10943
|
-
(
|
|
10947
|
+
(U(!0), lt(so, null, Is(a.value, (m) => (U(), dt(uc, {
|
|
10944
10948
|
id: m.id,
|
|
10945
10949
|
key: m.id,
|
|
10946
10950
|
desc: m.desc,
|
|
@@ -10950,14 +10954,14 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10950
10954
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10951
10955
|
]),
|
|
10952
10956
|
_: 1
|
|
10953
|
-
}, 8, ["modelValue"])) : (
|
|
10957
|
+
}, 8, ["modelValue"])) : (U(), lt("span", pc, zt(F(n)("x-block-lib.noOption")), 1));
|
|
10954
10958
|
}
|
|
10955
|
-
}),
|
|
10959
|
+
}), dc = (t, e) => {
|
|
10956
10960
|
const n = t.__vccOpts || t;
|
|
10957
10961
|
for (const [o, s] of e)
|
|
10958
10962
|
n[o] = s;
|
|
10959
10963
|
return n;
|
|
10960
|
-
},
|
|
10964
|
+
}, hc = /* @__PURE__ */ dc(_c, [["__scopeId", "data-v-a77ed323"]]), fc = /* @__PURE__ */ mt({
|
|
10961
10965
|
__name: "index",
|
|
10962
10966
|
props: {
|
|
10963
10967
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10981,11 +10985,11 @@ const sc = /* @__PURE__ */ mt({
|
|
|
10981
10985
|
const p = l.getBlockById(c);
|
|
10982
10986
|
Xn.setSelected(p), An(c), n.value = !1;
|
|
10983
10987
|
};
|
|
10984
|
-
return (c, l) => (
|
|
10988
|
+
return (c, l) => (U(), lt("div", {
|
|
10985
10989
|
onClick: l[0] || (l[0] = (p) => a(""))
|
|
10986
10990
|
}, "blockTree"));
|
|
10987
10991
|
}
|
|
10988
|
-
}),
|
|
10992
|
+
}), mc = { class: "text-subtitle-1" }, Tc = /* @__PURE__ */ mt({
|
|
10989
10993
|
__name: "index",
|
|
10990
10994
|
props: {
|
|
10991
10995
|
type: {},
|
|
@@ -11008,16 +11012,16 @@ const sc = /* @__PURE__ */ mt({
|
|
|
11008
11012
|
}), _ = H(() => ({
|
|
11009
11013
|
height: "60px"
|
|
11010
11014
|
})), { open: r } = fn(`blocklyNavigatorDlg${an()}`);
|
|
11011
|
-
|
|
11015
|
+
ys(() => {
|
|
11012
11016
|
r.value = !1;
|
|
11013
11017
|
});
|
|
11014
11018
|
const u = qt("blockList"), d = qt("blockTree");
|
|
11015
11019
|
return e({ open: r, update: () => {
|
|
11016
11020
|
t.type === "list" ? u.value?.update() : t.type === "tree" && d.value?.update();
|
|
11017
11021
|
} }), (m, T) => {
|
|
11018
|
-
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"),
|
|
11019
|
-
return
|
|
11020
|
-
|
|
11022
|
+
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"), Vt = K("v-dialog"), He = K("v-tooltip");
|
|
11023
|
+
return U(), lt(so, null, [
|
|
11024
|
+
V(Vt, {
|
|
11021
11025
|
modelValue: F(r),
|
|
11022
11026
|
"onUpdate:modelValue": T[5] || (T[5] = (nt) => pe(r) ? r.value = nt : null),
|
|
11023
11027
|
eager: "",
|
|
@@ -11037,25 +11041,25 @@ const sc = /* @__PURE__ */ mt({
|
|
|
11037
11041
|
class: "elevation-2",
|
|
11038
11042
|
style: ot(l.value)
|
|
11039
11043
|
}, [
|
|
11040
|
-
F(s) ? (
|
|
11044
|
+
F(s) ? (U(), dt(y, {
|
|
11041
11045
|
key: 0,
|
|
11042
11046
|
color: "transparent",
|
|
11043
11047
|
height: 24
|
|
11044
11048
|
})) : Et("", !0),
|
|
11045
|
-
|
|
11049
|
+
V(y, {
|
|
11046
11050
|
class: "d-flex align-center px-2",
|
|
11047
11051
|
color: "transparent",
|
|
11048
11052
|
height: 48
|
|
11049
11053
|
}, {
|
|
11050
11054
|
default: ht(() => [
|
|
11051
|
-
|
|
11055
|
+
V(S, {
|
|
11052
11056
|
density: "comfortable",
|
|
11053
11057
|
icon: "mdi-close",
|
|
11054
11058
|
variant: "text",
|
|
11055
11059
|
onClick: T[0] || (T[0] = (nt) => r.value = !1)
|
|
11056
11060
|
}),
|
|
11057
|
-
Q("span",
|
|
11058
|
-
|
|
11061
|
+
Q("span", mc, zt(F(n)("x-block-lib.navigator")), 1),
|
|
11062
|
+
V(D)
|
|
11059
11063
|
]),
|
|
11060
11064
|
_: 1
|
|
11061
11065
|
}),
|
|
@@ -11063,14 +11067,14 @@ const sc = /* @__PURE__ */ mt({
|
|
|
11063
11067
|
class: "overflow-y-auto",
|
|
11064
11068
|
style: ot(p.value)
|
|
11065
11069
|
}, [
|
|
11066
|
-
t.type === "list" ? (
|
|
11070
|
+
t.type === "list" ? (U(), dt(hc, {
|
|
11067
11071
|
key: 0,
|
|
11068
11072
|
ref_key: "blockList",
|
|
11069
11073
|
ref: u,
|
|
11070
11074
|
modelValue: F(r),
|
|
11071
11075
|
"onUpdate:modelValue": T[1] || (T[1] = (nt) => pe(r) ? r.value = nt : null),
|
|
11072
11076
|
lock: t.lock
|
|
11073
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
11077
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (U(), dt(fc, {
|
|
11074
11078
|
key: 1,
|
|
11075
11079
|
ref_key: "blockTree",
|
|
11076
11080
|
ref: d,
|
|
@@ -11086,12 +11090,12 @@ const sc = /* @__PURE__ */ mt({
|
|
|
11086
11090
|
]),
|
|
11087
11091
|
_: 1
|
|
11088
11092
|
}, 8, ["modelValue"]),
|
|
11089
|
-
|
|
11093
|
+
V(He, {
|
|
11090
11094
|
disabled: c.value,
|
|
11091
11095
|
text: F(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
11092
11096
|
}, {
|
|
11093
11097
|
activator: ht(({ props: nt }) => [
|
|
11094
|
-
|
|
11098
|
+
V(S, mn(nt, {
|
|
11095
11099
|
density: "comfortable",
|
|
11096
11100
|
icon: "mdi-navigation-variant",
|
|
11097
11101
|
variant: "outlined",
|
|
@@ -11143,7 +11147,7 @@ function Kn(t, e) {
|
|
|
11143
11147
|
const a = X.createTextNode(String(e));
|
|
11144
11148
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
11145
11149
|
}
|
|
11146
|
-
function
|
|
11150
|
+
function Ec(t, e) {
|
|
11147
11151
|
e === void 0 && (e = !1);
|
|
11148
11152
|
const n = X.createElement("value");
|
|
11149
11153
|
n.setAttribute("name", t);
|
|
@@ -11154,11 +11158,11 @@ function Tc(t, e) {
|
|
|
11154
11158
|
const a = X.createTextNode(e ? "TRUE" : "FALSE");
|
|
11155
11159
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
11156
11160
|
}
|
|
11157
|
-
function
|
|
11161
|
+
function gc() {
|
|
11158
11162
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11159
11163
|
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
11160
11164
|
}
|
|
11161
|
-
function
|
|
11165
|
+
function Ac() {
|
|
11162
11166
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11163
11167
|
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
11164
11168
|
}
|
|
@@ -11166,7 +11170,7 @@ function $n() {
|
|
|
11166
11170
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11167
11171
|
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
11168
11172
|
}
|
|
11169
|
-
function
|
|
11173
|
+
function Ic() {
|
|
11170
11174
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11171
11175
|
if (t.type !== "comp")
|
|
11172
11176
|
return !1;
|
|
@@ -11177,55 +11181,55 @@ function Ac() {
|
|
|
11177
11181
|
}
|
|
11178
11182
|
return !1;
|
|
11179
11183
|
}
|
|
11180
|
-
function
|
|
11184
|
+
function yc() {
|
|
11181
11185
|
const t = [];
|
|
11182
|
-
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")),
|
|
11186
|
+
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), gc() && t.push(C("trigger_app_event_v1")), t.push(
|
|
11183
11187
|
C("app_bind_v1", [No([{ key: "items", value: "2" }])])
|
|
11184
|
-
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")),
|
|
11188
|
+
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Ac() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (st("callMethod") || $n()) && t.push(j(E("LABEL_METHOD"))), st("callMethod") && t.push(C("call_app_method_v1")), $n() && (t.push(C("implement_app_method_v1")), Ic() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
|
|
11185
11189
|
}
|
|
11186
|
-
const So = { name: "APP_COMP_CATEGORY", callback:
|
|
11187
|
-
function
|
|
11190
|
+
const So = { name: "APP_COMP_CATEGORY", callback: yc };
|
|
11191
|
+
function Oc() {
|
|
11188
11192
|
const t = [];
|
|
11189
11193
|
return t.push(j(E("LABEL_FUNC"))), t.push(j(E("LABEL_FLOW"))), t;
|
|
11190
11194
|
}
|
|
11191
|
-
const ye = { name: "APP_COMPUTE_CATEGORY", callback:
|
|
11192
|
-
function
|
|
11195
|
+
const ye = { name: "APP_COMPUTE_CATEGORY", callback: Oc };
|
|
11196
|
+
function vc() {
|
|
11193
11197
|
const t = [];
|
|
11194
11198
|
return t.push(C("app_debug_trace_v1", [Kt("OBJECT")])), t.push(C("popup_message_v1", [Kt("TEXT")])), t.push(C("open_confirm_dlg_v1")), t.push(C("open_prompt_dlg_v1")), t;
|
|
11195
11199
|
}
|
|
11196
|
-
const Oe = { name: "APP_MESSAGE_CATEGORY", callback:
|
|
11197
|
-
function
|
|
11200
|
+
const Oe = { name: "APP_MESSAGE_CATEGORY", callback: vc };
|
|
11201
|
+
function Cc() {
|
|
11198
11202
|
for (const t of A.app.appList)
|
|
11199
11203
|
if (t.pages.length > 0)
|
|
11200
11204
|
return !0;
|
|
11201
11205
|
return !1;
|
|
11202
11206
|
}
|
|
11203
|
-
function
|
|
11207
|
+
function kc() {
|
|
11204
11208
|
const t = [];
|
|
11205
|
-
return t.push(C("app_env_is_v1")),
|
|
11209
|
+
return t.push(C("app_env_is_v1")), Cc() && t.push(C("navigate_to_v1")), t;
|
|
11206
11210
|
}
|
|
11207
|
-
const ve = { name: "APP_MISC_CATEGORY", callback:
|
|
11208
|
-
function
|
|
11211
|
+
const ve = { name: "APP_MISC_CATEGORY", callback: kc };
|
|
11212
|
+
function Nc() {
|
|
11209
11213
|
const { activeObject: t, activePage: e } = A.app;
|
|
11210
11214
|
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
11211
11215
|
}
|
|
11212
|
-
function
|
|
11216
|
+
function Sc() {
|
|
11213
11217
|
const { activeObject: t, activePage: e } = A.app;
|
|
11214
11218
|
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
11215
11219
|
}
|
|
11216
|
-
function
|
|
11220
|
+
function Lc() {
|
|
11217
11221
|
const t = [];
|
|
11218
11222
|
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
11219
11223
|
C("app_bind_v1", [No([{ key: "items", value: "2" }])])
|
|
11220
|
-
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")),
|
|
11224
|
+
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Nc() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), st("callMethod") && (t.push(j(E("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), Sc() && (t.push(j(E("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
|
|
11221
11225
|
}
|
|
11222
|
-
const Lo = { name: "APP_PAGE_CATEGORY", callback:
|
|
11223
|
-
function
|
|
11226
|
+
const Lo = { name: "APP_PAGE_CATEGORY", callback: Lc };
|
|
11227
|
+
function Bc() {
|
|
11224
11228
|
const t = [];
|
|
11225
11229
|
return t.push(j(E("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
11226
11230
|
}
|
|
11227
|
-
const Ce = { name: "APP_RESOURCE_CATEGORY", callback:
|
|
11228
|
-
function
|
|
11231
|
+
const Ce = { name: "APP_RESOURCE_CATEGORY", callback: Bc }, Wt = L.xml;
|
|
11232
|
+
function bc() {
|
|
11229
11233
|
const t = [];
|
|
11230
11234
|
{
|
|
11231
11235
|
const e = Wt.createElement("label");
|
|
@@ -11250,9 +11254,9 @@ function Bc() {
|
|
|
11250
11254
|
}
|
|
11251
11255
|
const At = {
|
|
11252
11256
|
name: "PROCEDURE_CATEGORY",
|
|
11253
|
-
callback:
|
|
11257
|
+
callback: bc
|
|
11254
11258
|
}, le = L.xml;
|
|
11255
|
-
function
|
|
11259
|
+
function Pc() {
|
|
11256
11260
|
const t = ne(), e = [];
|
|
11257
11261
|
{
|
|
11258
11262
|
const o = le.createElement("label");
|
|
@@ -11290,9 +11294,9 @@ function bc() {
|
|
|
11290
11294
|
}
|
|
11291
11295
|
const It = {
|
|
11292
11296
|
name: "VARIABLE_CATEGORY",
|
|
11293
|
-
callback:
|
|
11297
|
+
callback: Pc
|
|
11294
11298
|
};
|
|
11295
|
-
function
|
|
11299
|
+
function Rc() {
|
|
11296
11300
|
const t = [];
|
|
11297
11301
|
if (ut().length > 0)
|
|
11298
11302
|
t.push(j(E("LABEL_OPERATION"))), t.push(C("add_data_v1")), t.push(C("delete_data_v1")), t.push(C("update_data_v1")), t.push(C("query_data_v1")), t.push(C("transaction_v1")), t.push(
|
|
@@ -11305,7 +11309,7 @@ function Pc() {
|
|
|
11305
11309
|
), t.push(
|
|
11306
11310
|
C("query_extra_sortby_v1", [
|
|
11307
11311
|
Kt("COLUMN"),
|
|
11308
|
-
|
|
11312
|
+
Ec("DESC")
|
|
11309
11313
|
])
|
|
11310
11314
|
);
|
|
11311
11315
|
else {
|
|
@@ -11314,30 +11318,30 @@ function Pc() {
|
|
|
11314
11318
|
}
|
|
11315
11319
|
return t;
|
|
11316
11320
|
}
|
|
11317
|
-
const ke = { name: "COMPUTE_DATA_CATEGORY", callback:
|
|
11318
|
-
function
|
|
11321
|
+
const ke = { name: "COMPUTE_DATA_CATEGORY", callback: Rc };
|
|
11322
|
+
function Dc() {
|
|
11319
11323
|
return ae("flow").length > 0;
|
|
11320
11324
|
}
|
|
11321
|
-
function
|
|
11325
|
+
function Mc() {
|
|
11322
11326
|
const t = [];
|
|
11323
|
-
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")),
|
|
11327
|
+
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Dc() && console.assert(!0), t;
|
|
11324
11328
|
}
|
|
11325
|
-
const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback:
|
|
11326
|
-
function
|
|
11329
|
+
const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Mc };
|
|
11330
|
+
function Vc() {
|
|
11327
11331
|
return ae("func").length > 0;
|
|
11328
11332
|
}
|
|
11329
11333
|
function Uc() {
|
|
11330
11334
|
const { activeObject: t, activeFunc: e } = A.compute, n = [];
|
|
11331
|
-
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))),
|
|
11335
|
+
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Vc() && n.push(C("call_func_internal_v1")), n;
|
|
11332
11336
|
}
|
|
11333
11337
|
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Uc };
|
|
11334
|
-
function
|
|
11338
|
+
function xc() {
|
|
11335
11339
|
const t = [];
|
|
11336
11340
|
return t.push(
|
|
11337
11341
|
C("compute_debug_trace_v1", [Kt("OBJECT")])
|
|
11338
11342
|
), t;
|
|
11339
11343
|
}
|
|
11340
|
-
const Le = { name: "COMPUTE_MISC_CATEGORY", callback:
|
|
11344
|
+
const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
11341
11345
|
kind: "category",
|
|
11342
11346
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
11343
11347
|
categorystyle: "color_category",
|
|
@@ -12040,7 +12044,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12040
12044
|
}
|
|
12041
12045
|
}
|
|
12042
12046
|
]
|
|
12043
|
-
},
|
|
12047
|
+
}, wc = {
|
|
12044
12048
|
kind: "categoryToolbox",
|
|
12045
12049
|
contents: [
|
|
12046
12050
|
{
|
|
@@ -12067,7 +12071,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12067
12071
|
$e,
|
|
12068
12072
|
xe,
|
|
12069
12073
|
Ke,
|
|
12070
|
-
|
|
12074
|
+
Ue,
|
|
12071
12075
|
Bo,
|
|
12072
12076
|
{
|
|
12073
12077
|
kind: "category",
|
|
@@ -12094,7 +12098,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12094
12098
|
custom: ye.name
|
|
12095
12099
|
}
|
|
12096
12100
|
]
|
|
12097
|
-
},
|
|
12101
|
+
}, Fc = {
|
|
12098
12102
|
kind: "categoryToolbox",
|
|
12099
12103
|
contents: [
|
|
12100
12104
|
{
|
|
@@ -12127,7 +12131,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12127
12131
|
$e,
|
|
12128
12132
|
xe,
|
|
12129
12133
|
Ke,
|
|
12130
|
-
|
|
12134
|
+
Ue,
|
|
12131
12135
|
{
|
|
12132
12136
|
kind: "category",
|
|
12133
12137
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12141,7 +12145,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12141
12145
|
custom: At.name
|
|
12142
12146
|
}
|
|
12143
12147
|
]
|
|
12144
|
-
},
|
|
12148
|
+
}, Yc = {
|
|
12145
12149
|
kind: "categoryToolbox",
|
|
12146
12150
|
contents: [
|
|
12147
12151
|
{
|
|
@@ -12174,7 +12178,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12174
12178
|
$e,
|
|
12175
12179
|
xe,
|
|
12176
12180
|
Ke,
|
|
12177
|
-
|
|
12181
|
+
Ue,
|
|
12178
12182
|
{
|
|
12179
12183
|
kind: "category",
|
|
12180
12184
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12188,7 +12192,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12188
12192
|
custom: At.name
|
|
12189
12193
|
}
|
|
12190
12194
|
]
|
|
12191
|
-
},
|
|
12195
|
+
}, Kc = {
|
|
12192
12196
|
kind: "categoryToolbox",
|
|
12193
12197
|
contents: [
|
|
12194
12198
|
{
|
|
@@ -12219,7 +12223,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12219
12223
|
]
|
|
12220
12224
|
}
|
|
12221
12225
|
]
|
|
12222
|
-
},
|
|
12226
|
+
}, $c = {
|
|
12223
12227
|
kind: "categoryToolbox",
|
|
12224
12228
|
contents: [
|
|
12225
12229
|
{
|
|
@@ -12246,7 +12250,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12246
12250
|
$e,
|
|
12247
12251
|
xe,
|
|
12248
12252
|
Ke,
|
|
12249
|
-
|
|
12253
|
+
Ue,
|
|
12250
12254
|
Bo,
|
|
12251
12255
|
{
|
|
12252
12256
|
kind: "category",
|
|
@@ -12299,26 +12303,26 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: Vc }, Ve = {
|
|
|
12299
12303
|
wheel: !0
|
|
12300
12304
|
}
|
|
12301
12305
|
};
|
|
12302
|
-
function
|
|
12303
|
-
tn.theme = o ? "dark" : "light", tn.toolbox =
|
|
12306
|
+
function Hc(t, e, n, o) {
|
|
12307
|
+
tn.theme = o ? "dark" : "light", tn.toolbox = Gc(e, n);
|
|
12304
12308
|
const s = zo(t, tn);
|
|
12305
12309
|
return s.addChangeListener((a) => {
|
|
12306
12310
|
setTimeout(() => {
|
|
12307
12311
|
Zo.shadowBlockConversionChangeListener(a);
|
|
12308
12312
|
}, 0);
|
|
12309
|
-
}),
|
|
12313
|
+
}), Wc(s, e, n), jc(s), s;
|
|
12310
12314
|
}
|
|
12311
|
-
function
|
|
12315
|
+
function Gc(t, e) {
|
|
12312
12316
|
let n;
|
|
12313
|
-
return t === "page" ? e === "v1" && (n =
|
|
12317
|
+
return t === "page" ? e === "v1" && (n = $c) : t === "comp" ? e === "v1" && (n = wc) : t === "func" ? e === "v1" && (n = Yc) : t === "flow" ? e === "v1" && (n = Fc) : t === "json" && e === "v1" && (n = Kc), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
12314
12318
|
}
|
|
12315
|
-
function
|
|
12319
|
+
function Wc(t, e, n) {
|
|
12316
12320
|
function o({ name: s, callback: a }) {
|
|
12317
12321
|
t.registerToolboxCategoryCallback(s, () => a(e));
|
|
12318
12322
|
}
|
|
12319
12323
|
e === "page" ? n === "v1" && (o(Lo), o(Oe), o(ve), o(It), o(At), o(Ce), o(ye)) : e === "comp" ? n === "v1" && (o(So), o(Oe), o(ve), o(It), o(At), o(Ce), o(ye)) : e === "func" ? n === "v1" && (o(Se), o(Ne), o(ke), o(Le), o(It), o(At)) : e === "flow" && n === "v1" && (o(Se), o(Ne), o(ke), o(Le), o(It), o(At));
|
|
12320
12324
|
}
|
|
12321
|
-
function
|
|
12325
|
+
function jc(t) {
|
|
12322
12326
|
const { router: e } = Nt;
|
|
12323
12327
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
12324
12328
|
const n = e.resolve({
|
|
@@ -12336,7 +12340,7 @@ function Wc(t) {
|
|
|
12336
12340
|
}, 100);
|
|
12337
12341
|
});
|
|
12338
12342
|
}
|
|
12339
|
-
function
|
|
12343
|
+
function Xc(t, e) {
|
|
12340
12344
|
const n = e.newBlock("json_root_v1");
|
|
12341
12345
|
n.initSvg(), n.render();
|
|
12342
12346
|
const o = (s, a) => {
|
|
@@ -12378,7 +12382,7 @@ function jc(t, e) {
|
|
|
12378
12382
|
new (v.get(v.FINISHED_LOADING))(e)
|
|
12379
12383
|
);
|
|
12380
12384
|
}
|
|
12381
|
-
function
|
|
12385
|
+
function Jc(t) {
|
|
12382
12386
|
const e = (o) => {
|
|
12383
12387
|
if (!o)
|
|
12384
12388
|
return null;
|
|
@@ -12410,7 +12414,7 @@ function Xc(t) {
|
|
|
12410
12414
|
if (o.type === "json_root_v1")
|
|
12411
12415
|
return e(o);
|
|
12412
12416
|
}
|
|
12413
|
-
const
|
|
12417
|
+
const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
12414
12418
|
__name: "index",
|
|
12415
12419
|
props: /* @__PURE__ */ sn({
|
|
12416
12420
|
type: {},
|
|
@@ -12426,7 +12430,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12426
12430
|
emits: /* @__PURE__ */ sn(["ready"], ["update:lock", "update:scale"]),
|
|
12427
12431
|
setup(t, { expose: e, emit: n }) {
|
|
12428
12432
|
const { backgroundColor2: o } = oe(), s = Qt(t, "lock"), a = Qt(t, "scale"), c = n, l = `blocklyEditor${an()}`, p = wt(), _ = qt("parentContainer"), r = qt("clean"), u = qt("navigator"), d = {};
|
|
12429
|
-
|
|
12433
|
+
sc(d);
|
|
12430
12434
|
const f = wt(!0), m = wt(!1), T = H(() => t.type === "json" ? "tree" : "list"), y = H(() => ({
|
|
12431
12435
|
width: "100%",
|
|
12432
12436
|
height: "calc(100% - 48px)"
|
|
@@ -12444,7 +12448,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12444
12448
|
width: "56px",
|
|
12445
12449
|
height: "calc(100% - 49px)",
|
|
12446
12450
|
zIndex: 999
|
|
12447
|
-
})),
|
|
12451
|
+
})), Vt = H(() => ({
|
|
12448
12452
|
position: "absolute",
|
|
12449
12453
|
top: "0px",
|
|
12450
12454
|
right: "0px",
|
|
@@ -12476,13 +12480,13 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12476
12480
|
console.assert(!1);
|
|
12477
12481
|
return;
|
|
12478
12482
|
}
|
|
12479
|
-
ts(_.value), await Pn(t.locale), d.workspace =
|
|
12483
|
+
ts(_.value), await Pn(t.locale), d.workspace = Hc(p.value, t.type, t.version, t.dark), d.workspace.addChangeListener(v.disableOrphans), d.workspace.addChangeListener(bo);
|
|
12480
12484
|
const P = document.querySelector(`#${l} .blocklyFlyout`);
|
|
12481
12485
|
new MutationObserver((Ge) => {
|
|
12482
12486
|
Ge.forEach((re) => {
|
|
12483
12487
|
re.type === "attributes" && re.attributeName === "style" && (Ht.value = d.workspace.getFlyout().isVisible());
|
|
12484
12488
|
});
|
|
12485
|
-
}).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await
|
|
12489
|
+
}).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await Os(), c("ready");
|
|
12486
12490
|
}), bn(() => {
|
|
12487
12491
|
Ht.value = !1;
|
|
12488
12492
|
}), es(p, () => {
|
|
@@ -12506,17 +12510,17 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12506
12510
|
}
|
|
12507
12511
|
}
|
|
12508
12512
|
const Po = (P) => {
|
|
12509
|
-
f.value = !0, t.type === "json" ?
|
|
12510
|
-
}, Ro = () => t.type === "json" ?
|
|
12513
|
+
f.value = !0, t.type === "json" ? Xc(P, d.workspace) : Z.workspaces.load(P, d.workspace);
|
|
12514
|
+
}, Ro = () => t.type === "json" ? Jc(d.workspace) : Z.workspaces.save(d.workspace), Do = () => {
|
|
12511
12515
|
if (t.type === "json")
|
|
12512
12516
|
console.assert(!1);
|
|
12513
12517
|
else
|
|
12514
12518
|
return i.workspaceToCode(d.workspace);
|
|
12515
|
-
}, Mo = () =>
|
|
12519
|
+
}, Mo = () => oc(d.workspace), On = () => {
|
|
12516
12520
|
d.workspace.setIsReadOnly(s.value), d.workspace.isReadOnly() && (Ht.value = !1);
|
|
12517
12521
|
}, vn = () => {
|
|
12518
12522
|
d.workspace.setScale(a.value);
|
|
12519
|
-
},
|
|
12523
|
+
}, Vo = () => {
|
|
12520
12524
|
d.workspace.fireChangeListener(new ao());
|
|
12521
12525
|
}, Cn = () => {
|
|
12522
12526
|
r.value?.cleanWorkspace();
|
|
@@ -12526,9 +12530,9 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12526
12530
|
u.value && (u.value.open = !0);
|
|
12527
12531
|
};
|
|
12528
12532
|
return Bn(() => {
|
|
12529
|
-
|
|
12533
|
+
Ut.on("cleanWorkspace", Cn), Ut.on("toggleBlocklyLock", kn), Ut.on("openBlocklyNavigator", Nn);
|
|
12530
12534
|
}), bn(() => {
|
|
12531
|
-
|
|
12535
|
+
Ut.off("cleanWorkspace", Cn), Ut.off("toggleBlocklyLock", kn), Ut.off("openBlocklyNavigator", Nn);
|
|
12532
12536
|
}), Gt(
|
|
12533
12537
|
() => t.locale,
|
|
12534
12538
|
(P) => {
|
|
@@ -12537,7 +12541,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12537
12541
|
), Gt(
|
|
12538
12542
|
() => t.dark,
|
|
12539
12543
|
(P) => {
|
|
12540
|
-
|
|
12544
|
+
za(P ? "dark" : "light");
|
|
12541
12545
|
}
|
|
12542
12546
|
), Gt(Ht, (P) => {
|
|
12543
12547
|
P || d.workspace?.hideChaff();
|
|
@@ -12551,10 +12555,10 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12551
12555
|
save: Ro,
|
|
12552
12556
|
generateCode: Do,
|
|
12553
12557
|
generateReactivity: Mo,
|
|
12554
|
-
fireStateChange:
|
|
12558
|
+
fireStateChange: Vo
|
|
12555
12559
|
}), (P, Bt) => {
|
|
12556
12560
|
const Ge = K("v-icon"), re = K("x-loading");
|
|
12557
|
-
return
|
|
12561
|
+
return U(), lt("div", qc, [
|
|
12558
12562
|
Q("div", {
|
|
12559
12563
|
id: l,
|
|
12560
12564
|
ref_key: "blocklyDiv",
|
|
@@ -12564,44 +12568,44 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12564
12568
|
Q("div", {
|
|
12565
12569
|
style: ot(S.value)
|
|
12566
12570
|
}, [
|
|
12567
|
-
|
|
12571
|
+
vs(P.$slots, "bottom")
|
|
12568
12572
|
], 4),
|
|
12569
|
-
m.value ? (
|
|
12573
|
+
m.value ? (U(), lt("div", {
|
|
12570
12574
|
key: 0,
|
|
12571
12575
|
class: "d-flex flex-column justify-center align-center",
|
|
12572
12576
|
style: ot(D.value)
|
|
12573
12577
|
}, [
|
|
12574
|
-
|
|
12578
|
+
V(Ge, {
|
|
12575
12579
|
icon: "mdi-delete",
|
|
12576
12580
|
size: "x-large"
|
|
12577
12581
|
})
|
|
12578
12582
|
], 4)) : Et("", !0),
|
|
12579
|
-
f.value ? Et("", !0) : (
|
|
12583
|
+
f.value ? Et("", !0) : (U(), lt("div", {
|
|
12580
12584
|
key: 1,
|
|
12581
12585
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12582
|
-
style: ot(
|
|
12586
|
+
style: ot(Vt.value)
|
|
12583
12587
|
}, [
|
|
12584
|
-
|
|
12588
|
+
V(ic, {
|
|
12585
12589
|
ref_key: "clean",
|
|
12586
12590
|
ref: r,
|
|
12587
12591
|
lock: s.value
|
|
12588
12592
|
}, null, 8, ["lock"]),
|
|
12589
|
-
|
|
12593
|
+
V(ac, {
|
|
12590
12594
|
modelValue: s.value,
|
|
12591
|
-
"onUpdate:modelValue": Bt[0] || (Bt[0] = (
|
|
12595
|
+
"onUpdate:modelValue": Bt[0] || (Bt[0] = (Uo) => s.value = Uo)
|
|
12592
12596
|
}, null, 8, ["modelValue"]),
|
|
12593
|
-
|
|
12597
|
+
V(Tc, {
|
|
12594
12598
|
ref_key: "navigator",
|
|
12595
12599
|
ref: u,
|
|
12596
12600
|
lock: s.value,
|
|
12597
12601
|
type: T.value
|
|
12598
12602
|
}, null, 8, ["lock", "type"])
|
|
12599
12603
|
], 4)),
|
|
12600
|
-
s.value ? (
|
|
12604
|
+
s.value ? (U(), lt("div", {
|
|
12601
12605
|
key: 2,
|
|
12602
12606
|
style: ot(nt.value)
|
|
12603
12607
|
}, null, 4)) : Et("", !0),
|
|
12604
|
-
s.value ? (
|
|
12608
|
+
s.value ? (U(), lt("div", {
|
|
12605
12609
|
key: 3,
|
|
12606
12610
|
style: ot(He.value)
|
|
12607
12611
|
}, null, 4)) : Et("", !0),
|
|
@@ -12610,14 +12614,14 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12610
12614
|
ref: _,
|
|
12611
12615
|
style: ot(yn.value)
|
|
12612
12616
|
}, null, 4),
|
|
12613
|
-
|
|
12617
|
+
V(re, {
|
|
12614
12618
|
open: f.value,
|
|
12615
12619
|
"z-index": 99
|
|
12616
12620
|
}, null, 8, ["open"])
|
|
12617
12621
|
]);
|
|
12618
12622
|
};
|
|
12619
12623
|
}
|
|
12620
|
-
}),
|
|
12624
|
+
}), zc = /* @__PURE__ */ mt({
|
|
12621
12625
|
__name: "index",
|
|
12622
12626
|
props: {
|
|
12623
12627
|
code: {}
|
|
@@ -12628,13 +12632,13 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12628
12632
|
const n = is.component, { backgroundColor2: o } = oe();
|
|
12629
12633
|
return (s, a) => {
|
|
12630
12634
|
const c = K("v-sheet");
|
|
12631
|
-
return
|
|
12635
|
+
return U(), dt(c, {
|
|
12632
12636
|
color: F(o),
|
|
12633
12637
|
height: "100%",
|
|
12634
12638
|
width: "100%"
|
|
12635
12639
|
}, {
|
|
12636
12640
|
default: ht(() => [
|
|
12637
|
-
|
|
12641
|
+
V(F(n), {
|
|
12638
12642
|
code: e.code,
|
|
12639
12643
|
language: "js"
|
|
12640
12644
|
}, null, 8, ["code"])
|
|
@@ -12643,7 +12647,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12643
12647
|
}, 8, ["color"]);
|
|
12644
12648
|
};
|
|
12645
12649
|
}
|
|
12646
|
-
}),
|
|
12650
|
+
}), Zc = { class: "text-subtitle-1" }, tr = { class: "w-100 h-100 overflow-auto" }, er = /* @__PURE__ */ mt({
|
|
12647
12651
|
__name: "index",
|
|
12648
12652
|
setup(t) {
|
|
12649
12653
|
const { t: e } = ie(), { sysBarAvail: n } = qn(), { backgroundColor0: o, backgroundColor2: s } = oe(), a = wt(""), c = H(() => {
|
|
@@ -12657,7 +12661,7 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12657
12661
|
}, { open: p } = fn("sourceDlg", l);
|
|
12658
12662
|
return (_, r) => {
|
|
12659
12663
|
const u = K("v-sheet"), d = K("v-btn"), f = K("v-spacer"), m = K("v-dialog");
|
|
12660
|
-
return
|
|
12664
|
+
return U(), dt(m, {
|
|
12661
12665
|
modelValue: F(p),
|
|
12662
12666
|
"onUpdate:modelValue": r[1] || (r[1] = (T) => pe(p) ? p.value = T : null),
|
|
12663
12667
|
fullscreen: "",
|
|
@@ -12667,39 +12671,39 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12667
12671
|
onKeydown: r[2] || (r[2] = io(Jt((T) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12668
12672
|
}, {
|
|
12669
12673
|
default: ht(() => [
|
|
12670
|
-
|
|
12674
|
+
V(u, {
|
|
12671
12675
|
color: F(o),
|
|
12672
12676
|
height: "100%",
|
|
12673
12677
|
width: "100%"
|
|
12674
12678
|
}, {
|
|
12675
12679
|
default: ht(() => [
|
|
12676
|
-
F(n) ? (
|
|
12680
|
+
F(n) ? (U(), dt(u, {
|
|
12677
12681
|
key: 0,
|
|
12678
12682
|
color: F(s),
|
|
12679
12683
|
height: 24
|
|
12680
12684
|
}, null, 8, ["color"])) : Et("", !0),
|
|
12681
|
-
|
|
12685
|
+
V(u, {
|
|
12682
12686
|
class: "d-flex align-center px-2",
|
|
12683
12687
|
color: F(s),
|
|
12684
12688
|
height: 48
|
|
12685
12689
|
}, {
|
|
12686
12690
|
default: ht(() => [
|
|
12687
|
-
|
|
12691
|
+
V(d, {
|
|
12688
12692
|
density: "comfortable",
|
|
12689
12693
|
icon: "mdi-close",
|
|
12690
12694
|
variant: "text",
|
|
12691
12695
|
onClick: r[0] || (r[0] = (T) => p.value = !1)
|
|
12692
12696
|
}),
|
|
12693
|
-
Q("span",
|
|
12694
|
-
|
|
12697
|
+
Q("span", Zc, zt(F(e)("x-block-lib.dlg.source.title")), 1),
|
|
12698
|
+
V(f)
|
|
12695
12699
|
]),
|
|
12696
12700
|
_: 1
|
|
12697
12701
|
}, 8, ["color"]),
|
|
12698
12702
|
Q("div", {
|
|
12699
12703
|
style: ot(c.value)
|
|
12700
12704
|
}, [
|
|
12701
|
-
Q("div",
|
|
12702
|
-
|
|
12705
|
+
Q("div", tr, [
|
|
12706
|
+
V(zc, { code: a.value }, null, 8, ["code"])
|
|
12703
12707
|
])
|
|
12704
12708
|
], 4)
|
|
12705
12709
|
]),
|
|
@@ -12710,16 +12714,16 @@ const Jc = { class: "position-relative w-100 h-100" }, qc = /* @__PURE__ */ mt({
|
|
|
12710
12714
|
}, 8, ["modelValue"]);
|
|
12711
12715
|
};
|
|
12712
12716
|
}
|
|
12713
|
-
}),
|
|
12714
|
-
t.component("XBlockly",
|
|
12717
|
+
}), nr = (t) => {
|
|
12718
|
+
t.component("XBlockly", Qc), t.component("XSourceDlg", er);
|
|
12715
12719
|
};
|
|
12716
|
-
async function
|
|
12720
|
+
async function ur(t) {
|
|
12717
12721
|
return (await co(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.gy41k67q.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.b828ufea.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
12718
12722
|
}
|
|
12719
|
-
const
|
|
12723
|
+
const pr = { install: nr };
|
|
12720
12724
|
export {
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
+
Qc as XBlockly,
|
|
12726
|
+
pr as default,
|
|
12727
|
+
nr as install,
|
|
12728
|
+
ur as loadLocaleMessageBlock
|
|
12725
12729
|
};
|