@farris/ui-vue 1.2.8 → 1.2.9

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 (215) hide show
  1. package/components/accordion/index.esm.js +129 -129
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +166 -157
  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.esm.js +343 -325
  8. package/components/button-edit/index.umd.cjs +1 -0
  9. package/components/button-group/index.umd.cjs +1 -0
  10. package/components/calculator/index.umd.cjs +1 -0
  11. package/components/calendar/index.esm.js +338 -338
  12. package/components/calendar/index.umd.cjs +1 -0
  13. package/components/capsule/index.esm.js +182 -182
  14. package/components/capsule/index.umd.cjs +1 -0
  15. package/components/checkbox/index.esm.js +326 -317
  16. package/components/checkbox/index.umd.cjs +1 -0
  17. package/components/color-picker/index.esm.js +118 -118
  18. package/components/color-picker/index.umd.cjs +3 -0
  19. package/components/combo-list/index.esm.js +338 -325
  20. package/components/combo-list/index.umd.cjs +1 -0
  21. package/components/combo-tree/index.esm.js +62 -62
  22. package/components/combo-tree/index.umd.cjs +1 -0
  23. package/components/common/index.umd.cjs +1 -0
  24. package/components/component/index.esm.js +382 -270
  25. package/components/component/index.umd.cjs +1 -0
  26. package/components/condition/index.esm.js +1018 -895
  27. package/components/condition/index.umd.cjs +1 -0
  28. package/components/content-container/index.esm.js +285 -212
  29. package/components/content-container/index.umd.cjs +1 -0
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +4761 -4319
  32. package/components/data-grid/index.umd.cjs +1 -0
  33. package/components/data-view/index.esm.js +2901 -2664
  34. package/components/data-view/index.umd.cjs +1 -0
  35. package/components/date-picker/index.esm.js +1502 -1488
  36. package/components/date-picker/index.umd.cjs +1 -0
  37. package/components/designer-canvas/index.css +1 -1
  38. package/components/designer-canvas/index.esm.js +938 -928
  39. package/components/designer-canvas/index.umd.cjs +1 -0
  40. package/components/designer-outline/index.css +1 -1
  41. package/components/designer-outline/index.esm.js +27 -27
  42. package/components/designer-outline/index.umd.cjs +1 -0
  43. package/components/designer-toolbox/index.esm.js +36 -12
  44. package/components/designer-toolbox/index.umd.cjs +1 -0
  45. package/components/discussion-editor/index.umd.cjs +3 -0
  46. package/components/discussion-list/index.umd.cjs +1 -0
  47. package/components/drawer/index.umd.cjs +1 -0
  48. package/components/dropdown/index.esm.js +241 -241
  49. package/components/dropdown/index.umd.cjs +2 -0
  50. package/components/dynamic-form/index.esm.js +1074 -885
  51. package/components/dynamic-form/index.umd.cjs +1 -0
  52. package/components/dynamic-resolver/index.esm.js +99 -94
  53. package/components/dynamic-resolver/index.umd.cjs +1 -0
  54. package/components/dynamic-view/index.umd.cjs +1 -0
  55. package/components/enum-editor/index.umd.cjs +1 -0
  56. package/components/events-editor/index.esm.js +577 -522
  57. package/components/events-editor/index.umd.cjs +1 -0
  58. package/components/expression-editor/index.esm.js +70 -70
  59. package/components/expression-editor/index.umd.cjs +1 -0
  60. package/components/external-container/index.css +1 -1
  61. package/components/external-container/index.esm.js +2938 -2619
  62. package/components/external-container/index.umd.cjs +1 -0
  63. package/components/field-selector/index.css +1 -1
  64. package/components/field-selector/index.esm.js +4766 -4325
  65. package/components/field-selector/index.umd.cjs +1 -0
  66. package/components/filter-bar/index.css +1 -1
  67. package/components/filter-bar/index.esm.js +1231 -1215
  68. package/components/filter-bar/index.umd.cjs +1 -0
  69. package/components/flow-canvas/index.css +1 -1
  70. package/components/flow-canvas/index.esm.js +1062 -1052
  71. package/components/flow-canvas/index.umd.cjs +1 -0
  72. package/components/image-cropper/index.esm.js +373 -373
  73. package/components/image-cropper/index.umd.cjs +1 -0
  74. package/components/input-group/index.esm.js +398 -394
  75. package/components/input-group/index.umd.cjs +1 -0
  76. package/components/layout/index.esm.js +268 -268
  77. package/components/layout/index.umd.cjs +1 -0
  78. package/components/list-nav/index.esm.js +234 -161
  79. package/components/list-nav/index.umd.cjs +1 -0
  80. package/components/list-view/index.css +1 -1
  81. package/components/list-view/index.esm.js +2288 -2048
  82. package/components/list-view/index.umd.cjs +1 -0
  83. package/components/loading/index.umd.cjs +8 -0
  84. package/components/locale/index.umd.cjs +1 -0
  85. package/components/lookup/index.css +1 -1
  86. package/components/lookup/index.esm.js +5776 -5305
  87. package/components/lookup/index.umd.cjs +1 -0
  88. package/components/mapping-editor/index.css +1 -1
  89. package/components/mapping-editor/index.esm.js +5496 -5036
  90. package/components/mapping-editor/index.umd.cjs +1 -0
  91. package/components/message-box/index.umd.cjs +1 -0
  92. package/components/modal/index.umd.cjs +1 -0
  93. package/components/nav/index.esm.js +383 -322
  94. package/components/nav/index.umd.cjs +3 -0
  95. package/components/notify/index.umd.cjs +1 -0
  96. package/components/number-range/index.esm.js +273 -269
  97. package/components/number-range/index.umd.cjs +1 -0
  98. package/components/number-spinner/index.esm.js +292 -283
  99. package/components/number-spinner/index.umd.cjs +1 -0
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1008 -925
  102. package/components/order/index.umd.cjs +1 -0
  103. package/components/page-footer/index.esm.js +98 -98
  104. package/components/page-footer/index.umd.cjs +1 -0
  105. package/components/page-header/index.esm.js +949 -847
  106. package/components/page-header/index.umd.cjs +1 -0
  107. package/components/pagination/index.esm.js +464 -403
  108. package/components/pagination/index.umd.cjs +1 -0
  109. package/components/popover/index.umd.cjs +1 -0
  110. package/components/progress/index.esm.js +226 -226
  111. package/components/progress/index.umd.cjs +3 -0
  112. package/components/property-editor/index.esm.js +1110 -1092
  113. package/components/property-editor/index.umd.cjs +3 -0
  114. package/components/property-panel/index.esm.js +520 -513
  115. package/components/property-panel/index.umd.cjs +1 -0
  116. package/components/query-solution/index.css +1 -1
  117. package/components/query-solution/index.esm.js +1714 -1575
  118. package/components/query-solution/index.umd.cjs +1 -0
  119. package/components/radio-button/index.esm.js +67 -67
  120. package/components/radio-button/index.umd.cjs +1 -0
  121. package/components/radio-group/index.esm.js +298 -289
  122. package/components/radio-group/index.umd.cjs +1 -0
  123. package/components/rate/index.esm.js +195 -190
  124. package/components/rate/index.umd.cjs +1 -0
  125. package/components/response-layout/index.esm.js +112 -112
  126. package/components/response-layout/index.umd.cjs +1 -0
  127. package/components/response-layout-editor/index.esm.js +902 -877
  128. package/components/response-layout-editor/index.umd.cjs +1 -0
  129. package/components/response-toolbar/index.esm.js +874 -778
  130. package/components/response-toolbar/index.umd.cjs +1 -0
  131. package/components/schema-selector/index.css +1 -1
  132. package/components/schema-selector/index.esm.js +4594 -4289
  133. package/components/schema-selector/index.umd.cjs +8 -0
  134. package/components/search-box/index.esm.js +126 -126
  135. package/components/search-box/index.umd.cjs +1 -0
  136. package/components/section/index.esm.js +645 -503
  137. package/components/section/index.umd.cjs +1 -0
  138. package/components/smoke-detector/index.esm.js +120 -120
  139. package/components/smoke-detector/index.umd.cjs +1 -0
  140. package/components/spacing-editor/index.umd.cjs +1 -0
  141. package/components/splitter/index.esm.js +421 -348
  142. package/components/splitter/index.umd.cjs +1 -0
  143. package/components/step/index.esm.js +219 -219
  144. package/components/step/index.umd.cjs +1 -0
  145. package/components/switch/index.esm.js +232 -222
  146. package/components/switch/index.umd.cjs +1 -0
  147. package/components/tabs/index.esm.js +1823 -1744
  148. package/components/tabs/index.umd.cjs +1 -0
  149. package/components/tags/index.esm.js +399 -401
  150. package/components/tags/index.umd.cjs +1 -0
  151. package/components/text/index.esm.js +164 -164
  152. package/components/text/index.umd.cjs +1 -0
  153. package/components/textarea/index.esm.js +220 -215
  154. package/components/textarea/index.umd.cjs +1 -0
  155. package/components/time-picker/index.esm.js +693 -666
  156. package/components/time-picker/index.umd.cjs +1 -0
  157. package/components/tooltip/index.umd.cjs +1 -0
  158. package/components/transfer/index.css +1 -1
  159. package/components/transfer/index.esm.js +422 -413
  160. package/components/transfer/index.umd.cjs +1 -0
  161. package/components/tree-grid/index.css +1 -1
  162. package/components/tree-grid/index.esm.js +4799 -4358
  163. package/components/tree-grid/index.umd.cjs +1 -0
  164. package/components/tree-view/index.esm.js +2448 -2215
  165. package/components/tree-view/index.umd.cjs +1 -0
  166. package/components/uploader/index.esm.js +164 -164
  167. package/components/uploader/index.umd.cjs +2 -0
  168. package/components/verify-detail/index.esm.js +143 -143
  169. package/components/verify-detail/index.umd.cjs +1 -0
  170. package/components/video/index.esm.js +410 -331
  171. package/components/video/index.umd.cjs +1 -0
  172. package/components/weather/index.esm.js +901 -901
  173. package/components/weather/index.umd.cjs +16 -0
  174. package/farris.all.esm.js +12305 -11403
  175. package/farris.all.umd.cjs +8 -8
  176. package/index.css +1 -1
  177. package/package.json +1 -1
  178. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  179. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  180. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  181. package/types/common/entity/entity-schema.d.ts +258 -0
  182. package/types/component/src/component-ref.props.d.ts +4 -0
  183. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  184. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  185. package/types/data-grid/index.d.ts +5 -2
  186. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  189. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  190. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  191. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  192. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  193. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  194. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  195. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  196. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  197. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  198. package/types/data-view/composition/types.d.ts +18 -6
  199. package/types/data-view/composition/use-edit.d.ts +2 -1
  200. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  201. package/types/designer-canvas/src/types.d.ts +2 -2
  202. package/types/dynamic-form/index.d.ts +2 -1
  203. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  204. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  205. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  206. package/types/dynamic-resolver/src/types.d.ts +3 -2
  207. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  208. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  209. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  210. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  211. package/types/tabs/src/composition/types.d.ts +2 -2
  212. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  213. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  214. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  215. package/types/tags/index.d.ts +36 -5
