@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.
- package/.husky/pre-push +4 -0
- package/.storybook/addons.js +4 -0
- package/.storybook/config.js +64 -0
- package/.storybook/postcss.config.js +6 -0
- package/.storybook/preview-head.html +10 -0
- package/.storybook/webpack.config.js +130 -0
- package/__tests__/components/Checkout/OrderOverviewItem/OrderOverviewItem.test.tsx +42 -0
- package/__tests__/components/Checkout/PaymentTypeCard/PaymentTypeCard.test.tsx +50 -0
- package/__tests__/components/Checkout/RadioGroup.test.tsx +95 -0
- package/__tests__/components/Checkout/ServiceCardWrapper.test.tsx +53 -0
- package/__tests__/components/Checkout/Switcher.test.tsx +43 -0
- package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +613 -0
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +335 -0
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/AdditionalOrderInfo.test.tsx +127 -0
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCar.test.tsx +58 -0
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusCard.test.tsx +74 -0
- package/__tests__/components/UserDasboardPage/sections/OrderStatusSection/OrderStatusSection.test.tsx +62 -0
- package/__tests__/components/UserDasboardPage/sections/RequestedCarsSection/RequestedCarsSection.test.tsx +117 -0
- package/__tests__/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.test.tsx +58 -0
- package/__tests__/components/VehicleSmallCard/VehicleInfo.test.tsx +88 -0
- package/__tests__/components/VehicleSmallCard/VehicleTitle.test.tsx +91 -0
- package/__tests__/components/_common/Badge/Badge.test.tsx +15 -0
- package/__tests__/components/_common/IconSVG/IconSVG.test.tsx +23 -0
- package/__tests__/components/_common/Image/Image.test.tsx +82 -0
- package/__tests__/components/_common/MaterialAutocomplete/MaterialAutocomplete.test.tsx +49 -0
- package/__tests__/components/_common/MaterialDatePicker/MaterialDatePicker.test.tsx +54 -0
- package/__tests__/components/_common/MaterialField/MaterialField.test.tsx +58 -0
- package/__tests__/components/_common/StarButton/StarButton.test.tsx +46 -0
- package/__tests__/mockedData/financingConfig.js +202 -0
- package/__tests__/mockedData/mockedPendingRequestedCar.js +69 -0
- package/__tests__/utils/CommonUtils/addPrefixToKeys.test.ts +18 -0
- package/__tests__/utils/CommonUtils/arrToObj.test.js +32 -0
- package/__tests__/utils/CommonUtils/checkRangeValuesOnEqual.test.ts +17 -0
- package/__tests__/utils/CommonUtils/fixNumber.test.ts +20 -0
- package/__tests__/utils/CommonUtils/formatMileage.test.ts +8 -0
- package/__tests__/utils/CommonUtils/getChipFilterValue.test.ts +22 -0
- package/__tests__/utils/CommonUtils/getFormattedNumber.test.ts +19 -0
- package/__tests__/utils/CommonUtils/getFormattedPrice.test.ts +19 -0
- package/__tests__/utils/CommonUtils/getGroupValuesForQuery.test.ts +51 -0
- package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +64 -0
- package/__tests__/utils/CommonUtils/getPriceRating.test.ts +26 -0
- package/__tests__/utils/CommonUtils/getPriceRatingConfig.test.ts +33 -0
- package/__tests__/utils/CommonUtils/preloadNearbyImages.test.ts +9 -0
- package/__tests__/utils/CommonUtils/sliceLessThan.test.ts +23 -0
- package/__tests__/utils/CommonUtils/sliceMoreThan.test.ts +23 -0
- package/media/locales/de/promoSlider.json +1 -0
- package/media/locales/en/promoSlider.json +1 -0
- package/package.json +117 -120
- package/source/components/AccordionWidget/AccordionWidget.styl +1 -0
- package/source/components/AccordionWidget/AccordionWidget.tsx +8 -4
- package/source/components/AdvantageItem/AdvantageItem.story.js +23 -0
- package/source/components/Alternative/Dealer.story.js +32 -0
- package/source/components/Alternative/Dealer.story.styl +3 -0
- package/source/components/Breadcrumbs/Breadcrumbs.story.js +40 -0
- package/source/components/Breadcrumbs/FirstInfoBlock/FirstInfoBlock.story.js +45 -0
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.js +243 -0
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.story.styl +21 -0
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.js +105 -0
- package/source/components/Checkout/RadioCards/RadioGroupCheckout.story.styl +37 -0
- package/source/components/Checkout/Switcher/Switcher.story.js +41 -0
- package/source/components/Checkout/Switcher/Switcher.story.styl +2 -0
- package/source/components/CompactSearchWidget/CompactSearchWidget.story.js +187 -0
- package/source/components/ContactForm/ContactForm.story.js +94 -0
- package/source/components/ContactForm/ContactForm.story.styl +0 -0
- package/source/components/ContactInfo/ContactInfo.story.js +58 -0
- package/source/components/CustomerQuote/CustomerQuote.story.js +41 -0
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.js +73 -0
- package/source/components/CustomerQuotesSlider/CustomerQuotesSlider.story.styl +5 -0
- package/source/components/FormattedNumber/FormattedNumber.story.js +114 -0
- package/source/components/InfoBlocks/InfoBlockWrapper.story.js +101 -0
- package/source/components/InfoBlocks/InfoBlockWrapper.story.styl +46 -0
- package/source/components/OfferPanel/AboAccordion/AboFaq/AboFaq.story.js +97 -0
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +2 -2
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.styl +24 -0
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +0 -1
- package/source/components/OfferPanel/OfferPanel.story.js +139 -0
- package/source/components/OfferPanel/OfferPanel.tsx +1 -1
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.js +35 -0
- package/source/components/OfferPanel/RangeGroup/RangeGroup.story.styl +3 -0
- package/source/components/PriceRating/PriceRating.story.js +39 -0
- package/source/components/PriceRating/PriceRating.story.styl +2 -0
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.js +78 -0
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.story.styl +11 -0
- package/source/components/RateSearchValue/RateSearchValue.story.js +78 -0
- package/source/components/RateSearchValue/RateSearchValue.story.styl +2 -0
- package/source/components/RateSearchWidget/RateSearchWidget.story.js +57 -0
- package/source/components/RateSearchWidget/RateSearchWidget.story.styl +12 -0
- package/source/components/SearchFilters/FiltersFactory.story.js +273 -0
- package/source/components/SearchPage/Filters/MakeModel/MakeModel.story.js +12 -0
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.js +834 -0
- package/source/components/SearchWidget/BasicDataWidget/BasicDataWidget.story.styl +40 -0
- package/source/components/SearchWidget/SearchWidget.story.js +191 -0
- package/source/components/SearchWidget/SearchWidget.story.styl +6 -0
- package/source/components/Stepper/Stepper.story.js +119 -0
- package/source/components/Stepper/Stepper.story.styl +41 -0
- package/source/components/Theme.story.js +36 -0
- package/source/components/Theme.story.styl +85 -0
- package/source/components/TickerText/TickerText.story.js +17 -0
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.story.js +95 -0
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.story.js +97 -0
- package/source/components/Vehicle/VehicleConsumption/VehicleConsumption.story.js +31 -0
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.story.js +247 -0
- package/source/components/VehicleCompared/CompareGeneral/CompareGeneral.story.js +30 -0
- package/source/components/VehicleCompared/ComparePrice/ComparePrice.story.js +18 -0
- package/source/components/VehicleCompared/CompareTitle/CompareTitle.story.js +19 -0
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.story.js +44 -0
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +23 -11
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.story.js +120 -0
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +2 -0
- package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +7 -4
- package/source/components/VehiclePromoSlider/VehiclePromoInfo/VehiclePromoInfo.story.js +42 -0
- package/source/components/VehiclePromoSlider/VehiclePromoSlide/VehiclePromoSlide.story.js +62 -0
- package/source/components/VehiclePromoSlider/VehiclePromoSlider.story.js +42 -0
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.styl +5 -0
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +3 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.styl +1 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleInfo/VehicleInfo.tsx +24 -11
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +3 -2
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.styl +4 -1
- package/source/components/VehicleSmallCard/VehicleData/VehicleProperty/VehicleProperty.tsx +3 -2
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -1
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.js +412 -0
- package/source/components/VehicleSmallCard/VehicleSmallCard.story.styl +56 -0
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +14 -3
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.js +199 -0
- package/source/components/VehicleSmallCardForDealerships/VehicleSmallCardForDealerships.story.styl +40 -0
- package/source/components/_common/Accordion/Accordion.story.js +36 -0
- package/source/components/_common/Badge/Badge.story.js +27 -0
- package/source/components/_common/Badge/Badge.story.styl +5 -0
- package/source/components/_common/Bubble/Bubble.story.js +52 -0
- package/source/components/_common/Button/Button.story.js +52 -0
- package/source/components/_common/Button/Button.story.styl +5 -0
- package/source/components/_common/ButtonOld/Button.story.js +54 -0
- package/source/components/_common/ButtonOld/Button.story.styl +5 -0
- package/source/components/_common/Checkbox/Checkbox.story.js +85 -0
- package/source/components/_common/Checkbox/Checkbox.story.styl +14 -0
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.js +126 -0
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.story.styl +14 -0
- package/source/components/_common/Chip/Chip.story.js +43 -0
- package/source/components/_common/ChipList/ChipList.story.js +36 -0
- package/source/components/_common/DropDown/DropDown.story.js +35 -0
- package/source/components/_common/ExpandablePanel/ExpandablePanel.story.js +41 -0
- package/source/components/_common/Histogram/Histogram.story.js +51 -0
- package/source/components/_common/IconSVG/IconSVG.story.js +21 -0
- package/source/components/_common/IconSVG/IconSVG.story.styl +25 -0
- package/source/components/_common/Image/Image.story.js +142 -0
- package/source/components/_common/Image/Image.story.styl +18 -0
- package/source/components/_common/ImagesSet/ImagesSet.story.js +34 -0
- package/source/components/_common/ImagesSet/ImagesSet.story.styl +4 -0
- package/source/components/_common/Loader/Loader.story.js +21 -0
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.story.js +49 -0
- package/source/components/_common/MaterialAccordionGroup/MaterialAccordionGroup.styled.tsx +4 -1
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.js +45 -0
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.story.styl +6 -0
- package/source/components/_common/MaterialField/MaterialField.story.js +87 -0
- package/source/components/_common/MaterialField/MaterialField.story.styl +34 -0
- package/source/components/_common/MaterialSelect/MaterialSelect.story.js +52 -0
- package/source/components/_common/MaterialSelect/MaterialSelect.story.styl +6 -0
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.js +47 -0
- package/source/components/_common/MaterialStepButton/MaterialStepButton.story.styl +6 -0
- package/source/components/_common/MaterialSwitch/MaterialSwitch.story.js +17 -0
- package/source/components/_common/MaterialTooltip/MaterialTooltip.story.js +10 -0
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +4 -3
- package/source/components/_common/Modal/Modal.story.js +37 -0
- package/source/components/_common/MuiGroupedSelect/MuiGroupedSelect.story.js +21 -0
- package/source/components/_common/PropertySelector/PSGroup.story.js +93 -0
- package/source/components/_common/PropertySelector/PSGroup.story.styl +25 -0
- package/source/components/_common/PropertySelector/ProperySelector.story.js +83 -0
- package/source/components/_common/Radio/FormRadioGroup.story.js +28 -0
- package/source/components/_common/Radio/FormRadioGroup.story.styl +2 -0
- package/source/components/_common/Radio/Radio.story.js +54 -0
- package/source/components/_common/Radio/RadioGroup.story.js +90 -0
- package/source/components/_common/Radio/RadioGroup.story.styl +39 -0
- package/source/components/_common/Range/Range.story.js +46 -0
- package/source/components/_common/Range/Range.story.styl +5 -0
- package/source/components/_common/SliderArrow/SliderArrow.story.js +18 -0
- package/source/components/_common/Tabs/Tabs.story.js +56 -0
- package/source/components/_common/TimePicker/TimePicker.story.js +37 -0
- package/source/components/_common/Tooltip/Tooltip.story.js +28 -0
- package/source/components/_common/UserMenu/MaterialMenu.story.js +73 -0
- package/source/components/_common/VehicleSlider/VehicleSlider.story.js +99 -0
- package/source/components/_common/VehicleSlider/VehicleSlider.story.styl +0 -0
- package/source/components/_common/withLabel/withLabel.story.js +62 -0
- package/source/components/_common/withPopover/withPopover.story.js +48 -0
- package/source/components/_common/withPopover/withPopover.story.styl +54 -0
- package/source/components/_common/withStats/withStats.story.js +75 -0
- package/source/components/_common/withStats/withStats.styl +10 -0
- package/source/components/_common/withStats/withStats.tsx +2 -11
- package/source/framework/DataTransformers.ts +1 -0
- package/source/framework/constants/common.ts +8 -4
- package/source/framework/types/types.ts +1 -0
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +48 -12
- package/source/framework/vehiclesProps/decoratedProps.tsx +35 -8
- 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.
|
|
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": "^
|
|
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
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
+
}
|
|
@@ -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
|
-
|
|
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,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;
|