@kp-ui/lowcode 2.15.0-alpha.5 → 2.15.0-alpha.7

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.15.0-alpha.5",
3
+ "version": "2.15.0-alpha.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,13 +1,13 @@
1
- import { defineComponent as F, computed as D, ref as n, getCurrentInstance as j, onMounted as x, watch as O } from "vue";
1
+ import { defineComponent as D, computed as j, ref as n, getCurrentInstance as x, onMounted as L, watch as O } from "vue";
2
2
  import v from "../form-render/dynamic-dialog.vue.js";
3
- import L from "./FormContainer.js";
4
- import { useFormContext as R } from "./useFormContext.js";
5
- import { useI18n as S } from "../../utils/i18n.js";
6
- import { storeToRefs as h } from "pinia";
7
- import { useLocaleStore as B } from "@kp-ui/i18n";
8
- import { getLocat as J } from "@kp-ui/tool";
9
- import N from "./Debugger.vue.js";
10
- const E = /* @__PURE__ */ F({
3
+ import R from "./FormContainer.js";
4
+ import { useFormContext as S } from "./useFormContext.js";
5
+ import { useI18n as h } from "../../utils/i18n.js";
6
+ import { storeToRefs as B } from "pinia";
7
+ import { useLocaleStore as J } from "@kp-ui/i18n";
8
+ import { getLocat as N } from "@kp-ui/tool";
9
+ import V from "./Debugger.vue.js";
10
+ const G = /* @__PURE__ */ D({
11
11
  name: "VFormRender",
12
12
  componentName: "VFormRender",
13
13
  __name: "index",
@@ -24,14 +24,14 @@ const E = /* @__PURE__ */ F({
24
24
  debug: { type: Boolean, required: !1 }
25
25
  },
26
26
  emits: ["form-submit", "form-cancel"],
27
- setup(l, { expose: u, emit: d }) {
28
- const { initLocale: a } = S(), m = B(), { locale: t } = h(m), c = D(() => J().debug === "1"), p = n(!1), g = j(), o = l, r = n(), b = n(), i = d, e = R({
27
+ setup(u, { expose: d, emit: c }) {
28
+ const { initLocale: a } = h(), i = J(), { locale: t } = B(i), p = j(() => N().debug === "1"), g = n(!1), b = x(), o = u, r = n(), y = n(), m = c, e = S({
29
29
  props: o,
30
30
  renderForm: r
31
- }), y = (q) => {
32
- i("form-submit", q);
31
+ }), C = (F) => {
32
+ m("form-submit", F);
33
33
  };
34
- x(() => {
34
+ L(() => {
35
35
  e.registerToRefList("v_form_ref");
36
36
  }), O(
37
37
  t,
@@ -42,19 +42,21 @@ const E = /* @__PURE__ */ F({
42
42
  immediate: !0
43
43
  }
44
44
  );
45
- const { dynamicDialgRef: C, dialogProps: _, emitter: s } = e;
46
- u({
47
- ...s,
45
+ const s = () => {
46
+ }, { dynamicDialgRef: _, dialogProps: q, emitter: f } = e;
47
+ d({
48
+ ...f,
48
49
  ...e,
50
+ setLoading: s,
49
51
  formJson: o.formJson,
50
52
  renderForm: r
51
53
  });
52
- const f = { initLocale: a, localeStore: m, locale: t, debug: c, debugVisible: p, instance: g, props: o, renderForm: r, formContainer: b, emit: i, formContext: e, handleFormSubmit: y, dynamicDialgRef: C, dialogProps: _, emitter: s, DynamicDialog: v, get FormContainer() {
53
- return L;
54
- }, Debugger: N };
55
- return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
54
+ const l = { initLocale: a, localeStore: i, locale: t, debug: p, debugVisible: g, instance: b, props: o, renderForm: r, formContainer: y, emit: m, formContext: e, handleFormSubmit: C, setLoading: s, dynamicDialgRef: _, dialogProps: q, emitter: f, DynamicDialog: v, get FormContainer() {
55
+ return R;
56
+ }, Debugger: V };
57
+ return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
56
58
  }
57
59
  });
58
60
  export {
59
- E as default
61
+ G as default
60
62
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as g, computed as c, ref as y } from "vue";
2
- import { useI18n as _ } from "../../../../utils/i18n.js";
3
- import h from "../RenderDesignerWigetList.vue.js";
4
- import C from "../widgetAction.vue.js";
5
- import { useContainerWidget as q } from "./useContainerWidget.js";
6
- import { useAppRef as w } from "../../useAppRef.js";
7
- import { ComponentNameEnum as b, ContainerTypeEnum as W } from "../../../../constants/WidgetTypeEnum.js";
8
- const D = /* @__PURE__ */ g({
1
+ import { defineComponent as c, computed as g, ref as y } from "vue";
2
+ import { useI18n as b } from "../../../../utils/i18n.js";
3
+ import _ from "../RenderDesignerWigetList.vue.js";
4
+ import h from "../widgetAction.vue.js";
5
+ import { useContainerWidget as C } from "./useContainerWidget.js";
6
+ import { useAppRef as q } from "../../useAppRef.js";
7
+ import { ComponentNameEnum as w, ContainerTypeEnum as W } from "../../../../constants/WidgetTypeEnum.js";
8
+ const H = /* @__PURE__ */ c({
9
9
  name: W.GridColWidget,
10
- componentName: b.ContainerWidget,
10
+ componentName: w.ContainerWidget,
11
11
  inheritAttrs: !1,
12
12
  __name: "grid-col-widget",
13
13
  props: {
14
- widget: { type: null, required: !0 },
15
- field: { type: null, required: !0 },
16
- parentWidget: { type: null, required: !0 },
14
+ widget: { type: Object, required: !0 },
15
+ field: { type: Object, required: !0 },
16
+ parentWidget: { type: [Object, null], required: !0 },
17
17
  parentList: { type: Array, required: !0 },
18
18
  indexOfParentList: { type: Number, required: !1 },
19
19
  subFormRowIndex: { type: Number, required: !1 },
@@ -22,24 +22,24 @@ const D = /* @__PURE__ */ g({
22
22
  },
23
23
  setup(i, { expose: o }) {
24
24
  o();
25
- const e = i, { i18nt: n } = _(), {
25
+ const e = i, { i18nt: n } = b(), {
26
26
  designState: s,
27
27
  selected: p,
28
28
  selectWidget: u,
29
29
  customClass: d,
30
- onContainerDragAdd: l,
31
- onContainerDragUpdate: a
32
- } = q(e), m = c(() => e.colHeight ? { height: e.colHeight } : {}), f = y({
30
+ onContainerDragAdd: a,
31
+ onContainerDragUpdate: l
32
+ } = C(e), m = g(() => e.colHeight ? { height: e.colHeight } : {}), f = y({
33
33
  span: e.widget.options.span || 12,
34
34
  offset: e.widget.options.offset || 0,
35
35
  push: e.widget.options.push || 0,
36
36
  pull: e.widget.options.pull || 0
37
- }), { initRefList: t } = w(e);
37
+ }), { initRefList: t } = q(e);
38
38
  t();
39
- const r = { props: e, i18nt: n, designState: s, selected: p, selectWidget: u, customClass: d, onContainerDragAdd: l, onContainerDragUpdate: a, colHeightStyle: m, layoutProps: f, initRefList: t, RenderDesignerWigetList: h, WidgetAction: C };
39
+ const r = { props: e, i18nt: n, designState: s, selected: p, selectWidget: u, customClass: d, onContainerDragAdd: a, onContainerDragUpdate: l, colHeightStyle: m, layoutProps: f, initRefList: t, RenderDesignerWigetList: _, WidgetAction: h };
40
40
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
41
41
  }
42
42
  });
43
43
  export {
44
- D as default
44
+ H as default
45
45
  };
@@ -1,11 +1,11 @@
1
- import m from "./index.vue2.js";
2
- import { resolveComponent as i, createBlock as _, openBlock as h, withCtx as o, createVNode as t, createSlots as v, renderList as W, renderSlot as b, createElementVNode as u } from "vue";
1
+ import _ from "./index.vue2.js";
2
+ import { resolveComponent as d, resolveDirective as h, createBlock as v, openBlock as W, withCtx as o, createVNode as t, createSlots as b, renderList as u, renderSlot as w, createElementVNode as y, withDirectives as x } from "vue";
3
3
  /* empty css */
4
- import w from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const y = { class: "container-scroll-bar" };
6
- function x(a, l, d, e, p, C) {
7
- const r = i("a-layout-sider"), c = i("a-layout-header"), s = i("a-layout-content"), f = i("a-layout");
8
- return h(), _(f, { class: "main-container full-height" }, {
4
+ import D from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ const C = { class: "container-scroll-bar" };
6
+ function U(a, i, n, e, k, p) {
7
+ const r = d("a-layout-sider"), c = d("a-layout-header"), s = d("a-layout-content"), f = d("a-layout"), m = h("loading");
8
+ return W(), v(f, { class: "main-container full-height" }, {
9
9
  default: o(() => [
10
10
  t(f, null, {
11
11
  default: o(() => [
@@ -24,21 +24,21 @@ function x(a, l, d, e, p, C) {
24
24
  t(c, { class: "toolbar-header" }, {
25
25
  default: o(() => [
26
26
  t(e.ToolbarPanel, {
27
- saveJsonApi: d.saveJsonApi,
28
- "global-dsv": d.globalDsv,
27
+ saveJsonApi: n.saveJsonApi,
28
+ "global-dsv": n.globalDsv,
29
29
  leftWidth: e.leftWidth,
30
- "onUpdate:leftWidth": l[0] || (l[0] = (n) => e.leftWidth = n),
30
+ "onUpdate:leftWidth": i[0] || (i[0] = (l) => e.leftWidth = l),
31
31
  rightWidth: e.rightWidth,
32
- "onUpdate:rightWidth": l[1] || (l[1] = (n) => e.rightWidth = n),
32
+ "onUpdate:rightWidth": i[1] || (i[1] = (l) => e.rightWidth = l),
33
33
  ref: "toolbarRef"
34
- }, v({
34
+ }, b({
35
35
  _: 2
36
36
  /* DYNAMIC */
37
37
  }, [
38
- W(a.$slots, (n, g) => ({
38
+ u(a.$slots, (l, g) => ({
39
39
  name: g,
40
40
  fn: o(() => [
41
- b(a.$slots, g)
41
+ w(a.$slots, g)
42
42
  ])
43
43
  }))
44
44
  ]), 1032, ["saveJsonApi", "global-dsv", "leftWidth", "rightWidth"])
@@ -48,12 +48,14 @@ function x(a, l, d, e, p, C) {
48
48
  }),
49
49
  t(s, { class: "form-widget-main" }, {
50
50
  default: o(() => [
51
- u("div", y, [
52
- t(e.VFormWidget, {
53
- "global-dsv": d.globalDsv,
51
+ y("div", C, [
52
+ x(t(e.VFormWidget, {
53
+ "global-dsv": n.globalDsv,
54
54
  "form-config": e.designer.formConfig,
55
55
  ref: "formRef"
56
- }, null, 8, ["global-dsv", "form-config"])
56
+ }, null, 8, ["global-dsv", "form-config"]), [
57
+ [m, e.isLoading]
58
+ ])
57
59
  ])
58
60
  ]),
59
61
  _: 1
@@ -67,8 +69,8 @@ function x(a, l, d, e, p, C) {
67
69
  default: o(() => [
68
70
  t(e.SettingPanel, {
69
71
  "selected-widget": e.designer.selectedWidget,
70
- "onUpdate:selectedWidget": l[2] || (l[2] = (n) => e.designer.selectedWidget = n),
71
- "global-dsv": d.globalDsv,
72
+ "onUpdate:selectedWidget": i[2] || (i[2] = (l) => e.designer.selectedWidget = l),
73
+ "global-dsv": n.globalDsv,
72
74
  "form-config": e.designer.formConfig
73
75
  }, null, 8, ["selected-widget", "global-dsv", "form-config"])
74
76
  ]),
@@ -84,7 +86,7 @@ function x(a, l, d, e, p, C) {
84
86
  /* FORWARDED */
85
87
  });
86
88
  }
87
- const J = /* @__PURE__ */ w(m, [["render", x], ["__file", "/Users/zhaopeng/dev/kunpeng/tmgc2-web-vfrom/src/components/form-designer/index.vue"]]);
89
+ const V = /* @__PURE__ */ D(_, [["render", U], ["__file", "/Users/zhaopeng/dev/kunpeng/tmgc2-web-vfrom/src/components/form-designer/index.vue"]]);
88
90
  export {
89
- J as default
91
+ V as default
90
92
  };
@@ -1,23 +1,24 @@
1
- import { defineComponent as x, ref as o, provide as i, getCurrentInstance as B, computed as P, watch as E, onMounted as I } from "vue";
2
- import N from "./widget-panel/index.vue.js";
3
- import V from "./toolbar-panel/index.vue.js";
4
- import j from "./setting-panel/index.vue.js";
5
- import H from "./form-widget/index.vue.js";
6
- import { createDesigner as O } from "./designer.js";
7
- import { useLocaleStore as T } from "@kp-ui/i18n";
8
- import { deepClone as W, getAllFieldWidgets as _, getAllContainerWidgets as w } from "../../utils/util.js";
9
- import { isEmpty as S } from "lodash-es";
10
- import { useI18n as D } from "../../utils/i18n.js";
11
- import { message as J } from "ant-design-vue";
12
- import { storeToRefs as M } from "pinia";
13
- const re = /* @__PURE__ */ x({
1
+ import { defineComponent as P, ref as o, provide as i, getCurrentInstance as E, computed as I, watch as N, onMounted as V } from "vue";
2
+ import j from "./widget-panel/index.vue.js";
3
+ import H from "./toolbar-panel/index.vue.js";
4
+ import O from "./setting-panel/index.vue.js";
5
+ import T from "./form-widget/index.vue.js";
6
+ import { createDesigner as M } from "./designer.js";
7
+ import { useLocaleStore as k } from "@kp-ui/i18n";
8
+ import { deepClone as w, getAllFieldWidgets as S, getAllContainerWidgets as D } from "../../utils/util.js";
9
+ import { isEmpty as J } from "lodash-es";
10
+ import { useI18n as A } from "../../utils/i18n.js";
11
+ import { message as R } from "ant-design-vue";
12
+ import { storeToRefs as z } from "pinia";
13
+ import { useRef as G } from "tmgc2-share";
14
+ const se = /* @__PURE__ */ P({
14
15
  name: "VFormDesigner",
15
16
  componentName: "VFormDesigner",
16
17
  __name: "index",
17
18
  props: {
18
19
  saveJsonApi: { type: Function, required: !0 },
19
20
  fieldListApi: { type: Function, required: !0 },
20
- designerConfig: { type: Object, required: !0, default: () => ({
21
+ designerConfig: { type: Object, required: !1, default: () => ({
21
22
  eventCollapse: !0,
22
23
  //是否显示组件事件属性折叠面板
23
24
  widgetNameReadonly: !1,
@@ -31,47 +32,51 @@ const re = /* @__PURE__ */ x({
31
32
  exportJsonButton: !0
32
33
  //是否显示导出JSON器按钮
33
34
  }) },
34
- globalDsv: { type: Object, required: !0, default: () => ({}) }
35
+ globalDsv: { type: Object, required: !1, default: () => ({}) }
35
36
  },
36
- setup(A, { expose: R }) {
37
- const l = o(), { i18nt: u } = D(), m = T(), { locale: s } = M(m), n = A;
37
+ setup(b, { expose: q }) {
38
+ const l = o(), { i18nt: f } = A(), u = k(), { locale: s } = z(u), n = b;
38
39
  i("serverFieldList", () => a.value), i("designState", !0);
39
- const b = o(270), q = o(300), a = o([]), { initLocale: f } = D(), d = B(), t = o(O(d)), g = P(() => t.value.formConfig);
40
+ const x = o(270), B = o(300), a = o([]), { initLocale: m } = A(), d = E(), t = o(M(d)), g = I(() => t.value.formConfig);
40
41
  i("formConfig", g), i("designer", t), i("getDesignerConfig", () => n.designerConfig);
41
42
  const c = (e) => {
42
- if (!S(e))
43
+ if (!J(e))
43
44
  try {
44
45
  if (!e || !e.formConfig)
45
- throw new Error(u("designer.hint.invalidJsonFormat"));
46
+ throw new Error(f("designer.hint.invalidJsonFormat"));
46
47
  t.value.loadFormJson(e), t.value.emitHistoryChange(), t.value.emitEvent("form-json-imported", []);
47
48
  } catch (r) {
48
- J.error(r + "");
49
+ R.error(r + "");
49
50
  }
50
51
  }, p = async () => {
51
52
  n.fieldListApi && (a.value = await n.fieldListApi());
52
53
  }, v = (e) => {
53
- if (!S(e))
54
+ if (!J(e))
54
55
  try {
55
56
  let r = !1;
56
57
  typeof e == "string" ? r = t.value.loadFormJson(JSON.parse(e)) : e.constructor === Object && (r = t.value.loadFormJson(e)), r && t.value.emitHistoryChange();
57
58
  } catch (r) {
58
- J.error(r + "");
59
+ R.error(r + "");
59
60
  }
60
61
  }, F = () => ({
61
- widgetList: W(t.value.widgetList),
62
- formConfig: W(t.value.formConfig)
63
- }), C = (e = []) => e.length ? _(e) : _(t.value.widgetList), y = (e = []) => e.length ? w(e) : w(t.value.widgetList), h = (e, r = !1) => l.value.getWidgetRef(e, r);
64
- E(
62
+ widgetList: w(t.value.widgetList),
63
+ formConfig: w(t.value.formConfig)
64
+ }), C = (e = []) => e.length ? S(e) : S(t.value.widgetList), y = (e = []) => e.length ? D(e) : D(t.value.widgetList), h = (e, r = !1) => l.value.getWidgetRef(e, r);
65
+ N(
65
66
  s,
66
67
  () => {
67
- f(s.value);
68
+ m(s.value);
68
69
  },
69
70
  {
70
71
  immediate: !0
71
72
  }
72
- ), I(() => {
73
+ );
74
+ const [L, W] = G(!1);
75
+ V(() => {
73
76
  t.value.initDesigner(), p();
74
- }), R({
77
+ }), q({
78
+ isLoading: L,
79
+ setLoading: W,
75
80
  getWidgetRef: h,
76
81
  getContainerWidgets: y,
77
82
  getFieldWidgets: C,
@@ -79,10 +84,10 @@ const re = /* @__PURE__ */ x({
79
84
  setFormJson: v,
80
85
  setJsonImport: c
81
86
  });
82
- const L = { formRef: l, i18nt: u, localeStore: m, locale: s, props: n, leftWidth: b, rightWidth: q, fieldList: a, initLocale: f, instance: d, designer: t, formConfig: g, setJsonImport: c, loadFieldListFromServer: p, setFormJson: v, getFormJson: F, getFieldWidgets: C, getContainerWidgets: y, getWidgetRef: h, WidgetPanel: N, ToolbarPanel: V, SettingPanel: j, VFormWidget: H };
83
- return Object.defineProperty(L, "__isScriptSetup", { enumerable: !1, value: !0 }), L;
87
+ const _ = { formRef: l, i18nt: f, localeStore: u, locale: s, props: n, leftWidth: x, rightWidth: B, fieldList: a, initLocale: m, instance: d, designer: t, formConfig: g, setJsonImport: c, loadFieldListFromServer: p, setFormJson: v, getFormJson: F, getFieldWidgets: C, getContainerWidgets: y, getWidgetRef: h, isLoading: L, setLoading: W, WidgetPanel: j, ToolbarPanel: H, SettingPanel: O, VFormWidget: T };
88
+ return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
84
89
  }
85
90
  });
86
91
  export {
87
- re as default
92
+ se as default
88
93
  };
@@ -18,12 +18,12 @@ const be = /* @__PURE__ */ B({
18
18
  props: /* @__PURE__ */ z({
19
19
  globalDsv: { type: Object, required: !1 }
20
20
  }, {
21
- "selected-widget": { type: Object, default: () => ({}) },
21
+ "selected-widget": { type: [Object, null], required: !0, default: () => ({}) },
22
22
  "selected-widgetModifiers": {}
23
23
  }),
24
24
  emits: ["update:selected-widget"],
25
25
  setup($, { expose: A }) {
26
- const { formConfig: S, designer: a } = ae(), { i18nt: d } = re(), { COMMON_PROPERTIES: H, ADVANCED_PROPERTIES: M, EVENT_PROPERTIES: T } = se, _ = $, v = oe(), F = _.globalDsv || {}, N = G("getDesignerConfig"), C = i(!1);
26
+ const { formConfig: S, designer: a } = ae(), { i18nt: u } = re(), { COMMON_PROPERTIES: H, ADVANCED_PROPERTIES: M, EVENT_PROPERTIES: T } = se, _ = $, v = oe(), F = _.globalDsv || {}, N = G("getDesignerConfig"), C = i(!1);
27
27
  Q("isSubFormChildWidget", () => C.value);
28
28
  const P = i(), k = i(), p = i("javascript"), R = i("2"), J = i(["1", "2", "3"]), s = i(""), g = i(""), b = i(""), o = U($, "selected-widget"), I = E(() => N()), l = E({
29
29
  get() {
@@ -41,22 +41,22 @@ const be = /* @__PURE__ */ B({
41
41
  ), m = (e) => {
42
42
  const n = o.value.type;
43
43
  let t = {};
44
- return Object.entries(e).map(([r, u]) => {
44
+ return Object.entries(e).map(([r, d]) => {
45
45
  for (let c = 0; c < h.value.length; c++) {
46
- const q = h.value[c];
47
- if (r === q) {
48
- const f = u, j = `${n}-${f}`;
46
+ const Y = h.value[c];
47
+ if (r === Y) {
48
+ const f = d, j = `${n}-${f}`;
49
49
  y[j] ? t[j] = y[j] : y[f] && (t[f] = y[f]);
50
50
  break;
51
51
  }
52
52
  }
53
53
  }), t;
54
- }, L = E(() => {
54
+ }, q = E(() => {
55
55
  const e = m(H), n = m(M), t = m(T);
56
56
  return [
57
57
  {
58
58
  key: "1",
59
- headerKey: d("designer.setting.常见属性"),
59
+ headerKey: u("designer.setting.常见属性"),
60
60
  props: e,
61
61
  type: O.Common,
62
62
  className: "",
@@ -66,7 +66,7 @@ const be = /* @__PURE__ */ B({
66
66
  },
67
67
  {
68
68
  key: "2",
69
- headerKey: d("designer.setting.高级属性"),
69
+ headerKey: u("designer.setting.高级属性"),
70
70
  props: n,
71
71
  type: O.Advanced,
72
72
  className: "",
@@ -76,7 +76,7 @@ const be = /* @__PURE__ */ B({
76
76
  },
77
77
  {
78
78
  key: "3",
79
- headerKey: d("designer.setting.事件属性"),
79
+ headerKey: u("designer.setting.事件属性"),
80
80
  props: t,
81
81
  type: O.Event,
82
82
  className: "eventPanel",
@@ -87,11 +87,11 @@ const be = /* @__PURE__ */ B({
87
87
  ].filter((r) => r.visible);
88
88
  }), V = () => {
89
89
  v.off$("onChangeEventHandler"), v.on$("onChangeEventHandler", ({ title: e, attr: n, eventParams: t = [], mode: r }) => {
90
- k.value = e || d("designer.setting.editWidgetEventHandler");
91
- const u = r === "json";
90
+ k.value = e || u("designer.setting.editWidgetEventHandler");
91
+ const d = r === "json";
92
92
  g.value = n, p.value = r;
93
93
  const c = `${l.value.name}.${n}`;
94
- b.value = u ? `${c}{` : `${c}(${t.join(", ")}) {`, s.value = W(o.value.options, n) || "", r === "json" && (s.value = JSON.stringify(s.value, null, " ")), n === "onValidate" && !l.value.onValidate && (s.value = ` /* sample code */
94
+ b.value = d ? `${c}{` : `${c}(${t.join(", ")}) {`, s.value = W(o.value.options, n) || "", r === "json" && (s.value = JSON.stringify(s.value, null, " ")), n === "onValidate" && !l.value.onValidate && (s.value = ` /* sample code */
95
95
  /*
96
96
  if ((value > 100) || (value < 0)) {
97
97
  return Promise.reject('error message') //fail
@@ -103,8 +103,8 @@ const be = /* @__PURE__ */ B({
103
103
  }, w = (e, n, t = "javascript") => {
104
104
  const r = t === "json";
105
105
  g.value = e, p.value = t;
106
- const u = `${l.value.name}.${e}`;
107
- b.value = r ? `${u}{` : `${u}(${n.join(", ")}) {`, s.value = W(o.value.options, e) || "", t === "json" && (s.value = JSON.stringify(l.value.menuList, null, " ")), e === "onValidate" && !l.value.onValidate && (s.value = ` /* sample code */
106
+ const d = `${l.value.name}.${e}`;
107
+ b.value = r ? `${d}{` : `${d}(${n.join(", ")}) {`, s.value = W(o.value.options, e) || "", t === "json" && (s.value = JSON.stringify(l.value.menuList, null, " ")), e === "onValidate" && !l.value.onValidate && (s.value = ` /* sample code */
108
108
  /*
109
109
  if ((value > 100) || (value < 0)) {
110
110
  return Promise.reject('error message') //fail
@@ -112,12 +112,12 @@ const be = /* @__PURE__ */ B({
112
112
  return Promise.resolve(); //pass
113
113
  }
114
114
  */`), P.value.open(s.value);
115
- }, Y = (e) => {
115
+ }, L = (e) => {
116
116
  if (e != null && e.length && p.value === "json")
117
117
  try {
118
118
  e = JSON.parse(e);
119
119
  } catch {
120
- return le.error(d("designer.setting.syntaxCheckWarning"));
120
+ return le.error(u("designer.setting.syntaxCheckWarning"));
121
121
  }
122
122
  ie(o.value.options, g.value, e);
123
123
  };
@@ -149,7 +149,7 @@ const be = /* @__PURE__ */ B({
149
149
  }), A({
150
150
  emit$: v.emit$
151
151
  });
152
- const D = { formConfig: S, designer: a, i18nt: d, COMMON_PROPERTIES: H, ADVANCED_PROPERTIES: M, EVENT_PROPERTIES: T, props: _, emitter: v, globalDsv: F, getDesignerConfig: N, subFormChildWidgetFlag: C, CodeModalEditorRef: P, dialogTitle: k, currentMode: p, activeTab: R, widgetActiveCollapseNames: J, eventHandlerCode: s, curEventName: g, eventHeader: b, selectedWidget: o, designerConfig: I, optionModel: l, getEventHandled: K, selectedWidgetOptionsEditor: h, getPropEditor: m, collapsePanels: L, onChangeEventHandler: V, editEventHandler: w, saveEventHandler: Y, get TpfCodeEditor() {
152
+ const D = { formConfig: S, designer: a, i18nt: u, COMMON_PROPERTIES: H, ADVANCED_PROPERTIES: M, EVENT_PROPERTIES: T, props: _, emitter: v, globalDsv: F, getDesignerConfig: N, subFormChildWidgetFlag: C, CodeModalEditorRef: P, dialogTitle: k, currentMode: p, activeTab: R, widgetActiveCollapseNames: J, eventHandlerCode: s, curEventName: g, eventHeader: b, selectedWidget: o, designerConfig: I, optionModel: l, getEventHandled: K, selectedWidgetOptionsEditor: h, getPropEditor: m, collapsePanels: q, onChangeEventHandler: V, editEventHandler: w, saveEventHandler: L, get TpfCodeEditor() {
153
153
  return ee;
154
154
  }, FormSetting: te, FormCrudSetting: ne };
155
155
  return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
@@ -1,16 +1,16 @@
1
- import { defineComponent as u, computed as s, ref as d } from "vue";
2
- import l from "../RenderWigetList.vue.js";
1
+ import { defineComponent as u, computed as s, ref as l } from "vue";
2
+ import d from "../RenderWigetList.vue.js";
3
3
  import { ComponentNameEnum as m, ContainerTypeEnum as a } from "../../../constants/WidgetTypeEnum.js";
4
4
  import { useAppRef as f } from "../../form-designer/useAppRef.js";
5
- const _ = /* @__PURE__ */ u({
5
+ const h = /* @__PURE__ */ u({
6
6
  name: a.GridColWidget,
7
7
  componentName: m.ContainerWidget,
8
8
  inheritAttrs: !1,
9
9
  __name: "grid-col-widget",
10
10
  props: {
11
- widget: { type: Object, required: !0 },
12
- field: { type: Object, required: !0 },
13
- parentWidget: { type: [Object, null], required: !0 },
11
+ widget: { type: null, required: !0 },
12
+ field: { type: null, required: !0 },
13
+ parentWidget: { type: null, required: !0 },
14
14
  parentList: { type: Array, required: !0 },
15
15
  indexOfParentList: { type: Number, required: !1 },
16
16
  subFormRowIndex: { type: Number, required: !1 },
@@ -19,17 +19,17 @@ const _ = /* @__PURE__ */ u({
19
19
  },
20
20
  setup(i, { expose: o }) {
21
21
  o();
22
- const e = i, n = s(() => e.colHeight ? { height: e.colHeight } : {}), p = d({
22
+ const e = i, n = s(() => e.colHeight ? { height: e.colHeight } : {}), p = l({
23
23
  span: e.widget.options.span || 12,
24
24
  offset: e.widget.options.offset || 0,
25
25
  push: e.widget.options.push || 0,
26
26
  pull: e.widget.options.pull || 0
27
27
  }), { initRefList: t } = f();
28
28
  t();
29
- const r = { props: e, colHeightStyle: n, layoutProps: p, initRefList: t, RenderWigetList: l };
29
+ const r = { props: e, colHeightStyle: n, layoutProps: p, initRefList: t, RenderWigetList: d };
30
30
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
31
31
  }
32
32
  });
33
33
  export {
34
- _ as default
34
+ h as default
35
35
  };