@bytebrand/fe-ui-core 4.8.54 → 4.8.55

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 (194) hide show
  1. package/.husky/pre-push +4 -0
  2. package/.storybook/addons.js +4 -0
  3. package/.storybook/config.js +64 -0
  4. package/.storybook/postcss.config.js +6 -0
  5. package/.storybook/preview-head.html +10 -0
  6. package/.storybook/webpack.config.js +130 -0
  7. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +42 -0
  8. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +50 -0
  9. package/__tests__/components/Checkout/RadioGroup.test.tsx +95 -0
  10. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +53 -0
  11. package/__tests__/components/Checkout/Switcher.test.tsx +43 -0
  12. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +613 -0
  13. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +335 -0
  14. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +127 -0
  15. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +58 -0
  16. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +74 -0
  17. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +62 -0
  18. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +117 -0
  19. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +58 -0
  20. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +88 -0
  21. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +91 -0
  22. package/__tests__/components/_common/Badge/Badge.test.tsx +15 -0
  23. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +23 -0
  24. package/__tests__/components/_common/Image/Image.test.tsx +82 -0
  25. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +49 -0
  26. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +54 -0
  27. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +58 -0
  28. package/__tests__/components/_common/StarButton/StarButton.test.tsx +46 -0
  29. package/__tests__/mockedData/financingConfig.js +202 -0
  30. package/__tests__/mockedData/mockedPendingRequestedCar.js +69 -0
  31. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +18 -0
  32. package/__tests__/utils/CommonUtils/arrToObj.test.js +32 -0
  33. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +17 -0
  34. package/__tests__/utils/CommonUtils/fixNumber.test.ts +20 -0
  35. package/__tests__/utils/CommonUtils/formatMileage.test.ts +8 -0
  36. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +22 -0
  37. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +19 -0
  38. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +19 -0
  39. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +51 -0
  40. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +64 -0
  41. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +26 -0
  42. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +33 -0
  43. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +9 -0
  44. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +23 -0
  45. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +23 -0
  46. package/media/locales/de/promoSlider.json +1 -0
  47. package/media/locales/en/promoSlider.json +1 -0
  48. package/package.json +117 -120
  49. package/source/components/AccordionWidget/AccordionWidget.styl +1 -0
  50. package/source/components/AccordionWidget/AccordionWidget.tsx +8 -4
  51. package/source/components/AdvantageItem/AdvantageItem.story.js +23 -0
  52. package/source/components/Alternative/Dealer.story.js +32 -0
  53. package/source/components/Alternative/Dealer.story.styl +3 -0
  54. package/source/components/Breadcrumbs/Breadcrumbs.story.js +40 -0
  55. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +45 -0
  56. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +243 -0
  57. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +21 -0
  58. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +105 -0
  59. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +37 -0
  60. package/source/components/Checkout/Switcher/Switcher.story.js +41 -0
  61. package/source/components/Checkout/Switcher/Switcher.story.styl +2 -0
  62. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +187 -0
  63. package/source/components/ContactForm/ContactForm.story.js +94 -0
  64. package/source/components/ContactForm/ContactForm.story.styl +0 -0
  65. package/source/components/ContactInfo/ContactInfo.story.js +58 -0
  66. package/source/components/CustomerQuote/CustomerQuote.story.js +41 -0
  67. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +73 -0
  68. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +5 -0
  69. package/source/components/FormattedNumber/FormattedNumber.story.js +114 -0
  70. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +101 -0
  71. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +46 -0
  72. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +97 -0
  73. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
  74. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +24 -0
  75. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +0 -1
  76. package/source/components/OfferPanel/OfferPanel.story.js +139 -0
  77. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  78. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +35 -0
  79. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +3 -0
  80. package/source/components/PriceRating/PriceRating.story.js +39 -0
  81. package/source/components/PriceRating/PriceRating.story.styl +2 -0
  82. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +78 -0
  83. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +11 -0
  84. package/source/components/RateSearchValue/RateSearchValue.story.js +78 -0
  85. package/source/components/RateSearchValue/RateSearchValue.story.styl +2 -0
  86. package/source/components/RateSearchWidget/RateSearchWidget.story.js +57 -0
  87. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +12 -0
  88. package/source/components/SearchFilters/FiltersFactory.story.js +273 -0
  89. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +12 -0
  90. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +834 -0
  91. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +40 -0
  92. package/source/components/SearchWidget/SearchWidget.story.js +191 -0
  93. package/source/components/SearchWidget/SearchWidget.story.styl +6 -0
  94. package/source/components/Stepper/Stepper.story.js +119 -0
  95. package/source/components/Stepper/Stepper.story.styl +41 -0
  96. package/source/components/Theme.story.js +36 -0
  97. package/source/components/Theme.story.styl +85 -0
  98. package/source/components/TickerText/TickerText.story.js +17 -0
  99. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +95 -0
  100. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +97 -0
  101. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +31 -0
  102. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +247 -0
  103. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +30 -0
  104. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +18 -0
  105. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +19 -0
  106. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +44 -0
  107. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +23 -11
  108. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +120 -0
  109. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +2 -0
  110. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +7 -4
  111. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +42 -0
  112. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +62 -0
  113. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +42 -0
  114. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +5 -0
  115. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +3 -1
  116. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
  117. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +24 -11
  118. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +3 -2
  119. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +4 -1
  120. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +3 -2
  121. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
  122. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +412 -0
  123. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +56 -0
  124. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +14 -3
  125. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +199 -0
  126. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +40 -0
  127. package/source/components/_common/Accordion/Accordion.story.js +36 -0
  128. package/source/components/_common/Badge/Badge.story.js +27 -0
  129. package/source/components/_common/Badge/Badge.story.styl +5 -0
  130. package/source/components/_common/Bubble/Bubble.story.js +52 -0
  131. package/source/components/_common/Button/Button.story.js +52 -0
  132. package/source/components/_common/Button/Button.story.styl +5 -0
  133. package/source/components/_common/ButtonOld/Button.story.js +54 -0
  134. package/source/components/_common/ButtonOld/Button.story.styl +5 -0
  135. package/source/components/_common/Checkbox/Checkbox.story.js +85 -0
  136. package/source/components/_common/Checkbox/Checkbox.story.styl +14 -0
  137. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +126 -0
  138. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +14 -0
  139. package/source/components/_common/Chip/Chip.story.js +43 -0
  140. package/source/components/_common/ChipList/ChipList.story.js +36 -0
  141. package/source/components/_common/DropDown/DropDown.story.js +35 -0
  142. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +41 -0
  143. package/source/components/_common/Histogram/Histogram.story.js +51 -0
  144. package/source/components/_common/IconSVG/IconSVG.story.js +21 -0
  145. package/source/components/_common/IconSVG/IconSVG.story.styl +25 -0
  146. package/source/components/_common/Image/Image.story.js +142 -0
  147. package/source/components/_common/Image/Image.story.styl +18 -0
  148. package/source/components/_common/ImagesSet/ImagesSet.story.js +34 -0
  149. package/source/components/_common/ImagesSet/ImagesSet.story.styl +4 -0
  150. package/source/components/_common/Loader/Loader.story.js +21 -0
  151. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +49 -0
  152. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +4 -1
  153. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +45 -0
  154. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +6 -0
  155. package/source/components/_common/MaterialField/MaterialField.story.js +87 -0
  156. package/source/components/_common/MaterialField/MaterialField.story.styl +34 -0
  157. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +52 -0
  158. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +6 -0
  159. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +47 -0
  160. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +6 -0
  161. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +17 -0
  162. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +10 -0
  163. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +4 -3
  164. package/source/components/_common/Modal/Modal.story.js +37 -0
  165. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +21 -0
  166. package/source/components/_common/PropertySelector/PSGroup.story.js +93 -0
  167. package/source/components/_common/PropertySelector/PSGroup.story.styl +25 -0
  168. package/source/components/_common/PropertySelector/ProperySelector.story.js +83 -0
  169. package/source/components/_common/Radio/FormRadioGroup.story.js +28 -0
  170. package/source/components/_common/Radio/FormRadioGroup.story.styl +2 -0
  171. package/source/components/_common/Radio/Radio.story.js +54 -0
  172. package/source/components/_common/Radio/RadioGroup.story.js +90 -0
  173. package/source/components/_common/Radio/RadioGroup.story.styl +39 -0
  174. package/source/components/_common/Range/Range.story.js +46 -0
  175. package/source/components/_common/Range/Range.story.styl +5 -0
  176. package/source/components/_common/SliderArrow/SliderArrow.story.js +18 -0
  177. package/source/components/_common/Tabs/Tabs.story.js +56 -0
  178. package/source/components/_common/TimePicker/TimePicker.story.js +37 -0
  179. package/source/components/_common/Tooltip/Tooltip.story.js +28 -0
  180. package/source/components/_common/UserMenu/MaterialMenu.story.js +73 -0
  181. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +99 -0
  182. package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
  183. package/source/components/_common/withLabel/withLabel.story.js +62 -0
  184. package/source/components/_common/withPopover/withPopover.story.js +48 -0
  185. package/source/components/_common/withPopover/withPopover.story.styl +54 -0
  186. package/source/components/_common/withStats/withStats.story.js +75 -0
  187. package/source/components/_common/withStats/withStats.styl +10 -0
  188. package/source/components/_common/withStats/withStats.tsx +2 -11
  189. package/source/framework/DataTransformers.ts +1 -0
  190. package/source/framework/constants/common.ts +8 -4
  191. package/source/framework/types/types.ts +1 -0
  192. package/source/framework/vehiclesProps/decoratedLightProps.tsx +48 -12
  193. package/source/framework/vehiclesProps/decoratedProps.tsx +35 -8
  194. package/source/locales/data.ts +3 -0
