@kp-ui/lowcode 1.0.103 → 1.0.104

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 (51) hide show
  1. package/package.json +1 -1
  2. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue.js +75 -100
  3. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue.js.map +1 -1
  4. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue2.js +4 -4
  5. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue2.js.map +1 -1
  6. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue4.js +2 -0
  7. package/src/components/form-designer/form-widget/container-widget/vf-collapse-widget.vue4.js.map +1 -0
  8. package/src/components/form-designer/form-widget/field-widget/code-editor-widget.vue.js +1 -1
  9. package/src/components/form-designer/form-widget/field-widget/code-editor-widget.vue.js.map +1 -1
  10. package/src/components/form-designer/form-widget/field-widget/fieldMixin.js.map +1 -1
  11. package/src/components/form-designer/form-widget/field-widget/index.js +1 -1
  12. package/src/components/form-designer/form-widget/field-widget/index.js.map +1 -1
  13. package/src/components/form-designer/form-widget/field-widget/tree-widget.vue.js +124 -0
  14. package/src/components/form-designer/form-widget/field-widget/tree-widget.vue.js.map +1 -0
  15. package/src/components/form-designer/index.vue.js +20 -24
  16. package/src/components/form-designer/index.vue.js.map +1 -1
  17. package/src/components/form-designer/setting-panel/index.vue.js +115 -121
  18. package/src/components/form-designer/setting-panel/index.vue.js.map +1 -1
  19. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +17 -17
  20. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js.map +1 -1
  21. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCheck-editor.vue.js +50 -0
  22. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCheck-editor.vue.js.map +1 -0
  23. package/src/components/form-designer/setting-panel/property-editor/field-tree/tree-data-editor.vue.js +195 -0
  24. package/src/components/form-designer/setting-panel/property-editor/field-tree/tree-data-editor.vue.js.map +1 -0
  25. package/src/components/form-designer/setting-panel/property-editor/index.js +139 -137
  26. package/src/components/form-designer/setting-panel/property-editor/index.js.map +1 -1
  27. package/src/components/form-designer/setting-panel/propertyRegister.js +2 -0
  28. package/src/components/form-designer/setting-panel/propertyRegister.js.map +1 -1
  29. package/src/components/form-designer/widget-panel/advanced/tree-select.js.map +1 -1
  30. package/src/components/form-designer/widget-panel/advanced/tree.js +44 -0
  31. package/src/components/form-designer/widget-panel/advanced/tree.js.map +1 -0
  32. package/src/components/form-designer/widget-panel/advancedFieldsEnums.js +4 -2
  33. package/src/components/form-designer/widget-panel/advancedFieldsEnums.js.map +1 -1
  34. package/src/components/form-render/container-item/vf-collapse-item.vue.js +2 -2
  35. package/src/components/form-render/container-item/vf-collapse-item.vue.js.map +1 -1
  36. package/src/components/form-render/dynamic-dialog.vue.js +95 -105
  37. package/src/components/form-render/dynamic-dialog.vue.js.map +1 -1
  38. package/src/components/form-render/index.vue.js +60 -60
  39. package/src/components/form-render/index.vue.js.map +1 -1
  40. package/src/components/public/CustomerModal/CustomerModal.vue2.js +16 -15
  41. package/src/components/public/CustomerModal/CustomerModal.vue2.js.map +1 -1
  42. package/src/lang/zh-CN.js +1 -0
  43. package/src/lang/zh-CN.js.map +1 -1
  44. package/src/utils/executeFunction.js +20 -16
  45. package/src/utils/executeFunction.js.map +1 -1
  46. package/stats.html +1 -1
  47. package/styles/style.css +1 -1
  48. package/src/components/TpfCollapse/TpfCollapseTitle.vue.js +0 -8
  49. package/src/components/TpfCollapse/TpfCollapseTitle.vue.js.map +0 -1
  50. package/src/components/TpfCollapse/TpfCollapseTitle.vue2.js +0 -18
  51. package/src/components/TpfCollapse/TpfCollapseTitle.vue2.js.map +0 -1
