@farris/ui-vue 1.3.5 → 1.3.6

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 (147) hide show
  1. package/components/accordion/index.esm.js +16 -16
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +65 -65
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +13 -13
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +504 -490
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +247 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +356 -344
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +159 -145
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +127 -128
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +15 -15
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/component/index.esm.js +101 -87
  20. package/components/component/index.umd.cjs +1 -1
  21. package/components/condition/index.esm.js +7 -5
  22. package/components/condition/index.umd.cjs +1 -1
  23. package/components/content-container/index.esm.js +181 -167
  24. package/components/content-container/index.umd.cjs +1 -1
  25. package/components/data-grid/index.esm.js +4057 -4304
  26. package/components/data-grid/index.umd.cjs +1 -1
  27. package/components/data-view/index.esm.js +2450 -2467
  28. package/components/data-view/index.umd.cjs +1 -1
  29. package/components/date-picker/index.esm.js +789 -777
  30. package/components/date-picker/index.umd.cjs +1 -1
  31. package/components/designer-canvas/index.esm.js +3593 -3585
  32. package/components/designer-canvas/index.umd.cjs +1 -1
  33. package/components/dropdown/index.esm.js +257 -243
  34. package/components/dropdown/index.umd.cjs +2 -2
  35. package/components/dynamic-form/index.esm.js +322 -306
  36. package/components/dynamic-form/index.umd.cjs +1 -1
  37. package/components/dynamic-resolver/index.esm.js +177 -163
  38. package/components/dynamic-resolver/index.umd.cjs +1 -1
  39. package/components/event-parameter/index.esm.js +163 -2643
  40. package/components/event-parameter/index.umd.cjs +1 -1
  41. package/components/events-editor/index.esm.js +500 -486
  42. package/components/events-editor/index.umd.cjs +1 -1
  43. package/components/expression-editor/index.esm.js +37 -37
  44. package/components/expression-editor/index.umd.cjs +1 -1
  45. package/components/external-container/index.esm.js +485 -470
  46. package/components/external-container/index.umd.cjs +1 -1
  47. package/components/field-selector/index.esm.js +2611 -2623
  48. package/components/field-selector/index.umd.cjs +1 -1
  49. package/components/filter-bar/index.esm.js +3825 -3837
  50. package/components/filter-bar/index.umd.cjs +1 -1
  51. package/components/flow-canvas/index.esm.js +3720 -3712
  52. package/components/flow-canvas/index.umd.cjs +1 -1
  53. package/components/image-cropper/index.esm.js +402 -388
  54. package/components/image-cropper/index.umd.cjs +1 -1
  55. package/components/input-group/index.esm.js +201 -202
  56. package/components/input-group/index.umd.cjs +1 -1
  57. package/components/layout/index.esm.js +264 -245
  58. package/components/layout/index.umd.cjs +1 -1
  59. package/components/list-nav/index.esm.js +157 -143
  60. package/components/list-nav/index.umd.cjs +1 -1
  61. package/components/list-view/index.esm.js +312 -296
  62. package/components/list-view/index.umd.cjs +1 -1
  63. package/components/lookup/index.esm.js +4748 -4992
  64. package/components/lookup/index.umd.cjs +1 -1
  65. package/components/mapping-editor/index.esm.js +4215 -4462
  66. package/components/mapping-editor/index.umd.cjs +1 -1
  67. package/components/nav/index.esm.js +169 -155
  68. package/components/nav/index.umd.cjs +2 -2
  69. package/components/number-range/index.esm.js +150 -137
  70. package/components/number-range/index.umd.cjs +1 -1
  71. package/components/number-spinner/index.esm.js +207 -194
  72. package/components/number-spinner/index.umd.cjs +1 -1
  73. package/components/order/index.esm.js +427 -414
  74. package/components/order/index.umd.cjs +1 -1
  75. package/components/page-footer/index.esm.js +22 -22
  76. package/components/page-footer/index.umd.cjs +1 -1
  77. package/components/page-header/index.esm.js +510 -492
  78. package/components/page-header/index.umd.cjs +1 -1
  79. package/components/pagination/index.esm.js +192 -178
  80. package/components/pagination/index.umd.cjs +1 -1
  81. package/components/progress/index.esm.js +234 -220
  82. package/components/progress/index.umd.cjs +3 -3
  83. package/components/property-editor/index.esm.js +288 -277
  84. package/components/property-editor/index.umd.cjs +2 -2
  85. package/components/property-panel/index.esm.js +62 -61
  86. package/components/property-panel/index.umd.cjs +1 -1
  87. package/components/query-solution/index.esm.js +3015 -3027
  88. package/components/query-solution/index.umd.cjs +5 -5
  89. package/components/radio-button/index.esm.js +64 -64
  90. package/components/radio-button/index.umd.cjs +1 -1
  91. package/components/radio-group/index.esm.js +293 -280
  92. package/components/radio-group/index.umd.cjs +1 -1
  93. package/components/rate/index.esm.js +222 -208
  94. package/components/rate/index.umd.cjs +1 -1
  95. package/components/response-layout/index.esm.js +187 -173
  96. package/components/response-layout/index.umd.cjs +1 -1
  97. package/components/response-layout-editor/index.esm.js +554 -542
  98. package/components/response-layout-editor/index.umd.cjs +1 -1
  99. package/components/response-toolbar/index.esm.js +483 -469
  100. package/components/response-toolbar/index.umd.cjs +1 -1
  101. package/components/schema-selector/index.esm.js +632 -617
  102. package/components/schema-selector/index.umd.cjs +2 -2
  103. package/components/search-box/index.esm.js +228 -214
  104. package/components/search-box/index.umd.cjs +1 -1
  105. package/components/section/index.esm.js +419 -406
  106. package/components/section/index.umd.cjs +1 -1
  107. package/components/smoke-detector/index.esm.js +162 -148
  108. package/components/smoke-detector/index.umd.cjs +1 -1
  109. package/components/splitter/index.esm.js +308 -284
  110. package/components/splitter/index.umd.cjs +1 -1
  111. package/components/step/index.esm.js +279 -265
  112. package/components/step/index.umd.cjs +1 -1
  113. package/components/switch/index.esm.js +183 -170
  114. package/components/switch/index.umd.cjs +1 -1
  115. package/components/tabs/index.esm.js +307 -294
  116. package/components/tabs/index.umd.cjs +1 -1
  117. package/components/tags/index.esm.js +320 -306
  118. package/components/tags/index.umd.cjs +1 -1
  119. package/components/text/index.esm.js +245 -231
  120. package/components/text/index.umd.cjs +1 -1
  121. package/components/textarea/index.esm.js +260 -247
  122. package/components/textarea/index.umd.cjs +1 -1
  123. package/components/time-picker/index.esm.js +409 -396
  124. package/components/time-picker/index.umd.cjs +1 -1
  125. package/components/transfer/index.esm.js +424 -410
  126. package/components/transfer/index.umd.cjs +1 -1
  127. package/components/tree-grid/index.esm.js +2994 -3006
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +749 -733
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +325 -311
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +304 -290
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +99 -85
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +947 -933
  138. package/components/weather/index.umd.cjs +4 -4
  139. package/farris.all.esm.js +7750 -7990
  140. package/farris.all.umd.cjs +12 -12
  141. package/package.json +1 -1
  142. package/types/data-view/composition/types.d.ts +0 -1
  143. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
  144. package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
  145. package/components/event-parameter/index.css +0 -1
  146. package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
  147. package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