@@ -0,0 +1,23 @@
1
+ import { sliceLessThan } from '../../../source/framework/utils/CommonUtils';
2
+
3
+ describe('sliceLessThan', () => {
4
+ it('returns empty array if returned value of `to` is not valid', () => {
5
+ const expected: number[] = [];
6
+
7
+ expect(sliceLessThan([], null)).toEqual(expected);
8
+ expect(sliceLessThan([], undefined)).toEqual(expected);
9
+ expect(sliceLessThan([], {} as any)).toEqual(expected);
10
+ expect(sliceLessThan([], [] as any)).toEqual(expected);
11
+ expect(sliceLessThan([], '')).toEqual(expected);
12
+ expect(sliceLessThan([], 'string')).toEqual(expected);
13
+ expect(sliceLessThan([], NaN)).toEqual(expected);
14
+ expect(sliceLessThan([], Infinity)).toEqual(expected);
15
+ expect(sliceLessThan([], -Infinity)).toEqual(expected);
16
+ });
17
+
18
+ it('returns slice of original array containing only numbers less than `to`', () => {
19
+ const arr: number[] = [5,6,7,8];
20
+ const expected: number[] = [5,6];
21
+ expect(sliceLessThan(arr, 6)).toEqual(expected);
22
+ });
23
+ });
@@ -0,0 +1,23 @@
1
+ import { sliceMoreThan } from '../../../source/framework/utils/CommonUtils';
2
+
3
+ describe('sliceMoreThan', () => {
4
+ const myArray = [1, 2, 3, 4, 5];
5
+
6
+ it('returns empty array if returned value of `from` is not valid', () => {
7
+ const expected: number[] = [];
8
+
9
+ expect(sliceMoreThan([], null)).toEqual(expected);
10
+ expect(sliceMoreThan([], undefined)).toEqual(expected);
11
+ expect(sliceMoreThan([], {} as any)).toEqual(expected);
12
+ expect(sliceMoreThan([], [] as any)).toEqual(expected);
13
+ expect(sliceMoreThan([], '')).toEqual(expected);
14
+ expect(sliceMoreThan([], 'string')).toEqual(expected);
15
+ expect(sliceMoreThan([], NaN)).toEqual(expected);
16
+ expect(sliceMoreThan([], Infinity)).toEqual(expected);
17
+ expect(sliceMoreThan([], -Infinity)).toEqual(expected);
18
+ });
19
+
20
+ it('should return [4, 5] when filtering with 4', () => {
21
+ expect(sliceMoreThan(myArray, 4)).toEqual([4, 5]);
22
+ });
23
+ });
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "consumptionCombined": "{{consumptionCombined}}l/100km (komb)*",
3
3
  "co2": "{{co2}}g CO2/km (komb)*",
