@databiosphere/findable-ui 35.1.0 → 36.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/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.js +21 -29
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestSpreadsheet/fileManifestSpreadsheet.js +21 -36
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.d.ts +2 -0
- package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.js +22 -0
- 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 +3 -0
- package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.js +9 -0
- package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.d.ts +5 -0
- package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.js +15 -0
- 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/useFileManifestDownload.d.ts +2 -2
- package/lib/hooks/useFileManifest/useFileManifestDownload.js +3 -10
- package/lib/hooks/useFileManifest/useFileManifestSpreadsheet.d.ts +5 -4
- package/lib/hooks/useFileManifest/useFileManifestSpreadsheet.js +24 -20
- 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/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/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.tsx +43 -71
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestSpreadsheet/fileManifestSpreadsheet.tsx +52 -74
- package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.ts +24 -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.styles.ts +16 -0
- package/src/components/Table/components/TableCell/components/CodeCell/codeCell.tsx +21 -0
- 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/useFileManifestDownload.ts +9 -16
- package/src/hooks/useFileManifest/useFileManifestSpreadsheet.ts +41 -26
- 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/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/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 {};
|
|
@@ -1,49 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, TableBody, TableCell, TableRow, Tooltip } from "@mui/material";
|
|
2
2
|
import copy from "copy-to-clipboard";
|
|
3
|
-
import React
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { useDownloadStatus } from "../../../../../../../../hooks/useDownloadStatus";
|
|
5
5
|
import { useFileManifestDownload } from "../../../../../../../../hooks/useFileManifest/useFileManifestDownload";
|
|
6
6
|
import { useLoginGuard } from "../../../../../../../../providers/loginGuard/hook";
|
|
7
|
+
import { BUTTON_PROPS } from "../../../../../../../common/Button/constants";
|
|
7
8
|
import { ButtonGroup } from "../../../../../../../common/ButtonGroup/buttonGroup";
|
|
8
|
-
import { ButtonGroupButton } from "../../../../../../../common/ButtonGroup/components/ButtonGroupButton/buttonGroupButton";
|
|
9
9
|
import { ContentCopyIconSmall, DownloadIconSmall, } from "../../../../../../../common/CustomIcon/common/constants";
|
|
10
10
|
import { FluidPaper, GridPaper, } from "../../../../../../../common/Paper/paper.styles";
|
|
11
11
|
import { Loading, LOADING_PANEL_STYLE, } from "../../../../../../../Loading/loading";
|
|
12
12
|
import { GridTable } from "../../../../../../../Table/common/gridTable.styles";
|
|
13
|
+
import { TOOLTIP_PROPS } from "../../constants";
|
|
13
14
|
import { SectionTitle, TableContainer, } from "../../manifestDownloadEntity.styles";
|
|
14
15
|
export const FileManifestDownload = ({ filters, }) => {
|
|
15
|
-
const downloadRef = useRef(null);
|
|
16
16
|
const { disabled, message } = useDownloadStatus();
|
|
17
|
-
const { fileName, isIdle, isLoading, manifestURL } = useFileManifestDownload(filters
|
|
18
|
-
const isInProgress = (isIdle || isLoading) && !disabled;
|
|
19
|
-
const isReady = Boolean(manifestURL) || disabled;
|
|
17
|
+
const { fileName, isIdle, isLoading, manifestURL, requestManifest } = useFileManifestDownload(filters);
|
|
20
18
|
// Prompt user for login before download and copy, if required.
|
|
21
19
|
const { requireLogin } = useLoginGuard();
|
|
22
|
-
// Copies file manifest.
|
|
23
|
-
const copyManifestURL = (url) => {
|
|
24
|
-
if (!url)
|
|
25
|
-
return;
|
|
26
|
-
copy(url);
|
|
27
|
-
};
|
|
28
|
-
// Downloads file manifest.
|
|
29
|
-
const downloadManifestURL = () => {
|
|
30
|
-
downloadRef.current?.click();
|
|
31
|
-
};
|
|
32
20
|
return (React.createElement(FluidPaper, null,
|
|
33
21
|
React.createElement(GridPaper, null,
|
|
34
22
|
React.createElement(SectionTitle, null, "File Manifest"),
|
|
35
23
|
React.createElement(TableContainer, null,
|
|
36
|
-
React.createElement(Loading, { loading:
|
|
37
|
-
React.createElement(GridTable, { gridTemplateColumns:
|
|
24
|
+
React.createElement(Loading, { loading: isLoading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
25
|
+
React.createElement(GridTable, { gridTemplateColumns: "auto 1fr" },
|
|
38
26
|
React.createElement(TableBody, null,
|
|
39
|
-
React.createElement(TableRow, null,
|
|
40
|
-
React.createElement(
|
|
41
|
-
React.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
React.createElement(TableRow, null, isIdle || isLoading ? (React.createElement(TableCell, null,
|
|
28
|
+
React.createElement(Tooltip, { ...TOOLTIP_PROPS, title: message },
|
|
29
|
+
React.createElement("span", null,
|
|
30
|
+
React.createElement(Button, { ...BUTTON_PROPS.PRIMARY_CONTAINED, disabled: disabled || isLoading, onClick: () => requireLogin(requestManifest) }, "Request link"))))) : (React.createElement(React.Fragment, null,
|
|
31
|
+
manifestURL && (React.createElement(TableCell, null,
|
|
32
|
+
React.createElement(ButtonGroup, { Buttons: [
|
|
33
|
+
React.createElement(Button, { key: "download", download: true, href: manifestURL },
|
|
34
|
+
React.createElement(DownloadIconSmall, null)),
|
|
35
|
+
React.createElement(Button, { key: "copy", onClick: () => copy(manifestURL) },
|
|
36
|
+
React.createElement(ContentCopyIconSmall, null)),
|
|
37
|
+
] }))),
|
|
38
|
+
React.createElement(TableCell, null, manifestURL
|
|
39
|
+
? fileName
|
|
40
|
+
: "The manifest is not available for this project."))))))))));
|
|
49
41
|
};
|
|
@@ -1,53 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, TableBody, TableCell, TableRow, Tooltip } from "@mui/material";
|
|
2
2
|
import copy from "copy-to-clipboard";
|
|
3
|
-
import React
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { useDownloadStatus } from "../../../../../../../../hooks/useDownloadStatus";
|
|
5
5
|
import { useFileManifestSpreadsheet } from "../../../../../../../../hooks/useFileManifest/useFileManifestSpreadsheet";
|
|
6
|
-
import {
|
|
6
|
+
import { BUTTON_PROPS } from "../../../../../../../common/Button/constants";
|
|
7
7
|
import { ButtonGroup } from "../../../../../../../common/ButtonGroup/buttonGroup";
|
|
8
|
-
import { ButtonGroupButton } from "../../../../../../../common/ButtonGroup/components/ButtonGroupButton/buttonGroupButton";
|
|
9
8
|
import { ContentCopyIconSmall, DownloadIconSmall, } from "../../../../../../../common/CustomIcon/common/constants";
|
|
10
9
|
import { FluidPaper, GridPaper, } from "../../../../../../../common/Paper/paper.styles";
|
|
11
10
|
import { Loading, LOADING_PANEL_STYLE, } from "../../../../../../../Loading/loading";
|
|
12
11
|
import { GridTable } from "../../../../../../../Table/common/gridTable.styles";
|
|
12
|
+
import { TOOLTIP_PROPS } from "../../constants";
|
|
13
13
|
import { SectionTitle, TableContainer, } from "../../manifestDownloadEntity.styles";
|
|
14
14
|
export const FileManifestSpreadsheet = ({ filters, }) => {
|
|
15
|
-
const downloadRef = useRef(null);
|
|
16
15
|
const { disabled, message } = useDownloadStatus();
|
|
17
|
-
const {
|
|
18
|
-
const { data, isLoading, run } = useRequestFileLocation(fileUrl);
|
|
19
|
-
const spreadsheetURL = data?.location;
|
|
20
|
-
const isInProgress = (exists === undefined || isLoading) && !disabled;
|
|
21
|
-
const isReady = Boolean(spreadsheetURL) || disabled;
|
|
22
|
-
// Copies metadata spreadsheet.
|
|
23
|
-
const copyMetadataURL = (url) => {
|
|
24
|
-
if (!url)
|
|
25
|
-
return;
|
|
26
|
-
copy(url);
|
|
27
|
-
};
|
|
28
|
-
// Downloads metadata spreadsheet.
|
|
29
|
-
const downloadMetadataURL = () => {
|
|
30
|
-
downloadRef.current?.click();
|
|
31
|
-
};
|
|
32
|
-
// Requests metadata spreadsheet.
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
run();
|
|
35
|
-
}, [fileUrl, run]);
|
|
16
|
+
const { fileName, isIdle = false, isLoading = false, requestManifest, spreadsheetUrl, } = useFileManifestSpreadsheet(filters) || {};
|
|
36
17
|
return (React.createElement(FluidPaper, null,
|
|
37
18
|
React.createElement(GridPaper, null,
|
|
38
19
|
React.createElement(SectionTitle, null, "Metadata"),
|
|
39
20
|
React.createElement(TableContainer, null,
|
|
40
|
-
React.createElement(Loading, { loading:
|
|
41
|
-
React.createElement(GridTable, { gridTemplateColumns:
|
|
21
|
+
React.createElement(Loading, { loading: isLoading, panelStyle: LOADING_PANEL_STYLE.INHERIT }),
|
|
22
|
+
React.createElement(GridTable, { gridTemplateColumns: "auto 1fr" },
|
|
42
23
|
React.createElement(TableBody, null,
|
|
43
|
-
React.createElement(TableRow, null,
|
|
44
|
-
React.createElement(
|
|
45
|
-
React.createElement(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
React.createElement(TableRow, null, isIdle || isLoading ? (React.createElement(TableCell, null,
|
|
25
|
+
React.createElement(Tooltip, { ...TOOLTIP_PROPS, title: message },
|
|
26
|
+
React.createElement("span", null,
|
|
27
|
+
React.createElement(Button, { ...BUTTON_PROPS.PRIMARY_CONTAINED, disabled: disabled || isLoading, onClick: () => requestManifest?.() }, "Request link"))))) : (React.createElement(React.Fragment, null,
|
|
28
|
+
spreadsheetUrl && (React.createElement(TableCell, null,
|
|
29
|
+
React.createElement(ButtonGroup, { Buttons: [
|
|
30
|
+
React.createElement(Button, { key: "download", download: true, href: spreadsheetUrl },
|
|
31
|
+
React.createElement(DownloadIconSmall, null)),
|
|
32
|
+
React.createElement(Button, { key: "copy", onClick: () => copy(spreadsheetUrl) },
|
|
33
|
+
React.createElement(ContentCopyIconSmall, null)),
|
|
34
|
+
] }))),
|
|
35
|
+
React.createElement(TableCell, null, spreadsheetUrl
|
|
36
|
+
? fileName
|
|
37
|
+
: "The metadata is not available for this project."))))))))));
|
|
53
38
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const TOOLTIP_PROPS = {
|
|
2
|
+
arrow: true,
|
|
3
|
+
slotProps: {
|
|
4
|
+
popper: {
|
|
5
|
+
modifiers: [
|
|
6
|
+
{
|
|
7
|
+
name: "offset",
|
|
8
|
+
options: {
|
|
9
|
+
offset: [0, -4],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "preventOverflow",
|
|
14
|
+
options: { padding: 8 },
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
tooltip: {
|
|
19
|
+
sx: { maxWidth: "none" },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CellContext, RowData } from "@tanstack/react-table";
|
|
2
|
+
import { BaseComponentProps } from "../../../../../types";
|
|
3
|
+
export declare const CodeCell: <T extends RowData, TValue extends string = string>({ className, getValue, }: BaseComponentProps & CellContext<T, TValue>) => JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CHIP_PROPS } from "../../../../../../styles/common/mui/chip";
|
|
3
|
+
import { StyledChip } from "./codeCell.styles";
|
|
4
|
+
export const CodeCell = ({ className, getValue, }) => {
|
|
5
|
+
const value = getValue();
|
|
6
|
+
if (!value)
|
|
7
|
+
return null;
|
|
8
|
+
return (React.createElement(StyledChip, { className: className, color: CHIP_PROPS.COLOR.DEFAULT, label: value, size: CHIP_PROPS.SIZE.SMALL }));
|
|
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
|
+
}, {}, {}>;
|