x-block-lib 0.10.30 → 0.10.32
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/{i18n-en.nyqc9jvc.js → i18n-en.may04z0x.js} +1 -1
- package/dist/{i18n-zhHans.hgqwzee0.js → i18n-zhHans.co0odqoc.js} +1 -1
- package/dist/index.js +766 -769
- package/dist/{msg-en.mdggqv1h.js → msg-en.k1nt2k1p.js} +1 -1
- package/dist/{msg-zhHans.nnp59bv2.js → msg-zhHans.fw3xr2l3.js} +1 -1
- package/dist/{rolldown-runtime.gq4dspr5.js → rolldown-runtime.expcly8c.js} +1 -1
- package/dist/{vendor.ga0sar06.js → vendor.kijv4sw8.js} +10 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
Touched: 2021
|
|
9
9
|
*/
|
|
10
10
|
pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#444;background:#f3f3f3}.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-899634e5]{opacity:.4;pointer-events:none}.blocklyToolbox{width:56px;overflow-x:hidden}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{place-items:center;height:28px;display:flex;overflow:hidden}.blocklyFlyout{z-index:21}
|
|
11
|
-
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.
|
|
11
|
+
/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as d, O as f, P as ne, Q as p, R as re, S as m, T as h, U as ie, V as ae, W as oe, X as se, Y as ce, Z as le, _ as g, a as ue, b as de, c as fe, d as pe, f as me, g as _, h as he, i as ge, j as _e, k as ve, l as ye, m as be, n as xe, o as Se, p as v, q as Ce, r as we, s as Te, t as Ee, u as De, v as y, w as b, x, y as Oe, z as ke } from "./vendor.kijv4sw8.js";
|
|
12
12
|
import { eventBus as Ae, globalObjects as je, messageWarning as Me, openConfirmDlg as Ne, openPromptDlg as Pe, useColor as Fe, useSystem as Ie, useViewStack as Le } from "x-essential-lib";
|
|
13
13
|
import { globalState as S } from "x-state-lib";
|
|
14
|
-
import { addIndent as Re, finalProperties as C, getElement as w, getImplementMethodName as ze, getItems as Be, getTag as Ve, getTypes as He, makeEventId as T, makeEventKeyOfCustomSlot as Ue, makeEventKeyOfElementSlot as We, makeMethodId as Ge, makeMethodKeyOfCustomSlot as Ke, makeMethodKeyOfElementSlot as qe, makePropertyId as Je, makePropertyKeyOfCustomSlot as Ye, makePropertyKeyOfElementSlot as Xe, makeTriggerId as Ze,
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { useDisplay as
|
|
14
|
+
import { addIndent as Re, finalProperties as C, getElement as w, getImplementMethodName as ze, getItems as Be, getTag as Ve, getTypes as He, makeEventId as T, makeEventKeyOfCustomSlot as Ue, makeEventKeyOfElementSlot as We, makeMethodId as Ge, makeMethodKeyOfCustomSlot as Ke, makeMethodKeyOfElementSlot as qe, makePropertyId as Je, makePropertyKeyOfCustomSlot as Ye, makePropertyKeyOfElementSlot as Xe, makeTriggerId as Ze, parseNumberUnit as Qe, pkgs as $e, themeColors as et, toEventName as tt, toMethodName as nt, toPropertyName as rt, unwrapEventId as it, unwrapEventKeyOfCustomSlot as at, unwrapEventKeyOfElementSlot as ot, unwrapMethodId as st, unwrapMethodKeyOfCustomSlot as ct, unwrapMethodKeyOfElementSlot as lt, unwrapPropertyId as ut, unwrapPropertyKeyOfCustomSlot as dt, unwrapPropertyKeyOfElementSlot as ft, unwrapSlotId as pt } from "x-runtime-lib";
|
|
15
|
+
import { Fragment as mt, computed as E, createBlock as ht, createCommentVNode as gt, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as _t, inject as vt, isRef as yt, mergeModels as bt, mergeProps as xt, nextTick as St, normalizeStyle as A, onBeforeUnmount as Ct, onMounted as wt, onUnmounted as Tt, openBlock as j, provide as Et, ref as Dt, renderList as Ot, renderSlot as kt, resolveComponent as M, resolveDirective as At, toDisplayString as jt, unref as N, useId as Mt, useModel as Nt, useTemplateRef as Pt, watch as Ft, withCtx as P, withDirectives as It, withKeys as Lt, withModifiers as Rt } from "vue";
|
|
16
|
+
import { useI18n as zt } from "vue-i18n";
|
|
17
|
+
import { useDisplay as Bt } from "vuetify";
|
|
18
18
|
//#region \0rolldown_dynamic_import_helper.js
|
|
19
|
-
var
|
|
19
|
+
var Vt = (e, t, n) => {
|
|
20
20
|
let r = t.lastIndexOf("?"), i = e[r === -1 || r < t.lastIndexOf("/") ? t : t.slice(0, r)];
|
|
21
21
|
return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((e, r) => {
|
|
22
22
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(r.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + t + (t.split("/").length === n ? "" : ". Note that variables only represent file names one level deep."))));
|
|
@@ -24,10 +24,10 @@ var Ht = (e, t, n) => {
|
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/core/locale/index.ts
|
|
27
|
-
async function
|
|
28
|
-
ce((await
|
|
29
|
-
"./msg/en.ts": () => import("./msg-en.
|
|
30
|
-
"./msg/zhHans.ts": () => import("./msg-zhHans.
|
|
27
|
+
async function Ht(e) {
|
|
28
|
+
ce((await Vt(/* @__PURE__ */ Object.assign({
|
|
29
|
+
"./msg/en.ts": () => import("./msg-en.k1nt2k1p.js").then((e) => e.t),
|
|
30
|
+
"./msg/zhHans.ts": () => import("./msg-zhHans.fw3xr2l3.js").then((e) => e.t)
|
|
31
31
|
}), `./msg/${e}.ts`, 3)).default);
|
|
32
32
|
}
|
|
33
33
|
function F(e) {
|
|
@@ -35,31 +35,31 @@ function F(e) {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/core/utils/common/block.ts
|
|
38
|
-
function
|
|
38
|
+
function Ut(e) {
|
|
39
39
|
let t = `<block type="text_v1"><field name="TEXT">${e}</field></block>`;
|
|
40
40
|
return p.xml.textToDom(t);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Wt(e) {
|
|
43
43
|
let t = `<block type="math_number_v1"><field name="NUM">${e}</field></block>`;
|
|
44
44
|
return p.xml.textToDom(t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Gt(e) {
|
|
47
47
|
let t = `<block type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></block>`;
|
|
48
48
|
return p.xml.textToDom(t);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Kt(e, t) {
|
|
51
51
|
let n = null;
|
|
52
|
-
return t === "string" ? n =
|
|
52
|
+
return t === "string" ? n = Ut("") : t === "integer" || t === "decimal" ? n = Wt(0) : t === "boolean" ? n = Gt(!1) : t === "enum" || t === "dateTime" ? n = Ut("") : console.assert(!1, "type not implementd"), n ? re.domToBlock(n, e) : null;
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/core/utils/common/misc.ts
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var qt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", Jt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
57
|
+
function Yt(e) {
|
|
58
58
|
let t = e.lastIndexOf("V");
|
|
59
59
|
if (t <= 0 || t >= e.length - 1) throw Error("must has V");
|
|
60
60
|
return `${pe(e.substring(0, t))}_${"v" + e.substring(t + 1)}`;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Xt(e) {
|
|
63
63
|
let t = e.lastIndexOf("V");
|
|
64
64
|
if (t <= 0 || t >= e.length - 1) return console.assert(!1, `invalid key=${e}`), "";
|
|
65
65
|
let n = e.substring(0, t - 1);
|
|
@@ -68,24 +68,24 @@ function Zt(e) {
|
|
|
68
68
|
function I(e) {
|
|
69
69
|
return e.length <= 0 && e.push([F("NO_OPTION"), ""]), e;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Zt(e) {
|
|
72
72
|
let t = 0;
|
|
73
73
|
for (; e;) t++, e = e.getParent();
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Qt(e) {
|
|
77
77
|
return e.ui === "text" ? "string" : e.ui === "number" ? "number" : e.ui === "switch" ? "boolean" : "string";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function $t(e, t) {
|
|
80
80
|
return !!(e.startsWith("basic.") || !t.ui || t.readonly);
|
|
81
81
|
}
|
|
82
82
|
function L(e) {
|
|
83
83
|
return e.startsWith("globality_v");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function en(e) {
|
|
86
86
|
return e.startsWith("ref_v");
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function tn(e) {
|
|
89
89
|
return e.startsWith("multiple_ref_v");
|
|
90
90
|
}
|
|
91
91
|
function R(e) {
|
|
@@ -94,12 +94,12 @@ function R(e) {
|
|
|
94
94
|
function z(e) {
|
|
95
95
|
return e.startsWith("multiple_slot_v");
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
97
|
+
function nn(e, t, n) {
|
|
98
|
+
let { kind: r, mainKey: i, slotKey: a } = pt(e);
|
|
99
99
|
return !(r !== "elementSlot" && r !== "multipleElementSlot" || t !== i || n !== a);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
let { kind: r, mainKey: i, slotKey: a } =
|
|
101
|
+
function rn(e, t, n) {
|
|
102
|
+
let { kind: r, mainKey: i, slotKey: a } = pt(e);
|
|
103
103
|
return !(r !== "customSlot" && r !== "multipleCustomSlot" || t !== i || n !== a);
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
@@ -107,15 +107,15 @@ function an(e, t, n) {
|
|
|
107
107
|
function B(e) {
|
|
108
108
|
return e === "string" ? "String" : e === "number" ? "Number" : e === "boolean" ? "Boolean" : e === "array" ? "Array" : e === "object" ? "Object" : (e === "any" || console.assert(!1), null);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "text" ? "String" : e.ui === "number" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ?
|
|
110
|
+
function an(e) {
|
|
111
|
+
return e.array ? "Array" : e.ui === "transient" ? B(e.type) : e.ui === "dummy" ? null : e.ui === "text" ? "String" : e.ui === "number" ? "Number" : e.ui === "switch" ? "Boolean" : e.ui === "select" ? Xt(e.items) : e.ui === "multiTypes" ? Xt(e.types) : e.ui === "comp" ? "Comp" : e.ui === "slot" ? "Slot" : e.ui === "adaptSlot" ? "AdaptSlot" : (console.assert(!1), null);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function on(e) {
|
|
114
114
|
return e === "string" ? "String" : e === "integer" || e === "decimal" ? "Number" : e === "boolean" ? "Boolean" : e === "enum" || e === "dateTime" ? "String" : (console.assert(!1), null);
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region src/core/utils/common/colour.ts
|
|
118
|
-
var
|
|
118
|
+
var sn = /* @__PURE__ */ "#F44336.#FFEBEE.#FFCDD2.#EF9A9A.#E57373.#EF5350.#E53935.#D32F2F.#C62828.#B71C1C.#FF8A80.#FF5252.#FF1744.#D50000.#e91e63.#fce4ec.#f8bbd0.#f48fb1.#f06292.#ec407a.#d81b60.#c2185b.#ad1457.#880e4f.#ff80ab.#ff4081.#f50057.#c51162.#9c27b0.#f3e5f5.#e1bee7.#ce93d8.#ba68c8.#ab47bc.#8e24aa.#7b1fa2.#6a1b9a.#4a148c.#ea80fc.#e040fb.#d500f9.#aa00ff.#673ab7.#ede7f6.#d1c4e9.#b39ddb.#9575cd.#7e57c2.#5e35b1.#512da8.#4527a0.#311b92.#b388ff.#7c4dff.#651fff.#6200ea.#3f51b5.#e8eaf6.#c5cae9.#9fa8da.#7986cb.#5c6bc0.#3949ab.#303f9f.#283593.#1a237e.#8c9eff.#536dfe.#3d5afe.#304ffe.#2196F3.#E3F2FD.#BBDEFB.#90CAF9.#64B5F6.#42A5F5.#1E88E5.#1976D2.#1565C0.#0D47A1.#82B1FF.#448AFF.#2979FF.#2962FF.#03a9f4.#e1f5fe.#b3e5fc.#81d4fa.#4fc3f7.#29b6f6.#039be5.#0288d1.#0277bd.#01579b.#80d8ff.#40c4ff.#00b0ff.#0091ea.#00bcd4.#e0f7fa.#b2ebf2.#80deea.#4dd0e1.#26c6da.#00acc1.#0097a7.#00838f.#006064.#84ffff.#18ffff.#00e5ff.#00b8d4.#009688.#e0f2f1.#b2dfdb.#80cbc4.#4db6ac.#26a69a.#00897b.#00796b.#00695c.#004d40.#a7ffeb.#64ffda.#1de9b6.#00bfa5.#4CAF50.#E8F5E9.#C8E6C9.#A5D6A7.#81C784.#66BB6A.#43A047.#388E3C.#2E7D32.#1B5E20.#B9F6CA.#69F0AE.#00E676.#00C853.#8bc34a.#f1f8e9.#dcedc8.#c5e1a5.#aed581.#9ccc65.#7cb342.#689f38.#558b2f.#33691e.#ccff90.#b2ff59.#76ff03.#64dd17.#cddc39.#f9fbe7.#f0f4c3.#e6ee9c.#dce775.#d4e157.#c0ca33.#afb42b.#9e9d24.#827717.#f4ff81.#eeff41.#c6ff00.#aeea00.#ffeb3b.#fffde7.#fff9c4.#fff59d.#fff176.#ffee58.#fdd835.#fbc02d.#f9a825.#f57f17.#ffff8d.#ffff00.#ffea00.#ffd600.#ffc107.#fff8e1.#ffecb3.#ffe082.#ffd54f.#ffca28.#ffb300.#ffa000.#ff8f00.#ff6f00.#ffe57f.#ffd740.#ffc400.#ffab00.#ff9800.#fff3e0.#ffe0b2.#ffcc80.#ffb74d.#ffa726.#fb8c00.#f57c00.#ef6c00.#e65100.#ffd180.#ffab40.#ff9100.#ff6d00.#ff5722.#fbe9e7.#ffccbc.#ffab91.#ff8a65.#ff7043.#f4511e.#e64a19.#d84315.#bf360c.#ff9e80.#ff6e40.#ff3d00.#dd2c00.#795548.#efebe9.#d7ccc8.#bcaaa4.#a1887f.#8d6e63.#6d4c41.#5d4037.#4e342e.#3e2723.#.#.#.#.#607d8b.#eceff1.#cfd8dc.#b0bec5.#90a4ae.#78909c.#546e7a.#455a64.#37474f.#263238.#.#.#.#.#9e9e9e.#fafafa.#f5f5f5.#eeeeee.#e0e0e0.#bdbdbd.#757575.#616161.#424242.#212121.#.#.#.#.#000000.#FFFFFF.#FFFFFF00".split("."), cn = [
|
|
119
119
|
"add_data_v",
|
|
120
120
|
"call_app_method_v",
|
|
121
121
|
"call_func_v",
|
|
@@ -131,18 +131,18 @@ var cn = /* @__PURE__ */ "#F44336.#FFEBEE.#FFCDD2.#EF9A9A.#E57373.#EF5350.#E5393
|
|
|
131
131
|
"query_data_v",
|
|
132
132
|
"update_data_v"
|
|
133
133
|
];
|
|
134
|
-
function
|
|
135
|
-
return !!
|
|
134
|
+
function ln(e) {
|
|
135
|
+
return !!cn.find((t) => e.startsWith(t));
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/core/blocks/common/parameter/v1/index.ts
|
|
139
|
-
var
|
|
139
|
+
var un = p.xml;
|
|
140
140
|
y.parameter_v1 = {
|
|
141
141
|
init: function() {
|
|
142
142
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
143
143
|
},
|
|
144
144
|
mutationToDom: function() {
|
|
145
|
-
let e =
|
|
145
|
+
let e = un.createElement("mutation");
|
|
146
146
|
return e.setAttribute("key", this.key), e.setAttribute("name", this.name), e.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), e;
|
|
147
147
|
},
|
|
148
148
|
domToMutation: function(e) {
|
|
@@ -179,11 +179,11 @@ y.parameter_v1 = {
|
|
|
179
179
|
},
|
|
180
180
|
tryDuplicate_: function(e) {
|
|
181
181
|
let t = this.workspace.getBlockById(e.oldParentId);
|
|
182
|
-
if (t &&
|
|
182
|
+
if (t && ln(t.type)) try {
|
|
183
183
|
x.disable();
|
|
184
184
|
let n = t.getInput(e.oldInputName)?.connection;
|
|
185
185
|
if (n) {
|
|
186
|
-
let e =
|
|
186
|
+
let e = dn(this.workspace, this.key, this.name, this.locale);
|
|
187
187
|
n.connect(e.outputConnection);
|
|
188
188
|
}
|
|
189
189
|
} finally {
|
|
@@ -199,7 +199,7 @@ y.parameter_v1 = {
|
|
|
199
199
|
checkWarning_: function() {
|
|
200
200
|
let e = this.getSurroundParent();
|
|
201
201
|
for (; e;) {
|
|
202
|
-
if (
|
|
202
|
+
if (ln(e.type)) for (let t of e.inputList) {
|
|
203
203
|
let e = t.connection?.targetBlock();
|
|
204
204
|
if (!e || e.type !== "parameter_v1") continue;
|
|
205
205
|
let n = e;
|
|
@@ -217,7 +217,7 @@ y.parameter_v1 = {
|
|
|
217
217
|
};
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/core/utils/common/parameter.ts
|
|
220
|
-
function
|
|
220
|
+
function dn(e, t, n, r) {
|
|
221
221
|
let i = `
|
|
222
222
|
<block type="parameter_v1">
|
|
223
223
|
<mutation key="${t}" name="${n}" locale="${r ? "TRUE" : "FALSE"}"/>
|
|
@@ -236,7 +236,7 @@ function V(e, t) {
|
|
|
236
236
|
if (e && e.key === r && e.name === i && e.locale === a) return;
|
|
237
237
|
s.dispose();
|
|
238
238
|
}
|
|
239
|
-
s =
|
|
239
|
+
s = dn(e.workspace, r, i, a), s.outputConnection.connect(o);
|
|
240
240
|
});
|
|
241
241
|
} finally {
|
|
242
242
|
x.enable();
|
|
@@ -244,52 +244,52 @@ function V(e, t) {
|
|
|
244
244
|
}
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region src/core/utils/common/shadow.ts
|
|
247
|
-
function
|
|
247
|
+
function fn(e) {
|
|
248
248
|
let t = `<shadow type="text_v1"><field name="TEXT">${e}</field></shadow>`;
|
|
249
249
|
return p.xml.textToDom(t);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function pn(e) {
|
|
252
252
|
let t = `<shadow type="math_number_v1"><field name="NUM">${e}</field></shadow>`;
|
|
253
253
|
return p.xml.textToDom(t);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function mn(e) {
|
|
256
256
|
let t = `<shadow type="logic_boolean_v1"><field name="BOOL">${e ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
257
257
|
return p.xml.textToDom(t);
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function hn() {
|
|
260
260
|
return p.xml.textToDom("<shadow type=\"list_create_v1\"></shadow>");
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function gn() {
|
|
263
263
|
return p.xml.textToDom("<shadow type=\"object_create_v1\"></shadow>");
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
let t = `<shadow type="${
|
|
265
|
+
function _n(e) {
|
|
266
|
+
let t = `<shadow type="${Yt(e)}"></shadow>`;
|
|
267
267
|
return p.xml.textToDom(t);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
let t = `<shadow type="${
|
|
269
|
+
function vn(e) {
|
|
270
|
+
let t = `<shadow type="${Yt(e)}"></shadow>`;
|
|
271
271
|
return p.xml.textToDom(t);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function yn() {
|
|
274
274
|
return p.xml.textToDom("<shadow type=\"select_comp_v1\"></shadow>");
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function bn() {
|
|
277
277
|
return p.xml.textToDom("<shadow type=\"select_slot_v1\"></shadow>");
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function xn() {
|
|
280
280
|
return p.xml.textToDom("\n<shadow type=\"app_bind_entry_v1\">\n <field name=\"KIND\">notSet</field>\n</shadow>");
|
|
281
281
|
}
|
|
282
282
|
function H(e) {
|
|
283
283
|
let t = null;
|
|
284
|
-
return e === "string" ? t =
|
|
284
|
+
return e === "string" ? t = fn("") : e === "number" ? t = pn(0) : e === "boolean" ? t = mn(!1) : e === "array" ? t = hn() : e === "object" ? t = gn() : e === "any" ? t = null : console.assert(!1, "type not implementd"), t;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Sn(e) {
|
|
287
287
|
let t = null;
|
|
288
|
-
return e.array ? t =
|
|
288
|
+
return e.array ? t = hn() : e.ui === "transient" ? t = H(e.type) : e.ui === "dummy" ? t = null : e.ui === "text" ? t = fn(e.default) : e.ui === "number" ? t = pn(e.default ?? 0) : e.ui === "switch" ? t = mn(e.default) : e.ui === "select" ? t = _n(e.items) : e.ui === "multiTypes" ? t = vn(e.types) : e.ui === "comp" ? t = yn() : e.ui === "slot" ? t = bn() : console.assert(!1, "property ui not implementd"), t;
|
|
289
289
|
}
|
|
290
290
|
//#endregion
|
|
291
291
|
//#region src/core/utils/app/argument.ts
|
|
292
|
-
function
|
|
292
|
+
function Cn() {
|
|
293
293
|
let { activeObject: e, activePage: t } = S.app, n = [];
|
|
294
294
|
if (e.type === "page" && t.meta.arguments) for (let { id: e, name: r, type: i } of t.meta.arguments) n.push({
|
|
295
295
|
key: e,
|
|
@@ -298,7 +298,7 @@ function wn() {
|
|
|
298
298
|
});
|
|
299
299
|
return n;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function wn(e) {
|
|
302
302
|
let { activeObject: t, activePage: n } = S.app;
|
|
303
303
|
if (t.type === "page") {
|
|
304
304
|
let t = n.meta.arguments?.find((t) => t.id === e);
|
|
@@ -309,9 +309,9 @@ function Tn(e) {
|
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Tn() {
|
|
313
313
|
let e = [];
|
|
314
|
-
return
|
|
314
|
+
return Cn().forEach(({ key: t, name: n }) => {
|
|
315
315
|
e.push([n, t]);
|
|
316
316
|
}), I(e);
|
|
317
317
|
}
|
|
@@ -332,7 +332,7 @@ y.get_page_argument_v1 = {
|
|
|
332
332
|
}, 0);
|
|
333
333
|
},
|
|
334
334
|
genArgumentOpts_: function() {
|
|
335
|
-
return
|
|
335
|
+
return Tn();
|
|
336
336
|
},
|
|
337
337
|
onchange: function(e) {
|
|
338
338
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -343,7 +343,7 @@ y.get_page_argument_v1 = {
|
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
345
|
onArgumentChange_: function(e) {
|
|
346
|
-
let t =
|
|
346
|
+
let t = wn(e);
|
|
347
347
|
if (!t) {
|
|
348
348
|
console.assert(!1);
|
|
349
349
|
return;
|
|
@@ -354,7 +354,7 @@ y.get_page_argument_v1 = {
|
|
|
354
354
|
this.setOutput(!0, B(this.argument.type));
|
|
355
355
|
},
|
|
356
356
|
checkWarning_: function() {
|
|
357
|
-
let e =
|
|
357
|
+
let e = wn(this.argument.key);
|
|
358
358
|
if (!e) {
|
|
359
359
|
this.setWarningText(F("WARN_ARGUMENT_NOT_FOUND"));
|
|
360
360
|
return;
|
|
@@ -371,8 +371,8 @@ y.get_page_argument_v1 = {
|
|
|
371
371
|
};
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region src/core/blocks/app/define/items/v1/index.ts
|
|
374
|
-
var
|
|
375
|
-
let n =
|
|
374
|
+
var En = (e, t) => {
|
|
375
|
+
let n = Yt(e), r = Xt(e);
|
|
376
376
|
y[n] = {
|
|
377
377
|
init: function() {
|
|
378
378
|
this.appendDummyInput().appendField(new b(() => this.genOpts_()), "ITEM"), this.setOutput(!0, r), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
|
|
@@ -387,14 +387,14 @@ var Dn = (e, t) => {
|
|
|
387
387
|
return [t(e.getFieldValue("ITEM")), _.ATOMIC];
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
|
-
for (let e in
|
|
391
|
-
let t =
|
|
392
|
-
for (let e of t.items)
|
|
390
|
+
for (let e in $e) {
|
|
391
|
+
let t = $e[e];
|
|
392
|
+
for (let e of t.items) En(e, Be(e));
|
|
393
393
|
}
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/core/blocks/app/define/types/v1/index.ts
|
|
396
|
-
var
|
|
397
|
-
let n =
|
|
396
|
+
var Dn = ye(), On = (e, t) => {
|
|
397
|
+
let n = Yt(e), i = Xt(e);
|
|
398
398
|
y[n] = {
|
|
399
399
|
init: function() {
|
|
400
400
|
this.value = t[0].default, this.appendDummyInput("DUMMY").appendField(new b(() => this.genOpts_()), "TYPE"), this.setOutput(!0, i), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
|
|
@@ -438,23 +438,20 @@ var On = ye(), kn = (e, t) => {
|
|
|
438
438
|
if (n.trait === "number") i = new r(this.value ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
439
439
|
this.value = e;
|
|
440
440
|
});
|
|
441
|
-
else if (n.trait === "
|
|
442
|
-
this.value = e +
|
|
443
|
-
}), a =
|
|
444
|
-
else if (n.trait === "
|
|
445
|
-
this.value = e + "%";
|
|
446
|
-
}), a = "%";
|
|
447
|
-
else if (n.trait === "hexColor") i = new On.FieldColour(this.value, (e) => {
|
|
441
|
+
else if (n.trait === "numberUnit") i = new r(Qe(this.value, n.unit) ?? 0, n.min, n.max, n.precision ? 1 / 10 ** n.precision : null, (e) => {
|
|
442
|
+
this.value = e + n.unit;
|
|
443
|
+
}), a = n.unit;
|
|
444
|
+
else if (n.trait === "hexColor") i = new Dn.FieldColour(this.value, (e) => {
|
|
448
445
|
this.value = e;
|
|
449
446
|
}, {
|
|
450
|
-
colourOptions:
|
|
447
|
+
colourOptions: sn,
|
|
451
448
|
columns: 14
|
|
452
449
|
});
|
|
453
450
|
else if (n.trait === "themeColor") {
|
|
454
451
|
let { i18n: e } = je;
|
|
455
452
|
i = new b(() => {
|
|
456
453
|
let t = [];
|
|
457
|
-
for (let { value: n, title: r } of
|
|
454
|
+
for (let { value: n, title: r } of et) t.push([e.global.t(r), n]);
|
|
458
455
|
return t;
|
|
459
456
|
}, (e) => {
|
|
460
457
|
this.value = e;
|
|
@@ -474,13 +471,13 @@ var On = ye(), kn = (e, t) => {
|
|
|
474
471
|
return typeof n.value == "string" ? [t(n.value), _.ATOMIC] : [n.value, _.ATOMIC];
|
|
475
472
|
};
|
|
476
473
|
};
|
|
477
|
-
for (let e in
|
|
478
|
-
let t =
|
|
479
|
-
for (let e of t.types)
|
|
474
|
+
for (let e in $e) {
|
|
475
|
+
let t = $e[e];
|
|
476
|
+
for (let e of t.types) On(e, He(e));
|
|
480
477
|
}
|
|
481
478
|
//#endregion
|
|
482
479
|
//#region src/core/utils/app/app.ts
|
|
483
|
-
function
|
|
480
|
+
function kn() {
|
|
484
481
|
let e = [], { appList: t } = S.app;
|
|
485
482
|
for (let { id: n, name: r } of t) e.push({
|
|
486
483
|
id: n,
|
|
@@ -488,22 +485,22 @@ function An() {
|
|
|
488
485
|
});
|
|
489
486
|
return e;
|
|
490
487
|
}
|
|
491
|
-
function
|
|
488
|
+
function An(e) {
|
|
492
489
|
let { appList: t } = S.app, n = t.find((t) => t.id === e);
|
|
493
490
|
if (n) return {
|
|
494
491
|
id: n.id,
|
|
495
492
|
name: n.name
|
|
496
493
|
};
|
|
497
494
|
}
|
|
498
|
-
function
|
|
495
|
+
function jn() {
|
|
499
496
|
let e = [];
|
|
500
|
-
return
|
|
497
|
+
return kn().forEach(({ id: t, name: n }) => {
|
|
501
498
|
e.push([n, t]);
|
|
502
499
|
}), I(e);
|
|
503
500
|
}
|
|
504
501
|
//#endregion
|
|
505
502
|
//#region src/core/utils/app/node.ts
|
|
506
|
-
function
|
|
503
|
+
function Mn(e, t) {
|
|
507
504
|
let { activeObject: n, activeComp: r } = S.app;
|
|
508
505
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
509
506
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -515,20 +512,20 @@ function Nn(e, t) {
|
|
|
515
512
|
}
|
|
516
513
|
return !(L(e.key) && n.type === "comp" && r.meta.events && r.meta.events.length > 0);
|
|
517
514
|
}
|
|
518
|
-
function
|
|
515
|
+
function Nn(e, t, n) {
|
|
519
516
|
let { activeObject: r, activeComp: i, depends: a } = S.app;
|
|
520
517
|
if (e.methods && e.methods.length > 0) return !1;
|
|
521
|
-
if (
|
|
518
|
+
if (en(e.key) && t) {
|
|
522
519
|
let e = a[t];
|
|
523
520
|
if (e && e.meta.methods && e.meta.methods.length > 0) return !1;
|
|
524
521
|
}
|
|
525
|
-
if (
|
|
522
|
+
if (tn(e.key) && t) {
|
|
526
523
|
let e = a[t];
|
|
527
524
|
if (e && e.meta.methods && e.meta.methods.length > 0) return !1;
|
|
528
525
|
}
|
|
529
526
|
if (L(e.key) && r.type === "comp" && i.meta.methods && i.meta.methods.length > 0) return !1;
|
|
530
527
|
if (L(e.key) && n && r.type === "comp") {
|
|
531
|
-
let { kind: e, mainKey: t, slotKey: r } =
|
|
528
|
+
let { kind: e, mainKey: t, slotKey: r } = pt(n);
|
|
532
529
|
if (e === "elementSlot") {
|
|
533
530
|
let e = w(t);
|
|
534
531
|
if (e && e.slots) {
|
|
@@ -545,7 +542,7 @@ function Pn(e, t, n) {
|
|
|
545
542
|
}
|
|
546
543
|
return !0;
|
|
547
544
|
}
|
|
548
|
-
function
|
|
545
|
+
function Pn(e, t) {
|
|
549
546
|
let { activeObject: n, activeComp: r } = S.app;
|
|
550
547
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
551
548
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -557,7 +554,7 @@ function Fn(e, t) {
|
|
|
557
554
|
}
|
|
558
555
|
return !(L(e.key) && n.type === "comp" && r.meta.methods && r.meta.methods.length > 0);
|
|
559
556
|
}
|
|
560
|
-
function
|
|
557
|
+
function Fn(e, t) {
|
|
561
558
|
let { activeObject: n, activeComp: r } = S.app;
|
|
562
559
|
if (R(e.key) && t && n.type === "comp" && r.meta.slots) {
|
|
563
560
|
let e = r.meta.slots.find((e) => e.id === t);
|
|
@@ -576,8 +573,8 @@ function In(e, t) {
|
|
|
576
573
|
}
|
|
577
574
|
return !0;
|
|
578
575
|
}
|
|
579
|
-
function
|
|
580
|
-
return e === "triggerEvent" ?
|
|
576
|
+
function In(e, t, n, r, i) {
|
|
577
|
+
return e === "triggerEvent" ? Mn(t, n) : e === "callMethod" ? Nn(t, r, i) : e === "implementMethod" ? Pn(t, n) : e === "implementMethodOutput" ? Fn(t, n) : !1;
|
|
581
578
|
}
|
|
582
579
|
function U(e) {
|
|
583
580
|
let { activeObject: t } = S.app;
|
|
@@ -587,11 +584,11 @@ function U(e) {
|
|
|
587
584
|
console.assert(!1, "invalid element", n.key);
|
|
588
585
|
continue;
|
|
589
586
|
}
|
|
590
|
-
if (!
|
|
587
|
+
if (!In(e, t, n.slot, n.comp, n.adaptSlot)) return !0;
|
|
591
588
|
}
|
|
592
589
|
return !1;
|
|
593
590
|
}
|
|
594
|
-
function
|
|
591
|
+
function Ln(e) {
|
|
595
592
|
let { activeObject: t } = S.app, n = [];
|
|
596
593
|
for (let r of t.nodes) {
|
|
597
594
|
let t = w(r.key);
|
|
@@ -599,7 +596,7 @@ function Rn(e) {
|
|
|
599
596
|
console.assert(!1, "invalid element", r.key);
|
|
600
597
|
continue;
|
|
601
598
|
}
|
|
602
|
-
|
|
599
|
+
In(e, t, r.slot, r.comp, r.adaptSlot) || n.push({
|
|
603
600
|
id: r.id,
|
|
604
601
|
key: r.key,
|
|
605
602
|
name: t.name,
|
|
@@ -623,8 +620,8 @@ function W(e) {
|
|
|
623
620
|
alias: n.alias
|
|
624
621
|
};
|
|
625
622
|
}
|
|
626
|
-
function
|
|
627
|
-
let { i18n: t } = je, n = [], r =
|
|
623
|
+
function Rn(e) {
|
|
624
|
+
let { i18n: t } = je, n = [], r = Ln(e);
|
|
628
625
|
for (let { id: e, name: i, alias: a } of r) {
|
|
629
626
|
let r = t.global.t(i);
|
|
630
627
|
a && (r += " / " + a), n.push([r, e]);
|
|
@@ -633,33 +630,33 @@ function zn(e) {
|
|
|
633
630
|
}
|
|
634
631
|
//#endregion
|
|
635
632
|
//#region src/core/utils/app/state.ts
|
|
636
|
-
function
|
|
633
|
+
function zn() {
|
|
637
634
|
let { activeObject: e, activePage: t, activeComp: n } = S.app;
|
|
638
635
|
return e.type === "page" ? t.meta.states ?? [] : e.type === "comp" ? n.meta.states ?? [] : [];
|
|
639
636
|
}
|
|
640
|
-
function
|
|
637
|
+
function Bn(e) {
|
|
641
638
|
let { activeObject: t, activePage: n, activeComp: r } = S.app;
|
|
642
639
|
if (t.type === "page") return n.meta.states?.find((t) => t.id === e);
|
|
643
640
|
if (t.type === "comp") return r.meta.states?.find((t) => t.id === e);
|
|
644
641
|
}
|
|
645
|
-
function
|
|
646
|
-
let e = [], t =
|
|
642
|
+
function Vn() {
|
|
643
|
+
let e = [], t = zn();
|
|
647
644
|
for (let { id: n, name: r } of t) e.push([r, n]);
|
|
648
645
|
return I(e);
|
|
649
646
|
}
|
|
650
647
|
//#endregion
|
|
651
648
|
//#region src/core/utils/app/bind.ts
|
|
652
|
-
function
|
|
649
|
+
function Hn() {
|
|
653
650
|
let e = ["notSet"];
|
|
654
|
-
return
|
|
651
|
+
return Ln("setProperty").length > 0 && e.push("property"), zn().length > 0 && e.push("state"), e;
|
|
655
652
|
}
|
|
656
|
-
function
|
|
653
|
+
function Un() {
|
|
657
654
|
let { i18n: e } = je;
|
|
658
|
-
return I(
|
|
655
|
+
return I(Hn().map((t) => t === "notSet" ? [e.global.t(`x-runtime-lib.${t}`), t] : [F(`APP_${De(t)}`), t]));
|
|
659
656
|
}
|
|
660
657
|
//#endregion
|
|
661
658
|
//#region src/core/utils/app/comp.ts
|
|
662
|
-
function
|
|
659
|
+
function Wn() {
|
|
663
660
|
let { activeApp: e } = S.app, t = [{
|
|
664
661
|
id: "",
|
|
665
662
|
name: ""
|
|
@@ -670,7 +667,7 @@ function Gn() {
|
|
|
670
667
|
});
|
|
671
668
|
return t;
|
|
672
669
|
}
|
|
673
|
-
function
|
|
670
|
+
function Gn(e) {
|
|
674
671
|
let { activeApp: t } = S.app;
|
|
675
672
|
if (!e) return {
|
|
676
673
|
id: "",
|
|
@@ -682,9 +679,9 @@ function Kn(e) {
|
|
|
682
679
|
name: n.name
|
|
683
680
|
};
|
|
684
681
|
}
|
|
685
|
-
function
|
|
682
|
+
function Kn() {
|
|
686
683
|
let { i18n: e } = je, t = [];
|
|
687
|
-
return
|
|
684
|
+
return Wn().forEach(({ id: n, name: r }) => {
|
|
688
685
|
let i = r;
|
|
689
686
|
n === "" && (i = e.global.t("x-runtime-lib.notSet")), t.push([i, n]);
|
|
690
687
|
}), I(t);
|
|
@@ -712,7 +709,7 @@ function K(e) {
|
|
|
712
709
|
type: e
|
|
713
710
|
}];
|
|
714
711
|
}
|
|
715
|
-
function
|
|
712
|
+
function qn(e) {
|
|
716
713
|
let t = !0;
|
|
717
714
|
switch (e) {
|
|
718
715
|
case "": break;
|
|
@@ -753,7 +750,7 @@ function Jn(e) {
|
|
|
753
750
|
}
|
|
754
751
|
return t;
|
|
755
752
|
}
|
|
756
|
-
function
|
|
753
|
+
function Jn(e) {
|
|
757
754
|
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = [], o = Ve(t.type, t.subtype), s = t.nodes.find((t) => t.id === e);
|
|
758
755
|
if (!s) return a;
|
|
759
756
|
let c = w(s.key);
|
|
@@ -768,9 +765,9 @@ function Yn(e) {
|
|
|
768
765
|
id: T("elementPropertyChangeEvent", e, t),
|
|
769
766
|
kind: "elementPropertyChangeEvent",
|
|
770
767
|
names: n,
|
|
771
|
-
params: K(
|
|
768
|
+
params: K(Qt(r))
|
|
772
769
|
});
|
|
773
|
-
if (
|
|
770
|
+
if (en(c.key) && s.comp) {
|
|
774
771
|
let t = i[s.comp];
|
|
775
772
|
if (t && t.meta.events) for (let { id: n, name: r, params: i } of t.meta.events) a.push({
|
|
776
773
|
id: T("refEvent", e, n),
|
|
@@ -779,7 +776,7 @@ function Yn(e) {
|
|
|
779
776
|
params: G(i)
|
|
780
777
|
});
|
|
781
778
|
}
|
|
782
|
-
if (
|
|
779
|
+
if (en(c.key) && s.comp) {
|
|
783
780
|
let t = i[s.comp];
|
|
784
781
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
785
782
|
id: T("refPropertyChangeEvent", e, n),
|
|
@@ -788,7 +785,7 @@ function Yn(e) {
|
|
|
788
785
|
params: K(i)
|
|
789
786
|
});
|
|
790
787
|
}
|
|
791
|
-
if (
|
|
788
|
+
if (tn(c.key) && s.comp) {
|
|
792
789
|
let t = i[s.comp];
|
|
793
790
|
if (t && t.meta.events) for (let { id: n, name: r, params: i } of t.meta.events) a.push({
|
|
794
791
|
id: T("multipleRefEvent", e, n),
|
|
@@ -797,7 +794,7 @@ function Yn(e) {
|
|
|
797
794
|
params: G(i)
|
|
798
795
|
});
|
|
799
796
|
}
|
|
800
|
-
if (
|
|
797
|
+
if (tn(c.key) && s.comp) {
|
|
801
798
|
let t = i[s.comp];
|
|
802
799
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
803
800
|
id: T("multipleRefPropertyChangeEvent", e, n),
|
|
@@ -855,7 +852,7 @@ function Yn(e) {
|
|
|
855
852
|
params: K(i)
|
|
856
853
|
});
|
|
857
854
|
if (L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
858
|
-
let { kind: t, mainKey: n, slotKey: r } =
|
|
855
|
+
let { kind: t, mainKey: n, slotKey: r } = pt(s.adaptSlot);
|
|
859
856
|
if (t === "elementSlot") {
|
|
860
857
|
let t = w(n);
|
|
861
858
|
if (t && t.slots) {
|
|
@@ -925,9 +922,9 @@ function Yn(e) {
|
|
|
925
922
|
}
|
|
926
923
|
return a;
|
|
927
924
|
}
|
|
928
|
-
function
|
|
925
|
+
function Yn(e) {
|
|
929
926
|
if (!e) return;
|
|
930
|
-
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = Ve(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } =
|
|
927
|
+
let { activeObject: t, activePage: n, activeComp: r, depends: i } = S.app, a = Ve(t.type, t.subtype), { kind: o, nodeId: s, eventKey: c } = it(e), l = t.nodes.find((e) => e.id === s);
|
|
931
928
|
if (!l) return;
|
|
932
929
|
let u = w(l.key);
|
|
933
930
|
if (!u) {
|
|
@@ -949,11 +946,11 @@ function Xn(e) {
|
|
|
949
946
|
id: e,
|
|
950
947
|
kind: o,
|
|
951
948
|
names: t.names,
|
|
952
|
-
params: K(
|
|
949
|
+
params: K(Qt(t.raw))
|
|
953
950
|
};
|
|
954
951
|
}
|
|
955
952
|
} else if (o === "refEvent") {
|
|
956
|
-
if (
|
|
953
|
+
if (en(u.key) && l.comp) {
|
|
957
954
|
let t = i[l.comp];
|
|
958
955
|
if (t) {
|
|
959
956
|
let n = t.meta.events?.find((e) => e.id === c);
|
|
@@ -966,7 +963,7 @@ function Xn(e) {
|
|
|
966
963
|
}
|
|
967
964
|
}
|
|
968
965
|
} else if (o === "refPropertyChangeEvent") {
|
|
969
|
-
if (
|
|
966
|
+
if (en(u.key) && l.comp) {
|
|
970
967
|
let t = i[l.comp];
|
|
971
968
|
if (t) {
|
|
972
969
|
let n = t.meta.properties?.find((e) => e.id === c);
|
|
@@ -979,7 +976,7 @@ function Xn(e) {
|
|
|
979
976
|
}
|
|
980
977
|
}
|
|
981
978
|
} else if (o === "multipleRefEvent") {
|
|
982
|
-
if (
|
|
979
|
+
if (tn(u.key) && l.comp) {
|
|
983
980
|
let t = i[l.comp];
|
|
984
981
|
if (t) {
|
|
985
982
|
let n = t.meta.events?.find((e) => e.id === c);
|
|
@@ -992,7 +989,7 @@ function Xn(e) {
|
|
|
992
989
|
}
|
|
993
990
|
}
|
|
994
991
|
} else if (o === "multipleRefPropertyChangeEvent") {
|
|
995
|
-
if (
|
|
992
|
+
if (tn(u.key) && l.comp) {
|
|
996
993
|
let t = i[l.comp];
|
|
997
994
|
if (t) {
|
|
998
995
|
let n = t.meta.properties?.find((e) => e.id === c);
|
|
@@ -1006,7 +1003,7 @@ function Xn(e) {
|
|
|
1006
1003
|
}
|
|
1007
1004
|
} else if (o === "customSlotEvent") {
|
|
1008
1005
|
if (R(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1009
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1006
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1010
1007
|
if (r.id === t && l.slot === n) {
|
|
1011
1008
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1012
1009
|
if (t && t.events) {
|
|
@@ -1022,7 +1019,7 @@ function Xn(e) {
|
|
|
1022
1019
|
}
|
|
1023
1020
|
} else if (o === "customSlotPropertyChangeEvent") {
|
|
1024
1021
|
if (R(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1025
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1022
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1026
1023
|
if (r.id === t && l.slot === n) {
|
|
1027
1024
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1028
1025
|
if (t && t.properties) {
|
|
@@ -1038,7 +1035,7 @@ function Xn(e) {
|
|
|
1038
1035
|
}
|
|
1039
1036
|
} else if (o === "multipleCustomSlotEvent") {
|
|
1040
1037
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1041
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1038
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1042
1039
|
if (r.id === t && l.slot && n) {
|
|
1043
1040
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1044
1041
|
if (t && t.events) {
|
|
@@ -1054,7 +1051,7 @@ function Xn(e) {
|
|
|
1054
1051
|
}
|
|
1055
1052
|
} else if (o === "multipleCustomSlotPropertyChangeEvent") {
|
|
1056
1053
|
if (z(u.key) && l.slot && t.type === "comp" && r.meta.slots) {
|
|
1057
|
-
let { compId: t, slotId: n, eventId: i } =
|
|
1054
|
+
let { compId: t, slotId: n, eventId: i } = at(c);
|
|
1058
1055
|
if (r.id === t && l.slot === n) {
|
|
1059
1056
|
let t = r.meta.slots.find((e) => e.id === n);
|
|
1060
1057
|
if (t && t.properties) {
|
|
@@ -1090,8 +1087,8 @@ function Xn(e) {
|
|
|
1090
1087
|
}
|
|
1091
1088
|
} else if (o === "elementAdaptSlotEvent") {
|
|
1092
1089
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1093
|
-
let { elementKey: t, slotKey: n, eventKey: r } =
|
|
1094
|
-
if (
|
|
1090
|
+
let { elementKey: t, slotKey: n, eventKey: r } = ot(c);
|
|
1091
|
+
if (nn(l.adaptSlot, t, n)) {
|
|
1095
1092
|
let i = w(t);
|
|
1096
1093
|
if (i && i.slots) {
|
|
1097
1094
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1113,8 +1110,8 @@ function Xn(e) {
|
|
|
1113
1110
|
}
|
|
1114
1111
|
} else if (o === "elementAdaptSlotPropertyChangeEvent") {
|
|
1115
1112
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1116
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1117
|
-
if (
|
|
1113
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = ft(c);
|
|
1114
|
+
if (nn(l.adaptSlot, t, n)) {
|
|
1118
1115
|
let i = w(t);
|
|
1119
1116
|
if (i && i.slots) {
|
|
1120
1117
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1136,8 +1133,8 @@ function Xn(e) {
|
|
|
1136
1133
|
}
|
|
1137
1134
|
} else if (o === "customAdaptSlotEvent") {
|
|
1138
1135
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1139
|
-
let { compId: t, slotId: n, eventId: r } =
|
|
1140
|
-
if (
|
|
1136
|
+
let { compId: t, slotId: n, eventId: r } = at(c);
|
|
1137
|
+
if (rn(l.adaptSlot, t, n)) {
|
|
1141
1138
|
let a = i[t];
|
|
1142
1139
|
if (a && a.meta.slots) {
|
|
1143
1140
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1159,8 +1156,8 @@ function Xn(e) {
|
|
|
1159
1156
|
}
|
|
1160
1157
|
} else if (o === "customAdaptSlotPropertyChangeEvent") {
|
|
1161
1158
|
if (L(u.key) && t.type === "comp" && l.adaptSlot) {
|
|
1162
|
-
let { compId: t, slotId: n, propertyId: r } =
|
|
1163
|
-
if (
|
|
1159
|
+
let { compId: t, slotId: n, propertyId: r } = dt(c);
|
|
1160
|
+
if (rn(l.adaptSlot, t, n)) {
|
|
1164
1161
|
let a = i[t];
|
|
1165
1162
|
if (a && a.meta.slots) {
|
|
1166
1163
|
let t = a.meta.slots.find((e) => e.id === n);
|
|
@@ -1200,12 +1197,12 @@ function Xn(e) {
|
|
|
1200
1197
|
}
|
|
1201
1198
|
}
|
|
1202
1199
|
}
|
|
1203
|
-
function
|
|
1204
|
-
let t = [], n =
|
|
1205
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1200
|
+
function Xn(e) {
|
|
1201
|
+
let t = [], n = Jn(e), r;
|
|
1202
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([tt(i, a), e]);
|
|
1206
1203
|
return I(t);
|
|
1207
1204
|
}
|
|
1208
|
-
function
|
|
1205
|
+
function Zn(e) {
|
|
1209
1206
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1210
1207
|
if (!i) return r;
|
|
1211
1208
|
let a = w(i.key);
|
|
@@ -1236,9 +1233,9 @@ function Qn(e) {
|
|
|
1236
1233
|
});
|
|
1237
1234
|
return r;
|
|
1238
1235
|
}
|
|
1239
|
-
function
|
|
1236
|
+
function Qn(e) {
|
|
1240
1237
|
if (!e) return;
|
|
1241
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } =
|
|
1238
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, eventKey: a } = it(e), o = t.nodes.find((e) => e.id === i);
|
|
1242
1239
|
if (!o) return;
|
|
1243
1240
|
let s = w(o.key);
|
|
1244
1241
|
if (!s) {
|
|
@@ -1247,7 +1244,7 @@ function $n(e) {
|
|
|
1247
1244
|
}
|
|
1248
1245
|
if (r === "customSlotEvent") {
|
|
1249
1246
|
if (R(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1250
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1247
|
+
let { compId: t, slotId: i, eventId: s } = at(a);
|
|
1251
1248
|
if (n.id === t && o.slot === i) {
|
|
1252
1249
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1253
1250
|
if (t && t.events) {
|
|
@@ -1263,7 +1260,7 @@ function $n(e) {
|
|
|
1263
1260
|
}
|
|
1264
1261
|
} else if (r === "multipleCustomSlotEvent") {
|
|
1265
1262
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1266
|
-
let { compId: t, slotId: i, eventId: s } =
|
|
1263
|
+
let { compId: t, slotId: i, eventId: s } = at(a);
|
|
1267
1264
|
if (n.id === t && o.slot && i) {
|
|
1268
1265
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1269
1266
|
if (t && t.events) {
|
|
@@ -1287,9 +1284,9 @@ function $n(e) {
|
|
|
1287
1284
|
};
|
|
1288
1285
|
}
|
|
1289
1286
|
}
|
|
1290
|
-
function
|
|
1291
|
-
let t = [], n =
|
|
1292
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1287
|
+
function $n(e) {
|
|
1288
|
+
let t = [], n = Zn(e), r;
|
|
1289
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([tt(i, a), e]);
|
|
1293
1290
|
return I(t);
|
|
1294
1291
|
}
|
|
1295
1292
|
//#endregion
|
|
@@ -1314,7 +1311,7 @@ function J(e) {
|
|
|
1314
1311
|
});
|
|
1315
1312
|
return t;
|
|
1316
1313
|
}
|
|
1317
|
-
function
|
|
1314
|
+
function er(e) {
|
|
1318
1315
|
let t = !0;
|
|
1319
1316
|
switch (e) {
|
|
1320
1317
|
case "": break;
|
|
@@ -1340,7 +1337,7 @@ function tr(e) {
|
|
|
1340
1337
|
}
|
|
1341
1338
|
return t;
|
|
1342
1339
|
}
|
|
1343
|
-
function
|
|
1340
|
+
function tr(e) {
|
|
1344
1341
|
let { activeObject: t, activeComp: n, depends: r } = S.app, i = [], a = t.nodes.find((t) => t.id === e);
|
|
1345
1342
|
if (!a) return i;
|
|
1346
1343
|
let o = w(a.key);
|
|
@@ -1352,7 +1349,7 @@ function nr(e) {
|
|
|
1352
1349
|
inputs: r,
|
|
1353
1350
|
outputs: a
|
|
1354
1351
|
});
|
|
1355
|
-
if (
|
|
1352
|
+
if (en(o.key) && a.comp) {
|
|
1356
1353
|
let t = r[a.comp];
|
|
1357
1354
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1358
1355
|
id: Ge("refMethod", e, n),
|
|
@@ -1362,7 +1359,7 @@ function nr(e) {
|
|
|
1362
1359
|
outputs: J(o)
|
|
1363
1360
|
});
|
|
1364
1361
|
}
|
|
1365
|
-
if (
|
|
1362
|
+
if (tn(o.key) && a.comp) {
|
|
1366
1363
|
let t = r[a.comp];
|
|
1367
1364
|
if (t && t.meta.methods) for (let { id: n, name: r, inputs: a, outputs: o } of t.meta.methods) i.push({
|
|
1368
1365
|
id: Ge("multipleRefMethod", e, n),
|
|
@@ -1380,7 +1377,7 @@ function nr(e) {
|
|
|
1380
1377
|
outputs: J(o)
|
|
1381
1378
|
});
|
|
1382
1379
|
if (L(o.key) && t.type === "comp" && a.adaptSlot) {
|
|
1383
|
-
let { kind: t, mainKey: n, slotKey: o } =
|
|
1380
|
+
let { kind: t, mainKey: n, slotKey: o } = pt(a.adaptSlot);
|
|
1384
1381
|
if (t === "elementSlot") {
|
|
1385
1382
|
let t = w(n);
|
|
1386
1383
|
if (t && t.slots) {
|
|
@@ -1417,9 +1414,9 @@ function nr(e) {
|
|
|
1417
1414
|
}
|
|
1418
1415
|
return i;
|
|
1419
1416
|
}
|
|
1420
|
-
function
|
|
1417
|
+
function nr(e) {
|
|
1421
1418
|
if (!e) return;
|
|
1422
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } =
|
|
1419
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, { kind: i, nodeId: a, methodKey: o } = st(e), s = t.nodes.find((e) => e.id === a);
|
|
1423
1420
|
if (!s) return;
|
|
1424
1421
|
let c = w(s.key);
|
|
1425
1422
|
if (!c) {
|
|
@@ -1436,7 +1433,7 @@ function rr(e) {
|
|
|
1436
1433
|
outputs: t.outputs
|
|
1437
1434
|
};
|
|
1438
1435
|
} else if (i === "refMethod") {
|
|
1439
|
-
if (
|
|
1436
|
+
if (en(c.key) && s.comp) {
|
|
1440
1437
|
let t = r[s.comp];
|
|
1441
1438
|
if (t) {
|
|
1442
1439
|
let n = t.meta.methods?.find((e) => e.id === o);
|
|
@@ -1450,7 +1447,7 @@ function rr(e) {
|
|
|
1450
1447
|
}
|
|
1451
1448
|
}
|
|
1452
1449
|
} else if (i === "multipleRefMethod") {
|
|
1453
|
-
if (
|
|
1450
|
+
if (tn(c.key) && s.comp) {
|
|
1454
1451
|
let t = r[s.comp];
|
|
1455
1452
|
if (t) {
|
|
1456
1453
|
let n = t.meta.methods?.find((e) => e.id === o);
|
|
@@ -1476,7 +1473,7 @@ function rr(e) {
|
|
|
1476
1473
|
}
|
|
1477
1474
|
} else if (i === "customSlotMethod") {
|
|
1478
1475
|
if (L(c.key) && t.type === "comp" && n.meta.slots) {
|
|
1479
|
-
let { slotId: t, methodId: r } =
|
|
1476
|
+
let { slotId: t, methodId: r } = ct(o), a = n.meta.slots.find((e) => e.id === t);
|
|
1480
1477
|
if (a && a.methods) {
|
|
1481
1478
|
let t = a.methods.find((e) => e.id === r);
|
|
1482
1479
|
if (t) return {
|
|
@@ -1490,8 +1487,8 @@ function rr(e) {
|
|
|
1490
1487
|
}
|
|
1491
1488
|
} else if (i === "elementAdaptSlotMethod") {
|
|
1492
1489
|
if (L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1493
|
-
let { elementKey: t, slotKey: n, methodKey: r } =
|
|
1494
|
-
if (
|
|
1490
|
+
let { elementKey: t, slotKey: n, methodKey: r } = lt(o);
|
|
1491
|
+
if (nn(s.adaptSlot, t, n)) {
|
|
1495
1492
|
let a = w(t);
|
|
1496
1493
|
if (a && a.slots) {
|
|
1497
1494
|
let t = a.slots.find((e) => e.key === n);
|
|
@@ -1513,8 +1510,8 @@ function rr(e) {
|
|
|
1513
1510
|
}
|
|
1514
1511
|
}
|
|
1515
1512
|
} else if (i === "customAdaptSlotMethod" && L(c.key) && t.type === "comp" && s.adaptSlot) {
|
|
1516
|
-
let { compId: t, slotId: n, methodId: a } =
|
|
1517
|
-
if (
|
|
1513
|
+
let { compId: t, slotId: n, methodId: a } = ct(o);
|
|
1514
|
+
if (rn(s.adaptSlot, t, n)) {
|
|
1518
1515
|
let o = r[t];
|
|
1519
1516
|
if (o && o.meta.slots) {
|
|
1520
1517
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1536,12 +1533,12 @@ function rr(e) {
|
|
|
1536
1533
|
}
|
|
1537
1534
|
}
|
|
1538
1535
|
}
|
|
1539
|
-
function
|
|
1540
|
-
let t = [], n =
|
|
1541
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1536
|
+
function rr(e) {
|
|
1537
|
+
let t = [], n = tr(e), r;
|
|
1538
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([nt(i, a), e]);
|
|
1542
1539
|
return I(t);
|
|
1543
1540
|
}
|
|
1544
|
-
function
|
|
1541
|
+
function ir(e) {
|
|
1545
1542
|
let t = !0;
|
|
1546
1543
|
switch (e) {
|
|
1547
1544
|
case "": break;
|
|
@@ -1567,7 +1564,7 @@ function ar(e) {
|
|
|
1567
1564
|
}
|
|
1568
1565
|
return t;
|
|
1569
1566
|
}
|
|
1570
|
-
function
|
|
1567
|
+
function ar(e) {
|
|
1571
1568
|
let { activeObject: t, activeComp: n } = S.app, r = [], i = t.nodes.find((t) => t.id === e);
|
|
1572
1569
|
if (!i) return r;
|
|
1573
1570
|
let a = w(i.key);
|
|
@@ -1601,9 +1598,9 @@ function or(e) {
|
|
|
1601
1598
|
});
|
|
1602
1599
|
return r;
|
|
1603
1600
|
}
|
|
1604
|
-
function
|
|
1601
|
+
function or(e) {
|
|
1605
1602
|
if (!e) return;
|
|
1606
|
-
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } =
|
|
1603
|
+
let { activeObject: t, activeComp: n } = S.app, { kind: r, nodeId: i, methodKey: a } = st(e), o = t.nodes.find((e) => e.id === i);
|
|
1607
1604
|
if (!o) return;
|
|
1608
1605
|
let s = w(o.key);
|
|
1609
1606
|
if (!s) {
|
|
@@ -1612,7 +1609,7 @@ function sr(e) {
|
|
|
1612
1609
|
}
|
|
1613
1610
|
if (r === "customSlotMethod") {
|
|
1614
1611
|
if (R(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1615
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1612
|
+
let { compId: t, slotId: i, methodId: s } = ct(a);
|
|
1616
1613
|
if (n.id === t && i === o.slot) {
|
|
1617
1614
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1618
1615
|
if (t && t.methods) {
|
|
@@ -1629,7 +1626,7 @@ function sr(e) {
|
|
|
1629
1626
|
}
|
|
1630
1627
|
} else if (r === "multipleCustomSlotMethod") {
|
|
1631
1628
|
if (z(s.key) && o.slot && t.type === "comp" && n.meta.slots) {
|
|
1632
|
-
let { compId: t, slotId: i, methodId: s } =
|
|
1629
|
+
let { compId: t, slotId: i, methodId: s } = ct(a);
|
|
1633
1630
|
if (n.id === t && o.slot === i) {
|
|
1634
1631
|
let t = n.meta.slots.find((e) => e.id === i);
|
|
1635
1632
|
if (t && t.methods) {
|
|
@@ -1655,27 +1652,27 @@ function sr(e) {
|
|
|
1655
1652
|
};
|
|
1656
1653
|
}
|
|
1657
1654
|
}
|
|
1658
|
-
function
|
|
1659
|
-
let t = [], n =
|
|
1660
|
-
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([
|
|
1655
|
+
function sr(e) {
|
|
1656
|
+
let t = [], n = ar(e), r;
|
|
1657
|
+
for (let { id: e, kind: i, names: a } of n) i !== r && (r && t.push("separator"), r = i), t.push([nt(i, a), e]);
|
|
1661
1658
|
return I(t);
|
|
1662
1659
|
}
|
|
1663
|
-
function
|
|
1664
|
-
let t =
|
|
1660
|
+
function cr(e) {
|
|
1661
|
+
let t = or(e);
|
|
1665
1662
|
return t ? t.outputs : [];
|
|
1666
1663
|
}
|
|
1667
|
-
function
|
|
1668
|
-
let n =
|
|
1664
|
+
function lr(e, t) {
|
|
1665
|
+
let n = or(e);
|
|
1669
1666
|
if (n) return n.outputs?.find((e) => e.key === t);
|
|
1670
1667
|
}
|
|
1671
|
-
function
|
|
1672
|
-
let t = [], n =
|
|
1668
|
+
function ur(e) {
|
|
1669
|
+
let t = [], n = cr(e);
|
|
1673
1670
|
if (n) for (let { name: e, key: r } of n) t.push([e, r]);
|
|
1674
1671
|
return I(t);
|
|
1675
1672
|
}
|
|
1676
1673
|
//#endregion
|
|
1677
1674
|
//#region src/core/utils/app/page.ts
|
|
1678
|
-
function
|
|
1675
|
+
function dr(e) {
|
|
1679
1676
|
let { appList: t } = S.app, n = [], r = t.find((t) => t.id === e);
|
|
1680
1677
|
if (!r) return n;
|
|
1681
1678
|
for (let { id: e, name: t } of r.pages) n.push({
|
|
@@ -1684,7 +1681,7 @@ function fr(e) {
|
|
|
1684
1681
|
});
|
|
1685
1682
|
return n;
|
|
1686
1683
|
}
|
|
1687
|
-
function
|
|
1684
|
+
function fr(e, t) {
|
|
1688
1685
|
let { appList: n } = S.app, r = n.find((t) => t.id === e);
|
|
1689
1686
|
if (!r) return;
|
|
1690
1687
|
let i = r.pages.find((e) => e.id === t);
|
|
@@ -1693,20 +1690,20 @@ function pr(e, t) {
|
|
|
1693
1690
|
name: i.name
|
|
1694
1691
|
};
|
|
1695
1692
|
}
|
|
1696
|
-
function
|
|
1693
|
+
function pr(e) {
|
|
1697
1694
|
let t = [];
|
|
1698
|
-
return
|
|
1695
|
+
return dr(e).forEach(({ id: e, name: n }) => {
|
|
1699
1696
|
t.push([n, e]);
|
|
1700
1697
|
}), I(t);
|
|
1701
1698
|
}
|
|
1702
1699
|
//#endregion
|
|
1703
1700
|
//#region src/core/utils/app/property.ts
|
|
1704
|
-
function
|
|
1701
|
+
function mr(e, t) {
|
|
1705
1702
|
let { activeObject: n, activeComp: r, depends: i } = S.app, a = [], o = Ve(n.type, n.subtype), s = n.nodes.find((t) => t.id === e);
|
|
1706
1703
|
if (!s) return a;
|
|
1707
1704
|
let c = w(s.key);
|
|
1708
1705
|
if (!c) return console.assert(!1, "invalid element", s.key), a;
|
|
1709
|
-
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" &&
|
|
1706
|
+
if (C[c.key] && C[c.key][o]) for (let { keys: n, names: r, raw: i } of C[c.key][o]) t === "write" && $t(n, i) || a.push({
|
|
1710
1707
|
id: Je("elementProperty", e, n),
|
|
1711
1708
|
kind: "elementProperty",
|
|
1712
1709
|
names: r,
|
|
@@ -1715,7 +1712,7 @@ function hr(e, t) {
|
|
|
1715
1712
|
raw: i
|
|
1716
1713
|
}
|
|
1717
1714
|
});
|
|
1718
|
-
if (
|
|
1715
|
+
if (en(c.key) && s.comp) {
|
|
1719
1716
|
let t = i[s.comp];
|
|
1720
1717
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1721
1718
|
id: Je("refProperty", e, n),
|
|
@@ -1724,7 +1721,7 @@ function hr(e, t) {
|
|
|
1724
1721
|
meta: { raw: { type: i } }
|
|
1725
1722
|
});
|
|
1726
1723
|
}
|
|
1727
|
-
if (
|
|
1724
|
+
if (tn(c.key) && s.comp) {
|
|
1728
1725
|
let t = i[s.comp];
|
|
1729
1726
|
if (t && t.meta.properties) for (let { id: n, name: r, type: i } of t.meta.properties) a.push({
|
|
1730
1727
|
id: Je("multipleRefProperty", e, n),
|
|
@@ -1758,7 +1755,7 @@ function hr(e, t) {
|
|
|
1758
1755
|
meta: { raw: { type: i } }
|
|
1759
1756
|
});
|
|
1760
1757
|
if (L(c.key) && n.type === "comp" && s.adaptSlot) {
|
|
1761
|
-
let { kind: n, mainKey: r, slotKey: o } =
|
|
1758
|
+
let { kind: n, mainKey: r, slotKey: o } = pt(s.adaptSlot);
|
|
1762
1759
|
if (n === "elementSlot") {
|
|
1763
1760
|
let n = w(r);
|
|
1764
1761
|
if (n && n.slots) {
|
|
@@ -1793,9 +1790,9 @@ function hr(e, t) {
|
|
|
1793
1790
|
}
|
|
1794
1791
|
return a;
|
|
1795
1792
|
}
|
|
1796
|
-
function
|
|
1793
|
+
function hr(e) {
|
|
1797
1794
|
if (!e) return;
|
|
1798
|
-
let { activeObject: t, activeComp: n, depends: r } = S.app, i = Ve(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } =
|
|
1795
|
+
let { activeObject: t, activeComp: n, depends: r } = S.app, i = Ve(t.type, t.subtype), { kind: a, nodeId: o, propertyKey: s } = ut(e), c = t.nodes.find((e) => e.id === o);
|
|
1799
1796
|
if (!c) return;
|
|
1800
1797
|
let l = w(c.key);
|
|
1801
1798
|
if (!l) {
|
|
@@ -1816,7 +1813,7 @@ function gr(e) {
|
|
|
1816
1813
|
};
|
|
1817
1814
|
}
|
|
1818
1815
|
} else if (a === "refProperty") {
|
|
1819
|
-
if (
|
|
1816
|
+
if (en(l.key) && c.comp) {
|
|
1820
1817
|
let t = r[c.comp];
|
|
1821
1818
|
if (t) {
|
|
1822
1819
|
let n = t.meta.properties?.find((e) => e.id === s);
|
|
@@ -1829,7 +1826,7 @@ function gr(e) {
|
|
|
1829
1826
|
}
|
|
1830
1827
|
}
|
|
1831
1828
|
} else if (a === "multipleRefProperty") {
|
|
1832
|
-
if (
|
|
1829
|
+
if (tn(l.key) && c.comp) {
|
|
1833
1830
|
let t = r[c.comp];
|
|
1834
1831
|
if (t) {
|
|
1835
1832
|
let n = t.meta.properties?.find((e) => e.id === s);
|
|
@@ -1843,7 +1840,7 @@ function gr(e) {
|
|
|
1843
1840
|
}
|
|
1844
1841
|
} else if (a === "customSlotProperty") {
|
|
1845
1842
|
if (R(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1846
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1843
|
+
let { compId: t, slotId: r, propertyId: i } = dt(s);
|
|
1847
1844
|
if (n.id === t && c.slot === r) {
|
|
1848
1845
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1849
1846
|
if (t && t.properties) {
|
|
@@ -1859,7 +1856,7 @@ function gr(e) {
|
|
|
1859
1856
|
}
|
|
1860
1857
|
} else if (a === "multipleCustomSlotProperty") {
|
|
1861
1858
|
if (z(l.key) && c.slot && t.type === "comp" && n.meta.slots) {
|
|
1862
|
-
let { compId: t, slotId: r, propertyId: i } =
|
|
1859
|
+
let { compId: t, slotId: r, propertyId: i } = dt(s);
|
|
1863
1860
|
if (n.id === t && c.slot === r) {
|
|
1864
1861
|
let t = n.meta.slots.find((e) => e.id === r);
|
|
1865
1862
|
if (t && t.properties) {
|
|
@@ -1885,8 +1882,8 @@ function gr(e) {
|
|
|
1885
1882
|
}
|
|
1886
1883
|
} else if (a === "elementAdaptSlotProperty") {
|
|
1887
1884
|
if (L(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1888
|
-
let { elementKey: t, slotKey: n, propertyKey: r } =
|
|
1889
|
-
if (
|
|
1885
|
+
let { elementKey: t, slotKey: n, propertyKey: r } = ft(s);
|
|
1886
|
+
if (nn(c.adaptSlot, t, n)) {
|
|
1890
1887
|
let i = w(t);
|
|
1891
1888
|
if (i && i.slots) {
|
|
1892
1889
|
let t = i.slots.find((e) => e.key === n);
|
|
@@ -1907,8 +1904,8 @@ function gr(e) {
|
|
|
1907
1904
|
}
|
|
1908
1905
|
}
|
|
1909
1906
|
} else if (a === "customAdaptSlotProperty" && L(l.key) && t.type === "comp" && c.adaptSlot) {
|
|
1910
|
-
let { compId: t, slotId: n, propertyId: i } =
|
|
1911
|
-
if (
|
|
1907
|
+
let { compId: t, slotId: n, propertyId: i } = dt(s);
|
|
1908
|
+
if (rn(c.adaptSlot, t, n)) {
|
|
1912
1909
|
let o = r[t];
|
|
1913
1910
|
if (o && o.meta.slots) {
|
|
1914
1911
|
let t = o.meta.slots.find((e) => e.id === n);
|
|
@@ -1929,14 +1926,14 @@ function gr(e) {
|
|
|
1929
1926
|
}
|
|
1930
1927
|
}
|
|
1931
1928
|
}
|
|
1932
|
-
function
|
|
1933
|
-
let n = [], r =
|
|
1934
|
-
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([
|
|
1929
|
+
function gr(e, t) {
|
|
1930
|
+
let n = [], r = mr(e, t), i;
|
|
1931
|
+
for (let { id: e, kind: t, names: a } of r) t !== i && (i && n.push("separator"), i = t), n.push([rt(t, a), e]);
|
|
1935
1932
|
return I(n);
|
|
1936
1933
|
}
|
|
1937
1934
|
//#endregion
|
|
1938
1935
|
//#region src/core/utils/app/slot.ts
|
|
1939
|
-
function
|
|
1936
|
+
function _r() {
|
|
1940
1937
|
let { activeObject: e, activeComp: t } = S.app, n = [{
|
|
1941
1938
|
id: "",
|
|
1942
1939
|
name: ""
|
|
@@ -1948,7 +1945,7 @@ function vr() {
|
|
|
1948
1945
|
});
|
|
1949
1946
|
return n;
|
|
1950
1947
|
}
|
|
1951
|
-
function
|
|
1948
|
+
function vr(e) {
|
|
1952
1949
|
let { activeObject: t, activeComp: n } = S.app;
|
|
1953
1950
|
if (t.type !== "comp" || !n.meta.slots) return;
|
|
1954
1951
|
if (!e) return {
|
|
@@ -1961,8 +1958,8 @@ function yr(e) {
|
|
|
1961
1958
|
name: r.name
|
|
1962
1959
|
};
|
|
1963
1960
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let { i18n: e } = je, t = [], n =
|
|
1961
|
+
function yr() {
|
|
1962
|
+
let { i18n: e } = je, t = [], n = _r();
|
|
1966
1963
|
for (let { id: r, name: i } of n) {
|
|
1967
1964
|
let n = i;
|
|
1968
1965
|
r === "" && (n = e.global.t("x-runtime-lib.notSet")), t.push([n, r]);
|
|
@@ -1999,16 +1996,16 @@ y.app_bind_entry_v1 = {
|
|
|
1999
1996
|
}, 0);
|
|
2000
1997
|
},
|
|
2001
1998
|
genKindOpts_: function() {
|
|
2002
|
-
return
|
|
1999
|
+
return Un();
|
|
2003
2000
|
},
|
|
2004
2001
|
genNodeOpts_: function() {
|
|
2005
|
-
return this.kind === "property" ?
|
|
2002
|
+
return this.kind === "property" ? Rn("setProperty") : I([]);
|
|
2006
2003
|
},
|
|
2007
2004
|
genPropertyOpts_: function() {
|
|
2008
|
-
return this.kind === "property" ?
|
|
2005
|
+
return this.kind === "property" ? gr(this.node.id, "write") : I([]);
|
|
2009
2006
|
},
|
|
2010
2007
|
genStateOpts_: function() {
|
|
2011
|
-
return this.kind === "state" ?
|
|
2008
|
+
return this.kind === "state" ? Vn() : I([]);
|
|
2012
2009
|
},
|
|
2013
2010
|
onchange: function(e) {
|
|
2014
2011
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2024,14 +2021,14 @@ y.app_bind_entry_v1 = {
|
|
|
2024
2021
|
else if (this.kind === "property") {
|
|
2025
2022
|
let e = this.getField("NODE");
|
|
2026
2023
|
if (e.getOptions(!1), t) {
|
|
2027
|
-
let t =
|
|
2024
|
+
let t = Ln("setProperty")?.[0];
|
|
2028
2025
|
e.setValue(t?.id ?? "");
|
|
2029
2026
|
}
|
|
2030
2027
|
this.onNodeChange_(e.getValue());
|
|
2031
2028
|
} else if (this.kind === "state") {
|
|
2032
2029
|
let e = this.getField("STATE");
|
|
2033
2030
|
if (e.getOptions(!1), t) {
|
|
2034
|
-
let t =
|
|
2031
|
+
let t = zn()?.[0];
|
|
2035
2032
|
e.setValue(t?.id ?? "");
|
|
2036
2033
|
}
|
|
2037
2034
|
this.onStateChange_(e.getValue());
|
|
@@ -2047,13 +2044,13 @@ y.app_bind_entry_v1 = {
|
|
|
2047
2044
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2048
2045
|
let r = this.getField("PROPERTY");
|
|
2049
2046
|
if (r.getOptions(!1), n) {
|
|
2050
|
-
let e =
|
|
2047
|
+
let e = mr(this.node.id, "write")?.[0];
|
|
2051
2048
|
r.setValue(e?.id ?? "");
|
|
2052
2049
|
}
|
|
2053
2050
|
this.onPropertyChange_(r.getValue());
|
|
2054
2051
|
},
|
|
2055
2052
|
onPropertyChange_: function(e) {
|
|
2056
|
-
let t =
|
|
2053
|
+
let t = hr(e);
|
|
2057
2054
|
if (!t) {
|
|
2058
2055
|
console.assert(!1);
|
|
2059
2056
|
return;
|
|
@@ -2061,7 +2058,7 @@ y.app_bind_entry_v1 = {
|
|
|
2061
2058
|
this.property.id = t.id, this.property.kind = t.kind, this.property.names = t.names, this.updateShape_();
|
|
2062
2059
|
},
|
|
2063
2060
|
onStateChange_: function(e) {
|
|
2064
|
-
let t =
|
|
2061
|
+
let t = Bn(e);
|
|
2065
2062
|
if (!t) {
|
|
2066
2063
|
console.assert(!1);
|
|
2067
2064
|
return;
|
|
@@ -2085,7 +2082,7 @@ y.app_bind_entry_v1 = {
|
|
|
2085
2082
|
return;
|
|
2086
2083
|
}
|
|
2087
2084
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2088
|
-
let t =
|
|
2085
|
+
let t = hr(this.property.id);
|
|
2089
2086
|
if (!t) {
|
|
2090
2087
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
2091
2088
|
return;
|
|
@@ -2096,7 +2093,7 @@ y.app_bind_entry_v1 = {
|
|
|
2096
2093
|
}
|
|
2097
2094
|
v(t.names, this.property.names) || (this.property.names = t.names);
|
|
2098
2095
|
} else if (this.kind === "state") {
|
|
2099
|
-
let e =
|
|
2096
|
+
let e = Bn(this.state.id);
|
|
2100
2097
|
if (!e) {
|
|
2101
2098
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
2102
2099
|
return;
|
|
@@ -2113,7 +2110,7 @@ y.app_bind_entry_v1 = {
|
|
|
2113
2110
|
};
|
|
2114
2111
|
//#endregion
|
|
2115
2112
|
//#region src/core/blocks/app/event/appBind/v1/index.ts
|
|
2116
|
-
var
|
|
2113
|
+
var br = p.xml;
|
|
2117
2114
|
y.app_bind_container_v1 = { init: function() {
|
|
2118
2115
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
2119
2116
|
} }, y.app_bind_item_v1 = { init: function() {
|
|
@@ -2125,7 +2122,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2125
2122
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}");
|
|
2126
2123
|
},
|
|
2127
2124
|
mutationToDom: function() {
|
|
2128
|
-
let e =
|
|
2125
|
+
let e = br.createElement("mutation");
|
|
2129
2126
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
2130
2127
|
},
|
|
2131
2128
|
domToMutation: function(e) {
|
|
@@ -2192,7 +2189,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2192
2189
|
for (let e = this.itemCount_; this.getInput("ADD" + e); e++) this.removeInput("ADD" + e);
|
|
2193
2190
|
},
|
|
2194
2191
|
updateShadow_: function() {
|
|
2195
|
-
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(
|
|
2192
|
+
if (!this.isInsertionMarker()) for (let e = 0; e < this.itemCount_; e++) this.getInput("ADD" + e).setShadowDom(xn());
|
|
2196
2193
|
},
|
|
2197
2194
|
checkWarning_: function() {
|
|
2198
2195
|
let e;
|
|
@@ -2201,10 +2198,10 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2201
2198
|
if (!n) continue;
|
|
2202
2199
|
let r;
|
|
2203
2200
|
if (n.kind === "property") {
|
|
2204
|
-
let e =
|
|
2205
|
-
e && (r = e.meta.element ?
|
|
2201
|
+
let e = hr(n.property.id);
|
|
2202
|
+
e && (r = e.meta.element ? an(e.meta.raw) : B(e.meta.raw.type));
|
|
2206
2203
|
} else if (n.kind === "state") {
|
|
2207
|
-
let e =
|
|
2204
|
+
let e = Bn(n.state.id);
|
|
2208
2205
|
e && (r = B(e.type));
|
|
2209
2206
|
}
|
|
2210
2207
|
if (r && (e ||= r, r !== e)) {
|
|
@@ -2230,12 +2227,12 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2230
2227
|
},
|
|
2231
2228
|
initData_: function() {
|
|
2232
2229
|
if (this.node.id) return;
|
|
2233
|
-
let e =
|
|
2230
|
+
let e = Ln("onEvent")?.[0];
|
|
2234
2231
|
if (!e) return;
|
|
2235
2232
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2236
2233
|
let t = this.getField("NODE");
|
|
2237
2234
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2238
|
-
let n =
|
|
2235
|
+
let n = Jn(this.node.id)?.[0];
|
|
2239
2236
|
if (!n) return;
|
|
2240
2237
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2241
2238
|
let r = this.getField("EVENT");
|
|
@@ -2253,10 +2250,10 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2253
2250
|
}, 0);
|
|
2254
2251
|
},
|
|
2255
2252
|
genNodeOpts_: function() {
|
|
2256
|
-
return
|
|
2253
|
+
return Rn("onEvent");
|
|
2257
2254
|
},
|
|
2258
2255
|
genEventOpts_: function() {
|
|
2259
|
-
return
|
|
2256
|
+
return Xn(this.node.id);
|
|
2260
2257
|
},
|
|
2261
2258
|
onchange: function(e) {
|
|
2262
2259
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2276,13 +2273,13 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2276
2273
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2277
2274
|
let r = this.getField("EVENT");
|
|
2278
2275
|
if (r.getOptions(!1), n) {
|
|
2279
|
-
let e =
|
|
2276
|
+
let e = Jn(this.node.id)?.[0];
|
|
2280
2277
|
r.setValue(e?.id ?? "");
|
|
2281
2278
|
}
|
|
2282
2279
|
this.onEventChange_(r.getValue());
|
|
2283
2280
|
},
|
|
2284
2281
|
onEventChange_: function(e) {
|
|
2285
|
-
let t =
|
|
2282
|
+
let t = Yn(e);
|
|
2286
2283
|
if (!t) {
|
|
2287
2284
|
console.assert(!1);
|
|
2288
2285
|
return;
|
|
@@ -2319,7 +2316,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2319
2316
|
"x-runtime-lib.instance",
|
|
2320
2317
|
!0
|
|
2321
2318
|
]);
|
|
2322
|
-
let t =
|
|
2319
|
+
let t = qn(this.event.kind);
|
|
2323
2320
|
if (this.event.params) for (let n = 0; n < this.event.params.length; n++) {
|
|
2324
2321
|
let { key: r, name: i } = this.event.params[n];
|
|
2325
2322
|
e.push([
|
|
@@ -2342,7 +2339,7 @@ y.app_bind_container_v1 = { init: function() {
|
|
|
2342
2339
|
return;
|
|
2343
2340
|
}
|
|
2344
2341
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2345
|
-
let t =
|
|
2342
|
+
let t = Yn(this.event.id);
|
|
2346
2343
|
if (!t) {
|
|
2347
2344
|
this.setWarningText(F("WARN_EVENT_NOT_FOUND"));
|
|
2348
2345
|
return;
|
|
@@ -2385,12 +2382,12 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2385
2382
|
},
|
|
2386
2383
|
initData_: function() {
|
|
2387
2384
|
if (this.node.id) return;
|
|
2388
|
-
let e =
|
|
2385
|
+
let e = Ln("triggerEvent")?.[0];
|
|
2389
2386
|
if (!e) return;
|
|
2390
2387
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2391
2388
|
let t = this.getField("NODE");
|
|
2392
2389
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2393
|
-
let n =
|
|
2390
|
+
let n = Zn(this.node.id)?.[0];
|
|
2394
2391
|
if (!n) return;
|
|
2395
2392
|
this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
|
|
2396
2393
|
let r = this.getField("EVENT");
|
|
@@ -2408,10 +2405,10 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2408
2405
|
}, 0);
|
|
2409
2406
|
},
|
|
2410
2407
|
genNodeOpts_: function() {
|
|
2411
|
-
return
|
|
2408
|
+
return Rn("triggerEvent");
|
|
2412
2409
|
},
|
|
2413
2410
|
genEventOpts_: function() {
|
|
2414
|
-
return
|
|
2411
|
+
return $n(this.node.id);
|
|
2415
2412
|
},
|
|
2416
2413
|
onchange: function(e) {
|
|
2417
2414
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2431,13 +2428,13 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2431
2428
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2432
2429
|
let r = this.getField("EVENT");
|
|
2433
2430
|
if (r.getOptions(!1), n) {
|
|
2434
|
-
let e =
|
|
2431
|
+
let e = Zn(this.node.id)?.[0];
|
|
2435
2432
|
r.setValue(e?.id ?? "");
|
|
2436
2433
|
}
|
|
2437
2434
|
this.onEventChange_(r.getValue());
|
|
2438
2435
|
},
|
|
2439
2436
|
onEventChange_: function(e) {
|
|
2440
|
-
let t =
|
|
2437
|
+
let t = Qn(e);
|
|
2441
2438
|
if (!t) {
|
|
2442
2439
|
console.assert(!1);
|
|
2443
2440
|
return;
|
|
@@ -2494,7 +2491,7 @@ ${Re(r, 4)}${Re(i, 2)} } catch (e) {
|
|
|
2494
2491
|
return;
|
|
2495
2492
|
}
|
|
2496
2493
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2497
|
-
let t =
|
|
2494
|
+
let t = Qn(this.event.id);
|
|
2498
2495
|
if (!t) {
|
|
2499
2496
|
this.setWarningText(F("WARN_EVENT_NOT_FOUND"));
|
|
2500
2497
|
return;
|
|
@@ -2563,9 +2560,9 @@ ${g.statementToCode(e, "HANDLE")}};
|
|
|
2563
2560
|
},
|
|
2564
2561
|
updateShadow_: function() {
|
|
2565
2562
|
if (this.isInsertionMarker()) return;
|
|
2566
|
-
let e =
|
|
2563
|
+
let e = fn("title");
|
|
2567
2564
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2568
|
-
let t =
|
|
2565
|
+
let t = fn("text");
|
|
2569
2566
|
this.getInput("TEXT").connection.setShadowDom(t);
|
|
2570
2567
|
},
|
|
2571
2568
|
ensureBlocks_: function() {
|
|
@@ -2598,11 +2595,11 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2598
2595
|
},
|
|
2599
2596
|
updateShadow_: function() {
|
|
2600
2597
|
if (this.isInsertionMarker()) return;
|
|
2601
|
-
let e =
|
|
2598
|
+
let e = fn("title");
|
|
2602
2599
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2603
|
-
let t =
|
|
2600
|
+
let t = fn("label");
|
|
2604
2601
|
this.getInput("LABEL").connection.setShadowDom(t);
|
|
2605
|
-
let n =
|
|
2602
|
+
let n = fn("");
|
|
2606
2603
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
2607
2604
|
},
|
|
2608
2605
|
ensureBlocks_: function() {
|
|
@@ -2655,12 +2652,12 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2655
2652
|
},
|
|
2656
2653
|
initData_: function() {
|
|
2657
2654
|
if (this.node.id) return;
|
|
2658
|
-
let e =
|
|
2655
|
+
let e = Ln("callMethod")?.[0];
|
|
2659
2656
|
if (!e) return;
|
|
2660
2657
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2661
2658
|
let t = this.getField("NODE");
|
|
2662
2659
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2663
|
-
let n =
|
|
2660
|
+
let n = tr(this.node.id)?.[0];
|
|
2664
2661
|
if (!n) return;
|
|
2665
2662
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
|
|
2666
2663
|
let r = this.getField("METHOD");
|
|
@@ -2678,10 +2675,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2678
2675
|
}, 0);
|
|
2679
2676
|
},
|
|
2680
2677
|
genNodeOpts_: function() {
|
|
2681
|
-
return
|
|
2678
|
+
return Rn("callMethod");
|
|
2682
2679
|
},
|
|
2683
2680
|
genMethodOpts_: function() {
|
|
2684
|
-
return
|
|
2681
|
+
return rr(this.node.id);
|
|
2685
2682
|
},
|
|
2686
2683
|
onchange: function(e) {
|
|
2687
2684
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2701,13 +2698,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2701
2698
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2702
2699
|
let r = this.getField("METHOD");
|
|
2703
2700
|
if (r.getOptions(!1), n) {
|
|
2704
|
-
let e =
|
|
2701
|
+
let e = tr(this.node.id)?.[0];
|
|
2705
2702
|
r.setValue(e?.id ?? "");
|
|
2706
2703
|
}
|
|
2707
2704
|
this.onMethodChange_(r.getValue());
|
|
2708
2705
|
},
|
|
2709
2706
|
onMethodChange_: function(e) {
|
|
2710
|
-
let t =
|
|
2707
|
+
let t = nr(e);
|
|
2711
2708
|
if (!t) {
|
|
2712
2709
|
console.assert(!1);
|
|
2713
2710
|
return;
|
|
@@ -2763,7 +2760,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2763
2760
|
},
|
|
2764
2761
|
ensureBlocks_: function() {
|
|
2765
2762
|
if (this.isInsertionMarker()) return;
|
|
2766
|
-
let e = [], t =
|
|
2763
|
+
let e = [], t = er(this.method.kind);
|
|
2767
2764
|
if (this.method.outputs) for (let n = 0; n < this.method.outputs.length; n++) {
|
|
2768
2765
|
let { key: r, name: i } = this.method.outputs[n];
|
|
2769
2766
|
e.push([
|
|
@@ -2786,7 +2783,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2786
2783
|
return;
|
|
2787
2784
|
}
|
|
2788
2785
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2789
|
-
let t =
|
|
2786
|
+
let t = nr(this.method.id);
|
|
2790
2787
|
if (!t) {
|
|
2791
2788
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
2792
2789
|
return;
|
|
@@ -2838,7 +2835,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
2838
2835
|
let o = "";
|
|
2839
2836
|
if (r.method.outputs) for (let { key: e } of r.method.outputs) o += `${t}const __output$${e}__ = __outputs__[${n(e)}];\n`;
|
|
2840
2837
|
if (r.method.kind === "customMethod") {
|
|
2841
|
-
let { kind: e, nodeId: t, methodKey: n } =
|
|
2838
|
+
let { kind: e, nodeId: t, methodKey: n } = st(r.method.id), s = ze(e, t, n);
|
|
2842
2839
|
if (r.method.outputs && r.method.outputs.length > 0) {
|
|
2843
2840
|
let e = g.statementToCode(r, "HANDLE");
|
|
2844
2841
|
return `{
|
|
@@ -2867,12 +2864,12 @@ ${o}${e}}
|
|
|
2867
2864
|
},
|
|
2868
2865
|
initData_: function() {
|
|
2869
2866
|
if (this.node.id) return;
|
|
2870
|
-
let e =
|
|
2867
|
+
let e = Ln("implementMethod")?.[0];
|
|
2871
2868
|
if (!e) return;
|
|
2872
2869
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
2873
2870
|
let t = this.getField("NODE");
|
|
2874
2871
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
2875
|
-
let n =
|
|
2872
|
+
let n = ar(this.node.id)?.[0];
|
|
2876
2873
|
if (!n) return;
|
|
2877
2874
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs;
|
|
2878
2875
|
let r = this.getField("METHOD");
|
|
@@ -2890,10 +2887,10 @@ ${o}${e}}
|
|
|
2890
2887
|
}, 0);
|
|
2891
2888
|
},
|
|
2892
2889
|
genNodeOpts_: function() {
|
|
2893
|
-
return
|
|
2890
|
+
return Rn("implementMethod");
|
|
2894
2891
|
},
|
|
2895
2892
|
genMethodOpts_: function() {
|
|
2896
|
-
return
|
|
2893
|
+
return sr(this.node.id);
|
|
2897
2894
|
},
|
|
2898
2895
|
onchange: function(e) {
|
|
2899
2896
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -2913,13 +2910,13 @@ ${o}${e}}
|
|
|
2913
2910
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
2914
2911
|
let r = this.getField("METHOD");
|
|
2915
2912
|
if (r.getOptions(!1), n) {
|
|
2916
|
-
let e =
|
|
2913
|
+
let e = ar(this.node.id)?.[0];
|
|
2917
2914
|
r.setValue(e?.id ?? "");
|
|
2918
2915
|
}
|
|
2919
2916
|
r.setValue(r.getValue());
|
|
2920
2917
|
},
|
|
2921
2918
|
onMethodChange_: function(e) {
|
|
2922
|
-
let t =
|
|
2919
|
+
let t = or(e);
|
|
2923
2920
|
if (!t) {
|
|
2924
2921
|
console.assert(!1);
|
|
2925
2922
|
return;
|
|
@@ -2953,7 +2950,7 @@ ${o}${e}}
|
|
|
2953
2950
|
"x-runtime-lib.instance",
|
|
2954
2951
|
!0
|
|
2955
2952
|
]);
|
|
2956
|
-
let t =
|
|
2953
|
+
let t = ir(this.method.kind);
|
|
2957
2954
|
if (this.method.inputs) for (let n = 0; n < this.method.inputs.length; n++) {
|
|
2958
2955
|
let { key: r, name: i } = this.method.inputs[n];
|
|
2959
2956
|
e.push([
|
|
@@ -2976,7 +2973,7 @@ ${o}${e}}
|
|
|
2976
2973
|
return;
|
|
2977
2974
|
}
|
|
2978
2975
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
2979
|
-
let t =
|
|
2976
|
+
let t = or(this.method.id);
|
|
2980
2977
|
if (!t) {
|
|
2981
2978
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
2982
2979
|
return;
|
|
@@ -2992,7 +2989,7 @@ ${o}${e}}
|
|
|
2992
2989
|
this.setWarningText(null);
|
|
2993
2990
|
}
|
|
2994
2991
|
}, g.forBlock.implement_app_method_v1 = function(e) {
|
|
2995
|
-
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } =
|
|
2992
|
+
let t = g.INDENT, n = g.quote_, r = e, { kind: i, nodeId: a, methodKey: o } = st(r.method.id), s = "";
|
|
2996
2993
|
if (r.method.inputs) for (let { key: e } of r.method.inputs) s += `${t}const __input$${e}__ = __inputs__[${n(e)}];\n`;
|
|
2997
2994
|
let c = g.statementToCode(r, "HANDLE");
|
|
2998
2995
|
return `async function ${ze(i, a, o)}(__instance__, __inputs__) {
|
|
@@ -3018,17 +3015,17 @@ ${c}${t}return __outputs__;
|
|
|
3018
3015
|
},
|
|
3019
3016
|
initData_: function() {
|
|
3020
3017
|
if (this.node.id) return;
|
|
3021
|
-
let e =
|
|
3018
|
+
let e = Ln("implementMethod")?.[0];
|
|
3022
3019
|
if (!e) return;
|
|
3023
3020
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3024
3021
|
let t = this.getField("NODE");
|
|
3025
3022
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3026
|
-
let n =
|
|
3023
|
+
let n = ar(this.node.id)?.[0];
|
|
3027
3024
|
if (!n) return;
|
|
3028
3025
|
this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names;
|
|
3029
3026
|
let r = this.getField("METHOD");
|
|
3030
3027
|
r.getOptions(!1), r.setValue(this.method.id);
|
|
3031
|
-
let i =
|
|
3028
|
+
let i = cr(this.method.id)?.[0];
|
|
3032
3029
|
if (!i) return;
|
|
3033
3030
|
this.output.key = i.key, this.output.name = i.name, this.output.type = i.type;
|
|
3034
3031
|
let a = this.getField("OUTPUT");
|
|
@@ -3047,13 +3044,13 @@ ${c}${t}return __outputs__;
|
|
|
3047
3044
|
}, 0);
|
|
3048
3045
|
},
|
|
3049
3046
|
genNodeOpts_: function() {
|
|
3050
|
-
return
|
|
3047
|
+
return Rn("implementMethod");
|
|
3051
3048
|
},
|
|
3052
3049
|
genMethodOpts_: function() {
|
|
3053
|
-
return
|
|
3050
|
+
return sr(this.node.id);
|
|
3054
3051
|
},
|
|
3055
3052
|
genOutputOpts_: function() {
|
|
3056
|
-
return
|
|
3053
|
+
return ur(this.method.id);
|
|
3057
3054
|
},
|
|
3058
3055
|
onchange: function(e) {
|
|
3059
3056
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3073,13 +3070,13 @@ ${c}${t}return __outputs__;
|
|
|
3073
3070
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3074
3071
|
let r = this.getField("METHOD");
|
|
3075
3072
|
if (r.getOptions(!1), n) {
|
|
3076
|
-
let e =
|
|
3073
|
+
let e = ar(this.node.id)?.[0];
|
|
3077
3074
|
r.setValue(e?.id ?? "");
|
|
3078
3075
|
}
|
|
3079
3076
|
r.setValue(r.getValue());
|
|
3080
3077
|
},
|
|
3081
3078
|
onMethodChange_: function(e) {
|
|
3082
|
-
let t =
|
|
3079
|
+
let t = or(e);
|
|
3083
3080
|
if (!t) {
|
|
3084
3081
|
console.assert(!1);
|
|
3085
3082
|
return;
|
|
@@ -3087,14 +3084,14 @@ ${c}${t}return __outputs__;
|
|
|
3087
3084
|
let n = this.method.id !== t.id;
|
|
3088
3085
|
this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
|
|
3089
3086
|
let r = this.getField("OUTPUT");
|
|
3090
|
-
if (r.getOptions(!1), n || !
|
|
3091
|
-
let e =
|
|
3087
|
+
if (r.getOptions(!1), n || !lr(this.method.id, this.output.key)) {
|
|
3088
|
+
let e = cr(this.method.id)?.[0];
|
|
3092
3089
|
r.setValue(e?.key ?? "");
|
|
3093
3090
|
}
|
|
3094
3091
|
this.onOutputChange_(r.getValue());
|
|
3095
3092
|
},
|
|
3096
3093
|
onOutputChange_: function(e) {
|
|
3097
|
-
let t =
|
|
3094
|
+
let t = lr(this.method.id, e);
|
|
3098
3095
|
if (!t) {
|
|
3099
3096
|
console.assert(!1);
|
|
3100
3097
|
return;
|
|
@@ -3125,7 +3122,7 @@ ${c}${t}return __outputs__;
|
|
|
3125
3122
|
return;
|
|
3126
3123
|
}
|
|
3127
3124
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3128
|
-
let t =
|
|
3125
|
+
let t = or(this.method.id);
|
|
3129
3126
|
if (!t) {
|
|
3130
3127
|
this.setWarningText(F("WARN_METHOD_NOT_FOUND"));
|
|
3131
3128
|
return;
|
|
@@ -3135,7 +3132,7 @@ ${c}${t}return __outputs__;
|
|
|
3135
3132
|
return;
|
|
3136
3133
|
}
|
|
3137
3134
|
t.names !== this.method.names && (this.method.names = t.names);
|
|
3138
|
-
let n =
|
|
3135
|
+
let n = lr(this.method.id, this.output.key);
|
|
3139
3136
|
if (!n) {
|
|
3140
3137
|
this.setWarningText(F("WARN_OUTPUT_NOT_FOUND"));
|
|
3141
3138
|
return;
|
|
@@ -3193,12 +3190,12 @@ ${c}${t}return __outputs__;
|
|
|
3193
3190
|
},
|
|
3194
3191
|
initData_: function() {
|
|
3195
3192
|
if (this.app.id) return;
|
|
3196
|
-
let e =
|
|
3193
|
+
let e = kn()?.[0];
|
|
3197
3194
|
if (!e) return;
|
|
3198
3195
|
this.app.id = e.id, this.app.name = e.name;
|
|
3199
3196
|
let t = this.getField("APP");
|
|
3200
3197
|
t.getOptions(!1), t.setValue(this.app.id);
|
|
3201
|
-
let n =
|
|
3198
|
+
let n = dr(this.app.id)?.[0];
|
|
3202
3199
|
if (!n) return;
|
|
3203
3200
|
this.page.id = n.id, this.page.name = n.name;
|
|
3204
3201
|
let r = this.getField("PAGE");
|
|
@@ -3216,10 +3213,10 @@ ${c}${t}return __outputs__;
|
|
|
3216
3213
|
}, 0);
|
|
3217
3214
|
},
|
|
3218
3215
|
genAppOpts_: function() {
|
|
3219
|
-
return
|
|
3216
|
+
return jn();
|
|
3220
3217
|
},
|
|
3221
3218
|
genPageOpts_: function() {
|
|
3222
|
-
return
|
|
3219
|
+
return pr(this.app.id);
|
|
3223
3220
|
},
|
|
3224
3221
|
onchange: function(e) {
|
|
3225
3222
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3230,7 +3227,7 @@ ${c}${t}return __outputs__;
|
|
|
3230
3227
|
}
|
|
3231
3228
|
},
|
|
3232
3229
|
onAppChange_: function(e) {
|
|
3233
|
-
let t =
|
|
3230
|
+
let t = An(e);
|
|
3234
3231
|
if (!t) {
|
|
3235
3232
|
console.assert(!1);
|
|
3236
3233
|
return;
|
|
@@ -3239,13 +3236,13 @@ ${c}${t}return __outputs__;
|
|
|
3239
3236
|
this.app.id = t.id, this.app.name = t.name;
|
|
3240
3237
|
let r = this.getField("PAGE");
|
|
3241
3238
|
if (r.getOptions(!1), n) {
|
|
3242
|
-
let e =
|
|
3239
|
+
let e = dr(this.app.id)?.[0];
|
|
3243
3240
|
r.setValue(e?.id ?? "");
|
|
3244
3241
|
}
|
|
3245
3242
|
this.onPageChange_(r.getValue());
|
|
3246
3243
|
},
|
|
3247
3244
|
onPageChange_: function(e) {
|
|
3248
|
-
let t =
|
|
3245
|
+
let t = fr(this.app.id, e);
|
|
3249
3246
|
if (!t) {
|
|
3250
3247
|
console.assert(!1);
|
|
3251
3248
|
return;
|
|
@@ -3253,13 +3250,13 @@ ${c}${t}return __outputs__;
|
|
|
3253
3250
|
this.page.id = t.id, this.page.name = t.name;
|
|
3254
3251
|
},
|
|
3255
3252
|
checkWarning_: function() {
|
|
3256
|
-
let e =
|
|
3253
|
+
let e = An(this.app.id);
|
|
3257
3254
|
if (!e) {
|
|
3258
3255
|
this.setWarningText(F("WARN_APP_NOT_FOUND"));
|
|
3259
3256
|
return;
|
|
3260
3257
|
}
|
|
3261
3258
|
e.name !== this.app.name && (this.app.name = e.name);
|
|
3262
|
-
let t =
|
|
3259
|
+
let t = fr(this.app.id, this.page.id);
|
|
3263
3260
|
if (!t) {
|
|
3264
3261
|
this.setWarningText(F("WARN_PAGE_NOT_FOUND"));
|
|
3265
3262
|
return;
|
|
@@ -3278,7 +3275,7 @@ ${c}${t}return __outputs__;
|
|
|
3278
3275
|
},
|
|
3279
3276
|
initData_: function() {
|
|
3280
3277
|
if (this.comp.id) return;
|
|
3281
|
-
let e =
|
|
3278
|
+
let e = Wn()?.[0];
|
|
3282
3279
|
if (!e) return;
|
|
3283
3280
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3284
3281
|
let t = this.getField("COMP");
|
|
@@ -3293,7 +3290,7 @@ ${c}${t}return __outputs__;
|
|
|
3293
3290
|
}, 0);
|
|
3294
3291
|
},
|
|
3295
3292
|
genCompOpts_: function() {
|
|
3296
|
-
return
|
|
3293
|
+
return Kn();
|
|
3297
3294
|
},
|
|
3298
3295
|
onchange: function(e) {
|
|
3299
3296
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3304,7 +3301,7 @@ ${c}${t}return __outputs__;
|
|
|
3304
3301
|
}
|
|
3305
3302
|
},
|
|
3306
3303
|
onCompChange_: function(e) {
|
|
3307
|
-
let t =
|
|
3304
|
+
let t = Gn(e);
|
|
3308
3305
|
if (!t) {
|
|
3309
3306
|
console.assert(!1);
|
|
3310
3307
|
return;
|
|
@@ -3312,7 +3309,7 @@ ${c}${t}return __outputs__;
|
|
|
3312
3309
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
3313
3310
|
},
|
|
3314
3311
|
checkWarning_: function() {
|
|
3315
|
-
let e =
|
|
3312
|
+
let e = Gn(this.comp.id);
|
|
3316
3313
|
if (!e) {
|
|
3317
3314
|
this.setWarningText(F("WARN_COMP_NOT_FOUND"));
|
|
3318
3315
|
return;
|
|
@@ -3331,7 +3328,7 @@ ${c}${t}return __outputs__;
|
|
|
3331
3328
|
},
|
|
3332
3329
|
initData_: function() {
|
|
3333
3330
|
if (this.slot.id) return;
|
|
3334
|
-
let e =
|
|
3331
|
+
let e = _r()?.[0];
|
|
3335
3332
|
if (!e) return;
|
|
3336
3333
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3337
3334
|
let t = this.getField("SLOT");
|
|
@@ -3346,7 +3343,7 @@ ${c}${t}return __outputs__;
|
|
|
3346
3343
|
}, 0);
|
|
3347
3344
|
},
|
|
3348
3345
|
genSlotOpts_: function() {
|
|
3349
|
-
return
|
|
3346
|
+
return yr();
|
|
3350
3347
|
},
|
|
3351
3348
|
onchange: function(e) {
|
|
3352
3349
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3357,7 +3354,7 @@ ${c}${t}return __outputs__;
|
|
|
3357
3354
|
}
|
|
3358
3355
|
},
|
|
3359
3356
|
onSlotChange_: function(e) {
|
|
3360
|
-
let t =
|
|
3357
|
+
let t = vr(e);
|
|
3361
3358
|
if (!t) {
|
|
3362
3359
|
console.assert(!1);
|
|
3363
3360
|
return;
|
|
@@ -3365,7 +3362,7 @@ ${c}${t}return __outputs__;
|
|
|
3365
3362
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
3366
3363
|
},
|
|
3367
3364
|
checkWarning_: function() {
|
|
3368
|
-
let e =
|
|
3365
|
+
let e = vr(this.slot.id);
|
|
3369
3366
|
if (!e) {
|
|
3370
3367
|
this.setWarningText(F("WARN_SLOT_NOT_FOUND"));
|
|
3371
3368
|
return;
|
|
@@ -3389,12 +3386,12 @@ ${c}${t}return __outputs__;
|
|
|
3389
3386
|
},
|
|
3390
3387
|
initData_: function() {
|
|
3391
3388
|
if (this.node.id) return;
|
|
3392
|
-
let e =
|
|
3389
|
+
let e = Ln("getProperty")?.[0];
|
|
3393
3390
|
if (!e) return;
|
|
3394
3391
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3395
3392
|
let t = this.getField("NODE");
|
|
3396
3393
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3397
|
-
let n =
|
|
3394
|
+
let n = mr(this.node.id, "read")?.[0];
|
|
3398
3395
|
if (!n) return;
|
|
3399
3396
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3400
3397
|
let r = this.getField("PROPERTY");
|
|
@@ -3412,10 +3409,10 @@ ${c}${t}return __outputs__;
|
|
|
3412
3409
|
}, 0);
|
|
3413
3410
|
},
|
|
3414
3411
|
genNodeOpts_: function() {
|
|
3415
|
-
return
|
|
3412
|
+
return Rn("getProperty");
|
|
3416
3413
|
},
|
|
3417
3414
|
genPropertyOpts_: function() {
|
|
3418
|
-
return
|
|
3415
|
+
return gr(this.node.id, "read");
|
|
3419
3416
|
},
|
|
3420
3417
|
onchange: function(e) {
|
|
3421
3418
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3435,13 +3432,13 @@ ${c}${t}return __outputs__;
|
|
|
3435
3432
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3436
3433
|
let r = this.getField("PROPERTY");
|
|
3437
3434
|
if (r.getOptions(!1), n) {
|
|
3438
|
-
let e =
|
|
3435
|
+
let e = mr(this.node.id, "read")?.[0];
|
|
3439
3436
|
r.setValue(e?.id ?? "");
|
|
3440
3437
|
}
|
|
3441
3438
|
this.onPropertyChange_(r.getValue());
|
|
3442
3439
|
},
|
|
3443
3440
|
onPropertyChange_: function(e) {
|
|
3444
|
-
let t =
|
|
3441
|
+
let t = hr(e);
|
|
3445
3442
|
if (!t) {
|
|
3446
3443
|
console.assert(!1);
|
|
3447
3444
|
return;
|
|
@@ -3480,7 +3477,7 @@ ${c}${t}return __outputs__;
|
|
|
3480
3477
|
return;
|
|
3481
3478
|
}
|
|
3482
3479
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3483
|
-
let t =
|
|
3480
|
+
let t = hr(this.property.id);
|
|
3484
3481
|
if (!t) {
|
|
3485
3482
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
3486
3483
|
return;
|
|
@@ -3508,12 +3505,12 @@ ${c}${t}return __outputs__;
|
|
|
3508
3505
|
},
|
|
3509
3506
|
initData_: function() {
|
|
3510
3507
|
if (this.node.id) return;
|
|
3511
|
-
let e =
|
|
3508
|
+
let e = Ln("setProperty")?.[0];
|
|
3512
3509
|
if (!e) return;
|
|
3513
3510
|
this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
|
|
3514
3511
|
let t = this.getField("NODE");
|
|
3515
3512
|
t.getOptions(!1), t.setValue(this.node.id);
|
|
3516
|
-
let n =
|
|
3513
|
+
let n = mr(this.node.id, "write")?.[0];
|
|
3517
3514
|
if (!n) return;
|
|
3518
3515
|
this.property.id = n.id, this.property.kind = n.kind, this.property.names = n.names;
|
|
3519
3516
|
let r = this.getField("PROPERTY");
|
|
@@ -3531,10 +3528,10 @@ ${c}${t}return __outputs__;
|
|
|
3531
3528
|
}, 0);
|
|
3532
3529
|
},
|
|
3533
3530
|
genNodeOpts_: function() {
|
|
3534
|
-
return
|
|
3531
|
+
return Rn("setProperty");
|
|
3535
3532
|
},
|
|
3536
3533
|
genPropertyOpts_: function() {
|
|
3537
|
-
return
|
|
3534
|
+
return gr(this.node.id, "write");
|
|
3538
3535
|
},
|
|
3539
3536
|
onchange: function(e) {
|
|
3540
3537
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3554,13 +3551,13 @@ ${c}${t}return __outputs__;
|
|
|
3554
3551
|
this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
|
|
3555
3552
|
let r = this.getField("PROPERTY");
|
|
3556
3553
|
if (r.getOptions(!1), n) {
|
|
3557
|
-
let e =
|
|
3554
|
+
let e = mr(this.node.id, "write")?.[0];
|
|
3558
3555
|
r.setValue(e?.id ?? "");
|
|
3559
3556
|
}
|
|
3560
3557
|
this.onPropertyChange_(r.getValue());
|
|
3561
3558
|
},
|
|
3562
3559
|
onPropertyChange_: function(e) {
|
|
3563
|
-
let t =
|
|
3560
|
+
let t = hr(e);
|
|
3564
3561
|
if (!t) {
|
|
3565
3562
|
console.assert(!1);
|
|
3566
3563
|
return;
|
|
@@ -3581,7 +3578,7 @@ ${c}${t}return __outputs__;
|
|
|
3581
3578
|
},
|
|
3582
3579
|
updateShadow_: function() {
|
|
3583
3580
|
if (this.isInsertionMarker()) return;
|
|
3584
|
-
let e =
|
|
3581
|
+
let e = hr(this.property.id);
|
|
3585
3582
|
if (!e) return;
|
|
3586
3583
|
let t = this.getInput("INSTANCE");
|
|
3587
3584
|
if (t) {
|
|
@@ -3593,7 +3590,7 @@ ${c}${t}return __outputs__;
|
|
|
3593
3590
|
if (n) {
|
|
3594
3591
|
n.setShadowDom(null);
|
|
3595
3592
|
let t = n.connection?.targetBlock();
|
|
3596
|
-
t && t.dispose(), e.meta.element ? n.setCheck(
|
|
3593
|
+
t && t.dispose(), e.meta.element ? n.setCheck(an(e.meta.raw)).setShadowDom(Sn(e.meta.raw)) : n.setCheck(B(e.meta.raw.type)).setShadowDom(H(e.meta.raw.type));
|
|
3597
3594
|
}
|
|
3598
3595
|
},
|
|
3599
3596
|
checkWarning_: function() {
|
|
@@ -3607,7 +3604,7 @@ ${c}${t}return __outputs__;
|
|
|
3607
3604
|
return;
|
|
3608
3605
|
}
|
|
3609
3606
|
e.alias !== this.node.alias && (this.node.alias = e.alias);
|
|
3610
|
-
let t =
|
|
3607
|
+
let t = hr(this.property.id);
|
|
3611
3608
|
if (!t) {
|
|
3612
3609
|
this.setWarningText(F("WARN_PROPERTY_NOT_FOUND"));
|
|
3613
3610
|
return;
|
|
@@ -3636,7 +3633,7 @@ ${c}${t}return __outputs__;
|
|
|
3636
3633
|
},
|
|
3637
3634
|
initData_: function() {
|
|
3638
3635
|
if (this.state.id) return;
|
|
3639
|
-
let e =
|
|
3636
|
+
let e = zn()?.[0];
|
|
3640
3637
|
if (!e) return;
|
|
3641
3638
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3642
3639
|
let t = this.getField("STATE");
|
|
@@ -3651,7 +3648,7 @@ ${c}${t}return __outputs__;
|
|
|
3651
3648
|
}, 0);
|
|
3652
3649
|
},
|
|
3653
3650
|
genStateOpts_: function() {
|
|
3654
|
-
return
|
|
3651
|
+
return Vn();
|
|
3655
3652
|
},
|
|
3656
3653
|
onchange: function(e) {
|
|
3657
3654
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3660,7 +3657,7 @@ ${c}${t}return __outputs__;
|
|
|
3660
3657
|
}
|
|
3661
3658
|
},
|
|
3662
3659
|
onStateChange_: function(e) {
|
|
3663
|
-
let t =
|
|
3660
|
+
let t = Bn(e);
|
|
3664
3661
|
if (!t) {
|
|
3665
3662
|
console.assert(!1);
|
|
3666
3663
|
return;
|
|
@@ -3668,7 +3665,7 @@ ${c}${t}return __outputs__;
|
|
|
3668
3665
|
this.state.id = t.id, this.state.name = t.name, this.state.type = t.type;
|
|
3669
3666
|
},
|
|
3670
3667
|
checkWarning_: function() {
|
|
3671
|
-
let e =
|
|
3668
|
+
let e = Bn(this.state.id);
|
|
3672
3669
|
if (!e) {
|
|
3673
3670
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
3674
3671
|
return;
|
|
@@ -3692,7 +3689,7 @@ ${c}${t}return __outputs__;
|
|
|
3692
3689
|
},
|
|
3693
3690
|
initData_: function() {
|
|
3694
3691
|
if (this.state.id) return;
|
|
3695
|
-
let e =
|
|
3692
|
+
let e = zn()?.[0];
|
|
3696
3693
|
if (!e) return;
|
|
3697
3694
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3698
3695
|
let t = this.getField("STATE");
|
|
@@ -3705,7 +3702,7 @@ ${c}${t}return __outputs__;
|
|
|
3705
3702
|
this.state.id = e.state?.id ?? "", this.state.name = e.state?.name ?? "", this.state.type = e.state?.type ?? "string";
|
|
3706
3703
|
},
|
|
3707
3704
|
genStateOpts_: function() {
|
|
3708
|
-
return
|
|
3705
|
+
return Vn();
|
|
3709
3706
|
},
|
|
3710
3707
|
onchange: function(e) {
|
|
3711
3708
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3714,7 +3711,7 @@ ${c}${t}return __outputs__;
|
|
|
3714
3711
|
}
|
|
3715
3712
|
},
|
|
3716
3713
|
onStateChange_: function(e) {
|
|
3717
|
-
let t =
|
|
3714
|
+
let t = Bn(e);
|
|
3718
3715
|
if (!t) {
|
|
3719
3716
|
console.assert(!1);
|
|
3720
3717
|
return;
|
|
@@ -3730,7 +3727,7 @@ ${c}${t}return __outputs__;
|
|
|
3730
3727
|
this.getInput("VALUE").setCheck(t).setShadowDom(n);
|
|
3731
3728
|
},
|
|
3732
3729
|
checkWarning_: function() {
|
|
3733
|
-
let e =
|
|
3730
|
+
let e = Bn(this.state.id);
|
|
3734
3731
|
if (!e) {
|
|
3735
3732
|
this.setWarningText(F("WARN_STATE_NOT_FOUND"));
|
|
3736
3733
|
return;
|
|
@@ -3798,7 +3795,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(c1, c2, ratio) {
|
|
|
3798
3795
|
type: "field_colour",
|
|
3799
3796
|
name: "COLOR",
|
|
3800
3797
|
colour: "#ff0000",
|
|
3801
|
-
colourOptions:
|
|
3798
|
+
colourOptions: sn,
|
|
3802
3799
|
columns: 14
|
|
3803
3800
|
}],
|
|
3804
3801
|
output: "Color",
|
|
@@ -3866,28 +3863,28 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
3866
3863
|
};
|
|
3867
3864
|
//#endregion
|
|
3868
3865
|
//#region src/core/utils/compute/func.ts
|
|
3869
|
-
function
|
|
3866
|
+
function xr(e) {
|
|
3870
3867
|
let t = S.compute.spaces.find((t) => t.id === e);
|
|
3871
3868
|
return t ? t.funcs : [];
|
|
3872
3869
|
}
|
|
3873
|
-
function
|
|
3870
|
+
function Sr(e, t) {
|
|
3874
3871
|
let n = S.compute.spaces.find((t) => t.id === e);
|
|
3875
3872
|
if (n) return n.funcs.find((e) => e.id === t);
|
|
3876
3873
|
}
|
|
3877
|
-
function
|
|
3874
|
+
function Cr(e) {
|
|
3878
3875
|
let t = [];
|
|
3879
|
-
return
|
|
3876
|
+
return xr(e).forEach(({ id: e, name: n }) => {
|
|
3880
3877
|
t.push([n, e]);
|
|
3881
3878
|
}), I(t);
|
|
3882
3879
|
}
|
|
3883
|
-
function
|
|
3880
|
+
function wr() {
|
|
3884
3881
|
return S.compute.activeFunc;
|
|
3885
3882
|
}
|
|
3886
|
-
function
|
|
3883
|
+
function Tr(e) {
|
|
3887
3884
|
let { activeFunc: t } = S.compute;
|
|
3888
3885
|
return t.outputs?.find((t) => t.id === e);
|
|
3889
3886
|
}
|
|
3890
|
-
function
|
|
3887
|
+
function Er() {
|
|
3891
3888
|
let { activeFunc: e } = S.compute, t = [];
|
|
3892
3889
|
return e.outputs?.forEach(({ id: e, name: n }) => {
|
|
3893
3890
|
t.push([n, e]);
|
|
@@ -3895,18 +3892,18 @@ function Dr() {
|
|
|
3895
3892
|
}
|
|
3896
3893
|
//#endregion
|
|
3897
3894
|
//#region src/core/utils/compute/space.ts
|
|
3898
|
-
function
|
|
3895
|
+
function Dr(e) {
|
|
3899
3896
|
let t = [];
|
|
3900
3897
|
return S.compute.spaces.forEach((n) => {
|
|
3901
3898
|
e === "func" && n.funcs.length > 0 && t.push(n), e === "flow" && n.flows.length > 0 && t.push(n);
|
|
3902
3899
|
}), t;
|
|
3903
3900
|
}
|
|
3904
|
-
function
|
|
3901
|
+
function Or(e) {
|
|
3905
3902
|
return S.compute.spaces.find((t) => t.id === e);
|
|
3906
3903
|
}
|
|
3907
|
-
function
|
|
3904
|
+
function kr(e) {
|
|
3908
3905
|
let t = [];
|
|
3909
|
-
return
|
|
3906
|
+
return Dr(e).forEach(({ id: e, name: n }) => {
|
|
3910
3907
|
t.push([n, e]);
|
|
3911
3908
|
}), I(t);
|
|
3912
3909
|
}
|
|
@@ -3924,12 +3921,12 @@ y.call_func_v1 = {
|
|
|
3924
3921
|
},
|
|
3925
3922
|
initData_: function() {
|
|
3926
3923
|
if (this.space.id) return;
|
|
3927
|
-
let e =
|
|
3924
|
+
let e = Dr("func")?.[0];
|
|
3928
3925
|
if (!e) return;
|
|
3929
3926
|
this.space.id = e.id, this.space.name = e.name;
|
|
3930
3927
|
let t = this.getField("SPACE");
|
|
3931
3928
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
3932
|
-
let n =
|
|
3929
|
+
let n = xr(this.space.id)?.[0];
|
|
3933
3930
|
if (!n) return;
|
|
3934
3931
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
3935
3932
|
let r = this.getField("FUNC");
|
|
@@ -3947,10 +3944,10 @@ y.call_func_v1 = {
|
|
|
3947
3944
|
}, 0);
|
|
3948
3945
|
},
|
|
3949
3946
|
genSpaceOpts_: function() {
|
|
3950
|
-
return
|
|
3947
|
+
return kr("func");
|
|
3951
3948
|
},
|
|
3952
3949
|
genFuncOpts_: function() {
|
|
3953
|
-
return
|
|
3950
|
+
return Cr(this.space.id);
|
|
3954
3951
|
},
|
|
3955
3952
|
onchange: function(e) {
|
|
3956
3953
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -3961,7 +3958,7 @@ y.call_func_v1 = {
|
|
|
3961
3958
|
}
|
|
3962
3959
|
},
|
|
3963
3960
|
onSpaceChange_: function(e) {
|
|
3964
|
-
let t =
|
|
3961
|
+
let t = Or(e);
|
|
3965
3962
|
if (!t) {
|
|
3966
3963
|
console.assert(!1);
|
|
3967
3964
|
return;
|
|
@@ -3970,13 +3967,13 @@ y.call_func_v1 = {
|
|
|
3970
3967
|
this.space.id = t.id, this.space.name = t.name;
|
|
3971
3968
|
let r = this.getField("FUNC");
|
|
3972
3969
|
if (r.getOptions(!1), n) {
|
|
3973
|
-
let e =
|
|
3970
|
+
let e = xr(this.space.id)?.[0];
|
|
3974
3971
|
r.setValue(e?.id ?? "");
|
|
3975
3972
|
}
|
|
3976
3973
|
this.onFuncChange_(r.getValue());
|
|
3977
3974
|
},
|
|
3978
3975
|
onFuncChange_: function(e) {
|
|
3979
|
-
let t =
|
|
3976
|
+
let t = Sr(this.space.id, e);
|
|
3980
3977
|
if (!t) {
|
|
3981
3978
|
console.assert(!1);
|
|
3982
3979
|
return;
|
|
@@ -4032,13 +4029,13 @@ y.call_func_v1 = {
|
|
|
4032
4029
|
V(this, e);
|
|
4033
4030
|
},
|
|
4034
4031
|
checkWarning_: function() {
|
|
4035
|
-
let e =
|
|
4032
|
+
let e = Or(this.space.id);
|
|
4036
4033
|
if (!e) {
|
|
4037
4034
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4038
4035
|
return;
|
|
4039
4036
|
}
|
|
4040
4037
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4041
|
-
let t =
|
|
4038
|
+
let t = Sr(this.space.id, this.func.id);
|
|
4042
4039
|
if (!t) {
|
|
4043
4040
|
this.setWarningText(F("WARN_FUNC_NOT_FOUND"));
|
|
4044
4041
|
return;
|
|
@@ -4083,12 +4080,12 @@ ${c}${l}}
|
|
|
4083
4080
|
},
|
|
4084
4081
|
initData_: function() {
|
|
4085
4082
|
if (this.space.id) return;
|
|
4086
|
-
let e =
|
|
4083
|
+
let e = Dr("func")?.[0];
|
|
4087
4084
|
if (!e) return;
|
|
4088
4085
|
this.space.id = e.id, this.space.name = e.name;
|
|
4089
4086
|
let t = this.getField("SPACE");
|
|
4090
4087
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
4091
|
-
let n =
|
|
4088
|
+
let n = xr(this.space.id)?.[0];
|
|
4092
4089
|
if (!n) return;
|
|
4093
4090
|
this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
|
|
4094
4091
|
let r = this.getField("FUNC");
|
|
@@ -4106,10 +4103,10 @@ ${c}${l}}
|
|
|
4106
4103
|
}, 0);
|
|
4107
4104
|
},
|
|
4108
4105
|
genSpaceOpts_: function() {
|
|
4109
|
-
return
|
|
4106
|
+
return kr("func");
|
|
4110
4107
|
},
|
|
4111
4108
|
genFuncOpts_: function() {
|
|
4112
|
-
return
|
|
4109
|
+
return Cr(this.space.id);
|
|
4113
4110
|
},
|
|
4114
4111
|
onchange: function(e) {
|
|
4115
4112
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4120,7 +4117,7 @@ ${c}${l}}
|
|
|
4120
4117
|
}
|
|
4121
4118
|
},
|
|
4122
4119
|
onSpaceChange_: function(e) {
|
|
4123
|
-
let t =
|
|
4120
|
+
let t = Or(e);
|
|
4124
4121
|
if (!t) {
|
|
4125
4122
|
console.assert(!1);
|
|
4126
4123
|
return;
|
|
@@ -4129,13 +4126,13 @@ ${c}${l}}
|
|
|
4129
4126
|
this.space.id = t.id, this.space.name = t.name;
|
|
4130
4127
|
let r = this.getField("FUNC");
|
|
4131
4128
|
if (r.getOptions(!1), n) {
|
|
4132
|
-
let e =
|
|
4129
|
+
let e = xr(this.space.id)?.[0];
|
|
4133
4130
|
r.setValue(e?.id ?? "");
|
|
4134
4131
|
}
|
|
4135
4132
|
this.onFuncChange_(r.getValue());
|
|
4136
4133
|
},
|
|
4137
4134
|
onFuncChange_: function(e) {
|
|
4138
|
-
let t =
|
|
4135
|
+
let t = Sr(this.space.id, e);
|
|
4139
4136
|
if (!t) {
|
|
4140
4137
|
console.assert(!1);
|
|
4141
4138
|
return;
|
|
@@ -4191,13 +4188,13 @@ ${c}${l}}
|
|
|
4191
4188
|
V(this, e);
|
|
4192
4189
|
},
|
|
4193
4190
|
checkWarning_: function() {
|
|
4194
|
-
let e =
|
|
4191
|
+
let e = Or(this.space.id);
|
|
4195
4192
|
if (!e) {
|
|
4196
4193
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4197
4194
|
return;
|
|
4198
4195
|
}
|
|
4199
4196
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4200
|
-
let t =
|
|
4197
|
+
let t = Sr(this.space.id, this.func.id);
|
|
4201
4198
|
if (!t) {
|
|
4202
4199
|
this.setWarningText(F("WARN_FUNC_NOT_FOUND"));
|
|
4203
4200
|
return;
|
|
@@ -4237,7 +4234,7 @@ ${c}${l}}
|
|
|
4237
4234
|
},
|
|
4238
4235
|
initData_: function() {
|
|
4239
4236
|
if (this.func.id) return;
|
|
4240
|
-
let { id: e, inputs: t } =
|
|
4237
|
+
let { id: e, inputs: t } = wr();
|
|
4241
4238
|
this.func.id = e, this.func.inputs = t;
|
|
4242
4239
|
},
|
|
4243
4240
|
saveExtraState: function() {
|
|
@@ -4275,7 +4272,7 @@ ${c}${l}}
|
|
|
4275
4272
|
V(this, e);
|
|
4276
4273
|
},
|
|
4277
4274
|
checkWarning_: function() {
|
|
4278
|
-
let { id: e, inputs: t } =
|
|
4275
|
+
let { id: e, inputs: t } = wr();
|
|
4279
4276
|
if (this.func.id !== e && (this.func.id = e), !v(t, this.func.inputs)) {
|
|
4280
4277
|
this.setWarningText(F("WARN_FUNC_HAS_CHANGED"));
|
|
4281
4278
|
return;
|
|
@@ -4300,7 +4297,7 @@ ${n}}`;
|
|
|
4300
4297
|
},
|
|
4301
4298
|
initData_: function() {
|
|
4302
4299
|
if (this.output.id) return;
|
|
4303
|
-
let e =
|
|
4300
|
+
let e = wr().outputs?.[0];
|
|
4304
4301
|
e && (this.output.id = e.id, this.output.name = e.name, this.output.type = e.type);
|
|
4305
4302
|
},
|
|
4306
4303
|
saveExtraState: function() {
|
|
@@ -4312,7 +4309,7 @@ ${n}}`;
|
|
|
4312
4309
|
}, 0);
|
|
4313
4310
|
},
|
|
4314
4311
|
genOutputOpts_: function() {
|
|
4315
|
-
return
|
|
4312
|
+
return Er();
|
|
4316
4313
|
},
|
|
4317
4314
|
onchange: function(e) {
|
|
4318
4315
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4323,7 +4320,7 @@ ${n}}`;
|
|
|
4323
4320
|
}
|
|
4324
4321
|
},
|
|
4325
4322
|
onOutputChange_: function(e) {
|
|
4326
|
-
let t =
|
|
4323
|
+
let t = Tr(e);
|
|
4327
4324
|
if (!t) {
|
|
4328
4325
|
console.assert(!1);
|
|
4329
4326
|
return;
|
|
@@ -4344,7 +4341,7 @@ ${n}}`;
|
|
|
4344
4341
|
this.getInput("VALUE").setShadowDom(e);
|
|
4345
4342
|
},
|
|
4346
4343
|
checkWarning_: function() {
|
|
4347
|
-
let e =
|
|
4344
|
+
let e = Tr(this.output.id);
|
|
4348
4345
|
if (!e) {
|
|
4349
4346
|
this.setWarningText(F("WARN_FUNC_HAS_CHANGED"));
|
|
4350
4347
|
return;
|
|
@@ -4414,11 +4411,11 @@ function Y() {
|
|
|
4414
4411
|
t.tables.length > 0 && e.push(t);
|
|
4415
4412
|
}), e;
|
|
4416
4413
|
}
|
|
4417
|
-
function
|
|
4414
|
+
function Ar(e) {
|
|
4418
4415
|
let { spaces: t } = S.data;
|
|
4419
4416
|
return t.find((t) => t.id === e);
|
|
4420
4417
|
}
|
|
4421
|
-
function
|
|
4418
|
+
function jr() {
|
|
4422
4419
|
let e = [];
|
|
4423
4420
|
return Y().forEach(({ id: t, name: n }) => {
|
|
4424
4421
|
e.push([n, t]);
|
|
@@ -4430,37 +4427,37 @@ function X(e) {
|
|
|
4430
4427
|
let { spaces: t } = S.data, n = t.find((t) => t.id === e);
|
|
4431
4428
|
return n ? n.tables : [];
|
|
4432
4429
|
}
|
|
4433
|
-
function
|
|
4430
|
+
function Mr(e, t) {
|
|
4434
4431
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4435
4432
|
if (r) return r.tables.find((e) => e.id === t);
|
|
4436
4433
|
}
|
|
4437
|
-
function
|
|
4434
|
+
function Nr(e) {
|
|
4438
4435
|
let t = [];
|
|
4439
4436
|
return X(e).forEach(({ id: e, name: n }) => {
|
|
4440
4437
|
t.push([n, e]);
|
|
4441
4438
|
}), I(t);
|
|
4442
4439
|
}
|
|
4443
|
-
function
|
|
4440
|
+
function Pr(e, t) {
|
|
4444
4441
|
let { spaces: n } = S.data, r = n.find((t) => t.id === e);
|
|
4445
4442
|
if (!r) return [];
|
|
4446
4443
|
let i = r.tables.find((e) => e.id === t);
|
|
4447
4444
|
return i ? i.columns : [];
|
|
4448
4445
|
}
|
|
4449
|
-
function
|
|
4446
|
+
function Fr(e, t, n) {
|
|
4450
4447
|
let { spaces: r } = S.data, i = r.find((t) => t.id === e);
|
|
4451
4448
|
if (!i) return;
|
|
4452
4449
|
let a = i.tables.find((e) => e.id === t);
|
|
4453
4450
|
if (a) return a.columns.find((e) => e.id === n);
|
|
4454
4451
|
}
|
|
4455
|
-
function
|
|
4452
|
+
function Ir(e, t) {
|
|
4456
4453
|
let n = [];
|
|
4457
|
-
return
|
|
4454
|
+
return Pr(e, t).forEach(({ id: e, name: t }) => {
|
|
4458
4455
|
n.push([t, e]);
|
|
4459
4456
|
}), I(n);
|
|
4460
4457
|
}
|
|
4461
4458
|
//#endregion
|
|
4462
4459
|
//#region src/core/blocks/data/addData/v1/blocks.ts
|
|
4463
|
-
function
|
|
4460
|
+
function Lr(e) {
|
|
4464
4461
|
let t = e.getInput("TABLE").connection;
|
|
4465
4462
|
if (t.targetBlock()) return;
|
|
4466
4463
|
let n, r, i = Y()?.[0];
|
|
@@ -4492,7 +4489,7 @@ function Rr(e) {
|
|
|
4492
4489
|
}, o = l.blocks.append(a, e.workspace);
|
|
4493
4490
|
t.connect(o.outputConnection);
|
|
4494
4491
|
}
|
|
4495
|
-
function
|
|
4492
|
+
function Rr(e) {
|
|
4496
4493
|
let t = e.getInput("HANDLE").connection;
|
|
4497
4494
|
if (t.targetBlock()) return;
|
|
4498
4495
|
let n = l.blocks.append({
|
|
@@ -4527,7 +4524,7 @@ y.add_data_v1 = {
|
|
|
4527
4524
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
4528
4525
|
},
|
|
4529
4526
|
ensureBlocks_: function() {
|
|
4530
|
-
this.isInsertionMarker() || (
|
|
4527
|
+
this.isInsertionMarker() || (Lr(this), V(this, [
|
|
4531
4528
|
[
|
|
4532
4529
|
"SUCCESS",
|
|
4533
4530
|
"__success__",
|
|
@@ -4546,7 +4543,7 @@ y.add_data_v1 = {
|
|
|
4546
4543
|
"x-runtime-lib.data",
|
|
4547
4544
|
!0
|
|
4548
4545
|
]
|
|
4549
|
-
]),
|
|
4546
|
+
]), Rr(this));
|
|
4550
4547
|
}
|
|
4551
4548
|
}, g.forBlock.add_data_v1 = function(e) {
|
|
4552
4549
|
let t = g.INDENT;
|
|
@@ -4594,7 +4591,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4594
4591
|
let t = X(this.space.id)?.[0];
|
|
4595
4592
|
if (!t) return;
|
|
4596
4593
|
this.table.id = t.id, this.table.name = t.name;
|
|
4597
|
-
let n =
|
|
4594
|
+
let n = Pr(this.space.id, this.table.id)?.[0];
|
|
4598
4595
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
4599
4596
|
},
|
|
4600
4597
|
saveExtraState: function() {
|
|
@@ -4610,13 +4607,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4610
4607
|
}, 0);
|
|
4611
4608
|
},
|
|
4612
4609
|
genSpaceOpts_: function() {
|
|
4613
|
-
return
|
|
4610
|
+
return jr();
|
|
4614
4611
|
},
|
|
4615
4612
|
genTableOpts_: function() {
|
|
4616
|
-
return
|
|
4613
|
+
return Nr(this.space.id);
|
|
4617
4614
|
},
|
|
4618
4615
|
genColumnOpts_: function() {
|
|
4619
|
-
return
|
|
4616
|
+
return Ir(this.space.id, this.table.id);
|
|
4620
4617
|
},
|
|
4621
4618
|
onchange: function(e) {
|
|
4622
4619
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -4627,7 +4624,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4627
4624
|
}
|
|
4628
4625
|
},
|
|
4629
4626
|
onSpaceChange_: function(e) {
|
|
4630
|
-
let t =
|
|
4627
|
+
let t = Ar(e);
|
|
4631
4628
|
if (!t) {
|
|
4632
4629
|
console.assert(!1);
|
|
4633
4630
|
return;
|
|
@@ -4642,7 +4639,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4642
4639
|
this.onTableChange_(r.getValue());
|
|
4643
4640
|
},
|
|
4644
4641
|
onTableChange_: function(e) {
|
|
4645
|
-
let t =
|
|
4642
|
+
let t = Mr(this.space.id, e);
|
|
4646
4643
|
if (!t) {
|
|
4647
4644
|
console.assert(!1);
|
|
4648
4645
|
return;
|
|
@@ -4651,13 +4648,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4651
4648
|
this.table.id = t.id, this.table.name = t.name;
|
|
4652
4649
|
let r = this.getField("COLUMN");
|
|
4653
4650
|
if (r.getOptions(!1), n) {
|
|
4654
|
-
let e =
|
|
4651
|
+
let e = Pr(this.space.id, this.table.id)?.[0];
|
|
4655
4652
|
r.setValue(e?.id ?? "");
|
|
4656
4653
|
}
|
|
4657
4654
|
this.onColumnChange_(r.getValue());
|
|
4658
4655
|
},
|
|
4659
4656
|
onColumnChange_: function(e) {
|
|
4660
|
-
let t =
|
|
4657
|
+
let t = Fr(this.space.id, this.table.id, e);
|
|
4661
4658
|
if (!t) {
|
|
4662
4659
|
console.assert(!1);
|
|
4663
4660
|
return;
|
|
@@ -4677,27 +4674,27 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4677
4674
|
let t = this.getInput("VALUE").connection, n = t.targetBlock();
|
|
4678
4675
|
if (e) n && n.dispose();
|
|
4679
4676
|
else if (n) return;
|
|
4680
|
-
let r =
|
|
4677
|
+
let r = Kt(this.workspace, this.column.type);
|
|
4681
4678
|
r && (t.setCheck(null), t.connect(r.outputConnection));
|
|
4682
4679
|
},
|
|
4683
4680
|
updateCheck_: function() {
|
|
4684
|
-
let e =
|
|
4681
|
+
let e = on(this.column.type);
|
|
4685
4682
|
this.getInput("VALUE").connection.setCheck(e);
|
|
4686
4683
|
},
|
|
4687
4684
|
checkWarning_: function() {
|
|
4688
|
-
let e =
|
|
4685
|
+
let e = Ar(this.space.id);
|
|
4689
4686
|
if (!e) {
|
|
4690
4687
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
4691
4688
|
return;
|
|
4692
4689
|
}
|
|
4693
4690
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
4694
|
-
let t =
|
|
4691
|
+
let t = Mr(this.space.id, this.table.id);
|
|
4695
4692
|
if (!t) {
|
|
4696
4693
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
4697
4694
|
return;
|
|
4698
4695
|
}
|
|
4699
4696
|
t.name !== this.table.name && (this.table.name = t.name);
|
|
4700
|
-
let n =
|
|
4697
|
+
let n = Fr(this.space.id, this.table.id, this.column.id);
|
|
4701
4698
|
if (!n) {
|
|
4702
4699
|
this.setWarningText(F("WARN_COLUMN_NOT_FOUND"));
|
|
4703
4700
|
return;
|
|
@@ -4783,7 +4780,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4783
4780
|
};
|
|
4784
4781
|
//#endregion
|
|
4785
4782
|
//#region src/core/blocks/data/deleteData/v1/blocks.ts
|
|
4786
|
-
function
|
|
4783
|
+
function zr(e) {
|
|
4787
4784
|
let t = e.getInput("TABLE").connection;
|
|
4788
4785
|
if (t.targetBlock()) return;
|
|
4789
4786
|
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = {
|
|
@@ -4801,10 +4798,10 @@ function Br(e) {
|
|
|
4801
4798
|
}, a = l.blocks.append(i, e.workspace);
|
|
4802
4799
|
t.connect(a.outputConnection);
|
|
4803
4800
|
}
|
|
4804
|
-
function
|
|
4801
|
+
function Br(e) {
|
|
4805
4802
|
let t = e.getInput("CONDITION").connection;
|
|
4806
4803
|
if (t.targetBlock()) return;
|
|
4807
|
-
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i =
|
|
4804
|
+
let n = Y()?.[0], r = X(n?.id ?? "")?.[0], i = Pr(n?.id, r?.id)?.[0], a = {
|
|
4808
4805
|
type: "cond_atomic_v1",
|
|
4809
4806
|
extraState: {
|
|
4810
4807
|
space: {
|
|
@@ -4825,7 +4822,7 @@ function Vr(e) {
|
|
|
4825
4822
|
}, o = l.blocks.append(a, e.workspace);
|
|
4826
4823
|
t.connect(o.outputConnection);
|
|
4827
4824
|
}
|
|
4828
|
-
function
|
|
4825
|
+
function Vr(e) {
|
|
4829
4826
|
let t = e.getInput("HANDLE").connection;
|
|
4830
4827
|
if (t.targetBlock()) return;
|
|
4831
4828
|
let n = l.blocks.append({
|
|
@@ -4860,7 +4857,7 @@ y.delete_data_v1 = {
|
|
|
4860
4857
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
4861
4858
|
},
|
|
4862
4859
|
ensureBlocks_: function() {
|
|
4863
|
-
this.isInsertionMarker() || (
|
|
4860
|
+
this.isInsertionMarker() || (zr(this), Br(this), V(this, [[
|
|
4864
4861
|
"SUCCESS",
|
|
4865
4862
|
"__success__",
|
|
4866
4863
|
"x-runtime-lib.success",
|
|
@@ -4870,7 +4867,7 @@ y.delete_data_v1 = {
|
|
|
4870
4867
|
"__message__",
|
|
4871
4868
|
"x-runtime-lib.message",
|
|
4872
4869
|
!0
|
|
4873
|
-
]]),
|
|
4870
|
+
]]), Vr(this));
|
|
4874
4871
|
}
|
|
4875
4872
|
}, g.forBlock.delete_data_v1 = function(e) {
|
|
4876
4873
|
let t = g.INDENT;
|
|
@@ -4904,7 +4901,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
4904
4901
|
};
|
|
4905
4902
|
//#endregion
|
|
4906
4903
|
//#region src/core/blocks/data/queryData/v1/blocks.ts
|
|
4907
|
-
function
|
|
4904
|
+
function Hr(e) {
|
|
4908
4905
|
let t = e.getInput("TABLE").connection;
|
|
4909
4906
|
if (t.targetBlock()) return;
|
|
4910
4907
|
let n, r, i = Y()?.[0];
|
|
@@ -4936,13 +4933,13 @@ function Ur(e) {
|
|
|
4936
4933
|
}, o = l.blocks.append(a, e.workspace);
|
|
4937
4934
|
t.connect(o.outputConnection);
|
|
4938
4935
|
}
|
|
4939
|
-
function
|
|
4936
|
+
function Ur(e) {
|
|
4940
4937
|
let t = e.getInput("CONDITION").connection;
|
|
4941
4938
|
if (t.targetBlock()) return;
|
|
4942
4939
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
4943
4940
|
t.connect(n.outputConnection);
|
|
4944
4941
|
}
|
|
4945
|
-
function
|
|
4942
|
+
function Wr(e) {
|
|
4946
4943
|
let t = e.getInput("EXTRA").connection;
|
|
4947
4944
|
if (t.targetBlock()) return;
|
|
4948
4945
|
let n = l.blocks.append({
|
|
@@ -4964,7 +4961,7 @@ function Gr(e) {
|
|
|
4964
4961
|
}, e.workspace);
|
|
4965
4962
|
t.connect(n.outputConnection);
|
|
4966
4963
|
}
|
|
4967
|
-
function
|
|
4964
|
+
function Gr(e) {
|
|
4968
4965
|
let t = e.getInput("HANDLE").connection;
|
|
4969
4966
|
if (t.targetBlock()) return;
|
|
4970
4967
|
let n = l.blocks.append({
|
|
@@ -5008,7 +5005,7 @@ t([{
|
|
|
5008
5005
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5009
5006
|
},
|
|
5010
5007
|
ensureBlocks_: function() {
|
|
5011
|
-
this.isInsertionMarker() || (
|
|
5008
|
+
this.isInsertionMarker() || (Hr(this), Ur(this), Wr(this), V(this, [
|
|
5012
5009
|
[
|
|
5013
5010
|
"SUCCESS",
|
|
5014
5011
|
"__success__",
|
|
@@ -5033,7 +5030,7 @@ t([{
|
|
|
5033
5030
|
"x-runtime-lib.extraData",
|
|
5034
5031
|
!0
|
|
5035
5032
|
]
|
|
5036
|
-
]),
|
|
5033
|
+
]), Gr(this));
|
|
5037
5034
|
}
|
|
5038
5035
|
}, g.forBlock.query_data_v1 = function(e) {
|
|
5039
5036
|
let t = g.INDENT;
|
|
@@ -5131,10 +5128,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5131
5128
|
}, 0);
|
|
5132
5129
|
},
|
|
5133
5130
|
genSpaceOpts_: function() {
|
|
5134
|
-
return
|
|
5131
|
+
return jr();
|
|
5135
5132
|
},
|
|
5136
5133
|
genTableOpts_: function() {
|
|
5137
|
-
return
|
|
5134
|
+
return Nr(this.space.id);
|
|
5138
5135
|
},
|
|
5139
5136
|
genColumnOpts_: function() {
|
|
5140
5137
|
let e = [];
|
|
@@ -5161,7 +5158,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5161
5158
|
}
|
|
5162
5159
|
},
|
|
5163
5160
|
onSpaceChange_: function(e) {
|
|
5164
|
-
let t =
|
|
5161
|
+
let t = Ar(e);
|
|
5165
5162
|
if (!t) {
|
|
5166
5163
|
console.assert(!1);
|
|
5167
5164
|
return;
|
|
@@ -5176,7 +5173,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5176
5173
|
this.onTableChange_(r.getValue());
|
|
5177
5174
|
},
|
|
5178
5175
|
onTableChange_: function(e) {
|
|
5179
|
-
let t =
|
|
5176
|
+
let t = Mr(this.space.id, e);
|
|
5180
5177
|
if (!t) {
|
|
5181
5178
|
console.assert(!1);
|
|
5182
5179
|
return;
|
|
@@ -5250,13 +5247,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5250
5247
|
}
|
|
5251
5248
|
},
|
|
5252
5249
|
checkWarning_: function() {
|
|
5253
|
-
let e =
|
|
5250
|
+
let e = Ar(this.space.id);
|
|
5254
5251
|
if (!e) {
|
|
5255
5252
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5256
5253
|
return;
|
|
5257
5254
|
}
|
|
5258
5255
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5259
|
-
let t =
|
|
5256
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5260
5257
|
if (!t) {
|
|
5261
5258
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5262
5259
|
return;
|
|
@@ -5313,10 +5310,10 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5313
5310
|
this.space.id = e.space?.id ?? "", this.space.name = e.space?.name ?? "", this.table.id = e.table?.id ?? "", this.table.name = e.table?.name ?? "", this.checkWarning_();
|
|
5314
5311
|
},
|
|
5315
5312
|
genSpaceOpts_: function() {
|
|
5316
|
-
return
|
|
5313
|
+
return jr();
|
|
5317
5314
|
},
|
|
5318
5315
|
genTableOpts_: function() {
|
|
5319
|
-
return
|
|
5316
|
+
return Nr(this.space.id);
|
|
5320
5317
|
},
|
|
5321
5318
|
onchange: function(e) {
|
|
5322
5319
|
if (e.type === x.BLOCK_CHANGE) {
|
|
@@ -5327,7 +5324,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5327
5324
|
}
|
|
5328
5325
|
},
|
|
5329
5326
|
onSpaceChange_: function(e) {
|
|
5330
|
-
let t =
|
|
5327
|
+
let t = Ar(e);
|
|
5331
5328
|
if (!t) {
|
|
5332
5329
|
console.assert(!1);
|
|
5333
5330
|
return;
|
|
@@ -5342,7 +5339,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5342
5339
|
this.onTableChange_(r.getValue());
|
|
5343
5340
|
},
|
|
5344
5341
|
onTableChange_: function(e) {
|
|
5345
|
-
let t =
|
|
5342
|
+
let t = Mr(this.space.id, e);
|
|
5346
5343
|
if (!t) {
|
|
5347
5344
|
console.assert(!1);
|
|
5348
5345
|
return;
|
|
@@ -5350,13 +5347,13 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5350
5347
|
this.table.id = t.id, this.table.name = t.name;
|
|
5351
5348
|
},
|
|
5352
5349
|
checkWarning_: function() {
|
|
5353
|
-
let e =
|
|
5350
|
+
let e = Ar(this.space.id);
|
|
5354
5351
|
if (!e) {
|
|
5355
5352
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5356
5353
|
return;
|
|
5357
5354
|
}
|
|
5358
5355
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5359
|
-
let t =
|
|
5356
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5360
5357
|
if (!t) {
|
|
5361
5358
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5362
5359
|
return;
|
|
@@ -5395,7 +5392,7 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5395
5392
|
]]);
|
|
5396
5393
|
}
|
|
5397
5394
|
}, g.forBlock.transaction_v1 = function(e) {
|
|
5398
|
-
let t = g.INDENT, n = e, r =
|
|
5395
|
+
let t = g.INDENT, n = e, r = Zt(n), i = g.statementToCode(n, "HANDLE"), a = g.statementToCode(n, "FINALLY");
|
|
5399
5396
|
return `{
|
|
5400
5397
|
${t}var __error${r}__ = '';
|
|
5401
5398
|
${t}var __txExist${r}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -5477,10 +5474,10 @@ ${t}}
|
|
|
5477
5474
|
}, 0);
|
|
5478
5475
|
},
|
|
5479
5476
|
genSpaceOpts_: function() {
|
|
5480
|
-
return
|
|
5477
|
+
return jr();
|
|
5481
5478
|
},
|
|
5482
5479
|
genTableOpts_: function() {
|
|
5483
|
-
return
|
|
5480
|
+
return Nr(this.space.id);
|
|
5484
5481
|
},
|
|
5485
5482
|
genColumnOpts_: function() {
|
|
5486
5483
|
let e = [];
|
|
@@ -5507,7 +5504,7 @@ ${t}}
|
|
|
5507
5504
|
}
|
|
5508
5505
|
},
|
|
5509
5506
|
onSpaceChange_: function(e) {
|
|
5510
|
-
let t =
|
|
5507
|
+
let t = Ar(e);
|
|
5511
5508
|
if (!t) {
|
|
5512
5509
|
console.assert(!1);
|
|
5513
5510
|
return;
|
|
@@ -5522,7 +5519,7 @@ ${t}}
|
|
|
5522
5519
|
this.onTableChange_(r.getValue());
|
|
5523
5520
|
},
|
|
5524
5521
|
onTableChange_: function(e) {
|
|
5525
|
-
let t =
|
|
5522
|
+
let t = Mr(this.space.id, e);
|
|
5526
5523
|
if (!t) {
|
|
5527
5524
|
console.assert(!1);
|
|
5528
5525
|
return;
|
|
@@ -5544,7 +5541,7 @@ ${t}}
|
|
|
5544
5541
|
}
|
|
5545
5542
|
let r = this.getInput("ADD" + e).connection, i = r.targetBlock();
|
|
5546
5543
|
i && i.dispose();
|
|
5547
|
-
let a =
|
|
5544
|
+
let a = Kt(this.workspace, n.type);
|
|
5548
5545
|
a && (r.setCheck(null), r.connect(a.outputConnection)), this.updateCheck_();
|
|
5549
5546
|
},
|
|
5550
5547
|
decompose: function(e) {
|
|
@@ -5615,7 +5612,7 @@ ${t}}
|
|
|
5615
5612
|
let a = this.getFieldValue("COLUMN" + t), o = this.table.columns.find((e) => e.id === a);
|
|
5616
5613
|
if (!o) continue;
|
|
5617
5614
|
n.setCheck(null);
|
|
5618
|
-
let s =
|
|
5615
|
+
let s = Kt(this.workspace, o.type);
|
|
5619
5616
|
s && r.connect(s.outputConnection);
|
|
5620
5617
|
}
|
|
5621
5618
|
},
|
|
@@ -5623,18 +5620,18 @@ ${t}}
|
|
|
5623
5620
|
for (let e = 0; e < this.itemCount_; e++) {
|
|
5624
5621
|
let t = this.getFieldValue("COLUMN" + e), n = this.table.columns.find((e) => e.id === t);
|
|
5625
5622
|
if (!n) continue;
|
|
5626
|
-
let r =
|
|
5623
|
+
let r = on(n.type);
|
|
5627
5624
|
this.getInput("ADD" + e).setCheck(r);
|
|
5628
5625
|
}
|
|
5629
5626
|
},
|
|
5630
5627
|
checkWarning_: function() {
|
|
5631
|
-
let e =
|
|
5628
|
+
let e = Ar(this.space.id);
|
|
5632
5629
|
if (!e) {
|
|
5633
5630
|
this.setWarningText(F("WARN_SPACE_NOT_FOUND"));
|
|
5634
5631
|
return;
|
|
5635
5632
|
}
|
|
5636
5633
|
e.name !== this.space.name && (this.space.name = e.name);
|
|
5637
|
-
let t =
|
|
5634
|
+
let t = Mr(this.space.id, this.table.id);
|
|
5638
5635
|
if (!t) {
|
|
5639
5636
|
this.setWarningText(F("WARN_TABLE_NOT_FOUND"));
|
|
5640
5637
|
return;
|
|
@@ -5661,7 +5658,7 @@ ${t}}
|
|
|
5661
5658
|
};
|
|
5662
5659
|
//#endregion
|
|
5663
5660
|
//#region src/core/blocks/data/updateData/v1/blocks.ts
|
|
5664
|
-
function
|
|
5661
|
+
function Kr(e) {
|
|
5665
5662
|
let t = e.getInput("TABLE").connection;
|
|
5666
5663
|
if (t.targetBlock()) return;
|
|
5667
5664
|
let n, r, i = Y()?.[0];
|
|
@@ -5693,13 +5690,13 @@ function qr(e) {
|
|
|
5693
5690
|
}, o = l.blocks.append(a, e.workspace);
|
|
5694
5691
|
t.connect(o.outputConnection);
|
|
5695
5692
|
}
|
|
5696
|
-
function
|
|
5693
|
+
function qr(e) {
|
|
5697
5694
|
let t = e.getInput("CONDITION").connection;
|
|
5698
5695
|
if (t.targetBlock()) return;
|
|
5699
5696
|
let n = l.blocks.append({ type: "cond_atomic_v1" }, e.workspace);
|
|
5700
5697
|
t.connect(n.outputConnection);
|
|
5701
5698
|
}
|
|
5702
|
-
function
|
|
5699
|
+
function Jr(e) {
|
|
5703
5700
|
let t = e.getInput("HANDLE").connection;
|
|
5704
5701
|
if (t.targetBlock()) return;
|
|
5705
5702
|
let n = l.blocks.append({
|
|
@@ -5734,7 +5731,7 @@ y.update_data_v1 = {
|
|
|
5734
5731
|
this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(u.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5735
5732
|
},
|
|
5736
5733
|
ensureBlocks: function() {
|
|
5737
|
-
this.isInsertionMarker() || (
|
|
5734
|
+
this.isInsertionMarker() || (Kr(this), qr(this), V(this, [
|
|
5738
5735
|
[
|
|
5739
5736
|
"SUCCESS",
|
|
5740
5737
|
"__success__",
|
|
@@ -5753,7 +5750,7 @@ y.update_data_v1 = {
|
|
|
5753
5750
|
"x-runtime-lib.data",
|
|
5754
5751
|
!0
|
|
5755
5752
|
]
|
|
5756
|
-
]),
|
|
5753
|
+
]), Jr(this));
|
|
5757
5754
|
}
|
|
5758
5755
|
}, g.forBlock.update_data_v1 = function(e) {
|
|
5759
5756
|
let t = g.INDENT;
|
|
@@ -5773,15 +5770,15 @@ ${g.statementToCode(e, "HANDLE")}}
|
|
|
5773
5770
|
};
|
|
5774
5771
|
//#endregion
|
|
5775
5772
|
//#region src/core/blocks/json/jsonArray/v1/index.ts
|
|
5776
|
-
var
|
|
5773
|
+
var Yr = p.xml;
|
|
5777
5774
|
y.json_array_v1 = {
|
|
5778
5775
|
init: function() {
|
|
5779
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5776
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(qt, 20, 20, void 0, () => {
|
|
5780
5777
|
this.isInFlyout || this.addEntry_();
|
|
5781
5778
|
})), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
5782
5779
|
},
|
|
5783
5780
|
mutationToDom: function() {
|
|
5784
|
-
let e =
|
|
5781
|
+
let e = Yr.createElement("mutation");
|
|
5785
5782
|
return e.setAttribute("items", String(this.length)), e;
|
|
5786
5783
|
},
|
|
5787
5784
|
domToMutation: function(e) {
|
|
@@ -5793,9 +5790,9 @@ y.json_array_v1 = {
|
|
|
5793
5790
|
initShape_: function() {
|
|
5794
5791
|
for (let e = 0; e < this.length; e++) {
|
|
5795
5792
|
let t = "ENTRY" + e, n = this.appendValueInput(t);
|
|
5796
|
-
n.appendField(new h(
|
|
5793
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5797
5794
|
this.isInFlyout || this.addEntry_(n);
|
|
5798
|
-
})), n.appendField(new i(String(e))), n.appendField(new h(
|
|
5795
|
+
})), n.appendField(new i(String(e))), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5799
5796
|
this.isInFlyout || this.removeEntry_(n);
|
|
5800
5797
|
})), this.moveInputBefore(t, "ADD");
|
|
5801
5798
|
}
|
|
@@ -5808,9 +5805,9 @@ y.json_array_v1 = {
|
|
|
5808
5805
|
t.name = "ENTRY" + (e + 1), t.fieldRow[1].setValue(e + 1);
|
|
5809
5806
|
}
|
|
5810
5807
|
let n = this.appendValueInput("ENTRY" + t);
|
|
5811
|
-
n.appendField(new h(
|
|
5808
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5812
5809
|
this.isInFlyout || this.addEntry_(n);
|
|
5813
|
-
})), n.appendField(new i(String(t))), n.appendField(new h(
|
|
5810
|
+
})), n.appendField(new i(String(t))), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5814
5811
|
this.isInFlyout || this.removeEntry_(n);
|
|
5815
5812
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
5816
5813
|
},
|
|
@@ -5829,17 +5826,17 @@ y.json_array_v1 = {
|
|
|
5829
5826
|
} };
|
|
5830
5827
|
//#endregion
|
|
5831
5828
|
//#region src/core/blocks/json/jsonMap/v1/index.ts
|
|
5832
|
-
var
|
|
5829
|
+
var Xr = p.xml;
|
|
5833
5830
|
y.json_map_v1 = {
|
|
5834
5831
|
init: function() {
|
|
5835
|
-
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(
|
|
5832
|
+
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(u.Align.CENTRE).appendField(new h(qt, 20, 20, void 0, () => {
|
|
5836
5833
|
this.isInFlyout || this.addEntry_();
|
|
5837
5834
|
})), this.appendDummyInput("CLOSE_BRACHET").appendField(" } "), this.setInputsInline(!1), this.setOutput(!0, "JsonMap"), this.setColour(120), this.setTooltip(""), this.setHelpUrl("");
|
|
5838
5835
|
},
|
|
5839
5836
|
mutationToDom: function() {
|
|
5840
|
-
let e =
|
|
5837
|
+
let e = Xr.createElement("mutation");
|
|
5841
5838
|
for (let t = 0; t < this.length; t++) {
|
|
5842
|
-
let n =
|
|
5839
|
+
let n = Xr.createElement("item");
|
|
5843
5840
|
n.setAttribute("key", this.getFieldValue("KEY" + t)), e.appendChild(n);
|
|
5844
5841
|
}
|
|
5845
5842
|
return e;
|
|
@@ -5858,9 +5855,9 @@ y.json_map_v1 = {
|
|
|
5858
5855
|
initShape_: function(e) {
|
|
5859
5856
|
for (let t = 0; t < e.length; t++) {
|
|
5860
5857
|
let n = e[t], r = "ENTRY" + t, i = this.appendValueInput(r);
|
|
5861
|
-
i.appendField(new h(
|
|
5858
|
+
i.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5862
5859
|
this.isInFlyout || this.addEntry_(i);
|
|
5863
|
-
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(
|
|
5860
|
+
})), i.appendField(new f(n), "KEY" + t), i.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5864
5861
|
this.isInFlyout || this.removeEntry_(i);
|
|
5865
5862
|
})), this.moveInputBefore(r, "ADD");
|
|
5866
5863
|
}
|
|
@@ -5870,9 +5867,9 @@ y.json_map_v1 = {
|
|
|
5870
5867
|
e && (t = me(e.name.substring(5)));
|
|
5871
5868
|
for (let e = this.length - 1; e >= t; e--) this.getField("KEY" + e).name = "KEY" + (e + 1), this.getInput("ENTRY" + e).name = "ENTRY" + (e + 1);
|
|
5872
5869
|
let n = this.appendValueInput("ENTRY" + t);
|
|
5873
|
-
n.appendField(new h(
|
|
5870
|
+
n.appendField(new h(qt, 20, 20, void 0, () => {
|
|
5874
5871
|
this.isInFlyout || this.addEntry_(n);
|
|
5875
|
-
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(
|
|
5872
|
+
})), n.appendField(new f("key"), "KEY" + t), n.appendField(new h(Jt, 20, 20, void 0, () => {
|
|
5876
5873
|
this.isInFlyout || this.removeEntry_(n);
|
|
5877
5874
|
})), t === this.length ? this.moveInputBefore("ENTRY" + t, "ADD") : this.moveInputBefore("ENTRY" + t, "ENTRY" + (t + 1)), this.length++;
|
|
5878
5875
|
},
|
|
@@ -5892,7 +5889,7 @@ y.json_map_v1 = {
|
|
|
5892
5889
|
} };
|
|
5893
5890
|
//#endregion
|
|
5894
5891
|
//#region src/core/blocks/list/listCreate/v1/index.ts
|
|
5895
|
-
var
|
|
5892
|
+
var Zr = p.xml;
|
|
5896
5893
|
y.list_create_container_v1 = { init: function() {
|
|
5897
5894
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
5898
5895
|
} }, y.list_create_item_v1 = { init: function() {
|
|
@@ -5902,7 +5899,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
5902
5899
|
this.itemCount_ = 0, this.setMutator(new oe.MutatorIcon(["list_create_item_v1"], this)), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
5903
5900
|
},
|
|
5904
5901
|
mutationToDom: function() {
|
|
5905
|
-
let e =
|
|
5902
|
+
let e = Zr.createElement("mutation");
|
|
5906
5903
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
5907
5904
|
},
|
|
5908
5905
|
domToMutation: function(e) {
|
|
@@ -6149,7 +6146,7 @@ y.list_create_container_v1 = { init: function() {
|
|
|
6149
6146
|
};
|
|
6150
6147
|
//#endregion
|
|
6151
6148
|
//#region src/core/blocks/logic/logicCompare/v1/index.ts
|
|
6152
|
-
var
|
|
6149
|
+
var Qr = { onchange: function(e) {
|
|
6153
6150
|
this.prevBlocks_ ||= [null, null];
|
|
6154
6151
|
let t = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
6155
6152
|
if (t && n && !this.workspace.connectionChecker.doTypeChecks(t.outputConnection, n.outputConnection)) {
|
|
@@ -6164,7 +6161,7 @@ var $r = { onchange: function(e) {
|
|
|
6164
6161
|
//#endregion
|
|
6165
6162
|
//#region src/core/blocks/loop/flowControl/v1/extensions.ts
|
|
6166
6163
|
m.register("logic_compare_v1", function() {
|
|
6167
|
-
this.mixin(
|
|
6164
|
+
this.mixin(Qr);
|
|
6168
6165
|
}), t([{
|
|
6169
6166
|
type: "logic_compare_v1",
|
|
6170
6167
|
message0: "%1 %2 %3",
|
|
@@ -6458,7 +6455,7 @@ m.register("logic_compare_v1", function() {
|
|
|
6458
6455
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
6459
6456
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
6460
6457
|
}));
|
|
6461
|
-
var
|
|
6458
|
+
var $r = new Set([
|
|
6462
6459
|
"repeat_v1",
|
|
6463
6460
|
"for_each_v1",
|
|
6464
6461
|
"for_v1",
|
|
@@ -6468,7 +6465,7 @@ m.registerMixin("flow_control_in_loop_check_v1", {
|
|
|
6468
6465
|
getSurroundLoop: function() {
|
|
6469
6466
|
let e = this;
|
|
6470
6467
|
do {
|
|
6471
|
-
if (
|
|
6468
|
+
if ($r.has(e.type)) return e;
|
|
6472
6469
|
e = e?.getSurroundParent();
|
|
6473
6470
|
} while (e);
|
|
6474
6471
|
return null;
|
|
@@ -7192,7 +7189,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
|
|
|
7192
7189
|
};
|
|
7193
7190
|
//#endregion
|
|
7194
7191
|
//#region src/core/blocks/object/objectCreate/v1/index.ts
|
|
7195
|
-
var
|
|
7192
|
+
var ei = p.xml;
|
|
7196
7193
|
y.object_create_container_v1 = { init: function() {
|
|
7197
7194
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
7198
7195
|
} }, y.object_create_item_v1 = { init: function() {
|
|
@@ -7202,7 +7199,7 @@ y.object_create_container_v1 = { init: function() {
|
|
|
7202
7199
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(new oe.MutatorIcon(["object_create_item_v1"], this)), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
7203
7200
|
},
|
|
7204
7201
|
mutationToDom: function() {
|
|
7205
|
-
let e =
|
|
7202
|
+
let e = ei.createElement("mutation");
|
|
7206
7203
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
7207
7204
|
},
|
|
7208
7205
|
domToMutation: function(e) {
|
|
@@ -7459,7 +7456,7 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
7459
7456
|
};
|
|
7460
7457
|
//#endregion
|
|
7461
7458
|
//#region src/core/blocks/procedure/procedureDef/v1/index.ts
|
|
7462
|
-
var
|
|
7459
|
+
var ti = p.xml;
|
|
7463
7460
|
y.procedure_def_container_v1 = { init: function() {
|
|
7464
7461
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new n(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
7465
7462
|
} }, y.procedure_def_item_v1 = {
|
|
@@ -7487,9 +7484,9 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7487
7484
|
e.setValidator(_e.rename), e.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(e, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(new oe.MutatorIcon(["procedure_def_item_v1"], this)), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_DEF_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_DEF_HELPURL}");
|
|
7488
7485
|
},
|
|
7489
7486
|
mutationToDom: function() {
|
|
7490
|
-
let e =
|
|
7487
|
+
let e = ti.createElement("mutation");
|
|
7491
7488
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), this.args.forEach((t) => {
|
|
7492
|
-
let n =
|
|
7489
|
+
let n = ti.createElement("arg");
|
|
7493
7490
|
n.setAttribute("name", t.name), n.setAttribute("id", t.id), e.appendChild(n);
|
|
7494
7491
|
}), e;
|
|
7495
7492
|
},
|
|
@@ -7566,7 +7563,7 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7566
7563
|
let t = this.args[e], n = this.getInput("ARG" + e).connection, r = n.targetBlock();
|
|
7567
7564
|
if (r) r.setKeyName(`__param@${t.id}__`, t.name, !1);
|
|
7568
7565
|
else try {
|
|
7569
|
-
x.disable(), r =
|
|
7566
|
+
x.disable(), r = dn(this.workspace, `__param@${t.id}__`, t.name, !1), r.outputConnection.connect(n);
|
|
7570
7567
|
} finally {
|
|
7571
7568
|
x.enable();
|
|
7572
7569
|
}
|
|
@@ -7575,13 +7572,13 @@ y.procedure_def_container_v1 = { init: function() {
|
|
|
7575
7572
|
};
|
|
7576
7573
|
//#endregion
|
|
7577
7574
|
//#region src/core/blocks/procedure/procedureReturn/v1/index.ts
|
|
7578
|
-
var
|
|
7575
|
+
var ni = p.xml;
|
|
7579
7576
|
y.procedure_return_v1 = {
|
|
7580
7577
|
init: function() {
|
|
7581
7578
|
this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
|
|
7582
7579
|
},
|
|
7583
7580
|
mutationToDom: function() {
|
|
7584
|
-
let e =
|
|
7581
|
+
let e = ni.createElement("mutation");
|
|
7585
7582
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
|
|
7586
7583
|
},
|
|
7587
7584
|
domToMutation: function(e) {
|
|
@@ -7677,7 +7674,7 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7677
7674
|
};
|
|
7678
7675
|
//#endregion
|
|
7679
7676
|
//#region src/core/utils/resource/dir.ts
|
|
7680
|
-
function
|
|
7677
|
+
function ri(e) {
|
|
7681
7678
|
let t = S.resource.spaces.find((t) => t.id === e);
|
|
7682
7679
|
if (!t) return [];
|
|
7683
7680
|
let n = [];
|
|
@@ -7692,15 +7689,15 @@ function ii(e) {
|
|
|
7692
7689
|
}
|
|
7693
7690
|
return r(t.dirTree, ""), n;
|
|
7694
7691
|
}
|
|
7695
|
-
function
|
|
7692
|
+
function ii(e) {
|
|
7696
7693
|
let t = [];
|
|
7697
|
-
return
|
|
7694
|
+
return ri(e).forEach(({ id: e, name: n }) => {
|
|
7698
7695
|
t.push([n, e]);
|
|
7699
7696
|
}), I(t);
|
|
7700
7697
|
}
|
|
7701
7698
|
//#endregion
|
|
7702
7699
|
//#region src/core/utils/resource/resource.ts
|
|
7703
|
-
function
|
|
7700
|
+
function ai(e, t) {
|
|
7704
7701
|
let n = S.resource.spaces.find((t) => t.id === e);
|
|
7705
7702
|
if (!n) return [];
|
|
7706
7703
|
let r = [];
|
|
@@ -7708,23 +7705,23 @@ function oi(e, t) {
|
|
|
7708
7705
|
e.dirid === t && r.push(e);
|
|
7709
7706
|
}), r;
|
|
7710
7707
|
}
|
|
7711
|
-
function
|
|
7708
|
+
function oi(e, t) {
|
|
7712
7709
|
let n = [];
|
|
7713
|
-
return
|
|
7710
|
+
return ai(e, t).forEach(({ id: e, name: t }) => {
|
|
7714
7711
|
n.push([t, e]);
|
|
7715
7712
|
}), I(n);
|
|
7716
7713
|
}
|
|
7717
7714
|
//#endregion
|
|
7718
7715
|
//#region src/core/utils/resource/space.ts
|
|
7719
|
-
function
|
|
7716
|
+
function si() {
|
|
7720
7717
|
let e = [];
|
|
7721
7718
|
return S.resource.spaces.forEach((t) => {
|
|
7722
7719
|
t.resources.length > 0 && e.push(t);
|
|
7723
7720
|
}), e;
|
|
7724
7721
|
}
|
|
7725
|
-
function
|
|
7722
|
+
function ci() {
|
|
7726
7723
|
let e = [];
|
|
7727
|
-
return
|
|
7724
|
+
return si().forEach(({ id: t, name: n }) => {
|
|
7728
7725
|
e.push([n, t]);
|
|
7729
7726
|
}), I(e);
|
|
7730
7727
|
}
|
|
@@ -7743,17 +7740,17 @@ y.select_resource_v1 = {
|
|
|
7743
7740
|
},
|
|
7744
7741
|
initData_: function() {
|
|
7745
7742
|
if (this.space.id) return;
|
|
7746
|
-
let e =
|
|
7743
|
+
let e = si()?.[0];
|
|
7747
7744
|
if (!e) return;
|
|
7748
7745
|
this.space.id = e.id, this.space.name = e.name;
|
|
7749
7746
|
let t = this.getField("SPACE");
|
|
7750
7747
|
t.getOptions(!1), t.setValue(this.space.id);
|
|
7751
|
-
let n =
|
|
7748
|
+
let n = ri(this.space.id)?.[0];
|
|
7752
7749
|
if (!n) return;
|
|
7753
7750
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
7754
7751
|
let r = this.getField("DIR");
|
|
7755
7752
|
r.getOptions(!1), r.setValue(this.dir.id);
|
|
7756
|
-
let i =
|
|
7753
|
+
let i = ai(this.space.id, this.dir.id)?.[0];
|
|
7757
7754
|
if (!i) return;
|
|
7758
7755
|
this.resource.id = i.id, this.resource.name = i.name;
|
|
7759
7756
|
let a = this.getField("RESOURCE");
|
|
@@ -7770,13 +7767,13 @@ y.select_resource_v1 = {
|
|
|
7770
7767
|
this.space = he(e.space), this.dir = he(e.dir), this.resource = he(e.resource);
|
|
7771
7768
|
},
|
|
7772
7769
|
genSpaceOpts_: function() {
|
|
7773
|
-
return
|
|
7770
|
+
return ci();
|
|
7774
7771
|
},
|
|
7775
7772
|
genDirOpts_: function() {
|
|
7776
|
-
return
|
|
7773
|
+
return ii(this.space.id);
|
|
7777
7774
|
},
|
|
7778
7775
|
genResourceOpts_: function() {
|
|
7779
|
-
return
|
|
7776
|
+
return oi(this.space.id, this.dir.id);
|
|
7780
7777
|
}
|
|
7781
7778
|
}, g.forBlock.select_resource_v1 = function() {
|
|
7782
7779
|
return "";
|
|
@@ -7797,7 +7794,7 @@ y.select_resource_v1 = {
|
|
|
7797
7794
|
},
|
|
7798
7795
|
updateShadow_: function() {
|
|
7799
7796
|
if (this.isInsertionMarker()) return;
|
|
7800
|
-
let e =
|
|
7797
|
+
let e = fn("");
|
|
7801
7798
|
this.getInput("NAME")?.setShadowDom(e);
|
|
7802
7799
|
},
|
|
7803
7800
|
ensureBlocks_: function() {
|
|
@@ -7849,9 +7846,9 @@ ${g.statementToCode(e, "HANDLE")}
|
|
|
7849
7846
|
};
|
|
7850
7847
|
//#endregion
|
|
7851
7848
|
//#region src/core/blocks/text/utils/index.ts
|
|
7852
|
-
var
|
|
7853
|
-
function
|
|
7854
|
-
return
|
|
7849
|
+
var li = /^\s*'([^']|\\')*'\s*$/;
|
|
7850
|
+
function ui(e) {
|
|
7851
|
+
return li.test(e) ? [e, _.ATOMIC] : [`String(${e})`, _.FUNCTION_CALL];
|
|
7855
7852
|
}
|
|
7856
7853
|
m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_APPEND_TOOLTIP}", "VAR")), t([{
|
|
7857
7854
|
type: "text_append_v1",
|
|
@@ -7869,7 +7866,7 @@ m.register("text_append_tooltip_v1", m.buildTooltipWithFieldText("%{BKY_TEXT_V1_
|
|
|
7869
7866
|
helpUrl: "%{BKY_TEXT_V1_APPEND_HELPURL}",
|
|
7870
7867
|
extensions: ["text_append_tooltip_v1"]
|
|
7871
7868
|
}]), g.forBlock.text_append_v1 = function(t) {
|
|
7872
|
-
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${
|
|
7869
|
+
return `${g.nameDB_?.getName(t.getFieldValue("VAR"), e.NameType.VARIABLE)} += ${ui(g.valueToCode(t, "TEXT", _.NONE) || "''")};\n`;
|
|
7873
7870
|
}, t([{
|
|
7874
7871
|
type: "text_change_case_v1",
|
|
7875
7872
|
message0: "%{BKY_TEXT_V1_CHANGE_CASE_TITLE}",
|
|
@@ -7993,11 +7990,11 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
|
|
|
7993
7990
|
};
|
|
7994
7991
|
//#endregion
|
|
7995
7992
|
//#region src/core/blocks/text/textJoin/v1/index.ts
|
|
7996
|
-
var
|
|
7993
|
+
var di = p.xml;
|
|
7997
7994
|
m.registerMutator("text_join_mutator_v1", {
|
|
7998
7995
|
itemCount_: 0,
|
|
7999
7996
|
mutationToDom: function() {
|
|
8000
|
-
let e =
|
|
7997
|
+
let e = di.createElement("mutation");
|
|
8001
7998
|
return e.setAttribute("items", `${this.itemCount_}`), e;
|
|
8002
7999
|
},
|
|
8003
8000
|
domToMutation: function(e) {
|
|
@@ -8088,10 +8085,10 @@ m.registerMutator("text_join_mutator_v1", {
|
|
|
8088
8085
|
let t = e;
|
|
8089
8086
|
switch (t.itemCount_) {
|
|
8090
8087
|
case 0: return ["''", _.ATOMIC];
|
|
8091
|
-
case 1: return
|
|
8088
|
+
case 1: return ui(g.valueToCode(t, "ADD0", _.NONE) || "''");
|
|
8092
8089
|
case 2: {
|
|
8093
8090
|
let e = g.valueToCode(t, "ADD0", _.NONE) || "''", n = g.valueToCode(t, "ADD1", _.NONE) || "''";
|
|
8094
|
-
return [
|
|
8091
|
+
return [ui(e)[0] + " + " + ui(n)[0], _.ADDITION];
|
|
8095
8092
|
}
|
|
8096
8093
|
default: {
|
|
8097
8094
|
let e = Array(t.itemCount_);
|
|
@@ -8249,13 +8246,13 @@ function ${g.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement) {
|
|
|
8249
8246
|
},
|
|
8250
8247
|
updateShadow_: function() {
|
|
8251
8248
|
if (this.isInsertionMarker()) return;
|
|
8252
|
-
let e =
|
|
8249
|
+
let e = pn(1e3);
|
|
8253
8250
|
this.getInput("INTERVAL")?.setShadowDom(e);
|
|
8254
|
-
let t =
|
|
8251
|
+
let t = mn(!1);
|
|
8255
8252
|
this.getInput("LOOP")?.setShadowDom(t);
|
|
8256
|
-
let n =
|
|
8253
|
+
let n = pn(1);
|
|
8257
8254
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
8258
|
-
let r =
|
|
8255
|
+
let r = mn(!1);
|
|
8259
8256
|
this.getInput("IMMEDIATE")?.setShadowDom(r);
|
|
8260
8257
|
}
|
|
8261
8258
|
}, g.forBlock.create_timer_v1 = function(e) {
|
|
@@ -8279,7 +8276,7 @@ ${g.statementToCode(e, "CALLBACK")}});\n`;
|
|
|
8279
8276
|
};
|
|
8280
8277
|
//#endregion
|
|
8281
8278
|
//#region src/core/blocks/variable/extensions/v1/index.ts
|
|
8282
|
-
var
|
|
8279
|
+
var fi = { customContextMenu: function(e) {
|
|
8283
8280
|
if (!this.isInFlyout) {
|
|
8284
8281
|
let t, n;
|
|
8285
8282
|
this.type === "variable_get_v1" ? (t = "variable_set_v1", n = F("VARIABLE_GET_CREATE_SET")) : this.type === "variable_set_v1" ? (t = "variable_get_v1", n = F("VARIABLE_SET_CREATE_GET")) : console.assert(!1);
|
|
@@ -8296,26 +8293,26 @@ var pi = { customContextMenu: function(e) {
|
|
|
8296
8293
|
let t = {
|
|
8297
8294
|
text: F("RENAME_VARIABLE"),
|
|
8298
8295
|
enabled: !0,
|
|
8299
|
-
callback:
|
|
8296
|
+
callback: pi(this)
|
|
8300
8297
|
}, n = this.getField("VAR").getText(), r = {
|
|
8301
8298
|
text: F("DELETE_VARIABLE").replace("%1", n),
|
|
8302
8299
|
enabled: !0,
|
|
8303
|
-
callback:
|
|
8300
|
+
callback: mi(this)
|
|
8304
8301
|
};
|
|
8305
8302
|
e.unshift(t), e.unshift(r);
|
|
8306
8303
|
}
|
|
8307
|
-
} },
|
|
8304
|
+
} }, pi = function(e) {
|
|
8308
8305
|
return function() {
|
|
8309
8306
|
let t = e.workspace, n = e.getField("VAR").getVariable();
|
|
8310
8307
|
c.renameVariable(t, n);
|
|
8311
8308
|
};
|
|
8312
|
-
},
|
|
8309
|
+
}, mi = function(e) {
|
|
8313
8310
|
return function() {
|
|
8314
8311
|
let t = e.getField("VAR").getVariable();
|
|
8315
8312
|
t && c.deleteVariable(t.getWorkspace(), t, e);
|
|
8316
8313
|
};
|
|
8317
8314
|
};
|
|
8318
|
-
m.registerMixin("context_menu_variable_v1",
|
|
8315
|
+
m.registerMixin("context_menu_variable_v1", fi), t([{
|
|
8319
8316
|
type: "variable_get_v1",
|
|
8320
8317
|
message0: "%1",
|
|
8321
8318
|
args0: [{
|
|
@@ -8362,17 +8359,17 @@ m.registerMixin("context_menu_variable_v1", pi), t([{
|
|
|
8362
8359
|
});
|
|
8363
8360
|
//#endregion
|
|
8364
8361
|
//#region src/core/plugins/fieldDropdown/index.ts
|
|
8365
|
-
var
|
|
8366
|
-
|
|
8362
|
+
var hi = b.prototype;
|
|
8363
|
+
hi.doClassValidation_ = function(e) {
|
|
8367
8364
|
return e;
|
|
8368
8365
|
};
|
|
8369
|
-
var
|
|
8370
|
-
|
|
8371
|
-
|
|
8366
|
+
var gi = hi.doValueUpdate_;
|
|
8367
|
+
hi.doValueUpdate_ = function(e) {
|
|
8368
|
+
gi.call(this, e), this.selectedOption && this.selectedOption[1] !== e && (this.selectedOption = null);
|
|
8372
8369
|
};
|
|
8373
|
-
var
|
|
8374
|
-
|
|
8375
|
-
if (this.selectedOption) return
|
|
8370
|
+
var _i = hi.getText_;
|
|
8371
|
+
hi.getText_ = function() {
|
|
8372
|
+
if (this.selectedOption) return _i.call(this);
|
|
8376
8373
|
let { i18n: e } = je, t = this.getSourceBlock();
|
|
8377
8374
|
if (this.name === "APP") return t.app.name;
|
|
8378
8375
|
if (this.name === "PAGE") return t.page.name;
|
|
@@ -8382,13 +8379,13 @@ gi.getText_ = function() {
|
|
|
8382
8379
|
if (n) return `${e.global.t(n.name)} / ${t.node.alias}`;
|
|
8383
8380
|
} else if (this.name === "PROPERTY") {
|
|
8384
8381
|
let { kind: e, names: n } = t.property;
|
|
8385
|
-
return
|
|
8382
|
+
return rt(e, n);
|
|
8386
8383
|
} else if (this.name === "EVENT") {
|
|
8387
8384
|
let { kind: e, names: n } = t.event;
|
|
8388
|
-
return
|
|
8385
|
+
return tt(e, n);
|
|
8389
8386
|
} else if (this.name === "METHOD") {
|
|
8390
8387
|
let { kind: e, names: n } = t.method;
|
|
8391
|
-
return
|
|
8388
|
+
return nt(e, n);
|
|
8392
8389
|
} else if (this.name === "SPACE") return t.space.name;
|
|
8393
8390
|
else if (this.name === "FUNC") return t.func.name;
|
|
8394
8391
|
else if (this.name === "OUTPUT") return t.output.name;
|
|
@@ -8400,7 +8397,7 @@ gi.getText_ = function() {
|
|
|
8400
8397
|
};
|
|
8401
8398
|
//#endregion
|
|
8402
8399
|
//#region src/core/plugins/workspaceCleanUp/index.ts
|
|
8403
|
-
var
|
|
8400
|
+
var vi = 60;
|
|
8404
8401
|
ee.prototype.cleanUp = function() {
|
|
8405
8402
|
this.setResizesEnabled(!1);
|
|
8406
8403
|
let e = x.getGroup();
|
|
@@ -8413,47 +8410,47 @@ ee.prototype.cleanUp = function() {
|
|
|
8413
8410
|
let t = e.getBoundingRectangle();
|
|
8414
8411
|
e.moveBy(-t.left, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle();
|
|
8415
8412
|
let n = i(t);
|
|
8416
|
-
for (; n != null;) a = n.top + n.getHeight() +
|
|
8417
|
-
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height +
|
|
8413
|
+
for (; n != null;) a = n.top + n.getHeight() + vi, e.moveBy(0, a - t.top, ["cleanup"]), e.snapToGrid(), t = e.getBoundingRectangle(), n = i(t);
|
|
8414
|
+
a = e.getRelativeToSurfaceXY().y + e.getHeightWidth().height + vi;
|
|
8418
8415
|
}
|
|
8419
8416
|
x.setGroup(e), this.setResizesEnabled(!0);
|
|
8420
8417
|
};
|
|
8421
8418
|
//#endregion
|
|
8422
8419
|
//#region src/core/plugins/disableTopBlocks/index.ts
|
|
8423
|
-
var
|
|
8424
|
-
function
|
|
8420
|
+
var yi = Te();
|
|
8421
|
+
function bi(e) {
|
|
8425
8422
|
let t = e.getParent();
|
|
8426
|
-
return t &&
|
|
8423
|
+
return t && bi(t) ? !0 : !t && !!(e.outputConnection || e.previousConnection);
|
|
8427
8424
|
}
|
|
8428
|
-
var
|
|
8425
|
+
var xi = class {
|
|
8429
8426
|
init() {
|
|
8430
8427
|
let e = de.registry.getItem("blockDisable");
|
|
8431
8428
|
e && (e.preconditionFn = function(e) {
|
|
8432
8429
|
let t = e.block;
|
|
8433
|
-
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() ||
|
|
8430
|
+
return t && !t.isInFlyout && t.workspace.options.disable && t.isEditable() ? t.getInheritedDisabled() || bi(t) ? "disabled" : "enabled" : "hidden";
|
|
8434
8431
|
});
|
|
8435
8432
|
}
|
|
8436
8433
|
};
|
|
8437
|
-
(0,
|
|
8434
|
+
(0, Dn.registerFieldColour)(), d.registry.unregister(te.names.ESCAPE), new yi.CrossTabCopyPaste().init({
|
|
8438
8435
|
contextMenu: !0,
|
|
8439
8436
|
shortcut: !0
|
|
8440
|
-
}), new
|
|
8437
|
+
}), new xi().init();
|
|
8441
8438
|
//#endregion
|
|
8442
8439
|
//#region src/core/events/index.ts
|
|
8443
|
-
var
|
|
8440
|
+
var Si = /* @__PURE__ */ function(e) {
|
|
8444
8441
|
return e.STATE_CHANGE = "state_change", e;
|
|
8445
|
-
}({}),
|
|
8442
|
+
}({}), Ci = class extends x.Abstract {
|
|
8446
8443
|
isBlank = !0;
|
|
8447
8444
|
recordUndo = !1;
|
|
8448
|
-
type =
|
|
8445
|
+
type = Si.STATE_CHANGE;
|
|
8449
8446
|
constructor(e) {
|
|
8450
8447
|
super(), this.workspaceId = e.id;
|
|
8451
8448
|
}
|
|
8452
8449
|
};
|
|
8453
|
-
Ce.register(Ce.Type.EVENT,
|
|
8450
|
+
Ce.register(Ce.Type.EVENT, Si.STATE_CHANGE, Ci);
|
|
8454
8451
|
//#endregion
|
|
8455
8452
|
//#region src/core/misc/index.ts
|
|
8456
|
-
function
|
|
8453
|
+
function wi(e) {
|
|
8457
8454
|
let t = s();
|
|
8458
8455
|
if (!t) return;
|
|
8459
8456
|
let n = t.getBlockById(e);
|
|
@@ -8463,11 +8460,11 @@ function Ti(e) {
|
|
|
8463
8460
|
let i = r.getRelativeToSurfaceXY(), a = i.x * t.scale, o = i.y * t.scale;
|
|
8464
8461
|
t.scroll(-a, -o);
|
|
8465
8462
|
}
|
|
8466
|
-
function
|
|
8463
|
+
function Ti() {
|
|
8467
8464
|
let e = s();
|
|
8468
8465
|
if (!e) return;
|
|
8469
8466
|
let t = e.getTopBlocks(!0)?.[0];
|
|
8470
|
-
t &&
|
|
8467
|
+
t && wi(t.id);
|
|
8471
8468
|
}
|
|
8472
8469
|
a.Classic.blockStyles = {
|
|
8473
8470
|
color_blocks: {
|
|
@@ -8577,7 +8574,7 @@ a.Classic.blockStyles = {
|
|
|
8577
8574
|
time_category: { colour: "#5b99a5" },
|
|
8578
8575
|
variable_category: { colour: "#a55b80" }
|
|
8579
8576
|
};
|
|
8580
|
-
var
|
|
8577
|
+
var Ei = ne.defineTheme("light", {
|
|
8581
8578
|
name: "light",
|
|
8582
8579
|
base: a.Classic,
|
|
8583
8580
|
componentStyles: {
|
|
@@ -8593,7 +8590,7 @@ var Di = ne.defineTheme("light", {
|
|
|
8593
8590
|
scrollbarOpacity: .4,
|
|
8594
8591
|
cursorColour: ""
|
|
8595
8592
|
}
|
|
8596
|
-
}),
|
|
8593
|
+
}), Di = ne.defineTheme("dark", {
|
|
8597
8594
|
name: "dark",
|
|
8598
8595
|
base: a.Classic,
|
|
8599
8596
|
componentStyles: {
|
|
@@ -8610,45 +8607,45 @@ var Di = ne.defineTheme("light", {
|
|
|
8610
8607
|
cursorColour: ""
|
|
8611
8608
|
}
|
|
8612
8609
|
});
|
|
8613
|
-
function
|
|
8610
|
+
function Oi(e) {
|
|
8614
8611
|
let t = s();
|
|
8615
8612
|
switch (e) {
|
|
8616
8613
|
case "light":
|
|
8617
|
-
t.setTheme(
|
|
8614
|
+
t.setTheme(Ei);
|
|
8618
8615
|
break;
|
|
8619
8616
|
case "dark":
|
|
8620
|
-
t.setTheme(
|
|
8617
|
+
t.setTheme(Di);
|
|
8621
8618
|
break;
|
|
8622
8619
|
}
|
|
8623
8620
|
}
|
|
8624
8621
|
//#endregion
|
|
8625
8622
|
//#region src/components/blockly/buildReactivity.ts
|
|
8626
|
-
function
|
|
8623
|
+
function ki(e, t) {
|
|
8627
8624
|
e.find((e) => e === t) || e.push(t);
|
|
8628
8625
|
}
|
|
8629
|
-
var
|
|
8630
|
-
function
|
|
8626
|
+
var Ai = ["get_app_property_v1", "get_app_state_v1"];
|
|
8627
|
+
function ji(e) {
|
|
8631
8628
|
let t = [];
|
|
8632
8629
|
function n(e) {
|
|
8633
|
-
for (let r of e.getChildren(!0))
|
|
8630
|
+
for (let r of e.getChildren(!0)) Ai.includes(r.type) && t.push(r), n(r);
|
|
8634
8631
|
}
|
|
8635
8632
|
return n(e), t;
|
|
8636
8633
|
}
|
|
8637
|
-
function
|
|
8634
|
+
function Mi(e) {
|
|
8638
8635
|
let t = [];
|
|
8639
|
-
for (let n of e) n.type === "get_app_property_v1" ?
|
|
8636
|
+
for (let n of e) n.type === "get_app_property_v1" ? ki(t, Ze("propertyTrigger", n.property.id)) : n.type === "get_app_state_v1" ? ki(t, Ze("stateTrigger", n.state.id)) : console.assert(!1);
|
|
8640
8637
|
return t;
|
|
8641
8638
|
}
|
|
8642
|
-
function
|
|
8639
|
+
function Ni(e) {
|
|
8643
8640
|
let t = [];
|
|
8644
8641
|
for (let n of e) {
|
|
8645
8642
|
if (n.type !== "app_bind_entry_v1") continue;
|
|
8646
8643
|
let e = n;
|
|
8647
|
-
e.kind === "property" ?
|
|
8644
|
+
e.kind === "property" ? ki(t, Ze("propertyTrigger", e.property.id)) : e.kind === "state" && ki(t, Ze("stateTrigger", e.state.id));
|
|
8648
8645
|
}
|
|
8649
8646
|
return t;
|
|
8650
8647
|
}
|
|
8651
|
-
function
|
|
8648
|
+
function Pi(e) {
|
|
8652
8649
|
let t = {
|
|
8653
8650
|
watchEffect: {
|
|
8654
8651
|
ids: [],
|
|
@@ -8661,32 +8658,32 @@ function Fi(e) {
|
|
|
8661
8658
|
}, n = e.getTopBlocks(!0);
|
|
8662
8659
|
if (!n) return t;
|
|
8663
8660
|
for (let e of n) if (e.type === "watch_effect_v1") {
|
|
8664
|
-
let n =
|
|
8665
|
-
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []),
|
|
8661
|
+
let n = Mi(ji(e));
|
|
8662
|
+
for (let r of n) t.watchEffect.triggers[r] || (t.watchEffect.triggers[r] = []), ki(t.watchEffect.triggers[r], e.id);
|
|
8666
8663
|
t.watchEffect.ids.push(e.id);
|
|
8667
8664
|
} else if (e.type === "app_bind_v1") {
|
|
8668
|
-
let n =
|
|
8665
|
+
let n = Ni(e.getChildren(!0));
|
|
8669
8666
|
t.bind.sets[e.id] = n;
|
|
8670
|
-
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []),
|
|
8667
|
+
for (let r of n) t.bind.triggers[r] || (t.bind.triggers[r] = []), ki(t.bind.triggers[r], e.id);
|
|
8671
8668
|
}
|
|
8672
8669
|
return t;
|
|
8673
8670
|
}
|
|
8674
8671
|
//#endregion
|
|
8675
8672
|
//#region src/components/blockly/provideInject.ts
|
|
8676
|
-
var
|
|
8677
|
-
function
|
|
8678
|
-
|
|
8673
|
+
var Fi = Symbol();
|
|
8674
|
+
function Ii(e) {
|
|
8675
|
+
Et(Fi, e);
|
|
8679
8676
|
}
|
|
8680
|
-
function
|
|
8681
|
-
return
|
|
8677
|
+
function Li() {
|
|
8678
|
+
return vt(Fi);
|
|
8682
8679
|
}
|
|
8683
8680
|
//#endregion
|
|
8684
8681
|
//#region src/components/blockly/clean/index.vue
|
|
8685
|
-
var
|
|
8682
|
+
var Ri = /* @__PURE__ */ _t({
|
|
8686
8683
|
__name: "index",
|
|
8687
8684
|
props: { lock: { type: Boolean } },
|
|
8688
8685
|
setup(e, { expose: t }) {
|
|
8689
|
-
let { t: n } =
|
|
8686
|
+
let { t: n } = zt(), r = Bt(), i = e, a = Li(), o = E(() => r.smAndDown.value), s = () => {
|
|
8690
8687
|
if (!a.workspace) {
|
|
8691
8688
|
console.assert(!1);
|
|
8692
8689
|
return;
|
|
@@ -8701,11 +8698,11 @@ var zi = /* @__PURE__ */ vt({
|
|
|
8701
8698
|
};
|
|
8702
8699
|
return t({ cleanWorkspace: s }), (e, t) => {
|
|
8703
8700
|
let r = M("v-btn"), i = M("v-tooltip");
|
|
8704
|
-
return j(),
|
|
8701
|
+
return j(), ht(i, {
|
|
8705
8702
|
disabled: o.value,
|
|
8706
8703
|
text: N(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
8707
8704
|
}, {
|
|
8708
|
-
activator: P(({ props: e }) => [k(r,
|
|
8705
|
+
activator: P(({ props: e }) => [k(r, xt(e, {
|
|
8709
8706
|
density: "comfortable",
|
|
8710
8707
|
icon: "mdi-broom",
|
|
8711
8708
|
variant: "outlined",
|
|
@@ -8718,7 +8715,7 @@ var zi = /* @__PURE__ */ vt({
|
|
|
8718
8715
|
});
|
|
8719
8716
|
//#endregion
|
|
8720
8717
|
//#region src/components/blockly/jsonHelper.ts
|
|
8721
|
-
function
|
|
8718
|
+
function zi(e, t) {
|
|
8722
8719
|
let n = t.newBlock("json_root_v1");
|
|
8723
8720
|
n.initSvg(), n.render();
|
|
8724
8721
|
let r = (e, n) => {
|
|
@@ -8749,7 +8746,7 @@ function Bi(e, t) {
|
|
|
8749
8746
|
};
|
|
8750
8747
|
r(e, n.getInput("JSON").connection), x.fire(new (x.get(x.FINISHED_LOADING))(t));
|
|
8751
8748
|
}
|
|
8752
|
-
function
|
|
8749
|
+
function Bi(e) {
|
|
8753
8750
|
let t = (e) => {
|
|
8754
8751
|
if (!e) return null;
|
|
8755
8752
|
if (e.type === "json_root_v1") return t(e.getInputTargetBlock("JSON"));
|
|
@@ -8773,7 +8770,7 @@ function Vi(e) {
|
|
|
8773
8770
|
}
|
|
8774
8771
|
//#endregion
|
|
8775
8772
|
//#region src/components/blockly/lock/index.vue
|
|
8776
|
-
var
|
|
8773
|
+
var Vi = /* @__PURE__ */ _t({
|
|
8777
8774
|
__name: "index",
|
|
8778
8775
|
props: {
|
|
8779
8776
|
modelValue: {
|
|
@@ -8784,14 +8781,14 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8784
8781
|
},
|
|
8785
8782
|
emits: ["update:modelValue"],
|
|
8786
8783
|
setup(e) {
|
|
8787
|
-
let { t } =
|
|
8784
|
+
let { t } = zt(), n = Bt(), r = Nt(e, "modelValue"), i = E(() => n.smAndDown.value);
|
|
8788
8785
|
return (e, n) => {
|
|
8789
8786
|
let a = M("v-btn"), o = M("v-tooltip");
|
|
8790
|
-
return j(),
|
|
8787
|
+
return j(), ht(o, {
|
|
8791
8788
|
disabled: i.value,
|
|
8792
8789
|
text: N(t)("x-block-lib.tip.hotkeyCtrlW")
|
|
8793
8790
|
}, {
|
|
8794
|
-
activator: P(({ props: e }) => [k(a,
|
|
8791
|
+
activator: P(({ props: e }) => [k(a, xt(e, {
|
|
8795
8792
|
density: "comfortable",
|
|
8796
8793
|
icon: r.value ? "mdi-lock" : "mdi-lock-open",
|
|
8797
8794
|
variant: "outlined",
|
|
@@ -8801,11 +8798,11 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8801
8798
|
}, 8, ["disabled", "text"]);
|
|
8802
8799
|
};
|
|
8803
8800
|
}
|
|
8804
|
-
}),
|
|
8801
|
+
}), Hi = { class: "d-flex flex-column" }, Ui = { class: "text-body-large ml-6" }, Wi = {
|
|
8805
8802
|
key: 0,
|
|
8806
8803
|
class: "text-body-small text-grey text-truncate ml-6",
|
|
8807
8804
|
style: { maxWidth: "340px" }
|
|
8808
|
-
},
|
|
8805
|
+
}, Gi = /* @__PURE__ */ _t({
|
|
8809
8806
|
__name: "item",
|
|
8810
8807
|
props: {
|
|
8811
8808
|
id: {},
|
|
@@ -8815,7 +8812,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8815
8812
|
},
|
|
8816
8813
|
emits: ["x-click"],
|
|
8817
8814
|
setup(e, { emit: t }) {
|
|
8818
|
-
let { primaryColor: n, backgroundColor2: r, highlightColor: i } = Fe(), a = t, o =
|
|
8815
|
+
let { primaryColor: n, backgroundColor2: r, highlightColor: i } = Fe(), a = t, o = Dt(!1), s = E(() => {
|
|
8819
8816
|
let t = {
|
|
8820
8817
|
position: "relative",
|
|
8821
8818
|
background: o.value ? i.value : r.value,
|
|
@@ -8828,34 +8825,34 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8828
8825
|
return e.select ? (t.borderTop = "1px solid " + n.value, t.borderBottom = "1px solid " + n.value) : (t.borderTop = void 0, t.borderBottom = void 0), t;
|
|
8829
8826
|
});
|
|
8830
8827
|
return (t, n) => {
|
|
8831
|
-
let r = M("v-spacer"), i = M("v-icon"), c =
|
|
8832
|
-
return
|
|
8828
|
+
let r = M("v-spacer"), i = M("v-icon"), c = At("ripple");
|
|
8829
|
+
return It((j(), D("div", {
|
|
8833
8830
|
class: "d-flex align-center cursor-pointer",
|
|
8834
8831
|
style: A(s.value),
|
|
8835
8832
|
onClick: n[1] ||= (t) => a("x-click", e.id),
|
|
8836
8833
|
onMouseout: n[2] ||= (e) => o.value = !1,
|
|
8837
8834
|
onMouseover: n[3] ||= (e) => o.value = !0
|
|
8838
8835
|
}, [
|
|
8839
|
-
O("div",
|
|
8836
|
+
O("div", Hi, [O("span", Ui, jt(e.title), 1), e.desc ? (j(), D("span", Wi, jt(e.desc), 1)) : gt("", !0)]),
|
|
8840
8837
|
k(r),
|
|
8841
8838
|
k(i, {
|
|
8842
8839
|
class: "x-handle cursor-move mr-3",
|
|
8843
8840
|
icon: "mdi-drag-horizontal-variant",
|
|
8844
|
-
onMousedown: n[0] ||=
|
|
8841
|
+
onMousedown: n[0] ||= Rt(() => {}, ["stop"])
|
|
8845
8842
|
})
|
|
8846
8843
|
], 36)), [[c]]);
|
|
8847
8844
|
};
|
|
8848
8845
|
}
|
|
8849
|
-
}),
|
|
8846
|
+
}), Ki = {
|
|
8850
8847
|
key: 1,
|
|
8851
8848
|
class: "text-body-small text-grey"
|
|
8852
|
-
},
|
|
8849
|
+
}, qi = /* @__PURE__ */ ((e, t) => {
|
|
8853
8850
|
let n = e.__vccOpts || e;
|
|
8854
8851
|
for (let [e, r] of t) n[e] = r;
|
|
8855
8852
|
return n;
|
|
8856
|
-
})(/* @__PURE__ */
|
|
8853
|
+
})(/* @__PURE__ */ _t({
|
|
8857
8854
|
__name: "index",
|
|
8858
|
-
props: /* @__PURE__ */
|
|
8855
|
+
props: /* @__PURE__ */ bt({ lock: { type: Boolean } }, {
|
|
8859
8856
|
modelValue: {
|
|
8860
8857
|
type: Boolean,
|
|
8861
8858
|
required: !0
|
|
@@ -8864,7 +8861,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8864
8861
|
}),
|
|
8865
8862
|
emits: ["update:modelValue"],
|
|
8866
8863
|
setup(e, { expose: t }) {
|
|
8867
|
-
let { t: n } =
|
|
8864
|
+
let { t: n } = zt(), r = Nt(e, "modelValue"), i = Li(), a = Dt([]);
|
|
8868
8865
|
t({ update: () => {
|
|
8869
8866
|
if (!i.workspace) {
|
|
8870
8867
|
console.assert(!1);
|
|
@@ -8875,12 +8872,12 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8875
8872
|
let r = t.id === ie()?.id, i = "";
|
|
8876
8873
|
if (t.type.startsWith("on_app_event_v")) {
|
|
8877
8874
|
let e = t, r = w(e.node.key);
|
|
8878
|
-
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " +
|
|
8875
|
+
r && (i = n(r.name), e.node.alias && (i += " / " + e.node.alias), i += " - " + tt(e.event.kind, e.event.names));
|
|
8879
8876
|
} else if (t.type.startsWith("watch_effect_v")) i = n("x-block-lib.watchEffect");
|
|
8880
8877
|
else if (t.type.startsWith("app_bind_v")) i = n("x-block-lib.bind");
|
|
8881
8878
|
else if (t.type.startsWith("implement_app_method_v")) {
|
|
8882
8879
|
let e = t;
|
|
8883
|
-
i = n("x-block-lib.implementMethod"), i += " - " +
|
|
8880
|
+
i = n("x-block-lib.implementMethod"), i += " - " + nt(e.method.kind, e.method.names);
|
|
8884
8881
|
} else i = t.type.startsWith("func_entry_v") ? n("x-block-lib.funcEntry") : t.type.startsWith("procedure_def_v") ? n("x-block-lib.procedure") + " - " + t.getFieldValue("NAME") : n("x-block-lib.temporaryBlock");
|
|
8885
8882
|
let a = t.getCommentText() ?? "";
|
|
8886
8883
|
e.push({
|
|
@@ -8920,16 +8917,16 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8920
8917
|
let a = -10;
|
|
8921
8918
|
r !== "" && (a = i.workspace.getBlockById(r).getRelativeToSurfaceXY().y + 10);
|
|
8922
8919
|
let s = n.getRelativeToSurfaceXY();
|
|
8923
|
-
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(),
|
|
8920
|
+
n.moveTo(new p.Coordinate(s.x, a)), i.workspace.cleanUp(), Ti();
|
|
8924
8921
|
}, u = async (e) => {
|
|
8925
8922
|
if (!i.workspace) {
|
|
8926
8923
|
console.assert(!1);
|
|
8927
8924
|
return;
|
|
8928
8925
|
}
|
|
8929
8926
|
let t = i.workspace.getBlockById(e);
|
|
8930
|
-
ke.setSelected(t),
|
|
8927
|
+
ke.setSelected(t), wi(e), r.value = !1;
|
|
8931
8928
|
};
|
|
8932
|
-
return (e, t) => a.value.length > 0 ? (j(),
|
|
8929
|
+
return (e, t) => a.value.length > 0 ? (j(), ht(N(ue), {
|
|
8933
8930
|
key: 0,
|
|
8934
8931
|
modelValue: a.value,
|
|
8935
8932
|
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
@@ -8940,7 +8937,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8940
8937
|
onMove: c,
|
|
8941
8938
|
onStart: s
|
|
8942
8939
|
}, {
|
|
8943
|
-
default: P(() => [(j(!0), D(
|
|
8940
|
+
default: P(() => [(j(!0), D(mt, null, Ot(a.value, (e) => (j(), ht(Gi, {
|
|
8944
8941
|
id: e.id,
|
|
8945
8942
|
key: e.id,
|
|
8946
8943
|
desc: e.desc,
|
|
@@ -8954,9 +8951,9 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8954
8951
|
"title"
|
|
8955
8952
|
]))), 128))]),
|
|
8956
8953
|
_: 1
|
|
8957
|
-
}, 8, ["modelValue"])) : (j(), D("span",
|
|
8954
|
+
}, 8, ["modelValue"])) : (j(), D("span", Ki, jt(N(n)("x-block-lib.noOption")), 1));
|
|
8958
8955
|
}
|
|
8959
|
-
}), [["__scopeId", "data-v-899634e5"]]),
|
|
8956
|
+
}), [["__scopeId", "data-v-899634e5"]]), Ji = /* @__PURE__ */ _t({
|
|
8960
8957
|
__name: "index",
|
|
8961
8958
|
props: {
|
|
8962
8959
|
modelValue: {
|
|
@@ -8967,7 +8964,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8967
8964
|
},
|
|
8968
8965
|
emits: ["update:modelValue"],
|
|
8969
8966
|
setup(e, { expose: t }) {
|
|
8970
|
-
let n =
|
|
8967
|
+
let n = Nt(e, "modelValue"), r = Li();
|
|
8971
8968
|
t({ update: () => {
|
|
8972
8969
|
if (!r.workspace) {
|
|
8973
8970
|
console.assert(!1);
|
|
@@ -8981,18 +8978,18 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
8981
8978
|
return;
|
|
8982
8979
|
}
|
|
8983
8980
|
let r = t.getBlockById(e);
|
|
8984
|
-
ke.setSelected(r),
|
|
8981
|
+
ke.setSelected(r), wi(e), n.value = !1;
|
|
8985
8982
|
};
|
|
8986
8983
|
return (e, t) => (j(), D("div", { onClick: t[0] ||= (e) => i("") }, "blockTree"));
|
|
8987
8984
|
}
|
|
8988
|
-
}),
|
|
8985
|
+
}), Yi = { class: "text-body-large" }, Xi = /* @__PURE__ */ _t({
|
|
8989
8986
|
__name: "index",
|
|
8990
8987
|
props: {
|
|
8991
8988
|
type: {},
|
|
8992
8989
|
lock: { type: Boolean }
|
|
8993
8990
|
},
|
|
8994
8991
|
setup(e, { expose: t }) {
|
|
8995
|
-
let { t: n } =
|
|
8992
|
+
let { t: n } = zt(), r = Bt(), { sysBarAvail: i } = Ie(), { backgroundColor1: a } = Fe(), o = E(() => r.smAndDown.value), s = E(() => {
|
|
8996
8993
|
let e = "100%";
|
|
8997
8994
|
return r.mdAndUp.value && (e = "400px"), {
|
|
8998
8995
|
background: a.value,
|
|
@@ -9005,11 +9002,11 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9005
9002
|
position: "relative",
|
|
9006
9003
|
height: `calc(100% - ${e}px)`
|
|
9007
9004
|
};
|
|
9008
|
-
}), l = E(() => ({ height: "60px" })), { open: u } = Le(`blocklyNavigatorDlg${
|
|
9009
|
-
|
|
9005
|
+
}), l = E(() => ({ height: "60px" })), { open: u } = Le(`blocklyNavigatorDlg${Mt()}`);
|
|
9006
|
+
Tt(() => {
|
|
9010
9007
|
u.value = !1;
|
|
9011
9008
|
});
|
|
9012
|
-
let ee =
|
|
9009
|
+
let ee = Pt("blockList"), te = Pt("blockTree");
|
|
9013
9010
|
return t({
|
|
9014
9011
|
open: u,
|
|
9015
9012
|
update: () => {
|
|
@@ -9017,29 +9014,29 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9017
9014
|
}
|
|
9018
9015
|
}), (t, r) => {
|
|
9019
9016
|
let a = M("v-sheet"), d = M("v-btn"), f = M("v-spacer"), ne = M("v-dialog"), p = M("v-tooltip");
|
|
9020
|
-
return j(), D(
|
|
9017
|
+
return j(), D(mt, null, [k(ne, {
|
|
9021
9018
|
modelValue: N(u),
|
|
9022
|
-
"onUpdate:modelValue": r[5] ||= (e) =>
|
|
9019
|
+
"onUpdate:modelValue": r[5] ||= (e) => yt(u) ? u.value = e : null,
|
|
9023
9020
|
eager: "",
|
|
9024
9021
|
fullscreen: "",
|
|
9025
9022
|
"no-click-animation": "",
|
|
9026
9023
|
persistent: "",
|
|
9027
9024
|
transition: "scroll-x-reverse-transition",
|
|
9028
|
-
onKeydown: r[6] ||= Rt(
|
|
9025
|
+
onKeydown: r[6] ||= Lt(Rt((e) => u.value = !1, ["stop", "prevent"]), ["esc"])
|
|
9029
9026
|
}, {
|
|
9030
9027
|
default: P(() => [O("div", {
|
|
9031
9028
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
9032
|
-
onClick: r[3] ||=
|
|
9033
|
-
onContextmenu: r[4] ||=
|
|
9029
|
+
onClick: r[3] ||= Rt((e) => u.value = !1, ["self"]),
|
|
9030
|
+
onContextmenu: r[4] ||= Rt((e) => u.value = !1, ["self", "prevent"])
|
|
9034
9031
|
}, [O("div", {
|
|
9035
9032
|
class: "elevation-2",
|
|
9036
9033
|
style: A(s.value)
|
|
9037
9034
|
}, [
|
|
9038
|
-
N(i) ? (j(),
|
|
9035
|
+
N(i) ? (j(), ht(a, {
|
|
9039
9036
|
key: 0,
|
|
9040
9037
|
color: "transparent",
|
|
9041
9038
|
height: 24
|
|
9042
|
-
})) :
|
|
9039
|
+
})) : gt("", !0),
|
|
9043
9040
|
k(a, {
|
|
9044
9041
|
class: "d-flex align-center px-2",
|
|
9045
9042
|
color: "transparent",
|
|
@@ -9052,7 +9049,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9052
9049
|
variant: "text",
|
|
9053
9050
|
onClick: r[0] ||= (e) => u.value = !1
|
|
9054
9051
|
}),
|
|
9055
|
-
O("span",
|
|
9052
|
+
O("span", Yi, jt(N(n)("x-block-lib.navigator")), 1),
|
|
9056
9053
|
k(f)
|
|
9057
9054
|
]),
|
|
9058
9055
|
_: 1
|
|
@@ -9060,27 +9057,27 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9060
9057
|
O("div", {
|
|
9061
9058
|
class: "overflow-y-auto",
|
|
9062
9059
|
style: A(c.value)
|
|
9063
|
-
}, [e.type === "list" ? (j(),
|
|
9060
|
+
}, [e.type === "list" ? (j(), ht(qi, {
|
|
9064
9061
|
key: 0,
|
|
9065
9062
|
ref_key: "blockList",
|
|
9066
9063
|
ref: ee,
|
|
9067
9064
|
modelValue: N(u),
|
|
9068
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
9065
|
+
"onUpdate:modelValue": r[1] ||= (e) => yt(u) ? u.value = e : null,
|
|
9069
9066
|
lock: e.lock
|
|
9070
|
-
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(),
|
|
9067
|
+
}, null, 8, ["modelValue", "lock"])) : e.type === "tree" ? (j(), ht(Ji, {
|
|
9071
9068
|
key: 1,
|
|
9072
9069
|
ref_key: "blockTree",
|
|
9073
9070
|
ref: te,
|
|
9074
9071
|
modelValue: N(u),
|
|
9075
|
-
"onUpdate:modelValue": r[2] ||= (e) =>
|
|
9076
|
-
}, null, 8, ["modelValue"])) :
|
|
9072
|
+
"onUpdate:modelValue": r[2] ||= (e) => yt(u) ? u.value = e : null
|
|
9073
|
+
}, null, 8, ["modelValue"])) : gt("", !0), O("div", { style: A(l.value) }, null, 4)], 4)
|
|
9077
9074
|
], 4)], 32)]),
|
|
9078
9075
|
_: 1
|
|
9079
9076
|
}, 8, ["modelValue"]), k(p, {
|
|
9080
9077
|
disabled: o.value,
|
|
9081
9078
|
text: N(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
9082
9079
|
}, {
|
|
9083
|
-
activator: P(({ props: e }) => [k(d,
|
|
9080
|
+
activator: P(({ props: e }) => [k(d, xt(e, {
|
|
9084
9081
|
density: "comfortable",
|
|
9085
9082
|
icon: "mdi-navigation-variant",
|
|
9086
9083
|
variant: "outlined",
|
|
@@ -9090,7 +9087,7 @@ var Hi = /* @__PURE__ */ vt({
|
|
|
9090
9087
|
}, 8, ["disabled", "text"])], 64);
|
|
9091
9088
|
};
|
|
9092
9089
|
}
|
|
9093
|
-
}),
|
|
9090
|
+
}), Zi = ge(), Z = p.xml;
|
|
9094
9091
|
function Q(e) {
|
|
9095
9092
|
let t = Z.createElement("label");
|
|
9096
9093
|
return t.setAttribute("text", e), t;
|
|
@@ -9100,12 +9097,12 @@ function $(e, t) {
|
|
|
9100
9097
|
if (n.setAttribute("type", e), t) for (let e of t) n.appendChild(e);
|
|
9101
9098
|
return n;
|
|
9102
9099
|
}
|
|
9103
|
-
function
|
|
9100
|
+
function Qi(e) {
|
|
9104
9101
|
let t = Z.createElement("mutation");
|
|
9105
9102
|
for (let { key: n, value: r } of e) t.setAttribute(n, r);
|
|
9106
9103
|
return t;
|
|
9107
9104
|
}
|
|
9108
|
-
function
|
|
9105
|
+
function $i(e, t) {
|
|
9109
9106
|
t === void 0 && (t = "");
|
|
9110
9107
|
let n = Z.createElement("value");
|
|
9111
9108
|
n.setAttribute("name", e);
|
|
@@ -9116,7 +9113,7 @@ function ea(e, t) {
|
|
|
9116
9113
|
let a = Z.createTextNode(t);
|
|
9117
9114
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9118
9115
|
}
|
|
9119
|
-
function
|
|
9116
|
+
function ea(e, t) {
|
|
9120
9117
|
t === void 0 && (t = 0);
|
|
9121
9118
|
let n = Z.createElement("value");
|
|
9122
9119
|
n.setAttribute("name", e);
|
|
@@ -9127,7 +9124,7 @@ function ta(e, t) {
|
|
|
9127
9124
|
let a = Z.createTextNode(String(t));
|
|
9128
9125
|
return i.appendChild(a), r.appendChild(i), n.appendChild(r), n;
|
|
9129
9126
|
}
|
|
9130
|
-
function
|
|
9127
|
+
function ta(e, t) {
|
|
9131
9128
|
t === void 0 && (t = !1);
|
|
9132
9129
|
let n = Z.createElement("value");
|
|
9133
9130
|
n.setAttribute("name", e);
|
|
@@ -9140,117 +9137,117 @@ function na(e, t) {
|
|
|
9140
9137
|
}
|
|
9141
9138
|
//#endregion
|
|
9142
9139
|
//#region src/core/category/app/comp/v1/index.ts
|
|
9143
|
-
function
|
|
9140
|
+
function na() {
|
|
9144
9141
|
let { activeObject: e, activeComp: t } = S.app;
|
|
9145
9142
|
return !(e.type !== "comp" || !t.meta.states || t.meta.states.length <= 0);
|
|
9146
9143
|
}
|
|
9147
|
-
function
|
|
9144
|
+
function ra() {
|
|
9148
9145
|
let e = [];
|
|
9149
|
-
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [
|
|
9146
|
+
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), U("triggerEvent") && e.push($("trigger_app_event_v1")), e.push($("app_bind_v1", [Qi([{
|
|
9150
9147
|
key: "items",
|
|
9151
9148
|
value: "2"
|
|
9152
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9149
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), na() && (e.push(Q(F("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), (U("callMethod") || U("implementMethod")) && e.push(Q(F("LABEL_METHOD"))), U("callMethod") && e.push($("call_app_method_v1")), U("implementMethod") && (e.push($("implement_app_method_v1")), U("implementMethodOutput") && e.push($("set_app_method_output_v1")), e.push($("procedure_return_v1"))), e;
|
|
9153
9150
|
}
|
|
9154
|
-
var
|
|
9151
|
+
var ia = {
|
|
9155
9152
|
name: "APP_COMP_CATEGORY",
|
|
9156
|
-
callback:
|
|
9153
|
+
callback: ra
|
|
9157
9154
|
};
|
|
9158
9155
|
//#endregion
|
|
9159
9156
|
//#region src/core/category/app/compute/v1/index.ts
|
|
9160
|
-
function
|
|
9157
|
+
function aa() {
|
|
9161
9158
|
let e = [];
|
|
9162
9159
|
return e.push(Q(F("LABEL_FUNC"))), e.push(Q(F("LABEL_FLOW"))), e;
|
|
9163
9160
|
}
|
|
9164
|
-
var
|
|
9161
|
+
var oa = {
|
|
9165
9162
|
name: "APP_COMPUTE_CATEGORY",
|
|
9166
|
-
callback:
|
|
9163
|
+
callback: aa
|
|
9167
9164
|
};
|
|
9168
9165
|
//#endregion
|
|
9169
9166
|
//#region src/core/category/app/message/v1/index.ts
|
|
9170
|
-
function
|
|
9167
|
+
function sa() {
|
|
9171
9168
|
let e = [];
|
|
9172
|
-
return e.push($("app_debug_trace_v1", [
|
|
9169
|
+
return e.push($("app_debug_trace_v1", [$i("OBJECT")])), e.push($("popup_message_v1", [$i("TEXT")])), e.push($("open_confirm_dlg_v1")), e.push($("open_prompt_dlg_v1")), e;
|
|
9173
9170
|
}
|
|
9174
|
-
var
|
|
9171
|
+
var ca = {
|
|
9175
9172
|
name: "APP_MESSAGE_CATEGORY",
|
|
9176
|
-
callback:
|
|
9173
|
+
callback: sa
|
|
9177
9174
|
};
|
|
9178
9175
|
//#endregion
|
|
9179
9176
|
//#region src/core/category/app/misc/v1/index.ts
|
|
9180
|
-
function
|
|
9177
|
+
function la() {
|
|
9181
9178
|
for (let e of S.app.appList) if (e.pages.length > 0) return !0;
|
|
9182
9179
|
return !1;
|
|
9183
9180
|
}
|
|
9184
|
-
function
|
|
9181
|
+
function ua() {
|
|
9185
9182
|
let e = [];
|
|
9186
|
-
return e.push($("app_env_is_v1")),
|
|
9183
|
+
return e.push($("app_env_is_v1")), la() && e.push($("navigate_to_v1")), e;
|
|
9187
9184
|
}
|
|
9188
|
-
var
|
|
9185
|
+
var da = {
|
|
9189
9186
|
name: "APP_MISC_CATEGORY",
|
|
9190
|
-
callback:
|
|
9187
|
+
callback: ua
|
|
9191
9188
|
};
|
|
9192
9189
|
//#endregion
|
|
9193
9190
|
//#region src/core/category/app/page/v1/index.ts
|
|
9194
|
-
function
|
|
9191
|
+
function fa() {
|
|
9195
9192
|
let { activeObject: e, activePage: t } = S.app;
|
|
9196
9193
|
return !(e.type !== "page" || !t.meta.states || t.meta.states.length <= 0);
|
|
9197
9194
|
}
|
|
9198
|
-
function
|
|
9195
|
+
function pa() {
|
|
9199
9196
|
let { activeObject: e, activePage: t } = S.app;
|
|
9200
9197
|
return !(e.type !== "page" || !t.meta.arguments || t.meta.arguments.length <= 0);
|
|
9201
9198
|
}
|
|
9202
|
-
function
|
|
9199
|
+
function ma() {
|
|
9203
9200
|
let e = [];
|
|
9204
|
-
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [
|
|
9201
|
+
return e.push(Q(F("LABEL_EVENT"))), U("onEvent") && e.push($("on_app_event_v1")), e.push($("app_bind_v1", [Qi([{
|
|
9205
9202
|
key: "items",
|
|
9206
9203
|
value: "2"
|
|
9207
|
-
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")),
|
|
9204
|
+
}])])), e.push($("watch_effect_v1")), (U("getProperty") || U("setProperty")) && e.push(Q(F("LABEL_PROPERTY"))), U("getProperty") && e.push($("get_app_property_v1")), U("setProperty") && e.push($("set_app_property_v1")), fa() && (e.push(Q(F("LABEL_STATE"))), e.push($("get_app_state_v1")), e.push($("set_app_state_v1"))), U("callMethod") && (e.push(Q(F("LABEL_METHOD"))), e.push($("call_app_method_v1"))), pa() && (e.push(Q(F("LABEL_ARGUMENT"))), e.push($("get_page_argument_v1"))), e;
|
|
9208
9205
|
}
|
|
9209
|
-
var
|
|
9206
|
+
var ha = {
|
|
9210
9207
|
name: "APP_PAGE_CATEGORY",
|
|
9211
|
-
callback:
|
|
9208
|
+
callback: ma
|
|
9212
9209
|
};
|
|
9213
9210
|
//#endregion
|
|
9214
9211
|
//#region src/core/category/app/resource/v1/index.ts
|
|
9215
|
-
function
|
|
9212
|
+
function ga() {
|
|
9216
9213
|
let e = [];
|
|
9217
9214
|
return e.push(Q(F("LABEL_RESOURCE"))), e.push($("upload_resource_v1")), e;
|
|
9218
9215
|
}
|
|
9219
|
-
var
|
|
9216
|
+
var _a = {
|
|
9220
9217
|
name: "APP_RESOURCE_CATEGORY",
|
|
9221
|
-
callback:
|
|
9222
|
-
},
|
|
9223
|
-
function
|
|
9218
|
+
callback: ga
|
|
9219
|
+
}, va = p.xml;
|
|
9220
|
+
function ya() {
|
|
9224
9221
|
let e = [];
|
|
9225
9222
|
{
|
|
9226
|
-
let t =
|
|
9223
|
+
let t = va.createElement("label");
|
|
9227
9224
|
t.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(t);
|
|
9228
9225
|
}
|
|
9229
9226
|
{
|
|
9230
|
-
let t =
|
|
9227
|
+
let t = va.createElement("block");
|
|
9231
9228
|
t.setAttribute("type", "procedure_def_v1");
|
|
9232
9229
|
{
|
|
9233
|
-
let e =
|
|
9230
|
+
let e = va.createElement("field");
|
|
9234
9231
|
e.setAttribute("name", "NAME");
|
|
9235
|
-
let n =
|
|
9232
|
+
let n = va.createTextNode(F("PROCEDURE_DEFAULT_NAME"));
|
|
9236
9233
|
e.appendChild(n), t.appendChild(e);
|
|
9237
9234
|
}
|
|
9238
9235
|
e.push(t);
|
|
9239
9236
|
}
|
|
9240
9237
|
{
|
|
9241
|
-
let t =
|
|
9238
|
+
let t = va.createElement("block");
|
|
9242
9239
|
t.setAttribute("type", "procedure_return_v1"), e.push(t);
|
|
9243
9240
|
}
|
|
9244
9241
|
return e;
|
|
9245
9242
|
}
|
|
9246
|
-
var
|
|
9243
|
+
var ba = {
|
|
9247
9244
|
name: "PROCEDURE_CATEGORY",
|
|
9248
|
-
callback:
|
|
9249
|
-
},
|
|
9250
|
-
function
|
|
9245
|
+
callback: ya
|
|
9246
|
+
}, xa = p.xml;
|
|
9247
|
+
function Sa() {
|
|
9251
9248
|
let e = s(), t = [];
|
|
9252
9249
|
{
|
|
9253
|
-
let e =
|
|
9250
|
+
let e = xa.createElement("label");
|
|
9254
9251
|
e.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), t.push(e);
|
|
9255
9252
|
}
|
|
9256
9253
|
{
|
|
@@ -9263,75 +9260,75 @@ function Ca() {
|
|
|
9263
9260
|
if (n.length <= 0) return t;
|
|
9264
9261
|
n.sort(c.compareByName);
|
|
9265
9262
|
{
|
|
9266
|
-
let e =
|
|
9263
|
+
let e = xa.createElement("label");
|
|
9267
9264
|
e.setAttribute("text", F("LABEL_CREATED")), t.push(e);
|
|
9268
9265
|
}
|
|
9269
9266
|
return n.forEach((e) => {
|
|
9270
9267
|
{
|
|
9271
|
-
let n =
|
|
9268
|
+
let n = xa.createElement("block");
|
|
9272
9269
|
n.setAttribute("type", "variable_get_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9273
9270
|
}
|
|
9274
9271
|
{
|
|
9275
|
-
let n =
|
|
9272
|
+
let n = xa.createElement("block");
|
|
9276
9273
|
n.setAttribute("type", "variable_set_v1"), n.appendChild(c.generateVariableFieldDom(e)), t.push(n);
|
|
9277
9274
|
}
|
|
9278
9275
|
}), t;
|
|
9279
9276
|
}
|
|
9280
|
-
var
|
|
9277
|
+
var Ca = {
|
|
9281
9278
|
name: "VARIABLE_CATEGORY",
|
|
9282
|
-
callback:
|
|
9279
|
+
callback: Sa
|
|
9283
9280
|
};
|
|
9284
9281
|
//#endregion
|
|
9285
9282
|
//#region src/core/category/compute/data/v1/index.ts
|
|
9286
|
-
function
|
|
9283
|
+
function wa() {
|
|
9287
9284
|
let e = [];
|
|
9288
|
-
if (Y().length > 0) e.push(Q(F("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [
|
|
9285
|
+
if (Y().length > 0) e.push(Q(F("LABEL_OPERATION"))), e.push($("add_data_v1")), e.push($("delete_data_v1")), e.push($("update_data_v1")), e.push($("query_data_v1")), e.push($("transaction_v1")), e.push($("interrupt_transaction_v1", [$i("VALUE")])), e.push(Q(F("LABEL_CONDITION"))), e.push($("cond_logic_v1")), e.push($("cond_atomic_v1", [$i("VALUE")])), e.push(Q(F("LABEL_QUERY_EXTRA"))), e.push($("query_extra_limit_v1", [ea("OFFSET", 0), ea("LIMIT", 1)])), e.push($("query_extra_sortby_v1", [$i("COLUMN"), ta("DESC")]));
|
|
9289
9286
|
else {
|
|
9290
9287
|
let t = document.createElement("button");
|
|
9291
9288
|
t.setAttribute("text", F("BUTTON_NO_TABLE")), t.setAttribute("callbackKey", "NO_TABLE"), e.push(t);
|
|
9292
9289
|
}
|
|
9293
9290
|
return e;
|
|
9294
9291
|
}
|
|
9295
|
-
var
|
|
9292
|
+
var Ta = {
|
|
9296
9293
|
name: "COMPUTE_DATA_CATEGORY",
|
|
9297
|
-
callback:
|
|
9294
|
+
callback: wa
|
|
9298
9295
|
};
|
|
9299
9296
|
//#endregion
|
|
9300
9297
|
//#region src/core/category/compute/flow/v1/index.ts
|
|
9301
|
-
function
|
|
9302
|
-
return
|
|
9298
|
+
function Ea() {
|
|
9299
|
+
return Dr("flow").length > 0;
|
|
9303
9300
|
}
|
|
9304
|
-
function
|
|
9301
|
+
function Da() {
|
|
9305
9302
|
let e = [];
|
|
9306
|
-
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")),
|
|
9303
|
+
return S.compute.activeObject.type === "flow" && e.push($("on_flow_state_event_v1")), Ea() && console.assert(!0), e;
|
|
9307
9304
|
}
|
|
9308
|
-
var
|
|
9305
|
+
var Oa = {
|
|
9309
9306
|
name: "COMPUTE_FLOW_CATEGORY",
|
|
9310
|
-
callback:
|
|
9307
|
+
callback: Da
|
|
9311
9308
|
};
|
|
9312
9309
|
//#endregion
|
|
9313
9310
|
//#region src/core/category/compute/func/v1/index.ts
|
|
9314
|
-
function
|
|
9315
|
-
return
|
|
9311
|
+
function ka() {
|
|
9312
|
+
return Dr("func").length > 0;
|
|
9316
9313
|
}
|
|
9317
|
-
function
|
|
9314
|
+
function Aa() {
|
|
9318
9315
|
let { activeObject: e, activeFunc: t } = S.compute, n = [];
|
|
9319
|
-
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))),
|
|
9316
|
+
return e.type === "func" && (n.push($("func_entry_v1")), t.outputs && t.outputs.length > 0 && n.push($("set_func_output_v1")), n.push($("procedure_return_v1"))), ka() && n.push($("call_func_internal_v1")), n;
|
|
9320
9317
|
}
|
|
9321
|
-
var
|
|
9318
|
+
var ja = {
|
|
9322
9319
|
name: "COMPUTE_FUNC_CATEGORY",
|
|
9323
|
-
callback:
|
|
9320
|
+
callback: Aa
|
|
9324
9321
|
};
|
|
9325
9322
|
//#endregion
|
|
9326
9323
|
//#region src/core/category/compute/misc/v1/index.ts
|
|
9327
|
-
function
|
|
9324
|
+
function Ma() {
|
|
9328
9325
|
let e = [];
|
|
9329
|
-
return e.push($("compute_debug_trace_v1", [
|
|
9326
|
+
return e.push($("compute_debug_trace_v1", [$i("OBJECT")])), e;
|
|
9330
9327
|
}
|
|
9331
|
-
var
|
|
9328
|
+
var Na = {
|
|
9332
9329
|
name: "COMPUTE_MISC_CATEGORY",
|
|
9333
|
-
callback:
|
|
9334
|
-
},
|
|
9330
|
+
callback: Ma
|
|
9331
|
+
}, Pa = {
|
|
9335
9332
|
kind: "category",
|
|
9336
9333
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
9337
9334
|
categorystyle: "color_category",
|
|
@@ -9381,7 +9378,7 @@ var Pa = {
|
|
|
9381
9378
|
}
|
|
9382
9379
|
}
|
|
9383
9380
|
]
|
|
9384
|
-
},
|
|
9381
|
+
}, Fa = {
|
|
9385
9382
|
kind: "category",
|
|
9386
9383
|
name: "%{BKY_CATEGORY_LIST}",
|
|
9387
9384
|
categorystyle: "list_category",
|
|
@@ -9462,7 +9459,7 @@ var Pa = {
|
|
|
9462
9459
|
type: "list_reverse_v1"
|
|
9463
9460
|
}
|
|
9464
9461
|
]
|
|
9465
|
-
},
|
|
9462
|
+
}, Ia = {
|
|
9466
9463
|
kind: "category",
|
|
9467
9464
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
9468
9465
|
categorystyle: "logic_category",
|
|
@@ -9504,7 +9501,7 @@ var Pa = {
|
|
|
9504
9501
|
type: "logic_ternary_v1"
|
|
9505
9502
|
}
|
|
9506
9503
|
]
|
|
9507
|
-
},
|
|
9504
|
+
}, La = {
|
|
9508
9505
|
kind: "category",
|
|
9509
9506
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
9510
9507
|
categorystyle: "loop_category",
|
|
@@ -9548,7 +9545,7 @@ var Pa = {
|
|
|
9548
9545
|
type: "flow_control_v1"
|
|
9549
9546
|
}
|
|
9550
9547
|
]
|
|
9551
|
-
},
|
|
9548
|
+
}, Ra = {
|
|
9552
9549
|
kind: "category",
|
|
9553
9550
|
name: "%{BKY_CATEGORY_MATH}",
|
|
9554
9551
|
categorystyle: "math_category",
|
|
@@ -9653,7 +9650,7 @@ var Pa = {
|
|
|
9653
9650
|
type: "math_on_list_v1"
|
|
9654
9651
|
}
|
|
9655
9652
|
]
|
|
9656
|
-
},
|
|
9653
|
+
}, za = {
|
|
9657
9654
|
kind: "category",
|
|
9658
9655
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
9659
9656
|
categorystyle: "object_category",
|
|
@@ -9703,7 +9700,7 @@ var Pa = {
|
|
|
9703
9700
|
} } }
|
|
9704
9701
|
}
|
|
9705
9702
|
]
|
|
9706
|
-
},
|
|
9703
|
+
}, Ba = {
|
|
9707
9704
|
kind: "category",
|
|
9708
9705
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
9709
9706
|
categorystyle: "text_category",
|
|
@@ -9818,7 +9815,7 @@ var Pa = {
|
|
|
9818
9815
|
type: "text_reverse_v1"
|
|
9819
9816
|
}
|
|
9820
9817
|
]
|
|
9821
|
-
},
|
|
9818
|
+
}, Va = {
|
|
9822
9819
|
kind: "category",
|
|
9823
9820
|
name: "%{BKY_CATEGORY_TIME}",
|
|
9824
9821
|
categorystyle: "time_category",
|
|
@@ -9833,155 +9830,155 @@ var Pa = {
|
|
|
9833
9830
|
fields: { NUM: 1e3 }
|
|
9834
9831
|
} } }
|
|
9835
9832
|
}]
|
|
9836
|
-
},
|
|
9833
|
+
}, Ha = {
|
|
9837
9834
|
kind: "categoryToolbox",
|
|
9838
9835
|
contents: [
|
|
9839
9836
|
{
|
|
9840
9837
|
kind: "category",
|
|
9841
9838
|
name: "%{BKY_CATEGORY_COMP}",
|
|
9842
9839
|
categorystyle: "misc_category",
|
|
9843
|
-
custom:
|
|
9840
|
+
custom: ia.name
|
|
9844
9841
|
},
|
|
9845
9842
|
{
|
|
9846
9843
|
kind: "category",
|
|
9847
9844
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
9848
9845
|
categorystyle: "misc_category",
|
|
9849
|
-
custom:
|
|
9846
|
+
custom: ca.name
|
|
9850
9847
|
},
|
|
9851
9848
|
{
|
|
9852
9849
|
kind: "category",
|
|
9853
9850
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9854
9851
|
categorystyle: "misc_category",
|
|
9855
|
-
custom:
|
|
9852
|
+
custom: da.name
|
|
9856
9853
|
},
|
|
9857
|
-
Ra,
|
|
9858
9854
|
La,
|
|
9859
|
-
za,
|
|
9860
|
-
Va,
|
|
9861
9855
|
Ia,
|
|
9856
|
+
Ra,
|
|
9862
9857
|
Ba,
|
|
9863
9858
|
Fa,
|
|
9864
|
-
|
|
9859
|
+
za,
|
|
9860
|
+
Pa,
|
|
9861
|
+
Va,
|
|
9865
9862
|
{
|
|
9866
9863
|
kind: "category",
|
|
9867
9864
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9868
9865
|
categorystyle: "variable_category",
|
|
9869
|
-
custom:
|
|
9866
|
+
custom: Ca.name
|
|
9870
9867
|
},
|
|
9871
9868
|
{
|
|
9872
9869
|
kind: "category",
|
|
9873
9870
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9874
9871
|
categorystyle: "procedure_category",
|
|
9875
|
-
custom:
|
|
9872
|
+
custom: ba.name
|
|
9876
9873
|
},
|
|
9877
9874
|
{
|
|
9878
9875
|
kind: "category",
|
|
9879
9876
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
9880
9877
|
categorystyle: "resource_category",
|
|
9881
|
-
custom:
|
|
9878
|
+
custom: _a.name
|
|
9882
9879
|
},
|
|
9883
9880
|
{
|
|
9884
9881
|
kind: "category",
|
|
9885
9882
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
9886
9883
|
categorystyle: "compute_category",
|
|
9887
|
-
custom:
|
|
9884
|
+
custom: oa.name
|
|
9888
9885
|
}
|
|
9889
9886
|
]
|
|
9890
|
-
},
|
|
9887
|
+
}, Ua = {
|
|
9891
9888
|
kind: "categoryToolbox",
|
|
9892
9889
|
contents: [
|
|
9893
9890
|
{
|
|
9894
9891
|
kind: "category",
|
|
9895
9892
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9896
9893
|
categorystyle: "func_category",
|
|
9897
|
-
custom:
|
|
9894
|
+
custom: ja.name
|
|
9898
9895
|
},
|
|
9899
9896
|
{
|
|
9900
9897
|
kind: "category",
|
|
9901
9898
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9902
9899
|
categorystyle: "flow_category",
|
|
9903
|
-
custom:
|
|
9900
|
+
custom: Oa.name
|
|
9904
9901
|
},
|
|
9905
9902
|
{
|
|
9906
9903
|
kind: "category",
|
|
9907
9904
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9908
9905
|
categorystyle: "data_category",
|
|
9909
|
-
custom:
|
|
9906
|
+
custom: Ta.name
|
|
9910
9907
|
},
|
|
9911
9908
|
{
|
|
9912
9909
|
kind: "category",
|
|
9913
9910
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9914
9911
|
categorystyle: "misc_category",
|
|
9915
|
-
custom:
|
|
9912
|
+
custom: Na.name
|
|
9916
9913
|
},
|
|
9917
|
-
Ra,
|
|
9918
9914
|
La,
|
|
9919
|
-
za,
|
|
9920
|
-
Va,
|
|
9921
9915
|
Ia,
|
|
9916
|
+
Ra,
|
|
9922
9917
|
Ba,
|
|
9923
9918
|
Fa,
|
|
9919
|
+
za,
|
|
9920
|
+
Pa,
|
|
9924
9921
|
{
|
|
9925
9922
|
kind: "category",
|
|
9926
9923
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9927
9924
|
categorystyle: "variable_category",
|
|
9928
|
-
custom:
|
|
9925
|
+
custom: Ca.name
|
|
9929
9926
|
},
|
|
9930
9927
|
{
|
|
9931
9928
|
kind: "category",
|
|
9932
9929
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9933
9930
|
categorystyle: "procedure_category",
|
|
9934
|
-
custom:
|
|
9931
|
+
custom: ba.name
|
|
9935
9932
|
}
|
|
9936
9933
|
]
|
|
9937
|
-
},
|
|
9934
|
+
}, Wa = {
|
|
9938
9935
|
kind: "categoryToolbox",
|
|
9939
9936
|
contents: [
|
|
9940
9937
|
{
|
|
9941
9938
|
kind: "category",
|
|
9942
9939
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
9943
9940
|
categorystyle: "func_category",
|
|
9944
|
-
custom:
|
|
9941
|
+
custom: ja.name
|
|
9945
9942
|
},
|
|
9946
9943
|
{
|
|
9947
9944
|
kind: "category",
|
|
9948
9945
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
9949
9946
|
categorystyle: "flow_category",
|
|
9950
|
-
custom:
|
|
9947
|
+
custom: Oa.name
|
|
9951
9948
|
},
|
|
9952
9949
|
{
|
|
9953
9950
|
kind: "category",
|
|
9954
9951
|
name: "%{BKY_CATEGORY_DATA}",
|
|
9955
9952
|
categorystyle: "data_category",
|
|
9956
|
-
custom:
|
|
9953
|
+
custom: Ta.name
|
|
9957
9954
|
},
|
|
9958
9955
|
{
|
|
9959
9956
|
kind: "category",
|
|
9960
9957
|
name: "%{BKY_CATEGORY_MISC}",
|
|
9961
9958
|
categorystyle: "misc_category",
|
|
9962
|
-
custom:
|
|
9959
|
+
custom: Na.name
|
|
9963
9960
|
},
|
|
9964
|
-
Ra,
|
|
9965
9961
|
La,
|
|
9966
|
-
za,
|
|
9967
|
-
Va,
|
|
9968
9962
|
Ia,
|
|
9963
|
+
Ra,
|
|
9969
9964
|
Ba,
|
|
9970
9965
|
Fa,
|
|
9966
|
+
za,
|
|
9967
|
+
Pa,
|
|
9971
9968
|
{
|
|
9972
9969
|
kind: "category",
|
|
9973
9970
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
9974
9971
|
categorystyle: "variable_category",
|
|
9975
|
-
custom:
|
|
9972
|
+
custom: Ca.name
|
|
9976
9973
|
},
|
|
9977
9974
|
{
|
|
9978
9975
|
kind: "category",
|
|
9979
9976
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
9980
9977
|
categorystyle: "procedure_category",
|
|
9981
|
-
custom:
|
|
9978
|
+
custom: ba.name
|
|
9982
9979
|
}
|
|
9983
9980
|
]
|
|
9984
|
-
},
|
|
9981
|
+
}, Ga = {
|
|
9985
9982
|
kind: "categoryToolbox",
|
|
9986
9983
|
contents: [{
|
|
9987
9984
|
kind: "category",
|
|
@@ -10010,61 +10007,61 @@ var Pa = {
|
|
|
10010
10007
|
}
|
|
10011
10008
|
]
|
|
10012
10009
|
}]
|
|
10013
|
-
},
|
|
10010
|
+
}, Ka = {
|
|
10014
10011
|
kind: "categoryToolbox",
|
|
10015
10012
|
contents: [
|
|
10016
10013
|
{
|
|
10017
10014
|
kind: "category",
|
|
10018
10015
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
10019
10016
|
categorystyle: "misc_category",
|
|
10020
|
-
custom:
|
|
10017
|
+
custom: ha.name
|
|
10021
10018
|
},
|
|
10022
10019
|
{
|
|
10023
10020
|
kind: "category",
|
|
10024
10021
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
10025
10022
|
categorystyle: "misc_category",
|
|
10026
|
-
custom:
|
|
10023
|
+
custom: ca.name
|
|
10027
10024
|
},
|
|
10028
10025
|
{
|
|
10029
10026
|
kind: "category",
|
|
10030
10027
|
name: "%{BKY_CATEGORY_MISC}",
|
|
10031
10028
|
categorystyle: "misc_category",
|
|
10032
|
-
custom:
|
|
10029
|
+
custom: da.name
|
|
10033
10030
|
},
|
|
10034
|
-
Ra,
|
|
10035
10031
|
La,
|
|
10036
|
-
za,
|
|
10037
|
-
Va,
|
|
10038
10032
|
Ia,
|
|
10033
|
+
Ra,
|
|
10039
10034
|
Ba,
|
|
10040
10035
|
Fa,
|
|
10041
|
-
|
|
10036
|
+
za,
|
|
10037
|
+
Pa,
|
|
10038
|
+
Va,
|
|
10042
10039
|
{
|
|
10043
10040
|
kind: "category",
|
|
10044
10041
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
10045
10042
|
categorystyle: "variable_category",
|
|
10046
|
-
custom:
|
|
10043
|
+
custom: Ca.name
|
|
10047
10044
|
},
|
|
10048
10045
|
{
|
|
10049
10046
|
kind: "category",
|
|
10050
10047
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
10051
10048
|
categorystyle: "procedure_category",
|
|
10052
|
-
custom:
|
|
10049
|
+
custom: ba.name
|
|
10053
10050
|
},
|
|
10054
10051
|
{
|
|
10055
10052
|
kind: "category",
|
|
10056
10053
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
10057
10054
|
categorystyle: "resource_category",
|
|
10058
|
-
custom:
|
|
10055
|
+
custom: _a.name
|
|
10059
10056
|
},
|
|
10060
10057
|
{
|
|
10061
10058
|
kind: "category",
|
|
10062
10059
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
10063
10060
|
categorystyle: "compute_category",
|
|
10064
|
-
custom:
|
|
10061
|
+
custom: oa.name
|
|
10065
10062
|
}
|
|
10066
10063
|
]
|
|
10067
|
-
},
|
|
10064
|
+
}, qa = {
|
|
10068
10065
|
grid: {
|
|
10069
10066
|
length: 2,
|
|
10070
10067
|
snap: !0,
|
|
@@ -10088,11 +10085,11 @@ var Pa = {
|
|
|
10088
10085
|
wheel: !0
|
|
10089
10086
|
}
|
|
10090
10087
|
};
|
|
10091
|
-
function
|
|
10092
|
-
|
|
10093
|
-
let i = o(e,
|
|
10088
|
+
function Ja(e, t, n, r) {
|
|
10089
|
+
qa.theme = r ? "dark" : "light", qa.toolbox = Ya(t, n);
|
|
10090
|
+
let i = o(e, qa);
|
|
10094
10091
|
return i.addChangeListener((e) => {
|
|
10095
|
-
if (e.type ===
|
|
10092
|
+
if (e.type === Si.STATE_CHANGE) {
|
|
10096
10093
|
let e = i.getAllBlocks();
|
|
10097
10094
|
for (let t of e) {
|
|
10098
10095
|
let e = t;
|
|
@@ -10100,21 +10097,21 @@ function Ya(e, t, n, r) {
|
|
|
10100
10097
|
}
|
|
10101
10098
|
}
|
|
10102
10099
|
setTimeout(() => {
|
|
10103
|
-
(0,
|
|
10100
|
+
(0, Zi.shadowBlockConversionChangeListener)(e);
|
|
10104
10101
|
}, 0);
|
|
10105
|
-
}),
|
|
10102
|
+
}), Xa(i, t, n), Za(i), i;
|
|
10106
10103
|
}
|
|
10107
|
-
function
|
|
10104
|
+
function Ya(e, t) {
|
|
10108
10105
|
let n;
|
|
10109
|
-
return e === "page" ? t === "v1" && (n =
|
|
10106
|
+
return e === "page" ? t === "v1" && (n = Ka) : e === "comp" ? t === "v1" && (n = Ha) : e === "func" ? t === "v1" && (n = Wa) : e === "flow" ? t === "v1" && (n = Ua) : e === "json" && t === "v1" && (n = Ga), console.assert(!!n, `invalid toolbox type=${e} version=${t}`), n;
|
|
10110
10107
|
}
|
|
10111
|
-
function
|
|
10108
|
+
function Xa(e, t, n) {
|
|
10112
10109
|
function r({ name: n, callback: r }) {
|
|
10113
10110
|
e.registerToolboxCategoryCallback(n, () => r(t));
|
|
10114
10111
|
}
|
|
10115
|
-
t === "page" ? n === "v1" && (r(
|
|
10112
|
+
t === "page" ? n === "v1" && (r(ha), r(ca), r(da), r(Ca), r(ba), r(_a), r(oa)) : t === "comp" ? n === "v1" && (r(ia), r(ca), r(da), r(Ca), r(ba), r(_a), r(oa)) : t === "func" ? n === "v1" && (r(ja), r(Oa), r(Ta), r(Na), r(Ca), r(ba)) : t === "flow" && n === "v1" && (r(ja), r(Oa), r(Ta), r(Na), r(Ca), r(ba));
|
|
10116
10113
|
}
|
|
10117
|
-
function
|
|
10114
|
+
function Za(e) {
|
|
10118
10115
|
let { router: t } = je;
|
|
10119
10116
|
e.registerButtonCallback("NO_COMPUTE", () => {
|
|
10120
10117
|
let e = t.resolve({ path: "/compute/" + Date.now() });
|
|
@@ -10130,9 +10127,9 @@ function Qa(e) {
|
|
|
10130
10127
|
}
|
|
10131
10128
|
//#endregion
|
|
10132
10129
|
//#region src/components/blockly/index.vue?vue&type=script&setup=true&lang.ts
|
|
10133
|
-
var
|
|
10130
|
+
var Qa = { class: "position-relative w-100 h-100" }, $a = /* @__PURE__ */ _t({
|
|
10134
10131
|
__name: "index",
|
|
10135
|
-
props: /* @__PURE__ */
|
|
10132
|
+
props: /* @__PURE__ */ bt({
|
|
10136
10133
|
type: {},
|
|
10137
10134
|
version: {},
|
|
10138
10135
|
locale: {},
|
|
@@ -10146,11 +10143,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10146
10143
|
scale: { required: !0 },
|
|
10147
10144
|
scaleModifiers: {}
|
|
10148
10145
|
}),
|
|
10149
|
-
emits: /* @__PURE__ */
|
|
10146
|
+
emits: /* @__PURE__ */ bt(["ready"], ["update:lock", "update:scale"]),
|
|
10150
10147
|
setup(e, { expose: t, emit: n }) {
|
|
10151
|
-
let { backgroundColor2: r } = Fe(), i =
|
|
10152
|
-
|
|
10153
|
-
let f =
|
|
10148
|
+
let { backgroundColor2: r } = Fe(), i = Nt(e, "lock"), a = Nt(e, "scale"), o = n, s = `blocklyEditor${Mt()}`, c = Dt(), u = Pt("parentContainer"), ee = Pt("clean"), te = Pt("navigator"), d = {};
|
|
10149
|
+
Ii(d);
|
|
10150
|
+
let f = Dt(!0), ne = Dt(!1), p = E(() => e.type === "json" ? "tree" : "list"), re = E(() => ({
|
|
10154
10151
|
width: "100%",
|
|
10155
10152
|
height: "calc(100% - 48px)"
|
|
10156
10153
|
})), m = E(() => ({
|
|
@@ -10193,27 +10190,27 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10193
10190
|
top: 0,
|
|
10194
10191
|
left: 0,
|
|
10195
10192
|
zIndex: 3e3
|
|
10196
|
-
})), { open: ue } = Le(`blocklyEditorFlyout${
|
|
10197
|
-
|
|
10193
|
+
})), { open: ue } = Le(`blocklyEditorFlyout${Mt()}`);
|
|
10194
|
+
wt(async () => {
|
|
10198
10195
|
if (!c.value || !u.value) {
|
|
10199
10196
|
console.assert(!1);
|
|
10200
10197
|
return;
|
|
10201
10198
|
}
|
|
10202
|
-
se(u.value), await
|
|
10199
|
+
se(u.value), await Ht(e.locale), d.workspace = Ja(c.value, e.type, e.version, e.dark), d.workspace.addChangeListener(x.disableOrphans), d.workspace.addChangeListener(de);
|
|
10203
10200
|
let t = document.querySelector(`#${s} .blocklyFlyout`);
|
|
10204
10201
|
new MutationObserver((e) => {
|
|
10205
10202
|
e.forEach((e) => {
|
|
10206
10203
|
e.type === "attributes" && e.attributeName === "style" && (ue.value = d.workspace.getFlyout().isVisible());
|
|
10207
10204
|
});
|
|
10208
|
-
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), ge(), _e(), await
|
|
10209
|
-
}),
|
|
10205
|
+
}).observe(t, { attributes: !0 }), ue.value = d.workspace.getFlyout().isVisible(), ge(), _e(), await St(), o("ready");
|
|
10206
|
+
}), Ct(() => {
|
|
10210
10207
|
ue.value = !1;
|
|
10211
10208
|
}), Se(c, () => {
|
|
10212
10209
|
d.workspace && le(d.workspace);
|
|
10213
10210
|
});
|
|
10214
10211
|
async function de(e) {
|
|
10215
10212
|
if (e.type === x.FINISHED_LOADING) {
|
|
10216
|
-
|
|
10213
|
+
Ti(), setTimeout(() => {
|
|
10217
10214
|
te.value?.update();
|
|
10218
10215
|
}, 0), f.value = !1;
|
|
10219
10216
|
return;
|
|
@@ -10229,18 +10226,18 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10229
10226
|
}
|
|
10230
10227
|
}
|
|
10231
10228
|
let fe = (t) => {
|
|
10232
|
-
f.value = !0, e.type === "json" ?
|
|
10233
|
-
}, pe = () => e.type === "json" ?
|
|
10229
|
+
f.value = !0, e.type === "json" ? zi(t, d.workspace) : l.workspaces.load(t, d.workspace);
|
|
10230
|
+
}, pe = () => e.type === "json" ? Bi(d.workspace) : l.workspaces.save(d.workspace), me = (e) => {
|
|
10234
10231
|
l.blocks.append(e, d.workspace);
|
|
10235
10232
|
}, _ = () => {
|
|
10236
10233
|
if (e.type === "json") console.assert(!1);
|
|
10237
10234
|
else return g.workspaceToCode(d.workspace);
|
|
10238
|
-
}, he = () =>
|
|
10235
|
+
}, he = () => Pi(d.workspace), ge = () => {
|
|
10239
10236
|
d.workspace.setIsReadOnly(i.value), d.workspace.isReadOnly() && (ue.value = !1);
|
|
10240
10237
|
}, _e = () => {
|
|
10241
10238
|
d.workspace.setScale(a.value);
|
|
10242
10239
|
}, ve = () => {
|
|
10243
|
-
x.fire(new (x.get(
|
|
10240
|
+
x.fire(new (x.get(Si.STATE_CHANGE))(d.workspace));
|
|
10244
10241
|
}, ye = () => {
|
|
10245
10242
|
ee.value?.cleanWorkspace();
|
|
10246
10243
|
}, be = () => {
|
|
@@ -10248,19 +10245,19 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10248
10245
|
}, xe = () => {
|
|
10249
10246
|
te.value && (te.value.open = !0);
|
|
10250
10247
|
};
|
|
10251
|
-
return
|
|
10248
|
+
return wt(() => {
|
|
10252
10249
|
Ae.on("cleanWorkspace", ye), Ae.on("toggleBlocklyLock", be), Ae.on("openBlocklyNavigator", xe);
|
|
10253
|
-
}),
|
|
10250
|
+
}), Ct(() => {
|
|
10254
10251
|
Ae.off("cleanWorkspace", ye), Ae.off("toggleBlocklyLock", be), Ae.off("openBlocklyNavigator", xe);
|
|
10255
|
-
}),
|
|
10256
|
-
|
|
10257
|
-
}),
|
|
10258
|
-
|
|
10259
|
-
}),
|
|
10252
|
+
}), Ft(() => e.locale, (e) => {
|
|
10253
|
+
Ht(e);
|
|
10254
|
+
}), Ft(() => e.dark, (e) => {
|
|
10255
|
+
Oi(e ? "dark" : "light");
|
|
10256
|
+
}), Ft(ue, (e) => {
|
|
10260
10257
|
e || d.workspace?.hideChaff();
|
|
10261
|
-
}),
|
|
10258
|
+
}), Ft(i, () => {
|
|
10262
10259
|
ge();
|
|
10263
|
-
}),
|
|
10260
|
+
}), Ft(a, () => {
|
|
10264
10261
|
_e();
|
|
10265
10262
|
}), t({
|
|
10266
10263
|
loading: f,
|
|
@@ -10272,14 +10269,14 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10272
10269
|
fireStateChange: ve
|
|
10273
10270
|
}), (e, t) => {
|
|
10274
10271
|
let n = M("v-icon"), r = M("x-loading");
|
|
10275
|
-
return j(), D("div",
|
|
10272
|
+
return j(), D("div", Qa, [
|
|
10276
10273
|
O("div", {
|
|
10277
10274
|
id: s,
|
|
10278
10275
|
ref_key: "blocklyDiv",
|
|
10279
10276
|
ref: c,
|
|
10280
10277
|
style: A(re.value)
|
|
10281
10278
|
}, null, 4),
|
|
10282
|
-
O("div", { style: A(m.value) }, [
|
|
10279
|
+
O("div", { style: A(m.value) }, [kt(e.$slots, "bottom")], 4),
|
|
10283
10280
|
ne.value ? (j(), D("div", {
|
|
10284
10281
|
key: 0,
|
|
10285
10282
|
class: "d-flex flex-column justify-center align-center",
|
|
@@ -10287,22 +10284,22 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10287
10284
|
}, [k(n, {
|
|
10288
10285
|
icon: "mdi-delete",
|
|
10289
10286
|
size: "x-large"
|
|
10290
|
-
})], 4)) :
|
|
10291
|
-
f.value ?
|
|
10287
|
+
})], 4)) : gt("", !0),
|
|
10288
|
+
f.value ? gt("", !0) : (j(), D("div", {
|
|
10292
10289
|
key: 1,
|
|
10293
10290
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
10294
10291
|
style: A(ie.value)
|
|
10295
10292
|
}, [
|
|
10296
|
-
k(
|
|
10293
|
+
k(Ri, {
|
|
10297
10294
|
ref_key: "clean",
|
|
10298
10295
|
ref: ee,
|
|
10299
10296
|
lock: i.value
|
|
10300
10297
|
}, null, 8, ["lock"]),
|
|
10301
|
-
k(
|
|
10298
|
+
k(Vi, {
|
|
10302
10299
|
modelValue: i.value,
|
|
10303
10300
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e
|
|
10304
10301
|
}, null, 8, ["modelValue"]),
|
|
10305
|
-
k(
|
|
10302
|
+
k(Xi, {
|
|
10306
10303
|
ref_key: "navigator",
|
|
10307
10304
|
ref: te,
|
|
10308
10305
|
lock: i.value,
|
|
@@ -10312,11 +10309,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10312
10309
|
i.value ? (j(), D("div", {
|
|
10313
10310
|
key: 2,
|
|
10314
10311
|
style: A(oe.value)
|
|
10315
|
-
}, null, 4)) :
|
|
10312
|
+
}, null, 4)) : gt("", !0),
|
|
10316
10313
|
i.value ? (j(), D("div", {
|
|
10317
10314
|
key: 3,
|
|
10318
10315
|
style: A(ae.value)
|
|
10319
|
-
}, null, 4)) :
|
|
10316
|
+
}, null, 4)) : gt("", !0),
|
|
10320
10317
|
O("div", {
|
|
10321
10318
|
ref_key: "parentContainer",
|
|
10322
10319
|
ref: u,
|
|
@@ -10329,7 +10326,7 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10329
10326
|
]);
|
|
10330
10327
|
};
|
|
10331
10328
|
}
|
|
10332
|
-
}),
|
|
10329
|
+
}), eo = /* @__PURE__ */ _t({
|
|
10333
10330
|
__name: "index",
|
|
10334
10331
|
props: { code: {} },
|
|
10335
10332
|
setup(e) {
|
|
@@ -10338,7 +10335,7 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10338
10335
|
let n = xe.component, { backgroundColor2: r } = Fe();
|
|
10339
10336
|
return (e, i) => {
|
|
10340
10337
|
let a = M("v-sheet");
|
|
10341
|
-
return j(),
|
|
10338
|
+
return j(), ht(a, {
|
|
10342
10339
|
color: N(r),
|
|
10343
10340
|
height: "100%",
|
|
10344
10341
|
width: "100%"
|
|
@@ -10351,10 +10348,10 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10351
10348
|
}, 8, ["color"]);
|
|
10352
10349
|
};
|
|
10353
10350
|
}
|
|
10354
|
-
}),
|
|
10351
|
+
}), to = { class: "text-body-large" }, no = { class: "w-100 h-100 overflow-auto" }, ro = /* @__PURE__ */ _t({
|
|
10355
10352
|
__name: "index",
|
|
10356
10353
|
setup(e) {
|
|
10357
|
-
let { t } =
|
|
10354
|
+
let { t } = zt(), { sysBarAvail: n } = Ie(), { backgroundColor0: r, backgroundColor2: i } = Fe(), a = Dt(""), o = E(() => {
|
|
10358
10355
|
let e = 48;
|
|
10359
10356
|
return n.value && (e += 24), {
|
|
10360
10357
|
position: "relative",
|
|
@@ -10365,14 +10362,14 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10365
10362
|
});
|
|
10366
10363
|
return (e, c) => {
|
|
10367
10364
|
let l = M("v-sheet"), u = M("v-btn"), ee = M("v-spacer"), te = M("v-dialog");
|
|
10368
|
-
return j(),
|
|
10365
|
+
return j(), ht(te, {
|
|
10369
10366
|
modelValue: N(s),
|
|
10370
|
-
"onUpdate:modelValue": c[1] ||= (e) =>
|
|
10367
|
+
"onUpdate:modelValue": c[1] ||= (e) => yt(s) ? s.value = e : null,
|
|
10371
10368
|
fullscreen: "",
|
|
10372
10369
|
"no-click-animation": "",
|
|
10373
10370
|
persistent: "",
|
|
10374
10371
|
transition: "dialog-bottom-transition",
|
|
10375
|
-
onKeydown: c[2] ||= Rt(
|
|
10372
|
+
onKeydown: c[2] ||= Lt(Rt((e) => s.value = !1, ["stop", "prevent"]), ["esc"])
|
|
10376
10373
|
}, {
|
|
10377
10374
|
default: P(() => [k(l, {
|
|
10378
10375
|
color: N(r),
|
|
@@ -10380,11 +10377,11 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10380
10377
|
width: "100%"
|
|
10381
10378
|
}, {
|
|
10382
10379
|
default: P(() => [
|
|
10383
|
-
N(n) ? (j(),
|
|
10380
|
+
N(n) ? (j(), ht(l, {
|
|
10384
10381
|
key: 0,
|
|
10385
10382
|
color: N(i),
|
|
10386
10383
|
height: 24
|
|
10387
|
-
}, null, 8, ["color"])) :
|
|
10384
|
+
}, null, 8, ["color"])) : gt("", !0),
|
|
10388
10385
|
k(l, {
|
|
10389
10386
|
class: "d-flex align-center px-2",
|
|
10390
10387
|
color: N(i),
|
|
@@ -10397,12 +10394,12 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10397
10394
|
variant: "text",
|
|
10398
10395
|
onClick: c[0] ||= (e) => s.value = !1
|
|
10399
10396
|
}),
|
|
10400
|
-
O("span",
|
|
10397
|
+
O("span", to, jt(N(t)("x-block-lib.dlg.source.title")), 1),
|
|
10401
10398
|
k(ee)
|
|
10402
10399
|
]),
|
|
10403
10400
|
_: 1
|
|
10404
10401
|
}, 8, ["color"]),
|
|
10405
|
-
O("div", { style: A(o.value) }, [O("div",
|
|
10402
|
+
O("div", { style: A(o.value) }, [O("div", no, [k(eo, { code: a.value }, null, 8, ["code"])])], 4)
|
|
10406
10403
|
]),
|
|
10407
10404
|
_: 1
|
|
10408
10405
|
}, 8, ["color"])]),
|
|
@@ -10410,19 +10407,19 @@ var $a = { class: "position-relative w-100 h-100" }, eo = /* @__PURE__ */ vt({
|
|
|
10410
10407
|
}, 8, ["modelValue"]);
|
|
10411
10408
|
};
|
|
10412
10409
|
}
|
|
10413
|
-
}),
|
|
10414
|
-
e.component("XBlockly",
|
|
10410
|
+
}), io = (e) => {
|
|
10411
|
+
e.component("XBlockly", $a), e.component("XSourceDlg", ro);
|
|
10415
10412
|
};
|
|
10416
10413
|
//#endregion
|
|
10417
10414
|
//#region src/i18n/index.ts
|
|
10418
|
-
async function
|
|
10419
|
-
return (await
|
|
10420
|
-
"./locales/en/index.ts": () => import("./i18n-en.
|
|
10421
|
-
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.
|
|
10415
|
+
async function ao(e) {
|
|
10416
|
+
return (await Vt(/* @__PURE__ */ Object.assign({
|
|
10417
|
+
"./locales/en/index.ts": () => import("./i18n-en.may04z0x.js").then((e) => e.t),
|
|
10418
|
+
"./locales/zhHans/index.ts": () => import("./i18n-zhHans.co0odqoc.js").then((e) => e.t)
|
|
10422
10419
|
}), `./locales/${e}/index.ts`, 4)).default;
|
|
10423
10420
|
}
|
|
10424
10421
|
//#endregion
|
|
10425
10422
|
//#region src/index.ts
|
|
10426
|
-
var
|
|
10423
|
+
var oo = { install: io };
|
|
10427
10424
|
//#endregion
|
|
10428
|
-
export {
|
|
10425
|
+
export { $a as XBlockly, oo as default, nr as getCallMethodInfo, or as getImplementMethodInfo, W as getNodeInfo, Yn as getOnEventInfo, hr as getPropertyInfo, Qn as getTriggerEventInfo, io as install, ao as loadLocaleMessageBlock };
|