@farris/ui-vue 1.2.8 → 1.3.0

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 (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  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.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,56 +1,57 @@
1
- import { ref as i, defineComponent as ye, computed as P, watch as q, nextTick as ue, createVNode as b, inject as we, onMounted as De } from "vue";
2
- import { cloneDeep as Be } from "lodash-es";
3
- function Ae(t, e, v) {
1
+ import { withInstall as De } from "../common/index.esm.js";
2
+ import { ref as i, defineComponent as ye, computed as I, watch as q, nextTick as ue, createVNode as T, inject as Be, onMounted as Ae } from "vue";
3
+ import { isPlainObject as he, cloneDeep as Ce } from "lodash-es";
4
+ function Se(a, e, v) {
4
5
  return e;
5
6
  }
6
7
  const be = {}, Te = {};
7
- function fe(t) {
8
- const { properties: e, title: v } = t, g = Object.keys(e).reduce((s, h) => (s[h] = e[h].type === "object" && e[h].properties ? fe(e[h]) : Be(e[h].default), s), {});
9
- return g.id = `${v}-${Date.now()}`, g;
8
+ function fe(a) {
9
+ const { properties: e, title: v, ignore: g } = a, n = g && Array.isArray(g), h = Object.keys(e).reduce((y, w) => ((!n || !g.find((C) => C == w)) && (y[w] = e[w].type === "object" && e[w].properties ? fe(e[w]) : Ce(e[w].default)), y), {});
10
+ return (!n || !g.find((y) => y == "id")) && (h.id = `${v}-${Date.now()}`), h;
10
11
  }
11
- function ie(t, e = {}) {
12
- const v = be[t];
13
- if (v) {
14
- let g = fe(v);
15
- const s = Te[t];
16
- return g = s ? s({ getSchemaByType: ie }, g, e) : g, g;
12
+ function ie(a, e = {}, v) {
13
+ const g = be[a];
14
+ if (g) {
15
+ let n = fe(g);
16
+ const h = Te[a];
17
+ return n = h ? h({ getSchemaByType: ie }, n, e, v) : n, n;
17
18
  }
18
19
  return null;
19
20
  }
20
- function Ce(t, e) {
21
+ function Oe(a, e) {
21
22
  const v = fe(e);
22
- return Object.keys(t).reduce((g, s) => (g[s] && typeof g[s] == "object" ? Object.assign(g[s], t[s]) : g[s] = t[s], g), v), v;
23
+ return Object.keys(a).reduce((g, n) => (g[n] && he(g[n]) && he(a[n]) ? Object.assign(g[n], a[n]) : g[n] = a[n], g), v), v;
23
24
  }
24
- function Se(t, e) {
25
- return Object.keys(t).filter((g) => t[g] != null).reduce((g, s) => {
26
- if (e.has(s)) {
27
- const h = e.get(s);
25
+ function je(a, e) {
26
+ return Object.keys(a).filter((g) => a[g] != null).reduce((g, n) => {
27
+ if (e.has(n)) {
28
+ const h = e.get(n);
28
29
  if (typeof h == "string")
29
- g[h] = t[s];
30
+ g[h] = a[n];
30
31
  else {
31
- const w = h(s, t[s], t);
32
- Object.assign(g, w);
32
+ const y = h(n, a[n], a);
33
+ Object.assign(g, y);
33
34
  }
34
35
  } else
35
- g[s] = t[s];
36
+ g[n] = a[n];
36
37
  return g;
37
38
  }, {});
38
39
  }
39
- function Oe(t, e, v = /* @__PURE__ */ new Map()) {
40
- const g = Ce(t, e);
41
- return Se(g, v);
40
+ function Me(a, e, v = /* @__PURE__ */ new Map()) {
41
+ const g = Oe(a, e);
42
+ return je(g, v);
42
43
  }
43
- function je(t = {}) {
44
+ function Ee(a = {}) {
44
45
  function e(c, p, d, f) {
45
46
  if (typeof d == "number")
46
47
  return f[c].length === d;
47
48
  if (typeof d == "object") {
48
- const T = Object.keys(d)[0], D = d[T];
49
- if (T === "not")
49
+ const k = Object.keys(d)[0], D = d[k];
50
+ if (k === "not")
50
51
  return Number(f[c].length) !== Number(D);
51
- if (T === "moreThan")
52
+ if (k === "moreThan")
52
53
  return Number(f[c].length) >= Number(D);
53
- if (T === "lessThan")
54
+ if (k === "lessThan")
54
55
  return Number(f[c].length) <= Number(D);
55
56
  }
56
57
  return !1;
@@ -62,52 +63,52 @@ function je(t = {}) {
62
63
  ["length", e],
63
64
  ["getProperty", v]
64
65
  ]);
65
- Object.keys(t).reduce((c, p) => (c.set(p, t[p]), c), g);
66
- function s(c, p) {
66
+ Object.keys(a).reduce((c, p) => (c.set(p, a[p]), c), g);
67
+ function n(c, p) {
67
68
  const d = c;
68
69
  return typeof p == "number" ? [{ target: d, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: d, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
69
70
  if (f === "length")
70
71
  return { target: d, operator: "length", param: null, value: p[f] };
71
- const T = f, D = p[f];
72
- return { target: d, operator: "getProperty", param: T, value: D };
72
+ const k = f, D = p[f];
73
+ return { target: d, operator: "getProperty", param: k, value: D };
73
74
  }) : [];
74
75
  }
75
76
  function h(c) {
76
77
  return Object.keys(c).reduce((d, f) => {
77
- const T = s(f, c[f]);
78
- return d.push(...T), d;
78
+ const k = n(f, c[f]);
79
+ return d.push(...k), d;
79
80
  }, []);
80
81
  }
81
- function w(c, p) {
82
+ function y(c, p) {
82
83
  if (g.has(c.operator)) {
83
84
  const d = g.get(c.operator);
84
85
  return d && d(c.target, c.param, c.value, p) || !1;
85
86
  }
86
87
  return !1;
87
88
  }
88
- function O(c, p) {
89
- return h(c).reduce((T, D) => T && w(D, p), !0);
89
+ function w(c, p) {
90
+ return h(c).reduce((k, D) => k && y(D, p), !0);
90
91
  }
91
- function S(c, p) {
92
- const d = Object.keys(c), f = d.includes("allOf"), T = d.includes("anyOf"), D = f || T, y = (D ? c[D ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((V) => O(V, p));
93
- return f ? !y.includes(!1) : y.includes(!0);
92
+ function C(c, p) {
93
+ const d = Object.keys(c), f = d.includes("allOf"), k = d.includes("anyOf"), D = f || k, b = (D ? c[D ? f ? "allOf" : "anyOf" : "allOf"] : [c]).map((F) => w(F, p));
94
+ return f ? !b.includes(!1) : b.includes(!0);
94
95
  }
95
- return { parseValueSchema: S };
96
+ return { parseValueSchema: C };
96
97
  }
97
- const Me = {}, Ee = {};
98
- je();
99
- function Pe(t, e, v = /* @__PURE__ */ new Map(), g = (w, O, S) => O, s = {}, h = (w) => w) {
100
- return be[e.title] = e, Te[e.title] = g, Me[e.title] = s, Ee[e.title] = h, (w = {}) => {
101
- const O = Oe(w, e, v), S = Object.keys(t).reduce((c, p) => (c[p] = t[p].default, c), {});
102
- return Object.assign(S, O);
98
+ const Pe = {}, Ie = {};
99
+ Ee();
100
+ function Le(a, e, v = /* @__PURE__ */ new Map(), g = (y, w, C) => w, n = {}, h = (y) => y) {
101
+ return be[e.title] = e, Te[e.title] = g, Pe[e.title] = n, Ie[e.title] = h, (y = {}) => {
102
+ const w = Me(y, e, v), C = Object.keys(a).reduce((c, p) => (c[p] = a[p].default, c), {});
103
+ return Object.assign(C, w);
103
104
  };
104
105
  }
105
- function Re(t, e) {
106
+ function Re(a, e) {
106
107
  return { customClass: e.class, customStyle: e.style };
107
108
  }
108
- const Le = /* @__PURE__ */ new Map([
109
+ const Ne = /* @__PURE__ */ new Map([
109
110
  ["appearance", Re]
110
- ]), Ie = "tags", Ne = "A Farris Component", $e = "object", Ve = {
111
+ ]), $e = "tags", Ve = "A Farris Component", Fe = "object", We = {
111
112
  basic: {
112
113
  description: "Basic Infomation",
113
114
  title: "基本信息",
@@ -129,12 +130,12 @@ const Le = /* @__PURE__ */ new Map([
129
130
  }
130
131
  }
131
132
  }
132
- }, Fe = {
133
- title: Ie,
134
- description: Ne,
135
- type: $e,
136
- categories: Ve
137
- }, We = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/tags.schema.json", qe = "tags", He = "A Farris Component", _e = "object", Xe = {
133
+ }, xe = {
134
+ title: $e,
135
+ description: Ve,
136
+ type: Fe,
137
+ categories: We
138
+ }, qe = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-design.gitee.io/tags.schema.json", _e = "tags", Xe = "A Farris Component", Je = "object", ze = {
138
139
  id: {
139
140
  description: "The unique identifier for tags",
140
141
  type: "string"
@@ -196,17 +197,17 @@ const Le = /* @__PURE__ */ new Map([
196
197
  type: "boolean",
197
198
  default: !0
198
199
  }
199
- }, Je = [
200
+ }, Ge = [
200
201
  "id",
201
202
  "type"
202
- ], ze = {
203
- $schema: We,
204
- $id: xe,
205
- title: qe,
206
- description: He,
207
- type: _e,
208
- properties: Xe,
209
- required: Je
203
+ ], Qe = {
204
+ $schema: qe,
205
+ $id: He,
206
+ title: _e,
207
+ description: Xe,
208
+ type: Je,
209
+ properties: ze,
210
+ required: Ge
210
211
  }, de = {
211
212
  activeTag: { type: String, default: "" },
212
213
  addButtonText: { type: String, default: "" },
@@ -223,117 +224,117 @@ const Le = /* @__PURE__ */ new Map([
223
224
  wrapText: { type: Boolean, default: !1 },
224
225
  draggable: { type: Boolean, default: !1 },
225
226
  disable: { type: Boolean, default: !1 }
226
- }, he = Pe(de, ze, Le, Ae, Fe);
227
- function ke(t, e, v, g) {
228
- const s = i(-1), h = i(!1);
229
- function w(p, d, f) {
227
+ }, ke = Le(de, Qe, Ne, Se, xe);
228
+ function we(a, e, v, g) {
229
+ const n = i(-1), h = i(!1);
230
+ function y(p, d, f) {
230
231
  p.stopPropagation(), d && setTimeout(() => {
231
- s.value = f, h.value = !0, d.moving = !0;
232
+ n.value = f, h.value = !0, d.moving = !0;
232
233
  });
233
234
  }
234
- function O(p, d) {
235
- if (p.preventDefault(), s.value !== d) {
236
- const f = g.value[s.value], T = g.value;
237
- T.splice(s.value, 1), T.splice(d, 0, f), s.value = d;
235
+ function w(p, d) {
236
+ if (p.preventDefault(), n.value !== d) {
237
+ const f = g.value[n.value], k = g.value;
238
+ k.splice(n.value, 1), k.splice(d, 0, f), n.value = d;
238
239
  }
239
240
  }
240
- function S(p, d) {
241
+ function C(p, d) {
241
242
  p.preventDefault(), p.dataTransfer && (p.dataTransfer.dropEffect = "move");
242
243
  }
243
244
  function c(p, d) {
244
245
  d && (d.moving = !1), v.value = g.value.filter((f) => f.type === "Tag").map((f) => f.payload), h.value = !1, e.emit("change", v.value);
245
246
  }
246
247
  return {
247
- dragstart: w,
248
- dragenter: O,
249
- dragover: S,
248
+ dragstart: y,
249
+ dragenter: w,
250
+ dragover: C,
250
251
  dragend: c,
251
252
  isDragging: h
252
253
  };
253
254
  }
254
- const ce = /* @__PURE__ */ ye({
255
+ const G = /* @__PURE__ */ ye({
255
256
  name: "FTags",
256
257
  props: de,
257
258
  emits: ["remove", "selectionChange", "change"],
258
- setup(t, e) {
259
- const v = i(t.selectable), g = i(t.customClass), s = i(t.data), h = i(t.tagType), w = i(t.tagStyle), O = i(t.showColor), S = i(t.customStyle), c = i(t.activeTag), p = i(t.showClose), d = i(t.addButtonText), f = i(), T = i(t.wrapText), D = i();
260
- i(t.disable);
259
+ setup(a, e) {
260
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), h = i(a.tagType), y = i(a.tagStyle), w = i(a.showColor), C = i(a.customStyle), c = i(a.activeTag), p = i(a.showClose), d = i(a.addButtonText), f = i(), k = i(a.wrapText), D = i();
261
+ i(a.disable);
261
262
  const B = i(!1);
262
- function E() {
263
- const n = s.value.map((l) => ({
263
+ function P() {
264
+ const r = n.value.map((s) => ({
264
265
  type: "Tag",
265
- payload: l
266
+ payload: s
266
267
  }));
267
- return t.showAddButton && n.push({
268
+ return a.showAddButton && r.push({
268
269
  type: "AddButton"
269
- }), n;
270
+ }), r;
270
271
  }
271
- const y = i(E());
272
- function N(n) {
273
- s.value = n, y.value = E();
272
+ const b = i(P());
273
+ function $(r) {
274
+ n.value = r, b.value = P();
274
275
  }
275
- const V = P(() => y.value.findIndex((n) => n.type === "Input")), F = ke(t, e, s, y), {
276
- dragstart: R,
276
+ const F = I(() => b.value.findIndex((r) => r.type === "Input")), W = we(a, e, n, b), {
277
+ dragstart: L,
277
278
  dragenter: m,
278
- dragover: A,
279
- dragend: k
280
- } = F;
281
- q(() => t.data, (n) => N(n)), q(() => t.showAddButton, () => {
282
- y.value = E();
283
- }), q(() => t.disable, (n) => {
284
- y.value = E();
285
- }), q(() => t.activeTag, (n) => {
286
- c.value = n;
287
- }), q(B, (n) => {
288
- const l = [...y.value];
289
- n ? l.length > 0 && l[l.length - 1].type !== "Input" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
279
+ dragover: O,
280
+ dragend: A
281
+ } = W;
282
+ q(() => a.data, (r) => $(r)), q(() => a.showAddButton, () => {
283
+ b.value = P();
284
+ }), q(() => a.disable, (r) => {
285
+ b.value = P();
286
+ }), q(() => a.activeTag, (r) => {
287
+ c.value = r;
288
+ }), q(B, (r) => {
289
+ const s = [...b.value];
290
+ r ? s.length > 0 && s[s.length - 1].type !== "Input" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
290
291
  type: "Input"
291
- }), y.value = l, ue(() => {
292
+ }), b.value = s, ue(() => {
292
293
  var u;
293
294
  D.value && ((u = D.value) == null || u.focus());
294
- })) : l.length > 0 && l[l.length - 1].type !== "AddButton" && (l.splice(l.length - 1, 1), l.splice(l.length, 0, {
295
+ })) : s.length > 0 && s[s.length - 1].type !== "AddButton" && (s.splice(s.length - 1, 1), s.splice(s.length, 0, {
295
296
  type: "AddButton"
296
- }), y.value = l);
297
+ }), b.value = s);
297
298
  });
298
- const $ = P(() => {
299
- const n = {
299
+ const M = I(() => {
300
+ const r = {
300
301
  "farris-tags": !0,
301
302
  "farris-tags-checkable": v.value,
302
- "farris-tags-nowrap": !T.value
303
+ "farris-tags-nowrap": !k.value
303
304
  };
304
- return g.value.split(" ").reduce((l, u) => (l[u] = !0, l), n), n;
305
+ return g.value.split(" ").reduce((s, u) => (s[u] = !0, s), r), r;
305
306
  });
306
- function W(n) {
307
- const l = {
307
+ function V(r) {
308
+ const s = {
308
309
  "farris-tag-item": !0,
309
- "farris-tag-item-checked": v.value && n.checked,
310
+ "farris-tag-item-checked": v.value && r.checked,
310
311
  "farris-tag-item-checkable": v.value,
311
- "farris-tag-item-has-color": O.value,
312
- "farris-tag-item-actived": c.value === n.name
312
+ "farris-tag-item-has-color": w.value,
313
+ "farris-tag-item-actived": c.value === r.name
313
314
  };
314
315
  if (h.value) {
315
316
  const u = `farris-tag-item-${h.value}`;
316
- l[u] = !0;
317
+ s[u] = !0;
317
318
  }
318
- return l;
319
+ return s;
319
320
  }
320
- const L = P(() => {
321
- const n = {};
322
- return S.value && S.value.split(";").reduce((l, u) => {
321
+ const R = I(() => {
322
+ const r = {};
323
+ return C.value && C.value.split(";").reduce((s, u) => {
323
324
  const j = u.split(":");
324
- return l[j[0]] = j[1], l;
325
- }, n), n;
325
+ return s[j[0]] = j[1], s;
326
+ }, r), r;
326
327
  });
327
- function H(n, l) {
328
- !t.disable && v.value && (!l.hasOwnProperty("selectable") || l.selectable) && (l.checked = !l.checked, c.value = l.checked ? l.name : "", l.checked && s.value.filter((u) => u.name !== l.name).forEach((u) => {
329
- u.checked = !l.checked;
330
- }), e.emit("change", s.value), e.emit("selectionChange", l));
328
+ function H(r, s) {
329
+ !a.disable && v.value && (!s.hasOwnProperty("selectable") || s.selectable) && (s.checked = !s.checked, c.value = s.checked ? s.name : "", s.checked && n.value.filter((u) => u.name !== s.name).forEach((u) => {
330
+ u.checked = !s.checked;
331
+ }), e.emit("change", n.value), e.emit("selectionChange", s));
331
332
  }
332
- function G(n, l) {
333
+ function Q(r, s) {
333
334
  let u;
334
- switch (n.key) {
335
+ switch (r.key) {
335
336
  case "Backspace":
336
- s.value = s.value.filter((j) => j.name !== l.name), e.emit("change", s.value);
337
+ n.value = n.value.filter((j) => j.name !== s.name), e.emit("change", n.value);
337
338
  break;
338
339
  case "ArrowLeft":
339
340
  u = Math.max(f.value.scrollLeft + 20, 0), f.value.scrollLeft = u;
@@ -342,143 +343,143 @@ const ce = /* @__PURE__ */ ye({
342
343
  u = Math.max(f.value.scrollLeft - 20, 0), f.value.scrollLeft = u;
343
344
  }
344
345
  }
345
- function Q(n, l) {
346
- const u = s.value.findIndex((j) => j.name === l.name);
346
+ function U(r, s) {
347
+ const u = n.value.findIndex((j) => j.name === s.name);
347
348
  if (u > -1) {
348
- const [j] = s.value.splice(u, 1);
349
- y.value = E(), e.emit("change", s.value), e.emit("remove", {
350
- tags: s.value,
349
+ const [j] = n.value.splice(u, 1);
350
+ b.value = P(), e.emit("change", n.value), e.emit("remove", {
351
+ tags: n.value,
351
352
  remove: j
352
353
  });
353
354
  }
354
- n.stopPropagation();
355
+ r.stopPropagation();
355
356
  }
356
- const U = P(() => ({
357
+ const Y = I(() => ({
357
358
  "farris-tag-item": !0,
358
359
  "farris-tag-add-button": !0,
359
- "farris-tag-add-button-disabled": !t.enableAddButton
360
+ "farris-tag-add-button-disabled": !a.enableAddButton
360
361
  }));
361
- function Y(n) {
362
- n.stopPropagation(), B.value = !0;
363
- }
364
- function Z() {
365
- return !t.disable && b("li", {
366
- class: U.value,
367
- onClick: (n) => Y(n)
368
- }, [b("span", {
362
+ function Z(r) {
363
+ r.stopPropagation(), B.value = !0;
364
+ }
365
+ function K() {
366
+ return !a.disable && T("li", {
367
+ class: Y.value,
368
+ onClick: (r) => Z(r)
369
+ }, [T("span", {
369
370
  class: "f-icon f-icon-amplification"
370
- }, null), d.value && b("span", {
371
+ }, null), d.value && T("span", {
371
372
  class: "farris-tag-add-text"
372
373
  }, [d.value])]);
373
374
  }
374
- function _(n, l, u) {
375
- n > -1 && (s.value.splice(n, 0, {
376
- name: l,
375
+ function _(r, s, u) {
376
+ r > -1 && (n.value.splice(r, 0, {
377
+ name: s,
377
378
  value: u,
378
379
  selectable: v.value
379
- }), y.value = E(), B.value = !1, e.emit("change", s.value));
380
+ }), b.value = P(), B.value = !1, e.emit("change", n.value));
380
381
  }
381
- function X(n) {
382
- if (n && n.value) {
383
- const l = n.value, u = V.value;
384
- _(u, l, l), n.innerText = "";
382
+ function X(r) {
383
+ if (r && r.value) {
384
+ const s = r.value, u = F.value;
385
+ _(u, s, s), r.innerText = "";
385
386
  } else
386
387
  B.value = !1;
387
388
  }
388
- function K(n) {
389
- const l = n.target;
390
- l && l.value ? X(l) : B.value = !1;
389
+ function ee(r) {
390
+ const s = r.target;
391
+ s && s.value ? X(s) : B.value = !1;
391
392
  }
392
- function ge(n) {
393
- n.key === "Enter" && X(n.target);
393
+ function ge(r) {
394
+ r.key === "Enter" && X(r.target);
394
395
  }
395
- function ee() {
396
- return !t.disable && b("li", {
396
+ function te() {
397
+ return !a.disable && T("li", {
397
398
  class: "farris-tag-input-box"
398
- }, [b("input", {
399
+ }, [T("input", {
399
400
  title: "farris-tag-input-box",
400
401
  ref: D,
401
402
  class: "form-control",
402
403
  onKeyup: ge,
403
- onBlur: K
404
+ onBlur: ee
404
405
  }, null)]);
405
406
  }
406
- function te(n, l) {
407
- return b("li", {
408
- class: W(n),
409
- style: L.value,
407
+ function ae(r, s) {
408
+ return T("li", {
409
+ class: V(r),
410
+ style: R.value,
410
411
  tabindex: 0,
411
- id: n.name,
412
- key: n.name,
413
- onClick: (u) => H(u, n),
414
- onKeydown: (u) => G(u, n),
412
+ id: r.name,
413
+ key: r.name,
414
+ onClick: (u) => H(u, r),
415
+ onKeydown: (u) => Q(u, r),
415
416
  draggable: "true",
416
- onDragstart: (u) => R(u, n, l),
417
- onDragenter: (u) => m(u, l),
418
- onDragend: (u) => k(u, n),
419
- onDragover: (u) => A(u, l)
420
- }, [b("span", {
421
- title: n.name,
417
+ onDragstart: (u) => L(u, r, s),
418
+ onDragenter: (u) => m(u, s),
419
+ onDragend: (u) => A(u, r),
420
+ onDragover: (u) => O(u, s)
421
+ }, [T("span", {
422
+ title: r.name,
422
423
  class: "tag-box"
423
- }, [n.name]), !t.disable && p.value && b("span", {
424
+ }, [r.name]), !a.disable && p.value && T("span", {
424
425
  class: "tag-delete"
425
- }, [b("i", {
426
+ }, [T("i", {
426
427
  class: "f-icon f-icon-close",
427
- onClick: (u) => Q(u, n)
428
+ onClick: (u) => U(u, r)
428
429
  }, null)])]);
429
430
  }
430
431
  function J() {
431
- return y.value.map((n, l) => {
432
- switch (n.type) {
432
+ return b.value.map((r, s) => {
433
+ switch (r.type) {
433
434
  case "Tag":
434
- return te(n.payload, l);
435
+ return ae(r.payload, s);
435
436
  case "AddButton":
436
- return Z();
437
+ return K();
437
438
  case "Input":
438
- return ee();
439
+ return te();
439
440
  }
440
441
  });
441
442
  }
442
- const z = P(() => ({
443
+ const z = I(() => ({
443
444
  "farris-tags-item-container": !0,
444
- "farris-tag-item-capsule": w.value === "capsule"
445
+ "farris-tag-item-capsule": y.value === "capsule"
445
446
  }));
446
- function ae(n) {
447
- const l = Math.max(f.value.scrollLeft - n.deltaX, 0);
448
- f.value.scrollLeft = l;
447
+ function ne(r) {
448
+ const s = Math.max(f.value.scrollLeft - r.deltaX, 0);
449
+ f.value.scrollLeft = s;
449
450
  }
450
- function ne(n) {
451
+ function re(r) {
451
452
  var u;
452
- n.preventDefault(), n.stopPropagation();
453
- const l = (u = n.dataTransfer) == null ? void 0 : u.getData("Text");
454
- if (l) {
455
- const j = l.split(":"), le = j[0], x = j[1];
456
- [...s.value].findIndex((a) => (console.log(`${a.value} === ${x} is ${a.value === x}`), a.value === x)) > -1 || _(s.value.length, le, x);
453
+ r.preventDefault(), r.stopPropagation();
454
+ const s = (u = r.dataTransfer) == null ? void 0 : u.getData("Text");
455
+ if (s) {
456
+ const j = s.split(":"), le = j[0], x = j[1];
457
+ [...n.value].findIndex((t) => (console.log(`${t.value} === ${x} is ${t.value === x}`), t.value === x)) > -1 || _(n.value.length, le, x);
457
458
  }
458
459
  }
459
- function se(n) {
460
- n.preventDefault();
460
+ function se(r) {
461
+ r.preventDefault();
461
462
  }
462
- return () => b("div", {
463
- class: $.value,
464
- onDrop: ne,
463
+ return () => T("div", {
464
+ class: M.value,
465
+ onDrop: re,
465
466
  onDragover: se
466
- }, [b("ul", {
467
+ }, [T("ul", {
467
468
  ref: f,
468
469
  class: z.value,
469
- onWheel: (n) => ae(n)
470
+ onWheel: (r) => ne(r)
470
471
  }, [J()])]);
471
472
  }
472
473
  });
473
- function Ge(t, e, v) {
474
- var R;
474
+ function Ue(a, e, v) {
475
+ var L;
475
476
  function g() {
476
477
  }
477
- const s = "", h = "", w = i();
478
- function O() {
478
+ const n = "", h = "", y = i();
479
+ function w() {
479
480
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
480
481
  }
481
- function S() {
482
+ function C() {
482
483
  return !1;
483
484
  }
484
485
  function c() {
@@ -492,14 +493,14 @@ function Ge(t, e, v) {
492
493
  return null;
493
494
  if (m.value.schema && m.value.schema.type === "component")
494
495
  return m.value;
495
- const A = i(m == null ? void 0 : m.value.parent), k = d(A);
496
- return k || null;
496
+ const O = i(m == null ? void 0 : m.value.parent), A = d(O);
497
+ return A || null;
497
498
  }
498
499
  function f(m = e) {
499
- const { componentInstance: A, designerItemElementRef: k } = m;
500
- return !A || !A.value ? null : A.value.canMove ? k : f(m.parent);
500
+ const { componentInstance: O, designerItemElementRef: A } = m;
501
+ return !O || !O.value ? null : O.value.canMove ? A : f(m.parent);
501
502
  }
502
- function T(m) {
503
+ function k(m) {
503
504
  return !!v;
504
505
  }
505
506
  function D() {
@@ -507,121 +508,121 @@ function Ge(t, e, v) {
507
508
  }
508
509
  function B() {
509
510
  }
510
- function E(m, A) {
511
+ function P(m, O) {
511
512
  }
512
- function y(m) {
513
+ function b(m, O) {
513
514
  const { componentType: A } = m;
514
- let k = ie(A, m);
515
- const $ = A.toLowerCase().replace("-", "_");
516
- return k && !k.id && k.type === A && (k.id = `${$}_${Math.random().toString().slice(2, 6)}`), k;
515
+ let M = ie(A, m, O);
516
+ const V = A.toLowerCase().replace("-", "_");
517
+ return M && !M.id && M.type === A && (M.id = `${V}_${Math.random().toString().slice(2, 6)}`), M;
517
518
  }
518
- function N(m, A) {
519
- const k = String(m.getAttribute("data-controltype")), $ = m.getAttribute("data-feature"), W = $ ? JSON.parse($) : {};
520
- W.parentComponentInstance = w.value;
521
- let L = ie(k, W);
522
- const H = k.toLowerCase().replace("-", "_");
523
- return L && !L.id && L.type === k && (L.id = `${H}_${Math.random().toString().slice(2, 6)}`), L;
519
+ function $(m, O) {
520
+ const A = String(m.getAttribute("data-controltype")), M = m.getAttribute("data-feature"), V = M ? JSON.parse(M) : {};
521
+ V.parentComponentInstance = y.value;
522
+ let R = ie(A, V);
523
+ const H = A.toLowerCase().replace("-", "_");
524
+ return R && !R.id && R.type === A && (R.id = `${H}_${Math.random().toString().slice(2, 6)}`), R;
524
525
  }
525
- function V(m) {
526
+ function F(m) {
526
527
  }
527
- function F(...m) {
528
+ function W(...m) {
528
529
  }
529
- return w.value = {
530
- canMove: O(),
531
- canSelectParent: S(),
530
+ return y.value = {
531
+ canMove: w(),
532
+ canSelectParent: C(),
532
533
  canDelete: c(),
533
534
  canNested: !p(),
534
535
  contents: e == null ? void 0 : e.schema.contents,
535
- elementRef: t,
536
- parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
536
+ elementRef: a,
537
+ parent: (L = e == null ? void 0 : e.parent) == null ? void 0 : L.componentInstance,
537
538
  schema: e == null ? void 0 : e.schema,
538
- styles: s,
539
+ styles: n,
539
540
  designerClass: h,
540
- canAccepts: T,
541
+ canAccepts: k,
541
542
  getBelongedComponentInstance: d,
542
543
  getDraggableDesignItemElement: f,
543
544
  getDraggingDisplayText: D,
544
- getPropConfig: F,
545
+ getPropConfig: W,
545
546
  getDragScopeElement: B,
546
- onAcceptMovedChildElement: E,
547
- onAcceptNewChildElement: N,
548
- onChildElementMovedOut: V,
549
- addNewChildComponentSchema: y,
547
+ onAcceptMovedChildElement: P,
548
+ onAcceptNewChildElement: $,
549
+ onChildElementMovedOut: F,
550
+ addNewChildComponentSchema: b,
550
551
  updateDragAndDropRules: g,
551
552
  triggerBelongedComponentToMoveWhenMoved: i(!1),
552
553
  triggerBelongedComponentToDeleteWhenDeleted: i(!1)
553
- }, w;
554
+ }, y;
554
555
  }
555
- const Qe = /* @__PURE__ */ ye({
556
+ const Ye = /* @__PURE__ */ ye({
556
557
  name: "FTagsDesign",
557
558
  props: de,
558
559
  emits: ["remove", "selectionChange", "change"],
559
- setup(t, e) {
560
- const v = i(t.selectable), g = i(t.customClass), s = i(t.data), h = i(t.tagType), w = i(t.tagStyle), O = i(t.showColor), S = i(t.activeTag), c = i(t.customStyle), p = i(t.showClose), d = i(t.showAddButton), f = i(t.showInput), T = i(t.addButtonText), D = i(t.enableAddButton);
561
- i(t.placeholder), i(""), i();
562
- const B = i(), E = i(t.wrapText), y = i(), N = i(), V = we("design-item-context"), F = Ge(N, V);
563
- De(() => {
564
- N.value.componentInstance = F;
565
- }), e.expose(F.value);
566
- function R() {
567
- const a = s.value.map((r) => ({
560
+ setup(a, e) {
561
+ const v = i(a.selectable), g = i(a.customClass), n = i(a.data), h = i(a.tagType), y = i(a.tagStyle), w = i(a.showColor), C = i(a.activeTag), c = i(a.customStyle), p = i(a.showClose), d = i(a.showAddButton), f = i(a.showInput), k = i(a.addButtonText), D = i(a.enableAddButton);
562
+ i(a.placeholder), i(""), i();
563
+ const B = i(), P = i(a.wrapText), b = i(), $ = i(), F = Be("design-item-context"), W = Ue($, F);
564
+ Ae(() => {
565
+ $.value.componentInstance = W;
566
+ }), e.expose(W.value);
567
+ function L() {
568
+ const t = n.value.map((l) => ({
568
569
  type: "Tag",
569
- payload: r
570
+ payload: l
570
571
  }));
571
- return d.value && a.push({
572
+ return d.value && t.push({
572
573
  type: "AddButton"
573
- }), a;
574
+ }), t;
574
575
  }
575
- const m = i(R());
576
- function A(a) {
577
- s.value = a, m.value = R();
576
+ const m = i(L());
577
+ function O(t) {
578
+ n.value = t, m.value = L();
578
579
  }
579
- const k = P(() => m.value.findIndex((a) => a.type === "Input")), $ = ke(t, e, s, m), {
580
- dragstart: W,
581
- dragenter: L,
580
+ const A = I(() => m.value.findIndex((t) => t.type === "Input")), M = we(a, e, n, m), {
581
+ dragstart: V,
582
+ dragenter: R,
582
583
  dragover: H,
583
- dragend: G
584
- } = $;
585
- q(() => t.data, (a) => A(a));
586
- const Q = P(() => {
587
- const a = {
584
+ dragend: Q
585
+ } = M;
586
+ q(() => a.data, (t) => O(t));
587
+ const U = I(() => {
588
+ const t = {
588
589
  "farris-tags": !0,
589
590
  "farris-tags-checkable": v.value,
590
- "farris-tags-nowrap": !E.value
591
+ "farris-tags-nowrap": !P.value
591
592
  };
592
- return g.value.split(" ").reduce((r, o) => (r[o] = !0, r), a), a;
593
+ return g.value.split(" ").reduce((l, o) => (l[o] = !0, l), t), t;
593
594
  });
594
- function U(a) {
595
- const r = {
595
+ function Y(t) {
596
+ const l = {
596
597
  "farris-tag-item": !0,
597
- "farris-tag-item-checked": v.value && a.checked,
598
+ "farris-tag-item-checked": v.value && t.checked,
598
599
  "farris-tag-item-checkable": v.value,
599
- "farris-tag-item-has-color": O.value,
600
- "farris-tag-item-actived": S.value === a.name
600
+ "farris-tag-item-has-color": w.value,
601
+ "farris-tag-item-actived": C.value === t.name
601
602
  };
602
603
  if (h.value) {
603
604
  const o = `farris-tag-item-${h.value}`;
604
- r[o] = !0;
605
+ l[o] = !0;
605
606
  }
606
- return r;
607
- }
608
- const Y = P(() => {
609
- const a = {};
610
- return c.value && c.value.split(";").reduce((r, o) => {
611
- const C = o.split(":");
612
- return r[C[0]] = C[1], r;
613
- }, a), a;
607
+ return l;
608
+ }
609
+ const Z = I(() => {
610
+ const t = {};
611
+ return c.value && c.value.split(";").reduce((l, o) => {
612
+ const S = o.split(":");
613
+ return l[S[0]] = S[1], l;
614
+ }, t), t;
614
615
  });
615
- function Z(a, r) {
616
- v.value && r.selectable && (r.checked = !r.checked, S.value = r.checked ? r.name : "", r.checked && s.value.filter((o) => o.name !== r.name).forEach((o) => {
617
- o.checked = !r.checked;
618
- }), e.emit("change", s.value), e.emit("selectionChange", r));
616
+ function K(t, l) {
617
+ v.value && l.selectable && (l.checked = !l.checked, C.value = l.checked ? l.name : "", l.checked && n.value.filter((o) => o.name !== l.name).forEach((o) => {
618
+ o.checked = !l.checked;
619
+ }), e.emit("change", n.value), e.emit("selectionChange", l));
619
620
  }
620
- function _(a, r) {
621
+ function _(t, l) {
621
622
  let o;
622
- switch (a.key) {
623
+ switch (t.key) {
623
624
  case "Backspace":
624
- s.value = s.value.filter((C) => C.name !== r.name), e.emit("change", s.value);
625
+ n.value = n.value.filter((S) => S.name !== l.name), e.emit("change", n.value);
625
626
  break;
626
627
  case "ArrowLeft":
627
628
  o = Math.max(B.value.scrollLeft + 20, 0), B.value.scrollLeft = o;
@@ -630,179 +631,176 @@ const Qe = /* @__PURE__ */ ye({
630
631
  o = Math.max(B.value.scrollLeft - 20, 0), B.value.scrollLeft = o;
631
632
  }
632
633
  }
633
- function X(a, r) {
634
- const o = s.value.findIndex((C) => C.name === r.name);
634
+ function X(t, l) {
635
+ const o = n.value.findIndex((S) => S.name === l.name);
635
636
  if (o > -1) {
636
- const [C] = s.value.splice(o, 1);
637
- m.value = R(), e.emit("change", s.value), e.emit("remove", s.value, C, o);
637
+ const [S] = n.value.splice(o, 1);
638
+ m.value = L(), e.emit("change", n.value), e.emit("remove", n.value, S, o);
638
639
  }
639
- a.stopPropagation();
640
+ t.stopPropagation();
640
641
  }
641
- const K = P(() => ({
642
+ const ee = I(() => ({
642
643
  "farris-tag-item": !0,
643
644
  "farris-tag-add-button": !0,
644
645
  "farris-tag-add-button-disabled": !D.value
645
646
  }));
646
- function ge(a) {
647
+ function ge(t) {
647
648
  }
648
- function ee() {
649
- return b("li", {
650
- class: K.value,
651
- onClick: (a) => void 0
652
- }, [b("span", {
649
+ function te() {
650
+ return T("li", {
651
+ class: ee.value,
652
+ onClick: (t) => void 0
653
+ }, [T("span", {
653
654
  class: "f-icon f-icon-amplification"
654
- }, null), b("span", {
655
+ }, null), T("span", {
655
656
  class: "farris-tag-add-text"
656
- }, [T.value])]);
657
- }
658
- function te(a) {
659
- if (a && !a.innerText) {
660
- const r = k.value;
661
- if (r > 0) {
662
- const [o] = s.value.splice(r - 1, 1);
663
- m.value.splice(r - 1, 1), e.emit("remove", s.value, o, r - 1);
657
+ }, [k.value])]);
658
+ }
659
+ function ae(t) {
660
+ if (t && !t.innerText) {
661
+ const l = A.value;
662
+ if (l > 0) {
663
+ const [o] = n.value.splice(l - 1, 1);
664
+ m.value.splice(l - 1, 1), e.emit("remove", n.value, o, l - 1);
664
665
  }
665
666
  }
666
667
  }
667
- function J(a, r, o) {
668
- a > -1 && (s.value.splice(a, 0, {
669
- name: r,
668
+ function J(t, l, o) {
669
+ t > -1 && (n.value.splice(t, 0, {
670
+ name: l,
670
671
  value: o,
671
672
  selectable: v.value
672
- }), m.value = R(), e.emit("change", s.value));
673
+ }), m.value = L(), e.emit("change", n.value));
673
674
  }
674
- function z(a) {
675
- if (a && a.innerText) {
676
- const r = a.innerText, o = k.value;
677
- J(o, r, r), a.innerText = "";
675
+ function z(t) {
676
+ if (t && t.innerText) {
677
+ const l = t.innerText, o = A.value;
678
+ J(o, l, l), t.innerText = "";
678
679
  }
679
680
  }
680
- function ae(a) {
681
- const r = a.target;
682
- r && (r.innerText ? z(r) : e.emit("change", s.value));
681
+ function ne(t) {
682
+ const l = t.target;
683
+ l && (l.innerText ? z(l) : e.emit("change", n.value));
683
684
  }
684
- function ne(a) {
685
- a.key === "Enter" && z(a.target), a.key === "Backspace" && (te(a.target), ue(() => {
686
- var r;
687
- y.value && ((r = y.value) == null || r.focus());
685
+ function re(t) {
686
+ t.key === "Enter" && z(t.target), t.key === "Backspace" && (ae(t.target), ue(() => {
687
+ var l;
688
+ b.value && ((l = b.value) == null || l.focus());
688
689
  }));
689
690
  }
690
691
  function se() {
691
- return b("li", {
692
+ return T("li", {
692
693
  class: "farris-tag-input-box"
693
- }, [b("div", {
694
- ref: y,
694
+ }, [T("div", {
695
+ ref: b,
695
696
  class: "form-control",
696
697
  contenteditable: "true",
697
- onKeyup: ne,
698
- onBlur: ae
698
+ onKeyup: re,
699
+ onBlur: ne
699
700
  }, null)]);
700
701
  }
701
- function n(a, r) {
702
- return b("li", {
703
- class: U(a),
704
- style: Y.value,
702
+ function r(t, l) {
703
+ return T("li", {
704
+ class: Y(t),
705
+ style: Z.value,
705
706
  tabindex: 0,
706
- id: a.name,
707
- key: a.name,
708
- onClick: (o) => Z(o, a),
709
- onKeydown: (o) => _(o, a),
707
+ id: t.name,
708
+ key: t.name,
709
+ onClick: (o) => K(o, t),
710
+ onKeydown: (o) => _(o, t),
710
711
  draggable: "true",
711
- onDragstart: (o) => W(o, a, r),
712
- onDragenter: (o) => L(o, r),
713
- onDragend: (o) => G(o, a),
714
- onDragover: (o) => H(o, r)
715
- }, [b("div", {
716
- title: a.name,
712
+ onDragstart: (o) => V(o, t, l),
713
+ onDragenter: (o) => R(o, l),
714
+ onDragend: (o) => Q(o, t),
715
+ onDragover: (o) => H(o, l)
716
+ }, [T("div", {
717
+ title: t.name,
717
718
  class: "tag-box"
718
- }, [a.name]), p.value && b("span", {
719
+ }, [t.name]), p.value && T("span", {
719
720
  class: "tag-delete"
720
- }, [b("i", {
721
+ }, [T("i", {
721
722
  class: "f-icon f-icon-close",
722
- onClick: (o) => X(o, a)
723
+ onClick: (o) => X(o, t)
723
724
  }, null)])]);
724
725
  }
725
- function l() {
726
- return m.value.map((a, r) => {
727
- switch (a.type) {
726
+ function s() {
727
+ return m.value.map((t, l) => {
728
+ switch (t.type) {
728
729
  case "Tag":
729
- return n(a.payload, r);
730
+ return r(t.payload, l);
730
731
  case "AddButton":
731
- return ee();
732
+ return te();
732
733
  case "Input":
733
734
  return se();
734
735
  }
735
736
  });
736
737
  }
737
- const u = P(() => ({
738
+ const u = I(() => ({
738
739
  "farris-tags-item-container": !0,
739
- "farris-tag-item-capsule": w.value === "capsule"
740
+ "farris-tag-item-capsule": y.value === "capsule"
740
741
  }));
741
- function j(a) {
742
- const r = Math.max(B.value.scrollLeft - a.deltaX, 0);
743
- B.value.scrollLeft = r;
744
- }
745
- function le(a) {
746
- const r = B.value, o = s.value.length - 1;
747
- if (r) {
748
- const C = Array.from(r.children).filter((I) => I.className.indexOf("farris-tag-item") > -1).findIndex((I) => {
749
- const M = I.getBoundingClientRect(), re = window.getComputedStyle(I), me = parseInt(re["margin-left"], 10) + M.width + parseInt(re["margin-right"], 10);
750
- return M.left + me > a;
742
+ function j(t) {
743
+ const l = Math.max(B.value.scrollLeft - t.deltaX, 0);
744
+ B.value.scrollLeft = l;
745
+ }
746
+ function le(t) {
747
+ const l = B.value, o = n.value.length - 1;
748
+ if (l) {
749
+ const S = Array.from(l.children).filter((N) => N.className.indexOf("farris-tag-item") > -1).findIndex((N) => {
750
+ const E = N.getBoundingClientRect(), oe = window.getComputedStyle(N), me = parseInt(oe["margin-left"], 10) + E.width + parseInt(oe["margin-right"], 10);
751
+ return E.left + me > t;
751
752
  });
752
- if (C > -1)
753
- return C;
753
+ if (S > -1)
754
+ return S;
754
755
  }
755
756
  return o;
756
757
  }
757
- function x(a) {
758
+ function x(t) {
758
759
  if (f.value) {
759
- const o = le(a.clientX) + 1, I = m.value.filter((M) => M.type !== "Input");
760
- I.splice(o, 0, {
760
+ const o = le(t.clientX) + 1, N = m.value.filter((E) => E.type !== "Input");
761
+ N.splice(o, 0, {
761
762
  type: "Input"
762
- }), m.value = I, ue(() => {
763
- var M;
764
- y.value && ((M = y.value) == null || M.focus());
763
+ }), m.value = N, ue(() => {
764
+ var E;
765
+ b.value && ((E = b.value) == null || E.focus());
765
766
  });
766
767
  }
767
768
  }
768
- function pe(a) {
769
+ function pe(t) {
769
770
  var o;
770
- a.preventDefault(), a.stopPropagation();
771
- const r = (o = a.dataTransfer) == null ? void 0 : o.getData("Text");
772
- if (r) {
773
- const C = r.split(":"), I = C[0], M = C[1];
774
- [...s.value].findIndex((oe) => (console.log(`${oe.value} === ${M} is ${oe.value === M}`), oe.value === M)) > -1 || J(s.value.length, I, M);
771
+ t.preventDefault(), t.stopPropagation();
772
+ const l = (o = t.dataTransfer) == null ? void 0 : o.getData("Text");
773
+ if (l) {
774
+ const S = l.split(":"), N = S[0], E = S[1];
775
+ [...n.value].findIndex((ce) => (console.log(`${ce.value} === ${E} is ${ce.value === E}`), ce.value === E)) > -1 || J(n.value.length, N, E);
775
776
  }
776
777
  }
777
- function ve(a) {
778
- a.preventDefault();
778
+ function ve(t) {
779
+ t.preventDefault();
779
780
  }
780
- return () => b("div", {
781
- ref: N,
782
- class: Q.value,
781
+ return () => T("div", {
782
+ ref: $,
783
+ class: U.value,
783
784
  onClick: x,
784
785
  onDrop: pe,
785
786
  onDragover: ve
786
- }, [b("ul", {
787
+ }, [T("ul", {
787
788
  ref: B,
788
789
  class: u.value,
789
- onWheel: (a) => j(a)
790
- }, [l()])]);
791
- }
792
- }), Ze = {
793
- install(t) {
794
- t.component(ce.name, ce);
795
- },
796
- register(t, e, v, g) {
797
- t.tags = ce, e.tags = he;
798
- },
799
- registerDesigner(t, e, v) {
800
- t.tags = Qe, e.tags = he;
790
+ onWheel: (t) => j(t)
791
+ }, [s()])]);
801
792
  }
793
+ });
794
+ G.register = (a, e, v, g) => {
795
+ a.tags = G, e.tags = ke;
796
+ };
797
+ G.registerDesigner = (a, e, v) => {
798
+ a.tags = Ye, e.tags = ke;
802
799
  };
800
+ const tt = De(G);
803
801
  export {
804
- ce as FTags,
805
- Ze as default,
806
- he as propsResolver,
802
+ G as FTags,
803
+ tt as default,
804
+ ke as propsResolver,
807
805
  de as tagsProps
808
806
  };