bitboss-ui 0.2.31 → 0.2.32

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 (326) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +6 -6
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +16 -16
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +36 -36
  4. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +20 -20
  5. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +21 -21
  6. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +8 -8
  7. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +6 -6
  8. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +20 -20
  9. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +20 -20
  10. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +36 -36
  11. package/dist/components/BaseRating/BaseRating.vue.d.ts +17 -17
  12. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +23 -23
  13. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +15 -15
  14. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +1 -1
  15. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +20 -20
  16. package/dist/components/BaseTag/BaseTag.vue.d.ts +20 -20
  17. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +19 -19
  18. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +18 -18
  19. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +3 -3
  20. package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -3
  21. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +8 -8
  22. package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
  23. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +6 -6
  24. package/dist/components/BbButton/BbButton.vue.d.ts +1 -1
  25. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +11 -11
  26. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +27 -27
  27. package/dist/components/BbChip/BbChip.vue.d.ts +2 -2
  28. package/dist/components/BbConfirm/BbConfirm.vue.d.ts +4 -4
  29. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +16 -24
  30. package/dist/components/BbDialog/BbDialog.vue.d.ts +2 -2
  31. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +11 -11
  32. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +14 -14
  33. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +4 -4
  34. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +3 -3
  35. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -10
  36. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +9 -9
  37. package/dist/components/BbPagination/BbPagination.vue.d.ts +1 -1
  38. package/dist/components/BbPopover/BbPopover.vue.d.ts +8 -8
  39. package/dist/components/BbRadio/BbRadio.vue.d.ts +10 -10
  40. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +27 -27
  41. package/dist/components/BbRating/BbRating.vue.d.ts +10 -10
  42. package/dist/components/BbSelect/BbSelect.vue.d.ts +19 -19
  43. package/dist/components/BbSlider/BbSlider.vue.d.ts +8 -8
  44. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +1 -1
  45. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +2 -2
  46. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +2 -2
  47. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +20 -20
  48. package/dist/components/BbTab/BbTab.vue.d.ts +5 -5
  49. package/dist/components/BbTable/BbTable.vue.d.ts +11 -11
  50. package/dist/components/BbTable/types.d.ts +107 -107
  51. package/dist/components/BbTag/BbTag.vue.d.ts +13 -13
  52. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +11 -11
  53. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +10 -10
  54. package/dist/components/BbToast/BbToast.vue.d.ts +1 -1
  55. package/dist/components/BbToast/BbToastMessage.vue.d.ts +1 -1
  56. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
  57. package/dist/components/BbTree/BbTree.vue.d.ts +1 -1
  58. package/dist/composables/useConfirm.d.ts +10 -10
  59. package/dist/composables/useOptions.d.ts +2 -2
  60. package/dist/composables/useRoute.d.ts +2 -2
  61. package/dist/composables/useRouter.d.ts +1 -1
  62. package/dist/composables/useToast.d.ts +5 -5
  63. package/dist/composables/useWizard.d.ts +1 -1
  64. package/dist/index.d.ts +126 -126
  65. package/dist/index101.js +32 -37
  66. package/dist/index101.js.map +1 -1
  67. package/dist/index103.js +19 -19
  68. package/dist/index103.js.map +1 -1
  69. package/dist/index105.js +16 -16
  70. package/dist/index105.js.map +1 -1
  71. package/dist/index107.js +15 -15
  72. package/dist/index107.js.map +1 -1
  73. package/dist/index109.js.map +1 -1
  74. package/dist/index11.js +7 -7
  75. package/dist/index11.js.map +1 -1
  76. package/dist/index111.js +16 -16
  77. package/dist/index111.js.map +1 -1
  78. package/dist/index113.js +3 -3
  79. package/dist/index113.js.map +1 -1
  80. package/dist/index115.js +6 -6
  81. package/dist/index115.js.map +1 -1
  82. package/dist/index116.js +1 -1
  83. package/dist/index116.js.map +1 -1
  84. package/dist/index117.js +1 -1
  85. package/dist/index117.js.map +1 -1
  86. package/dist/index118.js +4 -4
  87. package/dist/index118.js.map +1 -1
  88. package/dist/index119.js +5 -5
  89. package/dist/index119.js.map +1 -1
  90. package/dist/index120.js.map +1 -1
  91. package/dist/index121.js.map +1 -1
  92. package/dist/index122.js.map +1 -1
  93. package/dist/index124.js.map +1 -1
  94. package/dist/index125.js +4 -4
  95. package/dist/index125.js.map +1 -1
  96. package/dist/index126.js +1 -1
  97. package/dist/index126.js.map +1 -1
  98. package/dist/index127.js +1 -1
  99. package/dist/index128.js +4 -1
  100. package/dist/index128.js.map +1 -1
  101. package/dist/index129.js.map +1 -1
  102. package/dist/index13.js +11 -11
  103. package/dist/index13.js.map +1 -1
  104. package/dist/index130.js.map +1 -1
  105. package/dist/index131.js +2 -2
  106. package/dist/index15.js +226 -224
  107. package/dist/index15.js.map +1 -1
  108. package/dist/index17.js +61 -62
  109. package/dist/index17.js.map +1 -1
  110. package/dist/index19.js +22 -22
  111. package/dist/index19.js.map +1 -1
  112. package/dist/index196.js.map +1 -1
  113. package/dist/index197.js +2 -5
  114. package/dist/index197.js.map +1 -1
  115. package/dist/index198.js +4 -16
  116. package/dist/index198.js.map +1 -1
  117. package/dist/index199.js +293 -14
  118. package/dist/index199.js.map +1 -1
  119. package/dist/index2.js +23 -23
  120. package/dist/index2.js.map +1 -1
  121. package/dist/index200.js +15 -18
  122. package/dist/index200.js.map +1 -1
  123. package/dist/index201.js +13 -17
  124. package/dist/index201.js.map +1 -1
  125. package/dist/index202.js +18 -28
  126. package/dist/index202.js.map +1 -1
  127. package/dist/index203.js +20 -8
  128. package/dist/index203.js.map +1 -1
  129. package/dist/index204.js +29 -2
  130. package/dist/index204.js.map +1 -1
  131. package/dist/index205.js +8 -378
  132. package/dist/index205.js.map +1 -1
  133. package/dist/index206.js +2 -134
  134. package/dist/index206.js.map +1 -1
  135. package/dist/index207.js +235 -2
  136. package/dist/index207.js.map +1 -1
  137. package/dist/index208.js +3 -174
  138. package/dist/index208.js.map +1 -1
  139. package/dist/index209.js +35 -23
  140. package/dist/index209.js.map +1 -1
  141. package/dist/index21.js +4 -4
  142. package/dist/index21.js.map +1 -1
  143. package/dist/index210.js +6 -373
  144. package/dist/index210.js.map +1 -1
  145. package/dist/index211.js +10 -2
  146. package/dist/index211.js.map +1 -1
  147. package/dist/index212.js +378 -4
  148. package/dist/index212.js.map +1 -1
  149. package/dist/index213.js +134 -3
  150. package/dist/index213.js.map +1 -1
  151. package/dist/index214.js +2 -3
  152. package/dist/index214.js.map +1 -1
  153. package/dist/index215.js +172 -8
  154. package/dist/index215.js.map +1 -1
  155. package/dist/index216.js +23 -3
  156. package/dist/index216.js.map +1 -1
  157. package/dist/index217.js +369 -31
  158. package/dist/index217.js.map +1 -1
  159. package/dist/index218.js +3 -6
  160. package/dist/index218.js.map +1 -1
  161. package/dist/index219.js +3 -2
  162. package/dist/index219.js.map +1 -1
  163. package/dist/index220.js.map +1 -1
  164. package/dist/index221.js +26 -233
  165. package/dist/index221.js.map +1 -1
  166. package/dist/index222.js +16 -8
  167. package/dist/index222.js.map +1 -1
  168. package/dist/index223.js +2 -121
  169. package/dist/index223.js.map +1 -1
  170. package/dist/index224.js +8 -27
  171. package/dist/index224.js.map +1 -1
  172. package/dist/index225.js +120 -12
  173. package/dist/index225.js.map +1 -1
  174. package/dist/index226.js +1 -1
  175. package/dist/index227.js +4 -295
  176. package/dist/index227.js.map +1 -1
  177. package/dist/index228.js +2 -6
  178. package/dist/index228.js.map +1 -1
  179. package/dist/index229.js +6 -2
  180. package/dist/index229.js.map +1 -1
  181. package/dist/index23.js +14 -16
  182. package/dist/index23.js.map +1 -1
  183. package/dist/index230.js +2 -2
  184. package/dist/index235.js +2 -2
  185. package/dist/index236.js +428 -110
  186. package/dist/index236.js.map +1 -1
  187. package/dist/index237.js +88 -105
  188. package/dist/index237.js.map +1 -1
  189. package/dist/index238.js +199 -3
  190. package/dist/index238.js.map +1 -1
  191. package/dist/index239.js +1 -1
  192. package/dist/index240.js +1 -1
  193. package/dist/index241.js +2 -435
  194. package/dist/index241.js.map +1 -1
  195. package/dist/index242.js +115 -87
  196. package/dist/index242.js.map +1 -1
  197. package/dist/index243.js +104 -198
  198. package/dist/index243.js.map +1 -1
  199. package/dist/index244.js +160 -2
  200. package/dist/index244.js.map +1 -1
  201. package/dist/index245.js +2 -2
  202. package/dist/index245.js.map +1 -1
  203. package/dist/index246.js +9 -9
  204. package/dist/index246.js.map +1 -1
  205. package/dist/index247.js +5 -162
  206. package/dist/index247.js.map +1 -1
  207. package/dist/index248.js +1 -1
  208. package/dist/index249.js +37 -14
  209. package/dist/index249.js.map +1 -1
  210. package/dist/index25.js +4 -4
  211. package/dist/index25.js.map +1 -1
  212. package/dist/index250.js +2 -38
  213. package/dist/index250.js.map +1 -1
  214. package/dist/index251.js +2 -2
  215. package/dist/index251.js.map +1 -1
  216. package/dist/index252.js +15 -2
  217. package/dist/index252.js.map +1 -1
  218. package/dist/index253.js +3 -2
  219. package/dist/index253.js.map +1 -1
  220. package/dist/index255.js +2 -3
  221. package/dist/index255.js.map +1 -1
  222. package/dist/index27.js +7 -7
  223. package/dist/index27.js.map +1 -1
  224. package/dist/index29.js +15 -15
  225. package/dist/index29.js.map +1 -1
  226. package/dist/index3.js +2 -1
  227. package/dist/index3.js.map +1 -1
  228. package/dist/index31.js +28 -28
  229. package/dist/index31.js.map +1 -1
  230. package/dist/index33.js +10 -11
  231. package/dist/index33.js.map +1 -1
  232. package/dist/index35.js +2 -2
  233. package/dist/index35.js.map +1 -1
  234. package/dist/index37.js +12 -12
  235. package/dist/index37.js.map +1 -1
  236. package/dist/index39.js +5 -7
  237. package/dist/index39.js.map +1 -1
  238. package/dist/index4.js.map +1 -1
  239. package/dist/index41.js +5 -5
  240. package/dist/index41.js.map +1 -1
  241. package/dist/index43.js +19 -16
  242. package/dist/index43.js.map +1 -1
  243. package/dist/index45.js +9 -9
  244. package/dist/index45.js.map +1 -1
  245. package/dist/index47.js +4 -4
  246. package/dist/index47.js.map +1 -1
  247. package/dist/index49.js +1 -1
  248. package/dist/index49.js.map +1 -1
  249. package/dist/index5.js +7 -6
  250. package/dist/index5.js.map +1 -1
  251. package/dist/index51.js +6 -6
  252. package/dist/index51.js.map +1 -1
  253. package/dist/index53.js.map +1 -1
  254. package/dist/index55.js +20 -20
  255. package/dist/index55.js.map +1 -1
  256. package/dist/index57.js +35 -35
  257. package/dist/index57.js.map +1 -1
  258. package/dist/index59.js +8 -8
  259. package/dist/index59.js.map +1 -1
  260. package/dist/index6.js +38 -38
  261. package/dist/index6.js.map +1 -1
  262. package/dist/index61.js +27 -27
  263. package/dist/index61.js.map +1 -1
  264. package/dist/index63.js +4 -4
  265. package/dist/index63.js.map +1 -1
  266. package/dist/index65.js +20 -20
  267. package/dist/index65.js.map +1 -1
  268. package/dist/index67.js +26 -26
  269. package/dist/index67.js.map +1 -1
  270. package/dist/index69.js +21 -19
  271. package/dist/index69.js.map +1 -1
  272. package/dist/index7.js.map +1 -1
  273. package/dist/index71.js +2 -2
  274. package/dist/index71.js.map +1 -1
  275. package/dist/index72.js +3 -3
  276. package/dist/index72.js.map +1 -1
  277. package/dist/index73.js +14 -14
  278. package/dist/index73.js.map +1 -1
  279. package/dist/index75.js +18 -18
  280. package/dist/index75.js.map +1 -1
  281. package/dist/index77.js +11 -11
  282. package/dist/index77.js.map +1 -1
  283. package/dist/index79.js +15 -15
  284. package/dist/index79.js.map +1 -1
  285. package/dist/index8.js +10 -7
  286. package/dist/index8.js.map +1 -1
  287. package/dist/index81.js.map +1 -1
  288. package/dist/index83.js +20 -20
  289. package/dist/index83.js.map +1 -1
  290. package/dist/index85.js +34 -34
  291. package/dist/index85.js.map +1 -1
  292. package/dist/index87.js +18 -18
  293. package/dist/index87.js.map +1 -1
  294. package/dist/index89.js.map +1 -1
  295. package/dist/index9.js.map +1 -1
  296. package/dist/index91.js +53 -53
  297. package/dist/index91.js.map +1 -1
  298. package/dist/index93.js +16 -16
  299. package/dist/index93.js.map +1 -1
  300. package/dist/index95.js +21 -21
  301. package/dist/index95.js.map +1 -1
  302. package/dist/index97.js +37 -37
  303. package/dist/index97.js.map +1 -1
  304. package/dist/index99.js +18 -18
  305. package/dist/index99.js.map +1 -1
  306. package/dist/style.css +1 -1
  307. package/dist/types/CommonProps.d.ts +18 -18
  308. package/dist/types/ExtractGenericFromComputedRef.d.ts +1 -1
  309. package/dist/types/ExtractGenericFromRef.d.ts +1 -1
  310. package/dist/types/VoidHtmlElements.d.ts +1 -1
  311. package/dist/utilities/functions/cloneDeep.d.ts +1 -1
  312. package/dist/utilities/functions/debounce.d.ts +1 -1
  313. package/dist/utilities/functions/flow.d.ts +1 -1
  314. package/dist/utilities/functions/get.d.ts +1 -1
  315. package/dist/utilities/functions/isNotNil.d.ts +1 -1
  316. package/dist/utilities/functions/mapValues.d.ts +1 -1
  317. package/dist/utilities/functions/merge.d.ts +1 -1
  318. package/dist/utilities/functions/millisecondsTo.d.ts +1 -1
  319. package/dist/utilities/functions/overEvery.d.ts +1 -1
  320. package/dist/utilities/functions/percentage.d.ts +4 -4
  321. package/dist/utilities/functions/pick.d.ts +1 -1
  322. package/dist/utilities/functions/pickBy.d.ts +1 -1
  323. package/dist/utilities/functions/roundToTheNearest.d.ts +1 -1
  324. package/package.json +93 -77
  325. package/dist/index256.js +0 -5
  326. package/dist/index256.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index15.js","sources":["../src/components/BaseDatePicker/BaseDatePicker.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, renderSlot as _renderSlot, normalizeClass as _normalizeClass, mergeProps as _mergeProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-date-picker__header\" }\nconst _hoisted_2 = [\"disabled\"]\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", null, null, -1)\nconst _hoisted_4 = {\n class: \"bb-base-date-picker__selected-day-label\",\n \"aria-live\": \"polite\"\n}\nconst _hoisted_5 = { class: \"bb-base-date-picker__weekday\" }\nconst _hoisted_6 = { class: \"bb-base-date-picker__monthday\" }\nconst _hoisted_7 = [\"disabled\"]\nconst _hoisted_8 = { class: \"bb-base-date-picker__small-month-selector\" }\nconst _hoisted_9 = [\"disabled\"]\nconst _hoisted_10 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n })\n], -1)\nconst _hoisted_11 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai indietro di un mese\", -1)\nconst _hoisted_12 = [\n _hoisted_10,\n _hoisted_11\n]\nconst _hoisted_13 = [\"disabled\"]\nconst _hoisted_14 = [\"disabled\"]\nconst _hoisted_15 = {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n style: {\"transform\":\"rotate(180deg)\"}\n}\nconst _hoisted_16 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_17 = [\n _hoisted_16\n]\nconst _hoisted_18 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai avanti di un mese\", -1)\nconst _hoisted_19 = { class: \"bb-base-date-picker__small-year-selector\" }\nconst _hoisted_20 = [\"disabled\"]\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n })\n], -1)\nconst _hoisted_22 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai indietro di un anno\", -1)\nconst _hoisted_23 = [\n _hoisted_21,\n _hoisted_22\n]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = [\"disabled\"]\nconst _hoisted_26 = {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\",\n style: {\"transform\":\"rotate(180deg)\"}\n}\nconst _hoisted_27 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_28 = [\n _hoisted_27\n]\nconst _hoisted_29 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai avanti di un anno\", -1)\nconst _hoisted_30 = {\n key: 0,\n style: {\"height\":\"32px\"}\n}\nconst _hoisted_31 = { class: \"bb-base-date-picker-calendar\" }\nconst _hoisted_32 = { class: \"bb-base-date-picker-header-container\" }\nconst _hoisted_33 = [\"disabled\", \"id\"]\nconst _hoisted_34 = {\n key: 0,\n class: \"bb-base-date-picker__month-selector\"\n}\nconst _hoisted_35 = [\"onClick\", \"disabled\"]\nconst _hoisted_36 = [\"onClick\", \"disabled\"]\n\nimport { computed, nextTick, ref, watch } from \"vue\";\nimport { default as dayjs } from \"dayjs\";\nimport { default as isSameOrAfter } from \"dayjs/plugin/isSameOrAfter\";\nimport { default as isSameOrBefore } from \"dayjs/plugin/isSameOrBefore\";\nimport { default as it } from \"dayjs/locale/it\";\nimport { default as updateLocale } from \"dayjs/plugin/updateLocale\";\nimport { default as weekOfYear } from \"dayjs/plugin/weekOfYear\";\nimport { groupBy } from \"@/utilities/functions/groupBy\";\nimport { isNil } from \"@/utilities/functions/isNil\";\nimport { last } from \"@/utilities/functions/last\";\nimport type { Dayjs } from \"dayjs\";\nimport type { InputHTMLAttributes } from \"vue\";\n\nexport type BaseDatePickerProps = {\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n */\n firstDayOfWeek?: (typeof it)[\"weekStart\"];\n\n /**\n * Maximum selectable date\n */\n max?: Date | string | number;\n\n /**\n * Minimum selectable date\n */\n min?: Date | string | number;\n\n /**\n * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n */\n modelValue: string | string[] | null;\n\n /**\n * Allows the selection of multiple items.\n */\n multiple?: boolean;\n\n /**\n * Selects a range of dates between two dates. It selects all of the days between start and end\n */\n range?: boolean;\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n * @param date\n */\n selectable?: (date: Date) => boolean;\n\n /**\n * Width of the calendar\n */\n width?: number | string;\n};\n\ntype Header = {\n id: string;\n\n label: string;\n\n original: Dayjs;\n};\n\ntype Cell = {\n buttonId: string;\n\n disabled: boolean;\n\n first: boolean;\n\n highlighted: boolean;\n\n id: string;\n\n label: string;\n\n last: boolean;\n\n middle: boolean;\n\n original: Dayjs;\n\n selected: boolean;\n\n slotName: string;\n};\n\nexport type BaseDatePickerSlots = {\n day?: (props: {\n first: Cell[\"first\"];\n highlighted: Cell[\"highlighted\"];\n item: Cell[\"original\"];\n label: Cell[\"label\"];\n last: Cell[\"last\"];\n middle: Cell[\"middle\"];\n selected: Cell[\"selected\"];\n }) => any;\n} & {\n [key: string]: (props: {\n first: Cell[\"first\"];\n highlighted: Cell[\"highlighted\"];\n item: Cell[\"original\"];\n label: Cell[\"label\"];\n last: Cell[\"last\"];\n middle: Cell[\"middle\"];\n selected: Cell[\"selected\"];\n }) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDatePicker',\n props: {\n disabled: { type: Boolean },\n firstDayOfWeek: { default: 1 },\n max: {},\n min: {},\n modelValue: {},\n multiple: { type: Boolean },\n range: { type: Boolean },\n readonly: {},\n selectable: {},\n width: { default: 290 }\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\ndayjs.extend(weekOfYear);\ndayjs.extend(updateLocale);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\ndayjs.locale(it);\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\ndayjs.updateLocale(\"it\", {\n weekStart: props.firstDayOfWeek,\n});\n\nif (props.multiple && props.range) {\n throw new Error(\"Date picker cannot be both multiple and range\");\n}\n\nconst calendar = ref<HTMLElement | null>(null);\n\nconst selectionMode = ref(\"day\");\nconst yearSelector = ref<HTMLElement | null>(null);\n\nlet initialDate = ref(dayjs());\n\nif (Array.isArray(props.modelValue)) {\n if (props.modelValue.length) {\n initialDate.value = dayjs(last(props.modelValue));\n }\n} else if (props.modelValue) {\n initialDate.value = dayjs(props.modelValue);\n}\n\nlet currentDate = ref(initialDate.value.clone());\n\nconst mappedHeaders = computed<Header[]>(() => {\n return (\n new Array(7)\n .fill(\"\")\n // Sort days based on first day of the week\n .map((_, index) => dayjs().day((index + props.firstDayOfWeek) % 7))\n .map((day) => {\n const selected = modelValueMetadata.value.selected(day);\n return {\n label: day.format(\"dd\").slice(0, 1).toUpperCase(),\n id: day.toISOString(),\n original: day,\n selected,\n };\n })\n );\n});\n\nconst displayedDates = computed<Cell[]>(() => {\n let startOfMonth = currentDate.value.clone().startOf(\"month\");\n let firstValueToDisplay = startOfMonth.clone().startOf(\"week\");\n let endOfMonth = currentDate.value.clone().endOf(\"month\");\n let lastValueToDisplay = endOfMonth.clone().endOf(\"week\");\n\n let datesInPage: Dayjs[] = [];\n const monthValue = startOfMonth.month();\n for (\n let index = firstValueToDisplay;\n index.isBefore(lastValueToDisplay);\n index = index.add(1, \"day\")\n ) {\n datesInPage.push(index.clone());\n }\n return datesInPage.map((date): Cell => {\n const id = date.toISOString();\n const selected = !!modelValueMetadata.value.selected(date);\n\n const first = !!(\n modelValueMetadata.value.isFirstOfRange(date) && props.range\n );\n const last = !!(\n modelValueMetadata.value.isLastOfRange(date) && props.range\n );\n const middle = !!(selected && !first && !last && props.range);\n\n /* Highlighted means it's current month */\n const highlighted = date.month() === monthValue;\n\n const disabled = isDateDisabled(date);\n\n return {\n buttonId: \"date_\" + id,\n disabled,\n first,\n highlighted,\n id,\n label: date.get(\"D\").toString(),\n last,\n middle,\n original: date,\n selected,\n slotName: id,\n };\n });\n});\n\nconst isDateDisabled = (date: Dayjs) => {\n let passing = true;\n if (props.min) {\n passing &&= date.isSameOrAfter(dayjs(props.min).startOf(\"day\"));\n }\n if (props.max) {\n passing &&= date.isSameOrBefore(dayjs(props.max).startOf(\"day\"));\n }\n if (typeof props.selectable === \"function\") {\n passing &&= props.selectable(date.toDate());\n }\n return !passing;\n};\n\nconst indexedDates = computed(() => {\n return groupBy(displayedDates.value, (date: Cell) => date.id);\n});\n\nconst indexedRows = computed<Record<string, Cell[]>>(() => {\n const indexedByWeek = groupBy(displayedDates.value, (cell: Cell) =>\n cell.original.week().toString()\n );\n return indexedByWeek;\n});\n\nconst modelValueMetadata = computed(() => {\n let min = Infinity;\n let max = -Infinity;\n let selected: { [key: number]: number } = {};\n\n if (props.modelValue) {\n const arr = ([] as (string | Date)[])\n .concat(props.modelValue)\n .map((value) => dayjs(value).startOf(\"day\"))\n .map((date) => date.valueOf());\n arr.forEach((item, index) => {\n if (item < min) min = item;\n if (item > max) max = item;\n selected[item] = index;\n });\n }\n return {\n min,\n max,\n index: (date: Dayjs) => selected[date.valueOf()],\n selected: (date: Dayjs) => !isNil(selected[date.valueOf()]),\n isFirstOfRange: (date: Dayjs) => date.valueOf() === min,\n isLastOfRange: (date: Dayjs) => date.valueOf() === max,\n };\n});\n\nconst onButtonClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLButtonElement) {\n const [, id] = event.target.id.split(\"_\");\n const date = indexedDates.value[id][0];\n onDateselected(date);\n }\n};\n\nconst onDateselected = (date: Cell) => {\n if (props.readonly) return;\n if (props.range) {\n if (props.modelValue && Array.isArray(props.modelValue)) {\n if (props.modelValue.length !== 1) {\n emit(\"update:modelValue\", [date.original.toISOString()]);\n } else {\n if (props.modelValue.length) {\n let [from, to] = [dayjs(props.modelValue[0]), date.original].sort(\n (a, b) =>\n a.valueOf > b.valueOf ? 1 : a.valueOf() < b.valueOf() ? -1 : 0\n );\n to = to.add(1, \"day\");\n const startDate = dayjs(from);\n\n let datesToEmit: Dayjs[] = [];\n for (\n let index = startDate;\n index.isBefore(to);\n index = index.add(1, \"day\")\n ) {\n datesToEmit.push(index.clone());\n }\n const valueToEmit = datesToEmit.map((el) => el.toISOString());\n emit(\"update:modelValue\", valueToEmit);\n } else {\n const valueToEmit = [\n ...props.modelValue,\n date.original.toISOString(),\n ];\n emit(\"update:modelValue\", valueToEmit);\n }\n }\n } else {\n throw new Error(\n \"Date picker is set to range but modelValue is not an array.\"\n );\n }\n } else if (props.multiple) {\n if (props.modelValue && Array.isArray(props.modelValue)) {\n if (!date.selected) {\n emit(\n \"update:modelValue\",\n [...props.modelValue, date.original.toISOString()].sort(\n (iso1, iso2) => (iso1 < iso2 ? -1 : iso1 > iso2 ? 1 : 0)\n )\n );\n } else {\n const asString = date.original.toISOString();\n const valueToEmit = props.modelValue.filter((el) => el !== asString);\n emit(\"update:modelValue\", valueToEmit);\n }\n } else {\n throw new Error(\n \"datepicker is set to multiple but modelValue is not an array.\"\n );\n }\n } else {\n if (date.selected) {\n emit(\"update:modelValue\", null);\n } else {\n emit(\"update:modelValue\", date.original.toISOString());\n }\n }\n};\n\nconst monthOptions = computed(() => {\n const currentMonth = currentDate.value.month();\n return new Array(12)\n .fill(currentDate.value.clone().startOf(\"year\"))\n .map((date: Dayjs, index) => date.add(index, \"month\"))\n .map((date) => ({\n text: date.format(\"MMMM\"),\n key: date.unix(),\n selected: date.month() === currentMonth,\n handler: () => setDateToMonth(date),\n }));\n});\n\nconst decreaseMonth = () => {\n currentDate.value = currentDate.value.subtract(1, \"month\");\n};\nconst increaseMonth = () => {\n currentDate.value = currentDate.value.add(1, \"month\");\n};\n\nconst setDateToMonth = (date: Dayjs) => {\n const month = date.get(\"month\");\n const toEmit = currentDate.value.set(\"month\", month);\n if (props.modelValue && !Array.isArray(props.modelValue)) {\n if (isDateDisabled(toEmit)) {\n currentDate.value = toEmit;\n } else {\n emit(\"update:modelValue\", toEmit.toISOString());\n }\n } else {\n currentDate.value = toEmit;\n }\n selectionMode.value = \"day\";\n};\n\nconst setSelectionModeToYear = async () => {\n selectionMode.value = \"year\";\n await nextTick();\n const selectedYear = yearSelector.value?.querySelector(\n \".bb-base-date-picker__year-selector-year--selected\"\n );\n if (selectedYear) {\n selectedYear.scrollIntoView({ block: \"center\", inline: \"center\" });\n }\n};\n\nconst setSelectionModeToDay = () => (selectionMode.value = \"day\");\n\nconst yearOptions = computed(() => {\n const currentYear = currentDate.value.year();\n const pastYears = new Array(100)\n .fill(currentDate.value.clone())\n .map((date: Dayjs, index, arr) =>\n date.year(currentYear - arr.length + index)\n );\n const futureYears = new Array(100)\n .fill(currentDate.value.clone())\n .map((date: Dayjs, index) => date.year(currentYear + index + 1));\n return pastYears\n .concat(currentDate.value.clone())\n .concat(futureYears)\n .map((date) => ({\n text: date.format(\"YYYY\"),\n key: date.unix(),\n selected: date.year() === currentYear,\n handler: () => setDateToYear(date),\n }));\n});\n\nconst decreaseYear = () => {\n const toEmit = currentDate.value.subtract(1, \"year\");\n if (props.modelValue && !Array.isArray(props.modelValue)) {\n if (isDateDisabled(toEmit)) {\n currentDate.value = toEmit;\n } else {\n emit(\"update:modelValue\", toEmit.toISOString());\n }\n } else {\n currentDate.value = toEmit;\n }\n};\nconst increaseYear = () => {\n const toEmit = currentDate.value.add(1, \"year\");\n if (props.modelValue && !Array.isArray(props.modelValue)) {\n if (isDateDisabled(toEmit)) {\n currentDate.value = toEmit;\n } else {\n emit(\"update:modelValue\", toEmit.toISOString());\n }\n } else {\n currentDate.value = toEmit;\n }\n};\n\nconst setDateToYear = (date: Dayjs) => {\n const year = date.get(\"year\");\n const toEmit = currentDate.value.set(\"year\", year);\n if (props.modelValue && !Array.isArray(props.modelValue)) {\n if (isDateDisabled(toEmit)) {\n currentDate.value = toEmit;\n } else {\n emit(\"update:modelValue\", toEmit.toISOString());\n }\n } else {\n currentDate.value = toEmit;\n }\n selectionMode.value = \"month\";\n};\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.modelValue) {\n if (Array.isArray(props.modelValue)) {\n if (props.modelValue.length) {\n currentDate.value = dayjs(last(props.modelValue));\n } else {\n currentDate.value = dayjs();\n }\n } else {\n currentDate.value = dayjs(props.modelValue);\n }\n } else currentDate.value = dayjs();\n }\n);\n\nconst containerAttributes = computed(() => {\n const classes = {\n \"bb-base-date-picker\": true,\n \"bb-base-date-picker--readonly\": props.readonly,\n \"bb-base-date-picker--disabled\": props.disabled,\n };\n let width: string;\n // If the width is a css unit string use it, if it is a number or number string add px\n if (typeof props.width === \"string\" && Number.isNaN(Number(props.width))) {\n width = props.width;\n } else {\n width = `${props.width}px`;\n }\n const style = {\n width: width,\n };\n\n return {\n class: classes,\n style,\n };\n});\n\n__expose({ calendar, setSelectionModeToDay, isDateDisabled });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _mergeProps(containerAttributes.value, {\n ref_key: \"calendar\",\n ref: calendar\n }), [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: setSelectionModeToYear,\n class: \"bb-base-date-picker__year-button\",\n type: \"button\",\n \"aria-live\": \"polite\"\n }, [\n _createTextVNode(_toDisplayString(_unref(currentDate).format(\"YYYY\")) + \" \", 1),\n _hoisted_3\n ], 8, _hoisted_2)\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_unref(currentDate).format(\"ddd\")) + \", \", 1),\n _createElementVNode(\"span\", _hoisted_6, _toDisplayString(_unref(currentDate).format(\"DD\")), 1),\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (selectionMode.value = 'month')),\n class: \"bb-base-date-picker__month-button\",\n type: \"button\"\n }, _toDisplayString(_unref(currentDate).format(\"MMMM\")), 9, _hoisted_7)\n ])\n ]),\n _withDirectives(_createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: decreaseMonth,\n class: \"bb-base-date-picker__previous-month-button\",\n type: \"button\"\n }, _hoisted_12, 8, _hoisted_9),\n _createVNode(_Transition, {\n name: \"fade\",\n mode: \"out-in\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"button\", {\n disabled: _ctx.disabled,\n key: _unref(currentDate).month(),\n onClick: _cache[1] || (_cache[1] = ($event: any) => (selectionMode.value = 'month')),\n class: \"bb-base-date-picker__current-month-button\",\n type: \"button\",\n \"aria-live\": \"polite\"\n }, _toDisplayString(_unref(currentDate).format(\"MMMM\")), 9, _hoisted_13))\n ]),\n _: 1\n }),\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: increaseMonth,\n class: \"bb-base-date-picker__next-month-button\",\n type: \"button\"\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_15, _hoisted_17)),\n _hoisted_18\n ], 8, _hoisted_14)\n ], 512), [\n [_vShow, selectionMode.value === 'day']\n ]),\n _withDirectives(_createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: decreaseYear,\n class: \"bb-base-date-picker__previous-year-button\",\n type: \"button\"\n }, _hoisted_23, 8, _hoisted_20),\n _createVNode(_Transition, {\n name: \"fade\",\n mode: \"out-in\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"button\", {\n disabled: _ctx.disabled,\n key: _unref(currentDate).year(),\n onClick: setSelectionModeToYear,\n class: \"bb-base-date-picker__current-year-button\",\n type: \"button\",\n \"aria-live\": \"polite\"\n }, _toDisplayString(_unref(currentDate).format(\"YYYY\")), 9, _hoisted_24))\n ]),\n _: 1\n }),\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled,\n onClick: increaseYear,\n class: \"bb-base-date-picker__next-year-button\",\n type: \"button\"\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_26, _hoisted_28)),\n _hoisted_29\n ], 8, _hoisted_25)\n ], 512), [\n [_vShow, selectionMode.value === 'month']\n ]),\n (selectionMode.value === 'year')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_30))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_31, [\n _createVNode(_Transition, {\n name: \"fade\",\n mode: \"out-in\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"div\", {\n key: _unref(currentDate).month(),\n class: _normalizeClass([\"bb-base-date-picker-month\", { invisible: selectionMode.value !== 'day' }])\n }, [\n _createElementVNode(\"div\", _hoisted_32, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(mappedHeaders.value, (header) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: header.id,\n class: \"bb-base-date-picker-header\"\n }, _toDisplayString(header.label), 1))\n }), 128))\n ]),\n _createElementVNode(\"div\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(indexedRows.value, (cells, id) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: id,\n class: \"bb-base-date-picker-week\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cells, (cell) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: cell.id,\n class: _normalizeClass({\n 'bb-base-date-picker-date--disabled':\n _ctx.disabled || cell.disabled,\n 'bb-base-date-picker-date--first': cell.first,\n 'bb-base-date-picker-date--highlighted': cell.highlighted,\n 'bb-base-date-picker-date--last': cell.last,\n 'bb-base-date-picker-date--middle': cell.middle,\n 'bb-base-date-picker-date--selected': cell.selected,\n 'bb-base-date-picker-date': true,\n })\n }, [\n _createElementVNode(\"button\", {\n disabled: _ctx.disabled || cell.disabled,\n id: cell.buttonId,\n onClick: onButtonClick,\n class: \"bb-base-date-picker-date__button\",\n type: \"button\"\n }, _toDisplayString(cell.label), 9, _hoisted_33),\n _renderSlot(_ctx.$slots, 'day', {\n first: cell.first,\n highlighted: cell.highlighted,\n item: cell.original,\n label: cell.label,\n last: cell.last,\n middle: cell.middle,\n selected: cell.selected\n }),\n _renderSlot(_ctx.$slots, cell.slotName, {\n first: cell.first,\n highlighted: cell.highlighted,\n item: cell.original,\n label: cell.label,\n last: cell.last,\n middle: cell.middle,\n selected: cell.selected\n })\n ], 2))\n }), 128))\n ]))\n }), 128))\n ])\n ], 2))\n ]),\n _: 3\n }),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (selectionMode.value === 'month')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_34, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(monthOptions.value, (option) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n key: option.key,\n class: _normalizeClass({\n 'bb-base-date-picker__month-selector-month': true,\n 'bb-base-date-picker__month-selector-month--selected':\n option.selected,\n }),\n onClick: option.handler,\n disabled: _ctx.disabled,\n type: \"button\"\n }, _toDisplayString(option.text), 11, _hoisted_35))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (selectionMode.value === 'year')\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"bb-base-date-picker__year-selector\",\n ref_key: \"yearSelector\",\n ref: yearSelector\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(yearOptions.value, (option) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n key: option.key,\n class: _normalizeClass({\n 'bb-base-date-picker__year-selector-year': true,\n 'bb-base-date-picker__year-selector-year--selected':\n option.selected,\n }),\n onClick: option.handler,\n disabled: _ctx.disabled\n }, _toDisplayString(option.text), 11, _hoisted_36))\n }), 128))\n ], 512))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_sfc_main","_defineComponent","__props","__expose","__emit","dayjs","weekOfYear","updateLocale","isSameOrAfter","isSameOrBefore","it","props","emit","calendar","ref","selectionMode","yearSelector","initialDate","last","currentDate","mappedHeaders","computed","_","index","day","selected","modelValueMetadata","displayedDates","startOfMonth","firstValueToDisplay","lastValueToDisplay","datesInPage","monthValue","date","id","first","middle","highlighted","disabled","isDateDisabled","passing","indexedDates","groupBy","indexedRows","cell","min","max","value","item","isNil","onButtonClick","event","onDateselected","from","to","a","b","startDate","datesToEmit","valueToEmit","el","iso1","iso2","asString","monthOptions","currentMonth","setDateToMonth","decreaseMonth","increaseMonth","month","toEmit","setSelectionModeToYear","nextTick","selectedYear","_a","setSelectionModeToDay","yearOptions","currentYear","pastYears","arr","futureYears","setDateToYear","decreaseYear","increaseYear","year","watch","containerAttributes","classes","width","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createTextVNode","_toDisplayString","_unref","$event","_withDirectives","_createVNode","_Transition","_withCtx","_vShow","_createCommentVNode","_normalizeClass","_Fragment","_renderList","header","cells","_renderSlot","option"],"mappings":";;;;;;;;;;AAGA,MAAMA,KAAa,EAAE,OAAO,iCACtBC,KAAa,CAAC,UAAU,GACxBC,KAA0BC,gBAAAA,EAAoB,QAAQ,MAAM,MAAM,EAAE,GACpEC,KAAa;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AACf,GACMC,KAAa,EAAE,OAAO,kCACtBC,KAAa,EAAE,OAAO,mCACtBC,K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AA,QAAA,CACJ;AAAA,MAAA,CACF;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