@@ -2,92 +2,92 @@ import { defineComponent as j, ref as V, watch as v, createVNode as b, Fragment
2
2
  import { cloneDeep as D } from "lodash-es";
3
3
  const T = {}, $ = {};
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, s = r && Array.isArray(r), i = Object.keys(e).reduce((l, p) => ((!s || !r.find((g) => g == p)) && (l[p] = e[p].type === "object" && e[p].properties ? x(e[p]) : D(e[p].default)), l), {});
6
+ return (!s || !r.find((l) => l == "id")) && (i.id = `${u}-${Date.now()}`), i;
7
7
  }
8
8
  function w(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, s) => (r[s] && typeof r[s] == "object" ? Object.assign(r[s], t[s]) : r[s] = t[s], r), u), u;
11
11
  }
12
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];
13
+ return Object.keys(t).filter((r) => t[r] != null).reduce((r, s) => {
14
+ if (e.has(s)) {
15
+ const i = e.get(s);
16
+ if (typeof i == "string")
17
+ r[i] = t[s];
18
18
  else {
19
- const l = o(i, t[i], t);
20
- Object.assign(s, l);
19
+ const l = i(s, t[s], t);
20
+ Object.assign(r, l);
21
21
  }
22
22
  } else
23
- s[i] = t[i];
24
- return s;
23
+ r[s] = t[s];
24
+ return r;
25
25
  }, {});
