@farris/ui-vue 1.2.9 → 1.3.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 (287) hide show
  1. package/components/accordion/index.esm.js +64 -64
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +521 -336
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +99 -97
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +496 -504
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +251 -259
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +696 -519
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +368 -376
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1141 -340
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +116 -116
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +986 -798
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +463 -998
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2233 -1057
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +335 -1002
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6193 -4702
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4562 -3294
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3420 -2623
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-canvas/index.css +1 -1
  40. package/components/designer-canvas/index.esm.js +914 -883
  41. package/components/designer-canvas/index.umd.cjs +1 -1
  42. package/components/designer-outline/index.esm.js +14 -13
  43. package/components/designer-outline/index.umd.cjs +1 -1
  44. package/components/dropdown/index.esm.js +204 -212
  45. package/components/dropdown/index.umd.cjs +2 -2
  46. package/components/dynamic-form/index.css +1 -0
  47. package/components/dynamic-form/index.esm.js +2795 -1835
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +180 -130
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +303 -290
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/events-editor/index.esm.js +328 -336
  54. package/components/events-editor/index.umd.cjs +1 -1
  55. package/components/expression-editor/index.esm.js +65 -65
  56. package/components/expression-editor/index.umd.cjs +1 -1
  57. package/components/external-container/index.css +1 -1
  58. package/components/external-container/index.esm.js +3349 -3626
  59. package/components/external-container/index.umd.cjs +1 -1
  60. package/components/field-selector/index.css +1 -1
  61. package/components/field-selector/index.esm.js +5344 -8588
  62. package/components/field-selector/index.umd.cjs +1 -1
  63. package/components/filter-bar/index.css +1 -1
  64. package/components/filter-bar/index.esm.js +2179 -2227
  65. package/components/filter-bar/index.umd.cjs +1 -1
  66. package/components/flow-canvas/index.css +1 -1
  67. package/components/flow-canvas/index.esm.js +684 -675
  68. package/components/flow-canvas/index.umd.cjs +1 -1
  69. package/components/image-cropper/index.esm.js +482 -490
  70. package/components/image-cropper/index.umd.cjs +1 -1
  71. package/components/input-group/index.esm.js +746 -569
  72. package/components/input-group/index.umd.cjs +1 -1
  73. package/components/layout/index.esm.js +409 -385
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +348 -1019
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.css +1 -1
  78. package/components/list-view/index.esm.js +3606 -2388
  79. package/components/list-view/index.umd.cjs +1 -1
  80. package/components/lookup/index.css +1 -1
  81. package/components/lookup/index.esm.js +10871 -8970
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.css +1 -1
  84. package/components/mapping-editor/index.esm.js +6019 -5631
  85. package/components/mapping-editor/index.umd.cjs +1 -1
  86. package/components/message-box/index.css +1 -1
  87. package/components/message-box/index.esm.js +511 -471
  88. package/components/message-box/index.umd.cjs +1 -1
  89. package/components/modal/index.css +1 -1
  90. package/components/modal/index.esm.js +438 -398
  91. package/components/modal/index.umd.cjs +1 -1
  92. package/components/nav/index.esm.js +912 -1281
  93. package/components/nav/index.umd.cjs +3 -3
  94. package/components/notify/index.esm.js +59 -53
  95. package/components/notify/index.umd.cjs +1 -1
  96. package/components/number-range/index.esm.js +660 -484
  97. package/components/number-range/index.umd.cjs +1 -1
  98. package/components/number-spinner/index.esm.js +682 -506
  99. package/components/number-spinner/index.umd.cjs +1 -1
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1848 -1658
  102. package/components/order/index.umd.cjs +1 -1
  103. package/components/page-footer/index.esm.js +100 -100
  104. package/components/page-footer/index.umd.cjs +1 -1
  105. package/components/page-header/index.esm.js +1120 -1923
  106. package/components/page-header/index.umd.cjs +1 -1
  107. package/components/pagination/index.esm.js +875 -1214
  108. package/components/pagination/index.umd.cjs +1 -1
  109. package/components/popover/index.esm.js +71 -70
  110. package/components/popover/index.umd.cjs +1 -1
  111. package/components/progress/index.esm.js +229 -237
  112. package/components/progress/index.umd.cjs +3 -3
  113. package/components/property-editor/index.css +1 -1
  114. package/components/property-editor/index.esm.js +2314 -1521
  115. package/components/property-editor/index.umd.cjs +3 -3
  116. package/components/property-panel/index.esm.js +867 -868
  117. package/components/property-panel/index.umd.cjs +1 -1
  118. package/components/query-solution/index.css +1 -1
  119. package/components/query-solution/index.esm.js +4332 -3623
  120. package/components/query-solution/index.umd.cjs +1 -1
  121. package/components/radio-button/index.esm.js +72 -72
  122. package/components/radio-button/index.umd.cjs +1 -1
  123. package/components/radio-group/index.esm.js +613 -437
  124. package/components/radio-group/index.umd.cjs +1 -1
  125. package/components/rate/index.esm.js +255 -263
  126. package/components/rate/index.umd.cjs +1 -1
  127. package/components/response-layout/index.esm.js +144 -152
  128. package/components/response-layout/index.umd.cjs +1 -1
  129. package/components/response-layout-editor/index.css +1 -1
  130. package/components/response-layout-editor/index.esm.js +1101 -1038
  131. package/components/response-layout-editor/index.umd.cjs +1 -1
  132. package/components/response-toolbar/index.esm.js +935 -1750
  133. package/components/response-toolbar/index.umd.cjs +1 -1
  134. package/components/schema-selector/index.css +1 -1
  135. package/components/schema-selector/index.esm.js +5264 -5677
  136. package/components/schema-selector/index.umd.cjs +2 -2
  137. package/components/search-box/index.esm.js +151 -154
  138. package/components/search-box/index.umd.cjs +1 -1
  139. package/components/section/index.esm.js +438 -1125
  140. package/components/section/index.umd.cjs +1 -1
  141. package/components/smoke-detector/index.esm.js +93 -101
  142. package/components/smoke-detector/index.umd.cjs +1 -1
  143. package/components/splitter/index.esm.js +563 -1202
  144. package/components/splitter/index.umd.cjs +1 -1
  145. package/components/splitter/style.js +2 -0
  146. package/components/step/index.esm.js +248 -256
  147. package/components/step/index.umd.cjs +1 -1
  148. package/components/switch/index.esm.js +549 -373
  149. package/components/switch/index.umd.cjs +1 -1
  150. package/components/tabs/index.css +1 -1
  151. package/components/tabs/index.esm.js +2436 -3110
  152. package/components/tabs/index.umd.cjs +1 -1
  153. package/components/tags/index.esm.js +328 -336
  154. package/components/tags/index.umd.cjs +1 -1
  155. package/components/text/index.esm.js +339 -347
  156. package/components/text/index.umd.cjs +1 -1
  157. package/components/textarea/index.esm.js +554 -378
  158. package/components/textarea/index.umd.cjs +1 -1
  159. package/components/time-picker/index.css +1 -1
  160. package/components/time-picker/index.esm.js +1322 -1144
  161. package/components/time-picker/index.umd.cjs +1 -1
  162. package/components/transfer/index.css +1 -1
  163. package/components/transfer/index.esm.js +537 -543
  164. package/components/transfer/index.umd.cjs +1 -1
  165. package/components/tree-grid/index.css +1 -1
  166. package/components/tree-grid/index.esm.js +5113 -9426
  167. package/components/tree-grid/index.umd.cjs +1 -1
  168. package/components/tree-view/index.css +1 -0
  169. package/components/tree-view/index.esm.js +3900 -2677
  170. package/components/tree-view/index.umd.cjs +1 -1
  171. package/components/uploader/index.esm.js +568 -570
  172. package/components/uploader/index.umd.cjs +2 -2
  173. package/components/verify-detail/index.esm.js +266 -274
  174. package/components/verify-detail/index.umd.cjs +1 -1
  175. package/components/video/index.esm.js +553 -1052
  176. package/components/video/index.umd.cjs +1 -1
  177. package/components/weather/index.esm.js +558 -566
  178. package/components/weather/index.umd.cjs +5 -5
  179. package/farris.all.esm.js +22009 -22688
  180. package/farris.all.umd.cjs +9 -9
  181. package/index.css +1 -1
  182. package/package.json +1 -1
  183. package/types/capsule/src/capsule.props.d.ts +2 -2
  184. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  185. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  186. package/types/common/directive/area-response.d.ts +10 -0
  187. package/types/common/index.d.ts +9 -0
  188. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  189. package/types/common/types.d.ts +1 -1
  190. package/types/common/utils/encrypt.d.ts +2 -0
  191. package/types/common/utils/resolve-field.d.ts +2 -0
  192. package/types/common/utils/use-class.d.ts +7 -0
  193. package/types/component/src/component.props.d.ts +7 -0
  194. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  196. package/types/components.d.ts +1 -0
  197. package/types/condition/src/types.d.ts +2 -1
  198. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  199. package/types/data-grid/index.d.ts +11 -5
  200. package/types/data-grid/src/data-grid.component.d.ts +4 -2
  201. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  202. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  203. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  204. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  205. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  206. package/types/data-view/composition/types.d.ts +19 -4
  207. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  208. package/types/designer-canvas/index.d.ts +2 -1
  209. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  210. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  211. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  212. package/types/designer-canvas/src/composition/types.d.ts +2 -3
  213. package/types/designer-canvas/src/types.d.ts +2 -1
  214. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  215. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  216. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  217. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  218. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
  219. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  220. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  221. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  222. package/types/dynamic-form/src/types.d.ts +12 -1
  223. package/types/dynamic-resolver/index.d.ts +1 -0
  224. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  225. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  226. package/types/dynamic-resolver/src/types.d.ts +9 -0
  227. package/types/dynamic-view/index.d.ts +1 -0
  228. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  229. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  230. package/types/index.d.ts +2 -0
  231. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  232. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  233. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  234. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  235. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  236. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  237. package/types/lookup/src/composition/types.d.ts +8 -0
  238. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  239. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  240. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  241. package/types/lookup/src/composition/use-http.d.ts +9 -5
  242. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  243. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  244. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  245. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  246. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  247. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  248. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  249. package/types/modal/src/modal.component.d.ts +3 -0
  250. package/types/modal/src/modal.props.d.ts +4 -0
  251. package/types/page-header/src/page-header.props.d.ts +1 -0
  252. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  253. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  254. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  255. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  256. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  257. package/types/property-panel/index.d.ts +2 -1
  258. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  259. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  260. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  262. package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  264. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  266. package/types/query-solution/src/solutions.d.ts +108 -509
  267. package/types/response-layout-editor/index.d.ts +3 -1
  268. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  269. package/types/response-layout-editor/src/type.d.ts +21 -0
  270. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  271. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  272. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  273. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  274. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  275. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  276. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  277. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  278. package/types/tabs/src/tabs.props.d.ts +1 -0
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  282. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  283. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  284. package/types/modal/src/composition/use-esc.d.ts +0 -1
  285. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  286. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  287. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,108 +1,150 @@
