@onewelcome/react-lib-components 6.7.0 → 7.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/README.md +6 -0
- package/dist/cjs/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGrid.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.cjs.js.map +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterPopover.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterService.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterService.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilterTag.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilters.interfaces.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.cjs.js +2 -0
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.cjs.js.map +1 -0
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.cjs.js.map +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.module.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiOption.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/useSearch.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.cjs.js.map +1 -1
- package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/useSearch.cjs.js.map +1 -1
- package/dist/cjs/Icon/Icon.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
- package/dist/cjs/Icon/Icon.module.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.cjs.js.map +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.cjs.js +1 -1
- package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js +1 -1
- package/dist/cjs/Notifications/NotificationProvider/NotificationContext.cjs.js.map +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.js.map +1 -1
- package/dist/cjs/Popover/Popover.cjs.js +1 -1
- package/dist/cjs/Popover/Popover.cjs.js.map +1 -1
- package/dist/cjs/Tag/RemoveButton.module.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js +2 -0
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.cjs.js.map +1 -0
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.cjs.js +2 -0
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.cjs.js.map +1 -0
- package/dist/cjs/src/components/DataGrid/DataGrid.d.ts +6 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.d.ts +5 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.d.ts +6 -0
- package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridRow.d.ts → DataGridRow/DataGridRow.d.ts} +8 -1
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilter.d.ts +15 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.d.ts +22 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterService.d.ts +15 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilterTag.d.ts +12 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +57 -0
- package/dist/cjs/src/components/DataGrid/DataGridFilters/DataGridToolbar.d.ts +13 -0
- package/dist/cjs/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
- package/dist/cjs/src/components/DataGrid/testUtils.d.ts +13 -0
- package/dist/cjs/src/components/Form/FileUpload/FileUpload.d.ts +2 -1
- package/dist/cjs/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +2 -3
- package/dist/cjs/src/components/Form/Select/MultiSelect/useSearch.d.ts +2 -12
- package/dist/cjs/src/components/Form/Select/Select.interfaces.d.ts +1 -11
- package/dist/cjs/src/components/Form/Select/SingleSelect/Select.test.d.ts +2 -3
- package/dist/cjs/src/components/Form/Select/SingleSelect/useSearch.d.ts +2 -12
- package/dist/cjs/src/components/Form/Select/useSelectPositionList.d.ts +2 -2
- package/dist/cjs/src/components/Icon/Icon.d.ts +2 -1
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +0 -26
- package/dist/cjs/src/hooks/useFullHeightCollapse.cjs.js +2 -0
- package/dist/cjs/src/hooks/useFullHeightCollapse.cjs.js.map +1 -0
- package/dist/cjs/src/hooks/useFullHeightCollapse.d.ts +4 -0
- package/dist/cjs/src/hooks/usePosition.cjs.js +1 -1
- package/dist/cjs/src/hooks/usePosition.cjs.js.map +1 -1
- package/dist/cjs/src/index.cjs.js +1 -1
- package/dist/cjs/src/index.d.ts +10 -21
- package/dist/esm/DataGrid/DataGrid.esm.js +1 -1
- package/dist/esm/DataGrid/DataGrid.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.esm.js.map +1 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterPopover.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterService.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterService.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilterTag.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilters.interfaces.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.esm.js +2 -0
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.esm.js.map +1 -0
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js +1 -1
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileItem/FileItem.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.esm.js.map +1 -1
- package/dist/esm/Form/FileUpload/FileUpload.module.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiOption.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.esm.js.map +1 -1
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js +1 -1
- package/dist/esm/Form/Select/MultiSelect/useSearch.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js +1 -1
- package/dist/esm/Form/Select/SingleSelect/Select.esm.js.map +1 -1
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js +1 -1
- package/dist/esm/Form/Select/SingleSelect/useSearch.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.esm.js +1 -1
- package/dist/esm/Icon/Icon.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.module.esm.js +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.esm.js.map +1 -1
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.esm.js +1 -1
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js +1 -1
- package/dist/esm/Notifications/NotificationProvider/NotificationContext.esm.js.map +1 -1
- package/dist/esm/Pagination/Pagination.esm.js +1 -1
- package/dist/esm/Pagination/Pagination.esm.js.map +1 -1
- package/dist/esm/Popover/Popover.esm.js +1 -1
- package/dist/esm/Popover/Popover.esm.js.map +1 -1
- package/dist/esm/Tag/RemoveButton.module.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.esm.js +2 -0
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.esm.js.map +1 -0
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.esm.js +2 -0
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.esm.js.map +1 -0
- package/dist/esm/src/components/DataGrid/DataGrid.d.ts +6 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.d.ts +5 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.d.ts +6 -0
- package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridRow.d.ts → DataGridRow/DataGridRow.d.ts} +8 -1
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilter.d.ts +15 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.d.ts +22 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterService.d.ts +15 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilterTag.d.ts +12 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.d.ts +57 -0
- package/dist/esm/src/components/DataGrid/DataGridFilters/DataGridToolbar.d.ts +13 -0
- package/dist/esm/src/components/DataGrid/DataGridHeader/DataGridHeader.d.ts +1 -0
- package/dist/esm/src/components/DataGrid/testUtils.d.ts +13 -0
- package/dist/esm/src/components/Form/FileUpload/FileUpload.d.ts +2 -1
- package/dist/esm/src/components/Form/Select/MultiSelect/MultiSelect.test.d.ts +2 -3
- package/dist/esm/src/components/Form/Select/MultiSelect/useSearch.d.ts +2 -12
- package/dist/esm/src/components/Form/Select/Select.interfaces.d.ts +1 -11
- package/dist/esm/src/components/Form/Select/SingleSelect/Select.test.d.ts +2 -3
- package/dist/esm/src/components/Form/Select/SingleSelect/useSearch.d.ts +2 -12
- package/dist/esm/src/components/Form/Select/useSelectPositionList.d.ts +2 -2
- package/dist/esm/src/components/Icon/Icon.d.ts +2 -1
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +0 -26
- package/dist/esm/src/hooks/useFullHeightCollapse.d.ts +4 -0
- package/dist/esm/src/hooks/useFullHeightCollapse.esm.js +2 -0
- package/dist/esm/src/hooks/useFullHeightCollapse.esm.js.map +1 -0
- package/dist/esm/src/hooks/usePosition.esm.js +1 -1
- package/dist/esm/src/hooks/usePosition.esm.js.map +1 -1
- package/dist/esm/src/index.d.ts +10 -21
- package/dist/esm/src/index.esm.js +1 -1
- package/package.json +50 -49
- package/src/components/DataGrid/DataGrid.tsx +24 -10
- package/src/components/DataGrid/DataGridBody/DataGridBody.tsx +2 -2
- package/src/components/DataGrid/DataGridBody/{DataGridCell.module.scss → DataGridCell/DataGridCell.module.scss} +2 -2
- package/src/components/DataGrid/DataGridBody/{DataGridCell.tsx → DataGridCell/DataGridCell.tsx} +1 -1
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss +60 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.tsx +39 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss +21 -0
- package/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.tsx +47 -0
- package/src/components/DataGrid/DataGridBody/{DataGridRow.module.scss → DataGridRow/DataGridRow.module.scss} +17 -1
- package/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.tsx +122 -0
- package/src/components/DataGrid/DataGridBody/__snapshots__/DataGridBody.test.tsx.snap +4 -4
- package/src/components/DataGrid/DataGridFilters/DataGridFilter.module.scss +105 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilter.tsx +150 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterPopover.tsx +181 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterService.ts +97 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilterTag.tsx +91 -0
- package/src/components/DataGrid/DataGridFilters/DataGridFilters.interfaces.ts +84 -0
- package/src/components/{Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.scss → DataGrid/DataGridFilters/DataGridToolbar.module.scss} +27 -34
- package/src/components/DataGrid/DataGridFilters/DataGridToolbar.tsx +126 -0
- package/src/components/DataGrid/DataGridHeader/DataGridHeader.tsx +6 -1
- package/src/components/DataGrid/testUtils.ts +77 -0
- package/src/components/Form/FileUpload/FileItem/FileItem.tsx +5 -8
- package/src/components/Form/FileUpload/FileUpload.module.scss +9 -4
- package/src/components/Form/FileUpload/FileUpload.tsx +34 -15
- package/src/components/Form/Select/MultiSelect/MultiOption.tsx +4 -2
- package/src/components/Form/Select/MultiSelect/MultiSelect.tsx +1 -5
- package/src/components/Form/Select/MultiSelect/useSearch.tsx +6 -16
- package/src/components/Form/Select/Select.interfaces.ts +1 -9
- package/src/components/Form/Select/SingleSelect/Select.tsx +1 -5
- package/src/components/Form/Select/SingleSelect/useSearch.tsx +6 -18
- package/src/components/Icon/Icon.module.scss +5 -0
- package/src/components/Icon/Icon.tsx +2 -1
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss +12 -15
- package/src/components/Layout/FormPage/FormWithStepper/FormWithStepper.tsx +3 -5
- package/src/components/Notifications/NotificationProvider/NotificationContext.tsx +12 -16
- package/src/components/Pagination/Pagination.tsx +15 -6
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/Tag/RemoveButton.module.scss +1 -0
- package/src/components/_BaseStyling_/BaseStyling.tsx +0 -36
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +1 -0
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -1
- package/src/{components/Notifications/Snackbar/useSnackbar.ts → hooks/useFullHeightCollapse.ts} +12 -11
- package/src/hooks/usePosition.ts +3 -4
- package/src/index.ts +11 -25
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js +0 -2
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.cjs.js.map +0 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell.module.cjs.js +0 -2
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow.cjs.js +0 -2
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow.cjs.js.map +0 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow.module.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/interfaces.cjs.js.map +0 -1
- package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js +0 -2
- package/dist/cjs/Notifications/Snackbar/useSnackbar.cjs.js.map +0 -1
- package/dist/cjs/StatusIndicator/StatusIndicator.cjs.js +0 -2
- package/dist/cjs/StatusIndicator/StatusIndicator.cjs.js.map +0 -1
- package/dist/cjs/StatusIndicator/StatusIndicator.module.cjs.js +0 -2
- package/dist/cjs/StatusIndicator/StatusIndicator.module.cjs.js.map +0 -1
- package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.cjs.js +0 -2
- package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.cjs.js.map +0 -1
- package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.module.cjs.js +0 -2
- package/dist/cjs/Wizard/BaseWizardSteps/BaseWizardSteps.module.cjs.js.map +0 -1
- package/dist/cjs/Wizard/Wizard.cjs.js +0 -2
- package/dist/cjs/Wizard/Wizard.cjs.js.map +0 -1
- package/dist/cjs/Wizard/WizardActions/WizardActions.cjs.js +0 -2
- package/dist/cjs/Wizard/WizardActions/WizardActions.cjs.js.map +0 -1
- package/dist/cjs/Wizard/WizardStateProvider.cjs.js +0 -2
- package/dist/cjs/Wizard/WizardStateProvider.cjs.js.map +0 -1
- package/dist/cjs/Wizard/WizardSteps/WizardSteps.cjs.js +0 -2
- package/dist/cjs/Wizard/WizardSteps/WizardSteps.cjs.js.map +0 -1
- package/dist/cjs/Wizard/wizardStateReducer.cjs.js +0 -2
- package/dist/cjs/Wizard/wizardStateReducer.cjs.js.map +0 -1
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -21
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +0 -20
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +0 -39
- package/dist/cjs/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +0 -27
- package/dist/cjs/src/components/Notifications/Snackbar/interfaces.d.ts +0 -36
- package/dist/cjs/src/components/Notifications/Snackbar/useSnackbar.d.ts +0 -9
- package/dist/cjs/src/components/StatusIndicator/StatusIndicator.d.ts +0 -9
- package/dist/cjs/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -12
- package/dist/cjs/src/components/Wizard/Wizard.d.ts +0 -11
- package/dist/cjs/src/components/Wizard/WizardActions/WizardActions.d.ts +0 -25
- package/dist/cjs/src/components/Wizard/WizardStateProvider.d.ts +0 -15
- package/dist/cjs/src/components/Wizard/WizardSteps/WizardSteps.d.ts +0 -8
- package/dist/cjs/src/components/Wizard/WizardSteps/WizardSteps.test.d.ts +0 -1
- package/dist/cjs/src/components/Wizard/wizardStateReducer.d.ts +0 -24
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js +0 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.esm.js.map +0 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridCell.module.esm.js +0 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow.esm.js +0 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow.esm.js.map +0 -1
- package/dist/esm/DataGrid/DataGridBody/DataGridRow.module.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.module.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/interfaces.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/interfaces.esm.js.map +0 -1
- package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js +0 -2
- package/dist/esm/Notifications/Snackbar/useSnackbar.esm.js.map +0 -1
- package/dist/esm/StatusIndicator/StatusIndicator.esm.js +0 -2
- package/dist/esm/StatusIndicator/StatusIndicator.esm.js.map +0 -1
- package/dist/esm/StatusIndicator/StatusIndicator.module.esm.js +0 -2
- package/dist/esm/StatusIndicator/StatusIndicator.module.esm.js.map +0 -1
- package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.esm.js +0 -2
- package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.esm.js.map +0 -1
- package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.module.esm.js +0 -2
- package/dist/esm/Wizard/BaseWizardSteps/BaseWizardSteps.module.esm.js.map +0 -1
- package/dist/esm/Wizard/Wizard.esm.js +0 -2
- package/dist/esm/Wizard/Wizard.esm.js.map +0 -1
- package/dist/esm/Wizard/WizardActions/WizardActions.esm.js +0 -2
- package/dist/esm/Wizard/WizardActions/WizardActions.esm.js.map +0 -1
- package/dist/esm/Wizard/WizardStateProvider.esm.js +0 -2
- package/dist/esm/Wizard/WizardStateProvider.esm.js.map +0 -1
- package/dist/esm/Wizard/WizardSteps/WizardSteps.esm.js +0 -2
- package/dist/esm/Wizard/WizardSteps/WizardSteps.esm.js.map +0 -1
- package/dist/esm/Wizard/wizardStateReducer.esm.js +0 -2
- package/dist/esm/Wizard/wizardStateReducer.esm.js.map +0 -1
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +0 -21
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts +0 -1
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +0 -20
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts +0 -1
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +0 -39
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts +0 -1
- package/dist/esm/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +0 -27
- package/dist/esm/src/components/Notifications/Snackbar/interfaces.d.ts +0 -36
- package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.d.ts +0 -9
- package/dist/esm/src/components/Notifications/Snackbar/useSnackbar.test.d.ts +0 -1
- package/dist/esm/src/components/StatusIndicator/StatusIndicator.d.ts +0 -9
- package/dist/esm/src/components/StatusIndicator/StatusIndicator.test.d.ts +0 -1
- package/dist/esm/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +0 -12
- package/dist/esm/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts +0 -1
- package/dist/esm/src/components/Wizard/Wizard.d.ts +0 -11
- package/dist/esm/src/components/Wizard/Wizard.test.d.ts +0 -1
- package/dist/esm/src/components/Wizard/WizardActions/WizardActions.d.ts +0 -25
- package/dist/esm/src/components/Wizard/WizardActions/WizardActions.test.d.ts +0 -1
- package/dist/esm/src/components/Wizard/WizardStateProvider.d.ts +0 -15
- package/dist/esm/src/components/Wizard/WizardSteps/WizardSteps.d.ts +0 -8
- package/dist/esm/src/components/Wizard/WizardSteps/WizardSteps.test.d.ts +0 -1
- package/dist/esm/src/components/Wizard/wizardStateReducer.d.ts +0 -24
- package/src/components/DataGrid/DataGridBody/DataGridRow.tsx +0 -58
- package/src/components/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +0 -92
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +0 -156
- package/src/components/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +0 -161
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +0 -219
- package/src/components/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +0 -57
- package/src/components/Notifications/Snackbar/interfaces.ts +0 -62
- package/src/components/StatusIndicator/StatusIndicator.module.scss +0 -43
- package/src/components/StatusIndicator/StatusIndicator.tsx +0 -44
- package/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +0 -214
- package/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +0 -93
- package/src/components/Wizard/Wizard.tsx +0 -67
- package/src/components/Wizard/WizardActions/WizardActions.tsx +0 -116
- package/src/components/Wizard/WizardStateProvider.tsx +0 -45
- package/src/components/Wizard/WizardSteps/WizardSteps.tsx +0 -54
- package/src/components/Wizard/wizardStateReducer.ts +0 -61
- /package/dist/cjs/DataGrid/DataGridBody/{DataGridCell.module.cjs.js.map → DataGridCell/DataGridCell.module.cjs.js.map} +0 -0
- /package/dist/cjs/DataGrid/DataGridBody/{DataGridRow.module.cjs.js.map → DataGridRow/DataGridRow.module.cjs.js.map} +0 -0
- /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridCell.d.ts → DataGridCell/DataGridCell.d.ts} +0 -0
- /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridCell.test.d.ts → DataGridCell/DataGridCell.test.d.ts} +0 -0
- /package/dist/cjs/src/components/DataGrid/DataGridBody/{DataGridRow.test.d.ts → DataGridDrawer/DataGridDrawerItem.test.d.ts} +0 -0
- /package/dist/{esm/src/components/DataGrid/DataGridBody → cjs/src/components/DataGrid/DataGridBody/DataGridRow}/DataGridRow.test.d.ts +0 -0
- /package/dist/cjs/src/components/{Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.d.ts → DataGrid/DataGridFilters/DataGridFilterTag.test.d.ts} +0 -0
- /package/dist/cjs/src/components/{Notifications/Snackbar/SnackbarItem/SnackbarItem.test.d.ts → DataGrid/DataGridFilters/DataGridToolbar.test.d.ts} +0 -0
- /package/dist/cjs/src/{components/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.d.ts → hooks/useFullHeightCollapse.test.d.ts} +0 -0
- /package/dist/esm/DataGrid/DataGridBody/{DataGridCell.module.esm.js.map → DataGridCell/DataGridCell.module.esm.js.map} +0 -0
- /package/dist/esm/DataGrid/DataGridBody/{DataGridRow.module.esm.js.map → DataGridRow/DataGridRow.module.esm.js.map} +0 -0
- /package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridCell.d.ts → DataGridCell/DataGridCell.d.ts} +0 -0
- /package/dist/esm/src/components/DataGrid/DataGridBody/{DataGridCell.test.d.ts → DataGridCell/DataGridCell.test.d.ts} +0 -0
- /package/dist/{cjs/src/components/Notifications/Snackbar/useSnackbar.test.d.ts → esm/src/components/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.test.d.ts} +0 -0
- /package/dist/{cjs/src/components/StatusIndicator/StatusIndicator.test.d.ts → esm/src/components/DataGrid/DataGridBody/DataGridRow/DataGridRow.test.d.ts} +0 -0
- /package/dist/{cjs/src/components/Wizard/BaseWizardSteps/BaseWizardSteps.test.d.ts → esm/src/components/DataGrid/DataGridFilters/DataGridFilterTag.test.d.ts} +0 -0
- /package/dist/{cjs/src/components/Wizard/Wizard.test.d.ts → esm/src/components/DataGrid/DataGridFilters/DataGridToolbar.test.d.ts} +0 -0
- /package/dist/{cjs/src/components/Wizard/WizardActions/WizardActions.test.d.ts → esm/src/hooks/useFullHeightCollapse.test.d.ts} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@use "../../../mixins.module.scss";
|
|
18
|
+
|
|
19
|
+
.filter-wrapper {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 0.375rem;
|
|
24
|
+
padding: 0.25rem 0.75rem 0.25rem 0.5rem;
|
|
25
|
+
border-radius: 3.125rem;
|
|
26
|
+
background-color: var(--color-blue-grey100);
|
|
27
|
+
|
|
28
|
+
.filter-button {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 0.375rem;
|
|
33
|
+
background: none;
|
|
34
|
+
border: none;
|
|
35
|
+
padding: 0 0.25rem;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
|
|
38
|
+
&:only-child {
|
|
39
|
+
margin-right: -0.25rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
border-radius: 0.125rem;
|
|
44
|
+
background-color: var(--color-black10);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:active {
|
|
48
|
+
background-color: var(--color-blue-grey400);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include mixins.focusVisibleOutline($outlineOffset: 0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.caption {
|
|
55
|
+
font-size: var(--font-size-data-grid);
|
|
56
|
+
line-height: var(--data-grid-line-height);
|
|
57
|
+
margin: 0;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
|
|
60
|
+
&.bold {
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.remove-icon {
|
|
66
|
+
font-size: 0.6rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.column-select-option {
|
|
71
|
+
text-transform: capitalize;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.popover {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
align-items: flex-start;
|
|
78
|
+
gap: 1rem;
|
|
79
|
+
padding: 1rem 0.75rem;
|
|
80
|
+
min-width: 40rem;
|
|
81
|
+
|
|
82
|
+
.controls {
|
|
83
|
+
width: 100%;
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: 1rem;
|
|
86
|
+
|
|
87
|
+
& > *:last-child,
|
|
88
|
+
*:first-child {
|
|
89
|
+
flex-grow: 1.8;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
& > *:nth-child(2) {
|
|
95
|
+
flex-grow: 1;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.actions {
|
|
102
|
+
display: flex;
|
|
103
|
+
gap: 1rem;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, { Fragment, createRef, useState } from "react";
|
|
18
|
+
import { createPortal } from "react-dom";
|
|
19
|
+
import { useGetDomRoot } from "../../../hooks/useGetDomRoot";
|
|
20
|
+
import {
|
|
21
|
+
DataGridColumnMetadata,
|
|
22
|
+
Filter,
|
|
23
|
+
FilterEditorMode,
|
|
24
|
+
FiltersAction,
|
|
25
|
+
PopoverTranslations,
|
|
26
|
+
TagTranslations
|
|
27
|
+
} from "./DataGridFilters.interfaces";
|
|
28
|
+
import { generateID } from "../../../util/helper";
|
|
29
|
+
import { DataGridFilterTag } from "./DataGridFilterTag";
|
|
30
|
+
import { DataGridFilterPopover } from "./DataGridFilterPopover";
|
|
31
|
+
import { useDataGridFilter } from "./DataGridFilterService";
|
|
32
|
+
|
|
33
|
+
export type Props = {
|
|
34
|
+
mode: FilterEditorMode;
|
|
35
|
+
domRoot?: HTMLElement;
|
|
36
|
+
filter?: Filter;
|
|
37
|
+
columnsMetadata: DataGridColumnMetadata[];
|
|
38
|
+
dispatch: React.Dispatch<FiltersAction>;
|
|
39
|
+
onFilterAdd?: (filter: Filter) => void;
|
|
40
|
+
onFilterEdit?: (filter: Filter) => void;
|
|
41
|
+
onFilterDelete?: (id: string) => void;
|
|
42
|
+
tagTranslations?: TagTranslations;
|
|
43
|
+
popoverTranslations?: PopoverTranslations;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const DataGridFilter = ({
|
|
47
|
+
mode,
|
|
48
|
+
filter,
|
|
49
|
+
domRoot,
|
|
50
|
+
columnsMetadata,
|
|
51
|
+
dispatch,
|
|
52
|
+
onFilterAdd,
|
|
53
|
+
onFilterEdit,
|
|
54
|
+
onFilterDelete,
|
|
55
|
+
tagTranslations,
|
|
56
|
+
popoverTranslations
|
|
57
|
+
}: Props) => {
|
|
58
|
+
const wrappingDivRef = createRef<HTMLDivElement>();
|
|
59
|
+
const [filterOpen, setFilterOpen] = useState(false);
|
|
60
|
+
const { root } = useGetDomRoot(domRoot, wrappingDivRef);
|
|
61
|
+
const {
|
|
62
|
+
resetFields,
|
|
63
|
+
operator,
|
|
64
|
+
setOperator,
|
|
65
|
+
operators,
|
|
66
|
+
setOperators,
|
|
67
|
+
column,
|
|
68
|
+
setColumn,
|
|
69
|
+
values,
|
|
70
|
+
setValues,
|
|
71
|
+
pickedValues,
|
|
72
|
+
setPickedValues,
|
|
73
|
+
initialiseFilterValues
|
|
74
|
+
} = useDataGridFilter(mode, columnsMetadata);
|
|
75
|
+
|
|
76
|
+
const onFilterSubmit = () => {
|
|
77
|
+
if (mode === "ADD") {
|
|
78
|
+
const id = generateID();
|
|
79
|
+
|
|
80
|
+
dispatch({
|
|
81
|
+
type: "add",
|
|
82
|
+
payload: { id, column, operator, value: pickedValues }
|
|
83
|
+
});
|
|
84
|
+
onFilterAdd && onFilterAdd({ id, column, operator, value: pickedValues });
|
|
85
|
+
} else if (mode === "EDIT" && filter) {
|
|
86
|
+
const { id } = filter;
|
|
87
|
+
|
|
88
|
+
dispatch({
|
|
89
|
+
type: "edit",
|
|
90
|
+
payload: { id, column, operator, value: pickedValues }
|
|
91
|
+
});
|
|
92
|
+
onFilterEdit && onFilterEdit({ id, column, operator, value: pickedValues });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
resetFields();
|
|
96
|
+
setFilterOpen(false);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const onFilterRemove = () => {
|
|
100
|
+
if (!filter) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const { id } = filter;
|
|
104
|
+
|
|
105
|
+
dispatch({ type: "remove", payload: { id } });
|
|
106
|
+
onFilterDelete && onFilterDelete(id);
|
|
107
|
+
|
|
108
|
+
resetFields();
|
|
109
|
+
setFilterOpen(false);
|
|
110
|
+
};
|
|
111
|
+
const onFilterOpen = () => {
|
|
112
|
+
setFilterOpen(!filterOpen);
|
|
113
|
+
if (!filterOpen) {
|
|
114
|
+
initialiseFilterValues(filter);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Fragment>
|
|
120
|
+
<DataGridFilterTag
|
|
121
|
+
mode={mode}
|
|
122
|
+
onFilterOpen={onFilterOpen}
|
|
123
|
+
onFilterRemove={onFilterRemove}
|
|
124
|
+
triggerRef={wrappingDivRef}
|
|
125
|
+
filter={filter}
|
|
126
|
+
/>
|
|
127
|
+
{createPortal(
|
|
128
|
+
<DataGridFilterPopover
|
|
129
|
+
anchorRef={wrappingDivRef}
|
|
130
|
+
isOpen={filterOpen}
|
|
131
|
+
column={column}
|
|
132
|
+
columnsMetadata={columnsMetadata}
|
|
133
|
+
values={values}
|
|
134
|
+
pickedValues={pickedValues}
|
|
135
|
+
operator={operator}
|
|
136
|
+
operators={operators}
|
|
137
|
+
onFilterSubmit={onFilterSubmit}
|
|
138
|
+
resetFields={resetFields}
|
|
139
|
+
setFilterOpen={setFilterOpen}
|
|
140
|
+
setColumn={setColumn}
|
|
141
|
+
setOperator={setOperator}
|
|
142
|
+
setOperators={setOperators}
|
|
143
|
+
setValues={setValues}
|
|
144
|
+
setPickedValues={setPickedValues}
|
|
145
|
+
/>,
|
|
146
|
+
root
|
|
147
|
+
)}
|
|
148
|
+
</Fragment>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React from "react";
|
|
18
|
+
import classes from "./DataGridFilter.module.scss";
|
|
19
|
+
import { Button } from "../../Button/Button";
|
|
20
|
+
import { Option } from "../../Form/Select/SingleSelect/Option";
|
|
21
|
+
import { MultiOption } from "../../Form/Select/MultiSelect/MultiOption";
|
|
22
|
+
import { MultiSelectWrapper } from "../../Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper";
|
|
23
|
+
import { SelectWrapper } from "../../Form/Wrapper/SelectWrapper/SelectWrapper";
|
|
24
|
+
import { Popover } from "../../Popover/Popover";
|
|
25
|
+
import {
|
|
26
|
+
DataGridColumnMetadata,
|
|
27
|
+
DefaultOperators,
|
|
28
|
+
PopoverTranslations
|
|
29
|
+
} from "./DataGridFilters.interfaces";
|
|
30
|
+
|
|
31
|
+
export type Props = {
|
|
32
|
+
anchorRef?: React.RefObject<HTMLOrSVGElement>;
|
|
33
|
+
isOpen: boolean;
|
|
34
|
+
column: string;
|
|
35
|
+
columnsMetadata: DataGridColumnMetadata[];
|
|
36
|
+
values: string[];
|
|
37
|
+
pickedValues: string[];
|
|
38
|
+
operator: string;
|
|
39
|
+
operators: string[];
|
|
40
|
+
onFilterSubmit: () => void;
|
|
41
|
+
resetFields: () => void;
|
|
42
|
+
setFilterOpen: (value: React.SetStateAction<boolean>) => void;
|
|
43
|
+
setColumn: (column: React.SetStateAction<string>) => void;
|
|
44
|
+
setOperator: (operator: React.SetStateAction<string>) => void;
|
|
45
|
+
setOperators: (operators: React.SetStateAction<string[]>) => void;
|
|
46
|
+
setValues: (values: React.SetStateAction<string[]>) => void;
|
|
47
|
+
setPickedValues: (pickedValues: React.SetStateAction<string[]>) => void;
|
|
48
|
+
translations?: PopoverTranslations;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const DataGridFilterPopover = ({
|
|
52
|
+
anchorRef,
|
|
53
|
+
isOpen,
|
|
54
|
+
column,
|
|
55
|
+
columnsMetadata,
|
|
56
|
+
values,
|
|
57
|
+
pickedValues,
|
|
58
|
+
operator,
|
|
59
|
+
operators,
|
|
60
|
+
onFilterSubmit,
|
|
61
|
+
resetFields,
|
|
62
|
+
setFilterOpen,
|
|
63
|
+
setColumn,
|
|
64
|
+
setOperator,
|
|
65
|
+
setOperators,
|
|
66
|
+
setValues,
|
|
67
|
+
setPickedValues,
|
|
68
|
+
translations
|
|
69
|
+
}: Props) => {
|
|
70
|
+
const {
|
|
71
|
+
columnSelectLabel = "Filter by",
|
|
72
|
+
operatorSelectLabel = "Operator",
|
|
73
|
+
valueSelectLabel = "Value",
|
|
74
|
+
addNewValueLabel = "Create new",
|
|
75
|
+
addNewValueButtonTitle = "Add new select value",
|
|
76
|
+
submitButtonTitle = "Apply",
|
|
77
|
+
cancelButtonTitle = "Cancel"
|
|
78
|
+
} = translations || {};
|
|
79
|
+
return (
|
|
80
|
+
<Popover
|
|
81
|
+
anchorEl={anchorRef}
|
|
82
|
+
show={isOpen}
|
|
83
|
+
placement={{ horizontal: "left", vertical: "bottom" }}
|
|
84
|
+
transformOrigin={{ horizontal: "left", vertical: "top" }}
|
|
85
|
+
>
|
|
86
|
+
<div className={classes["popover"]}>
|
|
87
|
+
<div className={classes["controls"]}>
|
|
88
|
+
<SelectWrapper
|
|
89
|
+
label={columnSelectLabel}
|
|
90
|
+
value={column}
|
|
91
|
+
name={"column"}
|
|
92
|
+
onChange={e => {
|
|
93
|
+
setColumn(e.target.value);
|
|
94
|
+
const columnMetadata = columnsMetadata.find(({ name }) => name === e.target.value);
|
|
95
|
+
|
|
96
|
+
if (columnMetadata?.operators) {
|
|
97
|
+
setOperator(columnMetadata.operators[0]);
|
|
98
|
+
setOperators(columnMetadata.operators);
|
|
99
|
+
} else {
|
|
100
|
+
setOperator(Object.values(DefaultOperators)[0]);
|
|
101
|
+
setOperators(Object.values(DefaultOperators));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (columnMetadata?.defaultValues) {
|
|
105
|
+
setPickedValues([]);
|
|
106
|
+
setValues(columnMetadata.defaultValues);
|
|
107
|
+
} else {
|
|
108
|
+
setPickedValues([]);
|
|
109
|
+
setValues([]);
|
|
110
|
+
}
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
{columnsMetadata.map(({ name, headline }) => (
|
|
114
|
+
<Option className={classes["column-select-option"]} key={name} value={name}>
|
|
115
|
+
{headline}
|
|
116
|
+
</Option>
|
|
117
|
+
))}
|
|
118
|
+
</SelectWrapper>
|
|
119
|
+
<SelectWrapper
|
|
120
|
+
label={operatorSelectLabel}
|
|
121
|
+
value={operator}
|
|
122
|
+
name={"operator"}
|
|
123
|
+
onChange={e => setOperator(e.target.value)}
|
|
124
|
+
>
|
|
125
|
+
{operators.map(operator => (
|
|
126
|
+
<Option key={operator} value={operator}>
|
|
127
|
+
{operator}
|
|
128
|
+
</Option>
|
|
129
|
+
))}
|
|
130
|
+
</SelectWrapper>
|
|
131
|
+
<MultiSelectWrapper
|
|
132
|
+
label={valueSelectLabel}
|
|
133
|
+
name={"value"}
|
|
134
|
+
value={pickedValues}
|
|
135
|
+
onChange={e =>
|
|
136
|
+
setPickedValues(
|
|
137
|
+
[...Array.from(e.target.options)]
|
|
138
|
+
.filter(option => option.selected)
|
|
139
|
+
.map(option => option.value)
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
selectProps={{
|
|
143
|
+
addNew: {
|
|
144
|
+
label: addNewValueLabel,
|
|
145
|
+
onAddNew: value => {
|
|
146
|
+
if (value) {
|
|
147
|
+
setValues(prev => [...prev, value]);
|
|
148
|
+
setPickedValues(prev => [...prev, value]);
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
btnProps: { title: addNewValueButtonTitle, type: "button" }
|
|
152
|
+
},
|
|
153
|
+
search: {
|
|
154
|
+
enabled: true,
|
|
155
|
+
renderThreshold: 0
|
|
156
|
+
}
|
|
157
|
+
}}
|
|
158
|
+
>
|
|
159
|
+
{values.map(value => (
|
|
160
|
+
<MultiOption key={value} value={value}>
|
|
161
|
+
{value}
|
|
162
|
+
</MultiOption>
|
|
163
|
+
))}
|
|
164
|
+
</MultiSelectWrapper>
|
|
165
|
+
</div>
|
|
166
|
+
<div className={classes["actions"]}>
|
|
167
|
+
<Button onClick={onFilterSubmit}>{submitButtonTitle}</Button>
|
|
168
|
+
<Button
|
|
169
|
+
variant="text"
|
|
170
|
+
onClick={() => {
|
|
171
|
+
resetFields();
|
|
172
|
+
setFilterOpen(false);
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
{cancelButtonTitle}
|
|
176
|
+
</Button>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</Popover>
|
|
180
|
+
);
|
|
181
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useState } from "react";
|
|
18
|
+
import {
|
|
19
|
+
DataGridColumnMetadata,
|
|
20
|
+
DefaultOperators,
|
|
21
|
+
Filter,
|
|
22
|
+
FilterEditorMode
|
|
23
|
+
} from "./DataGridFilters.interfaces";
|
|
24
|
+
|
|
25
|
+
export const useDataGridFilter = (
|
|
26
|
+
mode: FilterEditorMode,
|
|
27
|
+
columnsMetadata: DataGridColumnMetadata[]
|
|
28
|
+
) => {
|
|
29
|
+
const [column, setColumn] = useState("");
|
|
30
|
+
const [operator, setOperator] = useState("");
|
|
31
|
+
const [operators, setOperators] = useState<string[]>(Object.values(DefaultOperators));
|
|
32
|
+
const [values, setValues] = useState<string[]>([]);
|
|
33
|
+
const [pickedValues, setPickedValues] = useState<string[]>([]);
|
|
34
|
+
|
|
35
|
+
//user can extend the list of picked values with custom ones. We need to make sure that the default list includes the user created values.
|
|
36
|
+
const mergeCustomValuesWithPredefined = (values: string[], pickedValues: string[]) => {
|
|
37
|
+
return Array.from(new Set([...values, ...pickedValues]));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const resetFields = () => {
|
|
41
|
+
setColumn("");
|
|
42
|
+
setOperator("");
|
|
43
|
+
setValues([]);
|
|
44
|
+
setPickedValues([]);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const initialiseFilterValues = (filter?: Filter) => {
|
|
48
|
+
if (mode === "ADD") {
|
|
49
|
+
const firstColumnMetadata = columnsMetadata[0];
|
|
50
|
+
|
|
51
|
+
if (!firstColumnMetadata) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
setColumn(firstColumnMetadata.name);
|
|
56
|
+
setOperator(
|
|
57
|
+
firstColumnMetadata.operators
|
|
58
|
+
? firstColumnMetadata.operators[0]
|
|
59
|
+
: Object.values(DefaultOperators)[0]
|
|
60
|
+
);
|
|
61
|
+
firstColumnMetadata.operators && setOperators(firstColumnMetadata.operators);
|
|
62
|
+
firstColumnMetadata.defaultValues && setValues(firstColumnMetadata.defaultValues);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (mode === "EDIT" && filter) {
|
|
66
|
+
const { column, operator, value } = filter;
|
|
67
|
+
const columnMetadata = columnsMetadata.find(({ name }) => name === column);
|
|
68
|
+
|
|
69
|
+
if (!columnMetadata) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const { defaultValues, operators } = columnMetadata;
|
|
74
|
+
|
|
75
|
+
setColumn(column);
|
|
76
|
+
setOperator(operator);
|
|
77
|
+
operators && setOperators(operators);
|
|
78
|
+
setPickedValues(value);
|
|
79
|
+
setValues(mergeCustomValuesWithPredefined(defaultValues || [], value));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
resetFields,
|
|
85
|
+
initialiseFilterValues,
|
|
86
|
+
operator,
|
|
87
|
+
setOperator,
|
|
88
|
+
operators,
|
|
89
|
+
setOperators,
|
|
90
|
+
column,
|
|
91
|
+
setColumn,
|
|
92
|
+
values,
|
|
93
|
+
setValues,
|
|
94
|
+
pickedValues,
|
|
95
|
+
setPickedValues
|
|
96
|
+
};
|
|
97
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, { ComponentPropsWithRef, ForwardRefRenderFunction, Fragment } from "react";
|
|
18
|
+
import { Icon, Icons } from "../../Icon/Icon";
|
|
19
|
+
import { RemoveButton } from "../../Tag/RemoveButton";
|
|
20
|
+
import { Typography } from "../../Typography/Typography";
|
|
21
|
+
import classes from "./DataGridFilter.module.scss";
|
|
22
|
+
import { Filter, FilterEditorMode, TagTranslations } from "./DataGridFilters.interfaces";
|
|
23
|
+
|
|
24
|
+
export interface DataGridFilterTagProps extends ComponentPropsWithRef<"div"> {
|
|
25
|
+
triggerRef: React.Ref<HTMLDivElement>;
|
|
26
|
+
filter?: Filter;
|
|
27
|
+
mode: FilterEditorMode;
|
|
28
|
+
onFilterRemove: () => void;
|
|
29
|
+
onFilterOpen: () => void;
|
|
30
|
+
translations?: TagTranslations;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const EditTagContent = ({ filter }: { filter: Filter }) => {
|
|
34
|
+
const { column, operator, value } = filter;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Fragment>
|
|
38
|
+
{column} {operator} {value.length > 0 && <b>{value[0]}</b>}
|
|
39
|
+
{value.length >= 2 && (
|
|
40
|
+
<>
|
|
41
|
+
{" "}
|
|
42
|
+
or <b> {value.length - 1} other</b>
|
|
43
|
+
</>
|
|
44
|
+
)}
|
|
45
|
+
</Fragment>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const DataGridFilterTagComponent: ForwardRefRenderFunction<
|
|
50
|
+
HTMLDivElement,
|
|
51
|
+
DataGridFilterTagProps
|
|
52
|
+
> = (
|
|
53
|
+
{
|
|
54
|
+
triggerRef,
|
|
55
|
+
filter,
|
|
56
|
+
mode,
|
|
57
|
+
onFilterRemove,
|
|
58
|
+
onFilterOpen,
|
|
59
|
+
translations,
|
|
60
|
+
|
|
61
|
+
...rest
|
|
62
|
+
}: DataGridFilterTagProps,
|
|
63
|
+
ref
|
|
64
|
+
) => {
|
|
65
|
+
const { addButtonCaption = "Add filter" } = translations || {};
|
|
66
|
+
const shouldRenderAddTag = mode === "ADD";
|
|
67
|
+
const shouldRenderEditTag = mode === "EDIT" && filter;
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<div {...rest} ref={triggerRef} className={classes["filter-wrapper"]}>
|
|
71
|
+
<button type="button" className={classes["filter-button"]} onClick={onFilterOpen}>
|
|
72
|
+
{shouldRenderAddTag && (
|
|
73
|
+
<Fragment>
|
|
74
|
+
<Icon icon={Icons.AddCircle} />
|
|
75
|
+
<Typography variant="body" className={classes["caption"]}>
|
|
76
|
+
{addButtonCaption}
|
|
77
|
+
</Typography>
|
|
78
|
+
</Fragment>
|
|
79
|
+
)}
|
|
80
|
+
{shouldRenderEditTag && (
|
|
81
|
+
<Typography variant="body" className={classes["caption"]}>
|
|
82
|
+
<EditTagContent filter={filter} />
|
|
83
|
+
</Typography>
|
|
84
|
+
)}
|
|
85
|
+
</button>
|
|
86
|
+
{shouldRenderEditTag && <RemoveButton onRemove={onFilterRemove} />}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const DataGridFilterTag = React.forwardRef(DataGridFilterTagComponent);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface Filter {
|
|
18
|
+
id: string;
|
|
19
|
+
column: string;
|
|
20
|
+
operator: string;
|
|
21
|
+
value: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type FiltersAction =
|
|
25
|
+
| {
|
|
26
|
+
type: "add";
|
|
27
|
+
payload: Filter;
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
type: "edit";
|
|
31
|
+
payload: Filter;
|
|
32
|
+
}
|
|
33
|
+
| {
|
|
34
|
+
type: "remove";
|
|
35
|
+
payload: { id: string };
|
|
36
|
+
}
|
|
37
|
+
| {
|
|
38
|
+
type: "clear";
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type FiltersState = {
|
|
42
|
+
filters: Filter[];
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type FilterEditorMode = "ADD" | "EDIT";
|
|
46
|
+
|
|
47
|
+
export enum DefaultOperators {
|
|
48
|
+
is = "is",
|
|
49
|
+
isNot = "is not",
|
|
50
|
+
contains = "contains",
|
|
51
|
+
doesNotContain = "does not contain",
|
|
52
|
+
isEmpty = "is empty"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface DataGridColumnMetadata {
|
|
56
|
+
name: string;
|
|
57
|
+
headline: string;
|
|
58
|
+
operators?: string[];
|
|
59
|
+
defaultValues?: string[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface PopoverTranslations {
|
|
63
|
+
columnSelectLabel?: string;
|
|
64
|
+
operatorSelectLabel?: string;
|
|
65
|
+
valueSelectLabel?: string;
|
|
66
|
+
addNewValueLabel?: string;
|
|
67
|
+
addNewValueButtonTitle?: string;
|
|
68
|
+
submitButtonTitle?: string;
|
|
69
|
+
cancelButtonTitle?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface TagTranslations {
|
|
73
|
+
addButtonCaption?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface ToolbarTranslations {
|
|
77
|
+
clearButtonCaption?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface FiltersTranslations {
|
|
81
|
+
toolbar?: ToolbarTranslations;
|
|
82
|
+
tag?: TagTranslations;
|
|
83
|
+
popover?: PopoverTranslations;
|
|
84
|
+
}
|