@databiosphere/findable-ui 35.2.0 → 37.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +27 -0
- package/lib/common/entities.d.ts +2 -3
- package/lib/components/DataDictionary/components/Entities/constants.d.ts +3 -1
- package/lib/components/DataDictionary/components/Entities/constants.js +6 -2
- package/lib/components/DataDictionary/components/Entities/entities.js +6 -2
- package/lib/components/DataDictionary/components/Entities/entities.styles.d.ts +3 -0
- package/lib/components/DataDictionary/components/Entities/entities.styles.js +5 -0
- package/lib/components/DataDictionary/components/Entity/entity.styles.js +1 -8
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.d.ts +4 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.js +15 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.d.ts +7 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.js +7 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.d.ts +2 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.js +6 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/types.d.ts +6 -0
- package/lib/components/DataDictionary/components/Filters/filters.js +2 -0
- package/lib/components/DataDictionary/components/Filters/filters.styles.js +3 -3
- package/lib/components/DataDictionary/components/Filters/stories/constants.d.ts +1 -0
- package/lib/components/DataDictionary/components/Filters/stories/constants.js +16 -0
- package/lib/components/DataDictionary/components/Filters/stories/filters.stories.js +11 -3
- package/lib/components/DataDictionary/components/Filters/stories/hook.d.ts +4 -0
- package/lib/components/DataDictionary/components/Filters/stories/hook.js +4 -0
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.d.ts +2 -1
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.js +4 -4
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.js +1 -4
- package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/types.d.ts +4 -2
- package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.d.ts +2 -1
- package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.js +4 -4
- package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.js +4 -1
- package/lib/components/DataDictionary/components/Table/hook.d.ts +2 -2
- package/lib/components/DataDictionary/components/Table/hook.js +8 -4
- package/lib/components/DataDictionary/components/Table/options/columnFilters/constants.js +2 -1
- package/lib/components/DataDictionary/components/Table/options/columnFilters/hook.d.ts +2 -5
- package/lib/components/DataDictionary/components/Table/options/columnFilters/hook.js +8 -6
- package/lib/components/DataDictionary/components/Table/options/globalFilter/constants.d.ts +2 -0
- package/lib/components/DataDictionary/components/Table/options/globalFilter/constants.js +5 -0
- package/lib/components/DataDictionary/components/Table/options/globalFilter/hook.d.ts +3 -0
- package/lib/components/DataDictionary/components/Table/options/globalFilter/hook.js +16 -0
- package/lib/components/DataDictionary/components/Table/options/hook.js +7 -5
- package/lib/components/DataDictionary/components/Table/options/pagination/constants.d.ts +2 -0
- package/lib/components/DataDictionary/components/Table/options/pagination/constants.js +3 -0
- package/lib/components/DataDictionary/dataDictionary.d.ts +1 -1
- package/lib/components/DataDictionary/dataDictionary.js +31 -12
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.d.ts +4 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.js +27 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/types.d.ts +7 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/types.js +1 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.d.ts +6 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.js +8 -0
- package/lib/components/DataDictionary/hooks/UseMeasureFilters/hook.d.ts +2 -0
- package/lib/components/DataDictionary/hooks/UseMeasureFilters/hook.js +17 -0
- package/lib/components/DataDictionary/hooks/UseMeasureFilters/types.d.ts +7 -0
- package/lib/components/DataDictionary/hooks/UseMeasureFilters/types.js +1 -0
- package/lib/components/DataDictionary/types.d.ts +1 -0
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.d.ts +2 -1
- package/lib/components/Export/components/DownloadCurlCommand/downloadCurlCommand.js +3 -1
- package/lib/components/Export/components/ExportToTerra/exportToTerra.d.ts +2 -1
- package/lib/components/Export/components/ExportToTerra/exportToTerra.js +3 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.d.ts +2 -1
- package/lib/components/Export/components/ManifestDownload/manifestDownload.js +3 -1
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.d.ts +2 -0
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.js +8 -0
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.d.ts +3 -0
- package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.js +18 -0
- package/lib/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.d.ts +6 -0
- package/lib/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.js +6 -0
- package/lib/components/Filter/components/FilterCountChip/types.d.ts +5 -0
- package/lib/components/Filter/components/FilterCountChip/types.js +1 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +1 -1
- package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
- package/lib/components/Table/columnDef/globalFilter/constants.d.ts +2 -0
- package/lib/components/Table/columnDef/globalFilter/constants.js +4 -0
- package/lib/components/Table/columnDef/globalFilter/filterFn.d.ts +13 -0
- package/lib/components/Table/columnDef/globalFilter/filterFn.js +24 -0
- package/lib/components/Table/columnDef/globalFilter/types.d.ts +4 -0
- package/lib/components/Table/columnDef/globalFilter/types.js +1 -0
- package/lib/components/Table/columnDef/globalFilter/utils.d.ts +23 -0
- package/lib/components/Table/columnDef/globalFilter/utils.js +57 -0
- package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.d.ts +2 -1
- package/lib/components/Table/components/TableCell/components/RankedCell/rankedCell.d.ts +3 -0
- package/lib/components/Table/components/TableCell/components/RankedCell/rankedCell.js +25 -0
- package/lib/components/Table/components/TableCell/components/RankedCell/utils.d.ts +30 -0
- package/lib/components/Table/components/TableCell/components/RankedCell/utils.js +64 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.js +9 -5
- package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.d.ts +9 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.js +20 -1
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.d.ts +3 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.js +9 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.d.ts +5 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.js +24 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.d.ts +3 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.js +10 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.d.ts +6 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.js +17 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.d.ts +6 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.js +1 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/constants.d.ts +2 -1
- package/lib/components/Table/components/TableFeatures/ColumnFilter/constants.js +6 -0
- package/lib/components/Table/components/TableFeatures/ColumnFilter/types.d.ts +3 -2
- package/lib/components/Table/components/TableFeatures/GlobalFilter/constants.d.ts +2 -0
- package/lib/components/Table/components/TableFeatures/GlobalFilter/constants.js +6 -0
- package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.d.ts +3 -0
- package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.js +10 -0
- package/lib/components/Table/components/TableFeatures/GlobalFilter/types.d.ts +6 -0
- package/lib/components/Table/components/TableFeatures/GlobalFilter/types.js +1 -0
- package/lib/components/Table/coreOptions/state/pagination/constants.d.ts +2 -0
- package/lib/components/Table/coreOptions/state/pagination/constants.js +6 -0
- package/lib/components/Table/coreOptions/state/pagination/utils.d.ts +9 -0
- package/lib/components/Table/coreOptions/state/pagination/utils.js +18 -0
- package/lib/components/common/AnchorLink/anchorLink.js +4 -2
- package/lib/components/common/AnchorLink/anchorLink.styles.d.ts +1 -1
- package/lib/components/common/AnchorLink/anchorLink.styles.js +1 -1
- package/lib/components/common/CustomIcon/components/SearchIcon/searchIcon.d.ts +2 -2
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.d.ts +2 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.js +13 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.d.ts +5 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.js +11 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.d.ts +3 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.js +10 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.d.ts +4 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.js +1 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.d.ts +2 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.js +5 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.d.ts +1 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.js +9 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/constants.d.ts +2 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/components/constants.js +5 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.d.ts +5 -0
- package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.js +5 -0
- package/lib/components/common/OutlinedInput/outlinedInput.styles.d.ts +7 -0
- package/lib/components/common/OutlinedInput/outlinedInput.styles.js +18 -0
- package/lib/hooks/stateSyncManager/hooks/UseMetaCommands/hook.js +2 -2
- package/lib/hooks/stateSyncManager/hooks/UseStateSync/hook.js +3 -3
- package/lib/hooks/stateSyncManager/types.d.ts +1 -1
- package/lib/hooks/useFileManifest/useFileManifestFileCount.d.ts +10 -0
- package/lib/hooks/useFileManifest/useFileManifestFileCount.js +44 -0
- package/lib/hooks/useRequestManifest/utils.d.ts +21 -14
- package/lib/hooks/useRequestManifest/utils.js +33 -21
- package/lib/mocks/useRequestFileManifest.mocks.js +2 -0
- package/lib/providers/dataDictionary/context.d.ts +2 -0
- package/lib/providers/dataDictionary/context.js +4 -0
- package/lib/providers/dataDictionary/hook.d.ts +6 -0
- package/lib/providers/dataDictionary/hook.js +9 -0
- package/lib/providers/dataDictionary/types.d.ts +3 -0
- package/lib/providers/dataDictionary/types.js +1 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/action.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/action.js +12 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/dispatch.d.ts +6 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/dispatch.js +11 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/types.d.ts +6 -0
- package/lib/providers/dataDictionaryState/actions/clearMeta/types.js +1 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/action.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/action.js +14 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/dispatch.d.ts +7 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/dispatch.js +12 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/types.d.ts +12 -0
- package/lib/providers/dataDictionaryState/actions/stateToUrl/types.js +5 -0
- package/lib/providers/dataDictionaryState/actions/types.d.ts +13 -0
- package/lib/providers/dataDictionaryState/actions/types.js +8 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/action.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/action.js +18 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.d.ts +7 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.js +12 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/types.d.ts +10 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/types.js +1 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/utils.d.ts +11 -0
- package/lib/providers/dataDictionaryState/actions/updateColumnFilters/utils.js +27 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/action.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/action.js +19 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.d.ts +7 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.js +12 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/types.d.ts +10 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/types.js +1 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/utils.d.ts +17 -0
- package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/utils.js +36 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/action.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/action.js +20 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/dispatch.d.ts +7 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/dispatch.js +12 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/types.d.ts +9 -0
- package/lib/providers/dataDictionaryState/actions/urlToState/types.js +1 -0
- package/lib/providers/dataDictionaryState/context.d.ts +2 -0
- package/lib/providers/dataDictionaryState/context.js +6 -0
- package/lib/providers/dataDictionaryState/dictionaries/constants.d.ts +4 -0
- package/lib/providers/dataDictionaryState/dictionaries/constants.js +4 -0
- package/lib/providers/dataDictionaryState/dictionaries/state.d.ts +11 -0
- package/lib/providers/dataDictionaryState/dictionaries/state.js +29 -0
- package/lib/providers/dataDictionaryState/dictionaries/types.d.ts +9 -0
- package/lib/providers/dataDictionaryState/dictionaries/types.js +1 -0
- package/lib/providers/dataDictionaryState/dictionaries/utils.d.ts +14 -0
- package/lib/providers/dataDictionaryState/dictionaries/utils.js +20 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.d.ts +2 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.js +6 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.d.ts +4 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.js +1 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.d.ts +2 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.js +9 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.d.ts +6 -0
- package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.js +9 -0
- package/lib/providers/dataDictionaryState/initializer/constants.d.ts +2 -0
- package/lib/providers/dataDictionaryState/initializer/constants.js +4 -0
- package/lib/providers/dataDictionaryState/initializer/initializer.d.ts +9 -0
- package/lib/providers/dataDictionaryState/initializer/initializer.js +17 -0
- package/lib/providers/dataDictionaryState/initializer/utils.d.ts +8 -0
- package/lib/providers/dataDictionaryState/initializer/utils.js +29 -0
- package/lib/providers/dataDictionaryState/provider.d.ts +4 -0
- package/lib/providers/dataDictionaryState/provider.js +7 -0
- package/lib/providers/dataDictionaryState/reducer.d.ts +9 -0
- package/lib/providers/dataDictionaryState/reducer.js +34 -0
- package/lib/providers/dataDictionaryState/types.d.ts +15 -0
- package/lib/providers/dataDictionaryState/types.js +1 -0
- package/lib/providers/fileManifestState/constants.js +1 -0
- package/lib/providers/fileManifestState.d.ts +16 -1
- package/lib/providers/fileManifestState.js +6 -0
- package/lib/styles/common/mui/iconButton.d.ts +11 -0
- package/lib/styles/common/mui/iconButton.js +29 -0
- package/lib/styles/common/mui/inputAdornment.d.ts +9 -0
- package/lib/styles/common/mui/inputAdornment.js +13 -0
- package/lib/styles/common/mui/outlinedInput.d.ts +7 -0
- package/lib/styles/common/mui/outlinedInput.js +7 -0
- package/lib/theme/common/components.js +122 -16
- package/lib/theme/components/muiButtonGroup.js +4 -0
- package/lib/theme/components/muiTableCell.js +6 -0
- package/lib/utils/parseJsonQueryParam.d.ts +14 -0
- package/lib/utils/parseJsonQueryParam.js +25 -0
- package/lib/utils/stateToUrlQuery.d.ts +15 -0
- package/lib/utils/stateToUrlQuery.js +35 -0
- package/lib/views/DataDictionaryView/dataDictionaryView.d.ts +2 -2
- package/lib/views/DataDictionaryView/dataDictionaryView.js +16 -2
- package/lib/views/DataDictionaryView/types.d.ts +4 -0
- package/lib/views/DataDictionaryView/types.js +1 -0
- package/lib/views/DataDictionaryView/utils.d.ts +12 -0
- package/lib/views/DataDictionaryView/utils.js +17 -0
- package/lib/views/ExploreView/utils.d.ts +1 -1
- package/lib/views/ExploreView/utils.js +1 -1
- package/package.json +2 -1
- package/src/common/entities.ts +2 -3
- package/src/components/DataDictionary/components/Entities/constants.ts +9 -3
- package/src/components/DataDictionary/components/Entities/entities.styles.ts +6 -0
- package/src/components/DataDictionary/components/Entities/entities.tsx +7 -2
- package/src/components/DataDictionary/components/Entity/entity.styles.ts +1 -10
- package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.ts +8 -0
- package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.tsx +33 -0
- package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.ts +8 -0
- package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/types.ts +8 -0
- package/src/components/DataDictionary/components/Filters/filters.styles.ts +3 -3
- package/src/components/DataDictionary/components/Filters/filters.tsx +2 -0
- package/src/components/DataDictionary/components/Filters/stories/constants.ts +18 -0
- package/src/components/DataDictionary/components/Filters/stories/filters.stories.tsx +15 -3
- package/src/components/DataDictionary/components/Filters/stories/hook.ts +8 -0
- package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.ts +1 -5
- package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.tsx +13 -7
- package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/types.ts +4 -2
- package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.ts +4 -1
- package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.tsx +13 -7
- package/src/components/DataDictionary/components/Table/hook.ts +10 -6
- package/src/components/DataDictionary/components/Table/options/columnFilters/constants.ts +2 -1
- package/src/components/DataDictionary/components/Table/options/columnFilters/hook.ts +13 -12
- package/src/components/DataDictionary/components/Table/options/globalFilter/constants.ts +14 -0
- package/src/components/DataDictionary/components/Table/options/globalFilter/hook.ts +28 -0
- package/src/components/DataDictionary/components/Table/options/hook.ts +9 -11
- package/src/components/DataDictionary/components/Table/options/pagination/constants.ts +6 -0
- package/src/components/DataDictionary/dataDictionary.tsx +45 -16
- package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.ts +38 -0
- package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/types.ts +8 -0
- package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.ts +8 -0
- package/src/components/DataDictionary/hooks/UseMeasureFilters/hook.ts +27 -0
- package/src/components/DataDictionary/hooks/UseMeasureFilters/types.ts +6 -0
- package/src/components/DataDictionary/types.ts +1 -0
- package/src/components/Export/components/DownloadCurlCommand/downloadCurlCommand.tsx +4 -0
- package/src/components/Export/components/ExportToTerra/exportToTerra.tsx +4 -0
- package/src/components/Export/components/ManifestDownload/manifestDownload.tsx +4 -0
- package/src/components/Filter/components/FilterCountChip/filterCountChip.styles.ts +19 -0
- package/src/components/Filter/components/FilterCountChip/filterCountChip.tsx +21 -0
- package/src/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.tsx +12 -0
- package/src/components/Filter/components/FilterCountChip/types.ts +6 -0
- package/src/components/Table/columnDef/globalFilter/constants.ts +5 -0
- package/src/components/Table/columnDef/globalFilter/filterFn.ts +34 -0
- package/src/components/Table/columnDef/globalFilter/types.ts +5 -0
- package/src/components/Table/columnDef/globalFilter/utils.ts +74 -0
- package/src/components/Table/components/TableCell/components/CodeCell/codeCell.tsx +5 -2
- package/src/components/Table/components/TableCell/components/RankedCell/rankedCell.tsx +50 -0
- package/src/components/Table/components/TableCell/components/RankedCell/utils.ts +85 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.ts +26 -1
- package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.tsx +11 -5
- package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.ts +25 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.tsx +31 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.ts +13 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.tsx +26 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.ts +9 -0
- package/src/components/Table/components/TableFeatures/ColumnFilter/constants.ts +8 -1
- package/src/components/Table/components/TableFeatures/ColumnFilter/types.ts +3 -2
- package/src/components/Table/components/TableFeatures/GlobalFilter/constants.ts +8 -0
- package/src/components/Table/components/TableFeatures/GlobalFilter/globalFilter.tsx +33 -0
- package/src/components/Table/components/TableFeatures/GlobalFilter/types.ts +9 -0
- package/src/components/Table/coreOptions/state/pagination/constants.ts +8 -0
- package/src/components/Table/coreOptions/state/pagination/utils.ts +21 -0
- package/src/components/common/AnchorLink/anchorLink.styles.ts +1 -1
- package/src/components/common/AnchorLink/anchorLink.tsx +9 -3
- package/src/components/common/CustomIcon/components/SearchIcon/searchIcon.tsx +2 -3
- package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.ts +12 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.tsx +21 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.ts +13 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.ts +4 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.ts +7 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.tsx +13 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/components/constants.ts +7 -0
- package/src/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.ts +6 -0
- package/src/components/common/OutlinedInput/outlinedInput.styles.ts +24 -0
- package/src/hooks/stateSyncManager/hooks/UseMetaCommands/hook.ts +2 -2
- package/src/hooks/stateSyncManager/hooks/UseStateSync/hook.ts +3 -3
- package/src/hooks/stateSyncManager/types.ts +1 -1
- package/src/hooks/useFileManifest/useFileManifestFileCount.ts +65 -0
- package/src/hooks/useRequestManifest/utils.ts +37 -24
- package/src/mocks/useRequestFileManifest.mocks.ts +2 -0
- package/src/providers/dataDictionary/context.ts +6 -0
- package/src/providers/dataDictionary/hook.ts +11 -0
- package/src/providers/dataDictionary/types.ts +6 -0
- package/src/providers/dataDictionaryState/actions/clearMeta/action.ts +18 -0
- package/src/providers/dataDictionaryState/actions/clearMeta/dispatch.ts +13 -0
- package/src/providers/dataDictionaryState/actions/clearMeta/types.ts +8 -0
- package/src/providers/dataDictionaryState/actions/stateToUrl/action.ts +20 -0
- package/src/providers/dataDictionaryState/actions/stateToUrl/dispatch.ts +14 -0
- package/src/providers/dataDictionaryState/actions/stateToUrl/types.ts +15 -0
- package/src/providers/dataDictionaryState/actions/types.ts +20 -0
- package/src/providers/dataDictionaryState/actions/updateColumnFilters/action.ts +24 -0
- package/src/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.ts +16 -0
- package/src/providers/dataDictionaryState/actions/updateColumnFilters/types.ts +12 -0
- package/src/providers/dataDictionaryState/actions/updateColumnFilters/utils.ts +41 -0
- package/src/providers/dataDictionaryState/actions/updateGlobalFilter/action.ts +25 -0
- package/src/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.ts +16 -0
- package/src/providers/dataDictionaryState/actions/updateGlobalFilter/types.ts +12 -0
- package/src/providers/dataDictionaryState/actions/updateGlobalFilter/utils.ts +50 -0
- package/src/providers/dataDictionaryState/actions/urlToState/action.ts +28 -0
- package/src/providers/dataDictionaryState/actions/urlToState/dispatch.ts +14 -0
- package/src/providers/dataDictionaryState/actions/urlToState/types.ts +11 -0
- package/src/providers/dataDictionaryState/context.ts +9 -0
- package/src/providers/dataDictionaryState/dictionaries/constants.ts +4 -0
- package/src/providers/dataDictionaryState/dictionaries/state.ts +45 -0
- package/src/providers/dataDictionaryState/dictionaries/types.ts +11 -0
- package/src/providers/dataDictionaryState/dictionaries/utils.ts +25 -0
- package/src/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.ts +14 -0
- package/src/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.ts +5 -0
- package/src/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.ts +17 -0
- package/src/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.ts +11 -0
- package/src/providers/dataDictionaryState/initializer/constants.ts +6 -0
- package/src/providers/dataDictionaryState/initializer/initializer.ts +22 -0
- package/src/providers/dataDictionaryState/initializer/utils.ts +39 -0
- package/src/providers/dataDictionaryState/provider.tsx +16 -0
- package/src/providers/dataDictionaryState/reducer.ts +42 -0
- package/src/providers/dataDictionaryState/types.ts +18 -0
- package/src/providers/fileManifestState/constants.ts +1 -0
- package/src/providers/fileManifestState.tsx +23 -0
- package/src/styles/common/mui/iconButton.ts +40 -0
- package/src/styles/common/mui/inputAdornment.ts +22 -0
- package/src/styles/common/mui/outlinedInput.ts +14 -0
- package/src/theme/common/components.ts +122 -16
- package/src/theme/components/muiButtonGroup.ts +4 -0
- package/src/theme/components/muiTableCell.ts +6 -0
- package/src/utils/parseJsonQueryParam.ts +27 -0
- package/src/utils/stateToUrlQuery.ts +40 -0
- package/src/views/DataDictionaryView/dataDictionaryView.tsx +29 -3
- package/src/views/DataDictionaryView/types.ts +5 -0
- package/src/views/DataDictionaryView/utils.ts +23 -0
- package/src/views/ExploreView/utils.ts +1 -1
- package/tests/buildRequestFilters.test.ts +5 -13
- package/tests/useRequestManifest.test.ts +10 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +0 -4
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +0 -36
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +0 -8
- package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +0 -51
- package/src/components/DataDictionary/hooks/UseDataDictionary/types.ts +0 -9
- /package/lib/components/DataDictionary/{hooks/UseDataDictionary → components/Filters/components/ColumnFilterTags}/types.js +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { escapeRegExp } from "../../../../../../common/utils";
|
|
2
|
+
import { parseSearchTerms } from "../../../../columnDef/globalFilter/utils";
|
|
3
|
+
/**
|
|
4
|
+
* Renders a cell value with highlighting if it matches item rank filter criteria.
|
|
5
|
+
* @param table - Table.
|
|
6
|
+
* @param row - Row.
|
|
7
|
+
* @param columnId - Column identifier.
|
|
8
|
+
* @param value - Cell value.
|
|
9
|
+
* @returns Rendered cell value with highlighting.
|
|
10
|
+
*/
|
|
11
|
+
export function renderRankedCell(table, row, columnId, value) {
|
|
12
|
+
// If the cell value is undefined or null, return an empty string.
|
|
13
|
+
if (value === undefined || value === null)
|
|
14
|
+
return "";
|
|
15
|
+
const stringValue = String(value);
|
|
16
|
+
// Check if the cell is ranked.
|
|
17
|
+
const isRanked = isRankedCell(table, row, columnId);
|
|
18
|
+
// Return the unranked cell, as-is, in string form.
|
|
19
|
+
if (!isRanked)
|
|
20
|
+
return stringValue;
|
|
21
|
+
// Tokenise the current global filter.
|
|
22
|
+
const tokens = getTokens(table);
|
|
23
|
+
// If there are no tokens, return the value as-is, in string form.
|
|
24
|
+
if (tokens.length === 0)
|
|
25
|
+
return stringValue;
|
|
26
|
+
// Create regex pattern.
|
|
27
|
+
const regex = getTokensRegex(tokens);
|
|
28
|
+
return stringValue.replace(regex, "<mark>$1</mark>");
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns the current global filter tokens from the table.
|
|
32
|
+
* @param table - Table.
|
|
33
|
+
* @returns An array of search tokens.
|
|
34
|
+
*/
|
|
35
|
+
export function getTokens(table) {
|
|
36
|
+
const { getState } = table;
|
|
37
|
+
const { globalFilter } = getState();
|
|
38
|
+
return parseSearchTerms(globalFilter);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns a RegExp pattern for matching search tokens.
|
|
42
|
+
* @param tokens - Search tokens.
|
|
43
|
+
* @returns A RegExp pattern that matches any of the tokens.
|
|
44
|
+
*/
|
|
45
|
+
export function getTokensRegex(tokens) {
|
|
46
|
+
return new RegExp(`(${tokens.map(escapeRegExp).join("|")})`, "gi");
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Checks if a cell is ranked based on the global filter.
|
|
50
|
+
* @param table - Table.
|
|
51
|
+
* @param row - Row.
|
|
52
|
+
* @param columnId - Column identifier.
|
|
53
|
+
* @returns Whether the cell is ranked.
|
|
54
|
+
*/
|
|
55
|
+
export function isRankedCell(table, row, columnId) {
|
|
56
|
+
const { getState } = table;
|
|
57
|
+
const { globalFilter } = getState();
|
|
58
|
+
// If there is no global filter, return the value as-is.
|
|
59
|
+
if (!globalFilter)
|
|
60
|
+
return false;
|
|
61
|
+
// Check if the column has filter metadata with itemRank.passed
|
|
62
|
+
const columnFilterMeta = row.columnFiltersMeta[columnId];
|
|
63
|
+
return columnFilterMeta?.passed ?? false;
|
|
64
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Checkbox, ListItemButton, ListItemText,
|
|
1
|
+
import { Checkbox, Grid, ListItemButton, ListItemText, Typography, } from "@mui/material";
|
|
2
2
|
import React, { Fragment } from "react";
|
|
3
3
|
import { SVG_ICON_PROPS } from "../../../../../styles/common/mui/svgIcon";
|
|
4
4
|
import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
|
|
@@ -6,22 +6,26 @@ import { CheckedIcon } from "../../../../common/CustomIcon/components/CheckedIco
|
|
|
6
6
|
import { UncheckedIcon } from "../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
7
7
|
import { DropDownIcon } from "../../../../common/Form/components/Select/components/DropDownIcon/dropDownIcon";
|
|
8
8
|
import { useMenu } from "../../../../common/Menu/hooks/useMenu";
|
|
9
|
+
import { FilterCountChip } from "../../../../Filter/components/FilterCountChip/filterCountChip";
|
|
9
10
|
import { getColumnHeader } from "../../../common/utils";
|
|
10
11
|
import { getSortedFacetedValues } from "../../../featureOptions/facetedColumn/utils";
|
|
11
|
-
import { StyledMenu } from "./columnFilter.styles";
|
|
12
|
-
import { MENU_PROPS } from "./constants";
|
|
12
|
+
import { StyledButton, StyledMenu } from "./columnFilter.styles";
|
|
13
|
+
import { GRID_PROPS, MENU_PROPS } from "./constants";
|
|
13
14
|
import { updater } from "./utils";
|
|
14
15
|
/**
|
|
15
16
|
* Column filter component with supported filter functions:
|
|
16
17
|
* - `arrIncludesSome`
|
|
17
18
|
*/
|
|
18
|
-
export const ColumnFilter = ({ Button =
|
|
19
|
+
export const ColumnFilter = ({ Button = StyledButton, className, column, ...props /* MuiMenuProps */ }) => {
|
|
19
20
|
const { anchorEl, onClose, onOpen, open } = useMenu();
|
|
20
21
|
const facetedUniqueValues = column.getFacetedUniqueValues();
|
|
21
22
|
const sortedValues = getSortedFacetedValues(facetedUniqueValues);
|
|
22
23
|
const filterValue = (column.getFilterValue() || []);
|
|
23
24
|
return (React.createElement(Fragment, null,
|
|
24
|
-
React.createElement(Button, { key: column.id, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen },
|
|
25
|
+
React.createElement(Button, { key: column.id, disabled: sortedValues.length === 0, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen, open: open },
|
|
26
|
+
React.createElement(Grid, { ...GRID_PROPS },
|
|
27
|
+
getColumnHeader(column),
|
|
28
|
+
React.createElement(FilterCountChip, { count: filterValue.length }))),
|
|
25
29
|
React.createElement(StyledMenu, { ...MENU_PROPS, ...props, className: className, anchorEl: anchorEl, onClose: onClose, open: open },
|
|
26
30
|
sortedValues.map(([value, occurrence]) => (React.createElement(ListItemButton, { key: String(value), selected: filterValue.includes(value), onClick: () => column.setFilterValue(updater(value)) },
|
|
27
31
|
React.createElement(Checkbox, { checked: filterValue.includes(value), checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
open: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
6
|
+
}, "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "href" | "action" | "loading" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loadingIndicator" | "loadingPosition" | "startIcon"> & {
|
|
7
|
+
theme?: import("@emotion/react").Theme;
|
|
8
|
+
} & Props, {}, {}>;
|
|
1
9
|
export declare const StyledMenu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & {
|
|
2
10
|
theme?: import("@emotion/react").Theme;
|
|
3
11
|
}, {}, {}>;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,26 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
1
2
|
import styled from "@emotion/styled";
|
|
2
|
-
import { Menu, menuClasses, paperClasses } from "@mui/material";
|
|
3
|
+
import { Button, Menu, menuClasses, paperClasses } from "@mui/material";
|
|
4
|
+
import { PALETTE } from "../../../../../styles/common/constants/palette";
|
|
3
5
|
import { MAX_LIST_HEIGHT_PX } from "../../../../Filter/common/constants";
|
|
4
6
|
import { MuiListItemButtonRoot, MuiListItemTextRoot, } from "../../../../Filter/components/FilterList/filterList.styles";
|
|
7
|
+
export const StyledButton = styled(Button, {
|
|
8
|
+
shouldForwardProp: (prop) => prop !== "open",
|
|
9
|
+
}) `
|
|
10
|
+
&.MuiButtonGroup-grouped {
|
|
11
|
+
gap: 0;
|
|
12
|
+
|
|
13
|
+
.MuiButton-endIcon {
|
|
14
|
+
margin-left: 0;
|
|
15
|
+
margin-right: -8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${({ open }) => open &&
|
|
19
|
+
css `
|
|
20
|
+
background-color: ${PALETTE.SMOKE_LIGHT};
|
|
21
|
+
`}
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
5
24
|
export const StyledMenu = styled(Menu) `
|
|
6
25
|
.${paperClasses.root} {
|
|
7
26
|
margin: 4px 0;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
|
+
import React, { Fragment } from "react";
|
|
3
|
+
import { updater } from "../../../../../components/TableFeatures/ColumnFilter/utils";
|
|
4
|
+
import { StyledChip } from "./columnFilterTag.styles";
|
|
5
|
+
import { CHIP_PROPS, SVG_ICON_PROPS } from "./constants";
|
|
6
|
+
export const ColumnFilterTag = ({ className, column, ...props /* MuiChipProps */ }) => {
|
|
7
|
+
const filterValue = column.getFilterValue();
|
|
8
|
+
return (React.createElement(Fragment, null, filterValue.map((value) => (React.createElement(StyledChip, { ...CHIP_PROPS, key: String(value), className: className, deleteIcon: React.createElement(CloseRounded, { ...SVG_ICON_PROPS }), label: String(value), onClick: () => column.setFilterValue(updater(value)), onDelete: () => column.setFilterValue(updater(value)), ...props })))));
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const StyledChip: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "label" | "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "icon" | "onDelete" | "skipFocusWhenDisabled"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Chip } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../../../styles/common/constants/palette";
|
|
4
|
+
export const StyledChip = styled(Chip) `
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
box-shadow: 0 0 0 2px ${PALETTE.COMMON_WHITE};
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
gap: 4px;
|
|
9
|
+
justify-self: flex-start;
|
|
10
|
+
padding: 0 8px;
|
|
11
|
+
|
|
12
|
+
.MuiChip-label {
|
|
13
|
+
padding: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.MuiChip-deleteIcon {
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
margin: 0 -4px 0 0;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
color: inherit;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../../../../styles/common/mui/chip";
|
|
2
|
+
import { SVG_ICON_PROPS as MUI_SVG_ICON_PROPS } from "../../../../../../../styles/common/mui/svgIcon";
|
|
3
|
+
export const CHIP_PROPS = {
|
|
4
|
+
clickable: false,
|
|
5
|
+
color: MUI_CHIP_PROPS.COLOR.DEFAULT,
|
|
6
|
+
size: MUI_CHIP_PROPS.SIZE.MEDIUM,
|
|
7
|
+
};
|
|
8
|
+
export const SVG_ICON_PROPS = {
|
|
9
|
+
color: MUI_SVG_ICON_PROPS.COLOR.INHERIT,
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BIONETWORK } from "../../../../../../../DataDictionary/components/Filters/stories/constants";
|
|
4
|
+
import { ColumnFilterTag } from "../columnFilterTag";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: ColumnFilterTag,
|
|
7
|
+
decorators: [
|
|
8
|
+
(Story) => (React.createElement(Box, { sx: { display: "grid", gap: 2, gridAutoFlow: "column" } },
|
|
9
|
+
React.createElement(Story, null))),
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
args: {
|
|
15
|
+
column: BIONETWORK,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChipProps } from "@mui/material";
|
|
2
|
+
import { Column, RowData } from "@tanstack/react-table";
|
|
3
|
+
import { BaseComponentProps } from "../../../../../../types";
|
|
4
|
+
export interface ColumnFilterTagProps<T extends RowData> extends BaseComponentProps, ChipProps {
|
|
5
|
+
column: Column<T>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuProps } from "@mui/material";
|
|
2
2
|
import { Column, RowData } from "@tanstack/react-table";
|
|
3
3
|
import { BaseComponentProps } from "../../../../types";
|
|
4
|
+
import { StyledButton } from "./columnFilter.styles";
|
|
4
5
|
export interface ColumnFilterProps<T extends RowData> extends BaseComponentProps, Omit<MenuProps, "anchorEl" | "onClose" | "open"> {
|
|
5
|
-
Button?: typeof
|
|
6
|
+
Button?: typeof StyledButton;
|
|
6
7
|
column: Column<T>;
|
|
7
8
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClearInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment";
|
|
3
|
+
import { SearchInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment";
|
|
4
|
+
import { StyledOutlinedInput } from "../../../../common/OutlinedInput/outlinedInput.styles";
|
|
5
|
+
import { OUTLINED_INPUT_PROPS } from "./constants";
|
|
6
|
+
export const GlobalFilter = ({ className, table, ...props /* MuiOutlinedInputProps */ }) => {
|
|
7
|
+
const { getState, setGlobalFilter } = table;
|
|
8
|
+
const { globalFilter } = getState();
|
|
9
|
+
return (React.createElement(StyledOutlinedInput, { ...OUTLINED_INPUT_PROPS, className: className, endAdornment: React.createElement(ClearInputAdornment, { in: !!globalFilter, onClick: () => setGlobalFilter(undefined) }), hasValue: !!globalFilter, onChange: (e) => setGlobalFilter(e.target.value), startAdornment: React.createElement(SearchInputAdornment, null), value: globalFilter ?? "", ...props }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OutlinedInputProps } from "@mui/material";
|
|
2
|
+
import { RowData, Table } from "@tanstack/react-table";
|
|
3
|
+
import { BaseComponentProps } from "components/types";
|
|
4
|
+
export interface GlobalFilterProps<T extends RowData> extends BaseComponentProps, OutlinedInputProps {
|
|
5
|
+
table: Table<T>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InitialTableState, PaginationTableState } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* Initializes pagination state by merging default values with initial state.
|
|
4
|
+
* TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
|
|
5
|
+
* so this function ensures custom pagination state is properly initialized from the initial state.
|
|
6
|
+
* @param initialState - The initial state.
|
|
7
|
+
* @returns The initialized pagination state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function initPaginationState(initialState?: InitialTableState): PaginationTableState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PAGINATION_TABLE_STATE } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* Initializes pagination state by merging default values with initial state.
|
|
4
|
+
* TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
|
|
5
|
+
* so this function ensures custom pagination state is properly initialized from the initial state.
|
|
6
|
+
* @param initialState - The initial state.
|
|
7
|
+
* @returns The initialized pagination state.
|
|
8
|
+
*/
|
|
9
|
+
export function initPaginationState(initialState) {
|
|
10
|
+
if (!initialState?.pagination)
|
|
11
|
+
return PAGINATION_TABLE_STATE;
|
|
12
|
+
return {
|
|
13
|
+
pagination: {
|
|
14
|
+
...PAGINATION_TABLE_STATE.pagination,
|
|
15
|
+
...initialState.pagination,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { LinkRounded } from "@mui/icons-material";
|
|
2
|
+
import { useRouter } from "next/router";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import {
|
|
4
|
+
import { StyledNextLink } from "./anchorLink.styles";
|
|
4
5
|
export const AnchorLink = ({ anchorLink, className, }) => {
|
|
5
|
-
|
|
6
|
+
const { query } = useRouter();
|
|
7
|
+
return (React.createElement(StyledNextLink, { "aria-label": anchorLink, className: className, href: { hash: anchorLink, query } },
|
|
6
8
|
React.createElement(LinkRounded, { fontSize: "xsmall" })));
|
|
7
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const StyledNextLink: import("@emotion/styled").StyledComponent<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, keyof {
|
|
2
2
|
href: string | import("url").UrlObject;
|
|
3
3
|
as?: string | import("url").UrlObject;
|
|
4
4
|
replace?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { inkLight } from "../../../styles/common/mixins/colors";
|
|
4
|
-
export const
|
|
4
|
+
export const StyledNextLink = styled(Link) `
|
|
5
5
|
color: ${inkLight};
|
|
6
6
|
margin-left: 4px;
|
|
7
7
|
opacity: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvgIconProps } from "@mui/material";
|
|
2
2
|
/**
|
|
3
3
|
* Custom search icon.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SearchIcon: ({ fontSize, viewBox, ...props }:
|
|
5
|
+
export declare const SearchIcon: ({ fontSize, viewBox, ...props }: SvgIconProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
|
+
import { IconButton } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { SVG_ICON_PROPS } from "../constants";
|
|
5
|
+
import { StyledInputAdornment } from "./clearInputAdornment.styles";
|
|
6
|
+
import { ICON_BUTTON_PROPS, INPUT_ADORNMENT_PROPS } from "./constants";
|
|
7
|
+
export const ClearInputAdornment = ({ in: isIn, onClick, }) => {
|
|
8
|
+
if (!isIn)
|
|
9
|
+
return null;
|
|
10
|
+
return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
|
|
11
|
+
React.createElement(IconButton, { ...ICON_BUTTON_PROPS, onClick: onClick },
|
|
12
|
+
React.createElement(CloseRounded, { ...SVG_ICON_PROPS }))));
|
|
13
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { InputAdornment } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../../../styles/common/constants/palette";
|
|
4
|
+
export const StyledInputAdornment = styled(InputAdornment) `
|
|
5
|
+
color: ${PALETTE.INK_LIGHT};
|
|
6
|
+
margin: 0;
|
|
7
|
+
|
|
8
|
+
.MuiIconButton-root {
|
|
9
|
+
margin-right: -10px;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICON_BUTTON_PROPS as MUI_ICON_BUTTON_PROPS } from "../../../../../../../styles/common/mui/iconButton";
|
|
2
|
+
import { INPUT_ADORNMENT_PROPS as MUI_INPUT_ADORNMENT_PROPS } from "../../../../../../../styles/common/mui/inputAdornment";
|
|
3
|
+
export const ICON_BUTTON_PROPS = {
|
|
4
|
+
color: MUI_ICON_BUTTON_PROPS.COLOR.INHERIT,
|
|
5
|
+
edge: MUI_ICON_BUTTON_PROPS.EDGE.END,
|
|
6
|
+
size: MUI_ICON_BUTTON_PROPS.SIZE.MEDIUM,
|
|
7
|
+
};
|
|
8
|
+
export const INPUT_ADORNMENT_PROPS = {
|
|
9
|
+
position: MUI_INPUT_ADORNMENT_PROPS.POSITION.END,
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SearchInputAdornment: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SearchIcon } from "../../../../../CustomIcon/components/SearchIcon/searchIcon";
|
|
3
|
+
import { StyledInputAdornment } from "../../inputAdornment.styles";
|
|
4
|
+
import { SVG_ICON_PROPS } from "../constants";
|
|
5
|
+
import { INPUT_ADORNMENT_PROPS } from "./constants";
|
|
6
|
+
export const SearchInputAdornment = () => {
|
|
7
|
+
return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
|
|
8
|
+
React.createElement(SearchIcon, { ...SVG_ICON_PROPS })));
|
|
9
|
+
};
|
package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { OutlinedInput } from "@mui/material";
|
|
4
|
+
import { PALETTE } from "../../../styles/common/constants/palette";
|
|
5
|
+
export const StyledOutlinedInput = styled(OutlinedInput, {
|
|
6
|
+
shouldForwardProp: (prop) => prop !== "hasValue",
|
|
7
|
+
}) `
|
|
8
|
+
${({ hasValue }) => hasValue &&
|
|
9
|
+
css `
|
|
10
|
+
& {
|
|
11
|
+
color: ${PALETTE.INK_MAIN};
|
|
12
|
+
|
|
13
|
+
.MuiOutlinedInput-input {
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`};
|
|
18
|
+
`;
|
|
@@ -10,11 +10,11 @@ export const useMetaCommands = ({ actions, dispatch, state, }) => {
|
|
|
10
10
|
switch (command) {
|
|
11
11
|
case META_COMMAND.STATE_TO_URL_PUSH:
|
|
12
12
|
Router.push({ query }, undefined, { shallow: true });
|
|
13
|
-
dispatch(actions.clearMeta());
|
|
13
|
+
dispatch?.(actions.clearMeta());
|
|
14
14
|
break;
|
|
15
15
|
case META_COMMAND.STATE_TO_URL_REPLACE:
|
|
16
16
|
Router.replace({ query }, undefined, { shallow: true });
|
|
17
|
-
dispatch(actions.clearMeta());
|
|
17
|
+
dispatch?.(actions.clearMeta());
|
|
18
18
|
break;
|
|
19
19
|
default:
|
|
20
20
|
break;
|
|
@@ -23,18 +23,18 @@ export const useStateSync = ({ actions, dispatch, state, }) => {
|
|
|
23
23
|
// Dispatch action sync URL >> state.
|
|
24
24
|
if (wasPop(basePath, pathname, popRef.current)) {
|
|
25
25
|
// When the user navigates with the back/forward buttons.
|
|
26
|
-
dispatch(actions.urlToState({ query }));
|
|
26
|
+
dispatch?.(actions.urlToState({ query }));
|
|
27
27
|
onClearPopRef();
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
// Dispatch action sync URL >> state.
|
|
31
31
|
if (hasParams(query, paramKeys)) {
|
|
32
32
|
// When the URL has parameters.
|
|
33
|
-
dispatch(actions.urlToState({ query }));
|
|
33
|
+
dispatch?.(actions.urlToState({ query }));
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
// Otherwise, dispatch action sync URL << state.
|
|
37
|
-
dispatch(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
|
|
37
|
+
dispatch?.(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
|
|
38
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- deliberate omission of `state.query`, `state.paramKeys`, `actions` and `dispatch` from dependencies, hook is only expected to run when the Next.js router changes.
|
|
39
39
|
}, [basePath, isReady, pathname, query]);
|
|
40
40
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Filters } from "../../common/entities";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the latest file count from the summary endpoint, excluding filters
|
|
4
|
+
* that match the provided species and file facet names, and updates the file manifest state.
|
|
5
|
+
*
|
|
6
|
+
* @param initialFilters - The initial set of filters to apply.
|
|
7
|
+
* @param speciesFacetName - The facet name representing species to exclude from the summary request.
|
|
8
|
+
* @param fileFacetName - The facet name representing file type to exclude from the summary request.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useFileManifestFileCount: (initialFilters: Filters | undefined, speciesFacetName: string, fileFacetName: string) => void;
|