@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2

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 (128) hide show
  1. package/components/avatar/index.esm.js +155 -148
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/button-edit/index.esm.js +1 -1
  4. package/components/button-edit/index.umd.cjs +1 -1
  5. package/components/calendar/index.esm.js +226 -224
  6. package/components/calendar/index.umd.cjs +3 -3
  7. package/components/collection-property-editor/index.esm.js +225 -223
  8. package/components/collection-property-editor/index.umd.cjs +2 -2
  9. package/components/combo-list/index.esm.js +76 -71
  10. package/components/combo-list/index.umd.cjs +1 -1
  11. package/components/comment/index.esm.js +169 -167
  12. package/components/comment/index.umd.cjs +6 -6
  13. package/components/component/index.esm.js +3691 -3043
  14. package/components/component/index.umd.cjs +2 -2
  15. package/components/condition/index.esm.js +2015 -1352
  16. package/components/condition/index.umd.cjs +2 -2
  17. package/components/data-grid/index.esm.js +407 -430
  18. package/components/data-grid/index.umd.cjs +1 -1
  19. package/components/data-view/index.esm.js +3082 -3196
  20. package/components/data-view/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.esm.js +3364 -2713
  22. package/components/designer-canvas/index.umd.cjs +1 -1
  23. package/components/drawer/index.esm.js +66 -64
  24. package/components/drawer/index.umd.cjs +2 -2
  25. package/components/dynamic-form/index.esm.js +1176 -524
  26. package/components/dynamic-form/index.umd.cjs +1 -1
  27. package/components/dynamic-resolver/index.esm.js +182 -180
  28. package/components/dynamic-resolver/index.umd.cjs +2 -2
  29. package/components/dynamic-view/index.esm.js +531 -455
  30. package/components/dynamic-view/index.umd.cjs +1 -1
  31. package/components/events-editor/index.esm.js +2352 -1700
  32. package/components/events-editor/index.umd.cjs +3 -3
  33. package/components/expression-editor/index.esm.js +8 -3
  34. package/components/expression-editor/index.umd.cjs +2 -2
  35. package/components/filter-bar/index.esm.js +422 -413
  36. package/components/filter-bar/index.umd.cjs +2 -2
  37. package/components/filter-condition-editor/index.esm.js +8 -3
  38. package/components/filter-condition-editor/index.umd.cjs +1 -1
  39. package/components/image/index.esm.js +363 -354
  40. package/components/image/index.umd.cjs +2 -2
  41. package/components/language-textbox/index.esm.js +189 -187
  42. package/components/language-textbox/index.umd.cjs +2 -2
  43. package/components/list-view/index.esm.js +388 -389
  44. package/components/list-view/index.umd.cjs +5 -5
  45. package/components/mapping-editor/index.esm.js +1465 -1488
  46. package/components/mapping-editor/index.umd.cjs +1 -1
  47. package/components/number-range/index.esm.js +180 -173
  48. package/components/number-range/index.umd.cjs +1 -1
  49. package/components/order/index.esm.js +815 -811
  50. package/components/order/index.umd.cjs +5 -5
  51. package/components/property-panel/index.esm.js +429 -420
  52. package/components/property-panel/index.umd.cjs +3 -3
  53. package/components/query-solution/index.esm.js +4746 -4085
  54. package/components/query-solution/index.umd.cjs +7 -7
  55. package/components/schema-selector/index.esm.js +1401 -1402
  56. package/components/schema-selector/index.umd.cjs +5 -5
  57. package/components/section/index.esm.js +102 -100
  58. package/components/section/index.umd.cjs +2 -2
  59. package/components/sort-condition-editor/index.esm.js +8 -3
  60. package/components/sort-condition-editor/index.umd.cjs +1 -1
  61. package/components/transfer/index.esm.js +537 -538
  62. package/components/transfer/index.umd.cjs +5 -5
  63. package/components/tree-grid/index.esm.js +280 -283
  64. package/components/tree-grid/index.umd.cjs +1 -1
  65. package/components/tree-view/index.esm.js +200 -202
  66. package/components/tree-view/index.umd.cjs +1 -1
  67. package/components/uploader/index.esm.js +533 -519
  68. package/components/uploader/index.umd.cjs +2 -2
  69. package/designer/data-grid/index.esm.js +3806 -3905
  70. package/designer/data-grid/index.umd.cjs +9 -9
  71. package/designer/drawer/index.esm.js +188 -186
  72. package/designer/drawer/index.umd.cjs +2 -2
  73. package/designer/dynamic-form/index.esm.js +1562 -1073
  74. package/designer/dynamic-form/index.umd.cjs +2 -2
  75. package/designer/farris-designer.all.esm.js +9793 -8613
  76. package/designer/farris-designer.all.umd.cjs +8 -8
  77. package/designer/list-view/index.esm.js +564 -564
  78. package/designer/list-view/index.umd.cjs +6 -6
  79. package/designer/radio-group/index.esm.js +236 -229
  80. package/designer/radio-group/index.umd.cjs +1 -1
  81. package/designer/response-layout-editor/index.esm.js +178 -171
  82. package/designer/response-layout-editor/index.umd.cjs +1 -1
  83. package/designer/tabs/index.esm.js +3154 -2508
  84. package/designer/tabs/index.umd.cjs +2 -2
  85. package/designer/time-picker/index.esm.js +193 -186
  86. package/designer/time-picker/index.umd.cjs +1 -1
  87. package/designer/tree-grid/index.esm.js +444 -447
  88. package/designer/tree-grid/index.umd.cjs +1 -1
  89. package/farris.all.esm.js +60126 -59649
  90. package/farris.all.umd.cjs +30 -30
  91. package/index.css +1 -1
  92. package/package.json +1 -1
  93. package/types/components.d.ts +1 -1
  94. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  95. package/types/data-grid/index.d.ts +2 -5
  96. package/types/data-grid/src/data-grid.component.d.ts +1 -2
  97. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  98. package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
  99. package/types/data-view/composition/types.d.ts +0 -4
  100. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
  101. package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
  102. package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
  103. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  104. package/types/dynamic-form/designer.d.ts +0 -1
  105. package/types/dynamic-form/index.d.ts +4 -3
  106. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  107. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  108. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  109. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  110. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  111. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  112. package/types/dynamic-form/src/types.d.ts +1 -0
  113. package/types/dynamic-resolver/src/types.d.ts +1 -0
  114. package/types/dynamic-view/index.d.ts +43 -3
  115. package/types/dynamic-view/src/components/maps.d.ts +6 -6
  116. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  117. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  118. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  119. package/types/language-textbox/index.d.ts +3 -3
  120. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  121. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  122. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
  123. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  124. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  125. package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
  126. package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
  127. package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
  128. package/types/tree-view/src/tree-view.props.d.ts +0 -1