4
+ "co2Class": "CO2-Klasse {{class}} (komb)",
4
5
  "weDeliverMagdeburg": "Wir liefern Ihr Auto zu Ihnen nach Magdeburg!",
5
6
  "weDeliverToYou": "Wir liefern Ihr Auto zu Ihnen!",
6
7
  "withoutDeposit": "ohne Anzahlung",
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "consumptionCombined": "{{consumptionCombined}}/100km (comb)*",
3
3
  "co2": "{{co2}}g CO2/km (comb)*",
4
+ "co2Class": "CO2-class {{class}} (comb)",
4
5
  "weDeliverMagdeburg": "We will deliver your car to Magdeburg!",
5
6
  "weDeliverToYou": "We deliver your car to you!",
6
7
  "withoutDeposit": "Without Deposit",
package/package.json CHANGED
@@ -1,120 +1,117 @@
1
- {
2
- "name": "@bytebrand/fe-ui-core",
3
- "version": "4.8.54",
4
- "description": "UI components for the auto.de project",
5
- "main": "index.ts",
6
- "module": "dist/common.js",
7
- "dependencies": {
8
- "@babel/core": "^7.17.8",
9
- "@babel/plugin-proposal-class-properties": "^7.16.7",
10
- "@babel/plugin-proposal-decorators": "^7.17.8",
11
- "@babel/plugin-transform-react-constant-elements": "^7.17.6",
12
- "@babel/preset-env": "^7.20.2",
13
- "@babel/preset-react": "^7.18.6",
14
- "@babel/preset-typescript": "^7.21.0",
15
- "@bytebrand/car-schema-selectors": "^2.0.7",
16
- "@bytebrand/fe-histoslider": "3.0.0",
17
- "@bytebrand/i18n-dictionaries": "^1.5.2",
18
- "@emotion/react": "^11.9.3",
19
- "@emotion/styled": "^11.9.3",
20
- "@mui/material": "^5.9.0",
21
- "@mui/styles": "^5.9.0",
22
- "@mui/x-date-pickers": "^5.0.0-beta.1",
23
- "classnames": "2.2.6",
24
- "d3-format": "1.4.5",
25
- "d3-scale": "^2.2.2",
26
- "date-fns": "2.29.1",
27
- "i18next": "^15.0.4",
28
- "jest": "^26.0.0",
29
- "js-cookie": "^2.2.0",
30
- "moment": "^2.29.1",
31
- "rc-slider": "^8.6.13",
32
- "react": "^17.0.2",
33
- "react-device-detect": "^2.1.2",
34
- "react-dom": "^17.0.2",
35
- "react-grid-system": "^5.0.2",
36
- "react-i18next": "9.0.4",
37
- "react-lazyload": "3.2.0",
38
- "react-scroll": "^1.7.13",
39
- "react-select": "^3.0.4",
40
- "react-slick": "^0.29.0",
41
- "slick-carousel": "1.8.1",
42
- "uuid": "^8.3.2"
43
- },
44
- "devDependencies": {
45
- "@storybook/addon-actions": "^5.1.11",
46
- "@storybook/addon-backgrounds": "^5.1.11",
47
- "@storybook/addon-centered": "^5.1.11",
48
- "@storybook/addon-info": "^5.1.11",
49
- "@storybook/addon-links": "^5.1.11",
50
- "@storybook/addons": "^5.1.11",
51
- "@storybook/react": "^5.3.21",
52
- "@testing-library/dom": "^9.0.1",
53
- "@testing-library/jest-dom": "^5.16.5",
54
- "@testing-library/react": "^11.2.6",
55
- "@types/classnames": "2.2.6",
56
- "@types/d3-format": "^1.3.1",
57
- "@types/i18next": "^12.1.0",
58
- "@types/jest": "^29.4.0",
59
- "@types/js-cookie": "^2.1.0",
60
- "@types/lodash": "^4.14.134",
61
- "@types/qs": "^6.9.7",
62
- "@types/rc-slider": "^9.3.1",
63
- "@types/react": "^17.0.2",
64
- "@types/react-dom": "^17.0.2",
65
- "@types/react-lazyload": "^2.5.0",
66
- "@types/react-scroll": "^1.8.7",
67
- "@types/react-select": "^3.0.2",
68
- "@types/react-slick": "^0.23.4 ",
69
- "@types/uuid": "^8.3.1",
70
- "autoprefixer": "^9.6.0",
71
- "babel-loader": "^8.0.6",
72
- "babel-plugin-minify-dead-code-elimination": "^0.5.0",
73
- "babel-plugin-transform-imports": "^2.0.0",
74
- "css-loader": "^3.2.0",
75
- "jest-css-modules": "^2.1.0",
76
- "jest-css-modules-transform": "^4.4.2",
77
- "jest-dom": "^4.0.0",
78
- "jest-environment-jsdom-sixteen": "^2.0.0",
79
- "jest-junit": "^15.0.0",
80
- "jest-stylus": "^0.1.2",
81
- "jest-svg-transformer": "^1.0.0",
82
- "jest-transform-stub": "^2.0.0",
83
- "lodash": "^4.17.15",
84
- "mobx": "4.6.0",
85
- "mobx-react": "5.4.3",
86
- "postcss-loader": "^3.0.0",
87
- "qs": "6.5.1",
88
- "re-resizable": "^6.0.0",
89
- "react-checkbox-tree": "^1.5.1",
90
- "react-circular-progressbar": "^2.0.4",
91
- "storybook-addon-i18next": "^1.1.0",
92
- "style-loader": "^1.0.0",
93
- "stylus": "^0.54.5",
94
- "stylus-loader": "^3.0.2",
95
- "ts-jest": "^26.0.0",
96
- "tslint": "^5.17.0",
97
- "tslint-config-airbnb": "^5.11.1",
98
- "tslint-loader": "^3.5.4",
99
- "typescript": "^3.5.1",
100
- "webpack-cli": "^3.3.6",
101
- "husky": "^9.0.11"
102
- },
103
- "resolutions": {
104
- "@types/react": "^16.8.3"
105
- },
106
- "scripts": {
107
- "build": "true",
108
- "prepublishOnly": "npm run build",
109
- "prepare": "npm run build",
110
- "storybook": "start-storybook -p 6006",
111
- "clean": "rm -rf ./dist/*.*",
112
- "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
113
- "build:story": "build-storybook",
114
- "test": "jest --watch",
115
- "test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
116
- "test:coverage": "yarn run test -- --coverage --watchAll=false || exit 0"
117
- },
118
- "author": "Maks Okhmatenko",
119
- "license": "UNLICENSED"
120
- }
1
+ {
2
+ "name": "@bytebrand/fe-ui-core",
3
+ "version": "4.8.55",
4
+ "description": "UI components for the auto.de project",
5
+ "main": "index.ts",
6
+ "module": "dist/common.js",
7
+ "dependencies": {
8
+ "@babel/core": "^7.17.8",
9
+ "@babel/plugin-proposal-class-properties": "^7.16.7",
10
+ "@babel/plugin-proposal-decorators": "^7.17.8",
11
+ "@babel/plugin-transform-react-constant-elements": "^7.17.6",
12
+ "@babel/preset-env": "^7.20.2",
13
+ "@babel/preset-react": "^7.18.6",
14
+ "@babel/preset-typescript": "^7.21.0",
15
+ "@bytebrand/car-schema-selectors": "^2.0.7",
16
+ "@bytebrand/fe-histoslider": "3.0.0",
17
+ "@bytebrand/i18n-dictionaries": "^0.7.5",
18
+ "@emotion/react": "^11.9.3",
19
+ "@emotion/styled": "^11.9.3",
20
+ "@mui/material": "^5.9.0",
21
+ "@mui/styles": "^5.9.0",
22
+ "@mui/x-date-pickers": "^5.0.0-beta.1",
23
+ "classnames": "2.2.6",
24
+ "d3-format": "1.4.5",
25
+ "d3-scale": "^2.2.2",
26
+ "date-fns": "2.29.1",
27
+ "i18next": "^15.0.4",
28
+ "jest": "^26.0.0",
29
+ "js-cookie": "^2.2.0",
30
+ "moment": "^2.29.1",
31
+ "rc-slider": "^8.6.13",
32
+ "react": "^17.0.2",
33
+ "react-device-detect": "^2.1.2",
34
+ "react-dom": "^17.0.2",
35
+ "react-grid-system": "^5.0.2",
36
+ "react-i18next": "9.0.4",
37
+ "react-lazyload": "3.2.0",
38
+ "react-scroll": "^1.7.13",
39
+ "react-select": "^3.0.4",
40
+ "react-slick": "^0.29.0",
41
+ "slick-carousel": "1.8.1",
42
+ "uuid": "^8.3.2"
43
+ },
44
+ "devDependencies": {
45
+ "@storybook/addon-actions": "^5.1.11",
46
+ "@storybook/addon-backgrounds": "^5.1.11",
47
+ "@storybook/addon-centered": "^5.1.11",
48
+ "@storybook/addon-info": "^5.1.11",
49
+ "@storybook/addon-links": "^5.1.11",
50
+ "@storybook/addons": "^5.1.11",
51
+ "@storybook/react": "^5.3.21",
52
+ "@testing-library/dom": "^9.0.1",
53
+ "@testing-library/jest-dom": "^5.16.5",
54
+ "@testing-library/react": "^11.2.6",
55
+ "@types/classnames": "2.2.6",
56
+ "@types/d3-format": "^1.3.1",
57
+ "@types/i18next": "^12.1.0",
58
+ "@types/jest": "^29.4.0",
59
+ "@types/js-cookie": "^2.1.0",
60
+ "@types/lodash": "^4.14.134",
61
+ "@types/qs": "^6.9.7",
62
+ "@types/rc-slider": "^9.3.1",
63
+ "@types/react": "^17.0.2",
64
+ "@types/react-dom": "^17.0.2",
65
+ "@types/react-lazyload": "^2.5.0",
66
+ "@types/react-scroll": "^1.8.7",
67
+ "@types/react-select": "^3.0.2",
68
+ "@types/react-slick": "^0.23.4 ",
69
+ "@types/uuid": "^8.3.1",
70
+ "autoprefixer": "^9.6.0",
71
+ "babel-loader": "^8.0.6",
72
+ "babel-plugin-minify-dead-code-elimination": "^0.5.0",
73
+ "babel-plugin-transform-imports": "^2.0.0",
74
+ "css-loader": "^3.2.0",
75
+ "jest-css-modules": "^2.1.0",
76
+ "jest-css-modules-transform": "^4.4.2",
77
+ "jest-dom": "^4.0.0",
78
+ "jest-environment-jsdom-sixteen": "^2.0.0",
79
+ "jest-junit": "^15.0.0",
80
+ "jest-stylus": "^0.1.2",
81
+ "jest-svg-transformer": "^1.0.0",
82
+ "jest-transform-stub": "^2.0.0",
83
+ "lodash": "^4.17.15",
84
+ "mobx": "4.6.0",
85
+ "mobx-react": "5.4.3",
86
+ "postcss-loader": "^3.0.0",
87
+ "qs": "6.5.1",
88
+ "re-resizable": "^6.0.0",
89
+ "react-checkbox-tree": "^1.5.1",
90
+ "react-circular-progressbar": "^2.0.4",
91
+ "storybook-addon-i18next": "^1.1.0",
92
+ "style-loader": "^1.0.0",
93
+ "stylus": "^0.54.5",
94
+ "stylus-loader": "^3.0.2",
95
+ "ts-jest": "^26.0.0",
96
+ "tslint": "^5.17.0",
97
+ "tslint-config-airbnb": "^5.11.1",
98
+ "tslint-loader": "^3.5.4",
99
+ "typescript": "^3.5.1",
100
+ "webpack-cli": "^3.3.6",
101
+ "husky": "^9.0.11"
102
+ },
103
+ "resolutions": {
104
+ "@types/react": "^16.8.3"
105
+ },
106
+ "scripts": {
107
+ "storybook": "start-storybook -p 6006",
108
+ "clean": "rm -rf ./dist/*.*",
109
+ "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
110
+ "build:story": "build-storybook",
111
+ "test": "jest --watch",
112
+ "test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
113
+ "test:coverage": "yarn run test -- --coverage --watchAll=false || exit 0"
114
+ },
115
+ "author": "Maks Okhmatenko",
116
+ "license": "UNLICENSED"
117
+ }
@@ -191,6 +191,7 @@
191
191
  height: 45px
