@opentiny/tiny-engine-setting-events 2.0.0-alpha.4 → 2.0.0-alpha.6
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 +61 -61
- package/dist/style.css +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as j, reactive as q, provide as we, resolveComponent as E, openBlock as _, createBlock as w, withCtx as y, createElementVNode as t, createVNode as m, createTextVNode as S, resolveDynamicComponent as ue, nextTick as Se, unref as P, computed as K, watchEffect as ye, createElementBlock as N, Fragment as $, renderList as ee, normalizeClass as z, toDisplayString as B, withDirectives as
|
|
2
|
+
import { ref as j, reactive as q, provide as we, resolveComponent as E, openBlock as _, createBlock as w, withCtx as y, createElementVNode as t, createVNode as m, createTextVNode as S, resolveDynamicComponent as ue, nextTick as Se, unref as P, computed as K, watchEffect as ye, createElementBlock as N, Fragment as $, renderList as ee, normalizeClass as z, toDisplayString as B, withDirectives as ge, createCommentVNode as X, vShow as fe, watch as ve, inject as xe } from "vue";
|
|
3
3
|
import { Button as H, DialogBox as ke, Form as Oe, FormItem as _e, Input as ne, Popover as Le, Tooltip as Te, Collapse as Ue, CollapseItem as he, Checkbox as ze, Search as je } from "@opentiny/vue";
|
|
4
4
|
import { getMergeMeta as Ve, useLayout as Ce, useCanvas as Y, getMetaApi as Z, META_APP as G, getOptions as Re, useHistory as Je, useBlock as Fe, useMaterial as Xe, useModal as $e, useProperties as D } from "@opentiny/tiny-engine-meta-register";
|
|
5
5
|
import { BlockLinkEvent as Ke, SvgButton as He, VueMonaco as Ye } from "@opentiny/tiny-engine-common";
|
|
@@ -37,7 +37,7 @@ const oe = {
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
setup(p) {
|
|
40
|
-
const { BindEventsDialogSidebar: o, BindEventsDialogContent: a } = Ve(oe.id).components, { PLUGIN_NAME: e, activePlugin: s } = Ce(), { pageState: h } = Y(), { getMethods: b, saveMethod:
|
|
40
|
+
const { BindEventsDialogSidebar: o, BindEventsDialogContent: a } = Ve(oe.id).components, { PLUGIN_NAME: e, activePlugin: s } = Ce(), { pageState: h } = Y(), { getMethods: b, saveMethod: f, highlightMethod: l } = Z(G.Page), i = q({
|
|
41
41
|
editorContent: "",
|
|
42
42
|
bindMethodInfo: {},
|
|
43
43
|
tip: "",
|
|
@@ -65,7 +65,7 @@ const oe = {
|
|
|
65
65
|
}), I && i.enableExtraParams && (k[v].params = I), k[v].value = `this.${M}`, Je().addHistory();
|
|
66
66
|
}, r = () => {
|
|
67
67
|
i.tipError = !1, i.tip = "", i.isValidParams = !0;
|
|
68
|
-
},
|
|
68
|
+
}, g = () => {
|
|
69
69
|
let d = "";
|
|
70
70
|
if (i.enableExtraParams)
|
|
71
71
|
try {
|
|
@@ -104,7 +104,7 @@ const oe = {
|
|
|
104
104
|
confirm: async () => {
|
|
105
105
|
if (i.tipError)
|
|
106
106
|
return;
|
|
107
|
-
let d = "event", v =
|
|
107
|
+
let d = "event", v = g(), k = d;
|
|
108
108
|
if (!i.isValidParams)
|
|
109
109
|
return;
|
|
110
110
|
v && (d = v.join(","), k = c(v)), n({ ...i.bindMethodInfo, params: d, extra: v });
|
|
@@ -112,7 +112,7 @@ const oe = {
|
|
|
112
112
|
name: I,
|
|
113
113
|
content: i.enableExtraParams ? `function ${I}(eventArgs,${k}) ${M}` : `function ${I}(${k}) ${M}`
|
|
114
114
|
}, { beforeSaveMethod: C } = Re(oe.id);
|
|
115
|
-
typeof C == "function" && await C(A, i.bindMethodInfo),
|
|
115
|
+
typeof C == "function" && await C(A, i.bindMethodInfo), f == null || f(A), J(), Ee();
|
|
116
116
|
},
|
|
117
117
|
closeDialog: () => {
|
|
118
118
|
r(), Ee();
|
|
@@ -126,8 +126,8 @@ const oe = {
|
|
|
126
126
|
}
|
|
127
127
|
}, ln = { class: "bind-event-dialog-content" }, dn = { class: "bind-dialog-footer" };
|
|
128
128
|
function rn(p, o, a, e, s, h) {
|
|
129
|
-
const b = E("tiny-button"),
|
|
130
|
-
return _(), w(
|
|
129
|
+
const b = E("tiny-button"), f = E("tiny-dialog-box");
|
|
130
|
+
return _(), w(f, {
|
|
131
131
|
visible: e.dialogVisible,
|
|
132
132
|
title: "事件绑定",
|
|
133
133
|
width: "50%",
|
|
@@ -169,7 +169,7 @@ function rn(p, o, a, e, s, h) {
|
|
|
169
169
|
_: 1
|
|
170
170
|
}, 8, ["visible", "onClose", "onOpened"]);
|
|
171
171
|
}
|
|
172
|
-
const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-
|
|
172
|
+
const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c"]]), mn = {
|
|
173
173
|
onClick: {
|
|
174
174
|
label: {
|
|
175
175
|
zh_CN: "点击事件"
|
|
@@ -339,7 +339,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
339
339
|
], un = (p) => !!pn.map((a) => {
|
|
340
340
|
let e = a[2].toUpperCase();
|
|
341
341
|
return `${a.substring(0, 2)}${e}${a.substring(3)}`;
|
|
342
|
-
}).includes(p),
|
|
342
|
+
}).includes(p), gn = { class: "footer" }, fn = {
|
|
343
343
|
__name: "AddEventsDialog",
|
|
344
344
|
props: {
|
|
345
345
|
visible: {
|
|
@@ -356,7 +356,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
356
356
|
const a = p, e = o, s = q({
|
|
357
357
|
eventDescription: "",
|
|
358
358
|
eventName: ""
|
|
359
|
-
}), h = j(null),
|
|
359
|
+
}), h = j(null), f = {
|
|
360
360
|
eventDescription: [
|
|
361
361
|
{
|
|
362
362
|
required: !0,
|
|
@@ -398,7 +398,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
398
398
|
onClose: l
|
|
399
399
|
}, {
|
|
400
400
|
footer: y(() => [
|
|
401
|
-
t("div",
|
|
401
|
+
t("div", gn, [
|
|
402
402
|
m(P(H), { onClick: l }, {
|
|
403
403
|
default: y(() => n[2] || (n[2] = [
|
|
404
404
|
S(" 取消")
|
|
@@ -421,7 +421,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
421
421
|
ref_key: "ruleForm",
|
|
422
422
|
ref: h,
|
|
423
423
|
model: s,
|
|
424
|
-
rules:
|
|
424
|
+
rules: f,
|
|
425
425
|
"label-width": "100px",
|
|
426
426
|
"inline-message": !0,
|
|
427
427
|
"validate-type": "text",
|
|
@@ -463,7 +463,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
463
463
|
_: 1
|
|
464
464
|
}, 8, ["visible"]));
|
|
465
465
|
}
|
|
466
|
-
}, vn = /* @__PURE__ */ R(
|
|
466
|
+
}, vn = /* @__PURE__ */ R(fn, [["__scopeId", "data-v-46f7fc7a"]]), _n = {
|
|
467
467
|
components: {
|
|
468
468
|
BlockLinkEvent: Ke,
|
|
469
469
|
BindEventsDialog: cn,
|
|
@@ -475,7 +475,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
475
475
|
},
|
|
476
476
|
inheritAttrs: !1,
|
|
477
477
|
setup() {
|
|
478
|
-
const { PLUGIN_NAME: p, activePlugin: o } = Ce(), { pageState: a } = Y(), { getBlockEvents: e, getCurrentBlock: s, removeEventLink: h } = Fe(), { getMaterial: b } = Xe(), { confirm:
|
|
478
|
+
const { PLUGIN_NAME: p, activePlugin: o } = Ce(), { pageState: a } = Y(), { getBlockEvents: e, getCurrentBlock: s, removeEventLink: h } = Fe(), { getMaterial: b } = Xe(), { confirm: f } = $e(), { highlightMethod: l } = Z(G.Page), { commonEvents: i = {} } = Ve("engine.setting.event").options, u = q({
|
|
479
479
|
eventName: "",
|
|
480
480
|
// 事件名称
|
|
481
481
|
eventBinding: null,
|
|
@@ -511,7 +511,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
511
511
|
}
|
|
512
512
|
});
|
|
513
513
|
});
|
|
514
|
-
const
|
|
514
|
+
const g = (x, d) => {
|
|
515
515
|
d && u.bindActions[x.eventName] || (u.eventBinding = x, sn());
|
|
516
516
|
}, c = (x) => {
|
|
517
517
|
var v;
|
|
@@ -522,7 +522,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
522
522
|
isBlock: n,
|
|
523
523
|
isEmpty: r,
|
|
524
524
|
delEvent: (x) => {
|
|
525
|
-
|
|
525
|
+
f({
|
|
526
526
|
title: "提示",
|
|
527
527
|
message: `您确定要删除事件 ${x.eventName} 吗?`,
|
|
528
528
|
exec() {
|
|
@@ -535,7 +535,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
535
535
|
l && l(x.ref);
|
|
536
536
|
});
|
|
537
537
|
},
|
|
538
|
-
openActionDialog:
|
|
538
|
+
openActionDialog: g,
|
|
539
539
|
handleAddEvent: (x) => {
|
|
540
540
|
const { eventName: d, eventDescription: v } = x;
|
|
541
541
|
Object.assign(u.componentEvents, {
|
|
@@ -562,7 +562,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-d94a26d5
|
|
|
562
562
|
}
|
|
563
563
|
}, hn = { class: "bind-action-list" }, bn = { class: "popover-head" }, En = { class: "bind-event-list" }, yn = ["onClick"], xn = { class: "bind-actions" }, kn = { class: "action-item bind-action-item" }, Vn = ["onClick"], Cn = { class: "event-bind" }, Dn = { class: "action-buttons" }, Nn = { class: "empty-action" }, In = { class: "icon" };
|
|
564
564
|
function An(p, o, a, e, s, h) {
|
|
565
|
-
const b = E("icon-chevron-down"),
|
|
565
|
+
const b = E("icon-chevron-down"), f = E("tiny-button"), l = E("tiny-popover"), i = E("svg-icon"), u = E("block-link-event"), n = E("svg-button"), r = E("bind-events-dialog"), g = E("add-events-dialog");
|
|
566
566
|
return _(), N($, null, [
|
|
567
567
|
t("div", hn, [
|
|
568
568
|
t("div", bn, [
|
|
@@ -575,7 +575,7 @@ function An(p, o, a, e, s, h) {
|
|
|
575
575
|
"visible-arrow": !1
|
|
576
576
|
}, {
|
|
577
577
|
reference: y(() => [
|
|
578
|
-
m(
|
|
578
|
+
m(f, { class: "bind-event-btn" }, {
|
|
579
579
|
default: y(() => [
|
|
580
580
|
o[2] || (o[2] = t("span", null, "绑定事件", -1)),
|
|
581
581
|
m(b, { class: "icon-chevron-down" })
|
|
@@ -599,7 +599,7 @@ function An(p, o, a, e, s, h) {
|
|
|
599
599
|
]),
|
|
600
600
|
_: 1
|
|
601
601
|
}),
|
|
602
|
-
m(
|
|
602
|
+
m(f, {
|
|
603
603
|
class: "title add-custom-event-button bind-action-button-item",
|
|
604
604
|
onClick: o[0] || (o[0] = (c) => e.handleToggleAddEventDialog(!0))
|
|
605
605
|
}, {
|
|
@@ -613,7 +613,7 @@ function An(p, o, a, e, s, h) {
|
|
|
613
613
|
_: 1
|
|
614
614
|
})
|
|
615
615
|
]),
|
|
616
|
-
|
|
616
|
+
ge(t("ul", xn, [
|
|
617
617
|
(_(!0), N($, null, ee(e.state.bindActions, (c) => (_(), N("li", {
|
|
618
618
|
key: c.eventName
|
|
619
619
|
}, [
|
|
@@ -658,9 +658,9 @@ function An(p, o, a, e, s, h) {
|
|
|
658
658
|
])
|
|
659
659
|
]))), 128))
|
|
660
660
|
], 512), [
|
|
661
|
-
[
|
|
661
|
+
[fe, !e.isEmpty]
|
|
662
662
|
]),
|
|
663
|
-
|
|
663
|
+
ge(t("div", Nn, [
|
|
664
664
|
t("div", In, [
|
|
665
665
|
m(i, {
|
|
666
666
|
name: "empty-action",
|
|
@@ -669,13 +669,13 @@ function An(p, o, a, e, s, h) {
|
|
|
669
669
|
]),
|
|
670
670
|
o[4] || (o[4] = t("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
|
|
671
671
|
], 512), [
|
|
672
|
-
[
|
|
672
|
+
[fe, e.isEmpty]
|
|
673
673
|
])
|
|
674
674
|
]),
|
|
675
675
|
m(r, {
|
|
676
676
|
eventBinding: e.state.eventBinding
|
|
677
677
|
}, null, 8, ["eventBinding"]),
|
|
678
|
-
m(
|
|
678
|
+
m(g, {
|
|
679
679
|
visible: e.state.showBindEventDialog,
|
|
680
680
|
componentEvents: e.state.componentEvents,
|
|
681
681
|
onCloseDialog: o[1] || (o[1] = (c) => e.handleToggleAddEventDialog(!1)),
|
|
@@ -683,7 +683,7 @@ function An(p, o, a, e, s, h) {
|
|
|
683
683
|
}, null, 8, ["visible", "componentEvents", "onAddEvent"])
|
|
684
684
|
], 64);
|
|
685
685
|
}
|
|
686
|
-
const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-
|
|
686
|
+
const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70"]]), { DEFAULT_LOOP_NAME: T } = on, { string2Obj: Bn } = tn, Mn = {
|
|
687
687
|
components: {
|
|
688
688
|
SwitchConfigurator: We,
|
|
689
689
|
TinyTooltip: Te,
|
|
@@ -716,8 +716,8 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-590058c8
|
|
|
716
716
|
ve(
|
|
717
717
|
() => [p == null ? void 0 : p.currentSchema, s.shouldUpdate],
|
|
718
718
|
([n]) => {
|
|
719
|
-
var r,
|
|
720
|
-
o.value = (n == null ? void 0 : n.condition) === void 0 ? !0 : n == null ? void 0 : n.condition, s.loopData = n == null ? void 0 : n.loop, s.loopItem = ((r = n == null ? void 0 : n.loopArgs) == null ? void 0 : r[0]) || "", s.loopIndex = ((
|
|
719
|
+
var r, g, c, V;
|
|
720
|
+
o.value = (n == null ? void 0 : n.condition) === void 0 ? !0 : n == null ? void 0 : n.condition, s.loopData = n == null ? void 0 : n.loop, s.loopItem = ((r = n == null ? void 0 : n.loopArgs) == null ? void 0 : r[0]) || "", s.loopIndex = ((g = n == null ? void 0 : n.loopArgs) == null ? void 0 : g[1]) || "", s.loopKey = ((V = (c = n == null ? void 0 : n.props) == null ? void 0 : c.key) == null ? void 0 : V.value) || "";
|
|
721
721
|
}
|
|
722
722
|
);
|
|
723
723
|
const h = (n = "") => {
|
|
@@ -725,10 +725,10 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-590058c8
|
|
|
725
725
|
const r = D().getSchema();
|
|
726
726
|
if (!r)
|
|
727
727
|
return;
|
|
728
|
-
const
|
|
728
|
+
const g = Number(n).toString() !== "NaN";
|
|
729
729
|
r.props = r.props || {};
|
|
730
730
|
const c = r.props;
|
|
731
|
-
n && !
|
|
731
|
+
n && !g && (c.key = {
|
|
732
732
|
type: F.JSEXPRESSION,
|
|
733
733
|
value: n
|
|
734
734
|
}), n || (s.isLoop ? c.key = {
|
|
@@ -742,14 +742,14 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-590058c8
|
|
|
742
742
|
const b = () => {
|
|
743
743
|
var n;
|
|
744
744
|
s.loopData = (n = D().getSchema()) == null ? void 0 : n.loop;
|
|
745
|
-
},
|
|
745
|
+
}, f = (n) => {
|
|
746
746
|
D().getSchema() && (n === !1 || n != null && n.type ? D().getSchema().condition = n : delete D().getSchema().condition, Y().canvasApi.value.updateRect(), o.value = n);
|
|
747
747
|
}, l = (n) => {
|
|
748
748
|
D().getSchema().loopArgs ? D().getSchema().loopArgs[1] = n || T.INDEX : D().getSchema().loopArgs = [T.ITEM, n];
|
|
749
749
|
};
|
|
750
750
|
return {
|
|
751
751
|
condition: o,
|
|
752
|
-
setConfig:
|
|
752
|
+
setConfig: f,
|
|
753
753
|
isBind: a,
|
|
754
754
|
state: s,
|
|
755
755
|
setLoop: (n) => {
|
|
@@ -768,7 +768,7 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-590058c8
|
|
|
768
768
|
}, wn = { class: "advanced-config-container" }, Sn = { class: "advnce-config" }, On = { class: "advanced-config-form-item" }, Ln = ["title"], Tn = { class: "advnce-config" }, Un = { class: "advanced-config-form-item" }, zn = ["title"], jn = { class: "advnce-config" }, Rn = { class: "advanced-config-form-item" }, Jn = { class: "advnce-config" }, Fn = { class: "advanced-config-form-item" }, Xn = { class: "advnce-config" }, $n = { class: "advanced-config-form-item" };
|
|
769
769
|
function Kn(p, o, a, e, s, h) {
|
|
770
770
|
var n, r;
|
|
771
|
-
const b = E("switch-configurator"),
|
|
771
|
+
const b = E("switch-configurator"), f = E("variable-configurator"), l = E("code-configurator"), i = E("input-configurator"), u = E("tiny-tooltip");
|
|
772
772
|
return _(), N("div", wn, [
|
|
773
773
|
t("div", Sn, [
|
|
774
774
|
o[6] || (o[6] = t("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
|
|
@@ -782,10 +782,10 @@ function Kn(p, o, a, e, s, h) {
|
|
|
782
782
|
modelValue: e.condition,
|
|
783
783
|
"onUpdate:modelValue": e.setConfig
|
|
784
784
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])),
|
|
785
|
-
m(
|
|
785
|
+
m(f, {
|
|
786
786
|
modelValue: e.condition,
|
|
787
787
|
"onUpdate:modelValue": [
|
|
788
|
-
o[0] || (o[0] = (
|
|
788
|
+
o[0] || (o[0] = (g) => e.condition = g),
|
|
789
789
|
e.setConfig
|
|
790
790
|
],
|
|
791
791
|
name: "advance"
|
|
@@ -803,16 +803,16 @@ function Kn(p, o, a, e, s, h) {
|
|
|
803
803
|
key: 0,
|
|
804
804
|
modelValue: e.state.loopData,
|
|
805
805
|
"onUpdate:modelValue": [
|
|
806
|
-
o[1] || (o[1] = (
|
|
806
|
+
o[1] || (o[1] = (g) => e.state.loopData = g),
|
|
807
807
|
e.setLoop
|
|
808
808
|
],
|
|
809
809
|
"data-type": "JSExpression",
|
|
810
810
|
onOpen: e.openEditor
|
|
811
811
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
|
|
812
|
-
m(
|
|
812
|
+
m(f, {
|
|
813
813
|
modelValue: e.state.loopData,
|
|
814
814
|
"onUpdate:modelValue": [
|
|
815
|
-
o[2] || (o[2] = (
|
|
815
|
+
o[2] || (o[2] = (g) => e.state.loopData = g),
|
|
816
816
|
e.setLoop
|
|
817
817
|
],
|
|
818
818
|
name: "advance"
|
|
@@ -825,7 +825,7 @@ function Kn(p, o, a, e, s, h) {
|
|
|
825
825
|
m(i, {
|
|
826
826
|
modelValue: e.state.loopItem,
|
|
827
827
|
"onUpdate:modelValue": [
|
|
828
|
-
o[3] || (o[3] = (
|
|
828
|
+
o[3] || (o[3] = (g) => e.state.loopItem = g),
|
|
829
829
|
e.setLoopItem
|
|
830
830
|
],
|
|
831
831
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
|
|
@@ -838,7 +838,7 @@ function Kn(p, o, a, e, s, h) {
|
|
|
838
838
|
m(i, {
|
|
839
839
|
modelValue: e.state.loopIndex,
|
|
840
840
|
"onUpdate:modelValue": [
|
|
841
|
-
o[4] || (o[4] = (
|
|
841
|
+
o[4] || (o[4] = (g) => e.state.loopIndex = g),
|
|
842
842
|
e.setLoopIndex
|
|
843
843
|
],
|
|
844
844
|
placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
|
|
@@ -853,7 +853,7 @@ function Kn(p, o, a, e, s, h) {
|
|
|
853
853
|
m(i, {
|
|
854
854
|
modelValue: e.state.loopKey,
|
|
855
855
|
"onUpdate:modelValue": [
|
|
856
|
-
o[5] || (o[5] = (
|
|
856
|
+
o[5] || (o[5] = (g) => e.state.loopKey = g),
|
|
857
857
|
e.setLoopKey
|
|
858
858
|
],
|
|
859
859
|
placeholder: `默认为索引名:${e.getIndexName()}`
|
|
@@ -865,7 +865,7 @@ function Kn(p, o, a, e, s, h) {
|
|
|
865
865
|
])
|
|
866
866
|
]);
|
|
867
867
|
}
|
|
868
|
-
const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-
|
|
868
|
+
const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3"]]), Yn = {
|
|
869
869
|
__name: "Main",
|
|
870
870
|
setup(p) {
|
|
871
871
|
const o = j(["bindEvent", "advancedConfig"]);
|
|
@@ -950,7 +950,7 @@ const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-df21aa0f
|
|
|
950
950
|
class: "params-tip"
|
|
951
951
|
};
|
|
952
952
|
function so(p, o, a, e, s, h) {
|
|
953
|
-
const b = E("tiny-input"),
|
|
953
|
+
const b = E("tiny-input"), f = E("tiny-checkbox"), l = E("monaco-editor");
|
|
954
954
|
return _(), N("div", Wn, [
|
|
955
955
|
t("div", {
|
|
956
956
|
class: z(["content-right-top", { "tip-error": e.context.tipError }])
|
|
@@ -972,7 +972,7 @@ function so(p, o, a, e, s, h) {
|
|
|
972
972
|
class: z(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
|
|
973
973
|
}, [
|
|
974
974
|
t("div", eo, [
|
|
975
|
-
m(
|
|
975
|
+
m(f, {
|
|
976
976
|
modelValue: e.context.enableExtraParams,
|
|
977
977
|
"onUpdate:modelValue": o[1] || (o[1] = (i) => e.context.enableExtraParams = i),
|
|
978
978
|
name: "tiny-checkbox"
|
|
@@ -1001,7 +1001,7 @@ function so(p, o, a, e, s, h) {
|
|
|
1001
1001
|
], 2)
|
|
1002
1002
|
]);
|
|
1003
1003
|
}
|
|
1004
|
-
const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-
|
|
1004
|
+
const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-49127432"]]), lo = {
|
|
1005
1005
|
components: {
|
|
1006
1006
|
TinySearch: je,
|
|
1007
1007
|
IconYes: Ze()
|
|
@@ -1013,24 +1013,24 @@ const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-6d82db74
|
|
|
1013
1013
|
}
|
|
1014
1014
|
},
|
|
1015
1015
|
setup(p) {
|
|
1016
|
-
const { getMethodNameList: o } = Z(G.Page), a = j(""), e = j([]), s = xe("context"), h = (
|
|
1017
|
-
const i =
|
|
1018
|
-
var
|
|
1019
|
-
return Number.parseInt((
|
|
1020
|
-
}).sort((r,
|
|
1016
|
+
const { getMethodNameList: o } = Z(G.Page), a = j(""), e = j([]), s = xe("context"), h = (f, l) => {
|
|
1017
|
+
const i = f.map((r) => {
|
|
1018
|
+
var g;
|
|
1019
|
+
return Number.parseInt((g = r.match(/\d+$/)) == null ? void 0 : g[0]) || 0;
|
|
1020
|
+
}).sort((r, g) => r - g).pop();
|
|
1021
1021
|
let n = `${(l == null ? void 0 : l.replace(qn, "_")) || ""}New`;
|
|
1022
1022
|
return i > -1 && (n += `${i + 1}`), n;
|
|
1023
|
-
}, b = (
|
|
1024
|
-
s.bindMethodInfo =
|
|
1023
|
+
}, b = (f) => {
|
|
1024
|
+
s.bindMethodInfo = f;
|
|
1025
1025
|
};
|
|
1026
1026
|
return ye(() => {
|
|
1027
|
-
var r,
|
|
1028
|
-
const
|
|
1027
|
+
var r, g;
|
|
1028
|
+
const f = (r = p.eventBinding) == null ? void 0 : r.eventName, l = (o == null ? void 0 : o().filter((c) => c.includes(f))) || [], u = {
|
|
1029
1029
|
title: "添加新方法",
|
|
1030
|
-
name: h(l,
|
|
1030
|
+
name: h(l, f),
|
|
1031
1031
|
type: De
|
|
1032
1032
|
};
|
|
1033
|
-
(
|
|
1033
|
+
(g = p.eventBinding) != null && g.ref ? b({ name: p.eventBinding.ref }) : b(u);
|
|
1034
1034
|
const n = (o == null ? void 0 : o().filter((c) => c.includes(a.value)).map((c) => ({ name: c }))) || [];
|
|
1035
1035
|
e.value = [u, ...n];
|
|
1036
1036
|
}), {
|
|
@@ -1041,8 +1041,8 @@ const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-6d82db74
|
|
|
1041
1041
|
};
|
|
1042
1042
|
}
|
|
1043
1043
|
}, ro = { class: "dialog-content-left" }, co = { class: "left-list-wrap" }, mo = { class: "left-action-list" }, po = { class: "action-list-wrap" }, uo = ["onClick"];
|
|
1044
|
-
function
|
|
1045
|
-
const b = E("tiny-search"),
|
|
1044
|
+
function go(p, o, a, e, s, h) {
|
|
1045
|
+
const b = E("tiny-search"), f = E("icon-yes");
|
|
1046
1046
|
return _(), N("div", ro, [
|
|
1047
1047
|
o[1] || (o[1] = t("div", { class: "left-title" }, "响应方法", -1)),
|
|
1048
1048
|
t("div", co, [
|
|
@@ -1061,7 +1061,7 @@ function fo(p, o, a, e, s, h) {
|
|
|
1061
1061
|
class: z(["action-name", { active: l.name === e.context.bindMethodInfo.name }])
|
|
1062
1062
|
}, [
|
|
1063
1063
|
S(B(l.title || l.name) + " ", 1),
|
|
1064
|
-
l.name === e.context.bindMethodInfo.name ? (_(), w(
|
|
1064
|
+
l.name === e.context.bindMethodInfo.name ? (_(), w(f, {
|
|
1065
1065
|
key: 0,
|
|
1066
1066
|
class: "action-selected-icon"
|
|
1067
1067
|
})) : X("", !0)
|
|
@@ -1072,14 +1072,14 @@ function fo(p, o, a, e, s, h) {
|
|
|
1072
1072
|
])
|
|
1073
1073
|
]);
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const fo = /* @__PURE__ */ R(lo, [["render", go], ["__scopeId", "data-v-419ba375"]]), Do = {
|
|
1076
1076
|
...oe,
|
|
1077
1077
|
entry: Yn,
|
|
1078
1078
|
options: {
|
|
1079
1079
|
commonEvents: mn
|
|
1080
1080
|
},
|
|
1081
1081
|
components: {
|
|
1082
|
-
BindEventsDialogSidebar:
|
|
1082
|
+
BindEventsDialogSidebar: fo,
|
|
1083
1083
|
BindEventsDialogContent: ao
|
|
1084
1084
|
}
|
|
1085
1085
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bind-event-dialog[data-v-
|
|
1
|
+
.bind-event-dialog[data-v-98e32e3c]{z-index:99}.bind-event-dialog[data-v-98e32e3c] .tiny-dialog-box{min-width:760px}.bind-event-dialog-tip[data-v-98e32e3c]{padding:var(--te-common-vertical-item-spacing-normal) 14px;margin-bottom:var(--te-common-vertical-item-spacing-normal);background-color:var(--te-common-bg-container);color:var(--te-common-text-weaken)}.bind-event-dialog-content[data-v-98e32e3c]{display:flex;min-width:700px}.add-custom-event-form[data-v-46f7fc7a] .tiny-form-item__label{padding-left:0}.footer[data-v-46f7fc7a]{display:flex;justify-content:flex-end}.custom-event[data-v-84d4be70]{padding:10px 20px 10px 10px}.custom-event footer[data-v-84d4be70]{text-align:center}.bind-action-list .bind-actions[data-v-84d4be70]{margin-top:20px}.bind-action-list .bind-actions .binding-name[data-v-84d4be70]{word-break:break-all}.bind-action-list .bind-actions .action-buttons[data-v-84d4be70]{display:flex;align-items:center;justify-content:center}.bind-action-list .bind-actions .action-buttons .item[data-v-84d4be70]{margin-right:10px}.bind-action-list .bind-actions .event-bind[data-v-84d4be70]{color:var(--ti-lowcode-events-event-bind-color)}.bind-action-list .bind-actions .bind-action-item[data-v-84d4be70]{display:flex;justify-content:space-between;padding:8px 12px;cursor:pointer;color:var(--ti-lowcode-events-bind-action-item-color);border-bottom:1px solid var(--ti-lowcode-events-bind-action-item-border-color)}.bind-action-list .bind-actions .bind-action-item[data-v-84d4be70]:first-child{border-top:1px solid var(--ti-lowcode-events-bind-action-item-border-color)}.bind-action-list .bind-actions .bind-action-item[data-v-84d4be70]:hover{background:var(--ti-lowcode-events-bind-action-item-hover-bg-color)}.bind-action-list .bind-actions .bind-action-item .linked[data-v-84d4be70]{background-color:var(--ti-lowcode-events-bind-action-item-linked-bg-color);color:var(--ti-lowcode-events-bind-action-item-linked-color)}.bind-action-list .popover-head[data-v-84d4be70]{display:flex;justify-content:space-between;margin-top:12px}.bind-action-list .popover-head .bind-action-button-item[data-v-84d4be70]{width:50%}.bind-action-list .popover-head .bind-action-button-item[data-v-84d4be70]:not(:last-child){margin-right:12px}.bind-action-list .popover-head .add-custom-event-button[data-v-84d4be70]{padding:0 16px;font-size:12px;margin-right:0}.bind-action-list .popover-head .add-custom-event-button .custom-event-button-text[data-v-84d4be70]{display:inline-block;vertical-align:middle}.bind-action-list .popover-head .add-custom-event-button .custom-event-button-icon[data-v-84d4be70]{display:inline-block;vertical-align:middle;color:var(--ti-lowcode-events-custom-icon-color);font-size:13px}.bind-action-list .popover-head .bind-event-btn[data-v-84d4be70]{padding:0 16px;font-size:12px;width:100%}.bind-action-list .empty-action[data-v-84d4be70]{display:flex;flex-direction:column;align-items:center;background-color:var(--ti-lowcode-events-empty-action-bg-color);color:var(--ti-lowcode-events-empty-action-color);padding:24px 18px;margin-top:var(--te-common-vertical-item-spacing-normal)}.bind-action-list .empty-action .empty-action-icon[data-v-84d4be70]{font-size:48px}.bind-action-list .empty-action .icon[data-v-84d4be70]{text-align:center;opacity:.4}.bind-action-list .empty-action .center[data-v-84d4be70]{margin-top:4px}.bind-action-list .empty-action .text[data-v-84d4be70]{margin-top:12px}.bind-action-list .empty-action .empty-bind-event-tip[data-v-84d4be70]{color:var(--ti-lowcode-events-empty-action-tips-strong-color)}.bind-event-list[data-v-84d4be70]{padding:var(--te-common-vertical-item-spacing-normal) 0;color:var(--ti-lowcode-events-bind-event-list-color)}.bind-event-list-item-notallow[data-v-84d4be70]{cursor:not-allowed;pointer-events:none;color:var(--ti-lowcode-events-bind-event-list-item-disabled-color)}.bind-event-list-item[data-v-84d4be70]{padding:0 12px;line-height:24px}.bind-event-list-item[data-v-84d4be70]:hover{cursor:pointer;background:var(--lowcode-events-bind-event-list-item-hover-bg-color)}.add-custom-event-tip[data-v-84d4be70]{color:var(--ti-lowcode-events-add-custom-event-tips-color)}.add-custom-event-tip .event-tip-highlight[data-v-84d4be70]{color:var(--ti-lowcode-event-add-custom-event-tips-highlight-color)}.advanced-config-container .advnce-config[data-v-f59c13c3]{align-items:center;display:flex;column-gap:12px;color:var(--ti-lowcode-events-advanced-config-color)}.advanced-config-container .advnce-config[data-v-f59c13c3]:not(:last-child){margin-bottom:var(--te-common-vertical-item-spacing-normal)}.advanced-config-container .advnce-config label[data-v-f59c13c3]{width:80px;word-break:keep-all;color:var(--ti-lowcode-events-advanced-label-color);flex-shrink:0}.advanced-config-container .advnce-config .advanced-config-form-item[data-v-f59c13c3]{display:grid;grid-template-columns:1fr auto;flex:1}.advanced-config-container .advnce-config .binding-state[data-v-f59c13c3]{box-sizing:border-box;background:var(--ti-lowcode-events-advanced-binding-state-bg-color);color:var(--ti-lowcode-events-advanced-binding-state-color);font-size:12px;height:30px;line-height:22px;padding:4px 8px;--ellipsis-line: 1;border-radius:6px}.advanced-config-container .advnce-config .advance-config-loop-wrap .advance-item[data-v-f59c13c3]{width:100%}.content-right[data-v-49127432]{width:68%}.content-right .content-right-top .new-action-tip[data-v-49127432]{margin:8px 0;color:var(--ti-lowcode-bind-event-dialog-new-action-tip-color)}.content-right .content-right-bottom .content-right-monaco[data-v-49127432]{border:1px solid var(--ti-lowcode-bind-event-dialog-content-right-monaco-border-color);overflow:hidden;position:relative}.content-right .content-right-bottom .content-right-monaco .monaco-editor[data-v-49127432]{width:100%;height:216px;padding:12px 8px;color:var(--ti-lowcode-toolbar-breadcrumb-color)}.content-right .content-right-bottom .content-right-monaco .mark[data-v-49127432]{width:100%;height:216px;position:absolute;z-index:1;top:0;background-color:var(--ti-lowcode-bind-event-dialog-mark-bg-color)}.content-right .content-right-bottom .params-tip[data-v-49127432]{margin:8px 0;color:var(--ti-lowcode-error-tip-color)}.content-right .content-right-top .content-right-title[data-v-49127432],.content-right .content-right-bottom .content-right-title[data-v-49127432]{margin-bottom:var(--te-common-vertical-item-spacing-normal)}.content-right .content-right-top .content-right-title .set-params-tip[data-v-49127432],.content-right .content-right-bottom .content-right-title .set-params-tip[data-v-49127432]{margin-top:6px;font-weight:400;color:var(--te-common-text-weaken)}.content-right .tip-error .content-right-monaco[data-v-49127432]{border:1px solid var(--ti-lowcode-error-tip-color)}.content-right .tip-error .params-tip[data-v-49127432],.content-right .tip-error .new-action-tip[data-v-49127432]{color:var(--ti-lowcode-error-tip-color)}.dialog-content-left[data-v-419ba375]{margin-right:30px;width:30%;display:flex;flex-direction:column}.dialog-content-left .left-title[data-v-419ba375]{font-weight:400}.dialog-content-left .left-list-wrap[data-v-419ba375]{border:1px solid var(--ti-lowcode-bind-event-dialog-content-left-border-color);border-radius:4px;height:300px;margin-top:var(--te-common-vertical-item-spacing-normal);display:flex;flex:1}.dialog-content-left .left-list-wrap .left-action-list[data-v-419ba375]{flex:1;padding:12px}.dialog-content-left .left-list-wrap .left-action-list .action-list-wrap[data-v-419ba375]{height:250px;margin-top:8px;overflow:auto}.dialog-content-left .left-list-wrap .left-action-list .action-name[data-v-419ba375]{display:flex;justify-content:space-between;padding:8px 12px;cursor:pointer;color:var(--ti-lowcode-bind-event-dialog-color)}.dialog-content-left .left-list-wrap .left-action-list .action-name.active[data-v-419ba375]{background:var(--ti-lowcode-bind-event-dialog-content-left-list-item-active-bg-color)}.dialog-content-left .left-list-wrap .left-action-list .action-name .action-selected-icon[data-v-419ba375]{font-size:14px;color:var(--ti-lowcode-bind-event-dialog-action-selected-icon-color)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-setting-events",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.0.0-alpha.
|
|
29
|
-
"@opentiny/tiny-engine-configurator": "2.0.0-alpha.
|
|
30
|
-
"@opentiny/tiny-engine-meta-register": "2.0.0-alpha.
|
|
31
|
-
"@opentiny/tiny-engine-utils": "2.0.0-alpha.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.0.0-alpha.6",
|
|
29
|
+
"@opentiny/tiny-engine-configurator": "2.0.0-alpha.6",
|
|
30
|
+
"@opentiny/tiny-engine-meta-register": "2.0.0-alpha.6",
|
|
31
|
+
"@opentiny/tiny-engine-utils": "2.0.0-alpha.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.
|
|
34
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.6",
|
|
35
35
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
36
36
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
37
37
|
"vite": "^5.4.2"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@opentiny/vue-icon": "^3.14.0",
|
|
42
42
|
"vue": "^3.4.15"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "d283c5ad8392a581b64d51a4464cca68c24105e4"
|
|
45
45
|
}
|