@@ -1,111 +1,691 @@
1
- import { defineComponent as H, ref as L, computed as W, withDirectives as pe, createVNode as D, resolveDirective as de, watch as Y, createTextVNode as fe, mergeProps as ce } from "vue";
2
- import { LocaleService as ge } from "../locale/index.esm.js";
3
- import ye from "../accordion/index.esm.js";
4
- import Ce from "../avatar/index.esm.js";
5
- import he from "../../designer/button-edit/index.esm.js";
6
- import Fe from "../button-group/index.esm.js";
7
- import be from "../calendar/index.esm.js";
8
- import ve from "../../designer/capsule/index.esm.js";
9
- import ie from "../../designer/checkbox/index.esm.js";
10
- import ae from "../../designer/checkbox-group/index.esm.js";
11
- import Ie from "../combo-list/index.esm.js";
12
- import we from "../combo-tree/index.esm.js";
13
- import Ve from "../component/index.esm.js";
14
- import Be from "../color-picker/index.esm.js";
15
- import Me from "../content-container/index.esm.js";
16
- import Te from "../../designer/date-picker/index.esm.js";
17
- import Le from "../../designer/data-grid/index.esm.js";
18
- import ke from "../dropdown/index.esm.js";
19
- import Ee from "../../designer/dynamic-form/index.esm.js";
20
- import Pe from "../events-editor/index.esm.js";
21
- import Ue from "../filter-bar/index.esm.js";
22
- import De from "../field-selector/index.esm.js";
23
- import Ne from "../binding-selector/index.esm.js";
24
- import Ae from "../image-cropper/index.esm.js";
25
- import Re from "../../designer/input-group/index.esm.js";
26
- import Oe from "../layout/index.esm.js";
27
- import qe from "../list-nav/index.esm.js";
28
- import xe from "../../designer/list-view/index.esm.js";
29
- import Ge from "../lookup/index.esm.js";
30
- import je from "../mapping-editor/index.esm.js";
31
- import $e from "../nav/index.esm.js";
32
- import We from "../number-range/index.esm.js";
33
- import Ke from "../../designer/number-spinner/index.esm.js";
34
- import Xe from "../order/index.esm.js";
35
- import _e from "../page-header/index.esm.js";
36
- import Je from "../page-footer/index.esm.js";
37
- import Qe from "../pagination/index.esm.js";
38
- import ze from "../progress/index.esm.js";
39
- import Ye from "../query-solution/index.esm.js";
40
- import Ze from "../../designer/radio-group/index.esm.js";
41
- import Se from "../../designer/rate/index.esm.js";
42
- import He from "../../designer/response-toolbar/index.esm.js";
43
- import et from "../response-layout/index.esm.js";
44
- import tt, { useResponseLayoutEditorSetting as ot } from "../../designer/response-layout-editor/index.esm.js";
45
- import nt from "../search-box/index.esm.js";
46
- import rt from "../../designer/section/index.esm.js";
47
- import it from "../smoke-detector/index.esm.js";
48
- import at from "../splitter/index.esm.js";
49
- import st from "../step/index.esm.js";
50
- import lt from "../../designer/switch/index.esm.js";
51
- import ct from "../../designer/tabs/index.esm.js";
52
- import ut from "../../designer/tags/index.esm.js";
53
- import mt from "../text/index.esm.js";
54
- import pt from "../../designer/time-picker/index.esm.js";
55
- import dt from "../transfer/index.esm.js";
56
- import ft from "../tree-view/index.esm.js";
57
- import gt from "../uploader/index.esm.js";
58
- import yt from "../verify-detail/index.esm.js";
59
- import Ct from "../video/index.esm.js";
60
- import ht from "../../designer/textarea/index.esm.js";
61
- import Ft from "../schema-selector/index.esm.js";
62
- import bt from "../../designer/tree-grid/index.esm.js";
63
- import vt from "../event-parameter/index.esm.js";
64
- import It from "../filter-condition-editor/index.esm.js";
65
- import wt from "../fieldset/index.esm.js";
66
- import Vt from "../sort-condition-editor/index.esm.js";
67
- import Bt from "../menu-lookup/index.esm.js";
68
- import Mt from "../../designer/drawer/index.esm.js";
69
- import Tt from "../json-editor/index.esm.js";
70
- import Lt from "../property-editor/index.esm.js";
71
- import kt from "../expression-editor/index.esm.js";
72
- import Et from "../code-editor/index.esm.js";
73
- import Pt from "../html-template/index.esm.js";
74
- import Ut from "../collection-property-editor/index.esm.js";
75
- import Dt from "../../designer/modal/index.esm.js";
76
- import Nt from "../external-container/index.esm.js";
77
- import At from "../language-textbox/index.esm.js";
78
- import Rt from "../image/index.esm.js";
79
- import Ot from "../comment/index.esm.js";
80
- import { schemaResolverMap as qt, propertyEffectMap as xt, propertyConfigSchemaMap as Gt, schemaMap as ue, createPropsResolver as jt } from "../dynamic-resolver/index.esm.js";
81
- import { useThirdComponent as $t, isMobilePhone as Wt, useGuid as se } from "../common/index.esm.js";
82
- import { DgControl as S, refreshCanvas as Kt, UseTemplateDragAndDropRules as Xt, useDragulaCommonRule as _t } from "../designer-canvas/index.esm.js";
83
- import { BaseControlProperty as Jt, FormBindingType as Q } from "../property-panel/index.esm.js";
84
- const Qt = {
1
+ var Pe = Object.defineProperty;
2
+ var Be = (t, e, r) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var re = (t, e, r) => Be(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { defineComponent as te, ref as U, computed as J, onMounted as ke, watch as z, withDirectives as he, createVNode as q, resolveDirective as Fe, reactive as ce, createTextVNode as Ee, mergeProps as be } from "vue";
5
+ import { resolveAppearance as Ue, createPropsResolver as le, schemaResolverMap as Le, propertyEffectMap as Oe, propertyConfigSchemaMap as Ne, schemaMap as ve } from "../dynamic-resolver/index.esm.js";
6
+ import { FormSchemaEntityField$Type as ue, FormSchemaEntityFieldTypeName as pe, getCustomClass as Ve, useThirdComponent as De, isMobilePhone as Re, useGuid as me } from "../common/index.esm.js";
7
+ import { cloneDeep as Ae, mergeWith as je, merge as $e } from "lodash-es";
8
+ import { LocaleService as Ie } from "../locale/index.esm.js";
9
+ import { loadRegister as qe, useComponentManager as xe, useBindingData as Ge, useEntityState as We, useDynamicViewUtils as Ke, componentMap as ae, resolverMap as _e } from "../dynamic-view/index.esm.js";
10
+ import Xe from "../accordion/index.esm.js";
11
+ import Je from "../avatar/index.esm.js";
12
+ import Qe from "../../designer/button-edit/index.esm.js";
13
+ import ze from "../button-group/index.esm.js";
14
+ import Ye from "../calendar/index.esm.js";
15
+ import Ze from "../../designer/capsule/index.esm.js";
16
+ import de from "../../designer/checkbox/index.esm.js";
17
+ import fe from "../../designer/checkbox-group/index.esm.js";
18
+ import Se from "../combo-list/index.esm.js";
19
+ import He from "../combo-tree/index.esm.js";
20
+ import et from "../component/index.esm.js";
21
+ import tt from "../color-picker/index.esm.js";
22
+ import ot from "../content-container/index.esm.js";
23
+ import nt from "../../designer/date-picker/index.esm.js";
24
+ import rt from "../../designer/data-grid/index.esm.js";
25
+ import st from "../dropdown/index.esm.js";
26
+ import it from "../../designer/dynamic-form/index.esm.js";
27
+ import at from "../events-editor/index.esm.js";
28
+ import lt from "../filter-bar/index.esm.js";
29
+ import ct from "../field-selector/index.esm.js";
30
+ import ut from "../binding-selector/index.esm.js";
31
+ import pt from "../image-cropper/index.esm.js";
32
+ import mt from "../../designer/input-group/index.esm.js";
33
+ import dt from "../layout/index.esm.js";
34
+ import ft from "../list-nav/index.esm.js";
35
+ import yt from "../../designer/list-view/index.esm.js";
36
+ import gt from "../lookup/index.esm.js";
37
+ import Ct from "../mapping-editor/index.esm.js";
38
+ import ht from "../nav/index.esm.js";
39
+ import Ft from "../number-range/index.esm.js";
40
+ import bt from "../../designer/number-spinner/index.esm.js";
41
+ import vt from "../order/index.esm.js";
42
+ import Vt from "../page-header/index.esm.js";
43
+ import It from "../page-footer/index.esm.js";
44
+ import Tt from "../pagination/index.esm.js";
45
+ import Mt from "../progress/index.esm.js";
46
+ import wt from "../query-solution/index.esm.js";
47
+ import Pt from "../../designer/radio-group/index.esm.js";
48
+ import Bt from "../../designer/rate/index.esm.js";
49
+ import kt from "../../designer/response-toolbar/index.esm.js";
50
+ import Et from "../response-layout/index.esm.js";
51
+ import Ut, { useResponseLayoutEditorSetting as Lt } from "../../designer/response-layout-editor/index.esm.js";
52
+ import Ot from "../search-box/index.esm.js";
53
+ import Nt from "../../designer/section/index.esm.js";
54
+ import Dt from "../smoke-detector/index.esm.js";
55
+ import Rt from "../splitter/index.esm.js";
56
+ import At from "../step/index.esm.js";
57
+ import jt from "../../designer/switch/index.esm.js";
58
+ import $t from "../../designer/tabs/index.esm.js";
59
+ import qt from "../../designer/tags/index.esm.js";
60
+ import xt from "../text/index.esm.js";
61
+ import Gt from "../../designer/time-picker/index.esm.js";
62
+ import Wt from "../transfer/index.esm.js";
63
+ import Kt from "../tree-view/index.esm.js";
64
+ import _t from "../uploader/index.esm.js";
65
+ import Xt from "../verify-detail/index.esm.js";
66
+ import Jt from "../video/index.esm.js";
67
+ import Qt from "../../designer/textarea/index.esm.js";
68
+ import zt from "../schema-selector/index.esm.js";
69
+ import Yt from "../../designer/tree-grid/index.esm.js";
70
+ import Zt from "../event-parameter/index.esm.js";
71
+ import St from "../filter-condition-editor/index.esm.js";
72
+ import Ht from "../fieldset/index.esm.js";
73
+ import eo from "../sort-condition-editor/index.esm.js";
74
+ import to from "../menu-lookup/index.esm.js";
75
+ import oo from "../../designer/drawer/index.esm.js";
76
+ import no from "../json-editor/index.esm.js";
77
+ import ro from "../property-editor/index.esm.js";
78
+ import so from "../expression-editor/index.esm.js";
79
+ import io from "../code-editor/index.esm.js";
80
+ import ao from "../html-template/index.esm.js";
81
+ import lo from "../collection-property-editor/index.esm.js";
82
+ import co from "../../designer/modal/index.esm.js";
83
+ import uo from "../external-container/index.esm.js";
84
+ import po from "../language-textbox/index.esm.js";
85
+ import mo from "../image/index.esm.js";
86
+ import fo from "../comment/index.esm.js";
87
+ import { DgControl as ee, refreshCanvas as yo, UseTemplateDragAndDropRules as go, useDragulaCommonRule as Co } from "../designer-canvas/index.esm.js";
88
+ import { BaseControlProperty as ho, FormBindingType as S } from "../property-panel/index.esm.js";
89
+ const Fo = "root-viewmodel";
90
+ class bo {
91
+ constructor(e, r) {
92
+ re(this, "formSchemaUtils");
93
+ re(this, "controlCreatorUtils");
94
+ re(this, "designViewModelUtils");
95
+ this.resolver = e, this.designerHostService = r, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
96
+ }
97
+ createComponent(e) {
98
+ const r = this.createComponentRefNode(e), f = this.createComponentNode(e), i = this.createViewModeNode(e), F = this.formSchemaUtils.getFormSchema();
99
+ return F.module.viewmodels.push(i), F.module.components.push(f), this.designViewModelUtils.assembleDesignViewModel(), r;
100
+ }
101
+ createComponentRefNode(e) {
102
+ const r = this.resolver.getSchemaByType("component-ref");
103
+ return Object.assign(r, {
104
+ id: `${e.componentId}-component-ref`,
105
+ component: `${e.componentId}-component`
106
+ }), r;
107
+ }
108
+ createComponentNode(e) {
109
+ const r = this.resolver.getSchemaByType("component"), f = this.createFormComponentContents(e);
110
+ return Object.assign(r, {
111
+ id: `${e.componentId}-component`,
112
+ viewModel: `${e.componentId}-component-viewmodel`,
113
+ componentType: e.componentType,
114
+ appearance: {
115
+ class: this.getFormComponentClass(e)
116
+ },
117
+ formColumns: e.formColumns,
118
+ contents: f
119
+ }), r;
120
+ }
121
+ /**
122
+ * 获取卡片组件层级的class样式
123
+ */
124
+ getFormComponentClass(e) {
125
+ var f, i;
126
+ const { templateId: r } = this.formSchemaUtils.getFormSchema().module;
127
+ if (r === "double-list-in-tab-template" && ((i = (f = e.parentComponentInstance) == null ? void 0 : f.schema) == null ? void 0 : i.type) === "tab-page") {
128
+ const F = e.parentComponentInstance.parent && e.parentComponentInstance.parent.schema;
129
+ if ((F == null ? void 0 : F.type) === "tabs" && (F == null ? void 0 : F.fill) === !0)
130
+ return "f-struct-wrapper f-utils-fill-flex-column";
131
+ }
132
+ return "f-struct-wrapper";
133
+ }
134
+ createFormComponentContents(e) {
135
+ var T, V;
136
+ const r = this.resolver.getSchemaByType("section");
137
+ Object.assign(r, {
138
+ id: e.componentId + "-form-section",
139
+ appearance: {
140
+ class: "f-section-form f-section-in-mainsubcard"
141
+ },
142
+ mainTitle: e.componentName
143
+ });
144
+ const f = this.resolver.getSchemaByType("response-form"), i = [];
145
+ Object.assign(f, {
146
+ id: e.componentId + "-form",
147
+ appearance: {
148
+ class: "f-form-layout farris-form farris-form-controls-inline"
149
+ },
150
+ contents: i,
151
+ controlsInline: !0
152
+ }), r.contents = [f];
153
+ const { selectedFields: F } = e;
154
+ F == null || F.forEach((C) => {
155
+ if (C.$type === ue.SimpleField) {
156
+ const w = Ae(C), b = this.resolveControlClassByFormColumns(e), I = this.controlCreatorUtils.setFormFieldProperty(w, "", b);
157
+ I && i.push(I);
158
+ }
159
+ });
160
+ const { templateId: v } = this.formSchemaUtils.getFormSchema().module;
161
+ if (v === "double-list-in-tab-template" && ((V = (T = e.parentComponentInstance) == null ? void 0 : T.schema) == null ? void 0 : V.type) === "tab-page") {
162
+ const C = e.parentComponentInstance.parent && e.parentComponentInstance.parent.schema;
163
+ (C == null ? void 0 : C.type) === "tabs" && (C == null ? void 0 : C.fill) === !0 && (r.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", r.fill = !0);
164
+ }
165
+ return [r];
166
+ }
167
+ resolveControlClassByFormColumns(e) {
168
+ let r = "";
169
+ switch (e.formColumns) {
170
+ case 1: {
171
+ r = "col-12 col-md-12 col-xl-12 col-el-12";
172
+ break;
173
+ }
174
+ case 2: {
175
+ r = "col-12 col-md-6 col-xl-6 col-el-6";
176
+ break;
177
+ }
178
+ case 3: {
179
+ r = "col-12 col-md-6 col-xl-4 col-el-4";
180
+ break;
181
+ }
182
+ case 4: {
183
+ r = "col-12 col-md-6 col-xl-3 col-el-2";
184
+ break;
185
+ }
186
+ }
187
+ return r;
188
+ }
189
+ /**
190
+ * 添加viewModel节点
191
+ */
192
+ createViewModeNode(e) {
193
+ return {
194
+ id: `${e.componentId}-component-viewmodel`,
195
+ code: `${e.componentId}-component-viewmodel`,
196
+ name: e.componentName,
197
+ bindTo: e.bindTo,
198
+ parent: Fo,
199
+ fields: this.assembleViewModelFields(e),
200
+ commands: [],
201
+ states: [],
202
+ enableValidation: !0
203
+ };
204
+ }
205
+ /**
206
+ * 组装viewModel fields 节点
207
+ */
208
+ assembleViewModelFields(e) {
209
+ const r = [], { selectedFields: f } = e;
210
+ return f == null || f.forEach((i) => {
211
+ if (i.$type === ue.SimpleField) {
212
+ let F = "blur";
213
+ const v = i.type.name;
214
+ (v === pe.Enum || v === pe.Boolean) && (F = "change"), r.push({
215
+ type: "Form",
216
+ id: i.id,
217
+ fieldName: i.bindingField,
218
+ groupId: null,
219
+ groupName: null,
220
+ updateOn: F,
221
+ fieldSchema: {}
222
+ });
223
+ }
224
+ }), r;
225
+ }
226
+ }
227
+ function Te(t, e, r, f) {
228
+ var F, v, T, V, C, w;
229
+ const i = r.parentComponentInstance;
230
+ if (i && f) {
231
+ const b = (F = i.schema) == null ? void 0 : F.type, R = {
232
+ componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
233
+ componentName: ((v = r.bindingSourceContext) == null ? void 0 : v.entityTitle) || ((V = (T = r.bindingSourceContext) == null ? void 0 : T.bindingEntity) == null ? void 0 : V.name) || "标题",
234
+ componentType: "form",
235
+ formColumns: b === "splitter-pane" ? 1 : 4,
236
+ parentContainerId: i.schema.id,
237
+ parentComponentInstance: i,
238
+ bindTo: ((C = r.bindingSourceContext) == null ? void 0 : C.bindTo) || "/",
239
+ selectedFields: (w = r.bindingSourceContext) == null ? void 0 : w.bindingEntityFields
240
+ };
241
+ return new bo(t, f).createComponent(R);
242
+ } else
243
+ return e;
244
+ }
245
+ const vo = "https://json-schema.org/draft/2020-12/schema", Vo = "https://farris-design.gitee.io/response-form.schema.json", Io = "response-form", To = "A Farris Data Collection Component", Mo = "object", wo = {
246
+ id: {
247
+ description: "The unique identifier for a form group",
248
+ type: "string"
249
+ },
250
+ type: {
251
+ description: "The type string of form group component",
252
+ type: "string",
253
+ default: "response-form"
254
+ },
255
+ appearance: {
256
+ description: "",
257
+ type: "object",
258
+ properties: {
259
+ class: {
260
+ type: "string"
261
+ },
262
+ style: {
263
+ type: "string"
264
+ }
265
+ },
266
+ default: {}
267
+ },
268
+ contents: {
269
+ description: "",
270
+ type: "array",
271
+ default: []
272
+ },
273
+ visible: {
274
+ description: "",
275
+ type: "boolean",
276
+ default: !0
277
+ },
278
+ labelAutoOverflow: {
279
+ description: "",
280
+ type: "boolean",
281
+ default: !1
282
+ },
283
+ adaptForLanguage: {
284
+ description: "",
285
+ type: "boolean",
286
+ default: !0
287
+ },
288
+ layout: {
289
+ description: "",
290
+ type: "string",
291
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
292
+ },
293
+ fields: {
294
+ description: "",
295
+ type: "array"
296
+ },
297
+ formData: {
298
+ description: "",
299
+ type: "object"
300
+ },
301
+ formType: {
302
+ description: "",
303
+ type: "string",
304
+ default: "static"
305
+ }
306
+ }, Po = [
307
+ "id",
308
+ "type",
309
+ "contents"
310
+ ], Bo = {
311
+ $schema: vo,
312
+ $id: Vo,
313
+ title: Io,
314
+ description: To,
315
+ type: Mo,
316
+ properties: wo,
317
+ required: Po
318
+ }, Me = /* @__PURE__ */ new Map([
319
+ ["appearance", Ue]
320
+ ]), ko = "https://json-schema.org/draft/2020-12/schema", Eo = "https://farris-design.gitee.io/dynamic-form.schema.json", Uo = "dynamic-form", Lo = "A Farris Data Collection Component", Oo = "object", No = {
321
+ id: {
322
+ description: "The unique identifier for a form group",
323
+ type: "string"
324
+ },
325
+ type: {
326
+ description: "The type string of form group component",
327
+ type: "string",
328
+ default: "dynamic-form"
329
+ },
330
+ appearance: {
331
+ description: "",
332
+ type: "object",
333
+ properties: {
334
+ class: {
335
+ type: "string"
336
+ },
337
+ style: {
338
+ type: "string"
339
+ }
340
+ },
341
+ default: {}
342
+ },
343
+ contents: {
344
+ description: "",
345
+ type: "array",
346
+ default: []
347
+ },
348
+ visible: {
349
+ description: "",
350
+ type: "boolean",
351
+ default: !0
352
+ },
353
+ labelAutoOverflow: {
354
+ description: "",
355
+ type: "boolean",
356
+ default: !1
357
+ },
358
+ adaptForLanguage: {
359
+ description: "",
360
+ type: "boolean",
361
+ default: !0
362
+ },
363
+ formType: {
364
+ description: "",
365
+ type: "string",
366
+ default: "dynamic"
367
+ },
368
+ layout: {
369
+ description: "",
370
+ type: "string",
371
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
372
+ },
373
+ fields: {
374
+ description: "",
375
+ type: "array"
376
+ },
377
+ formData: {
378
+ description: "",
379
+ type: "object"
380
+ }
381
+ }, Do = [
382
+ "id",
383
+ "type",
384
+ "contents"
385
+ ], Ro = {
386
+ $schema: ko,
387
+ $id: Eo,
388
+ title: Uo,
389
+ description: Lo,
390
+ type: Oo,
391
+ properties: No,
392
+ required: Do
393
+ }, ie = {
85
394
  customClass: { type: String, default: "" },
86
395
  customStyle: { type: String, defaut: "" },
87
396
  /** 控制是否可见 */
88
397
  visible: { type: Boolean, default: !0 },
89
398
  /** 内部控件布局是否响应国际化 */
90
- adaptForLanguage: { type: Boolean, default: !0 }
91
- }, re = /* @__PURE__ */ H({
399
+ adaptForLanguage: { type: Boolean, default: !0 },
400
+ /** 绑定动态字段 */
401
+ fields: { type: Array, default: [] },
402
+ /** 绑定动态字段的值*/
403
+ formData: { type: Object, default: null },
404
+ /** 为动态字段指定样式*/
405
+ layout: { type: String, default: "col-12 col-md-6 col-xl-3 col-el-2" }
406
+ }, Ao = Object.assign({}, ie, {
407
+ // 是否渲染form层级
408
+ canRenderForm: { type: Boolean, default: !0 },
409
+ callback: { type: Function }
410
+ }), Pr = le(ie, Bo, Me, Te), Br = le(ie, Ro, Me, Te), se = /* @__PURE__ */ te({
411
+ name: "FDynamicForm",
412
+ props: Ao,
413
+ emits: ["update:modelValue", "event"],
414
+ setup(t, e) {
415
+ const r = U(t.fields), f = /* @__PURE__ */ new Map(), i = U(t.callback);
416
+ qe();
417
+ const F = xe(), v = U(t.formData || {}), T = Ge(v, e);
418
+ We(r.value).setup();
419
+ const C = /* @__PURE__ */ new Map(), w = U(t.canRenderForm), {
420
+ mergeArray: b,
421
+ resolveCallbacks: I,
422
+ resolveEvents: R
423
+ } = Ke(), G = J(() => {
424
+ const o = Ie.getLocale(), a = t.fields && t.fields.length > 0, m = {
425
+ "f-form-layout": a,
426
+ "farris-form": a
427
+ };
428
+ return t.adaptForLanguage && o && (m["farris-form-controls-inline"] = o !== "en"), Ve(m, t.customClass);
429
+ });
430
+ function K() {
431
+ function o(a, m) {
432
+ const {
433
+ id: g
434
+ } = a || {}, {
435
+ field: h
436
+ } = a.binding || {};
437
+ return {
438
+ modelValue: m.getValue(g),
439
+ "onUpdate:modelValue": (y) => {
440
+ m.setValue(g, h || g, y);
441
+ }
442
+ };
443
+ }
444
+ return {
445
+ resolve: o
446
+ };
447
+ }
448
+ function _(o) {
449
+ const a = K();
450
+ return T.getValue(o.id) === void 0 && Object.hasOwnProperty.call(o, "modelValue") && T.setValue(o.id, void 0, o.modelValue), a.resolve(o, T);
451
+ }
452
+ function X(o) {
453
+ const a = {};
454
+ return o && Object.entries(o).forEach(([m, g]) => {
455
+ a[m] = () => Array.isArray(g) ? g.map((h) => A(h)) : A(g);
456
+ }), a;
457
+ }
458
+ function B(o) {
459
+ return o.type ? o.type : o.fields ? "fieldset" : "form-group";
460
+ }
461
+ function P(o) {
462
+ const a = B(o);
463
+ let m = o.customClass;
464
+ m || (m = a === "form-group" ? t.layout : "col-12 px-0");
465
+ const {
466
+ fields: g,
467
+ customClass: h,
468
+ ...y
469
+ } = o, M = {
470
+ ...R(o, e, a)
471
+ }, E = {
472
+ ...I(o, i, a)
473
+ };
474
+ return {
475
+ props: {
476
+ ...{
477
+ ...y,
478
+ customClass: m,
479
+ ..._(o)
480
+ },
481
+ key: o.id,
482
+ ref: (O) => {
483
+ if (O && o.id && !F.has(o.id)) {
484
+ F.register(o.id, O);
485
+ const N = {
486
+ token: o.id,
487
+ name: "component:ready",
488
+ type: B(o),
489
+ payloads: [U(O)],
490
+ schema: o
491
+ };
492
+ e.emit("event", N);
493
+ }
494
+ },
495
+ onVnodeUnmounted: (O) => {
496
+ if (o.id && F.has(o.id)) {
497
+ F.remove(o.id);
498
+ const N = {
499
+ token: o.id,
500
+ name: "component:unmounted",
501
+ type: B(o),
502
+ payloads: [O],
503
+ schema: o
504
+ };
505
+ e.emit("event", N);
506
+ }
507
+ }
508
+ },
509
+ eventProps: M,
510
+ callbackProps: E
511
+ };
512
+ }
513
+ function k(o, a) {
514
+ return Array.isArray(o) ? o.map((m) => a(m)) : a(o);
515
+ }
516
+ function A(o, a) {
517
+ var E;
518
+ const m = B(o), g = ae[m];
519
+ if (o.id && f.set(o.id, o), !g)
520
+ return null;
521
+ const h = () => o.fields ? o.fields.map((x) => A(x)) : null, y = (x, $, O) => {
522
+ let N;
523
+ return O && O.length > 0 ? N = q(x, {
524
+ ...$
525
+ }, O) : N = q(x, {
526
+ ...$
527
+ }, null), N;
528
+ }, M = ((E = C.get(o.id)) == null ? void 0 : E.props) || {};
529
+ return o.fields && o.fields.length > 0 ? y(g, M, [h()]) : o.slots ? y(g, M, [...Object.values(X(o.slots))]) : y(g, M);
530
+ }
531
+ function j(o) {
532
+ const a = B(o);
533
+ if (!ae[a])
534
+ return;
535
+ const {
536
+ props: g,
537
+ eventProps: h,
538
+ callbackProps: y
539
+ } = P(o), M = _e[a], E = M ? M.editorResolver : null, {
540
+ componentEventProps: x,
541
+ editorEventProps: $
542
+ } = h, {
543
+ componentCallbackProps: O,
544
+ editorCallbackProps: N
545
+ } = y;
546
+ if (x && Object.keys(x).length > 0 && Object.assign(g, x), O && Object.keys(O).length > 0 && Object.assign(g, O), E && $ && Object.keys($).length > 0) {
547
+ const D = E.resolve(o);
548
+ Object.assign(D, $);
549
+ }
550
+ if (E && N && Object.keys(N).length > 0) {
551
+ const D = E.resolve(o);
552
+ Object.assign(D, N);
553
+ }
554
+ if (g && Object.keys(g).length > 0) {
555
+ const D = C.get(o.id);
556
+ D ? $e(D == null ? void 0 : D.props, g) : C.set(o.id, ce({
557
+ props: g
558
+ }));
559
+ }
560
+ !o.fields || !Array.isArray(o.fields) || o.fields.forEach((D) => j(D));
561
+ }
562
+ function Y(o) {
563
+ const a = B(o);
564
+ ae[a] && (Q(o), !(!o.fields || !Array.isArray(o.fields)) && o.fields.forEach((g) => Y(g)));
565
+ }
566
+ function Q(o) {
567
+ const a = _(o);
568
+ if (a && Object.keys(a).length > 0) {
569
+ const m = C.get(o.id);
570
+ if (!m)
571
+ C.set(o.id, ce({
572
+ props: a
573
+ }));
574
+ else {
575
+ const g = {
576
+ ...m == null ? void 0 : m.props
577
+ };
578
+ Object.keys(a).forEach((h) => {
579
+ g[h] = a[h];
580
+ }), Object.assign(m == null ? void 0 : m.props, g);
581
+ }
582
+ }
583
+ }
584
+ ke(() => {
585
+ }), z(() => t.formData, (o) => {
586
+ v.value = o;
587
+ }), z(() => v.value, (o) => {
588
+ k(r.value, Y);
589
+ }, {
590
+ deep: !0
591
+ });
592
+ function Z(o) {
593
+ o && k(r.value, j);
594
+ }
595
+ z(() => t.fields, (o) => {
596
+ f.clear(), F.clear(), v.value = t.formData || {}, C.clear(), r.value = o, Z(o);
597
+ }), Z(t.fields);
598
+ function oe(o) {
599
+ o.$forceUpdate && o.$forceUpdate();
600
+ }
601
+ function ne(o) {
602
+ return T.getValue(o);
603
+ }
604
+ function H() {
605
+ return v.value;
606
+ }
607
+ function L(o, a) {
608
+ T.setValue(o, void 0, a);
609
+ const m = f.get(o);
610
+ m && Q(m);
611
+ }
612
+ function W(o) {
613
+ var a;
614
+ return (a = C.get(o)) == null ? void 0 : a.props;
615
+ }
616
+ function n(o, a) {
617
+ const m = C.get(o);
618
+ je(m == null ? void 0 : m.props, a, b);
619
+ }
620
+ e.expose({
621
+ componentManager: F,
622
+ rerender: oe,
623
+ getProps: W,
624
+ setProps: n,
625
+ getControlValue: ne,
626
+ setControlValue: L,
627
+ getValues: H
628
+ });
629
+ function s() {
630
+ return w.value && he(q("div", {
631
+ class: G.value,
632
+ style: t.customStyle
633
+ }, [e.slots.default && e.slots.default(), r.value && r.value.length > 0 && k(r.value, A)]), [[Fe("area-response")]]);
634
+ }
635
+ function d() {
636
+ return !w.value && r.value && r.value.length > 0 && k(r.value, A);
637
+ }
638
+ return () => t.visible ? s() || d() : null;
639
+ }
640
+ }), ye = /* @__PURE__ */ te({
92
641
  name: "FResponseForm",
93
- props: Qt,
642
+ props: ie,
94
643
  emits: [],
95
- setup(t, o) {
96
- const y = L(), d = W(() => {
97
- const c = ge.getLocale(), V = t.customClass.split(" "), F = {
98
- "drag-container": !0
644
+ setup(t, e) {
645
+ var b;
646
+ const r = U(), f = U(), i = J(() => {
647
+ const I = Ie.getLocale(), R = t.fields && t.fields.length > 0, G = {
648
+ "drag-container": !0,
649
+ "f-form-layout": R,
650
+ "farris-form": R
99
651
  };
100
- return V.reduce((v, b) => (v[b] = !0, v), F), t.adaptForLanguage && c && (F["farris-form-controls-inline"] = c !== "en"), F;
101
- });
102
- return () => t.visible && pe(D("div", {
103
- ref: y,
104
- class: d.value,
652
+ return t.adaptForLanguage && I && (G["farris-form-controls-inline"] = I !== "en"), Ve(G, t.customClass);
653
+ }), F = (b = f.value) == null ? void 0 : b.componentManager;
654
+ function v(I) {
655
+ f.value.render(I);
656
+ }
657
+ function T(I) {
658
+ return f.value.getControlValue(I);
659
+ }
660
+ function V(I, R) {
661
+ f.value.setControlValue(I, R);
662
+ }
663
+ function C(I) {
664
+ return f.value.getProps(I);
665
+ }
666
+ function w(I, R) {
667
+ f.value.setProps(I, R);
668
+ }
669
+ return e.expose({
670
+ componentManager: F,
671
+ rerender: v,
672
+ getProps: C,
673
+ setProps: w,
674
+ getControlValue: T,
675
+ setControlValue: V
676
+ }), () => t.visible && he(q("div", {
677
+ ref: r,
678
+ class: i.value,
105
679
  style: t.customStyle
106
- }, [o.slots.default && o.slots.default()]), [[de("area-response")]]);
680
+ }, [e.slots.default && e.slots.default(), t.fields && t.fields.length > 0 && q(se, {
681
+ ref: f,
682
+ fields: t.fields,
683
+ canRenderForm: !1,
684
+ formData: t.formData,
685
+ layout: t.layout
686
+ }, null)]), [[Fe("area-response")]]);
107
687
  }
108
- }), zt = {
688
+ }), jo = {
109
689
  id: { type: String, default: "" },
110
690
  customClass: { type: String, default: "" },
111
691
  customStyle: { type: String, default: "" },
@@ -113,7 +693,7 @@ const Qt = {
113
693
  editor: { type: Object, default: {} },
114
694
  label: { type: String, default: "" },
115
695
  /** value is uncertain because type is uncertain, default value should not be set */
116
- modelValue: { type: [String, Boolean, Array, Number] },
696
+ modelValue: { type: [String, Boolean, Array, Number], default: null },
117
697
  // readonly: { type: Boolean, default: false },
118
698
  visible: { type: Boolean, default: !0 },
119
699
  required: { type: Boolean, default: !1 },
@@ -126,7 +706,7 @@ const Qt = {
126
706
  componentId: { type: String, default: "" },
127
707
  errors: { type: Object, default: null },
128
708
  fill: { type: Boolean, default: !1 }
129
- }, Yt = {
709
+ }, $o = {
130
710
  id: { type: String },
131
711
  required: { type: Boolean, default: !1 },
132
712
  text: { type: String, default: "" },
@@ -137,69 +717,69 @@ const Qt = {
137
717
  * 实际支持 'visible'可见 | 'reserve-space' 占位不显示
138
718
  */
139
719
  showType: { type: String, default: "visible" }
140
- }, Zt = /* @__PURE__ */ H({
720
+ }, qo = /* @__PURE__ */ te({
141
721
  name: "FDynamicFormLabel",
142
- props: Yt,
722
+ props: $o,
143
723
  emits: [],
144
- setup(t, o) {
145
- L(t.title || t.text);
146
- const y = L(t.required), d = L(t.text), c = L(t.valid), V = L(t.inValidTip);
147
- Y(() => t.text, () => {
148
- d.value = t.text;
149
- }), Y(() => t.required, (P, I) => {
150
- P !== I && (y.value = P);
151
- }), Y([() => t.valid, () => t.inValidTip], ([P, I]) => {
152
- c.value = P, V.value = I;
724
+ setup(t, e) {
725
+ U(t.title || t.text);
726
+ const r = U(t.required), f = U(t.text), i = U(t.valid), F = U(t.inValidTip);
727
+ z(() => t.text, () => {
728
+ f.value = t.text;
729
+ }), z(() => t.required, (w, b) => {
730
+ w !== b && (r.value = w);
731
+ }), z([() => t.valid, () => t.inValidTip], ([w, b]) => {
732
+ i.value = w, F.value = b;
153
733
  });
154
- const F = W(() => c.value ? d.value : V.value), v = W(() => c.value ? "" : "color:red"), b = W(() => ({
734
+ const v = J(() => i.value ? f.value : F.value), T = J(() => i.value ? "" : "color:red"), V = J(() => ({
155
735
  "col-form-label": !0,
156
736
  // 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
157
- "f-width-auto": y.value && (t.showType === "none" || !d.value)
158
- })), C = W(() => t.showType === "force-none" ? !1 : t.showType === "reserve-space" || y.value || !!d.value && t.showType !== "none");
159
- return () => C.value && D("label", {
160
- class: b.value,
161
- title: F.value,
162
- style: v.value
163
- }, [!c.value && D("span", {
737
+ "f-width-auto": r.value && (t.showType === "none" || !f.value)
738
+ })), C = J(() => t.showType === "force-none" ? !1 : t.showType === "reserve-space" || r.value || !!f.value && t.showType !== "none");
739
+ return () => C.value && q("label", {
740
+ class: V.value,
741
+ title: v.value,
742
+ style: T.value
743
+ }, [!i.value && q("span", {
164
744
  class: "f-icon f-icon-warning mr-1",
165
745
  style: "color: red; min-width: 16px;",
166
- title: V.value
167
- }, null), D("span", {
746
+ title: F.value
747
+ }, null), q("span", {
168
748
  class: "farris-label-text"
169
- }, [y.value && D("span", {
749
+ }, [r.value && q("span", {
170
750
  class: "farris-label-info text-danger"
171
- }, [fe("*")]), t.showType === "visible" && d.value])]);
751
+ }, [Ee("*")]), t.showType === "visible" && f.value])]);
172
752
  }
173
- }), { globalStorageKey: St } = $t(), r = {}, i = {}, a = {}, s = {};
174
- async function Ht() {
753
+ }), { globalStorageKey: xo } = De(), l = {}, c = {}, u = {}, p = {};
754
+ async function Go() {
175
755
  {
176
756
  const t = {
177
- schemaMap: ue,
178
- propertyConfigSchemaMap: Gt,
179
- propertyEffectMap: xt,
180
- schemaResolverMap: qt
757
+ schemaMap: ve,
758
+ propertyConfigSchemaMap: Ne,
759
+ propertyEffectMap: Oe,
760
+ schemaResolverMap: Le
181
761
  };
182
- Ce.register(r, i, a, s), ye.register(r, i, a, s), he.register(r, i, a, s), Fe.register(r, i, a, s), be.register(r, i, a, s, t), ve.register(r, i, a, s), ie.register(r, i, a, s, t), ae.register(r, i, a, s, t), ie.register(r, i, a, s, t), ae.register(r, i, a, s, t), Ie.register(r, i, a, s, t), we.register(r, i, a, s), Ve.register(r, i, a, s), Me.register(r, i, a, s, t), Be.register(r, i, a, s), Te.register(r, i, a, s, t), Le.register(r, i, a, s, t), ke.register(r, i, a, s), Ee.register(r, i, a, s, t), Pe.register(r, i, a, s), kt.register(r, i, a, s), Ue.register(r, i, a, s), De.register(r, i, a, s), It.register(r, i, a, s), Ae.register(r, i, a, s), Re.register(r, i, a, s, t), Oe.register(r, i, a, s, t), xe.register(r, i, a, s, t), qe.register(r, i, a, s), Ge.register(r, i, a, s, t), je.register(r, i, a, s), $e.register(r, i, a, s), We.register(r, i, a, s), Ke.register(r, i, a, s, t), Xe.register(r, i, a, s), _e.register(r, i, a, s, t), Je.register(r, i, a, s), Qe.register(r, i, a, s), ze.register(r, i, a, s), Ye.register(r, i, a, s, t), Ze.register(r, i, a, s, t), Se.register(r, i, a, s), et.register(r, i, a, s, t), tt.register(r, i, a, s), He.register(r, i, a, s), Ft.register(r, i, a), nt.register(r, i, a, s), rt.register(r, i, a, s, t), it.register(r, i, a, s), at.register(r, i, a, s), st.register(r, i, a, s), lt.register(r, i, a, s, t), Vt.register(r, i, a, s), ct.register(r, i, a, s, t), ut.register(r, i, a, s), mt.register(r, i, a, s), pt.register(r, i, a, s, t), dt.register(r, i, a, s), ft.register(r, i, a, s), yt.register(r, i, a, s), gt.register(r, i, a, s), Ct.register(r, i, a, s), ht.register(r, i, a, s, t), bt.register(r, i, a, s), Ne.register(r, i, a, s), vt.register(r, i, a, s), wt.register(r, i, a, s, t), Bt.register(r, i, a, s), Mt.register(r, i, a, s), Tt.register(r, i, a, s), Lt.register(r, i, a, s), Et.register(r, i, a, s), Pt.register(r, i, a, s, t), Ut.register(r, i, a, s), Dt.register(r, i, a, s), Nt.register(r, i, a, s), At.register(r, i, a, s, t), Rt.register(r, i, a, s, t), Ot.register(r, i, a, s);
183
- const o = window[St];
184
- if (o)
185
- for (const y in o)
186
- o[y].createPropsResolver = jt, o[y].register(r, i, a);
762
+ Je.register(l, c, u, p), Xe.register(l, c, u, p), Qe.register(l, c, u, p), ze.register(l, c, u, p), Ye.register(l, c, u, p, t), Ze.register(l, c, u, p), de.register(l, c, u, p, t), fe.register(l, c, u, p, t), de.register(l, c, u, p, t), fe.register(l, c, u, p, t), Se.register(l, c, u, p, t), He.register(l, c, u, p), et.register(l, c, u, p), ot.register(l, c, u, p, t), tt.register(l, c, u, p), nt.register(l, c, u, p, t), rt.register(l, c, u, p, t), st.register(l, c, u, p), it.register(l, c, u, p, t), at.register(l, c, u, p), so.register(l, c, u, p), lt.register(l, c, u, p), ct.register(l, c, u, p), St.register(l, c, u, p), pt.register(l, c, u, p), mt.register(l, c, u, p, t), dt.register(l, c, u, p, t), yt.register(l, c, u, p, t), ft.register(l, c, u, p), gt.register(l, c, u, p, t), Ct.register(l, c, u, p), ht.register(l, c, u, p), Ft.register(l, c, u, p), bt.register(l, c, u, p, t), vt.register(l, c, u, p), Vt.register(l, c, u, p, t), It.register(l, c, u, p), Tt.register(l, c, u, p), Mt.register(l, c, u, p), wt.register(l, c, u, p, t), Pt.register(l, c, u, p, t), Bt.register(l, c, u, p), Et.register(l, c, u, p, t), Ut.register(l, c, u, p), kt.register(l, c, u, p), zt.register(l, c, u), Ot.register(l, c, u, p), Nt.register(l, c, u, p, t), Dt.register(l, c, u, p), Rt.register(l, c, u, p), At.register(l, c, u, p), jt.register(l, c, u, p, t), eo.register(l, c, u, p), $t.register(l, c, u, p, t), qt.register(l, c, u, p), xt.register(l, c, u, p), Gt.register(l, c, u, p, t), Wt.register(l, c, u, p), Kt.register(l, c, u, p), Xt.register(l, c, u, p), _t.register(l, c, u, p), Jt.register(l, c, u, p), Qt.register(l, c, u, p, t), Yt.register(l, c, u, p), ut.register(l, c, u, p), Zt.register(l, c, u, p), Ht.register(l, c, u, p, t), to.register(l, c, u, p), oo.register(l, c, u, p), no.register(l, c, u, p), ro.register(l, c, u, p), io.register(l, c, u, p), ao.register(l, c, u, p, t), lo.register(l, c, u, p), co.register(l, c, u, p), uo.register(l, c, u, p), po.register(l, c, u, p, t), mo.register(l, c, u, p, t), fo.register(l, c, u, p);
763
+ const e = window[xo];
764
+ if (e)
765
+ for (const r in e)
766
+ e[r].createPropsResolver = le, e[r].register(l, c, u);
187
767
  }
188
768
  }
189
- function me() {
190
- Ht();
191
- function t(F) {
192
- const v = r[F];
193
- if (!v)
194
- throw new Error(`Could not find the editor of type '${F}'`);
195
- return v;
769
+ function we() {
770
+ Go();
771
+ function t(v) {
772
+ const T = l[v];
773
+ if (!T)
774
+ throw new Error(`Could not find the editor of type '${v}'`);
775
+ return T;
196
776
  }
197
- function o(F, v) {
198
- const b = i[F];
199
- return b ? b(v) : {};
777
+ function e(v, T) {
778
+ const V = c[v];
779
+ return V ? V(T) : {};
200
780
  }
201
- function y(F) {
202
- switch (F) {
781
+ function r(v) {
782
+ switch (v) {
203
783
  case "check-box":
204
784
  return "onChangeValue";
205
785
  case "switch":
@@ -273,31 +853,31 @@ function me() {
273
853
  return "onUpdate:modelValue";
274
854
  }
275
855
  }
276
- function d(F) {
277
- switch (F) {
856
+ function f(v) {
857
+ switch (v) {
278
858
  case "combo-list":
279
859
  case "input-group":
280
860
  case "textarea":
281
861
  return "onClear";
282
862
  }
283
863
  }
284
- function c(F) {
285
- switch (F) {
864
+ function i(v) {
865
+ switch (v) {
286
866
  case "input-group":
287
867
  case "textarea":
288
868
  return "onMousedownEvent";
289
869
  }
290
870
  }
291
- function V(F) {
292
- switch (F) {
871
+ function F(v) {
872
+ switch (v) {
293
873
  case "input-group":
294
874
  case "textarea":
295
875
  return "onMouseupEvent";
296
876
  }
297
877
  }
298
- return { resolveEditorProps: o, resolveEditorType: t, getChangeFunctionName: y, getClearFunctionName: d, getMousedownFunctionName: c, getMouseupFunctionName: V };
878
+ return { resolveEditorProps: e, resolveEditorType: t, getChangeFunctionName: r, getClearFunctionName: f, getMousedownFunctionName: i, getMouseupFunctionName: F };
299
879
  }
300
- const eo = {
880
+ const Wo = {
301
881
  /**
302
882
  * 显示的错误信息
303
883
  */
@@ -305,122 +885,122 @@ const eo = {
305
885
  type: Object,
306
886
  default: null
307
887
  }
308
- }, to = /* @__PURE__ */ H({
888
+ }, Ko = /* @__PURE__ */ te({
309
889
  name: "FValidationMessage",
310
- props: eo,
890
+ props: Wo,
311
891
  emits: [],
312
- setup(t, o) {
313
- const y = L(t.errors);
314
- Y(() => t.errors, (V) => {
315
- y.value = V;
892
+ setup(t, e) {
893
+ const r = U(t.errors);
894
+ z(() => t.errors, (F) => {
895
+ r.value = F;
316
896
  });
317
- const d = L(!0), c = W(() => {
318
- if (y.value) {
319
- const V = Object.keys(y.value).map((F) => {
320
- var v;
321
- return (v = y.value[F]) == null ? void 0 : v.name;
897
+ const f = U(!0), i = J(() => {
898
+ if (r.value) {
899
+ const F = Object.keys(r.value).map((v) => {
900
+ var T;
901
+ return (T = r.value[v]) == null ? void 0 : T.name;
322
902
  });
323
- return V.length ? V.join(" ") : "";
903
+ return F.length ? F.join(" ") : "";
324
904
  }
325
905
  return "";
326
906
  });
327
- return () => c.value && D("div", {
907
+ return () => i.value && q("div", {
328
908
  class: "farris-feedback f-state-invalid",
329
- onClick: () => d.value = !d.value
330
- }, [!d.value && D("span", {
909
+ onClick: () => f.value = !f.value
910
+ }, [!f.value && q("span", {
331
911
  class: "f-icon f-icon-message_warning f-feedback-icon"
332
- }, null), d.value && D("span", {
912
+ }, null), f.value && q("span", {
333
913
  class: "f-feedback-message"
334
- }, [c.value])]);
914
+ }, [i.value])]);
335
915
  }
336
- }), le = /* @__PURE__ */ H({
916
+ }), ge = /* @__PURE__ */ te({
337
917
  name: "FDynamicFormGroup",
338
- props: zt,
918
+ props: jo,
339
919
  emits: ["change", "update:modelValue"],
340
- setup(t, o) {
341
- var te;
342
- const y = L(t.id), d = L(t.customClass), c = L(t.editor), V = L(t.label), F = L(t.modelValue), v = L(t.readonly), b = L(((te = t.editor) == null ? void 0 : te.required) || t.required), C = L(t.showLabel), P = L(t.visible);
343
- L(t.type);
344
- const I = L(), A = L(t.errors), G = Wt(), q = L(t.editor.type || "input-group"), j = W(() => C.value ? t.showLabelType : "none"), {
345
- resolveEditorProps: X,
346
- resolveEditorType: K,
347
- getChangeFunctionName: T,
348
- getClearFunctionName: w
349
- } = me(), B = W(() => {
350
- const k = {
920
+ setup(t, e) {
921
+ var H;
922
+ const r = U(t.id), f = U(t.customClass), i = U(t.editor), F = U(t.label), v = U(t.modelValue), T = U(t.readonly), V = U(((H = t.editor) == null ? void 0 : H.required) || t.required), C = U(t.showLabel), w = U(t.visible);
923
+ U(t.type);
924
+ const b = U(), I = U(t.errors), R = Re(), G = U(t.editor.type || "input-group"), K = J(() => C.value ? t.showLabelType : "none"), {
925
+ resolveEditorProps: _,
926
+ resolveEditorType: X,
927
+ getChangeFunctionName: B,
928
+ getClearFunctionName: P
929
+ } = we(), k = J(() => {
930
+ const L = {
351
931
  "form-group": !0,
352
932
  "farris-form-group": !0,
353
933
  "common-group": !0,
354
- "q-state-readonly": v.value,
355
- "form-group--in-mobile": G
934
+ "q-state-readonly": T.value,
935
+ "form-group--in-mobile": R
356
936
  };
357
- return k["form-group--has-" + q.value] = !0, k;
358
- }), N = W(() => {
937
+ return L["form-group--has-" + G.value] = !0, L;
938
+ }), A = J(() => {
359
939
  if (t.fill)
360
940
  return {
361
941
  maxWidth: "none"
362
942
  };
363
943
  });
364
- function U(k, R, e) {
365
- F.value = R !== void 0 ? R : k, o.emit("update:modelValue", F.value), o.emit("change", F.value, {
366
- newValue: k,
367
- newModelValue: R,
368
- parameters: e
944
+ function j(L, W, n) {
945
+ v.value = W !== void 0 ? W : L, e.emit("update:modelValue", v.value), e.emit("change", v.value, {
946
+ newValue: L,
947
+ newModelValue: W,
948
+ parameters: n
369
949
  });
370
950
  }
371
- function Z() {
372
- o.emit("update:modelValue", "");
951
+ function Y() {
952
+ e.emit("update:modelValue", "");
373
953
  }
374
- function z(k) {
375
- return (...R) => {
376
- Z(), typeof k == "function" && k(...R);
954
+ function Q(L) {
955
+ return (...W) => {
956
+ Y(), typeof L == "function" && L(...W);
377
957
  };
378
958
  }
379
- function ee(k) {
380
- return (R, e, n) => {
381
- U(R, e, n), typeof k == "function" && k(R, e, n);
959
+ function Z(L) {
960
+ return (W, n, s) => {
961
+ j(W, n, s), typeof L == "function" && L(W, n, s);
382
962
  };
383
963
  }
384
- const oe = W(() => {
385
- const k = c.value.type || "input-group", R = K(k), e = X(k, c.value), n = T(k), l = w(c.value.type);
386
- return l && (e[l] = z(e[l])), n && (e[n] = ee(e[n])), (e.id == null || e.id === "") && (e.id = y.value), k === "number-range" && c.value.onBeginValueChange && typeof c.value.onBeginValueChange == "function" ? (c.value.onBeginValueChange && typeof c.value.onBeginValueChange == "function" && (e.onBeginValueChange = c.value.onBeginValueChange), c.value.onEndValueChange && typeof c.value.onEndValueChange == "function" && (e.onEndValueChange = c.value.onEndValueChange)) : k === "lookup" && c.value["onUpdate:idValue"] && typeof c.value["onUpdate:idValue"] == "function" ? (e["onUpdate:idValue"] = c.value["onUpdate:idValue"], e.id = y.value) : k === "collection-property-editor" && c.value.onSelectionChange && typeof c.value.onSelectionChange == "function" ? e.onSelectionChange = c.value.onSelectionChange : k === "property-editor" && (e.onBeforeOpenVariables = c.value.onBeforeOpenVariables), () => D(R, ce({
387
- ref: I
388
- }, e, {
389
- modelValue: F.value,
390
- "onUpdate:modelValue": (m) => F.value = m
391
- }), o.slots);
964
+ const oe = J(() => {
965
+ const L = i.value.type || "input-group", W = X(L), n = _(L, i.value), s = B(L), d = P(i.value.type);
966
+ return d && (n[d] = Q(n[d])), s && (n[s] = Z(n[s])), (n.id == null || n.id === "") && (n.id = r.value), L === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && (n.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && (n.onEndValueChange = i.value.onEndValueChange)) : L === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? (n["onUpdate:idValue"] = i.value["onUpdate:idValue"], n.id = r.value) : L === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? n.onSelectionChange = i.value.onSelectionChange : L === "property-editor" && (n.onBeforeOpenVariables = i.value.onBeforeOpenVariables), () => q(W, be({
967
+ ref: b
968
+ }, n, {
969
+ modelValue: v.value,
970
+ "onUpdate:modelValue": (o) => v.value = o
971
+ }), e.slots);
392
972
  });
393
973
  function ne() {
394
- return D(to, {
395
- id: `${y.value}-validation-message`,
396
- errors: A.value
974
+ return q(Ko, {
975
+ id: `${r.value}-validation-message`,
976
+ errors: I.value
397
977
  }, null);
398
978
  }
399
- return Y([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible, () => t.errors], ([k, R, e, n, l, m, f, g, h, p]) => {
400
- var u;
401
- y.value = k, d.value = R, c.value = e, V.value = n, F.value = l, v.value = m, b.value = ((u = c.value) == null ? void 0 : u.required) || f, C.value = g, P.value = h, A.value = p;
402
- }), o.expose({
403
- editorRef: I
404
- }), () => P.value && D("div", {
405
- id: `${y.value}-form-group`,
406
- class: d.value,
979
+ return z([() => t.id, () => t.customClass, () => t.editor, () => t.label, () => t.modelValue, () => t.readonly, () => t.required, () => t.showLabel, () => t.visible, () => t.errors], ([L, W, n, s, d, o, a, m, g, h]) => {
980
+ var y;
981
+ r.value = L, f.value = W, i.value = n, F.value = s, v.value = d, T.value = o, V.value = ((y = i.value) == null ? void 0 : y.required) || a, C.value = m, w.value = g, I.value = h;
982
+ }), e.expose({
983
+ editorRef: b
984
+ }), () => w.value && q("div", {
985
+ id: `${r.value}-form-group`,
986
+ class: f.value,
407
987
  style: t.customStyle
408
- }, [D("div", {
988
+ }, [q("div", {
409
989
  class: "farris-group-wrap",
410
- style: N.value
411
- }, [D("div", {
412
- class: B.value
413
- }, [D(Zt, {
414
- id: `${y.value}-lable`,
415
- showType: j.value,
416
- required: b.value,
417
- text: V.value,
418
- title: V.value
419
- }, null), D("div", {
990
+ style: A.value
991
+ }, [q("div", {
992
+ class: k.value
993
+ }, [q(qo, {
994
+ id: `${r.value}-lable`,
995
+ showType: K.value,
996
+ required: V.value,
997
+ text: F.value,
998
+ title: F.value
999
+ }, null), q("div", {
420
1000
  class: "farris-input-wrap"
421
1001
  }, [oe.value(), ne()])])])]);
422
1002
  }
423
- }), oo = {
1003
+ }), _o = {
424
1004
  id: { type: String, default: "" },
425
1005
  /** 筛选组件配置器,具体配置项可查看各组件文档 */
426
1006
  editor: { type: Object, default: {} },
@@ -434,458 +1014,530 @@ const eo = {
434
1014
  * 作为内嵌编辑器被创建后默认选中文本
435
1015
  */
436
1016
  selectOnCreated: { type: Boolean, default: !1 }
437
- }, Rn = /* @__PURE__ */ H({
1017
+ }, Ce = /* @__PURE__ */ te({
438
1018
  name: "FDynamicFormInput",
439
- props: oo,
1019
+ props: _o,
440
1020
  emits: ["change", "update:modelValue", "mousedown", "mouseup"],
441
- setup(t, o) {
442
- const y = L(t.id), d = L(t.editor), c = L(t.modelValue), {
443
- resolveEditorProps: V,
444
- resolveEditorType: F,
445
- getChangeFunctionName: v,
446
- getMousedownFunctionName: b,
1021
+ setup(t, e) {
1022
+ const r = U(t.id), f = U(t.editor), i = U(t.modelValue), {
1023
+ resolveEditorProps: F,
1024
+ resolveEditorType: v,
1025
+ getChangeFunctionName: T,
1026
+ getMousedownFunctionName: V,
447
1027
  getMouseupFunctionName: C,
448
- getClearFunctionName: P
449
- } = me();
450
- function I(T, w, B) {
451
- c.value = w !== void 0 ? w : T, o.emit("update:modelValue", c.value), o.emit("change", c.value, {
452
- newValue: T,
453
- newModelValue: w,
454
- parameters: B
1028
+ getClearFunctionName: w
1029
+ } = we();
1030
+ function b(B, P, k) {
1031
+ i.value = P !== void 0 ? P : B, e.emit("update:modelValue", i.value), e.emit("change", i.value, {
1032
+ newValue: B,
1033
+ newModelValue: P,
1034
+ parameters: k
455
1035
  });
456
1036
  }
457
- function A(T) {
458
- o.emit("mousedown", T);
1037
+ function I(B) {
1038
+ e.emit("mousedown", B);
459
1039
  }
460
- function G(T) {
461
- o.emit("mouseup", T);
1040
+ function R(B) {
1041
+ e.emit("mouseup", B);
462
1042
  }
463
- function q() {
464
- o.emit("update:modelValue", "");
1043
+ function G() {
1044
+ e.emit("update:modelValue", "");
465
1045
  }
466
- function j(T) {
467
- return (...w) => {
468
- q(), typeof T == "function" && T(...w);
1046
+ function K(B) {
1047
+ return (...P) => {
1048
+ G(), typeof B == "function" && B(...P);
469
1049
  };
470
1050
  }
471
- function X(T) {
472
- return (w, B, N) => {
473
- I(w, B, N), typeof T == "function" && T(w, B, N);
1051
+ function _(B) {
1052
+ return (P, k, A) => {
1053
+ b(P, k, A), typeof B == "function" && B(P, k, A);
474
1054
  };
475
1055
  }
476
- const K = W(() => {
477
- const T = F(d.value.type), w = V(d.value.type, d.value);
478
- w.focusOnCreated = t.focusOnCreated, w.selectOnCreated = t.selectOnCreated;
479
- const B = v(d.value.type), N = P(d.value.type);
480
- N && (w[N] = j(w[N])), B && (w[B] = X(w[B]));
481
- const U = b(d.value.type);
482
- w[U] = A;
483
- const Z = C(d.value.type);
484
- return w[Z] = G, w.id = y.value, () => D(T, ce(w, {
485
- modelValue: c.value,
486
- "onUpdate:modelValue": (z) => c.value = z
1056
+ const X = J(() => {
1057
+ const B = v(f.value.type), P = F(f.value.type, f.value);
1058
+ P.focusOnCreated = t.focusOnCreated, P.selectOnCreated = t.selectOnCreated;
1059
+ const k = T(f.value.type), A = w(f.value.type);
1060
+ A && (P[A] = K(P[A])), k && (P[k] = _(P[k]));
1061
+ const j = V(f.value.type);
1062
+ P[j] = I;
1063
+ const Y = C(f.value.type);
1064
+ return P[Y] = R, P.id = r.value, () => q(B, be(P, {
1065
+ modelValue: i.value,
1066
+ "onUpdate:modelValue": (Q) => i.value = Q
487
1067
  }), null);
488
1068
  });
489
- return Y([() => t.id, () => t.editor, () => t.modelValue], ([T, w, B]) => {
490
- y.value = T, d.value = w, c.value = B;
491
- }), () => K.value();
1069
+ return z([() => t.id, () => t.editor, () => t.modelValue], ([B, P, k]) => {
1070
+ r.value = B, f.value = P, i.value = k;
1071
+ }), () => X.value();
492
1072
  }
493
1073
  });
494
- function no(t, o) {
495
- function y(b, C = null) {
1074
+ function Xo(t, e) {
1075
+ function r(V, C = null) {
496
1076
  if (C)
497
1077
  return C;
498
- const P = t.getComponentById(o);
499
- return t.selectNode(P, (I) => I.id === b);
1078
+ const w = t.getComponentById(e);
1079
+ return t.selectNode(w, (b) => b.id === V);
500
1080
  }
501
- function d(b) {
502
- const C = t.getComponentById(b);
1081
+ function f(V) {
1082
+ const C = t.getComponentById(V);
503
1083
  return !(!C || !C.componentType || !C.componentType.startsWith("form"));
504
1084
  }
505
- function c(b) {
506
- const C = new Set(b);
1085
+ function i(V) {
1086
+ const C = new Set(V);
507
1087
  return Array.from(C).length === 1;
508
1088
  }
509
- function V(b) {
510
- const C = y(b.id), P = ot(t), I = [];
511
- P.getResonseFormLayoutConfig(C, I, 1);
512
- const A = I.map((B) => B.columnInSM), G = I.map((B) => B.columnInMD), q = I.map((B) => B.columnInLG), j = I.map((B) => B.columnInEL), X = c(A) ? A[0] : 0, K = c(G) ? G[0] : 0, T = c(q) ? q[0] : 0, w = c(j) ? j[0] : 0;
1089
+ function F(V) {
1090
+ const C = r(V.id), w = Lt(t), b = [];
1091
+ w.getResonseFormLayoutConfig(C, b, 1);
1092
+ const I = b.map((k) => k.columnInSM), R = b.map((k) => k.columnInMD), G = b.map((k) => k.columnInLG), K = b.map((k) => k.columnInEL), _ = i(I) ? I[0] : 0, X = i(R) ? R[0] : 0, B = i(G) ? G[0] : 0, P = i(K) ? K[0] : 0;
513
1093
  return {
514
- uniqueColClassInSM: X,
515
- uniqueColClassInMD: K,
516
- uniqueColClassInLG: T,
517
- uniqueColClassInEL: w
1094
+ uniqueColClassInSM: _,
1095
+ uniqueColClassInMD: X,
1096
+ uniqueColClassInLG: B,
1097
+ uniqueColClassInEL: P
518
1098
  };
519
1099
  }
520
- function F(b, C) {
521
- let P, I, A, G, q = [];
522
- if (b) {
523
- const B = b.split(" "), N = B.filter((U) => U.startsWith("col-"));
524
- P = N.find((U) => /^col-([1-9]|10|11|12)$/.test(U)), I = N.find((U) => /^col-md-([1-9]|10|11|12)$/.test(U)), A = N.find((U) => /^col-xl-([1-9]|10|11|12)$/.test(U)), G = N.find((U) => /^col-el-([1-9]|10|11|12)$/.test(U)), q = B.filter((U) => !U.startsWith("col-"));
1100
+ function v(V, C) {
1101
+ let w, b, I, R, G = [];
1102
+ if (V) {
1103
+ const k = V.split(" "), A = k.filter((j) => j.startsWith("col-"));
1104
+ w = A.find((j) => /^col-([1-9]|10|11|12)$/.test(j)), b = A.find((j) => /^col-md-([1-9]|10|11|12)$/.test(j)), I = A.find((j) => /^col-xl-([1-9]|10|11|12)$/.test(j)), R = A.find((j) => /^col-el-([1-9]|10|11|12)$/.test(j)), G = k.filter((j) => !j.startsWith("col-"));
525
1105
  }
526
- const j = C.uniqueColClassInSM ? "col-" + C.uniqueColClassInSM : P, X = C.uniqueColClassInMD ? "col-md-" + C.uniqueColClassInMD : I, K = C.uniqueColClassInLG ? "col-xl-" + C.uniqueColClassInLG : A, T = C.uniqueColClassInEL ? "col-el-" + C.uniqueColClassInEL : G;
527
- return [j, X, K, T].concat(q).join(" ");
1106
+ const K = C.uniqueColClassInSM ? "col-" + C.uniqueColClassInSM : w, _ = C.uniqueColClassInMD ? "col-md-" + C.uniqueColClassInMD : b, X = C.uniqueColClassInLG ? "col-xl-" + C.uniqueColClassInLG : I, B = C.uniqueColClassInEL ? "col-el-" + C.uniqueColClassInEL : R;
1107
+ return [K, _, X, B].concat(G).join(" ");
528
1108
  }
529
- function v(b, C, P) {
530
- b = y(P, b), b.contents.forEach((I) => {
531
- if (I.type === S.fieldset.type) {
532
- v(I, C, I.id);
1109
+ function T(V, C, w) {
1110
+ V = r(w, V), V.contents.forEach((b) => {
1111
+ if (b.type === ee["dynamic-form"].type)
1112
+ return;
1113
+ if (b.type === ee.fieldset.type) {
1114
+ T(b, C, b.id);
533
1115
  return;
534
1116
  }
535
- I.appearance || (I.appearance = {});
536
- const A = I.appearance.class;
537
- I.appearance.class = F(A, C);
1117
+ b.appearance || (b.appearance = {});
1118
+ const I = b.appearance.class;
1119
+ b.appearance.class = v(I, C);
538
1120
  });
539
1121
  }
540
- return { checkIsInFormComponent: d, assembleUnifiedLayoutContext: V, changeFormControlsByUnifiedLayoutConfig: v };
1122
+ return { checkIsInFormComponent: f, assembleUnifiedLayoutContext: F, changeFormControlsByUnifiedLayoutConfig: T, changeControlClassInByColumn: v };
541
1123
  }
542
- class ro extends Jt {
543
- constructor(o, y) {
544
- super(o, y);
545
- }
546
- getPropertyConfig(o, y) {
547
- const d = this;
548
- this.propertyConfig.categories.basic = this.getBasicPropConfig(o);
549
- const { checkIsInFormComponent: c, assembleUnifiedLayoutContext: V, changeFormControlsByUnifiedLayoutConfig: F } = no(this.formSchemaUtils, this.componentId), v = this.getAppearanceConfig(o), b = c(this.componentId);
550
- return v.properties.adaptForLanguage = {
1124
+ class Jo extends ho {
1125
+ constructor(e, r) {
1126
+ super(e, r);
1127
+ }
1128
+ getPropertyConfig(e, r) {
1129
+ const f = this;
1130
+ this.propertyConfig.categories.basic = this.getBasicPropConfig(e);
1131
+ const { checkIsInFormComponent: i, assembleUnifiedLayoutContext: F, changeFormControlsByUnifiedLayoutConfig: v, changeControlClassInByColumn: T } = Xo(this.formSchemaUtils, this.componentId), V = this.getAppearanceConfig(e), C = i(this.componentId);
1132
+ V.properties.adaptForLanguage = {
551
1133
  title: "控件布局响应国际化",
552
1134
  description: "启用国际化后:简体中文、繁体中文环境下控件标签与输入框在一行展示,其他语言环境下控件标签与输入框上下排列。",
553
- visible: b,
1135
+ visible: e.formType === "dynamic" || C,
554
1136
  type: "boolean"
555
- }, v.properties.labelAutoOverflow = {
1137
+ }, V.properties.labelAutoOverflow = {
556
1138
  title: "控件标签换行",
557
1139
  description: "控件标签字数超长时,换行显示。控件标签与输入框在一行展示时,此属性有效。",
558
- visible: b,
1140
+ visible: e.formType === "dynamic" || C,
559
1141
  type: "boolean"
560
- }, v.properties.unifiedLayout = {
1142
+ }, V.properties.formType = {
1143
+ title: "控件来源",
1144
+ description: "",
1145
+ type: "enum",
1146
+ editor: {
1147
+ readonly: e.type === "dynamic-form",
1148
+ type: "combo-list",
1149
+ textField: "name",
1150
+ valueField: "value",
1151
+ data: [
1152
+ {
1153
+ value: "static",
1154
+ name: "静态"
1155
+ },
1156
+ {
1157
+ value: "dynamic",
1158
+ name: "动态"
1159
+ },
1160
+ {
1161
+ value: "mixed",
1162
+ name: "混合"
1163
+ }
1164
+ ]
1165
+ },
1166
+ refreshPanelAfterChanged: !0
1167
+ }, V.properties.unifiedLayout = {
561
1168
  title: "统一布局配置",
562
1169
  description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
563
- visible: b,
1170
+ visible: e.formType === "dynamic" || C,
564
1171
  refreshPanelAfterChanged: !0,
565
1172
  editor: {
566
1173
  type: "response-form-layout-setting",
567
- initialState: V(o)
1174
+ initialState: F(e)
568
1175
  }
569
- }, v.setPropertyRelates = function(C, P) {
570
- if (C)
571
- switch (C && C.propertyID) {
1176
+ }, V.setPropertyRelates = function(b, I) {
1177
+ if (b)
1178
+ switch (b && b.propertyID) {
572
1179
  case "unifiedLayout": {
573
- F(null, C.propertyValue, o.id), d.updateElementByParentContainer(o.id, y);
1180
+ e.formType === "dynamic" ? e.layout = T("", b.propertyValue) : (v(null, b.propertyValue, e.id), f.updateElementByParentContainer(e.id, r));
574
1181
  break;
575
1182
  }
576
1183
  case "labelAutoOverflow": {
577
- d.setLabelAutoOverflow(o, C.propertyValue), Kt();
1184
+ f.setLabelAutoOverflow(e, b.propertyValue), yo();
578
1185
  break;
579
1186
  }
580
1187
  }
581
- }, this.propertyConfig.categories.appearance = v, this.propertyConfig.categories.behavior = this.getBehaviorConfig(o), this.propertyConfig;
1188
+ }, this.propertyConfig.categories.appearance = V;
1189
+ let w = {};
1190
+ if (e.formType && ["dynamic", "mixed"].indexOf(e.formType) > -1) {
1191
+ const b = this.getPropertyEditorParams(e, ["Variable", "Custom"], "fields", {}, { newVariablePrefix: "", newVariableType: "Array" }), I = this.getPropertyEditorParams(e, ["Variable", "Custom"], "formData", {}, { newVariablePrefix: "", newVariableType: "Object" });
1192
+ w = {
1193
+ fields: {
1194
+ title: "动态控件列表",
1195
+ type: "string",
1196
+ description: "动态控件列表",
1197
+ editor: b
1198
+ },
1199
+ formData: {
1200
+ title: "动态控件列表初始值",
1201
+ type: "string",
1202
+ description: "动态控件列表初始值",
1203
+ editor: I
1204
+ }
1205
+ };
1206
+ }
1207
+ return this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "", w, (b, I) => {
1208
+ switch (b.propertyID) {
1209
+ case "fields":
1210
+ case "formData":
1211
+ f.afterMutilEditorChanged(e, b);
1212
+ break;
1213
+ }
1214
+ }), this.propertyConfig;
582
1215
  }
583
- setLabelAutoOverflow(o, y, d) {
584
- if (!d) {
585
- const c = this.formSchemaUtils.getComponentById(this.componentId);
586
- d = this.formSchemaUtils.selectNode(c, (V) => V.id === o.id);
1216
+ setLabelAutoOverflow(e, r, f) {
1217
+ if (!f) {
1218
+ const i = this.formSchemaUtils.getComponentById(this.componentId);
1219
+ f = this.formSchemaUtils.selectNode(i, (F) => F.id === e.id);
587
1220
  }
588
- d && d.contents && d.contents.length && d.contents.forEach((c) => {
589
- if (c.type === S.fieldset.type) {
590
- this.setLabelAutoOverflow(null, y, c);
1221
+ f && f.contents && f.contents.length && f.contents.forEach((i) => {
1222
+ if (i.type === ee.fieldset.type) {
1223
+ this.setLabelAutoOverflow(null, r, i);
591
1224
  return;
592
1225
  }
593
- c.appearance || (c.appearance = {
1226
+ i.appearance || (i.appearance = {
594
1227
  class: ""
595
- }), c.appearance.class || (c.appearance.class = ""), y ? c.appearance.class.includes("farris-group-multi-label") || (c.appearance.class = c.appearance.class + " farris-group-multi-label") : c.appearance.class = c.appearance.class.replace("farris-group-multi-label", "").trim();
1228
+ }), i.appearance.class || (i.appearance.class = ""), r ? i.appearance.class.includes("farris-group-multi-label") || (i.appearance.class = i.appearance.class + " farris-group-multi-label") : i.appearance.class = i.appearance.class.replace("farris-group-multi-label", "").trim();
596
1229
  });
597
1230
  }
598
1231
  }
599
- function On(t, o) {
600
- const y = t.schema, d = new Xt(), { canMove: c, canAccept: V, canDelete: F } = d.getTemplateRule(t, o);
601
- function v(e, n) {
602
- const { sourceElement: l } = e, { componentInstance: m } = l, f = o == null ? void 0 : o.formSchemaUtils;
603
- if (!f)
1232
+ function kr(t, e) {
1233
+ const r = t.schema, f = new go(), { canMove: i, canAccept: F, canDelete: v } = f.getTemplateRule(t, e);
1234
+ function T(n, s) {
1235
+ const { sourceElement: d } = n, { componentInstance: o } = d, a = e == null ? void 0 : e.formSchemaUtils;
1236
+ if (!a)
604
1237
  return !0;
605
- const g = f.getComponentById(m.value.belongedComponentId), h = f.getViewModelById(g.viewModel), p = f.getComponentById(t.componentInstance.value.belongedComponentId), u = f.getViewModelById(p.viewModel);
606
- return n ? h != null && h.id && (u != null && u.id) && h.id !== u.id ? h.bindTo === u.bindTo : !0 : (h == null ? void 0 : h.id) === (u == null ? void 0 : u.id);
1238
+ const m = a.getComponentById(o.value.belongedComponentId), g = a.getViewModelById(m.viewModel), h = a.getComponentById(t.componentInstance.value.belongedComponentId), y = a.getViewModelById(h.viewModel);
1239
+ return s ? g != null && g.id && (y != null && y.id) && g.id !== y.id ? g.bindTo === y.bindTo : !0 : (g == null ? void 0 : g.id) === (y == null ? void 0 : y.id);
607
1240
  }
608
- function b(e) {
609
- const { bindingTargetId: n } = e;
610
- if (!o)
1241
+ function V(n) {
1242
+ const { bindingTargetId: s } = n;
1243
+ if (!e)
611
1244
  return;
612
- const { formSchemaUtils: l, schemaService: m } = o, f = l.getComponentById(t.componentInstance.value.belongedComponentId), g = m.getFieldByIDAndVMID(n, f.viewModel);
613
- return !!(g != null && g.schemaField);
1245
+ const { formSchemaUtils: d, schemaService: o } = e, a = d.getComponentById(t.componentInstance.value.belongedComponentId), m = o.getFieldByIDAndVMID(s, a.viewModel);
1246
+ return !!(m != null && m.schemaField);
614
1247
  }
615
- function C(e) {
616
- const n = d.getComponentContext(t);
617
- if (n && n.componentClassList && n.componentClassList.includes("f-form-layout") && n.componentClassList.includes("farris-form")) {
618
- if (e.sourceType === "control" && (e.componentCategory === "input" || e.componentType === "fieldset"))
1248
+ function C(n) {
1249
+ const s = f.getComponentContext(t);
1250
+ if (s && s.componentClassList && s.componentClassList.includes("f-form-layout") && s.componentClassList.includes("farris-form")) {
1251
+ if (n.sourceType === "control" && (n.componentCategory === "input" || n.componentType && ["fieldset", "dynamic-form"].indexOf(n.componentType) > -1))
619
1252
  return !0;
620
- if (e.sourceType === "move") {
621
- if (e.componentType === "form-group")
622
- return v(e, !0);
623
- if (e.componentType === "fieldset")
624
- return v(e, !1);
1253
+ if (n.sourceType === "move") {
1254
+ if (n.componentType === "form-group")
1255
+ return T(n, !0);
1256
+ if (n.componentType === "fieldset")
1257
+ return T(n, !1);
1258
+ if (n.componentType === "dynamic-form")
1259
+ return !0;
625
1260
  }
626
- return e.sourceType === "field" && e.componentCategory === "input" ? b(e) : !1;
1261
+ return n.sourceType === "field" && n.componentCategory === "input" ? V(n) : !1;
627
1262
  }
628
1263
  return !0;
629
1264
  }
630
- function P(e) {
631
- return !(!_t().basalDragulaRuleForContainer(e, o) || !V || !C(e));
1265
+ function w(n) {
1266
+ return !(!Co().basalDragulaRuleForContainer(n, e) || !F || !C(n));
632
1267
  }
633
- function I(e) {
634
- var u;
635
- const n = e.componentInstance, l = n.value.schema, m = o == null ? void 0 : o.formSchemaUtils, f = o == null ? void 0 : o.designViewModelUtils, g = m.getViewModelIdByComponentId(n.value.belongedComponentId), h = f.getDgViewModel(g), p = n.value.parent;
636
- if (p && S.fieldset && ((u = p.schema) == null ? void 0 : u.type) === S.fieldset.type && h) {
1268
+ function b(n) {
1269
+ var y;
1270
+ const s = n.componentInstance, d = s.value.schema, o = e == null ? void 0 : e.formSchemaUtils, a = e == null ? void 0 : e.designViewModelUtils, m = o.getViewModelIdByComponentId(s.value.belongedComponentId), g = a.getDgViewModel(m), h = s.value.parent;
1271
+ if (h && ee.fieldset && ((y = h.schema) == null ? void 0 : y.type) === ee.fieldset.type && g) {
637
1272
  const M = { groupId: null, groupName: null };
638
- switch (l.binding.type) {
639
- case Q.Form: {
640
- h.changeField(l.binding.field, M);
1273
+ switch (d.binding.type) {
1274
+ case S.Form: {
1275
+ g.changeField(d.binding.field, M);
641
1276
  break;
642
1277
  }
643
- case Q.Variable: {
644
- m.modifyViewModelFieldById(g, l.binding.field, M, !0);
1278
+ case S.Variable: {
1279
+ o.modifyViewModelFieldById(m, d.binding.field, M, !0);
645
1280
  break;
646
1281
  }
647
1282
  }
648
1283
  }
649
1284
  }
650
- function A(e, n, l) {
651
- const m = n.fields.find((u) => u.id === e), f = o == null ? void 0 : o.designViewModelUtils, g = f.getDgViewModel(n.id), h = g.fields.find((u) => u.id === e);
652
- g.removeField([e]);
653
- const p = f.getDgViewModel(l);
654
- p.addField(h), m.fieldSchema && p.changeField(h.id, m.fieldSchema);
1285
+ function I(n, s, d) {
1286
+ const o = s.fields.find((y) => y.id === n), a = e == null ? void 0 : e.designViewModelUtils, m = a.getDgViewModel(s.id), g = m.fields.find((y) => y.id === n);
1287
+ m.removeField([n]);
1288
+ const h = a.getDgViewModel(d);
1289
+ h.addField(g), o.fieldSchema && h.changeField(g.id, o.fieldSchema);
655
1290
  }
656
- function G(e, n, l, m = []) {
657
- const f = n.id, g = e.binding.field, h = n.fields.findIndex((u) => u.id === g);
658
- if (h > -1 && (l.fields.push(n.fields[h]), n.fields.splice(h, 1)), f === "root-viewmodel" && l.id !== "root-viewmodel") {
659
- e.binding.path && !e.binding.path.includes("root-component.") && (e.binding.path = "root-component." + e.binding.path);
1291
+ function R(n, s, d, o = []) {
1292
+ const a = s.id, m = n.binding.field, g = s.fields.findIndex((y) => y.id === m);
1293
+ if (g > -1 && (d.fields.push(s.fields[g]), s.fields.splice(g, 1)), a === "root-viewmodel" && d.id !== "root-viewmodel") {
1294
+ n.binding.path && !n.binding.path.includes("root-component.") && (n.binding.path = "root-component." + n.binding.path);
660
1295
  return;
661
1296
  }
662
- if (l.id === "root-viewmodel" && f !== "root-viewmodel" && e.binding.path && e.binding.path.includes("root-component.")) {
663
- e.binding.path = e.binding.path.replace("root-component.", "");
1297
+ if (d.id === "root-viewmodel" && a !== "root-viewmodel" && n.binding.path && n.binding.path.includes("root-component.")) {
1298
+ n.binding.path = n.binding.path.replace("root-component.", "");
664
1299
  return;
665
1300
  }
666
- const p = n.states.find((u) => u.id === g);
667
- p && (l.states = l.states ? l.states : [], l.states.findIndex((u) => u.id === p.id) < 0 && (l.states.push(p), m.push(p.id)));
1301
+ const h = s.states.find((y) => y.id === m);
1302
+ h && (d.states = d.states ? d.states : [], d.states.findIndex((y) => y.id === h.id) < 0 && (d.states.push(h), o.push(h.id)));
668
1303
  }
669
- function q(e, n, l, m = []) {
670
- var h;
671
- if (!e)
1304
+ function G(n, s, d, o = []) {
1305
+ var g;
1306
+ if (!n)
672
1307
  return;
673
- const f = n.id === "root-viewmodel" && l.id !== "root-viewmodel", g = l.id === "root-viewmodel" && n.id !== "root-viewmodel";
674
- Object.keys(e).forEach((p) => {
675
- if (p === "binding")
1308
+ const a = s.id === "root-viewmodel" && d.id !== "root-viewmodel", m = d.id === "root-viewmodel" && s.id !== "root-viewmodel";
1309
+ Object.keys(n).forEach((h) => {
1310
+ if (h === "binding")
676
1311
  return;
677
- const u = e[p];
678
- if (u && typeof u == "object" && u.type === Q.Variable && u.field) {
679
- if (f) {
680
- u.path && !u.path.includes("root-component.") && (u.path = "root-component." + u.path);
1312
+ const y = n[h];
1313
+ if (y && typeof y == "object" && y.type === S.Variable && y.field) {
1314
+ if (a) {
1315
+ y.path && !y.path.includes("root-component.") && (y.path = "root-component." + y.path);
681
1316
  return;
682
1317
  }
683
- if (g && u.path && u.path.includes("root-component.")) {
684
- u.path = u.path.replace("root-component.", "");
1318
+ if (m && y.path && y.path.includes("root-component.")) {
1319
+ y.path = y.path.replace("root-component.", "");
685
1320
  return;
686
1321
  }
687
- const M = n.states.find((E) => E.id === u.field);
1322
+ const M = s.states.find((E) => E.id === y.field);
688
1323
  if (M) {
689
- m.push(M.id), l.states = l.states ? l.states : [];
690
- const E = l.states.find((_) => _.code === M.code);
1324
+ o.push(M.id), d.states = d.states ? d.states : [];
1325
+ const E = d.states.find((x) => x.code === M.code);
691
1326
  if (E)
692
- u.field = E.id;
1327
+ y.field = E.id;
693
1328
  else {
694
- const _ = Object.assign({}, { newId: se().guid() }, M);
695
- l.states.push(_), u.field = _.newId;
1329
+ const x = Object.assign({}, { newId: me().guid() }, M);
1330
+ d.states.push(x), y.field = x.newId;
696
1331
  }
697
1332
  }
698
1333
  }
699
- }), (h = l.states) != null && h.length && l.states.map((p) => {
700
- p.newId && (p.id = p.newId, delete p.newId);
1334
+ }), (g = d.states) != null && g.length && d.states.map((h) => {
1335
+ h.newId && (h.id = h.newId, delete h.newId);
701
1336
  });
702
1337
  }
703
- function j(e, n, l) {
704
- if (e && (n(e, l), e.contents))
705
- for (const m of e.contents)
706
- j(m, n, l);
1338
+ function K(n, s, d) {
1339
+ if (n && (s(n, d), n.contents))
1340
+ for (const o of n.contents)
1341
+ K(o, s, d);
707
1342
  }
708
- function X(e = [], n) {
709
- if (!e.length)
1343
+ function _(n = [], s) {
1344
+ if (!n.length)
710
1345
  return;
711
- const l = o == null ? void 0 : o.formSchemaUtils, m = l.getComponentByViewModelId(n), f = [], g = (p, u) => {
712
- p && (Object.keys(p).forEach((M) => {
713
- const E = p[M];
714
- E && typeof E == "object" && E.type === Q.Variable && e.includes(E.field) && !u.includes(E.field) && u.push(E.field);
715
- }), p.editor && g(p.editor, u));
1346
+ const d = e == null ? void 0 : e.formSchemaUtils, o = d.getComponentByViewModelId(s), a = [], m = (h, y) => {
1347
+ h && (Object.keys(h).forEach((M) => {
1348
+ const E = h[M];
1349
+ E && typeof E == "object" && E.type === S.Variable && n.includes(E.field) && !y.includes(E.field) && y.push(E.field);
1350
+ }), h.editor && m(h.editor, y));
716
1351
  };
717
- j(m, g, f);
718
- const h = l.getViewModelById(n);
719
- e.forEach((p) => {
720
- f.includes(p) || (h.states = h.states.filter((u) => u.id !== p));
1352
+ K(o, m, a);
1353
+ const g = d.getViewModelById(s);
1354
+ n.forEach((h) => {
1355
+ a.includes(h) || (g.states = g.states.filter((y) => y.id !== h));
721
1356
  });
722
1357
  }
723
- function K(e) {
724
- const n = se().guid(), l = Object.assign({}, e, {
725
- id: n,
726
- code: e.code + n.slice(0, 4),
727
- name: e.name + n.slice(0, 4)
728
- }), g = (o == null ? void 0 : o.formSchemaUtils).getCommands().find((h) => h.id === e.cmpId);
729
- return g && g.refedHandlers.push({
730
- host: n,
731
- handler: e.handlerName
732
- }), l;
733
- }
734
- function T(e, n, l) {
735
- var M, E, _;
736
- const m = {}, f = e.type === "form-group" && e.editor ? e.editor.type : e.type, g = (M = ue[f]) == null ? void 0 : M.events;
737
- if (!g)
1358
+ function X(n) {
1359
+ const s = me().guid(), d = Object.assign({}, n, {
1360
+ id: s,
1361
+ code: n.code + s.slice(0, 4),
1362
+ name: n.name + s.slice(0, 4)
1363
+ }), m = (e == null ? void 0 : e.formSchemaUtils).getCommands().find((g) => g.id === n.cmpId);
1364
+ return m && m.refedHandlers.push({
1365
+ host: s,
1366
+ handler: n.handlerName
1367
+ }), d;
1368
+ }
1369
+ function B(n, s, d) {
1370
+ var M, E, x;
1371
+ const o = {}, a = n.type === "form-group" && n.editor ? n.editor.type : n.type, m = (M = ve[a]) == null ? void 0 : M.events;
1372
+ if (!m)
738
1373
  return;
739
- Object.keys(e).forEach((J) => {
740
- const $ = Object.keys(g).find((x) => x === J);
741
- if ($ && e[$]) {
742
- const x = n.commands.find((O) => O.code === e[$]);
743
- if (x) {
744
- let O = m[x.code];
745
- O || (O = K(x), m[x.code] = O, l.commands.push(O)), e[$] = O.code;
1374
+ Object.keys(n).forEach(($) => {
1375
+ const O = Object.keys(m).find((N) => N === $);
1376
+ if (O && n[O]) {
1377
+ const N = s.commands.find((D) => D.code === n[O]);
1378
+ if (N) {
1379
+ let D = o[N.code];
1380
+ D || (D = X(N), o[N.code] = D, d.commands.push(D)), n[O] = D.code;
746
1381
  }
747
1382
  }
748
1383
  });
749
- const p = (o == null ? void 0 : o.designViewModelUtils).getDgViewModel(l.id), u = ["valueChanging", "valueChanged"];
750
- if (((E = e.binding) == null ? void 0 : E.type) === Q.Form) {
751
- const J = (_ = l.fields) == null ? void 0 : _.find(($) => $.id === e.binding.field);
752
- J && u.forEach(($) => {
753
- if (J[$]) {
754
- const x = n.commands.find((O) => O.code === J[$]);
755
- if (!x)
1384
+ const h = (e == null ? void 0 : e.designViewModelUtils).getDgViewModel(d.id), y = ["valueChanging", "valueChanged"];
1385
+ if (((E = n.binding) == null ? void 0 : E.type) === S.Form) {
1386
+ const $ = (x = d.fields) == null ? void 0 : x.find((O) => O.id === n.binding.field);
1387
+ $ && y.forEach((O) => {
1388
+ if ($[O]) {
1389
+ const N = s.commands.find((D) => D.code === $[O]);
1390
+ if (!N)
756
1391
  return;
757
- if (m[x.code])
758
- p.changeField(J.id, { [$]: m[x.code].code });
1392
+ if (o[N.code])
1393
+ h.changeField($.id, { [O]: o[N.code].code });
759
1394
  else {
760
- const O = K(x);
761
- m[x.code] = O, l.commands.push(O), p.changeField(J.id, { [$]: O.code });
1395
+ const D = X(N);
1396
+ o[N.code] = D, d.commands.push(D), h.changeField($.id, { [O]: D.code });
762
1397
  }
763
1398
  }
764
1399
  });
765
1400
  }
766
1401
  }
767
- function w(e) {
768
- const n = o == null ? void 0 : o.formSchemaUtils, l = e.componentInstance, m = l.value.schema, f = n.getViewModelIdByComponentId(l.value.belongedComponentId), g = n.getViewModelById(f), h = n.getComponentById(t.componentInstance.value.belongedComponentId), p = n.getViewModelById(h.viewModel);
769
- if (f !== p.id) {
770
- const u = m.binding.type, M = m.binding.field, E = [];
771
- switch (u) {
772
- case Q.Form: {
773
- A(M, g, p.id);
1402
+ function P(n) {
1403
+ var y, M;
1404
+ const s = e == null ? void 0 : e.formSchemaUtils, d = n.componentInstance, o = d.value.schema, a = s.getViewModelIdByComponentId(d.value.belongedComponentId), m = s.getViewModelById(a), g = s.getComponentById(t.componentInstance.value.belongedComponentId), h = s.getViewModelById(g.viewModel);
1405
+ if (a !== h.id) {
1406
+ const E = (y = o.binding) == null ? void 0 : y.type, x = (M = o.binding) == null ? void 0 : M.field, $ = [];
1407
+ switch (E) {
1408
+ case S.Form: {
1409
+ I(x, m, h.id);
774
1410
  break;
775
1411
  }
776
- case Q.Variable: {
777
- G(m, g, p, E);
1412
+ case S.Variable: {
1413
+ R(o, m, h, $);
778
1414
  break;
779
1415
  }
780
1416
  }
781
- q(m, g, p, E), q(m.editor, g, p, E), T(m, g, p), f !== "root-viewmodel" && X(E, f);
1417
+ G(o, m, h, $), G(o.editor, m, h, $), B(o, m, h), a !== "root-viewmodel" && _($, a);
782
1418
  }
783
1419
  }
784
- function B(e) {
785
- if (!e || !e.componentInstance)
1420
+ function k(n) {
1421
+ var o;
1422
+ if (!n || !n.componentInstance)
786
1423
  return;
787
- const l = e.componentInstance.value.schema;
788
- !l.binding || !l.binding.field || (I(e), w(e));
1424
+ const d = n.componentInstance.value.schema;
1425
+ if (d.type === "dynamic-form") {
1426
+ const a = ((o = d == null ? void 0 : d.appearance) == null ? void 0 : o.class) || "";
1427
+ a.indexOf("col-12") < 0 && (d.appearance = {
1428
+ ...d.appearance,
1429
+ class: a + " col-12 px-0"
1430
+ }), P(n);
1431
+ return;
1432
+ }
1433
+ !d.binding || !d.binding.field || (b(n), P(n));
789
1434
  }
790
- function N() {
791
- return y.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1435
+ function A() {
1436
+ return r.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
792
1437
  }
793
- function U(e) {
794
- let n = "";
795
- switch (e) {
1438
+ function j(n) {
1439
+ let s = "";
1440
+ switch (n) {
796
1441
  case 1: {
797
- n = "col-12 col-md-12 col-xl-12 col-el-12";
1442
+ s = "col-12 col-md-12 col-xl-12 col-el-12";
798
1443
  break;
799
1444
  }
800
1445
  case 2: {
801
- n = "col-12 col-md-6 col-xl-6 col-el-6";
1446
+ s = "col-12 col-md-6 col-xl-6 col-el-6";
802
1447
  break;
803
1448
  }
804
1449
  case 3: {
805
- n = "col-12 col-md-6 col-xl-4 col-el-4";
1450
+ s = "col-12 col-md-6 col-xl-4 col-el-4";
806
1451
  break;
807
1452
  }
808
1453
  case 4: {
809
- n = "col-12 col-md-6 col-xl-3 col-el-2";
1454
+ s = "col-12 col-md-6 col-xl-3 col-el-2";
810
1455
  break;
811
1456
  }
812
1457
  }
813
- return n;
1458
+ return s;
814
1459
  }
815
- function Z(e, n) {
816
- let l = !1;
1460
+ function Y(n, s) {
1461
+ let d = !1;
817
1462
  if (t.schema && Object.prototype.hasOwnProperty.call(t.schema, "labelAutoOverflow"))
818
- l = t.schema.labelAutoOverflow;
1463
+ d = t.schema.labelAutoOverflow;
819
1464
  else {
820
- const m = o == null ? void 0 : o.formSchemaUtils, f = m == null ? void 0 : m.selectNode(n, (g) => g.type === S["response-form"].type);
821
- f && (l = f.labelAutoOverflow);
1465
+ const o = e == null ? void 0 : e.formSchemaUtils, a = o == null ? void 0 : o.selectNode(s, (m) => m.type === ee["response-form"].type);
1466
+ a && (d = a.labelAutoOverflow);
822
1467
  }
823
- return l && (e += " farris-group-multi-label"), e;
1468
+ return d && (n += " farris-group-multi-label"), n;
824
1469
  }
825
- function z(e) {
826
- const n = t.componentInstance.value.getBelongedComponentInstance(t.componentInstance);
827
- if (n && n.schema && n.schema.componentType) {
828
- const { formColumns: l } = n.schema;
829
- let m = U(l);
830
- m = o == null ? void 0 : o.formSchemaUtils.getControlClassByFormUnifiedLayout(m, n.schema.id, t.schema), m = Z(m, n.schema), e.appearance || (e.appearance = {}), e.appearance.class = m;
1470
+ function Q(n) {
1471
+ const s = t.componentInstance.value.getBelongedComponentInstance(t.componentInstance);
1472
+ if (s && s.schema && s.schema.componentType) {
1473
+ const { formColumns: d } = s.schema;
1474
+ let o = j(d);
1475
+ o = e == null ? void 0 : e.formSchemaUtils.getControlClassByFormUnifiedLayout(o, s.schema.id, t.schema), o = Y(o, s.schema), n.appearance || (n.appearance = {}), n.appearance.class = o;
831
1476
  }
832
1477
  }
833
- function ee(e, n, l, m) {
834
- const { bindingSourceContext: f, parentComponentInstance: g } = e;
835
- if (f != null && f.entityFieldNode && g) {
836
- const h = o == null ? void 0 : o.designViewModelUtils, u = (o == null ? void 0 : o.formSchemaUtils).getViewModelIdByComponentId(g.belongedComponentId), M = h.getDgViewModel(u);
837
- M.removeField([f.entityFieldNode.id]), M.addField(f.designViewModelField), n && M.changeField(f.entityFieldNode.id, { editor: { $type: n }, groupId: l, groupName: m });
1478
+ function Z(n, s, d, o) {
1479
+ const { bindingSourceContext: a, parentComponentInstance: m } = n;
1480
+ if (a != null && a.entityFieldNode && m) {
1481
+ const g = e == null ? void 0 : e.designViewModelUtils, y = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(m.belongedComponentId), M = g.getDgViewModel(y);
1482
+ M.removeField([a.entityFieldNode.id]), M.addField(a.designViewModelField), s && M.changeField(a.entityFieldNode.id, { editor: { $type: s }, groupId: d, groupName: o });
838
1483
  }
839
1484
  }
840
- function oe(e, n) {
841
- var g, h, p;
842
- const l = y;
843
- if ((l.appearance && l.appearance.class || "").split(" ").includes("f-form-layout") && e.componentCategory === "input") {
844
- const { label: u } = e;
1485
+ function oe(n, s) {
1486
+ var m, g, h;
1487
+ const d = r;
1488
+ if ((d.appearance && d.appearance.class || "").split(" ").includes("f-form-layout") && n.componentCategory === "input") {
1489
+ const { label: y } = n;
845
1490
  let M;
846
- const E = o == null ? void 0 : o.controlCreatorUtils;
847
- return (g = e.bindingSourceContext) != null && g.entityFieldNode ? M = E.setFormFieldProperty((h = e.bindingSourceContext) == null ? void 0 : h.entityFieldNode, n == null ? void 0 : n.type) : (M = E.createFormGroupWithoutField(n == null ? void 0 : n.type), M.label = u), z(M), ee(e, (p = M.editor) == null ? void 0 : p.type), M;
1491
+ const E = e == null ? void 0 : e.controlCreatorUtils;
1492
+ return (m = n.bindingSourceContext) != null && m.entityFieldNode ? M = E.setFormFieldProperty((g = n.bindingSourceContext) == null ? void 0 : g.entityFieldNode, s == null ? void 0 : s.type) : (M = E.createFormGroupWithoutField(s == null ? void 0 : s.type), M.label = y), Q(M), Z(n, (h = M.editor) == null ? void 0 : h.type), M;
848
1493
  }
849
- return n;
1494
+ return n.componentType === "dynamic-form" && (s.appearance = {
1495
+ class: "col-12",
1496
+ ...s.appearance
1497
+ }), s;
850
1498
  }
851
1499
  function ne() {
852
- return c;
1500
+ return i;
853
1501
  }
854
- function te() {
855
- return F;
1502
+ function H() {
1503
+ return v;
856
1504
  }
857
- function k() {
1505
+ function L() {
858
1506
  return !1;
859
1507
  }
860
- function R(e) {
861
- return new ro(e, o).getPropertyConfig(y, t.componentInstance.value);
1508
+ function W(n) {
1509
+ return new Jo(n, e).getPropertyConfig(r, t.componentInstance.value);
862
1510
  }
863
1511
  return {
864
- canAccepts: P,
865
- checkCanDeleteComponent: te,
1512
+ canAccepts: w,
1513
+ checkCanDeleteComponent: H,
866
1514
  checkCanMoveComponent: ne,
867
- getStyles: N,
868
- getPropsConfig: R,
869
- hideNestedPaddingInDesginerView: k,
870
- onAcceptMovedChildElement: B,
1515
+ getStyles: A,
1516
+ getPropsConfig: W,
1517
+ hideNestedPaddingInDesginerView: L,
1518
+ onAcceptMovedChildElement: k,
871
1519
  onResolveNewComponentSchema: oe,
872
- moveInputBetweenComponent: w,
873
- resolveFormGroupAppearance: z,
874
- syncFieldToViewModel: ee
1520
+ moveInputBetweenComponent: P,
1521
+ resolveFormGroupAppearance: Q,
1522
+ syncFieldToViewModel: Z
875
1523
  };
876
1524
  }
877
- re.install = (t) => {
878
- t.component(re.name, re).component(le.name, le);
1525
+ se.install = (t) => {
1526
+ t.component(ye.name, ye).component(Ce.name, Ce).component(se.name, se).component(ge.name, ge);
879
1527
  };
880
1528
  export {
881
- le as FDynamicFormGroup,
882
- Rn as FDynamicFormInput,
883
- Zt as FDynamicFormLabel,
884
- re as FResponseForm,
885
- re as default,
886
- zt as dynamicFormGroupProps,
887
- oo as dynamicFormInputProps,
888
- Qt as responseFormProps,
889
- On as useDesignerRules,
890
- me as useTypeResolver
1529
+ se as FDynamicForm,
1530
+ ge as FDynamicFormGroup,
1531
+ Ce as FDynamicFormInput,
1532
+ qo as FDynamicFormLabel,
1533
+ ye as FResponseForm,
1534
+ se as default,
1535
+ jo as dynamicFormGroupProps,
1536
+ _o as dynamicFormInputProps,
1537
+ Ao as dynamicFormProps,
1538
+ Br as dynamicFormPropsResolver,
1539
+ Pr as formPropsResolver,
1540
+ ie as responseFormProps,
1541
+ kr as useDesignerRules,
1542
+ we as useTypeResolver
891
1543
  };