@rws-aoa/react-library 5.1.1 → 6.0.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/_constants.js.map +1 -1
- package/dist/chunks/FieldError.B8t3zEhf.js +143 -0
- package/dist/chunks/{FieldError.DAUtZvvC.js.map → FieldError.B8t3zEhf.js.map} +1 -1
- package/dist/chunks/{lodash.DOeeRDpT.js → lodash.CA_K01A9.js} +722 -717
- package/dist/chunks/{lodash.DOeeRDpT.js.map → lodash.CA_K01A9.js.map} +1 -1
- package/dist/components/atoms/_menu/menu-item/MenuItem.js +40 -41
- package/dist/components/atoms/_menu/menu-item/MenuItem.js.map +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.js +1 -1
- package/dist/components/atoms/_menu/user-menu/UserMenu.js.map +1 -1
- package/dist/components/atoms/button/Button.js +1 -1
- package/dist/components/atoms/button/Button.js.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.d.ts +1 -2
- package/dist/components/atoms/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/atoms/icon-button/IconButton.js +11 -10
- package/dist/components/atoms/icon-button/IconButton.js.map +1 -1
- package/dist/components/atoms/input/Input.d.ts +5 -0
- package/dist/components/atoms/input/Input.d.ts.map +1 -1
- package/dist/components/atoms/input/Input.js +57 -60
- package/dist/components/atoms/input/Input.js.map +1 -1
- package/dist/components/atoms/logo/Logo.js.map +1 -1
- package/dist/components/atoms/no-permission/NoPermission.js +13 -13
- package/dist/components/atoms/no-permission/NoPermission.js.map +1 -1
- package/dist/components/atoms/notification/Notification.js +1 -1
- package/dist/components/atoms/notification/Notification.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Error.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Info.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Success.js.map +1 -1
- package/dist/components/atoms/notification/_icons/Warning.js.map +1 -1
- package/dist/components/atoms/section-header/SectionHeader.js +1 -1
- package/dist/components/atoms/section-header/SectionHeader.js.map +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js +1 -1
- package/dist/components/atoms/selection-buttons/checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js +1 -1
- package/dist/components/atoms/selection-buttons/radio-button/RadioButton.js.map +1 -1
- package/dist/components/atoms/selection-buttons/switch-button/SwitchButton.js.map +1 -1
- package/dist/components/atoms/table/Table.d.ts +18 -27
- package/dist/components/atoms/table/Table.d.ts.map +1 -1
- package/dist/components/atoms/table/Table.js +134 -83
- package/dist/components/atoms/table/Table.js.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts +3 -2
- package/dist/components/atoms/table/_QuickSearchToolbar.d.ts.map +1 -1
- package/dist/components/atoms/table/_QuickSearchToolbar.js +3662 -95
- package/dist/components/atoms/table/_QuickSearchToolbar.js.map +1 -1
- package/dist/components/atoms/tooltip/Tooltip.js +1 -1
- package/dist/components/atoms/tooltip/Tooltip.js.map +1 -1
- package/dist/components/atoms/zero-width-space/ZeroWidthSpace.js.map +1 -1
- package/dist/components/molecules/field-error/FieldError.js +1 -1
- package/dist/components/molecules/file-dropzone/FileDropzone.js +34 -37
- package/dist/components/molecules/file-dropzone/FileDropzone.js.map +1 -1
- package/dist/components/molecules/file-table/FileTable.js +15 -15
- package/dist/components/molecules/file-table/FileTable.js.map +1 -1
- package/dist/components/molecules/form-error/FormError.js +1 -1
- package/dist/components/molecules/form-modal/FormModal.js +2 -2
- package/dist/components/molecules/modal/Modal.js +39 -39
- package/dist/components/molecules/modal/Modal.js.map +1 -1
- package/dist/components/molecules/modal-close-button/ModalCloseButton.js.map +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.js +1 -1
- package/dist/components/molecules/navigation-bar/NavigationBar.js.map +1 -1
- package/dist/components/molecules/upload-button/UploadButton.js +17 -17
- package/dist/components/molecules/upload-button/UploadButton.js.map +1 -1
- package/dist/components/organisms/content-page/ContentPage.js.map +1 -1
- package/dist/contexts/TanstackFormContext.d.ts +1 -1
- package/dist/contexts/TanstackFormContext.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +39 -48
- package/dist/chunks/FieldError.DAUtZvvC.js +0 -143
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Box as s, Typography as a, Divider as m, typographyClasses as l } from "@mui/material";
|
|
3
|
-
import { l as p } from "../../../chunks/lodash.
|
|
3
|
+
import { l as p } from "../../../chunks/lodash.CA_K01A9.js";
|
|
4
4
|
import { memo as x } from "react";
|
|
5
5
|
const h = x(
|
|
6
6
|
({ title: i, subtitle: t = "", children: e, ...r }) => /* @__PURE__ */ n(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.js","sources":["../../../../src/components/atoms/section-header/SectionHeader.tsx"],"sourcesContent":["import { Box, Divider, Typography, typographyClasses, type BoxProps } from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type PropsWithChildren, type ReactNode } from 'react';\n\nexport interface AoaSectionHeaderProps extends Omit<BoxProps, 'title'> {\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The content to show as subtitle, lighter grey and below the title\n */\n readonly subtitle?: ReactNode;\n /**\n * The title to show in the first Typography component\n */\n readonly title: ReactNode;\n}\n\n/**\n * Constructs a section header using pre-defined Rijks styling\n *\n * @param props - Props to pass to the section header\n * @example\n * ```jsx\n * <AoaSectionHeader title='This is a title' subtitle='And this is a subtitle' />\n * ```\n */\nexport const AoaSectionHeader = memo(\n ({ title, subtitle = '', children, ...props }: PropsWithChildren<AoaSectionHeaderProps>) => {\n return (\n <Box\n {...props}\n sx={merge(\n {\n marginRight: 0,\n marginBottom: 2,\n 'breakpoints.down(\"sm\")': {\n flexBasis: '100%',\n width: '100%',\n marginRight: 0,\n\n '&:not(:first-of-type)': {\n marginTop: 3\n }\n },\n [`.${typographyClasses.root}`]: {\n fontFamily: 'var(--font-text)'\n }\n },\n props.sx\n )}\n >\n <Typography\n color='textPrimary'\n component='h1'\n data-qa='section-title'\n sx={{ fontSize: 'var(--font-size-h1)' }}\n variant='h5'\n >\n {title}\n </Typography>\n {Boolean(subtitle) && (\n <Typography\n color='textSecondary'\n component='span'\n data-qa='section-subtitle'\n sx={{ fontSize: 'var(--font-size-text)' }}\n variant='subtitle1'\n >\n {subtitle}\n </Typography>\n )}\n <Divider\n sx={{\n backgroundColor: 'var(--color-rijks-skyblue)',\n marginBottom: 3,\n paddingBottom: 0.25\n }}\n />\n {children}\n </Box>\n );\n }\n);\n"],"names":["AoaSectionHeader","memo","title","subtitle","children","props","jsxs","Box","merge","typographyClasses","jsx","Typography","Divider"],"mappings":";;;;AA4BO,MAAMA,IAAmBC;AAAA,EAC9B,CAAC,EAAE,OAAAC,GAAO,UAAAC,IAAW,IAAI,UAAAC,GAAU,GAAGC,QAElC,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,IAAIG,
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sources":["../../../../src/components/atoms/section-header/SectionHeader.tsx"],"sourcesContent":["import { Box, Divider, Typography, typographyClasses, type BoxProps } from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type PropsWithChildren, type ReactNode } from 'react';\n\nexport interface AoaSectionHeaderProps extends Omit<BoxProps, 'title'> {\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The content to show as subtitle, lighter grey and below the title\n */\n readonly subtitle?: ReactNode;\n /**\n * The title to show in the first Typography component\n */\n readonly title: ReactNode;\n}\n\n/**\n * Constructs a section header using pre-defined Rijks styling\n *\n * @param props - Props to pass to the section header\n * @example\n * ```jsx\n * <AoaSectionHeader title='This is a title' subtitle='And this is a subtitle' />\n * ```\n */\nexport const AoaSectionHeader = memo(\n ({ title, subtitle = '', children, ...props }: PropsWithChildren<AoaSectionHeaderProps>) => {\n return (\n <Box\n {...props}\n sx={merge(\n {\n marginRight: 0,\n marginBottom: 2,\n 'breakpoints.down(\"sm\")': {\n flexBasis: '100%',\n width: '100%',\n marginRight: 0,\n\n '&:not(:first-of-type)': {\n marginTop: 3\n }\n },\n [`.${typographyClasses.root}`]: {\n fontFamily: 'var(--font-text)'\n }\n },\n props.sx\n )}\n >\n <Typography\n color='textPrimary'\n component='h1'\n data-qa='section-title'\n sx={{ fontSize: 'var(--font-size-h1)' }}\n variant='h5'\n >\n {title}\n </Typography>\n {Boolean(subtitle) && (\n <Typography\n color='textSecondary'\n component='span'\n data-qa='section-subtitle'\n sx={{ fontSize: 'var(--font-size-text)' }}\n variant='subtitle1'\n >\n {subtitle}\n </Typography>\n )}\n <Divider\n sx={{\n backgroundColor: 'var(--color-rijks-skyblue)',\n marginBottom: 3,\n paddingBottom: 0.25\n }}\n />\n {children}\n </Box>\n );\n }\n);\n"],"names":["AoaSectionHeader","memo","title","subtitle","children","props","jsxs","Box","merge","typographyClasses","jsx","Typography","Divider"],"mappings":";;;;AA4BO,MAAMA,IAAmBC;AAAA,EAC9B,CAAC,EAAE,OAAAC,GAAO,UAAAC,IAAW,IAAI,UAAAC,GAAU,GAAGC,QAElC,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,IAAIG,EAAAA;AAAAA,QACF;AAAA,UACE,aAAa;AAAA,UACb,cAAc;AAAA,UACd,0BAA0B;AAAA,YACxB,WAAW;AAAA,YACX,OAAO;AAAA,YACP,aAAa;AAAA,YAEb,yBAAyB;AAAA,cACvB,WAAW;AAAA,YAAA;AAAA,UACb;AAAA,UAEF,CAAC,IAAIC,EAAkB,IAAI,EAAE,GAAG;AAAA,YAC9B,YAAY;AAAA,UAAA;AAAA,QACd;AAAA,QAEFJ,EAAM;AAAA,MAAA;AAAA,MAGR,UAAA;AAAA,QAAA,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAQ;AAAA,YACR,IAAI,EAAE,UAAU,sBAAA;AAAA,YAChB,SAAQ;AAAA,YAEP,UAAAT;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,EAAQC,KACP,gBAAAO;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAQ;AAAA,YACR,IAAI,EAAE,UAAU,wBAAA;AAAA,YAChB,SAAQ;AAAA,YAEP,UAAAR;AAAA,UAAA;AAAA,QAAA;AAAA,QAGL,gBAAAO;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,cACF,iBAAiB;AAAA,cACjB,cAAc;AAAA,cACd,eAAe;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,QAEDR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIT;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { CheckBoxOutlineBlank as t, CheckBox as l } from "@mui/icons-material";
|
|
3
3
|
import { FormControlLabel as i, typographyClasses as m, Checkbox as s } from "@mui/material";
|
|
4
|
-
import { l as a } from "../../../../chunks/lodash.
|
|
4
|
+
import { l as a } from "../../../../chunks/lodash.CA_K01A9.js";
|
|
5
5
|
import { memo as c } from "react";
|
|
6
6
|
import { FontNormalSxProps as n } from "../../../../_constants.js";
|
|
7
7
|
const k = c(({ label: e, ...r }) => /* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/atoms/selection-buttons/checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckBox as CheckBoxIcon, CheckBoxOutlineBlank as CheckBoxOutlineBlankIcon } from '@mui/icons-material';\nimport {\n Checkbox as MUICheckbox,\n FormControlLabel as MUIFormControlLabel,\n typographyClasses,\n type CheckboxProps as MUICheckboxProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaCheckboxProps extends Omit<MUICheckboxProps, 'checkedIcon' | 'icon'> {\n /**\n * Whether this checkbox is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the checkbox\n */\n readonly label: string;\n}\n\n/**\n * Constructs a checkbox using pre-defined Rijks styling\n *\n * @param props - Props to pass to the checkbox\n * @example\n * ```jsx\n * <AoaCheckbox label=\"Demo checkbox\" checked={true} onChange={handleChange} />} />\n * ```\n */\n\nexport const AoaCheckbox = memo(({ label, ...props }: AoaCheckboxProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={\n <MUICheckbox\n {...props}\n checkedIcon={<CheckBoxIcon color='inherit' fontSize='small' />}\n icon={<CheckBoxOutlineBlankIcon color='inherit' fontSize='small' />}\n sx={merge(\n {\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 props.sx\n )}\n />\n }\n label={label}\n sx={{ [`.${typographyClasses.root}`]: FontNormalSxProps }}\n />\n );\n});\n"],"names":["AoaCheckbox","memo","label","props","jsx","MUIFormControlLabel","MUICheckbox","CheckBoxIcon","CheckBoxOutlineBlankIcon","merge","typographyClasses","FontNormalSxProps"],"mappings":";;;;;;AAoCO,MAAMA,IAAcC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAEzC,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SACE,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACE,GAAGH;AAAA,QACJ,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/atoms/selection-buttons/checkbox/Checkbox.tsx"],"sourcesContent":["import { CheckBox as CheckBoxIcon, CheckBoxOutlineBlank as CheckBoxOutlineBlankIcon } from '@mui/icons-material';\nimport {\n Checkbox as MUICheckbox,\n FormControlLabel as MUIFormControlLabel,\n typographyClasses,\n type CheckboxProps as MUICheckboxProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaCheckboxProps extends Omit<MUICheckboxProps, 'checkedIcon' | 'icon'> {\n /**\n * Whether this checkbox is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the checkbox\n */\n readonly label: string;\n}\n\n/**\n * Constructs a checkbox using pre-defined Rijks styling\n *\n * @param props - Props to pass to the checkbox\n * @example\n * ```jsx\n * <AoaCheckbox label=\"Demo checkbox\" checked={true} onChange={handleChange} />} />\n * ```\n */\n\nexport const AoaCheckbox = memo(({ label, ...props }: AoaCheckboxProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={\n <MUICheckbox\n {...props}\n checkedIcon={<CheckBoxIcon color='inherit' fontSize='small' />}\n icon={<CheckBoxOutlineBlankIcon color='inherit' fontSize='small' />}\n sx={merge(\n {\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 props.sx\n )}\n />\n }\n label={label}\n sx={{ [`.${typographyClasses.root}`]: FontNormalSxProps }}\n />\n );\n});\n"],"names":["AoaCheckbox","memo","label","props","jsx","MUIFormControlLabel","MUICheckbox","CheckBoxIcon","CheckBoxOutlineBlankIcon","merge","typographyClasses","FontNormalSxProps"],"mappings":";;;;;;AAoCO,MAAMA,IAAcC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAEzC,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SACE,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACE,GAAGH;AAAA,QACJ,aAAa,gBAAAC,EAACG,GAAA,EAAa,OAAM,WAAU,UAAS,SAAQ;AAAA,QAC5D,MAAM,gBAAAH,EAACI,GAAA,EAAyB,OAAM,WAAU,UAAS,SAAQ;AAAA,QACjE,IAAIC,EAAAA;AAAAA,UACF;AAAA,YACE,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,UAEFN,EAAM;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,IAGJ,OAAAD;AAAA,IACA,IAAI,EAAE,CAAC,IAAIQ,EAAkB,IAAI,EAAE,GAAGC,EAAA;AAAA,EAAkB;AAAA,CAG7D;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { FormControlLabel as a, typographyClasses as l, Radio as m } from "@mui/material";
|
|
3
|
-
import { l as s } from "../../../../chunks/lodash.
|
|
3
|
+
import { l as s } from "../../../../chunks/lodash.CA_K01A9.js";
|
|
4
4
|
import { memo as e } from "react";
|
|
5
5
|
import { FontNormalSxProps as i } from "../../../../_constants.js";
|
|
6
6
|
const n = e(({ label: t, ...o }) => /* @__PURE__ */ r(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sources":["../../../../../src/components/atoms/selection-buttons/radio-button/RadioButton.tsx"],"sourcesContent":["import {\n FormControlLabel as MUIFormControlLabel,\n Radio as MUIRadioButton,\n typographyClasses,\n type RadioProps as MUIRadioButtonProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaRadioButtonProps extends MUIRadioButtonProps {\n /**\n * Whether this radio button is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the radio button\n */\n readonly label: string;\n}\n\n/**\n * Constructs a radio button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the radio button\n * @example\n * ```jsx\n * <AoaRadioButton label=\"Demo radio button\" />} />\n * ```\n */\n\nexport const AoaRadioButton = memo(({ label, ...props }: AoaRadioButtonProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={\n <MUIRadioButton\n {...props}\n sx={merge(\n {\n color: 'var(--color-primary)',\n\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: '-8px'\n },\n\n ':disabled': {\n color: 'var(--color-disabled)'\n }\n },\n props.sx\n )}\n />\n }\n label={label}\n sx={{ [`.${typographyClasses.root}`]: FontNormalSxProps }}\n />\n );\n});\n"],"names":["AoaRadioButton","memo","label","props","jsx","MUIFormControlLabel","MUIRadioButton","merge","typographyClasses","FontNormalSxProps"],"mappings":";;;;;AAmCO,MAAMA,IAAiBC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAE5C,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SACE,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACE,GAAGH;AAAA,QACJ,IAAII,
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sources":["../../../../../src/components/atoms/selection-buttons/radio-button/RadioButton.tsx"],"sourcesContent":["import {\n FormControlLabel as MUIFormControlLabel,\n Radio as MUIRadioButton,\n typographyClasses,\n type RadioProps as MUIRadioButtonProps\n} from '@mui/material';\nimport { merge } from 'lodash';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaRadioButtonProps extends MUIRadioButtonProps {\n /**\n * Whether this radio button is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the radio button\n */\n readonly label: string;\n}\n\n/**\n * Constructs a radio button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the radio button\n * @example\n * ```jsx\n * <AoaRadioButton label=\"Demo radio button\" />} />\n * ```\n */\n\nexport const AoaRadioButton = memo(({ label, ...props }: AoaRadioButtonProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={\n <MUIRadioButton\n {...props}\n sx={merge(\n {\n color: 'var(--color-primary)',\n\n ':focus': {\n outline: '2px dashed var(--color-text)',\n outlineOffset: '-8px'\n },\n\n ':disabled': {\n color: 'var(--color-disabled)'\n }\n },\n props.sx\n )}\n />\n }\n label={label}\n sx={{ [`.${typographyClasses.root}`]: FontNormalSxProps }}\n />\n );\n});\n"],"names":["AoaRadioButton","memo","label","props","jsx","MUIFormControlLabel","MUIRadioButton","merge","typographyClasses","FontNormalSxProps"],"mappings":";;;;;AAmCO,MAAMA,IAAiBC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAE5C,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SACE,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACE,GAAGH;AAAA,QACJ,IAAII,EAAAA;AAAAA,UACF;AAAA,YACE,OAAO;AAAA,YAEP,UAAU;AAAA,cACR,SAAS;AAAA,cACT,eAAe;AAAA,YAAA;AAAA,YAGjB,aAAa;AAAA,cACX,OAAO;AAAA,YAAA;AAAA,UACT;AAAA,UAEFJ,EAAM;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,IAGJ,OAAAD;AAAA,IACA,IAAI,EAAE,CAAC,IAAIM,EAAkB,IAAI,EAAE,GAAGC,EAAA;AAAA,EAAkB;AAAA,CAG7D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchButton.js","sources":["../../../../../src/components/atoms/selection-buttons/switch-button/SwitchButton.tsx"],"sourcesContent":["import {\n FormControlLabel as MUIFormControlLabel,\n Switch as MUISwitchButton,\n typographyClasses,\n type SwitchProps as MUISwitchButtonProps,\n switchClasses\n} from '@mui/material';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaSwitchButtonProps extends MUISwitchButtonProps {\n /**\n * Whether this switch button is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the switch button\n */\n readonly label: string;\n}\n\n/**\n * Constructs a switch button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the switch button\n * @example\n * ```jsx\n * <AoaSwitchButton label=\"Demo switch button\" checked={true} onChange={handleChange} />} />\n * ```\n */\n\nexport const AoaSwitchButton = memo(({ label, ...props }: AoaSwitchButtonProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={<MUISwitchButton {...props} />}\n label={label}\n sx={{\n [`.${typographyClasses.root}`]: FontNormalSxProps,\n [`.${switchClasses.root}`]: {\n color: 'var(--color-primary)',\n width: '64px',\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 [`.${switchClasses.track}`]: {\n height: '22px',\n marginTop: '-4px',\n marginLeft: '-3px',\n borderRadius: '11px'\n }\n }\n }}\n />\n );\n});\n"],"names":["AoaSwitchButton","memo","label","props","jsx","MUIFormControlLabel","MUISwitchButton","typographyClasses","FontNormalSxProps","switchClasses"],"mappings":";;;;AAmCO,MAAMA,IAAkBC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAE7C,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SAAS,gBAAAD,EAACE,
|
|
1
|
+
{"version":3,"file":"SwitchButton.js","sources":["../../../../../src/components/atoms/selection-buttons/switch-button/SwitchButton.tsx"],"sourcesContent":["import {\n FormControlLabel as MUIFormControlLabel,\n Switch as MUISwitchButton,\n typographyClasses,\n type SwitchProps as MUISwitchButtonProps,\n switchClasses\n} from '@mui/material';\nimport { memo, type ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../../_constants';\n\nexport interface AoaSwitchButtonProps extends MUISwitchButtonProps {\n /**\n * Whether this switch button is checked\n */\n readonly checked: boolean;\n /**\n * Data-qa tag for E2E test purposes\n */\n readonly 'data-qa'?: string;\n /**\n * The label that is shown after the switch button\n */\n readonly label: string;\n}\n\n/**\n * Constructs a switch button using pre-defined Rijks styling\n *\n * @param props - Props to pass to the switch button\n * @example\n * ```jsx\n * <AoaSwitchButton label=\"Demo switch button\" checked={true} onChange={handleChange} />} />\n * ```\n */\n\nexport const AoaSwitchButton = memo(({ label, ...props }: AoaSwitchButtonProps): ReactNode => {\n return (\n <MUIFormControlLabel\n control={<MUISwitchButton {...props} />}\n label={label}\n sx={{\n [`.${typographyClasses.root}`]: FontNormalSxProps,\n [`.${switchClasses.root}`]: {\n color: 'var(--color-primary)',\n width: '64px',\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 [`.${switchClasses.track}`]: {\n height: '22px',\n marginTop: '-4px',\n marginLeft: '-3px',\n borderRadius: '11px'\n }\n }\n }}\n />\n );\n});\n"],"names":["AoaSwitchButton","memo","label","props","jsx","MUIFormControlLabel","MUISwitchButton","typographyClasses","FontNormalSxProps","switchClasses"],"mappings":";;;;AAmCO,MAAMA,IAAkBC,EAAK,CAAC,EAAE,OAAAC,GAAO,GAAGC,QAE7C,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,SAAS,gBAAAD,EAACE,GAAA,EAAiB,GAAGH,EAAA,CAAO;AAAA,IACrC,OAAAD;AAAA,IACA,IAAI;AAAA,MACF,CAAC,IAAIK,EAAkB,IAAI,EAAE,GAAGC;AAAA,MAChC,CAAC,IAAIC,EAAc,IAAI,EAAE,GAAG;AAAA,QAC1B,OAAO;AAAA,QACP,OAAO;AAAA,QAEP,UAAU;AAAA,UACR,SAAS;AAAA,UACT,eAAe;AAAA,UACf,cAAc;AAAA,QAAA;AAAA,QAGhB,aAAa;AAAA,UACX,OAAO;AAAA,QAAA;AAAA,QAGT,CAAC,IAAIA,EAAc,KAAK,EAAE,GAAG;AAAA,UAC3B,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,YAAY;AAAA,UACZ,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,CAGL;"}
|
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
-
import { DataGridProps, GridColDef,
|
|
3
|
-
export interface AoaTableData<T extends
|
|
2
|
+
import { DataGridProps, GridColDef, GridGetRowsParams, GridLocaleText, GridPaginationModel, GridRowModel, GridValidRowModel } from '@mui/x-data-grid';
|
|
3
|
+
export interface AoaTableData<T extends GridValidRowModel = GridValidRowModel> {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
items: T[];
|
|
8
|
-
/**
|
|
9
|
-
* The total number of items present in the database table
|
|
10
|
-
*/
|
|
11
|
-
totalItems: number;
|
|
12
|
-
}
|
|
13
|
-
export type AoaTableColumns<T extends object = any> = GridColDef<T>[];
|
|
14
|
-
export interface AoaTableQueryOptions {
|
|
15
|
-
/**
|
|
16
|
-
* Material UI's GridFilterModel
|
|
17
|
-
*/
|
|
18
|
-
filterModel: GridFilterModel;
|
|
19
|
-
/**
|
|
20
|
-
* The current page of the table
|
|
5
|
+
* Additional `pageInfo` for advanced use-cases.
|
|
6
|
+
* `hasNextPage`: When row count is unknown/estimated, `hasNextPage` will be used to check if more records are available on server.
|
|
21
7
|
*/
|
|
22
|
-
|
|
8
|
+
pageInfo?: {
|
|
9
|
+
hasNextPage?: boolean;
|
|
10
|
+
nextCursor?: string;
|
|
11
|
+
};
|
|
23
12
|
/**
|
|
24
|
-
*
|
|
13
|
+
* To reflect updates in total `rowCount` (optional).
|
|
14
|
+
* Useful when the `rowCount` is inaccurate (for example when filtering) or not available upfront.
|
|
25
15
|
*/
|
|
26
|
-
|
|
16
|
+
rowCount?: number;
|
|
27
17
|
/**
|
|
28
|
-
*
|
|
18
|
+
* The paged, filtered and sorted items from the database
|
|
29
19
|
*/
|
|
30
|
-
|
|
20
|
+
rows: GridRowModel<T>[];
|
|
31
21
|
}
|
|
22
|
+
export type AoaTableColumns<T extends object = any> = GridColDef<T>[];
|
|
23
|
+
export type AoaTableQueryOptions = GridPaginationModel & Omit<GridGetRowsParams, 'end' | 'paginationModel' | 'start'>;
|
|
32
24
|
type ModeProps =
|
|
33
25
|
/**
|
|
34
26
|
* Overwrites the default mode (server) when you need pagination, filtering and sorting on the client side
|
|
@@ -42,7 +34,7 @@ type ModeProps =
|
|
|
42
34
|
*/
|
|
43
35
|
| {
|
|
44
36
|
getData(queryOptions: AoaTableQueryOptions): Promise<void> | void;
|
|
45
|
-
mode?:
|
|
37
|
+
mode?: 'server';
|
|
46
38
|
};
|
|
47
39
|
export type AoaTableProps<T extends object = any> = ModeProps & {
|
|
48
40
|
/**
|
|
@@ -64,7 +56,7 @@ export type AoaTableProps<T extends object = any> = ModeProps & {
|
|
|
64
56
|
/**
|
|
65
57
|
* Overwrite a safe selection of the {@link DataGrid} properties
|
|
66
58
|
*/
|
|
67
|
-
readonly dataGridOverridableProps?: Pick<DataGridProps<T>, 'checkboxSelection' | 'disableRowSelectionOnClick' | 'getRowId' | 'ignoreDiacritics' | 'isRowSelectable' | 'loading' | 'onRowSelectionModelChange' | 'rowSelectionModel'>;
|
|
59
|
+
readonly dataGridOverridableProps?: Pick<DataGridProps<T>, 'checkboxSelection' | 'disableColumnFilter' | 'disableRowSelectionOnClick' | 'getRowId' | 'ignoreDiacritics' | 'isRowSelectable' | 'loading' | 'onRowSelectionModelChange' | 'rowSelectionModel'>;
|
|
68
60
|
/**
|
|
69
61
|
* Sets the initial sortModel in case the required sorting differs from the back-end's default sorting
|
|
70
62
|
*/
|
|
@@ -96,7 +88,6 @@ export type AoaTableProps<T extends object = any> = ModeProps & {
|
|
|
96
88
|
* />
|
|
97
89
|
* ```
|
|
98
90
|
*/
|
|
99
|
-
declare function
|
|
100
|
-
export declare const AoaTable: typeof NonMemoizeAoaTable;
|
|
91
|
+
export declare function AoaTable<T extends object = any>({ ...props }: AoaTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
101
92
|
export {};
|
|
102
93
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAGvB,MAAM,kBAAkB,CAAC;AAM1B,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IAC3E;;;OAGG;IACH,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAC;AAEtH,KAAK,SAAS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G,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,2CA+P9E"}
|
|
@@ -1,110 +1,162 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { checkboxClasses as
|
|
3
|
-
import { DataGrid as
|
|
4
|
-
import { l as
|
|
5
|
-
import {
|
|
6
|
-
import { FontNormalSxProps as
|
|
7
|
-
import { QuickSearchToolbar as
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
const [C, u] = l(!1), [i, S] = l({
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { checkboxClasses as b, paginationItemClasses as G } from "@mui/material";
|
|
3
|
+
import { GridLogicOperator as f, DataGrid as I, gridClasses as t } from "@mui/x-data-grid";
|
|
4
|
+
import { l as p } from "../../../chunks/lodash.CA_K01A9.js";
|
|
5
|
+
import { useState as r, useCallback as k, useEffect as v, useMemo as O } from "react";
|
|
6
|
+
import { FontNormalSxProps as T } from "../../../_constants.js";
|
|
7
|
+
import { QuickSearchToolbar as j } from "./_QuickSearchToolbar.js";
|
|
8
|
+
function Z({ ...e }) {
|
|
9
|
+
const [h, d] = r(!1), [l, x] = r({
|
|
11
10
|
page: 0,
|
|
12
11
|
pageSize: 10
|
|
13
|
-
}), [
|
|
12
|
+
}), [i, C] = r([]), [n, S] = r({
|
|
14
13
|
items: []
|
|
15
|
-
}), r = e.mode ?? "server",
|
|
16
|
-
|
|
17
|
-
}, []),
|
|
18
|
-
|
|
19
|
-
}, []), [
|
|
20
|
-
async function
|
|
21
|
-
if (
|
|
14
|
+
}), [w, M] = r(null), a = e.mode ?? "server", u = a === "server", y = k((o) => {
|
|
15
|
+
C(o);
|
|
16
|
+
}, []), $ = k((o) => {
|
|
17
|
+
S(o);
|
|
18
|
+
}, []), [P, g] = r(e.data?.rowCount ?? 0);
|
|
19
|
+
async function m(o, s, c) {
|
|
20
|
+
if (u && e.getData) {
|
|
22
21
|
const D = async () => {
|
|
23
|
-
await e.getData({ ...
|
|
22
|
+
await e.getData({ ...o, sortModel: s, filterModel: c });
|
|
24
23
|
};
|
|
25
|
-
|
|
24
|
+
d(!0), await D(), d(!1);
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
g((
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
v(() => {
|
|
28
|
+
g((o) => e.data?.rowCount ?? o);
|
|
29
|
+
}, [e.data?.rowCount, g]), v(() => {
|
|
30
|
+
m(l, i, n);
|
|
31
|
+
}, [l, i, n]);
|
|
32
|
+
const F = O(
|
|
33
|
+
() => ({
|
|
34
|
+
pagination: {
|
|
35
|
+
paginationModel: {
|
|
36
|
+
page: 0,
|
|
37
|
+
pageSize: 10
|
|
38
|
+
},
|
|
39
|
+
rowCount: 0
|
|
40
|
+
},
|
|
41
|
+
sorting: {
|
|
42
|
+
sortModel: e.initialSort ? [e.initialSort] : []
|
|
43
|
+
},
|
|
44
|
+
filter: {
|
|
45
|
+
filterModel: {
|
|
46
|
+
items: [],
|
|
47
|
+
logicOperator: f.And,
|
|
48
|
+
quickFilterLogicOperator: f.And,
|
|
49
|
+
quickFilterValues: []
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
[e.initialSort]
|
|
54
|
+
), L = p.merge(
|
|
55
|
+
{
|
|
56
|
+
columnHeaderSortIconLabel: "Sorteren",
|
|
57
|
+
filterPanelColumns: "Kolom",
|
|
58
|
+
filterPanelInputLabel: "Zoekterm",
|
|
59
|
+
filterPanelInputPlaceholder: "Zoeken...",
|
|
60
|
+
toolbarQuickFilterPlaceholder: "Zoeken...",
|
|
61
|
+
toolbarQuickFilterLabel: "Zoeken",
|
|
62
|
+
toolbarQuickFilterDeleteIconLabel: "Wissen",
|
|
63
|
+
noRowsLabel: "Geen regels beschikbaar",
|
|
64
|
+
noResultsOverlayLabel: "Geen regels gevonden.",
|
|
65
|
+
paginationItemAriaLabel: (o) => {
|
|
66
|
+
switch (o) {
|
|
67
|
+
/* v8 ignore next */
|
|
68
|
+
case "first":
|
|
69
|
+
return "Ga naar eerste pagina";
|
|
70
|
+
/* v8 ignore next */
|
|
71
|
+
case "last":
|
|
72
|
+
return "Ga naar laatste pagina";
|
|
73
|
+
case "next":
|
|
74
|
+
return "Ga naar volgende pagina";
|
|
75
|
+
case "previous":
|
|
76
|
+
return "Ga naar vorige pagina";
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
paginationDisplayedRows: ({ from: o, to: s, count: c }) => `${o} - ${s} van ${c}`,
|
|
80
|
+
paginationRowsPerPage: "Regels per pagina",
|
|
81
|
+
footerRowSelected: (o) => `${o} regels geselecteerd`
|
|
82
|
+
},
|
|
83
|
+
e.localeText
|
|
84
|
+
);
|
|
85
|
+
return /* @__PURE__ */ R(
|
|
86
|
+
I,
|
|
37
87
|
{
|
|
38
88
|
columns: e.columns,
|
|
39
|
-
"data-qa": e["data-qa"],
|
|
40
89
|
disableColumnFilter: !0,
|
|
41
90
|
disableColumnMenu: !0,
|
|
42
91
|
disableColumnSelector: !0,
|
|
43
92
|
disableDensitySelector: !0,
|
|
44
93
|
disableRowSelectionOnClick: !0,
|
|
45
94
|
disableVirtualization: !0,
|
|
46
|
-
filterMode:
|
|
95
|
+
filterMode: a,
|
|
47
96
|
getRowHeight: () => "auto",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
columnHeaderSortIconLabel: "Sorteren",
|
|
56
|
-
toolbarQuickFilterPlaceholder: "Zoeken...",
|
|
57
|
-
toolbarQuickFilterLabel: "Zoeken",
|
|
58
|
-
toolbarQuickFilterDeleteIconLabel: "Wissen",
|
|
59
|
-
noRowsLabel: "Geen regels beschikbaar",
|
|
60
|
-
noResultsOverlayLabel: "Geen regels gevonden.",
|
|
61
|
-
MuiTablePagination: {
|
|
62
|
-
labelDisplayedRows: ({ from: t, to: a, count: d }) => `${t} - ${a} van ${d}`,
|
|
63
|
-
labelRowsPerPage: "Regels per pagina"
|
|
64
|
-
},
|
|
65
|
-
footerRowSelected: (t) => `${t} regels geselecteerd`
|
|
66
|
-
},
|
|
67
|
-
onFilterModelChange: w,
|
|
68
|
-
onPaginationModelChange: S,
|
|
69
|
-
onSortModelChange: $,
|
|
97
|
+
ignoreDiacritics: !0,
|
|
98
|
+
initialState: F,
|
|
99
|
+
loading: h,
|
|
100
|
+
localeText: L,
|
|
101
|
+
onFilterModelChange: $,
|
|
102
|
+
onPaginationModelChange: x,
|
|
103
|
+
onSortModelChange: y,
|
|
70
104
|
pageSizeOptions: [5, 10, 20, 40, 80],
|
|
71
|
-
paginationMode:
|
|
72
|
-
paginationModel:
|
|
73
|
-
rowCount:
|
|
74
|
-
rows:
|
|
105
|
+
paginationMode: a,
|
|
106
|
+
paginationModel: l,
|
|
107
|
+
rowCount: u ? P : void 0,
|
|
108
|
+
rows: e.data?.rows,
|
|
109
|
+
showToolbar: !0,
|
|
75
110
|
slotProps: {
|
|
111
|
+
filterPanel: {
|
|
112
|
+
filterFormProps: {
|
|
113
|
+
operatorInputProps: {
|
|
114
|
+
disabled: !0,
|
|
115
|
+
sx: { display: "none" }
|
|
116
|
+
},
|
|
117
|
+
valueInputProps: {
|
|
118
|
+
sx: {
|
|
119
|
+
marginLeft: "15px"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
panel: {
|
|
125
|
+
target: w
|
|
126
|
+
},
|
|
76
127
|
toolbar: {
|
|
128
|
+
setFilterButtonEl: M,
|
|
77
129
|
showQuickFilter: !0,
|
|
78
130
|
quickFilterProps: { debounceMs: 500 },
|
|
79
|
-
mode:
|
|
80
|
-
|
|
81
|
-
getData: async () => b(i, n, s),
|
|
131
|
+
mode: a,
|
|
132
|
+
getData: async () => m(l, i, n),
|
|
82
133
|
actionButtons: e.actionButtons,
|
|
83
134
|
localeText: e.localeText
|
|
135
|
+
},
|
|
136
|
+
root: {
|
|
137
|
+
"data-qa": e["data-qa"]
|
|
84
138
|
}
|
|
85
139
|
},
|
|
86
|
-
slots: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
sortingMode: r,
|
|
90
|
-
sx: T.merge(
|
|
140
|
+
slots: { toolbar: j },
|
|
141
|
+
sortingMode: a,
|
|
142
|
+
sx: p.merge(
|
|
91
143
|
{
|
|
92
144
|
border: 0,
|
|
93
145
|
color: "var(--color-text)",
|
|
94
146
|
letterSpacing: "normal",
|
|
95
147
|
minHeight: "300px",
|
|
96
|
-
[`&.${
|
|
97
|
-
[`.${
|
|
148
|
+
[`&.${t["root--densityCompact"]}`]: {
|
|
149
|
+
[`.${t.cell}`]: {
|
|
98
150
|
py: "8px"
|
|
99
151
|
}
|
|
100
152
|
},
|
|
101
|
-
[`&.${
|
|
102
|
-
[`.${
|
|
153
|
+
[`&.${t["root--densityStandard"]}`]: {
|
|
154
|
+
[`.${t.cell}`]: {
|
|
103
155
|
py: "15px"
|
|
104
156
|
}
|
|
105
157
|
},
|
|
106
|
-
[`&.${
|
|
107
|
-
[`.${
|
|
158
|
+
[`&.${t["root--densityComfortable"]}`]: {
|
|
159
|
+
[`.${t.cell}`]: {
|
|
108
160
|
py: "22px"
|
|
109
161
|
}
|
|
110
162
|
},
|
|
@@ -113,17 +165,17 @@ function L(e) {
|
|
|
113
165
|
* Because a fixed height is not desirable, we set a min-height on the DataGrid and set
|
|
114
166
|
* the min-height of the virtualScroller to half of that height.
|
|
115
167
|
*/
|
|
116
|
-
[`.${
|
|
168
|
+
[`.${t.virtualScroller}`]: {
|
|
117
169
|
minHeight: "150px",
|
|
118
170
|
overflow: "hidden",
|
|
119
171
|
position: "relative"
|
|
120
172
|
},
|
|
121
|
-
[`.${
|
|
173
|
+
[`.${t.columnHeader}`]: {
|
|
122
174
|
"--DataGrid-containerBackground": "var(--color-rijks-skyblue)",
|
|
123
|
-
|
|
175
|
+
backgroundColor: "var(--color-rijks-skyblue)",
|
|
124
176
|
color: "var(--color-text-light)"
|
|
125
177
|
},
|
|
126
|
-
[`.${
|
|
178
|
+
[`.${t.row}`]: {
|
|
127
179
|
":hover": {
|
|
128
180
|
backgroundColor: "var(--color-rijks-skyblue-light)"
|
|
129
181
|
},
|
|
@@ -134,16 +186,16 @@ function L(e) {
|
|
|
134
186
|
}
|
|
135
187
|
}
|
|
136
188
|
},
|
|
137
|
-
[`.${
|
|
189
|
+
[`.${t.columnHeader}, .${t.cell}, .MuiDataGrid-columnsContainer`]: {
|
|
138
190
|
borderRight: "1px solid var(--color-rijks-grey-2)"
|
|
139
191
|
},
|
|
140
|
-
[`.${
|
|
192
|
+
[`.${t.cell}`]: {
|
|
141
193
|
color: "var(--color-text)"
|
|
142
194
|
},
|
|
143
|
-
[`.${
|
|
195
|
+
[`.${G.root}`]: {
|
|
144
196
|
borderRadius: 0
|
|
145
197
|
},
|
|
146
|
-
[`.${
|
|
198
|
+
[`.${b.root}`]: {
|
|
147
199
|
color: "var(--color-primary)",
|
|
148
200
|
":focus": {
|
|
149
201
|
outline: "2px dashed var(--color-text)",
|
|
@@ -154,19 +206,18 @@ function L(e) {
|
|
|
154
206
|
color: "var(--color-disabled)"
|
|
155
207
|
}
|
|
156
208
|
},
|
|
157
|
-
[`.${
|
|
209
|
+
[`.${t.columnHeader} .${b.root}`]: {
|
|
158
210
|
color: "white"
|
|
159
211
|
}
|
|
160
212
|
},
|
|
161
213
|
e.sx,
|
|
162
|
-
|
|
214
|
+
T
|
|
163
215
|
),
|
|
164
216
|
...e.dataGridOverridableProps
|
|
165
217
|
}
|
|
166
218
|
);
|
|
167
219
|
}
|
|
168
|
-
const E = j(L);
|
|
169
220
|
export {
|
|
170
|
-
|
|
221
|
+
Z as AoaTable
|
|
171
222
|
};
|
|
172
223
|
//# sourceMappingURL=Table.js.map
|
|
@@ -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 DataGrid,\n gridClasses,\n type DataGridProps,\n type GridColDef,\n type GridFilterModel,\n type GridLocaleText,\n type GridSortModel\n} from '@mui/x-data-grid';\nimport { merge } from 'lodash';\nimport { memo, useCallback, useEffect, useState } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\nimport { QuickSearchToolbar } from './_QuickSearchToolbar';\n\nexport interface AoaTableData<T extends object = any> {\n /**\n * The paged, filtered and sorted items from the database\n */\n items: T[];\n /**\n * The total number of items present in the database table\n */\n totalItems: number;\n}\n\nexport type AoaTableColumns<T extends object = any> = GridColDef<T>[];\n\nexport interface AoaTableQueryOptions {\n /**\n * Material UI's GridFilterModel\n */\n filterModel: GridFilterModel;\n /**\n * The current page of the table\n */\n page: number;\n /**\n * The maximum number of items that are shown on a page\n */\n pageSize: number;\n /**\n * Material UI's GridSortModel\n */\n sortModel: GridSortModel;\n}\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?: never };\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 | '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\ninterface PaginationModel {\n page: number;\n pageSize: number;\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\nfunction NonMemoizeAoaTable<T extends object = any>(props: AoaTableProps<T>) {\n const [isLoading, setIsLoading] = useState(false);\n const [paginationModel, setPaginationModel] = useState<PaginationModel>({\n page: 0,\n pageSize: 10\n });\n const [sortModel, setSortModel] = useState<GridSortModel>([]);\n const [filterModel, setFilterModel] = useState<GridFilterModel>({\n items: []\n });\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?.totalItems || 0);\n\n async function getData(paginationModel: PaginationModel, 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?.totalItems ?? prevRowCountState);\n }, [props.data?.totalItems, 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 return (\n <DataGrid\n columns={props.columns}\n data-qa={props['data-qa']}\n disableColumnFilter\n disableColumnMenu\n disableColumnSelector\n disableDensitySelector\n disableRowSelectionOnClick\n disableVirtualization\n filterMode={mode}\n getRowHeight={() => 'auto'}\n initialState={{\n sorting: {\n sortModel: props.initialSort ? [props.initialSort] : []\n }\n }}\n loading={isLoading}\n localeText={\n props.localeText ?? {\n columnHeaderSortIconLabel: 'Sorteren',\n toolbarQuickFilterPlaceholder: 'Zoeken...',\n toolbarQuickFilterLabel: 'Zoeken',\n toolbarQuickFilterDeleteIconLabel: 'Wissen',\n noRowsLabel: 'Geen regels beschikbaar',\n noResultsOverlayLabel: 'Geen regels gevonden.',\n MuiTablePagination: {\n labelDisplayedRows: ({ from, to, count }) => `${from} - ${to} van ${count}`,\n labelRowsPerPage: 'Regels per pagina'\n },\n footerRowSelected: (count) => `${count} regels geselecteerd`\n }\n }\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?.items}\n slotProps={{\n toolbar: {\n showQuickFilter: true,\n quickFilterProps: { debounceMs: 500 },\n mode,\n isServerMode,\n getData: async () => getData(paginationModel, sortModel, filterModel),\n actionButtons: props.actionButtons,\n localeText: props.localeText\n }\n }}\n slots={{\n toolbar: QuickSearchToolbar\n }}\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.columnHeaders}`]: {\n '--DataGrid-containerBackground': 'var(--color-rijks-skyblue)',\n backgroundCcolor: '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\nexport const AoaTable = memo(NonMemoizeAoaTable) as typeof NonMemoizeAoaTable;\n"],"names":["NonMemoizeAoaTable","props","isLoading","setIsLoading","useState","paginationModel","setPaginationModel","sortModel","setSortModel","filterModel","setFilterModel","mode","isServerMode","handleSortModelChange","useCallback","onFilterChange","rowCountState","setRowCountState","_a","getData","fetchData","useEffect","prevRowCountState","_b","jsx","DataGrid","from","to","count","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,UAEA,CAAC,IAAIA,EAAY,YAAY,MAAMA,EAAY,IAAI,iCAAiC,GAAG;AAAA,YACrF,aAAa;AAAA,UACf;AAAA,UAEA,CAAC,IAAIA,EAAY,IAAI,EAAE,GAAG;AAAA,YACxB,OAAO;AAAA,UACT;AAAA,UAEA,CAAC,IAAIC,EAAsB,IAAI,EAAE,GAAG;AAAA,YAClC,cAAc;AAAA,UAChB;AAAA,UAEA,CAAC,IAAIC,EAAgB,IAAI,EAAE,GAAG;AAAA,YAC5B,OAAO;AAAA,YAEP,UAAU;AAAA,cACR,SAAS;AAAA,cACT,eAAe;AAAA,cACf,cAAc;AAAA,YAChB;AAAA,YAEA,aAAa;AAAA,cACX,OAAO;AAAA,YAAA;AAAA,UAEX;AAAA,UAEA,CAAC,IAAIF,EAAY,YAAY,KAAKE,EAAgB,IAAI,EAAE,GAAG;AAAA,YACzD,OAAO;AAAA,UAAA;AAAA,QAEX;AAAA,QACAjC,EAAM;AAAA,QACNkC;AAAA,MACF;AAAA,MACC,GAAGlC,EAAM;AAAA,IAAA;AAAA,EACZ;AAEJ;AAEa,MAAAmC,IAAWC,EAAKrC,CAAkB;"}
|
|
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,GAAs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AY,GAAG,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,14 +1,15 @@
|
|
|
1
1
|
import { GridLocaleText, GridToolbarProps, ToolbarPropsOverrides } from '@mui/x-data-grid';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
3
|
declare module '@mui/x-data-grid' {
|
|
3
4
|
interface ToolbarPropsOverrides {
|
|
4
5
|
actionButtons?: JSX.Element[];
|
|
5
6
|
getData(this: void): void;
|
|
6
|
-
isServerMode: boolean;
|
|
7
7
|
localeText?: GridLocaleText & {
|
|
8
8
|
refreshTable: string;
|
|
9
9
|
};
|
|
10
10
|
mode: 'client' | 'server';
|
|
11
|
+
setFilterButtonEl: Dispatch<SetStateAction<HTMLButtonElement | null>>;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
export declare
|
|
14
|
+
export declare function QuickSearchToolbar({ mode, actionButtons, localeText, getData, setFilterButtonEl }: GridToolbarProps & ToolbarPropsOverrides): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=_QuickSearchToolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_QuickSearchToolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/table/_QuickSearchToolbar.tsx"],"names":[],"mappings":"
|
|
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;KACvE;CACF;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,UAAU,EACV,OAAO,EACP,iBAAiB,EAClB,EAAE,gBAAgB,GAAG,qBAAqB,2CA0J1C"}
|