@@ -1,107 +1,107 @@
1
- import { defineComponent as j, ref as M, watch as T, createVNode as b, Fragment as x } from "vue";
2
- import { isPlainObject as C, cloneDeep as V } from "lodash-es";
1
+ import { defineComponent as j, ref as w, watch as M, createVNode as b, Fragment as C } from "vue";
2
+ import { isPlainObject as O, cloneDeep as T } from "lodash-es";
3
3
  import { withInstall as $ } from "../common/index.esm.js";
4
- const w = {}, D = {};
5
- function O(e) {
6
- const { properties: n, title: l, ignore: r } = e, s = r && Array.isArray(r), i = Object.keys(n).reduce((u, p) => ((!s || !r.find((g) => g === p)) && (u[p] = n[p].type === "object" && n[p].properties ? O(n[p]) : V(n[p].default)), u), {});
7
- if (l && (!s || !r.find((u) => u === "id"))) {
4
+ const D = {}, P = {};
5
+ function x(t) {
6
+ const { properties: n, title: l, ignore: r } = t, o = r && Array.isArray(r), i = Object.keys(n).reduce((u, p) => ((!o || !r.find((g) => g === p)) && (u[p] = n[p].type === "object" && n[p].properties ? x(n[p]) : T(n[p].default)), u), {});
7
+ if (l && (!o || !r.find((u) => u === "id"))) {
8
8
  const u = l.toLowerCase().replace(/-/g, "_");
9
9
  i.id = `${u}_${Math.random().toString().slice(2, 6)}`;
10
10
  }
11
11
  return i;
12
12
  }
13
- function B(e, n) {
14
- const l = O(n);
15
- return Object.keys(l).reduce((r, s) => (r[s] && C(r[s]) && C(e[s] || !e[s]) ? Object.assign(r[s], e[s] || {}) : r[s] = e[s], r), l), l;
13
+ function V(t, n) {
14
+ const l = x(n);
15
+ return Object.keys(l).reduce((r, o) => (Object.prototype.hasOwnProperty.call(t, o) && (r[o] && O(r[o]) && O(t[o] || !t[o]) ? Object.assign(r[o], t[o] || {}) : r[o] = t[o]), r), l), l;
16
16
  }
17
- function N(e, n) {
18
- return Object.keys(e).filter((r) => e[r] != null).reduce((r, s) => {
19
- if (n.has(s)) {
20
- const i = n.get(s);
17
+ function B(t, n) {
18
+ return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
19
+ if (n.has(o)) {
20
+ const i = n.get(o);
21
21
  if (typeof i == "string")
22
- r[i] = e[s];
22
+ r[i] = t[o];
23
23
  else {
24
- const u = i(s, e[s], e);
24
+ const u = i(o, t[o], t);
25
25
  Object.assign(r, u);
26
26
  }
27
27
  } else
28
- r[s] = e[s];
28
+ r[o] = t[o];
29
29
  return r;
30
30
  }, {});
31
31
  }
32
- function P(e, n, l = /* @__PURE__ */ new Map()) {
33
- const r = B(e, n);
34
- return N(r, l);
32
+ function N(t, n, l = /* @__PURE__ */ new Map()) {
33
+ const r = V(t, n);
34
+ return B(r, l);
35
35
  }
36
- function A(e = {}) {
37
- function n(t, o, a, c) {
36
+ function A(t = {}) {
37
+ function n(e, s, a, c) {
38
38
  if (typeof a == "number")
39
- return c[t].length === a;
39
+ return c[e].length === a;
40
40
  if (typeof a == "object") {
41
41
  const f = Object.keys(a)[0], d = a[f];
42
42
  if (f === "not")
43
- return Number(c[t].length) !== Number(d);
43
+ return Number(c[e].length) !== Number(d);
44
44
  if (f === "moreThan")
45
- return Number(c[t].length) >= Number(d);
45
+ return Number(c[e].length) >= Number(d);
46
46
  if (f === "lessThan")
47
- return Number(c[t].length) <= Number(d);
47
+ return Number(c[e].length) <= Number(d);
48
48
  }
49
49
  return !1;
50
50
  }
51
- function l(t, o, a, c) {
52
- return c[t] && c[t].propertyValue && String(c[t].propertyValue.value) === String(a);
51
+ function l(e, s, a, c) {
52
+ return c[e] && c[e].propertyValue && String(c[e].propertyValue.value) === String(a);
53
53
  }
54
54
  const r = /* @__PURE__ */ new Map([
55
55
  ["length", n],
56
56
  ["getProperty", l]
57
57
  ]);
58
- Object.keys(e).reduce((t, o) => (t.set(o, e[o]), t), r);
59
- function s(t, o) {
60
- const a = t;
61
- return typeof o == "number" ? [{ target: a, operator: "length", param: null, value: Number(o) }] : typeof o == "boolean" ? [{ target: a, operator: "getProperty", param: t, value: !!o }] : typeof o == "object" ? Object.keys(o).map((c) => {
58
+ Object.keys(t).reduce((e, s) => (e.set(s, t[s]), e), r);
59
+ function o(e, s) {
60
+ const a = e;
61
+ return typeof s == "number" ? [{ target: a, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: a, operator: "getProperty", param: e, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
62
62
  if (c === "length")
63
- return { target: a, operator: "length", param: null, value: o[c] };
64
- const f = c, d = o[c];
63
+ return { target: a, operator: "length", param: null, value: s[c] };
64
+ const f = c, d = s[c];
65
65
  return { target: a, operator: "getProperty", param: f, value: d };
66
66
  }) : [];
67
67
  }
68
- function i(t) {
69
- return Object.keys(t).reduce((a, c) => {
70
- const f = s(c, t[c]);
68
+ function i(e) {
69
+ return Object.keys(e).reduce((a, c) => {
70
+ const f = o(c, e[c]);
71
71
  return a.push(...f), a;
72
72
  }, []);
73
73
  }
74
- function u(t, o) {
75
- if (r.has(t.operator)) {
76
- const a = r.get(t.operator);
77
- return a && a(t.target, t.param, t.value, o) || !1;
74
+ function u(e, s) {
75
+ if (r.has(e.operator)) {
76
+ const a = r.get(e.operator);
77
+ return a && a(e.target, e.param, e.value, s) || !1;
78
78
  }
79
79
  return !1;
80
80
  }
81
- function p(t, o) {
82
- return i(t).reduce((f, d) => f && u(d, o), !0);
81
+ function p(e, s) {
82
+ return i(e).reduce((f, d) => f && u(d, s), !0);
83
83
  }
84
- function g(t, o) {
85
- const a = Object.keys(t), c = a.includes("allOf"), f = a.includes("anyOf"), d = c || f, h = (d ? t[d ? c ? "allOf" : "anyOf" : "allOf"] : [t]).map((R) => p(R, o));
84
+ function g(e, s) {
85
+ const a = Object.keys(e), c = a.includes("allOf"), f = a.includes("anyOf"), d = c || f, h = (d ? e[d ? c ? "allOf" : "anyOf" : "allOf"] : [e]).map((R) => p(R, s));
86
86
  return c ? !h.includes(!1) : h.includes(!0);
87
87
  }
88
88
  return { parseValueSchema: g };
89
89
  }
90
90
  const F = {}, k = {};
91
91
  A();
92
- function L(e, n, l = /* @__PURE__ */ new Map(), r = (u, p, g, t) => p, s = {}, i = (u) => u) {
93
- return w[n.title] = n, D[n.title] = r, F[n.title] = s, k[n.title] = i, (u = {}) => {
94
- const p = P(u, n, l), g = Object.keys(e).reduce((t, o) => (t[o] = e[o].default, t), {});
92
+ function L(t, n, l = /* @__PURE__ */ new Map(), r = (u, p, g, e) => p, o = {}, i = (u) => u) {
93
+ return D[n.title] = n, P[n.title] = r, F[n.title] = o, k[n.title] = i, (u = {}) => {
94
+ const p = N(u, n, l), g = Object.keys(t).reduce((e, s) => (e[s] = t[s].default, e), {});
95
95
  return Object.assign(g, p);
96
96
  };
97
97
  }
98
- function q(e, n) {
98
+ function q(t, n) {
99
99
  return { customClass: n.class, customStyle: n.style };
100
100
  }
101
101
  const I = /* @__PURE__ */ new Map([
102
102
  ["appearance", q]
103
103
  ]);
104
- function S(e, n, l) {
104
+ function S(t, n, l) {
105
105
  return n;
106
106
  }
107
107
  const _ = "https://json-schema.org/draft/2020-12/schema", H = "https://farris-design.gitee.io/radio-button.schema.json", z = "radio-button", G = "A Farris Component", J = "object", Q = {
@@ -222,46 +222,46 @@ const _ = "https://json-schema.org/draft/2020-12/schema", H = "https://farris-de
222
222
  name: "FRadioButton",
223
223
  props: y,
224
224
  emits: ["selectedValueChanged"],
225
- setup(e, n) {
226
- const l = M(e.enumData);
225
+ setup(t, n) {
226
+ const l = w(t.enumData);
227
227
  function r(i, u) {
228
228
  if (i.currentTarget.classList.value = "btn btn-secondary active", i.currentTarget.tagName.toLowerCase() === "label") {
229
229
  const {
230
230
  currentTarget: p
231
231
  } = i, g = p.parentElement;
232
- Array.from(g.querySelectorAll("label")).filter((o) => o !== p).forEach((o) => o.classList.remove("active"));
232
+ Array.from(g.querySelectorAll("label")).filter((s) => s !== p).forEach((s) => s.classList.remove("active"));
233
233
  }
234
234
  n.emit("selectedValueChanged", u);
235
235
  }
236
- function s(i) {
237
- return `${i.text}${e.suffixValue}`;
236
+ function o(i) {
237
+ return `${i.text}${t.suffixValue}`;
238
238
  }
239
- return T(() => e.enumData, (i, u) => {
240
- i !== u && (l.value = e.enumData);
239
+ return M(() => t.enumData, (i, u) => {
240
+ i !== u && (l.value = t.enumData);
241
241
  }), () => b("div", {
242
242
  class: "f-radio-button"
243
243
  }, [b("div", {
244
244
  class: ["farris-input-wrap"]
245
- }, [l.value.map((i, u) => b(x, null, [b("label", {
245
+ }, [l.value.map((i, u) => b(C, null, [b("label", {
246
246
  class: i.active ? "btn btn-secondary active" : "btn btn-secondary",
247
247
  onClick: (p) => r(p, i)
248
248
  }, [b("span", {
249
249
  class: "f-radio-button-text"
250
- }, [s(i)])])]))])]);
250
+ }, [o(i)])])]))])]);
251
251
  }
252
252
  }), et = /* @__PURE__ */ j({
253
253
  name: "FRadioButtonDesign",
254
254
  props: y,
255
255
  emits: [""],
256
- setup(e, n) {
257
- return () => b(x, null, null);
256
+ setup(t, n) {
257
+ return () => b(C, null, null);
258
258
  }
259
259
  });
260
- m.register = (e, n, l, r) => {
261
- e["radio-button"] = m, n["radio-button"] = v;
260
+ m.register = (t, n, l, r) => {
261
+ t["radio-button"] = m, n["radio-button"] = v;
262
262
  };
263
- m.registerDesigner = (e, n, l) => {
264
- e["radio-button"] = et, n["radio-button"] = v;
263
+ m.registerDesigner = (t, n, l) => {
264
+ t["radio-button"] = et, n["radio-button"] = v;
265
265
  };
266
266
  const at = $(m);
267
267
  export {
@@ -1 +1 @@
1
- (function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("lodash-es"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../common/index.umd.js"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f["radio-button"]={},f.Vue,f.LodashES,f.common))})(this,function(f,d,j,$){"use strict";const x={},N={};function O(t){const{properties:n,title:l,ignore:r}=t,s=r&&Array.isArray(r),i=Object.keys(n).reduce((u,p)=>((!s||!r.find(b=>b===p))&&(u[p]=n[p].type==="object"&&n[p].properties?O(n[p]):j.cloneDeep(n[p].default)),u),{});if(l&&(!s||!r.find(u=>u==="id"))){const u=l.toLowerCase().replace(/-/g,"_");i.id=`${u}_${Math.random().toString().slice(2,6)}`}return i}function R(t,n){const l=O(n);return Object.keys(l).reduce((r,s)=>(r[s]&&j.isPlainObject(r[s])&&j.isPlainObject(t[s]||!t[s])?Object.assign(r[s],t[s]||{}):r[s]=t[s],r),l),l}function T(t,n){return Object.keys(t).filter(r=>t[r]!=null).reduce((r,s)=>{if(n.has(s)){const i=n.get(s);if(typeof i=="string")r[i]=t[s];else{const u=i(s,t[s],t);Object.assign(r,u)}}else r[s]=t[s];return r},{})}function M(t,n,l=new Map){const r=R(t,n);return T(r,l)}function P(t={}){function n(e,o,a,c){if(typeof a=="number")return c[e].length===a;if(typeof a=="object"){const g=Object.keys(a)[0],m=a[g];if(g==="not")return Number(c[e].length)!==Number(m);if(g==="moreThan")return Number(c[e].length)>=Number(m);if(g==="lessThan")return Number(c[e].length)<=Number(m)}return!1}function l(e,o,a,c){return c[e]&&c[e].propertyValue&&String(c[e].propertyValue.value)===String(a)}const r=new Map([["length",n],["getProperty",l]]);Object.keys(t).reduce((e,o)=>(e.set(o,t[o]),e),r);function s(e,o){const a=e;return typeof o=="number"?[{target:a,operator:"length",param:null,value:Number(o)}]:typeof o=="boolean"?[{target:a,operator:"getProperty",param:e,value:!!o}]:typeof o=="object"?Object.keys(o).map(c=>{if(c==="length")return{target:a,operator:"length",param:null,value:o[c]};const g=c,m=o[c];return{target:a,operator:"getProperty",param:g,value:m}}):[]}function i(e){return Object.keys(e).reduce((a,c)=>{const g=s(c,e[c]);return a.push(...g),a},[])}function u(e,o){if(r.has(e.operator)){const a=r.get(e.operator);return a&&a(e.target,e.param,e.value,o)||!1}return!1}function p(e,o){return i(e).reduce((g,m)=>g&&u(m,o),!0)}function b(e,o){const a=Object.keys(e),c=a.includes("allOf"),g=a.includes("anyOf"),m=c||g,V=(m?e[m?c?"allOf":"anyOf":"allOf"]:[e]).map(I=>p(I,o));return c?!V.includes(!1):V.includes(!0)}return{parseValueSchema:b}}const B={},E={};P();function w(t,n,l=new Map,r=(u,p,b,e)=>p,s={},i=u=>u){return x[n.title]=n,N[n.title]=r,B[n.title]=s,E[n.title]=i,(u={})=>{const p=M(u,n,l),b=Object.keys(t).reduce((e,o)=>(e[o]=t[o].default,e),{});return Object.assign(b,p)}}function D(t,n){return{customClass:n.class,customStyle:n.style}}const q=new Map([["appearance",D]]);function F(t,n,l){return n}const A={$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"]},k={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:()=>{}}},C=w(h,A,q,F,k),y=d.defineComponent({name:"FRadioButton",props:h,emits:["selectedValueChanged"],setup(t,n){const l=d.ref(t.enumData);function r(i,u){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"))}n.emit("selectedValueChanged",u)}function s(i){return`${i.text}${t.suffixValue}`}return d.watch(()=>t.enumData,(i,u)=>{i!==u&&(l.value=t.enumData)}),()=>d.createVNode("div",{class:"f-radio-button"},[d.createVNode("div",{class:["farris-input-wrap"]},[l.value.map((i,u)=>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)])])]))])])}}),L=d.defineComponent({name:"FRadioButtonDesign",props:h,emits:[""],setup(t,n){return()=>d.createVNode(d.Fragment,null,null)}});y.register=(t,n,l,r)=>{t["radio-button"]=y,n["radio-button"]=C},y.registerDesigner=(t,n,l)=>{t["radio-button"]=L,n["radio-button"]=C};const v=$.withInstall(y);f.RadioButton=y,f.default=v,f.propsResolver=C,f.radioButtonProps=h,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue"),require("lodash-es"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../common/index.umd.js"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f["radio-button"]={},f.Vue,f.LodashES,f.common))})(this,function(f,d,j,$){"use strict";const x={},N={};function C(e){const{properties:n,title:l,ignore:r}=e,o=r&&Array.isArray(r),i=Object.keys(n).reduce((u,p)=>((!o||!r.find(b=>b===p))&&(u[p]=n[p].type==="object"&&n[p].properties?C(n[p]):j.cloneDeep(n[p].default)),u),{});if(l&&(!o||!r.find(u=>u==="id"))){const u=l.toLowerCase().replace(/-/g,"_");i.id=`${u}_${Math.random().toString().slice(2,6)}`}return i}function R(e,n){const l=C(n);return Object.keys(l).reduce((r,o)=>(Object.prototype.hasOwnProperty.call(e,o)&&(r[o]&&j.isPlainObject(r[o])&&j.isPlainObject(e[o]||!e[o])?Object.assign(r[o],e[o]||{}):r[o]=e[o]),r),l),l}function T(e,n){return Object.keys(e).filter(r=>e[r]!=null).reduce((r,o)=>{if(n.has(o)){const i=n.get(o);if(typeof i=="string")r[i]=e[o];else{const u=i(o,e[o],e);Object.assign(r,u)}}else r[o]=e[o];return r},{})}function M(e,n,l=new Map){const r=R(e,n);return T(r,l)}function P(e={}){function n(t,s,a,c){if(typeof a=="number")return c[t].length===a;if(typeof a=="object"){const g=Object.keys(a)[0],m=a[g];if(g==="not")return Number(c[t].length)!==Number(m);if(g==="moreThan")return Number(c[t].length)>=Number(m);if(g==="lessThan")return Number(c[t].length)<=Number(m)}return!1}function l(t,s,a,c){return c[t]&&c[t].propertyValue&&String(c[t].propertyValue.value)===String(a)}const r=new Map([["length",n],["getProperty",l]]);Object.keys(e).reduce((t,s)=>(t.set(s,e[s]),t),r);function o(t,s){const a=t;return typeof s=="number"?[{target:a,operator:"length",param:null,value:Number(s)}]:typeof s=="boolean"?[{target:a,operator:"getProperty",param:t,value:!!s}]:typeof s=="object"?Object.keys(s).map(c=>{if(c==="length")return{target:a,operator:"length",param:null,value:s[c]};const g=c,m=s[c];return{target:a,operator:"getProperty",param:g,value:m}}):[]}function i(t){return Object.keys(t).reduce((a,c)=>{const g=o(c,t[c]);return a.push(...g),a},[])}function u(t,s){if(r.has(t.operator)){const a=r.get(t.operator);return a&&a(t.target,t.param,t.value,s)||!1}return!1}function p(t,s){return i(t).reduce((g,m)=>g&&u(m,s),!0)}function b(t,s){const a=Object.keys(t),c=a.includes("allOf"),g=a.includes("anyOf"),m=c||g,V=(m?t[m?c?"allOf":"anyOf":"allOf"]:[t]).map(I=>p(I,s));return c?!V.includes(!1):V.includes(!0)}return{parseValueSchema:b}}const w={},B={};P();function E(e,n,l=new Map,r=(u,p,b,t)=>p,o={},i=u=>u){return x[n.title]=n,N[n.title]=r,w[n.title]=o,B[n.title]=i,(u={})=>{const p=M(u,n,l),b=Object.keys(e).reduce((t,s)=>(t[s]=e[s].default,t),{});return Object.assign(b,p)}}function D(e,n){return{customClass:n.class,customStyle:n.style}}const q=new Map([["appearance",D]]);function F(e,n,l){return n}const A={$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"]},k={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,A,q,F,k),y=d.defineComponent({name:"FRadioButton",props:h,emits:["selectedValueChanged"],setup(e,n){const l=d.ref(e.enumData);function r(i,u){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(s=>s!==p).forEach(s=>s.classList.remove("active"))}n.emit("selectedValueChanged",u)}function o(i){return`${i.text}${e.suffixValue}`}return d.watch(()=>e.enumData,(i,u)=>{i!==u&&(l.value=e.enumData)}),()=>d.createVNode("div",{class:"f-radio-button"},[d.createVNode("div",{class:["farris-input-wrap"]},[l.value.map((i,u)=>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"},[o(i)])])]))])])}}),L=d.defineComponent({name:"FRadioButtonDesign",props:h,emits:[""],setup(e,n){return()=>d.createVNode(d.Fragment,null,null)}});y.register=(e,n,l,r)=>{e["radio-button"]=y,n["radio-button"]=O},y.registerDesigner=(e,n,l)=>{e["radio-button"]=L,n["radio-button"]=O};const v=$.withInstall(y);f.RadioButton=y,f.default=v,f.propsResolver=O,f.radioButtonProps=h,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});