@quidgest/ui 0.17.1 → 0.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist/json/api.json +1 -1
  2. package/dist/ui.css +8 -9
  3. package/dist/ui.esm.js +980 -8931
  4. package/dist/ui.js +971 -45
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +819 -864
  7. package/dist/ui.scss +15 -15
  8. package/esm/_virtual/_plugin-vue_export-helper.js +7 -8
  9. package/esm/_virtual/_rolldown/runtime.js +11 -0
  10. package/esm/components/QAccordion/QAccordion.vue.js +45 -43
  11. package/esm/components/QAccordion/QAccordion2.vue.js +5 -0
  12. package/esm/components/QAccordion/QAccordionItem.vue.js +33 -39
  13. package/esm/components/QAccordion/QAccordionItem2.vue.js +5 -0
  14. package/esm/components/QAccordion/index.js +7 -8
  15. package/esm/components/QAvatar/QAvatar.vue.js +41 -48
  16. package/esm/components/QAvatar/QAvatar2.vue.js +5 -0
  17. package/esm/components/QAvatar/index.js +6 -6
  18. package/esm/components/QBadge/QBadge.vue.js +98 -142
  19. package/esm/components/QBadge/QBadge2.vue.js +5 -0
  20. package/esm/components/QBadge/constants.js +4 -11
  21. package/esm/components/QBadge/index.js +6 -6
  22. package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +38 -49
  23. package/esm/components/QBadgeIndicator/QBadgeIndicator2.vue.js +5 -0
  24. package/esm/components/QBadgeIndicator/index.js +6 -6
  25. package/esm/components/QButton/QButton.vue.js +73 -84
  26. package/esm/components/QButton/QButton2.vue.js +5 -0
  27. package/esm/components/QButton/index.js +6 -6
  28. package/esm/components/QButtonGroup/QButtonGroup.vue.js +33 -37
  29. package/esm/components/QButtonGroup/QButtonGroup2.vue.js +5 -0
  30. package/esm/components/QButtonGroup/index.js +6 -6
  31. package/esm/components/QCard/QCard.vue.js +91 -133
  32. package/esm/components/QCard/QCard2.vue.js +5 -0
  33. package/esm/components/QCard/index.js +6 -6
  34. package/esm/components/QCarousel/QCarousel.vue.js +247 -354
  35. package/esm/components/QCarousel/QCarousel2.vue.js +5 -0
  36. package/esm/components/QCarousel/constants.js +10 -15
  37. package/esm/components/QCarousel/index.js +6 -6
  38. package/esm/components/QCheckbox/QCheckbox.vue.js +133 -143
  39. package/esm/components/QCheckbox/QCheckbox2.vue.js +5 -0
  40. package/esm/components/QCheckbox/QCheckboxLabel.vue.js +31 -32
  41. package/esm/components/QCheckbox/QCheckboxLabel2.vue.js +5 -0
  42. package/esm/components/QCheckbox/constants.js +6 -10
  43. package/esm/components/QCheckbox/index.js +7 -8
  44. package/esm/components/QCollapsible/QCollapsible.vue.js +90 -136
  45. package/esm/components/QCollapsible/QCollapsible2.vue.js +5 -0
  46. package/esm/components/QCollapsible/constants.js +5 -7
  47. package/esm/components/QCollapsible/index.js +6 -6
  48. package/esm/components/QColorPicker/QColorPicker.vue.js +96 -100
  49. package/esm/components/QColorPicker/QColorPicker2.vue.js +5 -0
  50. package/esm/components/QColorPicker/constants.js +4 -6
  51. package/esm/components/QColorPicker/index.js +6 -6
  52. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  53. package/esm/components/QCombobox/QCombobox.vue.js +316 -364
  54. package/esm/components/QCombobox/QCombobox2.vue.js +5 -0
  55. package/esm/components/QCombobox/constants.js +12 -13
  56. package/esm/components/QCombobox/index.d.ts.map +1 -1
  57. package/esm/components/QCombobox/index.js +6 -6
  58. package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
  59. package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +1119 -1366
  60. package/esm/components/QDateTimePicker/QDateTimePicker2.vue.js +5 -0
  61. package/esm/components/QDateTimePicker/constants.js +72 -91
  62. package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
  63. package/esm/components/QDateTimePicker/index.js +6 -6
  64. package/esm/components/QDefaultsProvider/QDefaultsProvider.vue.js +15 -15
  65. package/esm/components/QDefaultsProvider/QDefaultsProvider2.vue.js +5 -0
  66. package/esm/components/QDefaultsProvider/index.js +6 -6
  67. package/esm/components/QDialog/QDialog.vue.js +175 -226
  68. package/esm/components/QDialog/QDialog2.vue.js +5 -0
  69. package/esm/components/QDialog/QDialogProvider.vue.js +26 -35
  70. package/esm/components/QDialog/QDialogProvider2.vue.js +5 -0
  71. package/esm/components/QDialog/constants.js +11 -23
  72. package/esm/components/QDialog/index.js +7 -8
  73. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +63 -69
  74. package/esm/components/QDismissibleLayer/QDismissibleLayer2.vue.js +5 -0
  75. package/esm/components/QDismissibleLayer/index.js +6 -6
  76. package/esm/components/QDivider/QDivider.vue.js +39 -62
  77. package/esm/components/QDivider/QDivider2.vue.js +5 -0
  78. package/esm/components/QDivider/index.js +6 -6
  79. package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +54 -64
  80. package/esm/components/QDropdownMenu/QDropdownMenu2.vue.js +5 -0
  81. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  82. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +196 -215
  83. package/esm/components/QDropdownMenu/QDropdownMenuContent2.vue.js +5 -0
  84. package/esm/components/QDropdownMenu/constants.js +4 -8
  85. package/esm/components/QDropdownMenu/index.js +6 -6
  86. package/esm/components/QField/QField.vue.js +74 -90
  87. package/esm/components/QField/QField2.vue.js +5 -0
  88. package/esm/components/QField/index.js +6 -6
  89. package/esm/components/QFileUpload/QFileUpload.vue.js +156 -241
  90. package/esm/components/QFileUpload/QFileUpload2.vue.js +5 -0
  91. package/esm/components/QFileUpload/constants.js +16 -27
  92. package/esm/components/QFileUpload/index.js +6 -6
  93. package/esm/components/QFocusWrap/QFocusWrap.vue.js +89 -118
  94. package/esm/components/QFocusWrap/QFocusWrap2.vue.js +5 -0
  95. package/esm/components/QFocusWrap/index.js +6 -6
  96. package/esm/components/QGrid/QCol.vue.js +33 -48
  97. package/esm/components/QGrid/QCol2.vue.js +5 -0
  98. package/esm/components/QGrid/QContainer.vue.js +11 -23
  99. package/esm/components/QGrid/QContainer2.vue.js +5 -0
  100. package/esm/components/QGrid/QRow.vue.js +24 -35
  101. package/esm/components/QGrid/QRow2.vue.js +5 -0
  102. package/esm/components/QGrid/QSpacer.vue.js +9 -9
  103. package/esm/components/QGrid/index.js +9 -12
  104. package/esm/components/QGroupBox/QGroupBox.vue.js +32 -43
  105. package/esm/components/QGroupBox/QGroupBox2.vue.js +5 -0
  106. package/esm/components/QGroupBox/index.js +6 -6
  107. package/esm/components/QIcon/InlineSvg.d.ts.map +1 -1
  108. package/esm/components/QIcon/InlineSvg.js +92 -129
  109. package/esm/components/QIcon/QIcon.vue.js +40 -42
  110. package/esm/components/QIcon/QIcon2.vue.js +5 -0
  111. package/esm/components/QIcon/QIconFont.vue.js +26 -20
  112. package/esm/components/QIcon/QIconFont2.vue.js +5 -0
  113. package/esm/components/QIcon/QIconImg.vue.js +23 -19
  114. package/esm/components/QIcon/QIconImg2.vue.js +5 -0
  115. package/esm/components/QIcon/QIconSvg.vue.js +40 -31
  116. package/esm/components/QIcon/QIconSvg2.vue.js +5 -0
  117. package/esm/components/QIcon/index.js +9 -12
  118. package/esm/components/QInputGroup/QInputGroup.vue.js +62 -89
  119. package/esm/components/QInputGroup/QInputGroup2.vue.js +5 -0
  120. package/esm/components/QInputGroup/index.js +6 -6
  121. package/esm/components/QLabel/QLabel.vue.js +33 -43
  122. package/esm/components/QLabel/QLabel2.vue.js +5 -0
  123. package/esm/components/QLabel/index.js +6 -6
  124. package/esm/components/QLineLoader/QLineLoader.vue.js +26 -26
  125. package/esm/components/QLineLoader/QLineLoader2.vue.js +5 -0
  126. package/esm/components/QLineLoader/index.js +6 -6
  127. package/esm/components/QList/QList.d.ts.map +1 -1
  128. package/esm/components/QList/QList.vue.js +229 -241
  129. package/esm/components/QList/QList2.vue.js +5 -0
  130. package/esm/components/QList/QListItem.vue.js +84 -118
  131. package/esm/components/QList/QListItem2.vue.js +5 -0
  132. package/esm/components/QList/QListItemGroup.vue.js +25 -28
  133. package/esm/components/QList/QListItemGroup2.vue.js +5 -0
  134. package/esm/components/QList/constants.js +6 -10
  135. package/esm/components/QList/index.d.ts.map +1 -1
  136. package/esm/components/QList/index.js +8 -10
  137. package/esm/components/QMeter/QMeter.vue.js +39 -61
  138. package/esm/components/QMeter/QMeter2.vue.js +5 -0
  139. package/esm/components/QMeter/index.js +6 -6
  140. package/esm/components/QOverlay/QOverlay.vue.js +282 -322
  141. package/esm/components/QOverlay/QOverlay2.vue.js +5 -0
  142. package/esm/components/QOverlay/index.js +6 -6
  143. package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
  144. package/esm/components/QPasswordField/QPasswordField.vue.js +142 -163
  145. package/esm/components/QPasswordField/QPasswordField2.vue.js +5 -0
  146. package/esm/components/QPasswordField/QPasswordFieldMessages.vue.js +11 -27
  147. package/esm/components/QPasswordField/QPasswordFieldMessages2.vue.js +5 -0
  148. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +82 -103
  149. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay2.vue.js +5 -0
  150. package/esm/components/QPasswordField/constants.js +6 -10
  151. package/esm/components/QPasswordField/index.d.ts.map +1 -1
  152. package/esm/components/QPasswordField/index.js +6 -6
  153. package/esm/components/QPopover/QPopover.vue.js +74 -95
  154. package/esm/components/QPopover/QPopover2.vue.js +5 -0
  155. package/esm/components/QPopover/index.js +6 -6
  156. package/esm/components/QPropertyList/QPropertyList.vue.js +109 -154
  157. package/esm/components/QPropertyList/QPropertyList2.vue.js +5 -0
  158. package/esm/components/QPropertyList/QPropertyListGroup.vue.js +46 -68
  159. package/esm/components/QPropertyList/QPropertyListGroup2.vue.js +5 -0
  160. package/esm/components/QPropertyList/QPropertyListPanel.vue.js +24 -47
  161. package/esm/components/QPropertyList/QPropertyListPanel2.vue.js +5 -0
  162. package/esm/components/QPropertyList/QPropertyListRow.vue.js +60 -80
  163. package/esm/components/QPropertyList/QPropertyListRow2.vue.js +5 -0
  164. package/esm/components/QPropertyList/constants.js +6 -13
  165. package/esm/components/QPropertyList/index.js +9 -12
  166. package/esm/components/QRadioGroup/QRadioButton.vue.js +99 -96
  167. package/esm/components/QRadioGroup/QRadioButton2.vue.js +5 -0
  168. package/esm/components/QRadioGroup/QRadioGroup.vue.js +79 -87
  169. package/esm/components/QRadioGroup/QRadioGroup2.vue.js +5 -0
  170. package/esm/components/QRadioGroup/index.js +7 -8
  171. package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue.js +49 -51
  172. package/esm/components/QRemoveScrollBar/QRemoveScrollBar2.vue.js +5 -0
  173. package/esm/components/QRemoveScrollBar/constants.js +4 -8
  174. package/esm/components/QRemoveScrollBar/index.js +6 -6
  175. package/esm/components/QRemoveScrollBar/utils/gap.js +24 -22
  176. package/esm/components/QRemoveScrollBar/utils/stylesheet.js +19 -20
  177. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  178. package/esm/components/QSelect/QSelect.vue.js +399 -583
  179. package/esm/components/QSelect/QSelect2.vue.js +5 -0
  180. package/esm/components/QSelect/constants.js +14 -15
  181. package/esm/components/QSelect/index.d.ts.map +1 -1
  182. package/esm/components/QSelect/index.js +6 -6
  183. package/esm/components/QSidebar/QSidebar.vue.js +133 -157
  184. package/esm/components/QSidebar/QSidebar2.vue.js +5 -0
  185. package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
  186. package/esm/components/QSidebar/QSidebarAnchor.vue.js +79 -110
  187. package/esm/components/QSidebar/QSidebarAnchor2.vue.js +5 -0
  188. package/esm/components/QSidebar/QSidebarPanel.vue.js +68 -88
  189. package/esm/components/QSidebar/QSidebarPanel2.vue.js +5 -0
  190. package/esm/components/QSidebar/index.js +6 -6
  191. package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +28 -35
  192. package/esm/components/QSkeletonLoader/QSkeletonLoader2.vue.js +5 -0
  193. package/esm/components/QSkeletonLoader/index.js +6 -6
  194. package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +19 -21
  195. package/esm/components/QSpinnerLoader/QSpinnerLoader2.vue.js +5 -0
  196. package/esm/components/QSpinnerLoader/index.js +6 -6
  197. package/esm/components/QSwitch/QSwitch.vue.js +83 -124
  198. package/esm/components/QSwitch/QSwitch2.vue.js +5 -0
  199. package/esm/components/QSwitch/index.js +6 -6
  200. package/esm/components/QTextArea/QTextArea.vue.js +113 -110
  201. package/esm/components/QTextArea/QTextArea2.vue.js +5 -0
  202. package/esm/components/QTextArea/index.js +6 -6
  203. package/esm/components/QTextField/QTextField.d.ts.map +1 -1
  204. package/esm/components/QTextField/QTextField.vue.js +115 -118
  205. package/esm/components/QTextField/QTextField2.vue.js +5 -0
  206. package/esm/components/QTextField/index.d.ts.map +1 -1
  207. package/esm/components/QTextField/index.js +7 -6
  208. package/esm/components/QTextField/types.js +5 -7
  209. package/esm/components/QThemeProvider/QThemeProvider.vue.js +31 -33
  210. package/esm/components/QThemeProvider/QThemeProvider2.vue.js +5 -0
  211. package/esm/components/QThemeProvider/index.js +6 -6
  212. package/esm/components/QToast/QToast.vue.js +140 -213
  213. package/esm/components/QToast/QToast2.vue.js +5 -0
  214. package/esm/components/QToast/QToaster.vue.js +38 -47
  215. package/esm/components/QToast/QToaster2.vue.js +5 -0
  216. package/esm/components/QToast/constants.js +4 -8
  217. package/esm/components/QToast/index.js +7 -8
  218. package/esm/components/QToggle/QToggle.vue.js +39 -42
  219. package/esm/components/QToggle/QToggle2.vue.js +5 -0
  220. package/esm/components/QToggle/index.js +6 -6
  221. package/esm/components/QToggleGroup/QToggleGroup.vue.js +55 -49
  222. package/esm/components/QToggleGroup/QToggleGroup2.vue.js +5 -0
  223. package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +33 -43
  224. package/esm/components/QToggleGroup/QToggleGroupItem2.vue.js +5 -0
  225. package/esm/components/QToggleGroup/index.js +7 -8
  226. package/esm/components/QTooltip/QTooltip.vue.js +93 -113
  227. package/esm/components/QTooltip/QTooltip2.vue.js +5 -0
  228. package/esm/components/QTooltip/index.js +6 -6
  229. package/esm/components/__internal__/QChevron/QChevron.vue.js +28 -30
  230. package/esm/components/__internal__/QChevron/QChevron2.vue.js +5 -0
  231. package/esm/components/__internal__/QChevron/constants.js +4 -8
  232. package/esm/components/__internal__/QChevron/index.js +6 -6
  233. package/esm/components/__internal__/QClearButton/QClearButton.vue.js +39 -44
  234. package/esm/components/__internal__/QClearButton/QClearButton2.vue.js +5 -0
  235. package/esm/components/__internal__/QClearButton/constants.js +4 -11
  236. package/esm/components/__internal__/QClearButton/index.js +6 -6
  237. package/esm/components/index.js +117 -113
  238. package/esm/composables/defaults.js +22 -27
  239. package/esm/composables/overlay.js +125 -135
  240. package/esm/composables/theme.js +13 -20
  241. package/esm/composables/uid.js +7 -8
  242. package/esm/composables/useColor/index.js +41 -42
  243. package/esm/composables/useDialog/index.js +28 -27
  244. package/esm/composables/useDismissibleLayerStack/index.js +31 -30
  245. package/esm/composables/useDropZone/index.js +43 -61
  246. package/esm/composables/useGroup/index.js +33 -39
  247. package/esm/composables/useInputMask/index.d.ts.map +1 -1
  248. package/esm/composables/useInputMask/index.js +384 -396
  249. package/esm/composables/useTextareaAutosize/index.js +18 -21
  250. package/esm/composables/useToast/index.js +30 -32
  251. package/esm/composables/useToast/types.js +4 -4
  252. package/esm/framework.js +56 -59
  253. package/esm/index.js +14 -18
  254. package/esm/symbols/dismissibleLayer.js +4 -4
  255. package/esm/templates/index.js +9 -5
  256. package/esm/templates/theme.js +109 -110
  257. package/esm/utils/color/contrast.js +10 -11
  258. package/esm/utils/color/conversion.js +44 -54
  259. package/esm/utils/color/manipulate.js +14 -19
  260. package/esm/utils/color/merge.js +43 -48
  261. package/esm/utils/color/parse.js +23 -23
  262. package/esm/utils/date.d.ts +6 -0
  263. package/esm/utils/date.d.ts.map +1 -1
  264. package/esm/utils/date.js +457 -456
  265. package/esm/utils/download.js +14 -15
  266. package/esm/utils/getElement.js +5 -5
  267. package/esm/utils/index.js +48 -43
  268. package/esm/utils/isEmpty.js +5 -5
  269. package/esm/utils/isObject.js +5 -5
  270. package/esm/utils/merge.js +12 -16
  271. package/esm/utils/setupPropsProxy.js +21 -28
  272. package/esm/utils/string.js +7 -7
  273. package/esm/utils/theme.js +41 -57
  274. package/esm/vendors/uuid/dist/native.js +3 -4
  275. package/esm/vendors/uuid/dist/rng.js +10 -12
  276. package/esm/vendors/uuid/dist/stringify.js +7 -8
  277. package/esm/vendors/uuid/dist/v4.js +18 -15
  278. package/package.json +13 -18
  279. package/esm/components/QAccordion/QAccordion.vue2.js +0 -4
  280. package/esm/components/QAccordion/QAccordionItem.vue2.js +0 -4
  281. package/esm/components/QAvatar/QAvatar.vue2.js +0 -4
  282. package/esm/components/QBadge/QBadge.vue2.js +0 -4
  283. package/esm/components/QBadgeIndicator/QBadgeIndicator.vue2.js +0 -4
  284. package/esm/components/QButton/QButton.vue2.js +0 -4
  285. package/esm/components/QButtonGroup/QButtonGroup.vue2.js +0 -4
  286. package/esm/components/QCard/QCard.vue2.js +0 -4
  287. package/esm/components/QCarousel/QCarousel.vue2.js +0 -4
  288. package/esm/components/QCheckbox/QCheckbox.vue2.js +0 -4
  289. package/esm/components/QCheckbox/QCheckboxLabel.vue2.js +0 -4
  290. package/esm/components/QCollapsible/QCollapsible.vue2.js +0 -4
  291. package/esm/components/QColorPicker/QColorPicker.vue2.js +0 -4
  292. package/esm/components/QCombobox/QCombobox.vue2.js +0 -4
  293. package/esm/components/QDateTimePicker/QDateTimePicker.vue2.js +0 -4
  294. package/esm/components/QDefaultsProvider/QDefaultsProvider.vue2.js +0 -4
  295. package/esm/components/QDialog/QDialog.vue2.js +0 -4
  296. package/esm/components/QDialog/QDialogProvider.vue2.js +0 -4
  297. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue2.js +0 -4
  298. package/esm/components/QDivider/QDivider.vue2.js +0 -4
  299. package/esm/components/QDropdownMenu/QDropdownMenu.vue2.js +0 -4
  300. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue2.js +0 -4
  301. package/esm/components/QField/QField.vue2.js +0 -4
  302. package/esm/components/QFileUpload/QFileUpload.vue2.js +0 -4
  303. package/esm/components/QFocusWrap/QFocusWrap.vue2.js +0 -4
  304. package/esm/components/QGrid/QCol.vue2.js +0 -4
  305. package/esm/components/QGrid/QContainer.vue2.js +0 -4
  306. package/esm/components/QGrid/QRow.vue2.js +0 -4
  307. package/esm/components/QGroupBox/QGroupBox.vue2.js +0 -4
  308. package/esm/components/QIcon/QIcon.vue2.js +0 -4
  309. package/esm/components/QIcon/QIconFont.vue2.js +0 -4
  310. package/esm/components/QIcon/QIconImg.vue2.js +0 -4
  311. package/esm/components/QIcon/QIconSvg.vue2.js +0 -4
  312. package/esm/components/QInputGroup/QInputGroup.vue2.js +0 -4
  313. package/esm/components/QLabel/QLabel.vue2.js +0 -4
  314. package/esm/components/QLineLoader/QLineLoader.vue2.js +0 -4
  315. package/esm/components/QList/QList.vue2.js +0 -4
  316. package/esm/components/QList/QListItem.vue2.js +0 -4
  317. package/esm/components/QList/QListItemGroup.vue2.js +0 -4
  318. package/esm/components/QMeter/QMeter.vue2.js +0 -4
  319. package/esm/components/QOverlay/QOverlay.vue2.js +0 -4
  320. package/esm/components/QPasswordField/QPasswordField.vue2.js +0 -4
  321. package/esm/components/QPasswordField/QPasswordFieldMessages.vue2.js +0 -4
  322. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue2.js +0 -4
  323. package/esm/components/QPopover/QPopover.vue2.js +0 -4
  324. package/esm/components/QPropertyList/QPropertyList.vue2.js +0 -4
  325. package/esm/components/QPropertyList/QPropertyListGroup.vue2.js +0 -4
  326. package/esm/components/QPropertyList/QPropertyListPanel.vue2.js +0 -4
  327. package/esm/components/QPropertyList/QPropertyListRow.vue2.js +0 -4
  328. package/esm/components/QRadioGroup/QRadioButton.vue2.js +0 -4
  329. package/esm/components/QRadioGroup/QRadioGroup.vue2.js +0 -4
  330. package/esm/components/QRemoveScrollBar/QRemoveScrollBar.vue2.js +0 -4
  331. package/esm/components/QSelect/QSelect.vue2.js +0 -4
  332. package/esm/components/QSidebar/QSidebar.vue2.js +0 -4
  333. package/esm/components/QSidebar/QSidebarAnchor.vue2.js +0 -4
  334. package/esm/components/QSidebar/QSidebarPanel.vue2.js +0 -4
  335. package/esm/components/QSkeletonLoader/QSkeletonLoader.vue2.js +0 -4
  336. package/esm/components/QSpinnerLoader/QSpinnerLoader.vue2.js +0 -4
  337. package/esm/components/QSwitch/QSwitch.vue2.js +0 -4
  338. package/esm/components/QTextArea/QTextArea.vue2.js +0 -4
  339. package/esm/components/QTextField/QTextField.vue2.js +0 -4
  340. package/esm/components/QThemeProvider/QThemeProvider.vue2.js +0 -4
  341. package/esm/components/QToast/QToast.vue2.js +0 -4
  342. package/esm/components/QToast/QToaster.vue2.js +0 -4
  343. package/esm/components/QToggle/QToggle.vue2.js +0 -4
  344. package/esm/components/QToggleGroup/QToggleGroup.vue2.js +0 -4
  345. package/esm/components/QToggleGroup/QToggleGroupItem.vue2.js +0 -4
  346. package/esm/components/QTooltip/QTooltip.vue2.js +0 -4
  347. package/esm/components/__internal__/QChevron/QChevron.vue2.js +0 -4
  348. package/esm/components/__internal__/QClearButton/QClearButton.vue2.js +0 -4
