@bytebrand/fe-ui-core 4.1.190 → 4.1.192

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.190",
3
+ "version": "4.1.192",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -2,6 +2,7 @@ import React, { memo } from 'react';
2
2
 
3
3
  import Slider from '../../../_common/Slider/Slider';
4
4
  import _get from 'lodash/get';
5
+ import { isEqual } from 'lodash';
5
6
  import { sliceLessThan, sliceMoreThan, numberWithDot } from '../../../../framework/utils/CommonUtils';
6
7
  import { getSearchYears } from '../../../../framework/utils/DateUtils';
7
8
  import MaterialAutocomplete from '../../../_common/MaterialAutocomplete/MaterialAutocomplete';
@@ -145,5 +146,8 @@ const RangeControlled = ({
145
146
  export default memo(RangeControlled, (prevProps: any, nextProps: any) => {
146
147
  return prevProps.controls.from === nextProps.controls.from &&
147
148
  prevProps.controls.to === nextProps.controls.to &&
148
- prevProps.t === nextProps.t;
149
+ prevProps.t === nextProps.t &&
150
+ prevProps.values.from === nextProps.values.from &&
151
+ prevProps.values.to === nextProps.values.to &&
152
+ isEqual(prevProps.options, nextProps.options);
149
153
  });
@@ -10,6 +10,7 @@ interface IAlternativeIDProps {
10
10
  value?: string;
11
11
  error: boolean;
12
12
  successTransition: boolean;
13
+ autoDeId?: string;
13
14
  onChange: (value: any) => void;
14
15
  onKeyPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
15
16
  }
@@ -27,6 +28,8 @@ class AlternativeID extends React.Component<IAlternativeIDProps, IAlternativeIDS
27
28
  value: ''
28
29
  };
29
30
 
31
+ componentDidMount() { this.setState({ value: this.props.autoDeId }); };
32
+
30
33
  onFilterChange = (value: string) => {
31
34
  this.setState({ value });
32
35
  };
@@ -46,7 +49,6 @@ class AlternativeID extends React.Component<IAlternativeIDProps, IAlternativeIDS
46
49
 
47
50
  render(): JSX.Element {
48
51
  const { t, name, error, successTransition } = this.props;
49
-
50
52
  const inputProps = {
51
53
  name,
52
54
  placeholder: 'z.B: FCEE67',
@@ -1,5 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import _get from 'lodash/get';
3
+ import { isEqual } from 'lodash';
3
4
  import Slider from '../../_common/Slider/Slider';
4
5
  import { MILLAGE_FIX, RANGE_FILTERS_DEFAULT_CONTROLS } from '../../../framework/constants/Search';
5
6
  import { sliceLessThan, sliceMoreThan, numberWithDot } from '../../../framework/utils/CommonUtils';
@@ -100,6 +101,8 @@ export default memo(Mileage, (prevProps: any, nextProps: any) => {
100
101
  return prevProps.controls.from === nextProps.controls.from &&
101
102
  prevProps.controls.to === nextProps.controls.to &&
102
103
  prevProps.t === nextProps.t &&
103
- prevProps.values === nextProps.values;
104
+ prevProps.values.from === nextProps.values.from &&
105
+ prevProps.values.to === nextProps.values.to &&
106
+ isEqual(prevProps.options, nextProps.options);
104
107
 
105
108
  });
@@ -2,6 +2,7 @@ import React, { memo } from 'react';
2
2
  import Slider from '../../_common/Slider/Slider';
3
3
  import MaterialAutocomplete from '../../_common/MaterialAutocomplete/MaterialAutocomplete';
4
4
  import styles from './commonFilters.styl';
5
+ import { isEqual } from 'lodash';
5
6
  import { RadioGroup } from '@mui/material';
6
7
  import CheckboxMaterial from '../../_common/CheckboxMaterial/CheckboxMaterial';
7
8
  import { POWER_FIX, RANGE_FILTERS_DEFAULT_CONTROLS } from '../../../framework/constants/Search';
@@ -150,5 +151,7 @@ export default memo(Power, (prevProps: any, nextProps: any) => {
150
151
  return prevProps.controls.from === nextProps.controls.from &&
151
152
  prevProps.controls.to === nextProps.controls.to &&
152
153
  prevProps.controls.type === nextProps.controls.type &&
153
- prevProps.values === nextProps.values;
154
+ prevProps.values.from === nextProps.values.from &&
155
+ prevProps.values.to === nextProps.values.to &&
156
+ isEqual(prevProps.options, nextProps.options);
154
157
  });
@@ -8,7 +8,7 @@ const AT = (props: any) => (
8
8
  viewBox="0 0 640 480"
9
9
  {...props}
10
10
  >
11
- <g fillRule="evenodd">
11
+ <g fill-rule="evenodd">
12
12
  <path fill="#fff" d="M640 480H0V0h640z" />
13
13
  <path fill="#c8102e" d="M640 480H0V320h640zm0-319.9H0V.1h640z" />
14
14
  </g>
@@ -8,7 +8,7 @@ const BE = (props: any) => (
8
8
  viewBox="0 0 640 480"
9
9
  {...props}
10
10
  >
11
- <g fillRule="evenodd" strokeWidth="1pt">
11
+ <g fill-rule="evenodd" stroke-width="1pt">
12
12
  <path d="M0 0h213.3v480H0z" />
13
13
  <path fill="#ffd90c" d="M213.3 0h213.4v480H213.3z" />
14
14
  <path fill="#f31830" d="M426.7 0H640v480H426.7z" />
@@ -8,7 +8,7 @@ const BG = (props: any) => (
8
8
  viewBox="0 0 640 480"
9
9
  {...props}
10
10
  >
11
- <g fillRule="evenodd" strokeWidth="1pt">
11
+ <g fill-rule="evenodd" stroke-width="1pt">
12
12
  <path fill="#d62612" d="M0 320h640v160H0z" />
13
13
  <path fill="#fff" d="M0 0h640v160H0z" />
14
14
  <path fill="#00966e" d="M0 160h640v160H0z" />
@@ -8,7 +8,7 @@ const CH = (props: any) => (
8
8
  viewBox="0 0 640 480"
9
9
  {...props}
10
10
  >
11
- <g fillRule="evenodd" strokeWidth="1pt">
11
+ <g fill-rule="evenodd" stroke-width="1pt">
12
12
  <path fill="red" d="M0 0h640v480H0z" />
13
13
  <g fill="#fff">
14
14
  <path d="M170 195h300v90H170z" />