x-block-lib 0.9.2 → 0.9.4
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 +95 -103
- package/package.json +2 -2
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;
|
|
@@ -2366,7 +2366,11 @@ i.forBlock.on_app_event_v1 = function(t) {
|
|
|
2366
2366
|
return `__onEventV1__(${e(n.event.id)}, async (${o}) => {
|
|
2367
2367
|
try {
|
|
2368
2368
|
${fs(s, 2)} } catch (e) {
|
|
2369
|
-
|
|
2369
|
+
if (e && e.message) {
|
|
2370
|
+
__messageV1__('error', e.message);
|
|
2371
|
+
} else {
|
|
2372
|
+
__messageV1__('error', e);
|
|
2373
|
+
}
|
|
2370
2374
|
}
|
|
2371
2375
|
});
|
|
2372
2376
|
`;
|
|
@@ -2923,33 +2927,21 @@ i.forBlock.call_app_method_v1 = function(t) {
|
|
|
2923
2927
|
const { kind: l, nodeId: p, methodKey: _ } = se(o.method.id), r = no(l, p, _);
|
|
2924
2928
|
if (o.method.outputs && o.method.outputs.length > 0) {
|
|
2925
2929
|
const u = i.statementToCode(o, "HANDLE");
|
|
2926
|
-
return `
|
|
2930
|
+
return `{
|
|
2927
2931
|
const __outputs__ = await ${r}(${s}, ${a});
|
|
2928
|
-
${c}${u}}
|
|
2929
|
-
__messageV1__('error', e.message)
|
|
2930
|
-
}
|
|
2932
|
+
${c}${u}}
|
|
2931
2933
|
`;
|
|
2932
2934
|
} else
|
|
2933
|
-
return `
|
|
2934
|
-
await ${r}(${s}, ${a});
|
|
2935
|
-
} catch (e) {
|
|
2936
|
-
__messageV1__('error', e.message)
|
|
2937
|
-
}
|
|
2935
|
+
return `await ${r}(${s}, ${a});
|
|
2938
2936
|
`;
|
|
2939
2937
|
} else if (o.method.outputs && o.method.outputs.length > 0) {
|
|
2940
2938
|
const l = i.statementToCode(o, "HANDLE");
|
|
2941
|
-
return `
|
|
2939
|
+
return `{
|
|
2942
2940
|
const __outputs__ = await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2943
|
-
${c}${l}}
|
|
2944
|
-
__messageV1__('error', e.message)
|
|
2945
|
-
}
|
|
2941
|
+
${c}${l}}
|
|
2946
2942
|
`;
|
|
2947
2943
|
} else
|
|
2948
|
-
return `
|
|
2949
|
-
await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2950
|
-
} catch (e) {
|
|
2951
|
-
__messageV1__('error', e.message)
|
|
2952
|
-
}
|
|
2944
|
+
return `await __callMethodV1__(${n(o.method.id)}, ${s}, ${a});
|
|
2953
2945
|
`;
|
|
2954
2946
|
};
|
|
2955
2947
|
const li = {
|
|
@@ -3456,7 +3448,7 @@ const _i = {
|
|
|
3456
3448
|
}
|
|
3457
3449
|
},
|
|
3458
3450
|
onCompChange_: function(t) {
|
|
3459
|
-
const e =
|
|
3451
|
+
const e = Un(t);
|
|
3460
3452
|
if (!e) {
|
|
3461
3453
|
console.assert(!1);
|
|
3462
3454
|
return;
|
|
@@ -3464,7 +3456,7 @@ const _i = {
|
|
|
3464
3456
|
this.comp.id = e.id, this.comp.name = e.name;
|
|
3465
3457
|
},
|
|
3466
3458
|
checkWarning_: function() {
|
|
3467
|
-
const t =
|
|
3459
|
+
const t = Un(this.comp.id);
|
|
3468
3460
|
if (!t) {
|
|
3469
3461
|
this.setWarningText(E("WARN_COMP_NOT_FOUND"));
|
|
3470
3462
|
return;
|
|
@@ -3518,7 +3510,7 @@ const di = {
|
|
|
3518
3510
|
}
|
|
3519
3511
|
},
|
|
3520
3512
|
onSlotChange_: function(t) {
|
|
3521
|
-
const e =
|
|
3513
|
+
const e = Vn(t);
|
|
3522
3514
|
if (!e) {
|
|
3523
3515
|
console.assert(!1);
|
|
3524
3516
|
return;
|
|
@@ -3526,7 +3518,7 @@ const di = {
|
|
|
3526
3518
|
this.slot.id = e.id, this.slot.name = e.name;
|
|
3527
3519
|
},
|
|
3528
3520
|
checkWarning_: function() {
|
|
3529
|
-
const t =
|
|
3521
|
+
const t = Vn(this.slot.id);
|
|
3530
3522
|
if (!t) {
|
|
3531
3523
|
this.setWarningText(E("WARN_SLOT_NOT_FOUND"));
|
|
3532
3524
|
return;
|
|
@@ -5441,7 +5433,7 @@ function ct(t, e) {
|
|
|
5441
5433
|
if (o)
|
|
5442
5434
|
return o.tables.find((s) => s.id === e);
|
|
5443
5435
|
}
|
|
5444
|
-
function
|
|
5436
|
+
function Ue(t) {
|
|
5445
5437
|
const e = [];
|
|
5446
5438
|
return et(t).forEach(({ id: o, name: s }) => {
|
|
5447
5439
|
e.push([s, o]);
|
|
@@ -5631,7 +5623,7 @@ const Pi = {
|
|
|
5631
5623
|
return Me();
|
|
5632
5624
|
},
|
|
5633
5625
|
genTableOpts_: function() {
|
|
5634
|
-
return
|
|
5626
|
+
return Ue(this.space.id);
|
|
5635
5627
|
},
|
|
5636
5628
|
genColumnOpts_: function() {
|
|
5637
5629
|
return Si(this.space.id, this.table.id);
|
|
@@ -5838,7 +5830,7 @@ i.forBlock.cond_logic_v1 = function(t) {
|
|
|
5838
5830
|
}
|
|
5839
5831
|
return [`{type:${e(o)},entries:[${s}]}`, h.ATOMIC];
|
|
5840
5832
|
};
|
|
5841
|
-
function
|
|
5833
|
+
function Ui(t) {
|
|
5842
5834
|
const e = t.getInput("TABLE").connection;
|
|
5843
5835
|
if (e.targetBlock())
|
|
5844
5836
|
return;
|
|
@@ -5857,7 +5849,7 @@ function Vi(t) {
|
|
|
5857
5849
|
}, a = Z.blocks.append(s, t.workspace);
|
|
5858
5850
|
e.connect(a.outputConnection);
|
|
5859
5851
|
}
|
|
5860
|
-
function
|
|
5852
|
+
function Vi(t) {
|
|
5861
5853
|
const e = t.getInput("CONDITION").connection;
|
|
5862
5854
|
if (e.targetBlock())
|
|
5863
5855
|
return;
|
|
@@ -5922,7 +5914,7 @@ const wi = {
|
|
|
5922
5914
|
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
5915
|
},
|
|
5924
5916
|
ensureBlocks_: function() {
|
|
5925
|
-
this.isInsertionMarker() || (
|
|
5917
|
+
this.isInsertionMarker() || (Ui(this), Vi(this), q(this, [
|
|
5926
5918
|
["SUCCESS", "__success__", "x-runtime-lib.success", !0],
|
|
5927
5919
|
["MESSAGE", "__message__", "x-runtime-lib.message", !0]
|
|
5928
5920
|
]), xi(this));
|
|
@@ -6247,7 +6239,7 @@ const ji = {
|
|
|
6247
6239
|
return Me();
|
|
6248
6240
|
},
|
|
6249
6241
|
genTableOpts_: function() {
|
|
6250
|
-
return
|
|
6242
|
+
return Ue(this.space.id);
|
|
6251
6243
|
},
|
|
6252
6244
|
genColumnOpts_: function() {
|
|
6253
6245
|
const t = [];
|
|
@@ -6459,7 +6451,7 @@ const Xi = {
|
|
|
6459
6451
|
return Me();
|
|
6460
6452
|
},
|
|
6461
6453
|
genTableOpts_: function() {
|
|
6462
|
-
return
|
|
6454
|
+
return Ue(this.space.id);
|
|
6463
6455
|
},
|
|
6464
6456
|
onchange: function(t) {
|
|
6465
6457
|
if (t.type === R.STATE_CHANGE)
|
|
@@ -6643,7 +6635,7 @@ const zi = {
|
|
|
6643
6635
|
return Me();
|
|
6644
6636
|
},
|
|
6645
6637
|
genTableOpts_: function() {
|
|
6646
|
-
return
|
|
6638
|
+
return Ue(this.space.id);
|
|
6647
6639
|
},
|
|
6648
6640
|
genColumnOpts_: function() {
|
|
6649
6641
|
const t = [];
|
|
@@ -9528,7 +9520,7 @@ I.select_resource_v1 = Ma;
|
|
|
9528
9520
|
i.forBlock.select_resource_v1 = function() {
|
|
9529
9521
|
return "";
|
|
9530
9522
|
};
|
|
9531
|
-
const
|
|
9523
|
+
const Ua = {
|
|
9532
9524
|
init: function() {
|
|
9533
9525
|
this.appendDummyInput().appendField(
|
|
9534
9526
|
"%{BKY_RESOURCE_V1_UPLOAD_RESOURCE_TITLE}"
|
|
@@ -9559,7 +9551,7 @@ const Va = {
|
|
|
9559
9551
|
]);
|
|
9560
9552
|
}
|
|
9561
9553
|
};
|
|
9562
|
-
I.upload_resource_v1 =
|
|
9554
|
+
I.upload_resource_v1 = Ua;
|
|
9563
9555
|
i.forBlock.upload_resource_v1 = function(t) {
|
|
9564
9556
|
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
9557
|
return `{
|
|
@@ -9592,9 +9584,9 @@ g([
|
|
|
9592
9584
|
i.forBlock.text_v1 = function(t) {
|
|
9593
9585
|
return [i.quote_(t.getFieldValue("TEXT")), h.ATOMIC];
|
|
9594
9586
|
};
|
|
9595
|
-
const
|
|
9587
|
+
const Va = /^\s*'([^']|\\')*'\s*$/;
|
|
9596
9588
|
function _e(t) {
|
|
9597
|
-
return
|
|
9589
|
+
return Va.test(t) ? [t, h.ATOMIC] : [`String(${t})`, h.FUNCTION_CALL];
|
|
9598
9590
|
}
|
|
9599
9591
|
x.register(
|
|
9600
9592
|
"text_append_tooltip_v1",
|
|
@@ -10743,12 +10735,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10743
10735
|
};
|
|
10744
10736
|
return e({ cleanWorkspace: l }), (_, r) => {
|
|
10745
10737
|
const u = K("v-btn"), d = K("v-tooltip");
|
|
10746
|
-
return
|
|
10738
|
+
return V(), dt(d, {
|
|
10747
10739
|
disabled: c.value,
|
|
10748
10740
|
text: F(n)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10749
10741
|
}, {
|
|
10750
10742
|
activator: ht(({ props: f }) => [
|
|
10751
|
-
|
|
10743
|
+
U(u, mn(f, {
|
|
10752
10744
|
density: "comfortable",
|
|
10753
10745
|
icon: "mdi-broom",
|
|
10754
10746
|
variant: "outlined",
|
|
@@ -10770,12 +10762,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10770
10762
|
const { t: e } = ie(), n = Tn(), o = Qt(t, "modelValue"), s = H(() => n.smAndDown.value);
|
|
10771
10763
|
return (a, c) => {
|
|
10772
10764
|
const l = K("v-btn"), p = K("v-tooltip");
|
|
10773
|
-
return
|
|
10765
|
+
return V(), dt(p, {
|
|
10774
10766
|
disabled: s.value,
|
|
10775
10767
|
text: F(e)("x-block-lib.tip.hotkeyCtrlW")
|
|
10776
10768
|
}, {
|
|
10777
10769
|
activator: ht(({ props: _ }) => [
|
|
10778
|
-
|
|
10770
|
+
U(l, mn(_, {
|
|
10779
10771
|
density: "comfortable",
|
|
10780
10772
|
icon: o.value ? "mdi-lock" : "mdi-lock-open",
|
|
10781
10773
|
variant: "outlined",
|
|
@@ -10819,7 +10811,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10819
10811
|
}));
|
|
10820
10812
|
return (r, u) => {
|
|
10821
10813
|
const d = K("v-spacer"), f = K("v-icon"), m = gs("ripple");
|
|
10822
|
-
return As((
|
|
10814
|
+
return As((V(), lt("div", {
|
|
10823
10815
|
class: "d-flex align-center cursor-pointer",
|
|
10824
10816
|
style: ot(p.value),
|
|
10825
10817
|
onClick: u[1] || (u[1] = (T) => c("x-click", a.id)),
|
|
@@ -10828,10 +10820,10 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10828
10820
|
}, [
|
|
10829
10821
|
Q("div", cc, [
|
|
10830
10822
|
Q("span", rc, zt(a.title), 1),
|
|
10831
|
-
a.desc ? (
|
|
10823
|
+
a.desc ? (V(), lt("span", lc, zt(a.desc), 1)) : Et("", !0)
|
|
10832
10824
|
]),
|
|
10833
|
-
|
|
10834
|
-
|
|
10825
|
+
U(d),
|
|
10826
|
+
U(f, {
|
|
10835
10827
|
class: "x-handle cursor-move mr-3",
|
|
10836
10828
|
icon: "mdi-drag-horizontal-variant",
|
|
10837
10829
|
onMousedown: u[0] || (u[0] = Jt(() => {
|
|
@@ -10869,8 +10861,8 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10869
10861
|
const T = m.id === Qo()?.id;
|
|
10870
10862
|
let y = "";
|
|
10871
10863
|
if (m.type.startsWith("on_app_event_v")) {
|
|
10872
|
-
const D = m,
|
|
10873
|
-
|
|
10864
|
+
const D = m, Ut = B[D.node.key];
|
|
10865
|
+
Ut && (y = n(Ut.name), D.node.alias && (y += " / " + D.node.alias), y += " - " + be(D.event.kind, D.event.names));
|
|
10874
10866
|
} else if (m.type.startsWith("watch_effect_v"))
|
|
10875
10867
|
y = n("x-block-lib.watchEffect");
|
|
10876
10868
|
else if (m.type.startsWith("app_bind_v"))
|
|
@@ -10932,7 +10924,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10932
10924
|
const f = s.workspace.getBlockById(d);
|
|
10933
10925
|
Xn.setSelected(f), An(d), o.value = !1;
|
|
10934
10926
|
};
|
|
10935
|
-
return (d, f) => a.value.length > 0 ? (
|
|
10927
|
+
return (d, f) => a.value.length > 0 ? (V(), dt(F(qo), {
|
|
10936
10928
|
key: 0,
|
|
10937
10929
|
modelValue: a.value,
|
|
10938
10930
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => a.value = m),
|
|
@@ -10944,7 +10936,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10944
10936
|
onStart: p
|
|
10945
10937
|
}, {
|
|
10946
10938
|
default: ht(() => [
|
|
10947
|
-
(
|
|
10939
|
+
(V(!0), lt(so, null, Is(a.value, (m) => (V(), dt(uc, {
|
|
10948
10940
|
id: m.id,
|
|
10949
10941
|
key: m.id,
|
|
10950
10942
|
desc: m.desc,
|
|
@@ -10954,7 +10946,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10954
10946
|
}, null, 8, ["id", "desc", "select", "title"]))), 128))
|
|
10955
10947
|
]),
|
|
10956
10948
|
_: 1
|
|
10957
|
-
}, 8, ["modelValue"])) : (
|
|
10949
|
+
}, 8, ["modelValue"])) : (V(), lt("span", pc, zt(F(n)("x-block-lib.noOption")), 1));
|
|
10958
10950
|
}
|
|
10959
10951
|
}), dc = (t, e) => {
|
|
10960
10952
|
const n = t.__vccOpts || t;
|
|
@@ -10985,7 +10977,7 @@ const ic = /* @__PURE__ */ mt({
|
|
|
10985
10977
|
const p = l.getBlockById(c);
|
|
10986
10978
|
Xn.setSelected(p), An(c), n.value = !1;
|
|
10987
10979
|
};
|
|
10988
|
-
return (c, l) => (
|
|
10980
|
+
return (c, l) => (V(), lt("div", {
|
|
10989
10981
|
onClick: l[0] || (l[0] = (p) => a(""))
|
|
10990
10982
|
}, "blockTree"));
|
|
10991
10983
|
}
|
|
@@ -11019,9 +11011,9 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11019
11011
|
return e({ open: r, update: () => {
|
|
11020
11012
|
t.type === "list" ? u.value?.update() : t.type === "tree" && d.value?.update();
|
|
11021
11013
|
} }), (m, T) => {
|
|
11022
|
-
const y = K("v-sheet"), S = K("v-btn"), D = K("v-spacer"),
|
|
11023
|
-
return
|
|
11024
|
-
|
|
11014
|
+
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(so, null, [
|
|
11016
|
+
U(Ut, {
|
|
11025
11017
|
modelValue: F(r),
|
|
11026
11018
|
"onUpdate:modelValue": T[5] || (T[5] = (nt) => pe(r) ? r.value = nt : null),
|
|
11027
11019
|
eager: "",
|
|
@@ -11041,25 +11033,25 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11041
11033
|
class: "elevation-2",
|
|
11042
11034
|
style: ot(l.value)
|
|
11043
11035
|
}, [
|
|
11044
|
-
F(s) ? (
|
|
11036
|
+
F(s) ? (V(), dt(y, {
|
|
11045
11037
|
key: 0,
|
|
11046
11038
|
color: "transparent",
|
|
11047
11039
|
height: 24
|
|
11048
11040
|
})) : Et("", !0),
|
|
11049
|
-
|
|
11041
|
+
U(y, {
|
|
11050
11042
|
class: "d-flex align-center px-2",
|
|
11051
11043
|
color: "transparent",
|
|
11052
11044
|
height: 48
|
|
11053
11045
|
}, {
|
|
11054
11046
|
default: ht(() => [
|
|
11055
|
-
|
|
11047
|
+
U(S, {
|
|
11056
11048
|
density: "comfortable",
|
|
11057
11049
|
icon: "mdi-close",
|
|
11058
11050
|
variant: "text",
|
|
11059
11051
|
onClick: T[0] || (T[0] = (nt) => r.value = !1)
|
|
11060
11052
|
}),
|
|
11061
11053
|
Q("span", mc, zt(F(n)("x-block-lib.navigator")), 1),
|
|
11062
|
-
|
|
11054
|
+
U(D)
|
|
11063
11055
|
]),
|
|
11064
11056
|
_: 1
|
|
11065
11057
|
}),
|
|
@@ -11067,14 +11059,14 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11067
11059
|
class: "overflow-y-auto",
|
|
11068
11060
|
style: ot(p.value)
|
|
11069
11061
|
}, [
|
|
11070
|
-
t.type === "list" ? (
|
|
11062
|
+
t.type === "list" ? (V(), dt(hc, {
|
|
11071
11063
|
key: 0,
|
|
11072
11064
|
ref_key: "blockList",
|
|
11073
11065
|
ref: u,
|
|
11074
11066
|
modelValue: F(r),
|
|
11075
11067
|
"onUpdate:modelValue": T[1] || (T[1] = (nt) => pe(r) ? r.value = nt : null),
|
|
11076
11068
|
lock: t.lock
|
|
11077
|
-
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (
|
|
11069
|
+
}, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (V(), dt(fc, {
|
|
11078
11070
|
key: 1,
|
|
11079
11071
|
ref_key: "blockTree",
|
|
11080
11072
|
ref: d,
|
|
@@ -11090,12 +11082,12 @@ const ic = /* @__PURE__ */ mt({
|
|
|
11090
11082
|
]),
|
|
11091
11083
|
_: 1
|
|
11092
11084
|
}, 8, ["modelValue"]),
|
|
11093
|
-
|
|
11085
|
+
U(He, {
|
|
11094
11086
|
disabled: c.value,
|
|
11095
11087
|
text: F(n)("x-block-lib.tip.hotkeyCtrlE")
|
|
11096
11088
|
}, {
|
|
11097
11089
|
activator: ht(({ props: nt }) => [
|
|
11098
|
-
|
|
11090
|
+
U(S, mn(nt, {
|
|
11099
11091
|
density: "comfortable",
|
|
11100
11092
|
icon: "mdi-navigation-variant",
|
|
11101
11093
|
variant: "outlined",
|
|
@@ -11327,21 +11319,21 @@ function Mc() {
|
|
|
11327
11319
|
return A.compute.activeObject.type === "flow" && t.push(C("on_flow_state_event_v1")), Dc() && console.assert(!0), t;
|
|
11328
11320
|
}
|
|
11329
11321
|
const Ne = { name: "COMPUTE_FLOW_CATEGORY", callback: Mc };
|
|
11330
|
-
function
|
|
11322
|
+
function Uc() {
|
|
11331
11323
|
return ae("func").length > 0;
|
|
11332
11324
|
}
|
|
11333
|
-
function
|
|
11325
|
+
function Vc() {
|
|
11334
11326
|
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"))),
|
|
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;
|
|
11336
11328
|
}
|
|
11337
|
-
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback:
|
|
11329
|
+
const Se = { name: "COMPUTE_FUNC_CATEGORY", callback: Vc };
|
|
11338
11330
|
function xc() {
|
|
11339
11331
|
const t = [];
|
|
11340
11332
|
return t.push(
|
|
11341
11333
|
C("compute_debug_trace_v1", [Kt("OBJECT")])
|
|
11342
11334
|
), t;
|
|
11343
11335
|
}
|
|
11344
|
-
const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc },
|
|
11336
|
+
const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ve = {
|
|
11345
11337
|
kind: "category",
|
|
11346
11338
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
11347
11339
|
categorystyle: "color_category",
|
|
@@ -12071,7 +12063,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12071
12063
|
$e,
|
|
12072
12064
|
xe,
|
|
12073
12065
|
Ke,
|
|
12074
|
-
|
|
12066
|
+
Ve,
|
|
12075
12067
|
Bo,
|
|
12076
12068
|
{
|
|
12077
12069
|
kind: "category",
|
|
@@ -12131,7 +12123,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12131
12123
|
$e,
|
|
12132
12124
|
xe,
|
|
12133
12125
|
Ke,
|
|
12134
|
-
|
|
12126
|
+
Ve,
|
|
12135
12127
|
{
|
|
12136
12128
|
kind: "category",
|
|
12137
12129
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12178,7 +12170,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12178
12170
|
$e,
|
|
12179
12171
|
xe,
|
|
12180
12172
|
Ke,
|
|
12181
|
-
|
|
12173
|
+
Ve,
|
|
12182
12174
|
{
|
|
12183
12175
|
kind: "category",
|
|
12184
12176
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
@@ -12250,7 +12242,7 @@ const Le = { name: "COMPUTE_MISC_CATEGORY", callback: xc }, Ue = {
|
|
|
12250
12242
|
$e,
|
|
12251
12243
|
xe,
|
|
12252
12244
|
Ke,
|
|
12253
|
-
|
|
12245
|
+
Ve,
|
|
12254
12246
|
Bo,
|
|
12255
12247
|
{
|
|
12256
12248
|
kind: "category",
|
|
@@ -12448,7 +12440,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12448
12440
|
width: "56px",
|
|
12449
12441
|
height: "calc(100% - 49px)",
|
|
12450
12442
|
zIndex: 999
|
|
12451
|
-
})),
|
|
12443
|
+
})), Ut = H(() => ({
|
|
12452
12444
|
position: "absolute",
|
|
12453
12445
|
top: "0px",
|
|
12454
12446
|
right: "0px",
|
|
@@ -12520,7 +12512,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12520
12512
|
d.workspace.setIsReadOnly(s.value), d.workspace.isReadOnly() && (Ht.value = !1);
|
|
12521
12513
|
}, vn = () => {
|
|
12522
12514
|
d.workspace.setScale(a.value);
|
|
12523
|
-
},
|
|
12515
|
+
}, Uo = () => {
|
|
12524
12516
|
d.workspace.fireChangeListener(new ao());
|
|
12525
12517
|
}, Cn = () => {
|
|
12526
12518
|
r.value?.cleanWorkspace();
|
|
@@ -12530,9 +12522,9 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12530
12522
|
u.value && (u.value.open = !0);
|
|
12531
12523
|
};
|
|
12532
12524
|
return Bn(() => {
|
|
12533
|
-
|
|
12525
|
+
Vt.on("cleanWorkspace", Cn), Vt.on("toggleBlocklyLock", kn), Vt.on("openBlocklyNavigator", Nn);
|
|
12534
12526
|
}), bn(() => {
|
|
12535
|
-
|
|
12527
|
+
Vt.off("cleanWorkspace", Cn), Vt.off("toggleBlocklyLock", kn), Vt.off("openBlocklyNavigator", Nn);
|
|
12536
12528
|
}), Gt(
|
|
12537
12529
|
() => t.locale,
|
|
12538
12530
|
(P) => {
|
|
@@ -12555,10 +12547,10 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12555
12547
|
save: Ro,
|
|
12556
12548
|
generateCode: Do,
|
|
12557
12549
|
generateReactivity: Mo,
|
|
12558
|
-
fireStateChange:
|
|
12550
|
+
fireStateChange: Uo
|
|
12559
12551
|
}), (P, Bt) => {
|
|
12560
12552
|
const Ge = K("v-icon"), re = K("x-loading");
|
|
12561
|
-
return
|
|
12553
|
+
return V(), lt("div", qc, [
|
|
12562
12554
|
Q("div", {
|
|
12563
12555
|
id: l,
|
|
12564
12556
|
ref_key: "blocklyDiv",
|
|
@@ -12570,42 +12562,42 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12570
12562
|
}, [
|
|
12571
12563
|
vs(P.$slots, "bottom")
|
|
12572
12564
|
], 4),
|
|
12573
|
-
m.value ? (
|
|
12565
|
+
m.value ? (V(), lt("div", {
|
|
12574
12566
|
key: 0,
|
|
12575
12567
|
class: "d-flex flex-column justify-center align-center",
|
|
12576
12568
|
style: ot(D.value)
|
|
12577
12569
|
}, [
|
|
12578
|
-
|
|
12570
|
+
U(Ge, {
|
|
12579
12571
|
icon: "mdi-delete",
|
|
12580
12572
|
size: "x-large"
|
|
12581
12573
|
})
|
|
12582
12574
|
], 4)) : Et("", !0),
|
|
12583
|
-
f.value ? Et("", !0) : (
|
|
12575
|
+
f.value ? Et("", !0) : (V(), lt("div", {
|
|
12584
12576
|
key: 1,
|
|
12585
12577
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12586
|
-
style: ot(
|
|
12578
|
+
style: ot(Ut.value)
|
|
12587
12579
|
}, [
|
|
12588
|
-
|
|
12580
|
+
U(ic, {
|
|
12589
12581
|
ref_key: "clean",
|
|
12590
12582
|
ref: r,
|
|
12591
12583
|
lock: s.value
|
|
12592
12584
|
}, null, 8, ["lock"]),
|
|
12593
|
-
|
|
12585
|
+
U(ac, {
|
|
12594
12586
|
modelValue: s.value,
|
|
12595
|
-
"onUpdate:modelValue": Bt[0] || (Bt[0] = (
|
|
12587
|
+
"onUpdate:modelValue": Bt[0] || (Bt[0] = (Vo) => s.value = Vo)
|
|
12596
12588
|
}, null, 8, ["modelValue"]),
|
|
12597
|
-
|
|
12589
|
+
U(Tc, {
|
|
12598
12590
|
ref_key: "navigator",
|
|
12599
12591
|
ref: u,
|
|
12600
12592
|
lock: s.value,
|
|
12601
12593
|
type: T.value
|
|
12602
12594
|
}, null, 8, ["lock", "type"])
|
|
12603
12595
|
], 4)),
|
|
12604
|
-
s.value ? (
|
|
12596
|
+
s.value ? (V(), lt("div", {
|
|
12605
12597
|
key: 2,
|
|
12606
12598
|
style: ot(nt.value)
|
|
12607
12599
|
}, null, 4)) : Et("", !0),
|
|
12608
|
-
s.value ? (
|
|
12600
|
+
s.value ? (V(), lt("div", {
|
|
12609
12601
|
key: 3,
|
|
12610
12602
|
style: ot(He.value)
|
|
12611
12603
|
}, null, 4)) : Et("", !0),
|
|
@@ -12614,7 +12606,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12614
12606
|
ref: _,
|
|
12615
12607
|
style: ot(yn.value)
|
|
12616
12608
|
}, null, 4),
|
|
12617
|
-
|
|
12609
|
+
U(re, {
|
|
12618
12610
|
open: f.value,
|
|
12619
12611
|
"z-index": 99
|
|
12620
12612
|
}, null, 8, ["open"])
|
|
@@ -12632,13 +12624,13 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12632
12624
|
const n = is.component, { backgroundColor2: o } = oe();
|
|
12633
12625
|
return (s, a) => {
|
|
12634
12626
|
const c = K("v-sheet");
|
|
12635
|
-
return
|
|
12627
|
+
return V(), dt(c, {
|
|
12636
12628
|
color: F(o),
|
|
12637
12629
|
height: "100%",
|
|
12638
12630
|
width: "100%"
|
|
12639
12631
|
}, {
|
|
12640
12632
|
default: ht(() => [
|
|
12641
|
-
|
|
12633
|
+
U(F(n), {
|
|
12642
12634
|
code: e.code,
|
|
12643
12635
|
language: "js"
|
|
12644
12636
|
}, null, 8, ["code"])
|
|
@@ -12661,7 +12653,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12661
12653
|
}, { open: p } = fn("sourceDlg", l);
|
|
12662
12654
|
return (_, r) => {
|
|
12663
12655
|
const u = K("v-sheet"), d = K("v-btn"), f = K("v-spacer"), m = K("v-dialog");
|
|
12664
|
-
return
|
|
12656
|
+
return V(), dt(m, {
|
|
12665
12657
|
modelValue: F(p),
|
|
12666
12658
|
"onUpdate:modelValue": r[1] || (r[1] = (T) => pe(p) ? p.value = T : null),
|
|
12667
12659
|
fullscreen: "",
|
|
@@ -12671,31 +12663,31 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12671
12663
|
onKeydown: r[2] || (r[2] = io(Jt((T) => p.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
12672
12664
|
}, {
|
|
12673
12665
|
default: ht(() => [
|
|
12674
|
-
|
|
12666
|
+
U(u, {
|
|
12675
12667
|
color: F(o),
|
|
12676
12668
|
height: "100%",
|
|
12677
12669
|
width: "100%"
|
|
12678
12670
|
}, {
|
|
12679
12671
|
default: ht(() => [
|
|
12680
|
-
F(n) ? (
|
|
12672
|
+
F(n) ? (V(), dt(u, {
|
|
12681
12673
|
key: 0,
|
|
12682
12674
|
color: F(s),
|
|
12683
12675
|
height: 24
|
|
12684
12676
|
}, null, 8, ["color"])) : Et("", !0),
|
|
12685
|
-
|
|
12677
|
+
U(u, {
|
|
12686
12678
|
class: "d-flex align-center px-2",
|
|
12687
12679
|
color: F(s),
|
|
12688
12680
|
height: 48
|
|
12689
12681
|
}, {
|
|
12690
12682
|
default: ht(() => [
|
|
12691
|
-
|
|
12683
|
+
U(d, {
|
|
12692
12684
|
density: "comfortable",
|
|
12693
12685
|
icon: "mdi-close",
|
|
12694
12686
|
variant: "text",
|
|
12695
12687
|
onClick: r[0] || (r[0] = (T) => p.value = !1)
|
|
12696
12688
|
}),
|
|
12697
12689
|
Q("span", Zc, zt(F(e)("x-block-lib.dlg.source.title")), 1),
|
|
12698
|
-
|
|
12690
|
+
U(f)
|
|
12699
12691
|
]),
|
|
12700
12692
|
_: 1
|
|
12701
12693
|
}, 8, ["color"]),
|
|
@@ -12703,7 +12695,7 @@ const qc = { class: "position-relative w-100 h-100" }, Qc = /* @__PURE__ */ mt({
|
|
|
12703
12695
|
style: ot(c.value)
|
|
12704
12696
|
}, [
|
|
12705
12697
|
Q("div", tr, [
|
|
12706
|
-
|
|
12698
|
+
U(zc, { code: a.value }, null, 8, ["code"])
|
|
12707
12699
|
])
|
|
12708
12700
|
], 4)
|
|
12709
12701
|
]),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-block-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vue-router": "^4.6.4",
|
|
39
39
|
"vuetify": "^3.11.6",
|
|
40
40
|
"x-essential-lib": "^0.9.20",
|
|
41
|
-
"x-runtime-lib": "^0.8.
|
|
41
|
+
"x-runtime-lib": "^0.8.165",
|
|
42
42
|
"x-state-lib": "^0.3.34"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|