x-block-lib 0.10.27 → 0.10.28
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 +552 -556
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ function en(e) {
|
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
76
|
function tn(e) {
|
|
77
|
-
return e.ui === "
|
|
77
|
+
return e.ui === "text" ? "string" : e.ui === "number" ? "number" : e.ui === "switch" ? "boolean" : "string";
|
|
78
78
|
}
|
|
79
79
|
function nn(e, t) {
|
|
80
80
|
return !!(e.startsWith("basic.") || !t.ui || t.readonly);
|
|
@@ -108,7 +108,7 @@ function B(e) {
|
|
|
108
108
|
return e === "string" ? "String" : e === "number" ? "Number" : e === "boolean" ? "Boolean" : e === "array" ? "Array" : e === "object" ? "Object" : (e === "any" || console.assert(!1), null);
|
|
109
109
|
}
|
|
110
110
|
function on(e) {
|
|
111
|
-
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "
|
|
111
|
+
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "text" ? "String" : e.ui === "number" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? $t(e.items) : e.ui === "multiTypes" ? $t(e.types) : e.ui === "comp" ? "Comp" : e.ui === "slot" ? "Slot" : e.ui === "adaptSlot" ? "AdaptSlot" : (console.assert(!1), null);
|
|
112
112
|
}
|
|
113
113
|
function sn(e) {
|
|
114
114
|
return e === "string" ? "String" : e === "integer" || e === "decimal" ? "Number" : e === "boolean" ? "Boolean" : e === "enum" || e === "dateTime" ? "String" : (console.assert(!1), null);
|
|
@@ -276,24 +276,20 @@ function bn() {
|
|
|
276
276
|
function xn() {
|
|
277
277
|
return p.xml.textToDom("<shadow type=\"select_slot_v1\"></shadow>");
|
|
278
278
|
}
|
|
279
|
-
function Sn(
|
|
280
|
-
let t = `<shadow type="color_picker_v1"><field name="COLOR">${e}</field></shadow>`;
|
|
281
|
-
return p.xml.textToDom(t);
|
|
282
|
-
}
|
|
283
|
-
function Cn() {
|
|
279
|
+
function Sn() {
|
|
284
280
|
return p.xml.textToDom("\n<shadow type=\"app_bind_entry_v1\">\n <field name=\"KIND\">notSet</field>\n</shadow>");
|
|
285
281
|
}
|
|
286
282
|
function H(e) {
|
|
287
283
|
let t = null;
|
|
288
284
|
return e === "string" ? t = pn("") : e === "number" ? t = mn(0) : e === "boolean" ? t = hn(!1) : e === "array" ? t = gn() : e === "object" ? t = _n() : e === "any" ? t = null : console.assert(!1, "type not implementd"), t;
|
|
289
285
|
}
|
|
290
|
-
function
|
|
286
|
+
function Cn(e) {
|
|
291
287
|
let t = null;
|
|
292
|
-
return e.array ? t = gn() : e.ui === "transient" ? t = H(e.type) : e.ui === "dummy" ? t = null : e.ui === "
|
|
288
|
+
return e.array ? t = gn() : e.ui === "transient" ? t = H(e.type) : e.ui === "dummy" ? t = null : e.ui === "text" ? t = pn(e.default) : e.ui === "number" ? t = mn(e.default) : e.ui === "switch" ? t = hn(e.default) : e.ui === "select" ? t = vn(e.items) : e.ui === "multiTypes" ? t = yn(e.types) : e.ui === "comp" ? t = bn() : e.ui === "slot" ? t = xn() : console.assert(!1, "property ui not implementd"), t;
|
|
293
289
|
}
|
|
294
290
|
//#endregion
|
|
295
291
|
//#region src/core/utils/app/argument.ts
|
|
296
|
-
function
|
|
292
|
+
function wn() {
|
|
297
293
|
let { activeObject: e, activePage: t } = x.app, n = [];
|
|
298
294
|
if (e.type === "page" && t.meta.arguments) for (let { id: e, name: r, type: i } of t.meta.arguments) n.push({
|
|
299
295
|
key: e,
|
|
@@ -302,7 +298,7 @@ function Tn() {
|
|
|
302
298
|
});
|
|
303
299
|
return n;
|
|
304
300
|
}
|
|
305
|
-
function
|
|
301
|
+
function Tn(e) {
|
|
306
302
|
let { activeObject: t, activePage: n } = x.app;
|
|
307
303
|
if (t.type === "page") {
|
|
308
304
|
let t = n.meta.arguments?.find((t) => t.id === e);
|
|
@@ -313,9 +309,9 @@ function En(e) {
|
|
|
313
309
|
};
|
|
314
310
|
}
|
|
315
311
|
}
|
|
316
|
-
function
|
|
312
|
+
function En() {
|
|
317
313
|
let e = [];
|
|
318
|
-
return
|
|
314
|
+
return wn().forEach(({ key: t, name: n }) => {
|
|
319
315
|
e.push([n, t]);
|
|
320
316
|
}), P(e);
|
|
321
317
|
}
|
|
@@ -336,7 +332,7 @@ v.get_page_argument_v1 = {
|
|
|
336
332
|
}, 0);
|
|
337
333
|
},
|
|
338
334
|
genArgumentOpts_: function() {
|
|
339
|
-
return
|
|
335
|
+
return En();
|
|
340
336
|
},
|
|
341
337
|
onchange: function(e) {
|
|
342
338
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -347,7 +343,7 @@ v.get_page_argument_v1 = {
|
|
|
347
343
|
}
|
|
348
344
|
},
|
|
349
345
|
onArgumentChange_: function(e) {
|
|
350
|
-
let t =
|
|
346
|
+
let t = Tn(e);
|
|
351
347
|
if (!t) {
|
|
352
348
|
console.assert(!1);
|
|
353
349
|
return;
|
|
@@ -358,7 +354,7 @@ v.get_page_argument_v1 = {
|
|
|
358
354
|
this.setOutput(!0, B(this.argument.type));
|
|
359
355
|
},
|
|
360
356
|
checkWarning_: function() {
|
|
361
|
-
let e =
|
|
357
|
+
let e = Tn(this.argument.key);
|
|
362
358
|
if (!e) {
|
|
363
359
|
this.setWarningText(N("WARN_ARGUMENT_NOT_FOUND"));
|
|
364
360
|
return;
|
|
@@ -375,7 +371,7 @@ v.get_page_argument_v1 = {
|
|
|
375
371
|
};
|
|
376
372
|
//#endregion
|
|
377
373
|
//#region src/core/blocks/app/define/items/v1/index.ts
|
|
378
|
-
var
|
|
374
|
+
var Dn = (e, t) => {
|
|
379
375
|
let n = Qt(e), r = $t(e);
|
|
380
376
|
v[n] = {
|
|
381
377
|
init: function() {
|
|
@@ -393,11 +389,11 @@ var On = (e, t) => {
|
|
|
393
389
|
};
|
|
394
390
|
for (let e in tt) {
|
|
395
391
|
let t = tt[e];
|
|
396
|
-
for (let e of t.items)
|
|
392
|
+
for (let e of t.items) Dn(e, Ve(e));
|
|
397
393
|
}
|
|
398
394
|
//#endregion
|
|
399
395
|
//#region src/core/blocks/app/define/types/v1/index.ts
|
|
400
|
-
var
|
|
396
|
+
var On = be(), kn = (e, t) => {
|
|
401
397
|
let n = Qt(e), i = $t(e);
|
|
402
398
|
v[n] = {
|
|
403
399
|
init: function() {
|
|
@@ -445,7 +441,7 @@ var kn = be(), An = (e, t) => {
|
|
|
445
441
|
else if (n.trait === "percent") i = new r($e(this.value) ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
446
442
|
this.value = e + "%";
|
|
447
443
|
}), a = "%";
|
|
448
|
-
else if (n.trait === "hexColor") i = new
|
|
444
|
+
else if (n.trait === "hexColor") i = new On.FieldColour(this.value, (e) => {
|
|
449
445
|
this.value = e;
|
|
450
446
|
}, {
|
|
451
447
|
colourOptions: cn,
|
|
@@ -477,11 +473,11 @@ var kn = be(), An = (e, t) => {
|
|
|
477
473
|
};
|
|
478
474
|
for (let e in tt) {
|
|
479
475
|
let t = tt[e];
|
|
480
|
-
for (let e of t.types)
|
|
476
|
+
for (let e of t.types) kn(e, Ue(e));
|
|
481
477
|
}
|
|
482
478
|
//#endregion
|
|
483
479
|
//#region src/core/utils/app/app.ts
|
|
484
|
-
function
|
|
480
|
+
function An() {
|
|
485
481
|
let e = [], { appList: t } = x.app;
|
|
486
482
|
for (let { id: n, name: r } of t) e.push({
|
|
487
483
|
id: n,
|
|
@@ -489,22 +485,22 @@ function jn() {
|
|
|
489
485
|
});
|
|
490
486
|
return e;
|
|
491
487
|
}
|
|
492
|
-
function
|
|
488
|
+
function jn(e) {
|
|
493
489
|
let { appList: t } = x.app, n = t.find((t) => t.id === e);
|
|
494
490
|
if (n) return {
|
|
495
491
|
id: n.id,
|
|
496
492
|
name: n.name
|
|
497
493
|
};
|
|
498
494
|
}
|
|
499
|
-
function
|
|
495
|
+
function Mn() {
|
|
500
496
|
let e = [];
|
|
501
|
-
return
|
|
497
|
+
return An().forEach(({ id: t, name: n }) => {
|
|
502
498
|
e.push([n, t]);
|
|
503
499
|
}), P(e);
|
|
504
500
|
}
|
|
505
501
|
//#endregion
|
|
506
502
|
//#region src/core/utils/app/node.ts
|
|
507
|
-
function
|
|
503
|
+
function Nn(e, t, n, r, i) {
|
|
508
504
|
let { activeObject: a, activePage: o, activeComp: s, depends: c } = x.app;
|
|
509
505
|
if (e.events && e.events.length > 0) return !1;
|
|
510
506
|
if (S[e.key] && S[e.key][t]) {
|
|
@@ -566,7 +562,7 @@ function Pn(e, t, n, r, i) {
|
|
|
566
562
|
}
|
|
567
563
|
return !0;
|
|
568
564
|
}
|
|
569
|
-
function
|
|
565
|
+
function Pn(e, t) {
|
|
570
566
|
let { activeObject: n, activeComp: r } = x.app;
|
|
571
567
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
572
568
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -578,7 +574,7 @@ function Fn(e, t) {
|
|
|
578
574
|
}
|
|
579
575
|
return !(F(e.key) && n.type === "comp" && r.meta.events && r.meta.events.length > 0);
|
|
580
576
|
}
|
|
581
|
-
function
|
|
577
|
+
function Fn(e, t, n) {
|
|
582
578
|
let { activeObject: r, activeComp: i, depends: a } = x.app;
|
|
583
579
|
if (e.methods && e.methods.length > 0) return !1;
|
|
584
580
|
if (I(e.key) && t) {
|
|
@@ -608,7 +604,7 @@ function In(e, t, n) {
|
|
|
608
604
|
}
|
|
609
605
|
return !0;
|
|
610
606
|
}
|
|
611
|
-
function
|
|
607
|
+
function In(e, t) {
|
|
612
608
|
let { activeObject: n, activeComp: r } = x.app;
|
|
613
609
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
614
610
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -620,7 +616,7 @@ function Ln(e, t) {
|
|
|
620
616
|
}
|
|
621
617
|
return !(F(e.key) && n.type === "comp" && r.meta.methods && r.meta.methods.length > 0);
|
|
622
618
|
}
|
|
623
|
-
function
|
|
619
|
+
function Ln(e, t) {
|
|
624
620
|
let { activeObject: n, activeComp: r } = x.app;
|
|
625
621
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
626
622
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -639,7 +635,7 @@ function Rn(e, t) {
|
|
|
639
635
|
}
|
|
640
636
|
return !0;
|
|
641
637
|
}
|
|
642
|
-
function
|
|
638
|
+
function Rn(e, t, n, r, i) {
|
|
643
639
|
let { activeObject: a, activeComp: o, depends: s } = x.app;
|
|
644
640
|
if (S[e.key] && S[e.key][t] && S[e.key][t].length > 0) return !1;
|
|
645
641
|
if (I(e.key) && r) {
|
|
@@ -677,7 +673,7 @@ function zn(e, t, n, r, i) {
|
|
|
677
673
|
}
|
|
678
674
|
return !0;
|
|
679
675
|
}
|
|
680
|
-
function
|
|
676
|
+
function zn(e, t, n, r, i) {
|
|
681
677
|
let { activeObject: a, activeComp: o, depends: s } = x.app;
|
|
682
678
|
if (S[e.key] && S[e.key][t]) {
|
|
683
679
|
for (let { keys: n, raw: r } of S[e.key][t]) if (!nn(n, r)) return !1;
|
|
@@ -717,8 +713,8 @@ function Bn(e, t, n, r, i) {
|
|
|
717
713
|
}
|
|
718
714
|
return !0;
|
|
719
715
|
}
|
|
720
|
-
function
|
|
721
|
-
return e ? e === "onEvent" ?
|
|
716
|
+
function Bn(e, t, n, r, i, a) {
|
|
717
|
+
return e ? e === "onEvent" ? Nn(t, n, r, i, a) : e === "triggerEvent" ? Pn(t, r) : e === "callMethod" ? Fn(t, i, a) : e === "implementMethod" ? In(t, r) : e === "implementMethodOutput" ? Ln(t, r) : e === "getProperty" ? Rn(t, n, r, i, a) : e === "setProperty" ? zn(t, n, r, i, a) : !1 : !1;
|
|
722
718
|
}
|
|
723
719
|
function U(e) {
|
|
724
720
|
let { activeObject: t } = x.app, n = He(t.type, t.subtype);
|
|
@@ -728,11 +724,11 @@ function U(e) {
|
|
|
728
724
|
console.assert(!1, "invalid element", r.key);
|
|
729
725
|
continue;
|
|
730
726
|
}
|
|
731
|
-
if (!
|
|
727
|
+
if (!Bn(e, t, n, r.slot, r.comp, r.adaptSlot)) return !0;
|
|
732
728
|
}
|
|
733
729
|
return !1;
|
|
734
730
|
}
|
|
735
|
-
function
|
|
731
|
+
function Vn(e) {
|
|
736
732
|
let { activeObject: t } = x.app, n = [], r = He(t.type, t.subtype);
|
|
737
733
|
for (let i of t.nodes) {
|
|
738
734
|
let t = C(i.key);
|
|
@@ -740,7 +736,7 @@ function Hn(e) {
|
|
|
740
736
|
console.assert(!1, "invalid element", i.key);
|
|
741
737
|
continue;
|
|
742
738
|
}
|
|
743
|
-
|
|
739
|
+
Bn(e, t, r, i.slot, i.comp, i.adaptSlot) || n.push({
|
|
744
740
|
id: i.id,
|
|
745
741
|
key: i.key,
|
|
746
742
|
name: t.name,
|
|
@@ -764,8 +760,8 @@ function W(e) {
|
|
|
764
760
|
alias: n.alias
|
|
765
761
|
};
|
|
766
762
|
}
|
|
767
|
-
function
|
|
768
|
-
let { i18n: t } = Me, n = [], r =
|
|
763
|
+
function Hn(e) {
|
|
764
|
+
let { i18n: t } = Me, n = [], r = Vn(e);
|
|
769
765
|
for (let { id: e, name: i, alias: a } of r) {
|
|
770
766
|
let r = t.global.t(i);
|
|
771
767
|
a && (r += " / " + a), n.push([r, e]);
|
|
@@ -774,33 +770,33 @@ function Un(e) {
|
|
|
774
770
|
}
|
|
775
771
|
//#endregion
|
|
776
772
|
//#region src/core/utils/app/state.ts
|
|
777
|
-
function
|
|
773
|
+
function Un() {
|
|
778
774
|
let { activeObject: e, activePage: t, activeComp: n } = x.app;
|
|
779
775
|
return e.type === "page" ? t.meta.states ?? [] : e.type === "comp" ? n.meta.states ?? [] : [];
|
|
780
776
|
}
|
|
781
|
-
function
|
|
777
|
+
function Wn(e) {
|
|
782
778
|
let { activeObject: t, activePage: n, activeComp: r } = x.app;
|
|
783
779
|
if (t.type === "page") return n.meta.states?.find((t) => t.id === e);
|
|
784
780
|
if (t.type === "comp") return r.meta.states?.find((t) => t.id === e);
|
|
785
781
|
}
|
|
786
|
-
function
|
|
787
|
-
let e = [], t =
|
|
782
|
+
function Gn() {
|
|
783
|
+
let e = [], t = Un();
|
|
788
784
|
for (let { id: n, name: r } of t) e.push([r, n]);
|
|
789
785
|
return P(e);
|
|
790
786
|
}
|
|
791
787
|
//#endregion
|
|
792
788
|
//#region src/core/utils/app/bind.ts
|
|
793
|
-
function
|
|
789
|
+
function Kn() {
|
|
794
790
|
let e = ["notSet"];
|
|
795
|
-
return
|
|
791
|
+
return Vn("setProperty").length > 0 && e.push("property"), Un().length > 0 && e.push("state"), e;
|
|
796
792
|
}
|
|
797
|
-
function
|
|
793
|
+
function qn() {
|
|
798
794
|
let { i18n: e } = Me;
|
|
799
|
-
return P(
|
|
795
|
+
return P(Kn().map((t) => t === "notSet" ? [e.global.t(`x-runtime-lib.${t}`), t] : [N(`APP_${Oe(t)}`), t]));
|
|
800
796
|
}
|
|
801
797
|
//#endregion
|
|
802
798
|
//#region src/core/utils/app/comp.ts
|
|
803
|
-
function
|
|
799
|
+
function Jn() {
|
|
804
800
|
let { activeApp: e } = x.app, t = [{
|
|
805
801
|
id: "",
|
|
806
802
|
name: ""
|
|
@@ -811,7 +807,7 @@ function Yn() {
|
|
|
811
807
|
});
|
|
812
808
|
return t;
|
|
813
809
|
}
|
|
814
|
-
function
|
|
810
|
+
function Yn(e) {
|
|
815
811
|
let { activeApp: t } = x.app;
|
|
816
812
|
if (!e) return {
|
|
817
813
|
id: "",
|
|
@@ -823,9 +819,9 @@ function Xn(e) {
|
|
|
823
819
|
name: n.name
|
|
824
820
|
};
|
|
825
821
|
}
|
|
826
|
-
function
|
|
822
|
+
function Xn() {
|
|
827
823
|
let { i18n: e } = Me, t = [];
|
|
828
|
-
return
|
|
824
|
+
return Jn().forEach(({ id: n, name: r }) => {
|
|
829
825
|
let i = r;
|
|
830
826
|
n === "" && (i = e.global.t("x-runtime-lib.notSet")), t.push([i, n]);
|
|
831
827
|
}), P(t);
|
|
@@ -853,7 +849,7 @@ function K(e) {
|
|
|
853
849
|
type: e
|
|
854
850
|
}];
|
|
855
851
|
}
|
|
856
|
-
function
|
|
852
|
+
function Zn(e) {
|
|
857
853
|
let t = !0;
|
|
858
854
|
switch (e) {
|
|
859
855
|
case "": break;
|
|
@@ -894,7 +890,7 @@ function Qn(e) {
|
|
|
894
890
|
}
|
|
895
891
|
return t;
|
|
896
892
|
}
|
|
897
|
-
function
|
|
893
|
+
function Qn(e) {
|
|
898
894
|
let { activeObject: t, activePage: n, activeComp: r, depends: i } = x.app, a = [], o = He(t.type, t.subtype), s = t.nodes.find((t) => t.id === e);
|
|
899
895
|
if (!s) return a;
|
|
900
896
|
let c = C(s.key);
|
|
@@ -1066,7 +1062,7 @@ function $n(e) {
|
|
|
1066
1062
|
}
|
|
1067
1063
|
return a;
|
|
1068
1064
|
}
|
|
1069
|
-
function
|
|
1065
|
+
function $n(e) {
|
|
1070
1066
|
if (!e) return;
|
|
1071
1067
|
let { activeObject: t, activePage: n, activeComp: r, depends: i } = x.app, a = He(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } = ot(e), l = t.nodes.find((e) => e.id === s);
|
|
1072
1068
|
if (!l) return;
|
|
@@ -1341,12 +1337,12 @@ function er(e) {
|
|
|
1341
1337
|
}
|
|
1342
1338
|
}
|
|
1343
1339
|
}
|
|
1344
|
-
function
|
|
1345
|
-
let t = [], n =
|
|
1340
|
+
function er(e) {
|
|
1341
|
+
let t = [], n = Qn(e), r;
|
|
1346
1342
|
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([rt(i, a), e]);
|
|
1347
1343
|
return P(t);
|
|
1348
1344
|
}
|
|
1349
|
-
function
|
|
1345
|
+
function tr(e) {
|
|
1350
1346
|
let { activeObject: t, activeComp: n } = x.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1351
1347
|
if (!i) return r;
|
|
1352
1348
|
let a = C(i.key);
|
|
@@ -1377,7 +1373,7 @@ function nr(e) {
|
|
|
1377
1373
|
});
|
|
1378
1374
|
return r;
|
|
1379
1375
|
}
|
|
1380
|
-
function
|
|
1376
|
+
function nr(e) {
|
|
1381
1377
|
if (!e) return;
|
|
1382
1378
|
let { activeObject: t, activeComp: n } = x.app, { kind: r, nodeId: i, eventKey: a } = ot(e), o = t.nodes.find((e) => e.id === i);
|
|
1383
1379
|
if (!o) return;
|
|
@@ -1428,8 +1424,8 @@ function rr(e) {
|
|
|
1428
1424
|
};
|
|
1429
1425
|
}
|
|
1430
1426
|
}
|
|
1431
|
-
function
|
|
1432
|
-
let t = [], n =
|
|
1427
|
+
function rr(e) {
|
|
1428
|
+
let t = [], n = tr(e), r;
|
|
1433
1429
|
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([rt(i, a), e]);
|
|
1434
1430
|
return P(t);
|
|
1435
1431
|
}
|
|
@@ -1455,7 +1451,7 @@ function J(e) {
|
|
|
1455
1451
|
});
|
|
1456
1452
|
return t;
|
|
1457
1453
|
}
|
|
1458
|
-
function
|
|
1454
|
+
function ir(e) {
|
|
1459
1455
|
let t = !0;
|
|
1460
1456
|
switch (e) {
|
|
1461
1457
|
case "": break;
|
|
@@ -1481,7 +1477,7 @@ function ar(e) {
|
|
|
1481
1477
|
}
|
|
1482
1478
|
return t;
|
|
1483
1479
|
}
|
|
1484
|
-
function
|
|
1480
|
+
function ar(e) {
|
|
1485
1481
|
let { activeObject: t, activeComp: n, depends: r } = x.app, i = [], a = t.nodes.find((t) => t.id === e);
|
|
1486
1482
|
if (!a) return i;
|
|
1487
1483
|
let o = C(a.key);
|
|
@@ -1558,7 +1554,7 @@ function or(e) {
|
|
|
1558
1554
|
}
|
|
1559
1555
|
return i;
|
|
1560
1556
|
}
|
|
1561
|
-
function
|
|
1557
|
+
function or(e) {
|
|
1562
1558
|
if (!e) return;
|
|
1563
1559
|
let { activeObject: t, activeComp: n, depends: r } = x.app, { kind: i, nodeId: a, methodKey: o } = lt(e), s = t.nodes.find((e) => e.id === a);
|
|
1564
1560
|
if (!s) return;
|
|
@@ -1677,12 +1673,12 @@ function sr(e) {
|
|
|
1677
1673
|
}
|
|
1678
1674
|
}
|
|
1679
1675
|
}
|
|
1680
|
-
function
|
|
1681
|
-
let t = [], n =
|
|
1676
|
+
function sr(e) {
|
|
1677
|
+
let t = [], n = ar(e), r;
|
|
1682
1678
|
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([it(i, a), e]);
|
|
1683
1679
|
return P(t);
|
|
1684
1680
|
}
|
|
1685
|
-
function
|
|
1681
|
+
function cr(e) {
|
|
1686
1682
|
let t = !0;
|
|
1687
1683
|
switch (e) {
|
|
1688
1684
|
case "": break;
|
|
@@ -1708,7 +1704,7 @@ function lr(e) {
|
|
|
1708
1704
|
}
|
|
1709
1705
|
return t;
|
|
1710
1706
|
}
|
|
1711
|
-
function
|
|
1707
|
+
function lr(e) {
|
|
1712
1708
|
let { activeObject: t, activeComp: n } = x.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1713
1709
|
if (!i) return r;
|
|
1714
1710
|
let a = C(i.key);
|
|
@@ -1742,7 +1738,7 @@ function ur(e) {
|
|
|
1742
1738
|
});
|
|
1743
1739
|
return r;
|
|
1744
1740
|
}
|
|
1745
|
-
function
|
|
1741
|
+
function ur(e) {
|
|
1746
1742
|
if (!e) return;
|
|
1747
1743
|
let { activeObject: t, activeComp: n } = x.app, { kind: r, nodeId: i, methodKey: a } = lt(e), o = t.nodes.find((e) => e.id === i);
|
|
1748
1744
|
if (!o) return;
|
|
@@ -1796,27 +1792,27 @@ function dr(e) {
|
|
|
1796
1792
|
};
|
|
1797
1793
|
}
|
|
1798
1794
|
}
|
|
1799
|
-
function
|
|
1800
|
-
let t = [], n =
|
|
1795
|
+
function dr(e) {
|
|
1796
|
+
let t = [], n = lr(e), r;
|
|
1801
1797
|
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([it(i, a), e]);
|
|
1802
1798
|
return P(t);
|
|
1803
1799
|
}
|
|
1804
|
-
function
|
|
1805
|
-
let t =
|
|
1800
|
+
function fr(e) {
|
|
1801
|
+
let t = ur(e);
|
|
1806
1802
|
return t ? t.outputs : [];
|
|
1807
1803
|
}
|
|
1808
|
-
function
|
|
1809
|
-
let n =
|
|
1804
|
+
function pr(e, t) {
|
|
1805
|
+
let n = ur(e);
|
|
1810
1806
|
if (n) return n.outputs?.find((e) => e.key === t);
|
|
1811
1807
|
}
|
|
1812
|
-
function
|
|
1813
|
-
let t = [], n =
|
|
1808
|
+
function mr(e) {
|
|
1809
|
+
let t = [], n = fr(e);
|
|
1814
1810
|
if (n) for (let { name: e, key: r } of n) t.push([e, r]);
|
|
1815
1811
|
return P(t);
|
|
1816
1812
|
}
|
|
1817
1813
|
//#endregion
|
|
1818
1814
|
//#region src/core/utils/app/page.ts
|
|
1819
|
-
function
|
|
1815
|
+
function hr(e) {
|
|
1820
1816
|
let { appList: t } = x.app, n = [], r = t.find((t) => t.id === e);
|
|
1821
1817
|
if (!r) return n;
|
|
1822
1818
|
for (let { id: e, name: t } of r.pages) n.push({
|
|
@@ -1825,7 +1821,7 @@ function gr(e) {
|
|
|
1825
1821
|
});
|
|
1826
1822
|
return n;
|
|
1827
1823
|
}
|
|
1828
|
-
function
|
|
1824
|
+
function gr(e, t) {
|
|
1829
1825
|
let { appList: n } = x.app, r = n.find((t) => t.id === e);
|
|
1830
1826
|
if (!r) return;
|
|
1831
1827
|
let i = r.pages.find((e) => e.id === t);
|
|
@@ -1834,15 +1830,15 @@ function _r(e, t) {
|
|
|
1834
1830
|
name: i.name
|
|
1835
1831
|
};
|
|
1836
1832
|
}
|
|
1837
|
-
function
|
|
1833
|
+
function _r(e) {
|
|
1838
1834
|
let t = [];
|
|
1839
|
-
return
|
|
1835
|
+
return hr(e).forEach(({ id: e, name: n }) => {
|
|
1840
1836
|
t.push([n, e]);
|
|
1841
1837
|
}), P(t);
|
|
1842
1838
|
}
|
|
1843
1839
|
//#endregion
|
|
1844
1840
|
//#region src/core/utils/app/property.ts
|
|
1845
|
-
function
|
|
1841
|
+
function vr(e, t) {
|
|
1846
1842
|
let { activeObject: n, activeComp: r, depends: i } = x.app, a = [], o = He(n.type, n.subtype), s = n.nodes.find((t) => t.id === e);
|
|
1847
1843
|
if (!s) return a;
|
|
1848
1844
|
let c = C(s.key);
|
|
@@ -1934,7 +1930,7 @@ function yr(e, t) {
|
|
|
1934
1930
|
}
|
|
1935
1931
|
return a;
|
|
1936
1932
|
}
|
|
1937
|
-
function
|
|
1933
|
+
function yr(e) {
|
|
1938
1934
|
if (!e) return;
|
|
1939
1935
|
let { activeObject: t, activeComp: n, depends: r } = x.app, i = He(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } = ft(e), c = t.nodes.find((e) => e.id === o);
|
|
1940
1936
|
if (!c) return;
|
|
@@ -2070,14 +2066,14 @@ function br(e) {
|
|
|
2070
2066
|
}
|
|
2071
2067
|
}
|
|
2072
2068
|
}
|
|
2073
|
-
function
|
|
2074
|
-
let n = [], r =
|
|
2069
|
+
function br(e, t) {
|
|
2070
|
+
let n = [], r = vr(e, t), i;
|
|
2075
2071
|
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([at(t, a), e]);
|
|
2076
2072
|
return P(n);
|
|
2077
2073
|
}
|
|
2078
2074
|
//#endregion
|
|
2079
2075
|
//#region src/core/utils/app/slot.ts
|
|
2080
|
-
function
|
|
2076
|
+
function xr() {
|
|
2081
2077
|
let { activeObject: e, activeComp: t } = x.app, n = [{
|
|
2082
2078
|
id: "",
|
|
2083
2079
|
name: ""
|
|
@@ -2089,7 +2085,7 @@ function Sr() {
|
|
|
2089
2085
|
});
|
|
2090
2086
|
return n;
|
|
2091
2087
|
}
|
|
2092
|
-
function
|
|
2088
|
+
function Sr(e) {
|
|
2093
2089
|
let { activeObject: t, activeComp: n } = x.app;
|
|
2094
2090
|
if (t.type !== "comp" || !n.meta.slots) return;
|
|
2095
2091
|
if (!e) return {
|
|
@@ -2102,8 +2098,8 @@ function Cr(e) {
|
|
|
2102
2098
|
name: r.name
|
|
2103
2099
|
};
|
|
2104
2100
|
}
|
|
2105
|
-
function
|
|
2106
|
-
let { i18n: e } = Me, t = [], n =
|
|
2101
|
+
function Cr() {
|
|
2102
|
+
let { i18n: e } = Me, t = [], n = xr();
|
|
2107
2103
|
for (let { id: r, name: i } of n) {
|
|
2108
2104
|
let n = i;
|
|
2109
2105
|
r === "" && (n = e.global.t("x-runtime-lib.notSet")), t.push([n, r]);
|
|
@@ -2140,16 +2136,16 @@ v.app_bind_entry_v1 = {
|
|
|
2140
2136
|
}, 0);
|
|
2141
2137
|
},
|
|
2142
2138
|
genKindOpts_: function() {
|
|
2143
|
-
return
|
|
2139
|
+
return qn();
|
|
2144
2140
|
},
|
|
2145
2141
|
genNodeOpts_: function() {
|
|
2146
|
-
return this.kind === "property" ?
|
|
2142
|
+
return this.kind === "property" ? Hn("setProperty") : P([]);
|
|
2147
2143
|
},
|
|
2148
2144
|
genPropertyOpts_: function() {
|
|
2149
|
-
return this.kind === "property" ?
|
|
2145
|
+
return this.kind === "property" ? br(this.node.id, "write") : P([]);
|
|
2150
2146
|
},
|
|
2151
2147
|
genStateOpts_: function() {
|
|
2152
|
-
return this.kind === "state" ?
|
|
2148
|
+
return this.kind === "state" ? Gn() : P([]);
|
|
2153
2149
|
},
|
|
2154
2150
|
onchange: function(e) {
|
|
2155
2151
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -2165,14 +2161,14 @@ v.app_bind_entry_v1 = {
|
|
|
2165
2161
|
else if (this.kind === "property") {
|
|
2166
2162
|
let e = this.getField("NODE");
|
|
2167
2163
|
if (e.getOptions(!1), t) {
|
|
2168
|
-
let t =
|
|
2164
|
+
let t = Vn("setProperty")?.[0];
|
|
2169
2165
|
e.setValue(t?.id ?? "");
|
|
2170
2166
|
}
|
|
2171
2167
|
this.onNodeChange_(e.getValue());
|
|
2172
2168
|
} else if (this.kind === "state") {
|
|
2173
2169
|
let e = this.getField("STATE");
|
|
2174
2170
|
if (e.getOptions(!1), t) {
|
|
2175
|
-
let t =
|
|
2171
|
+
let t = Un()?.[0];
|
|
2176
2172
|
e.setValue(t?.id ?? "");
|
|
2177
2173
|
}
|
|
2178
2174
|
this.onStateChange_(e.getValue());
|
|
@@ -2188,13 +2184,13 @@ v.app_bind_entry_v1 = {
|
|
|
2188
2184
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2189
2185
|
let r = this.getField("PROPERTY");
|
|
2190
2186
|
if (r.getOptions(!1), n) {
|
|
2191
|
-
let e =
|
|
2187
|
+
let e = vr(this.node.id, "write")?.[0];
|
|
2192
2188
|
r.setValue(e?.id ?? "");
|
|
2193
2189
|
}
|
|
2194
2190
|
this.onPropertyChange_(r.getValue());
|
|
2195
2191
|
},
|
|
2196
2192
|
onPropertyChange_: function(e) {
|
|
2197
|
-
let t =
|
|
2193
|
+
let t = yr(e);
|
|
2198
2194
|
if (!t) {
|
|
2199
2195
|
console.assert(!1);
|
|
2200
2196
|
return;
|
|
@@ -2202,7 +2198,7 @@ v.app_bind_entry_v1 = {
|
|
|
2202
2198
|
this.property.id = t.id, this.property.kind = t.kind, this.property.names = t.names, this.updateShape_();
|
|
2203
2199
|
},
|
|
2204
2200
|
onStateChange_: function(e) {
|
|
2205
|
-
let t =
|
|
2201
|
+
let t = Wn(e);
|
|
2206
2202
|
if (!t) {
|
|
2207
2203
|
console.assert(!1);
|
|
2208
2204
|
return;
|
|
@@ -2226,7 +2222,7 @@ v.app_bind_entry_v1 = {
|
|
|
2226
2222
|
return;
|
|
2227
2223
|
}
|
|
2228
2224
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2229
|
-
let t =
|
|
2225
|
+
let t = yr(this.property.id);
|
|
2230
2226
|
if (!t) {
|
|
2231
2227
|
this.setWarningText(N("WARN_PROPERTY_NOT_FOUND"));
|
|
2232
2228
|
return;
|
|
@@ -2237,7 +2233,7 @@ v.app_bind_entry_v1 = {
|
|
|
2237
2233
|
}
|
|
2238
2234
|
_(t.names, this.property.names) || (this.property.names = t.names);
|
|
2239
2235
|
} else if (this.kind === "state") {
|
|
2240
|
-
let e =
|
|
2236
|
+
let e = Wn(this.state.id);
|
|
2241
2237
|
if (!e) {
|
|
2242
2238
|
this.setWarningText(N("WARN_STATE_NOT_FOUND"));
|
|
2243
2239
|
return;
|
|
@@ -2254,7 +2250,7 @@ v.app_bind_entry_v1 = {
|
|
|
2254
2250
|
};
|
|
2255
2251
|
//#endregion
|
|
2256
2252
|
//#region src/core/blocks/app/event/appBind/v1/index.ts
|
|
2257
|
-
var
|
|
2253
|
+
var wr = p.xml;
|
|
2258
2254
|
v.app_bind_container_v1 = { init: function() {
|
|
2259
2255
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
2260
2256
|
} }, v.app_bind_item_v1 = { init: function() {
|
|
@@ -2266,7 +2262,7 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2266
2262
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}");
|
|
2267
2263
|
},
|
|
2268
2264
|
mutationToDom: function() {
|
|
2269
|
-
let e =
|
|
2265
|
+
let e = wr.createElement("mutation");
|
|
2270
2266
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
2271
2267
|
},
|
|
2272
2268
|
domToMutation: function(e) {
|
|
@@ -2333,7 +2329,7 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2333
2329
|
for (let e = this.itemCount_; this.getInput("ADD" + e); e++) this.removeInput("ADD" + e);
|
|
2334
2330
|
},
|
|
2335
2331
|
updateShadow_: function() {
|
|
2336
|
-
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(
|
|
2332
|
+
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(Sn());
|
|
2337
2333
|
},
|
|
2338
2334
|
checkWarning_: function() {
|
|
2339
2335
|
let e;
|
|
@@ -2342,10 +2338,10 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2342
2338
|
if (!n) continue;
|
|
2343
2339
|
let r;
|
|
2344
2340
|
if (n.kind === "property") {
|
|
2345
|
-
let e =
|
|
2341
|
+
let e = yr(n.property.id);
|
|
2346
2342
|
e && (r = e.meta.element ? on(e.meta.raw) : B(e.meta.raw.type));
|
|
2347
2343
|
} else if (n.kind === "state") {
|
|
2348
|
-
let e =
|
|
2344
|
+
let e = Wn(n.state.id);
|
|
2349
2345
|
e && (r = B(e.type));
|
|
2350
2346
|
}
|
|
2351
2347
|
if (r && (e ||= r, r !== e)) {
|
|
@@ -2371,12 +2367,12 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2371
2367
|
},
|
|
2372
2368
|
initData_: function() {
|
|
2373
2369
|
if (this.node.id) return;
|
|
2374
|
-
let e =
|
|
2370
|
+
let e = Vn("onEvent")?.[0];
|
|
2375
2371
|
if (!e) return;
|
|
2376
2372
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2377
2373
|
let t = this.getField("NODE");
|
|
2378
2374
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2379
|
-
let n =
|
|
2375
|
+
let n = Qn(this.node.id)?.[0];
|
|
2380
2376
|
if (!n) return;
|
|
2381
2377
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2382
2378
|
let r = this.getField("EVENT");
|
|
@@ -2394,10 +2390,10 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2394
2390
|
}, 0);
|
|
2395
2391
|
},
|
|
2396
2392
|
genNodeOpts_: function() {
|
|
2397
|
-
return
|
|
2393
|
+
return Hn("onEvent");
|
|
2398
2394
|
},
|
|
2399
2395
|
genEventOpts_: function() {
|
|
2400
|
-
return
|
|
2396
|
+
return er(this.node.id);
|
|
2401
2397
|
},
|
|
2402
2398
|
onchange: function(e) {
|
|
2403
2399
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -2417,13 +2413,13 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2417
2413
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2418
2414
|
let r = this.getField("EVENT");
|
|
2419
2415
|
if (r.getOptions(!1), n) {
|
|
2420
|
-
let e =
|
|
2416
|
+
let e = Qn(this.node.id)?.[0];
|
|
2421
2417
|
r.setValue(e?.id ?? "");
|
|
2422
2418
|
}
|
|
2423
2419
|
this.onEventChange_(r.getValue());
|
|
2424
2420
|
},
|
|
2425
2421
|
onEventChange_: function(e) {
|
|
2426
|
-
let t =
|
|
2422
|
+
let t = $n(e);
|
|
2427
2423
|
if (!t) {
|
|
2428
2424
|
console.assert(!1);
|
|
2429
2425
|
return;
|
|
@@ -2460,7 +2456,7 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2460
2456
|
"x-runtime-lib.instance",
|
|
2461
2457
|
!0
|
|
2462
2458
|
]);
|
|
2463
|
-
let t =
|
|
2459
|
+
let t = Zn(this.event.kind);
|
|
2464
2460
|
if (this.event.params) for (let n = 0; n < this.event.params.length; n++) {
|
|
2465
2461
|
let { key: r, name: i } = this.event.params[n];
|
|
2466
2462
|
e.push([
|
|
@@ -2483,7 +2479,7 @@ v.app_bind_container_v1 = { init: function() {
|
|
|
2483
2479
|
return;
|
|
2484
2480
|
}
|
|
2485
2481
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2486
|
-
let t =
|
|
2482
|
+
let t = $n(this.event.id);
|
|
2487
2483
|
if (!t) {
|
|
2488
2484
|
this.setWarningText(N("WARN_EVENT_NOT_FOUND"));
|
|
2489
2485
|
return;
|
|
@@ -2526,12 +2522,12 @@ ${ze(r, 4)}${ze(i, 2)} } catch (e) {
|
|
|
2526
2522
|
},
|
|
2527
2523
|
initData_: function() {
|
|
2528
2524
|
if (this.node.id) return;
|
|
2529
|
-
let e =
|
|
2525
|
+
let e = Vn("triggerEvent")?.[0];
|
|
2530
2526
|
if (!e) return;
|
|
2531
2527
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2532
2528
|
let t = this.getField("NODE");
|
|
2533
2529
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2534
|
-
let n =
|
|
2530
|
+
let n = tr(this.node.id)?.[0];
|
|
2535
2531
|
if (!n) return;
|
|
2536
2532
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2537
2533
|
let r = this.getField("EVENT");
|
|
@@ -2549,10 +2545,10 @@ ${ze(r, 4)}${ze(i, 2)} } catch (e) {
|
|
|
2549
2545
|
}, 0);
|
|
2550
2546
|
},
|
|
2551
2547
|
genNodeOpts_: function() {
|
|
2552
|
-
return
|
|
2548
|
+
return Hn("triggerEvent");
|
|
2553
2549
|
},
|
|
2554
2550
|
genEventOpts_: function() {
|
|
2555
|
-
return
|
|
2551
|
+
return rr(this.node.id);
|
|
2556
2552
|
},
|
|
2557
2553
|
onchange: function(e) {
|
|
2558
2554
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -2572,13 +2568,13 @@ ${ze(r, 4)}${ze(i, 2)} } catch (e) {
|
|
|
2572
2568
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2573
2569
|
let r = this.getField("EVENT");
|
|
2574
2570
|
if (r.getOptions(!1), n) {
|
|
2575
|
-
let e =
|
|
2571
|
+
let e = tr(this.node.id)?.[0];
|
|
2576
2572
|
r.setValue(e?.id ?? "");
|
|
2577
2573
|
}
|
|
2578
2574
|
this.onEventChange_(r.getValue());
|
|
2579
2575
|
},
|
|
2580
2576
|
onEventChange_: function(e) {
|
|
2581
|
-
let t =
|
|
2577
|
+
let t = nr(e);
|
|
2582
2578
|
if (!t) {
|
|
2583
2579
|
console.assert(!1);
|
|
2584
2580
|
return;
|
|
@@ -2635,7 +2631,7 @@ ${ze(r, 4)}${ze(i, 2)} } catch (e) {
|
|
|
2635
2631
|
return;
|
|
2636
2632
|
}
|
|
2637
2633
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2638
|
-
let t =
|
|
2634
|
+
let t = nr(this.event.id);
|
|
2639
2635
|
if (!t) {
|
|
2640
2636
|
this.setWarningText(N("WARN_EVENT_NOT_FOUND"));
|
|
2641
2637
|
return;
|
|
@@ -2796,12 +2792,12 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
2796
2792
|
},
|
|
2797
2793
|
initData_: function() {
|
|
2798
2794
|
if (this.node.id) return;
|
|
2799
|
-
let e =
|
|
2795
|
+
let e = Vn("callMethod")?.[0];
|
|
2800
2796
|
if (!e) return;
|
|
2801
2797
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2802
2798
|
let t = this.getField("NODE");
|
|
2803
2799
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2804
|
-
let n =
|
|
2800
|
+
let n = ar(this.node.id)?.[0];
|
|
2805
2801
|
if (!n) return;
|
|
2806
2802
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
2807
2803
|
let r = this.getField("METHOD");
|
|
@@ -2819,10 +2815,10 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
2819
2815
|
}, 0);
|
|
2820
2816
|
},
|
|
2821
2817
|
genNodeOpts_: function() {
|
|
2822
|
-
return
|
|
2818
|
+
return Hn("callMethod");
|
|
2823
2819
|
},
|
|
2824
2820
|
genMethodOpts_: function() {
|
|
2825
|
-
return
|
|
2821
|
+
return sr(this.node.id);
|
|
2826
2822
|
},
|
|
2827
2823
|
onchange: function(e) {
|
|
2828
2824
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -2842,13 +2838,13 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
2842
2838
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2843
2839
|
let r = this.getField("METHOD");
|
|
2844
2840
|
if (r.getOptions(!1), n) {
|
|
2845
|
-
let e =
|
|
2841
|
+
let e = ar(this.node.id)?.[0];
|
|
2846
2842
|
r.setValue(e?.id ?? "");
|
|
2847
2843
|
}
|
|
2848
2844
|
this.onMethodChange_(r.getValue());
|
|
2849
2845
|
},
|
|
2850
2846
|
onMethodChange_: function(e) {
|
|
2851
|
-
let t =
|
|
2847
|
+
let t = or(e);
|
|
2852
2848
|
if (!t) {
|
|
2853
2849
|
console.assert(!1);
|
|
2854
2850
|
return;
|
|
@@ -2904,7 +2900,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
2904
2900
|
},
|
|
2905
2901
|
ensureBlocks_: function() {
|
|
2906
2902
|
if (this.isInsertionMarker()) return;
|
|
2907
|
-
let e = [], t =
|
|
2903
|
+
let e = [], t = ir(this.method.kind);
|
|
2908
2904
|
if (this.method.outputs) for (let n = 0; n < this.method.outputs.length; n++) {
|
|
2909
2905
|
let { key: r, name: i } = this.method.outputs[n];
|
|
2910
2906
|
e.push([
|
|
@@ -2927,7 +2923,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
2927
2923
|
return;
|
|
2928
2924
|
}
|
|
2929
2925
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2930
|
-
let t =
|
|
2926
|
+
let t = or(this.method.id);
|
|
2931
2927
|
if (!t) {
|
|
2932
2928
|
this.setWarningText(N("WARN_METHOD_NOT_FOUND"));
|
|
2933
2929
|
return;
|
|
@@ -3008,12 +3004,12 @@ ${o}${e}}
|
|
|
3008
3004
|
},
|
|
3009
3005
|
initData_: function() {
|
|
3010
3006
|
if (this.node.id) return;
|
|
3011
|
-
let e =
|
|
3007
|
+
let e = Vn("implementMethod")?.[0];
|
|
3012
3008
|
if (!e) return;
|
|
3013
3009
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3014
3010
|
let t = this.getField("NODE");
|
|
3015
3011
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3016
|
-
let n =
|
|
3012
|
+
let n = lr(this.node.id)?.[0];
|
|
3017
3013
|
if (!n) return;
|
|
3018
3014
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs;
|
|
3019
3015
|
let r = this.getField("METHOD");
|
|
@@ -3031,10 +3027,10 @@ ${o}${e}}
|
|
|
3031
3027
|
}, 0);
|
|
3032
3028
|
},
|
|
3033
3029
|
genNodeOpts_: function() {
|
|
3034
|
-
return
|
|
3030
|
+
return Hn("implementMethod");
|
|
3035
3031
|
},
|
|
3036
3032
|
genMethodOpts_: function() {
|
|
3037
|
-
return
|
|
3033
|
+
return dr(this.node.id);
|
|
3038
3034
|
},
|
|
3039
3035
|
onchange: function(e) {
|
|
3040
3036
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3054,13 +3050,13 @@ ${o}${e}}
|
|
|
3054
3050
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3055
3051
|
let r = this.getField("METHOD");
|
|
3056
3052
|
if (r.getOptions(!1), n) {
|
|
3057
|
-
let e =
|
|
3053
|
+
let e = lr(this.node.id)?.[0];
|
|
3058
3054
|
r.setValue(e?.id ?? "");
|
|
3059
3055
|
}
|
|
3060
3056
|
r.setValue(r.getValue());
|
|
3061
3057
|
},
|
|
3062
3058
|
onMethodChange_: function(e) {
|
|
3063
|
-
let t =
|
|
3059
|
+
let t = ur(e);
|
|
3064
3060
|
if (!t) {
|
|
3065
3061
|
console.assert(!1);
|
|
3066
3062
|
return;
|
|
@@ -3094,7 +3090,7 @@ ${o}${e}}
|
|
|
3094
3090
|
"x-runtime-lib.instance",
|
|
3095
3091
|
!0
|
|
3096
3092
|
]);
|
|
3097
|
-
let t =
|
|
3093
|
+
let t = cr(this.method.kind);
|
|
3098
3094
|
if (this.method.inputs) for (let n = 0; n < this.method.inputs.length; n++) {
|
|
3099
3095
|
let { key: r, name: i } = this.method.inputs[n];
|
|
3100
3096
|
e.push([
|
|
@@ -3117,7 +3113,7 @@ ${o}${e}}
|
|
|
3117
3113
|
return;
|
|
3118
3114
|
}
|
|
3119
3115
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3120
|
-
let t =
|
|
3116
|
+
let t = ur(this.method.id);
|
|
3121
3117
|
if (!t) {
|
|
3122
3118
|
this.setWarningText(N("WARN_METHOD_NOT_FOUND"));
|
|
3123
3119
|
return;
|
|
@@ -3159,17 +3155,17 @@ ${c}${t}return __outputs__;
|
|
|
3159
3155
|
},
|
|
3160
3156
|
initData_: function() {
|
|
3161
3157
|
if (this.node.id) return;
|
|
3162
|
-
let e =
|
|
3158
|
+
let e = Vn("implementMethod")?.[0];
|
|
3163
3159
|
if (!e) return;
|
|
3164
3160
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3165
3161
|
let t = this.getField("NODE");
|
|
3166
3162
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3167
|
-
let n =
|
|
3163
|
+
let n = lr(this.node.id)?.[0];
|
|
3168
3164
|
if (!n) return;
|
|
3169
3165
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names;
|
|
3170
3166
|
let r = this.getField("METHOD");
|
|
3171
3167
|
r.getOptions(!1), r.setValue(this.method.id);
|
|
3172
|
-
let i =
|
|
3168
|
+
let i = fr(this.method.id)?.[0];
|
|
3173
3169
|
if (!i) return;
|
|
3174
3170
|
this.output.key = i.key, this.output.name = i.name, this.output.type = i.type;
|
|
3175
3171
|
let a = this.getField("OUTPUT");
|
|
@@ -3188,13 +3184,13 @@ ${c}${t}return __outputs__;
|
|
|
3188
3184
|
}, 0);
|
|
3189
3185
|
},
|
|
3190
3186
|
genNodeOpts_: function() {
|
|
3191
|
-
return
|
|
3187
|
+
return Hn("implementMethod");
|
|
3192
3188
|
},
|
|
3193
3189
|
genMethodOpts_: function() {
|
|
3194
|
-
return
|
|
3190
|
+
return dr(this.node.id);
|
|
3195
3191
|
},
|
|
3196
3192
|
genOutputOpts_: function() {
|
|
3197
|
-
return
|
|
3193
|
+
return mr(this.method.id);
|
|
3198
3194
|
},
|
|
3199
3195
|
onchange: function(e) {
|
|
3200
3196
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3214,13 +3210,13 @@ ${c}${t}return __outputs__;
|
|
|
3214
3210
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3215
3211
|
let r = this.getField("METHOD");
|
|
3216
3212
|
if (r.getOptions(!1), n) {
|
|
3217
|
-
let e =
|
|
3213
|
+
let e = lr(this.node.id)?.[0];
|
|
3218
3214
|
r.setValue(e?.id ?? "");
|
|
3219
3215
|
}
|
|
3220
3216
|
r.setValue(r.getValue());
|
|
3221
3217
|
},
|
|
3222
3218
|
onMethodChange_: function(e) {
|
|
3223
|
-
let t =
|
|
3219
|
+
let t = ur(e);
|
|
3224
3220
|
if (!t) {
|
|
3225
3221
|
console.assert(!1);
|
|
3226
3222
|
return;
|
|
@@ -3228,14 +3224,14 @@ ${c}${t}return __outputs__;
|
|
|
3228
3224
|
let n = this.method.id !== t.id;
|
|
3229
3225
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
3230
3226
|
let r = this.getField("OUTPUT");
|
|
3231
|
-
if (r.getOptions(!1), n || !
|
|
3232
|
-
let e =
|
|
3227
|
+
if (r.getOptions(!1), n || !pr(this.method.id, this.output.key)) {
|
|
3228
|
+
let e = fr(this.method.id)?.[0];
|
|
3233
3229
|
r.setValue(e?.key ?? "");
|
|
3234
3230
|
}
|
|
3235
3231
|
this.onOutputChange_(r.getValue());
|
|
3236
3232
|
},
|
|
3237
3233
|
onOutputChange_: function(e) {
|
|
3238
|
-
let t =
|
|
3234
|
+
let t = pr(this.method.id, e);
|
|
3239
3235
|
if (!t) {
|
|
3240
3236
|
console.assert(!1);
|
|
3241
3237
|
return;
|
|
@@ -3266,7 +3262,7 @@ ${c}${t}return __outputs__;
|
|
|
3266
3262
|
return;
|
|
3267
3263
|
}
|
|
3268
3264
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3269
|
-
let t =
|
|
3265
|
+
let t = ur(this.method.id);
|
|
3270
3266
|
if (!t) {
|
|
3271
3267
|
this.setWarningText(N("WARN_METHOD_NOT_FOUND"));
|
|
3272
3268
|
return;
|
|
@@ -3276,7 +3272,7 @@ ${c}${t}return __outputs__;
|
|
|
3276
3272
|
return;
|
|
3277
3273
|
}
|
|
3278
3274
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
3279
|
-
let n =
|
|
3275
|
+
let n = pr(this.method.id, this.output.key);
|
|
3280
3276
|
if (!n) {
|
|
3281
3277
|
this.setWarningText(N("WARN_OUTPUT_NOT_FOUND"));
|
|
3282
3278
|
return;
|
|
@@ -3334,12 +3330,12 @@ ${c}${t}return __outputs__;
|
|
|
3334
3330
|
},
|
|
3335
3331
|
initData_: function() {
|
|
3336
3332
|
if (this.app.id) return;
|
|
3337
|
-
let e =
|
|
3333
|
+
let e = An()?.[0];
|
|
3338
3334
|
if (!e) return;
|
|
3339
3335
|
this.app.id = e.id, this.app.name = e.name;
|
|
3340
3336
|
let t = this.getField("APP");
|
|
3341
3337
|
t.getOptions(!1), t.setValue(this.app.id);
|
|
3342
|
-
let n =
|
|
3338
|
+
let n = hr(this.app.id)?.[0];
|
|
3343
3339
|
if (!n) return;
|
|
3344
3340
|
this.page.id = n.id, this.page.name = n.name;
|
|
3345
3341
|
let r = this.getField("PAGE");
|
|
@@ -3357,10 +3353,10 @@ ${c}${t}return __outputs__;
|
|
|
3357
3353
|
}, 0);
|
|
3358
3354
|
},
|
|
3359
3355
|
genAppOpts_: function() {
|
|
3360
|
-
return
|
|
3356
|
+
return Mn();
|
|
3361
3357
|
},
|
|
3362
3358
|
genPageOpts_: function() {
|
|
3363
|
-
return
|
|
3359
|
+
return _r(this.app.id);
|
|
3364
3360
|
},
|
|
3365
3361
|
onchange: function(e) {
|
|
3366
3362
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3371,7 +3367,7 @@ ${c}${t}return __outputs__;
|
|
|
3371
3367
|
}
|
|
3372
3368
|
},
|
|
3373
3369
|
onAppChange_: function(e) {
|
|
3374
|
-
let t =
|
|
3370
|
+
let t = jn(e);
|
|
3375
3371
|
if (!t) {
|
|
3376
3372
|
console.assert(!1);
|
|
3377
3373
|
return;
|
|
@@ -3380,13 +3376,13 @@ ${c}${t}return __outputs__;
|
|
|
3380
3376
|
this.app.id = t.id, this.app.name = t.name;
|
|
3381
3377
|
let r = this.getField("PAGE");
|
|
3382
3378
|
if (r.getOptions(!1), n) {
|
|
3383
|
-
let e =
|
|
3379
|
+
let e = hr(this.app.id)?.[0];
|
|
3384
3380
|
r.setValue(e?.id ?? "");
|
|
3385
3381
|
}
|
|
3386
3382
|
this.onPageChange_(r.getValue());
|
|
3387
3383
|
},
|
|
3388
3384
|
onPageChange_: function(e) {
|
|
3389
|
-
let t =
|
|
3385
|
+
let t = gr(this.app.id, e);
|
|
3390
3386
|
if (!t) {
|
|
3391
3387
|
console.assert(!1);
|
|
3392
3388
|
return;
|
|
@@ -3394,13 +3390,13 @@ ${c}${t}return __outputs__;
|
|
|
3394
3390
|
this.page.id = t.id, this.page.name = t.name;
|
|
3395
3391
|
},
|
|
3396
3392
|
checkWarning_: function() {
|
|
3397
|
-
let e =
|
|
3393
|
+
let e = jn(this.app.id);
|
|
3398
3394
|
if (!e) {
|
|
3399
3395
|
this.setWarningText(N("WARN_APP_NOT_FOUND"));
|
|
3400
3396
|
return;
|
|
3401
3397
|
}
|
|
3402
3398
|
e.name !== this.app.name && (this.app.name = e.name);
|
|
3403
|
-
let t =
|
|
3399
|
+
let t = gr(this.app.id, this.page.id);
|
|
3404
3400
|
if (!t) {
|
|
3405
3401
|
this.setWarningText(N("WARN_PAGE_NOT_FOUND"));
|
|
3406
3402
|
return;
|
|
@@ -3419,7 +3415,7 @@ ${c}${t}return __outputs__;
|
|
|
3419
3415
|
},
|
|
3420
3416
|
initData_: function() {
|
|
3421
3417
|
if (this.comp.id) return;
|
|
3422
|
-
let e =
|
|
3418
|
+
let e = Jn()?.[0];
|
|
3423
3419
|
if (!e) return;
|
|
3424
3420
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3425
3421
|
let t = this.getField("COMP");
|
|
@@ -3434,7 +3430,7 @@ ${c}${t}return __outputs__;
|
|
|
3434
3430
|
}, 0);
|
|
3435
3431
|
},
|
|
3436
3432
|
genCompOpts_: function() {
|
|
3437
|
-
return
|
|
3433
|
+
return Xn();
|
|
3438
3434
|
},
|
|
3439
3435
|
onchange: function(e) {
|
|
3440
3436
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3445,7 +3441,7 @@ ${c}${t}return __outputs__;
|
|
|
3445
3441
|
}
|
|
3446
3442
|
},
|
|
3447
3443
|
onCompChange_: function(e) {
|
|
3448
|
-
let t =
|
|
3444
|
+
let t = Yn(e);
|
|
3449
3445
|
if (!t) {
|
|
3450
3446
|
console.assert(!1);
|
|
3451
3447
|
return;
|
|
@@ -3453,7 +3449,7 @@ ${c}${t}return __outputs__;
|
|
|
3453
3449
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
3454
3450
|
},
|
|
3455
3451
|
checkWarning_: function() {
|
|
3456
|
-
let e =
|
|
3452
|
+
let e = Yn(this.comp.id);
|
|
3457
3453
|
if (!e) {
|
|
3458
3454
|
this.setWarningText(N("WARN_COMP_NOT_FOUND"));
|
|
3459
3455
|
return;
|
|
@@ -3472,7 +3468,7 @@ ${c}${t}return __outputs__;
|
|
|
3472
3468
|
},
|
|
3473
3469
|
initData_: function() {
|
|
3474
3470
|
if (this.slot.id) return;
|
|
3475
|
-
let e =
|
|
3471
|
+
let e = xr()?.[0];
|
|
3476
3472
|
if (!e) return;
|
|
3477
3473
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3478
3474
|
let t = this.getField("SLOT");
|
|
@@ -3487,7 +3483,7 @@ ${c}${t}return __outputs__;
|
|
|
3487
3483
|
}, 0);
|
|
3488
3484
|
},
|
|
3489
3485
|
genSlotOpts_: function() {
|
|
3490
|
-
return
|
|
3486
|
+
return Cr();
|
|
3491
3487
|
},
|
|
3492
3488
|
onchange: function(e) {
|
|
3493
3489
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3498,7 +3494,7 @@ ${c}${t}return __outputs__;
|
|
|
3498
3494
|
}
|
|
3499
3495
|
},
|
|
3500
3496
|
onSlotChange_: function(e) {
|
|
3501
|
-
let t =
|
|
3497
|
+
let t = Sr(e);
|
|
3502
3498
|
if (!t) {
|
|
3503
3499
|
console.assert(!1);
|
|
3504
3500
|
return;
|
|
@@ -3506,7 +3502,7 @@ ${c}${t}return __outputs__;
|
|
|
3506
3502
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
3507
3503
|
},
|
|
3508
3504
|
checkWarning_: function() {
|
|
3509
|
-
let e =
|
|
3505
|
+
let e = Sr(this.slot.id);
|
|
3510
3506
|
if (!e) {
|
|
3511
3507
|
this.setWarningText(N("WARN_SLOT_NOT_FOUND"));
|
|
3512
3508
|
return;
|
|
@@ -3530,12 +3526,12 @@ ${c}${t}return __outputs__;
|
|
|
3530
3526
|
},
|
|
3531
3527
|
initData_: function() {
|
|
3532
3528
|
if (this.node.id) return;
|
|
3533
|
-
let e =
|
|
3529
|
+
let e = Vn("getProperty")?.[0];
|
|
3534
3530
|
if (!e) return;
|
|
3535
3531
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3536
3532
|
let t = this.getField("NODE");
|
|
3537
3533
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3538
|
-
let n =
|
|
3534
|
+
let n = vr(this.node.id, "read")?.[0];
|
|
3539
3535
|
if (!n) return;
|
|
3540
3536
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3541
3537
|
let r = this.getField("PROPERTY");
|
|
@@ -3553,10 +3549,10 @@ ${c}${t}return __outputs__;
|
|
|
3553
3549
|
}, 0);
|
|
3554
3550
|
},
|
|
3555
3551
|
genNodeOpts_: function() {
|
|
3556
|
-
return
|
|
3552
|
+
return Hn("getProperty");
|
|
3557
3553
|
},
|
|
3558
3554
|
genPropertyOpts_: function() {
|
|
3559
|
-
return
|
|
3555
|
+
return br(this.node.id, "read");
|
|
3560
3556
|
},
|
|
3561
3557
|
onchange: function(e) {
|
|
3562
3558
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3576,13 +3572,13 @@ ${c}${t}return __outputs__;
|
|
|
3576
3572
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3577
3573
|
let r = this.getField("PROPERTY");
|
|
3578
3574
|
if (r.getOptions(!1), n) {
|
|
3579
|
-
let e =
|
|
3575
|
+
let e = vr(this.node.id, "read")?.[0];
|
|
3580
3576
|
r.setValue(e?.id ?? "");
|
|
3581
3577
|
}
|
|
3582
3578
|
this.onPropertyChange_(r.getValue());
|
|
3583
3579
|
},
|
|
3584
3580
|
onPropertyChange_: function(e) {
|
|
3585
|
-
let t =
|
|
3581
|
+
let t = yr(e);
|
|
3586
3582
|
if (!t) {
|
|
3587
3583
|
console.assert(!1);
|
|
3588
3584
|
return;
|
|
@@ -3621,7 +3617,7 @@ ${c}${t}return __outputs__;
|
|
|
3621
3617
|
return;
|
|
3622
3618
|
}
|
|
3623
3619
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3624
|
-
let t =
|
|
3620
|
+
let t = yr(this.property.id);
|
|
3625
3621
|
if (!t) {
|
|
3626
3622
|
this.setWarningText(N("WARN_PROPERTY_NOT_FOUND"));
|
|
3627
3623
|
return;
|
|
@@ -3649,12 +3645,12 @@ ${c}${t}return __outputs__;
|
|
|
3649
3645
|
},
|
|
3650
3646
|
initData_: function() {
|
|
3651
3647
|
if (this.node.id) return;
|
|
3652
|
-
let e =
|
|
3648
|
+
let e = Vn("setProperty")?.[0];
|
|
3653
3649
|
if (!e) return;
|
|
3654
3650
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3655
3651
|
let t = this.getField("NODE");
|
|
3656
3652
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3657
|
-
let n =
|
|
3653
|
+
let n = vr(this.node.id, "write")?.[0];
|
|
3658
3654
|
if (!n) return;
|
|
3659
3655
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3660
3656
|
let r = this.getField("PROPERTY");
|
|
@@ -3672,10 +3668,10 @@ ${c}${t}return __outputs__;
|
|
|
3672
3668
|
}, 0);
|
|
3673
3669
|
},
|
|
3674
3670
|
genNodeOpts_: function() {
|
|
3675
|
-
return
|
|
3671
|
+
return Hn("setProperty");
|
|
3676
3672
|
},
|
|
3677
3673
|
genPropertyOpts_: function() {
|
|
3678
|
-
return
|
|
3674
|
+
return br(this.node.id, "write");
|
|
3679
3675
|
},
|
|
3680
3676
|
onchange: function(e) {
|
|
3681
3677
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3695,13 +3691,13 @@ ${c}${t}return __outputs__;
|
|
|
3695
3691
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3696
3692
|
let r = this.getField("PROPERTY");
|
|
3697
3693
|
if (r.getOptions(!1), n) {
|
|
3698
|
-
let e =
|
|
3694
|
+
let e = vr(this.node.id, "write")?.[0];
|
|
3699
3695
|
r.setValue(e?.id ?? "");
|
|
3700
3696
|
}
|
|
3701
3697
|
this.onPropertyChange_(r.getValue());
|
|
3702
3698
|
},
|
|
3703
3699
|
onPropertyChange_: function(e) {
|
|
3704
|
-
let t =
|
|
3700
|
+
let t = yr(e);
|
|
3705
3701
|
if (!t) {
|
|
3706
3702
|
console.assert(!1);
|
|
3707
3703
|
return;
|
|
@@ -3722,7 +3718,7 @@ ${c}${t}return __outputs__;
|
|
|
3722
3718
|
},
|
|
3723
3719
|
updateShadow_: function() {
|
|
3724
3720
|
if (this.isInsertionMarker()) return;
|
|
3725
|
-
let e =
|
|
3721
|
+
let e = yr(this.property.id);
|
|
3726
3722
|
if (!e) return;
|
|
3727
3723
|
let t = this.getInput("INSTANCE");
|
|
3728
3724
|
if (t) {
|
|
@@ -3734,7 +3730,7 @@ ${c}${t}return __outputs__;
|
|
|
3734
3730
|
if (n) {
|
|
3735
3731
|
n.setShadowDom(null);
|
|
3736
3732
|
let t = n.connection?.targetBlock();
|
|
3737
|
-
t && t.dispose(), e.meta.element ? n.setCheck(on(e.meta.raw)).setShadowDom(
|
|
3733
|
+
t && t.dispose(), e.meta.element ? n.setCheck(on(e.meta.raw)).setShadowDom(Cn(e.meta.raw)) : n.setCheck(B(e.meta.raw.type)).setShadowDom(H(e.meta.raw.type));
|
|
3738
3734
|
}
|
|
3739
3735
|
},
|
|
3740
3736
|
checkWarning_: function() {
|
|
@@ -3748,7 +3744,7 @@ ${c}${t}return __outputs__;
|
|
|
3748
3744
|
return;
|
|
3749
3745
|
}
|
|
3750
3746
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3751
|
-
let t =
|
|
3747
|
+
let t = yr(this.property.id);
|
|
3752
3748
|
if (!t) {
|
|
3753
3749
|
this.setWarningText(N("WARN_PROPERTY_NOT_FOUND"));
|
|
3754
3750
|
return;
|
|
@@ -3777,7 +3773,7 @@ ${c}${t}return __outputs__;
|
|
|
3777
3773
|
},
|
|
3778
3774
|
initData_: function() {
|
|
3779
3775
|
if (this.state.id) return;
|
|
3780
|
-
let e =
|
|
3776
|
+
let e = Un()?.[0];
|
|
3781
3777
|
if (!e) return;
|
|
3782
3778
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3783
3779
|
let t = this.getField("STATE");
|
|
@@ -3792,7 +3788,7 @@ ${c}${t}return __outputs__;
|
|
|
3792
3788
|
}, 0);
|
|
3793
3789
|
},
|
|
3794
3790
|
genStateOpts_: function() {
|
|
3795
|
-
return
|
|
3791
|
+
return Gn();
|
|
3796
3792
|
},
|
|
3797
3793
|
onchange: function(e) {
|
|
3798
3794
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3801,7 +3797,7 @@ ${c}${t}return __outputs__;
|
|
|
3801
3797
|
}
|
|
3802
3798
|
},
|
|
3803
3799
|
onStateChange_: function(e) {
|
|
3804
|
-
let t =
|
|
3800
|
+
let t = Wn(e);
|
|
3805
3801
|
if (!t) {
|
|
3806
3802
|
console.assert(!1);
|
|
3807
3803
|
return;
|
|
@@ -3809,7 +3805,7 @@ ${c}${t}return __outputs__;
|
|
|
3809
3805
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
3810
3806
|
},
|
|
3811
3807
|
checkWarning_: function() {
|
|
3812
|
-
let e =
|
|
3808
|
+
let e = Wn(this.state.id);
|
|
3813
3809
|
if (!e) {
|
|
3814
3810
|
this.setWarningText(N("WARN_STATE_NOT_FOUND"));
|
|
3815
3811
|
return;
|
|
@@ -3833,7 +3829,7 @@ ${c}${t}return __outputs__;
|
|
|
3833
3829
|
},
|
|
3834
3830
|
initData_: function() {
|
|
3835
3831
|
if (this.state.id) return;
|
|
3836
|
-
let e =
|
|
3832
|
+
let e = Un()?.[0];
|
|
3837
3833
|
if (!e) return;
|
|
3838
3834
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3839
3835
|
let t = this.getField("STATE");
|
|
@@ -3846,7 +3842,7 @@ ${c}${t}return __outputs__;
|
|
|
3846
3842
|
this.state.id = e.state?.id ?? "", this.state.name = e.state?.name ?? "", this.state.type = e.state?.type ?? "string";
|
|
3847
3843
|
},
|
|
3848
3844
|
genStateOpts_: function() {
|
|
3849
|
-
return
|
|
3845
|
+
return Gn();
|
|
3850
3846
|
},
|
|
3851
3847
|
onchange: function(e) {
|
|
3852
3848
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -3855,7 +3851,7 @@ ${c}${t}return __outputs__;
|
|
|
3855
3851
|
}
|
|
3856
3852
|
},
|
|
3857
3853
|
onStateChange_: function(e) {
|
|
3858
|
-
let t =
|
|
3854
|
+
let t = Wn(e);
|
|
3859
3855
|
if (!t) {
|
|
3860
3856
|
console.assert(!1);
|
|
3861
3857
|
return;
|
|
@@ -3871,7 +3867,7 @@ ${c}${t}return __outputs__;
|
|
|
3871
3867
|
this.getInput("VALUE").setCheck(t).setShadowDom(n);
|
|
3872
3868
|
},
|
|
3873
3869
|
checkWarning_: function() {
|
|
3874
|
-
let e =
|
|
3870
|
+
let e = Wn(this.state.id);
|
|
3875
3871
|
if (!e) {
|
|
3876
3872
|
this.setWarningText(N("WARN_STATE_NOT_FOUND"));
|
|
3877
3873
|
return;
|
|
@@ -4007,28 +4003,28 @@ function ${h.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
4007
4003
|
};
|
|
4008
4004
|
//#endregion
|
|
4009
4005
|
//#region src/core/utils/compute/func.ts
|
|
4010
|
-
function
|
|
4006
|
+
function Tr(e) {
|
|
4011
4007
|
let t = x.compute.spaces.find((t) => t.id === e);
|
|
4012
4008
|
return t ? t.funcs : [];
|
|
4013
4009
|
}
|
|
4014
|
-
function
|
|
4010
|
+
function Er(e, t) {
|
|
4015
4011
|
let n = x.compute.spaces.find((t) => t.id === e);
|
|
4016
4012
|
if (n) return n.funcs.find((e) => e.id === t);
|
|
4017
4013
|
}
|
|
4018
|
-
function
|
|
4014
|
+
function Dr(e) {
|
|
4019
4015
|
let t = [];
|
|
4020
|
-
return
|
|
4016
|
+
return Tr(e).forEach(({ id: e, name: n }) => {
|
|
4021
4017
|
t.push([n, e]);
|
|
4022
4018
|
}), P(t);
|
|
4023
4019
|
}
|
|
4024
|
-
function
|
|
4020
|
+
function Or() {
|
|
4025
4021
|
return x.compute.activeFunc;
|
|
4026
4022
|
}
|
|
4027
|
-
function
|
|
4023
|
+
function kr(e) {
|
|
4028
4024
|
let { activeFunc: t } = x.compute;
|
|
4029
4025
|
return t.outputs?.find((t) => t.id === e);
|
|
4030
4026
|
}
|
|
4031
|
-
function
|
|
4027
|
+
function Ar() {
|
|
4032
4028
|
let { activeFunc: e } = x.compute, t = [];
|
|
4033
4029
|
return e.outputs?.forEach(({ id: e, name: n }) => {
|
|
4034
4030
|
t.push([n, e]);
|
|
@@ -4036,18 +4032,18 @@ function jr() {
|
|
|
4036
4032
|
}
|
|
4037
4033
|
//#endregion
|
|
4038
4034
|
//#region src/core/utils/compute/space.ts
|
|
4039
|
-
function
|
|
4035
|
+
function jr(e) {
|
|
4040
4036
|
let t = [];
|
|
4041
4037
|
return x.compute.spaces.forEach((n) => {
|
|
4042
4038
|
e === "func" && n.funcs.length > 0 && t.push(n), e === "flow" && n.flows.length > 0 && t.push(n);
|
|
4043
4039
|
}), t;
|
|
4044
4040
|
}
|
|
4045
|
-
function
|
|
4041
|
+
function Mr(e) {
|
|
4046
4042
|
return x.compute.spaces.find((t) => t.id === e);
|
|
4047
4043
|
}
|
|
4048
|
-
function
|
|
4044
|
+
function Nr(e) {
|
|
4049
4045
|
let t = [];
|
|
4050
|
-
return
|
|
4046
|
+
return jr(e).forEach(({ id: e, name: n }) => {
|
|
4051
4047
|
t.push([n, e]);
|
|
4052
4048
|
}), P(t);
|
|
4053
4049
|
}
|
|
@@ -4065,12 +4061,12 @@ v.call_func_v1 = {
|
|
|
4065
4061
|
},
|
|
4066
4062
|
initData_: function() {
|
|
4067
4063
|
if (this.space.id) return;
|
|
4068
|
-
let e =
|
|
4064
|
+
let e = jr("func")?.[0];
|
|
4069
4065
|
if (!e) return;
|
|
4070
4066
|
this.space.id = e.id, this.space.name = e.name;
|
|
4071
4067
|
let t = this.getField("SPACE");
|
|
4072
4068
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4073
|
-
let n =
|
|
4069
|
+
let n = Tr(this.space.id)?.[0];
|
|
4074
4070
|
if (!n) return;
|
|
4075
4071
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4076
4072
|
let r = this.getField("FUNC");
|
|
@@ -4088,10 +4084,10 @@ v.call_func_v1 = {
|
|
|
4088
4084
|
}, 0);
|
|
4089
4085
|
},
|
|
4090
4086
|
genSpaceOpts_: function() {
|
|
4091
|
-
return
|
|
4087
|
+
return Nr("func");
|
|
4092
4088
|
},
|
|
4093
4089
|
genFuncOpts_: function() {
|
|
4094
|
-
return
|
|
4090
|
+
return Dr(this.space.id);
|
|
4095
4091
|
},
|
|
4096
4092
|
onchange: function(e) {
|
|
4097
4093
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -4102,7 +4098,7 @@ v.call_func_v1 = {
|
|
|
4102
4098
|
}
|
|
4103
4099
|
},
|
|
4104
4100
|
onSpaceChange_: function(e) {
|
|
4105
|
-
let t =
|
|
4101
|
+
let t = Mr(e);
|
|
4106
4102
|
if (!t) {
|
|
4107
4103
|
console.assert(!1);
|
|
4108
4104
|
return;
|
|
@@ -4111,13 +4107,13 @@ v.call_func_v1 = {
|
|
|
4111
4107
|
this.space.id = t.id, this.space.name = t.name;
|
|
4112
4108
|
let r = this.getField("FUNC");
|
|
4113
4109
|
if (r.getOptions(!1), n) {
|
|
4114
|
-
let e =
|
|
4110
|
+
let e = Tr(this.space.id)?.[0];
|
|
4115
4111
|
r.setValue(e?.id ?? "");
|
|
4116
4112
|
}
|
|
4117
4113
|
this.onFuncChange_(r.getValue());
|
|
4118
4114
|
},
|
|
4119
4115
|
onFuncChange_: function(e) {
|
|
4120
|
-
let t =
|
|
4116
|
+
let t = Er(this.space.id, e);
|
|
4121
4117
|
if (!t) {
|
|
4122
4118
|
console.assert(!1);
|
|
4123
4119
|
return;
|
|
@@ -4173,13 +4169,13 @@ v.call_func_v1 = {
|
|
|
4173
4169
|
V(this, e);
|
|
4174
4170
|
},
|
|
4175
4171
|
checkWarning_: function() {
|
|
4176
|
-
let e =
|
|
4172
|
+
let e = Mr(this.space.id);
|
|
4177
4173
|
if (!e) {
|
|
4178
4174
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
4179
4175
|
return;
|
|
4180
4176
|
}
|
|
4181
4177
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4182
|
-
let t =
|
|
4178
|
+
let t = Er(this.space.id, this.func.id);
|
|
4183
4179
|
if (!t) {
|
|
4184
4180
|
this.setWarningText(N("WARN_FUNC_NOT_FOUND"));
|
|
4185
4181
|
return;
|
|
@@ -4224,12 +4220,12 @@ ${c}${l}}
|
|
|
4224
4220
|
},
|
|
4225
4221
|
initData_: function() {
|
|
4226
4222
|
if (this.space.id) return;
|
|
4227
|
-
let e =
|
|
4223
|
+
let e = jr("func")?.[0];
|
|
4228
4224
|
if (!e) return;
|
|
4229
4225
|
this.space.id = e.id, this.space.name = e.name;
|
|
4230
4226
|
let t = this.getField("SPACE");
|
|
4231
4227
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4232
|
-
let n =
|
|
4228
|
+
let n = Tr(this.space.id)?.[0];
|
|
4233
4229
|
if (!n) return;
|
|
4234
4230
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4235
4231
|
let r = this.getField("FUNC");
|
|
@@ -4247,10 +4243,10 @@ ${c}${l}}
|
|
|
4247
4243
|
}, 0);
|
|
4248
4244
|
},
|
|
4249
4245
|
genSpaceOpts_: function() {
|
|
4250
|
-
return
|
|
4246
|
+
return Nr("func");
|
|
4251
4247
|
},
|
|
4252
4248
|
genFuncOpts_: function() {
|
|
4253
|
-
return
|
|
4249
|
+
return Dr(this.space.id);
|
|
4254
4250
|
},
|
|
4255
4251
|
onchange: function(e) {
|
|
4256
4252
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -4261,7 +4257,7 @@ ${c}${l}}
|
|
|
4261
4257
|
}
|
|
4262
4258
|
},
|
|
4263
4259
|
onSpaceChange_: function(e) {
|
|
4264
|
-
let t =
|
|
4260
|
+
let t = Mr(e);
|
|
4265
4261
|
if (!t) {
|
|
4266
4262
|
console.assert(!1);
|
|
4267
4263
|
return;
|
|
@@ -4270,13 +4266,13 @@ ${c}${l}}
|
|
|
4270
4266
|
this.space.id = t.id, this.space.name = t.name;
|
|
4271
4267
|
let r = this.getField("FUNC");
|
|
4272
4268
|
if (r.getOptions(!1), n) {
|
|
4273
|
-
let e =
|
|
4269
|
+
let e = Tr(this.space.id)?.[0];
|
|
4274
4270
|
r.setValue(e?.id ?? "");
|
|
4275
4271
|
}
|
|
4276
4272
|
this.onFuncChange_(r.getValue());
|
|
4277
4273
|
},
|
|
4278
4274
|
onFuncChange_: function(e) {
|
|
4279
|
-
let t =
|
|
4275
|
+
let t = Er(this.space.id, e);
|
|
4280
4276
|
if (!t) {
|
|
4281
4277
|
console.assert(!1);
|
|
4282
4278
|
return;
|
|
@@ -4332,13 +4328,13 @@ ${c}${l}}
|
|
|
4332
4328
|
V(this, e);
|
|
4333
4329
|
},
|
|
4334
4330
|
checkWarning_: function() {
|
|
4335
|
-
let e =
|
|
4331
|
+
let e = Mr(this.space.id);
|
|
4336
4332
|
if (!e) {
|
|
4337
4333
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
4338
4334
|
return;
|
|
4339
4335
|
}
|
|
4340
4336
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4341
|
-
let t =
|
|
4337
|
+
let t = Er(this.space.id, this.func.id);
|
|
4342
4338
|
if (!t) {
|
|
4343
4339
|
this.setWarningText(N("WARN_FUNC_NOT_FOUND"));
|
|
4344
4340
|
return;
|
|
@@ -4378,7 +4374,7 @@ ${c}${l}}
|
|
|
4378
4374
|
},
|
|
4379
4375
|
initData_: function() {
|
|
4380
4376
|
if (this.func.id) return;
|
|
4381
|
-
let { id: e, inputs: t } =
|
|
4377
|
+
let { id: e, inputs: t } = Or();
|
|
4382
4378
|
this.func.id = e, this.func.inputs = t;
|
|
4383
4379
|
},
|
|
4384
4380
|
saveExtraState: function() {
|
|
@@ -4416,7 +4412,7 @@ ${c}${l}}
|
|
|
4416
4412
|
V(this, e);
|
|
4417
4413
|
},
|
|
4418
4414
|
checkWarning_: function() {
|
|
4419
|
-
let { id: e, inputs: t } =
|
|
4415
|
+
let { id: e, inputs: t } = Or();
|
|
4420
4416
|
if (this.func.id !== e && (this.func.id = e), !_(t, this.func.inputs)) {
|
|
4421
4417
|
this.setWarningText(N("WARN_FUNC_HAS_CHANGED"));
|
|
4422
4418
|
return;
|
|
@@ -4441,7 +4437,7 @@ ${n}}`;
|
|
|
4441
4437
|
},
|
|
4442
4438
|
initData_: function() {
|
|
4443
4439
|
if (this.output.id) return;
|
|
4444
|
-
let e =
|
|
4440
|
+
let e = Or().outputs?.[0];
|
|
4445
4441
|
e && (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type);
|
|
4446
4442
|
},
|
|
4447
4443
|
saveExtraState: function() {
|
|
@@ -4453,7 +4449,7 @@ ${n}}`;
|
|
|
4453
4449
|
}, 0);
|
|
4454
4450
|
},
|
|
4455
4451
|
genOutputOpts_: function() {
|
|
4456
|
-
return
|
|
4452
|
+
return Ar();
|
|
4457
4453
|
},
|
|
4458
4454
|
onchange: function(e) {
|
|
4459
4455
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -4464,7 +4460,7 @@ ${n}}`;
|
|
|
4464
4460
|
}
|
|
4465
4461
|
},
|
|
4466
4462
|
onOutputChange_: function(e) {
|
|
4467
|
-
let t =
|
|
4463
|
+
let t = kr(e);
|
|
4468
4464
|
if (!t) {
|
|
4469
4465
|
console.assert(!1);
|
|
4470
4466
|
return;
|
|
@@ -4485,7 +4481,7 @@ ${n}}`;
|
|
|
4485
4481
|
this.getInput("VALUE").setShadowDom(e);
|
|
4486
4482
|
},
|
|
4487
4483
|
checkWarning_: function() {
|
|
4488
|
-
let e =
|
|
4484
|
+
let e = kr(this.output.id);
|
|
4489
4485
|
if (!e) {
|
|
4490
4486
|
this.setWarningText(N("WARN_FUNC_HAS_CHANGED"));
|
|
4491
4487
|
return;
|
|
@@ -4555,11 +4551,11 @@ function Y() {
|
|
|
4555
4551
|
t.tables.length > 0 && e.push(t);
|
|
4556
4552
|
}), e;
|
|
4557
4553
|
}
|
|
4558
|
-
function
|
|
4554
|
+
function Pr(e) {
|
|
4559
4555
|
let { spaces: t } = x.data;
|
|
4560
4556
|
return t.find((t) => t.id === e);
|
|
4561
4557
|
}
|
|
4562
|
-
function
|
|
4558
|
+
function Fr() {
|
|
4563
4559
|
let e = [];
|
|
4564
4560
|
return Y().forEach(({ id: t, name: n }) => {
|
|
4565
4561
|
e.push([n, t]);
|
|
@@ -4571,37 +4567,37 @@ function X(e) {
|
|
|
4571
4567
|
let { spaces: t } = x.data, n = t.find((t) => t.id === e);
|
|
4572
4568
|
return n ? n.tables : [];
|
|
4573
4569
|
}
|
|
4574
|
-
function
|
|
4570
|
+
function Ir(e, t) {
|
|
4575
4571
|
let { spaces: n } = x.data, r = n.find((t) => t.id === e);
|
|
4576
4572
|
if (r) return r.tables.find((e) => e.id === t);
|
|
4577
4573
|
}
|
|
4578
|
-
function
|
|
4574
|
+
function Lr(e) {
|
|
4579
4575
|
let t = [];
|
|
4580
4576
|
return X(e).forEach(({ id: e, name: n }) => {
|
|
4581
4577
|
t.push([n, e]);
|
|
4582
4578
|
}), P(t);
|
|
4583
4579
|
}
|
|
4584
|
-
function
|
|
4580
|
+
function Rr(e, t) {
|
|
4585
4581
|
let { spaces: n } = x.data, r = n.find((t) => t.id === e);
|
|
4586
4582
|
if (!r) return [];
|
|
4587
4583
|
let i = r.tables.find((e) => e.id === t);
|
|
4588
4584
|
return i ? i.columns : [];
|
|
4589
4585
|
}
|
|
4590
|
-
function
|
|
4586
|
+
function zr(e, t, n) {
|
|
4591
4587
|
let { spaces: r } = x.data, i = r.find((t) => t.id === e);
|
|
4592
4588
|
if (!i) return;
|
|
4593
4589
|
let a = i.tables.find((e) => e.id === t);
|
|
4594
4590
|
if (a) return a.columns.find((e) => e.id === n);
|
|
4595
4591
|
}
|
|
4596
|
-
function
|
|
4592
|
+
function Br(e, t) {
|
|
4597
4593
|
let n = [];
|
|
4598
|
-
return
|
|
4594
|
+
return Rr(e, t).forEach(({ id: e, name: t }) => {
|
|
4599
4595
|
n.push([t, e]);
|
|
4600
4596
|
}), P(n);
|
|
4601
4597
|
}
|
|
4602
4598
|
//#endregion
|
|
4603
4599
|
//#region src/core/blocks/data/addData/v1/blocks.ts
|
|
4604
|
-
function
|
|
4600
|
+
function Vr(e) {
|
|
4605
4601
|
let t = e.getInput("TABLE").connection;
|
|
4606
4602
|
if (t.targetBlock()) return;
|
|
4607
4603
|
let n, r, i = Y()?.[0];
|
|
@@ -4633,7 +4629,7 @@ function Hr(e) {
|
|
|
4633
4629
|
}, o = l.blocks.append(a, e.workspace);
|
|
4634
4630
|
t.connect(o.outputConnection);
|
|
4635
4631
|
}
|
|
4636
|
-
function
|
|
4632
|
+
function Hr(e) {
|
|
4637
4633
|
let t = e.getInput("HANDLE").connection;
|
|
4638
4634
|
if (t.targetBlock()) return;
|
|
4639
4635
|
let n = l.blocks.append({
|
|
@@ -4668,7 +4664,7 @@ v.add_data_v1 = {
|
|
|
4668
4664
|
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(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
4669
4665
|
},
|
|
4670
4666
|
ensureBlocks_: function() {
|
|
4671
|
-
this.isInsertionMarker() || (
|
|
4667
|
+
this.isInsertionMarker() || (Vr(this), V(this, [
|
|
4672
4668
|
[
|
|
4673
4669
|
"SUCCESS",
|
|
4674
4670
|
"__success__",
|
|
@@ -4687,7 +4683,7 @@ v.add_data_v1 = {
|
|
|
4687
4683
|
"x-runtime-lib.data",
|
|
4688
4684
|
!0
|
|
4689
4685
|
]
|
|
4690
|
-
]),
|
|
4686
|
+
]), Hr(this));
|
|
4691
4687
|
}
|
|
4692
4688
|
}, h.forBlock.add_data_v1 = function(e) {
|
|
4693
4689
|
let t = h.INDENT;
|
|
@@ -4735,7 +4731,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4735
4731
|
let t = X(this.space.id)?.[0];
|
|
4736
4732
|
if (!t) return;
|
|
4737
4733
|
this.table.id = t.id, this.table.name = t.name;
|
|
4738
|
-
let n =
|
|
4734
|
+
let n = Rr(this.space.id, this.table.id)?.[0];
|
|
4739
4735
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4740
4736
|
},
|
|
4741
4737
|
saveExtraState: function() {
|
|
@@ -4751,13 +4747,13 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4751
4747
|
}, 0);
|
|
4752
4748
|
},
|
|
4753
4749
|
genSpaceOpts_: function() {
|
|
4754
|
-
return
|
|
4750
|
+
return Fr();
|
|
4755
4751
|
},
|
|
4756
4752
|
genTableOpts_: function() {
|
|
4757
|
-
return
|
|
4753
|
+
return Lr(this.space.id);
|
|
4758
4754
|
},
|
|
4759
4755
|
genColumnOpts_: function() {
|
|
4760
|
-
return
|
|
4756
|
+
return Br(this.space.id, this.table.id);
|
|
4761
4757
|
},
|
|
4762
4758
|
onchange: function(e) {
|
|
4763
4759
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -4768,7 +4764,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4768
4764
|
}
|
|
4769
4765
|
},
|
|
4770
4766
|
onSpaceChange_: function(e) {
|
|
4771
|
-
let t =
|
|
4767
|
+
let t = Pr(e);
|
|
4772
4768
|
if (!t) {
|
|
4773
4769
|
console.assert(!1);
|
|
4774
4770
|
return;
|
|
@@ -4783,7 +4779,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4783
4779
|
this.onTableChange_(r.getValue());
|
|
4784
4780
|
},
|
|
4785
4781
|
onTableChange_: function(e) {
|
|
4786
|
-
let t =
|
|
4782
|
+
let t = Ir(this.space.id, e);
|
|
4787
4783
|
if (!t) {
|
|
4788
4784
|
console.assert(!1);
|
|
4789
4785
|
return;
|
|
@@ -4792,13 +4788,13 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4792
4788
|
this.table.id = t.id, this.table.name = t.name;
|
|
4793
4789
|
let r = this.getField("COLUMN");
|
|
4794
4790
|
if (r.getOptions(!1), n) {
|
|
4795
|
-
let e =
|
|
4791
|
+
let e = Rr(this.space.id, this.table.id)?.[0];
|
|
4796
4792
|
r.setValue(e?.id ?? "");
|
|
4797
4793
|
}
|
|
4798
4794
|
this.onColumnChange_(r.getValue());
|
|
4799
4795
|
},
|
|
4800
4796
|
onColumnChange_: function(e) {
|
|
4801
|
-
let t =
|
|
4797
|
+
let t = zr(this.space.id, this.table.id, e);
|
|
4802
4798
|
if (!t) {
|
|
4803
4799
|
console.assert(!1);
|
|
4804
4800
|
return;
|
|
@@ -4826,19 +4822,19 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4826
4822
|
this.getInput("VALUE").connection.setCheck(e);
|
|
4827
4823
|
},
|
|
4828
4824
|
checkWarning_: function() {
|
|
4829
|
-
let e =
|
|
4825
|
+
let e = Pr(this.space.id);
|
|
4830
4826
|
if (!e) {
|
|
4831
4827
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
4832
4828
|
return;
|
|
4833
4829
|
}
|
|
4834
4830
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4835
|
-
let t =
|
|
4831
|
+
let t = Ir(this.space.id, this.table.id);
|
|
4836
4832
|
if (!t) {
|
|
4837
4833
|
this.setWarningText(N("WARN_TABLE_NOT_FOUND"));
|
|
4838
4834
|
return;
|
|
4839
4835
|
}
|
|
4840
4836
|
t.name !== this.table.name && (this.table.name = t.name);
|
|
4841
|
-
let n =
|
|
4837
|
+
let n = zr(this.space.id, this.table.id, this.column.id);
|
|
4842
4838
|
if (!n) {
|
|
4843
4839
|
this.setWarningText(N("WARN_COLUMN_NOT_FOUND"));
|
|
4844
4840
|
return;
|
|
@@ -4924,7 +4920,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
4924
4920
|
};
|
|
4925
4921
|
//#endregion
|
|
4926
4922
|
//#region src/core/blocks/data/deleteData/v1/blocks.ts
|
|
4927
|
-
function
|
|
4923
|
+
function Ur(e) {
|
|
4928
4924
|
let t = e.getInput("TABLE").connection;
|
|
4929
4925
|
if (t.targetBlock()) return;
|
|
4930
4926
|
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = {
|
|
@@ -4942,10 +4938,10 @@ function Wr(e) {
|
|
|
4942
4938
|
}, a = l.blocks.append(i, e.workspace);
|
|
4943
4939
|
t.connect(a.outputConnection);
|
|
4944
4940
|
}
|
|
4945
|
-
function
|
|
4941
|
+
function Wr(e) {
|
|
4946
4942
|
let t = e.getInput("CONDITION").connection;
|
|
4947
4943
|
if (t.targetBlock()) return;
|
|
4948
|
-
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i =
|
|
4944
|
+
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = Rr(n?.id, r?.id)?.[0], a = {
|
|
4949
4945
|
type: "cond_atomic_v1",
|
|
4950
4946
|
extraState: {
|
|
4951
4947
|
space: {
|
|
@@ -4966,7 +4962,7 @@ function Gr(e) {
|
|
|
4966
4962
|
}, o = l.blocks.append(a, e.workspace);
|
|
4967
4963
|
t.connect(o.outputConnection);
|
|
4968
4964
|
}
|
|
4969
|
-
function
|
|
4965
|
+
function Gr(e) {
|
|
4970
4966
|
let t = e.getInput("HANDLE").connection;
|
|
4971
4967
|
if (t.targetBlock()) return;
|
|
4972
4968
|
let n = l.blocks.append({
|
|
@@ -5001,7 +4997,7 @@ v.delete_data_v1 = {
|
|
|
5001
4997
|
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(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5002
4998
|
},
|
|
5003
4999
|
ensureBlocks_: function() {
|
|
5004
|
-
this.isInsertionMarker() || (
|
|
5000
|
+
this.isInsertionMarker() || (Ur(this), Wr(this), V(this, [[
|
|
5005
5001
|
"SUCCESS",
|
|
5006
5002
|
"__success__",
|
|
5007
5003
|
"x-runtime-lib.success",
|
|
@@ -5011,7 +5007,7 @@ v.delete_data_v1 = {
|
|
|
5011
5007
|
"__message__",
|
|
5012
5008
|
"x-runtime-lib.message",
|
|
5013
5009
|
!0
|
|
5014
|
-
]]),
|
|
5010
|
+
]]), Gr(this));
|
|
5015
5011
|
}
|
|
5016
5012
|
}, h.forBlock.delete_data_v1 = function(e) {
|
|
5017
5013
|
let t = h.INDENT;
|
|
@@ -5045,7 +5041,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5045
5041
|
};
|
|
5046
5042
|
//#endregion
|
|
5047
5043
|
//#region src/core/blocks/data/queryData/v1/blocks.ts
|
|
5048
|
-
function
|
|
5044
|
+
function Kr(e) {
|
|
5049
5045
|
let t = e.getInput("TABLE").connection;
|
|
5050
5046
|
if (t.targetBlock()) return;
|
|
5051
5047
|
let n, r, i = Y()?.[0];
|
|
@@ -5077,13 +5073,13 @@ function qr(e) {
|
|
|
5077
5073
|
}, o = l.blocks.append(a, e.workspace);
|
|
5078
5074
|
t.connect(o.outputConnection);
|
|
5079
5075
|
}
|
|
5080
|
-
function
|
|
5076
|
+
function qr(e) {
|
|
5081
5077
|
let t = e.getInput("CONDITION").connection;
|
|
5082
5078
|
if (t.targetBlock()) return;
|
|
5083
5079
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5084
5080
|
t.connect(n.outputConnection);
|
|
5085
5081
|
}
|
|
5086
|
-
function
|
|
5082
|
+
function Jr(e) {
|
|
5087
5083
|
let t = e.getInput("EXTRA").connection;
|
|
5088
5084
|
if (t.targetBlock()) return;
|
|
5089
5085
|
let n = l.blocks.append({
|
|
@@ -5105,7 +5101,7 @@ function Yr(e) {
|
|
|
5105
5101
|
}, e.workspace);
|
|
5106
5102
|
t.connect(n.outputConnection);
|
|
5107
5103
|
}
|
|
5108
|
-
function
|
|
5104
|
+
function Yr(e) {
|
|
5109
5105
|
let t = e.getInput("HANDLE").connection;
|
|
5110
5106
|
if (t.targetBlock()) return;
|
|
5111
5107
|
let n = l.blocks.append({
|
|
@@ -5149,7 +5145,7 @@ t([{
|
|
|
5149
5145
|
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(u.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5150
5146
|
},
|
|
5151
5147
|
ensureBlocks_: function() {
|
|
5152
|
-
this.isInsertionMarker() || (
|
|
5148
|
+
this.isInsertionMarker() || (Kr(this), qr(this), Jr(this), V(this, [
|
|
5153
5149
|
[
|
|
5154
5150
|
"SUCCESS",
|
|
5155
5151
|
"__success__",
|
|
@@ -5174,7 +5170,7 @@ t([{
|
|
|
5174
5170
|
"x-runtime-lib.extraData",
|
|
5175
5171
|
!0
|
|
5176
5172
|
]
|
|
5177
|
-
]),
|
|
5173
|
+
]), Yr(this));
|
|
5178
5174
|
}
|
|
5179
5175
|
}, h.forBlock.query_data_v1 = function(e) {
|
|
5180
5176
|
let t = h.INDENT;
|
|
@@ -5272,10 +5268,10 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5272
5268
|
}, 0);
|
|
5273
5269
|
},
|
|
5274
5270
|
genSpaceOpts_: function() {
|
|
5275
|
-
return
|
|
5271
|
+
return Fr();
|
|
5276
5272
|
},
|
|
5277
5273
|
genTableOpts_: function() {
|
|
5278
|
-
return
|
|
5274
|
+
return Lr(this.space.id);
|
|
5279
5275
|
},
|
|
5280
5276
|
genColumnOpts_: function() {
|
|
5281
5277
|
let e = [];
|
|
@@ -5302,7 +5298,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5302
5298
|
}
|
|
5303
5299
|
},
|
|
5304
5300
|
onSpaceChange_: function(e) {
|
|
5305
|
-
let t =
|
|
5301
|
+
let t = Pr(e);
|
|
5306
5302
|
if (!t) {
|
|
5307
5303
|
console.assert(!1);
|
|
5308
5304
|
return;
|
|
@@ -5317,7 +5313,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5317
5313
|
this.onTableChange_(r.getValue());
|
|
5318
5314
|
},
|
|
5319
5315
|
onTableChange_: function(e) {
|
|
5320
|
-
let t =
|
|
5316
|
+
let t = Ir(this.space.id, e);
|
|
5321
5317
|
if (!t) {
|
|
5322
5318
|
console.assert(!1);
|
|
5323
5319
|
return;
|
|
@@ -5391,13 +5387,13 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5391
5387
|
}
|
|
5392
5388
|
},
|
|
5393
5389
|
checkWarning_: function() {
|
|
5394
|
-
let e =
|
|
5390
|
+
let e = Pr(this.space.id);
|
|
5395
5391
|
if (!e) {
|
|
5396
5392
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
5397
5393
|
return;
|
|
5398
5394
|
}
|
|
5399
5395
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5400
|
-
let t =
|
|
5396
|
+
let t = Ir(this.space.id, this.table.id);
|
|
5401
5397
|
if (!t) {
|
|
5402
5398
|
this.setWarningText(N("WARN_TABLE_NOT_FOUND"));
|
|
5403
5399
|
return;
|
|
@@ -5454,10 +5450,10 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5454
5450
|
this.space.id = e.space?.id ?? "", this.space.name = e.space?.name ?? "", this.table.id = e.table?.id ?? "", this.table.name = e.table?.name ?? "", this.checkWarning_();
|
|
5455
5451
|
},
|
|
5456
5452
|
genSpaceOpts_: function() {
|
|
5457
|
-
return
|
|
5453
|
+
return Fr();
|
|
5458
5454
|
},
|
|
5459
5455
|
genTableOpts_: function() {
|
|
5460
|
-
return
|
|
5456
|
+
return Lr(this.space.id);
|
|
5461
5457
|
},
|
|
5462
5458
|
onchange: function(e) {
|
|
5463
5459
|
if (e.type === b.BLOCK_CHANGE) {
|
|
@@ -5468,7 +5464,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5468
5464
|
}
|
|
5469
5465
|
},
|
|
5470
5466
|
onSpaceChange_: function(e) {
|
|
5471
|
-
let t =
|
|
5467
|
+
let t = Pr(e);
|
|
5472
5468
|
if (!t) {
|
|
5473
5469
|
console.assert(!1);
|
|
5474
5470
|
return;
|
|
@@ -5483,7 +5479,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5483
5479
|
this.onTableChange_(r.getValue());
|
|
5484
5480
|
},
|
|
5485
5481
|
onTableChange_: function(e) {
|
|
5486
|
-
let t =
|
|
5482
|
+
let t = Ir(this.space.id, e);
|
|
5487
5483
|
if (!t) {
|
|
5488
5484
|
console.assert(!1);
|
|
5489
5485
|
return;
|
|
@@ -5491,13 +5487,13 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5491
5487
|
this.table.id = t.id, this.table.name = t.name;
|
|
5492
5488
|
},
|
|
5493
5489
|
checkWarning_: function() {
|
|
5494
|
-
let e =
|
|
5490
|
+
let e = Pr(this.space.id);
|
|
5495
5491
|
if (!e) {
|
|
5496
5492
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
5497
5493
|
return;
|
|
5498
5494
|
}
|
|
5499
5495
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5500
|
-
let t =
|
|
5496
|
+
let t = Ir(this.space.id, this.table.id);
|
|
5501
5497
|
if (!t) {
|
|
5502
5498
|
this.setWarningText(N("WARN_TABLE_NOT_FOUND"));
|
|
5503
5499
|
return;
|
|
@@ -5618,10 +5614,10 @@ ${t}}
|
|
|
5618
5614
|
}, 0);
|
|
5619
5615
|
},
|
|
5620
5616
|
genSpaceOpts_: function() {
|
|
5621
|
-
return
|
|
5617
|
+
return Fr();
|
|
5622
5618
|
},
|
|
5623
5619
|
genTableOpts_: function() {
|
|
5624
|
-
return
|
|
5620
|
+
return Lr(this.space.id);
|
|
5625
5621
|
},
|
|
5626
5622
|
genColumnOpts_: function() {
|
|
5627
5623
|
let e = [];
|
|
@@ -5648,7 +5644,7 @@ ${t}}
|
|
|
5648
5644
|
}
|
|
5649
5645
|
},
|
|
5650
5646
|
onSpaceChange_: function(e) {
|
|
5651
|
-
let t =
|
|
5647
|
+
let t = Pr(e);
|
|
5652
5648
|
if (!t) {
|
|
5653
5649
|
console.assert(!1);
|
|
5654
5650
|
return;
|
|
@@ -5663,7 +5659,7 @@ ${t}}
|
|
|
5663
5659
|
this.onTableChange_(r.getValue());
|
|
5664
5660
|
},
|
|
5665
5661
|
onTableChange_: function(e) {
|
|
5666
|
-
let t =
|
|
5662
|
+
let t = Ir(this.space.id, e);
|
|
5667
5663
|
if (!t) {
|
|
5668
5664
|
console.assert(!1);
|
|
5669
5665
|
return;
|
|
@@ -5769,13 +5765,13 @@ ${t}}
|
|
|
5769
5765
|
}
|
|
5770
5766
|
},
|
|
5771
5767
|
checkWarning_: function() {
|
|
5772
|
-
let e =
|
|
5768
|
+
let e = Pr(this.space.id);
|
|
5773
5769
|
if (!e) {
|
|
5774
5770
|
this.setWarningText(N("WARN_SPACE_NOT_FOUND"));
|
|
5775
5771
|
return;
|
|
5776
5772
|
}
|
|
5777
5773
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5778
|
-
let t =
|
|
5774
|
+
let t = Ir(this.space.id, this.table.id);
|
|
5779
5775
|
if (!t) {
|
|
5780
5776
|
this.setWarningText(N("WARN_TABLE_NOT_FOUND"));
|
|
5781
5777
|
return;
|
|
@@ -5802,7 +5798,7 @@ ${t}}
|
|
|
5802
5798
|
};
|
|
5803
5799
|
//#endregion
|
|
5804
5800
|
//#region src/core/blocks/data/updateData/v1/blocks.ts
|
|
5805
|
-
function
|
|
5801
|
+
function Xr(e) {
|
|
5806
5802
|
let t = e.getInput("TABLE").connection;
|
|
5807
5803
|
if (t.targetBlock()) return;
|
|
5808
5804
|
let n, r, i = Y()?.[0];
|
|
@@ -5834,13 +5830,13 @@ function Zr(e) {
|
|
|
5834
5830
|
}, o = l.blocks.append(a, e.workspace);
|
|
5835
5831
|
t.connect(o.outputConnection);
|
|
5836
5832
|
}
|
|
5837
|
-
function
|
|
5833
|
+
function Zr(e) {
|
|
5838
5834
|
let t = e.getInput("CONDITION").connection;
|
|
5839
5835
|
if (t.targetBlock()) return;
|
|
5840
5836
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5841
5837
|
t.connect(n.outputConnection);
|
|
5842
5838
|
}
|
|
5843
|
-
function
|
|
5839
|
+
function Qr(e) {
|
|
5844
5840
|
let t = e.getInput("HANDLE").connection;
|
|
5845
5841
|
if (t.targetBlock()) return;
|
|
5846
5842
|
let n = l.blocks.append({
|
|
@@ -5875,7 +5871,7 @@ v.update_data_v1 = {
|
|
|
5875
5871
|
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(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5876
5872
|
},
|
|
5877
5873
|
ensureBlocks: function() {
|
|
5878
|
-
this.isInsertionMarker() || (
|
|
5874
|
+
this.isInsertionMarker() || (Xr(this), Zr(this), V(this, [
|
|
5879
5875
|
[
|
|
5880
5876
|
"SUCCESS",
|
|
5881
5877
|
"__success__",
|
|
@@ -5894,7 +5890,7 @@ v.update_data_v1 = {
|
|
|
5894
5890
|
"x-runtime-lib.data",
|
|
5895
5891
|
!0
|
|
5896
5892
|
]
|
|
5897
|
-
]),
|
|
5893
|
+
]), Qr(this));
|
|
5898
5894
|
}
|
|
5899
5895
|
}, h.forBlock.update_data_v1 = function(e) {
|
|
5900
5896
|
let t = h.INDENT;
|
|
@@ -5914,7 +5910,7 @@ ${h.statementToCode(e, "HANDLE")}}
|
|
|
5914
5910
|
};
|
|
5915
5911
|
//#endregion
|
|
5916
5912
|
//#region src/core/blocks/json/jsonArray/v1/index.ts
|
|
5917
|
-
var
|
|
5913
|
+
var $r = p.xml;
|
|
5918
5914
|
v.json_array_v1 = {
|
|
5919
5915
|
init: function() {
|
|
5920
5916
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new ie(Xt, 20, 20, void 0, () => {
|
|
@@ -5922,7 +5918,7 @@ v.json_array_v1 = {
|
|
|
5922
5918
|
})), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5923
5919
|
},
|
|
5924
5920
|
mutationToDom: function() {
|
|
5925
|
-
let e =
|
|
5921
|
+
let e = $r.createElement("mutation");
|
|
5926
5922
|
return e.setAttribute("items", String(this.length)), e;
|
|
5927
5923
|
},
|
|
5928
5924
|
domToMutation: function(e) {
|
|
@@ -5970,7 +5966,7 @@ v.json_array_v1 = {
|
|
|
5970
5966
|
} };
|
|
5971
5967
|
//#endregion
|
|
5972
5968
|
//#region src/core/blocks/json/jsonMap/v1/index.ts
|
|
5973
|
-
var
|
|
5969
|
+
var ei = p.xml;
|
|
5974
5970
|
v.json_map_v1 = {
|
|
5975
5971
|
init: function() {
|
|
5976
5972
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new ie(Xt, 20, 20, void 0, () => {
|
|
@@ -5978,9 +5974,9 @@ v.json_map_v1 = {
|
|
|
5978
5974
|
})), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5979
5975
|
},
|
|
5980
5976
|
mutationToDom: function() {
|
|
5981
|
-
let e =
|
|
5977
|
+
let e = ei.createElement("mutation");
|
|
5982
5978
|
for (let t = 0; t < this.length; t++) {
|
|
5983
|
-
let n =
|
|
5979
|
+
let n = ei.createElement("item");
|
|
5984
5980
|
n.setAttribute("key", this.getFieldValue("KEY" + t)), e.appendChild(n);
|
|
5985
5981
|
}
|
|
5986
5982
|
return e;
|
|
@@ -6033,7 +6029,7 @@ v.json_map_v1 = {
|
|
|
6033
6029
|
} };
|
|
6034
6030
|
//#endregion
|
|
6035
6031
|
//#region src/core/blocks/list/listCreate/v1/index.ts
|
|
6036
|
-
var
|
|
6032
|
+
var ti = p.xml;
|
|
6037
6033
|
v.list_create_container_v1 = { init: function() {
|
|
6038
6034
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
6039
6035
|
} }, v.list_create_item_v1 = { init: function() {
|
|
@@ -6043,7 +6039,7 @@ v.list_create_container_v1 = { init: function() {
|
|
|
6043
6039
|
this.itemCount_ = 0, this.setMutator(new se.MutatorIcon(["list_create_item_v1"], this)), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
6044
6040
|
},
|
|
6045
6041
|
mutationToDom: function() {
|
|
6046
|
-
let e =
|
|
6042
|
+
let e = ti.createElement("mutation");
|
|
6047
6043
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
6048
6044
|
},
|
|
6049
6045
|
domToMutation: function(e) {
|
|
@@ -6290,7 +6286,7 @@ v.list_create_container_v1 = { init: function() {
|
|
|
6290
6286
|
};
|
|
6291
6287
|
//#endregion
|
|
6292
6288
|
//#region src/core/blocks/logic/logicCompare/v1/index.ts
|
|
6293
|
-
var
|
|
6289
|
+
var ni = { onchange: function(e) {
|
|
6294
6290
|
this.prevBlocks_ ||= [null, null];
|
|
6295
6291
|
let t = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
6296
6292
|
if (t && n && !this.workspace.connectionChecker.doTypeChecks(t.outputConnection, n.outputConnection)) {
|
|
@@ -6305,7 +6301,7 @@ var ri = { onchange: function(e) {
|
|
|
6305
6301
|
//#endregion
|
|
6306
6302
|
//#region src/core/blocks/loop/flowControl/v1/extensions.ts
|
|
6307
6303
|
m.register("logic_compare_v1", function() {
|
|
6308
|
-
this.mixin(
|
|
6304
|
+
this.mixin(ni);
|
|
6309
6305
|
}), t([{
|
|
6310
6306
|
type: "logic_compare_v1",
|
|
6311
6307
|
message0: "%1 %2 %3",
|
|
@@ -6599,7 +6595,7 @@ m.register("logic_compare_v1", function() {
|
|
|
6599
6595
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
6600
6596
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6601
6597
|
}));
|
|
6602
|
-
var
|
|
6598
|
+
var ri = new Set([
|
|
6603
6599
|
"repeat_v1",
|
|
6604
6600
|
"for_each_v1",
|
|
6605
6601
|
"for_v1",
|
|
@@ -6609,7 +6605,7 @@ m.registerMixin("flow_control_in_loop_check_v1", {
|
|
|
6609
6605
|
getSurroundLoop: function() {
|
|
6610
6606
|
let e = this;
|
|
6611
6607
|
do {
|
|
6612
|
-
if (
|
|
6608
|
+
if (ri.has(e.type)) return e;
|
|
6613
6609
|
e = e?.getSurroundParent();
|
|
6614
6610
|
} while (e);
|
|
6615
6611
|
return null;
|
|
@@ -7333,7 +7329,7 @@ function ${h.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
|
|
|
7333
7329
|
};
|
|
7334
7330
|
//#endregion
|
|
7335
7331
|
//#region src/core/blocks/object/objectCreate/v1/index.ts
|
|
7336
|
-
var
|
|
7332
|
+
var ii = p.xml;
|
|
7337
7333
|
v.object_create_container_v1 = { init: function() {
|
|
7338
7334
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7339
7335
|
} }, v.object_create_item_v1 = { init: function() {
|
|
@@ -7343,7 +7339,7 @@ v.object_create_container_v1 = { init: function() {
|
|
|
7343
7339
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(new se.MutatorIcon(["object_create_item_v1"], this)), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7344
7340
|
},
|
|
7345
7341
|
mutationToDom: function() {
|
|
7346
|
-
let e =
|
|
7342
|
+
let e = ii.createElement("mutation");
|
|
7347
7343
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
7348
7344
|
},
|
|
7349
7345
|
domToMutation: function(e) {
|
|
@@ -7600,7 +7596,7 @@ function ${h.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
7600
7596
|
};
|
|
7601
7597
|
//#endregion
|
|
7602
7598
|
//#region src/core/blocks/procedure/procedureDef/v1/index.ts
|
|
7603
|
-
var
|
|
7599
|
+
var ai = p.xml;
|
|
7604
7600
|
v.procedure_def_container_v1 = { init: function() {
|
|
7605
7601
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new n(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7606
7602
|
} }, v.procedure_def_item_v1 = {
|
|
@@ -7628,9 +7624,9 @@ v.procedure_def_container_v1 = { init: function() {
|
|
|
7628
7624
|
e.setValidator(ve.rename), e.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(e, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(new se.MutatorIcon(["procedure_def_item_v1"], this)), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7629
7625
|
},
|
|
7630
7626
|
mutationToDom: function() {
|
|
7631
|
-
let e =
|
|
7627
|
+
let e = ai.createElement("mutation");
|
|
7632
7628
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((t) => {
|
|
7633
|
-
let n =
|
|
7629
|
+
let n = ai.createElement("arg");
|
|
7634
7630
|
n.setAttribute("name", t.name), n.setAttribute("id", t.id), e.appendChild(n);
|
|
7635
7631
|
}), e;
|
|
7636
7632
|
},
|
|
@@ -7716,13 +7712,13 @@ v.procedure_def_container_v1 = { init: function() {
|
|
|
7716
7712
|
};
|
|
7717
7713
|
//#endregion
|
|
7718
7714
|
//#region src/core/blocks/procedure/procedureReturn/v1/index.ts
|
|
7719
|
-
var
|
|
7715
|
+
var oi = p.xml;
|
|
7720
7716
|
v.procedure_return_v1 = {
|
|
7721
7717
|
init: function() {
|
|
7722
7718
|
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}");
|
|
7723
7719
|
},
|
|
7724
7720
|
mutationToDom: function() {
|
|
7725
|
-
let e =
|
|
7721
|
+
let e = oi.createElement("mutation");
|
|
7726
7722
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
|
|
7727
7723
|
},
|
|
7728
7724
|
domToMutation: function(e) {
|
|
@@ -7818,7 +7814,7 @@ ${h.statementToCode(e, "HANDLE")}
|
|
|
7818
7814
|
};
|
|
7819
7815
|
//#endregion
|
|
7820
7816
|
//#region src/core/utils/resource/dir.ts
|
|
7821
|
-
function
|
|
7817
|
+
function si(e) {
|
|
7822
7818
|
let t = x.resource.spaces.find((t) => t.id === e);
|
|
7823
7819
|
if (!t) return [];
|
|
7824
7820
|
let n = [];
|
|
@@ -7833,15 +7829,15 @@ function ci(e) {
|
|
|
7833
7829
|
}
|
|
7834
7830
|
return r(t.dirTree, ""), n;
|
|
7835
7831
|
}
|
|
7836
|
-
function
|
|
7832
|
+
function ci(e) {
|
|
7837
7833
|
let t = [];
|
|
7838
|
-
return
|
|
7834
|
+
return si(e).forEach(({ id: e, name: n }) => {
|
|
7839
7835
|
t.push([n, e]);
|
|
7840
7836
|
}), P(t);
|
|
7841
7837
|
}
|
|
7842
7838
|
//#endregion
|
|
7843
7839
|
//#region src/core/utils/resource/resource.ts
|
|
7844
|
-
function
|
|
7840
|
+
function li(e, t) {
|
|
7845
7841
|
let n = x.resource.spaces.find((t) => t.id === e);
|
|
7846
7842
|
if (!n) return [];
|
|
7847
7843
|
let r = [];
|
|
@@ -7849,23 +7845,23 @@ function ui(e, t) {
|
|
|
7849
7845
|
e.dirid === t && r.push(e);
|
|
7850
7846
|
}), r;
|
|
7851
7847
|
}
|
|
7852
|
-
function
|
|
7848
|
+
function ui(e, t) {
|
|
7853
7849
|
let n = [];
|
|
7854
|
-
return
|
|
7850
|
+
return li(e, t).forEach(({ id: e, name: t }) => {
|
|
7855
7851
|
n.push([t, e]);
|
|
7856
7852
|
}), P(n);
|
|
7857
7853
|
}
|
|
7858
7854
|
//#endregion
|
|
7859
7855
|
//#region src/core/utils/resource/space.ts
|
|
7860
|
-
function
|
|
7856
|
+
function di() {
|
|
7861
7857
|
let e = [];
|
|
7862
7858
|
return x.resource.spaces.forEach((t) => {
|
|
7863
7859
|
t.resources.length > 0 && e.push(t);
|
|
7864
7860
|
}), e;
|
|
7865
7861
|
}
|
|
7866
|
-
function
|
|
7862
|
+
function fi() {
|
|
7867
7863
|
let e = [];
|
|
7868
|
-
return
|
|
7864
|
+
return di().forEach(({ id: t, name: n }) => {
|
|
7869
7865
|
e.push([n, t]);
|
|
7870
7866
|
}), P(e);
|
|
7871
7867
|
}
|
|
@@ -7884,17 +7880,17 @@ v.select_resource_v1 = {
|
|
|
7884
7880
|
},
|
|
7885
7881
|
initData_: function() {
|
|
7886
7882
|
if (this.space.id) return;
|
|
7887
|
-
let e =
|
|
7883
|
+
let e = di()?.[0];
|
|
7888
7884
|
if (!e) return;
|
|
7889
7885
|
this.space.id = e.id, this.space.name = e.name;
|
|
7890
7886
|
let t = this.getField("SPACE");
|
|
7891
7887
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
7892
|
-
let n =
|
|
7888
|
+
let n = si(this.space.id)?.[0];
|
|
7893
7889
|
if (!n) return;
|
|
7894
7890
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7895
7891
|
let r = this.getField("DIR");
|
|
7896
7892
|
r.getOptions(!1), r.setValue(this.dir.id);
|
|
7897
|
-
let i =
|
|
7893
|
+
let i = li(this.space.id, this.dir.id)?.[0];
|
|
7898
7894
|
if (!i) return;
|
|
7899
7895
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
7900
7896
|
let a = this.getField("RESOURCE");
|
|
@@ -7911,13 +7907,13 @@ v.select_resource_v1 = {
|
|
|
7911
7907
|
this.space = ge(e.space), this.dir = ge(e.dir), this.resource = ge(e.resource);
|
|
7912
7908
|
},
|
|
7913
7909
|
genSpaceOpts_: function() {
|
|
7914
|
-
return
|
|
7910
|
+
return fi();
|
|
7915
7911
|
},
|
|
7916
7912
|
genDirOpts_: function() {
|
|
7917
|
-
return
|
|
7913
|
+
return ci(this.space.id);
|
|
7918
7914
|
},
|
|
7919
7915
|
genResourceOpts_: function() {
|
|
7920
|
-
return
|
|
7916
|
+
return ui(this.space.id, this.dir.id);
|
|
7921
7917
|
}
|
|
7922
7918
|
}, h.forBlock.select_resource_v1 = function() {
|
|
7923
7919
|
return "";
|
|
@@ -7990,9 +7986,9 @@ ${h.statementToCode(e, "HANDLE")}
|
|
|
7990
7986
|
};
|
|
7991
7987
|
//#endregion
|
|
7992
7988
|
//#region src/core/blocks/text/utils/index.ts
|
|
7993
|
-
var
|
|
7994
|
-
function
|
|
7995
|
-
return
|
|
7989
|
+
var pi = /^\s*'([^']|\\')*'\s*$/;
|
|
7990
|
+
function mi(e) {
|
|
7991
|
+
return pi.test(e) ? [e, g.ATOMIC] : [`String(${e})`, g.FUNCTION_CALL];
|
|
7996
7992
|
}
|
|
7997
7993
|
m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_APPEND_TOOLTIP}", "VAR")), t([{
|
|
7998
7994
|
type: "text_append_v1",
|
|
@@ -8010,7 +8006,7 @@ m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_
|
|
|
8010
8006
|
helpUrl: "%{BKY_TEXT_V1_APPEND_HELPURL}",
|
|
8011
8007
|
extensions: ["text_append_tooltip_v1"]
|
|
8012
8008
|
}]), h.forBlock.text_append_v1 = function(t) {
|
|
8013
|
-
return `${h.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${
|
|
8009
|
+
return `${h.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${mi(h.valueToCode(t, "TEXT", g.NONE) || "''")};\n`;
|
|
8014
8010
|
}, t([{
|
|
8015
8011
|
type: "text_change_case_v1",
|
|
8016
8012
|
message0: "%{BKY_TEXT_V1_CHANGE_CASE_TITLE}",
|
|
@@ -8134,11 +8130,11 @@ function ${h.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
|
|
|
8134
8130
|
};
|
|
8135
8131
|
//#endregion
|
|
8136
8132
|
//#region src/core/blocks/text/textJoin/v1/index.ts
|
|
8137
|
-
var
|
|
8133
|
+
var hi = p.xml;
|
|
8138
8134
|
m.registerMutator("text_join_mutator_v1", {
|
|
8139
8135
|
itemCount_: 0,
|
|
8140
8136
|
mutationToDom: function() {
|
|
8141
|
-
let e =
|
|
8137
|
+
let e = hi.createElement("mutation");
|
|
8142
8138
|
return e.setAttribute("items", `${this.itemCount_}`), e;
|
|
8143
8139
|
},
|
|
8144
8140
|
domToMutation: function(e) {
|
|
@@ -8229,10 +8225,10 @@ m.registerMutator("text_join_mutator_v1", {
|
|
|
8229
8225
|
let t = e;
|
|
8230
8226
|
switch (t.itemCount_) {
|
|
8231
8227
|
case 0: return ["''", g.ATOMIC];
|
|
8232
|
-
case 1: return
|
|
8228
|
+
case 1: return mi(h.valueToCode(t, "ADD0", g.NONE) || "''");
|
|
8233
8229
|
case 2: {
|
|
8234
8230
|
let e = h.valueToCode(t, "ADD0", g.NONE) || "''", n = h.valueToCode(t, "ADD1", g.NONE) || "''";
|
|
8235
|
-
return [
|
|
8231
|
+
return [mi(e)[0] + " + " + mi(n)[0], g.ADDITION];
|
|
8236
8232
|
}
|
|
8237
8233
|
default: {
|
|
8238
8234
|
let e = Array(t.itemCount_);
|
|
@@ -8420,7 +8416,7 @@ ${h.statementToCode(e, "CALLBACK")}});\n`;
|
|
|
8420
8416
|
};
|
|
8421
8417
|
//#endregion
|
|
8422
8418
|
//#region src/core/blocks/variable/extensions/v1/index.ts
|
|
8423
|
-
var
|
|
8419
|
+
var gi = { customContextMenu: function(e) {
|
|
8424
8420
|
if (!this.isInFlyout) {
|
|
8425
8421
|
let t, n;
|
|
8426
8422
|
this.type === "variable_get_v1" ? (t = "variable_set_v1", n = N("VARIABLE_GET_CREATE_SET")) : this.type === "variable_set_v1" ? (t = "variable_get_v1", n = N("VARIABLE_SET_CREATE_GET")) : console.assert(!1);
|
|
@@ -8437,26 +8433,26 @@ var _i = { customContextMenu: function(e) {
|
|
|
8437
8433
|
let t = {
|
|
8438
8434
|
text: N("RENAME_VARIABLE"),
|
|
8439
8435
|
enabled: !0,
|
|
8440
|
-
callback:
|
|
8436
|
+
callback: _i(this)
|
|
8441
8437
|
}, n = this.getField("VAR").getText(), r = {
|
|
8442
8438
|
text: N("DELETE_VARIABLE").replace("%1", n),
|
|
8443
8439
|
enabled: !0,
|
|
8444
|
-
callback:
|
|
8440
|
+
callback: vi(this)
|
|
8445
8441
|
};
|
|
8446
8442
|
e.unshift(t), e.unshift(r);
|
|
8447
8443
|
}
|
|
8448
|
-
} },
|
|
8444
|
+
} }, _i = function(e) {
|
|
8449
8445
|
return function() {
|
|
8450
8446
|
let t = e.workspace, n = e.getField("VAR").getVariable();
|
|
8451
8447
|
c.renameVariable(t, n);
|
|
8452
8448
|
};
|
|
8453
|
-
},
|
|
8449
|
+
}, vi = function(e) {
|
|
8454
8450
|
return function() {
|
|
8455
8451
|
let t = e.getField("VAR").getVariable();
|
|
8456
8452
|
t && c.deleteVariable(t.getWorkspace(), t, e);
|
|
8457
8453
|
};
|
|
8458
8454
|
};
|
|
8459
|
-
m.registerMixin("context_menu_variable_v1",
|
|
8455
|
+
m.registerMixin("context_menu_variable_v1", gi), t([{
|
|
8460
8456
|
type: "variable_get_v1",
|
|
8461
8457
|
message0: "%1",
|
|
8462
8458
|
args0: [{
|
|
@@ -8503,17 +8499,17 @@ m.registerMixin("context_menu_variable_v1", _i), t([{
|
|
|
8503
8499
|
});
|
|
8504
8500
|
//#endregion
|
|
8505
8501
|
//#region src/core/plugins/fieldDropdown/index.ts
|
|
8506
|
-
var
|
|
8507
|
-
|
|
8502
|
+
var yi = y.prototype;
|
|
8503
|
+
yi.doClassValidation_ = function(e) {
|
|
8508
8504
|
return e;
|
|
8509
8505
|
};
|
|
8510
|
-
var
|
|
8511
|
-
|
|
8512
|
-
|
|
8506
|
+
var bi = yi.doValueUpdate_;
|
|
8507
|
+
yi.doValueUpdate_ = function(e) {
|
|
8508
|
+
bi.call(this, e), this.selectedOption && this.selectedOption[1] !== e && (this.selectedOption = null);
|
|
8513
8509
|
};
|
|
8514
|
-
var
|
|
8515
|
-
|
|
8516
|
-
if (this.selectedOption) return
|
|
8510
|
+
var xi = yi.getText_;
|
|
8511
|
+
yi.getText_ = function() {
|
|
8512
|
+
if (this.selectedOption) return xi.call(this);
|
|
8517
8513
|
let { i18n: e } = Me, t = this.getSourceBlock();
|
|
8518
8514
|
if (this.name === "APP") return t.app.name;
|
|
8519
8515
|
if (this.name === "PAGE") return t.page.name;
|
|
@@ -8541,7 +8537,7 @@ bi.getText_ = function() {
|
|
|
8541
8537
|
};
|
|
8542
8538
|
//#endregion
|
|
8543
8539
|
//#region src/core/plugins/workspaceCleanUp/index.ts
|
|
8544
|
-
var
|
|
8540
|
+
var Si = 60;
|
|
8545
8541
|
ee.prototype.cleanUp = function() {
|
|
8546
8542
|
this.setResizesEnabled(!1);
|
|
8547
8543
|
let e = b.getGroup();
|
|
@@ -8554,47 +8550,47 @@ ee.prototype.cleanUp = function() {
|
|
|
8554
8550
|
let t = e.getBoundingRectangle();
|
|
8555
8551
|
e.moveBy(-t.left, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle();
|
|
8556
8552
|
let n = i(t);
|
|
8557
|
-
for (; n != null;) a = n.top + n.getHeight() +
|
|
8558
|
-
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height +
|
|
8553
|
+
for (; n != null;) a = n.top + n.getHeight() + Si, e.moveBy(0, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle(), n = i(t);
|
|
8554
|
+
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height + Si;
|
|
8559
8555
|
}
|
|
8560
8556
|
b.setGroup(e), this.setResizesEnabled(!0);
|
|
8561
8557
|
};
|
|
8562
8558
|
//#endregion
|
|
8563
8559
|
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
8564
|
-
var
|
|
8565
|
-
function
|
|
8560
|
+
var Ci = Ee();
|
|
8561
|
+
function wi(e) {
|
|
8566
8562
|
let t = e.getParent();
|
|
8567
|
-
return t &&
|
|
8563
|
+
return t && wi(t) ? !0 : !t && !!(e.outputConnection || e.previousConnection);
|
|
8568
8564
|
}
|
|
8569
|
-
var
|
|
8565
|
+
var Ti = class {
|
|
8570
8566
|
init() {
|
|
8571
8567
|
let e = fe.registry.getItem("blockDisable");
|
|
8572
8568
|
e && (e.preconditionFn = function(e) {
|
|
8573
8569
|
let t = e.block;
|
|
8574
|
-
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() ||
|
|
8570
|
+
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() || wi(t) ? "disabled" : "enabled" : "hidden";
|
|
8575
8571
|
});
|
|
8576
8572
|
}
|
|
8577
8573
|
};
|
|
8578
|
-
(0,
|
|
8574
|
+
(0, On.registerFieldColour)(), d.registry.unregister(te.names.ESCAPE), new Ci.CrossTabCopyPaste().init({
|
|
8579
8575
|
contextMenu: !0,
|
|
8580
8576
|
shortcut: !0
|
|
8581
|
-
}), new
|
|
8577
|
+
}), new Ti().init();
|
|
8582
8578
|
//#endregion
|
|
8583
8579
|
//#region src/core/events/index.ts
|
|
8584
|
-
var
|
|
8580
|
+
var Ei = /* @__PURE__ */ function(e) {
|
|
8585
8581
|
return e.STATE_CHANGE = "state_change", e;
|
|
8586
|
-
}({}),
|
|
8582
|
+
}({}), Di = class extends b.Abstract {
|
|
8587
8583
|
isBlank = !0;
|
|
8588
8584
|
recordUndo = !1;
|
|
8589
|
-
type =
|
|
8585
|
+
type = Ei.STATE_CHANGE;
|
|
8590
8586
|
constructor(e) {
|
|
8591
8587
|
super(), this.workspaceId = e.id;
|
|
8592
8588
|
}
|
|
8593
8589
|
};
|
|
8594
|
-
we.register(we.Type.EVENT,
|
|
8590
|
+
we.register(we.Type.EVENT, Ei.STATE_CHANGE, Di);
|
|
8595
8591
|
//#endregion
|
|
8596
8592
|
//#region src/core/misc/index.ts
|
|
8597
|
-
function
|
|
8593
|
+
function Oi(e) {
|
|
8598
8594
|
let t = s();
|
|
8599
8595
|
if (!t) return;
|
|
8600
8596
|
let n = t.getBlockById(e);
|
|
@@ -8604,11 +8600,11 @@ function ki(e) {
|
|
|
8604
8600
|
let i = r.getRelativeToSurfaceXY(), a = i.x * t.scale, o = i.y * t.scale;
|
|
8605
8601
|
t.scroll(-a, -o);
|
|
8606
8602
|
}
|
|
8607
|
-
function
|
|
8603
|
+
function ki() {
|
|
8608
8604
|
let e = s();
|
|
8609
8605
|
if (!e) return;
|
|
8610
8606
|
let t = e.getTopBlocks(!0)?.[0];
|
|
8611
|
-
t &&
|
|
8607
|
+
t && Oi(t.id);
|
|
8612
8608
|
}
|
|
8613
8609
|
a.Classic.blockStyles = {
|
|
8614
8610
|
color_blocks: {
|
|
@@ -8718,7 +8714,7 @@ a.Classic.blockStyles = {
|
|
|
8718
8714
|
time_category: { colour: "#5b99a5" },
|
|
8719
8715
|
variable_category: { colour: "#a55b80" }
|
|
8720
8716
|
};
|
|
8721
|
-
var
|
|
8717
|
+
var Ai = ne.defineTheme("light", {
|
|
8722
8718
|
name: "light",
|
|
8723
8719
|
base: a.Classic,
|
|
8724
8720
|
componentStyles: {
|
|
@@ -8734,7 +8730,7 @@ var ji = ne.defineTheme("light", {
|
|
|
8734
8730
|
scrollbarOpacity: .4,
|
|
8735
8731
|
cursorColour: ""
|
|
8736
8732
|
}
|
|
8737
|
-
}),
|
|
8733
|
+
}), ji = ne.defineTheme("dark", {
|
|
8738
8734
|
name: "dark",
|
|
8739
8735
|
base: a.Classic,
|
|
8740
8736
|
componentStyles: {
|
|
@@ -8751,45 +8747,45 @@ var ji = ne.defineTheme("light", {
|
|
|
8751
8747
|
cursorColour: ""
|
|
8752
8748
|
}
|
|
8753
8749
|
});
|
|
8754
|
-
function
|
|
8750
|
+
function Mi(e) {
|
|
8755
8751
|
let t = s();
|
|
8756
8752
|
switch (e) {
|
|
8757
8753
|
case "light":
|
|
8758
|
-
t.setTheme(
|
|
8754
|
+
t.setTheme(Ai);
|
|
8759
8755
|
break;
|
|
8760
8756
|
case "dark":
|
|
8761
|
-
t.setTheme(
|
|
8757
|
+
t.setTheme(ji);
|
|
8762
8758
|
break;
|
|
8763
8759
|
}
|
|
8764
8760
|
}
|
|
8765
8761
|
//#endregion
|
|
8766
8762
|
//#region src/components/blockly/buildReactivity.ts
|
|
8767
|
-
function
|
|
8763
|
+
function Ni(e, t) {
|
|
8768
8764
|
e.find((e) => e === t) || e.push(t);
|
|
8769
8765
|
}
|
|
8770
|
-
var
|
|
8771
|
-
function
|
|
8766
|
+
var Pi = ["get_app_property_v1", "get_app_state_v1"];
|
|
8767
|
+
function Fi(e) {
|
|
8772
8768
|
let t = [];
|
|
8773
8769
|
function n(e) {
|
|
8774
|
-
for (let r of e.getChildren(!0))
|
|
8770
|
+
for (let r of e.getChildren(!0)) Pi.includes(r.type) && t.push(r), n(r);
|
|
8775
8771
|
}
|
|
8776
8772
|
return n(e), t;
|
|
8777
8773
|
}
|
|
8778
|
-
function
|
|
8774
|
+
function Ii(e) {
|
|
8779
8775
|
let t = [];
|
|
8780
|
-
for (let n of e) n.type === "get_app_property_v1" ?
|
|
8776
|
+
for (let n of e) n.type === "get_app_property_v1" ? Ni(t, Qe("propertyTrigger", n.property.id)) : n.type === "get_app_state_v1" ? Ni(t, Qe("stateTrigger", n.state.id)) : console.assert(!1);
|
|
8781
8777
|
return t;
|
|
8782
8778
|
}
|
|
8783
|
-
function
|
|
8779
|
+
function Li(e) {
|
|
8784
8780
|
let t = [];
|
|
8785
8781
|
for (let n of e) {
|
|
8786
8782
|
if (n.type !== "app_bind_entry_v1") continue;
|
|
8787
8783
|
let e = n;
|
|
8788
|
-
e.kind === "property" ?
|
|
8784
|
+
e.kind === "property" ? Ni(t, Qe("propertyTrigger", e.property.id)) : e.kind === "state" && Ni(t, Qe("stateTrigger", e.state.id));
|
|
8789
8785
|
}
|
|
8790
8786
|
return t;
|
|
8791
8787
|
}
|
|
8792
|
-
function
|
|
8788
|
+
function Ri(e) {
|
|
8793
8789
|
let t = {
|
|
8794
8790
|
watchEffect: {
|
|
8795
8791
|
ids: [],
|
|
@@ -8802,32 +8798,32 @@ function zi(e) {
|
|
|
8802
8798
|
}, n = e.getTopBlocks(!0);
|
|
8803
8799
|
if (!n) return t;
|
|
8804
8800
|
for (let e of n) if (e.type === "watch_effect_v1") {
|
|
8805
|
-
let n =
|
|
8806
|
-
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []),
|
|
8801
|
+
let n = Ii(Fi(e));
|
|
8802
|
+
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []), Ni(t.watchEffect.triggers[r], e.id);
|
|
8807
8803
|
t.watchEffect.ids.push(e.id);
|
|
8808
8804
|
} else if (e.type === "app_bind_v1") {
|
|
8809
|
-
let n =
|
|
8805
|
+
let n = Li(e.getChildren(!0));
|
|
8810
8806
|
t.bind.sets[e.id] = n;
|
|
8811
|
-
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []),
|
|
8807
|
+
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []), Ni(t.bind.triggers[r], e.id);
|
|
8812
8808
|
}
|
|
8813
8809
|
return t;
|
|
8814
8810
|
}
|
|
8815
8811
|
//#endregion
|
|
8816
8812
|
//#region src/components/blockly/provideInject.ts
|
|
8817
|
-
var
|
|
8818
|
-
function
|
|
8819
|
-
Ot(
|
|
8813
|
+
var zi = Symbol();
|
|
8814
|
+
function Bi(e) {
|
|
8815
|
+
Ot(zi, e);
|
|
8820
8816
|
}
|
|
8821
|
-
function
|
|
8822
|
-
return bt(
|
|
8817
|
+
function Vi() {
|
|
8818
|
+
return bt(zi);
|
|
8823
8819
|
}
|
|
8824
8820
|
//#endregion
|
|
8825
8821
|
//#region src/components/blockly/clean/index.vue
|
|
8826
|
-
var
|
|
8822
|
+
var Hi = /* @__PURE__ */ yt({
|
|
8827
8823
|
__name: "index",
|
|
8828
8824
|
props: { lock: { type: Boolean } },
|
|
8829
8825
|
setup(e, { expose: t }) {
|
|
8830
|
-
let { t: n } = Ht(), r = Ut(), i = e, a =
|
|
8826
|
+
let { t: n } = Ht(), r = Ut(), i = e, a = Vi(), o = T(() => r.smAndDown.value), s = () => {
|
|
8831
8827
|
if (!a.workspace) {
|
|
8832
8828
|
console.assert(!1);
|
|
8833
8829
|
return;
|
|
@@ -8859,7 +8855,7 @@ var Ui = /* @__PURE__ */ yt({
|
|
|
8859
8855
|
});
|
|
8860
8856
|
//#endregion
|
|
8861
8857
|
//#region src/components/blockly/jsonHelper.ts
|
|
8862
|
-
function
|
|
8858
|
+
function Ui(e, t) {
|
|
8863
8859
|
let n = t.newBlock("json_root_v1");
|
|
8864
8860
|
n.initSvg(), n.render();
|
|
8865
8861
|
let r = (e, n) => {
|
|
@@ -8890,7 +8886,7 @@ function Wi(e, t) {
|
|
|
8890
8886
|
};
|
|
8891
8887
|
r(e, n.getInput("JSON").connection), b.fire(new (b.get(b.FINISHED_LOADING))(t));
|
|
8892
8888
|
}
|
|
8893
|
-
function
|
|
8889
|
+
function Wi(e) {
|
|
8894
8890
|
let t = (e) => {
|
|
8895
8891
|
if (!e) return null;
|
|
8896
8892
|
if (e.type === "json_root_v1") return t(e.getInputTargetBlock("JSON"));
|
|
@@ -8914,7 +8910,7 @@ function Gi(e) {
|
|
|
8914
8910
|
}
|
|
8915
8911
|
//#endregion
|
|
8916
8912
|
//#region src/components/blockly/lock/index.vue
|
|
8917
|
-
var
|
|
8913
|
+
var Gi = /* @__PURE__ */ yt({
|
|
8918
8914
|
__name: "index",
|
|
8919
8915
|
props: {
|
|
8920
8916
|
modelValue: {
|
|
@@ -8942,11 +8938,11 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
8942
8938
|
}, 8, ["disabled", "text"]);
|
|
8943
8939
|
};
|
|
8944
8940
|
}
|
|
8945
|
-
}),
|
|
8941
|
+
}), Ki = { class: "d-flex flex-column" }, qi = { class: "text-body-large ml-6" }, Ji = {
|
|
8946
8942
|
key: 0,
|
|
8947
8943
|
class: "text-body-small text-grey text-truncate ml-6",
|
|
8948
8944
|
style: { maxWidth: "340px" }
|
|
8949
|
-
},
|
|
8945
|
+
}, Yi = /* @__PURE__ */ yt({
|
|
8950
8946
|
__name: "item",
|
|
8951
8947
|
props: {
|
|
8952
8948
|
id: {},
|
|
@@ -8977,7 +8973,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
8977
8973
|
onMouseout: n[2] ||= (e) => o.value = !1,
|
|
8978
8974
|
onMouseover: n[3] ||= (e) => o.value = !0
|
|
8979
8975
|
}, [
|
|
8980
|
-
D("div",
|
|
8976
|
+
D("div", Ki, [D("span", qi, Nt(e.title), 1), e.desc ? (A(), E("span", Ji, Nt(e.desc), 1)) : vt("", !0)]),
|
|
8981
8977
|
O(r),
|
|
8982
8978
|
O(i, {
|
|
8983
8979
|
class: "x-handle cursor-move mr-3",
|
|
@@ -8987,10 +8983,10 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
8987
8983
|
], 36)), [[c]]);
|
|
8988
8984
|
};
|
|
8989
8985
|
}
|
|
8990
|
-
}),
|
|
8986
|
+
}), Xi = {
|
|
8991
8987
|
key: 1,
|
|
8992
8988
|
class: "text-body-small text-grey"
|
|
8993
|
-
},
|
|
8989
|
+
}, Zi = /* @__PURE__ */ ((e, t) => {
|
|
8994
8990
|
let n = e.__vccOpts || e;
|
|
8995
8991
|
for (let [e, r] of t) n[e] = r;
|
|
8996
8992
|
return n;
|
|
@@ -9005,7 +9001,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9005
9001
|
}),
|
|
9006
9002
|
emits: ["update:modelValue"],
|
|
9007
9003
|
setup(e, { expose: t }) {
|
|
9008
|
-
let { t: n } = Ht(), r = Ft(e, "modelValue"), i =
|
|
9004
|
+
let { t: n } = Ht(), r = Ft(e, "modelValue"), i = Vi(), a = kt([]);
|
|
9009
9005
|
t({ update: () => {
|
|
9010
9006
|
if (!i.workspace) {
|
|
9011
9007
|
console.assert(!1);
|
|
@@ -9061,14 +9057,14 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9061
9057
|
let a = -10;
|
|
9062
9058
|
r !== "" && (a = i.workspace.getBlockById(r).getRelativeToSurfaceXY().y + 10);
|
|
9063
9059
|
let s = n.getRelativeToSurfaceXY();
|
|
9064
|
-
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(),
|
|
9060
|
+
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(), ki();
|
|
9065
9061
|
}, u = async (e) => {
|
|
9066
9062
|
if (!i.workspace) {
|
|
9067
9063
|
console.assert(!1);
|
|
9068
9064
|
return;
|
|
9069
9065
|
}
|
|
9070
9066
|
let t = i.workspace.getBlockById(e);
|
|
9071
|
-
Ae.setSelected(t),
|
|
9067
|
+
Ae.setSelected(t), Oi(e), r.value = !1;
|
|
9072
9068
|
};
|
|
9073
9069
|
return (e, t) => a.value.length > 0 ? (A(), _t(M(de), {
|
|
9074
9070
|
key: 0,
|
|
@@ -9081,7 +9077,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9081
9077
|
onMove: c,
|
|
9082
9078
|
onStart: s
|
|
9083
9079
|
}, {
|
|
9084
|
-
default: Rt(() => [(A(!0), E(gt, null, At(a.value, (e) => (A(), _t(
|
|
9080
|
+
default: Rt(() => [(A(!0), E(gt, null, At(a.value, (e) => (A(), _t(Yi, {
|
|
9085
9081
|
id: e.id,
|
|
9086
9082
|
key: e.id,
|
|
9087
9083
|
desc: e.desc,
|
|
@@ -9095,9 +9091,9 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9095
9091
|
"title"
|
|
9096
9092
|
]))), 128))]),
|
|
9097
9093
|
_: 1
|
|
9098
|
-
}, 8, ["modelValue"])) : (A(), E("span",
|
|
9094
|
+
}, 8, ["modelValue"])) : (A(), E("span", Xi, Nt(M(n)("x-block-lib.noOption")), 1));
|
|
9099
9095
|
}
|
|
9100
|
-
}), [["__scopeId", "data-v-899634e5"]]),
|
|
9096
|
+
}), [["__scopeId", "data-v-899634e5"]]), Qi = /* @__PURE__ */ yt({
|
|
9101
9097
|
__name: "index",
|
|
9102
9098
|
props: {
|
|
9103
9099
|
modelValue: {
|
|
@@ -9108,7 +9104,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9108
9104
|
},
|
|
9109
9105
|
emits: ["update:modelValue"],
|
|
9110
9106
|
setup(e, { expose: t }) {
|
|
9111
|
-
let n = Ft(e, "modelValue"), r =
|
|
9107
|
+
let n = Ft(e, "modelValue"), r = Vi();
|
|
9112
9108
|
t({ update: () => {
|
|
9113
9109
|
if (!r.workspace) {
|
|
9114
9110
|
console.assert(!1);
|
|
@@ -9122,11 +9118,11 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9122
9118
|
return;
|
|
9123
9119
|
}
|
|
9124
9120
|
let r = t.getBlockById(e);
|
|
9125
|
-
Ae.setSelected(r),
|
|
9121
|
+
Ae.setSelected(r), Oi(e), n.value = !1;
|
|
9126
9122
|
};
|
|
9127
9123
|
return (e, t) => (A(), E("div", { onClick: t[0] ||= (e) => i("") }, "blockTree"));
|
|
9128
9124
|
}
|
|
9129
|
-
}),
|
|
9125
|
+
}), $i = { class: "text-body-large" }, ea = /* @__PURE__ */ yt({
|
|
9130
9126
|
__name: "index",
|
|
9131
9127
|
props: {
|
|
9132
9128
|
type: {},
|
|
@@ -9193,7 +9189,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9193
9189
|
variant: "text",
|
|
9194
9190
|
onClick: r[0] ||= (e) => u.value = !1
|
|
9195
9191
|
}),
|
|
9196
|
-
D("span",
|
|
9192
|
+
D("span", $i, Nt(M(n)("x-block-lib.navigator")), 1),
|
|
9197
9193
|
O(f)
|
|
9198
9194
|
]),
|
|
9199
9195
|
_: 1
|
|
@@ -9201,14 +9197,14 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9201
9197
|
D("div", {
|
|
9202
9198
|
class: "overflow-y-auto",
|
|
9203
9199
|
style: k(c.value)
|
|
9204
|
-
}, [e.type === "list" ? (A(), _t(
|
|
9200
|
+
}, [e.type === "list" ? (A(), _t(Zi, {
|
|
9205
9201
|
key: 0,
|
|
9206
9202
|
ref_key: "blockList",
|
|
9207
9203
|
ref: ee,
|
|
9208
9204
|
modelValue: M(u),
|
|
9209
9205
|
"onUpdate:modelValue": r[1] ||= (e) => xt(u) ? u.value = e : null,
|
|
9210
9206
|
lock: e.lock
|
|
9211
|
-
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (A(), _t(
|
|
9207
|
+
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (A(), _t(Qi, {
|
|
9212
9208
|
key: 1,
|
|
9213
9209
|
ref_key: "blockTree",
|
|
9214
9210
|
ref: te,
|
|
@@ -9231,7 +9227,7 @@ var Ki = /* @__PURE__ */ yt({
|
|
|
9231
9227
|
}, 8, ["disabled", "text"])], 64);
|
|
9232
9228
|
};
|
|
9233
9229
|
}
|
|
9234
|
-
}),
|
|
9230
|
+
}), ta = _e(), Z = p.xml;
|
|
9235
9231
|
function Q(e) {
|
|
9236
9232
|
let t = Z.createElement("label");
|
|
9237
9233
|
return t.setAttribute("text", e), t;
|
|
@@ -9241,12 +9237,12 @@ function $(e, t) {
|
|
|
9241
9237
|
if (n.setAttribute("type", e), t) for (let e of t) n.appendChild(e);
|
|
9242
9238
|
return n;
|
|
9243
9239
|
}
|
|
9244
|
-
function
|
|
9240
|
+
function na(e) {
|
|
9245
9241
|
let t = Z.createElement("mutation");
|
|
9246
9242
|
for (let { key: n, value: r } of e) t.setAttribute(n, r);
|
|
9247
9243
|
return t;
|
|
9248
9244
|
}
|
|
9249
|
-
function
|
|
9245
|
+
function ra(e, t) {
|
|
9250
9246
|
t === void 0 && (t = "");
|
|
9251
9247
|
let n = Z.createElement("value");
|
|
9252
9248
|
n.setAttribute("name", e);
|
|
@@ -9257,7 +9253,7 @@ function ia(e, t) {
|
|
|
9257
9253
|
let a = Z.createTextNode(t);
|
|
9258
9254
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9259
9255
|
}
|
|
9260
|
-
function
|
|
9256
|
+
function ia(e, t) {
|
|
9261
9257
|
t === void 0 && (t = 0);
|
|
9262
9258
|
let n = Z.createElement("value");
|
|
9263
9259
|
n.setAttribute("name", e);
|
|
@@ -9268,7 +9264,7 @@ function aa(e, t) {
|
|
|
9268
9264
|
let a = Z.createTextNode(String(t));
|
|
9269
9265
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9270
9266
|
}
|
|
9271
|
-
function
|
|
9267
|
+
function aa(e, t) {
|
|
9272
9268
|
t === void 0 && (t = !1);
|
|
9273
9269
|
let n = Z.createElement("value");
|
|
9274
9270
|
n.setAttribute("name", e);
|
|
@@ -9281,117 +9277,117 @@ function oa(e, t) {
|
|
|
9281
9277
|
}
|
|
9282
9278
|
//#endregion
|
|
9283
9279
|
//#region src/core/category/app/comp/v1/index.ts
|
|
9284
|
-
function
|
|
9280
|
+
function oa() {
|
|
9285
9281
|
let { activeObject: e, activeComp: t } = x.app;
|
|
9286
9282
|
return !(e.type !== "comp" || !t.meta.states || t.meta.states.length <= 0);
|
|
9287
9283
|
}
|
|
9288
|
-
function
|
|
9284
|
+
function sa() {
|
|
9289
9285
|
let e = [];
|
|
9290
|
-
return e.push(Q(N("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [
|
|
9286
|
+
return e.push(Q(N("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [na([{
|
|
9291
9287
|
key: "items",
|
|
9292
9288
|
value: "2"
|
|
9293
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(N("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9289
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(N("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), oa() && (e.push(Q(N("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), (U("callMethod") || U("implementMethod")) && e.push(Q(N("LABEL_METHOD"))), U("callMethod") && e.push($("call_app_method_v1")), U("implementMethod") && (e.push($("implement_app_method_v1")), U("implementMethodOutput") && e.push($("set_app_method_output_v1")), e.push($("procedure_return_v1"))), e;
|
|
9294
9290
|
}
|
|
9295
|
-
var
|
|
9291
|
+
var ca = {
|
|
9296
9292
|
name: "APP_COMP_CATEGORY",
|
|
9297
|
-
callback:
|
|
9293
|
+
callback: sa
|
|
9298
9294
|
};
|
|
9299
9295
|
//#endregion
|
|
9300
9296
|
//#region src/core/category/app/compute/v1/index.ts
|
|
9301
|
-
function
|
|
9297
|
+
function la() {
|
|
9302
9298
|
let e = [];
|
|
9303
9299
|
return e.push(Q(N("LABEL_FUNC"))), e.push(Q(N("LABEL_FLOW"))), e;
|
|
9304
9300
|
}
|
|
9305
|
-
var
|
|
9301
|
+
var ua = {
|
|
9306
9302
|
name: "APP_COMPUTE_CATEGORY",
|
|
9307
|
-
callback:
|
|
9303
|
+
callback: la
|
|
9308
9304
|
};
|
|
9309
9305
|
//#endregion
|
|
9310
9306
|
//#region src/core/category/app/message/v1/index.ts
|
|
9311
|
-
function
|
|
9307
|
+
function da() {
|
|
9312
9308
|
let e = [];
|
|
9313
|
-
return e.push($("app_debug_trace_v1", [
|
|
9309
|
+
return e.push($("app_debug_trace_v1", [ra("OBJECT")])), e.push($("popup_message_v1", [ra("TEXT")])), e.push($("open_confirm_dlg_v1")), e.push($("open_prompt_dlg_v1")), e;
|
|
9314
9310
|
}
|
|
9315
|
-
var
|
|
9311
|
+
var fa = {
|
|
9316
9312
|
name: "APP_MESSAGE_CATEGORY",
|
|
9317
|
-
callback:
|
|
9313
|
+
callback: da
|
|
9318
9314
|
};
|
|
9319
9315
|
//#endregion
|
|
9320
9316
|
//#region src/core/category/app/misc/v1/index.ts
|
|
9321
|
-
function
|
|
9317
|
+
function pa() {
|
|
9322
9318
|
for (let e of x.app.appList) if (e.pages.length > 0) return !0;
|
|
9323
9319
|
return !1;
|
|
9324
9320
|
}
|
|
9325
|
-
function
|
|
9321
|
+
function ma() {
|
|
9326
9322
|
let e = [];
|
|
9327
|
-
return e.push($("app_env_is_v1")),
|
|
9323
|
+
return e.push($("app_env_is_v1")), pa() && e.push($("navigate_to_v1")), e;
|
|
9328
9324
|
}
|
|
9329
|
-
var
|
|
9325
|
+
var ha = {
|
|
9330
9326
|
name: "APP_MISC_CATEGORY",
|
|
9331
|
-
callback:
|
|
9327
|
+
callback: ma
|
|
9332
9328
|
};
|
|
9333
9329
|
//#endregion
|
|
9334
9330
|
//#region src/core/category/app/page/v1/index.ts
|
|
9335
|
-
function
|
|
9331
|
+
function ga() {
|
|
9336
9332
|
let { activeObject: e, activePage: t } = x.app;
|
|
9337
9333
|
return !(e.type !== "page" || !t.meta.states || t.meta.states.length <= 0);
|
|
9338
9334
|
}
|
|
9339
|
-
function
|
|
9335
|
+
function _a() {
|
|
9340
9336
|
let { activeObject: e, activePage: t } = x.app;
|
|
9341
9337
|
return !(e.type !== "page" || !t.meta.arguments || t.meta.arguments.length <= 0);
|
|
9342
9338
|
}
|
|
9343
|
-
function
|
|
9339
|
+
function va() {
|
|
9344
9340
|
let e = [];
|
|
9345
|
-
return e.push(Q(N("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [
|
|
9341
|
+
return e.push(Q(N("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [na([{
|
|
9346
9342
|
key: "items",
|
|
9347
9343
|
value: "2"
|
|
9348
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(N("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9344
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(N("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), ga() && (e.push(Q(N("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), U("callMethod") && (e.push(Q(N("LABEL_METHOD"))), e.push($("call_app_method_v1"))), _a() && (e.push(Q(N("LABEL_ARGUMENT"))), e.push($("get_page_argument_v1"))), e;
|
|
9349
9345
|
}
|
|
9350
|
-
var
|
|
9346
|
+
var ya = {
|
|
9351
9347
|
name: "APP_PAGE_CATEGORY",
|
|
9352
|
-
callback:
|
|
9348
|
+
callback: va
|
|
9353
9349
|
};
|
|
9354
9350
|
//#endregion
|
|
9355
9351
|
//#region src/core/category/app/resource/v1/index.ts
|
|
9356
|
-
function
|
|
9352
|
+
function ba() {
|
|
9357
9353
|
let e = [];
|
|
9358
9354
|
return e.push(Q(N("LABEL_RESOURCE"))), e.push($("upload_resource_v1")), e;
|
|
9359
9355
|
}
|
|
9360
|
-
var
|
|
9356
|
+
var xa = {
|
|
9361
9357
|
name: "APP_RESOURCE_CATEGORY",
|
|
9362
|
-
callback:
|
|
9363
|
-
},
|
|
9364
|
-
function
|
|
9358
|
+
callback: ba
|
|
9359
|
+
}, Sa = p.xml;
|
|
9360
|
+
function Ca() {
|
|
9365
9361
|
let e = [];
|
|
9366
9362
|
{
|
|
9367
|
-
let t =
|
|
9363
|
+
let t = Sa.createElement("label");
|
|
9368
9364
|
t.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(t);
|
|
9369
9365
|
}
|
|
9370
9366
|
{
|
|
9371
|
-
let t =
|
|
9367
|
+
let t = Sa.createElement("block");
|
|
9372
9368
|
t.setAttribute("type", "procedure_def_v1");
|
|
9373
9369
|
{
|
|
9374
|
-
let e =
|
|
9370
|
+
let e = Sa.createElement("field");
|
|
9375
9371
|
e.setAttribute("name", "NAME");
|
|
9376
|
-
let n =
|
|
9372
|
+
let n = Sa.createTextNode(N("PROCEDURE_DEFAULT_NAME"));
|
|
9377
9373
|
e.appendChild(n), t.appendChild(e);
|
|
9378
9374
|
}
|
|
9379
9375
|
e.push(t);
|
|
9380
9376
|
}
|
|
9381
9377
|
{
|
|
9382
|
-
let t =
|
|
9378
|
+
let t = Sa.createElement("block");
|
|
9383
9379
|
t.setAttribute("type", "procedure_return_v1"), e.push(t);
|
|
9384
9380
|
}
|
|
9385
9381
|
return e;
|
|
9386
9382
|
}
|
|
9387
|
-
var
|
|
9383
|
+
var wa = {
|
|
9388
9384
|
name: "PROCEDURE_CATEGORY",
|
|
9389
|
-
callback:
|
|
9390
|
-
},
|
|
9391
|
-
function
|
|
9385
|
+
callback: Ca
|
|
9386
|
+
}, Ta = p.xml;
|
|
9387
|
+
function Ea() {
|
|
9392
9388
|
let e = s(), t = [];
|
|
9393
9389
|
{
|
|
9394
|
-
let e =
|
|
9390
|
+
let e = Ta.createElement("label");
|
|
9395
9391
|
e.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), t.push(e);
|
|
9396
9392
|
}
|
|
9397
9393
|
{
|
|
@@ -9404,75 +9400,75 @@ function Da() {
|
|
|
9404
9400
|
if (n.length <= 0) return t;
|
|
9405
9401
|
n.sort(c.compareByName);
|
|
9406
9402
|
{
|
|
9407
|
-
let e =
|
|
9403
|
+
let e = Ta.createElement("label");
|
|
9408
9404
|
e.setAttribute("text", N("LABEL_CREATED")), t.push(e);
|
|
9409
9405
|
}
|
|
9410
9406
|
return n.forEach((e) => {
|
|
9411
9407
|
{
|
|
9412
|
-
let n =
|
|
9408
|
+
let n = Ta.createElement("block");
|
|
9413
9409
|
n.setAttribute("type", "variable_get_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9414
9410
|
}
|
|
9415
9411
|
{
|
|
9416
|
-
let n =
|
|
9412
|
+
let n = Ta.createElement("block");
|
|
9417
9413
|
n.setAttribute("type", "variable_set_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9418
9414
|
}
|
|
9419
9415
|
}), t;
|
|
9420
9416
|
}
|
|
9421
|
-
var
|
|
9417
|
+
var Da = {
|
|
9422
9418
|
name: "VARIABLE_CATEGORY",
|
|
9423
|
-
callback:
|
|
9419
|
+
callback: Ea
|
|
9424
9420
|
};
|
|
9425
9421
|
//#endregion
|
|
9426
9422
|
//#region src/core/category/compute/data/v1/index.ts
|
|
9427
|
-
function
|
|
9423
|
+
function Oa() {
|
|
9428
9424
|
let e = [];
|
|
9429
|
-
if (Y().length > 0) e.push(Q(N("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [
|
|
9425
|
+
if (Y().length > 0) e.push(Q(N("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [ra("VALUE")])), e.push(Q(N("LABEL_CONDITION"))), e.push($("cond_logic_v1")), e.push($("cond_atomic_v1", [ra("VALUE")])), e.push(Q(N("LABEL_QUERY_EXTRA"))), e.push($("query_extra_limit_v1", [ia("OFFSET", 0), ia("LIMIT", 1)])), e.push($("query_extra_sortby_v1", [ra("COLUMN"), aa("DESC")]));
|
|
9430
9426
|
else {
|
|
9431
9427
|
let t = document.createElement("button");
|
|
9432
9428
|
t.setAttribute("text", N("BUTTON_NO_TABLE")), t.setAttribute("callbackKey", "NO_TABLE"), e.push(t);
|
|
9433
9429
|
}
|
|
9434
9430
|
return e;
|
|
9435
9431
|
}
|
|
9436
|
-
var
|
|
9432
|
+
var ka = {
|
|
9437
9433
|
name: "COMPUTE_DATA_CATEGORY",
|
|
9438
|
-
callback:
|
|
9434
|
+
callback: Oa
|
|
9439
9435
|
};
|
|
9440
9436
|
//#endregion
|
|
9441
9437
|
//#region src/core/category/compute/flow/v1/index.ts
|
|
9442
|
-
function
|
|
9443
|
-
return
|
|
9438
|
+
function Aa() {
|
|
9439
|
+
return jr("flow").length > 0;
|
|
9444
9440
|
}
|
|
9445
|
-
function
|
|
9441
|
+
function ja() {
|
|
9446
9442
|
let e = [];
|
|
9447
|
-
return x.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")),
|
|
9443
|
+
return x.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")), Aa() && console.assert(!0), e;
|
|
9448
9444
|
}
|
|
9449
|
-
var
|
|
9445
|
+
var Ma = {
|
|
9450
9446
|
name: "COMPUTE_FLOW_CATEGORY",
|
|
9451
|
-
callback:
|
|
9447
|
+
callback: ja
|
|
9452
9448
|
};
|
|
9453
9449
|
//#endregion
|
|
9454
9450
|
//#region src/core/category/compute/func/v1/index.ts
|
|
9455
|
-
function
|
|
9456
|
-
return
|
|
9451
|
+
function Na() {
|
|
9452
|
+
return jr("func").length > 0;
|
|
9457
9453
|
}
|
|
9458
|
-
function
|
|
9454
|
+
function Pa() {
|
|
9459
9455
|
let { activeObject: e, activeFunc: t } = x.compute, n = [];
|
|
9460
|
-
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))),
|
|
9456
|
+
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))), Na() && n.push($("call_func_internal_v1")), n;
|
|
9461
9457
|
}
|
|
9462
|
-
var
|
|
9458
|
+
var Fa = {
|
|
9463
9459
|
name: "COMPUTE_FUNC_CATEGORY",
|
|
9464
|
-
callback:
|
|
9460
|
+
callback: Pa
|
|
9465
9461
|
};
|
|
9466
9462
|
//#endregion
|
|
9467
9463
|
//#region src/core/category/compute/misc/v1/index.ts
|
|
9468
|
-
function
|
|
9464
|
+
function Ia() {
|
|
9469
9465
|
let e = [];
|
|
9470
|
-
return e.push($("compute_debug_trace_v1", [
|
|
9466
|
+
return e.push($("compute_debug_trace_v1", [ra("OBJECT")])), e;
|
|
9471
9467
|
}
|
|
9472
|
-
var
|
|
9468
|
+
var La = {
|
|
9473
9469
|
name: "COMPUTE_MISC_CATEGORY",
|
|
9474
|
-
callback:
|
|
9475
|
-
},
|
|
9470
|
+
callback: Ia
|
|
9471
|
+
}, Ra = {
|
|
9476
9472
|
kind: "category",
|
|
9477
9473
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9478
9474
|
categorystyle: "color_category",
|
|
@@ -9522,7 +9518,7 @@ var Ra = {
|
|
|
9522
9518
|
}
|
|
9523
9519
|
}
|
|
9524
9520
|
]
|
|
9525
|
-
},
|
|
9521
|
+
}, za = {
|
|
9526
9522
|
kind: "category",
|
|
9527
9523
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9528
9524
|
categorystyle: "list_category",
|
|
@@ -9603,7 +9599,7 @@ var Ra = {
|
|
|
9603
9599
|
type: "list_reverse_v1"
|
|
9604
9600
|
}
|
|
9605
9601
|
]
|
|
9606
|
-
},
|
|
9602
|
+
}, Ba = {
|
|
9607
9603
|
kind: "category",
|
|
9608
9604
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9609
9605
|
categorystyle: "logic_category",
|
|
@@ -9645,7 +9641,7 @@ var Ra = {
|
|
|
9645
9641
|
type: "logic_ternary_v1"
|
|
9646
9642
|
}
|
|
9647
9643
|
]
|
|
9648
|
-
},
|
|
9644
|
+
}, Va = {
|
|
9649
9645
|
kind: "category",
|
|
9650
9646
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9651
9647
|
categorystyle: "loop_category",
|
|
@@ -9689,7 +9685,7 @@ var Ra = {
|
|
|
9689
9685
|
type: "flow_control_v1"
|
|
9690
9686
|
}
|
|
9691
9687
|
]
|
|
9692
|
-
},
|
|
9688
|
+
}, Ha = {
|
|
9693
9689
|
kind: "category",
|
|
9694
9690
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9695
9691
|
categorystyle: "math_category",
|
|
@@ -9794,7 +9790,7 @@ var Ra = {
|
|
|
9794
9790
|
type: "math_on_list_v1"
|
|
9795
9791
|
}
|
|
9796
9792
|
]
|
|
9797
|
-
},
|
|
9793
|
+
}, Ua = {
|
|
9798
9794
|
kind: "category",
|
|
9799
9795
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9800
9796
|
categorystyle: "object_category",
|
|
@@ -9844,7 +9840,7 @@ var Ra = {
|
|
|
9844
9840
|
} } }
|
|
9845
9841
|
}
|
|
9846
9842
|
]
|
|
9847
|
-
},
|
|
9843
|
+
}, Wa = {
|
|
9848
9844
|
kind: "category",
|
|
9849
9845
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9850
9846
|
categorystyle: "text_category",
|
|
@@ -9959,7 +9955,7 @@ var Ra = {
|
|
|
9959
9955
|
type: "text_reverse_v1"
|
|
9960
9956
|
}
|
|
9961
9957
|
]
|
|
9962
|
-
},
|
|
9958
|
+
}, Ga = {
|
|
9963
9959
|
kind: "category",
|
|
9964
9960
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9965
9961
|
categorystyle: "time_category",
|
|
@@ -9974,155 +9970,155 @@ var Ra = {
|
|
|
9974
9970
|
fields: { NUM: 1e3 }
|
|
9975
9971
|
} } }
|
|
9976
9972
|
}]
|
|
9977
|
-
},
|
|
9973
|
+
}, Ka = {
|
|
9978
9974
|
kind: "categoryToolbox",
|
|
9979
9975
|
contents: [
|
|
9980
9976
|
{
|
|
9981
9977
|
kind: "category",
|
|
9982
9978
|
name: "%{BKY_CATEGORY_COMP}",
|
|
9983
9979
|
categorystyle: "misc_category",
|
|
9984
|
-
custom:
|
|
9980
|
+
custom: ca.name
|
|
9985
9981
|
},
|
|
9986
9982
|
{
|
|
9987
9983
|
kind: "category",
|
|
9988
9984
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9989
9985
|
categorystyle: "misc_category",
|
|
9990
|
-
custom:
|
|
9986
|
+
custom: fa.name
|
|
9991
9987
|
},
|
|
9992
9988
|
{
|
|
9993
9989
|
kind: "category",
|
|
9994
9990
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9995
9991
|
categorystyle: "misc_category",
|
|
9996
|
-
custom:
|
|
9992
|
+
custom: ha.name
|
|
9997
9993
|
},
|
|
9998
|
-
Ha,
|
|
9999
9994
|
Va,
|
|
10000
|
-
Ua,
|
|
10001
|
-
Ga,
|
|
10002
9995
|
Ba,
|
|
9996
|
+
Ha,
|
|
10003
9997
|
Wa,
|
|
10004
9998
|
za,
|
|
10005
|
-
|
|
9999
|
+
Ua,
|
|
10000
|
+
Ra,
|
|
10001
|
+
Ga,
|
|
10006
10002
|
{
|
|
10007
10003
|
kind: "category",
|
|
10008
10004
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10009
10005
|
categorystyle: "variable_category",
|
|
10010
|
-
custom:
|
|
10006
|
+
custom: Da.name
|
|
10011
10007
|
},
|
|
10012
10008
|
{
|
|
10013
10009
|
kind: "category",
|
|
10014
10010
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10015
10011
|
categorystyle: "procedure_category",
|
|
10016
|
-
custom:
|
|
10012
|
+
custom: wa.name
|
|
10017
10013
|
},
|
|
10018
10014
|
{
|
|
10019
10015
|
kind: "category",
|
|
10020
10016
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10021
10017
|
categorystyle: "resource_category",
|
|
10022
|
-
custom:
|
|
10018
|
+
custom: xa.name
|
|
10023
10019
|
},
|
|
10024
10020
|
{
|
|
10025
10021
|
kind: "category",
|
|
10026
10022
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10027
10023
|
categorystyle: "compute_category",
|
|
10028
|
-
custom:
|
|
10024
|
+
custom: ua.name
|
|
10029
10025
|
}
|
|
10030
10026
|
]
|
|
10031
|
-
},
|
|
10027
|
+
}, qa = {
|
|
10032
10028
|
kind: "categoryToolbox",
|
|
10033
10029
|
contents: [
|
|
10034
10030
|
{
|
|
10035
10031
|
kind: "category",
|
|
10036
10032
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10037
10033
|
categorystyle: "func_category",
|
|
10038
|
-
custom:
|
|
10034
|
+
custom: Fa.name
|
|
10039
10035
|
},
|
|
10040
10036
|
{
|
|
10041
10037
|
kind: "category",
|
|
10042
10038
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10043
10039
|
categorystyle: "flow_category",
|
|
10044
|
-
custom:
|
|
10040
|
+
custom: Ma.name
|
|
10045
10041
|
},
|
|
10046
10042
|
{
|
|
10047
10043
|
kind: "category",
|
|
10048
10044
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10049
10045
|
categorystyle: "data_category",
|
|
10050
|
-
custom:
|
|
10046
|
+
custom: ka.name
|
|
10051
10047
|
},
|
|
10052
10048
|
{
|
|
10053
10049
|
kind: "category",
|
|
10054
10050
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10055
10051
|
categorystyle: "misc_category",
|
|
10056
|
-
custom:
|
|
10052
|
+
custom: La.name
|
|
10057
10053
|
},
|
|
10058
|
-
Ha,
|
|
10059
10054
|
Va,
|
|
10060
|
-
Ua,
|
|
10061
|
-
Ga,
|
|
10062
10055
|
Ba,
|
|
10056
|
+
Ha,
|
|
10063
10057
|
Wa,
|
|
10064
10058
|
za,
|
|
10059
|
+
Ua,
|
|
10060
|
+
Ra,
|
|
10065
10061
|
{
|
|
10066
10062
|
kind: "category",
|
|
10067
10063
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10068
10064
|
categorystyle: "variable_category",
|
|
10069
|
-
custom:
|
|
10065
|
+
custom: Da.name
|
|
10070
10066
|
},
|
|
10071
10067
|
{
|
|
10072
10068
|
kind: "category",
|
|
10073
10069
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10074
10070
|
categorystyle: "procedure_category",
|
|
10075
|
-
custom:
|
|
10071
|
+
custom: wa.name
|
|
10076
10072
|
}
|
|
10077
10073
|
]
|
|
10078
|
-
},
|
|
10074
|
+
}, Ja = {
|
|
10079
10075
|
kind: "categoryToolbox",
|
|
10080
10076
|
contents: [
|
|
10081
10077
|
{
|
|
10082
10078
|
kind: "category",
|
|
10083
10079
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
10084
10080
|
categorystyle: "func_category",
|
|
10085
|
-
custom:
|
|
10081
|
+
custom: Fa.name
|
|
10086
10082
|
},
|
|
10087
10083
|
{
|
|
10088
10084
|
kind: "category",
|
|
10089
10085
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
10090
10086
|
categorystyle: "flow_category",
|
|
10091
|
-
custom:
|
|
10087
|
+
custom: Ma.name
|
|
10092
10088
|
},
|
|
10093
10089
|
{
|
|
10094
10090
|
kind: "category",
|
|
10095
10091
|
name: "%{BKY_CATEGORY_DATA}",
|
|
10096
10092
|
categorystyle: "data_category",
|
|
10097
|
-
custom:
|
|
10093
|
+
custom: ka.name
|
|
10098
10094
|
},
|
|
10099
10095
|
{
|
|
10100
10096
|
kind: "category",
|
|
10101
10097
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10102
10098
|
categorystyle: "misc_category",
|
|
10103
|
-
custom:
|
|
10099
|
+
custom: La.name
|
|
10104
10100
|
},
|
|
10105
|
-
Ha,
|
|
10106
10101
|
Va,
|
|
10107
|
-
Ua,
|
|
10108
|
-
Ga,
|
|
10109
10102
|
Ba,
|
|
10103
|
+
Ha,
|
|
10110
10104
|
Wa,
|
|
10111
10105
|
za,
|
|
10106
|
+
Ua,
|
|
10107
|
+
Ra,
|
|
10112
10108
|
{
|
|
10113
10109
|
kind: "category",
|
|
10114
10110
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10115
10111
|
categorystyle: "variable_category",
|
|
10116
|
-
custom:
|
|
10112
|
+
custom: Da.name
|
|
10117
10113
|
},
|
|
10118
10114
|
{
|
|
10119
10115
|
kind: "category",
|
|
10120
10116
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10121
10117
|
categorystyle: "procedure_category",
|
|
10122
|
-
custom:
|
|
10118
|
+
custom: wa.name
|
|
10123
10119
|
}
|
|
10124
10120
|
]
|
|
10125
|
-
},
|
|
10121
|
+
}, Ya = {
|
|
10126
10122
|
kind: "categoryToolbox",
|
|
10127
10123
|
contents: [{
|
|
10128
10124
|
kind: "category",
|
|
@@ -10151,61 +10147,61 @@ var Ra = {
|
|
|
10151
10147
|
}
|
|
10152
10148
|
]
|
|
10153
10149
|
}]
|
|
10154
|
-
},
|
|
10150
|
+
}, Xa = {
|
|
10155
10151
|
kind: "categoryToolbox",
|
|
10156
10152
|
contents: [
|
|
10157
10153
|
{
|
|
10158
10154
|
kind: "category",
|
|
10159
10155
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
10160
10156
|
categorystyle: "misc_category",
|
|
10161
|
-
custom:
|
|
10157
|
+
custom: ya.name
|
|
10162
10158
|
},
|
|
10163
10159
|
{
|
|
10164
10160
|
kind: "category",
|
|
10165
10161
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
10166
10162
|
categorystyle: "misc_category",
|
|
10167
|
-
custom:
|
|
10163
|
+
custom: fa.name
|
|
10168
10164
|
},
|
|
10169
10165
|
{
|
|
10170
10166
|
kind: "category",
|
|
10171
10167
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10172
10168
|
categorystyle: "misc_category",
|
|
10173
|
-
custom:
|
|
10169
|
+
custom: ha.name
|
|
10174
10170
|
},
|
|
10175
|
-
Ha,
|
|
10176
10171
|
Va,
|
|
10177
|
-
Ua,
|
|
10178
|
-
Ga,
|
|
10179
10172
|
Ba,
|
|
10173
|
+
Ha,
|
|
10180
10174
|
Wa,
|
|
10181
10175
|
za,
|
|
10182
|
-
|
|
10176
|
+
Ua,
|
|
10177
|
+
Ra,
|
|
10178
|
+
Ga,
|
|
10183
10179
|
{
|
|
10184
10180
|
kind: "category",
|
|
10185
10181
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10186
10182
|
categorystyle: "variable_category",
|
|
10187
|
-
custom:
|
|
10183
|
+
custom: Da.name
|
|
10188
10184
|
},
|
|
10189
10185
|
{
|
|
10190
10186
|
kind: "category",
|
|
10191
10187
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10192
10188
|
categorystyle: "procedure_category",
|
|
10193
|
-
custom:
|
|
10189
|
+
custom: wa.name
|
|
10194
10190
|
},
|
|
10195
10191
|
{
|
|
10196
10192
|
kind: "category",
|
|
10197
10193
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10198
10194
|
categorystyle: "resource_category",
|
|
10199
|
-
custom:
|
|
10195
|
+
custom: xa.name
|
|
10200
10196
|
},
|
|
10201
10197
|
{
|
|
10202
10198
|
kind: "category",
|
|
10203
10199
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10204
10200
|
categorystyle: "compute_category",
|
|
10205
|
-
custom:
|
|
10201
|
+
custom: ua.name
|
|
10206
10202
|
}
|
|
10207
10203
|
]
|
|
10208
|
-
},
|
|
10204
|
+
}, Za = {
|
|
10209
10205
|
grid: {
|
|
10210
10206
|
length: 2,
|
|
10211
10207
|
snap: !0,
|
|
@@ -10229,11 +10225,11 @@ var Ra = {
|
|
|
10229
10225
|
wheel: !0
|
|
10230
10226
|
}
|
|
10231
10227
|
};
|
|
10232
|
-
function
|
|
10233
|
-
|
|
10234
|
-
let i = o(e,
|
|
10228
|
+
function Qa(e, t, n, r) {
|
|
10229
|
+
Za.theme = r ? "dark" : "light", Za.toolbox = $a(t, n);
|
|
10230
|
+
let i = o(e, Za);
|
|
10235
10231
|
return i.addChangeListener((e) => {
|
|
10236
|
-
if (e.type ===
|
|
10232
|
+
if (e.type === Ei.STATE_CHANGE) {
|
|
10237
10233
|
let e = i.getAllBlocks();
|
|
10238
10234
|
for (let t of e) {
|
|
10239
10235
|
let e = t;
|
|
@@ -10241,21 +10237,21 @@ function $a(e, t, n, r) {
|
|
|
10241
10237
|
}
|
|
10242
10238
|
}
|
|
10243
10239
|
setTimeout(() => {
|
|
10244
|
-
(0,
|
|
10240
|
+
(0, ta.shadowBlockConversionChangeListener)(e);
|
|
10245
10241
|
}, 0);
|
|
10246
|
-
}),
|
|
10242
|
+
}), eo(i, t, n), to(i), i;
|
|
10247
10243
|
}
|
|
10248
|
-
function
|
|
10244
|
+
function $a(e, t) {
|
|
10249
10245
|
let n;
|
|
10250
|
-
return e === "page" ? t === "v1" && (n =
|
|
10246
|
+
return e === "page" ? t === "v1" && (n = Xa) : e === "comp" ? t === "v1" && (n = Ka) : e === "func" ? t === "v1" && (n = Ja) : e === "flow" ? t === "v1" && (n = qa) : e === "json" && t === "v1" && (n = Ya), console.assert(!!n, `invalid toolbox type=${e} version=${t}`), n;
|
|
10251
10247
|
}
|
|
10252
|
-
function
|
|
10248
|
+
function eo(e, t, n) {
|
|
10253
10249
|
function r({ name: n, callback: r }) {
|
|
10254
10250
|
e.registerToolboxCategoryCallback(n, () => r(t));
|
|
10255
10251
|
}
|
|
10256
|
-
t === "page" ? n === "v1" && (r(
|
|
10252
|
+
t === "page" ? n === "v1" && (r(ya), r(fa), r(ha), r(Da), r(wa), r(xa), r(ua)) : t === "comp" ? n === "v1" && (r(ca), r(fa), r(ha), r(Da), r(wa), r(xa), r(ua)) : t === "func" ? n === "v1" && (r(Fa), r(Ma), r(ka), r(La), r(Da), r(wa)) : t === "flow" && n === "v1" && (r(Fa), r(Ma), r(ka), r(La), r(Da), r(wa));
|
|
10257
10253
|
}
|
|
10258
|
-
function
|
|
10254
|
+
function to(e) {
|
|
10259
10255
|
let { router: t } = Me;
|
|
10260
10256
|
e.registerButtonCallback("NO_COMPUTE", () => {
|
|
10261
10257
|
let e = t.resolve({ path: "/compute/" + Date.now() });
|
|
@@ -10271,7 +10267,7 @@ function no(e) {
|
|
|
10271
10267
|
}
|
|
10272
10268
|
//#endregion
|
|
10273
10269
|
//#region src/components/blockly/index.vue?vue&type=script&setup=true&lang.ts
|
|
10274
|
-
var
|
|
10270
|
+
var no = { class: "position-relative w-100 h-100" }, ro = /* @__PURE__ */ yt({
|
|
10275
10271
|
__name: "index",
|
|
10276
10272
|
props: /* @__PURE__ */ St({
|
|
10277
10273
|
type: {},
|
|
@@ -10290,7 +10286,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10290
10286
|
emits: /* @__PURE__ */ St(["ready"], ["update:lock", "update:scale"]),
|
|
10291
10287
|
setup(e, { expose: t, emit: n }) {
|
|
10292
10288
|
let { backgroundColor2: r } = Ie(), i = Ft(e, "lock"), a = Ft(e, "scale"), o = n, s = `blocklyEditor${Pt()}`, c = kt(), u = It("parentContainer"), ee = It("clean"), te = It("navigator"), d = {};
|
|
10293
|
-
|
|
10289
|
+
Bi(d);
|
|
10294
10290
|
let f = kt(!0), ne = kt(!1), p = T(() => e.type === "json" ? "tree" : "list"), re = T(() => ({
|
|
10295
10291
|
width: "100%",
|
|
10296
10292
|
height: "calc(100% - 48px)"
|
|
@@ -10340,7 +10336,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10340
10336
|
console.assert(!1);
|
|
10341
10337
|
return;
|
|
10342
10338
|
}
|
|
10343
|
-
ce(u.value), await Gt(e.locale), d.workspace =
|
|
10339
|
+
ce(u.value), await Gt(e.locale), d.workspace = Qa(c.value, e.type, e.version, e.dark), d.workspace.addChangeListener(b.disableOrphans), d.workspace.addChangeListener(fe);
|
|
10344
10340
|
let t = document.querySelector(`#${s} .blocklyFlyout`);
|
|
10345
10341
|
new MutationObserver((e) => {
|
|
10346
10342
|
e.forEach((e) => {
|
|
@@ -10354,7 +10350,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10354
10350
|
});
|
|
10355
10351
|
async function fe(e) {
|
|
10356
10352
|
if (e.type === b.FINISHED_LOADING) {
|
|
10357
|
-
|
|
10353
|
+
ki(), setTimeout(() => {
|
|
10358
10354
|
te.value?.update();
|
|
10359
10355
|
}, 0), f.value = !1;
|
|
10360
10356
|
return;
|
|
@@ -10370,18 +10366,18 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10370
10366
|
}
|
|
10371
10367
|
}
|
|
10372
10368
|
let pe = (t) => {
|
|
10373
|
-
f.value = !0, e.type === "json" ?
|
|
10374
|
-
}, me = () => e.type === "json" ?
|
|
10369
|
+
f.value = !0, e.type === "json" ? Ui(t, d.workspace) : l.workspaces.load(t, d.workspace);
|
|
10370
|
+
}, me = () => e.type === "json" ? Wi(d.workspace) : l.workspaces.save(d.workspace), he = (e) => {
|
|
10375
10371
|
l.blocks.append(e, d.workspace);
|
|
10376
10372
|
}, g = () => {
|
|
10377
10373
|
if (e.type === "json") console.assert(!1);
|
|
10378
10374
|
else return h.workspaceToCode(d.workspace);
|
|
10379
|
-
}, ge = () =>
|
|
10375
|
+
}, ge = () => Ri(d.workspace), _e = () => {
|
|
10380
10376
|
d.workspace.setIsReadOnly(i.value), d.workspace.isReadOnly() && (de.value = !1);
|
|
10381
10377
|
}, ve = () => {
|
|
10382
10378
|
d.workspace.setScale(a.value);
|
|
10383
10379
|
}, ye = () => {
|
|
10384
|
-
b.fire(new (b.get(
|
|
10380
|
+
b.fire(new (b.get(Ei.STATE_CHANGE))(d.workspace));
|
|
10385
10381
|
}, be = () => {
|
|
10386
10382
|
ee.value?.cleanWorkspace();
|
|
10387
10383
|
}, xe = () => {
|
|
@@ -10396,7 +10392,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10396
10392
|
}), Lt(() => e.locale, (e) => {
|
|
10397
10393
|
Gt(e);
|
|
10398
10394
|
}), Lt(() => e.dark, (e) => {
|
|
10399
|
-
|
|
10395
|
+
Mi(e ? "dark" : "light");
|
|
10400
10396
|
}), Lt(de, (e) => {
|
|
10401
10397
|
e || d.workspace?.hideChaff();
|
|
10402
10398
|
}), Lt(i, () => {
|
|
@@ -10413,7 +10409,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10413
10409
|
fireStateChange: ye
|
|
10414
10410
|
}), (e, t) => {
|
|
10415
10411
|
let n = j("v-icon"), r = j("x-loading");
|
|
10416
|
-
return A(), E("div",
|
|
10412
|
+
return A(), E("div", no, [
|
|
10417
10413
|
D("div", {
|
|
10418
10414
|
id: s,
|
|
10419
10415
|
ref_key: "blocklyDiv",
|
|
@@ -10434,16 +10430,16 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10434
10430
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10435
10431
|
style: k(ae.value)
|
|
10436
10432
|
}, [
|
|
10437
|
-
O(
|
|
10433
|
+
O(Hi, {
|
|
10438
10434
|
ref_key: "clean",
|
|
10439
10435
|
ref: ee,
|
|
10440
10436
|
lock: i.value
|
|
10441
10437
|
}, null, 8, ["lock"]),
|
|
10442
|
-
O(
|
|
10438
|
+
O(Gi, {
|
|
10443
10439
|
modelValue: i.value,
|
|
10444
10440
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e
|
|
10445
10441
|
}, null, 8, ["modelValue"]),
|
|
10446
|
-
O(
|
|
10442
|
+
O(ea, {
|
|
10447
10443
|
ref_key: "navigator",
|
|
10448
10444
|
ref: te,
|
|
10449
10445
|
lock: i.value,
|
|
@@ -10470,7 +10466,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10470
10466
|
]);
|
|
10471
10467
|
};
|
|
10472
10468
|
}
|
|
10473
|
-
}),
|
|
10469
|
+
}), io = /* @__PURE__ */ yt({
|
|
10474
10470
|
__name: "index",
|
|
10475
10471
|
props: { code: {} },
|
|
10476
10472
|
setup(e) {
|
|
@@ -10492,7 +10488,7 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10492
10488
|
}, 8, ["color"]);
|
|
10493
10489
|
};
|
|
10494
10490
|
}
|
|
10495
|
-
}),
|
|
10491
|
+
}), ao = { class: "text-body-large" }, oo = { class: "w-100 h-100 overflow-auto" }, so = /* @__PURE__ */ yt({
|
|
10496
10492
|
__name: "index",
|
|
10497
10493
|
setup(e) {
|
|
10498
10494
|
let { t } = Ht(), { sysBarAvail: n } = Le(), { backgroundColor0: r, backgroundColor2: i } = Ie(), a = kt(""), o = T(() => {
|
|
@@ -10538,12 +10534,12 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10538
10534
|
variant: "text",
|
|
10539
10535
|
onClick: c[0] ||= (e) => s.value = !1
|
|
10540
10536
|
}),
|
|
10541
|
-
D("span",
|
|
10537
|
+
D("span", ao, Nt(M(t)("x-block-lib.dlg.source.title")), 1),
|
|
10542
10538
|
O(ee)
|
|
10543
10539
|
]),
|
|
10544
10540
|
_: 1
|
|
10545
10541
|
}, 8, ["color"]),
|
|
10546
|
-
D("div", { style: k(o.value) }, [D("div",
|
|
10542
|
+
D("div", { style: k(o.value) }, [D("div", oo, [O(io, { code: a.value }, null, 8, ["code"])])], 4)
|
|
10547
10543
|
]),
|
|
10548
10544
|
_: 1
|
|
10549
10545
|
}, 8, ["color"])]),
|
|
@@ -10551,12 +10547,12 @@ var ro = { class: "position-relative w-100 h-100" }, io = /* @__PURE__ */ yt({
|
|
|
10551
10547
|
}, 8, ["modelValue"]);
|
|
10552
10548
|
};
|
|
10553
10549
|
}
|
|
10554
|
-
}),
|
|
10555
|
-
e.component("XBlockly",
|
|
10550
|
+
}), co = (e) => {
|
|
10551
|
+
e.component("XBlockly", ro), e.component("XSourceDlg", so);
|
|
10556
10552
|
};
|
|
10557
10553
|
//#endregion
|
|
10558
10554
|
//#region src/i18n/index.ts
|
|
10559
|
-
async function
|
|
10555
|
+
async function lo(e) {
|
|
10560
10556
|
return (await Wt(/* @__PURE__ */ Object.assign({
|
|
10561
10557
|
"./locales/en/index.ts": () => import("./i18n-en.nyqc9jvc.js").then((e) => e.t),
|
|
10562
10558
|
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.hgqwzee0.js").then((e) => e.t)
|
|
@@ -10564,6 +10560,6 @@ async function uo(e) {
|
|
|
10564
10560
|
}
|
|
10565
10561
|
//#endregion
|
|
10566
10562
|
//#region src/index.ts
|
|
10567
|
-
var
|
|
10563
|
+
var uo = { install: co };
|
|
10568
10564
|
//#endregion
|
|
10569
|
-
export {
|
|
10565
|
+
export { ro as XBlockly, uo as default, or as getCallMethodInfo, ur as getImplementMethodInfo, W as getNodeInfo, $n as getOnEventInfo, yr as getPropertyInfo, nr as getTriggerEventInfo, co as install, lo as loadLocaleMessageBlock };
|