@fewangsit/wangsvue 1.5.219-alpha.0 → 1.5.219-alpha.2

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 (598) hide show
  1. package/animation/index.es.js +54 -37
  2. package/assets/lottiejs/loading-page.es.js +14 -9
  3. package/assets/lottiejs/loading-plane.es.js +2 -2
  4. package/assets/lottiejs/loading-table.es.js +14 -9
  5. package/assets/lottiejs/no-data.es.js +14 -9
  6. package/backgroundimagecropper/index.es.js +61 -37
  7. package/badge/index.es.js +77 -67
  8. package/badgegroup/index.es.js +62 -50
  9. package/basecalendar/index.es.js +1258 -735
  10. package/basetree/index.es.js +213 -113
  11. package/breadcrumb/index.es.js +46 -38
  12. package/button/index.es.js +60 -54
  13. package/buttonbulkaction/index.es.js +168 -117
  14. package/buttoncopy/index.es.js +25 -22
  15. package/buttondownload/index.es.js +125 -76
  16. package/buttonfilter/index.es.js +21 -15
  17. package/buttonradio/index.es.js +91 -67
  18. package/buttonsearch/index.es.js +62 -46
  19. package/buttonselecttree/index.es.js +233 -172
  20. package/buttontoggle/index.es.js +8 -6
  21. package/calendar/index.es.js +113 -58
  22. package/card/index.es.js +44 -42
  23. package/checkbox/index.es.js +105 -74
  24. package/codesnippet/index.es.js +91 -71
  25. package/codesnippetadapter/index.es.js +25 -21
  26. package/columnlist/index.es.js +249 -171
  27. package/components.d.ts +0 -21
  28. package/config/defaultProps.es.js +9 -9
  29. package/config/index.es.js +11 -10
  30. package/config/locale.es.js +2 -2
  31. package/customcolumn/index.es.js +95 -78
  32. package/datatable/index.es.js +1071 -732
  33. package/dialog/index.es.js +54 -54
  34. package/dialogconfirm/index.es.js +90 -75
  35. package/dialogform/index.es.js +170 -133
  36. package/dialogselecttree/index.es.js +242 -194
  37. package/directives/focus.es.js +13 -8
  38. package/dropdown/index.es.js +250 -196
  39. package/editor/index.es.js +694 -498
  40. package/editorbutton/index.es.js +21 -19
  41. package/event-bus/index.es.js +3 -3
  42. package/event-bus/mitt.es.js +37 -20
  43. package/fieldwrapper/index.es.js +30 -25
  44. package/fileupload/index.es.js +230 -140
  45. package/filtercontainer/index.es.js +299 -222
  46. package/form/index.es.js +176 -126
  47. package/gallerypreview/index.es.js +138 -101
  48. package/icon/index.es.js +38 -36
  49. package/image/index.es.js +161 -108
  50. package/imagecompressor/index.es.js +616 -449
  51. package/imageinputinfo/index.es.js +26 -22
  52. package/inlinemessage/index.es.js +77 -65
  53. package/inputbadge/index.es.js +230 -156
  54. package/inputcurrency/index.es.js +146 -109
  55. package/inputemail/index.es.js +18 -16
  56. package/inputgroup/index.es.js +19 -16
  57. package/inputnumber/index.es.js +252 -182
  58. package/inputpassword/index.es.js +120 -94
  59. package/inputphonenumber/index.es.js +1017 -550
  60. package/inputrangenumber/index.es.js +129 -98
  61. package/inputtext/index.es.js +264 -189
  62. package/inputurl/index.es.js +31 -29
  63. package/invisiblefield/index.es.js +24 -16
  64. package/litedropdown/index.es.js +87 -81
  65. package/loading/index.es.js +21 -19
  66. package/loading-page-BXZ4fLOS.js +8 -0
  67. package/loading-page-BuLpsb_1.js +8 -0
  68. package/loading-page-CNqVBg__.js +4 -0
  69. package/loading-page-DbhhZih2.js +4 -0
  70. package/loading-page-DjfWXoOy.js +8 -0
  71. package/loading-page-S-KRY5zm.js +4 -0
  72. package/loading-plane-C1mi7Whv.js +4 -0
  73. package/loading-plane-CWq1hz_l.js +8 -0
  74. package/loading-table-B7LAXzAp.js +4 -0
  75. package/loading-table-BLmgKUsR.js +4 -0
  76. package/loading-table-CG7-cuhv.js +8 -0
  77. package/loading-table-CUPS49ta.js +4 -0
  78. package/loading-table-CuWWrTbv.js +8 -0
  79. package/loading-table-DbBzVwaZ.js +8 -0
  80. package/mentionlist/index.es.js +77 -44
  81. package/mentionsection/index.es.js +53 -43
  82. package/menu/index.es.js +65 -51
  83. package/menuitem/index.es.js +39 -37
  84. package/multirow/index.es.js +29 -28
  85. package/multiselect/index.es.js +184 -152
  86. package/no-data-B781skt3.js +4 -0
  87. package/no-data-CAksOnDl.js +4 -0
  88. package/no-data-DCsjBXQR.js +4 -0
  89. package/no-data-Dz0QOe7Q.js +8 -0
  90. package/no-data-_Huxiv9q.js +8 -0
  91. package/no-data-ybRQontJ.js +8 -0
  92. package/overlaypanel/index.es.js +49 -36
  93. package/package.json +1 -1
  94. package/paginator/index.es.js +36 -33
  95. package/plugins/WangsVue.es.js +63 -45
  96. package/plugins/formValidation.es.js +15 -11
  97. package/progressbar/index.es.js +39 -32
  98. package/quickfilter/index.es.js +94 -81
  99. package/stats.html +1 -1
  100. package/style.css +2 -2
  101. package/tabmenu/index.es.js +18 -16
  102. package/textarea/index.es.js +94 -72
  103. package/timeline/index.es.js +124 -102
  104. package/timelinecontentbytype/index.es.js +114 -92
  105. package/toast/index.es.js +67 -54
  106. package/toggleswitch/index.es.js +83 -66
  107. package/tree/index.es.js +306 -198
  108. package/treenode/index.es.js +464 -339
  109. package/treesearchinput/index.es.js +32 -26
  110. package/usergroup/index.es.js +83 -67
  111. package/username/index.es.js +99 -85
  112. package/utils/addAttachment.util.es.js +47 -21
  113. package/utils/baseToast.util.es.js +41 -33
  114. package/utils/convertJsonImage.util.es.js +24 -24
  115. package/utils/date.util.es.js +131 -106
  116. package/utils/exportToExcel.util.es.js +81 -47
  117. package/utils/filterOptions.util.es.js +8 -2
  118. package/utils/genPlaceholder.util.es.js +30 -16
  119. package/utils/getProjectPermission.util.es.js +15 -12
  120. package/utils/getSalesRole.util.es.js +4 -4
  121. package/utils/getUser.util.es.js +2 -2
  122. package/utils/getUserType.util.es.js +13 -8
  123. package/utils/isIntersect.es.js +4 -2
  124. package/utils/mergePropsWithDefaults.util.es.js +7 -6
  125. package/utils/object.util.es.js +88 -54
  126. package/utils/queryParamsStringfy.util.es.js +19 -11
  127. package/utils/role.util.es.js +5 -4
  128. package/utils/statusSeverity.util.es.js +20 -5
  129. package/utils/textFormatter.util.es.js +28 -50
  130. package/utils/toast.util.es.js +8 -5
  131. package/utils/xlsx.util.es.js +12 -6
  132. package/validatormessage/index.es.js +9 -9
  133. package/vendor/@popperjs/core/lib/createPopper.es.js +110 -83
  134. package/vendor/@popperjs/core/lib/dom-utils/contains.es.js +14 -13
  135. package/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.es.js +33 -18
  136. package/vendor/@popperjs/core/lib/dom-utils/getClippingRect.es.js +55 -31
  137. package/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.es.js +43 -22
  138. package/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.es.js +4 -4
  139. package/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.es.js +5 -5
  140. package/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.es.js +23 -13
  141. package/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.es.js +4 -4
  142. package/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.es.js +17 -9
  143. package/vendor/@popperjs/core/lib/dom-utils/getNodeName.es.js +3 -3
  144. package/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.es.js +11 -7
  145. package/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.es.js +42 -26
  146. package/vendor/@popperjs/core/lib/dom-utils/getParentNode.es.js +13 -10
  147. package/vendor/@popperjs/core/lib/dom-utils/getScrollParent.es.js +13 -7
  148. package/vendor/@popperjs/core/lib/dom-utils/getViewportRect.es.js +25 -15
  149. package/vendor/@popperjs/core/lib/dom-utils/getWindow.es.js +8 -7
  150. package/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.es.js +8 -6
  151. package/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.es.js +6 -6
  152. package/vendor/@popperjs/core/lib/dom-utils/instanceOf.es.js +16 -15
  153. package/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.es.js +4 -4
  154. package/vendor/@popperjs/core/lib/dom-utils/isScrollParent.es.js +5 -5
  155. package/vendor/@popperjs/core/lib/dom-utils/isTableElement.es.js +4 -4
  156. package/vendor/@popperjs/core/lib/dom-utils/listScrollParents.es.js +17 -11
  157. package/vendor/@popperjs/core/lib/enums.es.js +43 -20
  158. package/vendor/@popperjs/core/lib/modifiers/applyStyles.es.js +49 -25
  159. package/vendor/@popperjs/core/lib/modifiers/arrow.es.js +61 -26
  160. package/vendor/@popperjs/core/lib/modifiers/computeStyles.es.js +101 -69
  161. package/vendor/@popperjs/core/lib/modifiers/eventListeners.es.js +30 -16
  162. package/vendor/@popperjs/core/lib/modifiers/flip.es.js +99 -60
  163. package/vendor/@popperjs/core/lib/modifiers/hide.es.js +44 -31
  164. package/vendor/@popperjs/core/lib/modifiers/offset.es.js +32 -20
  165. package/vendor/@popperjs/core/lib/modifiers/popperOffsets.es.js +11 -11
  166. package/vendor/@popperjs/core/lib/modifiers/preventOverflow.es.js +91 -40
  167. package/vendor/@popperjs/core/lib/popper.es.js +14 -13
  168. package/vendor/@popperjs/core/lib/utils/computeAutoPlacement.es.js +29 -21
  169. package/vendor/@popperjs/core/lib/utils/computeOffsets.es.js +41 -36
  170. package/vendor/@popperjs/core/lib/utils/debounce.es.js +11 -7
  171. package/vendor/@popperjs/core/lib/utils/detectOverflow.es.js +42 -28
  172. package/vendor/@popperjs/core/lib/utils/expandToHashMap.es.js +5 -4
  173. package/vendor/@popperjs/core/lib/utils/getAltAxis.es.js +3 -3
  174. package/vendor/@popperjs/core/lib/utils/getBasePlacement.es.js +3 -3
  175. package/vendor/@popperjs/core/lib/utils/getFreshSideObject.es.js +2 -2
  176. package/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.es.js +3 -3
  177. package/vendor/@popperjs/core/lib/utils/getOppositePlacement.es.js +5 -5
  178. package/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.es.js +5 -5
  179. package/vendor/@popperjs/core/lib/utils/getVariation.es.js +3 -3
  180. package/vendor/@popperjs/core/lib/utils/math.es.js +6 -4
  181. package/vendor/@popperjs/core/lib/utils/mergeByName.es.js +11 -10
  182. package/vendor/@popperjs/core/lib/utils/mergePaddingObject.es.js +4 -4
  183. package/vendor/@popperjs/core/lib/utils/orderModifiers.es.js +30 -22
  184. package/vendor/@popperjs/core/lib/utils/rectToClientRect.es.js +7 -7
  185. package/vendor/@popperjs/core/lib/utils/userAgent.es.js +9 -6
  186. package/vendor/@popperjs/core/lib/utils/within.es.js +8 -8
  187. package/vendor/@tiptap/core/dist/index.es.js +3494 -2000
  188. package/vendor/@tiptap/extension-bold/dist/index.es.js +29 -19
  189. package/vendor/@tiptap/extension-bubble-menu/dist/index.es.js +145 -71
  190. package/vendor/@tiptap/extension-bullet-list/dist/index.es.js +32 -19
  191. package/vendor/@tiptap/extension-code/dist/index.es.js +22 -14
  192. package/vendor/@tiptap/extension-document/dist/index.es.js +4 -4
  193. package/vendor/@tiptap/extension-floating-menu/dist/index.es.js +106 -51
  194. package/vendor/@tiptap/extension-heading/dist/index.es.js +38 -22
  195. package/vendor/@tiptap/extension-history/dist/index.es.js +11 -7
  196. package/vendor/@tiptap/extension-image/dist/index.es.js +20 -17
  197. package/vendor/@tiptap/extension-italic/dist/index.es.js +28 -18
  198. package/vendor/@tiptap/extension-link/dist/index.es.js +236 -147
  199. package/vendor/@tiptap/extension-list-item/dist/index.es.js +6 -6
  200. package/vendor/@tiptap/extension-mention/dist/index.es.js +98 -63
  201. package/vendor/@tiptap/extension-ordered-list/dist/index.es.js +38 -25
  202. package/vendor/@tiptap/extension-paragraph/dist/index.es.js +8 -6
  203. package/vendor/@tiptap/extension-placeholder/dist/index.es.js +34 -27
  204. package/vendor/@tiptap/extension-text/dist/index.es.js +3 -3
  205. package/vendor/@tiptap/extension-underline/dist/index.es.js +16 -10
  206. package/vendor/@tiptap/suggestion/dist/index.es.js +174 -90
  207. package/vendor/@tiptap/vue-3/dist/index.es.js +287 -188
  208. package/vendor/@wangs-ui/core/components/p-BU8h34na.es.js +17 -14
  209. package/vendor/@wangs-ui/core/components/p-C5lMEBcj.es.js +69 -55
  210. package/vendor/@wangs-ui/core/components/p-CKYwZoTo.es.js +26 -22
  211. package/vendor/@wangs-ui/core/components/p-CsoK-EWG.es.js +147 -102
  212. package/vendor/@wangs-ui/core/components/p-DPHEi31J.es.js +102 -77
  213. package/vendor/@wangs-ui/core/components/p-DTTCzifR.es.js +1298 -551
  214. package/vendor/@wangs-ui/core/components/p-Duri5p90.es.js +60 -49
  215. package/vendor/@wangs-ui/core/components/wangs-button.es.js +19 -15
  216. package/vendor/@wangs-ui/core/components/wangs-icon.es.js +3 -3
  217. package/vendor/@wangs-ui/core/components/wangs-input-otp.es.js +3 -3
  218. package/vendor/@wangs-ui/core/components/wangs-tab-menu.es.js +3 -3
  219. package/vendor/@wangs-ui/core/dist/esm/index-DCkh3cGv.es.js +116 -102
  220. package/vendor/@wangs-ui/vue/dist/index.es.js +77 -77
  221. package/vendor/base64toblob/base64toblob.es.js +31 -15
  222. package/vendor/highlight.js/es/core.es.js +5 -5
  223. package/vendor/highlight.js/es/languages/javascript.es.js +237 -193
  224. package/vendor/highlight.js/es/languages/json.es.js +18 -15
  225. package/vendor/highlight.js/es/languages/typescript.es.js +288 -228
  226. package/vendor/highlight.js/es/languages/vbscript-html.es.js +2 -2
  227. package/vendor/highlight.js/lib/core.es.js +1144 -666
  228. package/vendor/linkifyjs/dist/linkify.es.es.js +858 -405
  229. package/vendor/lodash/_Symbol.es.js +11 -8
  230. package/vendor/lodash/_baseGetTag.es.js +19 -12
  231. package/vendor/lodash/_baseTrim.es.js +13 -10
  232. package/vendor/lodash/_freeGlobal.es.js +10 -8
  233. package/vendor/lodash/_getRawTag.es.js +28 -15
  234. package/vendor/lodash/_objectToString.es.js +12 -9
  235. package/vendor/lodash/_root.es.js +12 -8
  236. package/vendor/lodash/_trimmedEndIndex.es.js +14 -11
  237. package/vendor/lodash/debounce.es.js +92 -54
  238. package/vendor/lodash/isObject.es.js +11 -9
  239. package/vendor/lodash/isObjectLike.es.js +10 -8
  240. package/vendor/lodash/isSymbol.es.js +14 -11
  241. package/vendor/lodash/now.es.js +12 -9
  242. package/vendor/lodash/throttle.es.js +25 -17
  243. package/vendor/lodash/toNumber.es.js +33 -23
  244. package/vendor/lodash-es/_DataView.es.js +4 -4
  245. package/vendor/lodash-es/_Hash.es.js +17 -16
  246. package/vendor/lodash-es/_ListCache.es.js +17 -16
  247. package/vendor/lodash-es/_Map.es.js +4 -4
  248. package/vendor/lodash-es/_MapCache.es.js +17 -16
  249. package/vendor/lodash-es/_Promise.es.js +4 -4
  250. package/vendor/lodash-es/_Set.es.js +4 -4
  251. package/vendor/lodash-es/_SetCache.es.js +12 -10
  252. package/vendor/lodash-es/_Stack.es.js +15 -15
  253. package/vendor/lodash-es/_Symbol.es.js +3 -3
  254. package/vendor/lodash-es/_Uint8Array.es.js +3 -3
  255. package/vendor/lodash-es/_WeakMap.es.js +4 -4
  256. package/vendor/lodash-es/_arrayEach.es.js +9 -5
  257. package/vendor/lodash-es/_arrayFilter.es.js +9 -6
  258. package/vendor/lodash-es/_arrayLikeKeys.es.js +21 -17
  259. package/vendor/lodash-es/_arrayPush.es.js +7 -5
  260. package/vendor/lodash-es/_arraySome.es.js +9 -6
  261. package/vendor/lodash-es/_assignValue.es.js +10 -7
  262. package/vendor/lodash-es/_assocIndexOf.es.js +9 -6
  263. package/vendor/lodash-es/_baseAssignValue.es.js +13 -9
  264. package/vendor/lodash-es/_baseClone.es.js +67 -49
  265. package/vendor/lodash-es/_baseCreate.es.js +15 -11
  266. package/vendor/lodash-es/_baseGetAllKeys.es.js +6 -6
  267. package/vendor/lodash-es/_baseGetTag.es.js +11 -7
  268. package/vendor/lodash-es/_baseIsArguments.es.js +6 -6
  269. package/vendor/lodash-es/_baseIsEqual.es.js +11 -5
  270. package/vendor/lodash-es/_baseIsEqualDeep.es.js +39 -26
  271. package/vendor/lodash-es/_baseIsMap.es.js +6 -6
  272. package/vendor/lodash-es/_baseIsNative.es.js +18 -12
  273. package/vendor/lodash-es/_baseIsSet.es.js +6 -6
  274. package/vendor/lodash-es/_baseIsTypedArray.es.js +11 -9
  275. package/vendor/lodash-es/_baseKeys.es.js +16 -11
  276. package/vendor/lodash-es/_baseTimes.es.js +7 -5
  277. package/vendor/lodash-es/_baseTrim.es.js +5 -5
  278. package/vendor/lodash-es/_baseUnary.es.js +4 -4
  279. package/vendor/lodash-es/_cacheHas.es.js +3 -3
  280. package/vendor/lodash-es/_cloneArrayBuffer.es.js +6 -5
  281. package/vendor/lodash-es/_cloneBuffer.es.js +11 -6
  282. package/vendor/lodash-es/_cloneDataView.es.js +5 -5
  283. package/vendor/lodash-es/_cloneRegExp.es.js +6 -5
  284. package/vendor/lodash-es/_cloneSymbol.es.js +5 -5
  285. package/vendor/lodash-es/_cloneTypedArray.es.js +5 -5
  286. package/vendor/lodash-es/_coreJsData.es.js +3 -3
  287. package/vendor/lodash-es/_defineProperty.es.js +7 -6
  288. package/vendor/lodash-es/_equalArrays.es.js +38 -28
  289. package/vendor/lodash-es/_equalByTag.es.js +55 -41
  290. package/vendor/lodash-es/_equalObjects.es.js +42 -28
  291. package/vendor/lodash-es/_freeGlobal.es.js +2 -2
  292. package/vendor/lodash-es/_getAllKeys.es.js +6 -6
  293. package/vendor/lodash-es/_getMapData.es.js +5 -5
  294. package/vendor/lodash-es/_getNative.es.js +6 -6
  295. package/vendor/lodash-es/_getPrototype.es.js +3 -3
  296. package/vendor/lodash-es/_getRawTag.es.js +20 -10
  297. package/vendor/lodash-es/_getSymbols.es.js +15 -8
  298. package/vendor/lodash-es/_getTag.es.js +31 -25
  299. package/vendor/lodash-es/_getValue.es.js +3 -3
  300. package/vendor/lodash-es/_hashClear.es.js +5 -4
  301. package/vendor/lodash-es/_hashDelete.es.js +5 -4
  302. package/vendor/lodash-es/_hashGet.es.js +11 -9
  303. package/vendor/lodash-es/_hashHas.es.js +7 -6
  304. package/vendor/lodash-es/_hashSet.es.js +8 -6
  305. package/vendor/lodash-es/_initCloneArray.es.js +10 -5
  306. package/vendor/lodash-es/_initCloneByTag.es.js +39 -38
  307. package/vendor/lodash-es/_initCloneObject.es.js +6 -6
  308. package/vendor/lodash-es/_isIndex.es.js +7 -5
  309. package/vendor/lodash-es/_isKeyable.es.js +4 -4
  310. package/vendor/lodash-es/_isMasked.es.js +7 -7
  311. package/vendor/lodash-es/_isPrototype.es.js +5 -5
  312. package/vendor/lodash-es/_listCacheClear.es.js +4 -3
  313. package/vendor/lodash-es/_listCacheDelete.es.js +17 -9
  314. package/vendor/lodash-es/_listCacheGet.es.js +5 -5
  315. package/vendor/lodash-es/_listCacheHas.es.js +4 -4
  316. package/vendor/lodash-es/_listCacheSet.es.js +11 -5
  317. package/vendor/lodash-es/_mapCacheClear.es.js +10 -9
  318. package/vendor/lodash-es/_mapCacheDelete.es.js +6 -5
  319. package/vendor/lodash-es/_mapCacheGet.es.js +4 -4
  320. package/vendor/lodash-es/_mapCacheHas.es.js +4 -4
  321. package/vendor/lodash-es/_mapCacheSet.es.js +7 -5
  322. package/vendor/lodash-es/_mapToArray.es.js +7 -6
  323. package/vendor/lodash-es/_nativeCreate.es.js +3 -3
  324. package/vendor/lodash-es/_nativeKeys.es.js +3 -3
  325. package/vendor/lodash-es/_nodeUtil.es.js +13 -6
  326. package/vendor/lodash-es/_objectToString.es.js +5 -4
  327. package/vendor/lodash-es/_overArg.es.js +4 -4
  328. package/vendor/lodash-es/_root.es.js +4 -3
  329. package/vendor/lodash-es/_setCacheAdd.es.js +5 -4
  330. package/vendor/lodash-es/_setCacheHas.es.js +3 -3
  331. package/vendor/lodash-es/_setToArray.es.js +7 -6
  332. package/vendor/lodash-es/_stackClear.es.js +5 -4
  333. package/vendor/lodash-es/_stackDelete.es.js +5 -4
  334. package/vendor/lodash-es/_stackGet.es.js +3 -3
  335. package/vendor/lodash-es/_stackHas.es.js +3 -3
  336. package/vendor/lodash-es/_stackSet.es.js +18 -13
  337. package/vendor/lodash-es/_toSource.es.js +9 -8
  338. package/vendor/lodash-es/_trimmedEndIndex.es.js +7 -6
  339. package/vendor/lodash-es/cloneDeep.es.js +5 -5
  340. package/vendor/lodash-es/debounce.es.js +84 -49
  341. package/vendor/lodash-es/eq.es.js +3 -3
  342. package/vendor/lodash-es/isArguments.es.js +9 -6
  343. package/vendor/lodash-es/isArray.es.js +2 -2
  344. package/vendor/lodash-es/isArrayLike.es.js +5 -5
  345. package/vendor/lodash-es/isBuffer.es.js +9 -4
  346. package/vendor/lodash-es/isEqual.es.js +4 -4
  347. package/vendor/lodash-es/isFunction.es.js +10 -9
  348. package/vendor/lodash-es/isLength.es.js +4 -4
  349. package/vendor/lodash-es/isMap.es.js +6 -5
  350. package/vendor/lodash-es/isObject.es.js +4 -4
  351. package/vendor/lodash-es/isObjectLike.es.js +3 -3
  352. package/vendor/lodash-es/isSet.es.js +6 -5
  353. package/vendor/lodash-es/isSymbol.es.js +6 -6
  354. package/vendor/lodash-es/isTypedArray.es.js +6 -5
  355. package/vendor/lodash-es/keys.es.js +6 -6
  356. package/vendor/lodash-es/now.es.js +4 -4
  357. package/vendor/lodash-es/stubArray.es.js +2 -2
  358. package/vendor/lodash-es/stubFalse.es.js +3 -3
  359. package/vendor/lodash-es/toNumber.es.js +25 -18
  360. package/vendor/lodash-es/toString.es.js +2 -2
  361. package/vendor/lodash-es/uniqueId.es.js +6 -6
  362. package/vendor/orderedmap/dist/index.es.js +65 -49
  363. package/vendor/primevue/api/api.esm.es.js +214 -121
  364. package/vendor/primevue/avatar/avatar.esm.es.js +44 -41
  365. package/vendor/primevue/avatar/style/avatarstyle.esm.es.js +12 -11
  366. package/vendor/primevue/avatargroup/avatargroup.esm.es.js +17 -16
  367. package/vendor/primevue/avatargroup/style/avatargroupstyle.esm.es.js +6 -5
  368. package/vendor/primevue/badge/badge.esm.es.js +21 -20
  369. package/vendor/primevue/badge/style/badgestyle.esm.es.js +19 -18
  370. package/vendor/primevue/base/style/basestyle.esm.es.js +88 -99
  371. package/vendor/primevue/basecomponent/basecomponent.esm.es.js +327 -261
  372. package/vendor/primevue/basedirective/basedirective.esm.es.js +257 -186
  373. package/vendor/primevue/baseicon/baseicon.esm.es.js +55 -49
  374. package/vendor/primevue/baseicon/style/baseiconstyle.esm.es.js +5 -35
  375. package/vendor/primevue/button/button.esm.es.js +76 -72
  376. package/vendor/primevue/button/style/buttonstyle.esm.es.js +46 -39
  377. package/vendor/primevue/card/card.esm.es.js +30 -29
  378. package/vendor/primevue/card/style/cardstyle.esm.es.js +6 -5
  379. package/vendor/primevue/checkbox/checkbox.esm.es.js +109 -101
  380. package/vendor/primevue/checkbox/style/checkboxstyle.esm.es.js +12 -11
  381. package/vendor/primevue/config/config.esm.es.js +76 -58
  382. package/vendor/primevue/dialog/dialog.esm.es.js +421 -281
  383. package/vendor/primevue/dialog/style/dialogstyle.esm.es.js +26 -22
  384. package/vendor/primevue/dropdown/dropdown.esm.es.js +956 -742
  385. package/vendor/primevue/dropdown/style/dropdownstyle.esm.es.js +33 -31
  386. package/vendor/primevue/fileupload/fileupload.esm.es.js +559 -450
  387. package/vendor/primevue/fileupload/style/fileuploadstyle.esm.es.js +14 -13
  388. package/vendor/primevue/focustrap/focustrap.esm.es.js +128 -90
  389. package/vendor/primevue/focustrap/style/focustrapstyle.esm.es.js +2 -2
  390. package/vendor/primevue/icons/angledoubleleft/index.esm.es.js +13 -11
  391. package/vendor/primevue/icons/angledoubleright/index.esm.es.js +13 -11
  392. package/vendor/primevue/icons/angledown/index.esm.es.js +13 -11
  393. package/vendor/primevue/icons/angleleft/index.esm.es.js +13 -11
  394. package/vendor/primevue/icons/angleright/index.esm.es.js +13 -11
  395. package/vendor/primevue/icons/angleup/index.esm.es.js +13 -11
  396. package/vendor/primevue/icons/blank/index.esm.es.js +13 -11
  397. package/vendor/primevue/icons/check/index.esm.es.js +13 -11
  398. package/vendor/primevue/icons/chevrondown/index.esm.es.js +13 -11
  399. package/vendor/primevue/icons/exclamationtriangle/index.esm.es.js +17 -13
  400. package/vendor/primevue/icons/eye/index.esm.es.js +13 -11
  401. package/vendor/primevue/icons/eyeslash/index.esm.es.js +13 -11
  402. package/vendor/primevue/icons/infocircle/index.esm.es.js +13 -11
  403. package/vendor/primevue/icons/plus/index.esm.es.js +13 -11
  404. package/vendor/primevue/icons/refresh/index.esm.es.js +13 -11
  405. package/vendor/primevue/icons/search/index.esm.es.js +13 -11
  406. package/vendor/primevue/icons/searchminus/index.esm.es.js +13 -11
  407. package/vendor/primevue/icons/searchplus/index.esm.es.js +13 -11
  408. package/vendor/primevue/icons/spinner/index.esm.es.js +13 -11
  409. package/vendor/primevue/icons/times/index.esm.es.js +13 -11
  410. package/vendor/primevue/icons/timescircle/index.esm.es.js +13 -11
  411. package/vendor/primevue/icons/undo/index.esm.es.js +13 -11
  412. package/vendor/primevue/icons/upload/index.esm.es.js +13 -11
  413. package/vendor/primevue/icons/windowmaximize/index.esm.es.js +13 -11
  414. package/vendor/primevue/icons/windowminimize/index.esm.es.js +13 -11
  415. package/vendor/primevue/image/image.esm.es.js +280 -235
  416. package/vendor/primevue/image/style/imagestyle.esm.es.js +18 -17
  417. package/vendor/primevue/inputgroup/inputgroup.esm.es.js +17 -16
  418. package/vendor/primevue/inputgroup/style/inputgroupstyle.esm.es.js +6 -5
  419. package/vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js +17 -16
  420. package/vendor/primevue/inputgroupaddon/style/inputgroupaddonstyle.esm.es.js +6 -5
  421. package/vendor/primevue/inputnumber/inputnumber.esm.es.js +834 -566
  422. package/vendor/primevue/inputnumber/style/inputnumberstyle.esm.es.js +23 -22
  423. package/vendor/primevue/inputtext/inputtext.esm.es.js +32 -30
  424. package/vendor/primevue/inputtext/style/inputtextstyle.esm.es.js +13 -12
  425. package/vendor/primevue/menu/menu.esm.es.js +402 -304
  426. package/vendor/primevue/menu/style/menustyle.esm.es.js +14 -13
  427. package/vendor/primevue/message/message.esm.es.js +126 -112
  428. package/vendor/primevue/message/style/messagestyle.esm.es.js +9 -8
  429. package/vendor/primevue/multiselect/multiselect.esm.es.js +1083 -835
  430. package/vendor/primevue/multiselect/style/multiselectstyle.esm.es.js +38 -36
  431. package/vendor/primevue/overlayeventbus/overlayeventbus.esm.es.js +3 -3
  432. package/vendor/primevue/overlaypanel/overlaypanel.esm.es.js +275 -169
  433. package/vendor/primevue/overlaypanel/style/overlaypanelstyle.esm.es.js +9 -8
  434. package/vendor/primevue/paginator/paginator.esm.es.js +513 -469
  435. package/vendor/primevue/paginator/style/paginatorstyle.esm.es.js +50 -43
  436. package/vendor/primevue/password/password.esm.es.js +306 -233
  437. package/vendor/primevue/password/style/passwordstyle.esm.es.js +26 -24
  438. package/vendor/primevue/portal/portal.esm.es.js +17 -17
  439. package/vendor/primevue/progressbar/progressbar.esm.es.js +37 -35
  440. package/vendor/primevue/progressbar/style/progressbarstyle.esm.es.js +10 -9
  441. package/vendor/primevue/ripple/ripple.esm.es.js +90 -62
  442. package/vendor/primevue/ripple/style/ripplestyle.esm.es.js +6 -5
  443. package/vendor/primevue/selectbutton/selectbutton.esm.es.js +213 -167
  444. package/vendor/primevue/selectbutton/style/selectbuttonstyle.esm.es.js +14 -13
  445. package/vendor/primevue/skeleton/skeleton.esm.es.js +28 -26
  446. package/vendor/primevue/skeleton/style/skeletonstyle.esm.es.js +13 -11
  447. package/vendor/primevue/textarea/style/textareastyle.esm.es.js +12 -11
  448. package/vendor/primevue/textarea/textarea.esm.es.js +49 -33
  449. package/vendor/primevue/timeline/style/timelinestyle.esm.es.js +9 -8
  450. package/vendor/primevue/timeline/timeline.esm.es.js +53 -52
  451. package/vendor/primevue/toast/style/toaststyle.esm.es.js +54 -46
  452. package/vendor/primevue/toast/toast.esm.es.js +309 -260
  453. package/vendor/primevue/toasteventbus/toasteventbus.esm.es.js +3 -3
  454. package/vendor/primevue/toastservice/toastservice.esm.es.js +16 -15
  455. package/vendor/primevue/tooltip/style/tooltipstyle.esm.es.js +6 -5
  456. package/vendor/primevue/tooltip/tooltip.esm.es.js +383 -186
  457. package/vendor/primevue/usestyle/usestyle.esm.es.js +94 -64
  458. package/vendor/primevue/usetoast/usetoast.esm.es.js +9 -8
  459. package/vendor/primevue/utils/utils.esm.es.js +1078 -772
  460. package/vendor/primevue/virtualscroller/style/virtualscrollerstyle.esm.es.js +5 -67
  461. package/vendor/primevue/virtualscroller/virtualscroller.esm.es.js +655 -428
  462. package/vendor/prosemirror-commands/dist/index.es.js +454 -316
  463. package/vendor/prosemirror-history/dist/index.es.js +286 -178
  464. package/vendor/prosemirror-keymap/dist/index.es.js +68 -48
  465. package/vendor/prosemirror-model/dist/index.es.js +1905 -1436
  466. package/vendor/prosemirror-schema-list/dist/index.es.js +115 -73
  467. package/vendor/prosemirror-state/dist/index.es.js +467 -353
  468. package/vendor/prosemirror-transform/dist/index.es.js +1146 -829
  469. package/vendor/prosemirror-view/dist/index.es.js +4127 -2719
  470. package/vendor/rope-sequence/dist/index.es.js +165 -82
  471. package/vendor/simplebar-core/dist/index.es.js +670 -242
  472. package/vendor/simplebar-vue/dist/simplebar-vue.esm.es.js +73 -60
  473. package/vendor/single-spa/lib/es2015/esm/single-spa.min.es.js +511 -510
  474. package/vendor/tippy.js/dist/tippy.esm.es.js +971 -525
  475. package/vendor/vee-validate/dist/vee-validate.esm.es.js +1830 -1097
  476. package/vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js +740 -738
  477. package/vendor/w3c-keyname/index.es.js +25 -13
  478. package/wangsvue.es.js +167 -208
  479. package/wangsvue.esm.browser.js +49417 -48026
  480. package/wangsvue.system.js +67600 -234
  481. package/api/index.es.js +0 -149
  482. package/apiitem/index.es.js +0 -611
  483. package/assignmember/index.es.js +0 -434
  484. package/attachment/index.es.js +0 -118
  485. package/attachmentchangelog/index.es.js +0 -79
  486. package/attachmentitem/index.es.js +0 -231
  487. package/attachmentthumbnail/index.es.js +0 -83
  488. package/changelog/index.d.ts +0 -164
  489. package/changelog/index.es.js +0 -85
  490. package/changelogfilter/index.es.js +0 -113
  491. package/changelogpage/index.d.ts +0 -184
  492. package/changelogpage/index.es.js +0 -176
  493. package/checklist/index.es.js +0 -571
  494. package/checklistchangelog/index.es.js +0 -85
  495. package/comment/index.d.ts +0 -187
  496. package/comment/index.es.js +0 -267
  497. package/commentblock/index.es.js +0 -337
  498. package/confirmdeploy/index.es.js +0 -64
  499. package/dependencycol/index.es.js +0 -32
  500. package/description/index.es.js +0 -135
  501. package/descriptiontab/index.es.js +0 -30
  502. package/detailmember/index.d.ts +0 -77
  503. package/detailmember/index.es.js +0 -32
  504. package/detailmemberadmin/index.es.js +0 -210
  505. package/detailmemberleader/index.es.js +0 -164
  506. package/detailmemberlog/index.es.js +0 -117
  507. package/detailsprint/index.d.ts +0 -86
  508. package/detailsprint/index.es.js +0 -414
  509. package/dialogaddattachment/index.es.js +0 -273
  510. package/dialogaddchecklist/index.es.js +0 -120
  511. package/dialogaddeditapi/index.es.js +0 -87
  512. package/dialogaddpbi/index.es.js +0 -197
  513. package/dialogadjustmenttask/index.es.js +0 -484
  514. package/dialogadjustmenttaskheader/index.es.js +0 -193
  515. package/dialogapichangelog/index.es.js +0 -83
  516. package/dialogassignmember/index.es.js +0 -171
  517. package/dialogconfirmapproval/index.es.js +0 -54
  518. package/dialogconfirmchecklist/index.es.js +0 -189
  519. package/dialogconfirmdeletetask/index.es.js +0 -70
  520. package/dialogconfirmdeletetaskpermanently/index.es.js +0 -50
  521. package/dialogconfirmedit/index.es.js +0 -50
  522. package/dialogconfirmfinishtask/index.es.js +0 -50
  523. package/dialogconfirmrestoretask/index.es.js +0 -46
  524. package/dialogconfirmsprint/index.es.js +0 -42
  525. package/dialogcopyapi/index.es.js +0 -130
  526. package/dialogcustomdependency/index.es.js +0 -55
  527. package/dialogdetailchecklisttemplate/index.es.js +0 -214
  528. package/dialogdetailcomponent/index.es.js +0 -121
  529. package/dialogdetailpbi/index.es.js +0 -192
  530. package/dialogfinishreview/index.es.js +0 -126
  531. package/dialogimprovementtask/index.es.js +0 -191
  532. package/dialogmemberadmin/index.es.js +0 -93
  533. package/dialogpreparepbi/index.es.js +0 -93
  534. package/dialogpriorityvalue/index.es.js +0 -85
  535. package/dialogreportbug/index.es.js +0 -207
  536. package/dialogreviewleader/index.es.js +0 -280
  537. package/dialogsavechecklisttemplate/index.es.js +0 -127
  538. package/dialogselectproject/index.es.js +0 -69
  539. package/dialogsetduration/index.es.js +0 -109
  540. package/dialogsettasklink/index.es.js +0 -153
  541. package/dialogtestapi/index.es.js +0 -389
  542. package/eventlogtab/index.es.js +0 -50
  543. package/infotasktab/index.es.js +0 -186
  544. package/inputadditional/index.es.js +0 -62
  545. package/inputinitialname/index.d.ts +0 -118
  546. package/inputinitialname/index.es.js +0 -95
  547. package/inputrepositoryname/index.d.ts +0 -86
  548. package/inputrepositoryname/index.es.js +0 -41
  549. package/isrequiredtext/index.es.js +0 -16
  550. package/legend/index.es.js +0 -727
  551. package/legendlist/index.es.js +0 -33
  552. package/loading-page-BrQattYE.js +0 -1
  553. package/loading-page-CgfbWppy.js +0 -1
  554. package/loading-page-CoC9UhfC.js +0 -4
  555. package/loading-page-CoXtqoc9.js +0 -4
  556. package/loading-page-DbLuqCHa.js +0 -1
  557. package/loading-page-f8D03l3G.js +0 -4
  558. package/loading-plane-CgfbWppy.js +0 -1
  559. package/loading-plane-CoXtqoc9.js +0 -4
  560. package/loading-table-Bdr9ZhtP.js +0 -1
  561. package/loading-table-ByUoWqUo.js +0 -4
  562. package/loading-table-BygEMzFM.js +0 -4
  563. package/loading-table-BzrSQlA0.js +0 -1
  564. package/loading-table-D9bw9OcI.js +0 -4
  565. package/loading-table-chOgXi94.js +0 -1
  566. package/no-data-CTKux8RI.js +0 -4
  567. package/no-data-Cgze_Rvp.js +0 -1
  568. package/no-data-DLHO1L_u.js +0 -4
  569. package/no-data-Dep79CBh.js +0 -1
  570. package/no-data-g0dJCy2p.js +0 -4
  571. package/no-data-y1X5WtcQ.js +0 -1
  572. package/notificationitem/index.d.ts +0 -107
  573. package/notificationitem/index.es.js +0 -333
  574. package/reviewitem/index.es.js +0 -65
  575. package/reviewtab/index.es.js +0 -44
  576. package/services/calendar.service.es.js +0 -32
  577. package/sonarqubesummary/index.es.js +0 -234
  578. package/sprintsummary/index.es.js +0 -73
  579. package/summaryaccordion/index.d.ts +0 -121
  580. package/summaryaccordion/index.es.js +0 -365
  581. package/taskdependency/index.es.js +0 -686
  582. package/taskdetail/index.d.ts +0 -82
  583. package/taskdetail/index.es.js +0 -491
  584. package/taskdetailpbi/index.d.ts +0 -35
  585. package/taskdetailpbi/index.es.js +0 -172
  586. package/taskdetailunassignedpbi/index.es.js +0 -261
  587. package/tasklink/index.es.js +0 -257
  588. package/tasklinkchangelog/index.es.js +0 -93
  589. package/tasklist/index.es.js +0 -92
  590. package/taskmore/index.es.js +0 -52
  591. package/taskstatusbadge/index.es.js +0 -18
  592. package/tasktable/index.d.ts +0 -87
  593. package/tasktable/index.es.js +0 -832
  594. package/ticket/index.es.js +0 -151
  595. package/tooltipspan/index.es.js +0 -30
  596. package/utils/updateSprintStatus.util.es.js +0 -17
  597. package/valueformdatainput/index.es.js +0 -70
  598. package/workcalendar/index.es.js +0 -351
