@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1

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 (193) hide show
  1. package/components/avatar/index.esm.js +138 -1526
  2. package/components/avatar/index.umd.cjs +1 -6
  3. package/components/button/index.css +1 -1
  4. package/components/button/index.esm.js +15951 -15410
  5. package/components/button/index.umd.cjs +27 -27
  6. package/components/calendar/index.esm.js +269 -255
  7. package/components/calendar/index.umd.cjs +3 -3
  8. package/components/collection-property-editor/index.esm.js +243 -229
  9. package/components/collection-property-editor/index.umd.cjs +2 -2
  10. package/components/combo-list/index.esm.js +32 -32
  11. package/components/combo-list/index.umd.cjs +1 -1
  12. package/components/comment/index.esm.js +473 -456
  13. package/components/comment/index.umd.cjs +6 -6
  14. package/components/component/index.css +1 -1
  15. package/components/component/index.esm.js +2503 -2239
  16. package/components/component/index.umd.cjs +2 -2
  17. package/components/condition/index.esm.js +1064 -954
  18. package/components/condition/index.umd.cjs +2 -2
  19. package/components/data-grid/index.esm.js +1 -1
  20. package/components/data-grid/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.css +1 -1
  22. package/components/designer-canvas/index.esm.js +3894 -3058
  23. package/components/designer-canvas/index.umd.cjs +1 -1
  24. package/components/drawer/index.esm.js +91 -77
  25. package/components/drawer/index.umd.cjs +2 -2
  26. package/components/dynamic-form/index.esm.js +220 -215
  27. package/components/dynamic-form/index.umd.cjs +1 -1
  28. package/components/dynamic-resolver/index.esm.js +145 -131
  29. package/components/dynamic-resolver/index.umd.cjs +2 -2
  30. package/components/dynamic-view/index.esm.js +336 -329
  31. package/components/dynamic-view/index.umd.cjs +1 -1
  32. package/components/events-editor/index.esm.js +1611 -1536
  33. package/components/events-editor/index.umd.cjs +3 -3
  34. package/components/expression-editor/index.esm.js +219 -219
  35. package/components/expression-editor/index.umd.cjs +2 -2
  36. package/components/external-container/index.esm.js +179 -178
  37. package/components/external-container/index.umd.cjs +1 -1
  38. package/components/fieldset/index.esm.js +285 -221
  39. package/components/fieldset/index.umd.cjs +1 -1
  40. package/components/filter-bar/index.css +1 -0
  41. package/components/filter-bar/index.esm.js +1512 -1290
  42. package/components/filter-bar/index.umd.cjs +7 -7
  43. package/components/filter-condition-editor/index.esm.js +851 -831
  44. package/components/filter-condition-editor/index.umd.cjs +3 -3
  45. package/components/flow-canvas/index.esm.js +520 -501
  46. package/components/flow-canvas/index.umd.cjs +8 -8
  47. package/components/image/index.esm.js +101 -79
  48. package/components/image/index.umd.cjs +3 -3
  49. package/components/language-textbox/index.esm.js +330 -251
  50. package/components/language-textbox/index.umd.cjs +2 -2
  51. package/components/list-nav/index.esm.js +399 -313
  52. package/components/list-nav/index.umd.cjs +1 -1
  53. package/components/locale/index.esm.js +3 -0
  54. package/components/locale/index.umd.cjs +1 -1
  55. package/components/lookup/index.esm.js +997 -976
  56. package/components/lookup/index.umd.cjs +2 -2
  57. package/components/mapping-editor/index.esm.js +725 -705
  58. package/components/mapping-editor/index.umd.cjs +1 -1
  59. package/components/message-box/index.esm.js +542 -522
  60. package/components/message-box/index.umd.cjs +1 -1
  61. package/components/nav/index.esm.js +95 -308
  62. package/components/nav/index.umd.cjs +1 -1
  63. package/components/number-range/index.esm.js +115 -107
  64. package/components/number-range/index.umd.cjs +2 -2
  65. package/components/order/index.esm.js +56 -54
  66. package/components/order/index.umd.cjs +1 -1
  67. package/components/page-footer/index.esm.js +135 -123
  68. package/components/page-footer/index.umd.cjs +1 -1
  69. package/components/page-header/index.esm.js +266 -222
  70. package/components/page-header/index.umd.cjs +1 -1
  71. package/components/property-panel/index.esm.js +402 -375
  72. package/components/property-panel/index.umd.cjs +4 -4
  73. package/components/query-solution/index.esm.js +3171 -3061
  74. package/components/query-solution/index.umd.cjs +7 -7
  75. package/components/response-toolbar/index.esm.js +1 -1
  76. package/components/response-toolbar/index.umd.cjs +1 -1
  77. package/components/schema-selector/index.esm.js +1620 -1608
  78. package/components/schema-selector/index.umd.cjs +5 -5
  79. package/components/scroll-navbar/index.esm.js +150 -136
  80. package/components/scroll-navbar/index.umd.cjs +2 -2
  81. package/components/section/index.esm.js +323 -311
  82. package/components/section/index.umd.cjs +2 -2
  83. package/components/sort-condition-editor/index.esm.js +850 -830
  84. package/components/sort-condition-editor/index.umd.cjs +3 -3
  85. package/components/step/index.esm.js +991 -224
  86. package/components/step/index.umd.cjs +1 -1
  87. package/components/tabs/index.esm.js +356 -334
  88. package/components/tabs/index.umd.cjs +1 -1
  89. package/components/wizard/index.esm.js +159 -162
  90. package/components/wizard/index.umd.cjs +1 -1
  91. package/designer/avatar/index.esm.js +1721 -0
  92. package/designer/avatar/index.umd.cjs +6 -0
  93. package/designer/button-edit/index.esm.js +2 -1
  94. package/designer/button-edit/index.umd.cjs +1 -1
  95. package/designer/data-grid/index.esm.js +693 -659
  96. package/designer/data-grid/index.umd.cjs +6 -6
  97. package/designer/data-view/index.esm.js +90 -78
  98. package/designer/data-view/index.umd.cjs +2 -2
  99. package/designer/date-picker/index.esm.js +203 -203
  100. package/designer/date-picker/index.umd.cjs +1 -1
  101. package/designer/drawer/index.esm.js +181 -167
  102. package/designer/drawer/index.umd.cjs +2 -2
  103. package/designer/dynamic-form/index.esm.js +228 -206
  104. package/designer/dynamic-form/index.umd.cjs +2 -2
  105. package/designer/farris-designer.all.esm.js +10014 -9692
  106. package/designer/farris-designer.all.umd.cjs +18 -18
  107. package/designer/index.css +1 -1
  108. package/designer/input-group/index.esm.js +15 -15
  109. package/designer/input-group/index.umd.cjs +1 -1
  110. package/designer/nav/index.esm.js +1719 -0
  111. package/designer/nav/index.umd.cjs +6 -0
  112. package/designer/number-spinner/index.esm.js +8 -7
  113. package/designer/number-spinner/index.umd.cjs +1 -1
  114. package/designer/radio-group/index.esm.js +133 -125
  115. package/designer/radio-group/index.umd.cjs +2 -2
  116. package/designer/response-toolbar/index.esm.js +864 -863
  117. package/designer/response-toolbar/index.umd.cjs +1 -1
  118. package/designer/section/index.esm.js +245 -183
  119. package/designer/section/index.umd.cjs +1 -1
  120. package/designer/tabs/index.css +1 -1
  121. package/designer/tabs/index.esm.js +3667 -2810
  122. package/designer/tabs/index.umd.cjs +2 -2
  123. package/designer/time-picker/index.esm.js +26 -17
  124. package/designer/time-picker/index.umd.cjs +2 -2
  125. package/designer/tree-grid/index.esm.js +69 -37
  126. package/designer/tree-grid/index.umd.cjs +1 -1
  127. package/designer/wizard/index.esm.js +110 -110
  128. package/designer/wizard/index.umd.cjs +3 -3
  129. package/farris.all.esm.js +39993 -39089
  130. package/farris.all.umd.cjs +36 -36
  131. package/index.css +1 -1
  132. package/locales/filter-bar/ui/en.json +1 -0
  133. package/locales/filter-bar/ui/zh-CHS.json +1 -0
  134. package/locales/filter-bar/ui/zh-CHT.json +1 -0
  135. package/locales/ui/en.json +1 -0
  136. package/locales/ui/zh-CHS.json +1 -0
  137. package/locales/ui/zh-CHT.json +1 -0
  138. package/package.json +1 -1
  139. package/types/avatar/designer.d.ts +28 -0
  140. package/types/avatar/index.d.ts +0 -15
  141. package/types/avatar/src/composition/types.d.ts +3 -0
  142. package/types/avatar/src/composition/use-file.d.ts +19 -0
  143. package/types/avatar/src/composition/use-image.d.ts +1 -1
  144. package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
  145. package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
  146. package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
  147. package/types/components.d.ts +3 -0
  148. package/types/condition/index.d.ts +18 -6
  149. package/types/condition/src/condition-fields.component.d.ts +9 -3
  150. package/types/condition/src/condition-fields.design.component.d.ts +9 -3
  151. package/types/condition/src/condition-list.component.d.ts +9 -3
  152. package/types/condition/src/condition.props.d.ts +11 -0
  153. package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
  154. package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
  155. package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
  156. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
  157. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
  158. package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
  159. package/types/dynamic-view/src/components/maps.d.ts +130 -4
  160. package/types/filter-bar/src/composition/types.d.ts +2 -0
  161. package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
  162. package/types/filter-bar/src/locale/locale.d.ts +2 -1
  163. package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
  164. package/types/language-textbox/index.d.ts +65 -2
  165. package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
  166. package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
  167. package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
  168. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  169. package/types/lookup/src/composition/use-compat.d.ts +28 -0
  170. package/types/lookup/src/composition/use-state.d.ts +1 -0
  171. package/types/message-box/src/message-box.service.d.ts +2 -1
  172. package/types/nav/designer.d.ts +28 -0
  173. package/types/nav/index.d.ts +24 -20
  174. package/types/nav/src/designer/nav.design.props.d.ts +29 -0
  175. package/types/nav/src/designer/use-design-rules.d.ts +3 -0
  176. package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
  177. package/types/nav/src/schema/schema-mapper.d.ts +4 -0
  178. package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
  179. package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
  180. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
  182. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
  183. package/types/section/src/designer/section.design.props.d.ts +4 -0
  184. package/types/section/src/property-config/section.property-config.d.ts +39 -0
  185. package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
  186. package/types/step/src/designer/use-designer-rules.d.ts +3 -0
  187. package/types/step/src/designer/use-step-creator.d.ts +6 -0
  188. package/types/step/src/property-config/step.property-config.d.ts +15 -0
  189. package/types/step/src/schema/schema-resolver.d.ts +2 -1
  190. package/types/tabs/src/composition/types.d.ts +4 -0
  191. package/types/tabs/src/tabs.props.d.ts +6 -0
  192. package/types/tooltip/index.d.ts +3 -3
  193. package/types/tooltip/src/tooltip.component.d.ts +2 -2
