@opentiny/tiny-engine-setting-events 2.2.0-rc.1 → 2.2.1

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -37
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./style.css";
2
- import { ref as J, reactive as q, provide as Oe, resolveComponent as x, openBlock as _, createBlock as w, withCtx as k, createElementVNode as t, createVNode as p, createTextVNode as O, resolveDynamicComponent as fe, nextTick as Se, unref as B, computed as K, watchEffect as ke, createElementBlock as A, Fragment as $, renderList as ne, normalizeClass as R, toDisplayString as M, withDirectives as ge, createCommentVNode as H, vShow as _e, watch as be, inject as Ve } from "vue";
3
- import { Button as Y, DialogBox as Ce, Form as Te, FormItem as he, Input as oe, Popover as Ue, Tooltip as je, Collapse as ze, CollapseItem as ye, Checkbox as Re, Search as Je } from "@opentiny/vue";
4
- import { getMergeMeta as Ne, useLayout as Ae, useCanvas as L, getMetaApi as Z, META_APP as G, getOptions as Fe, useHistory as Xe, useBlock as Ke, useMaterial as He, useModal as $e, useProperties as U } from "@opentiny/tiny-engine-meta-register";
2
+ import { ref as F, reactive as q, provide as Oe, resolveComponent as x, createBlock as w, openBlock as _, withCtx as k, createElementVNode as t, resolveDynamicComponent as fe, createVNode as p, createTextVNode as O, nextTick as Se, unref as B, createElementBlock as A, Fragment as $, withDirectives as ge, renderList as ne, normalizeClass as R, toDisplayString as M, createCommentVNode as K, vShow as _e, computed as H, watchEffect as ke, watch as be, inject as Ve } from "vue";
3
+ import { DialogBox as Ce, Button as Y, Form as Te, FormItem as he, Input as oe, Popover as Ue, Tooltip as je, Collapse as ze, CollapseItem as ye, Checkbox as Re, Search as Fe } from "@opentiny/vue";
4
+ import { getMergeMeta as Ne, useLayout as Ae, useCanvas as L, getMetaApi as Z, META_APP as G, getOptions as Je, useHistory as Xe, useBlock as Ke, useMaterial as He, useModal as $e, useProperties as U } from "@opentiny/tiny-engine-meta-register";
5
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";
6
+ import { SvgButton as qe, BlockLinkEvent as Ze, VueMonaco as Ge } from "@opentiny/tiny-engine-common";
7
7
  import { iconChevronDown as We, iconYes as Qe } from "@opentiny/vue-icon";
8
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
+ import { CodeConfigurator as nn, InputConfigurator as on, VariableConfigurator as tn, SwitchConfigurator as sn } from "@opentiny/tiny-engine-configurator";
10
10
  import { PROP_DATA_TYPE as X } from "@opentiny/tiny-engine-common/js/constants";
11
11
  import { constants as an, utils as ln } from "@opentiny/tiny-engine-utils";
12
12
  const te = {
@@ -16,12 +16,12 @@ const te = {
16
16
  align: "left",
17
17
  name: "event",
18
18
  icon: ""
19
- }, F = (u, o) => {
19
+ }, J = (u, o) => {
20
20
  const r = u.__vccOpts || u;
21
21
  for (const [e, d] of o)
22
22
  r[e] = d;
23
23
  return r;
24
- }, ie = J(!1), dn = () => {
24
+ }, ie = F(!1), dn = () => {
25
25
  ie.value = !0;
26
26
  }, xe = () => {
27
27
  ie.value = !1;
@@ -108,11 +108,11 @@ const te = {
108
108
  let g = "event", m = s(), f = g;
109
109
  if (!i.isValidParams)
110
110
  return;
111
- m && (g = m.join(","), f = l(m)), n({ ...i.bindMethodInfo, params: g, extra: m });
111
+ m && (g = m.join(","), f = l(m)), n({ ...i.bindMethodInfo, extra: m });
112
112
  const V = y(), { name: I } = i.bindMethodInfo, P = {
113
113
  name: I,
114
114
  content: i.enableExtraParams ? `function ${I}(eventArgs,${f}) ${V}` : `function ${I}(${f}) ${V}`
115
- }, { beforeSaveMethod: N } = Fe(te.id);
115
+ }, { beforeSaveMethod: N } = Je(te.id);
116
116
  typeof N == "function" && await N(P, i.bindMethodInfo), v == null || v(P), C(), xe();
117
117
  },
118
118
  closeDialog: () => {
@@ -170,7 +170,7 @@ function pn(u, o, r, e, d, b) {
170
170
  _: 1
171
171
  }, 8, ["visible", "onClose", "onOpened"]);
172
172
  }
