@rws-aoa/react-library 6.0.0 → 6.0.1
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/components/atoms/table/Table.js +19 -19
- package/dist/components/atoms/table/Table.js.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +2 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js +257 -256
- package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { checkboxClasses as b, paginationItemClasses as
|
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { checkboxClasses as b, paginationItemClasses as R } from "@mui/material";
|
|
3
3
|
import { GridLogicOperator as f, DataGrid as I, gridClasses as t } from "@mui/x-data-grid";
|
|
4
4
|
import { l as p } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
-
import { useState as
|
|
5
|
+
import { useState as a, useCallback as v, useEffect as k, useMemo as O } from "react";
|
|
6
6
|
import { FontNormalSxProps as T } from "../../../_constants.js";
|
|
7
7
|
import { QuickSearchToolbar as j } from "./_QuickSearchToolbar.js";
|
|
8
8
|
function Z({ ...e }) {
|
|
9
|
-
const [h, d] =
|
|
9
|
+
const [h, d] = a(!1), [l, C] = a({
|
|
10
10
|
page: 0,
|
|
11
11
|
pageSize: 10
|
|
12
|
-
}), [i,
|
|
12
|
+
}), [i, x] = a([]), [n, S] = a({
|
|
13
13
|
items: []
|
|
14
|
-
}), [w, M] =
|
|
15
|
-
|
|
16
|
-
}, []), $ =
|
|
14
|
+
}), [w, M] = a(null), r = e.mode ?? "server", u = r === "server", y = v((o) => {
|
|
15
|
+
x(o);
|
|
16
|
+
}, []), $ = v((o) => {
|
|
17
17
|
S(o);
|
|
18
|
-
}, []), [P, g] =
|
|
18
|
+
}, []), [P, g] = a(e.data?.rowCount ?? 0);
|
|
19
19
|
async function m(o, s, c) {
|
|
20
20
|
if (u && e.getData) {
|
|
21
21
|
const D = async () => {
|
|
@@ -24,9 +24,9 @@ function Z({ ...e }) {
|
|
|
24
24
|
d(!0), await D(), d(!1);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
k(() => {
|
|
28
28
|
g((o) => e.data?.rowCount ?? o);
|
|
29
|
-
}, [e.data?.rowCount, g]),
|
|
29
|
+
}, [e.data?.rowCount, g]), k(() => {
|
|
30
30
|
m(l, i, n);
|
|
31
31
|
}, [l, i, n]);
|
|
32
32
|
const F = O(
|
|
@@ -82,7 +82,7 @@ function Z({ ...e }) {
|
|
|
82
82
|
},
|
|
83
83
|
e.localeText
|
|
84
84
|
);
|
|
85
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ G(
|
|
86
86
|
I,
|
|
87
87
|
{
|
|
88
88
|
columns: e.columns,
|
|
@@ -92,17 +92,17 @@ function Z({ ...e }) {
|
|
|
92
92
|
disableDensitySelector: !0,
|
|
93
93
|
disableRowSelectionOnClick: !0,
|
|
94
94
|
disableVirtualization: !0,
|
|
95
|
-
filterMode:
|
|
95
|
+
filterMode: r,
|
|
96
96
|
getRowHeight: () => "auto",
|
|
97
97
|
ignoreDiacritics: !0,
|
|
98
98
|
initialState: F,
|
|
99
99
|
loading: h,
|
|
100
100
|
localeText: L,
|
|
101
101
|
onFilterModelChange: $,
|
|
102
|
-
onPaginationModelChange:
|
|
102
|
+
onPaginationModelChange: C,
|
|
103
103
|
onSortModelChange: y,
|
|
104
104
|
pageSizeOptions: [5, 10, 20, 40, 80],
|
|
105
|
-
paginationMode:
|
|
105
|
+
paginationMode: r,
|
|
106
106
|
paginationModel: l,
|
|
107
107
|
rowCount: u ? P : void 0,
|
|
108
108
|
rows: e.data?.rows,
|
|
@@ -126,9 +126,9 @@ function Z({ ...e }) {
|
|
|
126
126
|
},
|
|
127
127
|
toolbar: {
|
|
128
128
|
setFilterButtonEl: M,
|
|
129
|
-
showQuickFilter: !
|
|
129
|
+
showQuickFilter: e.dataGridOverridableProps?.disableColumnFilter === !1,
|
|
130
130
|
quickFilterProps: { debounceMs: 500 },
|
|
131
|
-
mode:
|
|
131
|
+
mode: r,
|
|
132
132
|
getData: async () => m(l, i, n),
|
|
133
133
|
actionButtons: e.actionButtons,
|
|
134
134
|
localeText: e.localeText
|
|
@@ -138,7 +138,7 @@ function Z({ ...e }) {
|
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
140
|
slots: { toolbar: j },
|
|
141
|
-
sortingMode:
|
|
141
|
+
sortingMode: r,
|
|
142
142
|
sx: p.merge(
|
|
143
143
|
{
|
|
144
144
|
border: 0,
|
|
@@ -192,7 +192,7 @@ function Z({ ...e }) {
|
|
|
192
192
|
[`.${t.cell}`]: {
|
|
193
193
|
color: "var(--color-text)"
|
|
194
194
|
},
|
|
195
|
-
[`.${
|
|
195
|
+
[`.${R.root}`]: {
|
|
196
196
|
borderRadius: 0
|
|
197
197
|
},
|
|
198
198
|
[`.${b.root}`]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../../src/components/atoms/table/Table.tsx"],"sourcesContent":["import { checkboxClasses, paginationItemClasses, type SxProps } from '@mui/material';\nimport {\n GridLogicOperator,\n DataGrid,\n gridClasses,\n type DataGridProps,\n type GridColDef,\n type GridGetRowsParams,\n type GridInitialState,\n type GridLocaleText,\n type GridPaginationModel,\n type GridRowModel,\n type GridValidRowModel,\n type GridSortModel,\n type GridFilterModel\n} from '@mui/x-data-grid';\nimport { merge } from 'lodash';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\nimport { QuickSearchToolbar } from './_QuickSearchToolbar';\n\nexport interface AoaTableData<T extends GridValidRowModel = GridValidRowModel> {\n /**\n * Additional `pageInfo` for advanced use-cases.\n * `hasNextPage`: When row count is unknown/estimated, `hasNextPage` will be used to check if more records are available on server.\n */\n pageInfo?: {\n hasNextPage?: boolean;\n nextCursor?: string;\n };\n /**\n * To reflect updates in total `rowCount` (optional).\n * Useful when the `rowCount` is inaccurate (for example when filtering) or not available upfront.\n */\n rowCount?: number;\n /**\n * The paged, filtered and sorted items from the database\n */\n rows: GridRowModel<T>[];\n}\n\nexport type AoaTableColumns<T extends object = any> = GridColDef<T>[];\n\nexport type AoaTableQueryOptions = GridPaginationModel & Omit<GridGetRowsParams, 'end' | 'paginationModel' | 'start'>;\n\ntype ModeProps =\n /**\n * Overwrites the default mode (server) when you need pagination, filtering and sorting on the client side\n */\n | { getData?: never; mode: 'client' }\n /**\n * The Redux action that takes PaginationModel as parameter to retrieve data from the server\n */\n | { getData(queryOptions: AoaTableQueryOptions): Promise<void> | void; mode?: 'server' };\n\nexport type AoaTableProps<T extends object = any> = ModeProps & {\n /**\n * Action buttons shown in the toolbar of the table\n */\n readonly actionButtons?: JSX.Element[];\n /**\n * The column structure to display the data\n */\n readonly columns: GridColDef<T>[];\n /**\n * The TableData object to be displayed in the table\n */\n readonly data: AoaTableData<T>;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * Overwrite a safe selection of the {@link DataGrid} properties\n */\n readonly dataGridOverridableProps?: Pick<\n DataGridProps<T>,\n | 'checkboxSelection'\n | 'disableColumnFilter'\n | 'disableRowSelectionOnClick'\n | 'getRowId'\n | 'ignoreDiacritics'\n | 'isRowSelectable'\n | 'loading'\n | 'onRowSelectionModelChange'\n | 'rowSelectionModel'\n >;\n /**\n * Sets the initial sortModel in case the required sorting differs from the back-end's default sorting\n */\n readonly initialSort?: { field: string; sort: 'asc' | 'desc' };\n /**\n * Overwrites the default labels when you need a different language than Dutch\n */\n readonly localeText?: GridLocaleText & { refreshTable: string };\n /**\n * Material UI's property to apply styling\n */\n readonly sx?: SxProps;\n};\n\n/**\n * Constructs a table using pre-defined Rijks styling\n *\n * @param props - Props to pass to the button\n * @example\n * ```jsx\n * <AoaTable\n * getData={(queryOptions) => getMockData(queryOptions)}\n * data={mockData}\n * columns={[{ field: \"id\" }, { field: \"title\" }, { field: \"completed\" }]}\n * />\n * ```\n */\n\nexport function AoaTable<T extends object = any>({ ...props }: AoaTableProps<T>) {\n const [isLoading, setIsLoading] = useState(false);\n const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({\n page: 0,\n pageSize: 10\n });\n const [sortModel, setSortModel] = useState<GridSortModel>([]);\n const [filterModel, setFilterModel] = useState<GridFilterModel>({\n items: []\n });\n const [filterButtonEl, setFilterButtonEl] = useState<HTMLButtonElement | null>(null);\n\n const mode = props.mode ?? 'server';\n const isServerMode = mode === 'server';\n\n const handleSortModelChange = useCallback((sortModel: GridSortModel) => {\n setSortModel(sortModel);\n }, []);\n\n const onFilterChange = useCallback((filterModel: GridFilterModel) => {\n setFilterModel(filterModel);\n }, []);\n\n const [rowCountState, setRowCountState] = useState(props.data?.rowCount ?? 0);\n\n async function getData(paginationModel: GridPaginationModel, sortModel: GridSortModel, filterModel: GridFilterModel) {\n if (isServerMode && props.getData) {\n const fetchData = async () => {\n await props.getData({ ...paginationModel, sortModel, filterModel });\n };\n\n setIsLoading(true);\n await fetchData();\n setIsLoading(false);\n }\n }\n\n useEffect(() => {\n setRowCountState((prevRowCountState) => props.data?.rowCount ?? prevRowCountState);\n }, [props.data?.rowCount, setRowCountState]);\n\n useEffect(() => {\n void getData(paginationModel, sortModel, filterModel);\n // ESLint tells us here that we should add the `getData` function, however,\n // doing so will cause the fetching to loop infinity until the JavaScript heap overflows.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [paginationModel, sortModel, filterModel]);\n\n const initialState: GridInitialState = useMemo(\n () => ({\n pagination: {\n paginationModel: {\n page: 0,\n pageSize: 10\n },\n rowCount: 0\n },\n sorting: {\n sortModel: props.initialSort ? [props.initialSort] : []\n },\n filter: {\n filterModel: {\n items: [],\n logicOperator: GridLogicOperator.And,\n quickFilterLogicOperator: GridLogicOperator.And,\n quickFilterValues: []\n }\n }\n }),\n [props.initialSort]\n );\n\n const mergedLocaleText = merge<\n Partial<GridLocaleText & { refreshTable: string }>,\n (GridLocaleText & { refreshTable: string }) | undefined\n >(\n {\n columnHeaderSortIconLabel: 'Sorteren',\n filterPanelColumns: 'Kolom',\n filterPanelInputLabel: 'Zoekterm',\n filterPanelInputPlaceholder: 'Zoeken...',\n toolbarQuickFilterPlaceholder: 'Zoeken...',\n toolbarQuickFilterLabel: 'Zoeken',\n toolbarQuickFilterDeleteIconLabel: 'Wissen',\n noRowsLabel: 'Geen regels beschikbaar',\n noResultsOverlayLabel: 'Geen regels gevonden.',\n paginationItemAriaLabel: (type) => {\n switch (type) {\n /* v8 ignore next */\n case 'first':\n /* v8 ignore next */\n return 'Ga naar eerste pagina';\n /* v8 ignore next */\n case 'last':\n /* v8 ignore next */\n return 'Ga naar laatste pagina';\n case 'next':\n return 'Ga naar volgende pagina';\n case 'previous':\n return 'Ga naar vorige pagina';\n }\n },\n paginationDisplayedRows: ({ from, to, count }) => `${from} - ${to} van ${count}`,\n paginationRowsPerPage: 'Regels per pagina',\n footerRowSelected: (count) => `${count} regels geselecteerd`\n },\n props.localeText\n );\n\n return (\n <DataGrid\n columns={props.columns}\n disableColumnFilter\n disableColumnMenu\n disableColumnSelector\n disableDensitySelector\n disableRowSelectionOnClick\n disableVirtualization\n filterMode={mode}\n getRowHeight={() => 'auto'}\n ignoreDiacritics\n initialState={initialState}\n loading={isLoading}\n localeText={mergedLocaleText}\n onFilterModelChange={onFilterChange}\n onPaginationModelChange={setPaginationModel}\n onSortModelChange={handleSortModelChange}\n pageSizeOptions={[5, 10, 20, 40, 80]}\n paginationMode={mode}\n paginationModel={paginationModel}\n rowCount={isServerMode ? rowCountState : undefined}\n rows={props.data?.rows}\n showToolbar\n slotProps={{\n filterPanel: {\n filterFormProps: {\n operatorInputProps: {\n disabled: true,\n sx: { display: 'none' }\n },\n valueInputProps: {\n sx: {\n marginLeft: '15px'\n }\n }\n }\n },\n panel: {\n target: filterButtonEl\n },\n toolbar: {\n setFilterButtonEl,\n showQuickFilter: true,\n quickFilterProps: { debounceMs: 500 },\n mode,\n getData: async () => getData(paginationModel, sortModel, filterModel),\n actionButtons: props.actionButtons,\n localeText: props.localeText\n },\n root: {\n 'data-qa': props['data-qa']\n }\n }}\n slots={{ toolbar: QuickSearchToolbar }}\n sortingMode={mode}\n sx={merge(\n {\n border: 0,\n color: 'var(--color-text)',\n letterSpacing: 'normal',\n minHeight: '300px',\n\n [`&.${gridClasses['root--densityCompact']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '8px'\n }\n },\n [`&.${gridClasses['root--densityStandard']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '15px'\n }\n },\n [`&.${gridClasses['root--densityComfortable']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '22px'\n }\n },\n\n /**\n * The 'no results' message does not show if the DataGrid does not have a fixed height.\n * Because a fixed height is not desirable, we set a min-height on the DataGrid and set\n * the min-height of the virtualScroller to half of that height.\n */\n [`.${gridClasses.virtualScroller}`]: {\n minHeight: '150px',\n overflow: 'hidden',\n position: 'relative'\n },\n\n [`.${gridClasses.columnHeader}`]: {\n '--DataGrid-containerBackground': 'var(--color-rijks-skyblue)',\n backgroundColor: 'var(--color-rijks-skyblue)',\n color: 'var(--color-text-light)'\n },\n\n [`.${gridClasses.row}`]: {\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n },\n\n ':nth-of-type(even)': {\n backgroundColor: 'var(--color-rijks-grey-1)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n }\n }\n },\n\n [`.${gridClasses.columnHeader}, .${gridClasses.cell}, .MuiDataGrid-columnsContainer`]: {\n borderRight: '1px solid var(--color-rijks-grey-2)'\n },\n\n [`.${gridClasses.cell}`]: {\n color: 'var(--color-text)'\n },\n\n [`.${paginationItemClasses.root}`]: {\n borderRadius: 0\n },\n\n [`.${checkboxClasses.root}`]: {\n color: 'var(--color-primary)',\n\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: '-9px',\n borderRadius: 0\n },\n\n ':disabled': {\n color: 'var(--color-disabled)'\n }\n },\n\n [`.${gridClasses.columnHeader} .${checkboxClasses.root}`]: {\n color: 'white'\n }\n },\n props.sx,\n FontNormalSxProps\n )}\n {...props.dataGridOverridableProps}\n />\n );\n}\n"],"names":["AoaTable","props","isLoading","setIsLoading","useState","paginationModel","setPaginationModel","sortModel","setSortModel","filterModel","setFilterModel","filterButtonEl","setFilterButtonEl","mode","isServerMode","handleSortModelChange","useCallback","onFilterChange","rowCountState","setRowCountState","getData","fetchData","useEffect","prevRowCountState","initialState","useMemo","GridLogicOperator","mergedLocaleText","merge","type","from","to","count","jsx","DataGrid","QuickSearchToolbar","gridClasses","paginationItemClasses","checkboxClasses","FontNormalSxProps"],"mappings":";;;;;;;AAmHO,SAASA,EAAiC,EAAE,GAAGC,KAA2B;AAC/E,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAiBC,CAAkB,IAAIF,EAA8B;AAAA,IAC1E,MAAM;AAAA,IACN,UAAU;AAAA,EAAA,CACX,GACK,CAACG,GAAWC,CAAY,IAAIJ,EAAwB,CAAA,CAAE,GACtD,CAACK,GAAaC,CAAc,IAAIN,EAA0B;AAAA,IAC9D,OAAO,CAAA;AAAA,EAAC,CACT,GACK,CAACO,GAAgBC,CAAiB,IAAIR,EAAmC,IAAI,GAE7ES,IAAOZ,EAAM,QAAQ,UACrBa,IAAeD,MAAS,UAExBE,IAAwBC,EAAY,CAACT,MAA6B;AACtE,IAAAC,EAAaD,CAAS;AAAA,EAAA,GACrB,EAAE,GAECU,IAAiBD,EAAY,CAACP,MAAiC;AACnE,IAAAC,EAAeD,CAAW;AAAA,EAAA,GACzB,EAAE,GAEC,CAACS,GAAeC,CAAgB,IAAIf,EAASH,EAAM,MAAM,YAAY,CAAC;AAE5E,iBAAemB,EAAQf,GAAsCE,GAA0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,EAAE,GAAG;AAAA,YACvB,UAAU;AAAA,cACR,iBAAiB;AAAA,YAAA;AAAA,YAGnB,sBAAsB;AAAA,cACpB,iBAAiB;AAAA,cAEjB,UAAU;AAAA,gBACR,iBAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UACF;AAAA,UAGF,CAAC,IAAIA,EAAY,YAAY,MAAMA,EAAY,IAAI,iCAAiC,GAAG;AAAA,YACrF,aAAa;AAAA,UAAA;AAAA,UAGf,CAAC,IAAIA,EAAY,IAAI,EAAE,GAAG;AAAA,YACxB,OAAO;AAAA,UAAA;AAAA,UAGT,CAAC,IAAIC,EAAsB,IAAI,EAAE,GAAG;AAAA,YAClC,cAAc;AAAA,UAAA;AAAA,UAGhB,CAAC,IAAIC,EAAgB,IAAI,EAAE,GAAG;AAAA,YAC5B,OAAO;AAAA,YAEP,UAAU;AAAA,cACR,SAAS;AAAA,cACT,eAAe;AAAA,cACf,cAAc;AAAA,YAAA;AAAA,YAGhB,aAAa;AAAA,cACX,OAAO;AAAA,YAAA;AAAA,UACT;AAAA,UAGF,CAAC,IAAIF,EAAY,YAAY,KAAKE,EAAgB,IAAI,EAAE,GAAG;AAAA,YACzD,OAAO;AAAA,UAAA;AAAA,QACT;AAAA,QAEFrC,EAAM;AAAA,QACNsC;AAAA,MAAA;AAAA,MAED,GAAGtC,EAAM;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../../src/components/atoms/table/Table.tsx"],"sourcesContent":["import { checkboxClasses, paginationItemClasses, type SxProps } from '@mui/material';\nimport {\n GridLogicOperator,\n DataGrid,\n gridClasses,\n type DataGridProps,\n type GridColDef,\n type GridGetRowsParams,\n type GridInitialState,\n type GridLocaleText,\n type GridPaginationModel,\n type GridRowModel,\n type GridValidRowModel,\n type GridSortModel,\n type GridFilterModel\n} from '@mui/x-data-grid';\nimport { merge } from 'lodash';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\nimport { QuickSearchToolbar } from './_QuickSearchToolbar';\n\nexport interface AoaTableData<T extends GridValidRowModel = GridValidRowModel> {\n /**\n * Additional `pageInfo` for advanced use-cases.\n * `hasNextPage`: When row count is unknown/estimated, `hasNextPage` will be used to check if more records are available on server.\n */\n pageInfo?: {\n hasNextPage?: boolean;\n nextCursor?: string;\n };\n /**\n * To reflect updates in total `rowCount` (optional).\n * Useful when the `rowCount` is inaccurate (for example when filtering) or not available upfront.\n */\n rowCount?: number;\n /**\n * The paged, filtered and sorted items from the database\n */\n rows: GridRowModel<T>[];\n}\n\nexport type AoaTableColumns<T extends object = any> = GridColDef<T>[];\n\nexport type AoaTableQueryOptions = GridPaginationModel & Omit<GridGetRowsParams, 'end' | 'paginationModel' | 'start'>;\n\ntype ModeProps =\n /**\n * Overwrites the default mode (server) when you need pagination, filtering and sorting on the client side\n */\n | { getData?: never; mode: 'client' }\n /**\n * The Redux action that takes PaginationModel as parameter to retrieve data from the server\n */\n | { getData(queryOptions: AoaTableQueryOptions): Promise<void> | void; mode?: 'server' };\n\nexport type AoaTableProps<T extends object = any> = ModeProps & {\n /**\n * Action buttons shown in the toolbar of the table\n */\n readonly actionButtons?: JSX.Element[];\n /**\n * The column structure to display the data\n */\n readonly columns: GridColDef<T>[];\n /**\n * The TableData object to be displayed in the table\n */\n readonly data: AoaTableData<T>;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * Overwrite a safe selection of the {@link DataGrid} properties\n */\n readonly dataGridOverridableProps?: Pick<\n DataGridProps<T>,\n | 'checkboxSelection'\n | 'disableColumnFilter'\n | 'disableRowSelectionOnClick'\n | 'getRowId'\n | 'ignoreDiacritics'\n | 'isRowSelectable'\n | 'loading'\n | 'onRowSelectionModelChange'\n | 'rowSelectionModel'\n >;\n /**\n * Sets the initial sortModel in case the required sorting differs from the back-end's default sorting\n */\n readonly initialSort?: { field: string; sort: 'asc' | 'desc' };\n /**\n * Overwrites the default labels when you need a different language than Dutch\n */\n readonly localeText?: GridLocaleText & { refreshTable: string };\n /**\n * Material UI's property to apply styling\n */\n readonly sx?: SxProps;\n};\n\n/**\n * Constructs a table using pre-defined Rijks styling\n *\n * @param props - Props to pass to the button\n * @example\n * ```jsx\n * <AoaTable\n * getData={(queryOptions) => getMockData(queryOptions)}\n * data={mockData}\n * columns={[{ field: \"id\" }, { field: \"title\" }, { field: \"completed\" }]}\n * />\n * ```\n */\n\nexport function AoaTable<T extends object = any>({ ...props }: AoaTableProps<T>) {\n const [isLoading, setIsLoading] = useState(false);\n const [paginationModel, setPaginationModel] = useState<GridPaginationModel>({\n page: 0,\n pageSize: 10\n });\n const [sortModel, setSortModel] = useState<GridSortModel>([]);\n const [filterModel, setFilterModel] = useState<GridFilterModel>({\n items: []\n });\n const [filterButtonEl, setFilterButtonEl] = useState<HTMLButtonElement | null>(null);\n\n const mode = props.mode ?? 'server';\n const isServerMode = mode === 'server';\n\n const handleSortModelChange = useCallback((sortModel: GridSortModel) => {\n setSortModel(sortModel);\n }, []);\n\n const onFilterChange = useCallback((filterModel: GridFilterModel) => {\n setFilterModel(filterModel);\n }, []);\n\n const [rowCountState, setRowCountState] = useState(props.data?.rowCount ?? 0);\n\n async function getData(paginationModel: GridPaginationModel, sortModel: GridSortModel, filterModel: GridFilterModel) {\n if (isServerMode && props.getData) {\n const fetchData = async () => {\n await props.getData({ ...paginationModel, sortModel, filterModel });\n };\n\n setIsLoading(true);\n await fetchData();\n setIsLoading(false);\n }\n }\n\n useEffect(() => {\n setRowCountState((prevRowCountState) => props.data?.rowCount ?? prevRowCountState);\n }, [props.data?.rowCount, setRowCountState]);\n\n useEffect(() => {\n void getData(paginationModel, sortModel, filterModel);\n // ESLint tells us here that we should add the `getData` function, however,\n // doing so will cause the fetching to loop infinity until the JavaScript heap overflows.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [paginationModel, sortModel, filterModel]);\n\n const initialState: GridInitialState = useMemo(\n () => ({\n pagination: {\n paginationModel: {\n page: 0,\n pageSize: 10\n },\n rowCount: 0\n },\n sorting: {\n sortModel: props.initialSort ? [props.initialSort] : []\n },\n filter: {\n filterModel: {\n items: [],\n logicOperator: GridLogicOperator.And,\n quickFilterLogicOperator: GridLogicOperator.And,\n quickFilterValues: []\n }\n }\n }),\n [props.initialSort]\n );\n\n const mergedLocaleText = merge<\n Partial<GridLocaleText & { refreshTable: string }>,\n (GridLocaleText & { refreshTable: string }) | undefined\n >(\n {\n columnHeaderSortIconLabel: 'Sorteren',\n filterPanelColumns: 'Kolom',\n filterPanelInputLabel: 'Zoekterm',\n filterPanelInputPlaceholder: 'Zoeken...',\n toolbarQuickFilterPlaceholder: 'Zoeken...',\n toolbarQuickFilterLabel: 'Zoeken',\n toolbarQuickFilterDeleteIconLabel: 'Wissen',\n noRowsLabel: 'Geen regels beschikbaar',\n noResultsOverlayLabel: 'Geen regels gevonden.',\n paginationItemAriaLabel: (type) => {\n switch (type) {\n /* v8 ignore next */\n case 'first':\n /* v8 ignore next */\n return 'Ga naar eerste pagina';\n /* v8 ignore next */\n case 'last':\n /* v8 ignore next */\n return 'Ga naar laatste pagina';\n case 'next':\n return 'Ga naar volgende pagina';\n case 'previous':\n return 'Ga naar vorige pagina';\n }\n },\n paginationDisplayedRows: ({ from, to, count }) => `${from} - ${to} van ${count}`,\n paginationRowsPerPage: 'Regels per pagina',\n footerRowSelected: (count) => `${count} regels geselecteerd`\n },\n props.localeText\n );\n\n return (\n <DataGrid\n columns={props.columns}\n disableColumnFilter\n disableColumnMenu\n disableColumnSelector\n disableDensitySelector\n disableRowSelectionOnClick\n disableVirtualization\n filterMode={mode}\n getRowHeight={() => 'auto'}\n ignoreDiacritics\n initialState={initialState}\n loading={isLoading}\n localeText={mergedLocaleText}\n onFilterModelChange={onFilterChange}\n onPaginationModelChange={setPaginationModel}\n onSortModelChange={handleSortModelChange}\n pageSizeOptions={[5, 10, 20, 40, 80]}\n paginationMode={mode}\n paginationModel={paginationModel}\n rowCount={isServerMode ? rowCountState : undefined}\n rows={props.data?.rows}\n showToolbar\n slotProps={{\n filterPanel: {\n filterFormProps: {\n operatorInputProps: {\n disabled: true,\n sx: { display: 'none' }\n },\n valueInputProps: {\n sx: {\n marginLeft: '15px'\n }\n }\n }\n },\n panel: {\n target: filterButtonEl\n },\n toolbar: {\n setFilterButtonEl,\n showQuickFilter: props.dataGridOverridableProps?.disableColumnFilter === false,\n quickFilterProps: { debounceMs: 500 },\n mode,\n getData: async () => getData(paginationModel, sortModel, filterModel),\n actionButtons: props.actionButtons,\n localeText: props.localeText\n },\n root: {\n 'data-qa': props['data-qa']\n }\n }}\n slots={{ toolbar: QuickSearchToolbar }}\n sortingMode={mode}\n sx={merge(\n {\n border: 0,\n color: 'var(--color-text)',\n letterSpacing: 'normal',\n minHeight: '300px',\n\n [`&.${gridClasses['root--densityCompact']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '8px'\n }\n },\n [`&.${gridClasses['root--densityStandard']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '15px'\n }\n },\n [`&.${gridClasses['root--densityComfortable']}`]: {\n [`.${gridClasses.cell}`]: {\n py: '22px'\n }\n },\n\n /**\n * The 'no results' message does not show if the DataGrid does not have a fixed height.\n * Because a fixed height is not desirable, we set a min-height on the DataGrid and set\n * the min-height of the virtualScroller to half of that height.\n */\n [`.${gridClasses.virtualScroller}`]: {\n minHeight: '150px',\n overflow: 'hidden',\n position: 'relative'\n },\n\n [`.${gridClasses.columnHeader}`]: {\n '--DataGrid-containerBackground': 'var(--color-rijks-skyblue)',\n backgroundColor: 'var(--color-rijks-skyblue)',\n color: 'var(--color-text-light)'\n },\n\n [`.${gridClasses.row}`]: {\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n },\n\n ':nth-of-type(even)': {\n backgroundColor: 'var(--color-rijks-grey-1)',\n\n ':hover': {\n backgroundColor: 'var(--color-rijks-skyblue-light)'\n }\n }\n },\n\n [`.${gridClasses.columnHeader}, .${gridClasses.cell}, .MuiDataGrid-columnsContainer`]: {\n borderRight: '1px solid var(--color-rijks-grey-2)'\n },\n\n [`.${gridClasses.cell}`]: {\n color: 'var(--color-text)'\n },\n\n [`.${paginationItemClasses.root}`]: {\n borderRadius: 0\n },\n\n [`.${checkboxClasses.root}`]: {\n color: 'var(--color-primary)',\n\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: '-9px',\n borderRadius: 0\n },\n\n ':disabled': {\n color: 'var(--color-disabled)'\n }\n },\n\n [`.${gridClasses.columnHeader} .${checkboxClasses.root}`]: {\n color: 'white'\n }\n },\n props.sx,\n FontNormalSxProps\n )}\n {...props.dataGridOverridableProps}\n />\n );\n}\n"],"names":["AoaTable","props","isLoading","setIsLoading","useState","paginationModel","setPaginationModel","sortModel","setSortModel","filterModel","setFilterModel","filterButtonEl","setFilterButtonEl","mode","isServerMode","handleSortModelChange","useCallback","onFilterChange","rowCountState","setRowCountState","getData","fetchData","useEffect","prevRowCountState","initialState","useMemo","GridLogicOperator","mergedLocaleText","merge","type","from","to","count","jsx","DataGrid","QuickSearchToolbar","gridClasses","paginationItemClasses","checkboxClasses","FontNormalSxProps"],"mappings":";;;;;;;AAmHO,SAASA,EAAiC,EAAE,GAAGC,KAA2B;AAC/E,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAiBC,CAAkB,IAAIF,EAA8B;AAAA,IAC1E,MAAM;AAAA,IACN,UAAU;AAAA,EAAA,CACX,GACK,CAACG,GAAWC,CAAY,IAAIJ,EAAwB,CAAA,CAAE,GACtD,CAACK,GAAaC,CAAc,IAAIN,EAA0B;AAAA,IAC9D,OAAO,CAAA;AAAA,EAAC,CACT,GACK,CAACO,GAAgBC,CAAiB,IAAIR,EAAmC,IAAI,GAE7ES,IAAOZ,EAAM,QAAQ,UACrBa,IAAeD,MAAS,UAExBE,IAAwBC,EAAY,CAACT,MAA6B;AACtE,IAAAC,EAAaD,CAAS;AAAA,EAAA,GACrB,EA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
|
+
showQuickFilter: boolean;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
|
-
export declare function QuickSearchToolbar({ mode, actionButtons, localeText, getData, setFilterButtonEl }: GridToolbarProps & ToolbarPropsOverrides): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function QuickSearchToolbar({ mode, actionButtons, localeText, showQuickFilter, getData, setFilterButtonEl }: GridToolbarProps & ToolbarPropsOverrides): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
//# sourceMappingURL=_QuickSearchToolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_QuickSearchToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/table/_QuickSearchToolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,QAAQ,EAAkB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI3E,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAiB,qBAAqB;QACpC,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAC9B,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;QAC1B,UAAU,CAAC,EAAE,cAAc,GAAG;YAC5B,YAAY,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAC1B,iBAAiB,EAAE,QAAQ,CAAC,cAAc,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"_QuickSearchToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/table/_QuickSearchToolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AA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