x-block-lib 0.8.31 → 0.8.33
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
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-6cb62cd6]{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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { E as I, r as Tn, M as Rn, s as vo, a as Co, X as Dn, u as C, B as
|
|
11
|
-
import { globalState as
|
|
12
|
-
import { globalObjects as vt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as Yn, useColor as jt, useSystem as Fn, useViewStack as
|
|
13
|
-
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as
|
|
14
|
-
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as sn, useModel as Kt, ref as Lt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as Z, normalizeStyle as W, createElementVNode as w, createCommentVNode as rt, toDisplayString as
|
|
10
|
+
import { E as I, r as Tn, M as Rn, s as vo, a as Co, X as Dn, u as C, B as E, j as s, O as r, F as O, b as He, i as v, c as Tt, d as ko, e as M, f as T, g as No, h as $, k as ht, p as Yt, l as ot, m as En, n as B, C as Mn, N as it, o as Lo, P as Ge, q as Ue, V as Nt, t as Un, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as Wt, T as Ae, A as Vn, D as Mo, G as Uo, H as xn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as $o, Y as Ho } from "./vendor.txua272r.js";
|
|
11
|
+
import { globalState as g } from "x-state-lib";
|
|
12
|
+
import { globalObjects as vt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as Yn, useColor as jt, useSystem as Fn, useViewStack as en, eventBus as kt } from "x-essential-lib";
|
|
13
|
+
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as nn, elements as tt, makeEventId as z, toEventName as Ie, unwrapMethodId as Oe, makeMethodId as ee, toMethodName as on, unwrapPropertyId as Jo, makePropertyId as Zt, toPropertyName as wn, isLocaleOfMethodKind as Kn, makeTriggerId as Ot } from "x-runtime-lib";
|
|
14
|
+
import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as sn, useModel as Kt, ref as Lt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as Z, normalizeStyle as W, createElementVNode as w, createCommentVNode as rt, toDisplayString as $t, withModifiers as Ft, mergeModels as We, Fragment as $n, renderList as ti, useId as je, onUnmounted as ei, useTemplateRef as wt, withKeys as Hn, isRef as ne, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
|
|
15
15
|
import { useI18n as Xt } from "vue-i18n";
|
|
16
16
|
import { useDisplay as ii } from "vuetify";
|
|
17
17
|
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
@@ -30,14 +30,14 @@ const Wn = (t, e, n) => {
|
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
32
|
async function In(t) {
|
|
33
|
-
const e = await Wn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.
|
|
33
|
+
const e = await Wn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.i31hlb1k.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.e1w1hz44.js") }), `./msg/${t}.ts`, 3);
|
|
34
34
|
vo(e.default);
|
|
35
35
|
}
|
|
36
36
|
function f(t) {
|
|
37
37
|
return Rn[t] ?? t;
|
|
38
38
|
}
|
|
39
39
|
const St = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
|
-
function
|
|
40
|
+
function ye(t) {
|
|
41
41
|
const e = t.lastIndexOf("V");
|
|
42
42
|
if (e <= 0 || e >= t.length - 1)
|
|
43
43
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -63,7 +63,7 @@ function si(t) {
|
|
|
63
63
|
function jn(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function ve(t, e) {
|
|
67
67
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
68
68
|
}
|
|
69
69
|
function K(t) {
|
|
@@ -75,7 +75,7 @@ function q(t) {
|
|
|
75
75
|
function Q(t) {
|
|
76
76
|
return t.startsWith("multiple_ref_v");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ve(t) {
|
|
79
79
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
80
80
|
return C.xml.textToDom(e);
|
|
81
81
|
}
|
|
@@ -86,9 +86,9 @@ function On(t) {
|
|
|
86
86
|
function ai(t) {
|
|
87
87
|
return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Xe(t, e) {
|
|
90
90
|
let n = null;
|
|
91
|
-
return e === "string" ? n =
|
|
91
|
+
return e === "string" ? n = Ve("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ve("") : console.assert(!1), n ? Dn.domToBlock(n, t) : null;
|
|
92
92
|
}
|
|
93
93
|
function Et(t) {
|
|
94
94
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
@@ -150,11 +150,11 @@ function ui() {
|
|
|
150
150
|
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
151
151
|
}
|
|
152
152
|
function li(t) {
|
|
153
|
-
const e = `<shadow type="${
|
|
153
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
154
154
|
return C.xml.textToDom(e);
|
|
155
155
|
}
|
|
156
156
|
function _i(t) {
|
|
157
|
-
const e = `<shadow type="${
|
|
157
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
158
158
|
return C.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
160
|
function pi(t) {
|
|
@@ -173,14 +173,14 @@ function hi(t) {
|
|
|
173
173
|
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = pt(t.default) : t.ui === "numInput" ? e = ce(t.default) : t.ui === "switch" ? e = re(t.default) : t.ui === "select" ? e = li(t.items) : t.ui === "multiTypes" ? e = _i(t.types) : t.ui === "compSelect" ? e = di() : t.ui === "colorPicker" ? e = pi(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
174
174
|
}
|
|
175
175
|
function fi() {
|
|
176
|
-
const { activeObject: t, activePage: e } =
|
|
176
|
+
const { activeObject: t, activePage: e } = g.app, n = [];
|
|
177
177
|
if (t.type === "page")
|
|
178
178
|
for (const { id: o, name: i, type: a } of e.meta.arguments)
|
|
179
179
|
n.push({ key: o, name: i, type: a });
|
|
180
180
|
return n;
|
|
181
181
|
}
|
|
182
182
|
function yn(t) {
|
|
183
|
-
const { activeObject: e, activePage: n } =
|
|
183
|
+
const { activeObject: e, activePage: n } = g.app;
|
|
184
184
|
if (e.type === "page") {
|
|
185
185
|
const o = n.meta.arguments.find((i) => i.id === t);
|
|
186
186
|
if (o)
|
|
@@ -255,14 +255,14 @@ const Ti = {
|
|
|
255
255
|
this.setWarningText(null);
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
E.get_page_argument_v1 = Ti;
|
|
259
259
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
260
260
|
const e = t;
|
|
261
261
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, r.FUNCTION_CALL];
|
|
262
262
|
};
|
|
263
263
|
const Ei = (t, e) => {
|
|
264
|
-
const n =
|
|
265
|
-
|
|
264
|
+
const n = ye(t), o = ae(t);
|
|
265
|
+
E[n] = {
|
|
266
266
|
init: function() {
|
|
267
267
|
this.appendDummyInput().appendField(
|
|
268
268
|
new O(() => this.genOpts_()),
|
|
@@ -286,8 +286,8 @@ for (const t in ie) {
|
|
|
286
286
|
Ei(n, e.items[n]);
|
|
287
287
|
}
|
|
288
288
|
const gi = (t, e) => {
|
|
289
|
-
const n =
|
|
290
|
-
|
|
289
|
+
const n = ye(t), o = ae(t);
|
|
290
|
+
E[n] = {
|
|
291
291
|
init: function() {
|
|
292
292
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
293
293
|
new O(() => this.genOpts_()),
|
|
@@ -387,13 +387,13 @@ const Ai = C.xml, Ii = {
|
|
|
387
387
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
|
|
390
|
+
E.app_bind_container_v1 = Ii;
|
|
391
391
|
const Oi = {
|
|
392
392
|
init: function() {
|
|
393
393
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
394
394
|
}
|
|
395
395
|
};
|
|
396
|
-
|
|
396
|
+
E.app_bind_item_v1 = Oi;
|
|
397
397
|
const yi = {
|
|
398
398
|
init: function() {
|
|
399
399
|
this.itemCount_ = 0, this.setMutator(
|
|
@@ -512,15 +512,15 @@ const yi = {
|
|
|
512
512
|
this.setWarningText(null);
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
|
-
|
|
515
|
+
E.app_bind_v1 = yi;
|
|
516
516
|
s.forBlock.app_bind_v1 = function() {
|
|
517
517
|
return "";
|
|
518
518
|
};
|
|
519
519
|
function Jn() {
|
|
520
|
-
return
|
|
520
|
+
return g.app.appList;
|
|
521
521
|
}
|
|
522
522
|
function vn(t) {
|
|
523
|
-
return
|
|
523
|
+
return g.app.appList.find((e) => e.id === t);
|
|
524
524
|
}
|
|
525
525
|
function vi() {
|
|
526
526
|
const t = [];
|
|
@@ -528,18 +528,18 @@ function vi() {
|
|
|
528
528
|
t.push([o, n]);
|
|
529
529
|
}), k(t);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
const e =
|
|
531
|
+
function Je(t) {
|
|
532
|
+
const e = g.app.appList.find((n) => n.id === t);
|
|
533
533
|
return e ? e.pages : [];
|
|
534
534
|
}
|
|
535
|
-
function
|
|
536
|
-
const n =
|
|
535
|
+
function xe(t, e) {
|
|
536
|
+
const n = g.app.appList.find((o) => o.id === t);
|
|
537
537
|
if (n)
|
|
538
538
|
return n.pages.find((o) => o.id === e);
|
|
539
539
|
}
|
|
540
540
|
function Ci(t) {
|
|
541
541
|
const e = [];
|
|
542
|
-
return
|
|
542
|
+
return Je(t).forEach(({ id: o, name: i }) => {
|
|
543
543
|
e.push([i, o]);
|
|
544
544
|
}), k(e);
|
|
545
545
|
}
|
|
@@ -550,11 +550,11 @@ const qn = {
|
|
|
550
550
|
position: 0
|
|
551
551
|
};
|
|
552
552
|
function Qn() {
|
|
553
|
-
const { comps: t } =
|
|
553
|
+
const { comps: t } = g.app.activeApp;
|
|
554
554
|
return [qn, ...t];
|
|
555
555
|
}
|
|
556
556
|
function Cn(t) {
|
|
557
|
-
return t === "" ? qn :
|
|
557
|
+
return t === "" ? qn : g.app.activeApp.comps.find((e) => e.id === t);
|
|
558
558
|
}
|
|
559
559
|
function ki() {
|
|
560
560
|
const { i18n: t } = vt, e = [];
|
|
@@ -575,8 +575,8 @@ function X(t) {
|
|
|
575
575
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
const { properties: e } =
|
|
578
|
+
function qe(t) {
|
|
579
|
+
const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = [], u = Mt(n.type, n.subtype);
|
|
580
580
|
if (!u)
|
|
581
581
|
return c;
|
|
582
582
|
const l = n.nodes.find((d) => d.id === t);
|
|
@@ -624,7 +624,7 @@ function Je(t) {
|
|
|
624
624
|
});
|
|
625
625
|
if (e[_.key] && e[_.key][u])
|
|
626
626
|
for (const { keys: d, names: h, raw: p } of e[_.key][u])
|
|
627
|
-
|
|
627
|
+
ve(d, p) || c.push({
|
|
628
628
|
id: z("elementPropertyChangeEvent", t, d),
|
|
629
629
|
kind: "elementPropertyChangeEvent",
|
|
630
630
|
names: h,
|
|
@@ -680,11 +680,13 @@ function Je(t) {
|
|
|
680
680
|
}
|
|
681
681
|
return c;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
|
|
683
|
+
function Ye(t) {
|
|
684
|
+
if (!t)
|
|
685
|
+
return;
|
|
686
|
+
const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = Mt(n.type, n.subtype);
|
|
685
687
|
if (!c)
|
|
686
688
|
return;
|
|
687
|
-
const { kind: u, nodeId: l, eventKey: _ } =
|
|
689
|
+
const { kind: u, nodeId: l, eventKey: _ } = nn(t), d = n.nodes.find((p) => p.id === l);
|
|
688
690
|
if (!d)
|
|
689
691
|
return;
|
|
690
692
|
const h = tt[d.key];
|
|
@@ -825,13 +827,13 @@ function xe(t) {
|
|
|
825
827
|
}
|
|
826
828
|
}
|
|
827
829
|
function Ni(t) {
|
|
828
|
-
const e = [], n =
|
|
830
|
+
const e = [], n = qe(t);
|
|
829
831
|
for (const { id: o, kind: i, names: a } of n)
|
|
830
832
|
e.push([Ie(i, a), o]);
|
|
831
833
|
return k(e);
|
|
832
834
|
}
|
|
833
835
|
function zn() {
|
|
834
|
-
const { activeObject: t, activeComp: e } =
|
|
836
|
+
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
835
837
|
if (t.type === "comp")
|
|
836
838
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
837
839
|
n.push({
|
|
@@ -843,7 +845,9 @@ function zn() {
|
|
|
843
845
|
return n;
|
|
844
846
|
}
|
|
845
847
|
function kn(t) {
|
|
846
|
-
|
|
848
|
+
if (!t)
|
|
849
|
+
return;
|
|
850
|
+
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } = nn(t);
|
|
847
851
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
848
852
|
const c = n.meta.events.find(
|
|
849
853
|
(u) => u.id === a
|
|
@@ -875,8 +879,8 @@ function Rt(t) {
|
|
|
875
879
|
e.push({ key: n, name: o, type: i });
|
|
876
880
|
return e;
|
|
877
881
|
}
|
|
878
|
-
function
|
|
879
|
-
const { activeObject: e, depends: n } =
|
|
882
|
+
function Qe(t) {
|
|
883
|
+
const { activeObject: e, depends: n } = g.app, o = [], i = e.nodes.find((c) => c.id === t);
|
|
880
884
|
if (!i)
|
|
881
885
|
return o;
|
|
882
886
|
const a = tt[i.key];
|
|
@@ -916,8 +920,10 @@ function qe(t) {
|
|
|
916
920
|
}
|
|
917
921
|
return K(a.key) && e.type, o;
|
|
918
922
|
}
|
|
919
|
-
function
|
|
920
|
-
|
|
923
|
+
function Fe(t) {
|
|
924
|
+
if (!t)
|
|
925
|
+
return;
|
|
926
|
+
const { activeObject: e, depends: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t), c = e.nodes.find((l) => l.id === i);
|
|
921
927
|
if (!c)
|
|
922
928
|
return;
|
|
923
929
|
const u = tt[c.key];
|
|
@@ -970,13 +976,13 @@ function Ye(t) {
|
|
|
970
976
|
}
|
|
971
977
|
}
|
|
972
978
|
function Si(t) {
|
|
973
|
-
const e = [], n =
|
|
979
|
+
const e = [], n = Qe(t);
|
|
974
980
|
for (const { id: o, kind: i, names: a } of n)
|
|
975
981
|
e.push([on(i, a), o]);
|
|
976
982
|
return k(e);
|
|
977
983
|
}
|
|
978
984
|
function cn() {
|
|
979
|
-
const { activeObject: t, activeComp: e } =
|
|
985
|
+
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
980
986
|
if (t.type === "comp")
|
|
981
987
|
for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
|
|
982
988
|
n.push({
|
|
@@ -989,7 +995,9 @@ function cn() {
|
|
|
989
995
|
return n;
|
|
990
996
|
}
|
|
991
997
|
function Dt(t) {
|
|
992
|
-
|
|
998
|
+
if (!t)
|
|
999
|
+
return;
|
|
1000
|
+
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t);
|
|
993
1001
|
if (o === "customMethod" && i === "globality" && e.type === "comp") {
|
|
994
1002
|
const c = n.meta.methods.find(
|
|
995
1003
|
(u) => u.id === a
|
|
@@ -1010,23 +1018,23 @@ function Zn() {
|
|
|
1010
1018
|
t.push([on(o, i), n]);
|
|
1011
1019
|
return k(t);
|
|
1012
1020
|
}
|
|
1013
|
-
function
|
|
1021
|
+
function ze(t) {
|
|
1014
1022
|
const e = Dt(t);
|
|
1015
1023
|
return e ? e.outputs : [];
|
|
1016
1024
|
}
|
|
1017
|
-
function
|
|
1025
|
+
function we(t, e) {
|
|
1018
1026
|
const n = Dt(t);
|
|
1019
1027
|
if (n)
|
|
1020
1028
|
return n.outputs.find((o) => o.key === e);
|
|
1021
1029
|
}
|
|
1022
1030
|
function Bi(t) {
|
|
1023
|
-
const e = [], n =
|
|
1031
|
+
const e = [], n = ze(t);
|
|
1024
1032
|
for (const { name: o, key: i } of n)
|
|
1025
1033
|
e.push([o, i]);
|
|
1026
1034
|
return k(e);
|
|
1027
1035
|
}
|
|
1028
1036
|
function bi(t, e, n) {
|
|
1029
|
-
const { properties: o } =
|
|
1037
|
+
const { properties: o } = g.runtime, { activeObject: i, activePage: a, activeComp: c, depends: u } = g.app;
|
|
1030
1038
|
if (t.events.length > 0)
|
|
1031
1039
|
return !1;
|
|
1032
1040
|
if (q(t.key) && n) {
|
|
@@ -1041,7 +1049,7 @@ function bi(t, e, n) {
|
|
|
1041
1049
|
}
|
|
1042
1050
|
if (o[t.key] && o[t.key][e]) {
|
|
1043
1051
|
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
1044
|
-
if (!
|
|
1052
|
+
if (!ve(l, _))
|
|
1045
1053
|
return !1;
|
|
1046
1054
|
}
|
|
1047
1055
|
if (K(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
@@ -1056,7 +1064,7 @@ function bi(t, e, n) {
|
|
|
1056
1064
|
return !0;
|
|
1057
1065
|
}
|
|
1058
1066
|
function Pi(t, e) {
|
|
1059
|
-
const { activeObject: n, depends: o } =
|
|
1067
|
+
const { activeObject: n, depends: o } = g.app;
|
|
1060
1068
|
if (t.methods.length > 0)
|
|
1061
1069
|
return !1;
|
|
1062
1070
|
if (q(t.key) && e) {
|
|
@@ -1072,7 +1080,7 @@ function Pi(t, e) {
|
|
|
1072
1080
|
return K(t.key) && n.type, !0;
|
|
1073
1081
|
}
|
|
1074
1082
|
function Ri(t, e, n) {
|
|
1075
|
-
const { properties: o } =
|
|
1083
|
+
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
1076
1084
|
if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
|
|
1077
1085
|
return !1;
|
|
1078
1086
|
if (q(t.key) && n) {
|
|
@@ -1088,10 +1096,10 @@ function Ri(t, e, n) {
|
|
|
1088
1096
|
return !(K(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1089
1097
|
}
|
|
1090
1098
|
function Di(t, e, n) {
|
|
1091
|
-
const { properties: o } =
|
|
1099
|
+
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
1092
1100
|
if (o[t.key] && o[t.key][e]) {
|
|
1093
1101
|
for (const { keys: u, raw: l } of o[t.key][e])
|
|
1094
|
-
if (!
|
|
1102
|
+
if (!ve(u, l))
|
|
1095
1103
|
return !1;
|
|
1096
1104
|
}
|
|
1097
1105
|
if (q(t.key) && n) {
|
|
@@ -1110,7 +1118,7 @@ function to(t, e, n, o) {
|
|
|
1110
1118
|
return t ? t === "onEvent" ? bi(e, n, o) : t === "callMethod" ? Pi(e, o) : t === "getProperty" ? Ri(e, n, o) : t === "setProperty" ? Di(e, n, o) : !1 : !1;
|
|
1111
1119
|
}
|
|
1112
1120
|
function j(t) {
|
|
1113
|
-
const { activeObject: e } =
|
|
1121
|
+
const { activeObject: e } = g.app, n = Mt(e.type, e.subtype);
|
|
1114
1122
|
if (!n)
|
|
1115
1123
|
return !1;
|
|
1116
1124
|
for (const o of e.nodes) {
|
|
@@ -1125,7 +1133,7 @@ function j(t) {
|
|
|
1125
1133
|
return !1;
|
|
1126
1134
|
}
|
|
1127
1135
|
function Jt(t) {
|
|
1128
|
-
const { activeObject: e } =
|
|
1136
|
+
const { activeObject: e } = g.app, n = [], o = Mt(e.type, e.subtype);
|
|
1129
1137
|
if (!o)
|
|
1130
1138
|
return n;
|
|
1131
1139
|
for (const i of e.nodes) {
|
|
@@ -1144,7 +1152,7 @@ function Jt(t) {
|
|
|
1144
1152
|
return n;
|
|
1145
1153
|
}
|
|
1146
1154
|
function ft(t) {
|
|
1147
|
-
const { activeObject: e } =
|
|
1155
|
+
const { activeObject: e } = g.app, n = e.nodes.find((i) => i.id === t);
|
|
1148
1156
|
if (!n)
|
|
1149
1157
|
return;
|
|
1150
1158
|
const o = tt[n.key];
|
|
@@ -1159,7 +1167,7 @@ function ft(t) {
|
|
|
1159
1167
|
alias: n.alias
|
|
1160
1168
|
};
|
|
1161
1169
|
}
|
|
1162
|
-
function
|
|
1170
|
+
function Ce(t) {
|
|
1163
1171
|
const { i18n: e } = vt, n = [], o = Jt(t);
|
|
1164
1172
|
for (const { id: i, name: a, alias: c } of o) {
|
|
1165
1173
|
let u = e.global.t(a);
|
|
@@ -1167,8 +1175,8 @@ function ve(t) {
|
|
|
1167
1175
|
}
|
|
1168
1176
|
return k(n);
|
|
1169
1177
|
}
|
|
1170
|
-
function
|
|
1171
|
-
const { properties: n } =
|
|
1178
|
+
function Ht(t, e) {
|
|
1179
|
+
const { properties: n } = g.runtime, { activeObject: o, activeComp: i, depends: a } = g.app, c = [], u = Mt(o.type, o.subtype);
|
|
1172
1180
|
if (!u)
|
|
1173
1181
|
return c;
|
|
1174
1182
|
const l = o.nodes.find((d) => d.id === t);
|
|
@@ -1179,7 +1187,7 @@ function $t(t, e) {
|
|
|
1179
1187
|
return console.assert(!1, "invalid element", l.key), c;
|
|
1180
1188
|
if (n[_.key] && n[_.key][u])
|
|
1181
1189
|
for (const { keys: d, names: h, raw: p } of n[_.key][u])
|
|
1182
|
-
e === "write" &&
|
|
1190
|
+
e === "write" && ve(d, p) || c.push({
|
|
1183
1191
|
id: Zt("elementProperty", t, d),
|
|
1184
1192
|
kind: "elementProperty",
|
|
1185
1193
|
names: h,
|
|
@@ -1227,7 +1235,9 @@ function $t(t, e) {
|
|
|
1227
1235
|
return c;
|
|
1228
1236
|
}
|
|
1229
1237
|
function yt(t) {
|
|
1230
|
-
|
|
1238
|
+
if (!t)
|
|
1239
|
+
return;
|
|
1240
|
+
const { properties: e } = g.runtime, { activeObject: n, activeComp: o, depends: i } = g.app, a = Mt(n.type, n.subtype);
|
|
1231
1241
|
if (!a)
|
|
1232
1242
|
return;
|
|
1233
1243
|
const { kind: c, nodeId: u, propertyKey: l } = Jo(t), _ = n.nodes.find((h) => h.id === u);
|
|
@@ -1306,17 +1316,17 @@ function yt(t) {
|
|
|
1306
1316
|
}
|
|
1307
1317
|
}
|
|
1308
1318
|
function eo(t, e) {
|
|
1309
|
-
const n = [], o =
|
|
1319
|
+
const n = [], o = Ht(t, e);
|
|
1310
1320
|
for (const { id: i, kind: a, names: c } of o)
|
|
1311
1321
|
n.push([wn(a, c), i]);
|
|
1312
1322
|
return k(n);
|
|
1313
1323
|
}
|
|
1314
1324
|
function rn() {
|
|
1315
|
-
const { activeObject: t, activePage: e, activeComp: n } =
|
|
1325
|
+
const { activeObject: t, activePage: e, activeComp: n } = g.app;
|
|
1316
1326
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1317
1327
|
}
|
|
1318
1328
|
function ue(t) {
|
|
1319
|
-
const { activeObject: e, activePage: n, activeComp: o } =
|
|
1329
|
+
const { activeObject: e, activePage: n, activeComp: o } = g.app;
|
|
1320
1330
|
if (e.type === "page")
|
|
1321
1331
|
return n.meta.states.find((i) => i.id === t);
|
|
1322
1332
|
if (e.type === "comp")
|
|
@@ -1353,7 +1363,7 @@ const Mi = {
|
|
|
1353
1363
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1354
1364
|
const e = this.getField("NODE");
|
|
1355
1365
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1356
|
-
const n =
|
|
1366
|
+
const n = qe(this.node.id)?.[0];
|
|
1357
1367
|
if (!n)
|
|
1358
1368
|
return;
|
|
1359
1369
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
@@ -1372,7 +1382,7 @@ const Mi = {
|
|
|
1372
1382
|
}, 0);
|
|
1373
1383
|
},
|
|
1374
1384
|
genNodeOpts_: function() {
|
|
1375
|
-
return
|
|
1385
|
+
return Ce("onEvent");
|
|
1376
1386
|
},
|
|
1377
1387
|
genEventOpts_: function() {
|
|
1378
1388
|
return Ni(this.node.id);
|
|
@@ -1396,14 +1406,14 @@ const Mi = {
|
|
|
1396
1406
|
const n = this.node.key !== e.key;
|
|
1397
1407
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1398
1408
|
const o = this.getField("EVENT");
|
|
1399
|
-
if (o.getOptions(!1), n || !
|
|
1400
|
-
const i =
|
|
1409
|
+
if (o.getOptions(!1), n || !Ye(this.event.id)) {
|
|
1410
|
+
const i = qe(this.node.id)?.[0];
|
|
1401
1411
|
o.setValue(i?.id ?? "");
|
|
1402
1412
|
}
|
|
1403
1413
|
this.onEventChange_(o.getValue());
|
|
1404
1414
|
},
|
|
1405
1415
|
onEventChange_: function(t) {
|
|
1406
|
-
const e =
|
|
1416
|
+
const e = Ye(t);
|
|
1407
1417
|
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1408
1418
|
this.ensureBlocks_();
|
|
1409
1419
|
}, 0);
|
|
@@ -1415,7 +1425,7 @@ const Mi = {
|
|
|
1415
1425
|
}
|
|
1416
1426
|
for (let e = 0; e < this.event.params.length; e++)
|
|
1417
1427
|
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1418
|
-
const { kind: t } =
|
|
1428
|
+
const { kind: t } = nn(this.event.id);
|
|
1419
1429
|
if (t === "multipleRefEvent")
|
|
1420
1430
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1421
1431
|
else if (this.getInput("REF_KEY")) {
|
|
@@ -1444,7 +1454,7 @@ const Mi = {
|
|
|
1444
1454
|
return;
|
|
1445
1455
|
}
|
|
1446
1456
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1447
|
-
const e =
|
|
1457
|
+
const e = Ye(this.event.id);
|
|
1448
1458
|
if (!e) {
|
|
1449
1459
|
this.setWarningText(f("WARN_EVENT_NOT_FOUND"));
|
|
1450
1460
|
return;
|
|
@@ -1460,7 +1470,7 @@ const Mi = {
|
|
|
1460
1470
|
this.setWarningText(null);
|
|
1461
1471
|
}
|
|
1462
1472
|
};
|
|
1463
|
-
|
|
1473
|
+
E.on_app_event_v1 = Mi;
|
|
1464
1474
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
1465
1475
|
const e = s.quote_, n = t, o = n.event.id;
|
|
1466
1476
|
let i = "";
|
|
@@ -1561,7 +1571,7 @@ const Ui = {
|
|
|
1561
1571
|
this.setWarningText(null);
|
|
1562
1572
|
}
|
|
1563
1573
|
};
|
|
1564
|
-
|
|
1574
|
+
E.trigger_app_event_v1 = Ui;
|
|
1565
1575
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1566
1576
|
const e = s.quote_, n = t;
|
|
1567
1577
|
let o = "";
|
|
@@ -1650,7 +1660,7 @@ const Vi = {
|
|
|
1650
1660
|
]);
|
|
1651
1661
|
}
|
|
1652
1662
|
};
|
|
1653
|
-
|
|
1663
|
+
E.open_confirm_dlg_v1 = Vi;
|
|
1654
1664
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1655
1665
|
const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "TEXT", r.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1656
1666
|
return `{
|
|
@@ -1689,7 +1699,7 @@ const xi = {
|
|
|
1689
1699
|
]);
|
|
1690
1700
|
}
|
|
1691
1701
|
};
|
|
1692
|
-
|
|
1702
|
+
E.open_prompt_dlg_v1 = xi;
|
|
1693
1703
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1694
1704
|
const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "LABEL", r.ATOMIC), o = s.valueToCode(t, "VALUE", r.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1695
1705
|
return `{
|
|
@@ -1755,7 +1765,7 @@ const Yi = {
|
|
|
1755
1765
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1756
1766
|
const e = this.getField("NODE");
|
|
1757
1767
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1758
|
-
const n =
|
|
1768
|
+
const n = Qe(this.node.id)?.[0];
|
|
1759
1769
|
if (!n)
|
|
1760
1770
|
return;
|
|
1761
1771
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -1774,7 +1784,7 @@ const Yi = {
|
|
|
1774
1784
|
}, 0);
|
|
1775
1785
|
},
|
|
1776
1786
|
genNodeOpts_: function() {
|
|
1777
|
-
return
|
|
1787
|
+
return Ce("callMethod");
|
|
1778
1788
|
},
|
|
1779
1789
|
genMethodOpts_: function() {
|
|
1780
1790
|
return Si(this.node.id);
|
|
@@ -1798,14 +1808,14 @@ const Yi = {
|
|
|
1798
1808
|
const n = this.node.key !== e.key;
|
|
1799
1809
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1800
1810
|
const o = this.getField("METHOD");
|
|
1801
|
-
if (o.getOptions(!1), n || !
|
|
1802
|
-
const i =
|
|
1811
|
+
if (o.getOptions(!1), n || !Fe(this.method.id)) {
|
|
1812
|
+
const i = Qe(this.node.id)?.[0];
|
|
1803
1813
|
o.setValue(i?.id ?? "");
|
|
1804
1814
|
}
|
|
1805
1815
|
this.onMethodChange_(o.getValue());
|
|
1806
1816
|
},
|
|
1807
1817
|
onMethodChange_: function(t) {
|
|
1808
|
-
const e =
|
|
1818
|
+
const e = Fe(t);
|
|
1809
1819
|
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1810
1820
|
this.ensureBlocks_();
|
|
1811
1821
|
}, 0);
|
|
@@ -1848,7 +1858,7 @@ const Yi = {
|
|
|
1848
1858
|
ensureBlocks_: function() {
|
|
1849
1859
|
if (this.isInsertionMarker())
|
|
1850
1860
|
return;
|
|
1851
|
-
const { kind: t } =
|
|
1861
|
+
const { kind: t } = Oe(this.method.id), e = Kn(t), n = [];
|
|
1852
1862
|
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1853
1863
|
const { key: i, name: a } = this.method.outputs[o];
|
|
1854
1864
|
n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
|
|
@@ -1866,7 +1876,7 @@ const Yi = {
|
|
|
1866
1876
|
return;
|
|
1867
1877
|
}
|
|
1868
1878
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1869
|
-
const e =
|
|
1879
|
+
const e = Fe(this.method.id);
|
|
1870
1880
|
if (!e) {
|
|
1871
1881
|
this.setWarningText(f("WARN_METHOD_NOT_FOUND"));
|
|
1872
1882
|
return;
|
|
@@ -1886,7 +1896,7 @@ const Yi = {
|
|
|
1886
1896
|
this.setWarningText(null);
|
|
1887
1897
|
}
|
|
1888
1898
|
};
|
|
1889
|
-
|
|
1899
|
+
E.call_app_method_v1 = Yi;
|
|
1890
1900
|
s.forBlock.call_app_method_v1 = function(t) {
|
|
1891
1901
|
const e = s.quote_, n = t;
|
|
1892
1902
|
if (n.method.outputs.length > 0) {
|
|
@@ -1983,11 +1993,12 @@ const Fi = {
|
|
|
1983
1993
|
this.setWarningText(null);
|
|
1984
1994
|
}
|
|
1985
1995
|
};
|
|
1986
|
-
|
|
1996
|
+
E.impl_app_method_v1 = Fi;
|
|
1987
1997
|
s.forBlock.impl_app_method_v1 = function(t) {
|
|
1988
|
-
const e = t;
|
|
1989
|
-
return `{
|
|
1990
|
-
|
|
1998
|
+
const e = t, { methodKey: n } = Oe(e.method.id), o = s.statementToCode(e, "HANDLE");
|
|
1999
|
+
return `function __implMethod$${n}__() {
|
|
2000
|
+
var __outputs__ = {};
|
|
2001
|
+
${o}}
|
|
1991
2002
|
`;
|
|
1992
2003
|
};
|
|
1993
2004
|
const wi = {
|
|
@@ -2006,7 +2017,7 @@ const wi = {
|
|
|
2006
2017
|
).appendField(
|
|
2007
2018
|
new O(() => this.genOutputOpts_()),
|
|
2008
2019
|
"OUTPUT"
|
|
2009
|
-
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_HELPURL}"), this.initData_();
|
|
2020
|
+
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_HELPURL}"), this.initData_(), this.updateShape_(), this.updateShadows_();
|
|
2010
2021
|
},
|
|
2011
2022
|
initData_: function() {
|
|
2012
2023
|
if (this.method.id)
|
|
@@ -2017,7 +2028,7 @@ const wi = {
|
|
|
2017
2028
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
2018
2029
|
const e = this.getField("METHOD");
|
|
2019
2030
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
2020
|
-
const n =
|
|
2031
|
+
const n = ze(this.method.id)?.[0];
|
|
2021
2032
|
if (!n)
|
|
2022
2033
|
return;
|
|
2023
2034
|
this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -2026,11 +2037,12 @@ const wi = {
|
|
|
2026
2037
|
},
|
|
2027
2038
|
saveExtraState: function() {
|
|
2028
2039
|
return {
|
|
2040
|
+
method: this.method,
|
|
2029
2041
|
output: this.output
|
|
2030
2042
|
};
|
|
2031
2043
|
},
|
|
2032
2044
|
loadExtraState: function(t) {
|
|
2033
|
-
this.method.id = t.method?.
|
|
2045
|
+
this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.output.key = t.output?.key ?? "", this.output.name = t.output?.name ?? "", this.output.type = t.output?.type ?? "", this.updateShape_(), this.updateShadows_(), setTimeout(() => {
|
|
2034
2046
|
this.checkWarning_();
|
|
2035
2047
|
}, 0);
|
|
2036
2048
|
},
|
|
@@ -2059,14 +2071,14 @@ const wi = {
|
|
|
2059
2071
|
const n = this.method.id !== e.id;
|
|
2060
2072
|
this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
|
|
2061
2073
|
const o = this.getField("OUTPUT");
|
|
2062
|
-
if (o.getOptions(!1), n || !
|
|
2063
|
-
const i =
|
|
2074
|
+
if (o.getOptions(!1), n || !we(this.method.id, this.output.key)) {
|
|
2075
|
+
const i = ze(this.method.id)?.[0];
|
|
2064
2076
|
o.setValue(i?.key ?? "");
|
|
2065
2077
|
}
|
|
2066
2078
|
this.onOutputChange_(o.getValue());
|
|
2067
2079
|
},
|
|
2068
2080
|
onOutputChange_: function(t) {
|
|
2069
|
-
const e =
|
|
2081
|
+
const e = we(this.method.id, t);
|
|
2070
2082
|
e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
|
|
2071
2083
|
},
|
|
2072
2084
|
updateShape_: function() {
|
|
@@ -2094,7 +2106,7 @@ const wi = {
|
|
|
2094
2106
|
return;
|
|
2095
2107
|
}
|
|
2096
2108
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
2097
|
-
const e =
|
|
2109
|
+
const e = we(this.method.id, this.output.key);
|
|
2098
2110
|
if (!e) {
|
|
2099
2111
|
this.setWarningText(f("WARN_OUTPUT_NOT_FOUND"));
|
|
2100
2112
|
return;
|
|
@@ -2106,7 +2118,7 @@ const wi = {
|
|
|
2106
2118
|
this.setWarningText(null);
|
|
2107
2119
|
}
|
|
2108
2120
|
};
|
|
2109
|
-
|
|
2121
|
+
E.set_app_method_output_v1 = wi;
|
|
2110
2122
|
s.forBlock.set_app_method_output_v1 = function(t) {
|
|
2111
2123
|
const e = s.quote_, n = t;
|
|
2112
2124
|
let o = s.valueToCode(n, "VALUE", r.ATOMIC);
|
|
@@ -2130,7 +2142,7 @@ s.forBlock.set_app_method_output_v1 = function(t) {
|
|
|
2130
2142
|
default:
|
|
2131
2143
|
o = "null";
|
|
2132
2144
|
}
|
|
2133
|
-
return `
|
|
2145
|
+
return `__outputs__[${e(n.output.key)}] = ${o};
|
|
2134
2146
|
`;
|
|
2135
2147
|
};
|
|
2136
2148
|
T([
|
|
@@ -2175,7 +2187,7 @@ const Ki = {
|
|
|
2175
2187
|
this.app.id = t.id, this.app.name = t.name;
|
|
2176
2188
|
const e = this.getField("APP");
|
|
2177
2189
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
2178
|
-
const n =
|
|
2190
|
+
const n = Je(this.app.id)?.[0];
|
|
2179
2191
|
if (!n)
|
|
2180
2192
|
return;
|
|
2181
2193
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -2218,13 +2230,13 @@ const Ki = {
|
|
|
2218
2230
|
const n = this.app.id !== e.id;
|
|
2219
2231
|
this.app.id = e.id, this.app.name = e.name;
|
|
2220
2232
|
const o = this.getField("PAGE");
|
|
2221
|
-
if (o.getOptions(!1), n || !
|
|
2222
|
-
const a =
|
|
2233
|
+
if (o.getOptions(!1), n || !xe(this.app.id, this.page.id)) {
|
|
2234
|
+
const a = Je(this.app.id)?.[0]?.id ?? "";
|
|
2223
2235
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
2224
2236
|
}
|
|
2225
2237
|
},
|
|
2226
2238
|
onPageChange_: function(t) {
|
|
2227
|
-
const e =
|
|
2239
|
+
const e = xe(this.app.id, t);
|
|
2228
2240
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2229
2241
|
},
|
|
2230
2242
|
checkWarning_: function() {
|
|
@@ -2234,7 +2246,7 @@ const Ki = {
|
|
|
2234
2246
|
return;
|
|
2235
2247
|
}
|
|
2236
2248
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
2237
|
-
const e =
|
|
2249
|
+
const e = xe(this.app.id, this.page.id);
|
|
2238
2250
|
if (!e) {
|
|
2239
2251
|
this.setWarningText(f("WARN_PAGE_NOT_FOUND"));
|
|
2240
2252
|
return;
|
|
@@ -2242,13 +2254,13 @@ const Ki = {
|
|
|
2242
2254
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
2243
2255
|
}
|
|
2244
2256
|
};
|
|
2245
|
-
|
|
2257
|
+
E.navigate_to_v1 = Ki;
|
|
2246
2258
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
2247
2259
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
2248
2260
|
return `__navigateToV1__(${n}, ${o});
|
|
2249
2261
|
`;
|
|
2250
2262
|
};
|
|
2251
|
-
const
|
|
2263
|
+
const $i = {
|
|
2252
2264
|
init: function() {
|
|
2253
2265
|
this.comp = {
|
|
2254
2266
|
id: void 0,
|
|
@@ -2308,12 +2320,12 @@ const Hi = {
|
|
|
2308
2320
|
this.setWarningText(null);
|
|
2309
2321
|
}
|
|
2310
2322
|
};
|
|
2311
|
-
|
|
2323
|
+
E.select_comp_v1 = $i;
|
|
2312
2324
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2313
2325
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2314
2326
|
return [e(o), r.ATOMIC];
|
|
2315
2327
|
};
|
|
2316
|
-
const
|
|
2328
|
+
const Hi = {
|
|
2317
2329
|
init: function() {
|
|
2318
2330
|
this.node = {
|
|
2319
2331
|
id: "",
|
|
@@ -2337,7 +2349,7 @@ const $i = {
|
|
|
2337
2349
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2338
2350
|
const e = this.getField("NODE");
|
|
2339
2351
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2340
|
-
const n =
|
|
2352
|
+
const n = Ht(this.node.id, "read")?.[0];
|
|
2341
2353
|
if (!n)
|
|
2342
2354
|
return;
|
|
2343
2355
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2356,7 +2368,7 @@ const $i = {
|
|
|
2356
2368
|
}, 0);
|
|
2357
2369
|
},
|
|
2358
2370
|
genNodeOpts_: function() {
|
|
2359
|
-
return
|
|
2371
|
+
return Ce("getProperty");
|
|
2360
2372
|
},
|
|
2361
2373
|
genPropertyOpts_: function() {
|
|
2362
2374
|
return eo(this.node.id, "read");
|
|
@@ -2381,7 +2393,7 @@ const $i = {
|
|
|
2381
2393
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2382
2394
|
const o = this.getField("PROPERTY");
|
|
2383
2395
|
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2384
|
-
const i =
|
|
2396
|
+
const i = Ht(this.node.id, "read")?.[0];
|
|
2385
2397
|
o.setValue(i?.id ?? "");
|
|
2386
2398
|
}
|
|
2387
2399
|
this.onPropChange_(o.getValue());
|
|
@@ -2413,10 +2425,10 @@ const $i = {
|
|
|
2413
2425
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2414
2426
|
}
|
|
2415
2427
|
};
|
|
2416
|
-
|
|
2428
|
+
E.get_app_property_v1 = Hi;
|
|
2417
2429
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
2418
2430
|
const e = s.quote_;
|
|
2419
|
-
return [`__getPropertyV1__(${e(t.property.id)})`, r.ATOMIC];
|
|
2431
|
+
return [`__getPropertyV1__(${e(t.property.id)}, ${e("")})`, r.ATOMIC];
|
|
2420
2432
|
};
|
|
2421
2433
|
const Gi = {
|
|
2422
2434
|
init: function() {
|
|
@@ -2442,7 +2454,7 @@ const Gi = {
|
|
|
2442
2454
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2443
2455
|
const e = this.getField("NODE");
|
|
2444
2456
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2445
|
-
const n =
|
|
2457
|
+
const n = Ht(this.node.id, "write")?.[0];
|
|
2446
2458
|
if (!n)
|
|
2447
2459
|
return;
|
|
2448
2460
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2461,7 +2473,7 @@ const Gi = {
|
|
|
2461
2473
|
}, 0);
|
|
2462
2474
|
},
|
|
2463
2475
|
genNodeOpts_: function() {
|
|
2464
|
-
return
|
|
2476
|
+
return Ce("setProperty");
|
|
2465
2477
|
},
|
|
2466
2478
|
genPropertyOpts_: function() {
|
|
2467
2479
|
return eo(this.node.id, "write");
|
|
@@ -2486,7 +2498,7 @@ const Gi = {
|
|
|
2486
2498
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2487
2499
|
const o = this.getField("PROPERTY");
|
|
2488
2500
|
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2489
|
-
const i =
|
|
2501
|
+
const i = Ht(this.node.id, "write")?.[0];
|
|
2490
2502
|
o.setValue(i?.id ?? "");
|
|
2491
2503
|
}
|
|
2492
2504
|
this.onPropChange_(o.getValue());
|
|
@@ -2534,10 +2546,10 @@ const Gi = {
|
|
|
2534
2546
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2535
2547
|
}
|
|
2536
2548
|
};
|
|
2537
|
-
|
|
2549
|
+
E.set_app_property_v1 = Gi;
|
|
2538
2550
|
s.forBlock.set_app_property_v1 = function(t) {
|
|
2539
|
-
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", r.NONE);
|
|
2540
|
-
return `__setPropertyV1__(${e(n.property.id)}, ${o});
|
|
2551
|
+
const e = s.quote_, n = t, o = "", i = s.valueToCode(n, "VALUE", r.NONE);
|
|
2552
|
+
return `__setPropertyV1__(${e(n.property.id)}, ${e(o)}, ${i});
|
|
2541
2553
|
`;
|
|
2542
2554
|
};
|
|
2543
2555
|
const Wi = {
|
|
@@ -2599,7 +2611,7 @@ const Wi = {
|
|
|
2599
2611
|
this.setWarningText(null);
|
|
2600
2612
|
}
|
|
2601
2613
|
};
|
|
2602
|
-
|
|
2614
|
+
E.get_app_state_v1 = Wi;
|
|
2603
2615
|
s.forBlock.get_app_state_v1 = function(t) {
|
|
2604
2616
|
const e = s.quote_;
|
|
2605
2617
|
return [`__getStateV1__(${e(t.state.id)})`, r.ATOMIC];
|
|
@@ -2668,7 +2680,7 @@ const ji = {
|
|
|
2668
2680
|
this.setWarningText(null);
|
|
2669
2681
|
}
|
|
2670
2682
|
};
|
|
2671
|
-
|
|
2683
|
+
E.set_app_state_v1 = ji;
|
|
2672
2684
|
s.forBlock.set_app_state_v1 = function(t) {
|
|
2673
2685
|
const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", r.NONE);
|
|
2674
2686
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -3506,7 +3518,7 @@ const Qi = {
|
|
|
3506
3518
|
this.setFieldValue(this.name, "LABEL");
|
|
3507
3519
|
}
|
|
3508
3520
|
};
|
|
3509
|
-
|
|
3521
|
+
E.parameter_v1 = Qi;
|
|
3510
3522
|
s.forBlock.parameter_v1 = function(t) {
|
|
3511
3523
|
return [t.key, r.ATOMIC];
|
|
3512
3524
|
};
|
|
@@ -3514,17 +3526,17 @@ const zi = {
|
|
|
3514
3526
|
init: function() {
|
|
3515
3527
|
}
|
|
3516
3528
|
};
|
|
3517
|
-
|
|
3529
|
+
E.on_flow_state_event_v1 = zi;
|
|
3518
3530
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3519
3531
|
return `__onFlowStateEventV1__();
|
|
3520
3532
|
`;
|
|
3521
3533
|
};
|
|
3522
3534
|
function Gt(t) {
|
|
3523
|
-
const e =
|
|
3535
|
+
const e = g.compute.spaces.find((n) => n.id === t);
|
|
3524
3536
|
return e ? e.funcs : [];
|
|
3525
3537
|
}
|
|
3526
3538
|
function Bt(t, e) {
|
|
3527
|
-
const n =
|
|
3539
|
+
const n = g.compute.spaces.find((o) => o.id === t);
|
|
3528
3540
|
if (n)
|
|
3529
3541
|
return n.funcs.find((o) => o.id === e);
|
|
3530
3542
|
}
|
|
@@ -3534,27 +3546,27 @@ function oo(t) {
|
|
|
3534
3546
|
e.push([i, o]);
|
|
3535
3547
|
}), k(e);
|
|
3536
3548
|
}
|
|
3537
|
-
function
|
|
3538
|
-
return
|
|
3549
|
+
function Ze() {
|
|
3550
|
+
return g.compute.activeFunc;
|
|
3539
3551
|
}
|
|
3540
3552
|
function Nn(t) {
|
|
3541
|
-
const { outputs: e } =
|
|
3553
|
+
const { outputs: e } = g.compute.activeFunc;
|
|
3542
3554
|
return e.find((n) => n.id === t);
|
|
3543
3555
|
}
|
|
3544
3556
|
function Zi() {
|
|
3545
|
-
const t = [], { outputs: e } =
|
|
3557
|
+
const t = [], { outputs: e } = g.compute.activeFunc;
|
|
3546
3558
|
return e.forEach(({ id: n, name: o }) => {
|
|
3547
3559
|
t.push([o, n]);
|
|
3548
3560
|
}), k(t);
|
|
3549
3561
|
}
|
|
3550
3562
|
function qt(t) {
|
|
3551
3563
|
const e = [];
|
|
3552
|
-
return
|
|
3564
|
+
return g.compute.spaces.forEach((n) => {
|
|
3553
3565
|
t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
|
|
3554
3566
|
}), e;
|
|
3555
3567
|
}
|
|
3556
3568
|
function le(t) {
|
|
3557
|
-
return
|
|
3569
|
+
return g.compute.spaces.find((e) => e.id === t);
|
|
3558
3570
|
}
|
|
3559
3571
|
function io(t) {
|
|
3560
3572
|
const e = [];
|
|
@@ -3709,7 +3721,7 @@ const ts = {
|
|
|
3709
3721
|
this.setWarningText(null);
|
|
3710
3722
|
}
|
|
3711
3723
|
};
|
|
3712
|
-
|
|
3724
|
+
E.call_func_v1 = ts;
|
|
3713
3725
|
s.forBlock.call_func_v1 = function(t) {
|
|
3714
3726
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3715
3727
|
let c = "";
|
|
@@ -3883,7 +3895,7 @@ const es = {
|
|
|
3883
3895
|
this.setWarningText(null);
|
|
3884
3896
|
}
|
|
3885
3897
|
};
|
|
3886
|
-
|
|
3898
|
+
E.call_func_internal_v1 = es;
|
|
3887
3899
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3888
3900
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3889
3901
|
let c = `${e}var __inputs__ = {
|
|
@@ -3923,7 +3935,7 @@ const ns = {
|
|
|
3923
3935
|
initData_: function() {
|
|
3924
3936
|
if (this.func.id)
|
|
3925
3937
|
return;
|
|
3926
|
-
const { id: t, inputs: e } =
|
|
3938
|
+
const { id: t, inputs: e } = Ze();
|
|
3927
3939
|
this.func.id = t, this.func.inputs = e;
|
|
3928
3940
|
},
|
|
3929
3941
|
saveExtraState: function() {
|
|
@@ -3960,7 +3972,7 @@ const ns = {
|
|
|
3960
3972
|
Y(this, t);
|
|
3961
3973
|
},
|
|
3962
3974
|
checkWarning_: function() {
|
|
3963
|
-
const { id: t, inputs: e } =
|
|
3975
|
+
const { id: t, inputs: e } = Ze();
|
|
3964
3976
|
if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
|
|
3965
3977
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3966
3978
|
return;
|
|
@@ -3968,7 +3980,7 @@ const ns = {
|
|
|
3968
3980
|
this.setWarningText(null);
|
|
3969
3981
|
}
|
|
3970
3982
|
};
|
|
3971
|
-
|
|
3983
|
+
E.func_entry_v1 = ns;
|
|
3972
3984
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3973
3985
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3974
3986
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3992,7 +4004,7 @@ const os = {
|
|
|
3992
4004
|
initData_: function() {
|
|
3993
4005
|
if (this.output.id)
|
|
3994
4006
|
return;
|
|
3995
|
-
const t =
|
|
4007
|
+
const t = Ze().outputs?.[0];
|
|
3996
4008
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3997
4009
|
},
|
|
3998
4010
|
saveExtraState: function() {
|
|
@@ -4053,7 +4065,7 @@ const os = {
|
|
|
4053
4065
|
this.setWarningText(null);
|
|
4054
4066
|
}
|
|
4055
4067
|
};
|
|
4056
|
-
|
|
4068
|
+
E.set_func_output_v1 = os;
|
|
4057
4069
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
4058
4070
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
4059
4071
|
let a = s.valueToCode(n, "VALUE", r.ATOMIC);
|
|
@@ -4127,44 +4139,44 @@ s.forBlock.compute_env_is_v1 = function(t) {
|
|
|
4127
4139
|
};
|
|
4128
4140
|
function et() {
|
|
4129
4141
|
const t = [];
|
|
4130
|
-
return
|
|
4142
|
+
return g.data.spaces.forEach((e) => {
|
|
4131
4143
|
e.tables.length > 0 && t.push(e);
|
|
4132
4144
|
}), t;
|
|
4133
4145
|
}
|
|
4134
4146
|
function mt(t) {
|
|
4135
|
-
const { spaces: e } =
|
|
4147
|
+
const { spaces: e } = g.data;
|
|
4136
4148
|
return e.find((n) => n.id === t);
|
|
4137
4149
|
}
|
|
4138
|
-
function
|
|
4150
|
+
function ke() {
|
|
4139
4151
|
const t = [];
|
|
4140
4152
|
return et().forEach(({ id: n, name: o }) => {
|
|
4141
4153
|
t.push([o, n]);
|
|
4142
4154
|
}), k(t);
|
|
4143
4155
|
}
|
|
4144
|
-
function
|
|
4145
|
-
const { spaces: e } =
|
|
4156
|
+
function H(t) {
|
|
4157
|
+
const { spaces: e } = g.data, n = e.find((o) => o.id === t);
|
|
4146
4158
|
return n ? n.tables : [];
|
|
4147
4159
|
}
|
|
4148
4160
|
function J(t, e) {
|
|
4149
|
-
const { spaces: n } =
|
|
4161
|
+
const { spaces: n } = g.data, o = n.find((i) => i.id === t);
|
|
4150
4162
|
if (o)
|
|
4151
4163
|
return o.tables.find((i) => i.id === e);
|
|
4152
4164
|
}
|
|
4153
|
-
function
|
|
4165
|
+
function Ne(t) {
|
|
4154
4166
|
const e = [];
|
|
4155
|
-
return
|
|
4167
|
+
return H(t).forEach(({ id: o, name: i }) => {
|
|
4156
4168
|
e.push([i, o]);
|
|
4157
4169
|
}), k(e);
|
|
4158
4170
|
}
|
|
4159
4171
|
function _e(t, e) {
|
|
4160
|
-
const { spaces: n } =
|
|
4172
|
+
const { spaces: n } = g.data, o = n.find((a) => a.id === t);
|
|
4161
4173
|
if (!o)
|
|
4162
4174
|
return [];
|
|
4163
4175
|
const i = o.tables.find((a) => a.id === e);
|
|
4164
4176
|
return i ? i.columns : [];
|
|
4165
4177
|
}
|
|
4166
|
-
function
|
|
4167
|
-
const { spaces: o } =
|
|
4178
|
+
function Ke(t, e, n) {
|
|
4179
|
+
const { spaces: o } = g.data, i = o.find((c) => c.id === t);
|
|
4168
4180
|
if (!i)
|
|
4169
4181
|
return;
|
|
4170
4182
|
const a = i.tables.find((c) => c.id === e);
|
|
@@ -4184,7 +4196,7 @@ function ss(t) {
|
|
|
4184
4196
|
let n, o;
|
|
4185
4197
|
const i = et()?.[0];
|
|
4186
4198
|
if (i) {
|
|
4187
|
-
const u =
|
|
4199
|
+
const u = H(i.id)?.[0];
|
|
4188
4200
|
if (u) {
|
|
4189
4201
|
n = {
|
|
4190
4202
|
space: {
|
|
@@ -4208,7 +4220,7 @@ function ss(t) {
|
|
|
4208
4220
|
type: "update_column_v1",
|
|
4209
4221
|
extraState: n,
|
|
4210
4222
|
fields: o
|
|
4211
|
-
}, c =
|
|
4223
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4212
4224
|
e.connect(c.outputConnection);
|
|
4213
4225
|
}
|
|
4214
4226
|
function as(t) {
|
|
@@ -4232,7 +4244,7 @@ function as(t) {
|
|
|
4232
4244
|
}
|
|
4233
4245
|
}
|
|
4234
4246
|
}
|
|
4235
|
-
}, o =
|
|
4247
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4236
4248
|
e.connect(o.previousConnection);
|
|
4237
4249
|
}
|
|
4238
4250
|
const cs = {
|
|
@@ -4258,7 +4270,7 @@ const cs = {
|
|
|
4258
4270
|
]), as(this));
|
|
4259
4271
|
}
|
|
4260
4272
|
};
|
|
4261
|
-
|
|
4273
|
+
E.add_data_v1 = cs;
|
|
4262
4274
|
s.forBlock.add_data_v1 = function(t) {
|
|
4263
4275
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
4264
4276
|
return `{
|
|
@@ -4317,7 +4329,7 @@ const rs = {
|
|
|
4317
4329
|
if (!t)
|
|
4318
4330
|
return;
|
|
4319
4331
|
this.space.id = t.id, this.space.name = t.name;
|
|
4320
|
-
const e =
|
|
4332
|
+
const e = H(this.space.id)?.[0];
|
|
4321
4333
|
if (!e)
|
|
4322
4334
|
return;
|
|
4323
4335
|
this.table.id = e.id, this.table.name = e.name;
|
|
@@ -4337,10 +4349,10 @@ const rs = {
|
|
|
4337
4349
|
}, 0);
|
|
4338
4350
|
},
|
|
4339
4351
|
genSpaceOpts_: function() {
|
|
4340
|
-
return
|
|
4352
|
+
return ke();
|
|
4341
4353
|
},
|
|
4342
4354
|
genTableOpts_: function() {
|
|
4343
|
-
return
|
|
4355
|
+
return Ne(this.space.id);
|
|
4344
4356
|
},
|
|
4345
4357
|
genColumnOpts_: function() {
|
|
4346
4358
|
return is(this.space.id, this.table.id);
|
|
@@ -4363,7 +4375,7 @@ const rs = {
|
|
|
4363
4375
|
}
|
|
4364
4376
|
const n = e.id !== this.space.id;
|
|
4365
4377
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4366
|
-
const o =
|
|
4378
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4367
4379
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4368
4380
|
}
|
|
4369
4381
|
},
|
|
@@ -4374,13 +4386,13 @@ const rs = {
|
|
|
4374
4386
|
return;
|
|
4375
4387
|
}
|
|
4376
4388
|
const n = e.id !== this.table.id;
|
|
4377
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4389
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !Ke(this.space.id, this.table.id, this.column.id)) {
|
|
4378
4390
|
const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4379
4391
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4380
4392
|
}
|
|
4381
4393
|
},
|
|
4382
4394
|
onColumnChange_: function(t) {
|
|
4383
|
-
const e =
|
|
4395
|
+
const e = Ke(this.space.id, this.table.id, t);
|
|
4384
4396
|
e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
|
|
4385
4397
|
},
|
|
4386
4398
|
updateShape_: function() {
|
|
@@ -4399,7 +4411,7 @@ const rs = {
|
|
|
4399
4411
|
n && n.dispose();
|
|
4400
4412
|
else if (n)
|
|
4401
4413
|
return;
|
|
4402
|
-
const o =
|
|
4414
|
+
const o = Xe(this.workspace, this.column.type);
|
|
4403
4415
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4404
4416
|
},
|
|
4405
4417
|
updateCheck_: function() {
|
|
@@ -4419,7 +4431,7 @@ const rs = {
|
|
|
4419
4431
|
return;
|
|
4420
4432
|
}
|
|
4421
4433
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4422
|
-
const n =
|
|
4434
|
+
const n = Ke(
|
|
4423
4435
|
this.space.id,
|
|
4424
4436
|
this.table.id,
|
|
4425
4437
|
this.column.id
|
|
@@ -4435,7 +4447,7 @@ const rs = {
|
|
|
4435
4447
|
this.setWarningText(null);
|
|
4436
4448
|
}
|
|
4437
4449
|
};
|
|
4438
|
-
|
|
4450
|
+
E.cond_atomic_v1 = rs;
|
|
4439
4451
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4440
4452
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", r.ATOMIC) || null, c = {
|
|
4441
4453
|
EQ: "=",
|
|
@@ -4452,13 +4464,13 @@ const us = {
|
|
|
4452
4464
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4453
4465
|
}
|
|
4454
4466
|
};
|
|
4455
|
-
|
|
4467
|
+
E.cond_logic_container_v1 = us;
|
|
4456
4468
|
const ls = {
|
|
4457
4469
|
init: function() {
|
|
4458
4470
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4459
4471
|
}
|
|
4460
4472
|
};
|
|
4461
|
-
|
|
4473
|
+
E.cond_logic_item_v1 = ls;
|
|
4462
4474
|
const _s = {
|
|
4463
4475
|
init: function() {
|
|
4464
4476
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
@@ -4533,7 +4545,7 @@ const _s = {
|
|
|
4533
4545
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4534
4546
|
}
|
|
4535
4547
|
};
|
|
4536
|
-
|
|
4548
|
+
E.cond_logic_v1 = _s;
|
|
4537
4549
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4538
4550
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", r.ATOMIC) || null;
|
|
4539
4551
|
i.push(a);
|
|
@@ -4547,7 +4559,7 @@ function ps(t) {
|
|
|
4547
4559
|
const e = t.getInput("TABLE").connection;
|
|
4548
4560
|
if (e.targetBlock())
|
|
4549
4561
|
return;
|
|
4550
|
-
const n = et()?.[0], o =
|
|
4562
|
+
const n = et()?.[0], o = H(n?.id ?? "")?.[0], i = {
|
|
4551
4563
|
type: "select_table_v1",
|
|
4552
4564
|
extraState: {
|
|
4553
4565
|
space: {
|
|
@@ -4559,14 +4571,14 @@ function ps(t) {
|
|
|
4559
4571
|
name: o?.name ?? ""
|
|
4560
4572
|
}
|
|
4561
4573
|
}
|
|
4562
|
-
}, a =
|
|
4574
|
+
}, a = $.blocks.append(i, t.workspace);
|
|
4563
4575
|
e.connect(a.outputConnection);
|
|
4564
4576
|
}
|
|
4565
4577
|
function ds(t) {
|
|
4566
4578
|
const e = t.getInput("CONDITION").connection;
|
|
4567
4579
|
if (e.targetBlock())
|
|
4568
4580
|
return;
|
|
4569
|
-
const n = et()?.[0], o =
|
|
4581
|
+
const n = et()?.[0], o = H(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4570
4582
|
type: "cond_atomic_v1",
|
|
4571
4583
|
extraState: {
|
|
4572
4584
|
space: {
|
|
@@ -4584,7 +4596,7 @@ function ds(t) {
|
|
|
4584
4596
|
extend: i?.extend ?? ""
|
|
4585
4597
|
}
|
|
4586
4598
|
}
|
|
4587
|
-
}, c =
|
|
4599
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4588
4600
|
e.connect(c.outputConnection);
|
|
4589
4601
|
}
|
|
4590
4602
|
function hs(t) {
|
|
@@ -4608,7 +4620,7 @@ function hs(t) {
|
|
|
4608
4620
|
}
|
|
4609
4621
|
}
|
|
4610
4622
|
}
|
|
4611
|
-
}, o =
|
|
4623
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4612
4624
|
e.connect(o.previousConnection);
|
|
4613
4625
|
}
|
|
4614
4626
|
const fs = {
|
|
@@ -4633,7 +4645,7 @@ const fs = {
|
|
|
4633
4645
|
]), hs(this));
|
|
4634
4646
|
}
|
|
4635
4647
|
};
|
|
4636
|
-
|
|
4648
|
+
E.delete_data_v1 = fs;
|
|
4637
4649
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4638
4650
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4639
4651
|
return `{
|
|
@@ -4678,7 +4690,7 @@ function ms(t) {
|
|
|
4678
4690
|
let n, o;
|
|
4679
4691
|
const i = et()?.[0];
|
|
4680
4692
|
if (i) {
|
|
4681
|
-
const u =
|
|
4693
|
+
const u = H(i.id)?.[0];
|
|
4682
4694
|
if (u) {
|
|
4683
4695
|
n = {
|
|
4684
4696
|
space: {
|
|
@@ -4702,7 +4714,7 @@ function ms(t) {
|
|
|
4702
4714
|
type: "select_column_v1",
|
|
4703
4715
|
extraState: n,
|
|
4704
4716
|
fields: o
|
|
4705
|
-
}, c =
|
|
4717
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4706
4718
|
e.connect(c.outputConnection);
|
|
4707
4719
|
}
|
|
4708
4720
|
function Ts(t) {
|
|
@@ -4711,7 +4723,7 @@ function Ts(t) {
|
|
|
4711
4723
|
return;
|
|
4712
4724
|
const n = {
|
|
4713
4725
|
type: "cond_atomic_v1"
|
|
4714
|
-
}, o =
|
|
4726
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4715
4727
|
e.connect(o.outputConnection);
|
|
4716
4728
|
}
|
|
4717
4729
|
function Es(t) {
|
|
@@ -4748,7 +4760,7 @@ function Es(t) {
|
|
|
4748
4760
|
}
|
|
4749
4761
|
}
|
|
4750
4762
|
}
|
|
4751
|
-
}, o =
|
|
4763
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4752
4764
|
e.connect(o.outputConnection);
|
|
4753
4765
|
}
|
|
4754
4766
|
function gs(t) {
|
|
@@ -4772,7 +4784,7 @@ function gs(t) {
|
|
|
4772
4784
|
}
|
|
4773
4785
|
}
|
|
4774
4786
|
}
|
|
4775
|
-
}, o =
|
|
4787
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4776
4788
|
e.connect(o.previousConnection);
|
|
4777
4789
|
}
|
|
4778
4790
|
T([
|
|
@@ -4813,7 +4825,7 @@ const As = {
|
|
|
4813
4825
|
]), gs(this));
|
|
4814
4826
|
}
|
|
4815
4827
|
};
|
|
4816
|
-
|
|
4828
|
+
E.query_data_v1 = As;
|
|
4817
4829
|
s.forBlock.query_data_v1 = function(t) {
|
|
4818
4830
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", r.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4819
4831
|
return `{
|
|
@@ -4891,13 +4903,13 @@ const Is = {
|
|
|
4891
4903
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4892
4904
|
}
|
|
4893
4905
|
};
|
|
4894
|
-
|
|
4906
|
+
E.select_column_container_v1 = Is;
|
|
4895
4907
|
const Os = {
|
|
4896
4908
|
init: function() {
|
|
4897
4909
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4898
4910
|
}
|
|
4899
4911
|
};
|
|
4900
|
-
|
|
4912
|
+
E.select_column_item_v1 = Os;
|
|
4901
4913
|
const ys = {
|
|
4902
4914
|
init: function() {
|
|
4903
4915
|
this.space = {
|
|
@@ -4929,7 +4941,7 @@ const ys = {
|
|
|
4929
4941
|
this.space.id = t.id, this.space.name = t.name;
|
|
4930
4942
|
const e = this.getField("SPACE");
|
|
4931
4943
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4932
|
-
const n =
|
|
4944
|
+
const n = H(this.space.id)?.[0];
|
|
4933
4945
|
if (!n)
|
|
4934
4946
|
return;
|
|
4935
4947
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4949,10 +4961,10 @@ const ys = {
|
|
|
4949
4961
|
}, 0);
|
|
4950
4962
|
},
|
|
4951
4963
|
genSpaceOpts_: function() {
|
|
4952
|
-
return
|
|
4964
|
+
return ke();
|
|
4953
4965
|
},
|
|
4954
4966
|
genTableOpts_: function() {
|
|
4955
|
-
return
|
|
4967
|
+
return Ne(this.space.id);
|
|
4956
4968
|
},
|
|
4957
4969
|
genColumnOpts_: function() {
|
|
4958
4970
|
const t = [];
|
|
@@ -4990,7 +5002,7 @@ const ys = {
|
|
|
4990
5002
|
}
|
|
4991
5003
|
const n = e.id !== this.space.id;
|
|
4992
5004
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4993
|
-
const o =
|
|
5005
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4994
5006
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4995
5007
|
}
|
|
4996
5008
|
},
|
|
@@ -5107,7 +5119,7 @@ const ys = {
|
|
|
5107
5119
|
this.setWarningText(null);
|
|
5108
5120
|
}
|
|
5109
5121
|
};
|
|
5110
|
-
|
|
5122
|
+
E.select_column_v1 = ys;
|
|
5111
5123
|
s.forBlock.select_column_v1 = function(t) {
|
|
5112
5124
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5113
5125
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5144,7 +5156,7 @@ const vs = {
|
|
|
5144
5156
|
this.space.id = t.id, this.space.name = t.name;
|
|
5145
5157
|
const e = this.getField("SPACE");
|
|
5146
5158
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
5147
|
-
const n =
|
|
5159
|
+
const n = H(this.space.id)?.[0];
|
|
5148
5160
|
if (!n)
|
|
5149
5161
|
return;
|
|
5150
5162
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -5161,10 +5173,10 @@ const vs = {
|
|
|
5161
5173
|
this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
|
|
5162
5174
|
},
|
|
5163
5175
|
genSpaceOpts_: function() {
|
|
5164
|
-
return
|
|
5176
|
+
return ke();
|
|
5165
5177
|
},
|
|
5166
5178
|
genTableOpts_: function() {
|
|
5167
|
-
return
|
|
5179
|
+
return Ne(this.space.id);
|
|
5168
5180
|
},
|
|
5169
5181
|
onchange: function(t) {
|
|
5170
5182
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -5184,7 +5196,7 @@ const vs = {
|
|
|
5184
5196
|
}
|
|
5185
5197
|
let n = !1;
|
|
5186
5198
|
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("TABLE").getOptions(!1), n || !J(this.space.id, this.table.id)) {
|
|
5187
|
-
const i =
|
|
5199
|
+
const i = H(this.space.id)?.[0];
|
|
5188
5200
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5189
5201
|
}
|
|
5190
5202
|
},
|
|
@@ -5211,7 +5223,7 @@ const vs = {
|
|
|
5211
5223
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5212
5224
|
}
|
|
5213
5225
|
};
|
|
5214
|
-
|
|
5226
|
+
E.select_table_v1 = vs;
|
|
5215
5227
|
s.forBlock.select_table_v1 = function(t) {
|
|
5216
5228
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
5217
5229
|
return [`{spaceId:${e(o)},tableId:${e(i)}}`, r.ATOMIC];
|
|
@@ -5238,7 +5250,7 @@ const Cs = {
|
|
|
5238
5250
|
]);
|
|
5239
5251
|
}
|
|
5240
5252
|
};
|
|
5241
|
-
|
|
5253
|
+
E.transaction_v1 = Cs;
|
|
5242
5254
|
s.forBlock.transaction_v1 = function(t) {
|
|
5243
5255
|
const e = s.INDENT, n = t, o = si(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
5244
5256
|
return `{
|
|
@@ -5287,13 +5299,13 @@ const ks = {
|
|
|
5287
5299
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5288
5300
|
}
|
|
5289
5301
|
};
|
|
5290
|
-
|
|
5302
|
+
E.update_column_container_v1 = ks;
|
|
5291
5303
|
const Ns = {
|
|
5292
5304
|
init: function() {
|
|
5293
5305
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
5294
5306
|
}
|
|
5295
5307
|
};
|
|
5296
|
-
|
|
5308
|
+
E.update_column_item_v1 = Ns;
|
|
5297
5309
|
const Ls = {
|
|
5298
5310
|
init: function() {
|
|
5299
5311
|
this.space = {
|
|
@@ -5325,7 +5337,7 @@ const Ls = {
|
|
|
5325
5337
|
this.space.id = t.id, this.space.name = t.name;
|
|
5326
5338
|
const e = this.getField("SPACE");
|
|
5327
5339
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
5328
|
-
const n =
|
|
5340
|
+
const n = H(this.space.id)?.[0];
|
|
5329
5341
|
if (!n)
|
|
5330
5342
|
return;
|
|
5331
5343
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5345,10 +5357,10 @@ const Ls = {
|
|
|
5345
5357
|
}, 0);
|
|
5346
5358
|
},
|
|
5347
5359
|
genSpaceOpts_: function() {
|
|
5348
|
-
return
|
|
5360
|
+
return ke();
|
|
5349
5361
|
},
|
|
5350
5362
|
genTableOpts_: function() {
|
|
5351
|
-
return
|
|
5363
|
+
return Ne(this.space.id);
|
|
5352
5364
|
},
|
|
5353
5365
|
genColumnOpts_: function() {
|
|
5354
5366
|
const t = [];
|
|
@@ -5386,7 +5398,7 @@ const Ls = {
|
|
|
5386
5398
|
}
|
|
5387
5399
|
const n = e.id !== this.space.id;
|
|
5388
5400
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
5389
|
-
const o =
|
|
5401
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5390
5402
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5391
5403
|
}
|
|
5392
5404
|
},
|
|
@@ -5415,7 +5427,7 @@ const Ls = {
|
|
|
5415
5427
|
}
|
|
5416
5428
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5417
5429
|
i && i.dispose();
|
|
5418
|
-
const a =
|
|
5430
|
+
const a = Xe(this.workspace, n.type);
|
|
5419
5431
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5420
5432
|
},
|
|
5421
5433
|
decompose: function(t) {
|
|
@@ -5506,7 +5518,7 @@ const Ls = {
|
|
|
5506
5518
|
if (!c)
|
|
5507
5519
|
continue;
|
|
5508
5520
|
n.setCheck(null);
|
|
5509
|
-
const u =
|
|
5521
|
+
const u = Xe(this.workspace, c.type);
|
|
5510
5522
|
u && o.connect(u.outputConnection);
|
|
5511
5523
|
}
|
|
5512
5524
|
},
|
|
@@ -5538,7 +5550,7 @@ const Ls = {
|
|
|
5538
5550
|
this.setWarningText(null);
|
|
5539
5551
|
}
|
|
5540
5552
|
};
|
|
5541
|
-
|
|
5553
|
+
E.update_column_v1 = Ls;
|
|
5542
5554
|
s.forBlock.update_column_v1 = function(t) {
|
|
5543
5555
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5544
5556
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5557,7 +5569,7 @@ function Ss(t) {
|
|
|
5557
5569
|
let n, o;
|
|
5558
5570
|
const i = et()?.[0];
|
|
5559
5571
|
if (i) {
|
|
5560
|
-
const u =
|
|
5572
|
+
const u = H(i.id)?.[0];
|
|
5561
5573
|
if (u) {
|
|
5562
5574
|
n = {
|
|
5563
5575
|
space: {
|
|
@@ -5581,7 +5593,7 @@ function Ss(t) {
|
|
|
5581
5593
|
type: "update_column_v1",
|
|
5582
5594
|
extraState: n,
|
|
5583
5595
|
fields: o
|
|
5584
|
-
}, c =
|
|
5596
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
5585
5597
|
e.connect(c.outputConnection);
|
|
5586
5598
|
}
|
|
5587
5599
|
function Bs(t) {
|
|
@@ -5590,7 +5602,7 @@ function Bs(t) {
|
|
|
5590
5602
|
return;
|
|
5591
5603
|
const n = {
|
|
5592
5604
|
type: "cond_atomic_v1"
|
|
5593
|
-
}, o =
|
|
5605
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
5594
5606
|
e.connect(o.outputConnection);
|
|
5595
5607
|
}
|
|
5596
5608
|
function bs(t) {
|
|
@@ -5614,7 +5626,7 @@ function bs(t) {
|
|
|
5614
5626
|
}
|
|
5615
5627
|
}
|
|
5616
5628
|
}
|
|
5617
|
-
}, o =
|
|
5629
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
5618
5630
|
e.connect(o.previousConnection);
|
|
5619
5631
|
}
|
|
5620
5632
|
const Ps = {
|
|
@@ -5640,7 +5652,7 @@ const Ps = {
|
|
|
5640
5652
|
]), bs(this));
|
|
5641
5653
|
}
|
|
5642
5654
|
};
|
|
5643
|
-
|
|
5655
|
+
E.update_data_v1 = Ps;
|
|
5644
5656
|
s.forBlock.update_data_v1 = function(t) {
|
|
5645
5657
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5646
5658
|
return `{
|
|
@@ -5718,7 +5730,7 @@ const Rs = C.xml, Ds = {
|
|
|
5718
5730
|
this.length--;
|
|
5719
5731
|
}
|
|
5720
5732
|
};
|
|
5721
|
-
|
|
5733
|
+
E.json_array_v1 = Ds;
|
|
5722
5734
|
const Ms = {
|
|
5723
5735
|
init: function() {
|
|
5724
5736
|
this.appendDummyInput().appendField(
|
|
@@ -5730,7 +5742,7 @@ const Ms = {
|
|
|
5730
5742
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5731
5743
|
}
|
|
5732
5744
|
};
|
|
5733
|
-
|
|
5745
|
+
E.json_boolean_v1 = Ms;
|
|
5734
5746
|
const Ln = C.xml, Us = {
|
|
5735
5747
|
init: function() {
|
|
5736
5748
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
@@ -5797,38 +5809,38 @@ const Ln = C.xml, Us = {
|
|
|
5797
5809
|
this.length--;
|
|
5798
5810
|
}
|
|
5799
5811
|
};
|
|
5800
|
-
|
|
5812
|
+
E.json_map_v1 = Us;
|
|
5801
5813
|
const Vs = {
|
|
5802
5814
|
init: function() {
|
|
5803
5815
|
this.appendDummyInput().appendField(new He(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5804
5816
|
}
|
|
5805
5817
|
};
|
|
5806
|
-
|
|
5818
|
+
E.json_number_v1 = Vs;
|
|
5807
5819
|
const xs = {
|
|
5808
5820
|
init: function() {
|
|
5809
5821
|
this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5810
5822
|
}
|
|
5811
5823
|
};
|
|
5812
|
-
|
|
5824
|
+
E.json_root_v1 = xs;
|
|
5813
5825
|
const Ys = {
|
|
5814
5826
|
init: function() {
|
|
5815
5827
|
this.appendDummyInput().appendField('"').appendField(new ht(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5816
5828
|
}
|
|
5817
5829
|
};
|
|
5818
|
-
|
|
5830
|
+
E.json_string_v1 = Ys;
|
|
5819
5831
|
const Fs = C.xml, ws = {
|
|
5820
5832
|
init: function() {
|
|
5821
5833
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5822
5834
|
}
|
|
5823
5835
|
};
|
|
5824
|
-
|
|
5836
|
+
E.list_create_container_v1 = ws;
|
|
5825
5837
|
const Ks = {
|
|
5826
5838
|
init: function() {
|
|
5827
5839
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5828
5840
|
}
|
|
5829
5841
|
};
|
|
5830
|
-
|
|
5831
|
-
const
|
|
5842
|
+
E.list_create_item_v1 = Ks;
|
|
5843
|
+
const $s = {
|
|
5832
5844
|
init: function() {
|
|
5833
5845
|
this.itemCount_ = 0, this.setMutator(
|
|
5834
5846
|
new Tt.MutatorIcon(
|
|
@@ -5910,7 +5922,7 @@ const Hs = {
|
|
|
5910
5922
|
this.removeInput("ADD" + t);
|
|
5911
5923
|
}
|
|
5912
5924
|
};
|
|
5913
|
-
|
|
5925
|
+
E.list_create_v1 = $s;
|
|
5914
5926
|
s.forBlock.list_create_v1 = function(t) {
|
|
5915
5927
|
const e = t, n = new Array(e.itemCount_);
|
|
5916
5928
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -6126,7 +6138,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
6126
6138
|
return `${e}[${n}] = ${o};
|
|
6127
6139
|
`;
|
|
6128
6140
|
};
|
|
6129
|
-
const
|
|
6141
|
+
const Hs = {
|
|
6130
6142
|
// logic_compare
|
|
6131
6143
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6132
6144
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6140,7 +6152,7 @@ const $s = {
|
|
|
6140
6152
|
};
|
|
6141
6153
|
B.register(
|
|
6142
6154
|
"logic_op_tooltip_v1",
|
|
6143
|
-
B.buildTooltipForDropdown("OP",
|
|
6155
|
+
B.buildTooltipForDropdown("OP", Hs)
|
|
6144
6156
|
);
|
|
6145
6157
|
T([
|
|
6146
6158
|
{
|
|
@@ -7567,13 +7579,13 @@ const zs = C.xml, Zs = {
|
|
|
7567
7579
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7568
7580
|
}
|
|
7569
7581
|
};
|
|
7570
|
-
|
|
7582
|
+
E.object_create_container_v1 = Zs;
|
|
7571
7583
|
const ta = {
|
|
7572
7584
|
init: function() {
|
|
7573
7585
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7574
7586
|
}
|
|
7575
7587
|
};
|
|
7576
|
-
|
|
7588
|
+
E.object_create_item_v1 = ta;
|
|
7577
7589
|
const ea = {
|
|
7578
7590
|
init: function() {
|
|
7579
7591
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
@@ -7648,7 +7660,7 @@ const ea = {
|
|
|
7648
7660
|
this.removeInput("ADD" + t);
|
|
7649
7661
|
}
|
|
7650
7662
|
};
|
|
7651
|
-
|
|
7663
|
+
E.object_create_v1 = ea;
|
|
7652
7664
|
s.forBlock.object_create_v1 = function(t) {
|
|
7653
7665
|
const e = t;
|
|
7654
7666
|
let n = "{";
|
|
@@ -7895,10 +7907,10 @@ const Sn = C.xml, na = {
|
|
|
7895
7907
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Lo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7896
7908
|
}
|
|
7897
7909
|
};
|
|
7898
|
-
|
|
7910
|
+
E.procedure_def_container_v1 = na;
|
|
7899
7911
|
const oa = {
|
|
7900
7912
|
init: function() {
|
|
7901
|
-
const t = new ht(
|
|
7913
|
+
const t = new ht(Ge.DEFAULT_ARG);
|
|
7902
7914
|
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;
|
|
7903
7915
|
},
|
|
7904
7916
|
validator_: function(t) {
|
|
@@ -7918,14 +7930,14 @@ const oa = {
|
|
|
7918
7930
|
return t;
|
|
7919
7931
|
}
|
|
7920
7932
|
};
|
|
7921
|
-
|
|
7933
|
+
E.procedure_def_item_v1 = oa;
|
|
7922
7934
|
const ia = {
|
|
7923
7935
|
init: function() {
|
|
7924
7936
|
this.withReturn = !1, this.args = [];
|
|
7925
7937
|
const t = new ht(
|
|
7926
|
-
|
|
7938
|
+
Ge.findLegalName("", this)
|
|
7927
7939
|
);
|
|
7928
|
-
t.setValidator(
|
|
7940
|
+
t.setValidator(Ge.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7929
7941
|
new Tt.MutatorIcon(
|
|
7930
7942
|
["procedure_def_item_v1"],
|
|
7931
7943
|
this
|
|
@@ -8023,7 +8035,7 @@ const ia = {
|
|
|
8023
8035
|
}
|
|
8024
8036
|
}
|
|
8025
8037
|
};
|
|
8026
|
-
|
|
8038
|
+
E.procedure_def_v1 = ia;
|
|
8027
8039
|
const sa = C.xml, aa = {
|
|
8028
8040
|
init: function() {
|
|
8029
8041
|
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}");
|
|
@@ -8080,7 +8092,7 @@ const sa = C.xml, aa = {
|
|
|
8080
8092
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
8081
8093
|
}
|
|
8082
8094
|
};
|
|
8083
|
-
|
|
8095
|
+
E.procedure_return_v1 = aa;
|
|
8084
8096
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
8085
8097
|
const e = t;
|
|
8086
8098
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", r.NONE) || "null"};
|
|
@@ -8110,7 +8122,7 @@ const ca = {
|
|
|
8110
8122
|
]);
|
|
8111
8123
|
}
|
|
8112
8124
|
};
|
|
8113
|
-
|
|
8125
|
+
E.download_resource_v1 = ca;
|
|
8114
8126
|
s.forBlock.download_resource_v1 = function(t) {
|
|
8115
8127
|
const e = s.valueToCode(t, "ASSET", r.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
8116
8128
|
return `{
|
|
@@ -8123,7 +8135,7 @@ ${n}
|
|
|
8123
8135
|
`;
|
|
8124
8136
|
};
|
|
8125
8137
|
function so(t) {
|
|
8126
|
-
const e =
|
|
8138
|
+
const e = g.resource.spaces.find((i) => i.id === t);
|
|
8127
8139
|
if (!e)
|
|
8128
8140
|
return [];
|
|
8129
8141
|
const n = [];
|
|
@@ -8145,7 +8157,7 @@ function ra(t) {
|
|
|
8145
8157
|
}), k(e);
|
|
8146
8158
|
}
|
|
8147
8159
|
function ao(t, e) {
|
|
8148
|
-
const n =
|
|
8160
|
+
const n = g.resource.spaces.find((i) => i.id === t);
|
|
8149
8161
|
if (!n)
|
|
8150
8162
|
return [];
|
|
8151
8163
|
const o = [];
|
|
@@ -8161,7 +8173,7 @@ function ua(t, e) {
|
|
|
8161
8173
|
}
|
|
8162
8174
|
function co() {
|
|
8163
8175
|
const t = [];
|
|
8164
|
-
return
|
|
8176
|
+
return g.resource.spaces.forEach((e) => {
|
|
8165
8177
|
e.resources.length > 0 && t.push(e);
|
|
8166
8178
|
}), t;
|
|
8167
8179
|
}
|
|
@@ -8220,7 +8232,7 @@ const _a = {
|
|
|
8220
8232
|
};
|
|
8221
8233
|
},
|
|
8222
8234
|
loadExtraState: function(t) {
|
|
8223
|
-
this.space =
|
|
8235
|
+
this.space = Ue(t.space), this.dir = Ue(t.dir), this.resource = Ue(t.resource);
|
|
8224
8236
|
},
|
|
8225
8237
|
genSpaceOpts_: function() {
|
|
8226
8238
|
return la();
|
|
@@ -8232,7 +8244,7 @@ const _a = {
|
|
|
8232
8244
|
return ua(this.space.id, this.dir.id);
|
|
8233
8245
|
}
|
|
8234
8246
|
};
|
|
8235
|
-
|
|
8247
|
+
E.select_resource_v1 = _a;
|
|
8236
8248
|
s.forBlock.select_resource_v1 = function() {
|
|
8237
8249
|
return "";
|
|
8238
8250
|
};
|
|
@@ -8267,7 +8279,7 @@ const pa = {
|
|
|
8267
8279
|
]);
|
|
8268
8280
|
}
|
|
8269
8281
|
};
|
|
8270
|
-
|
|
8282
|
+
E.upload_resource_v1 = pa;
|
|
8271
8283
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
8272
8284
|
const e = s.valueToCode(t, "NAME", r.ATOMIC) || "''", n = s.valueToCode(t, "DIR", r.ATOMIC) || "null", o = s.valueToCode(t, "DATA", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
8273
8285
|
return `{
|
|
@@ -8844,7 +8856,7 @@ const Ta = {
|
|
|
8844
8856
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
8845
8857
|
}
|
|
8846
8858
|
};
|
|
8847
|
-
|
|
8859
|
+
E.create_timer_v1 = Ta;
|
|
8848
8860
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8849
8861
|
const e = s.valueToCode(t, "INTERVAL", r.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", r.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", r.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", r.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8850
8862
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -9295,7 +9307,7 @@ function La(t) {
|
|
|
9295
9307
|
break;
|
|
9296
9308
|
}
|
|
9297
9309
|
}
|
|
9298
|
-
const
|
|
9310
|
+
const tn = ["get_app_property_v1", "get_app_state_v1"];
|
|
9299
9311
|
function ut(t, e) {
|
|
9300
9312
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9301
9313
|
}
|
|
@@ -9303,7 +9315,7 @@ function Sa(t) {
|
|
|
9303
9315
|
const e = [];
|
|
9304
9316
|
function n(o) {
|
|
9305
9317
|
for (const i of o.getChildren(!0))
|
|
9306
|
-
|
|
9318
|
+
tn.includes(i.type) && e.push(i), n(i);
|
|
9307
9319
|
}
|
|
9308
9320
|
return n(t), e;
|
|
9309
9321
|
}
|
|
@@ -9326,11 +9338,11 @@ function Ba(t) {
|
|
|
9326
9338
|
function ba(t) {
|
|
9327
9339
|
const e = [];
|
|
9328
9340
|
for (const n of t.getChildren(!0))
|
|
9329
|
-
if (
|
|
9341
|
+
if (tn.includes(n.type))
|
|
9330
9342
|
e.push(n);
|
|
9331
9343
|
else if (n.type === "object_get_v1") {
|
|
9332
9344
|
const o = n.getInputTargetBlock("OBJECT");
|
|
9333
|
-
o &&
|
|
9345
|
+
o && tn.includes(o.type) && e.push(n);
|
|
9334
9346
|
}
|
|
9335
9347
|
return e;
|
|
9336
9348
|
}
|
|
@@ -9533,8 +9545,8 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9533
9545
|
onMouseover: h[3] || (h[3] = (P) => u.value = !0)
|
|
9534
9546
|
}, [
|
|
9535
9547
|
w("div", Va, [
|
|
9536
|
-
w("span", xa,
|
|
9537
|
-
a.desc ? (S(), Z("span", Ya,
|
|
9548
|
+
w("span", xa, $t(a.title), 1),
|
|
9549
|
+
a.desc ? (S(), Z("span", Ya, $t(a.desc), 1)) : rt("", !0)
|
|
9538
9550
|
]),
|
|
9539
9551
|
L(p),
|
|
9540
9552
|
L(m, {
|
|
@@ -9556,7 +9568,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9556
9568
|
class: "text-caption text-grey"
|
|
9557
9569
|
}, Ka = /* @__PURE__ */ ct({
|
|
9558
9570
|
__name: "index",
|
|
9559
|
-
props: /* @__PURE__ */
|
|
9571
|
+
props: /* @__PURE__ */ We({
|
|
9560
9572
|
lock: { type: Boolean }
|
|
9561
9573
|
}, {
|
|
9562
9574
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9643,7 +9655,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9643
9655
|
onStart: l
|
|
9644
9656
|
}, {
|
|
9645
9657
|
default: at(() => [
|
|
9646
|
-
(S(!0), Z(
|
|
9658
|
+
(S(!0), Z($n, null, ti(a.value, (A) => (S(), st(Fa, {
|
|
9647
9659
|
id: A.id,
|
|
9648
9660
|
key: A.id,
|
|
9649
9661
|
desc: A.desc,
|
|
@@ -9653,14 +9665,14 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9653
9665
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9654
9666
|
]),
|
|
9655
9667
|
_: 1
|
|
9656
|
-
}, 8, ["modelValue"])) : (S(), Z("span", wa,
|
|
9668
|
+
}, 8, ["modelValue"])) : (S(), Z("span", wa, $t(R(n)("x-block-lib.noOption")), 1));
|
|
9657
9669
|
}
|
|
9658
|
-
}),
|
|
9670
|
+
}), $a = (t, e) => {
|
|
9659
9671
|
const n = t.__vccOpts || t;
|
|
9660
9672
|
for (const [o, i] of e)
|
|
9661
9673
|
n[o] = i;
|
|
9662
9674
|
return n;
|
|
9663
|
-
},
|
|
9675
|
+
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-6cb62cd6"]]), Ga = /* @__PURE__ */ ct({
|
|
9664
9676
|
__name: "index",
|
|
9665
9677
|
props: {
|
|
9666
9678
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9710,7 +9722,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9710
9722
|
};
|
|
9711
9723
|
}), l = F(() => ({
|
|
9712
9724
|
height: "60px"
|
|
9713
|
-
})), { open: _ } =
|
|
9725
|
+
})), { open: _ } = en(`blocklyNavigatorDlg${je()}`);
|
|
9714
9726
|
ei(() => {
|
|
9715
9727
|
_.value = !1;
|
|
9716
9728
|
});
|
|
@@ -9719,7 +9731,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9719
9731
|
t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
|
|
9720
9732
|
} }), (m, A) => {
|
|
9721
9733
|
const P = D("v-sheet"), U = D("v-btn"), At = D("v-spacer"), nt = D("v-dialog"), Ct = D("v-tooltip");
|
|
9722
|
-
return S(), Z(
|
|
9734
|
+
return S(), Z($n, null, [
|
|
9723
9735
|
L(nt, {
|
|
9724
9736
|
modelValue: R(_),
|
|
9725
9737
|
"onUpdate:modelValue": A[5] || (A[5] = (G) => ne(_) ? _.value = G : null),
|
|
@@ -9728,7 +9740,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9728
9740
|
"no-click-animation": "",
|
|
9729
9741
|
persistent: "",
|
|
9730
9742
|
transition: "scroll-x-reverse-transition",
|
|
9731
|
-
onKeydown: A[6] || (A[6] =
|
|
9743
|
+
onKeydown: A[6] || (A[6] = Hn(Ft((G) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9732
9744
|
}, {
|
|
9733
9745
|
default: at(() => [
|
|
9734
9746
|
w("div", {
|
|
@@ -9757,7 +9769,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9757
9769
|
variant: "text",
|
|
9758
9770
|
onClick: A[0] || (A[0] = (G) => _.value = !1)
|
|
9759
9771
|
}),
|
|
9760
|
-
w("span", Wa,
|
|
9772
|
+
w("span", Wa, $t(R(n)("x-block-lib.navigator")), 1),
|
|
9761
9773
|
L(At)
|
|
9762
9774
|
]),
|
|
9763
9775
|
_: 1
|
|
@@ -9766,7 +9778,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9766
9778
|
class: "overflow-y-auto",
|
|
9767
9779
|
style: W(u.value)
|
|
9768
9780
|
}, [
|
|
9769
|
-
t.type === "list" ? (S(), st(
|
|
9781
|
+
t.type === "list" ? (S(), st(Ha, {
|
|
9770
9782
|
key: 0,
|
|
9771
9783
|
ref_key: "blockList",
|
|
9772
9784
|
ref: d,
|
|
@@ -9857,61 +9869,75 @@ function Xa(t, e) {
|
|
|
9857
9869
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
9858
9870
|
}
|
|
9859
9871
|
function Ja() {
|
|
9860
|
-
|
|
9872
|
+
const { activeObject: t, activeComp: e } = g.app;
|
|
9873
|
+
return !(t.type !== "comp" || e.meta.events.length <= 0);
|
|
9861
9874
|
}
|
|
9862
9875
|
function qa() {
|
|
9863
|
-
|
|
9876
|
+
const { activeObject: t, activeComp: e } = g.app;
|
|
9877
|
+
return !(t.type !== "comp" || e.meta.states.length <= 0);
|
|
9864
9878
|
}
|
|
9865
9879
|
function Pn() {
|
|
9866
|
-
|
|
9880
|
+
const { activeObject: t, activeComp: e } = g.app;
|
|
9881
|
+
return !(t.type !== "comp" || e.meta.methods.length <= 0);
|
|
9867
9882
|
}
|
|
9868
9883
|
function Qa() {
|
|
9884
|
+
const { activeObject: t, activeComp: e } = g.app;
|
|
9885
|
+
if (t.type !== "comp")
|
|
9886
|
+
return !1;
|
|
9887
|
+
for (const { outputs: n } of e.meta.methods)
|
|
9888
|
+
if (n.length > 0)
|
|
9889
|
+
return !0;
|
|
9890
|
+
return !1;
|
|
9891
|
+
}
|
|
9892
|
+
function za() {
|
|
9869
9893
|
const t = [];
|
|
9870
9894
|
return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), Ja() && t.push(y("trigger_app_event_v1")), t.push(
|
|
9871
9895
|
y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
|
|
9872
|
-
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), (j("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), j("callMethod") && t.push(y("call_app_method_v1")), Pn() && (t.push(y("impl_app_method_v1")), t.push(y("set_app_method_output_v1")), t.push(y("procedure_return_v1"))), t;
|
|
9896
|
+
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), (j("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), j("callMethod") && t.push(y("call_app_method_v1")), Pn() && (t.push(y("impl_app_method_v1")), Qa() && t.push(y("set_app_method_output_v1")), t.push(y("procedure_return_v1"))), t;
|
|
9873
9897
|
}
|
|
9874
|
-
const po = { name: "APP_COMP_CATEGORY", callback:
|
|
9875
|
-
function
|
|
9898
|
+
const po = { name: "APP_COMP_CATEGORY", callback: za };
|
|
9899
|
+
function Za() {
|
|
9876
9900
|
const t = [];
|
|
9877
9901
|
return t.push(V(f("LABEL_FUNC"))), t.push(V(f("LABEL_FLOW"))), t;
|
|
9878
9902
|
}
|
|
9879
|
-
const pe = { name: "APP_COMPUTE_CATEGORY", callback:
|
|
9880
|
-
function
|
|
9903
|
+
const pe = { name: "APP_COMPUTE_CATEGORY", callback: Za };
|
|
9904
|
+
function tc() {
|
|
9881
9905
|
const t = [];
|
|
9882
9906
|
return t.push(y("app_debug_trace_v1", [bt("OBJECT")])), t.push(y("popup_message_v1", [bt("TEXT")])), t.push(y("open_confirm_dlg_v1")), t.push(y("open_prompt_dlg_v1")), t;
|
|
9883
9907
|
}
|
|
9884
|
-
const de = { name: "APP_MESSAGE_CATEGORY", callback:
|
|
9885
|
-
function
|
|
9886
|
-
for (const t of
|
|
9908
|
+
const de = { name: "APP_MESSAGE_CATEGORY", callback: tc };
|
|
9909
|
+
function ec() {
|
|
9910
|
+
for (const t of g.app.appList)
|
|
9887
9911
|
if (t.pages.length > 0)
|
|
9888
9912
|
return !0;
|
|
9889
9913
|
return !1;
|
|
9890
9914
|
}
|
|
9891
|
-
function ec() {
|
|
9892
|
-
const t = [];
|
|
9893
|
-
return t.push(y("app_env_is_v1")), tc() && t.push(y("navigate_to_v1")), t;
|
|
9894
|
-
}
|
|
9895
|
-
const he = { name: "APP_MISC_CATEGORY", callback: ec };
|
|
9896
9915
|
function nc() {
|
|
9897
|
-
|
|
9916
|
+
const t = [];
|
|
9917
|
+
return t.push(y("app_env_is_v1")), ec() && t.push(y("navigate_to_v1")), t;
|
|
9898
9918
|
}
|
|
9919
|
+
const he = { name: "APP_MISC_CATEGORY", callback: nc };
|
|
9899
9920
|
function oc() {
|
|
9900
|
-
|
|
9921
|
+
const { activeObject: t, activePage: e } = g.app;
|
|
9922
|
+
return !(t.type !== "page" || e.meta.states.length <= 0);
|
|
9901
9923
|
}
|
|
9902
9924
|
function ic() {
|
|
9925
|
+
const { activeObject: t, activePage: e } = g.app;
|
|
9926
|
+
return !(t.type !== "page" || e.meta.arguments.length <= 0);
|
|
9927
|
+
}
|
|
9928
|
+
function sc() {
|
|
9903
9929
|
const t = [];
|
|
9904
9930
|
return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), t.push(
|
|
9905
9931
|
y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
|
|
9906
|
-
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")),
|
|
9932
|
+
), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), oc() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), j("callMethod") && (t.push(V(f("LABEL_METHOD"))), t.push(y("call_app_method_v1"))), ic() && (t.push(V(f("LABEL_ARGUMENT"))), t.push(y("get_page_argument_v1"))), t;
|
|
9907
9933
|
}
|
|
9908
|
-
const ho = { name: "APP_PAGE_CATEGORY", callback:
|
|
9909
|
-
function
|
|
9934
|
+
const ho = { name: "APP_PAGE_CATEGORY", callback: sc };
|
|
9935
|
+
function ac() {
|
|
9910
9936
|
const t = [];
|
|
9911
9937
|
return t.push(V(f("LABEL_RESOURCE"))), t.push(y("upload_resource_v1")), t;
|
|
9912
9938
|
}
|
|
9913
|
-
const fe = { name: "APP_RESOURCE_CATEGORY", callback:
|
|
9914
|
-
function
|
|
9939
|
+
const fe = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
|
|
9940
|
+
function cc() {
|
|
9915
9941
|
const t = [];
|
|
9916
9942
|
{
|
|
9917
9943
|
const e = xt.createElement("label");
|
|
@@ -9936,9 +9962,9 @@ function ac() {
|
|
|
9936
9962
|
}
|
|
9937
9963
|
const lt = {
|
|
9938
9964
|
name: "PROCEDURE_CATEGORY",
|
|
9939
|
-
callback:
|
|
9965
|
+
callback: cc
|
|
9940
9966
|
}, te = C.xml;
|
|
9941
|
-
function
|
|
9967
|
+
function rc() {
|
|
9942
9968
|
const t = Wt(), e = [];
|
|
9943
9969
|
{
|
|
9944
9970
|
const o = te.createElement("label");
|
|
@@ -9976,9 +10002,9 @@ function cc() {
|
|
|
9976
10002
|
}
|
|
9977
10003
|
const _t = {
|
|
9978
10004
|
name: "VARIABLE_CATEGORY",
|
|
9979
|
-
callback:
|
|
10005
|
+
callback: rc
|
|
9980
10006
|
};
|
|
9981
|
-
function
|
|
10007
|
+
function uc() {
|
|
9982
10008
|
const t = [];
|
|
9983
10009
|
if (et().length > 0)
|
|
9984
10010
|
t.push(V(f("LABEL_OPERATION"))), t.push(y("add_data_v1")), t.push(y("delete_data_v1")), t.push(y("update_data_v1")), t.push(y("query_data_v1")), t.push(y("transaction_v1")), t.push(
|
|
@@ -10000,30 +10026,30 @@ function rc() {
|
|
|
10000
10026
|
}
|
|
10001
10027
|
return t;
|
|
10002
10028
|
}
|
|
10003
|
-
const me = { name: "COMPUTE_DATA_CATEGORY", callback:
|
|
10004
|
-
function
|
|
10029
|
+
const me = { name: "COMPUTE_DATA_CATEGORY", callback: uc };
|
|
10030
|
+
function lc() {
|
|
10005
10031
|
return qt("flow").length > 0;
|
|
10006
10032
|
}
|
|
10007
|
-
function
|
|
10033
|
+
function _c() {
|
|
10008
10034
|
const t = [];
|
|
10009
|
-
return
|
|
10035
|
+
return g.compute.activeObject.type === "flow" && t.push(y("on_flow_state_event_v1")), lc() && console.assert(!0), t;
|
|
10010
10036
|
}
|
|
10011
|
-
const Te = { name: "COMPUTE_FLOW_CATEGORY", callback:
|
|
10012
|
-
function
|
|
10037
|
+
const Te = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
|
|
10038
|
+
function pc() {
|
|
10013
10039
|
return qt("func").length > 0;
|
|
10014
10040
|
}
|
|
10015
|
-
function
|
|
10041
|
+
function dc() {
|
|
10016
10042
|
const t = [];
|
|
10017
|
-
return
|
|
10043
|
+
return g.compute.activeObject.type === "func" && (t.push(y("func_entry_v1")), g.compute.activeFunc.outputs.length > 0 && t.push(y("set_func_output_v1")), t.push(y("procedure_return_v1"))), pc() && t.push(y("call_func_internal_v1")), t;
|
|
10018
10044
|
}
|
|
10019
|
-
const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
10020
|
-
function
|
|
10045
|
+
const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
|
|
10046
|
+
function hc() {
|
|
10021
10047
|
const t = [];
|
|
10022
10048
|
return t.push(
|
|
10023
10049
|
y("compute_debug_trace_v1", [bt("OBJECT")])
|
|
10024
10050
|
), t;
|
|
10025
10051
|
}
|
|
10026
|
-
const ge = { name: "COMPUTE_MISC_CATEGORY", callback:
|
|
10052
|
+
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
|
|
10027
10053
|
kind: "category",
|
|
10028
10054
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
10029
10055
|
categorystyle: "color_category",
|
|
@@ -10097,7 +10123,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10097
10123
|
}
|
|
10098
10124
|
}
|
|
10099
10125
|
]
|
|
10100
|
-
},
|
|
10126
|
+
}, Se = {
|
|
10101
10127
|
kind: "category",
|
|
10102
10128
|
name: "%{BKY_CATEGORY_LIST}",
|
|
10103
10129
|
categorystyle: "list_category",
|
|
@@ -10212,7 +10238,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10212
10238
|
type: "list_reverse_v1"
|
|
10213
10239
|
}
|
|
10214
10240
|
]
|
|
10215
|
-
},
|
|
10241
|
+
}, Be = {
|
|
10216
10242
|
kind: "category",
|
|
10217
10243
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
10218
10244
|
categorystyle: "logic_category",
|
|
@@ -10254,7 +10280,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10254
10280
|
type: "logic_ternary_v1"
|
|
10255
10281
|
}
|
|
10256
10282
|
]
|
|
10257
|
-
},
|
|
10283
|
+
}, be = {
|
|
10258
10284
|
kind: "category",
|
|
10259
10285
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
10260
10286
|
categorystyle: "loop_category",
|
|
@@ -10316,7 +10342,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10316
10342
|
type: "flow_control_v1"
|
|
10317
10343
|
}
|
|
10318
10344
|
]
|
|
10319
|
-
},
|
|
10345
|
+
}, Pe = {
|
|
10320
10346
|
kind: "category",
|
|
10321
10347
|
name: "%{BKY_CATEGORY_MATH}",
|
|
10322
10348
|
categorystyle: "math_category",
|
|
@@ -10471,7 +10497,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10471
10497
|
type: "math_on_list_v1"
|
|
10472
10498
|
}
|
|
10473
10499
|
]
|
|
10474
|
-
},
|
|
10500
|
+
}, Re = {
|
|
10475
10501
|
kind: "category",
|
|
10476
10502
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
10477
10503
|
categorystyle: "object_category",
|
|
@@ -10539,7 +10565,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10539
10565
|
}
|
|
10540
10566
|
}
|
|
10541
10567
|
]
|
|
10542
|
-
},
|
|
10568
|
+
}, De = {
|
|
10543
10569
|
kind: "category",
|
|
10544
10570
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
10545
10571
|
categorystyle: "text_category",
|
|
@@ -10726,7 +10752,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10726
10752
|
}
|
|
10727
10753
|
}
|
|
10728
10754
|
]
|
|
10729
|
-
},
|
|
10755
|
+
}, fc = {
|
|
10730
10756
|
kind: "categoryToolbox",
|
|
10731
10757
|
contents: [
|
|
10732
10758
|
{
|
|
@@ -10747,13 +10773,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10747
10773
|
categorystyle: "misc_category",
|
|
10748
10774
|
custom: he.name
|
|
10749
10775
|
},
|
|
10776
|
+
be,
|
|
10750
10777
|
Be,
|
|
10778
|
+
Pe,
|
|
10779
|
+
De,
|
|
10751
10780
|
Se,
|
|
10752
|
-
be,
|
|
10753
10781
|
Re,
|
|
10754
10782
|
Le,
|
|
10755
|
-
Pe,
|
|
10756
|
-
Ne,
|
|
10757
10783
|
fo,
|
|
10758
10784
|
{
|
|
10759
10785
|
kind: "category",
|
|
@@ -10780,7 +10806,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10780
10806
|
custom: pe.name
|
|
10781
10807
|
}
|
|
10782
10808
|
]
|
|
10783
|
-
},
|
|
10809
|
+
}, mc = {
|
|
10784
10810
|
kind: "categoryToolbox",
|
|
10785
10811
|
contents: [
|
|
10786
10812
|
{
|
|
@@ -10807,13 +10833,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10807
10833
|
categorystyle: "misc_category",
|
|
10808
10834
|
custom: ge.name
|
|
10809
10835
|
},
|
|
10836
|
+
be,
|
|
10810
10837
|
Be,
|
|
10838
|
+
Pe,
|
|
10839
|
+
De,
|
|
10811
10840
|
Se,
|
|
10812
|
-
be,
|
|
10813
10841
|
Re,
|
|
10814
10842
|
Le,
|
|
10815
|
-
Pe,
|
|
10816
|
-
Ne,
|
|
10817
10843
|
{
|
|
10818
10844
|
kind: "category",
|
|
10819
10845
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10827,7 +10853,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10827
10853
|
custom: lt.name
|
|
10828
10854
|
}
|
|
10829
10855
|
]
|
|
10830
|
-
},
|
|
10856
|
+
}, Tc = {
|
|
10831
10857
|
kind: "categoryToolbox",
|
|
10832
10858
|
contents: [
|
|
10833
10859
|
{
|
|
@@ -10854,13 +10880,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10854
10880
|
categorystyle: "misc_category",
|
|
10855
10881
|
custom: ge.name
|
|
10856
10882
|
},
|
|
10883
|
+
be,
|
|
10857
10884
|
Be,
|
|
10885
|
+
Pe,
|
|
10886
|
+
De,
|
|
10858
10887
|
Se,
|
|
10859
|
-
be,
|
|
10860
10888
|
Re,
|
|
10861
10889
|
Le,
|
|
10862
|
-
Pe,
|
|
10863
|
-
Ne,
|
|
10864
10890
|
{
|
|
10865
10891
|
kind: "category",
|
|
10866
10892
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10874,7 +10900,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10874
10900
|
custom: lt.name
|
|
10875
10901
|
}
|
|
10876
10902
|
]
|
|
10877
|
-
},
|
|
10903
|
+
}, Ec = {
|
|
10878
10904
|
kind: "categoryToolbox",
|
|
10879
10905
|
contents: [
|
|
10880
10906
|
{
|
|
@@ -10905,7 +10931,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10905
10931
|
]
|
|
10906
10932
|
}
|
|
10907
10933
|
]
|
|
10908
|
-
},
|
|
10934
|
+
}, gc = {
|
|
10909
10935
|
kind: "categoryToolbox",
|
|
10910
10936
|
contents: [
|
|
10911
10937
|
{
|
|
@@ -10926,13 +10952,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10926
10952
|
categorystyle: "misc_category",
|
|
10927
10953
|
custom: he.name
|
|
10928
10954
|
},
|
|
10955
|
+
be,
|
|
10929
10956
|
Be,
|
|
10957
|
+
Pe,
|
|
10958
|
+
De,
|
|
10930
10959
|
Se,
|
|
10931
|
-
be,
|
|
10932
10960
|
Re,
|
|
10933
10961
|
Le,
|
|
10934
|
-
Pe,
|
|
10935
|
-
Ne,
|
|
10936
10962
|
fo,
|
|
10937
10963
|
{
|
|
10938
10964
|
kind: "category",
|
|
@@ -10959,7 +10985,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10959
10985
|
custom: pe.name
|
|
10960
10986
|
}
|
|
10961
10987
|
]
|
|
10962
|
-
},
|
|
10988
|
+
}, $e = {
|
|
10963
10989
|
grid: {
|
|
10964
10990
|
length: 2,
|
|
10965
10991
|
snap: !0,
|
|
@@ -10985,22 +11011,22 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
|
10985
11011
|
wheel: !0
|
|
10986
11012
|
}
|
|
10987
11013
|
};
|
|
10988
|
-
function
|
|
10989
|
-
|
|
10990
|
-
const i = Vo(t,
|
|
10991
|
-
return i.addChangeListener(xo.shadowBlockConversionChangeListener),
|
|
11014
|
+
function Ac(t, e, n, o) {
|
|
11015
|
+
$e.theme = o ? "dark" : "light", $e.toolbox = Ic(e, n);
|
|
11016
|
+
const i = Vo(t, $e);
|
|
11017
|
+
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n), yc(i), i;
|
|
10992
11018
|
}
|
|
10993
|
-
function
|
|
11019
|
+
function Ic(t, e) {
|
|
10994
11020
|
let n;
|
|
10995
|
-
return t === "page" ? e === "v1" && (n =
|
|
11021
|
+
return t === "page" ? e === "v1" && (n = gc) : t === "comp" ? e === "v1" && (n = fc) : t === "func" ? e === "v1" && (n = Tc) : t === "flow" ? e === "v1" && (n = mc) : t === "json" && e === "v1" && (n = Ec), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10996
11022
|
}
|
|
10997
|
-
function
|
|
11023
|
+
function Oc(t, e, n) {
|
|
10998
11024
|
function o({ name: i, callback: a }) {
|
|
10999
11025
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
11000
11026
|
}
|
|
11001
11027
|
e === "page" ? n === "v1" && (o(ho), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(po), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "func" ? n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt)) : e === "flow" && n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt));
|
|
11002
11028
|
}
|
|
11003
|
-
function
|
|
11029
|
+
function yc(t) {
|
|
11004
11030
|
const { router: e } = vt;
|
|
11005
11031
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
11006
11032
|
const n = e.resolve({
|
|
@@ -11018,7 +11044,7 @@ function Oc(t) {
|
|
|
11018
11044
|
}, 100);
|
|
11019
11045
|
});
|
|
11020
11046
|
}
|
|
11021
|
-
function
|
|
11047
|
+
function vc(t, e) {
|
|
11022
11048
|
const n = e.newBlock("json_root_v1");
|
|
11023
11049
|
n.initSvg(), n.render();
|
|
11024
11050
|
const o = (i, a) => {
|
|
@@ -11060,7 +11086,7 @@ function yc(t, e) {
|
|
|
11060
11086
|
new (I.get(I.FINISHED_LOADING))(e)
|
|
11061
11087
|
);
|
|
11062
11088
|
}
|
|
11063
|
-
function
|
|
11089
|
+
function Cc(t) {
|
|
11064
11090
|
const e = (o) => {
|
|
11065
11091
|
if (!o)
|
|
11066
11092
|
return null;
|
|
@@ -11092,9 +11118,9 @@ function vc(t) {
|
|
|
11092
11118
|
if (o.type === "json_root_v1")
|
|
11093
11119
|
return e(o);
|
|
11094
11120
|
}
|
|
11095
|
-
const
|
|
11121
|
+
const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
|
|
11096
11122
|
__name: "index",
|
|
11097
|
-
props: /* @__PURE__ */
|
|
11123
|
+
props: /* @__PURE__ */ We({
|
|
11098
11124
|
type: {},
|
|
11099
11125
|
version: {},
|
|
11100
11126
|
locale: {},
|
|
@@ -11105,9 +11131,9 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11105
11131
|
scale: { required: !0 },
|
|
11106
11132
|
scaleModifiers: {}
|
|
11107
11133
|
}),
|
|
11108
|
-
emits: /* @__PURE__ */
|
|
11134
|
+
emits: /* @__PURE__ */ We(["ready"], ["update:lock", "update:scale"]),
|
|
11109
11135
|
setup(t, { expose: e, emit: n }) {
|
|
11110
|
-
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${
|
|
11136
|
+
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${je()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
|
|
11111
11137
|
Da(p);
|
|
11112
11138
|
const m = Lt(!0), A = Lt(!1), P = F(() => t.type === "json" ? "tree" : "list"), U = F(() => ({
|
|
11113
11139
|
width: "100%",
|
|
@@ -11152,16 +11178,16 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11152
11178
|
top: 0,
|
|
11153
11179
|
left: 0,
|
|
11154
11180
|
zIndex: 3e3
|
|
11155
|
-
})), { open: Ut } =
|
|
11181
|
+
})), { open: Ut } = en(`blocklyEditorFlyout${je()}`);
|
|
11156
11182
|
gn(async () => {
|
|
11157
11183
|
if (!l.value || !_.value) {
|
|
11158
11184
|
console.assert(!1);
|
|
11159
11185
|
return;
|
|
11160
11186
|
}
|
|
11161
|
-
Yo(_.value), await In(t.locale), p.workspace =
|
|
11187
|
+
Yo(_.value), await In(t.locale), p.workspace = Ac(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(To);
|
|
11162
11188
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
11163
|
-
new MutationObserver((
|
|
11164
|
-
|
|
11189
|
+
new MutationObserver((Me) => {
|
|
11190
|
+
Me.forEach((zt) => {
|
|
11165
11191
|
zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
|
|
11166
11192
|
});
|
|
11167
11193
|
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
|
|
@@ -11188,8 +11214,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11188
11214
|
}
|
|
11189
11215
|
}
|
|
11190
11216
|
const Eo = (N) => {
|
|
11191
|
-
m.value = !0, t.type === "json" ?
|
|
11192
|
-
}, go = () => t.type === "json" ?
|
|
11217
|
+
m.value = !0, t.type === "json" ? vc(N, p.workspace) : $.workspaces.load(N, p.workspace);
|
|
11218
|
+
}, go = () => t.type === "json" ? Cc(p.workspace) : $.workspaces.save(p.workspace), Ao = () => {
|
|
11193
11219
|
if (t.type === "json")
|
|
11194
11220
|
console.assert(!1);
|
|
11195
11221
|
else
|
|
@@ -11235,8 +11261,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11235
11261
|
generateReactivity: Io,
|
|
11236
11262
|
fireStateChange: Oo
|
|
11237
11263
|
}), (N, It) => {
|
|
11238
|
-
const
|
|
11239
|
-
return S(), Z("div",
|
|
11264
|
+
const Me = D("v-icon"), zt = D("x-loading");
|
|
11265
|
+
return S(), Z("div", kc, [
|
|
11240
11266
|
w("div", {
|
|
11241
11267
|
id: u,
|
|
11242
11268
|
ref_key: "blocklyDiv",
|
|
@@ -11253,7 +11279,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11253
11279
|
class: "d-flex flex-column justify-center align-center",
|
|
11254
11280
|
style: W(nt.value)
|
|
11255
11281
|
}, [
|
|
11256
|
-
L(
|
|
11282
|
+
L(Me, {
|
|
11257
11283
|
icon: "mdi-delete",
|
|
11258
11284
|
size: "x-large"
|
|
11259
11285
|
})
|
|
@@ -11299,15 +11325,15 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11299
11325
|
]);
|
|
11300
11326
|
};
|
|
11301
11327
|
}
|
|
11302
|
-
}),
|
|
11328
|
+
}), Lc = /* @__PURE__ */ ct({
|
|
11303
11329
|
__name: "index",
|
|
11304
11330
|
props: {
|
|
11305
11331
|
code: {}
|
|
11306
11332
|
},
|
|
11307
11333
|
setup(t) {
|
|
11308
11334
|
const e = t;
|
|
11309
|
-
Ko.registerLanguage("javascript",
|
|
11310
|
-
const n =
|
|
11335
|
+
Ko.registerLanguage("javascript", $o);
|
|
11336
|
+
const n = Ho.component, { backgroundColor2: o } = jt();
|
|
11311
11337
|
return (i, a) => {
|
|
11312
11338
|
const c = D("v-sheet");
|
|
11313
11339
|
return S(), st(c, {
|
|
@@ -11325,7 +11351,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11325
11351
|
}, 8, ["color"]);
|
|
11326
11352
|
};
|
|
11327
11353
|
}
|
|
11328
|
-
}),
|
|
11354
|
+
}), Sc = { class: "text-subtitle-1" }, Bc = { class: "w-100 h-100 overflow-auto" }, bc = /* @__PURE__ */ ct({
|
|
11329
11355
|
__name: "index",
|
|
11330
11356
|
setup(t) {
|
|
11331
11357
|
const { t: e } = Xt(), { sysBarAvail: n } = Fn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a = Lt(""), c = F(() => {
|
|
@@ -11336,7 +11362,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11336
11362
|
};
|
|
11337
11363
|
}), u = (_) => {
|
|
11338
11364
|
a.value = _.code;
|
|
11339
|
-
}, { open: l } =
|
|
11365
|
+
}, { open: l } = en("sourceDlg", u);
|
|
11340
11366
|
return (_, d) => {
|
|
11341
11367
|
const h = D("v-sheet"), p = D("v-btn"), m = D("v-spacer"), A = D("v-dialog");
|
|
11342
11368
|
return S(), st(A, {
|
|
@@ -11346,7 +11372,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11346
11372
|
"no-click-animation": "",
|
|
11347
11373
|
persistent: "",
|
|
11348
11374
|
transition: "dialog-bottom-transition",
|
|
11349
|
-
onKeydown: d[2] || (d[2] =
|
|
11375
|
+
onKeydown: d[2] || (d[2] = Hn(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11350
11376
|
}, {
|
|
11351
11377
|
default: at(() => [
|
|
11352
11378
|
L(h, {
|
|
@@ -11372,7 +11398,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11372
11398
|
variant: "text",
|
|
11373
11399
|
onClick: d[0] || (d[0] = (P) => l.value = !1)
|
|
11374
11400
|
}),
|
|
11375
|
-
w("span",
|
|
11401
|
+
w("span", Sc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11376
11402
|
L(m)
|
|
11377
11403
|
]),
|
|
11378
11404
|
_: 1
|
|
@@ -11380,8 +11406,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11380
11406
|
w("div", {
|
|
11381
11407
|
style: W(c.value)
|
|
11382
11408
|
}, [
|
|
11383
|
-
w("div",
|
|
11384
|
-
L(
|
|
11409
|
+
w("div", Bc, [
|
|
11410
|
+
L(Lc, { code: a.value }, null, 8, ["code"])
|
|
11385
11411
|
])
|
|
11386
11412
|
], 4)
|
|
11387
11413
|
]),
|
|
@@ -11392,16 +11418,16 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11392
11418
|
}, 8, ["modelValue"]);
|
|
11393
11419
|
};
|
|
11394
11420
|
}
|
|
11395
|
-
}),
|
|
11396
|
-
t.component("XBlockly",
|
|
11421
|
+
}), Pc = (t) => {
|
|
11422
|
+
t.component("XBlockly", Nc), t.component("XSourceDlg", bc);
|
|
11397
11423
|
};
|
|
11398
|
-
async function
|
|
11424
|
+
async function Fc(t) {
|
|
11399
11425
|
return (await Wn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11400
11426
|
}
|
|
11401
|
-
const
|
|
11427
|
+
const wc = { install: Pc };
|
|
11402
11428
|
export {
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11429
|
+
Nc as XBlockly,
|
|
11430
|
+
wc as default,
|
|
11431
|
+
Pc as install,
|
|
11432
|
+
Fc as loadLocaleMessageBlock
|
|
11407
11433
|
};
|