@farris/ui-vue 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/components/accordion/index.esm.js +129 -129
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +166 -157
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.esm.js +343 -325
  8. package/components/button-edit/index.umd.cjs +1 -0
  9. package/components/button-group/index.umd.cjs +1 -0
  10. package/components/calculator/index.umd.cjs +1 -0
  11. package/components/calendar/index.esm.js +338 -338
  12. package/components/calendar/index.umd.cjs +1 -0
  13. package/components/capsule/index.esm.js +182 -182
  14. package/components/capsule/index.umd.cjs +1 -0
  15. package/components/checkbox/index.esm.js +326 -317
  16. package/components/checkbox/index.umd.cjs +1 -0
  17. package/components/color-picker/index.esm.js +118 -118
  18. package/components/color-picker/index.umd.cjs +3 -0
  19. package/components/combo-list/index.esm.js +338 -325
  20. package/components/combo-list/index.umd.cjs +1 -0
  21. package/components/combo-tree/index.esm.js +62 -62
  22. package/components/combo-tree/index.umd.cjs +1 -0
  23. package/components/common/index.umd.cjs +1 -0
  24. package/components/component/index.esm.js +382 -270
  25. package/components/component/index.umd.cjs +1 -0
  26. package/components/condition/index.esm.js +1018 -895
  27. package/components/condition/index.umd.cjs +1 -0
  28. package/components/content-container/index.esm.js +285 -212
  29. package/components/content-container/index.umd.cjs +1 -0
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +4761 -4319
  32. package/components/data-grid/index.umd.cjs +1 -0
  33. package/components/data-view/index.esm.js +2901 -2664
  34. package/components/data-view/index.umd.cjs +1 -0
  35. package/components/date-picker/index.esm.js +1502 -1488
  36. package/components/date-picker/index.umd.cjs +1 -0
  37. package/components/designer-canvas/index.css +1 -1
  38. package/components/designer-canvas/index.esm.js +938 -928
  39. package/components/designer-canvas/index.umd.cjs +1 -0
  40. package/components/designer-outline/index.css +1 -1
  41. package/components/designer-outline/index.esm.js +27 -27
  42. package/components/designer-outline/index.umd.cjs +1 -0
  43. package/components/designer-toolbox/index.esm.js +36 -12
  44. package/components/designer-toolbox/index.umd.cjs +1 -0
  45. package/components/discussion-editor/index.umd.cjs +3 -0
  46. package/components/discussion-list/index.umd.cjs +1 -0
  47. package/components/drawer/index.umd.cjs +1 -0
  48. package/components/dropdown/index.esm.js +241 -241
  49. package/components/dropdown/index.umd.cjs +2 -0
  50. package/components/dynamic-form/index.esm.js +1074 -885
  51. package/components/dynamic-form/index.umd.cjs +1 -0
  52. package/components/dynamic-resolver/index.esm.js +99 -94
  53. package/components/dynamic-resolver/index.umd.cjs +1 -0
  54. package/components/dynamic-view/index.umd.cjs +1 -0
  55. package/components/enum-editor/index.umd.cjs +1 -0
  56. package/components/events-editor/index.esm.js +577 -522
  57. package/components/events-editor/index.umd.cjs +1 -0
  58. package/components/expression-editor/index.esm.js +70 -70
  59. package/components/expression-editor/index.umd.cjs +1 -0
  60. package/components/external-container/index.css +1 -1
  61. package/components/external-container/index.esm.js +2938 -2619
  62. package/components/external-container/index.umd.cjs +1 -0
  63. package/components/field-selector/index.css +1 -1
  64. package/components/field-selector/index.esm.js +4766 -4325
  65. package/components/field-selector/index.umd.cjs +1 -0
  66. package/components/filter-bar/index.css +1 -1
  67. package/components/filter-bar/index.esm.js +1231 -1215
  68. package/components/filter-bar/index.umd.cjs +1 -0
  69. package/components/flow-canvas/index.css +1 -1
  70. package/components/flow-canvas/index.esm.js +1062 -1052
  71. package/components/flow-canvas/index.umd.cjs +1 -0
  72. package/components/image-cropper/index.esm.js +373 -373
  73. package/components/image-cropper/index.umd.cjs +1 -0
  74. package/components/input-group/index.esm.js +398 -394
  75. package/components/input-group/index.umd.cjs +1 -0
  76. package/components/layout/index.esm.js +268 -268
  77. package/components/layout/index.umd.cjs +1 -0
  78. package/components/list-nav/index.esm.js +234 -161
  79. package/components/list-nav/index.umd.cjs +1 -0
  80. package/components/list-view/index.css +1 -1
  81. package/components/list-view/index.esm.js +2288 -2048
  82. package/components/list-view/index.umd.cjs +1 -0
  83. package/components/loading/index.umd.cjs +8 -0
  84. package/components/locale/index.umd.cjs +1 -0
  85. package/components/lookup/index.css +1 -1
  86. package/components/lookup/index.esm.js +5776 -5305
  87. package/components/lookup/index.umd.cjs +1 -0
  88. package/components/mapping-editor/index.css +1 -1
  89. package/components/mapping-editor/index.esm.js +5496 -5036
  90. package/components/mapping-editor/index.umd.cjs +1 -0
  91. package/components/message-box/index.umd.cjs +1 -0
  92. package/components/modal/index.umd.cjs +1 -0
  93. package/components/nav/index.esm.js +383 -322
  94. package/components/nav/index.umd.cjs +3 -0
  95. package/components/notify/index.umd.cjs +1 -0
  96. package/components/number-range/index.esm.js +273 -269
  97. package/components/number-range/index.umd.cjs +1 -0
  98. package/components/number-spinner/index.esm.js +292 -283
  99. package/components/number-spinner/index.umd.cjs +1 -0
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1008 -925
  102. package/components/order/index.umd.cjs +1 -0
  103. package/components/page-footer/index.esm.js +98 -98
  104. package/components/page-footer/index.umd.cjs +1 -0
  105. package/components/page-header/index.esm.js +949 -847
  106. package/components/page-header/index.umd.cjs +1 -0
  107. package/components/pagination/index.esm.js +464 -403
  108. package/components/pagination/index.umd.cjs +1 -0
  109. package/components/popover/index.umd.cjs +1 -0
  110. package/components/progress/index.esm.js +226 -226
  111. package/components/progress/index.umd.cjs +3 -0
  112. package/components/property-editor/index.esm.js +1110 -1092
  113. package/components/property-editor/index.umd.cjs +3 -0
  114. package/components/property-panel/index.esm.js +520 -513
  115. package/components/property-panel/index.umd.cjs +1 -0
  116. package/components/query-solution/index.css +1 -1
  117. package/components/query-solution/index.esm.js +1714 -1575
  118. package/components/query-solution/index.umd.cjs +1 -0
  119. package/components/radio-button/index.esm.js +67 -67
  120. package/components/radio-button/index.umd.cjs +1 -0
  121. package/components/radio-group/index.esm.js +298 -289
  122. package/components/radio-group/index.umd.cjs +1 -0
  123. package/components/rate/index.esm.js +195 -190
  124. package/components/rate/index.umd.cjs +1 -0
  125. package/components/response-layout/index.esm.js +112 -112
  126. package/components/response-layout/index.umd.cjs +1 -0
  127. package/components/response-layout-editor/index.esm.js +902 -877
  128. package/components/response-layout-editor/index.umd.cjs +1 -0
  129. package/components/response-toolbar/index.esm.js +874 -778
  130. package/components/response-toolbar/index.umd.cjs +1 -0
  131. package/components/schema-selector/index.css +1 -1
  132. package/components/schema-selector/index.esm.js +4594 -4289
  133. package/components/schema-selector/index.umd.cjs +8 -0
  134. package/components/search-box/index.esm.js +126 -126
  135. package/components/search-box/index.umd.cjs +1 -0
  136. package/components/section/index.esm.js +645 -503
  137. package/components/section/index.umd.cjs +1 -0
  138. package/components/smoke-detector/index.esm.js +120 -120
  139. package/components/smoke-detector/index.umd.cjs +1 -0
  140. package/components/spacing-editor/index.umd.cjs +1 -0
  141. package/components/splitter/index.esm.js +421 -348
  142. package/components/splitter/index.umd.cjs +1 -0
  143. package/components/step/index.esm.js +219 -219
  144. package/components/step/index.umd.cjs +1 -0
  145. package/components/switch/index.esm.js +232 -222
  146. package/components/switch/index.umd.cjs +1 -0
  147. package/components/tabs/index.esm.js +1823 -1744
  148. package/components/tabs/index.umd.cjs +1 -0
  149. package/components/tags/index.esm.js +399 -401
  150. package/components/tags/index.umd.cjs +1 -0
  151. package/components/text/index.esm.js +164 -164
  152. package/components/text/index.umd.cjs +1 -0
  153. package/components/textarea/index.esm.js +220 -215
  154. package/components/textarea/index.umd.cjs +1 -0
  155. package/components/time-picker/index.esm.js +693 -666
  156. package/components/time-picker/index.umd.cjs +1 -0
  157. package/components/tooltip/index.umd.cjs +1 -0
  158. package/components/transfer/index.css +1 -1
  159. package/components/transfer/index.esm.js +422 -413
  160. package/components/transfer/index.umd.cjs +1 -0
  161. package/components/tree-grid/index.css +1 -1
  162. package/components/tree-grid/index.esm.js +4799 -4358
  163. package/components/tree-grid/index.umd.cjs +1 -0
  164. package/components/tree-view/index.esm.js +2448 -2215
  165. package/components/tree-view/index.umd.cjs +1 -0
  166. package/components/uploader/index.esm.js +164 -164
  167. package/components/uploader/index.umd.cjs +2 -0
  168. package/components/verify-detail/index.esm.js +143 -143
  169. package/components/verify-detail/index.umd.cjs +1 -0
  170. package/components/video/index.esm.js +410 -331
  171. package/components/video/index.umd.cjs +1 -0
  172. package/components/weather/index.esm.js +901 -901
  173. package/components/weather/index.umd.cjs +16 -0
  174. package/farris.all.esm.js +12305 -11403
  175. package/farris.all.umd.cjs +8 -8
  176. package/index.css +1 -1
  177. package/package.json +1 -1
  178. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  179. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  180. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  181. package/types/common/entity/entity-schema.d.ts +258 -0
  182. package/types/component/src/component-ref.props.d.ts +4 -0
  183. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  184. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  185. package/types/data-grid/index.d.ts +5 -2
  186. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  189. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  190. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  191. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  192. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  193. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  194. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  195. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  196. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  197. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  198. package/types/data-view/composition/types.d.ts +18 -6
  199. package/types/data-view/composition/use-edit.d.ts +2 -1
  200. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  201. package/types/designer-canvas/src/types.d.ts +2 -2
  202. package/types/dynamic-form/index.d.ts +2 -1
  203. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  204. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  205. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  206. package/types/dynamic-resolver/src/types.d.ts +3 -2
  207. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  208. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  209. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  210. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  211. package/types/tabs/src/composition/types.d.ts +2 -2
  212. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  213. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  214. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  215. package/types/tags/index.d.ts +36 -5