26
26
  }
27
27
  function B(t, e, u = /* @__PURE__ */ new Map()) {
28
- const s = w(t, e);
29
- return M(s, u);
28
+ const r = w(t, e);
29
+ return M(r, u);
30
30
  }
31
31
  function N(t = {}) {
32
- function e(n, r, a, c) {
32
+ function e(n, o, 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, o, 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, o) => (n.set(o, t[o]), n), r);
54
+ function s(n, o) {
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 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) => {
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: o[c] };
59
+ const f = c, d = o[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 = s(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, o) {
70
+ if (r.has(n.operator)) {
71
+ const a = r.get(n.operator);
72
+ return a && a(n.target, n.param, n.value, o) || !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, o) {
77
+ return i(n).reduce((f, d) => f && l(d, o), !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, o) {
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((R) => p(R, o));
81
81
  return c ? !h.includes(!1) : h.includes(!0);
82
82
  }
83
83
  return { parseValueSchema: g };
84
84
  }
85
- const F = {}, k = {};
85
+ const A = {}, F = {};
86
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);
87
+ function k(t, e, u = /* @__PURE__ */ new Map(), r = (l, p, g) => p, s = {}, i = (l) => l) {
88
+ return T[e.title] = e, $[e.title] = r, A[e.title] = s, F[e.title] = i, (l = {}) => {
89
+ const p = B(l, e, u), g = Object.keys(t).reduce((n, o) => (n[o] = t[o].default, n), {});
90
+ return Object.assign(g, p);
91
91
  };
92
92
  }
93
93
  function P(t, e) {
@@ -199,7 +199,7 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
199
199
  description: X,
200
200
  type: Y,
201
201
  categories: Z
202
- }, y = {
202
+ }, m = {
203
203
  /**
204
204
  * 单选组枚举数组
205
205
  */
@@ -213,40 +213,40 @@ 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
+ }, O = k(m, U, q, L, _), y = /* @__PURE__ */ j({
217
217
  name: "FRadioButton",
218
- props: y,
218
+ props: m,
219
219
  emits: ["selectedValueChanged"],
220
220
  setup(t, e) {
221
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") {
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((o) => o !== p).forEach((o) => o.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 s(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 v(() => 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(C, 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
+ }, [s(i)])])]))])]);
246
246
  }
