@opentiny/tiny-engine-setting-events 2.0.0-rc.3 → 2.0.0

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 CHANGED
@@ -1,13 +1,14 @@
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 ge, createCommentVNode as X, vShow as fe, watch as ve, inject as xe } from "vue";
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
- 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
- import { BlockLinkEvent as Ke, SvgButton as He, VueMonaco as Ye } from "@opentiny/tiny-engine-common";
6
- import { iconChevronDown as qe, iconYes as Ze } from "@opentiny/vue-icon";
7
- import { string2Ast as be, ast2String as Ge } from "@opentiny/tiny-engine-common/js/ast";
8
- import { SwitchConfigurator as We, VariableConfigurator as Qe, InputConfigurator as en, CodeConfigurator as nn } from "@opentiny/tiny-engine-configurator";
2
+ import { ref as R, reactive as q, provide as Oe, resolveComponent as y, openBlock as _, createBlock as M, withCtx as x, createElementVNode as t, createVNode as m, createTextVNode as S, resolveDynamicComponent as fe, nextTick as Le, unref as P, computed as X, watchEffect as xe, createElementBlock as I, Fragment as H, renderList as ee, normalizeClass as z, toDisplayString as B, withDirectives as ge, createCommentVNode as K, vShow as ve, watch as _e, inject as ke } from "vue";
3
+ import { Button as $, DialogBox as Ve, Form as Te, FormItem as he, Input as ne, Popover as Ue, Tooltip as je, Collapse as ze, CollapseItem as be, Checkbox as Re, Search as Je } from "@opentiny/vue";
4
+ import { getMergeMeta as Ce, useLayout as De, useCanvas as Y, getMetaApi as Z, META_APP as G, getOptions as Fe, useHistory as Xe, useBlock as Ke, useMaterial as He, useModal as $e, useProperties as D } from "@opentiny/tiny-engine-meta-register";
5
+ import Ye from "@opentiny/tiny-engine-common/js/i18n";
6
+ import { BlockLinkEvent as qe, SvgButton as Ze, VueMonaco as Ge } from "@opentiny/tiny-engine-common";
7
+ import { iconChevronDown as We, iconYes as Qe } from "@opentiny/vue-icon";
8
+ import { string2Ast as Ee, ast2String as en } from "@opentiny/tiny-engine-common/js/ast";
9
+ import { SwitchConfigurator as nn, VariableConfigurator as on, InputConfigurator as tn, CodeConfigurator as sn } from "@opentiny/tiny-engine-configurator";
9
10
  import { PROP_DATA_TYPE as F } from "@opentiny/tiny-engine-common/js/constants";
