@farris/ui-vue 1.2.6 → 1.2.8

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 (210) hide show
  1. package/components/accordion/index.esm.js +150 -142
  2. package/components/avatar/index.esm.js +393 -457
  3. package/components/border-editor/index.esm.js +4 -4
  4. package/components/button/index.esm.js +1 -1
  5. package/components/button-edit/index.esm.js +353 -444
  6. package/components/button-group/index.esm.js +5 -5
  7. package/components/calendar/index.esm.js +176 -176
  8. package/components/capsule/index.esm.js +93 -93
  9. package/components/checkbox/index.esm.js +491 -554
  10. package/components/color-picker/index.esm.js +1 -1
  11. package/components/combo-list/index.esm.js +479 -513
  12. package/components/combo-tree/index.esm.js +8 -8
  13. package/components/component/index.esm.js +89 -89
  14. package/components/condition/index.esm.js +857 -743
  15. package/components/content-container/index.esm.js +61 -61
  16. package/components/data-grid/index.esm.js +4883 -5182
  17. package/components/data-view/index.esm.js +3072 -2949
  18. package/components/date-picker/index.esm.js +2626 -2689
  19. package/components/dependent-base/style.js +1 -0
  20. package/components/dependent-fluid/style.js +1 -0
  21. package/components/dependent-icon/style.js +1 -0
  22. package/components/dependent-input/style.js +1 -0
  23. package/components/dependent-table/style.js +1 -0
  24. package/components/designer-canvas/index.esm.js +478 -475
  25. package/components/designer-outline/index.esm.js +173 -131
  26. package/components/discussion-editor/index.esm.js +1 -1
  27. package/components/dropdown/index.esm.js +73 -73
  28. package/components/dynamic-form/index.esm.js +940 -998
  29. package/components/dynamic-resolver/index.esm.js +67 -35
  30. package/components/dynamic-view/index.esm.js +307 -293
  31. package/components/enum-editor/index.esm.js +3 -3
  32. package/components/events-editor/index.esm.js +178 -178
  33. package/components/expression-editor/index.esm.js +105 -105
  34. package/components/external-container/index.esm.js +1747 -1627
  35. package/components/field-selector/index.css +1 -1
  36. package/components/field-selector/index.esm.js +5877 -6176
  37. package/components/filter-bar/index.css +1 -1
  38. package/components/filter-bar/index.esm.js +1454 -1524
  39. package/components/flow-canvas/index.esm.js +678 -675
  40. package/components/image-cropper/index.esm.js +266 -266
  41. package/components/input-group/index.esm.js +659 -722
  42. package/components/layout/index.esm.js +148 -148
  43. package/components/list-nav/index.esm.js +109 -109
  44. package/components/list-view/index.esm.js +1643 -1524
  45. package/components/lookup/index.css +1 -1
  46. package/components/lookup/index.esm.js +6502 -6770
  47. package/components/mapping-editor/index.esm.js +5639 -5939
  48. package/components/message-box/index.esm.js +1 -1
  49. package/components/modal/index.esm.js +1 -1
  50. package/components/nav/index.esm.js +86 -86
  51. package/components/number-range/index.esm.js +1120 -0
  52. package/components/number-range/package.json +8 -0
  53. package/components/number-range/style.js +6 -0
  54. package/components/number-spinner/index.esm.js +1146 -0
  55. package/components/number-spinner/package.json +8 -0
  56. package/components/number-spinner/style.js +4 -0
  57. package/components/order/index.esm.js +1098 -1130
  58. package/components/page-footer/index.esm.js +106 -106
  59. package/components/page-header/index.esm.js +1088 -1317
  60. package/components/pagination/index.esm.js +252 -252
  61. package/components/progress/index.esm.js +37 -37
  62. package/components/property-editor/index.esm.js +1479 -1513
  63. package/components/property-panel/index.css +1 -1
  64. package/components/property-panel/index.esm.js +706 -778
  65. package/components/query-solution/index.css +1 -0
  66. package/components/query-solution/index.esm.js +6935 -0
  67. package/components/query-solution/package.json +8 -0
  68. package/components/query-solution/style.js +2 -0
  69. package/components/radio-button/index.esm.js +64 -64
  70. package/components/radio-group/index.esm.js +453 -516
  71. package/components/rate/index.esm.js +92 -92
  72. package/components/response-layout/index.esm.js +33 -33
  73. package/components/response-layout-editor/index.esm.js +555 -526
  74. package/components/response-toolbar/index.esm.js +1009 -1247
  75. package/components/schema-selector/index.esm.js +3261 -3373
  76. package/components/search-box/index.esm.js +143 -143
  77. package/components/section/index.esm.js +209 -209
  78. package/components/smoke-detector/index.esm.js +22 -22
  79. package/components/spacing-editor/index.esm.js +2 -2
  80. package/components/splitter/index.esm.js +1097 -394
  81. package/components/step/index.esm.js +153 -153
  82. package/components/switch/index.esm.js +441 -504
  83. package/components/tabs/index.esm.js +1849 -2039
  84. package/components/tags/index.esm.js +215 -215
  85. package/components/text/index.esm.js +53 -53
  86. package/components/textarea/index.esm.js +445 -493
  87. package/components/time-picker/index.esm.js +1350 -1414
  88. package/components/transfer/index.esm.js +146 -144
  89. package/components/tree-grid/index.css +1 -1
  90. package/components/tree-grid/index.esm.js +5948 -6237
  91. package/components/tree-view/index.esm.js +2381 -2255
  92. package/components/uploader/index.esm.js +1 -1
  93. package/components/verify-detail/index.esm.js +232 -232
  94. package/components/video/index.esm.js +136 -136
  95. package/components/weather/index.esm.js +2 -2
  96. package/farris.all.esm.js +27221 -26804
  97. package/farris.all.umd.cjs +9 -9
  98. package/index.css +1 -1
  99. package/package.json +1 -1
  100. package/types/checkbox/index.d.ts +1 -0
  101. package/types/combo-list/src/components/list-container.component.d.ts +6 -0
  102. package/types/combo-list/src/components/list-container.props.d.ts +9 -1
  103. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  104. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  105. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  106. package/types/data-view/composition/types.d.ts +1 -1
  107. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  108. package/types/designer-canvas/src/types.d.ts +1 -1
  109. package/types/dynamic-form/index.d.ts +1 -0
  110. package/types/dynamic-form/src/types.d.ts +1 -1
  111. package/types/dynamic-resolver/index.d.ts +1 -0
  112. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  113. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  114. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
  115. package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
  116. package/types/modal/src/modal.props.d.ts +1 -4
  117. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
  118. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
  119. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  120. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  121. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  122. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  123. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  124. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  125. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
  126. package/components/accordion/index.umd.cjs +0 -1
  127. package/components/avatar/index.umd.cjs +0 -1
  128. package/components/border-editor/index.umd.cjs +0 -1
  129. package/components/button/index.umd.cjs +0 -1
  130. package/components/button-edit/index.umd.cjs +0 -1
  131. package/components/button-group/index.umd.cjs +0 -1
  132. package/components/calculator/index.umd.cjs +0 -1
  133. package/components/calendar/index.umd.cjs +0 -1
  134. package/components/capsule/index.umd.cjs +0 -1
  135. package/components/checkbox/index.umd.cjs +0 -1
  136. package/components/color-picker/index.umd.cjs +0 -3
  137. package/components/combo-list/index.umd.cjs +0 -1
  138. package/components/combo-tree/index.umd.cjs +0 -1
  139. package/components/common/index.umd.cjs +0 -1
  140. package/components/component/index.umd.cjs +0 -1
  141. package/components/condition/index.umd.cjs +0 -1
  142. package/components/content-container/index.umd.cjs +0 -1
  143. package/components/data-grid/index.umd.cjs +0 -1
  144. package/components/data-view/index.umd.cjs +0 -1
  145. package/components/date-picker/index.umd.cjs +0 -1
  146. package/components/designer-canvas/index.umd.cjs +0 -1
  147. package/components/designer-outline/index.umd.cjs +0 -1
  148. package/components/designer-toolbox/index.umd.cjs +0 -1
  149. package/components/discussion-editor/index.umd.cjs +0 -3
  150. package/components/discussion-list/index.umd.cjs +0 -1
  151. package/components/drawer/index.umd.cjs +0 -1
  152. package/components/dropdown/index.umd.cjs +0 -2
  153. package/components/dynamic-form/index.umd.cjs +0 -1
  154. package/components/dynamic-resolver/index.umd.cjs +0 -1
  155. package/components/dynamic-view/index.umd.cjs +0 -1
  156. package/components/enum-editor/index.umd.cjs +0 -1
  157. package/components/events-editor/index.umd.cjs +0 -1
  158. package/components/expression-editor/index.umd.cjs +0 -1
  159. package/components/external-container/index.umd.cjs +0 -1
  160. package/components/field-selector/index.umd.cjs +0 -1
  161. package/components/filter-bar/index.umd.cjs +0 -1
  162. package/components/flow-canvas/index.umd.cjs +0 -1
  163. package/components/image-cropper/index.umd.cjs +0 -1
  164. package/components/input-group/index.umd.cjs +0 -1
  165. package/components/layout/index.umd.cjs +0 -1
  166. package/components/list-nav/index.umd.cjs +0 -1
  167. package/components/list-view/index.umd.cjs +0 -1
  168. package/components/loading/index.umd.cjs +0 -8
  169. package/components/locale/index.umd.cjs +0 -1
  170. package/components/lookup/index.umd.cjs +0 -1
  171. package/components/mapping-editor/index.umd.cjs +0 -1
  172. package/components/message-box/index.umd.cjs +0 -1
  173. package/components/modal/index.umd.cjs +0 -1
  174. package/components/nav/index.umd.cjs +0 -3
  175. package/components/notify/index.umd.cjs +0 -1
  176. package/components/order/index.umd.cjs +0 -1
  177. package/components/page-footer/index.umd.cjs +0 -1
  178. package/components/page-header/index.umd.cjs +0 -1
  179. package/components/pagination/index.umd.cjs +0 -1
  180. package/components/popover/index.umd.cjs +0 -1
  181. package/components/progress/index.umd.cjs +0 -3
  182. package/components/property-editor/index.umd.cjs +0 -3
  183. package/components/property-panel/index.umd.cjs +0 -1
  184. package/components/radio-button/index.umd.cjs +0 -1
  185. package/components/radio-group/index.umd.cjs +0 -1
  186. package/components/rate/index.umd.cjs +0 -1
  187. package/components/response-layout/index.umd.cjs +0 -1
  188. package/components/response-layout-editor/index.umd.cjs +0 -1
  189. package/components/response-toolbar/index.umd.cjs +0 -1
  190. package/components/schema-selector/index.umd.cjs +0 -8
  191. package/components/search-box/index.umd.cjs +0 -1
  192. package/components/section/index.umd.cjs +0 -1
  193. package/components/smoke-detector/index.umd.cjs +0 -1
  194. package/components/spacing-editor/index.umd.cjs +0 -1
  195. package/components/splitter/index.umd.cjs +0 -1
  196. package/components/step/index.umd.cjs +0 -1
  197. package/components/switch/index.umd.cjs +0 -1
  198. package/components/tabs/index.umd.cjs +0 -1
  199. package/components/tags/index.umd.cjs +0 -1
  200. package/components/text/index.umd.cjs +0 -1
  201. package/components/textarea/index.umd.cjs +0 -1
  202. package/components/time-picker/index.umd.cjs +0 -1
  203. package/components/tooltip/index.umd.cjs +0 -1
  204. package/components/transfer/index.umd.cjs +0 -1
  205. package/components/tree-grid/index.umd.cjs +0 -1
  206. package/components/tree-view/index.umd.cjs +0 -1
  207. package/components/uploader/index.umd.cjs +0 -2
  208. package/components/verify-detail/index.umd.cjs +0 -1
  209. package/components/video/index.umd.cjs +0 -1
  210. package/components/weather/index.umd.cjs +0 -16
