@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,5 @@
|
|
|
1
|
+
export declare const StyledChip: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "label" | "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "icon" | "onDelete" | "skipFocusWhenDisabled"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Chip } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../../../styles/common/constants/palette";
|
|
4
|
+
export const StyledChip = styled(Chip) `
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
box-shadow: 0 0 0 2px ${PALETTE.COMMON_WHITE};
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
gap: 4px;
|
|
9
|
+
justify-self: flex-start;
|
|
10
|
+
padding: 0 8px;
|
|
11
|
+
|
|
12
|
+
.MuiChip-label {
|
|
13
|
+
padding: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.MuiChip-deleteIcon {
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
margin: 0 -4px 0 0;
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
color: inherit;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../../../../styles/common/mui/chip";
|
|
2
|
+
import { SVG_ICON_PROPS as MUI_SVG_ICON_PROPS } from "../../../../../../../styles/common/mui/svgIcon";
|
|
3
|
+
export const CHIP_PROPS = {
|
|
4
|
+
clickable: false,
|
|
5
|
+
color: MUI_CHIP_PROPS.COLOR.DEFAULT,
|
|
6
|
+
size: MUI_CHIP_PROPS.SIZE.MEDIUM,
|
|
7
|
+
};
|
|
8
|
+
export const SVG_ICON_PROPS = {
|
|
9
|
+
color: MUI_SVG_ICON_PROPS.COLOR.INHERIT,
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BIONETWORK } from "../../../../../../../DataDictionary/components/Filters/stories/constants";
|
|
4
|
+
import { ColumnFilterTag } from "../columnFilterTag";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: ColumnFilterTag,
|
|
7
|
+
decorators: [
|
|
8
|
+
(Story) => (React.createElement(Box, { sx: { display: "grid", gap: 2, gridAutoFlow: "column" } },
|
|
9
|
+
React.createElement(Story, null))),
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
args: {
|
|
15
|
+
column: BIONETWORK,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChipProps } from "@mui/material";
|
|
2
|
+
import { Column, RowData } from "@tanstack/react-table";
|
|
3
|
+
import { BaseComponentProps } from "../../../../../../types";
|
|
4
|
+
export interface ColumnFilterTagProps<T extends RowData> extends BaseComponentProps, ChipProps {
|
|
5
|
+
column: Column<T>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuProps } from "@mui/material";
|
|
2
2
|
import { Column, RowData } from "@tanstack/react-table";
|
|
3
3
|
import { BaseComponentProps } from "../../../../types";
|
|
4
|
+
import { StyledButton } from "./columnFilter.styles";
|
|
4
5
|
export interface ColumnFilterProps<T extends RowData> extends BaseComponentProps, Omit<MenuProps, "anchorEl" | "onClose" | "open"> {
|
|
5
|
-
Button?: typeof
|
|
6
|
+
Button?: typeof StyledButton;
|
|
6
7
|
column: Column<T>;
|
|
7
8
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ClearInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment";
|
|
3
|
+
import { SearchInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment";
|
|
4
|
+
import { StyledOutlinedInput } from "../../../../common/OutlinedInput/outlinedInput.styles";
|
|
5
|
+
import { OUTLINED_INPUT_PROPS } from "./constants";
|
|
6
|
+
export const GlobalFilter = ({ className, table, ...props /* MuiOutlinedInputProps */ }) => {
|
|
7
|
+
const { getState, setGlobalFilter } = table;
|
|
8
|
+
const { globalFilter } = getState();
|
|
9
|
+
return (React.createElement(StyledOutlinedInput, { ...OUTLINED_INPUT_PROPS, className: className, endAdornment: React.createElement(ClearInputAdornment, { in: !!globalFilter, onClick: () => setGlobalFilter(undefined) }), hasValue: !!globalFilter, onChange: (e) => setGlobalFilter(e.target.value), startAdornment: React.createElement(SearchInputAdornment, null), value: globalFilter ?? "", ...props }));
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OutlinedInputProps } from "@mui/material";
|
|
2
|
+
import { RowData, Table } from "@tanstack/react-table";
|
|
3
|
+
import { BaseComponentProps } from "components/types";
|
|
4
|
+
export interface GlobalFilterProps<T extends RowData> extends BaseComponentProps, OutlinedInputProps {
|
|
5
|
+
table: Table<T>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InitialTableState, PaginationTableState } from "@tanstack/react-table";
|
|
2
|
+
/**
|
|
3
|
+
* Initializes pagination state by merging default values with initial state.
|
|
4
|
+
* TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
|
|
5
|
+
* so this function ensures custom pagination state is properly initialized from the initial state.
|
|
6
|
+
* @param initialState - The initial state.
|
|
7
|
+
* @returns The initialized pagination state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function initPaginationState(initialState?: InitialTableState): PaginationTableState;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PAGINATION_TABLE_STATE } from "./constants";
|
|
2
|
+
/**
|
|
3
|
+
* Initializes pagination state by merging default values with initial state.
|
|
4
|
+
* TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
|
|
5
|
+
* so this function ensures custom pagination state is properly initialized from the initial state.
|
|
6
|
+
* @param initialState - The initial state.
|
|
7
|
+
* @returns The initialized pagination state.
|
|
8
|
+
*/
|
|
9
|
+
export function initPaginationState(initialState) {
|
|
10
|
+
if (!initialState?.pagination)
|
|
11
|
+
return PAGINATION_TABLE_STATE;
|
|
12
|
+
return {
|
|
13
|
+
pagination: {
|
|
14
|
+
...PAGINATION_TABLE_STATE.pagination,
|
|
15
|
+
...initialState.pagination,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { LinkRounded } from "@mui/icons-material";
|
|
2
|
+
import { useRouter } from "next/router";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import {
|
|
4
|
+
import { StyledNextLink } from "./anchorLink.styles";
|
|
4
5
|
export const AnchorLink = ({ anchorLink, className, }) => {
|
|
5
|
-
|
|
6
|
+
const { query } = useRouter();
|
|
7
|
+
return (React.createElement(StyledNextLink, { "aria-label": anchorLink, className: className, href: { hash: anchorLink, query } },
|
|
6
8
|
React.createElement(LinkRounded, { fontSize: "xsmall" })));
|
|
7
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const StyledNextLink: import("@emotion/styled").StyledComponent<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, keyof {
|
|
2
2
|
href: string | import("url").UrlObject;
|
|
3
3
|
as?: string | import("url").UrlObject;
|
|
4
4
|
replace?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { inkLight } from "../../../styles/common/mixins/colors";
|
|
4
|
-
export const
|
|
4
|
+
export const StyledNextLink = styled(Link) `
|
|
5
5
|
color: ${inkLight};
|
|
6
6
|
margin-left: 4px;
|
|
7
7
|
opacity: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvgIconProps } from "@mui/material";
|
|
2
2
|
/**
|
|
3
3
|
* Custom search icon.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SearchIcon: ({ fontSize, viewBox, ...props }:
|
|
5
|
+
export declare const SearchIcon: ({ fontSize, viewBox, ...props }: SvgIconProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CloseRounded } from "@mui/icons-material";
|
|
2
|
+
import { IconButton } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { SVG_ICON_PROPS } from "../constants";
|
|
5
|
+
import { StyledInputAdornment } from "./clearInputAdornment.styles";
|
|
6
|
+
import { ICON_BUTTON_PROPS, INPUT_ADORNMENT_PROPS } from "./constants";
|
|
7
|
+
export const ClearInputAdornment = ({ in: isIn, onClick, }) => {
|
|
8
|
+
if (!isIn)
|
|
9
|
+
return null;
|
|
10
|
+
return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
|
|
11
|
+
React.createElement(IconButton, { ...ICON_BUTTON_PROPS, onClick: onClick },
|
|
12
|
+
React.createElement(CloseRounded, { ...SVG_ICON_PROPS }))));
|
|
13
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { InputAdornment } from "@mui/material";
|
|
3
|
+
import { PALETTE } from "../../../../../../../styles/common/constants/palette";
|
|
4
|
+
export const StyledInputAdornment = styled(InputAdornment) `
|
|
5
|
+
color: ${PALETTE.INK_LIGHT};
|
|
6
|
+
margin: 0;
|
|
7
|
+
|
|
8
|
+
.MuiIconButton-root {
|
|
9
|
+
margin-right: -10px;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICON_BUTTON_PROPS as MUI_ICON_BUTTON_PROPS } from "../../../../../../../styles/common/mui/iconButton";
|
|
2
|
+
import { INPUT_ADORNMENT_PROPS as MUI_INPUT_ADORNMENT_PROPS } from "../../../../../../../styles/common/mui/inputAdornment";
|
|
3
|
+
export const ICON_BUTTON_PROPS = {
|
|
4
|
+
color: MUI_ICON_BUTTON_PROPS.COLOR.INHERIT,
|
|
5
|
+
edge: MUI_ICON_BUTTON_PROPS.EDGE.END,
|
|
6
|
+
size: MUI_ICON_BUTTON_PROPS.SIZE.MEDIUM,
|
|
7
|
+
};
|
|
8
|
+
export const INPUT_ADORNMENT_PROPS = {
|
|
9
|
+
position: MUI_INPUT_ADORNMENT_PROPS.POSITION.END,
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SearchInputAdornment: () => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SearchIcon } from "../../../../../CustomIcon/components/SearchIcon/searchIcon";
|
|
3
|
+
import { StyledInputAdornment } from "../../inputAdornment.styles";
|
|
4
|
+
import { SVG_ICON_PROPS } from "../constants";
|
|
5
|
+
import { INPUT_ADORNMENT_PROPS } from "./constants";
|
|
6
|
+
export const SearchInputAdornment = () => {
|
|
7
|
+
return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
|
|
8
|
+
React.createElement(SearchIcon, { ...SVG_ICON_PROPS })));
|
|
9
|
+
};
|
package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import { OutlinedInput } from "@mui/material";
|
|
4
|
+
import { PALETTE } from "../../../styles/common/constants/palette";
|
|
5
|
+
export const StyledOutlinedInput = styled(OutlinedInput, {
|
|
6
|
+
shouldForwardProp: (prop) => prop !== "hasValue",
|
|
7
|
+
}) `
|
|
8
|
+
${({ hasValue }) => hasValue &&
|
|
9
|
+
css `
|
|
10
|
+
& {
|
|
11
|
+
color: ${PALETTE.INK_MAIN};
|
|
12
|
+
|
|
13
|
+
.MuiOutlinedInput-input {
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`};
|
|
18
|
+
`;
|
|
@@ -10,11 +10,11 @@ export const useMetaCommands = ({ actions, dispatch, state, }) => {
|
|
|
10
10
|
switch (command) {
|
|
11
11
|
case META_COMMAND.STATE_TO_URL_PUSH:
|
|
12
12
|
Router.push({ query }, undefined, { shallow: true });
|
|
13
|
-
dispatch(actions.clearMeta());
|
|
13
|
+
dispatch?.(actions.clearMeta());
|
|
14
14
|
break;
|
|
15
15
|
case META_COMMAND.STATE_TO_URL_REPLACE:
|
|
16
16
|
Router.replace({ query }, undefined, { shallow: true });
|
|
17
|
-
dispatch(actions.clearMeta());
|
|
17
|
+
dispatch?.(actions.clearMeta());
|
|
18
18
|
break;
|
|
19
19
|
default:
|
|
20
20
|
break;
|
|
@@ -23,18 +23,18 @@ export const useStateSync = ({ actions, dispatch, state, }) => {
|
|
|
23
23
|
// Dispatch action sync URL >> state.
|
|
24
24
|
if (wasPop(basePath, pathname, popRef.current)) {
|
|
25
25
|
// When the user navigates with the back/forward buttons.
|
|
26
|
-
dispatch(actions.urlToState({ query }));
|
|
26
|
+
dispatch?.(actions.urlToState({ query }));
|
|
27
27
|
onClearPopRef();
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
// Dispatch action sync URL >> state.
|
|
31
31
|
if (hasParams(query, paramKeys)) {
|
|
32
32
|
// When the URL has parameters.
|
|
33
|
-
dispatch(actions.urlToState({ query }));
|
|
33
|
+
dispatch?.(actions.urlToState({ query }));
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
// Otherwise, dispatch action sync URL << state.
|
|
37
|
-
dispatch(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
|
|
37
|
+
dispatch?.(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
|
|
38
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- deliberate omission of `state.query`, `state.paramKeys`, `actions` and `dispatch` from dependencies, hook is only expected to run when the Next.js router changes.
|
|
39
39
|
}, [basePath, isReady, pathname, query]);
|
|
40
40
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { DataDictionaryContext } from "./context";
|
|
3
|
+
/**
|
|
4
|
+
* Returns data dictionary context.
|
|
5
|
+
* @returns data dictionary context.
|
|
6
|
+
*/
|
|
7
|
+
export const useDataDictionary = () => {
|
|
8
|
+
return useContext(DataDictionaryContext);
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataDictionaryState } from "../../types";
|
|
2
|
+
import { ClearMetaPayload } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Reducer function to handle the "clear meta" action.
|
|
5
|
+
* @param state - Data Dictionary State.
|
|
6
|
+
* @param payload - Payload.
|
|
7
|
+
* @returns data dictionary state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function clearMetaAction(state: DataDictionaryState, payload: ClearMetaPayload): DataDictionaryState;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reducer function to handle the "clear meta" action.
|
|
3
|
+
* @param state - Data Dictionary State.
|
|
4
|
+
* @param payload - Payload.
|
|
5
|
+
* @returns data dictionary state.
|
|
6
|
+
*/
|
|
7
|
+
export function clearMetaAction(state, payload) {
|
|
8
|
+
return {
|
|
9
|
+
...state,
|
|
10
|
+
meta: payload,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataDictionaryActionKind } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Action creator for clearing meta in the state.
|
|
4
|
+
* @returns Action with payload and action type.
|
|
5
|
+
*/
|
|
6
|
+
export function clearMeta() {
|
|
7
|
+
return {
|
|
8
|
+
payload: null,
|
|
9
|
+
type: DataDictionaryActionKind.ClearMeta,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataDictionaryState } from "../../types";
|
|
2
|
+
import { StateToUrlPayload } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Reducer function to handle the "state >> URL sync" action.
|
|
5
|
+
* @param state - State.
|
|
6
|
+
* @param payload - Payload.
|
|
7
|
+
* @returns state.
|
|
8
|
+
*/
|
|
9
|
+
export declare function stateToUrlAction(state: DataDictionaryState, payload: StateToUrlPayload): DataDictionaryState;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { META_COMMAND } from "../../../../hooks/stateSyncManager/hooks/UseMetaCommands/types";
|
|
2
|
+
import { ROUTER_METHOD } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Reducer function to handle the "state >> URL sync" action.
|
|
5
|
+
* @param state - State.
|
|
6
|
+
* @param payload - Payload.
|
|
7
|
+
* @returns state.
|
|
8
|
+
*/
|
|
9
|
+
export function stateToUrlAction(state, payload) {
|
|
10
|
+
const command = payload.method === ROUTER_METHOD.PUSH
|
|
11
|
+
? META_COMMAND.STATE_TO_URL_PUSH
|
|
12
|
+
: META_COMMAND.STATE_TO_URL_REPLACE;
|
|
13
|
+
return { ...state, meta: { command } };
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StateToUrlAction, StateToUrlPayload } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Action creator for state >> URL sync.
|
|
4
|
+
* @param payload - Payload.
|
|
5
|
+
* @returns Action with payload and action type.
|
|
6
|
+
*/
|
|
7
|
+
export declare function stateToUrl(payload: StateToUrlPayload): StateToUrlAction;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataDictionaryActionKind } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Action creator for state >> URL sync.
|
|
4
|
+
* @param payload - Payload.
|
|
5
|
+
* @returns Action with payload and action type.
|
|
6
|
+
*/
|
|
7
|
+
export function stateToUrl(payload) {
|
|
8
|
+
return {
|
|
9
|
+
payload,
|
|
10
|
+
type: DataDictionaryActionKind.StateToUrl,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataDictionaryActionKind } from "../types";
|
|
2
|
+
export declare enum ROUTER_METHOD {
|
|
3
|
+
PUSH = "push",
|
|
4
|
+
REPLACE = "replace"
|
|
5
|
+
}
|
|
6
|
+
export type StateToUrlAction = {
|
|
7
|
+
payload: StateToUrlPayload;
|
|
8
|
+
type: DataDictionaryActionKind.StateToUrl;
|
|
9
|
+
};
|
|
10
|
+
export type StateToUrlPayload = {
|
|
11
|
+
method: ROUTER_METHOD;
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClearMetaAction } from "./clearMeta/types";
|
|
2
|
+
import { StateToUrlAction } from "./stateToUrl/types";
|
|
3
|
+
import { UpdateColumnFiltersAction } from "./updateColumnFilters/types";
|
|
4
|
+
import { UpdateGlobalFilterAction } from "./updateGlobalFilter/types";
|
|
5
|
+
import { UrlToStateAction } from "./urlToState/types";
|
|
6
|
+
export type DataDictionaryAction = ClearMetaAction | StateToUrlAction | UpdateColumnFiltersAction | UpdateGlobalFilterAction | UrlToStateAction;
|
|
7
|
+
export declare enum DataDictionaryActionKind {
|
|
8
|
+
ClearMeta = "CLEAR_META",
|
|
9
|
+
StateToUrl = "STATE_TO_URL",
|
|
10
|
+
UpdateColumnFilters = "UPDATE_COLUMN_FILTERS",
|
|
11
|
+
UpdateGlobalFilter = "UPDATE_GLOBAL_FILTER",
|
|
12
|
+
UrlToState = "URL_TO_STATE"
|
|
13
|
+
}
|