@kp-ui/lowcode 2.14.0-beta.2 → 2.14.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kp-ui/lowcode",
3
- "version": "2.14.0-beta.2",
3
+ "version": "2.14.0-beta.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -2,7 +2,7 @@ import t from "./index.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2de83fcf"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-5def8b02"]]);
6
6
  export {
7
- p as default
7
+ a as default
8
8
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as ue, mergeModels as ce, useModel as B, inject as ve, ref as i, provide as I, computed as j, watchEffect as fe, watch as L, onBeforeMount as ge, resolveComponent as p, createElementBlock as P, openBlock as r, Fragment as w, createVNode as d, withCtx as u, createBlock as y, createCommentVNode as U, unref as _, createElementVNode as K, withModifiers as pe, renderList as z, normalizeClass as me, resolveDynamicComponent as ye } from "vue";
1
+ import { defineComponent as ue, mergeModels as ce, useModel as B, inject as ve, ref as a, provide as I, computed as j, watchEffect as fe, watch as L, onBeforeMount as ge, resolveComponent as p, createElementBlock as P, openBlock as r, Fragment as w, createVNode as d, withCtx as u, createBlock as y, createCommentVNode as U, unref as E, createElementVNode as K, withModifiers as pe, renderList as z, normalizeClass as me, resolveDynamicComponent as ye } from "vue";
2
2
  import D from "./property-editor/index.js";
3
- import { TpfCodeEditor as _e } from "tmgc2-share";
4
- import Ce from "./form-setting.vue.js";
5
- import Ee from "./form-crud-setting.vue.js";
6
- import be, { propertyRegistered as he } from "./propertyRegister.js";
3
+ import { TpfCodeEditor as Ee } from "tmgc2-share";
4
+ import _e from "./form-setting.vue.js";
5
+ import Ce from "./form-crud-setting.vue.js";
6
+ import be, { propertyRegistered as he, getPropertyEditor as Pe } from "./propertyRegister.js";
7
7
  import { get as q } from "../../../utils/smart-vue-i18n/utils.js";
8
- import { useEmitter as Pe } from "../../../utils/useEmitter.js";
9
- import { useI18n as we } from "../../../utils/i18n.js";
10
- const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" }, He = { class: "ds-setting-scrollbar" }, Te = /* @__PURE__ */ ue({
8
+ import { useEmitter as we } from "../../../utils/useEmitter.js";
9
+ import { useI18n as Me } from "../../../utils/i18n.js";
10
+ const He = { class: "setting-scrollbar" }, Se = { class: "setting-scrollbar" }, ke = { class: "ds-setting-scrollbar" }, We = /* @__PURE__ */ ue({
11
11
  name: "SettingPanel",
12
12
  componentName: "SettingPanel",
13
13
  __name: "index",
@@ -27,9 +27,9 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
27
27
  }),
28
28
  emits: ["update:form-config", "update:selected-widget"],
