@bytebrand/fe-ui-core 4.8.52 → 4.8.54

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/media/locales/de/promoSlider.json +0 -1
  2. package/media/locales/en/promoSlider.json +0 -1
  3. package/package.json +120 -117
  4. package/source/components/AccordionWidget/AccordionWidget.styl +0 -1
  5. package/source/components/AccordionWidget/AccordionWidget.tsx +4 -8
  6. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
  7. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +0 -24
  8. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
  9. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  10. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
  11. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +0 -2
  12. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +4 -7
  13. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -5
  14. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +1 -3
  15. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
  16. package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +11 -24
  17. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
  18. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
  19. package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
  20. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
  21. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +3 -14
  22. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
  23. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -4
  24. package/source/components/_common/withStats/withStats.styl +0 -10
  25. package/source/components/_common/withStats/withStats.tsx +12 -3
  26. package/source/framework/DataTransformers.ts +0 -1
  27. package/source/framework/constants/common.ts +4 -8
  28. package/source/framework/types/types.ts +0 -1
  29. package/source/framework/vehiclesProps/decoratedLightProps.tsx +12 -48
  30. package/source/framework/vehiclesProps/decoratedProps.tsx +8 -35
  31. package/source/locales/data.ts +0 -3
  32. package/.husky/pre-push +0 -4
  33. package/.storybook/addons.js +0 -4
  34. package/.storybook/config.js +0 -64
  35. package/.storybook/postcss.config.js +0 -6
  36. package/.storybook/preview-head.html +0 -10
  37. package/.storybook/webpack.config.js +0 -130
  38. package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
  39. package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
  40. package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
  41. package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
  42. package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
  43. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  44. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  45. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
  46. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
  47. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
  48. package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
  49. package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
  50. package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
  51. package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
  52. package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
  53. package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
  54. package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
  55. package/__tests__/components/_common/Image/Image.test.tsx +0 -82
  56. package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
  57. package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
  58. package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
  59. package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
  60. package/__tests__/mockedData/financingConfig.js +0 -202
  61. package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
  62. package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
  63. package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
  64. package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
  65. package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
  66. package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
  67. package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
  68. package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
  69. package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
  70. package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
  71. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
  72. package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
  73. package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
  74. package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
  75. package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
  76. package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
  77. package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
  78. package/source/components/Alternative/Dealer.story.js +0 -32
  79. package/source/components/Alternative/Dealer.story.styl +0 -3
  80. package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
  81. package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
  82. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
  83. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
  84. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
  85. package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
  86. package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
  87. package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
  88. package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
  89. package/source/components/ContactForm/ContactForm.story.js +0 -94
  90. package/source/components/ContactForm/ContactForm.story.styl +0 -0
  91. package/source/components/ContactInfo/ContactInfo.story.js +0 -58
  92. package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
  93. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
  94. package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
  95. package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
  96. package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
  97. package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
  98. package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
  99. package/source/components/OfferPanel/OfferPanel.story.js +0 -139
  100. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
  101. package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
  102. package/source/components/PriceRating/PriceRating.story.js +0 -39
  103. package/source/components/PriceRating/PriceRating.story.styl +0 -2
  104. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
  105. package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
  106. package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
  107. package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
  108. package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
  109. package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
  110. package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
  111. package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
  112. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
  113. package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
  114. package/source/components/SearchWidget/SearchWidget.story.js +0 -191
  115. package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
  116. package/source/components/Stepper/Stepper.story.js +0 -119
  117. package/source/components/Stepper/Stepper.story.styl +0 -41
  118. package/source/components/Theme.story.js +0 -36
  119. package/source/components/Theme.story.styl +0 -85
  120. package/source/components/TickerText/TickerText.story.js +0 -17
  121. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
  122. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
  123. package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
  124. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
  125. package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
  126. package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
  127. package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
  128. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
  129. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
  130. package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
  131. package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
  132. package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
  133. package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
  134. package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
  135. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
  136. package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
  137. package/source/components/_common/Accordion/Accordion.story.js +0 -36
  138. package/source/components/_common/Badge/Badge.story.js +0 -27
  139. package/source/components/_common/Badge/Badge.story.styl +0 -5
  140. package/source/components/_common/Bubble/Bubble.story.js +0 -52
  141. package/source/components/_common/Button/Button.story.js +0 -52
  142. package/source/components/_common/Button/Button.story.styl +0 -5
  143. package/source/components/_common/ButtonOld/Button.story.js +0 -54
  144. package/source/components/_common/ButtonOld/Button.story.styl +0 -5
  145. package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
  146. package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
  147. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
  148. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
  149. package/source/components/_common/Chip/Chip.story.js +0 -43
  150. package/source/components/_common/ChipList/ChipList.story.js +0 -36
  151. package/source/components/_common/DropDown/DropDown.story.js +0 -35
  152. package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
  153. package/source/components/_common/Histogram/Histogram.story.js +0 -51
  154. package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
  155. package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
  156. package/source/components/_common/Image/Image.story.js +0 -142
  157. package/source/components/_common/Image/Image.story.styl +0 -18
  158. package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
  159. package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
  160. package/source/components/_common/Loader/Loader.story.js +0 -21
  161. package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
  162. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
  163. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
  164. package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
  165. package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
  166. package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
  167. package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
  168. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
  169. package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
  170. package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
  171. package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
  172. package/source/components/_common/Modal/Modal.story.js +0 -37
  173. package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
  174. package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
  175. package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
  176. package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
  177. package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
  178. package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
  179. package/source/components/_common/Radio/Radio.story.js +0 -54
  180. package/source/components/_common/Radio/RadioGroup.story.js +0 -90
  181. package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
  182. package/source/components/_common/Range/Range.story.js +0 -46
  183. package/source/components/_common/Range/Range.story.styl +0 -5
  184. package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
  185. package/source/components/_common/Tabs/Tabs.story.js +0 -56
  186. package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
  187. package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
  188. package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
  189. package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
  190. package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
  191. package/source/components/_common/withLabel/withLabel.story.js +0 -62
  192. package/source/components/_common/withPopover/withPopover.story.js +0 -48
  193. package/source/components/_common/withPopover/withPopover.story.styl +0 -54
  194. package/source/components/_common/withStats/withStats.story.js +0 -75