@@ -1,1367 +1,1120 @@
1
- import { defineComponent as Yn, mergeModels as Pn, useModel as An, computed as s, ref as R, useTemplateRef as ie, watch as se, onBeforeUnmount as Ln, createElementBlock as H, openBlock as f, Fragment as Y, createVNode as i, createBlock as U, createCommentVNode as M, unref as o, normalizeClass as kt, createSlots as On, withCtx as b, mergeProps as te, renderSlot as Bn, createElementVNode as k, normalizeProps as W, guardReactiveProps as j, renderList as ge, toDisplayString as ze, nextTick as F } from "vue";
2
- import { WEEKDAY_NAMES as Ue, MONTH_NAMES as We, DEFAULT_TEXTS as Kn, DEFAULT_ICONS as $n } from "./constants.js";
3
- import { QButton as p } from "../QButton/index.js";
4
- import { QIcon as w } from "../QIcon/index.js";
5
- import { QOverlay as zn } from "../QOverlay/index.js";
6
- import { QSwitch as Un } from "../QSwitch/index.js";
7
- import { QTextField as Te } from "../QTextField/index.js";
8
- import { useInputMask as Wn, applyMask as xe, clampNumericSegments as _t, resolveCursorPosition as jn } from "../../composables/useInputMask/index.js";
9
- import { formatUsesTime as Qn, formatUsesSeconds as Gn, uses12HourFormat as Xn, isTimeOnlyFormat as Zn, parseDate as O, formatDate as Q, getFirstDayOfMonth as Jn, getDaysInMonth as Dt, isBetween as ea, isSameDay as He, convertDatePatternToMask as ta, padNumber as je, parseDateWithCompletion as Qe, inputIncludesTimePortion as Mt } from "../../utils/date.js";
10
- const na = {
11
- key: 0,
12
- ref: "calendar",
13
- class: "q-date-time-picker__calendar"
14
- }, aa = { class: "q-date-time-picker__header" }, la = { class: "q-date-time-picker__weekdays" }, ra = { class: "q-date-time-picker__time" }, ua = {
15
- key: 0,
16
- class: "q-date-time-picker__time-period"
17
- }, oa = { class: "q-date-time-picker__time-inputs" }, ia = { class: "q-date-time-picker__time-input-group" }, sa = { class: "q-date-time-picker__time-input-group" }, ca = { class: "q-date-time-picker__time-input-group" }, da = { class: "q-date-time-picker__month-grid" }, fa = { class: "q-date-time-picker__year" }, va = { class: "q-date-time-picker__year-change" }, ma = { class: "q-date-time-picker__year-interval" }, pa = { class: "q-date-time-picker__year-grid" }, ga = { class: "q-date-time-picker__bottom-bar" }, G = 1001, X = 9999, ce = 26, wt = 'a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]', xa = /* @__PURE__ */ Yn({
18
- inheritAttrs: !1,
19
- __name: "QDateTimePicker",
20
- props: /* @__PURE__ */ Pn({
21
- id: {},
22
- class: {},
23
- label: {},
24
- required: { type: Boolean },
25
- for: {},
26
- labelPosition: {},
27
- size: {},
28
- readonly: { type: Boolean },
29
- disabled: { type: Boolean },
30
- invalid: { type: Boolean },
31
- placeholder: {},
32
- inline: { type: Boolean, default: !1 },
33
- clearable: { type: Boolean },
34
- format: { default: "dd/MM/yyyy HH:mm" },
35
- range: { type: Boolean },
36
- icons: { default: () => $n },
37
- texts: { default: () => Kn }
38
- }, {
39
- modelValue: {},
40
- modelModifiers: {}
41
- }),
42
- emits: ["update:modelValue"],
43
- setup(Ge) {
44
- const l = Ge, Xe = An(Ge, "modelValue"), v = s({
45
- get: () => Xe.value,
46
- set: (e) => Xe.value = e || void 0
47
- }), Tt = s(
48
- () => l.readonly || l.disabled ? void 0 : l.placeholder
49
- ), ne = s(() => Qn(l.format)), ye = s(() => Gn(l.format)), Z = s(() => Xn(l.format)), J = s(() => Zn(l.format)), xt = s(
50
- () => g.value === (/* @__PURE__ */ new Date()).getMonth() && h.value === (/* @__PURE__ */ new Date()).getFullYear()
51
- ), T = R(!1), Se = R(!1), _ = R(""), S = R(null), P = R(!1);
52
- let de = 0;
53
- const D = R("date"), g = R((/* @__PURE__ */ new Date()).getMonth()), h = R((/* @__PURE__ */ new Date()).getFullYear()), ae = R((/* @__PURE__ */ new Date()).getFullYear());
54
- let le = null, B = !1, fe = !1, Ce = !1;
55
- function Ze() {
56
- queueMicrotask(() => {
57
- requestAnimationFrame(() => {
58
- var a, n;
59
- const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
60
- if (e && (t === e || t instanceof Node && ((n = E.value) != null && n.contains(t)))) {
61
- B = !0;
62
- return;
63
- }
64
- B = !1;
65
- });
66
- });
67
- }
68
- const C = ie("field"), E = ie("menu"), Ie = ie("calendar"), Ht = ie("monthHeader"), St = ie("yearHeader"), Ct = ie("toggleTime"), Re = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
69
- function Ee(e) {
70
- if (!e) return null;
71
- if (e instanceof HTMLElement) return e;
72
- if (typeof e == "object" && "$el" in e) {
73
- const t = e.$el;
74
- return t instanceof HTMLElement ? t : null;
75
- }
76
- return null;
77
- }
78
- function It(e, t) {
79
- const a = Ee(e);
80
- a ? Re.set(t, a) : Re.delete(t);
81
- }
82
- function Rt(e, t) {
83
- const a = Ee(e);
84
- a ? qe.set(t, a) : qe.delete(t);
85
- }
86
- function qt(e) {
87
- var t;
88
- (t = Ee(e)) == null || t.focus();
89
- }
90
- const q = s(() => ({
91
- getMonthIndex: (e, t) => {
92
- const a = e.toLowerCase();
93
- return We.findIndex((n) => {
94
- const r = l.texts[n] ?? n;
95
- return (t ? r.substring(0, 3) : r).toLowerCase() === a;
96
- });
97
- },
98
- getWeekdayIndex: (e, t) => {
99
- const a = e.toLowerCase();
100
- for (let n = 0; n < 7; n++) {
101
- const r = (n + 6) % 7, u = Ue[r], c = l.texts[u] ?? u;
102
- if ((t ? c.substring(0, 3) : c).toLowerCase() === a) return n;
103
- }
104
- return null;
105
- }
106
- })), x = s(() => {
107
- const e = v.value;
108
- return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? O(e, l.format, q.value) : null : null;
109
- }), Fe = s(() => {
110
- const e = v.value;
111
- return Array.isArray(e) && e.length > 1 ? e[1] : null;
112
- }), m = R(null), ee = R(null), N = R(null), A = R(!1), Et = s(() => !A.value || !m.value ? x.value : N.value && N.value < m.value ? N.value : m.value), Ft = s(() => {
113
- if (!l.range) return x.value;
114
- if (!A.value || !m.value)
115
- return Fe.value;
116
- const e = N.value ?? ee.value;
117
- return e ? e < m.value ? m.value : e : null;
118
- }), K = s(() => ({
119
- getMonthName: (e, t) => {
120
- const a = be(e);
121
- return t ? a.substring(0, 3) : a;
122
- },
123
- getWeekdayName: (e, t) => {
124
- const a = (e + 6) % 7, n = Ue[a], r = l.texts[n] ?? n;
125
- return t ? r.substring(0, 3) : r;
126
- }
127
- })), Nt = s(() => {
128
- const e = v.value;
129
- return e ? Array.isArray(e) ? e.map(
130
- (t) => t instanceof Date ? Q(t, l.format, K.value) : t
131
- ).join(" - ") : e instanceof Date ? Q(e, l.format, K.value) : String(e) : "";
132
- }), Je = s(() => S.value ?? Nt.value);
133
- function he() {
134
- _.value = Je.value;
135
- }
136
- se(
137
- Je,
138
- () => {
139
- Se.value || he();
140
- },
141
- { immediate: !0 }
142
- );
143
- const et = s(() => {
144
- const e = Jn(new Date(h.value, g.value, 1)), t = Dt(g.value, h.value), a = (e.getDay() + 6) % 7, n = [], r = g.value === 0 ? 11 : g.value - 1, u = g.value === 0 ? h.value - 1 : h.value, c = Dt(r, u);
145
- for (let d = a - 1; d >= 0; d--) {
146
- const I = new Date(u, r, c - d);
147
- Ne(n, I, !1);
148
- }
149
- for (let d = 1; d <= t; d++) {
150
- const I = new Date(h.value, g.value, d);
151
- Ne(n, I, !0);
152
- }
153
- const y = 7 - n.length % 7, L = y === 7 ? 0 : y;
154
- for (let d = 1; d <= L; d++) {
155
- const I = new Date(h.value, g.value + 1, d);
156
- Ne(n, I, !1);
157
- }
158
- return n;
159
- });
160
- function Ne(e, t, a) {
161
- const n = Et.value, r = Ft.value, u = t.getFullYear(), c = u < G || u > X;
162
- e.push({
163
- date: t,
164
- isCurrentMonth: a,
165
- isToday: He(t, /* @__PURE__ */ new Date()),
166
- isSelected: n ? He(t, n) : !1,
167
- isRangeStart: !!n && He(t, n),
168
- isRangeEnd: !!r && He(t, r),
169
- isInRange: n && r ? ea(t, n, r) : !1,
170
- isDisabled: c
171
- });
172
- }
173
- const Vt = s(() => Ue.map((e) => {
174
- var a;
175
- const t = e;
176
- return ((a = l.texts[t]) == null ? void 0 : a.substring(0, 2)) ?? e;
177
- })), Yt = s(
178
- () => Array.from({ length: 12 }, (e, t) => be(t, 3))
179
- );
180
- function be(e, t = 0) {
181
- const a = We[e], n = l.texts[a] ?? We[e];
182
- return t <= 0 ? n : n.substring(0, t);
183
- }
184
- function tt(e) {
185
- const t = Math.floor(ce / 2);
186
- let a = e - t, n = a + ce;
187
- return a < G && (a = G, n = Math.min(a + ce, X)), n > X && (n = X, a = Math.max(G, n - ce)), { startYear: a, endYear: n };
188
- }
189
- function Pt(e) {
190
- const { startYear: t, endYear: a } = tt(e);
191
- return Array.from({ length: a - t + 1 }, (n, r) => t + r);
192
- }
193
- function At() {
194
- nt.value && (ae.value -= ce);
195
- }
196
- function Lt() {
197
- at.value && (ae.value += ce);
198
- }
199
- const ke = s(() => tt(ae.value)), nt = s(
200
- () => ke.value.startYear > G
201
- ), at = s(() => ke.value.endYear < X), Ot = s(() => g.value === 0 ? h.value - 1 : h.value), Bt = s(() => g.value === 11 ? h.value + 1 : h.value), lt = s(() => Ot.value >= G), rt = s(() => Bt.value <= X), Kt = s(() => Pt(ae.value)), $t = s(() => J.value ? l.icons.clock : l.icons.calendar), ve = s(() => ta(l.format)), Ve = s(
202
- () => `${ve.value} - ${ve.value}`
203
- );
204
- Wn(
205
- () => {
206
- var e;
207
- return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
208
- },
209
- () => l.range ? Ve.value : ve.value
210
- ), se(
211
- () => {
212
- var e;
213
- return (e = C == null ? void 0 : C.value) == null ? void 0 : e.inputRef;
214
- },
215
- (e, t, a) => {
216
- const n = oe(e);
217
- n && (n.addEventListener("click", gt), n.addEventListener("paste", mt, !0), a(() => {
218
- n.removeEventListener("click", gt), n.removeEventListener("paste", mt, !0);
219
- }));
220
- },
221
- { flush: "post" }
222
- ), se(v, () => {
223
- S.value = null, he();
224
- });
225
- function zt(e) {
226
- return e === void 0 ? !1 : typeof e == "string" ? e.trim().length > 0 : e instanceof Date ? !0 : Array.isArray(e) ? e.length > 0 : !1;
227
- }
228
- const Ye = s(
229
- () => l.clearable && !l.readonly && !l.disabled && zt(v.value)
230
- );
231
- function Ut() {
232
- Ye.value && (m.value = null, ee.value = null, N.value = null, A.value = !1, v.value = void 0, _.value = "", we());
233
- }
234
- function Pe(e) {
235
- !l.range || !A.value || !m.value || e.getFullYear() < G || e.getFullYear() > X || (N.value = new Date(e));
236
- }
237
- function ut() {
238
- N.value = null;
239
- }
240
- function Wt(e) {
241
- const t = e.currentTarget, a = e.relatedTarget;
242
- !t || a && t.contains(a) || ut();
243
- }
244
- function ot(e) {
245
- if (!l.range || !A.value || !m.value) return;
246
- const t = e.touches.item(0);
247
- if (!t) return;
248
- const a = document.elementFromPoint(t.clientX, t.clientY), n = a == null ? void 0 : a.closest("[data-day-index]");
249
- if (!n) return;
250
- const r = Number(n.dataset.dayIndex);
251
- if (Number.isNaN(r)) return;
252
- const u = et.value[r];
253
- u && Pe(u.date);
254
- }
255
- function jt(e) {
256
- if (!(l.readonly || l.disabled) && !(e.getFullYear() < G || e.getFullYear() > X))
257
- if (l.range)
258
- if (A.value) {
259
- const t = m.value ?? new Date(e), a = new Date(e), [n, r] = a < t ? [a, t] : [t, a];
260
- ne.value && r.setHours(23, 59, ye.value ? 59 : 0, 0), v.value = [n, r], m.value = null, ee.value = null, N.value = null, A.value = !1;
261
- } else {
262
- const t = new Date(e);
263
- ne.value && m.value && t.setHours(
264
- m.value.getHours(),
265
- m.value.getMinutes(),
266
- m.value.getSeconds(),
267
- m.value.getMilliseconds()
268
- ), m.value = t, ee.value = null, N.value = null, A.value = !0;
269
- }
270
- else {
271
- const t = new Date(e);
272
- x.value && !hn(x.value) ? t.setHours(
273
- x.value.getHours(),
274
- x.value.getMinutes(),
275
- x.value.getSeconds()
276
- ) : ne.value && vt(t), v.value = t;
277
- }
278
- }
279
- function re(e, t) {
280
- h.value = e, t && Me("year");
281
- }
282
- function $(e, t) {
283
- g.value = e, t && Me("month");
284
- }
285
- function Qt() {
286
- lt.value && (g.value === 0 ? ($(11), re(h.value - 1)) : $(g.value - 1));
287
- }
288
- function Gt() {
289
- rt.value && (g.value === 11 ? ($(0), re(h.value + 1)) : $(g.value + 1));
290
- }
291
- function Xt() {
292
- $((/* @__PURE__ */ new Date()).getMonth()), re((/* @__PURE__ */ new Date()).getFullYear()), De();
293
- }
294
- function Zt() {
295
- let e = x.value;
296
- const t = v.value;
297
- if (l.range && Array.isArray(t) && t.length > 0) {
298
- const a = t[0];
299
- a instanceof Date ? e = a : typeof a == "string" && (e = O(a, l.format, q.value));
300
- }
301
- e = e ?? /* @__PURE__ */ new Date(), $(e.getMonth()), re(e.getFullYear()), De();
302
- }
303
- function me(e) {
304
- return l.range ? e === 1 ? Fe.value ?? ee.value : x.value ?? m.value : x.value;
305
- }
306
- function Jt(e, t) {
307
- if (!l.range) {
308
- v.value = t;
309
- return;
310
- }
311
- const a = x.value, n = Fe.value;
312
- if (!a || !n) {
313
- e === 1 ? ee.value = t : m.value = t;
314
- return;
315
- }
316
- v.value = e === 1 ? [a, t] : [t, n];
317
- }
318
- function V(e, t) {
319
- const a = me(e) ?? (() => {
320
- const r = /* @__PURE__ */ new Date();
321
- return r.setHours(0, 0, 0, 0), r;
322
- })(), n = new Date(a);
323
- t(n), Jt(e, n);
324
- }
325
- function en(e) {
326
- const t = me(e);
327
- if (!t) return Z.value ? 12 : 0;
328
- const a = t.getHours();
329
- return Z.value ? a % 12 || 12 : a;
330
- }
331
- function tn(e) {
332
- var t;
333
- return ((t = me(e)) == null ? void 0 : t.getMinutes()) ?? 0;
334
- }
335
- function nn(e) {
336
- var t;
337
- return ((t = me(e)) == null ? void 0 : t.getSeconds()) ?? 0;
338
- }
339
- function an(e) {
340
- const t = me(e);
341
- return t ? t.getHours() >= 12 : !1;
342
- }
343
- function _e(e, t) {
344
- return t ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
345
- }
346
- function ln(e) {
347
- V(e, (t) => {
348
- if (Z.value) {
349
- const a = t.getHours() % 12 || 12, n = a >= 12 ? 1 : a + 1, r = t.getHours() >= 12;
350
- t.setHours(_e(n, r));
351
- } else
352
- t.setHours(t.getHours() >= 23 ? 0 : t.getHours() + 1);
353
- });
354
- }
355
- function rn(e) {
356
- V(e, (t) => {
357
- if (Z.value) {
358
- const a = t.getHours() % 12 || 12, n = a <= 1 ? 12 : a - 1, r = t.getHours() >= 12;
359
- t.setHours(_e(n, r));
360
- } else
361
- t.setHours(t.getHours() <= 0 ? 23 : t.getHours() - 1);
362
- });
363
- }
364
- function un(e) {
365
- V(e, (t) => {
366
- t.setMinutes(t.getMinutes() >= 59 ? 0 : t.getMinutes() + 1);
367
- });
368
- }
369
- function on(e) {
370
- V(e, (t) => {
371
- t.setMinutes(t.getMinutes() <= 0 ? 59 : t.getMinutes() - 1);
372
- });
373
- }
374
- function sn(e) {
375
- V(e, (t) => {
376
- t.setSeconds(t.getSeconds() >= 59 ? 0 : t.getSeconds() + 1);
377
- });
378
- }
379
- function cn(e) {
380
- V(e, (t) => {
381
- t.setSeconds(t.getSeconds() <= 0 ? 59 : t.getSeconds() - 1);
382
- });
383
- }
384
- function Ae(e) {
385
- return (e ?? "").replace(/\D/g, "");
386
- }
387
- function dn(e) {
388
- return Math.min(23, Math.max(0, e));
389
- }
390
- function fn(e) {
391
- return Math.min(12, Math.max(1, e));
392
- }
393
- function it(e) {
394
- return Math.min(59, Math.max(0, e));
395
- }
396
- function st(e, t) {
397
- const a = Ae(e).slice(0, 2);
398
- if (a === "") return;
399
- const n = Number.parseInt(a, 10);
400
- if (Number.isNaN(n)) return;
401
- const r = Z.value ? fn(n) : dn(n);
402
- V(t, (u) => {
403
- Z.value ? u.setHours(_e(r, u.getHours() >= 12)) : u.setHours(r);
404
- });
405
- }
406
- function ct(e, t) {
407
- const a = Ae(e).slice(0, 2);
408
- if (a === "") return;
409
- const n = Number.parseInt(a, 10);
410
- if (Number.isNaN(n)) return;
411
- const r = it(n);
412
- V(t, (u) => {
413
- u.setMinutes(r);
414
- });
415
- }
416
- function dt(e, t) {
417
- const a = Ae(e).slice(0, 2);
418
- if (a === "") return;
419
- const n = Number.parseInt(a, 10);
420
- if (Number.isNaN(n)) return;
421
- const r = it(n);
422
- V(t, (u) => {
423
- u.setSeconds(r);
424
- });
425
- }
426
- async function Le(e, t, a) {
427
- if (e.ctrlKey || e.altKey || e.metaKey || !/^\d$/.test(e.key)) return;
428
- const n = e.target;
429
- if (!n) return;
430
- const r = n.selectionStart, u = n.selectionEnd;
431
- if (r === null || u === null || r !== u || n.maxLength <= 0 || n.value.length < n.maxLength || r >= n.value.length)
432
- return;
433
- e.preventDefault();
434
- const c = `${n.value.slice(0, r)}${e.key}${n.value.slice(r + 1)}`;
435
- t === "hours" ? st(c, a) : t === "minutes" ? ct(c, a) : dt(c, a);
436
- const y = Math.min(r + 1, n.maxLength);
437
- await F(), n.setSelectionRange(y, y);
438
- }
439
- function vn(e, t) {
440
- V(t, (a) => {
441
- const n = a.getHours() % 12 || 12;
442
- a.setHours(_e(n, e));
443
- });
444
- }
445
- async function Oe(e, t, a, n) {
446
- if (!e) return;
447
- const r = jn(t, a, n), u = () => e.setSelectionRange(r, r);
448
- u(), await F(), u(), await new Promise((c) => {
449
- requestAnimationFrame(() => {
450
- u(), c();
451
- });
452
- });
453
- }
454
- async function ft(e, t, a, n) {
455
- if (a === t) {
456
- _.value !== a && (_.value = a);
457
- return;
458
- }
459
- _.value = a, await Oe(e, t, a, n);
460
- }
461
- async function mn(e) {
462
- var L;
463
- if (de > 0) return;
464
- if (l.readonly || l.disabled) {
465
- he();
466
- return;
467
- }
468
- const t = oe((L = C.value) == null ? void 0 : L.inputRef), a = (t == null ? void 0 : t.selectionStart) ?? 0, n = e ?? "";
469
- if (!n) {
470
- v.value = void 0, S.value = null, _.value = "", P.value = !1;
471
- return;
472
- }
473
- if (l.range) {
474
- const d = xe(n, Ve.value);
475
- await ft(t, n, d, a), S.value = d;
476
- const I = Be(d);
477
- if (I) {
478
- v.value = I, S.value = null;
479
- const $e = I.map((Vn) => Q(Vn, l.format, K.value)).join(" - ");
480
- $e !== d && (_.value = $e, await Oe(t, d, $e, a)), P.value = !1;
481
- }
482
- return;
483
- }
484
- const r = xe(n, ve.value), u = _t(r, l.format);
485
- let c = u, y = O(u, l.format, q.value);
486
- if (!y) {
487
- const d = O(n, l.format, q.value);
488
- d && (c = n, y = d);
489
- }
490
- if (await ft(t, n, c, a), S.value = c, y) {
491
- const d = ue(y, n);
492
- v.value = d, S.value = null;
493
- const I = Q(d, l.format, K.value);
494
- I !== c && (_.value = I, await Oe(t, c, I, a)), P.value = !1;
495
- }
496
- }
497
- function Be(e, t) {
498
- const a = e.split(" - ");
499
- if (a.length !== 2) return null;
500
- const n = (c) => {
501
- const y = c.trim(), L = O(y, l.format, q.value);
502
- return L || (t != null && t.complete ? Qe(y, l.format, q.value) : null);
503
- }, r = n(a[0] ?? ""), u = n(a[1] ?? "");
504
- return !r || !u ? null : u < r ? [u, r] : [r, u];
505
- }
506
- function pn() {
507
- if (l.readonly || l.disabled) return !1;
508
- const e = S.value ?? _.value;
509
- if (!e) return !1;
510
- if (l.range) {
511
- const c = xe(e, Ve.value), y = Be(c, { complete: !0 });
512
- return y ? (v.value = y, S.value = null, P.value = !1, _.value = y.map((L) => Q(L, l.format, K.value)).join(" - "), !0) : (S.value = null, v.value = void 0, P.value = !0, _.value = "", !1);
513
- }
514
- const t = xe(e, ve.value), a = _t(t, l.format), n = Qe(
515
- a,
516
- l.format,
517
- q.value
518
- );
519
- if (!n)
520
- return S.value = null, v.value = void 0, P.value = !0, _.value = "", !1;
521
- const u = !!O(a, l.format, q.value) || Mt(a, l.format) ? n : ue(n, a);
522
- return v.value = u, S.value = null, P.value = !1, _.value = Q(u, l.format, K.value), !0;
523
- }
524
- function gn(e) {
525
- const t = e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i, "").trim();
526
- return t && t !== e ? t : null;
527
- }
528
- function yn(e) {
529
- return !ne.value || O(e, l.format, q.value) || Mt(e, l.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
530
- }
531
- function hn(e) {
532
- return e.getHours() === 0 && e.getMinutes() === 0 && e.getSeconds() === 0 && e.getMilliseconds() === 0;
533
- }
534
- function vt(e) {
535
- const t = /* @__PURE__ */ new Date();
536
- e.setHours(
537
- t.getHours(),
538
- t.getMinutes(),
539
- ye.value ? t.getSeconds() : 0,
540
- ye.value ? t.getMilliseconds() : 0
541
- );
542
- }
543
- function ue(e, t) {
544
- if (l.range || !ne.value || t !== void 0 && yn(t)) return e;
545
- const a = new Date(e);
546
- return vt(a), a;
547
- }
548
- function bn(e) {
549
- if (l.range)
550
- return Be(e);
551
- const t = O(e, l.format, q.value);
552
- if (t) return ue(t, e);
553
- const a = In(e);
554
- if (a) return ue(a, e);
555
- const n = Qe(e, l.format, q.value);
556
- if (n) return ue(n, e);
557
- const r = gn(l.format);
558
- if (r) {
559
- const u = O(e, r, q.value);
560
- if (u) return ue(u, e);
561
- }
562
- return null;
563
- }
564
- function kn(e) {
565
- if (P.value = !1, S.value = null, Array.isArray(e)) {
566
- const a = e.map((n) => Q(n, l.format, K.value)).join(" - ");
567
- de += 1, v.value = e, _.value = a, F(() => {
568
- de -= 1;
569
- });
570
- return;
571
- }
572
- const t = Q(e, l.format, K.value);
573
- de += 1, v.value = e, _.value = t, F(() => {
574
- de -= 1;
575
- });
576
- }
577
- function mt(e) {
578
- var n, r, u, c;
579
- if (l.readonly || l.disabled) {
580
- e.preventDefault();
581
- return;
582
- }
583
- const t = ((r = (n = e.clipboardData) == null ? void 0 : n.getData("text/plain")) == null ? void 0 : r.trim()) || ((c = (u = e.clipboardData) == null ? void 0 : u.getData("text")) == null ? void 0 : c.trim()) || "";
584
- if (!t) {
585
- e.preventDefault();
586
- return;
587
- }
588
- const a = bn(t);
589
- if (!a) {
590
- e.preventDefault();
591
- return;
592
- }
593
- e.preventDefault(), kn(a);
594
- }
595
- function _n(e) {
596
- const t = e.target;
597
- if (!(t instanceof Element) || !E.value) return null;
598
- const a = t.closest(
599
- "button, input, select, textarea, a[href], [tabindex], [contenteditable]"
600
- );
601
- return a && E.value.contains(a) ? a : null;
602
- }
603
- function Dn(e) {
604
- return !(e.matches(":disabled") || e.getAttribute("aria-disabled") === "true" || e.getAttribute("tabindex") === "-1");
605
- }
606
- function Mn(e) {
607
- var a;
608
- if (!(e.target instanceof Node) || !((a = E.value) != null && a.contains(e.target))) return;
609
- fe = !0;
610
- const t = _n(e);
611
- t && !Dn(t) && e.preventDefault();
612
- }
613
- function pt() {
614
- return E.value ? Array.from(E.value.querySelectorAll(wt)).filter(
615
- (e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0
616
- ) : [];
617
- }
618
- function wn() {
619
- var n, r;
620
- const e = oe((n = C.value) == null ? void 0 : n.inputRef);
621
- if (!e) return;
622
- const t = Array.from(
623
- document.querySelectorAll(wt)
624
- ).filter(
625
- (u) => u.offsetWidth > 0 || u.offsetHeight > 0 || u.getClientRects().length > 0
626
- ), a = t.indexOf(e);
627
- a >= 0 && a < t.length - 1 && ((r = t[a + 1]) == null || r.focus());
628
- }
629
- function Tn(e) {
630
- if (e.key !== "Tab" || !T.value || l.readonly || l.disabled) return;
631
- if (e.shiftKey) {
632
- B = !1, T.value = !1;
633
- return;
634
- }
635
- const [t] = pt();
636
- t && (e.preventDefault(), fe = !0, t.focus());
637
- }
638
- async function xn(e) {
639
- if (e.key !== "Tab") return;
640
- const t = pt();
641
- if (!t.length) return;
642
- const a = t[0], n = t[t.length - 1], r = document.activeElement;
643
- if (e.shiftKey) {
644
- if (r !== a) return;
645
- e.preventDefault(), fe = !0, we();
646
- return;
647
- }
648
- r === n && (e.preventDefault(), Ce = !0, T.value = !1, await F(), wn());
649
- }
650
- async function Hn(e) {
651
- var r, u, c;
652
- if (pn(), fe) {
653
- fe = !1;
654
- return;
655
- }
656
- const t = e == null ? void 0 : e.relatedTarget;
657
- if (t instanceof Node && ((r = E.value) != null && r.contains(t)))
658
- return;
659
- await F();
660
- const a = oe((u = C.value) == null ? void 0 : u.inputRef), n = document.activeElement;
661
- a !== n && (n instanceof Node && ((c = E.value) != null && c.contains(n)) || (B = !1, T.value = !1, Se.value = !1, he()));
662
- }
663
- function Sn() {
664
- if (!(l.readonly || l.disabled)) {
665
- if (Se.value = !0, B) {
666
- B = !1;
667
- return;
668
- }
669
- T.value || (T.value = !0);
670
- }
671
- }
672
- function gt() {
673
- l.readonly || l.disabled || (B = !1, T.value = !0);
674
- }
675
- function Cn(e) {
676
- e || Ze(), T.value = e;
677
- }
678
- function In(e) {
679
- const t = /[A-Za-z]/.test(e), a = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(
680
- e
681
- );
682
- if (!t && !a) return null;
683
- const n = new Date(e);
684
- return Number.isNaN(n.getTime()) ? null : n;
685
- }
686
- function oe(e) {
687
- return e instanceof HTMLInputElement ? e : typeof e == "object" && e !== null && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
688
- }
689
- function Rn(e) {
690
- return e.isSelected || e.isRangeStart || e.isRangeEnd ? "bold" : e.isInRange ? "tonal" : "ghost";
691
- }
692
- function pe(e) {
693
- var t;
694
- (t = E.value) == null || t.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
695
- }
696
- async function yt() {
697
- var e;
698
- if (!T.value || J.value) {
699
- pe(0);
700
- return;
701
- }
702
- D.value === "date" && (await F(), pe(((e = Ie.value) == null ? void 0 : e.getBoundingClientRect().height) ?? 0));
703
- }
704
- function z() {
705
- le == null || le.disconnect(), le = null;
706
- }
707
- async function ht() {
708
- !T.value || J.value || D.value !== "date" || (await F(), Ie.value && (z(), le = new MutationObserver(() => {
709
- yt();
710
- }), le.observe(Ie.value, {
711
- childList: !0,
712
- subtree: !0,
713
- attributes: !0,
714
- characterData: !0
715
- }), yt()));
716
- }
717
- function bt() {
718
- D.value = "time", z();
719
- }
720
- function De() {
721
- D.value = "date", ht();
722
- }
723
- async function Me(e) {
724
- var a;
725
- (a = E.value) == null || a.focus(), De(), await F();
726
- const t = e === "year" ? St.value : e === "month" ? Ht.value : e === "time" ? Ct.value : null;
727
- qt(t);
728
- }
729
- function qn() {
730
- const e = D.value;
731
- e !== "date" && Me(e);
732
- }
733
- async function En() {
734
- z(), D.value = "month", await F();
735
- const e = Re.get(g.value);
736
- e == null || e.scrollIntoView({ block: "center" }), e == null || e.focus();
737
- }
738
- async function Fn() {
739
- var e;
740
- z(), ae.value = h.value, D.value = "year", await F(), (e = qe.get(ae.value)) == null || e.scrollIntoView({ block: "center" });
741
- }
742
- async function Ke(e) {
743
- if (e.key !== "Escape") return;
744
- if (B = !0, D.value === "date") {
745
- e.preventDefault(), T.value = !1;
746
- return;
747
- }
748
- e.preventDefault();
749
- const t = D.value;
750
- await Me(t);
751
- }
752
- function we() {
753
- var e, t;
754
- (t = (e = C.value) == null ? void 0 : e.inputRef) == null || t.focus();
755
- }
756
- function Nn() {
757
- var a, n;
758
- if (Ce) {
759
- Ce = !1;
760
- return;
761
- }
762
- const e = oe((a = C.value) == null ? void 0 : a.inputRef), t = document.activeElement;
763
- e && t !== e && !(t instanceof Node && ((n = E.value) != null && n.contains(t))) || we();
764
- }
765
- return se(v, () => {
766
- x.value && ($(x.value.getMonth()), re(x.value.getFullYear()));
767
- }), se(T, (e, t) => {
768
- if (J.value) {
769
- z(), pe(0);
770
- return;
771
- }
772
- m.value = null, ee.value = null, N.value = null, A.value = !1, e ? (document.addEventListener("keydown", Ke, { capture: !0 }), Zt(), ht()) : (t && Ze(), document.removeEventListener("keydown", Ke, { capture: !0 }), z(), pe(0));
773
- }), se(
774
- J,
775
- (e) => {
776
- e && z(), T.value = !1, e && pe(0), e ? bt() : De();
777
- },
778
- { immediate: !0 }
779
- ), Ln(() => {
780
- z(), document.removeEventListener("keydown", Ke, { capture: !0 });
781
- }), (e, t) => {
782
- var a;
783
- return f(), H(
784
- Y,
785
- null,
786
- [
787
- i(o(Te), {
788
- id: l.id,
789
- ref: "field",
790
- "model-value": _.value,
791
- class: kt(["q-date-time-picker", l.class]),
792
- clearable: Ye.value,
793
- label: l.label,
794
- "label-position": l.labelPosition,
795
- readonly: l.readonly,
796
- disabled: l.disabled,
797
- placeholder: Tt.value,
798
- required: l.required,
799
- size: l.size,
800
- invalid: l.invalid || P.value,
801
- "onClick:clear": we,
802
- onFocusin: Sn,
803
- onKeydown: Tn,
804
- onBlur: Hn,
805
- "onUpdate:modelValue": mn
806
- }, On({
807
- prepend: b(() => [
808
- i(
809
- o(w),
810
- te({ class: "q-date-time-picker__input-icon" }, $t.value),
811
- null,
812
- 16
813
- /* FULL_PROPS */
814
- )
815
- ]),
816
- _: 2
817
- /* DYNAMIC */
818
- }, [
819
- e.$slots.extras ? {
820
- name: "extras",
821
- fn: b(() => [
822
- Bn(e.$slots, "extras")
823
- ]),
824
- key: "0"
825
- } : void 0
826
- ]), 1032, ["id", "model-value", "class", "clearable", "label", "label-position", "readonly", "disabled", "placeholder", "required", "size", "invalid"]),
827
- !l.readonly && !l.disabled ? (f(), U(o(zn), {
828
- key: 0,
829
- "model-value": T.value,
830
- anchor: (a = C.value) == null ? void 0 : a.fieldRef,
831
- inline: l.inline,
832
- offset: 8,
833
- placement: "bottom",
834
- trigger: "manual",
835
- arrow: "",
836
- "non-modal": "",
837
- spy: "",
838
- onLeave: Nn,
839
- "onUpdate:modelValue": Cn
840
- }, {
841
- default: b(() => [
842
- k(
843
- "div",
844
- {
845
- ref: "menu",
846
- class: "q-date-time-picker__menu",
847
- tabindex: "-1",
848
- onPointerdownCapture: Mn,
849
- onKeydown: xn
850
- },
851
- [
852
- M(" Calendar View "),
853
- D.value === "date" ? (f(), H(
854
- "div",
855
- na,
856
- [
857
- M(" Header "),
858
- k("div", aa, [
859
- i(o(p), {
860
- variant: "ghost",
861
- disabled: !lt.value,
862
- title: l.texts.previousMonth,
863
- onClick: Qt
864
- }, {
865
- default: b(() => [
866
- i(
867
- o(w),
868
- W(j(l.icons.back)),
869
- null,
870
- 16
871
- /* FULL_PROPS */
872
- )
873
- ]),
874
- _: 1
875
- /* STABLE */
876
- }, 8, ["disabled", "title"]),
877
- i(o(p), {
878
- ref: "monthHeader",
879
- "data-testid": "q-date-time-picker-month-header",
880
- variant: "ghost",
881
- label: be(g.value, 3),
882
- title: l.texts.pickMonth,
883
- onClick: En
884
- }, null, 8, ["label", "title"]),
885
- i(o(p), {
886
- ref: "yearHeader",
887
- "data-testid": "q-date-time-picker-year-header",
888
- variant: "ghost",
889
- label: h.value.toString(),
890
- title: l.texts.pickYear,
891
- onClick: Fn
892
- }, null, 8, ["label", "title"]),
893
- i(o(p), {
894
- variant: "ghost",
895
- disabled: !rt.value,
896
- title: l.texts.nextMonth,
897
- onClick: Gt
898
- }, {
899
- default: b(() => [
900
- i(
901
- o(w),
902
- W(j(l.icons.forward)),
903
- null,
904
- 16
905
- /* FULL_PROPS */
906
- )
907
- ]),
908
- _: 1
909
- /* STABLE */
910
- }, 8, ["disabled", "title"])
911
- ]),
912
- M(" Weekday Headers "),
913
- k("div", la, [
914
- (f(!0), H(
915
- Y,
916
- null,
917
- ge(Vt.value, (n) => (f(), H(
918
- "div",
919
- {
920
- key: n,
921
- class: "q-date-time-picker__weekday"
922
- },
923
- ze(n),
924
- 1
925
- /* TEXT */
926
- ))),
927
- 128
928
- /* KEYED_FRAGMENT */
929
- ))
930
- ]),
931
- M(" Days Grid "),
932
- k(
933
- "div",
934
- {
935
- class: "q-date-time-picker__days",
936
- onMouseleave: ut,
937
- onFocusout: Wt,
938
- onTouchstartPassive: ot,
939
- onTouchmovePassive: ot
940
- },
941
- [
942
- (f(!0), H(
943
- Y,
944
- null,
945
- ge(et.value, (n, r) => (f(), U(o(p), {
946
- key: r,
947
- "data-day-index": r,
948
- class: kt([
949
- "q-date-time-picker__day",
950
- {
951
- "q-date-time-picker__day--other-month": !n.isCurrentMonth,
952
- "q-date-time-picker__day--today": n.isToday,
953
- "q-date-time-picker__day--selected": n.isSelected,
954
- "q-date-time-picker__day--in-range": n.isInRange,
955
- "q-date-time-picker__day--range-start": n.isRangeStart,
956
- "q-date-time-picker__day--range-end": n.isRangeEnd
957
- }
958
- ]),
959
- label: n.date.getDate().toString(),
960
- variant: Rn(n),
961
- disabled: n.isDisabled,
962
- onMouseenter: () => Pe(n.date),
963
- onFocus: () => Pe(n.date),
964
- onClick: () => jt(n.date)
965
- }, null, 8, ["data-day-index", "class", "label", "variant", "disabled", "onMouseenter", "onFocus", "onClick"]))),
966
- 128
967
- /* KEYED_FRAGMENT */
968
- ))
969
- ],
970
- 32
971
- /* NEED_HYDRATION */
972
- )
973
- ],
974
- 512
975
- /* NEED_PATCH */
976
- )) : D.value === "time" ? (f(), H(
977
- Y,
978
- { key: 1 },
979
- [
980
- M(" Time View "),
981
- k("div", ra, [
982
- (f(!0), H(
983
- Y,
984
- null,
985
- ge(l.range ? 2 : 1, (n) => (f(), H("div", {
986
- key: n,
987
- class: "q-date-time-picker__time-group"
988
- }, [
989
- Z.value ? (f(), H("div", ua, [
990
- i(o(Un), {
991
- "model-value": an(n - 1),
992
- "show-state-labels": "",
993
- size: "small",
994
- "false-label": l.texts.am,
995
- "true-label": l.texts.pm,
996
- "onUpdate:modelValue": (r) => vn(r ?? !1, n - 1)
997
- }, null, 8, ["model-value", "false-label", "true-label", "onUpdate:modelValue"])
998
- ])) : M("v-if", !0),
999
- M(" Time Inputs "),
1000
- k("div", oa, [
1001
- k("div", ia, [
1002
- i(o(p), {
1003
- variant: "ghost",
1004
- title: l.texts.increaseHour,
1005
- onClick: (r) => ln(n - 1)
1006
- }, {
1007
- default: b(() => [
1008
- i(
1009
- o(w),
1010
- te({ ref_for: !0 }, l.icons.up),
1011
- null,
1012
- 16
1013
- /* FULL_PROPS */
1014
- )
1015
- ]),
1016
- _: 1
1017
- /* STABLE */
1018
- }, 8, ["title", "onClick"]),
1019
- i(o(Te), {
1020
- class: "q-date-time-picker__time-number",
1021
- size: "small",
1022
- inputmode: "numeric",
1023
- "max-length": 2,
1024
- "model-value": o(je)(en(n - 1)),
1025
- onKeydown: (r) => Le(r, "hours", n - 1),
1026
- "onUpdate:modelValue": (r) => st(r, n - 1)
1027
- }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1028
- i(o(p), {
1029
- variant: "ghost",
1030
- title: l.texts.decreaseHour,
1031
- onClick: (r) => rn(n - 1)
1032
- }, {
1033
- default: b(() => [
1034
- i(
1035
- o(w),
1036
- te({ ref_for: !0 }, l.icons.down),
1037
- null,
1038
- 16
1039
- /* FULL_PROPS */
1040
- )
1041
- ]),
1042
- _: 1
1043
- /* STABLE */
1044
- }, 8, ["title", "onClick"])
1045
- ]),
1046
- t[1] || (t[1] = k(
1047
- "div",
1048
- { class: "q-date-time-picker__time-separator" },
1049
- ":",
1050
- -1
1051
- /* CACHED */
1052
- )),
1053
- k("div", sa, [
1054
- i(o(p), {
1055
- variant: "ghost",
1056
- title: l.texts.increaseMinute,
1057
- onClick: (r) => un(n - 1)
1058
- }, {
1059
- default: b(() => [
1060
- i(
1061
- o(w),
1062
- te({ ref_for: !0 }, l.icons.up),
1063
- null,
1064
- 16
1065
- /* FULL_PROPS */
1066
- )
1067
- ]),
1068
- _: 1
1069
- /* STABLE */
1070
- }, 8, ["title", "onClick"]),
1071
- i(o(Te), {
1072
- class: "q-date-time-picker__time-number",
1073
- size: "small",
1074
- inputmode: "numeric",
1075
- "max-length": 2,
1076
- "model-value": o(je)(tn(n - 1)),
1077
- onKeydown: (r) => Le(r, "minutes", n - 1),
1078
- "onUpdate:modelValue": (r) => ct(r, n - 1)
1079
- }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1080
- i(o(p), {
1081
- variant: "ghost",
1082
- title: l.texts.decreaseMinute,
1083
- onClick: (r) => on(n - 1)
1084
- }, {
1085
- default: b(() => [
1086
- i(
1087
- o(w),
1088
- te({ ref_for: !0 }, l.icons.down),
1089
- null,
1090
- 16
1091
- /* FULL_PROPS */
1092
- )
1093
- ]),
1094
- _: 1
1095
- /* STABLE */
1096
- }, 8, ["title", "onClick"])
1097
- ]),
1098
- ye.value ? (f(), H(
1099
- Y,
1100
- { key: 0 },
1101
- [
1102
- t[0] || (t[0] = k(
1103
- "div",
1104
- { class: "q-date-time-picker__time-separator" },
1105
- ":",
1106
- -1
1107
- /* CACHED */
1108
- )),
1109
- k("div", ca, [
1110
- i(o(p), {
1111
- variant: "ghost",
1112
- title: l.texts.increaseSecond,
1113
- onClick: (r) => sn(n - 1)
1114
- }, {
1115
- default: b(() => [
1116
- i(
1117
- o(w),
1118
- te({ ref_for: !0 }, l.icons.up),
1119
- null,
1120
- 16
1121
- /* FULL_PROPS */
1122
- )
1123
- ]),
1124
- _: 1
1125
- /* STABLE */
1126
- }, 8, ["title", "onClick"]),
1127
- i(o(Te), {
1128
- class: "q-date-time-picker__time-number",
1129
- size: "small",
1130
- inputmode: "numeric",
1131
- "max-length": 2,
1132
- "model-value": o(je)(nn(n - 1)),
1133
- onKeydown: (r) => Le(r, "seconds", n - 1),
1134
- "onUpdate:modelValue": (r) => dt(r, n - 1)
1135
- }, null, 8, ["model-value", "onKeydown", "onUpdate:modelValue"]),
1136
- i(o(p), {
1137
- variant: "ghost",
1138
- title: l.texts.decreaseSecond,
1139
- onClick: (r) => cn(n - 1)
1140
- }, {
1141
- default: b(() => [
1142
- i(
1143
- o(w),
1144
- te({ ref_for: !0 }, l.icons.down),
1145
- null,
1146
- 16
1147
- /* FULL_PROPS */
1148
- )
1149
- ]),
1150
- _: 1
1151
- /* STABLE */
1152
- }, 8, ["title", "onClick"])
1153
- ])
1154
- ],
1155
- 64
1156
- /* STABLE_FRAGMENT */
1157
- )) : M("v-if", !0)
1158
- ])
1159
- ]))),
1160
- 128
1161
- /* KEYED_FRAGMENT */
1162
- ))
1163
- ])
1164
- ],
1165
- 2112
1166
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1167
- )) : D.value === "month" ? (f(), H(
1168
- Y,
1169
- { key: 2 },
1170
- [
1171
- M(" Month View "),
1172
- k("div", da, [
1173
- (f(!0), H(
1174
- Y,
1175
- null,
1176
- ge(Yt.value, (n, r) => (f(), U(o(p), {
1177
- key: r,
1178
- ref_for: !0,
1179
- ref: (u) => It(u, r),
1180
- "data-testid": "q-date-time-picker-month-option",
1181
- "data-month-index": r,
1182
- disabled: g.value === r,
1183
- label: n,
1184
- title: be(r),
1185
- variant: "ghost",
1186
- onClick: () => $(r, !0)
1187
- }, null, 8, ["data-month-index", "disabled", "label", "title", "onClick"]))),
1188
- 128
1189
- /* KEYED_FRAGMENT */
1190
- ))
1191
- ])
1192
- ],
1193
- 2112
1194
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1195
- )) : D.value === "year" ? (f(), H(
1196
- Y,
1197
- { key: 3 },
1198
- [
1199
- M(" Year View "),
1200
- k("div", fa, [
1201
- k("div", va, [
1202
- i(o(p), {
1203
- variant: "ghost",
1204
- disabled: !nt.value,
1205
- title: l.texts.previousYears,
1206
- onClick: At
1207
- }, {
1208
- default: b(() => [
1209
- i(
1210
- o(w),
1211
- W(j(l.icons.back)),
1212
- null,
1213
- 16
1214
- /* FULL_PROPS */
1215
- )
1216
- ]),
1217
- _: 1
1218
- /* STABLE */
1219
- }, 8, ["disabled", "title"]),
1220
- k(
1221
- "div",
1222
- ma,
1223
- ze(ke.value.startYear) + " - " + ze(ke.value.endYear),
1224
- 1
1225
- /* TEXT */
1226
- ),
1227
- i(o(p), {
1228
- variant: "ghost",
1229
- disabled: !at.value,
1230
- title: l.texts.nextYears,
1231
- onClick: Lt
1232
- }, {
1233
- default: b(() => [
1234
- i(
1235
- o(w),
1236
- W(j(l.icons.forward)),
1237
- null,
1238
- 16
1239
- /* FULL_PROPS */
1240
- )
1241
- ]),
1242
- _: 1
1243
- /* STABLE */
1244
- }, 8, ["disabled", "title"])
1245
- ]),
1246
- k("div", pa, [
1247
- (f(!0), H(
1248
- Y,
1249
- null,
1250
- ge(Kt.value, (n, r) => (f(), U(o(p), {
1251
- key: r,
1252
- ref_for: !0,
1253
- ref: (u) => Rt(u, n),
1254
- "data-testid": "q-date-time-picker-year-option",
1255
- "data-year": n,
1256
- disabled: h.value === n,
1257
- label: n.toString(),
1258
- title: n,
1259
- variant: "ghost",
1260
- onClick: () => re(n, !0)
1261
- }, null, 8, ["data-year", "disabled", "label", "title", "onClick"]))),
1262
- 128
1263
- /* KEYED_FRAGMENT */
1264
- ))
1265
- ])
1266
- ])
1267
- ],
1268
- 2112
1269
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1270
- )) : M("v-if", !0),
1271
- k("div", ga, [
1272
- J.value ? M("v-if", !0) : (f(), U(o(p), {
1273
- key: 0,
1274
- variant: "ghost",
1275
- disabled: xt.value,
1276
- title: l.texts.today,
1277
- onClick: Xt
1278
- }, {
1279
- default: b(() => [
1280
- i(
1281
- o(w),
1282
- W(j(l.icons.today)),
1283
- null,
1284
- 16
1285
- /* FULL_PROPS */
1286
- )
1287
- ]),
1288
- _: 1
1289
- /* STABLE */
1290
- }, 8, ["disabled", "title"])),
1291
- ne.value && D.value === "date" ? (f(), U(o(p), {
1292
- key: 1,
1293
- ref: "toggleTime",
1294
- "data-testid": "q-date-time-picker-toggle-time",
1295
- variant: "ghost",
1296
- title: l.texts.toggleMode,
1297
- onClick: bt
1298
- }, {
1299
- default: b(() => [
1300
- i(
1301
- o(w),
1302
- W(j(l.icons.clock)),
1303
- null,
1304
- 16
1305
- /* FULL_PROPS */
1306
- )
1307
- ]),
1308
- _: 1
1309
- /* STABLE */
1310
- }, 8, ["title"])) : D.value !== "date" && !J.value ? (f(), U(o(p), {
1311
- key: 2,
1312
- "data-testid": "q-date-time-picker-toggle-date",
1313
- variant: "ghost",
1314
- title: l.texts.toggleMode,
1315
- onClick: qn
1316
- }, {
1317
- default: b(() => [
1318
- i(
1319
- o(w),
1320
- W(j(l.icons.calendar)),
1321
- null,
1322
- 16
1323
- /* FULL_PROPS */
1324
- )
1325
- ]),
1326
- _: 1
1327
- /* STABLE */
1328
- }, 8, ["title"])) : M("v-if", !0),
1329
- l.clearable ? (f(), U(o(p), {
1330
- key: 3,
1331
- "data-testid": "q-date-time-picker-clear",
1332
- variant: "ghost",
1333
- disabled: !Ye.value,
1334
- title: l.texts.clearValue,
1335
- onClick: Ut
1336
- }, {
1337
- default: b(() => [
1338
- i(
1339
- o(w),
1340
- W(j(l.icons.delete)),
1341
- null,
1342
- 16
1343
- /* FULL_PROPS */
1344
- )
1345
- ]),
1346
- _: 1
1347
- /* STABLE */
1348
- }, 8, ["disabled", "title"])) : M("v-if", !0)
1349
- ])
1350
- ],
1351
- 544
1352
- /* NEED_HYDRATION, NEED_PATCH */
1353
- )
1354
- ]),
1355
- _: 1
1356
- /* STABLE */
1357
- }, 8, ["model-value", "anchor", "inline"])) : M("v-if", !0)
1358
- ],
1359
- 64
1360
- /* STABLE_FRAGMENT */
1361
- );
1362
- };
1363
- }
1
+ import { QButton as e } from "../QButton/index.js";
2
+ import { QIcon as t } from "../QIcon/index.js";
3
+ import { QTextField as n } from "../QTextField/index.js";
4
+ import { QOverlay as r } from "../QOverlay/index.js";
5
+ import { DEFAULT_ICONS as i, DEFAULT_TEXTS as a, MONTH_NAMES as o, WEEKDAY_NAMES as s } from "./constants.js";
6
+ import { QSwitch as c } from "../QSwitch/index.js";
7
+ import { applyMask as ee, clampNumericSegments as te, resolveCursorPosition as ne, useInputMask as re } from "../../composables/useInputMask/index.js";
8
+ import { convertDatePatternToMask as ie, formatDate as l, formatUsesSeconds as ae, formatUsesTime as oe, getDaysInMonth as se, getFirstDayOfMonth as ce, inputIncludesTimePortion as le, isBetween as ue, isSameDay as de, isTimeOnlyFormat as fe, padNumber as pe, parseDate as u, parseDateWithCompletion as me, parseIsoDate as he, uses12HourFormat as ge } from "../../utils/date.js";
9
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _e, createVNode as _, defineComponent as ve, guardReactiveProps as v, mergeModels as y, mergeProps as b, nextTick as x, normalizeClass as ye, normalizeProps as S, onBeforeUnmount as be, openBlock as C, ref as w, renderList as xe, renderSlot as Se, toDisplayString as Ce, unref as T, useModel as we, useTemplateRef as E, watch as Te, withCtx as D } from "vue";
10
+ //#region src/components/QDateTimePicker/QDateTimePicker.vue?vue&type=script&setup=true&lang.ts
11
+ var Ee = {
12
+ key: 0,
13
+ ref: "calendar",
14
+ class: "q-date-time-picker__calendar"
15
+ }, De = { class: "q-date-time-picker__header" }, Oe = { class: "q-date-time-picker__weekdays" }, ke = { class: "q-date-time-picker__time" }, Ae = {
16
+ key: 0,
17
+ class: "q-date-time-picker__time-period"
18
+ }, je = { class: "q-date-time-picker__time-inputs" }, Me = { class: "q-date-time-picker__time-input-group" }, Ne = { class: "q-date-time-picker__time-input-group" }, Pe = { class: "q-date-time-picker__time-input-group" }, Fe = { class: "q-date-time-picker__month-grid" }, Ie = { class: "q-date-time-picker__year" }, Le = { class: "q-date-time-picker__year-change" }, Re = { class: "q-date-time-picker__year-interval" }, ze = { class: "q-date-time-picker__year-grid" }, Be = { class: "q-date-time-picker__bottom-bar" }, O = 1001, k = 9999, Ve = 26, He = "a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable]", Ue = /*@__PURE__*/ ve({
19
+ inheritAttrs: !1,
20
+ __name: "QDateTimePicker",
21
+ props: /*@__PURE__*/ y({
22
+ id: {},
23
+ class: {},
24
+ label: {},
25
+ required: { type: Boolean },
26
+ for: {},
27
+ labelPosition: {},
28
+ size: {},
29
+ readonly: { type: Boolean },
30
+ disabled: { type: Boolean },
31
+ invalid: { type: Boolean },
32
+ placeholder: {},
33
+ inline: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ clearable: { type: Boolean },
38
+ format: { default: "dd/MM/yyyy HH:mm" },
39
+ range: { type: Boolean },
40
+ icons: { default: () => i },
41
+ texts: { default: () => a }
42
+ }, {
43
+ modelValue: {},
44
+ modelModifiers: {}
45
+ }),
46
+ emits: ["update:modelValue"],
47
+ setup(i) {
48
+ let a = i, ve = we(i, "modelValue"), y = f({
49
+ get: () => ve.value,
50
+ set: (e) => ve.value = e || void 0
51
+ }), Ue = f(() => a.readonly || a.disabled ? void 0 : a.placeholder), We = f(() => oe(a.format)), Ge = f(() => ae(a.format)), A = f(() => ge(a.format)), j = f(() => fe(a.format)), Ke = f(() => L.value === (/* @__PURE__ */ new Date()).getMonth() && R.value === (/* @__PURE__ */ new Date()).getFullYear()), M = w(!1), qe = w(!1), N = w(""), P = w(null), F = w(!1), Je = 0, I = w("date"), L = w((/* @__PURE__ */ new Date()).getMonth()), R = w((/* @__PURE__ */ new Date()).getFullYear()), Ye = w((/* @__PURE__ */ new Date()).getFullYear()), Xe = null, z = !1, Ze = !1, Qe = !1, B = null;
52
+ function $e() {
53
+ queueMicrotask(() => {
54
+ requestAnimationFrame(() => {
55
+ let e = Q(), t = document.activeElement;
56
+ e && (t === e || t instanceof Node && V.value?.contains(t)) && (z = !0);
57
+ });
58
+ });
59
+ }
60
+ let et = E("field"), V = E("menu"), tt = E("calendar"), nt = E("monthHeader"), rt = E("yearHeader"), it = E("toggleTime"), at = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map();
61
+ function st(e) {
62
+ if (!e) return null;
63
+ if (e instanceof HTMLElement) return e;
64
+ if (typeof e == "object" && "$el" in e) {
65
+ let t = e.$el;
66
+ return t instanceof HTMLElement ? t : null;
67
+ }
68
+ return null;
69
+ }
70
+ function ct(e, t) {
71
+ let n = st(e);
72
+ n ? at.set(t, n) : at.delete(t);
73
+ }
74
+ function lt(e, t) {
75
+ let n = st(e);
76
+ n ? ot.set(t, n) : ot.delete(t);
77
+ }
78
+ function ut(e) {
79
+ st(e)?.focus();
80
+ }
81
+ let H = f(() => ({
82
+ getMonthIndex: (e, t) => {
83
+ let n = e.toLowerCase();
84
+ return o.findIndex((e) => {
85
+ let r = a.texts[e] ?? e;
86
+ return (t ? r.substring(0, 3) : r).toLowerCase() === n;
87
+ });
88
+ },
89
+ getWeekdayIndex: (e, t) => {
90
+ let n = e.toLowerCase();
91
+ for (let e = 0; e < 7; e++) {
92
+ let r = s[(e + 6) % 7], i = a.texts[r] ?? r;
93
+ if ((t ? i.substring(0, 3) : i).toLowerCase() === n) return e;
94
+ }
95
+ return null;
96
+ }
97
+ })), U = f(() => {
98
+ let e = y.value;
99
+ return e ? e instanceof Date ? e : Array.isArray(e) && e.length > 0 ? e[0] : typeof e == "string" ? X(e) : null : null;
100
+ }), dt = f(() => {
101
+ let e = y.value;
102
+ return Array.isArray(e) && e.length > 1 ? e[1] : null;
103
+ }), W = w(null), ft = w(null), G = w(null), K = w(!1), pt = f(() => !K.value || !W.value ? U.value : G.value && G.value < W.value ? G.value : W.value), mt = f(() => {
104
+ if (!a.range) return U.value;
105
+ if (!K.value || !W.value) return dt.value;
106
+ let e = G.value ?? ft.value;
107
+ return e ? e < W.value ? W.value : e : null;
108
+ }), q = f(() => ({
109
+ getMonthName: (e, t) => {
110
+ let n = St(e);
111
+ return t ? n.substring(0, 3) : n;
112
+ },
113
+ getWeekdayName: (e, t) => {
114
+ let n = s[(e + 6) % 7], r = a.texts[n] ?? n;
115
+ return t ? r.substring(0, 3) : r;
116
+ }
117
+ })), ht = f(() => {
118
+ let e = y.value;
119
+ if (!e) return "";
120
+ if (Array.isArray(e)) return e.map((e) => e instanceof Date ? l(e, a.format, q.value) : e).join(" - ");
121
+ if (e instanceof Date) return l(e, a.format, q.value);
122
+ if (typeof e == "string") {
123
+ let t = X(e);
124
+ return t ? l(t, a.format, q.value) : String(e);
125
+ }
126
+ return String(e);
127
+ }), gt = f(() => P.value ?? ht.value);
128
+ function _t() {
129
+ N.value = gt.value;
130
+ }
131
+ Te(gt, () => {
132
+ qe.value || _t();
133
+ }, { immediate: !0 });
134
+ let vt = f(() => {
135
+ let e = ce(new Date(R.value, L.value, 1)), t = se(L.value, R.value), n = (e.getDay() + 6) % 7, r = [], i = L.value === 0 ? 11 : L.value - 1, a = L.value === 0 ? R.value - 1 : R.value, o = se(i, a);
136
+ for (let e = n - 1; e >= 0; e--) yt(r, new Date(a, i, o - e), !1);
137
+ for (let e = 1; e <= t; e++) yt(r, new Date(R.value, L.value, e), !0);
138
+ let s = 7 - r.length % 7, c = s === 7 ? 0 : s;
139
+ for (let e = 1; e <= c; e++) yt(r, new Date(R.value, L.value + 1, e), !1);
140
+ return r;
141
+ });
142
+ function yt(e, t, n) {
143
+ let r = pt.value, i = mt.value, a = t.getFullYear(), o = a < O || a > k;
144
+ e.push({
145
+ date: t,
146
+ isCurrentMonth: n,
147
+ isToday: de(t, /* @__PURE__ */ new Date()),
148
+ isSelected: r ? de(t, r) : !1,
149
+ isRangeStart: !!r && de(t, r),
150
+ isRangeEnd: !!i && de(t, i),
151
+ isInRange: r && i ? ue(t, r, i) : !1,
152
+ isDisabled: o
153
+ });
154
+ }
155
+ let bt = f(() => s.map((e) => {
156
+ let t = e;
157
+ return a.texts[t]?.substring(0, 2) ?? e;
158
+ })), xt = f(() => Array.from({ length: 12 }, (e, t) => St(t, 3)));
159
+ function St(e, t = 0) {
160
+ let n = o[e], r = a.texts[n] ?? o[e];
161
+ return t <= 0 ? r : r.substring(0, t);
162
+ }
163
+ function Ct(e) {
164
+ let t = e - Math.floor(Ve / 2), n = t + Ve;
165
+ return t < O && (t = O, n = Math.min(t + Ve, k)), n > k && (n = k, t = Math.max(O, n - Ve)), {
166
+ startYear: t,
167
+ endYear: n
168
+ };
169
+ }
170
+ function wt(e) {
171
+ let { startYear: t, endYear: n } = Ct(e);
172
+ return Array.from({ length: n - t + 1 }, (e, n) => t + n);
173
+ }
174
+ function Tt() {
175
+ Ot.value && (Ye.value -= Ve);
176
+ }
177
+ function Et() {
178
+ kt.value && (Ye.value += Ve);
179
+ }
180
+ let Dt = f(() => Ct(Ye.value)), Ot = f(() => Dt.value.startYear > O), kt = f(() => Dt.value.endYear < k), At = f(() => L.value === 0 ? R.value - 1 : R.value), jt = f(() => L.value === 11 ? R.value + 1 : R.value), Mt = f(() => At.value >= O), Nt = f(() => jt.value <= k), Pt = f(() => wt(Ye.value)), Ft = f(() => j.value ? a.icons.clock : a.icons.calendar), It = f(() => ie(a.format)), Lt = f(() => `${It.value} - ${It.value}`);
181
+ re(() => et?.value?.inputRef, () => a.range ? Lt.value : It.value), Te(() => et?.value?.inputRef, (e, t, n) => {
182
+ let r = qn(e);
183
+ B = r, r && (r.addEventListener("click", Wn), r.addEventListener("paste", Pn, !0), n(() => {
184
+ B = null, r.removeEventListener("click", Wn), r.removeEventListener("paste", Pn, !0);
185
+ }));
186
+ }, { flush: "post" }), Te(y, () => {
187
+ P.value = null, _t();
188
+ });
189
+ function Rt(e) {
190
+ return e === void 0 ? !1 : typeof e == "string" ? e.trim().length > 0 : e instanceof Date ? !0 : Array.isArray(e) ? e.length > 0 : !1;
191
+ }
192
+ let zt = f(() => a.clearable && !a.readonly && !a.disabled && Rt(y.value));
193
+ function Bt() {
194
+ zt.value && (Qt(), y.value = void 0, N.value = "", ar());
195
+ }
196
+ function Vt(e) {
197
+ !a.range || !K.value || !W.value || e.getFullYear() < O || e.getFullYear() > k || (G.value = new Date(e));
198
+ }
199
+ function Ht() {
200
+ G.value = null;
201
+ }
202
+ function Ut(e) {
203
+ let t = e.currentTarget, n = e.relatedTarget;
204
+ !t || n && t.contains(n) || Ht();
205
+ }
206
+ function Wt(e) {
207
+ if (!a.range || !K.value || !W.value) return;
208
+ let t = e.touches.item(0);
209
+ if (!t) return;
210
+ let n = document.elementFromPoint(t.clientX, t.clientY)?.closest("[data-day-index]");
211
+ if (!n) return;
212
+ let r = Number(n.dataset.dayIndex);
213
+ if (Number.isNaN(r)) return;
214
+ let i = vt.value[r];
215
+ i && Vt(i.date);
216
+ }
217
+ function Gt(e) {
218
+ if (!(a.readonly || a.disabled) && !(e.getFullYear() < O || e.getFullYear() > k)) if (a.range) if (K.value) {
219
+ let t = W.value ?? new Date(e), n = new Date(e), [r, i] = n < t ? [n, t] : [t, n];
220
+ We.value && i.setHours(23, 59, Ge.value ? 59 : 0, 0), y.value = [r, i], W.value = null, ft.value = null, G.value = null, K.value = !1;
221
+ } else {
222
+ let t = new Date(e);
223
+ We.value && W.value && t.setHours(W.value.getHours(), W.value.getMinutes(), W.value.getSeconds(), W.value.getMilliseconds()), W.value = t, ft.value = null, G.value = null, K.value = !0;
224
+ }
225
+ else {
226
+ let t = new Date(e);
227
+ U.value && !An(U.value) ? t.setHours(U.value.getHours(), U.value.getMinutes(), U.value.getSeconds()) : We.value && jn(t), y.value = t;
228
+ }
229
+ }
230
+ function Kt(e, t) {
231
+ R.value = e, t && er("year");
232
+ }
233
+ function J(e, t) {
234
+ L.value = e, t && er("month");
235
+ }
236
+ function qt() {
237
+ Mt.value && (L.value === 0 ? (J(11), Kt(R.value - 1)) : J(L.value - 1));
238
+ }
239
+ function Jt() {
240
+ Nt.value && (L.value === 11 ? (J(0), Kt(R.value + 1)) : J(L.value + 1));
241
+ }
242
+ function Yt() {
243
+ J((/* @__PURE__ */ new Date()).getMonth()), Kt((/* @__PURE__ */ new Date()).getFullYear()), $n();
244
+ }
245
+ function Xt() {
246
+ let e = U.value, t = y.value;
247
+ if (a.range && Array.isArray(t) && t.length > 0) {
248
+ let n = t[0];
249
+ n instanceof Date ? e = n : typeof n == "string" && (e = u(n, a.format, H.value));
250
+ }
251
+ e ??= /* @__PURE__ */ new Date(), J(e.getMonth()), Kt(e.getFullYear()), $n();
252
+ }
253
+ function Zt(e) {
254
+ return a.range ? e === 1 ? dt.value ?? ft.value : U.value ?? W.value : U.value;
255
+ }
256
+ function Qt() {
257
+ W.value = null, ft.value = null, G.value = null, K.value = !1;
258
+ }
259
+ function $t(e, t) {
260
+ return t < e ? [new Date(t), new Date(e)] : [new Date(e), new Date(t)];
261
+ }
262
+ function en() {
263
+ if (!a.range || !j.value) return;
264
+ let e = y.value;
265
+ if (!Array.isArray(e) || e.length < 2) return;
266
+ let t = e[0], n = e[1];
267
+ !(t instanceof Date) || !(n instanceof Date) || n >= t || (y.value = $t(t, n));
268
+ }
269
+ function tn(e, t) {
270
+ if (!a.range) {
271
+ y.value = t;
272
+ return;
273
+ }
274
+ if (j.value) {
275
+ e === 0 ? W.value = t : ft.value = t;
276
+ let n = e === 0 ? t : U.value ?? W.value, r = e === 1 ? t : dt.value;
277
+ if (!n || !r) return;
278
+ y.value = [new Date(n), new Date(r)], Qt();
279
+ return;
280
+ }
281
+ if (K.value) {
282
+ e === 0 && (W.value = t);
283
+ return;
284
+ }
285
+ let n = U.value, r = dt.value;
286
+ !n || !r || (y.value = e === 1 ? [n, t] : [t, r]);
287
+ }
288
+ function Y(e, t) {
289
+ let n = Zt(e) ?? (() => {
290
+ let e = /* @__PURE__ */ new Date();
291
+ return e.setHours(0, 0, 0, 0), e;
292
+ })(), r = new Date(n);
293
+ t(r), tn(e, r);
294
+ }
295
+ function nn(e) {
296
+ let t = Zt(e);
297
+ if (!t) return A.value ? 12 : 0;
298
+ let n = t.getHours();
299
+ return A.value ? n % 12 || 12 : n;
300
+ }
301
+ function rn(e) {
302
+ return Zt(e)?.getMinutes() ?? 0;
303
+ }
304
+ function an(e) {
305
+ return Zt(e)?.getSeconds() ?? 0;
306
+ }
307
+ function on(e) {
308
+ let t = Zt(e);
309
+ return t ? t.getHours() >= 12 : !1;
310
+ }
311
+ function sn(e, t) {
312
+ return t ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e;
313
+ }
314
+ function cn(e) {
315
+ Y(e, (e) => {
316
+ if (A.value) {
317
+ let t = e.getHours() % 12 || 12, n = t >= 12 ? 1 : t + 1, r = e.getHours() >= 12;
318
+ e.setHours(sn(n, r));
319
+ } else e.setHours(e.getHours() >= 23 ? 0 : e.getHours() + 1);
320
+ });
321
+ }
322
+ function ln(e) {
323
+ Y(e, (e) => {
324
+ if (A.value) {
325
+ let t = e.getHours() % 12 || 12, n = t <= 1 ? 12 : t - 1, r = e.getHours() >= 12;
326
+ e.setHours(sn(n, r));
327
+ } else e.setHours(e.getHours() <= 0 ? 23 : e.getHours() - 1);
328
+ });
329
+ }
330
+ function un(e) {
331
+ Y(e, (e) => {
332
+ e.setMinutes(e.getMinutes() >= 59 ? 0 : e.getMinutes() + 1);
333
+ });
334
+ }
335
+ function dn(e) {
336
+ Y(e, (e) => {
337
+ e.setMinutes(e.getMinutes() <= 0 ? 59 : e.getMinutes() - 1);
338
+ });
339
+ }
340
+ function fn(e) {
341
+ Y(e, (e) => {
342
+ e.setSeconds(e.getSeconds() >= 59 ? 0 : e.getSeconds() + 1);
343
+ });
344
+ }
345
+ function pn(e) {
346
+ Y(e, (e) => {
347
+ e.setSeconds(e.getSeconds() <= 0 ? 59 : e.getSeconds() - 1);
348
+ });
349
+ }
350
+ function mn(e) {
351
+ return (e ?? "").replace(/\D/g, "");
352
+ }
353
+ function hn(e) {
354
+ return Math.min(23, Math.max(0, e));
355
+ }
356
+ function gn(e) {
357
+ return Math.min(12, Math.max(1, e));
358
+ }
359
+ function _n(e) {
360
+ return Math.min(59, Math.max(0, e));
361
+ }
362
+ function vn(e, t) {
363
+ let n = mn(e).slice(0, 2);
364
+ if (n === "") return;
365
+ let r = Number.parseInt(n, 10);
366
+ if (Number.isNaN(r)) return;
367
+ let i = A.value ? gn(r) : hn(r);
368
+ Y(t, (e) => {
369
+ A.value ? e.setHours(sn(i, e.getHours() >= 12)) : e.setHours(i);
370
+ });
371
+ }
372
+ function yn(e, t) {
373
+ let n = mn(e).slice(0, 2);
374
+ if (n === "") return;
375
+ let r = Number.parseInt(n, 10);
376
+ if (Number.isNaN(r)) return;
377
+ let i = _n(r);
378
+ Y(t, (e) => {
379
+ e.setMinutes(i);
380
+ });
381
+ }
382
+ function bn(e, t) {
383
+ let n = mn(e).slice(0, 2);
384
+ if (n === "") return;
385
+ let r = Number.parseInt(n, 10);
386
+ if (Number.isNaN(r)) return;
387
+ let i = _n(r);
388
+ Y(t, (e) => {
389
+ e.setSeconds(i);
390
+ });
391
+ }
392
+ async function xn(e, t, n) {
393
+ if (e.ctrlKey || e.altKey || e.metaKey || !/^\d$/.test(e.key)) return;
394
+ let r = e.target;
395
+ if (!r) return;
396
+ let i = r.selectionStart, a = r.selectionEnd;
397
+ if (i === null || a === null || i !== a || r.maxLength <= 0 || r.value.length < r.maxLength || i >= r.value.length) return;
398
+ e.preventDefault();
399
+ let o = `${r.value.slice(0, i)}${e.key}${r.value.slice(i + 1)}`;
400
+ t === "hours" ? vn(o, n) : t === "minutes" ? yn(o, n) : bn(o, n);
401
+ let s = Math.min(i + 1, r.maxLength);
402
+ await x(), r.setSelectionRange(s, s);
403
+ }
404
+ function Sn(e, t) {
405
+ Y(t, (t) => {
406
+ let n = t.getHours() % 12 || 12;
407
+ t.setHours(sn(n, e));
408
+ });
409
+ }
410
+ async function Cn(e, t, n, r) {
411
+ if (!e) return;
412
+ let i = ne(t, n, r), a = () => e.setSelectionRange(i, i);
413
+ a(), await x(), a(), await new Promise((e) => {
414
+ requestAnimationFrame(() => {
415
+ a(), e();
416
+ });
417
+ });
418
+ }
419
+ async function wn(e, t, n, r) {
420
+ if (n === t) {
421
+ N.value !== n && (N.value = n);
422
+ return;
423
+ }
424
+ N.value = n, await Cn(e, t, n, r);
425
+ }
426
+ function X(e, t) {
427
+ let n = e.trim();
428
+ return n ? u(n, a.format, H.value) || he(n) || Kn(n) || (t?.complete ? me(n, a.format, H.value) : null) : null;
429
+ }
430
+ async function Tn(e) {
431
+ if (Je > 0) return;
432
+ if (a.readonly || a.disabled) {
433
+ _t();
434
+ return;
435
+ }
436
+ let t = Q(), n = t?.selectionStart ?? 0, r = e ?? "";
437
+ if (!r) {
438
+ y.value = void 0, P.value = null, N.value = "", F.value = !1;
439
+ return;
440
+ }
441
+ if (a.range) {
442
+ let e = En(r);
443
+ if (e) {
444
+ y.value = e, P.value = null, N.value = e.map((e) => l(e, a.format, q.value)).join(" - "), F.value = !1;
445
+ return;
446
+ }
447
+ let i = ee(r, Lt.value);
448
+ await wn(t, r, i, n), P.value = i;
449
+ let o = En(i);
450
+ if (o) {
451
+ y.value = o, P.value = null;
452
+ let e = o.map((e) => l(e, a.format, q.value)).join(" - ");
453
+ e !== i && (N.value = e, await Cn(t, i, e, n)), F.value = !1;
454
+ }
455
+ return;
456
+ }
457
+ let i = X(r);
458
+ if (i) {
459
+ let e = Z(i, r);
460
+ y.value = e, P.value = null, N.value = l(e, a.format, q.value), F.value = !1;
461
+ return;
462
+ }
463
+ let o = te(ee(r, It.value), a.format), s = o, c = u(o, a.format, H.value);
464
+ if (!c) {
465
+ let e = u(r, a.format, H.value);
466
+ e && (s = r, c = e);
467
+ }
468
+ if (!c) {
469
+ let e = On(a.format);
470
+ e && (c = u(o, e, H.value) ?? u(r, e, H.value));
471
+ }
472
+ if (await wn(t, r, s, n), P.value = s, c) {
473
+ let e = Z(c, r);
474
+ y.value = e, P.value = null;
475
+ let i = l(e, a.format, q.value);
476
+ i !== s && (N.value = i, await Cn(t, s, i, n)), F.value = !1;
477
+ }
478
+ }
479
+ function En(e, t) {
480
+ let n = e.split(" - ");
481
+ if (n.length !== 2) return null;
482
+ let r = (e) => X(e, t), i = r(n[0] ?? ""), a = r(n[1] ?? "");
483
+ return !i || !a ? null : a < i ? [a, i] : [i, a];
484
+ }
485
+ function Dn() {
486
+ if (a.readonly || a.disabled) return !1;
487
+ let e = P.value ?? N.value;
488
+ if (!e) return !1;
489
+ if (a.range) {
490
+ let t = En(ee(e, Lt.value), { complete: !0 });
491
+ return t ? (y.value = t, P.value = null, F.value = !1, N.value = t.map((e) => l(e, a.format, q.value)).join(" - "), !0) : (P.value = null, y.value = void 0, F.value = !0, N.value = "", !1);
492
+ }
493
+ let t = te(ee(e, It.value), a.format), n = X(e, { complete: !0 }) ?? me(t, a.format, H.value);
494
+ if (!n) return P.value = null, y.value = void 0, F.value = !0, N.value = "", !1;
495
+ let r = X(e) || le(t, a.format) ? n : Z(n, t);
496
+ return y.value = r, P.value = null, F.value = !1, N.value = l(r, a.format, q.value), !0;
497
+ }
498
+ function On(e) {
499
+ let t = e.replace(/[\sT]+(?:'[^']*'|HH|H|hh|h|mm|m|ss|s|SSS|S|a).*$/i, "").trim();
500
+ return t && t !== e ? t : null;
501
+ }
502
+ function kn(e) {
503
+ return !We.value || X(e) || le(e, a.format) ? !0 : /\dT\d|\d{1,2}:\d{2}/.test(e);
504
+ }
505
+ function An(e) {
506
+ return e.getHours() === 0 && e.getMinutes() === 0 && e.getSeconds() === 0 && e.getMilliseconds() === 0;
507
+ }
508
+ function jn(e) {
509
+ let t = /* @__PURE__ */ new Date();
510
+ e.setHours(t.getHours(), t.getMinutes(), Ge.value ? t.getSeconds() : 0, Ge.value ? t.getMilliseconds() : 0);
511
+ }
512
+ function Z(e, t) {
513
+ if (a.range || !We.value || t !== void 0 && kn(t)) return e;
514
+ let n = new Date(e);
515
+ return jn(n), n;
516
+ }
517
+ function Mn(e) {
518
+ if (a.range) return En(e);
519
+ let t = u(e, a.format, H.value);
520
+ if (t) return Z(t, e);
521
+ let n = he(e);
522
+ if (n) return Z(n, e);
523
+ let r = Kn(e);
524
+ if (r) return Z(r, e);
525
+ let i = me(e, a.format, H.value);
526
+ if (i) return Z(i, e);
527
+ let o = On(a.format);
528
+ if (o) {
529
+ let t = u(e, o, H.value);
530
+ if (t) return Z(t, e);
531
+ }
532
+ return null;
533
+ }
534
+ async function Nn(e) {
535
+ if (F.value = !1, P.value = null, Array.isArray(e)) {
536
+ let t = e.map((e) => l(e, a.format, q.value)).join(" - ");
537
+ Je += 1, y.value = e, N.value = t, await x(), --Je;
538
+ return;
539
+ }
540
+ let t = l(e, a.format, q.value);
541
+ Je += 1, y.value = e, N.value = t, await x(), --Je;
542
+ }
543
+ function Pn(e) {
544
+ if (a.readonly || a.disabled) {
545
+ e.preventDefault();
546
+ return;
547
+ }
548
+ let t = e.clipboardData?.getData("text/plain")?.trim() || e.clipboardData?.getData("text")?.trim() || "";
549
+ if (!t) {
550
+ e.preventDefault();
551
+ return;
552
+ }
553
+ let n = Mn(t);
554
+ if (!n) {
555
+ e.preventDefault();
556
+ return;
557
+ }
558
+ e.preventDefault(), Nn(n);
559
+ }
560
+ function Fn(e) {
561
+ let t = e.target;
562
+ if (!(t instanceof Element) || !V.value) return null;
563
+ let n = t.closest("button, input, select, textarea, a[href], [tabindex], [contenteditable]");
564
+ return n && V.value.contains(n) ? n : null;
565
+ }
566
+ function In(e) {
567
+ return !(e.matches(":disabled") || e.getAttribute("aria-disabled") === "true" || e.getAttribute("tabindex") === "-1");
568
+ }
569
+ function Ln(e) {
570
+ if (!(e.target instanceof Node) || !V.value?.contains(e.target)) return;
571
+ Ze = !0;
572
+ let t = Fn(e);
573
+ t && !In(t) && e.preventDefault();
574
+ }
575
+ function Rn() {
576
+ return V.value ? Array.from(V.value.querySelectorAll(He)).filter((e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0) : [];
577
+ }
578
+ function zn() {
579
+ let e = Q();
580
+ if (!e) return;
581
+ let t = Array.from(document.querySelectorAll(He)).filter((e) => e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0), n = t.indexOf(e);
582
+ n >= 0 && n < t.length - 1 && t[n + 1]?.focus();
583
+ }
584
+ function Bn(e) {
585
+ if (e.key !== "Tab" || !M.value || a.readonly || a.disabled) return;
586
+ if (e.shiftKey) {
587
+ z = !1, M.value = !1;
588
+ return;
589
+ }
590
+ let [t] = Rn();
591
+ t && (e.preventDefault(), Ze = !0, t.focus());
592
+ }
593
+ async function Vn(e) {
594
+ if (e.key !== "Tab") return;
595
+ let t = Rn();
596
+ if (!t.length) return;
597
+ let n = t[0], r = t[t.length - 1], i = document.activeElement;
598
+ if (e.shiftKey) {
599
+ if (i !== n) return;
600
+ e.preventDefault(), Ze = !0, ar();
601
+ return;
602
+ }
603
+ i === r && (e.preventDefault(), Qe = !0, M.value = !1, await x(), zn());
604
+ }
605
+ async function Hn(e) {
606
+ if (Dn(), Ze) {
607
+ Ze = !1;
608
+ return;
609
+ }
610
+ let t = e?.relatedTarget;
611
+ if (t instanceof Node && V.value?.contains(t)) return;
612
+ await x();
613
+ let n = Q(), r = document.activeElement;
614
+ n !== r && (r instanceof Node && V.value?.contains(r) || (z = !1, M.value = !1, qe.value = !1, _t()));
615
+ }
616
+ function Un() {
617
+ if (!(a.readonly || a.disabled)) {
618
+ if (qe.value = !0, z) {
619
+ z = !1;
620
+ return;
621
+ }
622
+ M.value ||= !0;
623
+ }
624
+ }
625
+ function Wn() {
626
+ a.readonly || a.disabled || (z = !1, M.value = !0);
627
+ }
628
+ function Gn(e) {
629
+ e || $e(), M.value = e;
630
+ }
631
+ function Kn(e) {
632
+ let t = he(e);
633
+ if (t) return t;
634
+ let n = /[A-Za-z]/.test(e), r = /^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(e);
635
+ if (!n && !r) return null;
636
+ let i = new Date(e);
637
+ return Number.isNaN(i.getTime()) ? null : i;
638
+ }
639
+ function qn(e) {
640
+ return e instanceof HTMLInputElement ? e : typeof e == "object" && e && "value" in e && e.value instanceof HTMLInputElement ? e.value : null;
641
+ }
642
+ function Q() {
643
+ if (B) return B;
644
+ let e = qn(et.value?.inputRef);
645
+ if (e) return B = e, e;
646
+ let t = st(et.value?.fieldRef)?.querySelector(".q-text-field__input") ?? null;
647
+ return t ? (B = t, t) : null;
648
+ }
649
+ function Jn(e) {
650
+ return e.isSelected || e.isRangeStart || e.isRangeEnd ? "bold" : e.isInRange ? "tonal" : "ghost";
651
+ }
652
+ function Yn(e) {
653
+ V.value?.style.setProperty("--q-date-view-height", `${Math.max(0, e)}px`);
654
+ }
655
+ async function Xn() {
656
+ if (!M.value || j.value) {
657
+ Yn(0);
658
+ return;
659
+ }
660
+ I.value === "date" && (await x(), Yn(tt.value?.getBoundingClientRect().height ?? 0));
661
+ }
662
+ function $() {
663
+ Xe?.disconnect(), Xe = null;
664
+ }
665
+ async function Zn() {
666
+ !M.value || j.value || I.value !== "date" || (await x(), tt.value && ($(), Xe = new MutationObserver(() => {
667
+ Xn();
668
+ }), Xe.observe(tt.value, {
669
+ childList: !0,
670
+ subtree: !0,
671
+ attributes: !0,
672
+ characterData: !0
673
+ }), Xn()));
674
+ }
675
+ function Qn() {
676
+ I.value = "time", $();
677
+ }
678
+ function $n() {
679
+ I.value = "date", Zn();
680
+ }
681
+ async function er(e) {
682
+ V.value?.focus(), $n(), await x(), ut(e === "year" ? rt.value : e === "month" ? nt.value : e === "time" ? it.value : null);
683
+ }
684
+ function tr() {
685
+ let e = I.value;
686
+ e !== "date" && er(e);
687
+ }
688
+ async function nr() {
689
+ $(), I.value = "month", await x();
690
+ let e = at.get(L.value);
691
+ e?.scrollIntoView({ block: "center" }), e?.focus();
692
+ }
693
+ async function rr() {
694
+ $(), Ye.value = R.value, I.value = "year", await x(), ot.get(Ye.value)?.scrollIntoView({ block: "center" });
695
+ }
696
+ async function ir(e) {
697
+ if (e.key !== "Escape") return;
698
+ if (z = !0, I.value === "date" || j.value) {
699
+ e.preventDefault(), M.value = !1, await x(), ur();
700
+ return;
701
+ }
702
+ e.preventDefault();
703
+ let t = I.value;
704
+ await er(t);
705
+ }
706
+ function ar() {
707
+ Q()?.focus();
708
+ }
709
+ function or(e) {
710
+ return !e || e === document.body || e === document.documentElement;
711
+ }
712
+ function sr(e, t) {
713
+ return e.closest(".q-date-time-picker__menu") || t.closest(".q-date-time-picker")?.contains(e) || !(e instanceof HTMLElement) ? !1 : e.tabIndex >= 0 || e.matches("input, select, textarea, button, a[href], [tabindex]:not([tabindex=\"-1\"])");
714
+ }
715
+ function cr(e) {
716
+ let t = Q();
717
+ return t ? e === t || !e || !e.isConnected || or(e) || V.value?.contains(e) ? !0 : !sr(e, t) : !1;
718
+ }
719
+ function lr() {
720
+ if (Qe) return;
721
+ let e = Q();
722
+ !e || !cr(document.activeElement) || (z = !0, e.focus());
723
+ }
724
+ function ur() {
725
+ x().then(() => {
726
+ requestAnimationFrame(() => {
727
+ requestAnimationFrame(() => {
728
+ lr();
729
+ });
730
+ });
731
+ });
732
+ }
733
+ function dr() {
734
+ if (Qe) {
735
+ Qe = !1;
736
+ return;
737
+ }
738
+ ur();
739
+ }
740
+ function fr() {
741
+ $e();
742
+ let e = Qe;
743
+ Qe &&= !1, e || (z = !0, ur());
744
+ }
745
+ return Te(y, () => {
746
+ U.value && (J(U.value.getMonth()), Kt(U.value.getFullYear()));
747
+ }), Te(M, (e, t) => {
748
+ if (j.value) {
749
+ $(), Yn(0), e ? (document.addEventListener("keydown", ir, { capture: !0 }), Qn()) : (t && (en(), fr()), document.removeEventListener("keydown", ir, { capture: !0 }));
750
+ return;
751
+ }
752
+ Qt(), e ? (document.addEventListener("keydown", ir, { capture: !0 }), Xt(), Zn()) : (t && fr(), document.removeEventListener("keydown", ir, { capture: !0 }), $(), Yn(0));
753
+ }), Te(j, (e) => {
754
+ e && $(), M.value = !1, e && Yn(0), e ? Qn() : $n();
755
+ }, { immediate: !0 }), be(() => {
756
+ $(), document.removeEventListener("keydown", ir, { capture: !0 });
757
+ }), (i, o) => (C(), h(d, null, [_(T(n), b({
758
+ id: a.id,
759
+ ref: "field",
760
+ "model-value": N.value,
761
+ class: ["q-date-time-picker", a.class],
762
+ clearable: zt.value,
763
+ "aria-label": a.label,
764
+ label: a.label,
765
+ "label-position": a.labelPosition,
766
+ readonly: a.readonly,
767
+ disabled: a.disabled,
768
+ placeholder: Ue.value,
769
+ required: a.required,
770
+ size: a.size,
771
+ invalid: a.invalid || F.value
772
+ }, i.$attrs, {
773
+ onBlur: Hn,
774
+ "onClick:clear": ar,
775
+ onFocusin: Un,
776
+ onKeydown: Bn,
777
+ "onUpdate:modelValue": Tn
778
+ }), _e({
779
+ prepend: D(() => [_(T(t), b({ class: "q-date-time-picker__input-icon" }, Ft.value), null, 16)]),
780
+ _: 2
781
+ }, [i.$slots.extras ? {
782
+ name: "extras",
783
+ fn: D(() => [Se(i.$slots, "extras")]),
784
+ key: "0"
785
+ } : void 0]), 1040, [
786
+ "id",
787
+ "model-value",
788
+ "class",
789
+ "clearable",
790
+ "aria-label",
791
+ "label",
792
+ "label-position",
793
+ "readonly",
794
+ "disabled",
795
+ "placeholder",
796
+ "required",
797
+ "size",
798
+ "invalid"
799
+ ]), !a.readonly && !a.disabled ? (C(), p(T(r), {
800
+ key: 0,
801
+ "model-value": M.value,
802
+ anchor: et.value?.fieldRef,
803
+ inline: a.inline,
804
+ offset: 8,
805
+ placement: "bottom",
806
+ trigger: "manual",
807
+ arrow: "",
808
+ "non-modal": "",
809
+ spy: "",
810
+ onLeave: dr,
811
+ "onUpdate:modelValue": Gn
812
+ }, {
813
+ default: D(() => [g("div", {
814
+ ref: "menu",
815
+ class: "q-date-time-picker__menu",
816
+ tabindex: "-1",
817
+ onPointerdownCapture: Ln,
818
+ onKeydown: Vn
819
+ }, [
820
+ m(" Calendar View "),
821
+ I.value === "date" ? (C(), h("div", Ee, [
822
+ m(" Header "),
823
+ g("div", De, [
824
+ _(T(e), {
825
+ variant: "ghost",
826
+ disabled: !Mt.value,
827
+ title: a.texts.previousMonth,
828
+ onClick: qt
829
+ }, {
830
+ default: D(() => [_(T(t), S(v(a.icons.back)), null, 16)]),
831
+ _: 1
832
+ }, 8, ["disabled", "title"]),
833
+ _(T(e), {
834
+ ref: "monthHeader",
835
+ "data-testid": "q-date-time-picker-month-header",
836
+ variant: "ghost",
837
+ label: St(L.value, 3),
838
+ title: a.texts.pickMonth,
839
+ onClick: nr
840
+ }, null, 8, ["label", "title"]),
841
+ _(T(e), {
842
+ ref: "yearHeader",
843
+ "data-testid": "q-date-time-picker-year-header",
844
+ variant: "ghost",
845
+ label: R.value.toString(),
846
+ title: a.texts.pickYear,
847
+ onClick: rr
848
+ }, null, 8, ["label", "title"]),
849
+ _(T(e), {
850
+ variant: "ghost",
851
+ disabled: !Nt.value,
852
+ title: a.texts.nextMonth,
853
+ onClick: Jt
854
+ }, {
855
+ default: D(() => [_(T(t), S(v(a.icons.forward)), null, 16)]),
856
+ _: 1
857
+ }, 8, ["disabled", "title"])
858
+ ]),
859
+ m(" Weekday Headers "),
860
+ g("div", Oe, [(C(!0), h(d, null, xe(bt.value, (e) => (C(), h("div", {
861
+ key: e,
862
+ class: "q-date-time-picker__weekday"
863
+ }, Ce(e), 1))), 128))]),
864
+ m(" Days Grid "),
865
+ g("div", {
866
+ class: "q-date-time-picker__days",
867
+ onMouseleave: Ht,
868
+ onFocusout: Ut,
869
+ onTouchstartPassive: Wt,
870
+ onTouchmovePassive: Wt
871
+ }, [(C(!0), h(d, null, xe(vt.value, (t, n) => (C(), p(T(e), {
872
+ key: n,
873
+ "data-day-index": n,
874
+ class: ye(["q-date-time-picker__day", {
875
+ "q-date-time-picker__day--other-month": !t.isCurrentMonth,
876
+ "q-date-time-picker__day--today": t.isToday,
877
+ "q-date-time-picker__day--selected": t.isSelected,
878
+ "q-date-time-picker__day--in-range": t.isInRange,
879
+ "q-date-time-picker__day--range-start": t.isRangeStart,
880
+ "q-date-time-picker__day--range-end": t.isRangeEnd
881
+ }]),
882
+ label: t.date.getDate().toString(),
883
+ variant: Jn(t),
884
+ disabled: t.isDisabled,
885
+ onMouseenter: () => Vt(t.date),
886
+ onFocus: () => Vt(t.date),
887
+ onClick: () => Gt(t.date)
888
+ }, null, 8, [
889
+ "data-day-index",
890
+ "class",
891
+ "label",
892
+ "variant",
893
+ "disabled",
894
+ "onMouseenter",
895
+ "onFocus",
896
+ "onClick"
897
+ ]))), 128))], 32)
898
+ ], 512)) : I.value === "time" ? (C(), h(d, { key: 1 }, [m(" Time View "), g("div", ke, [(C(!0), h(d, null, xe(a.range ? 2 : 1, (r) => (C(), h("div", {
899
+ key: r,
900
+ class: "q-date-time-picker__time-group"
901
+ }, [
902
+ A.value ? (C(), h("div", Ae, [_(T(c), {
903
+ "model-value": on(r - 1),
904
+ "show-state-labels": "",
905
+ size: "small",
906
+ "false-label": a.texts.am,
907
+ "true-label": a.texts.pm,
908
+ "onUpdate:modelValue": (e) => Sn(e ?? !1, r - 1)
909
+ }, null, 8, [
910
+ "model-value",
911
+ "false-label",
912
+ "true-label",
913
+ "onUpdate:modelValue"
914
+ ])])) : m("v-if", !0),
915
+ m(" Time Inputs "),
916
+ g("div", je, [
917
+ g("div", Me, [
918
+ _(T(e), {
919
+ variant: "ghost",
920
+ title: a.texts.increaseHour,
921
+ onClick: (e) => cn(r - 1)
922
+ }, {
923
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.up), null, 16)]),
924
+ _: 1
925
+ }, 8, ["title", "onClick"]),
926
+ _(T(n), {
927
+ class: "q-date-time-picker__time-number",
928
+ size: "small",
929
+ inputmode: "numeric",
930
+ "max-length": 2,
931
+ "model-value": T(pe)(nn(r - 1)),
932
+ onKeydown: (e) => xn(e, "hours", r - 1),
933
+ "onUpdate:modelValue": (e) => vn(e, r - 1)
934
+ }, null, 8, [
935
+ "model-value",
936
+ "onKeydown",
937
+ "onUpdate:modelValue"
938
+ ]),
939
+ _(T(e), {
940
+ variant: "ghost",
941
+ title: a.texts.decreaseHour,
942
+ onClick: (e) => ln(r - 1)
943
+ }, {
944
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.down), null, 16)]),
945
+ _: 1
946
+ }, 8, ["title", "onClick"])
947
+ ]),
948
+ o[1] ||= g("div", { class: "q-date-time-picker__time-separator" }, ":", -1),
949
+ g("div", Ne, [
950
+ _(T(e), {
951
+ variant: "ghost",
952
+ title: a.texts.increaseMinute,
953
+ onClick: (e) => un(r - 1)
954
+ }, {
955
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.up), null, 16)]),
956
+ _: 1
957
+ }, 8, ["title", "onClick"]),
958
+ _(T(n), {
959
+ class: "q-date-time-picker__time-number",
960
+ size: "small",
961
+ inputmode: "numeric",
962
+ "max-length": 2,
963
+ "model-value": T(pe)(rn(r - 1)),
964
+ onKeydown: (e) => xn(e, "minutes", r - 1),
965
+ "onUpdate:modelValue": (e) => yn(e, r - 1)
966
+ }, null, 8, [
967
+ "model-value",
968
+ "onKeydown",
969
+ "onUpdate:modelValue"
970
+ ]),
971
+ _(T(e), {
972
+ variant: "ghost",
973
+ title: a.texts.decreaseMinute,
974
+ onClick: (e) => dn(r - 1)
975
+ }, {
976
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.down), null, 16)]),
977
+ _: 1
978
+ }, 8, ["title", "onClick"])
979
+ ]),
980
+ Ge.value ? (C(), h(d, { key: 0 }, [o[0] ||= g("div", { class: "q-date-time-picker__time-separator" }, ":", -1), g("div", Pe, [
981
+ _(T(e), {
982
+ variant: "ghost",
983
+ title: a.texts.increaseSecond,
984
+ onClick: (e) => fn(r - 1)
985
+ }, {
986
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.up), null, 16)]),
987
+ _: 1
988
+ }, 8, ["title", "onClick"]),
989
+ _(T(n), {
990
+ class: "q-date-time-picker__time-number",
991
+ size: "small",
992
+ inputmode: "numeric",
993
+ "max-length": 2,
994
+ "model-value": T(pe)(an(r - 1)),
995
+ onKeydown: (e) => xn(e, "seconds", r - 1),
996
+ "onUpdate:modelValue": (e) => bn(e, r - 1)
997
+ }, null, 8, [
998
+ "model-value",
999
+ "onKeydown",
1000
+ "onUpdate:modelValue"
1001
+ ]),
1002
+ _(T(e), {
1003
+ variant: "ghost",
1004
+ title: a.texts.decreaseSecond,
1005
+ onClick: (e) => pn(r - 1)
1006
+ }, {
1007
+ default: D(() => [_(T(t), b({ ref_for: !0 }, a.icons.down), null, 16)]),
1008
+ _: 1
1009
+ }, 8, ["title", "onClick"])
1010
+ ])], 64)) : m("v-if", !0)
1011
+ ])
1012
+ ]))), 128))])], 2112)) : I.value === "month" ? (C(), h(d, { key: 2 }, [m(" Month View "), g("div", Fe, [(C(!0), h(d, null, xe(xt.value, (t, n) => (C(), p(T(e), {
1013
+ key: n,
1014
+ ref_for: !0,
1015
+ ref: (e) => ct(e, n),
1016
+ "data-testid": "q-date-time-picker-month-option",
1017
+ "data-month-index": n,
1018
+ disabled: L.value === n,
1019
+ label: t,
1020
+ title: St(n),
1021
+ variant: "ghost",
1022
+ onClick: () => J(n, !0)
1023
+ }, null, 8, [
1024
+ "data-month-index",
1025
+ "disabled",
1026
+ "label",
1027
+ "title",
1028
+ "onClick"
1029
+ ]))), 128))])], 2112)) : I.value === "year" ? (C(), h(d, { key: 3 }, [m(" Year View "), g("div", Ie, [g("div", Le, [
1030
+ _(T(e), {
1031
+ variant: "ghost",
1032
+ disabled: !Ot.value,
1033
+ title: a.texts.previousYears,
1034
+ onClick: Tt
1035
+ }, {
1036
+ default: D(() => [_(T(t), S(v(a.icons.back)), null, 16)]),
1037
+ _: 1
1038
+ }, 8, ["disabled", "title"]),
1039
+ g("div", Re, Ce(Dt.value.startYear) + " - " + Ce(Dt.value.endYear), 1),
1040
+ _(T(e), {
1041
+ variant: "ghost",
1042
+ disabled: !kt.value,
1043
+ title: a.texts.nextYears,
1044
+ onClick: Et
1045
+ }, {
1046
+ default: D(() => [_(T(t), S(v(a.icons.forward)), null, 16)]),
1047
+ _: 1
1048
+ }, 8, ["disabled", "title"])
1049
+ ]), g("div", ze, [(C(!0), h(d, null, xe(Pt.value, (t, n) => (C(), p(T(e), {
1050
+ key: n,
1051
+ ref_for: !0,
1052
+ ref: (e) => lt(e, t),
1053
+ "data-testid": "q-date-time-picker-year-option",
1054
+ "data-year": t,
1055
+ disabled: R.value === t,
1056
+ label: t.toString(),
1057
+ title: t,
1058
+ variant: "ghost",
1059
+ onClick: () => Kt(t, !0)
1060
+ }, null, 8, [
1061
+ "data-year",
1062
+ "disabled",
1063
+ "label",
1064
+ "title",
1065
+ "onClick"
1066
+ ]))), 128))])])], 2112)) : m("v-if", !0),
1067
+ g("div", Be, [
1068
+ j.value ? m("v-if", !0) : (C(), p(T(e), {
1069
+ key: 0,
1070
+ variant: "ghost",
1071
+ disabled: Ke.value,
1072
+ title: a.texts.today,
1073
+ onClick: Yt
1074
+ }, {
1075
+ default: D(() => [_(T(t), S(v(a.icons.today)), null, 16)]),
1076
+ _: 1
1077
+ }, 8, ["disabled", "title"])),
1078
+ We.value && I.value === "date" ? (C(), p(T(e), {
1079
+ key: 1,
1080
+ ref: "toggleTime",
1081
+ "data-testid": "q-date-time-picker-toggle-time",
1082
+ variant: "ghost",
1083
+ title: a.texts.toggleMode,
1084
+ onClick: Qn
1085
+ }, {
1086
+ default: D(() => [_(T(t), S(v(a.icons.clock)), null, 16)]),
1087
+ _: 1
1088
+ }, 8, ["title"])) : I.value !== "date" && !j.value ? (C(), p(T(e), {
1089
+ key: 2,
1090
+ "data-testid": "q-date-time-picker-toggle-date",
1091
+ variant: "ghost",
1092
+ title: a.texts.toggleMode,
1093
+ onClick: tr
1094
+ }, {
1095
+ default: D(() => [_(T(t), S(v(a.icons.calendar)), null, 16)]),
1096
+ _: 1
1097
+ }, 8, ["title"])) : m("v-if", !0),
1098
+ a.clearable ? (C(), p(T(e), {
1099
+ key: 3,
1100
+ "data-testid": "q-date-time-picker-clear",
1101
+ variant: "ghost",
1102
+ disabled: !zt.value,
1103
+ title: a.texts.clearValue,
1104
+ onClick: Bt
1105
+ }, {
1106
+ default: D(() => [_(T(t), S(v(a.icons.delete)), null, 16)]),
1107
+ _: 1
1108
+ }, 8, ["disabled", "title"])) : m("v-if", !0)
1109
+ ])
1110
+ ], 544)]),
1111
+ _: 1
1112
+ }, 8, [
1113
+ "model-value",
1114
+ "anchor",
1115
+ "inline"
1116
+ ])) : m("v-if", !0)], 64));
1117
+ }
1364
1118
  });
1365
- export {
1366
- xa as default
1367
- };
1119
+ //#endregion
1120
+ export { Ue as default };