@webshopmanager/partslogic-ui 1.7.8 → 2.0.10

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.
Files changed (40) hide show
  1. package/README.md +11 -9
  2. package/build/index.css +1 -1
  3. package/build/index.esm.js +4 -4
  4. package/build/index.esm.js.map +1 -1
  5. package/build/index.js +3 -3
  6. package/build/index.js.map +1 -1
  7. package/build/index.umd.js +3 -3
  8. package/build/index.umd.js.map +1 -1
  9. package/build/typings/common/ProductListItem/ProductListItem.d.ts +1 -1
  10. package/build/typings/common/ProductListItem/models.d.ts +3 -0
  11. package/build/typings/components/CategoryCarousel/CategoryCarousel.d.ts +2 -0
  12. package/build/typings/components/FacetFilter/FacetFilter.d.ts +1 -1
  13. package/build/typings/components/FacetFilter/models.d.ts +5 -0
  14. package/build/typings/components/FitmentSelectorVerifier/FitmentSelectorVerifier.d.ts +1 -1
  15. package/build/typings/components/FitmentSelectorVerifier/models.d.ts +4 -0
  16. package/build/typings/components/ListControls/models.d.ts +6 -0
  17. package/build/typings/components/PartslogicFitmentSelectorWrapper/ParslogicFitmentSelectorWrapper.d.ts +3 -1
  18. package/build/typings/components/PartslogicProductListWrapper/PartslogicProductListWrapper.d.ts +1 -1
  19. package/build/typings/components/PartslogicSearchBarWithWrapperModal/PartslogicSearchBarWithWrapperModal.d.ts +1 -1
  20. package/build/typings/components/PartslogicSearchPage/index.d.ts +24 -1
  21. package/build/typings/components/ProductList/ProductList.d.ts +1 -1
  22. package/build/typings/components/ProductList/models.d.ts +17 -0
  23. package/build/typings/components/ProductListWrapper/ProductListWrapper.d.ts +1 -1
  24. package/build/typings/components/ProductListWrapper/models.d.ts +2 -0
  25. package/build/typings/components/ResultsPage/index.d.ts +21 -2
  26. package/build/typings/components/SearchBar/SearchBar.d.ts +3 -1
  27. package/build/typings/components/SearchBar/models.d.ts +8 -0
  28. package/build/typings/components/StoredFitmentLoader/LoggedIn.d.ts +4 -0
  29. package/build/typings/components/StoredFitmentLoader/LoggedOut.d.ts +4 -0
  30. package/build/typings/components/StoredFitmentLoader/StoredFitmentLoader.d.ts +10 -0
  31. package/build/typings/components/StoredFitmentLoader/index.d.ts +1 -0
  32. package/build/typings/components/StoredFitmentLoader/utils.d.ts +4 -0
  33. package/build/typings/icons/CrossIcon.d.ts +2 -1
  34. package/build/typings/index.d.ts +2 -0
  35. package/build/typings/models/search.d.ts +9 -1
  36. package/build/typings/utils/constants.d.ts +4 -0
  37. package/build/typings/utils/fitmentUtils.d.ts +3 -0
  38. package/build/typings/utils/queryUtils.d.ts +3 -1
  39. package/build/typings/utils/wsmVisibleFieldsBuilder.d.ts +1 -1
  40. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { ProductListItemProps } from './models';
3
3
  export declare const DEFAULT_VISIBLE_FIELDS: ProductListItemProps['visibleFields'];
4
- declare const ProductListItem: ({ data, styled, visibleFields, className, orientation, noImageUrl, linkEl, showBadge, onItemClick, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, }: ProductListItemProps) => React.JSX.Element;
4
+ declare const ProductListItem: ({ data, styled, visibleFields, className, orientation, noImageUrl, linkEl, showBadge, onItemClick, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, addNewCenterProductField, addNewRightProductField, }: ProductListItemProps) => React.JSX.Element;
5
5
  export default ProductListItem;
@@ -22,4 +22,7 @@ export interface ProductListItemProps extends Pick<ListProps<Product>, 'onItemCl
22
22
  * When enableAddToCartButton is set to "true", if the function returns "true", the cart button will be displayed.
23
23
  */
24
24
  validateShowAddToCartButton?: (product: Product) => boolean;
