@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/datatable/index.es.js
CHANGED
|
@@ -1,42 +1,68 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { s as
|
|
3
|
-
import { e as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { m as
|
|
9
|
-
import { s as
|
|
10
|
-
import { u as
|
|
11
|
-
import { s as
|
|
12
|
-
import { O as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { _ as $
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { _ as
|
|
19
|
-
import { _ as
|
|
20
|
-
import { _ as $
|
|
21
|
-
import { _ as
|
|
22
|
-
import { _ as
|
|
1
|
+
import { defineComponent, mergeModels, useModel, computed, inject, ref, shallowRef, onMounted, onUnmounted, watch, createElementBlock, openBlock, normalizeProps, guardReactiveProps, unref, createElementVNode, withDirectives, createCommentVNode, createVNode, createBlock, mergeProps, withCtx, Fragment, renderList, createTextVNode, toDisplayString, withModifiers, normalizeClass, resolveDynamicComponent, toHandlers, vShow, nextTick } from "vue";
|
|
2
|
+
import { s as simplebar } from "../vendor/simplebar-vue/dist/simplebar-vue.esm.es.js";
|
|
3
|
+
import { e as eventBus } from "../event-bus/index.es.js";
|
|
4
|
+
import { u as useWangsVueConfig } from "../plugins/WangsVue.es.js";
|
|
5
|
+
import { u as useToast } from "../utils/baseToast.util.es.js";
|
|
6
|
+
import { f as formatDate } from "../utils/date.util.es.js";
|
|
7
|
+
import { n as normalizeTableData, e as exportToExcel } from "../utils/exportToExcel.util.es.js";
|
|
8
|
+
import { m as mergePropsWithDefaults } from "../utils/mergePropsWithDefaults.util.es.js";
|
|
9
|
+
import { s as setNestedPropertyValue, g as getNestedPropertyValue } from "../utils/object.util.es.js";
|
|
10
|
+
import { u as useLoadingStore } from "../buttondownload/index.es.js";
|
|
11
|
+
import { s as script } from "../vendor/primevue/paginator/paginator.esm.es.js";
|
|
12
|
+
import { O as ObjectUtils } from "../vendor/primevue/utils/utils.esm.es.js";
|
|
13
|
+
import { _ as _sfc_main$1 } from "../checkbox/index.es.js";
|
|
14
|
+
import { _ as _sfc_main$4 } from "../animation/index.es.js";
|
|
15
|
+
import { _ as _sfc_main$2 } from "../button/index.es.js";
|
|
16
|
+
import { _ as _sfc_main$9 } from "../customcolumn/index.es.js";
|
|
17
|
+
import { _ as _sfc_main$6 } from "../dialogconfirm/index.es.js";
|
|
18
|
+
import { _ as _sfc_main$3 } from "../icon/index.es.js";
|
|
19
|
+
import { _ as _sfc_main$8 } from "../menu/index.es.js";
|
|
20
|
+
import { _ as _sfc_main$a } from "../toast/index.es.js";
|
|
21
|
+
import { _ as _sfc_main$5 } from "../toggleswitch/index.es.js";
|
|
22
|
+
import { _ as _sfc_main$7 } from "../multirow/index.es.js";
|
|
23
23
|
/* empty css */
|
|
24
|
-
import { c as
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
import { c as cloneDeep } from "../vendor/lodash-es/cloneDeep.es.js";
|
|
25
|
+
import { _ as _export_sfc } from "../backgroundimagecropper/index.es.js";
|
|
26
|
+
function adjustMenuPositionHelper(event) {
|
|
27
|
+
let el = event.target;
|
|
28
|
+
if (el.tagName === "UL") {
|
|
29
|
+
el = el.parentElement;
|
|
30
|
+
}
|
|
31
|
+
const { offsetHeight = 0 } = el;
|
|
32
|
+
const maxHeight = window.innerHeight * 90 / 100;
|
|
33
|
+
if (offsetHeight >= maxHeight) {
|
|
34
|
+
el.style.transform = "translateY(5vh)";
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
|
-
const
|
|
37
|
+
const isArrayIncluded = (smallArray, largeArray) => {
|
|
38
|
+
return smallArray.every((element) => largeArray.includes(element));
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_1 = ["id"];
|
|
41
|
+
const _hoisted_2 = ["onClick"];
|
|
42
|
+
const _hoisted_3 = { class: "flex" };
|
|
43
|
+
const _hoisted_4 = ["id"];
|
|
44
|
+
const _hoisted_5 = { key: 0 };
|
|
45
|
+
const _hoisted_6 = ["colspan"];
|
|
46
|
+
const _hoisted_7 = ["id", "draggable", "onClick", "onDblclick", "onDragenter", "onDragstart"];
|
|
47
|
+
const _hoisted_8 = ["onClick"];
|
|
48
|
+
const _hoisted_9 = ["colspan"];
|
|
49
|
+
const _hoisted_10 = ["colspan"];
|
|
50
|
+
const _hoisted_11 = ["colspan"];
|
|
51
|
+
const _hoisted_12 = ["colspan"];
|
|
52
|
+
const _hoisted_13 = ["colspan"];
|
|
53
|
+
const _hoisted_14 = ["contenteditable", "onBlur", "onKeypress"];
|
|
54
|
+
const _hoisted_15 = { key: 1 };
|
|
55
|
+
const _hoisted_16 = { key: 2 };
|
|
56
|
+
const _hoisted_17 = ["colspan"];
|
|
57
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
32
58
|
__name: "DataTable",
|
|
33
|
-
props: /* @__PURE__ */
|
|
59
|
+
props: /* @__PURE__ */ mergeModels({
|
|
34
60
|
treeTable: { type: Boolean },
|
|
35
61
|
childTableProps: {},
|
|
36
62
|
tableName: { default: "datatable" },
|
|
37
63
|
tableTitle: { default: void 0 },
|
|
38
64
|
columns: {},
|
|
39
|
-
useOption: { type: Boolean, default:
|
|
65
|
+
useOption: { type: Boolean, default: true },
|
|
40
66
|
data: {},
|
|
41
67
|
dataKey: { default: "_id" },
|
|
42
68
|
disableKey: { default: "isDefault" },
|
|
@@ -50,7 +76,7 @@ const It = (W, $) => W.every((t) => $.includes(t)), zt = ["id"], jt = ["onClick"
|
|
|
50
76
|
rows: {},
|
|
51
77
|
isSelectedAll: { type: Boolean },
|
|
52
78
|
filters: {},
|
|
53
|
-
lazy: { type: Boolean, default:
|
|
79
|
+
lazy: { type: Boolean, default: true },
|
|
54
80
|
loading: { type: Boolean },
|
|
55
81
|
selectionType: { default: "checkbox" },
|
|
56
82
|
useSelection: { type: Boolean },
|
|
@@ -59,7 +85,7 @@ const It = (W, $) => W.every((t) => $.includes(t)), zt = ["id"], jt = ["onClick"
|
|
|
59
85
|
usePaginator: { type: Boolean },
|
|
60
86
|
options: { default: () => [] },
|
|
61
87
|
singleSelect: { type: Boolean },
|
|
62
|
-
customColumn: { type: Boolean, default:
|
|
88
|
+
customColumn: { type: Boolean, default: true },
|
|
63
89
|
scrollHeight: {},
|
|
64
90
|
rowHeight: { default: "fixed" },
|
|
65
91
|
reorderable: { type: Boolean },
|
|
@@ -69,921 +95,1234 @@ const It = (W, $) => W.every((t) => $.includes(t)), zt = ["id"], jt = ["onClick"
|
|
|
69
95
|
emptyTableMessage: {},
|
|
70
96
|
singleSelection: {}
|
|
71
97
|
}, {
|
|
72
|
-
singleSelection: {},
|
|
73
|
-
singleSelectionModifiers: {}
|
|
98
|
+
"singleSelection": {},
|
|
99
|
+
"singleSelectionModifiers": {}
|
|
74
100
|
}),
|
|
75
|
-
emits: /* @__PURE__ */
|
|
76
|
-
setup(
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
emits: /* @__PURE__ */ mergeModels(["toggleOption", "selectData", "rowSelect", "page", "sort", "update:selectedData", "update:singleSelection", "cellEdited", "input", "rowReorder"], ["update:singleSelection"]),
|
|
102
|
+
setup(__props, { emit: __emit }) {
|
|
103
|
+
const props = __props;
|
|
104
|
+
const emit = __emit;
|
|
105
|
+
const singleSelection = useModel(__props, "singleSelection");
|
|
106
|
+
const { defaultProps, locale } = useWangsVueConfig("DataTable");
|
|
107
|
+
const config = computed(() => mergePropsWithDefaults(props, defaultProps));
|
|
108
|
+
const Preset = inject("preset", {}).datatable;
|
|
109
|
+
const rowsPerPageOptions = [10, 25, 50, 100];
|
|
110
|
+
const useToastConfig = inject("useToastConfig");
|
|
111
|
+
const toast = useToast(useToastConfig);
|
|
112
|
+
const { setLoading } = useLoadingStore();
|
|
113
|
+
const dataTableID = (() => {
|
|
114
|
+
const path = window.location.pathname.replace("/", "").split("/").join("-");
|
|
115
|
+
return `${path}-${props.tableName}`;
|
|
116
|
+
})();
|
|
117
|
+
const currentPageTableData = ref(props.data ?? []);
|
|
118
|
+
const originalTableData = shallowRef(props.data ?? []);
|
|
119
|
+
const expandedRows = ref({});
|
|
120
|
+
const visibleColumns = ref(props.columns);
|
|
121
|
+
const tableElement = ref();
|
|
122
|
+
const rowSingleActionCell = ref();
|
|
123
|
+
const checkboxSelection = shallowRef([]);
|
|
124
|
+
const rowReorderEventPayload = shallowRef();
|
|
125
|
+
const customColumnKey = shallowRef(0);
|
|
126
|
+
const loadingTable = shallowRef(false);
|
|
127
|
+
const loadingRows = shallowRef(false);
|
|
128
|
+
const columnKey = shallowRef(0);
|
|
129
|
+
const tableKey = shallowRef(0);
|
|
130
|
+
const paginatorKey = shallowRef(0);
|
|
131
|
+
const dragging = shallowRef(false);
|
|
132
|
+
const draggedRow = shallowRef();
|
|
133
|
+
const customColumn = ref();
|
|
134
|
+
const optionMenu = ref();
|
|
135
|
+
const rowReorderData = ref([]);
|
|
136
|
+
const filterQueryParams = shallowRef({});
|
|
137
|
+
const searchQueryParam = shallowRef();
|
|
138
|
+
const tagQueryParam = shallowRef();
|
|
139
|
+
const sortBy = shallowRef();
|
|
140
|
+
const sortOrder = shallowRef();
|
|
141
|
+
const tablePage = shallowRef(1);
|
|
142
|
+
const tableRows = shallowRef(10);
|
|
143
|
+
const totalRecords = shallowRef(0);
|
|
144
|
+
const showConfirmToggle = ref({});
|
|
145
|
+
const visibleChildTableColumns = computed(() => {
|
|
146
|
+
var _a, _b;
|
|
147
|
+
if ((_a = props.childTableProps) == null ? void 0 : _a.columns)
|
|
148
|
+
return (_b = props.childTableProps) == null ? void 0 : _b.columns.filter((col) => {
|
|
149
|
+
var _a2;
|
|
150
|
+
return !col.parentColumnsFields || ((_a2 = col.parentColumnsFields) == null ? void 0 : _a2.some(
|
|
151
|
+
(field) => visibleColumns.value.some((c) => c.field === field)
|
|
152
|
+
));
|
|
153
|
+
});
|
|
154
|
+
return visibleColumns.value;
|
|
155
|
+
});
|
|
156
|
+
const columnsCount = computed(() => {
|
|
157
|
+
return visibleColumns.value.length + (props.selectionType === "checkbox" ? 1 : 0) + (props.useOption ? 1 : 0) + (props.reorderable ? 1 : 0) + (props.treeTable ? 1 : 0);
|
|
158
|
+
});
|
|
159
|
+
const queryParams = computed(() => ({
|
|
160
|
+
...props.defaultQueryParams,
|
|
161
|
+
search: props.lazy ? searchQueryParam.value : props.search,
|
|
162
|
+
tag: props.lazy ? tagQueryParam.value : void 0,
|
|
163
|
+
page: props.usePaginator ? tablePage.value : void 0,
|
|
164
|
+
limit: props.usePaginator ? tableRows.value : void 0,
|
|
165
|
+
sortOrder: sortOrder.value,
|
|
166
|
+
sortBy: sortBy.value,
|
|
167
|
+
...props.lazy ? filterQueryParams.value : props.filters
|
|
94
168
|
// This will reset the previous filters.
|
|
95
|
-
}))
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
169
|
+
}));
|
|
170
|
+
const isExpandedAll = computed(() => {
|
|
171
|
+
var _a;
|
|
172
|
+
const rowsHasChildren = (_a = currentPageTableData.value) == null ? void 0 : _a.filter(
|
|
173
|
+
(d) => {
|
|
174
|
+
var _a2;
|
|
175
|
+
return ((_a2 = d.children) == null ? void 0 : _a2.length) || d.hasChildren;
|
|
101
176
|
}
|
|
102
177
|
);
|
|
103
|
-
return (
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
(
|
|
112
|
-
|
|
113
|
-
()
|
|
114
|
-
|
|
178
|
+
return (rowsHasChildren == null ? void 0 : rowsHasChildren.length) && rowsHasChildren.every((data) => expandedRows.value[data[props.dataKey]] > 0);
|
|
179
|
+
});
|
|
180
|
+
const isSelectedAll = computed(() => {
|
|
181
|
+
var _a, _b, _c, _d, _e;
|
|
182
|
+
if (props.disableAllRows || !((_a = filterParentRowData()) == null ? void 0 : _a.length) || props.selectionType !== "checkbox" || ((_b = currentPageDisabledRows.value) == null ? void 0 : _b.length) === currentPageTableData.value.length)
|
|
183
|
+
return false;
|
|
184
|
+
const length = (_c = checkboxSelection.value) == null ? void 0 : _c.length;
|
|
185
|
+
const currentPageDataKey = ((_d = filterDisabledRows(filterParentRowData())) == null ? void 0 : _d.map((dt) => dt[props.dataKey])) ?? [];
|
|
186
|
+
const selectedDataKey = ((_e = checkboxSelection.value) == null ? void 0 : _e.map((dt) => dt[props.dataKey])) ?? [];
|
|
187
|
+
const isCurrentPageAllSelected = selectedDataKey.length ? isArrayIncluded(currentPageDataKey, selectedDataKey) : false;
|
|
188
|
+
const isAllRecordSelected = length > 0 && length === (totalRecords.value ?? 0) - (currentPageDisabledRows.value.length ?? 0);
|
|
189
|
+
return isCurrentPageAllSelected || isAllRecordSelected;
|
|
190
|
+
});
|
|
191
|
+
const currentPageDisabledRows = computed(
|
|
192
|
+
() => getDisabledRows(props.data ?? filterParentRowData() ?? [])
|
|
193
|
+
);
|
|
194
|
+
const tableIsLoading = computed(
|
|
195
|
+
() => loadingTable.value || props.loading
|
|
196
|
+
);
|
|
197
|
+
const showCustomColumn = computed(
|
|
115
198
|
() => {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
199
|
+
var _a;
|
|
200
|
+
return props.useOption || ((_a = props.childTableProps) == null ? void 0 : _a.useOption) || props.customColumn;
|
|
118
201
|
}
|
|
119
|
-
)
|
|
202
|
+
);
|
|
203
|
+
const currentPageHasNoData = computed(
|
|
120
204
|
() => {
|
|
121
|
-
var
|
|
122
|
-
return !
|
|
205
|
+
var _a;
|
|
206
|
+
return !tableIsLoading.value && !((_a = currentPageTableData.value) == null ? void 0 : _a.length);
|
|
123
207
|
}
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
208
|
+
);
|
|
209
|
+
const renderedTableData = computed(
|
|
210
|
+
() => props.lazy && props.fetchFunction || !props.usePaginator ? currentPageTableData.value : currentPageTableData.value.slice(
|
|
211
|
+
(tablePage.value - 1) * tableRows.value,
|
|
212
|
+
tablePage.value * tableRows.value
|
|
128
213
|
)
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
214
|
+
);
|
|
215
|
+
const isRowExpanded = (key) => {
|
|
216
|
+
const keys = Object.keys(expandedRows.value);
|
|
217
|
+
return keys.includes(key);
|
|
218
|
+
};
|
|
219
|
+
const isRowDisabled = (key) => {
|
|
220
|
+
const keys = currentPageDisabledRows.value;
|
|
221
|
+
return keys.includes(key);
|
|
222
|
+
};
|
|
223
|
+
const isRowSelected = (key) => {
|
|
224
|
+
return props.selectionType === "checkbox" ? !!checkboxSelection.value.find((data) => data[props.dataKey] === key) : isSingleSelected(key);
|
|
225
|
+
};
|
|
226
|
+
const isSingleSelected = (key) => {
|
|
227
|
+
var _a;
|
|
228
|
+
return key !== void 0 && ((_a = singleSelection.value) == null ? void 0 : _a[props.dataKey]) === key;
|
|
229
|
+
};
|
|
230
|
+
const filterParentRowData = (rowData) => {
|
|
231
|
+
return (currentPageTableData.value ?? []).filter(
|
|
232
|
+
(d) => !d.childRowHeader && !d.childRow
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
const toggleRowExpand = async (data, indexOfData, isExpanding) => {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
if (isRowExpanded(data[props.dataKey]) === isExpanding) return;
|
|
238
|
+
const isExpandingRow = isExpanding ?? !isRowExpanded(data[props.dataKey]);
|
|
239
|
+
if (!loadingRows.value) {
|
|
240
|
+
if (!isExpandingRow) {
|
|
241
|
+
currentPageTableData.value.splice(
|
|
242
|
+
indexOfData + 1,
|
|
243
|
+
expandedRows.value[data[props.dataKey]]
|
|
244
|
+
);
|
|
245
|
+
delete expandedRows.value[data[props.dataKey]];
|
|
246
|
+
} else {
|
|
247
|
+
expandedRows.value[data[props.dataKey]] = 1;
|
|
248
|
+
let { children } = data;
|
|
249
|
+
if (((_a = props.childTableProps) == null ? void 0 : _a.fetchFunction) && data.hasChildren) {
|
|
148
250
|
try {
|
|
149
|
-
|
|
150
|
-
childRow:
|
|
151
|
-
loadingRow:
|
|
152
|
-
})
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
251
|
+
currentPageTableData.value.splice(indexOfData + 1, 0, {
|
|
252
|
+
childRow: true,
|
|
253
|
+
loadingRow: true
|
|
254
|
+
});
|
|
255
|
+
loadingRows.value = true;
|
|
256
|
+
const fetchChildren = await ((_b = props.childTableProps) == null ? void 0 : _b.fetchFunction(data));
|
|
257
|
+
children = fetchChildren == null ? void 0 : fetchChildren.data;
|
|
258
|
+
} catch (error) {
|
|
259
|
+
console.error("🚀 ~ toggleRowExpand ~ error:", error);
|
|
157
260
|
} finally {
|
|
158
|
-
|
|
261
|
+
currentPageTableData.value.splice(indexOfData + 1, 1);
|
|
262
|
+
loadingRows.value = false;
|
|
159
263
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
264
|
+
}
|
|
265
|
+
if (indexOfData >= 0 && (children == null ? void 0 : children.length)) {
|
|
266
|
+
const childrenRows = children.flatMap((child) => {
|
|
267
|
+
const rowHeader = {
|
|
268
|
+
childRowHeader: true,
|
|
269
|
+
header: child.groupHeader
|
|
270
|
+
};
|
|
271
|
+
return [
|
|
272
|
+
rowHeader,
|
|
273
|
+
...(child.groupItems ?? []).map((d) => ({ childRow: true, ...d }))
|
|
274
|
+
];
|
|
275
|
+
});
|
|
276
|
+
expandedRows.value[data[props.dataKey]] = childrenRows.length;
|
|
277
|
+
currentPageTableData.value.splice(indexOfData + 1, 0, ...childrenRows);
|
|
278
|
+
} else {
|
|
279
|
+
currentPageTableData.value.splice(indexOfData + 1, 0, {
|
|
280
|
+
childRow: true,
|
|
281
|
+
noDataRow: true
|
|
173
282
|
});
|
|
283
|
+
}
|
|
174
284
|
}
|
|
175
|
-
}, Qa = (e) => {
|
|
176
|
-
t.includeCheckDisabledRows ? T.value = e ? Y() : Y().filter((a) => J(a[t.dataKey])) : T.value = e ? xe(Y()) : [];
|
|
177
|
-
}, Wa = (e, a, n) => {
|
|
178
|
-
if (!a.childRow && !a.childRowHeader && !J(a[t.dataKey]) && t.selectionType !== "none") {
|
|
179
|
-
const s = Se(a[t.dataKey]);
|
|
180
|
-
z("rowSelect", { originalEvent: e, data: a, index: n }), t.selectionType === "checkbox" ? s ? T.value = T.value.filter(
|
|
181
|
-
(v) => v[t.dataKey] != a[t.dataKey]
|
|
182
|
-
) : T.value = [...T.value, a] : Me.value = s ? void 0 : a;
|
|
183
285
|
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
((a = s.children) != null && a.length || s.hasChildren) && await ye(s, n, e), n++;
|
|
286
|
+
};
|
|
287
|
+
const toggleAllDataSelection = (e) => {
|
|
288
|
+
if (props.includeCheckDisabledRows) {
|
|
289
|
+
checkboxSelection.value = e ? filterParentRowData() : filterParentRowData().filter((d) => isRowDisabled(d[props.dataKey]));
|
|
290
|
+
} else {
|
|
291
|
+
checkboxSelection.value = e ? filterDisabledRows(filterParentRowData()) : [];
|
|
191
292
|
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
293
|
+
};
|
|
294
|
+
const toggleRowSelection = (event, data, index) => {
|
|
295
|
+
if (!data.childRow && !data.childRowHeader && !isRowDisabled(data[props.dataKey]) && props.selectionType !== "none") {
|
|
296
|
+
const selected = isRowSelected(data[props.dataKey]);
|
|
297
|
+
emit("rowSelect", { originalEvent: event, data, index });
|
|
298
|
+
if (props.selectionType === "checkbox") {
|
|
299
|
+
if (selected)
|
|
300
|
+
checkboxSelection.value = checkboxSelection.value.filter(
|
|
301
|
+
(d) => d[props.dataKey] != data[props.dataKey]
|
|
302
|
+
);
|
|
303
|
+
else checkboxSelection.value = [...checkboxSelection.value, data];
|
|
304
|
+
} else {
|
|
305
|
+
singleSelection.value = selected ? void 0 : data;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
const toggleExpandAll = async () => {
|
|
310
|
+
var _a;
|
|
311
|
+
const isExpanding = !isExpandedAll.value;
|
|
312
|
+
if (!loadingRows.value) {
|
|
313
|
+
let index = 0;
|
|
314
|
+
for (const data of currentPageTableData.value) {
|
|
315
|
+
if (((_a = data.children) == null ? void 0 : _a.length) || data.hasChildren) {
|
|
316
|
+
await toggleRowExpand(data, index, isExpanding);
|
|
317
|
+
}
|
|
318
|
+
index++;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
const toggleOptions = async (event, data) => {
|
|
323
|
+
const eventTarget = event.target;
|
|
324
|
+
const button = eventTarget.tagName.toLowerCase() === "button" ? eventTarget : eventTarget.parentElement;
|
|
325
|
+
emit("toggleOption", data);
|
|
326
|
+
const toggleEvent = {
|
|
327
|
+
...event,
|
|
328
|
+
currentTarget: event.currentTarget ?? event.target
|
|
198
329
|
};
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
330
|
+
removeClassActive();
|
|
331
|
+
await nextTick(() => {
|
|
332
|
+
var _a;
|
|
333
|
+
if (button == null ? void 0 : button.classList.contains("option-button-active")) {
|
|
334
|
+
removeClassActive();
|
|
335
|
+
} else {
|
|
336
|
+
(_a = optionMenu.value) == null ? void 0 : _a.toggle(toggleEvent);
|
|
337
|
+
removeClassActive();
|
|
338
|
+
button == null ? void 0 : button.classList.add("option-button-active");
|
|
339
|
+
}
|
|
202
340
|
});
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
341
|
+
};
|
|
342
|
+
const onColumnTogglePresetChange = async (e, item, col) => {
|
|
343
|
+
var _a, _b, _c, _d;
|
|
344
|
+
if (!col.preset) return;
|
|
345
|
+
const revertFunction = () => setNestedPropertyValue(
|
|
346
|
+
item,
|
|
347
|
+
col.field,
|
|
348
|
+
!getNestedPropertyValue(item, col.field)
|
|
210
349
|
);
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
350
|
+
if (col.preset.type === "checkbox")
|
|
351
|
+
(_b = (_a = col.preset).onCheck) == null ? void 0 : _b.call(_a, e, item, revertFunction);
|
|
352
|
+
else if (col.preset.type === "toggle")
|
|
353
|
+
(_d = (_c = col.preset).onToggle) == null ? void 0 : _d.call(_c, e, item, revertFunction);
|
|
354
|
+
if ("confirmDialogProps" in col.preset) {
|
|
355
|
+
const { showWhen } = getConfirmDialogProps(
|
|
356
|
+
col.preset,
|
|
357
|
+
item[col.field],
|
|
358
|
+
item
|
|
216
359
|
) ?? {};
|
|
217
|
-
typeof
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
360
|
+
if (typeof showWhen === "function") {
|
|
361
|
+
showConfirmToggle.value[item[props.dataKey] + col.field] = await showWhen(
|
|
362
|
+
item,
|
|
363
|
+
e
|
|
364
|
+
);
|
|
365
|
+
} else {
|
|
366
|
+
showConfirmToggle.value[item[props.dataKey] + col.field] = !showWhen || showWhen === "active" && e || showWhen === "inactive" && !e;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const draggable = (item) => {
|
|
371
|
+
return item.draggable !== false && !item.childRow && !item.childRowHeader && props.reorderable && !sortOrder.value;
|
|
372
|
+
};
|
|
373
|
+
const startReorderRow = (event, item, index) => {
|
|
374
|
+
if (item.childRow || item.childRowHeader) return;
|
|
375
|
+
expandedRows.value = {};
|
|
376
|
+
const { dataTransfer } = event;
|
|
377
|
+
draggedRow.value = item;
|
|
378
|
+
rowReorderEventPayload.value = { item, fromIndex: index };
|
|
379
|
+
if (dataTransfer) {
|
|
380
|
+
dataTransfer.dropEffect = "move";
|
|
381
|
+
dataTransfer.effectAllowed = "move";
|
|
382
|
+
dataTransfer.setData("id", item._id);
|
|
383
|
+
dataTransfer.setData("index", index.toString());
|
|
221
384
|
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
385
|
+
};
|
|
386
|
+
const onDragEnter = (e, row) => {
|
|
387
|
+
var _a, _b;
|
|
388
|
+
e.preventDefault();
|
|
389
|
+
if (draggable(row)) {
|
|
390
|
+
const target = e.target;
|
|
391
|
+
const dropTargetTr = target.tagName === "TR" ? target : target.closest("tr");
|
|
392
|
+
dropTargetTr == null ? void 0 : dropTargetTr.classList.add("bg-primary-50");
|
|
393
|
+
(_a = dropTargetTr == null ? void 0 : dropTargetTr.nextElementSibling) == null ? void 0 : _a.classList.remove("bg-primary-50");
|
|
394
|
+
(_b = dropTargetTr == null ? void 0 : dropTargetTr.previousElementSibling) == null ? void 0 : _b.classList.remove("bg-primary-50");
|
|
395
|
+
if (!dropTargetTr || !draggedRow.value) return;
|
|
396
|
+
const draggedIndex = rowReorderData.value.findIndex(
|
|
397
|
+
(item) => {
|
|
398
|
+
var _a2;
|
|
399
|
+
return item._id === ((_a2 = draggedRow.value) == null ? void 0 : _a2._id);
|
|
236
400
|
}
|
|
237
|
-
), f = U.value.findIndex(
|
|
238
|
-
(w) => w._id === i.id
|
|
239
401
|
);
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
402
|
+
const dropTargetIndex = rowReorderData.value.findIndex(
|
|
403
|
+
(item) => item._id === dropTargetTr.id
|
|
404
|
+
);
|
|
405
|
+
if (draggedIndex !== -1 && dropTargetIndex !== -1) {
|
|
406
|
+
if (rowReorderEventPayload.value)
|
|
407
|
+
rowReorderEventPayload.value.toIndex = dropTargetIndex;
|
|
408
|
+
[
|
|
409
|
+
rowReorderData.value[draggedIndex],
|
|
410
|
+
rowReorderData.value[dropTargetIndex]
|
|
411
|
+
] = [
|
|
412
|
+
rowReorderData.value[dropTargetIndex],
|
|
413
|
+
rowReorderData.value[draggedIndex]
|
|
414
|
+
];
|
|
415
|
+
reorderVisibleColumn();
|
|
416
|
+
}
|
|
247
417
|
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
418
|
+
};
|
|
419
|
+
const onRowReorder = () => {
|
|
420
|
+
if (rowReorderEventPayload.value) {
|
|
421
|
+
emit("rowReorder", rowReorderEventPayload.value);
|
|
422
|
+
}
|
|
423
|
+
draggedRow.value = void 0;
|
|
424
|
+
dragging.value = false;
|
|
425
|
+
rowReorderEventPayload.value = void 0;
|
|
426
|
+
};
|
|
427
|
+
const reorderVisibleColumn = () => {
|
|
428
|
+
currentPageTableData.value = [...rowReorderData.value];
|
|
429
|
+
};
|
|
430
|
+
const removeClassActive = () => {
|
|
431
|
+
const previouslyClicked = document.querySelectorAll(".option-button-active");
|
|
432
|
+
previouslyClicked == null ? void 0 : previouslyClicked.forEach((el) => {
|
|
433
|
+
el.classList.remove("option-button-active");
|
|
256
434
|
});
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
435
|
+
};
|
|
436
|
+
const resetSortQuery = () => {
|
|
437
|
+
sortBy.value = void 0;
|
|
438
|
+
sortOrder.value = void 0;
|
|
439
|
+
};
|
|
440
|
+
const resetPage = () => {
|
|
441
|
+
tablePage.value = 1;
|
|
442
|
+
paginatorKey.value++;
|
|
443
|
+
};
|
|
444
|
+
const resetPageLimit = () => {
|
|
445
|
+
tableRows.value = props.rows ?? 10;
|
|
446
|
+
tablePage.value = 1;
|
|
447
|
+
paginatorKey.value++;
|
|
448
|
+
};
|
|
449
|
+
const resetDataTableQuery = () => {
|
|
450
|
+
resetPageLimit();
|
|
451
|
+
resetSortQuery();
|
|
452
|
+
};
|
|
453
|
+
const handleFilter = async () => {
|
|
454
|
+
tableKey.value++;
|
|
455
|
+
paginatorKey.value++;
|
|
456
|
+
resetDataTableQuery();
|
|
457
|
+
if (!props.lazy) applyStaticFilter();
|
|
458
|
+
else await reFetch();
|
|
459
|
+
};
|
|
460
|
+
const applyStaticFilter = () => {
|
|
461
|
+
let filtered = [...originalTableData.value ?? []];
|
|
462
|
+
const staticFilterMeta = filterQueryParams.value;
|
|
463
|
+
const filterMetaEntries = Object.entries(staticFilterMeta);
|
|
270
464
|
try {
|
|
271
|
-
|
|
272
|
-
(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
465
|
+
filtered = filterMetaEntries.length ? filtered.filter((d) => {
|
|
466
|
+
return filterMetaEntries.every(
|
|
467
|
+
([key, { value: filterValue, matchMode }]) => {
|
|
468
|
+
const fieldValue = getNestedPropertyValue(d, key);
|
|
469
|
+
switch (matchMode) {
|
|
470
|
+
case "IN":
|
|
471
|
+
return Array.isArray(filterValue) ? filterValue.includes(fieldValue) : false;
|
|
472
|
+
case "CONTAINS":
|
|
473
|
+
return fieldValue && filterValue ? fieldValue.toString().toLowerCase().includes(filterValue) : false;
|
|
474
|
+
case "EQUALS":
|
|
475
|
+
return fieldValue ? fieldValue.toString() === filterValue.toString() : false;
|
|
476
|
+
case "BETWEEN":
|
|
477
|
+
return Array.isArray(filterValue) && filterValue.length === 2 ? !isNaN(fieldValue) && (filterValue[0] == null || fieldValue >= filterValue[0]) && (filterValue[1] == null || fieldValue <= filterValue[1]) : false;
|
|
478
|
+
case "DATE_BETWEEN":
|
|
479
|
+
return Array.isArray(filterValue) ? +new Date(fieldValue) >= filterValue[0] && +new Date(fieldValue) <= filterValue[1] : false;
|
|
480
|
+
default:
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
287
483
|
}
|
|
288
|
-
|
|
289
|
-
)
|
|
290
|
-
} catch (
|
|
291
|
-
console.error("🚀 ~ applyStaticFilter ~ error:",
|
|
484
|
+
);
|
|
485
|
+
}) : originalTableData.value;
|
|
486
|
+
} catch (error) {
|
|
487
|
+
console.error("🚀 ~ applyStaticFilter ~ error:", error);
|
|
292
488
|
}
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
489
|
+
applyStaticSearch(filtered);
|
|
490
|
+
};
|
|
491
|
+
const applyStaticSearch = (data) => {
|
|
492
|
+
var _a;
|
|
296
493
|
try {
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
return new RegExp(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
494
|
+
currentPageTableData.value = ((_a = searchQueryParam.value) == null ? void 0 : _a.length) ? data.filter((d) => {
|
|
495
|
+
const stringData = JSON.stringify(d);
|
|
496
|
+
return new RegExp(searchQueryParam.value, "i").test(stringData) || searchQueryParam.value.split(/\s+/).filter(Boolean).every((word) => {
|
|
497
|
+
const regex = new RegExp(word, "i");
|
|
498
|
+
return regex.test(stringData);
|
|
499
|
+
});
|
|
500
|
+
}) : data;
|
|
501
|
+
} catch (error) {
|
|
502
|
+
console.error("🚀 ~ applyStaticSearch ~ error:", error);
|
|
303
503
|
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
504
|
+
};
|
|
505
|
+
const handlePageChange = async (event) => {
|
|
506
|
+
tableRows.value = event.rows;
|
|
507
|
+
tablePage.value = event.page + 1;
|
|
508
|
+
if (props.lazy && props.fetchFunction) await reFetch();
|
|
509
|
+
Object.keys(expandedRows.value).forEach((key) => {
|
|
510
|
+
const index = currentPageTableData.value.findIndex(
|
|
511
|
+
(d) => d[props.dataKey] == key
|
|
308
512
|
);
|
|
309
|
-
|
|
513
|
+
if (index >= 0)
|
|
514
|
+
toggleRowExpand(currentPageTableData.value[index], index, true);
|
|
310
515
|
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
516
|
+
};
|
|
517
|
+
const sortColumn = (field, e) => {
|
|
518
|
+
if (field !== sortBy.value) sortOrder.value = void 0;
|
|
519
|
+
sortBy.value = field;
|
|
520
|
+
if (!sortOrder.value) {
|
|
521
|
+
sortOrder.value = 1;
|
|
522
|
+
} else if (sortOrder.value == -1) {
|
|
523
|
+
sortOrder.value = void 0;
|
|
524
|
+
sortBy.value = void 0;
|
|
525
|
+
} else {
|
|
526
|
+
sortOrder.value = -1;
|
|
527
|
+
}
|
|
528
|
+
emit("sort", {
|
|
529
|
+
sortOrder: sortOrder.value,
|
|
530
|
+
sortField: sortBy.value,
|
|
531
|
+
originalEvent: e,
|
|
532
|
+
rows: tableRows.value
|
|
533
|
+
});
|
|
534
|
+
resetPage();
|
|
535
|
+
if (props.lazy && props.fetchFunction) reFetch();
|
|
536
|
+
else staticSort();
|
|
537
|
+
};
|
|
538
|
+
const staticSort = () => {
|
|
539
|
+
const data = [...currentPageTableData.value ?? []];
|
|
540
|
+
const resolvedFieldData = /* @__PURE__ */ new Map();
|
|
541
|
+
if (!sortOrder.value) {
|
|
542
|
+
currentPageTableData.value = originalTableData.value ?? [];
|
|
322
543
|
return;
|
|
323
544
|
}
|
|
324
|
-
for (const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
545
|
+
for (const item of data) {
|
|
546
|
+
resolvedFieldData.set(
|
|
547
|
+
item,
|
|
548
|
+
ObjectUtils.resolveFieldData(item, sortBy.value)
|
|
328
549
|
);
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
550
|
+
}
|
|
551
|
+
const comparer = new Intl.Collator(void 0, { numeric: true }).compare;
|
|
552
|
+
data.sort((data1, data2) => {
|
|
553
|
+
const value1 = resolvedFieldData.get(data1);
|
|
554
|
+
const value2 = resolvedFieldData.get(data2);
|
|
555
|
+
return ObjectUtils.sort(value1, value2, sortOrder.value, comparer, -1);
|
|
556
|
+
});
|
|
557
|
+
currentPageTableData.value = data;
|
|
558
|
+
};
|
|
559
|
+
const reFetch = async () => {
|
|
560
|
+
var _a;
|
|
336
561
|
try {
|
|
337
|
-
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
562
|
+
loadingTable.value = true;
|
|
563
|
+
const response = await ((_a = props.fetchFunction) == null ? void 0 : _a.call(props, queryParams.value));
|
|
564
|
+
const { data = [], totalRecords: total = 0 } = (response == null ? void 0 : response.data) ?? {};
|
|
565
|
+
currentPageTableData.value = data;
|
|
566
|
+
rowReorderData.value = [...currentPageTableData.value];
|
|
567
|
+
totalRecords.value = total;
|
|
568
|
+
} catch (error) {
|
|
569
|
+
console.error("🚀 ~ reFetch ~ error:", error);
|
|
342
570
|
} finally {
|
|
343
|
-
|
|
571
|
+
loadingTable.value = false;
|
|
572
|
+
expandedRows.value = {};
|
|
344
573
|
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
customColumn: a,
|
|
366
|
-
sorted: N.value && N.value === (e == null ? void 0 : e.field),
|
|
367
|
-
sortable: e == null ? void 0 : e.sortable
|
|
574
|
+
};
|
|
575
|
+
const fetchAllData = async () => {
|
|
576
|
+
var _a;
|
|
577
|
+
const params = cloneDeep(queryParams.value);
|
|
578
|
+
delete params.page;
|
|
579
|
+
delete params.limit;
|
|
580
|
+
const res = await ((_a = props.fetchFunction) == null ? void 0 : _a.call(props, params));
|
|
581
|
+
if (res instanceof Error) throw res;
|
|
582
|
+
return (res == null ? void 0 : res.data) ?? { data: [], totalRecords: 0 };
|
|
583
|
+
};
|
|
584
|
+
const selectAllData = async (event) => {
|
|
585
|
+
if (props.tableName !== event.tableName) return;
|
|
586
|
+
try {
|
|
587
|
+
loadingTable.value = true;
|
|
588
|
+
const { data, totalRecords: total = 0 } = props.lazy ? await fetchAllData() : { totalRecords: (props.data ?? []).length, data: props.data };
|
|
589
|
+
const disabledRows = getDisabledRows(data);
|
|
590
|
+
checkboxSelection.value = props.includeCheckDisabledRows ? data ?? [] : filterDisabledRows(data, disabledRows);
|
|
591
|
+
totalRecords.value = total;
|
|
592
|
+
} finally {
|
|
593
|
+
loadingTable.value = false;
|
|
368
594
|
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
|
|
595
|
+
};
|
|
596
|
+
const headerCellPreset = (col, useCustomColumn) => {
|
|
597
|
+
return Preset == null ? void 0 : Preset.headercell({
|
|
598
|
+
props,
|
|
599
|
+
context: {
|
|
600
|
+
sortOrder: sortOrder.value,
|
|
601
|
+
customColumn: useCustomColumn,
|
|
602
|
+
sorted: sortBy.value && sortBy.value === (col == null ? void 0 : col.field),
|
|
603
|
+
sortable: col == null ? void 0 : col.sortable
|
|
604
|
+
}
|
|
372
605
|
});
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
606
|
+
};
|
|
607
|
+
const handleUpdateTableEvent = (event) => {
|
|
608
|
+
if (!event.tableName || event.tableName === props.tableName) {
|
|
609
|
+
nextTick(() => {
|
|
610
|
+
columnKey.value++;
|
|
611
|
+
reFetch();
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
const filterDisabledRows = (tableData, rowsIDs) => {
|
|
616
|
+
return (tableData ?? []).filter(
|
|
617
|
+
(data) => !(rowsIDs ?? currentPageDisabledRows.value).includes(data[props.dataKey])
|
|
618
|
+
);
|
|
619
|
+
};
|
|
620
|
+
const getDisabledRows = (tableData = []) => {
|
|
621
|
+
if (props.disableAllRows) return tableData.map((data) => data[props.dataKey]);
|
|
622
|
+
return tableData.filter((data) => data[props.disableKey]).map((data) => data[props.dataKey]);
|
|
623
|
+
};
|
|
624
|
+
const downloadExcel = async ({
|
|
625
|
+
tableName,
|
|
626
|
+
multiTableNames,
|
|
627
|
+
fileName,
|
|
628
|
+
additionalTexts
|
|
380
629
|
}) => {
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
630
|
+
var _a;
|
|
631
|
+
if (tableName !== props.tableName && !(multiTableNames == null ? void 0 : multiTableNames.includes(props.tableName)))
|
|
383
632
|
return;
|
|
384
|
-
const
|
|
385
|
-
(
|
|
386
|
-
)
|
|
387
|
-
|
|
388
|
-
|
|
633
|
+
const excelColumns = visibleColumns.value.filter(
|
|
634
|
+
(col) => col.visible !== false
|
|
635
|
+
);
|
|
636
|
+
const includedColumns = excelColumns.filter((col) => !col.excluded);
|
|
637
|
+
const headers = includedColumns.map(
|
|
638
|
+
(col) => col.header ?? col.exportHeader ?? "-"
|
|
639
|
+
);
|
|
640
|
+
const formatFileName = () => {
|
|
641
|
+
return fileName.trim().replace(/[^a-zA-Z0-9\s]/g, "-").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/-+$/, "");
|
|
642
|
+
};
|
|
389
643
|
try {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
644
|
+
eventBus.off("data-table:download", downloadHandler);
|
|
645
|
+
if (tableName === props.tableName) {
|
|
646
|
+
setLoading(true, locale.downloadingMessage);
|
|
647
|
+
const { data } = props.fetchFunction ? await fetchAllData() : { data: props.data };
|
|
648
|
+
const excelBody = normalizeTableData(data, includedColumns, locale);
|
|
649
|
+
if (multiTableNames == null ? void 0 : multiTableNames.length) {
|
|
650
|
+
eventBus.emit("button-download:multi-tables", {
|
|
395
651
|
table: {
|
|
396
|
-
headers
|
|
397
|
-
data:
|
|
398
|
-
tableName
|
|
399
|
-
tableTitle:
|
|
652
|
+
headers,
|
|
653
|
+
data: excelBody,
|
|
654
|
+
tableName,
|
|
655
|
+
tableTitle: props.tableTitle
|
|
400
656
|
}
|
|
401
657
|
});
|
|
402
658
|
return;
|
|
403
659
|
}
|
|
404
|
-
await
|
|
660
|
+
await exportToExcel({
|
|
405
661
|
tables: [
|
|
406
|
-
{ headers
|
|
662
|
+
{ headers, data: excelBody, tableName, tableTitle: props.tableTitle }
|
|
407
663
|
],
|
|
408
|
-
fileName:
|
|
409
|
-
additionalTexts
|
|
664
|
+
fileName: formatFileName(),
|
|
665
|
+
additionalTexts
|
|
410
666
|
});
|
|
411
667
|
}
|
|
412
|
-
} catch (
|
|
413
|
-
console.error("🚀 ~ downloadExcel error:",
|
|
414
|
-
|
|
415
|
-
|
|
668
|
+
} catch (error) {
|
|
669
|
+
console.error("🚀 ~ downloadExcel error:", error);
|
|
670
|
+
toast.removeAllGroups();
|
|
671
|
+
toast.add({
|
|
672
|
+
message: ((_a = config.value.excelToastErrorMessage) == null ? void 0 : _a.replace("{fileName}", fileName)) ?? "Data gagal diunduh.",
|
|
673
|
+
error,
|
|
416
674
|
group: "download"
|
|
417
675
|
});
|
|
418
676
|
} finally {
|
|
419
|
-
|
|
677
|
+
setLoading(false);
|
|
678
|
+
eventBus.on("data-table:download", downloadHandler);
|
|
420
679
|
}
|
|
421
680
|
};
|
|
422
|
-
|
|
423
|
-
var
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
()
|
|
681
|
+
onMounted(async () => {
|
|
682
|
+
var _a;
|
|
683
|
+
if (props.fetchFunction) {
|
|
684
|
+
await reFetch();
|
|
685
|
+
listenUpdateTableEvent();
|
|
686
|
+
}
|
|
687
|
+
if ((_a = props.selectedData) == null ? void 0 : _a.length) {
|
|
688
|
+
checkboxSelection.value = props.selectedData;
|
|
689
|
+
}
|
|
690
|
+
attachEventListener();
|
|
691
|
+
});
|
|
692
|
+
onUnmounted(() => {
|
|
693
|
+
removeEventListener();
|
|
694
|
+
});
|
|
695
|
+
watch(
|
|
696
|
+
() => props.columns,
|
|
429
697
|
() => {
|
|
430
|
-
|
|
698
|
+
if (!props.customColumn) visibleColumns.value = props.columns;
|
|
699
|
+
customColumnKey.value++;
|
|
431
700
|
}
|
|
432
|
-
)
|
|
433
|
-
|
|
434
|
-
(
|
|
435
|
-
|
|
701
|
+
);
|
|
702
|
+
watch(
|
|
703
|
+
() => props.data,
|
|
704
|
+
(data) => {
|
|
705
|
+
currentPageTableData.value = data ?? [];
|
|
706
|
+
originalTableData.value = data ?? [];
|
|
707
|
+
eventBus.emit("data-table:updated", { tableName: props.tableName, data });
|
|
708
|
+
totalRecords.value = data == null ? void 0 : data.length;
|
|
436
709
|
},
|
|
437
710
|
{
|
|
438
|
-
immediate:
|
|
711
|
+
immediate: true
|
|
439
712
|
}
|
|
440
|
-
)
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
713
|
+
);
|
|
714
|
+
watch(totalRecords, (total) => {
|
|
715
|
+
updateTotalRecordBulkAction(total);
|
|
716
|
+
});
|
|
717
|
+
watch(
|
|
718
|
+
checkboxSelection,
|
|
719
|
+
(newSelectedData) => {
|
|
720
|
+
emit("selectData", newSelectedData);
|
|
721
|
+
emit("update:selectedData", newSelectedData);
|
|
722
|
+
eventBus.emit("data-table:update-selected-data", {
|
|
723
|
+
tableName: props.tableName,
|
|
724
|
+
data: newSelectedData
|
|
448
725
|
});
|
|
449
726
|
},
|
|
450
|
-
{ deep:
|
|
727
|
+
{ deep: true }
|
|
451
728
|
);
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
729
|
+
const attachEventListener = () => {
|
|
730
|
+
eventBus.on("data-table:apply-filter", applyFilterHandler);
|
|
731
|
+
eventBus.on("search-table", searchTableHandler);
|
|
732
|
+
eventBus.on("search-by-scan-table", searchByScanHandler);
|
|
733
|
+
eventBus.on("data-table:clear-selected-data", clearSelectedDataHandler);
|
|
734
|
+
eventBus.on("data-table:select-all-record", selectAllRecordHandler);
|
|
735
|
+
eventBus.on("data-table:download", downloadHandler);
|
|
736
|
+
eventBus.on("data-table:import-excel-to-json", populateDataTableFromExcel);
|
|
737
|
+
};
|
|
738
|
+
const removeEventListener = () => {
|
|
739
|
+
eventBus.off("data-table:update", handleUpdateTableEvent);
|
|
740
|
+
eventBus.off("data-table:apply-filter", applyFilterHandler);
|
|
741
|
+
eventBus.off("search-table", searchTableHandler);
|
|
742
|
+
eventBus.off("search-by-scan-table", searchByScanHandler);
|
|
743
|
+
eventBus.off("data-table:clear-selected-data", clearSelectedDataHandler);
|
|
744
|
+
eventBus.off("data-table:select-all-record", selectAllRecordHandler);
|
|
745
|
+
eventBus.off("data-table:download", downloadHandler);
|
|
746
|
+
eventBus.off("data-table:import-excel-to-json", populateDataTableFromExcel);
|
|
747
|
+
};
|
|
748
|
+
const applyFilterHandler = (e) => {
|
|
749
|
+
if (e.tableName === props.tableName) {
|
|
750
|
+
filterQueryParams.value = e.filter;
|
|
751
|
+
handleFilter();
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
const searchTableHandler = (e) => {
|
|
755
|
+
if (e.tableName === props.tableName) {
|
|
756
|
+
searchQueryParam.value = e.search;
|
|
757
|
+
handleFilter();
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
const searchByScanHandler = (e) => {
|
|
761
|
+
if (e.tableName === props.tableName) {
|
|
762
|
+
tagQueryParam.value = e.tag;
|
|
763
|
+
handleFilter();
|
|
764
|
+
}
|
|
765
|
+
};
|
|
766
|
+
const selectAllRecordHandler = (e) => {
|
|
767
|
+
if (e.tableName === props.tableName) {
|
|
768
|
+
selectAllData(e);
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
const clearSelectedDataHandler = (e) => {
|
|
772
|
+
if (e.tableName === props.tableName) {
|
|
773
|
+
checkboxSelection.value = [];
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
const downloadHandler = (e) => {
|
|
777
|
+
var _a;
|
|
778
|
+
if (e.tableName === props.tableName || ((_a = e.multiTableNames) == null ? void 0 : _a.includes(props.tableName))) {
|
|
779
|
+
downloadExcel(e);
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
const preventCharInput = (e) => {
|
|
783
|
+
if (!(e.code.includes("Digit") || e.code.includes("Numpad") || ["ArrowLeft", "ArrowRight", "Backspace", "Delete"].includes(e.code))) {
|
|
784
|
+
e.preventDefault();
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
const updateTotalRecordBulkAction = (total) => {
|
|
788
|
+
const disabledCount = props.includeCheckDisabledRows ? 0 : (currentPageDisabledRows.value.length || props.totalDisabledRows) ?? 0;
|
|
789
|
+
const data = {
|
|
790
|
+
total: (total ?? totalRecords.value ?? 0) - disabledCount,
|
|
791
|
+
tableName: props.tableName
|
|
475
792
|
};
|
|
476
|
-
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
793
|
+
eventBus.emit("data-table:update-total-record", data);
|
|
794
|
+
};
|
|
795
|
+
const listenUpdateTableEvent = () => {
|
|
796
|
+
eventBus.on("data-table:update", handleUpdateTableEvent);
|
|
797
|
+
};
|
|
798
|
+
const populateDataTableFromExcel = (e) => {
|
|
799
|
+
if (e.tableName === props.tableName) {
|
|
800
|
+
currentPageTableData.value = e.data;
|
|
801
|
+
rowReorderData.value = [...currentPageTableData.value];
|
|
802
|
+
totalRecords.value = e.data.length;
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
const getConfirmDialogProps = (preset, state, rowData) => {
|
|
806
|
+
return typeof (preset == null ? void 0 : preset.confirmDialogProps) == "function" ? preset == null ? void 0 : preset.confirmDialogProps(state, rowData) : preset == null ? void 0 : preset.confirmDialogProps;
|
|
807
|
+
};
|
|
808
|
+
return (_ctx, _cache) => {
|
|
809
|
+
var _a, _b, _c;
|
|
810
|
+
return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps((_a = unref(Preset)) == null ? void 0 : _a.root)), [
|
|
811
|
+
createElementVNode("div", normalizeProps(guardReactiveProps((_b = unref(Preset)) == null ? void 0 : _b.tablewrapper)), [
|
|
812
|
+
createVNode(unref(simplebar), mergeProps({ "auto-hide": false }, (_c = unref(Preset)) == null ? void 0 : _c.scrollheightwrapper({ props }), { class: "custom-scrollbar" }), {
|
|
813
|
+
default: withCtx(() => {
|
|
814
|
+
var _a2, _b2, _c2, _d, _e;
|
|
489
815
|
return [
|
|
490
|
-
(
|
|
491
|
-
key:
|
|
492
|
-
ref:
|
|
816
|
+
(openBlock(), createElementBlock("table", mergeProps({ id: unref(dataTableID) }, (_a2 = unref(Preset)) == null ? void 0 : _a2.table, {
|
|
817
|
+
key: tableKey.value,
|
|
818
|
+
ref: tableElement.value
|
|
493
819
|
}), [
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
class:
|
|
498
|
-
}), null, 16)) :
|
|
499
|
-
|
|
500
|
-
class:
|
|
820
|
+
createElementVNode("thead", normalizeProps(guardReactiveProps(unref(Preset).thead)), [
|
|
821
|
+
createElementVNode("tr", normalizeProps(guardReactiveProps(unref(Preset).headerrow)), [
|
|
822
|
+
_ctx.reorderable && !sortOrder.value ? (openBlock(), createElementBlock("th", mergeProps({ key: 0 }, unref(Preset).headercellreorderable, {
|
|
823
|
+
class: headerCellPreset().class
|
|
824
|
+
}), null, 16)) : createCommentVNode("", true),
|
|
825
|
+
_ctx.selectionType === "checkbox" ? (openBlock(), createElementBlock("th", mergeProps({ key: 1 }, unref(Preset).headercellcheckbox, {
|
|
826
|
+
class: headerCellPreset().class
|
|
501
827
|
}), [
|
|
502
|
-
|
|
503
|
-
(
|
|
828
|
+
createVNode(_sfc_main$1, mergeProps(
|
|
829
|
+
(_b2 = unref(Preset)) == null ? void 0 : _b2.headercheckbox({ context: { isSelectedAll: isSelectedAll.value } }),
|
|
504
830
|
{
|
|
505
|
-
"model-value":
|
|
506
|
-
"onUpdate:modelValue":
|
|
831
|
+
"model-value": isSelectedAll.value,
|
|
832
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => toggleAllDataSelection(!!$event)),
|
|
507
833
|
binary: ""
|
|
508
834
|
}
|
|
509
835
|
), null, 16, ["model-value"])
|
|
510
|
-
], 16)) :
|
|
511
|
-
|
|
512
|
-
class:
|
|
836
|
+
], 16)) : createCommentVNode("", true),
|
|
837
|
+
_ctx.treeTable ? (openBlock(), createElementBlock("th", mergeProps({ key: 2 }, unref(Preset).headertoggler, {
|
|
838
|
+
class: headerCellPreset().class
|
|
513
839
|
}), [
|
|
514
|
-
|
|
515
|
-
{ onClick:
|
|
516
|
-
|
|
840
|
+
createVNode(_sfc_main$2, mergeProps(
|
|
841
|
+
{ onClick: toggleExpandAll },
|
|
842
|
+
unref(Preset).headertogglerbutton({ context: { isExpandedAll: isExpandedAll.value } }),
|
|
517
843
|
{
|
|
518
844
|
icon: "arrow-down",
|
|
519
845
|
text: ""
|
|
520
846
|
}
|
|
521
847
|
), null, 16)
|
|
522
|
-
], 16)) :
|
|
523
|
-
(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
848
|
+
], 16)) : createCommentVNode("", true),
|
|
849
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleColumns.value, (col) => {
|
|
850
|
+
return openBlock(), createElementBlock("th", mergeProps({
|
|
851
|
+
key: col.field,
|
|
852
|
+
class: [col.headerClass, col.class],
|
|
853
|
+
ref_for: true
|
|
854
|
+
}, headerCellPreset(col), {
|
|
855
|
+
onClick: ($event) => col.sortable ? sortColumn(col.field, $event) : null
|
|
856
|
+
}), [
|
|
857
|
+
createElementVNode("span", mergeProps({ ref_for: true }, unref(Preset).headercellcontent), [
|
|
858
|
+
createElementVNode("span", _hoisted_3, [
|
|
859
|
+
createTextVNode(toDisplayString(col.header) + " ", 1),
|
|
860
|
+
col.info ? (openBlock(), createBlock(_sfc_main$3, {
|
|
861
|
+
key: 0,
|
|
862
|
+
info: col.info,
|
|
863
|
+
severity: col.infoSeverity,
|
|
864
|
+
class: "w-[10px] h-[10px]",
|
|
865
|
+
icon: "info"
|
|
866
|
+
}, null, 8, ["info", "severity"])) : createCommentVNode("", true)
|
|
867
|
+
]),
|
|
868
|
+
col.sortable ? (openBlock(), createBlock(_sfc_main$3, {
|
|
534
869
|
key: 0,
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
], 16, jt))), 128)),
|
|
548
|
-
Ke.value ? (d(), c("th", p({ key: 3 }, oe(void 0, t.customColumn), {
|
|
549
|
-
id: `column-visibility-toggle-${r(Re)}`,
|
|
550
|
-
onClick: a[1] || (a[1] = //@ts-ignore
|
|
551
|
-
(...l) => {
|
|
552
|
-
var h, ne;
|
|
553
|
-
return ((h = Te.value) == null ? void 0 : h.toggleMenu) && ((ne = Te.value) == null ? void 0 : ne.toggleMenu(...l));
|
|
870
|
+
icon: !sortBy.value || sortBy.value != col.field ? "arrow-up-down" : sortOrder.value == 1 ? "sort-asc" : "sort-desc",
|
|
871
|
+
class: "text-base"
|
|
872
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
873
|
+
], 16)
|
|
874
|
+
], 16, _hoisted_2);
|
|
875
|
+
}), 128)),
|
|
876
|
+
showCustomColumn.value ? (openBlock(), createElementBlock("th", mergeProps({ key: 3 }, headerCellPreset(void 0, props.customColumn), {
|
|
877
|
+
id: `column-visibility-toggle-${unref(dataTableID)}`,
|
|
878
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
879
|
+
(...args) => {
|
|
880
|
+
var _a3, _b3;
|
|
881
|
+
return ((_a3 = customColumn.value) == null ? void 0 : _a3.toggleMenu) && ((_b3 = customColumn.value) == null ? void 0 : _b3.toggleMenu(...args));
|
|
554
882
|
})
|
|
555
883
|
}), [
|
|
556
|
-
|
|
884
|
+
props.customColumn ? (openBlock(), createBlock(_sfc_main$3, mergeProps({ key: 0 }, unref(Preset).columnvisibilityicon, {
|
|
557
885
|
icon: "ellipsis-h",
|
|
558
886
|
"tooltip-pos": "left"
|
|
559
|
-
}), null, 16)) :
|
|
560
|
-
], 16,
|
|
887
|
+
}), null, 16)) : createCommentVNode("", true)
|
|
888
|
+
], 16, _hoisted_4)) : createCommentVNode("", true)
|
|
561
889
|
], 16)
|
|
562
890
|
], 16),
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
ref_for: !0
|
|
585
|
-
},
|
|
586
|
-
l === 1 ? r(u).nodatalottiewrapper : r(u).invisiblelottiewrapper
|
|
587
|
-
), [
|
|
588
|
-
_(Ce, p({
|
|
589
|
-
animation: "no-data",
|
|
590
|
-
ref_for: !0
|
|
591
|
-
}, r(u).nodatalottie), null, 16),
|
|
592
|
-
X.value.emptyTableMessage ? (d(), c("span", p({
|
|
593
|
-
key: 0,
|
|
594
|
-
ref_for: !0
|
|
595
|
-
}, r(u).nodatamessage), H(X.value.emptyTableMessage), 17)) : y("", !0)
|
|
596
|
-
], 16))), 128))
|
|
597
|
-
], 16, nl)
|
|
598
|
-
])) : (d(!0), c(P, { key: 1 }, Z(ja.value, (l, h) => {
|
|
599
|
-
var ne, sa, ia, da, ua, ca, pa, fa, va, ba, ga;
|
|
600
|
-
return d(), c("tr", p(
|
|
891
|
+
createElementVNode("tbody", normalizeProps(guardReactiveProps((_c2 = unref(Preset)) == null ? void 0 : _c2.tbody)), [
|
|
892
|
+
tableIsLoading.value ? (openBlock(), createElementBlock("tr", _hoisted_5, [
|
|
893
|
+
createElementVNode("td", mergeProps({ colspan: columnsCount.value }, (_d = unref(Preset)) == null ? void 0 : _d.bodycell), [
|
|
894
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(Preset).invisiblelottiewrapper ? 2 : 1, (i) => {
|
|
895
|
+
return openBlock(), createElementBlock("div", mergeProps(
|
|
896
|
+
{
|
|
897
|
+
key: i,
|
|
898
|
+
ref_for: true
|
|
899
|
+
},
|
|
900
|
+
i === 1 ? unref(Preset).loadingtablewrapper : unref(Preset).invisiblelottiewrapper
|
|
901
|
+
), [
|
|
902
|
+
createVNode(_sfc_main$4, mergeProps({
|
|
903
|
+
animation: "loading-table",
|
|
904
|
+
ref_for: true
|
|
905
|
+
}, unref(Preset).loadingtablelottie), null, 16)
|
|
906
|
+
], 16);
|
|
907
|
+
}), 128))
|
|
908
|
+
], 16, _hoisted_6)
|
|
909
|
+
])) : !currentPageHasNoData.value ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(renderedTableData.value, (item, index) => {
|
|
910
|
+
var _a3, _b3, _c3, _d2, _e2, _f, _g, _h, _i, _j, _k;
|
|
911
|
+
return openBlock(), createElementBlock("tr", mergeProps(
|
|
601
912
|
{
|
|
602
|
-
id:
|
|
603
|
-
key: `${
|
|
604
|
-
draggable:
|
|
605
|
-
ref_for:
|
|
913
|
+
id: item._id,
|
|
914
|
+
key: `${index}-${item[_ctx.dataKey]}`,
|
|
915
|
+
draggable: draggable(item),
|
|
916
|
+
ref_for: true
|
|
606
917
|
},
|
|
607
|
-
(
|
|
918
|
+
(_a3 = unref(Preset)) == null ? void 0 : _a3.bodyrow({
|
|
608
919
|
context: {
|
|
609
|
-
highlighted:
|
|
610
|
-
selected:
|
|
611
|
-
disabled:
|
|
612
|
-
draggable:
|
|
613
|
-
dragging:
|
|
920
|
+
highlighted: item[_ctx.highlightKey ?? ""],
|
|
921
|
+
selected: isRowSelected(item[_ctx.dataKey]),
|
|
922
|
+
disabled: isRowDisabled(item[_ctx.dataKey]),
|
|
923
|
+
draggable: draggable(item),
|
|
924
|
+
dragging: dragging.value
|
|
614
925
|
},
|
|
615
|
-
props
|
|
926
|
+
props
|
|
616
927
|
}),
|
|
617
928
|
{
|
|
618
|
-
onClick: (
|
|
619
|
-
onDblclick: (
|
|
620
|
-
var
|
|
621
|
-
return
|
|
929
|
+
onClick: ($event) => toggleRowSelection($event, item, index),
|
|
930
|
+
onDblclick: ($event) => {
|
|
931
|
+
var _a4;
|
|
932
|
+
return _ctx.treeTable && (((_a4 = item.children) == null ? void 0 : _a4.length) || item.hasChildren) ? toggleRowExpand(item, index) : null;
|
|
622
933
|
},
|
|
623
|
-
onDrag:
|
|
624
|
-
onDragenter:
|
|
625
|
-
onDragleave:
|
|
934
|
+
onDrag: _cache[11] || (_cache[11] = ($event) => dragging.value = true),
|
|
935
|
+
onDragenter: withModifiers(($event) => onDragEnter($event, item), ["prevent"]),
|
|
936
|
+
onDragleave: _cache[12] || (_cache[12] = withModifiers(() => {
|
|
626
937
|
}, ["prevent"])),
|
|
627
|
-
onDragover:
|
|
938
|
+
onDragover: _cache[13] || (_cache[13] = withModifiers(() => {
|
|
628
939
|
}, ["prevent"])),
|
|
629
|
-
onDragstart: (
|
|
630
|
-
onDrop:
|
|
940
|
+
onDragstart: ($event) => startReorderRow($event, item, index),
|
|
941
|
+
onDrop: onRowReorder
|
|
631
942
|
}
|
|
632
943
|
), [
|
|
633
|
-
|
|
944
|
+
_ctx.reorderable && !sortOrder.value ? (openBlock(), createElementBlock("td", mergeProps({
|
|
634
945
|
key: 0,
|
|
635
|
-
ref_for:
|
|
636
|
-
}, (
|
|
637
|
-
!
|
|
946
|
+
ref_for: true
|
|
947
|
+
}, (_b3 = unref(Preset)) == null ? void 0 : _b3.bodycell), [
|
|
948
|
+
!item.childRow && !item.childRowHeader ? (openBlock(), createBlock(_sfc_main$3, {
|
|
638
949
|
key: 0,
|
|
639
950
|
class: "draggableicon",
|
|
640
951
|
icon: "dragable-menu"
|
|
641
|
-
})) :
|
|
642
|
-
], 16)) :
|
|
643
|
-
|
|
952
|
+
})) : createCommentVNode("", true)
|
|
953
|
+
], 16)) : createCommentVNode("", true),
|
|
954
|
+
_ctx.selectionType === "checkbox" ? (openBlock(), createElementBlock("td", mergeProps({
|
|
644
955
|
key: 1,
|
|
645
|
-
ref_for:
|
|
646
|
-
}, (
|
|
647
|
-
onClick:
|
|
956
|
+
ref_for: true
|
|
957
|
+
}, (_c3 = unref(Preset)) == null ? void 0 : _c3.bodycell, {
|
|
958
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
648
959
|
}, ["stop"]))
|
|
649
960
|
}), [
|
|
650
|
-
!
|
|
961
|
+
!item.childRow && !item.childRowHeader ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
|
|
651
962
|
key: 0,
|
|
652
|
-
ref_for:
|
|
653
|
-
}, (
|
|
654
|
-
modelValue:
|
|
655
|
-
"onUpdate:modelValue":
|
|
656
|
-
binary:
|
|
657
|
-
disabled:
|
|
658
|
-
value:
|
|
659
|
-
}), null, 16, ["modelValue", "disabled", "value"])) :
|
|
660
|
-
], 16)) :
|
|
661
|
-
|
|
963
|
+
ref_for: true
|
|
964
|
+
}, (_d2 = unref(Preset)) == null ? void 0 : _d2.rowcheckbox, {
|
|
965
|
+
modelValue: checkboxSelection.value,
|
|
966
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => checkboxSelection.value = $event),
|
|
967
|
+
binary: false,
|
|
968
|
+
disabled: isRowDisabled(item[_ctx.dataKey]),
|
|
969
|
+
value: item
|
|
970
|
+
}), null, 16, ["modelValue", "disabled", "value"])) : createCommentVNode("", true)
|
|
971
|
+
], 16)) : createCommentVNode("", true),
|
|
972
|
+
_ctx.treeTable ? (openBlock(), createElementBlock("td", mergeProps({
|
|
662
973
|
key: 2,
|
|
663
|
-
ref_for:
|
|
664
|
-
}, (
|
|
665
|
-
onClick: (
|
|
666
|
-
(
|
|
974
|
+
ref_for: true
|
|
975
|
+
}, (_e2 = unref(Preset)) == null ? void 0 : _e2.bodycell, {
|
|
976
|
+
onClick: (e) => {
|
|
977
|
+
(item.childRow || item.childRowHeader) && e.stopPropagation();
|
|
667
978
|
}
|
|
668
979
|
}), [
|
|
669
|
-
(
|
|
980
|
+
((_f = item.children) == null ? void 0 : _f.length) || item.hasChildren ? (openBlock(), createBlock(_sfc_main$2, mergeProps(
|
|
670
981
|
{
|
|
671
982
|
key: 0,
|
|
672
|
-
onClick:
|
|
673
|
-
ref_for:
|
|
983
|
+
onClick: withModifiers(($event) => toggleRowExpand(item, index), ["stop"]),
|
|
984
|
+
ref_for: true
|
|
674
985
|
},
|
|
675
|
-
|
|
986
|
+
unref(Preset).rowtogglerbutton({
|
|
676
987
|
context: {
|
|
677
|
-
isRowExpanded:
|
|
988
|
+
isRowExpanded: isRowExpanded(item[_ctx.dataKey])
|
|
678
989
|
}
|
|
679
990
|
}),
|
|
680
991
|
{
|
|
681
992
|
icon: "arrow-down",
|
|
682
993
|
text: ""
|
|
683
994
|
}
|
|
684
|
-
), null, 16, ["onClick"])) :
|
|
685
|
-
], 16,
|
|
995
|
+
), null, 16, ["onClick"])) : createCommentVNode("", true)
|
|
996
|
+
], 16, _hoisted_8)) : createCommentVNode("", true),
|
|
686
997
|
(() => {
|
|
687
|
-
var
|
|
688
|
-
return
|
|
689
|
-
})() ? (
|
|
690
|
-
(
|
|
691
|
-
var
|
|
692
|
-
return
|
|
693
|
-
key:
|
|
694
|
-
class:
|
|
695
|
-
colspan:
|
|
696
|
-
onClick:
|
|
998
|
+
var _a4;
|
|
999
|
+
return item.childRowHeader && ((_a4 = props.childTableProps) == null ? void 0 : _a4.useColumnsHeader);
|
|
1000
|
+
})() ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
1001
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleChildTableColumns.value, (col) => {
|
|
1002
|
+
var _a4, _b4;
|
|
1003
|
+
return openBlock(), createElementBlock("td", {
|
|
1004
|
+
key: col.header,
|
|
1005
|
+
class: normalizeClass([(_a4 = unref(Preset)) == null ? void 0 : _a4.bodycell.class, "font-semibold text-xs"]),
|
|
1006
|
+
colspan: col.colspan ?? ((_b4 = col.parentColumnsFields) == null ? void 0 : _b4.length),
|
|
1007
|
+
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
697
1008
|
}, ["stop"]))
|
|
698
|
-
},
|
|
1009
|
+
}, toDisplayString(col.header), 11, _hoisted_9);
|
|
699
1010
|
}), 128)),
|
|
700
|
-
|
|
1011
|
+
showCustomColumn.value ? (openBlock(), createElementBlock("td", {
|
|
701
1012
|
key: 0,
|
|
702
|
-
class:
|
|
703
|
-
onClick:
|
|
1013
|
+
class: normalizeClass(unref(Preset).bodycell.class),
|
|
1014
|
+
onClick: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
704
1015
|
}, ["stop"]))
|
|
705
|
-
}, null, 2)) :
|
|
706
|
-
], 64)) :
|
|
1016
|
+
}, null, 2)) : createCommentVNode("", true)
|
|
1017
|
+
], 64)) : item.childRowHeader ? (openBlock(), createElementBlock("td", mergeProps({
|
|
707
1018
|
key: 4,
|
|
708
|
-
ref_for:
|
|
709
|
-
},
|
|
710
|
-
class: (
|
|
711
|
-
colspan:
|
|
712
|
-
onClick:
|
|
1019
|
+
ref_for: true
|
|
1020
|
+
}, unref(Preset).childrowheader, {
|
|
1021
|
+
class: (_g = unref(Preset)) == null ? void 0 : _g.bodycell.class,
|
|
1022
|
+
colspan: props.columns.length + 1,
|
|
1023
|
+
onClick: _cache[6] || (_cache[6] = withModifiers(() => {
|
|
713
1024
|
}, ["stop"]))
|
|
714
|
-
}),
|
|
1025
|
+
}), toDisplayString(item.header), 17, _hoisted_10)) : item.loadingRow ? (openBlock(), createElementBlock("td", {
|
|
715
1026
|
key: 5,
|
|
716
|
-
class:
|
|
717
|
-
colspan:
|
|
718
|
-
onClick:
|
|
1027
|
+
class: normalizeClass((_h = unref(Preset)) == null ? void 0 : _h.bodycell.class),
|
|
1028
|
+
colspan: props.columns.length + 1,
|
|
1029
|
+
onClick: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
719
1030
|
}, ["stop"]))
|
|
720
1031
|
}, [
|
|
721
|
-
|
|
722
|
-
|
|
1032
|
+
createElementVNode("div", mergeProps({ ref_for: true }, unref(Preset).loadingtablewrapper), [
|
|
1033
|
+
createVNode(_sfc_main$4, mergeProps({
|
|
723
1034
|
animation: "loading-table",
|
|
724
|
-
ref_for:
|
|
725
|
-
},
|
|
1035
|
+
ref_for: true
|
|
1036
|
+
}, unref(Preset).loadingtablelottie), null, 16)
|
|
726
1037
|
], 16)
|
|
727
|
-
], 10,
|
|
1038
|
+
], 10, _hoisted_11)) : item.noDataRow ? (openBlock(), createElementBlock("td", {
|
|
728
1039
|
key: 6,
|
|
729
|
-
class:
|
|
730
|
-
colspan:
|
|
731
|
-
onClick:
|
|
1040
|
+
class: normalizeClass((_i = unref(Preset)) == null ? void 0 : _i.bodycell.class),
|
|
1041
|
+
colspan: props.columns.length + 1,
|
|
1042
|
+
onClick: _cache[8] || (_cache[8] = withModifiers(() => {
|
|
732
1043
|
}, ["stop"]))
|
|
733
1044
|
}, [
|
|
734
|
-
|
|
735
|
-
|
|
1045
|
+
createElementVNode("div", mergeProps({ ref_for: true }, unref(Preset).nodatalottiewrapper), [
|
|
1046
|
+
createVNode(_sfc_main$4, mergeProps({
|
|
736
1047
|
animation: "no-data",
|
|
737
|
-
ref_for:
|
|
738
|
-
},
|
|
739
|
-
|
|
1048
|
+
ref_for: true
|
|
1049
|
+
}, unref(Preset).nodatalottie), null, 16),
|
|
1050
|
+
config.value.emptyTableMessage ? (openBlock(), createElementBlock("span", mergeProps({
|
|
740
1051
|
key: 0,
|
|
741
|
-
ref_for:
|
|
742
|
-
},
|
|
1052
|
+
ref_for: true
|
|
1053
|
+
}, unref(Preset).nodatamessage), toDisplayString(config.value.emptyTableMessage), 17)) : createCommentVNode("", true)
|
|
743
1054
|
], 16)
|
|
744
|
-
], 10,
|
|
745
|
-
(
|
|
746
|
-
var
|
|
747
|
-
return
|
|
748
|
-
key:
|
|
1055
|
+
], 10, _hoisted_12)) : (openBlock(), createElementBlock(Fragment, { key: 7 }, [
|
|
1056
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.childRow ? visibleChildTableColumns.value : visibleColumns.value, (col) => {
|
|
1057
|
+
var _a4, _b4, _c4, _d3, _e3, _f2, _g2, _h2, _i2, _j2, _k2, _l, _m, _n, _o, _p, _q, _r;
|
|
1058
|
+
return openBlock(), createElementBlock("td", mergeProps({
|
|
1059
|
+
key: col.field,
|
|
749
1060
|
class: [
|
|
750
1061
|
{
|
|
751
|
-
"!py-0":
|
|
752
|
-
"!px-0": ((
|
|
1062
|
+
"!py-0": col.editable,
|
|
1063
|
+
"!px-0": ((_a4 = col.preset) == null ? void 0 : _a4.type) === "multirow"
|
|
753
1064
|
},
|
|
754
|
-
typeof
|
|
755
|
-
|
|
1065
|
+
typeof col.bodyClass === "function" ? col.bodyClass(item) : col.bodyClass,
|
|
1066
|
+
col.class
|
|
756
1067
|
],
|
|
757
|
-
colspan:
|
|
758
|
-
ref_for:
|
|
759
|
-
}, (
|
|
760
|
-
((
|
|
761
|
-
((
|
|
1068
|
+
colspan: col.colspan ?? ((_b4 = col.parentColumnsFields) == null ? void 0 : _b4.length),
|
|
1069
|
+
ref_for: true
|
|
1070
|
+
}, (_c4 = unref(Preset)) == null ? void 0 : _c4.bodycell), [
|
|
1071
|
+
((_d3 = col.preset) == null ? void 0 : _d3.type) === "toggle" || ((_e3 = col.preset) == null ? void 0 : _e3.type) === "checkbox" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1072
|
+
((_f2 = col.preset) == null ? void 0 : _f2.type) === "toggle" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
762
1073
|
key: 0,
|
|
763
|
-
disabled:
|
|
764
|
-
"input-id":
|
|
765
|
-
"model-value":
|
|
766
|
-
onClick:
|
|
1074
|
+
disabled: isRowDisabled(item[_ctx.dataKey]) || (typeof ((_g2 = col.preset) == null ? void 0 : _g2.disabled) === "function" ? (_h2 = col.preset) == null ? void 0 : _h2.disabled(item) : (_i2 = col.preset) == null ? void 0 : _i2.disabled),
|
|
1075
|
+
"input-id": item[_ctx.dataKey],
|
|
1076
|
+
"model-value": unref(getNestedPropertyValue)(item, col.field),
|
|
1077
|
+
onClick: _cache[9] || (_cache[9] = withModifiers(() => {
|
|
767
1078
|
}, ["stop"])),
|
|
768
|
-
"onUpdate:modelValue": (
|
|
769
|
-
|
|
1079
|
+
"onUpdate:modelValue": (e) => {
|
|
1080
|
+
unref(setNestedPropertyValue)(item, col.field, e);
|
|
1081
|
+
onColumnTogglePresetChange(e, item, col);
|
|
770
1082
|
}
|
|
771
|
-
}, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) :
|
|
772
|
-
((
|
|
1083
|
+
}, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) : createCommentVNode("", true),
|
|
1084
|
+
((_j2 = col.preset) == null ? void 0 : _j2.type) === "checkbox" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
773
1085
|
key: 1,
|
|
774
|
-
disabled:
|
|
775
|
-
"input-id":
|
|
776
|
-
"model-value":
|
|
777
|
-
onClick:
|
|
1086
|
+
disabled: isRowDisabled(item[_ctx.dataKey]) || (typeof ((_k2 = col.preset) == null ? void 0 : _k2.disabled) === "function" ? (_l = col.preset) == null ? void 0 : _l.disabled(item) : (_m = col.preset) == null ? void 0 : _m.disabled),
|
|
1087
|
+
"input-id": item[_ctx.dataKey],
|
|
1088
|
+
"model-value": unref(getNestedPropertyValue)(item, col.field),
|
|
1089
|
+
onClick: _cache[10] || (_cache[10] = withModifiers(() => {
|
|
778
1090
|
}, ["stop"])),
|
|
779
|
-
"onUpdate:modelValue": (
|
|
780
|
-
|
|
1091
|
+
"onUpdate:modelValue": (e) => {
|
|
1092
|
+
unref(setNestedPropertyValue)(item, col.field, !!e);
|
|
1093
|
+
onColumnTogglePresetChange(!!e, item, col);
|
|
781
1094
|
},
|
|
782
1095
|
binary: ""
|
|
783
|
-
}, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) :
|
|
784
|
-
(
|
|
1096
|
+
}, null, 8, ["disabled", "input-id", "model-value", "onUpdate:modelValue"])) : createCommentVNode("", true),
|
|
1097
|
+
((_n = col.preset) == null ? void 0 : _n.confirmDialogProps) ? (openBlock(), createBlock(_sfc_main$6, mergeProps(
|
|
785
1098
|
{
|
|
786
1099
|
key: 2,
|
|
787
|
-
list: [
|
|
788
|
-
visible: !!
|
|
1100
|
+
list: [item],
|
|
1101
|
+
visible: !!showConfirmToggle.value[item[_ctx.dataKey] + col.field],
|
|
789
1102
|
onClose: () => {
|
|
790
|
-
var
|
|
791
|
-
const
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
!
|
|
1103
|
+
var _a5, _b5, _c5;
|
|
1104
|
+
const revert = () => unref(setNestedPropertyValue)(
|
|
1105
|
+
item,
|
|
1106
|
+
col.field,
|
|
1107
|
+
!unref(getNestedPropertyValue)(item, col.field)
|
|
795
1108
|
);
|
|
796
|
-
((
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
)) == null ? void 0 :
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1109
|
+
if (((_a5 = getConfirmDialogProps(
|
|
1110
|
+
col.preset,
|
|
1111
|
+
item[col.field],
|
|
1112
|
+
item
|
|
1113
|
+
)) == null ? void 0 : _a5.actionable) == false && "onConfirm" in col.preset) {
|
|
1114
|
+
(_c5 = (_b5 = col.preset).onConfirm) == null ? void 0 : _c5.call(
|
|
1115
|
+
_b5,
|
|
1116
|
+
item[col.field],
|
|
1117
|
+
item,
|
|
1118
|
+
revert
|
|
1119
|
+
);
|
|
1120
|
+
} else revert();
|
|
806
1121
|
},
|
|
807
|
-
onConfirm: (
|
|
808
|
-
var
|
|
809
|
-
return (
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
() =>
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
!
|
|
1122
|
+
onConfirm: ($event) => {
|
|
1123
|
+
var _a5, _b5;
|
|
1124
|
+
return (_b5 = (_a5 = col.preset) == null ? void 0 : _a5.onConfirm) == null ? void 0 : _b5.call(
|
|
1125
|
+
_a5,
|
|
1126
|
+
item[col.field],
|
|
1127
|
+
item,
|
|
1128
|
+
() => unref(setNestedPropertyValue)(
|
|
1129
|
+
item,
|
|
1130
|
+
col.field,
|
|
1131
|
+
!unref(getNestedPropertyValue)(item, col.field)
|
|
817
1132
|
)
|
|
818
1133
|
);
|
|
819
1134
|
},
|
|
820
|
-
"onUpdate:visible": (
|
|
1135
|
+
"onUpdate:visible": ($event) => showConfirmToggle.value[item[_ctx.dataKey] + col.field] = $event,
|
|
821
1136
|
actionable: "",
|
|
822
|
-
ref_for:
|
|
1137
|
+
ref_for: true
|
|
823
1138
|
},
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
1139
|
+
getConfirmDialogProps(
|
|
1140
|
+
col.preset,
|
|
1141
|
+
item[col.field],
|
|
1142
|
+
item
|
|
828
1143
|
)
|
|
829
|
-
), null, 16, ["list", "visible", "onClose", "onConfirm", "onUpdate:visible"])) :
|
|
830
|
-
], 64)) : ((
|
|
1144
|
+
), null, 16, ["list", "visible", "onClose", "onConfirm", "onUpdate:visible"])) : createCommentVNode("", true)
|
|
1145
|
+
], 64)) : ((_o = col.preset) == null ? void 0 : _o.type) === "multirow" ? (openBlock(), createBlock(_sfc_main$7, {
|
|
831
1146
|
key: 1,
|
|
832
|
-
attributes: ((
|
|
833
|
-
}, null, 8, ["attributes"])) :
|
|
1147
|
+
attributes: ((_q = (_p = col.preset) == null ? void 0 : _p.fieldAttributes) == null ? void 0 : _q.call(_p, item)) ?? []
|
|
1148
|
+
}, null, 8, ["attributes"])) : col.editable ? (openBlock(), createElementBlock("span", mergeProps({
|
|
834
1149
|
key: 2,
|
|
835
|
-
ref_for:
|
|
836
|
-
},
|
|
837
|
-
contenteditable:
|
|
838
|
-
onBlur: (
|
|
839
|
-
|
|
840
|
-
item
|
|
841
|
-
field:
|
|
842
|
-
index
|
|
843
|
-
value:
|
|
1150
|
+
ref_for: true
|
|
1151
|
+
}, unref(Preset).celleditableelement, {
|
|
1152
|
+
contenteditable: col.editable,
|
|
1153
|
+
onBlur: (e) => {
|
|
1154
|
+
_ctx.$emit("cellEdited", {
|
|
1155
|
+
item,
|
|
1156
|
+
field: col.field,
|
|
1157
|
+
index,
|
|
1158
|
+
value: e.target.innerText
|
|
844
1159
|
});
|
|
845
1160
|
},
|
|
846
|
-
onKeypress: (
|
|
847
|
-
|
|
1161
|
+
onKeypress: ($event) => {
|
|
1162
|
+
if (col.numberInputOnly) preventCharInput($event);
|
|
848
1163
|
}
|
|
849
|
-
}),
|
|
850
|
-
|
|
1164
|
+
}), toDisplayString(unref(getNestedPropertyValue)(item, col.field) || "-"), 17, _hoisted_14)) : col.bodyComponent || col.bodyClass || col.bodyTemplate || col.dateFormatOptions ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
1165
|
+
col.bodyComponent ? (openBlock(), createBlock(resolveDynamicComponent(col.bodyComponent(item, index).component), mergeProps({
|
|
851
1166
|
key: 0,
|
|
852
|
-
modelValue:
|
|
853
|
-
"onUpdate:modelValue": (
|
|
854
|
-
disabled:
|
|
855
|
-
ref_for:
|
|
856
|
-
},
|
|
857
|
-
|
|
1167
|
+
modelValue: col.bodyComponent(item, index).model,
|
|
1168
|
+
"onUpdate:modelValue": ($event) => col.bodyComponent(item, index).model = $event,
|
|
1169
|
+
disabled: col.bodyComponent(item, index).disabled,
|
|
1170
|
+
ref_for: true
|
|
1171
|
+
}, col.bodyComponent(item, index).props, toHandlers(
|
|
1172
|
+
col.bodyComponent(item, index).events ? col.bodyComponent(item, index).events : {}
|
|
858
1173
|
), {
|
|
859
|
-
onChange: (
|
|
860
|
-
var
|
|
861
|
-
return (
|
|
1174
|
+
onChange: ($event) => {
|
|
1175
|
+
var _a5, _b5;
|
|
1176
|
+
return (_b5 = (_a5 = col.bodyComponent(item, index)).onChange) == null ? void 0 : _b5.call(_a5, item);
|
|
862
1177
|
},
|
|
863
|
-
onClick: (
|
|
864
|
-
|
|
1178
|
+
onClick: (e) => {
|
|
1179
|
+
if (col.bodyComponent(item, index).stop !== false) {
|
|
1180
|
+
e.stopPropagation();
|
|
1181
|
+
}
|
|
865
1182
|
},
|
|
866
|
-
"onUpdate:modelValue": (
|
|
867
|
-
var
|
|
868
|
-
return (
|
|
1183
|
+
"onUpdate:modelValue": ($event) => {
|
|
1184
|
+
var _a5, _b5;
|
|
1185
|
+
return (_b5 = (_a5 = col.bodyComponent(item, index)).onChange) == null ? void 0 : _b5.call(_a5, item);
|
|
869
1186
|
}
|
|
870
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange", "onClick"])) : (
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
], 64)) :
|
|
874
|
-
|
|
1187
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange", "onClick"])) : (openBlock(), createElementBlock("span", _hoisted_15, [
|
|
1188
|
+
col.bodyTemplate ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1189
|
+
createTextVNode(toDisplayString(((_r = col.bodyTemplate) == null ? void 0 : _r.call(col, item, index)) || "-"), 1)
|
|
1190
|
+
], 64)) : col.dateFormatOptions ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1191
|
+
createTextVNode(toDisplayString(unref(formatDate)(
|
|
875
1192
|
new Date(
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1193
|
+
unref(getNestedPropertyValue)(
|
|
1194
|
+
item,
|
|
1195
|
+
col.field
|
|
879
1196
|
)
|
|
880
1197
|
),
|
|
881
|
-
|
|
1198
|
+
col.dateFormatOptions
|
|
882
1199
|
)), 1)
|
|
883
|
-
], 64)) : (
|
|
884
|
-
|
|
1200
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1201
|
+
createTextVNode(toDisplayString(unref(getNestedPropertyValue)(item, col.field) || "-"), 1)
|
|
885
1202
|
], 64))
|
|
886
1203
|
]))
|
|
887
|
-
], 64)) : (
|
|
888
|
-
|
|
1204
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
1205
|
+
createTextVNode(toDisplayString(unref(getNestedPropertyValue)(item, col.field) ?? "-"), 1)
|
|
889
1206
|
], 64))
|
|
890
|
-
], 16,
|
|
1207
|
+
], 16, _hoisted_13);
|
|
891
1208
|
}), 128)),
|
|
892
|
-
|
|
1209
|
+
showCustomColumn.value ? (openBlock(), createElementBlock("td", mergeProps(
|
|
893
1210
|
{
|
|
894
1211
|
key: 0,
|
|
895
|
-
ref_for:
|
|
1212
|
+
ref_for: true,
|
|
896
1213
|
ref_key: "rowSingleActionCell",
|
|
897
|
-
ref:
|
|
1214
|
+
ref: rowSingleActionCell
|
|
898
1215
|
},
|
|
899
|
-
(
|
|
900
|
-
props
|
|
1216
|
+
(_j = unref(Preset)) == null ? void 0 : _j.rowsingleactioncell({
|
|
1217
|
+
props,
|
|
901
1218
|
context: {
|
|
902
|
-
selected:
|
|
903
|
-
highlighted:
|
|
1219
|
+
selected: isRowSelected(item[_ctx.dataKey]),
|
|
1220
|
+
highlighted: item[_ctx.highlightKey ?? ""]
|
|
904
1221
|
}
|
|
905
1222
|
}),
|
|
906
1223
|
{
|
|
907
|
-
class:
|
|
1224
|
+
class: unref(Preset).bodycell.class
|
|
908
1225
|
}
|
|
909
1226
|
), [
|
|
910
|
-
!
|
|
1227
|
+
!item.childRow && _ctx.useOption || item.childRow && ((_k = props.childTableProps) == null ? void 0 : _k.useOption) ? (openBlock(), createElementBlock("div", mergeProps({
|
|
911
1228
|
key: 0,
|
|
912
|
-
ref_for:
|
|
913
|
-
},
|
|
914
|
-
|
|
915
|
-
id: "button-action-" +
|
|
916
|
-
ref_for:
|
|
917
|
-
},
|
|
918
|
-
disabled:
|
|
919
|
-
onClick:
|
|
1229
|
+
ref_for: true
|
|
1230
|
+
}, unref(Preset).singleactionwrapper), [
|
|
1231
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
1232
|
+
id: "button-action-" + item[props.dataKey],
|
|
1233
|
+
ref_for: true
|
|
1234
|
+
}, unref(Preset).singleactionbutton({ props }), {
|
|
1235
|
+
disabled: _ctx.disableAllRows,
|
|
1236
|
+
onClick: withModifiers(($event) => toggleOptions($event, item), ["stop"]),
|
|
920
1237
|
icon: "ellipsis-h",
|
|
921
1238
|
outlined: "",
|
|
922
1239
|
size: "small",
|
|
923
1240
|
"tooltip-pos": "left",
|
|
924
1241
|
type: "button"
|
|
925
1242
|
}), null, 16, ["id", "disabled", "onClick"])
|
|
926
|
-
], 16)) :
|
|
927
|
-
], 16)) :
|
|
1243
|
+
], 16)) : createCommentVNode("", true)
|
|
1244
|
+
], 16)) : createCommentVNode("", true)
|
|
928
1245
|
], 64))
|
|
929
|
-
], 16,
|
|
930
|
-
}), 128))
|
|
1246
|
+
], 16, _hoisted_7);
|
|
1247
|
+
}), 128)) : (openBlock(), createElementBlock("tr", _hoisted_16, [
|
|
1248
|
+
createElementVNode("td", mergeProps({ colspan: columnsCount.value }, (_e = unref(Preset)) == null ? void 0 : _e.bodycell), [
|
|
1249
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(Preset).invisiblelottiewrapper ? 2 : 1, (i) => {
|
|
1250
|
+
return openBlock(), createElementBlock("div", mergeProps(
|
|
1251
|
+
{
|
|
1252
|
+
key: i,
|
|
1253
|
+
ref_for: true
|
|
1254
|
+
},
|
|
1255
|
+
i === 1 ? unref(Preset).nodatalottiewrapper : unref(Preset).invisiblelottiewrapper
|
|
1256
|
+
), [
|
|
1257
|
+
createVNode(_sfc_main$4, mergeProps({
|
|
1258
|
+
animation: "no-data",
|
|
1259
|
+
ref_for: true
|
|
1260
|
+
}, unref(Preset).nodatalottie), null, 16),
|
|
1261
|
+
config.value.emptyTableMessage ? (openBlock(), createElementBlock("span", mergeProps({
|
|
1262
|
+
key: 0,
|
|
1263
|
+
ref_for: true
|
|
1264
|
+
}, unref(Preset).nodatamessage), toDisplayString(config.value.emptyTableMessage), 17)) : createCommentVNode("", true)
|
|
1265
|
+
], 16);
|
|
1266
|
+
}), 128))
|
|
1267
|
+
], 16, _hoisted_17)
|
|
1268
|
+
]))
|
|
931
1269
|
], 16)
|
|
932
|
-
], 16,
|
|
1270
|
+
], 16, _hoisted_1))
|
|
933
1271
|
];
|
|
934
1272
|
}),
|
|
935
1273
|
_: 1
|
|
936
1274
|
}, 16)
|
|
937
1275
|
], 16),
|
|
938
|
-
|
|
939
|
-
key:
|
|
940
|
-
rows:
|
|
941
|
-
"onUpdate:rows":
|
|
942
|
-
},
|
|
943
|
-
"rows-per-page-options":
|
|
944
|
-
"total-records":
|
|
945
|
-
onPage:
|
|
1276
|
+
_ctx.usePaginator ? withDirectives((openBlock(), createBlock(unref(script), mergeProps({
|
|
1277
|
+
key: paginatorKey.value,
|
|
1278
|
+
rows: tableRows.value,
|
|
1279
|
+
"onUpdate:rows": _cache[14] || (_cache[14] = ($event) => tableRows.value = $event)
|
|
1280
|
+
}, unref(Preset).paginator({ context: { totalRecords: totalRecords.value } }), {
|
|
1281
|
+
"rows-per-page-options": rowsPerPageOptions,
|
|
1282
|
+
"total-records": totalRecords.value,
|
|
1283
|
+
onPage: handlePageChange
|
|
946
1284
|
}), {
|
|
947
|
-
firstpagelinkicon:
|
|
948
|
-
|
|
1285
|
+
firstpagelinkicon: withCtx(() => [
|
|
1286
|
+
createVNode(_sfc_main$3, { icon: "round-keyboard-double-arrow-left" })
|
|
949
1287
|
]),
|
|
950
|
-
lastpagelinkicon:
|
|
951
|
-
|
|
1288
|
+
lastpagelinkicon: withCtx(() => [
|
|
1289
|
+
createVNode(_sfc_main$3, { icon: "round-keyboard-double-arrow-right" })
|
|
952
1290
|
]),
|
|
953
|
-
prevpagelinkicon:
|
|
954
|
-
|
|
1291
|
+
prevpagelinkicon: withCtx(() => [
|
|
1292
|
+
createVNode(_sfc_main$3, { icon: "round-keyboard-arrow-left" })
|
|
955
1293
|
]),
|
|
956
|
-
nextpagelinkicon:
|
|
957
|
-
|
|
1294
|
+
nextpagelinkicon: withCtx(() => [
|
|
1295
|
+
createVNode(_sfc_main$3, { icon: "round-keyboard-arrow-right" })
|
|
958
1296
|
]),
|
|
959
1297
|
_: 1
|
|
960
1298
|
}, 16, ["rows", "total-records"])), [
|
|
961
|
-
[
|
|
962
|
-
]) :
|
|
963
|
-
|
|
1299
|
+
[vShow, !tableIsLoading.value]
|
|
1300
|
+
]) : createCommentVNode("", true),
|
|
1301
|
+
createVNode(_sfc_main$8, {
|
|
964
1302
|
id: "single-action-menu",
|
|
965
1303
|
ref_key: "optionMenu",
|
|
966
|
-
ref:
|
|
967
|
-
model:
|
|
968
|
-
onFocus:
|
|
1304
|
+
ref: optionMenu,
|
|
1305
|
+
model: _ctx.options,
|
|
1306
|
+
onFocus: unref(adjustMenuPositionHelper),
|
|
969
1307
|
"append-to": "body",
|
|
970
1308
|
"auto-z-index": "",
|
|
971
1309
|
popup: ""
|
|
972
1310
|
}, null, 8, ["model", "onFocus"]),
|
|
973
|
-
|
|
974
|
-
key:
|
|
1311
|
+
props.customColumn ? (openBlock(), createBlock(_sfc_main$9, {
|
|
1312
|
+
key: customColumnKey.value,
|
|
975
1313
|
ref_key: "customColumn",
|
|
976
|
-
ref:
|
|
977
|
-
"visible-columns":
|
|
978
|
-
"onUpdate:visibleColumns":
|
|
979
|
-
"default-columns":
|
|
980
|
-
"table-id":
|
|
981
|
-
}, null, 8, ["visible-columns", "default-columns", "table-id"])) :
|
|
982
|
-
|
|
1314
|
+
ref: customColumn,
|
|
1315
|
+
"visible-columns": visibleColumns.value,
|
|
1316
|
+
"onUpdate:visibleColumns": _cache[15] || (_cache[15] = ($event) => visibleColumns.value = $event),
|
|
1317
|
+
"default-columns": _ctx.columns.filter((col) => col.visible !== false),
|
|
1318
|
+
"table-id": unref(dataTableID)
|
|
1319
|
+
}, null, 8, ["visible-columns", "default-columns", "table-id"])) : createCommentVNode("", true),
|
|
1320
|
+
createVNode(_sfc_main$a, { group: "download" })
|
|
983
1321
|
], 16);
|
|
984
1322
|
};
|
|
985
1323
|
}
|
|
986
|
-
})
|
|
1324
|
+
});
|
|
1325
|
+
const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5797150a"]]);
|
|
987
1326
|
export {
|
|
988
|
-
|
|
1327
|
+
DataTable as D
|
|
989
1328
|
};
|