@farris/ui-vue 1.3.0 → 1.3.3

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 (305) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +454 -398
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +479 -476
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +255 -252
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +652 -567
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +518 -521
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +659 -553
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +162 -155
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +866 -747
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +371 -998
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1174 -1280
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +340 -991
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +6066 -5847
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3400 -3486
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2328 -2446
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9551 -1200
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +234 -231
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1996 -2630
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +138 -123
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +548 -586
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2871 -3736
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3380 -3645
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10543 -3207
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9775 -1312
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +442 -438
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +587 -807
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +415 -381
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +361 -1024
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2265 -2371
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6425 -6257
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +6164 -5946
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +524 -1474
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +547 -502
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +646 -574
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1181 -2028
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1185 -2027
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +442 -1368
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +238 -235
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1635 -1713
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +791 -716
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12203 -5274
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1873 -520
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +299 -300
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +176 -173
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +715 -659
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +1032 -1883
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4767 -5693
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +169 -161
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +490 -1167
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +154 -151
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +575 -1204
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/splitter/style.js +2 -0
  136. package/components/step/index.esm.js +279 -276
  137. package/components/step/index.umd.cjs +1 -1
  138. package/components/switch/index.esm.js +478 -428
  139. package/components/switch/index.umd.cjs +1 -1
  140. package/components/tabs/index.esm.js +2591 -3326
  141. package/components/tabs/index.umd.cjs +1 -1
  142. package/components/tags/index.esm.js +442 -439
  143. package/components/tags/index.umd.cjs +1 -1
  144. package/components/text/index.esm.js +309 -307
  145. package/components/text/index.umd.cjs +1 -1
  146. package/components/textarea/index.esm.js +500 -430
  147. package/components/textarea/index.umd.cjs +1 -1
  148. package/components/time-picker/index.esm.js +1391 -1341
  149. package/components/time-picker/index.umd.cjs +1 -1
  150. package/components/transfer/index.esm.js +574 -575
  151. package/components/transfer/index.umd.cjs +1 -1
  152. package/components/tree-grid/index.esm.js +3422 -3536
  153. package/components/tree-grid/index.umd.cjs +1 -1
  154. package/components/tree-view/index.esm.js +2661 -2764
  155. package/components/tree-view/index.umd.cjs +1 -1
  156. package/components/uploader/index.esm.js +675 -674
  157. package/components/uploader/index.umd.cjs +2 -2
  158. package/components/verify-detail/index.esm.js +300 -297
  159. package/components/verify-detail/index.umd.cjs +1 -1
  160. package/components/video/index.esm.js +454 -1089
  161. package/components/video/index.umd.cjs +1 -1
  162. package/components/weather/index.esm.js +709 -706
  163. package/components/weather/index.umd.cjs +5 -5
  164. package/farris.all.esm.js +54780 -52757
  165. package/farris.all.umd.cjs +14 -9
  166. package/index.css +1 -1
  167. package/package.json +1 -1
  168. package/types/binding-selector/index.d.ts +55 -0
  169. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  170. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  171. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  172. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  173. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  174. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  175. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  176. package/types/common/directive/area-response.d.ts +10 -0
  177. package/types/common/entity/entity-schema.d.ts +26 -11
  178. package/types/common/index.d.ts +9 -0
  179. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  180. package/types/common/types.d.ts +2 -2
  181. package/types/common/utils/resolve-field.d.ts +2 -0
  182. package/types/common/utils/use-class.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  184. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  185. package/types/condition/src/types.d.ts +5 -4
  186. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  187. package/types/data-grid/index.d.ts +8 -5
  188. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  189. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  190. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  191. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  192. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  193. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  194. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  196. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  197. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  198. package/types/data-view/composition/types.d.ts +9 -11
  199. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  200. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  201. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  202. package/types/designer-canvas/index.d.ts +3 -1
  203. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  204. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  205. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  206. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  207. package/types/designer-canvas/src/composition/types.d.ts +49 -41
  208. package/types/designer-canvas/src/types.d.ts +10 -21
  209. package/types/dynamic-form/index.d.ts +1 -1
  210. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  211. package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
  212. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  213. package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
  214. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  215. package/types/dynamic-form/src/types.d.ts +1 -1
  216. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
  217. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  218. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  219. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  220. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  221. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  222. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  223. package/types/event-parameter/index.d.ts +31 -0
  224. package/types/event-parameter/src/composition/type.d.ts +77 -0
  225. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  226. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  227. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  228. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  229. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  230. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  231. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  232. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  233. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  234. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  235. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  236. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  237. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  238. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  239. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  240. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  241. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  242. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  243. package/types/modal/src/composition/modal.service.d.ts +2 -1
  244. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  245. package/types/page-header/src/page-header.component.d.ts +1 -1
  246. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  247. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  248. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  249. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  250. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  251. package/types/property-panel/index.d.ts +3 -1
  252. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  253. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  254. package/types/property-panel/src/composition/type.d.ts +0 -13
  255. package/types/query-solution/src/composition/types.d.ts +35 -4
  256. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  257. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  258. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  259. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
  260. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  262. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  264. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
  266. package/types/query-solution/src/query-solution.d.ts +10 -2
  267. package/types/query-solution/src/solutions.d.ts +108 -509
  268. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  269. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  270. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  271. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  272. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  273. package/types/response-layout-editor/index.d.ts +3 -1
  274. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  275. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  276. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  277. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  278. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  279. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  280. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  281. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  282. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  283. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  284. package/types/tabs/src/composition/types.d.ts +4 -1
  285. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  286. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  287. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  288. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  289. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  290. package/types/text/src/composition/types.d.ts +4 -4
  291. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  292. package/types/tree-grid/index.d.ts +3 -3
  293. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  294. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  295. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  296. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  297. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  298. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  299. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  300. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
  301. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  302. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  303. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  304. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  305. package/types/weather/src/composition/types.d.ts +0 -2
