@owp/core 2.5.28 → 2.5.30

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 (137) hide show
  1. package/dist/_virtual/index20.js +2 -2
  2. package/dist/_virtual/index21.js +2 -2
  3. package/dist/_virtual/index22.js +2 -2
  4. package/dist/components/OwpTable/OwpDataTable.js +109 -104
  5. package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
  6. package/dist/components/OwpTable/OwpFieldTable.js +1 -1
  7. package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
  8. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +1 -1
  9. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  10. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +475 -427
  11. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  12. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +335 -288
  13. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  14. package/dist/constants/gridTheme.js +8 -7
  15. package/dist/constants/gridTheme.js.map +1 -1
  16. package/dist/constants/treeGrid.js +26 -25
  17. package/dist/constants/treeGrid.js.map +1 -1
  18. package/dist/constants.js +25 -24
  19. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js +120 -114
  20. package/dist/features/themePreview/components/ThemePreviewCanvasSections.js.map +1 -1
  21. package/dist/features/themePreview/configs/grid.js +1 -0
  22. package/dist/features/themePreview/configs/grid.js.map +1 -1
  23. package/dist/features/themePreview/utils/themePreviewDefinitions.js +4 -0
  24. package/dist/features/themePreview/utils/themePreviewDefinitions.js.map +1 -1
  25. package/dist/index.js +54 -56
  26. package/dist/index.js.map +1 -1
  27. package/dist/layout/components/menus/PasswordChangeMenu.js +5 -5
  28. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/VisibilityOff.js.map +1 -1
  29. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  30. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  31. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
  32. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  33. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  34. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  35. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  36. package/dist/owp-app.css +1 -1
  37. package/dist/types/components/OwpTreeGrid/internal/treeGridTheme.d.ts +2 -1
  38. package/dist/types/constants/gridTheme.d.ts +2 -0
  39. package/dist/types/constants/treeGrid.d.ts +1 -0
  40. package/dist/types/features/themePreview/configs/grid.d.ts +1 -0
  41. package/dist/types/features/themePreview/configs/settings.d.ts +1 -0
  42. package/dist/types/index.d.ts +0 -1
  43. package/dist/types/types/OwpGridThemeTypes.d.ts +1 -0
  44. package/dist/types/utils/treeGridUtil.d.ts +42 -0
  45. package/dist/utils/treeGridUtil.js +256 -163
  46. package/dist/utils/treeGridUtil.js.map +1 -1
  47. package/dist/utils.js +31 -30
  48. package/package.json +1 -2
  49. package/dist/components/OwpMrtTable/OwpMrtTable.js +0 -717
  50. package/dist/components/OwpMrtTable/OwpMrtTable.js.map +0 -1
  51. package/dist/components/OwpMrtTable/internal/OwpMrtTableNoDataOverlay.js +0 -54
  52. package/dist/components/OwpMrtTable/internal/OwpMrtTableNoDataOverlay.js.map +0 -1
  53. package/dist/components/OwpMrtTable/internal/OwpMrtTableTopToolbar.js +0 -102
  54. package/dist/components/OwpMrtTable/internal/OwpMrtTableTopToolbar.js.map +0 -1
  55. package/dist/components/OwpMrtTable/utils/parseFromValuesOrFunc.js +0 -7
  56. package/dist/components/OwpMrtTable/utils/parseFromValuesOrFunc.js.map +0 -1
  57. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDownward.js +0 -9
  58. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDownward.js.map +0 -1
  59. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropDownRounded.js +0 -9
  60. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropDownRounded.js.map +0 -1
  61. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowRight.js +0 -9
  62. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowRight.js.map +0 -1
  63. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Cancel.js +0 -9
  64. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Cancel.js.map +0 -1
  65. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ClearAll.js +0 -9
  66. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ClearAll.js.map +0 -1
  67. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ContentCopy.js +0 -9
  68. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ContentCopy.js.map +0 -1
  69. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensityLarge.js +0 -9
  70. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensityLarge.js.map +0 -1
  71. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensityMedium.js +0 -9
  72. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensityMedium.js.map +0 -1
  73. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensitySmall.js +0 -9
  74. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DensitySmall.js.map +0 -1
  75. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DragHandle.js +0 -9
  76. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DragHandle.js.map +0 -1
  77. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DynamicFeed.js +0 -11
  78. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/DynamicFeed.js.map +0 -1
  79. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Edit.js +0 -9
  80. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Edit.js.map +0 -1
  81. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ExpandMore.js +0 -9
  82. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ExpandMore.js.map +0 -1
  83. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterAlt.js +0 -9
  84. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterAlt.js.map +0 -1
  85. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterList.js +0 -9
  86. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterList.js.map +0 -1
  87. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterListOff.js +0 -9
  88. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FilterListOff.js.map +0 -1
  89. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FirstPage.js +0 -9
  90. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FirstPage.js.map +0 -1
  91. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Fullscreen.js +0 -9
  92. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Fullscreen.js.map +0 -1
  93. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FullscreenExit.js +0 -9
  94. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/FullscreenExit.js.map +0 -1
  95. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardDoubleArrowDown.js +0 -11
  96. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/KeyboardDoubleArrowDown.js.map +0 -1
  97. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/LastPage.js +0 -9
  98. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/LastPage.js.map +0 -1
  99. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MoreHoriz.js +0 -9
  100. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/MoreHoriz.js.map +0 -1
  101. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PushPin.js +0 -10
  102. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/PushPin.js.map +0 -1
  103. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Save.js +0 -9
  104. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Save.js.map +0 -1
  105. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SearchOff.js +0 -11
  106. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SearchOff.js.map +0 -1
  107. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Sort.js +0 -9
  108. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Sort.js.map +0 -1
  109. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SyncAlt.js +0 -9
  110. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/SyncAlt.js.map +0 -1
  111. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UnfoldMoreRounded.js +0 -9
  112. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/UnfoldMoreRounded.js.map +0 -1
  113. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ViewColumn.js +0 -9
  114. package/dist/node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ViewColumn.js.map +0 -1
  115. package/dist/node_modules/.pnpm/@tanstack_match-sorter-utils@8.19.4/node_modules/@tanstack/match-sorter-utils/build/lib/index.js +0 -554
  116. package/dist/node_modules/.pnpm/@tanstack_match-sorter-utils@8.19.4/node_modules/@tanstack/match-sorter-utils/build/lib/index.js.map +0 -1
  117. package/dist/node_modules/.pnpm/@tanstack_react-table@8.20.6_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-table/build/lib/index.js +0 -95
  118. package/dist/node_modules/.pnpm/@tanstack_react-table@8.20.6_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-table/build/lib/index.js.map +0 -1
  119. package/dist/node_modules/.pnpm/@tanstack_react-virtual@3.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-virtual/dist/esm/index.js +0 -40
  120. package/dist/node_modules/.pnpm/@tanstack_react-virtual@3.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-virtual/dist/esm/index.js.map +0 -1
  121. package/dist/node_modules/.pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js +0 -2055
  122. package/dist/node_modules/.pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js.map +0 -1
  123. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.11.2/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -454
  124. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.11.2/node_modules/@tanstack/virtual-core/dist/esm/index.js.map +0 -1
  125. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.11.2/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -54
  126. package/dist/node_modules/.pnpm/@tanstack_virtual-core@3.11.2/node_modules/@tanstack/virtual-core/dist/esm/utils.js.map +0 -1
  127. package/dist/node_modules/.pnpm/highlight-words@2.0.0/node_modules/highlight-words/dist/highlight-words.js +0 -92
  128. package/dist/node_modules/.pnpm/highlight-words@2.0.0/node_modules/highlight-words/dist/highlight-words.js.map +0 -1
  129. package/dist/node_modules/.pnpm/material-react-table@3.2.1_69126b2b17f4a182bc981f3ab8d41a62/node_modules/material-react-table/dist/index.esm.js +0 -2440
  130. package/dist/node_modules/.pnpm/material-react-table@3.2.1_69126b2b17f4a182bc981f3ab8d41a62/node_modules/material-react-table/dist/index.esm.js.map +0 -1
  131. package/dist/node_modules/.pnpm/material-react-table@3.2.1_69126b2b17f4a182bc981f3ab8d41a62/node_modules/material-react-table/locales/ko/index.esm.js +0 -98
  132. package/dist/node_modules/.pnpm/material-react-table@3.2.1_69126b2b17f4a182bc981f3ab8d41a62/node_modules/material-react-table/locales/ko/index.esm.js.map +0 -1
  133. package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +0 -25
  134. package/dist/types/components/OwpMrtTable/index.d.ts +0 -1
  135. package/dist/types/components/OwpMrtTable/internal/OwpMrtTableNoDataOverlay.d.ts +0 -14
  136. package/dist/types/components/OwpMrtTable/internal/OwpMrtTableTopToolbar.d.ts +0 -6
  137. package/dist/types/components/OwpMrtTable/utils/parseFromValuesOrFunc.d.ts +0 -11
