x-block-lib 0.8.45 → 0.8.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/utils/app/event.d.ts +2 -7
- package/dist/core/utils/app/method.d.ts +5 -15
- package/dist/index.js +308 -287
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode("pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-daa85471]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}")),document.head.appendChild(l)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { E as I, r as Tn, M as
|
|
2
|
+
import { E as I, r as Tn, M as vo, s as yo, a as Co, X as Rn, u as C, B as E, j as s, O as u, F as O, b as Ge, i as y, c as Et, d as ko, e as U, f as T, g as No, h as $, k as ft, p as Ft, l as ot, m as En, n as B, C as Dn, N as it, o as Lo, P as We, q as Ve, V as St, t as Mn, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as jt, T as Ie, A as Un, D as Mo, G as Uo, H as Vn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as $o, Y as Ho } from "./vendor.je7mkgas.js";
|
|
3
3
|
import { globalState as g } from "x-state-lib";
|
|
4
4
|
import { globalObjects as kt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as xn, useColor as Xt, useSystem as Yn, useViewStack as nn, eventBus as Lt } from "x-essential-lib";
|
|
5
|
-
import { pkgs as se, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as on, elements as et, makeEventId as Z, toEventName as Oe, unwrapMethodId as Jt, makeMethodId as Yt, toMethodName as
|
|
5
|
+
import { pkgs as se, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as on, elements as et, makeEventId as Z, toEventName as Oe, unwrapMethodId as Jt, makeMethodId as Yt, toMethodName as ve, unwrapPropertyId as Jo, makePropertyId as ee, toPropertyName as Fn, isLocaleOfMethodKind as wn, makeTriggerId as vt } from "x-runtime-lib";
|
|
6
6
|
import { provide as qo, inject as Qo, defineComponent as rt, resolveComponent as M, createBlock as st, openBlock as S, unref as D, withCtx as at, createVNode as L, mergeProps as sn, useModel as $t, ref as Bt, computed as w, resolveDirective as zo, withDirectives as Zo, createElementBlock as tt, normalizeStyle as j, createElementVNode as K, createCommentVNode as ut, toDisplayString as Ht, withModifiers as wt, mergeModels as je, Fragment as Kn, renderList as ti, useId as Xe, onUnmounted as ei, useTemplateRef as Kt, withKeys as $n, isRef as oe, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
|
|
7
7
|
import { useI18n as qt } from "vue-i18n";
|
|
8
8
|
import { useDisplay as ii } from "vuetify";
|
|
@@ -23,13 +23,13 @@ const Gn = (t, e, n) => {
|
|
|
23
23
|
};
|
|
24
24
|
async function In(t) {
|
|
25
25
|
const e = await Gn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.jch03670.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.e9yn43wz.js") }), `./msg/${t}.ts`, 3);
|
|
26
|
-
|
|
26
|
+
yo(e.default);
|
|
27
27
|
}
|
|
28
28
|
function f(t) {
|
|
29
|
-
return
|
|
29
|
+
return vo[t] ?? t;
|
|
30
30
|
}
|
|
31
31
|
const bt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", ae = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
32
|
-
function
|
|
32
|
+
function ye(t) {
|
|
33
33
|
const e = t.lastIndexOf("V");
|
|
34
34
|
if (e <= 0 || e >= t.length - 1)
|
|
35
35
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
@@ -142,11 +142,11 @@ function ui() {
|
|
|
142
142
|
return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
143
143
|
}
|
|
144
144
|
function li(t) {
|
|
145
|
-
const e = `<shadow type="${
|
|
145
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
146
146
|
return C.xml.textToDom(e);
|
|
147
147
|
}
|
|
148
148
|
function _i(t) {
|
|
149
|
-
const e = `<shadow type="${
|
|
149
|
+
const e = `<shadow type="${ye(t)}"></shadow>`;
|
|
150
150
|
return C.xml.textToDom(e);
|
|
151
151
|
}
|
|
152
152
|
function pi(t) {
|
|
@@ -166,15 +166,15 @@ function hi(t) {
|
|
|
166
166
|
}
|
|
167
167
|
function fi() {
|
|
168
168
|
const { activeObject: t, activePage: e } = g.app, n = [];
|
|
169
|
-
if (t.type === "page")
|
|
169
|
+
if (t.type === "page" && e.meta.arguments)
|
|
170
170
|
for (const { id: o, name: i, type: a } of e.meta.arguments)
|
|
171
171
|
n.push({ key: o, name: i, type: a });
|
|
172
172
|
return n;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function vn(t) {
|
|
175
175
|
const { activeObject: e, activePage: n } = g.app;
|
|
176
176
|
if (e.type === "page") {
|
|
177
|
-
const o = n.meta.arguments
|
|
177
|
+
const o = n.meta.arguments?.find((i) => i.id === t);
|
|
178
178
|
if (o)
|
|
179
179
|
return {
|
|
180
180
|
key: o.id,
|
|
@@ -224,7 +224,7 @@ const Ti = {
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
onArgumentChange_: function(t) {
|
|
227
|
-
const e =
|
|
227
|
+
const e = vn(t);
|
|
228
228
|
if (!e) {
|
|
229
229
|
console.assert(!1);
|
|
230
230
|
return;
|
|
@@ -235,7 +235,7 @@ const Ti = {
|
|
|
235
235
|
this.setOutput(!0, gt(this.argument.type));
|
|
236
236
|
},
|
|
237
237
|
checkWarning_: function() {
|
|
238
|
-
const t =
|
|
238
|
+
const t = vn(this.argument.key);
|
|
239
239
|
if (!t) {
|
|
240
240
|
this.setWarningText(f("WARN_ARGUMENT_NOT_FOUND"));
|
|
241
241
|
return;
|
|
@@ -253,7 +253,7 @@ s.forBlock.get_page_argument_v1 = function(t) {
|
|
|
253
253
|
return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, u.FUNCTION_CALL];
|
|
254
254
|
};
|
|
255
255
|
const Ei = (t, e) => {
|
|
256
|
-
const n =
|
|
256
|
+
const n = ye(t), o = ce(t);
|
|
257
257
|
E[n] = {
|
|
258
258
|
init: function() {
|
|
259
259
|
this.appendDummyInput().appendField(
|
|
@@ -278,7 +278,7 @@ for (const t in se) {
|
|
|
278
278
|
Ei(n, e.items[n]);
|
|
279
279
|
}
|
|
280
280
|
const gi = (t, e) => {
|
|
281
|
-
const n =
|
|
281
|
+
const n = ye(t), o = ce(t);
|
|
282
282
|
E[n] = {
|
|
283
283
|
init: function() {
|
|
284
284
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -386,7 +386,7 @@ const Oi = {
|
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
388
|
E.app_bind_item_v1 = Oi;
|
|
389
|
-
const
|
|
389
|
+
const vi = {
|
|
390
390
|
init: function() {
|
|
391
391
|
this.itemCount_ = 0, this.setMutator(
|
|
392
392
|
new Et.MutatorIcon(
|
|
@@ -474,7 +474,7 @@ const yi = {
|
|
|
474
474
|
"Boolean",
|
|
475
475
|
"Array",
|
|
476
476
|
"Object"
|
|
477
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
477
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(y.Align.RIGHT).appendField("%{BKY_APP_V1_APP_BIND_TITLE}"));
|
|
478
478
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
479
479
|
this.removeInput("ADD" + t);
|
|
480
480
|
},
|
|
@@ -504,17 +504,17 @@ const yi = {
|
|
|
504
504
|
this.setWarningText(null);
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
|
-
E.app_bind_v1 =
|
|
507
|
+
E.app_bind_v1 = vi;
|
|
508
508
|
s.forBlock.app_bind_v1 = function() {
|
|
509
509
|
return "";
|
|
510
510
|
};
|
|
511
511
|
function Xn() {
|
|
512
512
|
return g.app.appList;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function yn(t) {
|
|
515
515
|
return g.app.appList.find((e) => e.id === t);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function yi() {
|
|
518
518
|
const t = [];
|
|
519
519
|
return Xn().forEach(({ id: n, name: o }) => {
|
|
520
520
|
t.push([o, n]);
|
|
@@ -556,6 +556,8 @@ function ki() {
|
|
|
556
556
|
}), k(e);
|
|
557
557
|
}
|
|
558
558
|
function ht(t) {
|
|
559
|
+
if (!t)
|
|
560
|
+
return;
|
|
559
561
|
const e = [];
|
|
560
562
|
for (const { id: n, name: o, type: i } of t)
|
|
561
563
|
e.push({ key: n, name: o, type: i });
|
|
@@ -577,16 +579,17 @@ function Qe(t) {
|
|
|
577
579
|
const _ = et[l.key];
|
|
578
580
|
if (!_)
|
|
579
581
|
return console.assert(!1, "invalid element", l.key), c;
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
582
|
+
if (_.events)
|
|
583
|
+
for (const { key: p, name: h, params: d } of _.events)
|
|
584
|
+
c.push({
|
|
585
|
+
id: Z("elementEvent", t, p),
|
|
586
|
+
kind: "elementEvent",
|
|
587
|
+
names: [h],
|
|
588
|
+
params: d
|
|
589
|
+
});
|
|
587
590
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
588
591
|
const p = a[l.reference.comp];
|
|
589
|
-
if (p)
|
|
592
|
+
if (p && p.meta.events)
|
|
590
593
|
for (const { id: h, name: d, params: m } of p.meta.events)
|
|
591
594
|
c.push({
|
|
592
595
|
id: Z("referenceEvent", t, h),
|
|
@@ -597,7 +600,7 @@ function Qe(t) {
|
|
|
597
600
|
}
|
|
598
601
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
599
602
|
const p = a[l.reference.comp];
|
|
600
|
-
if (p)
|
|
603
|
+
if (p && p.meta.events)
|
|
601
604
|
for (const { id: h, name: d, params: m } of p.meta.events)
|
|
602
605
|
c.push({
|
|
603
606
|
id: Z("multipleRefEvent", t, h),
|
|
@@ -606,7 +609,7 @@ function Qe(t) {
|
|
|
606
609
|
params: ht(m)
|
|
607
610
|
});
|
|
608
611
|
}
|
|
609
|
-
if (V(_.key) && n.type === "comp")
|
|
612
|
+
if (V(_.key) && n.type === "comp" && i.meta.events)
|
|
610
613
|
for (const { id: p, name: h, params: d } of i.meta.events)
|
|
611
614
|
c.push({
|
|
612
615
|
id: Z("customEvent", t, p),
|
|
@@ -624,7 +627,7 @@ function Qe(t) {
|
|
|
624
627
|
});
|
|
625
628
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
626
629
|
const p = a[l.reference.comp];
|
|
627
|
-
if (p)
|
|
630
|
+
if (p && p.meta.properties)
|
|
628
631
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
629
632
|
c.push({
|
|
630
633
|
id: Z("referencePropertyChangeEvent", t, h),
|
|
@@ -635,7 +638,7 @@ function Qe(t) {
|
|
|
635
638
|
}
|
|
636
639
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
637
640
|
const p = a[l.reference.comp];
|
|
638
|
-
if (p)
|
|
641
|
+
if (p && p.meta.properties)
|
|
639
642
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
640
643
|
c.push({
|
|
641
644
|
id: Z("multipleRefPropertyChangeEvent", t, h),
|
|
@@ -644,7 +647,7 @@ function Qe(t) {
|
|
|
644
647
|
params: Q(m)
|
|
645
648
|
});
|
|
646
649
|
}
|
|
647
|
-
if (V(_.key) && n.type === "comp")
|
|
650
|
+
if (V(_.key) && n.type === "comp" && i.meta.properties)
|
|
648
651
|
for (const { id: p, name: h, type: d } of i.meta.properties)
|
|
649
652
|
c.push({
|
|
650
653
|
id: Z("customPropertyChangeEvent", t, p),
|
|
@@ -653,15 +656,16 @@ function Qe(t) {
|
|
|
653
656
|
params: Q(d)
|
|
654
657
|
});
|
|
655
658
|
if (V(_.key)) {
|
|
656
|
-
if (n.type === "page")
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
659
|
+
if (n.type === "page") {
|
|
660
|
+
if (o.meta.states)
|
|
661
|
+
for (const { id: p, name: h, type: d } of o.meta.states)
|
|
662
|
+
c.push({
|
|
663
|
+
id: Z("stateChangeEvent", "globality", p),
|
|
664
|
+
kind: "stateChangeEvent",
|
|
665
|
+
names: [h],
|
|
666
|
+
params: Q(d)
|
|
667
|
+
});
|
|
668
|
+
} else if (n.type === "comp" && i.meta.states)
|
|
665
669
|
for (const { id: p, name: h, type: d } of i.meta.states)
|
|
666
670
|
c.push({
|
|
667
671
|
id: Z("stateChangeEvent", "globality", p),
|
|
@@ -687,7 +691,7 @@ function Fe(t) {
|
|
|
687
691
|
return;
|
|
688
692
|
}
|
|
689
693
|
if (r === "elementEvent") {
|
|
690
|
-
const d = h.events
|
|
694
|
+
const d = h.events?.find((m) => m.key === _);
|
|
691
695
|
if (d)
|
|
692
696
|
return {
|
|
693
697
|
id: t,
|
|
@@ -699,7 +703,7 @@ function Fe(t) {
|
|
|
699
703
|
if (J(h.key) && p.reference && p.reference.comp) {
|
|
700
704
|
const d = a[p.reference.comp];
|
|
701
705
|
if (d) {
|
|
702
|
-
const m = d.meta.events
|
|
706
|
+
const m = d.meta.events?.find((A) => A.id === _);
|
|
703
707
|
if (m)
|
|
704
708
|
return {
|
|
705
709
|
id: t,
|
|
@@ -713,7 +717,7 @@ function Fe(t) {
|
|
|
713
717
|
if (q(h.key) && p.reference && p.reference.comp) {
|
|
714
718
|
const d = a[p.reference.comp];
|
|
715
719
|
if (d) {
|
|
716
|
-
const m = d.meta.events
|
|
720
|
+
const m = d.meta.events?.find((A) => A.id === _);
|
|
717
721
|
if (m)
|
|
718
722
|
return {
|
|
719
723
|
id: t,
|
|
@@ -725,7 +729,7 @@ function Fe(t) {
|
|
|
725
729
|
}
|
|
726
730
|
} else if (r === "customEvent") {
|
|
727
731
|
if (V(h.key) && n.type === "comp") {
|
|
728
|
-
const d = i.meta.events
|
|
732
|
+
const d = i.meta.events?.find((m) => m.id === _);
|
|
729
733
|
if (d)
|
|
730
734
|
return {
|
|
731
735
|
id: t,
|
|
@@ -751,7 +755,7 @@ function Fe(t) {
|
|
|
751
755
|
if (J(h.key) && p.reference && p.reference.comp) {
|
|
752
756
|
const d = a[p.reference.comp];
|
|
753
757
|
if (d) {
|
|
754
|
-
const m = d.meta.properties
|
|
758
|
+
const m = d.meta.properties?.find(
|
|
755
759
|
(A) => A.id === _
|
|
756
760
|
);
|
|
757
761
|
if (m)
|
|
@@ -767,7 +771,7 @@ function Fe(t) {
|
|
|
767
771
|
if (q(h.key) && p.reference && p.reference.comp) {
|
|
768
772
|
const d = a[p.reference.comp];
|
|
769
773
|
if (d) {
|
|
770
|
-
const m = d.meta.properties
|
|
774
|
+
const m = d.meta.properties?.find(
|
|
771
775
|
(A) => A.id === _
|
|
772
776
|
);
|
|
773
777
|
if (m)
|
|
@@ -781,7 +785,7 @@ function Fe(t) {
|
|
|
781
785
|
}
|
|
782
786
|
} else if (r === "customPropertyChangeEvent") {
|
|
783
787
|
if (V(h.key) && n.type === "comp") {
|
|
784
|
-
const d = i.meta.properties
|
|
788
|
+
const d = i.meta.properties?.find(
|
|
785
789
|
(m) => m.id === _
|
|
786
790
|
);
|
|
787
791
|
if (d)
|
|
@@ -794,7 +798,7 @@ function Fe(t) {
|
|
|
794
798
|
}
|
|
795
799
|
} else if (r === "stateChangeEvent" && V(h.key)) {
|
|
796
800
|
if (n.type === "page") {
|
|
797
|
-
const d = o.meta.states
|
|
801
|
+
const d = o.meta.states?.find(
|
|
798
802
|
(m) => m.id === _
|
|
799
803
|
);
|
|
800
804
|
if (d)
|
|
@@ -805,7 +809,7 @@ function Fe(t) {
|
|
|
805
809
|
params: Q(d.type)
|
|
806
810
|
};
|
|
807
811
|
} else if (n.type === "comp") {
|
|
808
|
-
const d = i.meta.states
|
|
812
|
+
const d = i.meta.states?.find(
|
|
809
813
|
(m) => m.id === _
|
|
810
814
|
);
|
|
811
815
|
if (d)
|
|
@@ -826,7 +830,7 @@ function Ni(t) {
|
|
|
826
830
|
}
|
|
827
831
|
function Qn() {
|
|
828
832
|
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
829
|
-
if (t.type === "comp")
|
|
833
|
+
if (t.type === "comp" && e.meta.events)
|
|
830
834
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
831
835
|
n.push({
|
|
832
836
|
id: Z("customEvent", "globality", o),
|
|
@@ -841,7 +845,7 @@ function kn(t) {
|
|
|
841
845
|
return;
|
|
842
846
|
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } = on(t);
|
|
843
847
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
844
|
-
const c = n.meta.events
|
|
848
|
+
const c = n.meta.events?.find(
|
|
845
849
|
(r) => r.id === a
|
|
846
850
|
);
|
|
847
851
|
if (c)
|
|
@@ -860,12 +864,16 @@ function Li() {
|
|
|
860
864
|
return k(t);
|
|
861
865
|
}
|
|
862
866
|
function ct(t) {
|
|
867
|
+
if (!t)
|
|
868
|
+
return;
|
|
863
869
|
const e = [];
|
|
864
870
|
for (const { id: n, name: o, type: i } of t)
|
|
865
871
|
e.push({ key: n, name: o, type: i });
|
|
866
872
|
return e;
|
|
867
873
|
}
|
|
868
874
|
function Ct(t) {
|
|
875
|
+
if (!t)
|
|
876
|
+
return;
|
|
869
877
|
const e = [];
|
|
870
878
|
for (const { id: n, name: o, type: i } of t)
|
|
871
879
|
e.push({ key: n, name: o, type: i });
|
|
@@ -878,17 +886,18 @@ function ze(t) {
|
|
|
878
886
|
const c = et[a.key];
|
|
879
887
|
if (!c)
|
|
880
888
|
return console.assert(!1, "inavlid element", a.key), i;
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
+
if (c.methods)
|
|
890
|
+
for (const { key: r, name: l, inputs: _, outputs: p } of c.methods)
|
|
891
|
+
i.push({
|
|
892
|
+
id: Yt("elementMethod", t, r),
|
|
893
|
+
kind: "elementMethod",
|
|
894
|
+
names: [l],
|
|
895
|
+
inputs: _,
|
|
896
|
+
outputs: p
|
|
897
|
+
});
|
|
889
898
|
if (J(c.key) && a.reference && a.reference.comp) {
|
|
890
899
|
const r = o[a.reference.comp];
|
|
891
|
-
if (r)
|
|
900
|
+
if (r && r.meta.methods)
|
|
892
901
|
for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
|
|
893
902
|
i.push({
|
|
894
903
|
id: Yt("referenceMethod", t, l),
|
|
@@ -900,7 +909,7 @@ function ze(t) {
|
|
|
900
909
|
}
|
|
901
910
|
if (q(c.key) && a.reference && a.reference.comp) {
|
|
902
911
|
const r = o[a.reference.comp];
|
|
903
|
-
if (r)
|
|
912
|
+
if (r && r.meta.methods)
|
|
904
913
|
for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
|
|
905
914
|
i.push({
|
|
906
915
|
id: Yt("multipleRefMethod", t, l),
|
|
@@ -910,7 +919,7 @@ function ze(t) {
|
|
|
910
919
|
outputs: Ct(h)
|
|
911
920
|
});
|
|
912
921
|
}
|
|
913
|
-
if (V(c.key) && e.type === "comp")
|
|
922
|
+
if (V(c.key) && e.type === "comp" && n.meta.methods)
|
|
914
923
|
for (const { id: r, name: l, inputs: _, outputs: p } of n.meta.methods)
|
|
915
924
|
i.push({
|
|
916
925
|
id: Yt("customMethod", t, r),
|
|
@@ -933,7 +942,7 @@ function we(t) {
|
|
|
933
942
|
return;
|
|
934
943
|
}
|
|
935
944
|
if (i === "elementMethod") {
|
|
936
|
-
const _ = l.methods
|
|
945
|
+
const _ = l.methods?.find((p) => p.key === c);
|
|
937
946
|
if (_)
|
|
938
947
|
return {
|
|
939
948
|
id: t,
|
|
@@ -946,7 +955,7 @@ function we(t) {
|
|
|
946
955
|
if (J(l.key) && r.reference && r.reference.comp) {
|
|
947
956
|
const _ = o[r.reference.comp];
|
|
948
957
|
if (_) {
|
|
949
|
-
const p = _.meta.methods
|
|
958
|
+
const p = _.meta.methods?.find(
|
|
950
959
|
(h) => h.id === c
|
|
951
960
|
);
|
|
952
961
|
if (p)
|
|
@@ -963,7 +972,7 @@ function we(t) {
|
|
|
963
972
|
if (q(l.key) && r.reference && r.reference.comp) {
|
|
964
973
|
const _ = o[r.reference.comp];
|
|
965
974
|
if (_) {
|
|
966
|
-
const p = _.meta.methods
|
|
975
|
+
const p = _.meta.methods?.find(
|
|
967
976
|
(h) => h.id === c
|
|
968
977
|
);
|
|
969
978
|
if (p)
|
|
@@ -977,7 +986,7 @@ function we(t) {
|
|
|
977
986
|
}
|
|
978
987
|
}
|
|
979
988
|
} else if (i === "customMethod" && V(l.key) && e.type === "comp") {
|
|
980
|
-
const _ = n.meta.methods
|
|
989
|
+
const _ = n.meta.methods?.find(
|
|
981
990
|
(p) => p.id === c
|
|
982
991
|
);
|
|
983
992
|
if (_)
|
|
@@ -993,12 +1002,12 @@ function we(t) {
|
|
|
993
1002
|
function Si(t) {
|
|
994
1003
|
const e = [], n = ze(t);
|
|
995
1004
|
for (const { id: o, kind: i, names: a } of n)
|
|
996
|
-
e.push([
|
|
1005
|
+
e.push([ve(i, a), o]);
|
|
997
1006
|
return k(e);
|
|
998
1007
|
}
|
|
999
1008
|
function cn() {
|
|
1000
1009
|
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
1001
|
-
if (t.type === "comp")
|
|
1010
|
+
if (t.type === "comp" && e.meta.methods)
|
|
1002
1011
|
for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
|
|
1003
1012
|
n.push({
|
|
1004
1013
|
id: Yt("customMethod", "globality", o),
|
|
@@ -1014,7 +1023,7 @@ function Dt(t) {
|
|
|
1014
1023
|
return;
|
|
1015
1024
|
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Jt(t);
|
|
1016
1025
|
if (o === "customMethod" && i === "globality" && e.type === "comp") {
|
|
1017
|
-
const c = n.meta.methods
|
|
1026
|
+
const c = n.meta.methods?.find(
|
|
1018
1027
|
(r) => r.id === a
|
|
1019
1028
|
);
|
|
1020
1029
|
if (c)
|
|
@@ -1030,7 +1039,7 @@ function Dt(t) {
|
|
|
1030
1039
|
function zn() {
|
|
1031
1040
|
const t = [], e = cn();
|
|
1032
1041
|
for (const { id: n, kind: o, names: i } of e)
|
|
1033
|
-
t.push([
|
|
1042
|
+
t.push([ve(o, i), n]);
|
|
1034
1043
|
return k(t);
|
|
1035
1044
|
}
|
|
1036
1045
|
function Ze(t) {
|
|
@@ -1040,29 +1049,30 @@ function Ze(t) {
|
|
|
1040
1049
|
function Ke(t, e) {
|
|
1041
1050
|
const n = Dt(t);
|
|
1042
1051
|
if (n)
|
|
1043
|
-
return n.outputs
|
|
1052
|
+
return n.outputs?.find((o) => o.key === e);
|
|
1044
1053
|
}
|
|
1045
1054
|
function Bi(t) {
|
|
1046
1055
|
const e = [], n = Ze(t);
|
|
1047
|
-
|
|
1048
|
-
|
|
1056
|
+
if (n)
|
|
1057
|
+
for (const { name: o, key: i } of n)
|
|
1058
|
+
e.push([o, i]);
|
|
1049
1059
|
return k(e);
|
|
1050
1060
|
}
|
|
1051
1061
|
function bi(t, e, n) {
|
|
1052
1062
|
const { properties: o } = g.runtime, { activeObject: i, activePage: a, activeComp: c, depends: r } = g.app;
|
|
1053
|
-
if (t.events.length > 0)
|
|
1063
|
+
if (t.events && t.events.length > 0)
|
|
1054
1064
|
return !1;
|
|
1055
1065
|
if (J(t.key) && n) {
|
|
1056
1066
|
const l = r[n];
|
|
1057
|
-
if (l && l.meta.events.length > 0)
|
|
1067
|
+
if (l && l.meta.events && l.meta.events.length > 0)
|
|
1058
1068
|
return !1;
|
|
1059
1069
|
}
|
|
1060
1070
|
if (q(t.key) && n) {
|
|
1061
1071
|
const l = r[n];
|
|
1062
|
-
if (l && l.meta.events.length > 0)
|
|
1072
|
+
if (l && l.meta.events && l.meta.events.length > 0)
|
|
1063
1073
|
return !1;
|
|
1064
1074
|
}
|
|
1065
|
-
if (V(t.key) && i.type === "comp" && c.meta.events.length > 0)
|
|
1075
|
+
if (V(t.key) && i.type === "comp" && c.meta.events && c.meta.events.length > 0)
|
|
1066
1076
|
return !1;
|
|
1067
1077
|
if (o[t.key] && o[t.key][e]) {
|
|
1068
1078
|
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
@@ -1071,40 +1081,40 @@ function bi(t, e, n) {
|
|
|
1071
1081
|
}
|
|
1072
1082
|
if (J(t.key) && n) {
|
|
1073
1083
|
const l = r[n];
|
|
1074
|
-
if (l && l.meta.properties.length > 0)
|
|
1084
|
+
if (l && l.meta.properties && l.meta.properties.length > 0)
|
|
1075
1085
|
return !1;
|
|
1076
1086
|
}
|
|
1077
1087
|
if (q(t.key) && n) {
|
|
1078
1088
|
const l = r[n];
|
|
1079
|
-
if (l && l.meta.properties.length > 0)
|
|
1089
|
+
if (l && l.meta.properties && l.meta.properties.length > 0)
|
|
1080
1090
|
return !1;
|
|
1081
1091
|
}
|
|
1082
|
-
if (V(t.key) && i.type === "comp" && c.meta.properties.length > 0)
|
|
1092
|
+
if (V(t.key) && i.type === "comp" && c.meta.properties && c.meta.properties.length > 0)
|
|
1083
1093
|
return !1;
|
|
1084
1094
|
if (V(t.key)) {
|
|
1085
1095
|
if (i.type === "page") {
|
|
1086
|
-
if (a.meta.states.length > 0)
|
|
1096
|
+
if (a.meta.states && a.meta.states.length > 0)
|
|
1087
1097
|
return !1;
|
|
1088
|
-
} else if (i.type === "comp" && c.meta.states.length > 0)
|
|
1098
|
+
} else if (i.type === "comp" && c.meta.states && c.meta.states.length > 0)
|
|
1089
1099
|
return !1;
|
|
1090
1100
|
}
|
|
1091
1101
|
return !0;
|
|
1092
1102
|
}
|
|
1093
1103
|
function Pi(t, e) {
|
|
1094
1104
|
const { activeObject: n, activeComp: o, depends: i } = g.app;
|
|
1095
|
-
if (t.methods.length > 0)
|
|
1105
|
+
if (t.methods && t.methods.length > 0)
|
|
1096
1106
|
return !1;
|
|
1097
1107
|
if (J(t.key) && e) {
|
|
1098
1108
|
const a = i[e];
|
|
1099
|
-
if (a && a.meta.methods.length > 0)
|
|
1109
|
+
if (a && a.meta.methods && a.meta.methods.length > 0)
|
|
1100
1110
|
return !1;
|
|
1101
1111
|
}
|
|
1102
1112
|
if (q(t.key) && e) {
|
|
1103
1113
|
const a = i[e];
|
|
1104
|
-
if (a && a.meta.methods.length > 0)
|
|
1114
|
+
if (a && a.meta.methods && a.meta.methods.length > 0)
|
|
1105
1115
|
return !1;
|
|
1106
1116
|
}
|
|
1107
|
-
return V(t.key) && n.type === "comp" && o.meta.methods.length > 0 ? !1 : (V(t.key) && n.type, !0);
|
|
1117
|
+
return V(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0 ? !1 : (V(t.key) && n.type, !0);
|
|
1108
1118
|
}
|
|
1109
1119
|
function Ri(t, e, n) {
|
|
1110
1120
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
@@ -1112,15 +1122,15 @@ function Ri(t, e, n) {
|
|
|
1112
1122
|
return !1;
|
|
1113
1123
|
if (J(t.key) && n) {
|
|
1114
1124
|
const r = c[n];
|
|
1115
|
-
if (r && r.meta.properties.length > 0)
|
|
1125
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1116
1126
|
return !1;
|
|
1117
1127
|
}
|
|
1118
1128
|
if (q(t.key) && n) {
|
|
1119
1129
|
const r = c[n];
|
|
1120
|
-
if (r && r.meta.properties.length > 0)
|
|
1130
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1121
1131
|
return !1;
|
|
1122
1132
|
}
|
|
1123
|
-
return !(V(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1133
|
+
return !(V(t.key) && i.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1124
1134
|
}
|
|
1125
1135
|
function Di(t, e, n) {
|
|
1126
1136
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
@@ -1131,15 +1141,15 @@ function Di(t, e, n) {
|
|
|
1131
1141
|
}
|
|
1132
1142
|
if (J(t.key) && n) {
|
|
1133
1143
|
const r = c[n];
|
|
1134
|
-
if (r && r.meta.properties.length > 0)
|
|
1144
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1135
1145
|
return !1;
|
|
1136
1146
|
}
|
|
1137
1147
|
if (q(t.key) && n) {
|
|
1138
1148
|
const r = c[n];
|
|
1139
|
-
if (r && r.meta.properties.length > 0)
|
|
1149
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1140
1150
|
return !1;
|
|
1141
1151
|
}
|
|
1142
|
-
return !(V(t.key) && i.type === "comp" && a.meta.properties.length > 0);
|
|
1152
|
+
return !(V(t.key) && i.type === "comp" && a.meta.properties && a.meta.properties.length > 0);
|
|
1143
1153
|
}
|
|
1144
1154
|
function Zn(t, e, n, o) {
|
|
1145
1155
|
return t ? t === "onEvent" ? bi(e, n, o) : t === "callMethod" ? Pi(e, o) : t === "getProperty" ? Ri(e, n, o) : t === "setProperty" ? Di(e, n, o) : !1 : !1;
|
|
@@ -1225,7 +1235,7 @@ function Gt(t, e) {
|
|
|
1225
1235
|
});
|
|
1226
1236
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
1227
1237
|
const p = a[l.reference.comp];
|
|
1228
|
-
if (p)
|
|
1238
|
+
if (p && p.meta.properties)
|
|
1229
1239
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
1230
1240
|
c.push({
|
|
1231
1241
|
id: ee("referenceProperty", t, h),
|
|
@@ -1238,7 +1248,7 @@ function Gt(t, e) {
|
|
|
1238
1248
|
}
|
|
1239
1249
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
1240
1250
|
const p = a[l.reference.comp];
|
|
1241
|
-
if (p)
|
|
1251
|
+
if (p && p.meta.properties)
|
|
1242
1252
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
1243
1253
|
c.push({
|
|
1244
1254
|
id: ee("multipleRefProperty", t, h),
|
|
@@ -1249,7 +1259,7 @@ function Gt(t, e) {
|
|
|
1249
1259
|
}
|
|
1250
1260
|
});
|
|
1251
1261
|
}
|
|
1252
|
-
if (V(_.key) && o.type === "comp")
|
|
1262
|
+
if (V(_.key) && o.type === "comp" && i.meta.properties)
|
|
1253
1263
|
for (const { id: p, name: h, type: d } of i.meta.properties)
|
|
1254
1264
|
c.push({
|
|
1255
1265
|
id: ee("customProperty", t, p),
|
|
@@ -1261,7 +1271,7 @@ function Gt(t, e) {
|
|
|
1261
1271
|
});
|
|
1262
1272
|
return c;
|
|
1263
1273
|
}
|
|
1264
|
-
function
|
|
1274
|
+
function yt(t) {
|
|
1265
1275
|
if (!t)
|
|
1266
1276
|
return;
|
|
1267
1277
|
const { properties: e } = g.runtime, { activeObject: n, activeComp: o, depends: i } = g.app, a = Mt(n.type, n.subtype);
|
|
@@ -1295,7 +1305,7 @@ function vt(t) {
|
|
|
1295
1305
|
if (J(p.key) && _.reference && _.reference.comp) {
|
|
1296
1306
|
const h = i[_.reference.comp];
|
|
1297
1307
|
if (h) {
|
|
1298
|
-
const d = h.meta.properties
|
|
1308
|
+
const d = h.meta.properties?.find(
|
|
1299
1309
|
(m) => m.id === l
|
|
1300
1310
|
);
|
|
1301
1311
|
if (d)
|
|
@@ -1313,7 +1323,7 @@ function vt(t) {
|
|
|
1313
1323
|
if (q(p.key) && _.reference && _.reference.comp) {
|
|
1314
1324
|
const h = i[_.reference.comp];
|
|
1315
1325
|
if (h) {
|
|
1316
|
-
const d = h.meta.properties
|
|
1326
|
+
const d = h.meta.properties?.find(
|
|
1317
1327
|
(m) => m.id === l
|
|
1318
1328
|
);
|
|
1319
1329
|
if (d)
|
|
@@ -1328,7 +1338,7 @@ function vt(t) {
|
|
|
1328
1338
|
}
|
|
1329
1339
|
}
|
|
1330
1340
|
} else if (c === "customProperty" && V(p.key) && n.type === "comp") {
|
|
1331
|
-
const h = o.meta.properties
|
|
1341
|
+
const h = o.meta.properties?.find(
|
|
1332
1342
|
(d) => d.id === l
|
|
1333
1343
|
);
|
|
1334
1344
|
if (h)
|
|
@@ -1350,14 +1360,14 @@ function to(t, e) {
|
|
|
1350
1360
|
}
|
|
1351
1361
|
function rn() {
|
|
1352
1362
|
const { activeObject: t, activePage: e, activeComp: n } = g.app;
|
|
1353
|
-
return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
|
|
1363
|
+
return t.type === "page" ? e.meta.states ?? [] : t.type === "comp" ? n.meta.states ?? [] : [];
|
|
1354
1364
|
}
|
|
1355
1365
|
function le(t) {
|
|
1356
1366
|
const { activeObject: e, activePage: n, activeComp: o } = g.app;
|
|
1357
1367
|
if (e.type === "page")
|
|
1358
|
-
return n.meta.states
|
|
1368
|
+
return n.meta.states?.find((i) => i.id === t);
|
|
1359
1369
|
if (e.type === "comp")
|
|
1360
|
-
return o.meta.states
|
|
1370
|
+
return o.meta.states?.find((i) => i.id === t);
|
|
1361
1371
|
}
|
|
1362
1372
|
function eo() {
|
|
1363
1373
|
const t = [], e = rn();
|
|
@@ -1374,8 +1384,7 @@ const Mi = {
|
|
|
1374
1384
|
}, this.event = {
|
|
1375
1385
|
id: "",
|
|
1376
1386
|
kind: "",
|
|
1377
|
-
names: []
|
|
1378
|
-
params: []
|
|
1387
|
+
names: []
|
|
1379
1388
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_ON_APP_EVENT_TITLE}").appendField(new O(() => this.genNodeOpts_()), "NODE").appendField(
|
|
1380
1389
|
new O(() => this.genEventOpts_()),
|
|
1381
1390
|
"EVENT"
|
|
@@ -1404,7 +1413,7 @@ const Mi = {
|
|
|
1404
1413
|
};
|
|
1405
1414
|
},
|
|
1406
1415
|
loadExtraState: function(t) {
|
|
1407
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params
|
|
1416
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params, this.updateShape_(), setTimeout(() => {
|
|
1408
1417
|
this.ensureBlocks_(), this.checkWarning_();
|
|
1409
1418
|
}, 0);
|
|
1410
1419
|
},
|
|
@@ -1441,20 +1450,21 @@ const Mi = {
|
|
|
1441
1450
|
},
|
|
1442
1451
|
onEventChange_: function(t) {
|
|
1443
1452
|
const e = Fe(t);
|
|
1444
|
-
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params =
|
|
1453
|
+
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = void 0), this.updateShape_(), setTimeout(() => {
|
|
1445
1454
|
this.ensureBlocks_();
|
|
1446
1455
|
}, 0);
|
|
1447
1456
|
},
|
|
1448
1457
|
updateShape_: function() {
|
|
1449
|
-
for (let e = this.event.params
|
|
1458
|
+
for (let e = this.event.params?.length ?? 0; this.getInput("PARAM" + e); e++) {
|
|
1450
1459
|
const n = this.getInput("PARAM" + e).connection.targetBlock();
|
|
1451
1460
|
n && n.dispose(), this.removeInput("PARAM" + e);
|
|
1452
1461
|
}
|
|
1453
|
-
|
|
1454
|
-
|
|
1462
|
+
if (this.event.params)
|
|
1463
|
+
for (let e = 0; e < this.event.params.length; e++)
|
|
1464
|
+
this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
|
|
1455
1465
|
const { kind: t } = on(this.event.id);
|
|
1456
1466
|
if (t === "multipleRefEvent")
|
|
1457
|
-
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1467
|
+
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params && this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
|
|
1458
1468
|
else if (this.getInput("REF_KEY")) {
|
|
1459
1469
|
const e = this.getInput("REF_KEY").connection.targetBlock();
|
|
1460
1470
|
e && e.dispose(), this.removeInput("REF_KEY");
|
|
@@ -1466,9 +1476,12 @@ const Mi = {
|
|
|
1466
1476
|
const t = [];
|
|
1467
1477
|
this.event.kind === "referenceEvent" && t.push(["REF_KEY", "__refKey__", "x-runtime-lib.refKey", !0]);
|
|
1468
1478
|
let e = !0;
|
|
1469
|
-
(this.event.kind === "referenceEvent" || this.event.kind === "customEvent") && (e = !1), this.event.params
|
|
1470
|
-
|
|
1471
|
-
|
|
1479
|
+
if ((this.event.kind === "referenceEvent" || this.event.kind === "customEvent") && (e = !1), this.event.params)
|
|
1480
|
+
for (let n = 0; n < this.event.params.length; n++) {
|
|
1481
|
+
const { key: o, name: i } = this.event.params[n];
|
|
1482
|
+
t.push(["PARAM" + n, `__param$${o}__`, i, e]);
|
|
1483
|
+
}
|
|
1484
|
+
t.length > 0 && F(this, t);
|
|
1472
1485
|
},
|
|
1473
1486
|
checkWarning_: function() {
|
|
1474
1487
|
const t = mt(this.node.id);
|
|
@@ -1501,9 +1514,9 @@ E.on_app_event_v1 = Mi;
|
|
|
1501
1514
|
s.forBlock.on_app_event_v1 = function(t) {
|
|
1502
1515
|
const e = s.quote_, n = t, o = n.event.id;
|
|
1503
1516
|
let i = "";
|
|
1504
|
-
n.event.params
|
|
1505
|
-
|
|
1506
|
-
|
|
1517
|
+
if (n.event.params)
|
|
1518
|
+
for (const { key: r } of n.event.params)
|
|
1519
|
+
i && (i += ", "), i += `__param$${r}__`;
|
|
1507
1520
|
const a = s.statementToCode(n, "HANDLE");
|
|
1508
1521
|
return `__onEventV1__(${e(o)}, async function(${i}) {
|
|
1509
1522
|
${a}});
|
|
@@ -1514,8 +1527,7 @@ const Ui = {
|
|
|
1514
1527
|
this.event = {
|
|
1515
1528
|
id: "",
|
|
1516
1529
|
kind: "",
|
|
1517
|
-
names: []
|
|
1518
|
-
params: []
|
|
1530
|
+
names: []
|
|
1519
1531
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_TRIGGER_APP_EVENT_TITLE}").appendField(
|
|
1520
1532
|
new O(() => this.genEventOpts_()),
|
|
1521
1533
|
"EVENT"
|
|
@@ -1537,7 +1549,7 @@ const Ui = {
|
|
|
1537
1549
|
};
|
|
1538
1550
|
},
|
|
1539
1551
|
loadExtraState: function(t) {
|
|
1540
|
-
this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params
|
|
1552
|
+
this.event.id = t.event?.id ?? "", this.event.kind = t.event?.kind ?? "", this.event.names = t.event?.names ?? [], this.event.params = t.event?.params, this.updateShape_(), this.updateShadows_(), setTimeout(() => {
|
|
1541
1553
|
this.checkWarning_();
|
|
1542
1554
|
}, 0);
|
|
1543
1555
|
},
|
|
@@ -1556,26 +1568,26 @@ const Ui = {
|
|
|
1556
1568
|
},
|
|
1557
1569
|
onEventChange_: function(t) {
|
|
1558
1570
|
const e = kn(t);
|
|
1559
|
-
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params =
|
|
1571
|
+
e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = void 0);
|
|
1560
1572
|
},
|
|
1561
1573
|
updateShape_: function() {
|
|
1562
|
-
for (let t = this.event.params
|
|
1574
|
+
for (let t = this.event.params?.length ?? 0; this.getInput("PARAM" + t); t++) {
|
|
1563
1575
|
const e = this.getInput("PARAM" + t)?.connection?.targetBlock();
|
|
1564
1576
|
e && e.dispose(), this.removeInput("PARAM" + t);
|
|
1565
1577
|
}
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1578
|
+
if (this.event.params) {
|
|
1579
|
+
for (let t = 0; t < this.event.params.length; t++)
|
|
1580
|
+
this.getInput("PARAM" + t) || this.appendValueInput("PARAM" + t);
|
|
1581
|
+
for (let t = 0; t < this.event.params.length; t++) {
|
|
1582
|
+
const { type: e } = this.event.params[t], n = this.getInput("PARAM" + t);
|
|
1583
|
+
n.connection.setShadowDom(null);
|
|
1584
|
+
const o = n.connection.targetBlock();
|
|
1585
|
+
o && !o.isShadow() && o.dispose(), n.setCheck(gt(e));
|
|
1586
|
+
}
|
|
1575
1587
|
}
|
|
1576
1588
|
},
|
|
1577
1589
|
updateShadows_: function() {
|
|
1578
|
-
if (!this.isInsertionMarker())
|
|
1590
|
+
if (!this.isInsertionMarker() && this.event.params)
|
|
1579
1591
|
for (let t = 0; t < this.event.params.length; t++) {
|
|
1580
1592
|
const e = this.event.params[t], n = At(e.type);
|
|
1581
1593
|
this.getInput("PARAM" + t)?.connection?.setShadowDom(n);
|
|
@@ -1602,14 +1614,15 @@ E.trigger_app_event_v1 = Ui;
|
|
|
1602
1614
|
s.forBlock.trigger_app_event_v1 = function(t) {
|
|
1603
1615
|
const e = s.quote_, n = t;
|
|
1604
1616
|
let o = "";
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1617
|
+
if (n.event.params)
|
|
1618
|
+
for (let a = 0; a < n.event.params.length; a++) {
|
|
1619
|
+
const c = s.valueToCode(
|
|
1620
|
+
n,
|
|
1621
|
+
"PARAM" + a,
|
|
1622
|
+
u.NONE
|
|
1623
|
+
);
|
|
1624
|
+
o && (o += ", "), o += c;
|
|
1625
|
+
}
|
|
1613
1626
|
return `__triggerEventV1__(${e(n.event.id)}, ${o});
|
|
1614
1627
|
`;
|
|
1615
1628
|
};
|
|
@@ -1671,7 +1684,7 @@ const Vi = {
|
|
|
1671
1684
|
}, 0);
|
|
1672
1685
|
},
|
|
1673
1686
|
updateShape_: function() {
|
|
1674
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(
|
|
1687
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TEXT}"), this.moveInputBefore("TEXT", "RESULT")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "TEXT"));
|
|
1675
1688
|
},
|
|
1676
1689
|
updateShadow_: function() {
|
|
1677
1690
|
if (this.isInsertionMarker())
|
|
@@ -1708,7 +1721,7 @@ const xi = {
|
|
|
1708
1721
|
}, 0);
|
|
1709
1722
|
},
|
|
1710
1723
|
updateShape_: function() {
|
|
1711
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(
|
|
1724
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_VALUE}"), this.moveInputBefore("VALUE", "RESULT")), this.getInput("LABEL") || (this.appendValueInput("LABEL").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_LABEL}"), this.moveInputBefore("LABEL", "VALUE")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "LABEL"));
|
|
1712
1725
|
},
|
|
1713
1726
|
updateShadow_: function() {
|
|
1714
1727
|
if (this.isInsertionMarker())
|
|
@@ -1775,9 +1788,7 @@ const Yi = {
|
|
|
1775
1788
|
}, this.method = {
|
|
1776
1789
|
id: "",
|
|
1777
1790
|
kind: "",
|
|
1778
|
-
names: []
|
|
1779
|
-
inputs: [],
|
|
1780
|
-
outputs: []
|
|
1791
|
+
names: []
|
|
1781
1792
|
}, this.appendDummyInput("DUMMY").appendField("%{BKY_APP_V1_CALL_APP_METHOD_TITLE}").appendField(new O(() => this.genNodeOpts_()), "NODE").appendField(
|
|
1782
1793
|
new O(() => this.genMethodOpts_()),
|
|
1783
1794
|
"METHOD"
|
|
@@ -1806,7 +1817,7 @@ const Yi = {
|
|
|
1806
1817
|
};
|
|
1807
1818
|
},
|
|
1808
1819
|
loadExtraState: function(t) {
|
|
1809
|
-
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs
|
|
1820
|
+
this.node.id = t.node?.id ?? "", this.node.key = t.node?.key ?? "", this.node.alias = t.node?.alias ?? "", this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs, this.method.outputs = t.method?.outputs, this.updateShape_(), this.updateShadow_(), setTimeout(() => {
|
|
1810
1821
|
this.ensureBlocks_(), this.checkWarning_();
|
|
1811
1822
|
}, 0);
|
|
1812
1823
|
},
|
|
@@ -1848,32 +1859,34 @@ const Yi = {
|
|
|
1848
1859
|
}, 0);
|
|
1849
1860
|
},
|
|
1850
1861
|
updateShape_: function() {
|
|
1851
|
-
this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
1852
|
-
for (let t = this.method.outputs
|
|
1862
|
+
this.method.outputs && this.method.outputs.length > 0 ? this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}") : this.getInput("HANDLE") && this.removeInput("HANDLE");
|
|
1863
|
+
for (let t = this.method.outputs?.length ?? 0; this.getInput("OUTPUT" + t); t++) {
|
|
1853
1864
|
const e = this.getInput("OUTPUT" + t)?.connection?.targetBlock();
|
|
1854
1865
|
e && e.dispose(), this.removeInput("OUTPUT" + t);
|
|
1855
1866
|
}
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1867
|
+
if (this.method.outputs)
|
|
1868
|
+
for (let t = 0; t < this.method.outputs.length; t++) {
|
|
1869
|
+
if (this.getInput("OUTPUT" + t))
|
|
1870
|
+
continue;
|
|
1871
|
+
const e = this.appendValueInput("OUTPUT" + t);
|
|
1872
|
+
t === 0 && e.appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("OUTPUT" + t, "HANDLE");
|
|
1873
|
+
}
|
|
1874
|
+
for (let t = this.method.inputs?.length ?? 0; this.getInput("INPUT" + t); t++)
|
|
1863
1875
|
this.removeInput("INPUT" + t);
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1876
|
+
if (this.method.inputs)
|
|
1877
|
+
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1878
|
+
const e = this.method.inputs[t];
|
|
1879
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(f(e.name)), this.method.outputs && this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
|
|
1880
|
+
}
|
|
1868
1881
|
if (this.method.kind === "multipleRefMethod")
|
|
1869
|
-
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY").setAlign(
|
|
1882
|
+
this.getInput("REF_KEY") || this.appendValueInput("REF_KEY").setAlign(y.Align.RIGHT).appendField(f("BKY_APP_REF_KEY")), this.method.inputs && this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs && this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
|
|
1870
1883
|
else if (this.getInput("REF_KEY")) {
|
|
1871
1884
|
const t = this.getInput("REF_KEY").connection.targetBlock();
|
|
1872
1885
|
t && t.dispose(), this.removeInput("REF_KEY");
|
|
1873
1886
|
}
|
|
1874
1887
|
},
|
|
1875
1888
|
updateShadow_: function() {
|
|
1876
|
-
if (!this.isInsertionMarker())
|
|
1889
|
+
if (!this.isInsertionMarker() && this.method.inputs)
|
|
1877
1890
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1878
1891
|
const e = this.method.inputs[t];
|
|
1879
1892
|
if (!e.type)
|
|
@@ -1886,10 +1899,11 @@ const Yi = {
|
|
|
1886
1899
|
if (this.isInsertionMarker())
|
|
1887
1900
|
return;
|
|
1888
1901
|
const { kind: t } = Jt(this.method.id), e = wn(t), n = [];
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1902
|
+
if (this.method.outputs)
|
|
1903
|
+
for (let o = 0; o < this.method.outputs.length; o++) {
|
|
1904
|
+
const { key: i, name: a } = this.method.outputs[o];
|
|
1905
|
+
n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
|
|
1906
|
+
}
|
|
1893
1907
|
n.length > 0 && F(this, n);
|
|
1894
1908
|
},
|
|
1895
1909
|
checkWarning_: function() {
|
|
@@ -1929,41 +1943,45 @@ s.forBlock.call_app_method_v1 = function(t) {
|
|
|
1929
1943
|
let i;
|
|
1930
1944
|
o.method.kind === "multipleRefMethod" && (i = s.valueToCode(o, "REF_KEY", u.NONE) || "''");
|
|
1931
1945
|
let a = "{";
|
|
1932
|
-
o.method.inputs
|
|
1933
|
-
let
|
|
1934
|
-
o
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1946
|
+
if (o.method.inputs)
|
|
1947
|
+
for (let r = 0; r < o.method.inputs.length; r++) {
|
|
1948
|
+
const { key: l, type: _ } = o.method.inputs[r];
|
|
1949
|
+
let p = s.valueToCode(
|
|
1950
|
+
o,
|
|
1951
|
+
"INPUT" + r,
|
|
1952
|
+
u.ATOMIC
|
|
1953
|
+
);
|
|
1954
|
+
if (p === void 0)
|
|
1955
|
+
switch (_) {
|
|
1956
|
+
case "string":
|
|
1957
|
+
p = "''";
|
|
1958
|
+
break;
|
|
1959
|
+
case "number":
|
|
1960
|
+
p = "0";
|
|
1961
|
+
break;
|
|
1962
|
+
case "boolean":
|
|
1963
|
+
p = "false";
|
|
1964
|
+
break;
|
|
1965
|
+
case "array":
|
|
1966
|
+
p = "[]";
|
|
1967
|
+
break;
|
|
1968
|
+
case "object":
|
|
1969
|
+
p = "{}";
|
|
1970
|
+
break;
|
|
1971
|
+
default:
|
|
1972
|
+
p = "null";
|
|
1973
|
+
}
|
|
1974
|
+
a !== "{" && (a += ", "), a += `${n(l)}: ${p}`;
|
|
1975
|
+
}
|
|
1976
|
+
a += "}";
|
|
1960
1977
|
let c = "";
|
|
1961
|
-
if (o.method.outputs
|
|
1962
|
-
|
|
1978
|
+
if (o.method.outputs)
|
|
1979
|
+
for (const { key: r } of o.method.outputs)
|
|
1980
|
+
c += `${e}__output$${r}__ = __outputs__[${n(r)}];
|
|
1963
1981
|
`;
|
|
1964
|
-
|
|
1982
|
+
if (o.method.kind === "customMethod") {
|
|
1965
1983
|
const { methodKey: r } = Jt(o.method.id);
|
|
1966
|
-
if (o.method.outputs.length > 0) {
|
|
1984
|
+
if (o.method.outputs && o.method.outputs.length > 0) {
|
|
1967
1985
|
const l = s.statementToCode(o, "HANDLE");
|
|
1968
1986
|
return `{
|
|
1969
1987
|
var __outputs__ = __implementMethod$${r}__(${a});
|
|
@@ -1972,7 +1990,7 @@ ${c}${l}}
|
|
|
1972
1990
|
} else
|
|
1973
1991
|
return `__implementMethod$${r}__(${a});
|
|
1974
1992
|
`;
|
|
1975
|
-
} else if (o.method.outputs.length > 0) {
|
|
1993
|
+
} else if (o.method.outputs && o.method.outputs.length > 0) {
|
|
1976
1994
|
const r = s.statementToCode(o, "HANDLE");
|
|
1977
1995
|
return `{
|
|
1978
1996
|
var __outputs__ = __callMethodV1__(${n(o.method.id)}, ${i}, ${a});
|
|
@@ -1987,8 +2005,7 @@ const Fi = {
|
|
|
1987
2005
|
this.method = {
|
|
1988
2006
|
id: "",
|
|
1989
2007
|
kind: "",
|
|
1990
|
-
names: []
|
|
1991
|
-
inputs: []
|
|
2008
|
+
names: []
|
|
1992
2009
|
}, this.appendDummyInput().appendField("%{BKY_APP_V1_IMPLEMENT_APP_METHOD_TITLE}").appendField(
|
|
1993
2010
|
new O(() => this.genMethodOpts_()),
|
|
1994
2011
|
"METHOD"
|
|
@@ -2008,7 +2025,7 @@ const Fi = {
|
|
|
2008
2025
|
};
|
|
2009
2026
|
},
|
|
2010
2027
|
loadExtraState: function(t) {
|
|
2011
|
-
this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs
|
|
2028
|
+
this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.method.inputs = t.method?.inputs, this.updateShape_(), setTimeout(() => {
|
|
2012
2029
|
this.ensureBlocks_(), this.checkWarning_();
|
|
2013
2030
|
}, 0);
|
|
2014
2031
|
},
|
|
@@ -2032,21 +2049,23 @@ const Fi = {
|
|
|
2032
2049
|
}, 0);
|
|
2033
2050
|
},
|
|
2034
2051
|
updateShape_: function() {
|
|
2035
|
-
for (let t = this.method.inputs
|
|
2052
|
+
for (let t = this.method.inputs?.length ?? 0; this.getInput("INPUT" + t); t++) {
|
|
2036
2053
|
const e = this.getInput("INPUT" + t)?.connection?.targetBlock();
|
|
2037
2054
|
e && e.dispose(), this.removeInput("INPUT" + t);
|
|
2038
2055
|
}
|
|
2039
|
-
|
|
2040
|
-
|
|
2056
|
+
if (this.method.inputs)
|
|
2057
|
+
for (let t = 0; t < this.method.inputs.length; t++)
|
|
2058
|
+
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t), this.moveInputBefore("INPUT" + t, "HANDLE"));
|
|
2041
2059
|
},
|
|
2042
2060
|
ensureBlocks_: function() {
|
|
2043
2061
|
if (this.isInsertionMarker() || !this.method.id)
|
|
2044
2062
|
return;
|
|
2045
2063
|
const t = wn(this.method.kind), e = [];
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2064
|
+
if (this.method.inputs)
|
|
2065
|
+
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2066
|
+
const { key: o, name: i } = this.method.inputs[n];
|
|
2067
|
+
e.push(["INPUT" + n, `__input$${o}__`, i, t]);
|
|
2068
|
+
}
|
|
2050
2069
|
F(this, e);
|
|
2051
2070
|
},
|
|
2052
2071
|
checkWarning_: function() {
|
|
@@ -2070,10 +2089,10 @@ E.implement_app_method_v1 = Fi;
|
|
|
2070
2089
|
s.forBlock.implement_app_method_v1 = function(t) {
|
|
2071
2090
|
const e = s.INDENT, n = s.quote_, o = t, { methodKey: i } = Jt(o.method.id);
|
|
2072
2091
|
let a = "";
|
|
2073
|
-
o.method.inputs
|
|
2074
|
-
|
|
2092
|
+
if (o.method.inputs)
|
|
2093
|
+
for (const { key: l } of o.method.inputs)
|
|
2094
|
+
a += `${e}var __input$${l}__ = __inputs__[${n(l)}];
|
|
2075
2095
|
`;
|
|
2076
|
-
});
|
|
2077
2096
|
const c = s.statementToCode(o, "HANDLE");
|
|
2078
2097
|
return `async function __implementMethod$${i}__(__inputs__) {
|
|
2079
2098
|
${a}${e}var __outputs__ = {};
|
|
@@ -2289,7 +2308,7 @@ const Ki = {
|
|
|
2289
2308
|
}, 0);
|
|
2290
2309
|
},
|
|
2291
2310
|
genAppOpts_: function() {
|
|
2292
|
-
return
|
|
2311
|
+
return yi();
|
|
2293
2312
|
},
|
|
2294
2313
|
genPageOpts_: function() {
|
|
2295
2314
|
return Ci(this.app.id);
|
|
@@ -2305,7 +2324,7 @@ const Ki = {
|
|
|
2305
2324
|
}
|
|
2306
2325
|
},
|
|
2307
2326
|
onAppChange_: function(t) {
|
|
2308
|
-
const e =
|
|
2327
|
+
const e = yn(t);
|
|
2309
2328
|
if (!e) {
|
|
2310
2329
|
console.assert(!1);
|
|
2311
2330
|
return;
|
|
@@ -2323,7 +2342,7 @@ const Ki = {
|
|
|
2323
2342
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2324
2343
|
},
|
|
2325
2344
|
checkWarning_: function() {
|
|
2326
|
-
const t =
|
|
2345
|
+
const t = yn(this.app.id);
|
|
2327
2346
|
if (!t) {
|
|
2328
2347
|
this.setWarningText(f("WARN_APP_NOT_FOUND"));
|
|
2329
2348
|
return;
|
|
@@ -2475,14 +2494,14 @@ const Hi = {
|
|
|
2475
2494
|
const n = this.node.key !== e.key;
|
|
2476
2495
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2477
2496
|
const o = this.getField("PROPERTY");
|
|
2478
|
-
if (o.getOptions(!1), n || !
|
|
2497
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2479
2498
|
const i = Gt(this.node.id, "read")?.[0];
|
|
2480
2499
|
o.setValue(i?.id ?? "");
|
|
2481
2500
|
}
|
|
2482
2501
|
this.onPropChange_(o.getValue());
|
|
2483
2502
|
},
|
|
2484
2503
|
onPropChange_: function(t) {
|
|
2485
|
-
const e =
|
|
2504
|
+
const e = yt(t);
|
|
2486
2505
|
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []);
|
|
2487
2506
|
},
|
|
2488
2507
|
checkWarning_: function() {
|
|
@@ -2496,7 +2515,7 @@ const Hi = {
|
|
|
2496
2515
|
return;
|
|
2497
2516
|
}
|
|
2498
2517
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2499
|
-
const e =
|
|
2518
|
+
const e = yt(this.property.id);
|
|
2500
2519
|
if (!e) {
|
|
2501
2520
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2502
2521
|
return;
|
|
@@ -2580,20 +2599,20 @@ const Gi = {
|
|
|
2580
2599
|
const n = this.node.key !== e.key;
|
|
2581
2600
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2582
2601
|
const o = this.getField("PROPERTY");
|
|
2583
|
-
if (o.getOptions(!1), n || !
|
|
2602
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2584
2603
|
const i = Gt(this.node.id, "write")?.[0];
|
|
2585
2604
|
o.setValue(i?.id ?? "");
|
|
2586
2605
|
}
|
|
2587
2606
|
this.onPropChange_(o.getValue());
|
|
2588
2607
|
},
|
|
2589
2608
|
onPropChange_: function(t) {
|
|
2590
|
-
const e =
|
|
2609
|
+
const e = yt(t);
|
|
2591
2610
|
e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []), this.updateShadow_();
|
|
2592
2611
|
},
|
|
2593
2612
|
updateShadow_: function() {
|
|
2594
2613
|
if (this.isInsertionMarker())
|
|
2595
2614
|
return;
|
|
2596
|
-
const t =
|
|
2615
|
+
const t = yt(this.property.id);
|
|
2597
2616
|
if (!t)
|
|
2598
2617
|
return;
|
|
2599
2618
|
this.getInput("VALUE").setShadowDom(null);
|
|
@@ -2617,7 +2636,7 @@ const Gi = {
|
|
|
2617
2636
|
return;
|
|
2618
2637
|
}
|
|
2619
2638
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2620
|
-
const e =
|
|
2639
|
+
const e = yt(this.property.id);
|
|
2621
2640
|
if (!e) {
|
|
2622
2641
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2623
2642
|
return;
|
|
@@ -3751,7 +3770,7 @@ const ts = {
|
|
|
3751
3770
|
}
|
|
3752
3771
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3753
3772
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3754
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
3773
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
3755
3774
|
}
|
|
3756
3775
|
},
|
|
3757
3776
|
updateCheck_: function() {
|
|
@@ -3925,7 +3944,7 @@ const es = {
|
|
|
3925
3944
|
}
|
|
3926
3945
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3927
3946
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3928
|
-
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(
|
|
3947
|
+
n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
|
|
3929
3948
|
}
|
|
3930
3949
|
},
|
|
3931
3950
|
updateCheck_: function() {
|
|
@@ -4339,7 +4358,7 @@ const cs = {
|
|
|
4339
4358
|
}, 0);
|
|
4340
4359
|
},
|
|
4341
4360
|
updateShape_: function() {
|
|
4342
|
-
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(
|
|
4361
|
+
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(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
4343
4362
|
},
|
|
4344
4363
|
ensureBlocks_: function() {
|
|
4345
4364
|
this.isInsertionMarker() || (ss(this), F(this, [
|
|
@@ -4715,7 +4734,7 @@ const fs = {
|
|
|
4715
4734
|
}, 0);
|
|
4716
4735
|
},
|
|
4717
4736
|
updateShape_: function() {
|
|
4718
|
-
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(
|
|
4737
|
+
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(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4719
4738
|
},
|
|
4720
4739
|
ensureBlocks_: function() {
|
|
4721
4740
|
this.isInsertionMarker() || (ps(this), ds(this), F(this, [
|
|
@@ -4893,7 +4912,7 @@ const As = {
|
|
|
4893
4912
|
}, 0);
|
|
4894
4913
|
},
|
|
4895
4914
|
updateShape_: function() {
|
|
4896
|
-
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(
|
|
4915
|
+
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(y.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4897
4916
|
},
|
|
4898
4917
|
ensureBlocks_: function() {
|
|
4899
4918
|
this.isInsertionMarker() || (ms(this), Ts(this), Es(this), F(this, [
|
|
@@ -4989,7 +5008,7 @@ const Os = {
|
|
|
4989
5008
|
}
|
|
4990
5009
|
};
|
|
4991
5010
|
E.select_column_item_v1 = Os;
|
|
4992
|
-
const
|
|
5011
|
+
const vs = {
|
|
4993
5012
|
init: function() {
|
|
4994
5013
|
this.space = {
|
|
4995
5014
|
id: "",
|
|
@@ -5162,7 +5181,7 @@ const ys = {
|
|
|
5162
5181
|
const e = this.table.columns[t], n = new O(
|
|
5163
5182
|
() => this.genColumnOpts_()
|
|
5164
5183
|
), o = new ft("");
|
|
5165
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
5184
|
+
this.appendDummyInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
|
|
5166
5185
|
}
|
|
5167
5186
|
},
|
|
5168
5187
|
updateShape_: function() {
|
|
@@ -5174,7 +5193,7 @@ const ys = {
|
|
|
5174
5193
|
const e = new O(
|
|
5175
5194
|
() => this.genColumnOpts_()
|
|
5176
5195
|
), n = new ft("");
|
|
5177
|
-
this.appendDummyInput("ADD" + t).setAlign(
|
|
5196
|
+
this.appendDummyInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
|
|
5178
5197
|
const o = this.table.columns[0];
|
|
5179
5198
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
5180
5199
|
}
|
|
@@ -5198,7 +5217,7 @@ const ys = {
|
|
|
5198
5217
|
this.setWarningText(null);
|
|
5199
5218
|
}
|
|
5200
5219
|
};
|
|
5201
|
-
E.select_column_v1 =
|
|
5220
|
+
E.select_column_v1 = vs;
|
|
5202
5221
|
s.forBlock.select_column_v1 = function(t) {
|
|
5203
5222
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5204
5223
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5210,7 +5229,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
5210
5229
|
p !== 0 && (c += ","), c += `{name:${e(l)},alias:${e(_)}}`;
|
|
5211
5230
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${c}}`, u.ATOMIC];
|
|
5212
5231
|
};
|
|
5213
|
-
const
|
|
5232
|
+
const ys = {
|
|
5214
5233
|
init: function() {
|
|
5215
5234
|
this.space = {
|
|
5216
5235
|
id: "",
|
|
@@ -5302,7 +5321,7 @@ const vs = {
|
|
|
5302
5321
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5303
5322
|
}
|
|
5304
5323
|
};
|
|
5305
|
-
E.select_table_v1 =
|
|
5324
|
+
E.select_table_v1 = ys;
|
|
5306
5325
|
s.forBlock.select_table_v1 = function(t) {
|
|
5307
5326
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
5308
5327
|
return [`{spaceId:${e(o)},tableId:${e(i)}}`, u.ATOMIC];
|
|
@@ -5568,7 +5587,7 @@ const Ls = {
|
|
|
5568
5587
|
const e = this.table.columns[t], n = new O(
|
|
5569
5588
|
() => this.genColumnOpts_()
|
|
5570
5589
|
);
|
|
5571
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5590
|
+
this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
5572
5591
|
}
|
|
5573
5592
|
},
|
|
5574
5593
|
updateShape_: function() {
|
|
@@ -5582,7 +5601,7 @@ const Ls = {
|
|
|
5582
5601
|
const e = new O(
|
|
5583
5602
|
() => this.genColumnOpts_()
|
|
5584
5603
|
);
|
|
5585
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5604
|
+
this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
5586
5605
|
}
|
|
5587
5606
|
},
|
|
5588
5607
|
updateBlocks_: function(t) {
|
|
@@ -5721,7 +5740,7 @@ const Ps = {
|
|
|
5721
5740
|
}, 0);
|
|
5722
5741
|
},
|
|
5723
5742
|
updateShape_: function() {
|
|
5724
|
-
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(
|
|
5743
|
+
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(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5725
5744
|
},
|
|
5726
5745
|
ensureBlocks: function() {
|
|
5727
5746
|
this.isInsertionMarker() || (Ss(this), Bs(this), F(this, [
|
|
@@ -5750,7 +5769,7 @@ ${i}}
|
|
|
5750
5769
|
};
|
|
5751
5770
|
const Rs = C.xml, Ds = {
|
|
5752
5771
|
init: function() {
|
|
5753
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(
|
|
5772
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
5754
5773
|
new ot(bt, 20, 20, void 0, () => {
|
|
5755
5774
|
this.isInFlyout || this.addEntry_();
|
|
5756
5775
|
})
|
|
@@ -5824,7 +5843,7 @@ const Ms = {
|
|
|
5824
5843
|
E.json_boolean_v1 = Ms;
|
|
5825
5844
|
const Ln = C.xml, Us = {
|
|
5826
5845
|
init: function() {
|
|
5827
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(
|
|
5846
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
|
|
5828
5847
|
new ot(bt, 20, 20, void 0, () => {
|
|
5829
5848
|
this.isInFlyout || this.addEntry_();
|
|
5830
5849
|
})
|
|
@@ -5897,7 +5916,7 @@ const Vs = {
|
|
|
5897
5916
|
E.json_number_v1 = Vs;
|
|
5898
5917
|
const xs = {
|
|
5899
5918
|
init: function() {
|
|
5900
|
-
this.appendDummyInput().setAlign(
|
|
5919
|
+
this.appendDummyInput().setAlign(y.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
5901
5920
|
}
|
|
5902
5921
|
};
|
|
5903
5922
|
E.json_root_v1 = xs;
|
|
@@ -5996,7 +6015,7 @@ const $s = {
|
|
|
5996
6015
|
"Boolean",
|
|
5997
6016
|
"Array",
|
|
5998
6017
|
"Object"
|
|
5999
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
6018
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(y.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
6000
6019
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
6001
6020
|
this.removeInput("ADD" + t);
|
|
6002
6021
|
}
|
|
@@ -7734,7 +7753,7 @@ const ea = {
|
|
|
7734
7753
|
},
|
|
7735
7754
|
updateShape_: function() {
|
|
7736
7755
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7737
|
-
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(
|
|
7756
|
+
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(new ft("key"), "KEY" + t);
|
|
7738
7757
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7739
7758
|
this.removeInput("ADD" + t);
|
|
7740
7759
|
}
|
|
@@ -8191,7 +8210,7 @@ const ca = {
|
|
|
8191
8210
|
}, 0);
|
|
8192
8211
|
},
|
|
8193
8212
|
updateShape_: function() {
|
|
8194
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(
|
|
8213
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(y.Align.RIGHT).appendField("%{BKY_ASSET_ASSET}"), this.moveInputBefore("ASSET", "SUCCESS"));
|
|
8195
8214
|
},
|
|
8196
8215
|
ensureBlocks_: function() {
|
|
8197
8216
|
this.isInsertionMarker() || F(this, [
|
|
@@ -8342,7 +8361,7 @@ const pa = {
|
|
|
8342
8361
|
}, 0);
|
|
8343
8362
|
},
|
|
8344
8363
|
updateShape_: function() {
|
|
8345
|
-
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(
|
|
8364
|
+
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_DATA}"), this.moveInputBefore("DATA", "SUCCESS")), this.getInput("DIR") || (this.appendValueInput("DIR").setCheck("SelectDir").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_DIR}"), this.moveInputBefore("DIR", "DATA")), this.getInput("NAME") || (this.appendValueInput("NAME").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_NAME}"), this.moveInputBefore("NAME", "DIR"));
|
|
8346
8365
|
},
|
|
8347
8366
|
updateShadow_: function() {
|
|
8348
8367
|
if (this.isInsertionMarker())
|
|
@@ -8664,7 +8683,7 @@ const ha = C.xml, fa = {
|
|
|
8664
8683
|
for (let t = 0; t < this.itemCount_; t++)
|
|
8665
8684
|
if (!this.getInput("ADD" + t)) {
|
|
8666
8685
|
const e = this.appendValueInput("ADD" + t).setAlign(
|
|
8667
|
-
|
|
8686
|
+
y.Align.RIGHT
|
|
8668
8687
|
);
|
|
8669
8688
|
t === 0 && e.appendField("%{BKY_TEXT_V1_JOIN_TITLE}");
|
|
8670
8689
|
}
|
|
@@ -8920,7 +8939,7 @@ const Ta = {
|
|
|
8920
8939
|
this.updateShape_(), this.updateShadow_();
|
|
8921
8940
|
},
|
|
8922
8941
|
updateShape_: function() {
|
|
8923
|
-
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(
|
|
8942
|
+
this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_IMMEDIATE}"), this.moveInputBefore("IMMEDIATE", "CALLBACK")), this.getInput("COUNT") || (this.appendValueInput("COUNT").setCheck("Number").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_COUNT}"), this.moveInputBefore("COUNT", "IMMEDIATE")), this.getInput("LOOP") || (this.appendValueInput("LOOP").setCheck("Boolean").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_LOOP}"), this.moveInputBefore("LOOP", "COUNT")), this.getInput("INTERVAL") || (this.appendValueInput("INTERVAL").setCheck("Number").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_INTERVAL_MS}"), this.moveInputBefore("INTERVAL", "LOOP"));
|
|
8924
8943
|
},
|
|
8925
8944
|
updateShadow_: function() {
|
|
8926
8945
|
if (this.isInsertionMarker())
|
|
@@ -9109,7 +9128,7 @@ Zt.getText_ = function() {
|
|
|
9109
9128
|
return console.log(e.event), Oe(n, o);
|
|
9110
9129
|
} else if (this.name === "METHOD") {
|
|
9111
9130
|
const { kind: n, names: o } = e.method;
|
|
9112
|
-
return
|
|
9131
|
+
return ve(n, o);
|
|
9113
9132
|
} else {
|
|
9114
9133
|
if (this.name === "SPACE")
|
|
9115
9134
|
return e.space.name;
|
|
@@ -9156,7 +9175,7 @@ function co(t) {
|
|
|
9156
9175
|
const e = t.getParent();
|
|
9157
9176
|
return e && co(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9158
9177
|
}
|
|
9159
|
-
class
|
|
9178
|
+
class va {
|
|
9160
9179
|
init() {
|
|
9161
9180
|
const e = Bo.registry.getItem("blockDisable");
|
|
9162
9181
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9167,9 +9186,9 @@ class ya {
|
|
|
9167
9186
|
}
|
|
9168
9187
|
bo.registerFieldColour();
|
|
9169
9188
|
Po.registry.unregister(Ro.names.ESCAPE);
|
|
9170
|
-
const
|
|
9171
|
-
|
|
9172
|
-
const Ca = new
|
|
9189
|
+
const ya = new Do.CrossTabCopyPaste();
|
|
9190
|
+
ya.init({ contextMenu: !0, shortcut: !0 });
|
|
9191
|
+
const Ca = new va();
|
|
9173
9192
|
Ca.init();
|
|
9174
9193
|
function un(t) {
|
|
9175
9194
|
const e = jt();
|
|
@@ -9405,13 +9424,13 @@ function Ba(t) {
|
|
|
9405
9424
|
const o = n;
|
|
9406
9425
|
lt(
|
|
9407
9426
|
e,
|
|
9408
|
-
|
|
9427
|
+
vt({
|
|
9409
9428
|
type: "elementProperty",
|
|
9410
9429
|
nodeId: o.node.id,
|
|
9411
9430
|
propertyKeys: o.property.key
|
|
9412
9431
|
})
|
|
9413
9432
|
);
|
|
9414
|
-
} else n.type === "get_app_state_v1" ? lt(e,
|
|
9433
|
+
} else n.type === "get_app_state_v1" ? lt(e, vt({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
9415
9434
|
return e;
|
|
9416
9435
|
}
|
|
9417
9436
|
function ba(t) {
|
|
@@ -9441,12 +9460,12 @@ function Pa(t) {
|
|
|
9441
9460
|
} : (i.property.kind === "elementSlotProperty" || i.property.kind === "customSlotProperty") && (a = {
|
|
9442
9461
|
type: "adaptSlotProperty",
|
|
9443
9462
|
propertyId: i.property.key
|
|
9444
|
-
}), !a || !lt(n,
|
|
9463
|
+
}), !a || !lt(n, vt(a)))
|
|
9445
9464
|
continue;
|
|
9446
9465
|
e.push(a);
|
|
9447
9466
|
} else if (o.type === "get_app_state_v1") {
|
|
9448
9467
|
const a = { type: "state", stateId: o.state.id };
|
|
9449
|
-
if (!lt(n,
|
|
9468
|
+
if (!lt(n, vt(a)))
|
|
9450
9469
|
continue;
|
|
9451
9470
|
e.push(a);
|
|
9452
9471
|
} else if (o.type === "object_get_v1") {
|
|
@@ -9471,7 +9490,7 @@ function Pa(t) {
|
|
|
9471
9490
|
type: "adaptSlotProperty",
|
|
9472
9491
|
propertyId: c.property.key,
|
|
9473
9492
|
subKeys: a
|
|
9474
|
-
}), !r || !lt(n,
|
|
9493
|
+
}), !r || !lt(n, vt(r)))
|
|
9475
9494
|
continue;
|
|
9476
9495
|
e.push(r);
|
|
9477
9496
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -9480,7 +9499,7 @@ function Pa(t) {
|
|
|
9480
9499
|
stateId: i.state.id,
|
|
9481
9500
|
subKeys: a
|
|
9482
9501
|
};
|
|
9483
|
-
if (!lt(n,
|
|
9502
|
+
if (!lt(n, vt(r)))
|
|
9484
9503
|
continue;
|
|
9485
9504
|
e.push(r);
|
|
9486
9505
|
} else
|
|
@@ -9508,7 +9527,7 @@ function Ra(t) {
|
|
|
9508
9527
|
const i = ba(o), a = Pa(i);
|
|
9509
9528
|
e.bind.sets[o.id] = a;
|
|
9510
9529
|
for (const c of a) {
|
|
9511
|
-
const r =
|
|
9530
|
+
const r = vt(c);
|
|
9512
9531
|
e.bind.triggers[r] || (e.bind.triggers[r] = []), lt(e.bind.triggers[r], o.id);
|
|
9513
9532
|
}
|
|
9514
9533
|
}
|
|
@@ -9674,7 +9693,7 @@ const Ma = /* @__PURE__ */ rt({
|
|
|
9674
9693
|
P = n("x-block-lib.bind");
|
|
9675
9694
|
else if (A.type.startsWith("implement_app_method_v")) {
|
|
9676
9695
|
const G = A;
|
|
9677
|
-
P = n("x-block-lib.implementMethod"), P += " - " +
|
|
9696
|
+
P = n("x-block-lib.implementMethod"), P += " - " + ve(G.method.kind, G.method.names);
|
|
9678
9697
|
} else A.type.startsWith("func_entry_v") ? P = n("x-block-lib.funcEntry") : A.type.startsWith("procedure_def_v") ? P = n("x-block-lib.procedure") + " - " + A.getFieldValue("NAME") : P = n("x-block-lib.temporaryBlock");
|
|
9679
9698
|
const It = A.getCommentText() ?? "";
|
|
9680
9699
|
d.push({
|
|
@@ -9908,7 +9927,7 @@ function x(t) {
|
|
|
9908
9927
|
const e = Y.createElement("label");
|
|
9909
9928
|
return e.setAttribute("text", t), e;
|
|
9910
9929
|
}
|
|
9911
|
-
function
|
|
9930
|
+
function v(t, e) {
|
|
9912
9931
|
const n = Y.createElement("block");
|
|
9913
9932
|
if (n.setAttribute("type", t), e)
|
|
9914
9933
|
for (const o of e)
|
|
@@ -9956,30 +9975,32 @@ function Xa(t, e) {
|
|
|
9956
9975
|
}
|
|
9957
9976
|
function Ja() {
|
|
9958
9977
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9959
|
-
return !(t.type !== "comp" || e.meta.events.length <= 0);
|
|
9978
|
+
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
9960
9979
|
}
|
|
9961
9980
|
function qa() {
|
|
9962
9981
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9963
|
-
return !(t.type !== "comp" || e.meta.states.length <= 0);
|
|
9982
|
+
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
9964
9983
|
}
|
|
9965
9984
|
function Pn() {
|
|
9966
9985
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9967
|
-
return !(t.type !== "comp" || e.meta.methods.length <= 0);
|
|
9986
|
+
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
9968
9987
|
}
|
|
9969
9988
|
function Qa() {
|
|
9970
9989
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9971
9990
|
if (t.type !== "comp")
|
|
9972
9991
|
return !1;
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9992
|
+
if (e.meta.methods) {
|
|
9993
|
+
for (const { outputs: n } of e.meta.methods)
|
|
9994
|
+
if (n && n.length > 0)
|
|
9995
|
+
return !0;
|
|
9996
|
+
}
|
|
9976
9997
|
return !1;
|
|
9977
9998
|
}
|
|
9978
9999
|
function za() {
|
|
9979
10000
|
const t = [];
|
|
9980
|
-
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(
|
|
9981
|
-
|
|
9982
|
-
), t.push(
|
|
10001
|
+
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(v("on_app_event_v1")), Ja() && t.push(v("trigger_app_event_v1")), t.push(
|
|
10002
|
+
v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
|
|
10003
|
+
), t.push(v("watch_effect_v1")), (X("getProperty") || X("setProperty")) && t.push(x(f("LABEL_PROPERTY"))), X("getProperty") && t.push(v("get_app_property_v1")), X("setProperty") && t.push(v("set_app_property_v1")), qa() && (t.push(x(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), (X("callMethod") || Pn()) && t.push(x(f("LABEL_METHOD"))), X("callMethod") && t.push(v("call_app_method_v1")), Pn() && (t.push(v("implement_app_method_v1")), Qa() && t.push(v("set_app_method_output_v1")), t.push(v("procedure_return_v1"))), t;
|
|
9983
10004
|
}
|
|
9984
10005
|
const _o = { name: "APP_COMP_CATEGORY", callback: za };
|
|
9985
10006
|
function Za() {
|
|
@@ -9989,7 +10010,7 @@ function Za() {
|
|
|
9989
10010
|
const de = { name: "APP_COMPUTE_CATEGORY", callback: Za };
|
|
9990
10011
|
function tc() {
|
|
9991
10012
|
const t = [];
|
|
9992
|
-
return t.push(
|
|
10013
|
+
return t.push(v("app_debug_trace_v1", [Rt("OBJECT")])), t.push(v("popup_message_v1", [Rt("TEXT")])), t.push(v("open_confirm_dlg_v1")), t.push(v("open_prompt_dlg_v1")), t;
|
|
9993
10014
|
}
|
|
9994
10015
|
const he = { name: "APP_MESSAGE_CATEGORY", callback: tc };
|
|
9995
10016
|
function ec() {
|
|
@@ -10000,27 +10021,27 @@ function ec() {
|
|
|
10000
10021
|
}
|
|
10001
10022
|
function nc() {
|
|
10002
10023
|
const t = [];
|
|
10003
|
-
return t.push(
|
|
10024
|
+
return t.push(v("app_env_is_v1")), ec() && t.push(v("navigate_to_v1")), t;
|
|
10004
10025
|
}
|
|
10005
10026
|
const fe = { name: "APP_MISC_CATEGORY", callback: nc };
|
|
10006
10027
|
function oc() {
|
|
10007
10028
|
const { activeObject: t, activePage: e } = g.app;
|
|
10008
|
-
return !(t.type !== "page" || e.meta.states.length <= 0);
|
|
10029
|
+
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
10009
10030
|
}
|
|
10010
10031
|
function ic() {
|
|
10011
10032
|
const { activeObject: t, activePage: e } = g.app;
|
|
10012
|
-
return !(t.type !== "page" || e.meta.arguments.length <= 0);
|
|
10033
|
+
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
10013
10034
|
}
|
|
10014
10035
|
function sc() {
|
|
10015
10036
|
const t = [];
|
|
10016
|
-
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(
|
|
10017
|
-
|
|
10018
|
-
), t.push(
|
|
10037
|
+
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(v("on_app_event_v1")), t.push(
|
|
10038
|
+
v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
|
|
10039
|
+
), t.push(v("watch_effect_v1")), (X("getProperty") || X("setProperty")) && t.push(x(f("LABEL_PROPERTY"))), X("getProperty") && t.push(v("get_app_property_v1")), X("setProperty") && t.push(v("set_app_property_v1")), oc() && (t.push(x(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), X("callMethod") && (t.push(x(f("LABEL_METHOD"))), t.push(v("call_app_method_v1"))), ic() && (t.push(x(f("LABEL_ARGUMENT"))), t.push(v("get_page_argument_v1"))), t;
|
|
10019
10040
|
}
|
|
10020
10041
|
const po = { name: "APP_PAGE_CATEGORY", callback: sc };
|
|
10021
10042
|
function ac() {
|
|
10022
10043
|
const t = [];
|
|
10023
|
-
return t.push(x(f("LABEL_RESOURCE"))), t.push(
|
|
10044
|
+
return t.push(x(f("LABEL_RESOURCE"))), t.push(v("upload_resource_v1")), t;
|
|
10024
10045
|
}
|
|
10025
10046
|
const me = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
|
|
10026
10047
|
function cc() {
|
|
@@ -10093,15 +10114,15 @@ const pt = {
|
|
|
10093
10114
|
function uc() {
|
|
10094
10115
|
const t = [];
|
|
10095
10116
|
if (nt().length > 0)
|
|
10096
|
-
t.push(x(f("LABEL_OPERATION"))), t.push(
|
|
10097
|
-
|
|
10098
|
-
), t.push(x(f("LABEL_CONDITION"))), t.push(
|
|
10099
|
-
|
|
10117
|
+
t.push(x(f("LABEL_OPERATION"))), t.push(v("add_data_v1")), t.push(v("delete_data_v1")), t.push(v("update_data_v1")), t.push(v("query_data_v1")), t.push(v("transaction_v1")), t.push(
|
|
10118
|
+
v("interrupt_transaction_v1", [Rt("VALUE")])
|
|
10119
|
+
), t.push(x(f("LABEL_CONDITION"))), t.push(v("cond_logic_v1")), t.push(v("cond_atomic_v1", [Rt("VALUE")])), t.push(x(f("LABEL_QUERY_EXTRA"))), t.push(
|
|
10120
|
+
v("query_extra_limit_v1", [
|
|
10100
10121
|
bn("OFFSET", 0),
|
|
10101
10122
|
bn("LIMIT", 1)
|
|
10102
10123
|
])
|
|
10103
10124
|
), t.push(
|
|
10104
|
-
|
|
10125
|
+
v("query_extra_sortby_v1", [
|
|
10105
10126
|
Rt("COLUMN"),
|
|
10106
10127
|
Xa("DESC")
|
|
10107
10128
|
])
|
|
@@ -10118,7 +10139,7 @@ function lc() {
|
|
|
10118
10139
|
}
|
|
10119
10140
|
function _c() {
|
|
10120
10141
|
const t = [];
|
|
10121
|
-
return g.compute.activeObject.type === "flow" && t.push(
|
|
10142
|
+
return g.compute.activeObject.type === "flow" && t.push(v("on_flow_state_event_v1")), lc() && console.assert(!0), t;
|
|
10122
10143
|
}
|
|
10123
10144
|
const Ee = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
|
|
10124
10145
|
function pc() {
|
|
@@ -10126,13 +10147,13 @@ function pc() {
|
|
|
10126
10147
|
}
|
|
10127
10148
|
function dc() {
|
|
10128
10149
|
const t = [];
|
|
10129
|
-
return g.compute.activeObject.type === "func" && (t.push(
|
|
10150
|
+
return g.compute.activeObject.type === "func" && (t.push(v("func_entry_v1")), g.compute.activeFunc.outputs.length > 0 && t.push(v("set_func_output_v1")), t.push(v("procedure_return_v1"))), pc() && t.push(v("call_func_internal_v1")), t;
|
|
10130
10151
|
}
|
|
10131
10152
|
const ge = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
|
|
10132
10153
|
function hc() {
|
|
10133
10154
|
const t = [];
|
|
10134
10155
|
return t.push(
|
|
10135
|
-
|
|
10156
|
+
v("compute_debug_trace_v1", [Rt("OBJECT")])
|
|
10136
10157
|
), t;
|
|
10137
10158
|
}
|
|
10138
10159
|
const Ae = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
|
|
@@ -11100,7 +11121,7 @@ const Ae = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
|
|
|
11100
11121
|
function Ac(t, e, n, o) {
|
|
11101
11122
|
He.theme = o ? "dark" : "light", He.toolbox = Ic(e, n);
|
|
11102
11123
|
const i = Vo(t, He);
|
|
11103
|
-
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n),
|
|
11124
|
+
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n), vc(i), i;
|
|
11104
11125
|
}
|
|
11105
11126
|
function Ic(t, e) {
|
|
11106
11127
|
let n;
|
|
@@ -11112,7 +11133,7 @@ function Oc(t, e, n) {
|
|
|
11112
11133
|
}
|
|
11113
11134
|
e === "page" ? n === "v1" && (o(po), o(he), o(fe), o(pt), o(_t), o(me), o(de)) : e === "comp" ? n === "v1" && (o(_o), o(he), o(fe), o(pt), o(_t), o(me), o(de)) : e === "func" ? n === "v1" && (o(ge), o(Ee), o(Te), o(Ae), o(pt), o(_t)) : e === "flow" && n === "v1" && (o(ge), o(Ee), o(Te), o(Ae), o(pt), o(_t));
|
|
11114
11135
|
}
|
|
11115
|
-
function
|
|
11136
|
+
function vc(t) {
|
|
11116
11137
|
const { router: e } = kt;
|
|
11117
11138
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
11118
11139
|
const n = e.resolve({
|
|
@@ -11130,7 +11151,7 @@ function yc(t) {
|
|
|
11130
11151
|
}, 100);
|
|
11131
11152
|
});
|
|
11132
11153
|
}
|
|
11133
|
-
function
|
|
11154
|
+
function yc(t, e) {
|
|
11134
11155
|
const n = e.newBlock("json_root_v1");
|
|
11135
11156
|
n.initSvg(), n.render();
|
|
11136
11157
|
const o = (i, a) => {
|
|
@@ -11300,7 +11321,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
|
|
|
11300
11321
|
}
|
|
11301
11322
|
}
|
|
11302
11323
|
const To = (N) => {
|
|
11303
|
-
m.value = !0, t.type === "json" ?
|
|
11324
|
+
m.value = !0, t.type === "json" ? yc(N, d.workspace) : $.workspaces.load(N, d.workspace);
|
|
11304
11325
|
}, Eo = () => t.type === "json" ? Cc(d.workspace) : $.workspaces.save(d.workspace), go = () => {
|
|
11305
11326
|
if (t.type === "json")
|
|
11306
11327
|
console.assert(!1);
|