@economic/taco 2.55.1-footer.0 → 2.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/taco.cjs +147 -48
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.d.ts +1 -0
- package/dist/taco.js +147 -48
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
    
        package/dist/taco.cjs
    CHANGED
    
    | @@ -32012,10 +32012,9 @@ function useTableDataLoader(fetchPage, fetchAll, options = { pageSize: DEFAULT_P | |
| 32012 32012 | 
             
              const _lastUsedSearch = React.useRef();
         | 
| 32013 32013 | 
             
              const _lastUsedHiddenColumns = React.useRef([]);
         | 
| 32014 32014 | 
             
              const _lastUsedPageIndex = React.useRef();
         | 
| 32015 | 
            -
              const _forceReset = React.useRef(false);
         | 
| 32016 32015 | 
             
              const loadPage = async (pageIndex, sorting, filters, hiddenColumns) => {
         | 
| 32017 32016 | 
             
                let reset = false;
         | 
| 32018 | 
            -
                if ( | 
| 32017 | 
            +
                if (JSON.stringify(sorting) !== JSON.stringify(_lastUsedSorting.current) || JSON.stringify(filters) !== JSON.stringify(_lastUsedFilters.current)) {
         | 
| 32019 32018 | 
             
                  _pendingPageRequests.current = {};
         | 
| 32020 32019 | 
             
                  reset = true;
         | 
| 32021 32020 | 
             
                }
         | 
| @@ -32024,7 +32023,6 @@ function useTableDataLoader(fetchPage, fetchAll, options = { pageSize: DEFAULT_P | |
| 32024 32023 | 
             
                } else {
         | 
| 32025 32024 | 
             
                  _pendingPageRequests.current[pageIndex] = true;
         | 
| 32026 32025 | 
             
                }
         | 
| 32027 | 
            -
                _forceReset.current = false;
         | 
| 32028 32026 | 
             
                _lastUsedPageIndex.current = pageIndex;
         | 
| 32029 32027 | 
             
                _lastUsedSorting.current = sorting;
         | 
| 32030 32028 | 
             
                _lastUsedFilters.current = filters;
         | 
| @@ -32068,12 +32066,41 @@ function useTableDataLoader(fetchPage, fetchAll, options = { pageSize: DEFAULT_P | |
| 32068 32066 | 
             
                } catch {
         | 
| 32069 32067 | 
             
                }
         | 
| 32070 32068 | 
             
              };
         | 
| 32069 | 
            +
              const reloadCurrentPages = async (pageIndex, sorting, filters, hiddenColumns) => {
         | 
| 32070 | 
            +
                _lastUsedPageIndex.current;
         | 
| 32071 | 
            +
                const pageIndexes = pageIndex === 0 ? [0, 1] : [pageIndex - 1, pageIndex];
         | 
| 32072 | 
            +
                if (length.current !== void 0) {
         | 
| 32073 | 
            +
                  const pageCount = Math.ceil(length.current / pageSize);
         | 
| 32074 | 
            +
                  if (pageIndex + 1 < pageCount) {
         | 
| 32075 | 
            +
                    pageIndexes.push(pageIndex + 1);
         | 
| 32076 | 
            +
                  }
         | 
| 32077 | 
            +
                }
         | 
| 32078 | 
            +
                _pendingPageRequests.current = pageIndexes.reduce((accum, index2) => ({ ...accum, [index2]: true }), {});
         | 
| 32079 | 
            +
                _lastUsedPageIndex.current = pageIndex;
         | 
| 32080 | 
            +
                _lastUsedSorting.current = sorting;
         | 
| 32081 | 
            +
                _lastUsedFilters.current = filters;
         | 
| 32082 | 
            +
                _lastUsedHiddenColumns.current = hiddenColumns;
         | 
| 32083 | 
            +
                try {
         | 
| 32084 | 
            +
                  const responses = await Promise.all(
         | 
| 32085 | 
            +
                    pageIndexes.map((pageIndex2) => fetchPage(pageIndex2, pageSize, sorting, filters, hiddenColumns))
         | 
| 32086 | 
            +
                  );
         | 
| 32087 | 
            +
                  length.current = responses[0].length;
         | 
| 32088 | 
            +
                  const nextData = Array(length.current).fill(void 0);
         | 
| 32089 | 
            +
                  responses.forEach((response, index2) => {
         | 
| 32090 | 
            +
                    const startIndex = pageIndexes[index2] * pageSize;
         | 
| 32091 | 
            +
                    nextData.splice(startIndex, pageSize, ...response.data);
         | 
| 32092 | 
            +
                  });
         | 
| 32093 | 
            +
                  setData(nextData);
         | 
| 32094 | 
            +
                } catch {
         | 
| 32095 | 
            +
                } finally {
         | 
| 32096 | 
            +
                  _pendingPageRequests.current = {};
         | 
| 32097 | 
            +
                }
         | 
| 32098 | 
            +
              };
         | 
| 32071 32099 | 
             
              const invalidate = async () => {
         | 
| 32072 | 
            -
                _forceReset.current = true;
         | 
| 32073 32100 | 
             
                if (_lastUsedSearch.current) {
         | 
| 32074 32101 | 
             
                  return loadAll(_lastUsedSorting.current, _lastUsedFilters.current, _lastUsedHiddenColumns.current);
         | 
| 32075 32102 | 
             
                } else {
         | 
| 32076 | 
            -
                  return  | 
| 32103 | 
            +
                  return reloadCurrentPages(
         | 
| 32077 32104 | 
             
                    _lastUsedPageIndex.current ?? 0,
         | 
| 32078 32105 | 
             
                    _lastUsedSorting.current,
         | 
| 32079 32106 | 
             
                    _lastUsedFilters.current,
         | 
| @@ -32085,7 +32112,12 @@ function useTableDataLoader(fetchPage, fetchAll, options = { pageSize: DEFAULT_P | |
| 32085 32112 | 
             
                if (_lastUsedSearch.current) {
         | 
| 32086 32113 | 
             
                  return loadAll(sorting, _lastUsedFilters.current, _lastUsedHiddenColumns.current);
         | 
| 32087 32114 | 
             
                } else {
         | 
| 32088 | 
            -
                  return  | 
| 32115 | 
            +
                  return reloadCurrentPages(
         | 
| 32116 | 
            +
                    _lastUsedPageIndex.current ?? 0,
         | 
| 32117 | 
            +
                    sorting,
         | 
| 32118 | 
            +
                    _lastUsedFilters.current,
         | 
| 32119 | 
            +
                    _lastUsedHiddenColumns.current
         | 
| 32120 | 
            +
                  );
         | 
| 32089 32121 | 
             
                }
         | 
| 32090 32122 | 
             
              };
         | 
| 32091 32123 | 
             
              const handleFilter = async (filters) => {
         | 
| @@ -32379,9 +32411,10 @@ function useTableSettingsListener(table, onChangeSettings) { | |
| 32379 32411 | 
             
                state.sorting
         | 
| 32380 32412 | 
             
              ]);
         | 
| 32381 32413 | 
             
            }
         | 
| 32382 | 
            -
            function useTableShortcutsListener(table, shortcuts) {
         | 
| 32414 | 
            +
            function useTableShortcutsListener(table, tableRef, shortcuts, localShortcuts = false) {
         | 
| 32383 32415 | 
             
              const meta = table.options.meta;
         | 
| 32384 32416 | 
             
              const rows = table.getRowModel().rows;
         | 
| 32417 | 
            +
              const listenerTarget = localShortcuts ? tableRef.current : document;
         | 
| 32385 32418 | 
             
              React.useEffect(() => {
         | 
| 32386 32419 | 
             
                const shortcutKeys = Object.keys(shortcuts ?? {});
         | 
| 32387 32420 | 
             
                const globalHandlers = [];
         | 
| @@ -32414,18 +32447,38 @@ function useTableShortcutsListener(table, shortcuts) { | |
| 32414 32447 | 
             
                  });
         | 
| 32415 32448 | 
             
                }
         | 
| 32416 32449 | 
             
                globalHandlers.forEach((handler) => {
         | 
| 32417 | 
            -
                   | 
| 32450 | 
            +
                  listenerTarget == null ? void 0 : listenerTarget.addEventListener("keydown", handler);
         | 
| 32418 32451 | 
             
                });
         | 
| 32419 32452 | 
             
                return () => {
         | 
| 32420 32453 | 
             
                  globalHandlers.forEach((handler) => {
         | 
| 32421 | 
            -
                     | 
| 32454 | 
            +
                    listenerTarget == null ? void 0 : listenerTarget.removeEventListener("keydown", handler);
         | 
| 32422 32455 | 
             
                  });
         | 
| 32423 32456 | 
             
                };
         | 
| 32424 32457 | 
             
              }, [shortcuts, meta.rowActive.rowActiveIndex, rows.length]);
         | 
| 32425 32458 | 
             
            }
         | 
| 32459 | 
            +
            function useLazyDebouncedEffect(effect, deps, ms = 200) {
         | 
| 32460 | 
            +
              const readyRef = React.useRef(false);
         | 
| 32461 | 
            +
              const timeoutRef = React.useRef();
         | 
| 32462 | 
            +
              React.useEffect(() => {
         | 
| 32463 | 
            +
                if (readyRef.current) {
         | 
| 32464 | 
            +
                  timeoutRef.current = setTimeout(effect, ms);
         | 
| 32465 | 
            +
                } else {
         | 
| 32466 | 
            +
                  readyRef.current = true;
         | 
| 32467 | 
            +
                }
         | 
| 32468 | 
            +
                return () => {
         | 
| 32469 | 
            +
                  clearTimeout(timeoutRef.current);
         | 
| 32470 | 
            +
                };
         | 
| 32471 | 
            +
              }, deps);
         | 
| 32472 | 
            +
              React.useEffect(
         | 
| 32473 | 
            +
                () => () => {
         | 
| 32474 | 
            +
                  readyRef.current = false;
         | 
| 32475 | 
            +
                },
         | 
| 32476 | 
            +
                []
         | 
| 32477 | 
            +
              );
         | 
| 32478 | 
            +
            }
         | 
| 32426 32479 | 
             
            function useTableSortingListener$1(table, onSort) {
         | 
| 32427 32480 | 
             
              const sorting = table.getState().sorting;
         | 
| 32428 | 
            -
               | 
| 32481 | 
            +
              useLazyDebouncedEffect(() => {
         | 
| 32429 32482 | 
             
                if (table.options.enableSorting && typeof onSort === "function") {
         | 
| 32430 32483 | 
             
                  onSort(sorting);
         | 
| 32431 32484 | 
             
                  if (table.options.enableRowSelection) {
         | 
| @@ -32443,6 +32496,9 @@ function useTableServerLoadingListener(table, loadPage) { | |
| 32443 32496 | 
             
                  const hiddenColumns = getHiddenColumns(table.getState().columnVisibility);
         | 
| 32444 32497 | 
             
                  const search = meta.search.enableGlobalFilter ? table.getState().globalFilter : void 0;
         | 
| 32445 32498 | 
             
                  loadPage(0, sorting, columnFilters, hiddenColumns, search);
         | 
| 32499 | 
            +
                  if (meta.server._experimentalDataLoader2) {
         | 
| 32500 | 
            +
                    loadPage(1, sorting, columnFilters, hiddenColumns, search);
         | 
| 32501 | 
            +
                  }
         | 
| 32446 32502 | 
             
                }
         | 
| 32447 32503 | 
             
              }, []);
         | 
| 32448 32504 | 
             
            }
         | 
| @@ -32462,7 +32518,7 @@ function useTableRowDrop(isEnabled = false, onRowDrop) { | |
| 32462 32518 | 
             
              };
         | 
| 32463 32519 | 
             
            }
         | 
| 32464 32520 | 
             
            const DEFAULT_EMPTY_ARRAY = [];
         | 
| 32465 | 
            -
            function useTableManager(props, meta, internalColumns) {
         | 
| 32521 | 
            +
            function useTableManager(props, ref, meta, internalColumns) {
         | 
| 32466 32522 | 
             
              var _a;
         | 
| 32467 32523 | 
             
              const localization = useLocalization();
         | 
| 32468 32524 | 
             
              const safeId = props.id.replace(".", "_");
         | 
| @@ -32561,7 +32617,7 @@ function useTableManager(props, meta, internalColumns) { | |
| 32561 32617 | 
             
              useTableSearchListener(instance);
         | 
| 32562 32618 | 
             
              useTableServerLoadingListener(instance, server.loadPage);
         | 
| 32563 32619 | 
             
              useTableSettingsListener(instance, setSettings);
         | 
| 32564 | 
            -
              useTableShortcutsListener(instance, props.shortcuts);
         | 
| 32620 | 
            +
              useTableShortcutsListener(instance, ref, props.shortcuts, props.enableLocalKeyboardShortcuts);
         | 
| 32565 32621 | 
             
              useTableSortingListener$1(instance, props.onChangeSort);
         | 
| 32566 32622 | 
             
              return {
         | 
| 32567 32623 | 
             
                id: safeId,
         | 
| @@ -32751,9 +32807,10 @@ function getCellWidthPadding(fontSize) { | |
| 32751 32807 | 
             
                  return "16px";
         | 
| 32752 32808 | 
             
              }
         | 
| 32753 32809 | 
             
            }
         | 
| 32754 | 
            -
            function useTableGlobalShortcuts(table, tableRef, scrollToIndex) {
         | 
| 32810 | 
            +
            function useTableGlobalShortcuts(table, tableRef, scrollToIndex, localShortcuts = false) {
         | 
| 32755 32811 | 
             
              const tableMeta = table.options.meta;
         | 
| 32756 32812 | 
             
              const rows = table.getRowModel().rows;
         | 
| 32813 | 
            +
              const listenerTarget = localShortcuts ? tableRef.current : document;
         | 
| 32757 32814 | 
             
              React.useEffect(
         | 
| 32758 32815 | 
             
                () => {
         | 
| 32759 32816 | 
             
                  const handleKeyDown = (event) => {
         | 
| @@ -32768,9 +32825,9 @@ function useTableGlobalShortcuts(table, tableRef, scrollToIndex) { | |
| 32768 32825 | 
             
                      tableMeta.rowClick.handleKeyDown(event, (_a = rows[tableMeta.rowActive.rowActiveIndex]) == null ? void 0 : _a.original);
         | 
| 32769 32826 | 
             
                    }
         | 
| 32770 32827 | 
             
                  };
         | 
| 32771 | 
            -
                   | 
| 32828 | 
            +
                  listenerTarget == null ? void 0 : listenerTarget.addEventListener("keydown", handleKeyDown);
         | 
| 32772 32829 | 
             
                  return () => {
         | 
| 32773 | 
            -
                     | 
| 32830 | 
            +
                    listenerTarget == null ? void 0 : listenerTarget.removeEventListener("keydown", handleKeyDown);
         | 
| 32774 32831 | 
             
                  };
         | 
| 32775 32832 | 
             
                },
         | 
| 32776 32833 | 
             
                // scrollToIndex function changes when row count changes, so it is important to update handlers
         | 
| @@ -33614,7 +33671,7 @@ function RowWithServerLoading(props) { | |
| 33614 33671 | 
             
            }
         | 
| 33615 33672 | 
             
            const Skeleton = React.forwardRef(function Skeleton2(props, ref) {
         | 
| 33616 33673 | 
             
              const { cellsCount, index: index2 } = props;
         | 
| 33617 | 
            -
              return /* @__PURE__ */ React.createElement("tr", { "data-row-index": index2, ref }, Array(cellsCount).fill(null).map((_, index22) => /* @__PURE__ */ React.createElement("td", { key: index22 }, /* @__PURE__ */ React.createElement("span", { className: "bg-grey-100 text-grey-700 h-4 w-full text-center text-xs" }))));
         | 
| 33674 | 
            +
              return /* @__PURE__ */ React.createElement("tr", { "data-row-index": index2, "data-row-id": index2, ref }, Array(cellsCount).fill(null).map((_, index22) => /* @__PURE__ */ React.createElement("td", { key: index22 }, /* @__PURE__ */ React.createElement("span", { className: "bg-grey-100 text-grey-700 h-4 w-full text-center text-xs" }))));
         | 
| 33618 33675 | 
             
            });
         | 
| 33619 33676 | 
             
            function getScrollPaddingEndOffset(table) {
         | 
| 33620 33677 | 
             
              const tableMeta = table.options.meta;
         | 
| @@ -34076,7 +34133,7 @@ const INTERNAL_RENDERERS = { | |
| 34076 34133 | 
             
            };
         | 
| 34077 34134 | 
             
            function useTable$1(props, externalRef, renderers, meta, options) {
         | 
| 34078 34135 | 
             
              const ref = useMergedRef(externalRef);
         | 
| 34079 | 
            -
              const manager = useTableManager(props, meta, INTERNAL_RENDERERS);
         | 
| 34136 | 
            +
              const manager = useTableManager(props, ref, meta, INTERNAL_RENDERERS);
         | 
| 34080 34137 | 
             
              const renderer2 = useTableRenderer(
         | 
| 34081 34138 | 
             
                renderers,
         | 
| 34082 34139 | 
             
                manager.instance,
         | 
| @@ -34086,7 +34143,7 @@ function useTable$1(props, externalRef, renderers, meta, options) { | |
| 34086 34143 | 
             
                options
         | 
| 34087 34144 | 
             
              );
         | 
| 34088 34145 | 
             
              const { style, stylesheet } = useTableStyle(manager.id, manager.instance);
         | 
| 34089 | 
            -
              useTableGlobalShortcuts(manager.instance, ref, renderer2.scrollToIndex);
         | 
| 34146 | 
            +
              useTableGlobalShortcuts(manager.instance, ref, renderer2.scrollToIndex, props.enableLocalKeyboardShortcuts);
         | 
| 34090 34147 | 
             
              useTableRef(manager.instance, ref);
         | 
| 34091 34148 | 
             
              useTableRowActiveListener(manager.instance, ref);
         | 
| 34092 34149 | 
             
              return {
         | 
| @@ -84007,43 +84064,57 @@ Navigation24.Link = Link3; | |
| 84007 84064 | 
             
            Navigation24.Section = Section;
         | 
| 84008 84065 | 
             
            Navigation24.Content = Content;
         | 
| 84009 84066 | 
             
            const DATASET_SIZE_MULTIPLIER = 15;
         | 
| 84067 | 
            +
            function getDataKey(sorting, filters, hiddenColumns, search) {
         | 
| 84068 | 
            +
              return [JSON.stringify(sorting), JSON.stringify(filters), JSON.stringify(hiddenColumns), JSON.stringify(search)].join("_");
         | 
| 84069 | 
            +
            }
         | 
| 84010 84070 | 
             
            function useTableDataLoader2(fetchPage, fetchAll, options = { pageSize: DEFAULT_PAGE_SIZE$1 }) {
         | 
| 84011 84071 | 
             
              const { pageSize } = options;
         | 
| 84012 84072 | 
             
              const DATASET_SIZE = DATASET_SIZE_MULTIPLIER * pageSize;
         | 
| 84013 84073 | 
             
              const length = React.useRef(0);
         | 
| 84014 84074 | 
             
              const [data, setData] = React.useState({ rows: [], pages: [], cache: {}, lastFetchedPage: void 0 });
         | 
| 84015 84075 | 
             
              const _pendingPageRequests = React.useRef({});
         | 
| 84016 | 
            -
              const _lastRequestId = React.useRef();
         | 
| 84017 84076 | 
             
              const _lastUsedSorting = React.useRef([]);
         | 
| 84018 84077 | 
             
              const _lastUsedFilters = React.useRef([]);
         | 
| 84019 | 
            -
              const _lastUsedSearch = React.useRef();
         | 
| 84020 84078 | 
             
              const _lastUsedHiddenColumns = React.useRef([]);
         | 
| 84021 | 
            -
               | 
| 84022 | 
            -
             | 
| 84023 | 
            -
             | 
| 84024 | 
            -
                 | 
| 84025 | 
            -
             | 
| 84026 | 
            -
             | 
| 84027 | 
            -
                   | 
| 84079 | 
            +
              const _lastUsedSearch = React.useRef();
         | 
| 84080 | 
            +
              async function loadPage(pageIndex, sorting, filters, hiddenColumns, search) {
         | 
| 84081 | 
            +
                const hasDataChanged = JSON.stringify(sorting) !== JSON.stringify(_lastUsedSorting.current) || JSON.stringify(filters) !== JSON.stringify(_lastUsedFilters.current) || JSON.stringify(hiddenColumns) !== JSON.stringify(_lastUsedHiddenColumns.current) || search !== _lastUsedSearch.current;
         | 
| 84082 | 
            +
                if (hasDataChanged) {
         | 
| 84083 | 
            +
                  _lastUsedSorting.current = sorting;
         | 
| 84084 | 
            +
                  _lastUsedFilters.current = filters;
         | 
| 84085 | 
            +
                  _lastUsedSearch.current = search;
         | 
| 84086 | 
            +
                  _lastUsedHiddenColumns.current = hiddenColumns;
         | 
| 84087 | 
            +
                  _pendingPageRequests.current = {};
         | 
| 84088 | 
            +
                } else {
         | 
| 84089 | 
            +
                  if (_pendingPageRequests.current[pageIndex]) {
         | 
| 84090 | 
            +
                    return;
         | 
| 84091 | 
            +
                  }
         | 
| 84092 | 
            +
                  if (data.cache[pageIndex] && data.cache[pageIndex][0]) {
         | 
| 84093 | 
            +
                    return;
         | 
| 84094 | 
            +
                  }
         | 
| 84028 84095 | 
             
                }
         | 
| 84029 | 
            -
                const  | 
| 84030 | 
            -
                _pendingPageRequests.current[pageIndex] =  | 
| 84096 | 
            +
                const dataKey = getDataKey(sorting, filters, hiddenColumns, search);
         | 
| 84097 | 
            +
                _pendingPageRequests.current[pageIndex] = dataKey;
         | 
| 84031 84098 | 
             
                try {
         | 
| 84032 | 
            -
                  _lastRequestId.current = requestId;
         | 
| 84033 84099 | 
             
                  const response = await fetchPage(pageIndex, pageSize, sorting, filters, hiddenColumns, search);
         | 
| 84100 | 
            +
                  if (dataKey !== _pendingPageRequests.current[pageIndex]) {
         | 
| 84101 | 
            +
                    return;
         | 
| 84102 | 
            +
                  }
         | 
| 84034 84103 | 
             
                  length.current = response.length;
         | 
| 84035 84104 | 
             
                  setData((currentData) => {
         | 
| 84036 | 
            -
                    if (_lastRequestId.current !== requestId) {
         | 
| 84037 | 
            -
                      return currentData;
         | 
| 84038 | 
            -
                    }
         | 
| 84039 84105 | 
             
                    const direction = getDirection(pageIndex, currentData.pages);
         | 
| 84040 | 
            -
                    const nextPages = getPages( | 
| 84106 | 
            +
                    const nextPages = getPages(
         | 
| 84107 | 
            +
                      pageIndex,
         | 
| 84108 | 
            +
                      currentData.lastFetchedPage,
         | 
| 84109 | 
            +
                      hasDataChanged ? [] : currentData.pages,
         | 
| 84110 | 
            +
                      direction
         | 
| 84111 | 
            +
                    );
         | 
| 84041 84112 | 
             
                    _lastUsedSorting.current = sorting;
         | 
| 84042 84113 | 
             
                    _lastUsedFilters.current = filters;
         | 
| 84043 84114 | 
             
                    _lastUsedSearch.current = search;
         | 
| 84044 84115 | 
             
                    _lastUsedHiddenColumns.current = hiddenColumns;
         | 
| 84045 84116 | 
             
                    let nextCache;
         | 
| 84046 | 
            -
                    if ( | 
| 84117 | 
            +
                    if (hasDataChanged || !direction) {
         | 
| 84047 84118 | 
             
                      nextCache = nextPages.reduce((acc, p2) => ({ ...acc, [p2]: Array(pageSize).fill(void 0) }), {});
         | 
| 84048 84119 | 
             
                    } else {
         | 
| 84049 84120 | 
             
                      nextCache = { ...currentData.cache };
         | 
| @@ -84062,7 +84133,9 @@ function useTableDataLoader2(fetchPage, fetchAll, options = { pageSize: DEFAULT_ | |
| 84062 84133 | 
             
                      lastFetchedPage: pageIndex
         | 
| 84063 84134 | 
             
                    };
         | 
| 84064 84135 | 
             
                  });
         | 
| 84065 | 
            -
                   | 
| 84136 | 
            +
                  requestAnimationFrame(() => {
         | 
| 84137 | 
            +
                    delete _pendingPageRequests.current[pageIndex];
         | 
| 84138 | 
            +
                  });
         | 
| 84066 84139 | 
             
                } catch {
         | 
| 84067 84140 | 
             
                }
         | 
| 84068 84141 | 
             
              }
         | 
| @@ -84093,35 +84166,61 @@ function useTableDataLoader2(fetchPage, fetchAll, options = { pageSize: DEFAULT_ | |
| 84093 84166 | 
             
                  _pendingPageRequests.current = {};
         | 
| 84094 84167 | 
             
                }
         | 
| 84095 84168 | 
             
              };
         | 
| 84169 | 
            +
              async function reloadCurrentPages(currentPageIndex, sorting, filters, hiddenColumns, search) {
         | 
| 84170 | 
            +
                const index2 = data.pages.indexOf(currentPageIndex);
         | 
| 84171 | 
            +
                const pageIndexes = [data.pages[index2 - 1], currentPageIndex, data.pages[index2 + 1]].filter((x3) => x3 !== void 0);
         | 
| 84172 | 
            +
                const dataKey = getDataKey(sorting, filters, hiddenColumns, search);
         | 
| 84173 | 
            +
                _pendingPageRequests.current = pageIndexes.reduce((accum, index22) => ({ ...accum, [index22]: dataKey }), {});
         | 
| 84174 | 
            +
                try {
         | 
| 84175 | 
            +
                  const responses = await Promise.all(
         | 
| 84176 | 
            +
                    pageIndexes.map((pageIndex) => fetchPage(pageIndex, pageSize, sorting, filters, hiddenColumns, search))
         | 
| 84177 | 
            +
                  );
         | 
| 84178 | 
            +
                  length.current = responses[0].length;
         | 
| 84179 | 
            +
                  const nextPages = pageIndexes;
         | 
| 84180 | 
            +
                  _lastUsedSorting.current = sorting;
         | 
| 84181 | 
            +
                  _lastUsedFilters.current = filters;
         | 
| 84182 | 
            +
                  _lastUsedSearch.current = search;
         | 
| 84183 | 
            +
                  _lastUsedHiddenColumns.current = hiddenColumns;
         | 
| 84184 | 
            +
                  const nextCache = nextPages.reduce(
         | 
| 84185 | 
            +
                    (acc, p2, index22) => ({ ...acc, [p2]: responses[index22].data }),
         | 
| 84186 | 
            +
                    {}
         | 
| 84187 | 
            +
                  );
         | 
| 84188 | 
            +
                  const rows = Object.values(nextCache).reduce((acc, p2) => acc.concat(p2), []);
         | 
| 84189 | 
            +
                  setData({
         | 
| 84190 | 
            +
                    cache: nextCache,
         | 
| 84191 | 
            +
                    pages: nextPages,
         | 
| 84192 | 
            +
                    rows,
         | 
| 84193 | 
            +
                    lastFetchedPage: pageIndexes[pageIndexes.length - 1]
         | 
| 84194 | 
            +
                  });
         | 
| 84195 | 
            +
                  requestAnimationFrame(() => {
         | 
| 84196 | 
            +
                    _pendingPageRequests.current = {};
         | 
| 84197 | 
            +
                  });
         | 
| 84198 | 
            +
                } catch {
         | 
| 84199 | 
            +
                }
         | 
| 84200 | 
            +
              }
         | 
| 84096 84201 | 
             
              const invalidate = async () => {
         | 
| 84097 | 
            -
                 | 
| 84098 | 
            -
                return loadPage(
         | 
| 84202 | 
            +
                return reloadCurrentPages(
         | 
| 84099 84203 | 
             
                  getCurrentPage(data.pages),
         | 
| 84100 84204 | 
             
                  _lastUsedSorting.current,
         | 
| 84101 84205 | 
             
                  _lastUsedFilters.current,
         | 
| 84102 84206 | 
             
                  _lastUsedHiddenColumns.current,
         | 
| 84103 | 
            -
                  _lastUsedSearch.current | 
| 84104 | 
            -
                  true
         | 
| 84207 | 
            +
                  _lastUsedSearch.current
         | 
| 84105 84208 | 
             
                );
         | 
| 84106 84209 | 
             
              };
         | 
| 84107 84210 | 
             
              const handleSort = async (sorting) => {
         | 
| 84108 | 
            -
                 | 
| 84109 | 
            -
                return loadPage(
         | 
| 84211 | 
            +
                return reloadCurrentPages(
         | 
| 84110 84212 | 
             
                  getCurrentPage(data.pages),
         | 
| 84111 84213 | 
             
                  sorting,
         | 
| 84112 84214 | 
             
                  _lastUsedFilters.current,
         | 
| 84113 84215 | 
             
                  _lastUsedHiddenColumns.current,
         | 
| 84114 | 
            -
                  _lastUsedSearch.current | 
| 84115 | 
            -
                  true
         | 
| 84216 | 
            +
                  _lastUsedSearch.current
         | 
| 84116 84217 | 
             
                );
         | 
| 84117 84218 | 
             
              };
         | 
| 84118 84219 | 
             
              const handleFilter = async (filters, hiddenColumns) => {
         | 
| 84119 | 
            -
                 | 
| 84120 | 
            -
                return loadPage(0, _lastUsedSorting.current, filters, hiddenColumns, _lastUsedSearch.current, true);
         | 
| 84220 | 
            +
                return loadPage(0, _lastUsedSorting.current, filters, hiddenColumns, _lastUsedSearch.current);
         | 
| 84121 84221 | 
             
              };
         | 
| 84122 84222 | 
             
              const handleSearch = async (search, hiddenColumns) => {
         | 
| 84123 | 
            -
                 | 
| 84124 | 
            -
                return loadPage(0, _lastUsedSorting.current, _lastUsedFilters.current, hiddenColumns, search, true);
         | 
| 84223 | 
            +
                return loadPage(0, _lastUsedSorting.current, _lastUsedFilters.current, hiddenColumns, search);
         | 
| 84125 84224 | 
             
              };
         | 
| 84126 84225 | 
             
              return [
         | 
| 84127 84226 | 
             
                {
         |