x-block-lib 0.8.30 → 0.8.32
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 +190 -190
- package/package.json +2 -2
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 g, j as s, O as r, F as O, b as $e, i as v, c as Tt, d as ko, e as M, f as T, g as No, h 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 g, j as s, O as r, F as O, b as $e, 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 He, q as Me, 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
11
|
import { globalState as E } 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
|
|
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
|
|
12
|
+
import { globalObjects as vt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as Yn, useColor as jt, useSystem as Fn, useViewStack as tn, eventBus as kt } from "x-essential-lib";
|
|
13
|
+
import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as en, elements as tt, makeEventId as z, toEventName as Ie, unwrapMethodId as nn, 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 Ge, Fragment as $n, renderList as ti, useId as We, 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 || {});
|
|
@@ -37,7 +37,7 @@ 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 Oe(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 ye(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 Ue(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 je(t, e) {
|
|
90
90
|
let n = null;
|
|
91
|
-
return e === "string" ? n =
|
|
91
|
+
return e === "string" ? n = Ue("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ue("") : 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="${Oe(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="${Oe(t)}"></shadow>`;
|
|
158
158
|
return C.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
160
|
function pi(t) {
|
|
@@ -261,7 +261,7 @@ s.forBlock.get_page_argument_v1 = function(t) {
|
|
|
261
261
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, r.FUNCTION_CALL];
|
|
262
262
|
};
|
|
263
263
|
const Ei = (t, e) => {
|
|
264
|
-
const n =
|
|
264
|
+
const n = Oe(t), o = ae(t);
|
|
265
265
|
g[n] = {
|
|
266
266
|
init: function() {
|
|
267
267
|
this.appendDummyInput().appendField(
|
|
@@ -286,7 +286,7 @@ for (const t in ie) {
|
|
|
286
286
|
Ei(n, e.items[n]);
|
|
287
287
|
}
|
|
288
288
|
const gi = (t, e) => {
|
|
289
|
-
const n =
|
|
289
|
+
const n = Oe(t), o = ae(t);
|
|
290
290
|
g[n] = {
|
|
291
291
|
init: function() {
|
|
292
292
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -528,18 +528,18 @@ function vi() {
|
|
|
528
528
|
t.push([o, n]);
|
|
529
529
|
}), k(t);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Xe(t) {
|
|
532
532
|
const e = E.app.appList.find((n) => n.id === t);
|
|
533
533
|
return e ? e.pages : [];
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function Ve(t, e) {
|
|
536
536
|
const n = E.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 Xe(t).forEach(({ id: o, name: i }) => {
|
|
543
543
|
e.push([i, o]);
|
|
544
544
|
}), k(e);
|
|
545
545
|
}
|
|
@@ -575,7 +575,7 @@ function X(t) {
|
|
|
575
575
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Je(t) {
|
|
579
579
|
const { properties: e } = E.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = E.app, c = [], u = Mt(n.type, n.subtype);
|
|
580
580
|
if (!u)
|
|
581
581
|
return c;
|
|
@@ -624,7 +624,7 @@ function qe(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
|
+
ye(d, p) || c.push({
|
|
628
628
|
id: z("elementPropertyChangeEvent", t, d),
|
|
629
629
|
kind: "elementPropertyChangeEvent",
|
|
630
630
|
names: h,
|
|
@@ -680,11 +680,11 @@ function qe(t) {
|
|
|
680
680
|
}
|
|
681
681
|
return c;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function xe(t) {
|
|
684
684
|
const { properties: e } = E.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = E.app, c = Mt(n.type, n.subtype);
|
|
685
685
|
if (!c)
|
|
686
686
|
return;
|
|
687
|
-
const { kind: u, nodeId: l, eventKey: _ } =
|
|
687
|
+
const { kind: u, nodeId: l, eventKey: _ } = en(t), d = n.nodes.find((p) => p.id === l);
|
|
688
688
|
if (!d)
|
|
689
689
|
return;
|
|
690
690
|
const h = tt[d.key];
|
|
@@ -825,9 +825,9 @@ function Ye(t) {
|
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
function Ni(t) {
|
|
828
|
-
const e = [], n =
|
|
828
|
+
const e = [], n = Je(t);
|
|
829
829
|
for (const { id: o, kind: i, names: a } of n)
|
|
830
|
-
e.push([
|
|
830
|
+
e.push([Ie(i, a), o]);
|
|
831
831
|
return k(e);
|
|
832
832
|
}
|
|
833
833
|
function zn() {
|
|
@@ -843,7 +843,7 @@ function zn() {
|
|
|
843
843
|
return n;
|
|
844
844
|
}
|
|
845
845
|
function kn(t) {
|
|
846
|
-
const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } =
|
|
846
|
+
const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = en(t);
|
|
847
847
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
848
848
|
const c = n.meta.events.find(
|
|
849
849
|
(u) => u.id === a
|
|
@@ -860,7 +860,7 @@ function kn(t) {
|
|
|
860
860
|
function Li() {
|
|
861
861
|
const t = [], e = zn();
|
|
862
862
|
for (const { id: n, kind: o, names: i } of e)
|
|
863
|
-
t.push([
|
|
863
|
+
t.push([Ie(o, i), n]);
|
|
864
864
|
return k(t);
|
|
865
865
|
}
|
|
866
866
|
function Pt(t) {
|
|
@@ -875,7 +875,7 @@ function Rt(t) {
|
|
|
875
875
|
e.push({ key: n, name: o, type: i });
|
|
876
876
|
return e;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function qe(t) {
|
|
879
879
|
const { activeObject: e, depends: n } = E.app, o = [], i = e.nodes.find((c) => c.id === t);
|
|
880
880
|
if (!i)
|
|
881
881
|
return o;
|
|
@@ -916,7 +916,7 @@ function Qe(t) {
|
|
|
916
916
|
}
|
|
917
917
|
return K(a.key) && e.type, o;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Ye(t) {
|
|
920
920
|
const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = nn(t), c = e.nodes.find((l) => l.id === i);
|
|
921
921
|
if (!c)
|
|
922
922
|
return;
|
|
@@ -970,7 +970,7 @@ function Fe(t) {
|
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
function Si(t) {
|
|
973
|
-
const e = [], n =
|
|
973
|
+
const e = [], n = qe(t);
|
|
974
974
|
for (const { id: o, kind: i, names: a } of n)
|
|
975
975
|
e.push([on(i, a), o]);
|
|
976
976
|
return k(e);
|
|
@@ -1010,17 +1010,17 @@ function Zn() {
|
|
|
1010
1010
|
t.push([on(o, i), n]);
|
|
1011
1011
|
return k(t);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function Qe(t) {
|
|
1014
1014
|
const e = Dt(t);
|
|
1015
1015
|
return e ? e.outputs : [];
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function Fe(t, e) {
|
|
1018
1018
|
const n = Dt(t);
|
|
1019
1019
|
if (n)
|
|
1020
1020
|
return n.outputs.find((o) => o.key === e);
|
|
1021
1021
|
}
|
|
1022
1022
|
function Bi(t) {
|
|
1023
|
-
const e = [], n =
|
|
1023
|
+
const e = [], n = Qe(t);
|
|
1024
1024
|
for (const { name: o, key: i } of n)
|
|
1025
1025
|
e.push([o, i]);
|
|
1026
1026
|
return k(e);
|
|
@@ -1041,7 +1041,7 @@ function bi(t, e, n) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
if (o[t.key] && o[t.key][e]) {
|
|
1043
1043
|
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
1044
|
-
if (!
|
|
1044
|
+
if (!ye(l, _))
|
|
1045
1045
|
return !1;
|
|
1046
1046
|
}
|
|
1047
1047
|
if (K(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
@@ -1091,7 +1091,7 @@ function Di(t, e, n) {
|
|
|
1091
1091
|
const { properties: o } = E.runtime, { activeObject: i, activeComp: a, depends: c } = E.app;
|
|
1092
1092
|
if (o[t.key] && o[t.key][e]) {
|
|
1093
1093
|
for (const { keys: u, raw: l } of o[t.key][e])
|
|
1094
|
-
if (!
|
|
1094
|
+
if (!ye(u, l))
|
|
1095
1095
|
return !1;
|
|
1096
1096
|
}
|
|
1097
1097
|
if (q(t.key) && n) {
|
|
@@ -1159,7 +1159,7 @@ function ft(t) {
|
|
|
1159
1159
|
alias: n.alias
|
|
1160
1160
|
};
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function ve(t) {
|
|
1163
1163
|
const { i18n: e } = vt, n = [], o = Jt(t);
|
|
1164
1164
|
for (const { id: i, name: a, alias: c } of o) {
|
|
1165
1165
|
let u = e.global.t(a);
|
|
@@ -1167,7 +1167,7 @@ function Ce(t) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
return k(n);
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Ht(t, e) {
|
|
1171
1171
|
const { properties: n } = E.runtime, { activeObject: o, activeComp: i, depends: a } = E.app, c = [], u = Mt(o.type, o.subtype);
|
|
1172
1172
|
if (!u)
|
|
1173
1173
|
return c;
|
|
@@ -1179,7 +1179,7 @@ function $t(t, e) {
|
|
|
1179
1179
|
return console.assert(!1, "invalid element", l.key), c;
|
|
1180
1180
|
if (n[_.key] && n[_.key][u])
|
|
1181
1181
|
for (const { keys: d, names: h, raw: p } of n[_.key][u])
|
|
1182
|
-
e === "write" &&
|
|
1182
|
+
e === "write" && ye(d, p) || c.push({
|
|
1183
1183
|
id: Zt("elementProperty", t, d),
|
|
1184
1184
|
kind: "elementProperty",
|
|
1185
1185
|
names: h,
|
|
@@ -1306,7 +1306,7 @@ function yt(t) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
function eo(t, e) {
|
|
1309
|
-
const n = [], o =
|
|
1309
|
+
const n = [], o = Ht(t, e);
|
|
1310
1310
|
for (const { id: i, kind: a, names: c } of o)
|
|
1311
1311
|
n.push([wn(a, c), i]);
|
|
1312
1312
|
return k(n);
|
|
@@ -1353,7 +1353,7 @@ const Mi = {
|
|
|
1353
1353
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1354
1354
|
const e = this.getField("NODE");
|
|
1355
1355
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1356
|
-
const n =
|
|
1356
|
+
const n = Je(this.node.id)?.[0];
|
|
1357
1357
|
if (!n)
|
|
1358
1358
|
return;
|
|
1359
1359
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
@@ -1372,7 +1372,7 @@ const Mi = {
|
|
|
1372
1372
|
}, 0);
|
|
1373
1373
|
},
|
|
1374
1374
|
genNodeOpts_: function() {
|
|
1375
|
-
return
|
|
1375
|
+
return ve("onEvent");
|
|
1376
1376
|
},
|
|
1377
1377
|
genEventOpts_: function() {
|
|
1378
1378
|
return Ni(this.node.id);
|
|
@@ -1396,14 +1396,14 @@ const Mi = {
|
|
|
1396
1396
|
const n = this.node.key !== e.key;
|
|
1397
1397
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1398
1398
|
const o = this.getField("EVENT");
|
|
1399
|
-
if (o.getOptions(!1), n || !
|
|
1400
|
-
const i =
|
|
1399
|
+
if (o.getOptions(!1), n || !xe(this.event.id)) {
|
|
1400
|
+
const i = Je(this.node.id)?.[0];
|
|
1401
1401
|
o.setValue(i?.id ?? "");
|
|
1402
1402
|
}
|
|
1403
1403
|
this.onEventChange_(o.getValue());
|
|
1404
1404
|
},
|
|
1405
1405
|
onEventChange_: function(t) {
|
|
1406
|
-
const e =
|
|
1406
|
+
const e = xe(t);
|
|
1407
1407
|
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
1408
|
this.ensureBlocks_();
|
|
1409
1409
|
}, 0);
|
|
@@ -1415,7 +1415,7 @@ const Mi = {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
for (let e = 0; e < this.event.params.length; e++)
|
|
1417
1417
|
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1418
|
-
const { kind: t } =
|
|
1418
|
+
const { kind: t } = en(this.event.id);
|
|
1419
1419
|
if (t === "multipleRefEvent")
|
|
1420
1420
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1421
1421
|
else if (this.getInput("REF_KEY")) {
|
|
@@ -1444,7 +1444,7 @@ const Mi = {
|
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
1446
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1447
|
-
const e =
|
|
1447
|
+
const e = xe(this.event.id);
|
|
1448
1448
|
if (!e) {
|
|
1449
1449
|
this.setWarningText(f("WARN_EVENT_NOT_FOUND"));
|
|
1450
1450
|
return;
|
|
@@ -1563,17 +1563,17 @@ const Ui = {
|
|
|
1563
1563
|
};
|
|
1564
1564
|
g.trigger_app_event_v1 = Ui;
|
|
1565
1565
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1566
|
-
const e = s.quote_, n = t
|
|
1567
|
-
let
|
|
1568
|
-
for (let
|
|
1569
|
-
const
|
|
1566
|
+
const e = s.quote_, n = t;
|
|
1567
|
+
let o = "";
|
|
1568
|
+
for (let a = 0; a < n.event.params.length; a++) {
|
|
1569
|
+
const c = s.valueToCode(
|
|
1570
1570
|
n,
|
|
1571
|
-
"PARAM" +
|
|
1571
|
+
"PARAM" + a,
|
|
1572
1572
|
r.NONE
|
|
1573
1573
|
);
|
|
1574
|
-
|
|
1574
|
+
o && (o += ", "), o += c;
|
|
1575
1575
|
}
|
|
1576
|
-
return `
|
|
1576
|
+
return `__triggerEventV1__(${e(n.event.id)}, ${o});
|
|
1577
1577
|
`;
|
|
1578
1578
|
};
|
|
1579
1579
|
T([
|
|
@@ -1755,7 +1755,7 @@ const Yi = {
|
|
|
1755
1755
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1756
1756
|
const e = this.getField("NODE");
|
|
1757
1757
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1758
|
-
const n =
|
|
1758
|
+
const n = qe(this.node.id)?.[0];
|
|
1759
1759
|
if (!n)
|
|
1760
1760
|
return;
|
|
1761
1761
|
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 +1774,7 @@ const Yi = {
|
|
|
1774
1774
|
}, 0);
|
|
1775
1775
|
},
|
|
1776
1776
|
genNodeOpts_: function() {
|
|
1777
|
-
return
|
|
1777
|
+
return ve("callMethod");
|
|
1778
1778
|
},
|
|
1779
1779
|
genMethodOpts_: function() {
|
|
1780
1780
|
return Si(this.node.id);
|
|
@@ -1798,14 +1798,14 @@ const Yi = {
|
|
|
1798
1798
|
const n = this.node.key !== e.key;
|
|
1799
1799
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1800
1800
|
const o = this.getField("METHOD");
|
|
1801
|
-
if (o.getOptions(!1), n || !
|
|
1802
|
-
const i =
|
|
1801
|
+
if (o.getOptions(!1), n || !Ye(this.method.id)) {
|
|
1802
|
+
const i = qe(this.node.id)?.[0];
|
|
1803
1803
|
o.setValue(i?.id ?? "");
|
|
1804
1804
|
}
|
|
1805
1805
|
this.onMethodChange_(o.getValue());
|
|
1806
1806
|
},
|
|
1807
1807
|
onMethodChange_: function(t) {
|
|
1808
|
-
const e =
|
|
1808
|
+
const e = Ye(t);
|
|
1809
1809
|
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
1810
|
this.ensureBlocks_();
|
|
1811
1811
|
}, 0);
|
|
@@ -1866,7 +1866,7 @@ const Yi = {
|
|
|
1866
1866
|
return;
|
|
1867
1867
|
}
|
|
1868
1868
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1869
|
-
const e =
|
|
1869
|
+
const e = Ye(this.method.id);
|
|
1870
1870
|
if (!e) {
|
|
1871
1871
|
this.setWarningText(f("WARN_METHOD_NOT_FOUND"));
|
|
1872
1872
|
return;
|
|
@@ -2017,7 +2017,7 @@ const wi = {
|
|
|
2017
2017
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
2018
2018
|
const e = this.getField("METHOD");
|
|
2019
2019
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
2020
|
-
const n =
|
|
2020
|
+
const n = Qe(this.method.id)?.[0];
|
|
2021
2021
|
if (!n)
|
|
2022
2022
|
return;
|
|
2023
2023
|
this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -2059,14 +2059,14 @@ const wi = {
|
|
|
2059
2059
|
const n = this.method.id !== e.id;
|
|
2060
2060
|
this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
|
|
2061
2061
|
const o = this.getField("OUTPUT");
|
|
2062
|
-
if (o.getOptions(!1), n || !
|
|
2063
|
-
const i =
|
|
2062
|
+
if (o.getOptions(!1), n || !Fe(this.method.id, this.output.key)) {
|
|
2063
|
+
const i = Qe(this.method.id)?.[0];
|
|
2064
2064
|
o.setValue(i?.key ?? "");
|
|
2065
2065
|
}
|
|
2066
2066
|
this.onOutputChange_(o.getValue());
|
|
2067
2067
|
},
|
|
2068
2068
|
onOutputChange_: function(t) {
|
|
2069
|
-
const e =
|
|
2069
|
+
const e = Fe(this.method.id, t);
|
|
2070
2070
|
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
2071
|
},
|
|
2072
2072
|
updateShape_: function() {
|
|
@@ -2094,7 +2094,7 @@ const wi = {
|
|
|
2094
2094
|
return;
|
|
2095
2095
|
}
|
|
2096
2096
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
2097
|
-
const e =
|
|
2097
|
+
const e = Fe(this.method.id, this.output.key);
|
|
2098
2098
|
if (!e) {
|
|
2099
2099
|
this.setWarningText(f("WARN_OUTPUT_NOT_FOUND"));
|
|
2100
2100
|
return;
|
|
@@ -2175,7 +2175,7 @@ const Ki = {
|
|
|
2175
2175
|
this.app.id = t.id, this.app.name = t.name;
|
|
2176
2176
|
const e = this.getField("APP");
|
|
2177
2177
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
2178
|
-
const n =
|
|
2178
|
+
const n = Xe(this.app.id)?.[0];
|
|
2179
2179
|
if (!n)
|
|
2180
2180
|
return;
|
|
2181
2181
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -2218,13 +2218,13 @@ const Ki = {
|
|
|
2218
2218
|
const n = this.app.id !== e.id;
|
|
2219
2219
|
this.app.id = e.id, this.app.name = e.name;
|
|
2220
2220
|
const o = this.getField("PAGE");
|
|
2221
|
-
if (o.getOptions(!1), n || !
|
|
2222
|
-
const a =
|
|
2221
|
+
if (o.getOptions(!1), n || !Ve(this.app.id, this.page.id)) {
|
|
2222
|
+
const a = Xe(this.app.id)?.[0]?.id ?? "";
|
|
2223
2223
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
2224
2224
|
}
|
|
2225
2225
|
},
|
|
2226
2226
|
onPageChange_: function(t) {
|
|
2227
|
-
const e =
|
|
2227
|
+
const e = Ve(this.app.id, t);
|
|
2228
2228
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2229
2229
|
},
|
|
2230
2230
|
checkWarning_: function() {
|
|
@@ -2234,7 +2234,7 @@ const Ki = {
|
|
|
2234
2234
|
return;
|
|
2235
2235
|
}
|
|
2236
2236
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
2237
|
-
const e =
|
|
2237
|
+
const e = Ve(this.app.id, this.page.id);
|
|
2238
2238
|
if (!e) {
|
|
2239
2239
|
this.setWarningText(f("WARN_PAGE_NOT_FOUND"));
|
|
2240
2240
|
return;
|
|
@@ -2248,7 +2248,7 @@ s.forBlock.navigate_to_v1 = function(t) {
|
|
|
2248
2248
|
return `__navigateToV1__(${n}, ${o});
|
|
2249
2249
|
`;
|
|
2250
2250
|
};
|
|
2251
|
-
const
|
|
2251
|
+
const $i = {
|
|
2252
2252
|
init: function() {
|
|
2253
2253
|
this.comp = {
|
|
2254
2254
|
id: void 0,
|
|
@@ -2308,12 +2308,12 @@ const Hi = {
|
|
|
2308
2308
|
this.setWarningText(null);
|
|
2309
2309
|
}
|
|
2310
2310
|
};
|
|
2311
|
-
g.select_comp_v1 =
|
|
2311
|
+
g.select_comp_v1 = $i;
|
|
2312
2312
|
s.forBlock.select_comp_v1 = function(t) {
|
|
2313
2313
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
2314
2314
|
return [e(o), r.ATOMIC];
|
|
2315
2315
|
};
|
|
2316
|
-
const
|
|
2316
|
+
const Hi = {
|
|
2317
2317
|
init: function() {
|
|
2318
2318
|
this.node = {
|
|
2319
2319
|
id: "",
|
|
@@ -2337,7 +2337,7 @@ const $i = {
|
|
|
2337
2337
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2338
2338
|
const e = this.getField("NODE");
|
|
2339
2339
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2340
|
-
const n =
|
|
2340
|
+
const n = Ht(this.node.id, "read")?.[0];
|
|
2341
2341
|
if (!n)
|
|
2342
2342
|
return;
|
|
2343
2343
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2356,7 +2356,7 @@ const $i = {
|
|
|
2356
2356
|
}, 0);
|
|
2357
2357
|
},
|
|
2358
2358
|
genNodeOpts_: function() {
|
|
2359
|
-
return
|
|
2359
|
+
return ve("getProperty");
|
|
2360
2360
|
},
|
|
2361
2361
|
genPropertyOpts_: function() {
|
|
2362
2362
|
return eo(this.node.id, "read");
|
|
@@ -2381,7 +2381,7 @@ const $i = {
|
|
|
2381
2381
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2382
2382
|
const o = this.getField("PROPERTY");
|
|
2383
2383
|
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2384
|
-
const i =
|
|
2384
|
+
const i = Ht(this.node.id, "read")?.[0];
|
|
2385
2385
|
o.setValue(i?.id ?? "");
|
|
2386
2386
|
}
|
|
2387
2387
|
this.onPropChange_(o.getValue());
|
|
@@ -2413,10 +2413,10 @@ const $i = {
|
|
|
2413
2413
|
M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
2414
2414
|
}
|
|
2415
2415
|
};
|
|
2416
|
-
g.get_app_property_v1 =
|
|
2416
|
+
g.get_app_property_v1 = Hi;
|
|
2417
2417
|
s.forBlock.get_app_property_v1 = function(t) {
|
|
2418
2418
|
const e = s.quote_;
|
|
2419
|
-
return [`__getPropertyV1__(${e(t.property.id)})`, r.ATOMIC];
|
|
2419
|
+
return [`__getPropertyV1__(${e(t.property.id)}, ${e("")})`, r.ATOMIC];
|
|
2420
2420
|
};
|
|
2421
2421
|
const Gi = {
|
|
2422
2422
|
init: function() {
|
|
@@ -2442,7 +2442,7 @@ const Gi = {
|
|
|
2442
2442
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2443
2443
|
const e = this.getField("NODE");
|
|
2444
2444
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2445
|
-
const n =
|
|
2445
|
+
const n = Ht(this.node.id, "write")?.[0];
|
|
2446
2446
|
if (!n)
|
|
2447
2447
|
return;
|
|
2448
2448
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
@@ -2461,7 +2461,7 @@ const Gi = {
|
|
|
2461
2461
|
}, 0);
|
|
2462
2462
|
},
|
|
2463
2463
|
genNodeOpts_: function() {
|
|
2464
|
-
return
|
|
2464
|
+
return ve("setProperty");
|
|
2465
2465
|
},
|
|
2466
2466
|
genPropertyOpts_: function() {
|
|
2467
2467
|
return eo(this.node.id, "write");
|
|
@@ -2486,7 +2486,7 @@ const Gi = {
|
|
|
2486
2486
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2487
2487
|
const o = this.getField("PROPERTY");
|
|
2488
2488
|
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2489
|
-
const i =
|
|
2489
|
+
const i = Ht(this.node.id, "write")?.[0];
|
|
2490
2490
|
o.setValue(i?.id ?? "");
|
|
2491
2491
|
}
|
|
2492
2492
|
this.onPropChange_(o.getValue());
|
|
@@ -2536,8 +2536,8 @@ const Gi = {
|
|
|
2536
2536
|
};
|
|
2537
2537
|
g.set_app_property_v1 = Gi;
|
|
2538
2538
|
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});
|
|
2539
|
+
const e = s.quote_, n = t, o = "", i = s.valueToCode(n, "VALUE", r.NONE);
|
|
2540
|
+
return `__setPropertyV1__(${e(n.property.id)}, ${e(o)}, ${i});
|
|
2541
2541
|
`;
|
|
2542
2542
|
};
|
|
2543
2543
|
const Wi = {
|
|
@@ -3534,7 +3534,7 @@ function oo(t) {
|
|
|
3534
3534
|
e.push([i, o]);
|
|
3535
3535
|
}), k(e);
|
|
3536
3536
|
}
|
|
3537
|
-
function
|
|
3537
|
+
function ze() {
|
|
3538
3538
|
return E.compute.activeFunc;
|
|
3539
3539
|
}
|
|
3540
3540
|
function Nn(t) {
|
|
@@ -3923,7 +3923,7 @@ const ns = {
|
|
|
3923
3923
|
initData_: function() {
|
|
3924
3924
|
if (this.func.id)
|
|
3925
3925
|
return;
|
|
3926
|
-
const { id: t, inputs: e } =
|
|
3926
|
+
const { id: t, inputs: e } = ze();
|
|
3927
3927
|
this.func.id = t, this.func.inputs = e;
|
|
3928
3928
|
},
|
|
3929
3929
|
saveExtraState: function() {
|
|
@@ -3960,7 +3960,7 @@ const ns = {
|
|
|
3960
3960
|
Y(this, t);
|
|
3961
3961
|
},
|
|
3962
3962
|
checkWarning_: function() {
|
|
3963
|
-
const { id: t, inputs: e } =
|
|
3963
|
+
const { id: t, inputs: e } = ze();
|
|
3964
3964
|
if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
|
|
3965
3965
|
this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
|
|
3966
3966
|
return;
|
|
@@ -3992,7 +3992,7 @@ const os = {
|
|
|
3992
3992
|
initData_: function() {
|
|
3993
3993
|
if (this.output.id)
|
|
3994
3994
|
return;
|
|
3995
|
-
const t =
|
|
3995
|
+
const t = ze().outputs?.[0];
|
|
3996
3996
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3997
3997
|
},
|
|
3998
3998
|
saveExtraState: function() {
|
|
@@ -4135,13 +4135,13 @@ function mt(t) {
|
|
|
4135
4135
|
const { spaces: e } = E.data;
|
|
4136
4136
|
return e.find((n) => n.id === t);
|
|
4137
4137
|
}
|
|
4138
|
-
function
|
|
4138
|
+
function Ce() {
|
|
4139
4139
|
const t = [];
|
|
4140
4140
|
return et().forEach(({ id: n, name: o }) => {
|
|
4141
4141
|
t.push([o, n]);
|
|
4142
4142
|
}), k(t);
|
|
4143
4143
|
}
|
|
4144
|
-
function
|
|
4144
|
+
function H(t) {
|
|
4145
4145
|
const { spaces: e } = E.data, n = e.find((o) => o.id === t);
|
|
4146
4146
|
return n ? n.tables : [];
|
|
4147
4147
|
}
|
|
@@ -4150,9 +4150,9 @@ function J(t, e) {
|
|
|
4150
4150
|
if (o)
|
|
4151
4151
|
return o.tables.find((i) => i.id === e);
|
|
4152
4152
|
}
|
|
4153
|
-
function
|
|
4153
|
+
function ke(t) {
|
|
4154
4154
|
const e = [];
|
|
4155
|
-
return
|
|
4155
|
+
return H(t).forEach(({ id: o, name: i }) => {
|
|
4156
4156
|
e.push([i, o]);
|
|
4157
4157
|
}), k(e);
|
|
4158
4158
|
}
|
|
@@ -4163,7 +4163,7 @@ function _e(t, e) {
|
|
|
4163
4163
|
const i = o.tables.find((a) => a.id === e);
|
|
4164
4164
|
return i ? i.columns : [];
|
|
4165
4165
|
}
|
|
4166
|
-
function
|
|
4166
|
+
function we(t, e, n) {
|
|
4167
4167
|
const { spaces: o } = E.data, i = o.find((c) => c.id === t);
|
|
4168
4168
|
if (!i)
|
|
4169
4169
|
return;
|
|
@@ -4184,7 +4184,7 @@ function ss(t) {
|
|
|
4184
4184
|
let n, o;
|
|
4185
4185
|
const i = et()?.[0];
|
|
4186
4186
|
if (i) {
|
|
4187
|
-
const u =
|
|
4187
|
+
const u = H(i.id)?.[0];
|
|
4188
4188
|
if (u) {
|
|
4189
4189
|
n = {
|
|
4190
4190
|
space: {
|
|
@@ -4208,7 +4208,7 @@ function ss(t) {
|
|
|
4208
4208
|
type: "update_column_v1",
|
|
4209
4209
|
extraState: n,
|
|
4210
4210
|
fields: o
|
|
4211
|
-
}, c =
|
|
4211
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4212
4212
|
e.connect(c.outputConnection);
|
|
4213
4213
|
}
|
|
4214
4214
|
function as(t) {
|
|
@@ -4232,7 +4232,7 @@ function as(t) {
|
|
|
4232
4232
|
}
|
|
4233
4233
|
}
|
|
4234
4234
|
}
|
|
4235
|
-
}, o =
|
|
4235
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4236
4236
|
e.connect(o.previousConnection);
|
|
4237
4237
|
}
|
|
4238
4238
|
const cs = {
|
|
@@ -4317,7 +4317,7 @@ const rs = {
|
|
|
4317
4317
|
if (!t)
|
|
4318
4318
|
return;
|
|
4319
4319
|
this.space.id = t.id, this.space.name = t.name;
|
|
4320
|
-
const e =
|
|
4320
|
+
const e = H(this.space.id)?.[0];
|
|
4321
4321
|
if (!e)
|
|
4322
4322
|
return;
|
|
4323
4323
|
this.table.id = e.id, this.table.name = e.name;
|
|
@@ -4337,10 +4337,10 @@ const rs = {
|
|
|
4337
4337
|
}, 0);
|
|
4338
4338
|
},
|
|
4339
4339
|
genSpaceOpts_: function() {
|
|
4340
|
-
return
|
|
4340
|
+
return Ce();
|
|
4341
4341
|
},
|
|
4342
4342
|
genTableOpts_: function() {
|
|
4343
|
-
return
|
|
4343
|
+
return ke(this.space.id);
|
|
4344
4344
|
},
|
|
4345
4345
|
genColumnOpts_: function() {
|
|
4346
4346
|
return is(this.space.id, this.table.id);
|
|
@@ -4363,7 +4363,7 @@ const rs = {
|
|
|
4363
4363
|
}
|
|
4364
4364
|
const n = e.id !== this.space.id;
|
|
4365
4365
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4366
|
-
const o =
|
|
4366
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4367
4367
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4368
4368
|
}
|
|
4369
4369
|
},
|
|
@@ -4374,13 +4374,13 @@ const rs = {
|
|
|
4374
4374
|
return;
|
|
4375
4375
|
}
|
|
4376
4376
|
const n = e.id !== this.table.id;
|
|
4377
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4377
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !we(this.space.id, this.table.id, this.column.id)) {
|
|
4378
4378
|
const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4379
4379
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4380
4380
|
}
|
|
4381
4381
|
},
|
|
4382
4382
|
onColumnChange_: function(t) {
|
|
4383
|
-
const e =
|
|
4383
|
+
const e = we(this.space.id, this.table.id, t);
|
|
4384
4384
|
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
4385
|
},
|
|
4386
4386
|
updateShape_: function() {
|
|
@@ -4399,7 +4399,7 @@ const rs = {
|
|
|
4399
4399
|
n && n.dispose();
|
|
4400
4400
|
else if (n)
|
|
4401
4401
|
return;
|
|
4402
|
-
const o =
|
|
4402
|
+
const o = je(this.workspace, this.column.type);
|
|
4403
4403
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4404
4404
|
},
|
|
4405
4405
|
updateCheck_: function() {
|
|
@@ -4419,7 +4419,7 @@ const rs = {
|
|
|
4419
4419
|
return;
|
|
4420
4420
|
}
|
|
4421
4421
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4422
|
-
const n =
|
|
4422
|
+
const n = we(
|
|
4423
4423
|
this.space.id,
|
|
4424
4424
|
this.table.id,
|
|
4425
4425
|
this.column.id
|
|
@@ -4547,7 +4547,7 @@ function ps(t) {
|
|
|
4547
4547
|
const e = t.getInput("TABLE").connection;
|
|
4548
4548
|
if (e.targetBlock())
|
|
4549
4549
|
return;
|
|
4550
|
-
const n = et()?.[0], o =
|
|
4550
|
+
const n = et()?.[0], o = H(n?.id ?? "")?.[0], i = {
|
|
4551
4551
|
type: "select_table_v1",
|
|
4552
4552
|
extraState: {
|
|
4553
4553
|
space: {
|
|
@@ -4559,14 +4559,14 @@ function ps(t) {
|
|
|
4559
4559
|
name: o?.name ?? ""
|
|
4560
4560
|
}
|
|
4561
4561
|
}
|
|
4562
|
-
}, a =
|
|
4562
|
+
}, a = $.blocks.append(i, t.workspace);
|
|
4563
4563
|
e.connect(a.outputConnection);
|
|
4564
4564
|
}
|
|
4565
4565
|
function ds(t) {
|
|
4566
4566
|
const e = t.getInput("CONDITION").connection;
|
|
4567
4567
|
if (e.targetBlock())
|
|
4568
4568
|
return;
|
|
4569
|
-
const n = et()?.[0], o =
|
|
4569
|
+
const n = et()?.[0], o = H(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
|
|
4570
4570
|
type: "cond_atomic_v1",
|
|
4571
4571
|
extraState: {
|
|
4572
4572
|
space: {
|
|
@@ -4584,7 +4584,7 @@ function ds(t) {
|
|
|
4584
4584
|
extend: i?.extend ?? ""
|
|
4585
4585
|
}
|
|
4586
4586
|
}
|
|
4587
|
-
}, c =
|
|
4587
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4588
4588
|
e.connect(c.outputConnection);
|
|
4589
4589
|
}
|
|
4590
4590
|
function hs(t) {
|
|
@@ -4608,7 +4608,7 @@ function hs(t) {
|
|
|
4608
4608
|
}
|
|
4609
4609
|
}
|
|
4610
4610
|
}
|
|
4611
|
-
}, o =
|
|
4611
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4612
4612
|
e.connect(o.previousConnection);
|
|
4613
4613
|
}
|
|
4614
4614
|
const fs = {
|
|
@@ -4678,7 +4678,7 @@ function ms(t) {
|
|
|
4678
4678
|
let n, o;
|
|
4679
4679
|
const i = et()?.[0];
|
|
4680
4680
|
if (i) {
|
|
4681
|
-
const u =
|
|
4681
|
+
const u = H(i.id)?.[0];
|
|
4682
4682
|
if (u) {
|
|
4683
4683
|
n = {
|
|
4684
4684
|
space: {
|
|
@@ -4702,7 +4702,7 @@ function ms(t) {
|
|
|
4702
4702
|
type: "select_column_v1",
|
|
4703
4703
|
extraState: n,
|
|
4704
4704
|
fields: o
|
|
4705
|
-
}, c =
|
|
4705
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
4706
4706
|
e.connect(c.outputConnection);
|
|
4707
4707
|
}
|
|
4708
4708
|
function Ts(t) {
|
|
@@ -4711,7 +4711,7 @@ function Ts(t) {
|
|
|
4711
4711
|
return;
|
|
4712
4712
|
const n = {
|
|
4713
4713
|
type: "cond_atomic_v1"
|
|
4714
|
-
}, o =
|
|
4714
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4715
4715
|
e.connect(o.outputConnection);
|
|
4716
4716
|
}
|
|
4717
4717
|
function Es(t) {
|
|
@@ -4748,7 +4748,7 @@ function Es(t) {
|
|
|
4748
4748
|
}
|
|
4749
4749
|
}
|
|
4750
4750
|
}
|
|
4751
|
-
}, o =
|
|
4751
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4752
4752
|
e.connect(o.outputConnection);
|
|
4753
4753
|
}
|
|
4754
4754
|
function gs(t) {
|
|
@@ -4772,7 +4772,7 @@ function gs(t) {
|
|
|
4772
4772
|
}
|
|
4773
4773
|
}
|
|
4774
4774
|
}
|
|
4775
|
-
}, o =
|
|
4775
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
4776
4776
|
e.connect(o.previousConnection);
|
|
4777
4777
|
}
|
|
4778
4778
|
T([
|
|
@@ -4929,7 +4929,7 @@ const ys = {
|
|
|
4929
4929
|
this.space.id = t.id, this.space.name = t.name;
|
|
4930
4930
|
const e = this.getField("SPACE");
|
|
4931
4931
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4932
|
-
const n =
|
|
4932
|
+
const n = H(this.space.id)?.[0];
|
|
4933
4933
|
if (!n)
|
|
4934
4934
|
return;
|
|
4935
4935
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4949,10 +4949,10 @@ const ys = {
|
|
|
4949
4949
|
}, 0);
|
|
4950
4950
|
},
|
|
4951
4951
|
genSpaceOpts_: function() {
|
|
4952
|
-
return
|
|
4952
|
+
return Ce();
|
|
4953
4953
|
},
|
|
4954
4954
|
genTableOpts_: function() {
|
|
4955
|
-
return
|
|
4955
|
+
return ke(this.space.id);
|
|
4956
4956
|
},
|
|
4957
4957
|
genColumnOpts_: function() {
|
|
4958
4958
|
const t = [];
|
|
@@ -4990,7 +4990,7 @@ const ys = {
|
|
|
4990
4990
|
}
|
|
4991
4991
|
const n = e.id !== this.space.id;
|
|
4992
4992
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
4993
|
-
const o =
|
|
4993
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4994
4994
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4995
4995
|
}
|
|
4996
4996
|
},
|
|
@@ -5144,7 +5144,7 @@ const vs = {
|
|
|
5144
5144
|
this.space.id = t.id, this.space.name = t.name;
|
|
5145
5145
|
const e = this.getField("SPACE");
|
|
5146
5146
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
5147
|
-
const n =
|
|
5147
|
+
const n = H(this.space.id)?.[0];
|
|
5148
5148
|
if (!n)
|
|
5149
5149
|
return;
|
|
5150
5150
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -5161,10 +5161,10 @@ const vs = {
|
|
|
5161
5161
|
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
5162
|
},
|
|
5163
5163
|
genSpaceOpts_: function() {
|
|
5164
|
-
return
|
|
5164
|
+
return Ce();
|
|
5165
5165
|
},
|
|
5166
5166
|
genTableOpts_: function() {
|
|
5167
|
-
return
|
|
5167
|
+
return ke(this.space.id);
|
|
5168
5168
|
},
|
|
5169
5169
|
onchange: function(t) {
|
|
5170
5170
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -5184,7 +5184,7 @@ const vs = {
|
|
|
5184
5184
|
}
|
|
5185
5185
|
let n = !1;
|
|
5186
5186
|
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 =
|
|
5187
|
+
const i = H(this.space.id)?.[0];
|
|
5188
5188
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
5189
5189
|
}
|
|
5190
5190
|
},
|
|
@@ -5325,7 +5325,7 @@ const Ls = {
|
|
|
5325
5325
|
this.space.id = t.id, this.space.name = t.name;
|
|
5326
5326
|
const e = this.getField("SPACE");
|
|
5327
5327
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
5328
|
-
const n =
|
|
5328
|
+
const n = H(this.space.id)?.[0];
|
|
5329
5329
|
if (!n)
|
|
5330
5330
|
return;
|
|
5331
5331
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5345,10 +5345,10 @@ const Ls = {
|
|
|
5345
5345
|
}, 0);
|
|
5346
5346
|
},
|
|
5347
5347
|
genSpaceOpts_: function() {
|
|
5348
|
-
return
|
|
5348
|
+
return Ce();
|
|
5349
5349
|
},
|
|
5350
5350
|
genTableOpts_: function() {
|
|
5351
|
-
return
|
|
5351
|
+
return ke(this.space.id);
|
|
5352
5352
|
},
|
|
5353
5353
|
genColumnOpts_: function() {
|
|
5354
5354
|
const t = [];
|
|
@@ -5386,7 +5386,7 @@ const Ls = {
|
|
|
5386
5386
|
}
|
|
5387
5387
|
const n = e.id !== this.space.id;
|
|
5388
5388
|
if (this.space.id = e.id, this.space.name = e.name, n || !J(this.space.id, this.table.id)) {
|
|
5389
|
-
const o =
|
|
5389
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5390
5390
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5391
5391
|
}
|
|
5392
5392
|
},
|
|
@@ -5415,7 +5415,7 @@ const Ls = {
|
|
|
5415
5415
|
}
|
|
5416
5416
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5417
5417
|
i && i.dispose();
|
|
5418
|
-
const a =
|
|
5418
|
+
const a = je(this.workspace, n.type);
|
|
5419
5419
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5420
5420
|
},
|
|
5421
5421
|
decompose: function(t) {
|
|
@@ -5506,7 +5506,7 @@ const Ls = {
|
|
|
5506
5506
|
if (!c)
|
|
5507
5507
|
continue;
|
|
5508
5508
|
n.setCheck(null);
|
|
5509
|
-
const u =
|
|
5509
|
+
const u = je(this.workspace, c.type);
|
|
5510
5510
|
u && o.connect(u.outputConnection);
|
|
5511
5511
|
}
|
|
5512
5512
|
},
|
|
@@ -5557,7 +5557,7 @@ function Ss(t) {
|
|
|
5557
5557
|
let n, o;
|
|
5558
5558
|
const i = et()?.[0];
|
|
5559
5559
|
if (i) {
|
|
5560
|
-
const u =
|
|
5560
|
+
const u = H(i.id)?.[0];
|
|
5561
5561
|
if (u) {
|
|
5562
5562
|
n = {
|
|
5563
5563
|
space: {
|
|
@@ -5581,7 +5581,7 @@ function Ss(t) {
|
|
|
5581
5581
|
type: "update_column_v1",
|
|
5582
5582
|
extraState: n,
|
|
5583
5583
|
fields: o
|
|
5584
|
-
}, c =
|
|
5584
|
+
}, c = $.blocks.append(a, t.workspace);
|
|
5585
5585
|
e.connect(c.outputConnection);
|
|
5586
5586
|
}
|
|
5587
5587
|
function Bs(t) {
|
|
@@ -5590,7 +5590,7 @@ function Bs(t) {
|
|
|
5590
5590
|
return;
|
|
5591
5591
|
const n = {
|
|
5592
5592
|
type: "cond_atomic_v1"
|
|
5593
|
-
}, o =
|
|
5593
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
5594
5594
|
e.connect(o.outputConnection);
|
|
5595
5595
|
}
|
|
5596
5596
|
function bs(t) {
|
|
@@ -5614,7 +5614,7 @@ function bs(t) {
|
|
|
5614
5614
|
}
|
|
5615
5615
|
}
|
|
5616
5616
|
}
|
|
5617
|
-
}, o =
|
|
5617
|
+
}, o = $.blocks.append(n, t.workspace);
|
|
5618
5618
|
e.connect(o.previousConnection);
|
|
5619
5619
|
}
|
|
5620
5620
|
const Ps = {
|
|
@@ -5828,7 +5828,7 @@ const Ks = {
|
|
|
5828
5828
|
}
|
|
5829
5829
|
};
|
|
5830
5830
|
g.list_create_item_v1 = Ks;
|
|
5831
|
-
const
|
|
5831
|
+
const $s = {
|
|
5832
5832
|
init: function() {
|
|
5833
5833
|
this.itemCount_ = 0, this.setMutator(
|
|
5834
5834
|
new Tt.MutatorIcon(
|
|
@@ -5910,7 +5910,7 @@ const Hs = {
|
|
|
5910
5910
|
this.removeInput("ADD" + t);
|
|
5911
5911
|
}
|
|
5912
5912
|
};
|
|
5913
|
-
g.list_create_v1 =
|
|
5913
|
+
g.list_create_v1 = $s;
|
|
5914
5914
|
s.forBlock.list_create_v1 = function(t) {
|
|
5915
5915
|
const e = t, n = new Array(e.itemCount_);
|
|
5916
5916
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -6126,7 +6126,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
6126
6126
|
return `${e}[${n}] = ${o};
|
|
6127
6127
|
`;
|
|
6128
6128
|
};
|
|
6129
|
-
const
|
|
6129
|
+
const Hs = {
|
|
6130
6130
|
// logic_compare
|
|
6131
6131
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
6132
6132
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -6140,7 +6140,7 @@ const $s = {
|
|
|
6140
6140
|
};
|
|
6141
6141
|
B.register(
|
|
6142
6142
|
"logic_op_tooltip_v1",
|
|
6143
|
-
B.buildTooltipForDropdown("OP",
|
|
6143
|
+
B.buildTooltipForDropdown("OP", Hs)
|
|
6144
6144
|
);
|
|
6145
6145
|
T([
|
|
6146
6146
|
{
|
|
@@ -7898,7 +7898,7 @@ const Sn = C.xml, na = {
|
|
|
7898
7898
|
g.procedure_def_container_v1 = na;
|
|
7899
7899
|
const oa = {
|
|
7900
7900
|
init: function() {
|
|
7901
|
-
const t = new ht(
|
|
7901
|
+
const t = new ht(He.DEFAULT_ARG);
|
|
7902
7902
|
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
7903
|
},
|
|
7904
7904
|
validator_: function(t) {
|
|
@@ -7923,9 +7923,9 @@ const ia = {
|
|
|
7923
7923
|
init: function() {
|
|
7924
7924
|
this.withReturn = !1, this.args = [];
|
|
7925
7925
|
const t = new ht(
|
|
7926
|
-
|
|
7926
|
+
He.findLegalName("", this)
|
|
7927
7927
|
);
|
|
7928
|
-
t.setValidator(
|
|
7928
|
+
t.setValidator(He.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7929
7929
|
new Tt.MutatorIcon(
|
|
7930
7930
|
["procedure_def_item_v1"],
|
|
7931
7931
|
this
|
|
@@ -8220,7 +8220,7 @@ const _a = {
|
|
|
8220
8220
|
};
|
|
8221
8221
|
},
|
|
8222
8222
|
loadExtraState: function(t) {
|
|
8223
|
-
this.space =
|
|
8223
|
+
this.space = Me(t.space), this.dir = Me(t.dir), this.resource = Me(t.resource);
|
|
8224
8224
|
},
|
|
8225
8225
|
genSpaceOpts_: function() {
|
|
8226
8226
|
return la();
|
|
@@ -9015,7 +9015,7 @@ Qt.getText_ = function() {
|
|
|
9015
9015
|
return wn(n, o);
|
|
9016
9016
|
} else if (this.name === "EVENT") {
|
|
9017
9017
|
const { kind: n, names: o } = e.event;
|
|
9018
|
-
return console.log(e.event),
|
|
9018
|
+
return console.log(e.event), Ie(n, o);
|
|
9019
9019
|
} else if (this.name === "METHOD") {
|
|
9020
9020
|
const { kind: n, names: o } = e.method;
|
|
9021
9021
|
return on(n, o);
|
|
@@ -9295,7 +9295,7 @@ function La(t) {
|
|
|
9295
9295
|
break;
|
|
9296
9296
|
}
|
|
9297
9297
|
}
|
|
9298
|
-
const
|
|
9298
|
+
const Ze = ["get_app_property_v1", "get_app_state_v1"];
|
|
9299
9299
|
function ut(t, e) {
|
|
9300
9300
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
9301
9301
|
}
|
|
@@ -9303,7 +9303,7 @@ function Sa(t) {
|
|
|
9303
9303
|
const e = [];
|
|
9304
9304
|
function n(o) {
|
|
9305
9305
|
for (const i of o.getChildren(!0))
|
|
9306
|
-
|
|
9306
|
+
Ze.includes(i.type) && e.push(i), n(i);
|
|
9307
9307
|
}
|
|
9308
9308
|
return n(t), e;
|
|
9309
9309
|
}
|
|
@@ -9326,11 +9326,11 @@ function Ba(t) {
|
|
|
9326
9326
|
function ba(t) {
|
|
9327
9327
|
const e = [];
|
|
9328
9328
|
for (const n of t.getChildren(!0))
|
|
9329
|
-
if (
|
|
9329
|
+
if (Ze.includes(n.type))
|
|
9330
9330
|
e.push(n);
|
|
9331
9331
|
else if (n.type === "object_get_v1") {
|
|
9332
9332
|
const o = n.getInputTargetBlock("OBJECT");
|
|
9333
|
-
o &&
|
|
9333
|
+
o && Ze.includes(o.type) && e.push(n);
|
|
9334
9334
|
}
|
|
9335
9335
|
return e;
|
|
9336
9336
|
}
|
|
@@ -9533,8 +9533,8 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9533
9533
|
onMouseover: h[3] || (h[3] = (P) => u.value = !0)
|
|
9534
9534
|
}, [
|
|
9535
9535
|
w("div", Va, [
|
|
9536
|
-
w("span", xa,
|
|
9537
|
-
a.desc ? (S(), Z("span", Ya,
|
|
9536
|
+
w("span", xa, $t(a.title), 1),
|
|
9537
|
+
a.desc ? (S(), Z("span", Ya, $t(a.desc), 1)) : rt("", !0)
|
|
9538
9538
|
]),
|
|
9539
9539
|
L(p),
|
|
9540
9540
|
L(m, {
|
|
@@ -9556,7 +9556,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9556
9556
|
class: "text-caption text-grey"
|
|
9557
9557
|
}, Ka = /* @__PURE__ */ ct({
|
|
9558
9558
|
__name: "index",
|
|
9559
|
-
props: /* @__PURE__ */
|
|
9559
|
+
props: /* @__PURE__ */ Ge({
|
|
9560
9560
|
lock: { type: Boolean }
|
|
9561
9561
|
}, {
|
|
9562
9562
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9576,7 +9576,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9576
9576
|
let U = "";
|
|
9577
9577
|
if (A.type.startsWith("on_app_event_v")) {
|
|
9578
9578
|
const nt = A, Ct = tt[nt.node.key];
|
|
9579
|
-
Ct && (U = n(Ct.name), nt.node.alias && (U += " / " + nt.node.alias), U += " - " +
|
|
9579
|
+
Ct && (U = n(Ct.name), nt.node.alias && (U += " / " + nt.node.alias), U += " - " + Ie(nt.event.kind, nt.event.names));
|
|
9580
9580
|
} else A.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : A.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : A.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : A.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + A.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
9581
9581
|
const At = A.getCommentText() ?? "";
|
|
9582
9582
|
p.push({
|
|
@@ -9643,7 +9643,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9643
9643
|
onStart: l
|
|
9644
9644
|
}, {
|
|
9645
9645
|
default: at(() => [
|
|
9646
|
-
(S(!0), Z(
|
|
9646
|
+
(S(!0), Z($n, null, ti(a.value, (A) => (S(), st(Fa, {
|
|
9647
9647
|
id: A.id,
|
|
9648
9648
|
key: A.id,
|
|
9649
9649
|
desc: A.desc,
|
|
@@ -9653,14 +9653,14 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9653
9653
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
9654
9654
|
]),
|
|
9655
9655
|
_: 1
|
|
9656
|
-
}, 8, ["modelValue"])) : (S(), Z("span", wa,
|
|
9656
|
+
}, 8, ["modelValue"])) : (S(), Z("span", wa, $t(R(n)("x-block-lib.noOption")), 1));
|
|
9657
9657
|
}
|
|
9658
|
-
}),
|
|
9658
|
+
}), $a = (t, e) => {
|
|
9659
9659
|
const n = t.__vccOpts || t;
|
|
9660
9660
|
for (const [o, i] of e)
|
|
9661
9661
|
n[o] = i;
|
|
9662
9662
|
return n;
|
|
9663
|
-
},
|
|
9663
|
+
}, Ha = /* @__PURE__ */ $a(Ka, [["__scopeId", "data-v-6cb62cd6"]]), Ga = /* @__PURE__ */ ct({
|
|
9664
9664
|
__name: "index",
|
|
9665
9665
|
props: {
|
|
9666
9666
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9710,7 +9710,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9710
9710
|
};
|
|
9711
9711
|
}), l = F(() => ({
|
|
9712
9712
|
height: "60px"
|
|
9713
|
-
})), { open: _ } =
|
|
9713
|
+
})), { open: _ } = tn(`blocklyNavigatorDlg${We()}`);
|
|
9714
9714
|
ei(() => {
|
|
9715
9715
|
_.value = !1;
|
|
9716
9716
|
});
|
|
@@ -9719,7 +9719,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9719
9719
|
t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
|
|
9720
9720
|
} }), (m, A) => {
|
|
9721
9721
|
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(
|
|
9722
|
+
return S(), Z($n, null, [
|
|
9723
9723
|
L(nt, {
|
|
9724
9724
|
modelValue: R(_),
|
|
9725
9725
|
"onUpdate:modelValue": A[5] || (A[5] = (G) => ne(_) ? _.value = G : null),
|
|
@@ -9728,7 +9728,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9728
9728
|
"no-click-animation": "",
|
|
9729
9729
|
persistent: "",
|
|
9730
9730
|
transition: "scroll-x-reverse-transition",
|
|
9731
|
-
onKeydown: A[6] || (A[6] =
|
|
9731
|
+
onKeydown: A[6] || (A[6] = Hn(Ft((G) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9732
9732
|
}, {
|
|
9733
9733
|
default: at(() => [
|
|
9734
9734
|
w("div", {
|
|
@@ -9757,7 +9757,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9757
9757
|
variant: "text",
|
|
9758
9758
|
onClick: A[0] || (A[0] = (G) => _.value = !1)
|
|
9759
9759
|
}),
|
|
9760
|
-
w("span", Wa,
|
|
9760
|
+
w("span", Wa, $t(R(n)("x-block-lib.navigator")), 1),
|
|
9761
9761
|
L(At)
|
|
9762
9762
|
]),
|
|
9763
9763
|
_: 1
|
|
@@ -9766,7 +9766,7 @@ const Ma = /* @__PURE__ */ ct({
|
|
|
9766
9766
|
class: "overflow-y-auto",
|
|
9767
9767
|
style: W(u.value)
|
|
9768
9768
|
}, [
|
|
9769
|
-
t.type === "list" ? (S(), st(
|
|
9769
|
+
t.type === "list" ? (S(), st(Ha, {
|
|
9770
9770
|
key: 0,
|
|
9771
9771
|
ref_key: "blockList",
|
|
9772
9772
|
ref: d,
|
|
@@ -10023,7 +10023,7 @@ function dc() {
|
|
|
10023
10023
|
y("compute_debug_trace_v1", [bt("OBJECT")])
|
|
10024
10024
|
), t;
|
|
10025
10025
|
}
|
|
10026
|
-
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc },
|
|
10026
|
+
const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
|
|
10027
10027
|
kind: "category",
|
|
10028
10028
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
10029
10029
|
categorystyle: "color_category",
|
|
@@ -10097,7 +10097,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10097
10097
|
}
|
|
10098
10098
|
}
|
|
10099
10099
|
]
|
|
10100
|
-
},
|
|
10100
|
+
}, Le = {
|
|
10101
10101
|
kind: "category",
|
|
10102
10102
|
name: "%{BKY_CATEGORY_LIST}",
|
|
10103
10103
|
categorystyle: "list_category",
|
|
@@ -10212,7 +10212,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10212
10212
|
type: "list_reverse_v1"
|
|
10213
10213
|
}
|
|
10214
10214
|
]
|
|
10215
|
-
},
|
|
10215
|
+
}, Se = {
|
|
10216
10216
|
kind: "category",
|
|
10217
10217
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
10218
10218
|
categorystyle: "logic_category",
|
|
@@ -10254,7 +10254,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10254
10254
|
type: "logic_ternary_v1"
|
|
10255
10255
|
}
|
|
10256
10256
|
]
|
|
10257
|
-
},
|
|
10257
|
+
}, Be = {
|
|
10258
10258
|
kind: "category",
|
|
10259
10259
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
10260
10260
|
categorystyle: "loop_category",
|
|
@@ -10316,7 +10316,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10316
10316
|
type: "flow_control_v1"
|
|
10317
10317
|
}
|
|
10318
10318
|
]
|
|
10319
|
-
},
|
|
10319
|
+
}, be = {
|
|
10320
10320
|
kind: "category",
|
|
10321
10321
|
name: "%{BKY_CATEGORY_MATH}",
|
|
10322
10322
|
categorystyle: "math_category",
|
|
@@ -10471,7 +10471,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10471
10471
|
type: "math_on_list_v1"
|
|
10472
10472
|
}
|
|
10473
10473
|
]
|
|
10474
|
-
},
|
|
10474
|
+
}, Pe = {
|
|
10475
10475
|
kind: "category",
|
|
10476
10476
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
10477
10477
|
categorystyle: "object_category",
|
|
@@ -10539,7 +10539,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10539
10539
|
}
|
|
10540
10540
|
}
|
|
10541
10541
|
]
|
|
10542
|
-
},
|
|
10542
|
+
}, Re = {
|
|
10543
10543
|
kind: "category",
|
|
10544
10544
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
10545
10545
|
categorystyle: "text_category",
|
|
@@ -10747,13 +10747,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10747
10747
|
categorystyle: "misc_category",
|
|
10748
10748
|
custom: he.name
|
|
10749
10749
|
},
|
|
10750
|
-
be,
|
|
10751
10750
|
Be,
|
|
10752
|
-
Pe,
|
|
10753
|
-
De,
|
|
10754
10751
|
Se,
|
|
10752
|
+
be,
|
|
10755
10753
|
Re,
|
|
10756
10754
|
Le,
|
|
10755
|
+
Pe,
|
|
10756
|
+
Ne,
|
|
10757
10757
|
fo,
|
|
10758
10758
|
{
|
|
10759
10759
|
kind: "category",
|
|
@@ -10807,13 +10807,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10807
10807
|
categorystyle: "misc_category",
|
|
10808
10808
|
custom: ge.name
|
|
10809
10809
|
},
|
|
10810
|
-
be,
|
|
10811
10810
|
Be,
|
|
10812
|
-
Pe,
|
|
10813
|
-
De,
|
|
10814
10811
|
Se,
|
|
10812
|
+
be,
|
|
10815
10813
|
Re,
|
|
10816
10814
|
Le,
|
|
10815
|
+
Pe,
|
|
10816
|
+
Ne,
|
|
10817
10817
|
{
|
|
10818
10818
|
kind: "category",
|
|
10819
10819
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10854,13 +10854,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10854
10854
|
categorystyle: "misc_category",
|
|
10855
10855
|
custom: ge.name
|
|
10856
10856
|
},
|
|
10857
|
-
be,
|
|
10858
10857
|
Be,
|
|
10859
|
-
Pe,
|
|
10860
|
-
De,
|
|
10861
10858
|
Se,
|
|
10859
|
+
be,
|
|
10862
10860
|
Re,
|
|
10863
10861
|
Le,
|
|
10862
|
+
Pe,
|
|
10863
|
+
Ne,
|
|
10864
10864
|
{
|
|
10865
10865
|
kind: "category",
|
|
10866
10866
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10926,13 +10926,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10926
10926
|
categorystyle: "misc_category",
|
|
10927
10927
|
custom: he.name
|
|
10928
10928
|
},
|
|
10929
|
-
be,
|
|
10930
10929
|
Be,
|
|
10931
|
-
Pe,
|
|
10932
|
-
De,
|
|
10933
10930
|
Se,
|
|
10931
|
+
be,
|
|
10934
10932
|
Re,
|
|
10935
10933
|
Le,
|
|
10934
|
+
Pe,
|
|
10935
|
+
Ne,
|
|
10936
10936
|
fo,
|
|
10937
10937
|
{
|
|
10938
10938
|
kind: "category",
|
|
@@ -10959,7 +10959,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10959
10959
|
custom: pe.name
|
|
10960
10960
|
}
|
|
10961
10961
|
]
|
|
10962
|
-
},
|
|
10962
|
+
}, Ke = {
|
|
10963
10963
|
grid: {
|
|
10964
10964
|
length: 2,
|
|
10965
10965
|
snap: !0,
|
|
@@ -10986,8 +10986,8 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Le = {
|
|
|
10986
10986
|
}
|
|
10987
10987
|
};
|
|
10988
10988
|
function gc(t, e, n, o) {
|
|
10989
|
-
|
|
10990
|
-
const i = Vo(t,
|
|
10989
|
+
Ke.theme = o ? "dark" : "light", Ke.toolbox = Ac(e, n);
|
|
10990
|
+
const i = Vo(t, Ke);
|
|
10991
10991
|
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Ic(i, e, n), Oc(i), i;
|
|
10992
10992
|
}
|
|
10993
10993
|
function Ac(t, e) {
|
|
@@ -11094,7 +11094,7 @@ function vc(t) {
|
|
|
11094
11094
|
}
|
|
11095
11095
|
const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
11096
11096
|
__name: "index",
|
|
11097
|
-
props: /* @__PURE__ */
|
|
11097
|
+
props: /* @__PURE__ */ Ge({
|
|
11098
11098
|
type: {},
|
|
11099
11099
|
version: {},
|
|
11100
11100
|
locale: {},
|
|
@@ -11105,9 +11105,9 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11105
11105
|
scale: { required: !0 },
|
|
11106
11106
|
scaleModifiers: {}
|
|
11107
11107
|
}),
|
|
11108
|
-
emits: /* @__PURE__ */
|
|
11108
|
+
emits: /* @__PURE__ */ Ge(["ready"], ["update:lock", "update:scale"]),
|
|
11109
11109
|
setup(t, { expose: e, emit: n }) {
|
|
11110
|
-
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${
|
|
11110
|
+
const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${We()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
|
|
11111
11111
|
Da(p);
|
|
11112
11112
|
const m = Lt(!0), A = Lt(!1), P = F(() => t.type === "json" ? "tree" : "list"), U = F(() => ({
|
|
11113
11113
|
width: "100%",
|
|
@@ -11152,7 +11152,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11152
11152
|
top: 0,
|
|
11153
11153
|
left: 0,
|
|
11154
11154
|
zIndex: 3e3
|
|
11155
|
-
})), { open: Ut } =
|
|
11155
|
+
})), { open: Ut } = tn(`blocklyEditorFlyout${We()}`);
|
|
11156
11156
|
gn(async () => {
|
|
11157
11157
|
if (!l.value || !_.value) {
|
|
11158
11158
|
console.assert(!1);
|
|
@@ -11160,8 +11160,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11160
11160
|
}
|
|
11161
11161
|
Yo(_.value), await In(t.locale), p.workspace = gc(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(To);
|
|
11162
11162
|
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
11163
|
-
new MutationObserver((
|
|
11164
|
-
|
|
11163
|
+
new MutationObserver((De) => {
|
|
11164
|
+
De.forEach((zt) => {
|
|
11165
11165
|
zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
|
|
11166
11166
|
});
|
|
11167
11167
|
}).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
|
|
@@ -11188,8 +11188,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11188
11188
|
}
|
|
11189
11189
|
}
|
|
11190
11190
|
const Eo = (N) => {
|
|
11191
|
-
m.value = !0, t.type === "json" ? yc(N, p.workspace) :
|
|
11192
|
-
}, go = () => t.type === "json" ? vc(p.workspace) :
|
|
11191
|
+
m.value = !0, t.type === "json" ? yc(N, p.workspace) : $.workspaces.load(N, p.workspace);
|
|
11192
|
+
}, go = () => t.type === "json" ? vc(p.workspace) : $.workspaces.save(p.workspace), Ao = () => {
|
|
11193
11193
|
if (t.type === "json")
|
|
11194
11194
|
console.assert(!1);
|
|
11195
11195
|
else
|
|
@@ -11235,7 +11235,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11235
11235
|
generateReactivity: Io,
|
|
11236
11236
|
fireStateChange: Oo
|
|
11237
11237
|
}), (N, It) => {
|
|
11238
|
-
const
|
|
11238
|
+
const De = D("v-icon"), zt = D("x-loading");
|
|
11239
11239
|
return S(), Z("div", Cc, [
|
|
11240
11240
|
w("div", {
|
|
11241
11241
|
id: u,
|
|
@@ -11253,7 +11253,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11253
11253
|
class: "d-flex flex-column justify-center align-center",
|
|
11254
11254
|
style: W(nt.value)
|
|
11255
11255
|
}, [
|
|
11256
|
-
L(
|
|
11256
|
+
L(De, {
|
|
11257
11257
|
icon: "mdi-delete",
|
|
11258
11258
|
size: "x-large"
|
|
11259
11259
|
})
|
|
@@ -11306,8 +11306,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11306
11306
|
},
|
|
11307
11307
|
setup(t) {
|
|
11308
11308
|
const e = t;
|
|
11309
|
-
Ko.registerLanguage("javascript",
|
|
11310
|
-
const n =
|
|
11309
|
+
Ko.registerLanguage("javascript", $o);
|
|
11310
|
+
const n = Ho.component, { backgroundColor2: o } = jt();
|
|
11311
11311
|
return (i, a) => {
|
|
11312
11312
|
const c = D("v-sheet");
|
|
11313
11313
|
return S(), st(c, {
|
|
@@ -11336,7 +11336,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11336
11336
|
};
|
|
11337
11337
|
}), u = (_) => {
|
|
11338
11338
|
a.value = _.code;
|
|
11339
|
-
}, { open: l } =
|
|
11339
|
+
}, { open: l } = tn("sourceDlg", u);
|
|
11340
11340
|
return (_, d) => {
|
|
11341
11341
|
const h = D("v-sheet"), p = D("v-btn"), m = D("v-spacer"), A = D("v-dialog");
|
|
11342
11342
|
return S(), st(A, {
|
|
@@ -11346,7 +11346,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11346
11346
|
"no-click-animation": "",
|
|
11347
11347
|
persistent: "",
|
|
11348
11348
|
transition: "dialog-bottom-transition",
|
|
11349
|
-
onKeydown: d[2] || (d[2] =
|
|
11349
|
+
onKeydown: d[2] || (d[2] = Hn(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11350
11350
|
}, {
|
|
11351
11351
|
default: at(() => [
|
|
11352
11352
|
L(h, {
|
|
@@ -11372,7 +11372,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
|
|
|
11372
11372
|
variant: "text",
|
|
11373
11373
|
onClick: d[0] || (d[0] = (P) => l.value = !1)
|
|
11374
11374
|
}),
|
|
11375
|
-
w("span", Lc,
|
|
11375
|
+
w("span", Lc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11376
11376
|
L(m)
|
|
11377
11377
|
]),
|
|
11378
11378
|
_: 1
|