@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.
Files changed (70) hide show
  1. package/README.md +33 -2
  2. package/dist-node/index.js +3254 -1142
  3. package/dist-node/index.js.map +1 -1
  4. package/dist-src/State/CentralStorage/useCentralStorage.js +7 -8
  5. package/dist-src/State/Path/PathProvider.js +1 -1
  6. package/dist-src/State/RelatedSearch/RelatedSearchProvider.js +1 -1
  7. package/dist-src/State/Search/SearchProvider.js +7 -10
  8. package/dist-src/components/ActionList/index.js +2 -3
  9. package/dist-src/components/Checklist/index.js +1 -1
  10. package/dist-src/components/ExtendContent/index.js +1 -1
  11. package/dist-src/components/Filter/index.js +10 -7
  12. package/dist-src/components/FilterPanel/checkListFacet.js +1 -1
  13. package/dist-src/components/FilterPanel/colorFacet.js +1 -1
  14. package/dist-src/components/FilterPanel/index.js +1 -1
  15. package/dist-src/components/FilterPanel/rangeFacet.js +14 -16
  16. package/dist-src/components/FinancialOptions/LoanModal.js +27 -29
  17. package/dist-src/components/FinancialOptions/leasing.js +6 -6
  18. package/dist-src/components/FinancialOptions/loan.js +5 -6
  19. package/dist-src/components/Gallery/index.js +11 -16
  20. package/dist-src/components/Grid/index.js +2 -3
  21. package/dist-src/components/InputSelect/index.js +1 -1
  22. package/dist-src/components/InsuranceOptions/InsuranceFree.js +1 -2
  23. package/dist-src/components/InsuranceOptions/InsuranceFreeModal.js +4 -5
  24. package/dist-src/components/InsuranceOptions/InsuranceModal.js +3 -3
  25. package/dist-src/components/Lightbox/index.js +1 -1
  26. package/dist-src/components/OpeningHours/index.js +9 -9
  27. package/dist-src/components/RangeSlider/SliderWithLabel.js +1 -1
  28. package/dist-src/components/Result/index.js +7 -6
  29. package/dist-src/components/Video/EmbededVideo.js +1 -1
  30. package/dist-src/components/Video/QuickNavEmbeded.js +2 -2
  31. package/dist-src/components/Video/useThumbnail.js +1 -1
  32. package/dist-src/components/Video/utils.js +2 -2
  33. package/dist-src/hooks/useFetch.js +1 -1
  34. package/dist-src/hooks/useVimeoThumbnail.js +1 -1
  35. package/dist-src/layouts/searchItem/Branch.js +9 -10
  36. package/dist-src/layouts/searchItem/BranchModal.js +1 -1
  37. package/dist-src/layouts/searchItem/CheckList.js +16 -16
  38. package/dist-src/layouts/searchItem/ManufacturerPackagesOption.js +1 -2
  39. package/dist-src/layouts/searchItem/PackageOptionModal.js +7 -10
  40. package/dist-src/layouts/searchItem/PackageOptions.js +11 -14
  41. package/dist-src/layouts/searchItem/Property.js +4 -6
  42. package/dist-src/layouts/searchItem/Related.js +3 -4
  43. package/dist-src/layouts/searchItem/index.js +42 -21
  44. package/dist-src/providers/WaykeItemProvidet.js +7 -11
  45. package/dist-src/providers/WaykeProvider.js +8 -12
  46. package/dist-src/utils/phonenumbers.js +1 -1
  47. package/dist-src/utils/specification.js +9 -13
  48. package/dist-src/utils/vehicle-properties/property-tree-creator.js +5 -5
  49. package/dist-types/State/CentralStorage/useCentralStorage.d.ts +1 -1
  50. package/dist-types/State/Settings/SettingsContext.d.ts +1 -0
  51. package/dist-types/components/InputSearch/index.d.ts +5 -3
  52. package/dist-types/components/RangeSlider/handle.d.ts +2 -2
  53. package/dist-types/components/RangeSlider/track.d.ts +2 -2
  54. package/dist-types/components/Video/useThumbnail.d.ts +1 -1
  55. package/dist-types/components/Video/utils.d.ts +2 -2
  56. package/dist-types/hooks/useFetch.d.ts +1 -1
  57. package/dist-types/hooks/useInsurance.d.ts +1 -1
  58. package/dist-types/hooks/useLoan.d.ts +1 -1
  59. package/dist-types/hooks/useSearchItem.d.ts +1 -1
  60. package/dist-types/hooks/useSearchItemBranch.d.ts +1 -1
  61. package/dist-types/hooks/useVimeoThumbnail.d.ts +1 -1
  62. package/dist-types/utils/regex.d.ts +1 -1
  63. package/dist-types/utils/ssn.d.ts +1 -1
  64. package/dist-web/index.js +250 -323
  65. package/dist-web/index.js.map +1 -1
  66. package/package.json +18 -26
  67. package/dist-src/components/Ecom/index.js +0 -48
  68. package/dist-src/hooks/useEcom.js +0 -18
  69. package/dist-types/components/Ecom/index.d.ts +0 -10
  70. package/dist-types/hooks/useEcom.d.ts +0 -3