@@ -1,41 +1,41 @@
1
- import { defineComponent as C, computed as m, createVNode as u, ref as g, inject as k, onMounted as D } from "vue";
2
- import { cloneDeep as S } from "lodash-es";
3
- import { resolveAppearance as E, createPropsResolver as R } from "@farris/ui-vue/components/dynamic-resolver";
4
- import { useDesignerComponent as M } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component";
5
- const T = {}, V = {};
6
- function I(t) {
7
- const { properties: e, title: i } = t, n = Object.keys(e).reduce((r, l) => (r[l] = e[l].type === "object" && e[l].properties ? I(e[l]) : S(e[l].default), r), {});
8
- return n.id = `${i}-${Date.now()}`, n;
9
- }
10
- function B(t, e) {
11
- const i = I(e);
12
- return Object.keys(t).reduce((n, r) => (n[r] = t[r], n), i), i;
1
+ import { defineComponent as C, computed as m, provide as E, createVNode as u, inject as I, ref as y, onMounted as O } from "vue";
2
+ import { cloneDeep as R } from "lodash-es";
3
+ import { resolveAppearance as M, createPropsResolver as S } from "../dynamic-resolver/index.esm.js";
4
+ import { useDesignerComponent as T } from "../designer-canvas/index.esm.js";
5
+ const B = {}, V = {};
6
+ function P(t) {
7
+ const { properties: e, title: i } = t, o = Object.keys(e).reduce((n, l) => (n[l] = e[l].type === "object" && e[l].properties ? P(e[l]) : R(e[l].default), n), {});
8
+ return o.id = `${i}-${Date.now()}`, o;
13
9
  }
14
10
  function q(t, e) {
15
- return Object.keys(t).filter((n) => t[n] != null).reduce((n, r) => {
16
- if (e.has(r)) {
17
- const l = e.get(r);
11
+ const i = P(e);
12
+ return Object.keys(t).reduce((o, n) => (o[n] && typeof o[n] == "object" ? Object.assign(o[n], t[n]) : o[n] = t[n], o), i), i;
13
+ }
14
+ function x(t, e) {
15
+ return Object.keys(t).filter((o) => t[o] != null).reduce((o, n) => {
16
+ if (e.has(n)) {
17
+ const l = e.get(n);
18
18
  if (typeof l == "string")
19
- n[l] = t[r];
19
+ o[l] = t[n];
20
20
  else {
21
- const d = l(r, t[r], t);
22
- Object.assign(n, d);
21
+ const d = l(n, t[n], t);
22
+ Object.assign(o, d);
23
23
  }
24
24
  } else
25
- n[r] = t[r];
26
- return n;
25
+ o[n] = t[n];
26
+ return o;
27
27
  }, {});
28
28
  }
29
- function x(t, e, i = /* @__PURE__ */ new Map()) {
30
- const n = B(t, e);
31
- return q(n, i);
29
+ function z(t, e, i = /* @__PURE__ */ new Map()) {
30
+ const o = q(t, e);
31
+ return x(o, i);
32
32
  }
33
- function z(t = {}) {
34
- function e(s, o, c, a) {
35
- if (typeof c == "number")
36
- return a[s].length === c;
37
- if (typeof c == "object") {
38
- const p = Object.keys(c)[0], h = c[p];
33
+ function H(t = {}) {
34
+ function e(s, c, r, a) {
35
+ if (typeof r == "number")
36
+ return a[s].length === r;
37
+ if (typeof r == "object") {
38
+ const p = Object.keys(r)[0], h = r[p];
39
39
  if (p === "not")
40
40
  return Number(a[s].length) !== Number(h);
41
41
  if (p === "moreThan")
@@ -45,60 +45,60 @@ function z(t = {}) {
45
45
  }
46
46
  return !1;
47
47
  }
48
- function i(s, o, c, a) {
49
- return a[s] && a[s].propertyValue && String(a[s].propertyValue.value) === String(c);
48
+ function i(s, c, r, a) {
49
+ return a[s] && a[s].propertyValue && String(a[s].propertyValue.value) === String(r);
50
50
  }
51
- const n = /* @__PURE__ */ new Map([
51
+ const o = /* @__PURE__ */ new Map([
52
52
  ["length", e],
53
53
  ["getProperty", i]
54
54
  ]);
55
- Object.keys(t).reduce((s, o) => (s.set(o, t[o]), s), n);
56
- function r(s, o) {
57
- const c = s;
58
- return typeof o == "number" ? [{ target: c, operator: "length", param: null, value: Number(o) }] : typeof o == "boolean" ? [{ target: c, operator: "getProperty", param: s, value: !!o }] : typeof o == "object" ? Object.keys(o).map((a) => {
55
+ Object.keys(t).reduce((s, c) => (s.set(c, t[c]), s), o);
56
+ function n(s, c) {
57
+ const r = s;
58
+ return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((a) => {
59
59
  if (a === "length")
60
- return { target: c, operator: "length", param: null, value: o[a] };
61
- const p = a, h = o[a];
62
- return { target: c, operator: "getProperty", param: p, value: h };
60
+ return { target: r, operator: "length", param: null, value: c[a] };
61
+ const p = a, h = c[a];
62
+ return { target: r, operator: "getProperty", param: p, value: h };
63
63
  }) : [];
64
64
  }
65
65
  function l(s) {
66
- return Object.keys(s).reduce((c, a) => {
67
- const p = r(a, s[a]);
68
- return c.push(...p), c;
66
+ return Object.keys(s).reduce((r, a) => {
67
+ const p = n(a, s[a]);
68
+ return r.push(...p), r;
69
69
  }, []);
70
70
  }
71
- function d(s, o) {
72
- if (n.has(s.operator)) {
73
- const c = n.get(s.operator);
74
- return c && c(s.target, s.param, s.value, o) || !1;
71
+ function d(s, c) {
72
+ if (o.has(s.operator)) {
73
+ const r = o.get(s.operator);
74
+ return r && r(s.target, s.param, s.value, c) || !1;
75
75
  }
76
76
  return !1;
77
77
  }
78
- function f(s, o) {
79
- return l(s).reduce((p, h) => p && d(h, o), !0);
78
+ function f(s, c) {
79
+ return l(s).reduce((p, h) => p && d(h, c), !0);
80
80
  }
81
- function y(s, o) {
82
- const c = Object.keys(s), a = c.includes("allOf"), p = c.includes("anyOf"), h = a || p, A = (h ? s[h ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((P) => f(P, o));
81
+ function g(s, c) {
82
+ const r = Object.keys(s), a = r.includes("allOf"), p = r.includes("anyOf"), h = a || p, A = (h ? s[h ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((D) => f(D, c));
83
83
  return a ? !A.includes(!1) : A.includes(!0);
84
84
  }
85
- return { parseValueSchema: y };
85
+ return { parseValueSchema: g };
86
86
  }
87
- const H = {}, L = {};
88
- z();
89
- function G(t, e, i = /* @__PURE__ */ new Map(), n = (d, f, y) => f, r = {}, l = (d) => d) {
90
- return T[e.title] = e, V[e.title] = n, H[e.title] = r, L[e.title] = l, (d = {}) => {
91
- const f = x(d, e, i), y = Object.keys(t).reduce((s, o) => (s[o] = t[o].default, s), {});
92
- return Object.assign(y, f);
87
+ const L = {}, G = {};
88
+ H();
89
+ function J(t, e, i = /* @__PURE__ */ new Map(), o = (d, f, g) => f, n = {}, l = (d) => d) {
90
+ return B[e.title] = e, V[e.title] = o, L[e.title] = n, G[e.title] = l, (d = {}) => {
91
+ const f = z(d, e, i), g = Object.keys(t).reduce((s, c) => (s[c] = t[c].default, s), {});
92
+ return Object.assign(g, f);
93
93
  };
94
94
  }
95
- const O = /* @__PURE__ */ new Map([
96
- ["appearance", E],
95
+ const F = /* @__PURE__ */ new Map([
96
+ ["appearance", M],
97
97
  ["size", (t, e) => {
98
98
  const i = {};
99
99
  return e.width && (i.width = Number(e.width)), e.height && (i.height = Number(e.height)), i;
100
100
  }]
101
- ]), J = "https://json-schema.org/draft/2020-12/schema", Q = "https://farris-design.gitee.io/accordion.schema.json", U = "accordion", W = "A Farris Container Component", X = "object", Y = {
101
+ ]), Q = "https://json-schema.org/draft/2020-12/schema", U = "https://farris-design.gitee.io/accordion.schema.json", W = "accordion", X = "A Farris Container Component", Y = "object", Z = {
102
102
  id: {
103
103
  description: "The unique identifier for a Accordion",
104
104
  type: "string"
@@ -154,23 +154,23 @@ const O = /* @__PURE__ */ new Map([
154
154
  type: "boolean",
155
155
  default: !1
156
156
  }
157
- }, Z = [
157
+ }, _ = [
158
158
  "id",
159
159
  "type",
160
160
  "contents"
161
- ], _ = {
162
- $schema: J,
163
- $id: Q,
164
- title: U,
165
- description: W,
166
- type: X,
167
- properties: Y,
168
- required: Z
161
+ ], K = {
162
+ $schema: Q,
163
+ $id: U,
164
+ title: W,
165
+ description: X,
166
+ type: Y,
167
+ properties: Z,
168
+ required: _
169
169
  };
170
- function K(t, e, i) {
170
+ function ee(t, e, i) {
171
171
  return e;
172
172
  }
173
- const ee = "accordion", te = "A Farris Component", ne = "object", se = {
173
+ const te = "accordion", ne = "A Farris Component", se = "object", oe = {
174
174
  basic: {
175
175
  description: "Basic Infomation",
176
176
  title: "基本信息",
@@ -192,18 +192,18 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
192
192
  }
193
193
  }
194
194
  }
195
- }, oe = {
196
- title: ee,
197
- description: te,
198
- type: ne,
199
- categories: se
195
+ }, re = {
196
+ title: te,
197
+ description: ne,
198
+ type: se,
199
+ categories: oe
200
200
  }, j = {
201
201
  customClass: { type: String, default: "" },
202
202
  height: { type: Number },
203
203
  width: { type: Number },
204
204
  enableFold: { type: Boolean, default: !0 },
205
205
  expanded: { type: Boolean, default: !1 }
206
- }, N = G(j, _, O, K, oe), v = /* @__PURE__ */ C({
206
+ }, N = J(j, K, F, ee, re), b = /* @__PURE__ */ C({
207
207
  name: "FAccordion",
208
208
  props: j,
209
209
  emits: [],
@@ -211,19 +211,23 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
211
211
  const i = m(() => ({
212
212
  height: t.height ? `${t.height}px` : "",
213
213
  width: t.width ? `${t.width}px` : ""
214
- })), n = m(() => {
215
- const r = t.customClass.split(" "), l = {
214
+ }));
215
+ E("accordionContext", {
216
+ parentProps: t
217
+ });
218
+ const o = m(() => {
219
+ const n = t.customClass.split(" "), l = {
216
220
  "farris-panel": !0,
217
221
  accordion: !0
218
222
  };
219
- return r.reduce((d, f) => (d[f] = !0, d), l), l;
223
+ return n.reduce((d, f) => (d[f] = !0, d), l), l;
220
224
  });
221
225
  return () => u("div", {
222
- class: n.value,
226
+ class: o.value,
223
227
  style: i.value
224
228
  }, [e.slots.default && e.slots.default()]);
225
229
  }
226
- }), re = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-design.gitee.io/accordion-item.schema.json", ce = "AccordionItem", ae = "A Farris Container Component", le = "object", ue = {
230
+ }), ie = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/accordion-item.schema.json", ae = "AccordionItem", le = "A Farris Container Component", ue = "object", de = {
227
231
  id: {
228
232
  description: "The unique identifier for a Accordion Item",
229
233
  type: "string"
@@ -260,72 +264,76 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
260
264
  type: "boolean",
261
265
  default: !1
262
266
  }
263
- }, de = [
267
+ }, pe = [
264
268
  "id",
265
269
  "type",
266
270
  "contents"
267
- ], pe = {
268
- $schema: re,
269
- $id: ie,
270
- title: ce,
271
- description: ae,
272
- type: le,
273
- properties: ue,
274
- required: de
271
+ ], fe = {
272
+ $schema: ie,
273
+ $id: ce,
274
+ title: ae,
275
+ description: le,
276
+ type: ue,
277
+ properties: de,
278
+ required: pe
275
279
  }, w = {
276
280
  width: { type: Number },
277
281
  height: { type: Number, default: 100 },
278
282
  title: { type: String, default: "" },
279
283
  disabled: { type: Boolean, default: !1 },
280
284
  active: { type: Boolean, default: !1 }
281
- }, F = R(w, pe, O), $ = /* @__PURE__ */ C({
285
+ }, k = S(w, fe, F), $ = /* @__PURE__ */ C({
282
286
  name: "FAccordionItem",
283
287
  props: w,
284
288
  emits: [],
285
289
  setup(t, e) {
286
- const i = g(t.title), n = g(t.active);
287
- function r() {
288
- t.disabled || (n.value = !n.value);
290
+ const i = I("accordionContext"), o = y(t.title), n = y(t.active);
291
+ function l() {
292
+ var r;
293
+ t.disabled || !((r = i == null ? void 0 : i.parentProps) != null && r.enableFold) || (n.value = !n.value);
289
294
  }
290
- function l(o) {
291
- r();
295
+ function d(r) {
296
+ l();
292
297
  }
293
- const d = m(() => ({
298
+ const f = m(() => ({
294
299
  "f-state-disabled": t.disabled,
295
300
  card: !0,
296
301
  "farris-panel-item": !0,
297
302
  "f-state-selected": n.value
298
- })), f = m(() => !0), y = m(() => ({
303
+ })), g = m(() => !0), s = m(() => ({
299
304
  "f-icon": !0,
300
305
  "f-accordion-collapse": !n.value,
301
306
  "f-accordion-expand": n.value
302
- })), s = m(() => {
303
- const o = {
307
+ })), c = m(() => {
308
+ const r = {
304
309
  transition: "height 0.36s ease 0s",
305
310
  height: n.value ? `${t.height}px` : 0
306
311
  };
307
- return n.value || (o.overflow = "hidden"), o;
312
+ return n.value || (r.overflow = "hidden"), r;
308
313
  });
309
- return () => u("div", {
310
- class: d.value
314
+ return O(() => {
315
+ var r;
316
+ (r = i == null ? void 0 : i.parentProps) != null && r.expanded && (n.value = !0);
317
+ }), () => u("div", {
318
+ class: f.value
311
319
  }, [u("div", {
312
320
  class: "card-header",
313
- onClick: l
321
+ onClick: d
314
322
  }, [u("div", {
315
323
  class: "panel-item-title"
316
- }, [f.value && u("span", null, [i.value]), e.slots.head && e.slots.head(), u("span", {
317
- class: y.value
324
+ }, [g.value && u("span", null, [o.value]), e.slots.head && e.slots.head(), u("span", {
325
+ class: s.value
318
326
  }, null)]), u("div", {
319
327
  class: "panel-item-tool"
320
328
  }, [e.slots.toolbar && e.slots.toolbar()]), u("div", {
321
329
  class: "panel-item-clear"
322
330
  }, null)]), u("div", {
323
- style: s.value
331
+ style: c.value
324
332
  }, [u("div", {
325
333
  class: "card-body"
326
334
  }, [e.slots.default && e.slots.default()])])]);
327
335
  }
328
- }), fe = /* @__PURE__ */ C({
336
+ }), me = /* @__PURE__ */ C({
329
337
  name: "FAccordionDesign",
330
338
  props: j,
331
339
  emits: [],
@@ -333,48 +341,48 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
333
341
  const i = m(() => ({
334
342
  height: t.height ? `${t.height}px` : "",
335
343
  width: t.width ? `${t.width}px` : ""
336
- })), n = m(() => {
337
- const f = t.customClass.split(" "), y = {
344
+ })), o = m(() => {
345
+ const f = t.customClass.split(" "), g = {
338
346
  "farris-panel": !0,
339
347
  accordion: !0
340
348
  };
341
- return f.reduce((s, o) => (s[o] = !0, s), y), y;
342
- }), r = g(), l = k("design-item-context"), d = M(r, l);
343
- return D(() => {
344
- r.value.componentInstance = d;
349
+ return f.reduce((s, c) => (s[c] = !0, s), g), g;
350
+ }), n = y(), l = I("design-item-context"), d = T(n, l);
351
+ return O(() => {
352
+ n.value.componentInstance = d;
345
353
  }), e.expose(d.value), () => u("div", {
346
- ref: r,
347
- class: n.value,
354
+ ref: n,
355
+ class: o.value,
348
356
  style: i.value
349
357
  }, [e.slots.default && e.slots.default()]);
350
358
  }
351
- }), me = /* @__PURE__ */ C({
359
+ }), he = /* @__PURE__ */ C({
352
360
  name: "FAccordionItemDesign",
353
361
  props: w,
354
362
  emits: [],
355
363
  setup(t, e) {
356
- const i = g(t.title), n = g(!1), r = g(!1);
364
+ const i = y(t.title), o = y(!1), n = y(!1);
357
365
  function l() {
358
- n.value = !n.value;
366
+ o.value = !o.value;
359
367
  }
360
- function d(b) {
368
+ function d(v) {
361
369
  l();
362
370
  }
363
371
  const f = m(() => ({
364
- "f-state-disable": r.value,
372
+ "f-state-disable": n.value,
365
373
  card: !0,
366
374
  "farris-panel-item": !0,
367
- "f-state-selected": n.value
368
- })), y = m(() => !0), s = m(() => !1), o = m(() => ({
375
+ "f-state-selected": o.value
376
+ })), g = m(() => !0), s = m(() => !1), c = m(() => ({
369
377
  "f-icon": !0,
370
- "f-accordion-collapse": !n.value,
371
- "f-accordion-expand": n.value
372
- })), c = m(() => {
373
- const b = {
378
+ "f-accordion-collapse": !o.value,
379
+ "f-accordion-expand": o.value
380
+ })), r = m(() => {
381
+ const v = {
374
382
  transition: "height 0.36s ease 0s",
375
- height: n.value ? `${t.height}px` : 0
383
+ height: o.value ? `${t.height}px` : 0
376
384
  };
377
- return n.value || (b.overflow = "hidden"), b;
385
+ return o.value || (v.overflow = "hidden"), v;
378
386
  });
379
387
  function a() {
380
388
  return !0;
@@ -397,34 +405,34 @@ const ee = "accordion", te = "A Farris Component", ne = "object", se = {
397
405
  onClick: d
398
406
  }, [u("div", {
399
407
  class: "panel-item-title"
400
- }, [y.value && u("span", null, [i.value]), s.value && e.slots.head && e.slots.head(), u("span", {
401
- class: o.value
408
+ }, [g.value && u("span", null, [i.value]), s.value && e.slots.head && e.slots.head(), u("span", {
409
+ class: c.value
402
410
  }, null)]), u("div", {
403
411
  class: "panel-item-tool"
404
412
  }, [e.slots.toolbar && e.slots.toolbar()]), u("div", {
405
413
  class: "panel-item-clear"
406
414
  }, null)]), u("div", {
407
- style: c.value
415
+ style: r.value
408
416
  }, [u("div", {
409
417
  class: "card-body drag-container"
410
418
  }, [e.slots.default && e.slots.default()])])]);
411
419
  }
412
420
  });
413
- v.install = (t) => {
414
- t.component(v.name, v), t.component($.name, $);
421
+ b.install = (t) => {
422
+ t.component(b.name, b), t.component($.name, $);
415
423
  };
416
- v.register = (t, e, i, n) => {
417
- t.accordion = v, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] = F;
424
+ b.register = (t, e, i, o) => {
425
+ t.accordion = b, t["accordion-item"] = $, e.accordion = N, e["accordion-item"] = k;
418
426
  };
419
- v.registerDesigner = (t, e, i) => {
420
- t.accordion = fe, t["accordion-item"] = me, e.accordion = N, e["accordion-item"] = F;
427
+ b.registerDesigner = (t, e, i) => {
428
+ t.accordion = me, t["accordion-item"] = he, e.accordion = N, e["accordion-item"] = k;
421
429
  };
422
430
  export {
423
- v as FAccordion,
431
+ b as FAccordion,
424
432
  $ as FAccordionItem,
425
433
  w as accordionItemProps,
426
- F as accordionItemPropsResolver,
434
+ k as accordionItemPropsResolver,
427
435
  j as accordionProps,
428
436
  N as accordionPropsResolver,
429
- v as default
437
+ b as default
430
438
  };