192
192
  border-bottom 1px solid $grey-e
193
193
  text-transform: none
194
+ font-size: 11px
194
195
 
195
196
  +media-tablet-landscape-down()
196
197
  padding-top: 7px;
@@ -36,7 +36,7 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
36
36
  key={i}
37
37
  description={prop.description}
38
38
  classNameIcon={styles.propertyIcon}
39
- icon={prop.icon || 'no-image'}
39
+ icon={prop.icon === '' ? '' : (prop.icon || 'no-image')}
40
40
  className={styles.accordionVehicleProp}
41
41
  />
42
42
  );
@@ -101,9 +101,13 @@ class AccordionWidget extends React.Component<IAccardionSectionProps> {
101
101
  const autoDeId = car.metaData && car.metaData.vehicleId;
102
102
  const { consumption } = car;
103
103
  const mainPropertiesList = getOverviewDetails(consumption.fuel);
104
- const mainProperties = mainPropertiesList.map((prop: string) => (
105
- { icon: this.props.decoratedProps[prop].icon, description: this.props.decoratedProps[prop].value })
106
- );
104
+ const mainProperties = mainPropertiesList.map((prop: string) => {
105
+ const isConsumptionAlternateView = prop.startsWith('consumption') && prop.endsWith('AlternateView');
106
+ return {
107
+ icon: isConsumptionAlternateView ? '' : this.props.decoratedProps[prop].icon,
108
+ description: this.props.decoratedProps[prop].value
109
+ };
110
+ });
107
111
  return (
108
112
  <div>
109
113
  {this.renderPropsBlock(mainProperties)}
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { storiesOf } from '@storybook/react';
3
+
4
+ const bestExchange = require('../../../media/images/advantages/cert-best-car-exchange.jpg');
5
+ const highestConf = require('../../../media/images/advantages/cert-highest-confidence.jpg');
6
+ const advantage_shop = require('../../../media/images/advantages/advantage_cart.svg');
7
+ const advantage_checked = require('../../../media/images/advantages/advantage_check.svg');
8
+ const advantage_easy = require('../../../media/images/advantages/advantage_like.svg');
9
+ const advantage_safe = require('../../../media/images/advantages/advantage_secure.svg');
10
+
11
+ import AdvantageItem from './AdvantageItem';
12
+
13
+ storiesOf('AdvantageItem', module)
14
+ .add('default', () => (
15
+ <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-around', width: 600, backgroundColor: 'lightgray' }}>
16
+ <AdvantageItem imageSrc={bestExchange} />
17
+ <AdvantageItem title='GEPRÜFT' imageSrc={advantage_checked} />
18
+ <AdvantageItem title='EINFACH' imageSrc={advantage_easy} />
19
+ <AdvantageItem title='sicher' imageSrc={advantage_safe} />
20
+ <AdvantageItem title='kaufen' imageSrc={advantage_shop} />
21
+ <AdvantageItem imageSrc={highestConf} />
22
+ </div>
23
+ ));
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { storiesOf } from '@storybook/react';
3
+ import DealerInfo from './DealerInfo';
4
+
5
+ import styles from './Dealer.story.styl';
6
+
7
+ const infoSections = [
8
+ {
9
+ title: 'Adresse',
10
+ value: 'Roteweg, 21 Stuttgart 70437'
11
+ },
12
+ {
13
+ title: 'Name',
14
+ value: 'Mahmood Saeedi'
15
+ },
16
+ {
17
+ title: 'Telefon',
18
+ value: '01779335555',
19
+ icon: 'telephone'
20
+ },
21
+ {
22
+ title: 'E-Mail',
23
+ value: 'mahmood.saeedi@auto.de'
24
+ }
25
+ ]
26
+
27
+ storiesOf('Alternative', module)
28
+ .add('DealerInfo', () => (
29
+ <div className={styles.dealerInfoContainer}>
30
+ <DealerInfo infoSections={infoSections} t={phrase => phrase} dealerPrice={10000} unsereMarge={1000} link='www.google.com' linkName='link'/>
31
+ </div>
32
+ ))
@@ -0,0 +1,3 @@
1
+ .dealerInfoContainer
2
+ width: 360px
3
+ margin: 0 auto
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { storiesOf } from '@storybook/react';
3
+ import Breadcrumbs from '../Breadcrumbs/Breadcrumbs';
4
+
5
+ const infoBlockData = [
6
+ {
7
+ title: 'Top Qualität',
8
+ contentMobile: 'Ganz egal ob Gebraucht- oder Neuwagen: Bei uns finden Sie nur fachkundig geprüfte und evaluierte Fahrzeuge'
9
+ },
10
+ {
11
+ title: '1 Jahr auto.de-Garantie',
12
+ contentMobile: 'Unsere 1 Jahr auto.de Garantie schützt Sie vor unerwarteten Reparaturkosten und unnötigem Papierkram'
13
+ },
14
+ {
15
+ title: 'Günstige Finanzierung',
16
+ contentMobile: 'Unsere Finanzierungsexperten finden mit Ihnen gemeinsam die beste Finanzierungs- und Versicherungsmöglichkeit'
17
+ },
18
+ {
19
+ title: '14 Tage Probefahrt',
20
+ contentMobile: 'Bei uns können Sie Ihr Fahrzeug binnen 14 Tagen zurückgeben, sollten Sie mit diesem nicht zufrieden sein'
21
+ }
22
+ ];
23
+
24
+ const BreadcrumbsContainer = () => {
25
+ return (
26
+ <div>
27
+ <Breadcrumbs page='VEHICLE_DETAILS' infoBlockData={infoBlockData}/>
28
+ </div>
29
+ )
30
+ }
31
+
32
+ storiesOf('Breadcrumbs', module)
33
+ .add('Breadcrumbs', () => (
34
+ <div>
35
+ <div>
36
+ <BreadcrumbsContainer />
37
+ </div>
38
+ </div>
39
+ ));
40
+ export default BreadcrumbsContainer;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { storiesOf } from '@storybook/react';
3
+ import FirstInfoBlock from './FirstInfoBlock';
4
+
5
+ const infoBlockData = [
6
+ {
7
+ title: 'price',
8
+ contentMobile: 'priceTextMobile'
9
+ },
10
+ {
11
+ title: 'autoDeCheck',
12
+ contentMobile: 'autoDeCheckTextMobile'
13
+ },
14
+ {
15
+ title: 'guarantee',
16
+ contentMobile: 'guaranteeTextMobile'
17
+ },
18
+ {
19
+ title: 'warranty',
20
+ contentMobile: 'warrantyTextMobile'
21
+ }
22
+ ];
23
+
24
+ const infoBlockProps = {
25
+ infoBlockData
26
+ }
27
+
28
+ const FirstInfoBlockContainer = () => {
29
+ return (
30
+ <div>
31
+ <FirstInfoBlock {...infoBlockProps}/>
32
+ </div>
33
+ )
34
+ }
35
+
36
+ storiesOf('Breadcrumbs', module)
37
+ .add('FirstInfoBlock', () => (
38
+ <div>
39
+ <div>
40
+ <FirstInfoBlockContainer/>
41
+ </div>
42
+ </div>
43
+ ));
44
+
45
+ export default FirstInfoBlockContainer;