@@ -1,20 +1,21 @@
1
- import { resolveComponent as D, createBlock as p, openBlock as m, withCtx as c, createElementVNode as x, normalizeStyle as A, createVNode as k, withKeys as _, normalizeClass as B, createElementBlock as y, Fragment as R, renderList as b, resolveDynamicComponent as S, createSlots as L, renderSlot as W, mergeProps as v, render as O, h as J } from "vue";
2
- import $ from "../../utils/emitter.js";
3
- import H from "../form-designer/form-widget/field-widget/index.js";
4
- import { buildDefaultFormJson as P, getContainerWidgetByName as F, cloneFormConfigWithoutEventHandler as w, deepClone as f, getDSByName as M, overwriteObj as g, runDataSourceRequest as E, getAllContainerWidgets as T, getAllFieldWidgets as z, getDefaultFormConfig as N, traverseFieldWidgets as G, getFieldWidgetByName as j, traverseFieldWidgetsOfContainer as K, insertCustomCssToHead as q, insertGlobalFunctionsToHtml as U, generateId as C } from "../../utils/util.js";
1
+ import { resolveComponent as p, createBlock as b, openBlock as m, withCtx as c, createElementVNode as x, createVNode as R, normalizeStyle as A, withKeys as _, normalizeClass as B, createElementBlock as L, Fragment as W, renderList as F, resolveDynamicComponent as O, createSlots as v, renderSlot as w, mergeProps as D, render as J } from "vue";
2
+ import P from "../../utils/emitter.js";
3
+ import $ from "../form-designer/form-widget/field-widget/index.js";
4
+ import { buildDefaultFormJson as H, getContainerWidgetByName as C, cloneFormConfigWithoutEventHandler as M, deepClone as f, getDSByName as E, overwriteObj as g, runDataSourceRequest as j, getAllContainerWidgets as T, getAllFieldWidgets as z, getDefaultFormConfig as N, traverseFieldWidgets as G, getFieldWidgetByName as V, traverseFieldWidgetsOfContainer as K, insertCustomCssToHead as q, insertGlobalFunctionsToHtml as U, generateId as y } from "../../utils/util.js";
5
5
  import Q, { changeLocale as X } from "../../utils/i18n.js";
6
6
  import Y from "./dynamic-dialog.vue.js";
7
7
  /* empty css */
8
8
  import Z from "./dynamic-drawer.vue.js";
9
- import { fmtHttpParams as V } from "../../utils/request/fmtHttpParams.js";
9
+ import { fmtHttpParams as k } from "../../utils/request/fmtHttpParams.js";
10
10
  /* empty css */
11
11
  import I from "../../../_virtual/_plugin-vue_export-helper.js";
