@wayke-se/components-react 5.2.0-beta.0 → 6.0.0-beta.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/README.md +222 -122
- package/dist/index.js +1365 -1489
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1381 -1505
- package/dist/index.mjs.map +4 -4
- package/dist/types/src/@types/filter.d.ts +7 -1
- package/dist/types/src/Gql/ad/legacyWaykeId.d.ts +1 -0
- package/dist/types/src/Gql/ad/propertyTree.d.ts +5 -0
- package/dist/types/src/Gql/ad/queries.d.ts +9 -0
- package/dist/types/src/Gql/ad/types.d.ts +378 -0
- package/dist/types/src/Gql/ad/useAd.d.ts +8 -0
- package/dist/types/src/Gql/ad/useInsuranceInquiry.d.ts +11 -0
- package/dist/types/src/Gql/ad/useLoanCalculation.d.ts +14 -0
- package/dist/types/src/Gql/ad/useRelatedAds.d.ts +12 -0
- package/dist/types/src/Gql/ad/view.d.ts +94 -0
- package/dist/types/src/Gql/client.d.ts +11 -0
- package/dist/types/src/Gql/config.d.ts +9 -0
- package/dist/types/src/Gql/facets.d.ts +19 -0
- package/dist/types/src/Gql/hit.d.ts +5 -0
- package/dist/types/src/Gql/legacyParams.d.ts +7 -0
- package/dist/types/src/Gql/queries.d.ts +17 -0
- package/dist/types/src/Gql/searchParams.d.ts +55 -0
- package/dist/types/src/Gql/suggest.d.ts +8 -0
- package/dist/types/src/Gql/types.d.ts +131 -0
- package/dist/types/src/Gql/useAdsSearch.d.ts +21 -0
- package/dist/types/src/State/Ad/AdContext.d.ts +5 -0
- package/dist/types/src/State/Router/RouterContext.d.ts +15 -0
- package/dist/types/src/State/Router/RouterProvider.d.ts +6 -0
- package/dist/types/src/State/Router/useRouter.d.ts +2 -0
- package/dist/types/src/State/Search/SearchContext.d.ts +15 -9
- package/dist/types/src/State/Search/SearchProvider.d.ts +1 -5
- package/dist/types/src/State/Settings/SettingsContext.d.ts +2 -12
- package/dist/types/src/State/Settings/settings.d.ts +56 -0
- package/dist/types/src/State/Settings/useSettings.d.ts +1 -1
- package/dist/types/src/components/ActionList/index.d.ts +3 -10
- package/dist/types/src/components/DocumentList/index.d.ts +3 -3
- package/dist/types/src/components/Filter/index.d.ts +1 -3
- package/dist/types/src/components/FilterPanel/checkListFacet.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/colorFacet.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/faceSelector.d.ts +2 -3
- package/dist/types/src/components/FilterPanel/index.d.ts +8 -15
- package/dist/types/src/components/FilterPanel/rangeFacet.d.ts +3 -3
- package/dist/types/src/components/FinancialOptions/LoanModal.d.ts +3 -7
- package/dist/types/src/components/FinancialOptions/index.d.ts +5 -7
- package/dist/types/src/components/FinancialOptions/leasing.d.ts +3 -3
- package/dist/types/src/components/FinancialOptions/loan.d.ts +3 -7
- package/dist/types/src/components/Gallery/index.d.ts +3 -5
- package/dist/types/src/components/Grid/index.d.ts +3 -7
- package/dist/types/src/components/InsuranceOptions/Insurance.d.ts +4 -6
- package/dist/types/src/components/InsuranceOptions/InsuranceFree.d.ts +5 -7
- package/dist/types/src/components/InsuranceOptions/InsuranceFreeModal.d.ts +4 -4
- package/dist/types/src/components/InsuranceOptions/InsuranceModal.d.ts +4 -6
- package/dist/types/src/components/InsuranceOptions/index.d.ts +5 -6
- package/dist/types/src/components/LeadForm/index.d.ts +1 -6
- package/dist/types/src/components/Lightbox/index.d.ts +2 -2
- package/dist/types/src/components/Map/index.d.ts +4 -2
- package/dist/types/src/components/OpeningHours/index.d.ts +2 -2
- package/dist/types/src/components/ProductCard/HitCard.d.ts +10 -0
- package/dist/types/src/components/ProductCard/index.d.ts +9 -13
- package/dist/types/src/components/SearchBar/index.d.ts +4 -1
- package/dist/types/src/components/SearchBar/wrapper.d.ts +10 -0
- package/dist/types/src/components/SortSelect/index.d.ts +1 -2
- package/dist/types/src/hooks/useSubmitLead.d.ts +1 -1
- package/dist/types/src/index.d.ts +5 -4
- package/dist/types/src/layouts/WaykeComposite.d.ts +3 -8
- package/dist/types/src/layouts/WaykeCompositeWithProvider.d.ts +1 -1
- package/dist/types/src/layouts/search/index.d.ts +6 -7
- package/dist/types/src/layouts/searchItem/Accessories/AccessoryModal.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/Accessories/index.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/Branch.d.ts +3 -4
- package/dist/types/src/layouts/searchItem/CheckList.d.ts +3 -15
- package/dist/types/src/layouts/searchItem/Documents.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/ManufacturerPackagesOption.d.ts +2 -2
- package/dist/types/src/layouts/searchItem/PackageOptions.d.ts +3 -3
- package/dist/types/src/layouts/searchItem/Property.d.ts +1 -6
- package/dist/types/src/layouts/searchItem/Related.d.ts +5 -6
- package/dist/types/src/layouts/searchItem/index.d.ts +8 -6
- package/dist/types/src/layouts/searchItem/useEcom.d.ts +7 -3
- package/dist/types/src/providers/WaykeProvider.d.ts +7 -21
- package/dist/types/src/utils/image.d.ts +14 -0
- package/dist/types/src/utils/sortOptions.d.ts +4 -13
- package/package.json +10 -16
- package/dist/types/src/@types/action.d.ts +0 -3
- package/dist/types/src/@types/codegen/types.d.ts +0 -433
- package/dist/types/src/@types/queryFilter.d.ts +0 -5
- package/dist/types/src/@types/search.d.ts +0 -114
- package/dist/types/src/State/CentralStorage/CentralStorageContext.d.ts +0 -5
- package/dist/types/src/State/CentralStorage/CentralStorageProvider.d.ts +0 -6
- package/dist/types/src/State/CentralStorage/useCentralStorage.d.ts +0 -6
- package/dist/types/src/State/Path/PathContext.d.ts +0 -8
- package/dist/types/src/State/Path/PathProvider.d.ts +0 -6
- package/dist/types/src/State/Path/reducer.d.ts +0 -14
- package/dist/types/src/State/Path/usePath.d.ts +0 -3
- package/dist/types/src/State/RelatedSearch/RelatedSearchContext.d.ts +0 -9
- package/dist/types/src/State/RelatedSearch/RelatedSearchProvider.d.ts +0 -9
- package/dist/types/src/State/RelatedSearch/useRelatedSearch.d.ts +0 -2
- package/dist/types/src/State/Settings/SettingsProvider.d.ts +0 -11
- package/dist/types/src/components/Video/QuickNavVideo.d.ts +0 -7
- package/dist/types/src/hooks/apolloTypes.d.ts +0 -6
- package/dist/types/src/hooks/useHasBeenVisible.d.ts +0 -2
- package/dist/types/src/hooks/useHashGuid.d.ts +0 -2
- package/dist/types/src/hooks/useInsurance.d.ts +0 -4
- package/dist/types/src/hooks/useLoan.d.ts +0 -4
- package/dist/types/src/hooks/useOnScreen.d.ts +0 -2
- package/dist/types/src/hooks/usePrevious.d.ts +0 -2
- package/dist/types/src/hooks/useSearchItem.d.ts +0 -4
- package/dist/types/src/hooks/useSearchItemBranch.d.ts +0 -4
- package/dist/types/src/hooks/useSessionStorage.d.ts +0 -7
- package/dist/types/src/layouts/searchItem/BranchModal.d.ts +0 -9
- package/dist/types/src/providers/WaykeItemProvidet.d.ts +0 -24
- package/dist/types/src/providers/graphqlProvider.d.ts +0 -6
- package/dist/types/src/queries/INSURANCE_CALCULATION.d.ts +0 -2
- package/dist/types/src/queries/LOAN_CALCULATION.d.ts +0 -2
- package/dist/types/src/queries/SEARCH_ITEM_BRANCH_QUERY.d.ts +0 -2
- package/dist/types/src/queries/SEARCH_ITEM_QUERY.d.ts +0 -2
- package/dist/types/src/utils/deep-copy.d.ts +0 -5
- package/dist/types/src/utils/regex.d.ts +0 -3
- package/dist/types/src/utils/specification.d.ts +0 -28
- package/dist/types/src/utils/url.d.ts +0 -1
- package/dist/types/src/utils/vehicle-properties/compare-basic-properties.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/compare-categories.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/compare-properties.d.ts +0 -3
- package/dist/types/src/utils/vehicle-properties/custom-property-adder.d.ts +0 -13
- package/dist/types/src/utils/vehicle-properties/property-remover.d.ts +0 -7
- package/dist/types/src/utils/vehicle-properties/property-tree-creator.d.ts +0 -31
- package/dist/types/src/utils/vehicle-properties/property-tree-sorter.d.ts +0 -3
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Query, QueryLoanArgs } from '../@types/codegen/types';
|
|
2
|
-
import { StrictQueryResult } from './apolloTypes';
|
|
3
|
-
declare const useLoanCalculation: (id: string, duration?: number, downPayment?: number, residual?: number) => StrictQueryResult<Query, QueryLoanArgs>;
|
|
4
|
-
export default useLoanCalculation;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Query, QueryVehicleArgs } from '../@types/codegen/types';
|
|
2
|
-
import { StrictQueryResult } from './apolloTypes';
|
|
3
|
-
declare const useSearchItemBranch: (id?: string | null, branch?: string | null) => StrictQueryResult<Query, QueryVehicleArgs>;
|
|
4
|
-
export default useSearchItemBranch;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BranchConnection } from '../../@types/codegen/types';
|
|
3
|
-
interface BranchModalProps {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
connections?: BranchConnection[];
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare const BranchModal: ({ loading, connections, onClose }: BranchModalProps) => React.JSX.Element | null;
|
|
9
|
-
export default BranchModal;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface EcomSettings {
|
|
3
|
-
url: string;
|
|
4
|
-
/** @deprecated Not used since 3.0.0. Will be removed in the next major version. */
|
|
5
|
-
useBankId?: boolean;
|
|
6
|
-
/** @deprecated Not used since 3.0.0. Will be removed in the next major version. */
|
|
7
|
-
displayBankIdAlert?: boolean;
|
|
8
|
-
serviceLogotypeUrl?: string;
|
|
9
|
-
bankIdThumbprint?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface WaykeItemProviderSettings {
|
|
12
|
-
url: string;
|
|
13
|
-
urlMlt?: string;
|
|
14
|
-
graphQlUrl: string;
|
|
15
|
-
apiKey?: string;
|
|
16
|
-
ecomSettings?: EcomSettings;
|
|
17
|
-
googleMapsApiKey?: string;
|
|
18
|
-
googleMapsMarker?: string;
|
|
19
|
-
}
|
|
20
|
-
export type WaykeItemProviderProps = WaykeItemProviderSettings & {
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
};
|
|
23
|
-
declare const WaykeItemProvider: ({ url, urlMlt, apiKey, ecomSettings, graphQlUrl, googleMapsApiKey, googleMapsMarker, children, }: WaykeItemProviderProps) => React.JSX.Element;
|
|
24
|
-
export default WaykeItemProvider;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { VehicleData } from '../@types/codegen/types';
|
|
2
|
-
export interface ItemPropertModalType {
|
|
3
|
-
title: string;
|
|
4
|
-
text: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ItemPropertyType {
|
|
7
|
-
label: string;
|
|
8
|
-
value: string | null;
|
|
9
|
-
modal?: ItemPropertModalType;
|
|
10
|
-
}
|
|
11
|
-
type ValueTypes = number | string | null | undefined | string[] | boolean | {
|
|
12
|
-
[key: string]: string | number | boolean;
|
|
13
|
-
};
|
|
14
|
-
export interface SpecPropertyType {
|
|
15
|
-
label?: string;
|
|
16
|
-
formatLabel?: (item: VehicleData) => string;
|
|
17
|
-
formatData?: (value: ValueTypes, item: VehicleData) => string | null;
|
|
18
|
-
modal?: {
|
|
19
|
-
title?: string;
|
|
20
|
-
dynamicTitle?: (item: VehicleData) => string;
|
|
21
|
-
text?: string;
|
|
22
|
-
dynamicText?: (item: VehicleData) => string;
|
|
23
|
-
nonConcatablePropValue?: string;
|
|
24
|
-
concatPropValue?: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export declare const getSpecificationList: (item: VehicleData) => ItemPropertyType[];
|
|
28
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getUrlSearchParamsFromUrl: () => URLSearchParams;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TFunction } from 'i18next';
|
|
2
|
-
import { VehicleData } from '../../@types/codegen/types';
|
|
3
|
-
import { EnhancedProperty, ItemCategory } from '../../@types/vehicle-properties';
|
|
4
|
-
export declare const TEXT_TYPE = "text";
|
|
5
|
-
export declare const NUMBER_TYPE = "number";
|
|
6
|
-
export declare const BASIC_CATEGORY: (t: TFunction<'translation', undefined>) => ItemCategory;
|
|
7
|
-
export declare const ENGINE_SUBCATEGORY: (t: TFunction<'translation', undefined>) => ItemCategory;
|
|
8
|
-
export default _default;
|
|
9
|
-
declare function _default(t: TFunction<'translation', undefined>, item: VehicleData, properties: {
|
|
10
|
-
[key: string]: EnhancedProperty;
|
|
11
|
-
}): {
|
|
12
|
-
[key: string]: EnhancedProperty;
|
|
13
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { EnhancedProperty, Tree } from '../../@types/vehicle-properties';
|
|
2
|
-
declare class PropertyTreeCreator {
|
|
3
|
-
private properties;
|
|
4
|
-
constructor(properties: {
|
|
5
|
-
[key: string]: EnhancedProperty;
|
|
6
|
-
});
|
|
7
|
-
create(): Tree;
|
|
8
|
-
private getRootProperties;
|
|
9
|
-
private propertiesWithCategory;
|
|
10
|
-
private propertiesWithoutCategory;
|
|
11
|
-
private isList;
|
|
12
|
-
private isNonList;
|
|
13
|
-
private createTreeCategories;
|
|
14
|
-
private getCategories;
|
|
15
|
-
private convertToTreeCategories;
|
|
16
|
-
private hasCategoryWithId;
|
|
17
|
-
private propertiesWithSubCategory;
|
|
18
|
-
private propertiesWithoutSubCategory;
|
|
19
|
-
private createTreeSubCategories;
|
|
20
|
-
private getSubCategoriesOfCategory;
|
|
21
|
-
private convertSubCategory;
|
|
22
|
-
private hasSubCategoryWithId;
|
|
23
|
-
private static distinctCategories;
|
|
24
|
-
private createListSubCategories;
|
|
25
|
-
private asBoolProperties;
|
|
26
|
-
static DEFAULT_CATEGORY_NAME: string;
|
|
27
|
-
static DEFAULT_CATEGORY_ID: number;
|
|
28
|
-
static TEXT_LIST_TYPE: string;
|
|
29
|
-
static LIST_CATEGORY_START_ID: number;
|
|
30
|
-
}
|
|
31
|
-
export default PropertyTreeCreator;
|