@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,119 +1,133 @@
1
- import { defineComponent as Z, ref as r, onMounted as G, computed as W, watch as ae, createVNode as N, withModifiers as E, createTextVNode as B, inject as te } from "vue";
2
- import { isPlainObject as U, cloneDeep as le } from "lodash-es";
1
+ import { defineComponent as Z, ref as o, onMounted as G, computed as W, watch as te, createVNode as N, withModifiers as R, createTextVNode as B, inject as le } from "vue";
2
+ import { isPlainObject as U, cloneDeep as K } from "lodash-es";
3
3
  import { withInstall as re } from "../common/index.esm.js";
4
- const K = {}, x = {};
4
+ const x = {}, I = {};
5
5
  function J(a) {
6
- const { properties: e, title: t, ignore: n } = a, o = n && Array.isArray(n), h = Object.keys(e).reduce((y, b) => ((!o || !n.find((w) => w === b)) && (y[b] = e[b].type === "object" && e[b].properties ? J(e[b]) : le(e[b].default)), y), {});
7
- if (t && (!o || !n.find((y) => y === "id"))) {
8
- const y = t.toLowerCase().replace(/-/g, "_");
9
- h.id = `${y}_${Math.random().toString().slice(2, 6)}`;
6
+ const { properties: e, title: t, ignore: l } = a, n = l && Array.isArray(l), v = Object.keys(e).reduce((m, b) => ((!n || !l.find((P) => P === b)) && (m[b] = e[b].type === "object" && e[b].properties ? J(e[b]) : K(e[b].default)), m), {});
7
+ if (t && (!n || !l.find((m) => m === "id"))) {
8
+ const m = t.toLowerCase().replace(/-/g, "_");
9
+ v.id = `${m}_${Math.random().toString().slice(2, 6)}`;
10
10
  }
11
- return h;
11
+ return v;
12
12
  }
13
- function I(a, e = {}, t) {
14
- const n = K[a];
15
- if (n) {
16
- let o = J(n);
17
- const h = x[a];
18
- return o = h ? h({ getSchemaByType: I }, o, e, t) : o, o;
13
+ function ne(a) {
14
+ const { properties: e, title: t, required: l } = a;
15
+ if (l && Array.isArray(l)) {
16
+ const n = l.reduce((v, m) => (v[m] = e[m].type === "object" && e[m].properties ? J(e[m]) : K(e[m].default), v), {});
17
+ if (t && l.find((v) => v === "id")) {
18
+ const v = t.toLowerCase().replace(/-/g, "_");
19
+ n.id = `${v}_${Math.random().toString().slice(2, 6)}`;
20
+ }
21
+ return n;
22
+ }
23
+ return {
24
+ type: t
25
+ };
26
+ }
27
+ function ee(a, e = {}, t) {
28
+ const l = x[a];
29
+ if (l) {
30
+ let n = ne(l);
31
+ const v = I[a];
32
+ return n = v ? v({ getSchemaByType: ee }, n, e, t) : n, n;
19
33
  }
20
34
  return null;
21
35
  }
22
- function ne(a, e) {
36
+ function oe(a, e) {
23
37
  const t = J(e);
24
- return Object.keys(t).reduce((n, o) => (n[o] && U(n[o]) && U(a[o] || !a[o]) ? Object.assign(n[o], a[o] || {}) : n[o] = a[o], n), t), t;
38
+ return Object.keys(t).reduce((l, n) => (Object.prototype.hasOwnProperty.call(a, n) && (l[n] && U(l[n]) && U(a[n] || !a[n]) ? Object.assign(l[n], a[n] || {}) : l[n] = a[n]), l), t), t;
25
39
  }
26
- function oe(a, e) {
27
- return Object.keys(a).filter((n) => a[n] != null).reduce((n, o) => {
28
- if (e.has(o)) {
29
- const h = e.get(o);
30
- if (typeof h == "string")
31
- n[h] = a[o];
40
+ function se(a, e) {
41
+ return Object.keys(a).filter((l) => a[l] != null).reduce((l, n) => {
42
+ if (e.has(n)) {
43
+ const v = e.get(n);
44
+ if (typeof v == "string")
45
+ l[v] = a[n];
32
46
  else {
33
- const y = h(o, a[o], a);
34
- Object.assign(n, y);
47
+ const m = v(n, a[n], a);
48
+ Object.assign(l, m);
35
49
  }
36
50
  } else
37
- n[o] = a[o];
38
- return n;
51
+ l[n] = a[n];
52
+ return l;
39
53
  }, {});
40
54
  }
41
- function se(a, e, t = /* @__PURE__ */ new Map()) {
42
- const n = ne(a, e);
43
- return oe(n, t);
55
+ function ue(a, e, t = /* @__PURE__ */ new Map()) {
56
+ const l = oe(a, e);
57
+ return se(l, t);
44
58
  }
45
- function ue(a = {}) {
46
- function e(l, s, f, p) {
59
+ function ie(a = {}) {
60
+ function e(r, s, f, d) {
47
61
  if (typeof f == "number")
48
- return p[l].length === f;
62
+ return d[r].length === f;
49
63
  if (typeof f == "object") {
50
64
  const S = Object.keys(f)[0], M = f[S];
51
65
  if (S === "not")
52
- return Number(p[l].length) !== Number(M);
66
+ return Number(d[r].length) !== Number(M);
53
67
  if (S === "moreThan")
54
- return Number(p[l].length) >= Number(M);
68
+ return Number(d[r].length) >= Number(M);
55
69
  if (S === "lessThan")
56
- return Number(p[l].length) <= Number(M);
70
+ return Number(d[r].length) <= Number(M);
57
71
  }
58
72
  return !1;
59
73
  }
60
- function t(l, s, f, p) {
61
- return p[l] && p[l].propertyValue && String(p[l].propertyValue.value) === String(f);
74
+ function t(r, s, f, d) {
75
+ return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(f);
62
76
  }
63
- const n = /* @__PURE__ */ new Map([
77
+ const l = /* @__PURE__ */ new Map([
64
78
  ["length", e],
65
79
  ["getProperty", t]
66
80
  ]);
67
- Object.keys(a).reduce((l, s) => (l.set(s, a[s]), l), n);
68
- function o(l, s) {
69
- const f = l;
70
- return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: l, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
71
- if (p === "length")
72
- return { target: f, operator: "length", param: null, value: s[p] };
73
- const S = p, M = s[p];
81
+ Object.keys(a).reduce((r, s) => (r.set(s, a[s]), r), l);
82
+ function n(r, s) {
83
+ const f = r;
84
+ return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: r, value: !!s }] : typeof s == "object" ? Object.keys(s).map((d) => {
85
+ if (d === "length")
86
+ return { target: f, operator: "length", param: null, value: s[d] };
87
+ const S = d, M = s[d];
74
88
  return { target: f, operator: "getProperty", param: S, value: M };
75
89
  }) : [];
76
90
  }
77
- function h(l) {
78
- return Object.keys(l).reduce((f, p) => {
79
- const S = o(p, l[p]);
91
+ function v(r) {
92
+ return Object.keys(r).reduce((f, d) => {
93
+ const S = n(d, r[d]);
80
94
  return f.push(...S), f;
81
95
  }, []);
82
96
  }
83
- function y(l, s) {
84
- if (n.has(l.operator)) {
85
- const f = n.get(l.operator);
86
- return f && f(l.target, l.param, l.value, s) || !1;
97
+ function m(r, s) {
98
+ if (l.has(r.operator)) {
99
+ const f = l.get(r.operator);
100
+ return f && f(r.target, r.param, r.value, s) || !1;
87
101
  }
88
102
  return !1;
89
103
  }
90
- function b(l, s) {
91
- return h(l).reduce((S, M) => S && y(M, s), !0);
104
+ function b(r, s) {
105
+ return v(r).reduce((S, M) => S && m(M, s), !0);
92
106
  }
93
- function w(l, s) {
94
- const f = Object.keys(l), p = f.includes("allOf"), S = f.includes("anyOf"), M = p || S, O = (M ? l[M ? p ? "allOf" : "anyOf" : "allOf"] : [l]).map((d) => b(d, s));
95
- return p ? !O.includes(!1) : O.includes(!0);
107
+ function P(r, s) {
108
+ const f = Object.keys(r), d = f.includes("allOf"), S = f.includes("anyOf"), M = d || S, O = (M ? r[M ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((p) => b(p, s));
109
+ return d ? !O.includes(!1) : O.includes(!0);
96
110
  }
97
- return { parseValueSchema: w };
111
+ return { parseValueSchema: P };
98
112
  }
99
- const ie = {}, ce = {};
100
- ue();
101
- function fe(a, e, t = /* @__PURE__ */ new Map(), n = (y, b, w, l) => b, o = {}, h = (y) => y) {
102
- return K[e.title] = e, x[e.title] = n, ie[e.title] = o, ce[e.title] = h, (y = {}) => {
103
- const b = se(y, e, t), w = Object.keys(a).reduce((l, s) => (l[s] = a[s].default, l), {});
104
- return Object.assign(w, b);
113
+ const ce = {}, fe = {};
114
+ ie();
115
+ function de(a, e, t = /* @__PURE__ */ new Map(), l = (m, b, P, r) => b, n = {}, v = (m) => m) {
116
+ return x[e.title] = e, I[e.title] = l, ce[e.title] = n, fe[e.title] = v, (m = {}) => {
117
+ const b = ue(m, e, t), P = Object.keys(a).reduce((r, s) => (r[s] = a[s].default, r), {});
118
+ return Object.assign(P, b);
105
119
  };
106
120
  }
107
121
  function pe(a, e) {
108
122
  return { customClass: e.class, customStyle: e.style };
109
123
  }
110
- const de = /* @__PURE__ */ new Map([
124
+ const ve = /* @__PURE__ */ new Map([
111
125
  ["appearance", pe]
112
126
  ]);
113
- function ve(a, e, t) {
127
+ function me(a, e, t) {
114
128
  return e;
115
129
  }
116
- const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/rate.schema.json", ye = "rate", he = "A Farris Component", be = "object", Se = {
130
+ const ge = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/rate.schema.json", he = "rate", be = "A Farris Component", Se = "object", Me = {
117
131
  id: {
118
132
  description: "The unique identifier for rate",
119
133
  type: "string"
@@ -175,23 +189,23 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
175
189
  type: "boolean",
176
190
  default: !0
177
191
  }
178
- }, Me = [
192
+ }, Oe = [
179
193
  "id",
180
194
  "type"
181
- ], Oe = [
195
+ ], Te = [
182
196
  "id",
183
197
  "appearance",
184
198
  "binding"
185
- ], Te = {
186
- $schema: me,
187
- $id: ge,
188
- title: ye,
189
- description: he,
190
- type: be,
191
- properties: Se,
192
- required: Me,
193
- ignore: Oe
194
- }, ke = "rate", De = "A Farris Component", je = "object", Ne = {
199
+ ], ke = {
200
+ $schema: ge,
201
+ $id: ye,
202
+ title: he,
203
+ description: be,
204
+ type: Se,
205
+ properties: Me,
206
+ required: Oe,
207
+ ignore: Te
208
+ }, De = "rate", je = "A Farris Component", Ne = "object", Ve = {
195
209
  basic: {
196
210
  description: "Basic Infomation",
197
211
  title: "基本信息",
@@ -213,12 +227,12 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
213
227
  }
214
228
  }
215
229
  }
216
- }, Ve = {
217
- title: ke,
218
- description: De,
219
- type: je,
220
- categories: Ne
221
- }, Re = ["很不满意", "不满意", "一般", "满意", "非常满意"], Q = {
230
+ }, we = {
231
+ title: De,
232
+ description: je,
233
+ type: Ne,
234
+ categories: Ve
235
+ }, Pe = ["很不满意", "不满意", "一般", "满意", "非常满意"], Q = {
222
236
  /** 星星大小 */
223
237
  size: { type: String, default: "large" },
224
238
  /** 启用半颗星模式 */
@@ -240,7 +254,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
240
254
  /** 禁用单个星星的文字提示 */
241
255
  toolTipDisabled: { type: Boolean, default: !0 },
242
256
  /** 默认的满意度文案 */
243
- toolTipContents: { type: Array, default: Re },
257
+ toolTipContents: { type: Array, default: Pe },
244
258
  /** 启用评分 */
245
259
  enableScore: { type: Boolean, default: !0 },
246
260
  /** 启用满意度 */
@@ -250,92 +264,92 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
250
264
  */
251
265
  value: { type: Number, default: 0 },
252
266
  modelValue: { type: Number, default: 0 }
253
- }, ee = fe(Q, Te, de, ve, Ve), H = /* @__PURE__ */ Z({
267
+ }, ae = de(Q, ke, ve, me, we), q = /* @__PURE__ */ Z({
254
268
  name: "FRate",
255
269
  props: Q,
256
270
  emits: ["selectedValue", "update:modelValue"],
257
271
  setup(a, e) {
258
- const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
259
- let v;
260
- const T = r(0), O = r(0), k = r(0), d = r(a.modelValue);
261
- let D = 1, u, g, m;
272
+ const t = o(a.size), l = o(a.enableHalf), n = o(a.enableClear), v = o(a.disabled), m = o(a.pointSystem), b = o(a.lightColor), P = o(a.darkColor), r = o(a.iconClass), s = o(a.numOfStar), f = o(a.toolTipDisabled), d = o(a.toolTipContents), S = o(a.enableScore), M = o(a.enableSatisfaction);
273
+ let g;
274
+ const T = o(0), O = o(0), k = o(0), p = o(a.modelValue);
275
+ let D = 1, u, h, y;
262
276
  const j = 4;
263
277
  G(() => {
264
278
  });
265
- function P() {
279
+ function E() {
266
280
  const c = s.value;
267
- m = [];
281
+ y = [];
268
282
  for (let V = 1; V <= c; V++)
269
- m.push({
283
+ y.push({
270
284
  id: V
271
285
  });
272
286
  }
273
287
  function $() {
274
288
  let c;
275
- n.value ? c = Math.ceil(d.value / D) : c = d.value, O.value = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[c - 1];
289
+ l.value ? c = Math.ceil(p.value / D) : c = p.value, O.value = (g * p.value + Math.floor(p.value) * j) / D, u = d.value[c - 1];
276
290
  }
277
291
  function F() {
278
292
  switch (t.value) {
279
293
  case "small":
280
- v = 14;
294
+ g = 14;
281
295
  break;
282
296
  case "middle":
283
- v = 16;
297
+ g = 16;
284
298
  break;
285
299
  case "large":
286
- v = 18;
300
+ g = 18;
287
301
  break;
288
302
  case "extraLarge":
289
- v = 24;
303
+ g = 24;
290
304
  break;
291
305
  }
292
- P(), s.value && (D = y.value / s.value), d.value && $();
306
+ E(), s.value && (D = m.value / s.value), p.value && $();
293
307
  }
294
308
  F();
295
- function q(c) {
309
+ function H(c) {
296
310
  return c.className.indexOf("f-icon") !== -1;
297
311
  }
298
- function z() {
299
- return T.value === O.value && o.value && O.value !== 0 ? (O.value = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), e.emit("update:modelValue", d.value), !0) : !1;
312
+ function _() {
313
+ return T.value === O.value && n.value && O.value !== 0 ? (O.value = 0, p.value = 0, h = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), e.emit("update:modelValue", p.value), !0) : !1;
300
314
  }
301
- function X(c, V, i) {
315
+ function z(c, V, i) {
302
316
  if (c.movementX || c.movementY) {
303
- if (h.value)
317
+ if (v.value)
304
318
  return;
305
- M.value && (u = p.value[V - 1]), c.offsetX < v / 2 && n.value === !0 ? (T.value = v * V - v / 2 + j * (V - 1), k.value = D * V - D / 2) : (T.value = v * V + j * (V - 1), k.value = D * V);
319
+ M.value && (u = d.value[V - 1]), c.offsetX < g / 2 && l.value === !0 ? (T.value = g * V - g / 2 + j * (V - 1), k.value = D * V - D / 2) : (T.value = g * V + j * (V - 1), k.value = D * V);
306
320
  }
307
321
  if (i === !0) {
308
- if (z())
322
+ if (_())
309
323
  return;
310
- d.value = k.value, O.value = T.value, g = u, e.emit("update:modelValue", d.value), e.emit("selectedValue", d.value);
324
+ p.value = k.value, O.value = T.value, h = u, e.emit("update:modelValue", p.value), e.emit("selectedValue", p.value);
311
325
  }
312
326
  }
313
327
  function L(c, V) {
314
328
  var i;
315
- if (q(c.target) && c.target) {
316
- const R = parseInt((i = c.target) == null ? void 0 : i.id);
317
- X(c, R, V);
329
+ if (H(c.target) && c.target) {
330
+ const w = parseInt((i = c.target) == null ? void 0 : i.id);
331
+ z(c, w, V);
318
332
  }
319
333
  }
320
- const _ = W(() => k.value ? k.value + "分" : d.value + "分"), C = W(() => ({
334
+ const C = W(() => k.value ? k.value + "分" : p.value + "分"), X = W(() => ({
321
335
  width: (T.value || O.value) + "px"
322
336
  }));
323
337
  function A() {
324
338
  T.value = 0;
325
339
  }
326
- return ae(() => a.modelValue, (c) => {
327
- d.value = c, $();
340
+ return te(() => a.modelValue, (c) => {
341
+ p.value = c, $();
328
342
  }), () => N("div", {
329
343
  class: "farris-star-rating",
330
- onMouseover: E((c) => L(c, !1), ["prevent"]),
331
- onMousemove: E((c) => L(c, !1), ["prevent"]),
332
- onMouseleave: E((c) => A(), ["prevent"]),
333
- onClick: E((c) => L(c, !0), ["prevent"])
344
+ onMouseover: R((c) => L(c, !1), ["prevent"]),
345
+ onMousemove: R((c) => L(c, !1), ["prevent"]),
346
+ onMouseleave: R((c) => A(), ["prevent"]),
347
+ onClick: R((c) => L(c, !0), ["prevent"])
334
348
  }, [N("div", {
335
349
  class: "star-light-area",
336
- style: C.value
337
- }, [m.map((c) => N("span", {
338
- class: ["f-icon default-light-color ", l.value, {
350
+ style: X.value
351
+ }, [y.map((c) => N("span", {
352
+ class: ["f-icon default-light-color ", r.value, {
339
353
  "f-star-sm": t.value === "small"
340
354
  }, {
341
355
  "f-star-md": t.value === "middle"
@@ -358,8 +372,8 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
358
372
  }, {
359
373
  large: t.value === "large"
360
374
  }]
361
- }, [m.map((c) => N("span", {
362
- class: ["f-icon default-dark-color", l.value, {
375
+ }, [y.map((c) => N("span", {
376
+ class: ["f-icon default-dark-color", r.value, {
363
377
  "f-star-sm": t.value === "small"
364
378
  }, {
365
379
  "f-star-md": t.value === "middle"
@@ -370,7 +384,7 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
370
384
  }],
371
385
  id: c.id,
372
386
  style: {
373
- color: w.value
387
+ color: P.value
374
388
  }
375
389
  }, null))]), N("div", {
376
390
  class: ["f-utils-fill", {
@@ -382,22 +396,22 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
382
396
  }, {
383
397
  "font-exlarge": t.value === "extraLarge"
384
398
  }]
385
- }, [S.value && N("span", null, [B(" "), _.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
399
+ }, [S.value && N("span", null, [B(" "), C.value, B(" ")]), M.value && (h || u) && N("span", null, [B(" "), u || h])])]);
386
400
  }
387
401
  });
388
- function we(a, e, t) {
402
+ function Re(a, e, t) {
389
403
  var D;
390
- const n = "", o = "", h = r();
391
- function y() {
404
+ const l = "", n = "", v = o();
405
+ function m() {
392
406
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
393
407
  }
394
408
  function b() {
395
409
  return !1;
396
410
  }
397
- function w() {
411
+ function P() {
398
412
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
399
413
  }
400
- function l() {
414
+ function r() {
401
415
  return (e == null ? void 0 : e.schema.componentType) === "frame";
402
416
  }
403
417
  function s(u) {
@@ -405,14 +419,14 @@ function we(a, e, t) {
405
419
  return null;
406
420
  if (u.value.schema && u.value.schema.type === "component")
407
421
  return u.value;
408
- const g = r(u == null ? void 0 : u.value.parent), m = s(g);
409
- return m || null;
422
+ const h = o(u == null ? void 0 : u.value.parent), y = s(h);
423
+ return y || null;
410
424
  }
411
425
  function f(u = e) {
412
- const { componentInstance: g, designerItemElementRef: m } = u;
413
- return !g || !g.value ? null : g.value.canMove ? m : f(u.parent);
426
+ const { componentInstance: h, designerItemElementRef: y } = u;
427
+ return !h || !h.value ? null : h.value.canMove ? y : f(u.parent);
414
428
  }
415
- function p(u) {
429
+ function d(u) {
416
430
  return !!t;
417
431
  }
418
432
  function S() {
@@ -420,137 +434,137 @@ function we(a, e, t) {
420
434
  }
421
435
  function M() {
422
436
  }
423
- function v(u, g) {
437
+ function g(u, h) {
424
438
  }
425
- function T(u, g) {
426
- const { componentType: m } = u;
427
- let j = I(m, u, g);
428
- const P = m.toLowerCase().replace(/-/g, "_");
429
- return j && !j.id && j.type === m && (j.id = `${P}_${Math.random().toString().slice(2, 6)}`), j;
439
+ function T(u, h) {
440
+ const { componentType: y } = u;
441
+ let j = ee(y, u, h);
442
+ const E = y.toLowerCase().replace(/-/g, "_");
443
+ return j && !j.id && j.type === y && (j.id = `${E}_${Math.random().toString().slice(2, 6)}`), j;
430
444
  }
431
445
  function O(u) {
432
446
  }
433
447
  function k(...u) {
434
448
  }
435
- function d() {
449
+ function p() {
436
450
  e != null && e.schema.contents && e.schema.contents.map((u) => {
437
451
  var j;
438
- let g = u.id;
439
- u.type === "component-ref" && (g = u.component);
440
- const m = a.value.querySelector(`#${g}-design-item`);
441
- (j = m == null ? void 0 : m.componentInstance) != null && j.value.onRemoveComponent && m.componentInstance.value.onRemoveComponent();
452
+ let h = u.id;
453
+ u.type === "component-ref" && (h = u.component);
454
+ const y = a.value.querySelector(`#${h}-design-item`);
455
+ (j = y == null ? void 0 : y.componentInstance) != null && j.value.onRemoveComponent && y.componentInstance.value.onRemoveComponent();
442
456
  });
443
457
  }
444
- return h.value = {
445
- canMove: y(),
458
+ return v.value = {
459
+ canMove: m(),
446
460
  canSelectParent: b(),
447
- canDelete: w(),
448
- canNested: !l(),
461
+ canDelete: P(),
462
+ canNested: !r(),
449
463
  contents: e == null ? void 0 : e.schema.contents,
450
464
  elementRef: a,
451
465
  parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
452
466
  schema: e == null ? void 0 : e.schema,
453
- styles: n,
454
- designerClass: o,
455
- canAccepts: p,
467
+ styles: l,
468
+ designerClass: n,
469
+ canAccepts: d,
456
470
  getBelongedComponentInstance: s,
457
471
  getDraggableDesignItemElement: f,
458
472
  getDraggingDisplayText: S,
459
473
  getPropConfig: k,
460
474
  getDragScopeElement: M,
461
- onAcceptMovedChildElement: v,
475
+ onAcceptMovedChildElement: g,
462
476
  onChildElementMovedOut: O,
463
477
  addNewChildComponentSchema: T,
464
- triggerBelongedComponentToMoveWhenMoved: r(!1),
465
- triggerBelongedComponentToDeleteWhenDeleted: r(!1),
466
- onRemoveComponent: d
467
- }, h;
478
+ triggerBelongedComponentToMoveWhenMoved: o(!1),
479
+ triggerBelongedComponentToDeleteWhenDeleted: o(!1),
480
+ onRemoveComponent: p
481
+ }, v;
468
482
  }
469
483
  const Ee = /* @__PURE__ */ Z({
470
484
  name: "FRateDesign",
471
485
  props: Q,
472
486
  emits: ["selectedValue"],
473
487
  setup(a, e) {
474
- const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
475
- let v;
476
- const T = r(1);
488
+ const t = o(a.size), l = o(a.enableHalf), n = o(a.enableClear), v = o(a.disabled), m = o(a.pointSystem), b = o(a.lightColor), P = o(a.darkColor), r = o(a.iconClass), s = o(a.numOfStar), f = o(a.toolTipDisabled), d = o(a.toolTipContents), S = o(a.enableScore), M = o(a.enableSatisfaction);
489
+ let g;
490
+ const T = o(1);
477
491
  let O = 0;
478
- const k = r(0), d = r(0);
479
- let D = 1, u, g, m;
480
- const j = 4, P = r(), $ = te("design-item-context"), F = we(P, $);
492
+ const k = o(0), p = o(0);
493
+ let D = 1, u, h, y;
494
+ const j = 4, E = o(), $ = le("design-item-context"), F = Re(E, $);
481
495
  G(() => {
482
- P.value.componentInstance = F;
496
+ E.value.componentInstance = F;
483
497
  }), e.expose(F.value), G(() => {
484
498
  });
485
- function q() {
499
+ function H() {
486
500
  const i = s.value;
487
- m = [];
488
- for (let R = 1; R <= i; R++)
489
- m.push({
490
- id: R
501
+ y = [];
502
+ for (let w = 1; w <= i; w++)
503
+ y.push({
504
+ id: w
491
505
  });
492
506
  }
493
- function z() {
507
+ function _() {
494
508
  let i;
495
- n.value ? i = Math.ceil(d.value / D) : i = d.value, O = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[i - 1];
509
+ l.value ? i = Math.ceil(p.value / D) : i = p.value, O = (g * p.value + Math.floor(p.value) * j) / D, u = d.value[i - 1];
496
510
  }
497
- function X() {
511
+ function z() {
498
512
  switch (t.value) {
499
513
  case "small":
500
- v = 14;
514
+ g = 14;
501
515
  break;
502
516
  case "middle":
503
- v = 16;
517
+ g = 16;
504
518
  break;
505
519
  case "large":
506
- v = 18;
520
+ g = 18;
507
521
  break;
508
522
  case "extraLarge":
509
- v = 24;
523
+ g = 24;
510
524
  break;
511
525
  }
512
- q(), s.value && (D = y.value / s.value), d.value && z();
526
+ H(), s.value && (D = m.value / s.value), p.value && _();
513
527
  }
514
- X();
528
+ z();
515
529
  function L(i) {
516
530
  return i.className.indexOf("f-icon") !== -1;
517
531
  }
518
- function _() {
519
- return T.value === O && o && O !== 0 ? (O = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), !0) : !1;
532
+ function C() {
533
+ return T.value === O && n && O !== 0 ? (O = 0, p.value = 0, h = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), !0) : !1;
520
534
  }
521
- function C(i, R, Y) {
535
+ function X(i, w, Y) {
522
536
  if (i.movementX || i.movementY) {
523
- if (h.value)
537
+ if (v.value)
524
538
  return;
525
- M.value && (u = p.value[R - 1]), i.offsetX < v / 2 && n.value === !0 ? (T.value = v * R - v / 2 + j * (R - 1), k.value = D * R - D / 2) : (T.value = v * R + j * (R - 1), k.value = D * R);
539
+ M.value && (u = d.value[w - 1]), i.offsetX < g / 2 && l.value === !0 ? (T.value = g * w - g / 2 + j * (w - 1), k.value = D * w - D / 2) : (T.value = g * w + j * (w - 1), k.value = D * w);
526
540
  }
527
541
  if (Y === !0) {
528
- if (_())
542
+ if (C())
529
543
  return;
530
- d.value = k.value, O = T.value, g = u, e.emit("selectedValue", d.value);
544
+ p.value = k.value, O = T.value, h = u, e.emit("selectedValue", p.value);
531
545
  }
532
546
  }
533
- function A(i, R) {
547
+ function A(i, w) {
534
548
  if (L(i.target) && i.target) {
535
549
  const Y = parseInt(i.target.id);
536
- C(i, Y, R);
550
+ X(i, Y, w);
537
551
  }
538
552
  }
539
- const c = W(() => k.value ? k.value + "分" : d.value + "分"), V = W(() => ({
553
+ const c = W(() => k.value ? k.value + "分" : p.value + "分"), V = W(() => ({
540
554
  width: (T.value || O) + "px"
541
555
  }));
542
556
  return () => N("div", {
543
557
  class: "farris-star-rating",
544
- ref: P,
545
- onMouseover: E((i) => A(i, !1), ["prevent"]),
546
- onMousemove: E((i) => A(i, !1), ["prevent"]),
547
- onMouseout: E((i) => A(i, !1), ["prevent"]),
548
- onClick: E((i) => A(i, !0), ["prevent"])
558
+ ref: E,
559
+ onMouseover: R((i) => A(i, !1), ["prevent"]),
560
+ onMousemove: R((i) => A(i, !1), ["prevent"]),
561
+ onMouseout: R((i) => A(i, !1), ["prevent"]),
562
+ onClick: R((i) => A(i, !0), ["prevent"])
549
563
  }, [N("div", {
550
564
  class: "star-light-area",
551
565
  style: V.value
552
- }, [m.map((i) => N("span", {
553
- class: ["f-icon default-light-color ", l.value, {
566
+ }, [y.map((i) => N("span", {
567
+ class: ["f-icon default-light-color ", r.value, {
554
568
  "f-star-sm": t.value === "small"
555
569
  }, {
556
570
  "f-star-md": t.value === "middle"
@@ -573,8 +587,8 @@ const Ee = /* @__PURE__ */ Z({
573
587
  }, {
574
588
  large: t.value === "large"
575
589
  }]
576
- }, [m.map((i) => N("span", {
577
- class: ["f-icon default-dark-color", l.value, {
590
+ }, [y.map((i) => N("span", {
591
+ class: ["f-icon default-dark-color", r.value, {
578
592
  "f-star-sm": t.value === "small"
579
593
  }, {
580
594
  "f-star-md": t.value === "middle"
@@ -585,7 +599,7 @@ const Ee = /* @__PURE__ */ Z({
585
599
  }],
586
600
  id: i.id,
587
601
  style: {
588
- color: w.value
602
+ color: P.value
589
603
  }
590
604
  }, null))]), N("div", {
591
605
  class: ["f-utils-fill", {
@@ -597,19 +611,19 @@ const Ee = /* @__PURE__ */ Z({
597
611
  }, {
598
612
  "font-exlarge": t.value === "extraLarge"
599
613
  }]
600
- }, [S.value && N("span", null, [B(" "), c.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
614
+ }, [S.value && N("span", null, [B(" "), c.value, B(" ")]), M.value && (h || u) && N("span", null, [B(" "), u || h])])]);
601
615
  }
602
616
  });
603
- H.register = (a, e, t, n) => {
604
- a.rate = H, e.rate = ee;
617
+ q.register = (a, e, t, l) => {
618
+ a.rate = q, e.rate = ae;
605
619
  };
606
- H.registerDesigner = (a, e, t) => {
607
- a.rate = Ee, e.rate = ee;
620
+ q.registerDesigner = (a, e, t) => {
621
+ a.rate = Ee, e.rate = ae;
608
622
  };
609
- const Le = re(H);
623
+ const $e = re(q);
610
624
  export {
611
- H as FRate,
612
- Le as default,
613
- ee as propsResolver,
625
+ q as FRate,
626
+ $e as default,
627
+ ae as propsResolver,
614
628
  Q as rateProps
615
629
  };