12
12
  const tt = {
13
13
  name: "VFormRender",
14
14
  componentName: "VFormRender",
15
- mixins: [$, Q],
15
+ mixins: [P, Q],
16
16
  components: {
17
- ...H
17
+ DynamicDialog: Y,
18
+ ...$
18
19
  },
19
20
  props: {
20
21
  vfCtx: {
@@ -24,7 +25,7 @@ const tt = {
24
25
  formJson: {
25
26
  //prop传入的表单JSON配置
26
27
  type: Object,
27
- default: () => P()
28
+ default: () => H()
28
29
  },
29
30
  formData: {
30
31
  //prop传入的表单数据
@@ -91,6 +92,7 @@ const tt = {
91
92
  },
92
93
  data() {
93
94
  return {
95
+ dialogProps: {},
94
96
  isClosing: !1,
95
97
  //是否正在关闭
96
98
  isSubmitting: !1,
@@ -189,7 +191,7 @@ const tt = {
189
191
  var e;
190
192
  const t = this.formConfig.serveList;
191
193
  if ((e = t.vformDetail.http) != null && e.url) {
192
- const i = await V.call(this, t.vformDetail, {
194
+ const i = await k.call(this, t.vformDetail, {
193
195
  vfCtx: this.vfCtx
194
196
  });
195
197
  return console.log("res: ", i), i;
@@ -199,7 +201,7 @@ const tt = {
199
201
  var i;
200
202
  const t = await this.getFormData(), e = this.formConfig.serveList;
201
203
  if ((i = e.vformDetail.http) != null && i.url) {
202
- const o = await V.call(this, e.vformUpdate, {
204
+ const o = await k.call(this, e.vformUpdate, {
203
205
  data: t,
204
206
  vfCtx: this.vfCtx
205
207
  });
@@ -207,7 +209,7 @@ const tt = {
207
209
  }
208
210
  },
209
211
  initFormObject(t = !0) {
210
- this.formId = "vfRender" + C(), t && !this.dynamicCreation && this.insertCustomStyleAndScriptNode(), this.addFieldChangeEventHandler(), this.addFieldValidateEventHandler(), this.registerFormToRefList(), this.handleOnCreated(), this.disabledMode && this.$nextTick(() => {
212
+ this.formId = "vfRender" + y(), t && !this.dynamicCreation && this.insertCustomStyleAndScriptNode(), this.addFieldChangeEventHandler(), this.addFieldValidateEventHandler(), this.registerFormToRefList(), this.handleOnCreated(), this.disabledMode && this.$nextTick(() => {
211
213
  this.disableForm();
212
214
  });
213
215
  },
@@ -360,7 +362,7 @@ const tt = {
360
362
  i && i.setDisabled ? i.setDisabled(e) : this.findWidgetOfSubFormAndSetDisabled(t, e);
361
363
  },
362
364
  findWidgetOfSubFormAndSetDisabled(t, e) {
363
- const i = j(
365
+ const i = V(
364
366
  this.formJsonObj.widgetList,
365
367
  t,
366
368
  !0
@@ -375,7 +377,7 @@ const tt = {
375
377
  i && i.setDisabled ? i.setHidden(e) : this.findWidgetOfSubFormAndSetHidden(t, e);
376
378
  },
377
379
  findWidgetOfSubFormAndSetHidden(t, e) {
378
- const i = j(
380
+ const i = V(
379
381
  this.formJsonObj.widgetList,
380
382
  t,
381
383
  !0
@@ -395,8 +397,8 @@ const tt = {
395
397
  const s = this.getWidgetRef(i);
396
398
  if (s) {
397
399
  const r = s.getRowIdData();
398
- r && r.length > 0 && r.forEach((a) => {
399
- e.push(t + "@row" + a);
400
+ r && r.length > 0 && r.forEach((n) => {
401
+ e.push(t + "@row" + n);
400
402
  });
401
403
  }
402
404
  }
@@ -407,13 +409,13 @@ const tt = {
407
409
  this.getFieldWidgets().forEach((e) => {
408
410
  e.field.options.dsEnabled && e.field.options.dsName && e.field.options.dataSetName && t.add(e.field.options.dsName);
409
411
  }), t.size > 0 && t.forEach(async (e) => {
410
- const i = M(this.formConfig, e);
412
+ const i = E(this.formConfig, e);
411
413
  if (i) {
412
414
  const o = new Object({});
413
415
  g(o, this.globalDsv || {});
414
416
  let s = null;
415
417
  try {
416
- s = await E(
418
+ s = await j(
417
419
  i,
418
420
  o,
419
421
  this,
@@ -485,8 +487,8 @@ const tt = {
485
487
  let e = function() {
486
488
  };
487
489
  const i = new window.Promise(function(o, s) {
488
- e = function(r, a) {
489
- a ? s(a) : o(r);
490
+ e = function(r, n) {
491
+ n ? s(n) : o(r);
490
492
  };
491
493
  });
492
494
  return console.log(this.formDataModel), this.$refs.renderForm.validate().then((o) => {
@@ -665,8 +667,8 @@ const tt = {
665
667
  * @param localDsv
666
668
  */
667
669
  async executeDataSource(t, e) {
668
- const i = M(this.formJsonObj.formConfig, t), o = new Object({});
669
- return g(o, this.globalDsv), g(o, e), await E(i, o, this, !1, this.$message);
670
+ const i = E(this.formJsonObj.formConfig, t), o = new Object({});
671
+ return g(o, this.globalDsv), g(o, e), await j(i, o, this, !1, this.$message);
670
672
  },
671
673
  /**
672
674
  * 获取父级VFormRender组件实例
@@ -717,40 +719,37 @@ const tt = {
717
719
  * @param extraData
718
720
  */
719
721
  showDialog(t, e = {}, i = {}) {
720
- console.log("showDialog", t, e, i);
721
- const o = this.getTopFormRef(), s = this.getFormRef(), r = F(o.widgetList, t) || F(s.widgetList, t);
722
+ const o = this.getTopFormRef(), s = this.getFormRef(), r = C(o.widgetList, t) || C(s.widgetList, t);
722
723
  if (!t || r.type !== "vf-dialog") {
723
724
  this.$message.error(this.i18nt("render.hint.refNotFound") + t);
724
725
  return;
725
726
  }
726
- const a = {
727
+ const n = {
727
728
  widgetList: f(r.widgetList),
728
- formConfig: w(o.formConfig)
729
- }, l = C() + "", n = J(Y, {
729
+ formConfig: M(o.formConfig)
730
+ }, a = y() + "";
731
+ this.dialogProps = {
730
732
  options: r.options,
731
- formJson: a,
733
+ formJson: n,
732
734
  formData: { ...e },
733
735
  optionData: o.optionData,
734
736
  globalDsv: o.globalDsv,
735
737
  parentFormRef: this,
736
738
  extraData: i,
737
- wrapperId: l,
739
+ wrapperId: a,
738
740
  vfCtx: { ...e }
739
- });
740
- n.appContext = this.$root.$.appContext;
741
- const d = document.createElement("div");
742
- d.id = "vf-dynamic-dialog-wrapper" + l, document.body.appendChild(d), O(n, d), document.body.appendChild(n.el), n.component.exposed.show();
741
+ }, this.$refs.dynamicDialgRef.appContext = this.$root.$.appContext, this.$refs.dynamicDialgRef.show();
743
742
  },
744
743
  showDrawer(t, e = {}, i = {}) {
745
- const o = this.getTopFormRef(), s = F(o.widgetList, t);
744
+ const o = this.getTopFormRef(), s = C(o.widgetList, t);
746
745
  if (!s || s.type !== "vf-drawer") {
747
746
  this.$message.error(this.i18nt("render.hint.refNotFound") + t);
748
747
  return;
749
748
  }
750
749
  const r = {
751
750
  widgetList: f(s.widgetList),
752
- formConfig: w(o.formConfig)
753
- }, a = C() + "", l = k(Z, {
751
+ formConfig: M(o.formConfig)
752
+ }, n = y() + "", a = R(Z, {
754
753
  options: s.options,
755
754
  formJson: r,
756
755
  formData: e || {},
@@ -758,11 +757,11 @@ const tt = {
758
757
  globalDsv: o.globalDsv,
759
758
  parentFormRef: this,
760
759
  extraData: i,
761
- wrapperId: a
760
+ wrapperId: n
762
761
  });
763
- l.appContext = this.$root.$.appContext;
764
- const n = document.createElement("div");
765
- n.id = "vf-dynamic-drawer-wrapper" + a, document.body.appendChild(n), O(l, n), document.body.appendChild(l.el), l.component.ctx.show();
762
+ a.appContext = this.$root.$.appContext;
763
+ const d = document.createElement("div");
764
+ d.id = "vf-dynamic-drawer-wrapper" + n, document.body.appendChild(d), J(a, d), document.body.appendChild(a.el), a.component.ctx.show();
766
765
  },
767
766
  /**
768
767
  * 判断表单是否处于设计器预览状态
@@ -778,13 +777,13 @@ const tt = {
778
777
  }
779
778
  };
780
779
  function et(t, e, i, o, s, r) {
781
- const a = D("a-form"), l = D("a-spin");
782
- return m(), p(l, { spinning: s.isLoading }, {
780
+ const n = p("a-form"), a = p("DynamicDialog"), d = p("a-spin");
781
+ return m(), b(d, { spinning: s.isLoading }, {
783
782
  default: c(() => [
784
783
  x("div", {
785
784
  style: A(s.isLoading ? "min-height: 260px" : "")
786
785
  }, [
787
- k(a, {
786
+ R(n, {
788
787
  layout: r.labelPosition,
789
788
  class: B([[r.customClass, s.readModeFlag ? "readonly-mode-form" : ""], "render-form tpf-form"]),
790
789
  "label-width": r.labelWidth,
@@ -794,35 +793,35 @@ function et(t, e, i, o, s, r) {
794
793
  onKeydown: _(r.handleEnterKey, ["enter"])
795
794
  }, {
796
795
  default: c(() => [
797
- (m(!0), y(R, null, b(r.widgetList, (n, d) => (m(), y(R, null, [
798
- n.category === "container" ? (m(), p(S(r.getContainerWidgetName(n)), {
799
- widget: n,
800
- key: n.id,
801
- data: s.formDataModel[n.options.name],
796
+ (m(!0), L(W, null, F(r.widgetList, (l, S) => (m(), L(W, null, [
797
+ l.category === "container" ? (m(), b(O(r.getContainerWidgetName(l)), {
798
+ widget: l,
799
+ key: l.id,
800
+ data: s.formDataModel[l.options.name],
802
801
  "parent-list": r.widgetList,
803
- "index-of-parent-list": d,
802
+ "index-of-parent-list": S,
804
803
  "parent-widget": null,
805
804
  model: s.formDataModel
806
- }, L({ _: 2 }, [
807
- b(Object.keys(t.$slots), (h) => ({
805
+ }, v({ _: 2 }, [
806
+ F(Object.keys(t.$slots), (h) => ({
808
807
  name: h,
809
808
  fn: c((u) => [
810
- W(t.$slots, h, v({ ref_for: !0 }, u), void 0, !0)
809
+ w(t.$slots, h, D({ ref_for: !0 }, u), void 0, !0)
811
810
  ])
812
811
  }))
813
- ]), 1032, ["widget", "data", "parent-list", "index-of-parent-list", "model"])) : (m(), p(S(r.getWidgetName(n)), {
814
- field: n,
812
+ ]), 1032, ["widget", "data", "parent-list", "index-of-parent-list", "model"])) : (m(), b(O(r.getWidgetName(l)), {
813
+ field: l,
815
814
  "form-model": s.formDataModel,
816
815
  designer: null,
817
- key: n.id,
816
+ key: l.id,
818
817
  "parent-list": r.widgetList,
819
- "index-of-parent-list": d,
818
+ "index-of-parent-list": S,
820
819
  "parent-widget": null
821
- }, L({ _: 2 }, [
822
- b(Object.keys(t.$slots), (h) => ({
820
+ }, v({ _: 2 }, [
821
+ F(Object.keys(t.$slots), (h) => ({
823
822
  name: h,
824
823
  fn: c((u) => [
825
- W(t.$slots, h, v({ ref_for: !0 }, u), void 0, !0)
824
+ w(t.$slots, h, D({ ref_for: !0 }, u), void 0, !0)
826
825
  ])
827
826
  }))
828
827
  ]), 1032, ["field", "form-model", "parent-list", "index-of-parent-list"]))
@@ -830,12 +829,13 @@ function et(t, e, i, o, s, r) {
830
829
  ]),
831
830
  _: 3
832
831
  }, 8, ["layout", "class", "label-width", "model", "onKeydown"])
833
- ], 4)
832
+ ], 4),
833
+ R(a, D(s.dialogProps, { ref: "dynamicDialgRef" }), null, 16)
834
834
  ]),
835
835
  _: 3
836
836
  }, 8, ["spinning"]);
837
837
  }
838
- const ct = /* @__PURE__ */ I(tt, [["render", et], ["__scopeId", "data-v-e118a282"]]);
838
+ const ct = /* @__PURE__ */ I(tt, [["render", et], ["__scopeId", "data-v-46e583ef"]]);
839
839
  export {
840
840
  ct as default
841
841
  };