1
- import { defineComponent as q, ref as T, onUnmounted as _, createVNode as S, createTextVNode as z, watch as G, inject as H, onMounted as Q } from "vue";
2
- import { cloneDeep as X } from "lodash-es";
3
- const Y = {}, J = {};
4
- function k(a) {
5
- const { properties: e, title: o, ignore: s } = a, c = s && Array.isArray(s), h = Object.keys(e).reduce((d, b) => ((!c || !s.find((j) => j == b)) && (d[b] = e[b].type === "object" && e[b].properties ? k(e[b]) : X(e[b].default)), d), {});
6
- return (!c || !s.find((d) => d == "id")) && (h.id = `${o}-${Date.now()}`), h;
1
+ var q = Object.defineProperty;
2
+ var R = (o, e, t) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var v = (o, e, t) => R(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as F, ref as M, onUnmounted as N, createVNode as T, createTextVNode as O, watch as z, inject as Y, onMounted as _ } from "vue";
5
+ import { isPlainObject as B, cloneDeep as U } from "lodash-es";
6
+ const j = {}, $ = {};
7
+ function E(o) {
8
+ const { properties: e, title: t, ignore: n } = o, a = n && Array.isArray(n), i = Object.keys(e).reduce((r, f) => ((!a || !n.find((m) => m == f)) && (r[f] = e[f].type === "object" && e[f].properties ? E(e[f]) : U(e[f].default)), r), {});
9
+ return t && (!a || !n.find((r) => r == "id")) && (i.id = `${t}-${Date.now()}`), i;
7
10
  }
8
- function L(a, e = {}, o) {
9
- const s = Y[a];
10
- if (s) {
11
- let c = k(s);
12
- const h = J[a];
13
- return c = h ? h({ getSchemaByType: L }, c, e, o) : c, c;
11
+ function G(o, e = {}, t) {
12
+ const n = j[o];
13
+ if (n) {
14
+ let a = E(n);
15
+ const i = $[o];
16
+ return a = i ? i({ getSchemaByType: G }, a, e, t) : a, a;
14
17
  }
15
18
  return null;
16
19
  }
17
- function Z(a, e) {
18
- const o = k(e);
19
- return Object.keys(a).reduce((s, c) => (s[c] && typeof s[c] == "object" ? Object.assign(s[c], a[c]) : s[c] = a[c], s), o), o;
20
+ function J(o, e) {
21
+ const t = E(e);
22
+ return Object.keys(o).reduce((n, a) => (n[a] && B(n[a]) && B(o[a]) ? Object.assign(n[a], o[a]) : n[a] = o[a], n), t), t;
20
23
  }
21
- function R(a, e) {
22
- return Object.keys(a).filter((s) => a[s] != null).reduce((s, c) => {
23
- if (e.has(c)) {
24
- const h = e.get(c);
25
- if (typeof h == "string")
26
- s[h] = a[c];
24
+ function Q(o, e) {
25
+ return Object.keys(o).filter((n) => o[n] != null).reduce((n, a) => {
26
+ if (e.has(a)) {
27
+ const i = e.get(a);
28
+ if (typeof i == "string")
29
+ n[i] = o[a];
27
30
  else {
28
- const d = h(c, a[c], a);
29
- Object.assign(s, d);
31
+ const r = i(a, o[a], o);
32
+ Object.assign(n, r);
30
33
  }
31
34
  } else
32
- s[c] = a[c];
33
- return s;
35
+ n[a] = o[a];
36
+ return n;
34
37
  }, {});
35
38
  }
36
- function K(a, e, o = /* @__PURE__ */ new Map()) {
37
- const s = Z(a, e);
38
- return R(s, o);
39
+ function X(o, e, t = /* @__PURE__ */ new Map()) {
40
+ const n = J(o, e);
41
+ return Q(n, t);
39
42
  }
40
- function x(a = {}) {
41
- function e(p, u, l, f) {
43
+ function Z(o = {}) {
44
+ function e(s, c, l, p) {
42
45
  if (typeof l == "number")
43
- return f[p].length === l;
46
+ return p[s].length === l;
44
47
  if (typeof l == "object") {
45
- const m = Object.keys(l)[0], n = l[m];
46
- if (m === "not")
47
- return Number(f[p].length) !== Number(n);
48
- if (m === "moreThan")
49
- return Number(f[p].length) >= Number(n);
50
- if (m === "lessThan")
51
- return Number(f[p].length) <= Number(n);
48
+ const h = Object.keys(l)[0], g = l[h];
49
+ if (h === "not")
50
+ return Number(p[s].length) !== Number(g);
51
+ if (h === "moreThan")
52
+ return Number(p[s].length) >= Number(g);
53
+ if (h === "lessThan")
54
+ return Number(p[s].length) <= Number(g);
52
55
  }
53
56
  return !1;
54
57
  }
55
- function o(p, u, l, f) {
56
- return f[p] && f[p].propertyValue && String(f[p].propertyValue.value) === String(l);
58
+ function t(s, c, l, p) {
59
+ return p[s] && p[s].propertyValue && String(p[s].propertyValue.value) === String(l);
57
60
  }
58
- const s = /* @__PURE__ */ new Map([
61
+ const n = /* @__PURE__ */ new Map([
59
62
  ["length", e],
60
- ["getProperty", o]
63
+ ["getProperty", t]
61
64
  ]);
62
- Object.keys(a).reduce((p, u) => (p.set(u, a[u]), p), s);
63
- function c(p, u) {
64
- const l = p;
65
- return typeof u == "number" ? [{ target: l, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: l, operator: "getProperty", param: p, value: !!u }] : typeof u == "object" ? Object.keys(u).map((f) => {
66
- if (f === "length")
67
- return { target: l, operator: "length", param: null, value: u[f] };
68
- const m = f, n = u[f];
69
- return { target: l, operator: "getProperty", param: m, value: n };
65
+ Object.keys(o).reduce((s, c) => (s.set(c, o[c]), s), n);
66
+ function a(s, c) {
67
+ const l = s;
68
+ return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
69
+ if (p === "length")
70
+ return { target: l, operator: "length", param: null, value: c[p] };
71
+ const h = p, g = c[p];
72
+ return { target: l, operator: "getProperty", param: h, value: g };
70
73
  }) : [];
71
74
  }
72
- function h(p) {
73
- return Object.keys(p).reduce((l, f) => {
74
- const m = c(f, p[f]);
75
- return l.push(...m), l;
75
+ function i(s) {
76
+ return Object.keys(s).reduce((l, p) => {
77
+ const h = a(p, s[p]);
78
+ return l.push(...h), l;
76
79
  }, []);
77
80
  }
78
- function d(p, u) {
79
- if (s.has(p.operator)) {
80
- const l = s.get(p.operator);
81
- return l && l(p.target, p.param, p.value, u) || !1;
81
+ function r(s, c) {
82
+ if (n.has(s.operator)) {
83
+ const l = n.get(s.operator);
84
+ return l && l(s.target, s.param, s.value, c) || !1;
82
85
  }
83
86
  return !1;
84
87
  }
85
- function b(p, u) {
86
- return h(p).reduce((m, n) => m && d(n, u), !0);
88
+ function f(s, c) {
89
+ return i(s).reduce((h, g) => h && r(g, c), !0);
87
90
  }
88
- function j(p, u) {
89
- const l = Object.keys(p), f = l.includes("allOf"), m = l.includes("anyOf"), n = f || m, r = (n ? p[n ? f ? "allOf" : "anyOf" : "allOf"] : [p]).map((g) => b(g, u));
90
- return f ? !r.includes(!1) : r.includes(!0);
91
+ function m(s, c) {
92
+ const l = Object.keys(s), p = l.includes("allOf"), h = l.includes("anyOf"), g = p || h, d = (g ? s[g ? p ? "allOf" : "anyOf" : "allOf"] : [s]).map((V) => f(V, c));
93
+ return p ? !d.includes(!1) : d.includes(!0);
91
94
  }
92
- return { parseValueSchema: j };
95
+ return { parseValueSchema: m };
93
96
  }
94
- const I = {}, ee = {};
95
- x();
96
- function te(a, e, o = /* @__PURE__ */ new Map(), s = (d, b, j) => b, c = {}, h = (d) => d) {
97
- return Y[e.title] = e, J[e.title] = s, I[e.title] = c, ee[e.title] = h, (d = {}) => {
98
- const b = K(d, e, o), j = Object.keys(a).reduce((p, u) => (p[u] = a[u].default, p), {});
99
- return Object.assign(j, b);
97
+ const H = {
98
+ button: { type: "button", name: "按钮", icon: "Button" },
99
+ "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
101
+ "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
102
+ "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
103
+ textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
104
+ lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
105
+ "number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
106
+ "date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
107
+ switch: { type: "switch", name: "开关", icon: "SwitchField" },
108
+ "radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
109
+ "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
110
+ "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
111
+ "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
112
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
113
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
114
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
115
+ "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
116
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
117
+ "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
118
+ "data-grid-column": { type: "data-grid-column", name: "表格列" },
119
+ module: { type: "Module", name: "模块", icon: "Module" },
120
+ component: { type: "component", name: "组件", icon: "Component" },
121
+ tabs: { type: "tabs", name: "标签页", icon: "Tab" },
122
+ "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
123
+ "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
124
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
125
+ section: { type: "section", name: "分组面板", icon: "Section" },
126
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
127
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
128
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
129
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
130
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
131
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
132
+ "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
+ }, K = {}, I = {};
137
+ Z();
138
+ function x(o, e, t = /* @__PURE__ */ new Map(), n = (r, f, m) => f, a = {}, i = (r) => r) {
139
+ return j[e.title] = e, $[e.title] = n, K[e.title] = a, I[e.title] = i, (r = {}) => {
140
+ const f = X(r, e, t), m = Object.keys(o).reduce((s, c) => (s[c] = o[c].default, s), {});
141
+ return Object.assign(m, f);
100
142
  };
101
143
  }
102
- function oe(a, e) {
144
+ function ee(o, e) {
103
145
  return { customClass: e.class, customStyle: e.style };
104
146
  }
105
- const ne = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/video.schema.json", ae = "video", ce = "A Farris Video Component", se = "object", pe = {
147
+ const te = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/video.schema.json", oe = "video", ae = "A Farris Video Component", re = "object", ie = {
106
148
  id: {
107
149
  description: "The unique identifier for a Video",
108
150
  type: "string"
@@ -130,24 +172,24 @@ const ne = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-
130
172
  type: "boolean",
131
173
  default: !0
132
174
  }
133
- }, ie = [
175
+ }, se = [
134
176
  "id",
135
177
  "type"
136
- ], le = {
137
- $schema: ne,
138
- $id: re,
139
- title: ae,
140
- description: ce,
141
- type: se,
142
- properties: pe,
143
- required: ie
144
- }, ue = /* @__PURE__ */ new Map([
145
- ["appearance", oe]
178
+ ], ce = {
179
+ $schema: te,
180
+ $id: ne,
181
+ title: oe,
182
+ description: ae,
183
+ type: re,
184
+ properties: ie,
185
+ required: se
186
+ }, le = /* @__PURE__ */ new Map([
187
+ ["appearance", ee]
146
188
  ]);
147
- function fe(a, e, o) {
189
+ function pe(o, e, t) {
148
190
  return e;
149
191
  }
150
- const de = "verify-detail", ye = "A Farris Component", he = "object", be = {
192
+ const ue = "verify-detail", de = "A Farris Component", fe = "object", me = {
151
193
  basic: {
152
194
  description: "Basic Infomation",
153
195
  title: "基本信息",
@@ -169,12 +211,12 @@ const de = "verify-detail", ye = "A Farris Component", he = "object", be = {
169
211
  }
170
212
  }
171
213
  }
172
- }, ge = {
173
- title: de,
174
- description: ye,
175
- type: he,
176
- categories: be
177
- }, B = {
214
+ }, he = {
215
+ title: ue,
216
+ description: de,
217
+ type: fe,
218
+ categories: me
219
+ }, S = {
178
220
  src: {
179
221
  type: String,
180
222
  required: !0,
@@ -211,1049 +253,508 @@ const de = "verify-detail", ye = "A Farris Component", he = "object", be = {
211
253
  type: [String, Number],
212
254
  default: 168
213
255
  }
214
- }, W = te(B, le, ue, fe, ge);
215
- function me(a, e) {
216
- function o(t) {
217
- t.stopPropagation(), e.emit("abort");
256
+ }, A = x(S, ce, le, pe, he);
257
+ function ye(o, e) {
258
+ function t(u) {
259
+ u.stopPropagation(), e.emit("abort");
218
260
  }
219
- function s(t) {
220
- t.stopPropagation(), e.emit("play");
261
+ function n(u) {
262
+ u.stopPropagation(), e.emit("play");
221
263
  }
222
- function c(t) {
223
- t.stopPropagation(), e.emit("pause");
264
+ function a(u) {
265
+ u.stopPropagation(), e.emit("pause");
224
266
  }
225
- function h(t) {
226
- t.stopPropagation(), e.emit("ended");
267
+ function i(u) {
268
+ u.stopPropagation(), e.emit("ended");
227
269
  }
228
- function d(t) {
229
- t.stopPropagation(), e.emit("durationchange");
270
+ function r(u) {
271
+ u.stopPropagation(), e.emit("durationchange");
230
272
  }
231
- function b(t) {
232
- t.stopPropagation(), e.emit("error");
273
+ function f(u) {
274
+ u.stopPropagation(), e.emit("error");
233
275
  }
234
- function j(t) {
235
- t.stopPropagation(), e.emit("loadeddata");
276
+ function m(u) {
277
+ u.stopPropagation(), e.emit("loadeddata");
236
278
  }
237
- function p(t) {
238
- t.stopPropagation(), e.emit("loadedmetadata");
279
+ function s(u) {
280
+ u.stopPropagation(), e.emit("loadedmetadata");
239
281
  }
240
- function u(t) {
241
- t.stopPropagation(), e.emit("loadstart");
282
+ function c(u) {
283
+ u.stopPropagation(), e.emit("loadstart");
242
284
  }
243
- function l(t) {
244
- t.stopPropagation(), e.emit("playing");
285
+ function l(u) {
286
+ u.stopPropagation(), e.emit("playing");
245
287
  }
246
- function f(t) {
247
- t.stopPropagation(), e.emit("progress");
288
+ function p(u) {
289
+ u.stopPropagation(), e.emit("progress");
248
290
  }
249
- function m(t) {
250
- t.stopPropagation(), e.emit("timeupdate");
291
+ function h(u) {
292
+ u.stopPropagation(), e.emit("timeupdate");
251
293
  }
252
- function n(t) {
253
- t.stopPropagation(), e.emit("volumechange");
294
+ function g(u) {
295
+ u.stopPropagation(), e.emit("volumechange");
254
296
  }
255
- function i(t) {
256
- t.stopPropagation(), e.emit("canplay");
297
+ function b(u) {
298
+ u.stopPropagation(), e.emit("canplay");
257
299
  }
258
300
  return {
259
- onAbort: o,
260
- onPlay: s,
261
- onPause: c,
262
- onEnded: h,
263
- onDurationchange: d,
264
- onError: b,
265
- onLoadeddata: j,
266
- onLoadedmetadata: p,
267
- onLoadstart: u,
301
+ onAbort: t,
302
+ onPlay: n,
303
+ onPause: a,
304
+ onEnded: i,
305
+ onDurationchange: r,
306
+ onError: f,
307
+ onLoadeddata: m,
308
+ onLoadedmetadata: s,
309
+ onLoadstart: c,
268
310
  onPlaying: l,
269
- onProgress: f,
270
- onTimeupdate: m,
271
- onVolumechange: n,
272
- onCanplay: i
311
+ onProgress: p,
312
+ onTimeupdate: h,
313
+ onVolumechange: g,
314
+ onCanplay: b
273
315
  };
274
316
  }
275
- const M = /* @__PURE__ */ q({
317
+ const D = /* @__PURE__ */ F({
276
318
  name: "FVideo",
277
- props: B,
319
+ props: S,
278
320
  emits: ["abort", "play", "pause", "ended", "durationchange", "canplay", "error", "loadeddata", "loadedmetadata", "loadstart", "playing", "progress", "timeupdate", "volumechange"],
279
- setup(a, e) {
280
- const o = T(), {
281
- onAbort: s,
282
- onPlay: c,
283
- onPause: h,
284
- onEnded: d,
285
- onDurationchange: b,
286
- onError: j,
287
- onLoadeddata: p,
288
- onLoadedmetadata: u,
321
+ setup(o, e) {
322
+ const t = M(), {
323
+ onAbort: n,
324
+ onPlay: a,
325
+ onPause: i,
326
+ onEnded: r,
327
+ onDurationchange: f,
328
+ onError: m,
329
+ onLoadeddata: s,
330
+ onLoadedmetadata: c,
289
331
  onLoadstart: l,
290
- onPlaying: f,
291
- onProgress: m,
292
- onTimeupdate: n,
293
- onVolumechange: i,
294
- onCanplay: t
295
- } = me(a, e);
296
- return _(() => {
297
- }), () => S("video", {
298
- ref: o,
299
- src: a.src,
300
- autoplay: a.autoplay,
301
- controls: a.controls,
302
- loop: a.loop,
303
- muted: a.muted,
304
- width: a.width,
305
- height: a.height,
306
- poster: a.poster,
307
- onAbort: (r) => s(r),
308
- onPlay: (r) => c(r),
309
- onPause: (r) => h(r),
310
- onEnded: (r) => d(r),
311
- onDurationchange: (r) => b(r),
312
- onError: (r) => j(r),
313
- onLoadeddata: (r) => p(r),
314
- onLoadedmetadata: (r) => u(r),
315
- onLoadstart: (r) => l(r),
316
- onPlaying: (r) => f(r),
317
- onProgress: (r) => m(r),
318
- onTimeupdate: (r) => n(r),
319
- onVolumechange: (r) => i(r),
320
- onCanplay: (r) => t(r)
321
- }, [z("Your browser does not support the video tag.")]);
332
+ onPlaying: p,
333
+ onProgress: h,
334
+ onTimeupdate: g,
335
+ onVolumechange: b,
336
+ onCanplay: u
337
+ } = ye(o, e);
338
+ return N(() => {
339
+ }), () => T("video", {
340
+ ref: t,
341
+ src: o.src,
342
+ autoplay: o.autoplay,
343
+ controls: o.controls,
344
+ loop: o.loop,
345
+ muted: o.muted,
346
+ width: o.width,
347
+ height: o.height,
348
+ poster: o.poster,
349
+ onAbort: (d) => n(d),
350
+ onPlay: (d) => a(d),
351
+ onPause: (d) => i(d),
352
+ onEnded: (d) => r(d),
353
+ onDurationchange: (d) => f(d),
354
+ onError: (d) => m(d),
355
+ onLoadeddata: (d) => s(d),
356
+ onLoadedmetadata: (d) => c(d),
357
+ onLoadstart: (d) => l(d),
358
+ onPlaying: (d) => p(d),
359
+ onProgress: (d) => h(d),
360
+ onTimeupdate: (d) => g(d),
361
+ onVolumechange: (d) => b(d),
362
+ onCanplay: (d) => u(d)
363
+ }, [O("Your browser does not support the video tag.")]);
322
364
  }
323
365
  });
324
- function je(a, e, o) {
325
- var O;
326
- function s() {
327
- o != null && o.resolveComponentContext && o.resolveComponentContext();
366
+ function ge(o, e, t) {
367
+ var k;
368
+ function n() {
369
+ t != null && t.resolveComponentContext && t.resolveComponentContext();
328
370
  }
329
- s();
330
- const c = o && o.getStyles && o.getStyles() || "", h = o && o.getDesignerClass && o.getDesignerClass() || "", d = T();
331
- function b() {
332
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : o && o.checkCanMoveComponent ? o.checkCanMoveComponent() : !0;
371
+ n();
372
+ const a = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = M();
373
+ function f() {
374
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
333
375
  }
334
- function j() {
376
+ function m() {
335
377
  return !1;
336
378
  }
337
- function p() {
338
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : o && o.checkCanDeleteComponent ? o.checkCanDeleteComponent() : !0;
379
+ function s() {
380
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
339
381
  }
340
- function u() {
341
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : o && o.hideNestedPaddingInDesginerView ? o.hideNestedPaddingInDesginerView() : !1;
382
+ function c() {
383
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
342
384
  }
343
385
  function l(y) {
344
386
  if (!y || !y.value)
345
387
  return null;
346
388
  if (y.value.schema && y.value.schema.type === "component")
347
389
  return y.value;
348
- const w = T(y == null ? void 0 : y.value.parent), A = l(w);
349
- return A || null;
390
+ const C = M(y == null ? void 0 : y.value.parent), P = l(C);
391
+ return P || null;
350
392
  }
351
- function f(y = e) {
352
- const { componentInstance: w, designerItemElementRef: A } = y;
353
- return !w || !w.value ? null : w.value.canMove ? A : f(y.parent);
393
+ function p(y = e) {
394
+ const { componentInstance: C, designerItemElementRef: P } = y;
395
+ return !C || !C.value ? null : C.value.canMove ? P : p(y.parent);
354
396
  }
355
- function m(y) {
356
- return !!o && o.canAccepts(y);
397
+ function h(y) {
398
+ return !!t && t.canAccepts(y);
357
399
  }
358
- function n() {
400
+ function g() {
359
401
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
360
402
  }
361
- function i() {
362
- }
363
- function t(y, w) {
364
- w && o != null && o.onAcceptMovedChildElement && o.onAcceptMovedChildElement(w);
403
+ function b() {
365
404
  }
366
- function r(y, w) {
367
- const { componentType: A } = y;
368
- let C = L(A, y, w);
369
- o && o.onResolveNewComponentSchema && (C = o.onResolveNewComponentSchema(y, C));
370
- const E = A.toLowerCase().replace("-", "_");
371
- return C && !C.id && C.type === A && (C.id = `${E}_${Math.random().toString().slice(2, 6)}`), C;
405
+ function u(y, C) {
406
+ C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
372
407
  }
373
- function P(y, w) {
374
- const A = String(y.getAttribute("data-controltype")), C = y.getAttribute("data-feature"), E = C ? JSON.parse(C) : {};
375
- E.parentComponentInstance = d.value;
376
- let D = L(A, E);
377
- o && o.onAcceptNewChildElement && (D = o.onAcceptNewChildElement(y, w, D));
378
- const N = A.toLowerCase().replace("-", "_");
379
- return D && !D.id && D.type === A && (D.id = `${N}_${Math.random().toString().slice(2, 6)}`), D;
408
+ function d(y, C) {
409
+ const { componentType: P } = y;
410
+ let w = G(P, y, C);
411
+ t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(y, w));
412
+ const W = P.toLowerCase().replace("-", "_");
413
+ return w && !w.id && w.type === P && (w.id = `${W}_${Math.random().toString().slice(2, 6)}`), w;
380
414
  }
381
- function g(y) {
415
+ function L(y) {
382
416
  }
383
- function v(...y) {
384
- if (o && o.getPropsConfig)
385
- return o.getPropsConfig(...y);
417
+ function V(...y) {
418
+ if (t && t.getPropsConfig)
419
+ return t.getPropsConfig(...y);
386
420
  }
387
- return d.value = {
388
- canMove: b(),
389
- canSelectParent: j(),
390
- canDelete: p(),
391
- canNested: !u(),
421
+ return r.value = {
422
+ canMove: f(),
423
+ canSelectParent: m(),
424
+ canDelete: s(),
425
+ canNested: !c(),
392
426
  contents: e == null ? void 0 : e.schema.contents,
393
- elementRef: a,
394
- parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
427
+ elementRef: o,
428
+ parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
395
429
  schema: e == null ? void 0 : e.schema,
396
- styles: c,
397
- designerClass: h,
398
- canAccepts: m,
430
+ styles: a,
431
+ designerClass: i,
432
+ canAccepts: h,
399
433
  getBelongedComponentInstance: l,
400
- getDraggableDesignItemElement: f,
401
- getDraggingDisplayText: n,
402
- getPropConfig: v,
403
- getDragScopeElement: i,
404
- onAcceptMovedChildElement: t,
405
- onAcceptNewChildElement: P,
406
- onChildElementMovedOut: g,
407
- addNewChildComponentSchema: r,
408
- updateDragAndDropRules: s,
409
- triggerBelongedComponentToMoveWhenMoved: !!o && o.triggerBelongedComponentToMoveWhenMoved || T(!1),
410
- triggerBelongedComponentToDeleteWhenDeleted: !!o && o.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
411
- }, d;
434
+ getDraggableDesignItemElement: p,
435
+ getDraggingDisplayText: g,
436
+ getPropConfig: V,
437
+ getDragScopeElement: b,
438
+ onAcceptMovedChildElement: u,
439
+ onChildElementMovedOut: L,
440
+ addNewChildComponentSchema: d,
441
+ updateDragAndDropRules: n,
442
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
443
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
444
+ }, r;
412
445
  }
413
- const Pe = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/dragging-rules.schema.json", Ae = "Dragging Rules", we = "The rules of designer canvas", Ce = "object", De = {
414
- "f-page": {
415
- description: "The root class of page designed by farris.",
416
- type: "object",
417
- properties: {
418
- contents: {
419
- type: "object",
420
- properties: {
421
- "f-page-header": {
422
- description: "The class of page header designed by farris.",
423
- type: "string"
424
- },
425
- "f-page-main": {
426
- description: "The class of page body designed by farris.",
427
- type: "object",
428
- properties: {
429
- contents: {
430
- type: "object",
431
- properties: {
432
- "f-struct-like-card": {
433
- description: "",
434
- type: "object",
435
- properties: {
436
- contents: {
437
- type: "object",
438
- properties: {
439
- "f-struct-form": {
440
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
441
- type: "object",
442
- properties: {
443
- contents: {
444
- type: "object",
445
- properties: {
446
- "f-section-form": {
447
- description: "The class of section which has wrapped a reponse-form component.",
448
- type: "object",
449
- properties: {
450
- contents: {
451
- type: "object",
452
- properties: {
453
- "f-form-layout": {
454
- description: "The class of reponse form",
455
- type: "object",
456
- properties: {
457
- rules: {
458
- type: "object",
459
- properties: {
460
- canAccept: {
461
- type: "boolean",
462
- const: !0
463
- },
464
- fixed: {
465
- type: "boolean",
466
- const: !0
467
- },
468
- hidePadding: {
469
- type: "boolean",
470
- const: !1
471
- }
472
- }
473
- }
474
- }
475
- }
476
- }
477
- },
478
- rules: {
479
- type: "object",
480
- properties: {
481
- canAccept: {
482
- type: "boolean",
483
- const: !1
484
- },
485
- fixed: {
486
- type: "boolean",
487
- const: !0
488
- },
489
- hidePadding: {
490
- type: "boolean",
491
- const: !0
492
- }
493
- }
494
- }
495
- }
496
- }
497
- }
498
- },
499
- rules: {
500
- type: "object",
501
- properties: {
502
- canAccept: {
503
- type: "boolean",
504
- const: !1
505
- },
506
- fixed: {
507
- type: "boolean",
508
- const: !1
509
- },
510
- hidePadding: {
511
- type: "boolean",
512
- const: !0
513
- }
514
- }
515
- }
516
- }
517
- },
518
- "f-struct-wrapper": {
519
- description: "",
520
- type: "object",
521
- properties: {
522
- contents: {
523
- type: "object",
524
- properties: {
525
- "f-section-tabs": {
526
- description: "The class of section which has wrapped sub-grid tabs.",
527
- type: "object",
528
- properties: {
529
- contents: {
530
- type: "object",
531
- properties: {
532
- "f-tabs-in-card": {
533
- description: "The class of tabs which contains sub-grid.",
534
- type: "object",
535
- properties: {
536
- contents: {
537
- type: "object",
538
- properties: {
539
- "f-struct-data-grid-in-card": {
540
- description: "The class of sub-grid component",
541
- type: "object",
542
- properties: {
543
- contents: {
544
- type: "object",
545
- properties: {
546
- "f-grid-is-sub": {
547
- description: "The class of sub-grid",
548
- type: "object",
549
- properties: {
550
- rules: {
551
- type: "object",
552
- properties: {
553
- canAccept: {
554
- type: "boolean",
555
- const: !0
556
- },
557
- fixed: {
558
- type: "boolean",
559
- const: !0
560
- },
561
- hidePadding: {
562
- type: "boolean",
563
- const: !1
564
- }
565
- }
566
- }
567
- }
568
- }
569
- }
570
- },
571
- rules: {
572
- type: "object",
573
- properties: {
574
- canAccept: {
575
- type: "boolean",
576
- const: !1
577
- },
578
- fixed: {
579
- type: "boolean",
580
- const: !1
581
- },
582
- hidePadding: {
583
- type: "boolean",
584
- const: !0
585
- }
586
- }
587
- }
588
- }
589
- }
590
- }
591
- },
592
- rules: {
593
- type: "object",
594
- properties: {
595
- canAccept: {
596
- type: "boolean",
597
- const: !1
598
- },
599
- fixed: {
600
- type: "boolean",
601
- const: !0
602
- },
603
- hidePadding: {
604
- type: "boolean",
605
- const: !0
606
- }
607
- }
608
- }
609
- }
610
- }
611
- }
612
- },
613
- rules: {
614
- type: "object",
615
- properties: {
616
- canAccept: {
617
- type: "boolean",
618
- const: !1
619
- },
620
- fixed: {
621
- type: "boolean",
622
- const: !0
623
- },
624
- hidePadding: {
625
- type: "boolean",
626
- const: !0
627
- }
628
- }
629
- }
630
- }
631
- },
632
- "f-section-in-main": {
633
- description: "The class of section which has wrapped a reponse-form component.",
634
- type: "object",
635
- properties: {
636
- rules: {
637
- type: "object",
638
- properties: {
639
- canAccept: {
640
- type: "boolean",
641
- const: !0
642
- },
643
- fixed: {
644
- type: "boolean",
645
- const: !0
646
- },
647
- hidePadding: {
648
- type: "boolean",
649
- const: !1
650
- }
651
- }
652
- }
653
- }
654
- }
655
- }
656
- },
657
- rules: {
658
- type: "object",
659
- properties: {
660
- canAccept: {
661
- type: "boolean",
662
- const: !1
663
- },
664
- fixed: {
665
- type: "boolean",
666
- const: !1
667
- },
668
- hidePadding: {
669
- type: "boolean",
670
- const: !0
671
- }
672
- }
673
- }
674
- }
675
- }
676
- }
677
- },
678
- rules: {
679
- type: "object",
680
- properties: {
681
- canAccept: {
682
- type: "boolean",
683
- const: !0
684
- },
685
- fixed: {
686
- type: "boolean",
687
- const: !0
688
- },
689
- hidePadding: {
690
- type: "object",
691
- const: {
692
- allOf: [
693
- {
694
- sibling: 0,
695
- parent: {
696
- "f-page-main": !0
697
- }
698
- }
699
- ]
700
- }
701
- }
702
- }
703
- }
704
- }
705
- },
706
- "f-struct-data-grid": {
707
- description: "",
708
- type: "object",
709
- properties: {
710
- rules: {
711
- type: "object",
712
- properties: {
713
- canAccept: {
714
- type: "object",
715
- const: !0
716
- },
717
- fixed: {
718
- type: "boolean",
719
- const: !0
720
- },
721
- hidePadding: {
722
- type: "boolean",
723
- const: !0
724
- }
725
- }
726
- }
727
- }
728
- },
729
- "f-page-main-content": {
730
- description: "",
731
- type: "object",
732
- properties: {
733
- contents: {
734
- type: "object",
735
- properties: {
736
- "f-page-content-nav": {
737
- description: "",
738
- type: "object",
739
- properties: {
740
- contents: {
741
- type: "object",
742
- properties: {
743
- "f-struct-data-grid-in-nav": {
744
- description: "",
745
- type: "object",
746
- properties: {
747
- contents: {
748
- type: "object",
749
- properties: {
750
- "f-page-content-nav-extend": {
751
- description: "",
752
- type: "object"
753
- },
754
- "f-section-in-nav": {
755
- description: "",
756
- type: "object",
757
- properties: {
758
- rules: {
759
- type: "object",
760
- properties: {
761
- canAccept: {
762
- type: "boolean",
763
- const: !1
764
- },
765
- fixed: {
766
- type: "boolean",
767
- const: !0
768
- },
769
- hidePadding: {
770
- type: "boolean",
771
- const: !1
772
- }
773
- }
774
- }
775
- }
776
- }
777
- }
778
- },
779
- rules: {
780
- type: "object",
781
- properties: {
782
- canAccept: {
783
- type: "boolean",
784
- const: !0
785
- },
786
- fixed: {
787
- type: "boolean",
788
- const: !1
789
- },
790
- hidePadding: {
791
- type: "boolean",
792
- const: !0
793
- }
794
- }
795
- }
796
- }
797
- }
798
- }
799
- }
800
- }
801
- },
802
- "f-page-content-main": {
803
- description: "",
804
- type: "object",
805
- properties: {}
806
- }
807
- }
808
- }
809
- }
810
- },
811
- "f-page-content": {
812
- description: "",
813
- type: "object",
814
- properties: {
815
- contents: {
816
- type: "object",
817
- properties: {
818
- "f-page-content-nav": {
819
- description: "",
820
- type: "object",
821
- properties: {
822
- contents: {
823
- type: "object",
824
- properties: {
825
- "f-list-nav": {
826
- description: "",
827
- type: "object"
828
- },
829
- "f-list-nav-left": {
830
- description: "",
831
- type: "object"
832
- },
833
- "f-struct-data-grid-in-nav": {
834
- description: "",
835
- type: "object",
836
- properties: {
837
- contents: {
838
- type: "object",
839
- properties: {
840
- "f-section-form": {
841
- description: "",
842
- type: "object",
843
- properties: {
844
- rules: {
845
- type: "object",
846
- properties: {
847
- canAccept: {
848
- type: "boolean",
849
- const: !1
850
- },
851
- fixed: {
852
- type: "boolean",
853
- const: !0
854
- },
855
- hidePadding: {
856
- type: "boolean",
857
- const: !0
858
- }
859
- }
860
- }
861
- }
862
- },
863
- "f-section-grid": {
864
- description: "",
865
- type: "object",
866
- properties: {
867
- rules: {
868
- type: "object",
869
- properties: {
870
- canAccept: {
871
- type: "boolean",
872
- const: !1
873
- },
874
- fixed: {
875
- type: "boolean",
876
- const: !0
877
- },
878
- hidePadding: {
879
- type: "boolean",
880
- const: !0
881
- }
882
- }
883
- }
884
- }
885
- }
886
- }
887
- },
888
- rules: {
889
- type: "object",
890
- properties: {
891
- canAccept: {
892
- type: "boolean",
893
- const: !1
894
- },
895
- fixed: {
896
- type: "boolean",
897
- const: !0
898
- },
899
- hidePadding: {
900
- type: "boolean",
901
- const: !0
902
- }
903
- }
904
- }
905
- }
906
- }
907
- }
908
- }
909
- },
910
- rules: {
911
- type: "object",
912
- properties: {
913
- canAccept: {
914
- type: "boolean",
915
- const: !1
916
- },
917
- fixed: {
918
- type: "boolean",
919
- const: !0
920
- },
921
- hidePadding: {
922
- type: "boolean",
923
- const: !0
924
- }
925
- }
926
- }
927
- },
928
- "f-page-content-main": {
929
- description: "",
930
- type: "object",
931
- properties: {
932
- rules: {
933
- type: "object",
934
- properties: {
935
- canAccept: {
936
- type: "boolean",
937
- const: !1
938
- },
939
- fixed: {
940
- type: "boolean",
941
- const: !1
942
- },
943
- hidePadding: {
944
- type: "boolean",
945
- const: !0
946
- }
947
- }
948
- }
949
- }
950
- }
951
- }
952
- },
953
- rules: {
954
- type: "object",
955
- properties: {
956
- canAccept: {
957
- type: "boolean",
958
- const: !1
959
- },
960
- fixed: {
961
- type: "boolean",
962
- const: !0
963
- },
964
- hidePadding: {
965
- type: "boolean",
966
- const: !0
967
- }
968
- }
969
- }
970
- }
971
- }
972
- }
973
- },
974
- rules: {
975
- type: "object",
976
- properties: {
977
- canAccept: {
978
- type: "object",
979
- const: {
980
- anyOf: [
981
- {
982
- children: 0
983
- },
984
- {
985
- children: {
986
- length: {
987
- not: 1
988
- },
989
- "f-struct-like-card": !0
990
- }
991
- },
992
- {
993
- children: {
994
- "scroll-spy": !1,
995
- "f-page-content": !1,
996
- "f-struct-like-card": !1
997
- }
998
- }
999
- ]
1000
- }
1001
- },
1002
- fixed: {
1003
- type: "boolean",
1004
- const: !0
1005
- },
1006
- hidePadding: {
1007
- type: "boolean",
1008
- const: !0
1009
- }
1010
- }
1011
- }
1012
- }
1013
- },
1014
- "f-page-footer": {
1015
- description: "The class of page footer designed by farris.",
1016
- type: "string"
446
+ class ve {
447
+ getTemplateRule(e, t) {
448
+ const n = t == null ? void 0 : t.formSchemaUtils, a = n == null ? void 0 : n.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
449
+ if (!a)
450
+ return i;
451
+ const r = this.getComponentContext(e);
452
+ return r.componentClassList.forEach((m) => {
453
+ if (!m || !a[m])
454
+ return;
455
+ const { canMove: s, canDelete: c, canAccept: l } = a[m];
456
+ i.canMove = i.canMove && this.resolveRuleValue(s, r), i.canDelete = i.canDelete && this.resolveRuleValue(c, r), i.canAccept = i.canAccept && this.resolveRuleValue(l, r);
457
+ }), i;
458
+ }
459
+ resolveRuleValue(e, t) {
460
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
461
+ }
462
+ parseRuleValueSchema(e, t) {
463
+ const n = e.invalidContext || [];
464
+ let a = !0;
465
+ for (const i of n) {
466
+ if (i.firstLevelChild) {
467
+ if (i.firstLevelChild.class) {
468
+ const r = t.firstLevelChildClassList;
469
+ if (r && !r.includes(i.firstLevelChild.class)) {
470
+ a = !1;
471
+ continue;
1017
472
  }
1018
473
  }
1019
- },
1020
- rules: {
1021
- type: "object",
1022
- properties: {
1023
- canAccept: {
1024
- type: "boolean",
1025
- const: !1
1026
- },
1027
- fixed: {
1028
- type: "boolean",
1029
- const: !0
1030
- },
1031
- hidePadding: {
1032
- type: "boolean",
1033
- const: !0
474
+ if (i.firstLevelChild.type) {
475
+ const r = t.firstLevelChildSchema;
476
+ if (r && r.type !== i.firstLevelChild.type) {
477
+ a = !1;
478
+ continue;
479
+ }
480
+ }
481
+ }
482
+ if (i.secondLevelChild) {
483
+ if (i.secondLevelChild.class) {
484
+ const r = t.secondLevelChildClassList;
485
+ if (r && !r.includes(i.secondLevelChild.class)) {
486
+ a = !1;
487
+ continue;
488
+ }
489
+ }
490
+ if (i.secondLevelChild.type) {
491
+ const r = t.secondLevelChildSchema;
492
+ if (r && r.type !== i.secondLevelChild.type) {
493
+ a = !1;
494
+ continue;
1034
495
  }
1035
496
  }
1036
497
  }
498
+ if (i.parent) {
499
+ if (i.parent.class) {
500
+ const r = t.parentClassList;
501
+ if (r && !r.includes(i.parent.class)) {
502
+ a = !1;
503
+ continue;
504
+ }
505
+ }
506
+ if (i.parent.type) {
507
+ const r = t.parentSchema;
508
+ if (r && r.type !== i.parent.type) {
509
+ a = !1;
510
+ continue;
511
+ }
512
+ }
513
+ }
514
+ a = !0;
515
+ break;
1037
516
  }
1038
- },
1039
- "f-page-is-managelist": {
1040
- description: "The root class of mangement list page.",
1041
- type: "string"
1042
- },
1043
- "f-page-card": {
1044
- description: "",
1045
- type: "object"
1046
- },
1047
- "f-page-is-mainsubcard": {
1048
- description: "",
1049
- type: "object"
517
+ return !a;
518
+ }
519
+ getComponentContext(e) {
520
+ var b, u, d, L;
521
+ const t = e.schema, n = t.appearance && t.appearance.class || "", a = n.split(" ") || [], i = t.contents || [], r = i.length ? i[0] : null, f = r && r.appearance ? r.appearance.class : "", m = f ? f.split(" ") : [], s = (b = r == null ? void 0 : r.contents) != null && b.length ? r == null ? void 0 : r.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", l = c ? c.split(" ") : [], p = t.type === "component" ? (d = (u = e.parent) == null ? void 0 : u.parent) == null ? void 0 : d.schema : (L = e.parent) == null ? void 0 : L.schema, h = p && p.appearance && p.appearance.class || "", g = h ? h.split(" ") : [];
522
+ return {
523
+ componentClass: n,
524
+ componentClassList: a,
525
+ childContents: i,
526
+ firstLevelChildSchema: r,
527
+ firstLevelChildClass: f,
528
+ firstLevelChildClassList: m,
529
+ secondLevelChildSchema: s,
530
+ secondLevelChildClass: c,
531
+ secondLevelChildClassList: l,
532
+ parentSchema: p,
533
+ parentClass: h,
534
+ parentClassList: g
535
+ };
1050
536
  }
1051
- }, Oe = {
1052
- $schema: Pe,
1053
- $id: ve,
1054
- title: Ae,
1055
- description: we,
1056
- type: Ce,
1057
- properties: De
1058
- }, $ = /* @__PURE__ */ new Map();
1059
- function Te() {
1060
- function a(n, i, t, r) {
1061
- var P;
1062
- if (typeof t == "number")
1063
- return ((P = r[n]) == null ? void 0 : P.length) === t;
1064
- if (typeof t == "object") {
1065
- const g = Object.keys(t)[0], v = t[g];
1066
- if (g === "not")
1067
- return Number(r[n].length) !== Number(v);
1068
- if (g === "moreThan")
1069
- return Number(r[n].length) >= Number(v);
1070
- if (g === "lessThan")
1071
- return Number(r[n].length) <= Number(v);
537
+ }
538
+ class be {
539
+ constructor(e, t) {
540
+ v(this, "componentId");
541
+ v(this, "viewModelId");
542
+ v(this, "eventsEditorUtils");
543
+ v(this, "formSchemaUtils");
544
+ v(this, "formMetadataConverter");
545
+ v(this, "designViewModelUtils");
546
+ v(this, "designViewModelField");
547
+ v(this, "controlCreatorUtils");
548
+ v(this, "designerHostService");
549
+ v(this, "schemaService", null);
550
+ v(this, "metadataService", null);
551
+ v(this, "propertyConfig", {
552
+ type: "object",
553
+ categories: {}
554
+ });
555
+ var n;
556
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
557
+ }
558
+ getTableInfo() {
559
+ var e;
560
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
561
+ }
562
+ setDesignViewModelField(e) {
563
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
564
+ if (t) {
565
+ if (!this.designViewModelField) {
566
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
567
+ this.designViewModelField = n.fields.find((a) => a.id === t);
568
+ }
569
+ e.updateOn = this.designViewModelField.updateOn;
1072
570
  }
1073
- return !1;
1074
571
  }
1075
- function e(n, i, t, r) {
1076
- return typeof t == "boolean" ? r.childrenClassList.includes(i) === !!t : !1;
572
+ changeFieldEditorType(e, t) {
573
+ }
574
+ getBasicPropConfig(e) {
575
+ return {
576
+ description: "Basic Information",
577
+ title: "基本信息",
578
+ properties: {
579
+ id: {
580
+ description: "组件标识",
581
+ title: "标识",
582
+ type: "string",
583
+ readonly: !0
584
+ },
585
+ type: {
586
+ description: "组件类型",
587
+ title: "控件类型",
588
+ type: "select",
589
+ editor: {
590
+ type: "combo-list",
591
+ textField: "name",
592
+ valueField: "value",
593
+ data: [{ value: e.type, name: H[e.type].name }]
594
+ }
595
+ }
596
+ }
597
+ };
1077
598
  }
1078
- function o(n, i, t, r) {
1079
- return typeof t == "boolean" ? r.parentClassList.includes(i) === !!t : !1;
599
+ getAppearanceConfig(e = null) {
600
+ return {
601
+ title: "样式",
602
+ description: "Appearance",
603
+ properties: {
604
+ class: {
605
+ title: "class样式",
606
+ type: "string",
607
+ description: "组件的CSS样式",
608
+ $converter: "/converter/appearance.converter"
609
+ },
610
+ style: {
611
+ title: "style样式",
612
+ type: "string",
613
+ description: "组件的样式",
614
+ $converter: "/converter/appearance.converter"
615
+ }
616
+ }
617
+ };
1080
618
  }
1081
- function s(n, i, t, r) {
1082
- return typeof t == "boolean" ? r.parentClassList.includes(i) === !!t : !1;
619
+ /**
620
+ *
621
+ * @param propertyId
622
+ * @param componentInstance
623
+ * @returns
624
+ */
625
+ updateElementByParentContainer(e, t) {
626
+ const n = t && t.parent && t.parent.schema;
627
+ if (!n)
628
+ return;
629
+ const a = n.contents.findIndex((r) => r.id === e), i = U(n.contents[a]);
630
+ n.contents.splice(a, 1), n.contents.splice(a, 0, i);
1083
631
  }
1084
- const c = /* @__PURE__ */ new Map([
1085
- ["length", a],
1086
- ["hasChildren", e],
1087
- ["hasSibling", s],
1088
- ["hasParent", o]
1089
- ]);
1090
- function h(n, i) {
1091
- const t = n;
1092
- return typeof i == "number" ? [{ target: t, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((r) => {
1093
- if (r === "length")
1094
- return { target: t, operator: "length", param: null, value: i[r] };
1095
- const P = r, g = i[r];
1096
- return { target: t, operator: n === "children" ? "hasChildren" : n === "parent" ? "hasParent" : "hasSibling", param: P, value: g };
1097
- }) : [];
632
+ }
633
+ class Ce extends be {
634
+ constructor(e, t) {
635
+ super(e, t);
636
+ }
637
+ getPropertyConfig(e) {
638
+ return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
639
+ }
640
+ getEventPropConfig(e) {
641
+ const t = [
642
+ {
643
+ label: "onInit",
644
+ name: "初始化事件"
645
+ },
646
+ {
647
+ label: "onAfterViewInit",
648
+ name: "视图初始化后事件"
649
+ }
650
+ ];
651
+ var n = this;
652
+ const a = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
653
+ i[n.viewModelId] = {
654
+ type: "events-editor",
655
+ editor: {
656
+ initialData: a
657
+ }
658
+ }, this.propertyConfig.categories.eventsEditor = {
659
+ title: "事件",
660
+ hideTitle: !0,
661
+ properties: i,
662
+ // 这个属性,标记当属性变更得时候触发重新更新属性
663
+ refreshPanelAfterChanged: !0,
664
+ tabId: "commands",
665
+ tabName: "交互",
666
+ setPropertyRelates(r, f) {
667
+ const m = r.propertyValue;
668
+ delete e[n.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, m.events, m));
669
+ }
670
+ };
1098
671
  }
1099
- function d(n, i) {
1100
- if (c.has(n.operator)) {
1101
- const t = c.get(n.operator);
1102
- return t && t(n.target, n.param, n.value, i) || !1;
1103
- }
672
+ }
673
+ function Pe(o, e) {
674
+ const t = new ve(), { canMove: n, canDelete: a } = t.getTemplateRule(o, e);
675
+ function i() {
1104
676
  return !1;
1105
677
  }
1106
- function b(n, i) {
1107
- return Object.keys(n).reduce((g, v) => {
1108
- const O = h(v, n[v]);
1109
- return g.push(...O), g;
1110
- }, []).reduce((g, v) => g && d(v, i), !0);
1111
- }
1112
- function j(n, i) {
1113
- const t = Object.keys(n), r = t.includes("allOf"), P = t.includes("anyOf"), g = r || P, y = (g ? n[g ? r ? "allOf" : "anyOf" : "allOf"] : [n]).map((A) => b(A, i));
1114
- return r ? !y.includes(!1) : y.includes(!0);
1115
- }
1116
- function p(n, i) {
1117
- const t = n.const;
1118
- return t ? typeof t == "boolean" ? t : typeof t == "object" ? j(t, i) : !1 : !1;
1119
- }
1120
- function u(n) {
1121
- return (i) => {
1122
- const t = { canAccept: !0, fixed: !1, hidePadding: !1 };
1123
- return n && n.properties && Object.keys(n.properties).reduce((r, P) => {
1124
- const g = n.properties[P];
1125
- return r[P] = p(g, i), r;
1126
- }, t), t;
1127
- };
1128
- }
1129
- function l(n, i, t) {
1130
- if (i.type === "object" && i.properties) {
1131
- const { rules: r, contents: P } = i.properties;
1132
- t.set(n, u(r)), P && Object.keys(P.properties).forEach(
1133
- (g) => l(g, P.properties[g], t)
1134
- );
1135
- }
678
+ function r() {
679
+ return a;
1136
680
  }
1137
681
  function f() {
1138
- const { properties: n } = Oe;
1139
- Object.keys(n).forEach((i) => {
1140
- l(i, n[i], $);
1141
- });
1142
- }
1143
- function m(n, i) {
1144
- const t = { canAccept: !0, fixed: !1, hidePadding: !0 };
1145
- return $.has(n) ? $.get(n)(i) : t;
682
+ return n;
1146
683
  }
1147
- return f(), { getRuleValue: m };
1148
- }
1149
- function Ee(a) {
1150
- const e = Te();
1151
- let o = !1, s, c = !1;
1152
- const h = !1;
1153
- function d() {
684
+ function m() {
1154
685
  return !1;
1155
686
  }
1156
- function b() {
1157
- return h || !c;
1158
- }
1159
- function j() {
1160
- return !c;
1161
- }
1162
- function p() {
1163
- var E, D;
1164
- c = !1;
1165
- const l = a.schema, f = l.appearance && l.appearance.class || "", m = f.split(" "), n = l.contents || [], i = n.length ? n[0] : null, t = i && i.appearance ? i.appearance.class : "", r = t ? t.split(" ") : [], P = n.length ? n.reduce((N, V) => {
1166
- const F = V && V.appearance ? V.appearance.class : "", U = F ? F.split(" ") : [];
1167
- return N.push(...U), N;
1168
- }, []) : [];
1169
- if (((D = (E = a.parent) == null ? void 0 : E.schema) == null ? void 0 : D.type) !== "component-ref") {
1170
- o = !0, c = !0;
1171
- return;
1172
- }
1173
- const g = a.parent.parent, v = g && g.schema, O = v && v.appearance ? v.appearance.class : "", y = O ? O.split(" ") : [];
1174
- s = {
1175
- componentClass: f,
1176
- componentClassList: m,
1177
- childContents: n,
1178
- firstChildContent: i,
1179
- firstChildClass: t,
1180
- firstChildClassList: r,
1181
- parent: v,
1182
- parentClass: O,
1183
- parentClassList: y,
1184
- children: n,
1185
- childrenClassList: P
1186
- };
1187
- const { canAccept: w, fixed: A, hidePadding: C } = e.getRuleValue(m[0], s);
1188
- o = C, c = A;
687
+ function s() {
688
+ return " display: inherit;flex-direction: inherit;margin-bottom:10px";
1189
689
  }
1190
- function u() {
1191
- return o;
690
+ function c(l) {
691
+ const p = new Ce(l, e), h = o.schema;
692
+ return p.getPropertyConfig(h);
1192
693
  }
1193
- return { canAccepts: d, checkCanDeleteComponent: b, checkCanMoveComponent: j, resolveComponentContext: p, hideNestedPaddingInDesginerView: u };
694
+ return { canAccepts: i, checkCanDeleteComponent: r, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: m, getStyles: s, getPropsConfig: c };
1194
695
  }
1195
- function Ne(a, e) {
1196
- const o = T(a.width), s = T(a.height);
1197
- let c;
1198
- G(e, (d) => {
1199
- d && (o.value = d.clientWidth, c = new ResizeObserver((b) => {
1200
- if (!b || b.length < 1)
696
+ function Me(o, e) {
697
+ const t = M(o.width), n = M(o.height);
698
+ let a;
699
+ z(e, (r) => {
700
+ r && (t.value = r.clientWidth, a = new ResizeObserver((f) => {
701
+ if (!f || f.length < 1)
1201
702
  return;
1202
- const p = b[0].contentRect;
1203
- p && (o.value = p.width);
1204
- }), c.observe(d));
703
+ const s = f[0].contentRect;
704
+ s && (t.value = s.width);
705
+ }), a.observe(r));
1205
706
  });
1206
- function h() {
1207
- c && c.disconnect();
707
+ function i() {
708
+ a && a.disconnect();
1208
709
  }
1209
710
  return {
1210
- destory: h,
1211
- width: o,
1212
- height: s
711
+ destory: i,
712
+ width: t,
713
+ height: n
1213
714
  };
1214
715
  }
1215
- const Ve = /* @__PURE__ */ q({
716
+ const we = /* @__PURE__ */ F({
1216
717
  name: "FVideoDesign",
1217
- props: B,
1218
- setup(a, e) {
1219
- var p;
1220
- const o = T(), s = H("design-item-context"), c = Ee(s.schema, (p = s.parent) == null ? void 0 : p.schema), h = je(o, s, c), {
1221
- width: d,
1222
- height: b,
1223
- destory: j
1224
- } = Ne(a, o);
1225
- return Q(() => {
1226
- o.value.componentInstance = h;
1227
- }), _(() => {
1228
- j();
1229
- }), e.expose(h.value), () => S("div", {
1230
- ref: o,
718
+ props: S,
719
+ setup(o, e) {
720
+ var s;
721
+ const t = M(), n = Y("design-item-context"), a = Pe(n.schema, (s = n.parent) == null ? void 0 : s.schema), i = ge(t, n, a), {
722
+ width: r,
723
+ height: f,
724
+ destory: m
725
+ } = Me(o, t);
726
+ return _(() => {
727
+ t.value.componentInstance = i;
728
+ }), N(() => {
729
+ m();
730
+ }), e.expose(i.value), () => T("div", {
731
+ ref: t,
1231
732
  class: "drag-container",
1232
- "data-dragref": `${s.schema.id}-container`
1233
- }, [S("video", {
1234
- src: a.src,
1235
- autoplay: a.autoplay,
1236
- controls: a.controls,
1237
- loop: a.loop,
1238
- muted: a.muted,
1239
- width: d.value,
1240
- height: b.value
1241
- }, [z("Your browser does not support the video tag.")])]);
1242
- }
1243
- }), Se = {
1244
- install(a) {
1245
- a.component(M.name, M);
733
+ "data-dragref": `${n.schema.id}-container`
734
+ }, [T("video", {
735
+ src: o.src,
736
+ autoplay: o.autoplay,
737
+ controls: o.controls,
738
+ loop: o.loop,
739
+ muted: o.muted,
740
+ width: r.value,
741
+ height: f.value
742
+ }, [O("Your browser does not support the video tag.")])]);
743
+ }
744
+ }), Te = {
745
+ install(o) {
746
+ o.component(D.name, D);
1246
747
  },
1247
- register(a, e, o, s) {
1248
- a.video = M, e.video = W;
748
+ register(o, e, t, n) {
749
+ o.video = D, e.video = A;
1249
750
  },
1250
- registerDesigner(a, e, o) {
1251
- a.video = Ve, e.video = W;
751
+ registerDesigner(o, e, t) {
752
+ o.video = we, e.video = A;
1252
753
  }
1253
754
  };
1254
755
  export {
1255
- M as FVideo,
1256
- Se as default,
1257
- W as propsResolver,
1258
- B as videoProps
756
+ D as FVideo,
757
+ Te as default,
758
+ A as propsResolver,
759
+ S as videoProps
1259
760
  };