@@ -1,114 +1,119 @@
1
- import { defineComponent as K, ref as r, onMounted as J, computed as W, watch as te, createVNode as D, withModifiers as R, createTextVNode as L, inject as ae } from "vue";
2
- import { isPlainObject as Z, cloneDeep as le } from "lodash-es";
3
- const x = {}, I = {};
4
- function Q(t) {
5
- const { properties: e, title: a, ignore: n } = t, o = n && Array.isArray(n), b = Object.keys(e).reduce((m, h) => ((!o || !n.find((E) => E == h)) && (m[h] = e[h].type === "object" && e[h].properties ? Q(e[h]) : le(e[h].default)), m), {});
6
- return (!o || !n.find((m) => m == "id")) && (b.id = `${a}-${Date.now()}`), b;
1
+ import { defineComponent as Z, ref as r, onMounted as G, computed as W, watch as ae, createVNode as N, withModifiers as E, createTextVNode as B, inject as te } from "vue";
2
+ import { isPlainObject as U, cloneDeep as le } from "lodash-es";
3
+ import { withInstall as re } from "../common/index.esm.js";
4
+ const K = {}, x = {};
5
+ function J(a) {
6
+ const { properties: e, title: t, ignore: n } = a, o = n && Array.isArray(n), h = Object.keys(e).reduce((y, b) => ((!o || !n.find((w) => w === b)) && (y[b] = e[b].type === "object" && e[b].properties ? J(e[b]) : le(e[b].default)), y), {});
7
+ if (t && (!o || !n.find((y) => y === "id"))) {
8
+ const y = t.toLowerCase().replace(/-/g, "_");
9
+ h.id = `${y}_${Math.random().toString().slice(2, 6)}`;
10
+ }
11
+ return h;
7
12
  }
8
- function G(t, e = {}, a) {
9
- const n = x[t];
13
+ function I(a, e = {}, t) {
14
+ const n = K[a];
10
15
  if (n) {
11
- let o = Q(n);
12
- const b = I[t];
13
- return o = b ? b({ getSchemaByType: G }, o, e, a) : o, o;
16
+ let o = J(n);
17
+ const h = x[a];
18
+ return o = h ? h({ getSchemaByType: I }, o, e, t) : o, o;
14
19
  }
15
20
  return null;
16
21
  }
17
- function re(t, e) {
18
- const a = Q(e);
19
- return Object.keys(t).reduce((n, o) => (n[o] && Z(n[o]) && Z(t[o]) ? Object.assign(n[o], t[o]) : n[o] = t[o], n), a), a;
22
+ function ne(a, e) {
23
+ const t = J(e);
24
+ return Object.keys(t).reduce((n, o) => (n[o] && U(n[o]) && U(a[o] || !a[o]) ? Object.assign(n[o], a[o] || {}) : n[o] = a[o], n), t), t;
20
25
  }
21
- function ne(t, e) {
22
- return Object.keys(t).filter((n) => t[n] != null).reduce((n, o) => {
26
+ function oe(a, e) {
27
+ return Object.keys(a).filter((n) => a[n] != null).reduce((n, o) => {
23
28
  if (e.has(o)) {
24
- const b = e.get(o);
25
- if (typeof b == "string")
26
- n[b] = t[o];
29
+ const h = e.get(o);
30
+ if (typeof h == "string")
31
+ n[h] = a[o];
27
32
  else {
28
- const m = b(o, t[o], t);
29
- Object.assign(n, m);
33
+ const y = h(o, a[o], a);
34
+ Object.assign(n, y);
30
35
  }
31
36
  } else
32
- n[o] = t[o];
37
+ n[o] = a[o];
33
38
  return n;
34
39
  }, {});
35
40
  }
36
- function oe(t, e, a = /* @__PURE__ */ new Map()) {
37
- const n = re(t, e);
38
- return ne(n, a);
41
+ function se(a, e, t = /* @__PURE__ */ new Map()) {
42
+ const n = ne(a, e);
43
+ return oe(n, t);
39
44
  }
40
- function se(t = {}) {
41
- function e(l, u, d, f) {
42
- if (typeof d == "number")
43
- return f[l].length === d;
44
- if (typeof d == "object") {
45
- const S = Object.keys(d)[0], M = d[S];
45
+ function ue(a = {}) {
46
+ function e(l, s, f, p) {
47
+ if (typeof f == "number")
48
+ return p[l].length === f;
49
+ if (typeof f == "object") {
50
+ const S = Object.keys(f)[0], M = f[S];
46
51
  if (S === "not")
47
- return Number(f[l].length) !== Number(M);
52
+ return Number(p[l].length) !== Number(M);
48
53
  if (S === "moreThan")
49
- return Number(f[l].length) >= Number(M);
54
+ return Number(p[l].length) >= Number(M);
50
55
  if (S === "lessThan")
51
- return Number(f[l].length) <= Number(M);
56
+ return Number(p[l].length) <= Number(M);
52
57
  }
53
58
  return !1;
54
59
  }
55
- function a(l, u, d, f) {
56
- return f[l] && f[l].propertyValue && String(f[l].propertyValue.value) === String(d);
60
+ function t(l, s, f, p) {
61
+ return p[l] && p[l].propertyValue && String(p[l].propertyValue.value) === String(f);
57
62
  }
58
63
  const n = /* @__PURE__ */ new Map([
59
64
  ["length", e],
60
- ["getProperty", a]
65
+ ["getProperty", t]
61
66
  ]);
62
- Object.keys(t).reduce((l, u) => (l.set(u, t[u]), l), n);
63
- function o(l, u) {
64
- const d = l;
65
- return typeof u == "number" ? [{ target: d, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: d, operator: "getProperty", param: l, value: !!u }] : typeof u == "object" ? Object.keys(u).map((f) => {
66
- if (f === "length")
67
- return { target: d, operator: "length", param: null, value: u[f] };
68
- const S = f, M = u[f];
69
- return { target: d, operator: "getProperty", param: S, value: M };
67
+ Object.keys(a).reduce((l, s) => (l.set(s, a[s]), l), n);
68
+ function o(l, s) {
69
+ const f = l;
70
+ return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: l, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
71
+ if (p === "length")
72
+ return { target: f, operator: "length", param: null, value: s[p] };
73
+ const S = p, M = s[p];
74
+ return { target: f, operator: "getProperty", param: S, value: M };
70
75
  }) : [];
71
76
  }
72
- function b(l) {
73
- return Object.keys(l).reduce((d, f) => {
74
- const S = o(f, l[f]);
75
- return d.push(...S), d;
77
+ function h(l) {
78
+ return Object.keys(l).reduce((f, p) => {
79
+ const S = o(p, l[p]);
80
+ return f.push(...S), f;
76
81
  }, []);
77
82
  }
78
- function m(l, u) {
83
+ function y(l, s) {
79
84
  if (n.has(l.operator)) {
80
- const d = n.get(l.operator);
81
- return d && d(l.target, l.param, l.value, u) || !1;
85
+ const f = n.get(l.operator);
86
+ return f && f(l.target, l.param, l.value, s) || !1;
82
87
  }
83
88
  return !1;
84
89
  }
85
- function h(l, u) {
86
- return b(l).reduce((S, M) => S && m(M, u), !0);
90
+ function b(l, s) {
91
+ return h(l).reduce((S, M) => S && y(M, s), !0);
87
92
  }
88
- function E(l, u) {
89
- const d = Object.keys(l), f = d.includes("allOf"), S = d.includes("anyOf"), M = f || S, O = (M ? l[M ? f ? "allOf" : "anyOf" : "allOf"] : [l]).map((p) => h(p, u));
90
- return f ? !O.includes(!1) : O.includes(!0);
93
+ function w(l, s) {
94
+ const f = Object.keys(l), p = f.includes("allOf"), S = f.includes("anyOf"), M = p || S, O = (M ? l[M ? p ? "allOf" : "anyOf" : "allOf"] : [l]).map((d) => b(d, s));
95
+ return p ? !O.includes(!1) : O.includes(!0);
91
96
  }
92
- return { parseValueSchema: E };
97
+ return { parseValueSchema: w };
93
98
  }
94
- const ue = {}, ie = {};
95
- se();
96
- function ce(t, e, a = /* @__PURE__ */ new Map(), n = (m, h, E) => h, o = {}, b = (m) => m) {
97
- return x[e.title] = e, I[e.title] = n, ue[e.title] = o, ie[e.title] = b, (m = {}) => {
98
- const h = oe(m, e, a), E = Object.keys(t).reduce((l, u) => (l[u] = t[u].default, l), {});
99
- return Object.assign(E, h);
99
+ const ie = {}, ce = {};
100
+ ue();
101
+ function fe(a, e, t = /* @__PURE__ */ new Map(), n = (y, b, w, l) => b, o = {}, h = (y) => y) {
102
+ return K[e.title] = e, x[e.title] = n, ie[e.title] = o, ce[e.title] = h, (y = {}) => {
103
+ const b = se(y, e, t), w = Object.keys(a).reduce((l, s) => (l[s] = a[s].default, l), {});
104
+ return Object.assign(w, b);
100
105
  };
101
106
  }
102
- function fe(t, e) {
107
+ function pe(a, e) {
103
108
  return { customClass: e.class, customStyle: e.style };
104
109
  }
105
110
  const de = /* @__PURE__ */ new Map([
106
- ["appearance", fe]
111
+ ["appearance", pe]
107
112
  ]);
108
- function pe(t, e, a) {
113
+ function ve(a, e, t) {
109
114
  return e;
110
115
  }
111
- const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/rate.schema.json", ge = "rate", ye = "A Farris Component", be = "object", he = {
116
+ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/rate.schema.json", ye = "rate", he = "A Farris Component", be = "object", Se = {
112
117
  id: {
113
118
  description: "The unique identifier for rate",
114
119
  type: "string"
@@ -170,23 +175,23 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
170
175
  type: "boolean",
171
176
  default: !0
172
177
  }
173
- }, Se = [
178
+ }, Me = [
174
179
  "id",
175
180
  "type"
176
- ], Me = [
181
+ ], Oe = [
177
182
  "id",
178
183
  "appearance",
179
184
  "binding"
180
- ], Oe = {
181
- $schema: ve,
182
- $id: me,
183
- title: ge,
184
- description: ye,
185
+ ], Te = {
186
+ $schema: me,
187
+ $id: ge,
188
+ title: ye,
189
+ description: he,
185
190
  type: be,
186
- properties: he,
187
- required: Se,
188
- ignore: Me
189
- }, Te = "rate", ke = "A Farris Component", De = "object", Ne = {
191
+ properties: Se,
192
+ required: Me,
193
+ ignore: Oe
194
+ }, ke = "rate", De = "A Farris Component", je = "object", Ne = {
190
195
  basic: {
191
196
  description: "Basic Infomation",
192
197
  title: "基本信息",
@@ -208,12 +213,12 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
208
213
  }
209
214
  }
210
215
  }
211
- }, je = {
212
- title: Te,
213
- description: ke,
214
- type: De,
216
+ }, Ve = {
217
+ title: ke,
218
+ description: De,
219
+ type: je,
215
220
  categories: Ne
216
- }, Ve = ["很不满意", "不满意", "一般", "满意", "非常满意"], U = {
221
+ }, Re = ["很不满意", "不满意", "一般", "满意", "非常满意"], Q = {
217
222
  /** 星星大小 */
218
223
  size: { type: String, default: "large" },
219
224
  /** 启用半颗星模式 */
@@ -235,7 +240,7 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
235
240
  /** 禁用单个星星的文字提示 */
236
241
  toolTipDisabled: { type: Boolean, default: !0 },
237
242
  /** 默认的满意度文案 */
238
- toolTipContents: { type: Array, default: Ve },
243
+ toolTipContents: { type: Array, default: Re },
239
244
  /** 启用评分 */
240
245
  enableScore: { type: Boolean, default: !0 },
241
246
  /** 启用满意度 */
@@ -245,32 +250,32 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
245
250
  */
246
251
  value: { type: Number, default: 0 },
247
252
  modelValue: { type: Number, default: 0 }
248
- }, ee = ce(U, Oe, de, pe, je), z = /* @__PURE__ */ K({
253
+ }, ee = fe(Q, Te, de, ve, Ve), H = /* @__PURE__ */ Z({
249
254
  name: "FRate",
250
- props: U,
255
+ props: Q,
251
256
  emits: ["selectedValue", "update:modelValue"],
252
- setup(t, e) {
253
- const a = r(t.size), n = r(t.enableHalf), o = r(t.enableClear), b = r(t.disabled), m = r(t.pointSystem), h = r(t.lightColor), E = r(t.darkColor), l = r(t.iconClass), u = r(t.numOfStar), d = r(t.toolTipDisabled), f = r(t.toolTipContents), S = r(t.enableScore), M = r(t.enableSatisfaction);
257
+ setup(a, e) {
258
+ const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
254
259
  let v;
255
- const T = r(0), O = r(0), k = r(0), p = r(t.modelValue);
256
- let N = 1, w, c, g;
257
- const y = 4;
258
- J(() => {
260
+ const T = r(0), O = r(0), k = r(0), d = r(a.modelValue);
261
+ let D = 1, u, g, m;
262
+ const j = 4;
263
+ G(() => {
259
264
  });
260
- function C() {
261
- const i = u.value;
262
- g = [];
263
- for (let j = 1; j <= i; j++)
264
- g.push({
265
- id: j
265
+ function P() {
266
+ const c = s.value;
267
+ m = [];
268
+ for (let V = 1; V <= c; V++)
269
+ m.push({
270
+ id: V
266
271
  });
267
272
  }
268
- function P() {
269
- let i;
270
- n.value ? i = Math.ceil(p.value / N) : i = p.value, O.value = (v * p.value + Math.floor(p.value) * y) / N, w = f.value[i - 1];
273
+ function $() {
274
+ let c;
275
+ n.value ? c = Math.ceil(d.value / D) : c = d.value, O.value = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[c - 1];
271
276
  }
272
- function A() {
273
- switch (a.value) {
277
+ function F() {
278
+ switch (t.value) {
274
279
  case "small":
275
280
  v = 14;
276
281
  break;
@@ -284,214 +289,213 @@ const ve = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-
284
289
  v = 24;
285
290
  break;
286
291
  }
287
- C(), u.value && (N = m.value / u.value), p.value && P();
292
+ P(), s.value && (D = y.value / s.value), d.value && $();
288
293
  }
289
- A();
290
- function $(i) {
291
- return i.className.indexOf("f-icon") !== -1;
294
+ F();
295
+ function q(c) {
296
+ return c.className.indexOf("f-icon") !== -1;
292
297
  }
293
- function H() {
294
- return T.value === O.value && o.value && O.value !== 0 ? (O.value = 0, p.value = 0, c = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), e.emit("update:modelValue", p.value), !0) : !1;
298
+ function z() {
299
+ return T.value === O.value && o.value && O.value !== 0 ? (O.value = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), e.emit("update:modelValue", d.value), !0) : !1;
295
300
  }
296
- function q(i, j, s) {
297
- if (i.movementX || i.movementY) {
298
- if (b.value)
301
+ function X(c, V, i) {
302
+ if (c.movementX || c.movementY) {
303
+ if (h.value)
299
304
  return;
300
- M.value && (w = f.value[j - 1]), i.offsetX < v / 2 && n.value === !0 ? (T.value = v * j - v / 2 + y * (j - 1), k.value = N * j - N / 2) : (T.value = v * j + y * (j - 1), k.value = N * j);
305
+ M.value && (u = p.value[V - 1]), c.offsetX < v / 2 && n.value === !0 ? (T.value = v * V - v / 2 + j * (V - 1), k.value = D * V - D / 2) : (T.value = v * V + j * (V - 1), k.value = D * V);
301
306
  }
302
- if (s === !0) {
303
- if (H())
307
+ if (i === !0) {
308
+ if (z())
304
309
  return;
305
- p.value = k.value, O.value = T.value, c = w, e.emit("update:modelValue", p.value), e.emit("selectedValue", p.value);
310
+ d.value = k.value, O.value = T.value, g = u, e.emit("update:modelValue", d.value), e.emit("selectedValue", d.value);
306
311
  }
307
312
  }
308
- function F(i, j) {
309
- var s;
310
- if ($(i.target) && i.target) {
311
- const V = parseInt((s = i.target) == null ? void 0 : s.id);
312
- q(i, V, j);
313
+ function L(c, V) {
314
+ var i;
315
+ if (q(c.target) && c.target) {
316
+ const R = parseInt((i = c.target) == null ? void 0 : i.id);
317
+ X(c, R, V);
313
318
  }
314
319
  }
315
- const X = W(() => k.value ? k.value + "分" : p.value + "分"), _ = W(() => ({
320
+ const _ = W(() => k.value ? k.value + "分" : d.value + "分"), C = W(() => ({
316
321
  width: (T.value || O.value) + "px"
317
322
  }));
318
- function B() {
323
+ function A() {
319
324
  T.value = 0;
320
325
  }
321
- return te(() => t.modelValue, (i) => {
322
- p.value = i, P();
323
- }), () => D("div", {
326
+ return ae(() => a.modelValue, (c) => {
327
+ d.value = c, $();
328
+ }), () => N("div", {
324
329
  class: "farris-star-rating",
325
- onMouseover: R((i) => F(i, !1), ["prevent"]),
326
- onMousemove: R((i) => F(i, !1), ["prevent"]),
327
- onMouseleave: R((i) => B(), ["prevent"]),
328
- onClick: R((i) => F(i, !0), ["prevent"])
329
- }, [D("div", {
330
+ onMouseover: E((c) => L(c, !1), ["prevent"]),
331
+ onMousemove: E((c) => L(c, !1), ["prevent"]),
332
+ onMouseleave: E((c) => A(), ["prevent"]),
333
+ onClick: E((c) => L(c, !0), ["prevent"])
334
+ }, [N("div", {
330
335
  class: "star-light-area",
331
- style: _.value
332
- }, [g.map((i) => D("span", {
336
+ style: C.value
337
+ }, [m.map((c) => N("span", {
333
338
  class: ["f-icon default-light-color ", l.value, {
334
- "f-star-sm": a.value === "small"
339
+ "f-star-sm": t.value === "small"
335
340
  }, {
336
- "f-star-md": a.value === "middle"
341
+ "f-star-md": t.value === "middle"
337
342
  }, {
338
- "f-star-lg": a.value === "large"
343
+ "f-star-lg": t.value === "large"
339
344
  }, {
340
- "f-star-exlarge": a.value === "extraLarge"
345
+ "f-star-exlarge": t.value === "extraLarge"
341
346
  }, {
342
- disabled: d.value
347
+ disabled: f.value
343
348
  }],
344
- id: i.id,
349
+ id: c.id,
345
350
  style: {
346
- color: h.value
351
+ color: b.value
347
352
  }
348
- }, null))]), D("div", {
353
+ }, null))]), N("div", {
349
354
  class: ["star-dark-area", {
350
- small: a.value === "small"
355
+ small: t.value === "small"
351
356
  }, {
352
- middle: a.value === "middle"
357
+ middle: t.value === "middle"
353
358
  }, {
354
- large: a.value === "large"
359
+ large: t.value === "large"
355
360
  }]
356
- }, [g.map((i) => D("span", {
361
+ }, [m.map((c) => N("span", {
357
362
  class: ["f-icon default-dark-color", l.value, {
358
- "f-star-sm": a.value === "small"
363
+ "f-star-sm": t.value === "small"
359
364
  }, {
360
- "f-star-md": a.value === "middle"
365
+ "f-star-md": t.value === "middle"
361
366
  }, {
362
- "f-star-lg": a.value === "large"
367
+ "f-star-lg": t.value === "large"
363
368
  }, {
364
- "f-star-exlarge": a.value === "extraLarge"
369
+ "f-star-exlarge": t.value === "extraLarge"
365
370
  }],
366
- id: i.id,
371
+ id: c.id,
367
372
  style: {
368
- color: E.value
373
+ color: w.value
369
374
  }
370
- }, null))]), D("div", {
375
+ }, null))]), N("div", {
371
376
  class: ["f-utils-fill", {
372
- "font-small": a.value === "small"
377
+ "font-small": t.value === "small"
373
378
  }, {
374
- "font-middle": a.value === "middle"
379
+ "font-middle": t.value === "middle"
375
380
  }, {
376
- "font-large": a.value === "large"
381
+ "font-large": t.value === "large"
377
382
  }, {
378
- "font-exlarge": a.value === "extraLarge"
383
+ "font-exlarge": t.value === "extraLarge"
379
384
  }]
380
- }, [S.value && D("span", null, [L(" "), X.value, L(" ")]), M.value && (c || w) && D("span", null, [L(" "), w || c])])]);
385
+ }, [S.value && N("span", null, [B(" "), _.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
381
386
  }
382
387
  });
383
- function we(t, e, a) {
384
- var w;
385
- function n() {
386
- }
387
- const o = "", b = "", m = r();
388
- function h() {
388
+ function we(a, e, t) {
389
+ var D;
390
+ const n = "", o = "", h = r();
391
+ function y() {
389
392
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
390
393
  }
391
- function E() {
394
+ function b() {
392
395
  return !1;
393
396
  }
394
- function l() {
397
+ function w() {
395
398
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
396
399
  }
397
- function u() {
400
+ function l() {
398
401
  return (e == null ? void 0 : e.schema.componentType) === "frame";
399
402
  }
400
- function d(c) {
401
- if (!c || !c.value)
403
+ function s(u) {
404
+ if (!u || !u.value)
402
405
  return null;
403
- if (c.value.schema && c.value.schema.type === "component")
404
- return c.value;
405
- const g = r(c == null ? void 0 : c.value.parent), y = d(g);
406
- return y || null;
406
+ if (u.value.schema && u.value.schema.type === "component")
407
+ return u.value;
408
+ const g = r(u == null ? void 0 : u.value.parent), m = s(g);
409
+ return m || null;
407
410
  }
408
- function f(c = e) {
409
- const { componentInstance: g, designerItemElementRef: y } = c;
410
- return !g || !g.value ? null : g.value.canMove ? y : f(c.parent);
411
+ function f(u = e) {
412
+ const { componentInstance: g, designerItemElementRef: m } = u;
413
+ return !g || !g.value ? null : g.value.canMove ? m : f(u.parent);
411
414
  }
412
- function S(c) {
413
- return !!a;
415
+ function p(u) {
416
+ return !!t;
414
417
  }
415
- function M() {
418
+ function S() {
416
419
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
417
420
  }
418
- function v() {
421
+ function M() {
419
422
  }
420
- function T(c, g) {
423
+ function v(u, g) {
421
424
  }
422
- function O(c, g) {
423
- const { componentType: y } = c;
424
- let C = G(y, c, g);
425
- const P = y.toLowerCase().replace("-", "_");
426
- return C && !C.id && C.type === y && (C.id = `${P}_${Math.random().toString().slice(2, 6)}`), C;
425
+ function T(u, g) {
426
+ const { componentType: m } = u;
427
+ let j = I(m, u, g);
428
+ const P = m.toLowerCase().replace(/-/g, "_");
429
+ return j && !j.id && j.type === m && (j.id = `${P}_${Math.random().toString().slice(2, 6)}`), j;
427
430
  }
428
- function k(c, g) {
429
- const y = String(c.getAttribute("data-controltype")), C = c.getAttribute("data-feature"), P = C ? JSON.parse(C) : {};
430
- P.parentComponentInstance = m.value;
431
- let A = G(y, P);
432
- const $ = y.toLowerCase().replace("-", "_");
433
- return A && !A.id && A.type === y && (A.id = `${$}_${Math.random().toString().slice(2, 6)}`), A;
431
+ function O(u) {
434
432
  }
435
- function p(c) {
433
+ function k(...u) {
436
434
  }
437
- function N(...c) {
435
+ function d() {
436
+ e != null && e.schema.contents && e.schema.contents.map((u) => {
437
+ var j;
438
+ let g = u.id;
439
+ u.type === "component-ref" && (g = u.component);
440
+ const m = a.value.querySelector(`#${g}-design-item`);
441
+ (j = m == null ? void 0 : m.componentInstance) != null && j.value.onRemoveComponent && m.componentInstance.value.onRemoveComponent();
442
+ });
438
443
  }
439
- return m.value = {
440
- canMove: h(),
441
- canSelectParent: E(),
442
- canDelete: l(),
443
- canNested: !u(),
444
+ return h.value = {
445
+ canMove: y(),
446
+ canSelectParent: b(),
447
+ canDelete: w(),
448
+ canNested: !l(),
444
449
  contents: e == null ? void 0 : e.schema.contents,
445
- elementRef: t,
446
- parent: (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance,
450
+ elementRef: a,
451
+ parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
447
452
  schema: e == null ? void 0 : e.schema,
448
- styles: o,
449
- designerClass: b,
450
- canAccepts: S,
451
- getBelongedComponentInstance: d,
453
+ styles: n,
454
+ designerClass: o,
455
+ canAccepts: p,
456
+ getBelongedComponentInstance: s,
452
457
  getDraggableDesignItemElement: f,
453
- getDraggingDisplayText: M,
454
- getPropConfig: N,
455
- getDragScopeElement: v,
456
- onAcceptMovedChildElement: T,
457
- onAcceptNewChildElement: k,
458
- onChildElementMovedOut: p,
459
- addNewChildComponentSchema: O,
460
- updateDragAndDropRules: n,
458
+ getDraggingDisplayText: S,
459
+ getPropConfig: k,
460
+ getDragScopeElement: M,
461
+ onAcceptMovedChildElement: v,
462
+ onChildElementMovedOut: O,
463
+ addNewChildComponentSchema: T,
461
464
  triggerBelongedComponentToMoveWhenMoved: r(!1),
462
- triggerBelongedComponentToDeleteWhenDeleted: r(!1)
463
- }, m;
465
+ triggerBelongedComponentToDeleteWhenDeleted: r(!1),
466
+ onRemoveComponent: d
467
+ }, h;
464
468
  }
465
- const Ce = /* @__PURE__ */ K({
469
+ const Ee = /* @__PURE__ */ Z({
466
470
  name: "FRateDesign",
467
- props: U,
471
+ props: Q,
468
472
  emits: ["selectedValue"],
469
- setup(t, e) {
470
- const a = r(t.size), n = r(t.enableHalf), o = r(t.enableClear), b = r(t.disabled), m = r(t.pointSystem), h = r(t.lightColor), E = r(t.darkColor), l = r(t.iconClass), u = r(t.numOfStar), d = r(t.toolTipDisabled), f = r(t.toolTipContents), S = r(t.enableScore), M = r(t.enableSatisfaction);
473
+ setup(a, e) {
474
+ const t = r(a.size), n = r(a.enableHalf), o = r(a.enableClear), h = r(a.disabled), y = r(a.pointSystem), b = r(a.lightColor), w = r(a.darkColor), l = r(a.iconClass), s = r(a.numOfStar), f = r(a.toolTipDisabled), p = r(a.toolTipContents), S = r(a.enableScore), M = r(a.enableSatisfaction);
471
475
  let v;
472
476
  const T = r(1);
473
477
  let O = 0;
474
- const k = r(0), p = r(0);
475
- let N = 1, w, c, g;
476
- const y = 4, C = r(), P = ae("design-item-context"), A = we(C, P);
477
- J(() => {
478
- C.value.componentInstance = A;
479
- }), e.expose(A.value), J(() => {
478
+ const k = r(0), d = r(0);
479
+ let D = 1, u, g, m;
480
+ const j = 4, P = r(), $ = te("design-item-context"), F = we(P, $);
481
+ G(() => {
482
+ P.value.componentInstance = F;
483
+ }), e.expose(F.value), G(() => {
480
484
  });
481
- function $() {
482
- const s = u.value;
483
- g = [];
484
- for (let V = 1; V <= s; V++)
485
- g.push({
486
- id: V
485
+ function q() {
486
+ const i = s.value;
487
+ m = [];
488
+ for (let R = 1; R <= i; R++)
489
+ m.push({
490
+ id: R
487
491
  });
488
492
  }
489
- function H() {
490
- let s;
491
- n.value ? s = Math.ceil(p.value / N) : s = p.value, O = (v * p.value + Math.floor(p.value) * y) / N, w = f.value[s - 1];
493
+ function z() {
494
+ let i;
495
+ n.value ? i = Math.ceil(d.value / D) : i = d.value, O = (v * d.value + Math.floor(d.value) * j) / D, u = p.value[i - 1];
492
496
  }
493
- function q() {
494
- switch (a.value) {
497
+ function X() {
498
+ switch (t.value) {
495
499
  case "small":
496
500
  v = 14;
497
501
  break;
@@ -505,112 +509,107 @@ const Ce = /* @__PURE__ */ K({
505
509
  v = 24;
506
510
  break;
507
511
  }
508
- $(), u.value && (N = m.value / u.value), p.value && H();
512
+ q(), s.value && (D = y.value / s.value), d.value && z();
509
513
  }
510
- q();
511
- function F(s) {
512
- return s.className.indexOf("f-icon") !== -1;
514
+ X();
515
+ function L(i) {
516
+ return i.className.indexOf("f-icon") !== -1;
513
517
  }
514
- function X() {
515
- return T.value === O && o && O !== 0 ? (O = 0, p.value = 0, c = null, T.value = 0, k.value = 0, e.emit("selectedValue", p.value), !0) : !1;
518
+ function _() {
519
+ return T.value === O && o && O !== 0 ? (O = 0, d.value = 0, g = null, T.value = 0, k.value = 0, e.emit("selectedValue", d.value), !0) : !1;
516
520
  }
517
- function _(s, V, Y) {
518
- if (s.movementX || s.movementY) {
519
- if (b.value)
521
+ function C(i, R, Y) {
522
+ if (i.movementX || i.movementY) {
523
+ if (h.value)
520
524
  return;
521
- M.value && (w = f.value[V - 1]), s.offsetX < v / 2 && n.value === !0 ? (T.value = v * V - v / 2 + y * (V - 1), k.value = N * V - N / 2) : (T.value = v * V + y * (V - 1), k.value = N * V);
525
+ M.value && (u = p.value[R - 1]), i.offsetX < v / 2 && n.value === !0 ? (T.value = v * R - v / 2 + j * (R - 1), k.value = D * R - D / 2) : (T.value = v * R + j * (R - 1), k.value = D * R);
522
526
  }
523
527
  if (Y === !0) {
524
- if (X())
528
+ if (_())
525
529
  return;
526
- p.value = k.value, O = T.value, c = w, e.emit("selectedValue", p.value);
530
+ d.value = k.value, O = T.value, g = u, e.emit("selectedValue", d.value);
527
531
  }
528
532
  }
529
- function B(s, V) {
530
- if (F(s.target) && s.target) {
531
- const Y = parseInt(s.target.id);
532
- _(s, Y, V);
533
+ function A(i, R) {
534
+ if (L(i.target) && i.target) {
535
+ const Y = parseInt(i.target.id);
536
+ C(i, Y, R);
533
537
  }
534
538
  }
535
- const i = W(() => k.value ? k.value + "分" : p.value + "分"), j = W(() => ({
539
+ const c = W(() => k.value ? k.value + "分" : d.value + "分"), V = W(() => ({
536
540
  width: (T.value || O) + "px"
537
541
  }));
538
- return () => D("div", {
542
+ return () => N("div", {
539
543
  class: "farris-star-rating",
540
- ref: C,
541
- onMouseover: R((s) => B(s, !1), ["prevent"]),
542
- onMousemove: R((s) => B(s, !1), ["prevent"]),
543
- onMouseout: R((s) => B(s, !1), ["prevent"]),
544
- onClick: R((s) => B(s, !0), ["prevent"])
545
- }, [D("div", {
544
+ ref: P,
545
+ onMouseover: E((i) => A(i, !1), ["prevent"]),
546
+ onMousemove: E((i) => A(i, !1), ["prevent"]),
547
+ onMouseout: E((i) => A(i, !1), ["prevent"]),
548
+ onClick: E((i) => A(i, !0), ["prevent"])
549
+ }, [N("div", {
546
550
  class: "star-light-area",
547
- style: j.value
548
- }, [g.map((s) => D("span", {
551
+ style: V.value
552
+ }, [m.map((i) => N("span", {
549
553
  class: ["f-icon default-light-color ", l.value, {
550
- "f-star-sm": a.value === "small"
554
+ "f-star-sm": t.value === "small"
551
555
  }, {
552
- "f-star-md": a.value === "middle"
556
+ "f-star-md": t.value === "middle"
553
557
  }, {
554
- "f-star-lg": a.value === "large"
558
+ "f-star-lg": t.value === "large"
555
559
  }, {
556
- "f-star-exlarge": a.value === "extraLarge"
560
+ "f-star-exlarge": t.value === "extraLarge"
557
561
  }, {
558
- disabled: d.value
562
+ disabled: f.value
559
563
  }],
560
- id: s.id,
564
+ id: i.id,
561
565
  style: {
562
- color: h.value
566
+ color: b.value
563
567
  }
564
- }, null))]), D("div", {
568
+ }, null))]), N("div", {
565
569
  class: ["star-dark-area", {
566
- small: a.value === "small"
570
+ small: t.value === "small"
567
571
  }, {
568
- middle: a.value === "middle"
572
+ middle: t.value === "middle"
569
573
  }, {
570
- large: a.value === "large"
574
+ large: t.value === "large"
571
575
  }]
572
- }, [g.map((s) => D("span", {
576
+ }, [m.map((i) => N("span", {
573
577
  class: ["f-icon default-dark-color", l.value, {
574
- "f-star-sm": a.value === "small"
578
+ "f-star-sm": t.value === "small"
575
579
  }, {
576
- "f-star-md": a.value === "middle"
580
+ "f-star-md": t.value === "middle"
577
581
  }, {
578
- "f-star-lg": a.value === "large"
582
+ "f-star-lg": t.value === "large"
579
583
  }, {
580
- "f-star-exlarge": a.value === "extraLarge"
584
+ "f-star-exlarge": t.value === "extraLarge"
581
585
  }],
582
- id: s.id,
586
+ id: i.id,
583
587
  style: {
584
- color: E.value
588
+ color: w.value
585
589
  }
586
- }, null))]), D("div", {
590
+ }, null))]), N("div", {
587
591
  class: ["f-utils-fill", {
588
- "font-small": a.value === "small"
592
+ "font-small": t.value === "small"
589
593
  }, {
590
- "font-middle": a.value === "middle"
594
+ "font-middle": t.value === "middle"
591
595
  }, {
592
- "font-large": a.value === "large"
596
+ "font-large": t.value === "large"
593
597
  }, {
594
- "font-exlarge": a.value === "extraLarge"
598
+ "font-exlarge": t.value === "extraLarge"
595
599
  }]
596
- }, [S.value && D("span", null, [L(" "), i.value, L(" ")]), M.value && (c || w) && D("span", null, [L(" "), w || c])])]);
600
+ }, [S.value && N("span", null, [B(" "), c.value, B(" ")]), M.value && (g || u) && N("span", null, [B(" "), u || g])])]);
597
601
  }
598
- }), Ee = (t) => {
599
- const e = t;
600
- return e.install = function(a) {
601
- a.component(e.name, t);
602
- }, t;
603
- };
604
- z.register = (t, e, a, n) => {
605
- t.rate = z, e.rate = ee;
602
+ });
603
+ H.register = (a, e, t, n) => {
604
+ a.rate = H, e.rate = ee;
606
605
  };
607
- z.registerDesigner = (t, e, a) => {
608
- t.rate = Ce, e.rate = ee;
606
+ H.registerDesigner = (a, e, t) => {
607
+ a.rate = Ee, e.rate = ee;
609
608
  };
610
- const Re = Ee(z);
609
+ const Le = re(H);
611
610
  export {
612
- z as FRate,
613
- Re as default,
611
+ H as FRate,
612
+ Le as default,
614
613
  ee as propsResolver,
615
- U as rateProps
614
+ Q as rateProps
616
615
  };