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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. package/animation/index.es.js +54 -37
  2. package/assets/lottiejs/loading-page.es.js +14 -9
  3. package/assets/lottiejs/loading-plane.es.js +2 -2
  4. package/assets/lottiejs/loading-table.es.js +14 -9
  5. package/assets/lottiejs/no-data.es.js +14 -9
  6. package/backgroundimagecropper/index.es.js +61 -37
  7. package/badge/index.es.js +77 -67
  8. package/badgegroup/index.es.js +62 -50
  9. package/basecalendar/index.es.js +1258 -735
  10. package/basetree/index.es.js +213 -113
  11. package/breadcrumb/index.es.js +46 -38
  12. package/button/index.es.js +60 -54
  13. package/buttonbulkaction/index.es.js +168 -117
  14. package/buttoncopy/index.es.js +25 -22
  15. package/buttondownload/index.es.js +125 -76
  16. package/buttonfilter/index.es.js +21 -15
  17. package/buttonradio/index.es.js +91 -67
  18. package/buttonsearch/index.es.js +62 -46
  19. package/buttonselecttree/index.es.js +233 -172
  20. package/buttontoggle/index.es.js +8 -6
  21. package/calendar/index.es.js +113 -58
  22. package/card/index.es.js +44 -42
  23. package/checkbox/index.es.js +105 -74
  24. package/codesnippet/index.es.js +91 -71
  25. package/codesnippetadapter/index.es.js +25 -21
  26. package/columnlist/index.es.js +249 -171
  27. package/components.d.ts +0 -21
  28. package/config/defaultProps.es.js +9 -9
  29. package/config/index.es.js +11 -10
  30. package/config/locale.es.js +2 -2
  31. package/customcolumn/index.es.js +95 -78
  32. package/datatable/index.es.js +1071 -732
  33. package/dialog/index.es.js +54 -54
  34. package/dialogconfirm/index.es.js +90 -75
  35. package/dialogform/index.es.js +170 -133
  36. package/dialogselecttree/index.es.js +242 -194
  37. package/directives/focus.es.js +13 -8
  38. package/dropdown/index.es.js +250 -196
  39. package/editor/index.es.js +694 -498
  40. package/editorbutton/index.es.js +21 -19
  41. package/event-bus/index.es.js +3 -3
  42. package/event-bus/mitt.es.js +37 -20
  43. package/fieldwrapper/index.es.js +30 -25
  44. package/fileupload/index.es.js +230 -140
  45. package/filtercontainer/index.es.js +299 -222
  46. package/form/index.es.js +176 -126
  47. package/gallerypreview/index.es.js +138 -101
  48. package/icon/index.es.js +38 -36
  49. package/image/index.es.js +161 -108
  50. package/imagecompressor/index.es.js +616 -449
  51. package/imageinputinfo/index.es.js +26 -22
  52. package/inlinemessage/index.es.js +77 -65
  53. package/inputbadge/index.es.js +230 -156
  54. package/inputcurrency/index.es.js +146 -109
  55. package/inputemail/index.es.js +18 -16
  56. package/inputgroup/index.es.js +19 -16
  57. package/inputnumber/index.es.js +252 -182
  58. package/inputpassword/index.es.js +120 -94
  59. package/inputphonenumber/index.es.js +1017 -550
  60. package/inputrangenumber/index.es.js +129 -98
  61. package/inputtext/index.es.js +264 -189
  62. package/inputurl/index.es.js +31 -29
  63. package/invisiblefield/index.es.js +24 -16
  64. package/litedropdown/index.es.js +87 -81
  65. package/loading/index.es.js +21 -19
  66. package/loading-page-BXZ4fLOS.js +8 -0
  67. package/loading-page-BuLpsb_1.js +8 -0
  68. package/loading-page-CNqVBg__.js +4 -0
  69. package/loading-page-DbhhZih2.js +4 -0
  70. package/loading-page-DjfWXoOy.js +8 -0
  71. package/loading-page-S-KRY5zm.js +4 -0
  72. package/loading-plane-C1mi7Whv.js +4 -0
  73. package/loading-plane-CWq1hz_l.js +8 -0
  74. package/loading-table-B7LAXzAp.js +4 -0
  75. package/loading-table-BLmgKUsR.js +4 -0
  76. package/loading-table-CG7-cuhv.js +8 -0
  77. package/loading-table-CUPS49ta.js +4 -0
  78. package/loading-table-CuWWrTbv.js +8 -0
  79. package/loading-table-DbBzVwaZ.js +8 -0
  80. package/mentionlist/index.es.js +77 -44
  81. package/mentionsection/index.es.js +53 -43
  82. package/menu/index.es.js +65 -51
  83. package/menuitem/index.es.js +39 -37
  84. package/multirow/index.es.js +29 -28
  85. package/multiselect/index.es.js +184 -152
  86. package/no-data-B781skt3.js +4 -0
  87. package/no-data-CAksOnDl.js +4 -0
  88. package/no-data-DCsjBXQR.js +4 -0
  89. package/no-data-Dz0QOe7Q.js +8 -0
  90. package/no-data-_Huxiv9q.js +8 -0
  91. package/no-data-ybRQontJ.js +8 -0
  92. package/overlaypanel/index.es.js +49 -36
  93. package/package.json +1 -1
  94. package/paginator/index.es.js +36 -33
  95. package/plugins/WangsVue.es.js +63 -45
  96. package/plugins/formValidation.es.js +15 -11
  97. package/progressbar/index.es.js +39 -32
  98. package/quickfilter/index.es.js +94 -81
  99. package/stats.html +1 -1
  100. package/style.css +2 -2
  101. package/tabmenu/index.es.js +18 -16
  102. package/textarea/index.es.js +94 -72
  103. package/timeline/index.es.js +124 -102
  104. package/timelinecontentbytype/index.es.js +114 -92
  105. package/toast/index.es.js +67 -54
  106. package/toggleswitch/index.es.js +83 -66
  107. package/tree/index.es.js +306 -198
  108. package/treenode/index.es.js +464 -339
  109. package/treesearchinput/index.es.js +32 -26
  110. package/usergroup/index.es.js +83 -67
  111. package/username/index.es.js +99 -85
  112. package/utils/addAttachment.util.es.js +47 -21
  113. package/utils/baseToast.util.es.js +41 -33
  114. package/utils/convertJsonImage.util.es.js +24 -24
  115. package/utils/date.util.es.js +131 -106
  116. package/utils/exportToExcel.util.es.js +81 -47
  117. package/utils/filterOptions.util.es.js +8 -2
  118. package/utils/genPlaceholder.util.es.js +30 -16
  119. package/utils/getProjectPermission.util.es.js +15 -12
  120. package/utils/getSalesRole.util.es.js +4 -4
  121. package/utils/getUser.util.es.js +2 -2
  122. package/utils/getUserType.util.es.js +13 -8
  123. package/utils/isIntersect.es.js +4 -2
  124. package/utils/mergePropsWithDefaults.util.es.js +7 -6
  125. package/utils/object.util.es.js +88 -54
  126. package/utils/queryParamsStringfy.util.es.js +19 -11
  127. package/utils/role.util.es.js +5 -4
  128. package/utils/statusSeverity.util.es.js +20 -5
  129. package/utils/textFormatter.util.es.js +28 -50
  130. package/utils/toast.util.es.js +8 -5
  131. package/utils/xlsx.util.es.js +12 -6
  132. package/validatormessage/index.es.js +9 -9
  133. package/vendor/@popperjs/core/lib/createPopper.es.js +110 -83
  134. package/vendor/@popperjs/core/lib/dom-utils/contains.es.js +14 -13
  135. package/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.es.js +33 -18
  136. package/vendor/@popperjs/core/lib/dom-utils/getClippingRect.es.js +55 -31
  137. package/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.es.js +43 -22
  138. package/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.es.js +4 -4
  139. package/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.es.js +5 -5
  140. package/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.es.js +23 -13
  141. package/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.es.js +4 -4
  142. package/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.es.js +17 -9
  143. package/vendor/@popperjs/core/lib/dom-utils/getNodeName.es.js +3 -3
  144. package/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.es.js +11 -7
  145. package/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.es.js +42 -26
  146. package/vendor/@popperjs/core/lib/dom-utils/getParentNode.es.js +13 -10
  147. package/vendor/@popperjs/core/lib/dom-utils/getScrollParent.es.js +13 -7
  148. package/vendor/@popperjs/core/lib/dom-utils/getViewportRect.es.js +25 -15
  149. package/vendor/@popperjs/core/lib/dom-utils/getWindow.es.js +8 -7
  150. package/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.es.js +8 -6
  151. package/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.es.js +6 -6
  152. package/vendor/@popperjs/core/lib/dom-utils/instanceOf.es.js +16 -15
  153. package/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.es.js +4 -4
  154. package/vendor/@popperjs/core/lib/dom-utils/isScrollParent.es.js +5 -5
  155. package/vendor/@popperjs/core/lib/dom-utils/isTableElement.es.js +4 -4
  156. package/vendor/@popperjs/core/lib/dom-utils/listScrollParents.es.js +17 -11
  157. package/vendor/@popperjs/core/lib/enums.es.js +43 -20
  158. package/vendor/@popperjs/core/lib/modifiers/applyStyles.es.js +49 -25
  159. package/vendor/@popperjs/core/lib/modifiers/arrow.es.js +61 -26
  160. package/vendor/@popperjs/core/lib/modifiers/computeStyles.es.js +101 -69
  161. package/vendor/@popperjs/core/lib/modifiers/eventListeners.es.js +30 -16
  162. package/vendor/@popperjs/core/lib/modifiers/flip.es.js +99 -60
  163. package/vendor/@popperjs/core/lib/modifiers/hide.es.js +44 -31
  164. package/vendor/@popperjs/core/lib/modifiers/offset.es.js +32 -20
  165. package/vendor/@popperjs/core/lib/modifiers/popperOffsets.es.js +11 -11
  166. package/vendor/@popperjs/core/lib/modifiers/preventOverflow.es.js +91 -40
  167. package/vendor/@popperjs/core/lib/popper.es.js +14 -13
  168. package/vendor/@popperjs/core/lib/utils/computeAutoPlacement.es.js +29 -21
  169. package/vendor/@popperjs/core/lib/utils/computeOffsets.es.js +41 -36
  170. package/vendor/@popperjs/core/lib/utils/debounce.es.js +11 -7
  171. package/vendor/@popperjs/core/lib/utils/detectOverflow.es.js +42 -28
  172. package/vendor/@popperjs/core/lib/utils/expandToHashMap.es.js +5 -4
  173. package/vendor/@popperjs/core/lib/utils/getAltAxis.es.js +3 -3
  174. package/vendor/@popperjs/core/lib/utils/getBasePlacement.es.js +3 -3
  175. package/vendor/@popperjs/core/lib/utils/getFreshSideObject.es.js +2 -2
  176. package/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.es.js +3 -3
  177. package/vendor/@popperjs/core/lib/utils/getOppositePlacement.es.js +5 -5
  178. package/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.es.js +5 -5
  179. package/vendor/@popperjs/core/lib/utils/getVariation.es.js +3 -3
  180. package/vendor/@popperjs/core/lib/utils/math.es.js +6 -4
  181. package/vendor/@popperjs/core/lib/utils/mergeByName.es.js +11 -10
  182. package/vendor/@popperjs/core/lib/utils/mergePaddingObject.es.js +4 -4
  183. package/vendor/@popperjs/core/lib/utils/orderModifiers.es.js +30 -22
  184. package/vendor/@popperjs/core/lib/utils/rectToClientRect.es.js +7 -7
  185. package/vendor/@popperjs/core/lib/utils/userAgent.es.js +9 -6
  186. package/vendor/@popperjs/core/lib/utils/within.es.js +8 -8
  187. package/vendor/@tiptap/core/dist/index.es.js +3494 -2000
  188. package/vendor/@tiptap/extension-bold/dist/index.es.js +29 -19
  189. package/vendor/@tiptap/extension-bubble-menu/dist/index.es.js +145 -71
  190. package/vendor/@tiptap/extension-bullet-list/dist/index.es.js +32 -19
  191. package/vendor/@tiptap/extension-code/dist/index.es.js +22 -14
  192. package/vendor/@tiptap/extension-document/dist/index.es.js +4 -4
  193. package/vendor/@tiptap/extension-floating-menu/dist/index.es.js +106 -51
  194. package/vendor/@tiptap/extension-heading/dist/index.es.js +38 -22
  195. package/vendor/@tiptap/extension-history/dist/index.es.js +11 -7
  196. package/vendor/@tiptap/extension-image/dist/index.es.js +20 -17
  197. package/vendor/@tiptap/extension-italic/dist/index.es.js +28 -18
  198. package/vendor/@tiptap/extension-link/dist/index.es.js +236 -147
  199. package/vendor/@tiptap/extension-list-item/dist/index.es.js +6 -6
  200. package/vendor/@tiptap/extension-mention/dist/index.es.js +98 -63
  201. package/vendor/@tiptap/extension-ordered-list/dist/index.es.js +38 -25
  202. package/vendor/@tiptap/extension-paragraph/dist/index.es.js +8 -6
  203. package/vendor/@tiptap/extension-placeholder/dist/index.es.js +34 -27
  204. package/vendor/@tiptap/extension-text/dist/index.es.js +3 -3
  205. package/vendor/@tiptap/extension-underline/dist/index.es.js +16 -10
  206. package/vendor/@tiptap/suggestion/dist/index.es.js +174 -90
  207. package/vendor/@tiptap/vue-3/dist/index.es.js +287 -188
  208. package/vendor/@wangs-ui/core/components/p-BU8h34na.es.js +17 -14
  209. package/vendor/@wangs-ui/core/components/p-C5lMEBcj.es.js +69 -55
  210. package/vendor/@wangs-ui/core/components/p-CKYwZoTo.es.js +26 -22
  211. package/vendor/@wangs-ui/core/components/p-CsoK-EWG.es.js +147 -102
  212. package/vendor/@wangs-ui/core/components/p-DPHEi31J.es.js +102 -77
  213. package/vendor/@wangs-ui/core/components/p-DTTCzifR.es.js +1298 -551
  214. package/vendor/@wangs-ui/core/components/p-Duri5p90.es.js +60 -49
  215. package/vendor/@wangs-ui/core/components/wangs-button.es.js +19 -15
  216. package/vendor/@wangs-ui/core/components/wangs-icon.es.js +3 -3
  217. package/vendor/@wangs-ui/core/components/wangs-input-otp.es.js +3 -3
  218. package/vendor/@wangs-ui/core/components/wangs-tab-menu.es.js +3 -3
  219. package/vendor/@wangs-ui/core/dist/esm/index-DCkh3cGv.es.js +116 -102
  220. package/vendor/@wangs-ui/vue/dist/index.es.js +77 -77
  221. package/vendor/base64toblob/base64toblob.es.js +31 -15
  222. package/vendor/highlight.js/es/core.es.js +5 -5
  223. package/vendor/highlight.js/es/languages/javascript.es.js +237 -193
  224. package/vendor/highlight.js/es/languages/json.es.js +18 -15
  225. package/vendor/highlight.js/es/languages/typescript.es.js +288 -228
  226. package/vendor/highlight.js/es/languages/vbscript-html.es.js +2 -2
  227. package/vendor/highlight.js/lib/core.es.js +1144 -666
  228. package/vendor/linkifyjs/dist/linkify.es.es.js +858 -405
  229. package/vendor/lodash/_Symbol.es.js +11 -8
  230. package/vendor/lodash/_baseGetTag.es.js +19 -12
  231. package/vendor/lodash/_baseTrim.es.js +13 -10
  232. package/vendor/lodash/_freeGlobal.es.js +10 -8
  233. package/vendor/lodash/_getRawTag.es.js +28 -15
  234. package/vendor/lodash/_objectToString.es.js +12 -9
  235. package/vendor/lodash/_root.es.js +12 -8
  236. package/vendor/lodash/_trimmedEndIndex.es.js +14 -11
  237. package/vendor/lodash/debounce.es.js +92 -54
  238. package/vendor/lodash/isObject.es.js +11 -9
  239. package/vendor/lodash/isObjectLike.es.js +10 -8
  240. package/vendor/lodash/isSymbol.es.js +14 -11
  241. package/vendor/lodash/now.es.js +12 -9
  242. package/vendor/lodash/throttle.es.js +25 -17
  243. package/vendor/lodash/toNumber.es.js +33 -23
  244. package/vendor/lodash-es/_DataView.es.js +4 -4
  245. package/vendor/lodash-es/_Hash.es.js +17 -16
  246. package/vendor/lodash-es/_ListCache.es.js +17 -16
  247. package/vendor/lodash-es/_Map.es.js +4 -4
  248. package/vendor/lodash-es/_MapCache.es.js +17 -16
  249. package/vendor/lodash-es/_Promise.es.js +4 -4
  250. package/vendor/lodash-es/_Set.es.js +4 -4
  251. package/vendor/lodash-es/_SetCache.es.js +12 -10
  252. package/vendor/lodash-es/_Stack.es.js +15 -15
  253. package/vendor/lodash-es/_Symbol.es.js +3 -3
  254. package/vendor/lodash-es/_Uint8Array.es.js +3 -3
  255. package/vendor/lodash-es/_WeakMap.es.js +4 -4
  256. package/vendor/lodash-es/_arrayEach.es.js +9 -5
  257. package/vendor/lodash-es/_arrayFilter.es.js +9 -6
  258. package/vendor/lodash-es/_arrayLikeKeys.es.js +21 -17
  259. package/vendor/lodash-es/_arrayPush.es.js +7 -5
  260. package/vendor/lodash-es/_arraySome.es.js +9 -6
  261. package/vendor/lodash-es/_assignValue.es.js +10 -7
  262. package/vendor/lodash-es/_assocIndexOf.es.js +9 -6
  263. package/vendor/lodash-es/_baseAssignValue.es.js +13 -9
  264. package/vendor/lodash-es/_baseClone.es.js +67 -49
  265. package/vendor/lodash-es/_baseCreate.es.js +15 -11
  266. package/vendor/lodash-es/_baseGetAllKeys.es.js +6 -6
  267. package/vendor/lodash-es/_baseGetTag.es.js +11 -7
  268. package/vendor/lodash-es/_baseIsArguments.es.js +6 -6
  269. package/vendor/lodash-es/_baseIsEqual.es.js +11 -5
  270. package/vendor/lodash-es/_baseIsEqualDeep.es.js +39 -26
  271. package/vendor/lodash-es/_baseIsMap.es.js +6 -6
  272. package/vendor/lodash-es/_baseIsNative.es.js +18 -12
  273. package/vendor/lodash-es/_baseIsSet.es.js +6 -6
  274. package/vendor/lodash-es/_baseIsTypedArray.es.js +11 -9
  275. package/vendor/lodash-es/_baseKeys.es.js +16 -11
  276. package/vendor/lodash-es/_baseTimes.es.js +7 -5
  277. package/vendor/lodash-es/_baseTrim.es.js +5 -5
  278. package/vendor/lodash-es/_baseUnary.es.js +4 -4
  279. package/vendor/lodash-es/_cacheHas.es.js +3 -3
  280. package/vendor/lodash-es/_cloneArrayBuffer.es.js +6 -5
  281. package/vendor/lodash-es/_cloneBuffer.es.js +11 -6
  282. package/vendor/lodash-es/_cloneDataView.es.js +5 -5
  283. package/vendor/lodash-es/_cloneRegExp.es.js +6 -5
  284. package/vendor/lodash-es/_cloneSymbol.es.js +5 -5
  285. package/vendor/lodash-es/_cloneTypedArray.es.js +5 -5
  286. package/vendor/lodash-es/_coreJsData.es.js +3 -3
  287. package/vendor/lodash-es/_defineProperty.es.js +7 -6
  288. package/vendor/lodash-es/_equalArrays.es.js +38 -28
  289. package/vendor/lodash-es/_equalByTag.es.js +55 -41
  290. package/vendor/lodash-es/_equalObjects.es.js +42 -28
  291. package/vendor/lodash-es/_freeGlobal.es.js +2 -2
  292. package/vendor/lodash-es/_getAllKeys.es.js +6 -6
  293. package/vendor/lodash-es/_getMapData.es.js +5 -5
  294. package/vendor/lodash-es/_getNative.es.js +6 -6
  295. package/vendor/lodash-es/_getPrototype.es.js +3 -3
  296. package/vendor/lodash-es/_getRawTag.es.js +20 -10
  297. package/vendor/lodash-es/_getSymbols.es.js +15 -8
  298. package/vendor/lodash-es/_getTag.es.js +31 -25
  299. package/vendor/lodash-es/_getValue.es.js +3 -3
  300. package/vendor/lodash-es/_hashClear.es.js +5 -4
  301. package/vendor/lodash-es/_hashDelete.es.js +5 -4
  302. package/vendor/lodash-es/_hashGet.es.js +11 -9
  303. package/vendor/lodash-es/_hashHas.es.js +7 -6
  304. package/vendor/lodash-es/_hashSet.es.js +8 -6
  305. package/vendor/lodash-es/_initCloneArray.es.js +10 -5
  306. package/vendor/lodash-es/_initCloneByTag.es.js +39 -38
  307. package/vendor/lodash-es/_initCloneObject.es.js +6 -6
  308. package/vendor/lodash-es/_isIndex.es.js +7 -5
  309. package/vendor/lodash-es/_isKeyable.es.js +4 -4
  310. package/vendor/lodash-es/_isMasked.es.js +7 -7
  311. package/vendor/lodash-es/_isPrototype.es.js +5 -5
  312. package/vendor/lodash-es/_listCacheClear.es.js +4 -3
  313. package/vendor/lodash-es/_listCacheDelete.es.js +17 -9
  314. package/vendor/lodash-es/_listCacheGet.es.js +5 -5
  315. package/vendor/lodash-es/_listCacheHas.es.js +4 -4
  316. package/vendor/lodash-es/_listCacheSet.es.js +11 -5
  317. package/vendor/lodash-es/_mapCacheClear.es.js +10 -9
  318. package/vendor/lodash-es/_mapCacheDelete.es.js +6 -5
  319. package/vendor/lodash-es/_mapCacheGet.es.js +4 -4
  320. package/vendor/lodash-es/_mapCacheHas.es.js +4 -4
  321. package/vendor/lodash-es/_mapCacheSet.es.js +7 -5
  322. package/vendor/lodash-es/_mapToArray.es.js +7 -6
  323. package/vendor/lodash-es/_nativeCreate.es.js +3 -3
  324. package/vendor/lodash-es/_nativeKeys.es.js +3 -3
  325. package/vendor/lodash-es/_nodeUtil.es.js +13 -6
  326. package/vendor/lodash-es/_objectToString.es.js +5 -4
  327. package/vendor/lodash-es/_overArg.es.js +4 -4
  328. package/vendor/lodash-es/_root.es.js +4 -3
  329. package/vendor/lodash-es/_setCacheAdd.es.js +5 -4
  330. package/vendor/lodash-es/_setCacheHas.es.js +3 -3
  331. package/vendor/lodash-es/_setToArray.es.js +7 -6
  332. package/vendor/lodash-es/_stackClear.es.js +5 -4
  333. package/vendor/lodash-es/_stackDelete.es.js +5 -4
  334. package/vendor/lodash-es/_stackGet.es.js +3 -3
  335. package/vendor/lodash-es/_stackHas.es.js +3 -3
  336. package/vendor/lodash-es/_stackSet.es.js +18 -13
  337. package/vendor/lodash-es/_toSource.es.js +9 -8
  338. package/vendor/lodash-es/_trimmedEndIndex.es.js +7 -6
  339. package/vendor/lodash-es/cloneDeep.es.js +5 -5
  340. package/vendor/lodash-es/debounce.es.js +84 -49
  341. package/vendor/lodash-es/eq.es.js +3 -3
  342. package/vendor/lodash-es/isArguments.es.js +9 -6
  343. package/vendor/lodash-es/isArray.es.js +2 -2
  344. package/vendor/lodash-es/isArrayLike.es.js +5 -5
  345. package/vendor/lodash-es/isBuffer.es.js +9 -4
  346. package/vendor/lodash-es/isEqual.es.js +4 -4
  347. package/vendor/lodash-es/isFunction.es.js +10 -9
  348. package/vendor/lodash-es/isLength.es.js +4 -4
  349. package/vendor/lodash-es/isMap.es.js +6 -5
  350. package/vendor/lodash-es/isObject.es.js +4 -4
  351. package/vendor/lodash-es/isObjectLike.es.js +3 -3
  352. package/vendor/lodash-es/isSet.es.js +6 -5
  353. package/vendor/lodash-es/isSymbol.es.js +6 -6
  354. package/vendor/lodash-es/isTypedArray.es.js +6 -5
  355. package/vendor/lodash-es/keys.es.js +6 -6
  356. package/vendor/lodash-es/now.es.js +4 -4
  357. package/vendor/lodash-es/stubArray.es.js +2 -2
  358. package/vendor/lodash-es/stubFalse.es.js +3 -3
  359. package/vendor/lodash-es/toNumber.es.js +25 -18
  360. package/vendor/lodash-es/toString.es.js +2 -2
  361. package/vendor/lodash-es/uniqueId.es.js +6 -6
  362. package/vendor/orderedmap/dist/index.es.js +65 -49
  363. package/vendor/primevue/api/api.esm.es.js +214 -121
  364. package/vendor/primevue/avatar/avatar.esm.es.js +44 -41
  365. package/vendor/primevue/avatar/style/avatarstyle.esm.es.js +12 -11
  366. package/vendor/primevue/avatargroup/avatargroup.esm.es.js +17 -16
  367. package/vendor/primevue/avatargroup/style/avatargroupstyle.esm.es.js +6 -5
  368. package/vendor/primevue/badge/badge.esm.es.js +21 -20
  369. package/vendor/primevue/badge/style/badgestyle.esm.es.js +19 -18
  370. package/vendor/primevue/base/style/basestyle.esm.es.js +88 -99
  371. package/vendor/primevue/basecomponent/basecomponent.esm.es.js +327 -261
  372. package/vendor/primevue/basedirective/basedirective.esm.es.js +257 -186
  373. package/vendor/primevue/baseicon/baseicon.esm.es.js +55 -49
  374. package/vendor/primevue/baseicon/style/baseiconstyle.esm.es.js +5 -35
  375. package/vendor/primevue/button/button.esm.es.js +76 -72
  376. package/vendor/primevue/button/style/buttonstyle.esm.es.js +46 -39
  377. package/vendor/primevue/card/card.esm.es.js +30 -29
  378. package/vendor/primevue/card/style/cardstyle.esm.es.js +6 -5
  379. package/vendor/primevue/checkbox/checkbox.esm.es.js +109 -101
  380. package/vendor/primevue/checkbox/style/checkboxstyle.esm.es.js +12 -11
  381. package/vendor/primevue/config/config.esm.es.js +76 -58
  382. package/vendor/primevue/dialog/dialog.esm.es.js +421 -281
  383. package/vendor/primevue/dialog/style/dialogstyle.esm.es.js +26 -22
  384. package/vendor/primevue/dropdown/dropdown.esm.es.js +956 -742
  385. package/vendor/primevue/dropdown/style/dropdownstyle.esm.es.js +33 -31
  386. package/vendor/primevue/fileupload/fileupload.esm.es.js +559 -450
  387. package/vendor/primevue/fileupload/style/fileuploadstyle.esm.es.js +14 -13
  388. package/vendor/primevue/focustrap/focustrap.esm.es.js +128 -90
  389. package/vendor/primevue/focustrap/style/focustrapstyle.esm.es.js +2 -2
  390. package/vendor/primevue/icons/angledoubleleft/index.esm.es.js +13 -11
  391. package/vendor/primevue/icons/angledoubleright/index.esm.es.js +13 -11
  392. package/vendor/primevue/icons/angledown/index.esm.es.js +13 -11
  393. package/vendor/primevue/icons/angleleft/index.esm.es.js +13 -11
  394. package/vendor/primevue/icons/angleright/index.esm.es.js +13 -11
  395. package/vendor/primevue/icons/angleup/index.esm.es.js +13 -11
  396. package/vendor/primevue/icons/blank/index.esm.es.js +13 -11
  397. package/vendor/primevue/icons/check/index.esm.es.js +13 -11
  398. package/vendor/primevue/icons/chevrondown/index.esm.es.js +13 -11
  399. package/vendor/primevue/icons/exclamationtriangle/index.esm.es.js +17 -13
  400. package/vendor/primevue/icons/eye/index.esm.es.js +13 -11
  401. package/vendor/primevue/icons/eyeslash/index.esm.es.js +13 -11
  402. package/vendor/primevue/icons/infocircle/index.esm.es.js +13 -11
  403. package/vendor/primevue/icons/plus/index.esm.es.js +13 -11
  404. package/vendor/primevue/icons/refresh/index.esm.es.js +13 -11
  405. package/vendor/primevue/icons/search/index.esm.es.js +13 -11
  406. package/vendor/primevue/icons/searchminus/index.esm.es.js +13 -11
  407. package/vendor/primevue/icons/searchplus/index.esm.es.js +13 -11
  408. package/vendor/primevue/icons/spinner/index.esm.es.js +13 -11
  409. package/vendor/primevue/icons/times/index.esm.es.js +13 -11
  410. package/vendor/primevue/icons/timescircle/index.esm.es.js +13 -11
  411. package/vendor/primevue/icons/undo/index.esm.es.js +13 -11
  412. package/vendor/primevue/icons/upload/index.esm.es.js +13 -11
  413. package/vendor/primevue/icons/windowmaximize/index.esm.es.js +13 -11
  414. package/vendor/primevue/icons/windowminimize/index.esm.es.js +13 -11
  415. package/vendor/primevue/image/image.esm.es.js +280 -235
  416. package/vendor/primevue/image/style/imagestyle.esm.es.js +18 -17
  417. package/vendor/primevue/inputgroup/inputgroup.esm.es.js +17 -16
  418. package/vendor/primevue/inputgroup/style/inputgroupstyle.esm.es.js +6 -5
  419. package/vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js +17 -16
  420. package/vendor/primevue/inputgroupaddon/style/inputgroupaddonstyle.esm.es.js +6 -5
  421. package/vendor/primevue/inputnumber/inputnumber.esm.es.js +834 -566
  422. package/vendor/primevue/inputnumber/style/inputnumberstyle.esm.es.js +23 -22
  423. package/vendor/primevue/inputtext/inputtext.esm.es.js +32 -30
  424. package/vendor/primevue/inputtext/style/inputtextstyle.esm.es.js +13 -12
  425. package/vendor/primevue/menu/menu.esm.es.js +402 -304
  426. package/vendor/primevue/menu/style/menustyle.esm.es.js +14 -13
  427. package/vendor/primevue/message/message.esm.es.js +126 -112
  428. package/vendor/primevue/message/style/messagestyle.esm.es.js +9 -8
  429. package/vendor/primevue/multiselect/multiselect.esm.es.js +1083 -835
  430. package/vendor/primevue/multiselect/style/multiselectstyle.esm.es.js +38 -36
  431. package/vendor/primevue/overlayeventbus/overlayeventbus.esm.es.js +3 -3
  432. package/vendor/primevue/overlaypanel/overlaypanel.esm.es.js +275 -169
  433. package/vendor/primevue/overlaypanel/style/overlaypanelstyle.esm.es.js +9 -8
  434. package/vendor/primevue/paginator/paginator.esm.es.js +513 -469
  435. package/vendor/primevue/paginator/style/paginatorstyle.esm.es.js +50 -43
  436. package/vendor/primevue/password/password.esm.es.js +306 -233
  437. package/vendor/primevue/password/style/passwordstyle.esm.es.js +26 -24
  438. package/vendor/primevue/portal/portal.esm.es.js +17 -17
  439. package/vendor/primevue/progressbar/progressbar.esm.es.js +37 -35
  440. package/vendor/primevue/progressbar/style/progressbarstyle.esm.es.js +10 -9
  441. package/vendor/primevue/ripple/ripple.esm.es.js +90 -62
  442. package/vendor/primevue/ripple/style/ripplestyle.esm.es.js +6 -5
  443. package/vendor/primevue/selectbutton/selectbutton.esm.es.js +213 -167
  444. package/vendor/primevue/selectbutton/style/selectbuttonstyle.esm.es.js +14 -13
  445. package/vendor/primevue/skeleton/skeleton.esm.es.js +28 -26
  446. package/vendor/primevue/skeleton/style/skeletonstyle.esm.es.js +13 -11
  447. package/vendor/primevue/textarea/style/textareastyle.esm.es.js +12 -11
  448. package/vendor/primevue/textarea/textarea.esm.es.js +49 -33
  449. package/vendor/primevue/timeline/style/timelinestyle.esm.es.js +9 -8
  450. package/vendor/primevue/timeline/timeline.esm.es.js +53 -52
  451. package/vendor/primevue/toast/style/toaststyle.esm.es.js +54 -46
  452. package/vendor/primevue/toast/toast.esm.es.js +309 -260
  453. package/vendor/primevue/toasteventbus/toasteventbus.esm.es.js +3 -3
  454. package/vendor/primevue/toastservice/toastservice.esm.es.js +16 -15
  455. package/vendor/primevue/tooltip/style/tooltipstyle.esm.es.js +6 -5
  456. package/vendor/primevue/tooltip/tooltip.esm.es.js +383 -186
  457. package/vendor/primevue/usestyle/usestyle.esm.es.js +94 -64
  458. package/vendor/primevue/usetoast/usetoast.esm.es.js +9 -8
  459. package/vendor/primevue/utils/utils.esm.es.js +1078 -772
  460. package/vendor/primevue/virtualscroller/style/virtualscrollerstyle.esm.es.js +5 -67
  461. package/vendor/primevue/virtualscroller/virtualscroller.esm.es.js +655 -428
  462. package/vendor/prosemirror-commands/dist/index.es.js +454 -316
  463. package/vendor/prosemirror-history/dist/index.es.js +286 -178
  464. package/vendor/prosemirror-keymap/dist/index.es.js +68 -48
  465. package/vendor/prosemirror-model/dist/index.es.js +1905 -1436
  466. package/vendor/prosemirror-schema-list/dist/index.es.js +115 -73
  467. package/vendor/prosemirror-state/dist/index.es.js +467 -353
  468. package/vendor/prosemirror-transform/dist/index.es.js +1146 -829
  469. package/vendor/prosemirror-view/dist/index.es.js +4127 -2719
  470. package/vendor/rope-sequence/dist/index.es.js +165 -82
  471. package/vendor/simplebar-core/dist/index.es.js +670 -242
  472. package/vendor/simplebar-vue/dist/simplebar-vue.esm.es.js +73 -60
  473. package/vendor/single-spa/lib/es2015/esm/single-spa.min.es.js +511 -510
  474. package/vendor/tippy.js/dist/tippy.esm.es.js +971 -525
  475. package/vendor/vee-validate/dist/vee-validate.esm.es.js +1830 -1097
  476. package/vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js +740 -738
  477. package/vendor/w3c-keyname/index.es.js +25 -13
  478. package/wangsvue.es.js +167 -208
  479. package/wangsvue.esm.browser.js +49417 -48026
  480. package/wangsvue.system.js +67600 -234
  481. package/api/index.es.js +0 -149
  482. package/apiitem/index.es.js +0 -611
  483. package/assignmember/index.es.js +0 -434
  484. package/attachment/index.es.js +0 -118
  485. package/attachmentchangelog/index.es.js +0 -79
  486. package/attachmentitem/index.es.js +0 -231
  487. package/attachmentthumbnail/index.es.js +0 -83
  488. package/changelog/index.d.ts +0 -164
  489. package/changelog/index.es.js +0 -85
  490. package/changelogfilter/index.es.js +0 -113
  491. package/changelogpage/index.d.ts +0 -184
  492. package/changelogpage/index.es.js +0 -176
  493. package/checklist/index.es.js +0 -571
  494. package/checklistchangelog/index.es.js +0 -85
  495. package/comment/index.d.ts +0 -187
  496. package/comment/index.es.js +0 -267
  497. package/commentblock/index.es.js +0 -337
  498. package/confirmdeploy/index.es.js +0 -64
  499. package/dependencycol/index.es.js +0 -32
  500. package/description/index.es.js +0 -135
  501. package/descriptiontab/index.es.js +0 -30
  502. package/detailmember/index.d.ts +0 -77
  503. package/detailmember/index.es.js +0 -32
  504. package/detailmemberadmin/index.es.js +0 -210
  505. package/detailmemberleader/index.es.js +0 -164
  506. package/detailmemberlog/index.es.js +0 -117
  507. package/detailsprint/index.d.ts +0 -86
  508. package/detailsprint/index.es.js +0 -414
  509. package/dialogaddattachment/index.es.js +0 -273
  510. package/dialogaddchecklist/index.es.js +0 -120
  511. package/dialogaddeditapi/index.es.js +0 -87
  512. package/dialogaddpbi/index.es.js +0 -197
  513. package/dialogadjustmenttask/index.es.js +0 -484
  514. package/dialogadjustmenttaskheader/index.es.js +0 -193
  515. package/dialogapichangelog/index.es.js +0 -83
  516. package/dialogassignmember/index.es.js +0 -171
  517. package/dialogconfirmapproval/index.es.js +0 -54
  518. package/dialogconfirmchecklist/index.es.js +0 -189
  519. package/dialogconfirmdeletetask/index.es.js +0 -70
  520. package/dialogconfirmdeletetaskpermanently/index.es.js +0 -50
  521. package/dialogconfirmedit/index.es.js +0 -50
  522. package/dialogconfirmfinishtask/index.es.js +0 -50
  523. package/dialogconfirmrestoretask/index.es.js +0 -46
  524. package/dialogconfirmsprint/index.es.js +0 -42
  525. package/dialogcopyapi/index.es.js +0 -130
  526. package/dialogcustomdependency/index.es.js +0 -55
  527. package/dialogdetailchecklisttemplate/index.es.js +0 -214
  528. package/dialogdetailcomponent/index.es.js +0 -121
  529. package/dialogdetailpbi/index.es.js +0 -192
  530. package/dialogfinishreview/index.es.js +0 -126
  531. package/dialogimprovementtask/index.es.js +0 -191
  532. package/dialogmemberadmin/index.es.js +0 -93
  533. package/dialogpreparepbi/index.es.js +0 -93
  534. package/dialogpriorityvalue/index.es.js +0 -85
  535. package/dialogreportbug/index.es.js +0 -207
  536. package/dialogreviewleader/index.es.js +0 -280
  537. package/dialogsavechecklisttemplate/index.es.js +0 -127
  538. package/dialogselectproject/index.es.js +0 -69
  539. package/dialogsetduration/index.es.js +0 -109
  540. package/dialogsettasklink/index.es.js +0 -153
  541. package/dialogtestapi/index.es.js +0 -389
  542. package/eventlogtab/index.es.js +0 -50
  543. package/infotasktab/index.es.js +0 -186
  544. package/inputadditional/index.es.js +0 -62
  545. package/inputinitialname/index.d.ts +0 -118
  546. package/inputinitialname/index.es.js +0 -95
  547. package/inputrepositoryname/index.d.ts +0 -86
  548. package/inputrepositoryname/index.es.js +0 -41
  549. package/isrequiredtext/index.es.js +0 -16
  550. package/legend/index.es.js +0 -727
  551. package/legendlist/index.es.js +0 -33
  552. package/loading-page-BrQattYE.js +0 -1
  553. package/loading-page-CgfbWppy.js +0 -1
  554. package/loading-page-CoC9UhfC.js +0 -4
  555. package/loading-page-CoXtqoc9.js +0 -4
  556. package/loading-page-DbLuqCHa.js +0 -1
  557. package/loading-page-f8D03l3G.js +0 -4
  558. package/loading-plane-CgfbWppy.js +0 -1
  559. package/loading-plane-CoXtqoc9.js +0 -4
  560. package/loading-table-Bdr9ZhtP.js +0 -1
  561. package/loading-table-ByUoWqUo.js +0 -4
  562. package/loading-table-BygEMzFM.js +0 -4
  563. package/loading-table-BzrSQlA0.js +0 -1
  564. package/loading-table-D9bw9OcI.js +0 -4
  565. package/loading-table-chOgXi94.js +0 -1
  566. package/no-data-CTKux8RI.js +0 -4
  567. package/no-data-Cgze_Rvp.js +0 -1
  568. package/no-data-DLHO1L_u.js +0 -4
  569. package/no-data-Dep79CBh.js +0 -1
  570. package/no-data-g0dJCy2p.js +0 -4
  571. package/no-data-y1X5WtcQ.js +0 -1
  572. package/notificationitem/index.d.ts +0 -107
  573. package/notificationitem/index.es.js +0 -333
  574. package/reviewitem/index.es.js +0 -65
  575. package/reviewtab/index.es.js +0 -44
  576. package/services/calendar.service.es.js +0 -32
  577. package/sonarqubesummary/index.es.js +0 -234
  578. package/sprintsummary/index.es.js +0 -73
  579. package/summaryaccordion/index.d.ts +0 -121
  580. package/summaryaccordion/index.es.js +0 -365
  581. package/taskdependency/index.es.js +0 -686
  582. package/taskdetail/index.d.ts +0 -82
  583. package/taskdetail/index.es.js +0 -491
  584. package/taskdetailpbi/index.d.ts +0 -35
  585. package/taskdetailpbi/index.es.js +0 -172
  586. package/taskdetailunassignedpbi/index.es.js +0 -261
  587. package/tasklink/index.es.js +0 -257
  588. package/tasklinkchangelog/index.es.js +0 -93
  589. package/tasklist/index.es.js +0 -92
  590. package/taskmore/index.es.js +0 -52
  591. package/taskstatusbadge/index.es.js +0 -18
  592. package/tasktable/index.d.ts +0 -87
  593. package/tasktable/index.es.js +0 -832
  594. package/ticket/index.es.js +0 -151
  595. package/tooltipspan/index.es.js +0 -30
  596. package/utils/updateSprintStatus.util.es.js +0 -17
  597. package/valueformdatainput/index.es.js +0 -70
  598. package/workcalendar/index.es.js +0 -351
