@bytebrand/fe-ui-core 4.1.196 → 4.1.198

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.1.196",
3
+ "version": "4.1.198",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -125,7 +125,7 @@ export const HIGHLIGHTS_TYPES = transformHighlights();
125
125
 
126
126
  export const FilterBlockFactory: IFilterBlockFactory = {
127
127
  SUPER_ADMIN: (props: any): JSX.Element => (<SuperAdminWidget {...props} />),
128
- BASIC_DATA: (props: any): JSX.Element => (<BasicDataWidget {...props} />),
128
+ BASIC_DATA: (props: any): JSX.Element => (<BasicDataWidget {...props} isNotDetailed={true}/>),
129
129
  DRIVE_TRANSMISSION: (props: any): JSX.Element => (<DriveTransmissionWidget {...props} />),
130
130
  BODY_COLOR: (props: any): JSX.Element => (<BodyColorWidget {...props} />),
131
131
  INTERIOR: (props: any): JSX.Element => (<InteriorWidget {...props} />),
@@ -28,7 +28,7 @@ class AlternativeID extends React.Component<IAlternativeIDProps, IAlternativeIDS
28
28
  value: ''
29
29
  };
30
30
 
31
- componentDidMount() { this.setState({ value: this.props.autoDeId }); };
31
+ componentDidMount() { this.setState({ value: this.props.autoDeId }); }
32
32
 
