@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.
- package/animation/index.es.js +54 -37
- package/assets/lottiejs/loading-page.es.js +14 -9
- package/assets/lottiejs/loading-plane.es.js +2 -2
- package/assets/lottiejs/loading-table.es.js +14 -9
- package/assets/lottiejs/no-data.es.js +14 -9
- package/backgroundimagecropper/index.es.js +61 -37
- package/badge/index.es.js +77 -67
- package/badgegroup/index.es.js +62 -50
- package/basecalendar/index.es.js +1258 -735
- package/basetree/index.es.js +213 -113
- package/breadcrumb/index.es.js +46 -38
- package/button/index.es.js +60 -54
- package/buttonbulkaction/index.es.js +168 -117
- package/buttoncopy/index.es.js +25 -22
- package/buttondownload/index.es.js +125 -76
- package/buttonfilter/index.es.js +21 -15
- package/buttonradio/index.es.js +91 -67
- package/buttonsearch/index.es.js +62 -46
- package/buttonselecttree/index.es.js +233 -172
- package/buttontoggle/index.es.js +8 -6
- package/calendar/index.es.js +113 -58
- package/card/index.es.js +44 -42
- package/checkbox/index.es.js +105 -74
- package/codesnippet/index.es.js +91 -71
- package/codesnippetadapter/index.es.js +25 -21
- package/columnlist/index.es.js +249 -171
- package/components.d.ts +0 -21
- package/config/defaultProps.es.js +9 -9
- package/config/index.es.js +11 -10
- package/config/locale.es.js +2 -2
- package/customcolumn/index.es.js +95 -78
- package/datatable/index.es.js +1071 -732
- package/dialog/index.es.js +54 -54
- package/dialogconfirm/index.es.js +90 -75
- package/dialogform/index.es.js +170 -133
- package/dialogselecttree/index.es.js +242 -194
- package/directives/focus.es.js +13 -8
- package/dropdown/index.es.js +250 -196
- package/editor/index.es.js +694 -498
- package/editorbutton/index.es.js +21 -19
- package/event-bus/index.es.js +3 -3
- package/event-bus/mitt.es.js +37 -20
- package/fieldwrapper/index.es.js +30 -25
- package/fileupload/index.es.js +230 -140
- package/filtercontainer/index.es.js +299 -222
- package/form/index.es.js +176 -126
- package/gallerypreview/index.es.js +138 -101
- package/icon/index.es.js +38 -36
- package/image/index.es.js +161 -108
- package/imagecompressor/index.es.js +616 -449
- package/imageinputinfo/index.es.js +26 -22
- package/inlinemessage/index.es.js +77 -65
- package/inputbadge/index.es.js +230 -156
- package/inputcurrency/index.es.js +146 -109
- package/inputemail/index.es.js +18 -16
- package/inputgroup/index.es.js +19 -16
- package/inputnumber/index.es.js +252 -182
- package/inputpassword/index.es.js +120 -94
- package/inputphonenumber/index.es.js +1017 -550
- package/inputrangenumber/index.es.js +129 -98
- package/inputtext/index.es.js +264 -189
- package/inputurl/index.es.js +31 -29
- package/invisiblefield/index.es.js +24 -16
- package/litedropdown/index.es.js +87 -81
- package/loading/index.es.js +21 -19
- package/loading-page-BXZ4fLOS.js +8 -0
- package/loading-page-BuLpsb_1.js +8 -0
- package/loading-page-CNqVBg__.js +4 -0
- package/loading-page-DbhhZih2.js +4 -0
- package/loading-page-DjfWXoOy.js +8 -0
- package/loading-page-S-KRY5zm.js +4 -0
- package/loading-plane-C1mi7Whv.js +4 -0
- package/loading-plane-CWq1hz_l.js +8 -0
- package/loading-table-B7LAXzAp.js +4 -0
- package/loading-table-BLmgKUsR.js +4 -0
- package/loading-table-CG7-cuhv.js +8 -0
- package/loading-table-CUPS49ta.js +4 -0
- package/loading-table-CuWWrTbv.js +8 -0
- package/loading-table-DbBzVwaZ.js +8 -0
- package/mentionlist/index.es.js +77 -44
- package/mentionsection/index.es.js +53 -43
- package/menu/index.es.js +65 -51
- package/menuitem/index.es.js +39 -37
- package/multirow/index.es.js +29 -28
- package/multiselect/index.es.js +184 -152
- package/no-data-B781skt3.js +4 -0
- package/no-data-CAksOnDl.js +4 -0
- package/no-data-DCsjBXQR.js +4 -0
- package/no-data-Dz0QOe7Q.js +8 -0
- package/no-data-_Huxiv9q.js +8 -0
- package/no-data-ybRQontJ.js +8 -0
- package/overlaypanel/index.es.js +49 -36
- package/package.json +1 -1
- package/paginator/index.es.js +36 -33
- package/plugins/WangsVue.es.js +63 -45
- package/plugins/formValidation.es.js +15 -11
- package/progressbar/index.es.js +39 -32
- package/quickfilter/index.es.js +94 -81
- package/stats.html +1 -1
- package/style.css +2 -2
- package/tabmenu/index.es.js +18 -16
- package/textarea/index.es.js +94 -72
- package/timeline/index.es.js +124 -102
- package/timelinecontentbytype/index.es.js +114 -92
- package/toast/index.es.js +67 -54
- package/toggleswitch/index.es.js +83 -66
- package/tree/index.es.js +306 -198
- package/treenode/index.es.js +464 -339
- package/treesearchinput/index.es.js +32 -26
- package/usergroup/index.es.js +83 -67
- package/username/index.es.js +99 -85
- package/utils/addAttachment.util.es.js +47 -21
- package/utils/baseToast.util.es.js +41 -33
- package/utils/convertJsonImage.util.es.js +24 -24
- package/utils/date.util.es.js +131 -106
- package/utils/exportToExcel.util.es.js +81 -47
- package/utils/filterOptions.util.es.js +8 -2
- package/utils/genPlaceholder.util.es.js +30 -16
- package/utils/getProjectPermission.util.es.js +15 -12
- package/utils/getSalesRole.util.es.js +4 -4
- package/utils/getUser.util.es.js +2 -2
- package/utils/getUserType.util.es.js +13 -8
- package/utils/isIntersect.es.js +4 -2
- package/utils/mergePropsWithDefaults.util.es.js +7 -6
- package/utils/object.util.es.js +88 -54
- package/utils/queryParamsStringfy.util.es.js +19 -11
- package/utils/role.util.es.js +5 -4
- package/utils/statusSeverity.util.es.js +20 -5
- package/utils/textFormatter.util.es.js +28 -50
- package/utils/toast.util.es.js +8 -5
- package/utils/xlsx.util.es.js +12 -6
- package/validatormessage/index.es.js +9 -9
- package/vendor/@popperjs/core/lib/createPopper.es.js +110 -83
- package/vendor/@popperjs/core/lib/dom-utils/contains.es.js +14 -13
- package/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.es.js +33 -18
- package/vendor/@popperjs/core/lib/dom-utils/getClippingRect.es.js +55 -31
- package/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.es.js +43 -22
- package/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.es.js +5 -5
- package/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.es.js +23 -13
- package/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.es.js +17 -9
- package/vendor/@popperjs/core/lib/dom-utils/getNodeName.es.js +3 -3
- package/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.es.js +11 -7
- package/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.es.js +42 -26
- package/vendor/@popperjs/core/lib/dom-utils/getParentNode.es.js +13 -10
- package/vendor/@popperjs/core/lib/dom-utils/getScrollParent.es.js +13 -7
- package/vendor/@popperjs/core/lib/dom-utils/getViewportRect.es.js +25 -15
- package/vendor/@popperjs/core/lib/dom-utils/getWindow.es.js +8 -7
- package/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.es.js +8 -6
- package/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.es.js +6 -6
- package/vendor/@popperjs/core/lib/dom-utils/instanceOf.es.js +16 -15
- package/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/isScrollParent.es.js +5 -5
- package/vendor/@popperjs/core/lib/dom-utils/isTableElement.es.js +4 -4
- package/vendor/@popperjs/core/lib/dom-utils/listScrollParents.es.js +17 -11
- package/vendor/@popperjs/core/lib/enums.es.js +43 -20
- package/vendor/@popperjs/core/lib/modifiers/applyStyles.es.js +49 -25
- package/vendor/@popperjs/core/lib/modifiers/arrow.es.js +61 -26
- package/vendor/@popperjs/core/lib/modifiers/computeStyles.es.js +101 -69
- package/vendor/@popperjs/core/lib/modifiers/eventListeners.es.js +30 -16
- package/vendor/@popperjs/core/lib/modifiers/flip.es.js +99 -60
- package/vendor/@popperjs/core/lib/modifiers/hide.es.js +44 -31
- package/vendor/@popperjs/core/lib/modifiers/offset.es.js +32 -20
- package/vendor/@popperjs/core/lib/modifiers/popperOffsets.es.js +11 -11
- package/vendor/@popperjs/core/lib/modifiers/preventOverflow.es.js +91 -40
- package/vendor/@popperjs/core/lib/popper.es.js +14 -13
- package/vendor/@popperjs/core/lib/utils/computeAutoPlacement.es.js +29 -21
- package/vendor/@popperjs/core/lib/utils/computeOffsets.es.js +41 -36
- package/vendor/@popperjs/core/lib/utils/debounce.es.js +11 -7
- package/vendor/@popperjs/core/lib/utils/detectOverflow.es.js +42 -28
- package/vendor/@popperjs/core/lib/utils/expandToHashMap.es.js +5 -4
- package/vendor/@popperjs/core/lib/utils/getAltAxis.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getBasePlacement.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getFreshSideObject.es.js +2 -2
- package/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/getOppositePlacement.es.js +5 -5
- package/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.es.js +5 -5
- package/vendor/@popperjs/core/lib/utils/getVariation.es.js +3 -3
- package/vendor/@popperjs/core/lib/utils/math.es.js +6 -4
- package/vendor/@popperjs/core/lib/utils/mergeByName.es.js +11 -10
- package/vendor/@popperjs/core/lib/utils/mergePaddingObject.es.js +4 -4
- package/vendor/@popperjs/core/lib/utils/orderModifiers.es.js +30 -22
- package/vendor/@popperjs/core/lib/utils/rectToClientRect.es.js +7 -7
- package/vendor/@popperjs/core/lib/utils/userAgent.es.js +9 -6
- package/vendor/@popperjs/core/lib/utils/within.es.js +8 -8
- package/vendor/@tiptap/core/dist/index.es.js +3494 -2000
- package/vendor/@tiptap/extension-bold/dist/index.es.js +29 -19
- package/vendor/@tiptap/extension-bubble-menu/dist/index.es.js +145 -71
- package/vendor/@tiptap/extension-bullet-list/dist/index.es.js +32 -19
- package/vendor/@tiptap/extension-code/dist/index.es.js +22 -14
- package/vendor/@tiptap/extension-document/dist/index.es.js +4 -4
- package/vendor/@tiptap/extension-floating-menu/dist/index.es.js +106 -51
- package/vendor/@tiptap/extension-heading/dist/index.es.js +38 -22
- package/vendor/@tiptap/extension-history/dist/index.es.js +11 -7
- package/vendor/@tiptap/extension-image/dist/index.es.js +20 -17
- package/vendor/@tiptap/extension-italic/dist/index.es.js +28 -18
- package/vendor/@tiptap/extension-link/dist/index.es.js +236 -147
- package/vendor/@tiptap/extension-list-item/dist/index.es.js +6 -6
- package/vendor/@tiptap/extension-mention/dist/index.es.js +98 -63
- package/vendor/@tiptap/extension-ordered-list/dist/index.es.js +38 -25
- package/vendor/@tiptap/extension-paragraph/dist/index.es.js +8 -6
- package/vendor/@tiptap/extension-placeholder/dist/index.es.js +34 -27
- package/vendor/@tiptap/extension-text/dist/index.es.js +3 -3
- package/vendor/@tiptap/extension-underline/dist/index.es.js +16 -10
- package/vendor/@tiptap/suggestion/dist/index.es.js +174 -90
- package/vendor/@tiptap/vue-3/dist/index.es.js +287 -188
- package/vendor/@wangs-ui/core/components/p-BU8h34na.es.js +17 -14
- package/vendor/@wangs-ui/core/components/p-C5lMEBcj.es.js +69 -55
- package/vendor/@wangs-ui/core/components/p-CKYwZoTo.es.js +26 -22
- package/vendor/@wangs-ui/core/components/p-CsoK-EWG.es.js +147 -102
- package/vendor/@wangs-ui/core/components/p-DPHEi31J.es.js +102 -77
- package/vendor/@wangs-ui/core/components/p-DTTCzifR.es.js +1298 -551
- package/vendor/@wangs-ui/core/components/p-Duri5p90.es.js +60 -49
- package/vendor/@wangs-ui/core/components/wangs-button.es.js +19 -15
- package/vendor/@wangs-ui/core/components/wangs-icon.es.js +3 -3
- package/vendor/@wangs-ui/core/components/wangs-input-otp.es.js +3 -3
- package/vendor/@wangs-ui/core/components/wangs-tab-menu.es.js +3 -3
- package/vendor/@wangs-ui/core/dist/esm/index-DCkh3cGv.es.js +116 -102
- package/vendor/@wangs-ui/vue/dist/index.es.js +77 -77
- package/vendor/base64toblob/base64toblob.es.js +31 -15
- package/vendor/highlight.js/es/core.es.js +5 -5
- package/vendor/highlight.js/es/languages/javascript.es.js +237 -193
- package/vendor/highlight.js/es/languages/json.es.js +18 -15
- package/vendor/highlight.js/es/languages/typescript.es.js +288 -228
- package/vendor/highlight.js/es/languages/vbscript-html.es.js +2 -2
- package/vendor/highlight.js/lib/core.es.js +1144 -666
- package/vendor/linkifyjs/dist/linkify.es.es.js +858 -405
- package/vendor/lodash/_Symbol.es.js +11 -8
- package/vendor/lodash/_baseGetTag.es.js +19 -12
- package/vendor/lodash/_baseTrim.es.js +13 -10
- package/vendor/lodash/_freeGlobal.es.js +10 -8
- package/vendor/lodash/_getRawTag.es.js +28 -15
- package/vendor/lodash/_objectToString.es.js +12 -9
- package/vendor/lodash/_root.es.js +12 -8
- package/vendor/lodash/_trimmedEndIndex.es.js +14 -11
- package/vendor/lodash/debounce.es.js +92 -54
- package/vendor/lodash/isObject.es.js +11 -9
- package/vendor/lodash/isObjectLike.es.js +10 -8
- package/vendor/lodash/isSymbol.es.js +14 -11
- package/vendor/lodash/now.es.js +12 -9
- package/vendor/lodash/throttle.es.js +25 -17
- package/vendor/lodash/toNumber.es.js +33 -23
- package/vendor/lodash-es/_DataView.es.js +4 -4
- package/vendor/lodash-es/_Hash.es.js +17 -16
- package/vendor/lodash-es/_ListCache.es.js +17 -16
- package/vendor/lodash-es/_Map.es.js +4 -4
- package/vendor/lodash-es/_MapCache.es.js +17 -16
- package/vendor/lodash-es/_Promise.es.js +4 -4
- package/vendor/lodash-es/_Set.es.js +4 -4
- package/vendor/lodash-es/_SetCache.es.js +12 -10
- package/vendor/lodash-es/_Stack.es.js +15 -15
- package/vendor/lodash-es/_Symbol.es.js +3 -3
- package/vendor/lodash-es/_Uint8Array.es.js +3 -3
- package/vendor/lodash-es/_WeakMap.es.js +4 -4
- package/vendor/lodash-es/_arrayEach.es.js +9 -5
- package/vendor/lodash-es/_arrayFilter.es.js +9 -6
- package/vendor/lodash-es/_arrayLikeKeys.es.js +21 -17
- package/vendor/lodash-es/_arrayPush.es.js +7 -5
- package/vendor/lodash-es/_arraySome.es.js +9 -6
- package/vendor/lodash-es/_assignValue.es.js +10 -7
- package/vendor/lodash-es/_assocIndexOf.es.js +9 -6
- package/vendor/lodash-es/_baseAssignValue.es.js +13 -9
- package/vendor/lodash-es/_baseClone.es.js +67 -49
- package/vendor/lodash-es/_baseCreate.es.js +15 -11
- package/vendor/lodash-es/_baseGetAllKeys.es.js +6 -6
- package/vendor/lodash-es/_baseGetTag.es.js +11 -7
- package/vendor/lodash-es/_baseIsArguments.es.js +6 -6
- package/vendor/lodash-es/_baseIsEqual.es.js +11 -5
- package/vendor/lodash-es/_baseIsEqualDeep.es.js +39 -26
- package/vendor/lodash-es/_baseIsMap.es.js +6 -6
- package/vendor/lodash-es/_baseIsNative.es.js +18 -12
- package/vendor/lodash-es/_baseIsSet.es.js +6 -6
- package/vendor/lodash-es/_baseIsTypedArray.es.js +11 -9
- package/vendor/lodash-es/_baseKeys.es.js +16 -11
- package/vendor/lodash-es/_baseTimes.es.js +7 -5
- package/vendor/lodash-es/_baseTrim.es.js +5 -5
- package/vendor/lodash-es/_baseUnary.es.js +4 -4
- package/vendor/lodash-es/_cacheHas.es.js +3 -3
- package/vendor/lodash-es/_cloneArrayBuffer.es.js +6 -5
- package/vendor/lodash-es/_cloneBuffer.es.js +11 -6
- package/vendor/lodash-es/_cloneDataView.es.js +5 -5
- package/vendor/lodash-es/_cloneRegExp.es.js +6 -5
- package/vendor/lodash-es/_cloneSymbol.es.js +5 -5
- package/vendor/lodash-es/_cloneTypedArray.es.js +5 -5
- package/vendor/lodash-es/_coreJsData.es.js +3 -3
- package/vendor/lodash-es/_defineProperty.es.js +7 -6
- package/vendor/lodash-es/_equalArrays.es.js +38 -28
- package/vendor/lodash-es/_equalByTag.es.js +55 -41
- package/vendor/lodash-es/_equalObjects.es.js +42 -28
- package/vendor/lodash-es/_freeGlobal.es.js +2 -2
- package/vendor/lodash-es/_getAllKeys.es.js +6 -6
- package/vendor/lodash-es/_getMapData.es.js +5 -5
- package/vendor/lodash-es/_getNative.es.js +6 -6
- package/vendor/lodash-es/_getPrototype.es.js +3 -3
- package/vendor/lodash-es/_getRawTag.es.js +20 -10
- package/vendor/lodash-es/_getSymbols.es.js +15 -8
- package/vendor/lodash-es/_getTag.es.js +31 -25
- package/vendor/lodash-es/_getValue.es.js +3 -3
- package/vendor/lodash-es/_hashClear.es.js +5 -4
- package/vendor/lodash-es/_hashDelete.es.js +5 -4
- package/vendor/lodash-es/_hashGet.es.js +11 -9
- package/vendor/lodash-es/_hashHas.es.js +7 -6
- package/vendor/lodash-es/_hashSet.es.js +8 -6
- package/vendor/lodash-es/_initCloneArray.es.js +10 -5
- package/vendor/lodash-es/_initCloneByTag.es.js +39 -38
- package/vendor/lodash-es/_initCloneObject.es.js +6 -6
- package/vendor/lodash-es/_isIndex.es.js +7 -5
- package/vendor/lodash-es/_isKeyable.es.js +4 -4
- package/vendor/lodash-es/_isMasked.es.js +7 -7
- package/vendor/lodash-es/_isPrototype.es.js +5 -5
- package/vendor/lodash-es/_listCacheClear.es.js +4 -3
- package/vendor/lodash-es/_listCacheDelete.es.js +17 -9
- package/vendor/lodash-es/_listCacheGet.es.js +5 -5
- package/vendor/lodash-es/_listCacheHas.es.js +4 -4
- package/vendor/lodash-es/_listCacheSet.es.js +11 -5
- package/vendor/lodash-es/_mapCacheClear.es.js +10 -9
- package/vendor/lodash-es/_mapCacheDelete.es.js +6 -5
- package/vendor/lodash-es/_mapCacheGet.es.js +4 -4
- package/vendor/lodash-es/_mapCacheHas.es.js +4 -4
- package/vendor/lodash-es/_mapCacheSet.es.js +7 -5
- package/vendor/lodash-es/_mapToArray.es.js +7 -6
- package/vendor/lodash-es/_nativeCreate.es.js +3 -3
- package/vendor/lodash-es/_nativeKeys.es.js +3 -3
- package/vendor/lodash-es/_nodeUtil.es.js +13 -6
- package/vendor/lodash-es/_objectToString.es.js +5 -4
- package/vendor/lodash-es/_overArg.es.js +4 -4
- package/vendor/lodash-es/_root.es.js +4 -3
- package/vendor/lodash-es/_setCacheAdd.es.js +5 -4
- package/vendor/lodash-es/_setCacheHas.es.js +3 -3
- package/vendor/lodash-es/_setToArray.es.js +7 -6
- package/vendor/lodash-es/_stackClear.es.js +5 -4
- package/vendor/lodash-es/_stackDelete.es.js +5 -4
- package/vendor/lodash-es/_stackGet.es.js +3 -3
- package/vendor/lodash-es/_stackHas.es.js +3 -3
- package/vendor/lodash-es/_stackSet.es.js +18 -13
- package/vendor/lodash-es/_toSource.es.js +9 -8
- package/vendor/lodash-es/_trimmedEndIndex.es.js +7 -6
- package/vendor/lodash-es/cloneDeep.es.js +5 -5
- package/vendor/lodash-es/debounce.es.js +84 -49
- package/vendor/lodash-es/eq.es.js +3 -3
- package/vendor/lodash-es/isArguments.es.js +9 -6
- package/vendor/lodash-es/isArray.es.js +2 -2
- package/vendor/lodash-es/isArrayLike.es.js +5 -5
- package/vendor/lodash-es/isBuffer.es.js +9 -4
- package/vendor/lodash-es/isEqual.es.js +4 -4
- package/vendor/lodash-es/isFunction.es.js +10 -9
- package/vendor/lodash-es/isLength.es.js +4 -4
- package/vendor/lodash-es/isMap.es.js +6 -5
- package/vendor/lodash-es/isObject.es.js +4 -4
- package/vendor/lodash-es/isObjectLike.es.js +3 -3
- package/vendor/lodash-es/isSet.es.js +6 -5
- package/vendor/lodash-es/isSymbol.es.js +6 -6
- package/vendor/lodash-es/isTypedArray.es.js +6 -5
- package/vendor/lodash-es/keys.es.js +6 -6
- package/vendor/lodash-es/now.es.js +4 -4
- package/vendor/lodash-es/stubArray.es.js +2 -2
- package/vendor/lodash-es/stubFalse.es.js +3 -3
- package/vendor/lodash-es/toNumber.es.js +25 -18
- package/vendor/lodash-es/toString.es.js +2 -2
- package/vendor/lodash-es/uniqueId.es.js +6 -6
- package/vendor/orderedmap/dist/index.es.js +65 -49
- package/vendor/primevue/api/api.esm.es.js +214 -121
- package/vendor/primevue/avatar/avatar.esm.es.js +44 -41
- package/vendor/primevue/avatar/style/avatarstyle.esm.es.js +12 -11
- package/vendor/primevue/avatargroup/avatargroup.esm.es.js +17 -16
- package/vendor/primevue/avatargroup/style/avatargroupstyle.esm.es.js +6 -5
- package/vendor/primevue/badge/badge.esm.es.js +21 -20
- package/vendor/primevue/badge/style/badgestyle.esm.es.js +19 -18
- package/vendor/primevue/base/style/basestyle.esm.es.js +88 -99
- package/vendor/primevue/basecomponent/basecomponent.esm.es.js +327 -261
- package/vendor/primevue/basedirective/basedirective.esm.es.js +257 -186
- package/vendor/primevue/baseicon/baseicon.esm.es.js +55 -49
- package/vendor/primevue/baseicon/style/baseiconstyle.esm.es.js +5 -35
- package/vendor/primevue/button/button.esm.es.js +76 -72
- package/vendor/primevue/button/style/buttonstyle.esm.es.js +46 -39
- package/vendor/primevue/card/card.esm.es.js +30 -29
- package/vendor/primevue/card/style/cardstyle.esm.es.js +6 -5
- package/vendor/primevue/checkbox/checkbox.esm.es.js +109 -101
- package/vendor/primevue/checkbox/style/checkboxstyle.esm.es.js +12 -11
- package/vendor/primevue/config/config.esm.es.js +76 -58
- package/vendor/primevue/dialog/dialog.esm.es.js +421 -281
- package/vendor/primevue/dialog/style/dialogstyle.esm.es.js +26 -22
- package/vendor/primevue/dropdown/dropdown.esm.es.js +956 -742
- package/vendor/primevue/dropdown/style/dropdownstyle.esm.es.js +33 -31
- package/vendor/primevue/fileupload/fileupload.esm.es.js +559 -450
- package/vendor/primevue/fileupload/style/fileuploadstyle.esm.es.js +14 -13
- package/vendor/primevue/focustrap/focustrap.esm.es.js +128 -90
- package/vendor/primevue/focustrap/style/focustrapstyle.esm.es.js +2 -2
- package/vendor/primevue/icons/angledoubleleft/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angledoubleright/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angledown/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleleft/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleright/index.esm.es.js +13 -11
- package/vendor/primevue/icons/angleup/index.esm.es.js +13 -11
- package/vendor/primevue/icons/blank/index.esm.es.js +13 -11
- package/vendor/primevue/icons/check/index.esm.es.js +13 -11
- package/vendor/primevue/icons/chevrondown/index.esm.es.js +13 -11
- package/vendor/primevue/icons/exclamationtriangle/index.esm.es.js +17 -13
- package/vendor/primevue/icons/eye/index.esm.es.js +13 -11
- package/vendor/primevue/icons/eyeslash/index.esm.es.js +13 -11
- package/vendor/primevue/icons/infocircle/index.esm.es.js +13 -11
- package/vendor/primevue/icons/plus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/refresh/index.esm.es.js +13 -11
- package/vendor/primevue/icons/search/index.esm.es.js +13 -11
- package/vendor/primevue/icons/searchminus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/searchplus/index.esm.es.js +13 -11
- package/vendor/primevue/icons/spinner/index.esm.es.js +13 -11
- package/vendor/primevue/icons/times/index.esm.es.js +13 -11
- package/vendor/primevue/icons/timescircle/index.esm.es.js +13 -11
- package/vendor/primevue/icons/undo/index.esm.es.js +13 -11
- package/vendor/primevue/icons/upload/index.esm.es.js +13 -11
- package/vendor/primevue/icons/windowmaximize/index.esm.es.js +13 -11
- package/vendor/primevue/icons/windowminimize/index.esm.es.js +13 -11
- package/vendor/primevue/image/image.esm.es.js +280 -235
- package/vendor/primevue/image/style/imagestyle.esm.es.js +18 -17
- package/vendor/primevue/inputgroup/inputgroup.esm.es.js +17 -16
- package/vendor/primevue/inputgroup/style/inputgroupstyle.esm.es.js +6 -5
- package/vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js +17 -16
- package/vendor/primevue/inputgroupaddon/style/inputgroupaddonstyle.esm.es.js +6 -5
- package/vendor/primevue/inputnumber/inputnumber.esm.es.js +834 -566
- package/vendor/primevue/inputnumber/style/inputnumberstyle.esm.es.js +23 -22
- package/vendor/primevue/inputtext/inputtext.esm.es.js +32 -30
- package/vendor/primevue/inputtext/style/inputtextstyle.esm.es.js +13 -12
- package/vendor/primevue/menu/menu.esm.es.js +402 -304
- package/vendor/primevue/menu/style/menustyle.esm.es.js +14 -13
- package/vendor/primevue/message/message.esm.es.js +126 -112
- package/vendor/primevue/message/style/messagestyle.esm.es.js +9 -8
- package/vendor/primevue/multiselect/multiselect.esm.es.js +1083 -835
- package/vendor/primevue/multiselect/style/multiselectstyle.esm.es.js +38 -36
- package/vendor/primevue/overlayeventbus/overlayeventbus.esm.es.js +3 -3
- package/vendor/primevue/overlaypanel/overlaypanel.esm.es.js +275 -169
- package/vendor/primevue/overlaypanel/style/overlaypanelstyle.esm.es.js +9 -8
- package/vendor/primevue/paginator/paginator.esm.es.js +513 -469
- package/vendor/primevue/paginator/style/paginatorstyle.esm.es.js +50 -43
- package/vendor/primevue/password/password.esm.es.js +306 -233
- package/vendor/primevue/password/style/passwordstyle.esm.es.js +26 -24
- package/vendor/primevue/portal/portal.esm.es.js +17 -17
- package/vendor/primevue/progressbar/progressbar.esm.es.js +37 -35
- package/vendor/primevue/progressbar/style/progressbarstyle.esm.es.js +10 -9
- package/vendor/primevue/ripple/ripple.esm.es.js +90 -62
- package/vendor/primevue/ripple/style/ripplestyle.esm.es.js +6 -5
- package/vendor/primevue/selectbutton/selectbutton.esm.es.js +213 -167
- package/vendor/primevue/selectbutton/style/selectbuttonstyle.esm.es.js +14 -13
- package/vendor/primevue/skeleton/skeleton.esm.es.js +28 -26
- package/vendor/primevue/skeleton/style/skeletonstyle.esm.es.js +13 -11
- package/vendor/primevue/textarea/style/textareastyle.esm.es.js +12 -11
- package/vendor/primevue/textarea/textarea.esm.es.js +49 -33
- package/vendor/primevue/timeline/style/timelinestyle.esm.es.js +9 -8
- package/vendor/primevue/timeline/timeline.esm.es.js +53 -52
- package/vendor/primevue/toast/style/toaststyle.esm.es.js +54 -46
- package/vendor/primevue/toast/toast.esm.es.js +309 -260
- package/vendor/primevue/toasteventbus/toasteventbus.esm.es.js +3 -3
- package/vendor/primevue/toastservice/toastservice.esm.es.js +16 -15
- package/vendor/primevue/tooltip/style/tooltipstyle.esm.es.js +6 -5
- package/vendor/primevue/tooltip/tooltip.esm.es.js +383 -186
- package/vendor/primevue/usestyle/usestyle.esm.es.js +94 -64
- package/vendor/primevue/usetoast/usetoast.esm.es.js +9 -8
- package/vendor/primevue/utils/utils.esm.es.js +1078 -772
- package/vendor/primevue/virtualscroller/style/virtualscrollerstyle.esm.es.js +5 -67
- package/vendor/primevue/virtualscroller/virtualscroller.esm.es.js +655 -428
- package/vendor/prosemirror-commands/dist/index.es.js +454 -316
- package/vendor/prosemirror-history/dist/index.es.js +286 -178
- package/vendor/prosemirror-keymap/dist/index.es.js +68 -48
- package/vendor/prosemirror-model/dist/index.es.js +1905 -1436
- package/vendor/prosemirror-schema-list/dist/index.es.js +115 -73
- package/vendor/prosemirror-state/dist/index.es.js +467 -353
- package/vendor/prosemirror-transform/dist/index.es.js +1146 -829
- package/vendor/prosemirror-view/dist/index.es.js +4127 -2719
- package/vendor/rope-sequence/dist/index.es.js +165 -82
- package/vendor/simplebar-core/dist/index.es.js +670 -242
- package/vendor/simplebar-vue/dist/simplebar-vue.esm.es.js +73 -60
- package/vendor/single-spa/lib/es2015/esm/single-spa.min.es.js +511 -510
- package/vendor/tippy.js/dist/tippy.esm.es.js +971 -525
- package/vendor/vee-validate/dist/vee-validate.esm.es.js +1830 -1097
- package/vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js +740 -738
- package/vendor/w3c-keyname/index.es.js +25 -13
- package/wangsvue.es.js +167 -208
- package/wangsvue.esm.browser.js +49417 -48026
- package/wangsvue.system.js +67600 -234
- package/api/index.es.js +0 -149
- package/apiitem/index.es.js +0 -611
- package/assignmember/index.es.js +0 -434
- package/attachment/index.es.js +0 -118
- package/attachmentchangelog/index.es.js +0 -79
- package/attachmentitem/index.es.js +0 -231
- package/attachmentthumbnail/index.es.js +0 -83
- package/changelog/index.d.ts +0 -164
- package/changelog/index.es.js +0 -85
- package/changelogfilter/index.es.js +0 -113
- package/changelogpage/index.d.ts +0 -184
- package/changelogpage/index.es.js +0 -176
- package/checklist/index.es.js +0 -571
- package/checklistchangelog/index.es.js +0 -85
- package/comment/index.d.ts +0 -187
- package/comment/index.es.js +0 -267
- package/commentblock/index.es.js +0 -337
- package/confirmdeploy/index.es.js +0 -64
- package/dependencycol/index.es.js +0 -32
- package/description/index.es.js +0 -135
- package/descriptiontab/index.es.js +0 -30
- package/detailmember/index.d.ts +0 -77
- package/detailmember/index.es.js +0 -32
- package/detailmemberadmin/index.es.js +0 -210
- package/detailmemberleader/index.es.js +0 -164
- package/detailmemberlog/index.es.js +0 -117
- package/detailsprint/index.d.ts +0 -86
- package/detailsprint/index.es.js +0 -414
- package/dialogaddattachment/index.es.js +0 -273
- package/dialogaddchecklist/index.es.js +0 -120
- package/dialogaddeditapi/index.es.js +0 -87
- package/dialogaddpbi/index.es.js +0 -197
- package/dialogadjustmenttask/index.es.js +0 -484
- package/dialogadjustmenttaskheader/index.es.js +0 -193
- package/dialogapichangelog/index.es.js +0 -83
- package/dialogassignmember/index.es.js +0 -171
- package/dialogconfirmapproval/index.es.js +0 -54
- package/dialogconfirmchecklist/index.es.js +0 -189
- package/dialogconfirmdeletetask/index.es.js +0 -70
- package/dialogconfirmdeletetaskpermanently/index.es.js +0 -50
- package/dialogconfirmedit/index.es.js +0 -50
- package/dialogconfirmfinishtask/index.es.js +0 -50
- package/dialogconfirmrestoretask/index.es.js +0 -46
- package/dialogconfirmsprint/index.es.js +0 -42
- package/dialogcopyapi/index.es.js +0 -130
- package/dialogcustomdependency/index.es.js +0 -55
- package/dialogdetailchecklisttemplate/index.es.js +0 -214
- package/dialogdetailcomponent/index.es.js +0 -121
- package/dialogdetailpbi/index.es.js +0 -192
- package/dialogfinishreview/index.es.js +0 -126
- package/dialogimprovementtask/index.es.js +0 -191
- package/dialogmemberadmin/index.es.js +0 -93
- package/dialogpreparepbi/index.es.js +0 -93
- package/dialogpriorityvalue/index.es.js +0 -85
- package/dialogreportbug/index.es.js +0 -207
- package/dialogreviewleader/index.es.js +0 -280
- package/dialogsavechecklisttemplate/index.es.js +0 -127
- package/dialogselectproject/index.es.js +0 -69
- package/dialogsetduration/index.es.js +0 -109
- package/dialogsettasklink/index.es.js +0 -153
- package/dialogtestapi/index.es.js +0 -389
- package/eventlogtab/index.es.js +0 -50
- package/infotasktab/index.es.js +0 -186
- package/inputadditional/index.es.js +0 -62
- package/inputinitialname/index.d.ts +0 -118
- package/inputinitialname/index.es.js +0 -95
- package/inputrepositoryname/index.d.ts +0 -86
- package/inputrepositoryname/index.es.js +0 -41
- package/isrequiredtext/index.es.js +0 -16
- package/legend/index.es.js +0 -727
- package/legendlist/index.es.js +0 -33
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CgfbWppy.js +0 -1
- package/loading-page-CoC9UhfC.js +0 -4
- package/loading-page-CoXtqoc9.js +0 -4
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-page-f8D03l3G.js +0 -4
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-plane-CoXtqoc9.js +0 -4
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-ByUoWqUo.js +0 -4
- package/loading-table-BygEMzFM.js +0 -4
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-D9bw9OcI.js +0 -4
- package/loading-table-chOgXi94.js +0 -1
- package/no-data-CTKux8RI.js +0 -4
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-DLHO1L_u.js +0 -4
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-g0dJCy2p.js +0 -4
- package/no-data-y1X5WtcQ.js +0 -1
- package/notificationitem/index.d.ts +0 -107
- package/notificationitem/index.es.js +0 -333
- package/reviewitem/index.es.js +0 -65
- package/reviewtab/index.es.js +0 -44
- package/services/calendar.service.es.js +0 -32
- package/sonarqubesummary/index.es.js +0 -234
- package/sprintsummary/index.es.js +0 -73
- package/summaryaccordion/index.d.ts +0 -121
- package/summaryaccordion/index.es.js +0 -365
- package/taskdependency/index.es.js +0 -686
- package/taskdetail/index.d.ts +0 -82
- package/taskdetail/index.es.js +0 -491
- package/taskdetailpbi/index.d.ts +0 -35
- package/taskdetailpbi/index.es.js +0 -172
- package/taskdetailunassignedpbi/index.es.js +0 -261
- package/tasklink/index.es.js +0 -257
- package/tasklinkchangelog/index.es.js +0 -93
- package/tasklist/index.es.js +0 -92
- package/taskmore/index.es.js +0 -52
- package/taskstatusbadge/index.es.js +0 -18
- package/tasktable/index.d.ts +0 -87
- package/tasktable/index.es.js +0 -832
- package/ticket/index.es.js +0 -151
- package/tooltipspan/index.es.js +0 -30
- package/utils/updateSprintStatus.util.es.js +0 -17
- package/valueformdatainput/index.es.js +0 -70
- package/workcalendar/index.es.js +0 -351
package/basecalendar/index.es.js
CHANGED
|
@@ -1,28 +1,45 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { u as
|
|
3
|
-
import { s as
|
|
4
|
-
import { s as
|
|
5
|
-
import { s as $
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
const
|
|
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
|
-
}
|
|
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
|
-
}
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_8 = {
|
|
19
26
|
class: "grid grid-cols-7",
|
|
20
27
|
"data-wv-section": "tablebody"
|
|
21
|
-
}
|
|
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
|
-
}
|
|
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:
|
|
59
|
+
hideOnRangeSelection: { type: Boolean, default: true },
|
|
43
60
|
view: { default: "date" },
|
|
44
|
-
showYear: { type: Boolean, default:
|
|
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:
|
|
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:
|
|
84
|
+
exactSelection: { type: Boolean, default: false }
|
|
68
85
|
},
|
|
69
86
|
emits: ["update:modelValue", "update:epochTimeMillis", "monthChange", "yearChange", "dateSelect"],
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
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
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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 (
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
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 (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
156
|
+
return true;
|
|
93
157
|
};
|
|
94
|
-
for (let
|
|
95
|
-
|
|
96
|
-
value:
|
|
97
|
-
selectable:
|
|
158
|
+
for (let i = 0; i <= 11; i++) {
|
|
159
|
+
months.push({
|
|
160
|
+
value: i,
|
|
161
|
+
selectable: isSelectableMonth(i)
|
|
98
162
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
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
|
|
111
|
-
|
|
112
|
-
value:
|
|
113
|
-
selectable:
|
|
184
|
+
for (let i = 0; i < 10; i++) {
|
|
185
|
+
years.push({
|
|
186
|
+
value: base + i,
|
|
187
|
+
selectable: isSelectableYear(base + i)
|
|
114
188
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
})
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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 (
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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 (
|
|
206
|
-
const [
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
|
|
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
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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 (
|
|
224
|
-
const [
|
|
225
|
-
return
|
|
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
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
(
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
|
|
525
|
+
hidePanel();
|
|
526
|
+
event.preventDefault();
|
|
276
527
|
break;
|
|
277
528
|
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
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
|
-
|
|
563
|
+
if (direction === 1) incrementHour(event);
|
|
564
|
+
else decrementHour(event);
|
|
295
565
|
break;
|
|
296
566
|
case 1:
|
|
297
|
-
|
|
567
|
+
if (direction === 1) incrementMinute(event);
|
|
568
|
+
else decrementMinute(event);
|
|
298
569
|
break;
|
|
299
570
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
|
|
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 (
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
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
|
-
|
|
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
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
if (!e)
|
|
798
|
+
}
|
|
799
|
+
return formattedValue;
|
|
800
|
+
};
|
|
801
|
+
const formatDate = (date, format) => {
|
|
802
|
+
if (!date) {
|
|
376
803
|
return "";
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
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
|
-
|
|
838
|
+
output += formatNumber("d", date.getDate(), 2);
|
|
397
839
|
break;
|
|
398
840
|
case "D":
|
|
399
|
-
|
|
841
|
+
output += formatName(
|
|
400
842
|
"D",
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
843
|
+
date.getDay(),
|
|
844
|
+
config.locale.global.dayNamesShort,
|
|
845
|
+
config.locale.global.dayNames
|
|
404
846
|
);
|
|
405
847
|
break;
|
|
406
848
|
case "o":
|
|
407
|
-
|
|
849
|
+
output += formatNumber(
|
|
408
850
|
"o",
|
|
409
851
|
Math.round(
|
|
410
852
|
(new Date(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
).getTime() - new Date(
|
|
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
|
-
|
|
862
|
+
output += formatNumber("m", date.getMonth() + 1, 2);
|
|
421
863
|
break;
|
|
422
864
|
case "M":
|
|
423
|
-
|
|
865
|
+
output += formatName(
|
|
424
866
|
"M",
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
867
|
+
date.getMonth(),
|
|
868
|
+
config.locale.global.monthNamesShort,
|
|
869
|
+
config.locale.global.monthNames
|
|
428
870
|
);
|
|
429
871
|
break;
|
|
430
872
|
case "y":
|
|
431
|
-
|
|
873
|
+
output += lookAhead("y") ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? "0" : "") + date.getFullYear() % 100;
|
|
432
874
|
break;
|
|
433
875
|
case "@":
|
|
434
|
-
|
|
876
|
+
output += date.getTime();
|
|
435
877
|
break;
|
|
436
878
|
case "!":
|
|
437
|
-
|
|
879
|
+
output += date.getTime() * 1e4 + ticksTo1970;
|
|
438
880
|
break;
|
|
439
881
|
case "'":
|
|
440
|
-
|
|
882
|
+
if (lookAhead("'")) {
|
|
883
|
+
output += "'";
|
|
884
|
+
} else {
|
|
885
|
+
literal = true;
|
|
886
|
+
}
|
|
441
887
|
break;
|
|
442
888
|
default:
|
|
443
|
-
|
|
889
|
+
output += format.charAt(iFormat);
|
|
444
890
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
return output;
|
|
895
|
+
};
|
|
896
|
+
const formatTime = (date) => {
|
|
897
|
+
if (!date) {
|
|
448
898
|
return "";
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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(
|
|
491
|
-
...
|
|
492
|
-
|
|
995
|
+
new Date(startDate.year, startDate.month, startDate.day),
|
|
996
|
+
...restDate,
|
|
997
|
+
date
|
|
493
998
|
];
|
|
494
|
-
}
|
|
999
|
+
};
|
|
1000
|
+
const hidePanel = () => {
|
|
495
1001
|
setTimeout(() => {
|
|
496
|
-
var
|
|
497
|
-
(
|
|
1002
|
+
var _a;
|
|
1003
|
+
(_a = overlayPanel.value) == null ? void 0 : _a.hide();
|
|
498
1004
|
}, 150);
|
|
499
1005
|
};
|
|
500
|
-
|
|
1006
|
+
watch(
|
|
501
1007
|
() => [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
1008
|
+
props.minDate,
|
|
1009
|
+
props.maxDate,
|
|
1010
|
+
props.excludeDates,
|
|
1011
|
+
props.maxYear,
|
|
1012
|
+
props.maxMonth
|
|
507
1013
|
],
|
|
508
|
-
() =>
|
|
509
|
-
)
|
|
510
|
-
|
|
1014
|
+
() => updateCalendar()
|
|
1015
|
+
);
|
|
1016
|
+
watch(
|
|
1017
|
+
() => calendarModelValue.value,
|
|
511
1018
|
() => {
|
|
512
|
-
|
|
1019
|
+
updateCurrentMetaData();
|
|
1020
|
+
inputValue.value = formatValue();
|
|
513
1021
|
},
|
|
514
1022
|
{
|
|
515
|
-
immediate:
|
|
1023
|
+
immediate: true
|
|
516
1024
|
}
|
|
517
|
-
)
|
|
518
|
-
|
|
519
|
-
(
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
"
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
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
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
"
|
|
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:
|
|
637
|
-
|
|
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
|
-
|
|
1194
|
+
_ctx.$preset.calendar.month({
|
|
643
1195
|
context: {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
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-
|
|
655
|
-
|
|
656
|
-
|
|
1203
|
+
"data-p-disabled": !m.selectable,
|
|
1204
|
+
"data-p-highlight": isMonthSelected(i),
|
|
1205
|
+
onClick: ($event) => onMonthSelect($event, m)
|
|
657
1206
|
}
|
|
658
|
-
), [
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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
|
-
|
|
776
|
-
|
|
777
|
-
"
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
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
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
],
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
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
|
-
|
|
1398
|
+
_sfc_main as _
|
|
876
1399
|
};
|