173
- const un = /* @__PURE__ */ F(rn, [["render", pn], ["__scopeId", "data-v-c1779b8d"]]), vn = {
173
+ const un = /* @__PURE__ */ J(rn, [["render", pn], ["__scopeId", "data-v-c1779b8d"]]), vn = {
174
174
  onClick: {
175
175
  label: {
176
176
  zh_CN: "点击事件"
@@ -357,7 +357,7 @@ const un = /* @__PURE__ */ F(rn, [["render", pn], ["__scopeId", "data-v-c1779b8d
357
357
  const r = u, e = o, d = q({
358
358
  eventDescription: "",
359
359
  eventName: ""
360
- }), b = J(null), v = {
360
+ }), b = F(null), v = {
361
361
  eventDescription: [
362
362
  {
363
363
  required: !0,
@@ -464,14 +464,14 @@ const un = /* @__PURE__ */ F(rn, [["render", pn], ["__scopeId", "data-v-c1779b8d
464
464
  _: 1
465
465
  }, 8, ["visible"]));
466
466
  }
467
- }, hn = /* @__PURE__ */ F(bn, [["__scopeId", "data-v-87e15e51"]]), yn = {
467
+ }, hn = /* @__PURE__ */ J(bn, [["__scopeId", "data-v-87e15e51"]]), yn = {
468
468
  components: {
469
- BlockLinkEvent: qe,
469
+ BlockLinkEvent: Ze,
470
470
  BindEventsDialog: un,
471
471
  TinyPopover: Ue,
472
472
  TinyButton: Y,
473
473
  IconChevronDown: We(),
474
- SvgButton: Ze,
474
+ SvgButton: qe,
475
475
  AddEventsDialog: hn
476
476
  },
477
477
  inheritAttrs: !1,
@@ -485,7 +485,7 @@ const un = /* @__PURE__ */ F(rn, [["render", pn], ["__scopeId", "data-v-c1779b8d
485
485
  customEvents: E,
486
486
  bindActions: {},
487
487
  showBindEventDialog: !1
488
- }), a = K(() => !!r.isBlock), s = K(() => Object.keys(n.bindActions).length === 0), l = K(() => ({ ...n.componentEvent, ...n.customEvents }));
488
+ }), a = H(() => !!r.isBlock), s = H(() => Object.keys(n.bindActions).length === 0), l = H(() => ({ ...n.componentEvent, ...n.customEvents }));
489
489
  ke(() => {
490
490
  var P, N, Q, se, ae;
491
491
  const m = (P = r == null ? void 0 : r.currentSchema) == null ? void 0 : P.componentName, f = h(m);
@@ -640,7 +640,7 @@ function Mn(u, o, r, e, d, b) {
640
640
  e.isBlock ? (_(), w(E, {
641
641
  key: 0,
642
642
  data: l
643
- }, null, 8, ["data"])) : H("", !0),
643
+ }, null, 8, ["data"])) : K("", !0),
644
644
  p(n, {
645
645
  name: "plugin-icon-page-schema",
646
646
  tips: "定位到代码",
@@ -689,17 +689,17 @@ function Mn(u, o, r, e, d, b) {
689
689
  }, null, 8, ["visible", "componentEvents", "onAddEvent"])
690
690
  ], 64);
691
691
  }
692
- const wn = /* @__PURE__ */ F(yn, [["render", Mn], ["__scopeId", "data-v-d2c5d4fa"]]), { DEFAULT_LOOP_NAME: j } = an, { string2Obj: Ln } = ln, On = {
692
+ const wn = /* @__PURE__ */ J(yn, [["render", Mn], ["__scopeId", "data-v-d2c5d4fa"]]), { DEFAULT_LOOP_NAME: j } = an, { string2Obj: Ln } = ln, On = {
693
693
  components: {
694
- SwitchConfigurator: nn,
694
+ SwitchConfigurator: sn,
695
695
  TinyTooltip: je,
696
- VariableConfigurator: on,
697
- InputConfigurator: tn,
698
- CodeConfigurator: sn
696
+ VariableConfigurator: tn,
697
+ InputConfigurator: on,
698
+ CodeConfigurator: nn
699
699
  },
700
700
  inheritAttrs: !1,
701
701
  setup() {
702
- const { pageState: u } = L(), o = J(!1), r = K(() => {
702
+ const { pageState: u } = L(), o = F(!1), r = H(() => {
703
703
  var n;
704
704
  return ((n = o.value) == null ? void 0 : n.type) === X.JSEXPRESSION;
705
705
  }), e = () => {
@@ -712,7 +712,7 @@ const wn = /* @__PURE__ */ F(yn, [["render", Mn], ["__scopeId", "data-v-d2c5d4fa
712
712
  },
713
713
  loopItem: "item",
714
714
  loopIndex: "index",
715
- isLoop: K(() => {
715
+ isLoop: H(() => {
716
716
  var n;
717
717
  return ((n = d.loopData) == null ? void 0 : n.type) === X.JSEXPRESSION;
718
718
  }),
@@ -796,7 +796,7 @@ const wn = /* @__PURE__ */ F(yn, [["render", Mn], ["__scopeId", "data-v-d2c5d4fa
796
796
  getIndexName: e
797
797
  };
798
798
  }
799
- }, Sn = { class: "advanced-config-container" }, Tn = { class: "advnce-config" }, Un = { class: "advanced-config-form-item" }, jn = ["title"], zn = { class: "advnce-config loop-data-item" }, 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" };
799
+ }, Sn = { class: "advanced-config-container" }, Tn = { class: "advnce-config" }, Un = { class: "advanced-config-form-item" }, jn = ["title"], zn = { class: "advnce-config loop-data-item" }, Rn = { class: "advanced-config-form-item" }, Fn = ["title"], Jn = { 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" };
800
800
  function qn(u, o, r, e, d, b) {
801
801
  var n, a;
802
802
  const h = x("switch-configurator"), v = x("variable-configurator"), c = x("code-configurator"), i = x("input-configurator"), E = x("tiny-tooltip");
@@ -830,7 +830,7 @@ function qn(u, o, r, e, d, b) {
830
830
  key: 1,
831
831
  class: "binding-state text-ellipsis-multiple",
832
832
  title: (n = e.state.loopData) == null ? void 0 : n.value
833
- }, " 已绑定:" + M((a = e.state.loopData) == null ? void 0 : a.value), 9, Jn)) : (_(), w(c, {
833
+ }, " 已绑定:" + M((a = e.state.loopData) == null ? void 0 : a.value), 9, Fn)) : (_(), w(c, {
834
834
  key: 0,
835
835
  modelValue: e.state.loopData,
836
836
  "onUpdate:modelValue": [
@@ -850,7 +850,7 @@ function qn(u, o, r, e, d, b) {
850
850
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
851
851
  ])
852
852
  ]),
853
- t("div", Fn, [
853
+ t("div", Jn, [
854
854
  o[8] || (o[8] = t("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
855
855
  t("div", Xn, [
856
856
  p(i, {
@@ -896,10 +896,10 @@ function qn(u, o, r, e, d, b) {
896
896
  ])
897
897
  ]);
898
898
  }
899
- const Zn = /* @__PURE__ */ F(On, [["render", qn], ["__scopeId", "data-v-f44b8182"]]), Gn = {
899
+ const Zn = /* @__PURE__ */ J(On, [["render", qn], ["__scopeId", "data-v-f44b8182"]]), Gn = {
900
900
  __name: "Main",
901
901
  setup(u) {
902
- const o = J(["bindEvent", "advancedConfig"]);
902
+ const o = F(["bindEvent", "advancedConfig"]);
903
903
  return (r, e) => (_(), w(B(ze), {
904
904
  modelValue: o.value,
905
905
  "onUpdate:modelValue": e[0] || (e[0] = (d) => o.value = d)
@@ -928,7 +928,6 @@ const Zn = /* @__PURE__ */ F(On, [["render", qn], ["__scopeId", "data-v-f44b8182
928
928
  }, 8, ["modelValue"]));
929
929
  }
930
930
  }, De = "newMethod", Wn = /[^0-9a-zA-Z_$]/, Qn = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, ee = {
931
- default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
932
931
  exist: "方法名称已存在",
933
932
  ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
934
933
  empty: "方法名称不能为空"
@@ -1025,16 +1024,16 @@ function ro(u, o, r, e, d, b) {
1025
1024
  options: e.editorOptions,
1026
1025
  onChange: e.editorContentChange,
1027
1026
  class: "monaco-editor"
1028
- }, null, 8, ["value", "options", "onChange"])) : H("", !0),
1029
- e.context.enableExtraParams ? H("", !0) : (_(), A("div", ao))
1027
+ }, null, 8, ["value", "options", "onChange"])) : K("", !0),
1028
+ e.context.enableExtraParams ? K("", !0) : (_(), A("div", ao))
1030
1029
  ]),
1031
- !e.context.isValidParams && e.context.enableExtraParams ? (_(), A("div", lo, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : H("", !0)
1030
+ !e.context.isValidParams && e.context.enableExtraParams ? (_(), A("div", lo, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : K("", !0)
1032
1031
  ], 2)
1033
1032
  ]);
1034
1033
  }
1035
- const co = /* @__PURE__ */ F(eo, [["render", ro], ["__scopeId", "data-v-2807a818"]]), mo = {
1034
+ const co = /* @__PURE__ */ J(eo, [["render", ro], ["__scopeId", "data-v-2807a818"]]), mo = {
1036
1035
  components: {
1037
- TinySearch: Je,
1036
+ TinySearch: Fe,
1038
1037
  IconYes: Qe()
1039
1038
  },
1040
1039
  props: {
@@ -1044,7 +1043,7 @@ const co = /* @__PURE__ */ F(eo, [["render", ro], ["__scopeId", "data-v-2807a818
1044
1043
  }
1045
1044
  },
1046
1045
  setup(u) {
1047
- const { getMethodNameList: o } = Z(G.Page), r = J(""), e = J([]), d = Ve("context"), b = (v, c) => {
1046
+ const { getMethodNameList: o } = Z(G.Page), r = F(""), e = F([]), d = Ve("context"), b = (v, c) => {
1048
1047
  const i = v.map((a) => {
1049
1048
  var s;
1050
1049
  return Number.parseInt((s = a.match(/\d+$/)) == null ? void 0 : s[0]) || 0;
@@ -1095,7 +1094,7 @@ function _o(u, o, r, e, d, b) {
1095
1094
  c.name === e.context.bindMethodInfo.name ? (_(), w(v, {
1096
1095
  key: 0,
1097
1096
  class: "action-selected-icon"
1098
- })) : H("", !0)
1097
+ })) : K("", !0)
1099
1098
  ], 2)
1100
1099
  ], 8, go))), 128))
1101
1100
  ])
@@ -1103,7 +1102,7 @@ function _o(u, o, r, e, d, b) {
1103
1102
  ])
1104
1103
  ]);
1105
1104
  }
1106
- const bo = /* @__PURE__ */ F(mo, [["render", _o], ["__scopeId", "data-v-1d973569"]]), Po = {
1105
+ const bo = /* @__PURE__ */ J(mo, [["render", _o], ["__scopeId", "data-v-1d973569"]]), Po = {
1107
1106
  ...te,
1108
1107
  entry: Gn,
1109
1108
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-setting-events",
3
- "version": "2.2.0-rc.1",
3
+ "version": "2.2.1",
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.2.0-rc.1",
29
- "@opentiny/tiny-engine-configurator": "2.2.0-rc.1",
30
- "@opentiny/tiny-engine-meta-register": "2.2.0-rc.1",
31
- "@opentiny/tiny-engine-utils": "2.2.0-rc.1"
28
+ "@opentiny/tiny-engine-common": "2.2.1",
29
+ "@opentiny/tiny-engine-configurator": "2.2.1",
30
+ "@opentiny/tiny-engine-meta-register": "2.2.0",
31
+ "@opentiny/tiny-engine-utils": "2.2.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.2.0-rc.1",
34
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.2.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": "b5789c51f4bd4c3dd2a48bd7a2919eb5a6564a79"
44
+ "gitHead": "589fcf9717f4ba565ded2f2eb520d5066a53ab64"
45
45
  }