@@ -1,28 +1,45 @@
1
- import { defineComponent as ht, onMounted as yt, ref as B, shallowRef as P, computed as x, watch as ge, createBlock as he, openBlock as c, withCtx as ye, renderSlot as U, createVNode as S, createElementVNode as f, mergeProps as u, unref as q, createElementBlock as g, createCommentVNode as $, withDirectives as wt, toDisplayString as F, Fragment as Q, renderList as re, createTextVNode as Dt, normalizeProps as bt, withKeys as w, vShow as Mt } from "vue";
2
- import { u as kt } from "../plugins/WangsVue.es.js";
3
- import { s as Tt } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
4
- import { s as St } from "../vendor/primevue/selectbutton/selectbutton.esm.es.js";
5
- import { s as $t } from "../vendor/primevue/skeleton/skeleton.esm.es.js";
6
- import { _ as se } from "../button/index.es.js";
7
- import { _ as Ft } from "../fieldwrapper/index.es.js";
8
- import { _ as X } from "../icon/index.es.js";
9
- import { _ as Yt } from "../inputgroup/index.es.js";
10
- import { _ as Ct } from "../validatormessage/index.es.js";
11
- const Ht = ["id"], Bt = ["id", "aria-invalid", "disabled", "placeholder", "value"], Vt = { class: "flex gap-1" }, It = { key: 2 }, Pt = {
1
+ import { defineComponent, onMounted, ref, shallowRef, computed, watch, createBlock, openBlock, withCtx, renderSlot, createVNode, createElementVNode, mergeProps, unref, createElementBlock, createCommentVNode, withDirectives, toDisplayString, Fragment, renderList, createTextVNode, normalizeProps, withKeys, vShow } from "vue";
2
+ import { u as useWangsVueConfig } from "../plugins/WangsVue.es.js";
3
+ import { s as script } from "../vendor/primevue/overlaypanel/overlaypanel.esm.es.js";
4
+ import { s as script$2 } from "../vendor/primevue/selectbutton/selectbutton.esm.es.js";
5
+ import { s as script$1 } from "../vendor/primevue/skeleton/skeleton.esm.es.js";
6
+ import { _ as _sfc_main$4 } from "../button/index.es.js";
7
+ import { _ as _sfc_main$1 } from "../fieldwrapper/index.es.js";
8
+ import { _ as _sfc_main$3 } from "../icon/index.es.js";
9
+ import { _ as _sfc_main$2 } from "../inputgroup/index.es.js";
10
+ import { _ as _sfc_main$5 } from "../validatormessage/index.es.js";
11
+ const _hoisted_1 = ["id"];
12
+ const _hoisted_2 = ["id", "aria-invalid", "disabled", "placeholder", "value"];
13
+ const _hoisted_3 = { class: "flex gap-1" };
14
+ const _hoisted_4 = { key: 2 };
15
+ const _hoisted_5 = {
12
16
  key: 0,
13
17
  class: "flex flex-col",
14
18
  "data-wv-section": "datepicker"
15
- }, At = { "data-wv-section": "tableheader" }, xt = {
19
+ };
20
+ const _hoisted_6 = { "data-wv-section": "tableheader" };
21
+ const _hoisted_7 = {
16
22
  class: "grid grid-cols-7 justify-between h-[26.8px] items-center",
17
23
  "data-wv-section": "weekdays"
18
- }, Nt = {
24
+ };
25
+ const _hoisted_8 = {
19
26
  class: "grid grid-cols-7",
20
27
  "data-wv-section": "tablebody"
21
- }, Ot = ["aria-label", "data-wv-other-month", "data-wv-today"], Et = ["aria-disabled", "data-p-disabled", "onClick"], Kt = ["data-p-disabled", "data-p-highlight", "onClick"], Wt = ["data-p-disabled", "data-p-highlight", "onClick"], Lt = ["aria-label"], Rt = ["aria-label"], jt = ["aria-label", "disabled"], Ut = ["aria-label", "disabled"], qt = {
28
+ };
29
+ const _hoisted_9 = ["aria-label", "data-wv-other-month", "data-wv-today"];
30
+ const _hoisted_10 = ["aria-disabled", "data-p-disabled", "onClick"];
31
+ const _hoisted_11 = ["data-p-disabled", "data-p-highlight", "onClick"];
32
+ const _hoisted_12 = ["data-p-disabled", "data-p-highlight", "onClick"];
33
+ const _hoisted_13 = ["aria-label"];
34
+ const _hoisted_14 = ["aria-label"];
35
+ const _hoisted_15 = ["aria-label", "disabled"];
36
+ const _hoisted_16 = ["aria-label", "disabled"];
37
+ const _hoisted_17 = {
22
38
  key: 1,
23
39
  class: "w-full flex items-center justify-end gap-1",
24
40
  "data-wv-section": "calendarbuttons"
25
- }, la = /* @__PURE__ */ ht({
41
+ };
42
+ const _sfc_main = /* @__PURE__ */ defineComponent({
26
43
  __name: "BaseCalendar",
27
44
  props: {
28
45
  modelValue: {},
@@ -39,9 +56,9 @@ const Ht = ["id"], Bt = ["id", "aria-invalid", "disabled", "placeholder", "value
39
56
  mode: { default: "single" },
40
57
  selectionMode: { default: "single" },
41
58
  hideOnDateTimeSelect: { type: Boolean },
42
- hideOnRangeSelection: { type: Boolean, default: !0 },
59
+ hideOnRangeSelection: { type: Boolean, default: true },
43
60
  view: { default: "date" },
44
- showYear: { type: Boolean, default: !0 },
61
+ showYear: { type: Boolean, default: true },
45
62
  showButtons: { type: Boolean },
46
63
  useValidator: { type: Boolean },
47
64
  fieldName: {},
@@ -58,819 +75,1325 @@ const Ht = ["id"], Bt = ["id", "aria-invalid", "disabled", "placeholder", "value
58
75
  stepHour: { default: 1 },
59
76
  stepMinute: { default: 1 },
60
77
  useTimeFormat: { type: Boolean },
61
- onlyWeekdays: { type: Boolean, default: !1 },
78
+ onlyWeekdays: { type: Boolean, default: false },
62
79
  excludeDates: { default: () => [] },
63
80
  minDate: {},
64
81
  maxDate: {},
65
82
  maxYear: {},
66
83
  maxMonth: {},
67
- exactSelection: { type: Boolean, default: !1 }
84
+ exactSelection: { type: Boolean, default: false }
68
85
  },
69
86
  emits: ["update:modelValue", "update:epochTimeMillis", "monthChange", "yearChange", "dateSelect"],
70
- setup(Ae, { emit: xe }) {
71
- const l = Ae, A = xe;
72
- yt(() => {
73
- R();
87
+ setup(__props, { emit: __emit }) {
88
+ const props = __props;
89
+ const emit = __emit;
90
+ onMounted(() => {
91
+ updateCalendar();
92
+ });
93
+ const config = useWangsVueConfig("Calendar");
94
+ const ticksTo1970 = ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7;
95
+ const input = ref();
96
+ const overlayPanel = ref();
97
+ const wrapper = ref();
98
+ const currentDate = /* @__PURE__ */ new Date();
99
+ const currentMonth = ref(currentDate.getMonth());
100
+ const currentYear = ref(currentDate.getFullYear());
101
+ const currentHour = ref(currentDate.getHours());
102
+ const currentMinute = ref(currentDate.getMinutes());
103
+ const currentSecond = ref(currentDate.getSeconds());
104
+ const temporaryDate = ref(props.modelValue);
105
+ const changesSaved = ref(false);
106
+ const inputValue = shallowRef();
107
+ const currentView = shallowRef(props.view ?? "date");
108
+ const weeksInMonth = shallowRef([]);
109
+ const isLoading = shallowRef(false);
110
+ const pm = shallowRef(false);
111
+ const timePickerTimer = shallowRef();
112
+ const timePickerChange = shallowRef(false);
113
+ const previousDateMeta = shallowRef();
114
+ const previousDatesInMonth = shallowRef([]);
115
+ const calendarModelValue = computed(() => {
116
+ return props.showButtons || props.showTime ? temporaryDate.value : props.modelValue;
117
+ });
118
+ const datesInMonth = computed(() => {
119
+ return weeksInMonth.value.flatMap((week) => week);
120
+ });
121
+ const formattedCurrentHour = computed(() => {
122
+ return currentHour.value < 10 ? "0" + currentHour.value : currentHour.value;
74
123
  });
75
- const Y = kt("Calendar"), Ne = (1969 * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7, we = B(), Z = B(), ue = B(), L = /* @__PURE__ */ new Date(), h = B(L.getMonth()), i = B(L.getFullYear()), v = B(L.getHours()), D = B(L.getMinutes()), V = B(L.getSeconds()), N = B(l.modelValue), _ = B(!1), ie = P(), p = P(l.view ?? "date"), De = P([]), be = P(!1), y = P(!1), de = P(), Me = P(!1), ve = P(), ke = P([]), o = x(() => l.showButtons || l.showTime ? N.value : l.modelValue), ee = x(() => De.value.flatMap((e) => e)), Oe = x(() => v.value < 10 ? "0" + v.value : v.value), Ee = x(() => D.value < 10 ? "0" + D.value : D.value), Ke = x(() => l.dateFormat || Y.locale.global.dateFormat), We = x(() => {
76
- const e = [], t = (a) => {
77
- if (l.minDate) {
78
- const n = l.minDate.getMonth(), r = l.minDate.getFullYear();
79
- if (i.value < r || i.value === r && a < n)
80
- return !1;
124
+ const formattedCurrentMinute = computed(() => {
125
+ return currentMinute.value < 10 ? "0" + currentMinute.value : currentMinute.value;
126
+ });
127
+ const datePattern = computed(() => {
128
+ return props.dateFormat || config.locale.global.dateFormat;
129
+ });
130
+ const monthPickerValues = computed(() => {
131
+ const months = [];
132
+ const isSelectableMonth = (baseMonth) => {
133
+ if (props.minDate) {
134
+ const minMonth = props.minDate.getMonth();
135
+ const minYear = props.minDate.getFullYear();
136
+ if (currentYear.value < minYear || currentYear.value === minYear && baseMonth < minMonth) {
137
+ return false;
138
+ }
81
139
  }
82
- if (l.maxDate) {
83
- const n = l.maxDate.getMonth(), r = l.maxDate.getFullYear();
84
- if (i.value > r || i.value === r && a > n)
85
- return !1;
140
+ if (props.maxDate) {
141
+ const maxMonth = props.maxDate.getMonth();
142
+ const maxYear = props.maxDate.getFullYear();
143
+ if (currentYear.value > maxYear || currentYear.value === maxYear && baseMonth > maxMonth) {
144
+ return false;
145
+ }
86
146
  }
87
- if (l.maxMonth && l.maxMonth === "current") {
88
- const n = /* @__PURE__ */ new Date(), r = n.getMonth(), d = n.getFullYear();
89
- return a <= r && i.value == d || // In current year
90
- i.value < d;
147
+ if (props.maxMonth) {
148
+ if (props.maxMonth === "current") {
149
+ const today = /* @__PURE__ */ new Date();
150
+ const monthInPresent = today.getMonth();
151
+ const yearInPresent = today.getFullYear();
152
+ return baseMonth <= monthInPresent && currentYear.value == yearInPresent || // In current year
153
+ currentYear.value < yearInPresent;
154
+ }
91
155
  }
92
- return !0;
156
+ return true;
93
157
  };
94
- for (let a = 0; a <= 11; a++)
95
- e.push({
96
- value: a,
97
- selectable: t(a)
158
+ for (let i = 0; i <= 11; i++) {
159
+ months.push({
160
+ value: i,
161
+ selectable: isSelectableMonth(i)
98
162
  });
99
- return e;
100
- }), te = x(() => {
101
- const e = [], t = i.value - i.value % 10, a = (n) => {
102
- if (l.minDate && l.minDate.getFullYear() > n || l.maxDate && l.maxDate.getFullYear() < n)
103
- return !1;
104
- if (l.maxYear && l.maxYear === "current") {
105
- const r = (/* @__PURE__ */ new Date()).getFullYear();
106
- return n <= r;
163
+ }
164
+ return months;
165
+ });
166
+ const yearPickerValues = computed(() => {
167
+ const years = [];
168
+ const base = currentYear.value - currentYear.value % 10;
169
+ const isSelectableYear = (baseYear) => {
170
+ if (props.minDate) {
171
+ if (props.minDate.getFullYear() > baseYear) return false;
107
172
  }
108
- return !0;
173
+ if (props.maxDate) {
174
+ if (props.maxDate.getFullYear() < baseYear) return false;
175
+ }
176
+ if (props.maxYear) {
177
+ if (props.maxYear === "current") {
178
+ const yearInPresent = (/* @__PURE__ */ new Date()).getFullYear();
179
+ return baseYear <= yearInPresent;
180
+ }
181
+ }
182
+ return true;
109
183
  };
110
- for (let n = 0; n < 10; n++)
111
- e.push({
112
- value: t + n,
113
- selectable: a(t + n)
184
+ for (let i = 0; i < 10; i++) {
185
+ years.push({
186
+ value: base + i,
187
+ selectable: isSelectableYear(base + i)
114
188
  });
115
- return e;
116
- }), O = x(() => {
117
- let e;
118
- if (o.value && ae(o.value) ? e = o.value[b(o.value)] || o.value[0] : e = o.value, e && typeof e != "string" && e.toString() !== "Invalid Date")
119
- return e;
120
- const t = /* @__PURE__ */ new Date();
121
- return l.maxDate && l.maxDate < t ? l.maxDate : l.minDate && l.minDate > t ? l.minDate : t;
122
- }), b = (e) => e.length > 2 ? e.length - 1 : 1, Le = () => {
123
- const e = new Date(i.value, h.value, 1), t = new Date(i.value, h.value + 1, 0), a = t.getDate(), n = e.getDay(), r = t.getDay(), d = [];
124
- let s = 1 - n;
125
- for (; s <= a; ) {
126
- const m = [];
127
- for (let H = 0; H < 7; H++)
128
- m.push({
129
- day: s,
130
- month: h.value,
131
- year: i.value,
132
- otherMonth: s < 1 || s > a,
133
- today: s === L.getDate() && h.value === (/* @__PURE__ */ new Date()).getMonth() && i.value === (/* @__PURE__ */ new Date()).getFullYear(),
134
- selectable: _e(
135
- s,
136
- h.value,
137
- i.value
189
+ }
190
+ return years;
191
+ });
192
+ const viewDate = computed(() => {
193
+ let propValue;
194
+ if (calendarModelValue.value && isArraySelection(calendarModelValue.value)) {
195
+ propValue = calendarModelValue.value[getLastIndex(calendarModelValue.value)] || calendarModelValue.value[0];
196
+ } else {
197
+ propValue = calendarModelValue.value;
198
+ }
199
+ if (propValue && typeof propValue !== "string" && propValue.toString() !== "Invalid Date") {
200
+ return propValue;
201
+ }
202
+ const today = /* @__PURE__ */ new Date();
203
+ if (props.maxDate && props.maxDate < today) {
204
+ return props.maxDate;
205
+ }
206
+ if (props.minDate && props.minDate > today) {
207
+ return props.minDate;
208
+ }
209
+ return today;
210
+ });
211
+ const getLastIndex = (date) => {
212
+ if (date.length > 2) return date.length - 1;
213
+ return 1;
214
+ };
215
+ const getWeeksInMonth = () => {
216
+ const firstDayOfMonth = new Date(currentYear.value, currentMonth.value, 1);
217
+ const lastDayOfMonth = new Date(currentYear.value, currentMonth.value + 1, 0);
218
+ const daysInMonth = lastDayOfMonth.getDate();
219
+ const firstDayOfWeek = firstDayOfMonth.getDay();
220
+ const lastDayOfWeek = lastDayOfMonth.getDay();
221
+ const weeks = [];
222
+ let currentDay = 1 - firstDayOfWeek;
223
+ while (currentDay <= daysInMonth) {
224
+ const week = [];
225
+ for (let i = 0; i < 7; i++) {
226
+ week.push({
227
+ day: currentDay,
228
+ month: currentMonth.value,
229
+ year: currentYear.value,
230
+ otherMonth: currentDay < 1 || currentDay > daysInMonth,
231
+ today: currentDay === currentDate.getDate() && currentMonth.value === (/* @__PURE__ */ new Date()).getMonth() && currentYear.value === (/* @__PURE__ */ new Date()).getFullYear(),
232
+ selectable: isSelectable(
233
+ currentDay,
234
+ currentMonth.value,
235
+ currentYear.value
138
236
  )
139
- }), s++;
140
- d.push(m);
141
- }
142
- if (r !== 6) {
143
- const m = d[d.length - 1];
144
- let H = 1;
145
- for (let T = r + 1; T < 7; T++)
146
- m[T].day = H++, m[T].otherMonth = !0;
147
- }
148
- return d;
149
- }, Re = () => {
150
- h.value === 0 ? (i.value--, h.value = 11) : h.value--, R();
151
- }, je = () => {
152
- i.value--;
153
- }, Te = () => {
154
- i.value++;
155
- }, Ue = () => {
156
- h.value === 11 ? (Te(), h.value = 0) : h.value++, R();
157
- }, qe = () => {
158
- i.value -= 10;
159
- }, ze = () => {
160
- i.value += 10;
161
- }, Ge = () => {
162
- p.value === "date" ? Re() : p.value === "month" ? je() : qe();
163
- }, Je = () => {
164
- p.value === "date" ? Ue() : p.value === "month" ? Te() : ze();
165
- }, R = () => {
166
- De.value = Le();
167
- }, E = () => o.value != null && typeof o.value != "string", K = (e) => l.selectionMode === "single" && (!Array.isArray(o.value) || o.value == null), C = () => l.selectionMode === "range" && (Array.isArray(o.value) || o.value == null), I = () => l.selectionMode === "multiple" && (Array.isArray(o.value) || o.value == null), ae = (e) => I() || C(), W = (e, t) => e ? e.getDate() === t.day && e.getMonth() === t.month && e.getFullYear() === t.year : !1, Qe = (e, t, a) => {
168
- if (e && t) {
169
- const r = new Date(a.year, a.month, a.day);
170
- return e.getTime() <= r.getTime() && t.getTime() >= r.getTime();
171
- }
172
- return !1;
173
- }, z = (e) => {
174
- if (!E())
175
- return !1;
176
- if (o.value) {
177
- if (K(o.value))
178
- return W(o.value, e);
179
- if (I())
180
- return o.value.some(
181
- (t) => W(t, e)
237
+ });
238
+ currentDay++;
239
+ }
240
+ weeks.push(week);
241
+ }
242
+ if (lastDayOfWeek !== 6) {
243
+ const lastWeek = weeks[weeks.length - 1];
244
+ let nextMonthDay = 1;
245
+ for (let i = lastDayOfWeek + 1; i < 7; i++) {
246
+ lastWeek[i].day = nextMonthDay++;
247
+ lastWeek[i].otherMonth = true;
248
+ }
249
+ }
250
+ return weeks;
251
+ };
252
+ const prevMonth = () => {
253
+ if (currentMonth.value === 0) {
254
+ currentYear.value--;
255
+ currentMonth.value = 11;
256
+ } else {
257
+ currentMonth.value--;
258
+ }
259
+ updateCalendar();
260
+ };
261
+ const decrementYear = () => {
262
+ currentYear.value--;
263
+ };
264
+ const incrementYear = () => {
265
+ currentYear.value++;
266
+ };
267
+ const nextMonth = () => {
268
+ if (currentMonth.value === 11) {
269
+ incrementYear();
270
+ currentMonth.value = 0;
271
+ } else {
272
+ currentMonth.value++;
273
+ }
274
+ updateCalendar();
275
+ };
276
+ const decrementDecade = () => {
277
+ currentYear.value -= 10;
278
+ };
279
+ const incrementDecade = () => {
280
+ currentYear.value += 10;
281
+ };
282
+ const navBackward = () => {
283
+ if (currentView.value === "date") {
284
+ prevMonth();
285
+ } else if (currentView.value === "month") {
286
+ decrementYear();
287
+ } else {
288
+ decrementDecade();
289
+ }
290
+ };
291
+ const navForward = () => {
292
+ if (currentView.value === "date") {
293
+ nextMonth();
294
+ } else if (currentView.value === "month") {
295
+ incrementYear();
296
+ } else {
297
+ incrementDecade();
298
+ }
299
+ };
300
+ const updateCalendar = () => {
301
+ weeksInMonth.value = getWeeksInMonth();
302
+ };
303
+ const isComparable = () => {
304
+ return calendarModelValue.value != null && typeof calendarModelValue.value !== "string";
305
+ };
306
+ const isSingleSelection = (value) => {
307
+ return props.selectionMode === "single" && (!Array.isArray(calendarModelValue.value) || calendarModelValue.value == null);
308
+ };
309
+ const isRangeSelection = () => {
310
+ return props.selectionMode === "range" && (Array.isArray(calendarModelValue.value) || calendarModelValue.value == null);
311
+ };
312
+ const isMultipleSelection = () => {
313
+ return props.selectionMode === "multiple" && (Array.isArray(calendarModelValue.value) || calendarModelValue.value == null);
314
+ };
315
+ const isArraySelection = (value) => {
316
+ return isMultipleSelection() || isRangeSelection();
317
+ };
318
+ const isDateEquals = (value, dateMeta) => {
319
+ if (value)
320
+ return value.getDate() === dateMeta.day && value.getMonth() === dateMeta.month && value.getFullYear() === dateMeta.year;
321
+ return false;
322
+ };
323
+ const isDateBetween = (start, end, dateMeta) => {
324
+ const between = false;
325
+ if (start && end) {
326
+ const date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
327
+ return start.getTime() <= date.getTime() && end.getTime() >= date.getTime();
328
+ }
329
+ return between;
330
+ };
331
+ const isSelected = (dateMeta) => {
332
+ if (!isComparable()) {
333
+ return false;
334
+ }
335
+ if (calendarModelValue.value) {
336
+ if (isSingleSelection(calendarModelValue.value)) {
337
+ return isDateEquals(calendarModelValue.value, dateMeta);
338
+ } else if (isMultipleSelection()) {
339
+ return calendarModelValue.value.some(
340
+ (dateIter) => isDateEquals(dateIter, dateMeta)
182
341
  );
183
- if (C())
184
- return o.value[b(o.value)] ? W(o.value[0], e) || W(
185
- o.value[b(o.value)],
186
- e
187
- ) || Qe(
188
- o.value[0],
189
- o.value[b(o.value)],
190
- e
191
- ) : W(o.value[0], e);
192
- }
193
- return !1;
194
- }, Xe = (e) => K(o.value) || I() ? z(e) : C() ? z(e) && (W(o.value[0], e) || o.value[0] == null) : !1, Ze = (e) => K(o.value) || I() ? z(e) : C() ? z(e) && (W(
195
- o.value[b(o.value)],
196
- e
197
- ) || o.value[b(o.value)] == null) : !1, Se = (e) => {
198
- if (E()) {
199
- if (K(o.value))
200
- return o.value.getMonth() === e && o.value.getFullYear() === i.value;
201
- if (I())
202
- return o.value.some(
203
- (t) => t.getMonth() === e && t.getFullYear() === i.value
342
+ } else if (isRangeSelection()) {
343
+ if (calendarModelValue.value[getLastIndex(calendarModelValue.value)])
344
+ return isDateEquals(calendarModelValue.value[0], dateMeta) || isDateEquals(
345
+ calendarModelValue.value[getLastIndex(calendarModelValue.value)],
346
+ dateMeta
347
+ ) || isDateBetween(
348
+ calendarModelValue.value[0],
349
+ calendarModelValue.value[getLastIndex(calendarModelValue.value)],
350
+ dateMeta
351
+ );
352
+ return isDateEquals(calendarModelValue.value[0], dateMeta);
353
+ }
354
+ }
355
+ return false;
356
+ };
357
+ const isFirstSelected = (dateMeta) => {
358
+ if (isSingleSelection(calendarModelValue.value) || isMultipleSelection())
359
+ return isSelected(dateMeta);
360
+ else if (isRangeSelection())
361
+ return isSelected(dateMeta) && (isDateEquals(calendarModelValue.value[0], dateMeta) || calendarModelValue.value[0] == null);
362
+ return false;
363
+ };
364
+ const isLastSelected = (dateMeta) => {
365
+ if (isSingleSelection(calendarModelValue.value) || isMultipleSelection())
366
+ return isSelected(dateMeta);
367
+ else if (isRangeSelection())
368
+ return isSelected(dateMeta) && (isDateEquals(
369
+ calendarModelValue.value[getLastIndex(calendarModelValue.value)],
370
+ dateMeta
371
+ ) || calendarModelValue.value[getLastIndex(calendarModelValue.value)] == null);
372
+ return false;
373
+ };
374
+ const isMonthSelected = (month) => {
375
+ if (isComparable()) {
376
+ if (isSingleSelection(calendarModelValue.value)) {
377
+ return calendarModelValue.value.getMonth() === month && calendarModelValue.value.getFullYear() === currentYear.value;
378
+ }
379
+ if (isMultipleSelection())
380
+ return calendarModelValue.value.some(
381
+ (date) => date.getMonth() === month && date.getFullYear() === currentYear.value
204
382
  );
205
- if (C()) {
206
- const [t, a] = o.value;
207
- if (t && a) {
208
- const n = new Date(t.getFullYear(), t.getMonth()), r = new Date(a.getFullYear(), a.getMonth()), d = new Date(i.value, e);
209
- return d >= n && d <= r;
383
+ if (isRangeSelection()) {
384
+ const [start, end] = calendarModelValue.value;
385
+ if (start && end) {
386
+ const startDate = new Date(start.getFullYear(), start.getMonth());
387
+ const endDate = new Date(end.getFullYear(), end.getMonth());
388
+ const currentMonthDate = new Date(currentYear.value, month);
389
+ return currentMonthDate >= startDate && currentMonthDate <= endDate;
210
390
  }
211
391
  }
212
392
  }
213
- return !1;
214
- }, $e = (e) => {
215
- var t;
216
- if (E()) {
217
- if (K(o.value))
218
- return ((t = o.value) == null ? void 0 : t.getFullYear()) === e;
219
- if (I())
220
- return o.value.some(
221
- (a) => a.getFullYear() === e
393
+ return false;
394
+ };
395
+ const isYearSelected = (year) => {
396
+ var _a;
397
+ if (isComparable()) {
398
+ if (isSingleSelection(calendarModelValue.value))
399
+ return ((_a = calendarModelValue.value) == null ? void 0 : _a.getFullYear()) === year;
400
+ if (isMultipleSelection())
401
+ return calendarModelValue.value.some(
402
+ (date) => date.getFullYear() === year
222
403
  );
223
- if (C()) {
224
- const [a, n] = o.value;
225
- return e >= a.getFullYear() && e <= (n ?? a).getFullYear();
404
+ if (isRangeSelection()) {
405
+ const [start, end] = calendarModelValue.value;
406
+ return year >= start.getFullYear() && year <= (end ?? start).getFullYear();
407
+ }
408
+ }
409
+ return false;
410
+ };
411
+ const isSelectable = (day, month, year) => {
412
+ let validMin = true;
413
+ let validMax = true;
414
+ let validWeekdays = true;
415
+ let validExcludes = true;
416
+ if (props.onlyWeekdays) {
417
+ const dayOfWeek = new Date(year, month, day).getDay();
418
+ validWeekdays = dayOfWeek >= 1 && dayOfWeek <= 5;
419
+ }
420
+ if (props.excludeDates) {
421
+ validExcludes = !props.excludeDates.some(
422
+ (excludeDate) => excludeDate.getFullYear() === year && excludeDate.getMonth() === month && excludeDate.getDate() === day
423
+ );
424
+ }
425
+ if (props.minDate) {
426
+ if (props.minDate.getFullYear() > year) {
427
+ validMin = false;
428
+ } else if (props.minDate.getFullYear() === year) {
429
+ if (props.minDate.getMonth() > month) {
430
+ validMin = false;
431
+ } else if (props.minDate.getMonth() === month) {
432
+ if (props.minDate.getDate() > day) {
433
+ validMin = false;
434
+ }
435
+ }
436
+ }
437
+ }
438
+ if (props.maxDate) {
439
+ if (props.maxDate.getFullYear() < year) {
440
+ validMax = false;
441
+ } else if (props.maxDate.getFullYear() === year) {
442
+ if (props.maxDate.getMonth() < month) {
443
+ validMax = false;
444
+ } else if (props.maxDate.getMonth() === month) {
445
+ if (props.maxDate.getDate() < day) {
446
+ validMax = false;
447
+ }
448
+ }
226
449
  }
227
450
  }
228
- return !1;
229
- }, _e = (e, t, a) => {
230
- let n = !0, r = !0, d = !0, s = !0;
231
- if (l.onlyWeekdays) {
232
- const m = new Date(a, t, e).getDay();
233
- d = m >= 1 && m <= 5;
234
- }
235
- return l.excludeDates && (s = !l.excludeDates.some(
236
- (m) => m.getFullYear() === a && m.getMonth() === t && m.getDate() === e
237
- )), l.minDate && (l.minDate.getFullYear() > a || l.minDate.getFullYear() === a && (l.minDate.getMonth() > t || l.minDate.getMonth() === t && l.minDate.getDate() > e)) && (n = !1), l.maxDate && (l.maxDate.getFullYear() < a || l.maxDate.getFullYear() === a && (l.maxDate.getMonth() < t || l.maxDate.getMonth() === t && l.maxDate.getDate() < e)) && (r = !1), n && r && d && s;
238
- }, ce = (e, t) => {
239
- e.currentTarget instanceof HTMLElement && e.currentTarget.focus(), t.selectable && ft(t), l.selectionMode === "single" && (!l.showTime || l.hideOnDateTimeSelect) && J();
240
- }, et = (e, t) => {
241
- t.selectable && (l.view === "month" ? ce(e, {
242
- year: i.value,
243
- month: t.value,
244
- day: 1,
245
- selectable: !0,
246
- today: !1,
247
- otherMonth: !1
248
- }) : (h.value = t.value, p.value = "date", A("monthChange", {
249
- month: h.value,
250
- year: i.value
251
- })), R());
252
- }, tt = (e, t) => {
253
- t.selectable && (l.view === "year" ? ce(e, {
254
- year: t.value,
255
- month: 0,
256
- day: 1,
257
- selectable: !0,
258
- otherMonth: !1,
259
- today: !1
260
- }) : (i.value = t.value, p.value = "month", A("yearChange", {
261
- month: h.value + 1,
262
- year: i.value
263
- })), R());
264
- }, M = (e, t, a) => {
265
- !l.disabled && !l.readonly && (Ce(e, null, t, a), e.preventDefault());
266
- }, k = (e) => {
267
- !l.disabled && !l.readonly && (me(), He(), e.preventDefault());
268
- }, le = () => {
269
- me();
270
- }, ne = (e) => {
271
- switch (e.code) {
451
+ return validMin && validMax && validWeekdays && validExcludes;
452
+ };
453
+ const onDateSelect = (event, date) => {
454
+ if (event.currentTarget instanceof HTMLElement) {
455
+ event.currentTarget.focus();
456
+ }
457
+ if (date.selectable) selectDate(date);
458
+ if (props.selectionMode === "single" && (!props.showTime || props.hideOnDateTimeSelect)) {
459
+ hidePanel();
460
+ }
461
+ };
462
+ const onMonthSelect = (event, monthMeta) => {
463
+ if (!monthMeta.selectable) return;
464
+ if (props.view === "month") {
465
+ onDateSelect(event, {
466
+ year: currentYear.value,
467
+ month: monthMeta.value,
468
+ day: 1,
469
+ selectable: true,
470
+ today: false,
471
+ otherMonth: false
472
+ });
473
+ } else {
474
+ currentMonth.value = monthMeta.value;
475
+ currentView.value = "date";
476
+ emit("monthChange", {
477
+ month: currentMonth.value,
478
+ year: currentYear.value
479
+ });
480
+ }
481
+ updateCalendar();
482
+ };
483
+ const onYearSelect = (event, year) => {
484
+ if (!year.selectable) return;
485
+ if (props.view === "year") {
486
+ onDateSelect(event, {
487
+ year: year.value,
488
+ month: 0,
489
+ day: 1,
490
+ selectable: true,
491
+ otherMonth: false,
492
+ today: false
493
+ });
494
+ } else {
495
+ currentYear.value = year.value;
496
+ currentView.value = "month";
497
+ emit("yearChange", {
498
+ month: currentMonth.value + 1,
499
+ year: currentYear.value
500
+ });
501
+ }
502
+ updateCalendar();
503
+ };
504
+ const onTimePickerElementMouseDown = (event, type, direction) => {
505
+ if (!props.disabled && !props.readonly) {
506
+ repeat(event, null, type, direction);
507
+ event.preventDefault();
508
+ }
509
+ };
510
+ const onTimePickerElementMouseUp = (event) => {
511
+ if (!props.disabled && !props.readonly) {
512
+ clearTimePickerTimer();
513
+ updateModelTime();
514
+ event.preventDefault();
515
+ }
516
+ };
517
+ const onTimePickerElementMouseLeave = () => {
518
+ clearTimePickerTimer();
519
+ };
520
+ const onContainerButtonKeydown = (event) => {
521
+ switch (event.code) {
272
522
  case "Tab":
273
523
  break;
274
524
  case "Escape":
275
- J(), e.preventDefault();
525
+ hidePanel();
526
+ event.preventDefault();
276
527
  break;
277
528
  }
278
- }, Fe = (e) => {
279
- l.disabled || setTimeout(() => {
280
- Z.value.show(e, Ye(e));
281
- }, 0);
282
- }, at = (e) => {
283
- l.disabled || setTimeout(() => {
284
- var t;
285
- (t = Z.value) == null || t.toggle(e, Ye(e));
286
- }, 0);
287
- }, lt = () => {
288
- p.value = l.view, fe(), _.value || Ie();
289
- }, Ye = (e) => ("$el" in ue.value ? ue.value.$el : we.value) ?? e.currentTarget, Ce = (e, t, a, n) => {
290
- switch (t || (t = 500), me(), de.value = setTimeout(() => {
291
- Ce(e, 100, a, n);
292
- }, t), a) {
529
+ };
530
+ const onInputClick = (event) => {
531
+ if (!props.disabled) {
532
+ setTimeout(() => {
533
+ overlayPanel.value.show(event, getOverlayTarget(event));
534
+ }, 0);
535
+ }
536
+ };
537
+ const onButtonTriggerClick = (event) => {
538
+ if (!props.disabled) {
539
+ setTimeout(() => {
540
+ var _a;
541
+ (_a = overlayPanel.value) == null ? void 0 : _a.toggle(event, getOverlayTarget(event));
542
+ }, 0);
543
+ }
544
+ };
545
+ const onPanelHide = () => {
546
+ currentView.value = props.view;
547
+ updateCurrentMetaData();
548
+ if (!changesSaved.value) {
549
+ revertChanges();
550
+ }
551
+ };
552
+ const getOverlayTarget = (event) => {
553
+ return ("$el" in wrapper.value ? wrapper.value.$el : input.value) ?? event.currentTarget;
554
+ };
555
+ const repeat = (event, interval, type, direction) => {
556
+ interval || (interval = 500);
557
+ clearTimePickerTimer();
558
+ timePickerTimer.value = setTimeout(() => {
559
+ repeat(event, 100, type, direction);
560
+ }, interval);
561
+ switch (type) {
293
562
  case 0:
294
- n === 1 ? nt(e) : ot(e);
563
+ if (direction === 1) incrementHour(event);
564
+ else decrementHour(event);
295
565
  break;
296
566
  case 1:
297
- n === 1 ? rt(e) : st(e);
567
+ if (direction === 1) incrementMinute(event);
568
+ else decrementMinute(event);
298
569
  break;
299
570
  }
300
- }, nt = (e) => {
301
- const t = v.value;
302
- let a = v.value + Number(l.stepHour), n = y.value;
303
- l.hourFormat == "24" ? a = a >= 24 ? a - 24 : a : l.hourFormat == "12" && (t < 12 && a > 11 && (n = !y.value), a = a >= 13 ? a - 12 : a), G(a, D.value, V.value, n) && (v.value = a, y.value = n), e.preventDefault();
304
- }, ot = (e) => {
305
- let t = v.value - l.stepHour, a = y.value;
306
- l.hourFormat == "24" ? t = t < 0 ? 24 + t : t : l.hourFormat == "12" && (v.value === 12 && (a = !y.value), t = t <= 0 ? 12 + t : t), G(t, D.value, V.value, a) && (v.value = t, y.value = a), e.preventDefault();
307
- }, rt = (e) => {
308
- const t = D.value + Number(l.stepMinute);
309
- G(v.value, t, V.value, y.value) && (D.value = t > 59 ? t - 60 : t), e.preventDefault();
310
- }, st = (e) => {
311
- let t = D.value - l.stepMinute;
312
- t = t < 0 ? 60 + t : t, G(v.value, t, V.value, y.value) && (D.value = t), e.preventDefault();
313
- }, me = () => {
314
- de.value && clearInterval(de.value);
315
- }, G = (e, t, a, n) => {
316
- let r;
317
- const d = ut(e, n);
318
- if (ae(o.value)) {
319
- const m = E() ? o.value : O.value;
320
- r = m[b(m)] || m[0];
321
- } else
322
- r = E() ? o.value : O.value;
323
- const s = r ? r.toDateString() : null;
324
- return !(l.minDate && s && l.minDate.toDateString() === s && (l.minDate.getHours() > d || l.minDate.getHours() === d && (l.minDate.getMinutes() > t || l.minDate.getMinutes() === t && l.minDate.getSeconds() > a)) || l.maxDate && s && l.maxDate.toDateString() === s && (l.maxDate.getHours() < d || l.maxDate.getHours() === d && (l.maxDate.getMinutes() < t || l.maxDate.getMinutes() === t && l.maxDate.getSeconds() < a)));
325
- }, ut = (e, t) => l.hourFormat == "12" ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e, He = () => {
326
- Me.value = !0;
327
- let e;
328
- if (ae(o.value)) {
329
- const t = E() ? o.value : O.value;
330
- e = t[b(t)] || t[0];
331
- } else
332
- e = E() ? o.value : O.value;
333
- e = e && !Array.isArray(e) ? new Date(e.getTime()) : /* @__PURE__ */ new Date(), l.hourFormat == "12" ? v.value === 12 ? e.setHours(y.value ? 12 : 0) : e.setHours(y.value ? v.value + 12 : v.value) : e.setHours(v.value), e.setMinutes(D.value), e.setSeconds(V.value), ae(o.value) && (I() ? e = [...o.value] : C() && (o.value[b(o.value)] ? e = [o.value[0], e] : e = [e, null])), Ve(e), A("dateSelect", e), setTimeout(() => Me.value = !1, 0);
334
- }, Be = (e) => e ? Array.isArray(e) ? e.map((a) => a == null ? void 0 : a.getTime()) : e.getTime() : null, Ve = (e) => {
335
- l.showButtons || l.showTime ? (N.value = e, _.value = !1) : (A("update:epochTimeMillis", Be(e)), A("update:modelValue", e));
336
- }, it = () => {
337
- A("update:epochTimeMillis", Be(N.value)), A("update:modelValue", N.value), _.value = !0, J();
338
- }, Ie = () => {
339
- N.value = l.modelValue, _.value = !0, J();
340
- }, dt = () => {
341
- !G(
342
- v.value,
343
- D.value,
344
- V.value,
345
- !y.value
346
- ) && (l.maxDate || l.minDate) || (y.value = !y.value, He());
347
- }, fe = () => {
348
- h.value = O.value.getMonth(), i.value = O.value.getFullYear(), l.showTime && vt(O.value);
349
- }, vt = (e) => {
350
- let t = e.getHours();
351
- l.hourFormat === "12" && (y.value = t > 11, t >= 12 ? t = t == 12 ? 12 : t - 12 : t = t == 0 ? 12 : t), v.value = Math.floor(t / l.stepHour) * l.stepHour, D.value = Math.floor(e.getMinutes() / l.stepMinute) * l.stepMinute;
352
- }, Pe = () => {
353
- const e = l.showButtons || l.showTime ? N.value : o.value;
354
- if (typeof e == "string")
355
- return e;
356
- let t = "";
357
- if (e)
571
+ };
572
+ const incrementHour = (event) => {
573
+ const prevHour = currentHour.value;
574
+ let newHour = currentHour.value + Number(props.stepHour);
575
+ let newPM = pm.value;
576
+ if (props.hourFormat == "24")
577
+ newHour = newHour >= 24 ? newHour - 24 : newHour;
578
+ else if (props.hourFormat == "12") {
579
+ if (prevHour < 12 && newHour > 11) {
580
+ newPM = !pm.value;
581
+ }
582
+ newHour = newHour >= 13 ? newHour - 12 : newHour;
583
+ }
584
+ if (validateTime(newHour, currentMinute.value, currentSecond.value, newPM)) {
585
+ currentHour.value = newHour;
586
+ pm.value = newPM;
587
+ }
588
+ event.preventDefault();
589
+ };
590
+ const decrementHour = (event) => {
591
+ let newHour = currentHour.value - props.stepHour;
592
+ let newPM = pm.value;
593
+ if (props.hourFormat == "24") newHour = newHour < 0 ? 24 + newHour : newHour;
594
+ else if (props.hourFormat == "12") {
595
+ if (currentHour.value === 12) {
596
+ newPM = !pm.value;
597
+ }
598
+ newHour = newHour <= 0 ? 12 + newHour : newHour;
599
+ }
600
+ if (validateTime(newHour, currentMinute.value, currentSecond.value, newPM)) {
601
+ currentHour.value = newHour;
602
+ pm.value = newPM;
603
+ }
604
+ event.preventDefault();
605
+ };
606
+ const incrementMinute = (event) => {
607
+ const newMinute = currentMinute.value + Number(props.stepMinute);
608
+ if (validateTime(currentHour.value, newMinute, currentSecond.value, pm.value)) {
609
+ currentMinute.value = newMinute > 59 ? newMinute - 60 : newMinute;
610
+ }
611
+ event.preventDefault();
612
+ };
613
+ const decrementMinute = (event) => {
614
+ let newMinute = currentMinute.value - props.stepMinute;
615
+ newMinute = newMinute < 0 ? 60 + newMinute : newMinute;
616
+ if (validateTime(currentHour.value, newMinute, currentSecond.value, pm.value)) {
617
+ currentMinute.value = newMinute;
618
+ }
619
+ event.preventDefault();
620
+ };
621
+ const clearTimePickerTimer = () => {
622
+ if (timePickerTimer.value) {
623
+ clearInterval(timePickerTimer.value);
624
+ }
625
+ };
626
+ const validateTime = (hour, minute, second, isPm) => {
627
+ let value;
628
+ const convertedHour = convertTo24Hour(hour, isPm);
629
+ if (isArraySelection(calendarModelValue.value)) {
630
+ const modelValue = isComparable() ? calendarModelValue.value : viewDate.value;
631
+ value = modelValue[getLastIndex(modelValue)] || modelValue[0];
632
+ } else {
633
+ value = isComparable() ? calendarModelValue.value : viewDate.value;
634
+ }
635
+ const valueDateString = value ? value.toDateString() : null;
636
+ if (props.minDate && valueDateString && props.minDate.toDateString() === valueDateString) {
637
+ if (props.minDate.getHours() > convertedHour) {
638
+ return false;
639
+ }
640
+ if (props.minDate.getHours() === convertedHour) {
641
+ if (props.minDate.getMinutes() > minute) {
642
+ return false;
643
+ }
644
+ if (props.minDate.getMinutes() === minute) {
645
+ if (props.minDate.getSeconds() > second) {
646
+ return false;
647
+ }
648
+ }
649
+ }
650
+ }
651
+ if (props.maxDate && valueDateString && props.maxDate.toDateString() === valueDateString) {
652
+ if (props.maxDate.getHours() < convertedHour) {
653
+ return false;
654
+ }
655
+ if (props.maxDate.getHours() === convertedHour) {
656
+ if (props.maxDate.getMinutes() < minute) {
657
+ return false;
658
+ }
659
+ if (props.maxDate.getMinutes() === minute) {
660
+ if (props.maxDate.getSeconds() < second) {
661
+ return false;
662
+ }
663
+ }
664
+ }
665
+ }
666
+ return true;
667
+ };
668
+ const convertTo24Hour = (hours, isPm) => {
669
+ if (props.hourFormat == "12") {
670
+ if (hours === 12) return isPm ? 12 : 0;
671
+ return isPm ? hours + 12 : hours;
672
+ }
673
+ return hours;
674
+ };
675
+ const updateModelTime = () => {
676
+ timePickerChange.value = true;
677
+ let value;
678
+ if (isArraySelection(calendarModelValue.value)) {
679
+ const modelValue = isComparable() ? calendarModelValue.value : viewDate.value;
680
+ value = modelValue[getLastIndex(modelValue)] || modelValue[0];
681
+ } else {
682
+ value = isComparable() ? calendarModelValue.value : viewDate.value;
683
+ }
684
+ value = value && !Array.isArray(value) ? new Date(value.getTime()) : /* @__PURE__ */ new Date();
685
+ if (props.hourFormat == "12") {
686
+ if (currentHour.value === 12) value.setHours(pm.value ? 12 : 0);
687
+ else value.setHours(pm.value ? currentHour.value + 12 : currentHour.value);
688
+ } else {
689
+ value.setHours(currentHour.value);
690
+ }
691
+ value.setMinutes(currentMinute.value);
692
+ value.setSeconds(currentSecond.value);
693
+ if (isArraySelection(calendarModelValue.value)) {
694
+ if (isMultipleSelection()) {
695
+ value = [...calendarModelValue.value];
696
+ } else if (isRangeSelection()) {
697
+ if (calendarModelValue.value[getLastIndex(calendarModelValue.value)])
698
+ value = [calendarModelValue.value[0], value];
699
+ else value = [value, null];
700
+ }
701
+ }
702
+ updateModel(value);
703
+ emit("dateSelect", value);
704
+ setTimeout(() => timePickerChange.value = false, 0);
705
+ };
706
+ const getMillisTime = (value) => {
707
+ const millisValue = value ? Array.isArray(value) ? value.map((v) => v == null ? void 0 : v.getTime()) : value.getTime() : null;
708
+ return millisValue;
709
+ };
710
+ const updateModel = (value) => {
711
+ if (props.showButtons || props.showTime) {
712
+ temporaryDate.value = value;
713
+ changesSaved.value = false;
714
+ } else {
715
+ emit("update:epochTimeMillis", getMillisTime(value));
716
+ emit("update:modelValue", value);
717
+ }
718
+ };
719
+ const applyChanges = () => {
720
+ emit("update:epochTimeMillis", getMillisTime(temporaryDate.value));
721
+ emit("update:modelValue", temporaryDate.value);
722
+ changesSaved.value = true;
723
+ hidePanel();
724
+ };
725
+ const revertChanges = () => {
726
+ temporaryDate.value = props.modelValue;
727
+ changesSaved.value = true;
728
+ hidePanel();
729
+ };
730
+ const toggleAMPM = () => {
731
+ const validHour = validateTime(
732
+ currentHour.value,
733
+ currentMinute.value,
734
+ currentSecond.value,
735
+ !pm.value
736
+ );
737
+ if (!validHour && (props.maxDate || props.minDate)) return;
738
+ pm.value = !pm.value;
739
+ updateModelTime();
740
+ };
741
+ const updateCurrentMetaData = () => {
742
+ currentMonth.value = viewDate.value.getMonth();
743
+ currentYear.value = viewDate.value.getFullYear();
744
+ if (props.showTime) {
745
+ updateCurrentTimeMeta(viewDate.value);
746
+ }
747
+ };
748
+ const updateCurrentTimeMeta = (date) => {
749
+ let hour = date.getHours();
750
+ if (props.hourFormat === "12") {
751
+ pm.value = hour > 11;
752
+ if (hour >= 12) hour = hour == 12 ? 12 : hour - 12;
753
+ else hour = hour == 0 ? 12 : hour;
754
+ }
755
+ currentHour.value = Math.floor(hour / props.stepHour) * props.stepHour;
756
+ currentMinute.value = Math.floor(date.getMinutes() / props.stepMinute) * props.stepMinute;
757
+ };
758
+ const formatValue = () => {
759
+ const value = props.showButtons || props.showTime ? temporaryDate.value : calendarModelValue.value;
760
+ if (typeof value === "string") {
761
+ return value;
762
+ }
763
+ let formattedValue = "";
764
+ if (value) {
358
765
  try {
359
- if (K(e))
360
- e.toString() !== "Invalid Date" && (t = oe(e));
361
- else if (I())
362
- e && e.length && (t = e.map((a) => oe(a)).join(", "));
363
- else if (C() && e && e.length) {
364
- const a = e[0], n = e[b(e)];
365
- a.toString() !== "Invalid Date" && (t = oe(a)), n && n.toString() !== "Invalid Date" && (t += " - " + oe(n));
766
+ if (isSingleSelection(value)) {
767
+ if (value.toString() !== "Invalid Date")
768
+ formattedValue = formatDateTime(value);
769
+ } else if (isMultipleSelection()) {
770
+ if (value && value.length) {
771
+ formattedValue = value.map((date) => formatDateTime(date)).join(", ");
772
+ }
773
+ } else if (isRangeSelection()) {
774
+ if (value && value.length) {
775
+ const startDate = value[0];
776
+ const endDate = value[getLastIndex(value)];
777
+ if (startDate.toString() !== "Invalid Date") {
778
+ formattedValue = formatDateTime(startDate);
779
+ }
780
+ if (endDate && endDate.toString() !== "Invalid Date") {
781
+ formattedValue += " - " + formatDateTime(endDate);
782
+ }
783
+ }
366
784
  }
367
785
  } catch {
368
- t = e.toString();
786
+ formattedValue = value.toString();
787
+ }
788
+ }
789
+ return formattedValue;
790
+ };
791
+ const formatDateTime = (date) => {
792
+ let formattedValue = null;
793
+ if (date) {
794
+ formattedValue = formatDate(date, datePattern.value);
795
+ if (props.showTime) {
796
+ formattedValue += " " + formatTime(date);
369
797
  }
370
- return t;
371
- }, oe = (e) => {
372
- let t = null;
373
- return e && (t = ct(e, Ke.value), l.showTime && (t += " " + mt(e))), t;
374
- }, ct = (e, t) => {
375
- if (!e)
798
+ }
799
+ return formattedValue;
800
+ };
801
+ const formatDate = (date, format) => {
802
+ if (!date) {
376
803
  return "";
377
- let a;
378
- const n = (H) => {
379
- const T = a + 1 < t.length && t.charAt(a + 1) === H;
380
- return T && a++, T;
381
- }, r = (H, T, pe) => {
382
- let j = "" + T;
383
- if (n(H))
384
- for (; j.length < pe; )
385
- j = "0" + j;
386
- return j;
387
- }, d = (H, T, pe, j) => n(H) ? j[T] : pe[T];
388
- let s = "", m = !1;
389
- if (e)
390
- for (a = 0; a < t.length; a++)
391
- if (m)
392
- t.charAt(a) === "'" && !n("'") ? m = !1 : s += t.charAt(a);
393
- else
394
- switch (t.charAt(a)) {
804
+ }
805
+ let iFormat;
806
+ const lookAhead = (match) => {
807
+ const matches = iFormat + 1 < format.length && format.charAt(iFormat + 1) === match;
808
+ if (matches) {
809
+ iFormat++;
810
+ }
811
+ return matches;
812
+ };
813
+ const formatNumber = (match, value, len) => {
814
+ let num = "" + value;
815
+ if (lookAhead(match)) {
816
+ while (num.length < len) {
817
+ num = "0" + num;
818
+ }
819
+ }
820
+ return num;
821
+ };
822
+ const formatName = (match, value, shortNames, longNames) => {
823
+ return lookAhead(match) ? longNames[value] : shortNames[value];
824
+ };
825
+ let output = "";
826
+ let literal = false;
827
+ if (date) {
828
+ for (iFormat = 0; iFormat < format.length; iFormat++) {
829
+ if (literal) {
830
+ if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
831
+ literal = false;
832
+ } else {
833
+ output += format.charAt(iFormat);
834
+ }
835
+ } else {
836
+ switch (format.charAt(iFormat)) {
395
837
  case "d":
396
- s += r("d", e.getDate(), 2);
838
+ output += formatNumber("d", date.getDate(), 2);
397
839
  break;
398
840
  case "D":
399
- s += d(
841
+ output += formatName(
400
842
  "D",
401
- e.getDay(),
402
- Y.locale.global.dayNamesShort,
403
- Y.locale.global.dayNames
843
+ date.getDay(),
844
+ config.locale.global.dayNamesShort,
845
+ config.locale.global.dayNames
404
846
  );
405
847
  break;
406
848
  case "o":
407
- s += r(
849
+ output += formatNumber(
408
850
  "o",
409
851
  Math.round(
410
852
  (new Date(
411
- e.getFullYear(),
412
- e.getMonth(),
413
- e.getDate()
414
- ).getTime() - new Date(e.getFullYear(), 0, 0).getTime()) / 864e5
853
+ date.getFullYear(),
854
+ date.getMonth(),
855
+ date.getDate()
856
+ ).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 864e5
415
857
  ),
416
858
  3
417
859
  );
418
860
  break;
419
861
  case "m":
420
- s += r("m", e.getMonth() + 1, 2);
862
+ output += formatNumber("m", date.getMonth() + 1, 2);
421
863
  break;
422
864
  case "M":
423
- s += d(
865
+ output += formatName(
424
866
  "M",
425
- e.getMonth(),
426
- Y.locale.global.monthNamesShort,
427
- Y.locale.global.monthNames
867
+ date.getMonth(),
868
+ config.locale.global.monthNamesShort,
869
+ config.locale.global.monthNames
428
870
  );
429
871
  break;
430
872
  case "y":
431
- s += n("y") ? e.getFullYear() : (e.getFullYear() % 100 < 10 ? "0" : "") + e.getFullYear() % 100;
873
+ output += lookAhead("y") ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? "0" : "") + date.getFullYear() % 100;
432
874
  break;
433
875
  case "@":
434
- s += e.getTime();
876
+ output += date.getTime();
435
877
  break;
436
878
  case "!":
437
- s += e.getTime() * 1e4 + Ne;
879
+ output += date.getTime() * 1e4 + ticksTo1970;
438
880
  break;
439
881
  case "'":
440
- n("'") ? s += "'" : m = !0;
882
+ if (lookAhead("'")) {
883
+ output += "'";
884
+ } else {
885
+ literal = true;
886
+ }
441
887
  break;
442
888
  default:
443
- s += t.charAt(a);
889
+ output += format.charAt(iFormat);
444
890
  }
445
- return s;
446
- }, mt = (e) => {
447
- if (!e)
891
+ }
892
+ }
893
+ }
894
+ return output;
895
+ };
896
+ const formatTime = (date) => {
897
+ if (!date) {
448
898
  return "";
449
- let t = "", a = e.getHours();
450
- const n = e.getMinutes();
451
- return l.hourFormat === "12" && a > 11 && a !== 12 && (a -= 12), l.hourFormat === "12" ? t += a === 0 ? 12 : a < 10 ? "0" + a : a : t += a < 10 ? "0" + a : a, t += ":", t += n < 10 ? "0" + n : n, l.hourFormat === "12" && (t += e.getHours() > 11 ? ` ${Y.locale.global.pm}` : ` ${Y.locale.global.am}`), t;
452
- }, ft = (e) => {
453
- let t = new Date(e.year, e.month, e.day);
454
- l.showTime && (t.setHours(
455
- v.value + (l.hourFormat === "12" && v.value !== 12 && y.value ? 12 : 0)
456
- ), t.setMinutes(D.value), t.setSeconds(V.value)), l.minDate && l.minDate > t && (t = l.minDate, v.value = t.getHours(), D.value = t.getMinutes(), V.value = t.getSeconds()), l.maxDate && l.maxDate < t && (t = l.maxDate, v.value = t.getHours(), D.value = t.getMinutes(), V.value = t.getSeconds());
457
- let a = null;
458
- if (K(o.value))
459
- a = t;
460
- else if (I()) {
461
- let n = o.value;
462
- if (n && n.length) {
463
- const r = n.findIndex(
464
- (d) => d.getFullYear() === t.getFullYear() && d.getMonth() === t.getMonth() && d.getDate() === t.getDate()
899
+ }
900
+ let output = "";
901
+ let hours = date.getHours();
902
+ const minutes = date.getMinutes();
903
+ if (props.hourFormat === "12" && hours > 11 && hours !== 12) {
904
+ hours -= 12;
905
+ }
906
+ if (props.hourFormat === "12") {
907
+ output += hours === 0 ? 12 : hours < 10 ? "0" + hours : hours;
908
+ } else {
909
+ output += hours < 10 ? "0" + hours : hours;
910
+ }
911
+ output += ":";
912
+ output += minutes < 10 ? "0" + minutes : minutes;
913
+ if (props.hourFormat === "12") {
914
+ output += date.getHours() > 11 ? ` ${config.locale.global.pm}` : ` ${config.locale.global.am}`;
915
+ }
916
+ return output;
917
+ };
918
+ const selectDate = (dateMeta) => {
919
+ let date = new Date(dateMeta.year, dateMeta.month, dateMeta.day);
920
+ if (props.showTime) {
921
+ date.setHours(
922
+ currentHour.value + (props.hourFormat === "12" && currentHour.value !== 12 && pm.value ? 12 : 0)
923
+ );
924
+ date.setMinutes(currentMinute.value);
925
+ date.setSeconds(currentSecond.value);
926
+ }
927
+ if (props.minDate && props.minDate > date) {
928
+ date = props.minDate;
929
+ currentHour.value = date.getHours();
930
+ currentMinute.value = date.getMinutes();
931
+ currentSecond.value = date.getSeconds();
932
+ }
933
+ if (props.maxDate && props.maxDate < date) {
934
+ date = props.maxDate;
935
+ currentHour.value = date.getHours();
936
+ currentMinute.value = date.getMinutes();
937
+ currentSecond.value = date.getSeconds();
938
+ }
939
+ let modelVal = null;
940
+ if (isSingleSelection(calendarModelValue.value)) {
941
+ modelVal = date;
942
+ } else if (isMultipleSelection()) {
943
+ let selectedDates = calendarModelValue.value;
944
+ if (selectedDates && selectedDates.length) {
945
+ const dateIndex = selectedDates.findIndex(
946
+ (each) => each.getFullYear() === date.getFullYear() && each.getMonth() === date.getMonth() && each.getDate() === date.getDate()
465
947
  );
466
- r !== -1 ? n.splice(r, 1) : n = [...n, t], n.sort((d, s) => d.getTime() - s.getTime());
467
- } else n = [t];
468
- a = n;
469
- } else if (l.exactSelection)
470
- a = gt(e, t);
471
- else if (C())
472
- if (o.value && o.value.length) {
473
- let n = o.value[0], r = o.value[b(o.value)];
474
- !r && t.getTime() >= n.getTime() ? r = t : (n = t, r = null), a = [n, r];
475
- } else
476
- a = [t, null];
477
- a !== null && Ve(a), pt(a), A("dateSelect", t);
478
- }, pt = (e) => {
479
- const t = l.exactSelection ? e.length > 1 : e && e[b(e)] !== null;
480
- C() && l.hideOnRangeSelection && !l.showButtons && !l.showTime && t && J();
481
- }, gt = (e, t) => {
482
- const a = ve.value;
483
- if (!ve.value || a.day === e.day)
484
- return ve.value = e, ke.value = ee.value, [t];
485
- const n = a.month === e.month ? ee.value.filter((r) => r.day > a.day && r.day < e.day).map((r) => new Date(r.year, r.month, r.day)) : [
486
- ...ke.value.filter((r) => !r.otherMonth && r.day > a.day).map((r) => new Date(r.year, r.month, r.day)),
487
- ...ee.value.filter((r) => !r.otherMonth && r.day < e.day).map((r) => new Date(r.year, r.month, r.day))
948
+ if (dateIndex !== -1) {
949
+ selectedDates.splice(dateIndex, 1);
950
+ } else selectedDates = [...selectedDates, date];
951
+ selectedDates.sort((a, b) => a.getTime() - b.getTime());
952
+ } else selectedDates = [date];
953
+ modelVal = selectedDates;
954
+ } else if (props.exactSelection) {
955
+ modelVal = formattingExactSelection(dateMeta, date);
956
+ } else if (isRangeSelection()) {
957
+ if (calendarModelValue.value && calendarModelValue.value.length) {
958
+ let startDate = calendarModelValue.value[0];
959
+ let endDate = calendarModelValue.value[getLastIndex(calendarModelValue.value)];
960
+ if (!endDate && date.getTime() >= startDate.getTime()) {
961
+ endDate = date;
962
+ } else {
963
+ startDate = date;
964
+ endDate = null;
965
+ }
966
+ modelVal = [startDate, endDate];
967
+ } else {
968
+ modelVal = [date, null];
969
+ }
970
+ }
971
+ if (modelVal !== null) {
972
+ updateModel(modelVal);
973
+ }
974
+ hideOverlayRangeSelection(modelVal);
975
+ emit("dateSelect", date);
976
+ };
977
+ const hideOverlayRangeSelection = (modelVal) => {
978
+ const isCompleteRangeSelection = !props.exactSelection ? modelVal && modelVal[getLastIndex(modelVal)] !== null : modelVal.length > 1;
979
+ if (isRangeSelection() && props.hideOnRangeSelection && !props.showButtons && !props.showTime && isCompleteRangeSelection) {
980
+ hidePanel();
981
+ }
982
+ };
983
+ const formattingExactSelection = (dateMeta, date) => {
984
+ const startDate = previousDateMeta.value;
985
+ if (!previousDateMeta.value || startDate.day === dateMeta.day) {
986
+ previousDateMeta.value = dateMeta;
987
+ previousDatesInMonth.value = datesInMonth.value;
988
+ return [date];
989
+ }
990
+ const restDate = startDate.month === dateMeta.month ? datesInMonth.value.filter((each) => each.day > startDate.day && each.day < dateMeta.day).map((each) => new Date(each.year, each.month, each.day)) : [
991
+ ...previousDatesInMonth.value.filter((each) => !each.otherMonth && each.day > startDate.day).map((each) => new Date(each.year, each.month, each.day)),
992
+ ...datesInMonth.value.filter((each) => !each.otherMonth && each.day < dateMeta.day).map((each) => new Date(each.year, each.month, each.day))
488
993
  ];
489
994
  return [
490
- new Date(a.year, a.month, a.day),
491
- ...n,
492
- t
995
+ new Date(startDate.year, startDate.month, startDate.day),
996
+ ...restDate,
997
+ date
493
998
  ];
494
- }, J = () => {
999
+ };
1000
+ const hidePanel = () => {
495
1001
  setTimeout(() => {
496
- var e;
497
- (e = Z.value) == null || e.hide();
1002
+ var _a;
1003
+ (_a = overlayPanel.value) == null ? void 0 : _a.hide();
498
1004
  }, 150);
499
1005
  };
500
- return ge(
1006
+ watch(
501
1007
  () => [
502
- l.minDate,
503
- l.maxDate,
504
- l.excludeDates,
505
- l.maxYear,
506
- l.maxMonth
1008
+ props.minDate,
1009
+ props.maxDate,
1010
+ props.excludeDates,
1011
+ props.maxYear,
1012
+ props.maxMonth
507
1013
  ],
508
- () => R()
509
- ), ge(
510
- () => o.value,
1014
+ () => updateCalendar()
1015
+ );
1016
+ watch(
1017
+ () => calendarModelValue.value,
511
1018
  () => {
512
- fe(), ie.value = Pe();
1019
+ updateCurrentMetaData();
1020
+ inputValue.value = formatValue();
513
1021
  },
514
1022
  {
515
- immediate: !0
1023
+ immediate: true
516
1024
  }
517
- ), (l.showButtons || l.showTime) && ge(
518
- N,
519
- () => {
520
- fe(), ie.value = Pe();
521
- },
522
- {
523
- immediate: !0,
524
- deep: !0
525
- }
526
- ), (e, t) => (c(), he(Ft, {
527
- ref_key: "wrapper",
528
- ref: ue,
529
- info: e.fieldInfo,
530
- label: e.label,
531
- mandatory: e.mandatory,
532
- "show-optional-text": e.showOptionalText
533
- }, {
534
- default: ye(() => [
535
- U(e.$slots, "default", { onClick: Fe }, () => [
536
- S(Yt, { disabled: e.disabled }, {
537
- default: ye(() => [
538
- f("span", u(e.$preset.calendar.root({ props: l }), {
539
- id: e.id,
540
- "data-wv-name": "calendar",
541
- "data-wv-section": "root"
542
- }), [
543
- f("input", u({
544
- id: e.inputId,
545
- ref_key: "input",
546
- ref: we,
547
- "aria-invalid": e.invalid || void 0,
548
- disabled: e.disabled,
549
- placeholder: e.placeholder ?? q(Y).locale.defaultPlaceholder,
550
- tabindex: 0,
551
- value: ie.value,
552
- onClick: Fe,
553
- "aria-autocomplete": "none",
554
- autocomplete: "off",
555
- inputmode: "none",
556
- readonly: "",
557
- role: "combobox",
558
- type: "text"
559
- }, e.$preset.calendar.input({ props: l })), null, 16, Bt),
560
- S(X, u({
561
- onClick: at,
562
- icon: "calendar"
563
- }, e.$preset.calendar.inputicon), null, 16)
564
- ], 16, Ht)
565
- ]),
566
- _: 1
567
- }, 8, ["disabled"])
568
- ]),
569
- S(q(Tt), {
570
- ref_key: "overlayPanel",
571
- ref: Z,
572
- pt: {
573
- root: {
574
- class: [e.$preset.overlaypanel.root.class, "!mt-0", l.overlayClass]
575
- }
576
- },
577
- onHide: lt
578
- }, {
579
- default: ye(() => [
580
- f("div", u(e.$preset.calendar.panel({ props: l }), { "data-wv-section": "panel" }), [
581
- f("div", u(e.$preset.calendar.container, { "data-wv-section": "container" }), [
582
- f("div", u(e.$preset.calendar.header({ props: l, state: { currentView: p.value } }), { "data-wv-section": "navigation" }), [
583
- S(se, {
584
- onClick: Ge,
585
- class: "rotate-180 !p-1",
586
- "data-wv-section": "prevbutton",
587
- icon: "arrow-right",
588
- "icon-class": "w-5 h-5",
589
- severity: "secondary",
590
- text: ""
591
- }),
592
- f("div", Vt, [
593
- p.value == "date" ? (c(), g("button", u({ key: 0 }, e.$preset.calendar.monthTitle, {
594
- onClick: t[0] || (t[0] = (a) => p.value = "month")
595
- }), F(e.$wangsvue.config.locale.global.monthNamesShort[h.value]), 17)) : $("", !0),
596
- p.value != "year" ? (c(), g("button", u({ key: 1 }, e.$preset.calendar.yearTitle({ props: l }), {
597
- onClick: t[1] || (t[1] = (a) => p.value = "year")
598
- }), F(i.value), 17)) : $("", !0),
599
- p.value == "year" ? (c(), g("span", It, F(te.value[0].value) + " - " + F(te.value[te.value.length - 1].value), 1)) : $("", !0)
600
- ]),
601
- S(se, {
602
- onClick: Je,
603
- class: "!p-1",
604
- "data-wv-section": "nextbutton",
605
- icon: "arrow-right",
606
- "icon-class": "w-5 h-5",
607
- severity: "secondary",
608
- text: ""
609
- })
610
- ], 16),
611
- p.value === "date" ? (c(), g("div", Pt, [
612
- f("div", At, [
613
- f("div", xt, [
614
- (c(!0), g(Q, null, re(e.$wangsvue.config.locale.global.dayNamesShort, (a) => (c(), g("span", {
615
- key: a,
616
- abbr: "day",
617
- class: "text-center",
618
- "data-wv-section": "weekday"
619
- }, F(a), 1))), 128))
1025
+ );
1026
+ if (props.showButtons || props.showTime) {
1027
+ watch(
1028
+ temporaryDate,
1029
+ () => {
1030
+ updateCurrentMetaData();
1031
+ inputValue.value = formatValue();
1032
+ },
1033
+ {
1034
+ immediate: true,
1035
+ deep: true
1036
+ }
1037
+ );
1038
+ }
1039
+ return (_ctx, _cache) => {
1040
+ return openBlock(), createBlock(_sfc_main$1, {
1041
+ ref_key: "wrapper",
1042
+ ref: wrapper,
1043
+ info: _ctx.fieldInfo,
1044
+ label: _ctx.label,
1045
+ mandatory: _ctx.mandatory,
1046
+ "show-optional-text": _ctx.showOptionalText
1047
+ }, {
1048
+ default: withCtx(() => [
1049
+ renderSlot(_ctx.$slots, "default", { onClick: onInputClick }, () => [
1050
+ createVNode(_sfc_main$2, { disabled: _ctx.disabled }, {
1051
+ default: withCtx(() => [
1052
+ createElementVNode("span", mergeProps(_ctx.$preset.calendar.root({ props }), {
1053
+ id: _ctx.id,
1054
+ "data-wv-name": "calendar",
1055
+ "data-wv-section": "root"
1056
+ }), [
1057
+ createElementVNode("input", mergeProps({
1058
+ id: _ctx.inputId,
1059
+ ref_key: "input",
1060
+ ref: input,
1061
+ "aria-invalid": _ctx.invalid || void 0,
1062
+ disabled: _ctx.disabled,
1063
+ placeholder: _ctx.placeholder ?? unref(config).locale.defaultPlaceholder,
1064
+ tabindex: 0,
1065
+ value: inputValue.value,
1066
+ onClick: onInputClick,
1067
+ "aria-autocomplete": "none",
1068
+ autocomplete: "off",
1069
+ inputmode: "none",
1070
+ readonly: "",
1071
+ role: "combobox",
1072
+ type: "text"
1073
+ }, _ctx.$preset.calendar.input({ props })), null, 16, _hoisted_2),
1074
+ createVNode(_sfc_main$3, mergeProps({
1075
+ onClick: onButtonTriggerClick,
1076
+ icon: "calendar"
1077
+ }, _ctx.$preset.calendar.inputicon), null, 16)
1078
+ ], 16, _hoisted_1)
1079
+ ]),
1080
+ _: 1
1081
+ }, 8, ["disabled"])
1082
+ ]),
1083
+ createVNode(unref(script), {
1084
+ ref_key: "overlayPanel",
1085
+ ref: overlayPanel,
1086
+ pt: {
1087
+ root: {
1088
+ class: [_ctx.$preset.overlaypanel.root.class, "!mt-0", props.overlayClass]
1089
+ }
1090
+ },
1091
+ onHide: onPanelHide
1092
+ }, {
1093
+ default: withCtx(() => [
1094
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.panel({ props }), { "data-wv-section": "panel" }), [
1095
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.container, { "data-wv-section": "container" }), [
1096
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.header({ props, state: { currentView: currentView.value } }), { "data-wv-section": "navigation" }), [
1097
+ createVNode(_sfc_main$4, {
1098
+ onClick: navBackward,
1099
+ class: "rotate-180 !p-1",
1100
+ "data-wv-section": "prevbutton",
1101
+ icon: "arrow-right",
1102
+ "icon-class": "w-5 h-5",
1103
+ severity: "secondary",
1104
+ text: ""
1105
+ }),
1106
+ createElementVNode("div", _hoisted_3, [
1107
+ currentView.value == "date" ? (openBlock(), createElementBlock("button", mergeProps({ key: 0 }, _ctx.$preset.calendar.monthTitle, {
1108
+ onClick: _cache[0] || (_cache[0] = ($event) => currentView.value = "month")
1109
+ }), toDisplayString(_ctx.$wangsvue.config.locale.global.monthNamesShort[currentMonth.value]), 17)) : createCommentVNode("", true),
1110
+ currentView.value != "year" ? (openBlock(), createElementBlock("button", mergeProps({ key: 1 }, _ctx.$preset.calendar.yearTitle({ props }), {
1111
+ onClick: _cache[1] || (_cache[1] = ($event) => currentView.value = "year")
1112
+ }), toDisplayString(currentYear.value), 17)) : createCommentVNode("", true),
1113
+ currentView.value == "year" ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(yearPickerValues.value[0].value) + " - " + toDisplayString(yearPickerValues.value[yearPickerValues.value.length - 1].value), 1)) : createCommentVNode("", true)
1114
+ ]),
1115
+ createVNode(_sfc_main$4, {
1116
+ onClick: navForward,
1117
+ class: "!p-1",
1118
+ "data-wv-section": "nextbutton",
1119
+ icon: "arrow-right",
1120
+ "icon-class": "w-5 h-5",
1121
+ severity: "secondary",
1122
+ text: ""
1123
+ })
1124
+ ], 16),
1125
+ currentView.value === "date" ? (openBlock(), createElementBlock("div", _hoisted_5, [
1126
+ createElementVNode("div", _hoisted_6, [
1127
+ createElementVNode("div", _hoisted_7, [
1128
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$wangsvue.config.locale.global.dayNamesShort, (day) => {
1129
+ return openBlock(), createElementBlock("span", {
1130
+ key: day,
1131
+ abbr: "day",
1132
+ class: "text-center",
1133
+ "data-wv-section": "weekday"
1134
+ }, toDisplayString(day), 1);
1135
+ }), 128))
1136
+ ])
1137
+ ]),
1138
+ createElementVNode("div", _hoisted_8, [
1139
+ (openBlock(true), createElementBlock(Fragment, null, renderList(datesInMonth.value, (date, dayIndex) => {
1140
+ return openBlock(), createElementBlock("span", {
1141
+ key: dayIndex,
1142
+ "aria-label": date.day.toString(),
1143
+ "data-wv-other-month": date.otherMonth,
1144
+ "data-wv-today": date.today,
1145
+ "data-wv-section": "day"
1146
+ }, [
1147
+ isLoading.value && !date.otherMonth ? (openBlock(), createBlock(unref(script$1), {
1148
+ key: 0,
1149
+ class: "!w-8 !h-8",
1150
+ shape: "circle"
1151
+ })) : !isLoading.value ? (openBlock(), createElementBlock("span", mergeProps(
1152
+ {
1153
+ key: 1,
1154
+ "aria-disabled": !date.selectable,
1155
+ "data-p-disabled": date.otherMonth || !date.selectable,
1156
+ onClick: ($event) => onDateSelect($event, date),
1157
+ ref_for: true
1158
+ },
1159
+ _ctx.$preset.calendar.daylabel({
1160
+ context: {
1161
+ date,
1162
+ today: date.today,
1163
+ otherMonth: date.otherMonth,
1164
+ selected: isSelected(date),
1165
+ firstSelected: isFirstSelected(date),
1166
+ lastSelected: isLastSelected(date),
1167
+ disabled: !date.selectable
1168
+ }
1169
+ }),
1170
+ {
1171
+ "data-wv-section": "daylabel",
1172
+ draggable: "false",
1173
+ tabindex: "0"
1174
+ }
1175
+ ), [
1176
+ !date.otherMonth ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1177
+ createTextVNode(toDisplayString(date.day), 1)
1178
+ ], 64)) : createCommentVNode("", true)
1179
+ ], 16, _hoisted_10)) : createCommentVNode("", true)
1180
+ ], 8, _hoisted_9);
1181
+ }), 128))
620
1182
  ])
621
- ]),
622
- f("div", Nt, [
623
- (c(!0), g(Q, null, re(ee.value, (a, n) => (c(), g("span", {
624
- key: n,
625
- "aria-label": a.day.toString(),
626
- "data-wv-other-month": a.otherMonth,
627
- "data-wv-today": a.today,
628
- "data-wv-section": "day"
629
- }, [
630
- be.value && !a.otherMonth ? (c(), he(q($t), {
631
- key: 0,
632
- class: "!w-8 !h-8",
633
- shape: "circle"
634
- })) : be.value ? $("", !0) : (c(), g("span", u(
1183
+ ])) : createCommentVNode("", true),
1184
+ currentView.value === "month" ? (openBlock(), createElementBlock("div", mergeProps({
1185
+ key: 1,
1186
+ "data-wv-section": "monthpicker"
1187
+ }, _ctx.$preset.calendar.monthpicker), [
1188
+ (openBlock(true), createElementBlock(Fragment, null, renderList(monthPickerValues.value, (m, i) => {
1189
+ return openBlock(), createElementBlock("span", mergeProps(
635
1190
  {
636
- key: 1,
637
- "aria-disabled": !a.selectable,
638
- "data-p-disabled": a.otherMonth || !a.selectable,
639
- onClick: (r) => ce(r, a),
640
- ref_for: !0
1191
+ key: m.value,
1192
+ ref_for: true
641
1193
  },
642
- e.$preset.calendar.daylabel({
1194
+ _ctx.$preset.calendar.month({
643
1195
  context: {
644
- date: a,
645
- today: a.today,
646
- otherMonth: a.otherMonth,
647
- selected: z(a),
648
- firstSelected: Xe(a),
649
- lastSelected: Ze(a),
650
- disabled: !a.selectable
1196
+ month: m,
1197
+ monthIndex: i,
1198
+ selected: isMonthSelected(i),
1199
+ disabled: !m.selectable
651
1200
  }
652
1201
  }),
653
1202
  {
654
- "data-wv-section": "daylabel",
655
- draggable: "false",
656
- tabindex: "0"
1203
+ "data-p-disabled": !m.selectable,
1204
+ "data-p-highlight": isMonthSelected(i),
1205
+ onClick: ($event) => onMonthSelect($event, m)
657
1206
  }
658
- ), [
659
- a.otherMonth ? $("", !0) : (c(), g(Q, { key: 0 }, [
660
- Dt(F(a.day), 1)
661
- ], 64))
662
- ], 16, Et))
663
- ], 8, Ot))), 128))
664
- ])
665
- ])) : $("", !0),
666
- p.value === "month" ? (c(), g("div", u({
667
- key: 1,
668
- "data-wv-section": "monthpicker"
669
- }, e.$preset.calendar.monthpicker), [
670
- (c(!0), g(Q, null, re(We.value, (a, n) => (c(), g("span", u(
671
- {
672
- key: a.value,
673
- ref_for: !0
674
- },
675
- e.$preset.calendar.month({
676
- context: {
677
- month: a,
678
- monthIndex: n,
679
- selected: Se(n),
680
- disabled: !a.selectable
681
- }
682
- }),
683
- {
684
- "data-p-disabled": !a.selectable,
685
- "data-p-highlight": Se(n),
686
- onClick: (r) => et(r, a)
687
- }
688
- ), F(e.$wangsvue.config.locale.global.monthNamesShort[a.value]), 17, Kt))), 128))
689
- ], 16)) : $("", !0),
690
- p.value === "year" ? (c(), g("div", bt(u({ key: 2 }, e.$preset.calendar.yearpicker)), [
691
- (c(!0), g(Q, null, re(te.value, (a) => (c(), g("span", u(
692
- {
693
- key: a.value,
694
- ref_for: !0
695
- },
696
- e.$preset.calendar.year({
697
- context: {
698
- year: a,
699
- selected: $e(a.value),
700
- disabled: !a.selectable
701
- }
702
- }),
703
- {
704
- "data-p-disabled": !a.selectable,
705
- "data-p-highlight": $e(a.value),
706
- onClick: (n) => tt(n, a)
707
- }
708
- ), F(a.value), 17, Wt))), 128))
709
- ], 16)) : $("", !0)
710
- ], 16),
711
- e.showTime && p.value === "date" ? (c(), g("div", u({ key: 0 }, e.$preset.calendar.timepicker, { "data-wv-section": "timepicker" }), [
712
- f("div", u(e.$preset.calendar.hourpicker, { "data-wv-section": "hourpicker" }), [
713
- f("button", u({
714
- "aria-label": e.$wangsvue.config.locale.global.nextHour,
715
- onKeydown: [
716
- ne,
717
- t[2] || (t[2] = w((a) => M(a, 0, 1), ["enter"])),
718
- t[3] || (t[3] = w((a) => M(a, 0, 1), ["space"]))
719
- ],
720
- onKeyup: [
721
- t[4] || (t[4] = w((a) => k(a), ["enter"])),
722
- t[5] || (t[5] = w((a) => k(a), ["space"]))
723
- ],
724
- onMousedown: t[6] || (t[6] = (a) => M(a, 0, 1)),
725
- onMouseleave: t[7] || (t[7] = (a) => le()),
726
- onMouseup: t[8] || (t[8] = (a) => k(a))
727
- }, e.$preset.calendar.incrementbutton, {
728
- "data-wv-group-section": "hourpicker",
729
- "data-wv-section": "incrementbutton",
730
- type: "button"
731
- }), [
732
- U(e.$slots, "incrementicon", {}, () => [
733
- S(X, u({
734
- "data-wv-group-section": "hourpicker",
735
- "data-wv-section": "incrementicon",
736
- icon: "arrow-up-s"
737
- }, e.$preset.calendar.incrementicon), null, 16)
738
- ])
739
- ], 16, Lt),
740
- f("span", u(e.$preset.calendar.timepickerlabel, {
741
- "data-wv-group-section": "hourpicker",
742
- "data-wv-section": "timepickerlabel"
743
- }), F(Oe.value), 17),
744
- f("button", u({
745
- "aria-label": e.$wangsvue.config.locale.global.prevHour,
746
- onKeydown: [
747
- ne,
748
- t[9] || (t[9] = w((a) => M(a, 0, -1), ["enter"])),
749
- t[10] || (t[10] = w((a) => M(a, 0, -1), ["space"]))
750
- ],
751
- onKeyup: [
752
- t[11] || (t[11] = w((a) => k(a), ["enter"])),
753
- t[12] || (t[12] = w((a) => k(a), ["space"]))
754
- ],
755
- onMousedown: t[13] || (t[13] = (a) => M(a, 0, -1)),
756
- onMouseleave: t[14] || (t[14] = (a) => le()),
757
- onMouseup: t[15] || (t[15] = (a) => k(a))
758
- }, e.$preset.calendar.decrementbutton, {
759
- "data-wv-group-section": "hourpicker",
760
- "data-wv-section": "decrementbutton",
761
- type: "button"
762
- }), [
763
- U(e.$slots, "decrementicon", {}, () => [
764
- S(X, u({
765
- "data-wv-group-section": "hourpicker",
766
- "data-wv-section": "decrementicon",
767
- icon: "arrow-down"
768
- }, e.$preset.calendar.decrementicon), null, 16)
769
- ])
770
- ], 16, Rt)
771
- ], 16),
772
- f("div", u(e.$preset.calendar.separatorcontainer, { "data-wv-section": "separatorcontainer" }), [
773
- f("span", u(e.$preset.calendar.separator, { "data-wv-section": "separator" }), F(e.timeSeparator), 17)
1207
+ ), toDisplayString(_ctx.$wangsvue.config.locale.global.monthNamesShort[m.value]), 17, _hoisted_11);
1208
+ }), 128))
1209
+ ], 16)) : createCommentVNode("", true),
1210
+ currentView.value === "year" ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 2 }, _ctx.$preset.calendar.yearpicker)), [
1211
+ (openBlock(true), createElementBlock(Fragment, null, renderList(yearPickerValues.value, (y) => {
1212
+ return openBlock(), createElementBlock("span", mergeProps(
1213
+ {
1214
+ key: y.value,
1215
+ ref_for: true
1216
+ },
1217
+ _ctx.$preset.calendar.year({
1218
+ context: {
1219
+ year: y,
1220
+ selected: isYearSelected(y.value),
1221
+ disabled: !y.selectable
1222
+ }
1223
+ }),
1224
+ {
1225
+ "data-p-disabled": !y.selectable,
1226
+ "data-p-highlight": isYearSelected(y.value),
1227
+ onClick: ($event) => onYearSelect($event, y)
1228
+ }
1229
+ ), toDisplayString(y.value), 17, _hoisted_12);
1230
+ }), 128))
1231
+ ], 16)) : createCommentVNode("", true)
774
1232
  ], 16),
775
- f("div", u(e.$preset.calendar.minutepicker, { "data-wv-section": "minutepicker" }), [
776
- f("button", u({
777
- "aria-label": e.$wangsvue.config.locale.global.nextMinute,
778
- disabled: e.disabled,
779
- onKeydown: [
780
- ne,
781
- t[16] || (t[16] = w((a) => M(a, 1, 1), ["enter"])),
782
- t[17] || (t[17] = w((a) => M(a, 1, 1), ["space"]))
783
- ],
784
- onKeyup: [
785
- t[18] || (t[18] = w((a) => k(a), ["enter"])),
786
- t[19] || (t[19] = w((a) => k(a), ["space"]))
787
- ],
788
- onMousedown: t[20] || (t[20] = (a) => M(a, 1, 1)),
789
- onMouseleave: t[21] || (t[21] = (a) => le()),
790
- onMouseup: t[22] || (t[22] = (a) => k(a))
791
- }, e.$preset.calendar.incrementbutton, {
792
- "data-wv-group-section": "minutepicker",
793
- "data-wv-section": "incrementbutton",
794
- type: "button"
795
- }), [
796
- U(e.$slots, "incrementicon", {}, () => [
797
- S(X, u({
798
- "data-wv-group-section": "minutepicker",
799
- "data-wv-section": "incrementicon",
800
- icon: "arrow-up-s"
801
- }, e.$preset.calendar.incrementicon), null, 16)
802
- ])
803
- ], 16, jt),
804
- f("span", u(e.$preset.calendar.timepickerlabel, { "data-wv-section": "timepickerlabel" }), F(Ee.value), 17),
805
- f("button", u({
806
- "aria-label": e.$wangsvue.config.locale.global.prevMinute,
807
- disabled: e.disabled,
808
- onKeydown: [
809
- ne,
810
- t[23] || (t[23] = w((a) => M(a, 1, -1), ["enter"])),
811
- t[24] || (t[24] = w((a) => M(a, 1, -1), ["space"]))
1233
+ _ctx.showTime && currentView.value === "date" ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$preset.calendar.timepicker, { "data-wv-section": "timepicker" }), [
1234
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.hourpicker, { "data-wv-section": "hourpicker" }), [
1235
+ createElementVNode("button", mergeProps({
1236
+ "aria-label": _ctx.$wangsvue.config.locale.global.nextHour,
1237
+ onKeydown: [
1238
+ onContainerButtonKeydown,
1239
+ _cache[2] || (_cache[2] = withKeys(($event) => onTimePickerElementMouseDown($event, 0, 1), ["enter"])),
1240
+ _cache[3] || (_cache[3] = withKeys(($event) => onTimePickerElementMouseDown($event, 0, 1), ["space"]))
1241
+ ],
1242
+ onKeyup: [
1243
+ _cache[4] || (_cache[4] = withKeys(($event) => onTimePickerElementMouseUp($event), ["enter"])),
1244
+ _cache[5] || (_cache[5] = withKeys(($event) => onTimePickerElementMouseUp($event), ["space"]))
1245
+ ],
1246
+ onMousedown: _cache[6] || (_cache[6] = ($event) => onTimePickerElementMouseDown($event, 0, 1)),
1247
+ onMouseleave: _cache[7] || (_cache[7] = ($event) => onTimePickerElementMouseLeave()),
1248
+ onMouseup: _cache[8] || (_cache[8] = ($event) => onTimePickerElementMouseUp($event))
1249
+ }, _ctx.$preset.calendar.incrementbutton, {
1250
+ "data-wv-group-section": "hourpicker",
1251
+ "data-wv-section": "incrementbutton",
1252
+ type: "button"
1253
+ }), [
1254
+ renderSlot(_ctx.$slots, "incrementicon", {}, () => [
1255
+ createVNode(_sfc_main$3, mergeProps({
1256
+ "data-wv-group-section": "hourpicker",
1257
+ "data-wv-section": "incrementicon",
1258
+ icon: "arrow-up-s"
1259
+ }, _ctx.$preset.calendar.incrementicon), null, 16)
1260
+ ])
1261
+ ], 16, _hoisted_13),
1262
+ createElementVNode("span", mergeProps(_ctx.$preset.calendar.timepickerlabel, {
1263
+ "data-wv-group-section": "hourpicker",
1264
+ "data-wv-section": "timepickerlabel"
1265
+ }), toDisplayString(formattedCurrentHour.value), 17),
1266
+ createElementVNode("button", mergeProps({
1267
+ "aria-label": _ctx.$wangsvue.config.locale.global.prevHour,
1268
+ onKeydown: [
1269
+ onContainerButtonKeydown,
1270
+ _cache[9] || (_cache[9] = withKeys(($event) => onTimePickerElementMouseDown($event, 0, -1), ["enter"])),
1271
+ _cache[10] || (_cache[10] = withKeys(($event) => onTimePickerElementMouseDown($event, 0, -1), ["space"]))
1272
+ ],
1273
+ onKeyup: [
1274
+ _cache[11] || (_cache[11] = withKeys(($event) => onTimePickerElementMouseUp($event), ["enter"])),
1275
+ _cache[12] || (_cache[12] = withKeys(($event) => onTimePickerElementMouseUp($event), ["space"]))
1276
+ ],
1277
+ onMousedown: _cache[13] || (_cache[13] = ($event) => onTimePickerElementMouseDown($event, 0, -1)),
1278
+ onMouseleave: _cache[14] || (_cache[14] = ($event) => onTimePickerElementMouseLeave()),
1279
+ onMouseup: _cache[15] || (_cache[15] = ($event) => onTimePickerElementMouseUp($event))
1280
+ }, _ctx.$preset.calendar.decrementbutton, {
1281
+ "data-wv-group-section": "hourpicker",
1282
+ "data-wv-section": "decrementbutton",
1283
+ type: "button"
1284
+ }), [
1285
+ renderSlot(_ctx.$slots, "decrementicon", {}, () => [
1286
+ createVNode(_sfc_main$3, mergeProps({
1287
+ "data-wv-group-section": "hourpicker",
1288
+ "data-wv-section": "decrementicon",
1289
+ icon: "arrow-down"
1290
+ }, _ctx.$preset.calendar.decrementicon), null, 16)
1291
+ ])
1292
+ ], 16, _hoisted_14)
1293
+ ], 16),
1294
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.separatorcontainer, { "data-wv-section": "separatorcontainer" }), [
1295
+ createElementVNode("span", mergeProps(_ctx.$preset.calendar.separator, { "data-wv-section": "separator" }), toDisplayString(_ctx.timeSeparator), 17)
1296
+ ], 16),
1297
+ createElementVNode("div", mergeProps(_ctx.$preset.calendar.minutepicker, { "data-wv-section": "minutepicker" }), [
1298
+ createElementVNode("button", mergeProps({
1299
+ "aria-label": _ctx.$wangsvue.config.locale.global.nextMinute,
1300
+ disabled: _ctx.disabled,
1301
+ onKeydown: [
1302
+ onContainerButtonKeydown,
1303
+ _cache[16] || (_cache[16] = withKeys(($event) => onTimePickerElementMouseDown($event, 1, 1), ["enter"])),
1304
+ _cache[17] || (_cache[17] = withKeys(($event) => onTimePickerElementMouseDown($event, 1, 1), ["space"]))
1305
+ ],
1306
+ onKeyup: [
1307
+ _cache[18] || (_cache[18] = withKeys(($event) => onTimePickerElementMouseUp($event), ["enter"])),
1308
+ _cache[19] || (_cache[19] = withKeys(($event) => onTimePickerElementMouseUp($event), ["space"]))
1309
+ ],
1310
+ onMousedown: _cache[20] || (_cache[20] = ($event) => onTimePickerElementMouseDown($event, 1, 1)),
1311
+ onMouseleave: _cache[21] || (_cache[21] = ($event) => onTimePickerElementMouseLeave()),
1312
+ onMouseup: _cache[22] || (_cache[22] = ($event) => onTimePickerElementMouseUp($event))
1313
+ }, _ctx.$preset.calendar.incrementbutton, {
1314
+ "data-wv-group-section": "minutepicker",
1315
+ "data-wv-section": "incrementbutton",
1316
+ type: "button"
1317
+ }), [
1318
+ renderSlot(_ctx.$slots, "incrementicon", {}, () => [
1319
+ createVNode(_sfc_main$3, mergeProps({
1320
+ "data-wv-group-section": "minutepicker",
1321
+ "data-wv-section": "incrementicon",
1322
+ icon: "arrow-up-s"
1323
+ }, _ctx.$preset.calendar.incrementicon), null, 16)
1324
+ ])
1325
+ ], 16, _hoisted_15),
1326
+ createElementVNode("span", mergeProps(_ctx.$preset.calendar.timepickerlabel, { "data-wv-section": "timepickerlabel" }), toDisplayString(formattedCurrentMinute.value), 17),
1327
+ createElementVNode("button", mergeProps({
1328
+ "aria-label": _ctx.$wangsvue.config.locale.global.prevMinute,
1329
+ disabled: _ctx.disabled,
1330
+ onKeydown: [
1331
+ onContainerButtonKeydown,
1332
+ _cache[23] || (_cache[23] = withKeys(($event) => onTimePickerElementMouseDown($event, 1, -1), ["enter"])),
1333
+ _cache[24] || (_cache[24] = withKeys(($event) => onTimePickerElementMouseDown($event, 1, -1), ["space"]))
1334
+ ],
1335
+ onKeyup: [
1336
+ _cache[25] || (_cache[25] = withKeys(($event) => onTimePickerElementMouseUp($event), ["enter"])),
1337
+ _cache[26] || (_cache[26] = withKeys(($event) => onTimePickerElementMouseUp($event), ["space"]))
1338
+ ],
1339
+ onMousedown: _cache[27] || (_cache[27] = ($event) => onTimePickerElementMouseDown($event, 1, -1)),
1340
+ onMouseleave: _cache[28] || (_cache[28] = ($event) => onTimePickerElementMouseLeave()),
1341
+ onMouseup: _cache[29] || (_cache[29] = ($event) => onTimePickerElementMouseUp($event))
1342
+ }, _ctx.$preset.calendar.decrementbutton, {
1343
+ "data-wv-group-section": "minutepicker",
1344
+ "data-wv-section": "decrementbutton",
1345
+ type: "button"
1346
+ }), [
1347
+ renderSlot(_ctx.$slots, "decrementicon", {}, () => [
1348
+ createVNode(_sfc_main$3, mergeProps({
1349
+ "data-wv-group-section": "minutepicker",
1350
+ "data-wv-section": "decrementicon",
1351
+ icon: "arrow-down"
1352
+ }, _ctx.$preset.calendar.decrementicon), null, 16)
1353
+ ])
1354
+ ], 16, _hoisted_16)
1355
+ ], 16),
1356
+ _ctx.hourFormat === "12" ? (openBlock(), createBlock(unref(script$2), {
1357
+ key: 0,
1358
+ "model-value": pm.value,
1359
+ options: [
1360
+ { label: "AM", value: false },
1361
+ { label: "PM", value: true }
812
1362
  ],
813
- onKeyup: [
814
- t[25] || (t[25] = w((a) => k(a), ["enter"])),
815
- t[26] || (t[26] = w((a) => k(a), ["space"]))
816
- ],
817
- onMousedown: t[27] || (t[27] = (a) => M(a, 1, -1)),
818
- onMouseleave: t[28] || (t[28] = (a) => le()),
819
- onMouseup: t[29] || (t[29] = (a) => k(a))
820
- }, e.$preset.calendar.decrementbutton, {
821
- "data-wv-group-section": "minutepicker",
822
- "data-wv-section": "decrementbutton",
823
- type: "button"
824
- }), [
825
- U(e.$slots, "decrementicon", {}, () => [
826
- S(X, u({
827
- "data-wv-group-section": "minutepicker",
828
- "data-wv-section": "decrementicon",
829
- icon: "arrow-down"
830
- }, e.$preset.calendar.decrementicon), null, 16)
831
- ])
832
- ], 16, Ut)
833
- ], 16),
834
- e.hourFormat === "12" ? (c(), he(q(St), {
835
- key: 0,
836
- "model-value": y.value,
837
- options: [
838
- { label: "AM", value: !1 },
839
- { label: "PM", value: !0 }
840
- ],
841
- "onUpdate:modelValue": dt,
842
- "option-label": "label",
843
- "option-value": "value"
844
- }, null, 8, ["model-value"])) : $("", !0)
845
- ], 16)) : $("", !0),
846
- U(e.$slots, "addon-overlay"),
847
- e.showButtons || e.showTime ? wt((c(), g("div", qt, [
848
- S(se, {
849
- label: q(Y).locale.cancelFooterButtonLabel,
850
- onClick: Ie,
851
- severity: "secondary",
852
- text: ""
853
- }, null, 8, ["label"]),
854
- S(se, {
855
- disabled: !o.value,
856
- label: q(Y).locale.applyFooterButtonLabel,
857
- onClick: it
858
- }, null, 8, ["disabled", "label"])
859
- ], 512)), [
860
- [Mt, p.value === "date"]
861
- ]) : $("", !0)
862
- ], 16)
863
- ]),
864
- _: 3
865
- }, 8, ["pt"]),
866
- S(Ct, {
867
- message: e.$attrs["error-message"]
868
- }, null, 8, ["message"])
869
- ]),
870
- _: 3
871
- }, 8, ["info", "label", "mandatory", "show-optional-text"]));
1363
+ "onUpdate:modelValue": toggleAMPM,
1364
+ "option-label": "label",
1365
+ "option-value": "value"
1366
+ }, null, 8, ["model-value"])) : createCommentVNode("", true)
1367
+ ], 16)) : createCommentVNode("", true),
1368
+ renderSlot(_ctx.$slots, "addon-overlay"),
1369
+ _ctx.showButtons || _ctx.showTime ? withDirectives((openBlock(), createElementBlock("div", _hoisted_17, [
1370
+ createVNode(_sfc_main$4, {
1371
+ label: unref(config).locale.cancelFooterButtonLabel,
1372
+ onClick: revertChanges,
1373
+ severity: "secondary",
1374
+ text: ""
1375
+ }, null, 8, ["label"]),
1376
+ createVNode(_sfc_main$4, {
1377
+ disabled: !calendarModelValue.value,
1378
+ label: unref(config).locale.applyFooterButtonLabel,
1379
+ onClick: applyChanges
1380
+ }, null, 8, ["disabled", "label"])
1381
+ ], 512)), [
1382
+ [vShow, currentView.value === "date"]
1383
+ ]) : createCommentVNode("", true)
1384
+ ], 16)
1385
+ ]),
1386
+ _: 3
1387
+ }, 8, ["pt"]),
1388
+ createVNode(_sfc_main$5, {
1389
+ message: _ctx.$attrs["error-message"]
1390
+ }, null, 8, ["message"])
1391
+ ]),
1392
+ _: 3
1393
+ }, 8, ["info", "label", "mandatory", "show-optional-text"]);
1394
+ };
872
1395
  }
873
1396
  });
874
1397
  export {
875
- la as _
1398
+ _sfc_main as _
876
1399
  };