25
+ /** Hook to add extra custom fields to product card center or right section */
26
+ addNewCenterProductField?: (data: Product) => JSX.Element;
27
+ addNewRightProductField?: (data: Product) => JSX.Element;
25
28
  }
@@ -1,4 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { CategoryCarouselProps } from './models';
3
+ import 'slick-carousel/slick/slick.css';
4
+ import 'slick-carousel/slick/slick-theme.css';
3
5
  declare const CategoryCarousel: ({ className, list, responsive, size, linkEl, onItemClick, }: CategoryCarouselProps) => React.JSX.Element;
4
6
  export default CategoryCarousel;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { FacetFilterProps } from './models';
3
3
  import '../../styles/h1Parity.scss';
4
- declare const FacetFilter: ({ data, className, styled, onChange, showClearAll, enableCollapse, listLimit, selectedValues: initialSelectedValues, title, renderNoResults, isSingleSelect, }: FacetFilterProps) => JSX.Element;
4
+ declare const FacetFilter: ({ data, className, styled, onChange, showClearAll, enableCollapse, listLimit, selectedValues: initialSelectedValues, title, renderNoResults, isSingleSelect, initialCollapsedSections, initFacetLabelsData, }: FacetFilterProps) => JSX.Element;
5
5
  export default FacetFilter;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { FacetFiltersData, FacetFiltersDataType, FacetFiltersValues } from '../../models/search';
3
+ import { FacetLabelData } from '../ProductList/models';
3
4
  export interface FacetFilterValues {
4
5
  [key: string]: Array<string | number> | null;
5
6
  }
@@ -62,6 +63,10 @@ export interface FacetFilterProps {
62
63
  * Render props component function to render any component when there is no data for this filter.
63
64
  */
64
65
  renderNoResults?: () => JSX.Element;
66
+ /** Collapse/Expand facet's section container */
67
+ initialCollapsedSections?: boolean;
68
+ /** Facets title and values update data structure */
69
+ initFacetLabelsData?: FacetLabelData[];
65
70
  }
