@databiosphere/findable-ui 35.2.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 +15 -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/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/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/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/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/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/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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { META_COMMAND } from "../../hooks/stateSyncManager/hooks/UseMetaCommands/types";
|
|
3
|
+
import { DataDictionaryAction } from "./actions/types";
|
|
4
|
+
import { DictionariesContext } from "./dictionaries/types";
|
|
5
|
+
export interface DataDictionaryState {
|
|
6
|
+
dictionaries: DictionariesContext;
|
|
7
|
+
meta: Meta | null;
|
|
8
|
+
}
|
|
9
|
+
export interface DataDictionaryStateContextProps {
|
|
10
|
+
dataDictionaryDispatch: Dispatch<DataDictionaryAction> | null;
|
|
11
|
+
dataDictionaryState: DataDictionaryState;
|
|
12
|
+
}
|
|
13
|
+
export interface Meta {
|
|
14
|
+
command: META_COMMAND;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconButtonProps } from "@mui/material";
|
|
2
|
+
type IconButtonPropsOptions = {
|
|
3
|
+
COLOR: typeof COLOR;
|
|
4
|
+
EDGE: typeof EDGE;
|
|
5
|
+
SIZE: typeof SIZE;
|
|
6
|
+
};
|
|
7
|
+
declare const COLOR: Record<string, IconButtonProps["color"]>;
|
|
8
|
+
declare const EDGE: Record<string, IconButtonProps["edge"]>;
|
|
9
|
+
declare const SIZE: Record<string, IconButtonProps["size"]>;
|
|
10
|
+
export declare const ICON_BUTTON_PROPS: IconButtonPropsOptions;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const COLOR = {
|
|
2
|
+
DEFAULT: "default",
|
|
3
|
+
ERROR: "error",
|
|
4
|
+
INFO: "info",
|
|
5
|
+
INHERIT: "inherit",
|
|
6
|
+
INK: "ink",
|
|
7
|
+
INK_LIGHT: "inkLight",
|
|
8
|
+
PRIMARY: "primary",
|
|
9
|
+
SECONDARY: "secondary",
|
|
10
|
+
SUCCESS: "success",
|
|
11
|
+
WARNING: "warning",
|
|
12
|
+
};
|
|
13
|
+
const EDGE = {
|
|
14
|
+
END: "end",
|
|
15
|
+
START: "start",
|
|
16
|
+
};
|
|
17
|
+
const SIZE = {
|
|
18
|
+
LARGE: "large",
|
|
19
|
+
MEDIUM: "medium",
|
|
20
|
+
SMALL: "small",
|
|
21
|
+
XLARGE: "xlarge",
|
|
22
|
+
XSMALL: "xsmall",
|
|
23
|
+
XXSMALL: "xxsmall",
|
|
24
|
+
};
|
|
25
|
+
export const ICON_BUTTON_PROPS = {
|
|
26
|
+
COLOR,
|
|
27
|
+
EDGE,
|
|
28
|
+
SIZE,
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputAdornmentProps } from "@mui/material";
|
|
2
|
+
type InputAdornmentPropsOptions = {
|
|
3
|
+
POSITION: typeof POSITION;
|
|
4
|
+
VARIANT: typeof VARIANT;
|
|
5
|
+
};
|
|
6
|
+
declare const POSITION: Record<string, InputAdornmentProps["position"]>;
|
|
7
|
+
declare const VARIANT: Record<string, InputAdornmentProps["variant"]>;
|
|
8
|
+
export declare const INPUT_ADORNMENT_PROPS: InputAdornmentPropsOptions;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OutlinedInputProps } from "@mui/material";
|
|
2
|
+
type OutlinedInputPropsOptions = {
|
|
3
|
+
COLOR: typeof COLOR;
|
|
4
|
+
};
|
|
5
|
+
declare const COLOR: Record<string, OutlinedInputProps["color"]>;
|
|
6
|
+
export declare const OUTLINED_INPUT_PROPS: OutlinedInputPropsOptions;
|
|
7
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { PALETTE } from "../../styles/common/constants/palette";
|
|
|
4
4
|
import { SHADOWS } from "../../styles/common/constants/shadows";
|
|
5
5
|
import { BUTTON_PROPS } from "../../styles/common/mui/button";
|
|
6
6
|
import { CHIP_PROPS } from "../../styles/common/mui/chip";
|
|
7
|
+
import { OUTLINED_INPUT_PROPS } from "../../styles/common/mui/outlinedInput";
|
|
7
8
|
import { desktopUp, mobileUp, tabletUp } from "./breakpoints";
|
|
8
9
|
import { TEXT_BODY_400, TEXT_BODY_400_2_LINES, TEXT_BODY_500, TEXT_BODY_SMALL_400, TEXT_BODY_SMALL_500, TEXT_HEADING, TEXT_HEADING_SMALL, } from "./typography";
|
|
9
10
|
// Constants
|
|
@@ -239,11 +240,25 @@ export const MuiButton = (theme) => {
|
|
|
239
240
|
minWidth: 0,
|
|
240
241
|
padding: 0,
|
|
241
242
|
},
|
|
242
|
-
textPrimary: {
|
|
243
|
-
color: theme.palette.primary.main,
|
|
244
|
-
},
|
|
245
243
|
},
|
|
246
244
|
variants: [
|
|
245
|
+
{
|
|
246
|
+
props: {
|
|
247
|
+
color: BUTTON_PROPS.COLOR.PRIMARY,
|
|
248
|
+
variant: BUTTON_PROPS.VARIANT.TEXT,
|
|
249
|
+
},
|
|
250
|
+
style: {
|
|
251
|
+
color: PALETTE.PRIMARY_MAIN,
|
|
252
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
253
|
+
"&:hover": {
|
|
254
|
+
backgroundColor: "transparent",
|
|
255
|
+
textDecoration: "underline",
|
|
256
|
+
textDecorationColor: "currentColor",
|
|
257
|
+
textDecorationSkipInk: "none",
|
|
258
|
+
textUnderlinePosition: "from-font",
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
247
262
|
{
|
|
248
263
|
props: {
|
|
249
264
|
variant: "activeNav", // associated with "nav" variant.
|
|
@@ -418,6 +433,16 @@ export const MuiChip = (theme) => {
|
|
|
418
433
|
color: theme.palette.info.main,
|
|
419
434
|
},
|
|
420
435
|
},
|
|
436
|
+
{
|
|
437
|
+
props: {
|
|
438
|
+
color: CHIP_PROPS.COLOR.PRIMARY,
|
|
439
|
+
variant: CHIP_PROPS.VARIANT.FILLED,
|
|
440
|
+
},
|
|
441
|
+
style: {
|
|
442
|
+
backgroundColor: PALETTE.PRIMARY_MAIN,
|
|
443
|
+
color: PALETTE.COMMON_WHITE,
|
|
444
|
+
},
|
|
445
|
+
},
|
|
421
446
|
{
|
|
422
447
|
props: { color: "success" },
|
|
423
448
|
style: {
|
|
@@ -824,9 +849,6 @@ export const MuiIconButton = (theme) => {
|
|
|
824
849
|
export const MuiInputBase = (theme) => {
|
|
825
850
|
return {
|
|
826
851
|
styleOverrides: {
|
|
827
|
-
adornedStart: {
|
|
828
|
-
gap: 8,
|
|
829
|
-
},
|
|
830
852
|
multiline: {
|
|
831
853
|
height: "unset",
|
|
832
854
|
},
|
|
@@ -839,6 +861,17 @@ export const MuiInputBase = (theme) => {
|
|
|
839
861
|
[tabletUp]: {
|
|
840
862
|
fontSize: theme.typography[TEXT_BODY_400].fontSize,
|
|
841
863
|
},
|
|
864
|
+
variants: [
|
|
865
|
+
/* PRIMARY */ /* TODO: remove `adornedStart` when all input components are refactored to color: secondary */
|
|
866
|
+
{
|
|
867
|
+
props: { color: "primary" },
|
|
868
|
+
style: {
|
|
869
|
+
adornedStart: {
|
|
870
|
+
gap: 8,
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
},
|
|
874
|
+
],
|
|
842
875
|
},
|
|
843
876
|
},
|
|
844
877
|
};
|
|
@@ -958,11 +991,8 @@ export const MuiOutlinedInput = (theme) => {
|
|
|
958
991
|
root: {
|
|
959
992
|
backgroundColor: PALETTE.COMMON_WHITE,
|
|
960
993
|
boxShadow: `inset 0 2px 0 0 ${COLOR_MIXES.COMMON_BLACK_04}`,
|
|
961
|
-
paddingLeft: 12,
|
|
994
|
+
paddingLeft: 12, // TODO: remove when all input components are refactored to color: secondary.
|
|
962
995
|
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
963
|
-
"& .MuiSvgIcon-root": {
|
|
964
|
-
color: theme.palette.ink.light, // Adornment e.g. "SearchIcon".
|
|
965
|
-
},
|
|
966
996
|
"&:hover": {
|
|
967
997
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
968
998
|
borderColor: theme.palette.smoke.dark,
|
|
@@ -974,9 +1004,6 @@ export const MuiOutlinedInput = (theme) => {
|
|
|
974
1004
|
borderColor: theme.palette.ink.main,
|
|
975
1005
|
borderWidth: 1,
|
|
976
1006
|
},
|
|
977
|
-
"& .MuiSvgIcon-root": {
|
|
978
|
-
color: theme.palette.ink.main, // Adornment e.g. "SearchIcon".
|
|
979
|
-
},
|
|
980
1007
|
},
|
|
981
1008
|
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
982
1009
|
"&.Mui-disabled": {
|
|
@@ -984,9 +1011,6 @@ export const MuiOutlinedInput = (theme) => {
|
|
|
984
1011
|
borderColor: theme.palette.smoke.dark,
|
|
985
1012
|
borderWidth: 1,
|
|
986
1013
|
},
|
|
987
|
-
"& .MuiSvgIcon-root": {
|
|
988
|
-
color: theme.palette.ink.light,
|
|
989
|
-
},
|
|
990
1014
|
},
|
|
991
1015
|
"&.Mui-error": {
|
|
992
1016
|
backgroundColor: theme.palette.alert.lightest,
|
|
@@ -996,6 +1020,88 @@ export const MuiOutlinedInput = (theme) => {
|
|
|
996
1020
|
borderWidth: 1,
|
|
997
1021
|
},
|
|
998
1022
|
},
|
|
1023
|
+
variants: [
|
|
1024
|
+
/* PRIMARY */
|
|
1025
|
+
{
|
|
1026
|
+
props: { color: OUTLINED_INPUT_PROPS.COLOR.PRIMARY },
|
|
1027
|
+
style: {
|
|
1028
|
+
"& .MuiSvgIcon-root": {
|
|
1029
|
+
color: theme.palette.ink.light, // Adornment e.g. "SearchIcon". TODO: remove when all input components are refactored to color: secondary.
|
|
1030
|
+
},
|
|
1031
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1032
|
+
"&.Mui-focused": {
|
|
1033
|
+
"& .MuiSvgIcon-root": {
|
|
1034
|
+
color: theme.palette.ink.main, // Adornment e.g. "SearchIcon". TODO: remove when all input components are refactored to color: secondary.
|
|
1035
|
+
},
|
|
1036
|
+
},
|
|
1037
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1038
|
+
"&.Mui-disabled": {
|
|
1039
|
+
"& .MuiSvgIcon-root": {
|
|
1040
|
+
color: theme.palette.ink.light, // TODO: remove when all input components are refactored to color: secondary.
|
|
1041
|
+
},
|
|
1042
|
+
},
|
|
1043
|
+
},
|
|
1044
|
+
},
|
|
1045
|
+
/* SECONDARY */
|
|
1046
|
+
{
|
|
1047
|
+
props: { color: OUTLINED_INPUT_PROPS.COLOR.SECONDARY },
|
|
1048
|
+
style: {
|
|
1049
|
+
backgroundColor: PALETTE.COMMON_WHITE,
|
|
1050
|
+
boxShadow: `inset 0 2px 0 0 ${COLOR_MIXES.COMMON_BLACK_04}`,
|
|
1051
|
+
color: PALETTE.INK_LIGHT,
|
|
1052
|
+
padding: "0 12px",
|
|
1053
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1054
|
+
".MuiOutlinedInput-input": {
|
|
1055
|
+
color: "inherit",
|
|
1056
|
+
height: 20,
|
|
1057
|
+
padding: "10px 0",
|
|
1058
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1059
|
+
"&::placeholder": {
|
|
1060
|
+
color: "inherit",
|
|
1061
|
+
opacity: 0.8,
|
|
1062
|
+
},
|
|
1063
|
+
},
|
|
1064
|
+
".MuiOutlinedInput-notchedOutline": {
|
|
1065
|
+
borderColor: PALETTE.SMOKE_DARK,
|
|
1066
|
+
borderWidth: 1,
|
|
1067
|
+
},
|
|
1068
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1069
|
+
"&.Mui-focused": {
|
|
1070
|
+
color: PALETTE.INK_MAIN,
|
|
1071
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1072
|
+
".MuiOutlinedInput-input": {
|
|
1073
|
+
"&::placeholder": {
|
|
1074
|
+
opacity: 0,
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
1077
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1078
|
+
".MuiOutlinedInput-notchedOutline": {
|
|
1079
|
+
borderColor: PALETTE.INK_MAIN,
|
|
1080
|
+
borderWidth: 1,
|
|
1081
|
+
},
|
|
1082
|
+
},
|
|
1083
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1084
|
+
"&.Mui-disabled": {
|
|
1085
|
+
backgroundColor: PALETTE.SMOKE_LIGHT,
|
|
1086
|
+
color: PALETTE.INK_LIGHT,
|
|
1087
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1088
|
+
".MuiOutlinedInput-input": {
|
|
1089
|
+
WebkitTextFillColor: "unset",
|
|
1090
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1091
|
+
"&::placeholder": {
|
|
1092
|
+
color: "inherit",
|
|
1093
|
+
opacity: 1,
|
|
1094
|
+
},
|
|
1095
|
+
},
|
|
1096
|
+
// eslint-disable-next-line sort-keys -- disabling key order for specificity
|
|
1097
|
+
".MuiOutlinedInput-notchedOutline": {
|
|
1098
|
+
borderColor: PALETTE.SMOKE_DARK,
|
|
1099
|
+
borderWidth: 1,
|
|
1100
|
+
},
|
|
1101
|
+
},
|
|
1102
|
+
},
|
|
1103
|
+
},
|
|
1104
|
+
],
|
|
999
1105
|
},
|
|
1000
1106
|
},
|
|
1001
1107
|
};
|
|
@@ -56,6 +56,10 @@ export const MuiButtonGroup = {
|
|
|
56
56
|
backgroundColor: PALETTE.SMOKE_LIGHTEST,
|
|
57
57
|
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}`,
|
|
58
58
|
},
|
|
59
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
60
|
+
"&.Mui-focusVisible": {
|
|
61
|
+
boxShadow: `inset 0 0 0 1px ${PALETTE.SMOKE_DARK}, 0 1px 0 0 ${COLOR_MIXES.COMMON_BLACK_08}`,
|
|
62
|
+
},
|
|
59
63
|
},
|
|
60
64
|
},
|
|
61
65
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PALETTE } from "../../styles/common/constants/palette";
|
|
1
2
|
import { TABLE_CELL_PROPS } from "../../styles/common/mui/tableCell";
|
|
2
3
|
import { TEXT_BODY_400, TEXT_BODY_SMALL_500 } from "../common/typography";
|
|
3
4
|
export const MuiTableCell = (theme) => {
|
|
@@ -32,6 +33,11 @@ export const MuiTableCell = (theme) => {
|
|
|
32
33
|
props: { variant: TABLE_CELL_PROPS.VARIANT.BODY },
|
|
33
34
|
style: {
|
|
34
35
|
...typography[TEXT_BODY_400],
|
|
36
|
+
"& mark": {
|
|
37
|
+
backgroundColor: PALETTE.WARNING_LIGHT,
|
|
38
|
+
color: "inherit",
|
|
39
|
+
padding: "2px 0",
|
|
40
|
+
},
|
|
35
41
|
},
|
|
36
42
|
},
|
|
37
43
|
{
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a JSON-encoded value from a URL query parameter.
|
|
3
|
+
*
|
|
4
|
+
* This function is specifically designed for query parameters that contain
|
|
5
|
+
* serialized complex data (arrays or objects), not for simple string values.
|
|
6
|
+
*
|
|
7
|
+
* It handles Next.js query parameters which can be string, string[] or undefined.
|
|
8
|
+
* Repeated parameters (`string[]`) are not supported.
|
|
9
|
+
*
|
|
10
|
+
* @param param - URL query parameter value.
|
|
11
|
+
* @param defaultValue - Default value.
|
|
12
|
+
* @returns Parsed complex data structure or default value.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseJsonQueryParam<T = unknown>(param: string | string[] | undefined, defaultValue?: T): T | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a JSON-encoded value from a URL query parameter.
|
|
3
|
+
*
|
|
4
|
+
* This function is specifically designed for query parameters that contain
|
|
5
|
+
* serialized complex data (arrays or objects), not for simple string values.
|
|
6
|
+
*
|
|
7
|
+
* It handles Next.js query parameters which can be string, string[] or undefined.
|
|
8
|
+
* Repeated parameters (`string[]`) are not supported.
|
|
9
|
+
*
|
|
10
|
+
* @param param - URL query parameter value.
|
|
11
|
+
* @param defaultValue - Default value.
|
|
12
|
+
* @returns Parsed complex data structure or default value.
|
|
13
|
+
*/
|
|
14
|
+
export function parseJsonQueryParam(param, defaultValue) {
|
|
15
|
+
// Handle non-string parameters.
|
|
16
|
+
if (typeof param !== "string")
|
|
17
|
+
return defaultValue;
|
|
18
|
+
try {
|
|
19
|
+
return JSON.parse(decodeURIComponent(param));
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.warn("Failed to parse query param JSON:", error);
|
|
23
|
+
return defaultValue;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NextRouter } from "next/router";
|
|
2
|
+
/**
|
|
3
|
+
* Builds a query object from state for URL parameter synchronization.
|
|
4
|
+
*
|
|
5
|
+
* This function converts a state object into a format compatible with NextRouter query parameters.
|
|
6
|
+
* It handles different value types appropriately:
|
|
7
|
+
*
|
|
8
|
+
* - Undefined values are excluded.
|
|
9
|
+
* - Strings are used as-is (empty strings are excluded).
|
|
10
|
+
* - Arrays are JSON stringified (empty arrays are excluded).
|
|
11
|
+
*
|
|
12
|
+
* @param state - State object containing values to convert to URL parameters.
|
|
13
|
+
* @returns A query object compatible with NextRouter.
|
|
14
|
+
*/
|
|
15
|
+
export declare function stateToUrlQuery<S extends Record<string, string | unknown[] | undefined>>(state: S): NextRouter["query"];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a query object from state for URL parameter synchronization.
|
|
3
|
+
*
|
|
4
|
+
* This function converts a state object into a format compatible with NextRouter query parameters.
|
|
5
|
+
* It handles different value types appropriately:
|
|
6
|
+
*
|
|
7
|
+
* - Undefined values are excluded.
|
|
8
|
+
* - Strings are used as-is (empty strings are excluded).
|
|
9
|
+
* - Arrays are JSON stringified (empty arrays are excluded).
|
|
10
|
+
*
|
|
11
|
+
* @param state - State object containing values to convert to URL parameters.
|
|
12
|
+
* @returns A query object compatible with NextRouter.
|
|
13
|
+
*/
|
|
14
|
+
export function stateToUrlQuery(state) {
|
|
15
|
+
const query = {};
|
|
16
|
+
for (const [key, value] of Object.entries(state)) {
|
|
17
|
+
// Handle the undefined case.
|
|
18
|
+
if (value === undefined)
|
|
19
|
+
continue;
|
|
20
|
+
// Handle the string case.
|
|
21
|
+
if (typeof value === "string") {
|
|
22
|
+
if (!value)
|
|
23
|
+
continue;
|
|
24
|
+
query[key] = value;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
// Handle the array case.
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
if (value.length === 0)
|
|
30
|
+
continue;
|
|
31
|
+
query[key] = JSON.stringify(value);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return query;
|
|
35
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const DataDictionaryView: ({ className, }:
|
|
1
|
+
import { DataDictionaryViewProps } from "./types";
|
|
2
|
+
export declare const DataDictionaryView: ({ className, dictionary, }: DataDictionaryViewProps) => JSX.Element;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DataDictionary } from "../../components/DataDictionary/dataDictionary";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { useStateSyncManager } from "../../hooks/stateSyncManager/hook";
|
|
4
|
+
import { DataDictionaryContext } from "../../providers/dataDictionary/context";
|
|
5
|
+
import { clearMeta } from "../../providers/dataDictionaryState/actions/clearMeta/dispatch";
|
|
6
|
+
import { stateToUrl } from "../../providers/dataDictionaryState/actions/stateToUrl/dispatch";
|
|
7
|
+
import { urlToState } from "../../providers/dataDictionaryState/actions/urlToState/dispatch";
|
|
8
|
+
import { useDataDictionaryState } from "../../providers/dataDictionaryState/hooks/UseDataDictionaryState/hook";
|
|
9
|
+
import { buildStateSyncManagerContext } from "./utils";
|
|
10
|
+
export const DataDictionaryView = ({ className, dictionary, }) => {
|
|
11
|
+
const { dataDictionaryDispatch, dataDictionaryState } = useDataDictionaryState();
|
|
12
|
+
useStateSyncManager({
|
|
13
|
+
actions: { clearMeta, stateToUrl, urlToState },
|
|
14
|
+
dispatch: dataDictionaryDispatch,
|
|
15
|
+
state: buildStateSyncManagerContext(dataDictionaryState, dictionary),
|
|
16
|
+
});
|
|
17
|
+
return (React.createElement(DataDictionaryContext.Provider, { value: { dictionary } },
|
|
18
|
+
React.createElement(DataDictionary, { key: dictionary, className: className, dictionary: dictionary })));
|
|
5
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StateSyncManagerContext } from "../../hooks/stateSyncManager/types";
|
|
2
|
+
import { DataDictionaryState } from "../../providers/dataDictionaryState/types";
|
|
3
|
+
/**
|
|
4
|
+
* Builds the state sync manager context object for URL-state synchronization.
|
|
5
|
+
* - Command: The meta command that signals a URL update operation is needed e.g. "STATE_TO_URL_PUSH" or "STATE_TO_URL_REPLACE".
|
|
6
|
+
* - ParamKeys: Expected list of URL parameter keys that should be synchronized with state e.g. "filter".
|
|
7
|
+
* - Query: Dictionary related query object from state that should be synchronized with the URL.
|
|
8
|
+
* @param dataDictionaryState - Data dictionary state.
|
|
9
|
+
* @param dictionary - Dictionary ID.
|
|
10
|
+
* @returns The state sync manager context.
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildStateSyncManagerContext(dataDictionaryState: DataDictionaryState, dictionary: string): StateSyncManagerContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DATA_DICTIONARY_URL_PARAMS } from "../../providers/dataDictionaryState/dictionaries/constants";
|
|
2
|
+
/**
|
|
3
|
+
* Builds the state sync manager context object for URL-state synchronization.
|
|
4
|
+
* - Command: The meta command that signals a URL update operation is needed e.g. "STATE_TO_URL_PUSH" or "STATE_TO_URL_REPLACE".
|
|
5
|
+
* - ParamKeys: Expected list of URL parameter keys that should be synchronized with state e.g. "filter".
|
|
6
|
+
* - Query: Dictionary related query object from state that should be synchronized with the URL.
|
|
7
|
+
* @param dataDictionaryState - Data dictionary state.
|
|
8
|
+
* @param dictionary - Dictionary ID.
|
|
9
|
+
* @returns The state sync manager context.
|
|
10
|
+
*/
|
|
11
|
+
export function buildStateSyncManagerContext(dataDictionaryState, dictionary) {
|
|
12
|
+
return {
|
|
13
|
+
command: dataDictionaryState.meta?.command,
|
|
14
|
+
paramKeys: Object.values(DATA_DICTIONARY_URL_PARAMS),
|
|
15
|
+
query: dataDictionaryState.dictionaries?.[dictionary]?.query,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -3,7 +3,7 @@ import { StateSyncManagerContext } from "../../hooks/stateSyncManager/types";
|
|
|
3
3
|
import { ExploreState } from "../../providers/exploreState";
|
|
4
4
|
import { ExploreView } from "./exploreView";
|
|
5
5
|
/**
|
|
6
|
-
*Builds the state sync manager context object for URL-state synchronization.
|
|
6
|
+
* Builds the state sync manager context object for URL-state synchronization.
|
|
7
7
|
* - Command: The meta command that signals a URL update operation is needed e.g. "STATE_TO_URL_PUSH" or "STATE_TO_URL_REPLACE".
|
|
8
8
|
* - ParamKeys: Expected list of URL parameter keys that should be synchronized with state e.g. "filter", "catalog".
|
|
9
9
|
* - Query: Entity related query object from state that should be synchronized with the URL.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EXPLORE_URL_PARAMS } from "../../providers/exploreState/constants";
|
|
2
2
|
/**
|
|
3
|
-
*Builds the state sync manager context object for URL-state synchronization.
|
|
3
|
+
* Builds the state sync manager context object for URL-state synchronization.
|
|
4
4
|
* - Command: The meta command that signals a URL update operation is needed e.g. "STATE_TO_URL_PUSH" or "STATE_TO_URL_REPLACE".
|
|
5
5
|
* - ParamKeys: Expected list of URL parameter keys that should be synchronized with state e.g. "filter", "catalog".
|
|
6
6
|
* - Query: Entity related query object from state that should be synchronized with the URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databiosphere/findable-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@mui/icons-material": "^7.0.1",
|
|
73
73
|
"@mui/material": "^7.0.1",
|
|
74
74
|
"@observablehq/plot": "^0.6.17",
|
|
75
|
+
"@tanstack/match-sorter-utils": "^8.19.4",
|
|
75
76
|
"@tanstack/react-table": "^8.19.2",
|
|
76
77
|
"@tanstack/react-virtual": "^3.0.0-beta.59",
|
|
77
78
|
"copy-to-clipboard": "3.3.1",
|
package/src/common/entities.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RowData, TableOptions } from "@tanstack/react-table";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Model of a value of a metadata class.
|
|
@@ -72,10 +72,9 @@ export interface DataDictionary<T extends RowData = Attribute> {
|
|
|
72
72
|
* dictionary) as well as column def for displaying the data dictionary.
|
|
73
73
|
*/
|
|
74
74
|
export interface DataDictionaryConfig<T extends RowData = Attribute> {
|
|
75
|
-
columnDefs: ColumnDef<T, T[keyof T]>[];
|
|
76
75
|
dataDictionary: DataDictionary<T>;
|
|
77
76
|
path: string; // Used as a key to find the dictionary to display
|
|
78
|
-
tableOptions
|
|
77
|
+
tableOptions: Omit<TableOptions<T>, "data" | "getCoreRowModel">;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
/**
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { GridProps } from "@mui/material";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { NoResults } from "../../../NoResults/noResults";
|
|
4
|
+
import { StyledRoundedPaper } from "./entities.styles";
|
|
4
5
|
|
|
5
6
|
export const GRID_PROPS: GridProps = {
|
|
6
7
|
container: true,
|
|
7
8
|
direction: "column",
|
|
8
9
|
flexWrap: "nowrap",
|
|
9
|
-
rowGap:
|
|
10
|
+
rowGap: 8,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const NO_RESULTS_PROPS: ComponentProps<typeof NoResults> = {
|
|
14
|
+
Paper: StyledRoundedPaper,
|
|
15
|
+
title: "No results found",
|
|
10
16
|
};
|
|
@@ -2,8 +2,9 @@ import { Grid } from "@mui/material";
|
|
|
2
2
|
import { RowData } from "@tanstack/react-table";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Attribute } from "../../../../common/entities";
|
|
5
|
+
import { NoResults } from "../../../NoResults/noResults";
|
|
5
6
|
import { Entity } from "../Entity/entity";
|
|
6
|
-
import { GRID_PROPS } from "./constants";
|
|
7
|
+
import { GRID_PROPS, NO_RESULTS_PROPS } from "./constants";
|
|
7
8
|
import { ClassesProps } from "./types";
|
|
8
9
|
|
|
9
10
|
export const Entities = <T extends RowData = Attribute>({
|
|
@@ -11,10 +12,14 @@ export const Entities = <T extends RowData = Attribute>({
|
|
|
11
12
|
table,
|
|
12
13
|
}: ClassesProps<T>): JSX.Element => {
|
|
13
14
|
const { getGroupedRowModel } = table;
|
|
15
|
+
const { rows } = getGroupedRowModel();
|
|
16
|
+
|
|
17
|
+
if (rows.length === 0) return <NoResults {...NO_RESULTS_PROPS} />;
|
|
18
|
+
|
|
14
19
|
return (
|
|
15
20
|
<Grid {...GRID_PROPS}>
|
|
16
21
|
{/* Render grouped rows where each "group" is a class e.g. "donor" */}
|
|
17
|
-
{
|
|
22
|
+
{rows.map((row) => (
|
|
18
23
|
<Entity key={row.id} row={row} spacing={spacing} table={table} />
|
|
19
24
|
))}
|
|
20
25
|
</Grid>
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import { Typography } from "@mui/material";
|
|
3
3
|
import { LayoutSpacing } from "../../hooks/UseLayoutSpacing/types";
|
|
4
|
-
import { ENTITIES_ROW_GAP } from "../Entities/constants";
|
|
5
|
-
import { LAYOUT_SPACING } from "../Layout/constants";
|
|
6
|
-
|
|
7
|
-
const TOP =
|
|
8
|
-
ENTITIES_ROW_GAP +
|
|
9
|
-
LAYOUT_SPACING.TITLE_HEIGHT +
|
|
10
|
-
LAYOUT_SPACING.FILTERS_HEIGHT +
|
|
11
|
-
LAYOUT_SPACING.FILTERS_PADDING_TOP +
|
|
12
|
-
LAYOUT_SPACING.CONTENT_PADDING_TOP;
|
|
13
4
|
|
|
14
5
|
export const StyledTypography = styled(Typography)<Partial<LayoutSpacing>>`
|
|
15
|
-
scroll-margin-top: ${({ top = 0 }) => top
|
|
6
|
+
scroll-margin-top: ${({ top = 0 }) => top}px;
|
|
16
7
|
|
|
17
8
|
&:hover a {
|
|
18
9
|
opacity: 1;
|