@bytebrand/fe-ui-core 4.3.0 → 4.4.0
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/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +613 -0
- package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +335 -0
- package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +4 -2
- package/common.ts +6 -2
- package/package.json +19 -28
- package/source/components/AccordionWidget/AccordionWidget.tsx +1 -3
- package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +2 -190
- package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +15 -16
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
- package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
- package/source/components/FormattedNumber/FormattedNumber.tsx +2 -3
- package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +4 -6
- package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +0 -3
- package/source/components/OfferPanel/MuiOfferPeriod/{MuiOfferPeriod.theme.js → MuiOfferPeriod.theme.tsx} +8 -13
- package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +28 -4
- package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +6 -12
- package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
- package/source/components/OfferPanel/OfferPanel.tsx +1 -1
- package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +0 -4
- package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +6 -4
- package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +6 -2
- package/source/components/SearchFilters/filters/AlternativeID.tsx +42 -53
- package/source/components/SearchFilters/filters/DriveType.tsx +1 -1
- package/source/components/SearchFilters/filters/EmissionSticker.tsx +1 -1
- package/source/components/SearchFilters/filters/FirstRegistration.tsx +0 -1
- package/source/components/SearchFilters/filters/InteriorColor.tsx +1 -1
- package/source/components/SearchFilters/filters/InteriorMaterial.tsx +2 -1
- package/source/components/SearchFilters/filters/Mileage.tsx +1 -1
- package/source/components/SearchFilters/filters/Power.tsx +36 -17
- package/source/components/SearchFilters/filters/StateOptions.tsx +0 -1
- package/source/components/SearchFilters/filters/Transmission.tsx +1 -1
- package/source/components/SearchPage/SearchChips/SearchChips.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +3 -3
- package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +2 -2
- package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +1 -1
- package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -1
- package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +3 -3
- package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +3 -3
- package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +2 -2
- package/source/components/SearchWidget/StateWidget/StateWidget.tsx +1 -2
- package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +4 -4
- package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +16 -16
- package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +1 -1
- package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
- package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +6 -6
- package/source/components/Stepper/Stepper.tsx +4 -3
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +38 -0
- package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +120 -0
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +22 -0
- package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +84 -0
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +11 -2
- package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +5 -5
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +57 -38
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +2 -2
- package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +183 -101
- package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +5 -7
- package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +33 -7
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +10 -2
- package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +54 -14
- package/source/components/VehicleDetailedSidebar/partials/Price.styl +5 -1
- package/source/components/VehicleDetailedSidebar/partials/Price.tsx +2 -1
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +16 -5
- package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +9 -4
- package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +45 -0
- package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +121 -42
- package/source/components/VehicleDetailedSlider/partials/PriceData.styl +4 -1
- package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +8 -1
- package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
- package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +9 -7
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +35 -1
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +9 -3
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +11 -2
- package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +2 -1
- package/source/components/VehicleSmallCard/VehicleSmallCard.styl +3 -1
- package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +3 -7
- package/source/components/_common/Badge/Badge.styl +3 -0
- package/source/components/_common/Badge/Badge.tsx +1 -1
- package/source/components/_common/Button/Button.tsx +5 -4
- package/source/components/_common/Checkbox/FormCheckbox.tsx +4 -4
- package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +1 -1
- package/source/components/_common/Chip/Chip.tsx +1 -3
- package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +3 -3
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +2 -0
- package/source/components/_common/IconSVG/SVG/flags/SK.tsx +0 -1
- package/source/components/_common/IconSVG/SVG/slider/360New.tsx +1 -1
- package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +26 -0
- package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +22 -30
- package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
- package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +0 -1
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +12 -15
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +3 -3
- package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +3 -1
- package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +1 -1
- package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -3
- package/source/components/_common/Modal/CookieModal.tsx +1 -3
- package/source/components/_common/Modal/Modal.styled.tsx +2 -1
- package/source/components/_common/Modal/Modal.tsx +1 -5
- package/source/components/_common/Modal/ModalsConfig.tsx +5 -1
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +23 -7
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +84 -36
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +29 -14
- package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +17 -10
- package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +12 -4
- package/source/components/_common/Range/Range.tsx +27 -14
- package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +0 -1
- package/source/components/_common/UserMenu/MaterialMenu.tsx +3 -3
- package/source/components/_common/UserMenu/MaterialMenuItem.tsx +42 -20
- package/source/components/_common/UserMenu/NestedMenu.tsx +1 -1
- package/source/components/_common/withStats/withStats.styl +3 -0
- package/source/components/_common/withStats/withStats.tsx +19 -16
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +14 -1
- package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +78 -42
- package/source/framework/constants/common.ts +89 -60
- package/source/framework/constants/highlights.ts +1 -1
- package/source/framework/constants.ts +1 -1
- package/source/framework/types/types.ts +9 -4
- package/source/framework/utils/CommonUtils.ts +73 -62
- package/source/framework/utils/DateUtils.ts +10 -2
- package/source/framework/vehiclesProps/decoratedLightProps.tsx +1 -2
- package/source/framework/vehiclesProps/decoratedProps.tsx +1 -2
- package/source/locales/data.ts +2 -2
- package/tslint.json +1 -2
- package/utils.ts +2 -0
|
@@ -30,193 +30,5 @@
|
|
|
30
30
|
[class*='MuiPickersToolbar-toolbar']
|
|
31
31
|
background-color: #005CCB !important;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// .root
|
|
37
|
-
// & [class*='MuiStepLabel-label'][class*='MuiStepLabel-alternativeLabel']
|
|
38
|
-
// fontSize: 10
|
|
39
|
-
// maxWidth: 56
|
|
40
|
-
|
|
41
|
-
// & [class*='MuiStepLabel-label'][class*='MuiStepLabel-active']
|
|
42
|
-
// fontWeight: bold
|
|
43
|
-
|
|
44
|
-
// & [class*='MuiSvgIcon-root']
|
|
45
|
-
// width: 24
|
|
46
|
-
// height: 24
|
|
47
|
-
|
|
48
|
-
// & [class*='MuiStepConnector-line']
|
|
49
|
-
// borderWidth: 2px
|
|
50
|
-
|
|
51
|
-
// & [class*='MuiStepConnector-vertical']
|
|
52
|
-
// marginLeft: 50,
|
|
53
|
-
// padding: 12px 0 16px
|
|
54
|
-
|
|
55
|
-
// .active
|
|
56
|
-
// @media (min-width: 992px):
|
|
57
|
-
// backgroundColor: rgba(0, 92, 203, 0.08)
|
|
58
|
-
|
|
59
|
-
// & [class*='MuiStepIcon-text']
|
|
60
|
-
// fill: white !important
|
|
61
|
-
|
|
62
|
-
// & [class*='MuiStepIcon-active']
|
|
63
|
-
// color: #005CCB
|
|
64
|
-
// fontWeight: bold
|
|
65
|
-
// & [class*='MuiStepConnector-line']
|
|
66
|
-
// borderColor: #005CCB
|
|
67
|
-
// borderTopWidth: 2px
|
|
68
|
-
|
|
69
|
-
// .isCompleted
|
|
70
|
-
// & [class*='MuiStep-vertical'] + [class*='MuiStepConnector-vertical']
|
|
71
|
-
// & [class*='MuiStepConnector-line']
|
|
72
|
-
// borderColor: #005CCB
|
|
73
|
-
|
|
74
|
-
// .stepper
|
|
75
|
-
// & [class*='MuiStepper-root']
|
|
76
|
-
// padding: 0
|
|
77
|
-
// // overflow: 'scroll'
|
|
78
|
-
|
|
79
|
-
// .labelWrap
|
|
80
|
-
// & [class*='MuiStepLabel-label']
|
|
81
|
-
// marginTop: 7
|
|
82
|
-
// lineHeight: 11px
|
|
83
|
-
|
|
84
|
-
// .verticalWrap
|
|
85
|
-
// padding: 14px 0 14px 26px
|
|
86
|
-
// borderRadius: 0px 38px 38px 0px
|
|
87
|
-
// boxSizing: border-box
|
|
88
|
-
|
|
89
|
-
// & [class*='MuiStepLabel-iconContainer']
|
|
90
|
-
// paddingRight: 17
|
|
91
|
-
|
|
92
|
-
// & [class*='MuiSvgIcon-root']
|
|
93
|
-
// width: 48
|
|
94
|
-
// height: 48
|
|
95
|
-
|
|
96
|
-
// & [class*='MuiStepLabel-label']
|
|
97
|
-
// color: rgba(0, 0, 0, 0.83)
|
|
98
|
-
// fontWeight: bold
|
|
99
|
-
// fontSize: 22
|
|
100
|
-
|
|
101
|
-
// .default
|
|
102
|
-
// & [class*='MuiStepIcon-text']
|
|
103
|
-
// fill: grey
|
|
104
|
-
|
|
105
|
-
// & [class*='MuiStepIcon-root']
|
|
106
|
-
// color: transparent
|
|
107
|
-
// border: 1px solid grey
|
|
108
|
-
// boxSizing: border-box
|
|
109
|
-
// borderRadius: 50%
|
|
110
|
-
|
|
111
|
-
// & [class*='MuiStepLabel-label']
|
|
112
|
-
// color: rgba(0, 0, 0, 0.38)
|
|
113
|
-
// fontWeight: 400
|
|
114
|
-
|
|
115
|
-
// .completeStep
|
|
116
|
-
// color: #005CCB
|
|
117
|
-
// & [class*='MuiStepIcon-root']
|
|
118
|
-
// borderColor: #005CCB
|
|
119
|
-
// borderWidth: 2px
|
|
120
|
-
|
|
121
|
-
// & [class*='MuiStepIcon-text']
|
|
122
|
-
// fill: #005CCB
|
|
123
|
-
// fontWeight: bold
|
|
124
|
-
|
|
125
|
-
// & [class*='MuiStepLabel-label'][class*='MuiStepLabel-alternativeLabel']
|
|
126
|
-
// color: #005CCB
|
|
127
|
-
|
|
128
|
-
// & [class*='MuiStepLabel-label']
|
|
129
|
-
// color: #005CCB
|
|
130
|
-
|
|
131
|
-
// & [class*='MuiStepConnector-lineVertical']
|
|
132
|
-
// borderColor: #005CCB
|
|
133
|
-
|
|
134
|
-
// .completeLine
|
|
135
|
-
// & [class*='MuiStepConnector-line']
|
|
136
|
-
// borderColor: #005CCB
|
|
137
|
-
// borderTopWidth: 2px
|
|
138
|
-
|
|
139
|
-
// & [class*='MuiStepConnector-line'][class*='MuiStepConnector-lineVertical']
|
|
140
|
-
// borderColor: #005CCB
|
|
141
|
-
|
|
142
|
-
// .activeLine
|
|
143
|
-
// & [class*='MuiStepConnector-line']
|
|
144
|
-
// borderColor: #005CCB
|
|
145
|
-
// borderTopWidth: 2px
|
|
146
|
-
|
|
147
|
-
// .minutes
|
|
148
|
-
// fontSize: 14
|
|
149
|
-
// color: rgba(0, 0, 0, 0.63)
|
|
150
|
-
// display: block
|
|
151
|
-
// textAlign: left
|
|
152
|
-
// fontWeight: 400
|
|
153
|
-
|
|
154
|
-
// .buttonItem
|
|
155
|
-
// margin: 0
|
|
156
|
-
// padding: 0
|
|
157
|
-
|
|
158
|
-
// // .checkoutFooter:
|
|
159
|
-
// // display: 'block'
|
|
160
|
-
// // width: '100%'
|
|
161
|
-
// // textAlign: 'center'
|
|
162
|
-
// // background: '#f2f2f2'
|
|
163
|
-
// // color: '#757575'
|
|
164
|
-
// // fontSize: '7px'
|
|
165
|
-
|
|
166
|
-
// // .checkoutFooterItem:
|
|
167
|
-
// // margin: '0 4px'
|
|
168
|
-
|
|
169
|
-
// // .buttonWeiter
|
|
170
|
-
// // width: '328px'
|
|
171
|
-
// // margin: '16px auto'
|
|
172
|
-
// // display: 'block'
|
|
173
|
-
// // height: '44px'
|
|
174
|
-
// // textTransform: 'none'
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// .stepperWrapper
|
|
195
|
-
// width: 100%
|
|
196
|
-
// overflow: hidden
|
|
197
|
-
|
|
198
|
-
// +media-tablet-landscape-up()
|
|
199
|
-
// .stepperWrapper
|
|
200
|
-
// box-sizing: border-box
|
|
201
|
-
// background-color: #fff
|
|
202
|
-
// width: 376px
|
|
203
|
-
// box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.15);
|
|
204
|
-
// position fixed
|
|
205
|
-
// z-index: 1;
|
|
206
|
-
// padding: 35px 8px 35px
|
|
207
|
-
// height: 100%
|
|
208
|
-
|
|
209
|
-
// .menuArrow
|
|
210
|
-
// position: absolute;
|
|
211
|
-
// right: 0;
|
|
212
|
-
// top: 50%;
|
|
213
|
-
// max-width: 17px;
|
|
214
|
-
// transform: rotate(-90deg) translateY(-50%);
|
|
215
|
-
// transform-origin: 0 center;
|
|
216
|
-
// path
|
|
217
|
-
// fill: rgba(0, 0, 0, 0.38);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
// [class*='MuiPickersToolbar-toolbar']
|
|
222
|
-
// background-color: #005CCB !important;
|
|
33
|
+
[class*='MuiStepIcon-root'][class*='Mui-active']
|
|
34
|
+
color: #005CCB !important;
|
|
@@ -4,17 +4,16 @@ import { useStyles } from './CheckoutStepperClasses';
|
|
|
4
4
|
import styles from './CheckoutStepper.styl';
|
|
5
5
|
import { Hidden } from 'react-grid-system';
|
|
6
6
|
import { Stepper, Step, StepButton, IconSVG } from '../../../../common';
|
|
7
|
+
import { toJS } from 'mobx';
|
|
7
8
|
|
|
8
9
|
interface ICheckoutStepper {
|
|
9
|
-
|
|
10
|
-
activeStep?: number;
|
|
11
|
-
handleStep?: (index: number) => () => void;
|
|
12
|
-
completed?: any;
|
|
10
|
+
checkoutStore: any;
|
|
13
11
|
t?: (phrase: string) => {};
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
const CheckoutStepper: FunctionComponent<ICheckoutStepper> = ({
|
|
14
|
+
const CheckoutStepper: FunctionComponent<ICheckoutStepper> = ({ checkoutStore, t }) => {
|
|
17
15
|
const classes = useStyles();
|
|
16
|
+
const steps = toJS(checkoutStore.steps);
|
|
18
17
|
return (
|
|
19
18
|
<div className={`${classes.root} ${styles.stepperWrapper}`}>
|
|
20
19
|
<Stepper
|
|
@@ -22,34 +21,34 @@ const CheckoutStepper: FunctionComponent<ICheckoutStepper> = ({ steps, activeSte
|
|
|
22
21
|
nonLinear
|
|
23
22
|
orientation={isMobileOnly ? 'horizontal' : 'vertical'}
|
|
24
23
|
alternativeLabel={isMobileOnly}
|
|
25
|
-
activeStep={activeStep}>
|
|
24
|
+
activeStep={checkoutStore.activeStep}>
|
|
26
25
|
{steps.map(({ title, pathname }, index) => {
|
|
27
26
|
const labelRep = !!title && !isMobileOnly ? title.replace('-', '') : title;
|
|
28
27
|
return (
|
|
29
28
|
<Step key={pathname}
|
|
30
|
-
className={`${completed.has(steps[index].pathname) ? classes.isCompleted : ''}
|
|
31
|
-
${completed.has(steps[index].pathname) ? classes.completeLine : ''}
|
|
32
|
-
${activeStep === index && classes.activeLine}
|
|
29
|
+
className={`${checkoutStore.completed.has(steps[index].pathname) ? classes.isCompleted : ''}
|
|
30
|
+
${checkoutStore.completed.has(steps[index].pathname) ? classes.completeLine : ''}
|
|
31
|
+
${checkoutStore.activeStep === index && classes.activeLine}
|
|
33
32
|
`}
|
|
34
|
-
|
|
33
|
+
>
|
|
35
34
|
<StepButton
|
|
36
|
-
onClick={handleStep(index)}
|
|
35
|
+
onClick={checkoutStore.handleStep(index)}
|
|
37
36
|
classes={{
|
|
38
37
|
root: classes.buttonItem,
|
|
39
38
|
horizontal: classes.labelWrap,
|
|
40
39
|
vertical: classes.verticalWrap
|
|
41
40
|
}}
|
|
42
41
|
className={`
|
|
43
|
-
${activeStep === index ? classes.active : classes.default}
|
|
44
|
-
${completed.has(steps[index].pathname) && activeStep !== index && classes.completeStep}`}>
|
|
42
|
+
${checkoutStore.activeStep === index ? classes.active : classes.default}
|
|
43
|
+
${checkoutStore.completed.has(steps[index].pathname) && checkoutStore.activeStep !== index && classes.completeStep}`}>
|
|
45
44
|
<span>{labelRep}</span>
|
|
46
45
|
<Hidden xs sm md>
|
|
47
|
-
{activeStep !== index && <IconSVG name='menuArrow' className={styles.menuArrow} customDimensions={false}/>}
|
|
48
|
-
{!completed.has(steps[index].pathname) &&
|
|
46
|
+
{checkoutStore.activeStep !== index && <IconSVG name='menuArrow' className={styles.menuArrow} customDimensions={false} />}
|
|
47
|
+
{!checkoutStore.completed.has(steps[index].pathname) &&
|
|
49
48
|
<span
|
|
50
49
|
className={`
|
|
51
50
|
${classes.minutes}
|
|
52
|
-
${completed.has(steps[index].pathname) && activeStep !== index && classes.completeStep}`}
|
|
51
|
+
${checkoutStore.completed.has(steps[index].pathname) && checkoutStore.activeStep !== index && classes.completeStep}`}
|
|
53
52
|
>
|
|
54
53
|
{steps[index].minutes}
|
|
55
54
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.editableFieldWrapper
|
|
4
4
|
font-family: $font-style-arial
|
|
5
|
-
margin-top:
|
|
5
|
+
margin-top: 10px
|
|
6
6
|
|
|
7
7
|
.header
|
|
8
8
|
display: flex
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.field
|
|
13
13
|
display: flex
|
|
14
14
|
justify-content: space-between
|
|
15
|
-
margin-top:
|
|
15
|
+
margin-top: 10px
|
|
16
16
|
color: $black60
|
|
17
17
|
font-size: 14px
|
|
18
18
|
|
|
@@ -15,18 +15,18 @@ interface IOrderOverviewItem {
|
|
|
15
15
|
rate?: string;
|
|
16
16
|
};
|
|
17
17
|
activeStep: number;
|
|
18
|
+
dontShowEdit?:boolean;
|
|
18
19
|
handleStep: (index: number) => () => void;
|
|
19
20
|
titleClassName?: string;
|
|
20
21
|
fieldClassName?: string;
|
|
21
22
|
fieldWrapperClassName?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
const OrderOverviewItem: FC<IOrderOverviewItem> = ({ fields, handleStep, activeStep, titleClassName, fieldClassName, fieldWrapperClassName }) => {
|
|
25
|
+
const OrderOverviewItem: FC<IOrderOverviewItem> = ({ dontShowEdit, fields, handleStep, activeStep, titleClassName, fieldClassName, fieldWrapperClassName }) => {
|
|
25
26
|
const wrapperClasses = classnames(
|
|
26
27
|
styles.editableFieldWrapper,
|
|
27
28
|
{ [fieldWrapperClassName]: fieldWrapperClassName }
|
|
28
29
|
);
|
|
29
|
-
|
|
30
30
|
return (
|
|
31
31
|
<div className={wrapperClasses}>
|
|
32
32
|
<div>
|
|
@@ -34,7 +34,7 @@ const OrderOverviewItem: FC<IOrderOverviewItem> = ({ fields, handleStep, activeS
|
|
|
34
34
|
<span className={titleClassName}>{fields.title} {fields.additionalTitle && <span className={styles.additionalTitle}>{fields.additionalTitle}</span>}</span>
|
|
35
35
|
<span className={styles.fieldLineWrapper} data-testid='editIcon' onClick={() => handleStep(activeStep)()}>
|
|
36
36
|
{fields.oneLineRate && <span className={classnames(styles.fieldLine, fieldClassName)}>{fields.oneLineRate}</span>}
|
|
37
|
-
{!fieldWrapperClassName && <span className={styles.editIcon}><IconSVG name='editIcon'/></span >}
|
|
37
|
+
{!dontShowEdit &&!fieldWrapperClassName && <span className={styles.editIcon}><IconSVG name='editIcon'/></span >}
|
|
38
38
|
</span>
|
|
39
39
|
</div>
|
|
40
40
|
{fields.content && fields.content.map((fields, index) => (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styles from './FormattedNumber.styl';
|
|
3
3
|
|
|
4
4
|
import classnames from 'classnames';
|
|
@@ -16,11 +16,10 @@ export interface IFormattedPriceProps {
|
|
|
16
16
|
|
|
17
17
|
// const breakpointForRound = 10000;
|
|
18
18
|
const separatorCounter = 3;
|
|
19
|
-
|
|
20
19
|
const FormattedNumber: React.FunctionComponent<IFormattedPriceProps> = ({ className, value, disableFormatting, toRound, numbersAfterDot, beforeCommaClassName, afterCommaClassName }) => {
|
|
21
|
-
|
|
22
20
|
function getFormattedNumber() {
|
|
23
21
|
// First we need to check if value is actual number;
|
|
22
|
+
|
|
24
23
|
const notFalsieValue = !!value ? value : 0;
|
|
25
24
|
|
|
26
25
|
const rounded = toRound ? Math.round(notFalsieValue) : notFalsieValue;
|
package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
align-items: center;
|
|
23
23
|
width: 100%;
|
|
24
24
|
grid-template-columns: 1fr 82px;
|
|
25
|
-
grid-column-gap:
|
|
25
|
+
grid-column-gap: 9px;
|
|
26
26
|
padding: 17px 0
|
|
27
27
|
|
|
28
28
|
& + &
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
|
|
35
35
|
.icon
|
|
36
|
-
margin-right:
|
|
36
|
+
margin-right: 0
|
|
37
37
|
width: 64px
|
|
38
38
|
height: 64px
|
|
39
39
|
display block;
|
|
@@ -42,18 +42,16 @@
|
|
|
42
42
|
+media-phone-only()
|
|
43
43
|
width: 82px
|
|
44
44
|
height: 82px
|
|
45
|
-
margin-right: 0
|
|
46
45
|
grid-column: 2;
|
|
47
46
|
grid-row: 1 / span 3;
|
|
48
47
|
|
|
49
48
|
.title
|
|
50
|
-
font-size:
|
|
49
|
+
font-size: 16px;
|
|
51
50
|
margin-bottom: 5px
|
|
52
51
|
color: $grey-3a;
|
|
53
52
|
+media-phone-only()
|
|
54
|
-
font-size: 16px;
|
|
55
53
|
grid-row: 1 / span 1;
|
|
56
|
-
text-align:
|
|
54
|
+
text-align: start;
|
|
57
55
|
color: $grey-32;
|
|
58
56
|
|
|
59
57
|
.textContent
|
|
@@ -23,8 +23,6 @@ const PanelConfig: React.FunctionComponent<IPanelConfigProps> = ({
|
|
|
23
23
|
OfferBlockComponent,
|
|
24
24
|
offerBlockProps,
|
|
25
25
|
postfix,
|
|
26
|
-
isOpenDetails,
|
|
27
|
-
onToggleDetailsClick,
|
|
28
26
|
isAlternative
|
|
29
27
|
}) => {
|
|
30
28
|
const requestOfferProps = {
|
|
@@ -53,7 +51,6 @@ const PanelConfig: React.FunctionComponent<IPanelConfigProps> = ({
|
|
|
53
51
|
] : [];
|
|
54
52
|
|
|
55
53
|
const wrapperClassName = classnames(styles.wrapConfigDetails, { [styles.wrapConfigDetailsMobile]: mobileMode });
|
|
56
|
-
|
|
57
54
|
return (
|
|
58
55
|
<div className={wrapperClassName}>
|
|
59
56
|
<Hidden xs sm md>
|
|
@@ -3,11 +3,9 @@ import { createTheme } from '@mui/material/styles';
|
|
|
3
3
|
export const theme = createTheme({
|
|
4
4
|
components: {
|
|
5
5
|
MuiToggleButton: {
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
style: {
|
|
10
|
-
width: 40,
|
|
6
|
+
styleOverrides: {
|
|
7
|
+
root: ({ ownerState: { variant } }) => ({
|
|
8
|
+
...(variant === 'sidebar' && {
|
|
11
9
|
height: 41,
|
|
12
10
|
color: '#333',
|
|
13
11
|
width: '100%',
|
|
@@ -18,13 +16,10 @@ export const theme = createTheme({
|
|
|
18
16
|
'&.Mui-selected:hover': {
|
|
19
17
|
backgroundColor: '#005ccb',
|
|
20
18
|
color: '#fff'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
}
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
|
-
});
|
|
25
|
+
});
|
|
@@ -2,7 +2,7 @@ import React, { FC } from 'react';
|
|
|
2
2
|
import _get from 'lodash/get';
|
|
3
3
|
import styles from '../OfferPanel.styl';
|
|
4
4
|
import { modalsTranslate } from '../../../locales/data';
|
|
5
|
-
import ToggleButton from '@mui/material/ToggleButton';
|
|
5
|
+
import ToggleButton, { ToggleButtonProps as IToggleButtonProps } from '@mui/material/ToggleButton';
|
|
6
6
|
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
7
7
|
import { ThemeProvider } from '@mui/material/styles';
|
|
8
8
|
import { theme } from './MuiOfferPeriod.theme';
|
|
@@ -14,6 +14,24 @@ export interface IOfferPeriod {
|
|
|
14
14
|
onChange: (key: string, value: number) => void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
type IToggleButtonVariant =
|
|
18
|
+
| 'text'
|
|
19
|
+
| 'outlined'
|
|
20
|
+
| 'contained'
|
|
21
|
+
| 'sidebar';
|
|
22
|
+
|
|
23
|
+
interface ICustomToggleButtonProps extends Omit<IToggleButtonProps, 'variant'> {
|
|
24
|
+
variant: IToggleButtonVariant;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const MyCustomToggleButton: FC<ICustomToggleButtonProps> = (props) => {
|
|
28
|
+
return (
|
|
29
|
+
<ToggleButton {...props}>
|
|
30
|
+
{props.children}
|
|
31
|
+
</ToggleButton>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
17
35
|
const OfferPeriod: FC<IOfferPeriod> = ({ paybackPeriod, periods, t, onChange }) => {
|
|
18
36
|
|
|
19
37
|
return (
|
|
@@ -27,13 +45,19 @@ const OfferPeriod: FC<IOfferPeriod> = ({ paybackPeriod, periods, t, onChange })
|
|
|
27
45
|
color='primary'
|
|
28
46
|
value={paybackPeriod}
|
|
29
47
|
exclusive
|
|
30
|
-
onChange={(
|
|
31
|
-
onChange('paybackPeriod', +
|
|
48
|
+
onChange={(event) => {
|
|
49
|
+
onChange('paybackPeriod', +(event.target as HTMLInputElement).value);
|
|
32
50
|
}}
|
|
33
51
|
>
|
|
34
52
|
{periods.map((period) => {
|
|
35
53
|
return (
|
|
36
|
-
<
|
|
54
|
+
<MyCustomToggleButton
|
|
55
|
+
variant={'sidebar'}
|
|
56
|
+
key={period}
|
|
57
|
+
value={period}
|
|
58
|
+
>
|
|
59
|
+
{period}
|
|
60
|
+
</MyCustomToggleButton>
|
|
37
61
|
);
|
|
38
62
|
})}
|
|
39
63
|
</ToggleButtonGroup>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styles from './OfferCheckboxGroup.styl';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
// import FormattedNumber from '../../FormattedNumber/FormattedNumber';
|
|
5
|
-
// import Tooltip from '../../_common/Tooltip/Tooltip';
|
|
6
4
|
import CheckboxMaterial from '../../_common/CheckboxMaterial/CheckboxMaterial';
|
|
7
5
|
import MaterialTooltip from '../../_common/MaterialTooltip/MaterialTooltip';
|
|
8
6
|
|
|
@@ -22,11 +20,13 @@ export interface ICheckboxProps {
|
|
|
22
20
|
containerClassName?: string;
|
|
23
21
|
checkboxClassName?: string;
|
|
24
22
|
labelClassName?: string;
|
|
23
|
+
labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
|
|
25
24
|
tooltipDescription?: string;
|
|
26
25
|
checkboxPriceValue: any;
|
|
27
26
|
tooltipPosX?: string;
|
|
28
27
|
error?: boolean;
|
|
29
|
-
|
|
28
|
+
description?: string;
|
|
29
|
+
label?: JSX.Element | string | null;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
|
|
@@ -87,8 +87,8 @@ class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
|
|
|
87
87
|
|
|
88
88
|
render() {
|
|
89
89
|
const {
|
|
90
|
-
containerClassName,
|
|
91
|
-
checked, disabled,
|
|
90
|
+
containerClassName, labelClassName, reversed,
|
|
91
|
+
checked, disabled, error, label, tooltipDescription, labelPlacement,
|
|
92
92
|
description
|
|
93
93
|
} = this.props;
|
|
94
94
|
|
|
@@ -105,12 +105,6 @@ class CheckboxContainer extends React.Component<ICheckboxProps, {}> {
|
|
|
105
105
|
labelClassName
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
-
const checkboxClasses = classnames(
|
|
109
|
-
styles.checkbox,
|
|
110
|
-
checkboxClassName,
|
|
111
|
-
{ [styles.withLabel]: !!label }
|
|
112
|
-
);
|
|
113
|
-
|
|
114
108
|
const wrapInputClasses = classnames(
|
|
115
109
|
styles.wrapInput,
|
|
116
110
|
{ [styles.reversed]: reversed }
|
|
@@ -11,7 +11,7 @@ interface IOfferPeriod {
|
|
|
11
11
|
transferInstallments?: any;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const OfferCheckboxGroup: FC<IOfferPeriod> = ({ additionalService, transferInstallments, isAboAccordionExpanded0 = true, priceTabIndex
|
|
14
|
+
const OfferCheckboxGroup: FC<IOfferPeriod> = ({ additionalService, transferInstallments, isAboAccordionExpanded0 = true, priceTabIndex }) => {
|
|
15
15
|
const offerGroupClass = classNames(styles.checkboxWrapped, { [styles.checkBoxGroup]: priceTabIndex !== THREE });
|
|
16
16
|
return (
|
|
17
17
|
<div className={offerGroupClass}>
|
|
@@ -11,7 +11,7 @@ import CheckboxMaterial from '../_common/CheckboxMaterial/CheckboxMaterial';
|
|
|
11
11
|
interface IFinalAdvice {
|
|
12
12
|
checked: boolean;
|
|
13
13
|
label: string;
|
|
14
|
-
onChange?: (event
|
|
14
|
+
onChange?: (event?: React.ChangeEvent<HTMLInputElement>, checked?: boolean | string, value?: any) => void;
|
|
15
15
|
reversed?: boolean;
|
|
16
16
|
value: string;
|
|
17
17
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { FC, ChangeEvent } from 'react';
|
|
2
2
|
import _get from 'lodash/get';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
3
|
import styles from './OfferPeriod.styl';
|
|
5
4
|
import { modalsTranslate } from '../../../locales/data';
|
|
6
5
|
import CheckboxMaterial from '../../_common/CheckboxMaterial/CheckboxMaterial';
|
|
@@ -22,9 +21,6 @@ const OfferPeriod: FC<IOfferPeriod> = ({ paybackPeriod, periods, t, onChange })
|
|
|
22
21
|
<div className={styles.periods}>
|
|
23
22
|
{periods.map((period: number) => {
|
|
24
23
|
const isChecked = paybackPeriod === period;
|
|
25
|
-
const labelClassName = classNames(
|
|
26
|
-
{ [styles.checked]: isChecked }
|
|
27
|
-
);
|
|
28
24
|
const inputProps = {
|
|
29
25
|
type: 'period',
|
|
30
26
|
name: 'duration',
|
|
@@ -9,16 +9,18 @@ export interface IRangeGroup {
|
|
|
9
9
|
onChange: (event: Event, value: number | number[]) => void;
|
|
10
10
|
className?: string;
|
|
11
11
|
isAlternative?: boolean;
|
|
12
|
+
maxFinancingFirstInstallment?: number;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
const RangeGroup: FC<IRangeGroup> = ({ sliders, onChange, isAlternative }) => <>
|
|
15
|
-
{sliders.length && sliders.map(({ name, min, max, step, caption, value, unitName }) => {
|
|
15
|
+
const RangeGroup: FC<IRangeGroup> = ({ sliders, onChange, isAlternative, maxFinancingFirstInstallment }) => <>
|
|
16
|
+
{sliders.length && sliders.map(({ name, min, max, step, caption, value, unitName, withRangeLimit }) => {
|
|
16
17
|
const rangeProps = {
|
|
17
18
|
min, max, step, value,
|
|
18
|
-
isAlternative,
|
|
19
|
+
isAlternative, withRangeLimit,
|
|
19
20
|
units: value ? ` ${unitName}` : '',
|
|
20
21
|
onAfterChange: () => {},
|
|
21
|
-
onChange: (_: Event, value: number | number[]) => onChange(name, value)
|
|
22
|
+
onChange: (_: Event, value: number | number[]) => onChange(name, value),
|
|
23
|
+
maxFinancingFirstInstallment
|
|
22
24
|
};
|
|
23
25
|
return (
|
|
24
26
|
<Fragment key={name}>
|
|
@@ -157,8 +157,12 @@ class PriceRatingDetailed extends React.Component<IPriceRatingDetailedProps, IPr
|
|
|
157
157
|
const MIN_PRICE = 500;
|
|
158
158
|
const MARGIN_OFFSET = price >= MIN_PRICE ? MIN_PRICE : (price / 2);
|
|
159
159
|
const strings = {
|
|
160
|
-
general: `${getFormattedPrice(marginToLeft ? price - MARGIN_OFFSET : min)} – ${getFormattedPrice(marginToRight ? price + MARGIN_OFFSET : max)}\u00A0€`,
|
|
161
|
-
compact: <>
|
|
160
|
+
general: `${getFormattedPrice((marginToLeft ? price - MARGIN_OFFSET : min) as number)} – ${getFormattedPrice((marginToRight ? price + MARGIN_OFFSET : max) as number)}\u00A0€`,
|
|
161
|
+
compact: <>
|
|
162
|
+
{getFormattedPrice((marginToLeft ? price - MARGIN_OFFSET : min) as number)}
|
|
163
|
+
<br />
|
|
164
|
+
{t(`${i18nPrefix}priceTo`)} {getFormattedPrice((marginToRight ? price + MARGIN_OFFSET : max) as number)} €
|
|
165
|
+
</>
|
|
162
166
|
};
|
|
163
167
|
|
|
164
168
|
return (
|