66
71
  export interface FacetSectionProps extends Pick<FacetFilterProps, 'isSingleSelect'> {
67
72
  onChange: (value: string | number) => void;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { FitmentSelectorVerifierProps } from './models';
3
- declare const FitmentSelectorVerifier: ({ selectedValues, showMoreText, onShowMoreBtnClick, title, alertSuccessTitle, alertErrorTitle, alertButtonText, alertButtonAqNotSetText, alertErrorAqNotSetTitle, onDoesntFit, onSuccess, doesntFitButtonText, alertFill, showAlertIcon, productId, sku, onDataLoaded, qualifiersStatus, optionalLabelsTitle, includeSkus, ...fitmentWrapperProps }: FitmentSelectorVerifierProps) => React.JSX.Element;
3
+ declare const FitmentSelectorVerifier: ({ selectedValues, showMoreText, onShowMoreBtnClick, title, alertSuccessTitle, alertErrorTitle, alertButtonText, alertButtonAqNotSetText, alertErrorAqNotSetTitle, onDoesntFit, onSuccess, doesntFitButtonText, alertFill, showAlertIcon, productId, sku, onDataLoaded, qualifiersStatus, optionalLabelsTitle, includeSkus, alwaysShowVerifier, ...fitmentWrapperProps }: FitmentSelectorVerifierProps) => React.JSX.Element;
4
4
  export default FitmentSelectorVerifier;
5
5
  export declare function getFitmentQueryStr(fitment: string): string;
@@ -88,6 +88,10 @@ export interface FitmentSelectorVerifierProps extends FitmentSelectorWrapperProp
88
88
  * For for fetching individual skus for a given productId
89
89
  */
90
90
  includeSkus?: boolean;
91
+ /**
92
+ * This will enforce showing the verifier regardless if it's universal or fitment-specific
93
+ */
94
+ alwaysShowVerifier?: boolean;
91
95
  /**
92
96
  * This callback compliments the doesntFiButtonText prop, used as custom action
93
97
  * when the button is clicked, i.e. redirect to an external page or search API
@@ -28,6 +28,12 @@ export interface ListControlsProps {
28
28
  * If you are using our API, please confirm what fields are supported for sorting.
29
29
  */
30
30
  sortOptions?: SortOption[];
31
+ /**
32
+ * List of extra options to sort the list that will be concatenated to the default ones
33
+ *
34
+ * If you are using our API, please confirm what fields are supported for sorting.
35
+ */
36
+ extraSortOptions?: SortOption[];
31
37
  /**
32
38
  * The current selected sort. Should be the value of the SortOption
33
39
  */
@@ -1,8 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { SelectedValues } from '../FitmentSelector/models';
2
3
  import { FitmentSelectorWrapperProps } from '../FitmentSelectorWrapper/models';
3
4
  interface PartslogicProductListWrapperProps extends Omit<FitmentSelectorWrapperProps, 'onSubmit'> {
4
5
  onSubmit: (fitment: string, opts: any) => void;
6
+ selectedVinFitment: SelectedValues;
5
7
  }
6
- declare const ParslogicFitmentSelectorWrapper: ({ autocommitDelay, className, clearButtonText, filter, orientation, searchButtonText, selectedValues: initailSelectedValues, styled, onSubmit, onDataLoaded, ...props }: PartslogicProductListWrapperProps) => React.JSX.Element;
8
+ declare const ParslogicFitmentSelectorWrapper: ({ autocommitDelay, className, clearButtonText, filter, orientation, searchButtonText, selectedValues: initailSelectedValues, styled, selectedVinFitment, onSubmit, onDataLoaded, ...props }: PartslogicProductListWrapperProps) => React.JSX.Element;
7
9
  export default ParslogicFitmentSelectorWrapper;
8
10
  export declare function getSelectedFitment(fitmentLabels: any, initialSelectedFitment: any): any;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { ProductListWrapperProps } from '../ProductListWrapper/models';
3
- declare const PartslogicProductListWrapper: ({ itemsPerPage, currentPage, onDataReceived, ...props }: Omit<ProductListWrapperProps, 'visibleFields' | 'renderList'>) => React.JSX.Element;
3
+ declare const PartslogicProductListWrapper: ({ itemsPerPage, currentPage, onDataReceived, extraSortOptions, ...props }: Omit<ProductListWrapperProps, 'visibleFields' | 'renderList'>) => React.JSX.Element;
4
4
  export default PartslogicProductListWrapper;
@@ -4,7 +4,7 @@ interface PartslogicSearchBarWithWrapperModalProps {
4
4
  onSubmit?: (value: string) => void;
5
5
  defaultQueryParams?: GenericObject;
6
6
  placeholder?: string;
7
- enableConversation: boolean;
7
+ enableConversation?: boolean;
8
8
  /** If set to true, the items will display the discount percentage badge */
9
9
  showBadge?: boolean;
10
10
  }
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  import '../../styles/global.scss';
3
3
  import { FitmentSelectorWrapperProps } from '../FitmentSelectorWrapper/models';
4
4
  import { Product } from '../../models/search';
5
+ import { FacetLabelData, SortOption } from '../ProductList/models';
6
+ import { Orientation } from '../../models/generic';
5
7
  export declare const SHOW_FITMENT_MODAL = "show-fitment-modal";
6
8
  export type SelectedFitmentValues = Array<{
7
9
  key: string;
@@ -25,6 +27,27 @@ interface SearchPageProps {
25
27
  validateShowAddToCartButton?: (product: Product) => boolean;
26
28
  /** Optional facet list limit */
27
29
  facetListLimit?: number;
30
+ /** Facets title and values update data structure */
31
+ initFacetLabelsData?: FacetLabelData[];
32
+ /**
33
+ * List of extra options to sort the list that will be concatenated to the default ones
34
+ *
35
+ * If you are using our API, please confirm what fields are supported for sorting.
36
+ */
37
+ extraSortOptions?: SortOption[];
38
+ /** Enable scroll to top automatically after update. Default value: true */
39
+ autoScrollToTop?: boolean;
40
+ /**
41
+ * The group orientation (layout flow direction).
42
+ */
43
+ orientation?: Orientation;
44
+ /** Optional initial sort option */
45
+ initialSortOption?: string;
46
+ /** Hook to add extra custom fields to product card center or right section */
47
+ addNewCenterProductField?: (data: Product) => JSX.Element;
48
+ addNewRightProductField?: (data: Product) => JSX.Element;
49
+ /** Collapse/Expand facet's section container */
50
+ initialCollapsedSections?: boolean;
28
51
  }
29
- declare const SearchPage: ({ groupId, fitmentRuleId, showBadge, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, facetListLimit, }: SearchPageProps) => React.JSX.Element;
52
+ declare const SearchPage: ({ groupId, fitmentRuleId, showBadge, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, facetListLimit, extraSortOptions, autoScrollToTop, orientation, initialSortOption, addNewCenterProductField, addNewRightProductField, initialCollapsedSections, initFacetLabelsData, }: SearchPageProps) => React.JSX.Element;
30
53
  export default SearchPage;
@@ -4,5 +4,5 @@ export declare const DEFAULT_SORT_OPTIONS: {
4
4
  label: string;
5
5
  value: string;
6
6
  }[];
7
- declare const ProductList: ({ list, totalPages, currentPage, onPageChanged, className, styled, orientation, showPagination, showLoadingIndicator, visibleFields, renderList, renderNoResults, isLoading, noImageUrl, linkEl, showControls, itemsPerPage, onItemsPerPageChange, onLayoutChange, onItemClick, onSortChange, sortOptions, selectedSort, producListMetaData, showBadge, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, }: ProductListProps) => React.JSX.Element;
7
+ declare const ProductList: ({ list, totalPages, currentPage, onPageChanged, className, styled, orientation, showPagination, showLoadingIndicator, visibleFields, renderList, renderNoResults, isLoading, noImageUrl, linkEl, showControls, itemsPerPage, onItemsPerPageChange, onLayoutChange, onItemClick, onSortChange, sortOptions, extraSortOptions, selectedSort, producListMetaData, showBadge, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, }: ProductListProps) => React.JSX.Element;
8
8
  export default ProductList;
@@ -47,6 +47,23 @@ export interface ProductListProps extends Omit<ListProps<Product>, 'children'> {
47
47
  * When enableAddToCartButton is set to "true", if the function returns "true", the cart button will be displayed.
48
48
  */
49
49
  validateShowAddToCartButton?: (product: Product) => boolean;
50
+ /** Hook to add extra custom fields to product card center or right section */
51
+ addNewCenterProductField?: (data: Product) => JSX.Element;
52
+ addNewRightProductField?: (data: Product) => JSX.Element;
53
+ }
54
+ export interface FacetLabelData {
55
+ /**
56
+ * The unique value to identify the key type.
57
+ */
58
+ type: 'title' | 'value';
59
+ /**
60
+ * key value to find and update
61
+ */
62
+ key: string;
63
+ /**
64
+ * value to replace key
65
+ */
66
+ value: string;
50
67
  }
51
68
  export interface SortOption {
52
69
  /**
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { ProductListWrapperProps } from './models';
3
- declare const ProductListWrapper: ({ className, styled, orientation, search, itemsPerPage, currentPage: page, showPagination, onPageChanged, onDataReceived, showControls, showLoadingIndicator, visibleFields, renderList, renderNoResults: renderNoResultsCustom, query, linkEl, onItemsPerPageChange, onItemClick, onLayoutChange, noImageUrl, onSortChange, sortOptions, selectedSort, productId, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, }: ProductListWrapperProps) => React.JSX.Element;
3
+ declare const ProductListWrapper: ({ className, styled, orientation, search, itemsPerPage, currentPage: page, showPagination, onPageChanged, onDataReceived, showControls, showLoadingIndicator, visibleFields, renderList, renderNoResults: renderNoResultsCustom, query, linkEl, onItemsPerPageChange, onItemClick, onLayoutChange, noImageUrl, onSortChange, sortOptions, selectedSort, productId, enableAddToCartButton, onAddToCart, addToCartButtonText, validateShowAddToCartButton, extraSortOptions, }: ProductListWrapperProps) => React.JSX.Element;
4
4
  export default ProductListWrapper;
@@ -12,6 +12,8 @@ export interface ProductListResponse extends ListResponse<Product> {
12
12
  exactMatchInResult?: boolean;
13
13
  exactPartMatch?: boolean;
14
14
  showSimilarPartNumberMatch?: boolean;
15
+ fitment?: string;
16
+ numberOfFitmentsTosave?: number;
15
17
  }
16
18
  export interface ProductListWrapperProps extends Omit<ProductListProps, 'list' | 'totalPages' | 'isLoading'> {
17
19
  search?: string;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Product } from '../../models/search';
3
+ import { FacetLabelData, SortOption } from '../ProductList/models';
4
+ import { Orientation } from '../../models/generic';
3
5
  type InitialFacets = {
4
6
  [name: string]: string[];
5
7
  };
@@ -35,9 +37,26 @@ type Props = {
35
37
  */
36
38
  validateShowAddToCartButton?: (product: Product) => boolean;
37
39
  /** Optional parameter for setting the default list item layout */
38
- orientation?: 'horizontal' | 'vertical';
40
+ orientation?: Orientation;
41
+ /** Collapse/Expand facet's section container */
42
+ initialCollapsedSections?: boolean;
39
43
  /** Optional facet list limit */
40
44
  facetListLimit?: number;
45
+ /** Facets title and values update data structure */
46
+ initFacetLabelsData?: FacetLabelData[];
47
+ /**
48
+ * List of extra options to sort the list that will be concatenated to the default ones
49
+ *
50
+ * If you are using our API, please confirm what fields are supported for sorting.
51
+ */
52
+ extraSortOptions?: SortOption[];
53
+ /** Optional initial sort option */
54
+ initialSortOption?: string;
55
+ /** Enable scroll to top automatically after update. Default value: true */
56
+ autoScrollToTop?: boolean;
57
+ /** Hook to add extra custom fields to product card center or right section */
58
+ addNewCenterProductField?: (data: Product) => JSX.Element;
59
+ addNewRightProductField?: (data: Product) => JSX.Element;
41
60
  };
42
- declare const ResultsPage: ({ groupId, initialFacets, fitmentSelectorSearchButton, fitmentSelectorClearButton, noResultsText, fitmentSelectorTitle, optionalLabelsTitle, qualifiersStatus, showBadge, onAddToCart, enableAddToCartButton, addToCartButtonText, validateShowAddToCartButton, orientation, facetListLimit, }: Props) => React.JSX.Element;
61
+ declare const ResultsPage: ({ groupId, initialFacets, fitmentSelectorSearchButton, fitmentSelectorClearButton, noResultsText, fitmentSelectorTitle, optionalLabelsTitle, qualifiersStatus, showBadge, onAddToCart, enableAddToCartButton, addToCartButtonText, validateShowAddToCartButton, orientation, facetListLimit, initFacetLabelsData, extraSortOptions, initialSortOption, autoScrollToTop, addNewCenterProductField, addNewRightProductField, initialCollapsedSections, }: Props) => React.JSX.Element;
43
62
  export default ResultsPage;
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { SearchBarProps } from './models';
3
+ export declare const SEARCH_BAR_ID = "sui-search-bar-input";
3
4
  export declare const KEY_STROKE_DELAY = 400;
4
- declare const SearchBar: ({ className, linkEl, noResultsText, placeholder, searchButtonText, showCloseIcon, styled, onSubmit, showNoResultsMsg, searchValue: searchString, isLoading, onChange, onClear, renderNoResults, sections, renderList, onItemClick, fitment, onClearFitment, onClearHistory, retainFitmentOnSubmit, }: SearchBarProps) => React.JSX.Element;
5
+ export declare const getQueryParam: (index: string) => string;
6
+ declare const SearchBar: ({ className, linkEl, noResultsText, placeholder, searchButtonText, showCloseIcon, styled, onSubmit, showNoResultsMsg, searchValue: searchString, isLoading, onChange, onClear, renderNoResults, sections, renderList, onItemClick, fitment, entity, onClearFitment, onClearFilter, onClearHistory, retainFitmentOnSubmit, }: SearchBarProps) => React.JSX.Element;
5
7
  export default SearchBar;
6
8
  export declare function getFitmentString(fitment: string): string;
@@ -67,6 +67,10 @@ export interface SearchBarProps {
67
67
  * Selected fitment filter for current search
68
68
  */
69
69
  fitment?: string;
70
+ /**
71
+ * Selected entity filter for current search
72
+ */
73
+ entity?: string;
70
74
  /**
71
75
  * Flag to indicate when there is a search in progress.
72
76
  */
@@ -109,6 +113,10 @@ export interface SearchBarProps {
109
113
  * Callback fired when user clicks the close button on fitment label.
110
114
  */
111
115
  onClearFitment?: () => void;
116
+ /**
117
+ * Callback fired when user clicks the close button on entity filter label.
118
+ */
119
+ onClearFilter?: () => void;
112
120
  /**
113
121
  * Placeholder for the search input.
114
122
  */
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StoredFitmentLoaderProps } from './StoredFitmentLoader';
3
+ declare const LoggedInLoader: ({ searchPrefix, buttonLabel, limit, reload, reloadDelay, }: StoredFitmentLoaderProps) => React.JSX.Element;
4
+ export default LoggedInLoader;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StoredFitmentLoaderProps } from './StoredFitmentLoader';
3
+ declare const LoggedOutLoader: ({ searchPrefix, buttonLabel, limit, reload, reloadDelay, }: StoredFitmentLoaderProps) => React.JSX.Element;
4
+ export default LoggedOutLoader;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export type StoredFitmentLoaderProps = {
3
+ buttonLabel?: string;
4
+ limit?: number;
5
+ reload?: boolean;
6
+ reloadDelay?: number;
7
+ searchPrefix?: string;
8
+ };
9
+ declare const StoredFitmentLoader: (props: StoredFitmentLoaderProps) => React.JSX.Element;
10
+ export default StoredFitmentLoader;
@@ -0,0 +1 @@
1
+ export { default } from './StoredFitmentLoader';
@@ -0,0 +1,4 @@
1
+ export declare const isLoading: (status: boolean) => void;
2
+ export declare const formatObjectKeysToUpperCase: (obj: any) => {};
3
+ export declare const capitalizeFirstChar: (val: any) => string;
4
+ export declare const isObjectInArray: (obj: any, arr: any) => any;
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  interface CrossIconProps {
3
+ className?: string;
3
4
  size?: number;
4
5
  style?: React.CSSProperties;
5
6
  }
6
- declare const CrossIcon: ({ size, style }: CrossIconProps) => React.JSX.Element;
7
+ declare const CrossIcon: ({ className, size, style }: CrossIconProps) => React.JSX.Element;
7
8
  export default CrossIcon;
@@ -58,5 +58,7 @@ export { default as SkuListWrapper } from './components/SkuListWrapper';
58
58
  export * from './components/SkuListWrapper';
59
59
  export { default as SpecificationSearch } from './components/SpecificationSearch';
60
60
  export * from './components/SpecificationSearch';
61
+ export { default as StoredFitmentLoader } from './components/StoredFitmentLoader';
62
+ export * from './components/StoredFitmentLoader';
61
63
  export { config } from './config';
62
64
  export * from './utils/constants';
@@ -1,5 +1,5 @@
1
1
  type FitmentApplicability = 'Fitment-Specific' | 'Universal';
2
- type ProductAvailability = 'Unique' | 'Out of Stock' | 'Available' | 'Sold' | 'Limited Supply' | 'Please Call' | 'Inventory' | 'Not for Sale' | 'Remote Update' | 'To be Deleted';
2
+ type ProductAvailability = 'Unique' | 'Out of Stock' | 'Available' | 'Sold' | 'Limited Supply' | 'Please Call' | 'Inventory' | 'Not for Sale' | 'Remote Update' | 'To be Deleted' | 'out-of-stock' | 'in-stock';
3
3
  export interface Product {
4
4
  id: number | string;
5
5
  availability?: ProductAvailability;
@@ -90,4 +90,12 @@ export interface CategoryResponse {
90
90
  total: number;
91
91
  list: BasicItem[];
92
92
  }
93
+ export interface UserFitmentsLogResponse {
94
+ data: [{
95
+ apiKey: string;
96
+ uid: string;
97
+ fitments: string[];
98
+ createdAt: Date;
99
+ }];
100
+ }
93
101
  export {};
@@ -1,7 +1,11 @@
1
1
  export declare const FITMENT_SELECTOR_STORAGE_KEY = "sui-fitment-selector-v2";
2
+ export declare const HISTORIC_FITMENT_STORAGE_KEY = "sui-historic-fitment";
3
+ export declare const HISTORIC_FITMENT_LIMIT_LABEL = "historic-fitment-limit";
2
4
  export declare const OPTIONAL_QUALIFIERS_STORAGE_KEY = "optional-qualifiers";
3
5
  export declare const OPTIONAL_QUALIFIERS_FOR_URL_STORAGE_KEY = "optional-qualifiers-for-url";
4
6
  export declare const DYN_SELECTED_VQ = "dyn-selectedvq";
5
7
  export declare const DYN_SELECTED_VQ_REALID = "dyn-selectedvq-realid";
6
8
  export declare const LIMIT_FITMENTS_LOCAL_STORAGE = 10;
7
9
  export declare const SEARCH_TERMS_HISTORY_KEY = "pl-recent-search-terms";
10
+ export declare const ENTITY = "entity";
11
+ export declare const ENTITY_TEXT = "entity-text";
@@ -6,3 +6,6 @@ export declare const updateFitmentQueryParams: (fitmentValue: any) => void;
6
6
  export declare const getExistingFitment: () => any;
7
7
  export declare const updateFacetQueryParams: (selectedFacets: any) => void;
8
8
  export declare const getFacetsFromQueryParams: () => {};
9
+ export declare const setNumberOfFitmentsTosave: (limit: any) => void;
10
+ export declare const getNumberOfFitmentsTosave: () => string;
11
+ export declare const fitmentToString: (fitmentValues: any) => string;
@@ -1,12 +1,14 @@
1
1
  export declare const PRODUCTS_URL: string;
2
2
  export declare const FACET_FILTERS_URL: string;
3
3
  export declare const CATEGORIES_URL: string;
4
- export declare function getProductsQuery(page: number, itemsPerPage: number, search: string, sort?: string | number, fitment?: string, productId?: number | string): {
4
+ export declare function getProductsQuery(page: number, itemsPerPage: number, search: string, sort?: string | number, fitment?: string, productId?: number | string, uid?: string): {
5
5
  getSkus?: boolean;
6
6
  productId?: string | number;
7
+ segmentId?: string;
7
8
  fitment?: string;
8
9
  sort?: string | number;
9
10
  limit: number;
10
11
  page: number;
11
12
  q: string;
13
+ uid: string;
12
14
  };
@@ -6,7 +6,7 @@ declare function wsmVisibleFieldsBuilder(product: Product): {
6
6
  product: {
7
7
  [x: string]: string | number | boolean;
8
8
  id: string | number;
9
- availability?: "Unique" | "Out of Stock" | "Available" | "Sold" | "Limited Supply" | "Please Call" | "Inventory" | "Not for Sale" | "Remote Update" | "To be Deleted";
9
+ availability?: "Unique" | "Out of Stock" | "Available" | "Sold" | "Limited Supply" | "Please Call" | "Inventory" | "Not for Sale" | "Remote Update" | "To be Deleted" | "out-of-stock" | "in-stock";
10
10
  availability_remarks?: string;
11
11
  fitment_applicability?: "Fitment-Specific" | "Universal";
12
12
  brand_name?: string;
package/package.json CHANGED
@@ -1,15 +1,14 @@
1
1
  {
2
2
  "name": "@webshopmanager/partslogic-ui",
3
- "version": "1.7.8",
4
- "publishConfig": {
5
- "access": "public",
6
- "tag": "release-1.x"
7
- },
3
+ "version": "2.0.10",
8
4
  "description": "React components for Sunhammer",
9
5
  "repository": "https://github.com/partslogic/partslogic.git",
10
6
  "author": "Oscar Mauricio Yepes Morato <oscarmyepes@gmail.com>",
11
7
  "license": "MIT",
12
8
  "private": false,
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
13
12
  "peerDependencies": {
14
13
  "react": "^17.0.1",
15
14
  "react-dom": "^17.0.1"
@@ -66,6 +65,7 @@
66
65
  "eslint-plugin-react-hooks": "^4.6.0",
67
66
  "eslint-plugin-testing-library": "^6.0.0",
68
67
  "fetch-mock": "^9.11.0",
68
+ "file-loader": "^6.2.0",
69
69
  "html-webpack-plugin": "^5.5.3",
70
70
  "husky": "^8.0.0",
71
71
  "jest": "^29.6.2",