package/README.md CHANGED
@@ -21,7 +21,9 @@ npm install react react-dom styled-components
21
21
  ```javascript
22
22
  import React from 'react';
23
23
  import WaykeComposite from '@wayke-se/components-react'
24
- import '@wayke.se/components-react/assets/default.css';
24
+ import '@wayke-se/components-react/assets/default.css';
25
+ // Optional
26
+ import '@wayke-se/ecom-web/dist/index.css';
25
27
 
26
28
  const ProviderSettings: WaykeProviderSettings = {
27
29
  graphQlUrl: "https://gql.wayketech.se/query",
@@ -40,6 +42,31 @@ const App = () => (
40
42
  );
41
43
  ```
42
44
 
45
+ ### Environments for test
46
+ ```javascript
47
+ const ProviderSettings: WaykeProviderSettings = {
48
+ graphQlUrl: "https://gql.wayketech.se/query",
49
+ url: "https://test-ext-api.wayketech.se/vehicles",
50
+ urlMlt: "https://test-ext-api.wayketech.se/vehicles-mlt-ext",
51
+ ecomSettings: {
52
+ url: "https://ecom.wayketech.se",
53
+ },
54
+ }
55
+ ```
56
+
57
+ ### Environments for production
58
+ ```javascript
59
+ const ProviderSettings: WaykeProviderSettings = {
60
+ graphQlUrl: "https://gql.wayke.se/query",
61
+ url: "https://api.wayke.se/vehicles",
62
+ urlMlt: "https://api.wayke.se/vehicles-mlt-ext",
63
+ ecomSettings: {
64
+ url: "https://ecom.wayke.se",
65
+ },
66
+ }
67
+ ```
68
+
69
+
43
70
  ### WaykeComposite uses hash-route, i want to use path-route
44
71
 
45
72
  In this case you need to make sure that you are in control of the routing where same html file is
@@ -49,6 +76,8 @@ served for `/your/path/to/this/component` and `/your/path/to/this/component/0000
49
76
  import React from 'react';
50
77
  import { WaykeCompositePath } from '@wayke-se/components-react'
51
78
  import '@wayke.se/components-react/assets/default.css';
79
+ // Optional
80
+ import '@wayke-se/ecom-web/dist/index.css';
52
81
 
53
82
  const App = () => (
54
83
  <WaykeCompositePath
@@ -90,6 +119,8 @@ It's recomended to place WaykeItemProvider close to app-root in order to keep th
90
119
  import React, { useCallback } from 'react';
91
120
  import { WaykeItemProvider, WaykeSearchItem } from '@wayke-se/components-react'
92
121
  import '@wayke.se/components-react/assets/default.css';
122
+ // Optional
123
+ import '@wayke-se/ecom-web/dist/index.css';
93
124
 
94
125
  const App = ({}) => {
95
126
  const id = 'd01f79a3-7552-49c4-9d4d-deb3aa581c31';
@@ -431,7 +462,7 @@ To style the components, copy the following snippet into your *CSS* file and mod
431
462
  ```
432
463
 
433
464
  ### Ecom theme
434
- The default ecom css can be found and imported `node_module/@wayke-se/ecom-react/assets/styles/default.css`.
465
+ The default ecom css can be found and imported `node_module/@wayke-se/ecom-web/dist/index.css`.
435
466
 
436
467
  > **It is highly recommended to *NOT* add or remove any properties defined above in the color selectors**. However, since fonts usually requires more configuration we encourage you to add the necessary font styling required to match your current profile. If you add new properties to the font selectors, please be careful and ensure everything looks as intended before going into production.
437
468