@bytebrand/fe-ui-core 4.8.109 → 4.8.111
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/bytebrand-fe-ui-core-4.8.110.tgz +0 -0
- package/media/locales/de/promoSlider.json +0 -1
- package/media/locales/en/promoSlider.json +0 -1
- package/package.json +5 -3
- package/source/components/AccordionWidget/AccordionWidget.styl +1 -13
- package/source/components/AccordionWidget/AccordionWidget.tsx +8 -49
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +0 -24
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +2 -1
- package/source/components/OfferPanel/OfferPanel.tsx +1 -1
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +11 -23
- package/source/components/VehicleDetailedSidebar/partials/Properties.styl +0 -5
- package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +18 -56
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +6 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +0 -42
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +11 -23
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +5 -60
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +12 -36
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +2 -3
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +7 -18
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +1 -4
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +2 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +2 -67
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +8 -50
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +1 -4
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -4
- package/source/components/_common/withStats/withStats.styl +0 -10
- package/source/components/_common/withStats/withStats.tsx +9 -4
- package/source/framework/DataTransformers.ts +0 -2
- package/source/framework/constants/common.ts +4 -8
- package/source/framework/types/types.ts +0 -1
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +18 -109
- package/source/framework/vehiclesProps/decoratedProps.tsx +9 -68
- package/source/framework/vehiclesProps/vehicleDetails.ts +1 -3
- package/source/locales/data.ts +3 -13
- package/.husky/pre-push +0 -4
- package/.storybook/addons.js +0 -4
- package/.storybook/config.js +0 -64
- package/.storybook/postcss.config.js +0 -6
- package/.storybook/preview-head.html +0 -10
- package/.storybook/webpack.config.js +0 -130
- package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +0 -42
- package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +0 -50
- package/__tests__/components/Checkout/RadioGroup.test.tsx +0 -95
- package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +0 -53
- package/__tests__/components/Checkout/Switcher.test.tsx +0 -43
- package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +0 -127
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +0 -58
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +0 -74
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +0 -62
- package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +0 -117
- package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +0 -58
- package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +0 -88
- package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +0 -91
- package/__tests__/components/_common/Badge/Badge.test.tsx +0 -15
- package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +0 -23
- package/__tests__/components/_common/Image/Image.test.tsx +0 -82
- package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +0 -49
- package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +0 -54
- package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +0 -58
- package/__tests__/components/_common/StarButton/StarButton.test.tsx +0 -46
- package/__tests__/mockedData/financingConfig.js +0 -202
- package/__tests__/mockedData/mockedPendingRequestedCar.js +0 -69
- package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +0 -18
- package/__tests__/utils/CommonUtils/arrToObj.test.js +0 -32
- package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +0 -17
- package/__tests__/utils/CommonUtils/fixNumber.test.ts +0 -20
- package/__tests__/utils/CommonUtils/formatMileage.test.ts +0 -8
- package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +0 -22
- package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +0 -19
- package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +0 -19
- package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +0 -51
- package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +0 -64
- package/__tests__/utils/CommonUtils/getPriceRating.test.ts +0 -26
- package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +0 -33
- package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +0 -9
- package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +0 -23
- package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +0 -23
- package/package.json.bak +0 -118
- package/source/components/AdvantageItem/AdvantageItem.story.js +0 -23
- package/source/components/Alternative/Dealer.story.js +0 -32
- package/source/components/Alternative/Dealer.story.styl +0 -3
- package/source/components/Breadcrumbs/Breadcrumbs.story.js +0 -40
- package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +0 -45
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +0 -243
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +0 -21
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +0 -105
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +0 -37
- package/source/components/Checkout/Switcher/Switcher.story.js +0 -41
- package/source/components/Checkout/Switcher/Switcher.story.styl +0 -2
- package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +0 -187
- package/source/components/ContactForm/ContactForm.story.js +0 -94
- package/source/components/ContactForm/ContactForm.story.styl +0 -0
- package/source/components/ContactInfo/ContactInfo.story.js +0 -58
- package/source/components/CustomerQuote/CustomerQuote.story.js +0 -41
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +0 -73
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +0 -5
- package/source/components/FormattedNumber/FormattedNumber.story.js +0 -114
- package/source/components/InfoBlocks/InfoBlockWrapper.story.js +0 -101
- package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +0 -46
- package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +0 -97
- package/source/components/OfferPanel/OfferPanel.story.js +0 -139
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +0 -35
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +0 -3
- package/source/components/PriceRating/PriceRating.story.js +0 -39
- package/source/components/PriceRating/PriceRating.story.styl +0 -2
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +0 -78
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +0 -11
- package/source/components/RateSearchValue/RateSearchValue.story.js +0 -78
- package/source/components/RateSearchValue/RateSearchValue.story.styl +0 -2
- package/source/components/RateSearchWidget/RateSearchWidget.story.js +0 -57
- package/source/components/RateSearchWidget/RateSearchWidget.story.styl +0 -12
- package/source/components/SearchFilters/FiltersFactory.story.js +0 -273
- package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +0 -12
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +0 -834
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +0 -40
- package/source/components/SearchWidget/SearchWidget.story.js +0 -191
- package/source/components/SearchWidget/SearchWidget.story.styl +0 -6
- package/source/components/Stepper/Stepper.story.js +0 -119
- package/source/components/Stepper/Stepper.story.styl +0 -41
- package/source/components/Theme.story.js +0 -36
- package/source/components/Theme.story.styl +0 -85
- package/source/components/TickerText/TickerText.story.js +0 -17
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +0 -95
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +0 -97
- package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +0 -31
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +0 -247
- package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +0 -30
- package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +0 -18
- package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +0 -19
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +0 -44
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +0 -120
- package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +0 -42
- package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +0 -62
- package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +0 -42
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +0 -412
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +0 -56
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +0 -199
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +0 -40
- package/source/components/_common/Accordion/Accordion.story.js +0 -36
- package/source/components/_common/Badge/Badge.story.js +0 -27
- package/source/components/_common/Badge/Badge.story.styl +0 -5
- package/source/components/_common/Bubble/Bubble.story.js +0 -52
- package/source/components/_common/Button/Button.story.js +0 -52
- package/source/components/_common/Button/Button.story.styl +0 -5
- package/source/components/_common/ButtonOld/Button.story.js +0 -54
- package/source/components/_common/ButtonOld/Button.story.styl +0 -5
- package/source/components/_common/Checkbox/Checkbox.story.js +0 -85
- package/source/components/_common/Checkbox/Checkbox.story.styl +0 -14
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +0 -126
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +0 -14
- package/source/components/_common/Chip/Chip.story.js +0 -43
- package/source/components/_common/ChipList/ChipList.story.js +0 -36
- package/source/components/_common/DropDown/DropDown.story.js +0 -35
- package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +0 -41
- package/source/components/_common/Histogram/Histogram.story.js +0 -51
- package/source/components/_common/IconSVG/IconSVG.story.js +0 -21
- package/source/components/_common/IconSVG/IconSVG.story.styl +0 -25
- package/source/components/_common/Image/Image.story.js +0 -142
- package/source/components/_common/Image/Image.story.styl +0 -18
- package/source/components/_common/ImagesSet/ImagesSet.story.js +0 -34
- package/source/components/_common/ImagesSet/ImagesSet.story.styl +0 -4
- package/source/components/_common/Loader/Loader.story.js +0 -21
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +0 -49
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +0 -45
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +0 -6
- package/source/components/_common/MaterialField/MaterialField.story.js +0 -87
- package/source/components/_common/MaterialField/MaterialField.story.styl +0 -34
- package/source/components/_common/MaterialSelect/MaterialSelect.story.js +0 -52
- package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +0 -6
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +0 -47
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +0 -6
- package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +0 -17
- package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +0 -10
- package/source/components/_common/Modal/Modal.story.js +0 -37
- package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +0 -21
- package/source/components/_common/PropertySelector/PSGroup.story.js +0 -93
- package/source/components/_common/PropertySelector/PSGroup.story.styl +0 -25
- package/source/components/_common/PropertySelector/ProperySelector.story.js +0 -83
- package/source/components/_common/Radio/FormRadioGroup.story.js +0 -28
- package/source/components/_common/Radio/FormRadioGroup.story.styl +0 -2
- package/source/components/_common/Radio/Radio.story.js +0 -54
- package/source/components/_common/Radio/RadioGroup.story.js +0 -90
- package/source/components/_common/Radio/RadioGroup.story.styl +0 -39
- package/source/components/_common/Range/Range.story.js +0 -46
- package/source/components/_common/Range/Range.story.styl +0 -5
- package/source/components/_common/SliderArrow/SliderArrow.story.js +0 -18
- package/source/components/_common/Tabs/Tabs.story.js +0 -56
- package/source/components/_common/TimePicker/TimePicker.story.js +0 -37
- package/source/components/_common/Tooltip/Tooltip.story.js +0 -28
- package/source/components/_common/UserMenu/MaterialMenu.story.js +0 -73
- package/source/components/_common/VehicleSlider/VehicleSlider.story.js +0 -99
- package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
- package/source/components/_common/withLabel/withLabel.story.js +0 -62
- package/source/components/_common/withPopover/withPopover.story.js +0 -48
- package/source/components/_common/withPopover/withPopover.story.styl +0 -54
- package/source/components/_common/withStats/withStats.story.js +0 -75
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
});
|
package/package.json.bak
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bytebrand/fe-ui-core",
|
|
3
|
-
"version": "4.8.109",
|
|
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
|
-
"prepare": "husky",
|
|
108
|
-
"storybook": "start-storybook -p 6006",
|
|
109
|
-
"clean": "rm -rf ./dist/*.*",
|
|
110
|
-
"build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
|
|
111
|
-
"build:story": "build-storybook",
|
|
112
|
-
"test": "jest --watch",
|
|
113
|
-
"test:ci": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
|
|
114
|
-
"test:coverage": "yarn run test -- --coverage --watchAll=false || exit 0"
|
|
115
|
-
},
|
|
116
|
-
"author": "Maks Okhmatenko",
|
|
117
|
-
"license": "UNLICENSED"
|
|
118
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
));
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
))
|
|
@@ -1,40 +0,0 @@
|
|
|
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;
|
|
@@ -1,45 +0,0 @@
|
|
|
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;
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react';
|
|
2
|
-
import { Resizable } from 're-resizable';
|
|
3
|
-
import { storiesOf } from '@storybook/react';
|
|
4
|
-
import styles from './OrderOverviewItem.story.styl';
|
|
5
|
-
import {
|
|
6
|
-
Accordion, AccordionSummary, AccordionDetails, Divider
|
|
7
|
-
} from '@mui/material';
|
|
8
|
-
import { makeStyles } from '@mui/styles';
|
|
9
|
-
|
|
10
|
-
// Components
|
|
11
|
-
import OrderOverviewItem from './OrderOverviewItem';
|
|
12
|
-
import IconSVG from '../../_common/IconSVG/IconSVG';
|
|
13
|
-
import VehicleFormattedPrice from '../../Vehicle/VehicleFormattedPrice/VehicleFormattedPrice';
|
|
14
|
-
import PaymentTypeCard from '../RadioCards/PaymentTypeCard/PaymentTypeCard';
|
|
15
|
-
|
|
16
|
-
const resizableProps = {
|
|
17
|
-
defaultSize: { width: 360, height: 700 }
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const useStyles = makeStyles(theme => ({
|
|
21
|
-
root: {
|
|
22
|
-
minWidth: 275
|
|
23
|
-
},
|
|
24
|
-
bullet: {
|
|
25
|
-
display: 'inline-block',
|
|
26
|
-
margin: '0 2px',
|
|
27
|
-
transform: 'scale(0.8)'
|
|
28
|
-
},
|
|
29
|
-
title: {
|
|
30
|
-
fontSize: 14
|
|
31
|
-
},
|
|
32
|
-
pos: {
|
|
33
|
-
marginBottom: 12
|
|
34
|
-
},
|
|
35
|
-
accordionSummary: {
|
|
36
|
-
flexDirection: 'row-reverse'
|
|
37
|
-
},
|
|
38
|
-
iconPlus: {
|
|
39
|
-
'&.MuiIconButton-root': {
|
|
40
|
-
// paddingLeft: 0,
|
|
41
|
-
paddingLeft: '100px',
|
|
42
|
-
marginRight: '10px'
|
|
43
|
-
},
|
|
44
|
-
'&.MuiIconButton-edgeEnd': {
|
|
45
|
-
marginRight: 0,
|
|
46
|
-
paddingLeft: '100px'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
iconMinus: {
|
|
50
|
-
'&.MuiIconButton-label': {
|
|
51
|
-
// paddingLeft: 0,
|
|
52
|
-
marginLeft: '10px'
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
heading: {
|
|
56
|
-
'&.MuiTypography-body1': {
|
|
57
|
-
marginLeft: '10px'
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
accordionWrapper: {
|
|
61
|
-
'&.MuiAccordionDetails-root': {
|
|
62
|
-
display: 'block',
|
|
63
|
-
padding: 0
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
accordion: {
|
|
67
|
-
'& .MuiAccordionSummary-root' : {
|
|
68
|
-
padding: 0
|
|
69
|
-
},
|
|
70
|
-
'& .MuiAccordionSummary-content.Mui-expanded' : {
|
|
71
|
-
margin: 0
|
|
72
|
-
},
|
|
73
|
-
'&.MuiAccordion-root.Mui-expanded' : {
|
|
74
|
-
margin: 0,
|
|
75
|
-
marginTop: '20px'
|
|
76
|
-
},
|
|
77
|
-
'& .MuiAccordionSummary-root.Mui-expanded' : {
|
|
78
|
-
minHeight: '52px'
|
|
79
|
-
},
|
|
80
|
-
'&.MuiAccordion-root' : {
|
|
81
|
-
boxShadow: 'none'
|
|
82
|
-
},
|
|
83
|
-
'&.MuiAccordion-root:before' : {
|
|
84
|
-
height: 0
|
|
85
|
-
},
|
|
86
|
-
'&.MuiAccordion-root.Mui-expanded:before' : {
|
|
87
|
-
opacity: 1,
|
|
88
|
-
height: '1px'
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}));
|
|
92
|
-
const OrderOverviewItemWrapper = () => {
|
|
93
|
-
const classes = useStyles();
|
|
94
|
-
|
|
95
|
-
const fields = [
|
|
96
|
-
[
|
|
97
|
-
'Hannes Käther',
|
|
98
|
-
'Wittenberger Str. 81, 04129 Leipzig'
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
'Wittenberger Str. 81, 04129 Leipzig'
|
|
102
|
-
]
|
|
103
|
-
];
|
|
104
|
-
|
|
105
|
-
const titles = [
|
|
106
|
-
'Billing address',
|
|
107
|
-
'Vehicle delivery',
|
|
108
|
-
'Down payment'
|
|
109
|
-
]
|
|
110
|
-
|
|
111
|
-
const intoAccordionTitles = [
|
|
112
|
-
'Financing',
|
|
113
|
-
'Additional services'
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
const intoAccordionField = [
|
|
117
|
-
[
|
|
118
|
-
'Financing rate',
|
|
119
|
-
'2. Borrower'
|
|
120
|
-
],
|
|
121
|
-
[
|
|
122
|
-
'Silver guarantee package',
|
|
123
|
-
'Admissions Service',
|
|
124
|
-
'Desired license plate',
|
|
125
|
-
'Vehicle delivery'
|
|
126
|
-
]
|
|
127
|
-
]
|
|
128
|
-
|
|
129
|
-
const intoAccordionFieldRight = [
|
|
130
|
-
[
|
|
131
|
-
'194 € per month',
|
|
132
|
-
'Papa Käther'
|
|
133
|
-
],
|
|
134
|
-
[
|
|
135
|
-
'10 € per month',
|
|
136
|
-
'2 € per month',
|
|
137
|
-
'0,5 € per month',
|
|
138
|
-
'7 € per month'
|
|
139
|
-
]
|
|
140
|
-
]
|
|
141
|
-
|
|
142
|
-
const iconNames = [
|
|
143
|
-
'financingIcon',
|
|
144
|
-
'leasingIcon',
|
|
145
|
-
'aboIcon'
|
|
146
|
-
]
|
|
147
|
-
|
|
148
|
-
const fieldLine = '€ 1,000 (transfer)'
|
|
149
|
-
|
|
150
|
-
const [open, setOpen] = useState(false);
|
|
151
|
-
|
|
152
|
-
const handleAccordion = () => {
|
|
153
|
-
setOpen(!open);
|
|
154
|
-
};
|
|
155
|
-
{/* delete */}
|
|
156
|
-
const [checkedBox, setCheckedBox] = useState({
|
|
157
|
-
0: true,
|
|
158
|
-
1: false,
|
|
159
|
-
2: true,
|
|
160
|
-
3: false,
|
|
161
|
-
4: true,
|
|
162
|
-
5: false,
|
|
163
|
-
6: true
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
const onChange = (e, checked) => {
|
|
167
|
-
const updatedValue = !checkedBox[e.target.value]
|
|
168
|
-
// setCheckedBox({...checkedBox, [e.target.value]: updatedValue});
|
|
169
|
-
// checked = checkedBox[e.target.value];
|
|
170
|
-
if (e.target.value === '2') {
|
|
171
|
-
setCheckedBox({0: false, 1: false, 2: true});
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
setCheckedBox({...checkedBox, [e.target.value]: updatedValue, 2: false})
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const renderCheckout = (index) => {
|
|
179
|
-
const financing = ['Financing', 'Leasing', 'Buy', 'Abo'];
|
|
180
|
-
|
|
181
|
-
return (
|
|
182
|
-
<div className={styles.equipment}>
|
|
183
|
-
<div className={styles.column}>
|
|
184
|
-
<span className={styles.titleCheckout}>
|
|
185
|
-
{financing[index]}
|
|
186
|
-
</span>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const paymentTypeProps = {
|
|
193
|
-
labelClassName: styles.checkoutLabel,
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const paymentinfoContent = [
|
|
197
|
-
'81% of our customers find the perfect financing through auto.de',
|
|
198
|
-
'Lease your car with ease',
|
|
199
|
-
'Subscribe to your dream car flexibly',
|
|
200
|
-
'Buy your car now'
|
|
201
|
-
];
|
|
202
|
-
{/* delete */}
|
|
203
|
-
return (
|
|
204
|
-
<Resizable {...resizableProps}>
|
|
205
|
-
<OrderOverviewItem title={titles[0]} fields={fields[0]}/>
|
|
206
|
-
<OrderOverviewItem title={titles[1]} fields={fields[1]}/>
|
|
207
|
-
<OrderOverviewItem title={titles[2]} fieldLine={fieldLine}/>
|
|
208
|
-
<Accordion className={`${classes.accordion} ${styles.accordion}`}>
|
|
209
|
-
<AccordionSummary
|
|
210
|
-
onClick={handleAccordion}
|
|
211
|
-
className={classes.accordionSummary}
|
|
212
|
-
// expandIcon={open ? <IconSVG className={classes.iconMinus} name='minusIcon' /> : <IconSVG className={classes.iconPlus} name='plusIcon' />}
|
|
213
|
-
aria-controls='panel1a-content'
|
|
214
|
-
id='panel1a-header'
|
|
215
|
-
>
|
|
216
|
-
<span className={styles.summaryWrapper}>
|
|
217
|
-
<span>Your overall rate</span>
|
|
218
|
-
<span className={styles.priceWrapper}>
|
|
219
|
-
<VehicleFormattedPrice monthly='monthly' className={styles.price} numbersAfterDot={0} toRound price={213} unit='€' size='medium' isNew={true}/>
|
|
220
|
-
<IconSVG name='arrowDownBlue' className={open ? styles.arrowUp : styles.arrowDown}/>
|
|
221
|
-
{/* <SvgIcon component={SvgArrowDownBlue} viewBox='-100 -100 400 400' /> */}
|
|
222
|
-
</span>
|
|
223
|
-
</span>
|
|
224
|
-
</AccordionSummary>
|
|
225
|
-
<Divider />
|
|
226
|
-
<AccordionDetails className={classes.accordionWrapper}>
|
|
227
|
-
{/* <Typography> */}
|
|
228
|
-
<OrderOverviewItem fieldRight={intoAccordionFieldRight[0]} fields={intoAccordionField[0]} title={intoAccordionTitles[0]}/>
|
|
229
|
-
<Divider/>
|
|
230
|
-
<OrderOverviewItem fieldRight={intoAccordionFieldRight[1]} fields={intoAccordionField[1]} title={intoAccordionTitles[1]}/>
|
|
231
|
-
</AccordionDetails>
|
|
232
|
-
</Accordion>
|
|
233
|
-
{/* delete */}
|
|
234
|
-
{iconNames.map((iconName, index) => (
|
|
235
|
-
<PaymentTypeCard squareRadioClassname={index < 2 && true} checked={checkedBox[index]} checkbox={true} onChange={onChange} monthly='week' price={2} key={index} label={renderCheckout(index)} infoContent={paymentinfoContent[index]} iconName={iconName} value={index} {...paymentTypeProps} />
|
|
236
|
-
))}
|
|
237
|
-
{/* delete */}
|
|
238
|
-
</Resizable>
|
|
239
|
-
)
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
storiesOf('Checkout', module)
|
|
243
|
-
.add('OrderOverviewItem', () => <OrderOverviewItemWrapper />)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@import '../../../theme/theme.styl'
|
|
2
|
-
|
|
3
|
-
.arrowUp
|
|
4
|
-
transform: rotate(180deg)
|
|
5
|
-
transition: .4s
|
|
6
|
-
|
|
7
|
-
.arrowDown
|
|
8
|
-
transition: .4s
|
|
9
|
-
|
|
10
|
-
.summaryWrapper
|
|
11
|
-
width: 100%
|
|
12
|
-
display: flex
|
|
13
|
-
justify-content: space-between
|
|
14
|
-
|
|
15
|
-
.price
|
|
16
|
-
margin-right: 10px
|
|
17
|
-
|
|
18
|
-
.accordion
|
|
19
|
-
display: block
|
|
20
|
-
margin-top: 20px
|
|
21
|
-
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { storiesOf } from '@storybook/react';
|
|
3
|
-
import { action } from '@storybook/addon-actions';
|
|
4
|
-
|
|
5
|
-
import PaymentTypeCard from './PaymentTypeCard/PaymentTypeCard';
|
|
6
|
-
import ServiceCardWrapper from './AdditionalServiceCard/ServiceCardWrapper';
|
|
7
|
-
import RadioGroup from '../../_common/Radio/RadioGroup';
|
|
8
|
-
|
|
9
|
-
import styles from './RadioGroupCheckout.story.styl';
|
|
10
|
-
export class RadioGroupCheckoutVertical extends React.Component {
|
|
11
|
-
state = {
|
|
12
|
-
value: 0
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
action = action('change');
|
|
16
|
-
onChange = (event, value) => {
|
|
17
|
-
this.action(event, value);
|
|
18
|
-
this.setState(() => ({ value }));
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
renderCheckout = (index) => {
|
|
22
|
-
const financing = ['Financing', 'Leasing', 'Buy', 'Abo'];
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className={styles.equipment}>
|
|
26
|
-
<div className={styles.column}>
|
|
27
|
-
<span className={styles.titleCheckout}>
|
|
28
|
-
{financing[index]}
|
|
29
|
-
</span>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
render() {
|
|
36
|
-
const radioProps = {
|
|
37
|
-
labelClassName: styles.checkoutLabel
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const paymentTypeProps = {
|
|
41
|
-
labelClassName: styles.checkoutLabel,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const infoContent = [
|
|
45
|
-
'Zulassung bei Ihrer Zulassungsstelle vor Ort',
|
|
46
|
-
'Zulassung vor Ort inkl. Wunschkennzeichen',
|
|
47
|
-
'Sie organisieren die Zulassung selbst'
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
const paymentinfoContent = [
|
|
51
|
-
'81% of our customers find the perfect financing through auto.de',
|
|
52
|
-
'Lease your car with ease',
|
|
53
|
-
'Subscribe to your dream car flexibly',
|
|
54
|
-
'Buy your car now'
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const iconNames = [
|
|
58
|
-
'financingIcon',
|
|
59
|
-
'leasingIcon',
|
|
60
|
-
'buyIcon',
|
|
61
|
-
'aboIcon',
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
const values = [0, 1, 2]
|
|
65
|
-
|
|
66
|
-
const vehicleDeliveryProps = {
|
|
67
|
-
additionalOptions: infoContent,
|
|
68
|
-
price: 0,
|
|
69
|
-
labelClassName: styles.checkoutLabel,
|
|
70
|
-
monthly: 'week'
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const onCheckoutModalClick = (modalContent) => {
|
|
74
|
-
alert('modalWindow');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return (
|
|
78
|
-
<>
|
|
79
|
-
<RadioGroup name='sub_model' containerClassName={styles.vertical} childClassName={styles.verticalChild} value={this.state.value} onChange={this.onChange}>
|
|
80
|
-
{iconNames.map((iconName, index) => (
|
|
81
|
-
<PaymentTypeCard onCheckoutModalClick={onCheckoutModalClick} tooltip={true} monthly='week' key={index} disabled={index === 1 && true} label={this.renderCheckout(index)} infoContent={paymentinfoContent[index]} value={index} {...paymentTypeProps} />
|
|
82
|
-
))}
|
|
83
|
-
</RadioGroup>
|
|
84
|
-
<RadioGroup name='name' containerClassName={styles.vertical} childClassName={styles.verticalChild} value={this.state.value} onChange={this.onChange}>
|
|
85
|
-
{values.map((value, index) => (
|
|
86
|
-
<ServiceCardWrapper onCheckoutModalClick={onCheckoutModalClick} warrantyCard={true} key={index} additionalOptions={infoContent} index={index} price={2} label={this.renderCheckout(0)} infoContent={infoContent[value]} value={value} {...radioProps} additional={true} footerText='Komplette Leistungsübersicht'/>
|
|
87
|
-
))}
|
|
88
|
-
</RadioGroup>
|
|
89
|
-
<RadioGroup name='name' containerClassName={styles.vertical} childClassName={styles.verticalChild} value={this.state.value} onChange={this.onChange}>
|
|
90
|
-
<ServiceCardWrapper tooltip={true} deliveryCard={true} deliveryIcon='delivery' label={this.renderCheckout(0)} infoContent={infoContent[1]} value={0} {...vehicleDeliveryProps} delivery={true}>
|
|
91
|
-
<input type='text'></input>
|
|
92
|
-
</ServiceCardWrapper>
|
|
93
|
-
<ServiceCardWrapper content='delivery content' tooltip={true} deliveryCard={true} deliveryIcon='pickYourself' label={this.renderCheckout(1)} value={1} distance={500} {...vehicleDeliveryProps} />
|
|
94
|
-
</RadioGroup>
|
|
95
|
-
</>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
storiesOf('checkout', module)
|
|
101
|
-
.add('RadioGroupCheckout', () => (
|
|
102
|
-
<div>
|
|
103
|
-
<RadioGroupCheckoutVertical />
|
|
104
|
-
</div>
|
|
105
|
-
));
|