@uxf/data-grid 11.74.0 → 11.74.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_api/index.d.ts +8 -0
- package/_api/index.js +11 -0
- package/_components/drawer.d.ts +8 -0
- package/_components/drawer.js +19 -0
- package/_store/reducer.d.ts +8 -0
- package/_store/reducer.js +209 -0
- package/_story-utils/data.d.ts +34 -0
- package/_story-utils/data.js +229 -0
- package/_story-utils/grid-type.d.ts +32 -0
- package/_story-utils/grid-type.js +2 -0
- package/_story-utils/json-renderer.d.ts +7 -0
- package/_story-utils/json-renderer.js +12 -0
- package/_story-utils/loader.d.ts +2 -0
- package/_story-utils/loader.js +33 -0
- package/_story-utils/schema.d.ts +3 -0
- package/_story-utils/schema.js +76 -0
- package/body-cell/body-cell-boolean.d.ts +2 -0
- package/body-cell/body-cell-boolean.js +18 -0
- package/body-cell/body-cell-chip.d.ts +12 -0
- package/body-cell/body-cell-chip.js +21 -0
- package/body-cell/body-cell-date.d.ts +2 -0
- package/body-cell/body-cell-date.js +15 -0
- package/body-cell/body-cell-datetime.d.ts +2 -0
- package/body-cell/body-cell-datetime.js +15 -0
- package/body-cell/body-cell-default.d.ts +2 -0
- package/body-cell/body-cell-default.js +17 -0
- package/body-cell/body-cell-email.d.ts +2 -0
- package/body-cell/body-cell-email.js +16 -0
- package/body-cell/body-cell-money.d.ts +8 -0
- package/body-cell/body-cell-money.js +15 -0
- package/body-cell/body-cell-phone.d.ts +2 -0
- package/body-cell/body-cell-phone.js +16 -0
- package/body-cell/body-cell-to-many.d.ts +2 -0
- package/body-cell/body-cell-to-many.js +17 -0
- package/body-cell/body-cell-to-one.d.ts +2 -0
- package/body-cell/body-cell-to-one.js +14 -0
- package/body-cell/body-cell-url.d.ts +2 -0
- package/body-cell/body-cell-url.js +16 -0
- package/body-cell/index.d.ts +2 -0
- package/body-cell/index.js +33 -0
- package/components.d.ts +97 -0
- package/components.js +124 -0
- package/data-grid-custom-example.stories.d.ts +2 -0
- package/data-grid-custom-example.stories.js +58 -0
- package/data-grid-v2.d.ts +3 -0
- package/data-grid-v2.js +41 -0
- package/data-grid-v2.stories.d.ts +2 -0
- package/data-grid-v2.stories.js +99 -0
- package/data-grid.d.ts +3 -0
- package/data-grid.js +42 -0
- package/data-grid.stories.d.ts +2 -0
- package/data-grid.stories.js +106 -0
- package/export-button/export-button.d.ts +8 -0
- package/export-button/export-button.js +18 -0
- package/export-button/export-button.stories.d.ts +2 -0
- package/export-button/export-button.stories.js +17 -0
- package/export-button/index.d.ts +1 -0
- package/export-button/index.js +17 -0
- package/filter-handler/boolean-select.d.ts +4 -0
- package/filter-handler/boolean-select.js +27 -0
- package/filter-handler/checkbox.d.ts +4 -0
- package/filter-handler/checkbox.js +19 -0
- package/filter-handler/date.d.ts +7 -0
- package/filter-handler/date.js +96 -0
- package/filter-handler/datetime.d.ts +7 -0
- package/filter-handler/datetime.js +34 -0
- package/filter-handler/entity-multi-select.d.ts +5 -0
- package/filter-handler/entity-multi-select.js +27 -0
- package/filter-handler/entity-select.d.ts +5 -0
- package/filter-handler/entity-select.js +23 -0
- package/filter-handler/index.d.ts +4 -0
- package/filter-handler/index.js +41 -0
- package/filter-handler/interval.d.ts +7 -0
- package/filter-handler/interval.js +47 -0
- package/filter-handler/multi-select.d.ts +5 -0
- package/filter-handler/multi-select.js +27 -0
- package/filter-handler/select.d.ts +5 -0
- package/filter-handler/select.js +22 -0
- package/filter-handler/string.d.ts +4 -0
- package/filter-handler/string.js +26 -0
- package/filter-handler/types.d.ts +7 -0
- package/filter-handler/types.js +2 -0
- package/filter-list/filter-list.d.ts +10 -0
- package/filter-list/filter-list.js +31 -0
- package/filter-list/filter-list.stories.d.ts +2 -0
- package/filter-list/filter-list.stories.js +18 -0
- package/filter-list/index.d.ts +1 -0
- package/filter-list/index.js +17 -0
- package/filters/filters.d.ts +9 -0
- package/filters/filters.js +21 -0
- package/filters/filters.stories.d.ts +2 -0
- package/filters/filters.stories.js +18 -0
- package/filters/index.d.ts +1 -0
- package/filters/index.js +17 -0
- package/filters-button/filters-button.d.ts +10 -0
- package/filters-button/filters-button.js +47 -0
- package/filters-button/filters-button.stories.d.ts +2 -0
- package/filters-button/filters-button.stories.js +18 -0
- package/filters-button/index.d.ts +1 -0
- package/filters-button/index.js +17 -0
- package/footer/footer.d.ts +5 -0
- package/footer/footer.js +10 -0
- package/footer/index.d.ts +1 -0
- package/footer/index.js +17 -0
- package/fulltext-input/fulltext-input.d.ts +6 -0
- package/fulltext-input/fulltext-input.js +15 -0
- package/fulltext-input/fulltext-input.stories.d.ts +2 -0
- package/fulltext-input/fulltext-input.stories.js +17 -0
- package/fulltext-input/index.d.ts +1 -0
- package/fulltext-input/index.js +17 -0
- package/hidden-columns/hidden-columns.d.ts +8 -0
- package/hidden-columns/hidden-columns.js +37 -0
- package/hidden-columns/hidden-columns.stories.d.ts +2 -0
- package/hidden-columns/hidden-columns.stories.js +17 -0
- package/hidden-columns/index.d.ts +1 -0
- package/hidden-columns/index.js +17 -0
- package/hidden-columns-button/hidden-columns-button.d.ts +8 -0
- package/hidden-columns-button/hidden-columns-button.js +44 -0
- package/hidden-columns-button/hidden-columns-button.stories.d.ts +2 -0
- package/hidden-columns-button/hidden-columns-button.stories.js +17 -0
- package/hidden-columns-button/index.d.ts +1 -0
- package/hidden-columns-button/index.js +17 -0
- package/hooks/useCallbackRef.d.ts +2 -0
- package/hooks/useCallbackRef.js +6 -0
- package/index.d.ts +5 -0
- package/index.js +25 -0
- package/linear-progress/index.d.ts +1 -0
- package/linear-progress/index.js +17 -0
- package/linear-progress/linear-progress.d.ts +5 -0
- package/linear-progress/linear-progress.js +12 -0
- package/package.json +3 -3
- package/pagination/index.d.ts +1 -0
- package/pagination/index.js +17 -0
- package/pagination/pagination.d.ts +12 -0
- package/pagination/pagination.js +15 -0
- package/pagination/pagination.stories.d.ts +2 -0
- package/pagination/pagination.stories.js +17 -0
- package/root/index.d.ts +1 -0
- package/root/index.js +17 -0
- package/root/root.d.ts +6 -0
- package/root/root.js +11 -0
- package/row-counts/index.d.ts +1 -0
- package/row-counts/index.js +17 -0
- package/row-counts/row-counts.d.ts +8 -0
- package/row-counts/row-counts.js +23 -0
- package/row-counts/row-counts.stories.d.ts +2 -0
- package/row-counts/row-counts.stories.js +14 -0
- package/rows-per-page-select/index.d.ts +1 -0
- package/rows-per-page-select/index.js +17 -0
- package/rows-per-page-select/rows-per-page-select.d.ts +3 -0
- package/rows-per-page-select/rows-per-page-select.js +21 -0
- package/rows-per-page-select/rows-per-page-select.stories.d.ts +2 -0
- package/rows-per-page-select/rows-per-page-select.stories.js +17 -0
- package/selected-rows-toolbar/index.d.ts +1 -0
- package/selected-rows-toolbar/index.js +17 -0
- package/selected-rows-toolbar/selected-rows-toolbar.d.ts +11 -0
- package/selected-rows-toolbar/selected-rows-toolbar.js +33 -0
- package/selected-rows-toolbar/selected-rows-toolbar.stories.d.ts +2 -0
- package/selected-rows-toolbar/selected-rows-toolbar.stories.js +44 -0
- package/table/components/action-cell-wrapper.d.ts +6 -0
- package/table/components/action-cell-wrapper.js +57 -0
- package/table/components/action-cell.d.ts +7 -0
- package/table/components/action-cell.js +13 -0
- package/table/components/select-row-checkbox.d.ts +3 -0
- package/table/components/select-row-checkbox.js +40 -0
- package/table/hooks/use-rdg-visuals.d.ts +16 -0
- package/table/hooks/use-rdg-visuals.js +46 -0
- package/table/hooks/use-react-data-grid-columns.d.ts +4 -0
- package/table/hooks/use-react-data-grid-columns.js +86 -0
- package/table/index.d.ts +3 -0
- package/table/index.js +19 -0
- package/table/no-rows-fallback.d.ts +7 -0
- package/table/no-rows-fallback.js +16 -0
- package/table/table.d.ts +4 -0
- package/table/table.js +91 -0
- package/table/table.stories.d.ts +2 -0
- package/table/table.stories.js +20 -0
- package/table/types.d.ts +19 -0
- package/table/types.js +2 -0
- package/table-v2/components/action-cell-wrapper.d.ts +6 -0
- package/table-v2/components/action-cell-wrapper.js +10 -0
- package/table-v2/components/action-cell.d.ts +8 -0
- package/table-v2/components/action-cell.js +16 -0
- package/table-v2/components/body.d.ts +6 -0
- package/table-v2/components/body.js +10 -0
- package/table-v2/components/cell.d.ts +8 -0
- package/table-v2/components/cell.js +10 -0
- package/table-v2/components/header-action-cell.d.ts +2 -0
- package/table-v2/components/header-action-cell.js +10 -0
- package/table-v2/components/header-cell.d.ts +10 -0
- package/table-v2/components/header-cell.js +47 -0
- package/table-v2/components/header-select-all-rows-checkbox.d.ts +8 -0
- package/table-v2/components/header-select-all-rows-checkbox.js +24 -0
- package/table-v2/components/header.d.ts +6 -0
- package/table-v2/components/header.js +10 -0
- package/table-v2/components/index.d.ts +21 -0
- package/table-v2/components/index.js +26 -0
- package/table-v2/components/root.d.ts +7 -0
- package/table-v2/components/root.js +31 -0
- package/table-v2/components/row.d.ts +7 -0
- package/table-v2/components/row.js +11 -0
- package/table-v2/components/select-row-checkbox.d.ts +7 -0
- package/table-v2/components/select-row-checkbox.js +14 -0
- package/table-v2/hooks/use-resizable-columns.d.ts +9 -0
- package/table-v2/hooks/use-resizable-columns.js +69 -0
- package/table-v2/index.d.ts +1 -0
- package/table-v2/index.js +17 -0
- package/table-v2/no-rows-fallback.d.ts +7 -0
- package/table-v2/no-rows-fallback.js +16 -0
- package/table-v2/table-v2.d.ts +3 -0
- package/table-v2/table-v2.js +91 -0
- package/table-v2/table-v2.stories.d.ts +2 -0
- package/table-v2/table-v2.stories.js +23 -0
- package/table-v2/types.d.ts +23 -0
- package/table-v2/types.js +2 -0
- package/table-v2/utils/get-grid-template-columns.d.ts +9 -0
- package/table-v2/utils/get-grid-template-columns.js +23 -0
- package/table-v2/utils/get-grid-template-rows.d.ts +2 -0
- package/table-v2/utils/get-grid-template-rows.js +14 -0
- package/toolbar/index.d.ts +1 -0
- package/toolbar/index.js +17 -0
- package/toolbar/toolbar.d.ts +5 -0
- package/toolbar/toolbar.js +10 -0
- package/toolbar-control/index.d.ts +1 -0
- package/toolbar-control/index.js +17 -0
- package/toolbar-control/toolbar-control.d.ts +13 -0
- package/toolbar-control/toolbar-control.js +22 -0
- package/toolbar-control/toolbar-control.stories.d.ts +2 -0
- package/toolbar-control/toolbar-control.stories.js +19 -0
- package/toolbar-customs/index.d.ts +1 -0
- package/toolbar-customs/index.js +17 -0
- package/toolbar-customs/toolbar-customs.d.ts +13 -0
- package/toolbar-customs/toolbar-customs.js +20 -0
- package/toolbar-customs/toolbar-customs.stories.d.ts +2 -0
- package/toolbar-customs/toolbar-customs.stories.js +15 -0
- package/toolbar-tabs/index.d.ts +1 -0
- package/toolbar-tabs/index.js +17 -0
- package/toolbar-tabs/toolbar-tabs.d.ts +11 -0
- package/toolbar-tabs/toolbar-tabs.js +41 -0
- package/toolbar-tabs/toolbar-tabs.stories.d.ts +2 -0
- package/toolbar-tabs/toolbar-tabs.stories.js +17 -0
- package/translations/cs.json +47 -0
- package/translations/de.json +47 -0
- package/translations/en.json +47 -0
- package/translations/sk.json +47 -0
- package/types/api.d.ts +23 -0
- package/types/api.js +2 -0
- package/types/components.d.ts +32 -0
- package/types/components.js +2 -0
- package/types/core.d.ts +20 -0
- package/types/core.js +2 -0
- package/types/data-grid-props.d.ts +34 -0
- package/types/data-grid-props.js +2 -0
- package/types/index.d.ts +6 -0
- package/types/index.js +2 -0
- package/types/schema.d.ts +56 -0
- package/types/schema.js +2 -0
- package/types/state.d.ts +25 -0
- package/types/state.js +2 -0
- package/types/user-config-storage-adapter.d.ts +8 -0
- package/types/user-config-storage-adapter.js +2 -0
- package/use-data-grid-control/action.d.ts +47 -0
- package/use-data-grid-control/action.js +9 -0
- package/use-data-grid-control/actions-factory.d.ts +21 -0
- package/use-data-grid-control/actions-factory.js +21 -0
- package/use-data-grid-control/index.d.ts +1 -0
- package/use-data-grid-control/index.js +17 -0
- package/use-data-grid-control/use-data-grid-control.d.ts +32 -0
- package/use-data-grid-control/use-data-grid-control.js +12 -0
- package/use-data-grid-control/use-middleware-reducer.d.ts +3 -0
- package/use-data-grid-control/use-middleware-reducer.js +19 -0
- package/use-data-grid-fetching/index.d.ts +1 -0
- package/use-data-grid-fetching/index.js +17 -0
- package/use-data-grid-fetching/loader.d.ts +2 -0
- package/use-data-grid-fetching/loader.js +6 -0
- package/use-data-grid-fetching/use-data-grid-fetching.d.ts +24 -0
- package/use-data-grid-fetching/use-data-grid-fetching.js +40 -0
- package/user-config-storage-adapters/local-storage.d.ts +3 -0
- package/user-config-storage-adapters/local-storage.js +32 -0
- package/utils/create-filter-component-props.d.ts +4 -0
- package/utils/create-filter-component-props.js +15 -0
- package/utils/get-config-key.d.ts +2 -0
- package/utils/get-config-key.js +6 -0
- package/utils/merge-schema-with-config.d.ts +3 -0
- package/utils/merge-schema-with-config.js +30 -0
- package/utils/merge-schema-with-config.test.d.ts +1 -0
- package/utils/merge-schema-with-config.test.js +57 -0
- package/utils.d.ts +6 -0
- package/utils.js +37 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentType, FunctionComponent } from "react";
|
|
2
|
+
import { Column, Filter } from "./schema";
|
|
3
|
+
export interface ActionCellProps<R> {
|
|
4
|
+
row: R;
|
|
5
|
+
reload: () => Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
export type ActionCellComponent<R> = FunctionComponent<ActionCellProps<R>>;
|
|
8
|
+
export type DataGridActionCell<Row> = {
|
|
9
|
+
width: number;
|
|
10
|
+
Component: ActionCellComponent<Row>;
|
|
11
|
+
};
|
|
12
|
+
export interface BodyCellProps<Value> {
|
|
13
|
+
value: Value;
|
|
14
|
+
column: Column<any, any>;
|
|
15
|
+
/** @deprecated will be removed */
|
|
16
|
+
row: any;
|
|
17
|
+
reload: () => Promise<any>;
|
|
18
|
+
}
|
|
19
|
+
export type BodyCellComponent<Value> = ComponentType<BodyCellProps<Value>>;
|
|
20
|
+
export type BodyCellComponents = {
|
|
21
|
+
[key: string]: BodyCellComponent<any>;
|
|
22
|
+
default: BodyCellComponent<any>;
|
|
23
|
+
};
|
|
24
|
+
export interface FilterProps<StateValue> {
|
|
25
|
+
gridName?: string;
|
|
26
|
+
filter: Filter;
|
|
27
|
+
value: StateValue;
|
|
28
|
+
op?: string;
|
|
29
|
+
onChange: (value: StateValue | undefined, op?: string) => void;
|
|
30
|
+
onClear: () => void;
|
|
31
|
+
}
|
|
32
|
+
export type ChangeTabFilterBehavior = "sharedFiltersAndSearch" | "sharedFiltersAndSearchAndSort" | "filtersPerTab";
|
package/types/core.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Nullish } from "@uxf/core/types";
|
|
2
|
+
import { Request, Response, ResultItem } from "./api";
|
|
3
|
+
import { BaseGridType } from "./schema";
|
|
4
|
+
export type KeyExtractor = (row: ResultItem) => number;
|
|
5
|
+
export type CsvDownloadGetUrl = (request: Request) => string;
|
|
6
|
+
export type Loader = (gridName: string | undefined, request: Request, encodedRequest: string) => Promise<Response>;
|
|
7
|
+
export type CallbackRef = {
|
|
8
|
+
reload: () => Promise<any>;
|
|
9
|
+
};
|
|
10
|
+
export type RowAccent = "success" | "warning" | "error" | "primary" | "secondary" | Nullish;
|
|
11
|
+
export type Config<C extends BaseGridType["columns"]> = {
|
|
12
|
+
columns: Partial<{
|
|
13
|
+
[columnName in keyof C]: {
|
|
14
|
+
hidden?: boolean;
|
|
15
|
+
maxWidth?: number;
|
|
16
|
+
minWidth?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
};
|
package/types/core.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Nullish } from "@uxf/core/types";
|
|
2
|
+
import { FilterHandlers } from "../filter-handler";
|
|
3
|
+
import { SelectedRowsToolbarActionsComponent } from "../selected-rows-toolbar";
|
|
4
|
+
import { NoRowsFallbackComponent } from "../table/no-rows-fallback";
|
|
5
|
+
import { DataGridTableProps } from "../table/types";
|
|
6
|
+
import { DataGridToolbarCustomsProps } from "../toolbar-customs";
|
|
7
|
+
import { DataGridControl } from "../use-data-grid-control";
|
|
8
|
+
import { DataGridFetchingResult } from "../use-data-grid-fetching";
|
|
9
|
+
import { BodyCellComponents, ChangeTabFilterBehavior } from "./components";
|
|
10
|
+
import { CsvDownloadGetUrl, KeyExtractor, RowAccent } from "./core";
|
|
11
|
+
import { BaseGridType, Schema } from "./schema";
|
|
12
|
+
export type DataGridControlProps = DataGridControl;
|
|
13
|
+
export type DataGridDataProps<Row> = DataGridFetchingResult<Row>;
|
|
14
|
+
export type DataGridBaseProps<GridType extends BaseGridType, Row> = {
|
|
15
|
+
schema: Schema<GridType>;
|
|
16
|
+
gridName?: string;
|
|
17
|
+
keyExtractor?: KeyExtractor;
|
|
18
|
+
getCsvDownloadUrl?: CsvDownloadGetUrl;
|
|
19
|
+
rowHeight?: number | ((row: Row) => number) | "auto";
|
|
20
|
+
headerRowHeight?: number;
|
|
21
|
+
rowAccent?: (row: Row) => RowAccent;
|
|
22
|
+
rowClassName?: (row: Row) => string | Nullish;
|
|
23
|
+
className?: string;
|
|
24
|
+
customActions?: DataGridToolbarCustomsProps["buttons"];
|
|
25
|
+
actionCell?: DataGridTableProps<Row>["actionCell"];
|
|
26
|
+
bodyCells?: BodyCellComponents;
|
|
27
|
+
filterHandlers?: FilterHandlers;
|
|
28
|
+
NoRowsFallback?: NoRowsFallbackComponent;
|
|
29
|
+
SelectedRowsToolbarActions?: SelectedRowsToolbarActionsComponent;
|
|
30
|
+
isRowSelectable?: boolean;
|
|
31
|
+
isDebug?: boolean;
|
|
32
|
+
changeTabFilterBehavior?: ChangeTabFilterBehavior;
|
|
33
|
+
};
|
|
34
|
+
export type DataGridProps<GridType extends BaseGridType, Row> = DataGridBaseProps<GridType, Row> & DataGridDataProps<Row> & DataGridControlProps;
|
package/types/index.d.ts
ADDED
package/types/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
export interface DataGridSort {
|
|
3
|
+
name: string;
|
|
4
|
+
dir: "asc" | "desc";
|
|
5
|
+
}
|
|
6
|
+
export interface Tab {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
s?: DataGridSort;
|
|
11
|
+
}
|
|
12
|
+
export type BaseGridType = {
|
|
13
|
+
columns: any;
|
|
14
|
+
filters: any;
|
|
15
|
+
};
|
|
16
|
+
export type ColumnWidthUnit = number | `${number}fr`;
|
|
17
|
+
export type ColumnConfig = {
|
|
18
|
+
isHidden?: boolean;
|
|
19
|
+
width?: ColumnWidthUnit;
|
|
20
|
+
minWidth?: number;
|
|
21
|
+
};
|
|
22
|
+
export type Column<Name, Type> = {
|
|
23
|
+
name: Name;
|
|
24
|
+
label: string | ReactElement;
|
|
25
|
+
type: Type;
|
|
26
|
+
sort?: boolean;
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
config?: ColumnConfig;
|
|
29
|
+
};
|
|
30
|
+
export type Columns<C extends BaseGridType["columns"]> = {
|
|
31
|
+
[K in keyof C]: Column<K, C[K]>;
|
|
32
|
+
}[keyof C];
|
|
33
|
+
export type FilterConfig = {
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
};
|
|
36
|
+
export interface FilterOption {
|
|
37
|
+
id: string | number;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
40
|
+
export interface Filter {
|
|
41
|
+
name: string;
|
|
42
|
+
label: string;
|
|
43
|
+
type: string;
|
|
44
|
+
options?: FilterOption[];
|
|
45
|
+
autocomplete?: string | null;
|
|
46
|
+
config?: FilterConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface Schema<GridType extends BaseGridType> {
|
|
49
|
+
name: string;
|
|
50
|
+
columns: Columns<GridType["columns"]>[];
|
|
51
|
+
filters: Filter[];
|
|
52
|
+
tabs?: Tab[];
|
|
53
|
+
s: DataGridSort;
|
|
54
|
+
perPage: number;
|
|
55
|
+
fullText?: boolean;
|
|
56
|
+
}
|
package/types/schema.js
ADDED
package/types/state.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RequestFilter } from "./api";
|
|
2
|
+
import { BaseGridType, ColumnConfig, DataGridSort, FilterConfig } from "./schema";
|
|
3
|
+
export type GridRequest = {
|
|
4
|
+
f: RequestFilter[];
|
|
5
|
+
s: DataGridSort | null;
|
|
6
|
+
page: number;
|
|
7
|
+
perPage: number;
|
|
8
|
+
search: string;
|
|
9
|
+
tab: string | null;
|
|
10
|
+
};
|
|
11
|
+
export interface DataGridUserConfig<GridType extends BaseGridType> {
|
|
12
|
+
columns?: Partial<Record<keyof GridType["columns"], ColumnConfig>>;
|
|
13
|
+
perPage?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface DataGridFrontendConfig<GridType extends BaseGridType> extends DataGridUserConfig<GridType> {
|
|
16
|
+
filters?: Partial<Record<keyof GridType["filters"], FilterConfig>>;
|
|
17
|
+
}
|
|
18
|
+
export interface DataGridState<GridType extends BaseGridType> {
|
|
19
|
+
request: GridRequest;
|
|
20
|
+
selectedRows?: any[];
|
|
21
|
+
userConfig: DataGridUserConfig<GridType>;
|
|
22
|
+
tabRequests: {
|
|
23
|
+
[tab: string]: GridRequest;
|
|
24
|
+
};
|
|
25
|
+
}
|
package/types/state.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataGridControl } from "../use-data-grid-control";
|
|
2
|
+
import { Action } from "../use-data-grid-control/action";
|
|
3
|
+
import { Middleware } from "../use-data-grid-control/use-middleware-reducer";
|
|
4
|
+
import { DataGridState } from "./state";
|
|
5
|
+
export type UserConfigStorageAdapter = {
|
|
6
|
+
middleware: Middleware<DataGridState<any>, Action>;
|
|
7
|
+
useUserConfig: (actions: DataGridControl["actions"]) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ChangeTabFilterBehavior, Tab } from "../types";
|
|
2
|
+
export type Action = {
|
|
3
|
+
type: "CHANGE_PAGE";
|
|
4
|
+
page: number;
|
|
5
|
+
} | {
|
|
6
|
+
type: "CHANGE_PER_PAGE";
|
|
7
|
+
perPage: number;
|
|
8
|
+
} | {
|
|
9
|
+
type: "FILTER";
|
|
10
|
+
name: string;
|
|
11
|
+
value: any;
|
|
12
|
+
op: any;
|
|
13
|
+
} | {
|
|
14
|
+
type: "FILTER_CLEAR";
|
|
15
|
+
name: string;
|
|
16
|
+
} | {
|
|
17
|
+
type: "FILTER_CLEAR_ALL";
|
|
18
|
+
} | {
|
|
19
|
+
type: "SORT";
|
|
20
|
+
columnName?: string;
|
|
21
|
+
direction?: string | null;
|
|
22
|
+
} | {
|
|
23
|
+
type: "SORT_CLEAR";
|
|
24
|
+
} | {
|
|
25
|
+
type: "FULLTEXT";
|
|
26
|
+
search: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: "CHANGE_TAB";
|
|
29
|
+
tab: Tab;
|
|
30
|
+
filterBehavior: ChangeTabFilterBehavior;
|
|
31
|
+
} | {
|
|
32
|
+
type: "SET_SELECTED_ROWS";
|
|
33
|
+
rows: any;
|
|
34
|
+
} | {
|
|
35
|
+
type: "HIDE_COLUMN";
|
|
36
|
+
name: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: "SHOW_COLUMN";
|
|
39
|
+
name: string;
|
|
40
|
+
} | {
|
|
41
|
+
type: "UPDATE_USER_CONFIG";
|
|
42
|
+
userConfig: any;
|
|
43
|
+
} | {
|
|
44
|
+
type: "REINITIALIZE_USER_CONFIG";
|
|
45
|
+
userConfig: any;
|
|
46
|
+
};
|
|
47
|
+
export declare const ACTIONS_CHANGING_USER_CONFIG: Array<Action["type"]>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import type { ChangeTabFilterBehavior } from "../types";
|
|
3
|
+
import { Tab } from "../types/schema";
|
|
4
|
+
import { DataGridUserConfig } from "../types/state";
|
|
5
|
+
import { Action } from "./action";
|
|
6
|
+
export declare function createActions(dispatch: Dispatch<Action>): {
|
|
7
|
+
changePage: (page: number) => void;
|
|
8
|
+
changePerPage: (perPage: number) => void;
|
|
9
|
+
filter: (name: string, value: any, op?: string) => void;
|
|
10
|
+
filterClear: (name: string) => void;
|
|
11
|
+
filterClearAll: () => void;
|
|
12
|
+
sort: (columnName: string, direction?: string | null) => void;
|
|
13
|
+
sortClear: () => void;
|
|
14
|
+
search: (search: string) => void;
|
|
15
|
+
changeTab: (tab: Tab, filterBehavior: ChangeTabFilterBehavior) => void;
|
|
16
|
+
setSelectedRows: (rows: any[]) => void;
|
|
17
|
+
hideColumn: (name: string) => void;
|
|
18
|
+
showColumn: (name: string) => void;
|
|
19
|
+
updateUserConfig: (userConfig: DataGridUserConfig<any>) => void;
|
|
20
|
+
reinitializeUserConfig: (userConfig: DataGridUserConfig<any>) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createActions = createActions;
|
|
4
|
+
function createActions(dispatch) {
|
|
5
|
+
return {
|
|
6
|
+
changePage: (page) => dispatch({ type: "CHANGE_PAGE", page }),
|
|
7
|
+
changePerPage: (perPage) => dispatch({ type: "CHANGE_PER_PAGE", perPage }),
|
|
8
|
+
filter: (name, value, op) => dispatch({ type: "FILTER", name, value, op }),
|
|
9
|
+
filterClear: (name) => dispatch({ type: "FILTER_CLEAR", name }),
|
|
10
|
+
filterClearAll: () => dispatch({ type: "FILTER_CLEAR_ALL" }),
|
|
11
|
+
sort: (columnName, direction = null) => dispatch({ type: "SORT", columnName, direction }),
|
|
12
|
+
sortClear: () => dispatch({ type: "SORT_CLEAR" }),
|
|
13
|
+
search: (search) => dispatch({ type: "FULLTEXT", search }),
|
|
14
|
+
changeTab: (tab, filterBehavior) => dispatch({ type: "CHANGE_TAB", tab, filterBehavior }),
|
|
15
|
+
setSelectedRows: (rows) => dispatch({ type: "SET_SELECTED_ROWS", rows }),
|
|
16
|
+
hideColumn: (name) => dispatch({ type: "HIDE_COLUMN", name }),
|
|
17
|
+
showColumn: (name) => dispatch({ type: "SHOW_COLUMN", name }),
|
|
18
|
+
updateUserConfig: (userConfig) => dispatch({ type: "UPDATE_USER_CONFIG", userConfig }),
|
|
19
|
+
reinitializeUserConfig: (userConfig) => dispatch({ type: "REINITIALIZE_USER_CONFIG", userConfig }),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-data-grid-control";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./use-data-grid-control"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Nullish } from "@uxf/core/types";
|
|
2
|
+
import { Request } from "../types/api";
|
|
3
|
+
import { BaseGridType, Schema } from "../types/schema";
|
|
4
|
+
import { DataGridState, DataGridUserConfig } from "../types/state";
|
|
5
|
+
import { Action } from "./action";
|
|
6
|
+
import { Middleware } from "./use-middleware-reducer";
|
|
7
|
+
export interface UseDataGridControlConfig<GridType extends BaseGridType> {
|
|
8
|
+
schema: Schema<GridType>;
|
|
9
|
+
initialState?: Request | string | Nullish;
|
|
10
|
+
initialUserConfig?: DataGridUserConfig<GridType> | Nullish;
|
|
11
|
+
middleware?: Middleware<DataGridState<any>, Action>;
|
|
12
|
+
}
|
|
13
|
+
export declare function useDataGridControl<T extends BaseGridType>(config: UseDataGridControlConfig<T>): {
|
|
14
|
+
state: DataGridState<T>;
|
|
15
|
+
actions: {
|
|
16
|
+
changePage: (page: number) => void;
|
|
17
|
+
changePerPage: (perPage: number) => void;
|
|
18
|
+
filter: (name: string, value: any, op?: string) => void;
|
|
19
|
+
filterClear: (name: string) => void;
|
|
20
|
+
filterClearAll: () => void;
|
|
21
|
+
sort: (columnName: string, direction?: string | null) => void;
|
|
22
|
+
sortClear: () => void;
|
|
23
|
+
search: (search: string) => void;
|
|
24
|
+
changeTab: (tab: import("../types/schema").Tab, filterBehavior: import("..").ChangeTabFilterBehavior) => void;
|
|
25
|
+
setSelectedRows: (rows: any[]) => void;
|
|
26
|
+
hideColumn: (name: string) => void;
|
|
27
|
+
showColumn: (name: string) => void;
|
|
28
|
+
updateUserConfig: (userConfig: DataGridUserConfig<any>) => void;
|
|
29
|
+
reinitializeUserConfig: (userConfig: DataGridUserConfig<any>) => void;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type DataGridControl = ReturnType<typeof useDataGridControl>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDataGridControl = useDataGridControl;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const reducer_1 = require("../_store/reducer");
|
|
6
|
+
const actions_factory_1 = require("./actions-factory");
|
|
7
|
+
const use_middleware_reducer_1 = require("./use-middleware-reducer");
|
|
8
|
+
function useDataGridControl(config) {
|
|
9
|
+
const [state, dispatch] = (0, use_middleware_reducer_1.useMiddlewareReducer)(reducer_1.reducer, (0, reducer_1.getInitialState)(config.schema, config.initialState, config.initialUserConfig), config.middleware);
|
|
10
|
+
const actions = (0, react_1.useMemo)(() => (0, actions_factory_1.createActions)(dispatch), [dispatch]);
|
|
11
|
+
return { state, actions };
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Dispatch, Reducer } from "react";
|
|
2
|
+
export type Middleware<State, Action> = (newState: State, action: Action) => void;
|
|
3
|
+
export declare function useMiddlewareReducer<S, A>(reducer: Reducer<S, A>, initialState: S, middleware?: (state: NoInfer<S>, action: NoInfer<A>) => void): [S, Dispatch<A>];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMiddlewareReducer = useMiddlewareReducer;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useMiddlewareReducer(reducer, initialState, middleware) {
|
|
6
|
+
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
7
|
+
const stateRef = (0, react_1.useRef)(state);
|
|
8
|
+
stateRef.current = state;
|
|
9
|
+
const middlewareRef = (0, react_1.useRef)(middleware);
|
|
10
|
+
middlewareRef.current = middleware;
|
|
11
|
+
const enhancedDispatch = (0, react_1.useCallback)((action) => {
|
|
12
|
+
dispatch(action);
|
|
13
|
+
if (middlewareRef.current) {
|
|
14
|
+
const newState = reducer(stateRef.current, action);
|
|
15
|
+
middlewareRef.current(newState, action);
|
|
16
|
+
}
|
|
17
|
+
}, [reducer]);
|
|
18
|
+
return [state, enhancedDispatch];
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-data-grid-fetching";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./use-data-grid-fetching"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dataGridLoader = void 0;
|
|
4
|
+
const _api_1 = require("../_api");
|
|
5
|
+
const dataGridLoader = (gridName, request) => (0, _api_1.dataGridGetResult)(gridName !== null && gridName !== void 0 ? gridName : "", request);
|
|
6
|
+
exports.dataGridLoader = dataGridLoader;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Nullish } from "@uxf/core/types";
|
|
2
|
+
import { Loader } from "../types/core";
|
|
3
|
+
import { Schema } from "../types/schema";
|
|
4
|
+
import { DataGridControl } from "../use-data-grid-control";
|
|
5
|
+
interface Response<Row> {
|
|
6
|
+
result: Row[];
|
|
7
|
+
count: number;
|
|
8
|
+
tabCounts: Record<string, number> | Nullish;
|
|
9
|
+
totalCount: number;
|
|
10
|
+
}
|
|
11
|
+
export interface DataGridFetchingResult<Row> {
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
error?: any;
|
|
14
|
+
data: Response<Row> | null;
|
|
15
|
+
reload: () => Promise<any>;
|
|
16
|
+
}
|
|
17
|
+
export interface UseDataGridFetchingConfig {
|
|
18
|
+
loader?: Loader;
|
|
19
|
+
schema: Schema<any>;
|
|
20
|
+
state: DataGridControl["state"];
|
|
21
|
+
isWithTabCounts?: true;
|
|
22
|
+
}
|
|
23
|
+
export declare function useDataGridFetching(config: UseDataGridFetchingConfig): DataGridFetchingResult<any>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDataGridFetching = useDataGridFetching;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const loader_1 = require("./loader");
|
|
7
|
+
function useDataGridFetching(config) {
|
|
8
|
+
const { state, loader = loader_1.dataGridLoader } = config;
|
|
9
|
+
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
10
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
11
|
+
const [data, setData] = (0, react_1.useState)(null);
|
|
12
|
+
const stringStateRequest = JSON.stringify(state.request);
|
|
13
|
+
const reload = (0, react_1.useCallback)(() => {
|
|
14
|
+
const stateRequest = JSON.parse(stringStateRequest);
|
|
15
|
+
const request = (0, utils_1.createRequest)(stateRequest, { isWithTabCounts: config.isWithTabCounts });
|
|
16
|
+
setIsLoading(true);
|
|
17
|
+
return loader(config.schema.name, request, (0, utils_1.encodeFilter)(request))
|
|
18
|
+
.then((response) => {
|
|
19
|
+
setData(response);
|
|
20
|
+
setError(null);
|
|
21
|
+
setIsLoading(false);
|
|
22
|
+
})
|
|
23
|
+
.catch((e) => {
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
25
|
+
console.error(e);
|
|
26
|
+
setIsLoading(false);
|
|
27
|
+
setError(e);
|
|
28
|
+
});
|
|
29
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
|
+
}, [stringStateRequest, config.schema]);
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
reload();
|
|
33
|
+
}, [reload]);
|
|
34
|
+
return {
|
|
35
|
+
data,
|
|
36
|
+
isLoading,
|
|
37
|
+
error,
|
|
38
|
+
reload,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUserConfigLocalStorageAdapter = useUserConfigLocalStorageAdapter;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const action_1 = require("../use-data-grid-control/action");
|
|
6
|
+
const get_config_key_1 = require("../utils/get-config-key");
|
|
7
|
+
const isObject = (value) => typeof value === "function" || (typeof value === "object" && Boolean(value));
|
|
8
|
+
function useUserConfigLocalStorageAdapter(schema) {
|
|
9
|
+
const configKey = (0, get_config_key_1.getConfigKey)(schema);
|
|
10
|
+
return (0, react_1.useMemo)(() => ({
|
|
11
|
+
middleware: (newState, action) => {
|
|
12
|
+
if (action_1.ACTIONS_CHANGING_USER_CONFIG.includes(action.type)) {
|
|
13
|
+
window.localStorage.setItem(configKey, JSON.stringify(newState.userConfig));
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
useUserConfig: (actions) => {
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
18
|
+
var _a;
|
|
19
|
+
let config = null;
|
|
20
|
+
try {
|
|
21
|
+
config = JSON.parse((_a = window.localStorage.getItem(configKey)) !== null && _a !== void 0 ? _a : "{}");
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// ignore
|
|
25
|
+
}
|
|
26
|
+
if (isObject(config) && config !== null) {
|
|
27
|
+
actions.reinitializeUserConfig(config);
|
|
28
|
+
}
|
|
29
|
+
}, [actions]);
|
|
30
|
+
},
|
|
31
|
+
}), [configKey]);
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FilterProps } from "../types/components";
|
|
2
|
+
import { Filter } from "../types/schema";
|
|
3
|
+
import { DataGridControl } from "../use-data-grid-control";
|
|
4
|
+
export declare function createFilterComponentProps(gridName: string | undefined, filter: Filter, state: DataGridControl["state"], actions: DataGridControl["actions"]): FilterProps<any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFilterComponentProps = createFilterComponentProps;
|
|
4
|
+
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
5
|
+
function createFilterComponentProps(gridName, filter, state, actions) {
|
|
6
|
+
const requestFilter = state.request.f.find((f) => f.name === filter.name);
|
|
7
|
+
return {
|
|
8
|
+
filter,
|
|
9
|
+
value: requestFilter === null || requestFilter === void 0 ? void 0 : requestFilter.value,
|
|
10
|
+
op: requestFilter === null || requestFilter === void 0 ? void 0 : requestFilter.op,
|
|
11
|
+
gridName,
|
|
12
|
+
onChange: (value, op) => (0, is_nil_1.isNil)(value) ? actions.filterClear(filter.name) : actions.filter(filter.name, value, op),
|
|
13
|
+
onClear: () => actions.filterClear(filter.name),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BaseGridType, Schema } from "../types/schema";
|
|
2
|
+
import { DataGridFrontendConfig } from "../types/state";
|
|
3
|
+
export declare function mergeSchemaWithConfig<GridType extends BaseGridType>(schema: Schema<GridType>, frontendConfig: DataGridFrontendConfig<GridType>): Schema<GridType>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeSchemaWithConfig = mergeSchemaWithConfig;
|
|
4
|
+
function mergeSchemaWithConfig(schema, frontendConfig) {
|
|
5
|
+
var _a;
|
|
6
|
+
return {
|
|
7
|
+
...schema,
|
|
8
|
+
perPage: (_a = frontendConfig.perPage) !== null && _a !== void 0 ? _a : schema.perPage,
|
|
9
|
+
columns: schema.columns.map((column) => {
|
|
10
|
+
var _a;
|
|
11
|
+
return ({
|
|
12
|
+
...column,
|
|
13
|
+
config: {
|
|
14
|
+
...column.config,
|
|
15
|
+
...(_a = frontendConfig.columns) === null || _a === void 0 ? void 0 : _a[column.name],
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}),
|
|
19
|
+
filters: schema.filters.map((filter) => {
|
|
20
|
+
var _a;
|
|
21
|
+
return ({
|
|
22
|
+
...filter,
|
|
23
|
+
config: {
|
|
24
|
+
...filter.config,
|
|
25
|
+
...(_a = frontendConfig.filters) === null || _a === void 0 ? void 0 : _a[filter.name],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|