@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,101 +1,105 @@
1
- import { defineComponent as B, ref as T, watch as $, computed as W, createVNode as c, onMounted as U, inject as se } from "vue";
2
- import { isPlainObject as K, cloneDeep as ce } from "lodash-es";
3
- const ee = {}, ne = {};
4
- function Q(e) {
5
- const { properties: t, title: d, ignore: h } = e, y = h && Array.isArray(h), i = Object.keys(t).reduce((o, s) => ((!y || !h.find((k) => k == s)) && (o[s] = t[s].type === "object" && t[s].properties ? Q(t[s]) : ce(t[s].default)), o), {});
6
- return (!y || !h.find((o) => o == "id")) && (i.id = `${d}-${Date.now()}`), i;
1
+ import { defineComponent as F, ref as V, watch as $, computed as W, createVNode as c, onMounted as J, inject as se } from "vue";
2
+ import { isPlainObject as Z, cloneDeep as ce } from "lodash-es";
3
+ const K = {}, ee = {};
4
+ function U(e) {
5
+ const { properties: t, title: l, ignore: m } = e, y = m && Array.isArray(m), u = Object.keys(t).reduce((o, s) => ((!y || !m.find((k) => k === s)) && (o[s] = t[s].type === "object" && t[s].properties ? U(t[s]) : ce(t[s].default)), o), {});
6
+ if (l && (!y || !m.find((o) => o === "id"))) {
7
+ const o = l.toLowerCase().replace(/-/g, "_");
8
+ u.id = `${o}_${Math.random().toString().slice(2, 6)}`;
9
+ }
10
+ return u;
7
11
  }
8
- function z(e, t = {}, d) {
9
- const h = ee[e];
10
- if (h) {
11
- let y = Q(h);
12
- const i = ne[e];
13
- return y = i ? i({ getSchemaByType: z }, y, t, d) : y, y;
12
+ function ne(e, t = {}, l) {
13
+ const m = K[e];
14
+ if (m) {
15
+ let y = U(m);
16
+ const u = ee[e];
17
+ return y = u ? u({ getSchemaByType: ne }, y, t, l) : y, y;
14
18
  }
15
19
  return null;
16
20
  }
17
21
  function le(e, t) {
18
- const d = Q(t);
19
- return Object.keys(e).reduce((h, y) => (h[y] && K(h[y]) && K(e[y]) ? Object.assign(h[y], e[y]) : h[y] = e[y], h), d), d;
22
+ const l = U(t);
23
+ return Object.keys(l).reduce((m, y) => (m[y] && Z(m[y]) && Z(e[y] || !e[y]) ? Object.assign(m[y], e[y] || {}) : m[y] = e[y], m), l), l;
20
24
  }
21
25
  function ue(e, t) {
22
- return Object.keys(e).filter((h) => e[h] != null).reduce((h, y) => {
26
+ return Object.keys(e).filter((m) => e[m] != null).reduce((m, y) => {
23
27
  if (t.has(y)) {
24
- const i = t.get(y);
25
- if (typeof i == "string")
26
- h[i] = e[y];
28
+ const u = t.get(y);
29
+ if (typeof u == "string")
30
+ m[u] = e[y];
27
31
  else {
28
- const o = i(y, e[y], e);
29
- Object.assign(h, o);
32
+ const o = u(y, e[y], e);
33
+ Object.assign(m, o);
30
34
  }
31
35
  } else
32
- h[y] = e[y];
33
- return h;
36
+ m[y] = e[y];
37
+ return m;
34
38
  }, {});
35
39
  }
36
- function ie(e, t, d = /* @__PURE__ */ new Map()) {
37
- const h = le(e, t);
38
- return ue(h, d);
40
+ function ie(e, t, l = /* @__PURE__ */ new Map()) {
41
+ const m = le(e, t);
42
+ return ue(m, l);
39
43
  }
40
44
  function de(e = {}) {
41
- function t(n, m, g, M) {
45
+ function t(n, p, g, b) {
42
46
  if (typeof g == "number")
43
- return M[n].length === g;
47
+ return b[n].length === g;
44
48
  if (typeof g == "object") {
45
- const l = Object.keys(g)[0], v = g[l];
46
- if (l === "not")
47
- return Number(M[n].length) !== Number(v);
48
- if (l === "moreThan")
49
- return Number(M[n].length) >= Number(v);
50
- if (l === "lessThan")
51
- return Number(M[n].length) <= Number(v);
49
+ const i = Object.keys(g)[0], f = g[i];
50
+ if (i === "not")
51
+ return Number(b[n].length) !== Number(f);
52
+ if (i === "moreThan")
53
+ return Number(b[n].length) >= Number(f);
54
+ if (i === "lessThan")
55
+ return Number(b[n].length) <= Number(f);
52
56
  }
53
57
  return !1;
54
58
  }
55
- function d(n, m, g, M) {
56
- return M[n] && M[n].propertyValue && String(M[n].propertyValue.value) === String(g);
59
+ function l(n, p, g, b) {
60
+ return b[n] && b[n].propertyValue && String(b[n].propertyValue.value) === String(g);
57
61
  }
58
- const h = /* @__PURE__ */ new Map([
62
+ const m = /* @__PURE__ */ new Map([
59
63
  ["length", t],
60
- ["getProperty", d]
64
+ ["getProperty", l]
61
65
  ]);
62
- Object.keys(e).reduce((n, m) => (n.set(m, e[m]), n), h);
63
- function y(n, m) {
66
+ Object.keys(e).reduce((n, p) => (n.set(p, e[p]), n), m);
67
+ function y(n, p) {
64
68
  const g = n;
65
- return typeof m == "number" ? [{ target: g, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: g, operator: "getProperty", param: n, value: !!m }] : typeof m == "object" ? Object.keys(m).map((M) => {
66
- if (M === "length")
67
- return { target: g, operator: "length", param: null, value: m[M] };
68
- const l = M, v = m[M];
69
- return { target: g, operator: "getProperty", param: l, value: v };
69
+ return typeof p == "number" ? [{ target: g, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: g, operator: "getProperty", param: n, value: !!p }] : typeof p == "object" ? Object.keys(p).map((b) => {
70
+ if (b === "length")
71
+ return { target: g, operator: "length", param: null, value: p[b] };
72
+ const i = b, f = p[b];
73
+ return { target: g, operator: "getProperty", param: i, value: f };
70
74
  }) : [];
71
75
  }
72
- function i(n) {
73
- return Object.keys(n).reduce((g, M) => {
74
- const l = y(M, n[M]);
75
- return g.push(...l), g;
76
+ function u(n) {
77
+ return Object.keys(n).reduce((g, b) => {
78
+ const i = y(b, n[b]);
79
+ return g.push(...i), g;
76
80
  }, []);
77
81
  }
78
- function o(n, m) {
79
- if (h.has(n.operator)) {
80
- const g = h.get(n.operator);
81
- return g && g(n.target, n.param, n.value, m) || !1;
82
+ function o(n, p) {
83
+ if (m.has(n.operator)) {
84
+ const g = m.get(n.operator);
85
+ return g && g(n.target, n.param, n.value, p) || !1;
82
86
  }
83
87
  return !1;
84
88
  }
85
- function s(n, m) {
86
- return i(n).reduce((l, v) => l && o(v, m), !0);
89
+ function s(n, p) {
90
+ return u(n).reduce((i, f) => i && o(f, p), !0);
87
91
  }
88
- function k(n, m) {
89
- const g = Object.keys(n), M = g.includes("allOf"), l = g.includes("anyOf"), v = M || l, u = (v ? n[v ? M ? "allOf" : "anyOf" : "allOf"] : [n]).map((r) => s(r, m));
90
- return M ? !u.includes(!1) : u.includes(!0);
92
+ function k(n, p) {
93
+ const g = Object.keys(n), b = g.includes("allOf"), i = g.includes("anyOf"), f = b || i, d = (f ? n[f ? b ? "allOf" : "anyOf" : "allOf"] : [n]).map((r) => s(r, p));
94
+ return b ? !d.includes(!1) : d.includes(!0);
91
95
  }
92
96
  return { parseValueSchema: k };
93
97
  }
94
98
  const ye = {}, ve = {};
95
99
  de();
96
- function fe(e, t, d = /* @__PURE__ */ new Map(), h = (o, s, k) => s, y = {}, i = (o) => o) {
97
- return ee[t.title] = t, ne[t.title] = h, ye[t.title] = y, ve[t.title] = i, (o = {}) => {
98
- const s = ie(o, t, d), k = Object.keys(e).reduce((n, m) => (n[m] = e[m].default, n), {});
100
+ function fe(e, t, l = /* @__PURE__ */ new Map(), m = (o, s, k, n) => s, y = {}, u = (o) => o) {
101
+ return K[t.title] = t, ee[t.title] = m, ye[t.title] = y, ve[t.title] = u, (o = {}) => {
102
+ const s = ie(o, t, l), k = Object.keys(e).reduce((n, p) => (n[p] = e[p].default, n), {});
99
103
  return Object.assign(k, s);
100
104
  };
101
105
  }
@@ -105,7 +109,7 @@ function he(e, t) {
105
109
  const me = /* @__PURE__ */ new Map([
106
110
  ["appearance", he]
107
111
  ]);
108
- function pe(e, t, d) {
112
+ function pe(e, t, l) {
109
113
  return t;
110
114
  }
111
115
  const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/calendar.schema.json", ke = "calendar", De = "A Farris Input Component", be = "object", Me = {
@@ -134,7 +138,7 @@ const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
134
138
  }, Te = [
135
139
  "id",
136
140
  "type"
137
- ], Ce = {
141
+ ], Ve = {
138
142
  $schema: we,
139
143
  $id: ge,
140
144
  title: ke,
@@ -142,7 +146,7 @@ const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
142
146
  type: be,
143
147
  properties: Me,
144
148
  required: Te
145
- }, Ve = "calendar", Pe = "A Farris Component", Ne = "object", Oe = {
149
+ }, Pe = "calendar", Ne = "A Farris Component", Oe = "object", We = {
146
150
  basic: {
147
151
  description: "Basic Infomation",
148
152
  title: "基本信息",
@@ -164,17 +168,17 @@ const we = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
164
168
  }
165
169
  }
166
170
  }
167
- }, We = {
168
- title: Ve,
169
- description: Pe,
170
- type: Ne,
171
- categories: Oe
172
- }, X = {
171
+ }, Ce = {
172
+ title: Pe,
173
+ description: Ne,
174
+ type: Oe,
175
+ categories: We
176
+ }, Q = {
173
177
  events: { Type: Array, default: [] },
174
178
  firstDayOfTheWeek: { type: String, default: "Sun." }
175
- }, te = fe(X, Ce, me, pe, We), F = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
176
- var E = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(E || {});
177
- function J() {
179
+ }, te = fe(Q, Ve, me, pe, Ce), I = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
180
+ var A = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(A || {});
181
+ function z() {
178
182
  function e() {
179
183
  return { year: 0, month: 0, day: 0 };
180
184
  }
@@ -189,9 +193,9 @@ function J() {
189
193
  0
190
194
  );
191
195
  }
192
- function d(n) {
193
- const m = /* @__PURE__ */ new Date();
194
- return n.year || (n.year = m.getFullYear()), n.month || (n.month = m.getMonth() + 1), n.day || (n.day = 1), new Date(
196
+ function l(n) {
197
+ const p = /* @__PURE__ */ new Date();
198
+ return n.year || (n.year = p.getFullYear()), n.month || (n.month = p.getMonth() + 1), n.day || (n.day = 1), new Date(
195
199
  n.year,
196
200
  n.month - 1,
197
201
  n.day,
@@ -201,7 +205,7 @@ function J() {
201
205
  0
202
206
  );
203
207
  }
204
- function h(n) {
208
+ function m(n) {
205
209
  return new Date(
206
210
  n.year || 1,
207
211
  (n.month || 1) - 1,
@@ -213,17 +217,17 @@ function J() {
213
217
  ).getDay();
214
218
  }
215
219
  function y(n) {
216
- return F.indexOf(n);
220
+ return I.indexOf(n);
217
221
  }
218
- function i(n) {
222
+ function u(n) {
219
223
  return t(n).getTime();
220
224
  }
221
225
  function o(n) {
222
- return Math.round(i(n) / 1e3);
226
+ return Math.round(u(n) / 1e3);
223
227
  }
224
- function s(n, m, g) {
225
- const M = i(m), l = i(g), v = i(n);
226
- return l - v > v - M ? m : g;
228
+ function s(n, p, g) {
229
+ const b = u(p), i = u(g), f = u(n);
230
+ return i - f > f - b ? p : g;
227
231
  }
228
232
  function k() {
229
233
  const n = /* @__PURE__ */ new Date();
@@ -236,188 +240,188 @@ function J() {
236
240
  second: n.getSeconds()
237
241
  };
238
242
  }
239
- return { emptyDate: e, getDate: t, getDate2: d, getDayNumber: h, getEpocTime: o, getNearDate: s, getWeekdayIndex: y, getTimeInMilliseconds: i, getToday: k };
243
+ return { emptyDate: e, getDate: t, getDate2: l, getDayNumber: m, getEpocTime: o, getNearDate: s, getWeekdayIndex: y, getTimeInMilliseconds: u, getToday: k };
240
244
  }
241
245
  function Se() {
242
- function e(i, o) {
243
- return new Date(o, i, 0).getDate();
246
+ function e(u, o) {
247
+ return new Date(o, u, 0).getDate();
244
248
  }
245
- function t(i, o, s) {
246
- return new Date(i, o - 1, s, 0, 0, 0, 0);
249
+ function t(u, o, s) {
250
+ return new Date(u, o - 1, s, 0, 0, 0, 0);
247
251
  }
248
- function d(i, o) {
249
- const s = t(o, i, 1);
252
+ function l(u, o) {
253
+ const s = t(o, u, 1);
250
254
  return s.setMonth(s.getMonth() - 1), e(s.getMonth() + 1, s.getFullYear());
251
255
  }
252
- function h(i, o) {
256
+ function m(u, o) {
253
257
  const s = {
254
- year: i === 12 ? o + 1 : o
255
- }, k = i === 12 ? 1 : i + 1;
258
+ year: u === 12 ? o + 1 : o
259
+ }, k = u === 12 ? 1 : u + 1;
256
260
  return s.month = k, s;
257
261
  }
258
- function y(i, o) {
262
+ function y(u, o) {
259
263
  const s = {
260
- year: i === 1 ? o - 1 : o
261
- }, k = i === 1 ? 12 : i - 1;
264
+ year: u === 1 ? o - 1 : o
265
+ }, k = u === 1 ? 12 : u - 1;
262
266
  return s.month = k, s;
263
267
  }
264
- return { daysInMonth: e, daysInPreMonth: d, getNextMonth: h, getPreviousMonth: y };
268
+ return { daysInMonth: e, daysInPreMonth: l, getNextMonth: m, getPreviousMonth: y };
265
269
  }
266
270
  function ae() {
267
- const { getToday: e, getDayNumber: t } = J(), { daysInMonth: d, daysInPreMonth: h, getNextMonth: y, getPreviousMonth: i } = Se();
268
- function o(f) {
269
- const D = F.indexOf(f);
271
+ const { getToday: e, getDayNumber: t } = z(), { daysInMonth: l, daysInPreMonth: m, getNextMonth: y, getPreviousMonth: u } = Se();
272
+ function o(h) {
273
+ const D = I.indexOf(h);
270
274
  return D > 0 ? 7 - D : 0;
271
275
  }
272
- function s(f) {
273
- const { day: D, month: u, year: a } = f;
274
- if (D === void 0 || u === void 0 || a === void 0)
276
+ function s(h) {
277
+ const { day: D, month: d, year: a } = h;
278
+ if (D === void 0 || d === void 0 || a === void 0)
275
279
  throw new Error("invalided date.");
276
- const r = D === 1, p = r ? h(u, a) : D - 1, b = r ? u - 1 : u, w = b < 1, C = w ? 12 : b;
280
+ const r = D === 1, w = r ? m(d, a) : D - 1, v = r ? d - 1 : d, M = v < 1, T = M ? 12 : v;
277
281
  return {
278
- year: w ? a - 1 : a,
279
- month: C,
280
- day: p
282
+ year: M ? a - 1 : a,
283
+ month: T,
284
+ day: w
281
285
  };
282
286
  }
283
- function k(f) {
284
- const { day: D, month: u, year: a } = f;
285
- if (D === void 0 || u === void 0 || a === void 0)
287
+ function k(h) {
288
+ const { day: D, month: d, year: a } = h;
289
+ if (D === void 0 || d === void 0 || a === void 0)
286
290
  throw new Error("invalided date.");
287
- const r = d(u, a), p = D === r, b = p ? 1 : D + 1, w = p ? u + 1 : u, C = w > 12, V = C ? 1 : w;
291
+ const r = l(d, a), w = D === r, v = w ? 1 : D + 1, M = w ? d + 1 : d, T = M > 12, P = T ? 1 : M;
288
292
  return {
289
- year: C ? a + 1 : a,
290
- month: V,
291
- day: b
293
+ year: T ? a + 1 : a,
294
+ month: P,
295
+ day: v
292
296
  };
293
297
  }
294
- function n(f) {
295
- const D = i(f.month || 1, f.year || 1), u = d(D.month || 1, D.year || 1);
298
+ function n(h) {
299
+ const D = u(h.month || 1, h.year || 1), d = l(D.month || 1, D.year || 1);
296
300
  return {
297
- day: (f.day || 1) <= u ? f.day : u,
301
+ day: (h.day || 1) <= d ? h.day : d,
298
302
  month: D.month,
299
303
  year: D.year
300
304
  };
301
305
  }
302
- function m(f) {
303
- const D = y(f.month || 1, f.year || 1), u = d(D.month || 1, D.year || 1);
306
+ function p(h) {
307
+ const D = y(h.month || 1, h.year || 1), d = l(D.month || 1, D.year || 1);
304
308
  return {
305
- day: (f.day || 1) <= u ? f.day : u,
309
+ day: (h.day || 1) <= d ? h.day : d,
306
310
  month: D.month,
307
311
  year: D.year
308
312
  };
309
313
  }
310
- function g(f) {
311
- const u = (f.day || 1) - 7, a = u < 1, r = a ? d(f.month || 1, f.year || 1) + u : u, p = a ? i(f.month || 1, f.year || 1) : f;
314
+ function g(h) {
315
+ const d = (h.day || 1) - 7, a = d < 1, r = a ? l(h.month || 1, h.year || 1) + d : d, w = a ? u(h.month || 1, h.year || 1) : h;
312
316
  return {
313
317
  day: r,
314
- month: p.month,
315
- year: p.year
318
+ month: w.month,
319
+ year: w.year
316
320
  };
317
321
  }
318
- function M(f) {
319
- const u = (f.day || 1) + 7, a = d(f.month || 1, f.year || 1), r = u > a, p = r ? u - a : u, b = r ? y(f.month || 1, f.year || 1) : f;
322
+ function b(h) {
323
+ const d = (h.day || 1) + 7, a = l(h.month || 1, h.year || 1), r = d > a, w = r ? d - a : d, v = r ? y(h.month || 1, h.year || 1) : h;
320
324
  return {
321
- day: p,
322
- month: b.month,
323
- year: b.year
325
+ day: w,
326
+ month: v.month,
327
+ year: v.year
324
328
  };
325
329
  }
326
- function l(f, D, u, a) {
327
- const r = { day: f, month: D, year: u }, b = o(a) === 0 ? 1 : 0, w = t(r) + b, C = e();
328
- let V = s(r);
329
- const O = [];
330
- for (let j = w - 1; j >= 1; j--) {
331
- const R = V.month !== r.month ? E.previous : E.current, N = V.month === D && V.day === C.day && V.month === C.month && V.year === C.year;
332
- O.push({ date: V, monthTag: R, isCurrent: N }), j > 1 && (V = s(V));
330
+ function i(h, D, d, a) {
331
+ const r = { day: h, month: D, year: d }, v = o(a) === 0 ? 1 : 0, M = t(r) + v, T = e();
332
+ let P = s(r);
333
+ const S = [];
334
+ for (let j = M - 1; j >= 1; j--) {
335
+ const R = P.month !== r.month ? A.previous : A.current, O = P.month === D && P.day === T.day && P.month === T.month && P.year === T.year;
336
+ S.push({ date: P, monthTag: R, isCurrent: O }), j > 1 && (P = s(P));
333
337
  }
334
- let S = k(r);
335
- const A = [];
336
- for (let j = w + 1; j <= 7; j++) {
337
- const R = V.month !== r.month ? E.next : E.current, N = S.day === C.day && S.month === C.month && S.year === C.year;
338
- A.push({ date: S, monthTag: R, isCurrent: N }), j < 7 && (S = k(S));
338
+ let C = k(r);
339
+ const E = [];
340
+ for (let j = M + 1; j <= 7; j++) {
341
+ const R = P.month !== r.month ? A.next : A.current, O = C.day === T.day && C.month === T.month && C.year === T.year;
342
+ E.push({ date: C, monthTag: R, isCurrent: O }), j < 7 && (C = k(C));
339
343
  }
340
- const P = f === C.day && D === C.month && u === C.year;
344
+ const N = h === T.day && D === T.month && d === T.year;
341
345
  return {
342
- days: [...O.reverse(), { date: r, monthTag: E.current, isCurrent: P }, ...A],
346
+ days: [...S.reverse(), { date: r, monthTag: A.current, isCurrent: N }, ...E],
343
347
  weekNumber: 0,
344
- year: u
348
+ year: d
345
349
  };
346
350
  }
347
- function v(f, D, u) {
348
- const a = [], r = d(f, D);
349
- for (let p = 1; p <= r; p += 7) {
350
- const b = l(p, f, D, u);
351
- a.push(b);
351
+ function f(h, D, d) {
352
+ const a = [], r = l(h, D);
353
+ for (let w = 1; w <= r; w += 7) {
354
+ const v = i(w, h, D, d);
355
+ a.push(v);
352
356
  }
353
357
  return a;
354
358
  }
355
359
  return {
356
- getMonthlyCalendar: v,
357
- getWeeklyCalendar: l,
360
+ getMonthlyCalendar: f,
361
+ getWeeklyCalendar: i,
358
362
  getPreviousDay: s,
359
363
  getNextDay: k,
360
364
  getDayInPreviousWeek: g,
361
- getDayInNextWeek: M,
365
+ getDayInNextWeek: b,
362
366
  getDayInPreviousMonth: n,
363
- getDayInNextMonth: m
367
+ getDayInNextMonth: p
364
368
  };
365
369
  }
366
- function x() {
367
- const { getTimeInMilliseconds: e } = J();
368
- function t(l) {
369
- return l && l.year !== 0 && l.month !== 0 && l.day !== 0;
370
+ function H() {
371
+ const { getTimeInMilliseconds: e } = z();
372
+ function t(i) {
373
+ return i && i.year !== 0 && i.month !== 0 && i.day !== 0;
370
374
  }
371
- function d(l) {
372
- return l && l.year !== 0 && l.month !== 0;
375
+ function l(i) {
376
+ return i && i.year !== 0 && i.month !== 0;
373
377
  }
374
- function h(l) {
375
- return l && l.year !== 0;
378
+ function m(i) {
379
+ return i && i.year !== 0;
376
380
  }
377
- function y(l, v) {
378
- return e(l) < e(v);
381
+ function y(i, f) {
382
+ return e(i) < e(f);
379
383
  }
380
- function i(l, v) {
381
- return e(l) <= e(v);
384
+ function u(i, f) {
385
+ return e(i) <= e(f);
382
386
  }
383
- function o(l, v) {
384
- return e(l) === e(v);
387
+ function o(i, f) {
388
+ return e(i) === e(f);
385
389
  }
386
- function s(l, v) {
387
- const f = e(v);
388
- return e(l.from) === f || e(l.to) === f;
390
+ function s(i, f) {
391
+ const h = e(f);
392
+ return e(i.from) === h || e(i.to) === h;
389
393
  }
390
- function k(l, v) {
391
- return !v || !t(v.to) || !t(v.from) ? !1 : i(v.from, l) && i(l, v.to);
394
+ function k(i, f) {
395
+ return !f || !t(f.to) || !t(f.from) ? !1 : u(f.from, i) && u(i, f.to);
392
396
  }
393
- function n(l, v) {
394
- return t(v) && e(l) >= e(v);
397
+ function n(i, f) {
398
+ return t(f) && e(i) >= e(f);
395
399
  }
396
- function m(l, v) {
397
- return t(v) && e(l) <= e(v);
400
+ function p(i, f) {
401
+ return t(f) && e(i) <= e(f);
398
402
  }
399
- function g(l, v) {
400
- return e({ year: l.year, month: l.month, day: l.day }) === e({ year: v.year, month: v.month, day: v.day });
403
+ function g(i, f) {
404
+ return e({ year: i.year, month: i.month, day: i.day }) === e({ year: f.year, month: f.month, day: f.day });
401
405
  }
402
- function M(l, v) {
403
- return e({ hour: l.hour, minute: l.minute, second: l.second }) === e({ hour: v.hour, minute: v.minute, second: v.second });
406
+ function b(i, f) {
407
+ return e({ hour: i.hour, minute: i.minute, second: i.second }) === e({ hour: f.hour, minute: f.minute, second: f.second });
404
408
  }
405
409
  return {
406
410
  isDateEarlier: y,
407
411
  equal: o,
408
412
  inPeriod: k,
409
413
  isPoint: s,
410
- equalOrEarlier: i,
414
+ equalOrEarlier: u,
411
415
  isInitializedDate: t,
412
- isInitializedMonth: d,
413
- isInitializedYear: h,
416
+ isInitializedMonth: l,
417
+ isInitializedYear: m,
414
418
  isMonthDisabledByDisableSince: n,
415
- isMonthDisabledByDisableUntil: m,
416
- sameTime: M,
419
+ isMonthDisabledByDisableUntil: p,
420
+ sameTime: b,
417
421
  sameDay: g
418
422
  };
419
423
  }
420
- const Z = {
424
+ const X = {
421
425
  1: "Jan",
422
426
  2: "Feb",
423
427
  3: "Mar",
@@ -430,57 +434,57 @@ const Z = {
430
434
  10: "Oct",
431
435
  11: "Nov",
432
436
  12: "Dec"
433
- }, Ae = {
437
+ }, je = {
434
438
  activeView: { Type: Number, default: 3 },
435
439
  title: { Type: String, default: "" },
436
440
  dailyViewTitle: { Type: String, default: "Day" },
437
441
  weeklyViewTitle: { Type: String, default: "Week" },
438
442
  monthlyViewTitle: { Type: String, default: "Month" }
439
- }, G = /* @__PURE__ */ B({
443
+ }, _ = /* @__PURE__ */ F({
440
444
  name: "FCalendarHeader",
441
- props: Ae,
445
+ props: je,
442
446
  emits: ["ViewChange", "Previous", "Next", "ResetToToday"],
443
447
  setup(e, t) {
444
- const d = T(e.title), h = T(e.dailyViewTitle), y = T(e.weeklyViewTitle), i = T(e.monthlyViewTitle), o = 2, s = 62, k = T(e.activeView), n = T("Today");
448
+ const l = V(e.title), m = V(e.dailyViewTitle), y = V(e.weeklyViewTitle), u = V(e.monthlyViewTitle), o = 2, s = 62, k = V(e.activeView), n = V("Today");
445
449
  $(() => e.title, () => {
446
- d.value = e.title;
450
+ l.value = e.title;
447
451
  });
448
- const m = W(() => ({
452
+ const p = W(() => ({
449
453
  top: `${o}px`,
450
454
  left: `${k.value * (o + 1) + (k.value - 1) * (s + 1)}px`
451
- })), g = W(() => k.value === 1 ? h.value : k.value === 2 ? y.value : i.value);
452
- function M() {
455
+ })), g = W(() => k.value === 1 ? m.value : k.value === 2 ? y.value : u.value);
456
+ function b() {
453
457
  k.value = 1, t.emit("ViewChange", 1);
454
458
  }
455
- function l() {
459
+ function i() {
456
460
  k.value = 2, t.emit("ViewChange", 2);
457
461
  }
458
- function v() {
462
+ function f() {
459
463
  k.value = 3, t.emit("ViewChange", 3);
460
464
  }
461
- function f() {
465
+ function h() {
462
466
  t.emit("Previous", k.value);
463
467
  }
464
468
  function D() {
465
469
  t.emit("Next", k.value);
466
470
  }
467
- function u() {
471
+ function d() {
468
472
  t.emit("ResetToToday");
469
473
  }
470
474
  return () => c("div", {
471
475
  class: "f-calendar-header"
472
476
  }, [c("div", {
473
477
  class: "f-calendar-title"
474
- }, [d.value]), c("div", {
478
+ }, [l.value]), c("div", {
475
479
  class: "f-calendar-navigator"
476
480
  }, [c("div", {
477
481
  class: "f-calendar-navigator-today btn btn-default",
478
- onClick: () => u()
482
+ onClick: () => d()
479
483
  }, [n.value]), c("div", {
480
484
  class: "f-calendar-navigator-button-group"
481
485
  }, [c("div", {
482
486
  class: "f-calendar-navigator-previous btn btn-default",
483
- onClick: () => f()
487
+ onClick: () => h()
484
488
  }, [c("i", {
485
489
  class: "f-icon f-icon-arrow-chevron-left"
486
490
  }, null)]), c("div", {
@@ -494,177 +498,177 @@ const Z = {
494
498
  class: "f-calendar-view-switch-panel"
495
499
  }, [c("span", {
496
500
  class: "f-calendar-view-switch-daily",
497
- onClick: (a) => M()
498
- }, [h.value]), c("span", {
501
+ onClick: (a) => b()
502
+ }, [m.value]), c("span", {
499
503
  class: "f-calendar-view-switch-weekly",
500
- onClick: (a) => l()
504
+ onClick: (a) => i()
501
505
  }, [y.value]), c("span", {
502
506
  class: "f-calendar-view-switch-monthly",
503
- onClick: (a) => v()
504
- }, [i.value])]), c("div", {
507
+ onClick: (a) => f()
508
+ }, [u.value])]), c("div", {
505
509
  class: "f-calendar-view-switch-active-view",
506
- style: m.value
510
+ style: p.value
507
511
  }, [g.value])])]);
508
512
  }
509
- }), je = {
513
+ }), Ae = {
510
514
  dates: { Type: Array, default: [] },
511
- daysInWeek: { Type: Array, default: F },
515
+ daysInWeek: { Type: Array, default: I },
512
516
  enableKeyboadNavigate: { Type: Boolean, default: !0 },
513
517
  enableMarkCurrent: { Type: Boolean, default: !0 },
514
518
  events: { Type: Array, default: [] },
515
519
  activeDay: { Type: Object, default: null }
516
520
  };
517
- var q = /* @__PURE__ */ ((e) => (e[e.enter = 13] = "enter", e[e.esc = 27] = "esc", e[e.space = 32] = "space", e[e.leftArrow = 37] = "leftArrow", e[e.upArrow = 38] = "upArrow", e[e.rightArrow = 39] = "rightArrow", e[e.downArrow = 40] = "downArrow", e[e.tab = 9] = "tab", e[e.shift = 16] = "shift", e))(q || {});
521
+ var G = /* @__PURE__ */ ((e) => (e[e.enter = 13] = "enter", e[e.esc = 27] = "esc", e[e.space = 32] = "space", e[e.leftArrow = 37] = "leftArrow", e[e.upArrow = 38] = "upArrow", e[e.rightArrow = 39] = "rightArrow", e[e.downArrow = 40] = "downArrow", e[e.tab = 9] = "tab", e[e.shift = 16] = "shift", e))(G || {});
518
522
  function Ee() {
519
523
  function e(t) {
520
- const d = t.key || t.keyCode;
521
- return d === "Enter" || d === 13 ? 13 : d === "Escape" || d === 27 ? 27 : d === " " || d === 32 ? 32 : d === "ArrowLeft" || d === 37 ? 37 : d === "ArrowUp" || d === 38 ? 38 : d === "ArrowRight" || d === 39 ? 39 : d === "ArrowDown" || d === 40 ? 40 : d === "Tab" || d === 9 ? 9 : d === "Shift" || d === 16 ? 16 : -1;
524
+ const l = t.key || t.keyCode;
525
+ return l === "Enter" || l === 13 ? 13 : l === "Escape" || l === 27 ? 27 : l === " " || l === 32 ? 32 : l === "ArrowLeft" || l === 37 ? 37 : l === "ArrowUp" || l === 38 ? 38 : l === "ArrowRight" || l === 39 ? 39 : l === "ArrowDown" || l === 40 ? 40 : l === "Tab" || l === 9 ? 9 : l === "Shift" || l === 16 ? 16 : -1;
522
526
  }
523
527
  return { getKeyCodeFromEvent: e };
524
528
  }
525
- const _ = /* @__PURE__ */ B({
529
+ const x = /* @__PURE__ */ F({
526
530
  name: "FCalendarMonthView",
527
- props: je,
531
+ props: Ae,
528
532
  emits: ["click", "keyDown"],
529
533
  setup(e, t) {
530
- const d = T(e.daysInWeek), h = T(e.enableKeyboadNavigate), y = T(e.enableMarkCurrent), i = T(e.activeDay), o = T(e.events), {
534
+ const l = V(e.daysInWeek), m = V(e.enableKeyboadNavigate), y = V(e.enableMarkCurrent), u = V(e.activeDay), o = V(e.events), {
531
535
  equal: s,
532
536
  sameDay: k
533
- } = x(), {
537
+ } = H(), {
534
538
  getKeyCodeFromEvent: n
535
539
  } = Ee();
536
- function m(u, a) {
537
- return u.forEach((r) => {
538
- r.days.forEach((p) => {
539
- const b = a.filter((w) => k(w.starts, p.date));
540
- b && b.length && (p.events = [...b]);
540
+ function p(d, a) {
541
+ return d.forEach((r) => {
542
+ r.days.forEach((w) => {
543
+ const v = a.filter((M) => k(M.starts, w.date));
544
+ v && v.length && (w.events = [...v]);
541
545
  });
542
- }), u;
546
+ }), d;
543
547
  }
544
- const g = T(m(e.dates, o.value));
548
+ const g = V(p(e.dates, o.value));
545
549
  $(() => e.dates, () => {
546
- g.value = m(e.dates, o.value);
550
+ g.value = p(e.dates, o.value);
547
551
  }), $(() => e.activeDay, () => {
548
- i.value = e.activeDay;
552
+ u.value = e.activeDay;
549
553
  }), $(() => e.events, () => {
550
554
  o.value = e.events;
551
555
  });
552
- function M(u) {
553
- return !!i.value && s({
554
- year: i.value.year,
555
- month: i.value.month,
556
- day: i.value.day
557
- }, u);
556
+ function b(d) {
557
+ return !!u.value && s({
558
+ year: u.value.year,
559
+ month: u.value.month,
560
+ day: u.value.day
561
+ }, d);
558
562
  }
559
- const l = (u, a, r) => {
560
- const b = {
561
- "f-datepicker-no-currmonth": u.monthTag === E.previous || u.monthTag === E.next
562
- }, w = `d_${a}_${r}`;
563
- return b[w] = !0, b;
564
- }, v = (u) => {
565
- const a = u.monthTag === E.current && M(u.date), r = u.isCurrent && y.value;
563
+ const i = (d, a, r) => {
564
+ const v = {
565
+ "f-datepicker-no-currmonth": d.monthTag === A.previous || d.monthTag === A.next
566
+ }, M = `d_${a}_${r}`;
567
+ return v[M] = !0, v;
568
+ }, f = (d) => {
569
+ const a = d.monthTag === A.current && b(d.date), r = d.isCurrent && y.value;
566
570
  return {
567
571
  "f-calendar-month-view-date": !0,
568
572
  "f-calendar-month-view-selected": a,
569
573
  "f-calendar-month-view-current": r
570
574
  };
571
575
  };
572
- function f(u, a) {
573
- u.stopPropagation(), t.emit("click", a.date);
576
+ function h(d, a) {
577
+ d.stopPropagation(), t.emit("click", a.date);
574
578
  }
575
- function D(u, a) {
576
- const r = n(u);
577
- r !== q.tab && (u.preventDefault(), r === q.enter || r === q.space ? f(u, a) : h.value && t.emit("keyDown", a.date));
579
+ function D(d, a) {
580
+ const r = n(d);
581
+ r !== G.tab && (d.preventDefault(), r === G.enter || r === G.space ? h(d, a) : m.value && t.emit("keyDown", a.date));
578
582
  }
579
583
  return () => c("div", {
580
584
  class: "f-calendar-month-view"
581
585
  }, [c("table", {
582
586
  class: "f-datepicker-table",
583
587
  cellpadding: "0"
584
- }, [c("thead", null, [c("tr", null, [d.value && d.value.map((u) => c("th", {
588
+ }, [c("thead", null, [c("tr", null, [l.value && l.value.map((d) => c("th", {
585
589
  scope: "col",
586
590
  style: "padding: 4px 4px 8px"
587
- }, [u]))])]), c("tbody", null, [g.value && g.value.map((u, a) => c("tr", null, [u.days && u.days.map((r, p) => c("td", {
588
- id: `d_${a}_${p}`,
591
+ }, [d]))])]), c("tbody", null, [g.value && g.value.map((d, a) => c("tr", null, [d.days && d.days.map((r, w) => c("td", {
592
+ id: `d_${a}_${w}`,
589
593
  tabindex: "0",
590
- class: l(r, a, p),
591
- onClick: (b) => f(b, r),
592
- onKeydown: (b) => D(b, r)
594
+ class: i(r, a, w),
595
+ onClick: (v) => h(v, r),
596
+ onKeydown: (v) => D(v, r)
593
597
  }, [c("div", {
594
598
  class: "f-calendar-month-view-title"
595
599
  }, [c("div", {
596
- class: v(r)
600
+ class: f(r)
597
601
  }, [r.date.day]), c("div", {
598
602
  class: "f-calendar-month-view-date-month"
599
- }, [r.date.day === 1 ? Z[r.date.month || 1] : ""])]), r.events && r.events.length && r.events.map((b) => c("div", {
603
+ }, [r.date.day === 1 ? X[r.date.month || 1] : ""])]), r.events && r.events.length && r.events.map((v) => c("div", {
600
604
  class: "f-calendar-month-view-event-item"
601
- }, [b.title]))]))]))])])]);
605
+ }, [v.title]))]))]))])])]);
602
606
  }
603
607
  }), $e = {
604
- daysInWeek: { Type: Array, default: F },
608
+ daysInWeek: { Type: Array, default: I },
605
609
  enableMarkCurrent: { Type: Boolean, default: !0 },
606
610
  events: { Type: Array, default: [] },
607
611
  week: { Type: Object, default: { days: [], weekNumber: 0, year: 0 } }
608
- }, Y = /* @__PURE__ */ B({
612
+ }, Y = /* @__PURE__ */ F({
609
613
  name: "FCalendarWeekView",
610
614
  props: $e,
611
615
  emits: [],
612
616
  setup(e) {
613
- const t = T(), d = T(), h = T(e.daysInWeek), y = T(e.week), i = T(e.enableMarkCurrent), o = T(e.events), s = T([]), {
617
+ const t = V(), l = V(), m = V(e.daysInWeek), y = V(e.week), u = V(e.enableMarkCurrent), o = V(e.events), s = V([]), {
614
618
  equal: k
615
- } = x();
619
+ } = H();
616
620
  function n(a) {
617
- return y.value.days.map((p) => {
618
- const b = {
619
- year: p.date.year,
620
- month: p.date.month,
621
- day: p.date.day,
621
+ return y.value.days.map((w) => {
622
+ const v = {
623
+ year: w.date.year,
624
+ month: w.date.month,
625
+ day: w.date.day,
622
626
  hour: a.hour,
623
627
  minute: a.minute,
624
628
  second: a.second
625
- }, w = o.value.filter((C) => k(C.starts, b));
629
+ }, M = o.value.filter((T) => k(T.starts, v));
626
630
  return {
627
- day: b,
628
- events: w
631
+ day: v,
632
+ events: M
629
633
  };
630
634
  });
631
635
  }
632
- function m() {
636
+ function p() {
633
637
  const a = [];
634
638
  for (let r = 0; r < 24; r++) {
635
- const p = {
639
+ const w = {
636
640
  hour: r,
637
641
  minute: 0,
638
642
  second: 0
639
- }, b = {
643
+ }, v = {
640
644
  hour: r,
641
645
  minute: 30,
642
646
  second: 0
643
- }, w = n(p), C = n(b);
647
+ }, M = n(w), T = n(v);
644
648
  a.push({
645
- time: p,
646
- events: w,
649
+ time: w,
650
+ events: M,
647
651
  title: r > 0 ? `${r}:00` : "",
648
652
  part: "upper"
649
653
  }), a.push({
650
- time: b,
651
- events: C,
654
+ time: v,
655
+ events: T,
652
656
  title: `${r}:30`,
653
657
  part: "lower"
654
658
  });
655
659
  }
656
660
  s.value = a;
657
661
  }
658
- m(), $(() => e.week, () => {
659
- y.value = e.week, m();
662
+ p(), $(() => e.week, () => {
663
+ y.value = e.week, p();
660
664
  }), $(() => e.events, () => {
661
- o.value = e.events, m();
665
+ o.value = e.events, p();
662
666
  });
663
667
  const g = (a) => ({
664
668
  "f-calendar-week-view-date": !0,
665
- "f-calendar-week-view-current": a.isCurrent && i.value
669
+ "f-calendar-week-view-current": a.isCurrent && u.value
666
670
  });
667
- function M() {
671
+ function b() {
668
672
  return c("div", {
669
673
  class: "f-calendar-week-view-header"
670
674
  }, [c("div", {
@@ -673,13 +677,13 @@ const _ = /* @__PURE__ */ B({
673
677
  class: "f-calendar-week-view-header-primary"
674
678
  }, [c("div", {
675
679
  class: "f-calendar-week-view-header-columns"
676
- }, [h.value.map((a, r) => c("div", {
680
+ }, [m.value.map((a, r) => c("div", {
677
681
  class: "f-calendar-week-view-header-cell"
678
682
  }, [c("div", {
679
683
  class: g(y.value.days[r])
680
684
  }, [y.value.days[r].date.day]), c("span", null, [a])]))])])]);
681
685
  }
682
- function l() {
686
+ function i() {
683
687
  return c("div", {
684
688
  class: "f-calendar-week-view-content-side"
685
689
  }, [c("div", {
@@ -690,59 +694,59 @@ const _ = /* @__PURE__ */ B({
690
694
  class: "f-calendar-side-row-number"
691
695
  }, [a.part === "upper" ? a.title : ""])]))])]);
692
696
  }
693
- function v(a) {
697
+ function f(a) {
694
698
  return {
695
699
  "f-calendar-week-view-item": !0,
696
700
  "f-calendar-week-view-item-upper": a.part === "upper",
697
701
  "f-calendar-week-view-item-lower": a.part === "lower"
698
702
  };
699
703
  }
700
- function f(a) {
701
- const V = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
704
+ function h(a) {
705
+ const P = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
702
706
  return {
703
- height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
707
+ height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - P) - 2 - 2 - 1 - 1}px`
704
708
  };
705
709
  }
706
710
  function D() {
707
711
  return s.value.map((a) => c("div", {
708
- class: v(a)
712
+ class: f(a)
709
713
  }, [a.events.map((r) => c("div", {
710
714
  class: "f-calendar-week-view-item-cell"
711
- }, [r.events.length > 0 && r.events.map((p) => c("div", {
715
+ }, [r.events.length > 0 && r.events.map((w) => c("div", {
712
716
  class: "f-calendar-event",
713
- style: f(p)
714
- }, [p.title]))]))]));
717
+ style: h(w)
718
+ }, [w.title]))]))]));
715
719
  }
716
- function u() {
720
+ function d() {
717
721
  return c("div", {
718
- ref: d,
722
+ ref: l,
719
723
  class: "f-calendar-content-primary"
720
724
  }, [c("div", {
721
725
  class: "f-calendar-content-data"
722
726
  }, [D()])]);
723
727
  }
724
- return U(() => {
728
+ return J(() => {
725
729
  t.value && t.value.scrollTo(0, 250);
726
730
  }), () => c("div", {
727
731
  class: "f-calendar-week-view"
728
- }, [M(), c("div", {
732
+ }, [b(), c("div", {
729
733
  class: "f-calendar-week-view-content",
730
734
  ref: t
731
- }, [l(), u()])]);
735
+ }, [i(), d()])]);
732
736
  }
733
- }), Ie = {
737
+ }), Be = {
734
738
  day: { Type: Object, default: {} },
735
739
  dayInWeek: { Type: String, default: "" },
736
740
  enableMarkCurrent: { Type: Boolean, default: !0 },
737
741
  events: { Type: Array, default: [] }
738
- }, L = /* @__PURE__ */ B({
742
+ }, L = /* @__PURE__ */ F({
739
743
  name: "FCalendarDayView",
740
- props: Ie,
744
+ props: Be,
741
745
  emits: [],
742
746
  setup(e) {
743
- const t = T(), d = T(), h = T(e.dayInWeek), y = T(e.day), i = T(e.enableMarkCurrent), o = T(e.events), s = T([]), {
747
+ const t = V(), l = V(), m = V(e.dayInWeek), y = V(e.day), u = V(e.enableMarkCurrent), o = V(e.events), s = V([]), {
744
748
  equal: k
745
- } = x();
749
+ } = H();
746
750
  function n(a) {
747
751
  const r = {
748
752
  year: y.value.date.year,
@@ -751,48 +755,48 @@ const _ = /* @__PURE__ */ B({
751
755
  hour: a.hour,
752
756
  minute: a.minute,
753
757
  second: a.second
754
- }, p = o.value.filter((b) => k(b.starts, r));
758
+ }, w = o.value.filter((v) => k(v.starts, r));
755
759
  return [{
756
760
  day: r,
757
- events: p
761
+ events: w
758
762
  }];
759
763
  }
760
- function m() {
764
+ function p() {
761
765
  const a = [];
762
766
  for (let r = 0; r < 24; r++) {
763
- const p = {
767
+ const w = {
764
768
  hour: r,
765
769
  minute: 0,
766
770
  second: 0
767
- }, b = {
771
+ }, v = {
768
772
  hour: r,
769
773
  minute: 30,
770
774
  second: 0
771
- }, w = n(p), C = n(b);
775
+ }, M = n(w), T = n(v);
772
776
  a.push({
773
- time: p,
774
- events: w,
777
+ time: w,
778
+ events: M,
775
779
  title: r > 0 ? `${r}:00` : "",
776
780
  part: "upper"
777
781
  }), a.push({
778
- time: b,
779
- events: C,
782
+ time: v,
783
+ events: T,
780
784
  title: `${r}:30`,
781
785
  part: "lower"
782
786
  });
783
787
  }
784
788
  s.value = a;
785
789
  }
786
- m(), $(() => e.day, () => {
787
- y.value = e.day, m();
790
+ p(), $(() => e.day, () => {
791
+ y.value = e.day, p();
788
792
  }), $(() => e.events, () => {
789
- o.value = e.events, m();
793
+ o.value = e.events, p();
790
794
  });
791
795
  const g = (a) => ({
792
796
  "f-calendar-day-view-date": !0,
793
- "f-calendar-day-view-current": a.isCurrent && i.value
797
+ "f-calendar-day-view-current": a.isCurrent && u.value
794
798
  });
795
- function M() {
799
+ function b() {
796
800
  return c("div", {
797
801
  class: "f-calendar-day-view-header"
798
802
  }, [c("div", {
@@ -805,9 +809,9 @@ const _ = /* @__PURE__ */ B({
805
809
  class: "f-calendar-day-view-header-cell"
806
810
  }, [c("div", {
807
811
  class: g(y.value)
808
- }, [y.value.date.day]), c("span", null, [h.value])])])])]);
812
+ }, [y.value.date.day]), c("span", null, [m.value])])])])]);
809
813
  }
810
- function l() {
814
+ function i() {
811
815
  return c("div", {
812
816
  class: "f-calendar-day-view-content-side"
813
817
  }, [c("div", {
@@ -818,231 +822,230 @@ const _ = /* @__PURE__ */ B({
818
822
  class: "f-calendar-side-row-number"
819
823
  }, [a.part === "upper" ? a.title : ""])]))])]);
820
824
  }
821
- function v(a) {
825
+ function f(a) {
822
826
  return {
823
827
  "f-calendar-day-view-item": !0,
824
828
  "f-calendar-day-view-item-upper": a.part === "upper",
825
829
  "f-calendar-day-view-item-lower": a.part === "lower"
826
830
  };
827
831
  }
828
- function f(a) {
829
- const V = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
832
+ function h(a) {
833
+ const P = (a.starts.hour || 0) + (a.starts.minute || 0) / 60;
830
834
  return {
831
- height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - V) - 2 - 2 - 1 - 1}px`
835
+ height: `${44 * ((a.ends.hour || 0) + (a.ends.minute || 0) / 60 - P) - 2 - 2 - 1 - 1}px`
832
836
  };
833
837
  }
834
838
  function D() {
835
839
  return s.value.map((a) => c("div", {
836
- class: v(a)
840
+ class: f(a)
837
841
  }, [a.events.map((r) => c("div", {
838
842
  class: "f-calendar-day-view-item-cell"
839
- }, [r.events.length > 0 && r.events.map((p) => c("div", {
843
+ }, [r.events.length > 0 && r.events.map((w) => c("div", {
840
844
  class: "f-calendar-event",
841
- style: f(p)
842
- }, [p.title]))]))]));
845
+ style: h(w)
846
+ }, [w.title]))]))]));
843
847
  }
844
- function u() {
848
+ function d() {
845
849
  return c("div", {
846
- ref: d,
850
+ ref: l,
847
851
  class: "f-calendar-content-primary"
848
852
  }, [c("div", {
849
853
  class: "f-calendar-content-data"
850
854
  }, [D()])]);
851
855
  }
852
- return U(() => {
856
+ return J(() => {
853
857
  t.value && t.value.scrollTo(0, 250);
854
858
  }), () => c("div", {
855
859
  class: "f-calendar-day-view"
856
- }, [M(), c("div", {
860
+ }, [b(), c("div", {
857
861
  class: "f-calendar-day-view-content",
858
862
  ref: t
859
- }, [l(), u()])]);
863
+ }, [i(), d()])]);
860
864
  }
861
- }), I = /* @__PURE__ */ B({
865
+ }), B = /* @__PURE__ */ F({
862
866
  name: "FCalendar",
863
- props: X,
867
+ props: Q,
864
868
  emits: [],
865
869
  setup(e) {
866
870
  const {
867
871
  sameDay: t
868
- } = x(), {
869
- getToday: d
870
- } = J(), h = T(e.firstDayOfTheWeek), y = T(e.events), i = d(), o = T({
871
- year: i.year || 1,
872
- month: i.month || 1,
873
- day: i.day || 1
874
- }), s = T(3), {
872
+ } = H(), {
873
+ getToday: l
874
+ } = z(), m = V(e.firstDayOfTheWeek), y = V(e.events), u = l(), o = V({
875
+ year: u.year || 1,
876
+ month: u.month || 1,
877
+ day: u.day || 1
878
+ }), s = V(3), {
875
879
  getMonthlyCalendar: k,
876
880
  getWeeklyCalendar: n,
877
- getPreviousDay: m,
881
+ getPreviousDay: p,
878
882
  getNextDay: g,
879
- getDayInPreviousWeek: M,
880
- getDayInNextWeek: l,
881
- getDayInPreviousMonth: v,
882
- getDayInNextMonth: f
883
- } = ae(), D = W(() => `${Z[o.value.month || 1]} ${o.value.year}`), u = W(() => k(o.value.month || 1, o.value.year || 1, h.value)), a = W(() => n(o.value.day || 1, o.value.month || 1, o.value.year || 1, h.value)), r = W(() => a.value.days.find((P) => t(P.date, o.value)) || a.value.days[1]), p = W(() => {
884
- const P = a.value.days.findIndex((j) => t(j.date, o.value)), H = P > -1 ? P : 1;
885
- return F[H];
886
- }), b = W(() => s.value === 3), w = W(() => s.value === 2), C = W(() => s.value === 1);
887
- function V(P) {
888
- s.value = P;
883
+ getDayInPreviousWeek: b,
884
+ getDayInNextWeek: i,
885
+ getDayInPreviousMonth: f,
886
+ getDayInNextMonth: h
887
+ } = ae(), D = W(() => `${X[o.value.month || 1]} ${o.value.year}`), d = W(() => k(o.value.month || 1, o.value.year || 1, m.value)), a = W(() => n(o.value.day || 1, o.value.month || 1, o.value.year || 1, m.value)), r = W(() => a.value.days.find((N) => t(N.date, o.value)) || a.value.days[1]), w = W(() => {
888
+ const N = a.value.days.findIndex((j) => t(j.date, o.value)), q = N > -1 ? N : 1;
889
+ return I[q];
890
+ }), v = W(() => s.value === 3), M = W(() => s.value === 2), T = W(() => s.value === 1);
891
+ function P(N) {
892
+ s.value = N;
889
893
  }
890
- function O(P) {
891
- P === 1 && (o.value = m(o.value)), P === 2 && (o.value = M(o.value)), P === 3 && (o.value = v(o.value));
894
+ function S(N) {
895
+ N === 1 && (o.value = p(o.value)), N === 2 && (o.value = b(o.value)), N === 3 && (o.value = f(o.value));
892
896
  }
893
- function S(P) {
894
- P === 1 && (o.value = g(o.value)), P === 2 && (o.value = l(o.value)), P === 3 && (o.value = f(o.value));
897
+ function C(N) {
898
+ N === 1 && (o.value = g(o.value)), N === 2 && (o.value = i(o.value)), N === 3 && (o.value = h(o.value));
895
899
  }
896
- function A() {
900
+ function E() {
897
901
  o.value = {
898
- year: i.year || 1,
899
- month: i.month || 1,
900
- day: i.day || 1
902
+ year: u.year || 1,
903
+ month: u.month || 1,
904
+ day: u.day || 1
901
905
  };
902
906
  }
903
907
  return () => c("div", {
904
908
  class: "f-calendar"
905
- }, [c(G, {
909
+ }, [c(_, {
906
910
  activeView: s.value,
907
911
  title: D.value,
908
- onViewChange: (P) => V(P),
909
- onPrevious: (P) => O(P),
910
- onNext: (P) => S(P),
911
- onResetToToday: () => A()
912
- }, null), c("div", null, [C.value && c(L, {
912
+ onViewChange: (N) => P(N),
913
+ onPrevious: (N) => S(N),
914
+ onNext: (N) => C(N),
915
+ onResetToToday: () => E()
916
+ }, null), c("div", null, [T.value && c(L, {
913
917
  day: r.value,
914
- dayInWeek: p.value,
918
+ dayInWeek: w.value,
915
919
  events: y.value
916
- }, null), w.value && c(Y, {
920
+ }, null), M.value && c(Y, {
917
921
  week: a.value,
918
922
  events: y.value
919
- }, null), b.value && c(_, {
923
+ }, null), v.value && c(x, {
920
924
  activeDay: o.value,
921
- dates: u.value,
925
+ dates: d.value,
922
926
  events: y.value
923
927
  }, null)])]);
924
928
  }
925
929
  });
926
- function Be(e, t, d) {
927
- var b;
928
- function h() {
929
- }
930
- const y = "", i = "", o = T();
931
- function s() {
930
+ function Fe(e, t, l) {
931
+ var w;
932
+ const m = "", y = "", u = V();
933
+ function o() {
932
934
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
933
935
  }
934
- function k() {
936
+ function s() {
935
937
  return !1;
936
938
  }
937
- function n() {
939
+ function k() {
938
940
  return (t == null ? void 0 : t.schema.componentType) !== "frame";
939
941
  }
940
- function m() {
942
+ function n() {
941
943
  return (t == null ? void 0 : t.schema.componentType) === "frame";
942
944
  }
943
- function g(w) {
944
- if (!w || !w.value)
945
+ function p(v) {
946
+ if (!v || !v.value)
945
947
  return null;
946
- if (w.value.schema && w.value.schema.type === "component")
947
- return w.value;
948
- const C = T(w == null ? void 0 : w.value.parent), V = g(C);
949
- return V || null;
948
+ if (v.value.schema && v.value.schema.type === "component")
949
+ return v.value;
950
+ const M = V(v == null ? void 0 : v.value.parent), T = p(M);
951
+ return T || null;
950
952
  }
951
- function M(w = t) {
952
- const { componentInstance: C, designerItemElementRef: V } = w;
953
- return !C || !C.value ? null : C.value.canMove ? V : M(w.parent);
953
+ function g(v = t) {
954
+ const { componentInstance: M, designerItemElementRef: T } = v;
955
+ return !M || !M.value ? null : M.value.canMove ? T : g(v.parent);
954
956
  }
955
- function l(w) {
956
- return !!d;
957
+ function b(v) {
958
+ return !!l;
957
959
  }
958
- function v() {
960
+ function i() {
959
961
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
960
962
  }
961
963
  function f() {
962
964
  }
963
- function D(w, C) {
965
+ function h(v, M) {
964
966
  }
965
- function u(w, C) {
966
- const { componentType: V } = w;
967
- let O = z(V, w, C);
968
- const S = V.toLowerCase().replace("-", "_");
969
- return O && !O.id && O.type === V && (O.id = `${S}_${Math.random().toString().slice(2, 6)}`), O;
967
+ function D(v, M) {
968
+ const { componentType: T } = v;
969
+ let P = ne(T, v, M);
970
+ const S = T.toLowerCase().replace(/-/g, "_");
971
+ return P && !P.id && P.type === T && (P.id = `${S}_${Math.random().toString().slice(2, 6)}`), P;
970
972
  }
971
- function a(w, C) {
972
- const V = String(w.getAttribute("data-controltype")), O = w.getAttribute("data-feature"), S = O ? JSON.parse(O) : {};
973
- S.parentComponentInstance = o.value;
974
- let A = z(V, S);
975
- const P = V.toLowerCase().replace("-", "_");
976
- return A && !A.id && A.type === V && (A.id = `${P}_${Math.random().toString().slice(2, 6)}`), A;
973
+ function d(v) {
977
974
  }
978
- function r(w) {
975
+ function a(...v) {
979
976
  }
980
- function p(...w) {
977
+ function r() {
978
+ t != null && t.schema.contents && t.schema.contents.map((v) => {
979
+ var P;
980
+ let M = v.id;
981
+ v.type === "component-ref" && (M = v.component);
982
+ const T = e.value.querySelector(`#${M}-design-item`);
983
+ (P = T == null ? void 0 : T.componentInstance) != null && P.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
984
+ });
981
985
  }
982
- return o.value = {
983
- canMove: s(),
984
- canSelectParent: k(),
985
- canDelete: n(),
986
- canNested: !m(),
986
+ return u.value = {
987
+ canMove: o(),
988
+ canSelectParent: s(),
989
+ canDelete: k(),
990
+ canNested: !n(),
987
991
  contents: t == null ? void 0 : t.schema.contents,
988
992
  elementRef: e,
989
- parent: (b = t == null ? void 0 : t.parent) == null ? void 0 : b.componentInstance,
993
+ parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
990
994
  schema: t == null ? void 0 : t.schema,
991
- styles: y,
992
- designerClass: i,
993
- canAccepts: l,
994
- getBelongedComponentInstance: g,
995
- getDraggableDesignItemElement: M,
996
- getDraggingDisplayText: v,
997
- getPropConfig: p,
995
+ styles: m,
996
+ designerClass: y,
997
+ canAccepts: b,
998
+ getBelongedComponentInstance: p,
999
+ getDraggableDesignItemElement: g,
1000
+ getDraggingDisplayText: i,
1001
+ getPropConfig: a,
998
1002
  getDragScopeElement: f,
999
- onAcceptMovedChildElement: D,
1000
- onAcceptNewChildElement: a,
1001
- onChildElementMovedOut: r,
1002
- addNewChildComponentSchema: u,
1003
- updateDragAndDropRules: h,
1004
- triggerBelongedComponentToMoveWhenMoved: T(!1),
1005
- triggerBelongedComponentToDeleteWhenDeleted: T(!1)
1006
- }, o;
1003
+ onAcceptMovedChildElement: h,
1004
+ onChildElementMovedOut: d,
1005
+ addNewChildComponentSchema: D,
1006
+ triggerBelongedComponentToMoveWhenMoved: V(!1),
1007
+ triggerBelongedComponentToDeleteWhenDeleted: V(!1),
1008
+ onRemoveComponent: r
1009
+ }, u;
1007
1010
  }
1008
- const Fe = /* @__PURE__ */ B({
1011
+ const Ie = /* @__PURE__ */ F({
1009
1012
  name: "FCalendarDesign",
1010
- props: X,
1013
+ props: Q,
1011
1014
  emits: [],
1012
1015
  setup(e, t) {
1013
1016
  const {
1014
- sameDay: d
1015
- } = x(), {
1016
- getToday: h
1017
- } = J(), y = T(e.firstDayOfTheWeek), i = T(e.events), o = h(), s = T({
1017
+ sameDay: l
1018
+ } = H(), {
1019
+ getToday: m
1020
+ } = z(), y = V(e.firstDayOfTheWeek), u = V(e.events), o = m(), s = V({
1018
1021
  year: o.year || 1,
1019
1022
  month: o.month || 1,
1020
1023
  day: o.day || 1
1021
- }), k = T(3), n = T(), m = se("design-item-context"), g = Be(n, m);
1022
- U(() => {
1024
+ }), k = V(3), n = V(), p = se("design-item-context"), g = Fe(n, p);
1025
+ J(() => {
1023
1026
  n.value.componentInstance = g;
1024
1027
  }), t.expose(g.value);
1025
1028
  const {
1026
- getMonthlyCalendar: M,
1027
- getWeeklyCalendar: l,
1028
- getPreviousDay: v,
1029
- getNextDay: f,
1029
+ getMonthlyCalendar: b,
1030
+ getWeeklyCalendar: i,
1031
+ getPreviousDay: f,
1032
+ getNextDay: h,
1030
1033
  getDayInPreviousWeek: D,
1031
- getDayInNextWeek: u,
1034
+ getDayInNextWeek: d,
1032
1035
  getDayInPreviousMonth: a,
1033
1036
  getDayInNextMonth: r
1034
- } = ae(), p = W(() => `${Z[s.value.month || 1]} ${s.value.year}`), b = W(() => M(s.value.month || 1, s.value.year || 1, y.value)), w = W(() => l(s.value.day || 1, s.value.month || 1, s.value.year || 1, y.value)), C = W(() => w.value.days.find((N) => d(N.date, s.value)) || w.value.days[1]), V = W(() => {
1035
- const N = w.value.days.findIndex((oe) => d(oe.date, s.value)), re = N > -1 ? N : 1;
1036
- return F[re];
1037
- }), O = W(() => k.value === 3), S = W(() => k.value === 2), A = W(() => k.value === 1);
1038
- function P(N) {
1039
- k.value = N;
1037
+ } = ae(), w = W(() => `${X[s.value.month || 1]} ${s.value.year}`), v = W(() => b(s.value.month || 1, s.value.year || 1, y.value)), M = W(() => i(s.value.day || 1, s.value.month || 1, s.value.year || 1, y.value)), T = W(() => M.value.days.find((O) => l(O.date, s.value)) || M.value.days[1]), P = W(() => {
1038
+ const O = M.value.days.findIndex((oe) => l(oe.date, s.value)), re = O > -1 ? O : 1;
1039
+ return I[re];
1040
+ }), S = W(() => k.value === 3), C = W(() => k.value === 2), E = W(() => k.value === 1);
1041
+ function N(O) {
1042
+ k.value = O;
1040
1043
  }
1041
- function H(N) {
1042
- N === 1 && (s.value = v(s.value)), N === 2 && (s.value = D(s.value)), N === 3 && (s.value = a(s.value));
1044
+ function q(O) {
1045
+ O === 1 && (s.value = f(s.value)), O === 2 && (s.value = D(s.value)), O === 3 && (s.value = a(s.value));
1043
1046
  }
1044
- function j(N) {
1045
- N === 1 && (s.value = f(s.value)), N === 2 && (s.value = u(s.value)), N === 3 && (s.value = r(s.value));
1047
+ function j(O) {
1048
+ O === 1 && (s.value = h(s.value)), O === 2 && (s.value = d(s.value)), O === 3 && (s.value = r(s.value));
1046
1049
  }
1047
1050
  function R() {
1048
1051
  s.value = {
@@ -1054,50 +1057,50 @@ const Fe = /* @__PURE__ */ B({
1054
1057
  return () => c("div", {
1055
1058
  ref: n,
1056
1059
  class: "f-calendar"
1057
- }, [c(G, {
1060
+ }, [c(_, {
1058
1061
  activeView: k.value,
1059
- title: p.value,
1060
- onViewChange: (N) => P(N),
1061
- onPrevious: (N) => H(N),
1062
- onNext: (N) => j(N),
1062
+ title: w.value,
1063
+ onViewChange: (O) => N(O),
1064
+ onPrevious: (O) => q(O),
1065
+ onNext: (O) => j(O),
1063
1066
  onResetToToday: () => R()
1064
- }, null), c("div", null, [A.value && c(L, {
1065
- day: C.value,
1066
- dayInWeek: V.value,
1067
- events: i.value
1068
- }, null), S.value && c(Y, {
1069
- week: w.value,
1070
- events: i.value
1071
- }, null), O.value && c(_, {
1067
+ }, null), c("div", null, [E.value && c(L, {
1068
+ day: T.value,
1069
+ dayInWeek: P.value,
1070
+ events: u.value
1071
+ }, null), C.value && c(Y, {
1072
+ week: M.value,
1073
+ events: u.value
1074
+ }, null), S.value && c(x, {
1072
1075
  activeDay: s.value,
1073
- dates: b.value,
1074
- events: i.value
1076
+ dates: v.value,
1077
+ events: u.value
1075
1078
  }, null)])]);
1076
1079
  }
1077
1080
  });
1078
- I.install = (e) => {
1079
- e.component(I.name, I).component(L.name, L).component(G.name, G).component(_.name, _).component(Y.name, Y);
1081
+ B.install = (e) => {
1082
+ e.component(B.name, B).component(L.name, L).component(_.name, _).component(x.name, x).component(Y.name, Y);
1080
1083
  };
1081
- I.register = (e, t, d, h) => {
1082
- e.calendar = I, t.calendar = te;
1084
+ B.register = (e, t, l, m) => {
1085
+ e.calendar = B, t.calendar = te;
1083
1086
  };
1084
- I.registerDesigner = (e, t, d) => {
1085
- e.calendar = Fe, t.calendar = te;
1087
+ B.registerDesigner = (e, t, l) => {
1088
+ e.calendar = Ie, t.calendar = te;
1086
1089
  };
1087
1090
  export {
1088
- I as FCalendar,
1091
+ B as FCalendar,
1089
1092
  L as FCalendarDayView,
1090
- G as FCalendarHeader,
1091
- _ as FCalendarMonthView,
1093
+ _ as FCalendarHeader,
1094
+ x as FCalendarMonthView,
1092
1095
  Y as FCalendarWeekView,
1093
- E as MonthTag,
1094
- X as calendarProps,
1095
- Ie as dayViewProps,
1096
- I as default,
1097
- Z as defaultNameOfMonths,
1098
- Ae as headerProps,
1099
- je as monthViewProps,
1096
+ A as MonthTag,
1097
+ Q as calendarProps,
1098
+ Be as dayViewProps,
1099
+ B as default,
1100
+ X as defaultNameOfMonths,
1101
+ je as headerProps,
1102
+ Ae as monthViewProps,
1100
1103
  te as propsResolver,
1101
- F as weekDays,
1104
+ I as weekDays,
1102
1105
  $e as weekViewProps
1103
1106
  };