@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
|
@@ -1,25 +1,44 @@
|
|
|
1
|
+
import { Fade } from "@mui/material";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { Entities } from "./components/Entities/entities";
|
|
4
|
+
import { ColumnFilterTags } from "./components/Filters/components/ColumnFilterTags/columnFilterTags";
|
|
3
5
|
import { Filters } from "./components/Filters/filters";
|
|
4
6
|
import { EntitiesLayout as DefaultEntitiesLayout } from "./components/Layout/components/EntitiesLayout/entitiesLayout";
|
|
5
7
|
import { FiltersLayout as DefaultFiltersLayout } from "./components/Layout/components/FiltersLayout/filtersLayout";
|
|
6
8
|
import { OutlineLayout as DefaultOutlineLayout } from "./components/Layout/components/OutlineLayout/outlineLayout";
|
|
7
9
|
import { TitleLayout as DefaultTitleLayout } from "./components/Layout/components/TitleLayout/titleLayout";
|
|
8
10
|
import { Outline as DefaultOutline } from "./components/Outline/outline";
|
|
11
|
+
import { buildClassesOutline } from "./components/Outline/utils";
|
|
12
|
+
import { useTable } from "./components/Table/hook";
|
|
9
13
|
import { Title as DefaultTitle } from "./components/Title/title";
|
|
10
14
|
import { View } from "./dataDictionary.styles";
|
|
11
|
-
import {
|
|
15
|
+
import { useDataDictionaryConfig } from "./hooks/UseDataDictionaryConfig/hook";
|
|
12
16
|
import { useLayoutSpacing } from "./hooks/UseLayoutSpacing/hook";
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
import { useMeasureFilters } from "./hooks/UseMeasureFilters/hook";
|
|
18
|
+
export const DataDictionary = ({ className, dictionary, EntitiesLayout = DefaultEntitiesLayout, FiltersLayout = DefaultFiltersLayout, Outline = DefaultOutline, OutlineLayout = DefaultOutlineLayout, Title = DefaultTitle, TitleLayout = DefaultTitleLayout, }) => {
|
|
19
|
+
// Get dictionary configuration.
|
|
20
|
+
const { classes, tableOptions, title } = useDataDictionaryConfig(dictionary);
|
|
21
|
+
// Layout measurements.
|
|
22
|
+
// Get header and footer dimensions.
|
|
15
23
|
const { spacing } = useLayoutSpacing();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
// Measure filters dimensions.
|
|
25
|
+
const { dimensions, filtersRef } = useMeasureFilters();
|
|
26
|
+
// Update entities' spacing with filters dimensions.
|
|
27
|
+
const entitiesSpacing = { ...spacing, top: dimensions.height };
|
|
28
|
+
// Table instance.
|
|
29
|
+
const table = useTable(dictionary, classes, tableOptions);
|
|
30
|
+
// Dictionary outline.
|
|
31
|
+
const outline = buildClassesOutline(table);
|
|
32
|
+
return (React.createElement(Fade, { in: spacing.top > 0 },
|
|
33
|
+
React.createElement(View, { className: className },
|
|
34
|
+
React.createElement(TitleLayout, { ...spacing },
|
|
35
|
+
React.createElement(Title, { title: title })),
|
|
36
|
+
React.createElement(OutlineLayout, { ...spacing },
|
|
37
|
+
React.createElement(Outline, { outline: outline })),
|
|
38
|
+
React.createElement(FiltersLayout, { ref: filtersRef, ...spacing },
|
|
39
|
+
React.createElement(Filters, { table: table }),
|
|
40
|
+
React.createElement(ColumnFilterTags, { table: table })),
|
|
41
|
+
React.createElement(Fade, { in: dimensions.height > 0 },
|
|
42
|
+
React.createElement(EntitiesLayout, { spacing: entitiesSpacing },
|
|
43
|
+
React.createElement(Entities, { spacing: entitiesSpacing, table: table }))))));
|
|
25
44
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RowData } from "@tanstack/react-table";
|
|
2
|
+
import { Attribute } from "../../../../common/entities";
|
|
3
|
+
import { UseDataDictionaryConfig } from "./types";
|
|
4
|
+
export declare const useDataDictionaryConfig: <T extends RowData = Attribute>(dictionary: string) => UseDataDictionaryConfig<T>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useConfig } from "../../../../hooks/useConfig";
|
|
3
|
+
import { throwDictionaryConfigNotFoundError } from "./utils";
|
|
4
|
+
export const useDataDictionaryConfig = (dictionary) => {
|
|
5
|
+
const { config: { dataDictionaries: dataDictionaryConfigs }, } = useConfig();
|
|
6
|
+
// Get dictionary config by matching the current path with the data dictionary path
|
|
7
|
+
const dataDictionaryConfig = useMemo(() => {
|
|
8
|
+
if (!dataDictionaryConfigs?.length)
|
|
9
|
+
return undefined;
|
|
10
|
+
// Find the data dictionary with a path that matches the current route
|
|
11
|
+
// We check if the current path starts with the dictionary path to handle nested routes
|
|
12
|
+
return dataDictionaryConfigs.find((config) => config.path === dictionary);
|
|
13
|
+
}, [dataDictionaryConfigs, dictionary]);
|
|
14
|
+
// Throw error if the dictionary config is not found.
|
|
15
|
+
if (!dataDictionaryConfig)
|
|
16
|
+
throwDictionaryConfigNotFoundError(dictionary);
|
|
17
|
+
// Get configured dictionary classes, column definitions and table options.
|
|
18
|
+
return useMemo(() => {
|
|
19
|
+
// Using non-null assertion (!) because we've already checked dataDictionaryConfig
|
|
20
|
+
// exists above and would have thrown an error if undefined.
|
|
21
|
+
return {
|
|
22
|
+
classes: dataDictionaryConfig.dataDictionary.classes,
|
|
23
|
+
tableOptions: dataDictionaryConfig.tableOptions,
|
|
24
|
+
title: dataDictionaryConfig.dataDictionary.title,
|
|
25
|
+
};
|
|
26
|
+
}, [dataDictionaryConfig]);
|
|
27
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RowData, TableOptions } from "@tanstack/react-table";
|
|
2
|
+
import { Attribute, Class } from "../../../../common/entities";
|
|
3
|
+
export interface UseDataDictionaryConfig<T extends RowData = Attribute> {
|
|
4
|
+
classes: Class<T>[];
|
|
5
|
+
tableOptions: Omit<TableOptions<T>, "data" | "getCoreRowModel">;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when a dictionary config is not found.
|
|
3
|
+
* @param dictionary - Dictionary ID.
|
|
4
|
+
* @throws Error - Dictionary config not found.
|
|
5
|
+
*/
|
|
6
|
+
export function throwDictionaryConfigNotFoundError(dictionary) {
|
|
7
|
+
throw new Error(`Dictionary config not found for dictionary: ${dictionary}`);
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
import { getBorderBoxSizeHeight, useResizeObserver, } from "../../../../hooks/useResizeObserver";
|
|
3
|
+
import { useLayoutDimensions } from "../../../../providers/layoutDimensions/hook";
|
|
4
|
+
export const useMeasureFilters = () => {
|
|
5
|
+
// Get header dimensions.
|
|
6
|
+
const { dimensions } = useLayoutDimensions();
|
|
7
|
+
const { header } = dimensions;
|
|
8
|
+
// Measure filters dimensions.
|
|
9
|
+
const filtersRef = useRef(null);
|
|
10
|
+
const filtersRect = useResizeObserver(filtersRef, getBorderBoxSizeHeight, header.height > 0 // Only measure filters height, when header measurement is available.
|
|
11
|
+
);
|
|
12
|
+
const { height = 0 } = filtersRect || {};
|
|
13
|
+
return {
|
|
14
|
+
dimensions: { height },
|
|
15
|
+
filtersRef,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,6 +13,7 @@ interface DownloadCurlCommandProps {
|
|
|
13
13
|
filters: Filters;
|
|
14
14
|
formFacet: FormFacet;
|
|
15
15
|
manifestDownloadFormat?: ManifestDownloadFormat;
|
|
16
|
+
speciesFacetName: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const DownloadCurlCommand: ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, }: DownloadCurlCommandProps) => JSX.Element;
|
|
18
|
+
export declare const DownloadCurlCommand: ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, speciesFacetName, }: DownloadCurlCommandProps) => JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -2,14 +2,16 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
|
|
3
3
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
4
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
5
|
+
import { useFileManifestFileCount } from "../../../../hooks/useFileManifest/useFileManifestFileCount";
|
|
5
6
|
import { useRequestFileLocation, } from "../../../../hooks/useRequestFileLocation";
|
|
6
7
|
import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
|
|
7
8
|
import { BULK_DOWNLOAD_EXECUTION_ENVIRONMENT, } from "../../common/entities";
|
|
8
9
|
import { trackBulkDownloadRequested } from "../../common/tracking";
|
|
9
10
|
import { DownloadCurlCommandNotStarted } from "./components/DownloadCurlCommandNotStarted/downloadCurlCommandNotStarted";
|
|
10
11
|
import { DownloadCurlCommandReady } from "./components/DownloadCurlCommandReady/downloadCurlCommandReady";
|
|
11
|
-
export const DownloadCurlCommand = ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.CURL, }) => {
|
|
12
|
+
export const DownloadCurlCommand = ({ DownloadCurlForm, DownloadCurlStart, DownloadCurlSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.CURL, speciesFacetName, }) => {
|
|
12
13
|
useFileManifest(filters, fileSummaryFacetName);
|
|
14
|
+
useFileManifestFileCount(filters, speciesFacetName, fileSummaryFacetName);
|
|
13
15
|
const [executionEnvironment, setExecutionEnvironment] = useState(BULK_DOWNLOAD_EXECUTION_ENVIRONMENT.BASH);
|
|
14
16
|
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
15
17
|
const { requestMethod, requestUrl } = useRequestManifest(manifestDownloadFormat, formFacet);
|
|
@@ -14,5 +14,6 @@ export interface ExportToTerraProps {
|
|
|
14
14
|
formFacet: FormFacet;
|
|
15
15
|
manifestDownloadFormat?: ManifestDownloadFormat;
|
|
16
16
|
manifestDownloadFormats: ManifestDownloadFormat[];
|
|
17
|
+
speciesFacetName: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }: ExportToTerraProps) => JSX.Element;
|
|
19
|
+
export declare const ExportToTerra: ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, speciesFacetName, }: ExportToTerraProps) => JSX.Element;
|
|
@@ -2,15 +2,17 @@ import React from "react";
|
|
|
2
2
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
3
3
|
import { useExportToTerraResponseURL } from "../../../../hooks/useExportToTerraResponseURL";
|
|
4
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
5
|
+
import { useFileManifestFileCount } from "../../../../hooks/useFileManifest/useFileManifestFileCount";
|
|
5
6
|
import { useFileManifestFormat } from "../../../../hooks/useFileManifest/useFileManifestFormat";
|
|
6
7
|
import { useRequestFileLocation } from "../../../../hooks/useRequestFileLocation";
|
|
7
8
|
import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
|
|
8
9
|
import { trackExportToTerraRequested } from "../../common/tracking";
|
|
9
10
|
import { ExportToTerraNotStarted } from "./components/ExportToTerraNotStarted/exportToTerraNotStarted";
|
|
10
11
|
import { ExportToTerraReady } from "./components/ExportToTerraReady/exportToTerraReady";
|
|
11
|
-
export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, }) => {
|
|
12
|
+
export const ExportToTerra = ({ ExportForm, ExportToTerraStart, ExportToTerraSuccess, fileManifestState, fileSummaryFacetName, filters, formFacet, manifestDownloadFormat, manifestDownloadFormats, speciesFacetName, }) => {
|
|
12
13
|
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
13
14
|
useFileManifest(filters, fileSummaryFacetName);
|
|
15
|
+
useFileManifestFileCount(filters, speciesFacetName, fileSummaryFacetName);
|
|
14
16
|
const fileManifestFormatState = useFileManifestFormat(manifestDownloadFormat);
|
|
15
17
|
const { requestMethod, requestParams, requestUrl } = useRequestManifest(fileManifestFormatState.fileManifestFormat, formFacet);
|
|
16
18
|
const { data, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
|
|
@@ -13,5 +13,6 @@ export interface ManifestDownloadProps {
|
|
|
13
13
|
manifestDownloadFormat?: ManifestDownloadFormat;
|
|
14
14
|
ManifestDownloadStart: ElementType;
|
|
15
15
|
ManifestDownloadSuccess: ElementType;
|
|
16
|
+
speciesFacetName: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const ManifestDownload: ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat, ManifestDownloadStart, ManifestDownloadSuccess, }: ManifestDownloadProps) => JSX.Element;
|
|
18
|
+
export declare const ManifestDownload: ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat, ManifestDownloadStart, ManifestDownloadSuccess, speciesFacetName, }: ManifestDownloadProps) => JSX.Element;
|
|
@@ -2,13 +2,15 @@ import React from "react";
|
|
|
2
2
|
import { MANIFEST_DOWNLOAD_FORMAT } from "../../../../apis/azul/common/entities";
|
|
3
3
|
import { useExploreState } from "../../../../hooks/useExploreState";
|
|
4
4
|
import { useFileManifest } from "../../../../hooks/useFileManifest/useFileManifest";
|
|
5
|
+
import { useFileManifestFileCount } from "../../../../hooks/useFileManifest/useFileManifestFileCount";
|
|
5
6
|
import { useRequestFileLocation, } from "../../../../hooks/useRequestFileLocation";
|
|
6
7
|
import { useRequestManifest } from "../../../../hooks/useRequestManifest/useRequestManifest";
|
|
7
8
|
import { trackFileManifestRequested } from "../../common/tracking";
|
|
8
9
|
import { ManifestDownloadNotStarted } from "./components/ManifestDownloadNotStarted/manifestDownloadNotStarted";
|
|
9
10
|
import { ManifestDownloadReady } from "./components/ManifestDownloadReady/manifestDownloadReady";
|
|
10
|
-
export const ManifestDownload = ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.COMPACT, ManifestDownloadStart, ManifestDownloadSuccess, }) => {
|
|
11
|
+
export const ManifestDownload = ({ fileManifestState, fileSummaryFacetName, filters, formFacet, ManifestDownloadForm, manifestDownloadFormat = MANIFEST_DOWNLOAD_FORMAT.COMPACT, ManifestDownloadStart, ManifestDownloadSuccess, speciesFacetName, }) => {
|
|
11
12
|
useFileManifest(filters, fileSummaryFacetName);
|
|
13
|
+
useFileManifestFileCount(filters, speciesFacetName, fileSummaryFacetName);
|
|
12
14
|
const { exploreState: { tabValue: entityList }, } = useExploreState();
|
|
13
15
|
const { requestMethod, requestUrl } = useRequestManifest(manifestDownloadFormat, formFacet);
|
|
14
16
|
const { data, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CHIP_PROPS } from "../../../../styles/common/mui/chip";
|
|
3
|
+
import { StyledChip } from "./filterCountChip.styles";
|
|
4
|
+
export const FilterCountChip = ({ className, count, ...props /* MuiChipProps */ }) => {
|
|
5
|
+
if (!count)
|
|
6
|
+
return null;
|
|
7
|
+
return (React.createElement(StyledChip, { className: className, color: CHIP_PROPS.COLOR.PRIMARY, label: String(count), variant: CHIP_PROPS.VARIANT.FILLED, ...props }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
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"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Chip, styled } from "@mui/material";
|
|
2
|
+
export const StyledChip = styled(Chip) `
|
|
3
|
+
align-items: center;
|
|
4
|
+
border-radius: 10px;
|
|
5
|
+
flex: none;
|
|
6
|
+
gap: 0;
|
|
7
|
+
height: 16px;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
min-width: 16px;
|
|
10
|
+
padding: 0 4px;
|
|
11
|
+
|
|
12
|
+
.MuiChip-label {
|
|
13
|
+
font-size: 9px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
line-height: 16px;
|
|
16
|
+
padding: 0;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,6 +18,6 @@ export declare const UserNames: import("@emotion/styled").StyledComponent<import
|
|
|
18
18
|
}, {}, {}>;
|
|
19
19
|
export declare const StyledAvatar: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
20
|
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;
|
|
21
|
-
}, "style" | "className" | "classes" | "children" | "sx" | "variant" | "alt" | "src" | "sizes" | "srcSet" | "
|
|
21
|
+
}, "style" | "className" | "classes" | "children" | "sx" | "variant" | "alt" | "src" | "sizes" | "srcSet" | "slotProps" | "slots" | "imgProps"> & {
|
|
22
22
|
theme?: import("@emotion/react").Theme;
|
|
23
23
|
}, {}, {}>;
|
|
@@ -5,7 +5,7 @@ interface Props extends TabProps {
|
|
|
5
5
|
export declare const tab: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const StyledTabs: import("@emotion/styled").StyledComponent<import("@mui/material").TabsOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
7
|
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;
|
|
8
|
-
}, "style" | "className" | "classes" | "aria-label" | "aria-labelledby" | "children" | "onChange" | "sx" | "variant" | "orientation" | "value" | "action" | "
|
|
8
|
+
}, "style" | "className" | "classes" | "aria-label" | "aria-labelledby" | "children" | "onChange" | "sx" | "variant" | "orientation" | "value" | "action" | "slotProps" | "slots" | "allowScrollButtonsMobile" | "centered" | "indicatorColor" | "ScrollButtonComponent" | "scrollButtons" | "selectionFollowsFocus" | "TabIndicatorProps" | "TabScrollButtonProps" | "textColor" | "visibleScrollbar"> & {
|
|
9
9
|
theme?: import("@emotion/react").Theme;
|
|
10
10
|
}, {}, {}>;
|
|
11
11
|
export declare const StyledTab: import("@emotion/styled").StyledComponent<import("@mui/material").TabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FilterMeta, Row, RowData } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* Fuzzy matches a column against search terms.
|
|
4
|
+
* A true value is returned if the column's value passes the ranking threshold.
|
|
5
|
+
* Normally, TanStack global filtering will not process remaining row columns if a match is found.
|
|
6
|
+
* This function ranks other row columns for highlighting purposes.
|
|
7
|
+
* @param row - Row.
|
|
8
|
+
* @param columnId - Column identifier.
|
|
9
|
+
* @param value - Search term.
|
|
10
|
+
* @param addMeta - Function to add filter metadata.
|
|
11
|
+
* @returns Whether the row passed the filter.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fuzzy<T extends RowData>(row: Row<T>, columnId: string, value: unknown, addMeta: (meta: FilterMeta) => void): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { parseSearchTerms, rankColumnValue, rankRowColumns } from "./utils";
|
|
2
|
+
/**
|
|
3
|
+
* Fuzzy matches a column against search terms.
|
|
4
|
+
* A true value is returned if the column's value passes the ranking threshold.
|
|
5
|
+
* Normally, TanStack global filtering will not process remaining row columns if a match is found.
|
|
6
|
+
* This function ranks other row columns for highlighting purposes.
|
|
7
|
+
* @param row - Row.
|
|
8
|
+
* @param columnId - Column identifier.
|
|
9
|
+
* @param value - Search term.
|
|
10
|
+
* @param addMeta - Function to add filter metadata.
|
|
11
|
+
* @returns Whether the row passed the filter.
|
|
12
|
+
*/
|
|
13
|
+
export function fuzzy(row, columnId, value, addMeta) {
|
|
14
|
+
// Split the search term into terms.
|
|
15
|
+
const terms = parseSearchTerms(value);
|
|
16
|
+
// Rank the column value.
|
|
17
|
+
const passed = rankColumnValue(row, columnId, terms);
|
|
18
|
+
// Add the filter metadata.
|
|
19
|
+
addMeta({ passed });
|
|
20
|
+
// Rank other columns for highlighting purposes (TanStack global filtering will not process remaining columns if a match is found).
|
|
21
|
+
if (passed)
|
|
22
|
+
rankRowColumns(row, columnId, terms);
|
|
23
|
+
return passed;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Row, RowData } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* Parses a search term into an array of terms.
|
|
4
|
+
* @param value - Search term.
|
|
5
|
+
* @returns Array of terms.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseSearchTerms(value: unknown): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Ranks a column's value against search terms.
|
|
10
|
+
* @param row - Row to rank.
|
|
11
|
+
* @param columnId - Column identifier.
|
|
12
|
+
* @param terms - Search terms to match against.
|
|
13
|
+
* @returns Whether the value passed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function rankColumnValue<T extends RowData>(row: Row<T>, columnId: string, terms: string[]): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Ranks a row's columns against search terms.
|
|
18
|
+
* Processes columns that are searchable and have not already been processed.
|
|
19
|
+
* @param row - Row to rank.
|
|
20
|
+
* @param columnId - Column identifier.
|
|
21
|
+
* @param terms - Search terms to match against.
|
|
22
|
+
*/
|
|
23
|
+
export declare function rankRowColumns<T extends RowData>(row: Row<T>, columnId: string, terms: string[]): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { rankItem } from "@tanstack/match-sorter-utils";
|
|
2
|
+
import { RANK_ITEM_OPTIONS } from "./constants";
|
|
3
|
+
/**
|
|
4
|
+
* Parses a search term into an array of terms.
|
|
5
|
+
* @param value - Search term.
|
|
6
|
+
* @returns Array of terms.
|
|
7
|
+
*/
|
|
8
|
+
export function parseSearchTerms(value) {
|
|
9
|
+
return String(value ?? "")
|
|
10
|
+
.toLowerCase()
|
|
11
|
+
.trim()
|
|
12
|
+
.split(/\s+/)
|
|
13
|
+
.filter(Boolean);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ranks a column's value against search terms.
|
|
17
|
+
* @param row - Row to rank.
|
|
18
|
+
* @param columnId - Column identifier.
|
|
19
|
+
* @param terms - Search terms to match against.
|
|
20
|
+
* @returns Whether the value passed.
|
|
21
|
+
*/
|
|
22
|
+
export function rankColumnValue(row, columnId, terms) {
|
|
23
|
+
// Get the column value.
|
|
24
|
+
const columnValue = row.getValue(columnId);
|
|
25
|
+
// Return false if the column value is undefined or null.
|
|
26
|
+
if (columnValue === undefined || columnValue === null)
|
|
27
|
+
return false;
|
|
28
|
+
// Check if each term matches the column value.
|
|
29
|
+
// Ranking from CASE_SENSITIVE_EQUAL to CONTAINS (excludes `ACRONYM`, `MATCHES` threshold).
|
|
30
|
+
const rankings = terms.map((term) => rankItem(String(columnValue), term, RANK_ITEM_OPTIONS));
|
|
31
|
+
return rankings.every(({ passed }) => passed);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Ranks a row's columns against search terms.
|
|
35
|
+
* Processes columns that are searchable and have not already been processed.
|
|
36
|
+
* @param row - Row to rank.
|
|
37
|
+
* @param columnId - Column identifier.
|
|
38
|
+
* @param terms - Search terms to match against.
|
|
39
|
+
*/
|
|
40
|
+
export function rankRowColumns(row, columnId, terms) {
|
|
41
|
+
const columnFiltersMeta = row.columnFiltersMeta;
|
|
42
|
+
// Process other columns.
|
|
43
|
+
for (const { column } of row.getAllCells()) {
|
|
44
|
+
// Column is not searchable.
|
|
45
|
+
if (!column.getCanGlobalFilter())
|
|
46
|
+
continue;
|
|
47
|
+
// Column has already been processed.
|
|
48
|
+
if (column.id === columnId)
|
|
49
|
+
continue;
|
|
50
|
+
if (column.id in columnFiltersMeta)
|
|
51
|
+
continue;
|
|
52
|
+
// Rank the column value.
|
|
53
|
+
const passed = rankColumnValue(row, column.id, terms);
|
|
54
|
+
// Add the filter metadata.
|
|
55
|
+
row.columnFiltersMeta[column.id] = { passed };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { CellContext, RowData } from "@tanstack/react-table";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
import { BaseComponentProps } from "../../../../../types";
|
|
3
|
-
export declare const CodeCell: <T extends RowData, TValue extends
|
|
4
|
+
export declare const CodeCell: <T extends RowData, TValue extends ReactNode = ReactNode>({ className, getValue, }: BaseComponentProps & CellContext<T, TValue>) => JSX.Element | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CellContext, RowData } from "@tanstack/react-table";
|
|
2
|
+
import { BaseComponentProps } from "../../../../../types";
|
|
3
|
+
export declare const RankedCell: <T extends RowData, TValue = string | undefined | null>({ className, column, getValue, row, table, }: BaseComponentProps & CellContext<T, TValue>) => JSX.Element | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { Fragment } from "react";
|
|
2
|
+
import { getTokens, getTokensRegex, isRankedCell } from "./utils";
|
|
3
|
+
export const RankedCell = ({ className, column, getValue, row, table, }) => {
|
|
4
|
+
// Get the cell value.
|
|
5
|
+
const value = getValue();
|
|
6
|
+
// If the cell value is undefined or null, return null.
|
|
7
|
+
if (value === undefined || value === null)
|
|
8
|
+
return null;
|
|
9
|
+
// Convert the cell value to a string.
|
|
10
|
+
const stringValue = String(value);
|
|
11
|
+
// Check if the cell is ranked.
|
|
12
|
+
const isRanked = isRankedCell(table, row, column.id);
|
|
13
|
+
// Return the unranked cell, as-is.
|
|
14
|
+
if (!isRanked)
|
|
15
|
+
return React.createElement(Fragment, null, stringValue);
|
|
16
|
+
// Tokenise the current global filter.
|
|
17
|
+
const tokens = getTokens(table);
|
|
18
|
+
// If there are no tokens, return the value as-is.
|
|
19
|
+
if (tokens.length === 0)
|
|
20
|
+
return React.createElement(Fragment, null, stringValue);
|
|
21
|
+
// Create regex pattern.
|
|
22
|
+
const regex = getTokensRegex(tokens);
|
|
23
|
+
// Return the ranked cell, with highlighting.
|
|
24
|
+
return (React.createElement("span", { className: className }, stringValue.split(regex).map((part, i) => (React.createElement(Fragment, { key: i }, part.match(regex) ? React.createElement("mark", null, part) : part)))));
|
|
25
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Row, RowData, Table } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* Renders a cell value with highlighting if it matches item rank filter criteria.
|
|
4
|
+
* @param table - Table.
|
|
5
|
+
* @param row - Row.
|
|
6
|
+
* @param columnId - Column identifier.
|
|
7
|
+
* @param value - Cell value.
|
|
8
|
+
* @returns Rendered cell value with highlighting.
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderRankedCell<T extends RowData>(table: Table<T>, row: Row<T>, columnId: string, value: string | undefined | null): string;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the current global filter tokens from the table.
|
|
13
|
+
* @param table - Table.
|
|
14
|
+
* @returns An array of search tokens.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getTokens<T extends RowData>(table: Table<T>): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Returns a RegExp pattern for matching search tokens.
|
|
19
|
+
* @param tokens - Search tokens.
|
|
20
|
+
* @returns A RegExp pattern that matches any of the tokens.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTokensRegex(tokens: string[]): RegExp;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if a cell is ranked based on the global filter.
|
|
25
|
+
* @param table - Table.
|
|
26
|
+
* @param row - Row.
|
|
27
|
+
* @param columnId - Column identifier.
|
|
28
|
+
* @returns Whether the cell is ranked.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isRankedCell<T extends RowData>(table: Table<T>, row: Row<T>, columnId: string): boolean;
|