x-block-lib 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +90 -102
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
2
|
import { E as v, r as Sn, M as xo, s as wo, a as Fo, 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 Yo, e as $, f as g, g as Ko, 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 $o, P as nn, q as We, V as xt, t as Wn, W as Ho, v as Go, w as Wo, S as jo, x as Xo, y as Jo, z as ne, T as Be, A as jn, D as qo, G as Qo, H as Xn, I as zo, J as Zo, K as ts, L as es, Q as ns, R as os, U as ss, Y as is } from "./vendor.omuaiksa.js";
|
|
3
3
|
import { globalState as A } from "x-state-lib";
|
|
4
|
-
import { globalObjects as Nt, openConfirmDlg as as, openPromptDlg as cs, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as
|
|
4
|
+
import { globalObjects as Nt, openConfirmDlg as as, openPromptDlg as cs, messageWarning as Jn, useColor as oe, useSystem as qn, useViewStack as fn, eventBus as Vt } from "x-essential-lib";
|
|
5
5
|
import { pkgs as de, parsePixelStr as rs, parsePercentStr as ls, getTag as $t, unwrapEventId as Qn, elements as B, unwrapEventKeyOfCustomSlot as bt, unwrapEventKeyOfElementSlot as us, unwrapPropertyKeyOfElementSlot as zn, unwrapPropertyKeyOfCustomSlot as Zn, makeEventId as M, makeEventKeyOfCustomSlot as Xt, makePropertyKeyOfCustomSlot as ue, unwrapSlotId as Dt, makeEventKeyOfElementSlot as ps, makePropertyKeyOfElementSlot as to, toEventName as be, unwrapMethodId as se, unwrapMethodKeyOfCustomSlot as he, unwrapMethodKeyOfElementSlot as _s, makeMethodId as ft, makeMethodKeyOfElementSlot as ds, makeMethodKeyOfCustomSlot as on, toMethodName as Pe, unwrapPropertyId as hs, makePropertyId as Tt, toPropertyName as eo, addIndent as fs, isLocaleOfEventKind as ms, getImplementMethodName as no, isLocaleOfMethodKind as oo, makeTriggerId as Pt } from "x-runtime-lib";
|
|
6
|
-
import { provide as Ts, inject as Es, defineComponent as mt, computed as H, resolveComponent as K, createBlock as dt, openBlock as
|
|
6
|
+
import { provide as Ts, inject as Es, 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 gs, withDirectives as As, createElementBlock as lt, normalizeStyle as ot, createElementVNode as Q, createCommentVNode as Et, toDisplayString as zt, withModifiers as Jt, mergeModels as sn, Fragment as so, renderList as Is, useId as an, onUnmounted as ys, useTemplateRef as qt, withKeys as io, isRef as pe, onMounted as Bn, nextTick as Os, onBeforeUnmount as bn, watch as Gt, renderSlot as vs } from "vue";
|
|
7
7
|
import { useDisplay as Tn } from "vuetify";
|
|
8
8
|
import { useI18n as ie } from "vue-i18n";
|
|
9
9
|
var R = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(R || {});
|
|
@@ -192,13 +192,13 @@ function Dn(t) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Us() {
|
|
196
196
|
const t = [];
|
|
197
197
|
return Ms().forEach(({ key: n, name: o }) => {
|
|
198
198
|
t.push([o, n]);
|
|
199
199
|
}), b(t);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const Vs = {
|
|
202
202
|
init: function() {
|
|
203
203
|
this.argument = {
|
|
204
204
|
key: "",
|
|
@@ -220,7 +220,7 @@ const Us = {
|
|
|
220
220
|
}, 0);
|
|
221
221
|
},
|
|
222
222
|
genArgumentOpts_: function() {
|
|
223
|
-
return
|
|
223
|
+
return Us();
|
|
224
224
|
},
|
|
225
225
|
onchange: function(t) {
|
|
226
226
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -256,7 +256,7 @@ const Us = {
|
|
|
256
256
|
this.setWarningText(null);
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
|
-
I.get_page_argument_v1 =
|
|
259
|
+
I.get_page_argument_v1 = Vs;
|
|
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];
|
|
@@ -543,7 +543,7 @@ function _o() {
|
|
|
543
543
|
e.push({ id: n, name: o });
|
|
544
544
|
return e;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Un(t) {
|
|
547
547
|
const { activeApp: e } = A.app;
|
|
548
548
|
if (!t)
|
|
549
549
|
return { id: "", name: "" };
|
|
@@ -2171,7 +2171,7 @@ function To() {
|
|
|
2171
2171
|
n.push({ id: o, name: s });
|
|
2172
2172
|
return n;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function Vn(t) {
|
|
2175
2175
|
const { activeObject: e, activeComp: n } = A.app;
|
|
2176
2176
|
if (e.type !== "comp" || !n.meta.slots)
|
|
2177
2177
|
return;
|
|
@@ -2923,33 +2923,21 @@ i.forBlock.call_app_method_v1 = function(t) {
|
|
|
2923
2923
|
const { kind: l, nodeId: p, methodKey: _ } = se(o.method.id), r = no(l, p, _);
|
|
2924
2924
|
if (o.method.outputs && o.method.outputs.length > 0) {
|
|
2925
2925
|
const u = i.statementToCode(o, "HANDLE");
|
|
2926
|
-
return `
|
|
2926
|
+
return `{
|
|
2927
2927
|
const __outputs__ = await ${r}(${s}, ${a});
|
|
2928
|
-
${c}${u}}
|
|
2929
|
-
__messageV1__('error', e.message)
|
|
2930
|
-
}
|
|
2928
|
+
${c}${u}}
|
|
2931
2929
|
`;
|
|
2932
2930
|
} else
|
|
2933
|
-
return `
|
|
2934
|
-
await ${r}(${s}, ${a});
|
|
2935
|
-
} catch (e) {
|
|
2936
|
-
__messageV1__('error', e.message)
|
|
2937
|
-
}
|
|
2931
|
+
return `await ${r}(${s}, ${a});
|
|
2938
2932
|
`;
|
|
2939
2933
|
} else if (o.method.outputs && o.method.outputs.length > 0) {
|
|
2940
2934
|
const l = i.statementToCode(o, "HANDLE");
|
|
2941
|
-
return `
|
|
2935
|
+
return `{
|
|
2942
2936
|
const __outputs__ = await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2943
|
-
${c}${l}}
|
|
2944
|
-
__messageV1__('error', e.message)
|
|
2945
|
-
}
|
|
2937
|
+
${c}${l}}
|
|
2946
2938
|
`;
|
|
2947
2939
|
} else
|
|
2948
|
-
return `
|
|
2949
|
-
await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2950
|
-
} catch (e) {
|
|
2951
|
-
__messageV1__('error', e.message)
|
|
2952
|
-
}
|
|
2940
|
+
return `await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2953
2941
|
`;
|
|
2954
2942
|
};
|
|
2955
2943
|
const li = {
|
|
@@ -3456,7 +3444,7 @@ const _i = {
|
|
|
3456
3444
|
}
|
|
3457
3445
|
},
|
|
3458
3446
|
onCompChange_: function(t) {
|
|
3459
|
-
const e =
|
|
3447
|
+
const e = Un(t);
|
|
3460
3448
|
if (!e) {
|
|
3461
3449
|
console.assert(!1);
|
|
3462
3450
|
return;
|
|
@@ -3464,7 +3452,7 @@ const _i = {
|
|
|
3464
3452
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3465
3453
|
},
|
|
3466
3454
|
checkWarning_: function() {
|
|
3467
|
-
const t =
|
|
3455
|
+
const t = Un(this.comp.id);
|
|
3468
3456
|
if (!t) {
|
|
3469
3457
|
this.setWarningText(E("WARN_COMP_NOT_FOUND"));
|
|
3470
3458
|
return;
|
|
@@ -3518,7 +3506,7 @@ const di = {
|
|
|
3518
3506
|
}
|
|
3519
3507
|
},
|
|
3520
3508
|
onSlotChange_: function(t) {
|
|
3521
|
-
const e =
|
|
3509
|
+
const e = Vn(t);
|
|
3522
3510
|
if (!e) {
|
|
3523
3511
|
console.assert(!1);
|
|
3524
3512
|
return;
|
|
@@ -3526,7 +3514,7 @@ const di = {
|
|
|
3526
3514
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3527
3515
|
},
|
|
3528
3516
|
checkWarning_: function() {
|
|
3529
|
-
const t =
|
|
3517
|
+
const t = Vn(this.slot.id);
|
|
3530
3518
|
if (!t) {
|
|
3531
3519
|
this.setWarningText(E("WARN_SLOT_NOT_FOUND"));
|
|
3532
3520
|
return;
|
|
@@ -5441,7 +5429,7 @@ function ct(t, e) {
|
|
|
5441
5429
|
if (o)
|
|
5442
5430
|
return o.tables.find((s) => s.id === e);
|
|
5443
5431
|
}
|
|
5444
|
-
function
|
|
5432
|
+
function Ue(t) {
|
|
5445
5433
|
const e = [];
|
|
5446
5434
|
return et(t).forEach(({ id: o, name: s }) => {
|
|
5447
5435
|
e.push([s, o]);
|
|
@@ -5631,7 +5619,7 @@ const Pi = {
|
|
|
5631
5619
|
return Me();
|
|
5632
5620
|
},
|
|
5633
5621
|
genTableOpts_: function() {
|
|
5634
|
-
return
|
|
5622
|
+
return Ue(this.space.id);
|
|
5635
5623
|
},
|
|
5636
5624
|
genColumnOpts_: function() {
|
|
5637
5625
|
return Si(this.space.id, this.table.id);
|
|
@@ -5838,7 +5826,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5838
5826
|
}
|
|
5839
5827
|
return [`{type:${e(o)},entries:[${s}]}`, h.ATOMIC];
|
|
5840
5828
|
};
|
|
5841
|
-
function
|
|
5829
|
+
function Ui(t) {
|
|
5842
5830
|
const e = t.getInput("TABLE").connection;
|
|
5843
5831
|
if (e.targetBlock())
|
|
5844
5832
|
return;
|
|
@@ -5857,7 +5845,7 @@ function Vi(t) {
|
|
|
5857
5845
|
}, a = Z.blocks.append(s, t.workspace);
|
|
5858
5846
|
e.connect(a.outputConnection);
|
|
5859
5847
|
}
|
|
5860
|
-
function
|
|
5848
|
+
function Vi(t) {
|
|
5861
5849
|
const e = t.getInput("CONDITION").connection;
|
|
5862
5850
|
if (e.targetBlock())
|
|
5863
5851
|
return;
|
|
@@ -5922,7 +5910,7 @@ const wi = {
|
|
|
5922
5910
|
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"));
|
|
5923
5911
|
},
|
|
5924
5912
|
ensureBlocks_: function() {
|
|
5925
|
-
this.isInsertionMarker() || (
|
|
5913
|
+
this.isInsertionMarker() || (Ui(this), Vi(this), q(this, [
|
|
5926
5914
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5927
5915
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5928
5916
|
]), xi(this));
|
|
@@ -6247,7 +6235,7 @@ const ji = {
|
|
|
6247
6235
|
return Me();
|
|
6248
6236
|
},
|
|
6249
6237
|
genTableOpts_: function() {
|
|
6250
|
-
return
|
|
6238
|
+
return Ue(this.space.id);
|
|
6251
6239
|
},
|
|
6252
6240
|
genColumnOpts_: function() {
|
|
6253
6241
|
const t = [];
|
|
@@ -6459,7 +6447,7 @@ const Xi = {
|
|
|
6459
6447
|
return Me();
|
|
6460
6448
|
},
|
|
6461
6449
|
genTableOpts_: function() {
|
|
6462
|
-
return
|
|
6450
|
+
return Ue(this.space.id);
|
|
6463
6451
|
},
|
|
6464
6452
|
onchange: function(t) {
|
|
6465
6453
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6643,7 +6631,7 @@ const zi = {
|
|
|
6643
6631
|
return Me();
|
|
6644
6632
|
},
|
|
6645
6633
|
genTableOpts_: function() {
|
|
6646
|
-
return
|
|
6634
|
+
return Ue(this.space.id);
|
|
6647
6635
|
},
|
|
6648
6636
|
genColumnOpts_: function() {
|
|
6649
6637
|
const t = [];
|
|
@@ -9528,7 +9516,7 @@ I.select_resource_v1 = Ma;
|
|
|
9528
9516
|
i.forBlock.select_resource_v1 = function() {
|
|
9529
9517
|
return "";
|
|
9530
9518
|
};
|
|
9531
|
-
const
|
|
9519
|
+
const Ua = {
|
|
9532
9520
|
init: function() {
|
|
9533
9521
|
this.appendDummyInput().appendField(
|
|
9534
9522
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -9559,7 +9547,7 @@ const Va = {
|
|
|
9559
9547
|
]);
|
|
9560
9548
|
}
|
|
9561
9549
|
};
|
|
9562
|
-
I.upload_resource_v1 =
|
|
9550
|
+
I.upload_resource_v1 = Ua;
|
|
9563
9551
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
9564
9552
|
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");
|
|
9565
9553
|
return `{
|
|
@@ -9592,9 +9580,9 @@ g([
|
|
|
9592
9580
|
i.forBlock.text_v1 = function(t) {
|
|
9593
9581
|
return [i.quote_(t.getFieldValue("TEXT")), h.ATOMIC];
|
|
9594
9582
|
};
|
|
9595
|
-
const
|
|
9583
|
+
const Va = /^\s*'([^']|\\')*'\s*$/;
|
|
9596
9584
|
function _e(t) {
|
|
9597
|
-
return
|
|
9585
|
+
return Va.test(t) ? [t, h.ATOMIC] : [`String(${t})`, h.FUNCTION_CALL];
|
|
9598
9586
|
}
|
|
9599
9587
|
x.register(
|
|
9600
9588
|
"text_append_tooltip_v1",
|
|
@@ -10743,12 +10731,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10743
10731
|
};
|
|
10744
10732
|
return e({ cleanWorkspace: l }), (_, r) => {
|
|
10745
10733
|
const u = K("v-btn"), d = K("v-tooltip");
|
|
10746
|
-
return
|
|
10734
|
+
return V(), dt(d, {
|
|
10747
10735
|
disabled: c.value,
|
|
10748
10736
|
text: F(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10749
10737
|
}, {
|
|
10750
10738
|
activator: ht(({ props: f }) => [
|
|
10751
|
-
|
|
10739
|
+
U(u, mn(f, {
|
|
10752
10740
|
density: "comfortable",
|
|
10753
10741
|
icon: "mdi-broom",
|
|
10754
10742
|
variant: "outlined",
|
|
@@ -10770,12 +10758,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10770
10758
|
const { t: e } = ie(), n = Tn(), o = Qt(t, "modelValue"), s = H(() => n.smAndDown.value);
|
|
10771
10759
|
return (a, c) => {
|
|
10772
10760
|
const l = K("v-btn"), p = K("v-tooltip");
|
|
10773
|
-
return
|
|
10761
|
+
return V(), dt(p, {
|
|
10774
10762
|
disabled: s.value,
|
|
10775
10763
|
text: F(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10776
10764
|
}, {
|
|
10777
10765
|
activator: ht(({ props: _ }) => [
|
|
10778
|
-
|
|
10766
|
+
U(l, mn(_, {
|
|
10779
10767
|
density: "comfortable",
|
|
10780
10768
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
10781
10769
|
variant: "outlined",
|
|
@@ -10819,7 +10807,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10819
10807
|
}));
|
|
10820
10808
|
return (r, u) => {
|
|
10821
10809
|
const d = K("v-spacer"), f = K("v-icon"), m = gs("ripple");
|
|
10822
|
-
return As((
|
|
10810
|
+
return As((V(), lt("div", {
|
|
10823
10811
|
class: "d-flex align-center cursor-pointer",
|
|
10824
10812
|
style: ot(p.value),
|
|
10825
10813
|
onClick: u[1] || (u[1] = (T) => c("x-click", a.id)),
|
|
@@ -10828,10 +10816,10 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10828
10816
|
}, [
|
|
10829
10817
|
Q("div", cc, [
|
|
10830
10818
|
Q("span", rc, zt(a.title), 1),
|
|
10831
|
-
a.desc ? (
|
|
10819
|
+
a.desc ? (V(), lt("span", lc, zt(a.desc), 1)) : Et("", !0)
|
|
10832
10820
|
]),
|
|
10833
|
-
|
|
10834
|
-
|
|
10821
|
+
U(d),
|
|
10822
|
+
U(f, {
|
|
10835
10823
|
class: "x-handle cursor-move mr-3",
|
|
10836
10824
|
icon: "mdi-drag-horizontal-variant",
|
|
10837
10825
|
onMousedown: u[0] || (u[0] = Jt(() => {
|
|
@@ -10869,8 +10857,8 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10869
10857
|
const T = m.id === Qo()?.id;
|
|
10870
10858
|
let y = "";
|
|
10871
10859
|
if (m.type.startsWith("on_app_event_v")) {
|
|
10872
|
-
const D = m,
|
|
10873
|
-
|
|
10860
|
+
const D = m, Ut = B[D.node.key];
|
|
10861
|
+
Ut && (y = n(Ut.name), D.node.alias && (y += " / " + D.node.alias), y += " - " + be(D.event.kind, D.event.names));
|
|
10874
10862
|
} else if (m.type.startsWith("watch_effect_v"))
|
|
10875
10863
|
y = n("x-block-lib.watchEffect");
|
|
10876
10864
|
else if (m.type.startsWith("app_bind_v"))
|
|
@@ -10932,7 +10920,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10932
10920
|
const f = s.workspace.getBlockById(d);
|
|
10933
10921
|
Xn.setSelected(f), An(d), o.value = !1;
|
|
10934
10922
|
};
|
|
10935
|
-
return (d, f) => a.value.length > 0 ? (
|
|
10923
|
+
return (d, f) => a.value.length > 0 ? (V(), dt(F(qo), {
|
|
10936
10924
|
key: 0,
|
|
10937
10925
|
modelValue: a.value,
|
|
10938
10926
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => a.value = m),
|
|
@@ -10944,7 +10932,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10944
10932
|
onStart: p
|
|
10945
10933
|
}, {
|
|
10946
10934
|
default: ht(() => [
|
|
10947
|
-
(
|
|
10935
|
+
(V(!0), lt(so, null, Is(a.value, (m) => (V(), dt(uc, {
|
|
10948
10936
|
id: m.id,
|
|
10949
10937
|
key: m.id,
|
|
10950
10938
|
desc: m.desc,
|
|
@@ -10954,7 +10942,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10954
10942
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10955
10943
|
]),
|
|
10956
10944
|
_: 1
|
|
10957
|
-
}, 8, ["modelValue"])) : (
|
|
10945
|
+
}, 8, ["modelValue"])) : (V(), lt("span", pc, zt(F(n)("x-block-lib.noOption")), 1));
|
|
10958
10946
|
}
|
|
10959
10947
|
}), dc = (t, e) => {
|
|
10960
10948
|
const n = t.__vccOpts || t;
|
|
@@ -10985,7 +10973,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10985
10973
|
const p = l.getBlockById(c);
|
|
10986
10974
|
Xn.setSelected(p), An(c), n.value = !1;
|
|
10987
10975
|
};
|
|
10988
|
-
return (c, l) => (
|
|
10976
|
+
return (c, l) => (V(), lt("div", {
|
|
10989
10977
|
onClick: l[0] || (l[0] = (p) => a(""))
|
|
10990
10978
|
}, "blockTree"));
|
|
10991
10979
|
}
|
|
@@ -11019,9 +11007,9 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11019
11007
|
return e({ open: r, update: () => {
|
|
11020
11008
|
t.type === "list" ? u.value?.update() : t.type === "tree" && d.value?.update();
|
|
11021
11009
|
} }), (m, T) => {
|
|
11022
|
-
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"),
|
|
11023
|
-
return
|
|
11024
|
-
|
|
11010
|
+
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"), Ut = K("v-dialog"), He = K("v-tooltip");
|
|
11011
|
+
return V(), lt(so, null, [
|
|
11012
|
+
U(Ut, {
|
|
11025
11013
|
modelValue: F(r),
|
|
11026
11014
|
"onUpdate:modelValue": T[5] || (T[5] = (nt) => pe(r) ? r.value = nt : null),
|
|
11027
11015
|
eager: "",
|
|
@@ -11041,25 +11029,25 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11041
11029
|
class: "elevation-2",
|
|
11042
11030
|
style: ot(l.value)
|
|
11043
11031
|
}, [
|
|
11044
|
-
F(s) ? (
|
|
11032
|
+
F(s) ? (V(), dt(y, {
|
|
11045
11033
|
key: 0,
|
|
11046
11034
|
color: "transparent",
|
|
11047
11035
|
height: 24
|
|
11048
11036
|
})) : Et("", !0),
|
|
11049
|
-
|
|
11037
|
+
U(y, {
|
|
11050
11038
|
class: "d-flex align-center px-2",
|
|
11051
11039
|
color: "transparent",
|
|
11052
11040
|
height: 48
|
|
11053
11041
|
}, {
|
|
11054
11042
|
default: ht(() => [
|
|
11055
|
-
|
|
11043
|
+
U(S, {
|
|
11056
11044
|
density: "comfortable",
|
|
11057
11045
|
icon: "mdi-close",
|
|
11058
11046
|
variant: "text",
|
|
11059
11047
|
onClick: T[0] || (T[0] = (nt) => r.value = !1)
|
|
11060
11048
|
}),
|
|
11061
11049
|
Q("span", mc, zt(F(n)("x-block-lib.navigator")), 1),
|
|
11062
|
-
|
|
11050
|
+
U(D)
|
|
11063
11051
|
]),
|
|
11064
11052
|
_: 1
|
|
11065
11053
|
}),
|
|
@@ -11067,14 +11055,14 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11067
11055
|
class: "overflow-y-auto",
|
|
11068
11056
|
style: ot(p.value)
|
|
11069
11057
|
}, [
|
|
11070
|
-
t.type === "list" ? (
|
|
11058
|
+
t.type === "list" ? (V(), dt(hc, {
|
|
11071
11059
|
key: 0,
|
|
11072
11060
|
ref_key: "blockList",
|
|
11073
11061
|
ref: u,
|
|
11074
11062
|
modelValue: F(r),
|
|
11075
11063
|
"onUpdate:modelValue": T[1] || (T[1] = (nt) => pe(r) ? r.value = nt : null),
|
|
11076
11064
|
lock: t.lock
|
|
11077
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
11065
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(fc, {
|
|
11078
11066
|
key: 1,
|
|
11079
11067
|
ref_key: "blockTree",
|
|
11080
11068
|
ref: d,
|
|
@@ -11090,12 +11078,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11090
11078
|
]),
|
|
11091
11079
|
_: 1
|
|
11092
11080
|
}, 8, ["modelValue"]),
|
|
11093
|
-
|
|
11081
|
+
U(He, {
|
|
11094
11082
|
disabled: c.value,
|
|
11095
11083
|
text: F(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
11096
11084
|
}, {
|
|
11097
11085
|
activator: ht(({ props: nt }) => [
|
|
11098
|
-
|
|
11086
|
+
U(S, mn(nt, {
|
|
11099
11087
|
density: "comfortable",
|
|
11100
11088
|
icon: "mdi-navigation-variant",
|
|
11101
11089
|
variant: "outlined",
|
|
@@ -11327,21 +11315,21 @@ function Mc() {
|
|
|
11327
11315
|
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Dc() && console.assert(!0), t;
|
|
11328
11316
|
}
|
|
11329
11317
|
const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Mc };
|
|
11330
|
-
function
|
|
11318
|
+
function Uc() {
|
|
11331
11319
|
return ae("func").length > 0;
|
|
11332
11320
|
}
|
|
11333
|
-
function
|
|
11321
|
+
function Vc() {
|
|
11334
11322
|
const { activeObject: t, activeFunc: e } = A.compute, n = [];
|
|
11335
|
-
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"))),
|
|
11323
|
+
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;
|
|
11336
11324
|
}
|
|
11337
|
-
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
11325
|
+
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Vc };
|
|
11338
11326
|
function xc() {
|
|
11339
11327
|
const t = [];
|
|
11340
11328
|
return t.push(
|
|
11341
11329
|
C("compute_debug_trace_v1", [Kt("OBJECT")])
|
|
11342
11330
|
), t;
|
|
11343
11331
|
}
|
|
11344
|
-
const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc },
|
|
11332
|
+
const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
11345
11333
|
kind: "category",
|
|
11346
11334
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
11347
11335
|
categorystyle: "color_category",
|
|
@@ -12071,7 +12059,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12071
12059
|
$e,
|
|
12072
12060
|
xe,
|
|
12073
12061
|
Ke,
|
|
12074
|
-
|
|
12062
|
+
Ve,
|
|
12075
12063
|
Bo,
|
|
12076
12064
|
{
|
|
12077
12065
|
kind: "category",
|
|
@@ -12131,7 +12119,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12131
12119
|
$e,
|
|
12132
12120
|
xe,
|
|
12133
12121
|
Ke,
|
|
12134
|
-
|
|
12122
|
+
Ve,
|
|
12135
12123
|
{
|
|
12136
12124
|
kind: "category",
|
|
12137
12125
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12178,7 +12166,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12178
12166
|
$e,
|
|
12179
12167
|
xe,
|
|
12180
12168
|
Ke,
|
|
12181
|
-
|
|
12169
|
+
Ve,
|
|
12182
12170
|
{
|
|
12183
12171
|
kind: "category",
|
|
12184
12172
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12250,7 +12238,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12250
12238
|
$e,
|
|
12251
12239
|
xe,
|
|
12252
12240
|
Ke,
|
|
12253
|
-
|
|
12241
|
+
Ve,
|
|
12254
12242
|
Bo,
|
|
12255
12243
|
{
|
|
12256
12244
|
kind: "category",
|
|
@@ -12448,7 +12436,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12448
12436
|
width: "56px",
|
|
12449
12437
|
height: "calc(100% - 49px)",
|
|
12450
12438
|
zIndex: 999
|
|
12451
|
-
})),
|
|
12439
|
+
})), Ut = H(() => ({
|
|
12452
12440
|
position: "absolute",
|
|
12453
12441
|
top: "0px",
|
|
12454
12442
|
right: "0px",
|
|
@@ -12520,7 +12508,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12520
12508
|
d.workspace.setIsReadOnly(s.value), d.workspace.isReadOnly() && (Ht.value = !1);
|
|
12521
12509
|
}, vn = () => {
|
|
12522
12510
|
d.workspace.setScale(a.value);
|
|
12523
|
-
},
|
|
12511
|
+
}, Uo = () => {
|
|
12524
12512
|
d.workspace.fireChangeListener(new ao());
|
|
12525
12513
|
}, Cn = () => {
|
|
12526
12514
|
r.value?.cleanWorkspace();
|
|
@@ -12530,9 +12518,9 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12530
12518
|
u.value && (u.value.open = !0);
|
|
12531
12519
|
};
|
|
12532
12520
|
return Bn(() => {
|
|
12533
|
-
|
|
12521
|
+
Vt.on("cleanWorkspace", Cn), Vt.on("toggleBlocklyLock", kn), Vt.on("openBlocklyNavigator", Nn);
|
|
12534
12522
|
}), bn(() => {
|
|
12535
|
-
|
|
12523
|
+
Vt.off("cleanWorkspace", Cn), Vt.off("toggleBlocklyLock", kn), Vt.off("openBlocklyNavigator", Nn);
|
|
12536
12524
|
}), Gt(
|
|
12537
12525
|
() => t.locale,
|
|
12538
12526
|
(P) => {
|
|
@@ -12555,10 +12543,10 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12555
12543
|
save: Ro,
|
|
12556
12544
|
generateCode: Do,
|
|
12557
12545
|
generateReactivity: Mo,
|
|
12558
|
-
fireStateChange:
|
|
12546
|
+
fireStateChange: Uo
|
|
12559
12547
|
}), (P, Bt) => {
|
|
12560
12548
|
const Ge = K("v-icon"), re = K("x-loading");
|
|
12561
|
-
return
|
|
12549
|
+
return V(), lt("div", qc, [
|
|
12562
12550
|
Q("div", {
|
|
12563
12551
|
id: l,
|
|
12564
12552
|
ref_key: "blocklyDiv",
|
|
@@ -12570,42 +12558,42 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12570
12558
|
}, [
|
|
12571
12559
|
vs(P.$slots, "bottom")
|
|
12572
12560
|
], 4),
|
|
12573
|
-
m.value ? (
|
|
12561
|
+
m.value ? (V(), lt("div", {
|
|
12574
12562
|
key: 0,
|
|
12575
12563
|
class: "d-flex flex-column justify-center align-center",
|
|
12576
12564
|
style: ot(D.value)
|
|
12577
12565
|
}, [
|
|
12578
|
-
|
|
12566
|
+
U(Ge, {
|
|
12579
12567
|
icon: "mdi-delete",
|
|
12580
12568
|
size: "x-large"
|
|
12581
12569
|
})
|
|
12582
12570
|
], 4)) : Et("", !0),
|
|
12583
|
-
f.value ? Et("", !0) : (
|
|
12571
|
+
f.value ? Et("", !0) : (V(), lt("div", {
|
|
12584
12572
|
key: 1,
|
|
12585
12573
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12586
|
-
style: ot(
|
|
12574
|
+
style: ot(Ut.value)
|
|
12587
12575
|
}, [
|
|
12588
|
-
|
|
12576
|
+
U(ic, {
|
|
12589
12577
|
ref_key: "clean",
|
|
12590
12578
|
ref: r,
|
|
12591
12579
|
lock: s.value
|
|
12592
12580
|
}, null, 8, ["lock"]),
|
|
12593
|
-
|
|
12581
|
+
U(ac, {
|
|
12594
12582
|
modelValue: s.value,
|
|
12595
|
-
"onUpdate:modelValue": Bt[0] || (Bt[0] = (
|
|
12583
|
+
"onUpdate:modelValue": Bt[0] || (Bt[0] = (Vo) => s.value = Vo)
|
|
12596
12584
|
}, null, 8, ["modelValue"]),
|
|
12597
|
-
|
|
12585
|
+
U(Tc, {
|
|
12598
12586
|
ref_key: "navigator",
|
|
12599
12587
|
ref: u,
|
|
12600
12588
|
lock: s.value,
|
|
12601
12589
|
type: T.value
|
|
12602
12590
|
}, null, 8, ["lock", "type"])
|
|
12603
12591
|
], 4)),
|
|
12604
|
-
s.value ? (
|
|
12592
|
+
s.value ? (V(), lt("div", {
|
|
12605
12593
|
key: 2,
|
|
12606
12594
|
style: ot(nt.value)
|
|
12607
12595
|
}, null, 4)) : Et("", !0),
|
|
12608
|
-
s.value ? (
|
|
12596
|
+
s.value ? (V(), lt("div", {
|
|
12609
12597
|
key: 3,
|
|
12610
12598
|
style: ot(He.value)
|
|
12611
12599
|
}, null, 4)) : Et("", !0),
|
|
@@ -12614,7 +12602,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12614
12602
|
ref: _,
|
|
12615
12603
|
style: ot(yn.value)
|
|
12616
12604
|
}, null, 4),
|
|
12617
|
-
|
|
12605
|
+
U(re, {
|
|
12618
12606
|
open: f.value,
|
|
12619
12607
|
"z-index": 99
|
|
12620
12608
|
}, null, 8, ["open"])
|
|
@@ -12632,13 +12620,13 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12632
12620
|
const n = is.component, { backgroundColor2: o } = oe();
|
|
12633
12621
|
return (s, a) => {
|
|
12634
12622
|
const c = K("v-sheet");
|
|
12635
|
-
return
|
|
12623
|
+
return V(), dt(c, {
|
|
12636
12624
|
color: F(o),
|
|
12637
12625
|
height: "100%",
|
|
12638
12626
|
width: "100%"
|
|
12639
12627
|
}, {
|
|
12640
12628
|
default: ht(() => [
|
|
12641
|
-
|
|
12629
|
+
U(F(n), {
|
|
12642
12630
|
code: e.code,
|
|
12643
12631
|
language: "js"
|
|
12644
12632
|
}, null, 8, ["code"])
|
|
@@ -12661,7 +12649,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12661
12649
|
}, { open: p } = fn("sourceDlg", l);
|
|
12662
12650
|
return (_, r) => {
|
|
12663
12651
|
const u = K("v-sheet"), d = K("v-btn"), f = K("v-spacer"), m = K("v-dialog");
|
|
12664
|
-
return
|
|
12652
|
+
return V(), dt(m, {
|
|
12665
12653
|
modelValue: F(p),
|
|
12666
12654
|
"onUpdate:modelValue": r[1] || (r[1] = (T) => pe(p) ? p.value = T : null),
|
|
12667
12655
|
fullscreen: "",
|
|
@@ -12671,31 +12659,31 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12671
12659
|
onKeydown: r[2] || (r[2] = io(Jt((T) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12672
12660
|
}, {
|
|
12673
12661
|
default: ht(() => [
|
|
12674
|
-
|
|
12662
|
+
U(u, {
|
|
12675
12663
|
color: F(o),
|
|
12676
12664
|
height: "100%",
|
|
12677
12665
|
width: "100%"
|
|
12678
12666
|
}, {
|
|
12679
12667
|
default: ht(() => [
|
|
12680
|
-
F(n) ? (
|
|
12668
|
+
F(n) ? (V(), dt(u, {
|
|
12681
12669
|
key: 0,
|
|
12682
12670
|
color: F(s),
|
|
12683
12671
|
height: 24
|
|
12684
12672
|
}, null, 8, ["color"])) : Et("", !0),
|
|
12685
|
-
|
|
12673
|
+
U(u, {
|
|
12686
12674
|
class: "d-flex align-center px-2",
|
|
12687
12675
|
color: F(s),
|
|
12688
12676
|
height: 48
|
|
12689
12677
|
}, {
|
|
12690
12678
|
default: ht(() => [
|
|
12691
|
-
|
|
12679
|
+
U(d, {
|
|
12692
12680
|
density: "comfortable",
|
|
12693
12681
|
icon: "mdi-close",
|
|
12694
12682
|
variant: "text",
|
|
12695
12683
|
onClick: r[0] || (r[0] = (T) => p.value = !1)
|
|
12696
12684
|
}),
|
|
12697
12685
|
Q("span", Zc, zt(F(e)("x-block-lib.dlg.source.title")), 1),
|
|
12698
|
-
|
|
12686
|
+
U(f)
|
|
12699
12687
|
]),
|
|
12700
12688
|
_: 1
|
|
12701
12689
|
}, 8, ["color"]),
|
|
@@ -12703,7 +12691,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12703
12691
|
style: ot(c.value)
|
|
12704
12692
|
}, [
|
|
12705
12693
|
Q("div", tr, [
|
|
12706
|
-
|
|
12694
|
+
U(zc, { code: a.value }, null, 8, ["code"])
|
|
12707
12695
|
])
|
|
12708
12696
|
], 4)
|
|
12709
12697
|
]),
|