@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,92 +1,93 @@
1
- var qe = Object.defineProperty;
2
- var Ae = (e, t, r) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var L = (e, t, r) => Ae(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { ref as M, computed as W, watch as _, defineComponent as Q, onBeforeUnmount as Te, withDirectives as ce, createVNode as B, resolveDirective as de, createTextVNode as $e, mergeProps as pe, inject as D, onMounted as ke } from "vue";
5
- import { FDynamicFormGroup as Re, dynamicFormGroupProps as ze, FDynamicFormLabel as Ue } from "../dynamic-form/index.esm.js";
6
- import { cloneDeep as re, isPlainObject as ve } from "lodash-es";
7
- import { useDateFormat as we, resolveField as We, useNumberFormat as Ze, useThirdComponent as xe, isMobilePhone as Je, useTextBoxDesign as _e, areaResponseDirective as Qe } from "../common/index.esm.js";
8
- import { LocaleService as ne } from "../locale/index.esm.js";
9
- import Xe from "../accordion/index.esm.js";
10
- import Ye from "../avatar/index.esm.js";
11
- import He from "../../designer/button-edit/index.esm.js";
12
- import De from "../button-group/index.esm.js";
13
- import Ke from "../calendar/index.esm.js";
14
- import et from "../../designer/capsule/index.esm.js";
15
- import he from "../../designer/checkbox/index.esm.js";
16
- import ye from "../../designer/checkbox-group/index.esm.js";
17
- import le from "../combo-list/index.esm.js";
18
- import tt from "../combo-tree/index.esm.js";
19
- import rt from "../component/index.esm.js";
20
- import nt from "../color-picker/index.esm.js";
21
- import ot from "../content-container/index.esm.js";
22
- import it from "../../designer/date-picker/index.esm.js";
23
- import at from "../../designer/data-grid/index.esm.js";
24
- import lt from "../dropdown/index.esm.js";
25
- import st from "../../designer/dynamic-form/index.esm.js";
26
- import ut from "../events-editor/index.esm.js";
27
- import ct from "../filter-bar/index.esm.js";
28
- import dt from "../field-selector/index.esm.js";
29
- import pt from "../binding-selector/index.esm.js";
30
- import mt from "../image-cropper/index.esm.js";
31
- import ft from "../../designer/input-group/index.esm.js";
32
- import gt from "../layout/index.esm.js";
33
- import vt from "../list-nav/index.esm.js";
34
- import ht from "../../designer/list-view/index.esm.js";
35
- import yt from "../lookup/index.esm.js";
36
- import bt from "../mapping-editor/index.esm.js";
37
- import Ft from "../nav/index.esm.js";
38
- import Ct from "../number-range/index.esm.js";
39
- import Tt from "../../designer/number-spinner/index.esm.js";
40
- import kt from "../order/index.esm.js";
41
- import wt from "../page-header/index.esm.js";
42
- import xt from "../page-footer/index.esm.js";
43
- import Vt from "../pagination/index.esm.js";
44
- import St from "../progress/index.esm.js";
45
- import Et from "../query-solution/index.esm.js";
46
- import It from "../../designer/radio-group/index.esm.js";
47
- import Lt from "../../designer/rate/index.esm.js";
48
- import Pt from "../../designer/response-toolbar/index.esm.js";
49
- import Ot from "../response-layout/index.esm.js";
50
- import Bt from "../../designer/response-layout-editor/index.esm.js";
51
- import Mt from "../search-box/index.esm.js";
52
- import Nt from "../../designer/section/index.esm.js";
53
- import jt from "../smoke-detector/index.esm.js";
54
- import Gt from "../splitter/index.esm.js";
55
- import qt from "../step/index.esm.js";
56
- import At from "../../designer/switch/index.esm.js";
57
- import $t from "../../designer/tabs/index.esm.js";
58
- import Rt from "../../designer/tags/index.esm.js";
59
- import zt from "../text/index.esm.js";
60
- import Ut from "../../designer/time-picker/index.esm.js";
61
- import Wt from "../transfer/index.esm.js";
62
- import Zt from "../tree-view/index.esm.js";
63
- import Jt from "../uploader/index.esm.js";
64
- import _t from "../verify-detail/index.esm.js";
65
- import Qt from "../video/index.esm.js";
66
- import Xt from "../../designer/textarea/index.esm.js";
67
- import Yt from "../schema-selector/index.esm.js";
68
- import Ht from "../../designer/tree-grid/index.esm.js";
69
- import Dt from "../event-parameter/index.esm.js";
70
- import Kt from "../filter-condition-editor/index.esm.js";
71
- import er from "../fieldset/index.esm.js";
72
- import tr from "../sort-condition-editor/index.esm.js";
73
- import rr from "../menu-lookup/index.esm.js";
74
- import nr from "../../designer/drawer/index.esm.js";
75
- import or from "../json-editor/index.esm.js";
76
- import ir from "../property-editor/index.esm.js";
77
- import ar from "../expression-editor/index.esm.js";
78
- import lr from "../code-editor/index.esm.js";
79
- import sr from "../html-template/index.esm.js";
80
- import ur from "../collection-property-editor/index.esm.js";
81
- import cr from "../../designer/modal/index.esm.js";
82
- import dr from "../external-container/index.esm.js";
83
- import pr from "../language-textbox/index.esm.js";
84
- import mr from "../image/index.esm.js";
85
- import fr from "../comment/index.esm.js";
86
- import { schemaResolverMap as gr, propertyEffectMap as vr, propertyConfigSchemaMap as hr, schemaMap as yr, createPropsResolver as br, propertyConfigSchemaMapForDesigner as Fr } from "../dynamic-resolver/index.esm.js";
87
- import { useDesignerComponent as Ve, DgControl as h } from "../designer-canvas/index.esm.js";
88
- import { InputBaseProperty as Cr } from "../property-panel/index.esm.js";
89
- const me = {
1
+ var Ke = Object.defineProperty;
2
+ var et = (e, t, n) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var O = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { ref as B, computed as Q, watch as D, defineComponent as ee, onBeforeUnmount as Be, withDirectives as ue, createVNode as L, resolveDirective as ce, onMounted as be, reactive as Ve, createTextVNode as tt, mergeProps as de, inject as re } from "vue";
5
+ import { FDynamicFormGroup as nt, dynamicFormGroupProps as ot, FDynamicFormLabel as rt } from "../dynamic-form/index.esm.js";
6
+ import { cloneDeep as ie, mergeWith as it, merge as st, isPlainObject as we } from "lodash-es";
7
+ import { useDateFormat as je, resolveField as at, useNumberFormat as lt, FormSchemaEntityField$Type as xe, FormSchemaEntityFieldTypeName as Se, getCustomClass as $e, useThirdComponent as Ae, isMobilePhone as ut, useTextBoxDesign as ct, areaResponseDirective as dt } from "../common/index.esm.js";
8
+ import { LocaleService as ae } from "../locale/index.esm.js";
9
+ import { resolveAppearance as pt, createPropsResolver as Fe, schemaResolverMap as mt, propertyEffectMap as ft, propertyConfigSchemaMap as gt, schemaMap as vt, propertyConfigSchemaMapForDesigner as yt } from "../dynamic-resolver/index.esm.js";
10
+ import { loadRegister as ht, useComponentManager as bt, useBindingData as Ft, useEntityState as Ct, useDynamicViewUtils as Tt, componentMap as fe, resolverMap as kt } from "../dynamic-view/index.esm.js";
11
+ import Vt from "../accordion/index.esm.js";
12
+ import wt from "../avatar/index.esm.js";
13
+ import xt from "../../designer/button-edit/index.esm.js";
14
+ import St from "../button-group/index.esm.js";
15
+ import Et from "../calendar/index.esm.js";
16
+ import Pt from "../../designer/capsule/index.esm.js";
17
+ import Ee from "../../designer/checkbox/index.esm.js";
18
+ import Pe from "../../designer/checkbox-group/index.esm.js";
19
+ import ve from "../combo-list/index.esm.js";
20
+ import Ot from "../combo-tree/index.esm.js";
21
+ import It from "../component/index.esm.js";
22
+ import Mt from "../color-picker/index.esm.js";
23
+ import Lt from "../content-container/index.esm.js";
24
+ import Nt from "../../designer/date-picker/index.esm.js";
25
+ import Bt from "../../designer/data-grid/index.esm.js";
26
+ import jt from "../dropdown/index.esm.js";
27
+ import $t from "../../designer/dynamic-form/index.esm.js";
28
+ import At from "../events-editor/index.esm.js";
29
+ import Rt from "../filter-bar/index.esm.js";
30
+ import qt from "../field-selector/index.esm.js";
31
+ import Gt from "../binding-selector/index.esm.js";
32
+ import Ut from "../image-cropper/index.esm.js";
33
+ import zt from "../../designer/input-group/index.esm.js";
34
+ import Wt from "../layout/index.esm.js";
35
+ import Zt from "../list-nav/index.esm.js";
36
+ import Jt from "../../designer/list-view/index.esm.js";
37
+ import _t from "../lookup/index.esm.js";
38
+ import Qt from "../mapping-editor/index.esm.js";
39
+ import Xt from "../nav/index.esm.js";
40
+ import Yt from "../number-range/index.esm.js";
41
+ import Ht from "../../designer/number-spinner/index.esm.js";
42
+ import Dt from "../order/index.esm.js";
43
+ import Kt from "../page-header/index.esm.js";
44
+ import en from "../page-footer/index.esm.js";
45
+ import tn from "../pagination/index.esm.js";
46
+ import nn from "../progress/index.esm.js";
47
+ import on from "../query-solution/index.esm.js";
48
+ import rn from "../../designer/radio-group/index.esm.js";
49
+ import sn from "../../designer/rate/index.esm.js";
50
+ import an from "../../designer/response-toolbar/index.esm.js";
51
+ import ln from "../response-layout/index.esm.js";
52
+ import un from "../../designer/response-layout-editor/index.esm.js";
53
+ import cn from "../search-box/index.esm.js";
54
+ import dn from "../../designer/section/index.esm.js";
55
+ import pn from "../smoke-detector/index.esm.js";
56
+ import mn from "../splitter/index.esm.js";
57
+ import fn from "../step/index.esm.js";
58
+ import gn from "../../designer/switch/index.esm.js";
59
+ import vn from "../../designer/tabs/index.esm.js";
60
+ import yn from "../../designer/tags/index.esm.js";
61
+ import hn from "../text/index.esm.js";
62
+ import bn from "../../designer/time-picker/index.esm.js";
63
+ import Fn from "../transfer/index.esm.js";
64
+ import Cn from "../tree-view/index.esm.js";
65
+ import Tn from "../uploader/index.esm.js";
66
+ import kn from "../verify-detail/index.esm.js";
67
+ import Vn from "../video/index.esm.js";
68
+ import wn from "../../designer/textarea/index.esm.js";
69
+ import xn from "../schema-selector/index.esm.js";
70
+ import Sn from "../../designer/tree-grid/index.esm.js";
71
+ import En from "../event-parameter/index.esm.js";
72
+ import Pn from "../filter-condition-editor/index.esm.js";
73
+ import On from "../fieldset/index.esm.js";
74
+ import In from "../sort-condition-editor/index.esm.js";
75
+ import Mn from "../menu-lookup/index.esm.js";
76
+ import Ln from "../../designer/drawer/index.esm.js";
77
+ import Nn from "../json-editor/index.esm.js";
78
+ import Bn from "../property-editor/index.esm.js";
79
+ import jn from "../expression-editor/index.esm.js";
80
+ import $n from "../code-editor/index.esm.js";
81
+ import An from "../html-template/index.esm.js";
82
+ import Rn from "../collection-property-editor/index.esm.js";
83
+ import qn from "../../designer/modal/index.esm.js";
84
+ import Gn from "../external-container/index.esm.js";
85
+ import Un from "../language-textbox/index.esm.js";
86
+ import zn from "../image/index.esm.js";
87
+ import Wn from "../comment/index.esm.js";
88
+ import { useDesignerComponent as Re, DgControl as C } from "../designer-canvas/index.esm.js";
89
+ import { InputBaseProperty as Zn } from "../property-panel/index.esm.js";
90
+ const Ce = {
90
91
  conditions: { type: Array, default: [] },
91
92
  fields: { type: Array, default: [] },
92
93
  key: { type: String, default: "" },
@@ -103,15 +104,15 @@ const me = {
103
104
  */
104
105
  itemClass: { type: Boolean, default: "col-12 col-md-6 col-xl-3 col-el-2" }
105
106
  };
106
- class Tr {
107
- constructor(t = { value: [] }, r) {
108
- L(this, "editorType", "check-box");
109
- L(this, "value");
110
- L(this, "valueType", "boolean");
107
+ class Jn {
108
+ constructor(t = { value: [] }, n) {
109
+ O(this, "editorType", "check-box");
110
+ O(this, "value");
111
+ O(this, "valueType", "boolean");
111
112
  // 编辑器配置
112
- L(this, "editiorConfig");
113
- const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((p) => JSON.parse(p));
114
- this.value = o, this.editiorConfig = Object.assign({}, r);
113
+ O(this, "editiorConfig");
114
+ const r = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((c) => JSON.parse(c));
115
+ this.value = r, this.editiorConfig = Object.assign({}, n);
115
116
  }
116
117
  clear() {
117
118
  this.value = [];
@@ -129,34 +130,34 @@ class Tr {
129
130
  return this.value.length === 0;
130
131
  }
131
132
  }
132
- class kr {
133
- constructor(t = { textValue: "", value: "", valueField: "" }, r) {
134
- L(this, "editorType", "combo-lookup");
135
- L(this, "textValue");
136
- L(this, "value");
137
- L(this, "valueField");
138
- L(this, "valueType", "text");
133
+ class _n {
134
+ constructor(t = { textValue: "", value: "", valueField: "" }, n) {
135
+ O(this, "editorType", "combo-lookup");
136
+ O(this, "textValue");
137
+ O(this, "value");
138
+ O(this, "valueField");
139
+ O(this, "valueType", "text");
139
140
  // 编辑器配置
140
- L(this, "editiorConfig");
141
- this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.valueField = t == null ? void 0 : t.valueField;
141
+ O(this, "editiorConfig");
142
+ this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, n), this.valueField = t == null ? void 0 : t.valueField;
142
143
  }
143
144
  clear() {
144
145
  this.value = "", this.valueField = "", this.textValue = "";
145
146
  }
146
- getPropValue(t, r) {
147
- if (r.length > 1) {
148
- const n = r.shift();
149
- return t[n] ? this.getPropValue(t[n], r) : null;
147
+ getPropValue(t, n) {
148
+ if (n.length > 1) {
149
+ const o = n.shift();
150
+ return t[o] ? this.getPropValue(t[o], n) : null;
150
151
  }
151
- return t[r[0]];
152
+ return t[n[0]];
152
153
  }
153
154
  getTextValue(t) {
154
- const r = t.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, re(r)));
155
- return n && n.length ? n.join(",") : "";
155
+ const n = t.split("."), o = this.value.split(",").map((r) => this.getPropValue(r, ie(n)));
156
+ return o && o.length ? o.join(",") : "";
156
157
  }
157
158
  getValue() {
158
- const t = this.valueField.split("."), r = this.value.split(",").map((n) => this.getPropValue(n, re(t)));
159
- return r && r.length ? r.join(",") : "";
159
+ const t = this.valueField.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, ie(t)));
160
+ return n && n.length ? n.join(",") : "";
160
161
  }
161
162
  getDisplayText() {
162
163
  return this.getValue();
@@ -168,23 +169,23 @@ class kr {
168
169
  return !this.valueField;
169
170
  }
170
171
  }
171
- class oe {
172
- constructor(t = { value: "", displayFormat: "", valueFormat: "" }, r) {
173
- L(this, "editorType", "date-picker");
174
- L(this, "value");
175
- L(this, "valueType", "datetime");
176
- L(this, "displayFormat", "");
177
- L(this, "valueFormat", "");
172
+ class pe {
173
+ constructor(t = { value: "", displayFormat: "", valueFormat: "" }, n) {
174
+ O(this, "editorType", "date-picker");
175
+ O(this, "value");
176
+ O(this, "valueType", "datetime");
177
+ O(this, "displayFormat", "");
178
+ O(this, "valueFormat", "");
178
179
  // 编辑器配置
179
- L(this, "editiorConfig");
180
- this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "";
180
+ O(this, "editiorConfig");
181
+ this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, n), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (n == null ? void 0 : n.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (n == null ? void 0 : n.valueFormat) || "";
181
182
  }
182
183
  formatValue() {
183
- const { formatTo: t, parseToDate: r } = we();
184
+ const { formatTo: t, parseToDate: n } = je();
184
185
  if (!this.value)
185
186
  return "";
186
- const n = r(this.value, this.valueFormat);
187
- return t(n, this.displayFormat);
187
+ const o = n(this.value, this.valueFormat);
188
+ return t(o, this.displayFormat);
188
189
  }
189
190
  setValue(t) {
190
191
  this.value = t;
@@ -202,28 +203,28 @@ class oe {
202
203
  this.value = void 0;
203
204
  }
204
205
  }
205
- class fe {
206
- constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, r = {}) {
207
- L(this, "editorType", "date-range");
208
- L(this, "begin", "");
209
- L(this, "end", "");
210
- L(this, "valueType", "datetime");
211
- L(this, "value", "");
206
+ class Te {
207
+ constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n = {}) {
208
+ O(this, "editorType", "date-range");
209
+ O(this, "begin", "");
210
+ O(this, "end", "");
211
+ O(this, "valueType", "datetime");
212
+ O(this, "value", "");
212
213
  // 编辑器配置
213
- L(this, "editiorConfig");
214
- L(this, "displayFormat", "");
215
- L(this, "valueFormat", "");
216
- this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({}, r, { delimiter: "~" }), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
214
+ O(this, "editiorConfig");
215
+ O(this, "displayFormat", "");
216
+ O(this, "valueFormat", "");
217
+ this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({}, n, { delimiter: "~" }), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (n == null ? void 0 : n.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (n == null ? void 0 : n.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
217
218
  }
218
219
  clear() {
219
220
  this.begin = "", this.end = "", this.value = "";
220
221
  }
221
222
  formatValue(t) {
222
- const { formatTo: r, parseToDate: n } = we();
223
+ const { formatTo: n, parseToDate: o } = je();
223
224
  if (!t)
224
225
  return "";
225
- const o = n(t, this.valueFormat);
226
- return r(o, this.displayFormat);
226
+ const r = o(t, this.valueFormat);
227
+ return n(r, this.displayFormat);
227
228
  }
228
229
  getValue() {
229
230
  return {
@@ -237,8 +238,8 @@ class fe {
237
238
  }
238
239
  setValue(t) {
239
240
  if (t) {
240
- const r = t.split(this.editiorConfig.delimiter);
241
- this.begin = r[0] || "", this.end = r[1] || "", this.value = t;
241
+ const n = t.split(this.editiorConfig.delimiter);
242
+ this.begin = n[0] || "", this.end = n[1] || "", this.value = t;
242
243
  } else
243
244
  this.clear();
244
245
  }
@@ -246,39 +247,45 @@ class fe {
246
247
  return !this.begin && !this.end;
247
248
  }
248
249
  }
249
- class Se {
250
- constructor(t = { value: "", valueList: [] }, r) {
251
- L(this, "editorType", "combo-list");
252
- L(this, "value");
253
- L(this, "valueType", "enum");
254
- L(this, "valueList", []);
250
+ class qe {
251
+ constructor(t = { value: "", valueList: [] }, n) {
252
+ O(this, "editorType", "combo-list");
253
+ O(this, "value");
254
+ O(this, "valueType", "enum");
255
+ O(this, "valueList", []);
255
256
  // 编辑器配置
256
- L(this, "editiorConfig");
257
- this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
257
+ O(this, "editiorConfig");
258
+ this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, n), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
258
259
  }
259
260
  clear() {
260
261
  const t = typeof this.value;
261
262
  this.value = t === "string" ? "" : void 0;
262
263
  }
264
+ /**
265
+ * 更新数据源
266
+ */
267
+ updateData(t) {
268
+ this.valueList = [...t];
269
+ }
263
270
  getValue() {
264
271
  return this.value;
265
272
  }
266
273
  getDisplayText() {
267
- var o, p;
274
+ var r, c;
268
275
  const t = typeof this.value;
269
- let r = "", n = [];
276
+ let n = "", o = [];
270
277
  switch (t) {
271
278
  case "string":
272
- n = this.value.split(",") || [], r = this.valueList.filter((i) => n.indexOf(i.value + "") > -1).map((i) => i.name).join(",");
279
+ o = this.value.split(",") || [], n = this.valueList.filter((i) => o.indexOf(i.value + "") > -1).map((i) => i.name).join(",");
273
280
  break;
274
281
  case "boolean":
275
- r = ((o = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : o.name) || "";
282
+ n = ((r = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : r.name) || "";
276
283
  break;
277
284
  case "number":
278
- r = ((p = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : p.name) || "";
285
+ n = ((c = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : c.name) || "";
279
286
  break;
280
287
  }
281
- return r;
288
+ return n;
282
289
  }
283
290
  // setValue(data: { value: string; displayText: string }) {
284
291
  // // this.displayText = data.dispalyText;
@@ -293,35 +300,35 @@ class Se {
293
300
  return !this.value && this.value !== !1 && this.value !== 0;
294
301
  }
295
302
  }
296
- class wr {
297
- constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 }, r) {
298
- L(this, "editorType", "input-group");
303
+ class Qn {
304
+ constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 }, n) {
305
+ O(this, "editorType", "input-group");
299
306
  // 通过弹窗返回的若干个值对象构成的数组
300
- L(this, "value");
301
- L(this, "valueType", "text");
307
+ O(this, "value");
308
+ O(this, "valueType", "text");
302
309
  // 控件内显示的值
303
- L(this, "displayText");
310
+ O(this, "displayText");
304
311
  // 弹窗模式下,取列表中哪个字段的值映射到当前字段
305
- L(this, "valueField");
312
+ O(this, "valueField");
306
313
  // 是否是手动输入的值
307
- L(this, "isInputText");
314
+ O(this, "isInputText");
308
315
  // 编辑器配置
309
- L(this, "editiorConfig");
310
- this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({}, r);
316
+ O(this, "editiorConfig");
317
+ this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({}, n);
311
318
  }
312
319
  clear() {
313
320
  this.value = "", this.displayText = "", this.valueField = "";
314
321
  }
315
- getPropValue(t, r) {
316
- if (r.length > 1) {
317
- const n = r.shift();
318
- return t[n] ? this.getPropValue(t[n], r) : "";
322
+ getPropValue(t, n) {
323
+ if (n.length > 1) {
324
+ const o = n.shift();
325
+ return t[o] ? this.getPropValue(t[o], n) : "";
319
326
  }
320
- return t[r[0]];
327
+ return t[n[0]];
321
328
  }
322
329
  getTextValue(t) {
323
- const r = t.split("."), n = this.value.map((o) => this.getPropValue(o, re(r)));
324
- return n && n.length ? n.join(",") : "";
330
+ const n = t.split("."), o = this.value.map((r) => this.getPropValue(r, ie(n)));
331
+ return o && o.length ? o.join(",") : "";
325
332
  }
326
333
  getValue() {
327
334
  return this.value;
@@ -337,25 +344,25 @@ class wr {
337
344
  return !this.displayText && (this.value == null || !((t = this.value) != null && t.length));
338
345
  }
339
346
  }
340
- class xr {
341
- constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, r) {
342
- L(this, "editorType", "lookup");
343
- L(this, "helpId");
344
- L(this, "mapFields");
345
- L(this, "value");
346
- L(this, "valueField");
347
- L(this, "valueType", "text");
347
+ class Xn {
348
+ constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, n) {
349
+ O(this, "editorType", "lookup");
350
+ O(this, "helpId");
351
+ O(this, "mapFields");
352
+ O(this, "value");
353
+ O(this, "valueField");
354
+ O(this, "valueType", "text");
348
355
  // 帮助的值是否为手动输入的任意值,对应帮助的任意输入属性nosearch
349
- L(this, "isInputText");
356
+ O(this, "isInputText");
350
357
  // 编辑器配置
351
- L(this, "editiorConfig");
352
- this.editiorConfig = Object.assign({}, r), this.value = (t == null ? void 0 : t.value) || "", this.valueField = (t == null ? void 0 : t.valueField) || (r == null ? void 0 : r.valueField), this.mapFields = t.mapFields, this.isInputText = (t == null ? void 0 : t.isInputText) || (r == null ? void 0 : r.isInputText), this.helpId = (t == null ? void 0 : t.helpId) || (r == null ? void 0 : r.helpId);
358
+ O(this, "editiorConfig");
359
+ this.editiorConfig = Object.assign({}, n), this.value = (t == null ? void 0 : t.value) || "", this.valueField = (t == null ? void 0 : t.valueField) || (n == null ? void 0 : n.valueField), this.mapFields = t.mapFields, this.isInputText = (t == null ? void 0 : t.isInputText) || (n == null ? void 0 : n.isInputText), this.helpId = (t == null ? void 0 : t.helpId) || (n == null ? void 0 : n.helpId);
353
360
  }
354
361
  clear() {
355
362
  this.value = "", this.mapFields = [];
356
363
  }
357
364
  getValue() {
358
- return this.mapFields.map((t) => We(t, this.valueField || "id")).join(",");
365
+ return this.mapFields.map((t) => at(t, this.valueField || "id")).join(",");
359
366
  }
360
367
  getDisplayText() {
361
368
  return this.value;
@@ -367,27 +374,27 @@ class xr {
367
374
  return !this.mapFields.length;
368
375
  }
369
376
  }
370
- class Vr extends oe {
371
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
372
- super(r, n);
373
- L(this, "editorType", "month-picker");
377
+ class Yn extends pe {
378
+ constructor(n = { value: "", displayFormat: "", valueFormat: "" }, o) {
379
+ super(n, o);
380
+ O(this, "editorType", "month-picker");
374
381
  }
375
382
  }
376
- class Sr extends fe {
377
- constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n) {
378
- super(r, n);
379
- L(this, "editorType", "month-range");
383
+ class Hn extends Te {
384
+ constructor(n = { begin: "", end: "", displayFormat: "", valueFormat: "" }, o) {
385
+ super(n, o);
386
+ O(this, "editorType", "month-range");
380
387
  }
381
388
  }
382
- class Er {
383
- constructor(t = { begin: null, end: null }, r) {
384
- L(this, "editorType", "number-range");
385
- L(this, "begin");
386
- L(this, "end");
387
- L(this, "valueType", "number");
389
+ class Dn {
390
+ constructor(t = { begin: null, end: null }, n) {
391
+ O(this, "editorType", "number-range");
392
+ O(this, "begin");
393
+ O(this, "end");
394
+ O(this, "valueType", "number");
388
395
  // 编辑器配置
389
- L(this, "editiorConfig");
390
- this.editiorConfig = Object.assign({}, r), this.begin = (t == null ? void 0 : t.begin) == null ? null : parseFloat(t.begin), this.end = (t == null ? void 0 : t.end) == null ? null : parseFloat(t.end);
396
+ O(this, "editiorConfig");
397
+ this.editiorConfig = Object.assign({}, n), this.begin = (t == null ? void 0 : t.begin) == null ? null : parseFloat(t.begin), this.end = (t == null ? void 0 : t.end) == null ? null : parseFloat(t.end);
391
398
  }
392
399
  clear() {
393
400
  this.begin = null, this.end = null;
@@ -408,16 +415,16 @@ class Er {
408
415
  return this.begin == null && this.end == null;
409
416
  }
410
417
  }
411
- class Ir {
412
- constructor(t = { value: "" }, r) {
413
- L(this, "editorType", "number-spinner");
414
- L(this, "value");
415
- L(this, "valueType", "number");
418
+ class Kn {
419
+ constructor(t = { value: "" }, n) {
420
+ O(this, "editorType", "number-spinner");
421
+ O(this, "value");
422
+ O(this, "valueType", "number");
416
423
  // 编辑器配置
417
- L(this, "editiorConfig");
418
- this.editiorConfig = Object.assign({}, r);
419
- const n = parseFloat(t.value);
420
- this.value = isNaN(n) ? null : n;
424
+ O(this, "editiorConfig");
425
+ this.editiorConfig = Object.assign({}, n);
426
+ const o = parseFloat(t.value);
427
+ this.value = isNaN(o) ? null : o;
421
428
  }
422
429
  clear() {
423
430
  this.value = null;
@@ -428,7 +435,7 @@ class Ir {
428
435
  getDisplayText() {
429
436
  if (this.isEmpty())
430
437
  return "";
431
- const { formatTo: t } = Ze();
438
+ const { formatTo: t } = lt();
432
439
  return t(this.value, this.editiorConfig);
433
440
  }
434
441
  setValue(t) {
@@ -438,15 +445,15 @@ class Ir {
438
445
  return this.value == null || isNaN(this.value);
439
446
  }
440
447
  }
441
- class Lr {
442
- constructor(t = { value: null, valueList: [] }, r) {
443
- L(this, "editorType", "radio-group");
444
- L(this, "value");
445
- L(this, "valueType", "enum");
446
- L(this, "valueList", []);
448
+ class eo {
449
+ constructor(t = { value: null, valueList: [] }, n) {
450
+ O(this, "editorType", "radio-group");
451
+ O(this, "value");
452
+ O(this, "valueType", "enum");
453
+ O(this, "valueList", []);
447
454
  // 编辑器配置
448
- L(this, "editiorConfig");
449
- this.editiorConfig = Object.assign({}, r), this.value = t == null ? void 0 : t.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
455
+ O(this, "editiorConfig");
456
+ this.editiorConfig = Object.assign({}, n), this.value = t == null ? void 0 : t.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
450
457
  }
451
458
  clear() {
452
459
  this.value = void 0, this.valueList = [];
@@ -456,7 +463,7 @@ class Lr {
456
463
  }
457
464
  getDisplayText() {
458
465
  var t;
459
- return ((t = this.valueList.find((r) => r.value === this.value)) == null ? void 0 : t.name) || "";
466
+ return ((t = this.valueList.find((n) => n.value === this.value)) == null ? void 0 : t.name) || "";
460
467
  }
461
468
  setValue(t) {
462
469
  this.value = t;
@@ -465,19 +472,19 @@ class Lr {
465
472
  return !this.value && this.value !== 0 && this.value !== !1;
466
473
  }
467
474
  }
468
- class Pr extends oe {
469
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
470
- super(r, n);
471
- L(this, "editorType", "year-picker");
475
+ class to extends pe {
476
+ constructor(n = { value: "", displayFormat: "", valueFormat: "" }, o) {
477
+ super(n, o);
478
+ O(this, "editorType", "year-picker");
472
479
  }
473
480
  }
474
- class Ee {
475
- constructor(t = { value: "" }, r) {
476
- L(this, "editorType", "text");
477
- L(this, "value");
478
- L(this, "valueType", "text");
481
+ class Ge {
482
+ constructor(t = { value: "" }, n) {
483
+ O(this, "editorType", "text");
484
+ O(this, "value");
485
+ O(this, "valueType", "text");
479
486
  // 编辑器配置
480
- L(this, "editiorConfig");
487
+ O(this, "editiorConfig");
481
488
  this.value = t.value;
482
489
  }
483
490
  clear() {
@@ -496,68 +503,68 @@ class Ee {
496
503
  return !this.value;
497
504
  }
498
505
  }
499
- class Or extends oe {
500
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
501
- super(r, n);
502
- L(this, "editorType", "datetime-picker");
506
+ class no extends pe {
507
+ constructor(n = { value: "", displayFormat: "", valueFormat: "" }, o) {
508
+ super(n, o);
509
+ O(this, "editorType", "datetime-picker");
503
510
  }
504
511
  }
505
- class Br extends fe {
506
- constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n = {}) {
507
- super(r, n);
512
+ class oo extends Te {
513
+ constructor(n = { begin: "", end: "", displayFormat: "", valueFormat: "" }, o = {}) {
514
+ super(n, o);
508
515
  // 这个属性会在后面进行比对
509
- L(this, "editorType", "datetime-range");
510
- L(this, "valueType", "datetime");
516
+ O(this, "editorType", "datetime-range");
517
+ O(this, "valueType", "datetime");
511
518
  }
512
519
  }
513
- class Mr extends Se {
514
- constructor(r = { value: "", valueList: [] }, n) {
515
- super(r, n);
516
- L(this, "editorType", "check-group");
520
+ class ro extends qe {
521
+ constructor(n = { value: "", valueList: [] }, o) {
522
+ super(n, o);
523
+ O(this, "editorType", "check-group");
517
524
  }
518
525
  }
519
- function Ie() {
520
- function e(t, r, n) {
526
+ function Ue() {
527
+ function e(t, n, o) {
521
528
  switch (t) {
522
529
  case "check-box":
523
- return new Tr(r, n);
530
+ return new Jn(n, o);
524
531
  case "combo-list":
525
- return new Se(r, n);
532
+ return new qe(n, o);
526
533
  case "combo-lookup":
527
- return new kr(r, n);
534
+ return new _n(n, o);
528
535
  case "input-group":
529
- return new wr(r, n);
536
+ return new Qn(n, o);
530
537
  case "year-picker":
531
- return new Pr(r, n);
538
+ return new to(n, o);
532
539
  case "date-picker":
533
- return new oe(r, n);
540
+ return new pe(n, o);
534
541
  case "datetime-range":
535
- return new Br(r, n);
542
+ return new oo(n, o);
536
543
  case "date-range":
537
- return new fe(r, n);
544
+ return new Te(n, o);
538
545
  case "datetime-picker":
539
- return new Or(r, n);
546
+ return new no(n, o);
540
547
  case "lookup":
541
- return new xr(r, n);
548
+ return new Xn(n, o);
542
549
  case "month-picker":
543
- return new Vr(r, n);
550
+ return new Yn(n, o);
544
551
  case "month-range":
545
- return new Sr(r, n);
552
+ return new Hn(n, o);
546
553
  case "number-range":
547
- return new Er(r, n);
554
+ return new Dn(n, o);
548
555
  case "number-spinner":
549
- return new Ir(r, n);
556
+ return new Kn(n, o);
550
557
  case "radio-group":
551
- return new Lr(r, n);
558
+ return new eo(n, o);
552
559
  case "check-group":
553
- return new Mr(r, n);
560
+ return new ro(n, o);
554
561
  default:
555
- return new Ee(r, n);
562
+ return new Ge(n, o);
556
563
  }
557
564
  }
558
565
  return { createConditionValue: e };
559
566
  }
560
- function Le(e = "query-solution") {
567
+ function ze(e = "query-solution") {
561
568
  function t(i) {
562
569
  let u = "input-group";
563
570
  switch (i) {
@@ -574,20 +581,20 @@ function Le(e = "query-solution") {
574
581
  }
575
582
  return u;
576
583
  }
577
- function r(i) {
584
+ function n(i) {
578
585
  const u = i.editor ? i.editor.type : "input-group";
579
- return i.editor.type = t(u), i.editor.type === "date-picker" ? (u.indexOf("range") > -1 && (i.editor.enablePeriod = !0), u.indexOf("datetime") > -1 && (i.editor.showTime = !0), u.indexOf("year") > -1 && (i.editor.selectMode = "year"), u.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0, i.editor.needValid = !0) : i.editor.type === "check-group" && e === "filter-bar" ? i.editor.direction = "vertical" : (i.editor.type === "lookup" || i.editor.type === "combo-list") && (i.editor.enableClear = Object.prototype.hasOwnProperty.call(i.editor, "enableClear") ? i.editor.enableClear : !0), u === "input-group" && !i.editor.placeholder && (i.editor.placeholder = ne.getLocaleValue("input-group.placeholder")), i.editor;
586
+ return i.editor.type = t(u), i.editor.type === "date-picker" ? (u.indexOf("range") > -1 && (i.editor.enablePeriod = !0), u.indexOf("datetime") > -1 && (i.editor.showTime = !0), u.indexOf("year") > -1 && (i.editor.selectMode = "year"), u.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0, i.editor.needValid = !0) : i.editor.type === "check-group" && e === "filter-bar" ? i.editor.direction = "vertical" : (i.editor.type === "lookup" || i.editor.type === "combo-list") && (i.editor.enableClear = Object.prototype.hasOwnProperty.call(i.editor, "enableClear") ? i.editor.enableClear : !0), u === "input-group" && !i.editor.placeholder && (i.editor.placeholder = ae.getLocaleValue("input-group.placeholder")), i.editor;
580
587
  }
581
- function n(i) {
582
- return i.map((S) => Object.assign({}, S)).map((S) => (S.visible = Object.prototype.hasOwnProperty.call(S, "visible") ? S.visible : !0, S.editor = r(S), S));
588
+ function o(i) {
589
+ return i.map((V) => Object.assign({}, V)).map((V) => (V.visible = Object.prototype.hasOwnProperty.call(V, "visible") ? V.visible : !0, V.editor = n(V), V));
583
590
  }
584
- function o(i, u, S, g) {
591
+ function r(i, u, V, d) {
585
592
  switch (i.value.editorType) {
586
593
  case "combo-list":
587
- g.newValue && (i.value.valueList = g.newValue.map((v) => ({ name: v.name, value: v.value })));
594
+ d.newValue && (i.value.valueList = d.newValue.map((v) => ({ name: v.name, value: v.value })));
588
595
  break;
589
596
  case "radio-group":
590
- i.value.valueList = [S.data.find((v) => v.value === u)];
597
+ i.value.valueList = [V.data.find((v) => v.value === u)];
591
598
  break;
592
599
  case "year-range":
593
600
  case "month-range":
@@ -597,166 +604,748 @@ function Le(e = "query-solution") {
597
604
  break;
598
605
  }
599
606
  }
600
- function p(i, u, S) {
601
- var y, m, f, E, c, b;
602
- const g = re((y = i.get(u.fieldCode)) == null ? void 0 : y.editor), v = (m = i.get(u.fieldCode)) == null ? void 0 : m.id, a = Object.prototype.hasOwnProperty.call(u, "visible") ? u.visible : (f = i.get(u.fieldCode)) == null ? void 0 : f.visible;
603
- let s = !0;
604
- if (((E = u.value) == null ? void 0 : E.editorType) === "lookup" && g) {
605
- g.idValue = (c = u.value.mapFields) == null ? void 0 : c.map((j) => j.id).join(",");
606
- const { onClear: x } = g;
607
- g.onClear = (j) => {
608
- u.value.mapFields = [], S(u, ""), x && x(j);
609
- }, g["onUpdate:dataMapping"] = (j) => {
610
- u.value.mapFields = j.items || [], S(u, u.value.getValue());
611
- }, s = !1;
612
- } else ((b = u.value) == null ? void 0 : b.editorType) === "number-range" && g ? (g.beginValue = u.value.begin, g.onBeginValueChange = (x) => {
613
- u.value.begin = x, S(u, x);
614
- }, g.endValue = u.value.end, g.onEndValueChange = (x) => {
615
- u.value.end = x, S(u, x);
616
- }, s = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((x) => {
617
- var j;
618
- return x === ((j = u.value) == null ? void 0 : j.editorType);
619
- }) && (g.beginValue = u.value.begin, g.endValue = u.value.end);
620
- return Object.prototype.hasOwnProperty.call(u, "disabled") && (g.disabled = u.disabled), { id: v, editor: g, visible: a, needEmitChange: s };
621
- }
622
- return { getSingleControlType: r, convertToControls: n, conditionChangeHandler: o, renderFieldConditionEditor: p };
607
+ function c(i, u, V) {
608
+ var h, y, b, P, m, f, F;
609
+ const d = ie((h = i.get(u.fieldCode)) == null ? void 0 : h.editor), v = (y = i.get(u.fieldCode)) == null ? void 0 : y.id, s = Object.prototype.hasOwnProperty.call(u, "visible") ? u.visible : (b = i.get(u.fieldCode)) == null ? void 0 : b.visible;
610
+ let a = !0;
611
+ if (((P = u.value) == null ? void 0 : P.editorType) === "lookup" && d) {
612
+ d.idValue = (m = u.value.mapFields) == null ? void 0 : m.map((A) => A.id).join(",");
613
+ const { onClear: j } = d;
614
+ d.onClear = (A) => {
615
+ u.value.mapFields = [], V(u, ""), j && j(A);
616
+ }, d["onUpdate:dataMapping"] = (A) => {
617
+ u.value.mapFields = A.items || [], V(u, u.value.getValue());
618
+ }, a = !1;
619
+ } else ((f = u.value) == null ? void 0 : f.editorType) === "number-range" && d ? (d.beginValue = u.value.begin, d.onBeginValueChange = (j) => {
620
+ u.value.begin = j, V(u, j);
621
+ }, d.endValue = u.value.end, d.onEndValueChange = (j) => {
622
+ u.value.end = j, V(u, j);
623
+ }, a = !1) : d && ["year-range", "month-range", "date-range", "datetime-range"].find((j) => {
624
+ var A;
625
+ return j === ((A = u.value) == null ? void 0 : A.editorType);
626
+ }) ? (d.beginValue = u.value.begin, d.endValue = u.value.end) : ((F = u.value) == null ? void 0 : F.editorType) === "combo-list" && d && (d.onDataChanged = (j) => {
627
+ var q;
628
+ const A = (q = i.get(u.fieldCode)) == null ? void 0 : q.editor;
629
+ A && (A.data = j), u.value.updateData(j);
630
+ });
631
+ return Object.prototype.hasOwnProperty.call(u, "disabled") && (d.disabled = u.disabled), { id: v, editor: d, visible: s, needEmitChange: a };
632
+ }
633
+ return { getSingleControlType: n, convertToControls: o, conditionChangeHandler: r, renderFieldConditionEditor: c };
623
634
  }
624
- function ge(e, t, r = "query-solution") {
625
- const { convertToControls: n } = Le(r), o = M(e.fields), p = M([]), i = /* @__PURE__ */ new Map(), { createConditionValue: u } = Ie();
626
- function S(v = !0) {
627
- v && (o.value = n(o.value)), o.value.reduce((a, s) => (a.set(s.labelCode, s), a), i);
628
- }
629
- function g(v) {
630
- return v.forEach((a) => {
631
- if (a) {
632
- const s = i.get(a.fieldCode);
633
- s.controlType && (a.value = u(s.controlType, a.value, s.editor));
635
+ function ke(e, t, n = "query-solution") {
636
+ const { convertToControls: o } = ze(n), r = B(e.fields), c = B([]), i = /* @__PURE__ */ new Map(), { createConditionValue: u } = Ue();
637
+ function V(v = !0) {
638
+ v && (r.value = o(r.value)), r.value.reduce((s, a) => (s.set(a.labelCode, a), s), i);
639
+ }
640
+ function d(v) {
641
+ return v.forEach((s) => {
642
+ if (s) {
643
+ const a = i.get(s.fieldCode);
644
+ a.controlType && (s.value = u(a.controlType, s.value, a.editor));
634
645
  }
635
646
  }), v;
636
647
  }
637
- return { convertToControls: n, fields: o, fieldMap: i, fieldConditions: p, loadFieldConfigs: S, initialConditionValue: g };
648
+ return { convertToControls: o, fields: r, fieldMap: i, fieldConditions: c, loadFieldConfigs: V, initialConditionValue: d };
638
649
  }
639
- function Pe(e, t, r) {
640
- const n = M(null), o = M(r), p = M(0);
641
- function i(v, a) {
642
- let s = null;
650
+ function We(e, t, n) {
651
+ const o = B(null), r = B(n), c = B(0);
652
+ function i(v, s) {
653
+ let a = null;
643
654
  return function() {
644
- const y = arguments;
645
- s ? (clearTimeout(s), s = setTimeout(() => {
646
- s = null, v(...y);
647
- }, 200)) : (v(...y), s = setTimeout(() => {
648
- s = null;
655
+ const h = arguments;
656
+ a ? (clearTimeout(a), a = setTimeout(() => {
657
+ a = null, v(...h);
658
+ }, 200)) : (v(...h), a = setTimeout(() => {
659
+ a = null;
649
660
  }, 200));
650
661
  };
651
662
  }
652
663
  function u() {
653
- o.value && (n.value = new ResizeObserver(i((v) => {
654
- const a = v[0];
655
- p.value = a.contentRect.width;
656
- })), n.value.observe(o.value));
657
- }
658
- function S(v) {
659
- let s = "col-12";
660
- return v > 250 * 6 ? s = "col-2" : v > 250 * 4 ? s = "col-3" : v > 250 * 3 ? s = "col-4" : v > 250 * 2 && (s = "col-6"), s;
661
- }
662
- const g = W(() => S(p.value));
663
- return _([r], ([v]) => {
664
- o.value = v, u();
664
+ r.value && (o.value = new ResizeObserver(i((v) => {
665
+ const s = v[0];
666
+ c.value = s.contentRect.width;
667
+ })), o.value.observe(r.value));
668
+ }
669
+ function V(v) {
670
+ let a = "col-12";
671
+ return v > 250 * 6 ? a = "col-2" : v > 250 * 4 ? a = "col-3" : v > 250 * 3 ? a = "col-4" : v > 250 * 2 && (a = "col-6"), a;
672
+ }
673
+ const d = Q(() => V(c.value));
674
+ return D([n], ([v]) => {
675
+ r.value = v, u();
665
676
  }), {
666
- conditionClass: g,
667
- resizeObserver: n
677
+ conditionClass: d,
678
+ resizeObserver: o
668
679
  };
669
680
  }
670
- const be = /* @__PURE__ */ Q({
681
+ const Oe = /* @__PURE__ */ ee({
671
682
  name: "FConditionFields",
672
- props: me,
683
+ props: Ce,
673
684
  emits: ["valueChange", "blur", "focus", "click", "input"],
674
685
  setup(e, t) {
675
- const r = M(), n = ne.getLocale(), o = M(e.key), p = M(e.conditions), {
686
+ const n = B(), o = ae.getLocale(), r = B(e.key), c = B(e.conditions), {
676
687
  renderFieldConditionEditor: i,
677
688
  conditionChangeHandler: u
678
- } = Le(), S = ge(e), {
679
- initialConditionValue: g,
689
+ } = ze(), V = ke(e), {
690
+ initialConditionValue: d,
680
691
  fieldMap: v,
681
- loadFieldConfigs: a
682
- } = S, s = Pe(e, t, r), {
683
- resizeObserver: y
684
- } = s;
685
- a(!0), g(p.value), Te(() => {
686
- var c;
687
- (c = y.value) == null || c.unobserve(r.value);
688
- }), _(() => e.fields, () => {
689
- a(!0);
690
- }), _(() => e.conditions, () => {
691
- p.value = e.conditions, g(p.value);
692
+ loadFieldConfigs: s
693
+ } = V, a = We(e, t, n), {
694
+ resizeObserver: h
695
+ } = a;
696
+ s(!0), d(c.value), Be(() => {
697
+ var m;
698
+ (m = h.value) == null || m.unobserve(n.value);
699
+ }), D(() => e.fields, () => {
700
+ s(!0);
701
+ }), D(() => e.conditions, () => {
702
+ c.value = e.conditions, d(c.value);
692
703
  });
693
- const m = W(() => ({
704
+ const y = Q(() => ({
694
705
  // row: true,
695
706
  "f-utils-flex-row-wrap": !0,
696
707
  "farris-form": !0,
697
708
  "condition-div": !0,
698
- "farris-form-controls-inline": !n || e.isControlInline === !0 || e.isControlInline === "auto" && n !== "en"
709
+ "farris-form-controls-inline": !o || e.isControlInline === !0 || e.isControlInline === "auto" && o !== "en"
699
710
  }));
700
- function f(c, b, x, j) {
701
- u(c, b, x, j), t.emit("valueChange", b, c);
711
+ function b(m, f, F, j) {
712
+ u(m, f, F, j), t.emit("valueChange", f, m);
702
713
  }
703
- function E() {
704
- return p.value.map((c) => {
705
- var U;
714
+ function P() {
715
+ return c.value.map((m) => {
716
+ var _;
706
717
  const {
707
- id: b,
708
- editor: x,
718
+ id: f,
719
+ editor: F,
709
720
  needEmitChange: j,
710
- visible: $
711
- } = i(v, c, f);
712
- let G = ((U = x == null ? void 0 : x.appearance) == null ? void 0 : U.class) || e.itemClass;
713
- return x != null && x.multiLineLabel && (G = G + " farris-group-multi-label"), B(Re, {
714
- id: b,
715
- key: b,
716
- visible: $,
717
- customClass: G,
718
- label: (x == null ? void 0 : x.showLabel) === !1 ? " " : c.fieldName,
719
- editor: x,
720
- required: x == null ? void 0 : x.required,
721
- modelValue: c.value.value,
722
- "onUpdate:modelValue": (R) => c.value.value = R,
723
- onChange: (R, l) => {
724
- j && f(c, R, x, l);
721
+ visible: A
722
+ } = i(v, m, b);
723
+ let q = ((_ = F == null ? void 0 : F.appearance) == null ? void 0 : _.class) || e.itemClass;
724
+ return F != null && F.multiLineLabel && (q = q + " farris-group-multi-label"), L(nt, {
725
+ id: f,
726
+ key: f,
727
+ visible: A,
728
+ customClass: q,
729
+ label: (F == null ? void 0 : F.showLabel) === !1 ? " " : m.fieldName,
730
+ editor: F,
731
+ required: F == null ? void 0 : F.required,
732
+ modelValue: m.value.value,
733
+ "onUpdate:modelValue": (J) => m.value.value = J,
734
+ onChange: (J, l) => {
735
+ j && b(m, J, F, l);
725
736
  }
726
737
  }, null);
727
738
  });
728
739
  }
729
- return () => ce(B("div", {
730
- class: m.value,
731
- key: o.value,
732
- ref: r
733
- }, [E()]), [[de("area-response")]]);
740
+ return () => ue(L("div", {
741
+ class: y.value,
742
+ key: r.value,
743
+ ref: n
744
+ }, [P()]), [[ce("area-response")]]);
745
+ }
746
+ }), io = "root-viewmodel";
747
+ class so {
748
+ constructor(t, n) {
749
+ O(this, "formSchemaUtils");
750
+ O(this, "controlCreatorUtils");
751
+ O(this, "designViewModelUtils");
752
+ this.resolver = t, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
753
+ }
754
+ createComponent(t) {
755
+ const n = this.createComponentRefNode(t), o = this.createComponentNode(t), r = this.createViewModeNode(t), c = this.formSchemaUtils.getFormSchema();
756
+ return c.module.viewmodels.push(r), c.module.components.push(o), this.designViewModelUtils.assembleDesignViewModel(), n;
757
+ }
758
+ createComponentRefNode(t) {
759
+ const n = this.resolver.getSchemaByType("component-ref");
760
+ return Object.assign(n, {
761
+ id: `${t.componentId}-component-ref`,
762
+ component: `${t.componentId}-component`
763
+ }), n;
764
+ }
765
+ createComponentNode(t) {
766
+ const n = this.resolver.getSchemaByType("component"), o = this.createFormComponentContents(t);
767
+ return Object.assign(n, {
768
+ id: `${t.componentId}-component`,
769
+ viewModel: `${t.componentId}-component-viewmodel`,
770
+ componentType: t.componentType,
771
+ appearance: {
772
+ class: this.getFormComponentClass(t)
773
+ },
774
+ formColumns: t.formColumns,
775
+ contents: o
776
+ }), n;
777
+ }
778
+ /**
779
+ * 获取卡片组件层级的class样式
780
+ */
781
+ getFormComponentClass(t) {
782
+ var o, r;
783
+ const { templateId: n } = this.formSchemaUtils.getFormSchema().module;
784
+ if (n === "double-list-in-tab-template" && ((r = (o = t.parentComponentInstance) == null ? void 0 : o.schema) == null ? void 0 : r.type) === "tab-page") {
785
+ const c = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
786
+ if ((c == null ? void 0 : c.type) === "tabs" && (c == null ? void 0 : c.fill) === !0)
787
+ return "f-struct-wrapper f-utils-fill-flex-column";
788
+ }
789
+ return "f-struct-wrapper";
790
+ }
791
+ createFormComponentContents(t) {
792
+ var u, V;
793
+ const n = this.resolver.getSchemaByType("section");
794
+ Object.assign(n, {
795
+ id: t.componentId + "-form-section",
796
+ appearance: {
797
+ class: "f-section-form f-section-in-mainsubcard"
798
+ },
799
+ mainTitle: t.componentName
800
+ });
801
+ const o = this.resolver.getSchemaByType("response-form"), r = [];
802
+ Object.assign(o, {
803
+ id: t.componentId + "-form",
804
+ appearance: {
805
+ class: "f-form-layout farris-form farris-form-controls-inline"
806
+ },
807
+ contents: r,
808
+ controlsInline: !0
809
+ }), n.contents = [o];
810
+ const { selectedFields: c } = t;
811
+ c == null || c.forEach((d) => {
812
+ if (d.$type === xe.SimpleField) {
813
+ const v = ie(d), s = this.resolveControlClassByFormColumns(t), a = this.controlCreatorUtils.setFormFieldProperty(v, "", s);
814
+ a && r.push(a);
815
+ }
816
+ });
817
+ const { templateId: i } = this.formSchemaUtils.getFormSchema().module;
818
+ if (i === "double-list-in-tab-template" && ((V = (u = t.parentComponentInstance) == null ? void 0 : u.schema) == null ? void 0 : V.type) === "tab-page") {
819
+ const d = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
820
+ (d == null ? void 0 : d.type) === "tabs" && (d == null ? void 0 : d.fill) === !0 && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0);
821
+ }
822
+ return [n];
734
823
  }
735
- }), Nr = {
824
+ resolveControlClassByFormColumns(t) {
825
+ let n = "";
826
+ switch (t.formColumns) {
827
+ case 1: {
828
+ n = "col-12 col-md-12 col-xl-12 col-el-12";
829
+ break;
830
+ }
831
+ case 2: {
832
+ n = "col-12 col-md-6 col-xl-6 col-el-6";
833
+ break;
834
+ }
835
+ case 3: {
836
+ n = "col-12 col-md-6 col-xl-4 col-el-4";
837
+ break;
838
+ }
839
+ case 4: {
840
+ n = "col-12 col-md-6 col-xl-3 col-el-2";
841
+ break;
842
+ }
843
+ }
844
+ return n;
845
+ }
846
+ /**
847
+ * 添加viewModel节点
848
+ */
849
+ createViewModeNode(t) {
850
+ return {
851
+ id: `${t.componentId}-component-viewmodel`,
852
+ code: `${t.componentId}-component-viewmodel`,
853
+ name: t.componentName,
854
+ bindTo: t.bindTo,
855
+ parent: io,
856
+ fields: this.assembleViewModelFields(t),
857
+ commands: [],
858
+ states: [],
859
+ enableValidation: !0
860
+ };
861
+ }
862
+ /**
863
+ * 组装viewModel fields 节点
864
+ */
865
+ assembleViewModelFields(t) {
866
+ const n = [], { selectedFields: o } = t;
867
+ return o == null || o.forEach((r) => {
868
+ if (r.$type === xe.SimpleField) {
869
+ let c = "blur";
870
+ const i = r.type.name;
871
+ (i === Se.Enum || i === Se.Boolean) && (c = "change"), n.push({
872
+ type: "Form",
873
+ id: r.id,
874
+ fieldName: r.bindingField,
875
+ groupId: null,
876
+ groupName: null,
877
+ updateOn: c,
878
+ fieldSchema: {}
879
+ });
880
+ }
881
+ }), n;
882
+ }
883
+ }
884
+ function Ze(e, t, n, o) {
885
+ var c, i, u, V, d, v;
886
+ const r = n.parentComponentInstance;
887
+ if (r && o) {
888
+ const s = (c = r.schema) == null ? void 0 : c.type, h = {
889
+ componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
890
+ componentName: ((i = n.bindingSourceContext) == null ? void 0 : i.entityTitle) || ((V = (u = n.bindingSourceContext) == null ? void 0 : u.bindingEntity) == null ? void 0 : V.name) || "标题",
891
+ componentType: "form",
892
+ formColumns: s === "splitter-pane" ? 1 : 4,
893
+ parentContainerId: r.schema.id,
894
+ parentComponentInstance: r,
895
+ bindTo: ((d = n.bindingSourceContext) == null ? void 0 : d.bindTo) || "/",
896
+ selectedFields: (v = n.bindingSourceContext) == null ? void 0 : v.bindingEntityFields
897
+ };
898
+ return new so(e, o).createComponent(h);
899
+ } else
900
+ return t;
901
+ }
902
+ const ao = "https://json-schema.org/draft/2020-12/schema", lo = "https://farris-design.gitee.io/response-form.schema.json", uo = "response-form", co = "A Farris Data Collection Component", po = "object", mo = {
903
+ id: {
904
+ description: "The unique identifier for a form group",
905
+ type: "string"
906
+ },
907
+ type: {
908
+ description: "The type string of form group component",
909
+ type: "string",
910
+ default: "response-form"
911
+ },
912
+ appearance: {
913
+ description: "",
914
+ type: "object",
915
+ properties: {
916
+ class: {
917
+ type: "string"
918
+ },
919
+ style: {
920
+ type: "string"
921
+ }
922
+ },
923
+ default: {}
924
+ },
925
+ contents: {
926
+ description: "",
927
+ type: "array",
928
+ default: []
929
+ },
930
+ visible: {
931
+ description: "",
932
+ type: "boolean",
933
+ default: !0
934
+ },
935
+ labelAutoOverflow: {
936
+ description: "",
937
+ type: "boolean",
938
+ default: !1
939
+ },
940
+ adaptForLanguage: {
941
+ description: "",
942
+ type: "boolean",
943
+ default: !0
944
+ },
945
+ layout: {
946
+ description: "",
947
+ type: "string",
948
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
949
+ },
950
+ fields: {
951
+ description: "",
952
+ type: "array"
953
+ },
954
+ formData: {
955
+ description: "",
956
+ type: "object"
957
+ },
958
+ formType: {
959
+ description: "",
960
+ type: "string",
961
+ default: "static"
962
+ }
963
+ }, fo = [
964
+ "id",
965
+ "type",
966
+ "contents"
967
+ ], go = {
968
+ $schema: ao,
969
+ $id: lo,
970
+ title: uo,
971
+ description: co,
972
+ type: po,
973
+ properties: mo,
974
+ required: fo
975
+ }, Je = /* @__PURE__ */ new Map([
976
+ ["appearance", pt]
977
+ ]), vo = "https://json-schema.org/draft/2020-12/schema", yo = "https://farris-design.gitee.io/dynamic-form.schema.json", ho = "dynamic-form", bo = "A Farris Data Collection Component", Fo = "object", Co = {
978
+ id: {
979
+ description: "The unique identifier for a form group",
980
+ type: "string"
981
+ },
982
+ type: {
983
+ description: "The type string of form group component",
984
+ type: "string",
985
+ default: "dynamic-form"
986
+ },
987
+ appearance: {
988
+ description: "",
989
+ type: "object",
990
+ properties: {
991
+ class: {
992
+ type: "string"
993
+ },
994
+ style: {
995
+ type: "string"
996
+ }
997
+ },
998
+ default: {}
999
+ },
1000
+ contents: {
1001
+ description: "",
1002
+ type: "array",
1003
+ default: []
1004
+ },
1005
+ visible: {
1006
+ description: "",
1007
+ type: "boolean",
1008
+ default: !0
1009
+ },
1010
+ labelAutoOverflow: {
1011
+ description: "",
1012
+ type: "boolean",
1013
+ default: !1
1014
+ },
1015
+ adaptForLanguage: {
1016
+ description: "",
1017
+ type: "boolean",
1018
+ default: !0
1019
+ },
1020
+ formType: {
1021
+ description: "",
1022
+ type: "string",
1023
+ default: "dynamic"
1024
+ },
1025
+ layout: {
1026
+ description: "",
1027
+ type: "string",
1028
+ default: "col-12 col-md-6 col-xl-3 col-el-2"
1029
+ },
1030
+ fields: {
1031
+ description: "",
1032
+ type: "array"
1033
+ },
1034
+ formData: {
1035
+ description: "",
1036
+ type: "object"
1037
+ }
1038
+ }, To = [
1039
+ "id",
1040
+ "type",
1041
+ "contents"
1042
+ ], ko = {
1043
+ $schema: vo,
1044
+ $id: yo,
1045
+ title: ho,
1046
+ description: bo,
1047
+ type: Fo,
1048
+ properties: Co,
1049
+ required: To
1050
+ }, me = {
736
1051
  customClass: { type: String, default: "" },
737
1052
  customStyle: { type: String, defaut: "" },
738
1053
  /** 控制是否可见 */
739
1054
  visible: { type: Boolean, default: !0 },
740
1055
  /** 内部控件布局是否响应国际化 */
741
- adaptForLanguage: { type: Boolean, default: !0 }
742
- }, ie = /* @__PURE__ */ Q({
1056
+ adaptForLanguage: { type: Boolean, default: !0 },
1057
+ /** 绑定动态字段 */
1058
+ fields: { type: Array, default: [] },
1059
+ /** 绑定动态字段的值*/
1060
+ formData: { type: Object, default: null },
1061
+ /** 为动态字段指定样式*/
1062
+ layout: { type: String, default: "col-12 col-md-6 col-xl-3 col-el-2" }
1063
+ }, Vo = Object.assign({}, me, {
1064
+ // 是否渲染form层级
1065
+ canRenderForm: { type: Boolean, default: !0 },
1066
+ callback: { type: Function }
1067
+ });
1068
+ Fe(me, go, Je, Ze);
1069
+ Fe(me, ko, Je, Ze);
1070
+ const le = /* @__PURE__ */ ee({
1071
+ name: "FDynamicForm",
1072
+ props: Vo,
1073
+ emits: ["update:modelValue", "event"],
1074
+ setup(e, t) {
1075
+ const n = B(e.fields), o = /* @__PURE__ */ new Map(), r = B(e.callback);
1076
+ ht();
1077
+ const c = bt(), i = B(e.formData || {}), u = Ft(i, t);
1078
+ Ct(n.value).setup();
1079
+ const d = /* @__PURE__ */ new Map(), v = B(e.canRenderForm), {
1080
+ mergeArray: s,
1081
+ resolveCallbacks: a,
1082
+ resolveEvents: h
1083
+ } = Tt(), y = Q(() => {
1084
+ const p = ae.getLocale(), $ = e.fields && e.fields.length > 0, G = {
1085
+ "f-form-layout": $,
1086
+ "farris-form": $
1087
+ };
1088
+ return e.adaptForLanguage && p && (G["farris-form-controls-inline"] = p !== "en"), $e(G, e.customClass);
1089
+ });
1090
+ function b() {
1091
+ function p($, G) {
1092
+ const {
1093
+ id: Z
1094
+ } = $ || {}, {
1095
+ field: H
1096
+ } = $.binding || {};
1097
+ return {
1098
+ modelValue: G.getValue(Z),
1099
+ "onUpdate:modelValue": (R) => {
1100
+ G.setValue(Z, H || Z, R);
1101
+ }
1102
+ };
1103
+ }
1104
+ return {
1105
+ resolve: p
1106
+ };
1107
+ }
1108
+ function P(p) {
1109
+ const $ = b();
1110
+ return u.getValue(p.id) === void 0 && Object.hasOwnProperty.call(p, "modelValue") && u.setValue(p.id, void 0, p.modelValue), $.resolve(p, u);
1111
+ }
1112
+ function m(p) {
1113
+ const $ = {};
1114
+ return p && Object.entries(p).forEach(([G, Z]) => {
1115
+ $[G] = () => Array.isArray(Z) ? Z.map((H) => A(H)) : A(Z);
1116
+ }), $;
1117
+ }
1118
+ function f(p) {
1119
+ return p.type ? p.type : p.fields ? "fieldset" : "form-group";
1120
+ }
1121
+ function F(p) {
1122
+ const $ = f(p);
1123
+ let G = p.customClass;
1124
+ G || (G = $ === "form-group" ? e.layout : "col-12 px-0");
1125
+ const {
1126
+ fields: Z,
1127
+ customClass: H,
1128
+ ...R
1129
+ } = p, z = {
1130
+ ...h(p, t, $)
1131
+ }, X = {
1132
+ ...a(p, r, $)
1133
+ };
1134
+ return {
1135
+ props: {
1136
+ ...{
1137
+ ...R,
1138
+ customClass: G,
1139
+ ...P(p)
1140
+ },
1141
+ key: p.id,
1142
+ ref: (K) => {
1143
+ if (K && p.id && !c.has(p.id)) {
1144
+ c.register(p.id, K);
1145
+ const te = {
1146
+ token: p.id,
1147
+ name: "component:ready",
1148
+ type: f(p),
1149
+ payloads: [B(K)],
1150
+ schema: p
1151
+ };
1152
+ t.emit("event", te);
1153
+ }
1154
+ },
1155
+ onVnodeUnmounted: (K) => {
1156
+ if (p.id && c.has(p.id)) {
1157
+ c.remove(p.id);
1158
+ const te = {
1159
+ token: p.id,
1160
+ name: "component:unmounted",
1161
+ type: f(p),
1162
+ payloads: [K],
1163
+ schema: p
1164
+ };
1165
+ t.emit("event", te);
1166
+ }
1167
+ }
1168
+ },
1169
+ eventProps: z,
1170
+ callbackProps: X
1171
+ };
1172
+ }
1173
+ function j(p, $) {
1174
+ return Array.isArray(p) ? p.map((G) => $(G)) : $(p);
1175
+ }
1176
+ function A(p, $) {
1177
+ var X;
1178
+ const G = f(p), Z = fe[G];
1179
+ if (p.id && o.set(p.id, p), !Z)
1180
+ return null;
1181
+ const H = () => p.fields ? p.fields.map((Y) => A(Y)) : null, R = (Y, oe, K) => {
1182
+ let te;
1183
+ return K && K.length > 0 ? te = L(Y, {
1184
+ ...oe
1185
+ }, K) : te = L(Y, {
1186
+ ...oe
1187
+ }, null), te;
1188
+ }, z = ((X = d.get(p.id)) == null ? void 0 : X.props) || {};
1189
+ return p.fields && p.fields.length > 0 ? R(Z, z, [H()]) : p.slots ? R(Z, z, [...Object.values(m(p.slots))]) : R(Z, z);
1190
+ }
1191
+ function q(p) {
1192
+ const $ = f(p);
1193
+ if (!fe[$])
1194
+ return;
1195
+ const {
1196
+ props: Z,
1197
+ eventProps: H,
1198
+ callbackProps: R
1199
+ } = F(p), z = kt[$], X = z ? z.editorResolver : null, {
1200
+ componentEventProps: Y,
1201
+ editorEventProps: oe
1202
+ } = H, {
1203
+ componentCallbackProps: K,
1204
+ editorCallbackProps: te
1205
+ } = R;
1206
+ if (Y && Object.keys(Y).length > 0 && Object.assign(Z, Y), K && Object.keys(K).length > 0 && Object.assign(Z, K), X && oe && Object.keys(oe).length > 0) {
1207
+ const ne = X.resolve(p);
1208
+ Object.assign(ne, oe);
1209
+ }
1210
+ if (X && te && Object.keys(te).length > 0) {
1211
+ const ne = X.resolve(p);
1212
+ Object.assign(ne, te);
1213
+ }
1214
+ if (Z && Object.keys(Z).length > 0) {
1215
+ const ne = d.get(p.id);
1216
+ ne ? st(ne == null ? void 0 : ne.props, Z) : d.set(p.id, Ve({
1217
+ props: Z
1218
+ }));
1219
+ }
1220
+ !p.fields || !Array.isArray(p.fields) || p.fields.forEach((ne) => q(ne));
1221
+ }
1222
+ function _(p) {
1223
+ const $ = f(p);
1224
+ fe[$] && (J(p), !(!p.fields || !Array.isArray(p.fields)) && p.fields.forEach((Z) => _(Z)));
1225
+ }
1226
+ function J(p) {
1227
+ const $ = P(p);
1228
+ if ($ && Object.keys($).length > 0) {
1229
+ const G = d.get(p.id);
1230
+ if (!G)
1231
+ d.set(p.id, Ve({
1232
+ props: $
1233
+ }));
1234
+ else {
1235
+ const Z = {
1236
+ ...G == null ? void 0 : G.props
1237
+ };
1238
+ Object.keys($).forEach((H) => {
1239
+ Z[H] = $[H];
1240
+ }), Object.assign(G == null ? void 0 : G.props, Z);
1241
+ }
1242
+ }
1243
+ }
1244
+ be(() => {
1245
+ }), D(() => e.formData, (p) => {
1246
+ i.value = p;
1247
+ }), D(() => i.value, (p) => {
1248
+ j(n.value, _);
1249
+ }, {
1250
+ deep: !0
1251
+ });
1252
+ function l(p) {
1253
+ p && j(n.value, q);
1254
+ }
1255
+ D(() => e.fields, (p) => {
1256
+ o.clear(), c.clear(), i.value = e.formData || {}, d.clear(), n.value = p, l(p);
1257
+ }), l(e.fields);
1258
+ function g(p) {
1259
+ p.$forceUpdate && p.$forceUpdate();
1260
+ }
1261
+ function E(p) {
1262
+ return u.getValue(p);
1263
+ }
1264
+ function N() {
1265
+ return i.value;
1266
+ }
1267
+ function w(p, $) {
1268
+ u.setValue(p, void 0, $);
1269
+ const G = o.get(p);
1270
+ G && J(G);
1271
+ }
1272
+ function M(p) {
1273
+ var $;
1274
+ return ($ = d.get(p)) == null ? void 0 : $.props;
1275
+ }
1276
+ function I(p, $) {
1277
+ const G = d.get(p);
1278
+ it(G == null ? void 0 : G.props, $, s);
1279
+ }
1280
+ t.expose({
1281
+ componentManager: c,
1282
+ rerender: g,
1283
+ getProps: M,
1284
+ setProps: I,
1285
+ getControlValue: E,
1286
+ setControlValue: w,
1287
+ getValues: N
1288
+ });
1289
+ function U() {
1290
+ return v.value && ue(L("div", {
1291
+ class: y.value,
1292
+ style: e.customStyle
1293
+ }, [t.slots.default && t.slots.default(), n.value && n.value.length > 0 && j(n.value, A)]), [[ce("area-response")]]);
1294
+ }
1295
+ function W() {
1296
+ return !v.value && n.value && n.value.length > 0 && j(n.value, A);
1297
+ }
1298
+ return () => e.visible ? U() || W() : null;
1299
+ }
1300
+ }), Ie = /* @__PURE__ */ ee({
743
1301
  name: "FResponseForm",
744
- props: Nr,
1302
+ props: me,
745
1303
  emits: [],
746
1304
  setup(e, t) {
747
- const r = M(), n = W(() => {
748
- const o = ne.getLocale(), p = e.customClass.split(" "), i = {
749
- "drag-container": !0
1305
+ var s;
1306
+ const n = B(), o = B(), r = Q(() => {
1307
+ const a = ae.getLocale(), h = e.fields && e.fields.length > 0, y = {
1308
+ "drag-container": !0,
1309
+ "f-form-layout": h,
1310
+ "farris-form": h
750
1311
  };
751
- return p.reduce((u, S) => (u[S] = !0, u), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
752
- });
753
- return () => e.visible && ce(B("div", {
754
- ref: r,
755
- class: n.value,
1312
+ return e.adaptForLanguage && a && (y["farris-form-controls-inline"] = a !== "en"), $e(y, e.customClass);
1313
+ }), c = (s = o.value) == null ? void 0 : s.componentManager;
1314
+ function i(a) {
1315
+ o.value.render(a);
1316
+ }
1317
+ function u(a) {
1318
+ return o.value.getControlValue(a);
1319
+ }
1320
+ function V(a, h) {
1321
+ o.value.setControlValue(a, h);
1322
+ }
1323
+ function d(a) {
1324
+ return o.value.getProps(a);
1325
+ }
1326
+ function v(a, h) {
1327
+ o.value.setProps(a, h);
1328
+ }
1329
+ return t.expose({
1330
+ componentManager: c,
1331
+ rerender: i,
1332
+ getProps: d,
1333
+ setProps: v,
1334
+ getControlValue: u,
1335
+ setControlValue: V
1336
+ }), () => e.visible && ue(L("div", {
1337
+ ref: n,
1338
+ class: r.value,
756
1339
  style: e.customStyle
757
- }, [t.slots.default && t.slots.default()]), [[de("area-response")]]);
758
- }
759
- }), Oe = {
1340
+ }, [t.slots.default && t.slots.default(), e.fields && e.fields.length > 0 && L(le, {
1341
+ ref: o,
1342
+ fields: e.fields,
1343
+ canRenderForm: !1,
1344
+ formData: e.formData,
1345
+ layout: e.layout
1346
+ }, null)]), [[ce("area-response")]]);
1347
+ }
1348
+ }), _e = {
760
1349
  id: { type: String, default: "" },
761
1350
  customClass: { type: String, default: "" },
762
1351
  customStyle: { type: String, default: "" },
@@ -764,7 +1353,7 @@ const be = /* @__PURE__ */ Q({
764
1353
  editor: { type: Object, default: {} },
765
1354
  label: { type: String, default: "" },
766
1355
  /** value is uncertain because type is uncertain, default value should not be set */
767
- modelValue: { type: [String, Boolean, Array, Number] },
1356
+ modelValue: { type: [String, Boolean, Array, Number], default: null },
768
1357
  // readonly: { type: Boolean, default: false },
769
1358
  visible: { type: Boolean, default: !0 },
770
1359
  required: { type: Boolean, default: !1 },
@@ -777,7 +1366,7 @@ const be = /* @__PURE__ */ Q({
777
1366
  componentId: { type: String, default: "" },
778
1367
  errors: { type: Object, default: null },
779
1368
  fill: { type: Boolean, default: !1 }
780
- }, jr = {
1369
+ }, wo = {
781
1370
  id: { type: String },
782
1371
  required: { type: Boolean, default: !1 },
783
1372
  text: { type: String, default: "" },
@@ -788,68 +1377,68 @@ const be = /* @__PURE__ */ Q({
788
1377
  * 实际支持 'visible'可见 | 'reserve-space' 占位不显示
789
1378
  */
790
1379
  showType: { type: String, default: "visible" }
791
- }, Gr = /* @__PURE__ */ Q({
1380
+ }, xo = /* @__PURE__ */ ee({
792
1381
  name: "FDynamicFormLabel",
793
- props: jr,
1382
+ props: wo,
794
1383
  emits: [],
795
1384
  setup(e, t) {
796
- M(e.title || e.text);
797
- const r = M(e.required), n = M(e.text), o = M(e.valid), p = M(e.inValidTip);
798
- _(() => e.text, () => {
799
- n.value = e.text;
800
- }), _(() => e.required, (v, a) => {
801
- v !== a && (r.value = v);
802
- }), _([() => e.valid, () => e.inValidTip], ([v, a]) => {
803
- o.value = v, p.value = a;
1385
+ B(e.title || e.text);
1386
+ const n = B(e.required), o = B(e.text), r = B(e.valid), c = B(e.inValidTip);
1387
+ D(() => e.text, () => {
1388
+ o.value = e.text;
1389
+ }), D(() => e.required, (v, s) => {
1390
+ v !== s && (n.value = v);
1391
+ }), D([() => e.valid, () => e.inValidTip], ([v, s]) => {
1392
+ r.value = v, c.value = s;
804
1393
  });
805
- const i = W(() => o.value ? n.value : p.value), u = W(() => o.value ? "" : "color:red"), S = W(() => ({
1394
+ const i = Q(() => r.value ? o.value : c.value), u = Q(() => r.value ? "" : "color:red"), V = Q(() => ({
806
1395
  "col-form-label": !0,
807
1396
  // 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
808
- "f-width-auto": r.value && (e.showType === "none" || !n.value)
809
- })), g = W(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || r.value || !!n.value && e.showType !== "none");
810
- return () => g.value && B("label", {
811
- class: S.value,
1397
+ "f-width-auto": n.value && (e.showType === "none" || !o.value)
1398
+ })), d = Q(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || n.value || !!o.value && e.showType !== "none");
1399
+ return () => d.value && L("label", {
1400
+ class: V.value,
812
1401
  title: i.value,
813
1402
  style: u.value
814
- }, [!o.value && B("span", {
1403
+ }, [!r.value && L("span", {
815
1404
  class: "f-icon f-icon-warning mr-1",
816
1405
  style: "color: red; min-width: 16px;",
817
- title: p.value
818
- }, null), B("span", {
1406
+ title: c.value
1407
+ }, null), L("span", {
819
1408
  class: "farris-label-text"
820
- }, [r.value && B("span", {
1409
+ }, [n.value && L("span", {
821
1410
  class: "farris-label-info text-danger"
822
- }, [$e("*")]), e.showType === "visible" && n.value])]);
1411
+ }, [tt("*")]), e.showType === "visible" && o.value])]);
823
1412
  }
824
- }), { globalStorageKey: qr } = xe(), F = {}, C = {}, T = {}, w = {};
825
- async function Ar() {
1413
+ }), { globalStorageKey: So } = Ae(), T = {}, k = {}, x = {}, S = {};
1414
+ async function Eo() {
826
1415
  {
827
1416
  const e = {
828
- schemaMap: yr,
829
- propertyConfigSchemaMap: hr,
830
- propertyEffectMap: vr,
831
- schemaResolverMap: gr
1417
+ schemaMap: vt,
1418
+ propertyConfigSchemaMap: gt,
1419
+ propertyEffectMap: ft,
1420
+ schemaResolverMap: mt
832
1421
  };
833
- Ye.register(F, C, T, w), Xe.register(F, C, T, w), He.register(F, C, T, w), De.register(F, C, T, w), Ke.register(F, C, T, w, e), et.register(F, C, T, w), he.register(F, C, T, w, e), ye.register(F, C, T, w, e), he.register(F, C, T, w, e), ye.register(F, C, T, w, e), le.register(F, C, T, w, e), tt.register(F, C, T, w), rt.register(F, C, T, w), ot.register(F, C, T, w, e), nt.register(F, C, T, w), it.register(F, C, T, w, e), at.register(F, C, T, w, e), lt.register(F, C, T, w), st.register(F, C, T, w, e), ut.register(F, C, T, w), ar.register(F, C, T, w), ct.register(F, C, T, w), dt.register(F, C, T, w), Kt.register(F, C, T, w), mt.register(F, C, T, w), ft.register(F, C, T, w, e), gt.register(F, C, T, w, e), ht.register(F, C, T, w, e), vt.register(F, C, T, w), yt.register(F, C, T, w, e), bt.register(F, C, T, w), Ft.register(F, C, T, w), Ct.register(F, C, T, w), Tt.register(F, C, T, w, e), kt.register(F, C, T, w), wt.register(F, C, T, w, e), xt.register(F, C, T, w), Vt.register(F, C, T, w), St.register(F, C, T, w), Et.register(F, C, T, w, e), It.register(F, C, T, w, e), Lt.register(F, C, T, w), Ot.register(F, C, T, w, e), Bt.register(F, C, T, w), Pt.register(F, C, T, w), Yt.register(F, C, T), Mt.register(F, C, T, w), Nt.register(F, C, T, w, e), jt.register(F, C, T, w), Gt.register(F, C, T, w), qt.register(F, C, T, w), At.register(F, C, T, w, e), tr.register(F, C, T, w), $t.register(F, C, T, w, e), Rt.register(F, C, T, w), zt.register(F, C, T, w), Ut.register(F, C, T, w, e), Wt.register(F, C, T, w), Zt.register(F, C, T, w), _t.register(F, C, T, w), Jt.register(F, C, T, w), Qt.register(F, C, T, w), Xt.register(F, C, T, w, e), Ht.register(F, C, T, w), pt.register(F, C, T, w), Dt.register(F, C, T, w), er.register(F, C, T, w, e), rr.register(F, C, T, w), nr.register(F, C, T, w), or.register(F, C, T, w), ir.register(F, C, T, w), lr.register(F, C, T, w), sr.register(F, C, T, w, e), ur.register(F, C, T, w), cr.register(F, C, T, w), dr.register(F, C, T, w), pr.register(F, C, T, w, e), mr.register(F, C, T, w, e), fr.register(F, C, T, w);
834
- const t = window[qr];
1422
+ wt.register(T, k, x, S), Vt.register(T, k, x, S), xt.register(T, k, x, S), St.register(T, k, x, S), Et.register(T, k, x, S, e), Pt.register(T, k, x, S), Ee.register(T, k, x, S, e), Pe.register(T, k, x, S, e), Ee.register(T, k, x, S, e), Pe.register(T, k, x, S, e), ve.register(T, k, x, S, e), Ot.register(T, k, x, S), It.register(T, k, x, S), Lt.register(T, k, x, S, e), Mt.register(T, k, x, S), Nt.register(T, k, x, S, e), Bt.register(T, k, x, S, e), jt.register(T, k, x, S), $t.register(T, k, x, S, e), At.register(T, k, x, S), jn.register(T, k, x, S), Rt.register(T, k, x, S), qt.register(T, k, x, S), Pn.register(T, k, x, S), Ut.register(T, k, x, S), zt.register(T, k, x, S, e), Wt.register(T, k, x, S, e), Jt.register(T, k, x, S, e), Zt.register(T, k, x, S), _t.register(T, k, x, S, e), Qt.register(T, k, x, S), Xt.register(T, k, x, S), Yt.register(T, k, x, S), Ht.register(T, k, x, S, e), Dt.register(T, k, x, S), Kt.register(T, k, x, S, e), en.register(T, k, x, S), tn.register(T, k, x, S), nn.register(T, k, x, S), on.register(T, k, x, S, e), rn.register(T, k, x, S, e), sn.register(T, k, x, S), ln.register(T, k, x, S, e), un.register(T, k, x, S), an.register(T, k, x, S), xn.register(T, k, x), cn.register(T, k, x, S), dn.register(T, k, x, S, e), pn.register(T, k, x, S), mn.register(T, k, x, S), fn.register(T, k, x, S), gn.register(T, k, x, S, e), In.register(T, k, x, S), vn.register(T, k, x, S, e), yn.register(T, k, x, S), hn.register(T, k, x, S), bn.register(T, k, x, S, e), Fn.register(T, k, x, S), Cn.register(T, k, x, S), kn.register(T, k, x, S), Tn.register(T, k, x, S), Vn.register(T, k, x, S), wn.register(T, k, x, S, e), Sn.register(T, k, x, S), Gt.register(T, k, x, S), En.register(T, k, x, S), On.register(T, k, x, S, e), Mn.register(T, k, x, S), Ln.register(T, k, x, S), Nn.register(T, k, x, S), Bn.register(T, k, x, S), $n.register(T, k, x, S), An.register(T, k, x, S, e), Rn.register(T, k, x, S), qn.register(T, k, x, S), Gn.register(T, k, x, S), Un.register(T, k, x, S, e), zn.register(T, k, x, S, e), Wn.register(T, k, x, S);
1423
+ const t = window[So];
835
1424
  if (t)
836
- for (const r in t)
837
- t[r].createPropsResolver = br, t[r].register(F, C, T);
1425
+ for (const n in t)
1426
+ t[n].createPropsResolver = Fe, t[n].register(T, k, x);
838
1427
  }
839
1428
  }
840
- function $r() {
841
- Ar();
1429
+ function Qe() {
1430
+ Eo();
842
1431
  function e(i) {
843
- const u = F[i];
1432
+ const u = T[i];
844
1433
  if (!u)
845
1434
  throw new Error(`Could not find the editor of type '${i}'`);
846
1435
  return u;
847
1436
  }
848
1437
  function t(i, u) {
849
- const S = C[i];
850
- return S ? S(u) : {};
1438
+ const V = k[i];
1439
+ return V ? V(u) : {};
851
1440
  }
852
- function r(i) {
1441
+ function n(i) {
853
1442
  switch (i) {
854
1443
  case "check-box":
855
1444
  return "onChangeValue";
@@ -924,7 +1513,7 @@ function $r() {
924
1513
  return "onUpdate:modelValue";
925
1514
  }
926
1515
  }
927
- function n(i) {
1516
+ function o(i) {
928
1517
  switch (i) {
929
1518
  case "combo-list":
930
1519
  case "input-group":
@@ -932,23 +1521,23 @@ function $r() {
932
1521
  return "onClear";
933
1522
  }
934
1523
  }
935
- function o(i) {
1524
+ function r(i) {
936
1525
  switch (i) {
937
1526
  case "input-group":
938
1527
  case "textarea":
939
1528
  return "onMousedownEvent";
940
1529
  }
941
1530
  }
942
- function p(i) {
1531
+ function c(i) {
943
1532
  switch (i) {
944
1533
  case "input-group":
945
1534
  case "textarea":
946
1535
  return "onMouseupEvent";
947
1536
  }
948
1537
  }
949
- return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: r, getClearFunctionName: n, getMousedownFunctionName: o, getMouseupFunctionName: p };
1538
+ return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: o, getMousedownFunctionName: r, getMouseupFunctionName: c };
950
1539
  }
951
- const Rr = {
1540
+ const Po = {
952
1541
  /**
953
1542
  * 显示的错误信息
954
1543
  */
@@ -956,128 +1545,198 @@ const Rr = {
956
1545
  type: Object,
957
1546
  default: null
958
1547
  }
959
- }, zr = /* @__PURE__ */ Q({
1548
+ }, Oo = /* @__PURE__ */ ee({
960
1549
  name: "FValidationMessage",
961
- props: Rr,
1550
+ props: Po,
962
1551
  emits: [],
963
1552
  setup(e, t) {
964
- const r = M(e.errors);
965
- _(() => e.errors, (p) => {
966
- r.value = p;
1553
+ const n = B(e.errors);
1554
+ D(() => e.errors, (c) => {
1555
+ n.value = c;
967
1556
  });
968
- const n = M(!0), o = W(() => {
969
- if (r.value) {
970
- const p = Object.keys(r.value).map((i) => {
1557
+ const o = B(!0), r = Q(() => {
1558
+ if (n.value) {
1559
+ const c = Object.keys(n.value).map((i) => {
971
1560
  var u;
972
- return (u = r.value[i]) == null ? void 0 : u.name;
1561
+ return (u = n.value[i]) == null ? void 0 : u.name;
973
1562
  });
974
- return p.length ? p.join(" ") : "";
1563
+ return c.length ? c.join(" ") : "";
975
1564
  }
976
1565
  return "";
977
1566
  });
978
- return () => o.value && B("div", {
1567
+ return () => r.value && L("div", {
979
1568
  class: "farris-feedback f-state-invalid",
980
- onClick: () => n.value = !n.value
981
- }, [!n.value && B("span", {
1569
+ onClick: () => o.value = !o.value
1570
+ }, [!o.value && L("span", {
982
1571
  class: "f-icon f-icon-message_warning f-feedback-icon"
983
- }, null), n.value && B("span", {
1572
+ }, null), o.value && L("span", {
984
1573
  class: "f-feedback-message"
985
- }, [o.value])]);
1574
+ }, [r.value])]);
986
1575
  }
987
- }), se = /* @__PURE__ */ Q({
1576
+ }), ye = /* @__PURE__ */ ee({
988
1577
  name: "FDynamicFormGroup",
989
- props: Oe,
1578
+ props: _e,
990
1579
  emits: ["change", "update:modelValue"],
991
1580
  setup(e, t) {
992
- var O;
993
- const r = M(e.id), n = M(e.customClass), o = M(e.editor), p = M(e.label), i = M(e.modelValue), u = M(e.readonly), S = M(((O = e.editor) == null ? void 0 : O.required) || e.required), g = M(e.showLabel), v = M(e.visible);
994
- M(e.type);
995
- const a = M(), s = M(e.errors), y = Je(), m = M(e.editor.type || "input-group"), f = W(() => g.value ? e.showLabelType : "none"), {
996
- resolveEditorProps: E,
997
- resolveEditorType: c,
998
- getChangeFunctionName: b,
999
- getClearFunctionName: x
1000
- } = $r(), j = W(() => {
1001
- const k = {
1581
+ var N;
1582
+ const n = B(e.id), o = B(e.customClass), r = B(e.editor), c = B(e.label), i = B(e.modelValue), u = B(e.readonly), V = B(((N = e.editor) == null ? void 0 : N.required) || e.required), d = B(e.showLabel), v = B(e.visible);
1583
+ B(e.type);
1584
+ const s = B(), a = B(e.errors), h = ut(), y = B(e.editor.type || "input-group"), b = Q(() => d.value ? e.showLabelType : "none"), {
1585
+ resolveEditorProps: P,
1586
+ resolveEditorType: m,
1587
+ getChangeFunctionName: f,
1588
+ getClearFunctionName: F
1589
+ } = Qe(), j = Q(() => {
1590
+ const w = {
1002
1591
  "form-group": !0,
1003
1592
  "farris-form-group": !0,
1004
1593
  "common-group": !0,
1005
1594
  "q-state-readonly": u.value,
1006
- "form-group--in-mobile": y
1595
+ "form-group--in-mobile": h
1007
1596
  };
1008
- return k["form-group--has-" + m.value] = !0, k;
1009
- }), $ = W(() => {
1597
+ return w["form-group--has-" + y.value] = !0, w;
1598
+ }), A = Q(() => {
1010
1599
  if (e.fill)
1011
1600
  return {
1012
1601
  maxWidth: "none"
1013
1602
  };
1014
1603
  });
1015
- function G(k, P, I) {
1016
- i.value = P !== void 0 ? P : k, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
1017
- newValue: k,
1018
- newModelValue: P,
1604
+ function q(w, M, I) {
1605
+ i.value = M !== void 0 ? M : w, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
1606
+ newValue: w,
1607
+ newModelValue: M,
1019
1608
  parameters: I
1020
1609
  });
1021
1610
  }
1022
- function U() {
1611
+ function _() {
1023
1612
  t.emit("update:modelValue", "");
1024
1613
  }
1025
- function R(k) {
1026
- return (...P) => {
1027
- U(), typeof k == "function" && k(...P);
1614
+ function J(w) {
1615
+ return (...M) => {
1616
+ _(), typeof w == "function" && w(...M);
1028
1617
  };
1029
1618
  }
1030
- function l(k) {
1031
- return (P, I, A) => {
1032
- G(P, I, A), typeof k == "function" && k(P, I, A);
1619
+ function l(w) {
1620
+ return (M, I, U) => {
1621
+ q(M, I, U), typeof w == "function" && w(M, I, U);
1033
1622
  };
1034
1623
  }
1035
- const d = W(() => {
1036
- const k = o.value.type || "input-group", P = c(k), I = E(k, o.value), A = b(k), q = x(o.value.type);
1037
- return q && (I[q] = R(I[q])), A && (I[A] = l(I[A])), (I.id == null || I.id === "") && (I.id = r.value), k === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (I.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (I.onEndValueChange = o.value.onEndValueChange)) : k === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (I["onUpdate:idValue"] = o.value["onUpdate:idValue"], I.id = r.value) : k === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? I.onSelectionChange = o.value.onSelectionChange : k === "property-editor" && (I.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => B(P, pe({
1038
- ref: a
1624
+ const g = Q(() => {
1625
+ const w = r.value.type || "input-group", M = m(w), I = P(w, r.value), U = f(w), W = F(r.value.type);
1626
+ return W && (I[W] = J(I[W])), U && (I[U] = l(I[U])), (I.id == null || I.id === "") && (I.id = n.value), w === "number-range" && r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" ? (r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" && (I.onBeginValueChange = r.value.onBeginValueChange), r.value.onEndValueChange && typeof r.value.onEndValueChange == "function" && (I.onEndValueChange = r.value.onEndValueChange)) : w === "lookup" && r.value["onUpdate:idValue"] && typeof r.value["onUpdate:idValue"] == "function" ? (I["onUpdate:idValue"] = r.value["onUpdate:idValue"], I.id = n.value) : w === "collection-property-editor" && r.value.onSelectionChange && typeof r.value.onSelectionChange == "function" ? I.onSelectionChange = r.value.onSelectionChange : w === "property-editor" && (I.onBeforeOpenVariables = r.value.onBeforeOpenVariables), () => L(M, de({
1627
+ ref: s
1039
1628
  }, I, {
1040
1629
  modelValue: i.value,
1041
- "onUpdate:modelValue": (Z) => i.value = Z
1630
+ "onUpdate:modelValue": (p) => i.value = p
1042
1631
  }), t.slots);
1043
1632
  });
1044
- function V() {
1045
- return B(zr, {
1046
- id: `${r.value}-validation-message`,
1047
- errors: s.value
1633
+ function E() {
1634
+ return L(Oo, {
1635
+ id: `${n.value}-validation-message`,
1636
+ errors: a.value
1048
1637
  }, null);
1049
1638
  }
1050
- return _([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([k, P, I, A, q, Z, J, H, K, ee]) => {
1051
- var N;
1052
- r.value = k, n.value = P, o.value = I, p.value = A, i.value = q, u.value = Z, S.value = ((N = o.value) == null ? void 0 : N.required) || J, g.value = H, v.value = K, s.value = ee;
1639
+ return D([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([w, M, I, U, W, p, $, G, Z, H]) => {
1640
+ var R;
1641
+ n.value = w, o.value = M, r.value = I, c.value = U, i.value = W, u.value = p, V.value = ((R = r.value) == null ? void 0 : R.required) || $, d.value = G, v.value = Z, a.value = H;
1053
1642
  }), t.expose({
1054
- editorRef: a
1055
- }), () => v.value && B("div", {
1056
- id: `${r.value}-form-group`,
1057
- class: n.value,
1643
+ editorRef: s
1644
+ }), () => v.value && L("div", {
1645
+ id: `${n.value}-form-group`,
1646
+ class: o.value,
1058
1647
  style: e.customStyle
1059
- }, [B("div", {
1648
+ }, [L("div", {
1060
1649
  class: "farris-group-wrap",
1061
- style: $.value
1062
- }, [B("div", {
1650
+ style: A.value
1651
+ }, [L("div", {
1063
1652
  class: j.value
1064
- }, [B(Gr, {
1065
- id: `${r.value}-lable`,
1066
- showType: f.value,
1067
- required: S.value,
1068
- text: p.value,
1069
- title: p.value
1070
- }, null), B("div", {
1653
+ }, [L(xo, {
1654
+ id: `${n.value}-lable`,
1655
+ showType: b.value,
1656
+ required: V.value,
1657
+ text: c.value,
1658
+ title: c.value
1659
+ }, null), L("div", {
1071
1660
  class: "farris-input-wrap"
1072
- }, [d.value(), V()])])])]);
1661
+ }, [g.value(), E()])])])]);
1662
+ }
1663
+ }), Io = {
1664
+ id: { type: String, default: "" },
1665
+ /** 筛选组件配置器,具体配置项可查看各组件文档 */
1666
+ editor: { type: Object, default: {} },
1667
+ /** value is uncertain because type is uncertain, default value should not be set */
1668
+ modelValue: { type: [String, Boolean, Array, Number] },
1669
+ /**
1670
+ * 作为内嵌编辑器被创建后默认获得焦点
1671
+ */
1672
+ focusOnCreated: { type: Boolean, default: !1 },
1673
+ /**
1674
+ * 作为内嵌编辑器被创建后默认选中文本
1675
+ */
1676
+ selectOnCreated: { type: Boolean, default: !1 }
1677
+ }, Me = /* @__PURE__ */ ee({
1678
+ name: "FDynamicFormInput",
1679
+ props: Io,
1680
+ emits: ["change", "update:modelValue", "mousedown", "mouseup"],
1681
+ setup(e, t) {
1682
+ const n = B(e.id), o = B(e.editor), r = B(e.modelValue), {
1683
+ resolveEditorProps: c,
1684
+ resolveEditorType: i,
1685
+ getChangeFunctionName: u,
1686
+ getMousedownFunctionName: V,
1687
+ getMouseupFunctionName: d,
1688
+ getClearFunctionName: v
1689
+ } = Qe();
1690
+ function s(f, F, j) {
1691
+ r.value = F !== void 0 ? F : f, t.emit("update:modelValue", r.value), t.emit("change", r.value, {
1692
+ newValue: f,
1693
+ newModelValue: F,
1694
+ parameters: j
1695
+ });
1696
+ }
1697
+ function a(f) {
1698
+ t.emit("mousedown", f);
1699
+ }
1700
+ function h(f) {
1701
+ t.emit("mouseup", f);
1702
+ }
1703
+ function y() {
1704
+ t.emit("update:modelValue", "");
1705
+ }
1706
+ function b(f) {
1707
+ return (...F) => {
1708
+ y(), typeof f == "function" && f(...F);
1709
+ };
1710
+ }
1711
+ function P(f) {
1712
+ return (F, j, A) => {
1713
+ s(F, j, A), typeof f == "function" && f(F, j, A);
1714
+ };
1715
+ }
1716
+ const m = Q(() => {
1717
+ const f = i(o.value.type), F = c(o.value.type, o.value);
1718
+ F.focusOnCreated = e.focusOnCreated, F.selectOnCreated = e.selectOnCreated;
1719
+ const j = u(o.value.type), A = v(o.value.type);
1720
+ A && (F[A] = b(F[A])), j && (F[j] = P(F[j]));
1721
+ const q = V(o.value.type);
1722
+ F[q] = a;
1723
+ const _ = d(o.value.type);
1724
+ return F[_] = h, F.id = n.value, () => L(f, de(F, {
1725
+ modelValue: r.value,
1726
+ "onUpdate:modelValue": (J) => r.value = J
1727
+ }), null);
1728
+ });
1729
+ return D([() => e.id, () => e.editor, () => e.modelValue], ([f, F, j]) => {
1730
+ n.value = f, o.value = F, r.value = j;
1731
+ }), () => m.value();
1073
1732
  }
1074
1733
  });
1075
- ie.install = (e) => {
1076
- e.component(ie.name, ie).component(se.name, se);
1734
+ le.install = (e) => {
1735
+ e.component(Ie.name, Ie).component(Me.name, Me).component(le.name, le).component(ye.name, ye);
1077
1736
  };
1078
- var Ur = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(Ur || {}), Be = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(Be || {});
1079
- function Wr() {
1080
- const { getLocaleValue: e } = ne;
1737
+ var Mo = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(Mo || {}), Xe = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(Xe || {});
1738
+ function Lo() {
1739
+ const { getLocaleValue: e } = ae;
1081
1740
  return { conditionListLocale: {
1082
1741
  // 添加条件
1083
1742
  add: e("condition.add"),
@@ -1089,8 +1748,8 @@ function Wr() {
1089
1748
  or: e("condition.or")
1090
1749
  } };
1091
1750
  }
1092
- function Zr() {
1093
- const { getLocaleValue: e } = ne;
1751
+ function No() {
1752
+ const { getLocaleValue: e } = ae;
1094
1753
  return { operatorsLocale: {
1095
1754
  equal: e("operators.equal"),
1096
1755
  notEqual: e("operators.notEqual"),
@@ -1103,9 +1762,9 @@ function Zr() {
1103
1762
  endWith: e("operators.endWith")
1104
1763
  } };
1105
1764
  }
1106
- var Me = /* @__PURE__ */ ((e) => (e.Equal = "0", e.NotEqual = "1", e.Greater = "2", e.GreaterOrEqual = "3", e.Less = "4", e.LessOrEqual = "5", e.Like = "6", e.LikeStartWith = "7", e.LikeEndWith = "8", e.In = "9", e.NotIn = "10", e))(Me || {});
1107
- function Jr() {
1108
- const { operatorsLocale: e } = Zr();
1765
+ var Ye = /* @__PURE__ */ ((e) => (e.Equal = "0", e.NotEqual = "1", e.Greater = "2", e.GreaterOrEqual = "3", e.Less = "4", e.LessOrEqual = "5", e.Like = "6", e.LikeStartWith = "7", e.LikeEndWith = "8", e.In = "9", e.NotIn = "10", e))(Ye || {});
1766
+ function Bo() {
1767
+ const { operatorsLocale: e } = No();
1109
1768
  return [
1110
1769
  {
1111
1770
  value: "0",
@@ -1154,7 +1813,7 @@ function Jr() {
1154
1813
  }
1155
1814
  ];
1156
1815
  }
1157
- const _r = {
1816
+ const jo = {
1158
1817
  "button-edit": ["0", "1", " 6", "7", "8"],
1159
1818
  "check-box": ["0"],
1160
1819
  "combo-list": ["0", "1"],
@@ -1174,398 +1833,398 @@ const _r = {
1174
1833
  "radio-group": ["0"],
1175
1834
  text: ["0", "1", " 6", "7", "8"]
1176
1835
  };
1177
- function Qr(e, t, r) {
1178
- const { fieldMap: n } = r;
1179
- function o(p) {
1180
- const i = n.get(p.fieldCode);
1836
+ function $o(e, t, n) {
1837
+ const { fieldMap: o } = n;
1838
+ function r(c) {
1839
+ const i = o.get(c.fieldCode);
1181
1840
  if (!i)
1182
1841
  return [];
1183
- const u = i.editor.type, S = new Set(_r[u]);
1184
- return Jr().filter((v) => S.has(v.value));
1842
+ const u = i.editor.type, V = new Set(jo[u]);
1843
+ return Bo().filter((v) => V.has(v.value));
1185
1844
  }
1186
- return { getCompareOperators: o };
1845
+ return { getCompareOperators: r };
1187
1846
  }
1188
- function Xr() {
1189
- const e = M({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1190
- let n = 0;
1191
- function o() {
1847
+ function Ao() {
1848
+ const e = B({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
1849
+ let o = 0;
1850
+ function r() {
1192
1851
  return {
1193
1852
  id: "",
1194
1853
  fieldCode: "",
1195
1854
  fieldName: "",
1196
- compareType: Me.Equal,
1197
- valueType: Be.Value,
1198
- value: new Ee(),
1855
+ compareType: Ye.Equal,
1856
+ valueType: Xe.Value,
1857
+ value: new Ge(),
1199
1858
  relation: 0,
1200
1859
  conditionId: Date.now()
1201
1860
  };
1202
1861
  }
1203
- function p(l, d) {
1204
- return { relation: l, items: [], children: [], path: [], groupId: ++n, level: d };
1862
+ function c(l, g) {
1863
+ return { relation: l, items: [], children: [], path: [], groupId: ++o, level: g };
1205
1864
  }
1206
1865
  function i() {
1207
1866
  const l = Object.assign({}, e.value);
1208
- r.forEach((d, V) => {
1209
- d.groupId === l.groupId && r.set(V, l);
1210
- }), t.forEach((d, V) => {
1211
- d.groupId === l.groupId && t.set(V, l);
1867
+ n.forEach((g, E) => {
1868
+ g.groupId === l.groupId && n.set(E, l);
1869
+ }), t.forEach((g, E) => {
1870
+ g.groupId === l.groupId && t.set(E, l);
1212
1871
  }), e.value = l;
1213
1872
  }
1214
1873
  function u(l) {
1215
- const d = /* @__PURE__ */ new Map();
1216
- let V = 0;
1217
- return l.forEach((O, k) => {
1218
- var P, I;
1219
- if (V += ((P = O.lBracket) == null ? void 0 : P.length) || 0, d.set(k, V), V -= ((I = O.rBracket) == null ? void 0 : I.length) || 0, V < 0)
1874
+ const g = /* @__PURE__ */ new Map();
1875
+ let E = 0;
1876
+ return l.forEach((N, w) => {
1877
+ var M, I;
1878
+ if (E += ((M = N.lBracket) == null ? void 0 : M.length) || 0, g.set(w, E), E -= ((I = N.rBracket) == null ? void 0 : I.length) || 0, E < 0)
1220
1879
  throw new Error("The right bracket is out of range.");
1221
- }), d;
1880
+ }), g;
1222
1881
  }
1223
- function S(l, d, V, O, k) {
1224
- for (let P = 0; P < d; P++) {
1225
- const I = l + (P + 1), A = p(k, I);
1226
- V.children.push(A), r.set(A.groupId, V), V = V.children[V.children.length - 1], O.push(V);
1882
+ function V(l, g, E, N, w) {
1883
+ for (let M = 0; M < g; M++) {
1884
+ const I = l + (M + 1), U = c(w, I);
1885
+ E.children.push(U), n.set(U.groupId, E), E = E.children[E.children.length - 1], N.push(E);
1227
1886
  }
1228
- return V;
1887
+ return E;
1229
1888
  }
1230
- function g(l, d, V, O, k) {
1231
- for (let q = d; q <= 0; q++)
1232
- O.pop();
1233
- const P = O[O.length - 1];
1234
- if (!P)
1889
+ function d(l, g, E, N, w) {
1890
+ for (let W = g; W <= 0; W++)
1891
+ N.pop();
1892
+ const M = N[N.length - 1];
1893
+ if (!M)
1235
1894
  throw new Error("The group path is out of range");
1236
- const I = l + d, A = p(k, I);
1237
- return P.children.push(A), r.set(A.groupId, P), V = P.children[P.children.length - 1], O.push(V), V;
1895
+ const I = l + g, U = c(w, I);
1896
+ return M.children.push(U), n.set(U.groupId, M), E = M.children[M.children.length - 1], N.push(E), E;
1238
1897
  }
1239
- function v(l, d, V, O) {
1240
- V.pop();
1241
- const k = V[V.length - 1], P = p(O, l);
1242
- return k.children.push(P), r.set(P.groupId, k), d = k.children[k.children.length - 1], V.push(d), d;
1898
+ function v(l, g, E, N) {
1899
+ E.pop();
1900
+ const w = E[E.length - 1], M = c(N, l);
1901
+ return w.children.push(M), n.set(M.groupId, w), g = w.children[w.children.length - 1], E.push(g), g;
1243
1902
  }
1244
- function a(l, d, V, O, k, P) {
1903
+ function s(l, g, E, N, w, M) {
1245
1904
  let I = l[l.length - 1];
1246
1905
  if (!I)
1247
1906
  throw new Error("The group path is out of range");
1248
- const A = d.get(O) || 0, q = d.get(V) || 0;
1249
- if (V < 0 || V === O)
1907
+ const U = g.get(N) || 0, W = g.get(E) || 0;
1908
+ if (E < 0 || E === N)
1250
1909
  return l[l.length - 1];
1251
- const Z = A - q, J = k && k.relation !== void 0 ? k.relation : 1;
1252
- return I = Z > 0 ? S(q, Z, I, l, J) : I, I = Z < 0 ? g(q, Z, I, l, J) : I, I = Z === 0 && q > 0 && A > 0 && k && P && !!k.rBracket && !!P.lBracket ? v(q, I, l, J) : I, I;
1253
- }
1254
- function s(l) {
1255
- const V = { relation: l.length && l[0].relation !== void 0 ? l[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, O = [V], k = u(l);
1256
- return l.forEach((P, I) => {
1257
- const A = I - 1, q = l[A], Z = a(O, k, A, I, q, P);
1258
- Z.items.push(P), t.set(P.conditionId, Z);
1259
- }), e.value = V, V;
1260
- }
1261
- function y() {
1262
- const l = o();
1910
+ const p = U - W, $ = w && w.relation !== void 0 ? w.relation : 1;
1911
+ return I = p > 0 ? V(W, p, I, l, $) : I, I = p < 0 ? d(W, p, I, l, $) : I, I = p === 0 && W > 0 && U > 0 && w && M && !!w.rBracket && !!M.lBracket ? v(W, I, l, $) : I, I;
1912
+ }
1913
+ function a(l) {
1914
+ const E = { relation: l.length && l[0].relation !== void 0 ? l[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, N = [E], w = u(l);
1915
+ return l.forEach((M, I) => {
1916
+ const U = I - 1, W = l[U], p = s(N, w, U, I, W, M);
1917
+ p.items.push(M), t.set(M.conditionId, p);
1918
+ }), e.value = E, E;
1919
+ }
1920
+ function h() {
1921
+ const l = r();
1263
1922
  t.set(l.conditionId, e.value), e.value.items.push(l);
1264
1923
  }
1265
- function m(l) {
1924
+ function y(l) {
1266
1925
  if (!l)
1267
1926
  return;
1268
- const d = t.get(l.conditionId);
1269
- if (d) {
1270
- const V = d.items.findIndex((k) => k.conditionId === l.conditionId) + 1, O = o();
1271
- t.set(O.conditionId, d), d.items.splice(V, 0, O), i();
1927
+ const g = t.get(l.conditionId);
1928
+ if (g) {
1929
+ const E = g.items.findIndex((w) => w.conditionId === l.conditionId) + 1, N = r();
1930
+ t.set(N.conditionId, g), g.items.splice(E, 0, N), i();
1272
1931
  }
1273
1932
  }
1274
- function f(l, d, V, O) {
1275
- l.reduce((k, P) => {
1276
- const I = P.conditionId !== void 0, A = P.groupId !== void 0;
1933
+ function b(l, g, E, N) {
1934
+ l.reduce((w, M) => {
1935
+ const I = M.conditionId !== void 0, U = M.groupId !== void 0;
1277
1936
  if (I) {
1278
- const q = P;
1279
- V.push(q), k.items.set(q.conditionId, q);
1937
+ const W = M;
1938
+ E.push(W), w.items.set(W.conditionId, W);
1280
1939
  }
1281
- if (A) {
1282
- const q = P;
1283
- O.push(q), k.groups.set(q.groupId, q);
1940
+ if (U) {
1941
+ const W = M;
1942
+ N.push(W), w.groups.set(W.groupId, W);
1284
1943
  }
1285
- return k;
1286
- }, d);
1944
+ return w;
1945
+ }, g);
1287
1946
  }
1288
- function E(l, d, V, O, k) {
1289
- l && (l.items = d.length ? l.items.filter((P) => !V.has(P.conditionId)) : l.items, l.children = O.length ? l.children.filter((P) => !k.has(P.groupId)) : l.children);
1947
+ function P(l, g, E, N, w) {
1948
+ l && (l.items = g.length ? l.items.filter((M) => !E.has(M.conditionId)) : l.items, l.children = N.length ? l.children.filter((M) => !w.has(M.groupId)) : l.children);
1290
1949
  }
1291
- function c(l, d, V) {
1292
- d.forEach((O) => {
1293
- l.items.push(O), t.set(O.conditionId, l);
1294
- }), V.forEach((O) => {
1295
- l.children.push(O), r.set(O.groupId, l);
1950
+ function m(l, g, E) {
1951
+ g.forEach((N) => {
1952
+ l.items.push(N), t.set(N.conditionId, l);
1953
+ }), E.forEach((N) => {
1954
+ l.children.push(N), n.set(N.groupId, l);
1296
1955
  });
1297
1956
  }
1298
- function b(l) {
1299
- const d = l[0], V = d.conditionId !== void 0 ? t.get(d.conditionId) : r.get(d.groupId), O = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, k = [], P = [];
1300
- if (V) {
1301
- f(l, O, k, P), E(V, k, O.items, P, O.groups);
1302
- const I = p(V.relation, V.level + 1);
1303
- c(I, k, P), V.children.push(I), r.set(I.groupId, V), i();
1957
+ function f(l) {
1958
+ const g = l[0], E = g.conditionId !== void 0 ? t.get(g.conditionId) : n.get(g.groupId), N = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, w = [], M = [];
1959
+ if (E) {
1960
+ b(l, N, w, M), P(E, w, N.items, M, N.groups);
1961
+ const I = c(E.relation, E.level + 1);
1962
+ m(I, w, M), E.children.push(I), n.set(I.groupId, E), i();
1304
1963
  }
1305
1964
  }
1306
- function x(l) {
1307
- const d = [...l.items], V = [...l.children], O = r.get(l.groupId);
1308
- O && (O.children = O.children.filter((k) => k.groupId !== l.groupId), r.delete(l.groupId), d.forEach((k) => {
1309
- O.items.push(k), t.set(k.conditionId, O);
1310
- }), V.forEach((k) => {
1311
- O.children.push(k), r.set(k.groupId, O);
1965
+ function F(l) {
1966
+ const g = [...l.items], E = [...l.children], N = n.get(l.groupId);
1967
+ N && (N.children = N.children.filter((w) => w.groupId !== l.groupId), n.delete(l.groupId), g.forEach((w) => {
1968
+ N.items.push(w), t.set(w.conditionId, N);
1969
+ }), E.forEach((w) => {
1970
+ N.children.push(w), n.set(w.groupId, N);
1312
1971
  }), i());
1313
1972
  }
1314
1973
  function j(l) {
1315
1974
  l.relation = l.relation === 1 ? 2 : 1, i();
1316
1975
  }
1317
- let $;
1318
- function G(l) {
1319
- const { relation: d } = l;
1320
- return (l.children && l.children.length ? l.children.map((O, k, P) => {
1321
- const I = $(O);
1322
- return I[0].lBracket = (I[0].lBracket || "") + "(", I[I.length - 1].rBracket = (I[I.length - 1].rBracket || "") + ")", I[I.length - 1].relation = k < P.length - 1 ? d : 0, I;
1976
+ let A;
1977
+ function q(l) {
1978
+ const { relation: g } = l;
1979
+ return (l.children && l.children.length ? l.children.map((N, w, M) => {
1980
+ const I = A(N);
1981
+ return I[0].lBracket = (I[0].lBracket || "") + "(", I[I.length - 1].rBracket = (I[I.length - 1].rBracket || "") + ")", I[I.length - 1].relation = w < M.length - 1 ? g : 0, I;
1323
1982
  }) : []).flat();
1324
1983
  }
1325
- $ = (l = e.value) => {
1326
- const { relation: d } = l, V = l.items.map((k, P, I) => (k.lBracket = P === 0 ? "(" : "", k.rBracket = P === I.length - 1 ? ")" : "", k.relation = P < I.length - 1 ? d || 1 : 0, k)), O = G(l);
1327
- return [...V, ...O];
1984
+ A = (l = e.value) => {
1985
+ const { relation: g } = l, E = l.items.map((w, M, I) => (w.lBracket = M === 0 ? "(" : "", w.rBracket = M === I.length - 1 ? ")" : "", w.relation = M < I.length - 1 ? g || 1 : 0, w)), N = q(l);
1986
+ return [...E, ...N];
1328
1987
  };
1329
- function U(l) {
1330
- const d = l || e.value;
1331
- if (d.children.length && d.children.forEach((V) => {
1332
- U(V);
1333
- }), d.level === 0 && !d.items.length && d.children.length === 1) {
1334
- const V = d.children[0];
1335
- e.value.relation = V.relation, x(V);
1336
- } else d.items.length === 0 && d.children.length <= 1 && x(d);
1337
- }
1338
- function R(l) {
1339
- const d = t.get(l.conditionId);
1340
- d && (d.items = d.items.filter((V) => V.conditionId !== l.conditionId), t.delete(l.conditionId), U(), i());
1988
+ function _(l) {
1989
+ const g = l || e.value;
1990
+ if (g.children.length && g.children.forEach((E) => {
1991
+ _(E);
1992
+ }), g.level === 0 && !g.items.length && g.children.length === 1) {
1993
+ const E = g.children[0];
1994
+ e.value.relation = E.relation, F(E);
1995
+ } else g.items.length === 0 && g.children.length <= 1 && F(g);
1996
+ }
1997
+ function J(l) {
1998
+ const g = t.get(l.conditionId);
1999
+ g && (g.items = g.items.filter((E) => E.conditionId !== l.conditionId), t.delete(l.conditionId), _(), i());
1341
2000
  }
1342
2001
  return {
1343
- addCondition: y,
2002
+ addCondition: h,
1344
2003
  changeGroupRelation: j,
1345
2004
  conditionGroupMap: t,
1346
- getConditions: $,
1347
- group: b,
1348
- groupParentMap: r,
1349
- insertConditionTo: m,
1350
- loadConditionGroup: s,
2005
+ getConditions: A,
2006
+ group: f,
2007
+ groupParentMap: n,
2008
+ insertConditionTo: y,
2009
+ loadConditionGroup: a,
1351
2010
  refresh: i,
1352
- removeCondition: R,
2011
+ removeCondition: J,
1353
2012
  rootGroup: e,
1354
- unGroup: x
2013
+ unGroup: F
1355
2014
  };
1356
2015
  }
1357
- function Yr(e, t, r) {
1358
- const n = M(/* @__PURE__ */ new Set()), o = M(/* @__PURE__ */ new Set()), { conditionGroupMap: p, groupParentMap: i } = r;
1359
- let u, S;
1360
- function g(c) {
1361
- let b = u.level <= c.level ? u : c, x = u.level > c.level ? u : c;
2016
+ function Ro(e, t, n) {
2017
+ const o = B(/* @__PURE__ */ new Set()), r = B(/* @__PURE__ */ new Set()), { conditionGroupMap: c, groupParentMap: i } = n;
2018
+ let u, V;
2019
+ function d(m) {
2020
+ let f = u.level <= m.level ? u : m, F = u.level > m.level ? u : m;
1362
2021
  const j = [];
1363
- for (; x && b && x !== b; )
1364
- x.level > b.level ? (j.push(x), x = i.get(x.groupId)) : x.level === b.level && (b = i.get(b.groupId), b && j.unshift(b));
2022
+ for (; F && f && F !== f; )
2023
+ F.level > f.level ? (j.push(F), F = i.get(F.groupId)) : F.level === f.level && (f = i.get(f.groupId), f && j.unshift(f));
1365
2024
  return j;
1366
2025
  }
1367
- function v(c) {
1368
- o.value.add(c.groupId), c.items.forEach((b) => n.value.add(b.conditionId)), c.children.forEach((b) => v(b));
2026
+ function v(m) {
2027
+ r.value.add(m.groupId), m.items.forEach((f) => o.value.add(f.conditionId)), m.children.forEach((f) => v(f));
1369
2028
  }
1370
- function a(c) {
1371
- const { conditionId: b } = c;
1372
- n.value.add(b), u = n.value.size === 0 ? p.get(b) : u;
1373
- const x = p.get(c.conditionId);
1374
- g(x).forEach(($) => v($));
2029
+ function s(m) {
2030
+ const { conditionId: f } = m;
2031
+ o.value.add(f), u = o.value.size === 0 ? c.get(f) : u;
2032
+ const F = c.get(m.conditionId);
2033
+ d(F).forEach((A) => v(A));
1375
2034
  }
1376
- const s = W(() => n.value.size === 0 && o.value.size === 1), y = function(c) {
1377
- o.value.delete(c.groupId), c.items.forEach((x) => S(x)), c.children.forEach((x) => !s.value && y(x));
1378
- const b = i.get(c.groupId);
1379
- b && o.value.has(b.groupId) && y(b);
2035
+ const a = Q(() => o.value.size === 0 && r.value.size === 1), h = function(m) {
2036
+ r.value.delete(m.groupId), m.items.forEach((F) => V(F)), m.children.forEach((F) => !a.value && h(F));
2037
+ const f = i.get(m.groupId);
2038
+ f && r.value.has(f.groupId) && h(f);
1380
2039
  };
1381
- S = function(c) {
1382
- const { conditionId: b } = c;
1383
- if (n.value.has(b) && n.value.delete(b), o.value.size > 0) {
1384
- const x = p.get(b);
1385
- x && o.value.has(x.groupId) && y(x);
2040
+ V = function(m) {
2041
+ const { conditionId: f } = m;
2042
+ if (o.value.has(f) && o.value.delete(f), r.value.size > 0) {
2043
+ const F = c.get(f);
2044
+ F && r.value.has(F.groupId) && h(F);
1386
2045
  }
1387
2046
  };
1388
- function m(c) {
1389
- const { conditionId: b } = c;
1390
- n.value.size === 0 && (u = p.get(b)), n.value.has(b) ? S(c) : a(c);
2047
+ function y(m) {
2048
+ const { conditionId: f } = m;
2049
+ o.value.size === 0 && (u = c.get(f)), o.value.has(f) ? V(m) : s(m);
1391
2050
  }
1392
- function f() {
1393
- const c = [];
1394
- return u && (u.items.filter((b) => n.value.has(b.conditionId)).forEach((b) => c.push(b)), u.children.filter((b) => o.value.has(b.groupId)).forEach((b) => c.push(b))), c;
2051
+ function b() {
2052
+ const m = [];
2053
+ return u && (u.items.filter((f) => o.value.has(f.conditionId)).forEach((f) => m.push(f)), u.children.filter((f) => r.value.has(f.groupId)).forEach((f) => m.push(f))), m;
1395
2054
  }
1396
- function E() {
1397
- n.value.clear(), o.value.clear();
2055
+ function P() {
2056
+ o.value.clear(), r.value.clear();
1398
2057
  }
1399
- return { clear: E, getSelectedGroupItem: f, selectedItems: n, toggleSelect: m };
2058
+ return { clear: P, getSelectedGroupItem: b, selectedItems: o, toggleSelect: y };
1400
2059
  }
1401
- const ae = /* @__PURE__ */ Q({
2060
+ const ge = /* @__PURE__ */ ee({
1402
2061
  name: "FConditionList",
1403
- props: me,
2062
+ props: Ce,
1404
2063
  emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
1405
2064
  setup(e, t) {
1406
- const r = M(e.key), n = M(e.conditions), o = ge(e, t, "filter-bar"), {
1407
- convertToControls: p,
2065
+ const n = B(e.key), o = B(e.conditions), r = ke(e, t, "filter-bar"), {
2066
+ convertToControls: c,
1408
2067
  fields: i,
1409
2068
  fieldMap: u,
1410
- loadFieldConfigs: S
1411
- } = o, g = Xr(), {
2069
+ loadFieldConfigs: V
2070
+ } = r, d = Ao(), {
1412
2071
  addCondition: v,
1413
- changeGroupRelation: a,
1414
- getConditions: s,
1415
- group: y,
1416
- insertConditionTo: m,
1417
- loadConditionGroup: f,
1418
- refresh: E,
1419
- removeCondition: c,
1420
- rootGroup: b,
1421
- unGroup: x
1422
- } = g, {
2072
+ changeGroupRelation: s,
2073
+ getConditions: a,
2074
+ group: h,
2075
+ insertConditionTo: y,
2076
+ loadConditionGroup: b,
2077
+ refresh: P,
2078
+ removeCondition: m,
2079
+ rootGroup: f,
2080
+ unGroup: F
2081
+ } = d, {
1423
2082
  createConditionValue: j
1424
- } = Ie(), $ = Yr(e, t, g), {
1425
- selectedItems: G,
1426
- toggleSelect: U
1427
- } = $, {
1428
- getCompareOperators: R
1429
- } = Qr(e, t, o), {
2083
+ } = Ue(), A = Ro(e, t, d), {
2084
+ selectedItems: q,
2085
+ toggleSelect: _
2086
+ } = A, {
2087
+ getCompareOperators: J
2088
+ } = $o(e, t, r), {
1430
2089
  conditionListLocale: l
1431
- } = Wr();
1432
- S(!1), i.value = p(i.value), f(n.value);
1433
- function d(N) {
2090
+ } = Lo();
2091
+ V(!1), i.value = c(i.value), b(o.value);
2092
+ function g(R) {
1434
2093
  var X;
1435
- const z = ((X = u.get(N.fieldCode)) == null ? void 0 : X.editor) || {
2094
+ const z = ((X = u.get(R.fieldCode)) == null ? void 0 : X.editor) || {
1436
2095
  type: "text"
1437
2096
  };
1438
- N.value = j(z.type, void 0), t.emit("labelCodeChange", N);
2097
+ R.value = j(z.type, void 0), t.emit("labelCodeChange", R);
1439
2098
  }
1440
- function V(N, z) {
2099
+ function E(R, z) {
1441
2100
  t.emit("compareTypeChange", z);
1442
2101
  }
1443
- function O() {
2102
+ function N() {
1444
2103
  }
1445
2104
  t.expose({
1446
- getConditions: s
2105
+ getConditions: a
1447
2106
  });
1448
- function k(N, z) {
1449
- t.emit("valueChange", N, z);
2107
+ function w(R, z) {
2108
+ t.emit("valueChange", R, z);
1450
2109
  }
1451
- function P(N) {
1452
- return B("div", {
2110
+ function M(R) {
2111
+ return L("div", {
1453
2112
  class: "condition-list-item-type mr-3"
1454
- }, [B(le, {
2113
+ }, [L(ve, {
1455
2114
  "value-field": "labelCode",
1456
2115
  "text-field": "name",
1457
2116
  "id-field": "id",
1458
2117
  data: i.value,
1459
- modelValue: N.fieldCode,
1460
- "onUpdate:modelValue": (z) => N.fieldCode = z,
1461
- onChange: (z) => d(N)
2118
+ modelValue: R.fieldCode,
2119
+ "onUpdate:modelValue": (z) => R.fieldCode = z,
2120
+ onChange: (z) => g(R)
1462
2121
  }, null)]);
1463
2122
  }
1464
- function I(N) {
1465
- return B("div", {
2123
+ function I(R) {
2124
+ return L("div", {
1466
2125
  class: "condition-list-item-compare mr-3"
1467
- }, [B(le, {
2126
+ }, [L(ve, {
1468
2127
  "value-field": "value",
1469
2128
  "text-field": "name",
1470
2129
  "id-field": "id",
1471
- data: R(N),
1472
- modelValue: N.compareType,
1473
- "onUpdate:modelValue": (z) => N.compareType = z,
1474
- onChange: (z) => V(z, N)
2130
+ data: J(R),
2131
+ modelValue: R.compareType,
2132
+ "onUpdate:modelValue": (z) => R.compareType = z,
2133
+ onChange: (z) => E(z, R)
1475
2134
  }, null)]);
1476
2135
  }
1477
- function A(N) {
2136
+ function U(R) {
1478
2137
  var z;
1479
- return B("div", {
2138
+ return L("div", {
1480
2139
  class: "condition-list-item-control mr-3"
1481
- }, [B(se, {
1482
- editor: (z = u.get(N.fieldCode)) == null ? void 0 : z.editor,
2140
+ }, [L(ye, {
2141
+ editor: (z = u.get(R.fieldCode)) == null ? void 0 : z.editor,
1483
2142
  showLabel: !1,
1484
- modelValue: N.value.value,
1485
- "onUpdate:modelValue": (X) => N.value.value = X,
2143
+ modelValue: R.value.value,
2144
+ "onUpdate:modelValue": (X) => R.value.value = X,
1486
2145
  onChange: (X) => {
1487
- k(X, N);
2146
+ w(X, R);
1488
2147
  }
1489
2148
  }, null)]);
1490
2149
  }
1491
- function q(N) {
1492
- return [B("div", {
2150
+ function W(R) {
2151
+ return [L("div", {
1493
2152
  class: "condition-list-item-extend"
1494
- }, [B("span", {
2153
+ }, [L("span", {
1495
2154
  class: "f-icon f-icon-plus-sm mr-2",
1496
- onClick: () => m(N)
1497
- }, null), B("span", {
2155
+ onClick: () => y(R)
2156
+ }, null), L("span", {
1498
2157
  class: "f-icon f-icon-minus-sm",
1499
- onClick: () => c(N)
1500
- }, null)]), B("div", {
2158
+ onClick: () => m(R)
2159
+ }, null)]), L("div", {
1501
2160
  class: "custom-control custom-checkbox"
1502
- }, [B("input", {
2161
+ }, [L("input", {
1503
2162
  title: "selection",
1504
2163
  class: "custom-control-input",
1505
2164
  type: "checkbox",
1506
- checked: G.value.has(N.conditionId)
1507
- }, null), B("label", {
2165
+ checked: q.value.has(R.conditionId)
2166
+ }, null), L("label", {
1508
2167
  class: "custom-control-label",
1509
- onClick: () => U(N)
2168
+ onClick: () => _(R)
1510
2169
  }, null)])];
1511
2170
  }
1512
- function Z(N) {
1513
- return N.items.map((z) => B("div", {
2171
+ function p(R) {
2172
+ return R.items.map((z) => L("div", {
1514
2173
  class: "condition-list-item",
1515
2174
  key: z.conditionId
1516
- }, [P(z), I(z), A(z), q(z)]));
2175
+ }, [M(z), I(z), U(z), W(z)]));
1517
2176
  }
1518
- function J(N) {
1519
- return B("div", {
2177
+ function $(R) {
2178
+ return L("div", {
1520
2179
  class: "condition-list-relation"
1521
- }, [B("span", {
2180
+ }, [L("span", {
1522
2181
  class: "condition-list-relation-close f-icon-filter-cancel btn-link",
1523
- onClick: () => x(N)
1524
- }, null), B("span", {
2182
+ onClick: () => F(R)
2183
+ }, null), L("span", {
1525
2184
  class: "condition-list-relation-text btn-link",
1526
- onClick: () => a(N)
1527
- }, [N.relation === 1 ? l.and : l.or])]);
2185
+ onClick: () => s(R)
2186
+ }, [R.relation === 1 ? l.and : l.or])]);
1528
2187
  }
1529
- function H(N) {
1530
- return B("div", {
2188
+ function G(R) {
2189
+ return L("div", {
1531
2190
  class: "condition-list-content"
1532
- }, [B("div", {
2191
+ }, [L("div", {
1533
2192
  class: "condition-list-content-group"
1534
- }, [Z(N), N.children && N.children.map((z) => H(z))]), J(N)]);
2193
+ }, [p(R), R.children && R.children.map((z) => G(z))]), $(R)]);
1535
2194
  }
1536
- function K() {
1537
- y($.getSelectedGroupItem()), $.clear();
2195
+ function Z() {
2196
+ h(A.getSelectedGroupItem()), A.clear();
1538
2197
  }
1539
- function ee() {
1540
- return B("div", {
2198
+ function H() {
2199
+ return L("div", {
1541
2200
  class: "condition-list-bottom"
1542
- }, [B("div", {
2201
+ }, [L("div", {
1543
2202
  class: "add-condition-btn mb-1 mr-3",
1544
2203
  onClick: v
1545
- }, [B("span", {
2204
+ }, [L("span", {
1546
2205
  class: "f-icon f-icon-filter-add"
1547
- }, null), B("span", {
2206
+ }, null), L("span", {
1548
2207
  class: "ml-1"
1549
- }, [l.add])]), B("div", {
2208
+ }, [l.add])]), L("div", {
1550
2209
  class: "add-condition-btn mb-1",
1551
- onClick: K
1552
- }, [B("span", {
2210
+ onClick: Z
2211
+ }, [L("span", {
1553
2212
  class: "f-icon f-icon-filter-grouping"
1554
- }, null), B("span", {
2213
+ }, null), L("span", {
1555
2214
  class: "ml-1"
1556
- }, [l.create])]), B("div", {
2215
+ }, [l.create])]), L("div", {
1557
2216
  class: "condition-list-reset add-condition-btn",
1558
- onClick: O
2217
+ onClick: N
1559
2218
  }, [l.reset])]);
1560
2219
  }
1561
- return () => B("div", {
2220
+ return () => L("div", {
1562
2221
  class: "condition-list",
1563
- key: r.value
1564
- }, [B("div", {
2222
+ key: n.value
2223
+ }, [L("div", {
1565
2224
  class: "condition-list-body"
1566
- }, [H(b.value)]), ee()]);
2225
+ }, [G(f.value)]), H()]);
1567
2226
  }
1568
- }), Hr = {}, Dr = {}, { globalStorageKey: Ti } = xe(), Kr = {
2227
+ }), qo = {}, Go = {}, { globalStorageKey: cs } = Ae(), Uo = {
1569
2228
  id: { Type: String, default: "" },
1570
2229
  /** 是否自动完成 */
1571
2230
  autocomplete: { Type: String, default: "off" },
@@ -1648,7 +2307,7 @@ const ae = /* @__PURE__ */ Q({
1648
2307
  * 是否启用快捷键
1649
2308
  */
1650
2309
  keyboard: { type: Boolean, default: !0 }
1651
- }, Ne = [
2310
+ }, He = [
1652
2311
  { key: "none", value: "无" },
1653
2312
  { key: "cellNumber", value: "手机号" },
1654
2313
  { key: "tel", value: "座机号/传真号" },
@@ -1660,7 +2319,7 @@ const ae = /* @__PURE__ */ Q({
1660
2319
  { key: "subjectCode", value: "10位数字会计科目代码" },
1661
2320
  { key: "custom", value: "自定义" }
1662
2321
  ];
1663
- function en(e) {
2322
+ function zo(e) {
1664
2323
  switch (e) {
1665
2324
  case "none":
1666
2325
  return "";
@@ -1687,34 +2346,34 @@ function en(e) {
1687
2346
  }
1688
2347
  return "";
1689
2348
  }
1690
- function tn(e) {
2349
+ function Wo(e) {
1691
2350
  var t;
1692
- return "请输入正确的" + ((t = Ne.find((r) => r.key === e)) == null ? void 0 : t.value);
2351
+ return "请输入正确的" + ((t = He.find((n) => n.key === e)) == null ? void 0 : t.value);
1693
2352
  }
1694
- const rn = {
1695
- convertTo: (e, t, r, n) => {
1696
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = r, e.editor.formatValidation.expression = en(r), e.editor.formatValidation.message = tn(r);
2353
+ const Zo = {
2354
+ convertTo: (e, t, n, o) => {
2355
+ e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = n, e.editor.formatValidation.expression = zo(n), e.editor.formatValidation.message = Wo(n);
1697
2356
  },
1698
- convertFrom: (e, t, r) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
1699
- }, Fe = {
1700
- convertTo: (e, t, r, n) => {
1701
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = r;
2357
+ convertFrom: (e, t, n) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
2358
+ }, Le = {
2359
+ convertTo: (e, t, n, o) => {
2360
+ e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = n;
1702
2361
  },
1703
- convertFrom: (e, t, r) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
2362
+ convertFrom: (e, t, n) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
1704
2363
  };
1705
- class nn extends Cr {
1706
- constructor(t, r) {
1707
- super(t, r);
2364
+ class Jo extends Zn {
2365
+ constructor(t, n) {
2366
+ super(t, n);
1708
2367
  }
1709
- getPropertyConfig(t, r) {
1710
- return super.getPropertyConfig(t, r), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
2368
+ getPropertyConfig(t, n) {
2369
+ return super.getPropertyConfig(t, n), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
1711
2370
  }
1712
2371
  getEditorProperties(t) {
1713
- var n, o;
1714
- let r;
1715
- if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
1716
- const p = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1717
- (o = p == null ? void 0 : p.schemaField) != null && o.type && (r = p.schemaField.type.length);
2372
+ var o, r;
2373
+ let n;
2374
+ if (((o = t == null ? void 0 : t.binding) == null ? void 0 : o.type) === "Form") {
2375
+ const c = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
2376
+ (r = c == null ? void 0 : c.schemaField) != null && r.type && (n = c.schemaField.type.length);
1718
2377
  }
1719
2378
  return this.getComponentConfig(t, {}, {
1720
2379
  maxLength: {
@@ -1725,7 +2384,7 @@ class nn extends Cr {
1725
2384
  nullable: !0,
1726
2385
  min: 0,
1727
2386
  useThousands: !1,
1728
- max: r,
2387
+ max: n,
1729
2388
  needValid: !0
1730
2389
  }
1731
2390
  },
@@ -1752,11 +2411,11 @@ class nn extends Cr {
1752
2411
  });
1753
2412
  }
1754
2413
  getGridFieldEdtiorProperties(t) {
1755
- var n, o;
1756
- let r;
1757
- if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
1758
- const p = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1759
- (o = p == null ? void 0 : p.schemaField) != null && o.type && (r = p.schemaField.type.length);
2414
+ var o, r;
2415
+ let n;
2416
+ if (((o = t == null ? void 0 : t.binding) == null ? void 0 : o.type) === "Form") {
2417
+ const c = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
2418
+ (r = c == null ? void 0 : c.schemaField) != null && r.type && (n = c.schemaField.type.length);
1760
2419
  }
1761
2420
  return this.getComponentConfig(t, {}, {
1762
2421
  maxLength: {
@@ -1767,7 +2426,7 @@ class nn extends Cr {
1767
2426
  nullable: !0,
1768
2427
  min: 0,
1769
2428
  useThousands: !1,
1770
- max: r
2429
+ max: n
1771
2430
  }
1772
2431
  },
1773
2432
  showType: {
@@ -1793,11 +2452,11 @@ class nn extends Cr {
1793
2452
  });
1794
2453
  }
1795
2454
  getFormatValidation(t) {
1796
- var n, o, p, i;
1797
- const r = {
2455
+ var o, r, c, i;
2456
+ const n = {
1798
2457
  title: "输入格式校验",
1799
2458
  description: "输入校验",
1800
- hide: !((n = t.binding) != null && n.field),
2459
+ hide: !((o = t.binding) != null && o.field),
1801
2460
  properties: {
1802
2461
  type: {
1803
2462
  title: "格式类型",
@@ -1810,152 +2469,152 @@ class nn extends Cr {
1810
2469
  valueField: "key",
1811
2470
  idField: "key",
1812
2471
  editable: !1,
1813
- data: Ne
2472
+ data: He
1814
2473
  },
1815
2474
  refreshPanelAfterChanged: !0,
1816
- $converter: rn,
2475
+ $converter: Zo,
1817
2476
  parentPropertyID: "formatValidation"
1818
2477
  }
1819
2478
  }
1820
2479
  };
1821
- return (o = t.editor.formatValidation) != null && o.type && ((p = t.editor.formatValidation) == null ? void 0 : p.type) !== "none" && (r.properties.message = {
2480
+ return (r = t.editor.formatValidation) != null && r.type && ((c = t.editor.formatValidation) == null ? void 0 : c.type) !== "none" && (n.properties.message = {
1822
2481
  title: "输入错误提示",
1823
2482
  type: "string",
1824
2483
  description: "输入错误提示",
1825
- $converter: Fe,
2484
+ $converter: Le,
1826
2485
  parentPropertyID: "formatValidation"
1827
- }), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (r.properties.expression = {
2486
+ }), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (n.properties.expression = {
1828
2487
  title: "匹配正则",
1829
2488
  type: "string",
1830
2489
  description: "匹配正则",
1831
- $converter: Fe,
2490
+ $converter: Le,
1832
2491
  parentPropertyID: "formatValidation"
1833
- }), r;
2492
+ }), n;
1834
2493
  }
1835
2494
  }
1836
- function on(e, t) {
1837
- const r = e.schema;
1838
- function n(o, p) {
1839
- return new nn(o, t).getPropertyConfig(r, p);
2495
+ function _o(e, t) {
2496
+ const n = e.schema;
2497
+ function o(r, c) {
2498
+ return new Jo(r, t).getPropertyConfig(n, c);
1840
2499
  }
1841
- return { getPropsConfig: n };
2500
+ return { getPropsConfig: o };
1842
2501
  }
1843
- const an = /* @__PURE__ */ Q({
2502
+ const Qo = /* @__PURE__ */ ee({
1844
2503
  name: "FInputGroupDesign",
1845
- props: Kr,
2504
+ props: Uo,
1846
2505
  emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
1847
2506
  setup(e, t) {
1848
- const r = M(e.modelValue), n = M(e.modelValue), o = _e(e, t, r, n), {
1849
- inputGroupClass: p,
2507
+ const n = B(e.modelValue), o = B(e.modelValue), r = ct(e, t, n, o), {
2508
+ inputGroupClass: c,
1850
2509
  inputType: i,
1851
2510
  inputGroupStyle: u
1852
- } = o, S = M(), g = D("designer-host-service"), v = D("design-item-context"), a = on(v, g), s = Ve(S, v, a), y = W(() => e.showType === "password" ? "password" : "");
1853
- return ke(() => {
1854
- S.value.componentInstance = s;
1855
- }), t.expose(s.value), () => B("div", {
2511
+ } = r, V = B(), d = re("designer-host-service"), v = re("design-item-context"), s = _o(v, d), a = Re(V, v, s), h = Q(() => e.showType === "password" ? "password" : "");
2512
+ return be(() => {
2513
+ V.value.componentInstance = a;
2514
+ }), t.expose(a.value), () => L("div", {
1856
2515
  id: "inputGroup",
1857
- ref: S,
1858
- class: p.value,
2516
+ ref: V,
2517
+ class: c.value,
1859
2518
  style: u.value
1860
- }, [B("input", {
2519
+ }, [L("input", {
1861
2520
  class: "form-control",
1862
2521
  type: e.showType,
1863
2522
  placeholder: e.placeholder,
1864
- value: y.value
1865
- }, null), e.showType === "password" && e.enableViewPassword && B("span", {
2523
+ value: h.value
2524
+ }, null), e.showType === "password" && e.enableViewPassword && L("span", {
1866
2525
  class: "input-group-append"
1867
- }, [B("span", {
2526
+ }, [L("span", {
1868
2527
  class: "input-group-text"
1869
- }, [B("span", {
2528
+ }, [L("span", {
1870
2529
  class: "f-icon f-icon-eye"
1871
2530
  }, null)])])]);
1872
2531
  }
1873
2532
  });
1874
- function ln() {
2533
+ function Xo() {
1875
2534
  function e(i, u) {
1876
- const S = Dr[i];
1877
- return S ? S(u) : {};
2535
+ const V = Go[i];
2536
+ return V ? V(u) : {};
1878
2537
  }
1879
2538
  function t(i) {
1880
- return Hr[i] || an;
1881
- }
1882
- function r(i) {
2539
+ return qo[i] || Qo;
1883
2540
  }
1884
2541
  function n(i) {
1885
2542
  }
1886
2543
  function o(i) {
1887
2544
  }
1888
- function p(i) {
2545
+ function r(i) {
2546
+ }
2547
+ function c(i) {
1889
2548
  }
1890
- return { getChangeFunctionName: r, getClearFunctionName: n, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: p };
2549
+ return { getChangeFunctionName: n, getClearFunctionName: o, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: r, getMouseupFunctionName: c };
1891
2550
  }
1892
- function sn(e = {}) {
1893
- function t(g, v, a, s) {
1894
- if (typeof a == "number")
1895
- return s[g].length === a;
1896
- if (typeof a == "object") {
1897
- const y = Object.keys(a)[0], m = a[y];
1898
- if (y === "not")
1899
- return Number(s[g].length) !== Number(m);
1900
- if (y === "moreThan")
1901
- return Number(s[g].length) >= Number(m);
1902
- if (y === "lessThan")
1903
- return Number(s[g].length) <= Number(m);
2551
+ function Yo(e = {}) {
2552
+ function t(d, v, s, a) {
2553
+ if (typeof s == "number")
2554
+ return a[d].length === s;
2555
+ if (typeof s == "object") {
2556
+ const h = Object.keys(s)[0], y = s[h];
2557
+ if (h === "not")
2558
+ return Number(a[d].length) !== Number(y);
2559
+ if (h === "moreThan")
2560
+ return Number(a[d].length) >= Number(y);
2561
+ if (h === "lessThan")
2562
+ return Number(a[d].length) <= Number(y);
1904
2563
  }
1905
2564
  return !1;
1906
2565
  }
1907
- function r(g, v, a, s) {
1908
- return s[g] && s[g].propertyValue && String(s[g].propertyValue.value) === String(a);
2566
+ function n(d, v, s, a) {
2567
+ return a[d] && a[d].propertyValue && String(a[d].propertyValue.value) === String(s);
1909
2568
  }
1910
- const n = /* @__PURE__ */ new Map([
2569
+ const o = /* @__PURE__ */ new Map([
1911
2570
  ["length", t],
1912
- ["getProperty", r]
2571
+ ["getProperty", n]
1913
2572
  ]);
1914
- Object.keys(e).reduce((g, v) => (g.set(v, e[v]), g), n);
1915
- function o(g, v) {
1916
- const a = g;
1917
- return typeof v == "number" ? [{ target: a, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: a, operator: "getProperty", param: g, value: !!v }] : typeof v == "object" ? Object.keys(v).map((s) => {
1918
- if (s === "length")
1919
- return { target: a, operator: "length", param: null, value: v[s] };
1920
- const y = s, m = v[s];
1921
- return { target: a, operator: "getProperty", param: y, value: m };
2573
+ Object.keys(e).reduce((d, v) => (d.set(v, e[v]), d), o);
2574
+ function r(d, v) {
2575
+ const s = d;
2576
+ return typeof v == "number" ? [{ target: s, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: s, operator: "getProperty", param: d, value: !!v }] : typeof v == "object" ? Object.keys(v).map((a) => {
2577
+ if (a === "length")
2578
+ return { target: s, operator: "length", param: null, value: v[a] };
2579
+ const h = a, y = v[a];
2580
+ return { target: s, operator: "getProperty", param: h, value: y };
1922
2581
  }) : [];
1923
2582
  }
1924
- function p(g) {
1925
- return Object.keys(g).reduce((a, s) => {
1926
- const y = o(s, g[s]);
1927
- return a.push(...y), a;
2583
+ function c(d) {
2584
+ return Object.keys(d).reduce((s, a) => {
2585
+ const h = r(a, d[a]);
2586
+ return s.push(...h), s;
1928
2587
  }, []);
1929
2588
  }
1930
- function i(g, v) {
1931
- if (n.has(g.operator)) {
1932
- const a = n.get(g.operator);
1933
- return a && a(g.target, g.param, g.value, v) || !1;
2589
+ function i(d, v) {
2590
+ if (o.has(d.operator)) {
2591
+ const s = o.get(d.operator);
2592
+ return s && s(d.target, d.param, d.value, v) || !1;
1934
2593
  }
1935
2594
  return !1;
1936
2595
  }
1937
- function u(g, v) {
1938
- return p(g).reduce((y, m) => y && i(m, v), !0);
2596
+ function u(d, v) {
2597
+ return c(d).reduce((h, y) => h && i(y, v), !0);
1939
2598
  }
1940
- function S(g, v) {
1941
- const a = Object.keys(g), s = a.includes("allOf"), y = a.includes("anyOf"), m = s || y, c = (m ? g[m ? s ? "allOf" : "anyOf" : "allOf"] : [g]).map((x) => u(x, v));
1942
- return s ? !c.includes(!1) : c.includes(!0);
2599
+ function V(d, v) {
2600
+ const s = Object.keys(d), a = s.includes("allOf"), h = s.includes("anyOf"), y = a || h, m = (y ? d[y ? a ? "allOf" : "anyOf" : "allOf"] : [d]).map((F) => u(F, v));
2601
+ return a ? !m.includes(!1) : m.includes(!0);
1943
2602
  }
1944
- return { parseValueSchema: S };
2603
+ return { parseValueSchema: V };
1945
2604
  }
1946
- const un = {
1947
- convertTo: (e, t, r, n) => {
1948
- e.appearance || (e.appearance = {}), e.appearance[t] = r;
2605
+ const Ho = {
2606
+ convertTo: (e, t, n, o) => {
2607
+ e.appearance || (e.appearance = {}), e.appearance[t] = n;
1949
2608
  },
1950
- convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
1951
- }, cn = {
1952
- convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
1953
- }, dn = {
1954
- convertTo: (e, t, r, n) => {
1955
- e.editor && (e.editor[t] = r);
2609
+ convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
2610
+ }, Do = {
2611
+ convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
2612
+ }, Ko = {
2613
+ convertTo: (e, t, n, o) => {
2614
+ e.editor && (e.editor[t] = n);
1956
2615
  },
1957
- convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
1958
- }, pn = {
2616
+ convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
2617
+ }, er = {
1959
2618
  button: { type: "button", name: "按钮" },
1960
2619
  "response-toolbar": { type: "response-toolbar", name: "工具栏" },
1961
2620
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
@@ -2009,25 +2668,30 @@ const un = {
2009
2668
  "discussion-list": { type: "discussion-list", name: "评论列表" },
2010
2669
  comment: { type: "comment", name: "评论区" },
2011
2670
  "rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
2012
- calendar: { type: "calendar", name: "日历", icon: "date-picker" }
2013
- }, mn = {
2014
- convertFrom: (e, t, r) => {
2015
- var o;
2016
- const n = e.editor && e.editor[t] ? e.editor[t] : e[t];
2017
- return ((o = pn[n]) == null ? void 0 : o.name) || n;
2018
- }
2019
- }, fn = {
2020
- convertTo: (e, t, r, n) => {
2671
+ calendar: { type: "calendar", name: "日历", icon: "date-picker" },
2672
+ wizard: { type: "wizard", name: "向导", icon: "wizard" },
2673
+ "wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
2674
+ "wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
2675
+ step: { type: "step", name: "步骤条", icon: "step" },
2676
+ "dynamic-form": { type: "dynamic-form", name: "动态表单" }
2677
+ }, tr = {
2678
+ convertFrom: (e, t, n) => {
2679
+ var r;
2680
+ const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
2681
+ return ((r = er[o]) == null ? void 0 : r.name) || o;
2682
+ }
2683
+ }, nr = {
2684
+ convertTo: (e, t, n, o) => {
2021
2685
  e[t] = e[t];
2022
2686
  },
2023
- convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
2024
- }, gn = {
2025
- convertTo: (e, t, r, n) => {
2026
- (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
2027
- [t]: r
2687
+ convertFrom: (e, t, n) => e.editor ? n.getRealEditorType(e.editor.type) : ""
2688
+ }, or = {
2689
+ convertTo: (e, t, n, o) => {
2690
+ (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = n : e.formatter = {
2691
+ [t]: n
2028
2692
  });
2029
2693
  },
2030
- convertFrom: (e, t, r) => {
2694
+ convertFrom: (e, t, n) => {
2031
2695
  if (e.formatter) {
2032
2696
  if (t === "trueText")
2033
2697
  return e.formatter.trueText;
@@ -2049,14 +2713,16 @@ const un = {
2049
2713
  return e.formatter.customFormat;
2050
2714
  if (t === "type")
2051
2715
  return e.formatter.type || "none";
2716
+ if (t === "customFormat")
2717
+ return e.formmater.customFormat;
2052
2718
  }
2053
2719
  return "none";
2054
2720
  }
2055
- }, vn = {
2056
- convertTo: (e, t, r, n) => {
2057
- e.command ? e.command[t] = r : e.command = {
2058
- [t]: r
2059
- }, t === "enableType" && r === "default" && (e.command.enable = !0, e.command.commands = [
2721
+ }, rr = {
2722
+ convertTo: (e, t, n, o) => {
2723
+ e.command ? e.command[t] = n : e.command = {
2724
+ [t]: n
2725
+ }, t === "enableType" && n === "default" && (e.command.enable = !0, e.command.commands = [
2060
2726
  {
2061
2727
  text: "编辑",
2062
2728
  type: "primary",
@@ -2067,42 +2733,30 @@ const un = {
2067
2733
  type: "danger",
2068
2734
  command: "remove"
2069
2735
  }
2070
- ]), t === "enableType" && r === "custom" && (e.command.enable = !0, e.command.commands = [
2736
+ ]), t === "enableType" && n === "custom" && (e.command.enable = !0, e.command.commands = [
2071
2737
  {
2072
2738
  value: "add",
2073
- text: {
2074
- en: "add",
2075
- "zh-CHS": "增加",
2076
- "zh-CHT": "增加"
2077
- },
2739
+ text: "增加",
2078
2740
  type: "link"
2079
2741
  },
2080
2742
  {
2081
2743
  value: "edit",
2082
- text: {
2083
- en: "edit",
2084
- "zh-CHS": "编辑",
2085
- "zh-CHT": "編輯"
2086
- },
2744
+ text: "编辑",
2087
2745
  type: "danger"
2088
2746
  },
2089
2747
  {
2090
2748
  value: "remove",
2091
- text: {
2092
- en: "remove",
2093
- "zh-CHS": "删除",
2094
- "zh-CHT": "刪除"
2095
- },
2749
+ text: "删除",
2096
2750
  type: "remove"
2097
2751
  }
2098
- ]), t === "enableType" && r === "unable" && (e.command.enable = !1);
2752
+ ]), t === "enableType" && n === "unable" && (e.command.enable = !1);
2099
2753
  },
2100
- convertFrom: (e, t, r) => {
2101
- var n, o;
2754
+ convertFrom: (e, t, n) => {
2755
+ var o, r;
2102
2756
  if (e.command) {
2103
2757
  if (t === "enableType") {
2104
- const p = (o = (n = e.command) == null ? void 0 : n.commands) == null ? void 0 : o.find((i) => i.command === "edit" && i.type === "primary");
2105
- return e.command.enable ? p ? "default" : "custom" : "unable";
2758
+ const c = (r = (o = e.command) == null ? void 0 : o.commands) == null ? void 0 : r.find((i) => i.command === "edit" && i.type === "primary");
2759
+ return e.command.enable ? c ? "default" : "custom" : "unable";
2106
2760
  }
2107
2761
  if (t === "commands")
2108
2762
  return e.command.enableType === "custom" ? e.command.commands : [];
@@ -2110,16 +2764,18 @@ const un = {
2110
2764
  return e.command.formatter;
2111
2765
  if (t === "count")
2112
2766
  return e.command.count;
2767
+ if (t === "columnWidth")
2768
+ return e.command.columnWidth || 150;
2113
2769
  }
2114
2770
  return "";
2115
2771
  }
2116
- }, hn = {
2117
- convertTo: (e, t, r, n) => {
2118
- e.column ? e.column[t] = r : e.column = {
2119
- [t]: r
2120
- }, t === "fitColumns" && r && (e.column.fitMode || (e.column.fitMode = "average"));
2772
+ }, ir = {
2773
+ convertTo: (e, t, n, o) => {
2774
+ e.column ? e.column[t] = n : e.column = {
2775
+ [t]: n
2776
+ }, t === "fitColumns" && n && (e.column.fitMode || (e.column.fitMode = "average"));
2121
2777
  },
2122
- convertFrom: (e, t, r) => {
2778
+ convertFrom: (e, t, n) => {
2123
2779
  if (e.column) {
2124
2780
  if (t === "fitColumns")
2125
2781
  return e.column.fitColumns;
@@ -2128,27 +2784,30 @@ const un = {
2128
2784
  }
2129
2785
  return "";
2130
2786
  }
2131
- }, yn = {
2132
- convertTo: (e, t, r, n) => {
2133
- e.summary ? e.summary[t] = r : e.summary = {
2134
- [t]: r
2135
- }, t === "enable" && r && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
2136
- enable: r,
2787
+ }, sr = {
2788
+ convertTo: (e, t, n, o) => {
2789
+ e.summary ? e.summary[t] = n : e.summary = {
2790
+ [t]: n
2791
+ }, t === "enable" && n && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
2792
+ enable: n,
2137
2793
  groupFields: []
2138
2794
  });
2139
2795
  },
2140
- convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
2141
- }, bn = {
2142
- convertTo: (e, t, r, n) => {
2143
- e.group ? e.group[t] = r : e.group = {
2144
- [t]: r
2145
- }, t === "enable" && r && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
2146
- enable: r,
2796
+ convertFrom: (e, t, n) => {
2797
+ var o;
2798
+ return t === "customSummaryStyle" ? e.summary.customSummaryStyle : t === "position" ? ((o = e.summary) == null ? void 0 : o[t]) || "bottom" : e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : "";
2799
+ }
2800
+ }, ar = {
2801
+ convertTo: (e, t, n, o) => {
2802
+ e.group ? e.group[t] = n : e.group = {
2803
+ [t]: n
2804
+ }, t === "enable" && n && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
2805
+ enable: n,
2147
2806
  groupFields: [],
2148
2807
  showSummary: !1
2149
2808
  });
2150
2809
  },
2151
- convertFrom: (e, t, r) => {
2810
+ convertFrom: (e, t, n) => {
2152
2811
  if (e.group) {
2153
2812
  if (t === "enable")
2154
2813
  return e.group.enable;
@@ -2156,122 +2815,124 @@ const un = {
2156
2815
  return e.group.showSummary;
2157
2816
  }
2158
2817
  }
2159
- }, Fn = {
2818
+ }, lr = {
2160
2819
  convertFrom: (e, t) => e.binding ? e.binding.path : "",
2161
- convertTo: (e, t, r) => {
2162
- if (r && r.length > 0) {
2163
- const n = r[0];
2164
- e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = n.bindingField, e.binding.field = n.id, e.binding.fullPath = n.path, e.path = n.bindingPath;
2820
+ convertTo: (e, t, n) => {
2821
+ if (n && n.length > 0) {
2822
+ const o = n[0];
2823
+ e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath;
2165
2824
  }
2166
2825
  }
2167
- }, Cn = {
2168
- convertTo: (e, t, r, n) => {
2169
- e.pagination || (e.pagination = {}), e.pagination[t] = r;
2826
+ }, ur = {
2827
+ convertTo: (e, t, n, o) => {
2828
+ e.pagination || (e.pagination = {}), t === "sizeLimits" ? e.pagination.sizeLimits = n.split(",") : e.pagination[t] = n;
2170
2829
  },
2171
- convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
2172
- }, Tn = {
2173
- convertTo: (e, t, r, n) => {
2174
- e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
2830
+ convertFrom: (e, t, n) => e.pagination ? t === "sizeLimits" ? e.pagination.sizeLimits.join(",") : e.pagination[t] : e[t]
2831
+ }, cr = {
2832
+ convertTo: (e, t, n, o) => {
2833
+ e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
2175
2834
  },
2176
- convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
2177
- }, kn = {
2178
- convertTo: (e, t, r, n) => {
2179
- e.selection || (e.selection = {}), e.selection[t] = r;
2835
+ convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
2836
+ }, dr = {
2837
+ convertTo: (e, t, n, o) => {
2838
+ e.selection || (e.selection = {}), e.selection[t] = n;
2180
2839
  },
2181
- convertFrom: (e, t, r) => {
2182
- var n, o;
2183
- return t === "showCheckbox" ? (n = e.selection) != null && n.multiSelect ? !0 : (o = e.selection) == null ? void 0 : o.showCheckbox : e.selection ? e.selection[t] : e[t];
2840
+ convertFrom: (e, t, n) => {
2841
+ var o, r;
2842
+ return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (r = e.selection) == null ? void 0 : r.showCheckbox : e.selection ? e.selection[t] : e[t];
2184
2843
  }
2185
- }, wn = {
2186
- convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
2187
- }, xn = {
2844
+ }, pr = {
2845
+ convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
2846
+ }, mr = {
2188
2847
  convertFrom: (e, t) => e[t] || "",
2189
- convertTo: (e, t, r) => {
2190
- e[t] = r;
2848
+ convertTo: (e, t, n) => {
2849
+ e[t] = n;
2191
2850
  }
2192
- }, Vn = {
2193
- convertTo: (e, t, r, n) => {
2194
- e.size || (e.size = {}), e.size[t] = r;
2851
+ }, fr = {
2852
+ convertTo: (e, t, n, o) => {
2853
+ e.size || (e.size = {}), e.size[t] = n;
2195
2854
  },
2196
- convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
2197
- }, Sn = {
2198
- convertFrom: (e, t, r) => {
2199
- var n, o;
2200
- return (n = e.formatter) != null && n.data && t === "formatterEnumData" && !e.formatterEnumData ? (o = e.formatter) == null ? void 0 : o.data : e.formatterEnumData;
2201
- }
2202
- }, En = {
2203
- convertTo: (e, t, r, n) => {
2204
- e.sort || (e.sort = {}), e.sort[t] = r;
2855
+ convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
2856
+ }, gr = {
2857
+ convertFrom: (e, t, n) => {
2858
+ var o, r;
2859
+ return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (r = e.formatter) == null ? void 0 : r.data : e.formatterEnumData;
2860
+ }
2861
+ }, vr = {
2862
+ convertTo: (e, t, n, o) => {
2863
+ e.sort || (e.sort = {}), e.sort[t] = n;
2205
2864
  },
2206
- convertFrom: (e, t, r) => {
2207
- var n, o;
2865
+ convertFrom: (e, t, n) => {
2866
+ var o, r;
2208
2867
  if (t === "mode")
2209
- return ((n = e.sort) == null ? void 0 : n.mode) || "client";
2868
+ return ((o = e.sort) == null ? void 0 : o.mode) || "client";
2210
2869
  if (t === "multiSort")
2211
- return !!((o = e.sort) != null && o.multiSort);
2870
+ return !!((r = e.sort) != null && r.multiSort);
2212
2871
  }
2213
- }, In = {
2214
- convertTo: (e, t, r, n) => {
2215
- e.filter || (e.filter = {}), e.filter[t] = r;
2872
+ }, yr = {
2873
+ convertTo: (e, t, n, o) => {
2874
+ e.filter || (e.filter = {}), e.filter[t] = n;
2216
2875
  },
2217
- convertFrom: (e, t, r) => {
2218
- var n;
2876
+ convertFrom: (e, t, n) => {
2877
+ var o;
2219
2878
  if (t === "mode")
2220
- return ((n = e.filter) == null ? void 0 : n.mode) || "client";
2879
+ return ((o = e.filter) == null ? void 0 : o.mode) || "client";
2221
2880
  }
2222
- }, Ln = {
2223
- convertTo: (e, t, r, n) => {
2224
- e.rowOption ? e.rowOption[t] = r : e.rowOption = {
2225
- [t]: r
2881
+ }, hr = {
2882
+ convertTo: (e, t, n, o) => {
2883
+ e.rowOption ? e.rowOption[t] = n : e.rowOption = {
2884
+ [t]: n
2226
2885
  };
2227
2886
  },
2228
- convertFrom: (e, t, r) => {
2887
+ convertFrom: (e, t, n) => {
2229
2888
  if (e.rowOption) {
2230
2889
  if (t === "customRowStyle")
2231
2890
  return e.rowOption.customRowStyle;
2232
2891
  if (t === "customCellStyle")
2233
2892
  return e.rowOption.customCellStyle;
2893
+ if (t === "height")
2894
+ return e.rowOption.height;
2234
2895
  }
2235
2896
  return "";
2236
2897
  }
2237
- }, Pn = {
2238
- convertTo: (e, t, r, n) => {
2239
- (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = r, t === "columnTemplateType" && r === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
2898
+ }, br = {
2899
+ convertTo: (e, t, n, o) => {
2900
+ (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = n, t === "columnTemplateType" && n === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
2240
2901
  <span class="f-pretend-link f-cursor-pointer"
2241
2902
  @click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
2242
2903
  {{rowData.${e.field}}}
2243
2904
  </span>` : e.columnTemplate = `
2244
2905
  <span class="f-pretend-link f-cursor-pointer">
2245
2906
  {{rowData.${e.field}}}
2246
- </span>`), t === "columnTemplateType" && r === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && r === "custom" && (e.columnTemplate = ""));
2907
+ </span>`), t === "columnTemplateType" && n === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && n === "custom" && (e.columnTemplate = ""));
2247
2908
  },
2248
- convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
2909
+ convertFrom: (e, t, n) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
2249
2910
  };
2250
- function On(e, t, r) {
2251
- const n = /* @__PURE__ */ new Map([
2252
- ["/converter/appearance.converter", un],
2253
- ["/converter/buttons.converter", cn],
2254
- ["/converter/property-editor.converter", dn],
2255
- ["/converter/items-count.converter", wn],
2256
- ["/converter/type.converter", mn],
2257
- ["/converter/change-editor.converter", fn],
2258
- ["/converter/change-formatter.converter", gn],
2259
- ["/converter/column-command.converter", vn],
2260
- ["/converter/column-option.converter", hn],
2261
- ["/converter/summary.converter", yn],
2262
- ["/converter/group.converter", bn],
2263
- ["/converter/form-group-label.converter", xn],
2264
- ["/converter/field-selector.converter", Fn],
2265
- ["/converter/pagination.converter", Cn],
2266
- ["/converter/row-number.converter", Tn],
2267
- ["/converter/grid-selection.converter", kn],
2268
- ["/converter/size.converter", Vn],
2269
- ["/converter/change-formatter-enum.converter", Sn],
2270
- ["/converter/grid-sort.converter", En],
2271
- ["/converter/grid-filter.converter", In],
2272
- ["/converter/row-option.converter", Ln],
2273
- ["/converter/change-formatter-type.converter", Pn]
2274
- ]), o = /* @__PURE__ */ new Map([
2911
+ function Fr(e, t, n) {
2912
+ const o = /* @__PURE__ */ new Map([
2913
+ ["/converter/appearance.converter", Ho],
2914
+ ["/converter/buttons.converter", Do],
2915
+ ["/converter/property-editor.converter", Ko],
2916
+ ["/converter/items-count.converter", pr],
2917
+ ["/converter/type.converter", tr],
2918
+ ["/converter/change-editor.converter", nr],
2919
+ ["/converter/change-formatter.converter", or],
2920
+ ["/converter/column-command.converter", rr],
2921
+ ["/converter/column-option.converter", ir],
2922
+ ["/converter/summary.converter", sr],
2923
+ ["/converter/group.converter", ar],
2924
+ ["/converter/form-group-label.converter", mr],
2925
+ ["/converter/field-selector.converter", lr],
2926
+ ["/converter/pagination.converter", ur],
2927
+ ["/converter/row-number.converter", cr],
2928
+ ["/converter/grid-selection.converter", dr],
2929
+ ["/converter/size.converter", fr],
2930
+ ["/converter/change-formatter-enum.converter", gr],
2931
+ ["/converter/grid-sort.converter", vr],
2932
+ ["/converter/grid-filter.converter", yr],
2933
+ ["/converter/row-option.converter", hr],
2934
+ ["/converter/change-formatter-type.converter", br]
2935
+ ]), r = /* @__PURE__ */ new Map([
2275
2936
  ["string", { type: "input-group", enableClear: !1 }],
2276
2937
  ["boolean", {
2277
2938
  type: "combo-list",
@@ -2295,186 +2956,186 @@ function On(e, t, r) {
2295
2956
  ["array", { type: "button-edit" }],
2296
2957
  ["number", { type: "number-spinner", placeholder: "" }],
2297
2958
  ["events-editor", { type: "events-editor", hide: !0 }]
2298
- ]), p = sn();
2299
- function i(m, f) {
2300
- return () => p.parseValueSchema(m, f);
2301
- }
2302
- function u(m, f, E) {
2303
- return m.includes("visible") && f.visible !== void 0 ? typeof f.visible == "boolean" ? () => !!f.visible : f.visible === void 0 ? !0 : i(f.visible, E) : () => !0;
2304
- }
2305
- function S(m, f, E) {
2306
- return m.includes("readonly") && f.readonly !== void 0 ? typeof f.readonly == "boolean" ? () => !!f.readonly : i(f.readonly, E) : () => !1;
2307
- }
2308
- function g(m, f) {
2309
- const E = m.$converter || f;
2310
- return typeof E == "string" && E && n.has(E) ? n.get(E) || null : E || null;
2311
- }
2312
- function v(m, f, E, c, b, x = "", j = "") {
2313
- return Object.keys(m).map((G) => {
2314
- const U = M(1), R = G, l = m[G], d = Object.keys(l), V = l.title, O = l.type, k = o.get(O) || { type: "input-group", enableClear: !1 }, P = l.editor ? Object.assign({}, k, l.editor) : Object.assign({}, k), I = u(d, l, f), A = S(d, l, f);
2315
- P.readonly = P.readonly === void 0 ? A() : P.readonly;
2316
- const q = l.type === "cascade" ? v(l.properties, f, E, c, b, x, j) : [], Z = !0;
2317
- let J = g(l, j);
2318
- const H = W({
2959
+ ]), c = Yo();
2960
+ function i(y, b) {
2961
+ return () => c.parseValueSchema(y, b);
2962
+ }
2963
+ function u(y, b, P) {
2964
+ return y.includes("visible") && b.visible !== void 0 ? typeof b.visible == "boolean" ? () => !!b.visible : b.visible === void 0 ? !0 : i(b.visible, P) : () => !0;
2965
+ }
2966
+ function V(y, b, P) {
2967
+ return y.includes("readonly") && b.readonly !== void 0 ? typeof b.readonly == "boolean" ? () => !!b.readonly : i(b.readonly, P) : () => !1;
2968
+ }
2969
+ function d(y, b) {
2970
+ const P = y.$converter || b;
2971
+ return typeof P == "string" && P && o.has(P) ? o.get(P) || null : P || null;
2972
+ }
2973
+ function v(y, b, P, m, f, F = "", j = "") {
2974
+ return Object.keys(y).map((q) => {
2975
+ const _ = B(1), J = q, l = y[q], g = Object.keys(l), E = l.title, N = l.type, w = r.get(N) || { type: "input-group", enableClear: !1 }, M = l.editor ? Object.assign({}, w, l.editor) : Object.assign({}, w), I = u(g, l, b), U = V(g, l, b);
2976
+ M.readonly = M.readonly === void 0 ? U() : M.readonly;
2977
+ const W = l.type === "cascade" ? v(l.properties, b, P, m, f, F, j) : [], p = !0;
2978
+ let $ = d(l, j);
2979
+ const G = Q({
2319
2980
  get() {
2320
- if (U.value) {
2321
- if (["class", "style"].find((Ge) => Ge === R) && !J && (J = n.get("/converter/appearance.converter") || null), J && J.convertFrom)
2322
- return J.convertFrom(E, G, b, x);
2323
- const Y = E[G];
2981
+ if (_.value) {
2982
+ if (["class", "style"].find((oe) => oe === J) && !$ && ($ = o.get("/converter/appearance.converter") || null), $ && $.convertFrom)
2983
+ return $.convertFrom(P, q, f, F);
2984
+ const Y = P[q];
2324
2985
  return Object.prototype.hasOwnProperty.call(l, "defaultValue") && (Y === void 0 || typeof Y == "string" && Y === "") ? l.type === "boolean" ? l.defaultValue : l.defaultValue || "" : Y;
2325
2986
  }
2326
2987
  return null;
2327
2988
  },
2328
2989
  set(Y) {
2329
- U.value += 1, J && J.convertTo ? (J.convertTo(c, G, Y, b, x), J.convertTo(E, G, Y, b, x)) : (c[G] = Y, E[G] = Y);
2990
+ _.value += 1, $ && $.convertTo ? ($.convertTo(m, q, Y, f, F), $.convertTo(P, q, Y, f, F)) : (m[q] = Y, P[q] = Y);
2330
2991
  }
2331
- }), { refreshPanelAfterChanged: K, description: ee, isExpand: N, parentPropertyID: z } = l, X = { propertyID: R, propertyName: V, propertyType: O, propertyValue: H, editor: P, visible: I, readonly: A, cascadeConfig: q, hideCascadeTitle: Z, refreshPanelAfterChanged: K, description: ee, isExpand: N, parentPropertyID: z };
2332
- return f[R] = X, X;
2992
+ }), { refreshPanelAfterChanged: Z, description: H, isExpand: R, parentPropertyID: z } = l, X = { propertyID: J, propertyName: E, propertyType: N, propertyValue: G, editor: M, visible: I, readonly: U, cascadeConfig: W, hideCascadeTitle: p, refreshPanelAfterChanged: Z, description: H, isExpand: R, parentPropertyID: z };
2993
+ return b[J] = X, X;
2333
2994
  });
2334
2995
  }
2335
- function a(m, f, E = {}) {
2336
- const c = {}, b = e[m];
2337
- return b && b.categories ? Object.keys(b.categories).map((j) => {
2338
- const $ = b.categories[j], G = $ == null ? void 0 : $.title, U = v($.properties || {}, c, {}, E, f);
2339
- return { categoryId: j, categoryName: G, properties: U };
2996
+ function s(y, b, P = {}) {
2997
+ const m = {}, f = e[y];
2998
+ return f && f.categories ? Object.keys(f.categories).map((j) => {
2999
+ const A = f.categories[j], q = A == null ? void 0 : A.title, _ = v(A.properties || {}, m, {}, P, b);
3000
+ return { categoryId: j, categoryName: q, properties: _ };
2340
3001
  }) : [];
2341
3002
  }
2342
- function s(m, f, E, c, b = "") {
2343
- const x = f.$ref.schema, j = f.$ref.converter, $ = E[x], G = $.type, U = r($), R = {}, l = e[G];
3003
+ function a(y, b, P, m, f = "") {
3004
+ const F = b.$ref.schema, j = b.$ref.converter, A = P[F], q = A.type, _ = n(A), J = {}, l = e[q];
2344
3005
  if (l && l.categories) {
2345
- const d = l.categories[m], V = d == null ? void 0 : d.title;
2346
- j && Object.keys(d.properties).forEach((P) => {
2347
- d.properties[P].$converter = j;
3006
+ const g = l.categories[y], E = g == null ? void 0 : g.title;
3007
+ j && Object.keys(g.properties).forEach((M) => {
3008
+ g.properties[M].$converter = j;
2348
3009
  });
2349
- const O = (d == null ? void 0 : d.properties) || {}, k = v(O, R, U, $, c, b);
2350
- return { categoryId: m, categoryName: V, properties: k };
2351
- }
2352
- return { categoryId: m, categoryName: "", properties: [] };
2353
- }
2354
- function y(m, f, E, c, b) {
2355
- const x = m.type, j = r(m), $ = {};
2356
- let G = b || e[x];
2357
- if (!(G && Object.keys(G).length > 0) && E && E.getPropConfig && (G = E.getPropConfig(c)), G && G.categories) {
2358
- const R = [];
2359
- return Object.keys(G.categories).map((l) => {
2360
- const d = G.categories[l];
2361
- if (d.$ref) {
2362
- R.push(s(l, d, m, f, c));
3010
+ const N = (g == null ? void 0 : g.properties) || {}, w = v(N, J, _, A, m, f);
3011
+ return { categoryId: y, categoryName: E, properties: w };
3012
+ }
3013
+ return { categoryId: y, categoryName: "", properties: [] };
3014
+ }
3015
+ function h(y, b, P, m, f) {
3016
+ const F = y.type, j = n(y), A = {};
3017
+ let q = f || e[F];
3018
+ if (!(q && Object.keys(q).length > 0) && P && P.getPropConfig && (q = P.getPropConfig(m)), q && q.categories) {
3019
+ const J = [];
3020
+ return Object.keys(q.categories).map((l) => {
3021
+ const g = q.categories[l];
3022
+ if (g.$ref) {
3023
+ J.push(a(l, g, y, b, m));
2363
3024
  return;
2364
3025
  }
2365
- const V = d == null ? void 0 : d.title, O = d == null ? void 0 : d.tabId, k = d == null ? void 0 : d.tabName, P = d == null ? void 0 : d.hide, I = d == null ? void 0 : d.hideTitle, A = v(d.properties || {}, $, j, m, f, c, d.$converter), { setPropertyRelates: q } = d, Z = d == null ? void 0 : d.parentPropertyID;
2366
- R.push({ categoryId: l, categoryName: V, tabId: O, tabName: k, hide: P, properties: A, hideTitle: I, setPropertyRelates: q, parentPropertyID: Z });
2367
- }), R;
3026
+ const E = g == null ? void 0 : g.title, N = g == null ? void 0 : g.tabId, w = g == null ? void 0 : g.tabName, M = g == null ? void 0 : g.hide, I = g == null ? void 0 : g.hideTitle, U = v(g.properties || {}, A, j, y, b, m, g.$converter), { setPropertyRelates: W } = g, p = g == null ? void 0 : g.parentPropertyID;
3027
+ J.push({ categoryId: l, categoryName: E, tabId: N, tabName: w, hide: M, properties: U, hideTitle: I, setPropertyRelates: W, parentPropertyID: p });
3028
+ }), J;
2368
3029
  }
2369
3030
  return [];
2370
3031
  }
2371
3032
  return {
2372
- getPropertyConfigBySchema: y,
2373
- getPropertyConfigByType: a,
2374
- propertyConverterMap: n
3033
+ getPropertyConfigBySchema: h,
3034
+ getPropertyConfigByType: s,
3035
+ propertyConverterMap: o
2375
3036
  };
2376
3037
  }
2377
- function Bn(e, t) {
2378
- let r;
2379
- function n(a) {
2380
- const { properties: s, title: y, ignore: m } = a, f = m && Array.isArray(m), E = Object.keys(s).reduce((c, b) => ((!f || !m.find((x) => x === b)) && (c[b] = s[b].type === "object" && s[b].properties ? n(s[b]) : re(s[b].default)), c), {});
2381
- if (y && (!f || !m.find((c) => c === "id"))) {
2382
- const c = y.toLowerCase().replace(/-/g, "_");
2383
- E.id = `${c}_${Math.random().toString().slice(2, 6)}`;
3038
+ function Cr(e, t) {
3039
+ let n;
3040
+ function o(s) {
3041
+ const { properties: a, title: h, ignore: y } = s, b = y && Array.isArray(y), P = Object.keys(a).reduce((m, f) => ((!b || !y.find((F) => F === f)) && (m[f] = a[f].type === "object" && a[f].properties ? o(a[f]) : ie(a[f].default)), m), {});
3042
+ if (h && (!b || !y.find((m) => m === "id"))) {
3043
+ const m = h.toLowerCase().replace(/-/g, "_");
3044
+ P.id = `${m}_${Math.random().toString().slice(2, 6)}`;
2384
3045
  }
2385
- return E;
2386
- }
2387
- function o(a) {
2388
- const { properties: s, title: y, required: m } = a;
2389
- if (m && Array.isArray(m)) {
2390
- const f = m.reduce((E, c) => (E[c] = s[c].type === "object" && s[c].properties ? n(s[c]) : re(s[c].default), E), {});
2391
- if (y && m.find((E) => E === "id")) {
2392
- const E = y.toLowerCase().replace(/-/g, "_");
2393
- f.id = `${E}_${Math.random().toString().slice(2, 6)}`;
3046
+ return P;
3047
+ }
3048
+ function r(s) {
3049
+ const { properties: a, title: h, required: y } = s;
3050
+ if (y && Array.isArray(y)) {
3051
+ const b = y.reduce((P, m) => (P[m] = a[m].type === "object" && a[m].properties ? o(a[m]) : ie(a[m].default), P), {});
3052
+ if (h && y.find((P) => P === "id")) {
3053
+ const P = h.toLowerCase().replace(/-/g, "_");
3054
+ b.id = `${P}_${Math.random().toString().slice(2, 6)}`;
2394
3055
  }
2395
- return f;
3056
+ return b;
2396
3057
  }
2397
3058
  return {
2398
- type: y
3059
+ type: h
2399
3060
  };
2400
3061
  }
2401
- function p(a, s = {}, y) {
2402
- const m = e[a];
2403
- if (m) {
2404
- let f = o(m);
2405
- const E = t[a];
2406
- return f = E ? E({ getSchemaByType: p }, f, s, y) : f, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(f), f;
3062
+ function c(s, a = {}, h) {
3063
+ const y = e[s];
3064
+ if (y) {
3065
+ let b = r(y);
3066
+ const P = t[s];
3067
+ return b = P ? P({ getSchemaByType: c }, b, a, h) : b, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(b), b;
2407
3068
  }
2408
3069
  return null;
2409
3070
  }
2410
- function i(a, s) {
2411
- const y = n(s);
2412
- return Object.keys(y).reduce((m, f) => (Object.prototype.hasOwnProperty.call(a, f) && (m[f] && ve(m[f]) && ve(a[f] || !a[f]) ? Object.assign(m[f], a[f] || {}) : m[f] = a[f]), m), y), y;
3071
+ function i(s, a) {
3072
+ const h = o(a);
3073
+ return Object.keys(h).reduce((y, b) => (Object.prototype.hasOwnProperty.call(s, b) && (y[b] && we(y[b]) && we(s[b] || !s[b]) ? Object.assign(y[b], s[b] || {}) : y[b] = s[b]), y), h), h;
2413
3074
  }
2414
- function u(a, s) {
2415
- return Object.keys(a).filter((m) => a[m] != null).reduce((m, f) => {
2416
- if (s.has(f)) {
2417
- const E = s.get(f);
2418
- if (typeof E == "string")
2419
- m[E] = a[f];
3075
+ function u(s, a) {
3076
+ return Object.keys(s).filter((y) => s[y] != null).reduce((y, b) => {
3077
+ if (a.has(b)) {
3078
+ const P = a.get(b);
3079
+ if (typeof P == "string")
3080
+ y[P] = s[b];
2420
3081
  else {
2421
- const c = E(f, a[f], a);
2422
- Object.assign(m, c);
3082
+ const m = P(b, s[b], s);
3083
+ Object.assign(y, m);
2423
3084
  }
2424
3085
  } else
2425
- m[f] = a[f];
2426
- return m;
3086
+ y[b] = s[b];
3087
+ return y;
2427
3088
  }, {});
2428
3089
  }
2429
- function S(a, s, y = /* @__PURE__ */ new Map()) {
2430
- const m = i(a, s);
2431
- return u(m, y);
2432
- }
2433
- function g(a) {
2434
- var y;
2435
- const s = a.type;
2436
- if (s) {
2437
- const m = e[s];
2438
- if (!m)
2439
- return a;
2440
- const f = i(a, m), E = ((y = a.editor) == null ? void 0 : y.type) || "";
2441
- if (E) {
2442
- const c = e[E], b = i(a.editor, c);
2443
- f.editor = b;
3090
+ function V(s, a, h = /* @__PURE__ */ new Map()) {
3091
+ const y = i(s, a);
3092
+ return u(y, h);
3093
+ }
3094
+ function d(s) {
3095
+ var h;
3096
+ const a = s.type;
3097
+ if (a) {
3098
+ const y = e[a];
3099
+ if (!y)
3100
+ return s;
3101
+ const b = i(s, y), P = ((h = s.editor) == null ? void 0 : h.type) || "";
3102
+ if (P) {
3103
+ const m = e[P], f = i(s.editor, m);
3104
+ b.editor = f;
2444
3105
  }
2445
- return f;
3106
+ return b;
2446
3107
  }
2447
- return a;
3108
+ return s;
2448
3109
  }
2449
- function v(a) {
2450
- r = a;
3110
+ function v(s) {
3111
+ n = s;
2451
3112
  }
2452
- return { getSchemaByType: p, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: S, mappingSchemaToProps: u, setDesignerContext: v };
3113
+ return { getSchemaByType: c, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: V, mappingSchemaToProps: u, setDesignerContext: v };
2453
3114
  }
2454
- const Mn = {}, Nn = {}, { resolveSchemaWithDefaultValue: jn } = Bn(Mn, Nn), Gn = {}, qn = {};
2455
- On(Gn, qn, jn);
2456
- const te = class te {
3115
+ const Tr = {}, kr = {}, { resolveSchemaWithDefaultValue: Vr } = Cr(Tr, kr), wr = {}, xr = {};
3116
+ Fr(wr, xr, Vr);
3117
+ const se = class se {
2457
3118
  /**
2458
3119
  * 根据绑定字段类型获取可用的输入类控件
2459
3120
  */
2460
- static getEditorTypesByMDataType(t, r = !1, n = "") {
2461
- if (r)
2462
- return [{ key: h["language-textbox"].type, value: h["language-textbox"].name }];
2463
- let o = te.fieldControlTypeMapping[t];
2464
- if (n === "data-grid-column" && (o != null && o.length)) {
2465
- const p = [h["check-group"].type, h["radio-group"].type, h.image.type, h["rich-text-editor"].type];
2466
- o = o.filter((i) => !p.includes(i.key));
3121
+ static getEditorTypesByMDataType(t, n = !1, o = "") {
3122
+ if (n)
3123
+ return [{ key: C["language-textbox"].type, value: C["language-textbox"].name }];
3124
+ let r = se.fieldControlTypeMapping[t];
3125
+ if (o === "data-grid-column" && (r != null && r.length)) {
3126
+ const c = [C["check-group"].type, C["radio-group"].type, C.image.type, C["rich-text-editor"].type];
3127
+ r = r.filter((i) => !c.includes(i.key));
2467
3128
  }
2468
- return o;
3129
+ return r;
2469
3130
  }
2470
3131
  /**
2471
3132
  * 获取所有输入类控件
2472
3133
  */
2473
3134
  static getAllInputTypes() {
2474
3135
  const t = [];
2475
- for (const r in te.fieldControlTypeMapping)
2476
- te.fieldControlTypeMapping[r].forEach((n) => {
2477
- t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
3136
+ for (const n in se.fieldControlTypeMapping)
3137
+ se.fieldControlTypeMapping[n].forEach((o) => {
3138
+ t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
2478
3139
  });
2479
3140
  return t;
2480
3141
  }
@@ -2482,154 +3143,156 @@ const te = class te {
2482
3143
  * 提供schema字段基础属性和DOM控件属性的映射
2483
3144
  * @param control 控件元数据
2484
3145
  */
2485
- static mappingDomPropAndSchemaProp(t, r) {
2486
- var p;
2487
- const n = (p = t.editor) == null ? void 0 : p.type, o = [];
2488
- return (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && r && r.categoryId && r.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === h["input-group"].type || n === h.textarea.type || n === h["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === h["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === h["combo-list"].type || n === h["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === h["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === h["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === h.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === h["data-grid-column"].type || t.type === h["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
3146
+ static mappingDomPropAndSchemaProp(t, n) {
3147
+ var c;
3148
+ const o = (c = t.editor) == null ? void 0 : c.type, r = [];
3149
+ return (t.type === C["data-grid-column"].type || t.type === C["tree-grid-column"].type) && n && n.categoryId && n.categoryId.indexOf("gridFieldEditor") < 0 && r.push({ domField: "title", schemaField: "name" }), r.push({ domField: "label", schemaField: "name" }), r.push({ domField: "editor.required", schemaField: "require" }), r.push({ domField: "editor.readonly", schemaField: "readonly" }), (o === C["input-group"].type || o === C.textarea.type || o === C["number-spinner"].type) && r.push({ domField: "editor.maxLength", schemaField: "type.length" }), o === C["number-spinner"].type && r.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === C["data-grid-column"].type || t.type === C["tree-grid-column"].type) && r.push({ domField: "formatter.precision", schemaField: "type.precision" }), (o === C["combo-list"].type || o === C["radio-group"].type) && r.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === C["data-grid-column"].type || t.type === C["tree-grid-column"].type) && r.push({ domField: "formatter.data", schemaField: "type.enumValues" }), o === C["date-picker"].type && (r.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), r.push({ domField: "editor.fieldType", schemaField: "type.name" })), o === C["number-spinner"].type && (r.push({ domField: "editor.max", schemaField: "editor.maxValue" }), r.push({ domField: "editor.min", schemaField: "editor.minValue" })), o === C.lookup.type && (r.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), r.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), r.push({ domField: "editor.textField", schemaField: "editor.textField" }), r.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), r.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), r.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), r.push({ domField: "path", schemaField: "bindingPath" }), r.push({ domField: "binding.path", schemaField: "bindingField" }), r.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === C["data-grid-column"].type || t.type === C["tree-grid-column"].type) && r.push({ domField: "field", schemaField: "bindingPath" }), r;
2489
3150
  }
2490
3151
  };
2491
3152
  /**
2492
3153
  * <字段类型,可配置的控件类型列表>的映射
2493
3154
  */
2494
- L(te, "fieldControlTypeMapping", {
3155
+ O(se, "fieldControlTypeMapping", {
2495
3156
  String: [
2496
- { key: h["input-group"].type, value: h["input-group"].name },
2497
- { key: h.lookup.type, value: h.lookup.name },
2498
- { key: h.image.type, value: h.image.name },
2499
- { key: h["date-picker"].type, value: h["date-picker"].name },
2500
- { key: h.switch.type, value: h.switch.name },
2501
- { key: h["check-box"].type, value: h["check-box"].name },
2502
- { key: h["check-group"].type, value: h["check-group"].name },
2503
- { key: h["radio-group"].type, value: h["radio-group"].name },
2504
- { key: h["combo-list"].type, value: h["combo-list"].name },
2505
- { key: h.textarea.type, value: h.textarea.name },
2506
- { key: h["time-picker"].type, value: h["time-picker"].name }
3157
+ { key: C["input-group"].type, value: C["input-group"].name },
3158
+ { key: C.lookup.type, value: C.lookup.name },
3159
+ { key: C.image.type, value: C.image.name },
3160
+ { key: C["date-picker"].type, value: C["date-picker"].name },
3161
+ { key: C.switch.type, value: C.switch.name },
3162
+ { key: C["check-box"].type, value: C["check-box"].name },
3163
+ { key: C["check-group"].type, value: C["check-group"].name },
3164
+ { key: C["radio-group"].type, value: C["radio-group"].name },
3165
+ { key: C["combo-list"].type, value: C["combo-list"].name },
3166
+ { key: C.textarea.type, value: C.textarea.name },
3167
+ { key: C["time-picker"].type, value: C["time-picker"].name }
2507
3168
  ],
2508
3169
  Text: [
2509
- { key: h.textarea.type, value: h.textarea.name },
2510
- { key: h.lookup.type, value: h.lookup.name },
2511
- { key: h.image.type, value: h.image.name },
2512
- { key: h["rich-text-editor"].type, value: h["rich-text-editor"].name }
3170
+ { key: C.textarea.type, value: C.textarea.name },
3171
+ { key: C.lookup.type, value: C.lookup.name },
3172
+ { key: C.image.type, value: C.image.name },
3173
+ { key: C["rich-text-editor"].type, value: C["rich-text-editor"].name }
2513
3174
  ],
2514
3175
  Decimal: [
2515
- { key: h["number-spinner"].type, value: h["number-spinner"].name }
3176
+ { key: C["number-spinner"].type, value: C["number-spinner"].name }
2516
3177
  ],
2517
3178
  Integer: [
2518
- { key: h["number-spinner"].type, value: h["number-spinner"].name }
3179
+ { key: C["number-spinner"].type, value: C["number-spinner"].name }
2519
3180
  ],
2520
3181
  Number: [
2521
- { key: h["number-spinner"].type, value: h["number-spinner"].name },
2522
- { key: h.switch.type, value: h.switch.name },
2523
- { key: h["check-box"].type, value: h["check-box"].name }
3182
+ { key: C["number-spinner"].type, value: C["number-spinner"].name },
3183
+ { key: C.switch.type, value: C.switch.name },
3184
+ { key: C["check-box"].type, value: C["check-box"].name }
2524
3185
  ],
2525
3186
  BigNumber: [
2526
- { key: h["number-spinner"].type, value: h["number-spinner"].name }
3187
+ { key: C["number-spinner"].type, value: C["number-spinner"].name }
2527
3188
  ],
2528
3189
  Date: [
2529
- { key: h["date-picker"].type, value: h["date-picker"].name }
3190
+ { key: C["date-picker"].type, value: C["date-picker"].name }
2530
3191
  ],
2531
3192
  DateTime: [
2532
- { key: h["date-picker"].type, value: h["date-picker"].name }
3193
+ { key: C["date-picker"].type, value: C["date-picker"].name }
2533
3194
  ],
2534
3195
  Boolean: [
2535
- { key: h.switch.type, value: h.switch.name },
2536
- { key: h["check-box"].type, value: h["check-box"].name }
3196
+ { key: C.switch.type, value: C.switch.name },
3197
+ { key: C["check-box"].type, value: C["check-box"].name }
2537
3198
  ],
2538
3199
  Enum: [
2539
- { key: h["combo-list"].type, value: h["combo-list"].name },
2540
- { key: h["radio-group"].type, value: h["radio-group"].name }
3200
+ { key: C["combo-list"].type, value: C["combo-list"].name },
3201
+ { key: C["radio-group"].type, value: C["radio-group"].name }
2541
3202
  ],
2542
3203
  Object: [
2543
- { key: h.lookup.type, value: h.lookup.name },
2544
- { key: h["combo-list"].type, value: h["combo-list"].name },
2545
- { key: h["radio-group"].type, value: h["radio-group"].name }
3204
+ { key: C.lookup.type, value: C.lookup.name },
3205
+ { key: C["combo-list"].type, value: C["combo-list"].name },
3206
+ { key: C["radio-group"].type, value: C["radio-group"].name }
2546
3207
  ]
2547
3208
  });
2548
- let Ce = te;
2549
- var ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {}), je = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(je || {});
2550
- function An(e, t, r) {
2551
- function n() {
2552
- const i = r.componentId;
3209
+ let Ne = se;
3210
+ var he = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(he || {}), De = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(De || {});
3211
+ function Sr(e, t, n) {
3212
+ function o() {
3213
+ const i = n.componentId;
2553
3214
  if (!i)
2554
3215
  return !1;
2555
3216
  const u = e.formSchemaUtils.getViewModelIdByComponentId(i);
2556
3217
  if (!u)
2557
3218
  return !1;
2558
- const { schema: S } = t, { designViewModelUtils: g } = e, v = g.getDgViewModel(u), a = v == null ? void 0 : v.fields.find((s) => s.id === S.binding.field);
2559
- return !(!a || a.$type !== je.SimpleField);
3219
+ const { schema: V } = t, { designViewModelUtils: d } = e, v = d.getDgViewModel(u), s = v == null ? void 0 : v.fields.find((a) => a.id === V.binding.field);
3220
+ return !(!s || s.$type !== De.SimpleField);
2560
3221
  }
2561
- function o() {
3222
+ function r() {
2562
3223
  const { schema: i } = t;
2563
3224
  return !!e.formSchemaUtils.getVariableById(i.binding.field);
2564
3225
  }
2565
- function p() {
2566
- var S;
3226
+ function c() {
3227
+ var V;
2567
3228
  const { schema: i } = t;
2568
3229
  let u = !0;
2569
- if (!e || !((S = i.binding) != null && S.field))
3230
+ if (!e || !((V = i.binding) != null && V.field))
2570
3231
  return u;
2571
3232
  switch (i.binding.type) {
2572
- case ue.Form: {
2573
- u = n();
3233
+ case he.Form: {
3234
+ u = o();
2574
3235
  break;
2575
3236
  }
2576
- case ue.Variable:
2577
- u = o();
3237
+ case he.Variable:
3238
+ u = r();
2578
3239
  }
2579
3240
  return u;
2580
3241
  }
2581
- return { checkBindingFieldValidation: p };
3242
+ return { checkBindingFieldValidation: c };
2582
3243
  }
2583
- const $n = /* @__PURE__ */ Q({
3244
+ const Er = /* @__PURE__ */ ee({
2584
3245
  name: "FDynamicFormGroupDesign",
2585
- props: ze,
3246
+ props: ot,
2586
3247
  emits: ["change", "update:modelValue"],
2587
3248
  setup(e, t) {
2588
- var U;
2589
- const r = M(e.id), n = M(e.customClass), o = M(e.editor), p = M(e.label), i = M(e.modelValue), u = M(!0), S = M(((U = e.editor) == null ? void 0 : U.required) === !0), g = M(e.showLabel);
2590
- M(e.type);
2591
- const v = M(), a = D("designer-host-service"), s = D("design-item-context"), y = W(() => g.value ? e.showLabelType : "none"), {
2592
- resolveEditorProps: m,
2593
- resolveEditorType: f
2594
- } = ln(), E = W(() => ({
2595
- "form-group": !0,
2596
- "farris-form-group": !0,
2597
- "common-group": !0,
2598
- "q-state-readonly": u.value,
2599
- "form-group-in-canvas": !0
2600
- })), c = W(() => {
2601
- const R = o.value.type || "input-group", l = f(R), d = m(R, o.value);
2602
- return () => B(l, pe({
3249
+ var J;
3250
+ const n = B(e.id), o = B(e.customClass), r = B(e.editor), c = B(e.label), i = B(e.modelValue), u = B(!0), V = B(((J = e.editor) == null ? void 0 : J.required) === !0), d = B(e.showLabel), v = B(), s = B(e.editor.type || "input-group"), a = re("designer-host-service"), h = re("design-item-context"), y = Q(() => d.value ? e.showLabelType : "none"), {
3251
+ resolveEditorProps: b,
3252
+ resolveEditorType: P
3253
+ } = Xo(), m = Q(() => {
3254
+ const l = {
3255
+ "form-group": !0,
3256
+ "farris-form-group": !0,
3257
+ "common-group": !0,
3258
+ "q-state-readonly": u.value,
3259
+ "form-group-in-canvas": !0,
3260
+ "align-items-start": r.value.type === "textarea" || r.value.type === "rich-text-editor"
3261
+ };
3262
+ return l["form-group--has-" + s.value] = !0, l;
3263
+ }), f = Q(() => {
3264
+ const l = r.value.type || "input-group", g = P(l), E = b(l, r.value);
3265
+ return () => L(g, de({
2603
3266
  ref: v
2604
- }, d, {
3267
+ }, E, {
2605
3268
  modelValue: i.value,
2606
- "onUpdate:modelValue": (V) => i.value = V
3269
+ "onUpdate:modelValue": (N) => i.value = N
2607
3270
  }), null);
2608
3271
  });
2609
- _([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([R, l, d, V, O, k, P]) => {
2610
- var I;
2611
- r.value = R, n.value = l, o.value = {
2612
- ...d
2613
- }, p.value = V, i.value = O, u.value = k, S.value = ((I = o.value) == null ? void 0 : I.required) === !0, g.value = P;
3272
+ D([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([l, g, E, N, w, M, I]) => {
3273
+ var U;
3274
+ n.value = l, o.value = g, r.value = {
3275
+ ...E
3276
+ }, c.value = N, i.value = w, u.value = M, V.value = ((U = r.value) == null ? void 0 : U.required) === !0, d.value = I;
2614
3277
  }, {
2615
3278
  deep: !0
2616
3279
  });
2617
- const x = !D("external-container-id"), {
2618
- checkBindingFieldValidation: j
2619
- } = An(a, s, e);
2620
- function $() {
2621
- const R = x ? j() : !0;
2622
- return B(Ue, {
2623
- id: `${r.value}-lable`,
3280
+ const j = !re("external-container-id"), {
3281
+ checkBindingFieldValidation: A
3282
+ } = Sr(a, h, e);
3283
+ function q() {
3284
+ const l = j ? A() : !0;
3285
+ return L(rt, {
3286
+ id: `${n.value}-lable`,
2624
3287
  showType: y.value,
2625
- required: S.value,
2626
- text: p.value,
2627
- title: p.value,
2628
- valid: R,
3288
+ required: V.value,
3289
+ text: c.value,
3290
+ title: c.value,
3291
+ valid: l,
2629
3292
  inValidTip: "绑定信息已失效,请切换绑定或移除控件"
2630
3293
  }, null);
2631
3294
  }
2632
- const G = W(() => {
3295
+ const _ = Q(() => {
2633
3296
  if (e.fill)
2634
3297
  return {
2635
3298
  maxWidth: "none"
@@ -2637,189 +3300,189 @@ const $n = /* @__PURE__ */ Q({
2637
3300
  });
2638
3301
  return t.expose({
2639
3302
  editorRef: v
2640
- }), () => B("div", {
2641
- id: `${r.value}-input-group`,
2642
- class: n.value
2643
- }, [B("div", {
3303
+ }), () => L("div", {
3304
+ id: `${n.value}-input-group`,
3305
+ class: o.value
3306
+ }, [L("div", {
2644
3307
  class: "farris-group-wrap",
2645
- style: G.value
2646
- }, [B("div", {
2647
- class: E.value
2648
- }, [$(), B("div", {
3308
+ style: _.value
3309
+ }, [L("div", {
3310
+ class: m.value
3311
+ }, [q(), L("div", {
2649
3312
  class: "farris-input-wrap"
2650
- }, [c.value()])])])]);
3313
+ }, [f.value()])])])]);
2651
3314
  }
2652
3315
  });
2653
- function Rn(e, t) {
2654
- function r() {
2655
- return !0;
2656
- }
3316
+ function Pr(e, t) {
2657
3317
  function n() {
2658
3318
  return !0;
2659
3319
  }
2660
3320
  function o() {
3321
+ return !0;
3322
+ }
3323
+ function r() {
2661
3324
  return !1;
2662
3325
  }
2663
- function p() {
3326
+ function c() {
2664
3327
  return !0;
2665
3328
  }
2666
- function i(a) {
2667
- var c;
2668
- const s = t == null ? void 0 : t.designViewModelUtils, y = t == null ? void 0 : t.formSchemaUtils, m = (c = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : c.belongedComponentId;
2669
- if (!m || !s || !y)
3329
+ function i(s) {
3330
+ var m;
3331
+ const a = t == null ? void 0 : t.designViewModelUtils, h = t == null ? void 0 : t.formSchemaUtils, y = (m = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : m.belongedComponentId;
3332
+ if (!y || !a || !h)
2670
3333
  return;
2671
- const f = y.getViewModelIdByComponentId(m), E = s.getDgViewModel(f);
2672
- E && E.removeField([a]);
2673
- }
2674
- function u(a, s) {
2675
- const y = t == null ? void 0 : t.formSchemaUtils, { schema: m } = e;
2676
- if (y.getComponents().find((E) => {
2677
- let c = y.getControlsInCmpWidthBinding(E.viewModel, a);
2678
- if (c = c.filter((b) => {
3334
+ const b = h.getViewModelIdByComponentId(y), P = a.getDgViewModel(b);
3335
+ P && P.removeField([s]);
3336
+ }
3337
+ function u(s, a) {
3338
+ const h = t == null ? void 0 : t.formSchemaUtils, { schema: y } = e;
3339
+ if (h.getComponents().find((P) => {
3340
+ let m = h.getControlsInCmpWidthBinding(P.viewModel, s);
3341
+ if (m = m.filter((f) => {
2679
3342
  var j;
2680
- if (b.id === m.id)
3343
+ if (f.id === y.id)
2681
3344
  return !1;
2682
- const x = s.type === "visible" ? b[s.type] : (j = b.editor) == null ? void 0 : j[s.type];
2683
- if (x && x.type === "Expression" && x.expressionId === s.id)
3345
+ const F = a.type === "visible" ? f[a.type] : (j = f.editor) == null ? void 0 : j[a.type];
3346
+ if (F && F.type === "Expression" && F.expressionId === a.id)
2684
3347
  return !0;
2685
- }), c.length)
3348
+ }), m.length)
2686
3349
  return !0;
2687
3350
  }))
2688
3351
  return !0;
2689
3352
  }
2690
- function S(a) {
2691
- var m;
2692
- const s = t == null ? void 0 : t.formSchemaUtils, { schema: y } = e;
2693
- if (s.getExpressions().length) {
2694
- const f = s.getExpressions(), E = f.findIndex((c) => c.target === a);
2695
- E > -1 && ((m = f[E].rules) == null || m.map((c) => {
2696
- var b;
2697
- switch (c.type) {
3353
+ function V(s) {
3354
+ var y;
3355
+ const a = t == null ? void 0 : t.formSchemaUtils, { schema: h } = e;
3356
+ if (a.getExpressions().length) {
3357
+ const b = a.getExpressions(), P = b.findIndex((m) => m.target === s);
3358
+ P > -1 && ((y = b[P].rules) == null || y.map((m) => {
3359
+ var f;
3360
+ switch (m.type) {
2698
3361
  case "visible":
2699
3362
  case "readonly":
2700
3363
  case "required": {
2701
- const x = c.type === "visible" ? y[c.type] : (b = y.editor) == null ? void 0 : b[c.type];
2702
- x && x.type === "Expression" && x.expressionId === c.id && (u(a, c) || (c.needDelete = !0));
3364
+ const F = m.type === "visible" ? h[m.type] : (f = h.editor) == null ? void 0 : f[m.type];
3365
+ F && F.type === "Expression" && F.expressionId === m.id && (u(s, m) || (m.needDelete = !0));
2703
3366
  break;
2704
3367
  }
2705
3368
  default:
2706
- u(a, c) || (c.needDelete = !0);
3369
+ u(s, m) || (m.needDelete = !0);
2707
3370
  }
2708
- }), f[E].rules = f[E].rules.filter((c) => !c.needDelete));
3371
+ }), b[P].rules = b[P].rules.filter((m) => !m.needDelete));
2709
3372
  }
2710
3373
  }
2711
- function g() {
2712
- var s, y;
2713
- const a = (s = e == null ? void 0 : e.parent) == null ? void 0 : s.componentInstance.value;
2714
- ((y = a == null ? void 0 : a.schema) == null ? void 0 : y.type) === h["response-layout-item"].type && (a != null && a.schema.appearance.class) && (a.schema.appearance.class = a.schema.appearance.class.replace("f-form-layout", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form-controls-inline", ""), a.schema.appearance.class = a.schema.appearance.class.replace("farris-form-auto", ""), a.schema.appearance.class = a.schema.appearance.class.trim().replace(" ", " "));
3374
+ function d() {
3375
+ var a, h;
3376
+ const s = (a = e == null ? void 0 : e.parent) == null ? void 0 : a.componentInstance.value;
3377
+ ((h = s == null ? void 0 : s.schema) == null ? void 0 : h.type) === C["response-layout-item"].type && (s != null && s.schema.appearance.class) && (s.schema.appearance.class = s.schema.appearance.class.replace("f-form-layout", ""), s.schema.appearance.class = s.schema.appearance.class.replace("farris-form", ""), s.schema.appearance.class = s.schema.appearance.class.replace("farris-form-controls-inline", ""), s.schema.appearance.class = s.schema.appearance.class.replace("farris-form-auto", ""), s.schema.appearance.class = s.schema.appearance.class.trim().replace(" ", " "));
2715
3378
  }
2716
3379
  function v() {
2717
- const { schema: a } = e, s = a.binding && a.binding.field;
2718
- s && (i(s), S(s)), g();
3380
+ const { schema: s } = e, a = s.binding && s.binding.field;
3381
+ a && (i(a), V(a)), d();
2719
3382
  }
2720
3383
  return {
2721
- canAccepts: o,
2722
- checkCanDeleteComponent: n,
2723
- checkCanMoveComponent: r,
2724
- hideNestedPaddingInDesginerView: p,
3384
+ canAccepts: r,
3385
+ checkCanDeleteComponent: o,
3386
+ checkCanMoveComponent: n,
3387
+ hideNestedPaddingInDesginerView: c,
2725
3388
  onRemoveComponent: v
2726
3389
  };
2727
3390
  }
2728
- const zn = /* @__PURE__ */ Q({
3391
+ const Or = /* @__PURE__ */ ee({
2729
3392
  name: "FFormGroupDesign",
2730
- props: Oe,
3393
+ props: _e,
2731
3394
  emits: [],
2732
3395
  setup(e, t) {
2733
- const r = M(), n = D("design-item-context"), o = D("designer-host-service"), p = Rn(n, o), i = Ve(r, n, p);
2734
- return ke(() => {
2735
- r.value.componentInstance = i, i.value.getPropConfig = (...u) => {
2736
- var g, v, a;
2737
- let S = Fr[e.editor.type];
2738
- return S && Object.keys(S).length === 0 && ((g = r.value) != null && g.editorRef) && ((a = (v = r.value) == null ? void 0 : v.editorRef) != null && a.getPropConfig) && (S = r.value.editorRef.getPropConfig(...u, i.value)), S;
3396
+ const n = B(), o = re("design-item-context"), r = re("designer-host-service"), c = Pr(o, r), i = Re(n, o, c);
3397
+ return be(() => {
3398
+ n.value.componentInstance = i, i.value.getPropConfig = (...u) => {
3399
+ var d, v, s;
3400
+ let V = yt[e.editor.type];
3401
+ return V && Object.keys(V).length === 0 && ((d = n.value) != null && d.editorRef) && ((s = (v = n.value) == null ? void 0 : v.editorRef) != null && s.getPropConfig) && (V = n.value.editorRef.getPropConfig(...u, i.value)), V;
2739
3402
  };
2740
- }), t.expose(i.value), () => B($n, pe(e, {
2741
- ref: r
3403
+ }), t.expose(i.value), () => L(Er, de(e, {
3404
+ ref: n
2742
3405
  }), null);
2743
3406
  }
2744
- }), ki = /* @__PURE__ */ Q({
3407
+ }), ds = /* @__PURE__ */ ee({
2745
3408
  name: "FConditionFieldsDesign",
2746
3409
  directives: {
2747
- "area-response": Qe
3410
+ "area-response": dt
2748
3411
  },
2749
- props: me,
3412
+ props: Ce,
2750
3413
  emits: ["valueChange", "blur", "focus", "click", "input"],
2751
3414
  setup(e, t) {
2752
- const r = M(), n = M(e.key), o = M(e.conditions), p = ge(e), {
3415
+ const n = B(), o = B(e.key), r = B(e.conditions), c = ke(e), {
2753
3416
  fieldMap: i,
2754
3417
  loadFieldConfigs: u
2755
- } = p, S = Pe(e, t, r), {
2756
- resizeObserver: g
2757
- } = S;
2758
- u(!0), Te(() => {
2759
- var s;
2760
- (s = g.value) == null || s.unobserve(r.value);
2761
- }), _(() => e.conditions, () => {
2762
- o.value = e.conditions;
3418
+ } = c, V = We(e, t, n), {
3419
+ resizeObserver: d
3420
+ } = V;
3421
+ u(!0), Be(() => {
3422
+ var a;
3423
+ (a = d.value) == null || a.unobserve(n.value);
3424
+ }), D(() => e.conditions, () => {
3425
+ r.value = e.conditions;
2763
3426
  });
2764
- const v = W(() => ({
3427
+ const v = Q(() => ({
2765
3428
  // row: true,
2766
3429
  "f-utils-flex-row-wrap": !0,
2767
3430
  "farris-form": !0,
2768
3431
  "condition-div": !0
2769
3432
  }));
2770
- function a() {
2771
- return o.value.map((s) => {
2772
- var f, E;
2773
- const y = (f = i.get(s.fieldCode)) == null ? void 0 : f.editor;
2774
- y && (y.disabled = !0);
2775
- let m = ((E = y == null ? void 0 : y.appearance) == null ? void 0 : E.class) || e.itemClass;
2776
- return y != null && y.multiLineLabel && (m = m + " farris-group-multi-label"), B(zn, {
2777
- customClass: m,
2778
- label: (y == null ? void 0 : y.showLabel) === !1 ? " " : s.fieldName,
2779
- required: y == null ? void 0 : y.required,
2780
- editor: y,
3433
+ function s() {
3434
+ return r.value.map((a) => {
3435
+ var b, P;
3436
+ const h = (b = i.get(a.fieldCode)) == null ? void 0 : b.editor;
3437
+ h && (h.disabled = !0);
3438
+ let y = ((P = h == null ? void 0 : h.appearance) == null ? void 0 : P.class) || e.itemClass;
3439
+ return h != null && h.multiLineLabel && (y = y + " farris-group-multi-label"), L(Or, {
3440
+ customClass: y,
3441
+ label: (h == null ? void 0 : h.showLabel) === !1 ? " " : a.fieldName,
3442
+ required: h == null ? void 0 : h.required,
3443
+ editor: h,
2781
3444
  type: "form-group"
2782
3445
  }, null);
2783
3446
  });
2784
3447
  }
2785
- return () => ce(B("div", {
3448
+ return () => ue(L("div", {
2786
3449
  class: v.value,
2787
- key: n.value,
2788
- ref: r
2789
- }, [a()]), [[de("area-response")]]);
3450
+ key: o.value,
3451
+ ref: n
3452
+ }, [s()]), [[ce("area-response")]]);
2790
3453
  }
2791
3454
  });
2792
- ae.install = (e) => {
2793
- e.component(be.name, be).component(ae.name, ae);
3455
+ ge.install = (e) => {
3456
+ e.component(Oe.name, Oe).component(ge.name, ge);
2794
3457
  };
2795
3458
  export {
2796
- Tr as CheckBoxValue,
2797
- Se as ComboListValue,
2798
- kr as ComboLookupValue,
2799
- Me as CompareType,
2800
- _r as CompareTypeInEditor,
2801
- oe as DatePickerValue,
2802
- fe as DateRangeValue,
2803
- Or as DateTimePickerValue,
2804
- Ur as EnumType,
2805
- be as FConditionFields,
2806
- ki as FConditionFieldsDesign,
2807
- ae as FConditionList,
2808
- wr as InputGroupValue,
2809
- xr as LookupValue,
2810
- Vr as MonthPickerValue,
2811
- Sr as MonthRangeValue,
2812
- Er as NumberRangeValue,
2813
- Ir as NumberSpinnerValue,
2814
- Lr as RadioGroupValue,
2815
- Ee as TextValue,
2816
- Be as ValueType,
2817
- Pr as YearPickerValue,
2818
- me as conditionProps,
2819
- ae as default,
2820
- Jr as getCompareTypeName,
2821
- Qr as useCompare,
2822
- Xr as useCondition,
2823
- Le as useConditionUtils,
2824
- Ie as useConditionValue
3459
+ Jn as CheckBoxValue,
3460
+ qe as ComboListValue,
3461
+ _n as ComboLookupValue,
3462
+ Ye as CompareType,
3463
+ jo as CompareTypeInEditor,
3464
+ pe as DatePickerValue,
3465
+ Te as DateRangeValue,
3466
+ no as DateTimePickerValue,
3467
+ Mo as EnumType,
3468
+ Oe as FConditionFields,
3469
+ ds as FConditionFieldsDesign,
3470
+ ge as FConditionList,
3471
+ Qn as InputGroupValue,
3472
+ Xn as LookupValue,
3473
+ Yn as MonthPickerValue,
3474
+ Hn as MonthRangeValue,
3475
+ Dn as NumberRangeValue,
3476
+ Kn as NumberSpinnerValue,
3477
+ eo as RadioGroupValue,
3478
+ Ge as TextValue,
3479
+ Xe as ValueType,
3480
+ to as YearPickerValue,
3481
+ Ce as conditionProps,
3482
+ ge as default,
3483
+ Bo as getCompareTypeName,
3484
+ $o as useCompare,
3485
+ Ao as useCondition,
3486
+ ze as useConditionUtils,
3487
+ Ue as useConditionValue
2825
3488
  };