@@ -1,62 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { action } from '@storybook/addon-actions';
4
-
5
- import VehiclePromoSlide from './VehiclePromoSlide';
6
-
7
- // Stateful container for testing interaction
8
- class VehiclePromoSlideContainer extends React.Component {
9
- render() {
10
- const { t } = this.props;
11
-
12
- const props = {
13
- t: key => key,
14
- _id: 'e18efa30-a4d2-48d7-b0d7-d1701731af2a',
15
- title: 'BMW 114',
16
- showNewLabel: true,
17
- vehicleLink:
18
- '',
19
- src:
20
- 'https://images.auto.de/carimage/858c5bae-12d2-4180-ad01-6576c2160dc0/WF-8oH7LX-iw/medium-transparent',
21
- environmentEmissions:
22
- { energyEfficiencyClass: 'energyEff',
23
- co2: 115,
24
- emissionClass: 'emissionClass',
25
- emissionSticker: 'emissionSticker' },
26
- consumption:
27
- { consumptionUnit: 'unit',
28
- fuel: 'petrol',
29
- consumptionCombined: 4.9 },
30
- price:
31
- { currency: 'EUR',
32
- wasPrice: 14789,
33
- currentSalesPrice: 100000,
34
- vatRate: 19,
35
- recomendedRetailPrice: 120000,
36
- retailToCurrentPriceDifference: -20000,
37
- historyPriceDifferencePerCent: 17,
38
- historyPriceDifference: 20000,
39
- mlCurrentSalesPricePredicted: 98000,
40
- mlCurrentSalesPriceDiffPercent: 2.0408163265306145 },
41
- monthlyInstallment: 714.69,
42
- oldMonthlyInstallment: 1082.29,
43
- bubblesColor: '#fd5a1c',
44
- bubbleContent: 'Super Angebot!',
45
- onButtonClick: action('offer button click'),
46
- onFinancingDetailsClick: action('financing button click')
47
- };
48
-
49
- return (
50
- <div style={{ marginTop: 100 }}>
51
- <VehiclePromoSlide {...props} />
52
- </div>
53
- );
54
- }
55
- }
56
-
57
- storiesOf('VehiclePromoSlide', module)
58
- .add('Default', () => (
59
- <div>
60
- <VehiclePromoSlideContainer />
61
- </div>
62
- ));
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { action } from '@storybook/addon-actions';
4
-
5
- import cars from './cars'; // fake data from top api request
6
-
7
- import VehiclePromoSlider from './VehiclePromoSlider';
8
-
9
- const defaultSliderStateProps = {
10
- t: key => key,
11
- cars
12
- };
13
-
14
- const withHandlersSliderStateProps = {
15
- t: key => key,
16
- cars,
17
- onButtonClick: action('offer button click'),
18
- onFinancingDetailsClick: action('financing button click')
19
- };
20
-
21
- // Stateful container for testing interaction
22
- class VehiclePromoSliderContainer extends React.Component {
23
- render() {
24
- return (
25
- <div style={{ marginTop: 100 }}>
26
- <VehiclePromoSlider {...this.props} />
27
- </div>
28
- );
29
- }
30
- }
31
-
32
- storiesOf('VehiclePromoSlider', module)
33
- .add('Default', () => (
34
- <div style={{ width: '90vw', height: '75vh' }}>
35
- <VehiclePromoSliderContainer {...defaultSliderStateProps} />
36
- </div>
37
- ))
38
- .add('With Handlers', () => (
39
- <div style={{ width: '90vw', height: '75vh' }}>
40
- <VehiclePromoSliderContainer {...withHandlersSliderStateProps} />
41
- </div>
42
- ));
@@ -1,412 +0,0 @@
1
- import React from 'react';
2
- import i18next from 'i18next';
3
- import { Resizable } from 're-resizable';
4
- import classnames from 'classnames';
5
- // import * as CheckboxTree from 'react-checkbox-tree';
6
- import { withNamespaces } from 'react-i18next';
7
- import { storiesOf } from '@storybook/react';
8
- import { action } from '@storybook/addon-actions';
9
- // import { CircularProgressbar, buildStyles } from 'react-circular-progressbar';
10
- import VehicleSmallCard from './VehicleSmallCard.tsx';
11
- import styles from './VehicleSmallCard.story.styl';
12
-
13
-
14
- i18next.addResourceBundle('de', 'vehicleProps', {
15
- value: {
16
- mileage: "{{mileage}} km",
17
- consumption: "{{consumption}}l/100km",
18
- consumptionPower: "{{consumption}}kWh/100km",
19
- consumptionPowerCombined: "{{consumption}}kWh/100km (komb)*",
20
- consumptionGas: "{{consumption}}kg/100km",
21
- consumptionCombined: "{{consumption}}l/100km",
22
- power: "{{powerKW}}\u00A0kW ({{powerPS}}\u00A0PS)",
23
- powerPS: "{{powerPS}} PS",
24
- deliveryPeriodMonths: "{{count}} Monat\nab Bestellung",
25
- deliveryPeriodDays: "{{count}} Tag\nab Bestellung",
26
- co2Combined: "{{co2}}g CO2/km (komb)*",
27
- co2: "{{co2}} g/km ",
28
- na: "N/A"
29
- },
30
- priceRating: {
31
- noRating: 'KEINE BEWERTUNG',
32
- highPrice: 'HOHER PREIS',
33
- increasedPrice: 'ERHÖHTER PREIS',
34
- fairPrice: 'FAIRER PREIS',
35
- goodPrice: 'GUTER PREIS',
36
- topPrice: 'TOP PREIS'
37
- },
38
- promoSlider: {
39
- consumptionCombined: `{{consumptionCombined}} l/100km (komb)*`,
40
- co2: `{{co2}} g CO2/km (komb)*`,
41
- new: 'neu'
42
- },
43
- title: {
44
- addOfferToMainSlide: 'Zum Schieberegler hinzufügen',
45
- toOffer: 'zum Angebot',
46
- monthlyFrom: 'monatlich ab',
47
- financing: 'Finanzierung',
48
- leasing: 'Leasing',
49
- abo: 'Abo',
50
- buy: 'Kaufen',
51
- margeInkl: "inkl. Marge",
52
- marge: "Unsere Marge",
53
- financingDescription: `Bei der Finanzierung zahlen Sie lediglich die Zinsen des Darlehens und einen geringen Tilgungsanteil.
54
- Zum Vertragsende können Sie entscheiden, ob Sie den Restbetrag ablösen oder weiter finanzieren wollen.`,
55
- leasingDescription: `Beim Leasing zahlen Sie lediglich die Zinsen des Darlehens und einen geringen
56
- Tilgungsanteil. Zum Vertragsende geben Sie das Auto einfach wieder zurück.`,
57
- aboDescription: `Bei diesem Auto-Abo ist bereits alles an Bord. Teil- und
58
- Vollkasko sowie Haftpflicht sind inklusive, ebenso wie Wartungs- und Verschleißreparaturen.
59
- Sie zahlen also nur Ihre Rate und Kraftstoff.`,
60
- buyDescription: `Nach Kaufabschluss haben Sie die sofortigen
61
- Eigentumsrechte und keine Finanzierungskosten. Als Eigentümer können Sie Ihr Fahrzeug zu
62
- eigenen Konditionen weiter verkaufen und Änderungen vornehmen.`
63
- }
64
- });
65
-
66
- const resizablePropsSlider = {
67
- minWidth: 150,
68
- defaultSize: { width: 360, height: 'auto' }
69
- };
70
- const resizableProps = {
71
- className: styles.resizable,
72
- minWidth: 150,
73
- defaultSize: { width: 360, height: 'auto' }
74
- };
75
-
76
- const resizablePropsComparable = {
77
- className: styles.resizable,
78
- minWidth: 150,
79
- defaultSize: { width: 230, height: 'auto' }
80
- };
81
-
82
- const resizablePropsSearch = {
83
- className: styles.resizable,
84
- defaultSize: { width: 803, height: 283 }
85
- };
86
-
87
- const resizablePropsAlternative = {
88
- className: styles.resizable,
89
- defaultSize: { width: 803 } // height: 265
90
- };
91
-
92
- const IMAGE_URL = 'https://picsum.photos/400/300/?random';
93
- const images = [];
94
- for (let i = 0; i <= 10; i++) {
95
- images.push({ url: `${IMAGE_URL}&tag=${Math.random()}`, description: '' });
96
- }
97
-
98
-
99
-
100
-
101
- const VehicleSmallCardStory = withNamespaces('vehicleProps')(({ t }) => {
102
-
103
- const renderCircularProgressbar = (percentage) => {
104
- const checkPercentage = percentage < 50 ?
105
- '#EE0202' :
106
- (percentage >= 50 && percentage < 80) ?
107
- '#00B800' :
108
- '#005CCB';
109
- return (
110
- <div className={
111
- classnames(
112
- styles.progressWrap,
113
- { [styles.progressWrapFull]: percentage === 100 },
114
- { [styles.progressWrapMin]: percentage < 10 }
115
- )
116
- }>
117
- <CircularProgressbar
118
- value={percentage}
119
- text={`${percentage}`}
120
- styles={buildStyles({
121
- textSize: '32px',
122
- pathColor: checkPercentage,
123
- textColor: checkPercentage,
124
- trailColor: '#D5D5D5'
125
- })}
126
- />
127
- </div>
128
- );
129
- };
130
-
131
- const cardPropsSlider = {
132
- t,
133
- language: 'de',
134
- vehicleComponentName: 'landing',
135
- isAlternative: false,
136
- showSlider: true,
137
- showNewLabel: true,
138
- slider: {
139
- mainImageUrl: 'http://placehold.jp/400x300.png?text=mainImage',
140
- images,
141
- arrowsSize: 'md',
142
- onFirstChange: action('first change')
143
- },
144
- stats: {
145
- imagesCount: 100,
146
- isFavoured: true,
147
- statsData: {
148
- totalCarImpCount: 10,
149
- totalFavCount: 20,
150
- },
151
- statsSize: 'xs'
152
- },
153
- title: {
154
- make: 'Audi',
155
- model: 'A4',
156
- },
157
- info: {
158
- mileage: 10464,
159
- regDate: 1535760000,
160
- gearbox: 'selector_gearbox_automatic'
161
- },
162
- environmentEmissions: {
163
- co2: 8.7
164
- },
165
- consumption: {
166
- consumptionCombined: 9.6,
167
- consumptionPowerCombined: 3.6,
168
- fuel: 'selector_fuel_electrical'
169
- },
170
- engineData: {
171
- cubicCapacity: 1968,
172
- cylinders: 0,
173
- particulateFilterDiesel: true,
174
- powerKW: 140,
175
- powerPS: 190,
176
- startStopSystem: true,
177
- },
178
- offer : {
179
- availabilityFrom: null,
180
- availabilityMode: "selector_availabilityMode_always",
181
- deliveryPeriod: "selector_unknown"
182
- },
183
- financing: {
184
- annualPercentageRate: "",
185
- bank: "",
186
- closingCosts: null,
187
- conditions: null,
188
- finalInstallment: null,
189
- financingBank: "",
190
- firstInstallment: 0,
191
- grossLoanAmount: "",
192
- monthlyInstallment: 108,
193
- netLoanAmount: "",
194
- nominalInterestRate: "",
195
- paybackPeriod: "24",
196
- paymentProtectionInsurance: "",
197
- platformFinancingId: null,
198
- transportationCosts: "",
199
- typeOfNominalInterestRate: null
200
- },
201
- leasing: {
202
- RWG: 10,
203
- addServicesCost: 799,
204
- annualMileage: null,
205
- closingCosts: null,
206
- financialInstitution: null,
207
- firstInstallment: null,
208
- leasingMode: "default",
209
- maxAge: null,
210
- maxMileage: null,
211
- nominalInterestRate: null,
212
- paybackPeriod: null,
213
- paymentProtectionInsurance: null,
214
- purchasePrice: null,
215
- santanderPayBackMin: 250,
216
- transportationCost: null
217
- },
218
- price: {
219
- common: {
220
- isStrikeShown: true
221
- },
222
- monthlyInstallment: 29,
223
- oldMonthlyInstallment: 49,
224
- isStrikeShown: true,
225
- currency: "EUR",
226
- currentSalesPrice: 16160,
227
- historyPriceDifference: 5629.6,
228
- historyPriceDifferencePerCent: 26,
229
- mlCurrentSalesPriceCategory: null,
230
- mlCurrentSalesPriceDiffPercent: null,
231
- mlCurrentSalesPricePredicted: 100,
232
- totalCurrent: 50,
233
- originalSalesPrice: 13467,
234
- priceDate: null,
235
- priceId: null,
236
- recomendedRetailPrice: null,
237
- retailToCurrentPriceDifference: 0,
238
- vatDeductible: null,
239
- vatRate: 7,
240
- wasPrice: 10000,
241
- financing: {
242
- monthlyInstallment: 49,
243
- oldMonthlyInstallment: 69,
244
- isActive: true
245
- },
246
- leasing: {
247
- monthlyInstallment: 49,
248
- oldMonthlyInstallment: 69,
249
- isActive: true
250
- },
251
- buy: {
252
- currentSalesPriceExtra: 16110,
253
- highestPriceExtra: 19349
254
- }
255
- },
256
- seoText: 'Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008,Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Small Car, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008, Diesel, Manual, Gear Box, HU 06/2008',
257
- onFinancingClick: action('financing click'),
258
- onContainerClick: action('container click'),
259
- onFavoriteClick: action('favorite click'),
260
- };
261
-
262
- const cardProps = {
263
- ...cardPropsSlider,
264
- vehicleComponentName: 'main',
265
- seoText: '',
266
- slider: {},
267
- info: {
268
- mileage: 10464,
269
- regDate: 1535760000,
270
- gearbox: 'selector_gearbox_automatic'
271
- },
272
- environmentEmissions: {
273
- co2: 8.7
274
- },
275
- consumption: {
276
- consumptionCombined: 9.6,
277
- consumptionPowerCombined: 3.6,
278
- fuel: 'selector_fuel_hybridElectricalPetrol'
279
- },
280
- };
281
-
282
- const cardPropsComparable = {
283
- ...cardPropsSlider,
284
- slider: {},
285
- vehicleComponentName: 'comparable',
286
- seoText: ''
287
- };
288
-
289
- const cardPropsSearch = {
290
- ...cardPropsSlider,
291
- vehicleComponentName: 'search',
292
- seoText: '',
293
- showSlider: true,
294
- title: {
295
- ...cardPropsSlider.title,
296
- option: '110 kW (150 PS)',
297
- isSponsored: true
298
- },
299
- slider: {
300
- mainImageUrl: 'http://placehold.jp/400x300.png?text=mainImage',
301
- images,
302
- arrowsSize: 'md',
303
- getCarImagesData: () => new Promise(resolve => resolve(images)),
304
- onFirstChange: action('first change')
305
- },
306
- isDealerSuperAdmin: true
307
- };
308
-
309
- const cardPropsAlternative = {
310
- ...cardPropsSlider,
311
- vehicleComponentName: 'search',
312
- seoText: '',
313
- showSlider: true,
314
- isAlternative: true,
315
- title: {
316
- ...cardPropsSlider.title,
317
- option: '110 kW (150 PS)',
318
- isSponsored: true
319
- },
320
- info: {
321
- ...cardPropsSlider.info,
322
- location: {
323
- city: 'Lviv',
324
- countryCode: 'UA',
325
- street: 'Stepana Bandery',
326
- zipCode: 64380
327
- }
328
- },
329
- slider: {
330
- mainImageUrl: 'http://placehold.jp/400x300.png?text=mainImage',
331
- images,
332
- arrowsSize: 'md',
333
- onFirstChange: action('first change')
334
- },
335
- isDealerSuperAdmin: true
336
- };
337
-
338
- const cardPropsReference = {
339
- ...cardPropsSlider,
340
- vehicleComponentName: 'search',
341
- seoText: '',
342
- showSlider: true,
343
- isAlternative: true,
344
- isReferenceSearch: true,
345
- CircularProgressbar: () => renderCircularProgressbar(8),
346
- title: {
347
- ...cardPropsSlider.title,
348
- option: '110 kW (150 PS)',
349
- isSponsored: true
350
- },
351
- info: {
352
- ...cardPropsSlider.info,
353
- location: {
354
- city: 'Lviv',
355
- countryCode: 'UA',
356
- street: 'Stepana Bandery',
357
- zipCode: 64380
358
- }
359
- },
360
- slider: {
361
- mainImageUrl: 'http://placehold.jp/400x300.png?text=mainImage',
362
- images,
363
- arrowsSize: 'md',
364
- onFirstChange: action('first change')
365
- },
366
- isDealerSuperAdmin: false
367
- };
368
-
369
- return (
370
- <>
371
- <div className={styles.wrapper}>
372
- <p>Landing with slider</p>
373
- <Resizable {...resizablePropsSlider}>
374
- <VehicleSmallCard {...cardPropsSlider} />
375
- </Resizable>
376
- </div>
377
- <div className={styles.wrapper}>
378
- <p>Main without slider</p>
379
- <Resizable {...resizableProps}>
380
- <VehicleSmallCard {...cardProps} />
381
- </Resizable>
382
- </div>
383
- <div className={styles.wrapper}>
384
- <Resizable {...resizablePropsComparable}>
385
- <p>Comparable cars</p>
386
- <VehicleSmallCard {...cardPropsComparable} />
387
- </Resizable>
388
- </div>
389
- <div className={styles.wrapper}>
390
- <p>Search cars</p>
391
- <Resizable {...resizablePropsSearch}>
392
- <VehicleSmallCard {...cardPropsSearch} />
393
- </Resizable>
394
- </div>
395
- <div className={styles.wrapper}>
396
- <p>Alternative cars</p>
397
- <Resizable {...resizablePropsAlternative}>
398
- <VehicleSmallCard {...cardPropsAlternative} />
399
- </Resizable>
400
- </div>
401
- <div className={styles.wrapper}>
402
- <p>Reference search cars</p>
403
- <Resizable {...resizablePropsAlternative}>
404
- <VehicleSmallCard {...cardPropsReference} />
405
- </Resizable>
406
- </div>
407
- </>
408
- );
409
-
410
- });
411
-
412
- storiesOf('VehicleSmallCard', module).add('VehicleSmallCard', () => <VehicleSmallCardStory />);
@@ -1,56 +0,0 @@
1
- @import '../../theme/theme.styl';
2
-
3
- .wrapper
4
- // position: fixed
5
- width: 100%
6
- height: 100%
7
- left: 0px
8
- top: 0px
9
- display: flex
10
- flex-direction: column;
11
- background-color #fff
12
- font-family: $font-style-arial
13
- padding 0 10px;
14
- // &>:first-child
15
- // border-right: 1px solid $grey-e
16
- // margin-right: 10px
17
-
18
- .propsContainer
19
- overflow-y: auto
20
-
21
- .title
22
- text-align: center
23
- font-size: 22px
24
- font-weight: bold
25
-
26
- .input
27
- display: inline-block !important
28
- margin-left: 10px
29
- position: absolute
30
- right: 0
31
-
32
- :global
33
- .react-checkbox-tree
34
- width: 550px
35
- margin-right: 10px
36
- padding-right: 10px
37
- .rct-node
38
- margin: 10px 0
39
- position: relative
40
-
41
- .progressWrap
42
- width: 30px;
43
- height: 30px;
44
- position: absolute;
45
- top: 0;
46
- z-index: 2;
47
-
48
- & [class*='CircularProgressbar-text']
49
- transform: translate(-18%, 10px);
50
-
51
- &.progressWrapFull
52
- & [class*='CircularProgressbar-text']
53
- transform: translate(-27%, 10px);
54
- &.progressWrapMin
55
- & [class*='CircularProgressbar-text']
56
- transform: translate(-10%, 10px);