@bytebrand/fe-ui-core 4.2.240 → 4.2.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
  3. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
  4. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
  5. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
  6. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +1 -5
  7. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +1 -1
  8. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +27 -43
  9. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +27 -62
  10. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +1 -9
  11. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +32 -36
  12. package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +1 -1
  13. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
  14. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -112
  15. package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
  16. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +2 -4
  17. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
  18. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +2 -8
  19. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +2 -11
  20. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -2
  21. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +1 -0
  22. package/source/components/_common/Button/Button.tsx +2 -4
  23. package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
  24. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
  25. package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +4 -4
  26. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
  27. package/source/components/_common/withStats/withStats.styl +0 -3
  28. package/source/components/_common/withStats/withStats.tsx +15 -18
  29. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -3
  30. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +7 -7
  31. package/source/framework/types/types.ts +0 -2
  32. package/source/framework/utils/CommonUtils.ts +0 -1
  33. package/source/framework/utils/DateUtils.ts +0 -8
  34. package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +0 -26
@@ -15,7 +15,6 @@ export interface IButtonProps {
15
15
  color?: variantColor;
16
16
  children?: any;
17
17
  variant?: variantType;
18
- getRef?: (ref: HTMLButtonElement) => void;
19
18
 
20
19
  disabled?: boolean;
21
20
  loading?: boolean;
@@ -26,7 +25,7 @@ export interface IButtonProps {
26
25
  onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
27
26
  }
28
27
 
29
- const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onMouseEnter, onMouseLeave, variant, loading, disabled, children }: IButtonProps) => {
28
+ const Button: React.FC<IButtonProps> = ({ className, color, onClick, onMouseEnter, onMouseLeave, variant, loading, disabled, children }: IButtonProps) => {
30
29
  const onHandlerClick = (event: React.MouseEvent<HTMLButtonElement>) => {
31
30
  event.stopPropagation();
32
31
  event.nativeEvent.stopImmediatePropagation();
@@ -53,7 +52,6 @@ const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onM
53
52
  onClick: onHandlerClick,
54
53
  onMouseEnter: onHandlerMouseEnter,
55
54
  onMouseLeave: onHandlerMouseLeave,
56
- ref:getRef,
57
55
  disabled: disabled || loading
58
56
  };
59
57
 
@@ -71,7 +69,7 @@ Button.defaultProps = {
71
69
  buttonType: 'button',
72
70
 
73
71
  onClick: () => { },
74
- getRef: () => { },
72
+
75
73
  onMouseEnter: () => { },
76
74
  onMouseLeave: () => { }
77
75
  };
@@ -236,7 +236,6 @@ import Easy from './SVG/slider/Easy';
236
236
  import Safe from './SVG/slider/Safe';
237
237
  import ZoomIn from './SVG/slider/ZoomIn';
238
238
  import ZoomOut from './SVG/slider/ZoomOut';
239
- import YoutubeButton from './SVG/slider/YoutubeButton'
240
239
 
241
240
  // social
242
241
  import SharingInterface from './SVG/social/SharingInterface';
@@ -548,7 +547,6 @@ const components: IComponentsProp = {
548
547
  safe: Safe,
549
548
  zoomIn: ZoomIn,
550
549
  zoomOut: ZoomOut,
551
- youtubeButton:YoutubeButton,
552
550
 
553
551
  // social
554
552
  sharingInterface: SharingInterface,
@@ -21,7 +21,7 @@ export const Theme = createTheme({
21
21
  },
22
22
  ['&.Mui-focused + [data-popper-placement*="bottom"] .MuiOutlinedInput-notchedOutline']: {
23
23
  ...(ownerState.name === 'mobileSearch' && { // tslint:disable-line
24
- borderTop: isMobileOnly ? '2px solid #005CCB' : 0
24
+ borderTop: isMobileOnly ? '2px solid #1976d2' : 0
25
25
  })
26
26
  },
27
27
  ['&.Mui-focused .MuiInputLabel-root']: {
@@ -38,9 +38,9 @@ export const Theme = createTheme({
38
38
  ['&.Mui-focused + [data-popper-placement*="top"] > .MuiPaper-root']: {
39
39
  borderBottomLeftRadius: 0,
40
40
  borderBottomRightRadius: 0,
41
- borderLeft: '2px solid #005CCB',
42
- borderRight: '2px solid #005CCB',
43
- borderTop: '2px solid #005CCB',
41
+ borderLeft: '2px solid #1976d2',
42
+ borderRight: '2px solid #1976d2',
43
+ borderTop: '2px solid #1976d2',
44
44
  ...(ownerState.error && { // tslint:disable-line
45
45
  borderColor: '#d32f2f'
46
46
  })
@@ -48,15 +48,15 @@ export const Theme = createTheme({
48
48
  ['&.Mui-focused + [data-popper-placement*="bottom"] > .MuiPaper-root']: {
49
49
  borderTopLeftRadius: 0,
50
50
  borderTopRightRadius: 0,
51
- borderLeft: '2px solid #005CCB',
52
- borderRight: '2px solid #005CCB',
53
- borderBottom: '2px solid #005CCB',
51
+ borderLeft: '2px solid #1976d2',
52
+ borderRight: '2px solid #1976d2',
53
+ borderBottom: '2px solid #1976d2',
54
54
  ...(ownerState.error && { // tslint:disable-line
55
55
  borderColor: '#d32f2f'
56
56
  }),
57
57
  marginTop: '-3px',
58
58
  ...(ownerState.name === 'mobileSearch' && { // tslint:disable-line
59
- borderTop: isMobileOnly ? '2px solid #005CCB' : 0,
59
+ borderTop: isMobileOnly ? '2px solid #1976d2' : 0,
60
60
  marginTop: 0,
61
61
  borderTopRightRadius: 4,
62
62
  borderTopLeftRadius: 4
@@ -37,8 +37,8 @@ export const Theme = createTheme({
37
37
  borderTopLeftRadius: 0,
38
38
  borderTopRightRadius: 0,
39
39
  transformOrigin: '0 0 !important',
40
- boxShadow: 'inset 2px 0px 0px 0px #005CCB, inset -2px 0px 0px 0px #005CCB',
41
- borderBottom: '2px solid #005CCB',
40
+ boxShadow: 'inset 2px 0px 0px 0px #1976d2, inset -2px 0px 0px 0px #1976d2',
41
+ borderBottom: '2px solid #1976d2',
42
42
  ['& > .MuiList-root']: {
43
43
  paddingRight: '0 !important',
44
44
  width: '100% !important'
@@ -48,12 +48,12 @@ export const Theme = createTheme({
48
48
  },
49
49
  ['::-webkit-scrollbar-track']: {
50
50
  background: '#fff',
51
- borderRight: '2px solid #005CCB',
51
+ borderRight: '2px solid #1976d2',
52
52
  boxShadow: 'inset -4px 0 0 0 #fff'
53
53
  },
54
54
  ['::-webkit-scrollbar-thumb']: {
55
55
  backgroundColor: '#e8e8e8',
56
- borderRight: '2px solid #005CCB',
56
+ borderRight: '2px solid #1976d2',
57
57
  boxShadow: 'inset -4px 0 0 0 #fff'
58
58
  },
59
59
  ['::-webkit-scrollbar-thumb:hover']: {
@@ -23,18 +23,13 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
23
23
  const dealerId = _get(car, 'metaData.ownerId') || null;
24
24
  const carId = _get(car, '_id', '');
25
25
  const onAutoDeIdClick = () => {
26
- btnEl.current?.click();
26
+ btnEl.current.onClick();
27
27
  };
28
28
 
29
29
  const controlsContainerClassName = classnames(
30
30
  styles.controlsContainer,
31
31
  controlsClassContainer
32
32
  );
33
-
34
- const getRef = (ref: HTMLButtonElement): void => {
35
- btnEl.current = ref;
36
- };
37
-
38
33
  return (
39
34
  <>
40
35
  <div className={controlsContainerClassName}>
@@ -46,9 +41,8 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
46
41
  _: void,
47
42
  isLoading: boolean,
48
43
  isSale: boolean,
49
- isAlternative: boolean,
50
- isSuccess: boolean
51
- ) => {
44
+ isAlternative: boolean
45
+ ) => {
52
46
  const { metaData } = car;
53
47
  const isAlternativeType = !!metaData && !!metaData.type;
54
48
  const offerButtonClassName = classnames(
@@ -58,12 +52,10 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
58
52
  { [styles.isAlternativeButton]: isAlternative || isSale || isAlternativeType }
59
53
  );
60
54
 
61
-
62
55
  const getRequestButtonTitle = () => {
63
56
  if (isSale) return t('sidebar.requestOfferSale');
64
57
  // tslint:disable-next-line:no-else-after-return
65
58
  else if (isAlternativeType) return t('sidebar.importRequest');
66
- else if (isSuccess) return t('CheckoutPage:onlineCheckoutModal.toMyOrder');
67
59
  else if (hasCheckout) return t('vehicleProps:title.toCheckoutCar');
68
60
  else if (isOfferRequested) return t('CheckoutPage:onlineCheckoutModal.redirectBtn');
69
61
  else return t('sidebar.requestOffer');
@@ -71,10 +63,10 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
71
63
 
72
64
  return (
73
65
  <StyledButton
66
+ refs={btnEl}
74
67
  className={offerButtonClassName}
75
68
  onClick={onClick}
76
69
  loading={isLoading}
77
- getRef={getRef}
78
70
  >
79
71
  {isOfferRequested
80
72
  ? null
@@ -148,6 +148,3 @@ $indent = 10px
148
148
 
149
149
  .new
150
150
  text-transform: uppercase
151
-
152
- .imagesCount
153
- margin-left: 0 !important
@@ -71,7 +71,7 @@ const withStats = (WrappedComponent: any) => ({
71
71
  const delimiters = { xs: '|', sm: '|', md: 'von' };
72
72
 
73
73
  return (
74
- <div className={classnames(styles.section, styles.imagesCount)}>
74
+ <div className={styles.section}>
75
75
  {statsSize === 'md' ? <IconSVG name='common_camera' customDimensions className={styles.cameraIcon} /> : null}
76
76
  {!!imagesCount && <span>{`${activeSlide + 1} ${delimiters[statsSize]} ${imagesCount}`}</span>}
77
77
  </div>
@@ -115,23 +115,20 @@ const withStats = (WrappedComponent: any) => ({
115
115
  const favoritesIconClassName = classnames(styles.statsStarIcon, { [styles.accented]: isFavoured });
116
116
 
117
117
  return (
118
- <>
119
- {(!!totalCarImpCount || !!totalFavCount) && <div className={styles.section}>
120
- {!!totalCarImpCount ? <div className={styles.statsViewsCount}>
121
- <IconSVG name='common_SliderEye' customDimensions className={styles.statsEyeIcon} />
122
- <span>
123
- {totalCarImpCount}
124
- </span>
125
- </div> : null}
126
- {!!totalFavCount ? <div className={favoritesClassName} onClick={onFavoriteClick}>
127
- <IconSVG name='star' customDimensions className={favoritesIconClassName} />
128
- <span>
129
- {totalFavCount}
130
- </span>
131
- </div> : null}
132
- </div>
133
- }
134
- </>
118
+ <div className={styles.section}>
119
+ {!!totalCarImpCount ? <div className={styles.statsViewsCount}>
120
+ <IconSVG name='common_SliderEye' customDimensions className={styles.statsEyeIcon} />
121
+ <span>
122
+ {totalCarImpCount}
123
+ </span>
124
+ </div> : null}
125
+ {!!totalFavCount ? <div className={favoritesClassName} onClick={onFavoriteClick}>
126
+ <IconSVG name='star' customDimensions className={favoritesIconClassName} />
127
+ <span>
128
+ {totalFavCount}
129
+ </span>
130
+ </div> : null}
131
+ </div>
135
132
  );
136
133
  };
137
134
 
@@ -57,9 +57,7 @@
57
57
  .vehicleId
58
58
  padding: 11px
59
59
  background-color: #fff
60
- border-bottom: 1px solid #e8e8e8;
61
- padding-bottom: 19px;
62
-
60
+
63
61
  .vehicleIdLabel
64
62
  font-size: 14px
65
63
  font-weight: 700
@@ -34,7 +34,7 @@ interface IFiltersContainerProps extends IRouteComponentProps<PathParamsType> {
34
34
  aggregation: {};
35
35
  setActiveSorting: (newActiveSorting: string) => void;
36
36
  setLastSearchString: (filters: IFilters, query: string) => void;
37
- search: (filters: any, page?: number, getStats?: boolean, vehicleID?: string|null) => void;
37
+ search: (filters: any, page?: number, getStats?: boolean) => void;
38
38
  resetFiltersToDefault: () => void;
39
39
  clearSearchState: (clearSorting?: boolean) => void;
40
40
  addMmsGroup: () => void;
@@ -55,7 +55,7 @@ interface IFiltersContainerProps extends IRouteComponentProps<PathParamsType> {
55
55
  t?: (phrase: string) => string;
56
56
  isDealerPage?: boolean;
57
57
  isAlternative?: boolean;
58
- vehicleID?: string;
58
+ isReferenceSearch?: boolean;
59
59
  successTransition?: boolean;
60
60
  isErrorAlternativeField: boolean;
61
61
  Link?: any;
@@ -68,11 +68,11 @@ class FiltersContainer extends React.Component<IFiltersContainerProps, {}> {
68
68
  }
69
69
 
70
70
  componentDidUpdate(prevProps: IFiltersContainerProps) {
71
- const { location, filters, resetFiltersToDefault, clearSearchState, search, activeSorting, setActiveSorting, vehicleID } = this.props;
72
- console.log('vehicleID', vehicleID);
71
+ const { location, filters, resetFiltersToDefault, clearSearchState, search, activeSorting, setActiveSorting, isReferenceSearch } = this.props;
73
72
  if (
74
73
  (prevProps.location.search !== location.search) &&
75
- !_startsWith(location.search, '?pageNumber'))
74
+ !_startsWith(location.search, '?pageNumber') &&
75
+ !isReferenceSearch)
76
76
  {
77
77
  const queryFromFilters = this.getQueryFromFilters();
78
78
  const prevQueryFromFilters = ['pageNumber', 'activeSort'].reduce((url, param) => url.replace(new RegExp(`(^${param}=\\w*&|&${param}=\\w*)`), ''), prevProps.location.search.slice(1));
@@ -93,7 +93,7 @@ class FiltersContainer extends React.Component<IFiltersContainerProps, {}> {
93
93
  }
94
94
 
95
95
  clearSearchState(!activeSort);
96
- search(filters, Number(pageNumber) || 1, true, vehicleID);
96
+ search(filters, Number(pageNumber) || 1, true);
97
97
  }
98
98
 
99
99
  this.updateFinancingSearchConfig();
@@ -314,7 +314,7 @@ class FiltersContainer extends React.Component<IFiltersContainerProps, {}> {
314
314
  if (isHistogram) {
315
315
  const histogramData = histograms[filterField].length ? histograms[filterField] : RANGE_FILTERS[filter].options;
316
316
  const actualValues = {
317
- from: filters[filter].value.from ? filters[filter].value.from : histogramData[0].from,
317
+ from: histogramData[0].from,
318
318
  to: histogramData[histogramData.length - 1].to
319
319
  };
320
320
 
@@ -32,7 +32,6 @@ export interface IImage {
32
32
  isSimpleTemp: boolean;
33
33
  isInProcessing: boolean;
34
34
  isTemp: boolean;
35
- videoUrl:string; // youtube link that can be used in src in youtube video,
36
35
  }
37
36
 
38
37
  export interface IPrice {
@@ -252,7 +251,6 @@ export interface IVehicleDetailedSidebarProps {
252
251
  isAlternative?: boolean;
253
252
  onCurrentSalesPriceChange: (price: number) => void;
254
253
  className?: string;
255
- isFetching?: boolean;
256
254
  }
257
255
 
258
256
  interface IOfferRequestButtonWrapper {
@@ -547,7 +547,6 @@ export function setUtmParameters() {
547
547
  const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
548
548
 
549
549
  document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
550
-
551
550
  }
552
551
 
553
552
  export const updateCookieList = (handleSentryInit: () => void) => {
@@ -91,11 +91,3 @@ export const getYears = (minYear = 1980, maxYear = moment().year(), reverse = fa
91
91
  export const createDateAsUTC = (date: Date): Date => new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));
92
92
 
93
93
  // end for checkout datepicker
94
-
95
- export const fromUTCToDateString = (UTCDate: Date) => {
96
- const date = new Date(UTCDate);
97
- const day = date.getUTCDate().toString().padStart(2, '0');
98
- const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');
99
- const year = date.getUTCFullYear();
100
- return `${day}.${month}.${year}`;
101
- }
@@ -1,26 +0,0 @@
1
- /* tslint:disable */
2
- import * as React from 'react';
3
-
4
- const SvgYoutubeButton = (props: any) => (
5
- <svg
6
- xmlns="http://www.w3.org/2000/svg"
7
- width="146"
8
- height="103"
9
- viewBox="0 0 146 103"
10
- fill="none"
11
- {...props}
12
- >
13
- <g clipPath="url(#clip0_13856_24182)">
14
- <path d="M142.741 16.6087C141.067 10.3215 137.398 4.99979 131.11 3.32604C119.716 0.278958 72.9583 0 72.9583 0C72.9583 0 26.2006 0.278958 14.8063 3.32604C8.51896 4.99979 4.87104 10.3215 3.17583 16.6087C0.12875 28.0031 0 51.5 0 51.5C0 51.5 0.12875 74.9969 3.17583 86.3912C4.84958 92.6785 8.51896 98.0002 14.8063 99.674C26.2006 102.721 72.9583 103 72.9583 103C72.9583 103 119.716 102.721 131.11 99.674C137.398 98.0002 141.067 92.6785 142.741 86.3912C145.788 74.9969 145.917 51.5 145.917 51.5C145.917 51.5 145.788 28.0031 142.741 16.6087Z" fill="#FF0000" />
15
- <path d="M96.5625 51.5003L57.9375 30.042V72.9587" fill="white" />
16
- </g>
17
- <defs>
18
- <clipPath id="clip0_13856_24182">
19
- <rect width="145.917" height="103" fill="white" />
20
- </clipPath>
21
- </defs>
22
- </svg>
23
- );
24
-
25
- export default SvgYoutubeButton;
26
- /* tslint:enable */