x-block-lib 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/utils/common/block.d.ts +5 -7
- package/dist/index.js +881 -870
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
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
|
|
11
|
-
import { d as h, j as s, O as c, f as
|
|
12
|
-
import { globalObjects as ie, openConfirmDlg as
|
|
13
|
-
import { elements as x, pkgs as
|
|
10
|
+
import { provide as Qn, inject as zn, defineComponent as oe, resolveComponent as V, createBlock as Z, openBlock as D, unref as P, withCtx as ee, createVNode as B, mergeProps as Yt, useModel as Be, ref as Ee, computed as K, resolveDirective as Zn, withDirectives as eo, createElementBlock as Q, normalizeStyle as W, createElementVNode as j, toDisplayString as it, withModifiers as Ne, mergeModels as Nt, Fragment as un, renderList as to, useId as Lt, onUnmounted as rn, useTemplateRef as Le, withKeys as _n, isRef as Ge, createCommentVNode as de, onMounted as Qt, nextTick as no, onBeforeUnmount as oo, watch as ve, renderSlot as io } from "vue";
|
|
11
|
+
import { d as h, j as s, O as c, f as so, F as pn, M as _, E, r as zt, u as v, s as ao, X as wt, B as d, i as U, a as k, c as Se, b as St, e as $, g as fe, h as ue, p as be, k as z, l as Zt, m as R, C as hn, N as te, n as co, P as bt, V as Te, o as Ve, q as dn, t as lo, v as uo, w as ro, S as _o, x as po, y as ho, T as st, z as fn, A as fo, D as mo, G as mn, H as To, I as Eo, J as go, K as Io, L as Ao, Q as Oo, R as Co, U as ko } from "./vendor.gwcdj52j.js";
|
|
12
|
+
import { globalObjects as ie, openConfirmDlg as vo, openPromptDlg as yo, messageWarning as Tn, useColor as xe, useSystem as En, useViewStack as Kt } from "x-essential-lib";
|
|
13
|
+
import { elements as x, pkgs as Re, getPropTag as at, parsePixelStr as No, parsePercentStr as Lo } from "x-runtime-lib";
|
|
14
14
|
import { globalState as T } from "x-state-lib";
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { useDisplay as
|
|
15
|
+
import { useI18n as Fe } from "vue-i18n";
|
|
16
|
+
import { useDisplay as So } from "vuetify";
|
|
17
17
|
h([
|
|
18
18
|
{
|
|
19
19
|
type: "app_debug_trace_v1",
|
|
@@ -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 pn {
|
|
62
62
|
constructor(e, n, o) {
|
|
63
63
|
super(e, n, o);
|
|
64
64
|
}
|
|
@@ -115,25 +115,25 @@ class m extends dn {
|
|
|
115
115
|
return "<n/a>";
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
so.register("field_dropdown2", m);
|
|
119
119
|
var L = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(L || {});
|
|
120
|
-
class
|
|
120
|
+
class gn extends E.Abstract {
|
|
121
121
|
isBlank = !0;
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
zt.register(
|
|
124
|
+
zt.Type.EVENT,
|
|
125
125
|
"state_change",
|
|
126
|
-
|
|
126
|
+
gn
|
|
127
127
|
);
|
|
128
|
-
const
|
|
129
|
-
function
|
|
128
|
+
const ge = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Xe = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
129
|
+
function ct(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
|
-
const n =
|
|
133
|
+
const n = ao(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
134
134
|
return `${n}_${o}`;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function Je(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}`), "";
|
|
@@ -157,51 +157,65 @@ function S(t) {
|
|
|
157
157
|
} else t.type === "comp" ? e = '<shadow type="select_comp_v1"></shadow>' : console.assert(!1, "invalid param type", t.type);
|
|
158
158
|
return v.xml.textToDom(e);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function bo(t) {
|
|
161
161
|
let e = 0;
|
|
162
162
|
for (; t; )
|
|
163
163
|
e++, t = t.getParent();
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
167
|
-
const
|
|
168
|
-
return
|
|
166
|
+
function We(t) {
|
|
167
|
+
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
168
|
+
return v.xml.textToDom(e);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
171
|
-
const
|
|
172
|
-
return
|
|
170
|
+
function Bt(t) {
|
|
171
|
+
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
172
|
+
return v.xml.textToDom(e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const
|
|
176
|
-
return
|
|
174
|
+
function In(t) {
|
|
175
|
+
const e = `<block type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></block>`;
|
|
176
|
+
return v.xml.textToDom(e);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
const
|
|
180
|
-
return
|
|
178
|
+
function Bo(t) {
|
|
179
|
+
const e = `<block type="${ct(t)}"></block>`;
|
|
180
|
+
return v.xml.textToDom(e);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const
|
|
184
|
-
return
|
|
182
|
+
function Ro(t) {
|
|
183
|
+
const e = `<block type="${ct(t)}"></block>`;
|
|
184
|
+
return v.xml.textToDom(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
|
|
188
|
-
return he.domToBlock(n, t);
|
|
186
|
+
function Do() {
|
|
187
|
+
return v.xml.textToDom('<block type="select_comp_v1"></block>');
|
|
189
188
|
}
|
|
190
|
-
function
|
|
191
|
-
const
|
|
192
|
-
return
|
|
189
|
+
function Uo(t) {
|
|
190
|
+
const e = `<block type="color_picker_v1"><field name="COLOR">${t}</field></block>`;
|
|
191
|
+
return v.xml.textToDom(e);
|
|
193
192
|
}
|
|
194
|
-
function
|
|
195
|
-
let
|
|
196
|
-
return
|
|
193
|
+
function Mo(t) {
|
|
194
|
+
let e = null;
|
|
195
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = We(t.default) : t.ui === "numInput" ? e = Bt(t.default) : t.ui === "switch" ? e = In(t.default) : t.ui === "select" ? e = Bo(t.items) : t.ui === "multiTypes" ? e = Ro(t.types) : t.ui === "compSelect" ? e = Do() : t.ui === "colorPicker" ? e = Uo(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
196
|
+
}
|
|
197
|
+
function An(t, e) {
|
|
198
|
+
const n = Mo(e);
|
|
199
|
+
return n ? wt.domToBlock(n, t) : null;
|
|
197
200
|
}
|
|
198
|
-
function
|
|
201
|
+
function Po(t) {
|
|
202
|
+
let e = null;
|
|
203
|
+
return t === "string" ? e = We("") : t === "integer" || t === "float" ? e = Bt(0) : t === "boolean" ? e = In(!1) : t === "enum" || t === "dateTime" ? e = We("") : console.assert(!1), e;
|
|
204
|
+
}
|
|
205
|
+
function Rt(t, e) {
|
|
206
|
+
const n = Po(e);
|
|
207
|
+
return n ? wt.domToBlock(n, t) : null;
|
|
208
|
+
}
|
|
209
|
+
function On(t) {
|
|
210
|
+
return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? Je(t.items) : t.ui === "multiTypes" ? Je(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
211
|
+
}
|
|
212
|
+
function $t(t, e, n, o) {
|
|
199
213
|
const i = `
|
|
200
214
|
<block type="parameter_v1">
|
|
201
215
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
202
216
|
</block>
|
|
203
217
|
`, a = v.xml.textToDom(i);
|
|
204
|
-
return
|
|
218
|
+
return wt.domToBlock(a, t);
|
|
205
219
|
}
|
|
206
220
|
function F(t, e) {
|
|
207
221
|
try {
|
|
@@ -216,7 +230,7 @@ function F(t, e) {
|
|
|
216
230
|
return;
|
|
217
231
|
r.dispose();
|
|
218
232
|
}
|
|
219
|
-
r =
|
|
233
|
+
r = $t(
|
|
220
234
|
t.workspace,
|
|
221
235
|
i,
|
|
222
236
|
a,
|
|
@@ -227,9 +241,9 @@ function F(t, e) {
|
|
|
227
241
|
E.enable();
|
|
228
242
|
}
|
|
229
243
|
}
|
|
230
|
-
function
|
|
244
|
+
function Ye(t) {
|
|
231
245
|
const { version: e } = T.app.activeObject;
|
|
232
|
-
if (!
|
|
246
|
+
if (!Re[e])
|
|
233
247
|
return console.assert(!1, "invalid pkg version", e), [];
|
|
234
248
|
const o = [];
|
|
235
249
|
for (const i in x) {
|
|
@@ -238,49 +252,49 @@ function He(t) {
|
|
|
238
252
|
}
|
|
239
253
|
return o;
|
|
240
254
|
}
|
|
241
|
-
function
|
|
255
|
+
function re(t) {
|
|
242
256
|
const e = x[t];
|
|
243
257
|
if (e)
|
|
244
258
|
return e;
|
|
245
259
|
}
|
|
246
|
-
function
|
|
260
|
+
function Ae(t) {
|
|
247
261
|
const { i18n: e } = ie, n = [];
|
|
248
|
-
return
|
|
262
|
+
return Ye(t).forEach(({ key: i, name: a }) => {
|
|
249
263
|
n.push([e.global.t(a), i]);
|
|
250
264
|
}), N(n);
|
|
251
265
|
}
|
|
252
|
-
function
|
|
266
|
+
function Dt(t) {
|
|
253
267
|
const e = x[t];
|
|
254
268
|
return e ? e.events : [];
|
|
255
269
|
}
|
|
256
|
-
function
|
|
270
|
+
function gt(t, e) {
|
|
257
271
|
const n = x[t];
|
|
258
272
|
if (n)
|
|
259
273
|
return n.events.find((o) => o.key === e);
|
|
260
274
|
}
|
|
261
|
-
function
|
|
275
|
+
function Vo(t) {
|
|
262
276
|
const e = [];
|
|
263
|
-
return
|
|
277
|
+
return Dt(t).forEach(({ key: o, name: i }) => {
|
|
264
278
|
e.push([_[i] ?? i, o]);
|
|
265
279
|
}), N(e);
|
|
266
280
|
}
|
|
267
|
-
function
|
|
281
|
+
function Ut(t) {
|
|
268
282
|
const e = x[t];
|
|
269
283
|
return e ? e.methods : [];
|
|
270
284
|
}
|
|
271
|
-
function
|
|
285
|
+
function It(t, e) {
|
|
272
286
|
const n = x[t];
|
|
273
287
|
if (n)
|
|
274
288
|
return n.methods.find((o) => o.key === e);
|
|
275
289
|
}
|
|
276
|
-
function
|
|
290
|
+
function xo(t) {
|
|
277
291
|
const e = [];
|
|
278
|
-
return
|
|
292
|
+
return Ut(t).forEach(({ key: o, name: i }) => {
|
|
279
293
|
e.push([_[i] ?? i, o]);
|
|
280
294
|
}), N(e);
|
|
281
295
|
}
|
|
282
|
-
function
|
|
283
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
296
|
+
function De(t, e) {
|
|
297
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
284
298
|
if (!a)
|
|
285
299
|
return console.assert(!1, "invalid prop tag", o, i), [];
|
|
286
300
|
if (!x[t])
|
|
@@ -291,23 +305,23 @@ function Ve(t, e) {
|
|
|
291
305
|
}), u;
|
|
292
306
|
}
|
|
293
307
|
function se(t, e) {
|
|
294
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
308
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
295
309
|
if (!a) {
|
|
296
310
|
console.assert(!1, "invalid prop tag", o, i);
|
|
297
311
|
return;
|
|
298
312
|
}
|
|
299
313
|
return n[t]?.[a]?.find((l) => l.keys === e);
|
|
300
314
|
}
|
|
301
|
-
function
|
|
315
|
+
function Cn(t, e) {
|
|
302
316
|
const { i18n: n } = ie, o = [];
|
|
303
|
-
return
|
|
317
|
+
return De(t, e).forEach(({ keys: a, names: l }) => {
|
|
304
318
|
let u = "";
|
|
305
319
|
l.forEach((r, p) => {
|
|
306
320
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
307
321
|
}), o.push([u, a]);
|
|
308
322
|
}), N(o);
|
|
309
323
|
}
|
|
310
|
-
function
|
|
324
|
+
function Ce(t) {
|
|
311
325
|
const { nodes: e } = T.app.activeObject, n = [];
|
|
312
326
|
for (const o in e) {
|
|
313
327
|
const i = e[o], a = x[i.key];
|
|
@@ -324,12 +338,12 @@ function Ne(t) {
|
|
|
324
338
|
}
|
|
325
339
|
return n;
|
|
326
340
|
}
|
|
327
|
-
function
|
|
341
|
+
function Y(t) {
|
|
328
342
|
return T.app.activeObject.nodes.find((e) => e.id === t);
|
|
329
343
|
}
|
|
330
|
-
function
|
|
344
|
+
function we(t) {
|
|
331
345
|
const { i18n: e } = ie, n = [];
|
|
332
|
-
return
|
|
346
|
+
return Ce(t).forEach(({ id: i, key: a, alias: l }) => {
|
|
333
347
|
const u = x[a];
|
|
334
348
|
if (!u) {
|
|
335
349
|
console.assert(!1, "invalid element", a);
|
|
@@ -339,15 +353,15 @@ function Ge(t) {
|
|
|
339
353
|
l && (r += ` / ${l}`), n.push([r, i]);
|
|
340
354
|
}), N(n);
|
|
341
355
|
}
|
|
342
|
-
function
|
|
343
|
-
const e =
|
|
356
|
+
function Mt(t) {
|
|
357
|
+
const e = Y(t);
|
|
344
358
|
if (!e)
|
|
345
359
|
return [];
|
|
346
360
|
const n = x[e.key];
|
|
347
361
|
return n ? n.events : (console.assert(!1, "invalid element", e.key), []);
|
|
348
362
|
}
|
|
349
|
-
function
|
|
350
|
-
const n =
|
|
363
|
+
function At(t, e) {
|
|
364
|
+
const n = Y(t);
|
|
351
365
|
if (!n)
|
|
352
366
|
return;
|
|
353
367
|
const o = x[n.key];
|
|
@@ -357,21 +371,21 @@ function kt(t, e) {
|
|
|
357
371
|
}
|
|
358
372
|
return o.events.find((i) => i.key === e);
|
|
359
373
|
}
|
|
360
|
-
function
|
|
374
|
+
function Fo(t) {
|
|
361
375
|
const e = [];
|
|
362
|
-
return
|
|
376
|
+
return Mt(t).forEach(({ key: o, name: i }) => {
|
|
363
377
|
e.push([_[i] ?? i, o]);
|
|
364
378
|
}), N(e);
|
|
365
379
|
}
|
|
366
|
-
function
|
|
367
|
-
const e =
|
|
380
|
+
function Pt(t) {
|
|
381
|
+
const e = Y(t);
|
|
368
382
|
if (!e)
|
|
369
383
|
return [];
|
|
370
384
|
const n = x[e.key];
|
|
371
385
|
return n ? n.methods : (console.assert(!1, "invalid element", e.key), []);
|
|
372
386
|
}
|
|
373
|
-
function
|
|
374
|
-
const n =
|
|
387
|
+
function Ot(t, e) {
|
|
388
|
+
const n = Y(t);
|
|
375
389
|
if (!n)
|
|
376
390
|
return;
|
|
377
391
|
const o = x[n.key];
|
|
@@ -381,41 +395,41 @@ function vt(t, e) {
|
|
|
381
395
|
}
|
|
382
396
|
return o.methods.find((i) => i.key === e);
|
|
383
397
|
}
|
|
384
|
-
function
|
|
398
|
+
function Yo(t) {
|
|
385
399
|
const e = [];
|
|
386
|
-
return
|
|
400
|
+
return Pt(t).forEach(({ key: o, name: i }) => {
|
|
387
401
|
e.push([_[i] ?? i, o]);
|
|
388
402
|
}), N(e);
|
|
389
403
|
}
|
|
390
|
-
function
|
|
391
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l =
|
|
404
|
+
function Ue(t, e) {
|
|
405
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = [], l = at(o, i);
|
|
392
406
|
if (!l)
|
|
393
407
|
return console.assert(!1, "invalid prop tag", o, i), a;
|
|
394
|
-
const u =
|
|
408
|
+
const u = Y(t);
|
|
395
409
|
return u ? x[u.key] ? (n[u.key]?.[l]?.forEach((p) => {
|
|
396
410
|
e && (!p.raw.ui || p.raw.readonly || p.keys === "alias") || a.push(p);
|
|
397
411
|
}), a) : (console.assert(!1, "invalid element", u.key), a) : a;
|
|
398
412
|
}
|
|
399
413
|
function ae(t, e) {
|
|
400
|
-
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a =
|
|
414
|
+
const { props: n } = T.runtime, { type: o, subtype: i } = T.app.activeObject, a = at(o, i);
|
|
401
415
|
if (!a) {
|
|
402
416
|
console.assert(!1, "invalid prop tag", o, i);
|
|
403
417
|
return;
|
|
404
418
|
}
|
|
405
|
-
const l =
|
|
419
|
+
const l = Y(t);
|
|
406
420
|
if (l)
|
|
407
421
|
return n[l.key]?.[a]?.find((u) => u.keys === e);
|
|
408
422
|
}
|
|
409
|
-
function
|
|
423
|
+
function kn(t, e) {
|
|
410
424
|
const { i18n: n } = ie, o = [];
|
|
411
|
-
return
|
|
425
|
+
return Ue(t, e).forEach(({ keys: a, names: l }) => {
|
|
412
426
|
let u = "";
|
|
413
427
|
l.forEach((r, p) => {
|
|
414
428
|
p !== 0 && (u += " - "), u += n.global.t(r);
|
|
415
429
|
}), o.push([u, a]);
|
|
416
430
|
}), N(o);
|
|
417
431
|
}
|
|
418
|
-
const
|
|
432
|
+
const wo = {
|
|
419
433
|
init: function() {
|
|
420
434
|
this.node = {
|
|
421
435
|
id: "",
|
|
@@ -431,13 +445,13 @@ const Vo = {
|
|
|
431
445
|
initData_: function() {
|
|
432
446
|
if (this.node.id)
|
|
433
447
|
return;
|
|
434
|
-
const t =
|
|
448
|
+
const t = Ce()?.[0];
|
|
435
449
|
if (!t)
|
|
436
450
|
return;
|
|
437
451
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
438
452
|
const e = this.getField("NODE");
|
|
439
453
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
440
|
-
const n =
|
|
454
|
+
const n = Pt(this.node.id)?.[0];
|
|
441
455
|
if (!n)
|
|
442
456
|
return;
|
|
443
457
|
this.method.key = n.key, this.method.name = n.name, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
@@ -456,13 +470,13 @@ const Vo = {
|
|
|
456
470
|
}, 0);
|
|
457
471
|
},
|
|
458
472
|
genNodeOpts_: function() {
|
|
459
|
-
return
|
|
473
|
+
return we("method");
|
|
460
474
|
},
|
|
461
475
|
genMethodOpts_: function() {
|
|
462
|
-
return
|
|
476
|
+
return Yo(this.node.id);
|
|
463
477
|
},
|
|
464
478
|
genElementOpts_: function() {
|
|
465
|
-
return
|
|
479
|
+
return Ae();
|
|
466
480
|
},
|
|
467
481
|
onchange: function(t) {
|
|
468
482
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -477,7 +491,7 @@ const Vo = {
|
|
|
477
491
|
}
|
|
478
492
|
},
|
|
479
493
|
onNodeChange_: function(t) {
|
|
480
|
-
const e =
|
|
494
|
+
const e = Y(t);
|
|
481
495
|
if (!e) {
|
|
482
496
|
console.assert(!1);
|
|
483
497
|
return;
|
|
@@ -485,13 +499,13 @@ const Vo = {
|
|
|
485
499
|
const n = this.node.key !== e.key;
|
|
486
500
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
487
501
|
const o = this.getField("METHOD");
|
|
488
|
-
if (o.getOptions(!1), n || !
|
|
489
|
-
const a =
|
|
502
|
+
if (o.getOptions(!1), n || !Ot(this.node.id, this.method.key)) {
|
|
503
|
+
const a = Pt(this.node.id)?.[0]?.key ?? "";
|
|
490
504
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
491
505
|
}
|
|
492
506
|
},
|
|
493
507
|
onMethodChange_: function(t) {
|
|
494
|
-
const e =
|
|
508
|
+
const e = Ot(this.node.id, t);
|
|
495
509
|
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
510
|
this.ensureBlocks_();
|
|
497
511
|
}, 0);
|
|
@@ -550,7 +564,7 @@ const Vo = {
|
|
|
550
564
|
t.length > 0 && F(this, t);
|
|
551
565
|
},
|
|
552
566
|
checkWarning_: function() {
|
|
553
|
-
const t =
|
|
567
|
+
const t = Y(this.node.id);
|
|
554
568
|
if (!t) {
|
|
555
569
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
556
570
|
return;
|
|
@@ -560,7 +574,7 @@ const Vo = {
|
|
|
560
574
|
return;
|
|
561
575
|
}
|
|
562
576
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
563
|
-
const e =
|
|
577
|
+
const e = Ot(this.node.id, this.method.key);
|
|
564
578
|
if (!e) {
|
|
565
579
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
566
580
|
return;
|
|
@@ -572,7 +586,7 @@ const Vo = {
|
|
|
572
586
|
this.setWarningText(null);
|
|
573
587
|
}
|
|
574
588
|
};
|
|
575
|
-
d.call_node_method_v1 =
|
|
589
|
+
d.call_node_method_v1 = wo;
|
|
576
590
|
s.forBlock.call_node_method_v1 = function(t) {
|
|
577
591
|
const e = s.quote_, n = t;
|
|
578
592
|
let o = n.node.id;
|
|
@@ -595,7 +609,7 @@ ${a}}
|
|
|
595
609
|
`;
|
|
596
610
|
}
|
|
597
611
|
};
|
|
598
|
-
const
|
|
612
|
+
const Ko = {
|
|
599
613
|
init: function() {
|
|
600
614
|
this.element = {
|
|
601
615
|
key: "",
|
|
@@ -610,16 +624,16 @@ const xo = {
|
|
|
610
624
|
initData_: function() {
|
|
611
625
|
if (this.element.key)
|
|
612
626
|
return;
|
|
613
|
-
const t =
|
|
627
|
+
const t = Ye("method")?.[0];
|
|
614
628
|
if (!t)
|
|
615
629
|
return;
|
|
616
630
|
this.element.key = t.key, this.element.name = t.name;
|
|
617
631
|
const e = this.getField("ELEMENT");
|
|
618
632
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
619
|
-
const n =
|
|
633
|
+
const n = Ut(this.element.key)?.[0];
|
|
620
634
|
if (!n)
|
|
621
635
|
return;
|
|
622
|
-
this.method =
|
|
636
|
+
this.method = Se(n);
|
|
623
637
|
const o = this.getField("METHOD");
|
|
624
638
|
o.getOptions(!1), o.setValue(this.method.key);
|
|
625
639
|
},
|
|
@@ -635,10 +649,10 @@ const xo = {
|
|
|
635
649
|
}, 0);
|
|
636
650
|
},
|
|
637
651
|
genElementOpts_: function() {
|
|
638
|
-
return
|
|
652
|
+
return Ae("method");
|
|
639
653
|
},
|
|
640
654
|
genMethodOpts_: function() {
|
|
641
|
-
return
|
|
655
|
+
return xo(this.element.key);
|
|
642
656
|
},
|
|
643
657
|
onchange: function(t) {
|
|
644
658
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -653,7 +667,7 @@ const xo = {
|
|
|
653
667
|
}
|
|
654
668
|
},
|
|
655
669
|
onElementChange_: function(t) {
|
|
656
|
-
const e =
|
|
670
|
+
const e = re(t);
|
|
657
671
|
if (!e) {
|
|
658
672
|
console.assert(!1);
|
|
659
673
|
return;
|
|
@@ -661,13 +675,13 @@ const xo = {
|
|
|
661
675
|
const n = this.element.key !== e.key;
|
|
662
676
|
this.element.key = e.key, this.element.name = e.name;
|
|
663
677
|
const o = this.getField("METHOD");
|
|
664
|
-
if (o.getOptions(!1), n || !
|
|
665
|
-
const a =
|
|
678
|
+
if (o.getOptions(!1), n || !It(this.element.key, this.method.key)) {
|
|
679
|
+
const a = Ut(this.element.key)?.[0]?.key ?? "";
|
|
666
680
|
o.setValue(a), this.method.key === a && this.onMethodChange_(a);
|
|
667
681
|
}
|
|
668
682
|
},
|
|
669
683
|
onMethodChange_: function(t) {
|
|
670
|
-
const e =
|
|
684
|
+
const e = It(this.element.key, t);
|
|
671
685
|
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
686
|
this.ensureBlocks_();
|
|
673
687
|
}, 0);
|
|
@@ -678,7 +692,7 @@ const xo = {
|
|
|
678
692
|
console.assert(!1);
|
|
679
693
|
return;
|
|
680
694
|
}
|
|
681
|
-
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() =>
|
|
695
|
+
t.removeField("EXTRA1", !0), this.method.key === "add" && t.appendField(new m(() => Ae()), "EXTRA1");
|
|
682
696
|
},
|
|
683
697
|
updateShape2_: function() {
|
|
684
698
|
this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
@@ -723,13 +737,13 @@ const xo = {
|
|
|
723
737
|
t.length > 0 && F(this, t);
|
|
724
738
|
},
|
|
725
739
|
checkWarning_: function() {
|
|
726
|
-
const t =
|
|
740
|
+
const t = re(this.element.key);
|
|
727
741
|
if (!t) {
|
|
728
742
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
729
743
|
return;
|
|
730
744
|
}
|
|
731
745
|
this.element.name !== t.name && (this.element.name = t.name);
|
|
732
|
-
const e =
|
|
746
|
+
const e = It(this.element.key, this.method.key);
|
|
733
747
|
if (!e) {
|
|
734
748
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
735
749
|
return;
|
|
@@ -741,7 +755,7 @@ const xo = {
|
|
|
741
755
|
this.setWarningText(null);
|
|
742
756
|
}
|
|
743
757
|
};
|
|
744
|
-
d.call_node_method_as_v1 =
|
|
758
|
+
d.call_node_method_as_v1 = Ko;
|
|
745
759
|
s.forBlock.call_node_method_as_v1 = function(t) {
|
|
746
760
|
const e = s.quote_, n = t, o = s.valueToCode(n, "NODE", c.NONE) || "";
|
|
747
761
|
if (!o)
|
|
@@ -765,53 +779,53 @@ ${a}}
|
|
|
765
779
|
`;
|
|
766
780
|
}
|
|
767
781
|
};
|
|
768
|
-
function
|
|
782
|
+
function $o() {
|
|
769
783
|
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
784
|
}
|
|
771
|
-
function
|
|
785
|
+
function Me() {
|
|
772
786
|
return T.app.activeComp.meta.methods;
|
|
773
787
|
}
|
|
774
|
-
function
|
|
788
|
+
function qe(t) {
|
|
775
789
|
return T.app.activeComp.meta.methods.find((e) => e.id === t);
|
|
776
790
|
}
|
|
777
|
-
function
|
|
791
|
+
function vn() {
|
|
778
792
|
const t = [];
|
|
779
|
-
return
|
|
793
|
+
return Me().forEach(({ id: n, name: o }) => {
|
|
780
794
|
t.push([o, n]);
|
|
781
795
|
}), N(t);
|
|
782
796
|
}
|
|
783
|
-
function
|
|
797
|
+
function Vt(t) {
|
|
784
798
|
const e = T.app.activeComp.meta.methods.find(
|
|
785
799
|
(n) => n.id === t
|
|
786
800
|
);
|
|
787
801
|
return e ? e.outputs : [];
|
|
788
802
|
}
|
|
789
|
-
function
|
|
803
|
+
function Ct(t, e) {
|
|
790
804
|
const n = T.app.activeComp.meta.methods.find(
|
|
791
805
|
(o) => o.id === t
|
|
792
806
|
);
|
|
793
807
|
if (n)
|
|
794
808
|
return n.outputs.find((o) => o.id === e);
|
|
795
809
|
}
|
|
796
|
-
function
|
|
810
|
+
function Ho(t) {
|
|
797
811
|
const e = [];
|
|
798
|
-
return
|
|
812
|
+
return Vt(t).forEach(({ id: o, name: i }) => {
|
|
799
813
|
e.push([i, o]);
|
|
800
814
|
}), N(e);
|
|
801
815
|
}
|
|
802
|
-
function
|
|
816
|
+
function yn() {
|
|
803
817
|
return T.app.activeComp.meta.events;
|
|
804
818
|
}
|
|
805
|
-
function
|
|
819
|
+
function en(t) {
|
|
806
820
|
return T.app.activeComp.meta.events.find((e) => e.id === t);
|
|
807
821
|
}
|
|
808
|
-
function
|
|
822
|
+
function Go() {
|
|
809
823
|
const t = [];
|
|
810
|
-
return
|
|
824
|
+
return yn().forEach(({ id: n, name: o }) => {
|
|
811
825
|
t.push([o, n]);
|
|
812
826
|
}), N(t);
|
|
813
827
|
}
|
|
814
|
-
const
|
|
828
|
+
const Wo = {
|
|
815
829
|
init: function() {
|
|
816
830
|
this.method = {
|
|
817
831
|
id: "",
|
|
@@ -822,7 +836,7 @@ const Ko = {
|
|
|
822
836
|
initData_: function() {
|
|
823
837
|
if (this.method.id)
|
|
824
838
|
return;
|
|
825
|
-
const t =
|
|
839
|
+
const t = Me()?.[0];
|
|
826
840
|
if (!t)
|
|
827
841
|
return;
|
|
828
842
|
this.method.id = t.id, this.method.name = t.name, this.method.inputs = t.inputs;
|
|
@@ -840,7 +854,7 @@ const Ko = {
|
|
|
840
854
|
}, 0);
|
|
841
855
|
},
|
|
842
856
|
genMethodOpts_: function() {
|
|
843
|
-
return
|
|
857
|
+
return vn();
|
|
844
858
|
},
|
|
845
859
|
onchange: function(t) {
|
|
846
860
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -855,7 +869,7 @@ const Ko = {
|
|
|
855
869
|
}
|
|
856
870
|
},
|
|
857
871
|
onMethodChange_: function(t) {
|
|
858
|
-
const e =
|
|
872
|
+
const e = qe(t);
|
|
859
873
|
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
874
|
this.rebuildBlocks();
|
|
861
875
|
}, 0);
|
|
@@ -879,7 +893,7 @@ const Ko = {
|
|
|
879
893
|
F(this, t);
|
|
880
894
|
},
|
|
881
895
|
checkWarning_: function() {
|
|
882
|
-
const t =
|
|
896
|
+
const t = qe(this.method.id);
|
|
883
897
|
if (!t) {
|
|
884
898
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
885
899
|
return;
|
|
@@ -891,15 +905,15 @@ const Ko = {
|
|
|
891
905
|
this.setWarningText(null);
|
|
892
906
|
}
|
|
893
907
|
};
|
|
894
|
-
d.comp_method_impl_v1 =
|
|
908
|
+
d.comp_method_impl_v1 = Wo;
|
|
895
909
|
s.forBlock.comp_method_impl_v1 = function(t) {
|
|
896
910
|
const e = t;
|
|
897
911
|
return `{
|
|
898
912
|
${s.statementToCode(e, "HANDLE")}}
|
|
899
913
|
`;
|
|
900
914
|
};
|
|
901
|
-
const
|
|
902
|
-
const n =
|
|
915
|
+
const jo = (t, e) => {
|
|
916
|
+
const n = ct(t), o = Je(t);
|
|
903
917
|
d[n] = {
|
|
904
918
|
init: function() {
|
|
905
919
|
this.appendDummyInput().appendField(
|
|
@@ -918,13 +932,13 @@ const $o = (t, e) => {
|
|
|
918
932
|
return [a(l), c.ATOMIC];
|
|
919
933
|
};
|
|
920
934
|
};
|
|
921
|
-
for (const t in
|
|
922
|
-
const e =
|
|
935
|
+
for (const t in Re) {
|
|
936
|
+
const e = Re[t];
|
|
923
937
|
for (const n in e.items)
|
|
924
|
-
|
|
938
|
+
jo(n, e.items[n]);
|
|
925
939
|
}
|
|
926
|
-
const
|
|
927
|
-
const n =
|
|
940
|
+
const Xo = (t, e) => {
|
|
941
|
+
const n = ct(t), o = Je(t);
|
|
928
942
|
d[n] = {
|
|
929
943
|
init: function() {
|
|
930
944
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -978,8 +992,8 @@ const Ho = (t, e) => {
|
|
|
978
992
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
979
993
|
let u, r;
|
|
980
994
|
if (l.ui === "pixelInput") {
|
|
981
|
-
const p =
|
|
982
|
-
u = new
|
|
995
|
+
const p = No(this.value) ?? 0;
|
|
996
|
+
u = new St(
|
|
983
997
|
p,
|
|
984
998
|
l.min,
|
|
985
999
|
l.max,
|
|
@@ -989,8 +1003,8 @@ const Ho = (t, e) => {
|
|
|
989
1003
|
}
|
|
990
1004
|
), r = "px";
|
|
991
1005
|
} else if (l.ui === "percentInput") {
|
|
992
|
-
const p =
|
|
993
|
-
u = new
|
|
1006
|
+
const p = Lo(this.value) ?? 0;
|
|
1007
|
+
u = new St(
|
|
994
1008
|
p,
|
|
995
1009
|
l.min,
|
|
996
1010
|
l.max,
|
|
@@ -1015,12 +1029,12 @@ const Ho = (t, e) => {
|
|
|
1015
1029
|
return [a(i.value), c.ATOMIC];
|
|
1016
1030
|
};
|
|
1017
1031
|
};
|
|
1018
|
-
for (const t in
|
|
1019
|
-
const e =
|
|
1032
|
+
for (const t in Re) {
|
|
1033
|
+
const e = Re[t];
|
|
1020
1034
|
for (const n in e.types)
|
|
1021
|
-
|
|
1035
|
+
Xo(n, e.types[n]);
|
|
1022
1036
|
}
|
|
1023
|
-
const
|
|
1037
|
+
const Jo = {
|
|
1024
1038
|
init: function() {
|
|
1025
1039
|
this.node = {
|
|
1026
1040
|
id: "",
|
|
@@ -1031,7 +1045,7 @@ const Go = {
|
|
|
1031
1045
|
initData_: function() {
|
|
1032
1046
|
if (this.node.id)
|
|
1033
1047
|
return;
|
|
1034
|
-
const t =
|
|
1048
|
+
const t = Ce()?.[0];
|
|
1035
1049
|
if (!t)
|
|
1036
1050
|
return;
|
|
1037
1051
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
@@ -1049,7 +1063,7 @@ const Go = {
|
|
|
1049
1063
|
}, 0);
|
|
1050
1064
|
},
|
|
1051
1065
|
genNodeOpts_: function() {
|
|
1052
|
-
return
|
|
1066
|
+
return we();
|
|
1053
1067
|
},
|
|
1054
1068
|
onchange: function(t) {
|
|
1055
1069
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1064,7 +1078,7 @@ const Go = {
|
|
|
1064
1078
|
}
|
|
1065
1079
|
},
|
|
1066
1080
|
onNodeChange_: function(t) {
|
|
1067
|
-
const e =
|
|
1081
|
+
const e = Y(t);
|
|
1068
1082
|
if (!e) {
|
|
1069
1083
|
console.assert(!1);
|
|
1070
1084
|
return;
|
|
@@ -1072,7 +1086,7 @@ const Go = {
|
|
|
1072
1086
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1073
1087
|
},
|
|
1074
1088
|
checkWarning_: function() {
|
|
1075
|
-
const t =
|
|
1089
|
+
const t = Y(this.node.id);
|
|
1076
1090
|
if (!t) {
|
|
1077
1091
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1078
1092
|
return;
|
|
@@ -1084,12 +1098,12 @@ const Go = {
|
|
|
1084
1098
|
this.node.alias !== t.alias && (this.node.alias = t.alias), this.setWarningText(null);
|
|
1085
1099
|
}
|
|
1086
1100
|
};
|
|
1087
|
-
d.get_node_v1 =
|
|
1101
|
+
d.get_node_v1 = Jo;
|
|
1088
1102
|
s.forBlock.get_node_v1 = function(t) {
|
|
1089
1103
|
const e = t;
|
|
1090
1104
|
return [s.quote_(e.node.id), c.ATOMIC];
|
|
1091
1105
|
};
|
|
1092
|
-
const
|
|
1106
|
+
const qo = {
|
|
1093
1107
|
init: function() {
|
|
1094
1108
|
this.node = {
|
|
1095
1109
|
id: "",
|
|
@@ -1103,13 +1117,13 @@ const Wo = {
|
|
|
1103
1117
|
initData_: function() {
|
|
1104
1118
|
if (this.node.id)
|
|
1105
1119
|
return;
|
|
1106
|
-
const t =
|
|
1120
|
+
const t = Ce()?.[0];
|
|
1107
1121
|
if (!t)
|
|
1108
1122
|
return;
|
|
1109
1123
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1110
1124
|
const e = this.getField("NODE");
|
|
1111
1125
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1112
|
-
const n =
|
|
1126
|
+
const n = Ue(this.node.id)?.[0];
|
|
1113
1127
|
if (!n)
|
|
1114
1128
|
return;
|
|
1115
1129
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -1128,10 +1142,10 @@ const Wo = {
|
|
|
1128
1142
|
}, 0);
|
|
1129
1143
|
},
|
|
1130
1144
|
genNodeOpts_: function() {
|
|
1131
|
-
return
|
|
1145
|
+
return we();
|
|
1132
1146
|
},
|
|
1133
1147
|
genPropOpts_: function() {
|
|
1134
|
-
return
|
|
1148
|
+
return kn(this.node.id);
|
|
1135
1149
|
},
|
|
1136
1150
|
onchange: function(t) {
|
|
1137
1151
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1146,7 +1160,7 @@ const Wo = {
|
|
|
1146
1160
|
}
|
|
1147
1161
|
},
|
|
1148
1162
|
onNodeChange_: function(t) {
|
|
1149
|
-
const e =
|
|
1163
|
+
const e = Y(t);
|
|
1150
1164
|
if (!e) {
|
|
1151
1165
|
console.assert(!1);
|
|
1152
1166
|
return;
|
|
@@ -1155,7 +1169,7 @@ const Wo = {
|
|
|
1155
1169
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1156
1170
|
const o = this.getField("PROP");
|
|
1157
1171
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
1158
|
-
const a =
|
|
1172
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
1159
1173
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1160
1174
|
}
|
|
1161
1175
|
},
|
|
@@ -1164,7 +1178,7 @@ const Wo = {
|
|
|
1164
1178
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1165
1179
|
},
|
|
1166
1180
|
checkWarning_: function() {
|
|
1167
|
-
const t =
|
|
1181
|
+
const t = Y(this.node.id);
|
|
1168
1182
|
if (!t) {
|
|
1169
1183
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1170
1184
|
return;
|
|
@@ -1182,12 +1196,12 @@ const Wo = {
|
|
|
1182
1196
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1183
1197
|
}
|
|
1184
1198
|
};
|
|
1185
|
-
d.get_node_prop_v1 =
|
|
1199
|
+
d.get_node_prop_v1 = qo;
|
|
1186
1200
|
s.forBlock.get_node_prop_v1 = function(t) {
|
|
1187
1201
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys);
|
|
1188
1202
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1189
1203
|
};
|
|
1190
|
-
const
|
|
1204
|
+
const Qo = {
|
|
1191
1205
|
init: function() {
|
|
1192
1206
|
this.element = {
|
|
1193
1207
|
key: "",
|
|
@@ -1200,16 +1214,16 @@ const jo = {
|
|
|
1200
1214
|
initData_: function() {
|
|
1201
1215
|
if (this.element.key)
|
|
1202
1216
|
return;
|
|
1203
|
-
const t =
|
|
1217
|
+
const t = Ye()?.[0];
|
|
1204
1218
|
if (!t)
|
|
1205
1219
|
return;
|
|
1206
1220
|
this.element.key = t.key, this.element.name = t.name;
|
|
1207
1221
|
const e = this.getField("ELEMENT");
|
|
1208
1222
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1209
|
-
const n =
|
|
1223
|
+
const n = De(this.element.key)?.[0];
|
|
1210
1224
|
if (!n)
|
|
1211
1225
|
return;
|
|
1212
|
-
this.prop.keys = n.keys, this.prop.names =
|
|
1226
|
+
this.prop.keys = n.keys, this.prop.names = Se(n.names);
|
|
1213
1227
|
const o = this.getField("PROP");
|
|
1214
1228
|
o.getOptions(!1), o.setValue(this.prop.keys);
|
|
1215
1229
|
},
|
|
@@ -1225,10 +1239,10 @@ const jo = {
|
|
|
1225
1239
|
}, 0);
|
|
1226
1240
|
},
|
|
1227
1241
|
genElementOpts_: function() {
|
|
1228
|
-
return
|
|
1242
|
+
return Ae();
|
|
1229
1243
|
},
|
|
1230
1244
|
genPropOpts_: function() {
|
|
1231
|
-
return
|
|
1245
|
+
return Cn(this.element.key);
|
|
1232
1246
|
},
|
|
1233
1247
|
onchange: function(t) {
|
|
1234
1248
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1243,7 +1257,7 @@ const jo = {
|
|
|
1243
1257
|
}
|
|
1244
1258
|
},
|
|
1245
1259
|
onElementChange_: function(t) {
|
|
1246
|
-
const e =
|
|
1260
|
+
const e = re(t);
|
|
1247
1261
|
if (!e) {
|
|
1248
1262
|
console.assert(!1);
|
|
1249
1263
|
return;
|
|
@@ -1252,7 +1266,7 @@ const jo = {
|
|
|
1252
1266
|
this.element.key = e.key, this.element.name = e.name;
|
|
1253
1267
|
const o = this.getField("PROP");
|
|
1254
1268
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
1255
|
-
const a =
|
|
1269
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
1256
1270
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
1257
1271
|
}
|
|
1258
1272
|
},
|
|
@@ -1261,7 +1275,7 @@ const jo = {
|
|
|
1261
1275
|
e ? (this.prop.keys = e.keys, this.prop.names = e.names) : (this.prop.keys = "", this.prop.names = []);
|
|
1262
1276
|
},
|
|
1263
1277
|
checkWarning_: function() {
|
|
1264
|
-
const t =
|
|
1278
|
+
const t = re(this.element.key);
|
|
1265
1279
|
if (!t) {
|
|
1266
1280
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1267
1281
|
return;
|
|
@@ -1275,29 +1289,29 @@ const jo = {
|
|
|
1275
1289
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
1276
1290
|
}
|
|
1277
1291
|
};
|
|
1278
|
-
d.get_node_prop_as_v1 =
|
|
1292
|
+
d.get_node_prop_as_v1 = Qo;
|
|
1279
1293
|
s.forBlock.get_node_prop_as_v1 = function(t) {
|
|
1280
1294
|
const e = t, n = s.valueToCode(e, "NODE", c.ATOMIC) || "null", o = s.quote_(e.prop.keys);
|
|
1281
1295
|
return [`__getNodePropV1__(${n}, ${o})`, c.ATOMIC];
|
|
1282
1296
|
};
|
|
1283
|
-
function
|
|
1297
|
+
function zo() {
|
|
1284
1298
|
if (T.app.activeObject.type !== "page" || T.app.activePage.meta.arguments.length > 0) return !1;
|
|
1285
1299
|
}
|
|
1286
|
-
function
|
|
1300
|
+
function Nn() {
|
|
1287
1301
|
return T.app.activePage.meta.arguments;
|
|
1288
1302
|
}
|
|
1289
|
-
function
|
|
1303
|
+
function tn(t) {
|
|
1290
1304
|
return T.app.activePage.meta.arguments.find(
|
|
1291
1305
|
(e) => e.id === t
|
|
1292
1306
|
);
|
|
1293
1307
|
}
|
|
1294
|
-
function
|
|
1308
|
+
function Zo() {
|
|
1295
1309
|
const t = [];
|
|
1296
|
-
return
|
|
1310
|
+
return Nn().forEach(({ id: n, name: o }) => {
|
|
1297
1311
|
t.push([o, n]);
|
|
1298
1312
|
}), N(t);
|
|
1299
1313
|
}
|
|
1300
|
-
const
|
|
1314
|
+
const ei = {
|
|
1301
1315
|
init: function() {
|
|
1302
1316
|
this.argument = {
|
|
1303
1317
|
id: "",
|
|
@@ -1319,7 +1333,7 @@ const qo = {
|
|
|
1319
1333
|
}, 0);
|
|
1320
1334
|
},
|
|
1321
1335
|
genArgumentOpts_: function() {
|
|
1322
|
-
return
|
|
1336
|
+
return Zo();
|
|
1323
1337
|
},
|
|
1324
1338
|
onchange: function(t) {
|
|
1325
1339
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1334,7 +1348,7 @@ const qo = {
|
|
|
1334
1348
|
}
|
|
1335
1349
|
},
|
|
1336
1350
|
onArgumentChange_: function(t) {
|
|
1337
|
-
const e =
|
|
1351
|
+
const e = tn(t);
|
|
1338
1352
|
if (!e) {
|
|
1339
1353
|
console.assert(!1);
|
|
1340
1354
|
return;
|
|
@@ -1345,7 +1359,7 @@ const qo = {
|
|
|
1345
1359
|
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
1360
|
},
|
|
1347
1361
|
checkWarning_: function() {
|
|
1348
|
-
const t =
|
|
1362
|
+
const t = tn(this.argument.id);
|
|
1349
1363
|
if (!t) {
|
|
1350
1364
|
this.setWarningText(_.WARN_ARGUMENT_NOT_FOUND);
|
|
1351
1365
|
return;
|
|
@@ -1357,59 +1371,59 @@ const qo = {
|
|
|
1357
1371
|
this.setWarningText(null);
|
|
1358
1372
|
}
|
|
1359
1373
|
};
|
|
1360
|
-
d.get_page_argument_v1 =
|
|
1374
|
+
d.get_page_argument_v1 = ei;
|
|
1361
1375
|
s.forBlock.get_page_argument_v1 = function(t) {
|
|
1362
1376
|
const e = t;
|
|
1363
1377
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.id)})`, c.FUNCTION_CALL];
|
|
1364
1378
|
};
|
|
1365
|
-
function
|
|
1379
|
+
function Ht() {
|
|
1366
1380
|
return T.app.appList;
|
|
1367
1381
|
}
|
|
1368
|
-
function
|
|
1382
|
+
function nn(t) {
|
|
1369
1383
|
return T.app.appList.find((e) => e.id === t);
|
|
1370
1384
|
}
|
|
1371
|
-
function
|
|
1385
|
+
function ti() {
|
|
1372
1386
|
const t = [];
|
|
1373
|
-
return
|
|
1387
|
+
return Ht().forEach(({ id: n, name: o }) => {
|
|
1374
1388
|
t.push([o, n]);
|
|
1375
1389
|
}), N(t);
|
|
1376
1390
|
}
|
|
1377
|
-
function
|
|
1391
|
+
function xt(t) {
|
|
1378
1392
|
const e = T.app.appList.find((n) => n.id === t);
|
|
1379
1393
|
return e ? e.pages : [];
|
|
1380
1394
|
}
|
|
1381
|
-
function
|
|
1395
|
+
function kt(t, e) {
|
|
1382
1396
|
const n = T.app.appList.find((o) => o.id === t);
|
|
1383
1397
|
if (n)
|
|
1384
1398
|
return n.pages.find((o) => o.id === e);
|
|
1385
1399
|
}
|
|
1386
|
-
function
|
|
1400
|
+
function ni(t) {
|
|
1387
1401
|
const e = [];
|
|
1388
|
-
return
|
|
1402
|
+
return xt(t).forEach(({ id: o, name: i }) => {
|
|
1389
1403
|
e.push([i, o]);
|
|
1390
1404
|
}), N(e);
|
|
1391
1405
|
}
|
|
1392
|
-
const
|
|
1406
|
+
const Ln = {
|
|
1393
1407
|
id: "",
|
|
1394
1408
|
groupid: "",
|
|
1395
1409
|
name: "",
|
|
1396
1410
|
position: 0
|
|
1397
1411
|
};
|
|
1398
|
-
function
|
|
1412
|
+
function Sn() {
|
|
1399
1413
|
const { comps: t } = T.app.activeApp;
|
|
1400
|
-
return [
|
|
1414
|
+
return [Ln, ...t];
|
|
1401
1415
|
}
|
|
1402
|
-
function
|
|
1403
|
-
return t === "" ?
|
|
1416
|
+
function on(t) {
|
|
1417
|
+
return t === "" ? Ln : T.app.activeApp.comps.find((e) => e.id === t);
|
|
1404
1418
|
}
|
|
1405
|
-
function
|
|
1419
|
+
function oi() {
|
|
1406
1420
|
const { i18n: t } = ie, e = [];
|
|
1407
|
-
return
|
|
1421
|
+
return Sn().forEach(({ id: o, name: i }) => {
|
|
1408
1422
|
let a = i;
|
|
1409
1423
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
1410
1424
|
}), N(e);
|
|
1411
1425
|
}
|
|
1412
|
-
const
|
|
1426
|
+
const ii = {
|
|
1413
1427
|
init: function() {
|
|
1414
1428
|
this.app = {
|
|
1415
1429
|
id: "",
|
|
@@ -1422,13 +1436,13 @@ const ei = {
|
|
|
1422
1436
|
initData_: function() {
|
|
1423
1437
|
if (this.app.id)
|
|
1424
1438
|
return;
|
|
1425
|
-
const t =
|
|
1439
|
+
const t = Ht()?.[0];
|
|
1426
1440
|
if (!t)
|
|
1427
1441
|
return;
|
|
1428
1442
|
this.app.id = t.id, this.app.name = t.name;
|
|
1429
1443
|
const e = this.getField("APP");
|
|
1430
1444
|
e.getOptions(!1), e.setValue(this.app.id);
|
|
1431
|
-
const n =
|
|
1445
|
+
const n = xt(this.app.id)?.[0];
|
|
1432
1446
|
if (!n)
|
|
1433
1447
|
return;
|
|
1434
1448
|
this.page.id = n.id, this.page.name = n.name;
|
|
@@ -1447,10 +1461,10 @@ const ei = {
|
|
|
1447
1461
|
}, 0);
|
|
1448
1462
|
},
|
|
1449
1463
|
genAppOpts_: function() {
|
|
1450
|
-
return
|
|
1464
|
+
return ti();
|
|
1451
1465
|
},
|
|
1452
1466
|
genPageOpts_: function() {
|
|
1453
|
-
return
|
|
1467
|
+
return ni(this.app.id);
|
|
1454
1468
|
},
|
|
1455
1469
|
onchange: function(t) {
|
|
1456
1470
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1465,7 +1479,7 @@ const ei = {
|
|
|
1465
1479
|
}
|
|
1466
1480
|
},
|
|
1467
1481
|
onAppChange_: function(t) {
|
|
1468
|
-
const e =
|
|
1482
|
+
const e = nn(t);
|
|
1469
1483
|
if (!e) {
|
|
1470
1484
|
console.assert(!1);
|
|
1471
1485
|
return;
|
|
@@ -1473,23 +1487,23 @@ const ei = {
|
|
|
1473
1487
|
const n = this.app.id !== e.id;
|
|
1474
1488
|
this.app.id = e.id, this.app.name = e.name;
|
|
1475
1489
|
const o = this.getField("PAGE");
|
|
1476
|
-
if (o.getOptions(!1), n || !
|
|
1477
|
-
const a =
|
|
1490
|
+
if (o.getOptions(!1), n || !kt(this.app.id, this.page.id)) {
|
|
1491
|
+
const a = xt(this.app.id)?.[0]?.id ?? "";
|
|
1478
1492
|
o.setValue(a), this.page.id === a && this.onPageChange_(a);
|
|
1479
1493
|
}
|
|
1480
1494
|
},
|
|
1481
1495
|
onPageChange_: function(t) {
|
|
1482
|
-
const e =
|
|
1496
|
+
const e = kt(this.app.id, t);
|
|
1483
1497
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
1484
1498
|
},
|
|
1485
1499
|
checkWarning_: function() {
|
|
1486
|
-
const t =
|
|
1500
|
+
const t = nn(this.app.id);
|
|
1487
1501
|
if (!t) {
|
|
1488
1502
|
this.setWarningText(_.WARN_APP_NOT_FOUND);
|
|
1489
1503
|
return;
|
|
1490
1504
|
}
|
|
1491
1505
|
t.name !== this.app.name && (this.app.name = t.name);
|
|
1492
|
-
const e =
|
|
1506
|
+
const e = kt(this.app.id, this.page.id);
|
|
1493
1507
|
if (!e) {
|
|
1494
1508
|
this.setWarningText(_.WARN_PAGE_NOT_FOUND);
|
|
1495
1509
|
return;
|
|
@@ -1497,13 +1511,13 @@ const ei = {
|
|
|
1497
1511
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
1498
1512
|
}
|
|
1499
1513
|
};
|
|
1500
|
-
d.navigate_to_v1 =
|
|
1514
|
+
d.navigate_to_v1 = ii;
|
|
1501
1515
|
s.forBlock.navigate_to_v1 = function(t) {
|
|
1502
1516
|
const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
|
|
1503
1517
|
return `__navigateToV1__(${n}, ${o});
|
|
1504
1518
|
`;
|
|
1505
1519
|
};
|
|
1506
|
-
const
|
|
1520
|
+
const si = {
|
|
1507
1521
|
init: function() {
|
|
1508
1522
|
this.node = {
|
|
1509
1523
|
id: "",
|
|
@@ -1518,13 +1532,13 @@ const ti = {
|
|
|
1518
1532
|
initData_: function() {
|
|
1519
1533
|
if (this.node.id)
|
|
1520
1534
|
return;
|
|
1521
|
-
const t =
|
|
1535
|
+
const t = Ce("event")?.[0];
|
|
1522
1536
|
if (!t)
|
|
1523
1537
|
return;
|
|
1524
1538
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
1525
1539
|
const e = this.getField("NODE");
|
|
1526
1540
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
1527
|
-
const n =
|
|
1541
|
+
const n = Mt(this.node.id)?.[0];
|
|
1528
1542
|
if (!n)
|
|
1529
1543
|
return;
|
|
1530
1544
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1543,10 +1557,10 @@ const ti = {
|
|
|
1543
1557
|
}, 0);
|
|
1544
1558
|
},
|
|
1545
1559
|
genNodeOpts_: function() {
|
|
1546
|
-
return
|
|
1560
|
+
return we("event");
|
|
1547
1561
|
},
|
|
1548
1562
|
genEventOpts_: function() {
|
|
1549
|
-
return
|
|
1563
|
+
return Fo(this.node.id);
|
|
1550
1564
|
},
|
|
1551
1565
|
onchange: function(t) {
|
|
1552
1566
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1561,7 +1575,7 @@ const ti = {
|
|
|
1561
1575
|
}
|
|
1562
1576
|
},
|
|
1563
1577
|
onNodeChange_: function(t) {
|
|
1564
|
-
const e =
|
|
1578
|
+
const e = Y(t);
|
|
1565
1579
|
if (!e) {
|
|
1566
1580
|
console.assert(!1);
|
|
1567
1581
|
return;
|
|
@@ -1569,13 +1583,13 @@ const ti = {
|
|
|
1569
1583
|
const n = this.node.key !== e.key;
|
|
1570
1584
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
1571
1585
|
const o = this.getField("EVENT");
|
|
1572
|
-
if (o.getOptions(!1), n || !
|
|
1573
|
-
const a =
|
|
1586
|
+
if (o.getOptions(!1), n || !At(this.node.id, this.event.key)) {
|
|
1587
|
+
const a = Mt(this.node.id)?.[0]?.key ?? "";
|
|
1574
1588
|
o.setValue(a), this.event.key === a && this.onEventChange_(a);
|
|
1575
1589
|
}
|
|
1576
1590
|
},
|
|
1577
1591
|
onEventChange_: function(t) {
|
|
1578
|
-
const e =
|
|
1592
|
+
const e = At(this.node.id, t);
|
|
1579
1593
|
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
1594
|
this.ensureBlocks_();
|
|
1581
1595
|
}, 0);
|
|
@@ -1597,7 +1611,7 @@ const ti = {
|
|
|
1597
1611
|
}), t.length > 0 && F(this, t);
|
|
1598
1612
|
},
|
|
1599
1613
|
checkWarning_: function() {
|
|
1600
|
-
const t =
|
|
1614
|
+
const t = Y(this.node.id);
|
|
1601
1615
|
if (!t) {
|
|
1602
1616
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
1603
1617
|
return;
|
|
@@ -1607,7 +1621,7 @@ const ti = {
|
|
|
1607
1621
|
return;
|
|
1608
1622
|
}
|
|
1609
1623
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
1610
|
-
const e =
|
|
1624
|
+
const e = At(this.node.id, this.event.key);
|
|
1611
1625
|
if (!e) {
|
|
1612
1626
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1613
1627
|
return;
|
|
@@ -1619,7 +1633,7 @@ const ti = {
|
|
|
1619
1633
|
this.setWarningText(null);
|
|
1620
1634
|
}
|
|
1621
1635
|
};
|
|
1622
|
-
d.on_node_event_v1 =
|
|
1636
|
+
d.on_node_event_v1 = si;
|
|
1623
1637
|
s.forBlock.on_node_event_v1 = function(t) {
|
|
1624
1638
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.event.key);
|
|
1625
1639
|
let i = "";
|
|
@@ -1631,7 +1645,7 @@ s.forBlock.on_node_event_v1 = function(t) {
|
|
|
1631
1645
|
${a}});
|
|
1632
1646
|
`;
|
|
1633
1647
|
};
|
|
1634
|
-
const
|
|
1648
|
+
const ai = {
|
|
1635
1649
|
init: function() {
|
|
1636
1650
|
this.element = {
|
|
1637
1651
|
key: "",
|
|
@@ -1645,13 +1659,13 @@ const ni = {
|
|
|
1645
1659
|
initData_: function() {
|
|
1646
1660
|
if (this.element.key)
|
|
1647
1661
|
return;
|
|
1648
|
-
const t =
|
|
1662
|
+
const t = Ye("event")?.[0];
|
|
1649
1663
|
if (!t)
|
|
1650
1664
|
return;
|
|
1651
1665
|
this.element.key = t.key, this.element.name = t.name;
|
|
1652
1666
|
const e = this.getField("ELEMENT");
|
|
1653
1667
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
1654
|
-
const n =
|
|
1668
|
+
const n = Dt(this.element.key)?.[0];
|
|
1655
1669
|
if (!n)
|
|
1656
1670
|
return;
|
|
1657
1671
|
this.event.key = n.key, this.event.name = n.name, this.event.params = n.params;
|
|
@@ -1670,10 +1684,10 @@ const ni = {
|
|
|
1670
1684
|
}, 0);
|
|
1671
1685
|
},
|
|
1672
1686
|
genElementOpts_: function() {
|
|
1673
|
-
return
|
|
1687
|
+
return Ae("event");
|
|
1674
1688
|
},
|
|
1675
1689
|
genEventOpts_: function() {
|
|
1676
|
-
return
|
|
1690
|
+
return Vo(this.element.key);
|
|
1677
1691
|
},
|
|
1678
1692
|
onchange: function(t) {
|
|
1679
1693
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1688,7 +1702,7 @@ const ni = {
|
|
|
1688
1702
|
}
|
|
1689
1703
|
},
|
|
1690
1704
|
onElementChange_: function(t) {
|
|
1691
|
-
const e =
|
|
1705
|
+
const e = re(t);
|
|
1692
1706
|
if (!e) {
|
|
1693
1707
|
console.assert(!1);
|
|
1694
1708
|
return;
|
|
@@ -1696,13 +1710,13 @@ const ni = {
|
|
|
1696
1710
|
const n = this.element.key !== e.key;
|
|
1697
1711
|
this.element.key = e.key, this.element.name = e.name;
|
|
1698
1712
|
const o = this.getField("EVENT");
|
|
1699
|
-
if (o.getOptions(!1), n || !
|
|
1700
|
-
const a =
|
|
1713
|
+
if (o.getOptions(!1), n || !gt(this.element.key, this.event.key)) {
|
|
1714
|
+
const a = Dt(this.element.key)?.[0]?.key ?? "";
|
|
1701
1715
|
o.setValue(a, !1), this.event.key !== a && this.onEventChange_(a);
|
|
1702
1716
|
}
|
|
1703
1717
|
},
|
|
1704
1718
|
onEventChange_: function(t) {
|
|
1705
|
-
const e =
|
|
1719
|
+
const e = gt(this.element.key, t);
|
|
1706
1720
|
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
1721
|
this.ensureBlocks_();
|
|
1708
1722
|
}, 0);
|
|
@@ -1724,13 +1738,13 @@ const ni = {
|
|
|
1724
1738
|
}), t.length > 0 && F(this, t);
|
|
1725
1739
|
},
|
|
1726
1740
|
checkWarning_: function() {
|
|
1727
|
-
const t =
|
|
1741
|
+
const t = re(this.element.key);
|
|
1728
1742
|
if (!t) {
|
|
1729
1743
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
1730
1744
|
return;
|
|
1731
1745
|
}
|
|
1732
1746
|
t.name !== this.element.name && (this.element.name = t.name);
|
|
1733
|
-
const e =
|
|
1747
|
+
const e = gt(this.element.key, this.event.key);
|
|
1734
1748
|
if (!e) {
|
|
1735
1749
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
1736
1750
|
return;
|
|
@@ -1742,7 +1756,7 @@ const ni = {
|
|
|
1742
1756
|
this.setWarningText(null);
|
|
1743
1757
|
}
|
|
1744
1758
|
};
|
|
1745
|
-
d.on_node_event_as_v1 =
|
|
1759
|
+
d.on_node_event_as_v1 = ai;
|
|
1746
1760
|
s.forBlock.on_node_event_as_v1 = function(t) {
|
|
1747
1761
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.event.key);
|
|
1748
1762
|
let i = "";
|
|
@@ -1754,7 +1768,7 @@ s.forBlock.on_node_event_as_v1 = function(t) {
|
|
|
1754
1768
|
${a}});
|
|
1755
1769
|
`;
|
|
1756
1770
|
};
|
|
1757
|
-
const
|
|
1771
|
+
const ci = {
|
|
1758
1772
|
init: function() {
|
|
1759
1773
|
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
1774
|
},
|
|
@@ -1783,7 +1797,7 @@ const oi = {
|
|
|
1783
1797
|
]);
|
|
1784
1798
|
}
|
|
1785
1799
|
};
|
|
1786
|
-
d.open_confirm_dlg_v1 =
|
|
1800
|
+
d.open_confirm_dlg_v1 = ci;
|
|
1787
1801
|
s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
1788
1802
|
const e = s.valueToCode(t, "TITLE", c.ATOMIC), n = s.valueToCode(t, "TEXT", c.ATOMIC), o = s.statementToCode(t, "HANDLE");
|
|
1789
1803
|
return `{
|
|
@@ -1791,7 +1805,7 @@ s.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
1791
1805
|
${o}}
|
|
1792
1806
|
`;
|
|
1793
1807
|
};
|
|
1794
|
-
const
|
|
1808
|
+
const li = {
|
|
1795
1809
|
init: function() {
|
|
1796
1810
|
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
1811
|
},
|
|
@@ -1822,7 +1836,7 @@ const ii = {
|
|
|
1822
1836
|
]);
|
|
1823
1837
|
}
|
|
1824
1838
|
};
|
|
1825
|
-
d.open_prompt_dlg_v1 =
|
|
1839
|
+
d.open_prompt_dlg_v1 = li;
|
|
1826
1840
|
s.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
1827
1841
|
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
1842
|
return `{
|
|
@@ -1862,7 +1876,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1862
1876
|
return `__messageV1__(${e}, ${n});
|
|
1863
1877
|
`;
|
|
1864
1878
|
};
|
|
1865
|
-
const
|
|
1879
|
+
const ui = {
|
|
1866
1880
|
init: function() {
|
|
1867
1881
|
this.comp = {
|
|
1868
1882
|
id: void 0,
|
|
@@ -1872,7 +1886,7 @@ const si = {
|
|
|
1872
1886
|
initData_: function() {
|
|
1873
1887
|
if (this.comp.id !== void 0)
|
|
1874
1888
|
return;
|
|
1875
|
-
const t =
|
|
1889
|
+
const t = Sn()?.[0];
|
|
1876
1890
|
if (!t)
|
|
1877
1891
|
return;
|
|
1878
1892
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -1890,7 +1904,7 @@ const si = {
|
|
|
1890
1904
|
}, 0);
|
|
1891
1905
|
},
|
|
1892
1906
|
genCompOpts_: function() {
|
|
1893
|
-
return
|
|
1907
|
+
return oi();
|
|
1894
1908
|
},
|
|
1895
1909
|
onchange: function(t) {
|
|
1896
1910
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1905,7 +1919,7 @@ const si = {
|
|
|
1905
1919
|
}
|
|
1906
1920
|
},
|
|
1907
1921
|
onCompChange_: function(t) {
|
|
1908
|
-
const e =
|
|
1922
|
+
const e = on(t);
|
|
1909
1923
|
if (!e) {
|
|
1910
1924
|
console.assert(!1);
|
|
1911
1925
|
return;
|
|
@@ -1917,19 +1931,19 @@ const si = {
|
|
|
1917
1931
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1918
1932
|
return;
|
|
1919
1933
|
}
|
|
1920
|
-
if (!
|
|
1934
|
+
if (!on(this.comp.id)) {
|
|
1921
1935
|
this.setWarningText(_.WARN_COMP_NOT_FOUND);
|
|
1922
1936
|
return;
|
|
1923
1937
|
}
|
|
1924
1938
|
this.setWarningText(null);
|
|
1925
1939
|
}
|
|
1926
1940
|
};
|
|
1927
|
-
d.select_comp_v1 =
|
|
1941
|
+
d.select_comp_v1 = ui;
|
|
1928
1942
|
s.forBlock.select_comp_v1 = function(t) {
|
|
1929
1943
|
const e = s.quote_, o = t.comp.id ?? "";
|
|
1930
1944
|
return [e(o), c.ATOMIC];
|
|
1931
1945
|
};
|
|
1932
|
-
const
|
|
1946
|
+
const ri = {
|
|
1933
1947
|
init: function() {
|
|
1934
1948
|
this.method = {
|
|
1935
1949
|
id: "",
|
|
@@ -1943,13 +1957,13 @@ const ai = {
|
|
|
1943
1957
|
initData_: function() {
|
|
1944
1958
|
if (this.method.id)
|
|
1945
1959
|
return;
|
|
1946
|
-
const t =
|
|
1960
|
+
const t = Me()?.[0];
|
|
1947
1961
|
if (!t)
|
|
1948
1962
|
return;
|
|
1949
1963
|
this.method.id = t.id, this.method.name = t.name;
|
|
1950
1964
|
const e = this.getField("METHOD");
|
|
1951
1965
|
e.getOptions(!1), e.setValue(this.method.id);
|
|
1952
|
-
const n =
|
|
1966
|
+
const n = Vt(this.method.id)?.[0];
|
|
1953
1967
|
if (!n)
|
|
1954
1968
|
return;
|
|
1955
1969
|
this.output.id = n.id, this.output.name = n.name, this.output.type = n.type;
|
|
@@ -1967,10 +1981,10 @@ const ai = {
|
|
|
1967
1981
|
}, 0);
|
|
1968
1982
|
},
|
|
1969
1983
|
genMethodOpts_: function() {
|
|
1970
|
-
return
|
|
1984
|
+
return vn();
|
|
1971
1985
|
},
|
|
1972
1986
|
genOutputOpts_: function() {
|
|
1973
|
-
return
|
|
1987
|
+
return Ho(this.method.id);
|
|
1974
1988
|
},
|
|
1975
1989
|
onchange: function(t) {
|
|
1976
1990
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -1986,7 +2000,7 @@ const ai = {
|
|
|
1986
2000
|
}, 0);
|
|
1987
2001
|
},
|
|
1988
2002
|
onMethodChange_: function(t) {
|
|
1989
|
-
const e =
|
|
2003
|
+
const e = qe(t);
|
|
1990
2004
|
if (!e) {
|
|
1991
2005
|
console.assert(!1);
|
|
1992
2006
|
return;
|
|
@@ -1994,13 +2008,13 @@ const ai = {
|
|
|
1994
2008
|
const n = this.method.id !== e.id;
|
|
1995
2009
|
this.method.id = e.id, this.method.name = e.name;
|
|
1996
2010
|
const o = this.getField("OUTPUT");
|
|
1997
|
-
if (o.getOptions(!1), n || !
|
|
1998
|
-
const a =
|
|
2011
|
+
if (o.getOptions(!1), n || !Ct(this.method.id, this.output.id)) {
|
|
2012
|
+
const a = Vt(this.method.id)?.[0]?.id ?? "";
|
|
1999
2013
|
o.setValue(a), this.output.id === a && this.onOutputChange_(a);
|
|
2000
2014
|
}
|
|
2001
2015
|
},
|
|
2002
2016
|
onOutputChange_: function(t) {
|
|
2003
|
-
const e =
|
|
2017
|
+
const e = Ct(this.method.id, t);
|
|
2004
2018
|
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
2019
|
},
|
|
2006
2020
|
updateShape_: function() {
|
|
@@ -2019,13 +2033,13 @@ const ai = {
|
|
|
2019
2033
|
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
2034
|
},
|
|
2021
2035
|
checkWarning_: function() {
|
|
2022
|
-
const t =
|
|
2036
|
+
const t = qe(this.method.id);
|
|
2023
2037
|
if (!t) {
|
|
2024
2038
|
this.setWarningText(_.WARN_METHOD_NOT_FOUND);
|
|
2025
2039
|
return;
|
|
2026
2040
|
}
|
|
2027
2041
|
t.name !== this.method.name && (this.method.name = t.name);
|
|
2028
|
-
const e =
|
|
2042
|
+
const e = Ct(this.method.id, this.output.id);
|
|
2029
2043
|
if (!e) {
|
|
2030
2044
|
this.setWarningText(_.WARN_OUTPUT_NOT_FOUND);
|
|
2031
2045
|
return;
|
|
@@ -2037,7 +2051,7 @@ const ai = {
|
|
|
2037
2051
|
this.setWarningText(null);
|
|
2038
2052
|
}
|
|
2039
2053
|
};
|
|
2040
|
-
d.set_comp_method_output_v1 =
|
|
2054
|
+
d.set_comp_method_output_v1 = ri;
|
|
2041
2055
|
s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
2042
2056
|
const e = t;
|
|
2043
2057
|
let n = s.valueToCode(e, "VALUE", c.ATOMIC);
|
|
@@ -2064,7 +2078,7 @@ s.forBlock.set_comp_method_output_v1 = function(t) {
|
|
|
2064
2078
|
return `__setCompMethodOutputV1__(${n});
|
|
2065
2079
|
`;
|
|
2066
2080
|
};
|
|
2067
|
-
const
|
|
2081
|
+
const _i = {
|
|
2068
2082
|
init: function() {
|
|
2069
2083
|
this.node = {
|
|
2070
2084
|
id: "",
|
|
@@ -2078,13 +2092,13 @@ const ci = {
|
|
|
2078
2092
|
initData_: function() {
|
|
2079
2093
|
if (this.node.id)
|
|
2080
2094
|
return;
|
|
2081
|
-
const t =
|
|
2095
|
+
const t = Ce()?.[0];
|
|
2082
2096
|
if (!t)
|
|
2083
2097
|
return;
|
|
2084
2098
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2085
2099
|
const e = this.getField("NODE");
|
|
2086
2100
|
e.getOptions(!1), e.setValue(this.node.id);
|
|
2087
|
-
const n =
|
|
2101
|
+
const n = Ue(this.node.id, !0)?.[0];
|
|
2088
2102
|
if (!n)
|
|
2089
2103
|
return;
|
|
2090
2104
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2103,10 +2117,10 @@ const ci = {
|
|
|
2103
2117
|
}, 0);
|
|
2104
2118
|
},
|
|
2105
2119
|
genNodeOpts_: function() {
|
|
2106
|
-
return
|
|
2120
|
+
return we();
|
|
2107
2121
|
},
|
|
2108
2122
|
genPropOpts_: function() {
|
|
2109
|
-
return
|
|
2123
|
+
return kn(this.node.id);
|
|
2110
2124
|
},
|
|
2111
2125
|
onchange: function(t) {
|
|
2112
2126
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2121,7 +2135,7 @@ const ci = {
|
|
|
2121
2135
|
}
|
|
2122
2136
|
},
|
|
2123
2137
|
onNodeChange_: function(t) {
|
|
2124
|
-
const e =
|
|
2138
|
+
const e = Y(t);
|
|
2125
2139
|
if (!e) {
|
|
2126
2140
|
console.assert(!1);
|
|
2127
2141
|
return;
|
|
@@ -2130,7 +2144,7 @@ const ci = {
|
|
|
2130
2144
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2131
2145
|
const o = this.getField("PROP");
|
|
2132
2146
|
if (o.getOptions(!1), n || !ae(this.node.id, this.prop.keys)) {
|
|
2133
|
-
const a =
|
|
2147
|
+
const a = Ue(this.node.id)?.[0]?.keys ?? "";
|
|
2134
2148
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2135
2149
|
}
|
|
2136
2150
|
},
|
|
@@ -2146,19 +2160,18 @@ const ci = {
|
|
|
2146
2160
|
return;
|
|
2147
2161
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2148
2162
|
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));
|
|
2163
|
+
const o = An(this.workspace, t.raw);
|
|
2164
|
+
o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2152
2165
|
},
|
|
2153
2166
|
updateCheck_: function() {
|
|
2154
2167
|
const t = ae(this.node.id, this.prop.keys);
|
|
2155
2168
|
if (!t)
|
|
2156
2169
|
return;
|
|
2157
|
-
const e =
|
|
2158
|
-
|
|
2170
|
+
const e = On(t.raw);
|
|
2171
|
+
this.getInput("VALUE").connection.setCheck(e);
|
|
2159
2172
|
},
|
|
2160
2173
|
checkWarning_: function() {
|
|
2161
|
-
const t =
|
|
2174
|
+
const t = Y(this.node.id);
|
|
2162
2175
|
if (!t) {
|
|
2163
2176
|
this.setWarningText(_.WARN_NODE_NOT_FOUND);
|
|
2164
2177
|
return;
|
|
@@ -2176,13 +2189,13 @@ const ci = {
|
|
|
2176
2189
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2177
2190
|
}
|
|
2178
2191
|
};
|
|
2179
|
-
d.set_node_prop_v1 =
|
|
2192
|
+
d.set_node_prop_v1 = _i;
|
|
2180
2193
|
s.forBlock.set_node_prop_v1 = function(t) {
|
|
2181
2194
|
const e = t, n = s.quote_(e.node.id), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2182
2195
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2183
2196
|
`;
|
|
2184
2197
|
};
|
|
2185
|
-
const
|
|
2198
|
+
const pi = {
|
|
2186
2199
|
init: function() {
|
|
2187
2200
|
this.element = {
|
|
2188
2201
|
key: "",
|
|
@@ -2195,13 +2208,13 @@ const li = {
|
|
|
2195
2208
|
initData_: function() {
|
|
2196
2209
|
if (this.element.key)
|
|
2197
2210
|
return;
|
|
2198
|
-
const t =
|
|
2211
|
+
const t = Ye()?.[0];
|
|
2199
2212
|
if (!t)
|
|
2200
2213
|
return;
|
|
2201
2214
|
this.element.key = t.key, this.element.name = t.name;
|
|
2202
2215
|
const e = this.getField("ELEMENT");
|
|
2203
2216
|
e.getOptions(!1), e.setValue(this.element.key);
|
|
2204
|
-
const n =
|
|
2217
|
+
const n = De(this.element.key, !0)?.[0];
|
|
2205
2218
|
if (!n)
|
|
2206
2219
|
return;
|
|
2207
2220
|
this.prop.keys = n.keys, this.prop.names = n.names;
|
|
@@ -2220,10 +2233,10 @@ const li = {
|
|
|
2220
2233
|
}, 0);
|
|
2221
2234
|
},
|
|
2222
2235
|
genElementOpts_: function() {
|
|
2223
|
-
return
|
|
2236
|
+
return Ae();
|
|
2224
2237
|
},
|
|
2225
2238
|
genPropOpts_: function() {
|
|
2226
|
-
return
|
|
2239
|
+
return Cn(this.element.key);
|
|
2227
2240
|
},
|
|
2228
2241
|
onchange: function(t) {
|
|
2229
2242
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2238,7 +2251,7 @@ const li = {
|
|
|
2238
2251
|
}
|
|
2239
2252
|
},
|
|
2240
2253
|
onElementChange_: function(t) {
|
|
2241
|
-
const e =
|
|
2254
|
+
const e = re(t);
|
|
2242
2255
|
if (!e) {
|
|
2243
2256
|
console.assert(!1);
|
|
2244
2257
|
return;
|
|
@@ -2247,7 +2260,7 @@ const li = {
|
|
|
2247
2260
|
this.element.key = e.key, this.element.name = e.name;
|
|
2248
2261
|
const o = this.getField("PROP");
|
|
2249
2262
|
if (o.getOptions(!1), n || !se(this.element.key, this.prop.keys)) {
|
|
2250
|
-
const a =
|
|
2263
|
+
const a = De(this.element.key)?.[0]?.keys ?? "";
|
|
2251
2264
|
o.setValue(a), this.prop.keys === a && this.onPropChange_(a);
|
|
2252
2265
|
}
|
|
2253
2266
|
},
|
|
@@ -2263,19 +2276,18 @@ const li = {
|
|
|
2263
2276
|
return;
|
|
2264
2277
|
const e = this.getInput("VALUE"), n = e.connection.targetBlock();
|
|
2265
2278
|
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));
|
|
2279
|
+
const o = An(this.workspace, t.raw);
|
|
2280
|
+
o && (e.connection.setCheck(null), e.connection.connect(o.outputConnection));
|
|
2269
2281
|
},
|
|
2270
2282
|
updateCheck_: function() {
|
|
2271
2283
|
const t = se(this.element.key, this.prop.keys);
|
|
2272
2284
|
if (!t)
|
|
2273
2285
|
return;
|
|
2274
|
-
const e =
|
|
2275
|
-
|
|
2286
|
+
const e = On(t.raw);
|
|
2287
|
+
this.getInput("VALUE").connection.setCheck(e);
|
|
2276
2288
|
},
|
|
2277
2289
|
checkWarning_: function() {
|
|
2278
|
-
const t =
|
|
2290
|
+
const t = re(this.element.key);
|
|
2279
2291
|
if (!t) {
|
|
2280
2292
|
this.setWarningText(_.WARN_ELEMENT_NOT_FOUND);
|
|
2281
2293
|
return;
|
|
@@ -2293,13 +2305,13 @@ const li = {
|
|
|
2293
2305
|
U(e.names, this.prop.names) || (this.prop.names = e.names), this.setWarningText(null);
|
|
2294
2306
|
}
|
|
2295
2307
|
};
|
|
2296
|
-
d.set_node_prop_as_v1 =
|
|
2308
|
+
d.set_node_prop_as_v1 = pi;
|
|
2297
2309
|
s.forBlock.set_node_prop_as_v1 = function(t) {
|
|
2298
2310
|
const e = t, n = s.valueToCode(e, "NODE", c.NONE), o = s.quote_(e.prop.keys), i = s.valueToCode(e, "VALUE", c.NONE);
|
|
2299
2311
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
2300
2312
|
`;
|
|
2301
2313
|
};
|
|
2302
|
-
const
|
|
2314
|
+
const hi = {
|
|
2303
2315
|
init: function() {
|
|
2304
2316
|
this.event = {
|
|
2305
2317
|
id: "",
|
|
@@ -2310,7 +2322,7 @@ const ui = {
|
|
|
2310
2322
|
initData_: function() {
|
|
2311
2323
|
if (this.event.id)
|
|
2312
2324
|
return;
|
|
2313
|
-
const t =
|
|
2325
|
+
const t = yn()?.[0];
|
|
2314
2326
|
if (!t)
|
|
2315
2327
|
return;
|
|
2316
2328
|
this.event.id = t.id, this.event.name = t.name, this.event.params = t.params;
|
|
@@ -2328,7 +2340,7 @@ const ui = {
|
|
|
2328
2340
|
}, 0);
|
|
2329
2341
|
},
|
|
2330
2342
|
genEventOpts_: function() {
|
|
2331
|
-
return
|
|
2343
|
+
return Go();
|
|
2332
2344
|
},
|
|
2333
2345
|
onchange: function(t) {
|
|
2334
2346
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -2343,7 +2355,7 @@ const ui = {
|
|
|
2343
2355
|
}
|
|
2344
2356
|
},
|
|
2345
2357
|
onEventChange_: function(t) {
|
|
2346
|
-
const e =
|
|
2358
|
+
const e = en(t);
|
|
2347
2359
|
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
2360
|
},
|
|
2349
2361
|
updateShape_: function() {
|
|
@@ -2371,7 +2383,7 @@ const ui = {
|
|
|
2371
2383
|
}
|
|
2372
2384
|
},
|
|
2373
2385
|
checkWarning_: function() {
|
|
2374
|
-
const t =
|
|
2386
|
+
const t = en(this.event.id);
|
|
2375
2387
|
if (!t) {
|
|
2376
2388
|
this.setWarningText(_.WARN_EVENT_NOT_FOUND);
|
|
2377
2389
|
return;
|
|
@@ -2383,7 +2395,7 @@ const ui = {
|
|
|
2383
2395
|
this.setWarningText(null);
|
|
2384
2396
|
}
|
|
2385
2397
|
};
|
|
2386
|
-
d.trigger_comp_event_v1 =
|
|
2398
|
+
d.trigger_comp_event_v1 = hi;
|
|
2387
2399
|
s.forBlock.trigger_comp_event_v1 = function() {
|
|
2388
2400
|
return "";
|
|
2389
2401
|
};
|
|
@@ -3090,7 +3102,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3090
3102
|
`
|
|
3091
3103
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3092
3104
|
};
|
|
3093
|
-
const
|
|
3105
|
+
const di = v.xml, fi = [
|
|
3094
3106
|
{
|
|
3095
3107
|
type: "add_data_v1",
|
|
3096
3108
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3152,16 +3164,16 @@ const ri = v.xml, _i = [
|
|
|
3152
3164
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
3153
3165
|
}
|
|
3154
3166
|
];
|
|
3155
|
-
function
|
|
3156
|
-
const n =
|
|
3167
|
+
function mi(t, e) {
|
|
3168
|
+
const n = fi.find((o) => o.type === t);
|
|
3157
3169
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
3158
3170
|
}
|
|
3159
|
-
const
|
|
3171
|
+
const Ti = {
|
|
3160
3172
|
init: function() {
|
|
3161
3173
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
3162
3174
|
},
|
|
3163
3175
|
mutationToDom: function() {
|
|
3164
|
-
const t =
|
|
3176
|
+
const t = di.createElement("mutation");
|
|
3165
3177
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
3166
3178
|
},
|
|
3167
3179
|
domToMutation: function(t) {
|
|
@@ -3190,12 +3202,12 @@ const hi = {
|
|
|
3190
3202
|
},
|
|
3191
3203
|
tryDuplicate_: function(t) {
|
|
3192
3204
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
3193
|
-
if (e &&
|
|
3205
|
+
if (e && mi(e.type, t.oldInputName))
|
|
3194
3206
|
try {
|
|
3195
3207
|
E.disable();
|
|
3196
3208
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
3197
3209
|
if (n) {
|
|
3198
|
-
const o =
|
|
3210
|
+
const o = $t(
|
|
3199
3211
|
this.workspace,
|
|
3200
3212
|
this.key,
|
|
3201
3213
|
this.name,
|
|
@@ -3211,54 +3223,54 @@ const hi = {
|
|
|
3211
3223
|
this.locale ? this.setFieldValue(_[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3212
3224
|
}
|
|
3213
3225
|
};
|
|
3214
|
-
d.parameter_v1 =
|
|
3226
|
+
d.parameter_v1 = Ti;
|
|
3215
3227
|
s.forBlock.parameter_v1 = function(t) {
|
|
3216
3228
|
return [t.key, c.ATOMIC];
|
|
3217
3229
|
};
|
|
3218
|
-
function
|
|
3230
|
+
function Oe(t) {
|
|
3219
3231
|
const e = [];
|
|
3220
3232
|
return T.compute.spaces.forEach((n) => {
|
|
3221
3233
|
n.funcs.length > 0 && e.push(n);
|
|
3222
3234
|
}), e;
|
|
3223
3235
|
}
|
|
3224
|
-
function
|
|
3236
|
+
function Qe(t) {
|
|
3225
3237
|
return T.compute.spaces.find((e) => e.id === t);
|
|
3226
3238
|
}
|
|
3227
|
-
function
|
|
3239
|
+
function bn(t) {
|
|
3228
3240
|
const e = [];
|
|
3229
|
-
return
|
|
3241
|
+
return Oe().forEach(({ id: o, name: i }) => {
|
|
3230
3242
|
e.push([i, o]);
|
|
3231
3243
|
}), N(e);
|
|
3232
3244
|
}
|
|
3233
|
-
function
|
|
3245
|
+
function Pe(t) {
|
|
3234
3246
|
const e = T.compute.spaces.find((n) => n.id === t);
|
|
3235
3247
|
return e ? e.funcs : [];
|
|
3236
3248
|
}
|
|
3237
|
-
function
|
|
3249
|
+
function Ie(t, e) {
|
|
3238
3250
|
const n = T.compute.spaces.find((o) => o.id === t);
|
|
3239
3251
|
if (n)
|
|
3240
3252
|
return n.funcs.find((o) => o.id === e);
|
|
3241
3253
|
}
|
|
3242
|
-
function
|
|
3254
|
+
function Bn(t) {
|
|
3243
3255
|
const e = [];
|
|
3244
|
-
return
|
|
3256
|
+
return Pe(t).forEach(({ id: o, name: i }) => {
|
|
3245
3257
|
e.push([i, o]);
|
|
3246
3258
|
}), N(e);
|
|
3247
3259
|
}
|
|
3248
|
-
function
|
|
3260
|
+
function Ft() {
|
|
3249
3261
|
return T.compute.activeFunc;
|
|
3250
3262
|
}
|
|
3251
|
-
function
|
|
3263
|
+
function sn(t) {
|
|
3252
3264
|
const { outputs: e } = T.compute.activeFunc;
|
|
3253
3265
|
return e.find((n) => n.id === t);
|
|
3254
3266
|
}
|
|
3255
|
-
function
|
|
3267
|
+
function Ei() {
|
|
3256
3268
|
const t = [], { outputs: e } = T.compute.activeFunc;
|
|
3257
3269
|
return e.forEach(({ id: n, name: o }) => {
|
|
3258
3270
|
t.push([o, n]);
|
|
3259
3271
|
}), N(t);
|
|
3260
3272
|
}
|
|
3261
|
-
const
|
|
3273
|
+
const gi = {
|
|
3262
3274
|
init: function() {
|
|
3263
3275
|
this.space = {
|
|
3264
3276
|
id: "",
|
|
@@ -3273,13 +3285,13 @@ const fi = {
|
|
|
3273
3285
|
initData_: function() {
|
|
3274
3286
|
if (this.space.id)
|
|
3275
3287
|
return;
|
|
3276
|
-
const t =
|
|
3288
|
+
const t = Oe()?.[0];
|
|
3277
3289
|
if (!t)
|
|
3278
3290
|
return;
|
|
3279
3291
|
this.space.id = t.id, this.space.name = t.name;
|
|
3280
3292
|
const e = this.getField("SPACE");
|
|
3281
3293
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3282
|
-
const n =
|
|
3294
|
+
const n = Pe(this.space.id)?.[0];
|
|
3283
3295
|
if (!n)
|
|
3284
3296
|
return;
|
|
3285
3297
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3298,10 +3310,10 @@ const fi = {
|
|
|
3298
3310
|
}, 0);
|
|
3299
3311
|
},
|
|
3300
3312
|
genSpaceOpts_: function() {
|
|
3301
|
-
return
|
|
3313
|
+
return bn();
|
|
3302
3314
|
},
|
|
3303
3315
|
genFuncOpts_: function() {
|
|
3304
|
-
return
|
|
3316
|
+
return Bn(this.space.id);
|
|
3305
3317
|
},
|
|
3306
3318
|
onchange: function(t) {
|
|
3307
3319
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3316,19 +3328,19 @@ const fi = {
|
|
|
3316
3328
|
}
|
|
3317
3329
|
},
|
|
3318
3330
|
onSpaceChange_: function(t) {
|
|
3319
|
-
const e =
|
|
3331
|
+
const e = Qe(t);
|
|
3320
3332
|
if (!e) {
|
|
3321
3333
|
console.assert(!1);
|
|
3322
3334
|
return;
|
|
3323
3335
|
}
|
|
3324
3336
|
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 =
|
|
3337
|
+
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)) {
|
|
3338
|
+
const i = Pe(this.space.id)?.[0];
|
|
3327
3339
|
this.setFieldValue(i?.id ?? "", "FUNC");
|
|
3328
3340
|
}
|
|
3329
3341
|
},
|
|
3330
3342
|
onFuncChange_: function(t) {
|
|
3331
|
-
const e =
|
|
3343
|
+
const e = Ie(this.space.id, t);
|
|
3332
3344
|
if (!e) {
|
|
3333
3345
|
console.assert(!1);
|
|
3334
3346
|
return;
|
|
@@ -3391,13 +3403,13 @@ const fi = {
|
|
|
3391
3403
|
F(this, t);
|
|
3392
3404
|
},
|
|
3393
3405
|
checkWarning_: function() {
|
|
3394
|
-
const t =
|
|
3406
|
+
const t = Qe(this.space.id);
|
|
3395
3407
|
if (!t) {
|
|
3396
3408
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3397
3409
|
return;
|
|
3398
3410
|
}
|
|
3399
3411
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3400
|
-
const e =
|
|
3412
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3401
3413
|
if (!e) {
|
|
3402
3414
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3403
3415
|
return;
|
|
@@ -3413,7 +3425,7 @@ const fi = {
|
|
|
3413
3425
|
this.setWarningText(null);
|
|
3414
3426
|
}
|
|
3415
3427
|
};
|
|
3416
|
-
d.call_func_v1 =
|
|
3428
|
+
d.call_func_v1 = gi;
|
|
3417
3429
|
s.forBlock.call_func_v1 = function(t) {
|
|
3418
3430
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3419
3431
|
let l = "";
|
|
@@ -3440,7 +3452,7 @@ ${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
|
3440
3452
|
${r}${p}}
|
|
3441
3453
|
`;
|
|
3442
3454
|
};
|
|
3443
|
-
const
|
|
3455
|
+
const Ii = {
|
|
3444
3456
|
init: function() {
|
|
3445
3457
|
this.space = {
|
|
3446
3458
|
id: "",
|
|
@@ -3455,13 +3467,13 @@ const mi = {
|
|
|
3455
3467
|
initData_: function() {
|
|
3456
3468
|
if (this.space.id)
|
|
3457
3469
|
return;
|
|
3458
|
-
const t =
|
|
3470
|
+
const t = Oe()?.[0];
|
|
3459
3471
|
if (!t)
|
|
3460
3472
|
return;
|
|
3461
3473
|
this.space.id = t.id, this.space.name = t.name;
|
|
3462
3474
|
const e = this.getField("SPACE");
|
|
3463
3475
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
3464
|
-
const n =
|
|
3476
|
+
const n = Pe(this.space.id)?.[0];
|
|
3465
3477
|
if (!n)
|
|
3466
3478
|
return;
|
|
3467
3479
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
@@ -3480,10 +3492,10 @@ const mi = {
|
|
|
3480
3492
|
}, 0);
|
|
3481
3493
|
},
|
|
3482
3494
|
genSpaceOpts_: function() {
|
|
3483
|
-
return
|
|
3495
|
+
return bn();
|
|
3484
3496
|
},
|
|
3485
3497
|
genFuncOpts_: function() {
|
|
3486
|
-
return
|
|
3498
|
+
return Bn(this.space.id);
|
|
3487
3499
|
},
|
|
3488
3500
|
onchange: function(t) {
|
|
3489
3501
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3498,19 +3510,19 @@ const mi = {
|
|
|
3498
3510
|
}
|
|
3499
3511
|
},
|
|
3500
3512
|
onSpaceChange_: function(t) {
|
|
3501
|
-
const e =
|
|
3513
|
+
const e = Qe(t);
|
|
3502
3514
|
if (!e) {
|
|
3503
3515
|
console.assert(!1);
|
|
3504
3516
|
return;
|
|
3505
3517
|
}
|
|
3506
3518
|
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 =
|
|
3519
|
+
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)) {
|
|
3520
|
+
const i = Pe(this.space.id)?.[0];
|
|
3509
3521
|
i ? this.setFieldValue(i.id, "FUNC") : this.setFieldValue("", "FUNC");
|
|
3510
3522
|
}
|
|
3511
3523
|
},
|
|
3512
3524
|
onFuncChange_: function(t) {
|
|
3513
|
-
const e =
|
|
3525
|
+
const e = Ie(this.space.id, t);
|
|
3514
3526
|
if (!e) {
|
|
3515
3527
|
console.assert(!1);
|
|
3516
3528
|
return;
|
|
@@ -3573,13 +3585,13 @@ const mi = {
|
|
|
3573
3585
|
F(this, t);
|
|
3574
3586
|
},
|
|
3575
3587
|
checkWarning_: function() {
|
|
3576
|
-
const t =
|
|
3588
|
+
const t = Qe(this.space.id);
|
|
3577
3589
|
if (!t) {
|
|
3578
3590
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
3579
3591
|
return;
|
|
3580
3592
|
}
|
|
3581
3593
|
t.name !== this.space.name && (this.space.name = t.name);
|
|
3582
|
-
const e =
|
|
3594
|
+
const e = Ie(this.space.id, this.func.id);
|
|
3583
3595
|
if (!e) {
|
|
3584
3596
|
this.setWarningText(_.WARN_FUNC_NOT_FOUND);
|
|
3585
3597
|
return;
|
|
@@ -3595,7 +3607,7 @@ const mi = {
|
|
|
3595
3607
|
this.setWarningText(null);
|
|
3596
3608
|
}
|
|
3597
3609
|
};
|
|
3598
|
-
d.call_func_internal_v1 =
|
|
3610
|
+
d.call_func_internal_v1 = Ii;
|
|
3599
3611
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3600
3612
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3601
3613
|
let l = `${e}var __inputs__ = {
|
|
@@ -3647,7 +3659,7 @@ s.forBlock.compute_debug_trace_v1 = function(t) {
|
|
|
3647
3659
|
return `__debugTraceV1__(${s.valueToCode(t, "OBJECT", c.ATOMIC)});
|
|
3648
3660
|
`;
|
|
3649
3661
|
};
|
|
3650
|
-
const
|
|
3662
|
+
const Ai = {
|
|
3651
3663
|
init: function() {
|
|
3652
3664
|
this.func = {
|
|
3653
3665
|
id: "",
|
|
@@ -3657,7 +3669,7 @@ const Ti = {
|
|
|
3657
3669
|
initData_: function() {
|
|
3658
3670
|
if (this.func.id)
|
|
3659
3671
|
return;
|
|
3660
|
-
const { id: t, inputs: e } =
|
|
3672
|
+
const { id: t, inputs: e } = Ft();
|
|
3661
3673
|
this.func.id = t, this.func.inputs = e;
|
|
3662
3674
|
},
|
|
3663
3675
|
saveExtraState: function() {
|
|
@@ -3694,7 +3706,7 @@ const Ti = {
|
|
|
3694
3706
|
F(this, t);
|
|
3695
3707
|
},
|
|
3696
3708
|
checkWarning_: function() {
|
|
3697
|
-
const { id: t, inputs: e } =
|
|
3709
|
+
const { id: t, inputs: e } = Ft();
|
|
3698
3710
|
if (this.func.id !== t && (this.func.id = t), !U(e, this.func.inputs)) {
|
|
3699
3711
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3700
3712
|
return;
|
|
@@ -3702,7 +3714,7 @@ const Ti = {
|
|
|
3702
3714
|
this.setWarningText(null);
|
|
3703
3715
|
}
|
|
3704
3716
|
};
|
|
3705
|
-
d.func_entry_v1 =
|
|
3717
|
+
d.func_entry_v1 = Ai;
|
|
3706
3718
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3707
3719
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3708
3720
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
@@ -3712,16 +3724,16 @@ s.forBlock.func_entry_v1 = function(t) {
|
|
|
3712
3724
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3713
3725
|
${n}}`;
|
|
3714
3726
|
};
|
|
3715
|
-
const
|
|
3727
|
+
const Oi = {
|
|
3716
3728
|
init: function() {
|
|
3717
3729
|
}
|
|
3718
3730
|
};
|
|
3719
|
-
d.on_flow_state_event_v1 =
|
|
3731
|
+
d.on_flow_state_event_v1 = Oi;
|
|
3720
3732
|
s.forBlock.on_flow_state_event_v1 = function() {
|
|
3721
3733
|
return `__onFlowStateEventV1__();
|
|
3722
3734
|
`;
|
|
3723
3735
|
};
|
|
3724
|
-
const
|
|
3736
|
+
const Ci = {
|
|
3725
3737
|
init: function() {
|
|
3726
3738
|
this.output = {
|
|
3727
3739
|
id: "",
|
|
@@ -3732,7 +3744,7 @@ const gi = {
|
|
|
3732
3744
|
initData_: function() {
|
|
3733
3745
|
if (this.output.id)
|
|
3734
3746
|
return;
|
|
3735
|
-
const t =
|
|
3747
|
+
const t = Ft().outputs?.[0];
|
|
3736
3748
|
t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
|
|
3737
3749
|
},
|
|
3738
3750
|
saveExtraState: function() {
|
|
@@ -3746,7 +3758,7 @@ const gi = {
|
|
|
3746
3758
|
}, 0);
|
|
3747
3759
|
},
|
|
3748
3760
|
genOutputOpts_: function() {
|
|
3749
|
-
return
|
|
3761
|
+
return Ei();
|
|
3750
3762
|
},
|
|
3751
3763
|
onchange: function(t) {
|
|
3752
3764
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -3761,7 +3773,7 @@ const gi = {
|
|
|
3761
3773
|
}
|
|
3762
3774
|
},
|
|
3763
3775
|
onOutputChange_: function(t) {
|
|
3764
|
-
const e =
|
|
3776
|
+
const e = sn(t);
|
|
3765
3777
|
if (!e) {
|
|
3766
3778
|
console.assert(!1);
|
|
3767
3779
|
return;
|
|
@@ -3784,7 +3796,7 @@ const gi = {
|
|
|
3784
3796
|
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
3797
|
},
|
|
3786
3798
|
checkWarning_: function() {
|
|
3787
|
-
const t =
|
|
3799
|
+
const t = sn(this.output.id);
|
|
3788
3800
|
if (!t) {
|
|
3789
3801
|
this.setWarningText(_.WARN_FUNC_HAS_CHANGED);
|
|
3790
3802
|
return;
|
|
@@ -3796,7 +3808,7 @@ const gi = {
|
|
|
3796
3808
|
this.setWarningText(null);
|
|
3797
3809
|
}
|
|
3798
3810
|
};
|
|
3799
|
-
d.set_func_output_v1 =
|
|
3811
|
+
d.set_func_output_v1 = Ci;
|
|
3800
3812
|
s.forBlock.set_func_output_v1 = function(t) {
|
|
3801
3813
|
const e = s.quote_, n = t, { id: o, type: i } = n.output;
|
|
3802
3814
|
let a = s.valueToCode(n, "VALUE", c.ATOMIC);
|
|
@@ -3829,11 +3841,11 @@ function J() {
|
|
|
3829
3841
|
e.tables.length > 0 && t.push(e);
|
|
3830
3842
|
}), t;
|
|
3831
3843
|
}
|
|
3832
|
-
function
|
|
3844
|
+
function _e(t) {
|
|
3833
3845
|
const { spaces: e } = T.data;
|
|
3834
3846
|
return e.find((n) => n.id === t);
|
|
3835
3847
|
}
|
|
3836
|
-
function
|
|
3848
|
+
function lt() {
|
|
3837
3849
|
const t = [];
|
|
3838
3850
|
return J().forEach(({ id: n, name: o }) => {
|
|
3839
3851
|
t.push([o, n]);
|
|
@@ -3848,20 +3860,20 @@ function X(t, e) {
|
|
|
3848
3860
|
if (o)
|
|
3849
3861
|
return o.tables.find((i) => i.id === e);
|
|
3850
3862
|
}
|
|
3851
|
-
function
|
|
3863
|
+
function ut(t) {
|
|
3852
3864
|
const e = [];
|
|
3853
3865
|
return H(t).forEach(({ id: o, name: i }) => {
|
|
3854
3866
|
e.push([i, o]);
|
|
3855
3867
|
}), N(e);
|
|
3856
3868
|
}
|
|
3857
|
-
function
|
|
3869
|
+
function ze(t, e) {
|
|
3858
3870
|
const { spaces: n } = T.data, o = n.find((a) => a.id === t);
|
|
3859
3871
|
if (!o)
|
|
3860
3872
|
return [];
|
|
3861
3873
|
const i = o.tables.find((a) => a.id === e);
|
|
3862
3874
|
return i ? i.columns : [];
|
|
3863
3875
|
}
|
|
3864
|
-
function
|
|
3876
|
+
function vt(t, e, n) {
|
|
3865
3877
|
const { spaces: o } = T.data, i = o.find((l) => l.id === t);
|
|
3866
3878
|
if (!i)
|
|
3867
3879
|
return;
|
|
@@ -3869,13 +3881,13 @@ function Lt(t, e, n) {
|
|
|
3869
3881
|
if (a)
|
|
3870
3882
|
return a.columns.find((l) => l.id === n);
|
|
3871
3883
|
}
|
|
3872
|
-
function
|
|
3884
|
+
function ki(t, e) {
|
|
3873
3885
|
const n = [];
|
|
3874
|
-
return
|
|
3886
|
+
return ze(t, e).forEach(({ id: i, name: a }) => {
|
|
3875
3887
|
n.push([a, i]);
|
|
3876
3888
|
}), N(n);
|
|
3877
3889
|
}
|
|
3878
|
-
function
|
|
3890
|
+
function vi(t) {
|
|
3879
3891
|
const e = t.getInput("TABLE").connection;
|
|
3880
3892
|
if (e.targetBlock())
|
|
3881
3893
|
return;
|
|
@@ -3909,7 +3921,7 @@ function Ai(t) {
|
|
|
3909
3921
|
}, l = $.blocks.append(a, t.workspace);
|
|
3910
3922
|
e.connect(l.outputConnection);
|
|
3911
3923
|
}
|
|
3912
|
-
function
|
|
3924
|
+
function yi(t) {
|
|
3913
3925
|
const e = t.getInput("HANDLE").connection;
|
|
3914
3926
|
if (e.targetBlock())
|
|
3915
3927
|
return;
|
|
@@ -3933,7 +3945,7 @@ function Oi(t) {
|
|
|
3933
3945
|
}, o = $.blocks.append(n, t.workspace);
|
|
3934
3946
|
e.connect(o.previousConnection);
|
|
3935
3947
|
}
|
|
3936
|
-
const
|
|
3948
|
+
const Ni = {
|
|
3937
3949
|
init: function() {
|
|
3938
3950
|
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
3951
|
},
|
|
@@ -3949,14 +3961,14 @@ const Ci = {
|
|
|
3949
3961
|
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
3962
|
},
|
|
3951
3963
|
ensureBlocks_: function() {
|
|
3952
|
-
this.isInsertionMarker() || (
|
|
3964
|
+
this.isInsertionMarker() || (vi(this), F(this, [
|
|
3953
3965
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
3954
3966
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
3955
3967
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
3956
|
-
]),
|
|
3968
|
+
]), yi(this));
|
|
3957
3969
|
}
|
|
3958
3970
|
};
|
|
3959
|
-
d.add_data_v1 =
|
|
3971
|
+
d.add_data_v1 = Ni;
|
|
3960
3972
|
s.forBlock.add_data_v1 = function(t) {
|
|
3961
3973
|
const e = s.INDENT, n = s.valueToCode(t, "TABLE", c.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
|
|
3962
3974
|
return `{
|
|
@@ -3972,7 +3984,7 @@ ${e}}
|
|
|
3972
3984
|
${o}}
|
|
3973
3985
|
`;
|
|
3974
3986
|
};
|
|
3975
|
-
const
|
|
3987
|
+
const Li = {
|
|
3976
3988
|
init: function() {
|
|
3977
3989
|
this.space = {
|
|
3978
3990
|
id: "",
|
|
@@ -4010,7 +4022,7 @@ const ki = {
|
|
|
4010
4022
|
if (!e)
|
|
4011
4023
|
return;
|
|
4012
4024
|
this.table.id = e.id, this.table.name = e.name;
|
|
4013
|
-
const n =
|
|
4025
|
+
const n = ze(this.space.id, this.table.id)?.[0];
|
|
4014
4026
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4015
4027
|
},
|
|
4016
4028
|
saveExtraState: function() {
|
|
@@ -4026,13 +4038,13 @@ const ki = {
|
|
|
4026
4038
|
}, 0);
|
|
4027
4039
|
},
|
|
4028
4040
|
genSpaceOpts_: function() {
|
|
4029
|
-
return
|
|
4041
|
+
return lt();
|
|
4030
4042
|
},
|
|
4031
4043
|
genTableOpts_: function() {
|
|
4032
|
-
return
|
|
4044
|
+
return ut(this.space.id);
|
|
4033
4045
|
},
|
|
4034
4046
|
genColumnOpts_: function() {
|
|
4035
|
-
return
|
|
4047
|
+
return ki(this.space.id, this.table.id);
|
|
4036
4048
|
},
|
|
4037
4049
|
onchange: function(t) {
|
|
4038
4050
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4045,7 +4057,7 @@ const ki = {
|
|
|
4045
4057
|
}
|
|
4046
4058
|
},
|
|
4047
4059
|
onSpaceChange_: function(t) {
|
|
4048
|
-
const e =
|
|
4060
|
+
const e = _e(t);
|
|
4049
4061
|
if (!e) {
|
|
4050
4062
|
console.assert(!1);
|
|
4051
4063
|
return;
|
|
@@ -4063,13 +4075,13 @@ const ki = {
|
|
|
4063
4075
|
return;
|
|
4064
4076
|
}
|
|
4065
4077
|
const n = e.id !== this.table.id;
|
|
4066
|
-
if (this.table.id = e.id, this.table.name = e.name, n || !
|
|
4067
|
-
const o =
|
|
4078
|
+
if (this.table.id = e.id, this.table.name = e.name, n || !vt(this.space.id, this.table.id, this.column.id)) {
|
|
4079
|
+
const o = ze(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
|
|
4068
4080
|
i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
|
|
4069
4081
|
}
|
|
4070
4082
|
},
|
|
4071
4083
|
onColumnChange_: function(t) {
|
|
4072
|
-
const e =
|
|
4084
|
+
const e = vt(this.space.id, this.table.id, t);
|
|
4073
4085
|
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
4086
|
},
|
|
4075
4087
|
updateShape_: function() {
|
|
@@ -4088,16 +4100,15 @@ const ki = {
|
|
|
4088
4100
|
n && n.dispose();
|
|
4089
4101
|
else if (n)
|
|
4090
4102
|
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));
|
|
4103
|
+
const o = Rt(this.workspace, this.column.type);
|
|
4104
|
+
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
4094
4105
|
},
|
|
4095
4106
|
updateCheck_: function() {
|
|
4096
4107
|
const { type: t } = this.column, e = this.getInput("VALUE");
|
|
4097
4108
|
t === "string" ? e.setCheck("String") : t === "integer" || t === "float" ? e.setCheck("Number") : t === "boolean" ? e.setCheck("Boolean") : t === "enum" || t === "dateTime" ? e.setCheck("String") : e.setCheck(null);
|
|
4098
4109
|
},
|
|
4099
4110
|
checkWarning_: function() {
|
|
4100
|
-
const t =
|
|
4111
|
+
const t = _e(this.space.id);
|
|
4101
4112
|
if (!t) {
|
|
4102
4113
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4103
4114
|
return;
|
|
@@ -4109,7 +4120,7 @@ const ki = {
|
|
|
4109
4120
|
return;
|
|
4110
4121
|
}
|
|
4111
4122
|
e.name !== this.table.name && (this.table.name = e.name);
|
|
4112
|
-
const n =
|
|
4123
|
+
const n = vt(
|
|
4113
4124
|
this.space.id,
|
|
4114
4125
|
this.table.id,
|
|
4115
4126
|
this.column.id
|
|
@@ -4125,7 +4136,7 @@ const ki = {
|
|
|
4125
4136
|
this.setWarningText(null);
|
|
4126
4137
|
}
|
|
4127
4138
|
};
|
|
4128
|
-
d.cond_atomic_v1 =
|
|
4139
|
+
d.cond_atomic_v1 = Li;
|
|
4129
4140
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4130
4141
|
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, l = {
|
|
4131
4142
|
EQ: "=",
|
|
@@ -4137,19 +4148,19 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4137
4148
|
}[n.getFieldValue("OP")];
|
|
4138
4149
|
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(l)}}`, c.ATOMIC];
|
|
4139
4150
|
};
|
|
4140
|
-
const
|
|
4151
|
+
const Si = {
|
|
4141
4152
|
init: function() {
|
|
4142
4153
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4143
4154
|
}
|
|
4144
4155
|
};
|
|
4145
|
-
d.cond_logic_container_v1 =
|
|
4146
|
-
const
|
|
4156
|
+
d.cond_logic_container_v1 = Si;
|
|
4157
|
+
const bi = {
|
|
4147
4158
|
init: function() {
|
|
4148
4159
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
4149
4160
|
}
|
|
4150
4161
|
};
|
|
4151
|
-
d.cond_logic_item_v1 =
|
|
4152
|
-
const
|
|
4162
|
+
d.cond_logic_item_v1 = bi;
|
|
4163
|
+
const Bi = {
|
|
4153
4164
|
init: function() {
|
|
4154
4165
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
4155
4166
|
new m([
|
|
@@ -4158,7 +4169,7 @@ const Ni = {
|
|
|
4158
4169
|
]),
|
|
4159
4170
|
"TYPE"
|
|
4160
4171
|
), this.setMutator(
|
|
4161
|
-
new
|
|
4172
|
+
new fe.MutatorIcon(
|
|
4162
4173
|
["cond_logic_item_v1"],
|
|
4163
4174
|
this
|
|
4164
4175
|
)
|
|
@@ -4223,7 +4234,7 @@ const Ni = {
|
|
|
4223
4234
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
4224
4235
|
}
|
|
4225
4236
|
};
|
|
4226
|
-
d.cond_logic_v1 =
|
|
4237
|
+
d.cond_logic_v1 = Bi;
|
|
4227
4238
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4228
4239
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4229
4240
|
i.push(a);
|
|
@@ -4233,7 +4244,7 @@ s.forBlock.cond_logic_v1 = function(t) {
|
|
|
4233
4244
|
}
|
|
4234
4245
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
4235
4246
|
};
|
|
4236
|
-
function
|
|
4247
|
+
function Ri(t) {
|
|
4237
4248
|
const e = t.getInput("TABLE").connection;
|
|
4238
4249
|
if (e.targetBlock())
|
|
4239
4250
|
return;
|
|
@@ -4252,11 +4263,11 @@ function Li(t) {
|
|
|
4252
4263
|
}, a = $.blocks.append(i, t.workspace);
|
|
4253
4264
|
e.connect(a.outputConnection);
|
|
4254
4265
|
}
|
|
4255
|
-
function
|
|
4266
|
+
function Di(t) {
|
|
4256
4267
|
const e = t.getInput("CONDITION").connection;
|
|
4257
4268
|
if (e.targetBlock())
|
|
4258
4269
|
return;
|
|
4259
|
-
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i =
|
|
4270
|
+
const n = J()?.[0], o = H(n?.id ?? "")?.[0], i = ze(n?.id, o?.id)?.[0], a = {
|
|
4260
4271
|
type: "cond_atomic_v1",
|
|
4261
4272
|
extraState: {
|
|
4262
4273
|
space: {
|
|
@@ -4277,7 +4288,7 @@ function Si(t) {
|
|
|
4277
4288
|
}, l = $.blocks.append(a, t.workspace);
|
|
4278
4289
|
e.connect(l.outputConnection);
|
|
4279
4290
|
}
|
|
4280
|
-
function
|
|
4291
|
+
function Ui(t) {
|
|
4281
4292
|
const e = t.getInput("HANDLE").connection;
|
|
4282
4293
|
if (e.targetBlock())
|
|
4283
4294
|
return;
|
|
@@ -4301,7 +4312,7 @@ function bi(t) {
|
|
|
4301
4312
|
}, o = $.blocks.append(n, t.workspace);
|
|
4302
4313
|
e.connect(o.previousConnection);
|
|
4303
4314
|
}
|
|
4304
|
-
const
|
|
4315
|
+
const Mi = {
|
|
4305
4316
|
init: function() {
|
|
4306
4317
|
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
4318
|
},
|
|
@@ -4317,13 +4328,13 @@ const Bi = {
|
|
|
4317
4328
|
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
4329
|
},
|
|
4319
4330
|
ensureBlocks_: function() {
|
|
4320
|
-
this.isInsertionMarker() || (
|
|
4331
|
+
this.isInsertionMarker() || (Ri(this), Di(this), F(this, [
|
|
4321
4332
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4322
4333
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0]
|
|
4323
|
-
]),
|
|
4334
|
+
]), Ui(this));
|
|
4324
4335
|
}
|
|
4325
4336
|
};
|
|
4326
|
-
d.delete_data_v1 =
|
|
4337
|
+
d.delete_data_v1 = Mi;
|
|
4327
4338
|
s.forBlock.delete_data_v1 = function(t) {
|
|
4328
4339
|
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
4340
|
return `{
|
|
@@ -4361,7 +4372,7 @@ s.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
4361
4372
|
return `throw ${s.valueToCode(t, "VALUE", c.NONE) || "''"};
|
|
4362
4373
|
`;
|
|
4363
4374
|
};
|
|
4364
|
-
function
|
|
4375
|
+
function Pi(t) {
|
|
4365
4376
|
const e = t.getInput("TABLE").connection;
|
|
4366
4377
|
if (e.targetBlock())
|
|
4367
4378
|
return;
|
|
@@ -4395,7 +4406,7 @@ function Ri(t) {
|
|
|
4395
4406
|
}, l = $.blocks.append(a, t.workspace);
|
|
4396
4407
|
e.connect(l.outputConnection);
|
|
4397
4408
|
}
|
|
4398
|
-
function
|
|
4409
|
+
function Vi(t) {
|
|
4399
4410
|
const e = t.getInput("CONDITION").connection;
|
|
4400
4411
|
if (e.targetBlock())
|
|
4401
4412
|
return;
|
|
@@ -4404,7 +4415,7 @@ function Di(t) {
|
|
|
4404
4415
|
}, o = $.blocks.append(n, t.workspace);
|
|
4405
4416
|
e.connect(o.outputConnection);
|
|
4406
4417
|
}
|
|
4407
|
-
function
|
|
4418
|
+
function xi(t) {
|
|
4408
4419
|
const e = t.getInput("EXTRA").connection;
|
|
4409
4420
|
if (e.targetBlock())
|
|
4410
4421
|
return;
|
|
@@ -4441,7 +4452,7 @@ function Ui(t) {
|
|
|
4441
4452
|
}, o = $.blocks.append(n, t.workspace);
|
|
4442
4453
|
e.connect(o.outputConnection);
|
|
4443
4454
|
}
|
|
4444
|
-
function
|
|
4455
|
+
function Fi(t) {
|
|
4445
4456
|
const e = t.getInput("HANDLE").connection;
|
|
4446
4457
|
if (e.targetBlock())
|
|
4447
4458
|
return;
|
|
@@ -4479,7 +4490,7 @@ h([
|
|
|
4479
4490
|
style: "procedure_blocks"
|
|
4480
4491
|
}
|
|
4481
4492
|
]);
|
|
4482
|
-
const
|
|
4493
|
+
const Yi = {
|
|
4483
4494
|
init: function() {
|
|
4484
4495
|
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
4496
|
},
|
|
@@ -4495,15 +4506,15 @@ const Pi = {
|
|
|
4495
4506
|
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
4507
|
},
|
|
4497
4508
|
ensureBlocks_: function() {
|
|
4498
|
-
this.isInsertionMarker() || (
|
|
4509
|
+
this.isInsertionMarker() || (Pi(this), Vi(this), xi(this), F(this, [
|
|
4499
4510
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
4500
4511
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
4501
4512
|
["MAIN_DATA", "__mainData__", "PARAM_MAIN_DATA", !0],
|
|
4502
4513
|
["EXTRA_DATA", "__extraData__", "PARAM_EXTRA_DATA", !0]
|
|
4503
|
-
]),
|
|
4514
|
+
]), Fi(this));
|
|
4504
4515
|
}
|
|
4505
4516
|
};
|
|
4506
|
-
d.query_data_v1 =
|
|
4517
|
+
d.query_data_v1 = Yi;
|
|
4507
4518
|
s.forBlock.query_data_v1 = function(t) {
|
|
4508
4519
|
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
4520
|
return `{
|
|
@@ -4576,19 +4587,19 @@ s.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
4576
4587
|
const e = s.valueToCode(t, "COLUMN", c.ATOMIC) || "''", n = s.valueToCode(t, "DESC", c.ATOMIC) || !1;
|
|
4577
4588
|
return [`{type:'sortby',value:${e},value2:${n}}`, c.ATOMIC];
|
|
4578
4589
|
};
|
|
4579
|
-
const
|
|
4590
|
+
const wi = {
|
|
4580
4591
|
init: function() {
|
|
4581
4592
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4582
4593
|
}
|
|
4583
4594
|
};
|
|
4584
|
-
d.select_column_container_v1 =
|
|
4585
|
-
const
|
|
4595
|
+
d.select_column_container_v1 = wi;
|
|
4596
|
+
const Ki = {
|
|
4586
4597
|
init: function() {
|
|
4587
4598
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4588
4599
|
}
|
|
4589
4600
|
};
|
|
4590
|
-
d.select_column_item_v1 =
|
|
4591
|
-
const
|
|
4601
|
+
d.select_column_item_v1 = Ki;
|
|
4602
|
+
const $i = {
|
|
4592
4603
|
init: function() {
|
|
4593
4604
|
this.space = {
|
|
4594
4605
|
id: "",
|
|
@@ -4598,7 +4609,7 @@ const Fi = {
|
|
|
4598
4609
|
name: "",
|
|
4599
4610
|
columns: []
|
|
4600
4611
|
}, 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
|
|
4612
|
+
new fe.MutatorIcon(
|
|
4602
4613
|
["select_column_item_v1"],
|
|
4603
4614
|
this
|
|
4604
4615
|
)
|
|
@@ -4633,10 +4644,10 @@ const Fi = {
|
|
|
4633
4644
|
}, 0);
|
|
4634
4645
|
},
|
|
4635
4646
|
genSpaceOpts_: function() {
|
|
4636
|
-
return
|
|
4647
|
+
return lt();
|
|
4637
4648
|
},
|
|
4638
4649
|
genTableOpts_: function() {
|
|
4639
|
-
return
|
|
4650
|
+
return ut(this.space.id);
|
|
4640
4651
|
},
|
|
4641
4652
|
genColumnOpts_: function() {
|
|
4642
4653
|
const t = [];
|
|
@@ -4667,7 +4678,7 @@ const Fi = {
|
|
|
4667
4678
|
}
|
|
4668
4679
|
},
|
|
4669
4680
|
onSpaceChange_: function(t) {
|
|
4670
|
-
const e =
|
|
4681
|
+
const e = _e(t);
|
|
4671
4682
|
if (!e) {
|
|
4672
4683
|
console.assert(!1);
|
|
4673
4684
|
return;
|
|
@@ -4748,7 +4759,7 @@ const Fi = {
|
|
|
4748
4759
|
initShape_: function() {
|
|
4749
4760
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4750
4761
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4751
|
-
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new
|
|
4762
|
+
const e = this.table.columns[t], n = new m(() => this.genColumnOpts_()), o = new ue("");
|
|
4752
4763
|
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
4764
|
}
|
|
4754
4765
|
},
|
|
@@ -4758,14 +4769,14 @@ const Fi = {
|
|
|
4758
4769
|
for (let t = 0; t < this.itemCount_; t++) {
|
|
4759
4770
|
if (this.getInput("ADD" + t))
|
|
4760
4771
|
continue;
|
|
4761
|
-
const e = new m(() => this.genColumnOpts_()), n = new
|
|
4772
|
+
const e = new m(() => this.genColumnOpts_()), n = new ue("");
|
|
4762
4773
|
this.appendDummyInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4763
4774
|
const o = this.table.columns[0];
|
|
4764
4775
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4765
4776
|
}
|
|
4766
4777
|
},
|
|
4767
4778
|
checkWarning_: function() {
|
|
4768
|
-
const t =
|
|
4779
|
+
const t = _e(this.space.id);
|
|
4769
4780
|
if (!t) {
|
|
4770
4781
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4771
4782
|
return;
|
|
@@ -4783,7 +4794,7 @@ const Fi = {
|
|
|
4783
4794
|
this.setWarningText(null);
|
|
4784
4795
|
}
|
|
4785
4796
|
};
|
|
4786
|
-
d.select_column_v1 =
|
|
4797
|
+
d.select_column_v1 = $i;
|
|
4787
4798
|
s.forBlock.select_column_v1 = function(t) {
|
|
4788
4799
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
4789
4800
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -4795,7 +4806,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4795
4806
|
I !== 0 && (l += ","), l += `{name:${e(r)},alias:${e(p)}}`;
|
|
4796
4807
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
4797
4808
|
};
|
|
4798
|
-
const
|
|
4809
|
+
const Hi = {
|
|
4799
4810
|
init: function() {
|
|
4800
4811
|
this.space = {
|
|
4801
4812
|
id: "",
|
|
@@ -4831,10 +4842,10 @@ const wi = {
|
|
|
4831
4842
|
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
4843
|
},
|
|
4833
4844
|
genSpaceOpts_: function() {
|
|
4834
|
-
return
|
|
4845
|
+
return lt();
|
|
4835
4846
|
},
|
|
4836
4847
|
genTableOpts_: function() {
|
|
4837
|
-
return
|
|
4848
|
+
return ut(this.space.id);
|
|
4838
4849
|
},
|
|
4839
4850
|
onchange: function(t) {
|
|
4840
4851
|
if (t.type === L.STATE_CHANGE)
|
|
@@ -4849,7 +4860,7 @@ const wi = {
|
|
|
4849
4860
|
}
|
|
4850
4861
|
},
|
|
4851
4862
|
onSpaceChange_: function(t) {
|
|
4852
|
-
const e =
|
|
4863
|
+
const e = _e(t);
|
|
4853
4864
|
if (!e) {
|
|
4854
4865
|
console.assert(!1);
|
|
4855
4866
|
return;
|
|
@@ -4869,7 +4880,7 @@ const wi = {
|
|
|
4869
4880
|
this.table.id = e.id, this.table.name = e.name;
|
|
4870
4881
|
},
|
|
4871
4882
|
checkWarning_: function() {
|
|
4872
|
-
const t =
|
|
4883
|
+
const t = _e(this.space.id);
|
|
4873
4884
|
if (!t) {
|
|
4874
4885
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
4875
4886
|
return;
|
|
@@ -4883,12 +4894,12 @@ const wi = {
|
|
|
4883
4894
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4884
4895
|
}
|
|
4885
4896
|
};
|
|
4886
|
-
d.select_table_v1 =
|
|
4897
|
+
d.select_table_v1 = Hi;
|
|
4887
4898
|
s.forBlock.select_table_v1 = function(t) {
|
|
4888
4899
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4889
4900
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4890
4901
|
};
|
|
4891
|
-
const
|
|
4902
|
+
const Gi = {
|
|
4892
4903
|
init: function() {
|
|
4893
4904
|
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
4905
|
},
|
|
@@ -4910,9 +4921,9 @@ const Yi = {
|
|
|
4910
4921
|
]);
|
|
4911
4922
|
}
|
|
4912
4923
|
};
|
|
4913
|
-
d.transaction_v1 =
|
|
4924
|
+
d.transaction_v1 = Gi;
|
|
4914
4925
|
s.forBlock.transaction_v1 = function(t) {
|
|
4915
|
-
const e = s.INDENT, n = t, o =
|
|
4926
|
+
const e = s.INDENT, n = t, o = bo(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4916
4927
|
return `{
|
|
4917
4928
|
${e}var __error${o}__ = '';
|
|
4918
4929
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -4954,19 +4965,19 @@ ${e}}
|
|
|
4954
4965
|
}
|
|
4955
4966
|
`;
|
|
4956
4967
|
};
|
|
4957
|
-
const
|
|
4968
|
+
const Wi = {
|
|
4958
4969
|
init: function() {
|
|
4959
4970
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4960
4971
|
}
|
|
4961
4972
|
};
|
|
4962
|
-
d.update_column_container_v1 =
|
|
4963
|
-
const
|
|
4973
|
+
d.update_column_container_v1 = Wi;
|
|
4974
|
+
const ji = {
|
|
4964
4975
|
init: function() {
|
|
4965
4976
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4966
4977
|
}
|
|
4967
4978
|
};
|
|
4968
|
-
d.update_column_item_v1 =
|
|
4969
|
-
const
|
|
4979
|
+
d.update_column_item_v1 = ji;
|
|
4980
|
+
const Xi = {
|
|
4970
4981
|
init: function() {
|
|
4971
4982
|
this.space = {
|
|
4972
4983
|
id: "",
|
|
@@ -4976,7 +4987,7 @@ const Hi = {
|
|
|
4976
4987
|
name: "",
|
|
4977
4988
|
columns: []
|
|
4978
4989
|
}, 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
|
|
4990
|
+
new fe.MutatorIcon(
|
|
4980
4991
|
["update_column_item_v1"],
|
|
4981
4992
|
this
|
|
4982
4993
|
)
|
|
@@ -5011,10 +5022,10 @@ const Hi = {
|
|
|
5011
5022
|
}, 0);
|
|
5012
5023
|
},
|
|
5013
5024
|
genSpaceOpts_: function() {
|
|
5014
|
-
return
|
|
5025
|
+
return lt();
|
|
5015
5026
|
},
|
|
5016
5027
|
genTableOpts_: function() {
|
|
5017
|
-
return
|
|
5028
|
+
return ut(this.space.id);
|
|
5018
5029
|
},
|
|
5019
5030
|
genColumnOpts_: function() {
|
|
5020
5031
|
const t = [];
|
|
@@ -5045,7 +5056,7 @@ const Hi = {
|
|
|
5045
5056
|
}
|
|
5046
5057
|
},
|
|
5047
5058
|
onSpaceChange_: function(t) {
|
|
5048
|
-
const e =
|
|
5059
|
+
const e = _e(t);
|
|
5049
5060
|
if (!e) {
|
|
5050
5061
|
console.assert(!1);
|
|
5051
5062
|
return;
|
|
@@ -5079,7 +5090,7 @@ const Hi = {
|
|
|
5079
5090
|
}
|
|
5080
5091
|
const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
|
|
5081
5092
|
i && i.dispose();
|
|
5082
|
-
const a =
|
|
5093
|
+
const a = Rt(this.workspace, n.type);
|
|
5083
5094
|
a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
|
|
5084
5095
|
},
|
|
5085
5096
|
decompose: function(t) {
|
|
@@ -5163,7 +5174,7 @@ const Hi = {
|
|
|
5163
5174
|
const i = this.getFieldValue("COLUMN" + e), a = this.table.columns.find((u) => u.id === i);
|
|
5164
5175
|
if (!a)
|
|
5165
5176
|
continue;
|
|
5166
|
-
const l =
|
|
5177
|
+
const l = Rt(this.workspace, a.type);
|
|
5167
5178
|
l && (n.setCheck(null), n.connect(l.outputConnection));
|
|
5168
5179
|
}
|
|
5169
5180
|
},
|
|
@@ -5177,7 +5188,7 @@ const Hi = {
|
|
|
5177
5188
|
}
|
|
5178
5189
|
},
|
|
5179
5190
|
checkWarning_: function() {
|
|
5180
|
-
const t =
|
|
5191
|
+
const t = _e(this.space.id);
|
|
5181
5192
|
if (!t) {
|
|
5182
5193
|
this.setWarningText(_.WARN_SPACE_NOT_FOUND);
|
|
5183
5194
|
return;
|
|
@@ -5195,7 +5206,7 @@ const Hi = {
|
|
|
5195
5206
|
this.setWarningText(null);
|
|
5196
5207
|
}
|
|
5197
5208
|
};
|
|
5198
|
-
d.update_column_v1 =
|
|
5209
|
+
d.update_column_v1 = Xi;
|
|
5199
5210
|
s.forBlock.update_column_v1 = function(t) {
|
|
5200
5211
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5201
5212
|
for (let r = 0; r < n.itemCount_; r++) {
|
|
@@ -5207,7 +5218,7 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5207
5218
|
I !== 0 && (l += ","), l += `{name:${e(r)},value:${p}}`;
|
|
5208
5219
|
}), l += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${l}}`, c.ATOMIC];
|
|
5209
5220
|
};
|
|
5210
|
-
function
|
|
5221
|
+
function Ji(t) {
|
|
5211
5222
|
const e = t.getInput("TABLE").connection;
|
|
5212
5223
|
if (e.targetBlock())
|
|
5213
5224
|
return;
|
|
@@ -5241,7 +5252,7 @@ function Gi(t) {
|
|
|
5241
5252
|
}, l = $.blocks.append(a, t.workspace);
|
|
5242
5253
|
e.connect(l.outputConnection);
|
|
5243
5254
|
}
|
|
5244
|
-
function
|
|
5255
|
+
function qi(t) {
|
|
5245
5256
|
const e = t.getInput("CONDITION").connection;
|
|
5246
5257
|
if (e.targetBlock())
|
|
5247
5258
|
return;
|
|
@@ -5250,7 +5261,7 @@ function Wi(t) {
|
|
|
5250
5261
|
}, o = $.blocks.append(n, t.workspace);
|
|
5251
5262
|
e.connect(o.outputConnection);
|
|
5252
5263
|
}
|
|
5253
|
-
function
|
|
5264
|
+
function Qi(t) {
|
|
5254
5265
|
const e = t.getInput("HANDLE").connection;
|
|
5255
5266
|
if (e.targetBlock())
|
|
5256
5267
|
return;
|
|
@@ -5274,7 +5285,7 @@ function ji(t) {
|
|
|
5274
5285
|
}, o = $.blocks.append(n, t.workspace);
|
|
5275
5286
|
e.connect(o.previousConnection);
|
|
5276
5287
|
}
|
|
5277
|
-
const
|
|
5288
|
+
const zi = {
|
|
5278
5289
|
init: function() {
|
|
5279
5290
|
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
5291
|
},
|
|
@@ -5290,14 +5301,14 @@ const Xi = {
|
|
|
5290
5301
|
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
5302
|
},
|
|
5292
5303
|
ensureBlocks: function() {
|
|
5293
|
-
this.isInsertionMarker() || (
|
|
5304
|
+
this.isInsertionMarker() || (Ji(this), qi(this), F(this, [
|
|
5294
5305
|
["SUCCESS", "__success__", "PARAM_SUCCESS", !0],
|
|
5295
5306
|
["MESSAGE", "__message__", "PARAM_MESSAGE", !0],
|
|
5296
5307
|
["DATA", "__data__", "PARAM_DATA", !0]
|
|
5297
|
-
]),
|
|
5308
|
+
]), Qi(this));
|
|
5298
5309
|
}
|
|
5299
5310
|
};
|
|
5300
|
-
d.update_data_v1 =
|
|
5311
|
+
d.update_data_v1 = zi;
|
|
5301
5312
|
s.forBlock.update_data_v1 = function(t) {
|
|
5302
5313
|
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
5314
|
return `{
|
|
@@ -5314,20 +5325,20 @@ ${e}}
|
|
|
5314
5325
|
${i}}
|
|
5315
5326
|
`;
|
|
5316
5327
|
};
|
|
5317
|
-
const
|
|
5328
|
+
const Zi = v.xml, es = {
|
|
5318
5329
|
init: function() {
|
|
5319
5330
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5320
|
-
new z(
|
|
5331
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5321
5332
|
this.isInFlyout || this.addEntry_();
|
|
5322
5333
|
})
|
|
5323
5334
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5324
5335
|
},
|
|
5325
5336
|
mutationToDom: function() {
|
|
5326
|
-
const t =
|
|
5337
|
+
const t = Zi.createElement("mutation");
|
|
5327
5338
|
return t.setAttribute("items", String(this.length)), t;
|
|
5328
5339
|
},
|
|
5329
5340
|
domToMutation: function(t) {
|
|
5330
|
-
this.length =
|
|
5341
|
+
this.length = be(t.getAttribute("items") ?? "", 0), this.initShape_();
|
|
5331
5342
|
},
|
|
5332
5343
|
initData: function(t) {
|
|
5333
5344
|
this.length = t, this.initShape_();
|
|
@@ -5336,11 +5347,11 @@ const Ji = v.xml, qi = {
|
|
|
5336
5347
|
for (let t = 0; t < this.length; t++) {
|
|
5337
5348
|
const e = "ENTRY" + t, n = this.appendValueInput(e);
|
|
5338
5349
|
n.appendField(
|
|
5339
|
-
new z(
|
|
5350
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5340
5351
|
this.isInFlyout || this.addEntry_(n);
|
|
5341
5352
|
})
|
|
5342
|
-
), n.appendField(new
|
|
5343
|
-
new z(
|
|
5353
|
+
), n.appendField(new Zt(String(t))), n.appendField(
|
|
5354
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5344
5355
|
this.isInFlyout || this.removeEntry_(n);
|
|
5345
5356
|
})
|
|
5346
5357
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -5348,18 +5359,18 @@ const Ji = v.xml, qi = {
|
|
|
5348
5359
|
},
|
|
5349
5360
|
addEntry_: function(t) {
|
|
5350
5361
|
let e = this.length;
|
|
5351
|
-
t && (e =
|
|
5362
|
+
t && (e = be(t.name.substring(5)));
|
|
5352
5363
|
for (let o = this.length - 1; o >= e; o--) {
|
|
5353
5364
|
const i = this.getInput("ENTRY" + o);
|
|
5354
5365
|
i.name = "ENTRY" + (o + 1), i.fieldRow[1].setValue(o + 1);
|
|
5355
5366
|
}
|
|
5356
5367
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5357
5368
|
n.appendField(
|
|
5358
|
-
new z(
|
|
5369
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5359
5370
|
this.isInFlyout || this.addEntry_(n);
|
|
5360
5371
|
})
|
|
5361
|
-
), n.appendField(new
|
|
5362
|
-
new z(
|
|
5372
|
+
), n.appendField(new Zt(String(e))), n.appendField(
|
|
5373
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5363
5374
|
this.isInFlyout || this.removeEntry_(n);
|
|
5364
5375
|
})
|
|
5365
5376
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5367,7 +5378,7 @@ const Ji = v.xml, qi = {
|
|
|
5367
5378
|
removeEntry_: function(t) {
|
|
5368
5379
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5369
5380
|
n && n.dispose(), this.removeInput(e);
|
|
5370
|
-
const o =
|
|
5381
|
+
const o = be(e.substring(5));
|
|
5371
5382
|
for (let i = o + 1; i < this.length; i++) {
|
|
5372
5383
|
const a = this.getInput("ENTRY" + i);
|
|
5373
5384
|
a.name = "ENTRY" + (i - 1), a.fieldRow[1].setValue(i - 1);
|
|
@@ -5375,11 +5386,11 @@ const Ji = v.xml, qi = {
|
|
|
5375
5386
|
this.length--;
|
|
5376
5387
|
}
|
|
5377
5388
|
};
|
|
5378
|
-
d.json_array_v1 =
|
|
5379
|
-
const
|
|
5389
|
+
d.json_array_v1 = es;
|
|
5390
|
+
const ts = {
|
|
5380
5391
|
init: function() {
|
|
5381
5392
|
this.appendDummyInput().appendField(
|
|
5382
|
-
new
|
|
5393
|
+
new pn([
|
|
5383
5394
|
["false", "false"],
|
|
5384
5395
|
["true", "true"]
|
|
5385
5396
|
]),
|
|
@@ -5387,19 +5398,19 @@ const Qi = {
|
|
|
5387
5398
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
5388
5399
|
}
|
|
5389
5400
|
};
|
|
5390
|
-
d.json_boolean_v1 =
|
|
5391
|
-
const
|
|
5401
|
+
d.json_boolean_v1 = ts;
|
|
5402
|
+
const an = v.xml, ns = {
|
|
5392
5403
|
init: function() {
|
|
5393
5404
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
5394
|
-
new z(
|
|
5405
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5395
5406
|
this.isInFlyout || this.addEntry_();
|
|
5396
5407
|
})
|
|
5397
5408
|
), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5398
5409
|
},
|
|
5399
5410
|
mutationToDom: function() {
|
|
5400
|
-
const t =
|
|
5411
|
+
const t = an.createElement("mutation");
|
|
5401
5412
|
for (let e = 0; e < this.length; e++) {
|
|
5402
|
-
const n =
|
|
5413
|
+
const n = an.createElement("item");
|
|
5403
5414
|
n.setAttribute("key", this.getFieldValue("KEY" + e)), t.appendChild(n);
|
|
5404
5415
|
}
|
|
5405
5416
|
return t;
|
|
@@ -5419,11 +5430,11 @@ const ln = v.xml, zi = {
|
|
|
5419
5430
|
for (let e = 0; e < t.length; e++) {
|
|
5420
5431
|
const n = t[e], o = "ENTRY" + e, i = this.appendValueInput(o);
|
|
5421
5432
|
i.appendField(
|
|
5422
|
-
new z(
|
|
5433
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5423
5434
|
this.isInFlyout || this.addEntry_(i);
|
|
5424
5435
|
})
|
|
5425
|
-
), i.appendField(new
|
|
5426
|
-
new z(
|
|
5436
|
+
), i.appendField(new ue(n), "KEY" + e), i.appendField(
|
|
5437
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5427
5438
|
this.isInFlyout || this.removeEntry_(i);
|
|
5428
5439
|
})
|
|
5429
5440
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -5431,16 +5442,16 @@ const ln = v.xml, zi = {
|
|
|
5431
5442
|
},
|
|
5432
5443
|
addEntry_: function(t) {
|
|
5433
5444
|
let e = this.length;
|
|
5434
|
-
t && (e =
|
|
5445
|
+
t && (e = be(t.name.substring(5)));
|
|
5435
5446
|
for (let o = this.length - 1; o >= e; o--)
|
|
5436
5447
|
this.getField("KEY" + o).name = "KEY" + (o + 1), this.getInput("ENTRY" + o).name = "ENTRY" + (o + 1);
|
|
5437
5448
|
const n = this.appendValueInput("ENTRY" + e);
|
|
5438
5449
|
n.appendField(
|
|
5439
|
-
new z(
|
|
5450
|
+
new z(ge, 20, 20, void 0, () => {
|
|
5440
5451
|
this.isInFlyout || this.addEntry_(n);
|
|
5441
5452
|
})
|
|
5442
|
-
), n.appendField(new
|
|
5443
|
-
new z(
|
|
5453
|
+
), n.appendField(new ue("key"), "KEY" + e), n.appendField(
|
|
5454
|
+
new z(Xe, 20, 20, void 0, () => {
|
|
5444
5455
|
this.isInFlyout || this.removeEntry_(n);
|
|
5445
5456
|
})
|
|
5446
5457
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -5448,54 +5459,54 @@ const ln = v.xml, zi = {
|
|
|
5448
5459
|
removeEntry_: function(t) {
|
|
5449
5460
|
const e = t.name, n = this.getInputTargetBlock(e);
|
|
5450
5461
|
n && n.dispose(), this.removeInput(e);
|
|
5451
|
-
const o =
|
|
5462
|
+
const o = be(e.substring(5));
|
|
5452
5463
|
for (let i = o + 1; i < this.length; i++)
|
|
5453
5464
|
this.getField("KEY" + i).name = "KEY" + (i - 1), this.getInput("ENTRY" + i).name = "ENTRY" + (i - 1);
|
|
5454
5465
|
this.length--;
|
|
5455
5466
|
}
|
|
5456
5467
|
};
|
|
5457
|
-
d.json_map_v1 =
|
|
5458
|
-
const
|
|
5468
|
+
d.json_map_v1 = ns;
|
|
5469
|
+
const os = {
|
|
5459
5470
|
init: function() {
|
|
5460
|
-
this.appendDummyInput().appendField(new
|
|
5471
|
+
this.appendDummyInput().appendField(new St(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
5461
5472
|
}
|
|
5462
5473
|
};
|
|
5463
|
-
d.json_number_v1 =
|
|
5464
|
-
const
|
|
5474
|
+
d.json_number_v1 = os;
|
|
5475
|
+
const is = {
|
|
5465
5476
|
init: function() {
|
|
5466
5477
|
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
5478
|
}
|
|
5468
5479
|
};
|
|
5469
|
-
d.json_root_v1 =
|
|
5470
|
-
const
|
|
5480
|
+
d.json_root_v1 = is;
|
|
5481
|
+
const ss = {
|
|
5471
5482
|
init: function() {
|
|
5472
|
-
this.appendDummyInput().appendField('"').appendField(new
|
|
5483
|
+
this.appendDummyInput().appendField('"').appendField(new ue(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5473
5484
|
}
|
|
5474
5485
|
};
|
|
5475
|
-
d.json_string_v1 =
|
|
5476
|
-
const
|
|
5486
|
+
d.json_string_v1 = ss;
|
|
5487
|
+
const as = v.xml, cs = {
|
|
5477
5488
|
init: function() {
|
|
5478
5489
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5479
5490
|
}
|
|
5480
5491
|
};
|
|
5481
|
-
d.list_create_container_v1 =
|
|
5482
|
-
const
|
|
5492
|
+
d.list_create_container_v1 = cs;
|
|
5493
|
+
const ls = {
|
|
5483
5494
|
init: function() {
|
|
5484
5495
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5485
5496
|
}
|
|
5486
5497
|
};
|
|
5487
|
-
d.list_create_item_v1 =
|
|
5488
|
-
const
|
|
5498
|
+
d.list_create_item_v1 = ls;
|
|
5499
|
+
const us = {
|
|
5489
5500
|
init: function() {
|
|
5490
5501
|
this.itemCount_ = 0, this.setMutator(
|
|
5491
|
-
new
|
|
5502
|
+
new fe.MutatorIcon(
|
|
5492
5503
|
["list_create_item_v1"],
|
|
5493
5504
|
this
|
|
5494
5505
|
)
|
|
5495
5506
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
5496
5507
|
},
|
|
5497
5508
|
mutationToDom: function() {
|
|
5498
|
-
const t =
|
|
5509
|
+
const t = as.createElement("mutation");
|
|
5499
5510
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5500
5511
|
},
|
|
5501
5512
|
domToMutation: function(t) {
|
|
@@ -5568,7 +5579,7 @@ const ss = {
|
|
|
5568
5579
|
this.removeInput("ADD" + t);
|
|
5569
5580
|
}
|
|
5570
5581
|
};
|
|
5571
|
-
d.list_create_v1 =
|
|
5582
|
+
d.list_create_v1 = us;
|
|
5572
5583
|
s.forBlock.list_create_v1 = function(t) {
|
|
5573
5584
|
const e = t, n = new Array(e.itemCount_);
|
|
5574
5585
|
for (let i = 0; i < e.itemCount_; i++)
|
|
@@ -5784,7 +5795,7 @@ s.forBlock.list_set_v1 = function(t) {
|
|
|
5784
5795
|
return `${e}[${n}] = ${o};
|
|
5785
5796
|
`;
|
|
5786
5797
|
};
|
|
5787
|
-
const
|
|
5798
|
+
const rs = {
|
|
5788
5799
|
// logic_compare
|
|
5789
5800
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
5790
5801
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -5798,7 +5809,7 @@ const as = {
|
|
|
5798
5809
|
};
|
|
5799
5810
|
R.register(
|
|
5800
5811
|
"logic_op_tooltip_v1",
|
|
5801
|
-
R.buildTooltipForDropdown("OP",
|
|
5812
|
+
R.buildTooltipForDropdown("OP", rs)
|
|
5802
5813
|
);
|
|
5803
5814
|
h([
|
|
5804
5815
|
{
|
|
@@ -5823,7 +5834,7 @@ h([
|
|
|
5823
5834
|
s.forBlock.logic_boolean_v1 = function(t) {
|
|
5824
5835
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
5825
5836
|
};
|
|
5826
|
-
const
|
|
5837
|
+
const _s = {
|
|
5827
5838
|
onchange: function(t) {
|
|
5828
5839
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
5829
5840
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -5843,7 +5854,7 @@ const cs = {
|
|
|
5843
5854
|
R.register(
|
|
5844
5855
|
"logic_compare_v1",
|
|
5845
5856
|
function() {
|
|
5846
|
-
this.mixin(
|
|
5857
|
+
this.mixin(_s);
|
|
5847
5858
|
}
|
|
5848
5859
|
);
|
|
5849
5860
|
h([
|
|
@@ -5893,7 +5904,7 @@ s.forBlock.logic_compare_v1 = function(t) {
|
|
|
5893
5904
|
const i = s.valueToCode(t, "A", o) || "0", a = s.valueToCode(t, "B", o) || "0";
|
|
5894
5905
|
return [`${i} ${n} ${a}`, o];
|
|
5895
5906
|
};
|
|
5896
|
-
const
|
|
5907
|
+
const ps = {
|
|
5897
5908
|
elseIfCount_: 0,
|
|
5898
5909
|
hasElse_: !1,
|
|
5899
5910
|
mutationToDom: function() {
|
|
@@ -6020,7 +6031,7 @@ const ls = {
|
|
|
6020
6031
|
};
|
|
6021
6032
|
R.registerMutator(
|
|
6022
6033
|
"logic_if_v1_mutator",
|
|
6023
|
-
|
|
6034
|
+
ps,
|
|
6024
6035
|
void 0,
|
|
6025
6036
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
6026
6037
|
);
|
|
@@ -6166,7 +6177,7 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6166
6177
|
}
|
|
6167
6178
|
return [`${o} ${e} ${i}`, n];
|
|
6168
6179
|
};
|
|
6169
|
-
const
|
|
6180
|
+
const hs = {
|
|
6170
6181
|
prevParentConnection_: null,
|
|
6171
6182
|
onchange: function(t) {
|
|
6172
6183
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -6181,7 +6192,7 @@ const us = {
|
|
|
6181
6192
|
this.prevParentConnection_ = o;
|
|
6182
6193
|
}
|
|
6183
6194
|
};
|
|
6184
|
-
R.registerMixin("logic_ternary_v1",
|
|
6195
|
+
R.registerMixin("logic_ternary_v1", hs);
|
|
6185
6196
|
h([
|
|
6186
6197
|
{
|
|
6187
6198
|
type: "logic_ternary_v1",
|
|
@@ -6218,7 +6229,7 @@ s.forBlock.logic_ternary_v1 = function(t) {
|
|
|
6218
6229
|
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
6230
|
return [e + " ? " + n + " : " + o, c.CONDITIONAL];
|
|
6220
6231
|
};
|
|
6221
|
-
const
|
|
6232
|
+
const ds = {
|
|
6222
6233
|
customContextMenu: function(t) {
|
|
6223
6234
|
if (this.isInFlyout)
|
|
6224
6235
|
return;
|
|
@@ -6233,14 +6244,14 @@ const rs = {
|
|
|
6233
6244
|
t.push({
|
|
6234
6245
|
enabled: !0,
|
|
6235
6246
|
text: _.VARIABLE_SET_CREATE_GET.replace("%1", o),
|
|
6236
|
-
callback:
|
|
6247
|
+
callback: hn.callbackFactory(this, i)
|
|
6237
6248
|
});
|
|
6238
6249
|
}
|
|
6239
6250
|
}
|
|
6240
6251
|
};
|
|
6241
6252
|
R.registerMixin(
|
|
6242
6253
|
"contextMenu_newGetVariableBlock_v1",
|
|
6243
|
-
|
|
6254
|
+
ds
|
|
6244
6255
|
);
|
|
6245
6256
|
R.register(
|
|
6246
6257
|
"flow_control_tooltip_v1",
|
|
@@ -6249,16 +6260,16 @@ R.register(
|
|
|
6249
6260
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6250
6261
|
})
|
|
6251
6262
|
);
|
|
6252
|
-
const
|
|
6263
|
+
const fs = /* @__PURE__ */ new Set([
|
|
6253
6264
|
"repeat_v1",
|
|
6254
6265
|
"for_each_v1",
|
|
6255
6266
|
"for_v1",
|
|
6256
6267
|
"while_until_v1"
|
|
6257
|
-
]),
|
|
6268
|
+
]), ms = {
|
|
6258
6269
|
getSurroundLoop: function() {
|
|
6259
6270
|
let t = this;
|
|
6260
6271
|
do {
|
|
6261
|
-
if (
|
|
6272
|
+
if (fs.has(t.type))
|
|
6262
6273
|
return t;
|
|
6263
6274
|
t = t?.getSurroundParent();
|
|
6264
6275
|
} while (t);
|
|
@@ -6281,7 +6292,7 @@ const _s = /* @__PURE__ */ new Set([
|
|
|
6281
6292
|
};
|
|
6282
6293
|
R.registerMixin(
|
|
6283
6294
|
"flow_control_in_loop_check_v1",
|
|
6284
|
-
|
|
6295
|
+
ms
|
|
6285
6296
|
);
|
|
6286
6297
|
h([
|
|
6287
6298
|
{
|
|
@@ -6583,7 +6594,7 @@ s.forBlock.while_until_v1 = function(t) {
|
|
|
6583
6594
|
${o}}
|
|
6584
6595
|
`;
|
|
6585
6596
|
};
|
|
6586
|
-
const
|
|
6597
|
+
const Ts = {
|
|
6587
6598
|
// math_arithmetic
|
|
6588
6599
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
6589
6600
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -6617,7 +6628,7 @@ const hs = {
|
|
|
6617
6628
|
};
|
|
6618
6629
|
R.register(
|
|
6619
6630
|
"math_op_tooltip_v1",
|
|
6620
|
-
R.buildTooltipForDropdown("OP",
|
|
6631
|
+
R.buildTooltipForDropdown("OP", Ts)
|
|
6621
6632
|
);
|
|
6622
6633
|
h([
|
|
6623
6634
|
{
|
|
@@ -7220,31 +7231,31 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7220
7231
|
}
|
|
7221
7232
|
return [o, c.DIVISION];
|
|
7222
7233
|
};
|
|
7223
|
-
const
|
|
7234
|
+
const Es = v.xml, gs = {
|
|
7224
7235
|
init: function() {
|
|
7225
7236
|
this.appendDummyInput().appendField(
|
|
7226
7237
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
7227
7238
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7228
7239
|
}
|
|
7229
7240
|
};
|
|
7230
|
-
d.object_create_container_v1 =
|
|
7231
|
-
const
|
|
7241
|
+
d.object_create_container_v1 = gs;
|
|
7242
|
+
const Is = {
|
|
7232
7243
|
init: function() {
|
|
7233
7244
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7234
7245
|
}
|
|
7235
7246
|
};
|
|
7236
|
-
d.object_create_item_v1 =
|
|
7237
|
-
const
|
|
7247
|
+
d.object_create_item_v1 = Is;
|
|
7248
|
+
const As = {
|
|
7238
7249
|
init: function() {
|
|
7239
7250
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
7240
|
-
new
|
|
7251
|
+
new fe.MutatorIcon(
|
|
7241
7252
|
["object_create_item_v1"],
|
|
7242
7253
|
this
|
|
7243
7254
|
)
|
|
7244
7255
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7245
7256
|
},
|
|
7246
7257
|
mutationToDom: function() {
|
|
7247
|
-
const t =
|
|
7258
|
+
const t = Es.createElement("mutation");
|
|
7248
7259
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7249
7260
|
},
|
|
7250
7261
|
domToMutation: function(t) {
|
|
@@ -7303,12 +7314,12 @@ const Ts = {
|
|
|
7303
7314
|
},
|
|
7304
7315
|
updateShape_: function() {
|
|
7305
7316
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7306
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new
|
|
7317
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(k.Align.RIGHT).appendField(new ue("key"), "KEY" + t);
|
|
7307
7318
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7308
7319
|
this.removeInput("ADD" + t);
|
|
7309
7320
|
}
|
|
7310
7321
|
};
|
|
7311
|
-
d.object_create_v1 =
|
|
7322
|
+
d.object_create_v1 = As;
|
|
7312
7323
|
s.forBlock.object_create_v1 = function(t) {
|
|
7313
7324
|
const e = t;
|
|
7314
7325
|
let n = "{";
|
|
@@ -7550,15 +7561,15 @@ h([
|
|
|
7550
7561
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7551
7562
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7552
7563
|
};
|
|
7553
|
-
const
|
|
7564
|
+
const cn = v.xml, Os = {
|
|
7554
7565
|
init: function() {
|
|
7555
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
7566
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new co(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7556
7567
|
}
|
|
7557
7568
|
};
|
|
7558
|
-
d.procedure_def_container_v1 =
|
|
7559
|
-
const
|
|
7569
|
+
d.procedure_def_container_v1 = Os;
|
|
7570
|
+
const Cs = {
|
|
7560
7571
|
init: function() {
|
|
7561
|
-
const t = new
|
|
7572
|
+
const t = new ue(bt.DEFAULT_ARG);
|
|
7562
7573
|
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
7574
|
},
|
|
7564
7575
|
validator_: function(t) {
|
|
@@ -7578,24 +7589,24 @@ const gs = {
|
|
|
7578
7589
|
return t;
|
|
7579
7590
|
}
|
|
7580
7591
|
};
|
|
7581
|
-
d.procedure_def_item_v1 =
|
|
7582
|
-
const
|
|
7592
|
+
d.procedure_def_item_v1 = Cs;
|
|
7593
|
+
const ks = {
|
|
7583
7594
|
init: function() {
|
|
7584
7595
|
this.withReturn = !1, this.args = [];
|
|
7585
|
-
const t = new
|
|
7586
|
-
|
|
7596
|
+
const t = new ue(
|
|
7597
|
+
bt.findLegalName("", this)
|
|
7587
7598
|
);
|
|
7588
|
-
t.setValidator(
|
|
7589
|
-
new
|
|
7599
|
+
t.setValidator(bt.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
7600
|
+
new fe.MutatorIcon(
|
|
7590
7601
|
["procedure_def_item_v1"],
|
|
7591
7602
|
this
|
|
7592
7603
|
)
|
|
7593
7604
|
), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7594
7605
|
},
|
|
7595
7606
|
mutationToDom: function() {
|
|
7596
|
-
const t =
|
|
7607
|
+
const t = cn.createElement("mutation");
|
|
7597
7608
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((e) => {
|
|
7598
|
-
const n =
|
|
7609
|
+
const n = cn.createElement("arg");
|
|
7599
7610
|
n.setAttribute("name", e.name), n.setAttribute("id", e.id), t.appendChild(n);
|
|
7600
7611
|
}), t;
|
|
7601
7612
|
},
|
|
@@ -7671,7 +7682,7 @@ const Is = {
|
|
|
7671
7682
|
o.setKeyName(`__param@${e.id}__`, e.name, !1);
|
|
7672
7683
|
else
|
|
7673
7684
|
try {
|
|
7674
|
-
E.disable(), o =
|
|
7685
|
+
E.disable(), o = $t(
|
|
7675
7686
|
this.workspace,
|
|
7676
7687
|
`__param@${e.id}__`,
|
|
7677
7688
|
e.name,
|
|
@@ -7683,13 +7694,13 @@ const Is = {
|
|
|
7683
7694
|
}
|
|
7684
7695
|
}
|
|
7685
7696
|
};
|
|
7686
|
-
d.procedure_def_v1 =
|
|
7687
|
-
const
|
|
7697
|
+
d.procedure_def_v1 = ks;
|
|
7698
|
+
const vs = v.xml, ys = {
|
|
7688
7699
|
init: function() {
|
|
7689
7700
|
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
7701
|
},
|
|
7691
7702
|
mutationToDom: function() {
|
|
7692
|
-
const t =
|
|
7703
|
+
const t = vs.createElement("mutation");
|
|
7693
7704
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
7694
7705
|
},
|
|
7695
7706
|
domToMutation: function(t) {
|
|
@@ -7740,14 +7751,14 @@ const As = v.xml, Os = {
|
|
|
7740
7751
|
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
7752
|
}
|
|
7742
7753
|
};
|
|
7743
|
-
d.procedure_return_v1 =
|
|
7754
|
+
d.procedure_return_v1 = ys;
|
|
7744
7755
|
s.forBlock.procedure_return_v1 = function(t) {
|
|
7745
7756
|
const e = t;
|
|
7746
7757
|
return e.withReturn ? `return ${s.valueToCode(e, "VALUE", c.NONE) || "null"};
|
|
7747
7758
|
` : `return;
|
|
7748
7759
|
`;
|
|
7749
7760
|
};
|
|
7750
|
-
const
|
|
7761
|
+
const Ns = {
|
|
7751
7762
|
init: function() {
|
|
7752
7763
|
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
7764
|
},
|
|
@@ -7770,7 +7781,7 @@ const Cs = {
|
|
|
7770
7781
|
]);
|
|
7771
7782
|
}
|
|
7772
7783
|
};
|
|
7773
|
-
d.download_resource_v1 =
|
|
7784
|
+
d.download_resource_v1 = Ns;
|
|
7774
7785
|
s.forBlock.download_resource_v1 = function(t) {
|
|
7775
7786
|
const e = s.valueToCode(t, "ASSET", c.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
|
|
7776
7787
|
return `{
|
|
@@ -7782,7 +7793,7 @@ ${n}
|
|
|
7782
7793
|
}
|
|
7783
7794
|
`;
|
|
7784
7795
|
};
|
|
7785
|
-
function
|
|
7796
|
+
function Rn(t) {
|
|
7786
7797
|
const e = T.resource.spaces.find((i) => i.id === t);
|
|
7787
7798
|
if (!e)
|
|
7788
7799
|
return [];
|
|
@@ -7798,13 +7809,13 @@ function Un(t) {
|
|
|
7798
7809
|
}
|
|
7799
7810
|
return o(e.dirTree, ""), n;
|
|
7800
7811
|
}
|
|
7801
|
-
function
|
|
7812
|
+
function Ls(t) {
|
|
7802
7813
|
const e = [];
|
|
7803
|
-
return
|
|
7814
|
+
return Rn(t).forEach(({ id: o, name: i }) => {
|
|
7804
7815
|
e.push([i, o]);
|
|
7805
7816
|
}), N(e);
|
|
7806
7817
|
}
|
|
7807
|
-
function
|
|
7818
|
+
function Dn(t, e) {
|
|
7808
7819
|
const n = T.resource.spaces.find((i) => i.id === t);
|
|
7809
7820
|
if (!n)
|
|
7810
7821
|
return [];
|
|
@@ -7813,25 +7824,25 @@ function Mn(t, e) {
|
|
|
7813
7824
|
i.dirid === e && o.push(i);
|
|
7814
7825
|
}), o;
|
|
7815
7826
|
}
|
|
7816
|
-
function
|
|
7827
|
+
function Ss(t, e) {
|
|
7817
7828
|
const n = [];
|
|
7818
|
-
return
|
|
7829
|
+
return Dn(t, e).forEach(({ id: i, name: a }) => {
|
|
7819
7830
|
n.push([a, i]);
|
|
7820
7831
|
}), N(n);
|
|
7821
7832
|
}
|
|
7822
|
-
function
|
|
7833
|
+
function Un() {
|
|
7823
7834
|
const t = [];
|
|
7824
7835
|
return T.resource.spaces.forEach((e) => {
|
|
7825
7836
|
e.resources.length > 0 && t.push(e);
|
|
7826
7837
|
}), t;
|
|
7827
7838
|
}
|
|
7828
|
-
function
|
|
7839
|
+
function bs() {
|
|
7829
7840
|
const t = [];
|
|
7830
|
-
return
|
|
7841
|
+
return Un().forEach(({ id: n, name: o }) => {
|
|
7831
7842
|
t.push([o, n]);
|
|
7832
7843
|
}), N(t);
|
|
7833
7844
|
}
|
|
7834
|
-
const
|
|
7845
|
+
const Bs = {
|
|
7835
7846
|
init: function() {
|
|
7836
7847
|
this.space = {
|
|
7837
7848
|
id: "",
|
|
@@ -7850,19 +7861,19 @@ const Ns = {
|
|
|
7850
7861
|
initData_: function() {
|
|
7851
7862
|
if (this.space.id)
|
|
7852
7863
|
return;
|
|
7853
|
-
const t =
|
|
7864
|
+
const t = Un()?.[0];
|
|
7854
7865
|
if (!t)
|
|
7855
7866
|
return;
|
|
7856
7867
|
this.space.id = t.id, this.space.name = t.name;
|
|
7857
7868
|
const e = this.getField("SPACE");
|
|
7858
7869
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
7859
|
-
const n =
|
|
7870
|
+
const n = Rn(this.space.id)?.[0];
|
|
7860
7871
|
if (!n)
|
|
7861
7872
|
return;
|
|
7862
7873
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7863
7874
|
const o = this.getField("DIR");
|
|
7864
7875
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
7865
|
-
const i =
|
|
7876
|
+
const i = Dn(this.space.id, this.dir.id)?.[0];
|
|
7866
7877
|
if (!i)
|
|
7867
7878
|
return;
|
|
7868
7879
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
@@ -7877,23 +7888,23 @@ const Ns = {
|
|
|
7877
7888
|
};
|
|
7878
7889
|
},
|
|
7879
7890
|
loadExtraState: function(t) {
|
|
7880
|
-
this.space =
|
|
7891
|
+
this.space = Se(t.space), this.dir = Se(t.dir), this.resource = Se(t.resource);
|
|
7881
7892
|
},
|
|
7882
7893
|
genSpaceOpts_: function() {
|
|
7883
|
-
return
|
|
7894
|
+
return bs();
|
|
7884
7895
|
},
|
|
7885
7896
|
genDirOpts_: function() {
|
|
7886
|
-
return
|
|
7897
|
+
return Ls(this.space.id);
|
|
7887
7898
|
},
|
|
7888
7899
|
genResourceOpts_: function() {
|
|
7889
|
-
return
|
|
7900
|
+
return Ss(this.space.id, this.dir.id);
|
|
7890
7901
|
}
|
|
7891
7902
|
};
|
|
7892
|
-
d.select_resource_v1 =
|
|
7903
|
+
d.select_resource_v1 = Bs;
|
|
7893
7904
|
s.forBlock.select_resource_v1 = function() {
|
|
7894
7905
|
return "";
|
|
7895
7906
|
};
|
|
7896
|
-
const
|
|
7907
|
+
const Rs = {
|
|
7897
7908
|
init: function() {
|
|
7898
7909
|
this.appendDummyInput().appendField(
|
|
7899
7910
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -7924,7 +7935,7 @@ const Ls = {
|
|
|
7924
7935
|
]);
|
|
7925
7936
|
}
|
|
7926
7937
|
};
|
|
7927
|
-
d.upload_resource_v1 =
|
|
7938
|
+
d.upload_resource_v1 = Rs;
|
|
7928
7939
|
s.forBlock.upload_resource_v1 = function(t) {
|
|
7929
7940
|
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
7941
|
return `{
|
|
@@ -7957,9 +7968,9 @@ h([
|
|
|
7957
7968
|
s.forBlock.text_v1 = function(t) {
|
|
7958
7969
|
return [s.quote_(t.getFieldValue("TEXT")), c.ATOMIC];
|
|
7959
7970
|
};
|
|
7960
|
-
const
|
|
7961
|
-
function
|
|
7962
|
-
return
|
|
7971
|
+
const Ds = /^\s*'([^']|\\')*'\s*$/;
|
|
7972
|
+
function je(t) {
|
|
7973
|
+
return Ds.test(t) ? [t, c.ATOMIC] : [`String(${t})`, c.FUNCTION_CALL];
|
|
7963
7974
|
}
|
|
7964
7975
|
R.register(
|
|
7965
7976
|
"text_append_tooltip_v1",
|
|
@@ -7994,7 +8005,7 @@ s.forBlock.text_append_v1 = function(t) {
|
|
|
7994
8005
|
t.getFieldValue("VAR"),
|
|
7995
8006
|
te.NameType.VARIABLE
|
|
7996
8007
|
), n = s.valueToCode(t, "TEXT", c.NONE) || "''";
|
|
7997
|
-
return `${e} += ${
|
|
8008
|
+
return `${e} += ${je(n)};
|
|
7998
8009
|
`;
|
|
7999
8010
|
};
|
|
8000
8011
|
h([
|
|
@@ -8163,10 +8174,10 @@ h([
|
|
|
8163
8174
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8164
8175
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8165
8176
|
};
|
|
8166
|
-
const
|
|
8177
|
+
const Us = v.xml, Ms = {
|
|
8167
8178
|
itemCount_: 0,
|
|
8168
8179
|
mutationToDom: function() {
|
|
8169
|
-
const t =
|
|
8180
|
+
const t = Us.createElement("mutation");
|
|
8170
8181
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
8171
8182
|
},
|
|
8172
8183
|
domToMutation: function(t) {
|
|
@@ -8237,13 +8248,13 @@ const bs = v.xml, Bs = {
|
|
|
8237
8248
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
8238
8249
|
this.removeInput("ADD" + t);
|
|
8239
8250
|
}
|
|
8240
|
-
},
|
|
8241
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
8251
|
+
}, Ps = function() {
|
|
8252
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new fe.MutatorIcon(["text_join_item_v1"], this));
|
|
8242
8253
|
};
|
|
8243
8254
|
R.registerMutator(
|
|
8244
8255
|
"text_join_mutator_v1",
|
|
8245
|
-
|
|
8246
|
-
|
|
8256
|
+
Ms,
|
|
8257
|
+
Ps
|
|
8247
8258
|
);
|
|
8248
8259
|
h([
|
|
8249
8260
|
{
|
|
@@ -8286,11 +8297,11 @@ s.forBlock.text_join_v1 = function(t) {
|
|
|
8286
8297
|
return ["''", c.ATOMIC];
|
|
8287
8298
|
case 1: {
|
|
8288
8299
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''";
|
|
8289
|
-
return
|
|
8300
|
+
return je(n);
|
|
8290
8301
|
}
|
|
8291
8302
|
case 2: {
|
|
8292
8303
|
const n = s.valueToCode(e, "ADD0", c.NONE) || "''", o = s.valueToCode(e, "ADD1", c.NONE) || "''";
|
|
8293
|
-
return [
|
|
8304
|
+
return [je(n)[0] + " + " + je(o)[0], c.ADDITION];
|
|
8294
8305
|
}
|
|
8295
8306
|
default: {
|
|
8296
8307
|
const n = new Array(e.itemCount_);
|
|
@@ -8475,7 +8486,7 @@ s.forBlock.text_trim_v1 = function(t) {
|
|
|
8475
8486
|
}[t.getFieldValue("MODE")];
|
|
8476
8487
|
return [`__trimV1__(${e}, ${o})`, c.ATOMIC];
|
|
8477
8488
|
};
|
|
8478
|
-
const
|
|
8489
|
+
const Vs = {
|
|
8479
8490
|
init: function() {
|
|
8480
8491
|
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
8492
|
},
|
|
@@ -8500,7 +8511,7 @@ const Ds = {
|
|
|
8500
8511
|
));
|
|
8501
8512
|
}
|
|
8502
8513
|
};
|
|
8503
|
-
d.create_timer_v1 =
|
|
8514
|
+
d.create_timer_v1 = Vs;
|
|
8504
8515
|
s.forBlock.create_timer_v1 = function(t) {
|
|
8505
8516
|
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
8517
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
|
|
@@ -8529,18 +8540,18 @@ s.forBlock.delay_v1 = function(t) {
|
|
|
8529
8540
|
return `__delayV1__(${s.valueToCode(t, "DURATION", c.ATOMIC) || "0"});
|
|
8530
8541
|
`;
|
|
8531
8542
|
};
|
|
8532
|
-
const
|
|
8543
|
+
const xs = {
|
|
8533
8544
|
customContextMenu: function(t) {
|
|
8534
8545
|
if (this.isInFlyout) {
|
|
8535
8546
|
if (this.type === "variable_get_v1") {
|
|
8536
8547
|
const e = {
|
|
8537
8548
|
text: _.RENAME_VARIABLE,
|
|
8538
8549
|
enabled: !0,
|
|
8539
|
-
callback:
|
|
8550
|
+
callback: Fs(this)
|
|
8540
8551
|
}, n = this.getField("VAR").getText(), o = {
|
|
8541
8552
|
text: _.DELETE_VARIABLE.replace("%1", n),
|
|
8542
8553
|
enabled: !0,
|
|
8543
|
-
callback:
|
|
8554
|
+
callback: Ys(this)
|
|
8544
8555
|
};
|
|
8545
8556
|
t.unshift(e), t.unshift(o);
|
|
8546
8557
|
}
|
|
@@ -8554,24 +8565,24 @@ const Us = {
|
|
|
8554
8565
|
t.push({
|
|
8555
8566
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8556
8567
|
text: n.replace("%1", o.getText()),
|
|
8557
|
-
callback:
|
|
8568
|
+
callback: hn.callbackFactory(this, i)
|
|
8558
8569
|
});
|
|
8559
8570
|
}
|
|
8560
8571
|
}
|
|
8561
|
-
},
|
|
8572
|
+
}, Fs = function(t) {
|
|
8562
8573
|
return function() {
|
|
8563
8574
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
8564
|
-
|
|
8575
|
+
Te.renameVariable(e, o);
|
|
8565
8576
|
};
|
|
8566
|
-
},
|
|
8577
|
+
}, Ys = function(t) {
|
|
8567
8578
|
return function() {
|
|
8568
8579
|
const n = t.getField("VAR").getVariable();
|
|
8569
|
-
n &&
|
|
8580
|
+
n && Te.deleteVariable(n.getWorkspace(), n, t);
|
|
8570
8581
|
};
|
|
8571
8582
|
};
|
|
8572
8583
|
R.registerMixin(
|
|
8573
8584
|
"context_menu_variable_v1",
|
|
8574
|
-
|
|
8585
|
+
xs
|
|
8575
8586
|
);
|
|
8576
8587
|
h([
|
|
8577
8588
|
{
|
|
@@ -8627,49 +8638,49 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8627
8638
|
return `${e} = ${n};
|
|
8628
8639
|
`;
|
|
8629
8640
|
};
|
|
8630
|
-
const
|
|
8631
|
-
function
|
|
8641
|
+
const $e = v.xml;
|
|
8642
|
+
function ws() {
|
|
8632
8643
|
const t = [];
|
|
8633
8644
|
{
|
|
8634
|
-
const e =
|
|
8645
|
+
const e = $e.createElement("label");
|
|
8635
8646
|
e.setAttribute("text", _.LABEL_ASSET_LAYER), t.push(e);
|
|
8636
8647
|
}
|
|
8637
8648
|
{
|
|
8638
|
-
const e =
|
|
8649
|
+
const e = $e.createElement("block");
|
|
8639
8650
|
e.setAttribute("type", "upload_resource_v1"), t.push(e);
|
|
8640
8651
|
}
|
|
8641
8652
|
{
|
|
8642
|
-
const e =
|
|
8653
|
+
const e = $e.createElement("label");
|
|
8643
8654
|
e.setAttribute("text", _.LABEL_COMPUTE_LAYER), t.push(e);
|
|
8644
8655
|
}
|
|
8645
8656
|
{
|
|
8646
|
-
const e =
|
|
8657
|
+
const e = $e.createElement("block");
|
|
8647
8658
|
e.setAttribute("type", "call_func_v1"), t.push(e);
|
|
8648
8659
|
}
|
|
8649
8660
|
return t;
|
|
8650
8661
|
}
|
|
8651
|
-
const
|
|
8662
|
+
const Ze = {
|
|
8652
8663
|
name: "INTERFACE_CATEGORY",
|
|
8653
|
-
callback:
|
|
8664
|
+
callback: ws
|
|
8654
8665
|
}, b = v.xml;
|
|
8655
|
-
function
|
|
8666
|
+
function Ks() {
|
|
8656
8667
|
const t = [];
|
|
8657
|
-
if (
|
|
8668
|
+
if (zo()) {
|
|
8658
8669
|
{
|
|
8659
8670
|
const e = b.createElement("label");
|
|
8660
8671
|
e.setAttribute("text", _.LABEL_PAGE), t.push(e);
|
|
8661
8672
|
}
|
|
8662
|
-
if (
|
|
8673
|
+
if (Nn().length > 0) {
|
|
8663
8674
|
const e = b.createElement("block");
|
|
8664
8675
|
e.setAttribute("type", "get_page_argument_v1"), t.push(e);
|
|
8665
8676
|
}
|
|
8666
8677
|
}
|
|
8667
|
-
if (
|
|
8678
|
+
if ($o()) {
|
|
8668
8679
|
{
|
|
8669
8680
|
const e = b.createElement("label");
|
|
8670
8681
|
e.setAttribute("text", _.LABEL_COMP), t.push(e);
|
|
8671
8682
|
}
|
|
8672
|
-
if (
|
|
8683
|
+
if (Me().length > 0) {
|
|
8673
8684
|
{
|
|
8674
8685
|
const e = b.createElement("block");
|
|
8675
8686
|
e.setAttribute("type", "comp_method_impl_v1"), t.push(e);
|
|
@@ -8679,7 +8690,7 @@ function xs() {
|
|
|
8679
8690
|
e.setAttribute("type", "set_comp_method_output_v1"), t.push(e);
|
|
8680
8691
|
}
|
|
8681
8692
|
}
|
|
8682
|
-
if (
|
|
8693
|
+
if (Me().length > 0) {
|
|
8683
8694
|
const e = b.createElement("block");
|
|
8684
8695
|
e.setAttribute("type", "trigger_comp_event_v1"), t.push(e);
|
|
8685
8696
|
}
|
|
@@ -8740,29 +8751,29 @@ function xs() {
|
|
|
8740
8751
|
const e = b.createElement("block");
|
|
8741
8752
|
e.setAttribute("type", "app_env_v1"), t.push(e);
|
|
8742
8753
|
}
|
|
8743
|
-
if (
|
|
8754
|
+
if (Ht().length > 0) {
|
|
8744
8755
|
const e = b.createElement("block");
|
|
8745
8756
|
e.setAttribute("type", "navigate_to_v1"), t.push(e);
|
|
8746
8757
|
}
|
|
8747
8758
|
return t;
|
|
8748
8759
|
}
|
|
8749
|
-
const
|
|
8760
|
+
const et = {
|
|
8750
8761
|
name: "UI_CATEGORY",
|
|
8751
|
-
callback:
|
|
8752
|
-
},
|
|
8753
|
-
function
|
|
8762
|
+
callback: Ks
|
|
8763
|
+
}, ye = v.xml;
|
|
8764
|
+
function $s() {
|
|
8754
8765
|
const t = [];
|
|
8755
8766
|
{
|
|
8756
|
-
const e =
|
|
8767
|
+
const e = ye.createElement("label");
|
|
8757
8768
|
e.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), t.push(e);
|
|
8758
8769
|
}
|
|
8759
8770
|
{
|
|
8760
|
-
const e =
|
|
8771
|
+
const e = ye.createElement("block");
|
|
8761
8772
|
e.setAttribute("type", "procedure_def_v1");
|
|
8762
8773
|
{
|
|
8763
|
-
const n =
|
|
8774
|
+
const n = ye.createElement("field");
|
|
8764
8775
|
n.setAttribute("name", "NAME");
|
|
8765
|
-
const o =
|
|
8776
|
+
const o = ye.createTextNode(
|
|
8766
8777
|
_.PROCEDURE_DEFAULT_NAME
|
|
8767
8778
|
);
|
|
8768
8779
|
n.appendChild(o), e.appendChild(n);
|
|
@@ -8770,19 +8781,19 @@ function Fs() {
|
|
|
8770
8781
|
t.push(e);
|
|
8771
8782
|
}
|
|
8772
8783
|
{
|
|
8773
|
-
const e =
|
|
8784
|
+
const e = ye.createElement("block");
|
|
8774
8785
|
e.setAttribute("type", "procedure_return_v1"), t.push(e);
|
|
8775
8786
|
}
|
|
8776
8787
|
return t;
|
|
8777
8788
|
}
|
|
8778
8789
|
const ce = {
|
|
8779
8790
|
name: "PROCEDURE_CATEGORY",
|
|
8780
|
-
callback:
|
|
8781
|
-
},
|
|
8782
|
-
function
|
|
8783
|
-
const t =
|
|
8791
|
+
callback: $s
|
|
8792
|
+
}, He = v.xml;
|
|
8793
|
+
function Hs() {
|
|
8794
|
+
const t = Ve(), e = [];
|
|
8784
8795
|
{
|
|
8785
|
-
const o =
|
|
8796
|
+
const o = He.createElement("label");
|
|
8786
8797
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
8787
8798
|
}
|
|
8788
8799
|
{
|
|
@@ -8790,7 +8801,7 @@ function ws() {
|
|
|
8790
8801
|
o.setAttribute("text", "%{BKY_NEW_VARIABLE}"), o.setAttribute("callbackKey", "CREATE_VARIABLE"), t.registerButtonCallback(
|
|
8791
8802
|
"CREATE_VARIABLE",
|
|
8792
8803
|
function(i) {
|
|
8793
|
-
|
|
8804
|
+
Te.createVariableButtonHandler(
|
|
8794
8805
|
i.getTargetWorkspace()
|
|
8795
8806
|
);
|
|
8796
8807
|
}
|
|
@@ -8799,44 +8810,44 @@ function ws() {
|
|
|
8799
8810
|
const n = t.getVariablesOfType("");
|
|
8800
8811
|
if (n.length <= 0)
|
|
8801
8812
|
return e;
|
|
8802
|
-
n.sort(
|
|
8813
|
+
n.sort(Te.compareByName);
|
|
8803
8814
|
{
|
|
8804
|
-
const o =
|
|
8815
|
+
const o = He.createElement("label");
|
|
8805
8816
|
o.setAttribute("text", _.LABEL_CREATED), e.push(o);
|
|
8806
8817
|
}
|
|
8807
8818
|
return n.forEach((o) => {
|
|
8808
8819
|
{
|
|
8809
|
-
const i =
|
|
8810
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
8820
|
+
const i = He.createElement("block");
|
|
8821
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8811
8822
|
}
|
|
8812
8823
|
{
|
|
8813
|
-
const i =
|
|
8814
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
8824
|
+
const i = He.createElement("block");
|
|
8825
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Te.generateVariableFieldDom(o)), e.push(i);
|
|
8815
8826
|
}
|
|
8816
8827
|
}), e;
|
|
8817
8828
|
}
|
|
8818
8829
|
const le = {
|
|
8819
8830
|
name: "VARIABLE_CATEGORY",
|
|
8820
|
-
callback:
|
|
8821
|
-
},
|
|
8822
|
-
function
|
|
8831
|
+
callback: Hs
|
|
8832
|
+
}, me = v.xml;
|
|
8833
|
+
function Gs(t) {
|
|
8823
8834
|
const e = [];
|
|
8824
8835
|
if (t === "flow") {
|
|
8825
8836
|
{
|
|
8826
|
-
const n =
|
|
8837
|
+
const n = me.createElement("block");
|
|
8827
8838
|
n.setAttribute("type", "on_flow_state_event_v1"), e.push(n);
|
|
8828
8839
|
}
|
|
8829
8840
|
{
|
|
8830
|
-
const n =
|
|
8841
|
+
const n = me.createElement("block");
|
|
8831
8842
|
n.setAttribute("type", "compute_debug_trace_v1");
|
|
8832
8843
|
{
|
|
8833
|
-
const o =
|
|
8844
|
+
const o = me.createElement("value");
|
|
8834
8845
|
o.setAttribute("name", "OBJECT");
|
|
8835
8846
|
{
|
|
8836
|
-
const i =
|
|
8847
|
+
const i = me.createElement("shadow");
|
|
8837
8848
|
i.setAttribute("type", "text_v1");
|
|
8838
8849
|
{
|
|
8839
|
-
const a =
|
|
8850
|
+
const a = me.createElement("field");
|
|
8840
8851
|
a.setAttribute("name", "TEXT"), i.appendChild(a);
|
|
8841
8852
|
}
|
|
8842
8853
|
o.appendChild(i);
|
|
@@ -8846,19 +8857,19 @@ function Ys(t) {
|
|
|
8846
8857
|
e.push(n);
|
|
8847
8858
|
}
|
|
8848
8859
|
} else if (t === "func") {
|
|
8849
|
-
if (
|
|
8850
|
-
const n =
|
|
8860
|
+
if (Oe().length > 0) {
|
|
8861
|
+
const n = me.createElement("block");
|
|
8851
8862
|
n.setAttribute("type", "call_func_internal_v1"), e.push(n);
|
|
8852
8863
|
}
|
|
8853
8864
|
} else
|
|
8854
8865
|
console.assert(!1);
|
|
8855
8866
|
return e;
|
|
8856
8867
|
}
|
|
8857
|
-
const
|
|
8868
|
+
const tt = {
|
|
8858
8869
|
name: "FLOW_CATEGORY",
|
|
8859
|
-
callback:
|
|
8870
|
+
callback: Gs
|
|
8860
8871
|
}, ne = v.xml;
|
|
8861
|
-
function
|
|
8872
|
+
function Ws(t) {
|
|
8862
8873
|
const { activeFunc: e } = T.compute, n = [];
|
|
8863
8874
|
if (t === "func") {
|
|
8864
8875
|
{
|
|
@@ -8873,7 +8884,7 @@ function Ks(t) {
|
|
|
8873
8884
|
const o = ne.createElement("block");
|
|
8874
8885
|
o.setAttribute("type", "procedure_return_v1"), n.push(o);
|
|
8875
8886
|
}
|
|
8876
|
-
if (
|
|
8887
|
+
if (Oe().length > 0) {
|
|
8877
8888
|
const o = ne.createElement("block");
|
|
8878
8889
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8879
8890
|
}
|
|
@@ -8897,7 +8908,7 @@ function Ks(t) {
|
|
|
8897
8908
|
n.push(o);
|
|
8898
8909
|
}
|
|
8899
8910
|
} else if (t === "flow") {
|
|
8900
|
-
if (
|
|
8911
|
+
if (Oe().length > 0) {
|
|
8901
8912
|
const o = ne.createElement("block");
|
|
8902
8913
|
o.setAttribute("type", "call_func_internal_v1"), n.push(o);
|
|
8903
8914
|
}
|
|
@@ -8905,11 +8916,11 @@ function Ks(t) {
|
|
|
8905
8916
|
console.assert(!1);
|
|
8906
8917
|
return n;
|
|
8907
8918
|
}
|
|
8908
|
-
const
|
|
8919
|
+
const nt = {
|
|
8909
8920
|
name: "FUNC_CATEGORY",
|
|
8910
|
-
callback:
|
|
8921
|
+
callback: Ws
|
|
8911
8922
|
}, O = v.xml;
|
|
8912
|
-
function
|
|
8923
|
+
function js() {
|
|
8913
8924
|
const t = [];
|
|
8914
8925
|
if (J().length > 0) {
|
|
8915
8926
|
{
|
|
@@ -9082,36 +9093,36 @@ function $s() {
|
|
|
9082
9093
|
}
|
|
9083
9094
|
return t;
|
|
9084
9095
|
}
|
|
9085
|
-
const
|
|
9096
|
+
const ot = {
|
|
9086
9097
|
name: "DATA_CATEGORY",
|
|
9087
|
-
callback:
|
|
9098
|
+
callback: js
|
|
9088
9099
|
};
|
|
9089
|
-
|
|
9090
|
-
const n = await
|
|
9100
|
+
dn.setConfirm(async (t, e) => {
|
|
9101
|
+
const n = await vo({
|
|
9091
9102
|
title: "",
|
|
9092
9103
|
text: t
|
|
9093
9104
|
});
|
|
9094
9105
|
e(!!n);
|
|
9095
9106
|
});
|
|
9096
|
-
|
|
9097
|
-
const o = await
|
|
9107
|
+
dn.setPrompt(async (t, e, n) => {
|
|
9108
|
+
const o = await yo({
|
|
9098
9109
|
title: "",
|
|
9099
9110
|
value: e
|
|
9100
9111
|
});
|
|
9101
9112
|
o !== void 0 && n(String(o));
|
|
9102
9113
|
});
|
|
9103
|
-
const
|
|
9114
|
+
const Mn = (t, e, n) => {
|
|
9104
9115
|
const o = t[e];
|
|
9105
9116
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
|
|
9106
9117
|
(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
9118
|
});
|
|
9108
9119
|
};
|
|
9109
|
-
async function
|
|
9110
|
-
const e = await
|
|
9111
|
-
|
|
9120
|
+
async function ln(t) {
|
|
9121
|
+
const e = await Mn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.k914lhgs.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.ib2kecyn.js") }), `./msg/${t}.ts`, 3);
|
|
9122
|
+
lo(e.default);
|
|
9112
9123
|
}
|
|
9113
|
-
function
|
|
9114
|
-
const e =
|
|
9124
|
+
function Gt(t) {
|
|
9125
|
+
const e = Ve();
|
|
9115
9126
|
if (!e)
|
|
9116
9127
|
return;
|
|
9117
9128
|
const n = e.getBlockById(t);
|
|
@@ -9123,33 +9134,33 @@ function Wt(t) {
|
|
|
9123
9134
|
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, l = i.y * e.scale;
|
|
9124
9135
|
e.scroll(-a, -l);
|
|
9125
9136
|
}
|
|
9126
|
-
function
|
|
9127
|
-
const t =
|
|
9137
|
+
function Pn() {
|
|
9138
|
+
const t = Ve();
|
|
9128
9139
|
if (!t)
|
|
9129
9140
|
return;
|
|
9130
9141
|
const e = t.getTopBlocks(!0)?.[0];
|
|
9131
|
-
e &&
|
|
9142
|
+
e && Gt(e.id);
|
|
9132
9143
|
}
|
|
9133
|
-
function
|
|
9144
|
+
function Vn(t) {
|
|
9134
9145
|
const e = t.getParent();
|
|
9135
|
-
return e &&
|
|
9146
|
+
return e && Vn(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9136
9147
|
}
|
|
9137
|
-
class
|
|
9148
|
+
class Xs {
|
|
9138
9149
|
init() {
|
|
9139
|
-
const e =
|
|
9150
|
+
const e = uo.registry.getItem("blockDisable");
|
|
9140
9151
|
e && (e.preconditionFn = function(n) {
|
|
9141
9152
|
const o = n.block;
|
|
9142
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
9153
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Vn(o) ? "disabled" : "enabled" : "hidden";
|
|
9143
9154
|
});
|
|
9144
9155
|
}
|
|
9145
9156
|
}
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
const
|
|
9149
|
-
|
|
9150
|
-
const
|
|
9151
|
-
|
|
9152
|
-
|
|
9157
|
+
ro.registerFieldColour();
|
|
9158
|
+
_o.registry.unregister(po.names.ESCAPE);
|
|
9159
|
+
const Js = new ho.CrossTabCopyPaste();
|
|
9160
|
+
Js.init({ contextMenu: !0, shortcut: !0 });
|
|
9161
|
+
const qs = new Xs();
|
|
9162
|
+
qs.init();
|
|
9163
|
+
st.Classic.blockStyles = {
|
|
9153
9164
|
color_blocks: {
|
|
9154
9165
|
colourPrimary: "#a5745b",
|
|
9155
9166
|
colourSecondary: "#ede3de",
|
|
@@ -9223,7 +9234,7 @@ ct.Classic.blockStyles = {
|
|
|
9223
9234
|
hat: ""
|
|
9224
9235
|
}
|
|
9225
9236
|
};
|
|
9226
|
-
|
|
9237
|
+
st.Classic.categoryStyles = {
|
|
9227
9238
|
calc_category: {
|
|
9228
9239
|
colour: "#757575"
|
|
9229
9240
|
},
|
|
@@ -9279,9 +9290,9 @@ ct.Classic.categoryStyles = {
|
|
|
9279
9290
|
colour: "#a55b80"
|
|
9280
9291
|
}
|
|
9281
9292
|
};
|
|
9282
|
-
const
|
|
9293
|
+
const Qs = fn.defineTheme("light", {
|
|
9283
9294
|
name: "light",
|
|
9284
|
-
base:
|
|
9295
|
+
base: st.Classic,
|
|
9285
9296
|
componentStyles: {
|
|
9286
9297
|
workspaceBackgroundColour: "#ffffff",
|
|
9287
9298
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9295,9 +9306,9 @@ const js = Tn.defineTheme("light", {
|
|
|
9295
9306
|
scrollbarOpacity: 0.4,
|
|
9296
9307
|
cursorColour: ""
|
|
9297
9308
|
}
|
|
9298
|
-
}),
|
|
9309
|
+
}), zs = fn.defineTheme("dark", {
|
|
9299
9310
|
name: "dark",
|
|
9300
|
-
base:
|
|
9311
|
+
base: st.Classic,
|
|
9301
9312
|
componentStyles: {
|
|
9302
9313
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9303
9314
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9312,18 +9323,18 @@ const js = Tn.defineTheme("light", {
|
|
|
9312
9323
|
cursorColour: ""
|
|
9313
9324
|
}
|
|
9314
9325
|
});
|
|
9315
|
-
function
|
|
9316
|
-
const e =
|
|
9326
|
+
function Zs(t) {
|
|
9327
|
+
const e = Ve();
|
|
9317
9328
|
switch (t) {
|
|
9318
9329
|
case "light":
|
|
9319
|
-
e.setTheme(
|
|
9330
|
+
e.setTheme(Qs);
|
|
9320
9331
|
break;
|
|
9321
9332
|
case "dark":
|
|
9322
|
-
e.setTheme(
|
|
9333
|
+
e.setTheme(zs);
|
|
9323
9334
|
break;
|
|
9324
9335
|
}
|
|
9325
9336
|
}
|
|
9326
|
-
const
|
|
9337
|
+
const rt = {
|
|
9327
9338
|
kind: "category",
|
|
9328
9339
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9329
9340
|
categorystyle: "color_category",
|
|
@@ -9397,7 +9408,7 @@ const ht = {
|
|
|
9397
9408
|
}
|
|
9398
9409
|
}
|
|
9399
9410
|
]
|
|
9400
|
-
},
|
|
9411
|
+
}, _t = {
|
|
9401
9412
|
kind: "category",
|
|
9402
9413
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9403
9414
|
categorystyle: "list_category",
|
|
@@ -9512,7 +9523,7 @@ const ht = {
|
|
|
9512
9523
|
type: "list_reverse_v1"
|
|
9513
9524
|
}
|
|
9514
9525
|
]
|
|
9515
|
-
},
|
|
9526
|
+
}, pt = {
|
|
9516
9527
|
kind: "category",
|
|
9517
9528
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9518
9529
|
categorystyle: "logic_category",
|
|
@@ -9554,7 +9565,7 @@ const ht = {
|
|
|
9554
9565
|
type: "logic_ternary_v1"
|
|
9555
9566
|
}
|
|
9556
9567
|
]
|
|
9557
|
-
},
|
|
9568
|
+
}, ht = {
|
|
9558
9569
|
kind: "category",
|
|
9559
9570
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9560
9571
|
categorystyle: "loop_category",
|
|
@@ -9616,7 +9627,7 @@ const ht = {
|
|
|
9616
9627
|
type: "flow_control_v1"
|
|
9617
9628
|
}
|
|
9618
9629
|
]
|
|
9619
|
-
},
|
|
9630
|
+
}, dt = {
|
|
9620
9631
|
kind: "category",
|
|
9621
9632
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9622
9633
|
categorystyle: "math_category",
|
|
@@ -9771,7 +9782,7 @@ const ht = {
|
|
|
9771
9782
|
type: "math_on_list_v1"
|
|
9772
9783
|
}
|
|
9773
9784
|
]
|
|
9774
|
-
},
|
|
9785
|
+
}, xn = {
|
|
9775
9786
|
kind: "category",
|
|
9776
9787
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9777
9788
|
categorystyle: "message_category",
|
|
@@ -9807,7 +9818,7 @@ const ht = {
|
|
|
9807
9818
|
type: "open_prompt_dlg_v1"
|
|
9808
9819
|
}
|
|
9809
9820
|
]
|
|
9810
|
-
},
|
|
9821
|
+
}, ft = {
|
|
9811
9822
|
kind: "category",
|
|
9812
9823
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9813
9824
|
categorystyle: "object_category",
|
|
@@ -9875,7 +9886,7 @@ const ht = {
|
|
|
9875
9886
|
}
|
|
9876
9887
|
}
|
|
9877
9888
|
]
|
|
9878
|
-
},
|
|
9889
|
+
}, mt = {
|
|
9879
9890
|
kind: "category",
|
|
9880
9891
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9881
9892
|
categorystyle: "text_category",
|
|
@@ -10038,7 +10049,7 @@ const ht = {
|
|
|
10038
10049
|
type: "text_reverse_v1"
|
|
10039
10050
|
}
|
|
10040
10051
|
]
|
|
10041
|
-
},
|
|
10052
|
+
}, Fn = {
|
|
10042
10053
|
kind: "category",
|
|
10043
10054
|
name: "%{BKY_CATEGORY_TIME}",
|
|
10044
10055
|
categorystyle: "time_category",
|
|
@@ -10062,24 +10073,24 @@ const ht = {
|
|
|
10062
10073
|
}
|
|
10063
10074
|
}
|
|
10064
10075
|
]
|
|
10065
|
-
},
|
|
10076
|
+
}, ea = {
|
|
10066
10077
|
kind: "categoryToolbox",
|
|
10067
10078
|
contents: [
|
|
10068
10079
|
{
|
|
10069
10080
|
kind: "category",
|
|
10070
10081
|
name: "%{BKY_CATEGORY_UI}",
|
|
10071
10082
|
categorystyle: "ui_category",
|
|
10072
|
-
custom:
|
|
10083
|
+
custom: et.name
|
|
10073
10084
|
},
|
|
10074
|
-
|
|
10085
|
+
xn,
|
|
10086
|
+
ht,
|
|
10087
|
+
pt,
|
|
10088
|
+
dt,
|
|
10075
10089
|
mt,
|
|
10090
|
+
_t,
|
|
10076
10091
|
ft,
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
dt,
|
|
10080
|
-
Et,
|
|
10081
|
-
ht,
|
|
10082
|
-
Yn,
|
|
10092
|
+
rt,
|
|
10093
|
+
Fn,
|
|
10083
10094
|
{
|
|
10084
10095
|
kind: "category",
|
|
10085
10096
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10096,37 +10107,37 @@ const ht = {
|
|
|
10096
10107
|
kind: "category",
|
|
10097
10108
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10098
10109
|
categorystyle: "interface_category",
|
|
10099
|
-
custom:
|
|
10110
|
+
custom: Ze.name
|
|
10100
10111
|
}
|
|
10101
10112
|
]
|
|
10102
|
-
},
|
|
10113
|
+
}, ta = {
|
|
10103
10114
|
kind: "categoryToolbox",
|
|
10104
10115
|
contents: [
|
|
10105
10116
|
{
|
|
10106
10117
|
kind: "category",
|
|
10107
10118
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10108
10119
|
categorystyle: "func_category",
|
|
10109
|
-
custom:
|
|
10120
|
+
custom: nt.name
|
|
10110
10121
|
},
|
|
10111
10122
|
{
|
|
10112
10123
|
kind: "category",
|
|
10113
10124
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10114
10125
|
categorystyle: "flow_category",
|
|
10115
|
-
custom:
|
|
10126
|
+
custom: tt.name
|
|
10116
10127
|
},
|
|
10117
10128
|
{
|
|
10118
10129
|
kind: "category",
|
|
10119
10130
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10120
10131
|
categorystyle: "data_category",
|
|
10121
|
-
custom:
|
|
10132
|
+
custom: ot.name
|
|
10122
10133
|
},
|
|
10134
|
+
ht,
|
|
10135
|
+
pt,
|
|
10136
|
+
dt,
|
|
10123
10137
|
mt,
|
|
10138
|
+
_t,
|
|
10124
10139
|
ft,
|
|
10125
|
-
|
|
10126
|
-
gt,
|
|
10127
|
-
dt,
|
|
10128
|
-
Et,
|
|
10129
|
-
ht,
|
|
10140
|
+
rt,
|
|
10130
10141
|
{
|
|
10131
10142
|
kind: "category",
|
|
10132
10143
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10140,34 +10151,34 @@ const ht = {
|
|
|
10140
10151
|
custom: ce.name
|
|
10141
10152
|
}
|
|
10142
10153
|
]
|
|
10143
|
-
},
|
|
10154
|
+
}, na = {
|
|
10144
10155
|
kind: "categoryToolbox",
|
|
10145
10156
|
contents: [
|
|
10146
10157
|
{
|
|
10147
10158
|
kind: "category",
|
|
10148
10159
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10149
10160
|
categorystyle: "func_category",
|
|
10150
|
-
custom:
|
|
10161
|
+
custom: nt.name
|
|
10151
10162
|
},
|
|
10152
10163
|
{
|
|
10153
10164
|
kind: "category",
|
|
10154
10165
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10155
10166
|
categorystyle: "flow_category",
|
|
10156
|
-
custom:
|
|
10167
|
+
custom: tt.name
|
|
10157
10168
|
},
|
|
10158
10169
|
{
|
|
10159
10170
|
kind: "category",
|
|
10160
10171
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10161
10172
|
categorystyle: "data_category",
|
|
10162
|
-
custom:
|
|
10173
|
+
custom: ot.name
|
|
10163
10174
|
},
|
|
10175
|
+
ht,
|
|
10176
|
+
pt,
|
|
10177
|
+
dt,
|
|
10164
10178
|
mt,
|
|
10179
|
+
_t,
|
|
10165
10180
|
ft,
|
|
10166
|
-
|
|
10167
|
-
gt,
|
|
10168
|
-
dt,
|
|
10169
|
-
Et,
|
|
10170
|
-
ht,
|
|
10181
|
+
rt,
|
|
10171
10182
|
{
|
|
10172
10183
|
kind: "category",
|
|
10173
10184
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10181,7 +10192,7 @@ const ht = {
|
|
|
10181
10192
|
custom: ce.name
|
|
10182
10193
|
}
|
|
10183
10194
|
]
|
|
10184
|
-
},
|
|
10195
|
+
}, oa = {
|
|
10185
10196
|
kind: "categoryToolbox",
|
|
10186
10197
|
contents: [
|
|
10187
10198
|
{
|
|
@@ -10212,24 +10223,24 @@ const ht = {
|
|
|
10212
10223
|
]
|
|
10213
10224
|
}
|
|
10214
10225
|
]
|
|
10215
|
-
},
|
|
10226
|
+
}, ia = {
|
|
10216
10227
|
kind: "categoryToolbox",
|
|
10217
10228
|
contents: [
|
|
10218
10229
|
{
|
|
10219
10230
|
kind: "category",
|
|
10220
10231
|
name: "%{BKY_CATEGORY_UI}",
|
|
10221
10232
|
categorystyle: "ui_category",
|
|
10222
|
-
custom:
|
|
10233
|
+
custom: et.name
|
|
10223
10234
|
},
|
|
10224
|
-
|
|
10235
|
+
xn,
|
|
10236
|
+
ht,
|
|
10237
|
+
pt,
|
|
10238
|
+
dt,
|
|
10225
10239
|
mt,
|
|
10240
|
+
_t,
|
|
10226
10241
|
ft,
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
dt,
|
|
10230
|
-
Et,
|
|
10231
|
-
ht,
|
|
10232
|
-
Yn,
|
|
10242
|
+
rt,
|
|
10243
|
+
Fn,
|
|
10233
10244
|
{
|
|
10234
10245
|
kind: "category",
|
|
10235
10246
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -10246,29 +10257,29 @@ const ht = {
|
|
|
10246
10257
|
kind: "category",
|
|
10247
10258
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
10248
10259
|
categorystyle: "interface_category",
|
|
10249
|
-
custom:
|
|
10260
|
+
custom: Ze.name
|
|
10250
10261
|
}
|
|
10251
10262
|
]
|
|
10252
|
-
},
|
|
10253
|
-
function
|
|
10254
|
-
|
|
10263
|
+
}, Yn = Symbol();
|
|
10264
|
+
function sa(t) {
|
|
10265
|
+
Qn(Yn, t);
|
|
10255
10266
|
}
|
|
10256
|
-
function
|
|
10257
|
-
return
|
|
10267
|
+
function Wt() {
|
|
10268
|
+
return zn(Yn);
|
|
10258
10269
|
}
|
|
10259
|
-
const
|
|
10270
|
+
const aa = /* @__PURE__ */ oe({
|
|
10260
10271
|
__name: "index",
|
|
10261
10272
|
props: {
|
|
10262
10273
|
lock: { type: Boolean }
|
|
10263
10274
|
},
|
|
10264
10275
|
setup(t, { expose: e }) {
|
|
10265
|
-
const { t: n } =
|
|
10276
|
+
const { t: n } = Fe(), o = t, i = Wt(), a = () => {
|
|
10266
10277
|
if (!i.workspace) {
|
|
10267
10278
|
console.assert(!1);
|
|
10268
10279
|
return;
|
|
10269
10280
|
}
|
|
10270
10281
|
if (o.lock) {
|
|
10271
|
-
|
|
10282
|
+
Tn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10272
10283
|
return;
|
|
10273
10284
|
}
|
|
10274
10285
|
i.workspace.cleanUp();
|
|
@@ -10292,7 +10303,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10292
10303
|
}, 8, ["text"]);
|
|
10293
10304
|
};
|
|
10294
10305
|
}
|
|
10295
|
-
}),
|
|
10306
|
+
}), ca = /* @__PURE__ */ oe({
|
|
10296
10307
|
__name: "index",
|
|
10297
10308
|
props: {
|
|
10298
10309
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10300,7 +10311,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10300
10311
|
},
|
|
10301
10312
|
emits: ["update:modelValue"],
|
|
10302
10313
|
setup(t) {
|
|
10303
|
-
const { t: e } =
|
|
10314
|
+
const { t: e } = Fe(), n = Be(t, "modelValue");
|
|
10304
10315
|
return (o, i) => {
|
|
10305
10316
|
const a = V("v-btn"), l = V("v-tooltip");
|
|
10306
10317
|
return D(), Z(l, {
|
|
@@ -10318,7 +10329,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10318
10329
|
}, 8, ["text"]);
|
|
10319
10330
|
};
|
|
10320
10331
|
}
|
|
10321
|
-
}),
|
|
10332
|
+
}), la = { class: "text-subtitle-1 ml-6" }, ua = /* @__PURE__ */ oe({
|
|
10322
10333
|
__name: "item",
|
|
10323
10334
|
props: {
|
|
10324
10335
|
id: {},
|
|
@@ -10327,7 +10338,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10327
10338
|
},
|
|
10328
10339
|
emits: ["x-click"],
|
|
10329
10340
|
setup(t, { emit: e }) {
|
|
10330
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } =
|
|
10341
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = xe(), a = t, l = e, u = Ee(!1), r = K(() => ({
|
|
10331
10342
|
position: "relative",
|
|
10332
10343
|
background: u.value ? i.value : o.value,
|
|
10333
10344
|
height: "48px",
|
|
@@ -10344,20 +10355,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10344
10355
|
pointerEvents: "none"
|
|
10345
10356
|
}));
|
|
10346
10357
|
return (I, A) => {
|
|
10347
|
-
const f = V("v-spacer"), C = V("v-icon"), g =
|
|
10348
|
-
return
|
|
10358
|
+
const f = V("v-spacer"), C = V("v-icon"), g = Zn("ripple");
|
|
10359
|
+
return eo((D(), Q("div", {
|
|
10349
10360
|
class: "d-flex align-center cursor-pointer",
|
|
10350
10361
|
style: W(r.value),
|
|
10351
10362
|
onClick: A[1] || (A[1] = (M) => l("x-click", a.id)),
|
|
10352
10363
|
onMouseout: A[2] || (A[2] = (M) => u.value = !1),
|
|
10353
10364
|
onMouseover: A[3] || (A[3] = (M) => u.value = !0)
|
|
10354
10365
|
}, [
|
|
10355
|
-
j("span",
|
|
10366
|
+
j("span", la, it(a.title), 1),
|
|
10356
10367
|
B(f),
|
|
10357
10368
|
B(C, {
|
|
10358
10369
|
class: "x-handle cursor-move mr-3",
|
|
10359
10370
|
icon: "mdi-drag-horizontal-variant",
|
|
10360
|
-
onMousedown: A[0] || (A[0] =
|
|
10371
|
+
onMousedown: A[0] || (A[0] = Ne(() => {
|
|
10361
10372
|
}, ["stop"]))
|
|
10362
10373
|
}),
|
|
10363
10374
|
j("div", {
|
|
@@ -10368,12 +10379,12 @@ const na = /* @__PURE__ */ oe({
|
|
|
10368
10379
|
]);
|
|
10369
10380
|
};
|
|
10370
10381
|
}
|
|
10371
|
-
}),
|
|
10382
|
+
}), ra = {
|
|
10372
10383
|
key: 1,
|
|
10373
10384
|
class: "text-caption text-grey"
|
|
10374
|
-
},
|
|
10385
|
+
}, _a = /* @__PURE__ */ oe({
|
|
10375
10386
|
__name: "index",
|
|
10376
|
-
props: /* @__PURE__ */
|
|
10387
|
+
props: /* @__PURE__ */ Nt({
|
|
10377
10388
|
lock: { type: Boolean }
|
|
10378
10389
|
}, {
|
|
10379
10390
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10381,7 +10392,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10381
10392
|
}),
|
|
10382
10393
|
emits: ["update:modelValue"],
|
|
10383
10394
|
setup(t, { expose: e }) {
|
|
10384
|
-
const { t: n } =
|
|
10395
|
+
const { t: n } = Fe(), o = Be(t, "modelValue"), i = Wt(), a = Ee([]);
|
|
10385
10396
|
e({ update: () => {
|
|
10386
10397
|
if (!i.workspace) {
|
|
10387
10398
|
console.assert(!1);
|
|
@@ -10389,15 +10400,15 @@ const na = /* @__PURE__ */ oe({
|
|
|
10389
10400
|
}
|
|
10390
10401
|
const f = [];
|
|
10391
10402
|
i.workspace.getTopBlocks(!0).forEach((g) => {
|
|
10392
|
-
const M = g.id ===
|
|
10393
|
-
let
|
|
10403
|
+
const M = g.id === mo()?.id;
|
|
10404
|
+
let w = "<n/a>";
|
|
10394
10405
|
if (g.type.startsWith("on_node_event_v")) {
|
|
10395
|
-
const q = g,
|
|
10396
|
-
|
|
10397
|
-
} else g.type.startsWith("func_entry_v") ?
|
|
10406
|
+
const q = g, pe = x[q.node.key];
|
|
10407
|
+
pe && (w = n(pe.name), q.node.alias && (w += " / " + q.node.alias), w += " - " + _[q.event.name]);
|
|
10408
|
+
} 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
10409
|
f.push({
|
|
10399
10410
|
id: g.id,
|
|
10400
|
-
name:
|
|
10411
|
+
name: w,
|
|
10401
10412
|
select: M
|
|
10402
10413
|
});
|
|
10403
10414
|
}), a.value = f;
|
|
@@ -10405,7 +10416,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10405
10416
|
let u = [];
|
|
10406
10417
|
const r = () => {
|
|
10407
10418
|
if (t.lock) {
|
|
10408
|
-
|
|
10419
|
+
Tn(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
10409
10420
|
return;
|
|
10410
10421
|
}
|
|
10411
10422
|
const f = [];
|
|
@@ -10432,21 +10443,21 @@ const na = /* @__PURE__ */ oe({
|
|
|
10432
10443
|
}
|
|
10433
10444
|
let M = "";
|
|
10434
10445
|
f.newIndex > f.oldIndex ? M = u[f.newIndex] : f.newIndex > 0 && (M = u[f.newIndex - 1]);
|
|
10435
|
-
let
|
|
10436
|
-
M !== "" && (
|
|
10446
|
+
let w = -10;
|
|
10447
|
+
M !== "" && (w = i.workspace.getBlockById(
|
|
10437
10448
|
M
|
|
10438
10449
|
).getRelativeToSurfaceXY().y + 10);
|
|
10439
10450
|
const q = g.getRelativeToSurfaceXY();
|
|
10440
|
-
g.moveTo(new v.Coordinate(q.x,
|
|
10451
|
+
g.moveTo(new v.Coordinate(q.x, w)), i.workspace.cleanUp(), Pn();
|
|
10441
10452
|
}, A = async (f) => {
|
|
10442
10453
|
if (!i.workspace) {
|
|
10443
10454
|
console.assert(!1);
|
|
10444
10455
|
return;
|
|
10445
10456
|
}
|
|
10446
10457
|
const C = i.workspace.getBlockById(f);
|
|
10447
|
-
|
|
10458
|
+
mn.setSelected(C), Gt(f), o.value = !1;
|
|
10448
10459
|
};
|
|
10449
|
-
return (f, C) => a.value.length > 0 ? (D(), Z(P(
|
|
10460
|
+
return (f, C) => a.value.length > 0 ? (D(), Z(P(fo), {
|
|
10450
10461
|
key: 0,
|
|
10451
10462
|
modelValue: a.value,
|
|
10452
10463
|
"onUpdate:modelValue": C[0] || (C[0] = (g) => a.value = g),
|
|
@@ -10458,7 +10469,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10458
10469
|
onStart: r
|
|
10459
10470
|
}, {
|
|
10460
10471
|
default: ee(() => [
|
|
10461
|
-
(D(!0), Q(
|
|
10472
|
+
(D(!0), Q(un, null, to(a.value, (g) => (D(), Z(ua, {
|
|
10462
10473
|
id: g.id,
|
|
10463
10474
|
key: g.id,
|
|
10464
10475
|
select: g.select,
|
|
@@ -10467,14 +10478,14 @@ const na = /* @__PURE__ */ oe({
|
|
|
10467
10478
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10468
10479
|
]),
|
|
10469
10480
|
_: 1
|
|
10470
|
-
}, 8, ["modelValue"])) : (D(), Q("span",
|
|
10481
|
+
}, 8, ["modelValue"])) : (D(), Q("span", ra, it(P(n)("x-block-lib.noOption")), 1));
|
|
10471
10482
|
}
|
|
10472
|
-
}),
|
|
10483
|
+
}), pa = (t, e) => {
|
|
10473
10484
|
const n = t.__vccOpts || t;
|
|
10474
10485
|
for (const [o, i] of e)
|
|
10475
10486
|
n[o] = i;
|
|
10476
10487
|
return n;
|
|
10477
|
-
},
|
|
10488
|
+
}, ha = /* @__PURE__ */ pa(_a, [["__scopeId", "data-v-2ba1be08"]]), da = /* @__PURE__ */ oe({
|
|
10478
10489
|
__name: "index",
|
|
10479
10490
|
props: {
|
|
10480
10491
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10482,7 +10493,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10482
10493
|
},
|
|
10483
10494
|
emits: ["update:modelValue"],
|
|
10484
10495
|
setup(t, { expose: e }) {
|
|
10485
|
-
const n =
|
|
10496
|
+
const n = Be(t, "modelValue"), o = Wt();
|
|
10486
10497
|
e({ update: () => {
|
|
10487
10498
|
if (!o.workspace) {
|
|
10488
10499
|
console.assert(!1);
|
|
@@ -10490,26 +10501,26 @@ const na = /* @__PURE__ */ oe({
|
|
|
10490
10501
|
}
|
|
10491
10502
|
} });
|
|
10492
10503
|
const a = (l) => {
|
|
10493
|
-
const u =
|
|
10504
|
+
const u = Ve();
|
|
10494
10505
|
if (!u) {
|
|
10495
10506
|
console.assert(!1);
|
|
10496
10507
|
return;
|
|
10497
10508
|
}
|
|
10498
10509
|
const r = u.getBlockById(l);
|
|
10499
|
-
|
|
10510
|
+
mn.setSelected(r), Gt(l), n.value = !1;
|
|
10500
10511
|
};
|
|
10501
10512
|
return (l, u) => (D(), Q("div", {
|
|
10502
10513
|
onClick: u[0] || (u[0] = (r) => a(""))
|
|
10503
10514
|
}, "blockTree"));
|
|
10504
10515
|
}
|
|
10505
|
-
}),
|
|
10516
|
+
}), fa = { class: "text-subtitle-1" }, ma = /* @__PURE__ */ oe({
|
|
10506
10517
|
__name: "index",
|
|
10507
10518
|
props: {
|
|
10508
10519
|
type: {},
|
|
10509
10520
|
lock: { type: Boolean }
|
|
10510
10521
|
},
|
|
10511
10522
|
setup(t, { expose: e }) {
|
|
10512
|
-
const { t: n } =
|
|
10523
|
+
const { t: n } = Fe(), o = So(), { sysBarAvail: i } = En(), { backgroundColor1: a } = xe(), l = K(() => {
|
|
10513
10524
|
let C = "100%";
|
|
10514
10525
|
return o.mdAndUp.value && (C = "400px"), {
|
|
10515
10526
|
background: a.value,
|
|
@@ -10524,31 +10535,31 @@ const na = /* @__PURE__ */ oe({
|
|
|
10524
10535
|
};
|
|
10525
10536
|
}), r = K(() => ({
|
|
10526
10537
|
height: "60px"
|
|
10527
|
-
})), { open: p } = Kt(`blocklyNavigatorDlg${
|
|
10528
|
-
|
|
10538
|
+
})), { open: p } = Kt(`blocklyNavigatorDlg${Lt()}`);
|
|
10539
|
+
rn(() => {
|
|
10529
10540
|
p.value = !1;
|
|
10530
10541
|
});
|
|
10531
|
-
const I =
|
|
10542
|
+
const I = Le("blockList"), A = Le("blockTree");
|
|
10532
10543
|
return e({ open: p, update: () => {
|
|
10533
10544
|
t.type === "list" ? I.value?.update() : t.type === "tree" && A.value?.update();
|
|
10534
10545
|
} }), (C, g) => {
|
|
10535
|
-
const M = V("v-sheet"),
|
|
10536
|
-
return D(), Q(
|
|
10537
|
-
B(
|
|
10546
|
+
const M = V("v-sheet"), w = V("v-btn"), q = V("v-spacer"), pe = V("v-dialog"), Tt = V("v-tooltip");
|
|
10547
|
+
return D(), Q(un, null, [
|
|
10548
|
+
B(pe, {
|
|
10538
10549
|
modelValue: P(p),
|
|
10539
|
-
"onUpdate:modelValue": g[5] || (g[5] = (G) =>
|
|
10550
|
+
"onUpdate:modelValue": g[5] || (g[5] = (G) => Ge(p) ? p.value = G : null),
|
|
10540
10551
|
eager: "",
|
|
10541
10552
|
fullscreen: "",
|
|
10542
10553
|
"no-click-animation": "",
|
|
10543
10554
|
persistent: "",
|
|
10544
10555
|
transition: "scroll-x-reverse-transition",
|
|
10545
|
-
onKeydown: g[6] || (g[6] =
|
|
10556
|
+
onKeydown: g[6] || (g[6] = _n(Ne((G) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
10546
10557
|
}, {
|
|
10547
10558
|
default: ee(() => [
|
|
10548
10559
|
j("div", {
|
|
10549
10560
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
10550
|
-
onClick: g[3] || (g[3] =
|
|
10551
|
-
onContextmenu: g[4] || (g[4] =
|
|
10561
|
+
onClick: g[3] || (g[3] = Ne((G) => p.value = !1, ["self"])),
|
|
10562
|
+
onContextmenu: g[4] || (g[4] = Ne((G) => p.value = !1, ["self", "prevent"]))
|
|
10552
10563
|
}, [
|
|
10553
10564
|
j("div", {
|
|
10554
10565
|
class: "elevation-2",
|
|
@@ -10558,20 +10569,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10558
10569
|
key: 0,
|
|
10559
10570
|
color: "transparent",
|
|
10560
10571
|
height: 24
|
|
10561
|
-
})) :
|
|
10572
|
+
})) : de("", !0),
|
|
10562
10573
|
B(M, {
|
|
10563
10574
|
class: "d-flex align-center px-2",
|
|
10564
10575
|
color: "transparent",
|
|
10565
10576
|
height: 48
|
|
10566
10577
|
}, {
|
|
10567
10578
|
default: ee(() => [
|
|
10568
|
-
B(
|
|
10579
|
+
B(w, {
|
|
10569
10580
|
density: "comfortable",
|
|
10570
10581
|
icon: "mdi-close",
|
|
10571
10582
|
variant: "text",
|
|
10572
10583
|
onClick: g[0] || (g[0] = (G) => p.value = !1)
|
|
10573
10584
|
}),
|
|
10574
|
-
j("span",
|
|
10585
|
+
j("span", fa, it(P(n)("x-block-lib.navigator")), 1),
|
|
10575
10586
|
B(q)
|
|
10576
10587
|
]),
|
|
10577
10588
|
_: 1
|
|
@@ -10580,20 +10591,20 @@ const na = /* @__PURE__ */ oe({
|
|
|
10580
10591
|
class: "overflow-y-auto",
|
|
10581
10592
|
style: W(u.value)
|
|
10582
10593
|
}, [
|
|
10583
|
-
C.type === "list" ? (D(), Z(
|
|
10594
|
+
C.type === "list" ? (D(), Z(ha, {
|
|
10584
10595
|
key: 0,
|
|
10585
10596
|
ref_key: "blockList",
|
|
10586
10597
|
ref: I,
|
|
10587
10598
|
modelValue: P(p),
|
|
10588
|
-
"onUpdate:modelValue": g[1] || (g[1] = (G) =>
|
|
10599
|
+
"onUpdate:modelValue": g[1] || (g[1] = (G) => Ge(p) ? p.value = G : null),
|
|
10589
10600
|
lock: C.lock
|
|
10590
|
-
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(
|
|
10601
|
+
}, null, 8, ["modelValue", "lock"])) : C.type === "tree" ? (D(), Z(da, {
|
|
10591
10602
|
key: 1,
|
|
10592
10603
|
ref_key: "blockTree",
|
|
10593
10604
|
ref: A,
|
|
10594
10605
|
modelValue: P(p),
|
|
10595
|
-
"onUpdate:modelValue": g[2] || (g[2] = (G) =>
|
|
10596
|
-
}, null, 8, ["modelValue"])) :
|
|
10606
|
+
"onUpdate:modelValue": g[2] || (g[2] = (G) => Ge(p) ? p.value = G : null)
|
|
10607
|
+
}, null, 8, ["modelValue"])) : de("", !0),
|
|
10597
10608
|
j("div", {
|
|
10598
10609
|
style: W(r.value)
|
|
10599
10610
|
}, null, 4)
|
|
@@ -10603,15 +10614,15 @@ const na = /* @__PURE__ */ oe({
|
|
|
10603
10614
|
]),
|
|
10604
10615
|
_: 1
|
|
10605
10616
|
}, 8, ["modelValue"]),
|
|
10606
|
-
B(
|
|
10617
|
+
B(Tt, {
|
|
10607
10618
|
text: P(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
10608
10619
|
}, {
|
|
10609
10620
|
activator: ee(({ props: G }) => [
|
|
10610
|
-
B(
|
|
10621
|
+
B(w, Yt(G, {
|
|
10611
10622
|
density: "comfortable",
|
|
10612
10623
|
icon: "mdi-navigation-variant",
|
|
10613
10624
|
variant: "outlined",
|
|
10614
|
-
onClick: g[7] || (g[7] = (
|
|
10625
|
+
onClick: g[7] || (g[7] = (jt) => p.value = !0)
|
|
10615
10626
|
}), null, 16)
|
|
10616
10627
|
]),
|
|
10617
10628
|
_: 1
|
|
@@ -10619,7 +10630,7 @@ const na = /* @__PURE__ */ oe({
|
|
|
10619
10630
|
], 64);
|
|
10620
10631
|
};
|
|
10621
10632
|
}
|
|
10622
|
-
}),
|
|
10633
|
+
}), yt = {
|
|
10623
10634
|
grid: {
|
|
10624
10635
|
length: 2,
|
|
10625
10636
|
snap: !0,
|
|
@@ -10634,9 +10645,9 @@ const na = /* @__PURE__ */ oe({
|
|
|
10634
10645
|
scrollbars: !0,
|
|
10635
10646
|
wheel: !0
|
|
10636
10647
|
},
|
|
10637
|
-
trashcan: !1,
|
|
10638
10648
|
readOnly: !1,
|
|
10639
10649
|
theme: "light",
|
|
10650
|
+
trashcan: !1,
|
|
10640
10651
|
zoom: {
|
|
10641
10652
|
maxScale: 1,
|
|
10642
10653
|
minScale: 0.1,
|
|
@@ -10645,22 +10656,22 @@ const na = /* @__PURE__ */ oe({
|
|
|
10645
10656
|
wheel: !0
|
|
10646
10657
|
}
|
|
10647
10658
|
};
|
|
10648
|
-
function
|
|
10649
|
-
|
|
10650
|
-
const i =
|
|
10651
|
-
return i.addChangeListener(
|
|
10659
|
+
function Ta(t, e, n, o) {
|
|
10660
|
+
yt.theme = o ? "dark" : "light", yt.toolbox = Ea(e, n);
|
|
10661
|
+
const i = To(t, yt);
|
|
10662
|
+
return i.addChangeListener(Eo.shadowBlockConversionChangeListener), ga(i, e, n), Ia(i), i;
|
|
10652
10663
|
}
|
|
10653
|
-
function
|
|
10664
|
+
function Ea(t, e) {
|
|
10654
10665
|
let n;
|
|
10655
|
-
return t === "page" ? e === "v1" && (n =
|
|
10666
|
+
return t === "page" ? e === "v1" && (n = ia) : t === "comp" ? e === "v1" && (n = ea) : t === "func" ? e === "v1" && (n = na) : t === "flow" ? e === "v1" && (n = ta) : t === "json" && e === "v1" && (n = oa), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
10656
10667
|
}
|
|
10657
|
-
function
|
|
10668
|
+
function ga(t, e, n) {
|
|
10658
10669
|
function o({ name: i, callback: a }) {
|
|
10659
10670
|
t.registerToolboxCategoryCallback(i, () => a(e));
|
|
10660
10671
|
}
|
|
10661
|
-
e === "page" || e === "comp" ? n === "v1" && (o(
|
|
10672
|
+
e === "page" || e === "comp" ? n === "v1" && (o(et), o(le), o(ce), o(Ze)) : e === "func" ? n === "v1" && (o(nt), o(tt), o(ot), o(le), o(ce)) : e === "flow" && n === "v1" && (o(tt), o(nt), o(ot), o(le), o(ce));
|
|
10662
10673
|
}
|
|
10663
|
-
function
|
|
10674
|
+
function Ia(t) {
|
|
10664
10675
|
const { router: e } = ie;
|
|
10665
10676
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
10666
10677
|
const n = e.resolve({
|
|
@@ -10678,7 +10689,7 @@ function ma(t) {
|
|
|
10678
10689
|
}, 100);
|
|
10679
10690
|
});
|
|
10680
10691
|
}
|
|
10681
|
-
function
|
|
10692
|
+
function Aa(t, e) {
|
|
10682
10693
|
const n = e.newBlock("json_root_v1");
|
|
10683
10694
|
n.initSvg(), n.render();
|
|
10684
10695
|
const o = (i, a) => {
|
|
@@ -10720,7 +10731,7 @@ function Ta(t, e) {
|
|
|
10720
10731
|
new (E.get(E.FINISHED_LOADING))(e)
|
|
10721
10732
|
);
|
|
10722
10733
|
}
|
|
10723
|
-
function
|
|
10734
|
+
function Oa(t) {
|
|
10724
10735
|
const e = (o) => {
|
|
10725
10736
|
if (!o)
|
|
10726
10737
|
return null;
|
|
@@ -10752,9 +10763,9 @@ function Ea(t) {
|
|
|
10752
10763
|
if (o.type === "json_root_v1")
|
|
10753
10764
|
return e(o);
|
|
10754
10765
|
}
|
|
10755
|
-
const
|
|
10766
|
+
const Ca = { class: "position-relative w-100 h-100" }, ka = /* @__PURE__ */ oe({
|
|
10756
10767
|
__name: "index",
|
|
10757
|
-
props: /* @__PURE__ */
|
|
10768
|
+
props: /* @__PURE__ */ Nt({
|
|
10758
10769
|
type: {},
|
|
10759
10770
|
version: {},
|
|
10760
10771
|
locale: {},
|
|
@@ -10765,11 +10776,11 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10765
10776
|
scale: { required: !0 },
|
|
10766
10777
|
scaleModifiers: {}
|
|
10767
10778
|
}),
|
|
10768
|
-
emits: /* @__PURE__ */
|
|
10779
|
+
emits: /* @__PURE__ */ Nt(["ready"], ["update:lock", "update:scale"]),
|
|
10769
10780
|
setup(t, { expose: e, emit: n }) {
|
|
10770
|
-
const { backgroundColor2: o } =
|
|
10771
|
-
|
|
10772
|
-
const C =
|
|
10781
|
+
const { backgroundColor2: o } = xe(), i = Be(t, "lock"), a = Be(t, "scale"), l = n, u = `blocklyEditor${Lt()}`, r = Ee(), p = Le("parentContainer"), I = Le("clean"), A = Le("navigator"), f = {};
|
|
10782
|
+
sa(f);
|
|
10783
|
+
const C = Ee(!0), g = Ee(!1), M = K(() => t.type === "json" ? "tree" : "list"), w = K(() => ({
|
|
10773
10784
|
width: "100%",
|
|
10774
10785
|
height: "calc(100% - 48px)"
|
|
10775
10786
|
})), q = K(() => ({
|
|
@@ -10778,7 +10789,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10778
10789
|
bottom: "0px",
|
|
10779
10790
|
width: "100%",
|
|
10780
10791
|
height: "48px"
|
|
10781
|
-
})),
|
|
10792
|
+
})), pe = K(() => ({
|
|
10782
10793
|
position: "absolute",
|
|
10783
10794
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10784
10795
|
top: "1px",
|
|
@@ -10786,7 +10797,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10786
10797
|
width: "56px",
|
|
10787
10798
|
height: "calc(100% - 49px)",
|
|
10788
10799
|
zIndex: 999
|
|
10789
|
-
})),
|
|
10800
|
+
})), Tt = K(() => ({
|
|
10790
10801
|
position: "absolute",
|
|
10791
10802
|
top: "0px",
|
|
10792
10803
|
right: "0px",
|
|
@@ -10799,7 +10810,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10799
10810
|
width: "100%",
|
|
10800
10811
|
height: "calc(100% - 48px)",
|
|
10801
10812
|
pointerEvents: "none"
|
|
10802
|
-
})),
|
|
10813
|
+
})), jt = K(() => ({
|
|
10803
10814
|
position: "absolute",
|
|
10804
10815
|
background: t.dark ? "#0000007f" : "#ffffff7f",
|
|
10805
10816
|
top: "1px",
|
|
@@ -10807,32 +10818,32 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10807
10818
|
width: "56px",
|
|
10808
10819
|
height: "calc(100% - 49px)",
|
|
10809
10820
|
zIndex: 999
|
|
10810
|
-
})),
|
|
10821
|
+
})), wn = K(() => ({
|
|
10811
10822
|
position: "fixed",
|
|
10812
10823
|
top: 0,
|
|
10813
10824
|
left: 0,
|
|
10814
10825
|
zIndex: 3e3
|
|
10815
|
-
})), { open:
|
|
10816
|
-
|
|
10826
|
+
})), { open: ke } = Kt(`blocklyEditorFlyout${Lt()}`);
|
|
10827
|
+
Qt(async () => {
|
|
10817
10828
|
if (!r.value || !p.value) {
|
|
10818
10829
|
console.assert(!1);
|
|
10819
10830
|
return;
|
|
10820
10831
|
}
|
|
10821
|
-
|
|
10832
|
+
go(p.value), await ln(t.locale), f.workspace = Ta(r.value, t.type, t.version, t.dark), f.workspace.addChangeListener(E.disableOrphans), f.workspace.addChangeListener(Kn);
|
|
10822
10833
|
const y = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10823
|
-
new MutationObserver((
|
|
10824
|
-
|
|
10825
|
-
|
|
10834
|
+
new MutationObserver((Et) => {
|
|
10835
|
+
Et.forEach((Ke) => {
|
|
10836
|
+
Ke.type === "attributes" && Ke.attributeName === "style" && (ke.value = f.workspace.getFlyout().isVisible());
|
|
10826
10837
|
});
|
|
10827
|
-
}).observe(y, { attributes: !0 }),
|
|
10828
|
-
}),
|
|
10829
|
-
|
|
10830
|
-
}),
|
|
10831
|
-
f.workspace &&
|
|
10838
|
+
}).observe(y, { attributes: !0 }), ke.value = f.workspace.getFlyout().isVisible(), Xt(), Jt(), await no(), l("ready");
|
|
10839
|
+
}), oo(() => {
|
|
10840
|
+
ke.value = !1;
|
|
10841
|
+
}), Io(r, () => {
|
|
10842
|
+
f.workspace && Ao(f.workspace);
|
|
10832
10843
|
});
|
|
10833
|
-
async function
|
|
10844
|
+
async function Kn(y) {
|
|
10834
10845
|
if (y.type === E.FINISHED_LOADING) {
|
|
10835
|
-
|
|
10846
|
+
Pn(), setTimeout(() => {
|
|
10836
10847
|
A.value?.update();
|
|
10837
10848
|
}, 0), C.value = !1;
|
|
10838
10849
|
return;
|
|
@@ -10847,98 +10858,98 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10847
10858
|
}, 0);
|
|
10848
10859
|
}
|
|
10849
10860
|
}
|
|
10850
|
-
const
|
|
10851
|
-
C.value = !0, t.type === "json" ?
|
|
10852
|
-
},
|
|
10861
|
+
const $n = (y) => {
|
|
10862
|
+
C.value = !0, t.type === "json" ? Aa(y, f.workspace) : $.workspaces.load(y, f.workspace);
|
|
10863
|
+
}, Hn = () => t.type === "json" ? Oa(f.workspace) : $.workspaces.save(f.workspace), Gn = () => {
|
|
10853
10864
|
if (t.type === "json")
|
|
10854
10865
|
console.assert(!1);
|
|
10855
10866
|
else
|
|
10856
10867
|
return s.workspaceToCode(f.workspace);
|
|
10868
|
+
}, Xt = () => {
|
|
10869
|
+
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (ke.value = !1);
|
|
10857
10870
|
}, Jt = () => {
|
|
10858
|
-
f.workspace.setIsReadOnly(i.value), f.workspace.isReadOnly() && (Le.value = !1);
|
|
10859
|
-
}, qt = () => {
|
|
10860
10871
|
f.workspace.setScale(a.value);
|
|
10861
|
-
},
|
|
10862
|
-
f.workspace.fireChangeListener(new
|
|
10863
|
-
},
|
|
10872
|
+
}, Wn = () => {
|
|
10873
|
+
f.workspace.fireChangeListener(new gn());
|
|
10874
|
+
}, qt = (y) => {
|
|
10864
10875
|
if (y.key === "q" && y.ctrlKey) {
|
|
10865
|
-
|
|
10876
|
+
jn();
|
|
10866
10877
|
return;
|
|
10867
10878
|
}
|
|
10868
10879
|
if (y.key === "w" && y.ctrlKey) {
|
|
10869
|
-
|
|
10880
|
+
Xn();
|
|
10870
10881
|
return;
|
|
10871
10882
|
}
|
|
10872
10883
|
if (y.key === "e" && y.ctrlKey) {
|
|
10873
|
-
|
|
10884
|
+
Jn();
|
|
10874
10885
|
return;
|
|
10875
10886
|
}
|
|
10876
|
-
},
|
|
10887
|
+
}, jn = () => {
|
|
10877
10888
|
I.value?.cleanWorkspace();
|
|
10878
|
-
},
|
|
10889
|
+
}, Xn = () => {
|
|
10879
10890
|
i.value = !i.value;
|
|
10880
|
-
},
|
|
10891
|
+
}, Jn = () => {
|
|
10881
10892
|
A.value && (A.value.open = !0);
|
|
10882
10893
|
};
|
|
10883
|
-
return
|
|
10884
|
-
window.addEventListener("keydown",
|
|
10885
|
-
}),
|
|
10886
|
-
window.removeEventListener("keydown",
|
|
10887
|
-
}),
|
|
10894
|
+
return Qt(() => {
|
|
10895
|
+
window.addEventListener("keydown", qt, !1);
|
|
10896
|
+
}), rn(() => {
|
|
10897
|
+
window.removeEventListener("keydown", qt, !1);
|
|
10898
|
+
}), ve(
|
|
10888
10899
|
() => t.locale,
|
|
10889
10900
|
(y) => {
|
|
10890
|
-
|
|
10901
|
+
ln(y);
|
|
10891
10902
|
}
|
|
10892
|
-
),
|
|
10903
|
+
), ve(
|
|
10893
10904
|
() => t.dark,
|
|
10894
10905
|
(y) => {
|
|
10895
|
-
|
|
10906
|
+
Zs(y ? "dark" : "light");
|
|
10896
10907
|
}
|
|
10897
|
-
),
|
|
10908
|
+
), ve(ke, (y) => {
|
|
10898
10909
|
y || f.workspace?.hideChaff();
|
|
10899
|
-
}),
|
|
10910
|
+
}), ve(i, () => {
|
|
10911
|
+
Xt();
|
|
10912
|
+
}), ve(a, () => {
|
|
10900
10913
|
Jt();
|
|
10901
|
-
}),
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
const At = V("v-icon"), We = V("x-loading");
|
|
10905
|
-
return D(), Q("div", ga, [
|
|
10914
|
+
}), e({ loading: C, load: $n, save: Hn, generateCode: Gn, fireStateChange: Wn }), (y, he) => {
|
|
10915
|
+
const Et = V("v-icon"), Ke = V("x-loading");
|
|
10916
|
+
return D(), Q("div", Ca, [
|
|
10906
10917
|
j("div", {
|
|
10907
10918
|
id: u,
|
|
10908
10919
|
ref_key: "blocklyDiv",
|
|
10909
10920
|
ref: r,
|
|
10910
|
-
style: W(
|
|
10921
|
+
style: W(w.value)
|
|
10911
10922
|
}, null, 4),
|
|
10912
10923
|
j("div", {
|
|
10913
10924
|
style: W(q.value)
|
|
10914
10925
|
}, [
|
|
10915
|
-
|
|
10926
|
+
io(y.$slots, "bottom")
|
|
10916
10927
|
], 4),
|
|
10917
10928
|
g.value ? (D(), Q("div", {
|
|
10918
10929
|
key: 0,
|
|
10919
10930
|
class: "d-flex flex-column justify-center align-center",
|
|
10920
|
-
style: W(
|
|
10931
|
+
style: W(pe.value)
|
|
10921
10932
|
}, [
|
|
10922
|
-
B(
|
|
10933
|
+
B(Et, {
|
|
10923
10934
|
icon: "mdi-delete",
|
|
10924
10935
|
size: "x-large"
|
|
10925
10936
|
})
|
|
10926
|
-
], 4)) :
|
|
10927
|
-
C.value ?
|
|
10937
|
+
], 4)) : de("", !0),
|
|
10938
|
+
C.value ? de("", !0) : (D(), Q("div", {
|
|
10928
10939
|
key: 1,
|
|
10929
10940
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10930
|
-
style: W(
|
|
10941
|
+
style: W(Tt.value)
|
|
10931
10942
|
}, [
|
|
10932
|
-
B(
|
|
10943
|
+
B(aa, {
|
|
10933
10944
|
ref_key: "clean",
|
|
10934
10945
|
ref: I,
|
|
10935
10946
|
lock: i.value
|
|
10936
10947
|
}, null, 8, ["lock"]),
|
|
10937
|
-
B(
|
|
10948
|
+
B(ca, {
|
|
10938
10949
|
modelValue: i.value,
|
|
10939
|
-
"onUpdate:modelValue":
|
|
10950
|
+
"onUpdate:modelValue": he[0] || (he[0] = (qn) => i.value = qn)
|
|
10940
10951
|
}, null, 8, ["modelValue"]),
|
|
10941
|
-
B(
|
|
10952
|
+
B(ma, {
|
|
10942
10953
|
ref_key: "navigator",
|
|
10943
10954
|
ref: A,
|
|
10944
10955
|
lock: i.value,
|
|
@@ -10947,33 +10958,33 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10947
10958
|
], 4)),
|
|
10948
10959
|
i.value ? (D(), Q("div", {
|
|
10949
10960
|
key: 2,
|
|
10950
|
-
style: W(
|
|
10951
|
-
}, null, 4)) :
|
|
10961
|
+
style: W(jt.value)
|
|
10962
|
+
}, null, 4)) : de("", !0),
|
|
10952
10963
|
i.value ? (D(), Q("div", {
|
|
10953
10964
|
key: 3,
|
|
10954
10965
|
style: W(G.value)
|
|
10955
|
-
}, null, 4)) :
|
|
10966
|
+
}, null, 4)) : de("", !0),
|
|
10956
10967
|
j("div", {
|
|
10957
10968
|
ref_key: "parentContainer",
|
|
10958
10969
|
ref: p,
|
|
10959
|
-
style: W(
|
|
10970
|
+
style: W(wn.value)
|
|
10960
10971
|
}, null, 4),
|
|
10961
|
-
B(
|
|
10972
|
+
B(Ke, {
|
|
10962
10973
|
open: C.value,
|
|
10963
10974
|
"z-index": 99
|
|
10964
10975
|
}, null, 8, ["open"])
|
|
10965
10976
|
]);
|
|
10966
10977
|
};
|
|
10967
10978
|
}
|
|
10968
|
-
}),
|
|
10979
|
+
}), va = /* @__PURE__ */ oe({
|
|
10969
10980
|
__name: "index",
|
|
10970
10981
|
props: {
|
|
10971
10982
|
code: {}
|
|
10972
10983
|
},
|
|
10973
10984
|
setup(t) {
|
|
10974
10985
|
const e = t;
|
|
10975
|
-
|
|
10976
|
-
const n =
|
|
10986
|
+
Oo.registerLanguage("javascript", Co);
|
|
10987
|
+
const n = ko.component, { backgroundColor2: o } = xe();
|
|
10977
10988
|
return (i, a) => {
|
|
10978
10989
|
const l = V("v-sheet");
|
|
10979
10990
|
return D(), Z(l, {
|
|
@@ -10991,10 +11002,10 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
10991
11002
|
}, 8, ["color"]);
|
|
10992
11003
|
};
|
|
10993
11004
|
}
|
|
10994
|
-
}),
|
|
11005
|
+
}), ya = { class: "text-subtitle-1" }, Na = { class: "w-100 h-100 overflow-auto" }, La = /* @__PURE__ */ oe({
|
|
10995
11006
|
__name: "index",
|
|
10996
11007
|
setup(t) {
|
|
10997
|
-
const { t: e } =
|
|
11008
|
+
const { t: e } = Fe(), { sysBarAvail: n } = En(), { backgroundColor0: o, backgroundColor2: i } = xe(), a = Ee(""), l = K(() => {
|
|
10998
11009
|
let p = 48;
|
|
10999
11010
|
return n.value && (p += 24), {
|
|
11000
11011
|
position: "relative",
|
|
@@ -11007,12 +11018,12 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11007
11018
|
const A = V("v-sheet"), f = V("v-btn"), C = V("v-spacer"), g = V("v-dialog");
|
|
11008
11019
|
return D(), Z(g, {
|
|
11009
11020
|
modelValue: P(r),
|
|
11010
|
-
"onUpdate:modelValue": I[1] || (I[1] = (M) =>
|
|
11021
|
+
"onUpdate:modelValue": I[1] || (I[1] = (M) => Ge(r) ? r.value = M : null),
|
|
11011
11022
|
fullscreen: "",
|
|
11012
11023
|
"no-click-animation": "",
|
|
11013
11024
|
persistent: "",
|
|
11014
11025
|
transition: "dialog-bottom-transition",
|
|
11015
|
-
onKeydown: I[2] || (I[2] =
|
|
11026
|
+
onKeydown: I[2] || (I[2] = _n(Ne((M) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11016
11027
|
}, {
|
|
11017
11028
|
default: ee(() => [
|
|
11018
11029
|
B(A, {
|
|
@@ -11025,7 +11036,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11025
11036
|
key: 0,
|
|
11026
11037
|
color: P(i),
|
|
11027
11038
|
height: 24
|
|
11028
|
-
}, null, 8, ["color"])) :
|
|
11039
|
+
}, null, 8, ["color"])) : de("", !0),
|
|
11029
11040
|
B(A, {
|
|
11030
11041
|
class: "d-flex align-center px-2",
|
|
11031
11042
|
color: P(i),
|
|
@@ -11038,7 +11049,7 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11038
11049
|
variant: "text",
|
|
11039
11050
|
onClick: I[0] || (I[0] = (M) => r.value = !1)
|
|
11040
11051
|
}),
|
|
11041
|
-
j("span",
|
|
11052
|
+
j("span", ya, it(P(e)("x-block-lib.dlg.source.title")), 1),
|
|
11042
11053
|
B(C)
|
|
11043
11054
|
]),
|
|
11044
11055
|
_: 1
|
|
@@ -11046,8 +11057,8 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11046
11057
|
j("div", {
|
|
11047
11058
|
style: W(l.value)
|
|
11048
11059
|
}, [
|
|
11049
|
-
j("div",
|
|
11050
|
-
B(
|
|
11060
|
+
j("div", Na, [
|
|
11061
|
+
B(va, { code: a.value }, null, 8, ["code"])
|
|
11051
11062
|
])
|
|
11052
11063
|
], 4)
|
|
11053
11064
|
]),
|
|
@@ -11058,16 +11069,16 @@ const ga = { class: "position-relative w-100 h-100" }, Ia = /* @__PURE__ */ oe({
|
|
|
11058
11069
|
}, 8, ["modelValue"]);
|
|
11059
11070
|
};
|
|
11060
11071
|
}
|
|
11061
|
-
}),
|
|
11062
|
-
t.component("XBlockly",
|
|
11072
|
+
}), Sa = (t) => {
|
|
11073
|
+
t.component("XBlockly", ka), t.component("XSourceDlg", La);
|
|
11063
11074
|
};
|
|
11064
|
-
async function
|
|
11065
|
-
return (await
|
|
11075
|
+
async function Va(t) {
|
|
11076
|
+
return (await Mn(/* @__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
11077
|
}
|
|
11067
|
-
const
|
|
11078
|
+
const xa = { install: Sa };
|
|
11068
11079
|
export {
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11080
|
+
ka as XBlockly,
|
|
11081
|
+
xa as default,
|
|
11082
|
+
Sa as install,
|
|
11083
|
+
Va as loadLocaleMessageBlock
|
|
11073
11084
|
};
|