x-block-lib 0.8.17 → 0.8.19
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
|
@@ -6,35 +6,35 @@
|
|
|
6
6
|
Website: https://highlightjs.org/
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
|
-
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-
|
|
10
|
-
import { E as A, r as
|
|
9
|
+
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-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 A, r as hn, M as Bn, s as Io, a as Oo, X as bn, u as y, B as T, j as s, O as c, F as I, b as xe, i as C, c as _t, d as vo, e as M, f as m, g as Co, h as K, k as ut, p as bt, l as z, m as fn, n as B, C as Pn, N as Z, o as yo, P as Fe, q as Se, V as It, t as Rn, W as ko, v as No, w as Lo, S as So, x as Bo, y as bo, z as xt, T as pe, A as Dn, D as Po, G as Ro, H as Mn, I as Do, J as Mo, K as Uo, L as Vo, Q as xo, R as Fo, U as Yo, Y as wo } from "./vendor.txua272r.js";
|
|
11
11
|
import { globalState as E } from "x-state-lib";
|
|
12
|
-
import { globalObjects as Et, openConfirmDlg as Ko, openPromptDlg as
|
|
13
|
-
import { pkgs as Jt, parsePixelStr as
|
|
14
|
-
import { provide as jo, inject as Xo, defineComponent as
|
|
12
|
+
import { globalObjects as Et, openConfirmDlg as Ko, openPromptDlg as Ho, messageWarning as Un, useColor as Ft, useSystem as Vn, useViewStack as qe, eventBus as At } from "x-essential-lib";
|
|
13
|
+
import { pkgs as Jt, parsePixelStr as $o, parsePercentStr as Go, getPropTag as Nt, unwrapEventId as Qe, elements as J, makeEventId as Wt, toEventName as de, unwrapMethodId as ze, makeMethodId as Ye, toMethodName as Ze, unwrapPropertyId as tn, makePropertyId as Be, toPropertyName as xn, isLocaleOfEventKind as Wo, isLocaleOfMethodKind as Fn, makeTriggerId as mt } from "x-runtime-lib";
|
|
14
|
+
import { provide as jo, inject as Xo, defineComponent as nt, resolveComponent as D, createBlock as tt, openBlock as S, unref as R, withCtx as et, createVNode as L, mergeProps as en, useModel as Dt, ref as Ot, computed as Y, resolveDirective as Jo, withDirectives as qo, createElementBlock as X, normalizeStyle as G, createElementVNode as w, createCommentVNode as ot, toDisplayString as Mt, withModifiers as Pt, mergeModels as we, Fragment as Yn, renderList as Qo, useId as Ke, onUnmounted as zo, useTemplateRef as Rt, withKeys as wn, isRef as jt, onMounted as mn, nextTick as Zo, onBeforeUnmount as Tn, watch as St, renderSlot as ti } from "vue";
|
|
15
15
|
import { useI18n as Yt } from "vue-i18n";
|
|
16
16
|
import { useDisplay as ei } from "vuetify";
|
|
17
17
|
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
18
18
|
class Kn extends A.Abstract {
|
|
19
19
|
isBlank = !0;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
hn.register(
|
|
22
|
+
hn.Type.EVENT,
|
|
23
23
|
"state_change",
|
|
24
24
|
Kn
|
|
25
25
|
);
|
|
26
|
-
const
|
|
26
|
+
const Hn = (t, e, n) => {
|
|
27
27
|
const o = t[e];
|
|
28
28
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
29
29
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
async function
|
|
33
|
-
const e = await
|
|
32
|
+
async function En(t) {
|
|
33
|
+
const e = await Hn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jq2w67rd.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.hsanc2zi.js") }), `./msg/${t}.ts`, 3);
|
|
34
34
|
Io(e.default);
|
|
35
35
|
}
|
|
36
36
|
function p(t) {
|
|
37
|
-
return
|
|
37
|
+
return Bn[t] ?? t;
|
|
38
38
|
}
|
|
39
39
|
const vt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", qt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
40
|
function he(t) {
|
|
@@ -51,7 +51,7 @@ function Qt(t) {
|
|
|
51
51
|
const n = t.substring(0, e - 1), o = n[0].toUpperCase(), i = n.substring(1);
|
|
52
52
|
return `${o}${i}`;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function k(t) {
|
|
55
55
|
return t.length <= 0 && t.push([p("NO_OPTION"), ""]), t;
|
|
56
56
|
}
|
|
57
57
|
function ni(t) {
|
|
@@ -60,7 +60,7 @@ function ni(t) {
|
|
|
60
60
|
e++, t = t.getParent();
|
|
61
61
|
return e;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function $n(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
66
|
function zt(t, e) {
|
|
@@ -68,20 +68,20 @@ function zt(t, e) {
|
|
|
68
68
|
}
|
|
69
69
|
function be(t) {
|
|
70
70
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
71
|
-
return
|
|
71
|
+
return y.xml.textToDom(e);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function gn(t) {
|
|
74
74
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
75
|
-
return
|
|
75
|
+
return y.xml.textToDom(e);
|
|
76
76
|
}
|
|
77
77
|
function oi(t) {
|
|
78
|
-
return
|
|
78
|
+
return y.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function He(t, e) {
|
|
81
81
|
let n = null;
|
|
82
|
-
return e === "string" ? n = be("") : e === "integer" || e === "decimal" ? n =
|
|
82
|
+
return e === "string" ? n = be("") : e === "integer" || e === "decimal" ? n = gn(0) : e === "boolean" ? n = oi() : e === "enum" || e === "dateTime" ? n = be("") : console.assert(!1), n ? bn.domToBlock(n, t) : null;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function pt(t) {
|
|
85
85
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
86
86
|
}
|
|
87
87
|
function ii(t) {
|
|
@@ -90,13 +90,13 @@ function ii(t) {
|
|
|
90
90
|
function Gn(t) {
|
|
91
91
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function nn(t, e, n, o) {
|
|
94
94
|
const i = `
|
|
95
95
|
<block type="parameter_v1">
|
|
96
96
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
97
97
|
</block>
|
|
98
|
-
`, a =
|
|
99
|
-
return
|
|
98
|
+
`, a = y.xml.textToDom(i);
|
|
99
|
+
return bn.domToBlock(a, t);
|
|
100
100
|
}
|
|
101
101
|
function F(t, e) {
|
|
102
102
|
try {
|
|
@@ -111,7 +111,7 @@ function F(t, e) {
|
|
|
111
111
|
return;
|
|
112
112
|
r.dispose();
|
|
113
113
|
}
|
|
114
|
-
r =
|
|
114
|
+
r = nn(
|
|
115
115
|
t.workspace,
|
|
116
116
|
i,
|
|
117
117
|
a,
|
|
@@ -122,46 +122,46 @@ function F(t, e) {
|
|
|
122
122
|
A.enable();
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ct(t) {
|
|
126
126
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
127
|
-
return
|
|
127
|
+
return y.xml.textToDom(e);
|
|
128
128
|
}
|
|
129
129
|
function Zt(t) {
|
|
130
130
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
131
|
-
return
|
|
131
|
+
return y.xml.textToDom(e);
|
|
132
132
|
}
|
|
133
133
|
function te(t) {
|
|
134
134
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
135
|
-
return
|
|
135
|
+
return y.xml.textToDom(e);
|
|
136
136
|
}
|
|
137
137
|
function si() {
|
|
138
|
-
return
|
|
138
|
+
return y.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
139
139
|
}
|
|
140
140
|
function ai() {
|
|
141
|
-
return
|
|
141
|
+
return y.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
142
142
|
}
|
|
143
143
|
function ci(t) {
|
|
144
144
|
const e = `<shadow type="${he(t)}"></shadow>`;
|
|
145
|
-
return
|
|
145
|
+
return y.xml.textToDom(e);
|
|
146
146
|
}
|
|
147
147
|
function ui(t) {
|
|
148
148
|
const e = `<shadow type="${he(t)}"></shadow>`;
|
|
149
|
-
return
|
|
149
|
+
return y.xml.textToDom(e);
|
|
150
150
|
}
|
|
151
151
|
function li(t) {
|
|
152
152
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
153
|
-
return
|
|
153
|
+
return y.xml.textToDom(e);
|
|
154
154
|
}
|
|
155
155
|
function ri() {
|
|
156
|
-
return
|
|
156
|
+
return y.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function dt(t) {
|
|
159
159
|
let e = null;
|
|
160
|
-
return t === "string" ? e =
|
|
160
|
+
return t === "string" ? e = ct("") : t === "number" ? e = Zt(0) : t === "boolean" ? e = te(!1) : t === "array" ? e = si() : t === "object" ? e = ai() : console.assert(!1), e;
|
|
161
161
|
}
|
|
162
162
|
function _i(t) {
|
|
163
163
|
let e = null;
|
|
164
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e =
|
|
164
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ct(t.default) : t.ui === "numInput" ? e = Zt(t.default) : t.ui === "switch" ? e = te(t.default) : t.ui === "select" ? e = ci(t.items) : t.ui === "multiTypes" ? e = ui(t.types) : t.ui === "compSelect" ? e = ri() : t.ui === "colorPicker" ? e = li(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
165
165
|
}
|
|
166
166
|
function pi() {
|
|
167
167
|
const { activeObject: t, activePage: e } = E.app, n = [];
|
|
@@ -170,7 +170,7 @@ function pi() {
|
|
|
170
170
|
n.push({ key: o, name: i, type: a });
|
|
171
171
|
return n;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function An(t) {
|
|
174
174
|
const { activeObject: e, activePage: n } = E.app;
|
|
175
175
|
if (e.type === "page") {
|
|
176
176
|
const o = n.meta.arguments.find((i) => i.id === t);
|
|
@@ -186,7 +186,7 @@ function di() {
|
|
|
186
186
|
const t = [];
|
|
187
187
|
return pi().forEach(({ key: n, name: o }) => {
|
|
188
188
|
t.push([o, n]);
|
|
189
|
-
}),
|
|
189
|
+
}), k(t);
|
|
190
190
|
}
|
|
191
191
|
const hi = {
|
|
192
192
|
init: function() {
|
|
@@ -223,7 +223,7 @@ const hi = {
|
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
onArgumentChange_: function(t) {
|
|
226
|
-
const e =
|
|
226
|
+
const e = An(t);
|
|
227
227
|
if (!e) {
|
|
228
228
|
console.assert(!1);
|
|
229
229
|
return;
|
|
@@ -231,10 +231,10 @@ const hi = {
|
|
|
231
231
|
this.argument.key = e.key, this.argument.name = e.name, this.argument.type = e.type, this.updateShape_();
|
|
232
232
|
},
|
|
233
233
|
updateShape_: function() {
|
|
234
|
-
this.setOutput(!0,
|
|
234
|
+
this.setOutput(!0, pt(this.argument.type));
|
|
235
235
|
},
|
|
236
236
|
checkWarning_: function() {
|
|
237
|
-
const t =
|
|
237
|
+
const t = An(this.argument.key);
|
|
238
238
|
if (!t) {
|
|
239
239
|
this.setWarningText(p("WARN_ARGUMENT_NOT_FOUND"));
|
|
240
240
|
return;
|
|
@@ -264,7 +264,7 @@ const fi = (t, e) => {
|
|
|
264
264
|
const { i18n: i } = Et, a = [];
|
|
265
265
|
for (const { title: u, value: l } of e)
|
|
266
266
|
a.push([i.global.t(u), l]);
|
|
267
|
-
return
|
|
267
|
+
return k(a);
|
|
268
268
|
}
|
|
269
269
|
}, s.forBlock[n] = function(i) {
|
|
270
270
|
const a = s.quote_, u = i.getFieldValue("ITEM");
|
|
@@ -297,7 +297,7 @@ const mi = (t, e) => {
|
|
|
297
297
|
const { i18n: i } = Et, a = [];
|
|
298
298
|
for (const { title: u, value: l } of e)
|
|
299
299
|
a.push([i.global.t(u), l]);
|
|
300
|
-
return
|
|
300
|
+
return k(a);
|
|
301
301
|
},
|
|
302
302
|
onchange: function(i) {
|
|
303
303
|
if (i.type === b.STATE_CHANGE)
|
|
@@ -329,7 +329,7 @@ const mi = (t, e) => {
|
|
|
329
329
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
330
330
|
let l, r;
|
|
331
331
|
if (u.ui === "pixelInput") {
|
|
332
|
-
const _ =
|
|
332
|
+
const _ = $o(this.value) ?? 0;
|
|
333
333
|
l = new xe(
|
|
334
334
|
_,
|
|
335
335
|
u.min,
|
|
@@ -371,7 +371,7 @@ for (const t in Jt) {
|
|
|
371
371
|
for (const n in e.types)
|
|
372
372
|
mi(n, e.types[n]);
|
|
373
373
|
}
|
|
374
|
-
const Ti =
|
|
374
|
+
const Ti = y.xml, Ei = {
|
|
375
375
|
init: function() {
|
|
376
376
|
this.appendDummyInput().appendField(
|
|
377
377
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
@@ -388,7 +388,7 @@ T.app_bind_item_v1 = gi;
|
|
|
388
388
|
const Ai = {
|
|
389
389
|
init: function() {
|
|
390
390
|
this.itemCount_ = 0, this.setMutator(
|
|
391
|
-
new
|
|
391
|
+
new _t.MutatorIcon(
|
|
392
392
|
["app_bind_item_v1"],
|
|
393
393
|
this
|
|
394
394
|
)
|
|
@@ -510,16 +510,16 @@ s.forBlock.app_bind_v1 = function() {
|
|
|
510
510
|
function Wn() {
|
|
511
511
|
return E.app.appList;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function In(t) {
|
|
514
514
|
return E.app.appList.find((e) => e.id === t);
|
|
515
515
|
}
|
|
516
516
|
function Ii() {
|
|
517
517
|
const t = [];
|
|
518
518
|
return Wn().forEach(({ id: n, name: o }) => {
|
|
519
519
|
t.push([o, n]);
|
|
520
|
-
}),
|
|
520
|
+
}), k(t);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function $e(t) {
|
|
523
523
|
const e = E.app.appList.find((n) => n.id === t);
|
|
524
524
|
return e ? e.pages : [];
|
|
525
525
|
}
|
|
@@ -530,9 +530,9 @@ function Pe(t, e) {
|
|
|
530
530
|
}
|
|
531
531
|
function Oi(t) {
|
|
532
532
|
const e = [];
|
|
533
|
-
return
|
|
533
|
+
return $e(t).forEach(({ id: o, name: i }) => {
|
|
534
534
|
e.push([i, o]);
|
|
535
|
-
}),
|
|
535
|
+
}), k(e);
|
|
536
536
|
}
|
|
537
537
|
const jn = {
|
|
538
538
|
id: "",
|
|
@@ -544,7 +544,7 @@ function Xn() {
|
|
|
544
544
|
const { comps: t } = E.app.activeApp;
|
|
545
545
|
return [jn, ...t];
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function On(t) {
|
|
548
548
|
return t === "" ? jn : E.app.activeApp.comps.find((e) => e.id === t);
|
|
549
549
|
}
|
|
550
550
|
function vi() {
|
|
@@ -552,7 +552,7 @@ function vi() {
|
|
|
552
552
|
return Xn().forEach(({ id: o, name: i }) => {
|
|
553
553
|
let a = i;
|
|
554
554
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
555
|
-
}),
|
|
555
|
+
}), k(e);
|
|
556
556
|
}
|
|
557
557
|
function fe(t) {
|
|
558
558
|
const e = [];
|
|
@@ -567,25 +567,25 @@ function Ge(t) {
|
|
|
567
567
|
const u = n.nodes.find((r) => r.id === t);
|
|
568
568
|
if (!u)
|
|
569
569
|
return i;
|
|
570
|
-
const l =
|
|
570
|
+
const l = J[u.key];
|
|
571
571
|
if (!l)
|
|
572
572
|
return console.assert(!1, "invalid element", u.key), i;
|
|
573
573
|
for (const { key: r, name: _, params: d } of l.events)
|
|
574
574
|
i.push({
|
|
575
575
|
id: Wt("elementEvent", t, r),
|
|
576
|
-
names: [_],
|
|
577
576
|
kind: "elementEvent",
|
|
577
|
+
names: [_],
|
|
578
578
|
params: d
|
|
579
579
|
});
|
|
580
580
|
if (e[l.key] && e[l.key][a])
|
|
581
581
|
for (const { keys: r, names: _, raw: d } of e[l.key][a]) {
|
|
582
582
|
if (zt(r, d))
|
|
583
583
|
continue;
|
|
584
|
-
const h =
|
|
584
|
+
const h = $n(d);
|
|
585
585
|
i.push({
|
|
586
586
|
id: Wt("elementPropertyChangeEvent", t, r),
|
|
587
|
-
names: _,
|
|
588
587
|
kind: "elementPropertyChangeEvent",
|
|
588
|
+
names: _,
|
|
589
589
|
params: [
|
|
590
590
|
{ key: "newValue", name: "x-runtime-lib.newValue", type: h },
|
|
591
591
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: h }
|
|
@@ -598,8 +598,8 @@ function Ge(t) {
|
|
|
598
598
|
for (const { id: _, name: d, params: h } of r.meta.events)
|
|
599
599
|
i.push({
|
|
600
600
|
id: Wt("refEvent", t, _),
|
|
601
|
-
names: [d],
|
|
602
601
|
kind: "refEvent",
|
|
602
|
+
names: [d],
|
|
603
603
|
params: fe(h)
|
|
604
604
|
});
|
|
605
605
|
}
|
|
@@ -609,10 +609,10 @@ function Re(t) {
|
|
|
609
609
|
const { props: e } = E.runtime, { activeObject: n, depends: o } = E.app, i = Nt(n.type, n.subtype);
|
|
610
610
|
if (!i)
|
|
611
611
|
return;
|
|
612
|
-
const
|
|
612
|
+
const { kind: a, nodeId: u, eventKey: l } = Qe(t), r = n.nodes.find((d) => d.id === u);
|
|
613
613
|
if (!r)
|
|
614
614
|
return;
|
|
615
|
-
const _ =
|
|
615
|
+
const _ = J[r.key];
|
|
616
616
|
if (!_) {
|
|
617
617
|
console.assert(!1, "invalid element", r.key);
|
|
618
618
|
return;
|
|
@@ -622,8 +622,8 @@ function Re(t) {
|
|
|
622
622
|
if (d)
|
|
623
623
|
return {
|
|
624
624
|
id: t,
|
|
625
|
+
kind: a,
|
|
625
626
|
names: [d.name],
|
|
626
|
-
kind: "elementEvent",
|
|
627
627
|
params: d.params
|
|
628
628
|
};
|
|
629
629
|
} else if (a === "elementPropertyChangeEvent") {
|
|
@@ -632,11 +632,11 @@ function Re(t) {
|
|
|
632
632
|
(h) => h.keys === l
|
|
633
633
|
);
|
|
634
634
|
if (d) {
|
|
635
|
-
const h =
|
|
635
|
+
const h = $n(d.raw);
|
|
636
636
|
return {
|
|
637
637
|
id: t,
|
|
638
|
+
kind: a,
|
|
638
639
|
names: d.names,
|
|
639
|
-
kind: "elementPropertyChangeEvent",
|
|
640
640
|
params: [
|
|
641
641
|
{ key: "newValue", name: "x-runtime-lib.newValue", type: h },
|
|
642
642
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: h }
|
|
@@ -652,8 +652,8 @@ function Re(t) {
|
|
|
652
652
|
if (h)
|
|
653
653
|
return {
|
|
654
654
|
id: t,
|
|
655
|
+
kind: a,
|
|
655
656
|
names: [h.name],
|
|
656
|
-
kind: "refEvent",
|
|
657
657
|
params: fe(h.params)
|
|
658
658
|
};
|
|
659
659
|
}
|
|
@@ -662,9 +662,9 @@ function Re(t) {
|
|
|
662
662
|
}
|
|
663
663
|
function Ci(t) {
|
|
664
664
|
const e = [], n = Ge(t);
|
|
665
|
-
for (const { id: o,
|
|
665
|
+
for (const { id: o, kind: i, names: a } of n)
|
|
666
666
|
e.push([de(i, a), o]);
|
|
667
|
-
return
|
|
667
|
+
return k(e);
|
|
668
668
|
}
|
|
669
669
|
function Jn() {
|
|
670
670
|
const { activeObject: t, activeComp: e } = E.app, n = [];
|
|
@@ -672,14 +672,14 @@ function Jn() {
|
|
|
672
672
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
673
673
|
n.push({
|
|
674
674
|
id: Wt("customEvent", "globality", o),
|
|
675
|
-
names: [i],
|
|
676
675
|
kind: "customEvent",
|
|
676
|
+
names: [i],
|
|
677
677
|
params: fe(a)
|
|
678
678
|
});
|
|
679
679
|
return n;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
const { activeObject: e, activeComp: n } = E.app,
|
|
681
|
+
function vn(t) {
|
|
682
|
+
const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = Qe(t);
|
|
683
683
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
684
684
|
const u = n.meta.events.find(
|
|
685
685
|
(l) => l.id === a
|
|
@@ -687,17 +687,17 @@ function In(t) {
|
|
|
687
687
|
if (u)
|
|
688
688
|
return {
|
|
689
689
|
id: t,
|
|
690
|
+
kind: o,
|
|
690
691
|
names: [u.name],
|
|
691
|
-
kind: "customEvent",
|
|
692
692
|
params: fe(u.params)
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function yi() {
|
|
697
697
|
const t = [], e = Jn();
|
|
698
|
-
for (const { id: n,
|
|
698
|
+
for (const { id: n, kind: o, names: i } of e)
|
|
699
699
|
t.push([de(o, i), n]);
|
|
700
|
-
return
|
|
700
|
+
return k(t);
|
|
701
701
|
}
|
|
702
702
|
function me(t) {
|
|
703
703
|
const e = [];
|
|
@@ -715,14 +715,14 @@ function We(t) {
|
|
|
715
715
|
const { activeObject: e, depends: n } = E.app, o = [], i = e.nodes.find((u) => u.id === t);
|
|
716
716
|
if (!i)
|
|
717
717
|
return o;
|
|
718
|
-
const a =
|
|
718
|
+
const a = J[i.key];
|
|
719
719
|
if (!a)
|
|
720
720
|
return console.assert(!1, "inavlid element", i.key), o;
|
|
721
721
|
for (const { key: u, name: l, inputs: r, outputs: _ } of a.methods)
|
|
722
722
|
o.push({
|
|
723
723
|
id: Ye("elementMethod", t, u),
|
|
724
|
-
names: [l],
|
|
725
724
|
kind: "elementMethod",
|
|
725
|
+
names: [l],
|
|
726
726
|
inputs: r,
|
|
727
727
|
outputs: _
|
|
728
728
|
});
|
|
@@ -732,8 +732,8 @@ function We(t) {
|
|
|
732
732
|
for (const { id: l, name: r, inputs: _, outputs: d } of u.meta.methods)
|
|
733
733
|
o.push({
|
|
734
734
|
id: Ye("refMethod", t, l),
|
|
735
|
-
names: [r],
|
|
736
735
|
kind: "refMethod",
|
|
736
|
+
names: [r],
|
|
737
737
|
inputs: me(_),
|
|
738
738
|
outputs: Te(d)
|
|
739
739
|
});
|
|
@@ -741,10 +741,10 @@ function We(t) {
|
|
|
741
741
|
return a.key.startsWith("globality_v") && e.type, o;
|
|
742
742
|
}
|
|
743
743
|
function De(t) {
|
|
744
|
-
const { activeObject: e, depends: n } = E.app,
|
|
744
|
+
const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = ze(t), u = e.nodes.find((r) => r.id === i);
|
|
745
745
|
if (!u)
|
|
746
746
|
return;
|
|
747
|
-
const l =
|
|
747
|
+
const l = J[u.key];
|
|
748
748
|
if (!l) {
|
|
749
749
|
console.assert(!1, "invalid element", u.key);
|
|
750
750
|
return;
|
|
@@ -754,8 +754,8 @@ function De(t) {
|
|
|
754
754
|
if (r)
|
|
755
755
|
return {
|
|
756
756
|
id: t,
|
|
757
|
+
kind: o,
|
|
757
758
|
names: [r.name],
|
|
758
|
-
kind: "elementMethod",
|
|
759
759
|
inputs: r.inputs,
|
|
760
760
|
outputs: r.outputs
|
|
761
761
|
};
|
|
@@ -769,8 +769,8 @@ function De(t) {
|
|
|
769
769
|
if (_)
|
|
770
770
|
return {
|
|
771
771
|
id: t,
|
|
772
|
+
kind: o,
|
|
772
773
|
names: [_.name],
|
|
773
|
-
kind: "refMethod",
|
|
774
774
|
inputs: me(_.inputs),
|
|
775
775
|
outputs: Te(_.outputs)
|
|
776
776
|
};
|
|
@@ -778,27 +778,27 @@ function De(t) {
|
|
|
778
778
|
}
|
|
779
779
|
} else o === "customMethod" && l.key.startsWith("globality_v") && e.type;
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function ki(t) {
|
|
782
782
|
const e = [], n = We(t);
|
|
783
|
-
for (const { id: o,
|
|
784
|
-
e.push([
|
|
785
|
-
return
|
|
783
|
+
for (const { id: o, kind: i, names: a } of n)
|
|
784
|
+
e.push([Ze(i, a), o]);
|
|
785
|
+
return k(e);
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function on() {
|
|
788
788
|
const { activeObject: t, activeComp: e } = E.app, n = [];
|
|
789
789
|
if (t.type === "comp")
|
|
790
790
|
for (const { id: o, name: i, inputs: a, outputs: u } of e.meta.methods)
|
|
791
791
|
n.push({
|
|
792
792
|
id: Ye("customMethod", "globality", o),
|
|
793
|
-
names: [i],
|
|
794
793
|
kind: "customMethod",
|
|
794
|
+
names: [i],
|
|
795
795
|
inputs: me(a),
|
|
796
796
|
outputs: Te(u)
|
|
797
797
|
});
|
|
798
798
|
return n;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
const { activeObject: e, activeComp: n } = E.app,
|
|
800
|
+
function kt(t) {
|
|
801
|
+
const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, methodKey: a } = ze(t);
|
|
802
802
|
if (o === "customMethod" && i === "globality" && e.type === "comp") {
|
|
803
803
|
const u = n.meta.methods.find(
|
|
804
804
|
(l) => l.id === a
|
|
@@ -806,25 +806,25 @@ function yt(t) {
|
|
|
806
806
|
if (u)
|
|
807
807
|
return {
|
|
808
808
|
id: t,
|
|
809
|
+
kind: o,
|
|
809
810
|
names: [u.name],
|
|
810
|
-
kind: "customMethod",
|
|
811
811
|
inputs: me(u.inputs),
|
|
812
812
|
outputs: Te(u.outputs)
|
|
813
813
|
};
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
function qn() {
|
|
817
|
-
const t = [], e =
|
|
818
|
-
for (const { id: n,
|
|
819
|
-
t.push([
|
|
820
|
-
return
|
|
817
|
+
const t = [], e = on();
|
|
818
|
+
for (const { id: n, kind: o, names: i } of e)
|
|
819
|
+
t.push([Ze(o, i), n]);
|
|
820
|
+
return k(t);
|
|
821
821
|
}
|
|
822
822
|
function je(t) {
|
|
823
|
-
const e =
|
|
823
|
+
const e = kt(t);
|
|
824
824
|
return e ? e.outputs : [];
|
|
825
825
|
}
|
|
826
826
|
function Me(t, e) {
|
|
827
|
-
const n =
|
|
827
|
+
const n = kt(t);
|
|
828
828
|
if (n)
|
|
829
829
|
return n.outputs.find((o) => o.key === e);
|
|
830
830
|
}
|
|
@@ -832,7 +832,7 @@ function Ni(t) {
|
|
|
832
832
|
const e = [], n = je(t);
|
|
833
833
|
for (const { name: o, key: i } of n)
|
|
834
834
|
e.push([o, i]);
|
|
835
|
-
return
|
|
835
|
+
return k(e);
|
|
836
836
|
}
|
|
837
837
|
function Qn(t, e, n) {
|
|
838
838
|
if (!n)
|
|
@@ -867,7 +867,7 @@ function W(t) {
|
|
|
867
867
|
if (!n)
|
|
868
868
|
return !1;
|
|
869
869
|
for (const o of e.nodes) {
|
|
870
|
-
const i =
|
|
870
|
+
const i = J[o.key];
|
|
871
871
|
if (!i) {
|
|
872
872
|
console.assert(!1, "invalid element", o.key);
|
|
873
873
|
continue;
|
|
@@ -882,7 +882,7 @@ function wt(t) {
|
|
|
882
882
|
if (!o)
|
|
883
883
|
return n;
|
|
884
884
|
for (const i of e.nodes) {
|
|
885
|
-
const a =
|
|
885
|
+
const a = J[i.key];
|
|
886
886
|
if (!a) {
|
|
887
887
|
console.assert(!1, "invalid element", i.key);
|
|
888
888
|
continue;
|
|
@@ -896,11 +896,11 @@ function wt(t) {
|
|
|
896
896
|
}
|
|
897
897
|
return n;
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function lt(t) {
|
|
900
900
|
const { activeObject: e } = E.app, n = e.nodes.find((i) => i.id === t);
|
|
901
901
|
if (!n)
|
|
902
902
|
return;
|
|
903
|
-
const o =
|
|
903
|
+
const o = J[n.key];
|
|
904
904
|
if (!o) {
|
|
905
905
|
console.assert(!1, "invalid element", n.key);
|
|
906
906
|
return;
|
|
@@ -918,7 +918,7 @@ function Ee(t) {
|
|
|
918
918
|
let l = e.global.t(a);
|
|
919
919
|
u && (l += " / " + u), n.push([l, i]);
|
|
920
920
|
}
|
|
921
|
-
return
|
|
921
|
+
return k(n);
|
|
922
922
|
}
|
|
923
923
|
function Ut(t, e) {
|
|
924
924
|
const { props: n } = E.runtime, { activeObject: o, activeComp: i, depends: a } = E.app, u = [], l = Nt(o.type, o.subtype);
|
|
@@ -927,16 +927,17 @@ function Ut(t, e) {
|
|
|
927
927
|
const r = o.nodes.find((d) => d.id === t);
|
|
928
928
|
if (!r)
|
|
929
929
|
return u;
|
|
930
|
-
const _ =
|
|
930
|
+
const _ = J[r.key];
|
|
931
931
|
if (!_)
|
|
932
932
|
return console.assert(!1, "invalid element", r.key), u;
|
|
933
933
|
if (n[_.key] && n[_.key][l])
|
|
934
934
|
for (const { keys: d, names: h, raw: f } of n[_.key][l])
|
|
935
935
|
e === "write" && zt(d, f) || u.push({
|
|
936
936
|
id: Be("elementProperty", t, d),
|
|
937
|
+
kind: "elementProperty",
|
|
937
938
|
names: h,
|
|
938
939
|
meta: {
|
|
939
|
-
|
|
940
|
+
element: !0,
|
|
940
941
|
raw: f
|
|
941
942
|
}
|
|
942
943
|
});
|
|
@@ -946,9 +947,9 @@ function Ut(t, e) {
|
|
|
946
947
|
for (const { id: h, name: f, type: v } of d.meta.properties)
|
|
947
948
|
u.push({
|
|
948
949
|
id: Be("refProperty", t, h),
|
|
950
|
+
kind: "refProperty",
|
|
949
951
|
names: [f],
|
|
950
952
|
meta: {
|
|
951
|
-
kind: "refProperty",
|
|
952
953
|
raw: { type: v }
|
|
953
954
|
}
|
|
954
955
|
});
|
|
@@ -957,9 +958,9 @@ function Ut(t, e) {
|
|
|
957
958
|
for (const { id: d, name: h, type: f } of i.meta.properties)
|
|
958
959
|
u.push({
|
|
959
960
|
id: Be("customProperty", t, d),
|
|
961
|
+
kind: "customProperty",
|
|
960
962
|
names: [h],
|
|
961
963
|
meta: {
|
|
962
|
-
kind: "customProperty",
|
|
963
964
|
raw: { type: f }
|
|
964
965
|
}
|
|
965
966
|
});
|
|
@@ -969,23 +970,26 @@ function Tt(t) {
|
|
|
969
970
|
const { props: e } = E.runtime, { activeObject: n, activeComp: o, depends: i } = E.app, a = Nt(n.type, n.subtype);
|
|
970
971
|
if (!a)
|
|
971
972
|
return;
|
|
972
|
-
const
|
|
973
|
+
const { kind: u, nodeId: l, propertyKey: r } = tn(t), _ = n.nodes.find((h) => h.id === l);
|
|
973
974
|
if (!_)
|
|
974
975
|
return;
|
|
975
|
-
const d =
|
|
976
|
+
const d = J[_.key];
|
|
976
977
|
if (!d) {
|
|
977
978
|
console.assert(!1, "invalid element", _.key);
|
|
978
979
|
return;
|
|
979
980
|
}
|
|
980
981
|
if (u === "elementProperty") {
|
|
981
982
|
if (e[d.key] && e[d.key][a]) {
|
|
982
|
-
const h = e[d.key][a].find(
|
|
983
|
+
const h = e[d.key][a].find(
|
|
984
|
+
(f) => f.keys === r
|
|
985
|
+
);
|
|
983
986
|
if (h)
|
|
984
987
|
return {
|
|
985
988
|
id: t,
|
|
989
|
+
kind: u,
|
|
986
990
|
names: h.names,
|
|
987
991
|
meta: {
|
|
988
|
-
|
|
992
|
+
element: !0,
|
|
989
993
|
raw: h.raw
|
|
990
994
|
}
|
|
991
995
|
};
|
|
@@ -1000,9 +1004,9 @@ function Tt(t) {
|
|
|
1000
1004
|
if (f)
|
|
1001
1005
|
return {
|
|
1002
1006
|
id: t,
|
|
1007
|
+
kind: u,
|
|
1003
1008
|
names: [f.name],
|
|
1004
1009
|
meta: {
|
|
1005
|
-
kind: "refProperty",
|
|
1006
1010
|
raw: { type: f.type }
|
|
1007
1011
|
}
|
|
1008
1012
|
};
|
|
@@ -1016,9 +1020,9 @@ function Tt(t) {
|
|
|
1016
1020
|
if (h)
|
|
1017
1021
|
return {
|
|
1018
1022
|
id: t,
|
|
1023
|
+
kind: u,
|
|
1019
1024
|
names: [h.name],
|
|
1020
1025
|
meta: {
|
|
1021
|
-
kind: "customProperty",
|
|
1022
1026
|
raw: { type: h.type }
|
|
1023
1027
|
}
|
|
1024
1028
|
};
|
|
@@ -1027,11 +1031,11 @@ function Tt(t) {
|
|
|
1027
1031
|
}
|
|
1028
1032
|
function zn(t, e) {
|
|
1029
1033
|
const n = [], o = Ut(t, e);
|
|
1030
|
-
for (const { id: i,
|
|
1031
|
-
n.push([xn(a, u
|
|
1032
|
-
return
|
|
1034
|
+
for (const { id: i, kind: a, names: u } of o)
|
|
1035
|
+
n.push([xn(a, u), i]);
|
|
1036
|
+
return k(n);
|
|
1033
1037
|
}
|
|
1034
|
-
function
|
|
1038
|
+
function sn() {
|
|
1035
1039
|
const { activeObject: t, activePage: e, activeComp: n } = E.app;
|
|
1036
1040
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1037
1041
|
}
|
|
@@ -1043,10 +1047,10 @@ function ee(t) {
|
|
|
1043
1047
|
return o.meta.states.find((i) => i.id === t);
|
|
1044
1048
|
}
|
|
1045
1049
|
function Zn() {
|
|
1046
|
-
const t = [], e =
|
|
1050
|
+
const t = [], e = sn();
|
|
1047
1051
|
for (const { id: n, name: o } of e)
|
|
1048
1052
|
t.push([o, n]);
|
|
1049
|
-
return
|
|
1053
|
+
return k(t);
|
|
1050
1054
|
}
|
|
1051
1055
|
const Li = {
|
|
1052
1056
|
init: function() {
|
|
@@ -1056,8 +1060,8 @@ const Li = {
|
|
|
1056
1060
|
alias: ""
|
|
1057
1061
|
}, this.event = {
|
|
1058
1062
|
id: "",
|
|
1059
|
-
names: [],
|
|
1060
1063
|
kind: "elementEvent",
|
|
1064
|
+
names: [],
|
|
1061
1065
|
params: []
|
|
1062
1066
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_ON_APP_EVENT_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(
|
|
1063
1067
|
new I(() => this.genEventOpts_()),
|
|
@@ -1076,7 +1080,7 @@ const Li = {
|
|
|
1076
1080
|
const n = Ge(this.node.id)?.[0];
|
|
1077
1081
|
if (!n)
|
|
1078
1082
|
return;
|
|
1079
|
-
this.event.id = n.id, this.event.
|
|
1083
|
+
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
1080
1084
|
const o = this.getField("EVENT");
|
|
1081
1085
|
o.getOptions(!1), o.setValue(this.event.id);
|
|
1082
1086
|
},
|
|
@@ -1087,7 +1091,7 @@ const Li = {
|
|
|
1087
1091
|
};
|
|
1088
1092
|
},
|
|
1089
1093
|
loadExtraState: function(t) {
|
|
1090
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.
|
|
1094
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), setTimeout(() => {
|
|
1091
1095
|
this.ensureBlocks_(), this.checkWarning_();
|
|
1092
1096
|
}, 0);
|
|
1093
1097
|
},
|
|
@@ -1108,7 +1112,7 @@ const Li = {
|
|
|
1108
1112
|
}
|
|
1109
1113
|
},
|
|
1110
1114
|
onNodeChange_: function(t) {
|
|
1111
|
-
const e =
|
|
1115
|
+
const e = lt(t);
|
|
1112
1116
|
if (!e) {
|
|
1113
1117
|
console.assert(!1);
|
|
1114
1118
|
return;
|
|
@@ -1124,22 +1128,23 @@ const Li = {
|
|
|
1124
1128
|
},
|
|
1125
1129
|
onEventChange_: function(t) {
|
|
1126
1130
|
const e = Re(t);
|
|
1127
|
-
e ? (this.event.id = e.id, this.event.
|
|
1131
|
+
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 = "elementEvent", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1128
1132
|
this.ensureBlocks_();
|
|
1129
1133
|
}, 0);
|
|
1130
1134
|
},
|
|
1131
1135
|
updateShape_: function() {
|
|
1132
|
-
for (let
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
}
|
|
1136
|
-
for (let
|
|
1137
|
-
this.getInput("PARAM" +
|
|
1138
|
-
|
|
1136
|
+
for (let e = this.event.params.length; this.getInput("PARAM" + e); e++) {
|
|
1137
|
+
const n = this.getInput("PARAM" + e).connection.targetBlock();
|
|
1138
|
+
n && n.dispose(), this.removeInput("PARAM" + e);
|
|
1139
|
+
}
|
|
1140
|
+
for (let e = 0; e < this.event.params.length; e++)
|
|
1141
|
+
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1142
|
+
const { kind: t } = Qe(this.event.id);
|
|
1143
|
+
if (t === "refEvent")
|
|
1139
1144
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1140
1145
|
else if (this.getInput("REF_KEY")) {
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1146
|
+
const e = this.getInput("REF_KEY").connection.targetBlock();
|
|
1147
|
+
e && e.dispose(), this.removeInput("REF_KEY");
|
|
1143
1148
|
}
|
|
1144
1149
|
},
|
|
1145
1150
|
ensureBlocks_: function() {
|
|
@@ -1151,7 +1156,7 @@ const Li = {
|
|
|
1151
1156
|
}), e.length > 0 && F(this, e);
|
|
1152
1157
|
},
|
|
1153
1158
|
checkWarning_: function() {
|
|
1154
|
-
const t =
|
|
1159
|
+
const t = lt(this.node.id);
|
|
1155
1160
|
if (!t) {
|
|
1156
1161
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
1157
1162
|
return;
|
|
@@ -1166,7 +1171,11 @@ const Li = {
|
|
|
1166
1171
|
this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
|
|
1167
1172
|
return;
|
|
1168
1173
|
}
|
|
1169
|
-
if (
|
|
1174
|
+
if (e.kind !== this.event.kind) {
|
|
1175
|
+
this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
if (M(e.names, this.event.names) || (this.event.names = e.names), !M(e.params, this.event.params)) {
|
|
1170
1179
|
this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
|
|
1171
1180
|
return;
|
|
1172
1181
|
}
|
|
@@ -1189,8 +1198,8 @@ const Si = {
|
|
|
1189
1198
|
init: function() {
|
|
1190
1199
|
this.event = {
|
|
1191
1200
|
id: "",
|
|
1192
|
-
names: [],
|
|
1193
1201
|
kind: "elementEvent",
|
|
1202
|
+
names: [],
|
|
1194
1203
|
params: []
|
|
1195
1204
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_TRIGGER_APP_EVENT_TITLE}").appendField(
|
|
1196
1205
|
new I(() => this.genEventOpts_()),
|
|
@@ -1203,7 +1212,7 @@ const Si = {
|
|
|
1203
1212
|
const t = Jn()?.[0];
|
|
1204
1213
|
if (!t)
|
|
1205
1214
|
return;
|
|
1206
|
-
this.event.id = t.id, this.event.
|
|
1215
|
+
this.event.id = t.id, this.event.kind = t.kind, this.event.names = t.names, this.event.params = t.params;
|
|
1207
1216
|
const e = this.getField("EVENT");
|
|
1208
1217
|
e.getOptions(!1), e.setValue(this.event.id);
|
|
1209
1218
|
},
|
|
@@ -1213,12 +1222,12 @@ const Si = {
|
|
|
1213
1222
|
};
|
|
1214
1223
|
},
|
|
1215
1224
|
loadExtraState: function(t) {
|
|
1216
|
-
this.event.id = t.event?.id ?? "", this.event.
|
|
1225
|
+
this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "elementEvent", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params ?? [], this.updateShape_(), this.updateShadows_(), setTimeout(() => {
|
|
1217
1226
|
this.checkWarning_();
|
|
1218
1227
|
}, 0);
|
|
1219
1228
|
},
|
|
1220
1229
|
genEventOpts_: function() {
|
|
1221
|
-
return
|
|
1230
|
+
return yi();
|
|
1222
1231
|
},
|
|
1223
1232
|
onchange: function(t) {
|
|
1224
1233
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1231,8 +1240,8 @@ const Si = {
|
|
|
1231
1240
|
}
|
|
1232
1241
|
},
|
|
1233
1242
|
onEventChange_: function(t) {
|
|
1234
|
-
const e =
|
|
1235
|
-
e ? (this.event.id = e.id, this.event.
|
|
1243
|
+
const e = vn(t);
|
|
1244
|
+
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 = "elementEvent", this.event.names = [], this.event.params = []);
|
|
1236
1245
|
},
|
|
1237
1246
|
updateShape_: function() {
|
|
1238
1247
|
for (let t = this.event.params.length; this.getInput("PARAM" + t); t++) {
|
|
@@ -1246,24 +1255,28 @@ const Si = {
|
|
|
1246
1255
|
e.connection.setShadowDom(null);
|
|
1247
1256
|
const n = e.connection.targetBlock();
|
|
1248
1257
|
n && !n.isShadow() && n.dispose();
|
|
1249
|
-
const { type: o } = this.event.params[t], i =
|
|
1258
|
+
const { type: o } = this.event.params[t], i = pt(o);
|
|
1250
1259
|
e.setCheck(i);
|
|
1251
1260
|
}
|
|
1252
1261
|
},
|
|
1253
1262
|
updateShadows_: function() {
|
|
1254
1263
|
if (!this.isInsertionMarker())
|
|
1255
1264
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
1256
|
-
const e = this.event.params[t], n =
|
|
1265
|
+
const e = this.event.params[t], n = dt(e.type);
|
|
1257
1266
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
1258
1267
|
}
|
|
1259
1268
|
},
|
|
1260
1269
|
checkWarning_: function() {
|
|
1261
|
-
const t =
|
|
1270
|
+
const t = vn(this.event.id);
|
|
1262
1271
|
if (!t) {
|
|
1263
1272
|
this.setWarningText(p("WARN_EVENT_NOT_FOUND"));
|
|
1264
1273
|
return;
|
|
1265
1274
|
}
|
|
1266
|
-
if (
|
|
1275
|
+
if (t.kind !== this.event.kind) {
|
|
1276
|
+
this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
|
|
1277
|
+
return;
|
|
1278
|
+
}
|
|
1279
|
+
if (M(t.names, this.event.names) || (this.event.names = t.names), !M(t.params, this.event.params)) {
|
|
1267
1280
|
this.setWarningText(p("WARN_EVENT_HAS_CHANGED"));
|
|
1268
1281
|
return;
|
|
1269
1282
|
}
|
|
@@ -1339,9 +1352,9 @@ const Bi = {
|
|
|
1339
1352
|
updateShadow_: function() {
|
|
1340
1353
|
if (this.isInsertionMarker())
|
|
1341
1354
|
return;
|
|
1342
|
-
const t =
|
|
1355
|
+
const t = ct("title");
|
|
1343
1356
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1344
|
-
const e =
|
|
1357
|
+
const e = ct("text");
|
|
1345
1358
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
1346
1359
|
},
|
|
1347
1360
|
ensureBlocks_: function() {
|
|
@@ -1376,11 +1389,11 @@ const bi = {
|
|
|
1376
1389
|
updateShadow_: function() {
|
|
1377
1390
|
if (this.isInsertionMarker())
|
|
1378
1391
|
return;
|
|
1379
|
-
const t =
|
|
1392
|
+
const t = ct("title");
|
|
1380
1393
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1381
|
-
const e =
|
|
1394
|
+
const e = ct("label");
|
|
1382
1395
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
1383
|
-
const n =
|
|
1396
|
+
const n = ct("");
|
|
1384
1397
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
1385
1398
|
},
|
|
1386
1399
|
ensureBlocks_: function() {
|
|
@@ -1437,8 +1450,8 @@ const Pi = {
|
|
|
1437
1450
|
alias: ""
|
|
1438
1451
|
}, this.method = {
|
|
1439
1452
|
id: "",
|
|
1440
|
-
names: [],
|
|
1441
1453
|
kind: "elementMethod",
|
|
1454
|
+
names: [],
|
|
1442
1455
|
inputs: [],
|
|
1443
1456
|
outputs: []
|
|
1444
1457
|
}, this.appendDummyInput("DUMMY").appendField("%{BKY_APP_V1_CALL_APP_METHOD_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(
|
|
@@ -1458,7 +1471,7 @@ const Pi = {
|
|
|
1458
1471
|
const n = We(this.node.id)?.[0];
|
|
1459
1472
|
if (!n)
|
|
1460
1473
|
return;
|
|
1461
|
-
this.method.id = n.id, this.method.
|
|
1474
|
+
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;
|
|
1462
1475
|
const o = this.getField("METHOD");
|
|
1463
1476
|
o.getOptions(!1), o.setValue(this.method.id);
|
|
1464
1477
|
},
|
|
@@ -1469,7 +1482,7 @@ const Pi = {
|
|
|
1469
1482
|
};
|
|
1470
1483
|
},
|
|
1471
1484
|
loadExtraState: function(t) {
|
|
1472
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.
|
|
1485
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "elementMethod", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.method.outputs = t.method?.outputs ?? [], this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1473
1486
|
this.ensureBlocks_(), this.checkWarning_();
|
|
1474
1487
|
}, 0);
|
|
1475
1488
|
},
|
|
@@ -1477,7 +1490,7 @@ const Pi = {
|
|
|
1477
1490
|
return Ee("callMethod");
|
|
1478
1491
|
},
|
|
1479
1492
|
genMethodOpts_: function() {
|
|
1480
|
-
return
|
|
1493
|
+
return ki(this.node.id);
|
|
1481
1494
|
},
|
|
1482
1495
|
onchange: function(t) {
|
|
1483
1496
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -1490,7 +1503,7 @@ const Pi = {
|
|
|
1490
1503
|
}
|
|
1491
1504
|
},
|
|
1492
1505
|
onNodeChange_: function(t) {
|
|
1493
|
-
const e =
|
|
1506
|
+
const e = lt(t);
|
|
1494
1507
|
if (!e) {
|
|
1495
1508
|
console.assert(!1);
|
|
1496
1509
|
return;
|
|
@@ -1506,7 +1519,7 @@ const Pi = {
|
|
|
1506
1519
|
},
|
|
1507
1520
|
onMethodChange_: function(t) {
|
|
1508
1521
|
const e = De(t);
|
|
1509
|
-
e ? (this.method.id = e.id, this.method.
|
|
1522
|
+
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 = "elementMethod", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1510
1523
|
this.ensureBlocks_();
|
|
1511
1524
|
}, 0);
|
|
1512
1525
|
},
|
|
@@ -1526,7 +1539,7 @@ const Pi = {
|
|
|
1526
1539
|
this.removeInput("INPUT" + t);
|
|
1527
1540
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1528
1541
|
const e = this.method.inputs[t];
|
|
1529
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(C.Align.RIGHT).appendField(
|
|
1542
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(C.Align.RIGHT).appendField(Bn[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
1530
1543
|
}
|
|
1531
1544
|
if (this.method.kind === "refMethod")
|
|
1532
1545
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
@@ -1541,22 +1554,22 @@ const Pi = {
|
|
|
1541
1554
|
const e = this.method.inputs[t];
|
|
1542
1555
|
if (!e.type)
|
|
1543
1556
|
continue;
|
|
1544
|
-
const n =
|
|
1557
|
+
const n = dt(e.type);
|
|
1545
1558
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
1546
1559
|
}
|
|
1547
1560
|
},
|
|
1548
1561
|
ensureBlocks_: function() {
|
|
1549
1562
|
if (this.isInsertionMarker())
|
|
1550
1563
|
return;
|
|
1551
|
-
const t =
|
|
1552
|
-
for (let
|
|
1553
|
-
const { key:
|
|
1554
|
-
|
|
1564
|
+
const { kind: t } = ze(this.method.id), e = Fn(t), n = [];
|
|
1565
|
+
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1566
|
+
const { key: i, name: a } = this.method.outputs[o];
|
|
1567
|
+
n.push(["OUTPUT" + o, i, a, e]);
|
|
1555
1568
|
}
|
|
1556
|
-
|
|
1569
|
+
n.length > 0 && F(this, n);
|
|
1557
1570
|
},
|
|
1558
1571
|
checkWarning_: function() {
|
|
1559
|
-
const t =
|
|
1572
|
+
const t = lt(this.node.id);
|
|
1560
1573
|
if (!t) {
|
|
1561
1574
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
1562
1575
|
return;
|
|
@@ -1571,7 +1584,11 @@ const Pi = {
|
|
|
1571
1584
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1572
1585
|
return;
|
|
1573
1586
|
}
|
|
1574
|
-
if (
|
|
1587
|
+
if (e.kind !== this.method.kind) {
|
|
1588
|
+
this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
if (M(e.names, this.method.names) || (this.method.names = e.names), !M(e.inputs, this.method.inputs)) {
|
|
1575
1592
|
this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
|
|
1576
1593
|
return;
|
|
1577
1594
|
}
|
|
@@ -1599,8 +1616,8 @@ const Ri = {
|
|
|
1599
1616
|
init: function() {
|
|
1600
1617
|
this.method = {
|
|
1601
1618
|
id: "",
|
|
1602
|
-
names: [],
|
|
1603
1619
|
kind: "elementMethod",
|
|
1620
|
+
names: [],
|
|
1604
1621
|
inputs: []
|
|
1605
1622
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPL_APP_METHOD_TITLE}").appendField(
|
|
1606
1623
|
new I(() => this.genMethodOpts_()),
|
|
@@ -1608,10 +1625,10 @@ const Ri = {
|
|
|
1608
1625
|
), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_IMPL_APP_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_IMPL_APP_METHOD_HELPURL}"), this.initData_();
|
|
1609
1626
|
},
|
|
1610
1627
|
initData_: function() {
|
|
1611
|
-
const t =
|
|
1628
|
+
const t = on()?.[0];
|
|
1612
1629
|
if (!t)
|
|
1613
1630
|
return;
|
|
1614
|
-
this.method.id = t.id, this.method.
|
|
1631
|
+
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names, this.method.inputs = t.inputs;
|
|
1615
1632
|
const e = this.getField("METHOD");
|
|
1616
1633
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1617
1634
|
},
|
|
@@ -1621,7 +1638,7 @@ const Ri = {
|
|
|
1621
1638
|
};
|
|
1622
1639
|
},
|
|
1623
1640
|
loadExtraState: function(t) {
|
|
1624
|
-
this.method.id = t.method?.id ?? "", this.method.
|
|
1641
|
+
this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "elementMethod", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs ?? [], this.updateShape_(), setTimeout(() => {
|
|
1625
1642
|
this.ensureBlocks_(), this.checkWarning_();
|
|
1626
1643
|
}, 0);
|
|
1627
1644
|
},
|
|
@@ -1639,8 +1656,8 @@ const Ri = {
|
|
|
1639
1656
|
}
|
|
1640
1657
|
},
|
|
1641
1658
|
onMethodChange_: function(t) {
|
|
1642
|
-
const e =
|
|
1643
|
-
e ? (this.method.id = e.id, this.method.
|
|
1659
|
+
const e = kt(t);
|
|
1660
|
+
e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs) : (this.method.id = "", this.method.kind = "elementMethod", this.method.names = [], this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
1644
1661
|
this.ensureBlocks_();
|
|
1645
1662
|
}, 0);
|
|
1646
1663
|
},
|
|
@@ -1663,12 +1680,16 @@ const Ri = {
|
|
|
1663
1680
|
F(this, e);
|
|
1664
1681
|
},
|
|
1665
1682
|
checkWarning_: function() {
|
|
1666
|
-
const t =
|
|
1683
|
+
const t = kt(this.method.id);
|
|
1667
1684
|
if (!t) {
|
|
1668
1685
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1669
1686
|
return;
|
|
1670
1687
|
}
|
|
1671
|
-
if (
|
|
1688
|
+
if (t.kind !== this.method.kind) {
|
|
1689
|
+
this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
|
|
1690
|
+
return;
|
|
1691
|
+
}
|
|
1692
|
+
if (M(t.names, this.method.names) || (this.method.names = t.names), !M(t.inputs, this.method.inputs)) {
|
|
1672
1693
|
this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
|
|
1673
1694
|
return;
|
|
1674
1695
|
}
|
|
@@ -1686,8 +1707,8 @@ const Di = {
|
|
|
1686
1707
|
init: function() {
|
|
1687
1708
|
this.method = {
|
|
1688
1709
|
id: "",
|
|
1689
|
-
|
|
1690
|
-
|
|
1710
|
+
kind: "elementMethod",
|
|
1711
|
+
names: []
|
|
1691
1712
|
}, this.output = {
|
|
1692
1713
|
key: "",
|
|
1693
1714
|
name: "",
|
|
@@ -1703,10 +1724,10 @@ const Di = {
|
|
|
1703
1724
|
initData_: function() {
|
|
1704
1725
|
if (this.method.id)
|
|
1705
1726
|
return;
|
|
1706
|
-
const t =
|
|
1727
|
+
const t = on()?.[0];
|
|
1707
1728
|
if (!t)
|
|
1708
1729
|
return;
|
|
1709
|
-
this.method.id = t.id, this.method.
|
|
1730
|
+
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
1710
1731
|
const e = this.getField("METHOD");
|
|
1711
1732
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1712
1733
|
const n = je(this.method.id)?.[0];
|
|
@@ -1722,7 +1743,7 @@ const Di = {
|
|
|
1722
1743
|
};
|
|
1723
1744
|
},
|
|
1724
1745
|
loadExtraState: function(t) {
|
|
1725
|
-
this.method.id = t.method?.key ?? "", this.method.
|
|
1746
|
+
this.method.id = t.method?.key ?? "", this.method.kind = t.method?.kind ?? "elementMethod", 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(() => {
|
|
1726
1747
|
this.checkWarning_();
|
|
1727
1748
|
}, 0);
|
|
1728
1749
|
},
|
|
@@ -1743,13 +1764,13 @@ const Di = {
|
|
|
1743
1764
|
}
|
|
1744
1765
|
},
|
|
1745
1766
|
onMethodChange_: function(t) {
|
|
1746
|
-
const e =
|
|
1767
|
+
const e = kt(t);
|
|
1747
1768
|
if (!e) {
|
|
1748
1769
|
console.assert(!1);
|
|
1749
1770
|
return;
|
|
1750
1771
|
}
|
|
1751
1772
|
const n = this.method.id !== e.id;
|
|
1752
|
-
this.method.id = e.id, this.method.
|
|
1773
|
+
this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
|
|
1753
1774
|
const o = this.getField("OUTPUT");
|
|
1754
1775
|
if (o.getOptions(!1), n || !Me(this.method.id, this.output.key)) {
|
|
1755
1776
|
const i = je(this.method.id)?.[0];
|
|
@@ -1766,21 +1787,25 @@ const Di = {
|
|
|
1766
1787
|
t.connection.setShadowDom(null);
|
|
1767
1788
|
const e = t.connection.targetBlock();
|
|
1768
1789
|
e && !e.isShadow() && e.dispose();
|
|
1769
|
-
const n =
|
|
1790
|
+
const n = pt(this.output.type);
|
|
1770
1791
|
t.setCheck(n);
|
|
1771
1792
|
},
|
|
1772
1793
|
updateShadows_: function() {
|
|
1773
1794
|
if (this.isInsertionMarker())
|
|
1774
1795
|
return;
|
|
1775
|
-
const t =
|
|
1796
|
+
const t = dt(this.output.type);
|
|
1776
1797
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
1777
1798
|
},
|
|
1778
1799
|
checkWarning_: function() {
|
|
1779
|
-
const t =
|
|
1800
|
+
const t = kt(this.method.id);
|
|
1780
1801
|
if (!t) {
|
|
1781
1802
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1782
1803
|
return;
|
|
1783
1804
|
}
|
|
1805
|
+
if (t.kind !== this.method.kind) {
|
|
1806
|
+
this.setWarningText(p("WARN_METHOD_HAS_CHANGED"));
|
|
1807
|
+
return;
|
|
1808
|
+
}
|
|
1784
1809
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
1785
1810
|
const e = Me(this.method.id, this.output.key);
|
|
1786
1811
|
if (!e) {
|
|
@@ -1863,7 +1888,7 @@ const Mi = {
|
|
|
1863
1888
|
this.app.id = t.id, this.app.name = t.name;
|
|
1864
1889
|
const e = this.getField("APP");
|
|
1865
1890
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
1866
|
-
const n =
|
|
1891
|
+
const n = $e(this.app.id)?.[0];
|
|
1867
1892
|
if (!n)
|
|
1868
1893
|
return;
|
|
1869
1894
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -1898,7 +1923,7 @@ const Mi = {
|
|
|
1898
1923
|
}
|
|
1899
1924
|
},
|
|
1900
1925
|
onAppChange_: function(t) {
|
|
1901
|
-
const e =
|
|
1926
|
+
const e = In(t);
|
|
1902
1927
|
if (!e) {
|
|
1903
1928
|
console.assert(!1);
|
|
1904
1929
|
return;
|
|
@@ -1907,7 +1932,7 @@ const Mi = {
|
|
|
1907
1932
|
this.app.id = e.id, this.app.name = e.name;
|
|
1908
1933
|
const o = this.getField("PAGE");
|
|
1909
1934
|
if (o.getOptions(!1), n || !Pe(this.app.id, this.page.id)) {
|
|
1910
|
-
const a =
|
|
1935
|
+
const a = $e(this.app.id)?.[0]?.id ?? "";
|
|
1911
1936
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1912
1937
|
}
|
|
1913
1938
|
},
|
|
@@ -1916,7 +1941,7 @@ const Mi = {
|
|
|
1916
1941
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1917
1942
|
},
|
|
1918
1943
|
checkWarning_: function() {
|
|
1919
|
-
const t =
|
|
1944
|
+
const t = In(this.app.id);
|
|
1920
1945
|
if (!t) {
|
|
1921
1946
|
this.setWarningText(p("WARN_APP_NOT_FOUND"));
|
|
1922
1947
|
return;
|
|
@@ -1977,7 +2002,7 @@ const Ui = {
|
|
|
1977
2002
|
}
|
|
1978
2003
|
},
|
|
1979
2004
|
onCompChange_: function(t) {
|
|
1980
|
-
const e =
|
|
2005
|
+
const e = On(t);
|
|
1981
2006
|
if (!e) {
|
|
1982
2007
|
console.assert(!1);
|
|
1983
2008
|
return;
|
|
@@ -1989,7 +2014,7 @@ const Ui = {
|
|
|
1989
2014
|
this.setWarningText(p("WARN_COMP_NOT_FOUND"));
|
|
1990
2015
|
return;
|
|
1991
2016
|
}
|
|
1992
|
-
if (!
|
|
2017
|
+
if (!On(this.comp.id)) {
|
|
1993
2018
|
this.setWarningText(p("WARN_COMP_NOT_FOUND"));
|
|
1994
2019
|
return;
|
|
1995
2020
|
}
|
|
@@ -2009,8 +2034,8 @@ const Vi = {
|
|
|
2009
2034
|
alias: ""
|
|
2010
2035
|
}, this.prop = {
|
|
2011
2036
|
id: "",
|
|
2012
|
-
|
|
2013
|
-
|
|
2037
|
+
kind: "elementProperty",
|
|
2038
|
+
names: []
|
|
2014
2039
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_PROP_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(new I(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_GET_APP_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_GET_APP_PROP_HELPURL}"), this.initData_();
|
|
2015
2040
|
},
|
|
2016
2041
|
initData_: function() {
|
|
@@ -2025,7 +2050,7 @@ const Vi = {
|
|
|
2025
2050
|
const n = Ut(this.node.id, "read")?.[0];
|
|
2026
2051
|
if (!n)
|
|
2027
2052
|
return;
|
|
2028
|
-
this.prop.id = n.id, this.prop.
|
|
2053
|
+
this.prop.id = n.id, this.prop.kind = n.kind, this.prop.names = n.names;
|
|
2029
2054
|
const o = this.getField("PROP");
|
|
2030
2055
|
o.getOptions(!1), o.setValue(this.prop.id);
|
|
2031
2056
|
},
|
|
@@ -2036,7 +2061,7 @@ const Vi = {
|
|
|
2036
2061
|
};
|
|
2037
2062
|
},
|
|
2038
2063
|
loadExtraState: function(t) {
|
|
2039
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.
|
|
2064
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.kind = t.prop?.kind ?? "elementProperty", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
|
|
2040
2065
|
this.checkWarning_();
|
|
2041
2066
|
}, 0);
|
|
2042
2067
|
},
|
|
@@ -2057,7 +2082,7 @@ const Vi = {
|
|
|
2057
2082
|
}
|
|
2058
2083
|
},
|
|
2059
2084
|
onNodeChange_: function(t) {
|
|
2060
|
-
const e =
|
|
2085
|
+
const e = lt(t);
|
|
2061
2086
|
if (!e) {
|
|
2062
2087
|
console.assert(!1);
|
|
2063
2088
|
return;
|
|
@@ -2073,10 +2098,10 @@ const Vi = {
|
|
|
2073
2098
|
},
|
|
2074
2099
|
onPropChange_: function(t) {
|
|
2075
2100
|
const e = Tt(t);
|
|
2076
|
-
e ? (this.prop.id = e.id, this.prop.
|
|
2101
|
+
e ? (this.prop.id = e.id, this.prop.kind = e.kind, this.prop.names = e.names) : (this.prop.id = "", this.prop.kind = "elementProperty", this.prop.names = []);
|
|
2077
2102
|
},
|
|
2078
2103
|
checkWarning_: function() {
|
|
2079
|
-
const t =
|
|
2104
|
+
const t = lt(this.node.id);
|
|
2080
2105
|
if (!t) {
|
|
2081
2106
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
2082
2107
|
return;
|
|
@@ -2091,12 +2116,16 @@ const Vi = {
|
|
|
2091
2116
|
this.setWarningText(p("WARN_PROP_NOT_FOUND"));
|
|
2092
2117
|
return;
|
|
2093
2118
|
}
|
|
2094
|
-
|
|
2119
|
+
if (e.kind !== this.prop.kind) {
|
|
2120
|
+
this.setWarningText(p("WARN_PROP_HAS_CHANGED"));
|
|
2121
|
+
return;
|
|
2122
|
+
}
|
|
2123
|
+
M(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2095
2124
|
}
|
|
2096
2125
|
};
|
|
2097
2126
|
T.get_app_prop_v1 = Vi;
|
|
2098
2127
|
s.forBlock.get_app_prop_v1 = function(t) {
|
|
2099
|
-
const e = s.quote_, n = t,
|
|
2128
|
+
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } = tn(n.prop.id);
|
|
2100
2129
|
return [`__getPropV1__(${e(o)}, ${e(i)}, ${e(a)})`, c.ATOMIC];
|
|
2101
2130
|
};
|
|
2102
2131
|
const xi = {
|
|
@@ -2107,8 +2136,8 @@ const xi = {
|
|
|
2107
2136
|
alias: ""
|
|
2108
2137
|
}, this.prop = {
|
|
2109
2138
|
id: "",
|
|
2110
|
-
|
|
2111
|
-
|
|
2139
|
+
kind: "elementProperty",
|
|
2140
|
+
names: []
|
|
2112
2141
|
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_PROP_TITLE}").appendField(new I(() => this.genNodeOpts_()), "NODE").appendField(new I(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_PROP_HELPURL}"), this.initData_(), this.isInFlyout && this.updateShadow_();
|
|
2113
2142
|
},
|
|
2114
2143
|
initData_: function() {
|
|
@@ -2123,7 +2152,7 @@ const xi = {
|
|
|
2123
2152
|
const n = Ut(this.node.id, "write")?.[0];
|
|
2124
2153
|
if (!n)
|
|
2125
2154
|
return;
|
|
2126
|
-
this.prop.id = n.id, this.prop.
|
|
2155
|
+
this.prop.id = n.id, this.prop.kind = n.kind, this.prop.names = n.names;
|
|
2127
2156
|
const o = this.getField("PROP");
|
|
2128
2157
|
o.getOptions(!1), o.setValue(this.prop.id);
|
|
2129
2158
|
},
|
|
@@ -2134,7 +2163,7 @@ const xi = {
|
|
|
2134
2163
|
};
|
|
2135
2164
|
},
|
|
2136
2165
|
loadExtraState: function(t) {
|
|
2137
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.
|
|
2166
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.prop.id = t.prop?.id ?? "", this.prop.kind = t.prop?.kind ?? "elementProperty", this.prop.names = t.prop?.names ?? [], setTimeout(() => {
|
|
2138
2167
|
this.checkWarning_();
|
|
2139
2168
|
}, 0);
|
|
2140
2169
|
},
|
|
@@ -2155,7 +2184,7 @@ const xi = {
|
|
|
2155
2184
|
}
|
|
2156
2185
|
},
|
|
2157
2186
|
onNodeChange_: function(t) {
|
|
2158
|
-
const e =
|
|
2187
|
+
const e = lt(t);
|
|
2159
2188
|
if (!e) {
|
|
2160
2189
|
console.assert(!1);
|
|
2161
2190
|
return;
|
|
@@ -2171,7 +2200,7 @@ const xi = {
|
|
|
2171
2200
|
},
|
|
2172
2201
|
onPropChange_: function(t) {
|
|
2173
2202
|
const e = Tt(t);
|
|
2174
|
-
e ? (this.prop.id = e.id, this.prop.
|
|
2203
|
+
e ? (this.prop.id = e.id, this.prop.kind = e.kind, this.prop.names = e.names) : (this.prop.id = "", this.prop.kind = "elementProperty", this.prop.names = []), this.updateShadow_();
|
|
2175
2204
|
},
|
|
2176
2205
|
updateShadow_: function() {
|
|
2177
2206
|
if (this.isInsertionMarker())
|
|
@@ -2181,26 +2210,16 @@ const xi = {
|
|
|
2181
2210
|
return;
|
|
2182
2211
|
this.getInput("VALUE").setShadowDom(null);
|
|
2183
2212
|
const e = this.getInput("VALUE").connection.targetBlock();
|
|
2184
|
-
if (e && e.dispose(), t.meta.
|
|
2213
|
+
if (e && e.dispose(), t.meta.element) {
|
|
2185
2214
|
const n = ii(t.meta.raw), o = _i(t.meta.raw);
|
|
2186
2215
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2187
|
-
} else
|
|
2188
|
-
const n =
|
|
2189
|
-
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2190
|
-
} else if (t.meta.kind === "customProperty") {
|
|
2191
|
-
const n = J(t.meta.raw.type), o = q(t.meta.raw.type);
|
|
2192
|
-
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2193
|
-
} else if (t.meta.kind === "elementSlotProperty") {
|
|
2194
|
-
const n = J(t.meta.raw.type), o = q(t.meta.raw.type);
|
|
2195
|
-
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2196
|
-
} else if (t.meta.kind === "customSlotProperty") {
|
|
2197
|
-
const n = J(t.meta.raw.type), o = q(t.meta.raw.type);
|
|
2216
|
+
} else {
|
|
2217
|
+
const n = pt(t.meta.raw.type), o = dt(t.meta.raw.type);
|
|
2198
2218
|
this.getInput("VALUE").setCheck(n).setShadowDom(o);
|
|
2199
|
-
}
|
|
2200
|
-
console.assert(!1);
|
|
2219
|
+
}
|
|
2201
2220
|
},
|
|
2202
2221
|
checkWarning_: function() {
|
|
2203
|
-
const t =
|
|
2222
|
+
const t = lt(this.node.id);
|
|
2204
2223
|
if (!t) {
|
|
2205
2224
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
2206
2225
|
return;
|
|
@@ -2215,12 +2234,16 @@ const xi = {
|
|
|
2215
2234
|
this.setWarningText(p("WARN_PROP_NOT_FOUND"));
|
|
2216
2235
|
return;
|
|
2217
2236
|
}
|
|
2218
|
-
|
|
2237
|
+
if (e.kind !== this.prop.kind) {
|
|
2238
|
+
this.setWarningText(p("WARN_PROP_HAS_CHANGED"));
|
|
2239
|
+
return;
|
|
2240
|
+
}
|
|
2241
|
+
M(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2219
2242
|
}
|
|
2220
2243
|
};
|
|
2221
2244
|
T.set_app_prop_v1 = xi;
|
|
2222
2245
|
s.forBlock.set_app_prop_v1 = function(t) {
|
|
2223
|
-
const e = s.quote_, n = t,
|
|
2246
|
+
const e = s.quote_, n = t, { kind: o, nodeId: i, propertyKey: a } = tn(n.prop.id), u = s.valueToCode(n, "VALUE", c.NONE);
|
|
2224
2247
|
return `__setPropV1__(${e(o)}, ${e(i)}, ${e(a)}, ${u});
|
|
2225
2248
|
`;
|
|
2226
2249
|
};
|
|
@@ -2238,7 +2261,7 @@ const Fi = {
|
|
|
2238
2261
|
initData_: function() {
|
|
2239
2262
|
if (this.state.id)
|
|
2240
2263
|
return;
|
|
2241
|
-
const t =
|
|
2264
|
+
const t = sn()?.[0];
|
|
2242
2265
|
if (!t)
|
|
2243
2266
|
return;
|
|
2244
2267
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
@@ -2302,7 +2325,7 @@ const Yi = {
|
|
|
2302
2325
|
initData_: function() {
|
|
2303
2326
|
if (this.state.id)
|
|
2304
2327
|
return;
|
|
2305
|
-
const t =
|
|
2328
|
+
const t = sn()?.[0];
|
|
2306
2329
|
if (!t)
|
|
2307
2330
|
return;
|
|
2308
2331
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
@@ -2336,7 +2359,7 @@ const Yi = {
|
|
|
2336
2359
|
this.getInput("VALUE").setShadowDom(null);
|
|
2337
2360
|
const t = this.getInput("VALUE").connection.targetBlock();
|
|
2338
2361
|
t && t.dispose();
|
|
2339
|
-
const e =
|
|
2362
|
+
const e = pt(this.state.type), n = dt(this.state.type);
|
|
2340
2363
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
2341
2364
|
},
|
|
2342
2365
|
checkWarning_: function() {
|
|
@@ -3061,7 +3084,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3061
3084
|
`
|
|
3062
3085
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3063
3086
|
};
|
|
3064
|
-
const wi =
|
|
3087
|
+
const wi = y.xml, Ki = [
|
|
3065
3088
|
{
|
|
3066
3089
|
type: "add_data_v1",
|
|
3067
3090
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3127,11 +3150,11 @@ const wi = k.xml, Ki = [
|
|
|
3127
3150
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3128
3151
|
}
|
|
3129
3152
|
];
|
|
3130
|
-
function
|
|
3153
|
+
function Hi(t, e) {
|
|
3131
3154
|
const n = Ki.find((o) => o.type === t);
|
|
3132
3155
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3133
3156
|
}
|
|
3134
|
-
const
|
|
3157
|
+
const $i = {
|
|
3135
3158
|
init: function() {
|
|
3136
3159
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3137
3160
|
},
|
|
@@ -3165,12 +3188,12 @@ const Hi = {
|
|
|
3165
3188
|
},
|
|
3166
3189
|
tryDuplicate_: function(t) {
|
|
3167
3190
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3168
|
-
if (e &&
|
|
3191
|
+
if (e && Hi(e.type, t.oldInputName))
|
|
3169
3192
|
try {
|
|
3170
3193
|
A.disable();
|
|
3171
3194
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3172
3195
|
if (n) {
|
|
3173
|
-
const o =
|
|
3196
|
+
const o = nn(
|
|
3174
3197
|
this.workspace,
|
|
3175
3198
|
this.key,
|
|
3176
3199
|
this.name,
|
|
@@ -3190,7 +3213,7 @@ const Hi = {
|
|
|
3190
3213
|
this.setFieldValue(this.name, "LABEL");
|
|
3191
3214
|
}
|
|
3192
3215
|
};
|
|
3193
|
-
T.parameter_v1 =
|
|
3216
|
+
T.parameter_v1 = $i;
|
|
3194
3217
|
s.forBlock.parameter_v1 = function(t) {
|
|
3195
3218
|
return [t.key, c.ATOMIC];
|
|
3196
3219
|
};
|
|
@@ -3216,12 +3239,12 @@ function to(t) {
|
|
|
3216
3239
|
const e = [];
|
|
3217
3240
|
return Vt(t).forEach(({ id: o, name: i }) => {
|
|
3218
3241
|
e.push([i, o]);
|
|
3219
|
-
}),
|
|
3242
|
+
}), k(e);
|
|
3220
3243
|
}
|
|
3221
3244
|
function Xe() {
|
|
3222
3245
|
return E.compute.activeFunc;
|
|
3223
3246
|
}
|
|
3224
|
-
function
|
|
3247
|
+
function Cn(t) {
|
|
3225
3248
|
const { outputs: e } = E.compute.activeFunc;
|
|
3226
3249
|
return e.find((n) => n.id === t);
|
|
3227
3250
|
}
|
|
@@ -3229,7 +3252,7 @@ function Wi() {
|
|
|
3229
3252
|
const t = [], { outputs: e } = E.compute.activeFunc;
|
|
3230
3253
|
return e.forEach(({ id: n, name: o }) => {
|
|
3231
3254
|
t.push([o, n]);
|
|
3232
|
-
}),
|
|
3255
|
+
}), k(t);
|
|
3233
3256
|
}
|
|
3234
3257
|
function Kt(t) {
|
|
3235
3258
|
const e = [];
|
|
@@ -3244,7 +3267,7 @@ function eo(t) {
|
|
|
3244
3267
|
const e = [];
|
|
3245
3268
|
return Kt(t).forEach(({ id: o, name: i }) => {
|
|
3246
3269
|
e.push([i, o]);
|
|
3247
|
-
}),
|
|
3270
|
+
}), k(e);
|
|
3248
3271
|
}
|
|
3249
3272
|
const ji = {
|
|
3250
3273
|
init: function() {
|
|
@@ -3349,14 +3372,14 @@ const ji = {
|
|
|
3349
3372
|
},
|
|
3350
3373
|
updateCheck_: function() {
|
|
3351
3374
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3352
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3375
|
+
const { type: e } = this.func.inputs[t], n = pt(e);
|
|
3353
3376
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3354
3377
|
}
|
|
3355
3378
|
},
|
|
3356
3379
|
updateShadow_: function() {
|
|
3357
3380
|
if (!this.isInsertionMarker())
|
|
3358
3381
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3359
|
-
const e = this.func.inputs[t], n =
|
|
3382
|
+
const e = this.func.inputs[t], n = dt(e.type);
|
|
3360
3383
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3361
3384
|
}
|
|
3362
3385
|
},
|
|
@@ -3523,14 +3546,14 @@ const Xi = {
|
|
|
3523
3546
|
},
|
|
3524
3547
|
updateCheck_: function() {
|
|
3525
3548
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3526
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3549
|
+
const { type: e } = this.func.inputs[t], n = pt(e);
|
|
3527
3550
|
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3528
3551
|
}
|
|
3529
3552
|
},
|
|
3530
3553
|
updateShadow_: function() {
|
|
3531
3554
|
if (!this.isInsertionMarker())
|
|
3532
3555
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3533
|
-
const e = this.func.inputs[t], n =
|
|
3556
|
+
const e = this.func.inputs[t], n = dt(e.type);
|
|
3534
3557
|
this.getInput("INPUT" + t).setShadowDom(n);
|
|
3535
3558
|
}
|
|
3536
3559
|
},
|
|
@@ -3703,7 +3726,7 @@ const qi = {
|
|
|
3703
3726
|
}
|
|
3704
3727
|
},
|
|
3705
3728
|
onOutputChange_: function(t) {
|
|
3706
|
-
const e =
|
|
3729
|
+
const e = Cn(t);
|
|
3707
3730
|
if (!e) {
|
|
3708
3731
|
console.assert(!1);
|
|
3709
3732
|
return;
|
|
@@ -3715,17 +3738,17 @@ const qi = {
|
|
|
3715
3738
|
t.connection.setShadowDom(null);
|
|
3716
3739
|
const e = t.connection.targetBlock();
|
|
3717
3740
|
e && !e.isShadow() && e.dispose();
|
|
3718
|
-
const n =
|
|
3741
|
+
const n = pt(this.output.type);
|
|
3719
3742
|
t.setCheck(n);
|
|
3720
3743
|
},
|
|
3721
3744
|
updateShadows_: function() {
|
|
3722
3745
|
if (this.isInsertionMarker())
|
|
3723
3746
|
return;
|
|
3724
|
-
const t =
|
|
3747
|
+
const t = dt(this.output.type);
|
|
3725
3748
|
this.getInput("VALUE").setShadowDom(t);
|
|
3726
3749
|
},
|
|
3727
3750
|
checkWarning_: function() {
|
|
3728
|
-
const t =
|
|
3751
|
+
const t = Cn(this.output.id);
|
|
3729
3752
|
if (!t) {
|
|
3730
3753
|
this.setWarningText(p("WARN_FUNC_HAS_CHANGED"));
|
|
3731
3754
|
return;
|
|
@@ -3809,23 +3832,23 @@ m([
|
|
|
3809
3832
|
s.forBlock.compute_env_is_v1 = function(t) {
|
|
3810
3833
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
3811
3834
|
};
|
|
3812
|
-
function
|
|
3835
|
+
function q() {
|
|
3813
3836
|
const t = [];
|
|
3814
3837
|
return E.data.spaces.forEach((e) => {
|
|
3815
3838
|
e.tables.length > 0 && t.push(e);
|
|
3816
3839
|
}), t;
|
|
3817
3840
|
}
|
|
3818
|
-
function
|
|
3841
|
+
function rt(t) {
|
|
3819
3842
|
const { spaces: e } = E.data;
|
|
3820
3843
|
return e.find((n) => n.id === t);
|
|
3821
3844
|
}
|
|
3822
3845
|
function ge() {
|
|
3823
3846
|
const t = [];
|
|
3824
|
-
return
|
|
3847
|
+
return q().forEach(({ id: n, name: o }) => {
|
|
3825
3848
|
t.push([o, n]);
|
|
3826
|
-
}),
|
|
3849
|
+
}), k(t);
|
|
3827
3850
|
}
|
|
3828
|
-
function
|
|
3851
|
+
function H(t) {
|
|
3829
3852
|
const { spaces: e } = E.data, n = e.find((o) => o.id === t);
|
|
3830
3853
|
return n ? n.tables : [];
|
|
3831
3854
|
}
|
|
@@ -3836,9 +3859,9 @@ function j(t, e) {
|
|
|
3836
3859
|
}
|
|
3837
3860
|
function Ae(t) {
|
|
3838
3861
|
const e = [];
|
|
3839
|
-
return
|
|
3862
|
+
return H(t).forEach(({ id: o, name: i }) => {
|
|
3840
3863
|
e.push([i, o]);
|
|
3841
|
-
}),
|
|
3864
|
+
}), k(e);
|
|
3842
3865
|
}
|
|
3843
3866
|
function oe(t, e) {
|
|
3844
3867
|
const { spaces: n } = E.data, o = n.find((a) => a.id === t);
|
|
@@ -3859,16 +3882,16 @@ function Qi(t, e) {
|
|
|
3859
3882
|
const n = [];
|
|
3860
3883
|
return oe(t, e).forEach(({ id: i, name: a }) => {
|
|
3861
3884
|
n.push([a, i]);
|
|
3862
|
-
}),
|
|
3885
|
+
}), k(n);
|
|
3863
3886
|
}
|
|
3864
3887
|
function zi(t) {
|
|
3865
3888
|
const e = t.getInput("TABLE").connection;
|
|
3866
3889
|
if (e.targetBlock())
|
|
3867
3890
|
return;
|
|
3868
3891
|
let n, o;
|
|
3869
|
-
const i =
|
|
3892
|
+
const i = q()?.[0];
|
|
3870
3893
|
if (i) {
|
|
3871
|
-
const l =
|
|
3894
|
+
const l = H(i.id)?.[0];
|
|
3872
3895
|
if (l) {
|
|
3873
3896
|
n = {
|
|
3874
3897
|
space: {
|
|
@@ -3997,11 +4020,11 @@ const es = {
|
|
|
3997
4020
|
initData_: function() {
|
|
3998
4021
|
if (this.space.id)
|
|
3999
4022
|
return;
|
|
4000
|
-
const t =
|
|
4023
|
+
const t = q()?.[0];
|
|
4001
4024
|
if (!t)
|
|
4002
4025
|
return;
|
|
4003
4026
|
this.space.id = t.id, this.space.name = t.name;
|
|
4004
|
-
const e =
|
|
4027
|
+
const e = H(this.space.id)?.[0];
|
|
4005
4028
|
if (!e)
|
|
4006
4029
|
return;
|
|
4007
4030
|
this.table.id = e.id, this.table.name = e.name;
|
|
@@ -4040,14 +4063,14 @@ const es = {
|
|
|
4040
4063
|
}
|
|
4041
4064
|
},
|
|
4042
4065
|
onSpaceChange_: function(t) {
|
|
4043
|
-
const e =
|
|
4066
|
+
const e = rt(t);
|
|
4044
4067
|
if (!e) {
|
|
4045
4068
|
console.assert(!1);
|
|
4046
4069
|
return;
|
|
4047
4070
|
}
|
|
4048
4071
|
const n = e.id !== this.space.id;
|
|
4049
4072
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4050
|
-
const o =
|
|
4073
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4051
4074
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4052
4075
|
}
|
|
4053
4076
|
},
|
|
@@ -4083,7 +4106,7 @@ const es = {
|
|
|
4083
4106
|
n && n.dispose();
|
|
4084
4107
|
else if (n)
|
|
4085
4108
|
return;
|
|
4086
|
-
const o =
|
|
4109
|
+
const o = He(this.workspace, this.column.type);
|
|
4087
4110
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4088
4111
|
},
|
|
4089
4112
|
updateCheck_: function() {
|
|
@@ -4091,7 +4114,7 @@ const es = {
|
|
|
4091
4114
|
this.getInput("VALUE").connection.setCheck(t);
|
|
4092
4115
|
},
|
|
4093
4116
|
checkWarning_: function() {
|
|
4094
|
-
const t =
|
|
4117
|
+
const t = rt(this.space.id);
|
|
4095
4118
|
if (!t) {
|
|
4096
4119
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4097
4120
|
return;
|
|
@@ -4152,7 +4175,7 @@ const is = {
|
|
|
4152
4175
|
]),
|
|
4153
4176
|
"TYPE"
|
|
4154
4177
|
), this.setMutator(
|
|
4155
|
-
new
|
|
4178
|
+
new _t.MutatorIcon(
|
|
4156
4179
|
["cond_logic_item_v1"],
|
|
4157
4180
|
this
|
|
4158
4181
|
)
|
|
@@ -4231,7 +4254,7 @@ function ss(t) {
|
|
|
4231
4254
|
const e = t.getInput("TABLE").connection;
|
|
4232
4255
|
if (e.targetBlock())
|
|
4233
4256
|
return;
|
|
4234
|
-
const n =
|
|
4257
|
+
const n = q()?.[0], o = H(n?.id ?? "")?.[0], i = {
|
|
4235
4258
|
type: "select_table_v1",
|
|
4236
4259
|
extraState: {
|
|
4237
4260
|
space: {
|
|
@@ -4250,7 +4273,7 @@ function as(t) {
|
|
|
4250
4273
|
const e = t.getInput("CONDITION").connection;
|
|
4251
4274
|
if (e.targetBlock())
|
|
4252
4275
|
return;
|
|
4253
|
-
const n =
|
|
4276
|
+
const n = q()?.[0], o = H(n?.id ?? "")?.[0], i = oe(n?.id, o?.id)?.[0], a = {
|
|
4254
4277
|
type: "cond_atomic_v1",
|
|
4255
4278
|
extraState: {
|
|
4256
4279
|
space: {
|
|
@@ -4360,9 +4383,9 @@ function ls(t) {
|
|
|
4360
4383
|
if (e.targetBlock())
|
|
4361
4384
|
return;
|
|
4362
4385
|
let n, o;
|
|
4363
|
-
const i =
|
|
4386
|
+
const i = q()?.[0];
|
|
4364
4387
|
if (i) {
|
|
4365
|
-
const l =
|
|
4388
|
+
const l = H(i.id)?.[0];
|
|
4366
4389
|
if (l) {
|
|
4367
4390
|
n = {
|
|
4368
4391
|
space: {
|
|
@@ -4598,7 +4621,7 @@ const ms = {
|
|
|
4598
4621
|
new I(() => this.genTableOpts_()),
|
|
4599
4622
|
"TABLE"
|
|
4600
4623
|
), this.setMutator(
|
|
4601
|
-
new
|
|
4624
|
+
new _t.MutatorIcon(
|
|
4602
4625
|
["select_column_item_v1"],
|
|
4603
4626
|
this
|
|
4604
4627
|
)
|
|
@@ -4607,13 +4630,13 @@ const ms = {
|
|
|
4607
4630
|
initData_: function() {
|
|
4608
4631
|
if (this.space.id)
|
|
4609
4632
|
return;
|
|
4610
|
-
const t =
|
|
4633
|
+
const t = q()?.[0];
|
|
4611
4634
|
if (!t)
|
|
4612
4635
|
return;
|
|
4613
4636
|
this.space.id = t.id, this.space.name = t.name;
|
|
4614
4637
|
const e = this.getField("SPACE");
|
|
4615
4638
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4616
|
-
const n =
|
|
4639
|
+
const n = H(this.space.id)?.[0];
|
|
4617
4640
|
if (!n)
|
|
4618
4641
|
return;
|
|
4619
4642
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4642,7 +4665,7 @@ const ms = {
|
|
|
4642
4665
|
const t = [];
|
|
4643
4666
|
return this.table.columns.forEach(({ id: e, name: n }) => {
|
|
4644
4667
|
t.push([n, e]);
|
|
4645
|
-
}),
|
|
4668
|
+
}), k(t);
|
|
4646
4669
|
},
|
|
4647
4670
|
onchange: function(t) {
|
|
4648
4671
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -4667,14 +4690,14 @@ const ms = {
|
|
|
4667
4690
|
}
|
|
4668
4691
|
},
|
|
4669
4692
|
onSpaceChange_: function(t) {
|
|
4670
|
-
const e =
|
|
4693
|
+
const e = rt(t);
|
|
4671
4694
|
if (!e) {
|
|
4672
4695
|
console.assert(!1);
|
|
4673
4696
|
return;
|
|
4674
4697
|
}
|
|
4675
4698
|
const n = e.id !== this.space.id;
|
|
4676
4699
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4677
|
-
const o =
|
|
4700
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4678
4701
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4679
4702
|
}
|
|
4680
4703
|
},
|
|
@@ -4754,7 +4777,7 @@ const ms = {
|
|
|
4754
4777
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4755
4778
|
const e = this.table.columns[t], n = new I(
|
|
4756
4779
|
() => this.genColumnOpts_()
|
|
4757
|
-
), o = new
|
|
4780
|
+
), o = new ut("");
|
|
4758
4781
|
this.appendDummyInput("ADD" + t).setAlign(C.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4759
4782
|
}
|
|
4760
4783
|
},
|
|
@@ -4766,14 +4789,14 @@ const ms = {
|
|
|
4766
4789
|
continue;
|
|
4767
4790
|
const e = new I(
|
|
4768
4791
|
() => this.genColumnOpts_()
|
|
4769
|
-
), n = new
|
|
4792
|
+
), n = new ut("");
|
|
4770
4793
|
this.appendDummyInput("ADD" + t).setAlign(C.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4771
4794
|
const o = this.table.columns[0];
|
|
4772
4795
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4773
4796
|
}
|
|
4774
4797
|
},
|
|
4775
4798
|
checkWarning_: function() {
|
|
4776
|
-
const t =
|
|
4799
|
+
const t = rt(this.space.id);
|
|
4777
4800
|
if (!t) {
|
|
4778
4801
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4779
4802
|
return;
|
|
@@ -4822,13 +4845,13 @@ const Ts = {
|
|
|
4822
4845
|
initData_: function() {
|
|
4823
4846
|
if (this.space.id)
|
|
4824
4847
|
return;
|
|
4825
|
-
const t =
|
|
4848
|
+
const t = q()?.[0];
|
|
4826
4849
|
if (!t)
|
|
4827
4850
|
return;
|
|
4828
4851
|
this.space.id = t.id, this.space.name = t.name;
|
|
4829
4852
|
const e = this.getField("SPACE");
|
|
4830
4853
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
4831
|
-
const n =
|
|
4854
|
+
const n = H(this.space.id)?.[0];
|
|
4832
4855
|
if (!n)
|
|
4833
4856
|
return;
|
|
4834
4857
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -4861,14 +4884,14 @@ const Ts = {
|
|
|
4861
4884
|
}
|
|
4862
4885
|
},
|
|
4863
4886
|
onSpaceChange_: function(t) {
|
|
4864
|
-
const e =
|
|
4887
|
+
const e = rt(t);
|
|
4865
4888
|
if (!e) {
|
|
4866
4889
|
console.assert(!1);
|
|
4867
4890
|
return;
|
|
4868
4891
|
}
|
|
4869
4892
|
let n = !1;
|
|
4870
4893
|
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)) {
|
|
4871
|
-
const i =
|
|
4894
|
+
const i = H(this.space.id)?.[0];
|
|
4872
4895
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
4873
4896
|
}
|
|
4874
4897
|
},
|
|
@@ -4881,7 +4904,7 @@ const Ts = {
|
|
|
4881
4904
|
this.table.id = e.id, this.table.name = e.name;
|
|
4882
4905
|
},
|
|
4883
4906
|
checkWarning_: function() {
|
|
4884
|
-
const t =
|
|
4907
|
+
const t = rt(this.space.id);
|
|
4885
4908
|
if (!t) {
|
|
4886
4909
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4887
4910
|
return;
|
|
@@ -4994,7 +5017,7 @@ const Is = {
|
|
|
4994
5017
|
new I(() => this.genTableOpts_()),
|
|
4995
5018
|
"TABLE"
|
|
4996
5019
|
), this.setMutator(
|
|
4997
|
-
new
|
|
5020
|
+
new _t.MutatorIcon(
|
|
4998
5021
|
["update_column_item_v1"],
|
|
4999
5022
|
this
|
|
5000
5023
|
)
|
|
@@ -5003,13 +5026,13 @@ const Is = {
|
|
|
5003
5026
|
initData_: function() {
|
|
5004
5027
|
if (this.space.id)
|
|
5005
5028
|
return;
|
|
5006
|
-
const t =
|
|
5029
|
+
const t = q()?.[0];
|
|
5007
5030
|
if (!t)
|
|
5008
5031
|
return;
|
|
5009
5032
|
this.space.id = t.id, this.space.name = t.name;
|
|
5010
5033
|
const e = this.getField("SPACE");
|
|
5011
5034
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
5012
|
-
const n =
|
|
5035
|
+
const n = H(this.space.id)?.[0];
|
|
5013
5036
|
if (!n)
|
|
5014
5037
|
return;
|
|
5015
5038
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5038,7 +5061,7 @@ const Is = {
|
|
|
5038
5061
|
const t = [];
|
|
5039
5062
|
return this.table.columns.forEach(({ id: e, name: n }) => {
|
|
5040
5063
|
t.push([n, e]);
|
|
5041
|
-
}),
|
|
5064
|
+
}), k(t);
|
|
5042
5065
|
},
|
|
5043
5066
|
onchange: function(t) {
|
|
5044
5067
|
if (t.type === b.STATE_CHANGE)
|
|
@@ -5063,14 +5086,14 @@ const Is = {
|
|
|
5063
5086
|
}
|
|
5064
5087
|
},
|
|
5065
5088
|
onSpaceChange_: function(t) {
|
|
5066
|
-
const e =
|
|
5089
|
+
const e = rt(t);
|
|
5067
5090
|
if (!e) {
|
|
5068
5091
|
console.assert(!1);
|
|
5069
5092
|
return;
|
|
5070
5093
|
}
|
|
5071
5094
|
const n = e.id !== this.space.id;
|
|
5072
5095
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
5073
|
-
const o =
|
|
5096
|
+
const o = H(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5074
5097
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5075
5098
|
}
|
|
5076
5099
|
},
|
|
@@ -5099,7 +5122,7 @@ const Is = {
|
|
|
5099
5122
|
}
|
|
5100
5123
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5101
5124
|
i && i.dispose();
|
|
5102
|
-
const a =
|
|
5125
|
+
const a = He(this.workspace, n.type);
|
|
5103
5126
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5104
5127
|
},
|
|
5105
5128
|
decompose: function(t) {
|
|
@@ -5190,7 +5213,7 @@ const Is = {
|
|
|
5190
5213
|
if (!u)
|
|
5191
5214
|
continue;
|
|
5192
5215
|
n.setCheck(null);
|
|
5193
|
-
const l =
|
|
5216
|
+
const l = He(this.workspace, u.type);
|
|
5194
5217
|
l && o.connect(l.outputConnection);
|
|
5195
5218
|
}
|
|
5196
5219
|
},
|
|
@@ -5204,7 +5227,7 @@ const Is = {
|
|
|
5204
5227
|
}
|
|
5205
5228
|
},
|
|
5206
5229
|
checkWarning_: function() {
|
|
5207
|
-
const t =
|
|
5230
|
+
const t = rt(this.space.id);
|
|
5208
5231
|
if (!t) {
|
|
5209
5232
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
5210
5233
|
return;
|
|
@@ -5239,9 +5262,9 @@ function Os(t) {
|
|
|
5239
5262
|
if (e.targetBlock())
|
|
5240
5263
|
return;
|
|
5241
5264
|
let n, o;
|
|
5242
|
-
const i =
|
|
5265
|
+
const i = q()?.[0];
|
|
5243
5266
|
if (i) {
|
|
5244
|
-
const l =
|
|
5267
|
+
const l = H(i.id)?.[0];
|
|
5245
5268
|
if (l) {
|
|
5246
5269
|
n = {
|
|
5247
5270
|
space: {
|
|
@@ -5301,7 +5324,7 @@ function Cs(t) {
|
|
|
5301
5324
|
}, o = K.blocks.append(n, t.workspace);
|
|
5302
5325
|
e.connect(o.previousConnection);
|
|
5303
5326
|
}
|
|
5304
|
-
const
|
|
5327
|
+
const ys = {
|
|
5305
5328
|
init: function() {
|
|
5306
5329
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
5307
5330
|
},
|
|
@@ -5324,7 +5347,7 @@ const ks = {
|
|
|
5324
5347
|
]), Cs(this));
|
|
5325
5348
|
}
|
|
5326
5349
|
};
|
|
5327
|
-
T.update_data_v1 =
|
|
5350
|
+
T.update_data_v1 = ys;
|
|
5328
5351
|
s.forBlock.update_data_v1 = function(t) {
|
|
5329
5352
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5330
5353
|
return `{
|
|
@@ -5341,16 +5364,16 @@ ${e}}
|
|
|
5341
5364
|
${i}}
|
|
5342
5365
|
`;
|
|
5343
5366
|
};
|
|
5344
|
-
const
|
|
5367
|
+
const ks = y.xml, Ns = {
|
|
5345
5368
|
init: function() {
|
|
5346
5369
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(C.Align.CENTRE).appendField(
|
|
5347
|
-
new
|
|
5370
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5348
5371
|
this.isInFlyout || this.addEntry_();
|
|
5349
5372
|
})
|
|
5350
5373
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5351
5374
|
},
|
|
5352
5375
|
mutationToDom: function() {
|
|
5353
|
-
const t =
|
|
5376
|
+
const t = ks.createElement("mutation");
|
|
5354
5377
|
return t.setAttribute("items", String(this.length)), t;
|
|
5355
5378
|
},
|
|
5356
5379
|
domToMutation: function(t) {
|
|
@@ -5363,11 +5386,11 @@ const ys = k.xml, Ns = {
|
|
|
5363
5386
|
for (let t = 0; t < this.length; t++) {
|
|
5364
5387
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5365
5388
|
n.appendField(
|
|
5366
|
-
new
|
|
5389
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5367
5390
|
this.isInFlyout || this.addEntry_(n);
|
|
5368
5391
|
})
|
|
5369
|
-
), n.appendField(new
|
|
5370
|
-
new
|
|
5392
|
+
), n.appendField(new fn(String(t))), n.appendField(
|
|
5393
|
+
new z(qt, 20, 20, void 0, () => {
|
|
5371
5394
|
this.isInFlyout || this.removeEntry_(n);
|
|
5372
5395
|
})
|
|
5373
5396
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5382,11 +5405,11 @@ const ys = k.xml, Ns = {
|
|
|
5382
5405
|
}
|
|
5383
5406
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5384
5407
|
n.appendField(
|
|
5385
|
-
new
|
|
5408
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5386
5409
|
this.isInFlyout || this.addEntry_(n);
|
|
5387
5410
|
})
|
|
5388
|
-
), n.appendField(new
|
|
5389
|
-
new
|
|
5411
|
+
), n.appendField(new fn(String(e))), n.appendField(
|
|
5412
|
+
new z(qt, 20, 20, void 0, () => {
|
|
5390
5413
|
this.isInFlyout || this.removeEntry_(n);
|
|
5391
5414
|
})
|
|
5392
5415
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5415,18 +5438,18 @@ const Ls = {
|
|
|
5415
5438
|
}
|
|
5416
5439
|
};
|
|
5417
5440
|
T.json_boolean_v1 = Ls;
|
|
5418
|
-
const
|
|
5441
|
+
const yn = y.xml, Ss = {
|
|
5419
5442
|
init: function() {
|
|
5420
5443
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(C.Align.CENTRE).appendField(
|
|
5421
|
-
new
|
|
5444
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5422
5445
|
this.isInFlyout || this.addEntry_();
|
|
5423
5446
|
})
|
|
5424
5447
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5425
5448
|
},
|
|
5426
5449
|
mutationToDom: function() {
|
|
5427
|
-
const t =
|
|
5450
|
+
const t = yn.createElement("mutation");
|
|
5428
5451
|
for (let e = 0; e < this.length; e++) {
|
|
5429
|
-
const n =
|
|
5452
|
+
const n = yn.createElement("item");
|
|
5430
5453
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5431
5454
|
}
|
|
5432
5455
|
return t;
|
|
@@ -5446,11 +5469,11 @@ const vn = k.xml, Ss = {
|
|
|
5446
5469
|
for (let e = 0; e < t.length; e++) {
|
|
5447
5470
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5448
5471
|
i.appendField(
|
|
5449
|
-
new
|
|
5472
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5450
5473
|
this.isInFlyout || this.addEntry_(i);
|
|
5451
5474
|
})
|
|
5452
|
-
), i.appendField(new
|
|
5453
|
-
new
|
|
5475
|
+
), i.appendField(new ut(n), "KEY" + e), i.appendField(
|
|
5476
|
+
new z(qt, 20, 20, void 0, () => {
|
|
5454
5477
|
this.isInFlyout || this.removeEntry_(i);
|
|
5455
5478
|
})
|
|
5456
5479
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5463,11 +5486,11 @@ const vn = k.xml, Ss = {
|
|
|
5463
5486
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5464
5487
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5465
5488
|
n.appendField(
|
|
5466
|
-
new
|
|
5489
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5467
5490
|
this.isInFlyout || this.addEntry_(n);
|
|
5468
5491
|
})
|
|
5469
|
-
), n.appendField(new
|
|
5470
|
-
new
|
|
5492
|
+
), n.appendField(new ut("key"), "KEY" + e), n.appendField(
|
|
5493
|
+
new z(qt, 20, 20, void 0, () => {
|
|
5471
5494
|
this.isInFlyout || this.removeEntry_(n);
|
|
5472
5495
|
})
|
|
5473
5496
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5496,11 +5519,11 @@ const bs = {
|
|
|
5496
5519
|
T.json_root_v1 = bs;
|
|
5497
5520
|
const Ps = {
|
|
5498
5521
|
init: function() {
|
|
5499
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5522
|
+
this.appendDummyInput().appendField('"').appendField(new ut(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5500
5523
|
}
|
|
5501
5524
|
};
|
|
5502
5525
|
T.json_string_v1 = Ps;
|
|
5503
|
-
const Rs =
|
|
5526
|
+
const Rs = y.xml, Ds = {
|
|
5504
5527
|
init: function() {
|
|
5505
5528
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5506
5529
|
}
|
|
@@ -5515,7 +5538,7 @@ T.list_create_item_v1 = Ms;
|
|
|
5515
5538
|
const Us = {
|
|
5516
5539
|
init: function() {
|
|
5517
5540
|
this.itemCount_ = 0, this.setMutator(
|
|
5518
|
-
new
|
|
5541
|
+
new _t.MutatorIcon(
|
|
5519
5542
|
["list_create_item_v1"],
|
|
5520
5543
|
this
|
|
5521
5544
|
)
|
|
@@ -5925,7 +5948,7 @@ const Fs = {
|
|
|
5925
5948
|
mutationToDom: function() {
|
|
5926
5949
|
if (this.elseIfCount_ <= 0 && !this.hasElse_)
|
|
5927
5950
|
return null;
|
|
5928
|
-
const t =
|
|
5951
|
+
const t = y.xml.createElement("mutation");
|
|
5929
5952
|
return this.elseIfCount_ > 0 && t.setAttribute("elseIf", String(this.elseIfCount_)), this.hasElse_ && t.setAttribute("else", "TRUE"), t;
|
|
5930
5953
|
},
|
|
5931
5954
|
domToMutation: function(t) {
|
|
@@ -6259,7 +6282,7 @@ const ws = {
|
|
|
6259
6282
|
t.push({
|
|
6260
6283
|
enabled: !0,
|
|
6261
6284
|
text: p("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
6262
|
-
callback:
|
|
6285
|
+
callback: Pn.callbackFactory(this, i)
|
|
6263
6286
|
});
|
|
6264
6287
|
}
|
|
6265
6288
|
}
|
|
@@ -6280,7 +6303,7 @@ const Ks = /* @__PURE__ */ new Set([
|
|
|
6280
6303
|
"for_each_v1",
|
|
6281
6304
|
"for_v1",
|
|
6282
6305
|
"while_until_v1"
|
|
6283
|
-
]),
|
|
6306
|
+
]), Hs = {
|
|
6284
6307
|
getSurroundLoop: function() {
|
|
6285
6308
|
let t = this;
|
|
6286
6309
|
do {
|
|
@@ -6305,7 +6328,7 @@ const Ks = /* @__PURE__ */ new Set([
|
|
|
6305
6328
|
};
|
|
6306
6329
|
B.registerMixin(
|
|
6307
6330
|
"flow_control_in_loop_check_v1",
|
|
6308
|
-
|
|
6331
|
+
Hs
|
|
6309
6332
|
);
|
|
6310
6333
|
m([
|
|
6311
6334
|
{
|
|
@@ -6412,7 +6435,7 @@ s.forBlock.for_v1 = function(t) {
|
|
|
6412
6435
|
s.statementToCode(t, "DO"),
|
|
6413
6436
|
t
|
|
6414
6437
|
);
|
|
6415
|
-
if (
|
|
6438
|
+
if (y.string.isNumber(o) && y.string.isNumber(i) && y.string.isNumber(a)) {
|
|
6416
6439
|
const l = Math.abs(Number(a));
|
|
6417
6440
|
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${l}) {
|
|
6418
6441
|
${u}}
|
|
@@ -6421,22 +6444,22 @@ ${u}}
|
|
|
6421
6444
|
`;
|
|
6422
6445
|
} else {
|
|
6423
6446
|
let l = "", r = o;
|
|
6424
|
-
!o.match(/^\w+$/) && !
|
|
6447
|
+
!o.match(/^\w+$/) && !y.string.isNumber(o) && (r = s.nameDB_.getDistinctName(
|
|
6425
6448
|
`${n}_from`,
|
|
6426
|
-
|
|
6449
|
+
Z.NameType.VARIABLE
|
|
6427
6450
|
), l += `var ${r} = ${o};
|
|
6428
6451
|
`);
|
|
6429
6452
|
let _ = i;
|
|
6430
|
-
!i.match(/^\w+$/) && !
|
|
6453
|
+
!i.match(/^\w+$/) && !y.string.isNumber(i) && (_ = s.nameDB_.getDistinctName(
|
|
6431
6454
|
`${n}_to`,
|
|
6432
|
-
|
|
6455
|
+
Z.NameType.VARIABLE
|
|
6433
6456
|
), l += `var ${_} = ${i};
|
|
6434
6457
|
`);
|
|
6435
6458
|
const d = s.nameDB_.getDistinctName(
|
|
6436
6459
|
`${n}_by`,
|
|
6437
|
-
|
|
6460
|
+
Z.NameType.VARIABLE
|
|
6438
6461
|
);
|
|
6439
|
-
return l += `var ${d} = `,
|
|
6462
|
+
return l += `var ${d} = `, y.string.isNumber(a) ? l += `${Math.abs(Number(a))};
|
|
6440
6463
|
` : l += `Math.abs(${a});
|
|
6441
6464
|
`, l += `if (${r} > ${_}) {
|
|
6442
6465
|
${e}${d} = -${d};
|
|
@@ -6493,12 +6516,12 @@ s.forBlock.for_each_v1 = function(t) {
|
|
|
6493
6516
|
let a = "", u = o;
|
|
6494
6517
|
o.match(/^\w+$/) || (u = s.nameDB_.getDistinctName(
|
|
6495
6518
|
`${n}_list`,
|
|
6496
|
-
|
|
6519
|
+
Z.NameType.VARIABLE
|
|
6497
6520
|
), a += `var ${u} = ${o};
|
|
6498
6521
|
`);
|
|
6499
6522
|
const l = s.nameDB_.getDistinctName(
|
|
6500
6523
|
`${n}_index`,
|
|
6501
|
-
|
|
6524
|
+
Z.NameType.VARIABLE
|
|
6502
6525
|
);
|
|
6503
6526
|
return a += `for (var ${l} in ${u}) {
|
|
6504
6527
|
${e}${n} = ${u}[${l}];
|
|
@@ -6540,12 +6563,12 @@ s.forBlock.repeat_v1 = function(t) {
|
|
|
6540
6563
|
let o = "";
|
|
6541
6564
|
const i = s.nameDB_.getDistinctName(
|
|
6542
6565
|
"count",
|
|
6543
|
-
|
|
6566
|
+
Z.NameType.VARIABLE
|
|
6544
6567
|
);
|
|
6545
6568
|
let a = e;
|
|
6546
|
-
return !e.match(/^\w+$/) && !
|
|
6569
|
+
return !e.match(/^\w+$/) && !y.string.isNumber(e) && (a = s.nameDB_.getDistinctName(
|
|
6547
6570
|
"repeat_end",
|
|
6548
|
-
|
|
6571
|
+
Z.NameType.VARIABLE
|
|
6549
6572
|
), o += `var ${a} = ${e};
|
|
6550
6573
|
`), o += `for (var ${i} = 0; ${i} < ${a}; ${i}++) {
|
|
6551
6574
|
${n}}
|
|
@@ -6607,7 +6630,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6607
6630
|
${o}}
|
|
6608
6631
|
`;
|
|
6609
6632
|
};
|
|
6610
|
-
const
|
|
6633
|
+
const $s = {
|
|
6611
6634
|
// math_arithmetic
|
|
6612
6635
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6613
6636
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6641,7 +6664,7 @@ const Hs = {
|
|
|
6641
6664
|
};
|
|
6642
6665
|
B.register(
|
|
6643
6666
|
"math_op_tooltip_v1",
|
|
6644
|
-
B.buildTooltipForDropdown("OP",
|
|
6667
|
+
B.buildTooltipForDropdown("OP", $s)
|
|
6645
6668
|
);
|
|
6646
6669
|
m([
|
|
6647
6670
|
{
|
|
@@ -7244,7 +7267,7 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7244
7267
|
}
|
|
7245
7268
|
return [o, c.DIVISION];
|
|
7246
7269
|
};
|
|
7247
|
-
const Gs =
|
|
7270
|
+
const Gs = y.xml, Ws = {
|
|
7248
7271
|
init: function() {
|
|
7249
7272
|
this.appendDummyInput().appendField(
|
|
7250
7273
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
@@ -7261,7 +7284,7 @@ T.object_create_item_v1 = js;
|
|
|
7261
7284
|
const Xs = {
|
|
7262
7285
|
init: function() {
|
|
7263
7286
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7264
|
-
new
|
|
7287
|
+
new _t.MutatorIcon(
|
|
7265
7288
|
["object_create_item_v1"],
|
|
7266
7289
|
this
|
|
7267
7290
|
)
|
|
@@ -7327,7 +7350,7 @@ const Xs = {
|
|
|
7327
7350
|
},
|
|
7328
7351
|
updateShape_: function() {
|
|
7329
7352
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7330
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(C.Align.RIGHT).appendField(new
|
|
7353
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(C.Align.RIGHT).appendField(new ut("key"), "KEY" + t);
|
|
7331
7354
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7332
7355
|
this.removeInput("ADD" + t);
|
|
7333
7356
|
}
|
|
@@ -7574,15 +7597,15 @@ m([
|
|
|
7574
7597
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7575
7598
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7576
7599
|
};
|
|
7577
|
-
const
|
|
7600
|
+
const kn = y.xml, Js = {
|
|
7578
7601
|
init: function() {
|
|
7579
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7602
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new yo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7580
7603
|
}
|
|
7581
7604
|
};
|
|
7582
7605
|
T.procedure_def_container_v1 = Js;
|
|
7583
7606
|
const qs = {
|
|
7584
7607
|
init: function() {
|
|
7585
|
-
const t = new
|
|
7608
|
+
const t = new ut(Fe.DEFAULT_ARG);
|
|
7586
7609
|
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;
|
|
7587
7610
|
},
|
|
7588
7611
|
validator_: function(t) {
|
|
@@ -7606,20 +7629,20 @@ T.procedure_def_item_v1 = qs;
|
|
|
7606
7629
|
const Qs = {
|
|
7607
7630
|
init: function() {
|
|
7608
7631
|
this.withReturn = !1, this.args = [];
|
|
7609
|
-
const t = new
|
|
7632
|
+
const t = new ut(
|
|
7610
7633
|
Fe.findLegalName("", this)
|
|
7611
7634
|
);
|
|
7612
7635
|
t.setValidator(Fe.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7613
|
-
new
|
|
7636
|
+
new _t.MutatorIcon(
|
|
7614
7637
|
["procedure_def_item_v1"],
|
|
7615
7638
|
this
|
|
7616
7639
|
)
|
|
7617
7640
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7618
7641
|
},
|
|
7619
7642
|
mutationToDom: function() {
|
|
7620
|
-
const t =
|
|
7643
|
+
const t = kn.createElement("mutation");
|
|
7621
7644
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7622
|
-
const n =
|
|
7645
|
+
const n = kn.createElement("arg");
|
|
7623
7646
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7624
7647
|
}), t;
|
|
7625
7648
|
},
|
|
@@ -7695,7 +7718,7 @@ const Qs = {
|
|
|
7695
7718
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7696
7719
|
else
|
|
7697
7720
|
try {
|
|
7698
|
-
A.disable(), o =
|
|
7721
|
+
A.disable(), o = nn(
|
|
7699
7722
|
this.workspace,
|
|
7700
7723
|
`__param@${e.id}__`,
|
|
7701
7724
|
e.name,
|
|
@@ -7708,7 +7731,7 @@ const Qs = {
|
|
|
7708
7731
|
}
|
|
7709
7732
|
};
|
|
7710
7733
|
T.procedure_def_v1 = Qs;
|
|
7711
|
-
const zs =
|
|
7734
|
+
const zs = y.xml, Zs = {
|
|
7712
7735
|
init: function() {
|
|
7713
7736
|
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}");
|
|
7714
7737
|
},
|
|
@@ -7826,7 +7849,7 @@ function ea(t) {
|
|
|
7826
7849
|
const e = [];
|
|
7827
7850
|
return no(t).forEach(({ id: o, name: i }) => {
|
|
7828
7851
|
e.push([i, o]);
|
|
7829
|
-
}),
|
|
7852
|
+
}), k(e);
|
|
7830
7853
|
}
|
|
7831
7854
|
function oo(t, e) {
|
|
7832
7855
|
const n = E.resource.spaces.find((i) => i.id === t);
|
|
@@ -7841,7 +7864,7 @@ function na(t, e) {
|
|
|
7841
7864
|
const n = [];
|
|
7842
7865
|
return oo(t, e).forEach(({ id: i, name: a }) => {
|
|
7843
7866
|
n.push([a, i]);
|
|
7844
|
-
}),
|
|
7867
|
+
}), k(n);
|
|
7845
7868
|
}
|
|
7846
7869
|
function io() {
|
|
7847
7870
|
const t = [];
|
|
@@ -7853,7 +7876,7 @@ function oa() {
|
|
|
7853
7876
|
const t = [];
|
|
7854
7877
|
return io().forEach(({ id: n, name: o }) => {
|
|
7855
7878
|
t.push([o, n]);
|
|
7856
|
-
}),
|
|
7879
|
+
}), k(t);
|
|
7857
7880
|
}
|
|
7858
7881
|
const ia = {
|
|
7859
7882
|
init: function() {
|
|
@@ -7940,7 +7963,7 @@ const sa = {
|
|
|
7940
7963
|
updateShadow_: function() {
|
|
7941
7964
|
if (this.isInsertionMarker())
|
|
7942
7965
|
return;
|
|
7943
|
-
const t =
|
|
7966
|
+
const t = ct("");
|
|
7944
7967
|
this.getInput("NAME")?.setShadowDom(t);
|
|
7945
7968
|
},
|
|
7946
7969
|
ensureBlocks_: function() {
|
|
@@ -8019,7 +8042,7 @@ m([
|
|
|
8019
8042
|
s.forBlock.text_append_v1 = function(t) {
|
|
8020
8043
|
const e = s.nameDB_?.getName(
|
|
8021
8044
|
t.getFieldValue("VAR"),
|
|
8022
|
-
|
|
8045
|
+
Z.NameType.VARIABLE
|
|
8023
8046
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
8024
8047
|
return `${e} += ${Xt(n)};
|
|
8025
8048
|
`;
|
|
@@ -8190,7 +8213,7 @@ m([
|
|
|
8190
8213
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8191
8214
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8192
8215
|
};
|
|
8193
|
-
const ca =
|
|
8216
|
+
const ca = y.xml, ua = {
|
|
8194
8217
|
itemCount_: 0,
|
|
8195
8218
|
mutationToDom: function() {
|
|
8196
8219
|
const t = ca.createElement("mutation");
|
|
@@ -8265,7 +8288,7 @@ const ca = k.xml, ua = {
|
|
|
8265
8288
|
this.removeInput("ADD" + t);
|
|
8266
8289
|
}
|
|
8267
8290
|
}, la = function() {
|
|
8268
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8291
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new _t.MutatorIcon(["text_join_item_v1"], this));
|
|
8269
8292
|
};
|
|
8270
8293
|
B.registerMutator(
|
|
8271
8294
|
"text_join_mutator_v1",
|
|
@@ -8582,7 +8605,7 @@ const _a = {
|
|
|
8582
8605
|
t.push({
|
|
8583
8606
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8584
8607
|
text: n.replace("%1", o.getText()),
|
|
8585
|
-
callback:
|
|
8608
|
+
callback: Pn.callbackFactory(this, i)
|
|
8586
8609
|
});
|
|
8587
8610
|
}
|
|
8588
8611
|
}
|
|
@@ -8621,7 +8644,7 @@ m([
|
|
|
8621
8644
|
s.forBlock.variable_get_v1 = function(t) {
|
|
8622
8645
|
return [s.nameDB_.getName(
|
|
8623
8646
|
t.getFieldValue("VAR"),
|
|
8624
|
-
|
|
8647
|
+
Z.NameType.VARIABLE
|
|
8625
8648
|
), c.ATOMIC];
|
|
8626
8649
|
};
|
|
8627
8650
|
m([
|
|
@@ -8650,35 +8673,35 @@ m([
|
|
|
8650
8673
|
s.forBlock.variable_set_v1 = function(t) {
|
|
8651
8674
|
const e = s.nameDB_.getName(
|
|
8652
8675
|
t.getFieldValue("VAR"),
|
|
8653
|
-
|
|
8676
|
+
Z.NameType.VARIABLE
|
|
8654
8677
|
), n = s.valueToCode(t, "VALUE", c.ASSIGNMENT) || "0";
|
|
8655
8678
|
return `${e} = ${n};
|
|
8656
8679
|
`;
|
|
8657
8680
|
};
|
|
8658
|
-
|
|
8681
|
+
Rn.setConfirm(async (t, e) => {
|
|
8659
8682
|
const n = await Ko({
|
|
8660
8683
|
title: "",
|
|
8661
8684
|
text: t
|
|
8662
8685
|
});
|
|
8663
8686
|
e(!!n);
|
|
8664
8687
|
});
|
|
8665
|
-
|
|
8666
|
-
const o = await
|
|
8688
|
+
Rn.setPrompt(async (t, e, n) => {
|
|
8689
|
+
const o = await Ho({
|
|
8667
8690
|
title: "",
|
|
8668
8691
|
value: e
|
|
8669
8692
|
});
|
|
8670
8693
|
o !== void 0 && n(String(o));
|
|
8671
8694
|
});
|
|
8672
|
-
const
|
|
8673
|
-
|
|
8695
|
+
const Ht = I.prototype;
|
|
8696
|
+
Ht.doClassValidation_ = function(t) {
|
|
8674
8697
|
return t;
|
|
8675
8698
|
};
|
|
8676
|
-
const ha =
|
|
8677
|
-
|
|
8699
|
+
const ha = Ht.doValueUpdate_;
|
|
8700
|
+
Ht.doValueUpdate_ = function(t) {
|
|
8678
8701
|
ha.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
8679
8702
|
};
|
|
8680
|
-
const fa =
|
|
8681
|
-
|
|
8703
|
+
const fa = Ht.getText_;
|
|
8704
|
+
Ht.getText_ = function() {
|
|
8682
8705
|
if (this.selectedOption)
|
|
8683
8706
|
return fa.call(this);
|
|
8684
8707
|
const { i18n: t } = Et, e = this.getSourceBlock();
|
|
@@ -8689,20 +8712,20 @@ $t.getText_ = function() {
|
|
|
8689
8712
|
if (this.name === "ELEMENT")
|
|
8690
8713
|
return e.element.name;
|
|
8691
8714
|
if (this.name === "NODE") {
|
|
8692
|
-
const n =
|
|
8715
|
+
const n = J[e.node.key];
|
|
8693
8716
|
if (n) {
|
|
8694
8717
|
const o = t.global.t(n.name), i = e.node.alias;
|
|
8695
8718
|
return `${o} / ${i}`;
|
|
8696
8719
|
}
|
|
8697
8720
|
} else if (this.name === "PROP") {
|
|
8698
|
-
const {
|
|
8721
|
+
const { kind: n, names: o } = e.prop;
|
|
8699
8722
|
return xn(n, o);
|
|
8700
8723
|
} else if (this.name === "EVENT") {
|
|
8701
|
-
const {
|
|
8702
|
-
return de(n, o);
|
|
8724
|
+
const { kind: n, names: o } = e.event;
|
|
8725
|
+
return console.log(e.event), de(n, o);
|
|
8703
8726
|
} else if (this.name === "METHOD") {
|
|
8704
|
-
const {
|
|
8705
|
-
return
|
|
8727
|
+
const { kind: n, names: o } = e.method;
|
|
8728
|
+
return Ze(n, o);
|
|
8706
8729
|
} else {
|
|
8707
8730
|
if (this.name === "SPACE")
|
|
8708
8731
|
return e.space.name;
|
|
@@ -8721,8 +8744,8 @@ $t.getText_ = function() {
|
|
|
8721
8744
|
}
|
|
8722
8745
|
return "<n/a>";
|
|
8723
8746
|
};
|
|
8724
|
-
const
|
|
8725
|
-
|
|
8747
|
+
const Nn = 60;
|
|
8748
|
+
ko.prototype.cleanUp = function() {
|
|
8726
8749
|
this.setResizesEnabled(!1);
|
|
8727
8750
|
const t = A.getGroup();
|
|
8728
8751
|
t || A.setGroup(!0);
|
|
@@ -8740,8 +8763,8 @@ yo.prototype.cleanUp = function() {
|
|
|
8740
8763
|
l.moveBy(-r.left, u - r.top, ["cleanup"]), l.snapToGrid(), r = l.getBoundingRectangle();
|
|
8741
8764
|
let _ = a(r);
|
|
8742
8765
|
for (; _ != null; )
|
|
8743
|
-
u = _.top + _.getHeight() +
|
|
8744
|
-
u = l.getRelativeToSurfaceXY().y + l.getHeightWidth().height +
|
|
8766
|
+
u = _.top + _.getHeight() + Nn, l.moveBy(0, u - r.top, ["cleanup"]), l.snapToGrid(), r = l.getBoundingRectangle(), _ = a(r);
|
|
8767
|
+
u = l.getRelativeToSurfaceXY().y + l.getHeightWidth().height + Nn;
|
|
8745
8768
|
}
|
|
8746
8769
|
A.setGroup(t), this.setResizesEnabled(!0);
|
|
8747
8770
|
};
|
|
@@ -8764,7 +8787,7 @@ const Ta = new bo.CrossTabCopyPaste();
|
|
|
8764
8787
|
Ta.init({ contextMenu: !0, shortcut: !0 });
|
|
8765
8788
|
const Ea = new ma();
|
|
8766
8789
|
Ea.init();
|
|
8767
|
-
function
|
|
8790
|
+
function an(t) {
|
|
8768
8791
|
const e = xt();
|
|
8769
8792
|
if (!e)
|
|
8770
8793
|
return;
|
|
@@ -8782,7 +8805,7 @@ function ao() {
|
|
|
8782
8805
|
if (!t)
|
|
8783
8806
|
return;
|
|
8784
8807
|
const e = t.getTopBlocks(!0)?.[0];
|
|
8785
|
-
e &&
|
|
8808
|
+
e && an(e.id);
|
|
8786
8809
|
}
|
|
8787
8810
|
pe.Classic.blockStyles = {
|
|
8788
8811
|
color_blocks: {
|
|
@@ -8935,7 +8958,7 @@ pe.Classic.categoryStyles = {
|
|
|
8935
8958
|
colour: "#a55b80"
|
|
8936
8959
|
}
|
|
8937
8960
|
};
|
|
8938
|
-
const ga =
|
|
8961
|
+
const ga = Dn.defineTheme("light", {
|
|
8939
8962
|
name: "light",
|
|
8940
8963
|
base: pe.Classic,
|
|
8941
8964
|
componentStyles: {
|
|
@@ -8951,7 +8974,7 @@ const ga = Pn.defineTheme("light", {
|
|
|
8951
8974
|
scrollbarOpacity: 0.4,
|
|
8952
8975
|
cursorColour: ""
|
|
8953
8976
|
}
|
|
8954
|
-
}), Aa =
|
|
8977
|
+
}), Aa = Dn.defineTheme("dark", {
|
|
8955
8978
|
name: "dark",
|
|
8956
8979
|
base: pe.Classic,
|
|
8957
8980
|
componentStyles: {
|
|
@@ -8980,7 +9003,7 @@ function Ia(t) {
|
|
|
8980
9003
|
}
|
|
8981
9004
|
}
|
|
8982
9005
|
const Je = ["get_app_prop_v1", "get_app_state_v1"];
|
|
8983
|
-
function
|
|
9006
|
+
function it(t, e) {
|
|
8984
9007
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
8985
9008
|
}
|
|
8986
9009
|
function Oa(t) {
|
|
@@ -8996,7 +9019,7 @@ function va(t) {
|
|
|
8996
9019
|
for (const n of t)
|
|
8997
9020
|
if (n.type === "get_app_prop_v1") {
|
|
8998
9021
|
const o = n;
|
|
8999
|
-
|
|
9022
|
+
it(
|
|
9000
9023
|
e,
|
|
9001
9024
|
mt({
|
|
9002
9025
|
type: "elementProp",
|
|
@@ -9004,7 +9027,7 @@ function va(t) {
|
|
|
9004
9027
|
propKeys: o.prop.key
|
|
9005
9028
|
})
|
|
9006
9029
|
);
|
|
9007
|
-
} else n.type === "get_app_state_v1" ?
|
|
9030
|
+
} else n.type === "get_app_state_v1" ? it(
|
|
9008
9031
|
e,
|
|
9009
9032
|
mt({ type: "customState", stateId: n.state.id })
|
|
9010
9033
|
) : console.assert(!1);
|
|
@@ -9021,7 +9044,7 @@ function Ca(t) {
|
|
|
9021
9044
|
}
|
|
9022
9045
|
return e;
|
|
9023
9046
|
}
|
|
9024
|
-
function
|
|
9047
|
+
function ya(t) {
|
|
9025
9048
|
const e = [], n = [];
|
|
9026
9049
|
for (const o of t)
|
|
9027
9050
|
if (o.type === "get_app_prop_v1") {
|
|
@@ -9037,12 +9060,12 @@ function ka(t) {
|
|
|
9037
9060
|
} : i.prop.from === "slot" && (a = {
|
|
9038
9061
|
type: "adaptSlotProp",
|
|
9039
9062
|
propId: i.prop.key
|
|
9040
|
-
}), !a || !
|
|
9063
|
+
}), !a || !it(n, mt(a)))
|
|
9041
9064
|
continue;
|
|
9042
9065
|
e.push(a);
|
|
9043
9066
|
} else if (o.type === "get_app_state_v1") {
|
|
9044
9067
|
const a = { type: "customState", stateId: o.state.id };
|
|
9045
|
-
if (!
|
|
9068
|
+
if (!it(n, mt(a)))
|
|
9046
9069
|
continue;
|
|
9047
9070
|
e.push(a);
|
|
9048
9071
|
} else if (o.type === "object_get_v1") {
|
|
@@ -9067,7 +9090,7 @@ function ka(t) {
|
|
|
9067
9090
|
type: "adaptSlotProp",
|
|
9068
9091
|
propId: u.prop.key,
|
|
9069
9092
|
subKeys: a
|
|
9070
|
-
}), !l || !
|
|
9093
|
+
}), !l || !it(n, mt(l)))
|
|
9071
9094
|
continue;
|
|
9072
9095
|
e.push(l);
|
|
9073
9096
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -9076,7 +9099,7 @@ function ka(t) {
|
|
|
9076
9099
|
stateId: i.state.id,
|
|
9077
9100
|
subKeys: a
|
|
9078
9101
|
};
|
|
9079
|
-
if (!
|
|
9102
|
+
if (!it(n, mt(l)))
|
|
9080
9103
|
continue;
|
|
9081
9104
|
e.push(l);
|
|
9082
9105
|
} else
|
|
@@ -9085,7 +9108,7 @@ function ka(t) {
|
|
|
9085
9108
|
console.assert(!1);
|
|
9086
9109
|
return e;
|
|
9087
9110
|
}
|
|
9088
|
-
function
|
|
9111
|
+
function ka(t) {
|
|
9089
9112
|
const e = {
|
|
9090
9113
|
watchEffect: {},
|
|
9091
9114
|
bind: {
|
|
@@ -9099,13 +9122,13 @@ function ya(t) {
|
|
|
9099
9122
|
if (o.type === "watch_effect_v1") {
|
|
9100
9123
|
const i = Oa(o), a = va(i);
|
|
9101
9124
|
for (const u of a)
|
|
9102
|
-
e.watchEffect[u] || (e.watchEffect[u] = []),
|
|
9125
|
+
e.watchEffect[u] || (e.watchEffect[u] = []), it(e.watchEffect[u], o.id);
|
|
9103
9126
|
} else if (o.type === "app_bind_v1") {
|
|
9104
|
-
const i = Ca(o), a =
|
|
9127
|
+
const i = Ca(o), a = ya(i);
|
|
9105
9128
|
e.bind.sets[o.id] = a;
|
|
9106
9129
|
for (const u of a) {
|
|
9107
9130
|
const l = mt(u);
|
|
9108
|
-
e.bind.triggers[l] || (e.bind.triggers[l] = []),
|
|
9131
|
+
e.bind.triggers[l] || (e.bind.triggers[l] = []), it(e.bind.triggers[l], o.id);
|
|
9109
9132
|
}
|
|
9110
9133
|
}
|
|
9111
9134
|
return e;
|
|
@@ -9114,22 +9137,22 @@ const co = Symbol();
|
|
|
9114
9137
|
function Na(t) {
|
|
9115
9138
|
jo(co, t);
|
|
9116
9139
|
}
|
|
9117
|
-
function
|
|
9140
|
+
function cn() {
|
|
9118
9141
|
return Xo(co);
|
|
9119
9142
|
}
|
|
9120
|
-
const La = /* @__PURE__ */
|
|
9143
|
+
const La = /* @__PURE__ */ nt({
|
|
9121
9144
|
__name: "index",
|
|
9122
9145
|
props: {
|
|
9123
9146
|
lock: { type: Boolean }
|
|
9124
9147
|
},
|
|
9125
9148
|
setup(t, { expose: e }) {
|
|
9126
|
-
const { t: n } = Yt(), o = t, i =
|
|
9149
|
+
const { t: n } = Yt(), o = t, i = cn(), a = () => {
|
|
9127
9150
|
if (!i.workspace) {
|
|
9128
9151
|
console.assert(!1);
|
|
9129
9152
|
return;
|
|
9130
9153
|
}
|
|
9131
9154
|
if (o.lock) {
|
|
9132
|
-
|
|
9155
|
+
Un(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
9133
9156
|
return;
|
|
9134
9157
|
}
|
|
9135
9158
|
i.workspace.cleanUp();
|
|
@@ -9138,11 +9161,11 @@ const La = /* @__PURE__ */ it({
|
|
|
9138
9161
|
};
|
|
9139
9162
|
return e({ cleanWorkspace: a }), (l, r) => {
|
|
9140
9163
|
const _ = D("v-btn"), d = D("v-tooltip");
|
|
9141
|
-
return S(),
|
|
9164
|
+
return S(), tt(d, {
|
|
9142
9165
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
9143
9166
|
}, {
|
|
9144
|
-
activator:
|
|
9145
|
-
L(_,
|
|
9167
|
+
activator: et(({ props: h }) => [
|
|
9168
|
+
L(_, en(h, {
|
|
9146
9169
|
density: "comfortable",
|
|
9147
9170
|
icon: "mdi-broom",
|
|
9148
9171
|
variant: "outlined",
|
|
@@ -9153,7 +9176,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9153
9176
|
}, 8, ["text"]);
|
|
9154
9177
|
};
|
|
9155
9178
|
}
|
|
9156
|
-
}), Sa = /* @__PURE__ */
|
|
9179
|
+
}), Sa = /* @__PURE__ */ nt({
|
|
9157
9180
|
__name: "index",
|
|
9158
9181
|
props: {
|
|
9159
9182
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9164,11 +9187,11 @@ const La = /* @__PURE__ */ it({
|
|
|
9164
9187
|
const { t: e } = Yt(), n = Dt(t, "modelValue");
|
|
9165
9188
|
return (o, i) => {
|
|
9166
9189
|
const a = D("v-btn"), u = D("v-tooltip");
|
|
9167
|
-
return S(),
|
|
9190
|
+
return S(), tt(u, {
|
|
9168
9191
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
9169
9192
|
}, {
|
|
9170
|
-
activator:
|
|
9171
|
-
L(a,
|
|
9193
|
+
activator: et(({ props: l }) => [
|
|
9194
|
+
L(a, en(l, {
|
|
9172
9195
|
density: "comfortable",
|
|
9173
9196
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
9174
9197
|
variant: "outlined",
|
|
@@ -9183,7 +9206,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9183
9206
|
key: 0,
|
|
9184
9207
|
class: "text-cation text-grey text-truncate ml-6",
|
|
9185
9208
|
style: { maxWidth: "340px" }
|
|
9186
|
-
}, Ra = /* @__PURE__ */
|
|
9209
|
+
}, Ra = /* @__PURE__ */ nt({
|
|
9187
9210
|
__name: "item",
|
|
9188
9211
|
props: {
|
|
9189
9212
|
id: {},
|
|
@@ -9221,7 +9244,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9221
9244
|
}, [
|
|
9222
9245
|
w("div", Ba, [
|
|
9223
9246
|
w("span", ba, Mt(a.title), 1),
|
|
9224
|
-
a.desc ? (S(), X("span", Pa, Mt(a.desc), 1)) :
|
|
9247
|
+
a.desc ? (S(), X("span", Pa, Mt(a.desc), 1)) : ot("", !0)
|
|
9225
9248
|
]),
|
|
9226
9249
|
L(f),
|
|
9227
9250
|
L(v, {
|
|
@@ -9241,7 +9264,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9241
9264
|
}), Da = {
|
|
9242
9265
|
key: 1,
|
|
9243
9266
|
class: "text-caption text-grey"
|
|
9244
|
-
}, Ma = /* @__PURE__ */
|
|
9267
|
+
}, Ma = /* @__PURE__ */ nt({
|
|
9245
9268
|
__name: "index",
|
|
9246
9269
|
props: /* @__PURE__ */ we({
|
|
9247
9270
|
lock: { type: Boolean }
|
|
@@ -9251,7 +9274,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9251
9274
|
}),
|
|
9252
9275
|
emits: ["update:modelValue"],
|
|
9253
9276
|
setup(t, { expose: e }) {
|
|
9254
|
-
const { t: n } = Yt(), o = Dt(t, "modelValue"), i =
|
|
9277
|
+
const { t: n } = Yt(), o = Dt(t, "modelValue"), i = cn(), a = Ot([]);
|
|
9255
9278
|
e({ update: () => {
|
|
9256
9279
|
if (!i.workspace) {
|
|
9257
9280
|
console.assert(!1);
|
|
@@ -9262,8 +9285,8 @@ const La = /* @__PURE__ */ it({
|
|
|
9262
9285
|
const P = g.id === Ro()?.id;
|
|
9263
9286
|
let U = "";
|
|
9264
9287
|
if (g.type.startsWith("on_app_event_v")) {
|
|
9265
|
-
const
|
|
9266
|
-
gt && (U = n(gt.name),
|
|
9288
|
+
const Q = g, gt = J[Q.node.key];
|
|
9289
|
+
gt && (U = n(gt.name), Q.node.alias && (U += " / " + Q.node.alias), U += " - " + de(Q.event.kind, Q.event.names));
|
|
9267
9290
|
} else g.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : g.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : g.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
9268
9291
|
const ht = g.getCommentText() ?? "";
|
|
9269
9292
|
f.push({
|
|
@@ -9277,7 +9300,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9277
9300
|
let l = [];
|
|
9278
9301
|
const r = () => {
|
|
9279
9302
|
if (t.lock) {
|
|
9280
|
-
|
|
9303
|
+
Un(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
9281
9304
|
return;
|
|
9282
9305
|
}
|
|
9283
9306
|
const f = [];
|
|
@@ -9309,16 +9332,16 @@ const La = /* @__PURE__ */ it({
|
|
|
9309
9332
|
P
|
|
9310
9333
|
).getRelativeToSurfaceXY().y + 10);
|
|
9311
9334
|
const ht = g.getRelativeToSurfaceXY();
|
|
9312
|
-
g.moveTo(new
|
|
9335
|
+
g.moveTo(new y.Coordinate(ht.x, U)), i.workspace.cleanUp(), ao();
|
|
9313
9336
|
}, h = async (f) => {
|
|
9314
9337
|
if (!i.workspace) {
|
|
9315
9338
|
console.assert(!1);
|
|
9316
9339
|
return;
|
|
9317
9340
|
}
|
|
9318
9341
|
const v = i.workspace.getBlockById(f);
|
|
9319
|
-
|
|
9342
|
+
Mn.setSelected(v), an(f), o.value = !1;
|
|
9320
9343
|
};
|
|
9321
|
-
return (f, v) => a.value.length > 0 ? (S(),
|
|
9344
|
+
return (f, v) => a.value.length > 0 ? (S(), tt(R(Po), {
|
|
9322
9345
|
key: 0,
|
|
9323
9346
|
modelValue: a.value,
|
|
9324
9347
|
"onUpdate:modelValue": v[0] || (v[0] = (g) => a.value = g),
|
|
@@ -9329,8 +9352,8 @@ const La = /* @__PURE__ */ it({
|
|
|
9329
9352
|
onMove: _,
|
|
9330
9353
|
onStart: r
|
|
9331
9354
|
}, {
|
|
9332
|
-
default:
|
|
9333
|
-
(S(!0), X(Yn, null, Qo(a.value, (g) => (S(),
|
|
9355
|
+
default: et(() => [
|
|
9356
|
+
(S(!0), X(Yn, null, Qo(a.value, (g) => (S(), tt(Ra, {
|
|
9334
9357
|
id: g.id,
|
|
9335
9358
|
key: g.id,
|
|
9336
9359
|
desc: g.desc,
|
|
@@ -9347,7 +9370,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9347
9370
|
for (const [o, i] of e)
|
|
9348
9371
|
n[o] = i;
|
|
9349
9372
|
return n;
|
|
9350
|
-
}, Va = /* @__PURE__ */ Ua(Ma, [["__scopeId", "data-v-
|
|
9373
|
+
}, Va = /* @__PURE__ */ Ua(Ma, [["__scopeId", "data-v-6cb62cd6"]]), xa = /* @__PURE__ */ nt({
|
|
9351
9374
|
__name: "index",
|
|
9352
9375
|
props: {
|
|
9353
9376
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -9355,7 +9378,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9355
9378
|
},
|
|
9356
9379
|
emits: ["update:modelValue"],
|
|
9357
9380
|
setup(t, { expose: e }) {
|
|
9358
|
-
const n = Dt(t, "modelValue"), o =
|
|
9381
|
+
const n = Dt(t, "modelValue"), o = cn();
|
|
9359
9382
|
e({ update: () => {
|
|
9360
9383
|
if (!o.workspace) {
|
|
9361
9384
|
console.assert(!1);
|
|
@@ -9369,20 +9392,20 @@ const La = /* @__PURE__ */ it({
|
|
|
9369
9392
|
return;
|
|
9370
9393
|
}
|
|
9371
9394
|
const r = l.getBlockById(u);
|
|
9372
|
-
|
|
9395
|
+
Mn.setSelected(r), an(u), n.value = !1;
|
|
9373
9396
|
};
|
|
9374
9397
|
return (u, l) => (S(), X("div", {
|
|
9375
9398
|
onClick: l[0] || (l[0] = (r) => a(""))
|
|
9376
9399
|
}, "blockTree"));
|
|
9377
9400
|
}
|
|
9378
|
-
}), Fa = { class: "text-subtitle-1" }, Ya = /* @__PURE__ */
|
|
9401
|
+
}), Fa = { class: "text-subtitle-1" }, Ya = /* @__PURE__ */ nt({
|
|
9379
9402
|
__name: "index",
|
|
9380
9403
|
props: {
|
|
9381
9404
|
type: {},
|
|
9382
9405
|
lock: { type: Boolean }
|
|
9383
9406
|
},
|
|
9384
9407
|
setup(t, { expose: e }) {
|
|
9385
|
-
const { t: n } = Yt(), o = ei(), { sysBarAvail: i } =
|
|
9408
|
+
const { t: n } = Yt(), o = ei(), { sysBarAvail: i } = Vn(), { backgroundColor1: a } = Ft(), u = Y(() => {
|
|
9386
9409
|
let v = "100%";
|
|
9387
9410
|
return o.mdAndUp.value && (v = "400px"), {
|
|
9388
9411
|
background: a.value,
|
|
@@ -9405,44 +9428,44 @@ const La = /* @__PURE__ */ it({
|
|
|
9405
9428
|
return e({ open: _, update: () => {
|
|
9406
9429
|
t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
|
|
9407
9430
|
} }), (v, g) => {
|
|
9408
|
-
const P = D("v-sheet"), U = D("v-btn"), ht = D("v-spacer"),
|
|
9431
|
+
const P = D("v-sheet"), U = D("v-btn"), ht = D("v-spacer"), Q = D("v-dialog"), gt = D("v-tooltip");
|
|
9409
9432
|
return S(), X(Yn, null, [
|
|
9410
|
-
L(
|
|
9433
|
+
L(Q, {
|
|
9411
9434
|
modelValue: R(_),
|
|
9412
|
-
"onUpdate:modelValue": g[5] || (g[5] = (
|
|
9435
|
+
"onUpdate:modelValue": g[5] || (g[5] = ($) => jt(_) ? _.value = $ : null),
|
|
9413
9436
|
eager: "",
|
|
9414
9437
|
fullscreen: "",
|
|
9415
9438
|
"no-click-animation": "",
|
|
9416
9439
|
persistent: "",
|
|
9417
9440
|
transition: "scroll-x-reverse-transition",
|
|
9418
|
-
onKeydown: g[6] || (g[6] = wn(Pt((
|
|
9441
|
+
onKeydown: g[6] || (g[6] = wn(Pt(($) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
9419
9442
|
}, {
|
|
9420
|
-
default:
|
|
9443
|
+
default: et(() => [
|
|
9421
9444
|
w("div", {
|
|
9422
9445
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9423
|
-
onClick: g[3] || (g[3] = Pt((
|
|
9424
|
-
onContextmenu: g[4] || (g[4] = Pt((
|
|
9446
|
+
onClick: g[3] || (g[3] = Pt(($) => _.value = !1, ["self"])),
|
|
9447
|
+
onContextmenu: g[4] || (g[4] = Pt(($) => _.value = !1, ["self", "prevent"]))
|
|
9425
9448
|
}, [
|
|
9426
9449
|
w("div", {
|
|
9427
9450
|
class: "elevation-2",
|
|
9428
9451
|
style: G(u.value)
|
|
9429
9452
|
}, [
|
|
9430
|
-
R(i) ? (S(),
|
|
9453
|
+
R(i) ? (S(), tt(P, {
|
|
9431
9454
|
key: 0,
|
|
9432
9455
|
color: "transparent",
|
|
9433
9456
|
height: 24
|
|
9434
|
-
})) :
|
|
9457
|
+
})) : ot("", !0),
|
|
9435
9458
|
L(P, {
|
|
9436
9459
|
class: "d-flex align-center px-2",
|
|
9437
9460
|
color: "transparent",
|
|
9438
9461
|
height: 48
|
|
9439
9462
|
}, {
|
|
9440
|
-
default:
|
|
9463
|
+
default: et(() => [
|
|
9441
9464
|
L(U, {
|
|
9442
9465
|
density: "comfortable",
|
|
9443
9466
|
icon: "mdi-close",
|
|
9444
9467
|
variant: "text",
|
|
9445
|
-
onClick: g[0] || (g[0] = (
|
|
9468
|
+
onClick: g[0] || (g[0] = ($) => _.value = !1)
|
|
9446
9469
|
}),
|
|
9447
9470
|
w("span", Fa, Mt(R(n)("x-block-lib.navigator")), 1),
|
|
9448
9471
|
L(ht)
|
|
@@ -9453,20 +9476,20 @@ const La = /* @__PURE__ */ it({
|
|
|
9453
9476
|
class: "overflow-y-auto",
|
|
9454
9477
|
style: G(l.value)
|
|
9455
9478
|
}, [
|
|
9456
|
-
t.type === "list" ? (S(),
|
|
9479
|
+
t.type === "list" ? (S(), tt(Va, {
|
|
9457
9480
|
key: 0,
|
|
9458
9481
|
ref_key: "blockList",
|
|
9459
9482
|
ref: d,
|
|
9460
9483
|
modelValue: R(_),
|
|
9461
|
-
"onUpdate:modelValue": g[1] || (g[1] = (
|
|
9484
|
+
"onUpdate:modelValue": g[1] || (g[1] = ($) => jt(_) ? _.value = $ : null),
|
|
9462
9485
|
lock: t.lock
|
|
9463
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(),
|
|
9486
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), tt(xa, {
|
|
9464
9487
|
key: 1,
|
|
9465
9488
|
ref_key: "blockTree",
|
|
9466
9489
|
ref: h,
|
|
9467
9490
|
modelValue: R(_),
|
|
9468
|
-
"onUpdate:modelValue": g[2] || (g[2] = (
|
|
9469
|
-
}, null, 8, ["modelValue"])) :
|
|
9491
|
+
"onUpdate:modelValue": g[2] || (g[2] = ($) => jt(_) ? _.value = $ : null)
|
|
9492
|
+
}, null, 8, ["modelValue"])) : ot("", !0),
|
|
9470
9493
|
w("div", {
|
|
9471
9494
|
style: G(r.value)
|
|
9472
9495
|
}, null, 4)
|
|
@@ -9479,12 +9502,12 @@ const La = /* @__PURE__ */ it({
|
|
|
9479
9502
|
L(gt, {
|
|
9480
9503
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9481
9504
|
}, {
|
|
9482
|
-
activator:
|
|
9483
|
-
L(U,
|
|
9505
|
+
activator: et(({ props: $ }) => [
|
|
9506
|
+
L(U, en($, {
|
|
9484
9507
|
density: "comfortable",
|
|
9485
9508
|
icon: "mdi-navigation-variant",
|
|
9486
9509
|
variant: "outlined",
|
|
9487
|
-
onClick: g[7] || (g[7] = (
|
|
9510
|
+
onClick: g[7] || (g[7] = (un) => _.value = !0)
|
|
9488
9511
|
}), null, 16)
|
|
9489
9512
|
]),
|
|
9490
9513
|
_: 1
|
|
@@ -9492,7 +9515,7 @@ const La = /* @__PURE__ */ it({
|
|
|
9492
9515
|
], 64);
|
|
9493
9516
|
};
|
|
9494
9517
|
}
|
|
9495
|
-
}), x =
|
|
9518
|
+
}), x = y.xml;
|
|
9496
9519
|
function V(t) {
|
|
9497
9520
|
const e = x.createElement("label");
|
|
9498
9521
|
return e.setAttribute("text", t), e;
|
|
@@ -9510,7 +9533,7 @@ function uo(t) {
|
|
|
9510
9533
|
e.setAttribute(n, o);
|
|
9511
9534
|
return e;
|
|
9512
9535
|
}
|
|
9513
|
-
function
|
|
9536
|
+
function yt(t, e) {
|
|
9514
9537
|
e === void 0 && (e = "");
|
|
9515
9538
|
const n = x.createElement("value");
|
|
9516
9539
|
n.setAttribute("name", t);
|
|
@@ -9521,7 +9544,7 @@ function kt(t, e) {
|
|
|
9521
9544
|
const a = x.createTextNode(e);
|
|
9522
9545
|
return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
|
|
9523
9546
|
}
|
|
9524
|
-
function
|
|
9547
|
+
function Ln(t, e) {
|
|
9525
9548
|
e === void 0 && (e = 0);
|
|
9526
9549
|
const n = x.createElement("value");
|
|
9527
9550
|
n.setAttribute("name", t);
|
|
@@ -9546,19 +9569,19 @@ function wa(t, e) {
|
|
|
9546
9569
|
function Ka() {
|
|
9547
9570
|
return E.app.activeObject.type === "comp" && E.app.activeComp.meta.events.length > 0;
|
|
9548
9571
|
}
|
|
9549
|
-
function
|
|
9572
|
+
function Ha() {
|
|
9550
9573
|
return E.app.activeObject.type === "comp" && E.app.activeComp.meta.states.length > 0;
|
|
9551
9574
|
}
|
|
9552
|
-
function
|
|
9575
|
+
function Sn() {
|
|
9553
9576
|
return E.app.activeObject.type === "comp" && E.app.activeComp.meta.methods.length > 0;
|
|
9554
9577
|
}
|
|
9555
|
-
function
|
|
9578
|
+
function $a() {
|
|
9556
9579
|
const t = [];
|
|
9557
9580
|
return t.push(V(p("LABEL_EVENT"))), W("onEvent") && t.push(O("on_app_event_v1")), Ka() && t.push(O("trigger_app_event_v1")), t.push(
|
|
9558
9581
|
O("app_bind_v1", [uo([{ key: "items", value: "2" }])])
|
|
9559
|
-
), t.push(O("watch_effect_v1")), (W("getProp") || W("setProp")) && t.push(V(p("LABEL_PROPERTY"))), W("getProp") && t.push(O("get_app_prop_v1")), W("setProp") && t.push(O("set_app_prop_v1")),
|
|
9582
|
+
), t.push(O("watch_effect_v1")), (W("getProp") || W("setProp")) && t.push(V(p("LABEL_PROPERTY"))), W("getProp") && t.push(O("get_app_prop_v1")), W("setProp") && t.push(O("set_app_prop_v1")), Ha() && (t.push(V(p("LABEL_STATE"))), t.push(O("get_app_state_v1")), t.push(O("set_app_state_v1"))), (W("callMethod") || Sn()) && t.push(V(p("LABEL_METHOD"))), W("callMethod") && t.push(O("call_app_method_v1")), Sn() && (t.push(O("impl_app_method_v1")), t.push(O("set_app_method_output_v1")), t.push(O("procedure_return_v1"))), t;
|
|
9560
9583
|
}
|
|
9561
|
-
const lo = { name: "APP_COMP_CATEGORY", callback:
|
|
9584
|
+
const lo = { name: "APP_COMP_CATEGORY", callback: $a };
|
|
9562
9585
|
function Ga() {
|
|
9563
9586
|
const t = [];
|
|
9564
9587
|
return t.push(V(p("LABEL_FUNC"))), t.push(V(p("LABEL_FLOW"))), t;
|
|
@@ -9566,7 +9589,7 @@ function Ga() {
|
|
|
9566
9589
|
const ie = { name: "APP_COMPUTE_CATEGORY", callback: Ga };
|
|
9567
9590
|
function Wa() {
|
|
9568
9591
|
const t = [];
|
|
9569
|
-
return t.push(O("app_debug_trace_v1", [
|
|
9592
|
+
return t.push(O("app_debug_trace_v1", [yt("OBJECT")])), t.push(O("popup_message_v1", [yt("TEXT")])), t.push(O("open_confirm_dlg_v1")), t.push(O("open_prompt_dlg_v1")), t;
|
|
9570
9593
|
}
|
|
9571
9594
|
const se = { name: "APP_MESSAGE_CATEGORY", callback: Wa };
|
|
9572
9595
|
function ja() {
|
|
@@ -9597,7 +9620,7 @@ function za() {
|
|
|
9597
9620
|
const t = [];
|
|
9598
9621
|
return t.push(V(p("LABEL_RESOURCE"))), t.push(O("upload_resource_v1")), t;
|
|
9599
9622
|
}
|
|
9600
|
-
const ce = { name: "APP_RESOURCE_CATEGORY", callback: za }, Bt =
|
|
9623
|
+
const ce = { name: "APP_RESOURCE_CATEGORY", callback: za }, Bt = y.xml;
|
|
9601
9624
|
function Za() {
|
|
9602
9625
|
const t = [];
|
|
9603
9626
|
{
|
|
@@ -9621,10 +9644,10 @@ function Za() {
|
|
|
9621
9644
|
}
|
|
9622
9645
|
return t;
|
|
9623
9646
|
}
|
|
9624
|
-
const
|
|
9647
|
+
const st = {
|
|
9625
9648
|
name: "PROCEDURE_CATEGORY",
|
|
9626
9649
|
callback: Za
|
|
9627
|
-
}, Gt =
|
|
9650
|
+
}, Gt = y.xml;
|
|
9628
9651
|
function tc() {
|
|
9629
9652
|
const t = xt(), e = [];
|
|
9630
9653
|
{
|
|
@@ -9661,23 +9684,23 @@ function tc() {
|
|
|
9661
9684
|
}
|
|
9662
9685
|
}), e;
|
|
9663
9686
|
}
|
|
9664
|
-
const
|
|
9687
|
+
const at = {
|
|
9665
9688
|
name: "VARIABLE_CATEGORY",
|
|
9666
9689
|
callback: tc
|
|
9667
9690
|
};
|
|
9668
9691
|
function ec() {
|
|
9669
9692
|
const t = [];
|
|
9670
|
-
if (
|
|
9693
|
+
if (q().length > 0)
|
|
9671
9694
|
t.push(V(p("LABEL_OPERATION"))), t.push(O("add_data_v1")), t.push(O("delete_data_v1")), t.push(O("update_data_v1")), t.push(O("query_data_v1")), t.push(O("transaction_v1")), t.push(
|
|
9672
|
-
O("interrupt_transaction_v1", [
|
|
9673
|
-
), t.push(V(p("LABEL_CONDITION"))), t.push(O("cond_logic_v1")), t.push(O("cond_atomic_v1", [
|
|
9695
|
+
O("interrupt_transaction_v1", [yt("VALUE")])
|
|
9696
|
+
), t.push(V(p("LABEL_CONDITION"))), t.push(O("cond_logic_v1")), t.push(O("cond_atomic_v1", [yt("VALUE")])), t.push(V(p("LABEL_QUERY_EXTRA"))), t.push(
|
|
9674
9697
|
O("query_extra_limit_v1", [
|
|
9675
|
-
|
|
9676
|
-
|
|
9698
|
+
Ln("OFFSET", 0),
|
|
9699
|
+
Ln("LIMIT", 1)
|
|
9677
9700
|
])
|
|
9678
9701
|
), t.push(
|
|
9679
9702
|
O("query_extra_sortby_v1", [
|
|
9680
|
-
|
|
9703
|
+
yt("COLUMN"),
|
|
9681
9704
|
wa("DESC")
|
|
9682
9705
|
])
|
|
9683
9706
|
);
|
|
@@ -9707,7 +9730,7 @@ const re = { name: "COMPUTE_FUNC_CATEGORY", callback: sc };
|
|
|
9707
9730
|
function ac() {
|
|
9708
9731
|
const t = [];
|
|
9709
9732
|
return t.push(
|
|
9710
|
-
O("compute_debug_trace_v1", [
|
|
9733
|
+
O("compute_debug_trace_v1", [yt("OBJECT")])
|
|
9711
9734
|
), t;
|
|
9712
9735
|
}
|
|
9713
9736
|
const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
@@ -10003,7 +10026,7 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10003
10026
|
type: "flow_control_v1"
|
|
10004
10027
|
}
|
|
10005
10028
|
]
|
|
10006
|
-
},
|
|
10029
|
+
}, ye = {
|
|
10007
10030
|
kind: "category",
|
|
10008
10031
|
name: "%{BKY_CATEGORY_MATH}",
|
|
10009
10032
|
categorystyle: "math_category",
|
|
@@ -10158,7 +10181,7 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10158
10181
|
type: "math_on_list_v1"
|
|
10159
10182
|
}
|
|
10160
10183
|
]
|
|
10161
|
-
},
|
|
10184
|
+
}, ke = {
|
|
10162
10185
|
kind: "category",
|
|
10163
10186
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
10164
10187
|
categorystyle: "object_category",
|
|
@@ -10436,23 +10459,23 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10436
10459
|
},
|
|
10437
10460
|
Ce,
|
|
10438
10461
|
ve,
|
|
10439
|
-
|
|
10462
|
+
ye,
|
|
10440
10463
|
Ne,
|
|
10441
10464
|
Oe,
|
|
10442
|
-
|
|
10465
|
+
ke,
|
|
10443
10466
|
Ie,
|
|
10444
10467
|
_o,
|
|
10445
10468
|
{
|
|
10446
10469
|
kind: "category",
|
|
10447
10470
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10448
10471
|
categorystyle: "variable_category",
|
|
10449
|
-
custom:
|
|
10472
|
+
custom: at.name
|
|
10450
10473
|
},
|
|
10451
10474
|
{
|
|
10452
10475
|
kind: "category",
|
|
10453
10476
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10454
10477
|
categorystyle: "procedure_category",
|
|
10455
|
-
custom:
|
|
10478
|
+
custom: st.name
|
|
10456
10479
|
},
|
|
10457
10480
|
{
|
|
10458
10481
|
kind: "category",
|
|
@@ -10496,22 +10519,22 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10496
10519
|
},
|
|
10497
10520
|
Ce,
|
|
10498
10521
|
ve,
|
|
10499
|
-
|
|
10522
|
+
ye,
|
|
10500
10523
|
Ne,
|
|
10501
10524
|
Oe,
|
|
10502
|
-
|
|
10525
|
+
ke,
|
|
10503
10526
|
Ie,
|
|
10504
10527
|
{
|
|
10505
10528
|
kind: "category",
|
|
10506
10529
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10507
10530
|
categorystyle: "variable_category",
|
|
10508
|
-
custom:
|
|
10531
|
+
custom: at.name
|
|
10509
10532
|
},
|
|
10510
10533
|
{
|
|
10511
10534
|
kind: "category",
|
|
10512
10535
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10513
10536
|
categorystyle: "procedure_category",
|
|
10514
|
-
custom:
|
|
10537
|
+
custom: st.name
|
|
10515
10538
|
}
|
|
10516
10539
|
]
|
|
10517
10540
|
}, lc = {
|
|
@@ -10543,22 +10566,22 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10543
10566
|
},
|
|
10544
10567
|
Ce,
|
|
10545
10568
|
ve,
|
|
10546
|
-
|
|
10569
|
+
ye,
|
|
10547
10570
|
Ne,
|
|
10548
10571
|
Oe,
|
|
10549
|
-
|
|
10572
|
+
ke,
|
|
10550
10573
|
Ie,
|
|
10551
10574
|
{
|
|
10552
10575
|
kind: "category",
|
|
10553
10576
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10554
10577
|
categorystyle: "variable_category",
|
|
10555
|
-
custom:
|
|
10578
|
+
custom: at.name
|
|
10556
10579
|
},
|
|
10557
10580
|
{
|
|
10558
10581
|
kind: "category",
|
|
10559
10582
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10560
10583
|
categorystyle: "procedure_category",
|
|
10561
|
-
custom:
|
|
10584
|
+
custom: st.name
|
|
10562
10585
|
}
|
|
10563
10586
|
]
|
|
10564
10587
|
}, rc = {
|
|
@@ -10615,23 +10638,23 @@ const _e = { name: "COMPUTE_MISC_CATEGORY", callback: ac }, Ie = {
|
|
|
10615
10638
|
},
|
|
10616
10639
|
Ce,
|
|
10617
10640
|
ve,
|
|
10618
|
-
|
|
10641
|
+
ye,
|
|
10619
10642
|
Ne,
|
|
10620
10643
|
Oe,
|
|
10621
|
-
|
|
10644
|
+
ke,
|
|
10622
10645
|
Ie,
|
|
10623
10646
|
_o,
|
|
10624
10647
|
{
|
|
10625
10648
|
kind: "category",
|
|
10626
10649
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10627
10650
|
categorystyle: "variable_category",
|
|
10628
|
-
custom:
|
|
10651
|
+
custom: at.name
|
|
10629
10652
|
},
|
|
10630
10653
|
{
|
|
10631
10654
|
kind: "category",
|
|
10632
10655
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10633
10656
|
categorystyle: "procedure_category",
|
|
10634
|
-
custom:
|
|
10657
|
+
custom: st.name
|
|
10635
10658
|
},
|
|
10636
10659
|
{
|
|
10637
10660
|
kind: "category",
|
|
@@ -10685,7 +10708,7 @@ function hc(t, e, n) {
|
|
|
10685
10708
|
function o({ name: i, callback: a }) {
|
|
10686
10709
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10687
10710
|
}
|
|
10688
|
-
e === "page" ? n === "v1" && (o(ro), o(se), o(ae), o(
|
|
10711
|
+
e === "page" ? n === "v1" && (o(ro), o(se), o(ae), o(at), o(st), o(ce), o(ie)) : e === "comp" ? n === "v1" && (o(lo), o(se), o(ae), o(at), o(st), o(ce), o(ie)) : e === "func" ? n === "v1" && (o(re), o(le), o(ue), o(_e), o(at), o(st)) : e === "flow" && n === "v1" && (o(re), o(le), o(ue), o(_e), o(at), o(st));
|
|
10689
10712
|
}
|
|
10690
10713
|
function fc(t) {
|
|
10691
10714
|
const { router: e } = Et;
|
|
@@ -10779,7 +10802,7 @@ function Tc(t) {
|
|
|
10779
10802
|
if (o.type === "json_root_v1")
|
|
10780
10803
|
return e(o);
|
|
10781
10804
|
}
|
|
10782
|
-
const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */
|
|
10805
|
+
const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ nt({
|
|
10783
10806
|
__name: "index",
|
|
10784
10807
|
props: /* @__PURE__ */ we({
|
|
10785
10808
|
type: {},
|
|
@@ -10805,7 +10828,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10805
10828
|
bottom: "0px",
|
|
10806
10829
|
width: "100%",
|
|
10807
10830
|
height: "48px"
|
|
10808
|
-
})),
|
|
10831
|
+
})), Q = Y(() => ({
|
|
10809
10832
|
position: "absolute",
|
|
10810
10833
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10811
10834
|
top: "1px",
|
|
@@ -10818,7 +10841,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10818
10841
|
top: "0px",
|
|
10819
10842
|
right: "0px",
|
|
10820
10843
|
zIndex: 20
|
|
10821
|
-
})),
|
|
10844
|
+
})), $ = Y(() => ({
|
|
10822
10845
|
position: "absolute",
|
|
10823
10846
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10824
10847
|
top: "0px",
|
|
@@ -10826,7 +10849,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10826
10849
|
width: "100%",
|
|
10827
10850
|
height: "calc(100% - 48px)",
|
|
10828
10851
|
pointerEvents: "none"
|
|
10829
|
-
})),
|
|
10852
|
+
})), un = Y(() => ({
|
|
10830
10853
|
position: "absolute",
|
|
10831
10854
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10832
10855
|
top: "1px",
|
|
@@ -10840,19 +10863,19 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10840
10863
|
left: 0,
|
|
10841
10864
|
zIndex: 3e3
|
|
10842
10865
|
})), { open: Lt } = qe(`blocklyEditorFlyout${Ke()}`);
|
|
10843
|
-
|
|
10866
|
+
mn(async () => {
|
|
10844
10867
|
if (!r.value || !_.value) {
|
|
10845
10868
|
console.assert(!1);
|
|
10846
10869
|
return;
|
|
10847
10870
|
}
|
|
10848
|
-
Uo(_.value), await
|
|
10871
|
+
Uo(_.value), await En(t.locale), f.workspace = pc(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(A.disableOrphans), f.workspace.addChangeListener(ho);
|
|
10849
10872
|
const N = document.querySelector(`#${l} .blocklyFlyout`);
|
|
10850
10873
|
new MutationObserver((Le) => {
|
|
10851
|
-
Le.forEach((
|
|
10852
|
-
|
|
10874
|
+
Le.forEach(($t) => {
|
|
10875
|
+
$t.type === "attributes" && $t.attributeName === "style" && (Lt.value = f.workspace.getFlyout().isVisible());
|
|
10853
10876
|
});
|
|
10854
|
-
}).observe(N, { attributes: !0 }), Lt.value = f.workspace.getFlyout().isVisible(),
|
|
10855
|
-
}),
|
|
10877
|
+
}).observe(N, { attributes: !0 }), Lt.value = f.workspace.getFlyout().isVisible(), ln(), rn(), await Zo(), u("ready");
|
|
10878
|
+
}), Tn(() => {
|
|
10856
10879
|
Lt.value = !1;
|
|
10857
10880
|
}), Vo(r, () => {
|
|
10858
10881
|
f.workspace && xo(f.workspace);
|
|
@@ -10881,27 +10904,27 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10881
10904
|
console.assert(!1);
|
|
10882
10905
|
else
|
|
10883
10906
|
return s.workspaceToCode(f.workspace);
|
|
10884
|
-
}, Eo = () =>
|
|
10907
|
+
}, Eo = () => ka(f.workspace), ln = () => {
|
|
10885
10908
|
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (Lt.value = !1);
|
|
10886
|
-
},
|
|
10909
|
+
}, rn = () => {
|
|
10887
10910
|
f.workspace.setScale(a.value);
|
|
10888
10911
|
}, go = () => {
|
|
10889
10912
|
f.workspace.fireChangeListener(new Kn());
|
|
10890
|
-
},
|
|
10913
|
+
}, _n = () => {
|
|
10891
10914
|
d.value?.cleanWorkspace();
|
|
10892
|
-
},
|
|
10915
|
+
}, pn = () => {
|
|
10893
10916
|
i.value = !i.value;
|
|
10894
|
-
},
|
|
10917
|
+
}, dn = () => {
|
|
10895
10918
|
h.value && (h.value.open = !0);
|
|
10896
10919
|
};
|
|
10897
|
-
return
|
|
10898
|
-
At.on("cleanWorkspace",
|
|
10899
|
-
}),
|
|
10900
|
-
At.off("cleanWorkspace",
|
|
10920
|
+
return mn(() => {
|
|
10921
|
+
At.on("cleanWorkspace", _n), At.on("toggleBlocklyLock", pn), At.on("openBlocklyNavigator", dn);
|
|
10922
|
+
}), Tn(() => {
|
|
10923
|
+
At.off("cleanWorkspace", _n), At.off("toggleBlocklyLock", pn), At.off("openBlocklyNavigator", dn);
|
|
10901
10924
|
}), St(
|
|
10902
10925
|
() => t.locale,
|
|
10903
10926
|
(N) => {
|
|
10904
|
-
|
|
10927
|
+
En(N);
|
|
10905
10928
|
}
|
|
10906
10929
|
), St(
|
|
10907
10930
|
() => t.dark,
|
|
@@ -10911,9 +10934,9 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10911
10934
|
), St(Lt, (N) => {
|
|
10912
10935
|
N || f.workspace?.hideChaff();
|
|
10913
10936
|
}), St(i, () => {
|
|
10914
|
-
|
|
10937
|
+
ln();
|
|
10915
10938
|
}), St(a, () => {
|
|
10916
|
-
|
|
10939
|
+
rn();
|
|
10917
10940
|
}), e({
|
|
10918
10941
|
loading: v,
|
|
10919
10942
|
load: fo,
|
|
@@ -10922,7 +10945,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10922
10945
|
generateReactivity: Eo,
|
|
10923
10946
|
fireStateChange: go
|
|
10924
10947
|
}), (N, ft) => {
|
|
10925
|
-
const Le = D("v-icon"),
|
|
10948
|
+
const Le = D("v-icon"), $t = D("x-loading");
|
|
10926
10949
|
return S(), X("div", Ec, [
|
|
10927
10950
|
w("div", {
|
|
10928
10951
|
id: l,
|
|
@@ -10938,14 +10961,14 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10938
10961
|
g.value ? (S(), X("div", {
|
|
10939
10962
|
key: 0,
|
|
10940
10963
|
class: "d-flex flex-column justify-center align-center",
|
|
10941
|
-
style: G(
|
|
10964
|
+
style: G(Q.value)
|
|
10942
10965
|
}, [
|
|
10943
10966
|
L(Le, {
|
|
10944
10967
|
icon: "mdi-delete",
|
|
10945
10968
|
size: "x-large"
|
|
10946
10969
|
})
|
|
10947
|
-
], 4)) :
|
|
10948
|
-
v.value ?
|
|
10970
|
+
], 4)) : ot("", !0),
|
|
10971
|
+
v.value ? ot("", !0) : (S(), X("div", {
|
|
10949
10972
|
key: 1,
|
|
10950
10973
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10951
10974
|
style: G(gt.value)
|
|
@@ -10968,25 +10991,25 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10968
10991
|
], 4)),
|
|
10969
10992
|
i.value ? (S(), X("div", {
|
|
10970
10993
|
key: 2,
|
|
10971
|
-
style: G(
|
|
10972
|
-
}, null, 4)) :
|
|
10994
|
+
style: G(un.value)
|
|
10995
|
+
}, null, 4)) : ot("", !0),
|
|
10973
10996
|
i.value ? (S(), X("div", {
|
|
10974
10997
|
key: 3,
|
|
10975
|
-
style: G(
|
|
10976
|
-
}, null, 4)) :
|
|
10998
|
+
style: G($.value)
|
|
10999
|
+
}, null, 4)) : ot("", !0),
|
|
10977
11000
|
w("div", {
|
|
10978
11001
|
ref_key: "parentContainer",
|
|
10979
11002
|
ref: _,
|
|
10980
11003
|
style: G(po.value)
|
|
10981
11004
|
}, null, 4),
|
|
10982
|
-
L(
|
|
11005
|
+
L($t, {
|
|
10983
11006
|
open: v.value,
|
|
10984
11007
|
"z-index": 99
|
|
10985
11008
|
}, null, 8, ["open"])
|
|
10986
11009
|
]);
|
|
10987
11010
|
};
|
|
10988
11011
|
}
|
|
10989
|
-
}), Ac = /* @__PURE__ */
|
|
11012
|
+
}), Ac = /* @__PURE__ */ nt({
|
|
10990
11013
|
__name: "index",
|
|
10991
11014
|
props: {
|
|
10992
11015
|
code: {}
|
|
@@ -10997,12 +11020,12 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
10997
11020
|
const n = wo.component, { backgroundColor2: o } = Ft();
|
|
10998
11021
|
return (i, a) => {
|
|
10999
11022
|
const u = D("v-sheet");
|
|
11000
|
-
return S(),
|
|
11023
|
+
return S(), tt(u, {
|
|
11001
11024
|
color: R(o),
|
|
11002
11025
|
height: "100%",
|
|
11003
11026
|
width: "100%"
|
|
11004
11027
|
}, {
|
|
11005
|
-
default:
|
|
11028
|
+
default: et(() => [
|
|
11006
11029
|
L(R(n), {
|
|
11007
11030
|
code: e.code,
|
|
11008
11031
|
language: "js"
|
|
@@ -11012,10 +11035,10 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
11012
11035
|
}, 8, ["color"]);
|
|
11013
11036
|
};
|
|
11014
11037
|
}
|
|
11015
|
-
}), Ic = { class: "text-subtitle-1" }, Oc = { class: "w-100 h-100 overflow-auto" }, vc = /* @__PURE__ */
|
|
11038
|
+
}), Ic = { class: "text-subtitle-1" }, Oc = { class: "w-100 h-100 overflow-auto" }, vc = /* @__PURE__ */ nt({
|
|
11016
11039
|
__name: "index",
|
|
11017
11040
|
setup(t) {
|
|
11018
|
-
const { t: e } = Yt(), { sysBarAvail: n } =
|
|
11041
|
+
const { t: e } = Yt(), { sysBarAvail: n } = Vn(), { backgroundColor0: o, backgroundColor2: i } = Ft(), a = Ot(""), u = Y(() => {
|
|
11019
11042
|
let _ = 48;
|
|
11020
11043
|
return n.value && (_ += 24), {
|
|
11021
11044
|
position: "relative",
|
|
@@ -11026,7 +11049,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
11026
11049
|
}, { open: r } = qe("sourceDlg", l);
|
|
11027
11050
|
return (_, d) => {
|
|
11028
11051
|
const h = D("v-sheet"), f = D("v-btn"), v = D("v-spacer"), g = D("v-dialog");
|
|
11029
|
-
return S(),
|
|
11052
|
+
return S(), tt(g, {
|
|
11030
11053
|
modelValue: R(r),
|
|
11031
11054
|
"onUpdate:modelValue": d[1] || (d[1] = (P) => jt(r) ? r.value = P : null),
|
|
11032
11055
|
fullscreen: "",
|
|
@@ -11035,24 +11058,24 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
11035
11058
|
transition: "dialog-bottom-transition",
|
|
11036
11059
|
onKeydown: d[2] || (d[2] = wn(Pt((P) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11037
11060
|
}, {
|
|
11038
|
-
default:
|
|
11061
|
+
default: et(() => [
|
|
11039
11062
|
L(h, {
|
|
11040
11063
|
color: R(o),
|
|
11041
11064
|
height: "100%",
|
|
11042
11065
|
width: "100%"
|
|
11043
11066
|
}, {
|
|
11044
|
-
default:
|
|
11045
|
-
R(n) ? (S(),
|
|
11067
|
+
default: et(() => [
|
|
11068
|
+
R(n) ? (S(), tt(h, {
|
|
11046
11069
|
key: 0,
|
|
11047
11070
|
color: R(i),
|
|
11048
11071
|
height: 24
|
|
11049
|
-
}, null, 8, ["color"])) :
|
|
11072
|
+
}, null, 8, ["color"])) : ot("", !0),
|
|
11050
11073
|
L(h, {
|
|
11051
11074
|
class: "d-flex align-center px-2",
|
|
11052
11075
|
color: R(i),
|
|
11053
11076
|
height: 48
|
|
11054
11077
|
}, {
|
|
11055
|
-
default:
|
|
11078
|
+
default: et(() => [
|
|
11056
11079
|
L(f, {
|
|
11057
11080
|
density: "comfortable",
|
|
11058
11081
|
icon: "mdi-close",
|
|
@@ -11083,7 +11106,7 @@ const Ec = { class: "position-relative w-100 h-100" }, gc = /* @__PURE__ */ it({
|
|
|
11083
11106
|
t.component("XBlockly", gc), t.component("XSourceDlg", vc);
|
|
11084
11107
|
};
|
|
11085
11108
|
async function Pc(t) {
|
|
11086
|
-
return (await
|
|
11109
|
+
return (await Hn(/* @__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;
|
|
11087
11110
|
}
|
|
11088
11111
|
const Rc = { install: Cc };
|
|
11089
11112
|
export {
|