247
247
  }), K = /* @__PURE__ */ j({
248
248
  name: "FRadioButtonDesign",
249
- props: y,
249
+ props: m,
250
250
  emits: [""],
251
251
  setup(t, e) {
252
252
  return () => b(C, null, null);
@@ -257,16 +257,16 @@ const I = "https://json-schema.org/draft/2020-12/schema", S = "https://farris-de
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"] = O;
262
262
  };
263
- m.registerDesigner = (t, e, u) => {
263
+ y.registerDesigner = (t, e, u) => {
264
264
  t["radio-button"] = K, e["radio-button"] = O;
265
265
  };
266
- const ot = tt(m);
266
+ const st = tt(y);
267
267
  export {
268
- m as RadioButton,
269
- ot as default,
268
+ y as RadioButton,
269
+ st as default,
270
270
  O as propsResolver,
271
- y as radioButtonProps
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,$){"use strict";const O={},N={};function j(e){const{properties:t,title:u,ignore:r}=e,s=r&&Array.isArray(r),i=Object.keys(t).reduce((l,p)=>((!s||!r.find(b=>b==p))&&(l[p]=t[p].type==="object"&&t[p].properties?j(t[p]):$.cloneDeep(t[p].default)),l),{});return(!s||!r.find(l=>l=="id"))&&(i.id=`${u}-${Date.now()}`),i}function R(e,t){const u=j(t);return Object.keys(e).reduce((r,s)=>(r[s]&&typeof r[s]=="object"?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 E(e,t,u=new Map){const r=R(e,t);return T(r,u)}function x(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],y=a[f];if(f==="not")return Number(c[n].length)!==Number(y);if(f==="moreThan")return Number(c[n].length)>=Number(y);if(f==="lessThan")return Number(c[n].length)<=Number(y)}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,y=o[c];return{target:a,operator:"getProperty",param:f,value:y}}):[]}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,y)=>f&&l(y,o),!0)}function b(n,o){const a=Object.keys(n),c=a.includes("allOf"),f=a.includes("anyOf"),y=c||f,C=(y?n[y?c?"allOf":"anyOf":"allOf"]:[n]).map(S=>p(S,o));return c?!C.includes(!1):C.includes(!0)}return{parseValueSchema:b}}const M={},B={};x();function D(e,t,u=new Map,r=(l,p,b)=>p,s={},i=l=>l){return O[t.title]=t,N[t.title]=r,M[t.title]=s,B[t.title]=i,(l={})=>{const p=E(l,t,u),b=Object.keys(e).reduce((n,o)=>(n[o]=e[o].default,n),{});return Object.assign(b,p)}}function w(e,t){return{customClass:t.class,customStyle:t.style}}const F=new Map([["appearance",w]]);function P(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:()=>{}}},V=D(h,q,F,P,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,b=p.parentElement;Array.from(b.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"]=V},m.registerDesigner=(e,t,u)=>{e["radio-button"]=k,t["radio-button"]=V};const v=L(m);g.RadioButton=m,g.default=v,g.propsResolver=V,g.radioButtonProps=h,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});