29
29
  setup(M, { expose: G }) {
30
- const { i18nt: c } = we(), { COMMON_PROPERTIES: O, ADVANCED_PROPERTIES: R, EVENT_PROPERTIES: T } = be, v = M, $ = B(M, "form-config"), C = Pe(), Q = v.globalDsv || {}, X = ve("getDesignerConfig"), W = i(!1);
30
+ const { i18nt: c } = Me(), { COMMON_PROPERTIES: O, ADVANCED_PROPERTIES: R, EVENT_PROPERTIES: T } = be, v = M, H = B(M, "form-config"), _ = we(), Q = v.globalDsv || {}, X = ve("getDesignerConfig"), W = a(!1);
31
31
  I("isSubFormChildWidget", () => W.value), I("getGlobalDsv", () => Q);
32
- const H = i(), F = i(""), E = i("javascript"), S = i("2"), J = i(["1", "2", "3"]), f = i(""), m = i(""), k = i(""), o = B(M, "selected-widget"), x = j(() => X()), l = j({
32
+ const S = a(), F = a(""), C = a("javascript"), k = a("2"), J = a(["1", "2", "3"]), f = a(""), m = a(""), $ = a(""), o = B(M, "selected-widget"), x = j(() => X()), l = j({
33
33
  get() {
34
34
  var e;
35
35
  return ((e = o.value) == null ? void 0 : e.options) || {};
@@ -48,7 +48,7 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
48
48
  const n = e.replace(o.value.type + "-", "");
49
49
  return v.designer.hasConfig(o.value, n);
50
50
  }, ee = (e, t) => {
51
- const n = e.replace(o.value.type + "-", "") + "-editor", s = `${o.value.type}-${n}-editor`;
51
+ const n = e.replace(o.value.type + "-", ""), s = Pe(n);
52
52
  return D[s] ? D[s] : D[n];
53
53
  }, V = (e) => {
54
54
  let t = !1;
@@ -90,41 +90,41 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
90
90
  }
91
91
  ].filter((s) => s.visible);
92
92
  }), ne = () => {
93
- C.off$("onChangeEventHandler"), C.on$("onChangeEventHandler", ({ title: e, attr: t, eventParams: n = [], mode: s }) => {
93
+ _.off$("onChangeEventHandler"), _.on$("onChangeEventHandler", ({ title: e, attr: t, eventParams: n = [], mode: s }) => {
94
94
  F.value = e || c("designer.setting.editWidgetEventHandler");
95
95
  const g = s === "json";
96
- m.value = t, E.value = s;
96
+ m.value = t, C.value = s;
97
97
  const b = `${l.value.name}.${t}`;
98
- k.value = g ? `${b}{` : `${b}(${n.join(", ")}) {`, f.value = q(o.value.options, t) || "", s === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), t === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
98
+ $.value = g ? `${b}{` : `${b}(${n.join(", ")}) {`, f.value = q(o.value.options, t) || "", s === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), t === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
99
99
  /*
100
100
  if ((value > 100) || (value < 0)) {
101
101
  return Promise.reject('error message') //fail
102
102
  } else {
103
103
  return Promise.resolve(); //pass
104
104
  }
105
- */`), H.value.open(f.value);
105
+ */`), S.value.open(f.value);
106
106
  });
107
107
  }, oe = (e, t, n = "javascript") => {
108
108
  const s = n === "json";
109
- m.value = e, E.value = n;
109
+ m.value = e, C.value = n;
110
110
  const g = `${l.value.name}.${e}`;
111
- k.value = s ? `${g}{` : `${g}(${t.join(", ")}) {`, f.value = q(o.value.options, e) || "", n === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), e === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
111
+ $.value = s ? `${g}{` : `${g}(${t.join(", ")}) {`, f.value = q(o.value.options, e) || "", n === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), e === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
112
112
  /*
113
113
  if ((value > 100) || (value < 0)) {
114
114
  return Promise.reject('error message') //fail
115
115
  } else {
116
116
  return Promise.resolve(); //pass
117
117
  }
118
- */`), H.value.open(f.value);
118
+ */`), S.value.open(f.value);
119
119
  }, se = (e) => {
120
- if (E.value === "json" && (e = JSON.parse(e)), m.value.includes(".")) {
120
+ if (C.value === "json" && (e = JSON.parse(e)), m.value.includes(".")) {
121
121
  const [t, n] = m.value.split(".");
122
122
  o.value.options[t][n] = e;
123
123
  } else
124
124
  o.value.options[m.value] = e;
125
125
  };
126
126
  return fe(() => {
127
- o.value && (S.value = "1");
127
+ o.value && (k.value = "1");
128
128
  }), L(
129
129
  () => {
130
130
  var e;
@@ -141,7 +141,7 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
141
141
  },
142
142
  { deep: !0 }
143
143
  ), ge(() => {
144
- C.on$("editEventHandler", (e) => {
144
+ _.on$("editEventHandler", (e) => {
145
145
  oe(e[0], e[1], e[2]);
146
146
  }), ne(), v.designer.handleEvent("form-css-updated", (e) => {
147
147
  v.designer.setCssClassList(e);
@@ -149,26 +149,26 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
149
149
  W.value = !!e && e.type === "sub-form";
150
150
  });
151
151
  }), G({
152
- emit$: C.emit$
152
+ emit$: _.emit$
153
153
  }), (e, t) => {
154
- const n = p("a-collapse-panel"), s = p("a-collapse"), g = p("a-form"), b = p("a-empty"), N = p("a-tab-pane"), le = p("a-tabs"), ae = p("a-layout"), ie = p("a-config-provider");
154
+ const n = p("a-collapse-panel"), s = p("a-collapse"), g = p("a-form"), b = p("a-empty"), N = p("a-tab-pane"), le = p("a-tabs"), ie = p("a-layout"), ae = p("a-config-provider");
155
155
  return r(), P(w, null, [
156
- d(ie, { componentSize: "small" }, {
156
+ d(ae, { componentSize: "small" }, {
157
157
  default: u(() => [
158
- d(ae, { class: "panel-container" }, {
158
+ d(ie, { class: "panel-container" }, {
159
159
  default: u(() => [
160
160
  d(le, {
161
- activeKey: S.value,
162
- "onUpdate:activeKey": t[4] || (t[4] = (a) => S.value = a),
161
+ activeKey: k.value,
162
+ "onUpdate:activeKey": t[4] || (t[4] = (i) => k.value = i),
163
163
  style: { height: "100%", width: "100%", overflow: "hidden" }
164
164
  }, {
165
165
  default: u(() => [
166
166
  d(N, {
167
- tab: _(c)("designer.hint.widgetSetting"),
167
+ tab: E(c)("designer.hint.widgetSetting"),
168
168
  key: "1"
169
169
  }, {
170
170
  default: u(() => [
171
- K("div", Me, [
171
+ K("div", He, [
172
172
  e.designer.selectedWidget ? (r(), y(g, {
173
173
  key: 0,
174
174
  model: l.value,
@@ -181,17 +181,17 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
181
181
  default: u(() => [
182
182
  d(s, {
183
183
  activeKey: J.value,
184
- "onUpdate:activeKey": t[1] || (t[1] = (a) => J.value = a),
184
+ "onUpdate:activeKey": t[1] || (t[1] = (i) => J.value = i),
185
185
  class: "setting-collapse"
186
186
  }, {
187
187
  default: u(() => [
188
- (r(!0), P(w, null, z(te.value, (a) => (r(), y(n, {
189
- key: a.key,
190
- class: me(a.className),
191
- header: a.headerKey
188
+ (r(!0), P(w, null, z(te.value, (i) => (r(), y(n, {
189
+ key: i.key,
190
+ class: me(i.className),
191
+ header: i.headerKey
192
192
  }, {
193
193
  default: u(() => [
194
- (r(!0), P(w, null, z(a.props, (re, h) => (r(), P(w, null, [
194
+ (r(!0), P(w, null, z(i.props, (re, h) => (r(), P(w, null, [
195
195
  A(h, re) ? (r(), y(ye(ee(h)), {
196
196
  key: h,
197
197
  designer: e.designer,
@@ -211,36 +211,36 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
211
211
  _: 1
212
212
  }, 8, ["model"])) : (r(), y(b, {
213
213
  key: 1,
214
- description: _(c)("designer.hint.noSelectedWidgetHint")
214
+ description: E(c)("designer.hint.noSelectedWidgetHint")
215
215
  }, null, 8, ["description"]))
216
216
  ])
217
217
  ]),
218
218
  _: 1
219
219
  }, 8, ["tab"]),
220
220
  e.designer ? (r(), y(N, {
221
- tab: _(c)("designer.hint.表单设置"),
221
+ tab: E(c)("designer.hint.表单设置"),
222
222
  key: "2"
223
223
  }, {
224
224
  default: u(() => [
225
- K("div", $e, [
226
- d(Ce, {
225
+ K("div", Se, [
226
+ d(_e, {
227
227
  designer: e.designer,
228
- "form-config": $.value
228
+ "form-config": H.value
229
229
  }, null, 8, ["designer", "form-config"])
230
230
  ])
231
231
  ]),
232
232
  _: 1
233
233
  }, 8, ["tab"])) : U("", !0),
234
234
  d(N, {
235
- tab: _(c)("designer.hint.表单api配置"),
235
+ tab: E(c)("designer.hint.表单api配置"),
236
236
  key: "3"
237
237
  }, {
238
238
  default: u(() => [
239
- K("div", He, [
240
- d(Ee, {
239
+ K("div", ke, [
240
+ d(Ce, {
241
241
  designer: e.designer,
242
- "form-config": $.value,
243
- "onUpdate:formConfig": t[3] || (t[3] = (a) => $.value = a)
242
+ "form-config": H.value,
243
+ "onUpdate:formConfig": t[3] || (t[3] = (i) => H.value = i)
244
244
  }, null, 8, ["designer", "form-config"])
245
245
  ])
246
246
  ]),
@@ -255,12 +255,12 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
255
255
  ]),
256
256
  _: 1
257
257
  }),
258
- d(_(_e), {
259
- eventHeader: k.value,
258
+ d(E(Ee), {
259
+ eventHeader: $.value,
260
260
  ref_key: "CodeModalEditorRef",
261
- ref: H,
261
+ ref: S,
262
262
  title: F.value,
263
- mode: E.value,
263
+ mode: C.value,
264
264
  readonly: !1,
265
265
  onSetCode: se
266
266
  }, null, 8, ["eventHeader", "title", "mode"])
@@ -269,5 +269,5 @@ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" },
269
269
  }
270
270
  });
271
271
  export {
272
- Te as default
272
+ We as default
273
273
  };
@@ -197,12 +197,16 @@ const e = {
197
197
  function d(o) {
198
198
  return !!e[o] || !!t[o] || !!i[o];
199
199
  }
200
- const r = {
200
+ function r(o) {
201
+ return e[o] || t[o] || i[o];
202
+ }
203
+ const n = {
201
204
  COMMON_PROPERTIES: e,
202
205
  ADVANCED_PROPERTIES: t,
203
206
  EVENT_PROPERTIES: i
204
207
  };
205
208
  export {
206
- r as default,
209
+ n as default,
210
+ r as getPropertyEditor,
207
211
  d as propertyRegistered
208
212
  };