x-block-lib 0.7.15 → 0.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
License: see project LICENSE
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-2ba1be08]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:18px!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 Zn, inject as eo, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as
|
|
11
|
-
import { d as h, j as s, O as c, f as co, F as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as No, openPromptDlg as Lo, messageWarning as
|
|
13
|
-
import { elements as x, pkgs as
|
|
10
|
+
import { provide as Zn, inject as eo, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as wt, useModel as Be, ref as Ee, computed as K, resolveDirective as to, withDirectives as no, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as st, withModifiers as Ne, mergeModels as Lt, Fragment as rn, renderList as oo, useId as St, onUnmounted as _n, useTemplateRef as Le, withKeys as pn, isRef as We, createCommentVNode as de, onMounted as zt, nextTick as io, onBeforeUnmount as so, watch as ve, renderSlot as ao } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as co, F as hn, M as _, E, r as Zt, u as v, s as lo, X as Kt, B as d, i as U, a as k, c as Se, b as bt, e as $, g as fe, h as ue, p as be, k as z, l as en, m as R, C as dn, N as te, n as uo, P as Bt, V as Te, o as Ve, q as fn, t as ro, v as _o, w as po, S as ho, x as fo, y as mo, T as at, z as mn, A as To, D as Eo, G as Tn, H as go, I as Io, J as Ao, K as Oo, L as Co, Q as ko, R as vo, U as yo } from "./vendor.gwcdj52j.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as No, openPromptDlg as Lo, messageWarning as En, useColor as xe, useSystem as gn, useViewStack as $t } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Re, getPropTag as ct, parsePixelStr as So, parsePercentStr as bo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
|
-
import { useI18n as
|
|
15
|
+
import { useI18n as Fe } from "vue-i18n";
|
|
16
16
|
import { useDisplay as Bo } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
@@ -58,7 +58,7 @@ h([
|
|
|
58
58
|
s.forBlock.app_env_v1 = function(t) {
|
|
59
59
|
return [`__getEnvV1__() === ${s.quote_(t.getFieldValue("ENV"))}`, c.ATOMIC];
|
|
60
60
|
};
|
|
61
|
-
class m extends
|
|
61
|
+
class m extends hn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -117,23 +117,23 @@ class m extends dn {
|
|
|
117
117
|
}
|
|
118
118
|
co.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class In extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
123
|
Zt.register(
|
|
124
124
|
Zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
In
|
|
127
127
|
);
|
|
128
|
-
const
|
|
129
|
-
function
|
|
128
|
+
const ge = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Je = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
129
|
+
function lt(t) {
|
|
130
130
|
const e = t.lastIndexOf("V");
|
|
131
131
|
if (e <= 0 || e >= t.length - 1)
|
|
132
132
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
133
133
|
const n = lo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
134
134
|
return `${n}_${o}`;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function qe(t) {
|
|
137
137
|
const e = t.lastIndexOf("V");
|
|
138
138
|
if (e <= 0 || e >= t.length - 1)
|
|
139
139
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -163,37 +163,57 @@ function Ro(t) {
|
|
|
163
163
|
e++, t = t.getParent();
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const
|
|
168
|
-
return
|
|
166
|
+
function je(t) {
|
|
167
|
+
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
168
|
+
return v.xml.textToDom(e);
|
|
169
|
+
}
|
|
170
|
+
function Rt(t) {
|
|
171
|
+
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
172
|
+
return v.xml.textToDom(e);
|
|
173
|
+
}
|
|
174
|
+
function An(t) {
|
|
175
|
+
const e = `<block type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></block>`;
|
|
176
|
+
return v.xml.textToDom(e);
|
|
177
|
+
}
|
|
178
|
+
function Do(t) {
|
|
179
|
+
const e = `<block type="${lt(t)}"></block>`;
|
|
180
|
+
return v.xml.textToDom(e);
|
|
181
|
+
}
|
|
182
|
+
function Uo(t) {
|
|
183
|
+
const e = `<block type="${lt(t)}"></block>`;
|
|
184
|
+
return v.xml.textToDom(e);
|
|
185
|
+
}
|
|
186
|
+
function Mo() {
|
|
187
|
+
return v.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
169
188
|
}
|
|
170
|
-
function
|
|
171
|
-
const
|
|
172
|
-
return
|
|
189
|
+
function Po(t) {
|
|
190
|
+
const e = `<block type="color_picker_v1"><field name="COLOR">${t}</field></block>`;
|
|
191
|
+
return v.xml.textToDom(e);
|
|
173
192
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
176
|
-
return
|
|
193
|
+
function Vo(t) {
|
|
194
|
+
let e = null;
|
|
195
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = je(t.default) : t.ui === "numInput" ? e = Rt(t.default) : t.ui === "switch" ? e = An(t.default) : t.ui === "select" ? e = Do(t.items) : t.ui === "multiTypes" ? e = Uo(t.types) : t.ui === "compSelect" ? e = Mo() : t.ui === "colorPicker" ? e = Po(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
177
196
|
}
|
|
178
197
|
function On(t, e) {
|
|
179
|
-
const
|
|
180
|
-
return
|
|
198
|
+
const n = Vo(e);
|
|
199
|
+
return n ? Kt.domToBlock(n, t) : null;
|
|
181
200
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
return
|
|
201
|
+
function xo(t) {
|
|
202
|
+
let e = null;
|
|
203
|
+
return t === "string" ? e = je("") : t === "integer" || t === "float" ? e = Rt(0) : t === "boolean" ? e = An(!1) : t === "enum" || t === "dateTime" ? e = je("") : console.assert(!1), e;
|
|
185
204
|
}
|
|
186
|
-
function
|
|
187
|
-
const n =
|
|
188
|
-
return
|
|
205
|
+
function Dt(t, e) {
|
|
206
|
+
const n = xo(e);
|
|
207
|
+
return n ? Kt.domToBlock(n, t) : null;
|
|
189
208
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
192
|
-
return he.domToBlock(o, t);
|
|
209
|
+
function Ye(t) {
|
|
210
|
+
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "list" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
193
211
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
196
|
-
|
|
212
|
+
function Cn(t) {
|
|
213
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? qe(t.items) : t.ui === "multiTypes" ? qe(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
214
|
+
}
|
|
215
|
+
function kn(t) {
|
|
216
|
+
return t === "string" ? "String" : t === "integer" || t === "float" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
197
217
|
}
|
|
198
218
|
function Ht(t, e, n, o) {
|
|
199
219
|
const i = `
|
|
@@ -201,7 +221,7 @@ function Ht(t, e, n, o) {
|
|
|
201
221
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
202
222
|
</block>
|
|
203
223
|
`, a = v.xml.textToDom(i);
|
|
204
|
-
return
|
|
224
|
+
return Kt.domToBlock(a, t);
|
|
205
225
|
}
|
|
206
226
|
function F(t, e) {
|
|
207
227
|
try {
|
|
@@ -227,9 +247,9 @@ function F(t, e) {
|
|
|
227
247
|
E.enable();
|
|
228
248
|
}
|
|
229
249
|
}
|
|
230
|
-
function
|
|
250
|
+
function we(t) {
|
|
231
251
|
const { version: e } = T.app.activeObject;
|
|
232
|
-
if (!
|
|
252
|
+
if (!Re[e])
|
|
233
253
|
return console.assert(!1, "invalid pkg version", e), [];
|
|
234
254
|
const o = [];
|
|
235
255
|
for (const i in x) {
|
|
@@ -238,14 +258,14 @@ function He(t) {
|
|
|
238
258
|
}
|
|
239
259
|
return o;
|
|
240
260
|
}
|
|
241
|
-
function
|
|
261
|
+
function re(t) {
|
|
242
262
|
const e = x[t];
|
|
243
263
|
if (e)
|
|
244
264
|
return e;
|
|
245
265
|
}
|
|
246
|
-
function
|
|
266
|
+
function Ae(t) {
|
|
247
267
|
const { i18n: e } = ie, n = [];
|
|
248
|
-
return
|
|
268
|
+
return we(t).forEach(({ key: i, name: a }) => {
|
|
249
269
|
n.push([e.global.t(a), i]);
|
|
250
270
|
}), N(n);
|
|
251
271
|
}
|
|
@@ -253,12 +273,12 @@ function Ut(t) {
|
|
|
253
273
|
const e = x[t];
|
|
254
274
|
return e ? e.events : [];
|
|
255
275
|
}
|
|
256
|
-
function
|
|
276
|
+
function It(t, e) {
|
|
257
277
|
const n = x[t];
|
|
258
278
|
if (n)
|
|
259
279
|
return n.events.find((o) => o.key === e);
|
|
260
280
|
}
|
|
261
|
-
function
|
|
281
|
+
function Fo(t) {
|
|
262
282
|
const e = [];
|
|
263
283
|
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
264
284
|
e.push([_[i] ?? i, o]);
|
|
@@ -268,19 +288,19 @@ function Mt(t) {
|
|
|
268
288
|
const e = x[t];
|
|
269
289
|
return e ? e.methods : [];
|
|
270
290
|
}
|
|
271
|
-
function
|
|
291
|
+
function At(t, e) {
|
|
272
292
|
const n = x[t];
|
|
273
293
|
if (n)
|
|
274
294
|
return n.methods.find((o) => o.key === e);
|
|
275
295
|
}
|
|
276
|
-
function
|
|
296
|
+
function Yo(t) {
|
|
277
297
|
const e = [];
|
|
278
298
|
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
279
299
|
e.push([_[i] ?? i, o]);
|
|
280
300
|
}), N(e);
|
|
281
301
|
}
|
|
282
|
-
function
|
|
283
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
302
|
+
function De(t, e) {
|
|
303
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
284
304
|
if (!a)
|
|
285
305
|
return console.assert(!1, "invalid prop tag", o, i), [];
|
|
286
306
|
if (!x[t])
|
|
@@ -291,7 +311,7 @@ function Ve(t, e) {
|
|
|
291
311
|
}), u;
|
|
292
312
|
}
|
|
293
313
|
function se(t, e) {
|
|
294
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
314
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
295
315
|
if (!a) {
|
|
296
316
|
console.assert(!1, "invalid prop tag", o, i);
|
|
297
317
|
return;
|
|
@@ -300,14 +320,14 @@ function se(t, e) {
|
|
|
300
320
|
}
|
|
301
321
|
function vn(t, e) {
|
|
302
322
|
const { i18n: n } = ie, o = [];
|
|
303
|
-
return
|
|
323
|
+
return De(t, e).forEach(({ keys: a, names: l }) => {
|
|
304
324
|
let u = "";
|
|
305
325
|
l.forEach((r, p) => {
|
|
306
326
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
307
327
|
}), o.push([u, a]);
|
|
308
328
|
}), N(o);
|
|
309
329
|
}
|
|
310
|
-
function
|
|
330
|
+
function Ce(t) {
|
|
311
331
|
const { nodes: e } = T.app.activeObject, n = [];
|
|
312
332
|
for (const o in e) {
|
|
313
333
|
const i = e[o], a = x[i.key];
|
|
@@ -324,12 +344,12 @@ function Ne(t) {
|
|
|
324
344
|
}
|
|
325
345
|
return n;
|
|
326
346
|
}
|
|
327
|
-
function
|
|
347
|
+
function Y(t) {
|
|
328
348
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
329
349
|
}
|
|
330
|
-
function
|
|
350
|
+
function Ke(t) {
|
|
331
351
|
const { i18n: e } = ie, n = [];
|
|
332
|
-
return
|
|
352
|
+
return Ce(t).forEach(({ id: i, key: a, alias: l }) => {
|
|
333
353
|
const u = x[a];
|
|
334
354
|
if (!u) {
|
|
335
355
|
console.assert(!1, "invalid element", a);
|
|
@@ -340,14 +360,14 @@ function Ge(t) {
|
|
|
340
360
|
}), N(n);
|
|
341
361
|
}
|
|
342
362
|
function Pt(t) {
|
|
343
|
-
const e =
|
|
363
|
+
const e = Y(t);
|
|
344
364
|
if (!e)
|
|
345
365
|
return [];
|
|
346
366
|
const n = x[e.key];
|
|
347
367
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
348
368
|
}
|
|
349
|
-
function
|
|
350
|
-
const n =
|
|
369
|
+
function Ot(t, e) {
|
|
370
|
+
const n = Y(t);
|
|
351
371
|
if (!n)
|
|
352
372
|
return;
|
|
353
373
|
const o = x[n.key];
|
|
@@ -357,21 +377,21 @@ function kt(t, e) {
|
|
|
357
377
|
}
|
|
358
378
|
return o.events.find((i) => i.key === e);
|
|
359
379
|
}
|
|
360
|
-
function
|
|
380
|
+
function wo(t) {
|
|
361
381
|
const e = [];
|
|
362
382
|
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
363
383
|
e.push([_[i] ?? i, o]);
|
|
364
384
|
}), N(e);
|
|
365
385
|
}
|
|
366
386
|
function Vt(t) {
|
|
367
|
-
const e =
|
|
387
|
+
const e = Y(t);
|
|
368
388
|
if (!e)
|
|
369
389
|
return [];
|
|
370
390
|
const n = x[e.key];
|
|
371
391
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
372
392
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
393
|
+
function Ct(t, e) {
|
|
394
|
+
const n = Y(t);
|
|
375
395
|
if (!n)
|
|
376
396
|
return;
|
|
377
397
|
const o = x[n.key];
|
|
@@ -381,41 +401,41 @@ function vt(t, e) {
|
|
|
381
401
|
}
|
|
382
402
|
return o.methods.find((i) => i.key === e);
|
|
383
403
|
}
|
|
384
|
-
function
|
|
404
|
+
function Ko(t) {
|
|
385
405
|
const e = [];
|
|
386
406
|
return Vt(t).forEach(({ key: o, name: i }) => {
|
|
387
407
|
e.push([_[i] ?? i, o]);
|
|
388
408
|
}), N(e);
|
|
389
409
|
}
|
|
390
|
-
function
|
|
391
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l =
|
|
410
|
+
function Ue(t, e) {
|
|
411
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = ct(o, i);
|
|
392
412
|
if (!l)
|
|
393
413
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
394
|
-
const u =
|
|
414
|
+
const u = Y(t);
|
|
395
415
|
return u ? x[u.key] ? (n[u.key]?.[l]?.forEach((p) => {
|
|
396
416
|
e && (!p.raw.ui || p.raw.readonly || p.keys === "alias") || a.push(p);
|
|
397
417
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
398
418
|
}
|
|
399
419
|
function ae(t, e) {
|
|
400
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
420
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = ct(o, i);
|
|
401
421
|
if (!a) {
|
|
402
422
|
console.assert(!1, "invalid prop tag", o, i);
|
|
403
423
|
return;
|
|
404
424
|
}
|
|
405
|
-
const l =
|
|
425
|
+
const l = Y(t);
|
|
406
426
|
if (l)
|
|
407
427
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
408
428
|
}
|
|
409
429
|
function yn(t, e) {
|
|
410
430
|
const { i18n: n } = ie, o = [];
|
|
411
|
-
return
|
|
431
|
+
return Ue(t, e).forEach(({ keys: a, names: l }) => {
|
|
412
432
|
let u = "";
|
|
413
433
|
l.forEach((r, p) => {
|
|
414
434
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
415
435
|
}), o.push([u, a]);
|
|
416
436
|
}), N(o);
|
|
417
437
|
}
|
|
418
|
-
const
|
|
438
|
+
const $o = {
|
|
419
439
|
init: function() {
|
|
420
440
|
this.node = {
|
|
421
441
|
id: "",
|
|
@@ -431,7 +451,7 @@ const Vo = {
|
|
|
431
451
|
initData_: function() {
|
|
432
452
|
if (this.node.id)
|
|
433
453
|
return;
|
|
434
|
-
const t =
|
|
454
|
+
const t = Ce()?.[0];
|
|
435
455
|
if (!t)
|
|
436
456
|
return;
|
|
437
457
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -456,13 +476,13 @@ const Vo = {
|
|
|
456
476
|
}, 0);
|
|
457
477
|
},
|
|
458
478
|
genNodeOpts_: function() {
|
|
459
|
-
return
|
|
479
|
+
return Ke("method");
|
|
460
480
|
},
|
|
461
481
|
genMethodOpts_: function() {
|
|
462
|
-
return
|
|
482
|
+
return Ko(this.node.id);
|
|
463
483
|
},
|
|
464
484
|
genElementOpts_: function() {
|
|
465
|
-
return
|
|
485
|
+
return Ae();
|
|
466
486
|
},
|
|
467
487
|
onchange: function(t) {
|
|
468
488
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -477,7 +497,7 @@ const Vo = {
|
|
|
477
497
|
}
|
|
478
498
|
},
|
|
479
499
|
onNodeChange_: function(t) {
|
|
480
|
-
const e =
|
|
500
|
+
const e = Y(t);
|
|
481
501
|
if (!e) {
|
|
482
502
|
console.assert(!1);
|
|
483
503
|
return;
|
|
@@ -485,13 +505,13 @@ const Vo = {
|
|
|
485
505
|
const n = this.node.key !== e.key;
|
|
486
506
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
487
507
|
const o = this.getField("METHOD");
|
|
488
|
-
if (o.getOptions(!1), n || !
|
|
508
|
+
if (o.getOptions(!1), n || !Ct(this.node.id, this.method.key)) {
|
|
489
509
|
const a = Vt(this.node.id)?.[0]?.key ?? "";
|
|
490
510
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
491
511
|
}
|
|
492
512
|
},
|
|
493
513
|
onMethodChange_: function(t) {
|
|
494
|
-
const e =
|
|
514
|
+
const e = Ct(this.node.id, t);
|
|
495
515
|
e ? (this.method.key = e.key, this.method.name = e.name, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.key = "", this.method.name = "", this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShape2_(), this.updateShadow_(), setTimeout(() => {
|
|
496
516
|
this.ensureBlocks_();
|
|
497
517
|
}, 0);
|
|
@@ -550,7 +570,7 @@ const Vo = {
|
|
|
550
570
|
t.length > 0 && F(this, t);
|
|
551
571
|
},
|
|
552
572
|
checkWarning_: function() {
|
|
553
|
-
const t =
|
|
573
|
+
const t = Y(this.node.id);
|
|
554
574
|
if (!t) {
|
|
555
575
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
556
576
|
return;
|
|
@@ -560,7 +580,7 @@ const Vo = {
|
|
|
560
580
|
return;
|
|
561
581
|
}
|
|
562
582
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
563
|
-
const e =
|
|
583
|
+
const e = Ct(this.node.id, this.method.key);
|
|
564
584
|
if (!e) {
|
|
565
585
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
566
586
|
return;
|
|
@@ -572,7 +592,7 @@ const Vo = {
|
|
|
572
592
|
this.setWarningText(null);
|
|
573
593
|
}
|
|
574
594
|
};
|
|
575
|
-
d.call_node_method_v1 =
|
|
595
|
+
d.call_node_method_v1 = $o;
|
|
576
596
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
577
597
|
const e = s.quote_, n = t;
|
|
578
598
|
let o = n.node.id;
|
|
@@ -595,7 +615,7 @@ ${a}}
|
|
|
595
615
|
`;
|
|
596
616
|
}
|
|
597
617
|
};
|
|
598
|
-
const
|
|
618
|
+
const Ho = {
|
|
599
619
|
init: function() {
|
|
600
620
|
this.element = {
|
|
601
621
|
key: "",
|
|
@@ -610,7 +630,7 @@ const xo = {
|
|
|
610
630
|
initData_: function() {
|
|
611
631
|
if (this.element.key)
|
|
612
632
|
return;
|
|
613
|
-
const t =
|
|
633
|
+
const t = we("method")?.[0];
|
|
614
634
|
if (!t)
|
|
615
635
|
return;
|
|
616
636
|
this.element.key = t.key, this.element.name = t.name;
|
|
@@ -619,7 +639,7 @@ const xo = {
|
|
|
619
639
|
const n = Mt(this.element.key)?.[0];
|
|
620
640
|
if (!n)
|
|
621
641
|
return;
|
|
622
|
-
this.method =
|
|
642
|
+
this.method = Se(n);
|
|
623
643
|
const o = this.getField("METHOD");
|
|
624
644
|
o.getOptions(!1), o.setValue(this.method.key);
|
|
625
645
|
},
|
|
@@ -635,10 +655,10 @@ const xo = {
|
|
|
635
655
|
}, 0);
|
|
636
656
|
},
|
|
637
657
|
genElementOpts_: function() {
|
|
638
|
-
return
|
|
658
|
+
return Ae("method");
|
|
639
659
|
},
|
|
640
660
|
genMethodOpts_: function() {
|
|
641
|
-
return
|
|
661
|
+
return Yo(this.element.key);
|
|
642
662
|
},
|
|
643
663
|
onchange: function(t) {
|
|
644
664
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -653,7 +673,7 @@ const xo = {
|
|
|
653
673
|
}
|
|
654
674
|
},
|
|
655
675
|
onElementChange_: function(t) {
|
|
656
|
-
const e =
|
|
676
|
+
const e = re(t);
|
|
657
677
|
if (!e) {
|
|
658
678
|
console.assert(!1);
|
|
659
679
|
return;
|
|
@@ -661,13 +681,13 @@ const xo = {
|
|
|
661
681
|
const n = this.element.key !== e.key;
|
|
662
682
|
this.element.key = e.key, this.element.name = e.name;
|
|
663
683
|
const o = this.getField("METHOD");
|
|
664
|
-
if (o.getOptions(!1), n || !
|
|
684
|
+
if (o.getOptions(!1), n || !At(this.element.key, this.method.key)) {
|
|
665
685
|
const a = Mt(this.element.key)?.[0]?.key ?? "";
|
|
666
686
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
667
687
|
}
|
|
668
688
|
},
|
|
669
689
|
onMethodChange_: function(t) {
|
|
670
|
-
const e =
|
|
690
|
+
const e = At(this.element.key, t);
|
|
671
691
|
e ? (this.method.key = e.key, this.method.name = e.name, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.key = "", this.method.name = "", this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShape2_(), this.updateShadow_(), setTimeout(() => {
|
|
672
692
|
this.ensureBlocks_();
|
|
673
693
|
}, 0);
|
|
@@ -678,7 +698,7 @@ const xo = {
|
|
|
678
698
|
console.assert(!1);
|
|
679
699
|
return;
|
|
680
700
|
}
|
|
681
|
-
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() =>
|
|
701
|
+
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() => Ae()), "EXTRA1");
|
|
682
702
|
},
|
|
683
703
|
updateShape2_: function() {
|
|
684
704
|
this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
@@ -723,13 +743,13 @@ const xo = {
|
|
|
723
743
|
t.length > 0 && F(this, t);
|
|
724
744
|
},
|
|
725
745
|
checkWarning_: function() {
|
|
726
|
-
const t =
|
|
746
|
+
const t = re(this.element.key);
|
|
727
747
|
if (!t) {
|
|
728
748
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
729
749
|
return;
|
|
730
750
|
}
|
|
731
751
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
732
|
-
const e =
|
|
752
|
+
const e = At(this.element.key, this.method.key);
|
|
733
753
|
if (!e) {
|
|
734
754
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
735
755
|
return;
|
|
@@ -741,7 +761,7 @@ const xo = {
|
|
|
741
761
|
this.setWarningText(null);
|
|
742
762
|
}
|
|
743
763
|
};
|
|
744
|
-
d.call_node_method_as_v1 =
|
|
764
|
+
d.call_node_method_as_v1 = Ho;
|
|
745
765
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
746
766
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
747
767
|
if (!o)
|
|
@@ -765,18 +785,18 @@ ${a}}
|
|
|
765
785
|
`;
|
|
766
786
|
}
|
|
767
787
|
};
|
|
768
|
-
function
|
|
788
|
+
function Go() {
|
|
769
789
|
return T.app.activeObject.type !== "comp" ? !1 : T.app.activeComp.meta.properties.length > 0 || T.app.activeComp.meta.methods.length > 0 || T.app.activeComp.meta.events.length > 0;
|
|
770
790
|
}
|
|
771
|
-
function
|
|
791
|
+
function Me() {
|
|
772
792
|
return T.app.activeComp.meta.methods;
|
|
773
793
|
}
|
|
774
|
-
function
|
|
794
|
+
function Qe(t) {
|
|
775
795
|
return T.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
776
796
|
}
|
|
777
797
|
function Nn() {
|
|
778
798
|
const t = [];
|
|
779
|
-
return
|
|
799
|
+
return Me().forEach(({ id: n, name: o }) => {
|
|
780
800
|
t.push([o, n]);
|
|
781
801
|
}), N(t);
|
|
782
802
|
}
|
|
@@ -786,14 +806,14 @@ function xt(t) {
|
|
|
786
806
|
);
|
|
787
807
|
return e ? e.outputs : [];
|
|
788
808
|
}
|
|
789
|
-
function
|
|
809
|
+
function kt(t, e) {
|
|
790
810
|
const n = T.app.activeComp.meta.methods.find(
|
|
791
811
|
(o) => o.id === t
|
|
792
812
|
);
|
|
793
813
|
if (n)
|
|
794
814
|
return n.outputs.find((o) => o.id === e);
|
|
795
815
|
}
|
|
796
|
-
function
|
|
816
|
+
function Wo(t) {
|
|
797
817
|
const e = [];
|
|
798
818
|
return xt(t).forEach(({ id: o, name: i }) => {
|
|
799
819
|
e.push([i, o]);
|
|
@@ -802,16 +822,16 @@ function wo(t) {
|
|
|
802
822
|
function Ln() {
|
|
803
823
|
return T.app.activeComp.meta.events;
|
|
804
824
|
}
|
|
805
|
-
function
|
|
825
|
+
function tn(t) {
|
|
806
826
|
return T.app.activeComp.meta.events.find((e) => e.id === t);
|
|
807
827
|
}
|
|
808
|
-
function
|
|
828
|
+
function jo() {
|
|
809
829
|
const t = [];
|
|
810
830
|
return Ln().forEach(({ id: n, name: o }) => {
|
|
811
831
|
t.push([o, n]);
|
|
812
832
|
}), N(t);
|
|
813
833
|
}
|
|
814
|
-
const
|
|
834
|
+
const Xo = {
|
|
815
835
|
init: function() {
|
|
816
836
|
this.method = {
|
|
817
837
|
id: "",
|
|
@@ -822,7 +842,7 @@ const Ko = {
|
|
|
822
842
|
initData_: function() {
|
|
823
843
|
if (this.method.id)
|
|
824
844
|
return;
|
|
825
|
-
const t =
|
|
845
|
+
const t = Me()?.[0];
|
|
826
846
|
if (!t)
|
|
827
847
|
return;
|
|
828
848
|
this.method.id = t.id, this.method.name = t.name, this.method.inputs = t.inputs;
|
|
@@ -855,7 +875,7 @@ const Ko = {
|
|
|
855
875
|
}
|
|
856
876
|
},
|
|
857
877
|
onMethodChange_: function(t) {
|
|
858
|
-
const e =
|
|
878
|
+
const e = Qe(t);
|
|
859
879
|
e ? (this.method.id = e.id, this.method.name = e.name, this.method.inputs = e.inputs) : (this.method.id = "", this.method.name = "", this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
860
880
|
this.rebuildBlocks();
|
|
861
881
|
}, 0);
|
|
@@ -879,7 +899,7 @@ const Ko = {
|
|
|
879
899
|
F(this, t);
|
|
880
900
|
},
|
|
881
901
|
checkWarning_: function() {
|
|
882
|
-
const t =
|
|
902
|
+
const t = Qe(this.method.id);
|
|
883
903
|
if (!t) {
|
|
884
904
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
885
905
|
return;
|
|
@@ -891,15 +911,15 @@ const Ko = {
|
|
|
891
911
|
this.setWarningText(null);
|
|
892
912
|
}
|
|
893
913
|
};
|
|
894
|
-
d.comp_method_impl_v1 =
|
|
914
|
+
d.comp_method_impl_v1 = Xo;
|
|
895
915
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
896
916
|
const e = t;
|
|
897
917
|
return `{
|
|
898
918
|
${s.statementToCode(e, "HANDLE")}}
|
|
899
919
|
`;
|
|
900
920
|
};
|
|
901
|
-
const
|
|
902
|
-
const n =
|
|
921
|
+
const Jo = (t, e) => {
|
|
922
|
+
const n = lt(t), o = qe(t);
|
|
903
923
|
d[n] = {
|
|
904
924
|
init: function() {
|
|
905
925
|
this.appendDummyInput().appendField(
|
|
@@ -918,13 +938,13 @@ const $o = (t, e) => {
|
|
|
918
938
|
return [a(l), c.ATOMIC];
|
|
919
939
|
};
|
|
920
940
|
};
|
|
921
|
-
for (const t in
|
|
922
|
-
const e =
|
|
941
|
+
for (const t in Re) {
|
|
942
|
+
const e = Re[t];
|
|
923
943
|
for (const n in e.items)
|
|
924
|
-
|
|
944
|
+
Jo(n, e.items[n]);
|
|
925
945
|
}
|
|
926
|
-
const
|
|
927
|
-
const n =
|
|
946
|
+
const qo = (t, e) => {
|
|
947
|
+
const n = lt(t), o = qe(t);
|
|
928
948
|
d[n] = {
|
|
929
949
|
init: function() {
|
|
930
950
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -979,7 +999,7 @@ const Ho = (t, e) => {
|
|
|
979
999
|
let u, r;
|
|
980
1000
|
if (l.ui === "pixelInput") {
|
|
981
1001
|
const p = So(this.value) ?? 0;
|
|
982
|
-
u = new
|
|
1002
|
+
u = new bt(
|
|
983
1003
|
p,
|
|
984
1004
|
l.min,
|
|
985
1005
|
l.max,
|
|
@@ -990,7 +1010,7 @@ const Ho = (t, e) => {
|
|
|
990
1010
|
), r = "px";
|
|
991
1011
|
} else if (l.ui === "percentInput") {
|
|
992
1012
|
const p = bo(this.value) ?? 0;
|
|
993
|
-
u = new
|
|
1013
|
+
u = new bt(
|
|
994
1014
|
p,
|
|
995
1015
|
l.min,
|
|
996
1016
|
l.max,
|
|
@@ -1015,12 +1035,12 @@ const Ho = (t, e) => {
|
|
|
1015
1035
|
return [a(i.value), c.ATOMIC];
|
|
1016
1036
|
};
|
|
1017
1037
|
};
|
|
1018
|
-
for (const t in
|
|
1019
|
-
const e =
|
|
1038
|
+
for (const t in Re) {
|
|
1039
|
+
const e = Re[t];
|
|
1020
1040
|
for (const n in e.types)
|
|
1021
|
-
|
|
1041
|
+
qo(n, e.types[n]);
|
|
1022
1042
|
}
|
|
1023
|
-
const
|
|
1043
|
+
const Qo = {
|
|
1024
1044
|
init: function() {
|
|
1025
1045
|
this.node = {
|
|
1026
1046
|
id: "",
|
|
@@ -1031,7 +1051,7 @@ const Go = {
|
|
|
1031
1051
|
initData_: function() {
|
|
1032
1052
|
if (this.node.id)
|
|
1033
1053
|
return;
|
|
1034
|
-
const t =
|
|
1054
|
+
const t = Ce()?.[0];
|
|
1035
1055
|
if (!t)
|
|
1036
1056
|
return;
|
|
1037
1057
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1049,7 +1069,7 @@ const Go = {
|
|
|
1049
1069
|
}, 0);
|
|
1050
1070
|
},
|
|
1051
1071
|
genNodeOpts_: function() {
|
|
1052
|
-
return
|
|
1072
|
+
return Ke();
|
|
1053
1073
|
},
|
|
1054
1074
|
onchange: function(t) {
|
|
1055
1075
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1064,7 +1084,7 @@ const Go = {
|
|
|
1064
1084
|
}
|
|
1065
1085
|
},
|
|
1066
1086
|
onNodeChange_: function(t) {
|
|
1067
|
-
const e =
|
|
1087
|
+
const e = Y(t);
|
|
1068
1088
|
if (!e) {
|
|
1069
1089
|
console.assert(!1);
|
|
1070
1090
|
return;
|
|
@@ -1072,7 +1092,7 @@ const Go = {
|
|
|
1072
1092
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1073
1093
|
},
|
|
1074
1094
|
checkWarning_: function() {
|
|
1075
|
-
const t =
|
|
1095
|
+
const t = Y(this.node.id);
|
|
1076
1096
|
if (!t) {
|
|
1077
1097
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1078
1098
|
return;
|
|
@@ -1084,12 +1104,12 @@ const Go = {
|
|
|
1084
1104
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1085
1105
|
}
|
|
1086
1106
|
};
|
|
1087
|
-
d.get_node_v1 =
|
|
1107
|
+
d.get_node_v1 = Qo;
|
|
1088
1108
|
s.forBlock.get_node_v1 = function(t) {
|
|
1089
1109
|
const e = t;
|
|
1090
1110
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1091
1111
|
};
|
|
1092
|
-
const
|
|
1112
|
+
const zo = {
|
|
1093
1113
|
init: function() {
|
|
1094
1114
|
this.node = {
|
|
1095
1115
|
id: "",
|
|
@@ -1103,13 +1123,13 @@ const Wo = {
|
|
|
1103
1123
|
initData_: function() {
|
|
1104
1124
|
if (this.node.id)
|
|
1105
1125
|
return;
|
|
1106
|
-
const t =
|
|
1126
|
+
const t = Ce()?.[0];
|
|
1107
1127
|
if (!t)
|
|
1108
1128
|
return;
|
|
1109
1129
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1110
1130
|
const e = this.getField("NODE");
|
|
1111
1131
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1112
|
-
const n =
|
|
1132
|
+
const n = Ue(this.node.id)?.[0];
|
|
1113
1133
|
if (!n)
|
|
1114
1134
|
return;
|
|
1115
1135
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -1128,7 +1148,7 @@ const Wo = {
|
|
|
1128
1148
|
}, 0);
|
|
1129
1149
|
},
|
|
1130
1150
|
genNodeOpts_: function() {
|
|
1131
|
-
return
|
|
1151
|
+
return Ke();
|
|
1132
1152
|
},
|
|
1133
1153
|
genPropOpts_: function() {
|
|
1134
1154
|
return yn(this.node.id);
|
|
@@ -1146,7 +1166,7 @@ const Wo = {
|
|
|
1146
1166
|
}
|
|
1147
1167
|
},
|
|
1148
1168
|
onNodeChange_: function(t) {
|
|
1149
|
-
const e =
|
|
1169
|
+
const e = Y(t);
|
|
1150
1170
|
if (!e) {
|
|
1151
1171
|
console.assert(!1);
|
|
1152
1172
|
return;
|
|
@@ -1155,7 +1175,7 @@ const Wo = {
|
|
|
1155
1175
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1156
1176
|
const o = this.getField("PROP");
|
|
1157
1177
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
1158
|
-
const a =
|
|
1178
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
1159
1179
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1160
1180
|
}
|
|
1161
1181
|
},
|
|
@@ -1164,7 +1184,7 @@ const Wo = {
|
|
|
1164
1184
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1165
1185
|
},
|
|
1166
1186
|
checkWarning_: function() {
|
|
1167
|
-
const t =
|
|
1187
|
+
const t = Y(this.node.id);
|
|
1168
1188
|
if (!t) {
|
|
1169
1189
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1170
1190
|
return;
|
|
@@ -1182,12 +1202,12 @@ const Wo = {
|
|
|
1182
1202
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1183
1203
|
}
|
|
1184
1204
|
};
|
|
1185
|
-
d.get_node_prop_v1 =
|
|
1205
|
+
d.get_node_prop_v1 = zo;
|
|
1186
1206
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1187
1207
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1188
1208
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1189
1209
|
};
|
|
1190
|
-
const
|
|
1210
|
+
const Zo = {
|
|
1191
1211
|
init: function() {
|
|
1192
1212
|
this.element = {
|
|
1193
1213
|
key: "",
|
|
@@ -1200,16 +1220,16 @@ const jo = {
|
|
|
1200
1220
|
initData_: function() {
|
|
1201
1221
|
if (this.element.key)
|
|
1202
1222
|
return;
|
|
1203
|
-
const t =
|
|
1223
|
+
const t = we()?.[0];
|
|
1204
1224
|
if (!t)
|
|
1205
1225
|
return;
|
|
1206
1226
|
this.element.key = t.key, this.element.name = t.name;
|
|
1207
1227
|
const e = this.getField("ELEMENT");
|
|
1208
1228
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1209
|
-
const n =
|
|
1229
|
+
const n = De(this.element.key)?.[0];
|
|
1210
1230
|
if (!n)
|
|
1211
1231
|
return;
|
|
1212
|
-
this.prop.keys = n.keys, this.prop.names =
|
|
1232
|
+
this.prop.keys = n.keys, this.prop.names = Se(n.names);
|
|
1213
1233
|
const o = this.getField("PROP");
|
|
1214
1234
|
o.getOptions(!1), o.setValue(this.prop.keys);
|
|
1215
1235
|
},
|
|
@@ -1225,7 +1245,7 @@ const jo = {
|
|
|
1225
1245
|
}, 0);
|
|
1226
1246
|
},
|
|
1227
1247
|
genElementOpts_: function() {
|
|
1228
|
-
return
|
|
1248
|
+
return Ae();
|
|
1229
1249
|
},
|
|
1230
1250
|
genPropOpts_: function() {
|
|
1231
1251
|
return vn(this.element.key);
|
|
@@ -1243,7 +1263,7 @@ const jo = {
|
|
|
1243
1263
|
}
|
|
1244
1264
|
},
|
|
1245
1265
|
onElementChange_: function(t) {
|
|
1246
|
-
const e =
|
|
1266
|
+
const e = re(t);
|
|
1247
1267
|
if (!e) {
|
|
1248
1268
|
console.assert(!1);
|
|
1249
1269
|
return;
|
|
@@ -1252,7 +1272,7 @@ const jo = {
|
|
|
1252
1272
|
this.element.key = e.key, this.element.name = e.name;
|
|
1253
1273
|
const o = this.getField("PROP");
|
|
1254
1274
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
1255
|
-
const a =
|
|
1275
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
1256
1276
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1257
1277
|
}
|
|
1258
1278
|
},
|
|
@@ -1261,7 +1281,7 @@ const jo = {
|
|
|
1261
1281
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1262
1282
|
},
|
|
1263
1283
|
checkWarning_: function() {
|
|
1264
|
-
const t =
|
|
1284
|
+
const t = re(this.element.key);
|
|
1265
1285
|
if (!t) {
|
|
1266
1286
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1267
1287
|
return;
|
|
@@ -1275,29 +1295,29 @@ const jo = {
|
|
|
1275
1295
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1276
1296
|
}
|
|
1277
1297
|
};
|
|
1278
|
-
d.get_node_prop_as_v1 =
|
|
1298
|
+
d.get_node_prop_as_v1 = Zo;
|
|
1279
1299
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1280
1300
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1281
1301
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1282
1302
|
};
|
|
1283
|
-
function
|
|
1303
|
+
function ei() {
|
|
1284
1304
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1285
1305
|
}
|
|
1286
1306
|
function Sn() {
|
|
1287
1307
|
return T.app.activePage.meta.arguments;
|
|
1288
1308
|
}
|
|
1289
|
-
function
|
|
1309
|
+
function nn(t) {
|
|
1290
1310
|
return T.app.activePage.meta.arguments.find(
|
|
1291
1311
|
(e) => e.id === t
|
|
1292
1312
|
);
|
|
1293
1313
|
}
|
|
1294
|
-
function
|
|
1314
|
+
function ti() {
|
|
1295
1315
|
const t = [];
|
|
1296
1316
|
return Sn().forEach(({ id: n, name: o }) => {
|
|
1297
1317
|
t.push([o, n]);
|
|
1298
1318
|
}), N(t);
|
|
1299
1319
|
}
|
|
1300
|
-
const
|
|
1320
|
+
const ni = {
|
|
1301
1321
|
init: function() {
|
|
1302
1322
|
this.argument = {
|
|
1303
1323
|
id: "",
|
|
@@ -1319,7 +1339,7 @@ const qo = {
|
|
|
1319
1339
|
}, 0);
|
|
1320
1340
|
},
|
|
1321
1341
|
genArgumentOpts_: function() {
|
|
1322
|
-
return
|
|
1342
|
+
return ti();
|
|
1323
1343
|
},
|
|
1324
1344
|
onchange: function(t) {
|
|
1325
1345
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1334,7 +1354,7 @@ const qo = {
|
|
|
1334
1354
|
}
|
|
1335
1355
|
},
|
|
1336
1356
|
onArgumentChange_: function(t) {
|
|
1337
|
-
const e =
|
|
1357
|
+
const e = nn(t);
|
|
1338
1358
|
if (!e) {
|
|
1339
1359
|
console.assert(!1);
|
|
1340
1360
|
return;
|
|
@@ -1345,7 +1365,7 @@ const qo = {
|
|
|
1345
1365
|
this.argument.type === "string" ? this.setOutput(!0, "String") : this.argument.type === "number" ? this.setOutput(!0, "Number") : this.argument.type === "boolean" ? this.setOutput(!0, "Boolean") : this.argument.type === "list" ? this.setOutput(!0, "Array") : this.argument.type === "object" ? this.setOutput(!0, "Object") : this.setOutput(!0, null);
|
|
1346
1366
|
},
|
|
1347
1367
|
checkWarning_: function() {
|
|
1348
|
-
const t =
|
|
1368
|
+
const t = nn(this.argument.id);
|
|
1349
1369
|
if (!t) {
|
|
1350
1370
|
this.setWarningText(_.WARN_ARGUMENT_NOT_FOUND);
|
|
1351
1371
|
return;
|
|
@@ -1357,7 +1377,7 @@ const qo = {
|
|
|
1357
1377
|
this.setWarningText(null);
|
|
1358
1378
|
}
|
|
1359
1379
|
};
|
|
1360
|
-
d.get_page_argument_v1 =
|
|
1380
|
+
d.get_page_argument_v1 = ni;
|
|
1361
1381
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1362
1382
|
const e = t;
|
|
1363
1383
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
@@ -1365,10 +1385,10 @@ s.forBlock.get_page_argument_v1 = function(t) {
|
|
|
1365
1385
|
function Gt() {
|
|
1366
1386
|
return T.app.appList;
|
|
1367
1387
|
}
|
|
1368
|
-
function
|
|
1388
|
+
function on(t) {
|
|
1369
1389
|
return T.app.appList.find((e) => e.id === t);
|
|
1370
1390
|
}
|
|
1371
|
-
function
|
|
1391
|
+
function oi() {
|
|
1372
1392
|
const t = [];
|
|
1373
1393
|
return Gt().forEach(({ id: n, name: o }) => {
|
|
1374
1394
|
t.push([o, n]);
|
|
@@ -1378,12 +1398,12 @@ function Ft(t) {
|
|
|
1378
1398
|
const e = T.app.appList.find((n) => n.id === t);
|
|
1379
1399
|
return e ? e.pages : [];
|
|
1380
1400
|
}
|
|
1381
|
-
function
|
|
1401
|
+
function vt(t, e) {
|
|
1382
1402
|
const n = T.app.appList.find((o) => o.id === t);
|
|
1383
1403
|
if (n)
|
|
1384
1404
|
return n.pages.find((o) => o.id === e);
|
|
1385
1405
|
}
|
|
1386
|
-
function
|
|
1406
|
+
function ii(t) {
|
|
1387
1407
|
const e = [];
|
|
1388
1408
|
return Ft(t).forEach(({ id: o, name: i }) => {
|
|
1389
1409
|
e.push([i, o]);
|
|
@@ -1399,17 +1419,17 @@ function Bn() {
|
|
|
1399
1419
|
const { comps: t } = T.app.activeApp;
|
|
1400
1420
|
return [bn, ...t];
|
|
1401
1421
|
}
|
|
1402
|
-
function
|
|
1422
|
+
function sn(t) {
|
|
1403
1423
|
return t === "" ? bn : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1404
1424
|
}
|
|
1405
|
-
function
|
|
1425
|
+
function si() {
|
|
1406
1426
|
const { i18n: t } = ie, e = [];
|
|
1407
1427
|
return Bn().forEach(({ id: o, name: i }) => {
|
|
1408
1428
|
let a = i;
|
|
1409
1429
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1410
1430
|
}), N(e);
|
|
1411
1431
|
}
|
|
1412
|
-
const
|
|
1432
|
+
const ai = {
|
|
1413
1433
|
init: function() {
|
|
1414
1434
|
this.app = {
|
|
1415
1435
|
id: "",
|
|
@@ -1447,10 +1467,10 @@ const ei = {
|
|
|
1447
1467
|
}, 0);
|
|
1448
1468
|
},
|
|
1449
1469
|
genAppOpts_: function() {
|
|
1450
|
-
return
|
|
1470
|
+
return oi();
|
|
1451
1471
|
},
|
|
1452
1472
|
genPageOpts_: function() {
|
|
1453
|
-
return
|
|
1473
|
+
return ii(this.app.id);
|
|
1454
1474
|
},
|
|
1455
1475
|
onchange: function(t) {
|
|
1456
1476
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1465,7 +1485,7 @@ const ei = {
|
|
|
1465
1485
|
}
|
|
1466
1486
|
},
|
|
1467
1487
|
onAppChange_: function(t) {
|
|
1468
|
-
const e =
|
|
1488
|
+
const e = on(t);
|
|
1469
1489
|
if (!e) {
|
|
1470
1490
|
console.assert(!1);
|
|
1471
1491
|
return;
|
|
@@ -1473,23 +1493,23 @@ const ei = {
|
|
|
1473
1493
|
const n = this.app.id !== e.id;
|
|
1474
1494
|
this.app.id = e.id, this.app.name = e.name;
|
|
1475
1495
|
const o = this.getField("PAGE");
|
|
1476
|
-
if (o.getOptions(!1), n || !
|
|
1496
|
+
if (o.getOptions(!1), n || !vt(this.app.id, this.page.id)) {
|
|
1477
1497
|
const a = Ft(this.app.id)?.[0]?.id ?? "";
|
|
1478
1498
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1479
1499
|
}
|
|
1480
1500
|
},
|
|
1481
1501
|
onPageChange_: function(t) {
|
|
1482
|
-
const e =
|
|
1502
|
+
const e = vt(this.app.id, t);
|
|
1483
1503
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1484
1504
|
},
|
|
1485
1505
|
checkWarning_: function() {
|
|
1486
|
-
const t =
|
|
1506
|
+
const t = on(this.app.id);
|
|
1487
1507
|
if (!t) {
|
|
1488
1508
|
this.setWarningText(_.WARN_APP_NOT_FOUND);
|
|
1489
1509
|
return;
|
|
1490
1510
|
}
|
|
1491
1511
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1492
|
-
const e =
|
|
1512
|
+
const e = vt(this.app.id, this.page.id);
|
|
1493
1513
|
if (!e) {
|
|
1494
1514
|
this.setWarningText(_.WARN_PAGE_NOT_FOUND);
|
|
1495
1515
|
return;
|
|
@@ -1497,13 +1517,13 @@ const ei = {
|
|
|
1497
1517
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1498
1518
|
}
|
|
1499
1519
|
};
|
|
1500
|
-
d.navigate_to_v1 =
|
|
1520
|
+
d.navigate_to_v1 = ai;
|
|
1501
1521
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1502
1522
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
1523
|
return `__navigateToV1__(${n}, ${o});
|
|
1504
1524
|
`;
|
|
1505
1525
|
};
|
|
1506
|
-
const
|
|
1526
|
+
const ci = {
|
|
1507
1527
|
init: function() {
|
|
1508
1528
|
this.node = {
|
|
1509
1529
|
id: "",
|
|
@@ -1518,7 +1538,7 @@ const ti = {
|
|
|
1518
1538
|
initData_: function() {
|
|
1519
1539
|
if (this.node.id)
|
|
1520
1540
|
return;
|
|
1521
|
-
const t =
|
|
1541
|
+
const t = Ce("event")?.[0];
|
|
1522
1542
|
if (!t)
|
|
1523
1543
|
return;
|
|
1524
1544
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1543,10 +1563,10 @@ const ti = {
|
|
|
1543
1563
|
}, 0);
|
|
1544
1564
|
},
|
|
1545
1565
|
genNodeOpts_: function() {
|
|
1546
|
-
return
|
|
1566
|
+
return Ke("event");
|
|
1547
1567
|
},
|
|
1548
1568
|
genEventOpts_: function() {
|
|
1549
|
-
return
|
|
1569
|
+
return wo(this.node.id);
|
|
1550
1570
|
},
|
|
1551
1571
|
onchange: function(t) {
|
|
1552
1572
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1561,7 +1581,7 @@ const ti = {
|
|
|
1561
1581
|
}
|
|
1562
1582
|
},
|
|
1563
1583
|
onNodeChange_: function(t) {
|
|
1564
|
-
const e =
|
|
1584
|
+
const e = Y(t);
|
|
1565
1585
|
if (!e) {
|
|
1566
1586
|
console.assert(!1);
|
|
1567
1587
|
return;
|
|
@@ -1569,13 +1589,13 @@ const ti = {
|
|
|
1569
1589
|
const n = this.node.key !== e.key;
|
|
1570
1590
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1571
1591
|
const o = this.getField("EVENT");
|
|
1572
|
-
if (o.getOptions(!1), n || !
|
|
1592
|
+
if (o.getOptions(!1), n || !Ot(this.node.id, this.event.key)) {
|
|
1573
1593
|
const a = Pt(this.node.id)?.[0]?.key ?? "";
|
|
1574
1594
|
o.setValue(a), this.event.key === a && this.onEventChange_(a);
|
|
1575
1595
|
}
|
|
1576
1596
|
},
|
|
1577
1597
|
onEventChange_: function(t) {
|
|
1578
|
-
const e =
|
|
1598
|
+
const e = Ot(this.node.id, t);
|
|
1579
1599
|
e ? (this.event.key = e.key, this.event.name = e.name, this.event.params = e.params) : (this.event.key = "", this.event.name = "", this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1580
1600
|
this.ensureBlocks_();
|
|
1581
1601
|
}, 0);
|
|
@@ -1597,7 +1617,7 @@ const ti = {
|
|
|
1597
1617
|
}), t.length > 0 && F(this, t);
|
|
1598
1618
|
},
|
|
1599
1619
|
checkWarning_: function() {
|
|
1600
|
-
const t =
|
|
1620
|
+
const t = Y(this.node.id);
|
|
1601
1621
|
if (!t) {
|
|
1602
1622
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1603
1623
|
return;
|
|
@@ -1607,7 +1627,7 @@ const ti = {
|
|
|
1607
1627
|
return;
|
|
1608
1628
|
}
|
|
1609
1629
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1610
|
-
const e =
|
|
1630
|
+
const e = Ot(this.node.id, this.event.key);
|
|
1611
1631
|
if (!e) {
|
|
1612
1632
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1613
1633
|
return;
|
|
@@ -1619,7 +1639,7 @@ const ti = {
|
|
|
1619
1639
|
this.setWarningText(null);
|
|
1620
1640
|
}
|
|
1621
1641
|
};
|
|
1622
|
-
d.on_node_event_v1 =
|
|
1642
|
+
d.on_node_event_v1 = ci;
|
|
1623
1643
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1624
1644
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1625
1645
|
let i = "";
|
|
@@ -1631,7 +1651,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1631
1651
|
${a}});
|
|
1632
1652
|
`;
|
|
1633
1653
|
};
|
|
1634
|
-
const
|
|
1654
|
+
const li = {
|
|
1635
1655
|
init: function() {
|
|
1636
1656
|
this.element = {
|
|
1637
1657
|
key: "",
|
|
@@ -1645,7 +1665,7 @@ const ni = {
|
|
|
1645
1665
|
initData_: function() {
|
|
1646
1666
|
if (this.element.key)
|
|
1647
1667
|
return;
|
|
1648
|
-
const t =
|
|
1668
|
+
const t = we("event")?.[0];
|
|
1649
1669
|
if (!t)
|
|
1650
1670
|
return;
|
|
1651
1671
|
this.element.key = t.key, this.element.name = t.name;
|
|
@@ -1670,10 +1690,10 @@ const ni = {
|
|
|
1670
1690
|
}, 0);
|
|
1671
1691
|
},
|
|
1672
1692
|
genElementOpts_: function() {
|
|
1673
|
-
return
|
|
1693
|
+
return Ae("event");
|
|
1674
1694
|
},
|
|
1675
1695
|
genEventOpts_: function() {
|
|
1676
|
-
return
|
|
1696
|
+
return Fo(this.element.key);
|
|
1677
1697
|
},
|
|
1678
1698
|
onchange: function(t) {
|
|
1679
1699
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1688,7 +1708,7 @@ const ni = {
|
|
|
1688
1708
|
}
|
|
1689
1709
|
},
|
|
1690
1710
|
onElementChange_: function(t) {
|
|
1691
|
-
const e =
|
|
1711
|
+
const e = re(t);
|
|
1692
1712
|
if (!e) {
|
|
1693
1713
|
console.assert(!1);
|
|
1694
1714
|
return;
|
|
@@ -1696,13 +1716,13 @@ const ni = {
|
|
|
1696
1716
|
const n = this.element.key !== e.key;
|
|
1697
1717
|
this.element.key = e.key, this.element.name = e.name;
|
|
1698
1718
|
const o = this.getField("EVENT");
|
|
1699
|
-
if (o.getOptions(!1), n || !
|
|
1719
|
+
if (o.getOptions(!1), n || !It(this.element.key, this.event.key)) {
|
|
1700
1720
|
const a = Ut(this.element.key)?.[0]?.key ?? "";
|
|
1701
1721
|
o.setValue(a, !1), this.event.key !== a && this.onEventChange_(a);
|
|
1702
1722
|
}
|
|
1703
1723
|
},
|
|
1704
1724
|
onEventChange_: function(t) {
|
|
1705
|
-
const e =
|
|
1725
|
+
const e = It(this.element.key, t);
|
|
1706
1726
|
e ? (this.event.key = e.key, this.event.name = e.name, this.event.params = e.params) : (this.event.key = "", this.event.name = "", this.event.params = []), this.updateShape_(), setTimeout(() => {
|
|
1707
1727
|
this.ensureBlocks_();
|
|
1708
1728
|
}, 0);
|
|
@@ -1724,13 +1744,13 @@ const ni = {
|
|
|
1724
1744
|
}), t.length > 0 && F(this, t);
|
|
1725
1745
|
},
|
|
1726
1746
|
checkWarning_: function() {
|
|
1727
|
-
const t =
|
|
1747
|
+
const t = re(this.element.key);
|
|
1728
1748
|
if (!t) {
|
|
1729
1749
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1730
1750
|
return;
|
|
1731
1751
|
}
|
|
1732
1752
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
1733
|
-
const e =
|
|
1753
|
+
const e = It(this.element.key, this.event.key);
|
|
1734
1754
|
if (!e) {
|
|
1735
1755
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1736
1756
|
return;
|
|
@@ -1742,7 +1762,7 @@ const ni = {
|
|
|
1742
1762
|
this.setWarningText(null);
|
|
1743
1763
|
}
|
|
1744
1764
|
};
|
|
1745
|
-
d.on_node_event_as_v1 =
|
|
1765
|
+
d.on_node_event_as_v1 = li;
|
|
1746
1766
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1747
1767
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1748
1768
|
let i = "";
|
|
@@ -1754,7 +1774,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1754
1774
|
${a}});
|
|
1755
1775
|
`;
|
|
1756
1776
|
};
|
|
1757
|
-
const
|
|
1777
|
+
const ui = {
|
|
1758
1778
|
init: function() {
|
|
1759
1779
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
1760
1780
|
},
|
|
@@ -1783,7 +1803,7 @@ const oi = {
|
|
|
1783
1803
|
]);
|
|
1784
1804
|
}
|
|
1785
1805
|
};
|
|
1786
|
-
d.open_confirm_dlg_v1 =
|
|
1806
|
+
d.open_confirm_dlg_v1 = ui;
|
|
1787
1807
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1788
1808
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1789
1809
|
return `{
|
|
@@ -1791,7 +1811,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1791
1811
|
${o}}
|
|
1792
1812
|
`;
|
|
1793
1813
|
};
|
|
1794
|
-
const
|
|
1814
|
+
const ri = {
|
|
1795
1815
|
init: function() {
|
|
1796
1816
|
this.appendDummyInput().appendField("%{BKY_UI_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
1797
1817
|
},
|
|
@@ -1822,7 +1842,7 @@ const ii = {
|
|
|
1822
1842
|
]);
|
|
1823
1843
|
}
|
|
1824
1844
|
};
|
|
1825
|
-
d.open_prompt_dlg_v1 =
|
|
1845
|
+
d.open_prompt_dlg_v1 = ri;
|
|
1826
1846
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1827
1847
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "LABEL", c.ATOMIC), o = s.valueToCode(t, "VALUE", c.ATOMIC), i = s.statementToCode(t, "HANDLE");
|
|
1828
1848
|
return `{
|
|
@@ -1862,7 +1882,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1862
1882
|
return `__messageV1__(${e}, ${n});
|
|
1863
1883
|
`;
|
|
1864
1884
|
};
|
|
1865
|
-
const
|
|
1885
|
+
const _i = {
|
|
1866
1886
|
init: function() {
|
|
1867
1887
|
this.comp = {
|
|
1868
1888
|
id: void 0,
|
|
@@ -1890,7 +1910,7 @@ const si = {
|
|
|
1890
1910
|
}, 0);
|
|
1891
1911
|
},
|
|
1892
1912
|
genCompOpts_: function() {
|
|
1893
|
-
return
|
|
1913
|
+
return si();
|
|
1894
1914
|
},
|
|
1895
1915
|
onchange: function(t) {
|
|
1896
1916
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1905,7 +1925,7 @@ const si = {
|
|
|
1905
1925
|
}
|
|
1906
1926
|
},
|
|
1907
1927
|
onCompChange_: function(t) {
|
|
1908
|
-
const e =
|
|
1928
|
+
const e = sn(t);
|
|
1909
1929
|
if (!e) {
|
|
1910
1930
|
console.assert(!1);
|
|
1911
1931
|
return;
|
|
@@ -1917,19 +1937,19 @@ const si = {
|
|
|
1917
1937
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1918
1938
|
return;
|
|
1919
1939
|
}
|
|
1920
|
-
if (!
|
|
1940
|
+
if (!sn(this.comp.id)) {
|
|
1921
1941
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1922
1942
|
return;
|
|
1923
1943
|
}
|
|
1924
1944
|
this.setWarningText(null);
|
|
1925
1945
|
}
|
|
1926
1946
|
};
|
|
1927
|
-
d.select_comp_v1 =
|
|
1947
|
+
d.select_comp_v1 = _i;
|
|
1928
1948
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1929
1949
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1930
1950
|
return [e(o), c.ATOMIC];
|
|
1931
1951
|
};
|
|
1932
|
-
const
|
|
1952
|
+
const pi = {
|
|
1933
1953
|
init: function() {
|
|
1934
1954
|
this.method = {
|
|
1935
1955
|
id: "",
|
|
@@ -1943,7 +1963,7 @@ const ai = {
|
|
|
1943
1963
|
initData_: function() {
|
|
1944
1964
|
if (this.method.id)
|
|
1945
1965
|
return;
|
|
1946
|
-
const t =
|
|
1966
|
+
const t = Me()?.[0];
|
|
1947
1967
|
if (!t)
|
|
1948
1968
|
return;
|
|
1949
1969
|
this.method.id = t.id, this.method.name = t.name;
|
|
@@ -1970,7 +1990,7 @@ const ai = {
|
|
|
1970
1990
|
return Nn();
|
|
1971
1991
|
},
|
|
1972
1992
|
genOutputOpts_: function() {
|
|
1973
|
-
return
|
|
1993
|
+
return Wo(this.method.id);
|
|
1974
1994
|
},
|
|
1975
1995
|
onchange: function(t) {
|
|
1976
1996
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1986,7 +2006,7 @@ const ai = {
|
|
|
1986
2006
|
}, 0);
|
|
1987
2007
|
},
|
|
1988
2008
|
onMethodChange_: function(t) {
|
|
1989
|
-
const e =
|
|
2009
|
+
const e = Qe(t);
|
|
1990
2010
|
if (!e) {
|
|
1991
2011
|
console.assert(!1);
|
|
1992
2012
|
return;
|
|
@@ -1994,13 +2014,13 @@ const ai = {
|
|
|
1994
2014
|
const n = this.method.id !== e.id;
|
|
1995
2015
|
this.method.id = e.id, this.method.name = e.name;
|
|
1996
2016
|
const o = this.getField("OUTPUT");
|
|
1997
|
-
if (o.getOptions(!1), n || !
|
|
2017
|
+
if (o.getOptions(!1), n || !kt(this.method.id, this.output.id)) {
|
|
1998
2018
|
const a = xt(this.method.id)?.[0]?.id ?? "";
|
|
1999
2019
|
o.setValue(a), this.output.id === a && this.onOutputChange_(a);
|
|
2000
2020
|
}
|
|
2001
2021
|
},
|
|
2002
2022
|
onOutputChange_: function(t) {
|
|
2003
|
-
const e =
|
|
2023
|
+
const e = kt(this.method.id, t);
|
|
2004
2024
|
e ? (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type) : (this.output.id = "", this.output.name = "", this.output.type = "");
|
|
2005
2025
|
},
|
|
2006
2026
|
updateShape_: function() {
|
|
@@ -2008,8 +2028,8 @@ const ai = {
|
|
|
2008
2028
|
t.connection.setShadowDom(null);
|
|
2009
2029
|
const e = t.connection.targetBlock();
|
|
2010
2030
|
e && !e.isShadow() && e.dispose();
|
|
2011
|
-
const n = this.output.type;
|
|
2012
|
-
|
|
2031
|
+
const n = Ye(this.output.type);
|
|
2032
|
+
t.setCheck(n);
|
|
2013
2033
|
},
|
|
2014
2034
|
updateShadows_: function() {
|
|
2015
2035
|
if (this.isInsertionMarker())
|
|
@@ -2019,13 +2039,13 @@ const ai = {
|
|
|
2019
2039
|
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
2020
2040
|
},
|
|
2021
2041
|
checkWarning_: function() {
|
|
2022
|
-
const t =
|
|
2042
|
+
const t = Qe(this.method.id);
|
|
2023
2043
|
if (!t) {
|
|
2024
2044
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
2025
2045
|
return;
|
|
2026
2046
|
}
|
|
2027
2047
|
t.name !== this.method.name && (this.method.name = t.name);
|
|
2028
|
-
const e =
|
|
2048
|
+
const e = kt(this.method.id, this.output.id);
|
|
2029
2049
|
if (!e) {
|
|
2030
2050
|
this.setWarningText(_.WARN_OUTPUT_NOT_FOUND);
|
|
2031
2051
|
return;
|
|
@@ -2037,7 +2057,7 @@ const ai = {
|
|
|
2037
2057
|
this.setWarningText(null);
|
|
2038
2058
|
}
|
|
2039
2059
|
};
|
|
2040
|
-
d.set_comp_method_output_v1 =
|
|
2060
|
+
d.set_comp_method_output_v1 = pi;
|
|
2041
2061
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2042
2062
|
const e = t;
|
|
2043
2063
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2064,7 +2084,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2064
2084
|
return `__setCompMethodOutputV1__(${n});
|
|
2065
2085
|
`;
|
|
2066
2086
|
};
|
|
2067
|
-
const
|
|
2087
|
+
const hi = {
|
|
2068
2088
|
init: function() {
|
|
2069
2089
|
this.node = {
|
|
2070
2090
|
id: "",
|
|
@@ -2078,13 +2098,13 @@ const ci = {
|
|
|
2078
2098
|
initData_: function() {
|
|
2079
2099
|
if (this.node.id)
|
|
2080
2100
|
return;
|
|
2081
|
-
const t =
|
|
2101
|
+
const t = Ce()?.[0];
|
|
2082
2102
|
if (!t)
|
|
2083
2103
|
return;
|
|
2084
2104
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2085
2105
|
const e = this.getField("NODE");
|
|
2086
2106
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2087
|
-
const n =
|
|
2107
|
+
const n = Ue(this.node.id, !0)?.[0];
|
|
2088
2108
|
if (!n)
|
|
2089
2109
|
return;
|
|
2090
2110
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2103,7 +2123,7 @@ const ci = {
|
|
|
2103
2123
|
}, 0);
|
|
2104
2124
|
},
|
|
2105
2125
|
genNodeOpts_: function() {
|
|
2106
|
-
return
|
|
2126
|
+
return Ke();
|
|
2107
2127
|
},
|
|
2108
2128
|
genPropOpts_: function() {
|
|
2109
2129
|
return yn(this.node.id);
|
|
@@ -2121,7 +2141,7 @@ const ci = {
|
|
|
2121
2141
|
}
|
|
2122
2142
|
},
|
|
2123
2143
|
onNodeChange_: function(t) {
|
|
2124
|
-
const e =
|
|
2144
|
+
const e = Y(t);
|
|
2125
2145
|
if (!e) {
|
|
2126
2146
|
console.assert(!1);
|
|
2127
2147
|
return;
|
|
@@ -2130,7 +2150,7 @@ const ci = {
|
|
|
2130
2150
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2131
2151
|
const o = this.getField("PROP");
|
|
2132
2152
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
2133
|
-
const a =
|
|
2153
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
2134
2154
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2135
2155
|
}
|
|
2136
2156
|
},
|
|
@@ -2145,20 +2165,19 @@ const ci = {
|
|
|
2145
2165
|
if (!t)
|
|
2146
2166
|
return;
|
|
2147
2167
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2148
|
-
n && n.dispose();
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2168
|
+
n && n.dispose(), e.setCheck(null);
|
|
2169
|
+
const o = On(this.workspace, t.raw);
|
|
2170
|
+
o && e.connection.connect(o.outputConnection);
|
|
2152
2171
|
},
|
|
2153
2172
|
updateCheck_: function() {
|
|
2154
2173
|
const t = ae(this.node.id, this.prop.keys);
|
|
2155
2174
|
if (!t)
|
|
2156
2175
|
return;
|
|
2157
|
-
const e =
|
|
2158
|
-
|
|
2176
|
+
const e = Cn(t.raw);
|
|
2177
|
+
this.getInput("VALUE").setCheck(e);
|
|
2159
2178
|
},
|
|
2160
2179
|
checkWarning_: function() {
|
|
2161
|
-
const t =
|
|
2180
|
+
const t = Y(this.node.id);
|
|
2162
2181
|
if (!t) {
|
|
2163
2182
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
2164
2183
|
return;
|
|
@@ -2176,13 +2195,13 @@ const ci = {
|
|
|
2176
2195
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2177
2196
|
}
|
|
2178
2197
|
};
|
|
2179
|
-
d.set_node_prop_v1 =
|
|
2198
|
+
d.set_node_prop_v1 = hi;
|
|
2180
2199
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2181
2200
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2182
2201
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2183
2202
|
`;
|
|
2184
2203
|
};
|
|
2185
|
-
const
|
|
2204
|
+
const di = {
|
|
2186
2205
|
init: function() {
|
|
2187
2206
|
this.element = {
|
|
2188
2207
|
key: "",
|
|
@@ -2195,13 +2214,13 @@ const li = {
|
|
|
2195
2214
|
initData_: function() {
|
|
2196
2215
|
if (this.element.key)
|
|
2197
2216
|
return;
|
|
2198
|
-
const t =
|
|
2217
|
+
const t = we()?.[0];
|
|
2199
2218
|
if (!t)
|
|
2200
2219
|
return;
|
|
2201
2220
|
this.element.key = t.key, this.element.name = t.name;
|
|
2202
2221
|
const e = this.getField("ELEMENT");
|
|
2203
2222
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
2204
|
-
const n =
|
|
2223
|
+
const n = De(this.element.key, !0)?.[0];
|
|
2205
2224
|
if (!n)
|
|
2206
2225
|
return;
|
|
2207
2226
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2220,7 +2239,7 @@ const li = {
|
|
|
2220
2239
|
}, 0);
|
|
2221
2240
|
},
|
|
2222
2241
|
genElementOpts_: function() {
|
|
2223
|
-
return
|
|
2242
|
+
return Ae();
|
|
2224
2243
|
},
|
|
2225
2244
|
genPropOpts_: function() {
|
|
2226
2245
|
return vn(this.element.key);
|
|
@@ -2238,7 +2257,7 @@ const li = {
|
|
|
2238
2257
|
}
|
|
2239
2258
|
},
|
|
2240
2259
|
onElementChange_: function(t) {
|
|
2241
|
-
const e =
|
|
2260
|
+
const e = re(t);
|
|
2242
2261
|
if (!e) {
|
|
2243
2262
|
console.assert(!1);
|
|
2244
2263
|
return;
|
|
@@ -2247,7 +2266,7 @@ const li = {
|
|
|
2247
2266
|
this.element.key = e.key, this.element.name = e.name;
|
|
2248
2267
|
const o = this.getField("PROP");
|
|
2249
2268
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
2250
|
-
const a =
|
|
2269
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
2251
2270
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2252
2271
|
}
|
|
2253
2272
|
},
|
|
@@ -2262,20 +2281,19 @@ const li = {
|
|
|
2262
2281
|
if (!t)
|
|
2263
2282
|
return;
|
|
2264
2283
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2265
|
-
n && n.dispose();
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
i.ui === "dummy" ? console.assert(!0) : i.ui === "strInput" ? o = ue(this.workspace, i.default) : i.ui === "numInput" ? o = ke(this.workspace, i.default) : i.ui === "switch" ? o = rt(this.workspace, i.default) : i.ui === "select" ? o = On(this.workspace, i.items) : i.ui === "multiTypes" ? o = Cn(this.workspace, i.types) : i.ui === "compSelect" ? o = kn(this.workspace) : i.ui === "colorPicker" && (o = $t(this.workspace, i.default ?? "#ff0000")), o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2284
|
+
n && n.dispose(), e.setCheck(null);
|
|
2285
|
+
const o = On(this.workspace, t.raw);
|
|
2286
|
+
o && e.connection.connect(o.outputConnection);
|
|
2269
2287
|
},
|
|
2270
2288
|
updateCheck_: function() {
|
|
2271
2289
|
const t = se(this.element.key, this.prop.keys);
|
|
2272
2290
|
if (!t)
|
|
2273
2291
|
return;
|
|
2274
|
-
const e =
|
|
2275
|
-
|
|
2292
|
+
const e = Cn(t.raw);
|
|
2293
|
+
this.getInput("VALUE").connection.setCheck(e);
|
|
2276
2294
|
},
|
|
2277
2295
|
checkWarning_: function() {
|
|
2278
|
-
const t =
|
|
2296
|
+
const t = re(this.element.key);
|
|
2279
2297
|
if (!t) {
|
|
2280
2298
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
2281
2299
|
return;
|
|
@@ -2293,13 +2311,13 @@ const li = {
|
|
|
2293
2311
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2294
2312
|
}
|
|
2295
2313
|
};
|
|
2296
|
-
d.set_node_prop_as_v1 =
|
|
2314
|
+
d.set_node_prop_as_v1 = di;
|
|
2297
2315
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2298
2316
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2299
2317
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2300
2318
|
`;
|
|
2301
2319
|
};
|
|
2302
|
-
const
|
|
2320
|
+
const fi = {
|
|
2303
2321
|
init: function() {
|
|
2304
2322
|
this.event = {
|
|
2305
2323
|
id: "",
|
|
@@ -2328,7 +2346,7 @@ const ui = {
|
|
|
2328
2346
|
}, 0);
|
|
2329
2347
|
},
|
|
2330
2348
|
genEventOpts_: function() {
|
|
2331
|
-
return
|
|
2349
|
+
return jo();
|
|
2332
2350
|
},
|
|
2333
2351
|
onchange: function(t) {
|
|
2334
2352
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2343,7 +2361,7 @@ const ui = {
|
|
|
2343
2361
|
}
|
|
2344
2362
|
},
|
|
2345
2363
|
onEventChange_: function(t) {
|
|
2346
|
-
const e =
|
|
2364
|
+
const e = tn(t);
|
|
2347
2365
|
e ? (this.event.id = e.id, this.event.name = e.name, this.event.params = e.params) : (this.event.id = "", this.event.name = "", this.event.params = []);
|
|
2348
2366
|
},
|
|
2349
2367
|
updateShape_: function() {
|
|
@@ -2358,8 +2376,8 @@ const ui = {
|
|
|
2358
2376
|
e.connection.setShadowDom(null);
|
|
2359
2377
|
const n = e.connection.targetBlock();
|
|
2360
2378
|
n && !n.isShadow() && n.dispose();
|
|
2361
|
-
const o = this.event.params[t]
|
|
2362
|
-
|
|
2379
|
+
const { type: o } = this.event.params[t], i = Ye(o);
|
|
2380
|
+
e.setCheck(i);
|
|
2363
2381
|
}
|
|
2364
2382
|
},
|
|
2365
2383
|
updateShadows_: function() {
|
|
@@ -2371,7 +2389,7 @@ const ui = {
|
|
|
2371
2389
|
}
|
|
2372
2390
|
},
|
|
2373
2391
|
checkWarning_: function() {
|
|
2374
|
-
const t =
|
|
2392
|
+
const t = tn(this.event.id);
|
|
2375
2393
|
if (!t) {
|
|
2376
2394
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
2377
2395
|
return;
|
|
@@ -2383,7 +2401,7 @@ const ui = {
|
|
|
2383
2401
|
this.setWarningText(null);
|
|
2384
2402
|
}
|
|
2385
2403
|
};
|
|
2386
|
-
d.trigger_comp_event_v1 =
|
|
2404
|
+
d.trigger_comp_event_v1 = fi;
|
|
2387
2405
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2388
2406
|
return "";
|
|
2389
2407
|
};
|
|
@@ -3090,7 +3108,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3090
3108
|
`
|
|
3091
3109
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3092
3110
|
};
|
|
3093
|
-
const
|
|
3111
|
+
const mi = v.xml, Ti = [
|
|
3094
3112
|
{
|
|
3095
3113
|
type: "add_data_v1",
|
|
3096
3114
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3152,16 +3170,16 @@ const ri = v.xml, _i = [
|
|
|
3152
3170
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3153
3171
|
}
|
|
3154
3172
|
];
|
|
3155
|
-
function
|
|
3156
|
-
const n =
|
|
3173
|
+
function Ei(t, e) {
|
|
3174
|
+
const n = Ti.find((o) => o.type === t);
|
|
3157
3175
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3158
3176
|
}
|
|
3159
|
-
const
|
|
3177
|
+
const gi = {
|
|
3160
3178
|
init: function() {
|
|
3161
3179
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3162
3180
|
},
|
|
3163
3181
|
mutationToDom: function() {
|
|
3164
|
-
const t =
|
|
3182
|
+
const t = mi.createElement("mutation");
|
|
3165
3183
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3166
3184
|
},
|
|
3167
3185
|
domToMutation: function(t) {
|
|
@@ -3190,7 +3208,7 @@ const hi = {
|
|
|
3190
3208
|
},
|
|
3191
3209
|
tryDuplicate_: function(t) {
|
|
3192
3210
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3193
|
-
if (e &&
|
|
3211
|
+
if (e && Ei(e.type, t.oldInputName))
|
|
3194
3212
|
try {
|
|
3195
3213
|
E.disable();
|
|
3196
3214
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -3211,54 +3229,54 @@ const hi = {
|
|
|
3211
3229
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3212
3230
|
}
|
|
3213
3231
|
};
|
|
3214
|
-
d.parameter_v1 =
|
|
3232
|
+
d.parameter_v1 = gi;
|
|
3215
3233
|
s.forBlock.parameter_v1 = function(t) {
|
|
3216
3234
|
return [t.key, c.ATOMIC];
|
|
3217
3235
|
};
|
|
3218
|
-
function
|
|
3236
|
+
function Oe(t) {
|
|
3219
3237
|
const e = [];
|
|
3220
3238
|
return T.compute.spaces.forEach((n) => {
|
|
3221
3239
|
n.funcs.length > 0 && e.push(n);
|
|
3222
3240
|
}), e;
|
|
3223
3241
|
}
|
|
3224
|
-
function
|
|
3242
|
+
function ze(t) {
|
|
3225
3243
|
return T.compute.spaces.find((e) => e.id === t);
|
|
3226
3244
|
}
|
|
3227
3245
|
function Rn(t) {
|
|
3228
3246
|
const e = [];
|
|
3229
|
-
return
|
|
3247
|
+
return Oe().forEach(({ id: o, name: i }) => {
|
|
3230
3248
|
e.push([i, o]);
|
|
3231
3249
|
}), N(e);
|
|
3232
3250
|
}
|
|
3233
|
-
function
|
|
3251
|
+
function Pe(t) {
|
|
3234
3252
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3235
3253
|
return e ? e.funcs : [];
|
|
3236
3254
|
}
|
|
3237
|
-
function
|
|
3255
|
+
function Ie(t, e) {
|
|
3238
3256
|
const n = T.compute.spaces.find((o) => o.id === t);
|
|
3239
3257
|
if (n)
|
|
3240
3258
|
return n.funcs.find((o) => o.id === e);
|
|
3241
3259
|
}
|
|
3242
3260
|
function Dn(t) {
|
|
3243
3261
|
const e = [];
|
|
3244
|
-
return
|
|
3262
|
+
return Pe(t).forEach(({ id: o, name: i }) => {
|
|
3245
3263
|
e.push([i, o]);
|
|
3246
3264
|
}), N(e);
|
|
3247
3265
|
}
|
|
3248
|
-
function
|
|
3266
|
+
function Yt() {
|
|
3249
3267
|
return T.compute.activeFunc;
|
|
3250
3268
|
}
|
|
3251
|
-
function
|
|
3269
|
+
function an(t) {
|
|
3252
3270
|
const { outputs: e } = T.compute.activeFunc;
|
|
3253
3271
|
return e.find((n) => n.id === t);
|
|
3254
3272
|
}
|
|
3255
|
-
function
|
|
3273
|
+
function Ii() {
|
|
3256
3274
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3257
3275
|
return e.forEach(({ id: n, name: o }) => {
|
|
3258
3276
|
t.push([o, n]);
|
|
3259
3277
|
}), N(t);
|
|
3260
3278
|
}
|
|
3261
|
-
const
|
|
3279
|
+
const Ai = {
|
|
3262
3280
|
init: function() {
|
|
3263
3281
|
this.space = {
|
|
3264
3282
|
id: "",
|
|
@@ -3273,13 +3291,13 @@ const fi = {
|
|
|
3273
3291
|
initData_: function() {
|
|
3274
3292
|
if (this.space.id)
|
|
3275
3293
|
return;
|
|
3276
|
-
const t =
|
|
3294
|
+
const t = Oe()?.[0];
|
|
3277
3295
|
if (!t)
|
|
3278
3296
|
return;
|
|
3279
3297
|
this.space.id = t.id, this.space.name = t.name;
|
|
3280
3298
|
const e = this.getField("SPACE");
|
|
3281
3299
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3282
|
-
const n =
|
|
3300
|
+
const n = Pe(this.space.id)?.[0];
|
|
3283
3301
|
if (!n)
|
|
3284
3302
|
return;
|
|
3285
3303
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3316,19 +3334,19 @@ const fi = {
|
|
|
3316
3334
|
}
|
|
3317
3335
|
},
|
|
3318
3336
|
onSpaceChange_: function(t) {
|
|
3319
|
-
const e =
|
|
3337
|
+
const e = ze(t);
|
|
3320
3338
|
if (!e) {
|
|
3321
3339
|
console.assert(!1);
|
|
3322
3340
|
return;
|
|
3323
3341
|
}
|
|
3324
3342
|
let n = !1;
|
|
3325
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3326
|
-
const i =
|
|
3343
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ie(this.space.id, this.func.id)) {
|
|
3344
|
+
const i = Pe(this.space.id)?.[0];
|
|
3327
3345
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3328
3346
|
}
|
|
3329
3347
|
},
|
|
3330
3348
|
onFuncChange_: function(t) {
|
|
3331
|
-
const e =
|
|
3349
|
+
const e = Ie(this.space.id, t);
|
|
3332
3350
|
if (!e) {
|
|
3333
3351
|
console.assert(!1);
|
|
3334
3352
|
return;
|
|
@@ -3360,8 +3378,8 @@ const fi = {
|
|
|
3360
3378
|
},
|
|
3361
3379
|
updateCheck_: function() {
|
|
3362
3380
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3363
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3364
|
-
|
|
3381
|
+
const { type: e } = this.func.inputs[t], n = Ye(e);
|
|
3382
|
+
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3365
3383
|
}
|
|
3366
3384
|
},
|
|
3367
3385
|
updateShadow_: function() {
|
|
@@ -3391,13 +3409,13 @@ const fi = {
|
|
|
3391
3409
|
F(this, t);
|
|
3392
3410
|
},
|
|
3393
3411
|
checkWarning_: function() {
|
|
3394
|
-
const t =
|
|
3412
|
+
const t = ze(this.space.id);
|
|
3395
3413
|
if (!t) {
|
|
3396
3414
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3397
3415
|
return;
|
|
3398
3416
|
}
|
|
3399
3417
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3400
|
-
const e =
|
|
3418
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3401
3419
|
if (!e) {
|
|
3402
3420
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3403
3421
|
return;
|
|
@@ -3413,7 +3431,7 @@ const fi = {
|
|
|
3413
3431
|
this.setWarningText(null);
|
|
3414
3432
|
}
|
|
3415
3433
|
};
|
|
3416
|
-
d.call_func_v1 =
|
|
3434
|
+
d.call_func_v1 = Ai;
|
|
3417
3435
|
s.forBlock.call_func_v1 = function(t) {
|
|
3418
3436
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3419
3437
|
let l = "";
|
|
@@ -3440,7 +3458,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3440
3458
|
${r}${p}}
|
|
3441
3459
|
`;
|
|
3442
3460
|
};
|
|
3443
|
-
const
|
|
3461
|
+
const Oi = {
|
|
3444
3462
|
init: function() {
|
|
3445
3463
|
this.space = {
|
|
3446
3464
|
id: "",
|
|
@@ -3455,13 +3473,13 @@ const mi = {
|
|
|
3455
3473
|
initData_: function() {
|
|
3456
3474
|
if (this.space.id)
|
|
3457
3475
|
return;
|
|
3458
|
-
const t =
|
|
3476
|
+
const t = Oe()?.[0];
|
|
3459
3477
|
if (!t)
|
|
3460
3478
|
return;
|
|
3461
3479
|
this.space.id = t.id, this.space.name = t.name;
|
|
3462
3480
|
const e = this.getField("SPACE");
|
|
3463
3481
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3464
|
-
const n =
|
|
3482
|
+
const n = Pe(this.space.id)?.[0];
|
|
3465
3483
|
if (!n)
|
|
3466
3484
|
return;
|
|
3467
3485
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3498,19 +3516,19 @@ const mi = {
|
|
|
3498
3516
|
}
|
|
3499
3517
|
},
|
|
3500
3518
|
onSpaceChange_: function(t) {
|
|
3501
|
-
const e =
|
|
3519
|
+
const e = ze(t);
|
|
3502
3520
|
if (!e) {
|
|
3503
3521
|
console.assert(!1);
|
|
3504
3522
|
return;
|
|
3505
3523
|
}
|
|
3506
3524
|
let n = !1;
|
|
3507
|
-
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !
|
|
3508
|
-
const i =
|
|
3525
|
+
if (e.id !== this.space.id && (n = !0), this.space.id = e.id, this.space.name = e.name, this.getField("FUNC").getOptions(!1), n || !Ie(this.space.id, this.func.id)) {
|
|
3526
|
+
const i = Pe(this.space.id)?.[0];
|
|
3509
3527
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3510
3528
|
}
|
|
3511
3529
|
},
|
|
3512
3530
|
onFuncChange_: function(t) {
|
|
3513
|
-
const e =
|
|
3531
|
+
const e = Ie(this.space.id, t);
|
|
3514
3532
|
if (!e) {
|
|
3515
3533
|
console.assert(!1);
|
|
3516
3534
|
return;
|
|
@@ -3542,8 +3560,8 @@ const mi = {
|
|
|
3542
3560
|
},
|
|
3543
3561
|
updateCheck_: function() {
|
|
3544
3562
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3545
|
-
const { type: e } = this.func.inputs[t], n =
|
|
3546
|
-
|
|
3563
|
+
const { type: e } = this.func.inputs[t], n = Ye(e);
|
|
3564
|
+
this.getInput("INPUT" + t).connection.setCheck(n);
|
|
3547
3565
|
}
|
|
3548
3566
|
},
|
|
3549
3567
|
updateShadow_: function() {
|
|
@@ -3573,13 +3591,13 @@ const mi = {
|
|
|
3573
3591
|
F(this, t);
|
|
3574
3592
|
},
|
|
3575
3593
|
checkWarning_: function() {
|
|
3576
|
-
const t =
|
|
3594
|
+
const t = ze(this.space.id);
|
|
3577
3595
|
if (!t) {
|
|
3578
3596
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3579
3597
|
return;
|
|
3580
3598
|
}
|
|
3581
3599
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3582
|
-
const e =
|
|
3600
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3583
3601
|
if (!e) {
|
|
3584
3602
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3585
3603
|
return;
|
|
@@ -3595,7 +3613,7 @@ const mi = {
|
|
|
3595
3613
|
this.setWarningText(null);
|
|
3596
3614
|
}
|
|
3597
3615
|
};
|
|
3598
|
-
d.call_func_internal_v1 =
|
|
3616
|
+
d.call_func_internal_v1 = Oi;
|
|
3599
3617
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3600
3618
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3601
3619
|
let l = `${e}var __inputs__ = {
|
|
@@ -3647,7 +3665,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3647
3665
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3648
3666
|
`;
|
|
3649
3667
|
};
|
|
3650
|
-
const
|
|
3668
|
+
const Ci = {
|
|
3651
3669
|
init: function() {
|
|
3652
3670
|
this.func = {
|
|
3653
3671
|
id: "",
|
|
@@ -3657,7 +3675,7 @@ const Ti = {
|
|
|
3657
3675
|
initData_: function() {
|
|
3658
3676
|
if (this.func.id)
|
|
3659
3677
|
return;
|
|
3660
|
-
const { id: t, inputs: e } =
|
|
3678
|
+
const { id: t, inputs: e } = Yt();
|
|
3661
3679
|
this.func.id = t, this.func.inputs = e;
|
|
3662
3680
|
},
|
|
3663
3681
|
saveExtraState: function() {
|
|
@@ -3694,7 +3712,7 @@ const Ti = {
|
|
|
3694
3712
|
F(this, t);
|
|
3695
3713
|
},
|
|
3696
3714
|
checkWarning_: function() {
|
|
3697
|
-
const { id: t, inputs: e } =
|
|
3715
|
+
const { id: t, inputs: e } = Yt();
|
|
3698
3716
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3699
3717
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3700
3718
|
return;
|
|
@@ -3702,7 +3720,7 @@ const Ti = {
|
|
|
3702
3720
|
this.setWarningText(null);
|
|
3703
3721
|
}
|
|
3704
3722
|
};
|
|
3705
|
-
d.func_entry_v1 =
|
|
3723
|
+
d.func_entry_v1 = Ci;
|
|
3706
3724
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3707
3725
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3708
3726
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3712,16 +3730,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3712
3730
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3713
3731
|
${n}}`;
|
|
3714
3732
|
};
|
|
3715
|
-
const
|
|
3733
|
+
const ki = {
|
|
3716
3734
|
init: function() {
|
|
3717
3735
|
}
|
|
3718
3736
|
};
|
|
3719
|
-
d.on_flow_state_event_v1 =
|
|
3737
|
+
d.on_flow_state_event_v1 = ki;
|
|
3720
3738
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3721
3739
|
return `__onFlowStateEventV1__();
|
|
3722
3740
|
`;
|
|
3723
3741
|
};
|
|
3724
|
-
const
|
|
3742
|
+
const vi = {
|
|
3725
3743
|
init: function() {
|
|
3726
3744
|
this.output = {
|
|
3727
3745
|
id: "",
|
|
@@ -3732,7 +3750,7 @@ const gi = {
|
|
|
3732
3750
|
initData_: function() {
|
|
3733
3751
|
if (this.output.id)
|
|
3734
3752
|
return;
|
|
3735
|
-
const t =
|
|
3753
|
+
const t = Yt().outputs?.[0];
|
|
3736
3754
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3737
3755
|
},
|
|
3738
3756
|
saveExtraState: function() {
|
|
@@ -3746,7 +3764,7 @@ const gi = {
|
|
|
3746
3764
|
}, 0);
|
|
3747
3765
|
},
|
|
3748
3766
|
genOutputOpts_: function() {
|
|
3749
|
-
return
|
|
3767
|
+
return Ii();
|
|
3750
3768
|
},
|
|
3751
3769
|
onchange: function(t) {
|
|
3752
3770
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3761,7 +3779,7 @@ const gi = {
|
|
|
3761
3779
|
}
|
|
3762
3780
|
},
|
|
3763
3781
|
onOutputChange_: function(t) {
|
|
3764
|
-
const e =
|
|
3782
|
+
const e = an(t);
|
|
3765
3783
|
if (!e) {
|
|
3766
3784
|
console.assert(!1);
|
|
3767
3785
|
return;
|
|
@@ -3773,8 +3791,8 @@ const gi = {
|
|
|
3773
3791
|
t.connection.setShadowDom(null);
|
|
3774
3792
|
const e = t.connection.targetBlock();
|
|
3775
3793
|
e && !e.isShadow() && e.dispose();
|
|
3776
|
-
const n = this.output.type;
|
|
3777
|
-
|
|
3794
|
+
const n = Ye(this.output.type);
|
|
3795
|
+
t.setCheck(n);
|
|
3778
3796
|
},
|
|
3779
3797
|
updateShadows_: function() {
|
|
3780
3798
|
if (this.isInsertionMarker())
|
|
@@ -3784,7 +3802,7 @@ const gi = {
|
|
|
3784
3802
|
e === "string" ? t = S({ type: "string", default: "" }) : e === "number" ? t = S({ type: "number", default: 0 }) : e === "boolean" && (t = S({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(t);
|
|
3785
3803
|
},
|
|
3786
3804
|
checkWarning_: function() {
|
|
3787
|
-
const t =
|
|
3805
|
+
const t = an(this.output.id);
|
|
3788
3806
|
if (!t) {
|
|
3789
3807
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3790
3808
|
return;
|
|
@@ -3796,7 +3814,7 @@ const gi = {
|
|
|
3796
3814
|
this.setWarningText(null);
|
|
3797
3815
|
}
|
|
3798
3816
|
};
|
|
3799
|
-
d.set_func_output_v1 =
|
|
3817
|
+
d.set_func_output_v1 = vi;
|
|
3800
3818
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3801
3819
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3802
3820
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3829,11 +3847,11 @@ function J() {
|
|
|
3829
3847
|
e.tables.length > 0 && t.push(e);
|
|
3830
3848
|
}), t;
|
|
3831
3849
|
}
|
|
3832
|
-
function
|
|
3850
|
+
function _e(t) {
|
|
3833
3851
|
const { spaces: e } = T.data;
|
|
3834
3852
|
return e.find((n) => n.id === t);
|
|
3835
3853
|
}
|
|
3836
|
-
function
|
|
3854
|
+
function ut() {
|
|
3837
3855
|
const t = [];
|
|
3838
3856
|
return J().forEach(({ id: n, name: o }) => {
|
|
3839
3857
|
t.push([o, n]);
|
|
@@ -3848,20 +3866,20 @@ function X(t, e) {
|
|
|
3848
3866
|
if (o)
|
|
3849
3867
|
return o.tables.find((i) => i.id === e);
|
|
3850
3868
|
}
|
|
3851
|
-
function
|
|
3869
|
+
function rt(t) {
|
|
3852
3870
|
const e = [];
|
|
3853
3871
|
return H(t).forEach(({ id: o, name: i }) => {
|
|
3854
3872
|
e.push([i, o]);
|
|
3855
3873
|
}), N(e);
|
|
3856
3874
|
}
|
|
3857
|
-
function
|
|
3875
|
+
function Ze(t, e) {
|
|
3858
3876
|
const { spaces: n } = T.data, o = n.find((a) => a.id === t);
|
|
3859
3877
|
if (!o)
|
|
3860
3878
|
return [];
|
|
3861
3879
|
const i = o.tables.find((a) => a.id === e);
|
|
3862
3880
|
return i ? i.columns : [];
|
|
3863
3881
|
}
|
|
3864
|
-
function
|
|
3882
|
+
function yt(t, e, n) {
|
|
3865
3883
|
const { spaces: o } = T.data, i = o.find((l) => l.id === t);
|
|
3866
3884
|
if (!i)
|
|
3867
3885
|
return;
|
|
@@ -3869,13 +3887,13 @@ function Lt(t, e, n) {
|
|
|
3869
3887
|
if (a)
|
|
3870
3888
|
return a.columns.find((l) => l.id === n);
|
|
3871
3889
|
}
|
|
3872
|
-
function
|
|
3890
|
+
function yi(t, e) {
|
|
3873
3891
|
const n = [];
|
|
3874
|
-
return
|
|
3892
|
+
return Ze(t, e).forEach(({ id: i, name: a }) => {
|
|
3875
3893
|
n.push([a, i]);
|
|
3876
3894
|
}), N(n);
|
|
3877
3895
|
}
|
|
3878
|
-
function
|
|
3896
|
+
function Ni(t) {
|
|
3879
3897
|
const e = t.getInput("TABLE").connection;
|
|
3880
3898
|
if (e.targetBlock())
|
|
3881
3899
|
return;
|
|
@@ -3909,7 +3927,7 @@ function Ai(t) {
|
|
|
3909
3927
|
}, l = $.blocks.append(a, t.workspace);
|
|
3910
3928
|
e.connect(l.outputConnection);
|
|
3911
3929
|
}
|
|
3912
|
-
function
|
|
3930
|
+
function Li(t) {
|
|
3913
3931
|
const e = t.getInput("HANDLE").connection;
|
|
3914
3932
|
if (e.targetBlock())
|
|
3915
3933
|
return;
|
|
@@ -3933,7 +3951,7 @@ function Oi(t) {
|
|
|
3933
3951
|
}, o = $.blocks.append(n, t.workspace);
|
|
3934
3952
|
e.connect(o.previousConnection);
|
|
3935
3953
|
}
|
|
3936
|
-
const
|
|
3954
|
+
const Si = {
|
|
3937
3955
|
init: function() {
|
|
3938
3956
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
3939
3957
|
},
|
|
@@ -3949,14 +3967,14 @@ const Ci = {
|
|
|
3949
3967
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3950
3968
|
},
|
|
3951
3969
|
ensureBlocks_: function() {
|
|
3952
|
-
this.isInsertionMarker() || (
|
|
3970
|
+
this.isInsertionMarker() || (Ni(this), F(this, [
|
|
3953
3971
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3954
3972
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3955
3973
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3956
|
-
]),
|
|
3974
|
+
]), Li(this));
|
|
3957
3975
|
}
|
|
3958
3976
|
};
|
|
3959
|
-
d.add_data_v1 =
|
|
3977
|
+
d.add_data_v1 = Si;
|
|
3960
3978
|
s.forBlock.add_data_v1 = function(t) {
|
|
3961
3979
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3962
3980
|
return `{
|
|
@@ -3972,7 +3990,7 @@ ${e}}
|
|
|
3972
3990
|
${o}}
|
|
3973
3991
|
`;
|
|
3974
3992
|
};
|
|
3975
|
-
const
|
|
3993
|
+
const bi = {
|
|
3976
3994
|
init: function() {
|
|
3977
3995
|
this.space = {
|
|
3978
3996
|
id: "",
|
|
@@ -4010,7 +4028,7 @@ const ki = {
|
|
|
4010
4028
|
if (!e)
|
|
4011
4029
|
return;
|
|
4012
4030
|
this.table.id = e.id, this.table.name = e.name;
|
|
4013
|
-
const n =
|
|
4031
|
+
const n = Ze(this.space.id, this.table.id)?.[0];
|
|
4014
4032
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4015
4033
|
},
|
|
4016
4034
|
saveExtraState: function() {
|
|
@@ -4026,13 +4044,13 @@ const ki = {
|
|
|
4026
4044
|
}, 0);
|
|
4027
4045
|
},
|
|
4028
4046
|
genSpaceOpts_: function() {
|
|
4029
|
-
return
|
|
4047
|
+
return ut();
|
|
4030
4048
|
},
|
|
4031
4049
|
genTableOpts_: function() {
|
|
4032
|
-
return
|
|
4050
|
+
return rt(this.space.id);
|
|
4033
4051
|
},
|
|
4034
4052
|
genColumnOpts_: function() {
|
|
4035
|
-
return
|
|
4053
|
+
return yi(this.space.id, this.table.id);
|
|
4036
4054
|
},
|
|
4037
4055
|
onchange: function(t) {
|
|
4038
4056
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4045,7 +4063,7 @@ const ki = {
|
|
|
4045
4063
|
}
|
|
4046
4064
|
},
|
|
4047
4065
|
onSpaceChange_: function(t) {
|
|
4048
|
-
const e =
|
|
4066
|
+
const e = _e(t);
|
|
4049
4067
|
if (!e) {
|
|
4050
4068
|
console.assert(!1);
|
|
4051
4069
|
return;
|
|
@@ -4063,13 +4081,13 @@ const ki = {
|
|
|
4063
4081
|
return;
|
|
4064
4082
|
}
|
|
4065
4083
|
const n = e.id !== this.table.id;
|
|
4066
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4067
|
-
const o =
|
|
4084
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !yt(this.space.id, this.table.id, this.column.id)) {
|
|
4085
|
+
const o = Ze(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4068
4086
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4069
4087
|
}
|
|
4070
4088
|
},
|
|
4071
4089
|
onColumnChange_: function(t) {
|
|
4072
|
-
const e =
|
|
4090
|
+
const e = yt(this.space.id, this.table.id, t);
|
|
4073
4091
|
e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
|
|
4074
4092
|
},
|
|
4075
4093
|
updateShape_: function() {
|
|
@@ -4088,16 +4106,15 @@ const ki = {
|
|
|
4088
4106
|
n && n.dispose();
|
|
4089
4107
|
else if (n)
|
|
4090
4108
|
return;
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
i === "string" ? o = ue(this.workspace, "") : i === "integer" ? o = ke(this.workspace, 0) : i === "float" ? o = ke(this.workspace, 0) : i === "boolean" ? o = rt(this.workspace, !1) : i === "enum" ? o = ue(this.workspace, "") : i === "dateTime" && (o = ue(this.workspace, "")), o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4109
|
+
const o = Dt(this.workspace, this.column.type);
|
|
4110
|
+
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4094
4111
|
},
|
|
4095
4112
|
updateCheck_: function() {
|
|
4096
|
-
const
|
|
4097
|
-
|
|
4113
|
+
const t = kn(this.column.type);
|
|
4114
|
+
this.getInput("VALUE").connection.setCheck(t);
|
|
4098
4115
|
},
|
|
4099
4116
|
checkWarning_: function() {
|
|
4100
|
-
const t =
|
|
4117
|
+
const t = _e(this.space.id);
|
|
4101
4118
|
if (!t) {
|
|
4102
4119
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4103
4120
|
return;
|
|
@@ -4109,7 +4126,7 @@ const ki = {
|
|
|
4109
4126
|
return;
|
|
4110
4127
|
}
|
|
4111
4128
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4112
|
-
const n =
|
|
4129
|
+
const n = yt(
|
|
4113
4130
|
this.space.id,
|
|
4114
4131
|
this.table.id,
|
|
4115
4132
|
this.column.id
|
|
@@ -4125,7 +4142,7 @@ const ki = {
|
|
|
4125
4142
|
this.setWarningText(null);
|
|
4126
4143
|
}
|
|
4127
4144
|
};
|
|
4128
|
-
d.cond_atomic_v1 =
|
|
4145
|
+
d.cond_atomic_v1 = bi;
|
|
4129
4146
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4130
4147
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4131
4148
|
EQ: "=",
|
|
@@ -4137,19 +4154,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4137
4154
|
}[n.getFieldValue("OP")];
|
|
4138
4155
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4139
4156
|
};
|
|
4140
|
-
const
|
|
4157
|
+
const Bi = {
|
|
4141
4158
|
init: function() {
|
|
4142
4159
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4143
4160
|
}
|
|
4144
4161
|
};
|
|
4145
|
-
d.cond_logic_container_v1 =
|
|
4146
|
-
const
|
|
4162
|
+
d.cond_logic_container_v1 = Bi;
|
|
4163
|
+
const Ri = {
|
|
4147
4164
|
init: function() {
|
|
4148
4165
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4166
|
}
|
|
4150
4167
|
};
|
|
4151
|
-
d.cond_logic_item_v1 =
|
|
4152
|
-
const
|
|
4168
|
+
d.cond_logic_item_v1 = Ri;
|
|
4169
|
+
const Di = {
|
|
4153
4170
|
init: function() {
|
|
4154
4171
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4155
4172
|
new m([
|
|
@@ -4158,7 +4175,7 @@ const Ni = {
|
|
|
4158
4175
|
]),
|
|
4159
4176
|
"TYPE"
|
|
4160
4177
|
), this.setMutator(
|
|
4161
|
-
new
|
|
4178
|
+
new fe.MutatorIcon(
|
|
4162
4179
|
["cond_logic_item_v1"],
|
|
4163
4180
|
this
|
|
4164
4181
|
)
|
|
@@ -4223,7 +4240,7 @@ const Ni = {
|
|
|
4223
4240
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4224
4241
|
}
|
|
4225
4242
|
};
|
|
4226
|
-
d.cond_logic_v1 =
|
|
4243
|
+
d.cond_logic_v1 = Di;
|
|
4227
4244
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4228
4245
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4229
4246
|
i.push(a);
|
|
@@ -4233,7 +4250,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4233
4250
|
}
|
|
4234
4251
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4235
4252
|
};
|
|
4236
|
-
function
|
|
4253
|
+
function Ui(t) {
|
|
4237
4254
|
const e = t.getInput("TABLE").connection;
|
|
4238
4255
|
if (e.targetBlock())
|
|
4239
4256
|
return;
|
|
@@ -4252,11 +4269,11 @@ function Li(t) {
|
|
|
4252
4269
|
}, a = $.blocks.append(i, t.workspace);
|
|
4253
4270
|
e.connect(a.outputConnection);
|
|
4254
4271
|
}
|
|
4255
|
-
function
|
|
4272
|
+
function Mi(t) {
|
|
4256
4273
|
const e = t.getInput("CONDITION").connection;
|
|
4257
4274
|
if (e.targetBlock())
|
|
4258
4275
|
return;
|
|
4259
|
-
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i =
|
|
4276
|
+
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i = Ze(n?.id, o?.id)?.[0], a = {
|
|
4260
4277
|
type: "cond_atomic_v1",
|
|
4261
4278
|
extraState: {
|
|
4262
4279
|
space: {
|
|
@@ -4277,7 +4294,7 @@ function Si(t) {
|
|
|
4277
4294
|
}, l = $.blocks.append(a, t.workspace);
|
|
4278
4295
|
e.connect(l.outputConnection);
|
|
4279
4296
|
}
|
|
4280
|
-
function
|
|
4297
|
+
function Pi(t) {
|
|
4281
4298
|
const e = t.getInput("HANDLE").connection;
|
|
4282
4299
|
if (e.targetBlock())
|
|
4283
4300
|
return;
|
|
@@ -4301,7 +4318,7 @@ function bi(t) {
|
|
|
4301
4318
|
}, o = $.blocks.append(n, t.workspace);
|
|
4302
4319
|
e.connect(o.previousConnection);
|
|
4303
4320
|
}
|
|
4304
|
-
const
|
|
4321
|
+
const Vi = {
|
|
4305
4322
|
init: function() {
|
|
4306
4323
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
4307
4324
|
},
|
|
@@ -4317,13 +4334,13 @@ const Bi = {
|
|
|
4317
4334
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4318
4335
|
},
|
|
4319
4336
|
ensureBlocks_: function() {
|
|
4320
|
-
this.isInsertionMarker() || (
|
|
4337
|
+
this.isInsertionMarker() || (Ui(this), Mi(this), F(this, [
|
|
4321
4338
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4322
4339
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4323
|
-
]),
|
|
4340
|
+
]), Pi(this));
|
|
4324
4341
|
}
|
|
4325
4342
|
};
|
|
4326
|
-
d.delete_data_v1 =
|
|
4343
|
+
d.delete_data_v1 = Vi;
|
|
4327
4344
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4328
4345
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
4329
4346
|
return `{
|
|
@@ -4361,7 +4378,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4361
4378
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4362
4379
|
`;
|
|
4363
4380
|
};
|
|
4364
|
-
function
|
|
4381
|
+
function xi(t) {
|
|
4365
4382
|
const e = t.getInput("TABLE").connection;
|
|
4366
4383
|
if (e.targetBlock())
|
|
4367
4384
|
return;
|
|
@@ -4395,7 +4412,7 @@ function Ri(t) {
|
|
|
4395
4412
|
}, l = $.blocks.append(a, t.workspace);
|
|
4396
4413
|
e.connect(l.outputConnection);
|
|
4397
4414
|
}
|
|
4398
|
-
function
|
|
4415
|
+
function Fi(t) {
|
|
4399
4416
|
const e = t.getInput("CONDITION").connection;
|
|
4400
4417
|
if (e.targetBlock())
|
|
4401
4418
|
return;
|
|
@@ -4404,7 +4421,7 @@ function Di(t) {
|
|
|
4404
4421
|
}, o = $.blocks.append(n, t.workspace);
|
|
4405
4422
|
e.connect(o.outputConnection);
|
|
4406
4423
|
}
|
|
4407
|
-
function
|
|
4424
|
+
function Yi(t) {
|
|
4408
4425
|
const e = t.getInput("EXTRA").connection;
|
|
4409
4426
|
if (e.targetBlock())
|
|
4410
4427
|
return;
|
|
@@ -4441,7 +4458,7 @@ function Ui(t) {
|
|
|
4441
4458
|
}, o = $.blocks.append(n, t.workspace);
|
|
4442
4459
|
e.connect(o.outputConnection);
|
|
4443
4460
|
}
|
|
4444
|
-
function
|
|
4461
|
+
function wi(t) {
|
|
4445
4462
|
const e = t.getInput("HANDLE").connection;
|
|
4446
4463
|
if (e.targetBlock())
|
|
4447
4464
|
return;
|
|
@@ -4479,7 +4496,7 @@ h([
|
|
|
4479
4496
|
style: "procedure_blocks"
|
|
4480
4497
|
}
|
|
4481
4498
|
]);
|
|
4482
|
-
const
|
|
4499
|
+
const Ki = {
|
|
4483
4500
|
init: function() {
|
|
4484
4501
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
4485
4502
|
},
|
|
@@ -4495,15 +4512,15 @@ const Pi = {
|
|
|
4495
4512
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4496
4513
|
},
|
|
4497
4514
|
ensureBlocks_: function() {
|
|
4498
|
-
this.isInsertionMarker() || (
|
|
4515
|
+
this.isInsertionMarker() || (xi(this), Fi(this), Yi(this), F(this, [
|
|
4499
4516
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4500
4517
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4501
4518
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4502
4519
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4503
|
-
]),
|
|
4520
|
+
]), wi(this));
|
|
4504
4521
|
}
|
|
4505
4522
|
};
|
|
4506
|
-
d.query_data_v1 =
|
|
4523
|
+
d.query_data_v1 = Ki;
|
|
4507
4524
|
s.forBlock.query_data_v1 = function(t) {
|
|
4508
4525
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", c.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
|
|
4509
4526
|
return `{
|
|
@@ -4576,19 +4593,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4576
4593
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4577
4594
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4578
4595
|
};
|
|
4579
|
-
const
|
|
4596
|
+
const $i = {
|
|
4580
4597
|
init: function() {
|
|
4581
4598
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4582
4599
|
}
|
|
4583
4600
|
};
|
|
4584
|
-
d.select_column_container_v1 =
|
|
4585
|
-
const
|
|
4601
|
+
d.select_column_container_v1 = $i;
|
|
4602
|
+
const Hi = {
|
|
4586
4603
|
init: function() {
|
|
4587
4604
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4605
|
}
|
|
4589
4606
|
};
|
|
4590
|
-
d.select_column_item_v1 =
|
|
4591
|
-
const
|
|
4607
|
+
d.select_column_item_v1 = Hi;
|
|
4608
|
+
const Gi = {
|
|
4592
4609
|
init: function() {
|
|
4593
4610
|
this.space = {
|
|
4594
4611
|
id: "",
|
|
@@ -4598,7 +4615,7 @@ const Fi = {
|
|
|
4598
4615
|
name: "",
|
|
4599
4616
|
columns: []
|
|
4600
4617
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4601
|
-
new
|
|
4618
|
+
new fe.MutatorIcon(
|
|
4602
4619
|
["select_column_item_v1"],
|
|
4603
4620
|
this
|
|
4604
4621
|
)
|
|
@@ -4633,10 +4650,10 @@ const Fi = {
|
|
|
4633
4650
|
}, 0);
|
|
4634
4651
|
},
|
|
4635
4652
|
genSpaceOpts_: function() {
|
|
4636
|
-
return
|
|
4653
|
+
return ut();
|
|
4637
4654
|
},
|
|
4638
4655
|
genTableOpts_: function() {
|
|
4639
|
-
return
|
|
4656
|
+
return rt(this.space.id);
|
|
4640
4657
|
},
|
|
4641
4658
|
genColumnOpts_: function() {
|
|
4642
4659
|
const t = [];
|
|
@@ -4667,7 +4684,7 @@ const Fi = {
|
|
|
4667
4684
|
}
|
|
4668
4685
|
},
|
|
4669
4686
|
onSpaceChange_: function(t) {
|
|
4670
|
-
const e =
|
|
4687
|
+
const e = _e(t);
|
|
4671
4688
|
if (!e) {
|
|
4672
4689
|
console.assert(!1);
|
|
4673
4690
|
return;
|
|
@@ -4748,7 +4765,7 @@ const Fi = {
|
|
|
4748
4765
|
initShape_: function() {
|
|
4749
4766
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4750
4767
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4751
|
-
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new
|
|
4768
|
+
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new ue("");
|
|
4752
4769
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4753
4770
|
}
|
|
4754
4771
|
},
|
|
@@ -4758,14 +4775,14 @@ const Fi = {
|
|
|
4758
4775
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
4759
4776
|
if (this.getInput("ADD" + t))
|
|
4760
4777
|
continue;
|
|
4761
|
-
const e = new m(() => this.genColumnOpts_()), n = new
|
|
4778
|
+
const e = new m(() => this.genColumnOpts_()), n = new ue("");
|
|
4762
4779
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4763
4780
|
const o = this.table.columns[0];
|
|
4764
4781
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4765
4782
|
}
|
|
4766
4783
|
},
|
|
4767
4784
|
checkWarning_: function() {
|
|
4768
|
-
const t =
|
|
4785
|
+
const t = _e(this.space.id);
|
|
4769
4786
|
if (!t) {
|
|
4770
4787
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4771
4788
|
return;
|
|
@@ -4783,7 +4800,7 @@ const Fi = {
|
|
|
4783
4800
|
this.setWarningText(null);
|
|
4784
4801
|
}
|
|
4785
4802
|
};
|
|
4786
|
-
d.select_column_v1 =
|
|
4803
|
+
d.select_column_v1 = Gi;
|
|
4787
4804
|
s.forBlock.select_column_v1 = function(t) {
|
|
4788
4805
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4789
4806
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4795,7 +4812,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4795
4812
|
I !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4796
4813
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4797
4814
|
};
|
|
4798
|
-
const
|
|
4815
|
+
const Wi = {
|
|
4799
4816
|
init: function() {
|
|
4800
4817
|
this.space = {
|
|
4801
4818
|
id: "",
|
|
@@ -4831,10 +4848,10 @@ const wi = {
|
|
|
4831
4848
|
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_();
|
|
4832
4849
|
},
|
|
4833
4850
|
genSpaceOpts_: function() {
|
|
4834
|
-
return
|
|
4851
|
+
return ut();
|
|
4835
4852
|
},
|
|
4836
4853
|
genTableOpts_: function() {
|
|
4837
|
-
return
|
|
4854
|
+
return rt(this.space.id);
|
|
4838
4855
|
},
|
|
4839
4856
|
onchange: function(t) {
|
|
4840
4857
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4849,7 +4866,7 @@ const wi = {
|
|
|
4849
4866
|
}
|
|
4850
4867
|
},
|
|
4851
4868
|
onSpaceChange_: function(t) {
|
|
4852
|
-
const e =
|
|
4869
|
+
const e = _e(t);
|
|
4853
4870
|
if (!e) {
|
|
4854
4871
|
console.assert(!1);
|
|
4855
4872
|
return;
|
|
@@ -4869,7 +4886,7 @@ const wi = {
|
|
|
4869
4886
|
this.table.id = e.id, this.table.name = e.name;
|
|
4870
4887
|
},
|
|
4871
4888
|
checkWarning_: function() {
|
|
4872
|
-
const t =
|
|
4889
|
+
const t = _e(this.space.id);
|
|
4873
4890
|
if (!t) {
|
|
4874
4891
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4875
4892
|
return;
|
|
@@ -4883,12 +4900,12 @@ const wi = {
|
|
|
4883
4900
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4884
4901
|
}
|
|
4885
4902
|
};
|
|
4886
|
-
d.select_table_v1 =
|
|
4903
|
+
d.select_table_v1 = Wi;
|
|
4887
4904
|
s.forBlock.select_table_v1 = function(t) {
|
|
4888
4905
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4889
4906
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4890
4907
|
};
|
|
4891
|
-
const
|
|
4908
|
+
const ji = {
|
|
4892
4909
|
init: function() {
|
|
4893
4910
|
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}");
|
|
4894
4911
|
},
|
|
@@ -4910,7 +4927,7 @@ const Yi = {
|
|
|
4910
4927
|
]);
|
|
4911
4928
|
}
|
|
4912
4929
|
};
|
|
4913
|
-
d.transaction_v1 =
|
|
4930
|
+
d.transaction_v1 = ji;
|
|
4914
4931
|
s.forBlock.transaction_v1 = function(t) {
|
|
4915
4932
|
const e = s.INDENT, n = t, o = Ro(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4916
4933
|
return `{
|
|
@@ -4954,19 +4971,19 @@ ${e}}
|
|
|
4954
4971
|
}
|
|
4955
4972
|
`;
|
|
4956
4973
|
};
|
|
4957
|
-
const
|
|
4974
|
+
const Xi = {
|
|
4958
4975
|
init: function() {
|
|
4959
4976
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4960
4977
|
}
|
|
4961
4978
|
};
|
|
4962
|
-
d.update_column_container_v1 =
|
|
4963
|
-
const
|
|
4979
|
+
d.update_column_container_v1 = Xi;
|
|
4980
|
+
const Ji = {
|
|
4964
4981
|
init: function() {
|
|
4965
4982
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4983
|
}
|
|
4967
4984
|
};
|
|
4968
|
-
d.update_column_item_v1 =
|
|
4969
|
-
const
|
|
4985
|
+
d.update_column_item_v1 = Ji;
|
|
4986
|
+
const qi = {
|
|
4970
4987
|
init: function() {
|
|
4971
4988
|
this.space = {
|
|
4972
4989
|
id: "",
|
|
@@ -4976,7 +4993,7 @@ const Hi = {
|
|
|
4976
4993
|
name: "",
|
|
4977
4994
|
columns: []
|
|
4978
4995
|
}, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new m(() => this.genSpaceOpts_()), "SPACE").appendField(new m(() => this.genTableOpts_()), "TABLE"), this.setMutator(
|
|
4979
|
-
new
|
|
4996
|
+
new fe.MutatorIcon(
|
|
4980
4997
|
["update_column_item_v1"],
|
|
4981
4998
|
this
|
|
4982
4999
|
)
|
|
@@ -5011,10 +5028,10 @@ const Hi = {
|
|
|
5011
5028
|
}, 0);
|
|
5012
5029
|
},
|
|
5013
5030
|
genSpaceOpts_: function() {
|
|
5014
|
-
return
|
|
5031
|
+
return ut();
|
|
5015
5032
|
},
|
|
5016
5033
|
genTableOpts_: function() {
|
|
5017
|
-
return
|
|
5034
|
+
return rt(this.space.id);
|
|
5018
5035
|
},
|
|
5019
5036
|
genColumnOpts_: function() {
|
|
5020
5037
|
const t = [];
|
|
@@ -5045,7 +5062,7 @@ const Hi = {
|
|
|
5045
5062
|
}
|
|
5046
5063
|
},
|
|
5047
5064
|
onSpaceChange_: function(t) {
|
|
5048
|
-
const e =
|
|
5065
|
+
const e = _e(t);
|
|
5049
5066
|
if (!e) {
|
|
5050
5067
|
console.assert(!1);
|
|
5051
5068
|
return;
|
|
@@ -5079,7 +5096,7 @@ const Hi = {
|
|
|
5079
5096
|
}
|
|
5080
5097
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5081
5098
|
i && i.dispose();
|
|
5082
|
-
const a =
|
|
5099
|
+
const a = Dt(this.workspace, n.type);
|
|
5083
5100
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5084
5101
|
},
|
|
5085
5102
|
decompose: function(t) {
|
|
@@ -5155,29 +5172,30 @@ const Hi = {
|
|
|
5155
5172
|
updateBlocks_: function(t) {
|
|
5156
5173
|
if (!this.isInsertionMarker())
|
|
5157
5174
|
for (let e = 0; e < this.itemCount_; e++) {
|
|
5158
|
-
const n = this.getInput("ADD" + e)
|
|
5175
|
+
const n = this.getInput("ADD" + e), o = n.connection, i = o.targetBlock();
|
|
5159
5176
|
if (t)
|
|
5160
|
-
|
|
5161
|
-
else if (
|
|
5177
|
+
i && i.dispose();
|
|
5178
|
+
else if (i)
|
|
5162
5179
|
continue;
|
|
5163
|
-
const
|
|
5164
|
-
if (!
|
|
5180
|
+
const a = this.getFieldValue("COLUMN" + e), l = this.table.columns.find((r) => r.id === a);
|
|
5181
|
+
if (!l)
|
|
5165
5182
|
continue;
|
|
5166
|
-
|
|
5167
|
-
|
|
5183
|
+
n.setCheck(null);
|
|
5184
|
+
const u = Dt(this.workspace, l.type);
|
|
5185
|
+
u && o.connect(u.outputConnection);
|
|
5168
5186
|
}
|
|
5169
5187
|
},
|
|
5170
5188
|
updateCheck_: function() {
|
|
5171
5189
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
5172
|
-
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((
|
|
5190
|
+
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((i) => i.id === e);
|
|
5173
5191
|
if (!n)
|
|
5174
5192
|
continue;
|
|
5175
|
-
const
|
|
5176
|
-
|
|
5193
|
+
const o = kn(n.type);
|
|
5194
|
+
this.getInput("ADD" + t).setCheck(o);
|
|
5177
5195
|
}
|
|
5178
5196
|
},
|
|
5179
5197
|
checkWarning_: function() {
|
|
5180
|
-
const t =
|
|
5198
|
+
const t = _e(this.space.id);
|
|
5181
5199
|
if (!t) {
|
|
5182
5200
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
5183
5201
|
return;
|
|
@@ -5195,7 +5213,7 @@ const Hi = {
|
|
|
5195
5213
|
this.setWarningText(null);
|
|
5196
5214
|
}
|
|
5197
5215
|
};
|
|
5198
|
-
d.update_column_v1 =
|
|
5216
|
+
d.update_column_v1 = qi;
|
|
5199
5217
|
s.forBlock.update_column_v1 = function(t) {
|
|
5200
5218
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5201
5219
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5207,7 +5225,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5207
5225
|
I !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5208
5226
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5209
5227
|
};
|
|
5210
|
-
function
|
|
5228
|
+
function Qi(t) {
|
|
5211
5229
|
const e = t.getInput("TABLE").connection;
|
|
5212
5230
|
if (e.targetBlock())
|
|
5213
5231
|
return;
|
|
@@ -5241,7 +5259,7 @@ function Gi(t) {
|
|
|
5241
5259
|
}, l = $.blocks.append(a, t.workspace);
|
|
5242
5260
|
e.connect(l.outputConnection);
|
|
5243
5261
|
}
|
|
5244
|
-
function
|
|
5262
|
+
function zi(t) {
|
|
5245
5263
|
const e = t.getInput("CONDITION").connection;
|
|
5246
5264
|
if (e.targetBlock())
|
|
5247
5265
|
return;
|
|
@@ -5250,7 +5268,7 @@ function Wi(t) {
|
|
|
5250
5268
|
}, o = $.blocks.append(n, t.workspace);
|
|
5251
5269
|
e.connect(o.outputConnection);
|
|
5252
5270
|
}
|
|
5253
|
-
function
|
|
5271
|
+
function Zi(t) {
|
|
5254
5272
|
const e = t.getInput("HANDLE").connection;
|
|
5255
5273
|
if (e.targetBlock())
|
|
5256
5274
|
return;
|
|
@@ -5274,7 +5292,7 @@ function ji(t) {
|
|
|
5274
5292
|
}, o = $.blocks.append(n, t.workspace);
|
|
5275
5293
|
e.connect(o.previousConnection);
|
|
5276
5294
|
}
|
|
5277
|
-
const
|
|
5295
|
+
const es = {
|
|
5278
5296
|
init: function() {
|
|
5279
5297
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
5280
5298
|
},
|
|
@@ -5290,14 +5308,14 @@ const Xi = {
|
|
|
5290
5308
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5291
5309
|
},
|
|
5292
5310
|
ensureBlocks: function() {
|
|
5293
|
-
this.isInsertionMarker() || (
|
|
5311
|
+
this.isInsertionMarker() || (Qi(this), zi(this), F(this, [
|
|
5294
5312
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5295
5313
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5296
5314
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5297
|
-
]),
|
|
5315
|
+
]), Zi(this));
|
|
5298
5316
|
}
|
|
5299
5317
|
};
|
|
5300
|
-
d.update_data_v1 =
|
|
5318
|
+
d.update_data_v1 = es;
|
|
5301
5319
|
s.forBlock.update_data_v1 = function(t) {
|
|
5302
5320
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
5303
5321
|
return `{
|
|
@@ -5314,20 +5332,20 @@ ${e}}
|
|
|
5314
5332
|
${i}}
|
|
5315
5333
|
`;
|
|
5316
5334
|
};
|
|
5317
|
-
const
|
|
5335
|
+
const ts = v.xml, ns = {
|
|
5318
5336
|
init: function() {
|
|
5319
5337
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5320
|
-
new z(
|
|
5338
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5321
5339
|
this.isInFlyout || this.addEntry_();
|
|
5322
5340
|
})
|
|
5323
5341
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5324
5342
|
},
|
|
5325
5343
|
mutationToDom: function() {
|
|
5326
|
-
const t =
|
|
5344
|
+
const t = ts.createElement("mutation");
|
|
5327
5345
|
return t.setAttribute("items", String(this.length)), t;
|
|
5328
5346
|
},
|
|
5329
5347
|
domToMutation: function(t) {
|
|
5330
|
-
this.length =
|
|
5348
|
+
this.length = be(t.getAttribute("items") ?? "", 0), this.initShape_();
|
|
5331
5349
|
},
|
|
5332
5350
|
initData: function(t) {
|
|
5333
5351
|
this.length = t, this.initShape_();
|
|
@@ -5336,11 +5354,11 @@ const Ji = v.xml, qi = {
|
|
|
5336
5354
|
for (let t = 0; t < this.length; t++) {
|
|
5337
5355
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5338
5356
|
n.appendField(
|
|
5339
|
-
new z(
|
|
5357
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5340
5358
|
this.isInFlyout || this.addEntry_(n);
|
|
5341
5359
|
})
|
|
5342
5360
|
), n.appendField(new en(String(t))), n.appendField(
|
|
5343
|
-
new z(
|
|
5361
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5344
5362
|
this.isInFlyout || this.removeEntry_(n);
|
|
5345
5363
|
})
|
|
5346
5364
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5348,18 +5366,18 @@ const Ji = v.xml, qi = {
|
|
|
5348
5366
|
},
|
|
5349
5367
|
addEntry_: function(t) {
|
|
5350
5368
|
let e = this.length;
|
|
5351
|
-
t && (e =
|
|
5369
|
+
t && (e = be(t.name.substring(5)));
|
|
5352
5370
|
for (let o = this.length - 1; o >= e; o--) {
|
|
5353
5371
|
const i = this.getInput("ENTRY" + o);
|
|
5354
5372
|
i.name = "ENTRY" + (o + 1), i.fieldRow[1].setValue(o + 1);
|
|
5355
5373
|
}
|
|
5356
5374
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5357
5375
|
n.appendField(
|
|
5358
|
-
new z(
|
|
5376
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5359
5377
|
this.isInFlyout || this.addEntry_(n);
|
|
5360
5378
|
})
|
|
5361
5379
|
), n.appendField(new en(String(e))), n.appendField(
|
|
5362
|
-
new z(
|
|
5380
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5363
5381
|
this.isInFlyout || this.removeEntry_(n);
|
|
5364
5382
|
})
|
|
5365
5383
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5367,7 +5385,7 @@ const Ji = v.xml, qi = {
|
|
|
5367
5385
|
removeEntry_: function(t) {
|
|
5368
5386
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5369
5387
|
n && n.dispose(), this.removeInput(e);
|
|
5370
|
-
const o =
|
|
5388
|
+
const o = be(e.substring(5));
|
|
5371
5389
|
for (let i = o + 1; i < this.length; i++) {
|
|
5372
5390
|
const a = this.getInput("ENTRY" + i);
|
|
5373
5391
|
a.name = "ENTRY" + (i - 1), a.fieldRow[1].setValue(i - 1);
|
|
@@ -5375,11 +5393,11 @@ const Ji = v.xml, qi = {
|
|
|
5375
5393
|
this.length--;
|
|
5376
5394
|
}
|
|
5377
5395
|
};
|
|
5378
|
-
d.json_array_v1 =
|
|
5379
|
-
const
|
|
5396
|
+
d.json_array_v1 = ns;
|
|
5397
|
+
const os = {
|
|
5380
5398
|
init: function() {
|
|
5381
5399
|
this.appendDummyInput().appendField(
|
|
5382
|
-
new
|
|
5400
|
+
new hn([
|
|
5383
5401
|
["false", "false"],
|
|
5384
5402
|
["true", "true"]
|
|
5385
5403
|
]),
|
|
@@ -5387,19 +5405,19 @@ const Qi = {
|
|
|
5387
5405
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5388
5406
|
}
|
|
5389
5407
|
};
|
|
5390
|
-
d.json_boolean_v1 =
|
|
5391
|
-
const
|
|
5408
|
+
d.json_boolean_v1 = os;
|
|
5409
|
+
const cn = v.xml, is = {
|
|
5392
5410
|
init: function() {
|
|
5393
5411
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5394
|
-
new z(
|
|
5412
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5395
5413
|
this.isInFlyout || this.addEntry_();
|
|
5396
5414
|
})
|
|
5397
5415
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5398
5416
|
},
|
|
5399
5417
|
mutationToDom: function() {
|
|
5400
|
-
const t =
|
|
5418
|
+
const t = cn.createElement("mutation");
|
|
5401
5419
|
for (let e = 0; e < this.length; e++) {
|
|
5402
|
-
const n =
|
|
5420
|
+
const n = cn.createElement("item");
|
|
5403
5421
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5404
5422
|
}
|
|
5405
5423
|
return t;
|
|
@@ -5419,11 +5437,11 @@ const ln = v.xml, zi = {
|
|
|
5419
5437
|
for (let e = 0; e < t.length; e++) {
|
|
5420
5438
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5421
5439
|
i.appendField(
|
|
5422
|
-
new z(
|
|
5440
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5423
5441
|
this.isInFlyout || this.addEntry_(i);
|
|
5424
5442
|
})
|
|
5425
|
-
), i.appendField(new
|
|
5426
|
-
new z(
|
|
5443
|
+
), i.appendField(new ue(n), "KEY" + e), i.appendField(
|
|
5444
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5427
5445
|
this.isInFlyout || this.removeEntry_(i);
|
|
5428
5446
|
})
|
|
5429
5447
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5431,16 +5449,16 @@ const ln = v.xml, zi = {
|
|
|
5431
5449
|
},
|
|
5432
5450
|
addEntry_: function(t) {
|
|
5433
5451
|
let e = this.length;
|
|
5434
|
-
t && (e =
|
|
5452
|
+
t && (e = be(t.name.substring(5)));
|
|
5435
5453
|
for (let o = this.length - 1; o >= e; o--)
|
|
5436
5454
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5437
5455
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5438
5456
|
n.appendField(
|
|
5439
|
-
new z(
|
|
5457
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5440
5458
|
this.isInFlyout || this.addEntry_(n);
|
|
5441
5459
|
})
|
|
5442
|
-
), n.appendField(new
|
|
5443
|
-
new z(
|
|
5460
|
+
), n.appendField(new ue("key"), "KEY" + e), n.appendField(
|
|
5461
|
+
new z(Je, 20, 20, void 0, () => {
|
|
5444
5462
|
this.isInFlyout || this.removeEntry_(n);
|
|
5445
5463
|
})
|
|
5446
5464
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5448,54 +5466,54 @@ const ln = v.xml, zi = {
|
|
|
5448
5466
|
removeEntry_: function(t) {
|
|
5449
5467
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5450
5468
|
n && n.dispose(), this.removeInput(e);
|
|
5451
|
-
const o =
|
|
5469
|
+
const o = be(e.substring(5));
|
|
5452
5470
|
for (let i = o + 1; i < this.length; i++)
|
|
5453
5471
|
this.getField("KEY" + i).name = "KEY" + (i - 1), this.getInput("ENTRY" + i).name = "ENTRY" + (i - 1);
|
|
5454
5472
|
this.length--;
|
|
5455
5473
|
}
|
|
5456
5474
|
};
|
|
5457
|
-
d.json_map_v1 =
|
|
5458
|
-
const
|
|
5475
|
+
d.json_map_v1 = is;
|
|
5476
|
+
const ss = {
|
|
5459
5477
|
init: function() {
|
|
5460
|
-
this.appendDummyInput().appendField(new
|
|
5478
|
+
this.appendDummyInput().appendField(new bt(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5461
5479
|
}
|
|
5462
5480
|
};
|
|
5463
|
-
d.json_number_v1 =
|
|
5464
|
-
const
|
|
5481
|
+
d.json_number_v1 = ss;
|
|
5482
|
+
const as = {
|
|
5465
5483
|
init: function() {
|
|
5466
5484
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5467
5485
|
}
|
|
5468
5486
|
};
|
|
5469
|
-
d.json_root_v1 =
|
|
5470
|
-
const
|
|
5487
|
+
d.json_root_v1 = as;
|
|
5488
|
+
const cs = {
|
|
5471
5489
|
init: function() {
|
|
5472
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5490
|
+
this.appendDummyInput().appendField('"').appendField(new ue(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5473
5491
|
}
|
|
5474
5492
|
};
|
|
5475
|
-
d.json_string_v1 =
|
|
5476
|
-
const
|
|
5493
|
+
d.json_string_v1 = cs;
|
|
5494
|
+
const ls = v.xml, us = {
|
|
5477
5495
|
init: function() {
|
|
5478
5496
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5479
5497
|
}
|
|
5480
5498
|
};
|
|
5481
|
-
d.list_create_container_v1 =
|
|
5482
|
-
const
|
|
5499
|
+
d.list_create_container_v1 = us;
|
|
5500
|
+
const rs = {
|
|
5483
5501
|
init: function() {
|
|
5484
5502
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5503
|
}
|
|
5486
5504
|
};
|
|
5487
|
-
d.list_create_item_v1 =
|
|
5488
|
-
const
|
|
5505
|
+
d.list_create_item_v1 = rs;
|
|
5506
|
+
const _s = {
|
|
5489
5507
|
init: function() {
|
|
5490
5508
|
this.itemCount_ = 0, this.setMutator(
|
|
5491
|
-
new
|
|
5509
|
+
new fe.MutatorIcon(
|
|
5492
5510
|
["list_create_item_v1"],
|
|
5493
5511
|
this
|
|
5494
5512
|
)
|
|
5495
5513
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5496
5514
|
},
|
|
5497
5515
|
mutationToDom: function() {
|
|
5498
|
-
const t =
|
|
5516
|
+
const t = ls.createElement("mutation");
|
|
5499
5517
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5500
5518
|
},
|
|
5501
5519
|
domToMutation: function(t) {
|
|
@@ -5562,13 +5580,13 @@ const ss = {
|
|
|
5562
5580
|
for (let t = 0; t < this.itemCount_; t++)
|
|
5563
5581
|
if (!this.getInput("ADD" + t)) {
|
|
5564
5582
|
const e = this.appendValueInput("ADD" + t);
|
|
5565
|
-
t === 0 && (e.setAlign(k.Align.RIGHT), e.appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
5583
|
+
e.setCheck(["String", "Number", "Boolean", "Array", "Object"]), t === 0 && (e.setAlign(k.Align.RIGHT), e.appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
5566
5584
|
}
|
|
5567
5585
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
5568
5586
|
this.removeInput("ADD" + t);
|
|
5569
5587
|
}
|
|
5570
5588
|
};
|
|
5571
|
-
d.list_create_v1 =
|
|
5589
|
+
d.list_create_v1 = _s;
|
|
5572
5590
|
s.forBlock.list_create_v1 = function(t) {
|
|
5573
5591
|
const e = t, n = new Array(e.itemCount_);
|
|
5574
5592
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5784,7 +5802,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5784
5802
|
return `${e}[${n}] = ${o};
|
|
5785
5803
|
`;
|
|
5786
5804
|
};
|
|
5787
|
-
const
|
|
5805
|
+
const ps = {
|
|
5788
5806
|
// logic_compare
|
|
5789
5807
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5790
5808
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5798,7 +5816,7 @@ const as = {
|
|
|
5798
5816
|
};
|
|
5799
5817
|
R.register(
|
|
5800
5818
|
"logic_op_tooltip_v1",
|
|
5801
|
-
R.buildTooltipForDropdown("OP",
|
|
5819
|
+
R.buildTooltipForDropdown("OP", ps)
|
|
5802
5820
|
);
|
|
5803
5821
|
h([
|
|
5804
5822
|
{
|
|
@@ -5823,7 +5841,7 @@ h([
|
|
|
5823
5841
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5824
5842
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5825
5843
|
};
|
|
5826
|
-
const
|
|
5844
|
+
const hs = {
|
|
5827
5845
|
onchange: function(t) {
|
|
5828
5846
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5829
5847
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5843,7 +5861,7 @@ const cs = {
|
|
|
5843
5861
|
R.register(
|
|
5844
5862
|
"logic_compare_v1",
|
|
5845
5863
|
function() {
|
|
5846
|
-
this.mixin(
|
|
5864
|
+
this.mixin(hs);
|
|
5847
5865
|
}
|
|
5848
5866
|
);
|
|
5849
5867
|
h([
|
|
@@ -5893,7 +5911,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5893
5911
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5894
5912
|
return [`${i} ${n} ${a}`, o];
|
|
5895
5913
|
};
|
|
5896
|
-
const
|
|
5914
|
+
const ds = {
|
|
5897
5915
|
elseIfCount_: 0,
|
|
5898
5916
|
hasElse_: !1,
|
|
5899
5917
|
mutationToDom: function() {
|
|
@@ -6020,7 +6038,7 @@ const ls = {
|
|
|
6020
6038
|
};
|
|
6021
6039
|
R.registerMutator(
|
|
6022
6040
|
"logic_if_v1_mutator",
|
|
6023
|
-
|
|
6041
|
+
ds,
|
|
6024
6042
|
void 0,
|
|
6025
6043
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6026
6044
|
);
|
|
@@ -6166,7 +6184,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6184
|
}
|
|
6167
6185
|
return [`${o} ${e} ${i}`, n];
|
|
6168
6186
|
};
|
|
6169
|
-
const
|
|
6187
|
+
const fs = {
|
|
6170
6188
|
prevParentConnection_: null,
|
|
6171
6189
|
onchange: function(t) {
|
|
6172
6190
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6181,7 +6199,7 @@ const us = {
|
|
|
6181
6199
|
this.prevParentConnection_ = o;
|
|
6182
6200
|
}
|
|
6183
6201
|
};
|
|
6184
|
-
R.registerMixin("logic_ternary_v1",
|
|
6202
|
+
R.registerMixin("logic_ternary_v1", fs);
|
|
6185
6203
|
h([
|
|
6186
6204
|
{
|
|
6187
6205
|
type: "logic_ternary_v1",
|
|
@@ -6218,7 +6236,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6218
6236
|
const e = s.valueToCode(t, "IF", c.CONDITIONAL) || "false", n = s.valueToCode(t, "THEN", c.CONDITIONAL) || "null", o = s.valueToCode(t, "ELSE", c.CONDITIONAL) || "null";
|
|
6219
6237
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6220
6238
|
};
|
|
6221
|
-
const
|
|
6239
|
+
const ms = {
|
|
6222
6240
|
customContextMenu: function(t) {
|
|
6223
6241
|
if (this.isInFlyout)
|
|
6224
6242
|
return;
|
|
@@ -6233,14 +6251,14 @@ const rs = {
|
|
|
6233
6251
|
t.push({
|
|
6234
6252
|
enabled: !0,
|
|
6235
6253
|
text: _.VARIABLE_SET_CREATE_GET.replace("%1", o),
|
|
6236
|
-
callback:
|
|
6254
|
+
callback: dn.callbackFactory(this, i)
|
|
6237
6255
|
});
|
|
6238
6256
|
}
|
|
6239
6257
|
}
|
|
6240
6258
|
};
|
|
6241
6259
|
R.registerMixin(
|
|
6242
6260
|
"contextMenu_newGetVariableBlock_v1",
|
|
6243
|
-
|
|
6261
|
+
ms
|
|
6244
6262
|
);
|
|
6245
6263
|
R.register(
|
|
6246
6264
|
"flow_control_tooltip_v1",
|
|
@@ -6249,16 +6267,16 @@ R.register(
|
|
|
6249
6267
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6250
6268
|
})
|
|
6251
6269
|
);
|
|
6252
|
-
const
|
|
6270
|
+
const Ts = /* @__PURE__ */ new Set([
|
|
6253
6271
|
"repeat_v1",
|
|
6254
6272
|
"for_each_v1",
|
|
6255
6273
|
"for_v1",
|
|
6256
6274
|
"while_until_v1"
|
|
6257
|
-
]),
|
|
6275
|
+
]), Es = {
|
|
6258
6276
|
getSurroundLoop: function() {
|
|
6259
6277
|
let t = this;
|
|
6260
6278
|
do {
|
|
6261
|
-
if (
|
|
6279
|
+
if (Ts.has(t.type))
|
|
6262
6280
|
return t;
|
|
6263
6281
|
t = t?.getSurroundParent();
|
|
6264
6282
|
} while (t);
|
|
@@ -6281,7 +6299,7 @@ const _s = /* @__PURE__ */ new Set([
|
|
|
6281
6299
|
};
|
|
6282
6300
|
R.registerMixin(
|
|
6283
6301
|
"flow_control_in_loop_check_v1",
|
|
6284
|
-
|
|
6302
|
+
Es
|
|
6285
6303
|
);
|
|
6286
6304
|
h([
|
|
6287
6305
|
{
|
|
@@ -6583,7 +6601,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6583
6601
|
${o}}
|
|
6584
6602
|
`;
|
|
6585
6603
|
};
|
|
6586
|
-
const
|
|
6604
|
+
const gs = {
|
|
6587
6605
|
// math_arithmetic
|
|
6588
6606
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6589
6607
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6617,7 +6635,7 @@ const hs = {
|
|
|
6617
6635
|
};
|
|
6618
6636
|
R.register(
|
|
6619
6637
|
"math_op_tooltip_v1",
|
|
6620
|
-
R.buildTooltipForDropdown("OP",
|
|
6638
|
+
R.buildTooltipForDropdown("OP", gs)
|
|
6621
6639
|
);
|
|
6622
6640
|
h([
|
|
6623
6641
|
{
|
|
@@ -7220,31 +7238,31 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7220
7238
|
}
|
|
7221
7239
|
return [o, c.DIVISION];
|
|
7222
7240
|
};
|
|
7223
|
-
const
|
|
7241
|
+
const Is = v.xml, As = {
|
|
7224
7242
|
init: function() {
|
|
7225
7243
|
this.appendDummyInput().appendField(
|
|
7226
7244
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7227
7245
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7228
7246
|
}
|
|
7229
7247
|
};
|
|
7230
|
-
d.object_create_container_v1 =
|
|
7231
|
-
const
|
|
7248
|
+
d.object_create_container_v1 = As;
|
|
7249
|
+
const Os = {
|
|
7232
7250
|
init: function() {
|
|
7233
7251
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7252
|
}
|
|
7235
7253
|
};
|
|
7236
|
-
d.object_create_item_v1 =
|
|
7237
|
-
const
|
|
7254
|
+
d.object_create_item_v1 = Os;
|
|
7255
|
+
const Cs = {
|
|
7238
7256
|
init: function() {
|
|
7239
7257
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7240
|
-
new
|
|
7258
|
+
new fe.MutatorIcon(
|
|
7241
7259
|
["object_create_item_v1"],
|
|
7242
7260
|
this
|
|
7243
7261
|
)
|
|
7244
7262
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7245
7263
|
},
|
|
7246
7264
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7265
|
+
const t = Is.createElement("mutation");
|
|
7248
7266
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7249
7267
|
},
|
|
7250
7268
|
domToMutation: function(t) {
|
|
@@ -7303,12 +7321,12 @@ const Ts = {
|
|
|
7303
7321
|
},
|
|
7304
7322
|
updateShape_: function() {
|
|
7305
7323
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7306
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new
|
|
7324
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new ue("key"), "KEY" + t);
|
|
7307
7325
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7308
7326
|
this.removeInput("ADD" + t);
|
|
7309
7327
|
}
|
|
7310
7328
|
};
|
|
7311
|
-
d.object_create_v1 =
|
|
7329
|
+
d.object_create_v1 = Cs;
|
|
7312
7330
|
s.forBlock.object_create_v1 = function(t) {
|
|
7313
7331
|
const e = t;
|
|
7314
7332
|
let n = "{";
|
|
@@ -7483,7 +7501,7 @@ h([
|
|
|
7483
7501
|
{
|
|
7484
7502
|
type: "input_value",
|
|
7485
7503
|
name: "TO",
|
|
7486
|
-
check:
|
|
7504
|
+
check: ["String", "Number", "Boolean", "Array", "Object"],
|
|
7487
7505
|
align: "RIGHT"
|
|
7488
7506
|
}
|
|
7489
7507
|
],
|
|
@@ -7550,15 +7568,15 @@ h([
|
|
|
7550
7568
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7551
7569
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7552
7570
|
};
|
|
7553
|
-
const
|
|
7571
|
+
const ln = v.xml, ks = {
|
|
7554
7572
|
init: function() {
|
|
7555
7573
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new uo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7556
7574
|
}
|
|
7557
7575
|
};
|
|
7558
|
-
d.procedure_def_container_v1 =
|
|
7559
|
-
const
|
|
7576
|
+
d.procedure_def_container_v1 = ks;
|
|
7577
|
+
const vs = {
|
|
7560
7578
|
init: function() {
|
|
7561
|
-
const t = new
|
|
7579
|
+
const t = new ue(Bt.DEFAULT_ARG);
|
|
7562
7580
|
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;
|
|
7563
7581
|
},
|
|
7564
7582
|
validator_: function(t) {
|
|
@@ -7578,24 +7596,24 @@ const gs = {
|
|
|
7578
7596
|
return t;
|
|
7579
7597
|
}
|
|
7580
7598
|
};
|
|
7581
|
-
d.procedure_def_item_v1 =
|
|
7582
|
-
const
|
|
7599
|
+
d.procedure_def_item_v1 = vs;
|
|
7600
|
+
const ys = {
|
|
7583
7601
|
init: function() {
|
|
7584
7602
|
this.withReturn = !1, this.args = [];
|
|
7585
|
-
const t = new
|
|
7586
|
-
|
|
7603
|
+
const t = new ue(
|
|
7604
|
+
Bt.findLegalName("", this)
|
|
7587
7605
|
);
|
|
7588
|
-
t.setValidator(
|
|
7589
|
-
new
|
|
7606
|
+
t.setValidator(Bt.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7607
|
+
new fe.MutatorIcon(
|
|
7590
7608
|
["procedure_def_item_v1"],
|
|
7591
7609
|
this
|
|
7592
7610
|
)
|
|
7593
7611
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7594
7612
|
},
|
|
7595
7613
|
mutationToDom: function() {
|
|
7596
|
-
const t =
|
|
7614
|
+
const t = ln.createElement("mutation");
|
|
7597
7615
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7598
|
-
const n =
|
|
7616
|
+
const n = ln.createElement("arg");
|
|
7599
7617
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7600
7618
|
}), t;
|
|
7601
7619
|
},
|
|
@@ -7683,13 +7701,13 @@ const Is = {
|
|
|
7683
7701
|
}
|
|
7684
7702
|
}
|
|
7685
7703
|
};
|
|
7686
|
-
d.procedure_def_v1 =
|
|
7687
|
-
const
|
|
7704
|
+
d.procedure_def_v1 = ys;
|
|
7705
|
+
const Ns = v.xml, Ls = {
|
|
7688
7706
|
init: function() {
|
|
7689
7707
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
7690
7708
|
},
|
|
7691
7709
|
mutationToDom: function() {
|
|
7692
|
-
const t =
|
|
7710
|
+
const t = Ns.createElement("mutation");
|
|
7693
7711
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7694
7712
|
},
|
|
7695
7713
|
domToMutation: function(t) {
|
|
@@ -7740,14 +7758,14 @@ const As = v.xml, Os = {
|
|
|
7740
7758
|
t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
7741
7759
|
}
|
|
7742
7760
|
};
|
|
7743
|
-
d.procedure_return_v1 =
|
|
7761
|
+
d.procedure_return_v1 = Ls;
|
|
7744
7762
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7745
7763
|
const e = t;
|
|
7746
7764
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7747
7765
|
` : `return;
|
|
7748
7766
|
`;
|
|
7749
7767
|
};
|
|
7750
|
-
const
|
|
7768
|
+
const Ss = {
|
|
7751
7769
|
init: function() {
|
|
7752
7770
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
7753
7771
|
},
|
|
@@ -7770,7 +7788,7 @@ const Cs = {
|
|
|
7770
7788
|
]);
|
|
7771
7789
|
}
|
|
7772
7790
|
};
|
|
7773
|
-
d.download_resource_v1 =
|
|
7791
|
+
d.download_resource_v1 = Ss;
|
|
7774
7792
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7775
7793
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7776
7794
|
return `{
|
|
@@ -7798,7 +7816,7 @@ function Un(t) {
|
|
|
7798
7816
|
}
|
|
7799
7817
|
return o(e.dirTree, ""), n;
|
|
7800
7818
|
}
|
|
7801
|
-
function
|
|
7819
|
+
function bs(t) {
|
|
7802
7820
|
const e = [];
|
|
7803
7821
|
return Un(t).forEach(({ id: o, name: i }) => {
|
|
7804
7822
|
e.push([i, o]);
|
|
@@ -7813,7 +7831,7 @@ function Mn(t, e) {
|
|
|
7813
7831
|
i.dirid === e && o.push(i);
|
|
7814
7832
|
}), o;
|
|
7815
7833
|
}
|
|
7816
|
-
function
|
|
7834
|
+
function Bs(t, e) {
|
|
7817
7835
|
const n = [];
|
|
7818
7836
|
return Mn(t, e).forEach(({ id: i, name: a }) => {
|
|
7819
7837
|
n.push([a, i]);
|
|
@@ -7825,13 +7843,13 @@ function Pn() {
|
|
|
7825
7843
|
e.resources.length > 0 && t.push(e);
|
|
7826
7844
|
}), t;
|
|
7827
7845
|
}
|
|
7828
|
-
function
|
|
7846
|
+
function Rs() {
|
|
7829
7847
|
const t = [];
|
|
7830
7848
|
return Pn().forEach(({ id: n, name: o }) => {
|
|
7831
7849
|
t.push([o, n]);
|
|
7832
7850
|
}), N(t);
|
|
7833
7851
|
}
|
|
7834
|
-
const
|
|
7852
|
+
const Ds = {
|
|
7835
7853
|
init: function() {
|
|
7836
7854
|
this.space = {
|
|
7837
7855
|
id: "",
|
|
@@ -7877,23 +7895,23 @@ const Ns = {
|
|
|
7877
7895
|
};
|
|
7878
7896
|
},
|
|
7879
7897
|
loadExtraState: function(t) {
|
|
7880
|
-
this.space =
|
|
7898
|
+
this.space = Se(t.space), this.dir = Se(t.dir), this.resource = Se(t.resource);
|
|
7881
7899
|
},
|
|
7882
7900
|
genSpaceOpts_: function() {
|
|
7883
|
-
return
|
|
7901
|
+
return Rs();
|
|
7884
7902
|
},
|
|
7885
7903
|
genDirOpts_: function() {
|
|
7886
|
-
return
|
|
7904
|
+
return bs(this.space.id);
|
|
7887
7905
|
},
|
|
7888
7906
|
genResourceOpts_: function() {
|
|
7889
|
-
return
|
|
7907
|
+
return Bs(this.space.id, this.dir.id);
|
|
7890
7908
|
}
|
|
7891
7909
|
};
|
|
7892
|
-
d.select_resource_v1 =
|
|
7910
|
+
d.select_resource_v1 = Ds;
|
|
7893
7911
|
s.forBlock.select_resource_v1 = function() {
|
|
7894
7912
|
return "";
|
|
7895
7913
|
};
|
|
7896
|
-
const
|
|
7914
|
+
const Us = {
|
|
7897
7915
|
init: function() {
|
|
7898
7916
|
this.appendDummyInput().appendField(
|
|
7899
7917
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7924,7 +7942,7 @@ const Ls = {
|
|
|
7924
7942
|
]);
|
|
7925
7943
|
}
|
|
7926
7944
|
};
|
|
7927
|
-
d.upload_resource_v1 =
|
|
7945
|
+
d.upload_resource_v1 = Us;
|
|
7928
7946
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7929
7947
|
const e = s.valueToCode(t, "NAME", c.ATOMIC) || "''", n = s.valueToCode(t, "DIR", c.ATOMIC) || "null", o = s.valueToCode(t, "DATA", c.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
|
|
7930
7948
|
return `{
|
|
@@ -7957,9 +7975,9 @@ h([
|
|
|
7957
7975
|
s.forBlock.text_v1 = function(t) {
|
|
7958
7976
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7959
7977
|
};
|
|
7960
|
-
const
|
|
7961
|
-
function
|
|
7962
|
-
return
|
|
7978
|
+
const Ms = /^\s*'([^']|\\')*'\s*$/;
|
|
7979
|
+
function Xe(t) {
|
|
7980
|
+
return Ms.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7963
7981
|
}
|
|
7964
7982
|
R.register(
|
|
7965
7983
|
"text_append_tooltip_v1",
|
|
@@ -7994,7 +8012,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
7994
8012
|
t.getFieldValue("VAR"),
|
|
7995
8013
|
te.NameType.VARIABLE
|
|
7996
8014
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
7997
|
-
return `${e} += ${
|
|
8015
|
+
return `${e} += ${Xe(n)};
|
|
7998
8016
|
`;
|
|
7999
8017
|
};
|
|
8000
8018
|
h([
|
|
@@ -8163,10 +8181,10 @@ h([
|
|
|
8163
8181
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8164
8182
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8165
8183
|
};
|
|
8166
|
-
const
|
|
8184
|
+
const Ps = v.xml, Vs = {
|
|
8167
8185
|
itemCount_: 0,
|
|
8168
8186
|
mutationToDom: function() {
|
|
8169
|
-
const t =
|
|
8187
|
+
const t = Ps.createElement("mutation");
|
|
8170
8188
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8171
8189
|
},
|
|
8172
8190
|
domToMutation: function(t) {
|
|
@@ -8237,13 +8255,13 @@ const bs = v.xml, Bs = {
|
|
|
8237
8255
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8238
8256
|
this.removeInput("ADD" + t);
|
|
8239
8257
|
}
|
|
8240
|
-
},
|
|
8241
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8258
|
+
}, xs = function() {
|
|
8259
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new fe.MutatorIcon(["text_join_item_v1"], this));
|
|
8242
8260
|
};
|
|
8243
8261
|
R.registerMutator(
|
|
8244
8262
|
"text_join_mutator_v1",
|
|
8245
|
-
|
|
8246
|
-
|
|
8263
|
+
Vs,
|
|
8264
|
+
xs
|
|
8247
8265
|
);
|
|
8248
8266
|
h([
|
|
8249
8267
|
{
|
|
@@ -8286,11 +8304,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8286
8304
|
return ["''", c.ATOMIC];
|
|
8287
8305
|
case 1: {
|
|
8288
8306
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8289
|
-
return
|
|
8307
|
+
return Xe(n);
|
|
8290
8308
|
}
|
|
8291
8309
|
case 2: {
|
|
8292
8310
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8293
|
-
return [
|
|
8311
|
+
return [Xe(n)[0] + " + " + Xe(o)[0], c.ADDITION];
|
|
8294
8312
|
}
|
|
8295
8313
|
default: {
|
|
8296
8314
|
const n = new Array(e.itemCount_);
|
|
@@ -8475,7 +8493,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8475
8493
|
}[t.getFieldValue("MODE")];
|
|
8476
8494
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8477
8495
|
};
|
|
8478
|
-
const
|
|
8496
|
+
const Fs = {
|
|
8479
8497
|
init: function() {
|
|
8480
8498
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
8481
8499
|
},
|
|
@@ -8500,7 +8518,7 @@ const Ds = {
|
|
|
8500
8518
|
));
|
|
8501
8519
|
}
|
|
8502
8520
|
};
|
|
8503
|
-
d.create_timer_v1 =
|
|
8521
|
+
d.create_timer_v1 = Fs;
|
|
8504
8522
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8505
8523
|
const e = s.valueToCode(t, "INTERVAL", c.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", c.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", c.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", c.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
|
|
8506
8524
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8529,18 +8547,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8529
8547
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8530
8548
|
`;
|
|
8531
8549
|
};
|
|
8532
|
-
const
|
|
8550
|
+
const Ys = {
|
|
8533
8551
|
customContextMenu: function(t) {
|
|
8534
8552
|
if (this.isInFlyout) {
|
|
8535
8553
|
if (this.type === "variable_get_v1") {
|
|
8536
8554
|
const e = {
|
|
8537
8555
|
text: _.RENAME_VARIABLE,
|
|
8538
8556
|
enabled: !0,
|
|
8539
|
-
callback:
|
|
8557
|
+
callback: ws(this)
|
|
8540
8558
|
}, n = this.getField("VAR").getText(), o = {
|
|
8541
8559
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8542
8560
|
enabled: !0,
|
|
8543
|
-
callback:
|
|
8561
|
+
callback: Ks(this)
|
|
8544
8562
|
};
|
|
8545
8563
|
t.unshift(e), t.unshift(o);
|
|
8546
8564
|
}
|
|
@@ -8554,24 +8572,24 @@ const Us = {
|
|
|
8554
8572
|
t.push({
|
|
8555
8573
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8556
8574
|
text: n.replace("%1", o.getText()),
|
|
8557
|
-
callback:
|
|
8575
|
+
callback: dn.callbackFactory(this, i)
|
|
8558
8576
|
});
|
|
8559
8577
|
}
|
|
8560
8578
|
}
|
|
8561
|
-
},
|
|
8579
|
+
}, ws = function(t) {
|
|
8562
8580
|
return function() {
|
|
8563
8581
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8564
|
-
|
|
8582
|
+
Te.renameVariable(e, o);
|
|
8565
8583
|
};
|
|
8566
|
-
},
|
|
8584
|
+
}, Ks = function(t) {
|
|
8567
8585
|
return function() {
|
|
8568
8586
|
const n = t.getField("VAR").getVariable();
|
|
8569
|
-
n &&
|
|
8587
|
+
n && Te.deleteVariable(n.getWorkspace(), n, t);
|
|
8570
8588
|
};
|
|
8571
8589
|
};
|
|
8572
8590
|
R.registerMixin(
|
|
8573
8591
|
"context_menu_variable_v1",
|
|
8574
|
-
|
|
8592
|
+
Ys
|
|
8575
8593
|
);
|
|
8576
8594
|
h([
|
|
8577
8595
|
{
|
|
@@ -8627,34 +8645,34 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8627
8645
|
return `${e} = ${n};
|
|
8628
8646
|
`;
|
|
8629
8647
|
};
|
|
8630
|
-
const
|
|
8631
|
-
function
|
|
8648
|
+
const He = v.xml;
|
|
8649
|
+
function $s() {
|
|
8632
8650
|
const t = [];
|
|
8633
8651
|
{
|
|
8634
|
-
const e =
|
|
8652
|
+
const e = He.createElement("label");
|
|
8635
8653
|
e.setAttribute("text", _.LABEL_ASSET_LAYER), t.push(e);
|
|
8636
8654
|
}
|
|
8637
8655
|
{
|
|
8638
|
-
const e =
|
|
8656
|
+
const e = He.createElement("block");
|
|
8639
8657
|
e.setAttribute("type", "upload_resource_v1"), t.push(e);
|
|
8640
8658
|
}
|
|
8641
8659
|
{
|
|
8642
|
-
const e =
|
|
8660
|
+
const e = He.createElement("label");
|
|
8643
8661
|
e.setAttribute("text", _.LABEL_COMPUTE_LAYER), t.push(e);
|
|
8644
8662
|
}
|
|
8645
8663
|
{
|
|
8646
|
-
const e =
|
|
8664
|
+
const e = He.createElement("block");
|
|
8647
8665
|
e.setAttribute("type", "call_func_v1"), t.push(e);
|
|
8648
8666
|
}
|
|
8649
8667
|
return t;
|
|
8650
8668
|
}
|
|
8651
|
-
const
|
|
8669
|
+
const et = {
|
|
8652
8670
|
name: "INTERFACE_CATEGORY",
|
|
8653
|
-
callback:
|
|
8671
|
+
callback: $s
|
|
8654
8672
|
}, b = v.xml;
|
|
8655
|
-
function
|
|
8673
|
+
function Hs() {
|
|
8656
8674
|
const t = [];
|
|
8657
|
-
if (
|
|
8675
|
+
if (ei()) {
|
|
8658
8676
|
{
|
|
8659
8677
|
const e = b.createElement("label");
|
|
8660
8678
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
@@ -8664,12 +8682,12 @@ function xs() {
|
|
|
8664
8682
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8665
8683
|
}
|
|
8666
8684
|
}
|
|
8667
|
-
if (
|
|
8685
|
+
if (Go()) {
|
|
8668
8686
|
{
|
|
8669
8687
|
const e = b.createElement("label");
|
|
8670
8688
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
8671
8689
|
}
|
|
8672
|
-
if (
|
|
8690
|
+
if (Me().length > 0) {
|
|
8673
8691
|
{
|
|
8674
8692
|
const e = b.createElement("block");
|
|
8675
8693
|
e.setAttribute("type", "comp_method_impl_v1"), t.push(e);
|
|
@@ -8679,7 +8697,7 @@ function xs() {
|
|
|
8679
8697
|
e.setAttribute("type", "set_comp_method_output_v1"), t.push(e);
|
|
8680
8698
|
}
|
|
8681
8699
|
}
|
|
8682
|
-
if (
|
|
8700
|
+
if (Me().length > 0) {
|
|
8683
8701
|
const e = b.createElement("block");
|
|
8684
8702
|
e.setAttribute("type", "trigger_comp_event_v1"), t.push(e);
|
|
8685
8703
|
}
|
|
@@ -8746,23 +8764,23 @@ function xs() {
|
|
|
8746
8764
|
}
|
|
8747
8765
|
return t;
|
|
8748
8766
|
}
|
|
8749
|
-
const
|
|
8767
|
+
const tt = {
|
|
8750
8768
|
name: "UI_CATEGORY",
|
|
8751
|
-
callback:
|
|
8752
|
-
},
|
|
8753
|
-
function
|
|
8769
|
+
callback: Hs
|
|
8770
|
+
}, ye = v.xml;
|
|
8771
|
+
function Gs() {
|
|
8754
8772
|
const t = [];
|
|
8755
8773
|
{
|
|
8756
|
-
const e =
|
|
8774
|
+
const e = ye.createElement("label");
|
|
8757
8775
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8758
8776
|
}
|
|
8759
8777
|
{
|
|
8760
|
-
const e =
|
|
8778
|
+
const e = ye.createElement("block");
|
|
8761
8779
|
e.setAttribute("type", "procedure_def_v1");
|
|
8762
8780
|
{
|
|
8763
|
-
const n =
|
|
8781
|
+
const n = ye.createElement("field");
|
|
8764
8782
|
n.setAttribute("name", "NAME");
|
|
8765
|
-
const o =
|
|
8783
|
+
const o = ye.createTextNode(
|
|
8766
8784
|
_.PROCEDURE_DEFAULT_NAME
|
|
8767
8785
|
);
|
|
8768
8786
|
n.appendChild(o), e.appendChild(n);
|
|
@@ -8770,19 +8788,19 @@ function Fs() {
|
|
|
8770
8788
|
t.push(e);
|
|
8771
8789
|
}
|
|
8772
8790
|
{
|
|
8773
|
-
const e =
|
|
8791
|
+
const e = ye.createElement("block");
|
|
8774
8792
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8775
8793
|
}
|
|
8776
8794
|
return t;
|
|
8777
8795
|
}
|
|
8778
8796
|
const ce = {
|
|
8779
8797
|
name: "PROCEDURE_CATEGORY",
|
|
8780
|
-
callback:
|
|
8781
|
-
},
|
|
8782
|
-
function
|
|
8783
|
-
const t =
|
|
8798
|
+
callback: Gs
|
|
8799
|
+
}, Ge = v.xml;
|
|
8800
|
+
function Ws() {
|
|
8801
|
+
const t = Ve(), e = [];
|
|
8784
8802
|
{
|
|
8785
|
-
const o =
|
|
8803
|
+
const o = Ge.createElement("label");
|
|
8786
8804
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8787
8805
|
}
|
|
8788
8806
|
{
|
|
@@ -8790,7 +8808,7 @@ function ws() {
|
|
|
8790
8808
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
8791
8809
|
"CREATE_VARIABLE",
|
|
8792
8810
|
function(i) {
|
|
8793
|
-
|
|
8811
|
+
Te.createVariableButtonHandler(
|
|
8794
8812
|
i.getTargetWorkspace()
|
|
8795
8813
|
);
|
|
8796
8814
|
}
|
|
@@ -8799,44 +8817,44 @@ function ws() {
|
|
|
8799
8817
|
const n = t.getVariablesOfType("");
|
|
8800
8818
|
if (n.length <= 0)
|
|
8801
8819
|
return e;
|
|
8802
|
-
n.sort(
|
|
8820
|
+
n.sort(Te.compareByName);
|
|
8803
8821
|
{
|
|
8804
|
-
const o =
|
|
8822
|
+
const o = Ge.createElement("label");
|
|
8805
8823
|
o.setAttribute("text", _.LABEL_CREATED), e.push(o);
|
|
8806
8824
|
}
|
|
8807
8825
|
return n.forEach((o) => {
|
|
8808
8826
|
{
|
|
8809
|
-
const i =
|
|
8810
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
8827
|
+
const i = Ge.createElement("block");
|
|
8828
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8811
8829
|
}
|
|
8812
8830
|
{
|
|
8813
|
-
const i =
|
|
8814
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
8831
|
+
const i = Ge.createElement("block");
|
|
8832
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8815
8833
|
}
|
|
8816
8834
|
}), e;
|
|
8817
8835
|
}
|
|
8818
8836
|
const le = {
|
|
8819
8837
|
name: "VARIABLE_CATEGORY",
|
|
8820
|
-
callback:
|
|
8821
|
-
},
|
|
8822
|
-
function
|
|
8838
|
+
callback: Ws
|
|
8839
|
+
}, me = v.xml;
|
|
8840
|
+
function js(t) {
|
|
8823
8841
|
const e = [];
|
|
8824
8842
|
if (t === "flow") {
|
|
8825
8843
|
{
|
|
8826
|
-
const n =
|
|
8844
|
+
const n = me.createElement("block");
|
|
8827
8845
|
n.setAttribute("type", "on_flow_state_event_v1"), e.push(n);
|
|
8828
8846
|
}
|
|
8829
8847
|
{
|
|
8830
|
-
const n =
|
|
8848
|
+
const n = me.createElement("block");
|
|
8831
8849
|
n.setAttribute("type", "compute_debug_trace_v1");
|
|
8832
8850
|
{
|
|
8833
|
-
const o =
|
|
8851
|
+
const o = me.createElement("value");
|
|
8834
8852
|
o.setAttribute("name", "OBJECT");
|
|
8835
8853
|
{
|
|
8836
|
-
const i =
|
|
8854
|
+
const i = me.createElement("shadow");
|
|
8837
8855
|
i.setAttribute("type", "text_v1");
|
|
8838
8856
|
{
|
|
8839
|
-
const a =
|
|
8857
|
+
const a = me.createElement("field");
|
|
8840
8858
|
a.setAttribute("name", "TEXT"), i.appendChild(a);
|
|
8841
8859
|
}
|
|
8842
8860
|
o.appendChild(i);
|
|
@@ -8846,19 +8864,19 @@ function Ys(t) {
|
|
|
8846
8864
|
e.push(n);
|
|
8847
8865
|
}
|
|
8848
8866
|
} else if (t === "func") {
|
|
8849
|
-
if (
|
|
8850
|
-
const n =
|
|
8867
|
+
if (Oe().length > 0) {
|
|
8868
|
+
const n = me.createElement("block");
|
|
8851
8869
|
n.setAttribute("type", "call_func_internal_v1"), e.push(n);
|
|
8852
8870
|
}
|
|
8853
8871
|
} else
|
|
8854
8872
|
console.assert(!1);
|
|
8855
8873
|
return e;
|
|
8856
8874
|
}
|
|
8857
|
-
const
|
|
8875
|
+
const nt = {
|
|
8858
8876
|
name: "FLOW_CATEGORY",
|
|
8859
|
-
callback:
|
|
8877
|
+
callback: js
|
|
8860
8878
|
}, ne = v.xml;
|
|
8861
|
-
function
|
|
8879
|
+
function Xs(t) {
|
|
8862
8880
|
const { activeFunc: e } = T.compute, n = [];
|
|
8863
8881
|
if (t === "func") {
|
|
8864
8882
|
{
|
|
@@ -8873,7 +8891,7 @@ function Ks(t) {
|
|
|
8873
8891
|
const o = ne.createElement("block");
|
|
8874
8892
|
o.setAttribute("type", "procedure_return_v1"), n.push(o);
|
|
8875
8893
|
}
|
|
8876
|
-
if (
|
|
8894
|
+
if (Oe().length > 0) {
|
|
8877
8895
|
const o = ne.createElement("block");
|
|
8878
8896
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8879
8897
|
}
|
|
@@ -8897,7 +8915,7 @@ function Ks(t) {
|
|
|
8897
8915
|
n.push(o);
|
|
8898
8916
|
}
|
|
8899
8917
|
} else if (t === "flow") {
|
|
8900
|
-
if (
|
|
8918
|
+
if (Oe().length > 0) {
|
|
8901
8919
|
const o = ne.createElement("block");
|
|
8902
8920
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8903
8921
|
}
|
|
@@ -8905,11 +8923,11 @@ function Ks(t) {
|
|
|
8905
8923
|
console.assert(!1);
|
|
8906
8924
|
return n;
|
|
8907
8925
|
}
|
|
8908
|
-
const
|
|
8926
|
+
const ot = {
|
|
8909
8927
|
name: "FUNC_CATEGORY",
|
|
8910
|
-
callback:
|
|
8928
|
+
callback: Xs
|
|
8911
8929
|
}, O = v.xml;
|
|
8912
|
-
function
|
|
8930
|
+
function Js() {
|
|
8913
8931
|
const t = [];
|
|
8914
8932
|
if (J().length > 0) {
|
|
8915
8933
|
{
|
|
@@ -9082,18 +9100,18 @@ function $s() {
|
|
|
9082
9100
|
}
|
|
9083
9101
|
return t;
|
|
9084
9102
|
}
|
|
9085
|
-
const
|
|
9103
|
+
const it = {
|
|
9086
9104
|
name: "DATA_CATEGORY",
|
|
9087
|
-
callback:
|
|
9105
|
+
callback: Js
|
|
9088
9106
|
};
|
|
9089
|
-
|
|
9107
|
+
fn.setConfirm(async (t, e) => {
|
|
9090
9108
|
const n = await No({
|
|
9091
9109
|
title: "",
|
|
9092
9110
|
text: t
|
|
9093
9111
|
});
|
|
9094
9112
|
e(!!n);
|
|
9095
9113
|
});
|
|
9096
|
-
|
|
9114
|
+
fn.setPrompt(async (t, e, n) => {
|
|
9097
9115
|
const o = await Lo({
|
|
9098
9116
|
title: "",
|
|
9099
9117
|
value: e
|
|
@@ -9106,12 +9124,12 @@ const Vn = (t, e, n) => {
|
|
|
9106
9124
|
(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." : ""))));
|
|
9107
9125
|
});
|
|
9108
9126
|
};
|
|
9109
|
-
async function
|
|
9127
|
+
async function un(t) {
|
|
9110
9128
|
const e = await Vn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.k914lhgs.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ib2kecyn.js") }), `./msg/${t}.ts`, 3);
|
|
9111
9129
|
ro(e.default);
|
|
9112
9130
|
}
|
|
9113
9131
|
function Wt(t) {
|
|
9114
|
-
const e =
|
|
9132
|
+
const e = Ve();
|
|
9115
9133
|
if (!e)
|
|
9116
9134
|
return;
|
|
9117
9135
|
const n = e.getBlockById(t);
|
|
@@ -9124,7 +9142,7 @@ function Wt(t) {
|
|
|
9124
9142
|
e.scroll(-a, -l);
|
|
9125
9143
|
}
|
|
9126
9144
|
function xn() {
|
|
9127
|
-
const t =
|
|
9145
|
+
const t = Ve();
|
|
9128
9146
|
if (!t)
|
|
9129
9147
|
return;
|
|
9130
9148
|
const e = t.getTopBlocks(!0)?.[0];
|
|
@@ -9134,7 +9152,7 @@ function Fn(t) {
|
|
|
9134
9152
|
const e = t.getParent();
|
|
9135
9153
|
return e && Fn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9136
9154
|
}
|
|
9137
|
-
class
|
|
9155
|
+
class qs {
|
|
9138
9156
|
init() {
|
|
9139
9157
|
const e = _o.registry.getItem("blockDisable");
|
|
9140
9158
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9145,11 +9163,11 @@ class Hs {
|
|
|
9145
9163
|
}
|
|
9146
9164
|
po.registerFieldColour();
|
|
9147
9165
|
ho.registry.unregister(fo.names.ESCAPE);
|
|
9148
|
-
const
|
|
9149
|
-
|
|
9150
|
-
const
|
|
9151
|
-
|
|
9152
|
-
|
|
9166
|
+
const Qs = new mo.CrossTabCopyPaste();
|
|
9167
|
+
Qs.init({ contextMenu: !0, shortcut: !0 });
|
|
9168
|
+
const zs = new qs();
|
|
9169
|
+
zs.init();
|
|
9170
|
+
at.Classic.blockStyles = {
|
|
9153
9171
|
color_blocks: {
|
|
9154
9172
|
colourPrimary: "#a5745b",
|
|
9155
9173
|
colourSecondary: "#ede3de",
|
|
@@ -9223,7 +9241,7 @@ ct.Classic.blockStyles = {
|
|
|
9223
9241
|
hat: ""
|
|
9224
9242
|
}
|
|
9225
9243
|
};
|
|
9226
|
-
|
|
9244
|
+
at.Classic.categoryStyles = {
|
|
9227
9245
|
calc_category: {
|
|
9228
9246
|
colour: "#757575"
|
|
9229
9247
|
},
|
|
@@ -9279,9 +9297,9 @@ ct.Classic.categoryStyles = {
|
|
|
9279
9297
|
colour: "#a55b80"
|
|
9280
9298
|
}
|
|
9281
9299
|
};
|
|
9282
|
-
const
|
|
9300
|
+
const Zs = mn.defineTheme("light", {
|
|
9283
9301
|
name: "light",
|
|
9284
|
-
base:
|
|
9302
|
+
base: at.Classic,
|
|
9285
9303
|
componentStyles: {
|
|
9286
9304
|
workspaceBackgroundColour: "#ffffff",
|
|
9287
9305
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9295,9 +9313,9 @@ const js = Tn.defineTheme("light", {
|
|
|
9295
9313
|
scrollbarOpacity: 0.4,
|
|
9296
9314
|
cursorColour: ""
|
|
9297
9315
|
}
|
|
9298
|
-
}),
|
|
9316
|
+
}), ea = mn.defineTheme("dark", {
|
|
9299
9317
|
name: "dark",
|
|
9300
|
-
base:
|
|
9318
|
+
base: at.Classic,
|
|
9301
9319
|
componentStyles: {
|
|
9302
9320
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9303
9321
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9312,18 +9330,18 @@ const js = Tn.defineTheme("light", {
|
|
|
9312
9330
|
cursorColour: ""
|
|
9313
9331
|
}
|
|
9314
9332
|
});
|
|
9315
|
-
function
|
|
9316
|
-
const e =
|
|
9333
|
+
function ta(t) {
|
|
9334
|
+
const e = Ve();
|
|
9317
9335
|
switch (t) {
|
|
9318
9336
|
case "light":
|
|
9319
|
-
e.setTheme(
|
|
9337
|
+
e.setTheme(Zs);
|
|
9320
9338
|
break;
|
|
9321
9339
|
case "dark":
|
|
9322
|
-
e.setTheme(
|
|
9340
|
+
e.setTheme(ea);
|
|
9323
9341
|
break;
|
|
9324
9342
|
}
|
|
9325
9343
|
}
|
|
9326
|
-
const
|
|
9344
|
+
const _t = {
|
|
9327
9345
|
kind: "category",
|
|
9328
9346
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9329
9347
|
categorystyle: "color_category",
|
|
@@ -9397,7 +9415,7 @@ const ht = {
|
|
|
9397
9415
|
}
|
|
9398
9416
|
}
|
|
9399
9417
|
]
|
|
9400
|
-
},
|
|
9418
|
+
}, pt = {
|
|
9401
9419
|
kind: "category",
|
|
9402
9420
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9403
9421
|
categorystyle: "list_category",
|
|
@@ -9512,7 +9530,7 @@ const ht = {
|
|
|
9512
9530
|
type: "list_reverse_v1"
|
|
9513
9531
|
}
|
|
9514
9532
|
]
|
|
9515
|
-
},
|
|
9533
|
+
}, ht = {
|
|
9516
9534
|
kind: "category",
|
|
9517
9535
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9518
9536
|
categorystyle: "logic_category",
|
|
@@ -9554,7 +9572,7 @@ const ht = {
|
|
|
9554
9572
|
type: "logic_ternary_v1"
|
|
9555
9573
|
}
|
|
9556
9574
|
]
|
|
9557
|
-
},
|
|
9575
|
+
}, dt = {
|
|
9558
9576
|
kind: "category",
|
|
9559
9577
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9560
9578
|
categorystyle: "loop_category",
|
|
@@ -9616,7 +9634,7 @@ const ht = {
|
|
|
9616
9634
|
type: "flow_control_v1"
|
|
9617
9635
|
}
|
|
9618
9636
|
]
|
|
9619
|
-
},
|
|
9637
|
+
}, ft = {
|
|
9620
9638
|
kind: "category",
|
|
9621
9639
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9622
9640
|
categorystyle: "math_category",
|
|
@@ -9771,7 +9789,7 @@ const ht = {
|
|
|
9771
9789
|
type: "math_on_list_v1"
|
|
9772
9790
|
}
|
|
9773
9791
|
]
|
|
9774
|
-
},
|
|
9792
|
+
}, Yn = {
|
|
9775
9793
|
kind: "category",
|
|
9776
9794
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9777
9795
|
categorystyle: "message_category",
|
|
@@ -9807,7 +9825,7 @@ const ht = {
|
|
|
9807
9825
|
type: "open_prompt_dlg_v1"
|
|
9808
9826
|
}
|
|
9809
9827
|
]
|
|
9810
|
-
},
|
|
9828
|
+
}, mt = {
|
|
9811
9829
|
kind: "category",
|
|
9812
9830
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9813
9831
|
categorystyle: "object_category",
|
|
@@ -9875,7 +9893,7 @@ const ht = {
|
|
|
9875
9893
|
}
|
|
9876
9894
|
}
|
|
9877
9895
|
]
|
|
9878
|
-
},
|
|
9896
|
+
}, Tt = {
|
|
9879
9897
|
kind: "category",
|
|
9880
9898
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9881
9899
|
categorystyle: "text_category",
|
|
@@ -10038,7 +10056,7 @@ const ht = {
|
|
|
10038
10056
|
type: "text_reverse_v1"
|
|
10039
10057
|
}
|
|
10040
10058
|
]
|
|
10041
|
-
},
|
|
10059
|
+
}, wn = {
|
|
10042
10060
|
kind: "category",
|
|
10043
10061
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10044
10062
|
categorystyle: "time_category",
|
|
@@ -10062,24 +10080,24 @@ const ht = {
|
|
|
10062
10080
|
}
|
|
10063
10081
|
}
|
|
10064
10082
|
]
|
|
10065
|
-
},
|
|
10083
|
+
}, na = {
|
|
10066
10084
|
kind: "categoryToolbox",
|
|
10067
10085
|
contents: [
|
|
10068
10086
|
{
|
|
10069
10087
|
kind: "category",
|
|
10070
10088
|
name: "%{BKY_CATEGORY_UI}",
|
|
10071
10089
|
categorystyle: "ui_category",
|
|
10072
|
-
custom:
|
|
10090
|
+
custom: tt.name
|
|
10073
10091
|
},
|
|
10074
|
-
|
|
10075
|
-
mt,
|
|
10076
|
-
ft,
|
|
10077
|
-
Tt,
|
|
10078
|
-
gt,
|
|
10092
|
+
Yn,
|
|
10079
10093
|
dt,
|
|
10080
|
-
Et,
|
|
10081
10094
|
ht,
|
|
10082
|
-
|
|
10095
|
+
ft,
|
|
10096
|
+
Tt,
|
|
10097
|
+
pt,
|
|
10098
|
+
mt,
|
|
10099
|
+
_t,
|
|
10100
|
+
wn,
|
|
10083
10101
|
{
|
|
10084
10102
|
kind: "category",
|
|
10085
10103
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10096,37 +10114,37 @@ const ht = {
|
|
|
10096
10114
|
kind: "category",
|
|
10097
10115
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10098
10116
|
categorystyle: "interface_category",
|
|
10099
|
-
custom:
|
|
10117
|
+
custom: et.name
|
|
10100
10118
|
}
|
|
10101
10119
|
]
|
|
10102
|
-
},
|
|
10120
|
+
}, oa = {
|
|
10103
10121
|
kind: "categoryToolbox",
|
|
10104
10122
|
contents: [
|
|
10105
10123
|
{
|
|
10106
10124
|
kind: "category",
|
|
10107
10125
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10108
10126
|
categorystyle: "func_category",
|
|
10109
|
-
custom:
|
|
10127
|
+
custom: ot.name
|
|
10110
10128
|
},
|
|
10111
10129
|
{
|
|
10112
10130
|
kind: "category",
|
|
10113
10131
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10114
10132
|
categorystyle: "flow_category",
|
|
10115
|
-
custom:
|
|
10133
|
+
custom: nt.name
|
|
10116
10134
|
},
|
|
10117
10135
|
{
|
|
10118
10136
|
kind: "category",
|
|
10119
10137
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10120
10138
|
categorystyle: "data_category",
|
|
10121
|
-
custom:
|
|
10139
|
+
custom: it.name
|
|
10122
10140
|
},
|
|
10123
|
-
mt,
|
|
10124
|
-
ft,
|
|
10125
|
-
Tt,
|
|
10126
|
-
gt,
|
|
10127
10141
|
dt,
|
|
10128
|
-
Et,
|
|
10129
10142
|
ht,
|
|
10143
|
+
ft,
|
|
10144
|
+
Tt,
|
|
10145
|
+
pt,
|
|
10146
|
+
mt,
|
|
10147
|
+
_t,
|
|
10130
10148
|
{
|
|
10131
10149
|
kind: "category",
|
|
10132
10150
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10140,34 +10158,34 @@ const ht = {
|
|
|
10140
10158
|
custom: ce.name
|
|
10141
10159
|
}
|
|
10142
10160
|
]
|
|
10143
|
-
},
|
|
10161
|
+
}, ia = {
|
|
10144
10162
|
kind: "categoryToolbox",
|
|
10145
10163
|
contents: [
|
|
10146
10164
|
{
|
|
10147
10165
|
kind: "category",
|
|
10148
10166
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10149
10167
|
categorystyle: "func_category",
|
|
10150
|
-
custom:
|
|
10168
|
+
custom: ot.name
|
|
10151
10169
|
},
|
|
10152
10170
|
{
|
|
10153
10171
|
kind: "category",
|
|
10154
10172
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10155
10173
|
categorystyle: "flow_category",
|
|
10156
|
-
custom:
|
|
10174
|
+
custom: nt.name
|
|
10157
10175
|
},
|
|
10158
10176
|
{
|
|
10159
10177
|
kind: "category",
|
|
10160
10178
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10161
10179
|
categorystyle: "data_category",
|
|
10162
|
-
custom:
|
|
10180
|
+
custom: it.name
|
|
10163
10181
|
},
|
|
10164
|
-
mt,
|
|
10165
|
-
ft,
|
|
10166
|
-
Tt,
|
|
10167
|
-
gt,
|
|
10168
10182
|
dt,
|
|
10169
|
-
Et,
|
|
10170
10183
|
ht,
|
|
10184
|
+
ft,
|
|
10185
|
+
Tt,
|
|
10186
|
+
pt,
|
|
10187
|
+
mt,
|
|
10188
|
+
_t,
|
|
10171
10189
|
{
|
|
10172
10190
|
kind: "category",
|
|
10173
10191
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10181,7 +10199,7 @@ const ht = {
|
|
|
10181
10199
|
custom: ce.name
|
|
10182
10200
|
}
|
|
10183
10201
|
]
|
|
10184
|
-
},
|
|
10202
|
+
}, sa = {
|
|
10185
10203
|
kind: "categoryToolbox",
|
|
10186
10204
|
contents: [
|
|
10187
10205
|
{
|
|
@@ -10212,24 +10230,24 @@ const ht = {
|
|
|
10212
10230
|
]
|
|
10213
10231
|
}
|
|
10214
10232
|
]
|
|
10215
|
-
},
|
|
10233
|
+
}, aa = {
|
|
10216
10234
|
kind: "categoryToolbox",
|
|
10217
10235
|
contents: [
|
|
10218
10236
|
{
|
|
10219
10237
|
kind: "category",
|
|
10220
10238
|
name: "%{BKY_CATEGORY_UI}",
|
|
10221
10239
|
categorystyle: "ui_category",
|
|
10222
|
-
custom:
|
|
10240
|
+
custom: tt.name
|
|
10223
10241
|
},
|
|
10224
|
-
|
|
10225
|
-
mt,
|
|
10226
|
-
ft,
|
|
10227
|
-
Tt,
|
|
10228
|
-
gt,
|
|
10242
|
+
Yn,
|
|
10229
10243
|
dt,
|
|
10230
|
-
Et,
|
|
10231
10244
|
ht,
|
|
10232
|
-
|
|
10245
|
+
ft,
|
|
10246
|
+
Tt,
|
|
10247
|
+
pt,
|
|
10248
|
+
mt,
|
|
10249
|
+
_t,
|
|
10250
|
+
wn,
|
|
10233
10251
|
{
|
|
10234
10252
|
kind: "category",
|
|
10235
10253
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10246,29 +10264,29 @@ const ht = {
|
|
|
10246
10264
|
kind: "category",
|
|
10247
10265
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10248
10266
|
categorystyle: "interface_category",
|
|
10249
|
-
custom:
|
|
10267
|
+
custom: et.name
|
|
10250
10268
|
}
|
|
10251
10269
|
]
|
|
10252
10270
|
}, Kn = Symbol();
|
|
10253
|
-
function
|
|
10271
|
+
function ca(t) {
|
|
10254
10272
|
Zn(Kn, t);
|
|
10255
10273
|
}
|
|
10256
10274
|
function jt() {
|
|
10257
10275
|
return eo(Kn);
|
|
10258
10276
|
}
|
|
10259
|
-
const
|
|
10277
|
+
const la = /* @__PURE__ */ oe({
|
|
10260
10278
|
__name: "index",
|
|
10261
10279
|
props: {
|
|
10262
10280
|
lock: { type: Boolean }
|
|
10263
10281
|
},
|
|
10264
10282
|
setup(t, { expose: e }) {
|
|
10265
|
-
const { t: n } =
|
|
10283
|
+
const { t: n } = Fe(), o = t, i = jt(), a = () => {
|
|
10266
10284
|
if (!i.workspace) {
|
|
10267
10285
|
console.assert(!1);
|
|
10268
10286
|
return;
|
|
10269
10287
|
}
|
|
10270
10288
|
if (o.lock) {
|
|
10271
|
-
|
|
10289
|
+
En(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10272
10290
|
return;
|
|
10273
10291
|
}
|
|
10274
10292
|
i.workspace.cleanUp();
|
|
@@ -10281,7 +10299,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10281
10299
|
text: P(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10282
10300
|
}, {
|
|
10283
10301
|
activator: ee(({ props: A }) => [
|
|
10284
|
-
B(p,
|
|
10302
|
+
B(p, wt(A, {
|
|
10285
10303
|
density: "comfortable",
|
|
10286
10304
|
icon: "mdi-broom",
|
|
10287
10305
|
variant: "outlined",
|
|
@@ -10292,7 +10310,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10292
10310
|
}, 8, ["text"]);
|
|
10293
10311
|
};
|
|
10294
10312
|
}
|
|
10295
|
-
}),
|
|
10313
|
+
}), ua = /* @__PURE__ */ oe({
|
|
10296
10314
|
__name: "index",
|
|
10297
10315
|
props: {
|
|
10298
10316
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10300,14 +10318,14 @@ const na = /* @__PURE__ */ oe({
|
|
|
10300
10318
|
},
|
|
10301
10319
|
emits: ["update:modelValue"],
|
|
10302
10320
|
setup(t) {
|
|
10303
|
-
const { t: e } =
|
|
10321
|
+
const { t: e } = Fe(), n = Be(t, "modelValue");
|
|
10304
10322
|
return (o, i) => {
|
|
10305
10323
|
const a = V("v-btn"), l = V("v-tooltip");
|
|
10306
10324
|
return D(), Z(l, {
|
|
10307
10325
|
text: P(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10308
10326
|
}, {
|
|
10309
10327
|
activator: ee(({ props: u }) => [
|
|
10310
|
-
B(a,
|
|
10328
|
+
B(a, wt(u, {
|
|
10311
10329
|
density: "comfortable",
|
|
10312
10330
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10313
10331
|
variant: "outlined",
|
|
@@ -10318,7 +10336,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10318
10336
|
}, 8, ["text"]);
|
|
10319
10337
|
};
|
|
10320
10338
|
}
|
|
10321
|
-
}),
|
|
10339
|
+
}), ra = { class: "text-subtitle-1 ml-6" }, _a = /* @__PURE__ */ oe({
|
|
10322
10340
|
__name: "item",
|
|
10323
10341
|
props: {
|
|
10324
10342
|
id: {},
|
|
@@ -10327,7 +10345,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10327
10345
|
},
|
|
10328
10346
|
emits: ["x-click"],
|
|
10329
10347
|
setup(t, { emit: e }) {
|
|
10330
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } =
|
|
10348
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = xe(), a = t, l = e, u = Ee(!1), r = K(() => ({
|
|
10331
10349
|
position: "relative",
|
|
10332
10350
|
background: u.value ? i.value : o.value,
|
|
10333
10351
|
height: "48px",
|
|
@@ -10352,12 +10370,12 @@ const na = /* @__PURE__ */ oe({
|
|
|
10352
10370
|
onMouseout: A[2] || (A[2] = (M) => u.value = !1),
|
|
10353
10371
|
onMouseover: A[3] || (A[3] = (M) => u.value = !0)
|
|
10354
10372
|
}, [
|
|
10355
|
-
j("span",
|
|
10373
|
+
j("span", ra, st(a.title), 1),
|
|
10356
10374
|
B(f),
|
|
10357
10375
|
B(C, {
|
|
10358
10376
|
class: "x-handle cursor-move mr-3",
|
|
10359
10377
|
icon: "mdi-drag-horizontal-variant",
|
|
10360
|
-
onMousedown: A[0] || (A[0] =
|
|
10378
|
+
onMousedown: A[0] || (A[0] = Ne(() => {
|
|
10361
10379
|
}, ["stop"]))
|
|
10362
10380
|
}),
|
|
10363
10381
|
j("div", {
|
|
@@ -10368,12 +10386,12 @@ const na = /* @__PURE__ */ oe({
|
|
|
10368
10386
|
]);
|
|
10369
10387
|
};
|
|
10370
10388
|
}
|
|
10371
|
-
}),
|
|
10389
|
+
}), pa = {
|
|
10372
10390
|
key: 1,
|
|
10373
10391
|
class: "text-caption text-grey"
|
|
10374
|
-
},
|
|
10392
|
+
}, ha = /* @__PURE__ */ oe({
|
|
10375
10393
|
__name: "index",
|
|
10376
|
-
props: /* @__PURE__ */
|
|
10394
|
+
props: /* @__PURE__ */ Lt({
|
|
10377
10395
|
lock: { type: Boolean }
|
|
10378
10396
|
}, {
|
|
10379
10397
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10381,7 +10399,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10381
10399
|
}),
|
|
10382
10400
|
emits: ["update:modelValue"],
|
|
10383
10401
|
setup(t, { expose: e }) {
|
|
10384
|
-
const { t: n } =
|
|
10402
|
+
const { t: n } = Fe(), o = Be(t, "modelValue"), i = jt(), a = Ee([]);
|
|
10385
10403
|
e({ update: () => {
|
|
10386
10404
|
if (!i.workspace) {
|
|
10387
10405
|
console.assert(!1);
|
|
@@ -10390,14 +10408,14 @@ const na = /* @__PURE__ */ oe({
|
|
|
10390
10408
|
const f = [];
|
|
10391
10409
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10392
10410
|
const M = g.id === Eo()?.id;
|
|
10393
|
-
let
|
|
10411
|
+
let w = "<n/a>";
|
|
10394
10412
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10395
|
-
const q = g,
|
|
10396
|
-
|
|
10397
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10413
|
+
const q = g, pe = x[q.node.key];
|
|
10414
|
+
pe && (w = n(pe.name), q.node.alias && (w += " / " + q.node.alias), w += " - " + _[q.event.name]);
|
|
10415
|
+
} else g.type.startsWith("func_entry_v") ? w = n("x-block-lib.funcEntry") : g.type.startsWith("procedure_def_v") ? (console.log(g), w = n("x-block-lib.procedure") + " - " + g.getFieldValue("NAME")) : w = n("x-block-lib.temporaryBlock");
|
|
10398
10416
|
f.push({
|
|
10399
10417
|
id: g.id,
|
|
10400
|
-
name:
|
|
10418
|
+
name: w,
|
|
10401
10419
|
select: M
|
|
10402
10420
|
});
|
|
10403
10421
|
}), a.value = f;
|
|
@@ -10405,7 +10423,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10405
10423
|
let u = [];
|
|
10406
10424
|
const r = () => {
|
|
10407
10425
|
if (t.lock) {
|
|
10408
|
-
|
|
10426
|
+
En(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10409
10427
|
return;
|
|
10410
10428
|
}
|
|
10411
10429
|
const f = [];
|
|
@@ -10432,19 +10450,19 @@ const na = /* @__PURE__ */ oe({
|
|
|
10432
10450
|
}
|
|
10433
10451
|
let M = "";
|
|
10434
10452
|
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10435
|
-
let
|
|
10436
|
-
M !== "" && (
|
|
10453
|
+
let w = -10;
|
|
10454
|
+
M !== "" && (w = i.workspace.getBlockById(
|
|
10437
10455
|
M
|
|
10438
10456
|
).getRelativeToSurfaceXY().y + 10);
|
|
10439
10457
|
const q = g.getRelativeToSurfaceXY();
|
|
10440
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10458
|
+
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(), xn();
|
|
10441
10459
|
}, A = async (f) => {
|
|
10442
10460
|
if (!i.workspace) {
|
|
10443
10461
|
console.assert(!1);
|
|
10444
10462
|
return;
|
|
10445
10463
|
}
|
|
10446
10464
|
const C = i.workspace.getBlockById(f);
|
|
10447
|
-
|
|
10465
|
+
Tn.setSelected(C), Wt(f), o.value = !1;
|
|
10448
10466
|
};
|
|
10449
10467
|
return (f, C) => a.value.length > 0 ? (D(), Z(P(To), {
|
|
10450
10468
|
key: 0,
|
|
@@ -10458,7 +10476,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10458
10476
|
onStart: r
|
|
10459
10477
|
}, {
|
|
10460
10478
|
default: ee(() => [
|
|
10461
|
-
(D(!0), Q(
|
|
10479
|
+
(D(!0), Q(rn, null, oo(a.value, (g) => (D(), Z(_a, {
|
|
10462
10480
|
id: g.id,
|
|
10463
10481
|
key: g.id,
|
|
10464
10482
|
select: g.select,
|
|
@@ -10467,14 +10485,14 @@ const na = /* @__PURE__ */ oe({
|
|
|
10467
10485
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10468
10486
|
]),
|
|
10469
10487
|
_: 1
|
|
10470
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10488
|
+
}, 8, ["modelValue"])) : (D(), Q("span", pa, st(P(n)("x-block-lib.noOption")), 1));
|
|
10471
10489
|
}
|
|
10472
|
-
}),
|
|
10490
|
+
}), da = (t, e) => {
|
|
10473
10491
|
const n = t.__vccOpts || t;
|
|
10474
10492
|
for (const [o, i] of e)
|
|
10475
10493
|
n[o] = i;
|
|
10476
10494
|
return n;
|
|
10477
|
-
},
|
|
10495
|
+
}, fa = /* @__PURE__ */ da(ha, [["__scopeId", "data-v-2ba1be08"]]), ma = /* @__PURE__ */ oe({
|
|
10478
10496
|
__name: "index",
|
|
10479
10497
|
props: {
|
|
10480
10498
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10482,7 +10500,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10482
10500
|
},
|
|
10483
10501
|
emits: ["update:modelValue"],
|
|
10484
10502
|
setup(t, { expose: e }) {
|
|
10485
|
-
const n =
|
|
10503
|
+
const n = Be(t, "modelValue"), o = jt();
|
|
10486
10504
|
e({ update: () => {
|
|
10487
10505
|
if (!o.workspace) {
|
|
10488
10506
|
console.assert(!1);
|
|
@@ -10490,26 +10508,26 @@ const na = /* @__PURE__ */ oe({
|
|
|
10490
10508
|
}
|
|
10491
10509
|
} });
|
|
10492
10510
|
const a = (l) => {
|
|
10493
|
-
const u =
|
|
10511
|
+
const u = Ve();
|
|
10494
10512
|
if (!u) {
|
|
10495
10513
|
console.assert(!1);
|
|
10496
10514
|
return;
|
|
10497
10515
|
}
|
|
10498
10516
|
const r = u.getBlockById(l);
|
|
10499
|
-
|
|
10517
|
+
Tn.setSelected(r), Wt(l), n.value = !1;
|
|
10500
10518
|
};
|
|
10501
10519
|
return (l, u) => (D(), Q("div", {
|
|
10502
10520
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10503
10521
|
}, "blockTree"));
|
|
10504
10522
|
}
|
|
10505
|
-
}),
|
|
10523
|
+
}), Ta = { class: "text-subtitle-1" }, Ea = /* @__PURE__ */ oe({
|
|
10506
10524
|
__name: "index",
|
|
10507
10525
|
props: {
|
|
10508
10526
|
type: {},
|
|
10509
10527
|
lock: { type: Boolean }
|
|
10510
10528
|
},
|
|
10511
10529
|
setup(t, { expose: e }) {
|
|
10512
|
-
const { t: n } =
|
|
10530
|
+
const { t: n } = Fe(), o = Bo(), { sysBarAvail: i } = gn(), { backgroundColor1: a } = xe(), l = K(() => {
|
|
10513
10531
|
let C = "100%";
|
|
10514
10532
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10515
10533
|
background: a.value,
|
|
@@ -10524,31 +10542,31 @@ const na = /* @__PURE__ */ oe({
|
|
|
10524
10542
|
};
|
|
10525
10543
|
}), r = K(() => ({
|
|
10526
10544
|
height: "60px"
|
|
10527
|
-
})), { open: p } =
|
|
10528
|
-
|
|
10545
|
+
})), { open: p } = $t(`blocklyNavigatorDlg${St()}`);
|
|
10546
|
+
_n(() => {
|
|
10529
10547
|
p.value = !1;
|
|
10530
10548
|
});
|
|
10531
|
-
const I =
|
|
10549
|
+
const I = Le("blockList"), A = Le("blockTree");
|
|
10532
10550
|
return e({ open: p, update: () => {
|
|
10533
10551
|
t.type === "list" ? I.value?.update() : t.type === "tree" && A.value?.update();
|
|
10534
10552
|
} }), (C, g) => {
|
|
10535
|
-
const M = V("v-sheet"),
|
|
10536
|
-
return D(), Q(
|
|
10537
|
-
B(
|
|
10553
|
+
const M = V("v-sheet"), w = V("v-btn"), q = V("v-spacer"), pe = V("v-dialog"), Et = V("v-tooltip");
|
|
10554
|
+
return D(), Q(rn, null, [
|
|
10555
|
+
B(pe, {
|
|
10538
10556
|
modelValue: P(p),
|
|
10539
|
-
"onUpdate:modelValue": g[5] || (g[5] = (G) =>
|
|
10557
|
+
"onUpdate:modelValue": g[5] || (g[5] = (G) => We(p) ? p.value = G : null),
|
|
10540
10558
|
eager: "",
|
|
10541
10559
|
fullscreen: "",
|
|
10542
10560
|
"no-click-animation": "",
|
|
10543
10561
|
persistent: "",
|
|
10544
10562
|
transition: "scroll-x-reverse-transition",
|
|
10545
|
-
onKeydown: g[6] || (g[6] =
|
|
10563
|
+
onKeydown: g[6] || (g[6] = pn(Ne((G) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10546
10564
|
}, {
|
|
10547
10565
|
default: ee(() => [
|
|
10548
10566
|
j("div", {
|
|
10549
10567
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10550
|
-
onClick: g[3] || (g[3] =
|
|
10551
|
-
onContextmenu: g[4] || (g[4] =
|
|
10568
|
+
onClick: g[3] || (g[3] = Ne((G) => p.value = !1, ["self"])),
|
|
10569
|
+
onContextmenu: g[4] || (g[4] = Ne((G) => p.value = !1, ["self", "prevent"]))
|
|
10552
10570
|
}, [
|
|
10553
10571
|
j("div", {
|
|
10554
10572
|
class: "elevation-2",
|
|
@@ -10558,20 +10576,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10558
10576
|
key: 0,
|
|
10559
10577
|
color: "transparent",
|
|
10560
10578
|
height: 24
|
|
10561
|
-
})) :
|
|
10579
|
+
})) : de("", !0),
|
|
10562
10580
|
B(M, {
|
|
10563
10581
|
class: "d-flex align-center px-2",
|
|
10564
10582
|
color: "transparent",
|
|
10565
10583
|
height: 48
|
|
10566
10584
|
}, {
|
|
10567
10585
|
default: ee(() => [
|
|
10568
|
-
B(
|
|
10586
|
+
B(w, {
|
|
10569
10587
|
density: "comfortable",
|
|
10570
10588
|
icon: "mdi-close",
|
|
10571
10589
|
variant: "text",
|
|
10572
10590
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10573
10591
|
}),
|
|
10574
|
-
j("span",
|
|
10592
|
+
j("span", Ta, st(P(n)("x-block-lib.navigator")), 1),
|
|
10575
10593
|
B(q)
|
|
10576
10594
|
]),
|
|
10577
10595
|
_: 1
|
|
@@ -10580,20 +10598,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10580
10598
|
class: "overflow-y-auto",
|
|
10581
10599
|
style: W(u.value)
|
|
10582
10600
|
}, [
|
|
10583
|
-
C.type === "list" ? (D(), Z(
|
|
10601
|
+
C.type === "list" ? (D(), Z(fa, {
|
|
10584
10602
|
key: 0,
|
|
10585
10603
|
ref_key: "blockList",
|
|
10586
10604
|
ref: I,
|
|
10587
10605
|
modelValue: P(p),
|
|
10588
|
-
"onUpdate:modelValue": g[1] || (g[1] = (G) =>
|
|
10606
|
+
"onUpdate:modelValue": g[1] || (g[1] = (G) => We(p) ? p.value = G : null),
|
|
10589
10607
|
lock: C.lock
|
|
10590
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10608
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(ma, {
|
|
10591
10609
|
key: 1,
|
|
10592
10610
|
ref_key: "blockTree",
|
|
10593
10611
|
ref: A,
|
|
10594
10612
|
modelValue: P(p),
|
|
10595
|
-
"onUpdate:modelValue": g[2] || (g[2] = (G) =>
|
|
10596
|
-
}, null, 8, ["modelValue"])) :
|
|
10613
|
+
"onUpdate:modelValue": g[2] || (g[2] = (G) => We(p) ? p.value = G : null)
|
|
10614
|
+
}, null, 8, ["modelValue"])) : de("", !0),
|
|
10597
10615
|
j("div", {
|
|
10598
10616
|
style: W(r.value)
|
|
10599
10617
|
}, null, 4)
|
|
@@ -10603,11 +10621,11 @@ const na = /* @__PURE__ */ oe({
|
|
|
10603
10621
|
]),
|
|
10604
10622
|
_: 1
|
|
10605
10623
|
}, 8, ["modelValue"]),
|
|
10606
|
-
B(
|
|
10624
|
+
B(Et, {
|
|
10607
10625
|
text: P(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10608
10626
|
}, {
|
|
10609
10627
|
activator: ee(({ props: G }) => [
|
|
10610
|
-
B(
|
|
10628
|
+
B(w, wt(G, {
|
|
10611
10629
|
density: "comfortable",
|
|
10612
10630
|
icon: "mdi-navigation-variant",
|
|
10613
10631
|
variant: "outlined",
|
|
@@ -10619,7 +10637,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10619
10637
|
], 64);
|
|
10620
10638
|
};
|
|
10621
10639
|
}
|
|
10622
|
-
}),
|
|
10640
|
+
}), Nt = {
|
|
10623
10641
|
grid: {
|
|
10624
10642
|
length: 2,
|
|
10625
10643
|
snap: !0,
|
|
@@ -10634,9 +10652,9 @@ const na = /* @__PURE__ */ oe({
|
|
|
10634
10652
|
scrollbars: !0,
|
|
10635
10653
|
wheel: !0
|
|
10636
10654
|
},
|
|
10637
|
-
trashcan: !1,
|
|
10638
10655
|
readOnly: !1,
|
|
10639
10656
|
theme: "light",
|
|
10657
|
+
trashcan: !1,
|
|
10640
10658
|
zoom: {
|
|
10641
10659
|
maxScale: 1,
|
|
10642
10660
|
minScale: 0.1,
|
|
@@ -10645,22 +10663,22 @@ const na = /* @__PURE__ */ oe({
|
|
|
10645
10663
|
wheel: !0
|
|
10646
10664
|
}
|
|
10647
10665
|
};
|
|
10648
|
-
function
|
|
10649
|
-
|
|
10650
|
-
const i = go(t,
|
|
10651
|
-
return i.addChangeListener(Io.shadowBlockConversionChangeListener),
|
|
10666
|
+
function ga(t, e, n, o) {
|
|
10667
|
+
Nt.theme = o ? "dark" : "light", Nt.toolbox = Ia(e, n);
|
|
10668
|
+
const i = go(t, Nt);
|
|
10669
|
+
return i.addChangeListener(Io.shadowBlockConversionChangeListener), Aa(i, e, n), Oa(i), i;
|
|
10652
10670
|
}
|
|
10653
|
-
function
|
|
10671
|
+
function Ia(t, e) {
|
|
10654
10672
|
let n;
|
|
10655
|
-
return t === "page" ? e === "v1" && (n =
|
|
10673
|
+
return t === "page" ? e === "v1" && (n = aa) : t === "comp" ? e === "v1" && (n = na) : t === "func" ? e === "v1" && (n = ia) : t === "flow" ? e === "v1" && (n = oa) : t === "json" && e === "v1" && (n = sa), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10656
10674
|
}
|
|
10657
|
-
function
|
|
10675
|
+
function Aa(t, e, n) {
|
|
10658
10676
|
function o({ name: i, callback: a }) {
|
|
10659
10677
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10660
10678
|
}
|
|
10661
|
-
e === "page" || e === "comp" ? n === "v1" && (o(
|
|
10679
|
+
e === "page" || e === "comp" ? n === "v1" && (o(tt), o(le), o(ce), o(et)) : e === "func" ? n === "v1" && (o(ot), o(nt), o(it), o(le), o(ce)) : e === "flow" && n === "v1" && (o(nt), o(ot), o(it), o(le), o(ce));
|
|
10662
10680
|
}
|
|
10663
|
-
function
|
|
10681
|
+
function Oa(t) {
|
|
10664
10682
|
const { router: e } = ie;
|
|
10665
10683
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10666
10684
|
const n = e.resolve({
|
|
@@ -10678,7 +10696,7 @@ function ma(t) {
|
|
|
10678
10696
|
}, 100);
|
|
10679
10697
|
});
|
|
10680
10698
|
}
|
|
10681
|
-
function
|
|
10699
|
+
function Ca(t, e) {
|
|
10682
10700
|
const n = e.newBlock("json_root_v1");
|
|
10683
10701
|
n.initSvg(), n.render();
|
|
10684
10702
|
const o = (i, a) => {
|
|
@@ -10720,7 +10738,7 @@ function Ta(t, e) {
|
|
|
10720
10738
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10721
10739
|
);
|
|
10722
10740
|
}
|
|
10723
|
-
function
|
|
10741
|
+
function ka(t) {
|
|
10724
10742
|
const e = (o) => {
|
|
10725
10743
|
if (!o)
|
|
10726
10744
|
return null;
|
|
@@ -10752,9 +10770,9 @@ function Ea(t) {
|
|
|
10752
10770
|
if (o.type === "json_root_v1")
|
|
10753
10771
|
return e(o);
|
|
10754
10772
|
}
|
|
10755
|
-
const
|
|
10773
|
+
const va = { class: "position-relative w-100 h-100" }, ya = /* @__PURE__ */ oe({
|
|
10756
10774
|
__name: "index",
|
|
10757
|
-
props: /* @__PURE__ */
|
|
10775
|
+
props: /* @__PURE__ */ Lt({
|
|
10758
10776
|
type: {},
|
|
10759
10777
|
version: {},
|
|
10760
10778
|
locale: {},
|
|
@@ -10765,11 +10783,11 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10765
10783
|
scale: { required: !0 },
|
|
10766
10784
|
scaleModifiers: {}
|
|
10767
10785
|
}),
|
|
10768
|
-
emits: /* @__PURE__ */
|
|
10786
|
+
emits: /* @__PURE__ */ Lt(["ready"], ["update:lock", "update:scale"]),
|
|
10769
10787
|
setup(t, { expose: e, emit: n }) {
|
|
10770
|
-
const { backgroundColor2: o } =
|
|
10771
|
-
|
|
10772
|
-
const C =
|
|
10788
|
+
const { backgroundColor2: o } = xe(), i = Be(t, "lock"), a = Be(t, "scale"), l = n, u = `blocklyEditor${St()}`, r = Ee(), p = Le("parentContainer"), I = Le("clean"), A = Le("navigator"), f = {};
|
|
10789
|
+
ca(f);
|
|
10790
|
+
const C = Ee(!0), g = Ee(!1), M = K(() => t.type === "json" ? "tree" : "list"), w = K(() => ({
|
|
10773
10791
|
width: "100%",
|
|
10774
10792
|
height: "calc(100% - 48px)"
|
|
10775
10793
|
})), q = K(() => ({
|
|
@@ -10778,7 +10796,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10778
10796
|
bottom: "0px",
|
|
10779
10797
|
width: "100%",
|
|
10780
10798
|
height: "48px"
|
|
10781
|
-
})),
|
|
10799
|
+
})), pe = K(() => ({
|
|
10782
10800
|
position: "absolute",
|
|
10783
10801
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10784
10802
|
top: "1px",
|
|
@@ -10786,7 +10804,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10786
10804
|
width: "56px",
|
|
10787
10805
|
height: "calc(100% - 49px)",
|
|
10788
10806
|
zIndex: 999
|
|
10789
|
-
})),
|
|
10807
|
+
})), Et = K(() => ({
|
|
10790
10808
|
position: "absolute",
|
|
10791
10809
|
top: "0px",
|
|
10792
10810
|
right: "0px",
|
|
@@ -10812,21 +10830,21 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10812
10830
|
top: 0,
|
|
10813
10831
|
left: 0,
|
|
10814
10832
|
zIndex: 3e3
|
|
10815
|
-
})), { open:
|
|
10833
|
+
})), { open: ke } = $t(`blocklyEditorFlyout${St()}`);
|
|
10816
10834
|
zt(async () => {
|
|
10817
10835
|
if (!r.value || !p.value) {
|
|
10818
10836
|
console.assert(!1);
|
|
10819
10837
|
return;
|
|
10820
10838
|
}
|
|
10821
|
-
Ao(p.value), await
|
|
10839
|
+
Ao(p.value), await un(t.locale), f.workspace = ga(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Hn);
|
|
10822
10840
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10823
|
-
new MutationObserver((
|
|
10824
|
-
|
|
10825
|
-
|
|
10841
|
+
new MutationObserver((gt) => {
|
|
10842
|
+
gt.forEach(($e) => {
|
|
10843
|
+
$e.type === "attributes" && $e.attributeName === "style" && (ke.value = f.workspace.getFlyout().isVisible());
|
|
10826
10844
|
});
|
|
10827
|
-
}).observe(y, { attributes: !0 }),
|
|
10845
|
+
}).observe(y, { attributes: !0 }), ke.value = f.workspace.getFlyout().isVisible(), Jt(), qt(), await io(), l("ready");
|
|
10828
10846
|
}), so(() => {
|
|
10829
|
-
|
|
10847
|
+
ke.value = !1;
|
|
10830
10848
|
}), Oo(r, () => {
|
|
10831
10849
|
f.workspace && Co(f.workspace);
|
|
10832
10850
|
});
|
|
@@ -10848,18 +10866,18 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10848
10866
|
}
|
|
10849
10867
|
}
|
|
10850
10868
|
const Gn = (y) => {
|
|
10851
|
-
C.value = !0, t.type === "json" ?
|
|
10852
|
-
}, Wn = () => t.type === "json" ?
|
|
10869
|
+
C.value = !0, t.type === "json" ? Ca(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10870
|
+
}, Wn = () => t.type === "json" ? ka(f.workspace) : $.workspaces.save(f.workspace), jn = () => {
|
|
10853
10871
|
if (t.type === "json")
|
|
10854
10872
|
console.assert(!1);
|
|
10855
10873
|
else
|
|
10856
10874
|
return s.workspaceToCode(f.workspace);
|
|
10857
10875
|
}, Jt = () => {
|
|
10858
|
-
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (
|
|
10876
|
+
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (ke.value = !1);
|
|
10859
10877
|
}, qt = () => {
|
|
10860
10878
|
f.workspace.setScale(a.value);
|
|
10861
10879
|
}, Xn = () => {
|
|
10862
|
-
f.workspace.fireChangeListener(new
|
|
10880
|
+
f.workspace.fireChangeListener(new In());
|
|
10863
10881
|
}, Qt = (y) => {
|
|
10864
10882
|
if (y.key === "q" && y.ctrlKey) {
|
|
10865
10883
|
Jn();
|
|
@@ -10882,32 +10900,32 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10882
10900
|
};
|
|
10883
10901
|
return zt(() => {
|
|
10884
10902
|
window.addEventListener("keydown", Qt, !1);
|
|
10885
|
-
}),
|
|
10903
|
+
}), _n(() => {
|
|
10886
10904
|
window.removeEventListener("keydown", Qt, !1);
|
|
10887
|
-
}),
|
|
10905
|
+
}), ve(
|
|
10888
10906
|
() => t.locale,
|
|
10889
10907
|
(y) => {
|
|
10890
|
-
|
|
10908
|
+
un(y);
|
|
10891
10909
|
}
|
|
10892
|
-
),
|
|
10910
|
+
), ve(
|
|
10893
10911
|
() => t.dark,
|
|
10894
10912
|
(y) => {
|
|
10895
|
-
|
|
10913
|
+
ta(y ? "dark" : "light");
|
|
10896
10914
|
}
|
|
10897
|
-
),
|
|
10915
|
+
), ve(ke, (y) => {
|
|
10898
10916
|
y || f.workspace?.hideChaff();
|
|
10899
|
-
}),
|
|
10917
|
+
}), ve(i, () => {
|
|
10900
10918
|
Jt();
|
|
10901
|
-
}),
|
|
10919
|
+
}), ve(a, () => {
|
|
10902
10920
|
qt();
|
|
10903
|
-
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y,
|
|
10904
|
-
const
|
|
10905
|
-
return D(), Q("div",
|
|
10921
|
+
}), e({ loading: C, load: Gn, save: Wn, generateCode: jn, fireStateChange: Xn }), (y, he) => {
|
|
10922
|
+
const gt = V("v-icon"), $e = V("x-loading");
|
|
10923
|
+
return D(), Q("div", va, [
|
|
10906
10924
|
j("div", {
|
|
10907
10925
|
id: u,
|
|
10908
10926
|
ref_key: "blocklyDiv",
|
|
10909
10927
|
ref: r,
|
|
10910
|
-
style: W(
|
|
10928
|
+
style: W(w.value)
|
|
10911
10929
|
}, null, 4),
|
|
10912
10930
|
j("div", {
|
|
10913
10931
|
style: W(q.value)
|
|
@@ -10917,28 +10935,28 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10917
10935
|
g.value ? (D(), Q("div", {
|
|
10918
10936
|
key: 0,
|
|
10919
10937
|
class: "d-flex flex-column justify-center align-center",
|
|
10920
|
-
style: W(
|
|
10938
|
+
style: W(pe.value)
|
|
10921
10939
|
}, [
|
|
10922
|
-
B(
|
|
10940
|
+
B(gt, {
|
|
10923
10941
|
icon: "mdi-delete",
|
|
10924
10942
|
size: "x-large"
|
|
10925
10943
|
})
|
|
10926
|
-
], 4)) :
|
|
10927
|
-
C.value ?
|
|
10944
|
+
], 4)) : de("", !0),
|
|
10945
|
+
C.value ? de("", !0) : (D(), Q("div", {
|
|
10928
10946
|
key: 1,
|
|
10929
10947
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10930
|
-
style: W(
|
|
10948
|
+
style: W(Et.value)
|
|
10931
10949
|
}, [
|
|
10932
|
-
B(
|
|
10950
|
+
B(la, {
|
|
10933
10951
|
ref_key: "clean",
|
|
10934
10952
|
ref: I,
|
|
10935
10953
|
lock: i.value
|
|
10936
10954
|
}, null, 8, ["lock"]),
|
|
10937
|
-
B(
|
|
10955
|
+
B(ua, {
|
|
10938
10956
|
modelValue: i.value,
|
|
10939
|
-
"onUpdate:modelValue":
|
|
10957
|
+
"onUpdate:modelValue": he[0] || (he[0] = (zn) => i.value = zn)
|
|
10940
10958
|
}, null, 8, ["modelValue"]),
|
|
10941
|
-
B(
|
|
10959
|
+
B(Ea, {
|
|
10942
10960
|
ref_key: "navigator",
|
|
10943
10961
|
ref: A,
|
|
10944
10962
|
lock: i.value,
|
|
@@ -10948,24 +10966,24 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10948
10966
|
i.value ? (D(), Q("div", {
|
|
10949
10967
|
key: 2,
|
|
10950
10968
|
style: W(Xt.value)
|
|
10951
|
-
}, null, 4)) :
|
|
10969
|
+
}, null, 4)) : de("", !0),
|
|
10952
10970
|
i.value ? (D(), Q("div", {
|
|
10953
10971
|
key: 3,
|
|
10954
10972
|
style: W(G.value)
|
|
10955
|
-
}, null, 4)) :
|
|
10973
|
+
}, null, 4)) : de("", !0),
|
|
10956
10974
|
j("div", {
|
|
10957
10975
|
ref_key: "parentContainer",
|
|
10958
10976
|
ref: p,
|
|
10959
10977
|
style: W($n.value)
|
|
10960
10978
|
}, null, 4),
|
|
10961
|
-
B(
|
|
10979
|
+
B($e, {
|
|
10962
10980
|
open: C.value,
|
|
10963
10981
|
"z-index": 99
|
|
10964
10982
|
}, null, 8, ["open"])
|
|
10965
10983
|
]);
|
|
10966
10984
|
};
|
|
10967
10985
|
}
|
|
10968
|
-
}),
|
|
10986
|
+
}), Na = /* @__PURE__ */ oe({
|
|
10969
10987
|
__name: "index",
|
|
10970
10988
|
props: {
|
|
10971
10989
|
code: {}
|
|
@@ -10973,7 +10991,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10973
10991
|
setup(t) {
|
|
10974
10992
|
const e = t;
|
|
10975
10993
|
ko.registerLanguage("javascript", vo);
|
|
10976
|
-
const n = yo.component, { backgroundColor2: o } =
|
|
10994
|
+
const n = yo.component, { backgroundColor2: o } = xe();
|
|
10977
10995
|
return (i, a) => {
|
|
10978
10996
|
const l = V("v-sheet");
|
|
10979
10997
|
return D(), Z(l, {
|
|
@@ -10991,10 +11009,10 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10991
11009
|
}, 8, ["color"]);
|
|
10992
11010
|
};
|
|
10993
11011
|
}
|
|
10994
|
-
}),
|
|
11012
|
+
}), La = { class: "text-subtitle-1" }, Sa = { class: "w-100 h-100 overflow-auto" }, ba = /* @__PURE__ */ oe({
|
|
10995
11013
|
__name: "index",
|
|
10996
11014
|
setup(t) {
|
|
10997
|
-
const { t: e } =
|
|
11015
|
+
const { t: e } = Fe(), { sysBarAvail: n } = gn(), { backgroundColor0: o, backgroundColor2: i } = xe(), a = Ee(""), l = K(() => {
|
|
10998
11016
|
let p = 48;
|
|
10999
11017
|
return n.value && (p += 24), {
|
|
11000
11018
|
position: "relative",
|
|
@@ -11002,17 +11020,17 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11002
11020
|
};
|
|
11003
11021
|
}), u = (p) => {
|
|
11004
11022
|
a.value = p.code;
|
|
11005
|
-
}, { open: r } =
|
|
11023
|
+
}, { open: r } = $t("sourceDlg", u);
|
|
11006
11024
|
return (p, I) => {
|
|
11007
11025
|
const A = V("v-sheet"), f = V("v-btn"), C = V("v-spacer"), g = V("v-dialog");
|
|
11008
11026
|
return D(), Z(g, {
|
|
11009
11027
|
modelValue: P(r),
|
|
11010
|
-
"onUpdate:modelValue": I[1] || (I[1] = (M) =>
|
|
11028
|
+
"onUpdate:modelValue": I[1] || (I[1] = (M) => We(r) ? r.value = M : null),
|
|
11011
11029
|
fullscreen: "",
|
|
11012
11030
|
"no-click-animation": "",
|
|
11013
11031
|
persistent: "",
|
|
11014
11032
|
transition: "dialog-bottom-transition",
|
|
11015
|
-
onKeydown: I[2] || (I[2] =
|
|
11033
|
+
onKeydown: I[2] || (I[2] = pn(Ne((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11016
11034
|
}, {
|
|
11017
11035
|
default: ee(() => [
|
|
11018
11036
|
B(A, {
|
|
@@ -11025,7 +11043,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11025
11043
|
key: 0,
|
|
11026
11044
|
color: P(i),
|
|
11027
11045
|
height: 24
|
|
11028
|
-
}, null, 8, ["color"])) :
|
|
11046
|
+
}, null, 8, ["color"])) : de("", !0),
|
|
11029
11047
|
B(A, {
|
|
11030
11048
|
class: "d-flex align-center px-2",
|
|
11031
11049
|
color: P(i),
|
|
@@ -11038,7 +11056,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11038
11056
|
variant: "text",
|
|
11039
11057
|
onClick: I[0] || (I[0] = (M) => r.value = !1)
|
|
11040
11058
|
}),
|
|
11041
|
-
j("span",
|
|
11059
|
+
j("span", La, st(P(e)("x-block-lib.dlg.source.title")), 1),
|
|
11042
11060
|
B(C)
|
|
11043
11061
|
]),
|
|
11044
11062
|
_: 1
|
|
@@ -11046,8 +11064,8 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11046
11064
|
j("div", {
|
|
11047
11065
|
style: W(l.value)
|
|
11048
11066
|
}, [
|
|
11049
|
-
j("div",
|
|
11050
|
-
B(
|
|
11067
|
+
j("div", Sa, [
|
|
11068
|
+
B(Na, { code: a.value }, null, 8, ["code"])
|
|
11051
11069
|
])
|
|
11052
11070
|
], 4)
|
|
11053
11071
|
]),
|
|
@@ -11058,16 +11076,16 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11058
11076
|
}, 8, ["modelValue"]);
|
|
11059
11077
|
};
|
|
11060
11078
|
}
|
|
11061
|
-
}),
|
|
11062
|
-
t.component("XBlockly",
|
|
11079
|
+
}), Ba = (t) => {
|
|
11080
|
+
t.component("XBlockly", ya), t.component("XSourceDlg", ba);
|
|
11063
11081
|
};
|
|
11064
|
-
async function
|
|
11082
|
+
async function Fa(t) {
|
|
11065
11083
|
return (await Vn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.owbcs4f2.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.j5qa8fnp.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
11066
11084
|
}
|
|
11067
|
-
const
|
|
11085
|
+
const Ya = { install: Ba };
|
|
11068
11086
|
export {
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11087
|
+
ya as XBlockly,
|
|
11088
|
+
Ya as default,
|
|
11089
|
+
Ba as install,
|
|
11090
|
+
Fa as loadLocaleMessageBlock
|
|
11073
11091
|
};
|