@wayke-se/components-react 2.16.0 → 3.0.0-beta.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.
- package/README.md +33 -2
- package/dist-node/index.js +3254 -1142
- package/dist-node/index.js.map +1 -1
- package/dist-src/State/CentralStorage/useCentralStorage.js +7 -8
- package/dist-src/State/Path/PathProvider.js +1 -1
- package/dist-src/State/RelatedSearch/RelatedSearchProvider.js +1 -1
- package/dist-src/State/Search/SearchProvider.js +7 -10
- package/dist-src/components/ActionList/index.js +2 -3
- package/dist-src/components/Checklist/index.js +1 -1
- package/dist-src/components/ExtendContent/index.js +1 -1
- package/dist-src/components/Filter/index.js +10 -7
- package/dist-src/components/FilterPanel/checkListFacet.js +1 -1
- package/dist-src/components/FilterPanel/colorFacet.js +1 -1
- package/dist-src/components/FilterPanel/index.js +1 -1
- package/dist-src/components/FilterPanel/rangeFacet.js +14 -16
- package/dist-src/components/FinancialOptions/LoanModal.js +27 -29
- package/dist-src/components/FinancialOptions/leasing.js +6 -6
- package/dist-src/components/FinancialOptions/loan.js +5 -6
- package/dist-src/components/Gallery/index.js +11 -16
- package/dist-src/components/Grid/index.js +2 -3
- package/dist-src/components/InputSelect/index.js +1 -1
- package/dist-src/components/InsuranceOptions/InsuranceFree.js +1 -2
- package/dist-src/components/InsuranceOptions/InsuranceFreeModal.js +4 -5
- package/dist-src/components/InsuranceOptions/InsuranceModal.js +3 -3
- package/dist-src/components/Lightbox/index.js +1 -1
- package/dist-src/components/OpeningHours/index.js +9 -9
- package/dist-src/components/RangeSlider/SliderWithLabel.js +1 -1
- package/dist-src/components/Result/index.js +7 -6
- package/dist-src/components/Video/EmbededVideo.js +1 -1
- package/dist-src/components/Video/QuickNavEmbeded.js +2 -2
- package/dist-src/components/Video/useThumbnail.js +1 -1
- package/dist-src/components/Video/utils.js +2 -2
- package/dist-src/hooks/useFetch.js +1 -1
- package/dist-src/hooks/useVimeoThumbnail.js +1 -1
- package/dist-src/layouts/searchItem/Branch.js +9 -10
- package/dist-src/layouts/searchItem/BranchModal.js +1 -1
- package/dist-src/layouts/searchItem/CheckList.js +16 -16
- package/dist-src/layouts/searchItem/ManufacturerPackagesOption.js +1 -2
- package/dist-src/layouts/searchItem/PackageOptionModal.js +7 -10
- package/dist-src/layouts/searchItem/PackageOptions.js +11 -14
- package/dist-src/layouts/searchItem/Property.js +4 -6
- package/dist-src/layouts/searchItem/Related.js +3 -4
- package/dist-src/layouts/searchItem/index.js +42 -21
- package/dist-src/providers/WaykeItemProvidet.js +7 -11
- package/dist-src/providers/WaykeProvider.js +8 -12
- package/dist-src/utils/phonenumbers.js +1 -1
- package/dist-src/utils/specification.js +9 -13
- package/dist-src/utils/vehicle-properties/property-tree-creator.js +5 -5
- package/dist-types/State/CentralStorage/useCentralStorage.d.ts +1 -1
- package/dist-types/State/Settings/SettingsContext.d.ts +1 -0
- package/dist-types/components/InputSearch/index.d.ts +5 -3
- package/dist-types/components/RangeSlider/handle.d.ts +2 -2
- package/dist-types/components/RangeSlider/track.d.ts +2 -2
- package/dist-types/components/Video/useThumbnail.d.ts +1 -1
- package/dist-types/components/Video/utils.d.ts +2 -2
- package/dist-types/hooks/useFetch.d.ts +1 -1
- package/dist-types/hooks/useInsurance.d.ts +1 -1
- package/dist-types/hooks/useLoan.d.ts +1 -1
- package/dist-types/hooks/useSearchItem.d.ts +1 -1
- package/dist-types/hooks/useSearchItemBranch.d.ts +1 -1
- package/dist-types/hooks/useVimeoThumbnail.d.ts +1 -1
- package/dist-types/utils/regex.d.ts +1 -1
- package/dist-types/utils/ssn.d.ts +1 -1
- package/dist-web/index.js +250 -323
- package/dist-web/index.js.map +1 -1
- package/package.json +18 -26
- package/dist-src/components/Ecom/index.js +0 -48
- package/dist-src/hooks/useEcom.js +0 -18
- package/dist-types/components/Ecom/index.d.ts +0 -10
- package/dist-types/hooks/useEcom.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wayke-se/components-react",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-beta.10",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist-*/",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@apollo/client": "^3.4.17",
|
|
19
|
-
"@wayke-se/ecom-
|
|
19
|
+
"@wayke-se/ecom-web": "^1.4.1",
|
|
20
20
|
"date-fns": "^2.25.0",
|
|
21
21
|
"graphql": "^16.0.1",
|
|
22
22
|
"libphonenumber-js": "^1.9.42",
|
|
@@ -24,18 +24,15 @@
|
|
|
24
24
|
"react-compound-slider": "^3.3.1",
|
|
25
25
|
"react-lazyload": "^3.2.0",
|
|
26
26
|
"react-pannellum": "^0.1.15",
|
|
27
|
-
"react-slick": "^0.
|
|
28
|
-
"scroll-into-view-if-needed": "^2.2.28"
|
|
29
|
-
"slick-carousel": "^1.8.1"
|
|
27
|
+
"react-slick": "^0.29.0",
|
|
28
|
+
"scroll-into-view-if-needed": "^2.2.28"
|
|
30
29
|
},
|
|
31
30
|
"peerDependencies": {
|
|
32
|
-
"react": "^16
|
|
33
|
-
"react-dom": "^16
|
|
31
|
+
"react": "^16 || ^17 || ^18",
|
|
32
|
+
"react-dom": "^16 || ^17 || ^18",
|
|
34
33
|
"styled-components": "^5.1.0"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@babel/core": "^7.16.0",
|
|
38
|
-
"@babel/preset-env": "^7.16.0",
|
|
39
36
|
"@graphql-codegen/cli": "^2.3.0",
|
|
40
37
|
"@graphql-codegen/typescript": "^2.4.0",
|
|
41
38
|
"@pika/pack": "^0.5.0",
|
|
@@ -46,34 +43,30 @@
|
|
|
46
43
|
"@pika/plugin-ts-standard-pkg": "^0.9.2",
|
|
47
44
|
"@types/googlemaps": "^3.43.3",
|
|
48
45
|
"@types/marked": "^4.0.0",
|
|
49
|
-
"@types/react": "^
|
|
50
|
-
"@types/react-dom": "^
|
|
46
|
+
"@types/react": "^18.0.20",
|
|
47
|
+
"@types/react-dom": "^18.0.6",
|
|
51
48
|
"@types/react-lazyload": "^3.1.1",
|
|
52
49
|
"@types/react-router-dom": "^5.3.2",
|
|
53
50
|
"@types/react-slick": "^0.23.7",
|
|
54
51
|
"@types/styled-components": "^5.1.15",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
|
53
|
+
"@typescript-eslint/parser": "^5.37.0",
|
|
57
54
|
"babel-loader": "^8.2.3",
|
|
58
|
-
"babel-plugin-import": "^1.13.3",
|
|
59
|
-
"babel-plugin-styled-components": "^1.13.3",
|
|
60
|
-
"core-js": "^3.19.1",
|
|
61
55
|
"css-loader": "^6.5.1",
|
|
62
|
-
"dotenv": "^
|
|
63
|
-
"eslint": "^
|
|
56
|
+
"dotenv": "^16.0.2",
|
|
57
|
+
"eslint": "^8.23.1",
|
|
64
58
|
"eslint-config-prettier": "^8.3.0",
|
|
65
59
|
"eslint-plugin-import": "^2.25.3",
|
|
66
|
-
"eslint-plugin-prettier": "^
|
|
60
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
67
61
|
"eslint-plugin-react": "^7.27.0",
|
|
68
62
|
"file-loader": "^6.2.0",
|
|
69
|
-
"fork-ts-checker-webpack-plugin": "^
|
|
63
|
+
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
|
70
64
|
"html-webpack-plugin": "^5.5.0",
|
|
71
65
|
"prettier": "^2.4.1",
|
|
72
|
-
"react": "^
|
|
73
|
-
"react-dom": "^
|
|
66
|
+
"react": "^18.2.0",
|
|
67
|
+
"react-dom": "^18.2.0",
|
|
74
68
|
"react-router-dom": "^6.0.2",
|
|
75
|
-
"
|
|
76
|
-
"source-map-loader": "^3.0.0",
|
|
69
|
+
"source-map-loader": "^4.0.0",
|
|
77
70
|
"style-loader": "^3.3.1",
|
|
78
71
|
"styled-components": "^5.3.3",
|
|
79
72
|
"ts-loader": "^9.2.6",
|
|
@@ -82,8 +75,7 @@
|
|
|
82
75
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
83
76
|
"webpack-cli": "^4.9.1",
|
|
84
77
|
"webpack-dev-server": "^4.5.0",
|
|
85
|
-
"webpack-merge": "^5.8.0"
|
|
86
|
-
"whatwg-fetch": "^3.6.2"
|
|
78
|
+
"webpack-merge": "^5.8.0"
|
|
87
79
|
},
|
|
88
80
|
"source": "dist-src/index.js",
|
|
89
81
|
"types": "dist-types/index.d.ts",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect } from 'react';
|
|
2
|
-
import EcomBase from '@wayke-se/ecom-react';
|
|
3
|
-
import useSettings from '../../State/Settings/useSettings';
|
|
4
|
-
import PubSub from '../../utils/pubsub/pubsub';
|
|
5
|
-
const Ecom = ({ vehicle, manufacturer, onExit, onUserEvent }) => {
|
|
6
|
-
var _a, _b, _c;
|
|
7
|
-
const { ecomSettings } = useSettings();
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
PubSub.publish('EcomOnInit');
|
|
10
|
-
}, []);
|
|
11
|
-
const onUserEventLocal = useCallback((userEvent, currentStep) => {
|
|
12
|
-
PubSub.publish('EcomOnUserEvent', userEvent, currentStep);
|
|
13
|
-
if (onUserEvent) {
|
|
14
|
-
onUserEvent(userEvent, currentStep);
|
|
15
|
-
}
|
|
16
|
-
}, []);
|
|
17
|
-
const onExitLocal = useCallback(() => {
|
|
18
|
-
PubSub.publish('EcomOnExit');
|
|
19
|
-
if (onExit) {
|
|
20
|
-
onExit();
|
|
21
|
-
}
|
|
22
|
-
}, []);
|
|
23
|
-
const { id, title, shortDescription, price, data, media } = vehicle;
|
|
24
|
-
const { modelYear, mileage, gearbox, fuelType } = data;
|
|
25
|
-
const imageUrl = (_c = (_b = (_a = media === null || media === void 0 ? void 0 : media[0]) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.url;
|
|
26
|
-
const ecomData = {
|
|
27
|
-
vehicle: {
|
|
28
|
-
id,
|
|
29
|
-
title,
|
|
30
|
-
shortDescription: shortDescription || '',
|
|
31
|
-
price,
|
|
32
|
-
imageUrl,
|
|
33
|
-
modelYear,
|
|
34
|
-
milage: `${mileage}`,
|
|
35
|
-
gearBox: gearbox || '',
|
|
36
|
-
fuelType: fuelType || '',
|
|
37
|
-
},
|
|
38
|
-
serviceLogotypeUrl: (ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.serviceLogotypeUrl) ||
|
|
39
|
-
(manufacturer === null || manufacturer === void 0 ? void 0 : manufacturer.logotype) ||
|
|
40
|
-
'https://cdn.wayke.se/wui/images/ecom/wayke-logo.svg',
|
|
41
|
-
onExit: onExitLocal,
|
|
42
|
-
onUserEvent: onUserEventLocal,
|
|
43
|
-
useBankId: ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.useBankId,
|
|
44
|
-
displayBankIdAlert: ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.displayBankIdAlert,
|
|
45
|
-
};
|
|
46
|
-
return React.createElement(EcomBase, { ...ecomData });
|
|
47
|
-
};
|
|
48
|
-
export default Ecom;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const useEcom = (ecomSettings) => {
|
|
2
|
-
if (ecomSettings === null || ecomSettings === void 0 ? void 0 : ecomSettings.url) {
|
|
3
|
-
import('@wayke-se/ecom').then(({ config }) => {
|
|
4
|
-
config.bind({
|
|
5
|
-
api: {
|
|
6
|
-
address: ecomSettings.url,
|
|
7
|
-
},
|
|
8
|
-
/** Specifying an origin is optional **/
|
|
9
|
-
origin: {
|
|
10
|
-
topic: 'Wayke',
|
|
11
|
-
channel: 'wayke.se',
|
|
12
|
-
},
|
|
13
|
-
bankIdThumbprint: ecomSettings.bankIdThumbprint,
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export default useEcom;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Vehicle, Maybe, Manufacturer } from '../../@types/codegen/types';
|
|
3
|
-
interface EcomProps {
|
|
4
|
-
vehicle: Vehicle;
|
|
5
|
-
manufacturer?: Maybe<Manufacturer>;
|
|
6
|
-
onExit: () => void;
|
|
7
|
-
onUserEvent?: (userEvent: string, currentStep: string) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const Ecom: ({ vehicle, manufacturer, onExit, onUserEvent }: EcomProps) => JSX.Element;
|
|
10
|
-
export default Ecom;
|