x-block-lib 0.8.8 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +403 -400
- package/dist/{vendor.b68g5q94.js → vendor.cenq5uur.js} +258 -260
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
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-bf91a635]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
|
-
import { provide as _o, inject as po, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as B, unref as R, withCtx as tt, createVNode as L, mergeProps as He, useModel as Pt, ref as At, computed as Y, resolveDirective as ho, withDirectives as fo, createElementBlock as Q, normalizeStyle as H, createElementVNode as W, toDisplayString as
|
|
11
|
-
import { f as Ao, F as In, E as O, r as an, M as On, s as Io, a as Oo, X as
|
|
10
|
+
import { provide as _o, inject as po, defineComponent as st, resolveComponent as D, createBlock as Z, openBlock as B, unref as R, withCtx as tt, createVNode as L, mergeProps as He, useModel as Pt, ref as At, computed as Y, resolveDirective as ho, withDirectives as fo, createElementBlock as Q, normalizeStyle as H, createElementVNode as W, toDisplayString as re, withModifiers as St, mergeModels as Pe, Fragment as gn, renderList as mo, useId as Re, onUnmounted as To, useTemplateRef as Bt, withKeys as An, isRef as Kt, createCommentVNode as mt, onMounted as on, nextTick as Eo, onBeforeUnmount as sn, watch as Nt, renderSlot as go } from "vue";
|
|
11
|
+
import { f as Ao, F as In, E as O, r as an, M as On, s as Io, a as Oo, X as vn, u as C, B as d, j as s, O as c, b as De, i as v, c as ht, d as vo, e as M, g as h, h as Co, k as w, l as lt, p as bt, m as z, n as cn, o as S, C as Cn, N as et, q as yo, P as Me, t as Ce, V as gt, v as Mt, w as yn, x as ko, y as No, S as Lo, z as So, A as Bo, T as ue, D as kn, G as bo, H as Po, I as Nn, J as Ro, K as Do, L as Mo, Q as Uo, R as Vo, U as xo, W as Fo, Y as Yo } from "./vendor.cenq5uur.js";
|
|
12
12
|
import { globalObjects as nt, openConfirmDlg as wo, openPromptDlg as Ko, messageWarning as Ln, useColor as Ut, useSystem as Sn, useViewStack as Ge, eventBus as Et } from "x-essential-lib";
|
|
13
13
|
import { elements as J, pkgs as Ht, parsePixelStr as $o, parsePercentStr as Ho, getPropTag as yt } from "x-runtime-lib";
|
|
14
14
|
import { globalState as f } from "x-state-lib";
|
|
@@ -140,7 +140,7 @@ const Pn = (t, e, n) => {
|
|
|
140
140
|
(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." : ""))));
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
|
-
async function
|
|
143
|
+
async function rn(t) {
|
|
144
144
|
const e = await Pn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jq2w67rd.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.hsanc2zi.js") }), `./msg/${t}.ts`, 3);
|
|
145
145
|
Io(e.default);
|
|
146
146
|
}
|
|
@@ -179,18 +179,18 @@ function jt(t, e) {
|
|
|
179
179
|
}
|
|
180
180
|
function ye(t) {
|
|
181
181
|
const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
|
|
182
|
-
return
|
|
182
|
+
return C.xml.textToDom(e);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function un(t) {
|
|
185
185
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
186
|
-
return
|
|
186
|
+
return C.xml.textToDom(e);
|
|
187
187
|
}
|
|
188
188
|
function jo(t) {
|
|
189
|
-
return
|
|
189
|
+
return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
190
190
|
}
|
|
191
191
|
function Ue(t, e) {
|
|
192
192
|
let n = null;
|
|
193
|
-
return e === "string" ? n = ye("") : e === "integer" || e === "decimal" ? n =
|
|
193
|
+
return e === "string" ? n = ye("") : e === "integer" || e === "decimal" ? n = un(0) : e === "boolean" ? n = jo() : e === "enum" || e === "dateTime" ? n = ye("") : console.assert(!1), n ? vn.domToBlock(n, t) : null;
|
|
194
194
|
}
|
|
195
195
|
function ot(t) {
|
|
196
196
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
|
|
@@ -206,19 +206,19 @@ function je(t, e, n, o) {
|
|
|
206
206
|
<block type="parameter_v1">
|
|
207
207
|
<mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
|
|
208
208
|
</block>
|
|
209
|
-
`, a =
|
|
210
|
-
return
|
|
209
|
+
`, a = C.xml.textToDom(i);
|
|
210
|
+
return vn.domToBlock(a, t);
|
|
211
211
|
}
|
|
212
212
|
function F(t, e) {
|
|
213
213
|
try {
|
|
214
214
|
O.disable(), e.forEach((n) => {
|
|
215
|
-
const [o, i, a,
|
|
216
|
-
if (!
|
|
215
|
+
const [o, i, a, r] = n, u = t.getInput(o)?.connection;
|
|
216
|
+
if (!u)
|
|
217
217
|
return;
|
|
218
|
-
let l =
|
|
218
|
+
let l = u.targetBlock();
|
|
219
219
|
if (l) {
|
|
220
220
|
const _ = l;
|
|
221
|
-
if (_ && _.key === i && _.name === a && _.locale ===
|
|
221
|
+
if (_ && _.key === i && _.name === a && _.locale === r)
|
|
222
222
|
return;
|
|
223
223
|
l.dispose();
|
|
224
224
|
}
|
|
@@ -226,53 +226,53 @@ function F(t, e) {
|
|
|
226
226
|
t.workspace,
|
|
227
227
|
i,
|
|
228
228
|
a,
|
|
229
|
-
|
|
230
|
-
), l.outputConnection.connect(
|
|
229
|
+
r
|
|
230
|
+
), l.outputConnection.connect(u);
|
|
231
231
|
});
|
|
232
232
|
} finally {
|
|
233
233
|
O.enable();
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function ut(t) {
|
|
237
237
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
238
|
-
return
|
|
238
|
+
return C.xml.textToDom(e);
|
|
239
239
|
}
|
|
240
240
|
function Xt(t) {
|
|
241
241
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
242
|
-
return
|
|
242
|
+
return C.xml.textToDom(e);
|
|
243
243
|
}
|
|
244
244
|
function Jt(t) {
|
|
245
245
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
246
|
-
return
|
|
246
|
+
return C.xml.textToDom(e);
|
|
247
247
|
}
|
|
248
248
|
function Jo() {
|
|
249
|
-
return
|
|
249
|
+
return C.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
250
250
|
}
|
|
251
251
|
function qo() {
|
|
252
|
-
return
|
|
252
|
+
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
253
253
|
}
|
|
254
254
|
function Qo(t) {
|
|
255
255
|
const e = `<shadow type="${_e(t)}"></shadow>`;
|
|
256
|
-
return
|
|
256
|
+
return C.xml.textToDom(e);
|
|
257
257
|
}
|
|
258
258
|
function zo(t) {
|
|
259
259
|
const e = `<shadow type="${_e(t)}"></shadow>`;
|
|
260
|
-
return
|
|
260
|
+
return C.xml.textToDom(e);
|
|
261
261
|
}
|
|
262
262
|
function Zo(t) {
|
|
263
263
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
264
|
-
return
|
|
264
|
+
return C.xml.textToDom(e);
|
|
265
265
|
}
|
|
266
266
|
function ti() {
|
|
267
|
-
return
|
|
267
|
+
return C.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
268
268
|
}
|
|
269
269
|
function it(t) {
|
|
270
270
|
let e = null;
|
|
271
|
-
return t === "string" ? e =
|
|
271
|
+
return t === "string" ? e = ut("") : t === "number" ? e = Xt(0) : t === "boolean" ? e = Jt(!1) : t === "array" ? e = Jo() : t === "object" ? e = qo() : console.assert(!1), e;
|
|
272
272
|
}
|
|
273
273
|
function ei(t) {
|
|
274
274
|
let e = null;
|
|
275
|
-
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e =
|
|
275
|
+
return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = ut(t.default) : t.ui === "numInput" ? e = Xt(t.default) : t.ui === "switch" ? e = Jt(t.default) : t.ui === "select" ? e = Qo(t.items) : t.ui === "multiTypes" ? e = zo(t.types) : t.ui === "compSelect" ? e = ti() : t.ui === "colorPicker" ? e = Zo(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
276
276
|
}
|
|
277
277
|
function ni() {
|
|
278
278
|
const { activeObject: t, activePage: e } = f.app, n = [];
|
|
@@ -373,13 +373,13 @@ const si = (t, e) => {
|
|
|
373
373
|
},
|
|
374
374
|
genOpts_: function() {
|
|
375
375
|
const { i18n: i } = nt, a = [];
|
|
376
|
-
for (const { title:
|
|
377
|
-
a.push([i.global.t(
|
|
376
|
+
for (const { title: r, value: u } of e)
|
|
377
|
+
a.push([i.global.t(r), u]);
|
|
378
378
|
return k(a);
|
|
379
379
|
}
|
|
380
380
|
}, s.forBlock[n] = function(i) {
|
|
381
|
-
const a = s.quote_,
|
|
382
|
-
return [a(
|
|
381
|
+
const a = s.quote_, r = i.getFieldValue("ITEM");
|
|
382
|
+
return [a(r), c.ATOMIC];
|
|
383
383
|
};
|
|
384
384
|
};
|
|
385
385
|
for (const t in Ht) {
|
|
@@ -406,8 +406,8 @@ const ai = (t, e) => {
|
|
|
406
406
|
},
|
|
407
407
|
genOpts_: function() {
|
|
408
408
|
const { i18n: i } = nt, a = [];
|
|
409
|
-
for (const { title:
|
|
410
|
-
a.push([i.global.t(
|
|
409
|
+
for (const { title: r, value: u } of e)
|
|
410
|
+
a.push([i.global.t(r), u]);
|
|
411
411
|
return k(a);
|
|
412
412
|
},
|
|
413
413
|
onchange: function(i) {
|
|
@@ -421,7 +421,7 @@ const ai = (t, e) => {
|
|
|
421
421
|
}
|
|
422
422
|
},
|
|
423
423
|
onTypeChange_: function(i) {
|
|
424
|
-
const a = e.find((
|
|
424
|
+
const a = e.find((r) => r.value === i);
|
|
425
425
|
if (!a) {
|
|
426
426
|
console.assert(!1);
|
|
427
427
|
return;
|
|
@@ -434,39 +434,39 @@ const ai = (t, e) => {
|
|
|
434
434
|
return;
|
|
435
435
|
let a = this.value;
|
|
436
436
|
a || (a = void 0);
|
|
437
|
-
const
|
|
438
|
-
if (!
|
|
437
|
+
const r = e.find((_) => _.validator(a));
|
|
438
|
+
if (!r)
|
|
439
439
|
return;
|
|
440
440
|
i.removeField("VALUE", !0), i.removeField("SUFFIX", !0);
|
|
441
|
-
let
|
|
442
|
-
if (
|
|
441
|
+
let u, l;
|
|
442
|
+
if (r.ui === "pixelInput") {
|
|
443
443
|
const _ = $o(this.value) ?? 0;
|
|
444
|
-
|
|
444
|
+
u = new De(
|
|
445
445
|
_,
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
446
|
+
r.min,
|
|
447
|
+
r.max,
|
|
448
|
+
r.precision ? 1 / Math.pow(10, r.precision) : null,
|
|
449
449
|
(T) => {
|
|
450
450
|
this.value = T + "px";
|
|
451
451
|
}
|
|
452
452
|
), l = "px";
|
|
453
|
-
} else if (
|
|
453
|
+
} else if (r.ui === "percentInput") {
|
|
454
454
|
const _ = Ho(this.value) ?? 0;
|
|
455
|
-
|
|
455
|
+
u = new De(
|
|
456
456
|
_,
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
457
|
+
r.min,
|
|
458
|
+
r.max,
|
|
459
|
+
r.precision ? 1 / Math.pow(10, r.precision) : null,
|
|
460
460
|
(T) => {
|
|
461
461
|
this.value = T + "%";
|
|
462
462
|
}
|
|
463
463
|
), l = "%";
|
|
464
464
|
}
|
|
465
|
-
|
|
465
|
+
u && i.appendField(u, "VALUE"), l && i.appendField(l, "SUFFIX");
|
|
466
466
|
},
|
|
467
467
|
checkWarning_: function() {
|
|
468
468
|
let i = this.value;
|
|
469
|
-
if (i || (i = void 0), !e.find((
|
|
469
|
+
if (i || (i = void 0), !e.find((r) => r.validator(i))) {
|
|
470
470
|
this.setWarningText(p("WARN_TYPE_NOT_FOUND"));
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
@@ -482,20 +482,20 @@ for (const t in Ht) {
|
|
|
482
482
|
for (const n in e.types)
|
|
483
483
|
ai(n, e.types[n]);
|
|
484
484
|
}
|
|
485
|
-
const ci =
|
|
485
|
+
const ci = C.xml, ri = {
|
|
486
486
|
init: function() {
|
|
487
487
|
this.appendDummyInput().appendField(
|
|
488
488
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
489
489
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
d.app_bind_container_v1 =
|
|
493
|
-
const
|
|
492
|
+
d.app_bind_container_v1 = ri;
|
|
493
|
+
const ui = {
|
|
494
494
|
init: function() {
|
|
495
495
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
|
-
d.app_bind_item_v1 =
|
|
498
|
+
d.app_bind_item_v1 = ui;
|
|
499
499
|
const li = {
|
|
500
500
|
init: function() {
|
|
501
501
|
this.itemCount_ = 0, this.setMutator(
|
|
@@ -503,7 +503,7 @@ const li = {
|
|
|
503
503
|
["app_bind_item_v1"],
|
|
504
504
|
this
|
|
505
505
|
)
|
|
506
|
-
), this.debounce_ =
|
|
506
|
+
), this.debounce_ = vo(() => {
|
|
507
507
|
this.checkWarning_();
|
|
508
508
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
509
509
|
},
|
|
@@ -584,7 +584,7 @@ const li = {
|
|
|
584
584
|
"Boolean",
|
|
585
585
|
"Array",
|
|
586
586
|
"Object"
|
|
587
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
587
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(v.Align.RIGHT).appendField("%{BKY_APP_V1_APP_BIND_TITLE}"));
|
|
588
588
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
589
589
|
this.removeInput("ADD" + t);
|
|
590
590
|
},
|
|
@@ -672,26 +672,26 @@ function xe(t) {
|
|
|
672
672
|
const { props: e } = f.runtime, { activeObject: n } = f.app, o = [], i = yt(n.type, n.subtype);
|
|
673
673
|
if (!i)
|
|
674
674
|
return o;
|
|
675
|
-
const a = n.nodes.find((
|
|
675
|
+
const a = n.nodes.find((u) => u.id === t);
|
|
676
676
|
if (!a)
|
|
677
677
|
return o;
|
|
678
|
-
const
|
|
679
|
-
if (!
|
|
678
|
+
const r = J[a.key];
|
|
679
|
+
if (!r)
|
|
680
680
|
return console.assert(!1, "invalid element", a.key), o;
|
|
681
|
-
for (const { key:
|
|
681
|
+
for (const { key: u, name: l, params: _ } of r.events)
|
|
682
682
|
o.push({
|
|
683
|
-
key:
|
|
683
|
+
key: u,
|
|
684
684
|
names: [l],
|
|
685
685
|
from: "regular",
|
|
686
686
|
params: _
|
|
687
687
|
});
|
|
688
|
-
if (
|
|
689
|
-
for (const { keys:
|
|
690
|
-
if (jt(
|
|
688
|
+
if (r.key.startsWith("single_ref_v") && console.log("singleRef"), r.key.startsWith("multiple_ref_v") && console.log("multipleRef"), e[r.key] && e[r.key][i])
|
|
689
|
+
for (const { keys: u, names: l, raw: _ } of e[r.key][i]) {
|
|
690
|
+
if (jt(u, _))
|
|
691
691
|
continue;
|
|
692
692
|
const T = Rn(_);
|
|
693
693
|
o.push({
|
|
694
|
-
key:
|
|
694
|
+
key: u,
|
|
695
695
|
names: l,
|
|
696
696
|
from: "property",
|
|
697
697
|
params: [
|
|
@@ -700,7 +700,7 @@ function xe(t) {
|
|
|
700
700
|
]
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
|
-
return
|
|
703
|
+
return r.key.startsWith("globality_v") && n.type, o;
|
|
704
704
|
}
|
|
705
705
|
function Ne(t, e) {
|
|
706
706
|
const { props: n } = f.runtime, { activeObject: o } = f.app, i = yt(o.type, o.subtype);
|
|
@@ -709,21 +709,21 @@ function Ne(t, e) {
|
|
|
709
709
|
const a = o.nodes.find((l) => l.id === t);
|
|
710
710
|
if (!a)
|
|
711
711
|
return;
|
|
712
|
-
const
|
|
713
|
-
if (!
|
|
712
|
+
const r = J[a.key];
|
|
713
|
+
if (!r) {
|
|
714
714
|
console.assert(!1, "invalid element", a.key);
|
|
715
715
|
return;
|
|
716
716
|
}
|
|
717
|
-
const
|
|
718
|
-
if (
|
|
717
|
+
const u = r.events.find((l) => l.key === e);
|
|
718
|
+
if (u)
|
|
719
719
|
return {
|
|
720
|
-
key:
|
|
721
|
-
names: [
|
|
720
|
+
key: u.key,
|
|
721
|
+
names: [u.name],
|
|
722
722
|
from: "regular",
|
|
723
|
-
params:
|
|
723
|
+
params: u.params
|
|
724
724
|
};
|
|
725
|
-
if (
|
|
726
|
-
const l = n[
|
|
725
|
+
if (r.key.startsWith("single_ref_v") && console.log("singleRef"), r.key.startsWith("multiple_ref_v") && console.log("multipleRef"), n[r.key] && n[r.key][i]) {
|
|
726
|
+
const l = n[r.key][i].find((_) => _.keys === e);
|
|
727
727
|
if (l) {
|
|
728
728
|
const _ = Rn(l.raw);
|
|
729
729
|
return {
|
|
@@ -737,7 +737,7 @@ function Ne(t, e) {
|
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
r.key.startsWith("globality_v") && o.type;
|
|
741
741
|
}
|
|
742
742
|
function fi(t) {
|
|
743
743
|
const e = [], n = xe(t);
|
|
@@ -750,8 +750,8 @@ function xn() {
|
|
|
750
750
|
if (t.type === "comp")
|
|
751
751
|
for (const o of e.meta.events) {
|
|
752
752
|
const i = [];
|
|
753
|
-
for (const { id: a, name:
|
|
754
|
-
i.push({ key: a, name:
|
|
753
|
+
for (const { id: a, name: r, type: u } of o.params)
|
|
754
|
+
i.push({ key: a, name: r, type: u });
|
|
755
755
|
n.push({
|
|
756
756
|
key: o.id,
|
|
757
757
|
names: [o.name],
|
|
@@ -769,8 +769,8 @@ function hn(t) {
|
|
|
769
769
|
);
|
|
770
770
|
if (o) {
|
|
771
771
|
const i = [];
|
|
772
|
-
for (const { id: a, name:
|
|
773
|
-
i.push({ key: a, name:
|
|
772
|
+
for (const { id: a, name: r, type: u } of o.params)
|
|
773
|
+
i.push({ key: a, name: r, type: u });
|
|
774
774
|
return {
|
|
775
775
|
key: o.id,
|
|
776
776
|
names: [o.name],
|
|
@@ -796,18 +796,18 @@ function Fe(t) {
|
|
|
796
796
|
const i = J[o.key];
|
|
797
797
|
if (!i)
|
|
798
798
|
return console.assert(!1, "inavlid element", o.key), n;
|
|
799
|
-
for (const { key: a, name:
|
|
799
|
+
for (const { key: a, name: r, inputs: u, outputs: l } of i.methods)
|
|
800
800
|
n.push({
|
|
801
801
|
key: a,
|
|
802
|
-
names: [
|
|
802
|
+
names: [r],
|
|
803
803
|
from: "regular",
|
|
804
|
-
inputs:
|
|
804
|
+
inputs: u,
|
|
805
805
|
outputs: l
|
|
806
806
|
});
|
|
807
807
|
return i.key.startsWith("single_ref_v") && console.log("singleRef"), i.key.startsWith("multiple_ref_v") && console.log("multipleRef"), i.key.startsWith("globality_v") && e.type, n;
|
|
808
808
|
}
|
|
809
809
|
function Le(t, e) {
|
|
810
|
-
const { activeObject: n } = f.app, o = n.nodes.find((
|
|
810
|
+
const { activeObject: n } = f.app, o = n.nodes.find((r) => r.id === t);
|
|
811
811
|
if (!o)
|
|
812
812
|
return;
|
|
813
813
|
const i = J[o.key];
|
|
@@ -815,7 +815,7 @@ function Le(t, e) {
|
|
|
815
815
|
console.assert(!1, "invalid element", o.key);
|
|
816
816
|
return;
|
|
817
817
|
}
|
|
818
|
-
const a = i.methods.find((
|
|
818
|
+
const a = i.methods.find((r) => r.key === e);
|
|
819
819
|
if (a)
|
|
820
820
|
return {
|
|
821
821
|
key: a.key,
|
|
@@ -837,11 +837,11 @@ function Xe() {
|
|
|
837
837
|
if (t.type === "comp")
|
|
838
838
|
for (const o of e.meta.methods) {
|
|
839
839
|
const i = [];
|
|
840
|
-
for (const { id:
|
|
841
|
-
i.push({ key:
|
|
840
|
+
for (const { id: r, name: u, type: l } of o.inputs)
|
|
841
|
+
i.push({ key: r, name: u, type: l });
|
|
842
842
|
const a = [];
|
|
843
|
-
for (const { id:
|
|
844
|
-
a.push({ key:
|
|
843
|
+
for (const { id: r, name: u, type: l } of o.outputs)
|
|
844
|
+
a.push({ key: r, name: u, type: l });
|
|
845
845
|
n.push({
|
|
846
846
|
key: o.id,
|
|
847
847
|
names: [o.name],
|
|
@@ -852,7 +852,7 @@ function Xe() {
|
|
|
852
852
|
}
|
|
853
853
|
return n;
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function Ct(t) {
|
|
856
856
|
const { activeObject: e, activeComp: n } = f.app;
|
|
857
857
|
if (e.type === "comp") {
|
|
858
858
|
const o = n.meta.methods.find(
|
|
@@ -860,11 +860,11 @@ function vt(t) {
|
|
|
860
860
|
);
|
|
861
861
|
if (o) {
|
|
862
862
|
const i = [];
|
|
863
|
-
for (const { id:
|
|
864
|
-
i.push({ key:
|
|
863
|
+
for (const { id: r, name: u, type: l } of o.inputs)
|
|
864
|
+
i.push({ key: r, name: u, type: l });
|
|
865
865
|
const a = [];
|
|
866
|
-
for (const { id:
|
|
867
|
-
a.push({ key:
|
|
866
|
+
for (const { id: r, name: u, type: l } of o.outputs)
|
|
867
|
+
a.push({ key: r, name: u, type: l });
|
|
868
868
|
return {
|
|
869
869
|
key: o.id,
|
|
870
870
|
names: [o.name],
|
|
@@ -882,11 +882,11 @@ function Yn() {
|
|
|
882
882
|
return k(t);
|
|
883
883
|
}
|
|
884
884
|
function Ye(t) {
|
|
885
|
-
const e =
|
|
885
|
+
const e = Ct(t);
|
|
886
886
|
return e ? e.outputs : [];
|
|
887
887
|
}
|
|
888
888
|
function Se(t, e) {
|
|
889
|
-
const n =
|
|
889
|
+
const n = Ct(t);
|
|
890
890
|
if (n)
|
|
891
891
|
return n.outputs.find((o) => o.key === e);
|
|
892
892
|
}
|
|
@@ -904,8 +904,8 @@ function wn(t, e, n) {
|
|
|
904
904
|
if (t.events.length > 0)
|
|
905
905
|
return !1;
|
|
906
906
|
if (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), o[t.key] && o[t.key][e]) {
|
|
907
|
-
for (const { keys:
|
|
908
|
-
if (!jt(
|
|
907
|
+
for (const { keys: r, raw: u } of o[t.key][e])
|
|
908
|
+
if (!jt(r, u))
|
|
909
909
|
return !1;
|
|
910
910
|
}
|
|
911
911
|
return t.key.startsWith("globality_v") && i.type, !0;
|
|
@@ -914,8 +914,8 @@ function wn(t, e, n) {
|
|
|
914
914
|
return t.methods.length > 0 ? !1 : (t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), t.key.startsWith("globality_v") && i.type, !0);
|
|
915
915
|
if (n === "getProp") {
|
|
916
916
|
if (o[t.key] && o[t.key][e]) {
|
|
917
|
-
for (const { keys:
|
|
918
|
-
if (!jt(
|
|
917
|
+
for (const { keys: r, raw: u } of o[t.key][e])
|
|
918
|
+
if (!jt(r, u))
|
|
919
919
|
return !1;
|
|
920
920
|
}
|
|
921
921
|
return t.key.startsWith("single_ref_v") && console.log("singleRef"), t.key.startsWith("multiple_ref_v") && console.log("multipleRef"), !(t.key.startsWith("globality_v") && i.type === "comp" && a.meta.properties.length > 0);
|
|
@@ -976,24 +976,24 @@ function _t(t) {
|
|
|
976
976
|
}
|
|
977
977
|
function pe(t) {
|
|
978
978
|
const { i18n: e } = nt, n = [], o = xt(t);
|
|
979
|
-
for (const { id: i, name: a, alias:
|
|
980
|
-
let
|
|
981
|
-
|
|
979
|
+
for (const { id: i, name: a, alias: r } of o) {
|
|
980
|
+
let u = e.global.t(a);
|
|
981
|
+
r && (u += " / " + r), n.push([u, i]);
|
|
982
982
|
}
|
|
983
983
|
return k(n);
|
|
984
984
|
}
|
|
985
985
|
function Rt(t, e) {
|
|
986
|
-
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [],
|
|
987
|
-
if (!u)
|
|
988
|
-
return a;
|
|
989
|
-
const r = o.nodes.find((_) => _.id === t);
|
|
986
|
+
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = [], r = yt(o.type, o.subtype);
|
|
990
987
|
if (!r)
|
|
991
988
|
return a;
|
|
992
|
-
const
|
|
989
|
+
const u = o.nodes.find((_) => _.id === t);
|
|
990
|
+
if (!u)
|
|
991
|
+
return a;
|
|
992
|
+
const l = J[u.key];
|
|
993
993
|
if (!l)
|
|
994
|
-
return console.assert(!1, "invalid element",
|
|
995
|
-
if (n[l.key] && n[l.key][
|
|
996
|
-
for (const { keys: _, names: T, raw: E } of n[l.key][
|
|
994
|
+
return console.assert(!1, "invalid element", u.key), a;
|
|
995
|
+
if (n[l.key] && n[l.key][r])
|
|
996
|
+
for (const { keys: _, names: T, raw: E } of n[l.key][r])
|
|
997
997
|
e === "write" && jt(_, E) || a.push({
|
|
998
998
|
key: _,
|
|
999
999
|
names: T,
|
|
@@ -1018,16 +1018,16 @@ function Tt(t, e) {
|
|
|
1018
1018
|
const { props: n } = f.runtime, { activeObject: o, activeComp: i } = f.app, a = yt(o.type, o.subtype);
|
|
1019
1019
|
if (!a)
|
|
1020
1020
|
return;
|
|
1021
|
-
const
|
|
1022
|
-
if (!
|
|
1021
|
+
const r = o.nodes.find((l) => l.id === t);
|
|
1022
|
+
if (!r)
|
|
1023
1023
|
return;
|
|
1024
|
-
const
|
|
1025
|
-
if (!
|
|
1026
|
-
console.assert(!1, "invalid element",
|
|
1024
|
+
const u = J[r.key];
|
|
1025
|
+
if (!u) {
|
|
1026
|
+
console.assert(!1, "invalid element", r.key);
|
|
1027
1027
|
return;
|
|
1028
1028
|
}
|
|
1029
|
-
if (n[
|
|
1030
|
-
const l = n[
|
|
1029
|
+
if (n[u.key] && n[u.key][a]) {
|
|
1030
|
+
const l = n[u.key][a].find((_) => _.keys === e);
|
|
1031
1031
|
if (l)
|
|
1032
1032
|
return {
|
|
1033
1033
|
key: l.keys,
|
|
@@ -1038,7 +1038,7 @@ function Tt(t, e) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
if (
|
|
1041
|
+
if (u.key.startsWith("single_ref_v") && console.log("singleRef"), u.key.startsWith("multiple_ref_v") && console.log("multipleRef"), u.key.startsWith("globality_v") && o.type === "comp") {
|
|
1042
1042
|
const l = i.meta.properties.find(
|
|
1043
1043
|
(_) => _.id === e
|
|
1044
1044
|
);
|
|
@@ -1055,8 +1055,8 @@ function Tt(t, e) {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
function Kn(t, e) {
|
|
1057
1057
|
const n = [], o = Rt(t, e);
|
|
1058
|
-
for (const { key: i, names: a, meta:
|
|
1059
|
-
n.push([Bn(a,
|
|
1058
|
+
for (const { key: i, names: a, meta: r } of o)
|
|
1059
|
+
n.push([Bn(a, r.from), i]);
|
|
1060
1060
|
return k(n);
|
|
1061
1061
|
}
|
|
1062
1062
|
function $n() {
|
|
@@ -1200,13 +1200,15 @@ const gi = {
|
|
|
1200
1200
|
};
|
|
1201
1201
|
d.on_app_event_v1 = gi;
|
|
1202
1202
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
1203
|
-
const e =
|
|
1203
|
+
const e = s.quote_, n = t;
|
|
1204
|
+
let o = "";
|
|
1205
|
+
n.event.from === "regular" ? o = `${n.event.key}@${n.node.id}` : n.event.from === "property" ? o = `elementPropChange@${n.node.id}@${n.event.key}` : n.event.from === "custom" ? o = `customPropChange@${n.event.key}` : console.assert(!1);
|
|
1204
1206
|
let i = "";
|
|
1205
|
-
|
|
1206
|
-
l !== 0 && (i += ", "), i +=
|
|
1207
|
+
n.event.params.forEach((u, l) => {
|
|
1208
|
+
l !== 0 && (i += ", "), i += u.key;
|
|
1207
1209
|
});
|
|
1208
|
-
const a = s.statementToCode(
|
|
1209
|
-
return `__onEventV1__(${
|
|
1210
|
+
const a = s.statementToCode(n, "HANDLE");
|
|
1211
|
+
return `__onEventV1__(${e(o)}, function(${i}) {
|
|
1210
1212
|
${a}});
|
|
1211
1213
|
`;
|
|
1212
1214
|
};
|
|
@@ -1294,8 +1296,9 @@ const Ai = {
|
|
|
1294
1296
|
};
|
|
1295
1297
|
d.trigger_app_event_v1 = Ai;
|
|
1296
1298
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1297
|
-
const e = s.quote_;
|
|
1298
|
-
|
|
1299
|
+
const e = s.quote_, n = t;
|
|
1300
|
+
let o = "";
|
|
1301
|
+
return n.event.from === "regular" ? o = `elementEvent@${n.event.key}` : n.event.from === "custom" ? o = `customEvent@${n.event.key}` : console.assert(!1), `__triggerEventV1__(${e(o)});
|
|
1299
1302
|
`;
|
|
1300
1303
|
};
|
|
1301
1304
|
h([
|
|
@@ -1317,8 +1320,8 @@ h([
|
|
|
1317
1320
|
}
|
|
1318
1321
|
]);
|
|
1319
1322
|
s.forBlock.watch_effect_v1 = function(t) {
|
|
1320
|
-
const e =
|
|
1321
|
-
return `function __watchEffect
|
|
1323
|
+
const e = Co(t.id), n = s.statementToCode(t, "HANDLE");
|
|
1324
|
+
return `function __watchEffect$${e}__() {
|
|
1322
1325
|
${n}};
|
|
1323
1326
|
`;
|
|
1324
1327
|
};
|
|
@@ -1356,14 +1359,14 @@ const Ii = {
|
|
|
1356
1359
|
}, 0);
|
|
1357
1360
|
},
|
|
1358
1361
|
updateShape_: function() {
|
|
1359
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(
|
|
1362
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TEXT}"), this.moveInputBefore("TEXT", "RESULT")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "TEXT"));
|
|
1360
1363
|
},
|
|
1361
1364
|
updateShadow_: function() {
|
|
1362
1365
|
if (this.isInsertionMarker())
|
|
1363
1366
|
return;
|
|
1364
|
-
const t =
|
|
1367
|
+
const t = ut("title");
|
|
1365
1368
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1366
|
-
const e =
|
|
1369
|
+
const e = ut("text");
|
|
1367
1370
|
this.getInput("TEXT").connection.setShadowDom(e);
|
|
1368
1371
|
},
|
|
1369
1372
|
ensureBlocks_: function() {
|
|
@@ -1393,16 +1396,16 @@ const Oi = {
|
|
|
1393
1396
|
}, 0);
|
|
1394
1397
|
},
|
|
1395
1398
|
updateShape_: function() {
|
|
1396
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(
|
|
1399
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_VALUE}"), this.moveInputBefore("VALUE", "RESULT")), this.getInput("LABEL") || (this.appendValueInput("LABEL").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_LABEL}"), this.moveInputBefore("LABEL", "VALUE")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "LABEL"));
|
|
1397
1400
|
},
|
|
1398
1401
|
updateShadow_: function() {
|
|
1399
1402
|
if (this.isInsertionMarker())
|
|
1400
1403
|
return;
|
|
1401
|
-
const t =
|
|
1404
|
+
const t = ut("title");
|
|
1402
1405
|
this.getInput("TITLE").connection.setShadowDom(t);
|
|
1403
|
-
const e =
|
|
1406
|
+
const e = ut("label");
|
|
1404
1407
|
this.getInput("LABEL").connection.setShadowDom(e);
|
|
1405
|
-
const n =
|
|
1408
|
+
const n = ut("");
|
|
1406
1409
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
1407
1410
|
},
|
|
1408
1411
|
ensureBlocks_: function() {
|
|
@@ -1451,7 +1454,7 @@ s.forBlock.popup_message_v1 = function(t) {
|
|
|
1451
1454
|
return `__messageV1__(${e}, ${n});
|
|
1452
1455
|
`;
|
|
1453
1456
|
};
|
|
1454
|
-
const
|
|
1457
|
+
const vi = {
|
|
1455
1458
|
init: function() {
|
|
1456
1459
|
this.node = {
|
|
1457
1460
|
id: "",
|
|
@@ -1545,7 +1548,7 @@ const Ci = {
|
|
|
1545
1548
|
this.removeInput("INPUT" + t);
|
|
1546
1549
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1547
1550
|
const e = this.method.inputs[t];
|
|
1548
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(
|
|
1551
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(On[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
1549
1552
|
}
|
|
1550
1553
|
if (this.method.from === "multipleRef")
|
|
1551
1554
|
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
@@ -1601,7 +1604,7 @@ const Ci = {
|
|
|
1601
1604
|
this.setWarningText(null);
|
|
1602
1605
|
}
|
|
1603
1606
|
};
|
|
1604
|
-
d.call_app_method_v1 =
|
|
1607
|
+
d.call_app_method_v1 = vi;
|
|
1605
1608
|
s.forBlock.call_app_method_v1 = function(t) {
|
|
1606
1609
|
const e = s.quote_, n = t;
|
|
1607
1610
|
let o = n.node.id;
|
|
@@ -1617,7 +1620,7 @@ s.forBlock.call_app_method_v1 = function(t) {
|
|
|
1617
1620
|
return `__callMethodV1__(${e(o)}, ${e(i)});
|
|
1618
1621
|
`;
|
|
1619
1622
|
};
|
|
1620
|
-
const
|
|
1623
|
+
const Ci = {
|
|
1621
1624
|
init: function() {
|
|
1622
1625
|
this.method = {
|
|
1623
1626
|
key: "",
|
|
@@ -1658,7 +1661,7 @@ const vi = {
|
|
|
1658
1661
|
}
|
|
1659
1662
|
},
|
|
1660
1663
|
onMethodChange_: function(t) {
|
|
1661
|
-
const e =
|
|
1664
|
+
const e = Ct(t);
|
|
1662
1665
|
e ? (this.method.key = e.key, this.method.names = e.names, this.method.from = e.from, this.method.inputs = e.inputs) : (this.method.key = "", this.method.names = [], this.method.from = "regular", this.method.inputs = []), this.updateShape_(), setTimeout(() => {
|
|
1663
1666
|
this.ensureBlocks_();
|
|
1664
1667
|
}, 0);
|
|
@@ -1682,7 +1685,7 @@ const vi = {
|
|
|
1682
1685
|
F(this, e);
|
|
1683
1686
|
},
|
|
1684
1687
|
checkWarning_: function() {
|
|
1685
|
-
const t =
|
|
1688
|
+
const t = Ct(this.method.key);
|
|
1686
1689
|
if (!t) {
|
|
1687
1690
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1688
1691
|
return;
|
|
@@ -1694,7 +1697,7 @@ const vi = {
|
|
|
1694
1697
|
this.setWarningText(null);
|
|
1695
1698
|
}
|
|
1696
1699
|
};
|
|
1697
|
-
d.impl_app_method_v1 =
|
|
1700
|
+
d.impl_app_method_v1 = Ci;
|
|
1698
1701
|
s.forBlock.impl_app_method_v1 = function(t) {
|
|
1699
1702
|
const e = t;
|
|
1700
1703
|
return `{
|
|
@@ -1756,7 +1759,7 @@ const yi = {
|
|
|
1756
1759
|
}
|
|
1757
1760
|
},
|
|
1758
1761
|
onMethodChange_: function(t) {
|
|
1759
|
-
const e =
|
|
1762
|
+
const e = Ct(t);
|
|
1760
1763
|
if (!e) {
|
|
1761
1764
|
console.assert(!1);
|
|
1762
1765
|
return;
|
|
@@ -1789,7 +1792,7 @@ const yi = {
|
|
|
1789
1792
|
this.getInput("VALUE").connection.setShadowDom(t);
|
|
1790
1793
|
},
|
|
1791
1794
|
checkWarning_: function() {
|
|
1792
|
-
const t =
|
|
1795
|
+
const t = Ct(this.method.key);
|
|
1793
1796
|
if (!t) {
|
|
1794
1797
|
this.setWarningText(p("WARN_METHOD_NOT_FOUND"));
|
|
1795
1798
|
return;
|
|
@@ -3049,7 +3052,7 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3049
3052
|
`
|
|
3050
3053
|
)}(${e}, ${n}, ${o})`, c.FUNCTION_CALL];
|
|
3051
3054
|
};
|
|
3052
|
-
const Pi =
|
|
3055
|
+
const Pi = C.xml, Ri = [
|
|
3053
3056
|
{
|
|
3054
3057
|
type: "add_data_v1",
|
|
3055
3058
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -3329,7 +3332,7 @@ const xi = {
|
|
|
3329
3332
|
}
|
|
3330
3333
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3331
3334
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3332
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
3335
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
3333
3336
|
}
|
|
3334
3337
|
},
|
|
3335
3338
|
updateCheck_: function() {
|
|
@@ -3381,18 +3384,18 @@ const xi = {
|
|
|
3381
3384
|
d.call_func_v1 = xi;
|
|
3382
3385
|
s.forBlock.call_func_v1 = function(t) {
|
|
3383
3386
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3384
|
-
let
|
|
3385
|
-
|
|
3387
|
+
let r = "";
|
|
3388
|
+
r += `${e}var __inputs__ = {
|
|
3386
3389
|
`, o.func.inputs.forEach(({ id: E }, m) => {
|
|
3387
3390
|
const y = s.valueToCode(
|
|
3388
3391
|
o,
|
|
3389
3392
|
"INPUT" + m,
|
|
3390
3393
|
c.ATOMIC
|
|
3391
3394
|
);
|
|
3392
|
-
|
|
3395
|
+
r += `${e}${e}${n(E)}: ${y},
|
|
3393
3396
|
`;
|
|
3394
|
-
}),
|
|
3395
|
-
const
|
|
3397
|
+
}), r += `${e}};`;
|
|
3398
|
+
const u = n(o.space.name + "/" + o.func.name);
|
|
3396
3399
|
let l = "";
|
|
3397
3400
|
o.func.outputs.forEach(({ id: E }) => {
|
|
3398
3401
|
l += `${e}var __output_${E}__ = __result__[${n(E)}];
|
|
@@ -3400,8 +3403,8 @@ s.forBlock.call_func_v1 = function(t) {
|
|
|
3400
3403
|
});
|
|
3401
3404
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
3402
3405
|
return `{
|
|
3403
|
-
${
|
|
3404
|
-
${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${
|
|
3406
|
+
${r}
|
|
3407
|
+
${e}var __result__ = __callFuncV1__(${i},${a},__inputs__,__getEnvV1__(),${u});
|
|
3405
3408
|
${l}${_}}
|
|
3406
3409
|
`;
|
|
3407
3410
|
};
|
|
@@ -3500,7 +3503,7 @@ const Fi = {
|
|
|
3500
3503
|
}
|
|
3501
3504
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3502
3505
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3503
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
3506
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
3504
3507
|
}
|
|
3505
3508
|
},
|
|
3506
3509
|
updateCheck_: function() {
|
|
@@ -3552,7 +3555,7 @@ const Fi = {
|
|
|
3552
3555
|
d.call_func_internal_v1 = Fi;
|
|
3553
3556
|
s.forBlock.call_func_internal_v1 = function(t) {
|
|
3554
3557
|
const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
|
|
3555
|
-
let
|
|
3558
|
+
let r = `${e}var __inputs__ = {
|
|
3556
3559
|
`;
|
|
3557
3560
|
o.func.inputs.forEach(({ id: E }, m) => {
|
|
3558
3561
|
const y = s.valueToCode(
|
|
@@ -3560,10 +3563,10 @@ s.forBlock.call_func_internal_v1 = function(t) {
|
|
|
3560
3563
|
"INPUT" + m,
|
|
3561
3564
|
c.ATOMIC
|
|
3562
3565
|
);
|
|
3563
|
-
|
|
3566
|
+
r += `${e}${e}${n(E)}: ${y},
|
|
3564
3567
|
`;
|
|
3565
|
-
}),
|
|
3566
|
-
const
|
|
3568
|
+
}), r += `${e}};`;
|
|
3569
|
+
const u = o.space.name + "/" + o.func.name;
|
|
3567
3570
|
let l = "";
|
|
3568
3571
|
o.func.outputs.forEach(({ id: E }) => {
|
|
3569
3572
|
l += `${e}var __output_${E}__ = __result__.outputs[${n(E)}];
|
|
@@ -3571,10 +3574,10 @@ s.forBlock.call_func_internal_v1 = function(t) {
|
|
|
3571
3574
|
});
|
|
3572
3575
|
const _ = s.statementToCode(o, "CALLBACK");
|
|
3573
3576
|
return `{
|
|
3574
|
-
${
|
|
3577
|
+
${r}
|
|
3575
3578
|
${e}var __result__ = __callFuncInternalV1__(${i}, ${a}, __inputs__);
|
|
3576
3579
|
${e}if (!__result__.success) {
|
|
3577
|
-
${e}${e}throw 'call func<${
|
|
3580
|
+
${e}${e}throw 'call func<${u}> failed, reason: ' + __result__.message;
|
|
3578
3581
|
${e}}
|
|
3579
3582
|
${l}${_}}
|
|
3580
3583
|
`;
|
|
@@ -3638,8 +3641,8 @@ d.func_entry_v1 = Yi;
|
|
|
3638
3641
|
s.forBlock.func_entry_v1 = function(t) {
|
|
3639
3642
|
const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
|
|
3640
3643
|
for (let a = 0; a < e.func.inputs.length; a++) {
|
|
3641
|
-
const { id:
|
|
3642
|
-
o.push(`__input_${
|
|
3644
|
+
const { id: r } = e.func.inputs[a];
|
|
3645
|
+
o.push(`__input_${r}__`);
|
|
3643
3646
|
}
|
|
3644
3647
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
3645
3648
|
${n}}`;
|
|
@@ -3827,12 +3830,12 @@ function Qt(t, e) {
|
|
|
3827
3830
|
return i ? i.columns : [];
|
|
3828
3831
|
}
|
|
3829
3832
|
function Be(t, e, n) {
|
|
3830
|
-
const { spaces: o } = f.data, i = o.find((
|
|
3833
|
+
const { spaces: o } = f.data, i = o.find((r) => r.id === t);
|
|
3831
3834
|
if (!i)
|
|
3832
3835
|
return;
|
|
3833
|
-
const a = i.tables.find((
|
|
3836
|
+
const a = i.tables.find((r) => r.id === e);
|
|
3834
3837
|
if (a)
|
|
3835
|
-
return a.columns.find((
|
|
3838
|
+
return a.columns.find((r) => r.id === n);
|
|
3836
3839
|
}
|
|
3837
3840
|
function Ki(t, e) {
|
|
3838
3841
|
const n = [];
|
|
@@ -3847,22 +3850,22 @@ function $i(t) {
|
|
|
3847
3850
|
let n, o;
|
|
3848
3851
|
const i = q()?.[0];
|
|
3849
3852
|
if (i) {
|
|
3850
|
-
const
|
|
3851
|
-
if (
|
|
3853
|
+
const u = K(i.id)?.[0];
|
|
3854
|
+
if (u) {
|
|
3852
3855
|
n = {
|
|
3853
3856
|
space: {
|
|
3854
3857
|
id: i.id,
|
|
3855
3858
|
name: i.name
|
|
3856
3859
|
},
|
|
3857
3860
|
table: {
|
|
3858
|
-
id:
|
|
3859
|
-
name:
|
|
3860
|
-
columns:
|
|
3861
|
+
id: u.id,
|
|
3862
|
+
name: u.name,
|
|
3863
|
+
columns: u.columns
|
|
3861
3864
|
},
|
|
3862
|
-
itemCount:
|
|
3865
|
+
itemCount: u.columns.length
|
|
3863
3866
|
}, o = {};
|
|
3864
|
-
for (let l = 0; l <
|
|
3865
|
-
const _ =
|
|
3867
|
+
for (let l = 0; l < u.columns.length; l++) {
|
|
3868
|
+
const _ = u.columns[l];
|
|
3866
3869
|
o["COLUMN" + l] = _.id;
|
|
3867
3870
|
}
|
|
3868
3871
|
}
|
|
@@ -3871,8 +3874,8 @@ function $i(t) {
|
|
|
3871
3874
|
type: "update_column_v1",
|
|
3872
3875
|
extraState: n,
|
|
3873
3876
|
fields: o
|
|
3874
|
-
},
|
|
3875
|
-
e.connect(
|
|
3877
|
+
}, r = w.blocks.append(a, t.workspace);
|
|
3878
|
+
e.connect(r.outputConnection);
|
|
3876
3879
|
}
|
|
3877
3880
|
function Hi(t) {
|
|
3878
3881
|
const e = t.getInput("HANDLE").connection;
|
|
@@ -3911,7 +3914,7 @@ const Gi = {
|
|
|
3911
3914
|
}, 0);
|
|
3912
3915
|
},
|
|
3913
3916
|
updateShape_: function() {
|
|
3914
|
-
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(
|
|
3917
|
+
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(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
3915
3918
|
},
|
|
3916
3919
|
ensureBlocks_: function() {
|
|
3917
3920
|
this.isInsertionMarker() || ($i(this), F(this, [
|
|
@@ -4091,7 +4094,7 @@ const Wi = {
|
|
|
4091
4094
|
};
|
|
4092
4095
|
d.cond_atomic_v1 = Wi;
|
|
4093
4096
|
s.forBlock.cond_atomic_v1 = function(t) {
|
|
4094
|
-
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null,
|
|
4097
|
+
const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", c.ATOMIC) || null, r = {
|
|
4095
4098
|
EQ: "=",
|
|
4096
4099
|
NEQ: "!=",
|
|
4097
4100
|
LT: "<",
|
|
@@ -4099,7 +4102,7 @@ s.forBlock.cond_atomic_v1 = function(t) {
|
|
|
4099
4102
|
GT: ">",
|
|
4100
4103
|
GTE: ">="
|
|
4101
4104
|
}[n.getFieldValue("OP")];
|
|
4102
|
-
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(
|
|
4105
|
+
return [`{type:'ATOMIC',key:${e(o)},value:${i},operator:${e(r)}}`, c.ATOMIC];
|
|
4103
4106
|
};
|
|
4104
4107
|
const ji = {
|
|
4105
4108
|
init: function() {
|
|
@@ -4191,8 +4194,8 @@ d.cond_logic_v1 = Ji;
|
|
|
4191
4194
|
s.forBlock.cond_logic_v1 = function(t) {
|
|
4192
4195
|
const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", c.ATOMIC) || null;
|
|
4193
4196
|
i.push(a);
|
|
4194
|
-
for (let
|
|
4195
|
-
const l = s.valueToCode(n, "ADD" +
|
|
4197
|
+
for (let u = 0; u < n.itemCount_; u++) {
|
|
4198
|
+
const l = s.valueToCode(n, "ADD" + u, c.ATOMIC) || null;
|
|
4196
4199
|
i.push(l);
|
|
4197
4200
|
}
|
|
4198
4201
|
return [`{type:${e(o)},entries:[${i}]}`, c.ATOMIC];
|
|
@@ -4238,8 +4241,8 @@ function Qi(t) {
|
|
|
4238
4241
|
extend: i?.extend ?? ""
|
|
4239
4242
|
}
|
|
4240
4243
|
}
|
|
4241
|
-
},
|
|
4242
|
-
e.connect(
|
|
4244
|
+
}, r = w.blocks.append(a, t.workspace);
|
|
4245
|
+
e.connect(r.outputConnection);
|
|
4243
4246
|
}
|
|
4244
4247
|
function zi(t) {
|
|
4245
4248
|
const e = t.getInput("HANDLE").connection;
|
|
@@ -4278,7 +4281,7 @@ const Zi = {
|
|
|
4278
4281
|
}, 0);
|
|
4279
4282
|
},
|
|
4280
4283
|
updateShape_: function() {
|
|
4281
|
-
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(
|
|
4284
|
+
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(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4282
4285
|
},
|
|
4283
4286
|
ensureBlocks_: function() {
|
|
4284
4287
|
this.isInsertionMarker() || (qi(this), Qi(this), F(this, [
|
|
@@ -4332,22 +4335,22 @@ function ts(t) {
|
|
|
4332
4335
|
let n, o;
|
|
4333
4336
|
const i = q()?.[0];
|
|
4334
4337
|
if (i) {
|
|
4335
|
-
const
|
|
4336
|
-
if (
|
|
4338
|
+
const u = K(i.id)?.[0];
|
|
4339
|
+
if (u) {
|
|
4337
4340
|
n = {
|
|
4338
4341
|
space: {
|
|
4339
4342
|
id: i.id,
|
|
4340
4343
|
name: i.name
|
|
4341
4344
|
},
|
|
4342
4345
|
table: {
|
|
4343
|
-
id:
|
|
4344
|
-
name:
|
|
4345
|
-
columns:
|
|
4346
|
+
id: u.id,
|
|
4347
|
+
name: u.name,
|
|
4348
|
+
columns: u.columns
|
|
4346
4349
|
},
|
|
4347
|
-
itemCount:
|
|
4350
|
+
itemCount: u.columns.length
|
|
4348
4351
|
}, o = {};
|
|
4349
|
-
for (let l = 0; l <
|
|
4350
|
-
const _ =
|
|
4352
|
+
for (let l = 0; l < u.columns.length; l++) {
|
|
4353
|
+
const _ = u.columns[l];
|
|
4351
4354
|
o["COLUMN" + l] = _.id, o["ALIAS" + l] = _.name;
|
|
4352
4355
|
}
|
|
4353
4356
|
}
|
|
@@ -4356,8 +4359,8 @@ function ts(t) {
|
|
|
4356
4359
|
type: "select_column_v1",
|
|
4357
4360
|
extraState: n,
|
|
4358
4361
|
fields: o
|
|
4359
|
-
},
|
|
4360
|
-
e.connect(
|
|
4362
|
+
}, r = w.blocks.append(a, t.workspace);
|
|
4363
|
+
e.connect(r.outputConnection);
|
|
4361
4364
|
}
|
|
4362
4365
|
function es(t) {
|
|
4363
4366
|
const e = t.getInput("CONDITION").connection;
|
|
@@ -4456,7 +4459,7 @@ const is = {
|
|
|
4456
4459
|
}, 0);
|
|
4457
4460
|
},
|
|
4458
4461
|
updateShape_: function() {
|
|
4459
|
-
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(
|
|
4462
|
+
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(v.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4460
4463
|
},
|
|
4461
4464
|
ensureBlocks_: function() {
|
|
4462
4465
|
this.isInsertionMarker() || (ts(this), es(this), ns(this), F(this, [
|
|
@@ -4688,10 +4691,10 @@ const cs = {
|
|
|
4688
4691
|
}
|
|
4689
4692
|
this.itemCount_ = n.length, this.updateShape_();
|
|
4690
4693
|
for (let i = 0; i < this.itemCount_; i++) {
|
|
4691
|
-
const a = n[i] ?? this.table.columns[0]?.id ?? "",
|
|
4694
|
+
const a = n[i] ?? this.table.columns[0]?.id ?? "", r = o[i] ?? this.table.columns[0]?.name ?? "";
|
|
4692
4695
|
this.getField("COLUMN" + i).setValue(a, !1), this.getField(
|
|
4693
4696
|
"ALIAS" + i
|
|
4694
|
-
).setValue(
|
|
4697
|
+
).setValue(r, !1);
|
|
4695
4698
|
}
|
|
4696
4699
|
setTimeout(() => {
|
|
4697
4700
|
this.checkWarning_();
|
|
@@ -4713,7 +4716,7 @@ const cs = {
|
|
|
4713
4716
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
4714
4717
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
4715
4718
|
const e = this.table.columns[t], n = new I(() => this.genColumnOpts_()), o = new lt("");
|
|
4716
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
4719
|
+
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
4717
4720
|
}
|
|
4718
4721
|
},
|
|
4719
4722
|
updateShape_: function() {
|
|
@@ -4723,7 +4726,7 @@ const cs = {
|
|
|
4723
4726
|
if (this.getInput("ADD" + t))
|
|
4724
4727
|
continue;
|
|
4725
4728
|
const e = new I(() => this.genColumnOpts_()), n = new lt("");
|
|
4726
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
4729
|
+
this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
4727
4730
|
const o = this.table.columns[0];
|
|
4728
4731
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
4729
4732
|
}
|
|
@@ -4754,12 +4757,12 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
4754
4757
|
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, E = n.getFieldValue("ALIAS" + l);
|
|
4755
4758
|
a.push({ name: T, alias: E });
|
|
4756
4759
|
}
|
|
4757
|
-
let
|
|
4760
|
+
let r = "[";
|
|
4758
4761
|
return a.forEach(({ name: l, alias: _ }, T) => {
|
|
4759
|
-
T !== 0 && (
|
|
4760
|
-
}),
|
|
4762
|
+
T !== 0 && (r += ","), r += `{name:${e(l)},alias:${e(_)}}`;
|
|
4763
|
+
}), r += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${r}}`, c.ATOMIC];
|
|
4761
4764
|
};
|
|
4762
|
-
const
|
|
4765
|
+
const rs = {
|
|
4763
4766
|
init: function() {
|
|
4764
4767
|
this.space = {
|
|
4765
4768
|
id: "",
|
|
@@ -4845,12 +4848,12 @@ const us = {
|
|
|
4845
4848
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
4846
4849
|
}
|
|
4847
4850
|
};
|
|
4848
|
-
d.select_table_v1 =
|
|
4851
|
+
d.select_table_v1 = rs;
|
|
4849
4852
|
s.forBlock.select_table_v1 = function(t) {
|
|
4850
4853
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
4851
4854
|
return [`{spaceid:${e(o)},tableid:${e(i)}}`, c.ATOMIC];
|
|
4852
4855
|
};
|
|
4853
|
-
const
|
|
4856
|
+
const us = {
|
|
4854
4857
|
init: function() {
|
|
4855
4858
|
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}");
|
|
4856
4859
|
},
|
|
@@ -4872,7 +4875,7 @@ const rs = {
|
|
|
4872
4875
|
]);
|
|
4873
4876
|
}
|
|
4874
4877
|
};
|
|
4875
|
-
d.transaction_v1 =
|
|
4878
|
+
d.transaction_v1 = us;
|
|
4876
4879
|
s.forBlock.transaction_v1 = function(t) {
|
|
4877
4880
|
const e = s.INDENT, n = t, o = Wo(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
|
|
4878
4881
|
return `{
|
|
@@ -5034,7 +5037,7 @@ const ps = {
|
|
|
5034
5037
|
}, 0);
|
|
5035
5038
|
},
|
|
5036
5039
|
onColumnChange_: function(t, e) {
|
|
5037
|
-
const n = this.table.columns.find((
|
|
5040
|
+
const n = this.table.columns.find((r) => r.id === e);
|
|
5038
5041
|
if (!n) {
|
|
5039
5042
|
console.assert(!1);
|
|
5040
5043
|
return;
|
|
@@ -5099,7 +5102,7 @@ const ps = {
|
|
|
5099
5102
|
if (!this.isInFlyout && !this.getInput("ADD0"))
|
|
5100
5103
|
for (let t = 0; t < this.table.columns.length; t++) {
|
|
5101
5104
|
const e = this.table.columns[t], n = new I(() => this.genColumnOpts_());
|
|
5102
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5105
|
+
this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
5103
5106
|
}
|
|
5104
5107
|
},
|
|
5105
5108
|
updateShape_: function() {
|
|
@@ -5111,7 +5114,7 @@ const ps = {
|
|
|
5111
5114
|
if (this.getInput("ADD" + t))
|
|
5112
5115
|
continue;
|
|
5113
5116
|
const e = new I(() => this.genColumnOpts_());
|
|
5114
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5117
|
+
this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
5115
5118
|
}
|
|
5116
5119
|
},
|
|
5117
5120
|
updateBlocks_: function(t) {
|
|
@@ -5122,12 +5125,12 @@ const ps = {
|
|
|
5122
5125
|
i && i.dispose();
|
|
5123
5126
|
else if (i)
|
|
5124
5127
|
continue;
|
|
5125
|
-
const a = this.getFieldValue("COLUMN" + e),
|
|
5126
|
-
if (!
|
|
5128
|
+
const a = this.getFieldValue("COLUMN" + e), r = this.table.columns.find((l) => l.id === a);
|
|
5129
|
+
if (!r)
|
|
5127
5130
|
continue;
|
|
5128
5131
|
n.setCheck(null);
|
|
5129
|
-
const
|
|
5130
|
-
|
|
5132
|
+
const u = Ue(this.workspace, r.type);
|
|
5133
|
+
u && o.connect(u.outputConnection);
|
|
5131
5134
|
}
|
|
5132
5135
|
},
|
|
5133
5136
|
updateCheck_: function() {
|
|
@@ -5165,10 +5168,10 @@ s.forBlock.update_column_v1 = function(t) {
|
|
|
5165
5168
|
const _ = n.getFieldValue("COLUMN" + l), T = n.table.columns.find((m) => m.id === _).name, E = s.valueToCode(n, "ADD" + l, c.ATOMIC) || "null";
|
|
5166
5169
|
a.push({ name: T, value: E });
|
|
5167
5170
|
}
|
|
5168
|
-
let
|
|
5171
|
+
let r = "[";
|
|
5169
5172
|
return a.forEach(({ name: l, value: _ }, T) => {
|
|
5170
|
-
T !== 0 && (
|
|
5171
|
-
}),
|
|
5173
|
+
T !== 0 && (r += ","), r += `{name:${e(l)},value:${_}}`;
|
|
5174
|
+
}), r += "]", [`{spaceid:${e(o)},tableid:${e(i)},columns:${r}}`, c.ATOMIC];
|
|
5172
5175
|
};
|
|
5173
5176
|
function hs(t) {
|
|
5174
5177
|
const e = t.getInput("TABLE").connection;
|
|
@@ -5177,22 +5180,22 @@ function hs(t) {
|
|
|
5177
5180
|
let n, o;
|
|
5178
5181
|
const i = q()?.[0];
|
|
5179
5182
|
if (i) {
|
|
5180
|
-
const
|
|
5181
|
-
if (
|
|
5183
|
+
const u = K(i.id)?.[0];
|
|
5184
|
+
if (u) {
|
|
5182
5185
|
n = {
|
|
5183
5186
|
space: {
|
|
5184
5187
|
id: i.id,
|
|
5185
5188
|
name: i.name
|
|
5186
5189
|
},
|
|
5187
5190
|
table: {
|
|
5188
|
-
id:
|
|
5189
|
-
name:
|
|
5190
|
-
columns:
|
|
5191
|
+
id: u.id,
|
|
5192
|
+
name: u.name,
|
|
5193
|
+
columns: u.columns
|
|
5191
5194
|
},
|
|
5192
|
-
itemCount:
|
|
5195
|
+
itemCount: u.columns.length
|
|
5193
5196
|
}, o = {};
|
|
5194
|
-
for (let l = 0; l <
|
|
5195
|
-
const _ =
|
|
5197
|
+
for (let l = 0; l < u.columns.length; l++) {
|
|
5198
|
+
const _ = u.columns[l];
|
|
5196
5199
|
o["COLUMN" + l] = _.id;
|
|
5197
5200
|
}
|
|
5198
5201
|
}
|
|
@@ -5201,8 +5204,8 @@ function hs(t) {
|
|
|
5201
5204
|
type: "update_column_v1",
|
|
5202
5205
|
extraState: n,
|
|
5203
5206
|
fields: o
|
|
5204
|
-
},
|
|
5205
|
-
e.connect(
|
|
5207
|
+
}, r = w.blocks.append(a, t.workspace);
|
|
5208
|
+
e.connect(r.outputConnection);
|
|
5206
5209
|
}
|
|
5207
5210
|
function ds(t) {
|
|
5208
5211
|
const e = t.getInput("CONDITION").connection;
|
|
@@ -5250,7 +5253,7 @@ const ms = {
|
|
|
5250
5253
|
}, 0);
|
|
5251
5254
|
},
|
|
5252
5255
|
updateShape_: function() {
|
|
5253
|
-
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(
|
|
5256
|
+
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(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5254
5257
|
},
|
|
5255
5258
|
ensureBlocks: function() {
|
|
5256
5259
|
this.isInsertionMarker() || (hs(this), ds(this), F(this, [
|
|
@@ -5277,9 +5280,9 @@ ${e}}
|
|
|
5277
5280
|
${i}}
|
|
5278
5281
|
`;
|
|
5279
5282
|
};
|
|
5280
|
-
const Ts =
|
|
5283
|
+
const Ts = C.xml, Es = {
|
|
5281
5284
|
init: function() {
|
|
5282
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(
|
|
5285
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5283
5286
|
new z(It, 20, 20, void 0, () => {
|
|
5284
5287
|
this.isInFlyout || this.addEntry_();
|
|
5285
5288
|
})
|
|
@@ -5351,9 +5354,9 @@ const gs = {
|
|
|
5351
5354
|
}
|
|
5352
5355
|
};
|
|
5353
5356
|
d.json_boolean_v1 = gs;
|
|
5354
|
-
const fn =
|
|
5357
|
+
const fn = C.xml, As = {
|
|
5355
5358
|
init: function() {
|
|
5356
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(
|
|
5359
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
|
|
5357
5360
|
new z(It, 20, 20, void 0, () => {
|
|
5358
5361
|
this.isInFlyout || this.addEntry_();
|
|
5359
5362
|
})
|
|
@@ -5426,17 +5429,17 @@ const Is = {
|
|
|
5426
5429
|
d.json_number_v1 = Is;
|
|
5427
5430
|
const Os = {
|
|
5428
5431
|
init: function() {
|
|
5429
|
-
this.appendDummyInput().setAlign(
|
|
5432
|
+
this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5430
5433
|
}
|
|
5431
5434
|
};
|
|
5432
5435
|
d.json_root_v1 = Os;
|
|
5433
|
-
const
|
|
5436
|
+
const vs = {
|
|
5434
5437
|
init: function() {
|
|
5435
5438
|
this.appendDummyInput().appendField('"').appendField(new lt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
5436
5439
|
}
|
|
5437
5440
|
};
|
|
5438
|
-
d.json_string_v1 =
|
|
5439
|
-
const
|
|
5441
|
+
d.json_string_v1 = vs;
|
|
5442
|
+
const Cs = C.xml, ys = {
|
|
5440
5443
|
init: function() {
|
|
5441
5444
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5442
5445
|
}
|
|
@@ -5458,7 +5461,7 @@ const Ns = {
|
|
|
5458
5461
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
5459
5462
|
},
|
|
5460
5463
|
mutationToDom: function() {
|
|
5461
|
-
const t =
|
|
5464
|
+
const t = Cs.createElement("mutation");
|
|
5462
5465
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
5463
5466
|
},
|
|
5464
5467
|
domToMutation: function(t) {
|
|
@@ -5525,7 +5528,7 @@ const Ns = {
|
|
|
5525
5528
|
"Boolean",
|
|
5526
5529
|
"Array",
|
|
5527
5530
|
"Object"
|
|
5528
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
5531
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(v.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
5529
5532
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
5530
5533
|
this.removeInput("ADD" + t);
|
|
5531
5534
|
}
|
|
@@ -5861,7 +5864,7 @@ const Bs = {
|
|
|
5861
5864
|
mutationToDom: function() {
|
|
5862
5865
|
if (this.elseIfCount_ <= 0 && !this.hasElse_)
|
|
5863
5866
|
return null;
|
|
5864
|
-
const t =
|
|
5867
|
+
const t = C.xml.createElement("mutation");
|
|
5865
5868
|
return this.elseIfCount_ > 0 && t.setAttribute("elseIf", String(this.elseIfCount_)), this.hasElse_ && t.setAttribute("else", "TRUE"), t;
|
|
5866
5869
|
},
|
|
5867
5870
|
domToMutation: function(t) {
|
|
@@ -6123,8 +6126,8 @@ s.forBlock.logic_operation_v1 = function(t) {
|
|
|
6123
6126
|
if (!o && !i)
|
|
6124
6127
|
o = "false", i = "false";
|
|
6125
6128
|
else {
|
|
6126
|
-
const
|
|
6127
|
-
o || (o =
|
|
6129
|
+
const r = e === "&&" ? "true" : "false";
|
|
6130
|
+
o || (o = r), i || (i = r);
|
|
6128
6131
|
}
|
|
6129
6132
|
return [`${o} ${e} ${i}`, n];
|
|
6130
6133
|
};
|
|
@@ -6195,7 +6198,7 @@ const Ps = {
|
|
|
6195
6198
|
t.push({
|
|
6196
6199
|
enabled: !0,
|
|
6197
6200
|
text: p("VARIABLE_SET_CREATE_GET").replace("%1", o),
|
|
6198
|
-
callback:
|
|
6201
|
+
callback: Cn.callbackFactory(this, i)
|
|
6199
6202
|
});
|
|
6200
6203
|
}
|
|
6201
6204
|
}
|
|
@@ -6344,42 +6347,42 @@ h([
|
|
|
6344
6347
|
s.forBlock.for_v1 = function(t) {
|
|
6345
6348
|
const e = s.INDENT, n = s.getVariableName(
|
|
6346
6349
|
t.getFieldValue("VAR")
|
|
6347
|
-
), o = s.valueToCode(t, "FROM", c.ASSIGNMENT) || "0", i = s.valueToCode(t, "TO", c.ASSIGNMENT) || "0", a = s.valueToCode(t, "BY", c.ASSIGNMENT) || "1",
|
|
6350
|
+
), o = s.valueToCode(t, "FROM", c.ASSIGNMENT) || "0", i = s.valueToCode(t, "TO", c.ASSIGNMENT) || "0", a = s.valueToCode(t, "BY", c.ASSIGNMENT) || "1", r = s.addLoopTrap(
|
|
6348
6351
|
s.statementToCode(t, "DO"),
|
|
6349
6352
|
t
|
|
6350
6353
|
);
|
|
6351
|
-
if (
|
|
6352
|
-
const
|
|
6353
|
-
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${
|
|
6354
|
-
${
|
|
6355
|
-
` : `for (${n} = ${o}; ${n} >= ${i}; ${n} -= ${
|
|
6356
|
-
${
|
|
6354
|
+
if (C.string.isNumber(o) && C.string.isNumber(i) && C.string.isNumber(a)) {
|
|
6355
|
+
const u = Math.abs(Number(a));
|
|
6356
|
+
return Number(o) <= Number(i) ? `for (${n} = ${o}; ${n} <= ${i}; ${n} += ${u}) {
|
|
6357
|
+
${r}}
|
|
6358
|
+
` : `for (${n} = ${o}; ${n} >= ${i}; ${n} -= ${u}) {
|
|
6359
|
+
${r}}
|
|
6357
6360
|
`;
|
|
6358
6361
|
} else {
|
|
6359
|
-
let
|
|
6360
|
-
!o.match(/^\w+$/) && !
|
|
6362
|
+
let u = "", l = o;
|
|
6363
|
+
!o.match(/^\w+$/) && !C.string.isNumber(o) && (l = s.nameDB_.getDistinctName(
|
|
6361
6364
|
`${n}_from`,
|
|
6362
6365
|
et.NameType.VARIABLE
|
|
6363
|
-
),
|
|
6366
|
+
), u += `var ${l} = ${o};
|
|
6364
6367
|
`);
|
|
6365
6368
|
let _ = i;
|
|
6366
|
-
!i.match(/^\w+$/) && !
|
|
6369
|
+
!i.match(/^\w+$/) && !C.string.isNumber(i) && (_ = s.nameDB_.getDistinctName(
|
|
6367
6370
|
`${n}_to`,
|
|
6368
6371
|
et.NameType.VARIABLE
|
|
6369
|
-
),
|
|
6372
|
+
), u += `var ${_} = ${i};
|
|
6370
6373
|
`);
|
|
6371
6374
|
const T = s.nameDB_.getDistinctName(
|
|
6372
6375
|
`${n}_by`,
|
|
6373
6376
|
et.NameType.VARIABLE
|
|
6374
6377
|
);
|
|
6375
|
-
return
|
|
6376
|
-
` :
|
|
6377
|
-
`,
|
|
6378
|
+
return u += `var ${T} = `, C.string.isNumber(a) ? u += `${Math.abs(Number(a))};
|
|
6379
|
+
` : u += `Math.abs(${a});
|
|
6380
|
+
`, u += `if (${l} > ${_}) {
|
|
6378
6381
|
${e}${T} = -${T};
|
|
6379
6382
|
}
|
|
6380
|
-
`,
|
|
6381
|
-
${
|
|
6382
|
-
`,
|
|
6383
|
+
`, u += `for (${n} = ${l}; ${T} >= 0 ? ${n} <= ${_} : ${n} >= ${_}; ${n} += ${T}) {
|
|
6384
|
+
${r}}
|
|
6385
|
+
`, u;
|
|
6383
6386
|
}
|
|
6384
6387
|
};
|
|
6385
6388
|
S.register(
|
|
@@ -6426,18 +6429,18 @@ s.forBlock.for_each_v1 = function(t) {
|
|
|
6426
6429
|
s.statementToCode(t, "DO"),
|
|
6427
6430
|
t
|
|
6428
6431
|
);
|
|
6429
|
-
let a = "",
|
|
6430
|
-
o.match(/^\w+$/) || (
|
|
6432
|
+
let a = "", r = o;
|
|
6433
|
+
o.match(/^\w+$/) || (r = s.nameDB_.getDistinctName(
|
|
6431
6434
|
`${n}_list`,
|
|
6432
6435
|
et.NameType.VARIABLE
|
|
6433
|
-
), a += `var ${
|
|
6436
|
+
), a += `var ${r} = ${o};
|
|
6434
6437
|
`);
|
|
6435
|
-
const
|
|
6438
|
+
const u = s.nameDB_.getDistinctName(
|
|
6436
6439
|
`${n}_index`,
|
|
6437
6440
|
et.NameType.VARIABLE
|
|
6438
6441
|
);
|
|
6439
|
-
return a += `for (var ${
|
|
6440
|
-
${e}${n} = ${
|
|
6442
|
+
return a += `for (var ${u} in ${r}) {
|
|
6443
|
+
${e}${n} = ${r}[${u}];
|
|
6441
6444
|
${i}}
|
|
6442
6445
|
`, a;
|
|
6443
6446
|
};
|
|
@@ -6479,7 +6482,7 @@ s.forBlock.repeat_v1 = function(t) {
|
|
|
6479
6482
|
et.NameType.VARIABLE
|
|
6480
6483
|
);
|
|
6481
6484
|
let a = e;
|
|
6482
|
-
return !e.match(/^\w+$/) && !
|
|
6485
|
+
return !e.match(/^\w+$/) && !C.string.isNumber(e) && (a = s.nameDB_.getDistinctName(
|
|
6483
6486
|
"repeat_end",
|
|
6484
6487
|
et.NameType.VARIABLE
|
|
6485
6488
|
), o += `var ${a} = ${e};
|
|
@@ -6777,10 +6780,10 @@ s.forBlock.math_number_property_v1 = function(t) {
|
|
|
6777
6780
|
NEGATIVE: [" < 0", c.RELATIONAL, c.RELATIONAL],
|
|
6778
6781
|
DIVISIBLE_BY: [null, c.MODULUS, c.EQUALITY],
|
|
6779
6782
|
PRIME: [null, c.NONE, c.FUNCTION_CALL]
|
|
6780
|
-
}, n = t.getFieldValue("PROPERTY"), [o, i, a] = e[t.getFieldValue("PROPERTY")],
|
|
6781
|
-
let
|
|
6783
|
+
}, n = t.getFieldValue("PROPERTY"), [o, i, a] = e[t.getFieldValue("PROPERTY")], r = s.valueToCode(t, "NUMBER_TO_CHECK", i) || "0";
|
|
6784
|
+
let u;
|
|
6782
6785
|
if (n === "PRIME")
|
|
6783
|
-
|
|
6786
|
+
u = s.provideFunction_(
|
|
6784
6787
|
"mathIsPrime",
|
|
6785
6788
|
`
|
|
6786
6789
|
function ${s.FUNCTION_NAME_PLACEHOLDER_}(n) {
|
|
@@ -6802,13 +6805,13 @@ function ${s.FUNCTION_NAME_PLACEHOLDER_}(n) {
|
|
|
6802
6805
|
return true;
|
|
6803
6806
|
}
|
|
6804
6807
|
`
|
|
6805
|
-
) + "(" +
|
|
6808
|
+
) + "(" + r + ")";
|
|
6806
6809
|
else if (n === "DIVISIBLE_BY") {
|
|
6807
6810
|
const l = s.valueToCode(t, "DIVISOR", c.MODULUS) || "0";
|
|
6808
|
-
|
|
6811
|
+
u = r + " % " + l + " === 0";
|
|
6809
6812
|
} else
|
|
6810
|
-
|
|
6811
|
-
return [
|
|
6813
|
+
u = r + o;
|
|
6814
|
+
return [u, a];
|
|
6812
6815
|
};
|
|
6813
6816
|
h([
|
|
6814
6817
|
{
|
|
@@ -7180,7 +7183,7 @@ s.forBlock.math_trig_v1 = function(t) {
|
|
|
7180
7183
|
}
|
|
7181
7184
|
return [o, c.DIVISION];
|
|
7182
7185
|
};
|
|
7183
|
-
const Us =
|
|
7186
|
+
const Us = C.xml, Vs = {
|
|
7184
7187
|
init: function() {
|
|
7185
7188
|
this.appendDummyInput().appendField(
|
|
7186
7189
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
@@ -7263,7 +7266,7 @@ const Fs = {
|
|
|
7263
7266
|
},
|
|
7264
7267
|
updateShape_: function() {
|
|
7265
7268
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7266
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(
|
|
7269
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new lt("key"), "KEY" + t);
|
|
7267
7270
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7268
7271
|
this.removeInput("ADD" + t);
|
|
7269
7272
|
}
|
|
@@ -7510,7 +7513,7 @@ h([
|
|
|
7510
7513
|
s.forBlock.object_to_json_v1 = function(t) {
|
|
7511
7514
|
return [`__jsonStringifyV1__(${s.valueToCode(t, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
7512
7515
|
};
|
|
7513
|
-
const mn =
|
|
7516
|
+
const mn = C.xml, Ys = {
|
|
7514
7517
|
init: function() {
|
|
7515
7518
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new yo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7516
7519
|
}
|
|
@@ -7644,7 +7647,7 @@ const Ks = {
|
|
|
7644
7647
|
}
|
|
7645
7648
|
};
|
|
7646
7649
|
d.procedure_def_v1 = Ks;
|
|
7647
|
-
const $s =
|
|
7650
|
+
const $s = C.xml, Hs = {
|
|
7648
7651
|
init: function() {
|
|
7649
7652
|
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}");
|
|
7650
7653
|
},
|
|
@@ -7720,7 +7723,7 @@ const Gs = {
|
|
|
7720
7723
|
}, 0);
|
|
7721
7724
|
},
|
|
7722
7725
|
updateShape_: function() {
|
|
7723
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_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_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(
|
|
7726
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_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_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(v.Align.RIGHT).appendField("%{BKY_ASSET_ASSET}"), this.moveInputBefore("ASSET", "SUCCESS"));
|
|
7724
7727
|
},
|
|
7725
7728
|
ensureBlocks_: function() {
|
|
7726
7729
|
this.isInsertionMarker() || F(this, [
|
|
@@ -7748,12 +7751,12 @@ function jn(t) {
|
|
|
7748
7751
|
return [];
|
|
7749
7752
|
const n = [];
|
|
7750
7753
|
function o(i, a) {
|
|
7751
|
-
const
|
|
7754
|
+
const r = a + i.name + "/";
|
|
7752
7755
|
n.push({
|
|
7753
7756
|
id: i.id,
|
|
7754
|
-
name:
|
|
7755
|
-
}), i.children.forEach((
|
|
7756
|
-
o(
|
|
7757
|
+
name: r
|
|
7758
|
+
}), i.children.forEach((u) => {
|
|
7759
|
+
o(u, r);
|
|
7757
7760
|
});
|
|
7758
7761
|
}
|
|
7759
7762
|
return o(e.dirTree, ""), n;
|
|
@@ -7837,7 +7840,7 @@ const Js = {
|
|
|
7837
7840
|
};
|
|
7838
7841
|
},
|
|
7839
7842
|
loadExtraState: function(t) {
|
|
7840
|
-
this.space =
|
|
7843
|
+
this.space = Ce(t.space), this.dir = Ce(t.dir), this.resource = Ce(t.resource);
|
|
7841
7844
|
},
|
|
7842
7845
|
genSpaceOpts_: function() {
|
|
7843
7846
|
return Xs();
|
|
@@ -7868,12 +7871,12 @@ const qs = {
|
|
|
7868
7871
|
}, 0);
|
|
7869
7872
|
},
|
|
7870
7873
|
updateShape_: function() {
|
|
7871
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(
|
|
7874
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_DATA}"), this.moveInputBefore("DATA", "SUCCESS")), this.getInput("DIR") || (this.appendValueInput("DIR").setCheck("SelectDir").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_DIR}"), this.moveInputBefore("DIR", "DATA")), this.getInput("NAME") || (this.appendValueInput("NAME").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_NAME}"), this.moveInputBefore("NAME", "DIR"));
|
|
7872
7875
|
},
|
|
7873
7876
|
updateShadow_: function() {
|
|
7874
7877
|
if (this.isInsertionMarker())
|
|
7875
7878
|
return;
|
|
7876
|
-
const t =
|
|
7879
|
+
const t = ut("");
|
|
7877
7880
|
this.getInput("NAME")?.setShadowDom(t);
|
|
7878
7881
|
},
|
|
7879
7882
|
ensureBlocks_: function() {
|
|
@@ -8123,7 +8126,7 @@ h([
|
|
|
8123
8126
|
s.forBlock.text_is_empty_v1 = function(t) {
|
|
8124
8127
|
return [`!${s.valueToCode(t, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
8125
8128
|
};
|
|
8126
|
-
const zs =
|
|
8129
|
+
const zs = C.xml, Zs = {
|
|
8127
8130
|
itemCount_: 0,
|
|
8128
8131
|
mutationToDom: function() {
|
|
8129
8132
|
const t = zs.createElement("mutation");
|
|
@@ -8190,7 +8193,7 @@ const zs = v.xml, Zs = {
|
|
|
8190
8193
|
for (let t = 0; t < this.itemCount_; t++)
|
|
8191
8194
|
if (!this.getInput("ADD" + t)) {
|
|
8192
8195
|
const e = this.appendValueInput("ADD" + t).setAlign(
|
|
8193
|
-
|
|
8196
|
+
v.Align.RIGHT
|
|
8194
8197
|
);
|
|
8195
8198
|
t === 0 && e.appendField("%{BKY_TEXT_V1_JOIN_TITLE}");
|
|
8196
8199
|
}
|
|
@@ -8446,7 +8449,7 @@ const ea = {
|
|
|
8446
8449
|
this.updateShape_(), this.updateShadow_();
|
|
8447
8450
|
},
|
|
8448
8451
|
updateShape_: function() {
|
|
8449
|
-
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(
|
|
8452
|
+
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_IMMEDIATE}"), this.moveInputBefore("IMMEDIATE", "CALLBACK")), this.getInput("COUNT") || (this.appendValueInput("COUNT").setCheck("Number").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_COUNT}"), this.moveInputBefore("COUNT", "IMMEDIATE")), this.getInput("LOOP") || (this.appendValueInput("LOOP").setCheck("Boolean").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_LOOP}"), this.moveInputBefore("LOOP", "COUNT")), this.getInput("INTERVAL") || (this.appendValueInput("INTERVAL").setCheck("Number").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_INTERVAL_MS}"), this.moveInputBefore("INTERVAL", "LOOP"));
|
|
8450
8453
|
},
|
|
8451
8454
|
updateShadow_: function() {
|
|
8452
8455
|
if (this.isInsertionMarker())
|
|
@@ -8515,7 +8518,7 @@ const na = {
|
|
|
8515
8518
|
t.push({
|
|
8516
8519
|
enabled: this.workspace.remainingCapacity() > 0,
|
|
8517
8520
|
text: n.replace("%1", o.getText()),
|
|
8518
|
-
callback:
|
|
8521
|
+
callback: Cn.callbackFactory(this, i)
|
|
8519
8522
|
});
|
|
8520
8523
|
}
|
|
8521
8524
|
}
|
|
@@ -8588,7 +8591,7 @@ s.forBlock.variable_set_v1 = function(t) {
|
|
|
8588
8591
|
return `${e} = ${n};
|
|
8589
8592
|
`;
|
|
8590
8593
|
};
|
|
8591
|
-
const x =
|
|
8594
|
+
const x = C.xml;
|
|
8592
8595
|
function V(t) {
|
|
8593
8596
|
const e = x.createElement("label");
|
|
8594
8597
|
return e.setAttribute("text", t), e;
|
|
@@ -8606,7 +8609,7 @@ function qn(t) {
|
|
|
8606
8609
|
e.setAttribute(n, o);
|
|
8607
8610
|
return e;
|
|
8608
8611
|
}
|
|
8609
|
-
function
|
|
8612
|
+
function vt(t, e) {
|
|
8610
8613
|
e === void 0 && (e = "");
|
|
8611
8614
|
const n = x.createElement("value");
|
|
8612
8615
|
n.setAttribute("name", t);
|
|
@@ -8648,21 +8651,21 @@ function ca() {
|
|
|
8648
8651
|
function En() {
|
|
8649
8652
|
return f.app.activeObject.type === "comp" && f.app.activeComp.meta.methods.length > 0;
|
|
8650
8653
|
}
|
|
8651
|
-
function
|
|
8654
|
+
function ra() {
|
|
8652
8655
|
const t = [];
|
|
8653
8656
|
return t.push(V(p("LABEL_EVENT"))), G("onEvent") && t.push(A("on_app_event_v1")), aa() && t.push(A("trigger_app_event_v1")), t.push(
|
|
8654
8657
|
A("app_bind_v1", [qn([{ key: "items", value: "2" }])])
|
|
8655
8658
|
), t.push(A("watch_effect_v1")), (G("getProp") || G("setProp")) && t.push(V(p("LABEL_PROPERTY"))), G("getProp") && t.push(A("get_app_prop_v1")), G("setProp") && t.push(A("set_app_prop_v1")), ca() && (t.push(V(p("LABEL_STATE"))), t.push(A("get_app_state_v1")), t.push(A("set_app_state_v1"))), (G("callMethod") || En()) && t.push(V(p("LABEL_METHOD"))), G("callMethod") && t.push(A("call_app_method_v1")), En() && (t.push(A("impl_app_method_v1")), t.push(A("set_app_method_output_v1")), t.push(A("procedure_return_v1"))), t;
|
|
8656
8659
|
}
|
|
8657
|
-
const Qn = { name: "APP_COMP_CATEGORY", callback:
|
|
8658
|
-
function
|
|
8660
|
+
const Qn = { name: "APP_COMP_CATEGORY", callback: ra };
|
|
8661
|
+
function ua() {
|
|
8659
8662
|
const t = [];
|
|
8660
8663
|
return t.push(V(p("LABEL_FUNC"))), t.push(V(p("LABEL_FLOW"))), t;
|
|
8661
8664
|
}
|
|
8662
|
-
const zt = { name: "APP_COMPUTE_CATEGORY", callback:
|
|
8665
|
+
const zt = { name: "APP_COMPUTE_CATEGORY", callback: ua };
|
|
8663
8666
|
function la() {
|
|
8664
8667
|
const t = [];
|
|
8665
|
-
return t.push(A("app_debug_trace_v1", [
|
|
8668
|
+
return t.push(A("app_debug_trace_v1", [vt("OBJECT")])), t.push(A("popup_message_v1", [vt("TEXT")])), t.push(A("open_confirm_dlg_v1")), t.push(A("open_prompt_dlg_v1")), t;
|
|
8666
8669
|
}
|
|
8667
8670
|
const Zt = { name: "APP_MESSAGE_CATEGORY", callback: la };
|
|
8668
8671
|
function _a() {
|
|
@@ -8693,7 +8696,7 @@ function ma() {
|
|
|
8693
8696
|
const t = [];
|
|
8694
8697
|
return t.push(V(p("LABEL_RESOURCE"))), t.push(A("upload_resource_v1")), t;
|
|
8695
8698
|
}
|
|
8696
|
-
const ee = { name: "APP_RESOURCE_CATEGORY", callback: ma }, Lt =
|
|
8699
|
+
const ee = { name: "APP_RESOURCE_CATEGORY", callback: ma }, Lt = C.xml;
|
|
8697
8700
|
function Ta() {
|
|
8698
8701
|
const t = [];
|
|
8699
8702
|
{
|
|
@@ -8720,7 +8723,7 @@ function Ta() {
|
|
|
8720
8723
|
const at = {
|
|
8721
8724
|
name: "PROCEDURE_CATEGORY",
|
|
8722
8725
|
callback: Ta
|
|
8723
|
-
}, wt =
|
|
8726
|
+
}, wt = C.xml;
|
|
8724
8727
|
function Ea() {
|
|
8725
8728
|
const t = Mt(), e = [];
|
|
8726
8729
|
{
|
|
@@ -8765,15 +8768,15 @@ function ga() {
|
|
|
8765
8768
|
const t = [];
|
|
8766
8769
|
if (q().length > 0)
|
|
8767
8770
|
t.push(V(p("LABEL_OPERATION"))), t.push(A("add_data_v1")), t.push(A("delete_data_v1")), t.push(A("update_data_v1")), t.push(A("query_data_v1")), t.push(A("transaction_v1")), t.push(
|
|
8768
|
-
A("interrupt_transaction_v1", [
|
|
8769
|
-
), t.push(V(p("LABEL_CONDITION"))), t.push(A("cond_logic_v1")), t.push(A("cond_atomic_v1", [
|
|
8771
|
+
A("interrupt_transaction_v1", [vt("VALUE")])
|
|
8772
|
+
), t.push(V(p("LABEL_CONDITION"))), t.push(A("cond_logic_v1")), t.push(A("cond_atomic_v1", [vt("VALUE")])), t.push(V(p("LABEL_QUERY_EXTRA"))), t.push(
|
|
8770
8773
|
A("query_extra_limit_v1", [
|
|
8771
8774
|
Tn("OFFSET", 0),
|
|
8772
8775
|
Tn("LIMIT", 1)
|
|
8773
8776
|
])
|
|
8774
8777
|
), t.push(
|
|
8775
8778
|
A("query_extra_sortby_v1", [
|
|
8776
|
-
|
|
8779
|
+
vt("COLUMN"),
|
|
8777
8780
|
sa("DESC")
|
|
8778
8781
|
])
|
|
8779
8782
|
);
|
|
@@ -8795,18 +8798,18 @@ const oe = { name: "COMPUTE_FLOW_CATEGORY", callback: Ia };
|
|
|
8795
8798
|
function Oa() {
|
|
8796
8799
|
return Ft("func").length > 0;
|
|
8797
8800
|
}
|
|
8798
|
-
function
|
|
8801
|
+
function va() {
|
|
8799
8802
|
const t = [];
|
|
8800
8803
|
return f.compute.activeObject.type === "func" && (t.push(A("func_entry_v1")), f.compute.activeFunc.outputs.length > 0 && t.push(A("set_func_output_v1")), t.push(A("procedure_return_v1"))), Oa() && t.push(A("call_func_internal_v1")), t;
|
|
8801
8804
|
}
|
|
8802
|
-
const ie = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
8803
|
-
function
|
|
8805
|
+
const ie = { name: "COMPUTE_FUNC_CATEGORY", callback: va };
|
|
8806
|
+
function Ca() {
|
|
8804
8807
|
const t = [];
|
|
8805
8808
|
return t.push(
|
|
8806
|
-
A("compute_debug_trace_v1", [
|
|
8809
|
+
A("compute_debug_trace_v1", [vt("OBJECT")])
|
|
8807
8810
|
), t;
|
|
8808
8811
|
}
|
|
8809
|
-
const se = { name: "COMPUTE_MISC_CATEGORY", callback:
|
|
8812
|
+
const se = { name: "COMPUTE_MISC_CATEGORY", callback: Ca };
|
|
8810
8813
|
yn.setConfirm(async (t, e) => {
|
|
8811
8814
|
const n = await wo({
|
|
8812
8815
|
title: "",
|
|
@@ -8831,8 +8834,8 @@ function Je(t) {
|
|
|
8831
8834
|
const o = n.getRootBlock();
|
|
8832
8835
|
if (!o)
|
|
8833
8836
|
return;
|
|
8834
|
-
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale,
|
|
8835
|
-
e.scroll(-a, -
|
|
8837
|
+
const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, r = i.y * e.scale;
|
|
8838
|
+
e.scroll(-a, -r);
|
|
8836
8839
|
}
|
|
8837
8840
|
function Zn() {
|
|
8838
8841
|
const t = Mt();
|
|
@@ -8860,7 +8863,7 @@ const ka = new Bo.CrossTabCopyPaste();
|
|
|
8860
8863
|
ka.init({ contextMenu: !0, shortcut: !0 });
|
|
8861
8864
|
const Na = new ya();
|
|
8862
8865
|
Na.init();
|
|
8863
|
-
|
|
8866
|
+
ue.Classic.blockStyles = {
|
|
8864
8867
|
color_blocks: {
|
|
8865
8868
|
colourPrimary: "#a5745b",
|
|
8866
8869
|
colourSecondary: "#ede3de",
|
|
@@ -8946,7 +8949,7 @@ re.Classic.blockStyles = {
|
|
|
8946
8949
|
hat: ""
|
|
8947
8950
|
}
|
|
8948
8951
|
};
|
|
8949
|
-
|
|
8952
|
+
ue.Classic.categoryStyles = {
|
|
8950
8953
|
color_category: {
|
|
8951
8954
|
colour: "#a5745b"
|
|
8952
8955
|
},
|
|
@@ -9013,7 +9016,7 @@ re.Classic.categoryStyles = {
|
|
|
9013
9016
|
};
|
|
9014
9017
|
const La = kn.defineTheme("light", {
|
|
9015
9018
|
name: "light",
|
|
9016
|
-
base:
|
|
9019
|
+
base: ue.Classic,
|
|
9017
9020
|
componentStyles: {
|
|
9018
9021
|
workspaceBackgroundColour: "#ffffff",
|
|
9019
9022
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -9029,7 +9032,7 @@ const La = kn.defineTheme("light", {
|
|
|
9029
9032
|
}
|
|
9030
9033
|
}), Sa = kn.defineTheme("dark", {
|
|
9031
9034
|
name: "dark",
|
|
9032
|
-
base:
|
|
9035
|
+
base: ue.Classic,
|
|
9033
9036
|
componentStyles: {
|
|
9034
9037
|
workspaceBackgroundColour: "#1e1e1e",
|
|
9035
9038
|
toolboxBackgroundColour: "#272727",
|
|
@@ -9998,7 +10001,7 @@ function ae(t, e) {
|
|
|
9998
10001
|
function ce(t) {
|
|
9999
10002
|
return `state@${t}`;
|
|
10000
10003
|
}
|
|
10001
|
-
function
|
|
10004
|
+
function rt(t, e) {
|
|
10002
10005
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
10003
10006
|
}
|
|
10004
10007
|
function Ua(t) {
|
|
@@ -10014,8 +10017,8 @@ function Va(t) {
|
|
|
10014
10017
|
for (const n of t)
|
|
10015
10018
|
if (n.type === "get_app_prop_v1") {
|
|
10016
10019
|
const o = n;
|
|
10017
|
-
|
|
10018
|
-
} else n.type === "get_app_state_v1" ?
|
|
10020
|
+
rt(e, ae(o.node.id, o.prop.key));
|
|
10021
|
+
} else n.type === "get_app_state_v1" ? rt(e, ce(n.state.id)) : console.assert(!1);
|
|
10019
10022
|
return e;
|
|
10020
10023
|
}
|
|
10021
10024
|
function xa(t) {
|
|
@@ -10034,7 +10037,7 @@ function Fa(t) {
|
|
|
10034
10037
|
for (const o of t)
|
|
10035
10038
|
if (o.type === "get_app_prop_v1") {
|
|
10036
10039
|
const i = o;
|
|
10037
|
-
if (!
|
|
10040
|
+
if (!rt(n, ae(i.node.id, i.prop.key)))
|
|
10038
10041
|
continue;
|
|
10039
10042
|
e.push({
|
|
10040
10043
|
type: "prop",
|
|
@@ -10043,7 +10046,7 @@ function Fa(t) {
|
|
|
10043
10046
|
});
|
|
10044
10047
|
} else if (o.type === "get_app_state_v1") {
|
|
10045
10048
|
const i = o;
|
|
10046
|
-
if (!
|
|
10049
|
+
if (!rt(n, ce(i.state.id)))
|
|
10047
10050
|
continue;
|
|
10048
10051
|
e.push({
|
|
10049
10052
|
type: "state",
|
|
@@ -10056,22 +10059,22 @@ function Fa(t) {
|
|
|
10056
10059
|
c.ATOMIC
|
|
10057
10060
|
);
|
|
10058
10061
|
if (i.type === "get_app_prop_v1") {
|
|
10059
|
-
const
|
|
10060
|
-
if (!
|
|
10062
|
+
const r = i;
|
|
10063
|
+
if (!rt(n, ae(r.node.id, r.prop.key)))
|
|
10061
10064
|
continue;
|
|
10062
10065
|
e.push({
|
|
10063
10066
|
type: "prop",
|
|
10064
|
-
nodeId:
|
|
10065
|
-
propKeys:
|
|
10067
|
+
nodeId: r.node.id,
|
|
10068
|
+
propKeys: r.prop.key,
|
|
10066
10069
|
subKeys: a
|
|
10067
10070
|
});
|
|
10068
10071
|
} else if (i.type === "get_app_state_v1") {
|
|
10069
|
-
const
|
|
10070
|
-
if (!
|
|
10072
|
+
const r = i;
|
|
10073
|
+
if (!rt(n, ce(r.state.id)))
|
|
10071
10074
|
continue;
|
|
10072
10075
|
e.push({
|
|
10073
10076
|
type: "state",
|
|
10074
|
-
stateId:
|
|
10077
|
+
stateId: r.state.id,
|
|
10075
10078
|
subKeys: a
|
|
10076
10079
|
});
|
|
10077
10080
|
} else
|
|
@@ -10093,14 +10096,14 @@ function Ya(t) {
|
|
|
10093
10096
|
for (const o of n)
|
|
10094
10097
|
if (o.type === "watch_effect_v1") {
|
|
10095
10098
|
const i = Ua(o), a = Va(i);
|
|
10096
|
-
for (const
|
|
10097
|
-
e.watchEffect[
|
|
10099
|
+
for (const r of a)
|
|
10100
|
+
e.watchEffect[r] || (e.watchEffect[r] = []), rt(e.watchEffect[r], o.id);
|
|
10098
10101
|
} else if (o.type === "app_bind_v1") {
|
|
10099
10102
|
const i = xa(o), a = Fa(i);
|
|
10100
10103
|
e.bind.sets[o.id] = a;
|
|
10101
|
-
for (const
|
|
10102
|
-
let
|
|
10103
|
-
|
|
10104
|
+
for (const r of a) {
|
|
10105
|
+
let u = "";
|
|
10106
|
+
r.type === "prop" ? u = ae(r.nodeId, r.propKeys) : r.type === "state" ? u = ce(r.stateId) : console.assert(!1), e.bind.triggers[u] || (e.bind.triggers[u] = []), rt(e.bind.triggers[u], o.id);
|
|
10104
10107
|
}
|
|
10105
10108
|
}
|
|
10106
10109
|
return e;
|
|
@@ -10128,10 +10131,10 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10128
10131
|
return;
|
|
10129
10132
|
}
|
|
10130
10133
|
i.workspace.cleanUp();
|
|
10131
|
-
},
|
|
10134
|
+
}, r = () => {
|
|
10132
10135
|
a();
|
|
10133
10136
|
};
|
|
10134
|
-
return e({ cleanWorkspace: a }), (
|
|
10137
|
+
return e({ cleanWorkspace: a }), (u, l) => {
|
|
10135
10138
|
const _ = D("v-btn"), T = D("v-tooltip");
|
|
10136
10139
|
return B(), Z(T, {
|
|
10137
10140
|
text: R(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
@@ -10141,7 +10144,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10141
10144
|
density: "comfortable",
|
|
10142
10145
|
icon: "mdi-broom",
|
|
10143
10146
|
variant: "outlined",
|
|
10144
|
-
onClick:
|
|
10147
|
+
onClick: r
|
|
10145
10148
|
}), null, 16)
|
|
10146
10149
|
]),
|
|
10147
10150
|
_: 1
|
|
@@ -10158,12 +10161,12 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10158
10161
|
setup(t) {
|
|
10159
10162
|
const { t: e } = Vt(), n = Pt(t, "modelValue");
|
|
10160
10163
|
return (o, i) => {
|
|
10161
|
-
const a = D("v-btn"),
|
|
10162
|
-
return B(), Z(
|
|
10164
|
+
const a = D("v-btn"), r = D("v-tooltip");
|
|
10165
|
+
return B(), Z(r, {
|
|
10163
10166
|
text: R(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10164
10167
|
}, {
|
|
10165
|
-
activator: tt(({ props:
|
|
10166
|
-
L(a, He(
|
|
10168
|
+
activator: tt(({ props: u }) => [
|
|
10169
|
+
L(a, He(u, {
|
|
10167
10170
|
density: "comfortable",
|
|
10168
10171
|
icon: n.value ? "mdi-lock" : "mdi-lock-open",
|
|
10169
10172
|
variant: "outlined",
|
|
@@ -10183,9 +10186,9 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10183
10186
|
},
|
|
10184
10187
|
emits: ["x-click"],
|
|
10185
10188
|
setup(t, { emit: e }) {
|
|
10186
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ut(), a = t,
|
|
10189
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Ut(), a = t, r = e, u = At(!1), l = Y(() => ({
|
|
10187
10190
|
position: "relative",
|
|
10188
|
-
background:
|
|
10191
|
+
background: u.value ? i.value : o.value,
|
|
10189
10192
|
height: "48px",
|
|
10190
10193
|
marginBottom: "1px",
|
|
10191
10194
|
userSelect: "none"
|
|
@@ -10204,11 +10207,11 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10204
10207
|
return fo((B(), Q("div", {
|
|
10205
10208
|
class: "d-flex align-center cursor-pointer",
|
|
10206
10209
|
style: H(l.value),
|
|
10207
|
-
onClick: E[1] || (E[1] = (P) =>
|
|
10208
|
-
onMouseout: E[2] || (E[2] = (P) =>
|
|
10209
|
-
onMouseover: E[3] || (E[3] = (P) =>
|
|
10210
|
+
onClick: E[1] || (E[1] = (P) => r("x-click", a.id)),
|
|
10211
|
+
onMouseout: E[2] || (E[2] = (P) => u.value = !1),
|
|
10212
|
+
onMouseover: E[3] || (E[3] = (P) => u.value = !0)
|
|
10210
10213
|
}, [
|
|
10211
|
-
W("span", Ha,
|
|
10214
|
+
W("span", Ha, re(a.title), 1),
|
|
10212
10215
|
L(m),
|
|
10213
10216
|
L(y, {
|
|
10214
10217
|
class: "x-handle cursor-move mr-3",
|
|
@@ -10258,7 +10261,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10258
10261
|
});
|
|
10259
10262
|
}), a.value = m;
|
|
10260
10263
|
} });
|
|
10261
|
-
let
|
|
10264
|
+
let u = [];
|
|
10262
10265
|
const l = () => {
|
|
10263
10266
|
if (t.lock) {
|
|
10264
10267
|
Ln(n("x-block-lib.msg.cannotOperateInLockedState"));
|
|
@@ -10267,7 +10270,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10267
10270
|
const m = [];
|
|
10268
10271
|
a.value.forEach(({ id: y }) => {
|
|
10269
10272
|
m.push(y);
|
|
10270
|
-
}),
|
|
10273
|
+
}), u = m;
|
|
10271
10274
|
}, _ = () => !t.lock, T = (m) => {
|
|
10272
10275
|
if (!i.workspace) {
|
|
10273
10276
|
console.assert(!1);
|
|
@@ -10279,7 +10282,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10279
10282
|
}
|
|
10280
10283
|
if (m.oldIndex === m.newIndex)
|
|
10281
10284
|
return;
|
|
10282
|
-
const y =
|
|
10285
|
+
const y = u[m.oldIndex], g = i.workspace.getBlockById(
|
|
10283
10286
|
y
|
|
10284
10287
|
);
|
|
10285
10288
|
if (!g) {
|
|
@@ -10287,13 +10290,13 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10287
10290
|
return;
|
|
10288
10291
|
}
|
|
10289
10292
|
let P = "";
|
|
10290
|
-
m.newIndex > m.oldIndex ? P =
|
|
10293
|
+
m.newIndex > m.oldIndex ? P = u[m.newIndex] : m.newIndex > 0 && (P = u[m.newIndex - 1]);
|
|
10291
10294
|
let U = -10;
|
|
10292
10295
|
P !== "" && (U = i.workspace.getBlockById(
|
|
10293
10296
|
P
|
|
10294
10297
|
).getRelativeToSurfaceXY().y + 10);
|
|
10295
10298
|
const X = g.getRelativeToSurfaceXY();
|
|
10296
|
-
g.moveTo(new
|
|
10299
|
+
g.moveTo(new C.Coordinate(X.x, U)), i.workspace.cleanUp(), Zn();
|
|
10297
10300
|
}, E = async (m) => {
|
|
10298
10301
|
if (!i.workspace) {
|
|
10299
10302
|
console.assert(!1);
|
|
@@ -10323,7 +10326,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10323
10326
|
}, null, 8, ["id", "select", "title"]))), 128))
|
|
10324
10327
|
]),
|
|
10325
10328
|
_: 1
|
|
10326
|
-
}, 8, ["modelValue"])) : (B(), Q("span", Wa,
|
|
10329
|
+
}, 8, ["modelValue"])) : (B(), Q("span", Wa, re(R(n)("x-block-lib.noOption")), 1));
|
|
10327
10330
|
}
|
|
10328
10331
|
}), Xa = (t, e) => {
|
|
10329
10332
|
const n = t.__vccOpts || t;
|
|
@@ -10345,17 +10348,17 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10345
10348
|
return;
|
|
10346
10349
|
}
|
|
10347
10350
|
} });
|
|
10348
|
-
const a = (
|
|
10349
|
-
const
|
|
10350
|
-
if (!
|
|
10351
|
+
const a = (r) => {
|
|
10352
|
+
const u = Mt();
|
|
10353
|
+
if (!u) {
|
|
10351
10354
|
console.assert(!1);
|
|
10352
10355
|
return;
|
|
10353
10356
|
}
|
|
10354
|
-
const l =
|
|
10355
|
-
Nn.setSelected(l), Je(
|
|
10357
|
+
const l = u.getBlockById(r);
|
|
10358
|
+
Nn.setSelected(l), Je(r), n.value = !1;
|
|
10356
10359
|
};
|
|
10357
|
-
return (
|
|
10358
|
-
onClick:
|
|
10360
|
+
return (r, u) => (B(), Q("div", {
|
|
10361
|
+
onClick: u[0] || (u[0] = (l) => a(""))
|
|
10359
10362
|
}, "blockTree"));
|
|
10360
10363
|
}
|
|
10361
10364
|
}), Qa = { class: "text-subtitle-1" }, za = /* @__PURE__ */ st({
|
|
@@ -10365,14 +10368,14 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10365
10368
|
lock: { type: Boolean }
|
|
10366
10369
|
},
|
|
10367
10370
|
setup(t, { expose: e }) {
|
|
10368
|
-
const { t: n } = Vt(), o = Go(), { sysBarAvail: i } = Sn(), { backgroundColor1: a } = Ut(),
|
|
10371
|
+
const { t: n } = Vt(), o = Go(), { sysBarAvail: i } = Sn(), { backgroundColor1: a } = Ut(), r = Y(() => {
|
|
10369
10372
|
let y = "100%";
|
|
10370
10373
|
return o.mdAndUp.value && (y = "400px"), {
|
|
10371
10374
|
background: a.value,
|
|
10372
10375
|
width: y,
|
|
10373
10376
|
height: "100%"
|
|
10374
10377
|
};
|
|
10375
|
-
}),
|
|
10378
|
+
}), u = Y(() => {
|
|
10376
10379
|
let y = 48;
|
|
10377
10380
|
return i.value && (y += 24), {
|
|
10378
10381
|
position: "relative",
|
|
@@ -10408,7 +10411,7 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10408
10411
|
}, [
|
|
10409
10412
|
W("div", {
|
|
10410
10413
|
class: "elevation-2",
|
|
10411
|
-
style: H(
|
|
10414
|
+
style: H(r.value)
|
|
10412
10415
|
}, [
|
|
10413
10416
|
R(i) ? (B(), Z(P, {
|
|
10414
10417
|
key: 0,
|
|
@@ -10427,14 +10430,14 @@ const Ka = /* @__PURE__ */ st({
|
|
|
10427
10430
|
variant: "text",
|
|
10428
10431
|
onClick: g[0] || (g[0] = ($) => _.value = !1)
|
|
10429
10432
|
}),
|
|
10430
|
-
W("span", Qa,
|
|
10433
|
+
W("span", Qa, re(R(n)("x-block-lib.navigator")), 1),
|
|
10431
10434
|
L(X)
|
|
10432
10435
|
]),
|
|
10433
10436
|
_: 1
|
|
10434
10437
|
}),
|
|
10435
10438
|
W("div", {
|
|
10436
10439
|
class: "overflow-y-auto",
|
|
10437
|
-
style: H(
|
|
10440
|
+
style: H(u.value)
|
|
10438
10441
|
}, [
|
|
10439
10442
|
t.type === "list" ? (B(), Z(Ja, {
|
|
10440
10443
|
key: 0,
|
|
@@ -10540,37 +10543,37 @@ function oc(t, e) {
|
|
|
10540
10543
|
const o = (i, a) => {
|
|
10541
10544
|
if (i === null)
|
|
10542
10545
|
return;
|
|
10543
|
-
let
|
|
10546
|
+
let r;
|
|
10544
10547
|
if (i instanceof Array)
|
|
10545
|
-
|
|
10548
|
+
r = "json_array_v1";
|
|
10546
10549
|
else {
|
|
10547
10550
|
const l = typeof i;
|
|
10548
10551
|
if (l === "object")
|
|
10549
|
-
|
|
10552
|
+
r = "json_map_v1";
|
|
10550
10553
|
else if (l === "string")
|
|
10551
|
-
|
|
10554
|
+
r = "json_string_v1";
|
|
10552
10555
|
else if (l === "number")
|
|
10553
|
-
|
|
10556
|
+
r = "json_number_v1";
|
|
10554
10557
|
else if (l === "boolean")
|
|
10555
|
-
|
|
10558
|
+
r = "json_boolean_v1";
|
|
10556
10559
|
else
|
|
10557
10560
|
return;
|
|
10558
10561
|
}
|
|
10559
|
-
const
|
|
10560
|
-
if (
|
|
10562
|
+
const u = e.newBlock(r);
|
|
10563
|
+
if (u.initSvg(), u.render(), a.connect(u.outputConnection), r === "json_map_v1") {
|
|
10561
10564
|
const l = [];
|
|
10562
10565
|
for (const _ in i)
|
|
10563
10566
|
l.push(_);
|
|
10564
|
-
|
|
10567
|
+
u.initData(l);
|
|
10565
10568
|
for (let _ = 0; _ < l.length; _++) {
|
|
10566
|
-
const T = l[_], E =
|
|
10569
|
+
const T = l[_], E = u.getInput("ENTRY" + _);
|
|
10567
10570
|
o(i[T], E.connection);
|
|
10568
10571
|
}
|
|
10569
|
-
} else if (
|
|
10570
|
-
|
|
10572
|
+
} else if (r === "json_array_v1") {
|
|
10573
|
+
u.initData(i.length);
|
|
10571
10574
|
for (let l = 0; l < i.length; l++)
|
|
10572
|
-
o(i[l],
|
|
10573
|
-
} else
|
|
10575
|
+
o(i[l], u.getInput("ENTRY" + l).connection);
|
|
10576
|
+
} else r === "json_string_v1" || r === "json_number_v1" ? u.setFieldValue(i, "VALUE") : r === "json_boolean_v1" && u.setFieldValue(i ? "true" : "false", "VALUE");
|
|
10574
10577
|
};
|
|
10575
10578
|
o(t, n.getInput("JSON").connection), O.fire(
|
|
10576
10579
|
new (O.get(O.FINISHED_LOADING))(e)
|
|
@@ -10585,8 +10588,8 @@ function ic(t) {
|
|
|
10585
10588
|
if (o.type === "json_map_v1") {
|
|
10586
10589
|
const i = {};
|
|
10587
10590
|
for (let a = 0; a < o.length; a++) {
|
|
10588
|
-
const
|
|
10589
|
-
i[
|
|
10591
|
+
const r = o.getFieldValue("KEY" + a);
|
|
10592
|
+
i[r] = e(o.getInputTargetBlock("ENTRY" + a));
|
|
10590
10593
|
}
|
|
10591
10594
|
return i;
|
|
10592
10595
|
} else if (o.type === "json_array_v1") {
|
|
@@ -10623,7 +10626,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10623
10626
|
}),
|
|
10624
10627
|
emits: /* @__PURE__ */ Pe(["ready"], ["update:lock", "update:scale"]),
|
|
10625
10628
|
setup(t, { expose: e, emit: n }) {
|
|
10626
|
-
const { backgroundColor2: o } = Ut(), i = Pt(t, "lock"), a = Pt(t, "scale"),
|
|
10629
|
+
const { backgroundColor2: o } = Ut(), i = Pt(t, "lock"), a = Pt(t, "scale"), r = n, u = `blocklyEditor${Re()}`, l = At(), _ = Bt("parentContainer"), T = Bt("clean"), E = Bt("navigator"), m = {};
|
|
10627
10630
|
wa(m);
|
|
10628
10631
|
const y = At(!0), g = At(!1), P = Y(() => t.type === "json" ? "tree" : "list"), U = Y(() => ({
|
|
10629
10632
|
width: "100%",
|
|
@@ -10674,13 +10677,13 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10674
10677
|
console.assert(!1);
|
|
10675
10678
|
return;
|
|
10676
10679
|
}
|
|
10677
|
-
Mo(_.value), await
|
|
10678
|
-
const N = document.querySelector(`#${
|
|
10679
|
-
new MutationObserver((
|
|
10680
|
-
|
|
10680
|
+
Mo(_.value), await rn(t.locale), m.workspace = Za(l.value, t.type, t.version, t.dark), m.workspace.addChangeListener(O.disableOrphans), m.workspace.addChangeListener(io);
|
|
10681
|
+
const N = document.querySelector(`#${u} .blocklyFlyout`);
|
|
10682
|
+
new MutationObserver((ve) => {
|
|
10683
|
+
ve.forEach((Yt) => {
|
|
10681
10684
|
Yt.type === "attributes" && Yt.attributeName === "style" && (kt.value = m.workspace.getFlyout().isVisible());
|
|
10682
10685
|
});
|
|
10683
|
-
}).observe(N, { attributes: !0 }), kt.value = m.workspace.getFlyout().isVisible(), ze(), Ze(), await Eo(),
|
|
10686
|
+
}).observe(N, { attributes: !0 }), kt.value = m.workspace.getFlyout().isVisible(), ze(), Ze(), await Eo(), r("ready");
|
|
10684
10687
|
}), sn(() => {
|
|
10685
10688
|
kt.value = !1;
|
|
10686
10689
|
}), Uo(l, () => {
|
|
@@ -10705,7 +10708,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10705
10708
|
}
|
|
10706
10709
|
const so = (N) => {
|
|
10707
10710
|
y.value = !0, t.type === "json" ? oc(N, m.workspace) : w.workspaces.load(N, m.workspace);
|
|
10708
|
-
}, ao = () => t.type === "json" ? ic(m.workspace) : w.workspaces.save(m.workspace), co = () => Ya(m.workspace),
|
|
10711
|
+
}, ao = () => t.type === "json" ? ic(m.workspace) : w.workspaces.save(m.workspace), co = () => Ya(m.workspace), ro = () => {
|
|
10709
10712
|
if (t.type === "json")
|
|
10710
10713
|
console.assert(!1);
|
|
10711
10714
|
else
|
|
@@ -10714,7 +10717,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10714
10717
|
m.workspace.setIsReadOnly(i.value), m.workspace.isReadOnly() && (kt.value = !1);
|
|
10715
10718
|
}, Ze = () => {
|
|
10716
10719
|
m.workspace.setScale(a.value);
|
|
10717
|
-
},
|
|
10720
|
+
}, uo = () => {
|
|
10718
10721
|
m.workspace.fireChangeListener(new bn());
|
|
10719
10722
|
}, tn = () => {
|
|
10720
10723
|
T.value?.cleanWorkspace();
|
|
@@ -10730,7 +10733,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10730
10733
|
}), Nt(
|
|
10731
10734
|
() => t.locale,
|
|
10732
10735
|
(N) => {
|
|
10733
|
-
|
|
10736
|
+
rn(N);
|
|
10734
10737
|
}
|
|
10735
10738
|
), Nt(
|
|
10736
10739
|
() => t.dark,
|
|
@@ -10748,13 +10751,13 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10748
10751
|
load: so,
|
|
10749
10752
|
save: ao,
|
|
10750
10753
|
generateReactive: co,
|
|
10751
|
-
generateCode:
|
|
10752
|
-
fireStateChange:
|
|
10754
|
+
generateCode: ro,
|
|
10755
|
+
fireStateChange: uo
|
|
10753
10756
|
}), (N, ft) => {
|
|
10754
|
-
const
|
|
10757
|
+
const ve = D("v-icon"), Yt = D("x-loading");
|
|
10755
10758
|
return B(), Q("div", sc, [
|
|
10756
10759
|
W("div", {
|
|
10757
|
-
id:
|
|
10760
|
+
id: u,
|
|
10758
10761
|
ref_key: "blocklyDiv",
|
|
10759
10762
|
ref: l,
|
|
10760
10763
|
style: H(U.value)
|
|
@@ -10769,7 +10772,7 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10769
10772
|
class: "d-flex flex-column justify-center align-center",
|
|
10770
10773
|
style: H(dt.value)
|
|
10771
10774
|
}, [
|
|
10772
|
-
L(
|
|
10775
|
+
L(ve, {
|
|
10773
10776
|
icon: "mdi-delete",
|
|
10774
10777
|
size: "x-large"
|
|
10775
10778
|
})
|
|
@@ -10825,8 +10828,8 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10825
10828
|
xo.registerLanguage("javascript", Fo);
|
|
10826
10829
|
const n = Yo.component, { backgroundColor2: o } = Ut();
|
|
10827
10830
|
return (i, a) => {
|
|
10828
|
-
const
|
|
10829
|
-
return B(), Z(
|
|
10831
|
+
const r = D("v-sheet");
|
|
10832
|
+
return B(), Z(r, {
|
|
10830
10833
|
color: R(o),
|
|
10831
10834
|
height: "100%",
|
|
10832
10835
|
width: "100%"
|
|
@@ -10841,18 +10844,18 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10841
10844
|
}, 8, ["color"]);
|
|
10842
10845
|
};
|
|
10843
10846
|
}
|
|
10844
|
-
}),
|
|
10847
|
+
}), rc = { class: "text-subtitle-1" }, uc = { class: "w-100 h-100 overflow-auto" }, lc = /* @__PURE__ */ st({
|
|
10845
10848
|
__name: "index",
|
|
10846
10849
|
setup(t) {
|
|
10847
|
-
const { t: e } = Vt(), { sysBarAvail: n } = Sn(), { backgroundColor0: o, backgroundColor2: i } = Ut(), a = At(""),
|
|
10850
|
+
const { t: e } = Vt(), { sysBarAvail: n } = Sn(), { backgroundColor0: o, backgroundColor2: i } = Ut(), a = At(""), r = Y(() => {
|
|
10848
10851
|
let _ = 48;
|
|
10849
10852
|
return n.value && (_ += 24), {
|
|
10850
10853
|
position: "relative",
|
|
10851
10854
|
height: `calc(100% - ${_}px)`
|
|
10852
10855
|
};
|
|
10853
|
-
}),
|
|
10856
|
+
}), u = (_) => {
|
|
10854
10857
|
a.value = _.code;
|
|
10855
|
-
}, { open: l } = Ge("sourceDlg",
|
|
10858
|
+
}, { open: l } = Ge("sourceDlg", u);
|
|
10856
10859
|
return (_, T) => {
|
|
10857
10860
|
const E = D("v-sheet"), m = D("v-btn"), y = D("v-spacer"), g = D("v-dialog");
|
|
10858
10861
|
return B(), Z(g, {
|
|
@@ -10888,15 +10891,15 @@ const sc = { class: "position-relative w-100 h-100" }, ac = /* @__PURE__ */ st({
|
|
|
10888
10891
|
variant: "text",
|
|
10889
10892
|
onClick: T[0] || (T[0] = (P) => l.value = !1)
|
|
10890
10893
|
}),
|
|
10891
|
-
W("span",
|
|
10894
|
+
W("span", rc, re(R(e)("x-block-lib.dlg.source.title")), 1),
|
|
10892
10895
|
L(y)
|
|
10893
10896
|
]),
|
|
10894
10897
|
_: 1
|
|
10895
10898
|
}, 8, ["color"]),
|
|
10896
10899
|
W("div", {
|
|
10897
|
-
style: H(
|
|
10900
|
+
style: H(r.value)
|
|
10898
10901
|
}, [
|
|
10899
|
-
W("div",
|
|
10902
|
+
W("div", uc, [
|
|
10900
10903
|
L(cc, { code: a.value }, null, 8, ["code"])
|
|
10901
10904
|
])
|
|
10902
10905
|
], 4)
|