10
- import { constants as on, utils as tn } from "@opentiny/tiny-engine-utils";
11
+ import { constants as an, utils as ln } from "@opentiny/tiny-engine-utils";
11
12
  const oe = {
12
13
  id: "engine.setting.event",
13
14
  title: "高级",
@@ -15,19 +16,19 @@ const oe = {
15
16
  align: "left",
16
17
  name: "event",
17
18
  icon: ""
18
- }, R = (p, o) => {
19
+ }, J = (p, o) => {
19
20
  const a = p.__vccOpts || p;
20
21
  for (const [e, s] of o)
21
22
  a[e] = s;
22
23
  return a;
23
- }, te = j(!1), sn = () => {
24
+ }, te = R(!1), dn = () => {
24
25
  te.value = !0;
25
- }, Ee = () => {
26
+ }, ye = () => {
26
27
  te.value = !1;
27
- }, an = {
28
+ }, rn = {
28
29
  components: {
29
- TinyButton: H,
30
- TinyDialogBox: ke
30
+ TinyButton: $,
31
+ TinyDialogBox: Ve
31
32
  },
32
33
  inheritAttrs: !1,
33
34
  props: {
@@ -37,7 +38,7 @@ const oe = {
37
38
  }
38
39
  },
39
40
  setup(p) {
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
+ const { BindEventsDialogSidebar: o, BindEventsDialogContent: a } = Ce(oe.id).components, { PLUGIN_NAME: e, activePlugin: s } = De(), { pageState: h } = Y(), { getMethods: b, saveMethod: f, highlightMethod: l } = Z(G.Page), i = q({
41
42
  editorContent: "",
42
43
  bindMethodInfo: {},
43
44
  tip: "",
@@ -45,54 +46,54 @@ const oe = {
45
46
  enableExtraParams: !1,
46
47
  isValidParams: !0
47
48
  });
48
- we("context", i);
49
- const u = (d) => {
50
- i.bindMethodInfo = d;
51
- }, n = (d) => {
49
+ Oe("context", i);
50
+ const E = (v) => {
51
+ i.bindMethodInfo = v;
52
+ }, n = (v) => {
52
53
  var A, C;
53
- if (!d)
54
- return;
55
- const v = (A = p.eventBinding) == null ? void 0 : A.eventName;
56
54
  if (!v)
57
55
  return;
58
- const k = (C = h == null ? void 0 : h.currentSchema) == null ? void 0 : C.props;
59
- if (!k)
56
+ const r = (A = p.eventBinding) == null ? void 0 : A.eventName;
57
+ if (!r)
58
+ return;
59
+ const g = (C = h == null ? void 0 : h.currentSchema) == null ? void 0 : C.props;
60
+ if (!g)
60
61
  return;
61
- const { name: M, extra: I } = d;
62
- p[v] || (k[v] = {
62
+ const { name: k, extra: N } = v;
63
+ p[r] || (g[r] = {
63
64
  type: "JSExpression",
64
65
  value: ""
65
- }), I && i.enableExtraParams && (k[v].params = I), k[v].value = `this.${M}`, Je().addHistory();
66
- }, r = () => {
66
+ }), N && i.enableExtraParams && (g[r].params = N), g[r].value = `this.${k}`, Xe().addHistory();
67
+ }, d = () => {
67
68
  i.tipError = !1, i.tip = "", i.isValidParams = !0;
68
- }, g = () => {
69
- let d = "";
69
+ }, u = () => {
70
+ let v = "";
70
71
  if (i.enableExtraParams)
71
72
  try {
72
- d = JSON.parse(i.editorContent), i.isValidParams = Array.isArray(d);
73
+ v = JSON.parse(i.editorContent), i.isValidParams = Array.isArray(v);
73
74
  } catch {
74
75
  i.isValidParams = !1;
75
76
  }
76
- return d;
77
- }, c = (d) => Array.from({ length: d.length }, (v, k) => `args${k}`).join(","), V = () => {
78
- var k, M, I, A;
79
- let d = (M = (k = b()) == null ? void 0 : k[i.bindMethodInfo.name]) == null ? void 0 : M.value, v = "{}";
80
- if (d) {
77
+ return v;
78
+ }, c = (v) => Array.from({ length: v.length }, (r, g) => `args${g}`).join(","), V = () => {
79
+ var g, k, N, A;
80
+ let v = (k = (g = b()) == null ? void 0 : g[i.bindMethodInfo.name]) == null ? void 0 : k.value, r = "{}";
81
+ if (v) {
81
82
  let C = {};
82
83
  try {
83
- C = be(d);
84
+ C = Ee(v);
84
85
  } catch {
85
- d = d.replace("function", `function ${i.bindMethodInfo.name}`), C = be(d);
86
+ v = v.replace("function", `function ${i.bindMethodInfo.name}`), C = Ee(v);
86
87
  }
87
- (A = (I = C == null ? void 0 : C.program) == null ? void 0 : I.body[0]) != null && A.body && (v = Ge(C.program.body[0].body));
88
+ (A = (N = C == null ? void 0 : C.program) == null ? void 0 : N.body[0]) != null && A.body && (r = en(C.program.body[0].body));
88
89
  }
89
- return v || `{
90
+ return r || `{
90
91
  }`;
91
- }, J = () => {
92
+ }, w = () => {
92
93
  s(e.Page).then(() => {
93
- Se(() => {
94
- var d;
95
- l && l((d = i.bindMethodInfo) == null ? void 0 : d.name);
94
+ Le(() => {
95
+ var v;
96
+ l && l((v = i.bindMethodInfo) == null ? void 0 : v.name);
96
97
  });
97
98
  });
98
99
  };
@@ -104,30 +105,30 @@ const oe = {
104
105
  confirm: async () => {
105
106
  if (i.tipError)
106
107
  return;
107
- let d = "event", v = g(), k = d;
108
+ let v = "event", r = u(), g = v;
108
109
  if (!i.isValidParams)
109
110
  return;
110
- v && (d = v.join(","), k = c(v)), n({ ...i.bindMethodInfo, params: d, extra: v });
111
- const M = V(), { name: I } = i.bindMethodInfo, A = {
112
- name: I,
113
- content: i.enableExtraParams ? `function ${I}(eventArgs,${k}) ${M}` : `function ${I}(${k}) ${M}`
114
- }, { beforeSaveMethod: C } = Re(oe.id);
115
- typeof C == "function" && await C(A, i.bindMethodInfo), f == null || f(A), J(), Ee();
111
+ r && (v = r.join(","), g = c(r)), n({ ...i.bindMethodInfo, params: v, extra: r });
112
+ const k = V(), { name: N } = i.bindMethodInfo, A = {
113
+ name: N,
114
+ content: i.enableExtraParams ? `function ${N}(eventArgs,${g}) ${k}` : `function ${N}(${g}) ${k}`
115
+ }, { beforeSaveMethod: C } = Fe(oe.id);
116
+ typeof C == "function" && await C(A, i.bindMethodInfo), f == null || f(A), w(), ye();
116
117
  },
117
118
  closeDialog: () => {
118
- r(), Ee();
119
+ d(), ye();
119
120
  },
120
121
  openedDialog: () => {
121
- var d, v, k;
122
- i.enableExtraParams = !!((v = (d = p.eventBinding) == null ? void 0 : d.params) != null && v.length), i.editorContent = JSON.stringify(((k = p.eventBinding) == null ? void 0 : k.params) || [], null, 2), r();
122
+ var v, r, g;
123
+ i.enableExtraParams = !!((r = (v = p.eventBinding) == null ? void 0 : v.params) != null && r.length), i.editorContent = JSON.stringify(((g = p.eventBinding) == null ? void 0 : g.params) || [], null, 2), d();
123
124
  },
124
- selectMethod: u
125
+ selectMethod: E
125
126
  };
126
127
  }
127
- }, ln = { class: "bind-event-dialog-content" }, dn = { class: "bind-dialog-footer" };
128
- function rn(p, o, a, e, s, h) {
129
- const b = E("tiny-button"), f = E("tiny-dialog-box");
130
- return _(), w(f, {
128
+ }, cn = { class: "bind-event-dialog-content" }, mn = { class: "bind-dialog-footer" };
129
+ function pn(p, o, a, e, s, h) {
130
+ const b = y("tiny-button"), f = y("tiny-dialog-box");
131
+ return _(), M(f, {
131
132
  visible: e.dialogVisible,
132
133
  title: "事件绑定",
133
134
  width: "50%",
@@ -137,10 +138,10 @@ function rn(p, o, a, e, s, h) {
137
138
  onClose: e.closeDialog,
138
139
  onOpened: e.openedDialog
139
140
  }, {
140
- footer: y(() => [
141
- t("div", dn, [
141
+ footer: x(() => [
142
+ t("div", mn, [
142
143
  m(b, { onClick: e.closeDialog }, {
143
- default: y(() => o[0] || (o[0] = [
144
+ default: x(() => o[0] || (o[0] = [
144
145
  S("取 消")
145
146
  ])),
146
147
  _: 1
@@ -149,27 +150,27 @@ function rn(p, o, a, e, s, h) {
149
150
  type: "info",
150
151
  onClick: e.confirm
151
152
  }, {
152
- default: y(() => o[1] || (o[1] = [
153
+ default: x(() => o[1] || (o[1] = [
153
154
  S("确 定")
154
155
  ])),
155
156
  _: 1
156
157
  }, 8, ["onClick"])
157
158
  ])
158
159
  ]),
159
- default: y(() => [
160
+ default: x(() => [
160
161
  o[2] || (o[2] = t("div", { class: "bind-event-dialog-tip" }, " 选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)。 ", -1)),
161
- t("div", ln, [
162
- (_(), w(ue(e.BindEventsDialogSidebar), {
162
+ t("div", cn, [
163
+ (_(), M(fe(e.BindEventsDialogSidebar), {
163
164
  dialogVisible: e.dialogVisible,
164
165
  eventBinding: a.eventBinding
165
166
  }, null, 8, ["dialogVisible", "eventBinding"])),
166
- (_(), w(ue(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
167
+ (_(), M(fe(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
167
168
  ])
168
169
  ]),
169
170
  _: 1
170
171
  }, 8, ["visible", "onClose", "onOpened"]);
171
172
  }
172
- const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c"]]), mn = {
173
+ const un = /* @__PURE__ */ J(rn, [["render", pn], ["__scopeId", "data-v-98e32e3c"]]), fn = {
173
174
  onClick: {
174
175
  label: {
175
176
  zh_CN: "点击事件"
@@ -226,7 +227,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
226
227
  },
227
228
  defaultValue: ""
228
229
  }
229
- }, pn = [
230
+ }, gn = [
230
231
  "onabort",
231
232
  "onafterprint",
232
233
  "onanimationend",
@@ -336,10 +337,10 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
336
337
  "onwebkitanimationstart",
337
338
  "onwebkittransitionend",
338
339
  "onwheel"
339
- ], un = (p) => !!pn.map((a) => {
340
+ ], vn = (p) => !!gn.map((a) => {
340
341
  let e = a[2].toUpperCase();
341
342
  return `${a.substring(0, 2)}${e}${a.substring(3)}`;
342
- }).includes(p), gn = { class: "footer" }, fn = {
343
+ }).includes(p), _n = { class: "footer" }, hn = {
343
344
  __name: "AddEventsDialog",
344
345
  props: {
345
346
  visible: {
@@ -356,7 +357,7 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
356
357
  const a = p, e = o, s = q({
357
358
  eventDescription: "",
358
359
  eventName: ""
359
- }), h = j(null), f = {
360
+ }), h = R(null), f = {
360
361
  eventDescription: [
361
362
  {
362
363
  required: !0,
@@ -366,30 +367,30 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
366
367
  eventName: [
367
368
  { required: !0, message: "必填" },
368
369
  {
369
- validator: (u, n, r) => {
370
+ validator: (E, n, d) => {
370
371
  if (a.componentEvents[s.eventName]) {
371
- r(new Error("事件名已存在"));
372
+ d(new Error("事件名已存在"));
372
373
  return;
373
374
  }
374
- if (!un(s.eventName)) {
375
- r(new Error("请输入正确的浏览器事件名"));
375
+ if (!vn(s.eventName)) {
376
+ d(new Error("请输入正确的浏览器事件名"));
376
377
  return;
377
378
  }
378
- r();
379
+ d();
379
380
  }
380
381
  }
381
382
  ]
382
383
  }, l = () => {
383
384
  e("closeDialog");
384
385
  }, i = () => {
385
- h.value && h.value.validate((u) => {
386
- if (!u)
386
+ h.value && h.value.validate((E) => {
387
+ if (!E)
387
388
  return;
388
- const { eventName: n, eventDescription: r } = s;
389
- e("addEvent", { eventName: n, eventDescription: r });
389
+ const { eventName: n, eventDescription: d } = s;
390
+ e("addEvent", { eventName: n, eventDescription: d });
390
391
  });
391
392
  };
392
- return (u, n) => (_(), w(P(ke), {
393
+ return (E, n) => (_(), M(P(Ve), {
393
394
  visible: p.visible,
394
395
  title: "添加新事件",
395
396
  width: "400px",
@@ -397,27 +398,27 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
397
398
  "close-on-click-modal": !1,
398
399
  onClose: l
399
400
  }, {
400
- footer: y(() => [
401
- t("div", gn, [
402
- m(P(H), { onClick: l }, {
403
- default: y(() => n[2] || (n[2] = [
401
+ footer: x(() => [
402
+ t("div", _n, [
403
+ m(P($), { onClick: l }, {
404
+ default: x(() => n[2] || (n[2] = [
404
405
  S(" 取消")
405
406
  ])),
406
407
  _: 1
407
408
  }),
408
- m(P(H), {
409
+ m(P($), {
409
410
  type: "primary",
410
411
  onClick: i
411
412
  }, {
412
- default: y(() => n[3] || (n[3] = [
413
+ default: x(() => n[3] || (n[3] = [
413
414
  S(" 确定")
414
415
  ])),
415
416
  _: 1
416
417
  })
417
418
  ])
418
419
  ]),
419
- default: y(() => [
420
- m(P(Oe), {
420
+ default: x(() => [
421
+ m(P(Te), {
421
422
  ref_key: "ruleForm",
422
423
  ref: h,
423
424
  model: s,
@@ -428,30 +429,30 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
428
429
  "label-position": "left",
429
430
  class: "add-custom-event-form"
430
431
  }, {
431
- default: y(() => [
432
- m(P(_e), {
432
+ default: x(() => [
433
+ m(P(he), {
433
434
  label: "事件函数名",
434
435
  prop: "eventName",
435
436
  required: ""
436
437
  }, {
437
- default: y(() => [
438
+ default: x(() => [
438
439
  m(P(ne), {
439
440
  modelValue: s.eventName,
440
- "onUpdate:modelValue": n[0] || (n[0] = (r) => s.eventName = r),
441
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => s.eventName = d),
441
442
  placeholder: "小驼峰格式,如:onDrag"
442
443
  }, null, 8, ["modelValue"])
443
444
  ]),
444
445
  _: 1
445
446
  }),
446
- m(P(_e), {
447
+ m(P(he), {
447
448
  label: "事件描述",
448
449
  prop: "eventDescription",
449
450
  required: ""
450
451
  }, {
451
- default: y(() => [
452
+ default: x(() => [
452
453
  m(P(ne), {
453
454
  modelValue: s.eventDescription,
454
- "onUpdate:modelValue": n[1] || (n[1] = (r) => s.eventDescription = r)
455
+ "onUpdate:modelValue": n[1] || (n[1] = (d) => s.eventDescription = d)
455
456
  }, null, 8, ["modelValue"])
456
457
  ]),
457
458
  _: 1
@@ -463,88 +464,88 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
463
464
  _: 1
464
465
  }, 8, ["visible"]));
465
466
  }
466
- }, vn = /* @__PURE__ */ R(fn, [["__scopeId", "data-v-46f7fc7a"]]), _n = {
467
+ }, bn = /* @__PURE__ */ J(hn, [["__scopeId", "data-v-46f7fc7a"]]), En = {
467
468
  components: {
468
- BlockLinkEvent: Ke,
469
- BindEventsDialog: cn,
470
- TinyPopover: Le,
471
- TinyButton: H,
472
- IconChevronDown: qe(),
473
- SvgButton: He,
474
- AddEventsDialog: vn
469
+ BlockLinkEvent: qe,
470
+ BindEventsDialog: un,
471
+ TinyPopover: Ue,
472
+ TinyButton: $,
473
+ IconChevronDown: We(),
474
+ SvgButton: Ze,
475
+ AddEventsDialog: bn
475
476
  },
476
477
  inheritAttrs: !1,
477
478
  setup() {
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
+ const { PLUGIN_NAME: p, activePlugin: o } = De(), { pageState: a } = Y(), { getBlockEvents: e, getCurrentBlock: s, removeEventLink: h } = Ke(), { getMaterial: b } = He(), { confirm: f } = $e(), l = Ye.global.locale.value, { highlightMethod: i } = Z(G.Page), { commonEvents: E = {} } = Ce("engine.setting.event").options, n = q({
479
480
  eventName: "",
480
481
  // 事件名称
481
482
  eventBinding: null,
482
483
  // 事件绑定的处理方法对象
483
484
  componentEvent: {},
484
- componentEvents: i,
485
+ customEvents: E,
485
486
  bindActions: {},
486
487
  showBindEventDialog: !1
487
- }), n = K(() => !!a.isBlock), r = K(() => Object.keys(u.bindActions).length === 0);
488
- ye(() => {
489
- var M, I, A, C, W;
490
- const x = (M = a == null ? void 0 : a.currentSchema) == null ? void 0 : M.componentName, d = b(x);
491
- u.componentEvent = ((A = (I = d == null ? void 0 : d.content) == null ? void 0 : I.schema) == null ? void 0 : A.events) || ((C = d == null ? void 0 : d.schema) == null ? void 0 : C.events) || {}, u.componentEvents = { ...i, ...u.componentEvent };
492
- const v = ((W = a == null ? void 0 : a.currentSchema) == null ? void 0 : W.props) || {}, k = Object.keys(v);
493
- u.bindActions = {}, Object.entries(u.componentEvents).forEach(([U, Ie]) => {
494
- var se, ae, le;
495
- if (k.indexOf(U) > -1) {
496
- const Ae = v[U], { value: Pe, params: de } = Ae, Be = !de && ((ae = (se = Pe.match(/\((.+)\)$/)) == null ? void 0 : se[1]) == null ? void 0 : ae.split(",")) || de, O = {
497
- eventName: U,
488
+ }), d = X(() => !!a.isBlock), u = X(() => Object.keys(n.bindActions).length === 0), c = X(() => ({ ...n.componentEvent, ...n.customEvents }));
489
+ xe(() => {
490
+ var A, C, W, ie, se;
491
+ const r = (A = a == null ? void 0 : a.currentSchema) == null ? void 0 : A.componentName, g = b(r);
492
+ n.componentEvent = ((W = (C = g == null ? void 0 : g.content) == null ? void 0 : C.schema) == null ? void 0 : W.events) || ((ie = g == null ? void 0 : g.schema) == null ? void 0 : ie.events) || {};
493
+ const k = ((se = a == null ? void 0 : a.currentSchema) == null ? void 0 : se.props) || {}, N = Object.keys(k);
494
+ n.bindActions = {}, Object.entries(c.value).forEach(([j, Pe]) => {
495
+ var ae, le, de;
496
+ if (N.indexOf(j) > -1) {
497
+ const Be = k[j], { value: Me, params: re } = Be, we = !re && ((le = (ae = Me.match(/\((.+)\)$/)) == null ? void 0 : ae[1]) == null ? void 0 : le.split(",")) || re, O = {
498
+ eventName: j,
498
499
  ref: "",
499
- event: v[U],
500
- params: Be
500
+ event: k[j],
501
+ params: we
501
502
  };
502
503
  if (O.event.type === "JSExpression" && (O.ref = O.event.value.replace("this.", "").replace(/\(.*\)$/, "")), a.isBlock) {
503
- O.metaEvent = Ie;
504
- const re = e(s()), ce = (le = a == null ? void 0 : a.currentSchema) == null ? void 0 : le.id;
505
- ce && re && Object.entries(re).forEach(([Me, L]) => {
506
- var me, pe;
507
- ce === ((me = L == null ? void 0 : L.linked) == null ? void 0 : me.id) && U === ((pe = L == null ? void 0 : L.linked) == null ? void 0 : pe.event) && (O.linked = L.linked, O.linkedEventName = Me);
504
+ O.metaEvent = Pe;
505
+ const ce = e(s()), me = (de = a == null ? void 0 : a.currentSchema) == null ? void 0 : de.id;
506
+ me && ce && Object.entries(ce).forEach(([Se, L]) => {
507
+ var pe, ue;
508
+ me === ((pe = L == null ? void 0 : L.linked) == null ? void 0 : pe.id) && j === ((ue = L == null ? void 0 : L.linked) == null ? void 0 : ue.event) && (O.linked = L.linked, O.linkedEventName = Se);
508
509
  });
509
510
  }
510
- u.bindActions[U] = O;
511
+ n.bindActions[j] = O;
511
512
  }
512
513
  });
513
514
  });
514
- const g = (x, d) => {
515
- d && u.bindActions[x.eventName] || (u.eventBinding = x, sn());
516
- }, c = (x) => {
517
- var v;
518
- Object.keys(((v = a == null ? void 0 : a.currentSchema) == null ? void 0 : v.props) || {}).indexOf(x.eventName) > -1 && delete a.currentSchema.props[x.eventName];
515
+ const V = (r, g) => {
516
+ g && n.bindActions[r.eventName] || (n.eventBinding = r, dn());
517
+ }, w = (r) => {
518
+ var k;
519
+ Object.keys(((k = a == null ? void 0 : a.currentSchema) == null ? void 0 : k.props) || {}).indexOf(r.eventName) > -1 && delete a.currentSchema.props[r.eventName];
519
520
  };
520
521
  return {
521
- state: u,
522
- isBlock: n,
523
- isEmpty: r,
524
- delEvent: (x) => {
522
+ state: n,
523
+ isBlock: d,
524
+ isEmpty: u,
525
+ delEvent: (r) => {
525
526
  f({
526
527
  title: "提示",
527
- message: `您确定要删除事件 ${x.eventName} 吗?`,
528
+ message: `您确定要删除事件 ${r.eventName} 吗?`,
528
529
  exec() {
529
- a.isBlock && h({ linked: x.linked }), c(x);
530
+ a.isBlock && h({ linked: r.linked }), w(r);
530
531
  }
531
532
  });
532
533
  },
533
- openCodePanel: (x) => {
534
- x && o(p.Page).then(() => {
535
- l && l(x.ref);
534
+ openCodePanel: (r) => {
535
+ r && o(p.Page).then(() => {
536
+ i && i(r.ref);
536
537
  });
537
538
  },
538
- openActionDialog: g,
539
- handleAddEvent: (x) => {
540
- const { eventName: d, eventDescription: v } = x;
541
- Object.assign(u.componentEvents, {
542
- [d]: {
539
+ openActionDialog: V,
540
+ handleAddEvent: (r) => {
541
+ const { eventName: g, eventDescription: k } = r;
542
+ Object.assign(n.customEvents, {
543
+ [g]: {
543
544
  label: {
544
- zh_CN: v
545
+ zh_CN: k
545
546
  },
546
547
  description: {
547
- zh_CN: `${v}的回调函数`
548
+ zh_CN: `${k}的回调函数`
548
549
  },
549
550
  type: "event",
550
551
  functionInfo: {
@@ -553,19 +554,21 @@ const cn = /* @__PURE__ */ R(an, [["render", rn], ["__scopeId", "data-v-98e32e3c
553
554
  },
554
555
  defaultValue: ""
555
556
  }
556
- }), u.showBindEventDialog = !1;
557
+ }), n.showBindEventDialog = !1;
557
558
  },
558
- handleToggleAddEventDialog: (x) => {
559
- u.showBindEventDialog = x;
560
- }
559
+ handleToggleAddEventDialog: (r) => {
560
+ n.showBindEventDialog = r;
561
+ },
562
+ renderEventList: c,
563
+ locale: l
561
564
  };
562
565
  }
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
- function An(p, o, a, e, s, h) {
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
- return _(), N($, null, [
567
- t("div", hn, [
568
- t("div", bn, [
566
+ }, yn = { class: "bind-action-list" }, xn = { class: "popover-head" }, kn = { class: "bind-event-list" }, Vn = ["onClick"], Cn = { class: "bind-actions" }, Dn = { class: "action-item bind-action-item" }, In = ["onClick"], Nn = { class: "event-bind" }, An = { class: "action-buttons" }, Pn = { class: "empty-action" }, Bn = { class: "icon" };
567
+ function Mn(p, o, a, e, s, h) {
568
+ const b = y("icon-chevron-down"), f = y("tiny-button"), l = y("tiny-popover"), i = y("svg-icon"), E = y("block-link-event"), n = y("svg-button"), d = y("bind-events-dialog"), u = y("add-events-dialog");
569
+ return _(), I(H, null, [
570
+ t("div", yn, [
571
+ t("div", xn, [
569
572
  m(l, {
570
573
  popperClass: "option-popper setting-advanced-bind-event-list",
571
574
  placement: "bottom-start",
@@ -574,26 +577,26 @@ function An(p, o, a, e, s, h) {
574
577
  width: "256",
575
578
  "visible-arrow": !1
576
579
  }, {
577
- reference: y(() => [
580
+ reference: x(() => [
578
581
  m(f, { class: "bind-event-btn" }, {
579
- default: y(() => [
582
+ default: x(() => [
580
583
  o[2] || (o[2] = t("span", null, "绑定事件", -1)),
581
584
  m(b, { class: "icon-chevron-down" })
582
585
  ]),
583
586
  _: 1
584
587
  })
585
588
  ]),
586
- default: y(() => [
587
- t("ul", En, [
588
- (_(!0), N($, null, ee(e.state.componentEvents, (c, V) => {
589
- var J;
590
- return _(), N("li", {
589
+ default: x(() => [
590
+ t("ul", kn, [
591
+ (_(!0), I(H, null, ee(e.renderEventList, (c, V) => {
592
+ var w;
593
+ return _(), I("li", {
591
594
  key: V,
592
595
  class: z(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[V] }]),
593
- onClick: (ie) => e.openActionDialog({ eventName: V }, !0)
596
+ onClick: (U) => e.openActionDialog({ eventName: V }, !0)
594
597
  }, [
595
- t("div", null, B(V) + "  |  " + B(((J = c == null ? void 0 : c.label) == null ? void 0 : J.zh_CN) || V), 1)
596
- ], 10, yn);
598
+ t("div", null, B(V) + "  |  " + B(((w = c == null ? void 0 : c.label) == null ? void 0 : w[e.locale]) || V), 1)
599
+ ], 10, Vn);
597
600
  }), 128))
598
601
  ])
599
602
  ]),
@@ -603,7 +606,7 @@ function An(p, o, a, e, s, h) {
603
606
  class: "title add-custom-event-button bind-action-button-item",
604
607
  onClick: o[0] || (o[0] = (c) => e.handleToggleAddEventDialog(!0))
605
608
  }, {
606
- default: y(() => [
609
+ default: x(() => [
607
610
  m(i, {
608
611
  name: "add",
609
612
  class: "custom-event-button-icon"
@@ -613,55 +616,58 @@ function An(p, o, a, e, s, h) {
613
616
  _: 1
614
617
  })
615
618
  ]),
616
- ge(t("ul", xn, [
617
- (_(!0), N($, null, ee(e.state.bindActions, (c) => (_(), N("li", {
618
- key: c.eventName
619
- }, [
620
- t("div", kn, [
621
- t("div", {
622
- class: "binding-name",
623
- onClick: (V) => e.openActionDialog(c)
624
- }, [
625
- t("div", null, [
626
- S(B(c.eventName), 1),
627
- t("span", null, B(e.state.componentEvents[c.eventName].label.zh_CN), 1)
628
- ]),
629
- t("div", {
630
- class: z({ linked: c.linked })
631
- }, B(c.linkedEventName), 3),
632
- t("span", Cn, B(c.ref), 1)
633
- ], 8, Vn),
619
+ ge(t("ul", Cn, [
620
+ (_(!0), I(H, null, ee(e.state.bindActions, (c) => {
621
+ var V, w;
622
+ return _(), I("li", {
623
+ key: c.eventName
624
+ }, [
634
625
  t("div", Dn, [
635
- e.isBlock ? (_(), w(u, {
636
- key: 0,
637
- data: c
638
- }, null, 8, ["data"])) : X("", !0),
639
- m(n, {
640
- name: "plugin-icon-page-schema",
641
- tips: "定位到代码",
642
- placement: "top",
643
- onClick: (V) => e.openCodePanel(c)
644
- }, null, 8, ["onClick"]),
645
- m(n, {
646
- name: "setting",
647
- tips: "设置",
648
- placement: "top",
649
- onClick: (V) => e.openActionDialog(c, !1)
650
- }, null, 8, ["onClick"]),
651
- m(n, {
652
- name: "delete",
653
- tips: "删除",
654
- placement: "top",
655
- onClick: (V) => e.delEvent(c)
656
- }, null, 8, ["onClick"])
626
+ t("div", {
627
+ class: "binding-name",
628
+ onClick: (U) => e.openActionDialog(c)
629
+ }, [
630
+ t("div", null, [
631
+ S(B(c.eventName), 1),
632
+ t("span", null, B((w = (V = e.renderEventList[c.eventName]) == null ? void 0 : V.label) == null ? void 0 : w[e.locale]), 1)
633
+ ]),
634
+ t("div", {
635
+ class: z({ linked: c.linked })
636
+ }, B(c.linkedEventName), 3),
637
+ t("span", Nn, B(c.ref), 1)
638
+ ], 8, In),
639
+ t("div", An, [
640
+ e.isBlock ? (_(), M(E, {
641
+ key: 0,
642
+ data: c
643
+ }, null, 8, ["data"])) : K("", !0),
644
+ m(n, {
645
+ name: "plugin-icon-page-schema",
646
+ tips: "定位到代码",
647
+ placement: "top",
648
+ onClick: (U) => e.openCodePanel(c)
649
+ }, null, 8, ["onClick"]),
650
+ m(n, {
651
+ name: "setting",
652
+ tips: "设置",
653
+ placement: "top",
654
+ onClick: (U) => e.openActionDialog(c, !1)
655
+ }, null, 8, ["onClick"]),
656
+ m(n, {
657
+ name: "delete",
658
+ tips: "删除",
659
+ placement: "top",
660
+ onClick: (U) => e.delEvent(c)
661
+ }, null, 8, ["onClick"])
662
+ ])
657
663
  ])
658
- ])
659
- ]))), 128))
664
+ ]);
665
+ }), 128))
660
666
  ], 512), [
661
- [fe, !e.isEmpty]
667
+ [ve, !e.isEmpty]
662
668
  ]),
663
- ge(t("div", Nn, [
664
- t("div", In, [
669
+ ge(t("div", Pn, [
670
+ t("div", Bn, [
665
671
  m(i, {
666
672
  name: "empty-action",
667
673
  class: "empty-action-icon"
@@ -669,36 +675,36 @@ function An(p, o, a, e, s, h) {
669
675
  ]),
670
676
  o[4] || (o[4] = t("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
671
677
  ], 512), [
672
- [fe, e.isEmpty]
678
+ [ve, e.isEmpty]
673
679
  ])
674
680
  ]),
675
- m(r, {
681
+ m(d, {
676
682
  eventBinding: e.state.eventBinding
677
683
  }, null, 8, ["eventBinding"]),
678
- m(g, {
684
+ m(u, {
679
685
  visible: e.state.showBindEventDialog,
680
- componentEvents: e.state.componentEvents,
686
+ componentEvents: e.renderEventList,
681
687
  onCloseDialog: o[1] || (o[1] = (c) => e.handleToggleAddEventDialog(!1)),
682
688
  onAddEvent: e.handleAddEvent
683
689
  }, null, 8, ["visible", "componentEvents", "onAddEvent"])
684
690
  ], 64);
685
691
  }
686
- const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70"]]), { DEFAULT_LOOP_NAME: T } = on, { string2Obj: Bn } = tn, Mn = {
692
+ const wn = /* @__PURE__ */ J(En, [["render", Mn], ["__scopeId", "data-v-4b6b809f"]]), { DEFAULT_LOOP_NAME: T } = an, { string2Obj: Sn } = ln, On = {
687
693
  components: {
688
- SwitchConfigurator: We,
689
- TinyTooltip: Te,
690
- VariableConfigurator: Qe,
691
- InputConfigurator: en,
692
- CodeConfigurator: nn
694
+ SwitchConfigurator: nn,
695
+ TinyTooltip: je,
696
+ VariableConfigurator: on,
697
+ InputConfigurator: tn,
698
+ CodeConfigurator: sn
693
699
  },
694
700
  inheritAttrs: !1,
695
701
  setup() {
696
- const { pageState: p } = Y(), o = j(!1), a = K(() => {
702
+ const { pageState: p } = Y(), o = R(!1), a = X(() => {
697
703
  var n;
698
704
  return ((n = o.value) == null ? void 0 : n.type) === F.JSEXPRESSION;
699
705
  }), e = () => {
700
- var n, r;
701
- return ((r = (n = D().getSchema()) == null ? void 0 : n.loopArgs) == null ? void 0 : r[1]) || T.INDEX;
706
+ var n, d;
707
+ return ((d = (n = D().getSchema()) == null ? void 0 : n.loopArgs) == null ? void 0 : d[1]) || T.INDEX;
702
708
  }, s = q({
703
709
  loopData: {
704
710
  type: F.JSEXPRESSION,
@@ -706,29 +712,29 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70
706
712
  },
707
713
  loopItem: "item",
708
714
  loopIndex: "index",
709
- isLoop: K(() => {
715
+ isLoop: X(() => {
710
716
  var n;
711
717
  return ((n = s.loopData) == null ? void 0 : n.type) === F.JSEXPRESSION;
712
718
  }),
713
719
  loopKey: "",
714
720
  shouldUpdate: !1
715
721
  });
716
- ve(
722
+ _e(
717
723
  () => [p == null ? void 0 : p.currentSchema, s.shouldUpdate],
718
724
  ([n]) => {
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) || "";
725
+ var d, u, c, V;
726
+ 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 = ((d = n == null ? void 0 : n.loopArgs) == null ? void 0 : d[0]) || "", s.loopIndex = ((u = n == null ? void 0 : n.loopArgs) == null ? void 0 : u[1]) || "", s.loopKey = ((V = (c = n == null ? void 0 : n.props) == null ? void 0 : c.key) == null ? void 0 : V.value) || "";
721
727
  }
722
728
  );
723
729
  const h = (n = "") => {
724
730
  n = n.replace(/\s*/g, "");
725
- const r = D().getSchema();
726
- if (!r)
731
+ const d = D().getSchema();
732
+ if (!d)
727
733
  return;
728
- const g = Number(n).toString() !== "NaN";
729
- r.props = r.props || {};
730
- const c = r.props;
731
- n && !g && (c.key = {
734
+ const u = Number(n).toString() !== "NaN";
735
+ d.props = d.props || {};
736
+ const c = d.props;
737
+ n && !u && (c.key = {
732
738
  type: F.JSEXPRESSION,
733
739
  value: n
734
740
  }), n || (s.isLoop ? c.key = {
@@ -736,7 +742,7 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70
736
742
  value: e()
737
743
  } : delete c.key);
738
744
  };
739
- ve([() => s.isLoop, () => s.loopIndex], () => {
745
+ _e([() => s.isLoop, () => s.loopIndex], () => {
740
746
  !s.loopKey && s.isLoop && h(e()), s.isLoop || h("");
741
747
  });
742
748
  const b = () => {
@@ -753,7 +759,7 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70
753
759
  isBind: a,
754
760
  state: s,
755
761
  setLoop: (n) => {
756
- n ? (D().getSchema().loop = n != null && n.type ? n : Bn(n), l(T.INDEX)) : (h(), delete D().getSchema().loop, delete D().getSchema().loopArgs), s.shouldUpdate = !s.shouldUpdate;
762
+ n ? (D().getSchema().loop = n != null && n.type ? n : Sn(n), l(T.INDEX)) : (h(), delete D().getSchema().loop, delete D().getSchema().loopArgs), s.shouldUpdate = !s.shouldUpdate;
757
763
  },
758
764
  setLoopItem: (n) => {
759
765
  D().getSchema().loopArgs ? D().getSchema().loopArgs[0] = n || T.ITEM : D().getSchema().loopArgs = [n, T.INDEX];
@@ -765,19 +771,19 @@ const Pn = /* @__PURE__ */ R(_n, [["render", An], ["__scopeId", "data-v-84d4be70
765
771
  getIndexName: e
766
772
  };
767
773
  }
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
- function Kn(p, o, a, e, s, h) {
770
- var n, r;
771
- const b = E("switch-configurator"), f = E("variable-configurator"), l = E("code-configurator"), i = E("input-configurator"), u = E("tiny-tooltip");
772
- return _(), N("div", wn, [
773
- t("div", Sn, [
774
+ }, Ln = { class: "advanced-config-container" }, Tn = { class: "advnce-config" }, Un = { class: "advanced-config-form-item" }, jn = ["title"], zn = { class: "advnce-config" }, Rn = { class: "advanced-config-form-item" }, Jn = ["title"], Fn = { class: "advnce-config" }, Xn = { class: "advanced-config-form-item" }, Kn = { class: "advnce-config" }, Hn = { class: "advanced-config-form-item" }, $n = { class: "advnce-config" }, Yn = { class: "advanced-config-form-item" };
775
+ function qn(p, o, a, e, s, h) {
776
+ var n, d;
777
+ const b = y("switch-configurator"), f = y("variable-configurator"), l = y("code-configurator"), i = y("input-configurator"), E = y("tiny-tooltip");
778
+ return _(), I("div", Ln, [
779
+ t("div", Tn, [
774
780
  o[6] || (o[6] = t("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
775
- t("div", On, [
776
- e.isBind ? (_(), N("div", {
781
+ t("div", Un, [
782
+ e.isBind ? (_(), I("div", {
777
783
  key: 1,
778
784
  class: "binding-state text-ellipsis-multiple",
779
785
  title: e.condition.value
780
- }, " 已绑定:" + B(e.condition.value), 9, Ln)) : (_(), w(b, {
786
+ }, " 已绑定:" + B(e.condition.value), 9, jn)) : (_(), M(b, {
781
787
  key: 0,
782
788
  modelValue: e.condition,
783
789
  "onUpdate:modelValue": e.setConfig
@@ -785,25 +791,25 @@ function Kn(p, o, a, e, s, h) {
785
791
  m(f, {
786
792
  modelValue: e.condition,
787
793
  "onUpdate:modelValue": [
788
- o[0] || (o[0] = (g) => e.condition = g),
794
+ o[0] || (o[0] = (u) => e.condition = u),
789
795
  e.setConfig
790
796
  ],
791
797
  name: "advance"
792
798
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
793
799
  ])
794
800
  ]),
795
- t("div", Tn, [
801
+ t("div", zn, [
796
802
  o[7] || (o[7] = t("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
797
- t("div", Un, [
798
- e.state.isLoop ? (_(), N("div", {
803
+ t("div", Rn, [
804
+ e.state.isLoop ? (_(), I("div", {
799
805
  key: 1,
800
806
  class: "binding-state text-ellipsis-multiple",
801
807
  title: (n = e.state.loopData) == null ? void 0 : n.value
802
- }, " 已绑定:" + B((r = e.state.loopData) == null ? void 0 : r.value), 9, zn)) : (_(), w(l, {
808
+ }, " 已绑定:" + B((d = e.state.loopData) == null ? void 0 : d.value), 9, Jn)) : (_(), M(l, {
803
809
  key: 0,
804
810
  modelValue: e.state.loopData,
805
811
  "onUpdate:modelValue": [
806
- o[1] || (o[1] = (g) => e.state.loopData = g),
812
+ o[1] || (o[1] = (u) => e.state.loopData = u),
807
813
  e.setLoop
808
814
  ],
809
815
  "data-type": "JSExpression",
@@ -812,48 +818,48 @@ function Kn(p, o, a, e, s, h) {
812
818
  m(f, {
813
819
  modelValue: e.state.loopData,
814
820
  "onUpdate:modelValue": [
815
- o[2] || (o[2] = (g) => e.state.loopData = g),
821
+ o[2] || (o[2] = (u) => e.state.loopData = u),
816
822
  e.setLoop
817
823
  ],
818
824
  name: "advance"
819
825
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
820
826
  ])
821
827
  ]),
822
- t("div", jn, [
828
+ t("div", Fn, [
823
829
  o[8] || (o[8] = t("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
824
- t("div", Rn, [
830
+ t("div", Xn, [
825
831
  m(i, {
826
832
  modelValue: e.state.loopItem,
827
833
  "onUpdate:modelValue": [
828
- o[3] || (o[3] = (g) => e.state.loopItem = g),
834
+ o[3] || (o[3] = (u) => e.state.loopItem = u),
829
835
  e.setLoopItem
830
836
  ],
831
837
  placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
832
838
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
833
839
  ])
834
840
  ]),
835
- t("div", Jn, [
841
+ t("div", Kn, [
836
842
  o[9] || (o[9] = t("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
837
- t("div", Fn, [
843
+ t("div", Hn, [
838
844
  m(i, {
839
845
  modelValue: e.state.loopIndex,
840
846
  "onUpdate:modelValue": [
841
- o[4] || (o[4] = (g) => e.state.loopIndex = g),
847
+ o[4] || (o[4] = (u) => e.state.loopIndex = u),
842
848
  e.setLoopIndex
843
849
  ],
844
850
  placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
845
851
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
846
852
  ])
847
853
  ]),
848
- t("div", Xn, [
854
+ t("div", $n, [
849
855
  o[10] || (o[10] = t("label", { class: "text-ellipsis-multiple" }, "key", -1)),
850
- t("div", $n, [
851
- m(u, { content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存" }, {
852
- default: y(() => [
856
+ t("div", Yn, [
857
+ m(E, { content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存" }, {
858
+ default: x(() => [
853
859
  m(i, {
854
860
  modelValue: e.state.loopKey,
855
861
  "onUpdate:modelValue": [
856
- o[5] || (o[5] = (g) => e.state.loopKey = g),
862
+ o[5] || (o[5] = (u) => e.state.loopKey = u),
857
863
  e.setLoopKey
858
864
  ],
859
865
  placeholder: `默认为索引名:${e.getIndexName()}`
@@ -865,30 +871,30 @@ function Kn(p, o, a, e, s, h) {
865
871
  ])
866
872
  ]);
867
873
  }
868
- const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3"]]), Yn = {
874
+ const Zn = /* @__PURE__ */ J(On, [["render", qn], ["__scopeId", "data-v-f59c13c3"]]), Gn = {
869
875
  __name: "Main",
870
876
  setup(p) {
871
- const o = j(["bindEvent", "advancedConfig"]);
872
- return (a, e) => (_(), w(P(Ue), {
877
+ const o = R(["bindEvent", "advancedConfig"]);
878
+ return (a, e) => (_(), M(P(ze), {
873
879
  modelValue: o.value,
874
880
  "onUpdate:modelValue": e[0] || (e[0] = (s) => o.value = s)
875
881
  }, {
876
- default: y(() => [
877
- m(P(he), {
882
+ default: x(() => [
883
+ m(P(be), {
878
884
  title: "事件绑定",
879
885
  name: "bindEvent"
880
886
  }, {
881
- default: y(() => [
882
- m(Pn)
887
+ default: x(() => [
888
+ m(wn)
883
889
  ]),
884
890
  _: 1
885
891
  }),
886
- m(P(he), {
892
+ m(P(be), {
887
893
  title: "高级配置",
888
894
  name: "advancedConfig"
889
895
  }, {
890
- default: y(() => [
891
- m(Hn)
896
+ default: x(() => [
897
+ m(Zn)
892
898
  ]),
893
899
  _: 1
894
900
  })
@@ -896,22 +902,22 @@ const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3
896
902
  _: 1
897
903
  }, 8, ["modelValue"]));
898
904
  }
899
- }, De = "newMethod", qn = /[^0-9a-zA-Z_$]/, Zn = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, Q = {
905
+ }, Ie = "newMethod", Wn = /[^0-9a-zA-Z_$]/, Qn = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, Q = {
900
906
  default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
901
907
  exist: "方法名称已存在",
902
908
  ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
903
909
  empty: "方法名称不能为空"
904
- }, Gn = {
910
+ }, eo = {
905
911
  components: {
906
- MonacoEditor: Ye,
912
+ MonacoEditor: Ge,
907
913
  TinyInput: ne,
908
- TinyCheckbox: ze
914
+ TinyCheckbox: Re
909
915
  },
910
916
  props: {
911
917
  dialogVisible: Boolean
912
918
  },
913
919
  setup() {
914
- const { getMethodNameList: p } = Z(G.Page), o = xe("context"), a = {
920
+ const { getMethodNameList: p } = Z(G.Page), o = ke("context"), a = {
915
921
  language: "json",
916
922
  lineNumbers: !1,
917
923
  minimap: {
@@ -919,9 +925,9 @@ const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3
919
925
  }
920
926
  }, e = (l) => {
921
927
  o.editorContent = l;
922
- }, s = (l) => !l, h = (l) => p == null ? void 0 : p().includes(l), b = (l) => !Zn.test(l);
928
+ }, s = (l) => !l, h = (l) => p == null ? void 0 : p().includes(l), b = (l) => !Qn.test(l);
923
929
  return {
924
- NEW_METHOD_TYPE: De,
930
+ NEW_METHOD_TYPE: Ie,
925
931
  context: o,
926
932
  editorOptions: a,
927
933
  change: (l) => {
@@ -930,8 +936,8 @@ const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3
930
936
  { validator: h, tip: Q.exist },
931
937
  { validator: b, tip: Q.ruleInvalid }
932
938
  ];
933
- for (let u = 0; u < i.length; u++) {
934
- const n = i[u];
939
+ for (let E = 0; E < i.length; E++) {
940
+ const n = i[E];
935
941
  if (n.validator(l)) {
936
942
  o.tipError = !0, o.tip = n.tip;
937
943
  return;
@@ -942,16 +948,16 @@ const Hn = /* @__PURE__ */ R(Mn, [["render", Kn], ["__scopeId", "data-v-f59c13c3
942
948
  editorContentChange: e
943
949
  };
944
950
  }
945
- }, Wn = { class: "content-right" }, Qn = { class: "new-action-tip" }, eo = { class: "content-right-title" }, no = { class: "set-params-tip" }, oo = { class: "content-right-monaco" }, to = {
951
+ }, no = { class: "content-right" }, oo = { class: "new-action-tip" }, to = { class: "content-right-title" }, io = { class: "set-params-tip" }, so = { class: "content-right-monaco" }, ao = {
946
952
  key: 1,
947
953
  class: "mark"
948
- }, io = {
954
+ }, lo = {
949
955
  key: 0,
950
956
  class: "params-tip"
951
957
  };
952
- function so(p, o, a, e, s, h) {
953
- const b = E("tiny-input"), f = E("tiny-checkbox"), l = E("monaco-editor");
954
- return _(), N("div", Wn, [
958
+ function ro(p, o, a, e, s, h) {
959
+ const b = y("tiny-input"), f = y("tiny-checkbox"), l = y("monaco-editor");
960
+ return _(), I("div", no, [
955
961
  t("div", {
956
962
  class: z(["content-right-top", { "tip-error": e.context.tipError }])
957
963
  }, [
@@ -966,45 +972,45 @@ function so(p, o, a, e, s, h) {
966
972
  class: z([{ "status-error": e.context.tipError }]),
967
973
  placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
968
974
  }, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
969
- t("div", Qn, B(e.context.tip), 1)
975
+ t("div", oo, B(e.context.tip), 1)
970
976
  ], 2),
971
977
  t("div", {
972
978
  class: z(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
973
979
  }, [
974
- t("div", eo, [
980
+ t("div", to, [
975
981
  m(f, {
976
982
  modelValue: e.context.enableExtraParams,
977
983
  "onUpdate:modelValue": o[1] || (o[1] = (i) => e.context.enableExtraParams = i),
978
984
  name: "tiny-checkbox"
979
985
  }, {
980
- default: y(() => o[3] || (o[3] = [
986
+ default: x(() => o[3] || (o[3] = [
981
987
  S("扩展参数设置")
982
988
  ])),
983
989
  _: 1
984
990
  }, 8, ["modelValue"]),
985
- t("div", no, [
991
+ t("div", io, [
986
992
  o[4] || (o[4] = t("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
987
993
  S(" 如: " + B(e.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
988
994
  ])
989
995
  ]),
990
- t("div", oo, [
991
- a.dialogVisible ? (_(), w(l, {
996
+ t("div", so, [
997
+ a.dialogVisible ? (_(), M(l, {
992
998
  key: 0,
993
999
  value: e.context.editorContent,
994
1000
  options: e.editorOptions,
995
1001
  onChange: e.editorContentChange,
996
1002
  class: "monaco-editor"
997
- }, null, 8, ["value", "options", "onChange"])) : X("", !0),
998
- e.context.enableExtraParams ? X("", !0) : (_(), N("div", to))
1003
+ }, null, 8, ["value", "options", "onChange"])) : K("", !0),
1004
+ e.context.enableExtraParams ? K("", !0) : (_(), I("div", ao))
999
1005
  ]),
1000
- !e.context.isValidParams && e.context.enableExtraParams ? (_(), N("div", io, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : X("", !0)
1006
+ !e.context.isValidParams && e.context.enableExtraParams ? (_(), I("div", lo, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : K("", !0)
1001
1007
  ], 2)
1002
1008
  ]);
1003
1009
  }
1004
- const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-49127432"]]), lo = {
1010
+ const co = /* @__PURE__ */ J(eo, [["render", ro], ["__scopeId", "data-v-49127432"]]), mo = {
1005
1011
  components: {
1006
- TinySearch: je,
1007
- IconYes: Ze()
1012
+ TinySearch: Je,
1013
+ IconYes: Qe()
1008
1014
  },
1009
1015
  props: {
1010
1016
  eventBinding: {
@@ -1013,26 +1019,26 @@ const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-49127432
1013
1019
  }
1014
1020
  },
1015
1021
  setup(p) {
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
- let n = `${(l == null ? void 0 : l.replace(qn, "_")) || ""}New`;
1022
+ const { getMethodNameList: o } = Z(G.Page), a = R(""), e = R([]), s = ke("context"), h = (f, l) => {
1023
+ const i = f.map((d) => {
1024
+ var u;
1025
+ return Number.parseInt((u = d.match(/\d+$/)) == null ? void 0 : u[0]) || 0;
1026
+ }).sort((d, u) => d - u).pop();
1027
+ let n = `${(l == null ? void 0 : l.replace(Wn, "_")) || ""}New`;
1022
1028
  return i > -1 && (n += `${i + 1}`), n;
1023
1029
  }, b = (f) => {
1024
1030
  s.bindMethodInfo = f;
1025
1031
  };
1026
- return ye(() => {
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 = {
1032
+ return xe(() => {
1033
+ var d, u;
1034
+ const f = (d = p.eventBinding) == null ? void 0 : d.eventName, l = (o == null ? void 0 : o().filter((c) => c.includes(f))) || [], E = {
1029
1035
  title: "添加新方法",
1030
1036
  name: h(l, f),
1031
- type: De
1037
+ type: Ie
1032
1038
  };
1033
- (g = p.eventBinding) != null && g.ref ? b({ name: p.eventBinding.ref }) : b(u);
1039
+ (u = p.eventBinding) != null && u.ref ? b({ name: p.eventBinding.ref }) : b(E);
1034
1040
  const n = (o == null ? void 0 : o().filter((c) => c.includes(a.value)).map((c) => ({ name: c }))) || [];
1035
- e.value = [u, ...n];
1041
+ e.value = [E, ...n];
1036
1042
  }), {
1037
1043
  context: s,
1038
1044
  searchValue: a,
@@ -1040,20 +1046,20 @@ const ao = /* @__PURE__ */ R(Gn, [["render", so], ["__scopeId", "data-v-49127432
1040
1046
  selectMethod: b
1041
1047
  };
1042
1048
  }
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 go(p, o, a, e, s, h) {
1045
- const b = E("tiny-search"), f = E("icon-yes");
1046
- return _(), N("div", ro, [
1049
+ }, po = { class: "dialog-content-left" }, uo = { class: "left-list-wrap" }, fo = { class: "left-action-list" }, go = { class: "action-list-wrap" }, vo = ["onClick"];
1050
+ function _o(p, o, a, e, s, h) {
1051
+ const b = y("tiny-search"), f = y("icon-yes");
1052
+ return _(), I("div", po, [
1047
1053
  o[1] || (o[1] = t("div", { class: "left-title" }, "响应方法", -1)),
1048
- t("div", co, [
1049
- t("div", mo, [
1054
+ t("div", uo, [
1055
+ t("div", fo, [
1050
1056
  m(b, {
1051
1057
  modelValue: e.searchValue,
1052
1058
  "onUpdate:modelValue": o[0] || (o[0] = (l) => e.searchValue = l),
1053
1059
  placeholder: "搜索"
1054
1060
  }, null, 8, ["modelValue"]),
1055
- t("ul", po, [
1056
- (_(!0), N($, null, ee(e.filteredMethodList, (l) => (_(), N("li", {
1061
+ t("ul", go, [
1062
+ (_(!0), I(H, null, ee(e.filteredMethodList, (l) => (_(), I("li", {
1057
1063
  key: l.name,
1058
1064
  onClick: (i) => e.selectMethod(l)
1059
1065
  }, [
@@ -1061,28 +1067,28 @@ function go(p, o, a, e, s, h) {
1061
1067
  class: z(["action-name", { active: l.name === e.context.bindMethodInfo.name }])
1062
1068
  }, [
1063
1069
  S(B(l.title || l.name) + " ", 1),
1064
- l.name === e.context.bindMethodInfo.name ? (_(), w(f, {
1070
+ l.name === e.context.bindMethodInfo.name ? (_(), M(f, {
1065
1071
  key: 0,
1066
1072
  class: "action-selected-icon"
1067
- })) : X("", !0)
1073
+ })) : K("", !0)
1068
1074
  ], 2)
1069
- ], 8, uo))), 128))
1075
+ ], 8, vo))), 128))
1070
1076
  ])
1071
1077
  ])
1072
1078
  ])
1073
1079
  ]);
1074
1080
  }
1075
- const fo = /* @__PURE__ */ R(lo, [["render", go], ["__scopeId", "data-v-419ba375"]]), Do = {
1081
+ const ho = /* @__PURE__ */ J(mo, [["render", _o], ["__scopeId", "data-v-419ba375"]]), Po = {
1076
1082
  ...oe,
1077
- entry: Yn,
1083
+ entry: Gn,
1078
1084
  options: {
1079
- commonEvents: mn
1085
+ commonEvents: fn
1080
1086
  },
1081
1087
  components: {
1082
- BindEventsDialogSidebar: fo,
1083
- BindEventsDialogContent: ao
1088
+ BindEventsDialogSidebar: ho,
1089
+ BindEventsDialogContent: co
1084
1090
  }
1085
1091
  };
1086
1092
  export {
1087
- Do as default
1093
+ Po as default
1088
1094
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
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)}
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-4b6b809f]{padding:10px 20px 10px 10px}.custom-event footer[data-v-4b6b809f]{text-align:center}.bind-action-list .bind-actions[data-v-4b6b809f]{margin-top:20px}.bind-action-list .bind-actions .binding-name[data-v-4b6b809f]{word-break:break-all}.bind-action-list .bind-actions .action-buttons[data-v-4b6b809f]{display:flex;align-items:center;justify-content:center}.bind-action-list .bind-actions .action-buttons .item[data-v-4b6b809f]{margin-right:10px}.bind-action-list .bind-actions .event-bind[data-v-4b6b809f]{color:var(--ti-lowcode-events-event-bind-color)}.bind-action-list .bind-actions .bind-action-item[data-v-4b6b809f]{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-4b6b809f]: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-4b6b809f]:hover{background:var(--ti-lowcode-events-bind-action-item-hover-bg-color)}.bind-action-list .bind-actions .bind-action-item .linked[data-v-4b6b809f]{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-4b6b809f]{display:flex;justify-content:space-between;margin-top:12px}.bind-action-list .popover-head .bind-action-button-item[data-v-4b6b809f]{width:50%}.bind-action-list .popover-head .bind-action-button-item[data-v-4b6b809f]:not(:last-child){margin-right:12px}.bind-action-list .popover-head .add-custom-event-button[data-v-4b6b809f]{padding:0 16px;font-size:12px;margin-right:0}.bind-action-list .popover-head .add-custom-event-button .custom-event-button-text[data-v-4b6b809f]{display:inline-block;vertical-align:middle}.bind-action-list .popover-head .add-custom-event-button .custom-event-button-icon[data-v-4b6b809f]{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-4b6b809f]{padding:0 16px;font-size:12px;width:100%}.bind-action-list .empty-action[data-v-4b6b809f]{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-4b6b809f]{font-size:48px}.bind-action-list .empty-action .icon[data-v-4b6b809f]{text-align:center;opacity:.4}.bind-action-list .empty-action .center[data-v-4b6b809f]{margin-top:4px}.bind-action-list .empty-action .text[data-v-4b6b809f]{margin-top:12px}.bind-action-list .empty-action .empty-bind-event-tip[data-v-4b6b809f]{color:var(--ti-lowcode-events-empty-action-tips-strong-color)}.bind-event-list[data-v-4b6b809f]{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-4b6b809f]{cursor:not-allowed;pointer-events:none;color:var(--ti-lowcode-events-bind-event-list-item-disabled-color)}.bind-event-list-item[data-v-4b6b809f]{padding:0 12px;line-height:24px}.bind-event-list-item[data-v-4b6b809f]:hover{cursor:pointer;background:var(--lowcode-events-bind-event-list-item-hover-bg-color)}.add-custom-event-tip[data-v-4b6b809f]{color:var(--ti-lowcode-events-add-custom-event-tips-color)}.add-custom-event-tip .event-tip-highlight[data-v-4b6b809f]{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-rc.3",
3
+ "version": "2.0.0",
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-rc.3",
29
- "@opentiny/tiny-engine-configurator": "2.0.0-rc.3",
30
- "@opentiny/tiny-engine-meta-register": "2.0.0-rc.3",
31
- "@opentiny/tiny-engine-utils": "2.0.0-rc.3"
28
+ "@opentiny/tiny-engine-common": "2.0.0",
29
+ "@opentiny/tiny-engine-configurator": "2.0.0",
30
+ "@opentiny/tiny-engine-meta-register": "2.0.0",
31
+ "@opentiny/tiny-engine-utils": "2.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-rc.3",
34
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0",
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": "9e799e702a696ae06778abba1954262d65188481"
44
+ "gitHead": "26b32b2236bb85d8113158fd1475884aa99a9657"
45
45
  }