@farris/ui-vue 1.2.8 → 1.3.0

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 (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  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/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,105 +1,105 @@
1
- import { defineComponent as j, ref as V, watch as v, createVNode as b, Fragment as C } from "vue";
2
- import { cloneDeep as D } from "lodash-es";
3
- const T = {}, $ = {};
1
+ import { defineComponent as C, ref as D, watch as T, createVNode as b, Fragment as O } from "vue";
2
+ import { isPlainObject as j, cloneDeep as V } from "lodash-es";
3
+ const $ = {}, w = {};
4
4
  function x(t) {
5
- const { properties: e, title: u } = t, s = Object.keys(e).reduce((i, o) => (i[o] = e[o].type === "object" && e[o].properties ? x(e[o]) : D(e[o].default), i), {});
6
- return s.id = `${u}-${Date.now()}`, s;
5
+ const { properties: e, title: u, ignore: r } = t, o = r && Array.isArray(r), i = Object.keys(e).reduce((l, p) => ((!o || !r.find((g) => g == p)) && (l[p] = e[p].type === "object" && e[p].properties ? x(e[p]) : V(e[p].default)), l), {});
6
+ return (!o || !r.find((l) => l == "id")) && (i.id = `${u}-${Date.now()}`), i;
7
7
  }
8
- function w(t, e) {
8
+ function M(t, e) {
9
9
  const u = x(e);
10
- return Object.keys(t).reduce((s, i) => (s[i] && typeof s[i] == "object" ? Object.assign(s[i], t[i]) : s[i] = t[i], s), u), u;
10
+ return Object.keys(t).reduce((r, o) => (r[o] && j(r[o]) && j(t[o]) ? Object.assign(r[o], t[o]) : r[o] = t[o], r), u), u;
11
11
  }
12
- function M(t, e) {
13
- return Object.keys(t).filter((s) => t[s] != null).reduce((s, i) => {
14
- if (e.has(i)) {
15
- const o = e.get(i);
16
- if (typeof o == "string")
17
- s[o] = t[i];
12
+ function B(t, e) {
13
+ return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
14
+ if (e.has(o)) {
15
+ const i = e.get(o);
16
+ if (typeof i == "string")
17
+ r[i] = t[o];
18
18
  else {
19
- const l = o(i, t[i], t);
20
- Object.assign(s, l);
19
+ const l = i(o, t[o], t);
20
+ Object.assign(r, l);
21
21
  }
22
22
  } else
23
- s[i] = t[i];
24
- return s;
23
+ r[o] = t[o];
24
+ return r;
25
25
  }, {});
26
26
  }
27
- function B(t, e, u = /* @__PURE__ */ new Map()) {
28
- const s = w(t, e);
29
- return M(s, u);
27
+ function N(t, e, u = /* @__PURE__ */ new Map()) {
28
+ const r = M(t, e);
29
+ return B(r, u);
30
30
  }
31
- function N(t = {}) {
32
- function e(n, r, a, c) {
31
+ function A(t = {}) {
32
+ function e(n, s, a, c) {
33
33
  if (typeof a == "number")
34
34
  return c[n].length === a;
35
35
  if (typeof a == "object") {
36
- const p = Object.keys(a)[0], d = a[p];
37
- if (p === "not")
36
+ const f = Object.keys(a)[0], d = a[f];
37
+ if (f === "not")
38
38
  return Number(c[n].length) !== Number(d);
39
- if (p === "moreThan")
39
+ if (f === "moreThan")
40
40
  return Number(c[n].length) >= Number(d);
41
- if (p === "lessThan")
41
+ if (f === "lessThan")
42
42
  return Number(c[n].length) <= Number(d);
43
43
  }
44
44
  return !1;
45
45
  }
46
- function u(n, r, a, c) {
46
+ function u(n, s, a, c) {
47
47
  return c[n] && c[n].propertyValue && String(c[n].propertyValue.value) === String(a);
48
48
  }
49
- const s = /* @__PURE__ */ new Map([
49
+ const r = /* @__PURE__ */ new Map([
50
50
  ["length", e],
51
51
  ["getProperty", u]
52
52
  ]);
53
- Object.keys(t).reduce((n, r) => (n.set(r, t[r]), n), s);
54
- function i(n, r) {
53
+ Object.keys(t).reduce((n, s) => (n.set(s, t[s]), n), r);
54
+ function o(n, s) {
55
55
  const a = n;
56
- return typeof r == "number" ? [{ target: a, operator: "length", param: null, value: Number(r) }] : typeof r == "boolean" ? [{ target: a, operator: "getProperty", param: n, value: !!r }] : typeof r == "object" ? Object.keys(r).map((c) => {
56
+ return typeof s == "number" ? [{ target: a, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: a, operator: "getProperty", param: n, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
57
57
  if (c === "length")
58
- return { target: a, operator: "length", param: null, value: r[c] };
59
- const p = c, d = r[c];
60
- return { target: a, operator: "getProperty", param: p, value: d };
58
+ return { target: a, operator: "length", param: null, value: s[c] };
59
+ const f = c, d = s[c];
60
+ return { target: a, operator: "getProperty", param: f, value: d };
61
61
  }) : [];
62
62
  }
63
- function o(n) {
63
+ function i(n) {
64
64
  return Object.keys(n).reduce((a, c) => {
65
- const p = i(c, n[c]);
66
- return a.push(...p), a;
65
+ const f = o(c, n[c]);
66
+ return a.push(...f), a;
67
67
  }, []);
68
68
  }
69
- function l(n, r) {
70
- if (s.has(n.operator)) {
71
- const a = s.get(n.operator);
72
- return a && a(n.target, n.param, n.value, r) || !1;
69
+ function l(n, s) {
70
+ if (r.has(n.operator)) {
71
+ const a = r.get(n.operator);
72
+ return a && a(n.target, n.param, n.value, s) || !1;
73
73
  }
74
74
  return !1;
75
75
  }
76
- function f(n, r) {
77
- return o(n).reduce((p, d) => p && l(d, r), !0);
76
+ function p(n, s) {
77
+ return i(n).reduce((f, d) => f && l(d, s), !0);
78
78
  }
79
- function g(n, r) {
80
- const a = Object.keys(n), c = a.includes("allOf"), p = a.includes("anyOf"), d = c || p, h = (d ? n[d ? c ? "allOf" : "anyOf" : "allOf"] : [n]).map((R) => f(R, r));
79
+ function g(n, s) {
80
+ const a = Object.keys(n), c = a.includes("allOf"), f = a.includes("anyOf"), d = c || f, h = (d ? n[d ? c ? "allOf" : "anyOf" : "allOf"] : [n]).map((v) => p(v, s));
81
81
  return c ? !h.includes(!1) : h.includes(!0);
82
82
  }
83
83
  return { parseValueSchema: g };
84
84
  }
85
- const F = {}, k = {};
86
- N();
87
- function A(t, e, u = /* @__PURE__ */ new Map(), s = (l, f, g) => f, i = {}, o = (l) => l) {
88
- return T[e.title] = e, $[e.title] = s, F[e.title] = i, k[e.title] = o, (l = {}) => {
89
- const f = B(l, e, u), g = Object.keys(t).reduce((n, r) => (n[r] = t[r].default, n), {});
90
- return Object.assign(g, f);
85
+ const F = {}, P = {};
86
+ A();
87
+ function k(t, e, u = /* @__PURE__ */ new Map(), r = (l, p, g) => p, o = {}, i = (l) => l) {
88
+ return $[e.title] = e, w[e.title] = r, F[e.title] = o, P[e.title] = i, (l = {}) => {
89
+ const p = N(l, e, u), g = Object.keys(t).reduce((n, s) => (n[s] = t[s].default, n), {});
90
+ return Object.assign(g, p);
91
91
  };
92
92
  }
93
- function P(t, e) {
93
+ function q(t, e) {
94
94
  return { customClass: e.class, customStyle: e.style };
95
95
  }
96
- const q = /* @__PURE__ */ new Map([
97
- ["appearance", P]
96
+ const L = /* @__PURE__ */ new Map([
97
+ ["appearance", q]
98
98
  ]);
99
- function L(t, e, u) {
99
+ function I(t, e, u) {
100
100
  return e;
101
101
  }
102
- const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-design.gitee.io/radio-button.schema.json", z = "radio-button", G = "A Farris Component", H = "object", J = {
102
+ const S = "https://json-schema.org/draft/2020-12/schema", z = "https://farris-design.gitee.io/radio-button.schema.json", G = "radio-button", H = "A Farris Component", J = "object", Q = {
103
103
  id: {
104
104
  description: "The unique identifier for radio-button",
105
105
  type: "string"
@@ -161,18 +161,18 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
161
161
  type: "boolean",
162
162
  default: !0
163
163
  }
164
- }, Q = [
164
+ }, U = [
165
165
  "id",
166
166
  "type"
167
- ], U = {
168
- $schema: I,
169
- $id: S,
170
- title: z,
171
- description: G,
172
- type: H,
173
- properties: J,
174
- required: Q
175
- }, W = "radio-button", X = "A Farris Component", Y = "object", Z = {
167
+ ], W = {
168
+ $schema: S,
169
+ $id: z,
170
+ title: G,
171
+ description: H,
172
+ type: J,
173
+ properties: Q,
174
+ required: U
175
+ }, X = "radio-button", Y = "A Farris Component", Z = "object", _ = {
176
176
  basic: {
177
177
  description: "Basic Infomation",
178
178
  title: "基本信息",
@@ -194,12 +194,12 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
194
194
  }
195
195
  }
196
196
  }
197
- }, _ = {
198
- title: W,
199
- description: X,
200
- type: Y,
201
- categories: Z
202
- }, y = {
197
+ }, K = {
198
+ title: X,
199
+ description: Y,
200
+ type: Z,
201
+ categories: _
202
+ }, m = {
203
203
  /**
204
204
  * 单选组枚举数组
205
205
  */
@@ -213,60 +213,60 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
213
213
  */
214
214
  onSelectedValueChanged: { type: Function, default: () => {
215
215
  } }
216
- }, O = A(y, U, q, L, _), m = /* @__PURE__ */ j({
216
+ }, E = k(m, W, L, I, K), y = /* @__PURE__ */ C({
217
217
  name: "FRadioButton",
218
- props: y,
218
+ props: m,
219
219
  emits: ["selectedValueChanged"],
220
220
  setup(t, e) {
221
- const u = V(t.enumData);
222
- function s(o, l) {
223
- if (o.currentTarget.classList.value = "btn btn-secondary active", o.currentTarget.tagName.toLowerCase() === "label") {
221
+ const u = D(t.enumData);
222
+ function r(i, l) {
223
+ if (i.currentTarget.classList.value = "btn btn-secondary active", i.currentTarget.tagName.toLowerCase() === "label") {
224
224
  const {
225
- currentTarget: f
226
- } = o, g = f.parentElement;
227
- Array.from(g.querySelectorAll("label")).filter((r) => r !== f).forEach((r) => r.classList.remove("active"));
225
+ currentTarget: p
226
+ } = i, g = p.parentElement;
227
+ Array.from(g.querySelectorAll("label")).filter((s) => s !== p).forEach((s) => s.classList.remove("active"));
228
228
  }
229
229
  e.emit("selectedValueChanged", l);
230
230
  }
231
- function i(o) {
232
- return `${o.text}${t.suffixValue}`;
231
+ function o(i) {
232
+ return `${i.text}${t.suffixValue}`;
233
233
  }
234
- return v(() => t.enumData, (o, l) => {
235
- o !== l && (u.value = t.enumData);
234
+ return T(() => t.enumData, (i, l) => {
235
+ i !== l && (u.value = t.enumData);
236
236
  }), () => b("div", {
237
237
  class: "f-radio-button"
238
238
  }, [b("div", {
239
239
  class: ["farris-input-wrap"]
240
- }, [u.value.map((o, l) => b(C, null, [b("label", {
241
- class: o.active ? "btn btn-secondary active" : "btn btn-secondary",
242
- onClick: (f) => s(f, o)
240
+ }, [u.value.map((i, l) => b(O, null, [b("label", {
241
+ class: i.active ? "btn btn-secondary active" : "btn btn-secondary",
242
+ onClick: (p) => r(p, i)
243
243
  }, [b("span", {
244
244
  class: "f-radio-button-text"
245
- }, [i(o)])])]))])]);
245
+ }, [o(i)])])]))])]);
246
246
  }
247
- }), K = /* @__PURE__ */ j({
247
+ }), tt = /* @__PURE__ */ C({
248
248
  name: "FRadioButtonDesign",
249
- props: y,
249
+ props: m,
250
250
  emits: [""],
251
251
  setup(t, e) {
252
- return () => b(C, null, null);
252
+ return () => b(O, null, null);
253
253
  }
254
- }), tt = (t) => {
254
+ }), et = (t) => {
255
255
  const e = t;
256
256
  return e.install = function(u) {
257
257
  u.component(e.name, t);
258
258
  }, t;
259
259
  };
260
- m.register = (t, e, u, s) => {
261
- t["radio-button"] = m, e["radio-button"] = O;
260
+ y.register = (t, e, u, r) => {
261
+ t["radio-button"] = y, e["radio-button"] = E;
262
262
  };
263
- m.registerDesigner = (t, e, u) => {
264
- t["radio-button"] = K, e["radio-button"] = O;
263
+ y.registerDesigner = (t, e, u) => {
264
+ t["radio-button"] = tt, e["radio-button"] = E;
265
265
  };
266
- const ot = tt(m);
266
+ const it = et(y);
267
267
  export {
268
- m as RadioButton,
269
- ot as default,
270
- O as propsResolver,
271
- y as radioButtonProps
268
+ y as RadioButton,
269
+ it as default,
270
+ E as propsResolver,
271
+ m as radioButtonProps
272
272
  };
@@ -0,0 +1 @@
1
+ (function(g,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],d):(g=typeof globalThis<"u"?globalThis:g||self,d(g["radio-button"]={},g.Vue,g.LodashES))})(this,function(g,d,j){"use strict";const $={},N={};function V(e){const{properties:t,title:u,ignore:r}=e,s=r&&Array.isArray(r),i=Object.keys(t).reduce((l,p)=>((!s||!r.find(y=>y==p))&&(l[p]=t[p].type==="object"&&t[p].properties?V(t[p]):j.cloneDeep(t[p].default)),l),{});return(!s||!r.find(l=>l=="id"))&&(i.id=`${u}-${Date.now()}`),i}function R(e,t){const u=V(t);return Object.keys(e).reduce((r,s)=>(r[s]&&j.isPlainObject(r[s])&&j.isPlainObject(e[s])?Object.assign(r[s],e[s]):r[s]=e[s],r),u),u}function T(e,t){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,s)=>{if(t.has(s)){const i=t.get(s);if(typeof i=="string")r[i]=e[s];else{const l=i(s,e[s],e);Object.assign(r,l)}}else r[s]=e[s];return r},{})}function x(e,t,u=new Map){const r=R(e,t);return T(r,u)}function M(e={}){function t(n,o,a,c){if(typeof a=="number")return c[n].length===a;if(typeof a=="object"){const f=Object.keys(a)[0],b=a[f];if(f==="not")return Number(c[n].length)!==Number(b);if(f==="moreThan")return Number(c[n].length)>=Number(b);if(f==="lessThan")return Number(c[n].length)<=Number(b)}return!1}function u(n,o,a,c){return c[n]&&c[n].propertyValue&&String(c[n].propertyValue.value)===String(a)}const r=new Map([["length",t],["getProperty",u]]);Object.keys(e).reduce((n,o)=>(n.set(o,e[o]),n),r);function s(n,o){const a=n;return typeof o=="number"?[{target:a,operator:"length",param:null,value:Number(o)}]:typeof o=="boolean"?[{target:a,operator:"getProperty",param:n,value:!!o}]:typeof o=="object"?Object.keys(o).map(c=>{if(c==="length")return{target:a,operator:"length",param:null,value:o[c]};const f=c,b=o[c];return{target:a,operator:"getProperty",param:f,value:b}}):[]}function i(n){return Object.keys(n).reduce((a,c)=>{const f=s(c,n[c]);return a.push(...f),a},[])}function l(n,o){if(r.has(n.operator)){const a=r.get(n.operator);return a&&a(n.target,n.param,n.value,o)||!1}return!1}function p(n,o){return i(n).reduce((f,b)=>f&&l(b,o),!0)}function y(n,o){const a=Object.keys(n),c=a.includes("allOf"),f=a.includes("anyOf"),b=c||f,C=(b?n[b?c?"allOf":"anyOf":"allOf"]:[n]).map(S=>p(S,o));return c?!C.includes(!1):C.includes(!0)}return{parseValueSchema:y}}const B={},D={};M();function E(e,t,u=new Map,r=(l,p,y)=>p,s={},i=l=>l){return $[t.title]=t,N[t.title]=r,B[t.title]=s,D[t.title]=i,(l={})=>{const p=x(l,t,u),y=Object.keys(e).reduce((n,o)=>(n[o]=e[o].default,n),{});return Object.assign(y,p)}}function P(e,t){return{customClass:t.class,customStyle:t.style}}const w=new Map([["appearance",P]]);function F(e,t,u){return t}const q={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/radio-button.schema.json",title:"radio-button",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for radio-button",type:"string"},type:{description:"The type string of radio-button",type:"string",default:"radio-button"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},A={title:"radio-button",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},h={enumData:{type:Array,default:[{text:"1",active:!0}]},suffixValue:{type:String,default:""},onSelectedValueChanged:{type:Function,default:()=>{}}},O=E(h,q,w,F,A),m=d.defineComponent({name:"FRadioButton",props:h,emits:["selectedValueChanged"],setup(e,t){const u=d.ref(e.enumData);function r(i,l){if(i.currentTarget.classList.value="btn btn-secondary active",i.currentTarget.tagName.toLowerCase()==="label"){const{currentTarget:p}=i,y=p.parentElement;Array.from(y.querySelectorAll("label")).filter(o=>o!==p).forEach(o=>o.classList.remove("active"))}t.emit("selectedValueChanged",l)}function s(i){return`${i.text}${e.suffixValue}`}return d.watch(()=>e.enumData,(i,l)=>{i!==l&&(u.value=e.enumData)}),()=>d.createVNode("div",{class:"f-radio-button"},[d.createVNode("div",{class:["farris-input-wrap"]},[u.value.map((i,l)=>d.createVNode(d.Fragment,null,[d.createVNode("label",{class:i.active?"btn btn-secondary active":"btn btn-secondary",onClick:p=>r(p,i)},[d.createVNode("span",{class:"f-radio-button-text"},[s(i)])])]))])])}}),k=d.defineComponent({name:"FRadioButtonDesign",props:h,emits:[""],setup(e,t){return()=>d.createVNode(d.Fragment,null,null)}}),L=e=>{const t=e;return t.install=function(u){u.component(t.name,e)},e};m.register=(e,t,u,r)=>{e["radio-button"]=m,t["radio-button"]=O},m.registerDesigner=(e,t,u)=>{e["radio-button"]=k,t["radio-button"]=O};const v=L(m);g.RadioButton=m,g.default=v,g.propsResolver=O,g.radioButtonProps=h,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});