@@ -1,22 +1,24 @@
1
- var S = Object.defineProperty;
2
- var P = (d, e, t) => e in d ? S(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
3
- var v = (d, e, t) => P(d, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as M, ref as h, computed as C, createVNode as p, inject as V, onMounted as N } from "vue";
5
- import { getCustomClass as T } from "../common/index.esm.js";
6
- import { resolveAppearance as F, createPropsResolver as R } from "../dynamic-resolver/index.esm.js";
7
- import { DgControl as w, canvasChanged as k, refreshCanvas as U, UseTemplateDragAndDropRules as B, useDragulaCommonRule as $, useDesignerComponent as z } from "../designer-canvas/index.esm.js";
8
- import { cloneDeep as A } from "lodash-es";
9
- function O(d, e) {
1
+ var N = Object.defineProperty;
2
+ var T = (a, e, t) => e in a ? N(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var v = (a, e, t) => T(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as S, ref as y, watch as w, computed as C, createVNode as p, inject as M, onMounted as F, nextTick as R } from "vue";
5
+ import { getCustomClass as k } from "../common/index.esm.js";
6
+ import { resolveAppearance as B, createPropsResolver as U } from "../dynamic-resolver/index.esm.js";
7
+ import { DgControl as E, canvasChanged as z, refreshCanvas as O, UseTemplateDragAndDropRules as A, useDragulaCommonRule as $, useDesignerComponent as q, setPositionOfSelectedComponentBtnGroup as D } from "../designer-canvas/index.esm.js";
8
+ import { cloneDeep as L } from "lodash-es";
9
+ function j(a, e) {
10
10
  return { size: e.width || e.height || "" };
11
11
  }
12
- const q = /* @__PURE__ */ new Map([
13
- ["appearance", F],
14
- ["size", O]
12
+ const _ = /* @__PURE__ */ new Map([
13
+ ["appearance", B],
14
+ ["size", j]
15
15
  ]);
16
- function j(d, e, t) {
17
- return e;
16
+ function G(a, e, t) {
17
+ return e.size = {
18
+ width: 220
19
+ }, e.title = "标题", e;
18
20
  }
19
- const D = "https://json-schema.org/draft/2020-12/schema", L = "https://farris-design.gitee.io/list-nav.schema.json", _ = "list-nav", H = "A Farris Container Component", G = "object", J = {
21
+ const H = "https://json-schema.org/draft/2020-12/schema", J = "https://farris-design.gitee.io/list-nav.schema.json", K = "list-nav", Q = "A Farris Container Component", W = "object", X = {
20
22
  id: {
21
23
  description: "The unique identifier for a list-nav",
22
24
  type: "string"
@@ -71,20 +73,30 @@ const D = "https://json-schema.org/draft/2020-12/schema", L = "https://farris-de
71
73
  description: "",
72
74
  type: "string",
73
75
  default: ""
76
+ },
77
+ collapsible: {
78
+ description: "",
79
+ type: "boolean",
80
+ default: !0
81
+ },
82
+ folded: {
83
+ description: "",
84
+ type: "boolean",
85
+ default: !1
74
86
  }
75
- }, K = [
87
+ }, Y = [
76
88
  "id",
77
89
  "type",
78
90
  "contents"
79
- ], Q = {
80
- $schema: D,
81
- $id: L,
82
- title: _,
83
- description: H,
84
- type: G,
85
- properties: J,
86
- required: K
87
- }, E = {
91
+ ], Z = {
92
+ $schema: H,
93
+ $id: J,
94
+ title: K,
95
+ description: Q,
96
+ type: W,
97
+ properties: X,
98
+ required: Y
99
+ }, V = {
88
100
  /** 自定义样式 */
89
101
  customClass: { type: String, default: "" },
90
102
  customStyle: { type: String, default: "" },
@@ -101,90 +113,95 @@ const D = "https://json-schema.org/draft/2020-12/schema", L = "https://farris-de
101
113
  /** 控件禁用状态 */
102
114
  disabled: { Type: Boolean, default: !1 },
103
115
  /** 是否启用拖拽 TODO */
104
- draggable: { Type: Boolean, default: !1 }
105
- }, I = R(E, Q, q, j), x = /* @__PURE__ */ M({
116
+ draggable: { Type: Boolean, default: !1 },
117
+ /** 控制是否可见 */
118
+ visible: { type: Boolean, default: !0 }
119
+ }, I = U(V, Z, _, G), x = /* @__PURE__ */ S({
106
120
  name: "FListNav",
107
- props: E,
121
+ props: V,
108
122
  emits: ["collapse"],
109
- setup(d, e) {
110
- const t = h(d.position), s = h(d.title), i = h(d.folded), r = h(!1);
111
- function n(a) {
112
- a && a.stopPropagation(), !d.disabled && (r.value = !0, i.value = !i.value, e.emit("collapse", i.value));
123
+ setup(a, e) {
124
+ const t = y(a.position), i = y(a.folded), n = y(!1);
125
+ w(() => a.position, (s, l) => {
126
+ s !== l && (t.value = s);
127
+ });
128
+ function o(s) {
129
+ s && s.stopPropagation(), !a.disabled && (n.value = !0, i.value = !i.value, e.emit("collapse", i.value));
113
130
  }
114
- const l = C(() => {
115
- const a = {}, c = ["top", "bottom"].indexOf(t.value) > -1 ? "height" : "width";
116
- return a[c] = i.value ? "0px" : d.size + "px", a;
117
- }), o = C(() => {
118
- const a = {
131
+ const r = C(() => {
132
+ const s = {}, l = ["top", "bottom"].indexOf(t.value) > -1 ? "height" : "width";
133
+ return s[l] = i.value ? "0px" : a.size + "px", s;
134
+ }), d = C(() => {
135
+ const s = {
119
136
  "f-list-nav": !0,
120
137
  "f-list-nav-top": t.value === "top",
121
138
  "f-list-nav-left": t.value === "left",
122
139
  "f-list-nav-right": t.value === "right",
123
140
  "f-list-nav-bottom": t.value === "bottom"
124
141
  };
125
- return T(a, d.customClass);
142
+ return k(s, a.customClass);
126
143
  });
127
- return () => p("div", {
128
- class: o.value,
129
- style: d.customStyle
144
+ return () => a.visible ? p("div", {
145
+ class: d.value,
146
+ style: a.customStyle
130
147
  }, [p("div", {
131
148
  class: "f-list-nav-in",
132
- style: l.value
149
+ style: r.value
133
150
  }, [p("div", {
134
151
  class: "f-list-nav-main"
135
152
  }, [e.slots.navHeader && p("div", {
136
153
  class: "f-list-nav-header"
137
- }, [e.slots.navHeader()]), !e.slots.navHeader && s.value && p("div", {
154
+ }, [e.slots.navHeader()]), !e.slots.navHeader && a.title && p("div", {
138
155
  class: "f-list-nav-header"
139
156
  }, [p("div", {
140
157
  class: "f-list-nav-title"
141
- }, [s.value])]), e.slots.default && p("div", {
158
+ }, [a.title])]), e.slots.default && p("div", {
142
159
  class: "f-list-nav-content"
143
160
  }, [e.slots.default()]), e.slots.navContent && p("div", {
144
161
  class: "f-list-nav-content"
145
162
  }, [e.slots.navContent()]), e.slots.navFooter && p("div", {
146
163
  class: "f-list-nav-footer"
147
- }, [e.slots.navFooter()])]), d.collapsible && p("div", {
164
+ }, [e.slots.navFooter()])]), a.collapsible && p("div", {
148
165
  class: ["f-list-nav-toggle-sidebar", {
149
- disabled: d.disabled,
166
+ disabled: a.disabled,
150
167
  active: i.value,
151
- "splitter-pane-collapse-animate": r.value
168
+ "splitter-pane-collapse-animate": n.value
152
169
  }],
153
- onClick: (a) => n(a)
170
+ onClick: (s) => o(s)
154
171
  }, [p("span", {
155
172
  class: "triangle"
156
- }, null)])])]);
173
+ }, null)])])]) : null;
157
174
  }
158
- }), W = h(0);
159
- function X(d) {
160
- const { formSchemaUtils: e, formStateMachineUtils: t } = d;
161
- function s(o, a = "") {
175
+ }), ee = y(0);
176
+ function te(a) {
177
+ const { formSchemaUtils: e, formStateMachineUtils: t } = a;
178
+ function i(s, l = "") {
162
179
  return {
163
- path: a + o.code,
164
- field: o.id,
165
- fullPath: o.code
180
+ path: l + s.code,
181
+ field: s.id,
182
+ fullPath: s.code
166
183
  };
167
184
  }
168
- function i(o, a = "") {
169
- const c = e.getViewModelById(o);
170
- return c ? c.states.map((u) => s(u, a)) : [];
185
+ function n(s, l = "") {
186
+ const c = e.getViewModelById(s);
187
+ return c ? c.states.map((u) => i(u, l)) : [];
171
188
  }
172
- function r(o) {
173
- const a = e.getRootViewModelId(), c = i(o);
174
- if (o === a)
189
+ function o(s) {
190
+ const l = e.getRootViewModelId(), c = n(s);
191
+ if (s === l)
175
192
  return c;
176
- const u = i(a, "root-component.");
193
+ const u = n(l, "root-component.");
177
194
  return [...c, ...u];
178
195
  }
179
- function n(o) {
180
- return o.binding && o.binding.path || o.id || "";
196
+ function r(s) {
197
+ return s.binding && s.binding.path || s.id || "";
181
198
  }
182
- function l() {
199
+ function d() {
183
200
  return t && t.getRenderStates() || [];
184
201
  }
185
- return { getVariables: r, getControlName: n, getStateMachines: l };
202
+ return { getVariables: o, getControlName: r, getStateMachines: d };
186
203
  }
187
- class Y {
204
+ class ie {
188
205
  constructor(e) {
189
206
  v(this, "sessionVariables", [
190
207
  {
@@ -233,87 +250,87 @@ class Y {
233
250
  required: "必填表达式"
234
251
  });
235
252
  v(this, "getExpressionConverter", (e, t) => ({
236
- convertFrom: (s, i, r, n) => {
237
- const l = r.getExpressionRuleValue(e, t || i);
238
- return l && l.value || "";
253
+ convertFrom: (i, n, o, r) => {
254
+ const d = o.getExpressionRuleValue(e, t || n);
255
+ return d && d.value || "";
239
256
  },
240
- convertTo: (s, i, r, n, l) => {
241
- var o;
242
- if (i === "dataPicking" && (r != null && r.target)) {
243
- const a = `${r.target}_dataPicking`;
244
- ((o = r.rules) == null ? void 0 : o.some(
245
- (u) => u.id === a && u.value
246
- )) ? s.dictPickingExpressionId = a : delete s.dictPickingExpressionId;
257
+ convertTo: (i, n, o, r, d) => {
258
+ var s;
259
+ if (n === "dataPicking" && (o != null && o.target)) {
260
+ const l = `${o.target}_dataPicking`;
261
+ ((s = o.rules) == null ? void 0 : s.some(
262
+ (u) => u.id === l && u.value
263
+ )) ? i.dictPickingExpressionId = l : delete i.dictPickingExpressionId;
247
264
  }
248
- n.updateExpression(r);
265
+ r.updateExpression(o);
249
266
  }
250
267
  }));
251
268
  this.formSchemaService = e;
252
269
  }
253
270
  getExpressionRule(e, t) {
254
- const s = this.formSchemaService.getExpressions();
255
- if (!s)
256
- return "";
257
- const i = s.find((n) => n.target === e);
271
+ const i = this.formSchemaService.getExpressions();
258
272
  if (!i)
259
273
  return "";
260
- const r = i.rules.find((n) => n.type === t);
261
- return r || "";
274
+ const n = i.find((r) => r.target === e);
275
+ if (!n)
276
+ return "";
277
+ const o = n.rules.find((r) => r.type === t);
278
+ return o || "";
262
279
  }
263
280
  // 获取上下文表单变量
264
281
  getContextFormVariables() {
265
282
  const { module: e } = this.formSchemaService.getFormSchema();
266
283
  if (!e.viewmodels || e.viewmodels.length === 0)
267
284
  return [];
268
- const t = this.formSchemaService.getRootViewModelId(), s = this.formSchemaService.getViewModelById(t);
269
- if (!s || !s.states || s.states.length === 0)
285
+ const t = this.formSchemaService.getRootViewModelId(), i = this.formSchemaService.getViewModelById(t);
286
+ if (!i || !i.states || i.states.length === 0)
270
287
  return [];
271
- const i = [];
272
- return s.states.filter((r) => r.category === "remote").forEach((r) => {
273
- i.push({
274
- key: r.code,
275
- name: r.name,
276
- description: r.name,
277
- category: r.category
288
+ const n = [];
289
+ return i.states.filter((o) => o.category === "remote").forEach((o) => {
290
+ n.push({
291
+ key: o.code,
292
+ name: o.name,
293
+ description: o.name,
294
+ category: o.category
278
295
  });
279
- }), i;
296
+ }), n;
280
297
  }
281
- createTreeNode(e, t, s = "label") {
298
+ createTreeNode(e, t, i = "label") {
282
299
  return {
283
300
  id: e.id,
284
301
  name: e.name,
285
- bindingPath: e[s],
302
+ bindingPath: e[i],
286
303
  parents: t,
287
304
  type: "field"
288
305
  };
289
306
  }
290
307
  buildEntityFieldsTreeData(e = null, t) {
291
- const s = [];
292
- return e == null || e.forEach((i) => {
293
- var l;
294
- const r = this.createTreeNode(i, t);
295
- let n = [];
296
- (l = i.type) != null && l.fields && (n = this.buildEntityFieldsTreeData(i.type.fields, [...t, i.label])), s.push({
297
- data: r,
298
- children: n,
308
+ const i = [];
309
+ return e == null || e.forEach((n) => {
310
+ var d;
311
+ const o = this.createTreeNode(n, t);
312
+ let r = [];
313
+ (d = n.type) != null && d.fields && (r = this.buildEntityFieldsTreeData(n.type.fields, [...t, n.label])), i.push({
314
+ data: o,
315
+ children: r,
299
316
  expanded: !0
300
317
  });
301
- }), s;
318
+ }), i;
302
319
  }
303
320
  buildChildEntityTreeData(e = null, t) {
304
- const s = [];
305
- return e == null || e.forEach((i) => {
306
- var o, a;
307
- const r = this.createTreeNode(i, t);
308
- r.type = "entity";
309
- const n = this.buildEntityFieldsTreeData((o = i.type) == null ? void 0 : o.fields, [...t, i.label]), l = this.buildChildEntityTreeData((a = i.type) == null ? void 0 : a.entities, [...t, i.label]);
310
- l != null && l.length && (n == null || n.push(...l)), s.push({
311
- data: r,
312
- children: n || [],
321
+ const i = [];
322
+ return e == null || e.forEach((n) => {
323
+ var s, l;
324
+ const o = this.createTreeNode(n, t);
325
+ o.type = "entity";
326
+ const r = this.buildEntityFieldsTreeData((s = n.type) == null ? void 0 : s.fields, [...t, n.label]), d = this.buildChildEntityTreeData((l = n.type) == null ? void 0 : l.entities, [...t, n.label]);
327
+ d != null && d.length && (r == null || r.push(...d)), i.push({
328
+ data: o,
329
+ children: r || [],
313
330
  // 空值回退
314
331
  expanded: !0
315
332
  });
316
- }), s;
333
+ }), i;
317
334
  }
318
335
  getEntitiesTreeData() {
319
336
  const e = this.formSchemaService.getSchemaEntities();
@@ -322,12 +339,12 @@ class Y {
322
339
  const t = e[0];
323
340
  if (!(t != null && t.type))
324
341
  return [];
325
- const s = this.buildEntityFieldsTreeData(t.type.fields, [t.code]), i = this.buildChildEntityTreeData(t.type.entities, [t.code]);
326
- return i != null && i.length && (s == null || s.push(...i)), {
342
+ const i = this.buildEntityFieldsTreeData(t.type.fields, [t.code]), n = this.buildChildEntityTreeData(t.type.entities, [t.code]);
343
+ return n != null && n.length && (i == null || i.push(...n)), {
327
344
  entityCode: t.code,
328
345
  fields: [{
329
346
  data: this.createTreeNode(t, [], "code"),
330
- children: s || []
347
+ children: i || []
331
348
  }]
332
349
  };
333
350
  }
@@ -348,110 +365,110 @@ class Y {
348
365
  }
349
366
  };
350
367
  }
351
- onBeforeOpenExpression(e, t, s) {
352
- const i = s === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, t), n = this.getEntitiesAndVariables(), l = {
353
- message: ["validate", "required", "dataPicking"].includes(t) && r ? r.message : "",
354
- ...n
368
+ onBeforeOpenExpression(e, t, i) {
369
+ const n = i === "Field" ? e.binding.field : e.id, o = this.getExpressionRule(n, t), r = this.getEntitiesAndVariables(), d = {
370
+ message: ["validate", "required", "dataPicking"].includes(t) && o ? o.message : "",
371
+ ...r
355
372
  };
356
- return r.messageType != null && (l.messageType = r.messageType), l;
373
+ return o.messageType != null && (d.messageType = o.messageType), d;
357
374
  }
358
- buildRule(e, t, s, i) {
359
- const { expression: r, message: n, messageType: l } = t, o = {
360
- id: `${e}_${s}`,
361
- type: s,
362
- value: r
375
+ buildRule(e, t, i, n) {
376
+ const { expression: o, message: r, messageType: d } = t, s = {
377
+ id: `${e}_${i}`,
378
+ type: i,
379
+ value: o
363
380
  };
364
- return (s === "validate" || s === "dataPicking" || s === "required") && (o.message = n), s === "dataPicking" && (o.messageType = l), s === "validate" && i && (o.elementId = i), o;
381
+ return (i === "validate" || i === "dataPicking" || i === "required") && (s.message = r), i === "dataPicking" && (s.messageType = d), i === "validate" && n && (s.elementId = n), s;
365
382
  }
366
383
  getExpressionData() {
367
384
  const { expressions: e } = this.formSchemaService.getFormSchema().module;
368
385
  return e || [];
369
386
  }
370
- updateExpression(e, t, s, i) {
371
- const r = t === "Field" ? e.binding.field : e.id, n = this.buildRule(r, s, i, e.type === "form-group" ? e.id : "");
372
- let o = this.getExpressionData().find((c) => c.targetType === t && c.target === r);
373
- const a = (c) => c.value.trim() === "";
374
- if (o) {
375
- const c = o.rules.find((u) => u.id === n.id);
387
+ updateExpression(e, t, i, n) {
388
+ const o = t === "Field" ? e.binding.field : e.id, r = this.buildRule(o, i, n, e.type === "form-group" ? e.id : "");
389
+ let s = this.getExpressionData().find((c) => c.targetType === t && c.target === o);
390
+ const l = (c) => c.value.trim() === "";
391
+ if (s) {
392
+ const c = s.rules.find((u) => u.id === r.id);
376
393
  if (c)
377
- a(n) ? o.rules = o.rules.filter((u) => u.id !== n.id) : (Object.assign(c, n), i === "validate" && e.type === "form-group" && (c.elementId = e.id));
394
+ l(r) ? s.rules = s.rules.filter((u) => u.id !== r.id) : (Object.assign(c, r), n === "validate" && e.type === "form-group" && (c.elementId = e.id));
378
395
  else {
379
- if (a(n))
396
+ if (l(r))
380
397
  return null;
381
- o.rules = o.rules || [], o.rules.push(n);
398
+ s.rules = s.rules || [], s.rules.push(r);
382
399
  }
383
400
  } else {
384
- if (a(n))
401
+ if (l(r))
385
402
  return null;
386
- o = {
387
- target: `${r}`,
388
- rules: [n],
403
+ s = {
404
+ target: `${o}`,
405
+ rules: [r],
389
406
  targetType: t
390
407
  };
391
408
  }
392
- return o;
393
- }
394
- getExpressionEditorOptions(e, t, s, i) {
395
- return s.reduce((r, n) => {
396
- var o, a;
397
- const l = t === "Field" ? (o = e == null ? void 0 : e.binding) == null ? void 0 : o.field : e.id;
398
- return r[n] = {
399
- hide: t === "Field" ? !!((a = e == null ? void 0 : e.binding) != null && a.field) : !1,
409
+ return s;
410
+ }
411
+ getExpressionEditorOptions(e, t, i, n) {
412
+ return i.reduce((o, r) => {
413
+ var s, l;
414
+ const d = t === "Field" ? (s = e == null ? void 0 : e.binding) == null ? void 0 : s.field : e.id;
415
+ return o[r] = {
416
+ hide: t === "Field" ? !!((l = e == null ? void 0 : e.binding) != null && l.field) : !1,
400
417
  description: "",
401
- title: this.expressionNames[n],
418
+ title: this.expressionNames[r],
402
419
  type: "string",
403
- $converter: this.getExpressionConverter(l),
420
+ $converter: this.getExpressionConverter(d),
404
421
  refreshPanelAfterChanged: !0,
405
422
  editor: {
406
423
  type: "expression-editor",
407
424
  singleExpand: !1,
408
- dialogTitle: `${this.expressionNames[n]}编辑器`,
409
- showMessage: n === "validate" || n === "dataPicking" || n === "required",
410
- showMessageType: n === "dataPicking",
411
- beforeOpen: () => this.onBeforeOpenExpression(e, n, t),
425
+ dialogTitle: `${this.expressionNames[r]}编辑器`,
426
+ showMessage: r === "validate" || r === "dataPicking" || r === "required",
427
+ showMessageType: r === "dataPicking",
428
+ beforeOpen: () => this.onBeforeOpenExpression(e, r, t),
412
429
  onSubmitModal: (c) => {
413
- const u = this.updateExpression(e, t, c, n);
414
- if (i) {
415
- const f = this.buildRule(l, c, n);
416
- i(f);
430
+ const u = this.updateExpression(e, t, c, r);
431
+ if (n) {
432
+ const f = this.buildRule(d, c, r);
433
+ n(f);
417
434
  }
418
435
  return u;
419
436
  }
420
437
  }
421
- }, r;
438
+ }, o;
422
439
  }, {});
423
440
  }
424
- getExpressionInfo(e, t, s) {
425
- const i = t === "Field" ? e.binding.field : e.id, r = this.getExpressionRule(i, s), n = {
426
- value: r && r.value,
427
- targetId: i,
441
+ getExpressionInfo(e, t, i) {
442
+ const n = t === "Field" ? e.binding.field : e.id, o = this.getExpressionRule(n, i), r = {
443
+ value: o && o.value,
444
+ targetId: n,
428
445
  targetType: t,
429
- expressionType: s
446
+ expressionType: i
430
447
  };
431
- return r && r.message && (n.message = r.message), n;
448
+ return o && o.message && (r.message = o.message), r;
432
449
  }
433
- getExpressionConfig(e, t, s = ["compute", "dependency", "validate"], i) {
450
+ getExpressionConfig(e, t, i = ["compute", "dependency", "validate"], n) {
434
451
  return {
435
452
  description: "表达式",
436
453
  title: "表达式",
437
454
  hide: !e.binding,
438
455
  properties: {
439
- ...this.getExpressionEditorOptions(e, t, s, i)
456
+ ...this.getExpressionEditorOptions(e, t, i, n)
440
457
  }
441
458
  };
442
459
  }
443
- getExpressionOptions(e, t, s) {
444
- const i = this.getExpressionInfo(e, t, s);
460
+ getExpressionOptions(e, t, i) {
461
+ const n = this.getExpressionInfo(e, t, i);
445
462
  return {
446
- dialogTitle: `${this.expressionNames[s]}编辑器`,
463
+ dialogTitle: `${this.expressionNames[i]}编辑器`,
447
464
  singleExpand: !1,
448
- showMessage: s === "required",
449
- beforeOpen: () => this.onBeforeOpenExpression(e, s, t),
450
- expressionInfo: i
465
+ showMessage: i === "required",
466
+ beforeOpen: () => this.onBeforeOpenExpression(e, i, t),
467
+ expressionInfo: n
451
468
  };
452
469
  }
453
470
  }
454
- class Z {
471
+ class se {
455
472
  constructor(e, t) {
456
473
  v(this, "componentId");
457
474
  v(this, "viewModelId");
@@ -469,8 +486,8 @@ class Z {
469
486
  type: "object",
470
487
  categories: {}
471
488
  });
472
- var s;
473
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((s = this.formSchemaUtils) == null ? void 0 : s.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService, this.designerContext = t.designerContext;
489
+ var i;
490
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService, this.designerContext = t.designerContext;
474
491
  }
475
492
  getFormDesignerInstance() {
476
493
  var e, t;
@@ -481,14 +498,14 @@ class Z {
481
498
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
482
499
  }
483
500
  setDesignViewModelField(e) {
484
- var s;
501
+ var i;
485
502
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
486
503
  if (t) {
487
504
  if (!this.designViewModelField) {
488
- const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
489
- this.designViewModelField = i.fields.find((r) => r.id === t);
505
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
506
+ this.designViewModelField = n.fields.find((o) => o.id === t);
490
507
  }
491
- e.updateOn = (s = this.designViewModelField) == null ? void 0 : s.updateOn;
508
+ e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
492
509
  }
493
510
  }
494
511
  getBasicPropConfig(e) {
@@ -512,17 +529,17 @@ class Z {
512
529
  valueField: "value",
513
530
  idField: "value",
514
531
  editable: !1,
515
- data: [{ value: e.type, name: w[e.type] && w[e.type].name }]
532
+ data: [{ value: e.type, name: E[e.type] && E[e.type].name }]
516
533
  }
517
534
  }
518
535
  }
519
536
  };
520
537
  }
521
- getAppearanceConfig(e = null, t = {}, s) {
522
- const i = {
538
+ getAppearanceConfig(e = null, t = {}, i) {
539
+ const n = {
523
540
  title: "外观",
524
541
  description: "Appearance"
525
- }, r = {
542
+ }, o = {
526
543
  class: {
527
544
  title: "class样式",
528
545
  type: "string",
@@ -538,21 +555,21 @@ class Z {
538
555
  parentPropertyID: "appearance"
539
556
  }
540
557
  };
541
- for (const n in t)
542
- r[n] = Object.assign(r[n] || {}, t[n]);
558
+ for (const r in t)
559
+ o[r] = Object.assign(o[r] || {}, t[r]);
543
560
  return {
544
- ...i,
545
- properties: { ...r },
546
- setPropertyRelates(n, l) {
547
- if (n) {
548
- switch (n && n.propertyID) {
561
+ ...n,
562
+ properties: { ...o },
563
+ setPropertyRelates(r, d) {
564
+ if (r) {
565
+ switch (r && r.propertyID) {
549
566
  case "class":
550
567
  case "style": {
551
- k.value++;
568
+ z.value++;
552
569
  break;
553
570
  }
554
571
  }
555
- s && s(n, e, l);
572
+ i && i(r, e, d);
556
573
  }
557
574
  }
558
575
  };
@@ -567,49 +584,49 @@ class Z {
567
584
  * @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
568
585
  * @returns
569
586
  */
570
- getPropertyEditorParams(e, t = [], s = "visible", i = {}, r = {}, n = "") {
571
- const { getVariables: l, getControlName: o, getStateMachines: a } = X(this.designerHostService), c = this.getRealTargetType(e), u = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], f = {
587
+ getPropertyEditorParams(e, t = [], i = "visible", n = {}, o = {}, r = "") {
588
+ const { getVariables: d, getControlName: s, getStateMachines: l } = te(this.designerHostService), c = this.getRealTargetType(e), u = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], f = {
572
589
  type: "property-editor",
573
590
  propertyTypes: u
574
591
  };
575
- return u.map((m) => {
576
- switch (m) {
592
+ return u.map((b) => {
593
+ switch (b) {
577
594
  case "Const":
578
595
  Object.assign(f, {
579
596
  constType: "enum",
580
597
  constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
581
- }, i);
598
+ }, n);
582
599
  break;
583
600
  case "Expression":
584
- f.expressionConfig = this.getExpressionOptions(e, c, n || s);
601
+ f.expressionConfig = this.getExpressionOptions(e, c, r || i);
585
602
  break;
586
603
  case "StateMachine":
587
- f.stateMachines = a();
604
+ f.stateMachines = l();
588
605
  break;
589
606
  case "Variable":
590
607
  Object.assign(f, {
591
- controlName: o(e),
608
+ controlName: s(e),
592
609
  newVariablePrefix: "is",
593
610
  newVariableType: "Boolean",
594
- variables: l(this.viewModelId),
611
+ variables: d(this.viewModelId),
595
612
  parentComponentId: this.componentId === "root-component" ? "" : "root-component",
596
- onBeforeOpenVariables: (g) => {
597
- g.value = l(this.viewModelId);
613
+ onBeforeOpenVariables: (m) => {
614
+ m.value = d(this.viewModelId);
598
615
  }
599
- }, r), this.designerContext.designerMode === "PC_RTC" && (f.newVariablePrefix = "ext_" + f.newVariablePrefix);
616
+ }, o), this.designerContext.designerMode === "PC_RTC" && (f.newVariablePrefix = "ext_" + f.newVariablePrefix);
600
617
  break;
601
618
  }
602
619
  }), f;
603
620
  }
604
621
  getVisibleProperty(e, t = "") {
605
- var r;
606
- let s = ["Const", "Variable", "StateMachine", "Expression"];
607
- return t === "gridFieldEditor" ? s = ["Const", "Expression"] : t === "form-group" && !((r = e.binding) != null && r.field) ? s = ["Const", "Variable", "StateMachine"] : (t === "dataGrid" || t === "treeGrid" || t === "wizard") && (s = ["Const", "Variable", "Expression"]), {
622
+ var o;
623
+ let i = ["Const", "Variable", "StateMachine", "Expression"];
624
+ return t === "gridFieldEditor" ? i = ["Const", "Expression"] : t === "form-group" && !((o = e.binding) != null && o.field) ? i = ["Const", "Variable", "StateMachine"] : (t === "dataGrid" || t === "treeGrid" || t === "wizard") && (i = ["Const", "Variable", "Expression"]), {
608
625
  visible: {
609
626
  title: "是否可见",
610
627
  type: "boolean",
611
628
  description: "运行时组件是否可见",
612
- editor: this.getPropertyEditorParams(e, s, "visible")
629
+ editor: this.getPropertyEditorParams(e, i, "visible")
613
630
  }
614
631
  };
615
632
  }
@@ -619,27 +636,27 @@ class Z {
619
636
  * @param viewModelId
620
637
  * @returns
621
638
  */
622
- getBehaviorConfig(e, t = "", s = {}, i) {
623
- const r = {
639
+ getBehaviorConfig(e, t = "", i = {}, n) {
640
+ const o = {
624
641
  title: "行为",
625
642
  description: ""
626
- }, n = this.getVisibleProperty(e, t);
627
- for (const o in s)
628
- n[o] = Object.assign(n[o] || {}, s[o]);
629
- const l = this;
643
+ }, r = this.getVisibleProperty(e, t);
644
+ for (const s in i)
645
+ r[s] = Object.assign(r[s] || {}, i[s]);
646
+ const d = this;
630
647
  return {
631
- ...r,
632
- properties: { ...n },
633
- setPropertyRelates(o, a) {
634
- if (o) {
635
- switch (o.propertyID) {
648
+ ...o,
649
+ properties: { ...r },
650
+ setPropertyRelates(s, l) {
651
+ if (s) {
652
+ switch (s.propertyID) {
636
653
  case "disabled":
637
654
  case "readonly":
638
655
  case "visible":
639
- l.afterMutilEditorChanged(e, o);
656
+ d.afterMutilEditorChanged(e, s);
640
657
  break;
641
658
  }
642
- i && i(o, a);
659
+ n && n(s, l);
643
660
  }
644
661
  }
645
662
  };
@@ -659,11 +676,11 @@ class Z {
659
676
  * @returns
660
677
  */
661
678
  updateElementByParentContainer(e, t) {
662
- const s = t && t.parent && t.parent.schema;
663
- if (!s)
679
+ const i = t && t.parent && t.parent.schema;
680
+ if (!i)
664
681
  return;
665
- const i = s.contents.findIndex((n) => n.id === e), r = A(s.contents[i]);
666
- s.contents.splice(i, 1), s.contents.splice(i, 0, r), U();
682
+ const n = i.contents.findIndex((r) => r.id === e), o = L(i.contents[n]);
683
+ i.contents.splice(n, 1), i.contents.splice(n, 0, o), O();
667
684
  }
668
685
  /**
669
686
  * 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
@@ -672,18 +689,18 @@ class Z {
672
689
  * @returns
673
690
  */
674
691
  addNewVariableToViewModel(e, t) {
675
- const s = e.propertyValue;
676
- if (!(s && typeof s == "object") || !(s.type === "Variable" && s.isNewVariable))
692
+ const i = e.propertyValue;
693
+ if (!(i && typeof i == "object") || !(i.type === "Variable" && i.isNewVariable))
677
694
  return;
678
- const n = {
679
- id: s.field,
695
+ const r = {
696
+ id: i.field,
680
697
  category: "locale",
681
- code: s.fullPath,
682
- name: s.fullPath,
683
- type: s.newVariableType || "String",
698
+ code: i.fullPath,
699
+ name: i.fullPath,
700
+ type: i.newVariableType || "String",
684
701
  isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
685
702
  };
686
- delete s.newVariableType, delete s.isNewVariable, this.formSchemaUtils.getVariableByCode(n.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(n);
703
+ delete i.newVariableType, delete i.isNewVariable, this.formSchemaUtils.getVariableByCode(r.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(r);
687
704
  }
688
705
  /**
689
706
  * 更新表达式到expressions节点
@@ -693,17 +710,17 @@ class Z {
693
710
  const t = e.propertyValue;
694
711
  if (!((t && t.type) === "Expression" && t.expressionInfo))
695
712
  return;
696
- const { expressionId: r, expressionInfo: n } = t, { targetId: l, targetType: o, expressionType: a, value: c, message: u } = n, f = this.formSchemaUtils.getModule();
713
+ const { expressionId: o, expressionInfo: r } = t, { targetId: d, targetType: s, expressionType: l, value: c, message: u } = r, f = this.formSchemaUtils.getModule();
697
714
  f.expressions = f.expressions || [];
698
- const { expressions: m } = f;
699
- let g = m.find((y) => y.target === l);
700
- g || (g = { target: l, rules: [], targetType: o }, m.push(g));
701
- const b = g.rules.find((y) => y.type === a);
702
- if (b)
703
- b.value = c, b.message = u;
715
+ const { expressions: b } = f;
716
+ let m = b.find((h) => h.target === d);
717
+ m || (m = { target: d, rules: [], targetType: s }, b.push(m));
718
+ const g = m.rules.find((h) => h.type === l);
719
+ if (g)
720
+ g.value = c, g.message = u;
704
721
  else {
705
- const y = { id: r, type: a, value: c, message: u };
706
- g.rules.push(y);
722
+ const h = { id: o, type: l, value: c, message: u };
723
+ m.rules.push(h);
707
724
  }
708
725
  delete t.expressionInfo;
709
726
  }
@@ -714,14 +731,14 @@ class Z {
714
731
  * @returns
715
732
  */
716
733
  clearExpression(e, t) {
717
- const s = e.propertyValue;
718
- if (s && s.type === "Expression")
734
+ const i = e.propertyValue;
735
+ if (i && i.type === "Expression")
719
736
  return;
720
- const r = e.propertyID, n = this.formSchemaUtils.getExpressions(), l = t.binding ? t.binding.field : t.id, o = n.find((a) => a.target === l);
721
- !o || !o.rules || (o.rules = o.rules.filter((a) => a.type !== r));
737
+ const o = e.propertyID, r = this.formSchemaUtils.getExpressions(), d = t.binding ? t.binding.field : t.id, s = r.find((l) => l.target === d);
738
+ !s || !s.rules || (s.rules = s.rules.filter((l) => l.type !== o));
722
739
  }
723
- getExpressionOptions(e, t, s) {
724
- return new Y(this.formSchemaUtils).getExpressionOptions(e, t, s);
740
+ getExpressionOptions(e, t, i) {
741
+ return new ie(this.formSchemaUtils).getExpressionOptions(e, t, i);
725
742
  }
726
743
  getRealTargetType(e) {
727
744
  return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(e.type) > -1 ? "Button" : e.binding && e.binding.field ? "Field" : "Container";
@@ -732,17 +749,17 @@ class Z {
732
749
  type: "events-editor",
733
750
  editor: {
734
751
  initialData: e,
735
- viewSourceHandle: (s) => {
736
- var i;
737
- ((i = s.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(s);
752
+ viewSourceHandle: (i) => {
753
+ var n;
754
+ ((n = i.controller) == null ? void 0 : n.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(i);
738
755
  }
739
756
  }
740
757
  }, t;
741
758
  }
742
759
  }
743
- class ee extends Z {
760
+ class ne extends se {
744
761
  getPropertyConfig(e) {
745
- return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.propertyConfig;
762
+ return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, ""), this.propertyConfig;
746
763
  }
747
764
  getAppearanceConfig(e) {
748
765
  return super.getAppearanceConfig(e, {
@@ -770,92 +787,161 @@ class ee extends Z {
770
787
  $converter: "/converter/size.converter",
771
788
  parentPropertyID: "size",
772
789
  visible: !1
790
+ },
791
+ title: {
792
+ title: "标题",
793
+ type: "string",
794
+ description: "导航标题"
795
+ },
796
+ folded: {
797
+ title: "默认收起",
798
+ type: "boolean",
799
+ description: "初始状态是否将面板默认收起"
800
+ },
801
+ collapsible: {
802
+ title: "是否启用收折",
803
+ type: "boolean",
804
+ description: "是否启用收折特性",
805
+ editor: {
806
+ type: "combo-list",
807
+ textField: "name",
808
+ valueField: "value",
809
+ data: [{
810
+ name: "启用",
811
+ value: !0
812
+ }, {
813
+ name: "不启用",
814
+ value: !1
815
+ }],
816
+ enableClear: !1
817
+ },
818
+ refreshPanelAfterChanged: !0
819
+ },
820
+ position: {
821
+ title: "收折按钮显示位置",
822
+ // 因为控件里这个属性是针对导航面板的,但是属性面板里是针对收折按钮的,位置含义相反,所以在设计器上枚举项也反着写
823
+ type: "enum",
824
+ description: "收折按钮显示位置",
825
+ editor: {
826
+ type: "combo-list",
827
+ textField: "name",
828
+ valueField: "value",
829
+ idField: "value",
830
+ editable: !1,
831
+ data: [{ value: "left", name: "靠右" }, { value: "right", name: "靠左" }, { value: "bottom", name: "靠上" }, { value: "top", name: "靠下" }]
832
+ },
833
+ // visible: propertyData.collapsible,
834
+ visible: !1
773
835
  }
774
- }, (s, i, r) => {
775
- switch (s.propertyID) {
836
+ }, (i, n, o) => {
837
+ switch (i.propertyID) {
776
838
  case "width":
777
- case "height":
778
- W.value++;
839
+ case "height": {
840
+ ee.value++;
841
+ break;
842
+ }
843
+ case "title": {
844
+ i.needRefreshControlTree = !0;
779
845
  break;
846
+ }
780
847
  }
781
848
  });
782
849
  }
783
850
  }
784
- function te(d, e) {
785
- const t = new B(), { canAccept: s } = t.getTemplateRule(d, e);
786
- function i(c) {
787
- var f, m, g;
788
- return !(!$().basalDragulaRuleForContainer(c, e) || !s || ((f = d.schema.contents) == null ? void 0 : f.length) === 1 && ((g = (m = d.schema) == null ? void 0 : m.contents[0]) == null ? void 0 : g.type) === w["external-container"].type);
851
+ function oe(a, e) {
852
+ const t = new A(), { canAccept: i } = t.getTemplateRule(a, e);
853
+ function n(c) {
854
+ var f, b, m;
855
+ return !(!$().basalDragulaRuleForContainer(c, e) || !i || ((f = a.schema.contents) == null ? void 0 : f.length) === 1 && ((m = (b = a.schema) == null ? void 0 : b.contents[0]) == null ? void 0 : m.type) === E["external-container"].type);
789
856
  }
790
- function r() {
857
+ function o() {
791
858
  return "display: flex;flex-direction:column;height:100%";
792
859
  }
793
- function n() {
794
- return !1;
860
+ function r() {
861
+ const { canMove: c } = t.getTemplateRule(a, e);
862
+ return c;
795
863
  }
796
- function l() {
797
- return !1;
864
+ function d() {
865
+ const { canDelete: c } = t.getTemplateRule(a, e);
866
+ return c;
798
867
  }
799
- function o() {
800
- return !0;
868
+ function s() {
869
+ const { canMove: c, canDelete: u } = t.getTemplateRule(a, e);
870
+ return !c && !u;
801
871
  }
802
- function a(c) {
803
- const u = new ee(c, e), { schema: f } = d;
872
+ function l(c) {
873
+ const u = new ne(c, e), { schema: f } = a;
804
874
  return u.getPropertyConfig(f);
805
875
  }
806
876
  return {
807
- canAccepts: i,
808
- getStyles: r,
809
- checkCanMoveComponent: n,
810
- checkCanDeleteComponent: l,
811
- hideNestedPaddingInDesginerView: o,
812
- getPropsConfig: a
877
+ canAccepts: n,
878
+ getStyles: o,
879
+ checkCanMoveComponent: r,
880
+ checkCanDeleteComponent: d,
881
+ hideNestedPaddingInDesginerView: s,
882
+ getPropsConfig: l
813
883
  };
814
884
  }
815
- const se = /* @__PURE__ */ M({
885
+ const re = /* @__PURE__ */ S({
816
886
  name: "FListNavDesign",
817
- props: E,
887
+ props: V,
818
888
  emits: [],
819
- setup(d, e) {
820
- const t = h(), s = V("designer-host-service"), i = V("design-item-context"), r = te(i, s), n = z(t, i, r), l = h(d.position), o = h(d.title), a = h(!1), c = h(!1), u = C(() => {
821
- const g = {}, b = ["top", "bottom"].indexOf(l.value) > -1 ? "height" : "width";
822
- return g[b] = a.value ? "0px" : d.size + "px", g;
889
+ setup(a, e) {
890
+ const t = y(), i = y(), n = M("designer-host-service"), o = M("design-item-context"), r = oe(o, n), d = q(t, o, r), s = y(a.position), l = y(!1), c = y(!1);
891
+ w(() => a.position, (g, h) => {
892
+ g !== h && (s.value = g);
823
893
  });
824
- N(() => {
825
- t.value.componentInstance = n;
826
- }), e.expose(n.value);
894
+ function u() {
895
+ if (!i.value)
896
+ return;
897
+ const g = i.value.parentElement;
898
+ if (g && g.className && g.className.includes("farris-component-list-nav")) {
899
+ const h = ["top", "bottom"].indexOf(s.value) > -1 ? "height" : "width", P = l.value ? "0px" : a.size + "px";
900
+ g.style[h] = P;
901
+ }
902
+ }
903
+ F(() => {
904
+ t.value.componentInstance = d, u();
905
+ }), e.expose(d.value);
827
906
  function f(g) {
828
- g && g.stopPropagation(), !d.disabled && (c.value = !0, a.value = !a.value);
907
+ g && g.stopPropagation(), !a.disabled && (c.value = !0, l.value = !l.value, u(), R(() => {
908
+ D();
909
+ }));
829
910
  }
830
- const m = C(() => ({
911
+ const b = C(() => ({
831
912
  "f-list-nav-main": !0,
832
- "d-none": a.value
913
+ "d-none": l.value
914
+ })), m = C(() => ({
915
+ [["top", "bottom"].indexOf(s.value) > -1 ? "min-width" : "min-height"]: "200px"
833
916
  }));
834
- return () => p("div", {
835
- class: `f-list-nav f-list-nav-${l.value}`
917
+ return w(() => a.size, (g, h) => {
918
+ g !== h && u();
919
+ }), () => p("div", {
920
+ class: `f-list-nav f-list-nav-${s.value}`,
921
+ ref: i
836
922
  }, [p("div", {
837
- class: "f-list-nav-in",
838
- style: u.value
923
+ class: "f-list-nav-in"
839
924
  }, [p("div", {
840
- class: m.value
925
+ class: b.value,
926
+ style: m.value
841
927
  }, [e.slots.navHeader && p("div", {
842
928
  class: "f-list-nav-header"
843
- }, [e.slots.navHeader()]), !e.slots.navHeader && o.value && p("div", {
929
+ }, [e.slots.navHeader()]), !e.slots.navHeader && a.title && p("div", {
844
930
  class: "f-list-nav-header"
845
931
  }, [p("div", {
846
932
  class: "f-list-nav-title"
847
- }, [o.value])]), e.slots.default && p("div", {
933
+ }, [a.title])]), e.slots.default && p("div", {
848
934
  class: "f-list-nav-content drag-container",
849
935
  ref: t,
850
- "data-dragref": `${i.schema.id}-container`
936
+ "data-dragref": `${o.schema.id}-container`
851
937
  }, [e.slots.default()]), e.slots.navContent && p("div", {
852
938
  class: "f-list-nav-content"
853
939
  }, [e.slots.navContent()]), e.slots.navFooter && p("div", {
854
940
  class: "f-list-nav-footer"
855
- }, [e.slots.navFooter()])]), d.collapsible && p("div", {
941
+ }, [e.slots.navFooter()])]), a.collapsible && p("div", {
856
942
  class: ["f-list-nav-toggle-sidebar", {
857
- disabled: d.disabled,
858
- active: a.value,
943
+ disabled: a.disabled,
944
+ active: l.value,
859
945
  "splitter-pane-collapse-animate": c.value
860
946
  }],
861
947
  onClick: (g) => f(g)
@@ -863,20 +949,20 @@ const se = /* @__PURE__ */ M({
863
949
  class: "triangle"
864
950
  }, null)])])]);
865
951
  }
866
- }), de = {
867
- install(d) {
868
- d.component(x.name, x);
952
+ }), fe = {
953
+ install(a) {
954
+ a.component(x.name, x);
869
955
  },
870
- register(d, e, t, s) {
871
- d["list-nav"] = x, e["list-nav"] = I;
956
+ register(a, e, t, i) {
957
+ a["list-nav"] = x, e["list-nav"] = I;
872
958
  },
873
- registerDesigner(d, e, t) {
874
- d["list-nav"] = se, e["list-nav"] = I;
959
+ registerDesigner(a, e, t) {
960
+ a["list-nav"] = re, e["list-nav"] = I;
875
961
  }
876
962
  };
877
963
  export {
878
964
  x as FListNav,
879
- de as default,
880
- E as listNavProps,
965
+ fe as default,
966
+ V as listNavProps,
881
967
  I as propsResolver
882
968
  };