1
+ {"version":3,"file":"index15.js","sources":["../src/components/BaseDatePicker/BaseDatePicker.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, renderSlot as _renderSlot, normalizeClass as _normalizeClass, mergeProps as _mergeProps } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-date-picker__header\" }\nconst _hoisted_2 = [\"disabled\"]\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"span\", null, null, -1)\nconst _hoisted_4 = {\n \"aria-live\": \"polite\",\n class: \"bb-base-date-picker__selected-day-label\"\n}\nconst _hoisted_5 = { class: \"bb-base-date-picker__weekday\" }\nconst _hoisted_6 = { class: \"bb-base-date-picker__monthday\" }\nconst _hoisted_7 = [\"disabled\"]\nconst _hoisted_8 = { class: \"bb-base-date-picker__small-month-selector\" }\nconst _hoisted_9 = [\"disabled\"]\nconst _hoisted_10 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n })\n], -1)\nconst _hoisted_11 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai indietro di un mese\", -1)\nconst _hoisted_12 = [\n _hoisted_10,\n _hoisted_11\n]\nconst _hoisted_13 = [\"disabled\"]\nconst _hoisted_14 = [\"disabled\"]\nconst _hoisted_15 = {\n style: {\"transform\":\"rotate(180deg)\"},\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_16 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_17 = [\n _hoisted_16\n]\nconst _hoisted_18 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai avanti di un mese\", -1)\nconst _hoisted_19 = { class: \"bb-base-date-picker__small-year-selector\" }\nconst _hoisted_20 = [\"disabled\"]\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, [\n /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n })\n], -1)\nconst _hoisted_22 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai indietro di un anno\", -1)\nconst _hoisted_23 = [\n _hoisted_21,\n _hoisted_22\n]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = [\"disabled\"]\nconst _hoisted_26 = {\n style: {\"transform\":\"rotate(180deg)\"},\n viewBox: \"0 0 24 24\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_27 = /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z\",\n fill: \"currentColor\"\n}, null, -1)\nconst _hoisted_28 = [\n _hoisted_27\n]\nconst _hoisted_29 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Vai avanti di un anno\", -1)\nconst _hoisted_30 = {\n key: 0,\n style: {\"height\":\"32px\"}\n}\nconst _hoisted_31 = { class: \"bb-base-date-picker-calendar\" }\nconst _hoisted_32 = { class: \"bb-base-date-picker-header-container\" }\nconst _hoisted_33 = [\"id\", \"disabled\"]\nconst _hoisted_34 = {\n key: 0,\n class: \"bb-base-date-picker__month-selector\"\n}\nconst _hoisted_35 = [\"disabled\", \"onClick\"]\nconst _hoisted_36 = [\"disabled\", \"onClick\"]\n\nimport { computed, nextTick, ref, watch } from 'vue';\nimport { default as dayjs } from 'dayjs';\nimport { default as isSameOrAfter } from 'dayjs/plugin/isSameOrAfter';\nimport { default as isSameOrBefore } from 'dayjs/plugin/isSameOrBefore';\nimport { default as it } from 'dayjs/locale/it';\nimport { default as updateLocale } from 'dayjs/plugin/updateLocale';\nimport { default as weekOfYear } from 'dayjs/plugin/weekOfYear';\nimport { groupBy } from '@/utilities/functions/groupBy';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { last } from '@/utilities/functions/last';\nimport type { Dayjs } from 'dayjs';\nimport type { InputHTMLAttributes } from 'vue';\n\nexport type BaseDatePickerProps = {\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\ntype Header = {\n\tid: string;\n\n\tlabel: string;\n\n\toriginal: Dayjs;\n};\n\ntype Cell = {\n\tbuttonId: string;\n\n\tdisabled: boolean;\n\n\tfirst: boolean;\n\n\thighlighted: boolean;\n\n\tid: string;\n\n\tlabel: string;\n\n\tlast: boolean;\n\n\tmiddle: boolean;\n\n\toriginal: Dayjs;\n\n\tselected: boolean;\n\n\tslotName: string;\n};\n\nexport type BaseDatePickerSlots = {\n\tday?: (props: {\n\t\tfirst: Cell['first'];\n\t\thighlighted: Cell['highlighted'];\n\t\titem: Cell['original'];\n\t\tlabel: Cell['label'];\n\t\tlast: Cell['last'];\n\t\tmiddle: Cell['middle'];\n\t\tselected: Cell['selected'];\n\t}) => any;\n} & {\n\t[key: string]: (props: {\n\t\tfirst: Cell['first'];\n\t\thighlighted: Cell['highlighted'];\n\t\titem: Cell['original'];\n\t\tlabel: Cell['label'];\n\t\tlast: Cell['last'];\n\t\tmiddle: Cell['middle'];\n\t\tselected: Cell['selected'];\n\t}) => any;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDatePicker',\n props: {\n disabled: { type: Boolean },\n firstDayOfWeek: { default: 1 },\n max: {},\n min: {},\n modelValue: {},\n multiple: { type: Boolean },\n range: { type: Boolean },\n readonly: {},\n selectable: {},\n width: { default: 290 }\n },\n emits: ['update:modelValue'],\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\ndayjs.extend(weekOfYear);\ndayjs.extend(updateLocale);\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\ndayjs.locale(it);\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\ndayjs.updateLocale('it', {\n\tweekStart: props.firstDayOfWeek,\n});\n\nif (props.multiple && props.range) {\n\tthrow new Error('Date picker cannot be both multiple and range');\n}\n\nconst calendar = ref<HTMLElement | null>(null);\n\nconst selectionMode = ref('day');\nconst yearSelector = ref<HTMLElement | null>(null);\n\nlet initialDate = ref(dayjs());\n\nif (Array.isArray(props.modelValue)) {\n\tif (props.modelValue.length) {\n\t\tinitialDate.value = dayjs(last(props.modelValue));\n\t}\n} else if (props.modelValue) {\n\tinitialDate.value = dayjs(props.modelValue);\n}\n\nlet currentDate = ref(initialDate.value.clone());\n\nconst mappedHeaders = computed<Header[]>(() => {\n\treturn (\n\t\tnew Array(7)\n\t\t\t.fill('')\n\t\t\t// Sort days based on first day of the week\n\t\t\t.map((_, index) => dayjs().day((index + props.firstDayOfWeek) % 7))\n\t\t\t.map((day) => {\n\t\t\t\tconst selected = modelValueMetadata.value.selected(day);\n\t\t\t\treturn {\n\t\t\t\t\tlabel: day.format('dd').slice(0, 1).toUpperCase(),\n\t\t\t\t\tid: day.toISOString(),\n\t\t\t\t\toriginal: day,\n\t\t\t\t\tselected,\n\t\t\t\t};\n\t\t\t})\n\t);\n});\n\nconst displayedDates = computed<Cell[]>(() => {\n\tlet startOfMonth = currentDate.value.clone().startOf('month');\n\tlet firstValueToDisplay = startOfMonth.clone().startOf('week');\n\tlet endOfMonth = currentDate.value.clone().endOf('month');\n\tlet lastValueToDisplay = endOfMonth.clone().endOf('week');\n\n\tlet datesInPage: Dayjs[] = [];\n\tconst monthValue = startOfMonth.month();\n\tfor (\n\t\tlet index = firstValueToDisplay;\n\t\tindex.isBefore(lastValueToDisplay);\n\t\tindex = index.add(1, 'day')\n\t) {\n\t\tdatesInPage.push(index.clone());\n\t}\n\treturn datesInPage.map((date): Cell => {\n\t\tconst id = date.toISOString();\n\t\tlet selected = !!modelValueMetadata.value.selected(date);\n\t\tif (props.range && props.modelValue?.length === 2) {\n\t\t\tconst asNumber = date.valueOf();\n\t\t\tselected =\n\t\t\t\tmodelValueMetadata.value.min <= asNumber &&\n\t\t\t\tmodelValueMetadata.value.max >= asNumber;\n\t\t}\n\n\t\tconst first = !!(\n\t\t\tmodelValueMetadata.value.isFirstOfRange(date) && props.range\n\t\t);\n\t\tconst last = !!(\n\t\t\tmodelValueMetadata.value.isLastOfRange(date) && props.range\n\t\t);\n\t\tconst middle = !!(selected && !first && !last && props.range);\n\n\t\t/* Highlighted means it's current month */\n\t\tconst highlighted = date.month() === monthValue;\n\n\t\tconst disabled = isDateDisabled(date);\n\n\t\treturn {\n\t\t\tbuttonId: 'date_' + id,\n\t\t\tdisabled,\n\t\t\tfirst,\n\t\t\thighlighted,\n\t\t\tid,\n\t\t\tlabel: date.get('D').toString(),\n\t\t\tlast,\n\t\t\tmiddle,\n\t\t\toriginal: date,\n\t\t\tselected,\n\t\t\tslotName: id,\n\t\t};\n\t});\n});\n\nconst isDateDisabled = (date: Dayjs) => {\n\tlet passing = true;\n\tif (props.min) {\n\t\tpassing &&= date.isSameOrAfter(dayjs(props.min).startOf('day'));\n\t}\n\tif (props.max) {\n\t\tpassing &&= date.isSameOrBefore(dayjs(props.max).startOf('day'));\n\t}\n\tif (typeof props.selectable === 'function') {\n\t\tpassing &&= props.selectable(date.toDate());\n\t}\n\treturn !passing;\n};\n\nconst indexedDates = computed(() => {\n\treturn groupBy(displayedDates.value, (date: Cell) => date.id);\n});\n\nconst indexedRows = computed<Record<string, Cell[]>>(() => {\n\tconst indexedByWeek = groupBy(displayedDates.value, (cell: Cell) =>\n\t\tcell.original.week().toString()\n\t);\n\treturn indexedByWeek;\n});\n\nconst modelValueMetadata = computed(() => {\n\tlet min = Infinity;\n\tlet max = -Infinity;\n\tlet selected: { [key: number]: number } = {};\n\n\tif (props.modelValue) {\n\t\tconst arr = ([] as (string | Date)[])\n\t\t\t.concat(props.modelValue)\n\t\t\t.map((value) => dayjs(value).startOf('day'))\n\t\t\t.map((date) => date.valueOf());\n\t\tarr.forEach((item, index) => {\n\t\t\tif (item < min) min = item;\n\t\t\tif (item > max) max = item;\n\t\t\tselected[item] = index;\n\t\t});\n\t}\n\treturn {\n\t\tmin,\n\t\tmax,\n\t\tindex: (date: Dayjs) => selected[date.valueOf()],\n\t\tselected: (date: Dayjs) => !isNil(selected[date.valueOf()]),\n\t\tisFirstOfRange: (date: Dayjs) => date.valueOf() === min,\n\t\tisLastOfRange: (date: Dayjs) => date.valueOf() === max,\n\t};\n});\n\nconst onButtonClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLButtonElement) {\n\t\tconst [, id] = event.target.id.split('_');\n\t\tconst date = indexedDates.value[id][0];\n\t\tonDateselected(date);\n\t}\n};\n\nconst onDateselected = (date: Cell) => {\n\tif (props.readonly) return;\n\tif (props.range) {\n\t\tif (props.modelValue && Array.isArray(props.modelValue)) {\n\t\t\tif (props.modelValue.length !== 1) {\n\t\t\t\temit('update:modelValue', [date.original.toISOString()]);\n\t\t\t} else {\n\t\t\t\tif (props.modelValue.length) {\n\t\t\t\t\tlet [from, to] = [dayjs(props.modelValue[0]), date.original].sort(\n\t\t\t\t\t\t(a, b) =>\n\t\t\t\t\t\t\ta.valueOf > b.valueOf ? 1 : a.valueOf() < b.valueOf() ? -1 : 0\n\t\t\t\t\t);\n\n\t\t\t\t\tconst valueToEmit = [from, to].map((el) => el.toISOString());\n\t\t\t\t\temit('update:modelValue', valueToEmit);\n\t\t\t\t} else {\n\t\t\t\t\tconst valueToEmit = [\n\t\t\t\t\t\t...props.modelValue,\n\t\t\t\t\t\tdate.original.toISOString(),\n\t\t\t\t\t];\n\t\t\t\t\temit('update:modelValue', valueToEmit);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\t'Date picker is set to range but modelValue is not an array.'\n\t\t\t);\n\t\t}\n\t} else if (props.multiple) {\n\t\tif (props.modelValue && Array.isArray(props.modelValue)) {\n\t\t\tif (!date.selected) {\n\t\t\t\temit(\n\t\t\t\t\t'update:modelValue',\n\t\t\t\t\t[...props.modelValue, date.original.toISOString()].sort(\n\t\t\t\t\t\t(iso1, iso2) => (iso1 < iso2 ? -1 : iso1 > iso2 ? 1 : 0)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconst asString = date.original.toISOString();\n\t\t\t\tconst valueToEmit = props.modelValue.filter((el) => el !== asString);\n\t\t\t\temit('update:modelValue', valueToEmit);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\t'datepicker is set to multiple but modelValue is not an array.'\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (date.selected) {\n\t\t\temit('update:modelValue', null);\n\t\t} else {\n\t\t\temit('update:modelValue', date.original.toISOString());\n\t\t}\n\t}\n};\n\nconst monthOptions = computed(() => {\n\tconst currentMonth = currentDate.value.month();\n\treturn new Array(12)\n\t\t.fill(currentDate.value.clone().startOf('year'))\n\t\t.map((date: Dayjs, index) => date.add(index, 'month'))\n\t\t.map((date) => ({\n\t\t\ttext: date.format('MMMM'),\n\t\t\tkey: date.unix(),\n\t\t\tselected: date.month() === currentMonth,\n\t\t\thandler: () => setDateToMonth(date),\n\t\t}));\n});\n\nconst decreaseMonth = () => {\n\tcurrentDate.value = currentDate.value.subtract(1, 'month');\n};\nconst increaseMonth = () => {\n\tcurrentDate.value = currentDate.value.add(1, 'month');\n};\n\nconst setDateToMonth = (date: Dayjs) => {\n\tconst month = date.get('month');\n\tconst toEmit = currentDate.value.set('month', month);\n\tif (props.modelValue && !Array.isArray(props.modelValue)) {\n\t\tif (isDateDisabled(toEmit)) {\n\t\t\tcurrentDate.value = toEmit;\n\t\t} else {\n\t\t\temit('update:modelValue', toEmit.toISOString());\n\t\t}\n\t} else {\n\t\tcurrentDate.value = toEmit;\n\t}\n\tselectionMode.value = 'day';\n};\n\nconst setSelectionModeToYear = async () => {\n\tselectionMode.value = 'year';\n\tawait nextTick();\n\tconst selectedYear = yearSelector.value?.querySelector(\n\t\t'.bb-base-date-picker__year-selector-year--selected'\n\t);\n\tif (selectedYear) {\n\t\tselectedYear.scrollIntoView({ block: 'center', inline: 'center' });\n\t}\n};\n\nconst setSelectionModeToDay = () => (selectionMode.value = 'day');\n\nconst yearOptions = computed(() => {\n\tconst currentYear = currentDate.value.year();\n\tconst pastYears = new Array(100)\n\t\t.fill(currentDate.value.clone())\n\t\t.map((date: Dayjs, index, arr) =>\n\t\t\tdate.year(currentYear - arr.length + index)\n\t\t);\n\tconst futureYears = new Array(100)\n\t\t.fill(currentDate.value.clone())\n\t\t.map((date: Dayjs, index) => date.year(currentYear + index + 1));\n\treturn pastYears\n\t\t.concat(currentDate.value.clone())\n\t\t.concat(futureYears)\n\t\t.map((date) => ({\n\t\t\ttext: date.format('YYYY'),\n\t\t\tkey: date.unix(),\n\t\t\tselected: date.year() === currentYear,\n\t\t\thandler: () => setDateToYear(date),\n\t\t}));\n});\n\nconst decreaseYear = () => {\n\tconst toEmit = currentDate.value.subtract(1, 'year');\n\tif (props.modelValue && !Array.isArray(props.modelValue)) {\n\t\tif (isDateDisabled(toEmit)) {\n\t\t\tcurrentDate.value = toEmit;\n\t\t} else {\n\t\t\temit('update:modelValue', toEmit.toISOString());\n\t\t}\n\t} else {\n\t\tcurrentDate.value = toEmit;\n\t}\n};\nconst increaseYear = () => {\n\tconst toEmit = currentDate.value.add(1, 'year');\n\tif (props.modelValue && !Array.isArray(props.modelValue)) {\n\t\tif (isDateDisabled(toEmit)) {\n\t\t\tcurrentDate.value = toEmit;\n\t\t} else {\n\t\t\temit('update:modelValue', toEmit.toISOString());\n\t\t}\n\t} else {\n\t\tcurrentDate.value = toEmit;\n\t}\n};\n\nconst setDateToYear = (date: Dayjs) => {\n\tconst year = date.get('year');\n\tconst toEmit = currentDate.value.set('year', year);\n\tif (props.modelValue && !Array.isArray(props.modelValue)) {\n\t\tif (isDateDisabled(toEmit)) {\n\t\t\tcurrentDate.value = toEmit;\n\t\t} else {\n\t\t\temit('update:modelValue', toEmit.toISOString());\n\t\t}\n\t} else {\n\t\tcurrentDate.value = toEmit;\n\t}\n\tselectionMode.value = 'month';\n};\n\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (props.modelValue) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\tif (props.modelValue.length) {\n\t\t\t\t\tcurrentDate.value = dayjs(last(props.modelValue));\n\t\t\t\t} else {\n\t\t\t\t\tcurrentDate.value = dayjs();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentDate.value = dayjs(props.modelValue);\n\t\t\t}\n\t\t} else currentDate.value = dayjs();\n\t}\n);\n\nconst containerAttributes = computed(() => {\n\tconst classes = {\n\t\t'bb-base-date-picker': true,\n\t\t'bb-base-date-picker--readonly': props.readonly,\n\t\t'bb-base-date-picker--disabled': props.disabled,\n\t};\n\tlet width: string;\n\t// If the width is a css unit string use it, if it is a number or number string add px\n\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\twidth = props.width;\n\t} else {\n\t\twidth = `${props.width}px`;\n\t}\n\tconst style = {\n\t\twidth: width,\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\n__expose({ calendar, setSelectionModeToDay, isDateDisabled });\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _mergeProps(containerAttributes.value, {\n ref_key: \"calendar\",\n ref: calendar\n }), [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"button\", {\n \"aria-live\": \"polite\",\n class: \"bb-base-date-picker__year-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: setSelectionModeToYear\n }, [\n _createTextVNode(_toDisplayString(_unref(currentDate).format('YYYY')) + \" \", 1),\n _hoisted_3\n ], 8, _hoisted_2)\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_unref(currentDate).format('ddd')) + \", \", 1),\n _createElementVNode(\"span\", _hoisted_6, _toDisplayString(_unref(currentDate).format('DD')), 1),\n _createElementVNode(\"button\", {\n class: \"bb-base-date-picker__month-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (selectionMode.value = 'month'))\n }, _toDisplayString(_unref(currentDate).format('MMMM')), 9, _hoisted_7)\n ])\n ]),\n _withDirectives(_createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"button\", {\n class: \"bb-base-date-picker__previous-month-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: decreaseMonth\n }, _hoisted_12, 8, _hoisted_9),\n _createVNode(_Transition, {\n mode: \"out-in\",\n name: \"fade\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"button\", {\n key: _unref(currentDate).month(),\n \"aria-live\": \"polite\",\n class: \"bb-base-date-picker__current-month-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (selectionMode.value = 'month'))\n }, _toDisplayString(_unref(currentDate).format('MMMM')), 9, _hoisted_13))\n ]),\n _: 1\n }),\n _createElementVNode(\"button\", {\n class: \"bb-base-date-picker__next-month-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: increaseMonth\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_15, _hoisted_17)),\n _hoisted_18\n ], 8, _hoisted_14)\n ], 512), [\n [_vShow, selectionMode.value === 'day']\n ]),\n _withDirectives(_createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"button\", {\n class: \"bb-base-date-picker__previous-year-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: decreaseYear\n }, _hoisted_23, 8, _hoisted_20),\n _createVNode(_Transition, {\n mode: \"out-in\",\n name: \"fade\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"button\", {\n key: _unref(currentDate).year(),\n \"aria-live\": \"polite\",\n class: \"bb-base-date-picker__current-year-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: setSelectionModeToYear\n }, _toDisplayString(_unref(currentDate).format('YYYY')), 9, _hoisted_24))\n ]),\n _: 1\n }),\n _createElementVNode(\"button\", {\n class: \"bb-base-date-picker__next-year-button\",\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: increaseYear\n }, [\n (_openBlock(), _createElementBlock(\"svg\", _hoisted_26, _hoisted_28)),\n _hoisted_29\n ], 8, _hoisted_25)\n ], 512), [\n [_vShow, selectionMode.value === 'month']\n ]),\n (selectionMode.value === 'year')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_30))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_31, [\n _createVNode(_Transition, {\n mode: \"out-in\",\n name: \"fade\"\n }, {\n default: _withCtx(() => [\n (_openBlock(), _createElementBlock(\"div\", {\n key: _unref(currentDate).month(),\n class: _normalizeClass([\"bb-base-date-picker-month\", { invisible: selectionMode.value !== 'day' }])\n }, [\n _createElementVNode(\"div\", _hoisted_32, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(mappedHeaders.value, (header) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: header.id,\n class: \"bb-base-date-picker-header\"\n }, _toDisplayString(header.label), 1))\n }), 128))\n ]),\n _createElementVNode(\"div\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(indexedRows.value, (cells, id) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: id,\n class: \"bb-base-date-picker-week\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(cells, (cell) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: cell.id,\n class: _normalizeClass({\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--disabled':\n\t\t\t\t\t\t\t\t\t\t_ctx.disabled || cell.disabled,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--first': cell.first,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--highlighted': cell.highlighted,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--last': cell.last,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--middle': cell.middle,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date--selected': cell.selected,\n\t\t\t\t\t\t\t\t\t'bb-base-date-picker-date': true,\n\t\t\t\t\t\t\t\t})\n }, [\n _createElementVNode(\"button\", {\n id: cell.buttonId,\n class: \"bb-base-date-picker-date__button\",\n disabled: _ctx.disabled || cell.disabled,\n type: \"button\",\n onClick: onButtonClick\n }, _toDisplayString(cell.label), 9, _hoisted_33),\n _renderSlot(_ctx.$slots, 'day', {\n first: cell.first,\n highlighted: cell.highlighted,\n item: cell.original,\n label: cell.label,\n last: cell.last,\n middle: cell.middle,\n selected: cell.selected\n }),\n _renderSlot(_ctx.$slots, cell.slotName, {\n first: cell.first,\n highlighted: cell.highlighted,\n item: cell.original,\n label: cell.label,\n last: cell.last,\n middle: cell.middle,\n selected: cell.selected\n })\n ], 2))\n }), 128))\n ]))\n }), 128))\n ])\n ], 2))\n ]),\n _: 3\n }),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (selectionMode.value === 'month')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_34, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(monthOptions.value, (option) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n key: option.key,\n class: _normalizeClass({\n\t\t\t\t\t\t\t'bb-base-date-picker__month-selector-month': true,\n\t\t\t\t\t\t\t'bb-base-date-picker__month-selector-month--selected':\n\t\t\t\t\t\t\t\toption.selected,\n\t\t\t\t\t\t}),\n disabled: _ctx.disabled,\n type: \"button\",\n onClick: option.handler\n }, _toDisplayString(option.text), 11, _hoisted_35))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }),\n _createVNode(_Transition, { name: \"fade\" }, {\n default: _withCtx(() => [\n (selectionMode.value === 'year')\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n ref_key: \"yearSelector\",\n ref: yearSelector,\n class: \"bb-base-date-picker__year-selector\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(yearOptions.value, (option) => {\n return (_openBlock(), _createElementBlock(\"button\", {\n key: option.key,\n class: _normalizeClass({\n\t\t\t\t\t\t\t'bb-base-date-picker__year-selector-year': true,\n\t\t\t\t\t\t\t'bb-base-date-picker__year-selector-year--selected':\n\t\t\t\t\t\t\t\toption.selected,\n\t\t\t\t\t\t}),\n disabled: _ctx.disabled,\n onClick: option.handler\n }, _toDisplayString(option.text), 11, _hoisted_36))\n }), 128))\n ], 512))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n })\n ])\n ], 16))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_sfc_main","_defineComponent","__props","__expose","__emit","dayjs","weekOfYear","updateLocale","isSameOrAfter","isSameOrBefore","it","props","emit","calendar","ref","selectionMode","yearSelector","initialDate","last","currentDate","mappedHeaders","computed","_","index","day","selected","modelValueMetadata","displayedDates","startOfMonth","firstValueToDisplay","lastValueToDisplay","datesInPage","monthValue","date","id","_a","asNumber","first","middle","highlighted","disabled","isDateDisabled","passing","indexedDates","groupBy","indexedRows","cell","min","max","value","item","isNil","onButtonClick","event","onDateselected","from","to","a","b","valueToEmit","el","iso1","iso2","asString","monthOptions","currentMonth","setDateToMonth","decreaseMonth","increaseMonth","month","toEmit","setSelectionModeToYear","nextTick","selectedYear","setSelectionModeToDay","yearOptions","currentYear","pastYears","arr","futureYears","setDateToYear","decreaseYear","increaseYear","year","watch","containerAttributes","classes","width","_ctx","_cache","_openBlock","_createElementBlock","_mergeProps","_createTextVNode","_toDisplayString","_unref","$event","_withDirectives","_createVNode","_Transition","_withCtx","_vShow","_createCommentVNode","_normalizeClass","_Fragment","_renderList","header","cells","_renderSlot","option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AAA,CACR;AAAA,gBACa,UAAUrB,EAAK;AAAA,gBACf,SAASqB,EAAO;AAAA,cAAA,GACff,EAAiBe,EAAO,IAAI,GAAG,IAAI9G,EAAW,EAClD,GAAG,GAAG;AAAA,YACN,GAAA,GAAG,KACNuG,EAAoB,IAAI,EAAI;AAAA,UAAA,CACjC;AAAA,UACD,GAAG;AAAA,QAAA,CACJ;AAAA,MAAA,CACF;AAAA,OACA,EAAE;AAAA,EAEP;AAEA,CAAC;"}
package/dist/index17.js CHANGED
@@ -1,18 +1,18 @@
1
- import { defineComponent as R, ref as l, computed as Y, watch as J, onMounted as Q, onBeforeUnmount as X, openBlock as B, createElementBlock as Z, normalizeClass as C, renderSlot as u, createElementVNode as g, withDirectives as x, mergeProps as T, unref as d, toDisplayString as ee, createBlock as ae, Teleport as te, createVNode as ne, createSlots as oe, renderList as le, withCtx as ie, normalizeProps as re, guardReactiveProps as se } from "vue";
2
- import { autoUpdate as ue, computePosition as de, flip as ce, shift as fe } from "./index205.js";
3
- import pe from "./index206.js";
4
- import c from "./index197.js";
5
- import me from "./index200.js";
6
- import { identity as be } from "./index207.js";
7
- import { last as ve } from "./index204.js";
1
+ import { defineComponent as R, ref as l, computed as Y, watch as J, onMounted as Q, onBeforeUnmount as X, openBlock as B, createElementBlock as Z, normalizeClass as C, renderSlot as d, createElementVNode as h, withDirectives as x, mergeProps as T, unref as u, toDisplayString as ee, createBlock as ae, Teleport as te, createVNode as ne, createSlots as oe, renderList as le, withCtx as ie, normalizeProps as re, guardReactiveProps as se } from "vue";
2
+ import { autoUpdate as de, computePosition as ue, flip as ce, shift as fe } from "./index212.js";
3
+ import pe from "./index213.js";
4
+ import c from "./index199.js";
5
+ import me from "./index202.js";
6
+ import { identity as be } from "./index214.js";
7
+ import { last as ve } from "./index206.js";
8
8
  import { useId as ye } from "./index7.js";
9
- import { vMaska as ge } from "./index208.js";
9
+ import { vMaska as he } from "./index215.js";
10
10
  import { wait as I } from "./index122.js";
11
- import he from "./index15.js";
11
+ import ge from "./index15.js";
12
12
  import "./index16.js";
13
- import O from "./index209.js";
14
- import { offset as ke } from "./index210.js";
15
- const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name", "placeholder", "readonly", "value", "aria-describedby"], Ee = ["id"], Pe = /* @__PURE__ */ R({
13
+ import P from "./index216.js";
14
+ import { offset as ke } from "./index217.js";
15
+ const we = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "name", "placeholder", "readonly", "value"], Ee = ["id"], Fe = /* @__PURE__ */ R({
16
16
  __name: "BaseDatePickerInput",
17
17
  props: {
18
18
  allowWriting: { type: Boolean, default: !0 },
@@ -33,16 +33,16 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
33
33
  width: { default: 290 }
34
34
  },
35
35
  emits: ["update:modelValue", "inactive", "error"],
36
- setup(P, { emit: W }) {
36
+ setup(F, { emit: G }) {
37
37
  c.extend(pe), c.locale(me);
38
- const o = P, r = W, t = l(null), h = l(null), s = l(null), A = l(null), f = l(null), k = l(), p = o.id || `bdpi_${ye().id.value}`, F = Y(() => ({
38
+ const o = F, r = G, t = l(null), g = l(null), s = l(null), A = l(null), f = l(null), k = l(), p = o.id || `bdpi_${ye().id.value}`, j = Y(() => ({
39
39
  "bb-base-date-picker-input": !0,
40
40
  "bb-base-date-picker-input--errors": o.hasErrors,
41
41
  "bb-base-date-picker-input--readonly": o.readonly,
42
42
  "bb-base-date-picker-input--disabled": o.disabled
43
- })), G = {
43
+ })), H = {
44
44
  onInput: (e) => {
45
- if (console.log(e), !o.range && e.target instanceof HTMLInputElement)
45
+ if (!o.range && e.target instanceof HTMLInputElement)
46
46
  if (f.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
47
47
  const a = c(e.target.value, "DD/MM/YYYY");
48
48
  k.value.isDateDisabled(a) ? r("error", "invalid_date_typed") : r("update:modelValue", a.toISOString());
@@ -57,15 +57,15 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
57
57
  } else
58
58
  return c(e).format("DD/MM/YYYY");
59
59
  return null;
60
- }, j = Y(() => f.value ? f.value : L(o.modelValue));
60
+ }, K = Y(() => f.value ? f.value : L(o.modelValue));
61
61
  J(
62
62
  () => o.modelValue,
63
63
  (e) => {
64
64
  f.value = L(e);
65
65
  }
66
66
  );
67
- const H = () => {
68
- s.value && t.value && de(s.value, t.value, {
67
+ const O = () => {
68
+ s.value && t.value && ue(s.value, t.value, {
69
69
  placement: "bottom-start",
70
70
  middleware: [ke(6), ce(), fe()]
71
71
  }).then((e) => {
@@ -78,15 +78,15 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
78
78
  };
79
79
  let V;
80
80
  Q(async () => {
81
- s.value && t.value && (V = ue(
81
+ s.value && t.value && (V = de(
82
82
  s.value,
83
83
  t.value,
84
- H
84
+ O
85
85
  ));
86
86
  }), X(() => {
87
87
  V();
88
88
  });
89
- const m = l(!1), E = l(!1), M = l(!1), b = l(!0), K = async () => {
89
+ const m = l(!1), E = l(!1), M = l(!1), b = l(!0), W = async () => {
90
90
  b.value = !1, E.value = !0, await I(500), E.value = !1, b.value = !1, m.value = !0;
91
91
  }, $ = async () => {
92
92
  var e;
@@ -94,14 +94,14 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
94
94
  }, U = (e) => {
95
95
  if (e.key === "Tab" && !e.shiftKey && (e.preventDefault(), t.value)) {
96
96
  const n = t.value.querySelectorAll(
97
- O.join()
97
+ P.join()
98
98
  )[0];
99
99
  n instanceof HTMLElement && n.focus();
100
100
  }
101
101
  }, q = (e) => {
102
102
  var a;
103
103
  if (e.key === "Tab" && t.value) {
104
- const n = O.join(", "), i = t.value.querySelectorAll(
104
+ const n = P.join(", "), i = t.value.querySelectorAll(
105
105
  n
106
106
  );
107
107
  if (e.target === i[i.length - 1]) {
@@ -119,56 +119,59 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
119
119
  e.target === i[0] && e.shiftKey && (e.preventDefault(), (a = A.value) == null || a.focus());
120
120
  }
121
121
  }, N = () => {
122
- K(), document.addEventListener("focusin", D), document.addEventListener("click", _);
123
- }, D = (e) => {
124
- var a, n;
125
- e.target instanceof HTMLElement && ((a = h.value) != null && a.contains(e.target) || (n = t.value) != null && n.contains(e.target) || ($(), w.value = !1, document.removeEventListener("click", _), document.removeEventListener("focusin", D), r("inactive")));
122
+ W(), document.addEventListener("focusin", _), document.addEventListener("click", D);
126
123
  }, _ = (e) => {
127
124
  var a, n;
128
- e.target instanceof HTMLElement && ((a = h.value) != null && a.contains(e.target) || (n = t.value) != null && n.contains(e.target) || ($(), w.value = !1, document.removeEventListener("click", _), document.removeEventListener("focusin", D), r("inactive")));
125
+ e.target instanceof HTMLElement && ((a = g.value) != null && a.contains(e.target) || (n = t.value) != null && n.contains(e.target) || ($(), w.value = !1, document.removeEventListener("click", D), document.removeEventListener("focusin", _), r("inactive")));
126
+ }, D = (e) => {
127
+ var a, n;
128
+ e.target instanceof HTMLElement && ((a = g.value) != null && a.contains(e.target) || (n = t.value) != null && n.contains(e.target) || ($(), w.value = !1, document.removeEventListener("click", D), document.removeEventListener("focusin", _), r("inactive")));
129
129
  }, z = {
130
130
  "onUpdate:modelValue": (e) => r("update:modelValue", e)
131
131
  };
132
132
  return (e, a) => (B(), Z("span", {
133
- class: C([F.value, "bb-base-date-picker-input__container"]),
134
133
  ref_key: "outerContainer",
135
- ref: h
134
+ ref: g,
135
+ class: C(["bb-base-date-picker-input__container", j.value])
136
136
  }, [
137
- u(e.$slots, "prepend-outer"),
138
- g("span", {
139
- class: "bb-base-date-picker-input__inner-container",
137
+ d(e.$slots, "prepend-outer"),
138
+ h("span", {
140
139
  ref_key: "innerContainer",
141
- ref: s
140
+ ref: s,
141
+ class: "bb-base-date-picker-input__inner-container"
142
142
  }, [
143
- u(e.$slots, "prepend"),
144
- x(g("input", T({
143
+ d(e.$slots, "prepend"),
144
+ x(h("input", T({
145
+ id: u(p),
146
+ ref_key: "input",
147
+ ref: A,
148
+ "aria-describedby": `bdpi_description_${u(p)}`,
145
149
  autocomplete: e.autocomplete,
146
150
  autofocus: e.autofocus,
147
151
  "data-maska": o.range ? "##/##/#### - ##/##/####" : "##/##/####",
148
152
  disabled: e.disabled,
149
- id: d(p),
150
153
  name: e.name,
151
154
  placeholder: e.placeholder,
152
155
  readonly: e.readonly || e.range || !e.allowWriting,
153
156
  type: "text",
154
- value: j.value,
157
+ value: K.value
158
+ }, H, {
155
159
  onFocus: N,
156
- onKeydown: U,
157
- "aria-describedby": `bdpi_description_${d(p)}`,
158
- ref_key: "input",
159
- ref: A
160
- }, G), null, 16, we), [
161
- [d(ge)]
160
+ onKeydown: U
161
+ }), null, 16, we), [
162
+ [u(he)]
162
163
  ]),
163
- u(e.$slots, "append"),
164
- g("span", {
165
- class: "bb-base-date-picker-input__accessible-description",
166
- id: `bdpi_description_${d(p)}`
164
+ d(e.$slots, "append"),
165
+ h("span", {
166
+ id: `bdpi_description_${u(p)}`,
167
+ class: "bb-base-date-picker-input__accessible-description"
167
168
  }, "Formato della data " + ee(o.range ? "GG/MM/AAAA - GG/MM/AAAA" : "GG/MM/AAAA"), 9, Ee)
168
169
  ], 512),
169
- u(e.$slots, "append-outer"),
170
+ d(e.$slots, "append-outer"),
170
171
  (B(), ae(te, { to: "body" }, [
171
- g("span", {
172
+ h("span", {
173
+ ref_key: "calendar",
174
+ ref: t,
172
175
  class: C(["bb-base-date-picker-input__calendar", {
173
176
  "bb-base-date-picker-input__calendar--active": w.value,
174
177
  "bb-base-date-picker-input__calendar--shown": m.value,
@@ -176,14 +179,13 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
176
179
  "bb-base-date-picker-input__calendar--hiding": M.value,
177
180
  "bb-base-date-picker-input__calendar--hidden": b.value
178
181
  }]),
179
- ref_key: "calendar",
180
- ref: t,
181
182
  onKeydown: q
182
183
  }, [
183
- ne(he, T({
184
+ ne(ge, T({ id: u(p) }, z, {
185
+ ref_key: "basedatepicker",
186
+ ref: k,
184
187
  disabled: e.disabled,
185
- firstDayOfWeek: e.firstDayOfWeek,
186
- id: d(p),
188
+ "first-day-of-week": e.firstDayOfWeek,
187
189
  max: e.max,
188
190
  min: e.min,
189
191
  "model-value": e.modelValue,
@@ -191,23 +193,20 @@ const we = ["autocomplete", "autofocus", "data-maska", "disabled", "id", "name",
191
193
  readonly: e.readonly,
192
194
  selectable: e.selectable,
193
195
  width: e.width
194
- }, z, {
195
- ref_key: "basedatepicker",
196
- ref: k
197
196
  }), oe({ _: 2 }, [
198
197
  le(e.$slots, (n, i) => ({
199
198
  name: i,
200
199
  fn: ie((v) => [
201
- u(e.$slots, i, re(se(v)))
200
+ d(e.$slots, i, re(se(v)))
202
201
  ])
203
202
  }))
204
- ]), 1040, ["disabled", "firstDayOfWeek", "id", "max", "min", "model-value", "range", "readonly", "selectable", "width"])
203
+ ]), 1040, ["id", "disabled", "first-day-of-week", "max", "min", "model-value", "range", "readonly", "selectable", "width"])
205
204
  ], 34)
206
205
  ]))
207
206
  ], 2));
208
207
  }
209
208
  });
210
209
  export {
211
- Pe as default
210
+ Fe as default
212
211
  };
213
212
  //# sourceMappingURL=index17.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index17.js","sources":["../src/components/BaseDatePickerInput/BaseDatePickerInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives, toDisplayString as _toDisplayString, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"autocomplete\", \"autofocus\", \"data-maska\", \"disabled\", \"id\", \"name\", \"placeholder\", \"readonly\", \"value\", \"aria-describedby\"]\nconst _hoisted_2 = [\"id\"]\n\nimport {\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n} from \"@floating-ui/dom\";\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport { default as customParseFormat } from \"dayjs/plugin/customParseFormat\";\nimport { default as dayjs } from \"dayjs\";\nimport { default as it } from \"dayjs/locale/it\";\nimport { identity } from \"@/utilities/functions/identity\";\nimport { last } from \"@/utilities/functions/last\";\nimport { useId } from \"@/composables/useId\";\nimport { vMaska } from \"maska\";\nimport { wait } from \"@/utilities/functions/wait\";\nimport BaseDatePicker from \"../BaseDatePicker/BaseDatePicker.vue\";\nimport focusableSelectors from \"focusable-selectors\";\nimport selectors from \"focusable-selectors\";\nimport type { BaseDatePickerSlots } from \"../BaseDatePicker/BaseDatePicker.vue\";\nimport type { HTMLAttributes, InputHTMLAttributes } from \"vue\";\n\nexport type BaseDatePickerInputProps = {\n /**\n * Allows typing into the input.\n */\n allowWriting?: boolean;\n\n /**\n * Guides to the browser as to the type of information expected in the field.\n */\n autocomplete?: InputHTMLAttributes[\"autocomplete\"];\n\n /**\n * Sets autofocus on page load.\n */\n autofocus?: InputHTMLAttributes[\"autofocus\"];\n\n /**\n * Disables the component\n */\n disabled?: boolean;\n\n /**\n * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n */\n firstDayOfWeek?: (typeof it)[\"weekStart\"];\n\n /**\n * Define if the component should be in an error state.\n * It usually attaches a CSS class for styling purposes.\n */\n hasErrors?: boolean;\n\n /**\n * The identifier of the component.\n */\n id?: HTMLAttributes[\"id\"];\n\n /**\n * Maximum selectable date\n */\n max?: Date | string | number;\n\n /**\n * Minimum selectable date\n */\n min?: Date | string | number;\n\n /**\n * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n */\n modelValue: string | string[] | null;\n\n /**\n * Defines the name of the input.\n */\n name?: InputHTMLAttributes[\"name\"];\n\n /**\n * String displayed when there's no data.\n */\n placeholder?: InputHTMLAttributes[\"placeholder\"];\n\n /**\n * Selects a range of dates between two dates. It selects all of the days between start and end\n */\n range?: boolean;\n\n /**\n * Sets the input in a readonly state.\n */\n readonly?: InputHTMLAttributes[\"readonly\"];\n\n /**\n * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n * @param date\n */\n selectable?: (date: Date) => boolean;\n\n /**\n * Width of the calendar\n */\n width?: number | string;\n};\n\nexport type BaseDatePickerInputEvents = {\n (e: \"update:modelValue\", value: BaseDatePickerInputProps[\"modelValue\"]): void;\n\n (e: \"inactive\"): void;\n\n (e: \"error\", message: string): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDatePickerInput',\n props: {\n allowWriting: { type: Boolean, default: true },\n autocomplete: { default: \"off\" },\n autofocus: {},\n disabled: { type: Boolean },\n firstDayOfWeek: {},\n hasErrors: { type: Boolean },\n id: {},\n max: {},\n min: {},\n modelValue: {},\n name: {},\n placeholder: {},\n range: { type: Boolean },\n readonly: {},\n selectable: {},\n width: { default: 290 }\n },\n emits: [\"update:modelValue\", \"inactive\", \"error\"],\n setup(__props: any, { emit: __emit }) {\n\ndayjs.extend(customParseFormat);\ndayjs.locale(it);\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst calendar = ref<HTMLElement | null>(null);\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst inputValue = ref<string | null>(null);\nconst basedatepicker = ref();\nconst id = props.id || `bdpi_${useId().id.value}`;\n\nconst classes = computed(() => ({\n \"bb-base-date-picker-input\": true,\n \"bb-base-date-picker-input--errors\": props.hasErrors,\n \"bb-base-date-picker-input--readonly\": props.readonly,\n \"bb-base-date-picker-input--disabled\": props.disabled,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onInput: (event: Event) => {\n console.log(event);\n if (props.range) return;\n if (event.target instanceof HTMLInputElement) {\n inputValue.value = event.target.value;\n if (/\\d{2}\\/\\d{2}\\/\\d{4}/.test(event.target.value)) {\n const date = dayjs(event.target.value, \"DD/MM/YYYY\");\n if (!basedatepicker.value.isDateDisabled(date)) {\n emit(\"update:modelValue\", date.toISOString());\n } else {\n emit(\"error\", \"invalid_date_typed\");\n }\n } else if (event.target.value === \"\") {\n emit(\"update:modelValue\", null);\n }\n }\n },\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the calendar so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst getStringFromModelValue = (value: typeof props.modelValue) => {\n if (value) {\n if (Array.isArray(value)) {\n let head;\n let tail;\n if (value.length) head = value[0];\n if (value.length > 1) tail = last(value);\n return [head, tail]\n .filter(identity)\n .map((el) => dayjs(el).format(\"DD/MM/YYYY\"))\n .join(\" - \");\n } else {\n return dayjs(value).format(\"DD/MM/YYYY\");\n }\n }\n return null;\n};\n\nconst displayValue = computed(() => {\n if (inputValue.value) return inputValue.value;\n return getStringFromModelValue(props.modelValue);\n});\n\nwatch(\n () => props.modelValue,\n (value) => {\n inputValue.value = getStringFromModelValue(value);\n }\n);\n\n/**\n * This is used to position the calendar container.\n * When the linked item (outerContainer) updates its position\n * this is rerun by floating-UI\n */\nconst displayOptions = () => {\n if (innerContainer.value && calendar.value) {\n computePosition(innerContainer.value, calendar.value, {\n placement: \"bottom-start\",\n middleware: [offset(6), flip(), shift()],\n }).then((data) => {\n if (calendar.value) {\n calendar.value.style.left = `${data.x}px`;\n calendar.value.style.top = `${data.y}px`;\n if (typeof props.width === \"string\") {\n if (Number(props.width)) {\n calendar.value.style.width = `${Math.max(\n innerContainer.value?.offsetWidth ?? 0,\n +props.width\n )}px`;\n } else {\n calendar.value.style.width = props.width;\n }\n }\n }\n });\n }\n};\n\nlet cleanUpPositioning: () => void;\n\nonMounted(async () => {\n if (innerContainer.value && calendar.value) {\n cleanUpPositioning = autoUpdate(\n innerContainer.value,\n calendar.value,\n displayOptions\n );\n }\n});\nonBeforeUnmount(() => {\n cleanUpPositioning();\n});\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel is opening\nconst showing = ref(false);\n// option panel is closing\nconst hiding = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst open = async () => {\n hidden.value = false;\n showing.value = true;\n await wait(500);\n showing.value = false;\n\n hidden.value = false;\n shown.value = true;\n};\n\nconst close = async () => {\n shown.value = false;\n hiding.value = true;\n await wait(500);\n hiding.value = false;\n shown.value = false;\n hidden.value = true;\n basedatepicker.value?.setSelectionModeToDay();\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n if (event.key === \"Tab\") {\n if (!event.shiftKey) {\n event.preventDefault();\n if (calendar.value) {\n const focusableElements = calendar.value.querySelectorAll(\n selectors.join()\n );\n const firstFocusableElement = focusableElements[0];\n if (firstFocusableElement instanceof HTMLElement) {\n firstFocusableElement.focus();\n }\n }\n }\n }\n};\n\nconst onCalendarKeydown = (event: KeyboardEvent) => {\n if (event.key === \"Tab\") {\n if (calendar.value) {\n const focusableSelectorsString = focusableSelectors.join(\", \");\n const focusableElements = calendar.value.querySelectorAll(\n focusableSelectorsString\n );\n /* When the user tabs on the last tabbable elem */\n if (event.target === focusableElements[focusableElements.length - 1]) {\n event.preventDefault();\n const focusableElements = Array.from(\n document.body.querySelectorAll(focusableSelectorsString)\n );\n const indexOfInput = focusableElements.findIndex(\n (el) => el.id === props.id\n );\n if (indexOfInput > -1) {\n const nextElement = focusableElements[indexOfInput + 1];\n if (nextElement instanceof HTMLElement) {\n nextElement.focus();\n }\n }\n } else if (event.target === focusableElements[0]) {\n if (event.shiftKey) {\n event.preventDefault();\n input.value?.focus();\n }\n }\n }\n }\n};\n\nconst onFocus = () => {\n open();\n document.addEventListener(\"focusin\", onDocumentFocus);\n document.addEventListener(\"click\", onDocumentClick);\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) {\n if (\n !(\n outerContainer.value?.contains(event.target) ||\n calendar.value?.contains(event.target)\n )\n ) {\n close();\n active.value = false;\n document.removeEventListener(\"click\", onDocumentClick);\n document.removeEventListener(\"focusin\", onDocumentFocus);\n emit(\"inactive\");\n }\n }\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLElement) {\n if (\n !(\n outerContainer.value?.contains(event.target) ||\n calendar.value?.contains(event.target)\n )\n ) {\n close();\n active.value = false;\n document.removeEventListener(\"click\", onDocumentClick);\n document.removeEventListener(\"focusin\", onDocumentFocus);\n emit(\"inactive\");\n }\n }\n};\n\n/**\n * These events are just propagated\n */\nconst calendarEventListeners = {\n \"onUpdate:modelValue\": (value: string | string[] | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([classes.value, \"bb-base-date-picker-input__container\"]),\n ref_key: \"outerContainer\",\n ref: outerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n class: \"bb-base-date-picker-input__inner-container\",\n ref_key: \"innerContainer\",\n ref: innerContainer\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n \"data-maska\": props.range ? '##/##/#### - ##/##/####' : '##/##/####',\n disabled: _ctx.disabled,\n id: _unref(id),\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly || _ctx.range || !_ctx.allowWriting,\n type: 'text',\n value: displayValue.value,\n onFocus: onFocus,\n onKeydown: onKeydown,\n \"aria-describedby\": `bdpi_description_${_unref(id)}`,\n ref_key: \"input\",\n ref: input\n }, eventListeners), null, 16, _hoisted_1), [\n [_unref(vMaska)]\n ]),\n _renderSlot(_ctx.$slots, \"append\"),\n _createElementVNode(\"span\", {\n class: \"bb-base-date-picker-input__accessible-description\",\n id: `bdpi_description_${_unref(id)}`\n }, \"Formato della data \" + _toDisplayString(props.range ? \"GG/MM/AAAA - GG/MM/AAAA\" : \"GG/MM/AAAA\"), 9, _hoisted_2)\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\"),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"bb-base-date-picker-input__calendar\", {\n 'bb-base-date-picker-input__calendar--active': active.value,\n 'bb-base-date-picker-input__calendar--shown': shown.value,\n 'bb-base-date-picker-input__calendar--showing': showing.value,\n 'bb-base-date-picker-input__calendar--hiding': hiding.value,\n 'bb-base-date-picker-input__calendar--hidden': hidden.value,\n }]),\n ref_key: \"calendar\",\n ref: calendar,\n onKeydown: onCalendarKeydown\n }, [\n _createVNode(BaseDatePicker, _mergeProps({\n disabled: _ctx.disabled,\n firstDayOfWeek: _ctx.firstDayOfWeek,\n id: _unref(id),\n max: _ctx.max,\n min: _ctx.min,\n \"model-value\": _ctx.modelValue,\n range: _ctx.range,\n readonly: _ctx.readonly,\n selectable: _ctx.selectable,\n width: _ctx.width\n }, calendarEventListeners, {\n ref_key: \"basedatepicker\",\n ref: basedatepicker\n }), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"disabled\", \"firstDayOfWeek\", \"id\", \"max\", \"min\", \"model-value\", \"range\", \"readonly\", \"selectable\", \"width\"])\n ], 34)\n ]))\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","dayjs","customParseFormat","it","props","emit","calendar","ref","outerContainer","innerContainer","input","inputValue","basedatepicker","id","useId","classes","computed","eventListeners","event","date","active","getStringFromModelValue","value","head","tail","last","identity","el","displayValue","watch","displayOptions","computePosition","offset","flip","shift","data","_a","cleanUpPositioning","onMounted","autoUpdate","onBeforeUnmount","shown","showing","hiding","hidden","open","wait","close","onKeydown","firstFocusableElement","selectors","onCalendarKeydown","focusableSelectorsString","focusableSelectors","focusableElements","indexOfInput","nextElement","onFocus","onDocumentFocus","onDocumentClick","_b","calendarEventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_withDirectives","_mergeProps","_unref","vMaska","_toDisplayString","_createBlock","_Teleport","_createVNode","BaseDatePicker","_createSlots","_renderList","_","name","_withCtx","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;;;;;;;;;AAGA,MAAMA,KAAa,CAAC,gBAAgB,aAAa,cAAc,YAAY,MAAM,QAAQ,eAAe,YAAY,SAAS,kBAAkB,GACzIC,KAAa,CAAC,IAAI,GAqHIC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,cAAc,EAAE,SAAS,MAAM;AAAA,IAC/B,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,gBAAgB,CAAC;AAAA,IACjB,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,OAAO,EAAE,SAAS,IAAI;AAAA,EACxB;AAAA,EACA,OAAO,CAAC,qBAAqB,YAAY,OAAO;AAAA,EAChD,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAExC,IAAAC,EAAM,OAA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F,SAAS;AAAA,UACT,KAAKtC;AAAA,UACL,WAAW6C;AAAA,QAAA,GACV;AAAA,UACDyB,GAAaC,IAAgBP,EAAY;AAAA,YACvC,UAAUR,EAAK;AAAA,YACf,gBAAgBA,EAAK;AAAA,YACrB,IAAIS,EAAO1D,CAAE;AAAA,YACb,KAAKiD,EAAK;AAAA,YACV,KAAKA,EAAK;AAAA,YACV,eAAeA,EAAK;AAAA,YACpB,OAAOA,EAAK;AAAA,YACZ,UAAUA,EAAK;AAAA,YACf,YAAYA,EAAK;AAAA,YACjB,OAAOA,EAAK;AAAA,aACXD,GAAwB;AAAA,YACzB,SAAS;AAAA,YACT,KAAKjD;AAAA,UACN,CAAA,GAAGkE,GAAa,EAAE,GAAG,KAAK;AAAA,YACzBC,GAAYjB,EAAK,QAAQ,CAACkB,GAAGC,OACpB;AAAA,cACL,MAAAA;AAAA,cACA,IAAIC,GAAS,CAAC/C,MAAS;AAAA,gBACrBgC,EAAYL,EAAK,QAAQmB,GAAME,GAAgBC,GAAoBjD,CAAI,CAAC,CAAC;AAAA,cAAA,CAC1E;AAAA,YAAA,EAEJ;AAAA,UACF,CAAA,GAAG,MAAM,CAAC,YAAY,kBAAkB,MAAM,OAAO,OAAO,eAAe,SAAS,YAAY,cAAc,OAAO,CAAC;AAAA,WACtH,EAAE;AAAA,MAAA,CACN;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index17.js","sources":["../src/components/BaseDatePickerInput/BaseDatePickerInput.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives, toDisplayString as _toDisplayString, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, normalizeClass as _normalizeClass, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"id\", \"aria-describedby\", \"autocomplete\", \"autofocus\", \"data-maska\", \"disabled\", \"name\", \"placeholder\", \"readonly\", \"value\"]\nconst _hoisted_2 = [\"id\"]\n\nimport {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tshift,\n} from '@floating-ui/dom';\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';\nimport { default as customParseFormat } from 'dayjs/plugin/customParseFormat';\nimport { default as dayjs } from 'dayjs';\nimport { default as it } from 'dayjs/locale/it';\nimport { identity } from '@/utilities/functions/identity';\nimport { last } from '@/utilities/functions/last';\nimport { useId } from '@/composables/useId';\nimport { vMaska } from 'maska';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseDatePicker from '../BaseDatePicker/BaseDatePicker.vue';\nimport focusableSelectors from 'focusable-selectors';\nimport selectors from 'focusable-selectors';\nimport type { BaseDatePickerSlots } from '../BaseDatePicker/BaseDatePicker.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseDatePickerInputProps = {\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: (typeof it)['weekStart'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nexport type BaseDatePickerInputEvents = {\n\t(e: 'update:modelValue', value: BaseDatePickerInputProps['modelValue']): void;\n\n\t(e: 'inactive'): void;\n\n\t(e: 'error', message: string): void;\n};\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseDatePickerInput',\n props: {\n allowWriting: { type: Boolean, default: true },\n autocomplete: { default: 'off' },\n autofocus: {},\n disabled: { type: Boolean },\n firstDayOfWeek: {},\n hasErrors: { type: Boolean },\n id: {},\n max: {},\n min: {},\n modelValue: {},\n name: {},\n placeholder: {},\n range: { type: Boolean },\n readonly: {},\n selectable: {},\n width: { default: 290 }\n },\n emits: [\"update:modelValue\", \"inactive\", \"error\"],\n setup(__props: any, { emit: __emit }) {\n\ndayjs.extend(customParseFormat);\ndayjs.locale(it);\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst calendar = ref<HTMLElement | null>(null);\nconst outerContainer = ref<HTMLElement | null>(null);\nconst innerContainer = ref<HTMLElement | null>(null);\nconst input = ref<HTMLElement | null>(null);\nconst inputValue = ref<string | null>(null);\nconst basedatepicker = ref();\nconst id = props.id || `bdpi_${useId().id.value}`;\n\nconst classes = computed(() => ({\n\t'bb-base-date-picker-input': true,\n\t'bb-base-date-picker-input--errors': props.hasErrors,\n\t'bb-base-date-picker-input--readonly': props.readonly,\n\t'bb-base-date-picker-input--disabled': props.disabled,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonInput: (event: Event) => {\n\t\tif (props.range) return;\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tinputValue.value = event.target.value;\n\t\t\tif (/\\d{2}\\/\\d{2}\\/\\d{4}/.test(event.target.value)) {\n\t\t\t\tconst date = dayjs(event.target.value, 'DD/MM/YYYY');\n\t\t\t\tif (!basedatepicker.value.isDateDisabled(date)) {\n\t\t\t\t\temit('update:modelValue', date.toISOString());\n\t\t\t\t} else {\n\t\t\t\t\temit('error', 'invalid_date_typed');\n\t\t\t\t}\n\t\t\t} else if (event.target.value === '') {\n\t\t\t\temit('update:modelValue', null);\n\t\t\t}\n\t\t}\n\t},\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we phisically move focus to the calendar so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst getStringFromModelValue = (value: typeof props.modelValue) => {\n\tif (value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tlet head;\n\t\t\tlet tail;\n\t\t\tif (value.length) head = value[0];\n\t\t\tif (value.length > 1) tail = last(value);\n\t\t\treturn [head, tail]\n\t\t\t\t.filter(identity)\n\t\t\t\t.map((el) => dayjs(el).format('DD/MM/YYYY'))\n\t\t\t\t.join(' - ');\n\t\t} else {\n\t\t\treturn dayjs(value).format('DD/MM/YYYY');\n\t\t}\n\t}\n\treturn null;\n};\n\nconst displayValue = computed(() => {\n\tif (inputValue.value) return inputValue.value;\n\treturn getStringFromModelValue(props.modelValue);\n});\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tinputValue.value = getStringFromModelValue(value);\n\t}\n);\n\n/**\n * This is used to position the calendar container.\n * When the linked item (outerContainer) updates its position\n * this is rerun by floating-UI\n */\nconst displayOptions = () => {\n\tif (innerContainer.value && calendar.value) {\n\t\tcomputePosition(innerContainer.value, calendar.value, {\n\t\t\tplacement: 'bottom-start',\n\t\t\tmiddleware: [offset(6), flip(), shift()],\n\t\t}).then((data) => {\n\t\t\tif (calendar.value) {\n\t\t\t\tcalendar.value.style.left = `${data.x}px`;\n\t\t\t\tcalendar.value.style.top = `${data.y}px`;\n\t\t\t\tif (typeof props.width === 'string') {\n\t\t\t\t\tif (Number(props.width)) {\n\t\t\t\t\t\tcalendar.value.style.width = `${Math.max(\n\t\t\t\t\t\t\tinnerContainer.value?.offsetWidth ?? 0,\n\t\t\t\t\t\t\t+props.width\n\t\t\t\t\t\t)}px`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcalendar.value.style.width = props.width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\nlet cleanUpPositioning: () => void;\n\nonMounted(async () => {\n\tif (innerContainer.value && calendar.value) {\n\t\tcleanUpPositioning = autoUpdate(\n\t\t\tinnerContainer.value,\n\t\t\tcalendar.value,\n\t\t\tdisplayOptions\n\t\t);\n\t}\n});\nonBeforeUnmount(() => {\n\tcleanUpPositioning();\n});\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel is opening\nconst showing = ref(false);\n// option panel is closing\nconst hiding = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst open = async () => {\n\thidden.value = false;\n\tshowing.value = true;\n\tawait wait(500);\n\tshowing.value = false;\n\n\thidden.value = false;\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\thiding.value = true;\n\tawait wait(500);\n\thiding.value = false;\n\tshown.value = false;\n\thidden.value = true;\n\tbasedatepicker.value?.setSelectionModeToDay();\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\tif (event.key === 'Tab') {\n\t\tif (!event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (calendar.value) {\n\t\t\t\tconst focusableElements = calendar.value.querySelectorAll(\n\t\t\t\t\tselectors.join()\n\t\t\t\t);\n\t\t\t\tconst firstFocusableElement = focusableElements[0];\n\t\t\t\tif (firstFocusableElement instanceof HTMLElement) {\n\t\t\t\t\tfirstFocusableElement.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onCalendarKeydown = (event: KeyboardEvent) => {\n\tif (event.key === 'Tab') {\n\t\tif (calendar.value) {\n\t\t\tconst focusableSelectorsString = focusableSelectors.join(', ');\n\t\t\tconst focusableElements = calendar.value.querySelectorAll(\n\t\t\t\tfocusableSelectorsString\n\t\t\t);\n\t\t\t/* When the user tabs on the last tabbable elem */\n\t\t\tif (event.target === focusableElements[focusableElements.length - 1]) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\tdocument.body.querySelectorAll(focusableSelectorsString)\n\t\t\t\t);\n\t\t\t\tconst indexOfInput = focusableElements.findIndex(\n\t\t\t\t\t(el) => el.id === props.id\n\t\t\t\t);\n\t\t\t\tif (indexOfInput > -1) {\n\t\t\t\t\tconst nextElement = focusableElements[indexOfInput + 1];\n\t\t\t\t\tif (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (event.target === focusableElements[0]) {\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tinput.value?.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onFocus = () => {\n\topen();\n\tdocument.addEventListener('focusin', onDocumentFocus);\n\tdocument.addEventListener('click', onDocumentClick);\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (\n\t\t\t!(\n\t\t\t\touterContainer.value?.contains(event.target) ||\n\t\t\t\tcalendar.value?.contains(event.target)\n\t\t\t)\n\t\t) {\n\t\t\tclose();\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\temit('inactive');\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (\n\t\t\t!(\n\t\t\t\touterContainer.value?.contains(event.target) ||\n\t\t\t\tcalendar.value?.contains(event.target)\n\t\t\t)\n\t\t) {\n\t\t\tclose();\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\temit('inactive');\n\t\t}\n\t}\n};\n\n/**\n * These events are just propagated\n */\nconst calendarEventListeners = {\n\t'onUpdate:modelValue': (value: string | string[] | null) =>\n\t\temit('update:modelValue', value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n ref_key: \"outerContainer\",\n ref: outerContainer,\n class: _normalizeClass([\"bb-base-date-picker-input__container\", classes.value])\n }, [\n _renderSlot(_ctx.$slots, \"prepend-outer\"),\n _createElementVNode(\"span\", {\n ref_key: \"innerContainer\",\n ref: innerContainer,\n class: \"bb-base-date-picker-input__inner-container\"\n }, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n _withDirectives(_createElementVNode(\"input\", _mergeProps({\n id: _unref(id),\n ref_key: \"input\",\n ref: input,\n \"aria-describedby\": `bdpi_description_${_unref(id)}`,\n autocomplete: _ctx.autocomplete,\n autofocus: _ctx.autofocus,\n \"data-maska\": props.range ? '##/##/#### - ##/##/####' : '##/##/####',\n disabled: _ctx.disabled,\n name: _ctx.name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly || _ctx.range || !_ctx.allowWriting,\n type: 'text',\n value: displayValue.value\n }, eventListeners, {\n onFocus: onFocus,\n onKeydown: onKeydown\n }), null, 16, _hoisted_1), [\n [_unref(vMaska)]\n ]),\n _renderSlot(_ctx.$slots, \"append\"),\n _createElementVNode(\"span\", {\n id: `bdpi_description_${_unref(id)}`,\n class: \"bb-base-date-picker-input__accessible-description\"\n }, \"Formato della data \" + _toDisplayString(props.range ? 'GG/MM/AAAA - GG/MM/AAAA' : 'GG/MM/AAAA'), 9, _hoisted_2)\n ], 512),\n _renderSlot(_ctx.$slots, \"append-outer\"),\n (_openBlock(), _createBlock(_Teleport, { to: \"body\" }, [\n _createElementVNode(\"span\", {\n ref_key: \"calendar\",\n ref: calendar,\n class: _normalizeClass([\"bb-base-date-picker-input__calendar\", {\n\t\t\t\t\t'bb-base-date-picker-input__calendar--active': active.value,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--shown': shown.value,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--showing': showing.value,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hiding': hiding.value,\n\t\t\t\t\t'bb-base-date-picker-input__calendar--hidden': hidden.value,\n\t\t\t\t}]),\n onKeydown: onCalendarKeydown\n }, [\n _createVNode(BaseDatePicker, _mergeProps({ id: _unref(id) }, calendarEventListeners, {\n ref_key: \"basedatepicker\",\n ref: basedatepicker,\n disabled: _ctx.disabled,\n \"first-day-of-week\": _ctx.firstDayOfWeek,\n max: _ctx.max,\n min: _ctx.min,\n \"model-value\": _ctx.modelValue,\n range: _ctx.range,\n readonly: _ctx.readonly,\n selectable: _ctx.selectable,\n width: _ctx.width\n }), _createSlots({ _: 2 }, [\n _renderList(_ctx.$slots, (_, name) => {\n return {\n name: name,\n fn: _withCtx((data) => [\n _renderSlot(_ctx.$slots, name, _normalizeProps(_guardReactiveProps(data)))\n ])\n }\n })\n ]), 1040, [\"id\", \"disabled\", \"first-day-of-week\", \"max\", \"min\", \"model-value\", \"range\", \"readonly\", \"selectable\", \"width\"])\n ], 34)\n ]))\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_sfc_main","_defineComponent","__props","__emit","dayjs","customParseFormat","it","props","emit","calendar","ref","outerContainer","innerContainer","input","inputValue","basedatepicker","id","useId","classes","computed","eventListeners","event","date","active","getStringFromModelValue","value","head","tail","last","identity","el","displayValue","watch","displayOptions","computePosition","offset","flip","shift","data","_a","cleanUpPositioning","onMounted","autoUpdate","onBeforeUnmount","shown","showing","hiding","hidden","open","wait","close","onKeydown","firstFocusableElement","selectors","onCalendarKeydown","focusableSelectorsString","focusableSelectors","focusableElements","indexOfInput","nextElement","onFocus","onDocumentFocus","onDocumentClick","_b","calendarEventListeners","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","_createElementVNode","_withDirectives","_mergeProps","_unref","vMaska","_toDisplayString","_createBlock","_Teleport","_createVNode","BaseDatePicker","_createSlots","_renderList","_","name","_withCtx","_normalizeProps","_guardReactiveProps"],"mappings":";;;;;;;;;;;;;;AAGA,MAAMA,KAAa,CAAC,MAAM,oBAAoB,gBAAgB,aAAa,cAAc,YAAY,QAAQ,eAAe,YAAY,OAAO,GACzIC,KAAa,CAAC,IAAI,GAqHIC,KAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,EAAE,MAAM,SAAS,SAAS,GAAK;AAAA,IAC7C,cAAc,EAAE,SAAS,MAAM;AAAA,IAC/B,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,gBAAgB,CAAC;AAAA,IACjB,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,KAAK,CAAC;AAAA,IACN,KAAK,CAAC;AAAA,IACN,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,OAAO,EAAE,MAAM,QAAQ;AAAA,IACvB,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,OAAO,EAAE,SAAS,IAAI;AAAA,EAC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