x-block-lib 0.9.8 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/utils/app/event.d.ts +1 -0
- package/dist/core/utils/app/method.d.ts +2 -0
- package/dist/index.js +782 -653
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode("pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-a77ed323]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}")),document.head.appendChild(l)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { E as v, r as Sn, M as
|
|
2
|
+
import { E as v, r as Sn, M as Vo, s as xo, a as wo, X as Hn, u as L, B as I, j as i, O as h, F as O, b as en, i as k, c as kt, d as Fo, e as $, f as g, g as Yo, h as Z, k as vt, p as jt, l as pt, m as Ln, n as x, C as Gn, N as _t, o as Ko, P as nn, q as We, V as xt, t as Wn, W as $o, v as Ho, w as Go, S as Wo, x as jo, y as Xo, z as ne, T as Le, A as jn, D as Jo, G as qo, H as Xn, I as Qo, J as zo, K as Zo, L as ts, Q as es, R as ns, U as os, Y as ss } from "./vendor.omuaiksa.js";
|
|
3
3
|
import { globalState as A } from "x-state-lib";
|
|
4
|
-
import { globalObjects as Nt, openConfirmDlg as
|
|
5
|
-
import { pkgs as
|
|
6
|
-
import { provide as
|
|
4
|
+
import { globalObjects as Nt, openConfirmDlg as is, openPromptDlg as as, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as Vt } from "x-essential-lib";
|
|
5
|
+
import { pkgs as _e, parsePixelStr as cs, parsePercentStr as rs, getTag as $t, unwrapEventId as Qn, elements as b, unwrapEventKeyOfCustomSlot as Bt, unwrapEventKeyOfElementSlot as ls, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as le, unwrapSlotId as Dt, makeEventKeyOfElementSlot as us, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as Be, unwrapMethodKeyOfCustomSlot as de, unwrapMethodKeyOfElementSlot as ps, makeMethodId as ft, makeMethodKeyOfElementSlot as _s, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as ds, makePropertyId as Tt, toPropertyName as eo, addIndent as hs, getImplementMethodName as no, makeTriggerId as Pt } from "x-runtime-lib";
|
|
6
|
+
import { provide as fs, inject as ms, defineComponent as mt, computed as H, resolveComponent as K, createBlock as dt, openBlock as V, unref as F, withCtx as ht, createVNode as U, mergeProps as mn, useModel as Qt, ref as wt, resolveDirective as Ts, withDirectives as Es, createElementBlock as lt, normalizeStyle as ot, createElementVNode as Q, createCommentVNode as Et, toDisplayString as zt, withModifiers as Jt, mergeModels as sn, Fragment as oo, renderList as gs, useId as an, onUnmounted as As, useTemplateRef as qt, withKeys as so, isRef as ue, onMounted as bn, nextTick as Is, onBeforeUnmount as Bn, watch as Gt, renderSlot as ys } from "vue";
|
|
7
7
|
import { useDisplay as Tn } from "vuetify";
|
|
8
|
-
import { useI18n as
|
|
8
|
+
import { useI18n as se } from "vue-i18n";
|
|
9
9
|
var R = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(R || {});
|
|
10
|
-
class
|
|
10
|
+
class io extends v.Abstract {
|
|
11
11
|
isBlank = !0;
|
|
12
12
|
}
|
|
13
13
|
Sn.register(
|
|
14
14
|
Sn.Type.EVENT,
|
|
15
15
|
"state_change",
|
|
16
|
-
|
|
16
|
+
io
|
|
17
17
|
);
|
|
18
|
-
const
|
|
18
|
+
const ao = (t, e, n) => {
|
|
19
19
|
const o = t[e];
|
|
20
20
|
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((s, a) => {
|
|
21
21
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
async function Pn(t) {
|
|
25
|
-
const e = await
|
|
26
|
-
|
|
25
|
+
const e = await ao(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.dmlvm3cp.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.dvv4wraq.js") }), `./msg/${t}.ts`, 3);
|
|
26
|
+
xo(e.default);
|
|
27
27
|
}
|
|
28
28
|
function E(t) {
|
|
29
|
-
return
|
|
29
|
+
return Vo[t] ?? t;
|
|
30
30
|
}
|
|
31
|
-
const Ft = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==",
|
|
31
|
+
const Ft = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", he = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
|
|
32
32
|
function Re(t) {
|
|
33
33
|
const e = t.lastIndexOf("V");
|
|
34
34
|
if (e <= 0 || e >= t.length - 1)
|
|
35
35
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
36
|
-
const n =
|
|
36
|
+
const n = wo(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
|
|
37
37
|
return `${n}_${o}`;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function fe(t) {
|
|
40
40
|
const e = t.lastIndexOf("V");
|
|
41
41
|
if (e <= 0 || e >= t.length - 1)
|
|
42
42
|
return console.assert(!1, `invalid key=${t}`), "";
|
|
43
43
|
const n = t.substring(0, e - 1), o = n[0].toUpperCase(), s = n.substring(1);
|
|
44
44
|
return `${o}${s}`;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function B(t) {
|
|
47
47
|
return t.length <= 0 && t.push([E("NO_OPTION"), ""]), t;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Os(t) {
|
|
50
50
|
let e = 0;
|
|
51
51
|
for (; t; )
|
|
52
52
|
e++, t = t.getParent();
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function co(t) {
|
|
56
56
|
return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
|
|
57
57
|
}
|
|
58
58
|
function De(t, e) {
|
|
@@ -81,20 +81,20 @@ function Rn(t) {
|
|
|
81
81
|
const e = `<block type="math_number_v1"><field name="NUM">${t}</field></block>`;
|
|
82
82
|
return L.xml.textToDom(e);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function vs(t) {
|
|
85
85
|
return L.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
|
|
86
86
|
}
|
|
87
87
|
function cn(t, e) {
|
|
88
88
|
let n = null;
|
|
89
|
-
return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n =
|
|
89
|
+
return e === "string" ? n = je("") : e === "integer" || e === "decimal" ? n = Rn(0) : e === "boolean" ? n = vs() : e === "enum" || e === "dateTime" ? n = je("") : console.assert(!1), n ? Hn.domToBlock(n, t) : null;
|
|
90
90
|
}
|
|
91
91
|
function St(t) {
|
|
92
92
|
return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (t === "any" || console.assert(!1), null);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return t.array ? "Array" : t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ?
|
|
94
|
+
function Cs(t) {
|
|
95
|
+
return t.array ? "Array" : t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? fe(t.items) : t.ui === "multiTypes" ? fe(t.types) : t.ui === "selectComp" ? "Comp" : t.ui === "selectSlot" ? "Slot" : t.ui === "selectAdaptSlot" ? "AdaptSlot" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function ro(t) {
|
|
98
98
|
return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
|
|
99
99
|
}
|
|
100
100
|
function En(t, e, n, o) {
|
|
@@ -133,47 +133,47 @@ function yt(t) {
|
|
|
133
133
|
const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
|
|
134
134
|
return L.xml.textToDom(e);
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function me(t) {
|
|
137
137
|
const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
|
|
138
138
|
return L.xml.textToDom(e);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function Te(t) {
|
|
141
141
|
const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
|
|
142
142
|
return L.xml.textToDom(e);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function lo() {
|
|
145
145
|
return L.xml.textToDom('<shadow type="list_create_v1"></shadow>');
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function ks() {
|
|
148
148
|
return L.xml.textToDom('<shadow type="object_create_v1"></shadow>');
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ns(t) {
|
|
151
151
|
const e = `<shadow type="${Re(t)}"></shadow>`;
|
|
152
152
|
return L.xml.textToDom(e);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Ss(t) {
|
|
155
155
|
const e = `<shadow type="${Re(t)}"></shadow>`;
|
|
156
156
|
return L.xml.textToDom(e);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Ls() {
|
|
159
159
|
return L.xml.textToDom('<shadow type="select_comp_v1"></shadow>');
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function bs() {
|
|
162
162
|
return L.xml.textToDom('<shadow type="select_slot_v1"></shadow>');
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Bs(t) {
|
|
165
165
|
const e = `<shadow type="color_picker_v1"><field name="COLOR">${t}</field></shadow>`;
|
|
166
166
|
return L.xml.textToDom(e);
|
|
167
167
|
}
|
|
168
168
|
function rt(t) {
|
|
169
169
|
let e = null;
|
|
170
|
-
return t === "string" ? e = yt("") : t === "number" ? e =
|
|
170
|
+
return t === "string" ? e = yt("") : t === "number" ? e = me(0) : t === "boolean" ? e = Te(!1) : t === "array" ? e = lo() : t === "object" ? e = ks() : t === "any" ? e = null : console.assert(!1), e;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Ps(t) {
|
|
173
173
|
let e = null;
|
|
174
|
-
return t.array ? e =
|
|
174
|
+
return t.array ? e = lo() : t.ui === "dummy" ? e = null : t.ui === "strInput" ? e = yt(t.default) : t.ui === "numInput" ? e = me(t.default) : t.ui === "switch" ? e = Te(t.default) : t.ui === "select" ? e = Ns(t.items) : t.ui === "multiTypes" ? e = Ss(t.types) : t.ui === "selectComp" ? e = Ls() : t.ui === "selectSlot" ? e = bs() : t.ui === "colorPicker" ? e = Bs(t.default ?? "#ff0000") : console.assert(!1), e;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Rs() {
|
|
177
177
|
const { activeObject: t, activePage: e } = A.app, n = [];
|
|
178
178
|
if (t.type === "page" && e.meta.arguments)
|
|
179
179
|
for (const { id: o, name: s, type: a } of e.meta.arguments)
|
|
@@ -192,13 +192,13 @@ function Dn(t) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ds() {
|
|
196
196
|
const t = [];
|
|
197
|
-
return
|
|
197
|
+
return Rs().forEach(({ key: n, name: o }) => {
|
|
198
198
|
t.push([o, n]);
|
|
199
|
-
}),
|
|
199
|
+
}), B(t);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Ms = {
|
|
202
202
|
init: function() {
|
|
203
203
|
this.argument = {
|
|
204
204
|
key: "",
|
|
@@ -220,7 +220,7 @@ const Vs = {
|
|
|
220
220
|
}, 0);
|
|
221
221
|
},
|
|
222
222
|
genArgumentOpts_: function() {
|
|
223
|
-
return
|
|
223
|
+
return Ds();
|
|
224
224
|
},
|
|
225
225
|
onchange: function(t) {
|
|
226
226
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -256,13 +256,13 @@ const Vs = {
|
|
|
256
256
|
this.setWarningText(null);
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
I.get_page_argument_v1 =
|
|
259
|
+
I.get_page_argument_v1 = Ms;
|
|
260
260
|
i.forBlock.get_page_argument_v1 = function(t) {
|
|
261
261
|
const e = t;
|
|
262
262
|
return [`__getPageArgumentV1__(${i.quote_(e.argument.key)})`, h.FUNCTION_CALL];
|
|
263
263
|
};
|
|
264
|
-
const
|
|
265
|
-
const n = Re(t), o =
|
|
264
|
+
const Us = (t, e) => {
|
|
265
|
+
const n = Re(t), o = fe(t);
|
|
266
266
|
I[n] = {
|
|
267
267
|
init: function() {
|
|
268
268
|
this.appendDummyInput().appendField(
|
|
@@ -274,20 +274,20 @@ const xs = (t, e) => {
|
|
|
274
274
|
const { i18n: s } = Nt, a = [];
|
|
275
275
|
for (const { title: c, value: l } of e)
|
|
276
276
|
a.push([s.global.t(c), l]);
|
|
277
|
-
return
|
|
277
|
+
return B(a);
|
|
278
278
|
}
|
|
279
279
|
}, i.forBlock[n] = function(s) {
|
|
280
280
|
const a = i.quote_, c = s.getFieldValue("ITEM");
|
|
281
281
|
return [a(c), h.ATOMIC];
|
|
282
282
|
};
|
|
283
283
|
};
|
|
284
|
-
for (const t in
|
|
285
|
-
const e =
|
|
284
|
+
for (const t in _e) {
|
|
285
|
+
const e = _e[t];
|
|
286
286
|
for (const n in e.items)
|
|
287
|
-
|
|
287
|
+
Us(n, e.items[n]);
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
const n = Re(t), o =
|
|
289
|
+
const Vs = (t, e) => {
|
|
290
|
+
const n = Re(t), o = fe(t);
|
|
291
291
|
I[n] = {
|
|
292
292
|
init: function() {
|
|
293
293
|
this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
|
|
@@ -307,7 +307,7 @@ const ws = (t, e) => {
|
|
|
307
307
|
const { i18n: s } = Nt, a = [];
|
|
308
308
|
for (const { title: c, value: l } of e)
|
|
309
309
|
a.push([s.global.t(c), l]);
|
|
310
|
-
return
|
|
310
|
+
return B(a);
|
|
311
311
|
},
|
|
312
312
|
onchange: function(s) {
|
|
313
313
|
if (s.type === R.STATE_CHANGE)
|
|
@@ -339,7 +339,7 @@ const ws = (t, e) => {
|
|
|
339
339
|
s.removeField("VALUE", !0), s.removeField("SUFFIX", !0);
|
|
340
340
|
let l, p;
|
|
341
341
|
if (c.ui === "pixelInput") {
|
|
342
|
-
const _ =
|
|
342
|
+
const _ = cs(this.value) ?? 0;
|
|
343
343
|
l = new en(
|
|
344
344
|
_,
|
|
345
345
|
c.min,
|
|
@@ -350,7 +350,7 @@ const ws = (t, e) => {
|
|
|
350
350
|
}
|
|
351
351
|
), p = "px";
|
|
352
352
|
} else if (c.ui === "percentInput") {
|
|
353
|
-
const _ =
|
|
353
|
+
const _ = rs(this.value) ?? 0;
|
|
354
354
|
l = new en(
|
|
355
355
|
_,
|
|
356
356
|
c.min,
|
|
@@ -376,38 +376,38 @@ const ws = (t, e) => {
|
|
|
376
376
|
return [a(s.value), h.ATOMIC];
|
|
377
377
|
};
|
|
378
378
|
};
|
|
379
|
-
for (const t in
|
|
380
|
-
const e =
|
|
379
|
+
for (const t in _e) {
|
|
380
|
+
const e = _e[t];
|
|
381
381
|
for (const n in e.types)
|
|
382
|
-
|
|
382
|
+
Vs(n, e.types[n]);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const xs = L.xml, ws = {
|
|
385
385
|
init: function() {
|
|
386
386
|
this.appendDummyInput().appendField(
|
|
387
387
|
"%{BKY_APP_V1_APP_BIND_CONTAINER_TITLE}"
|
|
388
388
|
), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
I.app_bind_container_v1 =
|
|
392
|
-
const
|
|
391
|
+
I.app_bind_container_v1 = ws;
|
|
392
|
+
const Fs = {
|
|
393
393
|
init: function() {
|
|
394
394
|
this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
|
-
I.app_bind_item_v1 =
|
|
398
|
-
const
|
|
397
|
+
I.app_bind_item_v1 = Fs;
|
|
398
|
+
const Ys = {
|
|
399
399
|
init: function() {
|
|
400
400
|
this.itemCount_ = 0, this.setMutator(
|
|
401
401
|
new kt.MutatorIcon(
|
|
402
402
|
["app_bind_item_v1"],
|
|
403
403
|
this
|
|
404
404
|
)
|
|
405
|
-
), this.debounce_ =
|
|
405
|
+
), this.debounce_ = Fo(() => {
|
|
406
406
|
this.checkWarning_();
|
|
407
407
|
}, 250), this.setStyle("event_blocks"), this.setTooltip("%{BKY_APP_V1_APP_BIND_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_APP_BIND_HELPURL}"), this.updateShape_();
|
|
408
408
|
},
|
|
409
409
|
mutationToDom: function() {
|
|
410
|
-
const t =
|
|
410
|
+
const t = xs.createElement("mutation");
|
|
411
411
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
412
412
|
},
|
|
413
413
|
domToMutation: function(t) {
|
|
@@ -513,11 +513,11 @@ const $s = {
|
|
|
513
513
|
this.setWarningText(null);
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
I.app_bind_v1 =
|
|
516
|
+
I.app_bind_v1 = Ys;
|
|
517
517
|
i.forBlock.app_bind_v1 = function() {
|
|
518
518
|
return "";
|
|
519
519
|
};
|
|
520
|
-
function
|
|
520
|
+
function uo() {
|
|
521
521
|
const t = [], { appList: e } = A.app;
|
|
522
522
|
for (const { id: n, name: o } of e)
|
|
523
523
|
t.push({ id: n, name: o });
|
|
@@ -531,13 +531,13 @@ function Mn(t) {
|
|
|
531
531
|
name: n.name
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Ks() {
|
|
535
535
|
const t = [];
|
|
536
|
-
return
|
|
536
|
+
return uo().forEach(({ id: n, name: o }) => {
|
|
537
537
|
t.push([o, n]);
|
|
538
|
-
}),
|
|
538
|
+
}), B(t);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function po() {
|
|
541
541
|
const { activeApp: t } = A.app, e = [{ id: "", name: "" }];
|
|
542
542
|
for (const { id: n, name: o } of t.comps)
|
|
543
543
|
e.push({ id: n, name: o });
|
|
@@ -554,12 +554,12 @@ function Un(t) {
|
|
|
554
554
|
name: n.name
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function $s() {
|
|
558
558
|
const { i18n: t } = Nt, e = [];
|
|
559
|
-
return
|
|
559
|
+
return po().forEach(({ id: o, name: s }) => {
|
|
560
560
|
let a = s;
|
|
561
561
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
562
|
-
}),
|
|
562
|
+
}), B(e);
|
|
563
563
|
}
|
|
564
564
|
function Y(t) {
|
|
565
565
|
if (!t)
|
|
@@ -575,11 +575,70 @@ function w(t) {
|
|
|
575
575
|
{ key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
|
|
576
576
|
];
|
|
577
577
|
}
|
|
578
|
+
function Hs(t) {
|
|
579
|
+
let e = !0;
|
|
580
|
+
switch (t) {
|
|
581
|
+
case "":
|
|
582
|
+
break;
|
|
583
|
+
// element
|
|
584
|
+
case "elementEvent":
|
|
585
|
+
case "elementPropertyChangeEvent":
|
|
586
|
+
case "elementSlotEvent":
|
|
587
|
+
case "elementSlotPropertyChangeEvent":
|
|
588
|
+
case "multipleElementSlotEvent":
|
|
589
|
+
case "multipleElementSlotPropertyChangeEvent":
|
|
590
|
+
break;
|
|
591
|
+
// ref
|
|
592
|
+
case "refEvent":
|
|
593
|
+
e = !1;
|
|
594
|
+
break;
|
|
595
|
+
case "refPropertyChangeEvent":
|
|
596
|
+
break;
|
|
597
|
+
case "multipleRefEvent":
|
|
598
|
+
e = !1;
|
|
599
|
+
break;
|
|
600
|
+
case "multipleRefPropertyChangeEvent":
|
|
601
|
+
break;
|
|
602
|
+
// custom slot
|
|
603
|
+
case "customSlotEvent":
|
|
604
|
+
e = !1;
|
|
605
|
+
break;
|
|
606
|
+
case "customSlotPropertyChangeEvent":
|
|
607
|
+
break;
|
|
608
|
+
case "multipleCustomSlotEvent":
|
|
609
|
+
e = !1;
|
|
610
|
+
break;
|
|
611
|
+
case "multipleCustomSlotPropertyChangeEvent":
|
|
612
|
+
break;
|
|
613
|
+
// custom
|
|
614
|
+
case "customEvent":
|
|
615
|
+
e = !1;
|
|
616
|
+
break;
|
|
617
|
+
case "customPropertyChangeEvent":
|
|
618
|
+
break;
|
|
619
|
+
// adapt slot
|
|
620
|
+
case "elementAdaptSlotEvent":
|
|
621
|
+
break;
|
|
622
|
+
case "elementAdaptSlotPropertyChangeEvent":
|
|
623
|
+
break;
|
|
624
|
+
case "customAdaptSlotEvent":
|
|
625
|
+
e = !1;
|
|
626
|
+
break;
|
|
627
|
+
case "customAdaptSlotPropertyChangeEvent":
|
|
628
|
+
break;
|
|
629
|
+
// state
|
|
630
|
+
case "stateChangeEvent":
|
|
631
|
+
break;
|
|
632
|
+
default:
|
|
633
|
+
console.assert(!1, `not implemented kind=${t}`);
|
|
634
|
+
}
|
|
635
|
+
return e;
|
|
636
|
+
}
|
|
578
637
|
function rn(t) {
|
|
579
638
|
const { properties: e } = A.runtime, { activeObject: n, activePage: o, activeComp: s, depends: a } = A.app, c = [], l = $t(n.type, n.subtype), p = n.nodes.find((r) => r.id === t);
|
|
580
639
|
if (!p)
|
|
581
640
|
return c;
|
|
582
|
-
const _ =
|
|
641
|
+
const _ = b[p.key];
|
|
583
642
|
if (!_)
|
|
584
643
|
return console.assert(!1, "invalid element", p.key), c;
|
|
585
644
|
if (_.events)
|
|
@@ -596,7 +655,7 @@ function rn(t) {
|
|
|
596
655
|
id: M("elementPropertyChangeEvent", t, r),
|
|
597
656
|
kind: "elementPropertyChangeEvent",
|
|
598
657
|
names: u,
|
|
599
|
-
params: w(
|
|
658
|
+
params: w(co(d))
|
|
600
659
|
});
|
|
601
660
|
if (at(_.key) && p.comp) {
|
|
602
661
|
const r = a[p.comp];
|
|
@@ -665,7 +724,7 @@ function rn(t) {
|
|
|
665
724
|
id: M(
|
|
666
725
|
"customSlotPropertyChangeEvent",
|
|
667
726
|
t,
|
|
668
|
-
|
|
727
|
+
le(s.id, r.id, u.id)
|
|
669
728
|
),
|
|
670
729
|
kind: "customSlotPropertyChangeEvent",
|
|
671
730
|
names: [r.name, u.name],
|
|
@@ -695,7 +754,7 @@ function rn(t) {
|
|
|
695
754
|
id: M(
|
|
696
755
|
"multipleCustomSlotPropertyChangeEvent",
|
|
697
756
|
t,
|
|
698
|
-
|
|
757
|
+
le(s.id, r.id, u.id)
|
|
699
758
|
),
|
|
700
759
|
kind: "multipleCustomSlotPropertyChangeEvent",
|
|
701
760
|
names: [r.name, u.name],
|
|
@@ -721,18 +780,18 @@ function rn(t) {
|
|
|
721
780
|
if (N(_.key) && n.type === "comp" && p.adaptSlot) {
|
|
722
781
|
const { kind: r, mainKey: u, slotKey: d } = Dt(p.adaptSlot);
|
|
723
782
|
if (r === "elementSlot") {
|
|
724
|
-
const f =
|
|
783
|
+
const f = b[u];
|
|
725
784
|
if (f && f.slots) {
|
|
726
785
|
const m = f.slots.find((T) => T.key === d);
|
|
727
786
|
if (m && m.events)
|
|
728
787
|
for (const T of m.events)
|
|
729
788
|
c.push({
|
|
730
789
|
id: M(
|
|
731
|
-
"
|
|
790
|
+
"elementAdaptSlotEvent",
|
|
732
791
|
t,
|
|
733
|
-
|
|
792
|
+
us(u, d, T.key)
|
|
734
793
|
),
|
|
735
|
-
kind: "
|
|
794
|
+
kind: "elementAdaptSlotEvent",
|
|
736
795
|
names: [f.name, m.name, T.name],
|
|
737
796
|
params: T.params
|
|
738
797
|
});
|
|
@@ -740,7 +799,7 @@ function rn(t) {
|
|
|
740
799
|
for (const T of m.properties)
|
|
741
800
|
c.push({
|
|
742
801
|
id: M(
|
|
743
|
-
"
|
|
802
|
+
"elementAdaptSlotPropertyChangeEvent",
|
|
744
803
|
t,
|
|
745
804
|
to(
|
|
746
805
|
f.key,
|
|
@@ -748,7 +807,7 @@ function rn(t) {
|
|
|
748
807
|
T.key
|
|
749
808
|
)
|
|
750
809
|
),
|
|
751
|
-
kind: "
|
|
810
|
+
kind: "elementAdaptSlotPropertyChangeEvent",
|
|
752
811
|
names: [f.name, m.name, T.name],
|
|
753
812
|
params: w(T.type)
|
|
754
813
|
});
|
|
@@ -761,11 +820,11 @@ function rn(t) {
|
|
|
761
820
|
for (const T of m.events)
|
|
762
821
|
c.push({
|
|
763
822
|
id: M(
|
|
764
|
-
"
|
|
823
|
+
"customAdaptSlotEvent",
|
|
765
824
|
t,
|
|
766
825
|
Xt(u, m.id, T.id)
|
|
767
826
|
),
|
|
768
|
-
kind: "
|
|
827
|
+
kind: "customAdaptSlotEvent",
|
|
769
828
|
names: [f.name, m.name, T.name],
|
|
770
829
|
params: Y(T.params)
|
|
771
830
|
});
|
|
@@ -773,11 +832,11 @@ function rn(t) {
|
|
|
773
832
|
for (const T of m.properties)
|
|
774
833
|
c.push({
|
|
775
834
|
id: M(
|
|
776
|
-
"
|
|
835
|
+
"customAdaptSlotPropertyChangeEvent",
|
|
777
836
|
t,
|
|
778
|
-
|
|
837
|
+
le(u, m.id, T.id)
|
|
779
838
|
),
|
|
780
|
-
kind: "
|
|
839
|
+
kind: "customAdaptSlotPropertyChangeEvent",
|
|
781
840
|
names: [f.name, m.name, T.name],
|
|
782
841
|
params: w(T.type)
|
|
783
842
|
});
|
|
@@ -811,7 +870,7 @@ function Xe(t) {
|
|
|
811
870
|
const { properties: e } = A.runtime, { activeObject: n, activePage: o, activeComp: s, depends: a } = A.app, c = $t(n.type, n.subtype), { kind: l, nodeId: p, eventKey: _ } = Qn(t), r = n.nodes.find((d) => d.id === p);
|
|
812
871
|
if (!r)
|
|
813
872
|
return;
|
|
814
|
-
const u =
|
|
873
|
+
const u = b[r.key];
|
|
815
874
|
if (!u) {
|
|
816
875
|
console.assert(!1, "invalid element", r.key);
|
|
817
876
|
return;
|
|
@@ -835,7 +894,7 @@ function Xe(t) {
|
|
|
835
894
|
id: t,
|
|
836
895
|
kind: l,
|
|
837
896
|
names: d.names,
|
|
838
|
-
params: w(
|
|
897
|
+
params: w(co(d.raw))
|
|
839
898
|
};
|
|
840
899
|
}
|
|
841
900
|
} else if (l === "refEvent") {
|
|
@@ -900,7 +959,7 @@ function Xe(t) {
|
|
|
900
959
|
}
|
|
901
960
|
} else if (l === "customSlotEvent") {
|
|
902
961
|
if (W(u.key) && n.type === "comp" && s.meta.slots) {
|
|
903
|
-
const { slotId: d, eventId: f } =
|
|
962
|
+
const { slotId: d, eventId: f } = Bt(_), m = s.meta.slots.find((T) => T.id === d);
|
|
904
963
|
if (m && m.events) {
|
|
905
964
|
const T = m.events.find((y) => y.id === f);
|
|
906
965
|
if (T)
|
|
@@ -914,7 +973,7 @@ function Xe(t) {
|
|
|
914
973
|
}
|
|
915
974
|
} else if (l === "customSlotPropertyChangeEvent") {
|
|
916
975
|
if (W(u.key) && n.type === "comp" && s.meta.slots) {
|
|
917
|
-
const { slotId: d, eventId: f } =
|
|
976
|
+
const { slotId: d, eventId: f } = Bt(_), m = s.meta.slots.find((T) => T.id === d);
|
|
918
977
|
if (m && m.properties) {
|
|
919
978
|
const T = m.properties.find((y) => y.id === f);
|
|
920
979
|
if (T)
|
|
@@ -928,7 +987,7 @@ function Xe(t) {
|
|
|
928
987
|
}
|
|
929
988
|
} else if (l === "multipleSlotEvent") {
|
|
930
989
|
if (J(u.key) && n.type === "comp" && s.meta.slots) {
|
|
931
|
-
const { slotId: d, eventId: f } =
|
|
990
|
+
const { slotId: d, eventId: f } = Bt(_), m = s.meta.slots.find((T) => T.id === d);
|
|
932
991
|
if (m && m.events) {
|
|
933
992
|
const T = m.events.find((y) => y.id === f);
|
|
934
993
|
if (T)
|
|
@@ -942,7 +1001,7 @@ function Xe(t) {
|
|
|
942
1001
|
}
|
|
943
1002
|
} else if (l === "multipleSlotPropertyChangeEvent") {
|
|
944
1003
|
if (J(u.key) && n.type === "comp" && s.meta.slots) {
|
|
945
|
-
const { slotId: d, eventId: f } =
|
|
1004
|
+
const { slotId: d, eventId: f } = Bt(_), m = s.meta.slots.find((T) => T.id === d);
|
|
946
1005
|
if (m && m.properties) {
|
|
947
1006
|
const T = m.properties.find((y) => y.id === f);
|
|
948
1007
|
if (T)
|
|
@@ -978,13 +1037,13 @@ function Xe(t) {
|
|
|
978
1037
|
params: w(d.type)
|
|
979
1038
|
};
|
|
980
1039
|
}
|
|
981
|
-
} else if (l === "
|
|
1040
|
+
} else if (l === "elementAdaptSlotEvent") {
|
|
982
1041
|
if (N(u.key) && n.type === "comp") {
|
|
983
1042
|
const {
|
|
984
1043
|
elementKey: d,
|
|
985
1044
|
slotKey: f,
|
|
986
1045
|
eventKey: m
|
|
987
|
-
} =
|
|
1046
|
+
} = ls(_), T = b[d];
|
|
988
1047
|
if (T && T.slots) {
|
|
989
1048
|
const y = T.slots.find((S) => S.key === f);
|
|
990
1049
|
if (y && y.events) {
|
|
@@ -999,9 +1058,9 @@ function Xe(t) {
|
|
|
999
1058
|
}
|
|
1000
1059
|
}
|
|
1001
1060
|
}
|
|
1002
|
-
} else if (l === "
|
|
1061
|
+
} else if (l === "elementAdaptSlotPropertyChangeEvent") {
|
|
1003
1062
|
if (N(u.key) && n.type === "comp") {
|
|
1004
|
-
const { elementKey: d, slotKey: f, propertyKey: m } = zn(_), T =
|
|
1063
|
+
const { elementKey: d, slotKey: f, propertyKey: m } = zn(_), T = b[d];
|
|
1005
1064
|
if (T && T.slots) {
|
|
1006
1065
|
const y = T.slots.find((S) => S.key === f);
|
|
1007
1066
|
if (y && y.properties) {
|
|
@@ -1018,9 +1077,9 @@ function Xe(t) {
|
|
|
1018
1077
|
}
|
|
1019
1078
|
}
|
|
1020
1079
|
}
|
|
1021
|
-
} else if (l === "
|
|
1080
|
+
} else if (l === "customAdaptSlotEvent") {
|
|
1022
1081
|
if (N(u.key) && n.type === "comp") {
|
|
1023
|
-
const { compId: d, slotId: f, eventId: m } =
|
|
1082
|
+
const { compId: d, slotId: f, eventId: m } = Bt(_), T = a[d];
|
|
1024
1083
|
if (T && T.meta.slots) {
|
|
1025
1084
|
const y = T.meta.slots.find((S) => S.id === f);
|
|
1026
1085
|
if (y && y.events) {
|
|
@@ -1035,7 +1094,7 @@ function Xe(t) {
|
|
|
1035
1094
|
}
|
|
1036
1095
|
}
|
|
1037
1096
|
}
|
|
1038
|
-
} else if (l === "
|
|
1097
|
+
} else if (l === "customAdaptSlotPropertyChangeEvent") {
|
|
1039
1098
|
const { compId: d, slotId: f, propertyId: m } = Zn(_), T = a[d];
|
|
1040
1099
|
if (T && T.meta.slots) {
|
|
1041
1100
|
const y = T.meta.slots.find((S) => S.id === f);
|
|
@@ -1076,18 +1135,18 @@ function Xe(t) {
|
|
|
1076
1135
|
}
|
|
1077
1136
|
}
|
|
1078
1137
|
}
|
|
1079
|
-
function
|
|
1138
|
+
function Gs(t) {
|
|
1080
1139
|
const e = [], n = rn(t);
|
|
1081
1140
|
let o;
|
|
1082
1141
|
for (const { id: s, kind: a, names: c } of n)
|
|
1083
1142
|
a !== o && (o && e.push("separator"), o = a), e.push([be(a, c), s]);
|
|
1084
|
-
return
|
|
1143
|
+
return B(e);
|
|
1085
1144
|
}
|
|
1086
1145
|
function ln(t) {
|
|
1087
1146
|
const { activeObject: e, activeComp: n } = A.app, o = [], s = e.nodes.find((c) => c.id === t);
|
|
1088
1147
|
if (!s)
|
|
1089
1148
|
return o;
|
|
1090
|
-
const a =
|
|
1149
|
+
const a = b[s.key];
|
|
1091
1150
|
if (!a)
|
|
1092
1151
|
return console.assert(!1, "invalid element", s.key), o;
|
|
1093
1152
|
if (W(a.key) && s.slot && e.type === "comp" && n.meta.slots) {
|
|
@@ -1136,14 +1195,14 @@ function Je(t) {
|
|
|
1136
1195
|
const { activeObject: e, activeComp: n } = A.app, { kind: o, nodeId: s, eventKey: a } = Qn(t), c = e.nodes.find((p) => p.id === s);
|
|
1137
1196
|
if (!c)
|
|
1138
1197
|
return;
|
|
1139
|
-
const l =
|
|
1198
|
+
const l = b[c.key];
|
|
1140
1199
|
if (!l) {
|
|
1141
1200
|
console.assert(!1, "invalid element", c.key);
|
|
1142
1201
|
return;
|
|
1143
1202
|
}
|
|
1144
1203
|
if (o === "customSlotEvent") {
|
|
1145
1204
|
if (W(l.key) && e.type === "comp" && n.meta.slots) {
|
|
1146
|
-
const { slotId: p, eventId: _ } =
|
|
1205
|
+
const { slotId: p, eventId: _ } = Bt(a), r = n.meta.slots.find((u) => u.id === p);
|
|
1147
1206
|
if (r && r.events) {
|
|
1148
1207
|
const u = r.events.find((d) => d.id === _);
|
|
1149
1208
|
if (u)
|
|
@@ -1157,7 +1216,7 @@ function Je(t) {
|
|
|
1157
1216
|
}
|
|
1158
1217
|
} else if (o === "multipleSlotEvent") {
|
|
1159
1218
|
if (J(l.key) && e.type === "comp" && n.meta.slots) {
|
|
1160
|
-
const { slotId: p, eventId: _ } =
|
|
1219
|
+
const { slotId: p, eventId: _ } = Bt(a), r = n.meta.slots.find((u) => u.id === p);
|
|
1161
1220
|
if (r && r.events) {
|
|
1162
1221
|
const u = r.events.find((d) => d.id === _);
|
|
1163
1222
|
if (u)
|
|
@@ -1180,12 +1239,12 @@ function Je(t) {
|
|
|
1180
1239
|
};
|
|
1181
1240
|
}
|
|
1182
1241
|
}
|
|
1183
|
-
function
|
|
1242
|
+
function Ws(t) {
|
|
1184
1243
|
const e = [], n = ln(t);
|
|
1185
1244
|
let o;
|
|
1186
1245
|
for (const { id: s, kind: a, names: c } of n)
|
|
1187
1246
|
a !== o && (o && e.push("separator"), o = a), e.push([be(a, c), s]);
|
|
1188
|
-
return
|
|
1247
|
+
return B(e);
|
|
1189
1248
|
}
|
|
1190
1249
|
function G(t) {
|
|
1191
1250
|
if (!t)
|
|
@@ -1203,11 +1262,46 @@ function it(t) {
|
|
|
1203
1262
|
e.push({ key: n, name: o, type: s });
|
|
1204
1263
|
return e;
|
|
1205
1264
|
}
|
|
1265
|
+
function js(t) {
|
|
1266
|
+
let e = !0;
|
|
1267
|
+
switch (t) {
|
|
1268
|
+
case "":
|
|
1269
|
+
break;
|
|
1270
|
+
// element
|
|
1271
|
+
case "elementMethod":
|
|
1272
|
+
case "elementSlotMethod":
|
|
1273
|
+
case "multipeElementSlotMethod":
|
|
1274
|
+
break;
|
|
1275
|
+
// ref
|
|
1276
|
+
case "refMethod":
|
|
1277
|
+
case "multipleRefMethod":
|
|
1278
|
+
e = !1;
|
|
1279
|
+
break;
|
|
1280
|
+
// custom slot
|
|
1281
|
+
case "customSlotMethod":
|
|
1282
|
+
case "multipleCustomSlotMethod":
|
|
1283
|
+
e = !1;
|
|
1284
|
+
break;
|
|
1285
|
+
// custom
|
|
1286
|
+
case "customMethod":
|
|
1287
|
+
e = !1;
|
|
1288
|
+
break;
|
|
1289
|
+
// adapt slot
|
|
1290
|
+
case "elementAdaptSlotMethod":
|
|
1291
|
+
break;
|
|
1292
|
+
case "customAdaptSlotMethod":
|
|
1293
|
+
e = !1;
|
|
1294
|
+
break;
|
|
1295
|
+
default:
|
|
1296
|
+
console.assert(!1, `not implemented kind=${t}`);
|
|
1297
|
+
}
|
|
1298
|
+
return e;
|
|
1299
|
+
}
|
|
1206
1300
|
function un(t) {
|
|
1207
1301
|
const { activeObject: e, activeComp: n, depends: o } = A.app, s = [], a = e.nodes.find((l) => l.id === t);
|
|
1208
1302
|
if (!a)
|
|
1209
1303
|
return s;
|
|
1210
|
-
const c =
|
|
1304
|
+
const c = b[a.key];
|
|
1211
1305
|
if (!c)
|
|
1212
1306
|
return console.assert(!1, "inavlid element", a.key), s;
|
|
1213
1307
|
if (c.methods)
|
|
@@ -1255,18 +1349,18 @@ function un(t) {
|
|
|
1255
1349
|
if (N(c.key) && e.type === "comp" && a.adaptSlot) {
|
|
1256
1350
|
const { kind: l, mainKey: p, slotKey: _ } = Dt(a.adaptSlot);
|
|
1257
1351
|
if (l === "elementSlot") {
|
|
1258
|
-
const r =
|
|
1352
|
+
const r = b[p];
|
|
1259
1353
|
if (r && r.slots) {
|
|
1260
1354
|
const u = r.slots.find((d) => d.key === _);
|
|
1261
1355
|
if (u && u.methods)
|
|
1262
1356
|
for (const d of u.methods)
|
|
1263
1357
|
s.push({
|
|
1264
1358
|
id: ft(
|
|
1265
|
-
"
|
|
1359
|
+
"elementAdaptSlotMethod",
|
|
1266
1360
|
t,
|
|
1267
|
-
|
|
1361
|
+
_s(r.key, u.key, d.key)
|
|
1268
1362
|
),
|
|
1269
|
-
kind: "
|
|
1363
|
+
kind: "elementAdaptSlotMethod",
|
|
1270
1364
|
names: [r.name, u.name, d.name],
|
|
1271
1365
|
inputs: d.inputs,
|
|
1272
1366
|
outputs: d.outputs
|
|
@@ -1280,11 +1374,11 @@ function un(t) {
|
|
|
1280
1374
|
for (const d of u.methods)
|
|
1281
1375
|
s.push({
|
|
1282
1376
|
id: ft(
|
|
1283
|
-
"
|
|
1377
|
+
"customAdaptSlotMethod",
|
|
1284
1378
|
t,
|
|
1285
1379
|
on(p, u.id, d.id)
|
|
1286
1380
|
),
|
|
1287
|
-
kind: "
|
|
1381
|
+
kind: "customAdaptSlotMethod",
|
|
1288
1382
|
names: [r.name, u.name, d.name],
|
|
1289
1383
|
inputs: G(d.inputs),
|
|
1290
1384
|
outputs: it(d.outputs)
|
|
@@ -1297,10 +1391,10 @@ function un(t) {
|
|
|
1297
1391
|
function qe(t) {
|
|
1298
1392
|
if (!t)
|
|
1299
1393
|
return;
|
|
1300
|
-
const { activeObject: e, activeComp: n, depends: o } = A.app, { kind: s, nodeId: a, methodKey: c } =
|
|
1394
|
+
const { activeObject: e, activeComp: n, depends: o } = A.app, { kind: s, nodeId: a, methodKey: c } = Be(t), l = e.nodes.find((_) => _.id === a);
|
|
1301
1395
|
if (!l)
|
|
1302
1396
|
return;
|
|
1303
|
-
const p =
|
|
1397
|
+
const p = b[l.key];
|
|
1304
1398
|
if (!p) {
|
|
1305
1399
|
console.assert(!1, "invalid element", l.key);
|
|
1306
1400
|
return;
|
|
@@ -1365,7 +1459,7 @@ function qe(t) {
|
|
|
1365
1459
|
}
|
|
1366
1460
|
} else if (s === "customSlotMethod") {
|
|
1367
1461
|
if (N(p.key) && e.type === "comp" && n.meta.slots) {
|
|
1368
|
-
const { slotId: _, methodId: r } =
|
|
1462
|
+
const { slotId: _, methodId: r } = de(c), u = n.meta.slots.find((d) => d.id === _);
|
|
1369
1463
|
if (u && u.methods) {
|
|
1370
1464
|
const d = u.methods.find((f) => f.id === r);
|
|
1371
1465
|
if (d)
|
|
@@ -1378,13 +1472,13 @@ function qe(t) {
|
|
|
1378
1472
|
};
|
|
1379
1473
|
}
|
|
1380
1474
|
}
|
|
1381
|
-
} else if (s === "
|
|
1475
|
+
} else if (s === "elementAdaptSlotMethod") {
|
|
1382
1476
|
if (N(p.key) && e.type === "comp") {
|
|
1383
1477
|
const {
|
|
1384
1478
|
elementKey: _,
|
|
1385
1479
|
slotKey: r,
|
|
1386
1480
|
methodKey: u
|
|
1387
|
-
} =
|
|
1481
|
+
} = ps(c), d = b[_];
|
|
1388
1482
|
if (d && d.slots) {
|
|
1389
1483
|
const f = d.slots.find((m) => m.key === r);
|
|
1390
1484
|
if (f && f.methods) {
|
|
@@ -1400,8 +1494,8 @@ function qe(t) {
|
|
|
1400
1494
|
}
|
|
1401
1495
|
}
|
|
1402
1496
|
}
|
|
1403
|
-
} else if (s === "
|
|
1404
|
-
const { compId: _, slotId: r, methodId: u } =
|
|
1497
|
+
} else if (s === "customAdaptSlotMethod" && N(p.key) && e.type === "comp") {
|
|
1498
|
+
const { compId: _, slotId: r, methodId: u } = de(c), d = o[_];
|
|
1405
1499
|
if (d && d.meta.slots) {
|
|
1406
1500
|
const f = d.meta.slots.find((m) => m.id === r);
|
|
1407
1501
|
if (f && f.methods) {
|
|
@@ -1423,13 +1517,48 @@ function Xs(t) {
|
|
|
1423
1517
|
let o;
|
|
1424
1518
|
for (const { id: s, kind: a, names: c } of n)
|
|
1425
1519
|
a !== o && (o && e.push("separator"), o = a), e.push([Pe(a, c), s]);
|
|
1426
|
-
return
|
|
1520
|
+
return B(e);
|
|
1521
|
+
}
|
|
1522
|
+
function Js(t) {
|
|
1523
|
+
let e = !0;
|
|
1524
|
+
switch (t) {
|
|
1525
|
+
case "":
|
|
1526
|
+
break;
|
|
1527
|
+
// element
|
|
1528
|
+
case "elementMethod":
|
|
1529
|
+
case "elementSlotMethod":
|
|
1530
|
+
case "multipeElementSlotMethod":
|
|
1531
|
+
break;
|
|
1532
|
+
// ref
|
|
1533
|
+
case "refMethod":
|
|
1534
|
+
case "multipleRefMethod":
|
|
1535
|
+
e = !1;
|
|
1536
|
+
break;
|
|
1537
|
+
// custom slot
|
|
1538
|
+
case "customSlotMethod":
|
|
1539
|
+
case "multipleCustomSlotMethod":
|
|
1540
|
+
e = !1;
|
|
1541
|
+
break;
|
|
1542
|
+
// custom
|
|
1543
|
+
case "customMethod":
|
|
1544
|
+
e = !1;
|
|
1545
|
+
break;
|
|
1546
|
+
// adapt slot
|
|
1547
|
+
case "elementAdaptSlotMethod":
|
|
1548
|
+
break;
|
|
1549
|
+
case "customAdaptSlotMethod":
|
|
1550
|
+
e = !1;
|
|
1551
|
+
break;
|
|
1552
|
+
default:
|
|
1553
|
+
console.assert(!1, `not implemented kind=${t}`);
|
|
1554
|
+
}
|
|
1555
|
+
return e;
|
|
1427
1556
|
}
|
|
1428
1557
|
function Zt(t) {
|
|
1429
1558
|
const { activeObject: e, activeComp: n } = A.app, o = [], s = e.nodes.find((c) => c.id === t);
|
|
1430
1559
|
if (!s)
|
|
1431
1560
|
return o;
|
|
1432
|
-
const a =
|
|
1561
|
+
const a = b[s.key];
|
|
1433
1562
|
if (!a)
|
|
1434
1563
|
return console.assert(!1, "inavlid element", s.key), o;
|
|
1435
1564
|
if (W(a.key) && s.slot && e.type === "comp" && n.meta.slots) {
|
|
@@ -1478,17 +1607,17 @@ function Zt(t) {
|
|
|
1478
1607
|
function Ot(t) {
|
|
1479
1608
|
if (!t)
|
|
1480
1609
|
return;
|
|
1481
|
-
const { activeObject: e, activeComp: n } = A.app, { kind: o, nodeId: s, methodKey: a } =
|
|
1610
|
+
const { activeObject: e, activeComp: n } = A.app, { kind: o, nodeId: s, methodKey: a } = Be(t), c = e.nodes.find((p) => p.id === s);
|
|
1482
1611
|
if (!c)
|
|
1483
1612
|
return;
|
|
1484
|
-
const l =
|
|
1613
|
+
const l = b[c.key];
|
|
1485
1614
|
if (!l) {
|
|
1486
1615
|
console.assert(!1, "invalid element", c.key);
|
|
1487
1616
|
return;
|
|
1488
1617
|
}
|
|
1489
1618
|
if (o === "customSlotMethod") {
|
|
1490
1619
|
if (W(l.key) && e.type === "comp" && n.meta.slots) {
|
|
1491
|
-
const { slotId: p, methodId: _ } =
|
|
1620
|
+
const { slotId: p, methodId: _ } = de(a), r = n.meta.slots.find((u) => u.id === p);
|
|
1492
1621
|
if (r && r.methods) {
|
|
1493
1622
|
const u = r.methods.find((d) => d.id === _);
|
|
1494
1623
|
if (u)
|
|
@@ -1503,7 +1632,7 @@ function Ot(t) {
|
|
|
1503
1632
|
}
|
|
1504
1633
|
} else if (o === "multipleSlotMethod") {
|
|
1505
1634
|
if (J(l.key) && e.type === "comp" && n.meta.slots) {
|
|
1506
|
-
const { slotId: p, methodId: _ } =
|
|
1635
|
+
const { slotId: p, methodId: _ } = de(a), r = n.meta.slots.find((u) => u.id === p);
|
|
1507
1636
|
if (r && r.methods) {
|
|
1508
1637
|
const u = r.methods.find((d) => d.id === _);
|
|
1509
1638
|
if (u)
|
|
@@ -1530,12 +1659,12 @@ function Ot(t) {
|
|
|
1530
1659
|
};
|
|
1531
1660
|
}
|
|
1532
1661
|
}
|
|
1533
|
-
function
|
|
1662
|
+
function _o(t) {
|
|
1534
1663
|
const e = [], n = Zt(t);
|
|
1535
1664
|
let o;
|
|
1536
1665
|
for (const { id: s, kind: a, names: c } of n)
|
|
1537
1666
|
a !== o && (o && e.push("separator"), o = a), e.push([Pe(a, c), s]);
|
|
1538
|
-
return
|
|
1667
|
+
return B(e);
|
|
1539
1668
|
}
|
|
1540
1669
|
function pn(t) {
|
|
1541
1670
|
const e = Ot(t);
|
|
@@ -1546,14 +1675,14 @@ function Qe(t, e) {
|
|
|
1546
1675
|
if (n)
|
|
1547
1676
|
return n.outputs?.find((o) => o.key === e);
|
|
1548
1677
|
}
|
|
1549
|
-
function
|
|
1678
|
+
function qs(t) {
|
|
1550
1679
|
const e = [], n = pn(t);
|
|
1551
1680
|
if (n)
|
|
1552
1681
|
for (const { name: o, key: s } of n)
|
|
1553
1682
|
e.push([o, s]);
|
|
1554
|
-
return
|
|
1683
|
+
return B(e);
|
|
1555
1684
|
}
|
|
1556
|
-
function
|
|
1685
|
+
function Qs(t, e, n, o, s) {
|
|
1557
1686
|
const { properties: a } = A.runtime, { activeObject: c, activePage: l, activeComp: p, depends: _ } = A.app;
|
|
1558
1687
|
if (t.events && t.events.length > 0)
|
|
1559
1688
|
return !1;
|
|
@@ -1607,7 +1736,7 @@ function qs(t, e, n, o, s) {
|
|
|
1607
1736
|
if (N(t.key) && c.type === "comp" && s) {
|
|
1608
1737
|
const { kind: r, mainKey: u, slotKey: d } = Dt(s);
|
|
1609
1738
|
if (r === "elementSlot") {
|
|
1610
|
-
const f =
|
|
1739
|
+
const f = b[u];
|
|
1611
1740
|
if (f && f.slots) {
|
|
1612
1741
|
const m = f.slots.find((T) => T.key === d);
|
|
1613
1742
|
if (m && m.events && m.events.length > 0 || m && m.properties && m.properties.length > 0)
|
|
@@ -1631,7 +1760,7 @@ function qs(t, e, n, o, s) {
|
|
|
1631
1760
|
}
|
|
1632
1761
|
return !0;
|
|
1633
1762
|
}
|
|
1634
|
-
function
|
|
1763
|
+
function zs(t, e) {
|
|
1635
1764
|
const { activeObject: n, activeComp: o } = A.app;
|
|
1636
1765
|
if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
|
|
1637
1766
|
const s = o.meta.slots.find((a) => a.id === e);
|
|
@@ -1645,7 +1774,7 @@ function Qs(t, e) {
|
|
|
1645
1774
|
}
|
|
1646
1775
|
return !(N(t.key) && n.type === "comp" && o.meta.events && o.meta.events.length > 0);
|
|
1647
1776
|
}
|
|
1648
|
-
function
|
|
1777
|
+
function Zs(t, e, n) {
|
|
1649
1778
|
const { activeObject: o, activeComp: s, depends: a } = A.app;
|
|
1650
1779
|
if (t.methods && t.methods.length > 0)
|
|
1651
1780
|
return !1;
|
|
@@ -1664,7 +1793,7 @@ function zs(t, e, n) {
|
|
|
1664
1793
|
if (N(t.key) && n && o.type === "comp") {
|
|
1665
1794
|
const { kind: c, mainKey: l, slotKey: p } = Dt(n);
|
|
1666
1795
|
if (c === "elementSlot") {
|
|
1667
|
-
const _ =
|
|
1796
|
+
const _ = b[l];
|
|
1668
1797
|
if (_ && _.slots) {
|
|
1669
1798
|
const r = _.slots.find((u) => u.key === p);
|
|
1670
1799
|
if (r && r.methods && r.methods.length > 0)
|
|
@@ -1681,7 +1810,7 @@ function zs(t, e, n) {
|
|
|
1681
1810
|
}
|
|
1682
1811
|
return !0;
|
|
1683
1812
|
}
|
|
1684
|
-
function
|
|
1813
|
+
function ti(t, e) {
|
|
1685
1814
|
const { activeObject: n, activeComp: o } = A.app;
|
|
1686
1815
|
if (W(t.key) && e && n.type === "comp" && o.meta.slots) {
|
|
1687
1816
|
const s = o.meta.slots.find((a) => a.id === e);
|
|
@@ -1695,7 +1824,7 @@ function Zs(t, e) {
|
|
|
1695
1824
|
}
|
|
1696
1825
|
return !(N(t.key) && n.type === "comp" && o.meta.methods && o.meta.methods.length > 0);
|
|
1697
1826
|
}
|
|
1698
|
-
function
|
|
1827
|
+
function ei(t, e, n, o, s) {
|
|
1699
1828
|
const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
|
|
1700
1829
|
if (a[t.key] && a[t.key][e] && a[t.key][e].length > 0)
|
|
1701
1830
|
return !1;
|
|
@@ -1724,7 +1853,7 @@ function ti(t, e, n, o, s) {
|
|
|
1724
1853
|
if (N(t.key) && s && c.type === "comp") {
|
|
1725
1854
|
const { kind: _, mainKey: r, slotKey: u } = Dt(s);
|
|
1726
1855
|
if (_ === "elementSlot") {
|
|
1727
|
-
const d =
|
|
1856
|
+
const d = b[r];
|
|
1728
1857
|
if (d && d.slots) {
|
|
1729
1858
|
const f = d.slots.find((m) => m.key === u);
|
|
1730
1859
|
if (f && f.properties && f.properties.length > 0)
|
|
@@ -1741,7 +1870,7 @@ function ti(t, e, n, o, s) {
|
|
|
1741
1870
|
}
|
|
1742
1871
|
return !0;
|
|
1743
1872
|
}
|
|
1744
|
-
function
|
|
1873
|
+
function ni(t, e, n, o, s) {
|
|
1745
1874
|
const { properties: a } = A.runtime, { activeObject: c, activeComp: l, depends: p } = A.app;
|
|
1746
1875
|
if (a[t.key] && a[t.key][e]) {
|
|
1747
1876
|
for (const { keys: _, raw: r } of a[t.key][e])
|
|
@@ -1773,7 +1902,7 @@ function ei(t, e, n, o, s) {
|
|
|
1773
1902
|
if (N(t.key) && s && c.type === "comp") {
|
|
1774
1903
|
const { kind: _, mainKey: r, slotKey: u } = Dt(s);
|
|
1775
1904
|
if (_ === "elementSlot") {
|
|
1776
|
-
const d =
|
|
1905
|
+
const d = b[r];
|
|
1777
1906
|
if (d && d.slots) {
|
|
1778
1907
|
const f = d.slots.find((m) => m.key === u);
|
|
1779
1908
|
if (f && f.properties && f.properties.length > 0)
|
|
@@ -1790,18 +1919,18 @@ function ei(t, e, n, o, s) {
|
|
|
1790
1919
|
}
|
|
1791
1920
|
return !0;
|
|
1792
1921
|
}
|
|
1793
|
-
function
|
|
1794
|
-
return t ? t === "onEvent" ?
|
|
1922
|
+
function ho(t, e, n, o, s, a) {
|
|
1923
|
+
return t ? t === "onEvent" ? Qs(e, n, o, s, a) : t === "triggerEvent" ? zs(e, o) : t === "callMethod" ? Zs(e, s, a) : t === "implementMethod" ? ti(e, o) : t === "getProperty" ? ei(e, n, o, s, a) : t === "setProperty" ? ni(e, n, o, s, a) : !1 : !1;
|
|
1795
1924
|
}
|
|
1796
1925
|
function st(t) {
|
|
1797
1926
|
const { activeObject: e } = A.app, n = $t(e.type, e.subtype);
|
|
1798
1927
|
for (const o of e.nodes) {
|
|
1799
|
-
const s =
|
|
1928
|
+
const s = b[o.key];
|
|
1800
1929
|
if (!s) {
|
|
1801
1930
|
console.assert(!1, "invalid element", o.key);
|
|
1802
1931
|
continue;
|
|
1803
1932
|
}
|
|
1804
|
-
if (!
|
|
1933
|
+
if (!ho(t, s, n, o.slot, o.comp, o.adaptSlot))
|
|
1805
1934
|
return !0;
|
|
1806
1935
|
}
|
|
1807
1936
|
return !1;
|
|
@@ -1809,12 +1938,12 @@ function st(t) {
|
|
|
1809
1938
|
function Lt(t) {
|
|
1810
1939
|
const { activeObject: e } = A.app, n = [], o = $t(e.type, e.subtype);
|
|
1811
1940
|
for (const s of e.nodes) {
|
|
1812
|
-
const a =
|
|
1941
|
+
const a = b[s.key];
|
|
1813
1942
|
if (!a) {
|
|
1814
1943
|
console.assert(!1, "invalid element", s.key);
|
|
1815
1944
|
continue;
|
|
1816
1945
|
}
|
|
1817
|
-
|
|
1946
|
+
ho(t, a, o, s.slot, s.comp, s.adaptSlot) || n.push({
|
|
1818
1947
|
id: s.id,
|
|
1819
1948
|
key: s.key,
|
|
1820
1949
|
name: a.name,
|
|
@@ -1827,7 +1956,7 @@ function tt(t) {
|
|
|
1827
1956
|
const { activeObject: e } = A.app, n = e.nodes.find((s) => s.id === t);
|
|
1828
1957
|
if (!n)
|
|
1829
1958
|
return;
|
|
1830
|
-
const o =
|
|
1959
|
+
const o = b[n.key];
|
|
1831
1960
|
if (!o) {
|
|
1832
1961
|
console.assert(!1, "invalid element", n.key);
|
|
1833
1962
|
return;
|
|
@@ -1845,7 +1974,7 @@ function Mt(t) {
|
|
|
1845
1974
|
let l = e.global.t(a);
|
|
1846
1975
|
c && (l += " / " + c), n.push([l, s]);
|
|
1847
1976
|
}
|
|
1848
|
-
return
|
|
1977
|
+
return B(n);
|
|
1849
1978
|
}
|
|
1850
1979
|
function _n(t) {
|
|
1851
1980
|
const { appList: e } = A.app, n = [], o = e.find((s) => s.id === t);
|
|
@@ -1866,17 +1995,17 @@ function ze(t, e) {
|
|
|
1866
1995
|
name: s.name
|
|
1867
1996
|
};
|
|
1868
1997
|
}
|
|
1869
|
-
function
|
|
1998
|
+
function oi(t) {
|
|
1870
1999
|
const e = [];
|
|
1871
2000
|
return _n(t).forEach(({ id: o, name: s }) => {
|
|
1872
2001
|
e.push([s, o]);
|
|
1873
|
-
}),
|
|
2002
|
+
}), B(e);
|
|
1874
2003
|
}
|
|
1875
2004
|
function te(t, e) {
|
|
1876
2005
|
const { properties: n } = A.runtime, { activeObject: o, activeComp: s, depends: a } = A.app, c = [], l = $t(o.type, o.subtype), p = o.nodes.find((r) => r.id === t);
|
|
1877
2006
|
if (!p)
|
|
1878
2007
|
return c;
|
|
1879
|
-
const _ =
|
|
2008
|
+
const _ = b[p.key];
|
|
1880
2009
|
if (!_)
|
|
1881
2010
|
return console.assert(!1, "invalid element", p.key), c;
|
|
1882
2011
|
if (n[_.key] && n[_.key][l])
|
|
@@ -1955,14 +2084,14 @@ function te(t, e) {
|
|
|
1955
2084
|
if (N(_.key) && o.type === "comp" && p.adaptSlot) {
|
|
1956
2085
|
const { kind: r, mainKey: u, slotKey: d } = Dt(p.adaptSlot);
|
|
1957
2086
|
if (r === "elementSlot") {
|
|
1958
|
-
const f =
|
|
2087
|
+
const f = b[u];
|
|
1959
2088
|
if (f && f.slots) {
|
|
1960
2089
|
const m = f.slots.find((T) => T.key === d);
|
|
1961
2090
|
if (m && m.properties)
|
|
1962
2091
|
for (const T of m.properties)
|
|
1963
2092
|
e === "write" && T.readonly || c.push({
|
|
1964
2093
|
id: Tt(
|
|
1965
|
-
"
|
|
2094
|
+
"elementAdaptSlotProperty",
|
|
1966
2095
|
t,
|
|
1967
2096
|
to(
|
|
1968
2097
|
f.key,
|
|
@@ -1970,7 +2099,7 @@ function te(t, e) {
|
|
|
1970
2099
|
T.key
|
|
1971
2100
|
)
|
|
1972
2101
|
),
|
|
1973
|
-
kind: "
|
|
2102
|
+
kind: "elementAdaptSlotProperty",
|
|
1974
2103
|
names: [f.name, m.name, T.name],
|
|
1975
2104
|
meta: {
|
|
1976
2105
|
raw: { type: T.type }
|
|
@@ -1985,11 +2114,11 @@ function te(t, e) {
|
|
|
1985
2114
|
for (const T of m.properties)
|
|
1986
2115
|
c.push({
|
|
1987
2116
|
id: Tt(
|
|
1988
|
-
"
|
|
2117
|
+
"customAdaptSlotProperty",
|
|
1989
2118
|
t,
|
|
1990
|
-
|
|
2119
|
+
le(u, m.id, T.id)
|
|
1991
2120
|
),
|
|
1992
|
-
kind: "
|
|
2121
|
+
kind: "customAdaptSlotProperty",
|
|
1993
2122
|
names: [f.name, m.name, T.name],
|
|
1994
2123
|
meta: {
|
|
1995
2124
|
raw: { type: T.type }
|
|
@@ -2003,10 +2132,10 @@ function te(t, e) {
|
|
|
2003
2132
|
function Rt(t) {
|
|
2004
2133
|
if (!t)
|
|
2005
2134
|
return;
|
|
2006
|
-
const { properties: e } = A.runtime, { activeObject: n, activeComp: o, depends: s } = A.app, a = $t(n.type, n.subtype), { kind: c, nodeId: l, propertyKey: p } =
|
|
2135
|
+
const { properties: e } = A.runtime, { activeObject: n, activeComp: o, depends: s } = A.app, a = $t(n.type, n.subtype), { kind: c, nodeId: l, propertyKey: p } = ds(t), _ = n.nodes.find((u) => u.id === l);
|
|
2007
2136
|
if (!_)
|
|
2008
2137
|
return;
|
|
2009
|
-
const r =
|
|
2138
|
+
const r = b[_.key];
|
|
2010
2139
|
if (!r) {
|
|
2011
2140
|
console.assert(!1, "invalid element", _.key);
|
|
2012
2141
|
return;
|
|
@@ -2110,13 +2239,13 @@ function Rt(t) {
|
|
|
2110
2239
|
}
|
|
2111
2240
|
};
|
|
2112
2241
|
}
|
|
2113
|
-
} else if (c === "
|
|
2242
|
+
} else if (c === "elementAdaptSlotProperty") {
|
|
2114
2243
|
if (N(r.key) && n.type === "comp") {
|
|
2115
2244
|
const {
|
|
2116
2245
|
elementKey: u,
|
|
2117
2246
|
slotKey: d,
|
|
2118
2247
|
propertyKey: f
|
|
2119
|
-
} = zn(p), m =
|
|
2248
|
+
} = zn(p), m = b[u];
|
|
2120
2249
|
if (m && m.slots) {
|
|
2121
2250
|
const T = m.slots.find((y) => y.key === d);
|
|
2122
2251
|
if (T && T.properties) {
|
|
@@ -2135,7 +2264,7 @@ function Rt(t) {
|
|
|
2135
2264
|
}
|
|
2136
2265
|
}
|
|
2137
2266
|
}
|
|
2138
|
-
} else if (c === "
|
|
2267
|
+
} else if (c === "customAdaptSlotProperty" && N(r.key) && n.type === "comp") {
|
|
2139
2268
|
const { compId: u, slotId: d, propertyId: f } = Zn(p), m = s[u];
|
|
2140
2269
|
if (m && m.meta.slots) {
|
|
2141
2270
|
const T = m.meta.slots.find((y) => y.id === d);
|
|
@@ -2156,14 +2285,14 @@ function Rt(t) {
|
|
|
2156
2285
|
}
|
|
2157
2286
|
}
|
|
2158
2287
|
}
|
|
2159
|
-
function
|
|
2288
|
+
function fo(t, e) {
|
|
2160
2289
|
const n = [], o = te(t, e);
|
|
2161
2290
|
let s;
|
|
2162
2291
|
for (const { id: a, kind: c, names: l } of o)
|
|
2163
2292
|
c !== s && (s && n.push("separator"), s = c), n.push([eo(c, l), a]);
|
|
2164
|
-
return
|
|
2293
|
+
return B(n);
|
|
2165
2294
|
}
|
|
2166
|
-
function
|
|
2295
|
+
function mo() {
|
|
2167
2296
|
const { activeObject: t, activeComp: e } = A.app, n = [{ id: "", name: "" }];
|
|
2168
2297
|
if (t.type !== "comp" || !e.meta.slots)
|
|
2169
2298
|
return n;
|
|
@@ -2184,32 +2313,32 @@ function Vn(t) {
|
|
|
2184
2313
|
name: o.name
|
|
2185
2314
|
};
|
|
2186
2315
|
}
|
|
2187
|
-
function
|
|
2188
|
-
const { i18n: t } = Nt, e = [], n =
|
|
2316
|
+
function si() {
|
|
2317
|
+
const { i18n: t } = Nt, e = [], n = mo();
|
|
2189
2318
|
for (const { id: o, name: s } of n) {
|
|
2190
2319
|
let a = s;
|
|
2191
2320
|
o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
|
|
2192
2321
|
}
|
|
2193
|
-
return
|
|
2322
|
+
return B(e);
|
|
2194
2323
|
}
|
|
2195
2324
|
function gn() {
|
|
2196
2325
|
const { activeObject: t, activePage: e, activeComp: n } = A.app;
|
|
2197
2326
|
return t.type === "page" ? e.meta.states ?? [] : t.type === "comp" ? n.meta.states ?? [] : [];
|
|
2198
2327
|
}
|
|
2199
|
-
function
|
|
2328
|
+
function Ee(t) {
|
|
2200
2329
|
const { activeObject: e, activePage: n, activeComp: o } = A.app;
|
|
2201
2330
|
if (e.type === "page")
|
|
2202
2331
|
return n.meta.states?.find((s) => s.id === t);
|
|
2203
2332
|
if (e.type === "comp")
|
|
2204
2333
|
return o.meta.states?.find((s) => s.id === t);
|
|
2205
2334
|
}
|
|
2206
|
-
function
|
|
2335
|
+
function To() {
|
|
2207
2336
|
const t = [], e = gn();
|
|
2208
2337
|
for (const { id: n, name: o } of e)
|
|
2209
2338
|
t.push([o, n]);
|
|
2210
|
-
return
|
|
2339
|
+
return B(t);
|
|
2211
2340
|
}
|
|
2212
|
-
const
|
|
2341
|
+
const ii = {
|
|
2213
2342
|
init: function() {
|
|
2214
2343
|
this.node = {
|
|
2215
2344
|
id: "",
|
|
@@ -2255,7 +2384,7 @@ const si = {
|
|
|
2255
2384
|
return Mt("onEvent");
|
|
2256
2385
|
},
|
|
2257
2386
|
genEventOpts_: function() {
|
|
2258
|
-
return
|
|
2387
|
+
return Gs(this.node.id);
|
|
2259
2388
|
},
|
|
2260
2389
|
onchange: function(t) {
|
|
2261
2390
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2320,7 +2449,7 @@ const si = {
|
|
|
2320
2449
|
return;
|
|
2321
2450
|
const t = [];
|
|
2322
2451
|
this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
2323
|
-
const e =
|
|
2452
|
+
const e = Hs(this.event.kind);
|
|
2324
2453
|
if (this.event.params)
|
|
2325
2454
|
for (let n = 0; n < this.event.params.length; n++) {
|
|
2326
2455
|
const { key: o, name: s } = this.event.params[n];
|
|
@@ -2355,7 +2484,7 @@ const si = {
|
|
|
2355
2484
|
this.setWarningText(null);
|
|
2356
2485
|
}
|
|
2357
2486
|
};
|
|
2358
|
-
I.on_app_event_v1 =
|
|
2487
|
+
I.on_app_event_v1 = ii;
|
|
2359
2488
|
i.forBlock.on_app_event_v1 = function(t) {
|
|
2360
2489
|
const e = i.quote_, n = t;
|
|
2361
2490
|
let o = "__instance__";
|
|
@@ -2365,7 +2494,7 @@ i.forBlock.on_app_event_v1 = function(t) {
|
|
|
2365
2494
|
const s = i.statementToCode(n, "HANDLE");
|
|
2366
2495
|
return `__onEventV1__(${e(n.event.id)}, async (${o}) => {
|
|
2367
2496
|
try {
|
|
2368
|
-
${
|
|
2497
|
+
${hs(s, 2)} } catch (e) {
|
|
2369
2498
|
if (e && e.message) {
|
|
2370
2499
|
__messageV1__('error', e.message);
|
|
2371
2500
|
} else {
|
|
@@ -2375,7 +2504,7 @@ ${fs(s, 2)} } catch (e) {
|
|
|
2375
2504
|
});
|
|
2376
2505
|
`;
|
|
2377
2506
|
};
|
|
2378
|
-
const
|
|
2507
|
+
const ai = {
|
|
2379
2508
|
init: function() {
|
|
2380
2509
|
this.node = {
|
|
2381
2510
|
id: "",
|
|
@@ -2421,7 +2550,7 @@ const ii = {
|
|
|
2421
2550
|
return Mt("triggerEvent");
|
|
2422
2551
|
},
|
|
2423
2552
|
genEventOpts_: function() {
|
|
2424
|
-
return
|
|
2553
|
+
return Ws(this.node.id);
|
|
2425
2554
|
},
|
|
2426
2555
|
onchange: function(t) {
|
|
2427
2556
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -2526,7 +2655,7 @@ const ii = {
|
|
|
2526
2655
|
this.setWarningText(null);
|
|
2527
2656
|
}
|
|
2528
2657
|
};
|
|
2529
|
-
I.trigger_app_event_v1 =
|
|
2658
|
+
I.trigger_app_event_v1 = ai;
|
|
2530
2659
|
i.forBlock.trigger_app_event_v1 = function(t) {
|
|
2531
2660
|
const e = i.quote_, n = t;
|
|
2532
2661
|
let o = "''";
|
|
@@ -2563,7 +2692,7 @@ g([
|
|
|
2563
2692
|
}
|
|
2564
2693
|
]);
|
|
2565
2694
|
i.forBlock.watch_effect_v1 = function(t) {
|
|
2566
|
-
const e =
|
|
2695
|
+
const e = Yo(t.id), n = i.statementToCode(t, "HANDLE");
|
|
2567
2696
|
return `function __watchEffect$${e}__() {
|
|
2568
2697
|
${n}};
|
|
2569
2698
|
`;
|
|
@@ -2589,7 +2718,7 @@ i.forBlock.app_debug_trace_v1 = function(t) {
|
|
|
2589
2718
|
return `__debugTraceV1__(${i.valueToCode(t, "OBJECT", h.NONE)});
|
|
2590
2719
|
`;
|
|
2591
2720
|
};
|
|
2592
|
-
const
|
|
2721
|
+
const ci = {
|
|
2593
2722
|
init: function() {
|
|
2594
2723
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_CONFIRM_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_CONFIRM_DLG_HELPURL}");
|
|
2595
2724
|
},
|
|
@@ -2618,7 +2747,7 @@ const ai = {
|
|
|
2618
2747
|
]);
|
|
2619
2748
|
}
|
|
2620
2749
|
};
|
|
2621
|
-
I.open_confirm_dlg_v1 =
|
|
2750
|
+
I.open_confirm_dlg_v1 = ci;
|
|
2622
2751
|
i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
2623
2752
|
const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "TEXT", h.ATOMIC), o = i.statementToCode(t, "HANDLE");
|
|
2624
2753
|
return `{
|
|
@@ -2626,7 +2755,7 @@ i.forBlock.open_confirm_dlg_v1 = function(t) {
|
|
|
2626
2755
|
${o}}
|
|
2627
2756
|
`;
|
|
2628
2757
|
};
|
|
2629
|
-
const
|
|
2758
|
+
const ri = {
|
|
2630
2759
|
init: function() {
|
|
2631
2760
|
this.appendDummyInput().appendField("%{BKY_APP_V1_OPEN_PROMPT_DLG_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_OPEN_PROMPT_DLG_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_OPEN_PROMPT_DLG_HELPURL}");
|
|
2632
2761
|
},
|
|
@@ -2657,7 +2786,7 @@ const ci = {
|
|
|
2657
2786
|
]);
|
|
2658
2787
|
}
|
|
2659
2788
|
};
|
|
2660
|
-
I.open_prompt_dlg_v1 =
|
|
2789
|
+
I.open_prompt_dlg_v1 = ri;
|
|
2661
2790
|
i.forBlock.open_prompt_dlg_v1 = function(t) {
|
|
2662
2791
|
const e = i.valueToCode(t, "TITLE", h.ATOMIC), n = i.valueToCode(t, "LABEL", h.ATOMIC), o = i.valueToCode(t, "VALUE", h.ATOMIC), s = i.statementToCode(t, "HANDLE");
|
|
2663
2792
|
return `{
|
|
@@ -2697,7 +2826,7 @@ i.forBlock.popup_message_v1 = function(t) {
|
|
|
2697
2826
|
return `__messageV1__(${e}, ${n});
|
|
2698
2827
|
`;
|
|
2699
2828
|
};
|
|
2700
|
-
const
|
|
2829
|
+
const li = {
|
|
2701
2830
|
init: function() {
|
|
2702
2831
|
this.node = {
|
|
2703
2832
|
id: "",
|
|
@@ -2838,13 +2967,13 @@ const ri = {
|
|
|
2838
2967
|
ensureBlocks_: function() {
|
|
2839
2968
|
if (this.isInsertionMarker())
|
|
2840
2969
|
return;
|
|
2841
|
-
const
|
|
2970
|
+
const t = [], e = js(this.method.kind);
|
|
2842
2971
|
if (this.method.outputs)
|
|
2843
|
-
for (let
|
|
2844
|
-
const { key:
|
|
2845
|
-
|
|
2972
|
+
for (let n = 0; n < this.method.outputs.length; n++) {
|
|
2973
|
+
const { key: o, name: s } = this.method.outputs[n];
|
|
2974
|
+
t.push(["OUTPUT" + n, `__output$${o}__`, s, e]);
|
|
2846
2975
|
}
|
|
2847
|
-
|
|
2976
|
+
t.length > 0 && q(this, t);
|
|
2848
2977
|
},
|
|
2849
2978
|
checkWarning_: function() {
|
|
2850
2979
|
const t = tt(this.node.id);
|
|
@@ -2877,7 +3006,7 @@ const ri = {
|
|
|
2877
3006
|
this.setWarningText(null);
|
|
2878
3007
|
}
|
|
2879
3008
|
};
|
|
2880
|
-
I.call_app_method_v1 =
|
|
3009
|
+
I.call_app_method_v1 = li;
|
|
2881
3010
|
i.forBlock.call_app_method_v1 = function(t) {
|
|
2882
3011
|
const e = i.INDENT, n = i.quote_, o = t;
|
|
2883
3012
|
let s = "''";
|
|
@@ -2924,7 +3053,7 @@ i.forBlock.call_app_method_v1 = function(t) {
|
|
|
2924
3053
|
c += `${e}const __output$${l}__ = __outputs__[${n(l)}];
|
|
2925
3054
|
`;
|
|
2926
3055
|
if (o.method.kind === "customMethod") {
|
|
2927
|
-
const { kind: l, nodeId: p, methodKey: _ } =
|
|
3056
|
+
const { kind: l, nodeId: p, methodKey: _ } = Be(o.method.id), r = no(l, p, _);
|
|
2928
3057
|
if (o.method.outputs && o.method.outputs.length > 0) {
|
|
2929
3058
|
const u = i.statementToCode(o, "HANDLE");
|
|
2930
3059
|
return `{
|
|
@@ -2944,7 +3073,7 @@ ${c}${l}}
|
|
|
2944
3073
|
return `await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2945
3074
|
`;
|
|
2946
3075
|
};
|
|
2947
|
-
const
|
|
3076
|
+
const ui = {
|
|
2948
3077
|
init: function() {
|
|
2949
3078
|
this.node = {
|
|
2950
3079
|
id: "",
|
|
@@ -2990,7 +3119,7 @@ const li = {
|
|
|
2990
3119
|
return Mt("implementMethod");
|
|
2991
3120
|
},
|
|
2992
3121
|
genMethodOpts_: function() {
|
|
2993
|
-
return
|
|
3122
|
+
return _o(this.node.id);
|
|
2994
3123
|
},
|
|
2995
3124
|
onchange: function(t) {
|
|
2996
3125
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3048,7 +3177,7 @@ const li = {
|
|
|
3048
3177
|
return;
|
|
3049
3178
|
const t = [];
|
|
3050
3179
|
this.getInput("INSTANCE") && t.push(["INSTANCE", "__instance__", "x-runtime-lib.instance", !0]);
|
|
3051
|
-
const e =
|
|
3180
|
+
const e = Js(this.method.kind);
|
|
3052
3181
|
if (this.method.inputs)
|
|
3053
3182
|
for (let n = 0; n < this.method.inputs.length; n++) {
|
|
3054
3183
|
const { key: o, name: s } = this.method.inputs[n];
|
|
@@ -3083,9 +3212,9 @@ const li = {
|
|
|
3083
3212
|
this.setWarningText(null);
|
|
3084
3213
|
}
|
|
3085
3214
|
};
|
|
3086
|
-
I.implement_app_method_v1 =
|
|
3215
|
+
I.implement_app_method_v1 = ui;
|
|
3087
3216
|
i.forBlock.implement_app_method_v1 = function(t) {
|
|
3088
|
-
const e = i.INDENT, n = i.quote_, o = t, { kind: s, nodeId: a, methodKey: c } =
|
|
3217
|
+
const e = i.INDENT, n = i.quote_, o = t, { kind: s, nodeId: a, methodKey: c } = Be(o.method.id);
|
|
3089
3218
|
let l = "";
|
|
3090
3219
|
if (o.method.inputs)
|
|
3091
3220
|
for (const { key: u } of o.method.inputs)
|
|
@@ -3098,7 +3227,7 @@ ${p}${e}return __outputs__;
|
|
|
3098
3227
|
}
|
|
3099
3228
|
`;
|
|
3100
3229
|
};
|
|
3101
|
-
const
|
|
3230
|
+
const pi = {
|
|
3102
3231
|
init: function() {
|
|
3103
3232
|
this.node = {
|
|
3104
3233
|
id: "",
|
|
@@ -3158,10 +3287,10 @@ const ui = {
|
|
|
3158
3287
|
return Mt("implementMethod");
|
|
3159
3288
|
},
|
|
3160
3289
|
genMethodOpts_: function() {
|
|
3161
|
-
return
|
|
3290
|
+
return _o(this.node.id);
|
|
3162
3291
|
},
|
|
3163
3292
|
genOutputOpts_: function() {
|
|
3164
|
-
return
|
|
3293
|
+
return qs(this.method.id);
|
|
3165
3294
|
},
|
|
3166
3295
|
onchange: function(t) {
|
|
3167
3296
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3261,7 +3390,7 @@ const ui = {
|
|
|
3261
3390
|
this.setWarningText(null);
|
|
3262
3391
|
}
|
|
3263
3392
|
};
|
|
3264
|
-
I.set_app_method_output_v1 =
|
|
3393
|
+
I.set_app_method_output_v1 = pi;
|
|
3265
3394
|
i.forBlock.set_app_method_output_v1 = function(t) {
|
|
3266
3395
|
const e = i.quote_, n = t;
|
|
3267
3396
|
let o = i.valueToCode(n, "VALUE", h.ATOMIC);
|
|
@@ -3311,7 +3440,7 @@ g([
|
|
|
3311
3440
|
i.forBlock.app_env_is_v1 = function(t) {
|
|
3312
3441
|
return [`__getEnvV1__() === ${i.quote_(t.getFieldValue("ENV"))}`, h.ATOMIC];
|
|
3313
3442
|
};
|
|
3314
|
-
const
|
|
3443
|
+
const _i = {
|
|
3315
3444
|
init: function() {
|
|
3316
3445
|
this.app = {
|
|
3317
3446
|
id: "",
|
|
@@ -3324,7 +3453,7 @@ const pi = {
|
|
|
3324
3453
|
initData_: function() {
|
|
3325
3454
|
if (this.app.id)
|
|
3326
3455
|
return;
|
|
3327
|
-
const t =
|
|
3456
|
+
const t = uo()?.[0];
|
|
3328
3457
|
if (!t)
|
|
3329
3458
|
return;
|
|
3330
3459
|
this.app.id = t.id, this.app.name = t.name;
|
|
@@ -3349,10 +3478,10 @@ const pi = {
|
|
|
3349
3478
|
}, 0);
|
|
3350
3479
|
},
|
|
3351
3480
|
genAppOpts_: function() {
|
|
3352
|
-
return
|
|
3481
|
+
return Ks();
|
|
3353
3482
|
},
|
|
3354
3483
|
genPageOpts_: function() {
|
|
3355
|
-
return
|
|
3484
|
+
return oi(this.app.id);
|
|
3356
3485
|
},
|
|
3357
3486
|
onchange: function(t) {
|
|
3358
3487
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3401,13 +3530,13 @@ const pi = {
|
|
|
3401
3530
|
e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
|
|
3402
3531
|
}
|
|
3403
3532
|
};
|
|
3404
|
-
I.navigate_to_v1 =
|
|
3533
|
+
I.navigate_to_v1 = _i;
|
|
3405
3534
|
i.forBlock.navigate_to_v1 = function(t) {
|
|
3406
3535
|
const e = t, n = i.quote_(e.app.id), o = i.quote_(e.page.id);
|
|
3407
3536
|
return `__navigateToV1__(${n}, ${o});
|
|
3408
3537
|
`;
|
|
3409
3538
|
};
|
|
3410
|
-
const
|
|
3539
|
+
const di = {
|
|
3411
3540
|
init: function() {
|
|
3412
3541
|
this.comp = {
|
|
3413
3542
|
id: "",
|
|
@@ -3417,7 +3546,7 @@ const _i = {
|
|
|
3417
3546
|
initData_: function() {
|
|
3418
3547
|
if (this.comp.id)
|
|
3419
3548
|
return;
|
|
3420
|
-
const t =
|
|
3549
|
+
const t = po()?.[0];
|
|
3421
3550
|
if (!t)
|
|
3422
3551
|
return;
|
|
3423
3552
|
this.comp.id = t.id, this.comp.name = t.name;
|
|
@@ -3435,7 +3564,7 @@ const _i = {
|
|
|
3435
3564
|
}, 0);
|
|
3436
3565
|
},
|
|
3437
3566
|
genCompOpts_: function() {
|
|
3438
|
-
return
|
|
3567
|
+
return $s();
|
|
3439
3568
|
},
|
|
3440
3569
|
onchange: function(t) {
|
|
3441
3570
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3464,12 +3593,12 @@ const _i = {
|
|
|
3464
3593
|
t.name !== this.comp.name && (this.comp.name = t.name), this.setWarningText(null);
|
|
3465
3594
|
}
|
|
3466
3595
|
};
|
|
3467
|
-
I.select_comp_v1 =
|
|
3596
|
+
I.select_comp_v1 = di;
|
|
3468
3597
|
i.forBlock.select_comp_v1 = function(t) {
|
|
3469
3598
|
const e = i.quote_, o = t.comp.id;
|
|
3470
3599
|
return [e(o), h.ATOMIC];
|
|
3471
3600
|
};
|
|
3472
|
-
const
|
|
3601
|
+
const hi = {
|
|
3473
3602
|
init: function() {
|
|
3474
3603
|
this.slot = {
|
|
3475
3604
|
id: "",
|
|
@@ -3479,7 +3608,7 @@ const di = {
|
|
|
3479
3608
|
initData_: function() {
|
|
3480
3609
|
if (this.slot.id)
|
|
3481
3610
|
return;
|
|
3482
|
-
const t =
|
|
3611
|
+
const t = mo()?.[0];
|
|
3483
3612
|
if (!t)
|
|
3484
3613
|
return;
|
|
3485
3614
|
this.slot.id = t.id, this.slot.name = t.name;
|
|
@@ -3497,7 +3626,7 @@ const di = {
|
|
|
3497
3626
|
}, 0);
|
|
3498
3627
|
},
|
|
3499
3628
|
genSlotOpts_: function() {
|
|
3500
|
-
return
|
|
3629
|
+
return si();
|
|
3501
3630
|
},
|
|
3502
3631
|
onchange: function(t) {
|
|
3503
3632
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3526,12 +3655,12 @@ const di = {
|
|
|
3526
3655
|
t.name !== this.slot.name && (this.slot.name = t.name), this.setWarningText(null);
|
|
3527
3656
|
}
|
|
3528
3657
|
};
|
|
3529
|
-
I.select_slot_v1 =
|
|
3658
|
+
I.select_slot_v1 = hi;
|
|
3530
3659
|
i.forBlock.select_slot_v1 = function(t) {
|
|
3531
3660
|
const e = i.quote_, o = t.slot.id;
|
|
3532
3661
|
return [e(o), h.ATOMIC];
|
|
3533
3662
|
};
|
|
3534
|
-
const
|
|
3663
|
+
const fi = {
|
|
3535
3664
|
init: function() {
|
|
3536
3665
|
this.node = {
|
|
3537
3666
|
id: "",
|
|
@@ -3577,7 +3706,7 @@ const hi = {
|
|
|
3577
3706
|
return Mt("getProperty");
|
|
3578
3707
|
},
|
|
3579
3708
|
genPropertyOpts_: function() {
|
|
3580
|
-
return
|
|
3709
|
+
return fo(this.node.id, "read");
|
|
3581
3710
|
},
|
|
3582
3711
|
onchange: function(t) {
|
|
3583
3712
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3659,13 +3788,13 @@ const hi = {
|
|
|
3659
3788
|
$(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3660
3789
|
}
|
|
3661
3790
|
};
|
|
3662
|
-
I.get_app_property_v1 =
|
|
3791
|
+
I.get_app_property_v1 = fi;
|
|
3663
3792
|
i.forBlock.get_app_property_v1 = function(t) {
|
|
3664
3793
|
const e = i.quote_, n = t;
|
|
3665
3794
|
let o = "''";
|
|
3666
3795
|
return n.getInput("INSTANCE") && (o = i.valueToCode(n, "INSTANCE", h.NONE) || "''"), [`await __getPropertyV1__(${e(n.property.id)}, ${o})`, h.ATOMIC];
|
|
3667
3796
|
};
|
|
3668
|
-
const
|
|
3797
|
+
const mi = {
|
|
3669
3798
|
init: function() {
|
|
3670
3799
|
this.node = {
|
|
3671
3800
|
id: "",
|
|
@@ -3711,7 +3840,7 @@ const fi = {
|
|
|
3711
3840
|
return Mt("setProperty");
|
|
3712
3841
|
},
|
|
3713
3842
|
genPropertyOpts_: function() {
|
|
3714
|
-
return
|
|
3843
|
+
return fo(this.node.id, "write");
|
|
3715
3844
|
},
|
|
3716
3845
|
onchange: function(t) {
|
|
3717
3846
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3776,7 +3905,7 @@ const fi = {
|
|
|
3776
3905
|
if (n) {
|
|
3777
3906
|
n.setShadowDom(null);
|
|
3778
3907
|
const o = n.connection?.targetBlock();
|
|
3779
|
-
o && o.dispose(), t.meta.element ? n.setCheck(
|
|
3908
|
+
o && o.dispose(), t.meta.element ? n.setCheck(Cs(t.meta.raw)).setShadowDom(Ps(t.meta.raw)) : n.setCheck(St(t.meta.raw.type)).setShadowDom(rt(t.meta.raw.type));
|
|
3780
3909
|
}
|
|
3781
3910
|
},
|
|
3782
3911
|
checkWarning_: function() {
|
|
@@ -3802,7 +3931,7 @@ const fi = {
|
|
|
3802
3931
|
$(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
|
|
3803
3932
|
}
|
|
3804
3933
|
};
|
|
3805
|
-
I.set_app_property_v1 =
|
|
3934
|
+
I.set_app_property_v1 = mi;
|
|
3806
3935
|
i.forBlock.set_app_property_v1 = function(t) {
|
|
3807
3936
|
const e = i.quote_, n = t;
|
|
3808
3937
|
let o = "''";
|
|
@@ -3815,7 +3944,7 @@ i.forBlock.set_app_property_v1 = function(t) {
|
|
|
3815
3944
|
return `await __setPropertyV1__(${e(n.property.id)}, ${s}, ${o});
|
|
3816
3945
|
`;
|
|
3817
3946
|
};
|
|
3818
|
-
const
|
|
3947
|
+
const Ti = {
|
|
3819
3948
|
init: function() {
|
|
3820
3949
|
this.state = {
|
|
3821
3950
|
id: "",
|
|
@@ -3847,7 +3976,7 @@ const mi = {
|
|
|
3847
3976
|
}, 0);
|
|
3848
3977
|
},
|
|
3849
3978
|
genStateOpts_: function() {
|
|
3850
|
-
return
|
|
3979
|
+
return To();
|
|
3851
3980
|
},
|
|
3852
3981
|
onchange: function(t) {
|
|
3853
3982
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -3858,7 +3987,7 @@ const mi = {
|
|
|
3858
3987
|
}
|
|
3859
3988
|
},
|
|
3860
3989
|
onStateChange_: function(t) {
|
|
3861
|
-
const e =
|
|
3990
|
+
const e = Ee(t);
|
|
3862
3991
|
if (!e) {
|
|
3863
3992
|
console.assert(!1);
|
|
3864
3993
|
return;
|
|
@@ -3866,7 +3995,7 @@ const mi = {
|
|
|
3866
3995
|
this.state.id = e.id, this.state.name = e.name, this.state.type = e.type;
|
|
3867
3996
|
},
|
|
3868
3997
|
checkWarning_: function() {
|
|
3869
|
-
const t =
|
|
3998
|
+
const t = Ee(this.state.id);
|
|
3870
3999
|
if (!t) {
|
|
3871
4000
|
this.setWarningText(E("WARN_STATE_NOT_FOUND"));
|
|
3872
4001
|
return;
|
|
@@ -3878,12 +4007,12 @@ const mi = {
|
|
|
3878
4007
|
this.setWarningText(null);
|
|
3879
4008
|
}
|
|
3880
4009
|
};
|
|
3881
|
-
I.get_app_state_v1 =
|
|
4010
|
+
I.get_app_state_v1 = Ti;
|
|
3882
4011
|
i.forBlock.get_app_state_v1 = function(t) {
|
|
3883
4012
|
const e = i.quote_;
|
|
3884
4013
|
return [`__getStateV1__(${e(t.state.id)})`, h.ATOMIC];
|
|
3885
4014
|
};
|
|
3886
|
-
const
|
|
4015
|
+
const Ei = {
|
|
3887
4016
|
init: function() {
|
|
3888
4017
|
this.state = {
|
|
3889
4018
|
id: "",
|
|
@@ -3913,7 +4042,7 @@ const Ti = {
|
|
|
3913
4042
|
this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
|
|
3914
4043
|
},
|
|
3915
4044
|
genStateOpts_: function() {
|
|
3916
|
-
return
|
|
4045
|
+
return To();
|
|
3917
4046
|
},
|
|
3918
4047
|
onchange: function(t) {
|
|
3919
4048
|
if (t.type === v.BLOCK_CHANGE) {
|
|
@@ -3922,7 +4051,7 @@ const Ti = {
|
|
|
3922
4051
|
}
|
|
3923
4052
|
},
|
|
3924
4053
|
onStateChange_: function(t) {
|
|
3925
|
-
const e =
|
|
4054
|
+
const e = Ee(t);
|
|
3926
4055
|
if (!e) {
|
|
3927
4056
|
console.assert(!1);
|
|
3928
4057
|
return;
|
|
@@ -3939,7 +4068,7 @@ const Ti = {
|
|
|
3939
4068
|
this.getInput("VALUE").setCheck(e).setShadowDom(n);
|
|
3940
4069
|
},
|
|
3941
4070
|
checkWarning_: function() {
|
|
3942
|
-
const t =
|
|
4071
|
+
const t = Ee(this.state.id);
|
|
3943
4072
|
if (!t) {
|
|
3944
4073
|
this.setWarningText(E("WARN_STATE_NOT_FOUND"));
|
|
3945
4074
|
return;
|
|
@@ -3951,7 +4080,7 @@ const Ti = {
|
|
|
3951
4080
|
this.setWarningText(null);
|
|
3952
4081
|
}
|
|
3953
4082
|
};
|
|
3954
|
-
I.set_app_state_v1 =
|
|
4083
|
+
I.set_app_state_v1 = Ei;
|
|
3955
4084
|
i.forBlock.set_app_state_v1 = function(t) {
|
|
3956
4085
|
const e = i.quote_, n = t, o = i.valueToCode(n, "VALUE", h.NONE);
|
|
3957
4086
|
return `__setStateV1__(${e(n.state.id)}, ${o});
|
|
@@ -4660,7 +4789,7 @@ function ${i.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
4660
4789
|
`
|
|
4661
4790
|
)}(${e}, ${n}, ${o})`, h.FUNCTION_CALL];
|
|
4662
4791
|
};
|
|
4663
|
-
const
|
|
4792
|
+
const gi = L.xml, Ai = [
|
|
4664
4793
|
{
|
|
4665
4794
|
type: "add_data_v1",
|
|
4666
4795
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
@@ -4724,16 +4853,16 @@ const Ei = L.xml, gi = [
|
|
|
4724
4853
|
inputs: ["SUCCESS", "MESSAGE", "DATA"]
|
|
4725
4854
|
}
|
|
4726
4855
|
];
|
|
4727
|
-
function
|
|
4728
|
-
const n =
|
|
4856
|
+
function Ii(t, e) {
|
|
4857
|
+
const n = Ai.find((o) => o.type === t);
|
|
4729
4858
|
return n ? !!(n.prefixInputs?.some((o) => e.startsWith(o)) || n.inputs?.some((o) => o === e)) : !1;
|
|
4730
4859
|
}
|
|
4731
|
-
const
|
|
4860
|
+
const yi = {
|
|
4732
4861
|
init: function() {
|
|
4733
4862
|
this.key = "", this.name = "", this.locale = !1, this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
4734
4863
|
},
|
|
4735
4864
|
mutationToDom: function() {
|
|
4736
|
-
const t =
|
|
4865
|
+
const t = gi.createElement("mutation");
|
|
4737
4866
|
return t.setAttribute("key", this.key), t.setAttribute("name", this.name), t.setAttribute("locale", this.locale ? "TRUE" : "FALSE"), t;
|
|
4738
4867
|
},
|
|
4739
4868
|
domToMutation: function(t) {
|
|
@@ -4762,7 +4891,7 @@ const Ii = {
|
|
|
4762
4891
|
},
|
|
4763
4892
|
tryDuplicate_: function(t) {
|
|
4764
4893
|
const e = this.workspace.getBlockById(t.oldParentId);
|
|
4765
|
-
if (e &&
|
|
4894
|
+
if (e && Ii(e.type, t.oldInputName))
|
|
4766
4895
|
try {
|
|
4767
4896
|
v.disable();
|
|
4768
4897
|
const n = e.getInput(t.oldInputName)?.connection;
|
|
@@ -4787,15 +4916,15 @@ const Ii = {
|
|
|
4787
4916
|
this.setFieldValue(this.name, "LABEL");
|
|
4788
4917
|
}
|
|
4789
4918
|
};
|
|
4790
|
-
I.parameter_v1 =
|
|
4919
|
+
I.parameter_v1 = yi;
|
|
4791
4920
|
i.forBlock.parameter_v1 = function(t) {
|
|
4792
4921
|
return [t.key, h.ATOMIC];
|
|
4793
4922
|
};
|
|
4794
|
-
const
|
|
4923
|
+
const Oi = {
|
|
4795
4924
|
init: function() {
|
|
4796
4925
|
}
|
|
4797
4926
|
};
|
|
4798
|
-
I.on_flow_state_event_v1 =
|
|
4927
|
+
I.on_flow_state_event_v1 = Oi;
|
|
4799
4928
|
i.forBlock.on_flow_state_event_v1 = function() {
|
|
4800
4929
|
return `__onFlowStateEventV1__();
|
|
4801
4930
|
`;
|
|
@@ -4809,11 +4938,11 @@ function Yt(t, e) {
|
|
|
4809
4938
|
if (n)
|
|
4810
4939
|
return n.funcs.find((o) => o.id === e);
|
|
4811
4940
|
}
|
|
4812
|
-
function
|
|
4941
|
+
function Eo(t) {
|
|
4813
4942
|
const e = [];
|
|
4814
4943
|
return ee(t).forEach(({ id: o, name: s }) => {
|
|
4815
4944
|
e.push([s, o]);
|
|
4816
|
-
}),
|
|
4945
|
+
}), B(e);
|
|
4817
4946
|
}
|
|
4818
4947
|
function dn() {
|
|
4819
4948
|
return A.compute.activeFunc;
|
|
@@ -4822,28 +4951,28 @@ function xn(t) {
|
|
|
4822
4951
|
const { activeFunc: e } = A.compute;
|
|
4823
4952
|
return e.outputs?.find((n) => n.id === t);
|
|
4824
4953
|
}
|
|
4825
|
-
function
|
|
4954
|
+
function vi() {
|
|
4826
4955
|
const { activeFunc: t } = A.compute, e = [];
|
|
4827
4956
|
return t.outputs?.forEach(({ id: n, name: o }) => {
|
|
4828
4957
|
e.push([o, n]);
|
|
4829
|
-
}),
|
|
4958
|
+
}), B(e);
|
|
4830
4959
|
}
|
|
4831
|
-
function
|
|
4960
|
+
function ie(t) {
|
|
4832
4961
|
const e = [];
|
|
4833
4962
|
return A.compute.spaces.forEach((n) => {
|
|
4834
4963
|
t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
|
|
4835
4964
|
}), e;
|
|
4836
4965
|
}
|
|
4837
|
-
function
|
|
4966
|
+
function ge(t) {
|
|
4838
4967
|
return A.compute.spaces.find((e) => e.id === t);
|
|
4839
4968
|
}
|
|
4840
|
-
function
|
|
4969
|
+
function go(t) {
|
|
4841
4970
|
const e = [];
|
|
4842
|
-
return
|
|
4971
|
+
return ie(t).forEach(({ id: o, name: s }) => {
|
|
4843
4972
|
e.push([s, o]);
|
|
4844
|
-
}),
|
|
4973
|
+
}), B(e);
|
|
4845
4974
|
}
|
|
4846
|
-
const
|
|
4975
|
+
const Ci = {
|
|
4847
4976
|
init: function() {
|
|
4848
4977
|
this.space = {
|
|
4849
4978
|
id: "",
|
|
@@ -4861,7 +4990,7 @@ const vi = {
|
|
|
4861
4990
|
initData_: function() {
|
|
4862
4991
|
if (this.space.id)
|
|
4863
4992
|
return;
|
|
4864
|
-
const t =
|
|
4993
|
+
const t = ie("func")?.[0];
|
|
4865
4994
|
if (!t)
|
|
4866
4995
|
return;
|
|
4867
4996
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -4886,10 +5015,10 @@ const vi = {
|
|
|
4886
5015
|
}, 0);
|
|
4887
5016
|
},
|
|
4888
5017
|
genSpaceOpts_: function() {
|
|
4889
|
-
return
|
|
5018
|
+
return go("func");
|
|
4890
5019
|
},
|
|
4891
5020
|
genFuncOpts_: function() {
|
|
4892
|
-
return
|
|
5021
|
+
return Eo(this.space.id);
|
|
4893
5022
|
},
|
|
4894
5023
|
onchange: function(t) {
|
|
4895
5024
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -4902,7 +5031,7 @@ const vi = {
|
|
|
4902
5031
|
}
|
|
4903
5032
|
},
|
|
4904
5033
|
onSpaceChange_: function(t) {
|
|
4905
|
-
const e =
|
|
5034
|
+
const e = ge(t);
|
|
4906
5035
|
if (!e) {
|
|
4907
5036
|
console.assert(!1);
|
|
4908
5037
|
return;
|
|
@@ -4968,7 +5097,7 @@ const vi = {
|
|
|
4968
5097
|
q(this, t);
|
|
4969
5098
|
},
|
|
4970
5099
|
checkWarning_: function() {
|
|
4971
|
-
const t =
|
|
5100
|
+
const t = ge(this.space.id);
|
|
4972
5101
|
if (!t) {
|
|
4973
5102
|
this.setWarningText(E("WARN_SPACE_NOT_FOUND"));
|
|
4974
5103
|
return;
|
|
@@ -4990,7 +5119,7 @@ const vi = {
|
|
|
4990
5119
|
this.setWarningText(null);
|
|
4991
5120
|
}
|
|
4992
5121
|
};
|
|
4993
|
-
I.call_func_v1 =
|
|
5122
|
+
I.call_func_v1 = Ci;
|
|
4994
5123
|
i.forBlock.call_func_v1 = function(t) {
|
|
4995
5124
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
4996
5125
|
let c = "";
|
|
@@ -5017,7 +5146,7 @@ ${e}var __result__ = __callFuncV1__(${s},${a},__inputs__,__getEnvV1__(),${l});
|
|
|
5017
5146
|
${p}${_}}
|
|
5018
5147
|
`;
|
|
5019
5148
|
};
|
|
5020
|
-
const
|
|
5149
|
+
const ki = {
|
|
5021
5150
|
init: function() {
|
|
5022
5151
|
this.space = {
|
|
5023
5152
|
id: "",
|
|
@@ -5035,7 +5164,7 @@ const Ci = {
|
|
|
5035
5164
|
initData_: function() {
|
|
5036
5165
|
if (this.space.id)
|
|
5037
5166
|
return;
|
|
5038
|
-
const t =
|
|
5167
|
+
const t = ie("func")?.[0];
|
|
5039
5168
|
if (!t)
|
|
5040
5169
|
return;
|
|
5041
5170
|
this.space.id = t.id, this.space.name = t.name;
|
|
@@ -5060,10 +5189,10 @@ const Ci = {
|
|
|
5060
5189
|
}, 0);
|
|
5061
5190
|
},
|
|
5062
5191
|
genSpaceOpts_: function() {
|
|
5063
|
-
return
|
|
5192
|
+
return go("func");
|
|
5064
5193
|
},
|
|
5065
5194
|
genFuncOpts_: function() {
|
|
5066
|
-
return
|
|
5195
|
+
return Eo(this.space.id);
|
|
5067
5196
|
},
|
|
5068
5197
|
onchange: function(t) {
|
|
5069
5198
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -5076,7 +5205,7 @@ const Ci = {
|
|
|
5076
5205
|
}
|
|
5077
5206
|
},
|
|
5078
5207
|
onSpaceChange_: function(t) {
|
|
5079
|
-
const e =
|
|
5208
|
+
const e = ge(t);
|
|
5080
5209
|
if (!e) {
|
|
5081
5210
|
console.assert(!1);
|
|
5082
5211
|
return;
|
|
@@ -5142,7 +5271,7 @@ const Ci = {
|
|
|
5142
5271
|
q(this, t);
|
|
5143
5272
|
},
|
|
5144
5273
|
checkWarning_: function() {
|
|
5145
|
-
const t =
|
|
5274
|
+
const t = ge(this.space.id);
|
|
5146
5275
|
if (!t) {
|
|
5147
5276
|
this.setWarningText(E("WARN_SPACE_NOT_FOUND"));
|
|
5148
5277
|
return;
|
|
@@ -5164,7 +5293,7 @@ const Ci = {
|
|
|
5164
5293
|
this.setWarningText(null);
|
|
5165
5294
|
}
|
|
5166
5295
|
};
|
|
5167
|
-
I.call_func_internal_v1 =
|
|
5296
|
+
I.call_func_internal_v1 = ki;
|
|
5168
5297
|
i.forBlock.call_func_internal_v1 = function(t) {
|
|
5169
5298
|
const e = i.INDENT, n = i.quote_, o = t, s = n(o.space.id), a = n(o.func.id);
|
|
5170
5299
|
let c = `${e}var __inputs__ = {
|
|
@@ -5194,7 +5323,7 @@ ${e}}
|
|
|
5194
5323
|
${p}${_}}
|
|
5195
5324
|
`;
|
|
5196
5325
|
};
|
|
5197
|
-
const
|
|
5326
|
+
const Ni = {
|
|
5198
5327
|
init: function() {
|
|
5199
5328
|
this.func = {
|
|
5200
5329
|
id: ""
|
|
@@ -5250,7 +5379,7 @@ const ki = {
|
|
|
5250
5379
|
this.setWarningText(null);
|
|
5251
5380
|
}
|
|
5252
5381
|
};
|
|
5253
|
-
I.func_entry_v1 =
|
|
5382
|
+
I.func_entry_v1 = Ni;
|
|
5254
5383
|
i.forBlock.func_entry_v1 = function(t) {
|
|
5255
5384
|
const e = t, n = i.statementToCode(e, "HANDLE"), o = [];
|
|
5256
5385
|
if (e.func.inputs)
|
|
@@ -5261,7 +5390,7 @@ i.forBlock.func_entry_v1 = function(t) {
|
|
|
5261
5390
|
return `function __funcEntryV1__(${o.join(", ")}) {
|
|
5262
5391
|
${n}}`;
|
|
5263
5392
|
};
|
|
5264
|
-
const
|
|
5393
|
+
const Si = {
|
|
5265
5394
|
init: function() {
|
|
5266
5395
|
this.output = {
|
|
5267
5396
|
id: "",
|
|
@@ -5289,7 +5418,7 @@ const Ni = {
|
|
|
5289
5418
|
}, 0);
|
|
5290
5419
|
},
|
|
5291
5420
|
genOutputOpts_: function() {
|
|
5292
|
-
return
|
|
5421
|
+
return vi();
|
|
5293
5422
|
},
|
|
5294
5423
|
onchange: function(t) {
|
|
5295
5424
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -5336,7 +5465,7 @@ const Ni = {
|
|
|
5336
5465
|
this.setWarningText(null);
|
|
5337
5466
|
}
|
|
5338
5467
|
};
|
|
5339
|
-
I.set_func_output_v1 =
|
|
5468
|
+
I.set_func_output_v1 = Si;
|
|
5340
5469
|
i.forBlock.set_func_output_v1 = function(t) {
|
|
5341
5470
|
const e = i.quote_, n = t, { id: o, type: s } = n.output;
|
|
5342
5471
|
let a = i.valueToCode(n, "VALUE", h.ATOMIC);
|
|
@@ -5422,7 +5551,7 @@ function Me() {
|
|
|
5422
5551
|
const t = [];
|
|
5423
5552
|
return ut().forEach(({ id: n, name: o }) => {
|
|
5424
5553
|
t.push([o, n]);
|
|
5425
|
-
}),
|
|
5554
|
+
}), B(t);
|
|
5426
5555
|
}
|
|
5427
5556
|
function et(t) {
|
|
5428
5557
|
const { spaces: e } = A.data, n = e.find((o) => o.id === t);
|
|
@@ -5437,9 +5566,9 @@ function Ue(t) {
|
|
|
5437
5566
|
const e = [];
|
|
5438
5567
|
return et(t).forEach(({ id: o, name: s }) => {
|
|
5439
5568
|
e.push([s, o]);
|
|
5440
|
-
}),
|
|
5569
|
+
}), B(e);
|
|
5441
5570
|
}
|
|
5442
|
-
function
|
|
5571
|
+
function Ae(t, e) {
|
|
5443
5572
|
const { spaces: n } = A.data, o = n.find((a) => a.id === t);
|
|
5444
5573
|
if (!o)
|
|
5445
5574
|
return [];
|
|
@@ -5454,13 +5583,13 @@ function Ze(t, e, n) {
|
|
|
5454
5583
|
if (a)
|
|
5455
5584
|
return a.columns.find((c) => c.id === n);
|
|
5456
5585
|
}
|
|
5457
|
-
function
|
|
5586
|
+
function Li(t, e) {
|
|
5458
5587
|
const n = [];
|
|
5459
|
-
return
|
|
5588
|
+
return Ae(t, e).forEach(({ id: s, name: a }) => {
|
|
5460
5589
|
n.push([a, s]);
|
|
5461
|
-
}),
|
|
5590
|
+
}), B(n);
|
|
5462
5591
|
}
|
|
5463
|
-
function
|
|
5592
|
+
function bi(t) {
|
|
5464
5593
|
const e = t.getInput("TABLE").connection;
|
|
5465
5594
|
if (e.targetBlock())
|
|
5466
5595
|
return;
|
|
@@ -5518,7 +5647,7 @@ function Bi(t) {
|
|
|
5518
5647
|
}, o = Z.blocks.append(n, t.workspace);
|
|
5519
5648
|
e.connect(o.previousConnection);
|
|
5520
5649
|
}
|
|
5521
|
-
const
|
|
5650
|
+
const Pi = {
|
|
5522
5651
|
init: function() {
|
|
5523
5652
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_ADD_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_ADD_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_ADD_DATA_HELPURL}");
|
|
5524
5653
|
},
|
|
@@ -5534,14 +5663,14 @@ const bi = {
|
|
|
5534
5663
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
|
|
5535
5664
|
},
|
|
5536
5665
|
ensureBlocks_: function() {
|
|
5537
|
-
this.isInsertionMarker() || (
|
|
5666
|
+
this.isInsertionMarker() || (bi(this), q(this, [
|
|
5538
5667
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5539
5668
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
5540
5669
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
5541
5670
|
]), Bi(this));
|
|
5542
5671
|
}
|
|
5543
5672
|
};
|
|
5544
|
-
I.add_data_v1 =
|
|
5673
|
+
I.add_data_v1 = Pi;
|
|
5545
5674
|
i.forBlock.add_data_v1 = function(t) {
|
|
5546
5675
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.statementToCode(t, "HANDLE");
|
|
5547
5676
|
return `{
|
|
@@ -5557,7 +5686,7 @@ ${e}}
|
|
|
5557
5686
|
${o}}
|
|
5558
5687
|
`;
|
|
5559
5688
|
};
|
|
5560
|
-
const
|
|
5689
|
+
const Ri = {
|
|
5561
5690
|
init: function() {
|
|
5562
5691
|
this.space = {
|
|
5563
5692
|
id: "",
|
|
@@ -5604,7 +5733,7 @@ const Pi = {
|
|
|
5604
5733
|
if (!e)
|
|
5605
5734
|
return;
|
|
5606
5735
|
this.table.id = e.id, this.table.name = e.name;
|
|
5607
|
-
const n =
|
|
5736
|
+
const n = Ae(this.space.id, this.table.id)?.[0];
|
|
5608
5737
|
n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
|
|
5609
5738
|
},
|
|
5610
5739
|
saveExtraState: function() {
|
|
@@ -5626,7 +5755,7 @@ const Pi = {
|
|
|
5626
5755
|
return Ue(this.space.id);
|
|
5627
5756
|
},
|
|
5628
5757
|
genColumnOpts_: function() {
|
|
5629
|
-
return
|
|
5758
|
+
return Li(this.space.id, this.table.id);
|
|
5630
5759
|
},
|
|
5631
5760
|
onchange: function(t) {
|
|
5632
5761
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -5658,7 +5787,7 @@ const Pi = {
|
|
|
5658
5787
|
}
|
|
5659
5788
|
const n = e.id !== this.table.id;
|
|
5660
5789
|
if (this.table.id = e.id, this.table.name = e.name, n || !Ze(this.space.id, this.table.id, this.column.id)) {
|
|
5661
|
-
const o =
|
|
5790
|
+
const o = Ae(this.space.id, this.table.id)?.[0]?.id ?? "", s = this.getField("COLUMN");
|
|
5662
5791
|
s.getOptions(!1), s.setValue(o, !1), this.onColumnChange_(o);
|
|
5663
5792
|
}
|
|
5664
5793
|
},
|
|
@@ -5690,7 +5819,7 @@ const Pi = {
|
|
|
5690
5819
|
o && (e.setCheck(null), e.connect(o.outputConnection));
|
|
5691
5820
|
},
|
|
5692
5821
|
updateCheck_: function() {
|
|
5693
|
-
const t =
|
|
5822
|
+
const t = ro(this.column.type);
|
|
5694
5823
|
this.getInput("VALUE").connection.setCheck(t);
|
|
5695
5824
|
},
|
|
5696
5825
|
checkWarning_: function() {
|
|
@@ -5722,7 +5851,7 @@ const Pi = {
|
|
|
5722
5851
|
this.setWarningText(null);
|
|
5723
5852
|
}
|
|
5724
5853
|
};
|
|
5725
|
-
I.cond_atomic_v1 =
|
|
5854
|
+
I.cond_atomic_v1 = Ri;
|
|
5726
5855
|
i.forBlock.cond_atomic_v1 = function(t) {
|
|
5727
5856
|
const e = i.quote_, n = t, o = n.column.name, s = i.valueToCode(n, "VALUE", h.ATOMIC) || null, c = {
|
|
5728
5857
|
EQ: "=",
|
|
@@ -5734,19 +5863,19 @@ i.forBlock.cond_atomic_v1 = function(t) {
|
|
|
5734
5863
|
}[n.getFieldValue("OP")];
|
|
5735
5864
|
return [`{type:'ATOMIC',key:${e(o)},value:${s},operator:${e(c)}}`, h.ATOMIC];
|
|
5736
5865
|
};
|
|
5737
|
-
const
|
|
5866
|
+
const Di = {
|
|
5738
5867
|
init: function() {
|
|
5739
5868
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5740
5869
|
}
|
|
5741
5870
|
};
|
|
5742
|
-
I.cond_logic_container_v1 =
|
|
5743
|
-
const
|
|
5871
|
+
I.cond_logic_container_v1 = Di;
|
|
5872
|
+
const Mi = {
|
|
5744
5873
|
init: function() {
|
|
5745
5874
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
|
|
5746
5875
|
}
|
|
5747
5876
|
};
|
|
5748
|
-
I.cond_logic_item_v1 =
|
|
5749
|
-
const
|
|
5877
|
+
I.cond_logic_item_v1 = Mi;
|
|
5878
|
+
const Ui = {
|
|
5750
5879
|
init: function() {
|
|
5751
5880
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
5752
5881
|
new O([
|
|
@@ -5820,7 +5949,7 @@ const Mi = {
|
|
|
5820
5949
|
this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
|
|
5821
5950
|
}
|
|
5822
5951
|
};
|
|
5823
|
-
I.cond_logic_v1 =
|
|
5952
|
+
I.cond_logic_v1 = Ui;
|
|
5824
5953
|
i.forBlock.cond_logic_v1 = function(t) {
|
|
5825
5954
|
const e = i.quote_, n = t, o = n.getFieldValue("TYPE"), s = [], a = i.valueToCode(n, "VALUE", h.ATOMIC) || null;
|
|
5826
5955
|
s.push(a);
|
|
@@ -5830,7 +5959,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5830
5959
|
}
|
|
5831
5960
|
return [`{type:${e(o)},entries:[${s}]}`, h.ATOMIC];
|
|
5832
5961
|
};
|
|
5833
|
-
function
|
|
5962
|
+
function Vi(t) {
|
|
5834
5963
|
const e = t.getInput("TABLE").connection;
|
|
5835
5964
|
if (e.targetBlock())
|
|
5836
5965
|
return;
|
|
@@ -5849,11 +5978,11 @@ function Ui(t) {
|
|
|
5849
5978
|
}, a = Z.blocks.append(s, t.workspace);
|
|
5850
5979
|
e.connect(a.outputConnection);
|
|
5851
5980
|
}
|
|
5852
|
-
function
|
|
5981
|
+
function xi(t) {
|
|
5853
5982
|
const e = t.getInput("CONDITION").connection;
|
|
5854
5983
|
if (e.targetBlock())
|
|
5855
5984
|
return;
|
|
5856
|
-
const n = ut()?.[0], o = et(n?.id ?? "")?.[0], s =
|
|
5985
|
+
const n = ut()?.[0], o = et(n?.id ?? "")?.[0], s = Ae(n?.id, o?.id)?.[0], a = {
|
|
5857
5986
|
type: "cond_atomic_v1",
|
|
5858
5987
|
extraState: {
|
|
5859
5988
|
space: {
|
|
@@ -5874,7 +6003,7 @@ function Vi(t) {
|
|
|
5874
6003
|
}, c = Z.blocks.append(a, t.workspace);
|
|
5875
6004
|
e.connect(c.outputConnection);
|
|
5876
6005
|
}
|
|
5877
|
-
function
|
|
6006
|
+
function wi(t) {
|
|
5878
6007
|
const e = t.getInput("HANDLE").connection;
|
|
5879
6008
|
if (e.targetBlock())
|
|
5880
6009
|
return;
|
|
@@ -5898,7 +6027,7 @@ function xi(t) {
|
|
|
5898
6027
|
}, o = Z.blocks.append(n, t.workspace);
|
|
5899
6028
|
e.connect(o.previousConnection);
|
|
5900
6029
|
}
|
|
5901
|
-
const
|
|
6030
|
+
const Fi = {
|
|
5902
6031
|
init: function() {
|
|
5903
6032
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_DELETE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_DELETE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_DELETE_DATA_HELPURL}");
|
|
5904
6033
|
},
|
|
@@ -5914,13 +6043,13 @@ const wi = {
|
|
|
5914
6043
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
5915
6044
|
},
|
|
5916
6045
|
ensureBlocks_: function() {
|
|
5917
|
-
this.isInsertionMarker() || (
|
|
6046
|
+
this.isInsertionMarker() || (Vi(this), xi(this), q(this, [
|
|
5918
6047
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5919
6048
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5920
|
-
]),
|
|
6049
|
+
]), wi(this));
|
|
5921
6050
|
}
|
|
5922
6051
|
};
|
|
5923
|
-
I.delete_data_v1 =
|
|
6052
|
+
I.delete_data_v1 = Fi;
|
|
5924
6053
|
i.forBlock.delete_data_v1 = function(t) {
|
|
5925
6054
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
5926
6055
|
return `{
|
|
@@ -5958,7 +6087,7 @@ i.forBlock.interrupt_transaction_v1 = function(t) {
|
|
|
5958
6087
|
return `throw ${i.valueToCode(t, "VALUE", h.NONE) || "''"};
|
|
5959
6088
|
`;
|
|
5960
6089
|
};
|
|
5961
|
-
function
|
|
6090
|
+
function Yi(t) {
|
|
5962
6091
|
const e = t.getInput("TABLE").connection;
|
|
5963
6092
|
if (e.targetBlock())
|
|
5964
6093
|
return;
|
|
@@ -5992,7 +6121,7 @@ function Fi(t) {
|
|
|
5992
6121
|
}, c = Z.blocks.append(a, t.workspace);
|
|
5993
6122
|
e.connect(c.outputConnection);
|
|
5994
6123
|
}
|
|
5995
|
-
function
|
|
6124
|
+
function Ki(t) {
|
|
5996
6125
|
const e = t.getInput("CONDITION").connection;
|
|
5997
6126
|
if (e.targetBlock())
|
|
5998
6127
|
return;
|
|
@@ -6001,7 +6130,7 @@ function Yi(t) {
|
|
|
6001
6130
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6002
6131
|
e.connect(o.outputConnection);
|
|
6003
6132
|
}
|
|
6004
|
-
function
|
|
6133
|
+
function $i(t) {
|
|
6005
6134
|
const e = t.getInput("EXTRA").connection;
|
|
6006
6135
|
if (e.targetBlock())
|
|
6007
6136
|
return;
|
|
@@ -6038,7 +6167,7 @@ function Ki(t) {
|
|
|
6038
6167
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6039
6168
|
e.connect(o.outputConnection);
|
|
6040
6169
|
}
|
|
6041
|
-
function
|
|
6170
|
+
function Hi(t) {
|
|
6042
6171
|
const e = t.getInput("HANDLE").connection;
|
|
6043
6172
|
if (e.targetBlock())
|
|
6044
6173
|
return;
|
|
@@ -6076,7 +6205,7 @@ g([
|
|
|
6076
6205
|
style: "procedure_blocks"
|
|
6077
6206
|
}
|
|
6078
6207
|
]);
|
|
6079
|
-
const
|
|
6208
|
+
const Gi = {
|
|
6080
6209
|
init: function() {
|
|
6081
6210
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_QUERY_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_QUERY_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_QUERY_DATA_HELPURL}");
|
|
6082
6211
|
},
|
|
@@ -6092,15 +6221,15 @@ const Hi = {
|
|
|
6092
6221
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
6093
6222
|
},
|
|
6094
6223
|
ensureBlocks_: function() {
|
|
6095
|
-
this.isInsertionMarker() || (
|
|
6224
|
+
this.isInsertionMarker() || (Yi(this), Ki(this), $i(this), q(this, [
|
|
6096
6225
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6097
6226
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6098
6227
|
["MAIN_DATA", "__mainData__", "x-runtime-lib.mainData", !0],
|
|
6099
6228
|
["EXTRA_DATA", "__extraData__", "x-runtime-lib.extraData", !0]
|
|
6100
|
-
]),
|
|
6229
|
+
]), Hi(this));
|
|
6101
6230
|
}
|
|
6102
6231
|
};
|
|
6103
|
-
I.query_data_v1 =
|
|
6232
|
+
I.query_data_v1 = Gi;
|
|
6104
6233
|
i.forBlock.query_data_v1 = function(t) {
|
|
6105
6234
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.valueToCode(t, "EXTRA", h.ATOMIC) || "null", a = i.statementToCode(t, "HANDLE");
|
|
6106
6235
|
return `{
|
|
@@ -6173,19 +6302,19 @@ i.forBlock.query_extra_sortby_v1 = function(t) {
|
|
|
6173
6302
|
const e = i.valueToCode(t, "COLUMN", h.ATOMIC) || "''", n = i.valueToCode(t, "DESC", h.ATOMIC) || !1;
|
|
6174
6303
|
return [`{type:'sortby',value:${e},value2:${n}}`, h.ATOMIC];
|
|
6175
6304
|
};
|
|
6176
|
-
const
|
|
6305
|
+
const Wi = {
|
|
6177
6306
|
init: function() {
|
|
6178
6307
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6179
6308
|
}
|
|
6180
6309
|
};
|
|
6181
|
-
I.select_column_container_v1 =
|
|
6182
|
-
const
|
|
6310
|
+
I.select_column_container_v1 = Wi;
|
|
6311
|
+
const ji = {
|
|
6183
6312
|
init: function() {
|
|
6184
6313
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6185
6314
|
}
|
|
6186
6315
|
};
|
|
6187
|
-
I.select_column_item_v1 =
|
|
6188
|
-
const
|
|
6316
|
+
I.select_column_item_v1 = ji;
|
|
6317
|
+
const Xi = {
|
|
6189
6318
|
init: function() {
|
|
6190
6319
|
this.space = {
|
|
6191
6320
|
id: "",
|
|
@@ -6245,7 +6374,7 @@ const ji = {
|
|
|
6245
6374
|
const t = [];
|
|
6246
6375
|
return this.table.columns.forEach(({ id: e, name: n }) => {
|
|
6247
6376
|
t.push([n, e]);
|
|
6248
|
-
}),
|
|
6377
|
+
}), B(t);
|
|
6249
6378
|
},
|
|
6250
6379
|
onchange: function(t) {
|
|
6251
6380
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6394,7 +6523,7 @@ const ji = {
|
|
|
6394
6523
|
this.setWarningText(null);
|
|
6395
6524
|
}
|
|
6396
6525
|
};
|
|
6397
|
-
I.select_column_v1 =
|
|
6526
|
+
I.select_column_v1 = Xi;
|
|
6398
6527
|
i.forBlock.select_column_v1 = function(t) {
|
|
6399
6528
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6400
6529
|
for (let p = 0; p < n.itemCount_; p++) {
|
|
@@ -6406,7 +6535,7 @@ i.forBlock.select_column_v1 = function(t) {
|
|
|
6406
6535
|
r !== 0 && (c += ","), c += `{name:${e(p)},alias:${e(_)}}`;
|
|
6407
6536
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
|
|
6408
6537
|
};
|
|
6409
|
-
const
|
|
6538
|
+
const Ji = {
|
|
6410
6539
|
init: function() {
|
|
6411
6540
|
this.space = {
|
|
6412
6541
|
id: "",
|
|
@@ -6498,12 +6627,12 @@ const Xi = {
|
|
|
6498
6627
|
e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
|
|
6499
6628
|
}
|
|
6500
6629
|
};
|
|
6501
|
-
I.select_table_v1 =
|
|
6630
|
+
I.select_table_v1 = Ji;
|
|
6502
6631
|
i.forBlock.select_table_v1 = function(t) {
|
|
6503
6632
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id;
|
|
6504
6633
|
return [`{spaceId:${e(o)},tableId:${e(s)}}`, h.ATOMIC];
|
|
6505
6634
|
};
|
|
6506
|
-
const
|
|
6635
|
+
const qi = {
|
|
6507
6636
|
init: function() {
|
|
6508
6637
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_TRANSACTION_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_TRANSACTION_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_TRANSACTION_HELPURL}");
|
|
6509
6638
|
},
|
|
@@ -6525,9 +6654,9 @@ const Ji = {
|
|
|
6525
6654
|
]);
|
|
6526
6655
|
}
|
|
6527
6656
|
};
|
|
6528
|
-
I.transaction_v1 =
|
|
6657
|
+
I.transaction_v1 = qi;
|
|
6529
6658
|
i.forBlock.transaction_v1 = function(t) {
|
|
6530
|
-
const e = i.INDENT, n = t, o =
|
|
6659
|
+
const e = i.INDENT, n = t, o = Os(n), s = i.statementToCode(n, "HANDLE"), a = i.statementToCode(n, "FINALLY");
|
|
6531
6660
|
return `{
|
|
6532
6661
|
${e}var __error${o}__ = '';
|
|
6533
6662
|
${e}var __txExist${o}__ = typeof(__tx__) !== 'undefined';
|
|
@@ -6569,19 +6698,19 @@ ${e}}
|
|
|
6569
6698
|
}
|
|
6570
6699
|
`;
|
|
6571
6700
|
};
|
|
6572
|
-
const
|
|
6701
|
+
const Qi = {
|
|
6573
6702
|
init: function() {
|
|
6574
6703
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6575
6704
|
}
|
|
6576
6705
|
};
|
|
6577
|
-
I.update_column_container_v1 =
|
|
6578
|
-
const
|
|
6706
|
+
I.update_column_container_v1 = Qi;
|
|
6707
|
+
const zi = {
|
|
6579
6708
|
init: function() {
|
|
6580
6709
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6581
6710
|
}
|
|
6582
6711
|
};
|
|
6583
|
-
I.update_column_item_v1 =
|
|
6584
|
-
const
|
|
6712
|
+
I.update_column_item_v1 = zi;
|
|
6713
|
+
const Zi = {
|
|
6585
6714
|
init: function() {
|
|
6586
6715
|
this.space = {
|
|
6587
6716
|
id: "",
|
|
@@ -6641,7 +6770,7 @@ const zi = {
|
|
|
6641
6770
|
const t = [];
|
|
6642
6771
|
return this.table.columns.forEach(({ id: e, name: n }) => {
|
|
6643
6772
|
t.push([n, e]);
|
|
6644
|
-
}),
|
|
6773
|
+
}), B(t);
|
|
6645
6774
|
},
|
|
6646
6775
|
onchange: function(t) {
|
|
6647
6776
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6802,7 +6931,7 @@ const zi = {
|
|
|
6802
6931
|
const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((s) => s.id === e);
|
|
6803
6932
|
if (!n)
|
|
6804
6933
|
continue;
|
|
6805
|
-
const o =
|
|
6934
|
+
const o = ro(n.type);
|
|
6806
6935
|
this.getInput("ADD" + t).setCheck(o);
|
|
6807
6936
|
}
|
|
6808
6937
|
},
|
|
@@ -6825,7 +6954,7 @@ const zi = {
|
|
|
6825
6954
|
this.setWarningText(null);
|
|
6826
6955
|
}
|
|
6827
6956
|
};
|
|
6828
|
-
I.update_column_v1 =
|
|
6957
|
+
I.update_column_v1 = Zi;
|
|
6829
6958
|
i.forBlock.update_column_v1 = function(t) {
|
|
6830
6959
|
const e = i.quote_, n = t, o = n.space.id, s = n.table.id, a = [];
|
|
6831
6960
|
for (let p = 0; p < n.itemCount_; p++) {
|
|
@@ -6837,7 +6966,7 @@ i.forBlock.update_column_v1 = function(t) {
|
|
|
6837
6966
|
r !== 0 && (c += ","), c += `{name:${e(p)},value:${_}}`;
|
|
6838
6967
|
}), c += "]", [`{spaceId:${e(o)},tableId:${e(s)},columns:${c}}`, h.ATOMIC];
|
|
6839
6968
|
};
|
|
6840
|
-
function
|
|
6969
|
+
function ta(t) {
|
|
6841
6970
|
const e = t.getInput("TABLE").connection;
|
|
6842
6971
|
if (e.targetBlock())
|
|
6843
6972
|
return;
|
|
@@ -6871,7 +7000,7 @@ function Zi(t) {
|
|
|
6871
7000
|
}, c = Z.blocks.append(a, t.workspace);
|
|
6872
7001
|
e.connect(c.outputConnection);
|
|
6873
7002
|
}
|
|
6874
|
-
function
|
|
7003
|
+
function ea(t) {
|
|
6875
7004
|
const e = t.getInput("CONDITION").connection;
|
|
6876
7005
|
if (e.targetBlock())
|
|
6877
7006
|
return;
|
|
@@ -6880,7 +7009,7 @@ function ta(t) {
|
|
|
6880
7009
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6881
7010
|
e.connect(o.outputConnection);
|
|
6882
7011
|
}
|
|
6883
|
-
function
|
|
7012
|
+
function na(t) {
|
|
6884
7013
|
const e = t.getInput("HANDLE").connection;
|
|
6885
7014
|
if (e.targetBlock())
|
|
6886
7015
|
return;
|
|
@@ -6904,7 +7033,7 @@ function ea(t) {
|
|
|
6904
7033
|
}, o = Z.blocks.append(n, t.workspace);
|
|
6905
7034
|
e.connect(o.previousConnection);
|
|
6906
7035
|
}
|
|
6907
|
-
const
|
|
7036
|
+
const oa = {
|
|
6908
7037
|
init: function() {
|
|
6909
7038
|
this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_DATA_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_DATA_V1_UPDATE_DATA_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_UPDATE_DATA_HELPURL}");
|
|
6910
7039
|
},
|
|
@@ -6920,14 +7049,14 @@ const na = {
|
|
|
6920
7049
|
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(k.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(k.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
|
|
6921
7050
|
},
|
|
6922
7051
|
ensureBlocks: function() {
|
|
6923
|
-
this.isInsertionMarker() || (
|
|
7052
|
+
this.isInsertionMarker() || (ta(this), ea(this), q(this, [
|
|
6924
7053
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
6925
7054
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0],
|
|
6926
7055
|
["DATA", "__data__", "x-runtime-lib.data", !0]
|
|
6927
|
-
]),
|
|
7056
|
+
]), na(this));
|
|
6928
7057
|
}
|
|
6929
7058
|
};
|
|
6930
|
-
I.update_data_v1 =
|
|
7059
|
+
I.update_data_v1 = oa;
|
|
6931
7060
|
i.forBlock.update_data_v1 = function(t) {
|
|
6932
7061
|
const e = i.INDENT, n = i.valueToCode(t, "TABLE", h.ATOMIC) || "null", o = i.valueToCode(t, "CONDITION", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
6933
7062
|
return `{
|
|
@@ -6944,7 +7073,7 @@ ${e}}
|
|
|
6944
7073
|
${s}}
|
|
6945
7074
|
`;
|
|
6946
7075
|
};
|
|
6947
|
-
const
|
|
7076
|
+
const sa = L.xml, ia = {
|
|
6948
7077
|
init: function() {
|
|
6949
7078
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
6950
7079
|
new pt(Ft, 20, 20, void 0, () => {
|
|
@@ -6953,7 +7082,7 @@ const oa = L.xml, sa = {
|
|
|
6953
7082
|
), this.appendDummyInput("CLOSE_BRACKET").appendField(" ] "), this.setInputsInline(!1), this.setOutput(!0, "JsonArray"), this.setColour(350), this.setTooltip(""), this.setHelpUrl("");
|
|
6954
7083
|
},
|
|
6955
7084
|
mutationToDom: function() {
|
|
6956
|
-
const t =
|
|
7085
|
+
const t = sa.createElement("mutation");
|
|
6957
7086
|
return t.setAttribute("items", String(this.length)), t;
|
|
6958
7087
|
},
|
|
6959
7088
|
domToMutation: function(t) {
|
|
@@ -6970,7 +7099,7 @@ const oa = L.xml, sa = {
|
|
|
6970
7099
|
this.isInFlyout || this.addEntry_(n);
|
|
6971
7100
|
})
|
|
6972
7101
|
), n.appendField(new Ln(String(t))), n.appendField(
|
|
6973
|
-
new pt(
|
|
7102
|
+
new pt(he, 20, 20, void 0, () => {
|
|
6974
7103
|
this.isInFlyout || this.removeEntry_(n);
|
|
6975
7104
|
})
|
|
6976
7105
|
), this.moveInputBefore(e, "ADD");
|
|
@@ -6989,7 +7118,7 @@ const oa = L.xml, sa = {
|
|
|
6989
7118
|
this.isInFlyout || this.addEntry_(n);
|
|
6990
7119
|
})
|
|
6991
7120
|
), n.appendField(new Ln(String(e))), n.appendField(
|
|
6992
|
-
new pt(
|
|
7121
|
+
new pt(he, 20, 20, void 0, () => {
|
|
6993
7122
|
this.isInFlyout || this.removeEntry_(n);
|
|
6994
7123
|
})
|
|
6995
7124
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -7005,8 +7134,8 @@ const oa = L.xml, sa = {
|
|
|
7005
7134
|
this.length--;
|
|
7006
7135
|
}
|
|
7007
7136
|
};
|
|
7008
|
-
I.json_array_v1 =
|
|
7009
|
-
const
|
|
7137
|
+
I.json_array_v1 = ia;
|
|
7138
|
+
const aa = {
|
|
7010
7139
|
init: function() {
|
|
7011
7140
|
this.appendDummyInput().appendField(
|
|
7012
7141
|
new O([
|
|
@@ -7017,8 +7146,8 @@ const ia = {
|
|
|
7017
7146
|
), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
|
|
7018
7147
|
}
|
|
7019
7148
|
};
|
|
7020
|
-
I.json_boolean_v1 =
|
|
7021
|
-
const wn = L.xml,
|
|
7149
|
+
I.json_boolean_v1 = aa;
|
|
7150
|
+
const wn = L.xml, ca = {
|
|
7022
7151
|
init: function() {
|
|
7023
7152
|
this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(k.Align.CENTRE).appendField(
|
|
7024
7153
|
new pt(Ft, 20, 20, void 0, () => {
|
|
@@ -7053,7 +7182,7 @@ const wn = L.xml, aa = {
|
|
|
7053
7182
|
this.isInFlyout || this.addEntry_(s);
|
|
7054
7183
|
})
|
|
7055
7184
|
), s.appendField(new vt(n), "KEY" + e), s.appendField(
|
|
7056
|
-
new pt(
|
|
7185
|
+
new pt(he, 20, 20, void 0, () => {
|
|
7057
7186
|
this.isInFlyout || this.removeEntry_(s);
|
|
7058
7187
|
})
|
|
7059
7188
|
), this.moveInputBefore(o, "ADD");
|
|
@@ -7070,7 +7199,7 @@ const wn = L.xml, aa = {
|
|
|
7070
7199
|
this.isInFlyout || this.addEntry_(n);
|
|
7071
7200
|
})
|
|
7072
7201
|
), n.appendField(new vt("key"), "KEY" + e), n.appendField(
|
|
7073
|
-
new pt(
|
|
7202
|
+
new pt(he, 20, 20, void 0, () => {
|
|
7074
7203
|
this.isInFlyout || this.removeEntry_(n);
|
|
7075
7204
|
})
|
|
7076
7205
|
), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
|
|
@@ -7084,38 +7213,38 @@ const wn = L.xml, aa = {
|
|
|
7084
7213
|
this.length--;
|
|
7085
7214
|
}
|
|
7086
7215
|
};
|
|
7087
|
-
I.json_map_v1 =
|
|
7088
|
-
const
|
|
7216
|
+
I.json_map_v1 = ca;
|
|
7217
|
+
const ra = {
|
|
7089
7218
|
init: function() {
|
|
7090
7219
|
this.appendDummyInput().appendField(new en(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
|
|
7091
7220
|
}
|
|
7092
7221
|
};
|
|
7093
|
-
I.json_number_v1 =
|
|
7094
|
-
const
|
|
7222
|
+
I.json_number_v1 = ra;
|
|
7223
|
+
const la = {
|
|
7095
7224
|
init: function() {
|
|
7096
7225
|
this.appendDummyInput().setAlign(k.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
|
|
7097
7226
|
}
|
|
7098
7227
|
};
|
|
7099
|
-
I.json_root_v1 =
|
|
7100
|
-
const
|
|
7228
|
+
I.json_root_v1 = la;
|
|
7229
|
+
const ua = {
|
|
7101
7230
|
init: function() {
|
|
7102
7231
|
this.appendDummyInput().appendField('"').appendField(new vt(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
|
|
7103
7232
|
}
|
|
7104
7233
|
};
|
|
7105
|
-
I.json_string_v1 =
|
|
7106
|
-
const
|
|
7234
|
+
I.json_string_v1 = ua;
|
|
7235
|
+
const pa = L.xml, _a = {
|
|
7107
7236
|
init: function() {
|
|
7108
7237
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
7109
7238
|
}
|
|
7110
7239
|
};
|
|
7111
|
-
I.list_create_container_v1 =
|
|
7112
|
-
const
|
|
7240
|
+
I.list_create_container_v1 = _a;
|
|
7241
|
+
const da = {
|
|
7113
7242
|
init: function() {
|
|
7114
7243
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
7115
7244
|
}
|
|
7116
7245
|
};
|
|
7117
|
-
I.list_create_item_v1 =
|
|
7118
|
-
const
|
|
7246
|
+
I.list_create_item_v1 = da;
|
|
7247
|
+
const ha = {
|
|
7119
7248
|
init: function() {
|
|
7120
7249
|
this.itemCount_ = 0, this.setMutator(
|
|
7121
7250
|
new kt.MutatorIcon(
|
|
@@ -7125,7 +7254,7 @@ const da = {
|
|
|
7125
7254
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}"), this.updateShape_();
|
|
7126
7255
|
},
|
|
7127
7256
|
mutationToDom: function() {
|
|
7128
|
-
const t =
|
|
7257
|
+
const t = pa.createElement("mutation");
|
|
7129
7258
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
7130
7259
|
},
|
|
7131
7260
|
domToMutation: function(t) {
|
|
@@ -7197,7 +7326,7 @@ const da = {
|
|
|
7197
7326
|
this.removeInput("ADD" + t);
|
|
7198
7327
|
}
|
|
7199
7328
|
};
|
|
7200
|
-
I.list_create_v1 =
|
|
7329
|
+
I.list_create_v1 = ha;
|
|
7201
7330
|
i.forBlock.list_create_v1 = function(t) {
|
|
7202
7331
|
const e = t, n = new Array(e.itemCount_);
|
|
7203
7332
|
for (let s = 0; s < e.itemCount_; s++)
|
|
@@ -7413,7 +7542,7 @@ i.forBlock.list_set_v1 = function(t) {
|
|
|
7413
7542
|
return `${e}[${n}] = ${o};
|
|
7414
7543
|
`;
|
|
7415
7544
|
};
|
|
7416
|
-
const
|
|
7545
|
+
const fa = {
|
|
7417
7546
|
// logic_compare
|
|
7418
7547
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
7419
7548
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -7427,7 +7556,7 @@ const ha = {
|
|
|
7427
7556
|
};
|
|
7428
7557
|
x.register(
|
|
7429
7558
|
"logic_op_tooltip_v1",
|
|
7430
|
-
x.buildTooltipForDropdown("OP",
|
|
7559
|
+
x.buildTooltipForDropdown("OP", fa)
|
|
7431
7560
|
);
|
|
7432
7561
|
g([
|
|
7433
7562
|
{
|
|
@@ -7452,7 +7581,7 @@ g([
|
|
|
7452
7581
|
i.forBlock.logic_boolean_v1 = function(t) {
|
|
7453
7582
|
return [t.getFieldValue("BOOL") === "TRUE" ? "true" : "false", h.ATOMIC];
|
|
7454
7583
|
};
|
|
7455
|
-
const
|
|
7584
|
+
const ma = {
|
|
7456
7585
|
onchange: function(t) {
|
|
7457
7586
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
7458
7587
|
const e = this.getInputTargetBlock("A"), n = this.getInputTargetBlock("B");
|
|
@@ -7472,7 +7601,7 @@ const fa = {
|
|
|
7472
7601
|
x.register(
|
|
7473
7602
|
"logic_compare_v1",
|
|
7474
7603
|
function() {
|
|
7475
|
-
this.mixin(
|
|
7604
|
+
this.mixin(ma);
|
|
7476
7605
|
}
|
|
7477
7606
|
);
|
|
7478
7607
|
g([
|
|
@@ -7522,7 +7651,7 @@ i.forBlock.logic_compare_v1 = function(t) {
|
|
|
7522
7651
|
const s = i.valueToCode(t, "A", o) || "0", a = i.valueToCode(t, "B", o) || "0";
|
|
7523
7652
|
return [`${s} ${n} ${a}`, o];
|
|
7524
7653
|
};
|
|
7525
|
-
const
|
|
7654
|
+
const Ta = {
|
|
7526
7655
|
elseIfCount_: 0,
|
|
7527
7656
|
hasElse_: !1,
|
|
7528
7657
|
mutationToDom: function() {
|
|
@@ -7649,7 +7778,7 @@ const ma = {
|
|
|
7649
7778
|
};
|
|
7650
7779
|
x.registerMutator(
|
|
7651
7780
|
"logic_if_v1_mutator",
|
|
7652
|
-
|
|
7781
|
+
Ta,
|
|
7653
7782
|
void 0,
|
|
7654
7783
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
7655
7784
|
);
|
|
@@ -7795,7 +7924,7 @@ i.forBlock.logic_operation_v1 = function(t) {
|
|
|
7795
7924
|
}
|
|
7796
7925
|
return [`${o} ${e} ${s}`, n];
|
|
7797
7926
|
};
|
|
7798
|
-
const
|
|
7927
|
+
const Ea = {
|
|
7799
7928
|
prevParentConnection_: null,
|
|
7800
7929
|
onchange: function(t) {
|
|
7801
7930
|
const e = this.getInputTargetBlock("THEN"), n = this.getInputTargetBlock("ELSE"), o = this.outputConnection.targetConnection;
|
|
@@ -7810,7 +7939,7 @@ const Ta = {
|
|
|
7810
7939
|
this.prevParentConnection_ = o;
|
|
7811
7940
|
}
|
|
7812
7941
|
};
|
|
7813
|
-
x.registerMixin("logic_ternary_v1",
|
|
7942
|
+
x.registerMixin("logic_ternary_v1", Ea);
|
|
7814
7943
|
g([
|
|
7815
7944
|
{
|
|
7816
7945
|
type: "logic_ternary_v1",
|
|
@@ -7847,7 +7976,7 @@ i.forBlock.logic_ternary_v1 = function(t) {
|
|
|
7847
7976
|
const e = i.valueToCode(t, "IF", h.CONDITIONAL) || "false", n = i.valueToCode(t, "THEN", h.CONDITIONAL) || "null", o = i.valueToCode(t, "ELSE", h.CONDITIONAL) || "null";
|
|
7848
7977
|
return [e + " ? " + n + " : " + o, h.CONDITIONAL];
|
|
7849
7978
|
};
|
|
7850
|
-
const
|
|
7979
|
+
const ga = {
|
|
7851
7980
|
customContextMenu: function(t) {
|
|
7852
7981
|
if (this.isInFlyout)
|
|
7853
7982
|
return;
|
|
@@ -7869,7 +7998,7 @@ const Ea = {
|
|
|
7869
7998
|
};
|
|
7870
7999
|
x.registerMixin(
|
|
7871
8000
|
"contextMenu_newGetVariableBlock_v1",
|
|
7872
|
-
|
|
8001
|
+
ga
|
|
7873
8002
|
);
|
|
7874
8003
|
x.register(
|
|
7875
8004
|
"flow_control_tooltip_v1",
|
|
@@ -7878,16 +8007,16 @@ x.register(
|
|
|
7878
8007
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
7879
8008
|
})
|
|
7880
8009
|
);
|
|
7881
|
-
const
|
|
8010
|
+
const Aa = /* @__PURE__ */ new Set([
|
|
7882
8011
|
"repeat_v1",
|
|
7883
8012
|
"for_each_v1",
|
|
7884
8013
|
"for_v1",
|
|
7885
8014
|
"while_until_v1"
|
|
7886
|
-
]),
|
|
8015
|
+
]), Ia = {
|
|
7887
8016
|
getSurroundLoop: function() {
|
|
7888
8017
|
let t = this;
|
|
7889
8018
|
do {
|
|
7890
|
-
if (
|
|
8019
|
+
if (Aa.has(t.type))
|
|
7891
8020
|
return t;
|
|
7892
8021
|
t = t?.getSurroundParent();
|
|
7893
8022
|
} while (t);
|
|
@@ -7908,7 +8037,7 @@ const ga = /* @__PURE__ */ new Set([
|
|
|
7908
8037
|
};
|
|
7909
8038
|
x.registerMixin(
|
|
7910
8039
|
"flow_control_in_loop_check_v1",
|
|
7911
|
-
|
|
8040
|
+
Ia
|
|
7912
8041
|
);
|
|
7913
8042
|
g([
|
|
7914
8043
|
{
|
|
@@ -8210,7 +8339,7 @@ i.forBlock.while_until_v1 = function(t) {
|
|
|
8210
8339
|
${o}}
|
|
8211
8340
|
`;
|
|
8212
8341
|
};
|
|
8213
|
-
const
|
|
8342
|
+
const ya = {
|
|
8214
8343
|
// math_arithmetic
|
|
8215
8344
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
8216
8345
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -8244,7 +8373,7 @@ const Ia = {
|
|
|
8244
8373
|
};
|
|
8245
8374
|
x.register(
|
|
8246
8375
|
"math_op_tooltip_v1",
|
|
8247
|
-
x.buildTooltipForDropdown("OP",
|
|
8376
|
+
x.buildTooltipForDropdown("OP", ya)
|
|
8248
8377
|
);
|
|
8249
8378
|
g([
|
|
8250
8379
|
{
|
|
@@ -8844,21 +8973,21 @@ i.forBlock.math_trig_v1 = function(t) {
|
|
|
8844
8973
|
}
|
|
8845
8974
|
return [o, h.DIVISION];
|
|
8846
8975
|
};
|
|
8847
|
-
const
|
|
8976
|
+
const Oa = L.xml, va = {
|
|
8848
8977
|
init: function() {
|
|
8849
8978
|
this.appendDummyInput().appendField(
|
|
8850
8979
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
8851
8980
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8852
8981
|
}
|
|
8853
8982
|
};
|
|
8854
|
-
I.object_create_container_v1 =
|
|
8855
|
-
const
|
|
8983
|
+
I.object_create_container_v1 = va;
|
|
8984
|
+
const Ca = {
|
|
8856
8985
|
init: function() {
|
|
8857
8986
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
8858
8987
|
}
|
|
8859
8988
|
};
|
|
8860
|
-
I.object_create_item_v1 =
|
|
8861
|
-
const
|
|
8989
|
+
I.object_create_item_v1 = Ca;
|
|
8990
|
+
const ka = {
|
|
8862
8991
|
init: function() {
|
|
8863
8992
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
8864
8993
|
new kt.MutatorIcon(
|
|
@@ -8868,7 +8997,7 @@ const Ca = {
|
|
|
8868
8997
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
8869
8998
|
},
|
|
8870
8999
|
mutationToDom: function() {
|
|
8871
|
-
const t =
|
|
9000
|
+
const t = Oa.createElement("mutation");
|
|
8872
9001
|
return t.setAttribute("items", String(this.itemCount_)), t;
|
|
8873
9002
|
},
|
|
8874
9003
|
domToMutation: function(t) {
|
|
@@ -8932,7 +9061,7 @@ const Ca = {
|
|
|
8932
9061
|
this.removeInput("ADD" + t);
|
|
8933
9062
|
}
|
|
8934
9063
|
};
|
|
8935
|
-
I.object_create_v1 =
|
|
9064
|
+
I.object_create_v1 = ka;
|
|
8936
9065
|
i.forBlock.object_create_v1 = function(t) {
|
|
8937
9066
|
const e = t;
|
|
8938
9067
|
let n = "{";
|
|
@@ -9174,13 +9303,13 @@ g([
|
|
|
9174
9303
|
i.forBlock.object_to_json_v1 = function(t) {
|
|
9175
9304
|
return [`__jsonStringifyV1__(${i.valueToCode(t, "OBJECT", h.NONE) || "null"})`, h.FUNCTION_CALL];
|
|
9176
9305
|
};
|
|
9177
|
-
const Fn = L.xml,
|
|
9306
|
+
const Fn = L.xml, Na = {
|
|
9178
9307
|
init: function() {
|
|
9179
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
9308
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Ko(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
9180
9309
|
}
|
|
9181
9310
|
};
|
|
9182
|
-
I.procedure_def_container_v1 =
|
|
9183
|
-
const
|
|
9311
|
+
I.procedure_def_container_v1 = Na;
|
|
9312
|
+
const Sa = {
|
|
9184
9313
|
init: function() {
|
|
9185
9314
|
const t = new vt(nn.DEFAULT_ARG);
|
|
9186
9315
|
t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
@@ -9202,8 +9331,8 @@ const Na = {
|
|
|
9202
9331
|
return t;
|
|
9203
9332
|
}
|
|
9204
9333
|
};
|
|
9205
|
-
I.procedure_def_item_v1 =
|
|
9206
|
-
const
|
|
9334
|
+
I.procedure_def_item_v1 = Sa;
|
|
9335
|
+
const La = {
|
|
9207
9336
|
init: function() {
|
|
9208
9337
|
this.withReturn = !1, this.args = [];
|
|
9209
9338
|
const t = new vt(
|
|
@@ -9307,13 +9436,13 @@ const Sa = {
|
|
|
9307
9436
|
}
|
|
9308
9437
|
}
|
|
9309
9438
|
};
|
|
9310
|
-
I.procedure_def_v1 =
|
|
9311
|
-
const
|
|
9439
|
+
I.procedure_def_v1 = La;
|
|
9440
|
+
const ba = L.xml, Ba = {
|
|
9312
9441
|
init: function() {
|
|
9313
9442
|
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}");
|
|
9314
9443
|
},
|
|
9315
9444
|
mutationToDom: function() {
|
|
9316
|
-
const t =
|
|
9445
|
+
const t = ba.createElement("mutation");
|
|
9317
9446
|
return t.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), t;
|
|
9318
9447
|
},
|
|
9319
9448
|
domToMutation: function(t) {
|
|
@@ -9371,7 +9500,7 @@ i.forBlock.procedure_return_v1 = function(t) {
|
|
|
9371
9500
|
` : `return;
|
|
9372
9501
|
`;
|
|
9373
9502
|
};
|
|
9374
|
-
const
|
|
9503
|
+
const Pa = {
|
|
9375
9504
|
init: function() {
|
|
9376
9505
|
this.appendDummyInput().appendField("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_ASSET_V1_DOWNLOAD_ASSET_TOOLTIP}"), this.setHelpUrl("%{BKY_ASSET_V1_DOWNLOAD_ASSET_HELPURL}");
|
|
9377
9506
|
},
|
|
@@ -9394,7 +9523,7 @@ const ba = {
|
|
|
9394
9523
|
]);
|
|
9395
9524
|
}
|
|
9396
9525
|
};
|
|
9397
|
-
I.download_resource_v1 =
|
|
9526
|
+
I.download_resource_v1 = Pa;
|
|
9398
9527
|
i.forBlock.download_resource_v1 = function(t) {
|
|
9399
9528
|
const e = i.valueToCode(t, "ASSET", h.ATOMIC) || null, n = i.statementToCode(t, "HANDLE");
|
|
9400
9529
|
return `{
|
|
@@ -9406,7 +9535,7 @@ ${n}
|
|
|
9406
9535
|
}
|
|
9407
9536
|
`;
|
|
9408
9537
|
};
|
|
9409
|
-
function
|
|
9538
|
+
function Ao(t) {
|
|
9410
9539
|
const e = A.resource.spaces.find((s) => s.id === t);
|
|
9411
9540
|
if (!e)
|
|
9412
9541
|
return [];
|
|
@@ -9422,13 +9551,13 @@ function Io(t) {
|
|
|
9422
9551
|
}
|
|
9423
9552
|
return o(e.dirTree, ""), n;
|
|
9424
9553
|
}
|
|
9425
|
-
function
|
|
9554
|
+
function Ra(t) {
|
|
9426
9555
|
const e = [];
|
|
9427
|
-
return
|
|
9556
|
+
return Ao(t).forEach(({ id: o, name: s }) => {
|
|
9428
9557
|
e.push([s, o]);
|
|
9429
|
-
}),
|
|
9558
|
+
}), B(e);
|
|
9430
9559
|
}
|
|
9431
|
-
function
|
|
9560
|
+
function Io(t, e) {
|
|
9432
9561
|
const n = A.resource.spaces.find((s) => s.id === t);
|
|
9433
9562
|
if (!n)
|
|
9434
9563
|
return [];
|
|
@@ -9437,25 +9566,25 @@ function yo(t, e) {
|
|
|
9437
9566
|
s.dirid === e && o.push(s);
|
|
9438
9567
|
}), o;
|
|
9439
9568
|
}
|
|
9440
|
-
function
|
|
9569
|
+
function Da(t, e) {
|
|
9441
9570
|
const n = [];
|
|
9442
|
-
return
|
|
9571
|
+
return Io(t, e).forEach(({ id: s, name: a }) => {
|
|
9443
9572
|
n.push([a, s]);
|
|
9444
|
-
}),
|
|
9573
|
+
}), B(n);
|
|
9445
9574
|
}
|
|
9446
|
-
function
|
|
9575
|
+
function yo() {
|
|
9447
9576
|
const t = [];
|
|
9448
9577
|
return A.resource.spaces.forEach((e) => {
|
|
9449
9578
|
e.resources.length > 0 && t.push(e);
|
|
9450
9579
|
}), t;
|
|
9451
9580
|
}
|
|
9452
|
-
function
|
|
9581
|
+
function Ma() {
|
|
9453
9582
|
const t = [];
|
|
9454
|
-
return
|
|
9583
|
+
return yo().forEach(({ id: n, name: o }) => {
|
|
9455
9584
|
t.push([o, n]);
|
|
9456
|
-
}),
|
|
9585
|
+
}), B(t);
|
|
9457
9586
|
}
|
|
9458
|
-
const
|
|
9587
|
+
const Ua = {
|
|
9459
9588
|
init: function() {
|
|
9460
9589
|
this.space = {
|
|
9461
9590
|
id: "",
|
|
@@ -9477,19 +9606,19 @@ const Ma = {
|
|
|
9477
9606
|
initData_: function() {
|
|
9478
9607
|
if (this.space.id)
|
|
9479
9608
|
return;
|
|
9480
|
-
const t =
|
|
9609
|
+
const t = yo()?.[0];
|
|
9481
9610
|
if (!t)
|
|
9482
9611
|
return;
|
|
9483
9612
|
this.space.id = t.id, this.space.name = t.name;
|
|
9484
9613
|
const e = this.getField("SPACE");
|
|
9485
9614
|
e.getOptions(!1), e.setValue(this.space.id);
|
|
9486
|
-
const n =
|
|
9615
|
+
const n = Ao(this.space.id)?.[0];
|
|
9487
9616
|
if (!n)
|
|
9488
9617
|
return;
|
|
9489
9618
|
this.dir.id = n.id, this.dir.name = n.name;
|
|
9490
9619
|
const o = this.getField("DIR");
|
|
9491
9620
|
o.getOptions(!1), o.setValue(this.dir.id);
|
|
9492
|
-
const s =
|
|
9621
|
+
const s = Io(this.space.id, this.dir.id)?.[0];
|
|
9493
9622
|
if (!s)
|
|
9494
9623
|
return;
|
|
9495
9624
|
this.resource.id = s.id, this.resource.name = s.name;
|
|
@@ -9507,20 +9636,20 @@ const Ma = {
|
|
|
9507
9636
|
this.space = We(t.space), this.dir = We(t.dir), this.resource = We(t.resource);
|
|
9508
9637
|
},
|
|
9509
9638
|
genSpaceOpts_: function() {
|
|
9510
|
-
return
|
|
9639
|
+
return Ma();
|
|
9511
9640
|
},
|
|
9512
9641
|
genDirOpts_: function() {
|
|
9513
|
-
return
|
|
9642
|
+
return Ra(this.space.id);
|
|
9514
9643
|
},
|
|
9515
9644
|
genResourceOpts_: function() {
|
|
9516
|
-
return
|
|
9645
|
+
return Da(this.space.id, this.dir.id);
|
|
9517
9646
|
}
|
|
9518
9647
|
};
|
|
9519
|
-
I.select_resource_v1 =
|
|
9648
|
+
I.select_resource_v1 = Ua;
|
|
9520
9649
|
i.forBlock.select_resource_v1 = function() {
|
|
9521
9650
|
return "";
|
|
9522
9651
|
};
|
|
9523
|
-
const
|
|
9652
|
+
const Va = {
|
|
9524
9653
|
init: function() {
|
|
9525
9654
|
this.appendDummyInput().appendField(
|
|
9526
9655
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -9551,7 +9680,7 @@ const Ua = {
|
|
|
9551
9680
|
]);
|
|
9552
9681
|
}
|
|
9553
9682
|
};
|
|
9554
|
-
I.upload_resource_v1 =
|
|
9683
|
+
I.upload_resource_v1 = Va;
|
|
9555
9684
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
9556
9685
|
const e = i.valueToCode(t, "NAME", h.ATOMIC) || "''", n = i.valueToCode(t, "DIR", h.ATOMIC) || "null", o = i.valueToCode(t, "DATA", h.ATOMIC) || "null", s = i.statementToCode(t, "HANDLE");
|
|
9557
9686
|
return `{
|
|
@@ -9584,9 +9713,9 @@ g([
|
|
|
9584
9713
|
i.forBlock.text_v1 = function(t) {
|
|
9585
9714
|
return [i.quote_(t.getFieldValue("TEXT")), h.ATOMIC];
|
|
9586
9715
|
};
|
|
9587
|
-
const
|
|
9588
|
-
function
|
|
9589
|
-
return
|
|
9716
|
+
const xa = /^\s*'([^']|\\')*'\s*$/;
|
|
9717
|
+
function pe(t) {
|
|
9718
|
+
return xa.test(t) ? [t, h.ATOMIC] : [`String(${t})`, h.FUNCTION_CALL];
|
|
9590
9719
|
}
|
|
9591
9720
|
x.register(
|
|
9592
9721
|
"text_append_tooltip_v1",
|
|
@@ -9621,7 +9750,7 @@ i.forBlock.text_append_v1 = function(t) {
|
|
|
9621
9750
|
t.getFieldValue("VAR"),
|
|
9622
9751
|
_t.NameType.VARIABLE
|
|
9623
9752
|
), n = i.valueToCode(t, "TEXT", h.NONE) || "''";
|
|
9624
|
-
return `${e} += ${
|
|
9753
|
+
return `${e} += ${pe(n)};
|
|
9625
9754
|
`;
|
|
9626
9755
|
};
|
|
9627
9756
|
g([
|
|
@@ -9790,10 +9919,10 @@ g([
|
|
|
9790
9919
|
i.forBlock.text_is_empty_v1 = function(t) {
|
|
9791
9920
|
return [`!${i.valueToCode(t, "VALUE", h.MEMBER) || "''"}.length`, h.LOGICAL_NOT];
|
|
9792
9921
|
};
|
|
9793
|
-
const
|
|
9922
|
+
const wa = L.xml, Fa = {
|
|
9794
9923
|
itemCount_: 0,
|
|
9795
9924
|
mutationToDom: function() {
|
|
9796
|
-
const t =
|
|
9925
|
+
const t = wa.createElement("mutation");
|
|
9797
9926
|
return t.setAttribute("items", `${this.itemCount_}`), t;
|
|
9798
9927
|
},
|
|
9799
9928
|
domToMutation: function(t) {
|
|
@@ -9864,13 +9993,13 @@ const xa = L.xml, wa = {
|
|
|
9864
9993
|
for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
|
|
9865
9994
|
this.removeInput("ADD" + t);
|
|
9866
9995
|
}
|
|
9867
|
-
},
|
|
9996
|
+
}, Ya = function() {
|
|
9868
9997
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new kt.MutatorIcon(["text_join_item_v1"], this));
|
|
9869
9998
|
};
|
|
9870
9999
|
x.registerMutator(
|
|
9871
10000
|
"text_join_mutator_v1",
|
|
9872
|
-
|
|
9873
|
-
|
|
10001
|
+
Fa,
|
|
10002
|
+
Ya
|
|
9874
10003
|
);
|
|
9875
10004
|
g([
|
|
9876
10005
|
{
|
|
@@ -9913,11 +10042,11 @@ i.forBlock.text_join_v1 = function(t) {
|
|
|
9913
10042
|
return ["''", h.ATOMIC];
|
|
9914
10043
|
case 1: {
|
|
9915
10044
|
const n = i.valueToCode(e, "ADD0", h.NONE) || "''";
|
|
9916
|
-
return
|
|
10045
|
+
return pe(n);
|
|
9917
10046
|
}
|
|
9918
10047
|
case 2: {
|
|
9919
10048
|
const n = i.valueToCode(e, "ADD0", h.NONE) || "''", o = i.valueToCode(e, "ADD1", h.NONE) || "''";
|
|
9920
|
-
return [
|
|
10049
|
+
return [pe(n)[0] + " + " + pe(o)[0], h.ADDITION];
|
|
9921
10050
|
}
|
|
9922
10051
|
default: {
|
|
9923
10052
|
const n = new Array(e.itemCount_);
|
|
@@ -10102,7 +10231,7 @@ i.forBlock.text_trim_v1 = function(t) {
|
|
|
10102
10231
|
}[t.getFieldValue("MODE")];
|
|
10103
10232
|
return [`__trimV1__(${e}, ${o})`, h.ATOMIC];
|
|
10104
10233
|
};
|
|
10105
|
-
const
|
|
10234
|
+
const Ka = {
|
|
10106
10235
|
init: function() {
|
|
10107
10236
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
10108
10237
|
},
|
|
@@ -10118,17 +10247,17 @@ const Ya = {
|
|
|
10118
10247
|
updateShadow_: function() {
|
|
10119
10248
|
if (this.isInsertionMarker())
|
|
10120
10249
|
return;
|
|
10121
|
-
const t =
|
|
10250
|
+
const t = me(1e3);
|
|
10122
10251
|
this.getInput("INTERVAL")?.setShadowDom(t);
|
|
10123
|
-
const e =
|
|
10252
|
+
const e = Te(!1);
|
|
10124
10253
|
this.getInput("LOOP")?.setShadowDom(e);
|
|
10125
|
-
const n =
|
|
10254
|
+
const n = me(1);
|
|
10126
10255
|
this.getInput("COUNT")?.setShadowDom(n);
|
|
10127
|
-
const o =
|
|
10256
|
+
const o = Te(!1);
|
|
10128
10257
|
this.getInput("IMMEDIATE")?.setShadowDom(o);
|
|
10129
10258
|
}
|
|
10130
10259
|
};
|
|
10131
|
-
I.create_timer_v1 =
|
|
10260
|
+
I.create_timer_v1 = Ka;
|
|
10132
10261
|
i.forBlock.create_timer_v1 = function(t) {
|
|
10133
10262
|
const e = i.valueToCode(t, "INTERVAL", h.ATOMIC) || "1000", n = i.valueToCode(t, "LOOP", h.ATOMIC) || "false", o = i.valueToCode(t, "COUNT", h.ATOMIC) || "1", s = i.valueToCode(t, "IMMEDIATE", h.ATOMIC) || "false", a = i.statementToCode(t, "CALLBACK");
|
|
10134
10263
|
return `__createTimerV1__(${e}, ${n}, ${o}, ${s}, async function() {
|
|
@@ -10157,18 +10286,18 @@ i.forBlock.delay_v1 = function(t) {
|
|
|
10157
10286
|
return `await __delayV1__(${i.valueToCode(t, "DURATION", h.ATOMIC) || "0"});
|
|
10158
10287
|
`;
|
|
10159
10288
|
};
|
|
10160
|
-
const
|
|
10289
|
+
const $a = {
|
|
10161
10290
|
customContextMenu: function(t) {
|
|
10162
10291
|
if (this.isInFlyout) {
|
|
10163
10292
|
if (this.type === "variable_get_v1") {
|
|
10164
10293
|
const e = {
|
|
10165
10294
|
text: E("RENAME_VARIABLE"),
|
|
10166
10295
|
enabled: !0,
|
|
10167
|
-
callback:
|
|
10296
|
+
callback: Ha(this)
|
|
10168
10297
|
}, n = this.getField("VAR").getText(), o = {
|
|
10169
10298
|
text: E("DELETE_VARIABLE").replace("%1", n),
|
|
10170
10299
|
enabled: !0,
|
|
10171
|
-
callback:
|
|
10300
|
+
callback: Ga(this)
|
|
10172
10301
|
};
|
|
10173
10302
|
t.unshift(e), t.unshift(o);
|
|
10174
10303
|
}
|
|
@@ -10186,12 +10315,12 @@ const Ka = {
|
|
|
10186
10315
|
});
|
|
10187
10316
|
}
|
|
10188
10317
|
}
|
|
10189
|
-
},
|
|
10318
|
+
}, Ha = function(t) {
|
|
10190
10319
|
return function() {
|
|
10191
10320
|
const e = t.workspace, o = t.getField("VAR").getVariable();
|
|
10192
10321
|
xt.renameVariable(e, o);
|
|
10193
10322
|
};
|
|
10194
|
-
},
|
|
10323
|
+
}, Ga = function(t) {
|
|
10195
10324
|
return function() {
|
|
10196
10325
|
const n = t.getField("VAR").getVariable();
|
|
10197
10326
|
n && xt.deleteVariable(n.getWorkspace(), n, t);
|
|
@@ -10199,7 +10328,7 @@ const Ka = {
|
|
|
10199
10328
|
};
|
|
10200
10329
|
x.registerMixin(
|
|
10201
10330
|
"context_menu_variable_v1",
|
|
10202
|
-
|
|
10331
|
+
$a
|
|
10203
10332
|
);
|
|
10204
10333
|
g([
|
|
10205
10334
|
{
|
|
@@ -10256,31 +10385,31 @@ i.forBlock.variable_set_v1 = function(t) {
|
|
|
10256
10385
|
`;
|
|
10257
10386
|
};
|
|
10258
10387
|
Wn.setConfirm(async (t, e) => {
|
|
10259
|
-
const n = await
|
|
10388
|
+
const n = await is({
|
|
10260
10389
|
title: "",
|
|
10261
10390
|
text: t
|
|
10262
10391
|
});
|
|
10263
10392
|
e(!!n);
|
|
10264
10393
|
});
|
|
10265
10394
|
Wn.setPrompt(async (t, e, n) => {
|
|
10266
|
-
const o = await
|
|
10395
|
+
const o = await as({
|
|
10267
10396
|
title: "",
|
|
10268
10397
|
value: e
|
|
10269
10398
|
});
|
|
10270
10399
|
o !== void 0 && n(String(o));
|
|
10271
10400
|
});
|
|
10272
|
-
const
|
|
10273
|
-
|
|
10401
|
+
const ae = O.prototype;
|
|
10402
|
+
ae.doClassValidation_ = function(t) {
|
|
10274
10403
|
return t;
|
|
10275
10404
|
};
|
|
10276
|
-
const
|
|
10277
|
-
|
|
10278
|
-
|
|
10405
|
+
const Wa = ae.doValueUpdate_;
|
|
10406
|
+
ae.doValueUpdate_ = function(t) {
|
|
10407
|
+
Wa.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
|
|
10279
10408
|
};
|
|
10280
|
-
const
|
|
10281
|
-
|
|
10409
|
+
const ja = ae.getText_;
|
|
10410
|
+
ae.getText_ = function() {
|
|
10282
10411
|
if (this.selectedOption)
|
|
10283
|
-
return
|
|
10412
|
+
return ja.call(this);
|
|
10284
10413
|
const { i18n: t } = Nt, e = this.getSourceBlock();
|
|
10285
10414
|
if (this.name === "APP")
|
|
10286
10415
|
return e.app.name;
|
|
@@ -10289,7 +10418,7 @@ ce.getText_ = function() {
|
|
|
10289
10418
|
if (this.name === "ELEMENT")
|
|
10290
10419
|
return e.element.name;
|
|
10291
10420
|
if (this.name === "NODE") {
|
|
10292
|
-
const n =
|
|
10421
|
+
const n = b[e.node.key];
|
|
10293
10422
|
if (n) {
|
|
10294
10423
|
const o = t.global.t(n.name), s = e.node.alias;
|
|
10295
10424
|
return `${o} / ${s}`;
|
|
@@ -10322,7 +10451,7 @@ ce.getText_ = function() {
|
|
|
10322
10451
|
return "<n/a>";
|
|
10323
10452
|
};
|
|
10324
10453
|
const Yn = 60;
|
|
10325
|
-
|
|
10454
|
+
$o.prototype.cleanUp = function() {
|
|
10326
10455
|
this.setResizesEnabled(!1);
|
|
10327
10456
|
const t = v.getGroup();
|
|
10328
10457
|
t || v.setGroup(!0);
|
|
@@ -10345,25 +10474,25 @@ Ho.prototype.cleanUp = function() {
|
|
|
10345
10474
|
}
|
|
10346
10475
|
v.setGroup(t), this.setResizesEnabled(!0);
|
|
10347
10476
|
};
|
|
10348
|
-
function
|
|
10477
|
+
function Oo(t) {
|
|
10349
10478
|
const e = t.getParent();
|
|
10350
|
-
return e &&
|
|
10479
|
+
return e && Oo(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
|
|
10351
10480
|
}
|
|
10352
|
-
class
|
|
10481
|
+
class Xa {
|
|
10353
10482
|
init() {
|
|
10354
|
-
const e =
|
|
10483
|
+
const e = Ho.registry.getItem("blockDisable");
|
|
10355
10484
|
e && (e.preconditionFn = function(n) {
|
|
10356
10485
|
const o = n.block;
|
|
10357
|
-
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() ||
|
|
10486
|
+
return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || Oo(o) ? "disabled" : "enabled" : "hidden";
|
|
10358
10487
|
});
|
|
10359
10488
|
}
|
|
10360
10489
|
}
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
const
|
|
10364
|
-
|
|
10365
|
-
const
|
|
10366
|
-
|
|
10490
|
+
Go.registerFieldColour();
|
|
10491
|
+
Wo.registry.unregister(jo.names.ESCAPE);
|
|
10492
|
+
const Ja = new Xo.CrossTabCopyPaste();
|
|
10493
|
+
Ja.init({ contextMenu: !0, shortcut: !0 });
|
|
10494
|
+
const qa = new Xa();
|
|
10495
|
+
qa.init();
|
|
10367
10496
|
function An(t) {
|
|
10368
10497
|
const e = ne();
|
|
10369
10498
|
if (!e)
|
|
@@ -10377,14 +10506,14 @@ function An(t) {
|
|
|
10377
10506
|
const s = o.getRelativeToSurfaceXY(), a = s.x * e.scale, c = s.y * e.scale;
|
|
10378
10507
|
e.scroll(-a, -c);
|
|
10379
10508
|
}
|
|
10380
|
-
function
|
|
10509
|
+
function vo() {
|
|
10381
10510
|
const t = ne();
|
|
10382
10511
|
if (!t)
|
|
10383
10512
|
return;
|
|
10384
10513
|
const e = t.getTopBlocks(!0)?.[0];
|
|
10385
10514
|
e && An(e.id);
|
|
10386
10515
|
}
|
|
10387
|
-
|
|
10516
|
+
Le.Classic.blockStyles = {
|
|
10388
10517
|
color_blocks: {
|
|
10389
10518
|
colourPrimary: "#a5745b",
|
|
10390
10519
|
colourSecondary: "#ede3de",
|
|
@@ -10470,7 +10599,7 @@ Be.Classic.blockStyles = {
|
|
|
10470
10599
|
hat: ""
|
|
10471
10600
|
}
|
|
10472
10601
|
};
|
|
10473
|
-
|
|
10602
|
+
Le.Classic.categoryStyles = {
|
|
10474
10603
|
color_category: {
|
|
10475
10604
|
colour: "#a5745b"
|
|
10476
10605
|
},
|
|
@@ -10535,9 +10664,9 @@ Be.Classic.categoryStyles = {
|
|
|
10535
10664
|
colour: "#a55b80"
|
|
10536
10665
|
}
|
|
10537
10666
|
};
|
|
10538
|
-
const
|
|
10667
|
+
const Qa = jn.defineTheme("light", {
|
|
10539
10668
|
name: "light",
|
|
10540
|
-
base:
|
|
10669
|
+
base: Le.Classic,
|
|
10541
10670
|
componentStyles: {
|
|
10542
10671
|
workspaceBackgroundColour: "#ffffff",
|
|
10543
10672
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -10551,9 +10680,9 @@ const qa = jn.defineTheme("light", {
|
|
|
10551
10680
|
scrollbarOpacity: 0.4,
|
|
10552
10681
|
cursorColour: ""
|
|
10553
10682
|
}
|
|
10554
|
-
}),
|
|
10683
|
+
}), za = jn.defineTheme("dark", {
|
|
10555
10684
|
name: "dark",
|
|
10556
|
-
base:
|
|
10685
|
+
base: Le.Classic,
|
|
10557
10686
|
componentStyles: {
|
|
10558
10687
|
workspaceBackgroundColour: "#1e1e1e",
|
|
10559
10688
|
toolboxBackgroundColour: "#272727",
|
|
@@ -10568,14 +10697,14 @@ const qa = jn.defineTheme("light", {
|
|
|
10568
10697
|
cursorColour: ""
|
|
10569
10698
|
}
|
|
10570
10699
|
});
|
|
10571
|
-
function
|
|
10700
|
+
function Za(t) {
|
|
10572
10701
|
const e = ne();
|
|
10573
10702
|
switch (t) {
|
|
10574
10703
|
case "light":
|
|
10575
|
-
e.setTheme(
|
|
10704
|
+
e.setTheme(Qa);
|
|
10576
10705
|
break;
|
|
10577
10706
|
case "dark":
|
|
10578
|
-
e.setTheme(
|
|
10707
|
+
e.setTheme(za);
|
|
10579
10708
|
break;
|
|
10580
10709
|
}
|
|
10581
10710
|
}
|
|
@@ -10583,7 +10712,7 @@ const hn = ["get_app_property_v1", "get_app_state_v1"];
|
|
|
10583
10712
|
function gt(t, e) {
|
|
10584
10713
|
return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
|
|
10585
10714
|
}
|
|
10586
|
-
function
|
|
10715
|
+
function tc(t) {
|
|
10587
10716
|
const e = [];
|
|
10588
10717
|
function n(o) {
|
|
10589
10718
|
for (const s of o.getChildren(!0))
|
|
@@ -10591,7 +10720,7 @@ function Za(t) {
|
|
|
10591
10720
|
}
|
|
10592
10721
|
return n(t), e;
|
|
10593
10722
|
}
|
|
10594
|
-
function
|
|
10723
|
+
function ec(t) {
|
|
10595
10724
|
const e = [];
|
|
10596
10725
|
for (const n of t)
|
|
10597
10726
|
if (n.type === "get_app_property_v1") {
|
|
@@ -10607,7 +10736,7 @@ function tc(t) {
|
|
|
10607
10736
|
} else n.type === "get_app_state_v1" ? gt(e, Pt({ type: "state", stateId: n.state.id })) : console.assert(!1);
|
|
10608
10737
|
return e;
|
|
10609
10738
|
}
|
|
10610
|
-
function
|
|
10739
|
+
function nc(t) {
|
|
10611
10740
|
const e = [];
|
|
10612
10741
|
for (const n of t.getChildren(!0))
|
|
10613
10742
|
if (hn.includes(n.type))
|
|
@@ -10618,7 +10747,7 @@ function ec(t) {
|
|
|
10618
10747
|
}
|
|
10619
10748
|
return e;
|
|
10620
10749
|
}
|
|
10621
|
-
function
|
|
10750
|
+
function oc(t) {
|
|
10622
10751
|
const e = [], n = [];
|
|
10623
10752
|
for (const o of t)
|
|
10624
10753
|
if (o.type === "get_app_property_v1") {
|
|
@@ -10682,7 +10811,7 @@ function nc(t) {
|
|
|
10682
10811
|
console.assert(!1);
|
|
10683
10812
|
return e;
|
|
10684
10813
|
}
|
|
10685
|
-
function
|
|
10814
|
+
function sc(t) {
|
|
10686
10815
|
const e = {
|
|
10687
10816
|
watchEffect: {},
|
|
10688
10817
|
bind: {
|
|
@@ -10694,11 +10823,11 @@ function oc(t) {
|
|
|
10694
10823
|
return e;
|
|
10695
10824
|
for (const o of n)
|
|
10696
10825
|
if (o.type === "watch_effect_v1") {
|
|
10697
|
-
const s =
|
|
10826
|
+
const s = tc(o), a = ec(s);
|
|
10698
10827
|
for (const c of a)
|
|
10699
10828
|
e.watchEffect[c] || (e.watchEffect[c] = []), gt(e.watchEffect[c], o.id);
|
|
10700
10829
|
} else if (o.type === "app_bind_v1") {
|
|
10701
|
-
const s =
|
|
10830
|
+
const s = nc(o), a = oc(s);
|
|
10702
10831
|
e.bind.sets[o.id] = a;
|
|
10703
10832
|
for (const c of a) {
|
|
10704
10833
|
const l = Pt(c);
|
|
@@ -10707,20 +10836,20 @@ function oc(t) {
|
|
|
10707
10836
|
}
|
|
10708
10837
|
return e;
|
|
10709
10838
|
}
|
|
10710
|
-
const
|
|
10711
|
-
function
|
|
10712
|
-
|
|
10839
|
+
const Co = /* @__PURE__ */ Symbol();
|
|
10840
|
+
function ic(t) {
|
|
10841
|
+
fs(Co, t);
|
|
10713
10842
|
}
|
|
10714
10843
|
function In() {
|
|
10715
|
-
return
|
|
10844
|
+
return ms(Co);
|
|
10716
10845
|
}
|
|
10717
|
-
const
|
|
10846
|
+
const ac = /* @__PURE__ */ mt({
|
|
10718
10847
|
__name: "index",
|
|
10719
10848
|
props: {
|
|
10720
10849
|
lock: { type: Boolean }
|
|
10721
10850
|
},
|
|
10722
10851
|
setup(t, { expose: e }) {
|
|
10723
|
-
const { t: n } =
|
|
10852
|
+
const { t: n } = se(), o = Tn(), s = t, a = In(), c = H(() => o.smAndDown.value), l = () => {
|
|
10724
10853
|
if (!a.workspace) {
|
|
10725
10854
|
console.assert(!1);
|
|
10726
10855
|
return;
|
|
@@ -10751,7 +10880,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10751
10880
|
}, 8, ["disabled", "text"]);
|
|
10752
10881
|
};
|
|
10753
10882
|
}
|
|
10754
|
-
}),
|
|
10883
|
+
}), cc = /* @__PURE__ */ mt({
|
|
10755
10884
|
__name: "index",
|
|
10756
10885
|
props: {
|
|
10757
10886
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10759,7 +10888,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10759
10888
|
},
|
|
10760
10889
|
emits: ["update:modelValue"],
|
|
10761
10890
|
setup(t) {
|
|
10762
|
-
const { t: e } =
|
|
10891
|
+
const { t: e } = se(), n = Tn(), o = Qt(t, "modelValue"), s = H(() => n.smAndDown.value);
|
|
10763
10892
|
return (a, c) => {
|
|
10764
10893
|
const l = K("v-btn"), p = K("v-tooltip");
|
|
10765
10894
|
return V(), dt(p, {
|
|
@@ -10778,11 +10907,11 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10778
10907
|
}, 8, ["disabled", "text"]);
|
|
10779
10908
|
};
|
|
10780
10909
|
}
|
|
10781
|
-
}),
|
|
10910
|
+
}), rc = { class: "d-flex flex-column" }, lc = { class: "text-subtitle-1 ml-6" }, uc = {
|
|
10782
10911
|
key: 0,
|
|
10783
10912
|
class: "text-caption text-grey text-truncate ml-6",
|
|
10784
10913
|
style: { maxWidth: "340px" }
|
|
10785
|
-
},
|
|
10914
|
+
}, pc = /* @__PURE__ */ mt({
|
|
10786
10915
|
__name: "item",
|
|
10787
10916
|
props: {
|
|
10788
10917
|
id: {},
|
|
@@ -10810,17 +10939,17 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10810
10939
|
pointerEvents: "none"
|
|
10811
10940
|
}));
|
|
10812
10941
|
return (r, u) => {
|
|
10813
|
-
const d = K("v-spacer"), f = K("v-icon"), m =
|
|
10814
|
-
return
|
|
10942
|
+
const d = K("v-spacer"), f = K("v-icon"), m = Ts("ripple");
|
|
10943
|
+
return Es((V(), lt("div", {
|
|
10815
10944
|
class: "d-flex align-center cursor-pointer",
|
|
10816
10945
|
style: ot(p.value),
|
|
10817
10946
|
onClick: u[1] || (u[1] = (T) => c("x-click", a.id)),
|
|
10818
10947
|
onMouseout: u[2] || (u[2] = (T) => l.value = !1),
|
|
10819
10948
|
onMouseover: u[3] || (u[3] = (T) => l.value = !0)
|
|
10820
10949
|
}, [
|
|
10821
|
-
Q("div",
|
|
10822
|
-
Q("span",
|
|
10823
|
-
a.desc ? (V(), lt("span",
|
|
10950
|
+
Q("div", rc, [
|
|
10951
|
+
Q("span", lc, zt(a.title), 1),
|
|
10952
|
+
a.desc ? (V(), lt("span", uc, zt(a.desc), 1)) : Et("", !0)
|
|
10824
10953
|
]),
|
|
10825
10954
|
U(d),
|
|
10826
10955
|
U(f, {
|
|
@@ -10837,10 +10966,10 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10837
10966
|
]);
|
|
10838
10967
|
};
|
|
10839
10968
|
}
|
|
10840
|
-
}),
|
|
10969
|
+
}), _c = {
|
|
10841
10970
|
key: 1,
|
|
10842
10971
|
class: "text-caption text-grey"
|
|
10843
|
-
},
|
|
10972
|
+
}, dc = /* @__PURE__ */ mt({
|
|
10844
10973
|
__name: "index",
|
|
10845
10974
|
props: /* @__PURE__ */ sn({
|
|
10846
10975
|
lock: { type: Boolean }
|
|
@@ -10850,7 +10979,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10850
10979
|
}),
|
|
10851
10980
|
emits: ["update:modelValue"],
|
|
10852
10981
|
setup(t, { expose: e }) {
|
|
10853
|
-
const { t: n } =
|
|
10982
|
+
const { t: n } = se(), o = Qt(t, "modelValue"), s = In(), a = wt([]);
|
|
10854
10983
|
e({ update: () => {
|
|
10855
10984
|
if (!s.workspace) {
|
|
10856
10985
|
console.assert(!1);
|
|
@@ -10858,10 +10987,10 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10858
10987
|
}
|
|
10859
10988
|
const d = [];
|
|
10860
10989
|
s.workspace.getTopBlocks(!0).forEach((m) => {
|
|
10861
|
-
const T = m.id ===
|
|
10990
|
+
const T = m.id === qo()?.id;
|
|
10862
10991
|
let y = "";
|
|
10863
10992
|
if (m.type.startsWith("on_app_event_v")) {
|
|
10864
|
-
const D = m, Ut =
|
|
10993
|
+
const D = m, Ut = b[D.node.key];
|
|
10865
10994
|
Ut && (y = n(Ut.name), D.node.alias && (y += " / " + D.node.alias), y += " - " + be(D.event.kind, D.event.names));
|
|
10866
10995
|
} else if (m.type.startsWith("watch_effect_v"))
|
|
10867
10996
|
y = n("x-block-lib.watchEffect");
|
|
@@ -10915,7 +11044,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10915
11044
|
T
|
|
10916
11045
|
).getRelativeToSurfaceXY().y + 10);
|
|
10917
11046
|
const S = m.getRelativeToSurfaceXY();
|
|
10918
|
-
m.moveTo(new L.Coordinate(S.x, y)), s.workspace.cleanUp(),
|
|
11047
|
+
m.moveTo(new L.Coordinate(S.x, y)), s.workspace.cleanUp(), vo();
|
|
10919
11048
|
}, u = async (d) => {
|
|
10920
11049
|
if (!s.workspace) {
|
|
10921
11050
|
console.assert(!1);
|
|
@@ -10924,7 +11053,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10924
11053
|
const f = s.workspace.getBlockById(d);
|
|
10925
11054
|
Xn.setSelected(f), An(d), o.value = !1;
|
|
10926
11055
|
};
|
|
10927
|
-
return (d, f) => a.value.length > 0 ? (V(), dt(F(
|
|
11056
|
+
return (d, f) => a.value.length > 0 ? (V(), dt(F(Jo), {
|
|
10928
11057
|
key: 0,
|
|
10929
11058
|
modelValue: a.value,
|
|
10930
11059
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => a.value = m),
|
|
@@ -10936,7 +11065,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10936
11065
|
onStart: p
|
|
10937
11066
|
}, {
|
|
10938
11067
|
default: ht(() => [
|
|
10939
|
-
(V(!0), lt(
|
|
11068
|
+
(V(!0), lt(oo, null, gs(a.value, (m) => (V(), dt(pc, {
|
|
10940
11069
|
id: m.id,
|
|
10941
11070
|
key: m.id,
|
|
10942
11071
|
desc: m.desc,
|
|
@@ -10946,14 +11075,14 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10946
11075
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10947
11076
|
]),
|
|
10948
11077
|
_: 1
|
|
10949
|
-
}, 8, ["modelValue"])) : (V(), lt("span",
|
|
11078
|
+
}, 8, ["modelValue"])) : (V(), lt("span", _c, zt(F(n)("x-block-lib.noOption")), 1));
|
|
10950
11079
|
}
|
|
10951
|
-
}),
|
|
11080
|
+
}), hc = (t, e) => {
|
|
10952
11081
|
const n = t.__vccOpts || t;
|
|
10953
11082
|
for (const [o, s] of e)
|
|
10954
11083
|
n[o] = s;
|
|
10955
11084
|
return n;
|
|
10956
|
-
},
|
|
11085
|
+
}, fc = /* @__PURE__ */ hc(dc, [["__scopeId", "data-v-a77ed323"]]), mc = /* @__PURE__ */ mt({
|
|
10957
11086
|
__name: "index",
|
|
10958
11087
|
props: {
|
|
10959
11088
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -10981,14 +11110,14 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10981
11110
|
onClick: l[0] || (l[0] = (p) => a(""))
|
|
10982
11111
|
}, "blockTree"));
|
|
10983
11112
|
}
|
|
10984
|
-
}),
|
|
11113
|
+
}), Tc = { class: "text-subtitle-1" }, Ec = /* @__PURE__ */ mt({
|
|
10985
11114
|
__name: "index",
|
|
10986
11115
|
props: {
|
|
10987
11116
|
type: {},
|
|
10988
11117
|
lock: { type: Boolean }
|
|
10989
11118
|
},
|
|
10990
11119
|
setup(t, { expose: e }) {
|
|
10991
|
-
const { t: n } =
|
|
11120
|
+
const { t: n } = se(), o = Tn(), { sysBarAvail: s } = qn(), { backgroundColor1: a } = oe(), c = H(() => o.smAndDown.value), l = H(() => {
|
|
10992
11121
|
let m = "100%";
|
|
10993
11122
|
return o.mdAndUp.value && (m = "400px"), {
|
|
10994
11123
|
background: a.value,
|
|
@@ -11004,7 +11133,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11004
11133
|
}), _ = H(() => ({
|
|
11005
11134
|
height: "60px"
|
|
11006
11135
|
})), { open: r } = fn(`blocklyNavigatorDlg${an()}`);
|
|
11007
|
-
|
|
11136
|
+
As(() => {
|
|
11008
11137
|
r.value = !1;
|
|
11009
11138
|
});
|
|
11010
11139
|
const u = qt("blockList"), d = qt("blockTree");
|
|
@@ -11012,16 +11141,16 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11012
11141
|
t.type === "list" ? u.value?.update() : t.type === "tree" && d.value?.update();
|
|
11013
11142
|
} }), (m, T) => {
|
|
11014
11143
|
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"), Ut = K("v-dialog"), He = K("v-tooltip");
|
|
11015
|
-
return V(), lt(
|
|
11144
|
+
return V(), lt(oo, null, [
|
|
11016
11145
|
U(Ut, {
|
|
11017
11146
|
modelValue: F(r),
|
|
11018
|
-
"onUpdate:modelValue": T[5] || (T[5] = (nt) =>
|
|
11147
|
+
"onUpdate:modelValue": T[5] || (T[5] = (nt) => ue(r) ? r.value = nt : null),
|
|
11019
11148
|
eager: "",
|
|
11020
11149
|
fullscreen: "",
|
|
11021
11150
|
"no-click-animation": "",
|
|
11022
11151
|
persistent: "",
|
|
11023
11152
|
transition: "scroll-x-reverse-transition",
|
|
11024
|
-
onKeydown: T[6] || (T[6] =
|
|
11153
|
+
onKeydown: T[6] || (T[6] = so(Jt((nt) => r.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11025
11154
|
}, {
|
|
11026
11155
|
default: ht(() => [
|
|
11027
11156
|
Q("div", {
|
|
@@ -11050,7 +11179,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11050
11179
|
variant: "text",
|
|
11051
11180
|
onClick: T[0] || (T[0] = (nt) => r.value = !1)
|
|
11052
11181
|
}),
|
|
11053
|
-
Q("span",
|
|
11182
|
+
Q("span", Tc, zt(F(n)("x-block-lib.navigator")), 1),
|
|
11054
11183
|
U(D)
|
|
11055
11184
|
]),
|
|
11056
11185
|
_: 1
|
|
@@ -11059,19 +11188,19 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11059
11188
|
class: "overflow-y-auto",
|
|
11060
11189
|
style: ot(p.value)
|
|
11061
11190
|
}, [
|
|
11062
|
-
t.type === "list" ? (V(), dt(
|
|
11191
|
+
t.type === "list" ? (V(), dt(fc, {
|
|
11063
11192
|
key: 0,
|
|
11064
11193
|
ref_key: "blockList",
|
|
11065
11194
|
ref: u,
|
|
11066
11195
|
modelValue: F(r),
|
|
11067
|
-
"onUpdate:modelValue": T[1] || (T[1] = (nt) =>
|
|
11196
|
+
"onUpdate:modelValue": T[1] || (T[1] = (nt) => ue(r) ? r.value = nt : null),
|
|
11068
11197
|
lock: t.lock
|
|
11069
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(
|
|
11198
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(mc, {
|
|
11070
11199
|
key: 1,
|
|
11071
11200
|
ref_key: "blockTree",
|
|
11072
11201
|
ref: d,
|
|
11073
11202
|
modelValue: F(r),
|
|
11074
|
-
"onUpdate:modelValue": T[2] || (T[2] = (nt) =>
|
|
11203
|
+
"onUpdate:modelValue": T[2] || (T[2] = (nt) => ue(r) ? r.value = nt : null)
|
|
11075
11204
|
}, null, 8, ["modelValue"])) : Et("", !0),
|
|
11076
11205
|
Q("div", {
|
|
11077
11206
|
style: ot(_.value)
|
|
@@ -11111,7 +11240,7 @@ function C(t, e) {
|
|
|
11111
11240
|
n.appendChild(o);
|
|
11112
11241
|
return n;
|
|
11113
11242
|
}
|
|
11114
|
-
function
|
|
11243
|
+
function ko(t) {
|
|
11115
11244
|
const e = X.createElement("mutation");
|
|
11116
11245
|
for (const { key: n, value: o } of t)
|
|
11117
11246
|
e.setAttribute(n, o);
|
|
@@ -11139,7 +11268,7 @@ function Kn(t, e) {
|
|
|
11139
11268
|
const a = X.createTextNode(String(e));
|
|
11140
11269
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
11141
11270
|
}
|
|
11142
|
-
function
|
|
11271
|
+
function gc(t, e) {
|
|
11143
11272
|
e === void 0 && (e = !1);
|
|
11144
11273
|
const n = X.createElement("value");
|
|
11145
11274
|
n.setAttribute("name", t);
|
|
@@ -11150,11 +11279,11 @@ function Ec(t, e) {
|
|
|
11150
11279
|
const a = X.createTextNode(e ? "TRUE" : "FALSE");
|
|
11151
11280
|
return s.appendChild(a), o.appendChild(s), n.appendChild(o), n;
|
|
11152
11281
|
}
|
|
11153
|
-
function
|
|
11282
|
+
function Ac() {
|
|
11154
11283
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11155
11284
|
return !(t.type !== "comp" || !e.meta.events || e.meta.events.length <= 0);
|
|
11156
11285
|
}
|
|
11157
|
-
function
|
|
11286
|
+
function Ic() {
|
|
11158
11287
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11159
11288
|
return !(t.type !== "comp" || !e.meta.states || e.meta.states.length <= 0);
|
|
11160
11289
|
}
|
|
@@ -11162,7 +11291,7 @@ function $n() {
|
|
|
11162
11291
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11163
11292
|
return !(t.type !== "comp" || !e.meta.methods || e.meta.methods.length <= 0);
|
|
11164
11293
|
}
|
|
11165
|
-
function
|
|
11294
|
+
function yc() {
|
|
11166
11295
|
const { activeObject: t, activeComp: e } = A.app;
|
|
11167
11296
|
if (t.type !== "comp")
|
|
11168
11297
|
return !1;
|
|
@@ -11173,55 +11302,55 @@ function Ic() {
|
|
|
11173
11302
|
}
|
|
11174
11303
|
return !1;
|
|
11175
11304
|
}
|
|
11176
|
-
function
|
|
11305
|
+
function Oc() {
|
|
11177
11306
|
const t = [];
|
|
11178
|
-
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")),
|
|
11179
|
-
C("app_bind_v1", [
|
|
11180
|
-
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")),
|
|
11307
|
+
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), Ac() && t.push(C("trigger_app_event_v1")), t.push(
|
|
11308
|
+
C("app_bind_v1", [ko([{ key: "items", value: "2" }])])
|
|
11309
|
+
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Ic() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), (st("callMethod") || $n()) && t.push(j(E("LABEL_METHOD"))), st("callMethod") && t.push(C("call_app_method_v1")), $n() && (t.push(C("implement_app_method_v1")), yc() && t.push(C("set_app_method_output_v1")), t.push(C("procedure_return_v1"))), t;
|
|
11181
11310
|
}
|
|
11182
|
-
const
|
|
11183
|
-
function
|
|
11311
|
+
const No = { name: "APP_COMP_CATEGORY", callback: Oc };
|
|
11312
|
+
function vc() {
|
|
11184
11313
|
const t = [];
|
|
11185
11314
|
return t.push(j(E("LABEL_FUNC"))), t.push(j(E("LABEL_FLOW"))), t;
|
|
11186
11315
|
}
|
|
11187
|
-
const
|
|
11188
|
-
function
|
|
11316
|
+
const Ie = { name: "APP_COMPUTE_CATEGORY", callback: vc };
|
|
11317
|
+
function Cc() {
|
|
11189
11318
|
const t = [];
|
|
11190
11319
|
return t.push(C("app_debug_trace_v1", [Kt("OBJECT")])), t.push(C("popup_message_v1", [Kt("TEXT")])), t.push(C("open_confirm_dlg_v1")), t.push(C("open_prompt_dlg_v1")), t;
|
|
11191
11320
|
}
|
|
11192
|
-
const
|
|
11193
|
-
function
|
|
11321
|
+
const ye = { name: "APP_MESSAGE_CATEGORY", callback: Cc };
|
|
11322
|
+
function kc() {
|
|
11194
11323
|
for (const t of A.app.appList)
|
|
11195
11324
|
if (t.pages.length > 0)
|
|
11196
11325
|
return !0;
|
|
11197
11326
|
return !1;
|
|
11198
11327
|
}
|
|
11199
|
-
function
|
|
11328
|
+
function Nc() {
|
|
11200
11329
|
const t = [];
|
|
11201
|
-
return t.push(C("app_env_is_v1")),
|
|
11330
|
+
return t.push(C("app_env_is_v1")), kc() && t.push(C("navigate_to_v1")), t;
|
|
11202
11331
|
}
|
|
11203
|
-
const
|
|
11204
|
-
function
|
|
11332
|
+
const Oe = { name: "APP_MISC_CATEGORY", callback: Nc };
|
|
11333
|
+
function Sc() {
|
|
11205
11334
|
const { activeObject: t, activePage: e } = A.app;
|
|
11206
11335
|
return !(t.type !== "page" || !e.meta.states || e.meta.states.length <= 0);
|
|
11207
11336
|
}
|
|
11208
|
-
function
|
|
11337
|
+
function Lc() {
|
|
11209
11338
|
const { activeObject: t, activePage: e } = A.app;
|
|
11210
11339
|
return !(t.type !== "page" || !e.meta.arguments || e.meta.arguments.length <= 0);
|
|
11211
11340
|
}
|
|
11212
|
-
function
|
|
11341
|
+
function bc() {
|
|
11213
11342
|
const t = [];
|
|
11214
11343
|
return t.push(j(E("LABEL_EVENT"))), st("onEvent") && t.push(C("on_app_event_v1")), t.push(
|
|
11215
|
-
C("app_bind_v1", [
|
|
11216
|
-
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")),
|
|
11344
|
+
C("app_bind_v1", [ko([{ key: "items", value: "2" }])])
|
|
11345
|
+
), t.push(C("watch_effect_v1")), (st("getProperty") || st("setProperty")) && t.push(j(E("LABEL_PROPERTY"))), st("getProperty") && t.push(C("get_app_property_v1")), st("setProperty") && t.push(C("set_app_property_v1")), Sc() && (t.push(j(E("LABEL_STATE"))), t.push(C("get_app_state_v1")), t.push(C("set_app_state_v1"))), st("callMethod") && (t.push(j(E("LABEL_METHOD"))), t.push(C("call_app_method_v1"))), Lc() && (t.push(j(E("LABEL_ARGUMENT"))), t.push(C("get_page_argument_v1"))), t;
|
|
11217
11346
|
}
|
|
11218
|
-
const
|
|
11347
|
+
const So = { name: "APP_PAGE_CATEGORY", callback: bc };
|
|
11219
11348
|
function Bc() {
|
|
11220
11349
|
const t = [];
|
|
11221
11350
|
return t.push(j(E("LABEL_RESOURCE"))), t.push(C("upload_resource_v1")), t;
|
|
11222
11351
|
}
|
|
11223
|
-
const
|
|
11224
|
-
function
|
|
11352
|
+
const ve = { name: "APP_RESOURCE_CATEGORY", callback: Bc }, Wt = L.xml;
|
|
11353
|
+
function Pc() {
|
|
11225
11354
|
const t = [];
|
|
11226
11355
|
{
|
|
11227
11356
|
const e = Wt.createElement("label");
|
|
@@ -11246,12 +11375,12 @@ function bc() {
|
|
|
11246
11375
|
}
|
|
11247
11376
|
const At = {
|
|
11248
11377
|
name: "PROCEDURE_CATEGORY",
|
|
11249
|
-
callback:
|
|
11250
|
-
},
|
|
11251
|
-
function
|
|
11378
|
+
callback: Pc
|
|
11379
|
+
}, re = L.xml;
|
|
11380
|
+
function Rc() {
|
|
11252
11381
|
const t = ne(), e = [];
|
|
11253
11382
|
{
|
|
11254
|
-
const o =
|
|
11383
|
+
const o = re.createElement("label");
|
|
11255
11384
|
o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
|
|
11256
11385
|
}
|
|
11257
11386
|
{
|
|
@@ -11270,25 +11399,25 @@ function Pc() {
|
|
|
11270
11399
|
return e;
|
|
11271
11400
|
n.sort(xt.compareByName);
|
|
11272
11401
|
{
|
|
11273
|
-
const o =
|
|
11402
|
+
const o = re.createElement("label");
|
|
11274
11403
|
o.setAttribute("text", E("LABEL_CREATED")), e.push(o);
|
|
11275
11404
|
}
|
|
11276
11405
|
return n.forEach((o) => {
|
|
11277
11406
|
{
|
|
11278
|
-
const s =
|
|
11407
|
+
const s = re.createElement("block");
|
|
11279
11408
|
s.setAttribute("type", "variable_get_v1"), s.appendChild(xt.generateVariableFieldDom(o)), e.push(s);
|
|
11280
11409
|
}
|
|
11281
11410
|
{
|
|
11282
|
-
const s =
|
|
11411
|
+
const s = re.createElement("block");
|
|
11283
11412
|
s.setAttribute("type", "variable_set_v1"), s.appendChild(xt.generateVariableFieldDom(o)), e.push(s);
|
|
11284
11413
|
}
|
|
11285
11414
|
}), e;
|
|
11286
11415
|
}
|
|
11287
11416
|
const It = {
|
|
11288
11417
|
name: "VARIABLE_CATEGORY",
|
|
11289
|
-
callback:
|
|
11418
|
+
callback: Rc
|
|
11290
11419
|
};
|
|
11291
|
-
function
|
|
11420
|
+
function Dc() {
|
|
11292
11421
|
const t = [];
|
|
11293
11422
|
if (ut().length > 0)
|
|
11294
11423
|
t.push(j(E("LABEL_OPERATION"))), t.push(C("add_data_v1")), t.push(C("delete_data_v1")), t.push(C("update_data_v1")), t.push(C("query_data_v1")), t.push(C("transaction_v1")), t.push(
|
|
@@ -11301,7 +11430,7 @@ function Rc() {
|
|
|
11301
11430
|
), t.push(
|
|
11302
11431
|
C("query_extra_sortby_v1", [
|
|
11303
11432
|
Kt("COLUMN"),
|
|
11304
|
-
|
|
11433
|
+
gc("DESC")
|
|
11305
11434
|
])
|
|
11306
11435
|
);
|
|
11307
11436
|
else {
|
|
@@ -11310,30 +11439,30 @@ function Rc() {
|
|
|
11310
11439
|
}
|
|
11311
11440
|
return t;
|
|
11312
11441
|
}
|
|
11313
|
-
const
|
|
11314
|
-
function Dc() {
|
|
11315
|
-
return ae("flow").length > 0;
|
|
11316
|
-
}
|
|
11442
|
+
const Ce = { name: "COMPUTE_DATA_CATEGORY", callback: Dc };
|
|
11317
11443
|
function Mc() {
|
|
11318
|
-
|
|
11319
|
-
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Dc() && console.assert(!0), t;
|
|
11444
|
+
return ie("flow").length > 0;
|
|
11320
11445
|
}
|
|
11321
|
-
const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Mc };
|
|
11322
11446
|
function Uc() {
|
|
11323
|
-
|
|
11447
|
+
const t = [];
|
|
11448
|
+
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Mc() && console.assert(!0), t;
|
|
11324
11449
|
}
|
|
11450
|
+
const ke = { name: "COMPUTE_FLOW_CATEGORY", callback: Uc };
|
|
11325
11451
|
function Vc() {
|
|
11326
|
-
|
|
11327
|
-
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Uc() && n.push(C("call_func_internal_v1")), n;
|
|
11452
|
+
return ie("func").length > 0;
|
|
11328
11453
|
}
|
|
11329
|
-
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Vc };
|
|
11330
11454
|
function xc() {
|
|
11455
|
+
const { activeObject: t, activeFunc: e } = A.compute, n = [];
|
|
11456
|
+
return t.type === "func" && (n.push(C("func_entry_v1")), e.outputs && e.outputs.length > 0 && n.push(C("set_func_output_v1")), n.push(C("procedure_return_v1"))), Vc() && n.push(C("call_func_internal_v1")), n;
|
|
11457
|
+
}
|
|
11458
|
+
const Ne = { name: "COMPUTE_FUNC_CATEGORY", callback: xc };
|
|
11459
|
+
function wc() {
|
|
11331
11460
|
const t = [];
|
|
11332
11461
|
return t.push(
|
|
11333
11462
|
C("compute_debug_trace_v1", [Kt("OBJECT")])
|
|
11334
11463
|
), t;
|
|
11335
11464
|
}
|
|
11336
|
-
const
|
|
11465
|
+
const Se = { name: "COMPUTE_MISC_CATEGORY", callback: wc }, Ve = {
|
|
11337
11466
|
kind: "category",
|
|
11338
11467
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
11339
11468
|
categorystyle: "color_category",
|
|
@@ -12012,7 +12141,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12012
12141
|
type: "text_reverse_v1"
|
|
12013
12142
|
}
|
|
12014
12143
|
]
|
|
12015
|
-
},
|
|
12144
|
+
}, Lo = {
|
|
12016
12145
|
kind: "category",
|
|
12017
12146
|
name: "%{BKY_CATEGORY_TIME}",
|
|
12018
12147
|
categorystyle: "time_category",
|
|
@@ -12036,26 +12165,26 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12036
12165
|
}
|
|
12037
12166
|
}
|
|
12038
12167
|
]
|
|
12039
|
-
},
|
|
12168
|
+
}, Fc = {
|
|
12040
12169
|
kind: "categoryToolbox",
|
|
12041
12170
|
contents: [
|
|
12042
12171
|
{
|
|
12043
12172
|
kind: "category",
|
|
12044
12173
|
name: "%{BKY_CATEGORY_COMP}",
|
|
12045
12174
|
categorystyle: "misc_category",
|
|
12046
|
-
custom:
|
|
12175
|
+
custom: No.name
|
|
12047
12176
|
},
|
|
12048
12177
|
{
|
|
12049
12178
|
kind: "category",
|
|
12050
12179
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
12051
12180
|
categorystyle: "misc_category",
|
|
12052
|
-
custom:
|
|
12181
|
+
custom: ye.name
|
|
12053
12182
|
},
|
|
12054
12183
|
{
|
|
12055
12184
|
kind: "category",
|
|
12056
12185
|
name: "%{BKY_CATEGORY_MISC}",
|
|
12057
12186
|
categorystyle: "misc_category",
|
|
12058
|
-
custom:
|
|
12187
|
+
custom: Oe.name
|
|
12059
12188
|
},
|
|
12060
12189
|
Fe,
|
|
12061
12190
|
we,
|
|
@@ -12064,7 +12193,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12064
12193
|
xe,
|
|
12065
12194
|
Ke,
|
|
12066
12195
|
Ve,
|
|
12067
|
-
|
|
12196
|
+
Lo,
|
|
12068
12197
|
{
|
|
12069
12198
|
kind: "category",
|
|
12070
12199
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12081,41 +12210,41 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12081
12210
|
kind: "category",
|
|
12082
12211
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
12083
12212
|
categorystyle: "resource_category",
|
|
12084
|
-
custom:
|
|
12213
|
+
custom: ve.name
|
|
12085
12214
|
},
|
|
12086
12215
|
{
|
|
12087
12216
|
kind: "category",
|
|
12088
12217
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
12089
12218
|
categorystyle: "compute_category",
|
|
12090
|
-
custom:
|
|
12219
|
+
custom: Ie.name
|
|
12091
12220
|
}
|
|
12092
12221
|
]
|
|
12093
|
-
},
|
|
12222
|
+
}, Yc = {
|
|
12094
12223
|
kind: "categoryToolbox",
|
|
12095
12224
|
contents: [
|
|
12096
12225
|
{
|
|
12097
12226
|
kind: "category",
|
|
12098
12227
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
12099
12228
|
categorystyle: "func_category",
|
|
12100
|
-
custom:
|
|
12229
|
+
custom: Ne.name
|
|
12101
12230
|
},
|
|
12102
12231
|
{
|
|
12103
12232
|
kind: "category",
|
|
12104
12233
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
12105
12234
|
categorystyle: "flow_category",
|
|
12106
|
-
custom:
|
|
12235
|
+
custom: ke.name
|
|
12107
12236
|
},
|
|
12108
12237
|
{
|
|
12109
12238
|
kind: "category",
|
|
12110
12239
|
name: "%{BKY_CATEGORY_DATA}",
|
|
12111
12240
|
categorystyle: "data_category",
|
|
12112
|
-
custom:
|
|
12241
|
+
custom: Ce.name
|
|
12113
12242
|
},
|
|
12114
12243
|
{
|
|
12115
12244
|
kind: "category",
|
|
12116
12245
|
name: "%{BKY_CATEGORY_MISC}",
|
|
12117
12246
|
categorystyle: "misc_category",
|
|
12118
|
-
custom:
|
|
12247
|
+
custom: Se.name
|
|
12119
12248
|
},
|
|
12120
12249
|
Fe,
|
|
12121
12250
|
we,
|
|
@@ -12137,32 +12266,32 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12137
12266
|
custom: At.name
|
|
12138
12267
|
}
|
|
12139
12268
|
]
|
|
12140
|
-
},
|
|
12269
|
+
}, Kc = {
|
|
12141
12270
|
kind: "categoryToolbox",
|
|
12142
12271
|
contents: [
|
|
12143
12272
|
{
|
|
12144
12273
|
kind: "category",
|
|
12145
12274
|
name: "%{BKY_CATEGORY_FUNC}",
|
|
12146
12275
|
categorystyle: "func_category",
|
|
12147
|
-
custom:
|
|
12276
|
+
custom: Ne.name
|
|
12148
12277
|
},
|
|
12149
12278
|
{
|
|
12150
12279
|
kind: "category",
|
|
12151
12280
|
name: "%{BKY_CATEGORY_FLOW}",
|
|
12152
12281
|
categorystyle: "flow_category",
|
|
12153
|
-
custom:
|
|
12282
|
+
custom: ke.name
|
|
12154
12283
|
},
|
|
12155
12284
|
{
|
|
12156
12285
|
kind: "category",
|
|
12157
12286
|
name: "%{BKY_CATEGORY_DATA}",
|
|
12158
12287
|
categorystyle: "data_category",
|
|
12159
|
-
custom:
|
|
12288
|
+
custom: Ce.name
|
|
12160
12289
|
},
|
|
12161
12290
|
{
|
|
12162
12291
|
kind: "category",
|
|
12163
12292
|
name: "%{BKY_CATEGORY_MISC}",
|
|
12164
12293
|
categorystyle: "misc_category",
|
|
12165
|
-
custom:
|
|
12294
|
+
custom: Se.name
|
|
12166
12295
|
},
|
|
12167
12296
|
Fe,
|
|
12168
12297
|
we,
|
|
@@ -12184,7 +12313,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12184
12313
|
custom: At.name
|
|
12185
12314
|
}
|
|
12186
12315
|
]
|
|
12187
|
-
},
|
|
12316
|
+
}, $c = {
|
|
12188
12317
|
kind: "categoryToolbox",
|
|
12189
12318
|
contents: [
|
|
12190
12319
|
{
|
|
@@ -12215,26 +12344,26 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12215
12344
|
]
|
|
12216
12345
|
}
|
|
12217
12346
|
]
|
|
12218
|
-
},
|
|
12347
|
+
}, Hc = {
|
|
12219
12348
|
kind: "categoryToolbox",
|
|
12220
12349
|
contents: [
|
|
12221
12350
|
{
|
|
12222
12351
|
kind: "category",
|
|
12223
12352
|
name: "%{BKY_CATEGORY_PAGE}",
|
|
12224
12353
|
categorystyle: "misc_category",
|
|
12225
|
-
custom:
|
|
12354
|
+
custom: So.name
|
|
12226
12355
|
},
|
|
12227
12356
|
{
|
|
12228
12357
|
kind: "category",
|
|
12229
12358
|
name: "%{BKY_CATEGORY_MESSAGE}",
|
|
12230
12359
|
categorystyle: "misc_category",
|
|
12231
|
-
custom:
|
|
12360
|
+
custom: ye.name
|
|
12232
12361
|
},
|
|
12233
12362
|
{
|
|
12234
12363
|
kind: "category",
|
|
12235
12364
|
name: "%{BKY_CATEGORY_MISC}",
|
|
12236
12365
|
categorystyle: "misc_category",
|
|
12237
|
-
custom:
|
|
12366
|
+
custom: Oe.name
|
|
12238
12367
|
},
|
|
12239
12368
|
Fe,
|
|
12240
12369
|
we,
|
|
@@ -12243,7 +12372,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12243
12372
|
xe,
|
|
12244
12373
|
Ke,
|
|
12245
12374
|
Ve,
|
|
12246
|
-
|
|
12375
|
+
Lo,
|
|
12247
12376
|
{
|
|
12248
12377
|
kind: "category",
|
|
12249
12378
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12260,13 +12389,13 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12260
12389
|
kind: "category",
|
|
12261
12390
|
name: "%{BKY_CATEGORY_RESOURCE}",
|
|
12262
12391
|
categorystyle: "resource_category",
|
|
12263
|
-
custom:
|
|
12392
|
+
custom: ve.name
|
|
12264
12393
|
},
|
|
12265
12394
|
{
|
|
12266
12395
|
kind: "category",
|
|
12267
12396
|
name: "%{BKY_CATEGORY_COMPUTE}",
|
|
12268
12397
|
categorystyle: "compute_category",
|
|
12269
|
-
custom:
|
|
12398
|
+
custom: Ie.name
|
|
12270
12399
|
}
|
|
12271
12400
|
]
|
|
12272
12401
|
}, tn = {
|
|
@@ -12295,26 +12424,26 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
|
12295
12424
|
wheel: !0
|
|
12296
12425
|
}
|
|
12297
12426
|
};
|
|
12298
|
-
function
|
|
12299
|
-
tn.theme = o ? "dark" : "light", tn.toolbox =
|
|
12300
|
-
const s =
|
|
12427
|
+
function Gc(t, e, n, o) {
|
|
12428
|
+
tn.theme = o ? "dark" : "light", tn.toolbox = Wc(e, n);
|
|
12429
|
+
const s = Qo(t, tn);
|
|
12301
12430
|
return s.addChangeListener((a) => {
|
|
12302
12431
|
setTimeout(() => {
|
|
12303
|
-
|
|
12432
|
+
zo.shadowBlockConversionChangeListener(a);
|
|
12304
12433
|
}, 0);
|
|
12305
|
-
}),
|
|
12434
|
+
}), jc(s, e, n), Xc(s), s;
|
|
12306
12435
|
}
|
|
12307
|
-
function
|
|
12436
|
+
function Wc(t, e) {
|
|
12308
12437
|
let n;
|
|
12309
|
-
return t === "page" ? e === "v1" && (n =
|
|
12438
|
+
return t === "page" ? e === "v1" && (n = Hc) : t === "comp" ? e === "v1" && (n = Fc) : t === "func" ? e === "v1" && (n = Kc) : t === "flow" ? e === "v1" && (n = Yc) : t === "json" && e === "v1" && (n = $c), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
|
|
12310
12439
|
}
|
|
12311
|
-
function
|
|
12440
|
+
function jc(t, e, n) {
|
|
12312
12441
|
function o({ name: s, callback: a }) {
|
|
12313
12442
|
t.registerToolboxCategoryCallback(s, () => a(e));
|
|
12314
12443
|
}
|
|
12315
|
-
e === "page" ? n === "v1" && (o(
|
|
12444
|
+
e === "page" ? n === "v1" && (o(So), o(ye), o(Oe), o(It), o(At), o(ve), o(Ie)) : e === "comp" ? n === "v1" && (o(No), o(ye), o(Oe), o(It), o(At), o(ve), o(Ie)) : e === "func" ? n === "v1" && (o(Ne), o(ke), o(Ce), o(Se), o(It), o(At)) : e === "flow" && n === "v1" && (o(Ne), o(ke), o(Ce), o(Se), o(It), o(At));
|
|
12316
12445
|
}
|
|
12317
|
-
function
|
|
12446
|
+
function Xc(t) {
|
|
12318
12447
|
const { router: e } = Nt;
|
|
12319
12448
|
t.registerButtonCallback("NO_COMPUTE", () => {
|
|
12320
12449
|
const n = e.resolve({
|
|
@@ -12332,7 +12461,7 @@ function jc(t) {
|
|
|
12332
12461
|
}, 100);
|
|
12333
12462
|
});
|
|
12334
12463
|
}
|
|
12335
|
-
function
|
|
12464
|
+
function Jc(t, e) {
|
|
12336
12465
|
const n = e.newBlock("json_root_v1");
|
|
12337
12466
|
n.initSvg(), n.render();
|
|
12338
12467
|
const o = (s, a) => {
|
|
@@ -12374,7 +12503,7 @@ function Xc(t, e) {
|
|
|
12374
12503
|
new (v.get(v.FINISHED_LOADING))(e)
|
|
12375
12504
|
);
|
|
12376
12505
|
}
|
|
12377
|
-
function
|
|
12506
|
+
function qc(t) {
|
|
12378
12507
|
const e = (o) => {
|
|
12379
12508
|
if (!o)
|
|
12380
12509
|
return null;
|
|
@@ -12406,7 +12535,7 @@ function Jc(t) {
|
|
|
12406
12535
|
if (o.type === "json_root_v1")
|
|
12407
12536
|
return e(o);
|
|
12408
12537
|
}
|
|
12409
|
-
const
|
|
12538
|
+
const Qc = { class: "position-relative w-100 h-100" }, zc = /* @__PURE__ */ mt({
|
|
12410
12539
|
__name: "index",
|
|
12411
12540
|
props: /* @__PURE__ */ sn({
|
|
12412
12541
|
type: {},
|
|
@@ -12422,7 +12551,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12422
12551
|
emits: /* @__PURE__ */ sn(["ready"], ["update:lock", "update:scale"]),
|
|
12423
12552
|
setup(t, { expose: e, emit: n }) {
|
|
12424
12553
|
const { backgroundColor2: o } = oe(), s = Qt(t, "lock"), a = Qt(t, "scale"), c = n, l = `blocklyEditor${an()}`, p = wt(), _ = qt("parentContainer"), r = qt("clean"), u = qt("navigator"), d = {};
|
|
12425
|
-
|
|
12554
|
+
ic(d);
|
|
12426
12555
|
const f = wt(!0), m = wt(!1), T = H(() => t.type === "json" ? "tree" : "list"), y = H(() => ({
|
|
12427
12556
|
width: "100%",
|
|
12428
12557
|
height: "calc(100% - 48px)"
|
|
@@ -12467,26 +12596,26 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12467
12596
|
left: 0,
|
|
12468
12597
|
zIndex: 3e3
|
|
12469
12598
|
})), { open: Ht } = fn(`blocklyEditorFlyout${an()}`);
|
|
12470
|
-
|
|
12599
|
+
bn(async () => {
|
|
12471
12600
|
if (!p.value || !_.value) {
|
|
12472
12601
|
console.assert(!1);
|
|
12473
12602
|
return;
|
|
12474
12603
|
}
|
|
12475
|
-
|
|
12604
|
+
Zo(_.value), await Pn(t.locale), d.workspace = Gc(p.value, t.type, t.version, t.dark), d.workspace.addChangeListener(v.disableOrphans), d.workspace.addChangeListener(bo);
|
|
12476
12605
|
const P = document.querySelector(`#${l} .blocklyFlyout`);
|
|
12477
12606
|
new MutationObserver((Ge) => {
|
|
12478
|
-
Ge.forEach((
|
|
12479
|
-
|
|
12607
|
+
Ge.forEach((ce) => {
|
|
12608
|
+
ce.type === "attributes" && ce.attributeName === "style" && (Ht.value = d.workspace.getFlyout().isVisible());
|
|
12480
12609
|
});
|
|
12481
|
-
}).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await
|
|
12482
|
-
}),
|
|
12610
|
+
}).observe(P, { attributes: !0 }), Ht.value = d.workspace.getFlyout().isVisible(), On(), vn(), await Is(), c("ready");
|
|
12611
|
+
}), Bn(() => {
|
|
12483
12612
|
Ht.value = !1;
|
|
12484
|
-
}),
|
|
12485
|
-
d.workspace &&
|
|
12613
|
+
}), ts(p, () => {
|
|
12614
|
+
d.workspace && es(d.workspace);
|
|
12486
12615
|
});
|
|
12487
12616
|
async function bo(P) {
|
|
12488
12617
|
if (P.type === v.FINISHED_LOADING) {
|
|
12489
|
-
|
|
12618
|
+
vo(), setTimeout(() => {
|
|
12490
12619
|
u.value?.update();
|
|
12491
12620
|
}, 0), f.value = !1;
|
|
12492
12621
|
return;
|
|
@@ -12501,19 +12630,19 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12501
12630
|
}, 0);
|
|
12502
12631
|
}
|
|
12503
12632
|
}
|
|
12504
|
-
const
|
|
12505
|
-
f.value = !0, t.type === "json" ?
|
|
12506
|
-
},
|
|
12633
|
+
const Bo = (P) => {
|
|
12634
|
+
f.value = !0, t.type === "json" ? Jc(P, d.workspace) : Z.workspaces.load(P, d.workspace);
|
|
12635
|
+
}, Po = () => t.type === "json" ? qc(d.workspace) : Z.workspaces.save(d.workspace), Ro = () => {
|
|
12507
12636
|
if (t.type === "json")
|
|
12508
12637
|
console.assert(!1);
|
|
12509
12638
|
else
|
|
12510
12639
|
return i.workspaceToCode(d.workspace);
|
|
12511
|
-
},
|
|
12640
|
+
}, Do = () => sc(d.workspace), On = () => {
|
|
12512
12641
|
d.workspace.setIsReadOnly(s.value), d.workspace.isReadOnly() && (Ht.value = !1);
|
|
12513
12642
|
}, vn = () => {
|
|
12514
12643
|
d.workspace.setScale(a.value);
|
|
12515
|
-
},
|
|
12516
|
-
d.workspace.fireChangeListener(new
|
|
12644
|
+
}, Mo = () => {
|
|
12645
|
+
d.workspace.fireChangeListener(new io());
|
|
12517
12646
|
}, Cn = () => {
|
|
12518
12647
|
r.value?.cleanWorkspace();
|
|
12519
12648
|
}, kn = () => {
|
|
@@ -12521,9 +12650,9 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12521
12650
|
}, Nn = () => {
|
|
12522
12651
|
u.value && (u.value.open = !0);
|
|
12523
12652
|
};
|
|
12524
|
-
return
|
|
12653
|
+
return bn(() => {
|
|
12525
12654
|
Vt.on("cleanWorkspace", Cn), Vt.on("toggleBlocklyLock", kn), Vt.on("openBlocklyNavigator", Nn);
|
|
12526
|
-
}),
|
|
12655
|
+
}), Bn(() => {
|
|
12527
12656
|
Vt.off("cleanWorkspace", Cn), Vt.off("toggleBlocklyLock", kn), Vt.off("openBlocklyNavigator", Nn);
|
|
12528
12657
|
}), Gt(
|
|
12529
12658
|
() => t.locale,
|
|
@@ -12533,7 +12662,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12533
12662
|
), Gt(
|
|
12534
12663
|
() => t.dark,
|
|
12535
12664
|
(P) => {
|
|
12536
|
-
|
|
12665
|
+
Za(P ? "dark" : "light");
|
|
12537
12666
|
}
|
|
12538
12667
|
), Gt(Ht, (P) => {
|
|
12539
12668
|
P || d.workspace?.hideChaff();
|
|
@@ -12543,14 +12672,14 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12543
12672
|
vn();
|
|
12544
12673
|
}), e({
|
|
12545
12674
|
loading: f,
|
|
12546
|
-
load:
|
|
12547
|
-
save:
|
|
12548
|
-
generateCode:
|
|
12549
|
-
generateReactivity:
|
|
12550
|
-
fireStateChange:
|
|
12551
|
-
}), (P,
|
|
12552
|
-
const Ge = K("v-icon"),
|
|
12553
|
-
return V(), lt("div",
|
|
12675
|
+
load: Bo,
|
|
12676
|
+
save: Po,
|
|
12677
|
+
generateCode: Ro,
|
|
12678
|
+
generateReactivity: Do,
|
|
12679
|
+
fireStateChange: Mo
|
|
12680
|
+
}), (P, bt) => {
|
|
12681
|
+
const Ge = K("v-icon"), ce = K("x-loading");
|
|
12682
|
+
return V(), lt("div", Qc, [
|
|
12554
12683
|
Q("div", {
|
|
12555
12684
|
id: l,
|
|
12556
12685
|
ref_key: "blocklyDiv",
|
|
@@ -12560,7 +12689,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12560
12689
|
Q("div", {
|
|
12561
12690
|
style: ot(S.value)
|
|
12562
12691
|
}, [
|
|
12563
|
-
|
|
12692
|
+
ys(P.$slots, "bottom")
|
|
12564
12693
|
], 4),
|
|
12565
12694
|
m.value ? (V(), lt("div", {
|
|
12566
12695
|
key: 0,
|
|
@@ -12577,16 +12706,16 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12577
12706
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12578
12707
|
style: ot(Ut.value)
|
|
12579
12708
|
}, [
|
|
12580
|
-
U(
|
|
12709
|
+
U(ac, {
|
|
12581
12710
|
ref_key: "clean",
|
|
12582
12711
|
ref: r,
|
|
12583
12712
|
lock: s.value
|
|
12584
12713
|
}, null, 8, ["lock"]),
|
|
12585
|
-
U(
|
|
12714
|
+
U(cc, {
|
|
12586
12715
|
modelValue: s.value,
|
|
12587
|
-
"onUpdate:modelValue":
|
|
12716
|
+
"onUpdate:modelValue": bt[0] || (bt[0] = (Uo) => s.value = Uo)
|
|
12588
12717
|
}, null, 8, ["modelValue"]),
|
|
12589
|
-
U(
|
|
12718
|
+
U(Ec, {
|
|
12590
12719
|
ref_key: "navigator",
|
|
12591
12720
|
ref: u,
|
|
12592
12721
|
lock: s.value,
|
|
@@ -12606,22 +12735,22 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12606
12735
|
ref: _,
|
|
12607
12736
|
style: ot(yn.value)
|
|
12608
12737
|
}, null, 4),
|
|
12609
|
-
U(
|
|
12738
|
+
U(ce, {
|
|
12610
12739
|
open: f.value,
|
|
12611
12740
|
"z-index": 99
|
|
12612
12741
|
}, null, 8, ["open"])
|
|
12613
12742
|
]);
|
|
12614
12743
|
};
|
|
12615
12744
|
}
|
|
12616
|
-
}),
|
|
12745
|
+
}), Zc = /* @__PURE__ */ mt({
|
|
12617
12746
|
__name: "index",
|
|
12618
12747
|
props: {
|
|
12619
12748
|
code: {}
|
|
12620
12749
|
},
|
|
12621
12750
|
setup(t) {
|
|
12622
12751
|
const e = t;
|
|
12623
|
-
|
|
12624
|
-
const n =
|
|
12752
|
+
ns.registerLanguage("javascript", os);
|
|
12753
|
+
const n = ss.component, { backgroundColor2: o } = oe();
|
|
12625
12754
|
return (s, a) => {
|
|
12626
12755
|
const c = K("v-sheet");
|
|
12627
12756
|
return V(), dt(c, {
|
|
@@ -12639,10 +12768,10 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12639
12768
|
}, 8, ["color"]);
|
|
12640
12769
|
};
|
|
12641
12770
|
}
|
|
12642
|
-
}),
|
|
12771
|
+
}), tr = { class: "text-subtitle-1" }, er = { class: "w-100 h-100 overflow-auto" }, nr = /* @__PURE__ */ mt({
|
|
12643
12772
|
__name: "index",
|
|
12644
12773
|
setup(t) {
|
|
12645
|
-
const { t: e } =
|
|
12774
|
+
const { t: e } = se(), { sysBarAvail: n } = qn(), { backgroundColor0: o, backgroundColor2: s } = oe(), a = wt(""), c = H(() => {
|
|
12646
12775
|
let _ = 48;
|
|
12647
12776
|
return n.value && (_ += 24), {
|
|
12648
12777
|
position: "relative",
|
|
@@ -12655,12 +12784,12 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12655
12784
|
const u = K("v-sheet"), d = K("v-btn"), f = K("v-spacer"), m = K("v-dialog");
|
|
12656
12785
|
return V(), dt(m, {
|
|
12657
12786
|
modelValue: F(p),
|
|
12658
|
-
"onUpdate:modelValue": r[1] || (r[1] = (T) =>
|
|
12787
|
+
"onUpdate:modelValue": r[1] || (r[1] = (T) => ue(p) ? p.value = T : null),
|
|
12659
12788
|
fullscreen: "",
|
|
12660
12789
|
"no-click-animation": "",
|
|
12661
12790
|
persistent: "",
|
|
12662
12791
|
transition: "dialog-bottom-transition",
|
|
12663
|
-
onKeydown: r[2] || (r[2] =
|
|
12792
|
+
onKeydown: r[2] || (r[2] = so(Jt((T) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12664
12793
|
}, {
|
|
12665
12794
|
default: ht(() => [
|
|
12666
12795
|
U(u, {
|
|
@@ -12686,7 +12815,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12686
12815
|
variant: "text",
|
|
12687
12816
|
onClick: r[0] || (r[0] = (T) => p.value = !1)
|
|
12688
12817
|
}),
|
|
12689
|
-
Q("span",
|
|
12818
|
+
Q("span", tr, zt(F(e)("x-block-lib.dlg.source.title")), 1),
|
|
12690
12819
|
U(f)
|
|
12691
12820
|
]),
|
|
12692
12821
|
_: 1
|
|
@@ -12694,8 +12823,8 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12694
12823
|
Q("div", {
|
|
12695
12824
|
style: ot(c.value)
|
|
12696
12825
|
}, [
|
|
12697
|
-
Q("div",
|
|
12698
|
-
U(
|
|
12826
|
+
Q("div", er, [
|
|
12827
|
+
U(Zc, { code: a.value }, null, 8, ["code"])
|
|
12699
12828
|
])
|
|
12700
12829
|
], 4)
|
|
12701
12830
|
]),
|
|
@@ -12706,16 +12835,16 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12706
12835
|
}, 8, ["modelValue"]);
|
|
12707
12836
|
};
|
|
12708
12837
|
}
|
|
12709
|
-
}),
|
|
12710
|
-
t.component("XBlockly",
|
|
12838
|
+
}), or = (t) => {
|
|
12839
|
+
t.component("XBlockly", zc), t.component("XSourceDlg", nr);
|
|
12711
12840
|
};
|
|
12712
|
-
async function
|
|
12713
|
-
return (await
|
|
12841
|
+
async function pr(t) {
|
|
12842
|
+
return (await ao(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.gy41k67q.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.b828ufea.js") }), `./locales/${t}/index.ts`, 4)).default;
|
|
12714
12843
|
}
|
|
12715
|
-
const
|
|
12844
|
+
const _r = { install: or };
|
|
12716
12845
|
export {
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12846
|
+
zc as XBlockly,
|
|
12847
|
+
_r as default,
|
|
12848
|
+
or as install,
|
|
12849
|
+
pr as loadLocaleMessageBlock
|
|
12721
12850
|
};
|