@@ -1,108 +1,108 @@
1
- import { ref as S, onMounted as _, defineComponent as W, createVNode as m, withDirectives as L, vShow as z, Teleport as Q, Fragment as Y, inject as U } from "vue";
1
+ import { ref as v, onMounted as _, defineComponent as W, createVNode as y, withDirectives as A, vShow as z, Teleport as Q, Fragment as Y, inject as U } from "vue";
2
2
  import { cloneDeep as P } from "lodash-es";
3
3
  const J = {}, Z = {};
4
4
  function C(e) {
5
- const { properties: t, title: a } = e, o = Object.keys(t).reduce((s, d) => (s[d] = t[d].type === "object" && t[d].properties ? C(t[d]) : P(t[d].default), s), {});
6
- return o.id = `${a}-${Date.now()}`, o;
5
+ const { properties: t, title: l, ignore: o } = e, i = o && Array.isArray(o), f = Object.keys(t).reduce((m, a) => ((!i || !o.find((B) => B == a)) && (m[a] = t[a].type === "object" && t[a].properties ? C(t[a]) : P(t[a].default)), m), {});
6
+ return (!i || !o.find((m) => m == "id")) && (f.id = `${l}-${Date.now()}`), f;
7
7
  }
8
- function M(e, t = {}) {
9
- const a = J[e];
10
- if (a) {
11
- let o = C(a);
12
- const s = Z[e];
13
- return o = s ? s({ getSchemaByType: M }, o, t) : o, o;
8
+ function M(e, t = {}, l) {
9
+ const o = J[e];
10
+ if (o) {
11
+ let i = C(o);
12
+ const f = Z[e];
13
+ return i = f ? f({ getSchemaByType: M }, i, t, l) : i, i;
14
14
  }
15
15
  return null;
16
16
  }
17
17
  function K(e, t) {
18
- const a = C(t);
19
- return Object.keys(e).reduce((o, s) => (o[s] && typeof o[s] == "object" ? Object.assign(o[s], e[s]) : o[s] = e[s], o), a), a;
18
+ const l = C(t);
19
+ return Object.keys(e).reduce((o, i) => (o[i] && typeof o[i] == "object" ? Object.assign(o[i], e[i]) : o[i] = e[i], o), l), l;
20
20
  }
21
21
  function I(e, t) {
22
- return Object.keys(e).filter((o) => e[o] != null).reduce((o, s) => {
23
- if (t.has(s)) {
24
- const d = t.get(s);
25
- if (typeof d == "string")
26
- o[d] = e[s];
22
+ return Object.keys(e).filter((o) => e[o] != null).reduce((o, i) => {
23
+ if (t.has(i)) {
24
+ const f = t.get(i);
25
+ if (typeof f == "string")
26
+ o[f] = e[i];
27
27
  else {
28
- const g = d(s, e[s], e);
29
- Object.assign(o, g);
28
+ const m = f(i, e[i], e);
29
+ Object.assign(o, m);
30
30
  }
31
31
  } else
32
- o[s] = e[s];
32
+ o[i] = e[i];
33
33
  return o;
34
34
  }, {});
35
35
  }
36
- function ee(e, t, a = /* @__PURE__ */ new Map()) {
36
+ function ee(e, t, l = /* @__PURE__ */ new Map()) {
37
37
  const o = K(e, t);
38
- return I(o, a);
38
+ return I(o, l);
39
39
  }
40
40
  function te(e = {}) {
41
- function t(i, l, r, u) {
42
- if (typeof r == "number")
43
- return u[i].length === r;
44
- if (typeof r == "object") {
45
- const b = Object.keys(r)[0], y = r[b];
41
+ function t(r, c, s, d) {
42
+ if (typeof s == "number")
43
+ return d[r].length === s;
44
+ if (typeof s == "object") {
45
+ const b = Object.keys(s)[0], g = s[b];
46
46
  if (b === "not")
47
- return Number(u[i].length) !== Number(y);
47
+ return Number(d[r].length) !== Number(g);
48
48
  if (b === "moreThan")
49
- return Number(u[i].length) >= Number(y);
49
+ return Number(d[r].length) >= Number(g);
50
50
  if (b === "lessThan")
51
- return Number(u[i].length) <= Number(y);
51
+ return Number(d[r].length) <= Number(g);
52
52
  }
53
53
  return !1;
54
54
  }
55
- function a(i, l, r, u) {
56
- return u[i] && u[i].propertyValue && String(u[i].propertyValue.value) === String(r);
55
+ function l(r, c, s, d) {
56
+ return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(s);
57
57
  }
58
58
  const o = /* @__PURE__ */ new Map([
59
59
  ["length", t],
60
- ["getProperty", a]
60
+ ["getProperty", l]
61
61
  ]);
62
- Object.keys(e).reduce((i, l) => (i.set(l, e[l]), i), o);
63
- function s(i, l) {
64
- const r = i;
65
- return typeof l == "number" ? [{ target: r, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: r, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
66
- if (u === "length")
67
- return { target: r, operator: "length", param: null, value: l[u] };
68
- const b = u, y = l[u];
69
- return { target: r, operator: "getProperty", param: b, value: y };
62
+ Object.keys(e).reduce((r, c) => (r.set(c, e[c]), r), o);
63
+ function i(r, c) {
64
+ const s = r;
65
+ return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: r, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
66
+ if (d === "length")
67
+ return { target: s, operator: "length", param: null, value: c[d] };
68
+ const b = d, g = c[d];
69
+ return { target: s, operator: "getProperty", param: b, value: g };
70
70
  }) : [];
71
71
  }
72
- function d(i) {
73
- return Object.keys(i).reduce((r, u) => {
74
- const b = s(u, i[u]);
75
- return r.push(...b), r;
72
+ function f(r) {
73
+ return Object.keys(r).reduce((s, d) => {
74
+ const b = i(d, r[d]);
75
+ return s.push(...b), s;
76
76
  }, []);
77
77
  }
78
- function g(i, l) {
79
- if (o.has(i.operator)) {
80
- const r = o.get(i.operator);
81
- return r && r(i.target, i.param, i.value, l) || !1;
78
+ function m(r, c) {
79
+ if (o.has(r.operator)) {
80
+ const s = o.get(r.operator);
81
+ return s && s(r.target, r.param, r.value, c) || !1;
82
82
  }
83
83
  return !1;
84
84
  }
85
- function p(i, l) {
86
- return d(i).reduce((b, y) => b && g(y, l), !0);
85
+ function a(r, c) {
86
+ return f(r).reduce((b, g) => b && m(g, c), !0);
87
87
  }
88
- function k(i, l) {
89
- const r = Object.keys(i), u = r.includes("allOf"), b = r.includes("anyOf"), y = u || b, c = (y ? i[y ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((B) => p(B, l));
90
- return u ? !c.includes(!1) : c.includes(!0);
88
+ function B(r, c) {
89
+ const s = Object.keys(r), d = s.includes("allOf"), b = s.includes("anyOf"), g = d || b, u = (g ? r[g ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((k) => a(k, c));
90
+ return d ? !u.includes(!1) : u.includes(!0);
91
91
  }
92
- return { parseValueSchema: k };
92
+ return { parseValueSchema: B };
93
93
  }
94
94
  const ne = {}, oe = {};
95
95
  te();
96
- function ie(e, t, a = /* @__PURE__ */ new Map(), o = (g, p, k) => p, s = {}, d = (g) => g) {
97
- return J[t.title] = t, Z[t.title] = o, ne[t.title] = s, oe[t.title] = d, (g = {}) => {
98
- const p = ee(g, t, a), k = Object.keys(e).reduce((i, l) => (i[l] = e[l].default, i), {});
99
- return Object.assign(k, p);
96
+ function ie(e, t, l = /* @__PURE__ */ new Map(), o = (m, a, B) => a, i = {}, f = (m) => m) {
97
+ return J[t.title] = t, Z[t.title] = o, ne[t.title] = i, oe[t.title] = f, (m = {}) => {
98
+ const a = ee(m, t, l), B = Object.keys(e).reduce((r, c) => (r[c] = e[c].default, r), {});
99
+ return Object.assign(B, a);
100
100
  };
101
101
  }
102
102
  function re(e, t) {
103
103
  return { customClass: t.class, customStyle: t.style };
104
104
  }
105
- function se(e, t, a) {
105
+ function se(e, t, l) {
106
106
  return t;
107
107
  }
108
108
  const ae = /* @__PURE__ */ new Map([
@@ -270,12 +270,12 @@ const ae = /* @__PURE__ */ new Map([
270
270
  } }
271
271
  }, X = ie(V, ye, ae, se, ve);
272
272
  function x(e, t) {
273
- let a;
274
- const o = S(e.show), s = S(), d = S(), g = S(), p = 10;
273
+ let l;
274
+ const o = v(e.show), i = v(), f = v(), m = v(), a = 10;
275
275
  _(() => {
276
- a = d.value;
276
+ l = f.value;
277
277
  });
278
- const k = (c = 1) => {
278
+ const B = (u = 1) => {
279
279
  const n = [
280
280
  "body>.f-datagrid-settings-simple-host",
281
281
  "body>div",
@@ -286,71 +286,71 @@ function x(e, t) {
286
286
  "body>.popover.show",
287
287
  "body>filter-row-panel>.f-datagrid-filter-panel",
288
288
  "body>.f-section-maximize"
289
- ], B = Array.from(document.body.querySelectorAll(n.join(","))).filter((h) => h).map((h) => {
290
- const { display: f, zIndex: w } = window.getComputedStyle(h);
291
- return f === "none" ? 0 : parseInt(w, 10);
292
- }).filter((h) => h);
293
- let D = Math.max(...B);
294
- return D < 1040 && (D = 1040), D + c;
295
- }, i = (c, n) => {
289
+ ], k = Array.from(document.body.querySelectorAll(n.join(","))).filter((w) => w).map((w) => {
290
+ const { display: p, zIndex: h } = window.getComputedStyle(w);
291
+ return p === "none" ? 0 : parseInt(h, 10);
292
+ }).filter((w) => w);
293
+ let S = Math.max(...k);
294
+ return S < 1040 && (S = 1040), S + u;
295
+ }, r = (u, n) => {
296
296
  const {
297
- height: B,
298
- left: D,
299
- top: h,
300
- width: f
301
- } = c.getBoundingClientRect(), { width: w, height: v, top: j } = n.getBoundingClientRect();
302
- if (c.className.indexOf("dropdown-submenu") > -1 || c.closest(".dropdown-submenu") || c.classList.contains("dropright")) {
303
- const E = window.innerWidth - D - c.offsetWidth, N = window.innerHeight - h, { position: O } = getComputedStyle(n);
304
- if (O === "fixed") {
305
- let T = D + c.offsetWidth;
306
- n.offsetWidth > E && D > E && (T = D - w), n.style.left = T + "px", n.style.right = "auto", window.innerHeight - 2 * p < n.offsetHeight ? (n.style.top = p + "px", n.style.bottom = p + "px", n.style.maxHeight = window.innerHeight - 2 * p + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : N < n.offsetHeight ? (n.style.top = "auto", n.style.bottom = p + "px") : (n.style.top = h + "px", n.style.bottom = "auto");
297
+ height: k,
298
+ left: S,
299
+ top: w,
300
+ width: p
301
+ } = u.getBoundingClientRect(), { width: h, height: D, top: $ } = n.getBoundingClientRect();
302
+ if (u.className.indexOf("dropdown-submenu") > -1 || u.closest(".dropdown-submenu") || u.classList.contains("dropright")) {
303
+ const E = window.innerWidth - S - u.offsetWidth, O = window.innerHeight - w, { position: j } = getComputedStyle(n);
304
+ if (j === "fixed") {
305
+ let H = S + u.offsetWidth;
306
+ n.offsetWidth > E && S > E && (H = S - h), n.style.left = H + "px", n.style.right = "auto", window.innerHeight - 2 * a < n.offsetHeight ? (n.style.top = a + "px", n.style.bottom = a + "px", n.style.maxHeight = window.innerHeight - 2 * a + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : O < n.offsetHeight ? (n.style.top = "auto", n.style.bottom = a + "px") : (n.style.top = w + "px", n.style.bottom = "auto");
307
307
  } else {
308
308
  if (n.offsetWidth > E) {
309
- const T = -w;
310
- n.style.left = T + "px";
309
+ const H = -h;
310
+ n.style.left = H + "px";
311
311
  }
312
- window.innerHeight - 2 * p < n.offsetHeight ? (n.style.top = -1 * (h - p) + "px", n.style.bottom = "auto", n.style.maxHeight = window.innerHeight - 2 * p + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : N < n.offsetHeight && (n.style.top = N - n.offsetHeight - p + "px", n.style.bottom = "auto");
312
+ window.innerHeight - 2 * a < n.offsetHeight ? (n.style.top = -1 * (w - a) + "px", n.style.bottom = "auto", n.style.maxHeight = window.innerHeight - 2 * a + "px", n.style.overflowY = "auto", n.className += " dropdown-menu-maxheight") : O < n.offsetHeight && (n.style.top = O - n.offsetHeight - a + "px", n.style.bottom = "auto");
313
313
  }
314
314
  } else {
315
- const { marginTop: E, marginBottom: N } = getComputedStyle(n);
316
- let O = 0;
317
- const T = Math.ceil(parseFloat(E)) + Math.ceil(parseFloat(N));
318
- let H = h + B, q = D;
319
- window.innerHeight - H - T < v && (H = h - v, H < 0 && (window.innerHeight - h - B > h ? (H = h + B, O = window.innerHeight - H - T - p) : (H = p, O = h - H - T))), window.innerWidth - D < w && window.innerWidth - D < D + f && (q = D - w + f), document.body.append(n), n.style.cssText = `position:fixed;bottom:unset;left:${q}px
320
- !important;top:${H}px !important;right: unset;${O ? "max-height:" + O + "px;overflow-y:auto;" : ""}`, O && (n.className += " dropdown-menu-maxheight"), n.style.zIndex = k().toString();
315
+ const { marginTop: E, marginBottom: O } = getComputedStyle(n);
316
+ let j = 0;
317
+ const H = Math.ceil(parseFloat(E)) + Math.ceil(parseFloat(O));
318
+ let R = w + k, q = S;
319
+ window.innerHeight - R - H < D && (R = w - D, R < 0 && (window.innerHeight - w - k > w ? (R = w + k, j = window.innerHeight - R - H - a) : (R = a, j = w - R - H))), window.innerWidth - S < h && window.innerWidth - S < S + p && (q = S - h + p), document.body.append(n), n.style.cssText = `position:fixed;bottom:unset;left:${q}px
320
+ !important;top:${R}px !important;right: unset;${j ? "max-height:" + j + "px;overflow-y:auto;" : ""}`, j && (n.className += " dropdown-menu-maxheight"), n.style.zIndex = B().toString();
321
321
  }
322
- }, l = () => {
323
- i(s.value, d.value);
324
- }, r = () => {
325
- e.hover || (o.value = !1, document.removeEventListener("click", r), a.removeEventListener("click", r), document.removeEventListener("scroll", r), a.removeEventListener("scroll", r));
322
+ }, c = () => {
323
+ r(i.value, f.value);
324
+ }, s = () => {
325
+ e.hover || (o.value = !1, document.removeEventListener("click", s), l.removeEventListener("click", s), document.removeEventListener("scroll", s), l.removeEventListener("scroll", s));
326
326
  };
327
327
  return {
328
328
  show: o,
329
- dropdownRef: s,
330
- dropdownMenuRef: d,
331
- clickEventRef: g,
332
- showDropMenu: (c) => {
333
- e.hover || e.disabled || (c == null || c.stopPropagation(), o.value || setTimeout(() => {
334
- l();
335
- }), o.value = !o.value, document.addEventListener("click", r), document.addEventListener("scroll", r), e.hideOnClick || (a.addEventListener("click", (n) => {
329
+ dropdownRef: i,
330
+ dropdownMenuRef: f,
331
+ clickEventRef: m,
332
+ showDropMenu: (u) => {
333
+ e.hover || e.disabled || (u == null || u.stopPropagation(), o.value || setTimeout(() => {
334
+ c();
335
+ }), o.value = !o.value, document.addEventListener("click", s), document.addEventListener("scroll", s), e.hideOnClick || (l.addEventListener("click", (n) => {
336
336
  n.stopPropagation();
337
- }), a.addEventListener("scroll", (n) => {
337
+ }), l.addEventListener("scroll", (n) => {
338
338
  n.stopPropagation();
339
339
  })));
340
340
  },
341
- hoverDropdown: (c) => {
341
+ hoverDropdown: (u) => {
342
342
  e.hover && (o.value || setTimeout(() => {
343
343
  }), o.value = !o.value);
344
344
  },
345
345
  leftButtonClick: () => {
346
346
  },
347
- closeDropMenu: r,
348
- selectItem: (c) => {
349
- t.emit("select", c);
347
+ closeDropMenu: s,
348
+ selectItem: (u) => {
349
+ t.emit("select", u);
350
350
  },
351
- resolveSize: (c) => {
351
+ resolveSize: (u) => {
352
352
  const n = /px|em|rem|pt|%/;
353
- return n.test(c) ? `${parseInt(c, 10)}${c.match(n)[0]}` : `${c}px`;
353
+ return n.test(u) ? `${parseInt(u, 10)}${u.match(n)[0]}` : `${u}px`;
354
354
  }
355
355
  };
356
356
  }
@@ -370,15 +370,15 @@ const Se = {
370
370
  props: Se,
371
371
  emits: ["select"],
372
372
  setup(e, t) {
373
- const a = S(e.value), o = S(e.label), s = S(e.disabled), d = S(e.active), g = S(e.divide), p = () => {
374
- s.value || t.emit("select", e);
373
+ const l = v(e.value), o = v(e.label), i = v(e.disabled), f = v(e.active), m = v(e.divide), a = () => {
374
+ i.value || t.emit("select", e);
375
375
  };
376
- return () => m("div", null, [L(m("div", {
376
+ return () => y("div", null, [A(y("div", {
377
377
  class: "dropdown-divider"
378
- }, null), [[z, g.value]]), m("li", {
379
- class: `dropdown-item${d.value ? " active" : ""} ${s.value ? " disabled" : ""}`,
380
- onClick: p,
381
- title: a.value.toString()
378
+ }, null), [[z, m.value]]), y("li", {
379
+ class: `dropdown-item${f.value ? " active" : ""} ${i.value ? " disabled" : ""}`,
380
+ onClick: a,
381
+ title: l.value.toString()
382
382
  }, [o.value])]);
383
383
  }
384
384
  }), F = /* @__PURE__ */ W({
@@ -386,24 +386,24 @@ const Se = {
386
386
  props: V,
387
387
  emits: ["select"],
388
388
  setup(e, t) {
389
- const a = S(e.model), {
389
+ const l = v(e.model), {
390
390
  show: o,
391
- dropdownMenuRef: s,
392
- dropdownRef: d,
393
- clickEventRef: g,
394
- showDropMenu: p,
395
- hoverDropdown: k,
396
- leftButtonClick: i,
397
- closeDropMenu: l,
398
- selectItem: r,
399
- resolveSize: u
391
+ dropdownMenuRef: i,
392
+ dropdownRef: f,
393
+ clickEventRef: m,
394
+ showDropMenu: a,
395
+ hoverDropdown: B,
396
+ leftButtonClick: r,
397
+ closeDropMenu: c,
398
+ selectItem: s,
399
+ resolveSize: d
400
400
  } = x(e, t);
401
- function b(y) {
402
- t.emit("select", y);
401
+ function b(g) {
402
+ t.emit("select", g);
403
403
  }
404
- return () => m("div", {
405
- ref: d
406
- }, [m("div", {
404
+ return () => y("div", {
405
+ ref: f
406
+ }, [y("div", {
407
407
  class: ["farris-dropdown", "btn-group", {
408
408
  dropup: e.position === "top"
409
409
  }, {
@@ -413,7 +413,7 @@ const Se = {
413
413
  }, {
414
414
  dropright: e.position === "right"
415
415
  }]
416
- }, [e.splitButton && m("span", {
416
+ }, [e.splitButton && y("span", {
417
417
  class: ["btn", {
418
418
  "dropdown-item": e.nest
419
419
  }, {
@@ -432,9 +432,9 @@ const Se = {
432
432
  "btn-info": e.type === "info"
433
433
  }],
434
434
  style: "width:100%",
435
- onClick: i
436
- }, [e.title]), m("span", {
437
- ref: g,
435
+ onClick: r
436
+ }, [e.title]), y("span", {
437
+ ref: m,
438
438
  class: ["dropdown-toggle", {
439
439
  btn: !e.nest
440
440
  }, {
@@ -463,141 +463,141 @@ const Se = {
463
463
  disabled: e.disabled
464
464
  }],
465
465
  style: "width:100%",
466
- onClick: p,
467
- onMouseenter: k,
468
- onMouseleave: k
469
- }, [L(m("span", {
466
+ onClick: a,
467
+ onMouseenter: B,
468
+ onMouseleave: B
469
+ }, [A(y("span", {
470
470
  class: "sr-only"
471
- }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, L(m("span", {
471
+ }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, A(y("span", {
472
472
  class: `f-icon ${e.iconClass.toString()}`
473
- }, null), [[z, e.iconClass]])]), m(Q, {
473
+ }, null), [[z, e.iconClass]])]), y(Q, {
474
474
  to: "body"
475
475
  }, {
476
- default: () => [m("div", {
477
- ref: s,
476
+ default: () => [y("div", {
477
+ ref: i,
478
478
  class: `dropdown-menu${o.value ? " show" : ""}`
479
- }, [m(Y, null, [a.value.map(({
480
- label: y,
481
- value: $,
482
- disabled: R,
483
- active: c,
479
+ }, [y(Y, null, [l.value.map(({
480
+ label: g,
481
+ value: T,
482
+ disabled: N,
483
+ active: u,
484
484
  divide: n
485
- }) => m(G, {
486
- value: $.toString(),
487
- label: y,
488
- disabled: R,
489
- active: c,
485
+ }) => y(G, {
486
+ value: T.toString(),
487
+ label: g,
488
+ disabled: N,
489
+ active: u,
490
490
  divide: n,
491
- onSelect: (B) => b(B)
491
+ onSelect: (k) => b(k)
492
492
  }, null))])])]
493
493
  })])]);
494
494
  }
495
495
  });
496
- function De(e, t, a) {
497
- var h;
496
+ function De(e, t, l) {
497
+ var w;
498
498
  function o() {
499
499
  }
500
- const s = "", d = "", g = S();
501
- function p() {
500
+ const i = "", f = "", m = v();
501
+ function a() {
502
502
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
503
503
  }
504
- function k() {
504
+ function B() {
505
505
  return !1;
506
506
  }
507
- function i() {
507
+ function r() {
508
508
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
509
509
  }
510
- function l() {
510
+ function c() {
511
511
  return (t == null ? void 0 : t.schema.componentType) === "frame";
512
512
  }
513
- function r(f) {
514
- if (!f || !f.value)
513
+ function s(p) {
514
+ if (!p || !p.value)
515
515
  return null;
516
- if (f.value.schema && f.value.schema.type === "component")
517
- return f.value;
518
- const w = S(f == null ? void 0 : f.value.parent), v = r(w);
519
- return v || null;
516
+ if (p.value.schema && p.value.schema.type === "component")
517
+ return p.value;
518
+ const h = v(p == null ? void 0 : p.value.parent), D = s(h);
519
+ return D || null;
520
520
  }
521
- function u(f = t) {
522
- const { componentInstance: w, designerItemElementRef: v } = f;
523
- return !w || !w.value ? null : w.value.canMove ? v : u(f.parent);
521
+ function d(p = t) {
522
+ const { componentInstance: h, designerItemElementRef: D } = p;
523
+ return !h || !h.value ? null : h.value.canMove ? D : d(p.parent);
524
524
  }
525
- function b(f) {
526
- return !!a;
525
+ function b(p) {
526
+ return !!l;
527
527
  }
528
- function y() {
528
+ function g() {
529
529
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
530
530
  }
531
- function $() {
531
+ function T() {
532
532
  }
533
- function R(f, w) {
533
+ function N(p, h) {
534
534
  }
535
- function c(f) {
536
- const { componentType: w } = f;
537
- let v = M(w, f);
538
- const j = w.toLowerCase().replace("-", "_");
539
- return v && !v.id && v.type === w && (v.id = `${j}_${Math.random().toString().slice(2, 6)}`), v;
535
+ function u(p, h) {
536
+ const { componentType: D } = p;
537
+ let $ = M(D, p, h);
538
+ const L = D.toLowerCase().replace("-", "_");
539
+ return $ && !$.id && $.type === D && ($.id = `${L}_${Math.random().toString().slice(2, 6)}`), $;
540
540
  }
541
- function n(f, w) {
542
- const v = String(f.getAttribute("data-controltype")), j = f.getAttribute("data-feature"), A = j ? JSON.parse(j) : {};
543
- A.parentComponentInstance = g.value;
544
- let E = M(v, A);
545
- const N = v.toLowerCase().replace("-", "_");
546
- return E && !E.id && E.type === v && (E.id = `${N}_${Math.random().toString().slice(2, 6)}`), E;
541
+ function n(p, h) {
542
+ const D = String(p.getAttribute("data-controltype")), $ = p.getAttribute("data-feature"), L = $ ? JSON.parse($) : {};
543
+ L.parentComponentInstance = m.value;
544
+ let E = M(D, L);
545
+ const O = D.toLowerCase().replace("-", "_");
546
+ return E && !E.id && E.type === D && (E.id = `${O}_${Math.random().toString().slice(2, 6)}`), E;
547
547
  }
548
- function B(f) {
548
+ function k(p) {
549
549
  }
550
- function D(...f) {
550
+ function S(...p) {
551
551
  }
552
- return g.value = {
553
- canMove: p(),
554
- canSelectParent: k(),
555
- canDelete: i(),
556
- canNested: !l(),
552
+ return m.value = {
553
+ canMove: a(),
554
+ canSelectParent: B(),
555
+ canDelete: r(),
556
+ canNested: !c(),
557
557
  contents: t == null ? void 0 : t.schema.contents,
558
558
  elementRef: e,
559
- parent: (h = t == null ? void 0 : t.parent) == null ? void 0 : h.componentInstance,
559
+ parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
560
560
  schema: t == null ? void 0 : t.schema,
561
- styles: s,
562
- designerClass: d,
561
+ styles: i,
562
+ designerClass: f,
563
563
  canAccepts: b,
564
- getBelongedComponentInstance: r,
565
- getDraggableDesignItemElement: u,
566
- getDraggingDisplayText: y,
567
- getPropConfig: D,
568
- getDragScopeElement: $,
569
- onAcceptMovedChildElement: R,
564
+ getBelongedComponentInstance: s,
565
+ getDraggableDesignItemElement: d,
566
+ getDraggingDisplayText: g,
567
+ getPropConfig: S,
568
+ getDragScopeElement: T,
569
+ onAcceptMovedChildElement: N,
570
570
  onAcceptNewChildElement: n,
571
- onChildElementMovedOut: B,
572
- addNewChildComponentSchema: c,
571
+ onChildElementMovedOut: k,
572
+ addNewChildComponentSchema: u,
573
573
  updateDragAndDropRules: o,
574
- triggerBelongedComponentToMoveWhenMoved: S(!1),
575
- triggerBelongedComponentToDeleteWhenDeleted: S(!1)
576
- }, g;
574
+ triggerBelongedComponentToMoveWhenMoved: v(!1),
575
+ triggerBelongedComponentToDeleteWhenDeleted: v(!1)
576
+ }, m;
577
577
  }
578
578
  const Be = /* @__PURE__ */ W({
579
579
  name: "FDropdownDesign",
580
580
  props: V,
581
581
  emits: ["select"],
582
582
  setup(e, t) {
583
- const a = S(e.model), {
583
+ const l = v(e.model), {
584
584
  show: o,
585
- showDropMenu: s,
586
- hoverDropdown: d,
587
- leftButtonClick: g,
588
- closeDropMenu: p,
589
- selectItem: k,
590
- resolveSize: i
585
+ showDropMenu: i,
586
+ hoverDropdown: f,
587
+ leftButtonClick: m,
588
+ closeDropMenu: a,
589
+ selectItem: B,
590
+ resolveSize: r
591
591
  } = x(e, t);
592
- function l(y) {
593
- t.emit("select", y);
592
+ function c(g) {
593
+ t.emit("select", g);
594
594
  }
595
- const r = S(), u = U("design-item-context"), b = De(r, u);
595
+ const s = v(), d = U("design-item-context"), b = De(s, d);
596
596
  return _(() => {
597
- r.value.componentInstance = b;
598
- }), t.expose(b.value), () => m("div", {
599
- ref: r
600
- }, [m("div", {
597
+ s.value.componentInstance = b;
598
+ }), t.expose(b.value), () => y("div", {
599
+ ref: s
600
+ }, [y("div", {
601
601
  class: ["farris-dropdown", "btn-group", {
602
602
  dropup: e.position === "top"
603
603
  }, {
@@ -610,7 +610,7 @@ const Be = /* @__PURE__ */ W({
610
610
  style: {
611
611
  width: e.width
612
612
  }
613
- }, [e.splitButton && m("span", {
613
+ }, [e.splitButton && y("span", {
614
614
  class: ["btn", {
615
615
  "dropdown-item": e.nest
616
616
  }, {
@@ -629,8 +629,8 @@ const Be = /* @__PURE__ */ W({
629
629
  "btn-info": e.type === "info"
630
630
  }],
631
631
  style: "width:100%",
632
- onClick: g
633
- }, [e.title]), m("span", {
632
+ onClick: m
633
+ }, [e.title]), y("span", {
634
634
  class: ["dropdown-toggle", {
635
635
  btn: !e.nest
636
636
  }, {
@@ -659,38 +659,38 @@ const Be = /* @__PURE__ */ W({
659
659
  disabled: e.disabled
660
660
  }],
661
661
  style: "width:100%",
662
- onClick: s,
663
- onMouseenter: d,
664
- onMouseleave: d
665
- }, [L(m("span", {
662
+ onClick: i,
663
+ onMouseenter: f,
664
+ onMouseleave: f
665
+ }, [A(y("span", {
666
666
  class: "sr-only"
667
- }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, L(m("span", {
667
+ }, null), [[z, e.splitButton]]), e.splitButton ? "" : e.title, A(y("span", {
668
668
  class: `f-icon ${e.iconClass.toString()}`
669
- }, null), [[z, e.iconClass]])]), m("div", {
669
+ }, null), [[z, e.iconClass]])]), y("div", {
670
670
  class: `dropdown-menu${o.value ? " show" : ""}`
671
- }, [m(Y, null, [a.value.map(({
672
- label: y,
673
- value: $,
674
- disabled: R,
675
- active: c,
671
+ }, [y(Y, null, [l.value.map(({
672
+ label: g,
673
+ value: T,
674
+ disabled: N,
675
+ active: u,
676
676
  divide: n
677
- }) => m(G, {
678
- value: $.toString(),
679
- label: y,
680
- disabled: R,
681
- active: c,
677
+ }) => y(G, {
678
+ value: T.toString(),
679
+ label: g,
680
+ disabled: N,
681
+ active: u,
682
682
  divide: n,
683
- onSelect: (B) => l(B)
683
+ onSelect: (k) => c(k)
684
684
  }, null))])])])]);
685
685
  }
686
686
  }), $e = {
687
687
  install(e) {
688
688
  e.component(F.name, F);
689
689
  },
690
- register(e, t, a, o) {
690
+ register(e, t, l, o) {
691
691
  e.dropdown = F, t.dropdown = X;
692
692
  },
693
- registerDesigner(e, t, a) {
693
+ registerDesigner(e, t, l) {
694
694
  e.dropdown = Be, t.dropdown = X;
695
695
  }
696
696
  };