@@ -1,2055 +0,0 @@
1
- var we = Object.defineProperty;
2
- var s = (e, o) => we(e, "name", { value: o, configurable: !0 });
3
- /**
4
- * table-core
5
- *
6
- * Copyright (c) TanStack
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE.md file in the root directory of this source tree.
10
- *
11
- * @license MIT
12
- */
13
- function E(e, o) {
14
- return typeof e == "function" ? e(o) : e;
15
- }
16
- s(E, "functionalUpdate");
17
- function P(e, o) {
18
- return (t) => {
19
- o.setState((n) => ({
20
- ...n,
21
- [e]: E(t, n[e])
22
- }));
23
- };
24
- }
25
- s(P, "makeStateUpdater");
26
- function T(e) {
27
- return e instanceof Function;
28
- }
29
- s(T, "isFunction");
30
- function he(e) {
31
- return Array.isArray(e) && e.every((o) => typeof o == "number");
32
- }
33
- s(he, "isNumberArray");
34
- function le(e, o) {
35
- const t = [], n = /* @__PURE__ */ s((r) => {
36
- r.forEach((i) => {
37
- t.push(i);
38
- const l = o(i);
39
- l != null && l.length && n(l);
40
- });
41
- }, "recurse");
42
- return n(e), t;
43
- }
44
- s(le, "flattenBy");
45
- function C(e, o, t) {
46
- let n = [], r;
47
- return (i) => {
48
- let l;
49
- t.key && t.debug && (l = Date.now());
50
- const u = e(i);
51
- if (!(u.length !== n.length || u.some((p, m) => n[m] !== p)))
52
- return r;
53
- n = u;
54
- let d;
55
- if (t.key && t.debug && (d = Date.now()), r = o(...u), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
56
- const p = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - d) * 100) / 100, f = m / 16, g = /* @__PURE__ */ s((c, S) => {
57
- for (c = String(c); c.length < S; )
58
- c = " " + c;
59
- return c;
60
- }, "pad");
61
- console.info(`%c⏱ ${g(m, 5)} /${g(p, 5)} ms`, `
62
- font-size: .6rem;
63
- font-weight: bold;
64
- color: hsl(${Math.max(0, Math.min(120 - 120 * f, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
65
- }
66
- return r;
67
- };
68
- }
69
- s(C, "memo");
70
- function R(e, o, t, n) {
71
- return {
72
- debug: /* @__PURE__ */ s(() => {
73
- var r;
74
- return (r = e == null ? void 0 : e.debugAll) != null ? r : e[o];
75
- }, "debug"),
76
- key: process.env.NODE_ENV === "development" && t,
77
- onChange: n
78
- };
79
- }
80
- s(R, "getMemoOptions");
81
- function ve(e, o, t, n) {
82
- const r = /* @__PURE__ */ s(() => {
83
- var l;
84
- return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
85
- }, "getRenderValue"), i = {
86
- id: `${o.id}_${t.id}`,
87
- row: o,
88
- column: t,
89
- getValue: /* @__PURE__ */ s(() => o.getValue(n), "getValue"),
90
- renderValue: r,
91
- getContext: C(() => [e, t, o, i], (l, u, a, d) => ({
92
- table: l,
93
- column: u,
94
- row: a,
95
- cell: d,
96
- getValue: d.getValue,
97
- renderValue: d.renderValue
98
- }), R(e.options, "debugCells", "cell.getContext"))
99
- };
100
- return e._features.forEach((l) => {
101
- l.createCell == null || l.createCell(i, t, o, e);
102
- }, {}), i;
103
- }
104
- s(ve, "createCell");
105
- function _e(e, o, t, n) {
106
- var r, i;
107
- const u = {
108
- ...e._getDefaultColumnDef(),
109
- ...o
110
- }, a = u.accessorKey;
111
- let d = (r = (i = u.id) != null ? i : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, p;
112
- if (u.accessorFn ? p = u.accessorFn : a && (a.includes(".") ? p = /* @__PURE__ */ s((f) => {
113
- let g = f;
114
- for (const S of a.split(".")) {
115
- var c;
116
- g = (c = g) == null ? void 0 : c[S], process.env.NODE_ENV !== "production" && g === void 0 && console.warn(`"${S}" in deeply nested key "${a}" returned undefined.`);
117
- }
118
- return g;
119
- }, "accessorFn") : p = /* @__PURE__ */ s((f) => f[u.accessorKey], "accessorFn")), !d)
120
- throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
121
- let m = {
122
- id: `${String(d)}`,
123
- accessorFn: p,
124
- parent: n,
125
- depth: t,
126
- columnDef: u,
127
- columns: [],
128
- getFlatColumns: C(() => [!0], () => {
129
- var f;
130
- return [m, ...(f = m.columns) == null ? void 0 : f.flatMap((g) => g.getFlatColumns())];
131
- }, R(e.options, "debugColumns", "column.getFlatColumns")),
132
- getLeafColumns: C(() => [e._getOrderColumnsFn()], (f) => {
133
- var g;
134
- if ((g = m.columns) != null && g.length) {
135
- let c = m.columns.flatMap((S) => S.getLeafColumns());
136
- return f(c);
137
- }
138
- return [m];
139
- }, R(e.options, "debugColumns", "column.getLeafColumns"))
140
- };
141
- for (const f of e._features)
142
- f.createColumn == null || f.createColumn(m, e);
143
- return m;
144
- }
145
- s(_e, "createColumn");
146
- const V = "debugHeaders";
147
- function re(e, o, t) {
148
- var n;
149
- let i = {
150
- id: (n = t.id) != null ? n : o.id,
151
- column: o,
152
- index: t.index,
153
- isPlaceholder: !!t.isPlaceholder,
154
- placeholderId: t.placeholderId,
155
- depth: t.depth,
156
- subHeaders: [],
157
- colSpan: 0,
158
- rowSpan: 0,
159
- headerGroup: null,
160
- getLeafHeaders: /* @__PURE__ */ s(() => {
161
- const l = [], u = /* @__PURE__ */ s((a) => {
162
- a.subHeaders && a.subHeaders.length && a.subHeaders.map(u), l.push(a);
163
- }, "recurseHeader");
164
- return u(i), l;
165
- }, "getLeafHeaders"),
166
- getContext: /* @__PURE__ */ s(() => ({
167
- table: e,
168
- header: i,
169
- column: o
170
- }), "getContext")
171
- };
172
- return e._features.forEach((l) => {
173
- l.createHeader == null || l.createHeader(i, e);
174
- }), i;
175
- }
176
- s(re, "createHeader");
177
- const Fe = {
178
- createTable: /* @__PURE__ */ s((e) => {
179
- e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
180
- var i, l;
181
- const u = (i = n == null ? void 0 : n.map((m) => t.find((f) => f.id === m)).filter(Boolean)) != null ? i : [], a = (l = r == null ? void 0 : r.map((m) => t.find((f) => f.id === m)).filter(Boolean)) != null ? l : [], d = t.filter((m) => !(n != null && n.includes(m.id)) && !(r != null && r.includes(m.id)));
182
- return z(o, [...u, ...d, ...a], e);
183
- }, R(e.options, V, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), z(o, t, e, "center")), R(e.options, V, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
184
- var r;
185
- const i = (r = n == null ? void 0 : n.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
186
- return z(o, i, e, "left");
187
- }, R(e.options, V, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
188
- var r;
189
- const i = (r = n == null ? void 0 : n.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
190
- return z(o, i, e, "right");
191
- }, R(e.options, V, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, V, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, V, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, V, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, V, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, V, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, V, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, V, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, V, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
192
- var n;
193
- return !((n = t.subHeaders) != null && n.length);
194
- }), R(e.options, V, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
195
- var n;
196
- return !((n = t.subHeaders) != null && n.length);
197
- }), R(e.options, V, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
198
- var n;
199
- return !((n = t.subHeaders) != null && n.length);
200
- }), R(e.options, V, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
201
- var r, i, l, u, a, d;
202
- return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (d = n[0]) == null ? void 0 : d.headers) != null ? a : []].map((p) => p.getLeafHeaders()).flat();
203
- }, R(e.options, V, "getLeafHeaders"));
204
- }, "createTable")
205
- };
206
- function z(e, o, t, n) {
207
- var r, i;
208
- let l = 0;
209
- const u = /* @__PURE__ */ s(function(f, g) {
210
- g === void 0 && (g = 1), l = Math.max(l, g), f.filter((c) => c.getIsVisible()).forEach((c) => {
211
- var S;
212
- (S = c.columns) != null && S.length && u(c.columns, g + 1);
213
- }, 0);
214
- }, "findMaxDepth");
215
- u(e);
216
- let a = [];
217
- const d = /* @__PURE__ */ s((f, g) => {
218
- const c = {
219
- depth: g,
220
- id: [n, `${g}`].filter(Boolean).join("_"),
221
- headers: []
222
- }, S = [];
223
- f.forEach((h) => {
224
- const w = [...S].reverse()[0], v = h.column.depth === c.depth;
225
- let F, M = !1;
226
- if (v && h.column.parent ? F = h.column.parent : (F = h.column, M = !0), w && (w == null ? void 0 : w.column) === F)
227
- w.subHeaders.push(h);
228
- else {
229
- const $ = re(t, F, {
230
- id: [n, g, F.id, h == null ? void 0 : h.id].filter(Boolean).join("_"),
231
- isPlaceholder: M,
232
- placeholderId: M ? `${S.filter((_) => _.column === F).length}` : void 0,
233
- depth: g,
234
- index: S.length
235
- });
236
- $.subHeaders.push(h), S.push($);
237
- }
238
- c.headers.push(h), h.headerGroup = c;
239
- }), a.push(c), g > 0 && d(S, g - 1);
240
- }, "createHeaderGroup"), p = o.map((f, g) => re(t, f, {
241
- depth: l,
242
- index: g
243
- }));
244
- d(p, l - 1), a.reverse();
245
- const m = /* @__PURE__ */ s((f) => f.filter((c) => c.column.getIsVisible()).map((c) => {
246
- let S = 0, h = 0, w = [0];
247
- c.subHeaders && c.subHeaders.length ? (w = [], m(c.subHeaders).forEach((F) => {
248
- let {
249
- colSpan: M,
250
- rowSpan: $
251
- } = F;
252
- S += M, w.push($);
253
- })) : S = 1;
254
- const v = Math.min(...w);
255
- return h = h + v, c.colSpan = S, c.rowSpan = h, {
256
- colSpan: S,
257
- rowSpan: h
258
- };
259
- }), "recurseHeadersForSpans");
260
- return m((r = (i = a[0]) == null ? void 0 : i.headers) != null ? r : []), a;
261
- }
262
- s(z, "buildHeaderGroups");
263
- const q = /* @__PURE__ */ s((e, o, t, n, r, i, l) => {
264
- let u = {
265
- id: o,
266
- index: n,
267
- original: t,
268
- depth: r,
269
- parentId: l,
270
- _valuesCache: {},
271
- _uniqueValuesCache: {},
272
- getValue: /* @__PURE__ */ s((a) => {
273
- if (u._valuesCache.hasOwnProperty(a))
274
- return u._valuesCache[a];
275
- const d = e.getColumn(a);
276
- if (d != null && d.accessorFn)
277
- return u._valuesCache[a] = d.accessorFn(u.original, n), u._valuesCache[a];
278
- }, "getValue"),
279
- getUniqueValues: /* @__PURE__ */ s((a) => {
280
- if (u._uniqueValuesCache.hasOwnProperty(a))
281
- return u._uniqueValuesCache[a];
282
- const d = e.getColumn(a);
283
- if (d != null && d.accessorFn)
284
- return d.columnDef.getUniqueValues ? (u._uniqueValuesCache[a] = d.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[a]) : (u._uniqueValuesCache[a] = [u.getValue(a)], u._uniqueValuesCache[a]);
285
- }, "getUniqueValues"),
286
- renderValue: /* @__PURE__ */ s((a) => {
287
- var d;
288
- return (d = u.getValue(a)) != null ? d : e.options.renderFallbackValue;
289
- }, "renderValue"),
290
- subRows: i ?? [],
291
- getLeafRows: /* @__PURE__ */ s(() => le(u.subRows, (a) => a.subRows), "getLeafRows"),
292
- getParentRow: /* @__PURE__ */ s(() => u.parentId ? e.getRow(u.parentId, !0) : void 0, "getParentRow"),
293
- getParentRows: /* @__PURE__ */ s(() => {
294
- let a = [], d = u;
295
- for (; ; ) {
296
- const p = d.getParentRow();
297
- if (!p) break;
298
- a.push(p), d = p;
299
- }
300
- return a.reverse();
301
- }, "getParentRows"),
302
- getAllCells: C(() => [e.getAllLeafColumns()], (a) => a.map((d) => ve(e, u, d, d.id)), R(e.options, "debugRows", "getAllCells")),
303
- _getAllCellsByColumnId: C(() => [u.getAllCells()], (a) => a.reduce((d, p) => (d[p.column.id] = p, d), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
304
- };
305
- for (let a = 0; a < e._features.length; a++) {
306
- const d = e._features[a];
307
- d == null || d.createRow == null || d.createRow(u, e);
308
- }
309
- return u;
310
- }, "createRow"), $e = {
311
- createColumn: /* @__PURE__ */ s((e, o) => {
312
- e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
313
- if (e._getFacetedMinMaxValues)
314
- return e._getFacetedMinMaxValues();
315
- };
316
- }, "createColumn")
317
- }, se = /* @__PURE__ */ s((e, o, t) => {
318
- var n, r;
319
- const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
320
- return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
321
- }, "includesString");
322
- se.autoRemove = (e) => x(e);
323
- const ue = /* @__PURE__ */ s((e, o, t) => {
324
- var n;
325
- return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
326
- }, "includesStringSensitive");
327
- ue.autoRemove = (e) => x(e);
328
- const ge = /* @__PURE__ */ s((e, o, t) => {
329
- var n;
330
- return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
331
- }, "equalsString");
332
- ge.autoRemove = (e) => x(e);
333
- const ae = /* @__PURE__ */ s((e, o, t) => {
334
- var n;
335
- return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
336
- }, "arrIncludes");
337
- ae.autoRemove = (e) => x(e) || !(e != null && e.length);
338
- const de = /* @__PURE__ */ s((e, o, t) => !t.some((n) => {
339
- var r;
340
- return !((r = e.getValue(o)) != null && r.includes(n));
341
- }), "arrIncludesAll");
342
- de.autoRemove = (e) => x(e) || !(e != null && e.length);
343
- const fe = /* @__PURE__ */ s((e, o, t) => t.some((n) => {
344
- var r;
345
- return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
346
- }), "arrIncludesSome");
347
- fe.autoRemove = (e) => x(e) || !(e != null && e.length);
348
- const ce = /* @__PURE__ */ s((e, o, t) => e.getValue(o) === t, "equals");
349
- ce.autoRemove = (e) => x(e);
350
- const pe = /* @__PURE__ */ s((e, o, t) => e.getValue(o) == t, "weakEquals");
351
- pe.autoRemove = (e) => x(e);
352
- const ee = /* @__PURE__ */ s((e, o, t) => {
353
- let [n, r] = t;
354
- const i = e.getValue(o);
355
- return i >= n && i <= r;
356
- }, "inNumberRange");
357
- ee.resolveFilterValue = (e) => {
358
- let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
359
- if (i > l) {
360
- const u = i;
361
- i = l, l = u;
362
- }
363
- return [i, l];
364
- };
365
- ee.autoRemove = (e) => x(e) || x(e[0]) && x(e[1]);
366
- const I = {
367
- includesString: se,
368
- includesStringSensitive: ue,
369
- equalsString: ge,
370
- arrIncludes: ae,
371
- arrIncludesAll: de,
372
- arrIncludesSome: fe,
373
- equals: ce,
374
- weakEquals: pe,
375
- inNumberRange: ee
376
- };
377
- function x(e) {
378
- return e == null || e === "";
379
- }
380
- s(x, "testFalsey");
381
- const Ve = {
382
- getDefaultColumnDef: /* @__PURE__ */ s(() => ({
383
- filterFn: "auto"
384
- }), "getDefaultColumnDef"),
385
- getInitialState: /* @__PURE__ */ s((e) => ({
386
- columnFilters: [],
387
- ...e
388
- }), "getInitialState"),
389
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
390
- onColumnFiltersChange: P("columnFilters", e),
391
- filterFromLeafRows: !1,
392
- maxLeafRowFilterDepth: 100
393
- }), "getDefaultOptions"),
394
- createColumn: /* @__PURE__ */ s((e, o) => {
395
- e.getAutoFilterFn = () => {
396
- const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
397
- return typeof n == "string" ? I.includesString : typeof n == "number" ? I.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? I.equals : Array.isArray(n) ? I.arrIncludes : I.weakEquals;
398
- }, e.getFilterFn = () => {
399
- var t, n;
400
- return T(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
401
- // @ts-ignore
402
- (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : I[e.columnDef.filterFn]
403
- );
404
- }, e.getCanFilter = () => {
405
- var t, n, r;
406
- return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
407
- }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
408
- var t;
409
- return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
410
- }, e.getFilterIndex = () => {
411
- var t, n;
412
- return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
413
- }, e.setFilterValue = (t) => {
414
- o.setColumnFilters((n) => {
415
- const r = e.getFilterFn(), i = n == null ? void 0 : n.find((p) => p.id === e.id), l = E(t, i ? i.value : void 0);
416
- if (ie(r, l, e)) {
417
- var u;
418
- return (u = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? u : [];
419
- }
420
- const a = {
421
- id: e.id,
422
- value: l
423
- };
424
- if (i) {
425
- var d;
426
- return (d = n == null ? void 0 : n.map((p) => p.id === e.id ? a : p)) != null ? d : [];
427
- }
428
- return n != null && n.length ? [...n, a] : [a];
429
- });
430
- };
431
- }, "createColumn"),
432
- createRow: /* @__PURE__ */ s((e, o) => {
433
- e.columnFilters = {}, e.columnFiltersMeta = {};
434
- }, "createRow"),
435
- createTable: /* @__PURE__ */ s((e) => {
436
- e.setColumnFilters = (o) => {
437
- const t = e.getAllLeafColumns(), n = /* @__PURE__ */ s((r) => {
438
- var i;
439
- return (i = E(o, r)) == null ? void 0 : i.filter((l) => {
440
- const u = t.find((a) => a.id === l.id);
441
- if (u) {
442
- const a = u.getFilterFn();
443
- if (ie(a, l.value, u))
444
- return !1;
445
- }
446
- return !0;
447
- });
448
- }, "updateFn");
449
- e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
450
- }, e.resetColumnFilters = (o) => {
451
- var t, n;
452
- e.setColumnFilters(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
453
- }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
454
- }, "createTable")
455
- };
456
- function ie(e, o, t) {
457
- return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
458
- }
459
- s(ie, "shouldAutoRemoveFilter");
460
- const Me = /* @__PURE__ */ s((e, o, t) => t.reduce((n, r) => {
461
- const i = r.getValue(e);
462
- return n + (typeof i == "number" ? i : 0);
463
- }, 0), "sum"), Pe = /* @__PURE__ */ s((e, o, t) => {
464
- let n;
465
- return t.forEach((r) => {
466
- const i = r.getValue(e);
467
- i != null && (n > i || n === void 0 && i >= i) && (n = i);
468
- }), n;
469
- }, "min"), xe = /* @__PURE__ */ s((e, o, t) => {
470
- let n;
471
- return t.forEach((r) => {
472
- const i = r.getValue(e);
473
- i != null && (n < i || n === void 0 && i >= i) && (n = i);
474
- }), n;
475
- }, "max"), Ie = /* @__PURE__ */ s((e, o, t) => {
476
- let n, r;
477
- return t.forEach((i) => {
478
- const l = i.getValue(e);
479
- l != null && (n === void 0 ? l >= l && (n = r = l) : (n > l && (n = l), r < l && (r = l)));
480
- }), [n, r];
481
- }, "extent"), Ee = /* @__PURE__ */ s((e, o) => {
482
- let t = 0, n = 0;
483
- if (o.forEach((r) => {
484
- let i = r.getValue(e);
485
- i != null && (i = +i) >= i && (++t, n += i);
486
- }), t) return n / t;
487
- }, "mean"), ye = /* @__PURE__ */ s((e, o) => {
488
- if (!o.length)
489
- return;
490
- const t = o.map((i) => i.getValue(e));
491
- if (!he(t))
492
- return;
493
- if (t.length === 1)
494
- return t[0];
495
- const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
496
- return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
497
- }, "median"), De = /* @__PURE__ */ s((e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), "unique"), Ge = /* @__PURE__ */ s((e, o) => new Set(o.map((t) => t.getValue(e))).size, "uniqueCount"), He = /* @__PURE__ */ s((e, o) => o.length, "count"), N = {
498
- sum: Me,
499
- min: Pe,
500
- max: xe,
501
- extent: Ie,
502
- mean: Ee,
503
- median: ye,
504
- unique: De,
505
- uniqueCount: Ge,
506
- count: He
507
- }, Le = {
508
- getDefaultColumnDef: /* @__PURE__ */ s(() => ({
509
- aggregatedCell: /* @__PURE__ */ s((e) => {
510
- var o, t;
511
- return (o = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? o : null;
512
- }, "aggregatedCell"),
513
- aggregationFn: "auto"
514
- }), "getDefaultColumnDef"),
515
- getInitialState: /* @__PURE__ */ s((e) => ({
516
- grouping: [],
517
- ...e
518
- }), "getInitialState"),
519
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
520
- onGroupingChange: P("grouping", e),
521
- groupedColumnMode: "reorder"
522
- }), "getDefaultOptions"),
523
- createColumn: /* @__PURE__ */ s((e, o) => {
524
- e.toggleGrouping = () => {
525
- o.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
526
- }, e.getCanGroup = () => {
527
- var t, n;
528
- return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = o.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
529
- }, e.getIsGrouped = () => {
530
- var t;
531
- return (t = o.getState().grouping) == null ? void 0 : t.includes(e.id);
532
- }, e.getGroupedIndex = () => {
533
- var t;
534
- return (t = o.getState().grouping) == null ? void 0 : t.indexOf(e.id);
535
- }, e.getToggleGroupingHandler = () => {
536
- const t = e.getCanGroup();
537
- return () => {
538
- t && e.toggleGrouping();
539
- };
540
- }, e.getAutoAggregationFn = () => {
541
- const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
542
- if (typeof n == "number")
543
- return N.sum;
544
- if (Object.prototype.toString.call(n) === "[object Date]")
545
- return N.extent;
546
- }, e.getAggregationFn = () => {
547
- var t, n;
548
- if (!e)
549
- throw new Error();
550
- return T(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : N[e.columnDef.aggregationFn];
551
- };
552
- }, "createColumn"),
553
- createTable: /* @__PURE__ */ s((e) => {
554
- e.setGrouping = (o) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(o), e.resetGrouping = (o) => {
555
- var t, n;
556
- e.setGrouping(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
557
- }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
558
- }, "createTable"),
559
- createRow: /* @__PURE__ */ s((e, o) => {
560
- e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
561
- if (e._groupingValuesCache.hasOwnProperty(t))
562
- return e._groupingValuesCache[t];
563
- const n = o.getColumn(t);
564
- return n != null && n.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = n.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
565
- }, e._groupingValuesCache = {};
566
- }, "createRow"),
567
- createCell: /* @__PURE__ */ s((e, o, t, n) => {
568
- e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
569
- var r;
570
- return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((r = t.subRows) != null && r.length);
571
- };
572
- }, "createCell")
573
- };
574
- function Ae(e, o, t) {
575
- if (!(o != null && o.length) || !t)
576
- return e;
577
- const n = e.filter((i) => !o.includes(i.id));
578
- return t === "remove" ? n : [...o.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...n];
579
- }
580
- s(Ae, "orderColumns");
581
- const ze = {
582
- getInitialState: /* @__PURE__ */ s((e) => ({
583
- columnOrder: [],
584
- ...e
585
- }), "getInitialState"),
586
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
587
- onColumnOrderChange: P("columnOrder", e)
588
- }), "getDefaultOptions"),
589
- createColumn: /* @__PURE__ */ s((e, o) => {
590
- e.getIndex = C((t) => [L(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
591
- var n;
592
- return ((n = L(o, t)[0]) == null ? void 0 : n.id) === e.id;
593
- }, e.getIsLastColumn = (t) => {
594
- var n;
595
- const r = L(o, t);
596
- return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
597
- };
598
- }, "createColumn"),
599
- createTable: /* @__PURE__ */ s((e) => {
600
- e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
601
- var t;
602
- e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
603
- }, e._getOrderColumnsFn = C(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
604
- let i = [];
605
- if (!(o != null && o.length))
606
- i = r;
607
- else {
608
- const l = [...o], u = [...r];
609
- for (; u.length && l.length; ) {
610
- const a = l.shift(), d = u.findIndex((p) => p.id === a);
611
- d > -1 && i.push(u.splice(d, 1)[0]);
612
- }
613
- i = [...i, ...u];
614
- }
615
- return Ae(i, t, n);
616
- }, R(e.options, "debugTable", "_getOrderColumnsFn"));
617
- }, "createTable")
618
- }, k = /* @__PURE__ */ s(() => ({
619
- left: [],
620
- right: []
621
- }), "getDefaultColumnPinningState"), Oe = {
622
- getInitialState: /* @__PURE__ */ s((e) => ({
623
- columnPinning: k(),
624
- ...e
625
- }), "getInitialState"),
626
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
627
- onColumnPinningChange: P("columnPinning", e)
628
- }), "getDefaultOptions"),
629
- createColumn: /* @__PURE__ */ s((e, o) => {
630
- e.pin = (t) => {
631
- const n = e.getLeafColumns().map((r) => r.id).filter(Boolean);
632
- o.setColumnPinning((r) => {
633
- var i, l;
634
- if (t === "right") {
635
- var u, a;
636
- return {
637
- left: ((u = r == null ? void 0 : r.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))),
638
- right: [...((a = r == null ? void 0 : r.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
639
- };
640
- }
641
- if (t === "left") {
642
- var d, p;
643
- return {
644
- left: [...((d = r == null ? void 0 : r.left) != null ? d : []).filter((m) => !(n != null && n.includes(m))), ...n],
645
- right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((m) => !(n != null && n.includes(m)))
646
- };
647
- }
648
- return {
649
- left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((m) => !(n != null && n.includes(m))),
650
- right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((m) => !(n != null && n.includes(m)))
651
- };
652
- });
653
- }, e.getCanPin = () => e.getLeafColumns().some((n) => {
654
- var r, i, l;
655
- return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((i = (l = o.options.enableColumnPinning) != null ? l : o.options.enablePinning) != null ? i : !0);
656
- }), e.getIsPinned = () => {
657
- const t = e.getLeafColumns().map((u) => u.id), {
658
- left: n,
659
- right: r
660
- } = o.getState().columnPinning, i = t.some((u) => n == null ? void 0 : n.includes(u)), l = t.some((u) => r == null ? void 0 : r.includes(u));
661
- return i ? "left" : l ? "right" : !1;
662
- }, e.getPinnedIndex = () => {
663
- var t, n;
664
- const r = e.getIsPinned();
665
- return r ? (t = (n = o.getState().columnPinning) == null || (n = n[r]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
666
- };
667
- }, "createColumn"),
668
- createRow: /* @__PURE__ */ s((e, o) => {
669
- e.getCenterVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
670
- const i = [...n ?? [], ...r ?? []];
671
- return t.filter((l) => !i.includes(l.column.id));
672
- }, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
673
- ...i,
674
- position: "left"
675
- })), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = C(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
676
- ...i,
677
- position: "right"
678
- })), R(o.options, "debugRows", "getRightVisibleCells"));
679
- }, "createRow"),
680
- createTable: /* @__PURE__ */ s((e) => {
681
- e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
682
- var t, n;
683
- return e.setColumnPinning(o ? k() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : k());
684
- }, e.getIsSomeColumnsPinned = (o) => {
685
- var t;
686
- const n = e.getState().columnPinning;
687
- if (!o) {
688
- var r, i;
689
- return !!((r = n.left) != null && r.length || (i = n.right) != null && i.length);
690
- }
691
- return !!((t = n[o]) != null && t.length);
692
- }, e.getLeftLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = C(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
693
- const r = [...t ?? [], ...n ?? []];
694
- return o.filter((i) => !r.includes(i.id));
695
- }, R(e.options, "debugColumns", "getCenterLeafColumns"));
696
- }, "createTable")
697
- }, O = {
698
- size: 150,
699
- minSize: 20,
700
- maxSize: Number.MAX_SAFE_INTEGER
701
- }, U = /* @__PURE__ */ s(() => ({
702
- startOffset: null,
703
- startSize: null,
704
- deltaOffset: null,
705
- deltaPercentage: null,
706
- isResizingColumn: !1,
707
- columnSizingStart: []
708
- }), "getDefaultColumnSizingInfoState"), Be = {
709
- getDefaultColumnDef: /* @__PURE__ */ s(() => O, "getDefaultColumnDef"),
710
- getInitialState: /* @__PURE__ */ s((e) => ({
711
- columnSizing: {},
712
- columnSizingInfo: U(),
713
- ...e
714
- }), "getInitialState"),
715
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
716
- columnResizeMode: "onEnd",
717
- columnResizeDirection: "ltr",
718
- onColumnSizingChange: P("columnSizing", e),
719
- onColumnSizingInfoChange: P("columnSizingInfo", e)
720
- }), "getDefaultOptions"),
721
- createColumn: /* @__PURE__ */ s((e, o) => {
722
- e.getSize = () => {
723
- var t, n, r;
724
- const i = o.getState().columnSizing[e.id];
725
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : O.minSize, (n = i ?? e.columnDef.size) != null ? n : O.size), (r = e.columnDef.maxSize) != null ? r : O.maxSize);
726
- }, e.getStart = C((t) => [t, L(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), R(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, L(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), R(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
727
- o.setColumnSizing((t) => {
728
- let {
729
- [e.id]: n,
730
- ...r
731
- } = t;
732
- return r;
733
- });
734
- }, e.getCanResize = () => {
735
- var t, n;
736
- return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = o.options.enableColumnResizing) != null ? n : !0);
737
- }, e.getIsResizing = () => o.getState().columnSizingInfo.isResizingColumn === e.id;
738
- }, "createColumn"),
739
- createHeader: /* @__PURE__ */ s((e, o) => {
740
- e.getSize = () => {
741
- let t = 0;
742
- const n = /* @__PURE__ */ s((r) => {
743
- if (r.subHeaders.length)
744
- r.subHeaders.forEach(n);
745
- else {
746
- var i;
747
- t += (i = r.column.getSize()) != null ? i : 0;
748
- }
749
- }, "recurse");
750
- return n(e), t;
751
- }, e.getStart = () => {
752
- if (e.index > 0) {
753
- const t = e.headerGroup.headers[e.index - 1];
754
- return t.getStart() + t.getSize();
755
- }
756
- return 0;
757
- }, e.getResizeHandler = (t) => {
758
- const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
759
- return (i) => {
760
- if (!n || !r || (i.persist == null || i.persist(), j(i) && i.touches && i.touches.length > 1))
761
- return;
762
- const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = j(i) ? Math.round(i.touches[0].clientX) : i.clientX, d = {}, p = /* @__PURE__ */ s((w, v) => {
763
- typeof v == "number" && (o.setColumnSizingInfo((F) => {
764
- var M, $;
765
- const _ = o.options.columnResizeDirection === "rtl" ? -1 : 1, D = (v - ((M = F == null ? void 0 : F.startOffset) != null ? M : 0)) * _, G = Math.max(D / (($ = F == null ? void 0 : F.startSize) != null ? $ : 0), -0.999999);
766
- return F.columnSizingStart.forEach((A) => {
767
- let [Re, oe] = A;
768
- d[Re] = Math.round(Math.max(oe + oe * G, 0) * 100) / 100;
769
- }), {
770
- ...F,
771
- deltaOffset: D,
772
- deltaPercentage: G
773
- };
774
- }), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((F) => ({
775
- ...F,
776
- ...d
777
- })));
778
- }, "updateOffset"), m = /* @__PURE__ */ s((w) => p("move", w), "onMove"), f = /* @__PURE__ */ s((w) => {
779
- p("end", w), o.setColumnSizingInfo((v) => ({
780
- ...v,
781
- isResizingColumn: !1,
782
- startOffset: null,
783
- startSize: null,
784
- deltaOffset: null,
785
- deltaPercentage: null,
786
- columnSizingStart: []
787
- }));
788
- }, "onEnd"), g = t || typeof document < "u" ? document : null, c = {
789
- moveHandler: /* @__PURE__ */ s((w) => m(w.clientX), "moveHandler"),
790
- upHandler: /* @__PURE__ */ s((w) => {
791
- g == null || g.removeEventListener("mousemove", c.moveHandler), g == null || g.removeEventListener("mouseup", c.upHandler), f(w.clientX);
792
- }, "upHandler")
793
- }, S = {
794
- moveHandler: /* @__PURE__ */ s((w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1), "moveHandler"),
795
- upHandler: /* @__PURE__ */ s((w) => {
796
- var v;
797
- g == null || g.removeEventListener("touchmove", S.moveHandler), g == null || g.removeEventListener("touchend", S.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), f((v = w.touches[0]) == null ? void 0 : v.clientX);
798
- }, "upHandler")
799
- }, h = Te() ? {
800
- passive: !1
801
- } : !1;
802
- j(i) ? (g == null || g.addEventListener("touchmove", S.moveHandler, h), g == null || g.addEventListener("touchend", S.upHandler, h)) : (g == null || g.addEventListener("mousemove", c.moveHandler, h), g == null || g.addEventListener("mouseup", c.upHandler, h)), o.setColumnSizingInfo((w) => ({
803
- ...w,
804
- startOffset: a,
805
- startSize: l,
806
- deltaOffset: 0,
807
- deltaPercentage: 0,
808
- columnSizingStart: u,
809
- isResizingColumn: n.id
810
- }));
811
- };
812
- };
813
- }, "createHeader"),
814
- createTable: /* @__PURE__ */ s((e) => {
815
- e.setColumnSizing = (o) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(o), e.setColumnSizingInfo = (o) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(o), e.resetColumnSizing = (o) => {
816
- var t;
817
- e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
818
- }, e.resetHeaderSizeInfo = (o) => {
819
- var t;
820
- e.setColumnSizingInfo(o ? U() : (t = e.initialState.columnSizingInfo) != null ? t : U());
821
- }, e.getTotalSize = () => {
822
- var o, t;
823
- return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
824
- }, e.getLeftTotalSize = () => {
825
- var o, t;
826
- return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
827
- }, e.getCenterTotalSize = () => {
828
- var o, t;
829
- return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
830
- }, e.getRightTotalSize = () => {
831
- var o, t;
832
- return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
833
- };
834
- }, "createTable")
835
- };
836
- let B = null;
837
- function Te() {
838
- if (typeof B == "boolean") return B;
839
- let e = !1;
840
- try {
841
- const o = {
842
- get passive() {
843
- return e = !0, !1;
844
- }
845
- }, t = /* @__PURE__ */ s(() => {
846
- }, "noop");
847
- window.addEventListener("test", t, o), window.removeEventListener("test", t);
848
- } catch {
849
- e = !1;
850
- }
851
- return B = e, B;
852
- }
853
- s(Te, "passiveEventSupported");
854
- function j(e) {
855
- return e.type === "touchstart";
856
- }
857
- s(j, "isTouchStartEvent");
858
- const qe = {
859
- getInitialState: /* @__PURE__ */ s((e) => ({
860
- columnVisibility: {},
861
- ...e
862
- }), "getInitialState"),
863
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
864
- onColumnVisibilityChange: P("columnVisibility", e)
865
- }), "getDefaultOptions"),
866
- createColumn: /* @__PURE__ */ s((e, o) => {
867
- e.toggleVisibility = (t) => {
868
- e.getCanHide() && o.setColumnVisibility((n) => ({
869
- ...n,
870
- [e.id]: t ?? !e.getIsVisible()
871
- }));
872
- }, e.getIsVisible = () => {
873
- var t, n;
874
- const r = e.columns;
875
- return (t = r.length ? r.some((i) => i.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
876
- }, e.getCanHide = () => {
877
- var t, n;
878
- return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
879
- }, e.getToggleVisibilityHandler = () => (t) => {
880
- e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
881
- };
882
- }, "createColumn"),
883
- createRow: /* @__PURE__ */ s((e, o) => {
884
- e._getAllVisibleCells = C(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), R(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = C(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], R(o.options, "debugRows", "getVisibleCells"));
885
- }, "createRow"),
886
- createTable: /* @__PURE__ */ s((e) => {
887
- const o = /* @__PURE__ */ s((t, n) => C(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), R(e.options, "debugColumns", t)), "makeVisibleColumnsMethod");
888
- e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
889
- var n;
890
- e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
891
- }, e.toggleAllColumnsVisible = (t) => {
892
- var n;
893
- t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((r, i) => ({
894
- ...r,
895
- [i.id]: t || !(i.getCanHide != null && i.getCanHide())
896
- }), {}));
897
- }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
898
- var n;
899
- e.toggleAllColumnsVisible((n = t.target) == null ? void 0 : n.checked);
900
- };
901
- }, "createTable")
902
- };
903
- function L(e, o) {
904
- return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
905
- }
906
- s(L, "_getVisibleLeafColumns");
907
- const Ne = {
908
- createTable: /* @__PURE__ */ s((e) => {
909
- e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
910
- if (e._getGlobalFacetedMinMaxValues)
911
- return e._getGlobalFacetedMinMaxValues();
912
- };
913
- }, "createTable")
914
- }, ke = {
915
- getInitialState: /* @__PURE__ */ s((e) => ({
916
- globalFilter: void 0,
917
- ...e
918
- }), "getInitialState"),
919
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
920
- onGlobalFilterChange: P("globalFilter", e),
921
- globalFilterFn: "auto",
922
- getColumnCanGlobalFilter: /* @__PURE__ */ s((o) => {
923
- var t;
924
- const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[o.id]) == null ? void 0 : t.getValue();
925
- return typeof n == "string" || typeof n == "number";
926
- }, "getColumnCanGlobalFilter")
927
- }), "getDefaultOptions"),
928
- createColumn: /* @__PURE__ */ s((e, o) => {
929
- e.getCanGlobalFilter = () => {
930
- var t, n, r, i;
931
- return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && ((i = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? i : !0) && !!e.accessorFn;
932
- };
933
- }, "createColumn"),
934
- createTable: /* @__PURE__ */ s((e) => {
935
- e.getGlobalAutoFilterFn = () => I.includesString, e.getGlobalFilterFn = () => {
936
- var o, t;
937
- const {
938
- globalFilterFn: n
939
- } = e.options;
940
- return T(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : I[n];
941
- }, e.setGlobalFilter = (o) => {
942
- e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
943
- }, e.resetGlobalFilter = (o) => {
944
- e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
945
- };
946
- }, "createTable")
947
- }, Ue = {
948
- getInitialState: /* @__PURE__ */ s((e) => ({
949
- expanded: {},
950
- ...e
951
- }), "getInitialState"),
952
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
953
- onExpandedChange: P("expanded", e),
954
- paginateExpandedRows: !0
955
- }), "getDefaultOptions"),
956
- createTable: /* @__PURE__ */ s((e) => {
957
- let o = !1, t = !1;
958
- e._autoResetExpanded = () => {
959
- var n, r;
960
- if (!o) {
961
- e._queue(() => {
962
- o = !0;
963
- });
964
- return;
965
- }
966
- if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
967
- if (t) return;
968
- t = !0, e._queue(() => {
969
- e.resetExpanded(), t = !1;
970
- });
971
- }
972
- }, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
973
- n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
974
- }, e.resetExpanded = (n) => {
975
- var r, i;
976
- e.setExpanded(n ? {} : (r = (i = e.initialState) == null ? void 0 : i.expanded) != null ? r : {});
977
- }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
978
- n.persist == null || n.persist(), e.toggleAllRowsExpanded();
979
- }, e.getIsSomeRowsExpanded = () => {
980
- const n = e.getState().expanded;
981
- return n === !0 || Object.values(n).some(Boolean);
982
- }, e.getIsAllRowsExpanded = () => {
983
- const n = e.getState().expanded;
984
- return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((r) => !r.getIsExpanded()));
985
- }, e.getExpandedDepth = () => {
986
- let n = 0;
987
- return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((i) => {
988
- const l = i.split(".");
989
- n = Math.max(n, l.length);
990
- }), n;
991
- }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
992
- }, "createTable"),
993
- createRow: /* @__PURE__ */ s((e, o) => {
994
- e.toggleExpanded = (t) => {
995
- o.setExpanded((n) => {
996
- var r;
997
- const i = n === !0 ? !0 : !!(n != null && n[e.id]);
998
- let l = {};
999
- if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((u) => {
1000
- l[u] = !0;
1001
- }) : l = n, t = (r = t) != null ? r : !i, !i && t)
1002
- return {
1003
- ...l,
1004
- [e.id]: !0
1005
- };
1006
- if (i && !t) {
1007
- const {
1008
- [e.id]: u,
1009
- ...a
1010
- } = l;
1011
- return a;
1012
- }
1013
- return n;
1014
- });
1015
- }, e.getIsExpanded = () => {
1016
- var t;
1017
- const n = o.getState().expanded;
1018
- return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n != null && n[e.id]);
1019
- }, e.getCanExpand = () => {
1020
- var t, n, r;
1021
- return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((r = e.subRows) != null && r.length);
1022
- }, e.getIsAllParentsExpanded = () => {
1023
- let t = !0, n = e;
1024
- for (; t && n.parentId; )
1025
- n = o.getRow(n.parentId, !0), t = n.getIsExpanded();
1026
- return t;
1027
- }, e.getToggleExpandedHandler = () => {
1028
- const t = e.getCanExpand();
1029
- return () => {
1030
- t && e.toggleExpanded();
1031
- };
1032
- };
1033
- }, "createRow")
1034
- }, Q = 0, W = 10, X = /* @__PURE__ */ s(() => ({
1035
- pageIndex: Q,
1036
- pageSize: W
1037
- }), "getDefaultPaginationState"), je = {
1038
- getInitialState: /* @__PURE__ */ s((e) => ({
1039
- ...e,
1040
- pagination: {
1041
- ...X(),
1042
- ...e == null ? void 0 : e.pagination
1043
- }
1044
- }), "getInitialState"),
1045
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
1046
- onPaginationChange: P("pagination", e)
1047
- }), "getDefaultOptions"),
1048
- createTable: /* @__PURE__ */ s((e) => {
1049
- let o = !1, t = !1;
1050
- e._autoResetPageIndex = () => {
1051
- var n, r;
1052
- if (!o) {
1053
- e._queue(() => {
1054
- o = !0;
1055
- });
1056
- return;
1057
- }
1058
- if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1059
- if (t) return;
1060
- t = !0, e._queue(() => {
1061
- e.resetPageIndex(), t = !1;
1062
- });
1063
- }
1064
- }, e.setPagination = (n) => {
1065
- const r = /* @__PURE__ */ s((i) => E(n, i), "safeUpdater");
1066
- return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1067
- }, e.resetPagination = (n) => {
1068
- var r;
1069
- e.setPagination(n ? X() : (r = e.initialState.pagination) != null ? r : X());
1070
- }, e.setPageIndex = (n) => {
1071
- e.setPagination((r) => {
1072
- let i = E(n, r.pageIndex);
1073
- const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1074
- return i = Math.max(0, Math.min(i, l)), {
1075
- ...r,
1076
- pageIndex: i
1077
- };
1078
- });
1079
- }, e.resetPageIndex = (n) => {
1080
- var r, i;
1081
- e.setPageIndex(n ? Q : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Q);
1082
- }, e.resetPageSize = (n) => {
1083
- var r, i;
1084
- e.setPageSize(n ? W : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : W);
1085
- }, e.setPageSize = (n) => {
1086
- e.setPagination((r) => {
1087
- const i = Math.max(1, E(n, r.pageSize)), l = r.pageSize * r.pageIndex, u = Math.floor(l / i);
1088
- return {
1089
- ...r,
1090
- pageIndex: u,
1091
- pageSize: i
1092
- };
1093
- });
1094
- }, e.setPageCount = (n) => e.setPagination((r) => {
1095
- var i;
1096
- let l = E(n, (i = e.options.pageCount) != null ? i : -1);
1097
- return typeof l == "number" && (l = Math.max(-1, l)), {
1098
- ...r,
1099
- pageCount: l
1100
- };
1101
- }), e.getPageOptions = C(() => [e.getPageCount()], (n) => {
1102
- let r = [];
1103
- return n && n > 0 && (r = [...new Array(n)].fill(null).map((i, l) => l)), r;
1104
- }, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1105
- const {
1106
- pageIndex: n
1107
- } = e.getState().pagination, r = e.getPageCount();
1108
- return r === -1 ? !0 : r === 0 ? !1 : n < r - 1;
1109
- }, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
1110
- var n;
1111
- return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
1112
- }, e.getRowCount = () => {
1113
- var n;
1114
- return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1115
- };
1116
- }, "createTable")
1117
- }, K = /* @__PURE__ */ s(() => ({
1118
- top: [],
1119
- bottom: []
1120
- }), "getDefaultRowPinningState"), Xe = {
1121
- getInitialState: /* @__PURE__ */ s((e) => ({
1122
- rowPinning: K(),
1123
- ...e
1124
- }), "getInitialState"),
1125
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
1126
- onRowPinningChange: P("rowPinning", e)
1127
- }), "getDefaultOptions"),
1128
- createRow: /* @__PURE__ */ s((e, o) => {
1129
- e.pin = (t, n, r) => {
1130
- const i = n ? e.getLeafRows().map((a) => {
1131
- let {
1132
- id: d
1133
- } = a;
1134
- return d;
1135
- }) : [], l = r ? e.getParentRows().map((a) => {
1136
- let {
1137
- id: d
1138
- } = a;
1139
- return d;
1140
- }) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
1141
- o.setRowPinning((a) => {
1142
- var d, p;
1143
- if (t === "bottom") {
1144
- var m, f;
1145
- return {
1146
- top: ((m = a == null ? void 0 : a.top) != null ? m : []).filter((S) => !(u != null && u.has(S))),
1147
- bottom: [...((f = a == null ? void 0 : a.bottom) != null ? f : []).filter((S) => !(u != null && u.has(S))), ...Array.from(u)]
1148
- };
1149
- }
1150
- if (t === "top") {
1151
- var g, c;
1152
- return {
1153
- top: [...((g = a == null ? void 0 : a.top) != null ? g : []).filter((S) => !(u != null && u.has(S))), ...Array.from(u)],
1154
- bottom: ((c = a == null ? void 0 : a.bottom) != null ? c : []).filter((S) => !(u != null && u.has(S)))
1155
- };
1156
- }
1157
- return {
1158
- top: ((d = a == null ? void 0 : a.top) != null ? d : []).filter((S) => !(u != null && u.has(S))),
1159
- bottom: ((p = a == null ? void 0 : a.bottom) != null ? p : []).filter((S) => !(u != null && u.has(S)))
1160
- };
1161
- });
1162
- }, e.getCanPin = () => {
1163
- var t;
1164
- const {
1165
- enableRowPinning: n,
1166
- enablePinning: r
1167
- } = o.options;
1168
- return typeof n == "function" ? n(e) : (t = n ?? r) != null ? t : !0;
1169
- }, e.getIsPinned = () => {
1170
- const t = [e.id], {
1171
- top: n,
1172
- bottom: r
1173
- } = o.getState().rowPinning, i = t.some((u) => n == null ? void 0 : n.includes(u)), l = t.some((u) => r == null ? void 0 : r.includes(u));
1174
- return i ? "top" : l ? "bottom" : !1;
1175
- }, e.getPinnedIndex = () => {
1176
- var t, n;
1177
- const r = e.getIsPinned();
1178
- if (!r) return -1;
1179
- const i = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((l) => {
1180
- let {
1181
- id: u
1182
- } = l;
1183
- return u;
1184
- });
1185
- return (n = i == null ? void 0 : i.indexOf(e.id)) != null ? n : -1;
1186
- };
1187
- }, "createRow"),
1188
- createTable: /* @__PURE__ */ s((e) => {
1189
- e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1190
- var t, n;
1191
- return e.setRowPinning(o ? K() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : K());
1192
- }, e.getIsSomeRowsPinned = (o) => {
1193
- var t;
1194
- const n = e.getState().rowPinning;
1195
- if (!o) {
1196
- var r, i;
1197
- return !!((r = n.top) != null && r.length || (i = n.bottom) != null && i.length);
1198
- }
1199
- return !!((t = n[o]) != null && t.length);
1200
- }, e._getPinnedRows = (o, t, n) => {
1201
- var r;
1202
- return ((r = e.options.keepPinnedRows) == null || r ? (
1203
- //get all rows that are pinned even if they would not be otherwise visible
1204
- //account for expanded parent rows, but not pagination or filtering
1205
- (t ?? []).map((l) => {
1206
- const u = e.getRow(l, !0);
1207
- return u.getIsAllParentsExpanded() ? u : null;
1208
- })
1209
- ) : (
1210
- //else get only visible rows that are pinned
1211
- (t ?? []).map((l) => o.find((u) => u.id === l))
1212
- )).filter(Boolean).map((l) => ({
1213
- ...l,
1214
- position: n
1215
- }));
1216
- }, e.getTopRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = C(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1217
- const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1218
- return o.filter((i) => !r.has(i.id));
1219
- }, R(e.options, "debugRows", "getCenterRows"));
1220
- }, "createTable")
1221
- }, Ke = {
1222
- getInitialState: /* @__PURE__ */ s((e) => ({
1223
- rowSelection: {},
1224
- ...e
1225
- }), "getInitialState"),
1226
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
1227
- onRowSelectionChange: P("rowSelection", e),
1228
- enableRowSelection: !0,
1229
- enableMultiRowSelection: !0,
1230
- enableSubRowSelection: !0
1231
- // enableGroupingRowSelection: false,
1232
- // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
1233
- // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1234
- }), "getDefaultOptions"),
1235
- createTable: /* @__PURE__ */ s((e) => {
1236
- e.setRowSelection = (o) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(o), e.resetRowSelection = (o) => {
1237
- var t;
1238
- return e.setRowSelection(o ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1239
- }, e.toggleAllRowsSelected = (o) => {
1240
- e.setRowSelection((t) => {
1241
- o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
1242
- const n = {
1243
- ...t
1244
- }, r = e.getPreGroupedRowModel().flatRows;
1245
- return o ? r.forEach((i) => {
1246
- i.getCanSelect() && (n[i.id] = !0);
1247
- }) : r.forEach((i) => {
1248
- delete n[i.id];
1249
- }), n;
1250
- });
1251
- }, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
1252
- const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = {
1253
- ...t
1254
- };
1255
- return e.getRowModel().rows.forEach((i) => {
1256
- Y(r, i.id, n, !0, e);
1257
- }), r;
1258
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? J(e, t) : {
1259
- rows: [],
1260
- flatRows: [],
1261
- rowsById: {}
1262
- }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? J(e, t) : {
1263
- rows: [],
1264
- flatRows: [],
1265
- rowsById: {}
1266
- }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? J(e, t) : {
1267
- rows: [],
1268
- flatRows: [],
1269
- rowsById: {}
1270
- }, R(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1271
- const o = e.getFilteredRowModel().flatRows, {
1272
- rowSelection: t
1273
- } = e.getState();
1274
- let n = !!(o.length && Object.keys(t).length);
1275
- return n && o.some((r) => r.getCanSelect() && !t[r.id]) && (n = !1), n;
1276
- }, e.getIsAllPageRowsSelected = () => {
1277
- const o = e.getPaginationRowModel().flatRows.filter((r) => r.getCanSelect()), {
1278
- rowSelection: t
1279
- } = e.getState();
1280
- let n = !!o.length;
1281
- return n && o.some((r) => !t[r.id]) && (n = !1), n;
1282
- }, e.getIsSomeRowsSelected = () => {
1283
- var o;
1284
- const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
1285
- return t > 0 && t < e.getFilteredRowModel().flatRows.length;
1286
- }, e.getIsSomePageRowsSelected = () => {
1287
- const o = e.getPaginationRowModel().flatRows;
1288
- return e.getIsAllPageRowsSelected() ? !1 : o.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1289
- }, e.getToggleAllRowsSelectedHandler = () => (o) => {
1290
- e.toggleAllRowsSelected(o.target.checked);
1291
- }, e.getToggleAllPageRowsSelectedHandler = () => (o) => {
1292
- e.toggleAllPageRowsSelected(o.target.checked);
1293
- };
1294
- }, "createTable"),
1295
- createRow: /* @__PURE__ */ s((e, o) => {
1296
- e.toggleSelected = (t, n) => {
1297
- const r = e.getIsSelected();
1298
- o.setRowSelection((i) => {
1299
- var l;
1300
- if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1301
- return i;
1302
- const u = {
1303
- ...i
1304
- };
1305
- return Y(u, e.id, t, (l = n == null ? void 0 : n.selectChildren) != null ? l : !0, o), u;
1306
- });
1307
- }, e.getIsSelected = () => {
1308
- const {
1309
- rowSelection: t
1310
- } = o.getState();
1311
- return te(e, t);
1312
- }, e.getIsSomeSelected = () => {
1313
- const {
1314
- rowSelection: t
1315
- } = o.getState();
1316
- return Z(e, t) === "some";
1317
- }, e.getIsAllSubRowsSelected = () => {
1318
- const {
1319
- rowSelection: t
1320
- } = o.getState();
1321
- return Z(e, t) === "all";
1322
- }, e.getCanSelect = () => {
1323
- var t;
1324
- return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
1325
- }, e.getCanSelectSubRows = () => {
1326
- var t;
1327
- return typeof o.options.enableSubRowSelection == "function" ? o.options.enableSubRowSelection(e) : (t = o.options.enableSubRowSelection) != null ? t : !0;
1328
- }, e.getCanMultiSelect = () => {
1329
- var t;
1330
- return typeof o.options.enableMultiRowSelection == "function" ? o.options.enableMultiRowSelection(e) : (t = o.options.enableMultiRowSelection) != null ? t : !0;
1331
- }, e.getToggleSelectedHandler = () => {
1332
- const t = e.getCanSelect();
1333
- return (n) => {
1334
- var r;
1335
- t && e.toggleSelected((r = n.target) == null ? void 0 : r.checked);
1336
- };
1337
- };
1338
- }, "createRow")
1339
- }, Y = /* @__PURE__ */ s((e, o, t, n, r) => {
1340
- var i;
1341
- const l = r.getRow(o, !0);
1342
- t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => Y(e, u.id, t, n, r));
1343
- }, "mutateRowIsSelected");
1344
- function J(e, o) {
1345
- const t = e.getState().rowSelection, n = [], r = {}, i = /* @__PURE__ */ s(function(l, u) {
1346
- return l.map((a) => {
1347
- var d;
1348
- const p = te(a, t);
1349
- if (p && (n.push(a), r[a.id] = a), (d = a.subRows) != null && d.length && (a = {
1350
- ...a,
1351
- subRows: i(a.subRows)
1352
- }), p)
1353
- return a;
1354
- }).filter(Boolean);
1355
- }, "recurseRows");
1356
- return {
1357
- rows: i(o.rows),
1358
- flatRows: n,
1359
- rowsById: r
1360
- };
1361
- }
1362
- s(J, "selectRowsFn");
1363
- function te(e, o) {
1364
- var t;
1365
- return (t = o[e.id]) != null ? t : !1;
1366
- }
1367
- s(te, "isRowSelected");
1368
- function Z(e, o, t) {
1369
- var n;
1370
- if (!((n = e.subRows) != null && n.length)) return !1;
1371
- let r = !0, i = !1;
1372
- return e.subRows.forEach((l) => {
1373
- if (!(i && !r) && (l.getCanSelect() && (te(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
1374
- const u = Z(l, o);
1375
- u === "all" ? i = !0 : (u === "some" && (i = !0), r = !1);
1376
- }
1377
- }), r ? "all" : i ? "some" : !1;
1378
- }
1379
- s(Z, "isSubRowSelected");
1380
- const b = /([0-9]+)/gm, Je = /* @__PURE__ */ s((e, o, t) => Se(y(e.getValue(t)).toLowerCase(), y(o.getValue(t)).toLowerCase()), "alphanumeric"), Qe = /* @__PURE__ */ s((e, o, t) => Se(y(e.getValue(t)), y(o.getValue(t))), "alphanumericCaseSensitive"), We = /* @__PURE__ */ s((e, o, t) => ne(y(e.getValue(t)).toLowerCase(), y(o.getValue(t)).toLowerCase()), "text"), Ye = /* @__PURE__ */ s((e, o, t) => ne(y(e.getValue(t)), y(o.getValue(t))), "textCaseSensitive"), Ze = /* @__PURE__ */ s((e, o, t) => {
1381
- const n = e.getValue(t), r = o.getValue(t);
1382
- return n > r ? 1 : n < r ? -1 : 0;
1383
- }, "datetime"), be = /* @__PURE__ */ s((e, o, t) => ne(e.getValue(t), o.getValue(t)), "basic");
1384
- function ne(e, o) {
1385
- return e === o ? 0 : e > o ? 1 : -1;
1386
- }
1387
- s(ne, "compareBasic");
1388
- function y(e) {
1389
- return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1390
- }
1391
- s(y, "toString");
1392
- function Se(e, o) {
1393
- const t = e.split(b).filter(Boolean), n = o.split(b).filter(Boolean);
1394
- for (; t.length && n.length; ) {
1395
- const r = t.shift(), i = n.shift(), l = parseInt(r, 10), u = parseInt(i, 10), a = [l, u].sort();
1396
- if (isNaN(a[0])) {
1397
- if (r > i)
1398
- return 1;
1399
- if (i > r)
1400
- return -1;
1401
- continue;
1402
- }
1403
- if (isNaN(a[1]))
1404
- return isNaN(l) ? -1 : 1;
1405
- if (l > u)
1406
- return 1;
1407
- if (u > l)
1408
- return -1;
1409
- }
1410
- return t.length - n.length;
1411
- }
1412
- s(Se, "compareAlphanumeric");
1413
- const H = {
1414
- alphanumeric: Je,
1415
- alphanumericCaseSensitive: Qe,
1416
- text: We,
1417
- textCaseSensitive: Ye,
1418
- datetime: Ze,
1419
- basic: be
1420
- }, et = {
1421
- getInitialState: /* @__PURE__ */ s((e) => ({
1422
- sorting: [],
1423
- ...e
1424
- }), "getInitialState"),
1425
- getDefaultColumnDef: /* @__PURE__ */ s(() => ({
1426
- sortingFn: "auto",
1427
- sortUndefined: 1
1428
- }), "getDefaultColumnDef"),
1429
- getDefaultOptions: /* @__PURE__ */ s((e) => ({
1430
- onSortingChange: P("sorting", e),
1431
- isMultiSortEvent: /* @__PURE__ */ s((o) => o.shiftKey, "isMultiSortEvent")
1432
- }), "getDefaultOptions"),
1433
- createColumn: /* @__PURE__ */ s((e, o) => {
1434
- e.getAutoSortingFn = () => {
1435
- const t = o.getFilteredRowModel().flatRows.slice(10);
1436
- let n = !1;
1437
- for (const r of t) {
1438
- const i = r == null ? void 0 : r.getValue(e.id);
1439
- if (Object.prototype.toString.call(i) === "[object Date]")
1440
- return H.datetime;
1441
- if (typeof i == "string" && (n = !0, i.split(b).length > 1))
1442
- return H.alphanumeric;
1443
- }
1444
- return n ? H.text : H.basic;
1445
- }, e.getAutoSortDir = () => {
1446
- const t = o.getFilteredRowModel().flatRows[0];
1447
- return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
1448
- }, e.getSortingFn = () => {
1449
- var t, n;
1450
- if (!e)
1451
- throw new Error();
1452
- return T(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : H[e.columnDef.sortingFn];
1453
- }, e.toggleSorting = (t, n) => {
1454
- const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
1455
- o.setSorting((l) => {
1456
- const u = l == null ? void 0 : l.find((g) => g.id === e.id), a = l == null ? void 0 : l.findIndex((g) => g.id === e.id);
1457
- let d = [], p, m = i ? t : r === "desc";
1458
- if (l != null && l.length && e.getCanMultiSort() && n ? u ? p = "toggle" : p = "add" : l != null && l.length && a !== l.length - 1 ? p = "replace" : u ? p = "toggle" : p = "replace", p === "toggle" && (i || r || (p = "remove")), p === "add") {
1459
- var f;
1460
- d = [...l, {
1461
- id: e.id,
1462
- desc: m
1463
- }], d.splice(0, d.length - ((f = o.options.maxMultiSortColCount) != null ? f : Number.MAX_SAFE_INTEGER));
1464
- } else p === "toggle" ? d = l.map((g) => g.id === e.id ? {
1465
- ...g,
1466
- desc: m
1467
- } : g) : p === "remove" ? d = l.filter((g) => g.id !== e.id) : d = [{
1468
- id: e.id,
1469
- desc: m
1470
- }];
1471
- return d;
1472
- });
1473
- }, e.getFirstSortDir = () => {
1474
- var t, n;
1475
- return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1476
- }, e.getNextSortingOrder = (t) => {
1477
- var n, r;
1478
- const i = e.getFirstSortDir(), l = e.getIsSorted();
1479
- return l ? l !== i && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1480
- (!(t && (r = o.options.enableMultiRemove) != null) || r) ? !1 : l === "desc" ? "asc" : "desc" : i;
1481
- }, e.getCanSort = () => {
1482
- var t, n;
1483
- return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1484
- }, e.getCanMultiSort = () => {
1485
- var t, n;
1486
- return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
1487
- }, e.getIsSorted = () => {
1488
- var t;
1489
- const n = (t = o.getState().sorting) == null ? void 0 : t.find((r) => r.id === e.id);
1490
- return n ? n.desc ? "desc" : "asc" : !1;
1491
- }, e.getSortIndex = () => {
1492
- var t, n;
1493
- return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
1494
- }, e.clearSorting = () => {
1495
- o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1496
- }, e.getToggleSortingHandler = () => {
1497
- const t = e.getCanSort();
1498
- return (n) => {
1499
- t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? o.options.isMultiSortEvent == null ? void 0 : o.options.isMultiSortEvent(n) : !1));
1500
- };
1501
- };
1502
- }, "createColumn"),
1503
- createTable: /* @__PURE__ */ s((e) => {
1504
- e.setSorting = (o) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(o), e.resetSorting = (o) => {
1505
- var t, n;
1506
- e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1507
- }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1508
- }, "createTable")
1509
- }, tt = [
1510
- Fe,
1511
- qe,
1512
- ze,
1513
- Oe,
1514
- $e,
1515
- Ve,
1516
- Ne,
1517
- //depends on ColumnFaceting
1518
- ke,
1519
- //depends on ColumnFiltering
1520
- et,
1521
- Le,
1522
- //depends on RowSorting
1523
- Ue,
1524
- je,
1525
- Xe,
1526
- Ke,
1527
- Be
1528
- ];
1529
- function lt(e) {
1530
- var o, t;
1531
- process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1532
- const n = [...tt, ...(o = e._features) != null ? o : []];
1533
- let r = {
1534
- _features: n
1535
- };
1536
- const i = r._features.reduce((f, g) => Object.assign(f, g.getDefaultOptions == null ? void 0 : g.getDefaultOptions(r)), {}), l = /* @__PURE__ */ s((f) => r.options.mergeOptions ? r.options.mergeOptions(i, f) : {
1537
- ...i,
1538
- ...f
1539
- }, "mergeOptions");
1540
- let a = {
1541
- ...{},
1542
- ...(t = e.initialState) != null ? t : {}
1543
- };
1544
- r._features.forEach((f) => {
1545
- var g;
1546
- a = (g = f.getInitialState == null ? void 0 : f.getInitialState(a)) != null ? g : a;
1547
- });
1548
- const d = [];
1549
- let p = !1;
1550
- const m = {
1551
- _features: n,
1552
- options: {
1553
- ...i,
1554
- ...e
1555
- },
1556
- initialState: a,
1557
- _queue: /* @__PURE__ */ s((f) => {
1558
- d.push(f), p || (p = !0, Promise.resolve().then(() => {
1559
- for (; d.length; )
1560
- d.shift()();
1561
- p = !1;
1562
- }).catch((g) => setTimeout(() => {
1563
- throw g;
1564
- })));
1565
- }, "_queue"),
1566
- reset: /* @__PURE__ */ s(() => {
1567
- r.setState(r.initialState);
1568
- }, "reset"),
1569
- setOptions: /* @__PURE__ */ s((f) => {
1570
- const g = E(f, r.options);
1571
- r.options = l(g);
1572
- }, "setOptions"),
1573
- getState: /* @__PURE__ */ s(() => r.options.state, "getState"),
1574
- setState: /* @__PURE__ */ s((f) => {
1575
- r.options.onStateChange == null || r.options.onStateChange(f);
1576
- }, "setState"),
1577
- _getRowId: /* @__PURE__ */ s((f, g, c) => {
1578
- var S;
1579
- return (S = r.options.getRowId == null ? void 0 : r.options.getRowId(f, g, c)) != null ? S : `${c ? [c.id, g].join(".") : g}`;
1580
- }, "_getRowId"),
1581
- getCoreRowModel: /* @__PURE__ */ s(() => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()), "getCoreRowModel"),
1582
- // The final calls start at the bottom of the model,
1583
- // expanded rows, which then work their way up
1584
- getRowModel: /* @__PURE__ */ s(() => r.getPaginationRowModel(), "getRowModel"),
1585
- //in next version, we should just pass in the row model as the optional 2nd arg
1586
- getRow: /* @__PURE__ */ s((f, g) => {
1587
- let c = (g ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[f];
1588
- if (!c && (c = r.getCoreRowModel().rowsById[f], !c))
1589
- throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${f}`) : new Error();
1590
- return c;
1591
- }, "getRow"),
1592
- _getDefaultColumnDef: C(() => [r.options.defaultColumn], (f) => {
1593
- var g;
1594
- return f = (g = f) != null ? g : {}, {
1595
- header: /* @__PURE__ */ s((c) => {
1596
- const S = c.header.column.columnDef;
1597
- return S.accessorKey ? S.accessorKey : S.accessorFn ? S.id : null;
1598
- }, "header"),
1599
- // footer: props => props.header.column.id,
1600
- cell: /* @__PURE__ */ s((c) => {
1601
- var S, h;
1602
- return (S = (h = c.renderValue()) == null || h.toString == null ? void 0 : h.toString()) != null ? S : null;
1603
- }, "cell"),
1604
- ...r._features.reduce((c, S) => Object.assign(c, S.getDefaultColumnDef == null ? void 0 : S.getDefaultColumnDef()), {}),
1605
- ...f
1606
- };
1607
- }, R(e, "debugColumns", "_getDefaultColumnDef")),
1608
- _getColumnDefs: /* @__PURE__ */ s(() => r.options.columns, "_getColumnDefs"),
1609
- getAllColumns: C(() => [r._getColumnDefs()], (f) => {
1610
- const g = /* @__PURE__ */ s(function(c, S, h) {
1611
- return h === void 0 && (h = 0), c.map((w) => {
1612
- const v = _e(r, w, h, S), F = w;
1613
- return v.columns = F.columns ? g(F.columns, v, h + 1) : [], v;
1614
- });
1615
- }, "recurseColumns");
1616
- return g(f);
1617
- }, R(e, "debugColumns", "getAllColumns")),
1618
- getAllFlatColumns: C(() => [r.getAllColumns()], (f) => f.flatMap((g) => g.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
1619
- _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (f) => f.reduce((g, c) => (g[c.id] = c, g), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
1620
- getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (f, g) => {
1621
- let c = f.flatMap((S) => S.getLeafColumns());
1622
- return g(c);
1623
- }, R(e, "debugColumns", "getAllLeafColumns")),
1624
- getColumn: /* @__PURE__ */ s((f) => {
1625
- const g = r._getAllFlatColumnsById()[f];
1626
- return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${f}' does not exist.`), g;
1627
- }, "getColumn")
1628
- };
1629
- Object.assign(r, m);
1630
- for (let f = 0; f < r._features.length; f++) {
1631
- const g = r._features[f];
1632
- g == null || g.createTable == null || g.createTable(r);
1633
- }
1634
- return r;
1635
- }
1636
- s(lt, "createTable");
1637
- function st() {
1638
- return (e) => C(() => [e.options.data], (o) => {
1639
- const t = {
1640
- rows: [],
1641
- flatRows: [],
1642
- rowsById: {}
1643
- }, n = /* @__PURE__ */ s(function(r, i, l) {
1644
- i === void 0 && (i = 0);
1645
- const u = [];
1646
- for (let d = 0; d < r.length; d++) {
1647
- const p = q(e, e._getRowId(r[d], d, l), r[d], d, i, void 0, l == null ? void 0 : l.id);
1648
- if (t.flatRows.push(p), t.rowsById[p.id] = p, u.push(p), e.options.getSubRows) {
1649
- var a;
1650
- p.originalSubRows = e.options.getSubRows(r[d], d), (a = p.originalSubRows) != null && a.length && (p.subRows = n(p.originalSubRows, i + 1, p));
1651
- }
1652
- }
1653
- return u;
1654
- }, "accessRows");
1655
- return t.rows = n(o), t;
1656
- }, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
1657
- }
1658
- s(st, "getCoreRowModel");
1659
- function ut() {
1660
- return (e) => C(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (o, t, n) => !t.rows.length || o !== !0 && !Object.keys(o ?? {}).length || !n ? t : me(t), R(e.options, "debugTable", "getExpandedRowModel"));
1661
- }
1662
- s(ut, "getExpandedRowModel");
1663
- function me(e) {
1664
- const o = [], t = /* @__PURE__ */ s((n) => {
1665
- var r;
1666
- o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
1667
- }, "handleRow");
1668
- return e.rows.forEach(t), {
1669
- rows: o,
1670
- flatRows: e.flatRows,
1671
- rowsById: e.rowsById
1672
- };
1673
- }
1674
- s(me, "expandRows");
1675
- function gt() {
1676
- return (e, o) => C(() => {
1677
- var t;
1678
- return [(t = e.getColumn(o)) == null ? void 0 : t.getFacetedRowModel()];
1679
- }, (t) => {
1680
- if (!t) return;
1681
- const n = t.flatRows.flatMap((l) => {
1682
- var u;
1683
- return (u = l.getUniqueValues(o)) != null ? u : [];
1684
- }).map(Number).filter((l) => !Number.isNaN(l));
1685
- if (!n.length) return;
1686
- let r = n[0], i = n[n.length - 1];
1687
- for (const l of n)
1688
- l < r ? r = l : l > i && (i = l);
1689
- return [r, i];
1690
- }, R(e.options, "debugTable", "getFacetedMinMaxValues"));
1691
- }
1692
- s(gt, "getFacetedMinMaxValues");
1693
- function Ce(e, o, t) {
1694
- return t.options.filterFromLeafRows ? nt(e, o, t) : ot(e, o, t);
1695
- }
1696
- s(Ce, "filterRows");
1697
- function nt(e, o, t) {
1698
- var n;
1699
- const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = /* @__PURE__ */ s(function(a, d) {
1700
- d === void 0 && (d = 0);
1701
- const p = [];
1702
- for (let f = 0; f < a.length; f++) {
1703
- var m;
1704
- let g = a[f];
1705
- const c = q(t, g.id, g.original, g.index, g.depth, void 0, g.parentId);
1706
- if (c.columnFilters = g.columnFilters, (m = g.subRows) != null && m.length && d < l) {
1707
- if (c.subRows = u(g.subRows, d + 1), g = c, o(g) && !c.subRows.length) {
1708
- p.push(g), i[g.id] = g, r.push(g);
1709
- continue;
1710
- }
1711
- if (o(g) || c.subRows.length) {
1712
- p.push(g), i[g.id] = g, r.push(g);
1713
- continue;
1714
- }
1715
- } else
1716
- g = c, o(g) && (p.push(g), i[g.id] = g, r.push(g));
1717
- }
1718
- return p;
1719
- }, "recurseFilterRows");
1720
- return {
1721
- rows: u(e),
1722
- flatRows: r,
1723
- rowsById: i
1724
- };
1725
- }
1726
- s(nt, "filterRowModelFromLeafs");
1727
- function ot(e, o, t) {
1728
- var n;
1729
- const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = /* @__PURE__ */ s(function(a, d) {
1730
- d === void 0 && (d = 0);
1731
- const p = [];
1732
- for (let f = 0; f < a.length; f++) {
1733
- let g = a[f];
1734
- if (o(g)) {
1735
- var m;
1736
- if ((m = g.subRows) != null && m.length && d < l) {
1737
- const S = q(t, g.id, g.original, g.index, g.depth, void 0, g.parentId);
1738
- S.subRows = u(g.subRows, d + 1), g = S;
1739
- }
1740
- p.push(g), r.push(g), i[g.id] = g;
1741
- }
1742
- }
1743
- return p;
1744
- }, "recurseFilterRows");
1745
- return {
1746
- rows: u(e),
1747
- flatRows: r,
1748
- rowsById: i
1749
- };
1750
- }
1751
- s(ot, "filterRowModelFromRoot");
1752
- function at() {
1753
- return (e, o) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter, e.getFilteredRowModel()], (t, n, r) => {
1754
- if (!t.rows.length || !(n != null && n.length) && !r)
1755
- return t;
1756
- const i = [...n.map((u) => u.id).filter((u) => u !== o), r ? "__global__" : void 0].filter(Boolean), l = /* @__PURE__ */ s((u) => {
1757
- for (let a = 0; a < i.length; a++)
1758
- if (u.columnFilters[i[a]] === !1)
1759
- return !1;
1760
- return !0;
1761
- }, "filterRowsImpl");
1762
- return Ce(t.rows, l, e);
1763
- }, R(e.options, "debugTable", "getFacetedRowModel"));
1764
- }
1765
- s(at, "getFacetedRowModel");
1766
- function dt() {
1767
- return (e, o) => C(() => {
1768
- var t;
1769
- return [(t = e.getColumn(o)) == null ? void 0 : t.getFacetedRowModel()];
1770
- }, (t) => {
1771
- if (!t) return /* @__PURE__ */ new Map();
1772
- let n = /* @__PURE__ */ new Map();
1773
- for (let i = 0; i < t.flatRows.length; i++) {
1774
- const l = t.flatRows[i].getUniqueValues(o);
1775
- for (let u = 0; u < l.length; u++) {
1776
- const a = l[u];
1777
- if (n.has(a)) {
1778
- var r;
1779
- n.set(a, ((r = n.get(a)) != null ? r : 0) + 1);
1780
- } else
1781
- n.set(a, 1);
1782
- }
1783
- }
1784
- return n;
1785
- }, R(e.options, "debugTable", `getFacetedUniqueValues_${o}`));
1786
- }
1787
- s(dt, "getFacetedUniqueValues");
1788
- function ft() {
1789
- return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
1790
- if (!o.rows.length || !(t != null && t.length) && !n) {
1791
- for (let f = 0; f < o.flatRows.length; f++)
1792
- o.flatRows[f].columnFilters = {}, o.flatRows[f].columnFiltersMeta = {};
1793
- return o;
1794
- }
1795
- const r = [], i = [];
1796
- (t ?? []).forEach((f) => {
1797
- var g;
1798
- const c = e.getColumn(f.id);
1799
- if (!c)
1800
- return;
1801
- const S = c.getFilterFn();
1802
- if (!S) {
1803
- process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${c.id}.`);
1804
- return;
1805
- }
1806
- r.push({
1807
- id: f.id,
1808
- filterFn: S,
1809
- resolvedValue: (g = S.resolveFilterValue == null ? void 0 : S.resolveFilterValue(f.value)) != null ? g : f.value
1810
- });
1811
- });
1812
- const l = (t ?? []).map((f) => f.id), u = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((f) => f.getCanGlobalFilter());
1813
- n && u && a.length && (l.push("__global__"), a.forEach((f) => {
1814
- var g;
1815
- i.push({
1816
- id: f.id,
1817
- filterFn: u,
1818
- resolvedValue: (g = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? g : n
1819
- });
1820
- }));
1821
- let d, p;
1822
- for (let f = 0; f < o.flatRows.length; f++) {
1823
- const g = o.flatRows[f];
1824
- if (g.columnFilters = {}, r.length)
1825
- for (let c = 0; c < r.length; c++) {
1826
- d = r[c];
1827
- const S = d.id;
1828
- g.columnFilters[S] = d.filterFn(g, S, d.resolvedValue, (h) => {
1829
- g.columnFiltersMeta[S] = h;
1830
- });
1831
- }
1832
- if (i.length) {
1833
- for (let c = 0; c < i.length; c++) {
1834
- p = i[c];
1835
- const S = p.id;
1836
- if (p.filterFn(g, S, p.resolvedValue, (h) => {
1837
- g.columnFiltersMeta[S] = h;
1838
- })) {
1839
- g.columnFilters.__global__ = !0;
1840
- break;
1841
- }
1842
- }
1843
- g.columnFilters.__global__ !== !0 && (g.columnFilters.__global__ = !1);
1844
- }
1845
- }
1846
- const m = /* @__PURE__ */ s((f) => {
1847
- for (let g = 0; g < l.length; g++)
1848
- if (f.columnFilters[l[g]] === !1)
1849
- return !1;
1850
- return !0;
1851
- }, "filterRowsImpl");
1852
- return Ce(o.rows, m, e);
1853
- }, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
1854
- }
1855
- s(ft, "getFilteredRowModel");
1856
- function ct() {
1857
- return (e) => C(() => [e.getState().grouping, e.getPreGroupedRowModel()], (o, t) => {
1858
- if (!t.rows.length || !o.length)
1859
- return t.rows.forEach((a) => {
1860
- a.depth = 0, a.parentId = void 0;
1861
- }), t;
1862
- const n = o.filter((a) => e.getColumn(a)), r = [], i = {}, l = /* @__PURE__ */ s(function(a, d, p) {
1863
- if (d === void 0 && (d = 0), d >= n.length)
1864
- return a.map((c) => (c.depth = d, r.push(c), i[c.id] = c, c.subRows && (c.subRows = l(c.subRows, d + 1, c.id)), c));
1865
- const m = n[d], f = rt(a, m);
1866
- return Array.from(f.entries()).map((c, S) => {
1867
- let [h, w] = c, v = `${m}:${h}`;
1868
- v = p ? `${p}>${v}` : v;
1869
- const F = l(w, d + 1, v);
1870
- F.forEach((_) => {
1871
- _.parentId = v;
1872
- });
1873
- const M = d ? le(w, (_) => _.subRows) : w, $ = q(e, v, M[0].original, S, d, void 0, p);
1874
- return Object.assign($, {
1875
- groupingColumnId: m,
1876
- groupingValue: h,
1877
- subRows: F,
1878
- leafRows: M,
1879
- getValue: /* @__PURE__ */ s((_) => {
1880
- if (n.includes(_)) {
1881
- if ($._valuesCache.hasOwnProperty(_))
1882
- return $._valuesCache[_];
1883
- if (w[0]) {
1884
- var D;
1885
- $._valuesCache[_] = (D = w[0].getValue(_)) != null ? D : void 0;
1886
- }
1887
- return $._valuesCache[_];
1888
- }
1889
- if ($._groupingValuesCache.hasOwnProperty(_))
1890
- return $._groupingValuesCache[_];
1891
- const G = e.getColumn(_), A = G == null ? void 0 : G.getAggregationFn();
1892
- if (A)
1893
- return $._groupingValuesCache[_] = A(_, M, w), $._groupingValuesCache[_];
1894
- }, "getValue")
1895
- }), F.forEach((_) => {
1896
- r.push(_), i[_.id] = _;
1897
- }), $;
1898
- });
1899
- }, "groupUpRecursively"), u = l(t.rows, 0);
1900
- return u.forEach((a) => {
1901
- r.push(a), i[a.id] = a;
1902
- }), {
1903
- rows: u,
1904
- flatRows: r,
1905
- rowsById: i
1906
- };
1907
- }, R(e.options, "debugTable", "getGroupedRowModel", () => {
1908
- e._queue(() => {
1909
- e._autoResetExpanded(), e._autoResetPageIndex();
1910
- });
1911
- }));
1912
- }
1913
- s(ct, "getGroupedRowModel");
1914
- function rt(e, o) {
1915
- const t = /* @__PURE__ */ new Map();
1916
- return e.reduce((n, r) => {
1917
- const i = `${r.getGroupingValue(o)}`, l = n.get(i);
1918
- return l ? l.push(r) : n.set(i, [r]), n;
1919
- }, t);
1920
- }
1921
- s(rt, "groupBy");
1922
- function pt(e) {
1923
- return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
1924
- if (!n.rows.length)
1925
- return n;
1926
- const {
1927
- pageSize: r,
1928
- pageIndex: i
1929
- } = t;
1930
- let {
1931
- rows: l,
1932
- flatRows: u,
1933
- rowsById: a
1934
- } = n;
1935
- const d = r * i, p = d + r;
1936
- l = l.slice(d, p);
1937
- let m;
1938
- o.options.paginateExpandedRows ? m = {
1939
- rows: l,
1940
- flatRows: u,
1941
- rowsById: a
1942
- } : m = me({
1943
- rows: l,
1944
- flatRows: u,
1945
- rowsById: a
1946
- }), m.flatRows = [];
1947
- const f = /* @__PURE__ */ s((g) => {
1948
- m.flatRows.push(g), g.subRows.length && g.subRows.forEach(f);
1949
- }, "handleRow");
1950
- return m.rows.forEach(f), m;
1951
- }, R(o.options, "debugTable", "getPaginationRowModel"));
1952
- }
1953
- s(pt, "getPaginationRowModel");
1954
- function St() {
1955
- return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
1956
- if (!t.rows.length || !(o != null && o.length))
1957
- return t;
1958
- const n = e.getState().sorting, r = [], i = n.filter((a) => {
1959
- var d;
1960
- return (d = e.getColumn(a.id)) == null ? void 0 : d.getCanSort();
1961
- }), l = {};
1962
- i.forEach((a) => {
1963
- const d = e.getColumn(a.id);
1964
- d && (l[a.id] = {
1965
- sortUndefined: d.columnDef.sortUndefined,
1966
- invertSorting: d.columnDef.invertSorting,
1967
- sortingFn: d.getSortingFn()
1968
- });
1969
- });
1970
- const u = /* @__PURE__ */ s((a) => {
1971
- const d = a.map((p) => ({
1972
- ...p
1973
- }));
1974
- return d.sort((p, m) => {
1975
- for (let g = 0; g < i.length; g += 1) {
1976
- var f;
1977
- const c = i[g], S = l[c.id], h = S.sortUndefined, w = (f = c == null ? void 0 : c.desc) != null ? f : !1;
1978
- let v = 0;
1979
- if (h) {
1980
- const F = p.getValue(c.id), M = m.getValue(c.id), $ = F === void 0, _ = M === void 0;
1981
- if ($ || _) {
1982
- if (h === "first") return $ ? -1 : 1;
1983
- if (h === "last") return $ ? 1 : -1;
1984
- v = $ && _ ? 0 : $ ? h : -h;
1985
- }
1986
- }
1987
- if (v === 0 && (v = S.sortingFn(p, m, c.id)), v !== 0)
1988
- return w && (v *= -1), S.invertSorting && (v *= -1), v;
1989
- }
1990
- return p.index - m.index;
1991
- }), d.forEach((p) => {
1992
- var m;
1993
- r.push(p), (m = p.subRows) != null && m.length && (p.subRows = u(p.subRows));
1994
- }), d;
1995
- }, "sortData");
1996
- return {
1997
- rows: u(t.rows),
1998
- flatRows: r,
1999
- rowsById: t.rowsById
2000
- };
2001
- }, R(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
2002
- }
2003
- s(St, "getSortedRowModel");
2004
- export {
2005
- $e as ColumnFaceting,
2006
- Ve as ColumnFiltering,
2007
- Le as ColumnGrouping,
2008
- ze as ColumnOrdering,
2009
- Oe as ColumnPinning,
2010
- Be as ColumnSizing,
2011
- qe as ColumnVisibility,
2012
- Ne as GlobalFaceting,
2013
- ke as GlobalFiltering,
2014
- Fe as Headers,
2015
- Ue as RowExpanding,
2016
- je as RowPagination,
2017
- Xe as RowPinning,
2018
- Ke as RowSelection,
2019
- et as RowSorting,
2020
- L as _getVisibleLeafColumns,
2021
- N as aggregationFns,
2022
- z as buildHeaderGroups,
2023
- ve as createCell,
2024
- _e as createColumn,
2025
- q as createRow,
2026
- lt as createTable,
2027
- O as defaultColumnSizing,
2028
- me as expandRows,
2029
- I as filterFns,
2030
- le as flattenBy,
2031
- E as functionalUpdate,
2032
- st as getCoreRowModel,
2033
- ut as getExpandedRowModel,
2034
- gt as getFacetedMinMaxValues,
2035
- at as getFacetedRowModel,
2036
- dt as getFacetedUniqueValues,
2037
- ft as getFilteredRowModel,
2038
- ct as getGroupedRowModel,
2039
- R as getMemoOptions,
2040
- pt as getPaginationRowModel,
2041
- St as getSortedRowModel,
2042
- T as isFunction,
2043
- he as isNumberArray,
2044
- te as isRowSelected,
2045
- Z as isSubRowSelected,
2046
- P as makeStateUpdater,
2047
- C as memo,
2048
- Ae as orderColumns,
2049
- Te as passiveEventSupported,
2050
- b as reSplitAlphaNumeric,
2051
- J as selectRowsFn,
2052
- ie as shouldAutoRemoveFilter,
2053
- H as sortingFns
2054
- };
2055
- //# sourceMappingURL=index.js.map