33
33
  onFilterChange = (value: string) => {
34
34
  this.setState({ value });
@@ -10,6 +10,7 @@ interface IFuelProps {
10
10
  values: any[];
11
11
  aggregation?: any;
12
12
  t?: any;
13
+ isNotDetailed:boolean;
13
14
  onChange: (fieldName: string, fieldValue: string[]) => void;
14
15
  }
15
16
 
@@ -28,7 +29,7 @@ class Fuel extends React.Component<IFuelProps, {}> {
28
29
  };
29
30
 
30
31
  getOptions = (options: string[]) => options.map((option: string) => {
31
- const { t } = this.props;
32
+ const { t, isNotDetailed } = this.props;
32
33
 
33
34
  const agg = this.getAggregation(option);
34
35
 
@@ -36,6 +37,7 @@ class Fuel extends React.Component<IFuelProps, {}> {
36
37
  value: option,
37
38
  label: (
38
39
  <span className={styles.wrapOptions}>
40
+ {!isNotDetailed?<IconSVG name={option} customDimensions />:null}
39
41
  <FilterLabel text={t(`cbd:${option}`)} agg={agg} />
40
42
  </span>
41
43
  )
@@ -6,13 +6,14 @@ import MakeModel, { IMakeModelProps } from '../../SearchPage/Filters/MakeModel/M
6
6
  interface IBasicDataWidgetState {
7
7
  t: (phrase: string) => string;
8
8
  [key: string]: any;
9
+ isNotDetailed?: boolean;
9
10
  }
10
11
 
11
12
  class BasicDataWidget extends React.Component<IMakeModelProps, IBasicDataWidgetState> {
12
13
  render(): JSX.Element {
13
14
  const {
14
15
  MMS_GROUPS, BODY_TYPE, FIRST_REGISTRATION, MILEAGE, POWER, PRICE, RATE, CONSUMPTION,
15
- SEATS, DOORS, FUEL, onFilterChange, onChangeFilterControls, onAddMmsGroup, onRemoveMmsGroup, t
16
+ SEATS, DOORS, FUEL, onFilterChange, onChangeFilterControls, onAddMmsGroup, onRemoveMmsGroup, t, isNotDetailed
16
17
  } = this.props;
17
18
 
18
19
  const makeModelProps = {
@@ -37,7 +38,9 @@ class BasicDataWidget extends React.Component<IMakeModelProps, IBasicDataWidgetS
37
38
  values: FUEL.values,
38
39
  aggregation: FUEL.aggregation || {},
39
40
  onChange: onFilterChange,
40
- className: styles.fuelOptions
41
+ className: styles.fuelOptions,
42
+ // tslint:disable-next-line:object-literal-shorthand
43
+ isNotDetailed: isNotDetailed
41
44
  };
42
45
 
43
46
  const consumptionProps = {
@@ -93,11 +93,11 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
93
93
  {React.createElement(linkTag, {
94
94
  children: priceTitle,
95
95
  ...routeObj,
96
+ target,
97
+ rel,
96
98
  onClick: this.routeToActiveTab,
97
99
  className: priceItemCategoryClassName,
98
- href: url,
99
- target,
100
- rel
100
+ href: url
101
101
  })}
102
102
  {tooltipDescription && (
103
103
  <Tooltip
@@ -137,7 +137,7 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
137
137
  numbersAfterDot={0}
138
138
  price={perMonthCurrent}
139
139
  postfix={postfix}
140
- className={classnames(styles.priceMtl, { [styles.priceMtlActive]: !!priceSub})}
140
+ className={classnames(styles.priceMtl, { [styles.priceMtlActive]: !!priceSub })}
141
141
  isNew={isStrikeShown}
142
142
  size='semimedium'
143
143
  sub={priceSub}
@@ -173,11 +173,11 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
173
173
  </>
174
174
  ),
175
175
  ...routeObj,
176
+ target,
177
+ rel,
176
178
  onClick: this.routeToActiveTab,
177
179
  className: styles.priceItemPrice,
178
- href: url,
179
- target,
180
- rel
180
+ href: url
181
181
  })}
182
182
  </div>
183
183
  );
@@ -276,11 +276,11 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
276
276
  {createElement(linkTag, {
277
277
  children: <VehicleTitle {...favoriteProps} />,
278
278
  ...routeObj,
279
+ target,
280
+ rel,
279
281
  className: `${styles.redirectClassLink} ${styles.gridAreaTitle}`,
280
282
  onClick: () => localStorage.setItem('activeTabCDP', t('vehicleProps:title.financing')),
281
- href: url,
282
- target,
283
- rel
283
+ href: url
284
284
  })}
285
285
 
286
286
  {createElement(linkTag, {
@@ -329,11 +329,11 @@ const VehicleSmallCard: FunctionComponent<IVehicleSmallCardProps> = (props) => {
329
329
  </>
330
330
  ),
331
331
  ...routeObj,
332
+ target,
333
+ rel,
332
334
  className: `${styles.redirectClassLink} ${styles.gridAreaImage}`,
333
335
  onClick: () => localStorage.setItem('activeTabCDP', t('vehicleProps:title.financing')),
334
- href: url,
335
- target,
336
- rel
336
+ href: url
337
337
  })}
338
338
  <VehicleInfo {...vehicleInfoProps} />
339
339
  <VehiclePrice {...vehiclePriceProps} />
@@ -14,4 +14,4 @@ const SvgInfoIcon = (props: any) => (
14
14
  );
15
15
 
16
16
  export default SvgInfoIcon;
17
- /* tslint:enable */
17
+ /* tslint:enable */
@@ -46,8 +46,8 @@ const TimePicker = ({
46
46
  const nextWeekDays = [...Array(7).keys()].map((days, index) => (
47
47
  {
48
48
  value: index,
49
- label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { day: '2-digit', month: '2-digit', year: 'numeric' }),
50
- day: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { day: '2-digit', month: '2-digit', year: 'numeric' })
49
+ label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' }).replace(',', ''),
50
+ day: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' }).replace(',', '')
51
51
  }
52
52
  ));
53
53
  const nextWeekDaysFull = [...Array(7).keys()].map(days => new Date(Date.now() + setNewDay + 86400000 * days));
@@ -387,8 +387,8 @@ class FiltersContainer extends React.Component<IFiltersContainerProps, {}> {
387
387
  const paramsFromQuery = qs.parse(location.search, { ignoreQueryPrefix: true });
388
388
  const alternativeIDProps = {
389
389
  t,
390
- autoDeId: paramsFromQuery.autoDeId,
391
390
  successTransition,
391
+ autoDeId: paramsFromQuery.autoDeId,
392
392
  error: isErrorAlternativeField,
393
393
  onChange: onAlternativeRedirect
394
394
  };
@@ -307,9 +307,9 @@ const getDecoratedProps = (
307
307
  chargingDurationMaxSpeed: {
308
308
  title: t('vehicleProps:title.chargingDurationMaxSpeed'),
309
309
  get value() {
310
- const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect
311
- const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour
312
- const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours
310
+ const batteryChargingDurationMaxSelect = car.battery && car.battery.batteryChargingDurationMaxSelect;
311
+ const batteryChargingDurationMaxHour = car.battery && car.battery.batteryChargingDurationMaxHour;
312
+ const batteryCharchingDurationMaxSelectMinutesHours = car.battery && car.battery.batteryCharchingDurationMaxSelectMinutesHours;
313
313
 
314
314
  return batteryChargingDurationMaxSelect
315
315
  ? `${batteryChargingDurationMaxHour ? `${batteryChargingDurationMaxHour} ${isCheckedBatteryTime(batteryCharchingDurationMaxSelectMinutesHours, t)}` : ''} ${batteryChargingDurationMaxSelect}`
@@ -319,7 +319,7 @@ const getDecoratedProps = (
319
319
  batteryChargerType: {
320
320
  title: t('vehicleProps:title.batteryChargerType'),
321
321
  get value() {
322
- const batteryChargerType = car.battery && car.battery.batteryChargerType
322
+ const batteryChargerType = car.battery && car.battery.batteryChargerType;
323
323
 
324
324
  return isPropDefined(batteryChargerType)
325
325
  ? batteryChargerType.map((item: any) => t(`cbd:${item}`)).join('\n')
package/utils.ts CHANGED
@@ -30,4 +30,4 @@ export {
30
30
 
31
31
  export {
32
32
  getActualHighlights
33
- } from './source/framework/constants/highlights';
33
+ } from './source/framework/constants/highlights';