x-block-lib 0.8.46 → 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/index.js +170 -161
- package/package.json +3 -3
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 });
|
|
@@ -587,7 +589,7 @@ function Qe(t) {
|
|
|
587
589
|
});
|
|
588
590
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
589
591
|
const p = a[l.reference.comp];
|
|
590
|
-
if (p)
|
|
592
|
+
if (p && p.meta.events)
|
|
591
593
|
for (const { id: h, name: d, params: m } of p.meta.events)
|
|
592
594
|
c.push({
|
|
593
595
|
id: Z("referenceEvent", t, h),
|
|
@@ -598,7 +600,7 @@ function Qe(t) {
|
|
|
598
600
|
}
|
|
599
601
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
600
602
|
const p = a[l.reference.comp];
|
|
601
|
-
if (p)
|
|
603
|
+
if (p && p.meta.events)
|
|
602
604
|
for (const { id: h, name: d, params: m } of p.meta.events)
|
|
603
605
|
c.push({
|
|
604
606
|
id: Z("multipleRefEvent", t, h),
|
|
@@ -607,7 +609,7 @@ function Qe(t) {
|
|
|
607
609
|
params: ht(m)
|
|
608
610
|
});
|
|
609
611
|
}
|
|
610
|
-
if (V(_.key) && n.type === "comp")
|
|
612
|
+
if (V(_.key) && n.type === "comp" && i.meta.events)
|
|
611
613
|
for (const { id: p, name: h, params: d } of i.meta.events)
|
|
612
614
|
c.push({
|
|
613
615
|
id: Z("customEvent", t, p),
|
|
@@ -625,7 +627,7 @@ function Qe(t) {
|
|
|
625
627
|
});
|
|
626
628
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
627
629
|
const p = a[l.reference.comp];
|
|
628
|
-
if (p)
|
|
630
|
+
if (p && p.meta.properties)
|
|
629
631
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
630
632
|
c.push({
|
|
631
633
|
id: Z("referencePropertyChangeEvent", t, h),
|
|
@@ -636,7 +638,7 @@ function Qe(t) {
|
|
|
636
638
|
}
|
|
637
639
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
638
640
|
const p = a[l.reference.comp];
|
|
639
|
-
if (p)
|
|
641
|
+
if (p && p.meta.properties)
|
|
640
642
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
641
643
|
c.push({
|
|
642
644
|
id: Z("multipleRefPropertyChangeEvent", t, h),
|
|
@@ -645,7 +647,7 @@ function Qe(t) {
|
|
|
645
647
|
params: Q(m)
|
|
646
648
|
});
|
|
647
649
|
}
|
|
648
|
-
if (V(_.key) && n.type === "comp")
|
|
650
|
+
if (V(_.key) && n.type === "comp" && i.meta.properties)
|
|
649
651
|
for (const { id: p, name: h, type: d } of i.meta.properties)
|
|
650
652
|
c.push({
|
|
651
653
|
id: Z("customPropertyChangeEvent", t, p),
|
|
@@ -654,15 +656,16 @@ function Qe(t) {
|
|
|
654
656
|
params: Q(d)
|
|
655
657
|
});
|
|
656
658
|
if (V(_.key)) {
|
|
657
|
-
if (n.type === "page")
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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)
|
|
666
669
|
for (const { id: p, name: h, type: d } of i.meta.states)
|
|
667
670
|
c.push({
|
|
668
671
|
id: Z("stateChangeEvent", "globality", p),
|
|
@@ -700,7 +703,7 @@ function Fe(t) {
|
|
|
700
703
|
if (J(h.key) && p.reference && p.reference.comp) {
|
|
701
704
|
const d = a[p.reference.comp];
|
|
702
705
|
if (d) {
|
|
703
|
-
const m = d.meta.events
|
|
706
|
+
const m = d.meta.events?.find((A) => A.id === _);
|
|
704
707
|
if (m)
|
|
705
708
|
return {
|
|
706
709
|
id: t,
|
|
@@ -714,7 +717,7 @@ function Fe(t) {
|
|
|
714
717
|
if (q(h.key) && p.reference && p.reference.comp) {
|
|
715
718
|
const d = a[p.reference.comp];
|
|
716
719
|
if (d) {
|
|
717
|
-
const m = d.meta.events
|
|
720
|
+
const m = d.meta.events?.find((A) => A.id === _);
|
|
718
721
|
if (m)
|
|
719
722
|
return {
|
|
720
723
|
id: t,
|
|
@@ -726,7 +729,7 @@ function Fe(t) {
|
|
|
726
729
|
}
|
|
727
730
|
} else if (r === "customEvent") {
|
|
728
731
|
if (V(h.key) && n.type === "comp") {
|
|
729
|
-
const d = i.meta.events
|
|
732
|
+
const d = i.meta.events?.find((m) => m.id === _);
|
|
730
733
|
if (d)
|
|
731
734
|
return {
|
|
732
735
|
id: t,
|
|
@@ -752,7 +755,7 @@ function Fe(t) {
|
|
|
752
755
|
if (J(h.key) && p.reference && p.reference.comp) {
|
|
753
756
|
const d = a[p.reference.comp];
|
|
754
757
|
if (d) {
|
|
755
|
-
const m = d.meta.properties
|
|
758
|
+
const m = d.meta.properties?.find(
|
|
756
759
|
(A) => A.id === _
|
|
757
760
|
);
|
|
758
761
|
if (m)
|
|
@@ -768,7 +771,7 @@ function Fe(t) {
|
|
|
768
771
|
if (q(h.key) && p.reference && p.reference.comp) {
|
|
769
772
|
const d = a[p.reference.comp];
|
|
770
773
|
if (d) {
|
|
771
|
-
const m = d.meta.properties
|
|
774
|
+
const m = d.meta.properties?.find(
|
|
772
775
|
(A) => A.id === _
|
|
773
776
|
);
|
|
774
777
|
if (m)
|
|
@@ -782,7 +785,7 @@ function Fe(t) {
|
|
|
782
785
|
}
|
|
783
786
|
} else if (r === "customPropertyChangeEvent") {
|
|
784
787
|
if (V(h.key) && n.type === "comp") {
|
|
785
|
-
const d = i.meta.properties
|
|
788
|
+
const d = i.meta.properties?.find(
|
|
786
789
|
(m) => m.id === _
|
|
787
790
|
);
|
|
788
791
|
if (d)
|
|
@@ -795,7 +798,7 @@ function Fe(t) {
|
|
|
795
798
|
}
|
|
796
799
|
} else if (r === "stateChangeEvent" && V(h.key)) {
|
|
797
800
|
if (n.type === "page") {
|
|
798
|
-
const d = o.meta.states
|
|
801
|
+
const d = o.meta.states?.find(
|
|
799
802
|
(m) => m.id === _
|
|
800
803
|
);
|
|
801
804
|
if (d)
|
|
@@ -806,7 +809,7 @@ function Fe(t) {
|
|
|
806
809
|
params: Q(d.type)
|
|
807
810
|
};
|
|
808
811
|
} else if (n.type === "comp") {
|
|
809
|
-
const d = i.meta.states
|
|
812
|
+
const d = i.meta.states?.find(
|
|
810
813
|
(m) => m.id === _
|
|
811
814
|
);
|
|
812
815
|
if (d)
|
|
@@ -827,7 +830,7 @@ function Ni(t) {
|
|
|
827
830
|
}
|
|
828
831
|
function Qn() {
|
|
829
832
|
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
830
|
-
if (t.type === "comp")
|
|
833
|
+
if (t.type === "comp" && e.meta.events)
|
|
831
834
|
for (const { id: o, name: i, params: a } of e.meta.events)
|
|
832
835
|
n.push({
|
|
833
836
|
id: Z("customEvent", "globality", o),
|
|
@@ -842,7 +845,7 @@ function kn(t) {
|
|
|
842
845
|
return;
|
|
843
846
|
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } = on(t);
|
|
844
847
|
if (o === "customEvent" && i === "globality" && e.type === "comp") {
|
|
845
|
-
const c = n.meta.events
|
|
848
|
+
const c = n.meta.events?.find(
|
|
846
849
|
(r) => r.id === a
|
|
847
850
|
);
|
|
848
851
|
if (c)
|
|
@@ -861,12 +864,16 @@ function Li() {
|
|
|
861
864
|
return k(t);
|
|
862
865
|
}
|
|
863
866
|
function ct(t) {
|
|
867
|
+
if (!t)
|
|
868
|
+
return;
|
|
864
869
|
const e = [];
|
|
865
870
|
for (const { id: n, name: o, type: i } of t)
|
|
866
871
|
e.push({ key: n, name: o, type: i });
|
|
867
872
|
return e;
|
|
868
873
|
}
|
|
869
874
|
function Ct(t) {
|
|
875
|
+
if (!t)
|
|
876
|
+
return;
|
|
870
877
|
const e = [];
|
|
871
878
|
for (const { id: n, name: o, type: i } of t)
|
|
872
879
|
e.push({ key: n, name: o, type: i });
|
|
@@ -890,7 +897,7 @@ function ze(t) {
|
|
|
890
897
|
});
|
|
891
898
|
if (J(c.key) && a.reference && a.reference.comp) {
|
|
892
899
|
const r = o[a.reference.comp];
|
|
893
|
-
if (r)
|
|
900
|
+
if (r && r.meta.methods)
|
|
894
901
|
for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
|
|
895
902
|
i.push({
|
|
896
903
|
id: Yt("referenceMethod", t, l),
|
|
@@ -902,7 +909,7 @@ function ze(t) {
|
|
|
902
909
|
}
|
|
903
910
|
if (q(c.key) && a.reference && a.reference.comp) {
|
|
904
911
|
const r = o[a.reference.comp];
|
|
905
|
-
if (r)
|
|
912
|
+
if (r && r.meta.methods)
|
|
906
913
|
for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
|
|
907
914
|
i.push({
|
|
908
915
|
id: Yt("multipleRefMethod", t, l),
|
|
@@ -912,7 +919,7 @@ function ze(t) {
|
|
|
912
919
|
outputs: Ct(h)
|
|
913
920
|
});
|
|
914
921
|
}
|
|
915
|
-
if (V(c.key) && e.type === "comp")
|
|
922
|
+
if (V(c.key) && e.type === "comp" && n.meta.methods)
|
|
916
923
|
for (const { id: r, name: l, inputs: _, outputs: p } of n.meta.methods)
|
|
917
924
|
i.push({
|
|
918
925
|
id: Yt("customMethod", t, r),
|
|
@@ -948,7 +955,7 @@ function we(t) {
|
|
|
948
955
|
if (J(l.key) && r.reference && r.reference.comp) {
|
|
949
956
|
const _ = o[r.reference.comp];
|
|
950
957
|
if (_) {
|
|
951
|
-
const p = _.meta.methods
|
|
958
|
+
const p = _.meta.methods?.find(
|
|
952
959
|
(h) => h.id === c
|
|
953
960
|
);
|
|
954
961
|
if (p)
|
|
@@ -965,7 +972,7 @@ function we(t) {
|
|
|
965
972
|
if (q(l.key) && r.reference && r.reference.comp) {
|
|
966
973
|
const _ = o[r.reference.comp];
|
|
967
974
|
if (_) {
|
|
968
|
-
const p = _.meta.methods
|
|
975
|
+
const p = _.meta.methods?.find(
|
|
969
976
|
(h) => h.id === c
|
|
970
977
|
);
|
|
971
978
|
if (p)
|
|
@@ -979,7 +986,7 @@ function we(t) {
|
|
|
979
986
|
}
|
|
980
987
|
}
|
|
981
988
|
} else if (i === "customMethod" && V(l.key) && e.type === "comp") {
|
|
982
|
-
const _ = n.meta.methods
|
|
989
|
+
const _ = n.meta.methods?.find(
|
|
983
990
|
(p) => p.id === c
|
|
984
991
|
);
|
|
985
992
|
if (_)
|
|
@@ -995,12 +1002,12 @@ function we(t) {
|
|
|
995
1002
|
function Si(t) {
|
|
996
1003
|
const e = [], n = ze(t);
|
|
997
1004
|
for (const { id: o, kind: i, names: a } of n)
|
|
998
|
-
e.push([
|
|
1005
|
+
e.push([ve(i, a), o]);
|
|
999
1006
|
return k(e);
|
|
1000
1007
|
}
|
|
1001
1008
|
function cn() {
|
|
1002
1009
|
const { activeObject: t, activeComp: e } = g.app, n = [];
|
|
1003
|
-
if (t.type === "comp")
|
|
1010
|
+
if (t.type === "comp" && e.meta.methods)
|
|
1004
1011
|
for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
|
|
1005
1012
|
n.push({
|
|
1006
1013
|
id: Yt("customMethod", "globality", o),
|
|
@@ -1016,7 +1023,7 @@ function Dt(t) {
|
|
|
1016
1023
|
return;
|
|
1017
1024
|
const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Jt(t);
|
|
1018
1025
|
if (o === "customMethod" && i === "globality" && e.type === "comp") {
|
|
1019
|
-
const c = n.meta.methods
|
|
1026
|
+
const c = n.meta.methods?.find(
|
|
1020
1027
|
(r) => r.id === a
|
|
1021
1028
|
);
|
|
1022
1029
|
if (c)
|
|
@@ -1032,7 +1039,7 @@ function Dt(t) {
|
|
|
1032
1039
|
function zn() {
|
|
1033
1040
|
const t = [], e = cn();
|
|
1034
1041
|
for (const { id: n, kind: o, names: i } of e)
|
|
1035
|
-
t.push([
|
|
1042
|
+
t.push([ve(o, i), n]);
|
|
1036
1043
|
return k(t);
|
|
1037
1044
|
}
|
|
1038
1045
|
function Ze(t) {
|
|
@@ -1057,15 +1064,15 @@ function bi(t, e, n) {
|
|
|
1057
1064
|
return !1;
|
|
1058
1065
|
if (J(t.key) && n) {
|
|
1059
1066
|
const l = r[n];
|
|
1060
|
-
if (l && l.meta.events.length > 0)
|
|
1067
|
+
if (l && l.meta.events && l.meta.events.length > 0)
|
|
1061
1068
|
return !1;
|
|
1062
1069
|
}
|
|
1063
1070
|
if (q(t.key) && n) {
|
|
1064
1071
|
const l = r[n];
|
|
1065
|
-
if (l && l.meta.events.length > 0)
|
|
1072
|
+
if (l && l.meta.events && l.meta.events.length > 0)
|
|
1066
1073
|
return !1;
|
|
1067
1074
|
}
|
|
1068
|
-
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)
|
|
1069
1076
|
return !1;
|
|
1070
1077
|
if (o[t.key] && o[t.key][e]) {
|
|
1071
1078
|
for (const { keys: l, raw: _ } of o[t.key][e])
|
|
@@ -1074,21 +1081,21 @@ function bi(t, e, n) {
|
|
|
1074
1081
|
}
|
|
1075
1082
|
if (J(t.key) && n) {
|
|
1076
1083
|
const l = r[n];
|
|
1077
|
-
if (l && l.meta.properties.length > 0)
|
|
1084
|
+
if (l && l.meta.properties && l.meta.properties.length > 0)
|
|
1078
1085
|
return !1;
|
|
1079
1086
|
}
|
|
1080
1087
|
if (q(t.key) && n) {
|
|
1081
1088
|
const l = r[n];
|
|
1082
|
-
if (l && l.meta.properties.length > 0)
|
|
1089
|
+
if (l && l.meta.properties && l.meta.properties.length > 0)
|
|
1083
1090
|
return !1;
|
|
1084
1091
|
}
|
|
1085
|
-
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)
|
|
1086
1093
|
return !1;
|
|
1087
1094
|
if (V(t.key)) {
|
|
1088
1095
|
if (i.type === "page") {
|
|
1089
|
-
if (a.meta.states.length > 0)
|
|
1096
|
+
if (a.meta.states && a.meta.states.length > 0)
|
|
1090
1097
|
return !1;
|
|
1091
|
-
} else if (i.type === "comp" && c.meta.states.length > 0)
|
|
1098
|
+
} else if (i.type === "comp" && c.meta.states && c.meta.states.length > 0)
|
|
1092
1099
|
return !1;
|
|
1093
1100
|
}
|
|
1094
1101
|
return !0;
|
|
@@ -1099,15 +1106,15 @@ function Pi(t, e) {
|
|
|
1099
1106
|
return !1;
|
|
1100
1107
|
if (J(t.key) && e) {
|
|
1101
1108
|
const a = i[e];
|
|
1102
|
-
if (a && a.meta.methods.length > 0)
|
|
1109
|
+
if (a && a.meta.methods && a.meta.methods.length > 0)
|
|
1103
1110
|
return !1;
|
|
1104
1111
|
}
|
|
1105
1112
|
if (q(t.key) && e) {
|
|
1106
1113
|
const a = i[e];
|
|
1107
|
-
if (a && a.meta.methods.length > 0)
|
|
1114
|
+
if (a && a.meta.methods && a.meta.methods.length > 0)
|
|
1108
1115
|
return !1;
|
|
1109
1116
|
}
|
|
1110
|
-
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);
|
|
1111
1118
|
}
|
|
1112
1119
|
function Ri(t, e, n) {
|
|
1113
1120
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
@@ -1115,15 +1122,15 @@ function Ri(t, e, n) {
|
|
|
1115
1122
|
return !1;
|
|
1116
1123
|
if (J(t.key) && n) {
|
|
1117
1124
|
const r = c[n];
|
|
1118
|
-
if (r && r.meta.properties.length > 0)
|
|
1125
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1119
1126
|
return !1;
|
|
1120
1127
|
}
|
|
1121
1128
|
if (q(t.key) && n) {
|
|
1122
1129
|
const r = c[n];
|
|
1123
|
-
if (r && r.meta.properties.length > 0)
|
|
1130
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1124
1131
|
return !1;
|
|
1125
1132
|
}
|
|
1126
|
-
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);
|
|
1127
1134
|
}
|
|
1128
1135
|
function Di(t, e, n) {
|
|
1129
1136
|
const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
|
|
@@ -1134,15 +1141,15 @@ function Di(t, e, n) {
|
|
|
1134
1141
|
}
|
|
1135
1142
|
if (J(t.key) && n) {
|
|
1136
1143
|
const r = c[n];
|
|
1137
|
-
if (r && r.meta.properties.length > 0)
|
|
1144
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1138
1145
|
return !1;
|
|
1139
1146
|
}
|
|
1140
1147
|
if (q(t.key) && n) {
|
|
1141
1148
|
const r = c[n];
|
|
1142
|
-
if (r && r.meta.properties.length > 0)
|
|
1149
|
+
if (r && r.meta.properties && r.meta.properties.length > 0)
|
|
1143
1150
|
return !1;
|
|
1144
1151
|
}
|
|
1145
|
-
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);
|
|
1146
1153
|
}
|
|
1147
1154
|
function Zn(t, e, n, o) {
|
|
1148
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;
|
|
@@ -1228,7 +1235,7 @@ function Gt(t, e) {
|
|
|
1228
1235
|
});
|
|
1229
1236
|
if (J(_.key) && l.reference && l.reference.comp) {
|
|
1230
1237
|
const p = a[l.reference.comp];
|
|
1231
|
-
if (p)
|
|
1238
|
+
if (p && p.meta.properties)
|
|
1232
1239
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
1233
1240
|
c.push({
|
|
1234
1241
|
id: ee("referenceProperty", t, h),
|
|
@@ -1241,7 +1248,7 @@ function Gt(t, e) {
|
|
|
1241
1248
|
}
|
|
1242
1249
|
if (q(_.key) && l.reference && l.reference.comp) {
|
|
1243
1250
|
const p = a[l.reference.comp];
|
|
1244
|
-
if (p)
|
|
1251
|
+
if (p && p.meta.properties)
|
|
1245
1252
|
for (const { id: h, name: d, type: m } of p.meta.properties)
|
|
1246
1253
|
c.push({
|
|
1247
1254
|
id: ee("multipleRefProperty", t, h),
|
|
@@ -1252,7 +1259,7 @@ function Gt(t, e) {
|
|
|
1252
1259
|
}
|
|
1253
1260
|
});
|
|
1254
1261
|
}
|
|
1255
|
-
if (V(_.key) && o.type === "comp")
|
|
1262
|
+
if (V(_.key) && o.type === "comp" && i.meta.properties)
|
|
1256
1263
|
for (const { id: p, name: h, type: d } of i.meta.properties)
|
|
1257
1264
|
c.push({
|
|
1258
1265
|
id: ee("customProperty", t, p),
|
|
@@ -1264,7 +1271,7 @@ function Gt(t, e) {
|
|
|
1264
1271
|
});
|
|
1265
1272
|
return c;
|
|
1266
1273
|
}
|
|
1267
|
-
function
|
|
1274
|
+
function yt(t) {
|
|
1268
1275
|
if (!t)
|
|
1269
1276
|
return;
|
|
1270
1277
|
const { properties: e } = g.runtime, { activeObject: n, activeComp: o, depends: i } = g.app, a = Mt(n.type, n.subtype);
|
|
@@ -1298,7 +1305,7 @@ function vt(t) {
|
|
|
1298
1305
|
if (J(p.key) && _.reference && _.reference.comp) {
|
|
1299
1306
|
const h = i[_.reference.comp];
|
|
1300
1307
|
if (h) {
|
|
1301
|
-
const d = h.meta.properties
|
|
1308
|
+
const d = h.meta.properties?.find(
|
|
1302
1309
|
(m) => m.id === l
|
|
1303
1310
|
);
|
|
1304
1311
|
if (d)
|
|
@@ -1316,7 +1323,7 @@ function vt(t) {
|
|
|
1316
1323
|
if (q(p.key) && _.reference && _.reference.comp) {
|
|
1317
1324
|
const h = i[_.reference.comp];
|
|
1318
1325
|
if (h) {
|
|
1319
|
-
const d = h.meta.properties
|
|
1326
|
+
const d = h.meta.properties?.find(
|
|
1320
1327
|
(m) => m.id === l
|
|
1321
1328
|
);
|
|
1322
1329
|
if (d)
|
|
@@ -1331,7 +1338,7 @@ function vt(t) {
|
|
|
1331
1338
|
}
|
|
1332
1339
|
}
|
|
1333
1340
|
} else if (c === "customProperty" && V(p.key) && n.type === "comp") {
|
|
1334
|
-
const h = o.meta.properties
|
|
1341
|
+
const h = o.meta.properties?.find(
|
|
1335
1342
|
(d) => d.id === l
|
|
1336
1343
|
);
|
|
1337
1344
|
if (h)
|
|
@@ -1353,14 +1360,14 @@ function to(t, e) {
|
|
|
1353
1360
|
}
|
|
1354
1361
|
function rn() {
|
|
1355
1362
|
const { activeObject: t, activePage: e, activeComp: n } = g.app;
|
|
1356
|
-
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 ?? [] : [];
|
|
1357
1364
|
}
|
|
1358
1365
|
function le(t) {
|
|
1359
1366
|
const { activeObject: e, activePage: n, activeComp: o } = g.app;
|
|
1360
1367
|
if (e.type === "page")
|
|
1361
|
-
return n.meta.states
|
|
1368
|
+
return n.meta.states?.find((i) => i.id === t);
|
|
1362
1369
|
if (e.type === "comp")
|
|
1363
|
-
return o.meta.states
|
|
1370
|
+
return o.meta.states?.find((i) => i.id === t);
|
|
1364
1371
|
}
|
|
1365
1372
|
function eo() {
|
|
1366
1373
|
const t = [], e = rn();
|
|
@@ -1677,7 +1684,7 @@ const Vi = {
|
|
|
1677
1684
|
}, 0);
|
|
1678
1685
|
},
|
|
1679
1686
|
updateShape_: function() {
|
|
1680
|
-
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"));
|
|
1681
1688
|
},
|
|
1682
1689
|
updateShadow_: function() {
|
|
1683
1690
|
if (this.isInsertionMarker())
|
|
@@ -1714,7 +1721,7 @@ const xi = {
|
|
|
1714
1721
|
}, 0);
|
|
1715
1722
|
},
|
|
1716
1723
|
updateShape_: function() {
|
|
1717
|
-
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"));
|
|
1718
1725
|
},
|
|
1719
1726
|
updateShadow_: function() {
|
|
1720
1727
|
if (this.isInsertionMarker())
|
|
@@ -1869,10 +1876,10 @@ const Yi = {
|
|
|
1869
1876
|
if (this.method.inputs)
|
|
1870
1877
|
for (let t = 0; t < this.method.inputs.length; t++) {
|
|
1871
1878
|
const e = this.method.inputs[t];
|
|
1872
|
-
this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(
|
|
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"));
|
|
1873
1880
|
}
|
|
1874
1881
|
if (this.method.kind === "multipleRefMethod")
|
|
1875
|
-
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");
|
|
1876
1883
|
else if (this.getInput("REF_KEY")) {
|
|
1877
1884
|
const t = this.getInput("REF_KEY").connection.targetBlock();
|
|
1878
1885
|
t && t.dispose(), this.removeInput("REF_KEY");
|
|
@@ -2301,7 +2308,7 @@ const Ki = {
|
|
|
2301
2308
|
}, 0);
|
|
2302
2309
|
},
|
|
2303
2310
|
genAppOpts_: function() {
|
|
2304
|
-
return
|
|
2311
|
+
return yi();
|
|
2305
2312
|
},
|
|
2306
2313
|
genPageOpts_: function() {
|
|
2307
2314
|
return Ci(this.app.id);
|
|
@@ -2317,7 +2324,7 @@ const Ki = {
|
|
|
2317
2324
|
}
|
|
2318
2325
|
},
|
|
2319
2326
|
onAppChange_: function(t) {
|
|
2320
|
-
const e =
|
|
2327
|
+
const e = yn(t);
|
|
2321
2328
|
if (!e) {
|
|
2322
2329
|
console.assert(!1);
|
|
2323
2330
|
return;
|
|
@@ -2335,7 +2342,7 @@ const Ki = {
|
|
|
2335
2342
|
e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
|
|
2336
2343
|
},
|
|
2337
2344
|
checkWarning_: function() {
|
|
2338
|
-
const t =
|
|
2345
|
+
const t = yn(this.app.id);
|
|
2339
2346
|
if (!t) {
|
|
2340
2347
|
this.setWarningText(f("WARN_APP_NOT_FOUND"));
|
|
2341
2348
|
return;
|
|
@@ -2487,14 +2494,14 @@ const Hi = {
|
|
|
2487
2494
|
const n = this.node.key !== e.key;
|
|
2488
2495
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2489
2496
|
const o = this.getField("PROPERTY");
|
|
2490
|
-
if (o.getOptions(!1), n || !
|
|
2497
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2491
2498
|
const i = Gt(this.node.id, "read")?.[0];
|
|
2492
2499
|
o.setValue(i?.id ?? "");
|
|
2493
2500
|
}
|
|
2494
2501
|
this.onPropChange_(o.getValue());
|
|
2495
2502
|
},
|
|
2496
2503
|
onPropChange_: function(t) {
|
|
2497
|
-
const e =
|
|
2504
|
+
const e = yt(t);
|
|
2498
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 = []);
|
|
2499
2506
|
},
|
|
2500
2507
|
checkWarning_: function() {
|
|
@@ -2508,7 +2515,7 @@ const Hi = {
|
|
|
2508
2515
|
return;
|
|
2509
2516
|
}
|
|
2510
2517
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2511
|
-
const e =
|
|
2518
|
+
const e = yt(this.property.id);
|
|
2512
2519
|
if (!e) {
|
|
2513
2520
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2514
2521
|
return;
|
|
@@ -2592,20 +2599,20 @@ const Gi = {
|
|
|
2592
2599
|
const n = this.node.key !== e.key;
|
|
2593
2600
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2594
2601
|
const o = this.getField("PROPERTY");
|
|
2595
|
-
if (o.getOptions(!1), n || !
|
|
2602
|
+
if (o.getOptions(!1), n || !yt(this.property.id)) {
|
|
2596
2603
|
const i = Gt(this.node.id, "write")?.[0];
|
|
2597
2604
|
o.setValue(i?.id ?? "");
|
|
2598
2605
|
}
|
|
2599
2606
|
this.onPropChange_(o.getValue());
|
|
2600
2607
|
},
|
|
2601
2608
|
onPropChange_: function(t) {
|
|
2602
|
-
const e =
|
|
2609
|
+
const e = yt(t);
|
|
2603
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_();
|
|
2604
2611
|
},
|
|
2605
2612
|
updateShadow_: function() {
|
|
2606
2613
|
if (this.isInsertionMarker())
|
|
2607
2614
|
return;
|
|
2608
|
-
const t =
|
|
2615
|
+
const t = yt(this.property.id);
|
|
2609
2616
|
if (!t)
|
|
2610
2617
|
return;
|
|
2611
2618
|
this.getInput("VALUE").setShadowDom(null);
|
|
@@ -2629,7 +2636,7 @@ const Gi = {
|
|
|
2629
2636
|
return;
|
|
2630
2637
|
}
|
|
2631
2638
|
t.alias !== this.node.alias && (this.node.alias = t.alias);
|
|
2632
|
-
const e =
|
|
2639
|
+
const e = yt(this.property.id);
|
|
2633
2640
|
if (!e) {
|
|
2634
2641
|
this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
|
|
2635
2642
|
return;
|
|
@@ -3763,7 +3770,7 @@ const ts = {
|
|
|
3763
3770
|
}
|
|
3764
3771
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3765
3772
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3766
|
-
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"));
|
|
3767
3774
|
}
|
|
3768
3775
|
},
|
|
3769
3776
|
updateCheck_: function() {
|
|
@@ -3937,7 +3944,7 @@ const es = {
|
|
|
3937
3944
|
}
|
|
3938
3945
|
for (let t = 0; t < this.func.inputs.length; t++) {
|
|
3939
3946
|
const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
|
|
3940
|
-
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"));
|
|
3941
3948
|
}
|
|
3942
3949
|
},
|
|
3943
3950
|
updateCheck_: function() {
|
|
@@ -4351,7 +4358,7 @@ const cs = {
|
|
|
4351
4358
|
}, 0);
|
|
4352
4359
|
},
|
|
4353
4360
|
updateShape_: function() {
|
|
4354
|
-
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"));
|
|
4355
4362
|
},
|
|
4356
4363
|
ensureBlocks_: function() {
|
|
4357
4364
|
this.isInsertionMarker() || (ss(this), F(this, [
|
|
@@ -4727,7 +4734,7 @@ const fs = {
|
|
|
4727
4734
|
}, 0);
|
|
4728
4735
|
},
|
|
4729
4736
|
updateShape_: function() {
|
|
4730
|
-
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"));
|
|
4731
4738
|
},
|
|
4732
4739
|
ensureBlocks_: function() {
|
|
4733
4740
|
this.isInsertionMarker() || (ps(this), ds(this), F(this, [
|
|
@@ -4905,7 +4912,7 @@ const As = {
|
|
|
4905
4912
|
}, 0);
|
|
4906
4913
|
},
|
|
4907
4914
|
updateShape_: function() {
|
|
4908
|
-
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"));
|
|
4909
4916
|
},
|
|
4910
4917
|
ensureBlocks_: function() {
|
|
4911
4918
|
this.isInsertionMarker() || (ms(this), Ts(this), Es(this), F(this, [
|
|
@@ -5001,7 +5008,7 @@ const Os = {
|
|
|
5001
5008
|
}
|
|
5002
5009
|
};
|
|
5003
5010
|
E.select_column_item_v1 = Os;
|
|
5004
|
-
const
|
|
5011
|
+
const vs = {
|
|
5005
5012
|
init: function() {
|
|
5006
5013
|
this.space = {
|
|
5007
5014
|
id: "",
|
|
@@ -5174,7 +5181,7 @@ const ys = {
|
|
|
5174
5181
|
const e = this.table.columns[t], n = new O(
|
|
5175
5182
|
() => this.genColumnOpts_()
|
|
5176
5183
|
), o = new ft("");
|
|
5177
|
-
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);
|
|
5178
5185
|
}
|
|
5179
5186
|
},
|
|
5180
5187
|
updateShape_: function() {
|
|
@@ -5186,7 +5193,7 @@ const ys = {
|
|
|
5186
5193
|
const e = new O(
|
|
5187
5194
|
() => this.genColumnOpts_()
|
|
5188
5195
|
), n = new ft("");
|
|
5189
|
-
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);
|
|
5190
5197
|
const o = this.table.columns[0];
|
|
5191
5198
|
e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
|
|
5192
5199
|
}
|
|
@@ -5210,7 +5217,7 @@ const ys = {
|
|
|
5210
5217
|
this.setWarningText(null);
|
|
5211
5218
|
}
|
|
5212
5219
|
};
|
|
5213
|
-
E.select_column_v1 =
|
|
5220
|
+
E.select_column_v1 = vs;
|
|
5214
5221
|
s.forBlock.select_column_v1 = function(t) {
|
|
5215
5222
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
|
|
5216
5223
|
for (let l = 0; l < n.itemCount_; l++) {
|
|
@@ -5222,7 +5229,7 @@ s.forBlock.select_column_v1 = function(t) {
|
|
|
5222
5229
|
p !== 0 && (c += ","), c += `{name:${e(l)},alias:${e(_)}}`;
|
|
5223
5230
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${c}}`, u.ATOMIC];
|
|
5224
5231
|
};
|
|
5225
|
-
const
|
|
5232
|
+
const ys = {
|
|
5226
5233
|
init: function() {
|
|
5227
5234
|
this.space = {
|
|
5228
5235
|
id: "",
|
|
@@ -5314,7 +5321,7 @@ const vs = {
|
|
|
5314
5321
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
5315
5322
|
}
|
|
5316
5323
|
};
|
|
5317
|
-
E.select_table_v1 =
|
|
5324
|
+
E.select_table_v1 = ys;
|
|
5318
5325
|
s.forBlock.select_table_v1 = function(t) {
|
|
5319
5326
|
const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
|
|
5320
5327
|
return [`{spaceId:${e(o)},tableId:${e(i)}}`, u.ATOMIC];
|
|
@@ -5580,7 +5587,7 @@ const Ls = {
|
|
|
5580
5587
|
const e = this.table.columns[t], n = new O(
|
|
5581
5588
|
() => this.genColumnOpts_()
|
|
5582
5589
|
);
|
|
5583
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5590
|
+
this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
|
|
5584
5591
|
}
|
|
5585
5592
|
},
|
|
5586
5593
|
updateShape_: function() {
|
|
@@ -5594,7 +5601,7 @@ const Ls = {
|
|
|
5594
5601
|
const e = new O(
|
|
5595
5602
|
() => this.genColumnOpts_()
|
|
5596
5603
|
);
|
|
5597
|
-
this.appendValueInput("ADD" + t).setAlign(
|
|
5604
|
+
this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(e, "COLUMN" + t);
|
|
5598
5605
|
}
|
|
5599
5606
|
},
|
|
5600
5607
|
updateBlocks_: function(t) {
|
|
@@ -5733,7 +5740,7 @@ const Ps = {
|
|
|
5733
5740
|
}, 0);
|
|
5734
5741
|
},
|
|
5735
5742
|
updateShape_: function() {
|
|
5736
|
-
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"));
|
|
5737
5744
|
},
|
|
5738
5745
|
ensureBlocks: function() {
|
|
5739
5746
|
this.isInsertionMarker() || (Ss(this), Bs(this), F(this, [
|
|
@@ -5762,7 +5769,7 @@ ${i}}
|
|
|
5762
5769
|
};
|
|
5763
5770
|
const Rs = C.xml, Ds = {
|
|
5764
5771
|
init: function() {
|
|
5765
|
-
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(
|
|
5766
5773
|
new ot(bt, 20, 20, void 0, () => {
|
|
5767
5774
|
this.isInFlyout || this.addEntry_();
|
|
5768
5775
|
})
|
|
@@ -5836,7 +5843,7 @@ const Ms = {
|
|
|
5836
5843
|
E.json_boolean_v1 = Ms;
|
|
5837
5844
|
const Ln = C.xml, Us = {
|
|
5838
5845
|
init: function() {
|
|
5839
|
-
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(
|
|
5840
5847
|
new ot(bt, 20, 20, void 0, () => {
|
|
5841
5848
|
this.isInFlyout || this.addEntry_();
|
|
5842
5849
|
})
|
|
@@ -5909,7 +5916,7 @@ const Vs = {
|
|
|
5909
5916
|
E.json_number_v1 = Vs;
|
|
5910
5917
|
const xs = {
|
|
5911
5918
|
init: function() {
|
|
5912
|
-
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("");
|
|
5913
5920
|
}
|
|
5914
5921
|
};
|
|
5915
5922
|
E.json_root_v1 = xs;
|
|
@@ -6008,7 +6015,7 @@ const $s = {
|
|
|
6008
6015
|
"Boolean",
|
|
6009
6016
|
"Array",
|
|
6010
6017
|
"Object"
|
|
6011
|
-
]), t === 0 && this.getInput("ADD" + t).setAlign(
|
|
6018
|
+
]), t === 0 && this.getInput("ADD" + t).setAlign(y.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
|
|
6012
6019
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
6013
6020
|
this.removeInput("ADD" + t);
|
|
6014
6021
|
}
|
|
@@ -7746,7 +7753,7 @@ const ea = {
|
|
|
7746
7753
|
},
|
|
7747
7754
|
updateShape_: function() {
|
|
7748
7755
|
for (let t = 0; t < this.itemCount_; t++)
|
|
7749
|
-
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);
|
|
7750
7757
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
7751
7758
|
this.removeInput("ADD" + t);
|
|
7752
7759
|
}
|
|
@@ -8203,7 +8210,7 @@ const ca = {
|
|
|
8203
8210
|
}, 0);
|
|
8204
8211
|
},
|
|
8205
8212
|
updateShape_: function() {
|
|
8206
|
-
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"));
|
|
8207
8214
|
},
|
|
8208
8215
|
ensureBlocks_: function() {
|
|
8209
8216
|
this.isInsertionMarker() || F(this, [
|
|
@@ -8354,7 +8361,7 @@ const pa = {
|
|
|
8354
8361
|
}, 0);
|
|
8355
8362
|
},
|
|
8356
8363
|
updateShape_: function() {
|
|
8357
|
-
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"));
|
|
8358
8365
|
},
|
|
8359
8366
|
updateShadow_: function() {
|
|
8360
8367
|
if (this.isInsertionMarker())
|
|
@@ -8676,7 +8683,7 @@ const ha = C.xml, fa = {
|
|
|
8676
8683
|
for (let t = 0; t < this.itemCount_; t++)
|
|
8677
8684
|
if (!this.getInput("ADD" + t)) {
|
|
8678
8685
|
const e = this.appendValueInput("ADD" + t).setAlign(
|
|
8679
|
-
|
|
8686
|
+
y.Align.RIGHT
|
|
8680
8687
|
);
|
|
8681
8688
|
t === 0 && e.appendField("%{BKY_TEXT_V1_JOIN_TITLE}");
|
|
8682
8689
|
}
|
|
@@ -8932,7 +8939,7 @@ const Ta = {
|
|
|
8932
8939
|
this.updateShape_(), this.updateShadow_();
|
|
8933
8940
|
},
|
|
8934
8941
|
updateShape_: function() {
|
|
8935
|
-
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"));
|
|
8936
8943
|
},
|
|
8937
8944
|
updateShadow_: function() {
|
|
8938
8945
|
if (this.isInsertionMarker())
|
|
@@ -9121,7 +9128,7 @@ Zt.getText_ = function() {
|
|
|
9121
9128
|
return console.log(e.event), Oe(n, o);
|
|
9122
9129
|
} else if (this.name === "METHOD") {
|
|
9123
9130
|
const { kind: n, names: o } = e.method;
|
|
9124
|
-
return
|
|
9131
|
+
return ve(n, o);
|
|
9125
9132
|
} else {
|
|
9126
9133
|
if (this.name === "SPACE")
|
|
9127
9134
|
return e.space.name;
|
|
@@ -9168,7 +9175,7 @@ function co(t) {
|
|
|
9168
9175
|
const e = t.getParent();
|
|
9169
9176
|
return e && co(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
9170
9177
|
}
|
|
9171
|
-
class
|
|
9178
|
+
class va {
|
|
9172
9179
|
init() {
|
|
9173
9180
|
const e = Bo.registry.getItem("blockDisable");
|
|
9174
9181
|
e && (e.preconditionFn = function(n) {
|
|
@@ -9179,9 +9186,9 @@ class ya {
|
|
|
9179
9186
|
}
|
|
9180
9187
|
bo.registerFieldColour();
|
|
9181
9188
|
Po.registry.unregister(Ro.names.ESCAPE);
|
|
9182
|
-
const
|
|
9183
|
-
|
|
9184
|
-
const Ca = new
|
|
9189
|
+
const ya = new Do.CrossTabCopyPaste();
|
|
9190
|
+
ya.init({ contextMenu: !0, shortcut: !0 });
|
|
9191
|
+
const Ca = new va();
|
|
9185
9192
|
Ca.init();
|
|
9186
9193
|
function un(t) {
|
|
9187
9194
|
const e = jt();
|
|
@@ -9417,13 +9424,13 @@ function Ba(t) {
|
|
|
9417
9424
|
const o = n;
|
|
9418
9425
|
lt(
|
|
9419
9426
|
e,
|
|
9420
|
-
|
|
9427
|
+
vt({
|
|
9421
9428
|
type: "elementProperty",
|
|
9422
9429
|
nodeId: o.node.id,
|
|
9423
9430
|
propertyKeys: o.property.key
|
|
9424
9431
|
})
|
|
9425
9432
|
);
|
|
9426
|
-
} 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);
|
|
9427
9434
|
return e;
|
|
9428
9435
|
}
|
|
9429
9436
|
function ba(t) {
|
|
@@ -9453,12 +9460,12 @@ function Pa(t) {
|
|
|
9453
9460
|
} : (i.property.kind === "elementSlotProperty" || i.property.kind === "customSlotProperty") && (a = {
|
|
9454
9461
|
type: "adaptSlotProperty",
|
|
9455
9462
|
propertyId: i.property.key
|
|
9456
|
-
}), !a || !lt(n,
|
|
9463
|
+
}), !a || !lt(n, vt(a)))
|
|
9457
9464
|
continue;
|
|
9458
9465
|
e.push(a);
|
|
9459
9466
|
} else if (o.type === "get_app_state_v1") {
|
|
9460
9467
|
const a = { type: "state", stateId: o.state.id };
|
|
9461
|
-
if (!lt(n,
|
|
9468
|
+
if (!lt(n, vt(a)))
|
|
9462
9469
|
continue;
|
|
9463
9470
|
e.push(a);
|
|
9464
9471
|
} else if (o.type === "object_get_v1") {
|
|
@@ -9483,7 +9490,7 @@ function Pa(t) {
|
|
|
9483
9490
|
type: "adaptSlotProperty",
|
|
9484
9491
|
propertyId: c.property.key,
|
|
9485
9492
|
subKeys: a
|
|
9486
|
-
}), !r || !lt(n,
|
|
9493
|
+
}), !r || !lt(n, vt(r)))
|
|
9487
9494
|
continue;
|
|
9488
9495
|
e.push(r);
|
|
9489
9496
|
} else if (i.type === "get_app_state_v1") {
|
|
@@ -9492,7 +9499,7 @@ function Pa(t) {
|
|
|
9492
9499
|
stateId: i.state.id,
|
|
9493
9500
|
subKeys: a
|
|
9494
9501
|
};
|
|
9495
|
-
if (!lt(n,
|
|
9502
|
+
if (!lt(n, vt(r)))
|
|
9496
9503
|
continue;
|
|
9497
9504
|
e.push(r);
|
|
9498
9505
|
} else
|
|
@@ -9520,7 +9527,7 @@ function Ra(t) {
|
|
|
9520
9527
|
const i = ba(o), a = Pa(i);
|
|
9521
9528
|
e.bind.sets[o.id] = a;
|
|
9522
9529
|
for (const c of a) {
|
|
9523
|
-
const r =
|
|
9530
|
+
const r = vt(c);
|
|
9524
9531
|
e.bind.triggers[r] || (e.bind.triggers[r] = []), lt(e.bind.triggers[r], o.id);
|
|
9525
9532
|
}
|
|
9526
9533
|
}
|
|
@@ -9686,7 +9693,7 @@ const Ma = /* @__PURE__ */ rt({
|
|
|
9686
9693
|
P = n("x-block-lib.bind");
|
|
9687
9694
|
else if (A.type.startsWith("implement_app_method_v")) {
|
|
9688
9695
|
const G = A;
|
|
9689
|
-
P = n("x-block-lib.implementMethod"), P += " - " +
|
|
9696
|
+
P = n("x-block-lib.implementMethod"), P += " - " + ve(G.method.kind, G.method.names);
|
|
9690
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");
|
|
9691
9698
|
const It = A.getCommentText() ?? "";
|
|
9692
9699
|
d.push({
|
|
@@ -9920,7 +9927,7 @@ function x(t) {
|
|
|
9920
9927
|
const e = Y.createElement("label");
|
|
9921
9928
|
return e.setAttribute("text", t), e;
|
|
9922
9929
|
}
|
|
9923
|
-
function
|
|
9930
|
+
function v(t, e) {
|
|
9924
9931
|
const n = Y.createElement("block");
|
|
9925
9932
|
if (n.setAttribute("type", t), e)
|
|
9926
9933
|
for (const o of e)
|
|
@@ -9968,30 +9975,32 @@ function Xa(t, e) {
|
|
|
9968
9975
|
}
|
|
9969
9976
|
function Ja() {
|
|
9970
9977
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9971
|
-
return !(t.type !== "comp" || e.meta.events.length <= 0);
|
|
9978
|
+
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
9972
9979
|
}
|
|
9973
9980
|
function qa() {
|
|
9974
9981
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9975
|
-
return !(t.type !== "comp" || e.meta.states.length <= 0);
|
|
9982
|
+
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
9976
9983
|
}
|
|
9977
9984
|
function Pn() {
|
|
9978
9985
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9979
|
-
return !(t.type !== "comp" || e.meta.methods.length <= 0);
|
|
9986
|
+
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
9980
9987
|
}
|
|
9981
9988
|
function Qa() {
|
|
9982
9989
|
const { activeObject: t, activeComp: e } = g.app;
|
|
9983
9990
|
if (t.type !== "comp")
|
|
9984
9991
|
return !1;
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9992
|
+
if (e.meta.methods) {
|
|
9993
|
+
for (const { outputs: n } of e.meta.methods)
|
|
9994
|
+
if (n && n.length > 0)
|
|
9995
|
+
return !0;
|
|
9996
|
+
}
|
|
9988
9997
|
return !1;
|
|
9989
9998
|
}
|
|
9990
9999
|
function za() {
|
|
9991
10000
|
const t = [];
|
|
9992
|
-
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(
|
|
9993
|
-
|
|
9994
|
-
), 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;
|
|
9995
10004
|
}
|
|
9996
10005
|
const _o = { name: "APP_COMP_CATEGORY", callback: za };
|
|
9997
10006
|
function Za() {
|
|
@@ -10001,7 +10010,7 @@ function Za() {
|
|
|
10001
10010
|
const de = { name: "APP_COMPUTE_CATEGORY", callback: Za };
|
|
10002
10011
|
function tc() {
|
|
10003
10012
|
const t = [];
|
|
10004
|
-
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;
|
|
10005
10014
|
}
|
|
10006
10015
|
const he = { name: "APP_MESSAGE_CATEGORY", callback: tc };
|
|
10007
10016
|
function ec() {
|
|
@@ -10012,27 +10021,27 @@ function ec() {
|
|
|
10012
10021
|
}
|
|
10013
10022
|
function nc() {
|
|
10014
10023
|
const t = [];
|
|
10015
|
-
return t.push(
|
|
10024
|
+
return t.push(v("app_env_is_v1")), ec() && t.push(v("navigate_to_v1")), t;
|
|
10016
10025
|
}
|
|
10017
10026
|
const fe = { name: "APP_MISC_CATEGORY", callback: nc };
|
|
10018
10027
|
function oc() {
|
|
10019
10028
|
const { activeObject: t, activePage: e } = g.app;
|
|
10020
|
-
return !(t.type !== "page" || e.meta.states.length <= 0);
|
|
10029
|
+
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
10021
10030
|
}
|
|
10022
10031
|
function ic() {
|
|
10023
10032
|
const { activeObject: t, activePage: e } = g.app;
|
|
10024
|
-
return !(t.type !== "page" || e.meta.arguments.length <= 0);
|
|
10033
|
+
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
10025
10034
|
}
|
|
10026
10035
|
function sc() {
|
|
10027
10036
|
const t = [];
|
|
10028
|
-
return t.push(x(f("LABEL_EVENT"))), X("onEvent") && t.push(
|
|
10029
|
-
|
|
10030
|
-
), 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;
|
|
10031
10040
|
}
|
|
10032
10041
|
const po = { name: "APP_PAGE_CATEGORY", callback: sc };
|
|
10033
10042
|
function ac() {
|
|
10034
10043
|
const t = [];
|
|
10035
|
-
return t.push(x(f("LABEL_RESOURCE"))), t.push(
|
|
10044
|
+
return t.push(x(f("LABEL_RESOURCE"))), t.push(v("upload_resource_v1")), t;
|
|
10036
10045
|
}
|
|
10037
10046
|
const me = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
|
|
10038
10047
|
function cc() {
|
|
@@ -10105,15 +10114,15 @@ const pt = {
|
|
|
10105
10114
|
function uc() {
|
|
10106
10115
|
const t = [];
|
|
10107
10116
|
if (nt().length > 0)
|
|
10108
|
-
t.push(x(f("LABEL_OPERATION"))), t.push(
|
|
10109
|
-
|
|
10110
|
-
), t.push(x(f("LABEL_CONDITION"))), t.push(
|
|
10111
|
-
|
|
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", [
|
|
10112
10121
|
bn("OFFSET", 0),
|
|
10113
10122
|
bn("LIMIT", 1)
|
|
10114
10123
|
])
|
|
10115
10124
|
), t.push(
|
|
10116
|
-
|
|
10125
|
+
v("query_extra_sortby_v1", [
|
|
10117
10126
|
Rt("COLUMN"),
|
|
10118
10127
|
Xa("DESC")
|
|
10119
10128
|
])
|
|
@@ -10130,7 +10139,7 @@ function lc() {
|
|
|
10130
10139
|
}
|
|
10131
10140
|
function _c() {
|
|
10132
10141
|
const t = [];
|
|
10133
|
-
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;
|
|
10134
10143
|
}
|
|
10135
10144
|
const Ee = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
|
|
10136
10145
|
function pc() {
|
|
@@ -10138,13 +10147,13 @@ function pc() {
|
|
|
10138
10147
|
}
|
|
10139
10148
|
function dc() {
|
|
10140
10149
|
const t = [];
|
|
10141
|
-
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;
|
|
10142
10151
|
}
|
|
10143
10152
|
const ge = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
|
|
10144
10153
|
function hc() {
|
|
10145
10154
|
const t = [];
|
|
10146
10155
|
return t.push(
|
|
10147
|
-
|
|
10156
|
+
v("compute_debug_trace_v1", [Rt("OBJECT")])
|
|
10148
10157
|
), t;
|
|
10149
10158
|
}
|
|
10150
10159
|
const Ae = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
|
|
@@ -11112,7 +11121,7 @@ const Ae = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
|
|
|
11112
11121
|
function Ac(t, e, n, o) {
|
|
11113
11122
|
He.theme = o ? "dark" : "light", He.toolbox = Ic(e, n);
|
|
11114
11123
|
const i = Vo(t, He);
|
|
11115
|
-
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n),
|
|
11124
|
+
return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n), vc(i), i;
|
|
11116
11125
|
}
|
|
11117
11126
|
function Ic(t, e) {
|
|
11118
11127
|
let n;
|
|
@@ -11124,7 +11133,7 @@ function Oc(t, e, n) {
|
|
|
11124
11133
|
}
|
|
11125
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));
|
|
11126
11135
|
}
|
|
11127
|
-
function
|
|
11136
|
+
function vc(t) {
|
|
11128
11137
|
const { router: e } = kt;
|
|
11129
11138
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
11130
11139
|
const n = e.resolve({
|
|
@@ -11142,7 +11151,7 @@ function yc(t) {
|
|
|
11142
11151
|
}, 100);
|
|
11143
11152
|
});
|
|
11144
11153
|
}
|
|
11145
|
-
function
|
|
11154
|
+
function yc(t, e) {
|
|
11146
11155
|
const n = e.newBlock("json_root_v1");
|
|
11147
11156
|
n.initSvg(), n.render();
|
|
11148
11157
|
const o = (i, a) => {
|
|
@@ -11312,7 +11321,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
|
|
|
11312
11321
|
}
|
|
11313
11322
|
}
|
|
11314
11323
|
const To = (N) => {
|
|
11315
|
-
m.value = !0, t.type === "json" ?
|
|
11324
|
+
m.value = !0, t.type === "json" ? yc(N, d.workspace) : $.workspaces.load(N, d.workspace);
|
|
11316
11325
|
}, Eo = () => t.type === "json" ? Cc(d.workspace) : $.workspaces.save(d.workspace), go = () => {
|
|
11317
11326
|
if (t.type === "json")
|
|
11318
11327
|
console.assert(!1);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.47",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"vue-router": "^4.6.3",
|
|
39
39
|
"vuetify": "^3.10.9",
|
|
40
40
|
"x-essential-lib": "^0.9.5",
|
|
41
|
-
"x-runtime-lib": "^0.8.
|
|
42
|
-
"x-state-lib": "^0.3.
|
|
41
|
+
"x-runtime-lib": "^0.8.87",
|
|
42
|
+
"x-state-lib": "^0.3.25"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@eslint/js": "^9.39.1",
|