@@ -1,42 +1,68 @@
1
- import { defineComponent as gt, mergeModels as Fa, useModel as yt, computed as F, inject as xa, ref as I, shallowRef as R, onMounted as ht, onUnmounted as mt, watch as we, createElementBlock as c, openBlock as d, normalizeProps as se, guardReactiveProps as ie, unref as r, createElementVNode as x, withDirectives as wt, createCommentVNode as y, createVNode as _, createBlock as E, mergeProps as p, withCtx as de, Fragment as P, renderList as Z, createTextVNode as ue, toDisplayString as H, withModifiers as S, normalizeClass as ke, resolveDynamicComponent as kt, toHandlers as Ct, vShow as Rt, nextTick as Ha } from "vue";
2
- import { s as Dt } from "../vendor/simplebar-vue/dist/simplebar-vue.esm.es.js";
3
- import { e as m } from "../event-bus/index.es.js";
4
- import { u as Tt } from "../plugins/WangsVue.es.js";
5
- import { u as _t } from "../utils/baseToast.util.es.js";
6
- import { a as Pt } from "../utils/date.util.es.js";
7
- import { n as Kt, e as Et } from "../utils/exportToExcel.util.es.js";
8
- import { m as St } from "../utils/mergePropsWithDefaults.util.es.js";
9
- import { s as ce, g as B } from "../utils/object.util.es.js";
10
- import { u as Nt, _ as At } from "../apiitem/index.es.js";
11
- import { s as Ft } from "../vendor/primevue/paginator/paginator.esm.es.js";
12
- import { O as Ba } from "../vendor/primevue/utils/utils.esm.es.js";
13
- import { _ as Be } from "../checkbox/index.es.js";
14
- import { _ as Ce } from "../animation/index.es.js";
15
- import { _ as $e } from "../button/index.es.js";
16
- import { _ as xt } from "../customcolumn/index.es.js";
17
- import { _ as Ht } from "../dialogconfirm/index.es.js";
18
- import { _ as Q } from "../icon/index.es.js";
19
- import { _ as Bt } from "../menu/index.es.js";
20
- import { _ as $t } from "../toast/index.es.js";
21
- import { _ as Mt } from "../toggleswitch/index.es.js";
22
- import { _ as Ot } from "../multirow/index.es.js";
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 Ut } from "../vendor/lodash-es/cloneDeep.es.js";
25
- function Lt(W) {
26
- let $ = W.target;
27
- $.tagName === "UL" && ($ = $.parentElement);
28
- const { offsetHeight: t = 0 } = $, z = window.innerHeight * 90 / 100;
29
- t >= z && ($.style.transform = "translateY(5vh)");
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 It = (W, $) => W.every((t) => $.includes(t)), zt = ["id"], jt = ["onClick"], Vt = { class: "flex" }, Qt = ["id"], Wt = { key: 0 }, qt = ["colspan"], Gt = ["id", "draggable", "onClick", "onDblclick", "onDragenter", "onDragstart"], Jt = ["onClick"], Yt = ["colspan"], Zt = ["colspan"], Xt = ["colspan"], el = ["colspan"], al = ["colspan"], tl = ["contenteditable", "onBlur", "onKeypress"], ll = { key: 1 }, ol = { key: 2 }, nl = ["colspan"], rl = /* @__PURE__ */ gt({
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__ */ Fa({
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: !0 },
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: !0 },
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: !0 },
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__ */ Fa(["toggleOption", "selectData", "rowSelect", "page", "sort", "update:selectedData", "update:singleSelection", "cellEdited", "input", "rowReorder"], ["update:singleSelection"]),
76
- setup(W, { emit: $ }) {
77
- const t = W, z = $, Me = yt(W, "singleSelection"), { defaultProps: $a, locale: Oe } = Tt("DataTable"), X = F(() => St(t, $a)), u = xa("preset", {}).datatable, Ma = [10, 25, 50, 100], Oa = xa("useToastConfig"), Ue = _t(Oa), { setLoading: Le } = Nt(), Re = `${window.location.pathname.replace("/", "").split("/").join("-")}-${t.tableName}`, g = I(t.data ?? []), pe = R(t.data ?? []), M = I({}), O = I(t.columns), Ua = I(), La = I(), T = R([]), q = R(), Ie = R(0), ee = R(!1), fe = R(!1), Ia = R(0), ze = R(0), ve = R(0), De = R(!1), be = R(), Te = I(), je = I(), U = I([]), _e = R({}), ae = R(), Ve = R(), N = R(), D = R(), G = R(1), j = R(10), L = R(0), ge = I({}), Qe = F(() => {
78
- var e, a;
79
- return (e = t.childTableProps) != null && e.columns ? (a = t.childTableProps) == null ? void 0 : a.columns.filter((n) => {
80
- var s;
81
- return !n.parentColumnsFields || ((s = n.parentColumnsFields) == null ? void 0 : s.some(
82
- (v) => O.value.some((i) => i.field === v)
83
- ));
84
- }) : O.value;
85
- }), We = F(() => O.value.length + (t.selectionType === "checkbox" ? 1 : 0) + (t.useOption ? 1 : 0) + (t.reorderable ? 1 : 0) + (t.treeTable ? 1 : 0)), qe = F(() => ({
86
- ...t.defaultQueryParams,
87
- search: t.lazy ? ae.value : t.search,
88
- tag: t.lazy ? Ve.value : void 0,
89
- page: t.usePaginator ? G.value : void 0,
90
- limit: t.usePaginator ? j.value : void 0,
91
- sortOrder: D.value,
92
- sortBy: N.value,
93
- ...t.lazy ? _e.value : t.filters
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
- })), Ge = F(() => {
96
- var a;
97
- const e = (a = g.value) == null ? void 0 : a.filter(
98
- (n) => {
99
- var s;
100
- return ((s = n.children) == null ? void 0 : s.length) || n.hasChildren;
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 (e == null ? void 0 : e.length) && e.every((n) => M.value[n[t.dataKey]] > 0);
104
- }), Je = F(() => {
105
- var i, b, f, w, k;
106
- if (t.disableAllRows || !((i = Y()) != null && i.length) || t.selectionType !== "checkbox" || ((b = te.value) == null ? void 0 : b.length) === g.value.length)
107
- return !1;
108
- const e = (f = T.value) == null ? void 0 : f.length, a = ((w = xe(Y())) == null ? void 0 : w.map((l) => l[t.dataKey])) ?? [], n = ((k = T.value) == null ? void 0 : k.map((l) => l[t.dataKey])) ?? [], s = n.length ? It(a, n) : !1, v = e > 0 && e === (L.value ?? 0) - (te.value.length ?? 0);
109
- return s || v;
110
- }), te = F(
111
- () => ea(t.data ?? Y() ?? [])
112
- ), Pe = F(
113
- () => ee.value || t.loading
114
- ), Ke = F(
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 e;
117
- return t.useOption || ((e = t.childTableProps) == null ? void 0 : e.useOption) || t.customColumn;
199
+ var _a;
200
+ return props.useOption || ((_a = props.childTableProps) == null ? void 0 : _a.useOption) || props.customColumn;
118
201
  }
119
- ), za = F(
202
+ );
203
+ const currentPageHasNoData = computed(
120
204
  () => {
121
- var e;
122
- return !Pe.value && !((e = g.value) != null && e.length);
205
+ var _a;
206
+ return !tableIsLoading.value && !((_a = currentPageTableData.value) == null ? void 0 : _a.length);
123
207
  }
124
- ), ja = F(
125
- () => t.lazy && t.fetchFunction || !t.usePaginator ? g.value : g.value.slice(
126
- (G.value - 1) * j.value,
127
- G.value * j.value
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
- ), Ee = (e) => Object.keys(M.value).includes(e), J = (e) => te.value.includes(e), Se = (e) => t.selectionType === "checkbox" ? !!T.value.find((a) => a[t.dataKey] === e) : Va(e), Va = (e) => {
130
- var a;
131
- return e !== void 0 && ((a = Me.value) == null ? void 0 : a[t.dataKey]) === e;
132
- }, Y = (e) => (g.value ?? []).filter(
133
- (a) => !a.childRowHeader && !a.childRow
134
- ), ye = async (e, a, n) => {
135
- var v, i;
136
- if (Ee(e[t.dataKey]) === n) return;
137
- const s = n ?? !Ee(e[t.dataKey]);
138
- if (!fe.value)
139
- if (!s)
140
- g.value.splice(
141
- a + 1,
142
- M.value[e[t.dataKey]]
143
- ), delete M.value[e[t.dataKey]];
144
- else {
145
- M.value[e[t.dataKey]] = 1;
146
- let { children: b } = e;
147
- if ((v = t.childTableProps) != null && v.fetchFunction && e.hasChildren)
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
- g.value.splice(a + 1, 0, {
150
- childRow: !0,
151
- loadingRow: !0
152
- }), fe.value = !0;
153
- const f = await ((i = t.childTableProps) == null ? void 0 : i.fetchFunction(e));
154
- b = f == null ? void 0 : f.data;
155
- } catch (f) {
156
- console.error("🚀 ~ toggleRowExpand ~ error:", f);
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
- g.value.splice(a + 1, 1), fe.value = !1;
261
+ currentPageTableData.value.splice(indexOfData + 1, 1);
262
+ loadingRows.value = false;
159
263
  }
160
- if (a >= 0 && (b != null && b.length)) {
161
- const f = b.flatMap((w) => [
162
- {
163
- childRowHeader: !0,
164
- header: w.groupHeader
165
- },
166
- ...(w.groupItems ?? []).map((l) => ({ childRow: !0, ...l }))
167
- ]);
168
- M.value[e[t.dataKey]] = f.length, g.value.splice(a + 1, 0, ...f);
169
- } else
170
- g.value.splice(a + 1, 0, {
171
- childRow: !0,
172
- noDataRow: !0
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
- }, qa = async () => {
185
- var a;
186
- const e = !Ge.value;
187
- if (!fe.value) {
188
- let n = 0;
189
- for (const s of g.value)
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
- }, Ga = async (e, a) => {
193
- const n = e.target, s = n.tagName.toLowerCase() === "button" ? n : n.parentElement;
194
- z("toggleOption", a);
195
- const v = {
196
- ...e,
197
- currentTarget: e.currentTarget ?? e.target
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
- Ae(), await Ha(() => {
200
- var i;
201
- s != null && s.classList.contains("option-button-active") ? Ae() : ((i = je.value) == null || i.toggle(v), Ae(), s == null || s.classList.add("option-button-active"));
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
- }, Ye = async (e, a, n) => {
204
- var v, i, b, f;
205
- if (!n.preset) return;
206
- const s = () => ce(
207
- a,
208
- n.field,
209
- !B(a, n.field)
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 (n.preset.type === "checkbox" ? (i = (v = n.preset).onCheck) == null || i.call(v, e, a, s) : n.preset.type === "toggle" && ((f = (b = n.preset).onToggle) == null || f.call(b, e, a, s)), "confirmDialogProps" in n.preset) {
212
- const { showWhen: w } = He(
213
- n.preset,
214
- a[n.field],
215
- a
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 w == "function" ? ge.value[a[t.dataKey] + n.field] = await w(
218
- a,
219
- e
220
- ) : ge.value[a[t.dataKey] + n.field] = !w || w === "active" && e || w === "inactive" && !e;
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
- }, Ne = (e) => e.draggable !== !1 && !e.childRow && !e.childRowHeader && t.reorderable && !D.value, Ja = (e, a, n) => {
223
- if (a.childRow || a.childRowHeader) return;
224
- M.value = {};
225
- const { dataTransfer: s } = e;
226
- be.value = a, q.value = { item: a, fromIndex: n }, s && (s.dropEffect = "move", s.effectAllowed = "move", s.setData("id", a._id), s.setData("index", n.toString()));
227
- }, Ya = (e, a) => {
228
- var n, s;
229
- if (e.preventDefault(), Ne(a)) {
230
- const v = e.target, i = v.tagName === "TR" ? v : v.closest("tr");
231
- if (i == null || i.classList.add("bg-primary-50"), (n = i == null ? void 0 : i.nextElementSibling) == null || n.classList.remove("bg-primary-50"), (s = i == null ? void 0 : i.previousElementSibling) == null || s.classList.remove("bg-primary-50"), !i || !be.value) return;
232
- const b = U.value.findIndex(
233
- (w) => {
234
- var k;
235
- return w._id === ((k = be.value) == null ? void 0 : k._id);
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
- b !== -1 && f !== -1 && (q.value && (q.value.toIndex = f), [
241
- U.value[b],
242
- U.value[f]
243
- ] = [
244
- U.value[f],
245
- U.value[b]
246
- ], Xa());
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
- }, Za = () => {
249
- q.value && z("rowReorder", q.value), be.value = void 0, De.value = !1, q.value = void 0;
250
- }, Xa = () => {
251
- g.value = [...U.value];
252
- }, Ae = () => {
253
- const e = document.querySelectorAll(".option-button-active");
254
- e == null || e.forEach((a) => {
255
- a.classList.remove("option-button-active");
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
- }, et = () => {
258
- N.value = void 0, D.value = void 0;
259
- }, at = () => {
260
- G.value = 1, ve.value++;
261
- }, tt = () => {
262
- j.value = t.rows ?? 10, G.value = 1, ve.value++;
263
- }, lt = () => {
264
- tt(), et();
265
- }, Fe = async () => {
266
- ze.value++, ve.value++, lt(), t.lazy ? await le() : ot();
267
- }, ot = () => {
268
- let e = [...pe.value ?? []];
269
- const a = _e.value, n = Object.entries(a);
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
- e = n.length ? e.filter((s) => n.every(
272
- ([v, { value: i, matchMode: b }]) => {
273
- const f = B(s, v);
274
- switch (b) {
275
- case "IN":
276
- return Array.isArray(i) ? i.includes(f) : !1;
277
- case "CONTAINS":
278
- return f && i ? f.toString().toLowerCase().includes(i) : !1;
279
- case "EQUALS":
280
- return f ? f.toString() === i.toString() : !1;
281
- case "BETWEEN":
282
- return Array.isArray(i) && i.length === 2 ? !isNaN(f) && (i[0] == null || f >= i[0]) && (i[1] == null || f <= i[1]) : !1;
283
- case "DATE_BETWEEN":
284
- return Array.isArray(i) ? +new Date(f) >= i[0] && +new Date(f) <= i[1] : !1;
285
- default:
286
- return !1;
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
- )) : pe.value;
290
- } catch (s) {
291
- console.error("🚀 ~ applyStaticFilter ~ error:", s);
484
+ );
485
+ }) : originalTableData.value;
486
+ } catch (error) {
487
+ console.error("🚀 ~ applyStaticFilter ~ error:", error);
292
488
  }
293
- nt(e);
294
- }, nt = (e) => {
295
- var a;
489
+ applyStaticSearch(filtered);
490
+ };
491
+ const applyStaticSearch = (data) => {
492
+ var _a;
296
493
  try {
297
- g.value = (a = ae.value) != null && a.length ? e.filter((n) => {
298
- const s = JSON.stringify(n);
299
- return new RegExp(ae.value, "i").test(s) || ae.value.split(/\s+/).filter(Boolean).every((v) => new RegExp(v, "i").test(s));
300
- }) : e;
301
- } catch (n) {
302
- console.error("🚀 ~ applyStaticSearch ~ error:", n);
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
- }, rt = async (e) => {
305
- j.value = e.rows, G.value = e.page + 1, t.lazy && t.fetchFunction && await le(), Object.keys(M.value).forEach((a) => {
306
- const n = g.value.findIndex(
307
- (s) => s[t.dataKey] == a
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
- n >= 0 && ye(g.value[n], n, !0);
513
+ if (index >= 0)
514
+ toggleRowExpand(currentPageTableData.value[index], index, true);
310
515
  });
311
- }, st = (e, a) => {
312
- e !== N.value && (D.value = void 0), N.value = e, D.value ? D.value == -1 ? (D.value = void 0, N.value = void 0) : D.value = -1 : D.value = 1, z("sort", {
313
- sortOrder: D.value,
314
- sortField: N.value,
315
- originalEvent: a,
316
- rows: j.value
317
- }), at(), t.lazy && t.fetchFunction ? le() : it();
318
- }, it = () => {
319
- const e = [...g.value ?? []], a = /* @__PURE__ */ new Map();
320
- if (!D.value) {
321
- g.value = pe.value ?? [];
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 s of e)
325
- a.set(
326
- s,
327
- Ba.resolveFieldData(s, N.value)
545
+ for (const item of data) {
546
+ resolvedFieldData.set(
547
+ item,
548
+ ObjectUtils.resolveFieldData(item, sortBy.value)
328
549
  );
329
- const n = new Intl.Collator(void 0, { numeric: !0 }).compare;
330
- e.sort((s, v) => {
331
- const i = a.get(s), b = a.get(v);
332
- return Ba.sort(i, b, D.value, n, -1);
333
- }), g.value = e;
334
- }, le = async () => {
335
- var e;
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
- ee.value = !0;
338
- const a = await ((e = t.fetchFunction) == null ? void 0 : e.call(t, qe.value)), { data: n = [], totalRecords: s = 0 } = (a == null ? void 0 : a.data) ?? {};
339
- g.value = n, U.value = [...g.value], L.value = s;
340
- } catch (a) {
341
- console.error("🚀 ~ reFetch ~ error:", a);
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
- ee.value = !1, M.value = {};
571
+ loadingTable.value = false;
572
+ expandedRows.value = {};
344
573
  }
345
- }, Ze = async () => {
346
- var n;
347
- const e = Ut(qe.value);
348
- delete e.page, delete e.limit;
349
- const a = await ((n = t.fetchFunction) == null ? void 0 : n.call(t, e));
350
- if (a instanceof Error) throw a;
351
- return (a == null ? void 0 : a.data) ?? { data: [], totalRecords: 0 };
352
- }, dt = async (e) => {
353
- if (t.tableName === e.tableName)
354
- try {
355
- ee.value = !0;
356
- const { data: a, totalRecords: n = 0 } = t.lazy ? await Ze() : { totalRecords: (t.data ?? []).length, data: t.data }, s = ea(a);
357
- T.value = t.includeCheckDisabledRows ? a ?? [] : xe(a, s), L.value = n;
358
- } finally {
359
- ee.value = !1;
360
- }
361
- }, oe = (e, a) => u == null ? void 0 : u.headercell({
362
- props: t,
363
- context: {
364
- sortOrder: D.value,
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
- }), Xe = (e) => {
370
- (!e.tableName || e.tableName === t.tableName) && Ha(() => {
371
- Ia.value++, le();
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
- }, xe = (e, a) => (e ?? []).filter(
374
- (n) => !(a ?? te.value).includes(n[t.dataKey])
375
- ), ea = (e = []) => t.disableAllRows ? e.map((a) => a[t.dataKey]) : e.filter((a) => a[t.disableKey]).map((a) => a[t.dataKey]), ut = async ({
376
- tableName: e,
377
- multiTableNames: a,
378
- fileName: n,
379
- additionalTexts: s
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 w;
382
- if (e !== t.tableName && !(a != null && a.includes(t.tableName)))
630
+ var _a;
631
+ if (tableName !== props.tableName && !(multiTableNames == null ? void 0 : multiTableNames.includes(props.tableName)))
383
632
  return;
384
- const i = O.value.filter(
385
- (k) => k.visible !== !1
386
- ).filter((k) => !k.excluded), b = i.map(
387
- (k) => k.header ?? k.exportHeader ?? "-"
388
- ), f = () => n.trim().replace(/[^a-zA-Z0-9\s]/g, "-").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/-+$/, "");
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
- if (m.off("data-table:download", he), e === t.tableName) {
391
- Le(!0, Oe.downloadingMessage);
392
- const { data: k } = t.fetchFunction ? await Ze() : { data: t.data }, l = Kt(k, i, Oe);
393
- if (a != null && a.length) {
394
- m.emit("button-download:multi-tables", {
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: b,
397
- data: l,
398
- tableName: e,
399
- tableTitle: t.tableTitle
652
+ headers,
653
+ data: excelBody,
654
+ tableName,
655
+ tableTitle: props.tableTitle
400
656
  }
401
657
  });
402
658
  return;
403
659
  }
404
- await Et({
660
+ await exportToExcel({
405
661
  tables: [
406
- { headers: b, data: l, tableName: e, tableTitle: t.tableTitle }
662
+ { headers, data: excelBody, tableName, tableTitle: props.tableTitle }
407
663
  ],
408
- fileName: f(),
409
- additionalTexts: s
664
+ fileName: formatFileName(),
665
+ additionalTexts
410
666
  });
411
667
  }
412
- } catch (k) {
413
- console.error("🚀 ~ downloadExcel error:", k), Ue.removeAllGroups(), Ue.add({
414
- message: ((w = X.value.excelToastErrorMessage) == null ? void 0 : w.replace("{fileName}", n)) ?? "Data gagal diunduh.",
415
- error: k,
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
- Le(!1), m.on("data-table:download", he);
677
+ setLoading(false);
678
+ eventBus.on("data-table:download", downloadHandler);
420
679
  }
421
680
  };
422
- ht(async () => {
423
- var e;
424
- t.fetchFunction && (await le(), bt()), (e = t.selectedData) != null && e.length && (T.value = t.selectedData), ct();
425
- }), mt(() => {
426
- pt();
427
- }), we(
428
- () => t.columns,
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
- t.customColumn || (O.value = t.columns), Ie.value++;
698
+ if (!props.customColumn) visibleColumns.value = props.columns;
699
+ customColumnKey.value++;
431
700
  }
432
- ), we(
433
- () => t.data,
434
- (e) => {
435
- g.value = e ?? [], pe.value = e ?? [], m.emit("data-table:updated", { tableName: t.tableName, data: e }), L.value = e == null ? void 0 : e.length;
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: !0
711
+ immediate: true
439
712
  }
440
- ), we(L, (e) => {
441
- vt(e);
442
- }), we(
443
- T,
444
- (e) => {
445
- z("selectData", e), z("update:selectedData", e), m.emit("data-table:update-selected-data", {
446
- tableName: t.tableName,
447
- data: e
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: !0 }
727
+ { deep: true }
451
728
  );
452
- const ct = () => {
453
- m.on("data-table:apply-filter", aa), m.on("search-table", ta), m.on("search-by-scan-table", la), m.on("data-table:clear-selected-data", na), m.on("data-table:select-all-record", oa), m.on("data-table:download", he), m.on("data-table:import-excel-to-json", ra);
454
- }, pt = () => {
455
- m.off("data-table:update", Xe), m.off("data-table:apply-filter", aa), m.off("search-table", ta), m.off("search-by-scan-table", la), m.off("data-table:clear-selected-data", na), m.off("data-table:select-all-record", oa), m.off("data-table:download", he), m.off("data-table:import-excel-to-json", ra);
456
- }, aa = (e) => {
457
- e.tableName === t.tableName && (_e.value = e.filter, Fe());
458
- }, ta = (e) => {
459
- e.tableName === t.tableName && (ae.value = e.search, Fe());
460
- }, la = (e) => {
461
- e.tableName === t.tableName && (Ve.value = e.tag, Fe());
462
- }, oa = (e) => {
463
- e.tableName === t.tableName && dt(e);
464
- }, na = (e) => {
465
- e.tableName === t.tableName && (T.value = []);
466
- }, he = (e) => {
467
- var a;
468
- (e.tableName === t.tableName || (a = e.multiTableNames) != null && a.includes(t.tableName)) && ut(e);
469
- }, ft = (e) => {
470
- e.code.includes("Digit") || e.code.includes("Numpad") || ["ArrowLeft", "ArrowRight", "Backspace", "Delete"].includes(e.code) || e.preventDefault();
471
- }, vt = (e) => {
472
- const a = t.includeCheckDisabledRows ? 0 : (te.value.length || t.totalDisabledRows) ?? 0, n = {
473
- total: (e ?? L.value ?? 0) - a,
474
- tableName: t.tableName
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
- m.emit("data-table:update-total-record", n);
477
- }, bt = () => {
478
- m.on("data-table:update", Xe);
479
- }, ra = (e) => {
480
- e.tableName === t.tableName && (g.value = e.data, U.value = [...g.value], L.value = e.data.length);
481
- }, He = (e, a, n) => typeof (e == null ? void 0 : e.confirmDialogProps) == "function" ? e == null ? void 0 : e.confirmDialogProps(a, n) : e == null ? void 0 : e.confirmDialogProps;
482
- return (e, a) => {
483
- var n, s, v;
484
- return d(), c("div", se(ie((n = r(u)) == null ? void 0 : n.root)), [
485
- x("div", se(ie((s = r(u)) == null ? void 0 : s.tablewrapper)), [
486
- _(r(Dt), p({ "auto-hide": !1 }, (v = r(u)) == null ? void 0 : v.scrollheightwrapper({ props: t }), { class: "custom-scrollbar" }), {
487
- default: de(() => {
488
- var i, b, f, w, k;
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
- (d(), c("table", p({ id: r(Re) }, (i = r(u)) == null ? void 0 : i.table, {
491
- key: ze.value,
492
- ref: Ua.value
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
- x("thead", se(ie(r(u).thead)), [
495
- x("tr", se(ie(r(u).headerrow)), [
496
- e.reorderable && !D.value ? (d(), c("th", p({ key: 0 }, r(u).headercellreorderable, {
497
- class: oe().class
498
- }), null, 16)) : y("", !0),
499
- e.selectionType === "checkbox" ? (d(), c("th", p({ key: 1 }, r(u).headercellcheckbox, {
500
- class: oe().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
- _(Be, p(
503
- (b = r(u)) == null ? void 0 : b.headercheckbox({ context: { isSelectedAll: Je.value } }),
828
+ createVNode(_sfc_main$1, mergeProps(
829
+ (_b2 = unref(Preset)) == null ? void 0 : _b2.headercheckbox({ context: { isSelectedAll: isSelectedAll.value } }),
504
830
  {
505
- "model-value": Je.value,
506
- "onUpdate:modelValue": a[0] || (a[0] = (l) => Qa(!!l)),
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)) : y("", !0),
511
- e.treeTable ? (d(), c("th", p({ key: 2 }, r(u).headertoggler, {
512
- class: oe().class
836
+ ], 16)) : createCommentVNode("", true),
837
+ _ctx.treeTable ? (openBlock(), createElementBlock("th", mergeProps({ key: 2 }, unref(Preset).headertoggler, {
838
+ class: headerCellPreset().class
513
839
  }), [
514
- _($e, p(
515
- { onClick: qa },
516
- r(u).headertogglerbutton({ context: { isExpandedAll: Ge.value } }),
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)) : y("", !0),
523
- (d(!0), c(P, null, Z(O.value, (l) => (d(), c("th", p({
524
- key: l.field,
525
- class: [l.headerClass, l.class],
526
- ref_for: !0
527
- }, oe(l), {
528
- onClick: (h) => l.sortable ? st(l.field, h) : null
529
- }), [
530
- x("span", p({ ref_for: !0 }, r(u).headercellcontent), [
531
- x("span", Vt, [
532
- ue(H(l.header) + " ", 1),
533
- l.info ? (d(), E(Q, {
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
- info: l.info,
536
- severity: l.infoSeverity,
537
- class: "w-[10px] h-[10px]",
538
- icon: "info"
539
- }, null, 8, ["info", "severity"])) : y("", !0)
540
- ]),
541
- l.sortable ? (d(), E(Q, {
542
- key: 0,
543
- icon: !N.value || N.value != l.field ? "arrow-up-down" : D.value == 1 ? "sort-asc" : "sort-desc",
544
- class: "text-base"
545
- }, null, 8, ["icon"])) : y("", !0)
546
- ], 16)
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
- t.customColumn ? (d(), E(Q, p({ key: 0 }, r(u).columnvisibilityicon, {
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)) : y("", !0)
560
- ], 16, Qt)) : y("", !0)
887
+ }), null, 16)) : createCommentVNode("", true)
888
+ ], 16, _hoisted_4)) : createCommentVNode("", true)
561
889
  ], 16)
562
890
  ], 16),
563
- x("tbody", se(ie((f = r(u)) == null ? void 0 : f.tbody)), [
564
- Pe.value ? (d(), c("tr", Wt, [
565
- x("td", p({ colspan: We.value }, (w = r(u)) == null ? void 0 : w.bodycell), [
566
- (d(!0), c(P, null, Z(r(u).invisiblelottiewrapper ? 2 : 1, (l) => (d(), c("div", p(
567
- {
568
- key: l,
569
- ref_for: !0
570
- },
571
- l === 1 ? r(u).loadingtablewrapper : r(u).invisiblelottiewrapper
572
- ), [
573
- _(Ce, p({
574
- animation: "loading-table",
575
- ref_for: !0
576
- }, r(u).loadingtablelottie), null, 16)
577
- ], 16))), 128))
578
- ], 16, qt)
579
- ])) : za.value ? (d(), c("tr", ol, [
580
- x("td", p({ colspan: We.value }, (k = r(u)) == null ? void 0 : k.bodycell), [
581
- (d(!0), c(P, null, Z(r(u).invisiblelottiewrapper ? 2 : 1, (l) => (d(), c("div", p(
582
- {
583
- key: l,
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: l._id,
603
- key: `${h}-${l[e.dataKey]}`,
604
- draggable: Ne(l),
605
- ref_for: !0
913
+ id: item._id,
914
+ key: `${index}-${item[_ctx.dataKey]}`,
915
+ draggable: draggable(item),
916
+ ref_for: true
606
917
  },
607
- (ne = r(u)) == null ? void 0 : ne.bodyrow({
918
+ (_a3 = unref(Preset)) == null ? void 0 : _a3.bodyrow({
608
919
  context: {
609
- highlighted: l[e.highlightKey ?? ""],
610
- selected: Se(l[e.dataKey]),
611
- disabled: J(l[e.dataKey]),
612
- draggable: Ne(l),
613
- dragging: De.value
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: t
926
+ props
616
927
  }),
617
928
  {
618
- onClick: (o) => Wa(o, l, h),
619
- onDblclick: (o) => {
620
- var V;
621
- return e.treeTable && ((V = l.children) != null && V.length || l.hasChildren) ? ye(l, h) : null;
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: a[11] || (a[11] = (o) => De.value = !0),
624
- onDragenter: S((o) => Ya(o, l), ["prevent"]),
625
- onDragleave: a[12] || (a[12] = S(() => {
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: a[13] || (a[13] = S(() => {
938
+ onDragover: _cache[13] || (_cache[13] = withModifiers(() => {
628
939
  }, ["prevent"])),
629
- onDragstart: (o) => Ja(o, l, h),
630
- onDrop: Za
940
+ onDragstart: ($event) => startReorderRow($event, item, index),
941
+ onDrop: onRowReorder
631
942
  }
632
943
  ), [
633
- e.reorderable && !D.value ? (d(), c("td", p({
944
+ _ctx.reorderable && !sortOrder.value ? (openBlock(), createElementBlock("td", mergeProps({
634
945
  key: 0,
635
- ref_for: !0
636
- }, (sa = r(u)) == null ? void 0 : sa.bodycell), [
637
- !l.childRow && !l.childRowHeader ? (d(), E(Q, {
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
- })) : y("", !0)
642
- ], 16)) : y("", !0),
643
- e.selectionType === "checkbox" ? (d(), c("td", p({
952
+ })) : createCommentVNode("", true)
953
+ ], 16)) : createCommentVNode("", true),
954
+ _ctx.selectionType === "checkbox" ? (openBlock(), createElementBlock("td", mergeProps({
644
955
  key: 1,
645
- ref_for: !0
646
- }, (ia = r(u)) == null ? void 0 : ia.bodycell, {
647
- onClick: a[3] || (a[3] = S(() => {
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
- !l.childRow && !l.childRowHeader ? (d(), E(Be, p({
961
+ !item.childRow && !item.childRowHeader ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
651
962
  key: 0,
652
- ref_for: !0
653
- }, (da = r(u)) == null ? void 0 : da.rowcheckbox, {
654
- modelValue: T.value,
655
- "onUpdate:modelValue": a[2] || (a[2] = (o) => T.value = o),
656
- binary: !1,
657
- disabled: J(l[e.dataKey]),
658
- value: l
659
- }), null, 16, ["modelValue", "disabled", "value"])) : y("", !0)
660
- ], 16)) : y("", !0),
661
- e.treeTable ? (d(), c("td", p({
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: !0
664
- }, (ua = r(u)) == null ? void 0 : ua.bodycell, {
665
- onClick: (o) => {
666
- (l.childRow || l.childRowHeader) && o.stopPropagation();
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
- (ca = l.children) != null && ca.length || l.hasChildren ? (d(), E($e, p(
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: S((o) => ye(l, h), ["stop"]),
673
- ref_for: !0
983
+ onClick: withModifiers(($event) => toggleRowExpand(item, index), ["stop"]),
984
+ ref_for: true
674
985
  },
675
- r(u).rowtogglerbutton({
986
+ unref(Preset).rowtogglerbutton({
676
987
  context: {
677
- isRowExpanded: Ee(l[e.dataKey])
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"])) : y("", !0)
685
- ], 16, Jt)) : y("", !0),
995
+ ), null, 16, ["onClick"])) : createCommentVNode("", true)
996
+ ], 16, _hoisted_8)) : createCommentVNode("", true),
686
997
  (() => {
687
- var o;
688
- return l.childRowHeader && ((o = t.childTableProps) == null ? void 0 : o.useColumnsHeader);
689
- })() ? (d(), c(P, { key: 3 }, [
690
- (d(!0), c(P, null, Z(Qe.value, (o) => {
691
- var V, re;
692
- return d(), c("td", {
693
- key: o.header,
694
- class: ke([(V = r(u)) == null ? void 0 : V.bodycell.class, "font-semibold text-xs"]),
695
- colspan: o.colspan ?? ((re = o.parentColumnsFields) == null ? void 0 : re.length),
696
- onClick: a[4] || (a[4] = S(() => {
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
- }, H(o.header), 11, Yt);
1009
+ }, toDisplayString(col.header), 11, _hoisted_9);
699
1010
  }), 128)),
700
- Ke.value ? (d(), c("td", {
1011
+ showCustomColumn.value ? (openBlock(), createElementBlock("td", {
701
1012
  key: 0,
702
- class: ke(r(u).bodycell.class),
703
- onClick: a[5] || (a[5] = S(() => {
1013
+ class: normalizeClass(unref(Preset).bodycell.class),
1014
+ onClick: _cache[5] || (_cache[5] = withModifiers(() => {
704
1015
  }, ["stop"]))
705
- }, null, 2)) : y("", !0)
706
- ], 64)) : l.childRowHeader ? (d(), c("td", p({
1016
+ }, null, 2)) : createCommentVNode("", true)
1017
+ ], 64)) : item.childRowHeader ? (openBlock(), createElementBlock("td", mergeProps({
707
1018
  key: 4,
708
- ref_for: !0
709
- }, r(u).childrowheader, {
710
- class: (pa = r(u)) == null ? void 0 : pa.bodycell.class,
711
- colspan: t.columns.length + 1,
712
- onClick: a[6] || (a[6] = S(() => {
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
- }), H(l.header), 17, Zt)) : l.loadingRow ? (d(), c("td", {
1025
+ }), toDisplayString(item.header), 17, _hoisted_10)) : item.loadingRow ? (openBlock(), createElementBlock("td", {
715
1026
  key: 5,
716
- class: ke((fa = r(u)) == null ? void 0 : fa.bodycell.class),
717
- colspan: t.columns.length + 1,
718
- onClick: a[7] || (a[7] = S(() => {
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
- x("div", p({ ref_for: !0 }, r(u).loadingtablewrapper), [
722
- _(Ce, p({
1032
+ createElementVNode("div", mergeProps({ ref_for: true }, unref(Preset).loadingtablewrapper), [
1033
+ createVNode(_sfc_main$4, mergeProps({
723
1034
  animation: "loading-table",
724
- ref_for: !0
725
- }, r(u).loadingtablelottie), null, 16)
1035
+ ref_for: true
1036
+ }, unref(Preset).loadingtablelottie), null, 16)
726
1037
  ], 16)
727
- ], 10, Xt)) : l.noDataRow ? (d(), c("td", {
1038
+ ], 10, _hoisted_11)) : item.noDataRow ? (openBlock(), createElementBlock("td", {
728
1039
  key: 6,
729
- class: ke((va = r(u)) == null ? void 0 : va.bodycell.class),
730
- colspan: t.columns.length + 1,
731
- onClick: a[8] || (a[8] = S(() => {
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
- x("div", p({ ref_for: !0 }, r(u).nodatalottiewrapper), [
735
- _(Ce, p({
1045
+ createElementVNode("div", mergeProps({ ref_for: true }, unref(Preset).nodatalottiewrapper), [
1046
+ createVNode(_sfc_main$4, mergeProps({
736
1047
  animation: "no-data",
737
- ref_for: !0
738
- }, r(u).nodatalottie), null, 16),
739
- X.value.emptyTableMessage ? (d(), c("span", p({
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: !0
742
- }, r(u).nodatamessage), H(X.value.emptyTableMessage), 17)) : y("", !0)
1052
+ ref_for: true
1053
+ }, unref(Preset).nodatamessage), toDisplayString(config.value.emptyTableMessage), 17)) : createCommentVNode("", true)
743
1054
  ], 16)
744
- ], 10, el)) : (d(), c(P, { key: 7 }, [
745
- (d(!0), c(P, null, Z(l.childRow ? Qe.value : O.value, (o) => {
746
- var V, re, ya, ha, ma, wa, ka, Ca, Ra, Da, Ta, _a, Pa, Ka, Ea, me, Sa, Na;
747
- return d(), c("td", p({
748
- key: o.field,
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": o.editable,
752
- "!px-0": ((V = o.preset) == null ? void 0 : V.type) === "multirow"
1062
+ "!py-0": col.editable,
1063
+ "!px-0": ((_a4 = col.preset) == null ? void 0 : _a4.type) === "multirow"
753
1064
  },
754
- typeof o.bodyClass == "function" ? o.bodyClass(l) : o.bodyClass,
755
- o.class
1065
+ typeof col.bodyClass === "function" ? col.bodyClass(item) : col.bodyClass,
1066
+ col.class
756
1067
  ],
757
- colspan: o.colspan ?? ((re = o.parentColumnsFields) == null ? void 0 : re.length),
758
- ref_for: !0
759
- }, (ya = r(u)) == null ? void 0 : ya.bodycell), [
760
- ((ha = o.preset) == null ? void 0 : ha.type) === "toggle" || ((ma = o.preset) == null ? void 0 : ma.type) === "checkbox" ? (d(), c(P, { key: 0 }, [
761
- ((wa = o.preset) == null ? void 0 : wa.type) === "toggle" ? (d(), E(Mt, {
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: J(l[e.dataKey]) || (typeof ((ka = o.preset) == null ? void 0 : ka.disabled) == "function" ? (Ca = o.preset) == null ? void 0 : Ca.disabled(l) : (Ra = o.preset) == null ? void 0 : Ra.disabled),
764
- "input-id": l[e.dataKey],
765
- "model-value": r(B)(l, o.field),
766
- onClick: a[9] || (a[9] = S(() => {
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": (C) => {
769
- r(ce)(l, o.field, C), Ye(C, l, o);
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"])) : y("", !0),
772
- ((Da = o.preset) == null ? void 0 : Da.type) === "checkbox" ? (d(), E(Be, {
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: J(l[e.dataKey]) || (typeof ((Ta = o.preset) == null ? void 0 : Ta.disabled) == "function" ? (_a = o.preset) == null ? void 0 : _a.disabled(l) : (Pa = o.preset) == null ? void 0 : Pa.disabled),
775
- "input-id": l[e.dataKey],
776
- "model-value": r(B)(l, o.field),
777
- onClick: a[10] || (a[10] = S(() => {
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": (C) => {
780
- r(ce)(l, o.field, !!C), Ye(!!C, l, o);
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"])) : y("", !0),
784
- (Ka = o.preset) != null && Ka.confirmDialogProps ? (d(), E(Ht, p(
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: [l],
788
- visible: !!ge.value[l[e.dataKey] + o.field],
1100
+ list: [item],
1101
+ visible: !!showConfirmToggle.value[item[_ctx.dataKey] + col.field],
789
1102
  onClose: () => {
790
- var K, A, Aa;
791
- const C = () => r(ce)(
792
- l,
793
- o.field,
794
- !r(B)(l, o.field)
1103
+ var _a5, _b5, _c5;
1104
+ const revert = () => unref(setNestedPropertyValue)(
1105
+ item,
1106
+ col.field,
1107
+ !unref(getNestedPropertyValue)(item, col.field)
795
1108
  );
796
- ((K = He(
797
- o.preset,
798
- l[o.field],
799
- l
800
- )) == null ? void 0 : K.actionable) == !1 && "onConfirm" in o.preset ? (Aa = (A = o.preset).onConfirm) == null || Aa.call(
801
- A,
802
- l[o.field],
803
- l,
804
- C
805
- ) : C();
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: (C) => {
808
- var K, A;
809
- return (A = (K = o.preset) == null ? void 0 : K.onConfirm) == null ? void 0 : A.call(
810
- K,
811
- l[o.field],
812
- l,
813
- () => r(ce)(
814
- l,
815
- o.field,
816
- !r(B)(l, o.field)
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": (C) => ge.value[l[e.dataKey] + o.field] = C,
1135
+ "onUpdate:visible": ($event) => showConfirmToggle.value[item[_ctx.dataKey] + col.field] = $event,
821
1136
  actionable: "",
822
- ref_for: !0
1137
+ ref_for: true
823
1138
  },
824
- He(
825
- o.preset,
826
- l[o.field],
827
- l
1139
+ getConfirmDialogProps(
1140
+ col.preset,
1141
+ item[col.field],
1142
+ item
828
1143
  )
829
- ), null, 16, ["list", "visible", "onClose", "onConfirm", "onUpdate:visible"])) : y("", !0)
830
- ], 64)) : ((Ea = o.preset) == null ? void 0 : Ea.type) === "multirow" ? (d(), E(Ot, {
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: ((Sa = (me = o.preset) == null ? void 0 : me.fieldAttributes) == null ? void 0 : Sa.call(me, l)) ?? []
833
- }, null, 8, ["attributes"])) : o.editable ? (d(), c("span", p({
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: !0
836
- }, r(u).celleditableelement, {
837
- contenteditable: o.editable,
838
- onBlur: (C) => {
839
- e.$emit("cellEdited", {
840
- item: l,
841
- field: o.field,
842
- index: h,
843
- value: C.target.innerText
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: (C) => {
847
- o.numberInputOnly && ft(C);
1161
+ onKeypress: ($event) => {
1162
+ if (col.numberInputOnly) preventCharInput($event);
848
1163
  }
849
- }), H(r(B)(l, o.field) || "-"), 17, tl)) : o.bodyComponent || o.bodyClass || o.bodyTemplate || o.dateFormatOptions ? (d(), c(P, { key: 3 }, [
850
- o.bodyComponent ? (d(), E(kt(o.bodyComponent(l, h).component), p({
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: o.bodyComponent(l, h).model,
853
- "onUpdate:modelValue": (C) => o.bodyComponent(l, h).model = C,
854
- disabled: o.bodyComponent(l, h).disabled,
855
- ref_for: !0
856
- }, o.bodyComponent(l, h).props, Ct(
857
- o.bodyComponent(l, h).events ? o.bodyComponent(l, h).events : {}
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: (C) => {
860
- var K, A;
861
- return (A = (K = o.bodyComponent(l, h)).onChange) == null ? void 0 : A.call(K, l);
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: (C) => {
864
- o.bodyComponent(l, h).stop !== !1 && C.stopPropagation();
1178
+ onClick: (e) => {
1179
+ if (col.bodyComponent(item, index).stop !== false) {
1180
+ e.stopPropagation();
1181
+ }
865
1182
  },
866
- "onUpdate:modelValue": (C) => {
867
- var K, A;
868
- return (A = (K = o.bodyComponent(l, h)).onChange) == null ? void 0 : A.call(K, l);
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"])) : (d(), c("span", ll, [
871
- o.bodyTemplate ? (d(), c(P, { key: 0 }, [
872
- ue(H(((Na = o.bodyTemplate) == null ? void 0 : Na.call(o, l, h)) || "-"), 1)
873
- ], 64)) : o.dateFormatOptions ? (d(), c(P, { key: 1 }, [
874
- ue(H(r(Pt)(
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
- r(B)(
877
- l,
878
- o.field
1193
+ unref(getNestedPropertyValue)(
1194
+ item,
1195
+ col.field
879
1196
  )
880
1197
  ),
881
- o.dateFormatOptions
1198
+ col.dateFormatOptions
882
1199
  )), 1)
883
- ], 64)) : (d(), c(P, { key: 2 }, [
884
- ue(H(r(B)(l, o.field) || "-"), 1)
1200
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1201
+ createTextVNode(toDisplayString(unref(getNestedPropertyValue)(item, col.field) || "-"), 1)
885
1202
  ], 64))
886
1203
  ]))
887
- ], 64)) : (d(), c(P, { key: 4 }, [
888
- ue(H(r(B)(l, o.field) ?? "-"), 1)
1204
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1205
+ createTextVNode(toDisplayString(unref(getNestedPropertyValue)(item, col.field) ?? "-"), 1)
889
1206
  ], 64))
890
- ], 16, al);
1207
+ ], 16, _hoisted_13);
891
1208
  }), 128)),
892
- Ke.value ? (d(), c("td", p(
1209
+ showCustomColumn.value ? (openBlock(), createElementBlock("td", mergeProps(
893
1210
  {
894
1211
  key: 0,
895
- ref_for: !0,
1212
+ ref_for: true,
896
1213
  ref_key: "rowSingleActionCell",
897
- ref: La
1214
+ ref: rowSingleActionCell
898
1215
  },
899
- (ba = r(u)) == null ? void 0 : ba.rowsingleactioncell({
900
- props: t,
1216
+ (_j = unref(Preset)) == null ? void 0 : _j.rowsingleactioncell({
1217
+ props,
901
1218
  context: {
902
- selected: Se(l[e.dataKey]),
903
- highlighted: l[e.highlightKey ?? ""]
1219
+ selected: isRowSelected(item[_ctx.dataKey]),
1220
+ highlighted: item[_ctx.highlightKey ?? ""]
904
1221
  }
905
1222
  }),
906
1223
  {
907
- class: r(u).bodycell.class
1224
+ class: unref(Preset).bodycell.class
908
1225
  }
909
1226
  ), [
910
- !l.childRow && e.useOption || l.childRow && ((ga = t.childTableProps) != null && ga.useOption) ? (d(), c("div", p({
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: !0
913
- }, r(u).singleactionwrapper), [
914
- _($e, p({
915
- id: "button-action-" + l[t.dataKey],
916
- ref_for: !0
917
- }, r(u).singleactionbutton({ props: t }), {
918
- disabled: e.disableAllRows,
919
- onClick: S((o) => Ga(o, l), ["stop"]),
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)) : y("", !0)
927
- ], 16)) : y("", !0)
1243
+ ], 16)) : createCommentVNode("", true)
1244
+ ], 16)) : createCommentVNode("", true)
928
1245
  ], 64))
929
- ], 16, Gt);
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, zt))
1270
+ ], 16, _hoisted_1))
933
1271
  ];
934
1272
  }),
935
1273
  _: 1
936
1274
  }, 16)
937
1275
  ], 16),
938
- e.usePaginator ? wt((d(), E(r(Ft), p({
939
- key: ve.value,
940
- rows: j.value,
941
- "onUpdate:rows": a[14] || (a[14] = (i) => j.value = i)
942
- }, r(u).paginator({ context: { totalRecords: L.value } }), {
943
- "rows-per-page-options": Ma,
944
- "total-records": L.value,
945
- onPage: rt
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: de(() => [
948
- _(Q, { icon: "round-keyboard-double-arrow-left" })
1285
+ firstpagelinkicon: withCtx(() => [
1286
+ createVNode(_sfc_main$3, { icon: "round-keyboard-double-arrow-left" })
949
1287
  ]),
950
- lastpagelinkicon: de(() => [
951
- _(Q, { icon: "round-keyboard-double-arrow-right" })
1288
+ lastpagelinkicon: withCtx(() => [
1289
+ createVNode(_sfc_main$3, { icon: "round-keyboard-double-arrow-right" })
952
1290
  ]),
953
- prevpagelinkicon: de(() => [
954
- _(Q, { icon: "round-keyboard-arrow-left" })
1291
+ prevpagelinkicon: withCtx(() => [
1292
+ createVNode(_sfc_main$3, { icon: "round-keyboard-arrow-left" })
955
1293
  ]),
956
- nextpagelinkicon: de(() => [
957
- _(Q, { icon: "round-keyboard-arrow-right" })
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
- [Rt, !Pe.value]
962
- ]) : y("", !0),
963
- _(Bt, {
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: je,
967
- model: e.options,
968
- onFocus: r(Lt),
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
- t.customColumn ? (d(), E(xt, {
974
- key: Ie.value,
1311
+ props.customColumn ? (openBlock(), createBlock(_sfc_main$9, {
1312
+ key: customColumnKey.value,
975
1313
  ref_key: "customColumn",
976
- ref: Te,
977
- "visible-columns": O.value,
978
- "onUpdate:visibleColumns": a[15] || (a[15] = (i) => O.value = i),
979
- "default-columns": e.columns.filter((i) => i.visible !== !1),
980
- "table-id": r(Re)
981
- }, null, 8, ["visible-columns", "default-columns", "table-id"])) : y("", !0),
982
- _($t, { group: "download" })
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
- }), Nl = /* @__PURE__ */ At(rl, [["__scopeId", "data-v-0c986612"]]);
1324
+ });
1325
+ const DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5797150a"]]);
987
1326
  export {
988
- Nl as D
1327
+ DataTable as D
989
1328
  };