@equinor/fusion-react-filter 1.1.11 → 2.1.0-filter.3
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/README.md +4 -4
- package/components/package.json +6 -0
- package/dist/FilterProvider.d.ts +7 -28
- package/dist/FilterProvider.d.ts.map +1 -1
- package/dist/FilterProvider.js +24 -31
- package/dist/FilterProvider.js.map +1 -1
- package/dist/actions.d.ts +32 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +20 -0
- package/dist/actions.js.map +1 -0
- package/dist/components/filter/FilterOptionHeader.d.ts +7 -0
- package/dist/components/filter/FilterOptionHeader.d.ts.map +1 -0
- package/dist/components/filter/FilterOptionHeader.js +69 -0
- package/dist/components/filter/FilterOptionHeader.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilter.d.ts +16 -0
- package/dist/components/filter/checkbox/CheckboxFilter.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilter.js +16 -0
- package/dist/components/filter/checkbox/CheckboxFilter.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilter.style.d.ts +5 -0
- package/dist/components/filter/checkbox/CheckboxFilter.style.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilter.style.js +19 -0
- package/dist/components/filter/checkbox/CheckboxFilter.style.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.d.ts +14 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.js +19 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.style.d.ts +3 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.style.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.style.js +40 -0
- package/dist/components/filter/checkbox/CheckboxFilterOption.style.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptionAll.d.ts +3 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptionAll.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptionAll.js +24 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptionAll.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptions.d.ts +3 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptions.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptions.js +37 -0
- package/dist/components/filter/checkbox/CheckboxFilterOptions.js.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterProvider.d.ts +13 -0
- package/dist/components/filter/checkbox/CheckboxFilterProvider.d.ts.map +1 -0
- package/dist/components/filter/checkbox/CheckboxFilterProvider.js +16 -0
- package/dist/components/filter/checkbox/CheckboxFilterProvider.js.map +1 -0
- package/dist/components/filter/checkbox/context.d.ts +4 -0
- package/dist/components/filter/checkbox/context.d.ts.map +1 -0
- package/dist/components/filter/checkbox/context.js +3 -0
- package/dist/components/filter/checkbox/context.js.map +1 -0
- package/dist/components/filter/checkbox/index.d.ts +2 -0
- package/dist/components/filter/checkbox/index.d.ts.map +1 -0
- package/dist/components/filter/checkbox/index.js +2 -0
- package/dist/components/filter/checkbox/index.js.map +1 -0
- package/dist/components/filter/checkbox/types.d.ts +7 -0
- package/dist/components/filter/checkbox/types.d.ts.map +1 -0
- package/dist/components/filter/checkbox/types.js +2 -0
- package/dist/components/filter/checkbox/types.js.map +1 -0
- package/dist/components/filter/index.d.ts +5 -0
- package/dist/components/filter/index.d.ts.map +1 -0
- package/dist/components/filter/index.js +5 -0
- package/dist/components/filter/index.js.map +1 -0
- package/dist/components/filter/search/SearchFilter.d.ts +17 -0
- package/dist/components/filter/search/SearchFilter.d.ts.map +1 -0
- package/dist/components/filter/search/SearchFilter.js +47 -0
- package/dist/components/filter/search/SearchFilter.js.map +1 -0
- package/dist/components/filter/search/index.d.ts +2 -0
- package/dist/components/filter/search/index.d.ts.map +1 -0
- package/dist/components/filter/search/index.js +2 -0
- package/dist/components/filter/search/index.js.map +1 -0
- package/dist/components/filter/types.d.ts +7 -0
- package/dist/components/filter/types.d.ts.map +1 -0
- package/dist/components/filter/types.js +2 -0
- package/dist/components/filter/types.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/misc/ClearFilterButton.d.ts +10 -0
- package/dist/components/misc/ClearFilterButton.d.ts.map +1 -0
- package/dist/components/misc/ClearFilterButton.js +25 -0
- package/dist/components/misc/ClearFilterButton.js.map +1 -0
- package/dist/components/misc/FilterContainer.d.ts +12 -0
- package/dist/components/misc/FilterContainer.d.ts.map +1 -0
- package/dist/components/misc/FilterContainer.js +18 -0
- package/dist/components/misc/FilterContainer.js.map +1 -0
- package/dist/components/misc/index.d.ts +3 -0
- package/dist/components/misc/index.d.ts.map +1 -0
- package/dist/components/misc/index.js +3 -0
- package/dist/components/misc/index.js.map +1 -0
- package/dist/components/panel/FilterPanel.d.ts +19 -0
- package/dist/components/panel/FilterPanel.d.ts.map +1 -0
- package/dist/components/panel/FilterPanel.js +17 -0
- package/dist/components/panel/FilterPanel.js.map +1 -0
- package/dist/components/panel/FilterPanelBar.d.ts +3 -0
- package/dist/components/panel/FilterPanelBar.d.ts.map +1 -0
- package/dist/components/panel/FilterPanelBar.js +31 -0
- package/dist/components/panel/FilterPanelBar.js.map +1 -0
- package/dist/components/panel/FilterPanelFilters.d.ts +3 -0
- package/dist/components/panel/FilterPanelFilters.d.ts.map +1 -0
- package/dist/components/panel/FilterPanelFilters.js +13 -0
- package/dist/components/panel/FilterPanelFilters.js.map +1 -0
- package/dist/components/panel/FilterPanelProvider.d.ts +32 -0
- package/dist/components/panel/FilterPanelProvider.d.ts.map +1 -0
- package/dist/components/panel/FilterPanelProvider.js +35 -0
- package/dist/components/panel/FilterPanelProvider.js.map +1 -0
- package/dist/components/panel/FilterPanelSelector.d.ts +7 -0
- package/dist/components/panel/FilterPanelSelector.d.ts.map +1 -0
- package/dist/components/panel/FilterPanelSelector.js +17 -0
- package/dist/components/panel/FilterPanelSelector.js.map +1 -0
- package/dist/components/panel/index.d.ts +5 -0
- package/dist/components/panel/index.d.ts.map +1 -0
- package/dist/components/panel/index.js +5 -0
- package/dist/components/panel/index.js.map +1 -0
- package/dist/context.d.ts +6 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +6 -0
- package/dist/context.js.map +1 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +25 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useClearFilter.d.ts +9 -0
- package/dist/hooks/useClearFilter.d.ts.map +1 -0
- package/dist/hooks/useClearFilter.js +30 -0
- package/dist/hooks/useClearFilter.js.map +1 -0
- package/dist/hooks/useFilter.d.ts +7 -0
- package/dist/hooks/useFilter.d.ts.map +1 -0
- package/dist/hooks/useFilter.js +26 -0
- package/dist/hooks/useFilter.js.map +1 -0
- package/dist/hooks/useFilterData.d.ts +11 -0
- package/dist/hooks/useFilterData.d.ts.map +1 -0
- package/dist/hooks/useFilterData.js +39 -0
- package/dist/hooks/useFilterData.js.map +1 -0
- package/dist/hooks/useFilterSelection.d.ts +5 -9
- package/dist/hooks/useFilterSelection.d.ts.map +1 -1
- package/dist/hooks/useFilterSelection.js +6 -21
- package/dist/hooks/useFilterSelection.js.map +1 -1
- package/dist/index.d.ts +4 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/dist/options/FilterOptionProvider.d.ts +12 -0
- package/dist/options/FilterOptionProvider.d.ts.map +1 -0
- package/dist/options/FilterOptionProvider.js +55 -0
- package/dist/options/FilterOptionProvider.js.map +1 -0
- package/dist/options/actions.d.ts +8 -0
- package/dist/options/actions.d.ts.map +1 -0
- package/dist/options/actions.js +6 -0
- package/dist/options/actions.js.map +1 -0
- package/dist/options/context.d.ts +6 -0
- package/dist/options/context.d.ts.map +1 -0
- package/dist/options/context.js +7 -0
- package/dist/options/context.js.map +1 -0
- package/dist/options/create-options.d.ts +4 -0
- package/dist/options/create-options.d.ts.map +1 -0
- package/dist/options/create-options.js +24 -0
- package/dist/options/create-options.js.map +1 -0
- package/dist/options/index.d.ts +6 -0
- package/dist/options/index.d.ts.map +1 -0
- package/dist/options/index.js +6 -0
- package/dist/options/index.js.map +1 -0
- package/dist/options/reducer.d.ts +58 -0
- package/dist/options/reducer.d.ts.map +1 -0
- package/dist/options/reducer.js +4 -0
- package/dist/options/reducer.js.map +1 -0
- package/dist/options/search/filter-option-match.d.ts +7 -0
- package/dist/options/search/filter-option-match.d.ts.map +1 -0
- package/dist/options/search/filter-option-match.js +10 -0
- package/dist/options/search/filter-option-match.js.map +1 -0
- package/dist/options/search/filter-option-search.d.ts +8 -0
- package/dist/options/search/filter-option-search.d.ts.map +1 -0
- package/dist/options/search/filter-option-search.js +12 -0
- package/dist/options/search/filter-option-search.js.map +1 -0
- package/dist/options/search/index.d.ts +2 -0
- package/dist/options/search/index.d.ts.map +1 -0
- package/dist/options/search/index.js +2 -0
- package/dist/options/search/index.js.map +1 -0
- package/dist/options/search/types.d.ts +9 -0
- package/dist/options/search/types.d.ts.map +1 -0
- package/dist/options/search/types.js +2 -0
- package/dist/options/search/types.js.map +1 -0
- package/dist/options/search/useFilterOptionSearch.d.ts +12 -0
- package/dist/options/search/useFilterOptionSearch.d.ts.map +1 -0
- package/dist/options/search/useFilterOptionSearch.js +28 -0
- package/dist/options/search/useFilterOptionSearch.js.map +1 -0
- package/dist/options/types.d.ts +32 -0
- package/dist/options/types.d.ts.map +1 -0
- package/dist/options/types.js +2 -0
- package/dist/options/types.js.map +1 -0
- package/dist/reducers.d.ts +170 -0
- package/dist/reducers.d.ts.map +1 -0
- package/dist/reducers.js +23 -0
- package/dist/reducers.js.map +1 -0
- package/dist/{types/Filter.d.ts → types.d.ts} +19 -16
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/options/package.json +6 -0
- package/package.json +16 -10
- package/dist/FilterContext.d.ts +0 -8
- package/dist/FilterContext.d.ts.map +0 -1
- package/dist/FilterContext.js +0 -4
- package/dist/FilterContext.js.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxFilter.d.ts +0 -34
- package/dist/components/CheckBoxFilter/CheckBoxFilter.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxFilter.js +0 -76
- package/dist/components/CheckBoxFilter/CheckBoxFilter.js.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxOption.d.ts +0 -14
- package/dist/components/CheckBoxFilter/CheckBoxOption.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxOption.js +0 -10
- package/dist/components/CheckBoxFilter/CheckBoxOption.js.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxOption.style.d.ts +0 -3
- package/dist/components/CheckBoxFilter/CheckBoxOption.style.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/CheckBoxOption.style.js +0 -24
- package/dist/components/CheckBoxFilter/CheckBoxOption.style.js.map +0 -1
- package/dist/components/CheckBoxFilter/CheckboxFilter.style.d.ts +0 -3
- package/dist/components/CheckBoxFilter/CheckboxFilter.style.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/CheckboxFilter.style.js +0 -29
- package/dist/components/CheckBoxFilter/CheckboxFilter.style.js.map +0 -1
- package/dist/components/CheckBoxFilter/SelectAllOption.d.ts +0 -12
- package/dist/components/CheckBoxFilter/SelectAllOption.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/SelectAllOption.js +0 -22
- package/dist/components/CheckBoxFilter/SelectAllOption.js.map +0 -1
- package/dist/components/CheckBoxFilter/index.d.ts +0 -5
- package/dist/components/CheckBoxFilter/index.d.ts.map +0 -1
- package/dist/components/CheckBoxFilter/index.js +0 -5
- package/dist/components/CheckBoxFilter/index.js.map +0 -1
- package/dist/components/FilterSection/FilterSection.d.ts +0 -29
- package/dist/components/FilterSection/FilterSection.d.ts.map +0 -1
- package/dist/components/FilterSection/FilterSection.js +0 -64
- package/dist/components/FilterSection/FilterSection.js.map +0 -1
- package/dist/components/FilterSection/FilterSection.style.d.ts +0 -3
- package/dist/components/FilterSection/FilterSection.style.d.ts.map +0 -1
- package/dist/components/FilterSection/FilterSection.style.js +0 -56
- package/dist/components/FilterSection/FilterSection.style.js.map +0 -1
- package/dist/components/FilterSection/index.d.ts +0 -3
- package/dist/components/FilterSection/index.d.ts.map +0 -1
- package/dist/components/FilterSection/index.js +0 -3
- package/dist/components/FilterSection/index.js.map +0 -1
- package/dist/components/FilterSelectionChips/FilterSelectionChips.d.ts +0 -7
- package/dist/components/FilterSelectionChips/FilterSelectionChips.d.ts.map +0 -1
- package/dist/components/FilterSelectionChips/FilterSelectionChips.js +0 -18
- package/dist/components/FilterSelectionChips/FilterSelectionChips.js.map +0 -1
- package/dist/components/FilterSelectionChips/FilterSelectionChips.style.d.ts +0 -3
- package/dist/components/FilterSelectionChips/FilterSelectionChips.style.d.ts.map +0 -1
- package/dist/components/FilterSelectionChips/FilterSelectionChips.style.js +0 -31
- package/dist/components/FilterSelectionChips/FilterSelectionChips.style.js.map +0 -1
- package/dist/components/FilterSelectionChips/index.d.ts +0 -2
- package/dist/components/FilterSelectionChips/index.d.ts.map +0 -1
- package/dist/components/FilterSelectionChips/index.js +0 -2
- package/dist/components/FilterSelectionChips/index.js.map +0 -1
- package/dist/components/FilterSelectionChips/useChipsSelection.d.ts +0 -9
- package/dist/components/FilterSelectionChips/useChipsSelection.d.ts.map +0 -1
- package/dist/components/FilterSelectionChips/useChipsSelection.js +0 -26
- package/dist/components/FilterSelectionChips/useChipsSelection.js.map +0 -1
- package/dist/components/FilterSelector/FilterCategory.d.ts +0 -7
- package/dist/components/FilterSelector/FilterCategory.d.ts.map +0 -1
- package/dist/components/FilterSelector/FilterCategory.js +0 -24
- package/dist/components/FilterSelector/FilterCategory.js.map +0 -1
- package/dist/components/FilterSelector/FilterCategory.style.d.ts +0 -3
- package/dist/components/FilterSelector/FilterCategory.style.d.ts.map +0 -1
- package/dist/components/FilterSelector/FilterCategory.style.js +0 -12
- package/dist/components/FilterSelector/FilterCategory.style.js.map +0 -1
- package/dist/components/FilterSelector/FilterSelector.d.ts +0 -31
- package/dist/components/FilterSelector/FilterSelector.d.ts.map +0 -1
- package/dist/components/FilterSelector/FilterSelector.js +0 -51
- package/dist/components/FilterSelector/FilterSelector.js.map +0 -1
- package/dist/components/FilterSelector/FilterSelector.style.d.ts +0 -3
- package/dist/components/FilterSelector/FilterSelector.style.d.ts.map +0 -1
- package/dist/components/FilterSelector/FilterSelector.style.js +0 -44
- package/dist/components/FilterSelector/FilterSelector.style.js.map +0 -1
- package/dist/components/FilterSelector/index.d.ts +0 -4
- package/dist/components/FilterSelector/index.d.ts.map +0 -1
- package/dist/components/FilterSelector/index.js +0 -4
- package/dist/components/FilterSelector/index.js.map +0 -1
- package/dist/components/GeneralBar/GeneralBar.d.ts +0 -26
- package/dist/components/GeneralBar/GeneralBar.d.ts.map +0 -1
- package/dist/components/GeneralBar/GeneralBar.js +0 -63
- package/dist/components/GeneralBar/GeneralBar.js.map +0 -1
- package/dist/components/GeneralBar/GeneralBar.style.d.ts +0 -3
- package/dist/components/GeneralBar/GeneralBar.style.d.ts.map +0 -1
- package/dist/components/GeneralBar/GeneralBar.style.js +0 -20
- package/dist/components/GeneralBar/GeneralBar.style.js.map +0 -1
- package/dist/components/GeneralBar/index.d.ts +0 -3
- package/dist/components/GeneralBar/index.d.ts.map +0 -1
- package/dist/components/GeneralBar/index.js +0 -3
- package/dist/components/GeneralBar/index.js.map +0 -1
- package/dist/components/HorizontalBar/HorizontalBar.d.ts +0 -10
- package/dist/components/HorizontalBar/HorizontalBar.d.ts.map +0 -1
- package/dist/components/HorizontalBar/HorizontalBar.js +0 -23
- package/dist/components/HorizontalBar/HorizontalBar.js.map +0 -1
- package/dist/components/HorizontalBar/index.d.ts +0 -3
- package/dist/components/HorizontalBar/index.d.ts.map +0 -1
- package/dist/components/HorizontalBar/index.js +0 -3
- package/dist/components/HorizontalBar/index.js.map +0 -1
- package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.d.ts +0 -17
- package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.d.ts.map +0 -1
- package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.js +0 -28
- package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.js.map +0 -1
- package/dist/components/HorizontalFilterPanel/index.d.ts +0 -3
- package/dist/components/HorizontalFilterPanel/index.d.ts.map +0 -1
- package/dist/components/HorizontalFilterPanel/index.js +0 -3
- package/dist/components/HorizontalFilterPanel/index.js.map +0 -1
- package/dist/components/Icon/index.d.ts +0 -11
- package/dist/components/Icon/index.d.ts.map +0 -1
- package/dist/components/Icon/index.js +0 -16
- package/dist/components/Icon/index.js.map +0 -1
- package/dist/components/RadioFilter/RadioFilter.d.ts +0 -17
- package/dist/components/RadioFilter/RadioFilter.d.ts.map +0 -1
- package/dist/components/RadioFilter/RadioFilter.js +0 -51
- package/dist/components/RadioFilter/RadioFilter.js.map +0 -1
- package/dist/components/RadioFilter/RadioFilter.style.d.ts +0 -3
- package/dist/components/RadioFilter/RadioFilter.style.d.ts.map +0 -1
- package/dist/components/RadioFilter/RadioFilter.style.js +0 -38
- package/dist/components/RadioFilter/RadioFilter.style.js.map +0 -1
- package/dist/components/RadioFilter/index.d.ts +0 -3
- package/dist/components/RadioFilter/index.d.ts.map +0 -1
- package/dist/components/RadioFilter/index.js +0 -3
- package/dist/components/RadioFilter/index.js.map +0 -1
- package/dist/epic/StatefulObserver.d.ts +0 -8
- package/dist/epic/StatefulObserver.d.ts.map +0 -1
- package/dist/epic/StatefulObserver.js +0 -26
- package/dist/epic/StatefulObserver.js.map +0 -1
- package/dist/epic/epic.d.ts +0 -14
- package/dist/epic/epic.d.ts.map +0 -1
- package/dist/epic/epic.js +0 -2
- package/dist/epic/epic.js.map +0 -1
- package/dist/epic/hooks/useObservableSelector.d.ts +0 -14
- package/dist/epic/hooks/useObservableSelector.d.ts.map +0 -1
- package/dist/epic/hooks/useObservableSelector.js +0 -16
- package/dist/epic/hooks/useObservableSelector.js.map +0 -1
- package/dist/epic/hooks/useObservableState.d.ts +0 -13
- package/dist/epic/hooks/useObservableState.d.ts.map +0 -1
- package/dist/epic/hooks/useObservableState.js +0 -18
- package/dist/epic/hooks/useObservableState.js.map +0 -1
- package/dist/epic/hooks/useSelector.d.ts +0 -10
- package/dist/epic/hooks/useSelector.d.ts.map +0 -1
- package/dist/epic/hooks/useSelector.js +0 -14
- package/dist/epic/hooks/useSelector.js.map +0 -1
- package/dist/epic/reducer.d.ts +0 -56
- package/dist/epic/reducer.d.ts.map +0 -1
- package/dist/epic/reducer.js +0 -78
- package/dist/epic/reducer.js.map +0 -1
- package/dist/filterStore/actions.d.ts +0 -23
- package/dist/filterStore/actions.d.ts.map +0 -1
- package/dist/filterStore/actions.js +0 -18
- package/dist/filterStore/actions.js.map +0 -1
- package/dist/filterStore/epics.d.ts +0 -10
- package/dist/filterStore/epics.d.ts.map +0 -1
- package/dist/filterStore/epics.js +0 -10
- package/dist/filterStore/epics.js.map +0 -1
- package/dist/filterStore/reducers.d.ts +0 -4
- package/dist/filterStore/reducers.d.ts.map +0 -1
- package/dist/filterStore/reducers.js +0 -43
- package/dist/filterStore/reducers.js.map +0 -1
- package/dist/filterStore/store.d.ts +0 -106
- package/dist/filterStore/store.d.ts.map +0 -1
- package/dist/filterStore/store.js +0 -158
- package/dist/filterStore/store.js.map +0 -1
- package/dist/hooks/useEventListener.d.ts +0 -4
- package/dist/hooks/useEventListener.d.ts.map +0 -1
- package/dist/hooks/useEventListener.js +0 -14
- package/dist/hooks/useEventListener.js.map +0 -1
- package/dist/hooks/useFilterChangeHandler.d.ts +0 -26
- package/dist/hooks/useFilterChangeHandler.d.ts.map +0 -1
- package/dist/hooks/useFilterChangeHandler.js +0 -43
- package/dist/hooks/useFilterChangeHandler.js.map +0 -1
- package/dist/hooks/useFilterContext.d.ts +0 -4
- package/dist/hooks/useFilterContext.d.ts.map +0 -1
- package/dist/hooks/useFilterContext.js +0 -5
- package/dist/hooks/useFilterContext.js.map +0 -1
- package/dist/hooks/useFilterOptionsBuilder.d.ts +0 -27
- package/dist/hooks/useFilterOptionsBuilder.d.ts.map +0 -1
- package/dist/hooks/useFilterOptionsBuilder.js +0 -39
- package/dist/hooks/useFilterOptionsBuilder.js.map +0 -1
- package/dist/hooks/useFilterOptionsCounter.d.ts +0 -16
- package/dist/hooks/useFilterOptionsCounter.d.ts.map +0 -1
- package/dist/hooks/useFilterOptionsCounter.js +0 -32
- package/dist/hooks/useFilterOptionsCounter.js.map +0 -1
- package/dist/hooks/useFilterStore.d.ts +0 -25
- package/dist/hooks/useFilterStore.d.ts.map +0 -1
- package/dist/hooks/useFilterStore.js +0 -34
- package/dist/hooks/useFilterStore.js.map +0 -1
- package/dist/hooks/useResizablePanel.d.ts +0 -20
- package/dist/hooks/useResizablePanel.d.ts.map +0 -1
- package/dist/hooks/useResizablePanel.js +0 -71
- package/dist/hooks/useResizablePanel.js.map +0 -1
- package/dist/types/Filter.d.ts.map +0 -1
- package/dist/types/Filter.js +0 -2
- package/dist/types/Filter.js.map +0 -1
- package/dist/types/FilterContainerProps.d.ts +0 -10
- package/dist/types/FilterContainerProps.d.ts.map +0 -1
- package/dist/types/FilterContainerProps.js +0 -2
- package/dist/types/FilterContainerProps.js.map +0 -1
- package/dist/types/FilterCounters.d.ts +0 -3
- package/dist/types/FilterCounters.d.ts.map +0 -1
- package/dist/types/FilterCounters.js +0 -2
- package/dist/types/FilterCounters.js.map +0 -1
- package/dist/types/FilterOption.d.ts +0 -13
- package/dist/types/FilterOption.d.ts.map +0 -1
- package/dist/types/FilterOption.js +0 -2
- package/dist/types/FilterOption.js.map +0 -1
- package/dist/types/FilterStoreState.d.ts +0 -6
- package/dist/types/FilterStoreState.d.ts.map +0 -1
- package/dist/types/FilterStoreState.js +0 -2
- package/dist/types/FilterStoreState.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FilterOption } from './types';
|
|
2
|
+
export declare const createOptionReducer: (initial: Record<string, FilterOption>) => import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
3
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
4
|
+
handleAction: <TActionCreator extends (...args: any[]) => never, THandledAction extends ReturnType<TActionCreator>, TOutputAction extends never>(singleOrMultipleCreatorsAndTypes: TActionCreator | TActionCreator[], reducer: (state: Record<string, FilterOption>, action: THandledAction) => Record<string, FilterOption>) => [TOutputAction] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
5
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
6
|
+
handleAction: <TActionCreator_1 extends (...args: any[]) => TOutputAction, THandledAction_1 extends ReturnType<TActionCreator_1>, TOutputAction_1 extends Exclude<TOutputAction, THandledAction_1>>(singleOrMultipleCreatorsAndTypes: TActionCreator_1 | TActionCreator_1[], reducer: (state: Record<string, FilterOption>, action: THandledAction_1) => Record<string, FilterOption>) => [TOutputAction_1] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
7
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_1>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
8
|
+
handleAction: <TActionCreator_2 extends (...args: any[]) => TOutputAction_1, THandledAction_2 extends ReturnType<TActionCreator_2>, TOutputAction_2 extends Exclude<TOutputAction_1, THandledAction_2>>(singleOrMultipleCreatorsAndTypes: TActionCreator_2 | TActionCreator_2[], reducer: (state: Record<string, FilterOption>, action: THandledAction_2) => Record<string, FilterOption>) => [TOutputAction_2] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
9
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_2>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
10
|
+
handleAction: <TActionCreator_3 extends (...args: any[]) => TOutputAction_2, THandledAction_3 extends ReturnType<TActionCreator_3>, TOutputAction_3 extends Exclude<TOutputAction_2, THandledAction_3>>(singleOrMultipleCreatorsAndTypes: TActionCreator_3 | TActionCreator_3[], reducer: (state: Record<string, FilterOption>, action: THandledAction_3) => Record<string, FilterOption>) => [TOutputAction_3] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
11
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_3>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
12
|
+
handleAction: <TActionCreator_4 extends (...args: any[]) => TOutputAction_3, THandledAction_4 extends ReturnType<TActionCreator_4>, TOutputAction_4 extends Exclude<TOutputAction_3, THandledAction_4>>(singleOrMultipleCreatorsAndTypes: TActionCreator_4 | TActionCreator_4[], reducer: (state: Record<string, FilterOption>, action: THandledAction_4) => Record<string, FilterOption>) => [TOutputAction_4] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
13
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_4>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
14
|
+
handleAction: <TActionCreator_5 extends (...args: any[]) => TOutputAction_4, THandledAction_5 extends ReturnType<TActionCreator_5>, TOutputAction_5 extends Exclude<TOutputAction_4, THandledAction_5>>(singleOrMultipleCreatorsAndTypes: TActionCreator_5 | TActionCreator_5[], reducer: (state: Record<string, FilterOption>, action: THandledAction_5) => Record<string, FilterOption>) => [TOutputAction_5] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
15
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_5>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
16
|
+
handleAction: <TActionCreator_6 extends (...args: any[]) => TOutputAction_5, THandledAction_6 extends ReturnType<TActionCreator_6>, TOutputAction_6 extends Exclude<TOutputAction_5, THandledAction_6>>(singleOrMultipleCreatorsAndTypes: TActionCreator_6 | TActionCreator_6[], reducer: (state: Record<string, FilterOption>, action: THandledAction_6) => Record<string, FilterOption>) => [TOutputAction_6] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
17
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_6>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
18
|
+
handleAction: <TActionCreator_7 extends (...args: any[]) => TOutputAction_6, THandledAction_7 extends ReturnType<TActionCreator_7>, TOutputAction_7 extends Exclude<TOutputAction_6, THandledAction_7>>(singleOrMultipleCreatorsAndTypes: TActionCreator_7 | TActionCreator_7[], reducer: (state: Record<string, FilterOption>, action: THandledAction_7) => Record<string, FilterOption>) => [TOutputAction_7] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
19
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_7>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
20
|
+
handleAction: <TActionCreator_8 extends (...args: any[]) => TOutputAction_7, THandledAction_8 extends ReturnType<TActionCreator_8>, TOutputAction_8 extends Exclude<TOutputAction_7, THandledAction_8>>(singleOrMultipleCreatorsAndTypes: TActionCreator_8 | TActionCreator_8[], reducer: (state: Record<string, FilterOption>, action: THandledAction_8) => Record<string, FilterOption>) => [TOutputAction_8] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
21
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_8>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
22
|
+
handleAction: <TActionCreator_9 extends (...args: any[]) => TOutputAction_8, THandledAction_9 extends ReturnType<TActionCreator_9>, TOutputAction_9 extends Exclude<TOutputAction_8, THandledAction_9>>(singleOrMultipleCreatorsAndTypes: TActionCreator_9 | TActionCreator_9[], reducer: (state: Record<string, FilterOption>, action: THandledAction_9) => Record<string, FilterOption>) => [TOutputAction_9] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
23
|
+
handlers: Record<Exclude<import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>, TOutputAction_9>["type"], (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
24
|
+
handleAction: <TActionCreator_10 extends (...args: any[]) => TOutputAction_9, THandledAction_10 extends ReturnType<TActionCreator_10>, TOutputAction_10 extends Exclude<TOutputAction_9, THandledAction_10>>(singleOrMultipleCreatorsAndTypes: TActionCreator_10 | TActionCreator_10[], reducer: (state: Record<string, FilterOption>, action: THandledAction_10) => Record<string, FilterOption>) => [TOutputAction_10] extends [import("typesafe-actions").Action<string>] ? import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & any : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
25
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
26
|
+
};
|
|
27
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
28
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
29
|
+
};
|
|
30
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
31
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
32
|
+
};
|
|
33
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
34
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
35
|
+
};
|
|
36
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
37
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
38
|
+
};
|
|
39
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
40
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
41
|
+
};
|
|
42
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
43
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
44
|
+
};
|
|
45
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
46
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
47
|
+
};
|
|
48
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
49
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
50
|
+
};
|
|
51
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
52
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
53
|
+
};
|
|
54
|
+
} : import("typesafe-actions").Reducer<Record<string, FilterOption>, import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>> & {
|
|
55
|
+
handlers: Record<"@FILTER_OPTIONS/SELECTION_SET", (state: Record<string, FilterOption>, action: import("typesafe-actions").PayloadAction<"@FILTER_OPTIONS/SELECTION_SET", Record<string, FilterOption>>) => Record<string, FilterOption>>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/options/reducer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,mBAAmB,YAAa,OAAO,MAAM,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAC6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/options/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAW,OAAO,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAqC,EAAE,EAAE,CAC3E,aAAa,CAAwC,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FilterOption } from '../types';
|
|
2
|
+
export declare const filterOptionMatch: <TOption extends FilterOption>(query: string) => (key: string, value: TOption) => {
|
|
3
|
+
hide: boolean;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default filterOptionMatch;
|
|
7
|
+
//# sourceMappingURL=filter-option-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-option-match.d.ts","sourceRoot":"","sources":["../../../src/options/search/filter-option-match.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,iBAAiB,wCAAyC,MAAM,WAE9D,MAAM;UAA2B,OAAO;aAAW,OAAO;CAKxE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const filterOptionMatch = (query) => {
|
|
2
|
+
const pattern = new RegExp(query, 'i');
|
|
3
|
+
return (key, value) => {
|
|
4
|
+
const hide = !(value.label || key).match(pattern);
|
|
5
|
+
const changed = hide !== value.hide;
|
|
6
|
+
return { hide, changed };
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default filterOptionMatch;
|
|
10
|
+
//# sourceMappingURL=filter-option-match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-option-match.js","sourceRoot":"","sources":["../../../src/options/search/filter-option-match.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAA+B,KAAa,EAAE,EAAE;IAC/E,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACvC,OAAO,CAAC,GAAW,EAAE,KAAc,EAAuC,EAAE;QAC1E,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC;QACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterOption } from '../types';
|
|
2
|
+
import { FilterOptionMatchFn } from './types';
|
|
3
|
+
export declare const filterOptionSearch: <TOption extends FilterOption>(matcher: FilterOptionMatchFn<TOption, {
|
|
4
|
+
hide: boolean;
|
|
5
|
+
changed: boolean;
|
|
6
|
+
}>) => (options: Record<string, FilterOption>, query: string) => Record<string, TOption>;
|
|
7
|
+
export default filterOptionSearch;
|
|
8
|
+
//# sourceMappingURL=filter-option-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-option-search.d.ts","sourceRoot":"","sources":["../../../src/options/search/filter-option-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,kBAAkB;;;iBAEnB,OAAO,MAAM,EAAE,YAAY,CAAC,SAAS,MAAM,4BAUpD,CAAC;AAEJ,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const filterOptionSearch = (matcher) => (options, query) => {
|
|
2
|
+
const match = matcher(query);
|
|
3
|
+
let hasChanged = false;
|
|
4
|
+
const res = Object.entries(options).reduce((acc, [key, value]) => {
|
|
5
|
+
const { hide, changed } = match(key, value);
|
|
6
|
+
!hasChanged && changed && (hasChanged = true);
|
|
7
|
+
return Object.assign(acc, { [key]: { ...value, hide } });
|
|
8
|
+
}, {});
|
|
9
|
+
return (hasChanged ? res : options);
|
|
10
|
+
};
|
|
11
|
+
export default filterOptionSearch;
|
|
12
|
+
//# sourceMappingURL=filter-option-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-option-search.js","sourceRoot":"","sources":["../../../src/options/search/filter-option-search.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,kBAAkB,GAC7B,CAA+B,OAAqC,EAAE,EAAE,CACxE,CAAC,OAAqC,EAAE,KAAa,EAA2B,EAAE;IAChF,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC/D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,KAAgB,CAAC,CAAC;QACvD,CAAC,UAAU,IAAI,OAAO,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAA4B,CAAC;AACjE,CAAC,CAAC;AAEJ,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/options/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/options/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FilterOption } from '../types';
|
|
2
|
+
export declare type FilterOptionSearchFn<TOptions extends Record<string, FilterOption>> = (options: TOptions, query: string) => Record<string, TOptions>;
|
|
3
|
+
export declare type FilterOptionMatchFn<TOption extends FilterOption, TResult extends {
|
|
4
|
+
changed: boolean;
|
|
5
|
+
} = {
|
|
6
|
+
hide: boolean;
|
|
7
|
+
changed: boolean;
|
|
8
|
+
}> = (query: string) => (key: string, value: TOption) => TResult;
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/options/search/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,oBAAY,oBAAoB,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,CAChF,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,MAAM,KACV,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE9B,oBAAY,mBAAmB,CAC7B,OAAO,SAAS,YAAY,EAC5B,OAAO,SAAS;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,IACxE,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/options/search/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { FilterOption } from '../types';
|
|
3
|
+
import { FilterOptionMatchFn, FilterOptionSearchFn } from './types';
|
|
4
|
+
export declare const useFilterOptionSearch: <TOption extends FilterOption>(searchFn?: FilterOptionSearchFn<Record<string, FilterOption>> | undefined, matchFn?: FilterOptionMatchFn<TOption, {
|
|
5
|
+
hide: boolean;
|
|
6
|
+
changed: boolean;
|
|
7
|
+
}> | undefined) => {
|
|
8
|
+
setQuery: (query: string) => void;
|
|
9
|
+
query$: Observable<string>;
|
|
10
|
+
};
|
|
11
|
+
export default useFilterOptionSearch;
|
|
12
|
+
//# sourceMappingURL=useFilterOptionSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterOptionSearch.d.ts","sourceRoot":"","sources":["../../../src/options/search/useFilterOptionSearch.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,UAAU,EAAe,MAAM,MAAM,CAAC;AAM9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;;;sBAId,MAAM,KAAK,IAAI;YACzB,WAAW,MAAM,CAAC;CA4B3B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { combineLatest, of, Subject } from 'rxjs';
|
|
3
|
+
import { switchMap, map } from 'rxjs/operators';
|
|
4
|
+
import { actions } from '../actions';
|
|
5
|
+
import { useFilterOptionContext } from '../context';
|
|
6
|
+
import filterOptionMatchFn from './filter-option-match';
|
|
7
|
+
import filterOptionSearchFn from './filter-option-search';
|
|
8
|
+
export const useFilterOptionSearch = (searchFn, matchFn) => {
|
|
9
|
+
const { options$ } = useFilterOptionContext();
|
|
10
|
+
const [query$] = useState(new Subject());
|
|
11
|
+
const setQuery = useCallback((q) => {
|
|
12
|
+
query$.next(q);
|
|
13
|
+
}, [query$]);
|
|
14
|
+
const search = useMemo(() => {
|
|
15
|
+
return searchFn || filterOptionSearchFn(matchFn || filterOptionMatchFn);
|
|
16
|
+
}, [matchFn, searchFn]);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const sub = combineLatest([options$, query$])
|
|
19
|
+
.pipe(switchMap(([options, query]) => {
|
|
20
|
+
return of(search(options, query));
|
|
21
|
+
}), map((x) => actions.set(x)))
|
|
22
|
+
.subscribe(options$);
|
|
23
|
+
return () => sub.unsubscribe();
|
|
24
|
+
}, [options$, query$, search]);
|
|
25
|
+
return { setQuery, query$ };
|
|
26
|
+
};
|
|
27
|
+
export default useFilterOptionSearch;
|
|
28
|
+
//# sourceMappingURL=useFilterOptionSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterOptionSearch.js","sourceRoot":"","sources":["../../../src/options/search/useFilterOptionSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,aAAa,EAAc,EAAE,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAIpD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAG1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,QAA6D,EAC7D,OAAsC,EAItC,EAAE;IACF,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,EAAgC,CAAC;IAC5E,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAkB,IAAI,OAAO,EAAE,CAAC,CAAC;IAC1D,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,CAAS,EAAE,EAAE;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,OAAO,QAAQ,IAAI,oBAAoB,CAAC,OAAO,IAAI,mBAAmB,CAAC,CAAC;IAC1E,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,GAAG,GAAG,aAAa,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;aAC1C,IAAI,CACH,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7B,OAAO,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,EACF,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B;aACA,SAAS,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Observable, ReactiveSubject } from '@equinor/fusion-react-observable';
|
|
2
|
+
import { Actions } from './actions';
|
|
3
|
+
export declare type FilterOption = {
|
|
4
|
+
label?: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
totalCount?: number;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
inactive?: boolean;
|
|
10
|
+
excluded?: boolean;
|
|
11
|
+
hide?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare type FilterOptionContext<TOption extends FilterOption, TValue = string> = {
|
|
14
|
+
options$: ReactiveSubject<Record<string, TOption>, Actions>;
|
|
15
|
+
selection$: Observable<Set<TValue>>;
|
|
16
|
+
setSelection: (selection?: Set<TValue>) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare type FilterOptionSelector<TData extends Record<string, any>> = (data: TData) => {
|
|
19
|
+
key: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type FilterOptionBuilder<TData, TOption extends FilterOption, TValue = string> = (source: TData[], selection: Set<TValue>, data: TData[]) => Record<string, TOption>;
|
|
24
|
+
export declare type FilterOptionType<T extends unknown> = T extends (a: infer TData, b: infer TSelection) => infer C ? {
|
|
25
|
+
data: TData;
|
|
26
|
+
selection: TSelection;
|
|
27
|
+
options: C;
|
|
28
|
+
} : never;
|
|
29
|
+
export declare type FilterOptionDataType<T extends unknown> = FilterOptionType<T>['data'];
|
|
30
|
+
export declare type FilterOptionsType<T extends unknown> = FilterOptionType<T>['options'];
|
|
31
|
+
export declare type FilterOptionSelectionType<T extends unknown> = FilterOptionType<T>['selection'];
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/options/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB,CAAC,OAAO,SAAS,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI;IAC/E,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IAC5D,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,oBAAY,oBAAoB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,mBAAmB,CAAC,KAAK,EAAE,OAAO,SAAS,YAAY,EAAE,MAAM,GAAG,MAAM,IAAI,CACtF,MAAM,EAAE,KAAK,EAAE,EACf,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EACtB,IAAI,EAAE,KAAK,EAAE,KACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7B,oBAAY,gBAAgB,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,KAAK,EAAE,CAAC,EAAE,MAAM,UAAU,KAAK,MAAM,CAAC,GACxG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAClD,KAAK,CAAC;AAEV,oBAAY,oBAAoB,CAAC,CAAC,SAAS,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAClF,oBAAY,iBAAiB,CAAC,CAAC,SAAS,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAClF,oBAAY,yBAAyB,CAAC,CAAC,SAAS,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/options/types.ts"],"names":[],"mappings":""}
|