x-block-lib 0.8.15 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/blockly/navigator/blockList/item.vue.d.ts +1 -0
- package/dist/core/utils/app/app.d.ts +6 -6
- package/dist/core/utils/compute/func.d.ts +3 -3
- package/dist/core/utils/data/table.d.ts +6 -6
- package/dist/core/utils/resource/dir.d.ts +3 -3
- package/dist/core/utils/resource/resource.d.ts +3 -3
- package/dist/index.js +831 -819
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
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 { provide as _o, inject as po, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as
|
|
11
|
-
import { E as g, r as cn, M as vn, s as
|
|
12
|
-
import { globalObjects as nt, openConfirmDlg as wo, openPromptDlg as Ko, messageWarning as Sn, useColor 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-98d5c375]{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 { provide as _o, inject as po, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as S, unref as R, withCtx as tt, createVNode as L, mergeProps as He, useModel as Dt, ref as Ot, computed as Y, resolveDirective as ho, withDirectives as fo, createElementBlock as X, normalizeStyle as G, createElementVNode as w, createCommentVNode as at, toDisplayString as Mt, withModifiers as bt, mergeModels as Re, Fragment as An, renderList as mo, useId as De, onUnmounted as To, useTemplateRef as Pt, withKeys as On, isRef as Wt, onMounted as sn, nextTick as Eo, onBeforeUnmount as an, watch as St, renderSlot as go } from "vue";
|
|
11
|
+
import { E as g, r as cn, M as vn, s as Io, a as Ao, X as Cn, u as C, B as d, j as s, O as c, F as A, b as Me, i as v, c as dt, d as Oo, e as M, f as h, g as vo, h as K, k as _t, p as Rt, l as z, m as ln, n as B, C as yn, N as et, o as Co, P as Ue, q as ye, V as At, t as xt, v as kn, W as yo, w as ko, x as No, S as Lo, y as So, z as Bo, T as _e, A as Nn, D as bo, G as Po, H as Ln, I as Ro, J as Do, K as Mo, L as Uo, Q as Vo, R as xo, U as Fo, Y as Yo } from "./vendor.huohikf4.js";
|
|
12
|
+
import { globalObjects as nt, openConfirmDlg as wo, openPromptDlg as Ko, messageWarning as Sn, useColor as Ft, useSystem as Bn, useViewStack as Ge, eventBus as It } from "x-essential-lib";
|
|
13
13
|
import { globalState as f } from "x-state-lib";
|
|
14
|
-
import { pkgs as
|
|
15
|
-
import { useI18n as
|
|
14
|
+
import { pkgs as Xt, parsePixelStr as $o, parsePercentStr as Ho, getPropTag as Nt, elements as J, makeTriggerId as Tt } from "x-runtime-lib";
|
|
15
|
+
import { useI18n as Yt } from "vue-i18n";
|
|
16
16
|
import { useDisplay as Go } from "vuetify";
|
|
17
|
-
var
|
|
17
|
+
var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
|
|
18
18
|
class bn extends g.Abstract {
|
|
19
19
|
isBlank = !0;
|
|
20
20
|
}
|
|
@@ -29,22 +29,22 @@ const Pn = (t, e, n) => {
|
|
|
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
|
|
32
|
+
async function rn(t) {
|
|
33
33
|
const e = await Pn(/* @__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
37
|
return vn[t] ?? t;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
39
|
+
const vt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Jt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
40
|
+
function pe(t) {
|
|
41
41
|
const e = t.lastIndexOf("V");
|
|
42
42
|
if (e <= 0 || e >= t.length - 1)
|
|
43
43
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
44
|
-
const n =
|
|
44
|
+
const n = Ao(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
45
45
|
return `${n}_${o}`;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function qt(t) {
|
|
48
48
|
const e = t.lastIndexOf("V");
|
|
49
49
|
if (e <= 0 || e >= t.length - 1)
|
|
50
50
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -63,7 +63,7 @@ function Wo(t) {
|
|
|
63
63
|
function Rn(t) {
|
|
64
64
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Qt(t, e) {
|
|
67
67
|
return !!(t.startsWith("basic.") || !e.ui || e.readonly);
|
|
68
68
|
}
|
|
69
69
|
function ke(t) {
|
|
@@ -85,7 +85,7 @@ function ot(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 Xo(t) {
|
|
88
|
-
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ?
|
|
88
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? qt(t.items) : t.ui === "multiTypes" ? qt(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
89
89
|
}
|
|
90
90
|
function Dn(t) {
|
|
91
91
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
@@ -101,13 +101,13 @@ function We(t, e, n, o) {
|
|
|
101
101
|
function F(t, e) {
|
|
102
102
|
try {
|
|
103
103
|
g.disable(), e.forEach((n) => {
|
|
104
|
-
const [o, i, a,
|
|
105
|
-
if (!
|
|
104
|
+
const [o, i, a, l] = n, r = t.getInput(o)?.connection;
|
|
105
|
+
if (!r)
|
|
106
106
|
return;
|
|
107
|
-
let u =
|
|
107
|
+
let u = r.targetBlock();
|
|
108
108
|
if (u) {
|
|
109
109
|
const _ = u;
|
|
110
|
-
if (_ && _.key === i && _.name === a && _.locale ===
|
|
110
|
+
if (_ && _.key === i && _.name === a && _.locale === l)
|
|
111
111
|
return;
|
|
112
112
|
u.dispose();
|
|
113
113
|
}
|
|
@@ -115,22 +115,22 @@ function F(t, e) {
|
|
|
115
115
|
t.workspace,
|
|
116
116
|
i,
|
|
117
117
|
a,
|
|
118
|
-
|
|
119
|
-
), u.outputConnection.connect(
|
|
118
|
+
l
|
|
119
|
+
), u.outputConnection.connect(r);
|
|
120
120
|
});
|
|
121
121
|
} finally {
|
|
122
122
|
g.enable();
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ut(t) {
|
|
126
126
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
127
127
|
return C.xml.textToDom(e);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function zt(t) {
|
|
130
130
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
131
131
|
return C.xml.textToDom(e);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Zt(t) {
|
|
134
134
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
135
135
|
return C.xml.textToDom(e);
|
|
136
136
|
}
|
|
@@ -141,11 +141,11 @@ function qo() {
|
|
|
141
141
|
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
142
142
|
}
|
|
143
143
|
function Qo(t) {
|
|
144
|
-
const e = `<shadow type="${
|
|
144
|
+
const e = `<shadow type="${pe(t)}"></shadow>`;
|
|
145
145
|
return C.xml.textToDom(e);
|
|
146
146
|
}
|
|
147
147
|
function zo(t) {
|
|
148
|
-
const e = `<shadow type="${
|
|
148
|
+
const e = `<shadow type="${pe(t)}"></shadow>`;
|
|
149
149
|
return C.xml.textToDom(e);
|
|
150
150
|
}
|
|
151
151
|
function Zo(t) {
|
|
@@ -157,11 +157,11 @@ function ti() {
|
|
|
157
157
|
}
|
|
158
158
|
function it(t) {
|
|
159
159
|
let e = null;
|
|
160
|
-
return t === "string" ? e =
|
|
160
|
+
return t === "string" ? e = ut("") : t === "number" ? e = zt(0) : t === "boolean" ? e = Zt(!1) : t === "array" ? e = Jo() : t === "object" ? e = qo() : console.assert(!1), e;
|
|
161
161
|
}
|
|
162
162
|
function ei(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 = ut(t.default) : t.ui === "numInput" ? e = zt(t.default) : t.ui === "switch" ? e = Zt(t.default) : t.ui === "select" ? e = Qo(t.items) : t.ui === "multiTypes" ? e = zo(t.types) : t.ui === "compSelect" ? e = ti() : t.ui === "colorPicker" ? e = Zo(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
165
165
|
}
|
|
166
166
|
function ni() {
|
|
167
167
|
const { activeObject: t, activePage: e } = f.app, n = [];
|
|
@@ -195,7 +195,7 @@ const ii = {
|
|
|
195
195
|
name: "",
|
|
196
196
|
type: "string"
|
|
197
197
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_PAGE_ARGUMENT_TITLE}").appendField(
|
|
198
|
-
new
|
|
198
|
+
new A(() => this.genArgumentOpts_()),
|
|
199
199
|
"ARGUMENT"
|
|
200
200
|
), this.setOutput(!0, null), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_APP_V1_GET_PAGE_ARGUMENT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_GET_PAGE_ARGUMENT_HELPURL}");
|
|
201
201
|
},
|
|
@@ -213,7 +213,7 @@ const ii = {
|
|
|
213
213
|
return oi();
|
|
214
214
|
},
|
|
215
215
|
onchange: function(t) {
|
|
216
|
-
if (t.type ===
|
|
216
|
+
if (t.type === b.STATE_CHANGE)
|
|
217
217
|
this.checkWarning_();
|
|
218
218
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
219
219
|
const e = t;
|
|
@@ -252,36 +252,36 @@ s.forBlock.get_page_argument_v1 = function(t) {
|
|
|
252
252
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, c.FUNCTION_CALL];
|
|
253
253
|
};
|
|
254
254
|
const si = (t, e) => {
|
|
255
|
-
const n =
|
|
255
|
+
const n = pe(t), o = qt(t);
|
|
256
256
|
d[n] = {
|
|
257
257
|
init: function() {
|
|
258
258
|
this.appendDummyInput().appendField(
|
|
259
|
-
new
|
|
259
|
+
new A(() => this.genOpts_()),
|
|
260
260
|
"ITEM"
|
|
261
261
|
), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
262
262
|
},
|
|
263
263
|
genOpts_: function() {
|
|
264
264
|
const { i18n: i } = nt, a = [];
|
|
265
|
-
for (const { title:
|
|
266
|
-
a.push([i.global.t(
|
|
265
|
+
for (const { title: l, value: r } of e)
|
|
266
|
+
a.push([i.global.t(l), r]);
|
|
267
267
|
return k(a);
|
|
268
268
|
}
|
|
269
269
|
}, s.forBlock[n] = function(i) {
|
|
270
|
-
const a = s.quote_,
|
|
271
|
-
return [a(
|
|
270
|
+
const a = s.quote_, l = i.getFieldValue("ITEM");
|
|
271
|
+
return [a(l), c.ATOMIC];
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
-
for (const t in
|
|
275
|
-
const e =
|
|
274
|
+
for (const t in Xt) {
|
|
275
|
+
const e = Xt[t];
|
|
276
276
|
for (const n in e.items)
|
|
277
277
|
si(n, e.items[n]);
|
|
278
278
|
}
|
|
279
279
|
const ai = (t, e) => {
|
|
280
|
-
const n =
|
|
280
|
+
const n = pe(t), o = qt(t);
|
|
281
281
|
d[n] = {
|
|
282
282
|
init: function() {
|
|
283
283
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
284
|
-
new
|
|
284
|
+
new A(() => this.genOpts_()),
|
|
285
285
|
"TYPE"
|
|
286
286
|
), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
|
|
287
287
|
},
|
|
@@ -295,12 +295,12 @@ const ai = (t, e) => {
|
|
|
295
295
|
},
|
|
296
296
|
genOpts_: function() {
|
|
297
297
|
const { i18n: i } = nt, a = [];
|
|
298
|
-
for (const { title:
|
|
299
|
-
a.push([i.global.t(
|
|
298
|
+
for (const { title: l, value: r } of e)
|
|
299
|
+
a.push([i.global.t(l), r]);
|
|
300
300
|
return k(a);
|
|
301
301
|
},
|
|
302
302
|
onchange: function(i) {
|
|
303
|
-
if (i.type ===
|
|
303
|
+
if (i.type === b.STATE_CHANGE)
|
|
304
304
|
this.checkWarning_();
|
|
305
305
|
else if (i.type === g.BLOCK_CHANGE) {
|
|
306
306
|
const a = i;
|
|
@@ -310,7 +310,7 @@ const ai = (t, e) => {
|
|
|
310
310
|
}
|
|
311
311
|
},
|
|
312
312
|
onTypeChange_: function(i) {
|
|
313
|
-
const a = e.find((
|
|
313
|
+
const a = e.find((l) => l.value === i);
|
|
314
314
|
if (!a) {
|
|
315
315
|
console.assert(!1);
|
|
316
316
|
return;
|
|
@@ -323,39 +323,39 @@ const ai = (t, e) => {
|
|
|
323
323
|
return;
|
|
324
324
|
let a = this.value;
|
|
325
325
|
a || (a = void 0);
|
|
326
|
-
const
|
|
327
|
-
if (!
|
|
326
|
+
const l = e.find((_) => _.validator(a));
|
|
327
|
+
if (!l)
|
|
328
328
|
return;
|
|
329
329
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
330
|
-
let
|
|
331
|
-
if (
|
|
330
|
+
let r, u;
|
|
331
|
+
if (l.ui === "pixelInput") {
|
|
332
332
|
const _ = $o(this.value) ?? 0;
|
|
333
|
-
|
|
333
|
+
r = new Me(
|
|
334
334
|
_,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
335
|
+
l.min,
|
|
336
|
+
l.max,
|
|
337
|
+
l.precision ? 1 / Math.pow(10, l.precision) : null,
|
|
338
338
|
(T) => {
|
|
339
339
|
this.value = T + "px";
|
|
340
340
|
}
|
|
341
341
|
), u = "px";
|
|
342
|
-
} else if (
|
|
342
|
+
} else if (l.ui === "percentInput") {
|
|
343
343
|
const _ = Ho(this.value) ?? 0;
|
|
344
|
-
|
|
344
|
+
r = new Me(
|
|
345
345
|
_,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
346
|
+
l.min,
|
|
347
|
+
l.max,
|
|
348
|
+
l.precision ? 1 / Math.pow(10, l.precision) : null,
|
|
349
349
|
(T) => {
|
|
350
350
|
this.value = T + "%";
|
|
351
351
|
}
|
|
352
352
|
), u = "%";
|
|
353
353
|
}
|
|
354
|
-
|
|
354
|
+
r && i.appendField(r, "VALUE"), u && i.appendField(u, "SUFFIX");
|
|
355
355
|
},
|
|
356
356
|
checkWarning_: function() {
|
|
357
357
|
let i = this.value;
|
|
358
|
-
if (i || (i = void 0), !e.find((
|
|
358
|
+
if (i || (i = void 0), !e.find((l) => l.validator(i))) {
|
|
359
359
|
this.setWarningText(p("WARN_TYPE_NOT_FOUND"));
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
@@ -366,29 +366,29 @@ const ai = (t, e) => {
|
|
|
366
366
|
return [a(i.value), c.ATOMIC];
|
|
367
367
|
};
|
|
368
368
|
};
|
|
369
|
-
for (const t in
|
|
370
|
-
const e =
|
|
369
|
+
for (const t in Xt) {
|
|
370
|
+
const e = Xt[t];
|
|
371
371
|
for (const n in e.types)
|
|
372
372
|
ai(n, e.types[n]);
|
|
373
373
|
}
|
|
374
|
-
const ci = C.xml,
|
|
374
|
+
const ci = C.xml, li = {
|
|
375
375
|
init: function() {
|
|
376
376
|
this.appendDummyInput().appendField(
|
|
377
377
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
378
378
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
379
379
|
}
|
|
380
380
|
};
|
|
381
|
-
d.app_bind_container_v1 =
|
|
382
|
-
const
|
|
381
|
+
d.app_bind_container_v1 = li;
|
|
382
|
+
const ri = {
|
|
383
383
|
init: function() {
|
|
384
384
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
d.app_bind_item_v1 =
|
|
387
|
+
d.app_bind_item_v1 = ri;
|
|
388
388
|
const ui = {
|
|
389
389
|
init: function() {
|
|
390
390
|
this.itemCount_ = 0, this.setMutator(
|
|
391
|
-
new
|
|
391
|
+
new dt.MutatorIcon(
|
|
392
392
|
["app_bind_item_v1"],
|
|
393
393
|
this
|
|
394
394
|
)
|
|
@@ -536,7 +536,7 @@ function pi(t) {
|
|
|
536
536
|
}
|
|
537
537
|
const Un = {
|
|
538
538
|
id: "",
|
|
539
|
-
|
|
539
|
+
groupId: "",
|
|
540
540
|
name: "",
|
|
541
541
|
position: 0
|
|
542
542
|
};
|
|
@@ -554,7 +554,7 @@ function hi() {
|
|
|
554
554
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
555
555
|
}), k(e);
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function he(t, e) {
|
|
558
558
|
const { i18n: n } = nt;
|
|
559
559
|
let o = "";
|
|
560
560
|
if (e === "regular")
|
|
@@ -612,29 +612,29 @@ function di(t) {
|
|
|
612
612
|
return t === "regular" || t === "property";
|
|
613
613
|
}
|
|
614
614
|
function Fe(t) {
|
|
615
|
-
const { props: e } = f.runtime, { activeObject: n } = f.app, o = [], i =
|
|
615
|
+
const { props: e } = f.runtime, { activeObject: n } = f.app, o = [], i = Nt(n.type, n.subtype);
|
|
616
616
|
if (!i)
|
|
617
617
|
return o;
|
|
618
|
-
const a = n.nodes.find((
|
|
618
|
+
const a = n.nodes.find((r) => r.id === t);
|
|
619
619
|
if (!a)
|
|
620
620
|
return o;
|
|
621
|
-
const
|
|
622
|
-
if (!
|
|
621
|
+
const l = J[a.key];
|
|
622
|
+
if (!l)
|
|
623
623
|
return console.assert(!1, "invalid element", a.key), o;
|
|
624
|
-
for (const { key:
|
|
624
|
+
for (const { key: r, name: u, params: _ } of l.events)
|
|
625
625
|
o.push({
|
|
626
|
-
key:
|
|
626
|
+
key: r,
|
|
627
627
|
names: [u],
|
|
628
628
|
from: "regular",
|
|
629
629
|
params: _
|
|
630
630
|
});
|
|
631
|
-
if (
|
|
632
|
-
for (const { keys:
|
|
633
|
-
if (
|
|
631
|
+
if (l.key.startsWith("single_ref_v") && console.log("singleRef"), l.key.startsWith("multiple_ref_v") && console.log("multipleRef"), e[l.key] && e[l.key][i])
|
|
632
|
+
for (const { keys: r, names: u, raw: _ } of e[l.key][i]) {
|
|
633
|
+
if (Qt(r, _))
|
|
634
634
|
continue;
|
|
635
635
|
const T = Rn(_);
|
|
636
636
|
o.push({
|
|
637
|
-
key:
|
|
637
|
+
key: r,
|
|
638
638
|
names: u,
|
|
639
639
|
from: "property",
|
|
640
640
|
params: [
|
|
@@ -643,30 +643,30 @@ function Fe(t) {
|
|
|
643
643
|
]
|
|
644
644
|
});
|
|
645
645
|
}
|
|
646
|
-
return
|
|
646
|
+
return l.key.startsWith("globality_v") && n.type, o;
|
|
647
647
|
}
|
|
648
648
|
function Le(t, e) {
|
|
649
|
-
const { props: n } = f.runtime, { activeObject: o } = f.app, i =
|
|
649
|
+
const { props: n } = f.runtime, { activeObject: o } = f.app, i = Nt(o.type, o.subtype);
|
|
650
650
|
if (!i)
|
|
651
651
|
return;
|
|
652
652
|
const a = o.nodes.find((u) => u.id === t);
|
|
653
653
|
if (!a)
|
|
654
654
|
return;
|
|
655
|
-
const
|
|
656
|
-
if (!
|
|
655
|
+
const l = J[a.key];
|
|
656
|
+
if (!l) {
|
|
657
657
|
console.assert(!1, "invalid element", a.key);
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
660
|
+
const r = l.events.find((u) => u.key === e);
|
|
661
|
+
if (r)
|
|
662
662
|
return {
|
|
663
|
-
key:
|
|
664
|
-
names: [
|
|
663
|
+
key: r.key,
|
|
664
|
+
names: [r.name],
|
|
665
665
|
from: "regular",
|
|
666
|
-
params:
|
|
666
|
+
params: r.params
|
|
667
667
|
};
|
|
668
|
-
if (
|
|
669
|
-
const u = n[
|
|
668
|
+
if (l.key.startsWith("single_ref_v") && console.log("singleRef"), l.key.startsWith("multiple_ref_v") && console.log("multipleRef"), n[l.key] && n[l.key][i]) {
|
|
669
|
+
const u = n[l.key][i].find((_) => _.keys === e);
|
|
670
670
|
if (u) {
|
|
671
671
|
const _ = Rn(u.raw);
|
|
672
672
|
return {
|
|
@@ -680,12 +680,12 @@ function Le(t, e) {
|
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
l.key.startsWith("globality_v") && o.type;
|
|
684
684
|
}
|
|
685
685
|
function fi(t) {
|
|
686
686
|
const e = [], n = Fe(t);
|
|
687
687
|
for (const { key: o, names: i, from: a } of n)
|
|
688
|
-
e.push([
|
|
688
|
+
e.push([he(i, a), o]);
|
|
689
689
|
return k(e);
|
|
690
690
|
}
|
|
691
691
|
function Fn() {
|
|
@@ -693,8 +693,8 @@ function Fn() {
|
|
|
693
693
|
if (t.type === "comp")
|
|
694
694
|
for (const o of e.meta.events) {
|
|
695
695
|
const i = [];
|
|
696
|
-
for (const { id: a, name:
|
|
697
|
-
i.push({ key: a, name:
|
|
696
|
+
for (const { id: a, name: l, type: r } of o.params)
|
|
697
|
+
i.push({ key: a, name: l, type: r });
|
|
698
698
|
n.push({
|
|
699
699
|
key: o.id,
|
|
700
700
|
names: [o.name],
|
|
@@ -712,8 +712,8 @@ function dn(t) {
|
|
|
712
712
|
);
|
|
713
713
|
if (o) {
|
|
714
714
|
const i = [];
|
|
715
|
-
for (const { id: a, name:
|
|
716
|
-
i.push({ key: a, name:
|
|
715
|
+
for (const { id: a, name: l, type: r } of o.params)
|
|
716
|
+
i.push({ key: a, name: l, type: r });
|
|
717
717
|
return {
|
|
718
718
|
key: o.id,
|
|
719
719
|
names: [o.name],
|
|
@@ -726,7 +726,7 @@ function dn(t) {
|
|
|
726
726
|
function mi() {
|
|
727
727
|
const t = [], e = Fn();
|
|
728
728
|
for (const { key: n, names: o, from: i } of e)
|
|
729
|
-
t.push([
|
|
729
|
+
t.push([he(o, i), n]);
|
|
730
730
|
return k(t);
|
|
731
731
|
}
|
|
732
732
|
function Yn(t) {
|
|
@@ -739,18 +739,18 @@ function Ye(t) {
|
|
|
739
739
|
const i = J[o.key];
|
|
740
740
|
if (!i)
|
|
741
741
|
return console.assert(!1, "inavlid element", o.key), n;
|
|
742
|
-
for (const { key: a, name:
|
|
742
|
+
for (const { key: a, name: l, inputs: r, outputs: u } of i.methods)
|
|
743
743
|
n.push({
|
|
744
744
|
key: a,
|
|
745
|
-
names: [
|
|
745
|
+
names: [l],
|
|
746
746
|
from: "regular",
|
|
747
|
-
inputs:
|
|
747
|
+
inputs: r,
|
|
748
748
|
outputs: u
|
|
749
749
|
});
|
|
750
750
|
return i.key.startsWith("single_ref_v") && console.log("singleRef"), i.key.startsWith("multiple_ref_v") && console.log("multipleRef"), i.key.startsWith("globality_v") && e.type, n;
|
|
751
751
|
}
|
|
752
752
|
function Se(t, e) {
|
|
753
|
-
const { activeObject: n } = f.app, o = n.nodes.find((
|
|
753
|
+
const { activeObject: n } = f.app, o = n.nodes.find((l) => l.id === t);
|
|
754
754
|
if (!o)
|
|
755
755
|
return;
|
|
756
756
|
const i = J[o.key];
|
|
@@ -758,7 +758,7 @@ function Se(t, e) {
|
|
|
758
758
|
console.assert(!1, "invalid element", o.key);
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
|
-
const a = i.methods.find((
|
|
761
|
+
const a = i.methods.find((l) => l.key === e);
|
|
762
762
|
if (a)
|
|
763
763
|
return {
|
|
764
764
|
key: a.key,
|
|
@@ -780,11 +780,11 @@ function Xe() {
|
|
|
780
780
|
if (t.type === "comp")
|
|
781
781
|
for (const o of e.meta.methods) {
|
|
782
782
|
const i = [];
|
|
783
|
-
for (const { id:
|
|
784
|
-
i.push({ key:
|
|
783
|
+
for (const { id: l, name: r, type: u } of o.inputs)
|
|
784
|
+
i.push({ key: l, name: r, type: u });
|
|
785
785
|
const a = [];
|
|
786
|
-
for (const { id:
|
|
787
|
-
a.push({ key:
|
|
786
|
+
for (const { id: l, name: r, type: u } of o.outputs)
|
|
787
|
+
a.push({ key: l, name: r, type: u });
|
|
788
788
|
n.push({
|
|
789
789
|
key: o.id,
|
|
790
790
|
names: [o.name],
|
|
@@ -795,7 +795,7 @@ function Xe() {
|
|
|
795
795
|
}
|
|
796
796
|
return n;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function kt(t) {
|
|
799
799
|
const { activeObject: e, activeComp: n } = f.app;
|
|
800
800
|
if (e.type === "comp") {
|
|
801
801
|
const o = n.meta.methods.find(
|
|
@@ -803,11 +803,11 @@ function yt(t) {
|
|
|
803
803
|
);
|
|
804
804
|
if (o) {
|
|
805
805
|
const i = [];
|
|
806
|
-
for (const { id:
|
|
807
|
-
i.push({ key:
|
|
806
|
+
for (const { id: l, name: r, type: u } of o.inputs)
|
|
807
|
+
i.push({ key: l, name: r, type: u });
|
|
808
808
|
const a = [];
|
|
809
|
-
for (const { id:
|
|
810
|
-
a.push({ key:
|
|
809
|
+
for (const { id: l, name: r, type: u } of o.outputs)
|
|
810
|
+
a.push({ key: l, name: r, type: u });
|
|
811
811
|
return {
|
|
812
812
|
key: o.id,
|
|
813
813
|
names: [o.name],
|
|
@@ -825,11 +825,11 @@ function wn() {
|
|
|
825
825
|
return k(t);
|
|
826
826
|
}
|
|
827
827
|
function we(t) {
|
|
828
|
-
const e =
|
|
828
|
+
const e = kt(t);
|
|
829
829
|
return e ? e.outputs : [];
|
|
830
830
|
}
|
|
831
831
|
function Be(t, e) {
|
|
832
|
-
const n =
|
|
832
|
+
const n = kt(t);
|
|
833
833
|
if (n)
|
|
834
834
|
return n.outputs.find((o) => o.key === e);
|
|
835
835
|
}
|
|
@@ -847,8 +847,8 @@ function Kn(t, e, n) {
|
|
|
847
847
|
if (t.events.length > 0)
|
|
848
848
|
return !1;
|
|
849
849
|
if (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), o[t.key] && o[t.key][e]) {
|
|
850
|
-
for (const { keys:
|
|
851
|
-
if (!
|
|
850
|
+
for (const { keys: l, raw: r } of o[t.key][e])
|
|
851
|
+
if (!Qt(l, r))
|
|
852
852
|
return !1;
|
|
853
853
|
}
|
|
854
854
|
return t.key.startsWith("globality_v") && i.type, !0;
|
|
@@ -857,8 +857,8 @@ function Kn(t, e, n) {
|
|
|
857
857
|
return t.methods.length > 0 ? !1 : (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), t.key.startsWith("globality_v") && i.type, !0);
|
|
858
858
|
if (n === "getProp") {
|
|
859
859
|
if (o[t.key] && o[t.key][e]) {
|
|
860
|
-
for (const { keys:
|
|
861
|
-
if (!
|
|
860
|
+
for (const { keys: l, raw: r } of o[t.key][e])
|
|
861
|
+
if (!Qt(l, r))
|
|
862
862
|
return !1;
|
|
863
863
|
}
|
|
864
864
|
return t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), !(t.key.startsWith("globality_v") && i.type === "comp" && a.meta.properties.length > 0);
|
|
@@ -867,8 +867,8 @@ function Kn(t, e, n) {
|
|
|
867
867
|
}
|
|
868
868
|
return !1;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
const { activeObject: e } = f.app, n =
|
|
870
|
+
function W(t) {
|
|
871
|
+
const { activeObject: e } = f.app, n = Nt(e.type, e.subtype);
|
|
872
872
|
if (!n)
|
|
873
873
|
return !1;
|
|
874
874
|
for (const o of e.nodes) {
|
|
@@ -882,8 +882,8 @@ function G(t) {
|
|
|
882
882
|
}
|
|
883
883
|
return !1;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
const { activeObject: e } = f.app, n = [], o =
|
|
885
|
+
function wt(t) {
|
|
886
|
+
const { activeObject: e } = f.app, n = [], o = Nt(e.type, e.subtype);
|
|
887
887
|
if (!o)
|
|
888
888
|
return n;
|
|
889
889
|
for (const i of e.nodes) {
|
|
@@ -901,7 +901,7 @@ function Ft(t) {
|
|
|
901
901
|
}
|
|
902
902
|
return n;
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function pt(t) {
|
|
905
905
|
const { activeObject: e } = f.app, n = e.nodes.find((i) => i.id === t);
|
|
906
906
|
if (!n)
|
|
907
907
|
return;
|
|
@@ -917,60 +917,60 @@ function _t(t) {
|
|
|
917
917
|
alias: n.alias
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
const { i18n: e } = nt, n = [], o =
|
|
922
|
-
for (const { id: i, name: a, alias:
|
|
923
|
-
let
|
|
924
|
-
|
|
920
|
+
function de(t) {
|
|
921
|
+
const { i18n: e } = nt, n = [], o = wt(t);
|
|
922
|
+
for (const { id: i, name: a, alias: l } of o) {
|
|
923
|
+
let r = e.global.t(a);
|
|
924
|
+
l && (r += " / " + l), n.push([r, i]);
|
|
925
925
|
}
|
|
926
926
|
return k(n);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [],
|
|
930
|
-
if (!r)
|
|
931
|
-
return a;
|
|
932
|
-
const l = o.nodes.find((_) => _.id === t);
|
|
928
|
+
function Ut(t, e) {
|
|
929
|
+
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [], l = Nt(o.type, o.subtype);
|
|
933
930
|
if (!l)
|
|
934
931
|
return a;
|
|
935
|
-
const
|
|
932
|
+
const r = o.nodes.find((_) => _.id === t);
|
|
933
|
+
if (!r)
|
|
934
|
+
return a;
|
|
935
|
+
const u = J[r.key];
|
|
936
936
|
if (!u)
|
|
937
|
-
return console.assert(!1, "invalid element",
|
|
938
|
-
if (n[u.key] && n[u.key][
|
|
939
|
-
for (const { keys: _, names: T, raw:
|
|
940
|
-
e === "write" &&
|
|
937
|
+
return console.assert(!1, "invalid element", r.key), a;
|
|
938
|
+
if (n[u.key] && n[u.key][l])
|
|
939
|
+
for (const { keys: _, names: T, raw: I } of n[u.key][l])
|
|
940
|
+
e === "write" && Qt(_, I) || a.push({
|
|
941
941
|
key: _,
|
|
942
942
|
names: T,
|
|
943
943
|
meta: {
|
|
944
944
|
from: "regular",
|
|
945
|
-
raw:
|
|
945
|
+
raw: I
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
948
|
if (u.key.startsWith("single_ref_v") && console.log("singleRef"), u.key.startsWith("multiple_ref_v") && console.log("multipleRef"), u.key.startsWith("globality_v") && o.type === "comp")
|
|
949
|
-
for (const { id: _, name: T, type:
|
|
949
|
+
for (const { id: _, name: T, type: I } of i.meta.properties)
|
|
950
950
|
a.push({
|
|
951
951
|
key: _,
|
|
952
952
|
names: [T],
|
|
953
953
|
meta: {
|
|
954
954
|
from: "custom",
|
|
955
|
-
raw: { type:
|
|
955
|
+
raw: { type: I }
|
|
956
956
|
}
|
|
957
957
|
});
|
|
958
958
|
return a;
|
|
959
959
|
}
|
|
960
960
|
function Et(t, e) {
|
|
961
|
-
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a =
|
|
961
|
+
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = Nt(o.type, o.subtype);
|
|
962
962
|
if (!a)
|
|
963
963
|
return;
|
|
964
|
-
const
|
|
965
|
-
if (!
|
|
964
|
+
const l = o.nodes.find((u) => u.id === t);
|
|
965
|
+
if (!l)
|
|
966
966
|
return;
|
|
967
|
-
const
|
|
968
|
-
if (!
|
|
969
|
-
console.assert(!1, "invalid element",
|
|
967
|
+
const r = J[l.key];
|
|
968
|
+
if (!r) {
|
|
969
|
+
console.assert(!1, "invalid element", l.key);
|
|
970
970
|
return;
|
|
971
971
|
}
|
|
972
|
-
if (n[
|
|
973
|
-
const u = n[
|
|
972
|
+
if (n[r.key] && n[r.key][a]) {
|
|
973
|
+
const u = n[r.key][a].find((_) => _.keys === e);
|
|
974
974
|
if (u)
|
|
975
975
|
return {
|
|
976
976
|
key: u.keys,
|
|
@@ -981,7 +981,7 @@ function Et(t, e) {
|
|
|
981
981
|
}
|
|
982
982
|
};
|
|
983
983
|
}
|
|
984
|
-
if (
|
|
984
|
+
if (r.key.startsWith("single_ref_v") && console.log("singleRef"), r.key.startsWith("multiple_ref_v") && console.log("multipleRef"), r.key.startsWith("globality_v") && o.type === "comp") {
|
|
985
985
|
const u = i.meta.properties.find(
|
|
986
986
|
(_) => _.id === e
|
|
987
987
|
);
|
|
@@ -997,16 +997,16 @@ function Et(t, e) {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
function $n(t, e) {
|
|
1000
|
-
const n = [], o =
|
|
1001
|
-
for (const { key: i, names: a, meta:
|
|
1002
|
-
n.push([xn(a,
|
|
1000
|
+
const n = [], o = Ut(t, e);
|
|
1001
|
+
for (const { key: i, names: a, meta: l } of o)
|
|
1002
|
+
n.push([xn(a, l.from), i]);
|
|
1003
1003
|
return k(n);
|
|
1004
1004
|
}
|
|
1005
1005
|
function Je() {
|
|
1006
1006
|
const { activeObject: t, activePage: e, activeComp: n } = f.app;
|
|
1007
1007
|
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function te(t) {
|
|
1010
1010
|
const { activeObject: e, activePage: n, activeComp: o } = f.app;
|
|
1011
1011
|
if (e.type === "page")
|
|
1012
1012
|
return n.meta.states.find((i) => i.id === t);
|
|
@@ -1030,15 +1030,15 @@ const gi = {
|
|
|
1030
1030
|
names: [],
|
|
1031
1031
|
from: "regular",
|
|
1032
1032
|
params: []
|
|
1033
|
-
}, this.appendDummyInput().appendField("%{BKY_APP_V1_ON_APP_EVENT_TITLE}").appendField(new
|
|
1034
|
-
new
|
|
1033
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_ON_APP_EVENT_TITLE}").appendField(new A(() => this.genNodeOpts_()), "NODE").appendField(
|
|
1034
|
+
new A(() => this.genEventOpts_()),
|
|
1035
1035
|
"EVENT"
|
|
1036
1036
|
), this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_ON_APP_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_ON_APP_EVENT_HELPURL}"), this.initData_();
|
|
1037
1037
|
},
|
|
1038
1038
|
initData_: function() {
|
|
1039
1039
|
if (this.node.id)
|
|
1040
1040
|
return;
|
|
1041
|
-
const t =
|
|
1041
|
+
const t = wt("onEvent")?.[0];
|
|
1042
1042
|
if (!t)
|
|
1043
1043
|
return;
|
|
1044
1044
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1063,13 +1063,13 @@ const gi = {
|
|
|
1063
1063
|
}, 0);
|
|
1064
1064
|
},
|
|
1065
1065
|
genNodeOpts_: function() {
|
|
1066
|
-
return
|
|
1066
|
+
return de("onEvent");
|
|
1067
1067
|
},
|
|
1068
1068
|
genEventOpts_: function() {
|
|
1069
1069
|
return fi(this.node.id);
|
|
1070
1070
|
},
|
|
1071
1071
|
onchange: function(t) {
|
|
1072
|
-
if (t.type ===
|
|
1072
|
+
if (t.type === b.STATE_CHANGE)
|
|
1073
1073
|
this.checkWarning_();
|
|
1074
1074
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1075
1075
|
const e = t;
|
|
@@ -1079,7 +1079,7 @@ const gi = {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
},
|
|
1081
1081
|
onNodeChange_: function(t) {
|
|
1082
|
-
const e =
|
|
1082
|
+
const e = pt(t);
|
|
1083
1083
|
if (!e) {
|
|
1084
1084
|
console.assert(!1);
|
|
1085
1085
|
return;
|
|
@@ -1122,7 +1122,7 @@ const gi = {
|
|
|
1122
1122
|
}), e.length > 0 && F(this, e);
|
|
1123
1123
|
},
|
|
1124
1124
|
checkWarning_: function() {
|
|
1125
|
-
const t =
|
|
1125
|
+
const t = pt(this.node.id);
|
|
1126
1126
|
if (!t) {
|
|
1127
1127
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
1128
1128
|
return;
|
|
@@ -1150,15 +1150,15 @@ s.forBlock.on_app_event_v1 = function(t) {
|
|
|
1150
1150
|
let o = "";
|
|
1151
1151
|
n.event.from === "regular" ? o = `elementEvent@${n.event.key}@${n.node.id}` : n.event.from === "property" ? o = `elementPropChange@${n.node.id}@${n.event.key}` : n.event.from === "custom" ? o = `customPropChange@${n.event.key}` : console.assert(!1);
|
|
1152
1152
|
let i = "";
|
|
1153
|
-
n.event.params.forEach((
|
|
1154
|
-
u !== 0 && (i += ", "), i +=
|
|
1153
|
+
n.event.params.forEach((r, u) => {
|
|
1154
|
+
u !== 0 && (i += ", "), i += r.key;
|
|
1155
1155
|
});
|
|
1156
1156
|
const a = s.statementToCode(n, "HANDLE");
|
|
1157
1157
|
return `__onEventV1__(${e(o)}, function(${i}) {
|
|
1158
1158
|
${a}});
|
|
1159
1159
|
`;
|
|
1160
1160
|
};
|
|
1161
|
-
const
|
|
1161
|
+
const Ii = {
|
|
1162
1162
|
init: function() {
|
|
1163
1163
|
this.event = {
|
|
1164
1164
|
key: "",
|
|
@@ -1166,7 +1166,7 @@ const Ai = {
|
|
|
1166
1166
|
from: "regular",
|
|
1167
1167
|
params: []
|
|
1168
1168
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_TRIGGER_APP_EVENT_TITLE}").appendField(
|
|
1169
|
-
new
|
|
1169
|
+
new A(() => this.genEventOpts_()),
|
|
1170
1170
|
"EVENT"
|
|
1171
1171
|
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_TRIGGER_APP_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_TRIGGER_APP_EVENT_HELPURL}"), this.initData_();
|
|
1172
1172
|
},
|
|
@@ -1194,7 +1194,7 @@ const Ai = {
|
|
|
1194
1194
|
return mi();
|
|
1195
1195
|
},
|
|
1196
1196
|
onchange: function(t) {
|
|
1197
|
-
if (t.type ===
|
|
1197
|
+
if (t.type === b.STATE_CHANGE)
|
|
1198
1198
|
this.checkWarning_();
|
|
1199
1199
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1200
1200
|
const e = t;
|
|
@@ -1243,7 +1243,7 @@ const Ai = {
|
|
|
1243
1243
|
this.setWarningText(null);
|
|
1244
1244
|
}
|
|
1245
1245
|
};
|
|
1246
|
-
d.trigger_app_event_v1 =
|
|
1246
|
+
d.trigger_app_event_v1 = Ii;
|
|
1247
1247
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1248
1248
|
const e = s.quote_, n = t;
|
|
1249
1249
|
let o = "";
|
|
@@ -1295,7 +1295,7 @@ s.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
1295
1295
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.NONE)});
|
|
1296
1296
|
`;
|
|
1297
1297
|
};
|
|
1298
|
-
const
|
|
1298
|
+
const Ai = {
|
|
1299
1299
|
init: function() {
|
|
1300
1300
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1301
1301
|
},
|
|
@@ -1313,9 +1313,9 @@ const Ii = {
|
|
|
1313
1313
|
updateShadow_: function() {
|
|
1314
1314
|
if (this.isInsertionMarker())
|
|
1315
1315
|
return;
|
|
1316
|
-
const t =
|
|
1316
|
+
const t = ut("title");
|
|
1317
1317
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1318
|
-
const e =
|
|
1318
|
+
const e = ut("text");
|
|
1319
1319
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
1320
1320
|
},
|
|
1321
1321
|
ensureBlocks_: function() {
|
|
@@ -1324,7 +1324,7 @@ const Ii = {
|
|
|
1324
1324
|
]);
|
|
1325
1325
|
}
|
|
1326
1326
|
};
|
|
1327
|
-
d.open_confirm_dlg_v1 =
|
|
1327
|
+
d.open_confirm_dlg_v1 = Ai;
|
|
1328
1328
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1329
1329
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1330
1330
|
return `{
|
|
@@ -1350,11 +1350,11 @@ const Oi = {
|
|
|
1350
1350
|
updateShadow_: function() {
|
|
1351
1351
|
if (this.isInsertionMarker())
|
|
1352
1352
|
return;
|
|
1353
|
-
const t =
|
|
1353
|
+
const t = ut("title");
|
|
1354
1354
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1355
|
-
const e =
|
|
1355
|
+
const e = ut("label");
|
|
1356
1356
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
1357
|
-
const n =
|
|
1357
|
+
const n = ut("");
|
|
1358
1358
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
1359
1359
|
},
|
|
1360
1360
|
ensureBlocks_: function() {
|
|
@@ -1415,15 +1415,15 @@ const vi = {
|
|
|
1415
1415
|
from: "regular",
|
|
1416
1416
|
inputs: [],
|
|
1417
1417
|
outputs: []
|
|
1418
|
-
}, this.appendDummyInput("DUMMY").appendField("%{BKY_APP_V1_CALL_APP_METHOD_TITLE}").appendField(new
|
|
1419
|
-
new
|
|
1418
|
+
}, this.appendDummyInput("DUMMY").appendField("%{BKY_APP_V1_CALL_APP_METHOD_TITLE}").appendField(new A(() => this.genNodeOpts_()), "NODE").appendField(
|
|
1419
|
+
new A(() => this.genMethodOpts_()),
|
|
1420
1420
|
"METHOD"
|
|
1421
1421
|
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_CALL_APP_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_CALL_APP_METHOD_HELPURL}"), this.initData_();
|
|
1422
1422
|
},
|
|
1423
1423
|
initData_: function() {
|
|
1424
1424
|
if (this.node.id)
|
|
1425
1425
|
return;
|
|
1426
|
-
const t =
|
|
1426
|
+
const t = wt("callMethod")?.[0];
|
|
1427
1427
|
if (!t)
|
|
1428
1428
|
return;
|
|
1429
1429
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1448,13 +1448,13 @@ const vi = {
|
|
|
1448
1448
|
}, 0);
|
|
1449
1449
|
},
|
|
1450
1450
|
genNodeOpts_: function() {
|
|
1451
|
-
return
|
|
1451
|
+
return de("callMethod");
|
|
1452
1452
|
},
|
|
1453
1453
|
genMethodOpts_: function() {
|
|
1454
1454
|
return Ti(this.node.id);
|
|
1455
1455
|
},
|
|
1456
1456
|
onchange: function(t) {
|
|
1457
|
-
if (t.type ===
|
|
1457
|
+
if (t.type === b.STATE_CHANGE)
|
|
1458
1458
|
this.checkWarning_();
|
|
1459
1459
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1460
1460
|
const e = t;
|
|
@@ -1464,7 +1464,7 @@ const vi = {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
},
|
|
1466
1466
|
onNodeChange_: function(t) {
|
|
1467
|
-
const e =
|
|
1467
|
+
const e = pt(t);
|
|
1468
1468
|
if (!e) {
|
|
1469
1469
|
console.assert(!1);
|
|
1470
1470
|
return;
|
|
@@ -1530,7 +1530,7 @@ const vi = {
|
|
|
1530
1530
|
e.length > 0 && F(this, e);
|
|
1531
1531
|
},
|
|
1532
1532
|
checkWarning_: function() {
|
|
1533
|
-
const t =
|
|
1533
|
+
const t = pt(this.node.id);
|
|
1534
1534
|
if (!t) {
|
|
1535
1535
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
1536
1536
|
return;
|
|
@@ -1580,7 +1580,7 @@ const Ci = {
|
|
|
1580
1580
|
from: "regular",
|
|
1581
1581
|
inputs: []
|
|
1582
1582
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPL_APP_METHOD_TITLE}").appendField(
|
|
1583
|
-
new
|
|
1583
|
+
new A(() => this.genMethodOpts_()),
|
|
1584
1584
|
"METHOD"
|
|
1585
1585
|
), 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_();
|
|
1586
1586
|
},
|
|
@@ -1606,7 +1606,7 @@ const Ci = {
|
|
|
1606
1606
|
return wn();
|
|
1607
1607
|
},
|
|
1608
1608
|
onchange: function(t) {
|
|
1609
|
-
if (t.type ===
|
|
1609
|
+
if (t.type === b.STATE_CHANGE)
|
|
1610
1610
|
this.checkWarning_();
|
|
1611
1611
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1612
1612
|
const e = t;
|
|
@@ -1616,7 +1616,7 @@ const Ci = {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
},
|
|
1618
1618
|
onMethodChange_: function(t) {
|
|
1619
|
-
const e =
|
|
1619
|
+
const e = kt(t);
|
|
1620
1620
|
e ? (this.method.key = e.key, this.method.names = e.names, this.method.from = e.from, this.method.inputs = e.inputs) : (this.method.key = "", this.method.names = [], this.method.from = "regular", this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
1621
1621
|
this.ensureBlocks_();
|
|
1622
1622
|
}, 0);
|
|
@@ -1640,7 +1640,7 @@ const Ci = {
|
|
|
1640
1640
|
F(this, e);
|
|
1641
1641
|
},
|
|
1642
1642
|
checkWarning_: function() {
|
|
1643
|
-
const t =
|
|
1643
|
+
const t = kt(this.method.key);
|
|
1644
1644
|
if (!t) {
|
|
1645
1645
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1646
1646
|
return;
|
|
@@ -1670,10 +1670,10 @@ const yi = {
|
|
|
1670
1670
|
name: "",
|
|
1671
1671
|
type: "string"
|
|
1672
1672
|
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TITLE}").appendField(
|
|
1673
|
-
new
|
|
1673
|
+
new A(() => this.genMethodOpts_()),
|
|
1674
1674
|
"METHOD"
|
|
1675
1675
|
).appendField(
|
|
1676
|
-
new
|
|
1676
|
+
new A(() => this.genOutputOpts_()),
|
|
1677
1677
|
"OUTPUT"
|
|
1678
1678
|
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_HELPURL}"), this.initData_();
|
|
1679
1679
|
},
|
|
@@ -1710,7 +1710,7 @@ const yi = {
|
|
|
1710
1710
|
return Ei(this.method.key);
|
|
1711
1711
|
},
|
|
1712
1712
|
onchange: function(t) {
|
|
1713
|
-
if (t.type ===
|
|
1713
|
+
if (t.type === b.STATE_CHANGE)
|
|
1714
1714
|
this.checkWarning_();
|
|
1715
1715
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1716
1716
|
const e = t;
|
|
@@ -1720,7 +1720,7 @@ const yi = {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
},
|
|
1722
1722
|
onMethodChange_: function(t) {
|
|
1723
|
-
const e =
|
|
1723
|
+
const e = kt(t);
|
|
1724
1724
|
if (!e) {
|
|
1725
1725
|
console.assert(!1);
|
|
1726
1726
|
return;
|
|
@@ -1753,7 +1753,7 @@ const yi = {
|
|
|
1753
1753
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
1754
1754
|
},
|
|
1755
1755
|
checkWarning_: function() {
|
|
1756
|
-
const t =
|
|
1756
|
+
const t = kt(this.method.key);
|
|
1757
1757
|
if (!t) {
|
|
1758
1758
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1759
1759
|
return;
|
|
@@ -1829,7 +1829,7 @@ const ki = {
|
|
|
1829
1829
|
}, this.page = {
|
|
1830
1830
|
id: "",
|
|
1831
1831
|
name: ""
|
|
1832
|
-
}, this.appendDummyInput().appendField("%{BKY_APP_V1_NAVIGATE_TO_TITLE}").appendField(new
|
|
1832
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_NAVIGATE_TO_TITLE}").appendField(new A(() => this.genAppOpts_()), "APP").appendField(new A(() => this.genPageOpts_()), "PAGE"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_NAVIGATE_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_NAVIGATE_HELPURL}"), this.initData_();
|
|
1833
1833
|
},
|
|
1834
1834
|
initData_: function() {
|
|
1835
1835
|
if (this.app.id)
|
|
@@ -1865,7 +1865,7 @@ const ki = {
|
|
|
1865
1865
|
return pi(this.app.id);
|
|
1866
1866
|
},
|
|
1867
1867
|
onchange: function(t) {
|
|
1868
|
-
if (t.type ===
|
|
1868
|
+
if (t.type === b.STATE_CHANGE)
|
|
1869
1869
|
this.checkWarning_();
|
|
1870
1870
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1871
1871
|
const e = t;
|
|
@@ -1918,7 +1918,7 @@ const Ni = {
|
|
|
1918
1918
|
this.comp = {
|
|
1919
1919
|
id: void 0,
|
|
1920
1920
|
name: ""
|
|
1921
|
-
}, this.appendDummyInput().appendField("%{BKY_APP_V1_SELECT_COMP_TITLE}").appendField(new
|
|
1921
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_SELECT_COMP_TITLE}").appendField(new A(() => this.genCompOpts_()), "COMP"), this.setOutput(!0, "Comp"), this.setStyle("property_blocks"), this.setTooltip("%{BKY_APP_V1_SELECT_COMP_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SELECT_COMP_HELPURL}"), this.initData_();
|
|
1922
1922
|
},
|
|
1923
1923
|
initData_: function() {
|
|
1924
1924
|
if (this.comp.id !== void 0)
|
|
@@ -1944,7 +1944,7 @@ const Ni = {
|
|
|
1944
1944
|
return hi();
|
|
1945
1945
|
},
|
|
1946
1946
|
onchange: function(t) {
|
|
1947
|
-
if (t.type ===
|
|
1947
|
+
if (t.type === b.STATE_CHANGE)
|
|
1948
1948
|
this.checkWarning_();
|
|
1949
1949
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
1950
1950
|
const e = t;
|
|
@@ -1988,18 +1988,18 @@ const Li = {
|
|
|
1988
1988
|
key: "",
|
|
1989
1989
|
names: [],
|
|
1990
1990
|
from: "regular"
|
|
1991
|
-
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_PROP_TITLE}").appendField(new
|
|
1991
|
+
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_PROP_TITLE}").appendField(new A(() => this.genNodeOpts_()), "NODE").appendField(new A(() => 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_();
|
|
1992
1992
|
},
|
|
1993
1993
|
initData_: function() {
|
|
1994
1994
|
if (this.node.id)
|
|
1995
1995
|
return;
|
|
1996
|
-
const t =
|
|
1996
|
+
const t = wt("getProp")?.[0];
|
|
1997
1997
|
if (!t)
|
|
1998
1998
|
return;
|
|
1999
1999
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2000
2000
|
const e = this.getField("NODE");
|
|
2001
2001
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2002
|
-
const n =
|
|
2002
|
+
const n = Ut(this.node.id, "read")?.[0];
|
|
2003
2003
|
if (!n)
|
|
2004
2004
|
return;
|
|
2005
2005
|
this.prop.key = n.key, this.prop.names = n.names, this.prop.from = n.meta.from;
|
|
@@ -2018,13 +2018,13 @@ const Li = {
|
|
|
2018
2018
|
}, 0);
|
|
2019
2019
|
},
|
|
2020
2020
|
genNodeOpts_: function() {
|
|
2021
|
-
return
|
|
2021
|
+
return de("getProp");
|
|
2022
2022
|
},
|
|
2023
2023
|
genPropOpts_: function() {
|
|
2024
2024
|
return $n(this.node.id, "read");
|
|
2025
2025
|
},
|
|
2026
2026
|
onchange: function(t) {
|
|
2027
|
-
if (t.type ===
|
|
2027
|
+
if (t.type === b.STATE_CHANGE)
|
|
2028
2028
|
this.checkWarning_();
|
|
2029
2029
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
2030
2030
|
const e = t;
|
|
@@ -2034,7 +2034,7 @@ const Li = {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
},
|
|
2036
2036
|
onNodeChange_: function(t) {
|
|
2037
|
-
const e =
|
|
2037
|
+
const e = pt(t);
|
|
2038
2038
|
if (!e) {
|
|
2039
2039
|
console.assert(!1);
|
|
2040
2040
|
return;
|
|
@@ -2043,7 +2043,7 @@ const Li = {
|
|
|
2043
2043
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2044
2044
|
const o = this.getField("PROP");
|
|
2045
2045
|
if (o.getOptions(!1), n || !Et(this.node.id, this.prop.key)) {
|
|
2046
|
-
const i =
|
|
2046
|
+
const i = Ut(this.node.id, "read")?.[0];
|
|
2047
2047
|
o.setValue(i?.key ?? "");
|
|
2048
2048
|
}
|
|
2049
2049
|
this.onPropChange_(o.getValue());
|
|
@@ -2053,7 +2053,7 @@ const Li = {
|
|
|
2053
2053
|
e ? (this.prop.key = e.key, this.prop.names = e.names, this.prop.from = e.meta.from) : (this.prop.key = "", this.prop.names = [], this.prop.from = "regular");
|
|
2054
2054
|
},
|
|
2055
2055
|
checkWarning_: function() {
|
|
2056
|
-
const t =
|
|
2056
|
+
const t = pt(this.node.id);
|
|
2057
2057
|
if (!t) {
|
|
2058
2058
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
2059
2059
|
return;
|
|
@@ -2089,18 +2089,18 @@ const Si = {
|
|
|
2089
2089
|
key: "",
|
|
2090
2090
|
names: [],
|
|
2091
2091
|
from: "regular"
|
|
2092
|
-
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_PROP_TITLE}").appendField(new
|
|
2092
|
+
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_PROP_TITLE}").appendField(new A(() => this.genNodeOpts_()), "NODE").appendField(new A(() => 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_();
|
|
2093
2093
|
},
|
|
2094
2094
|
initData_: function() {
|
|
2095
2095
|
if (this.node.id)
|
|
2096
2096
|
return;
|
|
2097
|
-
const t =
|
|
2097
|
+
const t = wt("setProp")?.[0];
|
|
2098
2098
|
if (!t)
|
|
2099
2099
|
return;
|
|
2100
2100
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2101
2101
|
const e = this.getField("NODE");
|
|
2102
2102
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2103
|
-
const n =
|
|
2103
|
+
const n = Ut(this.node.id, "write")?.[0];
|
|
2104
2104
|
if (!n)
|
|
2105
2105
|
return;
|
|
2106
2106
|
this.prop.key = n.key, this.prop.names = n.names, this.prop.from = n.meta.from;
|
|
@@ -2119,13 +2119,13 @@ const Si = {
|
|
|
2119
2119
|
}, 0);
|
|
2120
2120
|
},
|
|
2121
2121
|
genNodeOpts_: function() {
|
|
2122
|
-
return
|
|
2122
|
+
return de("setProp");
|
|
2123
2123
|
},
|
|
2124
2124
|
genPropOpts_: function() {
|
|
2125
2125
|
return $n(this.node.id, "write");
|
|
2126
2126
|
},
|
|
2127
2127
|
onchange: function(t) {
|
|
2128
|
-
if (t.type ===
|
|
2128
|
+
if (t.type === b.STATE_CHANGE)
|
|
2129
2129
|
this.checkWarning_();
|
|
2130
2130
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
2131
2131
|
const e = t;
|
|
@@ -2135,7 +2135,7 @@ const Si = {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
},
|
|
2137
2137
|
onNodeChange_: function(t) {
|
|
2138
|
-
const e =
|
|
2138
|
+
const e = pt(t);
|
|
2139
2139
|
if (!e) {
|
|
2140
2140
|
console.assert(!1);
|
|
2141
2141
|
return;
|
|
@@ -2144,7 +2144,7 @@ const Si = {
|
|
|
2144
2144
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2145
2145
|
const o = this.getField("PROP");
|
|
2146
2146
|
if (o.getOptions(!1), n || !Et(this.node.id, this.prop.key)) {
|
|
2147
|
-
const i =
|
|
2147
|
+
const i = Ut(this.node.id, "write")?.[0];
|
|
2148
2148
|
o.setValue(i?.key ?? "");
|
|
2149
2149
|
}
|
|
2150
2150
|
this.onPropChange_(o.getValue());
|
|
@@ -2174,7 +2174,7 @@ const Si = {
|
|
|
2174
2174
|
console.assert(!1);
|
|
2175
2175
|
},
|
|
2176
2176
|
checkWarning_: function() {
|
|
2177
|
-
const t =
|
|
2177
|
+
const t = pt(this.node.id);
|
|
2178
2178
|
if (!t) {
|
|
2179
2179
|
this.setWarningText(p("WARN_NODE_NOT_FOUND"));
|
|
2180
2180
|
return;
|
|
@@ -2210,7 +2210,7 @@ const Bi = {
|
|
|
2210
2210
|
name: "",
|
|
2211
2211
|
type: "string"
|
|
2212
2212
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_GET_APP_STATE_TITLE}").appendField(
|
|
2213
|
-
new
|
|
2213
|
+
new A(() => this.genStateOpts_()),
|
|
2214
2214
|
"STATE"
|
|
2215
2215
|
), this.setOutput(!0, null), this.setStyle("state_blocks"), this.setTooltip("%{BKY_APP_V1_GET_APP_STATE_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_GET_APP_STATE_HELPURL}"), this.initData_();
|
|
2216
2216
|
},
|
|
@@ -2238,7 +2238,7 @@ const Bi = {
|
|
|
2238
2238
|
return Hn();
|
|
2239
2239
|
},
|
|
2240
2240
|
onchange: function(t) {
|
|
2241
|
-
if (t.type ===
|
|
2241
|
+
if (t.type === b.STATE_CHANGE)
|
|
2242
2242
|
this.checkWarning_();
|
|
2243
2243
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
2244
2244
|
const e = t;
|
|
@@ -2246,11 +2246,11 @@ const Bi = {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
},
|
|
2248
2248
|
onStateChange_: function(t) {
|
|
2249
|
-
const e =
|
|
2249
|
+
const e = te(t);
|
|
2250
2250
|
e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string");
|
|
2251
2251
|
},
|
|
2252
2252
|
checkWarning_: function() {
|
|
2253
|
-
const t =
|
|
2253
|
+
const t = te(this.state.id);
|
|
2254
2254
|
if (!t) {
|
|
2255
2255
|
this.setWarningText(p("WARN_STATE_NOT_FOUND"));
|
|
2256
2256
|
return;
|
|
@@ -2274,7 +2274,7 @@ const bi = {
|
|
|
2274
2274
|
name: "",
|
|
2275
2275
|
type: "string"
|
|
2276
2276
|
}, this.appendValueInput("VALUE").appendField("%{BKY_APP_V1_SET_APP_STATE_TITLE}").appendField(
|
|
2277
|
-
new
|
|
2277
|
+
new A(() => this.genStateOpts_()),
|
|
2278
2278
|
"STATE"
|
|
2279
2279
|
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("state_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_STATE_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_STATE_HELPURL}"), this.initData_(), this.isInFlyout && this.updateShadow_();
|
|
2280
2280
|
},
|
|
@@ -2306,7 +2306,7 @@ const bi = {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
},
|
|
2308
2308
|
onStateChange_: function(t) {
|
|
2309
|
-
const e =
|
|
2309
|
+
const e = te(t);
|
|
2310
2310
|
e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string"), this.updateShadow_();
|
|
2311
2311
|
},
|
|
2312
2312
|
updateShadow_: function() {
|
|
@@ -2319,7 +2319,7 @@ const bi = {
|
|
|
2319
2319
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
2320
2320
|
},
|
|
2321
2321
|
checkWarning_: function() {
|
|
2322
|
-
const t =
|
|
2322
|
+
const t = te(this.state.id);
|
|
2323
2323
|
if (!t) {
|
|
2324
2324
|
this.setWarningText(p("WARN_STATE_NOT_FOUND"));
|
|
2325
2325
|
return;
|
|
@@ -3182,18 +3182,18 @@ s.forBlock.on_flow_state_event_v1 = function() {
|
|
|
3182
3182
|
return `__onFlowStateEventV1__();
|
|
3183
3183
|
`;
|
|
3184
3184
|
};
|
|
3185
|
-
function
|
|
3185
|
+
function Vt(t) {
|
|
3186
3186
|
const e = f.compute.spaces.find((n) => n.id === t);
|
|
3187
3187
|
return e ? e.funcs : [];
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function Ct(t, e) {
|
|
3190
3190
|
const n = f.compute.spaces.find((o) => o.id === t);
|
|
3191
3191
|
if (n)
|
|
3192
3192
|
return n.funcs.find((o) => o.id === e);
|
|
3193
3193
|
}
|
|
3194
3194
|
function Gn(t) {
|
|
3195
3195
|
const e = [];
|
|
3196
|
-
return
|
|
3196
|
+
return Vt(t).forEach(({ id: o, name: i }) => {
|
|
3197
3197
|
e.push([i, o]);
|
|
3198
3198
|
}), k(e);
|
|
3199
3199
|
}
|
|
@@ -3210,18 +3210,18 @@ function Vi() {
|
|
|
3210
3210
|
t.push([o, n]);
|
|
3211
3211
|
}), k(t);
|
|
3212
3212
|
}
|
|
3213
|
-
function
|
|
3213
|
+
function Kt(t) {
|
|
3214
3214
|
const e = [];
|
|
3215
3215
|
return f.compute.spaces.forEach((n) => {
|
|
3216
3216
|
t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
|
|
3217
3217
|
}), e;
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function ee(t) {
|
|
3220
3220
|
return f.compute.spaces.find((e) => e.id === t);
|
|
3221
3221
|
}
|
|
3222
3222
|
function Wn(t) {
|
|
3223
3223
|
const e = [];
|
|
3224
|
-
return
|
|
3224
|
+
return Kt(t).forEach(({ id: o, name: i }) => {
|
|
3225
3225
|
e.push([i, o]);
|
|
3226
3226
|
}), k(e);
|
|
3227
3227
|
}
|
|
@@ -3236,20 +3236,20 @@ const xi = {
|
|
|
3236
3236
|
inputs: [],
|
|
3237
3237
|
outputs: []
|
|
3238
3238
|
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(
|
|
3239
|
-
new
|
|
3239
|
+
new A(() => this.genSpaceOpts_()),
|
|
3240
3240
|
"SPACE"
|
|
3241
|
-
).appendField(new
|
|
3241
|
+
).appendField(new A(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_HELPURL}"), this.initData_();
|
|
3242
3242
|
},
|
|
3243
3243
|
initData_: function() {
|
|
3244
3244
|
if (this.space.id)
|
|
3245
3245
|
return;
|
|
3246
|
-
const t =
|
|
3246
|
+
const t = Kt("func")?.[0];
|
|
3247
3247
|
if (!t)
|
|
3248
3248
|
return;
|
|
3249
3249
|
this.space.id = t.id, this.space.name = t.name;
|
|
3250
3250
|
const e = this.getField("SPACE");
|
|
3251
3251
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3252
|
-
const n =
|
|
3252
|
+
const n = Vt(this.space.id)?.[0];
|
|
3253
3253
|
if (!n)
|
|
3254
3254
|
return;
|
|
3255
3255
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3274,7 +3274,7 @@ const xi = {
|
|
|
3274
3274
|
return Gn(this.space.id);
|
|
3275
3275
|
},
|
|
3276
3276
|
onchange: function(t) {
|
|
3277
|
-
if (t.type ===
|
|
3277
|
+
if (t.type === b.STATE_CHANGE)
|
|
3278
3278
|
this.checkWarning_();
|
|
3279
3279
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
3280
3280
|
const e = t;
|
|
@@ -3284,19 +3284,19 @@ const xi = {
|
|
|
3284
3284
|
}
|
|
3285
3285
|
},
|
|
3286
3286
|
onSpaceChange_: function(t) {
|
|
3287
|
-
const e =
|
|
3287
|
+
const e = ee(t);
|
|
3288
3288
|
if (!e) {
|
|
3289
3289
|
console.assert(!1);
|
|
3290
3290
|
return;
|
|
3291
3291
|
}
|
|
3292
3292
|
let n = !1;
|
|
3293
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3294
|
-
const i =
|
|
3293
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ct(this.space.id, this.func.id)) {
|
|
3294
|
+
const i = Vt(this.space.id)?.[0];
|
|
3295
3295
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3296
3296
|
}
|
|
3297
3297
|
},
|
|
3298
3298
|
onFuncChange_: function(t) {
|
|
3299
|
-
const e =
|
|
3299
|
+
const e = Ct(this.space.id, t);
|
|
3300
3300
|
if (!e) {
|
|
3301
3301
|
console.assert(!1);
|
|
3302
3302
|
return;
|
|
@@ -3350,13 +3350,13 @@ const xi = {
|
|
|
3350
3350
|
F(this, t);
|
|
3351
3351
|
},
|
|
3352
3352
|
checkWarning_: function() {
|
|
3353
|
-
const t =
|
|
3353
|
+
const t = ee(this.space.id);
|
|
3354
3354
|
if (!t) {
|
|
3355
3355
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
3356
3356
|
return;
|
|
3357
3357
|
}
|
|
3358
3358
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3359
|
-
const e =
|
|
3359
|
+
const e = Ct(this.space.id, this.func.id);
|
|
3360
3360
|
if (!e) {
|
|
3361
3361
|
this.setWarningText(p("WARN_FUNC_NOT_FOUND"));
|
|
3362
3362
|
return;
|
|
@@ -3375,27 +3375,27 @@ const xi = {
|
|
|
3375
3375
|
d.call_func_v1 = xi;
|
|
3376
3376
|
s.forBlock.call_func_v1 = function(t) {
|
|
3377
3377
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3378
|
-
let
|
|
3379
|
-
|
|
3380
|
-
`, o.func.inputs.forEach(({ id:
|
|
3378
|
+
let l = "";
|
|
3379
|
+
l += `${e}var __inputs__ = {
|
|
3380
|
+
`, o.func.inputs.forEach(({ id: I }, m) => {
|
|
3381
3381
|
const y = s.valueToCode(
|
|
3382
3382
|
o,
|
|
3383
3383
|
"INPUT" + m,
|
|
3384
3384
|
c.ATOMIC
|
|
3385
3385
|
);
|
|
3386
|
-
|
|
3386
|
+
l += `${e}${e}${n(I)}: ${y},
|
|
3387
3387
|
`;
|
|
3388
|
-
}),
|
|
3389
|
-
const
|
|
3388
|
+
}), l += `${e}};`;
|
|
3389
|
+
const r = n(o.space.name + "/" + o.func.name);
|
|
3390
3390
|
let u = "";
|
|
3391
|
-
o.func.outputs.forEach(({ id:
|
|
3392
|
-
u += `${e}var __output_${
|
|
3391
|
+
o.func.outputs.forEach(({ id: I }) => {
|
|
3392
|
+
u += `${e}var __output_${I}__ = __result__[${n(I)}];
|
|
3393
3393
|
`;
|
|
3394
3394
|
});
|
|
3395
3395
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
3396
3396
|
return `{
|
|
3397
|
-
${
|
|
3398
|
-
${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${
|
|
3397
|
+
${l}
|
|
3398
|
+
${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${r});
|
|
3399
3399
|
${u}${_}}
|
|
3400
3400
|
`;
|
|
3401
3401
|
};
|
|
@@ -3410,20 +3410,20 @@ const Fi = {
|
|
|
3410
3410
|
inputs: [],
|
|
3411
3411
|
outputs: []
|
|
3412
3412
|
}, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(
|
|
3413
|
-
new
|
|
3413
|
+
new A(() => this.genSpaceOpts_()),
|
|
3414
3414
|
"SPACE"
|
|
3415
|
-
).appendField(new
|
|
3415
|
+
).appendField(new A(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_HELPURL}"), this.initData_();
|
|
3416
3416
|
},
|
|
3417
3417
|
initData_: function() {
|
|
3418
3418
|
if (this.space.id)
|
|
3419
3419
|
return;
|
|
3420
|
-
const t =
|
|
3420
|
+
const t = Kt("func")?.[0];
|
|
3421
3421
|
if (!t)
|
|
3422
3422
|
return;
|
|
3423
3423
|
this.space.id = t.id, this.space.name = t.name;
|
|
3424
3424
|
const e = this.getField("SPACE");
|
|
3425
3425
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3426
|
-
const n =
|
|
3426
|
+
const n = Vt(this.space.id)?.[0];
|
|
3427
3427
|
if (!n)
|
|
3428
3428
|
return;
|
|
3429
3429
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3448,7 +3448,7 @@ const Fi = {
|
|
|
3448
3448
|
return Gn(this.space.id);
|
|
3449
3449
|
},
|
|
3450
3450
|
onchange: function(t) {
|
|
3451
|
-
if (t.type ===
|
|
3451
|
+
if (t.type === b.STATE_CHANGE)
|
|
3452
3452
|
this.checkWarning_();
|
|
3453
3453
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
3454
3454
|
const e = t;
|
|
@@ -3458,19 +3458,19 @@ const Fi = {
|
|
|
3458
3458
|
}
|
|
3459
3459
|
},
|
|
3460
3460
|
onSpaceChange_: function(t) {
|
|
3461
|
-
const e =
|
|
3461
|
+
const e = ee(t);
|
|
3462
3462
|
if (!e) {
|
|
3463
3463
|
console.assert(!1);
|
|
3464
3464
|
return;
|
|
3465
3465
|
}
|
|
3466
3466
|
let n = !1;
|
|
3467
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3468
|
-
const i =
|
|
3467
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ct(this.space.id, this.func.id)) {
|
|
3468
|
+
const i = Vt(this.space.id)?.[0];
|
|
3469
3469
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3470
3470
|
}
|
|
3471
3471
|
},
|
|
3472
3472
|
onFuncChange_: function(t) {
|
|
3473
|
-
const e =
|
|
3473
|
+
const e = Ct(this.space.id, t);
|
|
3474
3474
|
if (!e) {
|
|
3475
3475
|
console.assert(!1);
|
|
3476
3476
|
return;
|
|
@@ -3524,13 +3524,13 @@ const Fi = {
|
|
|
3524
3524
|
F(this, t);
|
|
3525
3525
|
},
|
|
3526
3526
|
checkWarning_: function() {
|
|
3527
|
-
const t =
|
|
3527
|
+
const t = ee(this.space.id);
|
|
3528
3528
|
if (!t) {
|
|
3529
3529
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
3530
3530
|
return;
|
|
3531
3531
|
}
|
|
3532
3532
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3533
|
-
const e =
|
|
3533
|
+
const e = Ct(this.space.id, this.func.id);
|
|
3534
3534
|
if (!e) {
|
|
3535
3535
|
this.setWarningText(p("WARN_FUNC_NOT_FOUND"));
|
|
3536
3536
|
return;
|
|
@@ -3549,29 +3549,29 @@ const Fi = {
|
|
|
3549
3549
|
d.call_func_internal_v1 = Fi;
|
|
3550
3550
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3551
3551
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3552
|
-
let
|
|
3552
|
+
let l = `${e}var __inputs__ = {
|
|
3553
3553
|
`;
|
|
3554
|
-
o.func.inputs.forEach(({ id:
|
|
3554
|
+
o.func.inputs.forEach(({ id: I }, m) => {
|
|
3555
3555
|
const y = s.valueToCode(
|
|
3556
3556
|
o,
|
|
3557
3557
|
"INPUT" + m,
|
|
3558
3558
|
c.ATOMIC
|
|
3559
3559
|
);
|
|
3560
|
-
|
|
3560
|
+
l += `${e}${e}${n(I)}: ${y},
|
|
3561
3561
|
`;
|
|
3562
|
-
}),
|
|
3563
|
-
const
|
|
3562
|
+
}), l += `${e}};`;
|
|
3563
|
+
const r = o.space.name + "/" + o.func.name;
|
|
3564
3564
|
let u = "";
|
|
3565
|
-
o.func.outputs.forEach(({ id:
|
|
3566
|
-
u += `${e}var __output_${
|
|
3565
|
+
o.func.outputs.forEach(({ id: I }) => {
|
|
3566
|
+
u += `${e}var __output_${I}__ = __result__.outputs[${n(I)}];
|
|
3567
3567
|
`;
|
|
3568
3568
|
});
|
|
3569
3569
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
3570
3570
|
return `{
|
|
3571
|
-
${
|
|
3571
|
+
${l}
|
|
3572
3572
|
${e}var __result__ = __callFuncInternalV1__(${i}, ${a}, __inputs__);
|
|
3573
3573
|
${e}if (!__result__.success) {
|
|
3574
|
-
${e}${e}throw 'call func<${
|
|
3574
|
+
${e}${e}throw 'call func<${r}> failed, reason: ' + __result__.message;
|
|
3575
3575
|
${e}}
|
|
3576
3576
|
${u}${_}}
|
|
3577
3577
|
`;
|
|
@@ -3635,8 +3635,8 @@ d.func_entry_v1 = Yi;
|
|
|
3635
3635
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3636
3636
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3637
3637
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
3638
|
-
const { id:
|
|
3639
|
-
o.push(`__input_${
|
|
3638
|
+
const { id: l } = e.func.inputs[a];
|
|
3639
|
+
o.push(`__input_${l}__`);
|
|
3640
3640
|
}
|
|
3641
3641
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3642
3642
|
${n}}`;
|
|
@@ -3648,7 +3648,7 @@ const wi = {
|
|
|
3648
3648
|
name: "",
|
|
3649
3649
|
type: "string"
|
|
3650
3650
|
}, this.appendValueInput("VALUE").appendField("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TITLE}").appendField(
|
|
3651
|
-
new
|
|
3651
|
+
new A(() => this.genOutputOpts_()),
|
|
3652
3652
|
"OUTPUT"
|
|
3653
3653
|
), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_HELPURL}"), this.initData_();
|
|
3654
3654
|
},
|
|
@@ -3672,7 +3672,7 @@ const wi = {
|
|
|
3672
3672
|
return Vi();
|
|
3673
3673
|
},
|
|
3674
3674
|
onchange: function(t) {
|
|
3675
|
-
if (t.type ===
|
|
3675
|
+
if (t.type === b.STATE_CHANGE)
|
|
3676
3676
|
this.checkWarning_();
|
|
3677
3677
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
3678
3678
|
const e = t;
|
|
@@ -3794,17 +3794,17 @@ function q() {
|
|
|
3794
3794
|
e.tables.length > 0 && t.push(e);
|
|
3795
3795
|
}), t;
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3797
|
+
function ht(t) {
|
|
3798
3798
|
const { spaces: e } = f.data;
|
|
3799
3799
|
return e.find((n) => n.id === t);
|
|
3800
3800
|
}
|
|
3801
|
-
function
|
|
3801
|
+
function fe() {
|
|
3802
3802
|
const t = [];
|
|
3803
3803
|
return q().forEach(({ id: n, name: o }) => {
|
|
3804
3804
|
t.push([o, n]);
|
|
3805
3805
|
}), k(t);
|
|
3806
3806
|
}
|
|
3807
|
-
function
|
|
3807
|
+
function $(t) {
|
|
3808
3808
|
const { spaces: e } = f.data, n = e.find((o) => o.id === t);
|
|
3809
3809
|
return n ? n.tables : [];
|
|
3810
3810
|
}
|
|
@@ -3813,13 +3813,13 @@ function j(t, e) {
|
|
|
3813
3813
|
if (o)
|
|
3814
3814
|
return o.tables.find((i) => i.id === e);
|
|
3815
3815
|
}
|
|
3816
|
-
function
|
|
3816
|
+
function me(t) {
|
|
3817
3817
|
const e = [];
|
|
3818
|
-
return
|
|
3818
|
+
return $(t).forEach(({ id: o, name: i }) => {
|
|
3819
3819
|
e.push([i, o]);
|
|
3820
3820
|
}), k(e);
|
|
3821
3821
|
}
|
|
3822
|
-
function
|
|
3822
|
+
function ne(t, e) {
|
|
3823
3823
|
const { spaces: n } = f.data, o = n.find((a) => a.id === t);
|
|
3824
3824
|
if (!o)
|
|
3825
3825
|
return [];
|
|
@@ -3827,16 +3827,16 @@ function te(t, e) {
|
|
|
3827
3827
|
return i ? i.columns : [];
|
|
3828
3828
|
}
|
|
3829
3829
|
function be(t, e, n) {
|
|
3830
|
-
const { spaces: o } = f.data, i = o.find((
|
|
3830
|
+
const { spaces: o } = f.data, i = o.find((l) => l.id === t);
|
|
3831
3831
|
if (!i)
|
|
3832
3832
|
return;
|
|
3833
|
-
const a = i.tables.find((
|
|
3833
|
+
const a = i.tables.find((l) => l.id === e);
|
|
3834
3834
|
if (a)
|
|
3835
|
-
return a.columns.find((
|
|
3835
|
+
return a.columns.find((l) => l.id === n);
|
|
3836
3836
|
}
|
|
3837
3837
|
function Ki(t, e) {
|
|
3838
3838
|
const n = [];
|
|
3839
|
-
return
|
|
3839
|
+
return ne(t, e).forEach(({ id: i, name: a }) => {
|
|
3840
3840
|
n.push([a, i]);
|
|
3841
3841
|
}), k(n);
|
|
3842
3842
|
}
|
|
@@ -3847,22 +3847,22 @@ function $i(t) {
|
|
|
3847
3847
|
let n, o;
|
|
3848
3848
|
const i = q()?.[0];
|
|
3849
3849
|
if (i) {
|
|
3850
|
-
const
|
|
3851
|
-
if (
|
|
3850
|
+
const r = $(i.id)?.[0];
|
|
3851
|
+
if (r) {
|
|
3852
3852
|
n = {
|
|
3853
3853
|
space: {
|
|
3854
3854
|
id: i.id,
|
|
3855
3855
|
name: i.name
|
|
3856
3856
|
},
|
|
3857
3857
|
table: {
|
|
3858
|
-
id:
|
|
3859
|
-
name:
|
|
3860
|
-
columns:
|
|
3858
|
+
id: r.id,
|
|
3859
|
+
name: r.name,
|
|
3860
|
+
columns: r.columns
|
|
3861
3861
|
},
|
|
3862
|
-
itemCount:
|
|
3862
|
+
itemCount: r.columns.length
|
|
3863
3863
|
}, o = {};
|
|
3864
|
-
for (let u = 0; u <
|
|
3865
|
-
const _ =
|
|
3864
|
+
for (let u = 0; u < r.columns.length; u++) {
|
|
3865
|
+
const _ = r.columns[u];
|
|
3866
3866
|
o["COLUMN" + u] = _.id;
|
|
3867
3867
|
}
|
|
3868
3868
|
}
|
|
@@ -3871,8 +3871,8 @@ function $i(t) {
|
|
|
3871
3871
|
type: "update_column_v1",
|
|
3872
3872
|
extraState: n,
|
|
3873
3873
|
fields: o
|
|
3874
|
-
},
|
|
3875
|
-
e.connect(
|
|
3874
|
+
}, l = K.blocks.append(a, t.workspace);
|
|
3875
|
+
e.connect(l.outputConnection);
|
|
3876
3876
|
}
|
|
3877
3877
|
function Hi(t) {
|
|
3878
3878
|
const e = t.getInput("HANDLE").connection;
|
|
@@ -3895,7 +3895,7 @@ function Hi(t) {
|
|
|
3895
3895
|
}
|
|
3896
3896
|
}
|
|
3897
3897
|
}
|
|
3898
|
-
}, o =
|
|
3898
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
3899
3899
|
e.connect(o.previousConnection);
|
|
3900
3900
|
}
|
|
3901
3901
|
const Gi = {
|
|
@@ -3951,16 +3951,16 @@ const Wi = {
|
|
|
3951
3951
|
type: "",
|
|
3952
3952
|
extend: ""
|
|
3953
3953
|
}, this.appendValueInput("VALUE").appendField(
|
|
3954
|
-
new
|
|
3954
|
+
new A(() => this.genSpaceOpts_()),
|
|
3955
3955
|
"SPACE"
|
|
3956
3956
|
).appendField(
|
|
3957
|
-
new
|
|
3957
|
+
new A(() => this.genTableOpts_()),
|
|
3958
3958
|
"TABLE"
|
|
3959
3959
|
).appendField(
|
|
3960
|
-
new
|
|
3960
|
+
new A(() => this.genColumnOpts_()),
|
|
3961
3961
|
"COLUMN"
|
|
3962
3962
|
).appendField(
|
|
3963
|
-
new
|
|
3963
|
+
new A([
|
|
3964
3964
|
["=", "EQ"],
|
|
3965
3965
|
["≠", "NEQ"],
|
|
3966
3966
|
["<", "LT"],
|
|
@@ -3980,11 +3980,11 @@ const Wi = {
|
|
|
3980
3980
|
if (!t)
|
|
3981
3981
|
return;
|
|
3982
3982
|
this.space.id = t.id, this.space.name = t.name;
|
|
3983
|
-
const e =
|
|
3983
|
+
const e = $(this.space.id)?.[0];
|
|
3984
3984
|
if (!e)
|
|
3985
3985
|
return;
|
|
3986
3986
|
this.table.id = e.id, this.table.name = e.name;
|
|
3987
|
-
const n =
|
|
3987
|
+
const n = ne(this.space.id, this.table.id)?.[0];
|
|
3988
3988
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
3989
3989
|
},
|
|
3990
3990
|
saveExtraState: function() {
|
|
@@ -4000,16 +4000,16 @@ const Wi = {
|
|
|
4000
4000
|
}, 0);
|
|
4001
4001
|
},
|
|
4002
4002
|
genSpaceOpts_: function() {
|
|
4003
|
-
return
|
|
4003
|
+
return fe();
|
|
4004
4004
|
},
|
|
4005
4005
|
genTableOpts_: function() {
|
|
4006
|
-
return
|
|
4006
|
+
return me(this.space.id);
|
|
4007
4007
|
},
|
|
4008
4008
|
genColumnOpts_: function() {
|
|
4009
4009
|
return Ki(this.space.id, this.table.id);
|
|
4010
4010
|
},
|
|
4011
4011
|
onchange: function(t) {
|
|
4012
|
-
if (t.type ===
|
|
4012
|
+
if (t.type === b.STATE_CHANGE)
|
|
4013
4013
|
this.checkWarning_();
|
|
4014
4014
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
4015
4015
|
const e = t;
|
|
@@ -4019,14 +4019,14 @@ const Wi = {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
},
|
|
4021
4021
|
onSpaceChange_: function(t) {
|
|
4022
|
-
const e =
|
|
4022
|
+
const e = ht(t);
|
|
4023
4023
|
if (!e) {
|
|
4024
4024
|
console.assert(!1);
|
|
4025
4025
|
return;
|
|
4026
4026
|
}
|
|
4027
4027
|
const n = e.id !== this.space.id;
|
|
4028
4028
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4029
|
-
const o =
|
|
4029
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4030
4030
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4031
4031
|
}
|
|
4032
4032
|
},
|
|
@@ -4038,7 +4038,7 @@ const Wi = {
|
|
|
4038
4038
|
}
|
|
4039
4039
|
const n = e.id !== this.table.id;
|
|
4040
4040
|
if (this.table.id = e.id, this.table.name = e.name, n || !be(this.space.id, this.table.id, this.column.id)) {
|
|
4041
|
-
const o =
|
|
4041
|
+
const o = ne(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4042
4042
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4043
4043
|
}
|
|
4044
4044
|
},
|
|
@@ -4070,7 +4070,7 @@ const Wi = {
|
|
|
4070
4070
|
this.getInput("VALUE").connection.setCheck(t);
|
|
4071
4071
|
},
|
|
4072
4072
|
checkWarning_: function() {
|
|
4073
|
-
const t =
|
|
4073
|
+
const t = ht(this.space.id);
|
|
4074
4074
|
if (!t) {
|
|
4075
4075
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4076
4076
|
return;
|
|
@@ -4100,7 +4100,7 @@ const Wi = {
|
|
|
4100
4100
|
};
|
|
4101
4101
|
d.cond_atomic_v1 = Wi;
|
|
4102
4102
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4103
|
-
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null,
|
|
4103
|
+
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4104
4104
|
EQ: "=",
|
|
4105
4105
|
NEQ: "!=",
|
|
4106
4106
|
LT: "<",
|
|
@@ -4108,7 +4108,7 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4108
4108
|
GT: ">",
|
|
4109
4109
|
GTE: ">="
|
|
4110
4110
|
}[n.getFieldValue("OP")];
|
|
4111
|
-
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(
|
|
4111
|
+
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4112
4112
|
};
|
|
4113
4113
|
const ji = {
|
|
4114
4114
|
init: function() {
|
|
@@ -4125,13 +4125,13 @@ d.cond_logic_item_v1 = Xi;
|
|
|
4125
4125
|
const Ji = {
|
|
4126
4126
|
init: function() {
|
|
4127
4127
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4128
|
-
new
|
|
4128
|
+
new A([
|
|
4129
4129
|
["%{BKY_DATA_COND_LOGIC_TYPE_AND}", "AND"],
|
|
4130
4130
|
["%{BKY_DATA_COND_LOGIC_TYPE_OR}", "OR"]
|
|
4131
4131
|
]),
|
|
4132
4132
|
"TYPE"
|
|
4133
4133
|
), this.setMutator(
|
|
4134
|
-
new
|
|
4134
|
+
new dt.MutatorIcon(
|
|
4135
4135
|
["cond_logic_item_v1"],
|
|
4136
4136
|
this
|
|
4137
4137
|
)
|
|
@@ -4200,8 +4200,8 @@ d.cond_logic_v1 = Ji;
|
|
|
4200
4200
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4201
4201
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4202
4202
|
i.push(a);
|
|
4203
|
-
for (let
|
|
4204
|
-
const u = s.valueToCode(n, "ADD" +
|
|
4203
|
+
for (let r = 0; r < n.itemCount_; r++) {
|
|
4204
|
+
const u = s.valueToCode(n, "ADD" + r, c.ATOMIC) || null;
|
|
4205
4205
|
i.push(u);
|
|
4206
4206
|
}
|
|
4207
4207
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
@@ -4210,7 +4210,7 @@ function qi(t) {
|
|
|
4210
4210
|
const e = t.getInput("TABLE").connection;
|
|
4211
4211
|
if (e.targetBlock())
|
|
4212
4212
|
return;
|
|
4213
|
-
const n = q()?.[0], o =
|
|
4213
|
+
const n = q()?.[0], o = $(n?.id ?? "")?.[0], i = {
|
|
4214
4214
|
type: "select_table_v1",
|
|
4215
4215
|
extraState: {
|
|
4216
4216
|
space: {
|
|
@@ -4222,14 +4222,14 @@ function qi(t) {
|
|
|
4222
4222
|
name: o?.name ?? ""
|
|
4223
4223
|
}
|
|
4224
4224
|
}
|
|
4225
|
-
}, a =
|
|
4225
|
+
}, a = K.blocks.append(i, t.workspace);
|
|
4226
4226
|
e.connect(a.outputConnection);
|
|
4227
4227
|
}
|
|
4228
4228
|
function Qi(t) {
|
|
4229
4229
|
const e = t.getInput("CONDITION").connection;
|
|
4230
4230
|
if (e.targetBlock())
|
|
4231
4231
|
return;
|
|
4232
|
-
const n = q()?.[0], o =
|
|
4232
|
+
const n = q()?.[0], o = $(n?.id ?? "")?.[0], i = ne(n?.id, o?.id)?.[0], a = {
|
|
4233
4233
|
type: "cond_atomic_v1",
|
|
4234
4234
|
extraState: {
|
|
4235
4235
|
space: {
|
|
@@ -4247,8 +4247,8 @@ function Qi(t) {
|
|
|
4247
4247
|
extend: i?.extend ?? ""
|
|
4248
4248
|
}
|
|
4249
4249
|
}
|
|
4250
|
-
},
|
|
4251
|
-
e.connect(
|
|
4250
|
+
}, l = K.blocks.append(a, t.workspace);
|
|
4251
|
+
e.connect(l.outputConnection);
|
|
4252
4252
|
}
|
|
4253
4253
|
function zi(t) {
|
|
4254
4254
|
const e = t.getInput("HANDLE").connection;
|
|
@@ -4271,7 +4271,7 @@ function zi(t) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
}
|
|
4273
4273
|
}
|
|
4274
|
-
}, o =
|
|
4274
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
4275
4275
|
e.connect(o.previousConnection);
|
|
4276
4276
|
}
|
|
4277
4277
|
const Zi = {
|
|
@@ -4341,22 +4341,22 @@ function ts(t) {
|
|
|
4341
4341
|
let n, o;
|
|
4342
4342
|
const i = q()?.[0];
|
|
4343
4343
|
if (i) {
|
|
4344
|
-
const
|
|
4345
|
-
if (
|
|
4344
|
+
const r = $(i.id)?.[0];
|
|
4345
|
+
if (r) {
|
|
4346
4346
|
n = {
|
|
4347
4347
|
space: {
|
|
4348
4348
|
id: i.id,
|
|
4349
4349
|
name: i.name
|
|
4350
4350
|
},
|
|
4351
4351
|
table: {
|
|
4352
|
-
id:
|
|
4353
|
-
name:
|
|
4354
|
-
columns:
|
|
4352
|
+
id: r.id,
|
|
4353
|
+
name: r.name,
|
|
4354
|
+
columns: r.columns
|
|
4355
4355
|
},
|
|
4356
|
-
itemCount:
|
|
4356
|
+
itemCount: r.columns.length
|
|
4357
4357
|
}, o = {};
|
|
4358
|
-
for (let u = 0; u <
|
|
4359
|
-
const _ =
|
|
4358
|
+
for (let u = 0; u < r.columns.length; u++) {
|
|
4359
|
+
const _ = r.columns[u];
|
|
4360
4360
|
o["COLUMN" + u] = _.id, o["ALIAS" + u] = _.name;
|
|
4361
4361
|
}
|
|
4362
4362
|
}
|
|
@@ -4365,8 +4365,8 @@ function ts(t) {
|
|
|
4365
4365
|
type: "select_column_v1",
|
|
4366
4366
|
extraState: n,
|
|
4367
4367
|
fields: o
|
|
4368
|
-
},
|
|
4369
|
-
e.connect(
|
|
4368
|
+
}, l = K.blocks.append(a, t.workspace);
|
|
4369
|
+
e.connect(l.outputConnection);
|
|
4370
4370
|
}
|
|
4371
4371
|
function es(t) {
|
|
4372
4372
|
const e = t.getInput("CONDITION").connection;
|
|
@@ -4374,7 +4374,7 @@ function es(t) {
|
|
|
4374
4374
|
return;
|
|
4375
4375
|
const n = {
|
|
4376
4376
|
type: "cond_atomic_v1"
|
|
4377
|
-
}, o =
|
|
4377
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
4378
4378
|
e.connect(o.outputConnection);
|
|
4379
4379
|
}
|
|
4380
4380
|
function ns(t) {
|
|
@@ -4411,7 +4411,7 @@ function ns(t) {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
4413
|
}
|
|
4414
|
-
}, o =
|
|
4414
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
4415
4415
|
e.connect(o.outputConnection);
|
|
4416
4416
|
}
|
|
4417
4417
|
function os(t) {
|
|
@@ -4435,7 +4435,7 @@ function os(t) {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
}
|
|
4437
4437
|
}
|
|
4438
|
-
}, o =
|
|
4438
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
4439
4439
|
e.connect(o.previousConnection);
|
|
4440
4440
|
}
|
|
4441
4441
|
h([
|
|
@@ -4571,13 +4571,13 @@ const cs = {
|
|
|
4571
4571
|
name: "",
|
|
4572
4572
|
columns: []
|
|
4573
4573
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(
|
|
4574
|
-
new
|
|
4574
|
+
new A(() => this.genSpaceOpts_()),
|
|
4575
4575
|
"SPACE"
|
|
4576
4576
|
).appendField(
|
|
4577
|
-
new
|
|
4577
|
+
new A(() => this.genTableOpts_()),
|
|
4578
4578
|
"TABLE"
|
|
4579
4579
|
), this.setMutator(
|
|
4580
|
-
new
|
|
4580
|
+
new dt.MutatorIcon(
|
|
4581
4581
|
["select_column_item_v1"],
|
|
4582
4582
|
this
|
|
4583
4583
|
)
|
|
@@ -4592,7 +4592,7 @@ const cs = {
|
|
|
4592
4592
|
this.space.id = t.id, this.space.name = t.name;
|
|
4593
4593
|
const e = this.getField("SPACE");
|
|
4594
4594
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4595
|
-
const n =
|
|
4595
|
+
const n = $(this.space.id)?.[0];
|
|
4596
4596
|
if (!n)
|
|
4597
4597
|
return;
|
|
4598
4598
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -4612,10 +4612,10 @@ const cs = {
|
|
|
4612
4612
|
}, 0);
|
|
4613
4613
|
},
|
|
4614
4614
|
genSpaceOpts_: function() {
|
|
4615
|
-
return
|
|
4615
|
+
return fe();
|
|
4616
4616
|
},
|
|
4617
4617
|
genTableOpts_: function() {
|
|
4618
|
-
return
|
|
4618
|
+
return me(this.space.id);
|
|
4619
4619
|
},
|
|
4620
4620
|
genColumnOpts_: function() {
|
|
4621
4621
|
const t = [];
|
|
@@ -4624,7 +4624,7 @@ const cs = {
|
|
|
4624
4624
|
}), k(t);
|
|
4625
4625
|
},
|
|
4626
4626
|
onchange: function(t) {
|
|
4627
|
-
if (t.type ===
|
|
4627
|
+
if (t.type === b.STATE_CHANGE)
|
|
4628
4628
|
this.checkWarning_();
|
|
4629
4629
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
4630
4630
|
const e = t;
|
|
@@ -4646,14 +4646,14 @@ const cs = {
|
|
|
4646
4646
|
}
|
|
4647
4647
|
},
|
|
4648
4648
|
onSpaceChange_: function(t) {
|
|
4649
|
-
const e =
|
|
4649
|
+
const e = ht(t);
|
|
4650
4650
|
if (!e) {
|
|
4651
4651
|
console.assert(!1);
|
|
4652
4652
|
return;
|
|
4653
4653
|
}
|
|
4654
4654
|
const n = e.id !== this.space.id;
|
|
4655
4655
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
4656
|
-
const o =
|
|
4656
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
4657
4657
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
4658
4658
|
}
|
|
4659
4659
|
},
|
|
@@ -4705,12 +4705,12 @@ const cs = {
|
|
|
4705
4705
|
}
|
|
4706
4706
|
this.itemCount_ = n.length, this.updateShape_();
|
|
4707
4707
|
for (let i = 0; i < this.itemCount_; i++) {
|
|
4708
|
-
const a = n[i] ?? this.table.columns[0]?.id ?? "",
|
|
4708
|
+
const a = n[i] ?? this.table.columns[0]?.id ?? "", l = o[i] ?? this.table.columns[0]?.name ?? "";
|
|
4709
4709
|
this.getField(
|
|
4710
4710
|
"COLUMN" + i
|
|
4711
4711
|
).setValue(a, !1), this.getField(
|
|
4712
4712
|
"ALIAS" + i
|
|
4713
|
-
).setValue(
|
|
4713
|
+
).setValue(l, !1);
|
|
4714
4714
|
}
|
|
4715
4715
|
setTimeout(() => {
|
|
4716
4716
|
this.checkWarning_();
|
|
@@ -4731,9 +4731,9 @@ const cs = {
|
|
|
4731
4731
|
initShape_: function() {
|
|
4732
4732
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4733
4733
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4734
|
-
const e = this.table.columns[t], n = new
|
|
4734
|
+
const e = this.table.columns[t], n = new A(
|
|
4735
4735
|
() => this.genColumnOpts_()
|
|
4736
|
-
), o = new
|
|
4736
|
+
), o = new _t("");
|
|
4737
4737
|
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4738
4738
|
}
|
|
4739
4739
|
},
|
|
@@ -4743,16 +4743,16 @@ const cs = {
|
|
|
4743
4743
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
4744
4744
|
if (this.getInput("ADD" + t))
|
|
4745
4745
|
continue;
|
|
4746
|
-
const e = new
|
|
4746
|
+
const e = new A(
|
|
4747
4747
|
() => this.genColumnOpts_()
|
|
4748
|
-
), n = new
|
|
4748
|
+
), n = new _t("");
|
|
4749
4749
|
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4750
4750
|
const o = this.table.columns[0];
|
|
4751
4751
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4752
4752
|
}
|
|
4753
4753
|
},
|
|
4754
4754
|
checkWarning_: function() {
|
|
4755
|
-
const t =
|
|
4755
|
+
const t = ht(this.space.id);
|
|
4756
4756
|
if (!t) {
|
|
4757
4757
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4758
4758
|
return;
|
|
@@ -4774,15 +4774,15 @@ d.select_column_v1 = cs;
|
|
|
4774
4774
|
s.forBlock.select_column_v1 = function(t) {
|
|
4775
4775
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4776
4776
|
for (let u = 0; u < n.itemCount_; u++) {
|
|
4777
|
-
const _ = n.getFieldValue("COLUMN" + u), T = n.table.columns.find((m) => m.id === _).name,
|
|
4778
|
-
a.push({ name: T, alias:
|
|
4777
|
+
const _ = n.getFieldValue("COLUMN" + u), T = n.table.columns.find((m) => m.id === _).name, I = n.getFieldValue("ALIAS" + u);
|
|
4778
|
+
a.push({ name: T, alias: I });
|
|
4779
4779
|
}
|
|
4780
|
-
let
|
|
4780
|
+
let l = "[";
|
|
4781
4781
|
return a.forEach(({ name: u, alias: _ }, T) => {
|
|
4782
|
-
T !== 0 && (
|
|
4783
|
-
}),
|
|
4782
|
+
T !== 0 && (l += ","), l += `{name:${e(u)},alias:${e(_)}}`;
|
|
4783
|
+
}), l += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4784
4784
|
};
|
|
4785
|
-
const
|
|
4785
|
+
const ls = {
|
|
4786
4786
|
init: function() {
|
|
4787
4787
|
this.space = {
|
|
4788
4788
|
id: "",
|
|
@@ -4791,10 +4791,10 @@ const rs = {
|
|
|
4791
4791
|
id: "",
|
|
4792
4792
|
name: ""
|
|
4793
4793
|
}, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_TABLE_TITLE}").appendField(
|
|
4794
|
-
new
|
|
4794
|
+
new A(() => this.genSpaceOpts_()),
|
|
4795
4795
|
"SPACE"
|
|
4796
4796
|
).appendField(
|
|
4797
|
-
new
|
|
4797
|
+
new A(() => this.genTableOpts_()),
|
|
4798
4798
|
"TABLE"
|
|
4799
4799
|
), this.setOutput(!0, "SelectTable"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_DATA_V1_SELECT_TABLE_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_SELECT_TABLE_HELPURL}"), this.initData_();
|
|
4800
4800
|
},
|
|
@@ -4807,7 +4807,7 @@ const rs = {
|
|
|
4807
4807
|
this.space.id = t.id, this.space.name = t.name;
|
|
4808
4808
|
const e = this.getField("SPACE");
|
|
4809
4809
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
4810
|
-
const n =
|
|
4810
|
+
const n = $(this.space.id)?.[0];
|
|
4811
4811
|
if (!n)
|
|
4812
4812
|
return;
|
|
4813
4813
|
this.table.id = n.id, this.table.name = n.name;
|
|
@@ -4824,13 +4824,13 @@ const rs = {
|
|
|
4824
4824
|
this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
|
|
4825
4825
|
},
|
|
4826
4826
|
genSpaceOpts_: function() {
|
|
4827
|
-
return
|
|
4827
|
+
return fe();
|
|
4828
4828
|
},
|
|
4829
4829
|
genTableOpts_: function() {
|
|
4830
|
-
return
|
|
4830
|
+
return me(this.space.id);
|
|
4831
4831
|
},
|
|
4832
4832
|
onchange: function(t) {
|
|
4833
|
-
if (t.type ===
|
|
4833
|
+
if (t.type === b.STATE_CHANGE)
|
|
4834
4834
|
this.checkWarning_();
|
|
4835
4835
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
4836
4836
|
const e = t;
|
|
@@ -4840,14 +4840,14 @@ const rs = {
|
|
|
4840
4840
|
}
|
|
4841
4841
|
},
|
|
4842
4842
|
onSpaceChange_: function(t) {
|
|
4843
|
-
const e =
|
|
4843
|
+
const e = ht(t);
|
|
4844
4844
|
if (!e) {
|
|
4845
4845
|
console.assert(!1);
|
|
4846
4846
|
return;
|
|
4847
4847
|
}
|
|
4848
4848
|
let n = !1;
|
|
4849
4849
|
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)) {
|
|
4850
|
-
const i =
|
|
4850
|
+
const i = $(this.space.id)?.[0];
|
|
4851
4851
|
i ? this.setFieldValue(i.id, "TABLE") : this.setFieldValue("", "TABLE");
|
|
4852
4852
|
}
|
|
4853
4853
|
},
|
|
@@ -4860,7 +4860,7 @@ const rs = {
|
|
|
4860
4860
|
this.table.id = e.id, this.table.name = e.name;
|
|
4861
4861
|
},
|
|
4862
4862
|
checkWarning_: function() {
|
|
4863
|
-
const t =
|
|
4863
|
+
const t = ht(this.space.id);
|
|
4864
4864
|
if (!t) {
|
|
4865
4865
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
4866
4866
|
return;
|
|
@@ -4874,12 +4874,12 @@ const rs = {
|
|
|
4874
4874
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4875
4875
|
}
|
|
4876
4876
|
};
|
|
4877
|
-
d.select_table_v1 =
|
|
4877
|
+
d.select_table_v1 = ls;
|
|
4878
4878
|
s.forBlock.select_table_v1 = function(t) {
|
|
4879
4879
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4880
|
-
return [`{
|
|
4880
|
+
return [`{spaceId:${e(o)},tableId:${e(i)}}`, c.ATOMIC];
|
|
4881
4881
|
};
|
|
4882
|
-
const
|
|
4882
|
+
const rs = {
|
|
4883
4883
|
init: function() {
|
|
4884
4884
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
4885
4885
|
},
|
|
@@ -4901,7 +4901,7 @@ const ls = {
|
|
|
4901
4901
|
]);
|
|
4902
4902
|
}
|
|
4903
4903
|
};
|
|
4904
|
-
d.transaction_v1 =
|
|
4904
|
+
d.transaction_v1 = rs;
|
|
4905
4905
|
s.forBlock.transaction_v1 = function(t) {
|
|
4906
4906
|
const e = s.INDENT, n = t, o = Wo(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4907
4907
|
return `{
|
|
@@ -4967,13 +4967,13 @@ const ps = {
|
|
|
4967
4967
|
name: "",
|
|
4968
4968
|
columns: []
|
|
4969
4969
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(
|
|
4970
|
-
new
|
|
4970
|
+
new A(() => this.genSpaceOpts_()),
|
|
4971
4971
|
"SPACE"
|
|
4972
4972
|
).appendField(
|
|
4973
|
-
new
|
|
4973
|
+
new A(() => this.genTableOpts_()),
|
|
4974
4974
|
"TABLE"
|
|
4975
4975
|
), this.setMutator(
|
|
4976
|
-
new
|
|
4976
|
+
new dt.MutatorIcon(
|
|
4977
4977
|
["update_column_item_v1"],
|
|
4978
4978
|
this
|
|
4979
4979
|
)
|
|
@@ -4988,7 +4988,7 @@ const ps = {
|
|
|
4988
4988
|
this.space.id = t.id, this.space.name = t.name;
|
|
4989
4989
|
const e = this.getField("SPACE");
|
|
4990
4990
|
e.getOptions(!1), e.setValue(this.space.id, !1);
|
|
4991
|
-
const n =
|
|
4991
|
+
const n = $(this.space.id)?.[0];
|
|
4992
4992
|
if (!n)
|
|
4993
4993
|
return;
|
|
4994
4994
|
this.table.id = n.id, this.table.name = n.name, this.table.columns = n.columns;
|
|
@@ -5008,10 +5008,10 @@ const ps = {
|
|
|
5008
5008
|
}, 0);
|
|
5009
5009
|
},
|
|
5010
5010
|
genSpaceOpts_: function() {
|
|
5011
|
-
return
|
|
5011
|
+
return fe();
|
|
5012
5012
|
},
|
|
5013
5013
|
genTableOpts_: function() {
|
|
5014
|
-
return
|
|
5014
|
+
return me(this.space.id);
|
|
5015
5015
|
},
|
|
5016
5016
|
genColumnOpts_: function() {
|
|
5017
5017
|
const t = [];
|
|
@@ -5020,7 +5020,7 @@ const ps = {
|
|
|
5020
5020
|
}), k(t);
|
|
5021
5021
|
},
|
|
5022
5022
|
onchange: function(t) {
|
|
5023
|
-
if (t.type ===
|
|
5023
|
+
if (t.type === b.STATE_CHANGE)
|
|
5024
5024
|
this.checkWarning_();
|
|
5025
5025
|
else if (t.type === g.BLOCK_CHANGE) {
|
|
5026
5026
|
const e = t;
|
|
@@ -5042,14 +5042,14 @@ const ps = {
|
|
|
5042
5042
|
}
|
|
5043
5043
|
},
|
|
5044
5044
|
onSpaceChange_: function(t) {
|
|
5045
|
-
const e =
|
|
5045
|
+
const e = ht(t);
|
|
5046
5046
|
if (!e) {
|
|
5047
5047
|
console.assert(!1);
|
|
5048
5048
|
return;
|
|
5049
5049
|
}
|
|
5050
5050
|
const n = e.id !== this.space.id;
|
|
5051
5051
|
if (this.space.id = e.id, this.space.name = e.name, n || !j(this.space.id, this.table.id)) {
|
|
5052
|
-
const o =
|
|
5052
|
+
const o = $(this.space.id)?.[0]?.id ?? "", i = this.getField("TABLE");
|
|
5053
5053
|
i.getOptions(!1), i.setValue(o, !1), this.onTableChange_(o);
|
|
5054
5054
|
}
|
|
5055
5055
|
},
|
|
@@ -5071,7 +5071,7 @@ const ps = {
|
|
|
5071
5071
|
}, 0);
|
|
5072
5072
|
},
|
|
5073
5073
|
onColumnChange_: function(t, e) {
|
|
5074
|
-
const n = this.table.columns.find((
|
|
5074
|
+
const n = this.table.columns.find((l) => l.id === e);
|
|
5075
5075
|
if (!n) {
|
|
5076
5076
|
console.assert(!1);
|
|
5077
5077
|
return;
|
|
@@ -5137,7 +5137,7 @@ const ps = {
|
|
|
5137
5137
|
initShape_: function() {
|
|
5138
5138
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
5139
5139
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
5140
|
-
const e = this.table.columns[t], n = new
|
|
5140
|
+
const e = this.table.columns[t], n = new A(
|
|
5141
5141
|
() => this.genColumnOpts_()
|
|
5142
5142
|
);
|
|
5143
5143
|
this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
@@ -5151,7 +5151,7 @@ const ps = {
|
|
|
5151
5151
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
5152
5152
|
if (this.getInput("ADD" + t))
|
|
5153
5153
|
continue;
|
|
5154
|
-
const e = new
|
|
5154
|
+
const e = new A(
|
|
5155
5155
|
() => this.genColumnOpts_()
|
|
5156
5156
|
);
|
|
5157
5157
|
this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
@@ -5165,12 +5165,12 @@ const ps = {
|
|
|
5165
5165
|
i && i.dispose();
|
|
5166
5166
|
else if (i)
|
|
5167
5167
|
continue;
|
|
5168
|
-
const a = this.getFieldValue("COLUMN" + e),
|
|
5169
|
-
if (!
|
|
5168
|
+
const a = this.getFieldValue("COLUMN" + e), l = this.table.columns.find((u) => u.id === a);
|
|
5169
|
+
if (!l)
|
|
5170
5170
|
continue;
|
|
5171
5171
|
n.setCheck(null);
|
|
5172
|
-
const
|
|
5173
|
-
|
|
5172
|
+
const r = Ve(this.workspace, l.type);
|
|
5173
|
+
r && o.connect(r.outputConnection);
|
|
5174
5174
|
}
|
|
5175
5175
|
},
|
|
5176
5176
|
updateCheck_: function() {
|
|
@@ -5183,7 +5183,7 @@ const ps = {
|
|
|
5183
5183
|
}
|
|
5184
5184
|
},
|
|
5185
5185
|
checkWarning_: function() {
|
|
5186
|
-
const t =
|
|
5186
|
+
const t = ht(this.space.id);
|
|
5187
5187
|
if (!t) {
|
|
5188
5188
|
this.setWarningText(p("WARN_SPACE_NOT_FOUND"));
|
|
5189
5189
|
return;
|
|
@@ -5205,13 +5205,13 @@ d.update_column_v1 = ps;
|
|
|
5205
5205
|
s.forBlock.update_column_v1 = function(t) {
|
|
5206
5206
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5207
5207
|
for (let u = 0; u < n.itemCount_; u++) {
|
|
5208
|
-
const _ = n.getFieldValue("COLUMN" + u), T = n.table.columns.find((m) => m.id === _).name,
|
|
5209
|
-
a.push({ name: T, value:
|
|
5208
|
+
const _ = n.getFieldValue("COLUMN" + u), T = n.table.columns.find((m) => m.id === _).name, I = s.valueToCode(n, "ADD" + u, c.ATOMIC) || "null";
|
|
5209
|
+
a.push({ name: T, value: I });
|
|
5210
5210
|
}
|
|
5211
|
-
let
|
|
5211
|
+
let l = "[";
|
|
5212
5212
|
return a.forEach(({ name: u, value: _ }, T) => {
|
|
5213
|
-
T !== 0 && (
|
|
5214
|
-
}),
|
|
5213
|
+
T !== 0 && (l += ","), l += `{name:${e(u)},value:${_}}`;
|
|
5214
|
+
}), l += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5215
5215
|
};
|
|
5216
5216
|
function hs(t) {
|
|
5217
5217
|
const e = t.getInput("TABLE").connection;
|
|
@@ -5220,22 +5220,22 @@ function hs(t) {
|
|
|
5220
5220
|
let n, o;
|
|
5221
5221
|
const i = q()?.[0];
|
|
5222
5222
|
if (i) {
|
|
5223
|
-
const
|
|
5224
|
-
if (
|
|
5223
|
+
const r = $(i.id)?.[0];
|
|
5224
|
+
if (r) {
|
|
5225
5225
|
n = {
|
|
5226
5226
|
space: {
|
|
5227
5227
|
id: i.id,
|
|
5228
5228
|
name: i.name
|
|
5229
5229
|
},
|
|
5230
5230
|
table: {
|
|
5231
|
-
id:
|
|
5232
|
-
name:
|
|
5233
|
-
columns:
|
|
5231
|
+
id: r.id,
|
|
5232
|
+
name: r.name,
|
|
5233
|
+
columns: r.columns
|
|
5234
5234
|
},
|
|
5235
|
-
itemCount:
|
|
5235
|
+
itemCount: r.columns.length
|
|
5236
5236
|
}, o = {};
|
|
5237
|
-
for (let u = 0; u <
|
|
5238
|
-
const _ =
|
|
5237
|
+
for (let u = 0; u < r.columns.length; u++) {
|
|
5238
|
+
const _ = r.columns[u];
|
|
5239
5239
|
o["COLUMN" + u] = _.id;
|
|
5240
5240
|
}
|
|
5241
5241
|
}
|
|
@@ -5244,8 +5244,8 @@ function hs(t) {
|
|
|
5244
5244
|
type: "update_column_v1",
|
|
5245
5245
|
extraState: n,
|
|
5246
5246
|
fields: o
|
|
5247
|
-
},
|
|
5248
|
-
e.connect(
|
|
5247
|
+
}, l = K.blocks.append(a, t.workspace);
|
|
5248
|
+
e.connect(l.outputConnection);
|
|
5249
5249
|
}
|
|
5250
5250
|
function ds(t) {
|
|
5251
5251
|
const e = t.getInput("CONDITION").connection;
|
|
@@ -5253,7 +5253,7 @@ function ds(t) {
|
|
|
5253
5253
|
return;
|
|
5254
5254
|
const n = {
|
|
5255
5255
|
type: "cond_atomic_v1"
|
|
5256
|
-
}, o =
|
|
5256
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
5257
5257
|
e.connect(o.outputConnection);
|
|
5258
5258
|
}
|
|
5259
5259
|
function fs(t) {
|
|
@@ -5277,7 +5277,7 @@ function fs(t) {
|
|
|
5277
5277
|
}
|
|
5278
5278
|
}
|
|
5279
5279
|
}
|
|
5280
|
-
}, o =
|
|
5280
|
+
}, o = K.blocks.append(n, t.workspace);
|
|
5281
5281
|
e.connect(o.previousConnection);
|
|
5282
5282
|
}
|
|
5283
5283
|
const ms = {
|
|
@@ -5323,7 +5323,7 @@ ${i}}
|
|
|
5323
5323
|
const Ts = C.xml, Es = {
|
|
5324
5324
|
init: function() {
|
|
5325
5325
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5326
|
-
new z(
|
|
5326
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5327
5327
|
this.isInFlyout || this.addEntry_();
|
|
5328
5328
|
})
|
|
5329
5329
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5333,7 +5333,7 @@ const Ts = C.xml, Es = {
|
|
|
5333
5333
|
return t.setAttribute("items", String(this.length)), t;
|
|
5334
5334
|
},
|
|
5335
5335
|
domToMutation: function(t) {
|
|
5336
|
-
this.length =
|
|
5336
|
+
this.length = Rt(t.getAttribute("items") ?? "", 0), this.initShape_();
|
|
5337
5337
|
},
|
|
5338
5338
|
initData: function(t) {
|
|
5339
5339
|
this.length = t, this.initShape_();
|
|
@@ -5342,11 +5342,11 @@ const Ts = C.xml, Es = {
|
|
|
5342
5342
|
for (let t = 0; t < this.length; t++) {
|
|
5343
5343
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5344
5344
|
n.appendField(
|
|
5345
|
-
new z(
|
|
5345
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5346
5346
|
this.isInFlyout || this.addEntry_(n);
|
|
5347
5347
|
})
|
|
5348
|
-
), n.appendField(new
|
|
5349
|
-
new z(
|
|
5348
|
+
), n.appendField(new ln(String(t))), n.appendField(
|
|
5349
|
+
new z(Jt, 20, 20, void 0, () => {
|
|
5350
5350
|
this.isInFlyout || this.removeEntry_(n);
|
|
5351
5351
|
})
|
|
5352
5352
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5354,18 +5354,18 @@ const Ts = C.xml, Es = {
|
|
|
5354
5354
|
},
|
|
5355
5355
|
addEntry_: function(t) {
|
|
5356
5356
|
let e = this.length;
|
|
5357
|
-
t && (e =
|
|
5357
|
+
t && (e = Rt(t.name.substring(5)));
|
|
5358
5358
|
for (let o = this.length - 1; o >= e; o--) {
|
|
5359
5359
|
const i = this.getInput("ENTRY" + o);
|
|
5360
5360
|
i.name = "ENTRY" + (o + 1), i.fieldRow[1].setValue(o + 1);
|
|
5361
5361
|
}
|
|
5362
5362
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5363
5363
|
n.appendField(
|
|
5364
|
-
new z(
|
|
5364
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5365
5365
|
this.isInFlyout || this.addEntry_(n);
|
|
5366
5366
|
})
|
|
5367
|
-
), n.appendField(new
|
|
5368
|
-
new z(
|
|
5367
|
+
), n.appendField(new ln(String(e))), n.appendField(
|
|
5368
|
+
new z(Jt, 20, 20, void 0, () => {
|
|
5369
5369
|
this.isInFlyout || this.removeEntry_(n);
|
|
5370
5370
|
})
|
|
5371
5371
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5373,7 +5373,7 @@ const Ts = C.xml, Es = {
|
|
|
5373
5373
|
removeEntry_: function(t) {
|
|
5374
5374
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5375
5375
|
n && n.dispose(), this.removeInput(e);
|
|
5376
|
-
const o =
|
|
5376
|
+
const o = Rt(e.substring(5));
|
|
5377
5377
|
for (let i = o + 1; i < this.length; i++) {
|
|
5378
5378
|
const a = this.getInput("ENTRY" + i);
|
|
5379
5379
|
a.name = "ENTRY" + (i - 1), a.fieldRow[1].setValue(i - 1);
|
|
@@ -5385,7 +5385,7 @@ d.json_array_v1 = Es;
|
|
|
5385
5385
|
const gs = {
|
|
5386
5386
|
init: function() {
|
|
5387
5387
|
this.appendDummyInput().appendField(
|
|
5388
|
-
new
|
|
5388
|
+
new A([
|
|
5389
5389
|
["false", "false"],
|
|
5390
5390
|
["true", "true"]
|
|
5391
5391
|
]),
|
|
@@ -5394,10 +5394,10 @@ const gs = {
|
|
|
5394
5394
|
}
|
|
5395
5395
|
};
|
|
5396
5396
|
d.json_boolean_v1 = gs;
|
|
5397
|
-
const mn = C.xml,
|
|
5397
|
+
const mn = C.xml, Is = {
|
|
5398
5398
|
init: function() {
|
|
5399
5399
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5400
|
-
new z(
|
|
5400
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5401
5401
|
this.isInFlyout || this.addEntry_();
|
|
5402
5402
|
})
|
|
5403
5403
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5425,11 +5425,11 @@ const mn = C.xml, As = {
|
|
|
5425
5425
|
for (let e = 0; e < t.length; e++) {
|
|
5426
5426
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5427
5427
|
i.appendField(
|
|
5428
|
-
new z(
|
|
5428
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5429
5429
|
this.isInFlyout || this.addEntry_(i);
|
|
5430
5430
|
})
|
|
5431
|
-
), i.appendField(new
|
|
5432
|
-
new z(
|
|
5431
|
+
), i.appendField(new _t(n), "KEY" + e), i.appendField(
|
|
5432
|
+
new z(Jt, 20, 20, void 0, () => {
|
|
5433
5433
|
this.isInFlyout || this.removeEntry_(i);
|
|
5434
5434
|
})
|
|
5435
5435
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5437,16 +5437,16 @@ const mn = C.xml, As = {
|
|
|
5437
5437
|
},
|
|
5438
5438
|
addEntry_: function(t) {
|
|
5439
5439
|
let e = this.length;
|
|
5440
|
-
t && (e =
|
|
5440
|
+
t && (e = Rt(t.name.substring(5)));
|
|
5441
5441
|
for (let o = this.length - 1; o >= e; o--)
|
|
5442
5442
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5443
5443
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5444
5444
|
n.appendField(
|
|
5445
|
-
new z(
|
|
5445
|
+
new z(vt, 20, 20, void 0, () => {
|
|
5446
5446
|
this.isInFlyout || this.addEntry_(n);
|
|
5447
5447
|
})
|
|
5448
|
-
), n.appendField(new
|
|
5449
|
-
new z(
|
|
5448
|
+
), n.appendField(new _t("key"), "KEY" + e), n.appendField(
|
|
5449
|
+
new z(Jt, 20, 20, void 0, () => {
|
|
5450
5450
|
this.isInFlyout || this.removeEntry_(n);
|
|
5451
5451
|
})
|
|
5452
5452
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5454,19 +5454,19 @@ const mn = C.xml, As = {
|
|
|
5454
5454
|
removeEntry_: function(t) {
|
|
5455
5455
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5456
5456
|
n && n.dispose(), this.removeInput(e);
|
|
5457
|
-
const o =
|
|
5457
|
+
const o = Rt(e.substring(5));
|
|
5458
5458
|
for (let i = o + 1; i < this.length; i++)
|
|
5459
5459
|
this.getField("KEY" + i).name = "KEY" + (i - 1), this.getInput("ENTRY" + i).name = "ENTRY" + (i - 1);
|
|
5460
5460
|
this.length--;
|
|
5461
5461
|
}
|
|
5462
5462
|
};
|
|
5463
|
-
d.json_map_v1 =
|
|
5464
|
-
const
|
|
5463
|
+
d.json_map_v1 = Is;
|
|
5464
|
+
const As = {
|
|
5465
5465
|
init: function() {
|
|
5466
5466
|
this.appendDummyInput().appendField(new Me(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5467
5467
|
}
|
|
5468
5468
|
};
|
|
5469
|
-
d.json_number_v1 =
|
|
5469
|
+
d.json_number_v1 = As;
|
|
5470
5470
|
const Os = {
|
|
5471
5471
|
init: function() {
|
|
5472
5472
|
this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -5475,7 +5475,7 @@ const Os = {
|
|
|
5475
5475
|
d.json_root_v1 = Os;
|
|
5476
5476
|
const vs = {
|
|
5477
5477
|
init: function() {
|
|
5478
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5478
|
+
this.appendDummyInput().appendField('"').appendField(new _t(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5479
5479
|
}
|
|
5480
5480
|
};
|
|
5481
5481
|
d.json_string_v1 = vs;
|
|
@@ -5494,7 +5494,7 @@ d.list_create_item_v1 = ks;
|
|
|
5494
5494
|
const Ns = {
|
|
5495
5495
|
init: function() {
|
|
5496
5496
|
this.itemCount_ = 0, this.setMutator(
|
|
5497
|
-
new
|
|
5497
|
+
new dt.MutatorIcon(
|
|
5498
5498
|
["list_create_item_v1"],
|
|
5499
5499
|
this
|
|
5500
5500
|
)
|
|
@@ -5801,9 +5801,9 @@ const Ls = {
|
|
|
5801
5801
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
5802
5802
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
5803
5803
|
};
|
|
5804
|
-
|
|
5804
|
+
B.register(
|
|
5805
5805
|
"logic_op_tooltip_v1",
|
|
5806
|
-
|
|
5806
|
+
B.buildTooltipForDropdown("OP", Ls)
|
|
5807
5807
|
);
|
|
5808
5808
|
h([
|
|
5809
5809
|
{
|
|
@@ -5845,7 +5845,7 @@ const Ss = {
|
|
|
5845
5845
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
5846
5846
|
}
|
|
5847
5847
|
};
|
|
5848
|
-
|
|
5848
|
+
B.register(
|
|
5849
5849
|
"logic_compare_v1",
|
|
5850
5850
|
function() {
|
|
5851
5851
|
this.mixin(Ss);
|
|
@@ -6023,7 +6023,7 @@ const Bs = {
|
|
|
6023
6023
|
n?.reconnect(this, "ELSE");
|
|
6024
6024
|
}
|
|
6025
6025
|
};
|
|
6026
|
-
|
|
6026
|
+
B.registerMutator(
|
|
6027
6027
|
"logic_if_v1_mutator",
|
|
6028
6028
|
Bs,
|
|
6029
6029
|
void 0,
|
|
@@ -6166,8 +6166,8 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6166
|
if (!o && !i)
|
|
6167
6167
|
o = "false", i = "false";
|
|
6168
6168
|
else {
|
|
6169
|
-
const
|
|
6170
|
-
o || (o =
|
|
6169
|
+
const l = e === "&&" ? "true" : "false";
|
|
6170
|
+
o || (o = l), i || (i = l);
|
|
6171
6171
|
}
|
|
6172
6172
|
return [`${o} ${e} ${i}`, n];
|
|
6173
6173
|
};
|
|
@@ -6186,7 +6186,7 @@ const bs = {
|
|
|
6186
6186
|
this.prevParentConnection_ = o;
|
|
6187
6187
|
}
|
|
6188
6188
|
};
|
|
6189
|
-
|
|
6189
|
+
B.registerMixin("logic_ternary_v1", bs);
|
|
6190
6190
|
h([
|
|
6191
6191
|
{
|
|
6192
6192
|
type: "logic_ternary_v1",
|
|
@@ -6243,13 +6243,13 @@ const Ps = {
|
|
|
6243
6243
|
}
|
|
6244
6244
|
}
|
|
6245
6245
|
};
|
|
6246
|
-
|
|
6246
|
+
B.registerMixin(
|
|
6247
6247
|
"contextMenu_newGetVariableBlock_v1",
|
|
6248
6248
|
Ps
|
|
6249
6249
|
);
|
|
6250
|
-
|
|
6250
|
+
B.register(
|
|
6251
6251
|
"flow_control_tooltip_v1",
|
|
6252
|
-
|
|
6252
|
+
B.buildTooltipForDropdown("MODE", {
|
|
6253
6253
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
6254
6254
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6255
6255
|
})
|
|
@@ -6282,7 +6282,7 @@ const Rs = /* @__PURE__ */ new Set([
|
|
|
6282
6282
|
}
|
|
6283
6283
|
}
|
|
6284
6284
|
};
|
|
6285
|
-
|
|
6285
|
+
B.registerMixin(
|
|
6286
6286
|
"flow_control_in_loop_check_v1",
|
|
6287
6287
|
Ds
|
|
6288
6288
|
);
|
|
@@ -6333,9 +6333,9 @@ s.forBlock.flow_control_v1 = function(t) {
|
|
|
6333
6333
|
throw "unknown mode";
|
|
6334
6334
|
}
|
|
6335
6335
|
};
|
|
6336
|
-
|
|
6336
|
+
B.register(
|
|
6337
6337
|
"for_tooltip_v1",
|
|
6338
|
-
|
|
6338
|
+
B.buildTooltipWithFieldText(
|
|
6339
6339
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
6340
6340
|
"VAR"
|
|
6341
6341
|
)
|
|
@@ -6387,47 +6387,47 @@ h([
|
|
|
6387
6387
|
s.forBlock.for_v1 = function(t) {
|
|
6388
6388
|
const e = s.INDENT, n = s.getVariableName(
|
|
6389
6389
|
t.getFieldValue("VAR")
|
|
6390
|
-
), o = s.valueToCode(t, "FROM", c.ASSIGNMENT) || "0", i = s.valueToCode(t, "TO", c.ASSIGNMENT) || "0", a = s.valueToCode(t, "BY", c.ASSIGNMENT) || "1",
|
|
6390
|
+
), o = s.valueToCode(t, "FROM", c.ASSIGNMENT) || "0", i = s.valueToCode(t, "TO", c.ASSIGNMENT) || "0", a = s.valueToCode(t, "BY", c.ASSIGNMENT) || "1", l = s.addLoopTrap(
|
|
6391
6391
|
s.statementToCode(t, "DO"),
|
|
6392
6392
|
t
|
|
6393
6393
|
);
|
|
6394
6394
|
if (C.string.isNumber(o) && C.string.isNumber(i) && C.string.isNumber(a)) {
|
|
6395
|
-
const
|
|
6396
|
-
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${
|
|
6397
|
-
${
|
|
6398
|
-
` : `for (${n} = ${o}; ${n} >= ${i}; ${n} -= ${
|
|
6399
|
-
${
|
|
6395
|
+
const r = Math.abs(Number(a));
|
|
6396
|
+
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${r}) {
|
|
6397
|
+
${l}}
|
|
6398
|
+
` : `for (${n} = ${o}; ${n} >= ${i}; ${n} -= ${r}) {
|
|
6399
|
+
${l}}
|
|
6400
6400
|
`;
|
|
6401
6401
|
} else {
|
|
6402
|
-
let
|
|
6402
|
+
let r = "", u = o;
|
|
6403
6403
|
!o.match(/^\w+$/) && !C.string.isNumber(o) && (u = s.nameDB_.getDistinctName(
|
|
6404
6404
|
`${n}_from`,
|
|
6405
6405
|
et.NameType.VARIABLE
|
|
6406
|
-
),
|
|
6406
|
+
), r += `var ${u} = ${o};
|
|
6407
6407
|
`);
|
|
6408
6408
|
let _ = i;
|
|
6409
6409
|
!i.match(/^\w+$/) && !C.string.isNumber(i) && (_ = s.nameDB_.getDistinctName(
|
|
6410
6410
|
`${n}_to`,
|
|
6411
6411
|
et.NameType.VARIABLE
|
|
6412
|
-
),
|
|
6412
|
+
), r += `var ${_} = ${i};
|
|
6413
6413
|
`);
|
|
6414
6414
|
const T = s.nameDB_.getDistinctName(
|
|
6415
6415
|
`${n}_by`,
|
|
6416
6416
|
et.NameType.VARIABLE
|
|
6417
6417
|
);
|
|
6418
|
-
return
|
|
6419
|
-
` :
|
|
6420
|
-
`,
|
|
6418
|
+
return r += `var ${T} = `, C.string.isNumber(a) ? r += `${Math.abs(Number(a))};
|
|
6419
|
+
` : r += `Math.abs(${a});
|
|
6420
|
+
`, r += `if (${u} > ${_}) {
|
|
6421
6421
|
${e}${T} = -${T};
|
|
6422
6422
|
}
|
|
6423
|
-
`,
|
|
6424
|
-
${
|
|
6425
|
-
`,
|
|
6423
|
+
`, r += `for (${n} = ${u}; ${T} >= 0 ? ${n} <= ${_} : ${n} >= ${_}; ${n} += ${T}) {
|
|
6424
|
+
${l}}
|
|
6425
|
+
`, r;
|
|
6426
6426
|
}
|
|
6427
6427
|
};
|
|
6428
|
-
|
|
6428
|
+
B.register(
|
|
6429
6429
|
"for_each_tooltip_v1",
|
|
6430
|
-
|
|
6430
|
+
B.buildTooltipWithFieldText(
|
|
6431
6431
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
6432
6432
|
"VAR"
|
|
6433
6433
|
)
|
|
@@ -6469,18 +6469,18 @@ s.forBlock.for_each_v1 = function(t) {
|
|
|
6469
6469
|
s.statementToCode(t, "DO"),
|
|
6470
6470
|
t
|
|
6471
6471
|
);
|
|
6472
|
-
let a = "",
|
|
6473
|
-
o.match(/^\w+$/) || (
|
|
6472
|
+
let a = "", l = o;
|
|
6473
|
+
o.match(/^\w+$/) || (l = s.nameDB_.getDistinctName(
|
|
6474
6474
|
`${n}_list`,
|
|
6475
6475
|
et.NameType.VARIABLE
|
|
6476
|
-
), a += `var ${
|
|
6476
|
+
), a += `var ${l} = ${o};
|
|
6477
6477
|
`);
|
|
6478
|
-
const
|
|
6478
|
+
const r = s.nameDB_.getDistinctName(
|
|
6479
6479
|
`${n}_index`,
|
|
6480
6480
|
et.NameType.VARIABLE
|
|
6481
6481
|
);
|
|
6482
|
-
return a += `for (var ${
|
|
6483
|
-
${e}${n} = ${
|
|
6482
|
+
return a += `for (var ${r} in ${l}) {
|
|
6483
|
+
${e}${n} = ${l}[${r}];
|
|
6484
6484
|
${i}}
|
|
6485
6485
|
`, a;
|
|
6486
6486
|
};
|
|
@@ -6530,9 +6530,9 @@ s.forBlock.repeat_v1 = function(t) {
|
|
|
6530
6530
|
${n}}
|
|
6531
6531
|
`, o;
|
|
6532
6532
|
};
|
|
6533
|
-
|
|
6533
|
+
B.register(
|
|
6534
6534
|
"while_until_tooltip_v1",
|
|
6535
|
-
|
|
6535
|
+
B.buildTooltipForDropdown("MODE", {
|
|
6536
6536
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
6537
6537
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
6538
6538
|
})
|
|
@@ -6618,9 +6618,9 @@ const Ms = {
|
|
|
6618
6618
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
6619
6619
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
6620
6620
|
};
|
|
6621
|
-
|
|
6621
|
+
B.register(
|
|
6622
6622
|
"math_op_tooltip_v1",
|
|
6623
|
-
|
|
6623
|
+
B.buildTooltipForDropdown("OP", Ms)
|
|
6624
6624
|
);
|
|
6625
6625
|
h([
|
|
6626
6626
|
{
|
|
@@ -6820,10 +6820,10 @@ s.forBlock.math_number_property_v1 = function(t) {
|
|
|
6820
6820
|
NEGATIVE: [" < 0", c.RELATIONAL, c.RELATIONAL],
|
|
6821
6821
|
DIVISIBLE_BY: [null, c.MODULUS, c.EQUALITY],
|
|
6822
6822
|
PRIME: [null, c.NONE, c.FUNCTION_CALL]
|
|
6823
|
-
}, n = t.getFieldValue("PROPERTY"), [o, i, a] = e[t.getFieldValue("PROPERTY")],
|
|
6824
|
-
let
|
|
6823
|
+
}, n = t.getFieldValue("PROPERTY"), [o, i, a] = e[t.getFieldValue("PROPERTY")], l = s.valueToCode(t, "NUMBER_TO_CHECK", i) || "0";
|
|
6824
|
+
let r;
|
|
6825
6825
|
if (n === "PRIME")
|
|
6826
|
-
|
|
6826
|
+
r = s.provideFunction_(
|
|
6827
6827
|
"mathIsPrime",
|
|
6828
6828
|
`
|
|
6829
6829
|
function ${s.FUNCTION_NAME_PLACEHOLDER_}(n) {
|
|
@@ -6845,13 +6845,13 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(n) {
|
|
|
6845
6845
|
return true;
|
|
6846
6846
|
}
|
|
6847
6847
|
`
|
|
6848
|
-
) + "(" +
|
|
6848
|
+
) + "(" + l + ")";
|
|
6849
6849
|
else if (n === "DIVISIBLE_BY") {
|
|
6850
6850
|
const u = s.valueToCode(t, "DIVISOR", c.MODULUS) || "0";
|
|
6851
|
-
|
|
6851
|
+
r = l + " % " + u + " === 0";
|
|
6852
6852
|
} else
|
|
6853
|
-
|
|
6854
|
-
return [
|
|
6853
|
+
r = l + o;
|
|
6854
|
+
return [r, a];
|
|
6855
6855
|
};
|
|
6856
6856
|
h([
|
|
6857
6857
|
{
|
|
@@ -7240,7 +7240,7 @@ d.object_create_item_v1 = xs;
|
|
|
7240
7240
|
const Fs = {
|
|
7241
7241
|
init: function() {
|
|
7242
7242
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7243
|
-
new
|
|
7243
|
+
new dt.MutatorIcon(
|
|
7244
7244
|
["object_create_item_v1"],
|
|
7245
7245
|
this
|
|
7246
7246
|
)
|
|
@@ -7306,7 +7306,7 @@ const Fs = {
|
|
|
7306
7306
|
},
|
|
7307
7307
|
updateShape_: function() {
|
|
7308
7308
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7309
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new
|
|
7309
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new _t("key"), "KEY" + t);
|
|
7310
7310
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7311
7311
|
this.removeInput("ADD" + t);
|
|
7312
7312
|
}
|
|
@@ -7561,7 +7561,7 @@ const Tn = C.xml, Ys = {
|
|
|
7561
7561
|
d.procedure_def_container_v1 = Ys;
|
|
7562
7562
|
const ws = {
|
|
7563
7563
|
init: function() {
|
|
7564
|
-
const t = new
|
|
7564
|
+
const t = new _t(Ue.DEFAULT_ARG);
|
|
7565
7565
|
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;
|
|
7566
7566
|
},
|
|
7567
7567
|
validator_: function(t) {
|
|
@@ -7585,11 +7585,11 @@ d.procedure_def_item_v1 = ws;
|
|
|
7585
7585
|
const Ks = {
|
|
7586
7586
|
init: function() {
|
|
7587
7587
|
this.withReturn = !1, this.args = [];
|
|
7588
|
-
const t = new
|
|
7588
|
+
const t = new _t(
|
|
7589
7589
|
Ue.findLegalName("", this)
|
|
7590
7590
|
);
|
|
7591
7591
|
t.setValidator(Ue.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7592
|
-
new
|
|
7592
|
+
new dt.MutatorIcon(
|
|
7593
7593
|
["procedure_def_item_v1"],
|
|
7594
7594
|
this
|
|
7595
7595
|
)
|
|
@@ -7711,7 +7711,7 @@ const $s = C.xml, Hs = {
|
|
|
7711
7711
|
}, 0);
|
|
7712
7712
|
},
|
|
7713
7713
|
onchange: function(t) {
|
|
7714
|
-
if (t.type ===
|
|
7714
|
+
if (t.type === b.STATE_CHANGE)
|
|
7715
7715
|
this.checkWarning_();
|
|
7716
7716
|
else if (t.type === g.BLOCK_DRAG) {
|
|
7717
7717
|
const e = t;
|
|
@@ -7791,12 +7791,12 @@ function jn(t) {
|
|
|
7791
7791
|
return [];
|
|
7792
7792
|
const n = [];
|
|
7793
7793
|
function o(i, a) {
|
|
7794
|
-
const
|
|
7794
|
+
const l = a + i.name + "/";
|
|
7795
7795
|
n.push({
|
|
7796
7796
|
id: i.id,
|
|
7797
|
-
name:
|
|
7798
|
-
}), i.children.forEach((
|
|
7799
|
-
o(
|
|
7797
|
+
name: l
|
|
7798
|
+
}), i.children.forEach((r) => {
|
|
7799
|
+
o(r, l);
|
|
7800
7800
|
});
|
|
7801
7801
|
}
|
|
7802
7802
|
return o(e.dirTree, ""), n;
|
|
@@ -7846,10 +7846,10 @@ const Js = {
|
|
|
7846
7846
|
id: "",
|
|
7847
7847
|
name: ""
|
|
7848
7848
|
}, this.appendDummyInput().appendField("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TITLE").appendField(
|
|
7849
|
-
new
|
|
7849
|
+
new A(() => this.genSpaceOpts_()),
|
|
7850
7850
|
"SPACE"
|
|
7851
|
-
).appendField(new
|
|
7852
|
-
new
|
|
7851
|
+
).appendField(new A(() => this.genDirOpts_()), "DIR").appendField(
|
|
7852
|
+
new A(() => this.genResourceOpts_()),
|
|
7853
7853
|
"RESOURCE"
|
|
7854
7854
|
), this.setOutput(!0, "Resource"), this.setStyle("resource_blocks"), this.setTooltip("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TOOLTIP}"), this.setHelpUrl("%{BKY_RESOURCE_V1_SELECT_RESOURCE_HELPURL}"), this.initData_();
|
|
7855
7855
|
},
|
|
@@ -7919,7 +7919,7 @@ const qs = {
|
|
|
7919
7919
|
updateShadow_: function() {
|
|
7920
7920
|
if (this.isInsertionMarker())
|
|
7921
7921
|
return;
|
|
7922
|
-
const t =
|
|
7922
|
+
const t = ut("");
|
|
7923
7923
|
this.getInput("NAME")?.setShadowDom(t);
|
|
7924
7924
|
},
|
|
7925
7925
|
ensureBlocks_: function() {
|
|
@@ -7964,12 +7964,12 @@ s.forBlock.text_v1 = function(t) {
|
|
|
7964
7964
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7965
7965
|
};
|
|
7966
7966
|
const Qs = /^\s*'([^']|\\')*'\s*$/;
|
|
7967
|
-
function
|
|
7967
|
+
function jt(t) {
|
|
7968
7968
|
return Qs.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7969
7969
|
}
|
|
7970
|
-
|
|
7970
|
+
B.register(
|
|
7971
7971
|
"text_append_tooltip_v1",
|
|
7972
|
-
|
|
7972
|
+
B.buildTooltipWithFieldText(
|
|
7973
7973
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
7974
7974
|
"VAR"
|
|
7975
7975
|
)
|
|
@@ -8000,7 +8000,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
8000
8000
|
t.getFieldValue("VAR"),
|
|
8001
8001
|
et.NameType.VARIABLE
|
|
8002
8002
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
8003
|
-
return `${e} += ${
|
|
8003
|
+
return `${e} += ${jt(n)};
|
|
8004
8004
|
`;
|
|
8005
8005
|
};
|
|
8006
8006
|
h([
|
|
@@ -8244,9 +8244,9 @@ const zs = C.xml, Zs = {
|
|
|
8244
8244
|
this.removeInput("ADD" + t);
|
|
8245
8245
|
}
|
|
8246
8246
|
}, ta = function() {
|
|
8247
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8247
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new dt.MutatorIcon(["text_join_item_v1"], this));
|
|
8248
8248
|
};
|
|
8249
|
-
|
|
8249
|
+
B.registerMutator(
|
|
8250
8250
|
"text_join_mutator_v1",
|
|
8251
8251
|
Zs,
|
|
8252
8252
|
ta
|
|
@@ -8292,11 +8292,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8292
8292
|
return ["''", c.ATOMIC];
|
|
8293
8293
|
case 1: {
|
|
8294
8294
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8295
|
-
return
|
|
8295
|
+
return jt(n);
|
|
8296
8296
|
}
|
|
8297
8297
|
case 2: {
|
|
8298
8298
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8299
|
-
return [
|
|
8299
|
+
return [jt(n)[0] + " + " + jt(o)[0], c.ADDITION];
|
|
8300
8300
|
}
|
|
8301
8301
|
default: {
|
|
8302
8302
|
const n = new Array(e.itemCount_);
|
|
@@ -8497,13 +8497,13 @@ const ea = {
|
|
|
8497
8497
|
updateShadow_: function() {
|
|
8498
8498
|
if (this.isInsertionMarker())
|
|
8499
8499
|
return;
|
|
8500
|
-
const t =
|
|
8500
|
+
const t = zt(1e3);
|
|
8501
8501
|
this.getInput("INTERVAL")?.setShadowDom(t);
|
|
8502
|
-
const e =
|
|
8502
|
+
const e = Zt(!1);
|
|
8503
8503
|
this.getInput("LOOP")?.setShadowDom(e);
|
|
8504
|
-
const n =
|
|
8504
|
+
const n = zt(1);
|
|
8505
8505
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
8506
|
-
const o =
|
|
8506
|
+
const o = Zt(!1);
|
|
8507
8507
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
8508
8508
|
}
|
|
8509
8509
|
};
|
|
@@ -8576,7 +8576,7 @@ const na = {
|
|
|
8576
8576
|
n && At.deleteVariable(n.getWorkspace(), n, t);
|
|
8577
8577
|
};
|
|
8578
8578
|
};
|
|
8579
|
-
|
|
8579
|
+
B.registerMixin(
|
|
8580
8580
|
"context_menu_variable_v1",
|
|
8581
8581
|
na
|
|
8582
8582
|
);
|
|
@@ -8652,7 +8652,7 @@ function qn(t) {
|
|
|
8652
8652
|
e.setAttribute(n, o);
|
|
8653
8653
|
return e;
|
|
8654
8654
|
}
|
|
8655
|
-
function
|
|
8655
|
+
function yt(t, e) {
|
|
8656
8656
|
e === void 0 && (e = "");
|
|
8657
8657
|
const n = x.createElement("value");
|
|
8658
8658
|
n.setAttribute("name", t);
|
|
@@ -8694,23 +8694,23 @@ function ca() {
|
|
|
8694
8694
|
function gn() {
|
|
8695
8695
|
return f.app.activeObject.type === "comp" && f.app.activeComp.meta.methods.length > 0;
|
|
8696
8696
|
}
|
|
8697
|
-
function
|
|
8697
|
+
function la() {
|
|
8698
8698
|
const t = [];
|
|
8699
|
-
return t.push(V(p("LABEL_EVENT"))),
|
|
8699
|
+
return t.push(V(p("LABEL_EVENT"))), W("onEvent") && t.push(O("on_app_event_v1")), aa() && t.push(O("trigger_app_event_v1")), t.push(
|
|
8700
8700
|
O("app_bind_v1", [qn([{ key: "items", value: "2" }])])
|
|
8701
|
-
), t.push(O("watch_effect_v1")), (
|
|
8701
|
+
), 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")), ca() && (t.push(V(p("LABEL_STATE"))), t.push(O("get_app_state_v1")), t.push(O("set_app_state_v1"))), (W("callMethod") || gn()) && t.push(V(p("LABEL_METHOD"))), W("callMethod") && t.push(O("call_app_method_v1")), gn() && (t.push(O("impl_app_method_v1")), t.push(O("set_app_method_output_v1")), t.push(O("procedure_return_v1"))), t;
|
|
8702
8702
|
}
|
|
8703
|
-
const Qn = { name: "APP_COMP_CATEGORY", callback:
|
|
8704
|
-
function
|
|
8703
|
+
const Qn = { name: "APP_COMP_CATEGORY", callback: la };
|
|
8704
|
+
function ra() {
|
|
8705
8705
|
const t = [];
|
|
8706
8706
|
return t.push(V(p("LABEL_FUNC"))), t.push(V(p("LABEL_FLOW"))), t;
|
|
8707
8707
|
}
|
|
8708
|
-
const
|
|
8708
|
+
const oe = { name: "APP_COMPUTE_CATEGORY", callback: ra };
|
|
8709
8709
|
function ua() {
|
|
8710
8710
|
const t = [];
|
|
8711
|
-
return t.push(O("app_debug_trace_v1", [
|
|
8711
|
+
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;
|
|
8712
8712
|
}
|
|
8713
|
-
const
|
|
8713
|
+
const ie = { name: "APP_MESSAGE_CATEGORY", callback: ua };
|
|
8714
8714
|
function _a() {
|
|
8715
8715
|
for (const t of f.app.appList)
|
|
8716
8716
|
if (t.pages.length > 0)
|
|
@@ -8721,7 +8721,7 @@ function pa() {
|
|
|
8721
8721
|
const t = [];
|
|
8722
8722
|
return t.push(O("app_env_is_v1")), _a() && t.push(O("navigate_to_v1")), t;
|
|
8723
8723
|
}
|
|
8724
|
-
const
|
|
8724
|
+
const se = { name: "APP_MISC_CATEGORY", callback: pa };
|
|
8725
8725
|
function ha() {
|
|
8726
8726
|
return f.app.activeObject.type === "page" && f.app.activePage.meta.states.length > 0;
|
|
8727
8727
|
}
|
|
@@ -8730,47 +8730,47 @@ function da() {
|
|
|
8730
8730
|
}
|
|
8731
8731
|
function fa() {
|
|
8732
8732
|
const t = [];
|
|
8733
|
-
return t.push(V(p("LABEL_EVENT"))),
|
|
8733
|
+
return t.push(V(p("LABEL_EVENT"))), W("onEvent") && t.push(O("on_app_event_v1")), t.push(
|
|
8734
8734
|
O("app_bind_v1", [qn([{ key: "items", value: "2" }])])
|
|
8735
|
-
), t.push(O("watch_effect_v1")), (
|
|
8735
|
+
), 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") && (t.push(V(p("LABEL_METHOD"))), t.push(O("call_app_method_v1"))), da() && (t.push(V(p("LABEL_ARGUMENT"))), t.push(O("get_page_argument_v1"))), t;
|
|
8736
8736
|
}
|
|
8737
8737
|
const zn = { name: "APP_PAGE_CATEGORY", callback: fa };
|
|
8738
8738
|
function ma() {
|
|
8739
8739
|
const t = [];
|
|
8740
8740
|
return t.push(V(p("LABEL_RESOURCE"))), t.push(O("upload_resource_v1")), t;
|
|
8741
8741
|
}
|
|
8742
|
-
const
|
|
8742
|
+
const ae = { name: "APP_RESOURCE_CATEGORY", callback: ma }, Bt = C.xml;
|
|
8743
8743
|
function Ta() {
|
|
8744
8744
|
const t = [];
|
|
8745
8745
|
{
|
|
8746
|
-
const e =
|
|
8746
|
+
const e = Bt.createElement("label");
|
|
8747
8747
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8748
8748
|
}
|
|
8749
8749
|
{
|
|
8750
|
-
const e =
|
|
8750
|
+
const e = Bt.createElement("block");
|
|
8751
8751
|
e.setAttribute("type", "procedure_def_v1");
|
|
8752
8752
|
{
|
|
8753
|
-
const n =
|
|
8753
|
+
const n = Bt.createElement("field");
|
|
8754
8754
|
n.setAttribute("name", "NAME");
|
|
8755
|
-
const o =
|
|
8755
|
+
const o = Bt.createTextNode(p("PROCEDURE_DEFAULT_NAME"));
|
|
8756
8756
|
n.appendChild(o), e.appendChild(n);
|
|
8757
8757
|
}
|
|
8758
8758
|
t.push(e);
|
|
8759
8759
|
}
|
|
8760
8760
|
{
|
|
8761
|
-
const e =
|
|
8761
|
+
const e = Bt.createElement("block");
|
|
8762
8762
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8763
8763
|
}
|
|
8764
8764
|
return t;
|
|
8765
8765
|
}
|
|
8766
|
-
const
|
|
8766
|
+
const ct = {
|
|
8767
8767
|
name: "PROCEDURE_CATEGORY",
|
|
8768
8768
|
callback: Ta
|
|
8769
|
-
},
|
|
8769
|
+
}, Gt = C.xml;
|
|
8770
8770
|
function Ea() {
|
|
8771
|
-
const t =
|
|
8771
|
+
const t = xt(), e = [];
|
|
8772
8772
|
{
|
|
8773
|
-
const o =
|
|
8773
|
+
const o = Gt.createElement("label");
|
|
8774
8774
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8775
8775
|
}
|
|
8776
8776
|
{
|
|
@@ -8789,21 +8789,21 @@ function Ea() {
|
|
|
8789
8789
|
return e;
|
|
8790
8790
|
n.sort(At.compareByName);
|
|
8791
8791
|
{
|
|
8792
|
-
const o =
|
|
8792
|
+
const o = Gt.createElement("label");
|
|
8793
8793
|
o.setAttribute("text", p("LABEL_CREATED")), e.push(o);
|
|
8794
8794
|
}
|
|
8795
8795
|
return n.forEach((o) => {
|
|
8796
8796
|
{
|
|
8797
|
-
const i =
|
|
8797
|
+
const i = Gt.createElement("block");
|
|
8798
8798
|
i.setAttribute("type", "variable_get_v1"), i.appendChild(At.generateVariableFieldDom(o)), e.push(i);
|
|
8799
8799
|
}
|
|
8800
8800
|
{
|
|
8801
|
-
const i =
|
|
8801
|
+
const i = Gt.createElement("block");
|
|
8802
8802
|
i.setAttribute("type", "variable_set_v1"), i.appendChild(At.generateVariableFieldDom(o)), e.push(i);
|
|
8803
8803
|
}
|
|
8804
8804
|
}), e;
|
|
8805
8805
|
}
|
|
8806
|
-
const
|
|
8806
|
+
const lt = {
|
|
8807
8807
|
name: "VARIABLE_CATEGORY",
|
|
8808
8808
|
callback: Ea
|
|
8809
8809
|
};
|
|
@@ -8811,15 +8811,15 @@ function ga() {
|
|
|
8811
8811
|
const t = [];
|
|
8812
8812
|
if (q().length > 0)
|
|
8813
8813
|
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(
|
|
8814
|
-
O("interrupt_transaction_v1", [
|
|
8815
|
-
), t.push(V(p("LABEL_CONDITION"))), t.push(O("cond_logic_v1")), t.push(O("cond_atomic_v1", [
|
|
8814
|
+
O("interrupt_transaction_v1", [yt("VALUE")])
|
|
8815
|
+
), 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(
|
|
8816
8816
|
O("query_extra_limit_v1", [
|
|
8817
8817
|
En("OFFSET", 0),
|
|
8818
8818
|
En("LIMIT", 1)
|
|
8819
8819
|
])
|
|
8820
8820
|
), t.push(
|
|
8821
8821
|
O("query_extra_sortby_v1", [
|
|
8822
|
-
|
|
8822
|
+
yt("COLUMN"),
|
|
8823
8823
|
sa("DESC")
|
|
8824
8824
|
])
|
|
8825
8825
|
);
|
|
@@ -8829,30 +8829,30 @@ function ga() {
|
|
|
8829
8829
|
}
|
|
8830
8830
|
return t;
|
|
8831
8831
|
}
|
|
8832
|
-
const
|
|
8833
|
-
function Aa() {
|
|
8834
|
-
return Yt("flow").length > 0;
|
|
8835
|
-
}
|
|
8832
|
+
const ce = { name: "COMPUTE_DATA_CATEGORY", callback: ga };
|
|
8836
8833
|
function Ia() {
|
|
8834
|
+
return Kt("flow").length > 0;
|
|
8835
|
+
}
|
|
8836
|
+
function Aa() {
|
|
8837
8837
|
const t = [];
|
|
8838
|
-
return f.compute.activeObject.type === "flow" && t.push(O("on_flow_state_event_v1")),
|
|
8838
|
+
return f.compute.activeObject.type === "flow" && t.push(O("on_flow_state_event_v1")), Ia() && console.assert(!0), t;
|
|
8839
8839
|
}
|
|
8840
|
-
const
|
|
8840
|
+
const le = { name: "COMPUTE_FLOW_CATEGORY", callback: Aa };
|
|
8841
8841
|
function Oa() {
|
|
8842
|
-
return
|
|
8842
|
+
return Kt("func").length > 0;
|
|
8843
8843
|
}
|
|
8844
8844
|
function va() {
|
|
8845
8845
|
const t = [];
|
|
8846
8846
|
return f.compute.activeObject.type === "func" && (t.push(O("func_entry_v1")), f.compute.activeFunc.outputs.length > 0 && t.push(O("set_func_output_v1")), t.push(O("procedure_return_v1"))), Oa() && t.push(O("call_func_internal_v1")), t;
|
|
8847
8847
|
}
|
|
8848
|
-
const
|
|
8848
|
+
const re = { name: "COMPUTE_FUNC_CATEGORY", callback: va };
|
|
8849
8849
|
function Ca() {
|
|
8850
8850
|
const t = [];
|
|
8851
8851
|
return t.push(
|
|
8852
|
-
O("compute_debug_trace_v1", [
|
|
8852
|
+
O("compute_debug_trace_v1", [yt("OBJECT")])
|
|
8853
8853
|
), t;
|
|
8854
8854
|
}
|
|
8855
|
-
const
|
|
8855
|
+
const ue = { name: "COMPUTE_MISC_CATEGORY", callback: Ca };
|
|
8856
8856
|
kn.setConfirm(async (t, e) => {
|
|
8857
8857
|
const n = await wo({
|
|
8858
8858
|
title: "",
|
|
@@ -8868,7 +8868,7 @@ kn.setPrompt(async (t, e, n) => {
|
|
|
8868
8868
|
o !== void 0 && n(String(o));
|
|
8869
8869
|
});
|
|
8870
8870
|
function qe(t) {
|
|
8871
|
-
const e =
|
|
8871
|
+
const e = xt();
|
|
8872
8872
|
if (!e)
|
|
8873
8873
|
return;
|
|
8874
8874
|
const n = e.getBlockById(t);
|
|
@@ -8877,26 +8877,26 @@ function qe(t) {
|
|
|
8877
8877
|
const o = n.getRootBlock();
|
|
8878
8878
|
if (!o)
|
|
8879
8879
|
return;
|
|
8880
|
-
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale,
|
|
8881
|
-
e.scroll(-a, -
|
|
8880
|
+
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, l = i.y * e.scale;
|
|
8881
|
+
e.scroll(-a, -l);
|
|
8882
8882
|
}
|
|
8883
8883
|
function Zn() {
|
|
8884
|
-
const t =
|
|
8884
|
+
const t = xt();
|
|
8885
8885
|
if (!t)
|
|
8886
8886
|
return;
|
|
8887
8887
|
const e = t.getTopBlocks(!0)?.[0];
|
|
8888
8888
|
e && qe(e.id);
|
|
8889
8889
|
}
|
|
8890
|
-
const
|
|
8891
|
-
|
|
8890
|
+
const $t = A.prototype;
|
|
8891
|
+
$t.doClassValidation_ = function(t) {
|
|
8892
8892
|
return t;
|
|
8893
8893
|
};
|
|
8894
|
-
const ya =
|
|
8895
|
-
|
|
8894
|
+
const ya = $t.doValueUpdate_;
|
|
8895
|
+
$t.doValueUpdate_ = function(t) {
|
|
8896
8896
|
ya.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
8897
8897
|
};
|
|
8898
|
-
const ka =
|
|
8899
|
-
|
|
8898
|
+
const ka = $t.getText_;
|
|
8899
|
+
$t.getText_ = function() {
|
|
8900
8900
|
if (this.selectedOption)
|
|
8901
8901
|
return ka.call(this);
|
|
8902
8902
|
const { i18n: t } = nt, e = this.getSourceBlock();
|
|
@@ -8917,7 +8917,7 @@ wt.getText_ = function() {
|
|
|
8917
8917
|
return xn(n, o);
|
|
8918
8918
|
} else if (this.name === "EVENT") {
|
|
8919
8919
|
const { names: n, from: o } = e.event;
|
|
8920
|
-
return
|
|
8920
|
+
return he(n, o);
|
|
8921
8921
|
} else if (this.name === "METHOD") {
|
|
8922
8922
|
const { names: n, from: o } = e.method;
|
|
8923
8923
|
return je(n, o);
|
|
@@ -8939,27 +8939,27 @@ wt.getText_ = function() {
|
|
|
8939
8939
|
}
|
|
8940
8940
|
return "<n/a>";
|
|
8941
8941
|
};
|
|
8942
|
-
const
|
|
8942
|
+
const In = 60;
|
|
8943
8943
|
yo.prototype.cleanUp = function() {
|
|
8944
8944
|
this.setResizesEnabled(!1);
|
|
8945
8945
|
const t = g.getGroup();
|
|
8946
8946
|
t || g.setGroup(!0);
|
|
8947
|
-
const e = this.getTopBlocks(!0), n = e.filter((
|
|
8948
|
-
(
|
|
8949
|
-
), a = function(
|
|
8947
|
+
const e = this.getTopBlocks(!0), n = e.filter((r) => r.isMovable()), i = e.filter((r) => !r.isMovable()).map(
|
|
8948
|
+
(r) => r.getBoundingRectangle()
|
|
8949
|
+
), a = function(r) {
|
|
8950
8950
|
for (const u of i)
|
|
8951
|
-
if (
|
|
8951
|
+
if (r.intersects(u))
|
|
8952
8952
|
return u;
|
|
8953
8953
|
return null;
|
|
8954
8954
|
};
|
|
8955
|
-
let
|
|
8956
|
-
for (const
|
|
8957
|
-
let u =
|
|
8958
|
-
|
|
8955
|
+
let l = 0;
|
|
8956
|
+
for (const r of n) {
|
|
8957
|
+
let u = r.getBoundingRectangle();
|
|
8958
|
+
r.moveBy(-u.left, l - u.top, ["cleanup"]), r.snapToGrid(), u = r.getBoundingRectangle();
|
|
8959
8959
|
let _ = a(u);
|
|
8960
8960
|
for (; _ != null; )
|
|
8961
|
-
|
|
8962
|
-
|
|
8961
|
+
l = _.top + _.getHeight() + In, r.moveBy(0, l - u.top, ["cleanup"]), r.snapToGrid(), u = r.getBoundingRectangle(), _ = a(u);
|
|
8962
|
+
l = r.getRelativeToSurfaceXY().y + r.getHeightWidth().height + In;
|
|
8963
8963
|
}
|
|
8964
8964
|
g.setGroup(t), this.setResizesEnabled(!0);
|
|
8965
8965
|
};
|
|
@@ -8982,7 +8982,7 @@ const La = new Bo.CrossTabCopyPaste();
|
|
|
8982
8982
|
La.init({ contextMenu: !0, shortcut: !0 });
|
|
8983
8983
|
const Sa = new Na();
|
|
8984
8984
|
Sa.init();
|
|
8985
|
-
|
|
8985
|
+
_e.Classic.blockStyles = {
|
|
8986
8986
|
color_blocks: {
|
|
8987
8987
|
colourPrimary: "#a5745b",
|
|
8988
8988
|
colourSecondary: "#ede3de",
|
|
@@ -9068,7 +9068,7 @@ ue.Classic.blockStyles = {
|
|
|
9068
9068
|
hat: ""
|
|
9069
9069
|
}
|
|
9070
9070
|
};
|
|
9071
|
-
|
|
9071
|
+
_e.Classic.categoryStyles = {
|
|
9072
9072
|
color_category: {
|
|
9073
9073
|
colour: "#a5745b"
|
|
9074
9074
|
},
|
|
@@ -9135,7 +9135,7 @@ ue.Classic.categoryStyles = {
|
|
|
9135
9135
|
};
|
|
9136
9136
|
const Ba = Nn.defineTheme("light", {
|
|
9137
9137
|
name: "light",
|
|
9138
|
-
base:
|
|
9138
|
+
base: _e.Classic,
|
|
9139
9139
|
componentStyles: {
|
|
9140
9140
|
workspaceBackgroundColour: "#ffffff",
|
|
9141
9141
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9151,7 +9151,7 @@ const Ba = Nn.defineTheme("light", {
|
|
|
9151
9151
|
}
|
|
9152
9152
|
}), ba = Nn.defineTheme("dark", {
|
|
9153
9153
|
name: "dark",
|
|
9154
|
-
base:
|
|
9154
|
+
base: _e.Classic,
|
|
9155
9155
|
componentStyles: {
|
|
9156
9156
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9157
9157
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9167,7 +9167,7 @@ const Ba = Nn.defineTheme("light", {
|
|
|
9167
9167
|
}
|
|
9168
9168
|
});
|
|
9169
9169
|
function Pa(t) {
|
|
9170
|
-
const e =
|
|
9170
|
+
const e = xt();
|
|
9171
9171
|
switch (t) {
|
|
9172
9172
|
case "light":
|
|
9173
9173
|
e.setTheme(Ba);
|
|
@@ -9177,7 +9177,7 @@ function Pa(t) {
|
|
|
9177
9177
|
break;
|
|
9178
9178
|
}
|
|
9179
9179
|
}
|
|
9180
|
-
const
|
|
9180
|
+
const Te = {
|
|
9181
9181
|
kind: "category",
|
|
9182
9182
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9183
9183
|
categorystyle: "color_category",
|
|
@@ -9251,7 +9251,7 @@ const me = {
|
|
|
9251
9251
|
}
|
|
9252
9252
|
}
|
|
9253
9253
|
]
|
|
9254
|
-
},
|
|
9254
|
+
}, Ee = {
|
|
9255
9255
|
kind: "category",
|
|
9256
9256
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9257
9257
|
categorystyle: "list_category",
|
|
@@ -9366,7 +9366,7 @@ const me = {
|
|
|
9366
9366
|
type: "list_reverse_v1"
|
|
9367
9367
|
}
|
|
9368
9368
|
]
|
|
9369
|
-
},
|
|
9369
|
+
}, ge = {
|
|
9370
9370
|
kind: "category",
|
|
9371
9371
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9372
9372
|
categorystyle: "logic_category",
|
|
@@ -9408,7 +9408,7 @@ const me = {
|
|
|
9408
9408
|
type: "logic_ternary_v1"
|
|
9409
9409
|
}
|
|
9410
9410
|
]
|
|
9411
|
-
},
|
|
9411
|
+
}, Ie = {
|
|
9412
9412
|
kind: "category",
|
|
9413
9413
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9414
9414
|
categorystyle: "loop_category",
|
|
@@ -9625,7 +9625,7 @@ const me = {
|
|
|
9625
9625
|
type: "math_on_list_v1"
|
|
9626
9626
|
}
|
|
9627
9627
|
]
|
|
9628
|
-
},
|
|
9628
|
+
}, Oe = {
|
|
9629
9629
|
kind: "category",
|
|
9630
9630
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9631
9631
|
categorystyle: "object_category",
|
|
@@ -9693,7 +9693,7 @@ const me = {
|
|
|
9693
9693
|
}
|
|
9694
9694
|
}
|
|
9695
9695
|
]
|
|
9696
|
-
},
|
|
9696
|
+
}, ve = {
|
|
9697
9697
|
kind: "category",
|
|
9698
9698
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9699
9699
|
categorystyle: "text_category",
|
|
@@ -9893,45 +9893,45 @@ const me = {
|
|
|
9893
9893
|
kind: "category",
|
|
9894
9894
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9895
9895
|
categorystyle: "misc_category",
|
|
9896
|
-
custom:
|
|
9896
|
+
custom: ie.name
|
|
9897
9897
|
},
|
|
9898
9898
|
{
|
|
9899
9899
|
kind: "category",
|
|
9900
9900
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9901
9901
|
categorystyle: "misc_category",
|
|
9902
|
-
custom:
|
|
9902
|
+
custom: se.name
|
|
9903
9903
|
},
|
|
9904
|
+
Ie,
|
|
9904
9905
|
ge,
|
|
9905
|
-
Ee,
|
|
9906
9906
|
Ae,
|
|
9907
|
+
ve,
|
|
9908
|
+
Ee,
|
|
9907
9909
|
Oe,
|
|
9908
9910
|
Te,
|
|
9909
|
-
Ie,
|
|
9910
|
-
me,
|
|
9911
9911
|
eo,
|
|
9912
9912
|
{
|
|
9913
9913
|
kind: "category",
|
|
9914
9914
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9915
9915
|
categorystyle: "variable_category",
|
|
9916
|
-
custom:
|
|
9916
|
+
custom: lt.name
|
|
9917
9917
|
},
|
|
9918
9918
|
{
|
|
9919
9919
|
kind: "category",
|
|
9920
9920
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9921
9921
|
categorystyle: "procedure_category",
|
|
9922
|
-
custom:
|
|
9922
|
+
custom: ct.name
|
|
9923
9923
|
},
|
|
9924
9924
|
{
|
|
9925
9925
|
kind: "category",
|
|
9926
9926
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9927
9927
|
categorystyle: "resource_category",
|
|
9928
|
-
custom:
|
|
9928
|
+
custom: ae.name
|
|
9929
9929
|
},
|
|
9930
9930
|
{
|
|
9931
9931
|
kind: "category",
|
|
9932
9932
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9933
9933
|
categorystyle: "compute_category",
|
|
9934
|
-
custom:
|
|
9934
|
+
custom: oe.name
|
|
9935
9935
|
}
|
|
9936
9936
|
]
|
|
9937
9937
|
}, Da = {
|
|
@@ -9941,44 +9941,44 @@ const me = {
|
|
|
9941
9941
|
kind: "category",
|
|
9942
9942
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9943
9943
|
categorystyle: "func_category",
|
|
9944
|
-
custom:
|
|
9944
|
+
custom: re.name
|
|
9945
9945
|
},
|
|
9946
9946
|
{
|
|
9947
9947
|
kind: "category",
|
|
9948
9948
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9949
9949
|
categorystyle: "flow_category",
|
|
9950
|
-
custom:
|
|
9950
|
+
custom: le.name
|
|
9951
9951
|
},
|
|
9952
9952
|
{
|
|
9953
9953
|
kind: "category",
|
|
9954
9954
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9955
9955
|
categorystyle: "data_category",
|
|
9956
|
-
custom:
|
|
9956
|
+
custom: ce.name
|
|
9957
9957
|
},
|
|
9958
9958
|
{
|
|
9959
9959
|
kind: "category",
|
|
9960
9960
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9961
9961
|
categorystyle: "misc_category",
|
|
9962
|
-
custom:
|
|
9962
|
+
custom: ue.name
|
|
9963
9963
|
},
|
|
9964
|
+
Ie,
|
|
9964
9965
|
ge,
|
|
9965
|
-
Ee,
|
|
9966
9966
|
Ae,
|
|
9967
|
+
ve,
|
|
9968
|
+
Ee,
|
|
9967
9969
|
Oe,
|
|
9968
9970
|
Te,
|
|
9969
|
-
Ie,
|
|
9970
|
-
me,
|
|
9971
9971
|
{
|
|
9972
9972
|
kind: "category",
|
|
9973
9973
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9974
9974
|
categorystyle: "variable_category",
|
|
9975
|
-
custom:
|
|
9975
|
+
custom: lt.name
|
|
9976
9976
|
},
|
|
9977
9977
|
{
|
|
9978
9978
|
kind: "category",
|
|
9979
9979
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9980
9980
|
categorystyle: "procedure_category",
|
|
9981
|
-
custom:
|
|
9981
|
+
custom: ct.name
|
|
9982
9982
|
}
|
|
9983
9983
|
]
|
|
9984
9984
|
}, Ma = {
|
|
@@ -9988,44 +9988,44 @@ const me = {
|
|
|
9988
9988
|
kind: "category",
|
|
9989
9989
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9990
9990
|
categorystyle: "func_category",
|
|
9991
|
-
custom:
|
|
9991
|
+
custom: re.name
|
|
9992
9992
|
},
|
|
9993
9993
|
{
|
|
9994
9994
|
kind: "category",
|
|
9995
9995
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9996
9996
|
categorystyle: "flow_category",
|
|
9997
|
-
custom:
|
|
9997
|
+
custom: le.name
|
|
9998
9998
|
},
|
|
9999
9999
|
{
|
|
10000
10000
|
kind: "category",
|
|
10001
10001
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10002
10002
|
categorystyle: "data_category",
|
|
10003
|
-
custom:
|
|
10003
|
+
custom: ce.name
|
|
10004
10004
|
},
|
|
10005
10005
|
{
|
|
10006
10006
|
kind: "category",
|
|
10007
10007
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10008
10008
|
categorystyle: "misc_category",
|
|
10009
|
-
custom:
|
|
10009
|
+
custom: ue.name
|
|
10010
10010
|
},
|
|
10011
|
+
Ie,
|
|
10011
10012
|
ge,
|
|
10012
|
-
Ee,
|
|
10013
10013
|
Ae,
|
|
10014
|
+
ve,
|
|
10015
|
+
Ee,
|
|
10014
10016
|
Oe,
|
|
10015
10017
|
Te,
|
|
10016
|
-
Ie,
|
|
10017
|
-
me,
|
|
10018
10018
|
{
|
|
10019
10019
|
kind: "category",
|
|
10020
10020
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10021
10021
|
categorystyle: "variable_category",
|
|
10022
|
-
custom:
|
|
10022
|
+
custom: lt.name
|
|
10023
10023
|
},
|
|
10024
10024
|
{
|
|
10025
10025
|
kind: "category",
|
|
10026
10026
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10027
10027
|
categorystyle: "procedure_category",
|
|
10028
|
-
custom:
|
|
10028
|
+
custom: ct.name
|
|
10029
10029
|
}
|
|
10030
10030
|
]
|
|
10031
10031
|
}, Ua = {
|
|
@@ -10072,45 +10072,45 @@ const me = {
|
|
|
10072
10072
|
kind: "category",
|
|
10073
10073
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
10074
10074
|
categorystyle: "misc_category",
|
|
10075
|
-
custom:
|
|
10075
|
+
custom: ie.name
|
|
10076
10076
|
},
|
|
10077
10077
|
{
|
|
10078
10078
|
kind: "category",
|
|
10079
10079
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10080
10080
|
categorystyle: "misc_category",
|
|
10081
|
-
custom:
|
|
10081
|
+
custom: se.name
|
|
10082
10082
|
},
|
|
10083
|
+
Ie,
|
|
10083
10084
|
ge,
|
|
10084
|
-
Ee,
|
|
10085
10085
|
Ae,
|
|
10086
|
+
ve,
|
|
10087
|
+
Ee,
|
|
10086
10088
|
Oe,
|
|
10087
10089
|
Te,
|
|
10088
|
-
Ie,
|
|
10089
|
-
me,
|
|
10090
10090
|
eo,
|
|
10091
10091
|
{
|
|
10092
10092
|
kind: "category",
|
|
10093
10093
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10094
10094
|
categorystyle: "variable_category",
|
|
10095
|
-
custom:
|
|
10095
|
+
custom: lt.name
|
|
10096
10096
|
},
|
|
10097
10097
|
{
|
|
10098
10098
|
kind: "category",
|
|
10099
10099
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10100
10100
|
categorystyle: "procedure_category",
|
|
10101
|
-
custom:
|
|
10101
|
+
custom: ct.name
|
|
10102
10102
|
},
|
|
10103
10103
|
{
|
|
10104
10104
|
kind: "category",
|
|
10105
10105
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10106
10106
|
categorystyle: "resource_category",
|
|
10107
|
-
custom:
|
|
10107
|
+
custom: ae.name
|
|
10108
10108
|
},
|
|
10109
10109
|
{
|
|
10110
10110
|
kind: "category",
|
|
10111
10111
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10112
10112
|
categorystyle: "compute_category",
|
|
10113
|
-
custom:
|
|
10113
|
+
custom: oe.name
|
|
10114
10114
|
}
|
|
10115
10115
|
]
|
|
10116
10116
|
}, $e = ["get_app_prop_v1", "get_app_state_v1"];
|
|
@@ -10186,33 +10186,33 @@ function wa(t) {
|
|
|
10186
10186
|
c.ATOMIC
|
|
10187
10187
|
);
|
|
10188
10188
|
if (i.type === "get_app_prop_v1") {
|
|
10189
|
-
const
|
|
10190
|
-
let
|
|
10191
|
-
if (
|
|
10189
|
+
const l = i;
|
|
10190
|
+
let r;
|
|
10191
|
+
if (l.prop.from === "regular" ? r = {
|
|
10192
10192
|
type: "elementProp",
|
|
10193
|
-
nodeId:
|
|
10194
|
-
propKeys:
|
|
10193
|
+
nodeId: l.node.id,
|
|
10194
|
+
propKeys: l.prop.key,
|
|
10195
10195
|
subKeys: a
|
|
10196
|
-
} :
|
|
10196
|
+
} : l.prop.from === "custom" ? r = {
|
|
10197
10197
|
type: "customProp",
|
|
10198
|
-
propId:
|
|
10198
|
+
propId: l.prop.key,
|
|
10199
10199
|
subKeys: a
|
|
10200
|
-
} :
|
|
10200
|
+
} : l.prop.from === "slot" && (r = {
|
|
10201
10201
|
type: "adaptSlotProp",
|
|
10202
|
-
propId:
|
|
10202
|
+
propId: l.prop.key,
|
|
10203
10203
|
subKeys: a
|
|
10204
|
-
}), !
|
|
10204
|
+
}), !r || !rt(n, Tt(r)))
|
|
10205
10205
|
continue;
|
|
10206
|
-
e.push(
|
|
10206
|
+
e.push(r);
|
|
10207
10207
|
} else if (i.type === "get_app_state_v1") {
|
|
10208
|
-
const
|
|
10208
|
+
const r = {
|
|
10209
10209
|
type: "customState",
|
|
10210
10210
|
stateId: i.state.id,
|
|
10211
10211
|
subKeys: a
|
|
10212
10212
|
};
|
|
10213
|
-
if (!rt(n, Tt(
|
|
10213
|
+
if (!rt(n, Tt(r)))
|
|
10214
10214
|
continue;
|
|
10215
|
-
e.push(
|
|
10215
|
+
e.push(r);
|
|
10216
10216
|
} else
|
|
10217
10217
|
console.assert(!1);
|
|
10218
10218
|
} else
|
|
@@ -10232,14 +10232,14 @@ function Ka(t) {
|
|
|
10232
10232
|
for (const o of n)
|
|
10233
10233
|
if (o.type === "watch_effect_v1") {
|
|
10234
10234
|
const i = xa(o), a = Fa(i);
|
|
10235
|
-
for (const
|
|
10236
|
-
e.watchEffect[
|
|
10235
|
+
for (const l of a)
|
|
10236
|
+
e.watchEffect[l] || (e.watchEffect[l] = []), rt(e.watchEffect[l], o.id);
|
|
10237
10237
|
} else if (o.type === "app_bind_v1") {
|
|
10238
10238
|
const i = Ya(o), a = wa(i);
|
|
10239
10239
|
e.bind.sets[o.id] = a;
|
|
10240
|
-
for (const
|
|
10241
|
-
const
|
|
10242
|
-
e.bind.triggers[
|
|
10240
|
+
for (const l of a) {
|
|
10241
|
+
const r = Tt(l);
|
|
10242
|
+
e.bind.triggers[r] || (e.bind.triggers[r] = []), rt(e.bind.triggers[r], o.id);
|
|
10243
10243
|
}
|
|
10244
10244
|
}
|
|
10245
10245
|
return e;
|
|
@@ -10257,7 +10257,7 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10257
10257
|
lock: { type: Boolean }
|
|
10258
10258
|
},
|
|
10259
10259
|
setup(t, { expose: e }) {
|
|
10260
|
-
const { t: n } =
|
|
10260
|
+
const { t: n } = Yt(), o = t, i = Qe(), a = () => {
|
|
10261
10261
|
if (!i.workspace) {
|
|
10262
10262
|
console.assert(!1);
|
|
10263
10263
|
return;
|
|
@@ -10267,20 +10267,20 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10267
10267
|
return;
|
|
10268
10268
|
}
|
|
10269
10269
|
i.workspace.cleanUp();
|
|
10270
|
-
},
|
|
10270
|
+
}, l = () => {
|
|
10271
10271
|
a();
|
|
10272
10272
|
};
|
|
10273
|
-
return e({ cleanWorkspace: a }), (
|
|
10273
|
+
return e({ cleanWorkspace: a }), (r, u) => {
|
|
10274
10274
|
const _ = D("v-btn"), T = D("v-tooltip");
|
|
10275
|
-
return
|
|
10275
|
+
return S(), Z(T, {
|
|
10276
10276
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10277
10277
|
}, {
|
|
10278
|
-
activator: tt(({ props:
|
|
10279
|
-
L(_, He(
|
|
10278
|
+
activator: tt(({ props: I }) => [
|
|
10279
|
+
L(_, He(I, {
|
|
10280
10280
|
density: "comfortable",
|
|
10281
10281
|
icon: "mdi-broom",
|
|
10282
10282
|
variant: "outlined",
|
|
10283
|
-
onClick:
|
|
10283
|
+
onClick: l
|
|
10284
10284
|
}), null, 16)
|
|
10285
10285
|
]),
|
|
10286
10286
|
_: 1
|
|
@@ -10295,14 +10295,14 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10295
10295
|
},
|
|
10296
10296
|
emits: ["update:modelValue"],
|
|
10297
10297
|
setup(t) {
|
|
10298
|
-
const { t: e } =
|
|
10298
|
+
const { t: e } = Yt(), n = Dt(t, "modelValue");
|
|
10299
10299
|
return (o, i) => {
|
|
10300
|
-
const a = D("v-btn"),
|
|
10301
|
-
return
|
|
10300
|
+
const a = D("v-btn"), l = D("v-tooltip");
|
|
10301
|
+
return S(), Z(l, {
|
|
10302
10302
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10303
10303
|
}, {
|
|
10304
|
-
activator: tt(({ props:
|
|
10305
|
-
L(a, He(
|
|
10304
|
+
activator: tt(({ props: r }) => [
|
|
10305
|
+
L(a, He(r, {
|
|
10306
10306
|
density: "comfortable",
|
|
10307
10307
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10308
10308
|
variant: "outlined",
|
|
@@ -10313,18 +10313,24 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10313
10313
|
}, 8, ["text"]);
|
|
10314
10314
|
};
|
|
10315
10315
|
}
|
|
10316
|
-
}), Wa = { class: "text-subtitle-1 ml-6" },
|
|
10316
|
+
}), Wa = { class: "d-flex flex-column" }, ja = { class: "text-subtitle-1 ml-6" }, Xa = {
|
|
10317
|
+
key: 0,
|
|
10318
|
+
class: "text-cation text-grey text-truncate ml-6",
|
|
10319
|
+
style: { maxWidth: "340px" }
|
|
10320
|
+
}, Ja = /* @__PURE__ */ st({
|
|
10317
10321
|
__name: "item",
|
|
10318
10322
|
props: {
|
|
10319
10323
|
id: {},
|
|
10320
10324
|
title: {},
|
|
10325
|
+
desc: {},
|
|
10321
10326
|
select: { type: Boolean }
|
|
10322
10327
|
},
|
|
10323
10328
|
emits: ["x-click"],
|
|
10324
10329
|
setup(t, { emit: e }) {
|
|
10325
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } =
|
|
10330
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ft(), a = t, l = e, r = Ot(!1), u = Y(() => ({
|
|
10326
10331
|
position: "relative",
|
|
10327
|
-
background:
|
|
10332
|
+
background: r.value ? i.value : o.value,
|
|
10333
|
+
width: "100%",
|
|
10328
10334
|
height: "48px",
|
|
10329
10335
|
marginBottom: "1px",
|
|
10330
10336
|
userSelect: "none"
|
|
@@ -10338,35 +10344,38 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10338
10344
|
border: "1px solid " + n.value,
|
|
10339
10345
|
pointerEvents: "none"
|
|
10340
10346
|
}));
|
|
10341
|
-
return (T,
|
|
10347
|
+
return (T, I) => {
|
|
10342
10348
|
const m = D("v-spacer"), y = D("v-icon"), E = ho("ripple");
|
|
10343
|
-
return fo((
|
|
10349
|
+
return fo((S(), X("div", {
|
|
10344
10350
|
class: "d-flex align-center cursor-pointer",
|
|
10345
|
-
style:
|
|
10346
|
-
onClick:
|
|
10347
|
-
onMouseout:
|
|
10348
|
-
onMouseover:
|
|
10351
|
+
style: G(u.value),
|
|
10352
|
+
onClick: I[1] || (I[1] = (P) => l("x-click", a.id)),
|
|
10353
|
+
onMouseout: I[2] || (I[2] = (P) => r.value = !1),
|
|
10354
|
+
onMouseover: I[3] || (I[3] = (P) => r.value = !0)
|
|
10349
10355
|
}, [
|
|
10350
|
-
|
|
10356
|
+
w("div", Wa, [
|
|
10357
|
+
w("span", ja, Mt(a.title), 1),
|
|
10358
|
+
a.desc ? (S(), X("span", Xa, Mt(a.desc), 1)) : at("", !0)
|
|
10359
|
+
]),
|
|
10351
10360
|
L(m),
|
|
10352
10361
|
L(y, {
|
|
10353
10362
|
class: "x-handle cursor-move mr-3",
|
|
10354
10363
|
icon: "mdi-drag-horizontal-variant",
|
|
10355
|
-
onMousedown:
|
|
10364
|
+
onMousedown: I[0] || (I[0] = bt(() => {
|
|
10356
10365
|
}, ["stop"]))
|
|
10357
10366
|
}),
|
|
10358
|
-
|
|
10359
|
-
style:
|
|
10367
|
+
w("div", {
|
|
10368
|
+
style: G(_.value)
|
|
10360
10369
|
}, null, 4)
|
|
10361
10370
|
], 36)), [
|
|
10362
10371
|
[E]
|
|
10363
10372
|
]);
|
|
10364
10373
|
};
|
|
10365
10374
|
}
|
|
10366
|
-
}),
|
|
10375
|
+
}), qa = {
|
|
10367
10376
|
key: 1,
|
|
10368
10377
|
class: "text-caption text-grey"
|
|
10369
|
-
},
|
|
10378
|
+
}, Qa = /* @__PURE__ */ st({
|
|
10370
10379
|
__name: "index",
|
|
10371
10380
|
props: /* @__PURE__ */ Re({
|
|
10372
10381
|
lock: { type: Boolean }
|
|
@@ -10376,7 +10385,7 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10376
10385
|
}),
|
|
10377
10386
|
emits: ["update:modelValue"],
|
|
10378
10387
|
setup(t, { expose: e }) {
|
|
10379
|
-
const { t: n } =
|
|
10388
|
+
const { t: n } = Yt(), o = Dt(t, "modelValue"), i = Qe(), a = Ot([]);
|
|
10380
10389
|
e({ update: () => {
|
|
10381
10390
|
if (!i.workspace) {
|
|
10382
10391
|
console.assert(!1);
|
|
@@ -10385,19 +10394,21 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10385
10394
|
const m = [];
|
|
10386
10395
|
i.workspace.getTopBlocks(!0).forEach((E) => {
|
|
10387
10396
|
const P = E.id === Po()?.id;
|
|
10388
|
-
let U = "
|
|
10397
|
+
let U = "";
|
|
10389
10398
|
if (E.type.startsWith("on_app_event_v")) {
|
|
10390
|
-
const
|
|
10391
|
-
|
|
10399
|
+
const Q = E, gt = J[Q.node.key];
|
|
10400
|
+
gt && (U = n(gt.name), Q.node.alias && (U += " / " + Q.node.alias), U += " - " + he(Q.event.names, Q.event.from));
|
|
10392
10401
|
} else E.type.startsWith("watch_effect_v") ? U = n("x-block-lib.watchEffect") : E.type.startsWith("app_bind_v") ? U = n("x-block-lib.bind") : E.type.startsWith("func_entry_v") ? U = n("x-block-lib.funcEntry") : E.type.startsWith("procedure_def_v") ? U = n("x-block-lib.procedure") + " - " + E.getFieldValue("NAME") : U = n("x-block-lib.temporaryBlock");
|
|
10402
|
+
const ft = E.getCommentText() ?? "";
|
|
10393
10403
|
m.push({
|
|
10394
10404
|
id: E.id,
|
|
10395
10405
|
name: U,
|
|
10406
|
+
desc: ft,
|
|
10396
10407
|
select: P
|
|
10397
10408
|
});
|
|
10398
10409
|
}), a.value = m;
|
|
10399
10410
|
} });
|
|
10400
|
-
let
|
|
10411
|
+
let r = [];
|
|
10401
10412
|
const u = () => {
|
|
10402
10413
|
if (t.lock) {
|
|
10403
10414
|
Sn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
@@ -10406,7 +10417,7 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10406
10417
|
const m = [];
|
|
10407
10418
|
a.value.forEach(({ id: y }) => {
|
|
10408
10419
|
m.push(y);
|
|
10409
|
-
}),
|
|
10420
|
+
}), r = m;
|
|
10410
10421
|
}, _ = () => !t.lock, T = (m) => {
|
|
10411
10422
|
if (!i.workspace) {
|
|
10412
10423
|
console.assert(!1);
|
|
@@ -10418,7 +10429,7 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10418
10429
|
}
|
|
10419
10430
|
if (m.oldIndex === m.newIndex)
|
|
10420
10431
|
return;
|
|
10421
|
-
const y =
|
|
10432
|
+
const y = r[m.oldIndex], E = i.workspace.getBlockById(
|
|
10422
10433
|
y
|
|
10423
10434
|
);
|
|
10424
10435
|
if (!E) {
|
|
@@ -10426,14 +10437,14 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10426
10437
|
return;
|
|
10427
10438
|
}
|
|
10428
10439
|
let P = "";
|
|
10429
|
-
m.newIndex > m.oldIndex ? P =
|
|
10440
|
+
m.newIndex > m.oldIndex ? P = r[m.newIndex] : m.newIndex > 0 && (P = r[m.newIndex - 1]);
|
|
10430
10441
|
let U = -10;
|
|
10431
10442
|
P !== "" && (U = i.workspace.getBlockById(
|
|
10432
10443
|
P
|
|
10433
10444
|
).getRelativeToSurfaceXY().y + 10);
|
|
10434
|
-
const
|
|
10435
|
-
E.moveTo(new C.Coordinate(
|
|
10436
|
-
},
|
|
10445
|
+
const ft = E.getRelativeToSurfaceXY();
|
|
10446
|
+
E.moveTo(new C.Coordinate(ft.x, U)), i.workspace.cleanUp(), Zn();
|
|
10447
|
+
}, I = async (m) => {
|
|
10437
10448
|
if (!i.workspace) {
|
|
10438
10449
|
console.assert(!1);
|
|
10439
10450
|
return;
|
|
@@ -10441,7 +10452,7 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10441
10452
|
const y = i.workspace.getBlockById(m);
|
|
10442
10453
|
Ln.setSelected(y), qe(m), o.value = !1;
|
|
10443
10454
|
};
|
|
10444
|
-
return (m, y) => a.value.length > 0 ? (
|
|
10455
|
+
return (m, y) => a.value.length > 0 ? (S(), Z(R(bo), {
|
|
10445
10456
|
key: 0,
|
|
10446
10457
|
modelValue: a.value,
|
|
10447
10458
|
"onUpdate:modelValue": y[0] || (y[0] = (E) => a.value = E),
|
|
@@ -10453,23 +10464,24 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10453
10464
|
onStart: u
|
|
10454
10465
|
}, {
|
|
10455
10466
|
default: tt(() => [
|
|
10456
|
-
(
|
|
10467
|
+
(S(!0), X(An, null, mo(a.value, (E) => (S(), Z(Ja, {
|
|
10457
10468
|
id: E.id,
|
|
10458
10469
|
key: E.id,
|
|
10470
|
+
desc: E.desc,
|
|
10459
10471
|
select: E.select,
|
|
10460
10472
|
title: E.name,
|
|
10461
|
-
onXClick:
|
|
10462
|
-
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10473
|
+
onXClick: I
|
|
10474
|
+
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10463
10475
|
]),
|
|
10464
10476
|
_: 1
|
|
10465
|
-
}, 8, ["modelValue"])) : (
|
|
10477
|
+
}, 8, ["modelValue"])) : (S(), X("span", qa, Mt(R(n)("x-block-lib.noOption")), 1));
|
|
10466
10478
|
}
|
|
10467
|
-
}),
|
|
10479
|
+
}), za = (t, e) => {
|
|
10468
10480
|
const n = t.__vccOpts || t;
|
|
10469
10481
|
for (const [o, i] of e)
|
|
10470
10482
|
n[o] = i;
|
|
10471
10483
|
return n;
|
|
10472
|
-
},
|
|
10484
|
+
}, Za = /* @__PURE__ */ za(Qa, [["__scopeId", "data-v-98d5c375"]]), tc = /* @__PURE__ */ st({
|
|
10473
10485
|
__name: "index",
|
|
10474
10486
|
props: {
|
|
10475
10487
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10477,41 +10489,41 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10477
10489
|
},
|
|
10478
10490
|
emits: ["update:modelValue"],
|
|
10479
10491
|
setup(t, { expose: e }) {
|
|
10480
|
-
const n =
|
|
10492
|
+
const n = Dt(t, "modelValue"), o = Qe();
|
|
10481
10493
|
e({ update: () => {
|
|
10482
10494
|
if (!o.workspace) {
|
|
10483
10495
|
console.assert(!1);
|
|
10484
10496
|
return;
|
|
10485
10497
|
}
|
|
10486
10498
|
} });
|
|
10487
|
-
const a = (
|
|
10488
|
-
const
|
|
10489
|
-
if (!
|
|
10499
|
+
const a = (l) => {
|
|
10500
|
+
const r = xt();
|
|
10501
|
+
if (!r) {
|
|
10490
10502
|
console.assert(!1);
|
|
10491
10503
|
return;
|
|
10492
10504
|
}
|
|
10493
|
-
const u =
|
|
10494
|
-
Ln.setSelected(u), qe(
|
|
10505
|
+
const u = r.getBlockById(l);
|
|
10506
|
+
Ln.setSelected(u), qe(l), n.value = !1;
|
|
10495
10507
|
};
|
|
10496
|
-
return (
|
|
10497
|
-
onClick:
|
|
10508
|
+
return (l, r) => (S(), X("div", {
|
|
10509
|
+
onClick: r[0] || (r[0] = (u) => a(""))
|
|
10498
10510
|
}, "blockTree"));
|
|
10499
10511
|
}
|
|
10500
|
-
}),
|
|
10512
|
+
}), ec = { class: "text-subtitle-1" }, nc = /* @__PURE__ */ st({
|
|
10501
10513
|
__name: "index",
|
|
10502
10514
|
props: {
|
|
10503
10515
|
type: {},
|
|
10504
10516
|
lock: { type: Boolean }
|
|
10505
10517
|
},
|
|
10506
10518
|
setup(t, { expose: e }) {
|
|
10507
|
-
const { t: n } =
|
|
10519
|
+
const { t: n } = Yt(), o = Go(), { sysBarAvail: i } = Bn(), { backgroundColor1: a } = Ft(), l = Y(() => {
|
|
10508
10520
|
let y = "100%";
|
|
10509
10521
|
return o.mdAndUp.value && (y = "400px"), {
|
|
10510
10522
|
background: a.value,
|
|
10511
10523
|
width: y,
|
|
10512
10524
|
height: "100%"
|
|
10513
10525
|
};
|
|
10514
|
-
}),
|
|
10526
|
+
}), r = Y(() => {
|
|
10515
10527
|
let y = 48;
|
|
10516
10528
|
return i.value && (y += 24), {
|
|
10517
10529
|
position: "relative",
|
|
@@ -10523,37 +10535,37 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10523
10535
|
To(() => {
|
|
10524
10536
|
_.value = !1;
|
|
10525
10537
|
});
|
|
10526
|
-
const T =
|
|
10538
|
+
const T = Pt("blockList"), I = Pt("blockTree");
|
|
10527
10539
|
return e({ open: _, update: () => {
|
|
10528
|
-
t.type === "list" ? T.value?.update() : t.type === "tree" &&
|
|
10540
|
+
t.type === "list" ? T.value?.update() : t.type === "tree" && I.value?.update();
|
|
10529
10541
|
} }), (y, E) => {
|
|
10530
|
-
const P = D("v-sheet"), U = D("v-btn"),
|
|
10531
|
-
return
|
|
10532
|
-
L(
|
|
10542
|
+
const P = D("v-sheet"), U = D("v-btn"), ft = D("v-spacer"), Q = D("v-dialog"), gt = D("v-tooltip");
|
|
10543
|
+
return S(), X(An, null, [
|
|
10544
|
+
L(Q, {
|
|
10533
10545
|
modelValue: R(_),
|
|
10534
|
-
"onUpdate:modelValue": E[5] || (E[5] = (
|
|
10546
|
+
"onUpdate:modelValue": E[5] || (E[5] = (H) => Wt(_) ? _.value = H : null),
|
|
10535
10547
|
eager: "",
|
|
10536
10548
|
fullscreen: "",
|
|
10537
10549
|
"no-click-animation": "",
|
|
10538
10550
|
persistent: "",
|
|
10539
10551
|
transition: "scroll-x-reverse-transition",
|
|
10540
|
-
onKeydown: E[6] || (E[6] = On(
|
|
10552
|
+
onKeydown: E[6] || (E[6] = On(bt((H) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10541
10553
|
}, {
|
|
10542
10554
|
default: tt(() => [
|
|
10543
|
-
|
|
10555
|
+
w("div", {
|
|
10544
10556
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10545
|
-
onClick: E[3] || (E[3] =
|
|
10546
|
-
onContextmenu: E[4] || (E[4] =
|
|
10557
|
+
onClick: E[3] || (E[3] = bt((H) => _.value = !1, ["self"])),
|
|
10558
|
+
onContextmenu: E[4] || (E[4] = bt((H) => _.value = !1, ["self", "prevent"]))
|
|
10547
10559
|
}, [
|
|
10548
|
-
|
|
10560
|
+
w("div", {
|
|
10549
10561
|
class: "elevation-2",
|
|
10550
|
-
style:
|
|
10562
|
+
style: G(l.value)
|
|
10551
10563
|
}, [
|
|
10552
|
-
R(i) ? (
|
|
10564
|
+
R(i) ? (S(), Z(P, {
|
|
10553
10565
|
key: 0,
|
|
10554
10566
|
color: "transparent",
|
|
10555
10567
|
height: 24
|
|
10556
|
-
})) :
|
|
10568
|
+
})) : at("", !0),
|
|
10557
10569
|
L(P, {
|
|
10558
10570
|
class: "d-flex align-center px-2",
|
|
10559
10571
|
color: "transparent",
|
|
@@ -10564,33 +10576,33 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10564
10576
|
density: "comfortable",
|
|
10565
10577
|
icon: "mdi-close",
|
|
10566
10578
|
variant: "text",
|
|
10567
|
-
onClick: E[0] || (E[0] = (
|
|
10579
|
+
onClick: E[0] || (E[0] = (H) => _.value = !1)
|
|
10568
10580
|
}),
|
|
10569
|
-
|
|
10570
|
-
L(
|
|
10581
|
+
w("span", ec, Mt(R(n)("x-block-lib.navigator")), 1),
|
|
10582
|
+
L(ft)
|
|
10571
10583
|
]),
|
|
10572
10584
|
_: 1
|
|
10573
10585
|
}),
|
|
10574
|
-
|
|
10586
|
+
w("div", {
|
|
10575
10587
|
class: "overflow-y-auto",
|
|
10576
|
-
style:
|
|
10588
|
+
style: G(r.value)
|
|
10577
10589
|
}, [
|
|
10578
|
-
t.type === "list" ? (
|
|
10590
|
+
t.type === "list" ? (S(), Z(Za, {
|
|
10579
10591
|
key: 0,
|
|
10580
10592
|
ref_key: "blockList",
|
|
10581
10593
|
ref: T,
|
|
10582
10594
|
modelValue: R(_),
|
|
10583
|
-
"onUpdate:modelValue": E[1] || (E[1] = (
|
|
10595
|
+
"onUpdate:modelValue": E[1] || (E[1] = (H) => Wt(_) ? _.value = H : null),
|
|
10584
10596
|
lock: t.lock
|
|
10585
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
10597
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), Z(tc, {
|
|
10586
10598
|
key: 1,
|
|
10587
10599
|
ref_key: "blockTree",
|
|
10588
|
-
ref:
|
|
10600
|
+
ref: I,
|
|
10589
10601
|
modelValue: R(_),
|
|
10590
|
-
"onUpdate:modelValue": E[2] || (E[2] = (
|
|
10591
|
-
}, null, 8, ["modelValue"])) :
|
|
10592
|
-
|
|
10593
|
-
style:
|
|
10602
|
+
"onUpdate:modelValue": E[2] || (E[2] = (H) => Wt(_) ? _.value = H : null)
|
|
10603
|
+
}, null, 8, ["modelValue"])) : at("", !0),
|
|
10604
|
+
w("div", {
|
|
10605
|
+
style: G(u.value)
|
|
10594
10606
|
}, null, 4)
|
|
10595
10607
|
], 4)
|
|
10596
10608
|
], 4)
|
|
@@ -10598,11 +10610,11 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10598
10610
|
]),
|
|
10599
10611
|
_: 1
|
|
10600
10612
|
}, 8, ["modelValue"]),
|
|
10601
|
-
L(
|
|
10613
|
+
L(gt, {
|
|
10602
10614
|
text: R(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10603
10615
|
}, {
|
|
10604
|
-
activator: tt(({ props:
|
|
10605
|
-
L(U, He(
|
|
10616
|
+
activator: tt(({ props: H }) => [
|
|
10617
|
+
L(U, He(H, {
|
|
10606
10618
|
density: "comfortable",
|
|
10607
10619
|
icon: "mdi-navigation-variant",
|
|
10608
10620
|
variant: "outlined",
|
|
@@ -10640,22 +10652,22 @@ const Ha = /* @__PURE__ */ st({
|
|
|
10640
10652
|
wheel: !0
|
|
10641
10653
|
}
|
|
10642
10654
|
};
|
|
10643
|
-
function
|
|
10644
|
-
Pe.theme = o ? "dark" : "light", Pe.toolbox =
|
|
10655
|
+
function oc(t, e, n, o) {
|
|
10656
|
+
Pe.theme = o ? "dark" : "light", Pe.toolbox = ic(e, n);
|
|
10645
10657
|
const i = Ro(t, Pe);
|
|
10646
|
-
return i.addChangeListener(Do.shadowBlockConversionChangeListener),
|
|
10658
|
+
return i.addChangeListener(Do.shadowBlockConversionChangeListener), sc(i, e, n), ac(i), i;
|
|
10647
10659
|
}
|
|
10648
|
-
function
|
|
10660
|
+
function ic(t, e) {
|
|
10649
10661
|
let n;
|
|
10650
10662
|
return t === "page" ? e === "v1" && (n = Va) : t === "comp" ? e === "v1" && (n = Ra) : t === "func" ? e === "v1" && (n = Ma) : t === "flow" ? e === "v1" && (n = Da) : t === "json" && e === "v1" && (n = Ua), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10651
10663
|
}
|
|
10652
|
-
function
|
|
10664
|
+
function sc(t, e, n) {
|
|
10653
10665
|
function o({ name: i, callback: a }) {
|
|
10654
10666
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10655
10667
|
}
|
|
10656
|
-
e === "page" ? n === "v1" && (o(zn), o(
|
|
10668
|
+
e === "page" ? n === "v1" && (o(zn), o(ie), o(se), o(lt), o(ct), o(ae), o(oe)) : e === "comp" ? n === "v1" && (o(Qn), o(ie), o(se), o(lt), o(ct), o(ae), o(oe)) : e === "func" ? n === "v1" && (o(re), o(le), o(ce), o(ue), o(lt), o(ct)) : e === "flow" && n === "v1" && (o(re), o(le), o(ce), o(ue), o(lt), o(ct));
|
|
10657
10669
|
}
|
|
10658
|
-
function
|
|
10670
|
+
function ac(t) {
|
|
10659
10671
|
const { router: e } = nt;
|
|
10660
10672
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10661
10673
|
const n = e.resolve({
|
|
@@ -10673,49 +10685,49 @@ function ic(t) {
|
|
|
10673
10685
|
}, 100);
|
|
10674
10686
|
});
|
|
10675
10687
|
}
|
|
10676
|
-
function
|
|
10688
|
+
function cc(t, e) {
|
|
10677
10689
|
const n = e.newBlock("json_root_v1");
|
|
10678
10690
|
n.initSvg(), n.render();
|
|
10679
10691
|
const o = (i, a) => {
|
|
10680
10692
|
if (i === null)
|
|
10681
10693
|
return;
|
|
10682
|
-
let
|
|
10694
|
+
let l;
|
|
10683
10695
|
if (i instanceof Array)
|
|
10684
|
-
|
|
10696
|
+
l = "json_array_v1";
|
|
10685
10697
|
else {
|
|
10686
10698
|
const u = typeof i;
|
|
10687
10699
|
if (u === "object")
|
|
10688
|
-
|
|
10700
|
+
l = "json_map_v1";
|
|
10689
10701
|
else if (u === "string")
|
|
10690
|
-
|
|
10702
|
+
l = "json_string_v1";
|
|
10691
10703
|
else if (u === "number")
|
|
10692
|
-
|
|
10704
|
+
l = "json_number_v1";
|
|
10693
10705
|
else if (u === "boolean")
|
|
10694
|
-
|
|
10706
|
+
l = "json_boolean_v1";
|
|
10695
10707
|
else
|
|
10696
10708
|
return;
|
|
10697
10709
|
}
|
|
10698
|
-
const
|
|
10699
|
-
if (
|
|
10710
|
+
const r = e.newBlock(l);
|
|
10711
|
+
if (r.initSvg(), r.render(), a.connect(r.outputConnection), l === "json_map_v1") {
|
|
10700
10712
|
const u = [];
|
|
10701
10713
|
for (const _ in i)
|
|
10702
10714
|
u.push(_);
|
|
10703
|
-
|
|
10715
|
+
r.initData(u);
|
|
10704
10716
|
for (let _ = 0; _ < u.length; _++) {
|
|
10705
|
-
const T = u[_],
|
|
10706
|
-
o(i[T],
|
|
10717
|
+
const T = u[_], I = r.getInput("ENTRY" + _);
|
|
10718
|
+
o(i[T], I.connection);
|
|
10707
10719
|
}
|
|
10708
|
-
} else if (
|
|
10709
|
-
|
|
10720
|
+
} else if (l === "json_array_v1") {
|
|
10721
|
+
r.initData(i.length);
|
|
10710
10722
|
for (let u = 0; u < i.length; u++)
|
|
10711
|
-
o(i[u],
|
|
10712
|
-
} else
|
|
10723
|
+
o(i[u], r.getInput("ENTRY" + u).connection);
|
|
10724
|
+
} else l === "json_string_v1" || l === "json_number_v1" ? r.setFieldValue(i, "VALUE") : l === "json_boolean_v1" && r.setFieldValue(i ? "true" : "false", "VALUE");
|
|
10713
10725
|
};
|
|
10714
10726
|
o(t, n.getInput("JSON").connection), g.fire(
|
|
10715
10727
|
new (g.get(g.FINISHED_LOADING))(e)
|
|
10716
10728
|
);
|
|
10717
10729
|
}
|
|
10718
|
-
function
|
|
10730
|
+
function lc(t) {
|
|
10719
10731
|
const e = (o) => {
|
|
10720
10732
|
if (!o)
|
|
10721
10733
|
return null;
|
|
@@ -10724,8 +10736,8 @@ function ac(t) {
|
|
|
10724
10736
|
if (o.type === "json_map_v1") {
|
|
10725
10737
|
const i = {};
|
|
10726
10738
|
for (let a = 0; a < o.length; a++) {
|
|
10727
|
-
const
|
|
10728
|
-
i[
|
|
10739
|
+
const l = o.getFieldValue("KEY" + a);
|
|
10740
|
+
i[l] = e(o.getInputTargetBlock("ENTRY" + a));
|
|
10729
10741
|
}
|
|
10730
10742
|
return i;
|
|
10731
10743
|
} else if (o.type === "json_array_v1") {
|
|
@@ -10747,7 +10759,7 @@ function ac(t) {
|
|
|
10747
10759
|
if (o.type === "json_root_v1")
|
|
10748
10760
|
return e(o);
|
|
10749
10761
|
}
|
|
10750
|
-
const
|
|
10762
|
+
const rc = { class: "position-relative w-100 h-100" }, uc = /* @__PURE__ */ st({
|
|
10751
10763
|
__name: "index",
|
|
10752
10764
|
props: /* @__PURE__ */ Re({
|
|
10753
10765
|
type: {},
|
|
@@ -10762,18 +10774,18 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10762
10774
|
}),
|
|
10763
10775
|
emits: /* @__PURE__ */ Re(["ready"], ["update:lock", "update:scale"]),
|
|
10764
10776
|
setup(t, { expose: e, emit: n }) {
|
|
10765
|
-
const { backgroundColor2: o } =
|
|
10777
|
+
const { backgroundColor2: o } = Ft(), i = Dt(t, "lock"), a = Dt(t, "scale"), l = n, r = `blocklyEditor${De()}`, u = Ot(), _ = Pt("parentContainer"), T = Pt("clean"), I = Pt("navigator"), m = {};
|
|
10766
10778
|
$a(m);
|
|
10767
|
-
const y =
|
|
10779
|
+
const y = Ot(!0), E = Ot(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
|
|
10768
10780
|
width: "100%",
|
|
10769
10781
|
height: "calc(100% - 48px)"
|
|
10770
|
-
})),
|
|
10782
|
+
})), ft = Y(() => ({
|
|
10771
10783
|
position: "absolute",
|
|
10772
10784
|
background: o.value,
|
|
10773
10785
|
bottom: "0px",
|
|
10774
10786
|
width: "100%",
|
|
10775
10787
|
height: "48px"
|
|
10776
|
-
})),
|
|
10788
|
+
})), Q = Y(() => ({
|
|
10777
10789
|
position: "absolute",
|
|
10778
10790
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10779
10791
|
top: "1px",
|
|
@@ -10781,12 +10793,12 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10781
10793
|
width: "56px",
|
|
10782
10794
|
height: "calc(100% - 49px)",
|
|
10783
10795
|
zIndex: 999
|
|
10784
|
-
})),
|
|
10796
|
+
})), gt = Y(() => ({
|
|
10785
10797
|
position: "absolute",
|
|
10786
10798
|
top: "0px",
|
|
10787
10799
|
right: "0px",
|
|
10788
10800
|
zIndex: 20
|
|
10789
|
-
})),
|
|
10801
|
+
})), H = Y(() => ({
|
|
10790
10802
|
position: "absolute",
|
|
10791
10803
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10792
10804
|
top: "0px",
|
|
@@ -10807,28 +10819,28 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10807
10819
|
top: 0,
|
|
10808
10820
|
left: 0,
|
|
10809
10821
|
zIndex: 3e3
|
|
10810
|
-
})), { open:
|
|
10822
|
+
})), { open: Lt } = Ge(`blocklyEditorFlyout${De()}`);
|
|
10811
10823
|
sn(async () => {
|
|
10812
10824
|
if (!u.value || !_.value) {
|
|
10813
10825
|
console.assert(!1);
|
|
10814
10826
|
return;
|
|
10815
10827
|
}
|
|
10816
|
-
Mo(_.value), await
|
|
10817
|
-
const N = document.querySelector(`#${
|
|
10828
|
+
Mo(_.value), await rn(t.locale), m.workspace = oc(u.value, t.type, t.version, t.dark), m.workspace.addChangeListener(g.disableOrphans), m.workspace.addChangeListener(io);
|
|
10829
|
+
const N = document.querySelector(`#${r} .blocklyFlyout`);
|
|
10818
10830
|
new MutationObserver((Ce) => {
|
|
10819
|
-
Ce.forEach((
|
|
10820
|
-
|
|
10831
|
+
Ce.forEach((Ht) => {
|
|
10832
|
+
Ht.type === "attributes" && Ht.attributeName === "style" && (Lt.value = m.workspace.getFlyout().isVisible());
|
|
10821
10833
|
});
|
|
10822
|
-
}).observe(N, { attributes: !0 }),
|
|
10834
|
+
}).observe(N, { attributes: !0 }), Lt.value = m.workspace.getFlyout().isVisible(), Ze(), tn(), await Eo(), l("ready");
|
|
10823
10835
|
}), an(() => {
|
|
10824
|
-
|
|
10836
|
+
Lt.value = !1;
|
|
10825
10837
|
}), Uo(u, () => {
|
|
10826
10838
|
m.workspace && Vo(m.workspace);
|
|
10827
10839
|
});
|
|
10828
10840
|
async function io(N) {
|
|
10829
10841
|
if (N.type === g.FINISHED_LOADING) {
|
|
10830
10842
|
Zn(), setTimeout(() => {
|
|
10831
|
-
|
|
10843
|
+
I.value?.update();
|
|
10832
10844
|
}, 0), y.value = !1;
|
|
10833
10845
|
return;
|
|
10834
10846
|
}
|
|
@@ -10838,85 +10850,85 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10838
10850
|
return;
|
|
10839
10851
|
}
|
|
10840
10852
|
N.type === g.BLOCK_DRAG && (N.isStart ? E.value = !0 : E.value = !1), setTimeout(() => {
|
|
10841
|
-
|
|
10853
|
+
I.value?.update();
|
|
10842
10854
|
}, 0);
|
|
10843
10855
|
}
|
|
10844
10856
|
}
|
|
10845
10857
|
const so = (N) => {
|
|
10846
|
-
y.value = !0, t.type === "json" ?
|
|
10847
|
-
}, ao = () => t.type === "json" ?
|
|
10858
|
+
y.value = !0, t.type === "json" ? cc(N, m.workspace) : K.workspaces.load(N, m.workspace);
|
|
10859
|
+
}, ao = () => t.type === "json" ? lc(m.workspace) : K.workspaces.save(m.workspace), co = () => {
|
|
10848
10860
|
if (t.type === "json")
|
|
10849
10861
|
console.assert(!1);
|
|
10850
10862
|
else
|
|
10851
10863
|
return s.workspaceToCode(m.workspace);
|
|
10852
|
-
},
|
|
10853
|
-
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (
|
|
10864
|
+
}, lo = () => Ka(m.workspace), Ze = () => {
|
|
10865
|
+
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (Lt.value = !1);
|
|
10854
10866
|
}, tn = () => {
|
|
10855
10867
|
m.workspace.setScale(a.value);
|
|
10856
|
-
},
|
|
10868
|
+
}, ro = () => {
|
|
10857
10869
|
m.workspace.fireChangeListener(new bn());
|
|
10858
10870
|
}, en = () => {
|
|
10859
10871
|
T.value?.cleanWorkspace();
|
|
10860
10872
|
}, nn = () => {
|
|
10861
10873
|
i.value = !i.value;
|
|
10862
10874
|
}, on = () => {
|
|
10863
|
-
|
|
10875
|
+
I.value && (I.value.open = !0);
|
|
10864
10876
|
};
|
|
10865
10877
|
return sn(() => {
|
|
10866
|
-
|
|
10878
|
+
It.on("cleanWorkspace", en), It.on("toggleBlocklyLock", nn), It.on("openBlocklyNavigator", on);
|
|
10867
10879
|
}), an(() => {
|
|
10868
|
-
|
|
10869
|
-
}),
|
|
10880
|
+
It.off("cleanWorkspace", en), It.off("toggleBlocklyLock", nn), It.off("openBlocklyNavigator", on);
|
|
10881
|
+
}), St(
|
|
10870
10882
|
() => t.locale,
|
|
10871
10883
|
(N) => {
|
|
10872
|
-
|
|
10884
|
+
rn(N);
|
|
10873
10885
|
}
|
|
10874
|
-
),
|
|
10886
|
+
), St(
|
|
10875
10887
|
() => t.dark,
|
|
10876
10888
|
(N) => {
|
|
10877
10889
|
Pa(N ? "dark" : "light");
|
|
10878
10890
|
}
|
|
10879
|
-
), Lt
|
|
10891
|
+
), St(Lt, (N) => {
|
|
10880
10892
|
N || m.workspace?.hideChaff();
|
|
10881
|
-
}),
|
|
10893
|
+
}), St(i, () => {
|
|
10882
10894
|
Ze();
|
|
10883
|
-
}),
|
|
10895
|
+
}), St(a, () => {
|
|
10884
10896
|
tn();
|
|
10885
10897
|
}), e({
|
|
10886
10898
|
loading: y,
|
|
10887
10899
|
load: so,
|
|
10888
10900
|
save: ao,
|
|
10889
10901
|
generateCode: co,
|
|
10890
|
-
generateReactivity:
|
|
10891
|
-
fireStateChange:
|
|
10892
|
-
}), (N,
|
|
10893
|
-
const Ce = D("v-icon"),
|
|
10894
|
-
return
|
|
10895
|
-
|
|
10896
|
-
id:
|
|
10902
|
+
generateReactivity: lo,
|
|
10903
|
+
fireStateChange: ro
|
|
10904
|
+
}), (N, mt) => {
|
|
10905
|
+
const Ce = D("v-icon"), Ht = D("x-loading");
|
|
10906
|
+
return S(), X("div", rc, [
|
|
10907
|
+
w("div", {
|
|
10908
|
+
id: r,
|
|
10897
10909
|
ref_key: "blocklyDiv",
|
|
10898
10910
|
ref: u,
|
|
10899
|
-
style:
|
|
10911
|
+
style: G(U.value)
|
|
10900
10912
|
}, null, 4),
|
|
10901
|
-
|
|
10902
|
-
style:
|
|
10913
|
+
w("div", {
|
|
10914
|
+
style: G(ft.value)
|
|
10903
10915
|
}, [
|
|
10904
10916
|
go(N.$slots, "bottom")
|
|
10905
10917
|
], 4),
|
|
10906
|
-
E.value ? (
|
|
10918
|
+
E.value ? (S(), X("div", {
|
|
10907
10919
|
key: 0,
|
|
10908
10920
|
class: "d-flex flex-column justify-center align-center",
|
|
10909
|
-
style:
|
|
10921
|
+
style: G(Q.value)
|
|
10910
10922
|
}, [
|
|
10911
10923
|
L(Ce, {
|
|
10912
10924
|
icon: "mdi-delete",
|
|
10913
10925
|
size: "x-large"
|
|
10914
10926
|
})
|
|
10915
|
-
], 4)) :
|
|
10916
|
-
y.value ?
|
|
10927
|
+
], 4)) : at("", !0),
|
|
10928
|
+
y.value ? at("", !0) : (S(), X("div", {
|
|
10917
10929
|
key: 1,
|
|
10918
10930
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10919
|
-
style:
|
|
10931
|
+
style: G(gt.value)
|
|
10920
10932
|
}, [
|
|
10921
10933
|
L(Ha, {
|
|
10922
10934
|
ref_key: "clean",
|
|
@@ -10925,36 +10937,36 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10925
10937
|
}, null, 8, ["lock"]),
|
|
10926
10938
|
L(Ga, {
|
|
10927
10939
|
modelValue: i.value,
|
|
10928
|
-
"onUpdate:modelValue":
|
|
10940
|
+
"onUpdate:modelValue": mt[0] || (mt[0] = (uo) => i.value = uo)
|
|
10929
10941
|
}, null, 8, ["modelValue"]),
|
|
10930
|
-
L(
|
|
10942
|
+
L(nc, {
|
|
10931
10943
|
ref_key: "navigator",
|
|
10932
|
-
ref:
|
|
10944
|
+
ref: I,
|
|
10933
10945
|
lock: i.value,
|
|
10934
10946
|
type: P.value
|
|
10935
10947
|
}, null, 8, ["lock", "type"])
|
|
10936
10948
|
], 4)),
|
|
10937
|
-
i.value ? (
|
|
10949
|
+
i.value ? (S(), X("div", {
|
|
10938
10950
|
key: 2,
|
|
10939
|
-
style:
|
|
10940
|
-
}, null, 4)) :
|
|
10941
|
-
i.value ? (
|
|
10951
|
+
style: G(ze.value)
|
|
10952
|
+
}, null, 4)) : at("", !0),
|
|
10953
|
+
i.value ? (S(), X("div", {
|
|
10942
10954
|
key: 3,
|
|
10943
|
-
style: H
|
|
10944
|
-
}, null, 4)) :
|
|
10945
|
-
|
|
10955
|
+
style: G(H.value)
|
|
10956
|
+
}, null, 4)) : at("", !0),
|
|
10957
|
+
w("div", {
|
|
10946
10958
|
ref_key: "parentContainer",
|
|
10947
10959
|
ref: _,
|
|
10948
|
-
style:
|
|
10960
|
+
style: G(oo.value)
|
|
10949
10961
|
}, null, 4),
|
|
10950
|
-
L(
|
|
10962
|
+
L(Ht, {
|
|
10951
10963
|
open: y.value,
|
|
10952
10964
|
"z-index": 99
|
|
10953
10965
|
}, null, 8, ["open"])
|
|
10954
10966
|
]);
|
|
10955
10967
|
};
|
|
10956
10968
|
}
|
|
10957
|
-
}),
|
|
10969
|
+
}), _c = /* @__PURE__ */ st({
|
|
10958
10970
|
__name: "index",
|
|
10959
10971
|
props: {
|
|
10960
10972
|
code: {}
|
|
@@ -10962,10 +10974,10 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10962
10974
|
setup(t) {
|
|
10963
10975
|
const e = t;
|
|
10964
10976
|
xo.registerLanguage("javascript", Fo);
|
|
10965
|
-
const n = Yo.component, { backgroundColor2: o } =
|
|
10977
|
+
const n = Yo.component, { backgroundColor2: o } = Ft();
|
|
10966
10978
|
return (i, a) => {
|
|
10967
|
-
const
|
|
10968
|
-
return
|
|
10979
|
+
const l = D("v-sheet");
|
|
10980
|
+
return S(), Z(l, {
|
|
10969
10981
|
color: R(o),
|
|
10970
10982
|
height: "100%",
|
|
10971
10983
|
width: "100%"
|
|
@@ -10980,42 +10992,42 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
10980
10992
|
}, 8, ["color"]);
|
|
10981
10993
|
};
|
|
10982
10994
|
}
|
|
10983
|
-
}),
|
|
10995
|
+
}), pc = { class: "text-subtitle-1" }, hc = { class: "w-100 h-100 overflow-auto" }, dc = /* @__PURE__ */ st({
|
|
10984
10996
|
__name: "index",
|
|
10985
10997
|
setup(t) {
|
|
10986
|
-
const { t: e } =
|
|
10998
|
+
const { t: e } = Yt(), { sysBarAvail: n } = Bn(), { backgroundColor0: o, backgroundColor2: i } = Ft(), a = Ot(""), l = Y(() => {
|
|
10987
10999
|
let _ = 48;
|
|
10988
11000
|
return n.value && (_ += 24), {
|
|
10989
11001
|
position: "relative",
|
|
10990
11002
|
height: `calc(100% - ${_}px)`
|
|
10991
11003
|
};
|
|
10992
|
-
}),
|
|
11004
|
+
}), r = (_) => {
|
|
10993
11005
|
a.value = _.code;
|
|
10994
|
-
}, { open: u } = Ge("sourceDlg",
|
|
11006
|
+
}, { open: u } = Ge("sourceDlg", r);
|
|
10995
11007
|
return (_, T) => {
|
|
10996
|
-
const
|
|
10997
|
-
return
|
|
11008
|
+
const I = D("v-sheet"), m = D("v-btn"), y = D("v-spacer"), E = D("v-dialog");
|
|
11009
|
+
return S(), Z(E, {
|
|
10998
11010
|
modelValue: R(u),
|
|
10999
|
-
"onUpdate:modelValue": T[1] || (T[1] = (P) =>
|
|
11011
|
+
"onUpdate:modelValue": T[1] || (T[1] = (P) => Wt(u) ? u.value = P : null),
|
|
11000
11012
|
fullscreen: "",
|
|
11001
11013
|
"no-click-animation": "",
|
|
11002
11014
|
persistent: "",
|
|
11003
11015
|
transition: "dialog-bottom-transition",
|
|
11004
|
-
onKeydown: T[2] || (T[2] = On(
|
|
11016
|
+
onKeydown: T[2] || (T[2] = On(bt((P) => u.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11005
11017
|
}, {
|
|
11006
11018
|
default: tt(() => [
|
|
11007
|
-
L(
|
|
11019
|
+
L(I, {
|
|
11008
11020
|
color: R(o),
|
|
11009
11021
|
height: "100%",
|
|
11010
11022
|
width: "100%"
|
|
11011
11023
|
}, {
|
|
11012
11024
|
default: tt(() => [
|
|
11013
|
-
R(n) ? (
|
|
11025
|
+
R(n) ? (S(), Z(I, {
|
|
11014
11026
|
key: 0,
|
|
11015
11027
|
color: R(i),
|
|
11016
11028
|
height: 24
|
|
11017
|
-
}, null, 8, ["color"])) :
|
|
11018
|
-
L(
|
|
11029
|
+
}, null, 8, ["color"])) : at("", !0),
|
|
11030
|
+
L(I, {
|
|
11019
11031
|
class: "d-flex align-center px-2",
|
|
11020
11032
|
color: R(i),
|
|
11021
11033
|
height: 48
|
|
@@ -11027,16 +11039,16 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
11027
11039
|
variant: "text",
|
|
11028
11040
|
onClick: T[0] || (T[0] = (P) => u.value = !1)
|
|
11029
11041
|
}),
|
|
11030
|
-
|
|
11042
|
+
w("span", pc, Mt(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
11031
11043
|
L(y)
|
|
11032
11044
|
]),
|
|
11033
11045
|
_: 1
|
|
11034
11046
|
}, 8, ["color"]),
|
|
11035
|
-
|
|
11036
|
-
style:
|
|
11047
|
+
w("div", {
|
|
11048
|
+
style: G(l.value)
|
|
11037
11049
|
}, [
|
|
11038
|
-
|
|
11039
|
-
L(
|
|
11050
|
+
w("div", hc, [
|
|
11051
|
+
L(_c, { code: a.value }, null, 8, ["code"])
|
|
11040
11052
|
])
|
|
11041
11053
|
], 4)
|
|
11042
11054
|
]),
|
|
@@ -11047,16 +11059,16 @@ const cc = { class: "position-relative w-100 h-100" }, rc = /* @__PURE__ */ st({
|
|
|
11047
11059
|
}, 8, ["modelValue"]);
|
|
11048
11060
|
};
|
|
11049
11061
|
}
|
|
11050
|
-
}),
|
|
11051
|
-
t.component("XBlockly",
|
|
11062
|
+
}), fc = (t) => {
|
|
11063
|
+
t.component("XBlockly", uc), t.component("XSourceDlg", dc);
|
|
11052
11064
|
};
|
|
11053
|
-
async function
|
|
11065
|
+
async function vc(t) {
|
|
11054
11066
|
return (await Pn(/* @__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;
|
|
11055
11067
|
}
|
|
11056
|
-
const
|
|
11068
|
+
const Cc = { install: fc };
|
|
11057
11069
|
export {
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11070
|
+
uc as XBlockly,
|
|
11071
|
+
Cc as default,
|
|
11072
|
+
fc as install,
|
|
11073
|
+
vc as loadLocaleMessageBlock
|
|
11062
11074
|
};
|