@hipay/hipay-material-ui 1.0.0-beta.22 → 1.0.0-beta.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/HI-CHANGELOG.md +26 -43
  2. package/HiChip/HiChip.js +67 -8
  3. package/HiChip/HiChipSwitch.js +6 -0
  4. package/HiDatePicker/HiDatePicker.js +35 -21
  5. package/HiDatePicker/HiDateRangePicker.js +92 -50
  6. package/HiDatePicker/HiDateRangeSelector.js +15 -4
  7. package/HiDatePicker/Overlays/Overlay.js +1 -1
  8. package/HiDatePicker/stylesheet.js +3 -0
  9. package/HiForm/HiInput.js +12 -2
  10. package/HiForm/HiPasswordField.js +8 -3
  11. package/HiLoader/HiLoader.js +7 -4
  12. package/HiPins/HiPins.js +6 -4
  13. package/HiSelect/HiSelect.js +26 -6
  14. package/HiSelect/HiSuggestSelect.js +2 -1
  15. package/HiSelect/SelectInput.js +3 -8
  16. package/HiSelectableList/HiSelectableList.js +51 -49
  17. package/HiSelectableList/HiSelectableListItem.js +18 -2
  18. package/HiTable/BodyCellBuilder.js +22 -12
  19. package/HiTable/BodyCells/CellAccount.js +13 -4
  20. package/HiTable/BodyCells/CellAccountNumber.js +12 -3
  21. package/HiTable/BodyCells/CellAddress.js +12 -3
  22. package/HiTable/BodyCells/CellCountry.js +12 -3
  23. package/HiTable/BodyCells/CellDate.js +43 -42
  24. package/HiTable/BodyCells/CellIcon.js +12 -3
  25. package/HiTable/BodyCells/CellImage.js +12 -3
  26. package/HiTable/BodyCells/CellNumeric.js +12 -3
  27. package/HiTable/BodyCells/CellRate.js +12 -3
  28. package/HiTable/BodyCells/CellSentinel.js +17 -7
  29. package/HiTable/BodyCells/CellStatus.js +13 -4
  30. package/HiTable/BodyCells/CellText.js +17 -7
  31. package/HiTable/BodyCells/CellThirdPartySecurity.js +12 -3
  32. package/HiTable/BodyRow.js +12 -3
  33. package/HiTable/ColumnFilter.js +2 -5
  34. package/HiTable/HeaderCell.js +21 -11
  35. package/HiTable/HiStickyRow.js +24 -13
  36. package/HiTable/HiTable.js +30 -69
  37. package/HiTable/HiTableBody.js +99 -29
  38. package/HiTable/HiTableContextMenu.js +31 -16
  39. package/HiTable/HiTableFooter.js +9 -0
  40. package/HiTable/HiTableHead.js +15 -7
  41. package/HiTopBar/HiTopBar.js +6 -0
  42. package/README.md +71 -6
  43. package/es/HiChip/HiChip.js +79 -8
  44. package/es/HiChip/HiChipSwitch.js +6 -0
  45. package/es/HiDatePicker/HiDatePicker.js +30 -21
  46. package/es/HiDatePicker/HiDateRangePicker.js +86 -52
  47. package/es/HiDatePicker/HiDateRangeSelector.js +14 -4
  48. package/es/HiDatePicker/Overlays/Overlay.js +1 -1
  49. package/es/HiDatePicker/stylesheet.js +3 -0
  50. package/es/HiForm/HiInput.js +12 -2
  51. package/es/HiForm/HiPasswordField.js +8 -3
  52. package/es/HiLoader/HiLoader.js +3 -3
  53. package/es/HiPins/HiPins.js +4 -4
  54. package/es/HiSelect/HiSelect.js +25 -6
  55. package/es/HiSelect/HiSuggestSelect.js +2 -1
  56. package/es/HiSelect/SelectInput.js +3 -8
  57. package/es/HiSelectableList/HiSelectableList.js +51 -49
  58. package/es/HiSelectableList/HiSelectableListItem.js +15 -2
  59. package/es/HiTable/BodyCellBuilder.js +8 -2
  60. package/es/HiTable/BodyCells/CellAccount.js +7 -2
  61. package/es/HiTable/BodyCells/CellAccountNumber.js +6 -1
  62. package/es/HiTable/BodyCells/CellAddress.js +6 -1
  63. package/es/HiTable/BodyCells/CellCountry.js +6 -1
  64. package/es/HiTable/BodyCells/CellDate.js +28 -37
  65. package/es/HiTable/BodyCells/CellIcon.js +6 -1
  66. package/es/HiTable/BodyCells/CellImage.js +6 -1
  67. package/es/HiTable/BodyCells/CellNumeric.js +6 -1
  68. package/es/HiTable/BodyCells/CellRate.js +6 -1
  69. package/es/HiTable/BodyCells/CellSentinel.js +6 -1
  70. package/es/HiTable/BodyCells/CellStatus.js +7 -2
  71. package/es/HiTable/BodyCells/CellText.js +6 -1
  72. package/es/HiTable/BodyCells/CellThirdPartySecurity.js +6 -1
  73. package/es/HiTable/BodyRow.js +7 -2
  74. package/es/HiTable/ColumnFilter.js +2 -5
  75. package/es/HiTable/HeaderCell.js +16 -9
  76. package/es/HiTable/HiStickyRow.js +20 -13
  77. package/es/HiTable/HiTable.js +4 -40
  78. package/es/HiTable/HiTableBody.js +78 -26
  79. package/es/HiTable/HiTableContextMenu.js +28 -16
  80. package/es/HiTable/HiTableFooter.js +5 -0
  81. package/es/HiTable/HiTableHead.js +11 -6
  82. package/es/HiTopBar/HiTopBar.js +5 -0
  83. package/es/utils/HiIconBuilder.js +6 -2
  84. package/index.es.js +1 -1
  85. package/index.js +1 -1
  86. package/package.json +6 -1
  87. package/umd/hipay-material-ui.development.js +99120 -65306
  88. package/umd/hipay-material-ui.production.min.js +5 -5
  89. package/utils/HiIconBuilder.js +6 -2
@@ -51,59 +51,61 @@ class HiSelectableList extends React.PureComponent {
51
51
  List,
52
52
  { className: classes.root, onKeyDown: this.props.onKeyDown },
53
53
  itemList.map(item => {
54
- /**
55
- * Calcul du level de l'item
56
- */
57
- if (hierarchic) {
58
- // On stocke l'id des parents dans un tableau
59
- if (item.parentId && !parents.includes(item.parentId)) {
60
- parents.push(item.parentId);
61
- } else if (item.parentId && parents.includes(item.parentId)) {
62
- // Si l'item n'a pas de parentId ou qu'on l'a déjà stocké :
63
- // Et si le parentId n'est pas le dernier inseré
64
- if (item.parentId !== parents[parents.length - 1]) {
65
- // On est donc redescendu d'un niveau
66
- // donc on supprime le dernier parent
67
- parents.pop();
54
+ if (item.displayed !== false) {
55
+ /**
56
+ * Calcul du level de l'item
57
+ */
58
+ if (hierarchic) {
59
+ // On stocke l'id des parents dans un tableau
60
+ if (item.parentId && !parents.includes(item.parentId)) {
61
+ parents.push(item.parentId);
62
+ } else if (item.parentId && parents.includes(item.parentId)) {
63
+ // Si l'item n'a pas de parentId ou qu'on l'a déjà stocké :
64
+ // Et si le parentId n'est pas le dernier inseré
65
+ if (item.parentId !== parents[parents.length - 1]) {
66
+ // On est donc redescendu d'un niveau
67
+ // donc on supprime le dernier parent
68
+ parents.pop();
69
+ }
70
+ } else if (!item.parentId && parents.length > 0) {
71
+ // Si l'item n'a pas de parent et que le tableau des parent
72
+ // n'est pas vide => on le réinitialise
73
+ parents = [];
68
74
  }
69
- } else if (!item.parentId && parents.length > 0) {
70
- // Si l'item n'a pas de parent et que le tableau des parent
71
- // n'est pas vide => on le réinitialise
72
- parents = [];
73
75
  }
74
- }
75
76
 
76
- /**
77
- * L'élément est-il selectionné ?
78
- */
79
- let selected = false;
80
- if (item.id === '_all') {
81
- selected = allSelected;
82
- } else if (!item.hasChildren) {
83
- selected = selectedIdList.includes(item.id);
84
- } else if (hierarchic && parentItemSelectable) {
85
- selected = hierarchySelected[item.id].length === hierarchy[item.id].length;
86
- }
77
+ /**
78
+ * L'élément est-il selectionné ?
79
+ */
80
+ let selected = false;
81
+ if (item.id === '_all') {
82
+ selected = allSelected;
83
+ } else if (!item.hasChildren) {
84
+ selected = selectedIdList.includes(item.id);
85
+ } else if (hierarchic && parentItemSelectable) {
86
+ selected = hierarchySelected[item.id].length === hierarchy[item.id].length;
87
+ }
87
88
 
88
- return React.createElement(HiSelectableListItem, _extends({
89
- key: item.id,
90
- item: item,
91
- selected: selected,
92
- indeterminate: item.hasChildren && parentItemSelectable ? hierarchySelected[item.id].length > 0 && hierarchySelected[item.id].length !== hierarchy[item.id].length : false,
93
- onSelect: onSelect,
94
- hierarchySelected: hierarchySelected,
95
- parentItemSelectable: parentItemSelectable,
96
- nbChildren: typeof hierarchy !== 'undefined' && typeof hierarchy[item.id] !== 'undefined' ? hierarchy[item.id].length : 0,
97
- hierarchic: hierarchic,
98
- translations: translations,
99
- icon: icon,
100
- parentIcon: parentIcon,
101
- hoverIcon: hoverIcon,
102
- checkedIcon: checkedIcon,
103
- checkbox: checkbox,
104
- level: parents.length,
105
- disabled: disabledIds ? disabledIds.includes(item.id) : false
106
- }, others));
89
+ return React.createElement(HiSelectableListItem, _extends({
90
+ key: item.id,
91
+ item: item,
92
+ selected: selected,
93
+ indeterminate: item.hasChildren && parentItemSelectable ? hierarchySelected[item.id].length > 0 && hierarchySelected[item.id].length !== hierarchy[item.id].length : false,
94
+ onSelect: onSelect,
95
+ hierarchySelected: hierarchySelected,
96
+ parentItemSelectable: parentItemSelectable,
97
+ nbChildren: typeof hierarchy !== 'undefined' && typeof hierarchy[item.id] !== 'undefined' ? hierarchy[item.id].length : 0,
98
+ hierarchic: hierarchic,
99
+ translations: translations,
100
+ icon: icon,
101
+ parentIcon: parentIcon,
102
+ hoverIcon: hoverIcon,
103
+ checkedIcon: checkedIcon,
104
+ checkbox: checkbox,
105
+ level: parents.length,
106
+ disabled: disabledIds ? disabledIds.includes(item.id) : false
107
+ }, others));
108
+ }
107
109
  })
108
110
  )
109
111
  );
@@ -10,12 +10,15 @@ import withStyles from '../styles/withStyles';
10
10
  import { escapeHTML } from '../utils/hiHelpers';
11
11
  import HiIconBuilder from '../utils/HiIconBuilder';
12
12
  import HiColoredLabel from '../HiColoredLabel';
13
+ import HiLoader from '../HiLoader';
13
14
 
14
15
  export const styles = theme => ({
15
16
  listItem: {
16
- padding: `${9}px 0px`,
17
+ padding: '9px 0px',
17
18
  fontWeight: theme.typography.fontWeightRegular,
18
- maxHeight: 40
19
+ maxHeight: 40,
20
+ display: 'flex',
21
+ alignItems: 'flex-start'
19
22
  },
20
23
  listItemTitle: {
21
24
  padding: `${9}px 0px`,
@@ -35,6 +38,13 @@ export const styles = theme => ({
35
38
  textAlign: 'center',
36
39
  width: '100%'
37
40
  },
41
+ loader: {
42
+ textAlign: 'center',
43
+ width: 1,
44
+ height: 22,
45
+ padding: '8px 0',
46
+ margin: 'auto'
47
+ },
38
48
  selected: {
39
49
  backgroundColor: theme.palette.selected
40
50
  },
@@ -182,6 +192,9 @@ class HiSelectableListItem extends React.Component {
182
192
  { className: itemPrimaryHighlightClass, 'data-id': item.id },
183
193
  this.getItemLabel(item)
184
194
  );
195
+ case 'loader':
196
+ return React.createElement(HiLoader, { loading: true, className: classes.loader, size: 8 });
197
+ break;
185
198
  case 'text':
186
199
  default:
187
200
  const itemTextClass = classNames(classes.listItemContent, {
@@ -1,5 +1,6 @@
1
1
  import _extends from 'babel-runtime/helpers/extends';
2
2
  import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
3
4
  import React from 'react';
4
5
  import PropTypes from 'prop-types';
5
6
  import { ContextMenuTrigger } from 'react-contextmenu';
@@ -11,7 +12,7 @@ import { formatRate } from '../utils/hiHelpers';
11
12
  /**
12
13
  * Construit la cellule correspondante au type demandé
13
14
  */
14
- export default class BodyCellBuilder extends React.PureComponent {
15
+ export default class BodyCellBuilder extends React.Component {
15
16
 
16
17
  constructor(props) {
17
18
  super(props);
@@ -19,6 +20,10 @@ export default class BodyCellBuilder extends React.PureComponent {
19
20
  this.collectContextMenuDatas = this.collectContextMenuDatas.bind(this);
20
21
  }
21
22
 
23
+ shouldComponentUpdate(nextProps, nextState) {
24
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
25
+ }
26
+
22
27
  /**
23
28
  * CollecContextMenuDatas
24
29
  *
@@ -151,7 +156,8 @@ export default class BodyCellBuilder extends React.PureComponent {
151
156
  locale: dateLocale,
152
157
  view: view,
153
158
  displayTime: props.displayTime,
154
- sticky: sticky
159
+ sticky: sticky,
160
+ formatShort: this.props.formatShort
155
161
  });
156
162
  break;
157
163
 
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tooltip from '../../Tooltip';
@@ -9,7 +10,11 @@ export const styles = theme => ({});
9
10
  /**
10
11
  * Cette cellule permet d'afficher le nom d'un compte sous la forme d'un label coloré.
11
12
  */
12
- class CellAccount extends React.PureComponent {
13
+ class CellAccount extends React.Component {
14
+
15
+ shouldComponentUpdate(nextProps, nextState) {
16
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
17
+ }
13
18
 
14
19
  render() {
15
20
  const { value, color } = this.props;
@@ -31,7 +36,7 @@ CellAccount.propTypes = process.env.NODE_ENV !== "production" ? {
31
36
  /**
32
37
  * Couleur du compte
33
38
  */
34
- color: PropTypes.string.isRequired,
39
+ color: PropTypes.string,
35
40
  /**
36
41
  * Nom du compte
37
42
  */
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import { Circle } from 'mdi-material-ui';
@@ -44,7 +45,11 @@ export const styles = theme => ({
44
45
  * Cette cellule permet d'afficher un numéro de compte
45
46
  * Le tooltip affiche les informations complémentaires (country, expiration date..)
46
47
  */
47
- class CellAccountNumber extends React.PureComponent {
48
+ class CellAccountNumber extends React.Component {
49
+
50
+ shouldComponentUpdate(nextProps, nextState) {
51
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
52
+ }
48
53
 
49
54
  render() {
50
55
  const {
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  // @inheritedComponent CellLayout
2
3
 
3
4
  import React from 'react';
@@ -23,7 +24,11 @@ export const styles = theme => ({
23
24
  * - sinon on affiche la ville et le pays
24
25
  * - tous les champs définis sont affichés dans le tooltip
25
26
  */
26
- class CellAddress extends React.PureComponent {
27
+ class CellAddress extends React.Component {
28
+
29
+ shouldComponentUpdate(nextProps, nextState) {
30
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
31
+ }
27
32
 
28
33
  render() {
29
34
  const { classes, streetAddress, name, city, postalCode, view, country, isoCountry } = this.props;
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
 
@@ -44,7 +45,11 @@ export const styles = theme => ({
44
45
  * en vue small : Affiche la valeur courte (id), tooltip = Image + Value
45
46
  *
46
47
  */
47
- class CellCountry extends React.PureComponent {
48
+ class CellCountry extends React.Component {
49
+
50
+ shouldComponentUpdate(nextProps, nextState) {
51
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
52
+ }
48
53
 
49
54
  render() {
50
55
  const { label, path, value, view } = this.props;
@@ -1,6 +1,8 @@
1
- import _extends from 'babel-runtime/helpers/extends';
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import moment from 'moment';
5
+ import 'moment/locale/fr';
4
6
 
5
7
  import withStyles from '../../styles/withStyles';
6
8
  import Tooltip from '../../Tooltip';
@@ -20,45 +22,28 @@ export const styles = theme => ({
20
22
  * Cette cellule permet d'afficher une date en fonction de la locale de l'utilisateur
21
23
  */
22
24
  class CellDate extends React.Component {
25
+ constructor(...args) {
26
+ var _temp;
27
+
28
+ return _temp = super(...args), this.formatLong = 'dddd DD MMMM YYYY HH:mm:ss', _temp;
29
+ }
30
+
31
+ shouldComponentUpdate(nextProps, nextState) {
32
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
33
+ }
23
34
 
24
35
  render() {
25
- const { classes, displayTime, value, locale, view } = this.props;
36
+ const { classes, displayTime, value, locale, view, formatShort } = this.props;
26
37
 
27
- const date = new Date(value);
38
+ const date = moment(value);
39
+ moment.locale(locale);
28
40
 
29
- let options = _extends({
30
- weekday: 'long',
31
- year: 'numeric',
32
- month: 'long',
33
- day: '2-digit'
34
- }, displayTime && {
35
- hour: '2-digit',
36
- minute: '2-digit',
37
- second: '2-digit'
38
- });
39
- const titleValue = date.toLocaleString(locale, options);
41
+ const titleValue = displayTime ? date.format(this.formatLong) : date.format(this.formatLong.replace('HH:mm:ss', ''));
40
42
  let displayedValue = titleValue;
41
43
  if (view === cst.VIEWS.SMALL) {
42
- options = _extends({
43
- year: '2-digit',
44
- month: '2-digit',
45
- day: '2-digit'
46
- }, displayTime && {
47
- hour: '2-digit',
48
- minute: '2-digit'
49
- });
50
- displayedValue = date.toLocaleString(locale, options);
44
+ displayedValue = displayTime ? date.format(formatShort.replace('YYYY', 'YY') + ' HH:mm:ss') : date.format(formatShort.replace('YYYY', 'YY'));
51
45
  } else if (view === cst.VIEWS.MEDIUM) {
52
- options = _extends({
53
- year: 'numeric',
54
- month: '2-digit',
55
- day: '2-digit'
56
- }, displayTime && {
57
- hour: '2-digit',
58
- minute: '2-digit',
59
- second: '2-digit'
60
- });
61
- displayedValue = date.toLocaleString(locale, options);
46
+ displayedValue = displayTime ? date.format(formatShort + ' HH:mm:ss') : date.format(formatShort);
62
47
  }
63
48
 
64
49
  if (view === cst.VIEWS.LARGE) {
@@ -83,8 +68,9 @@ class CellDate extends React.Component {
83
68
 
84
69
  CellDate.defaultProps = {
85
70
  displayTime: false,
86
- locale: 'en-EN',
87
- view: 'l'
71
+ locale: 'en',
72
+ view: 'l',
73
+ formatShort: 'DD/MM/YYYY'
88
74
  };
89
75
  CellDate.propTypes = process.env.NODE_ENV !== "production" ? {
90
76
  /**
@@ -96,11 +82,16 @@ CellDate.propTypes = process.env.NODE_ENV !== "production" ? {
96
82
  */
97
83
  displayTime: PropTypes.bool,
98
84
  /**
99
- * Locale BCP 47
85
+ * Format de la date en vue small (ex: DD/MM/YYYY)
86
+ * @see https://momentjs.com/docs/#/parsing/string-format/
87
+ */
88
+ formatShort: PropTypes.string.isRequired,
89
+ /**
90
+ * Locale moment
100
91
  */
101
92
  locale: PropTypes.string,
102
93
  /**
103
- * Volume/Amount
94
+ * Date as string
104
95
  */
105
96
  value: PropTypes.string.isRequired,
106
97
  /**
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tooltip from '../../Tooltip';
@@ -26,7 +27,11 @@ export const styles = {
26
27
  * Cette cellule permet d'afficher une icône et un label (optionnel).
27
28
  * En vue small (s) elle affiche uniquement l'icône avec une largeur fixe.
28
29
  */
29
- class CellIcon extends React.PureComponent {
30
+ class CellIcon extends React.Component {
31
+
32
+ shouldComponentUpdate(nextProps, nextState) {
33
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
34
+ }
30
35
 
31
36
  render() {
32
37
  const { classes, icon, value, view, color } = this.props;
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tooltip from '../../Tooltip';
@@ -45,7 +46,11 @@ export const styles = theme => ({
45
46
  * En vue large, aucun tooltip n'est affiché
46
47
  * En vue small (s) elle affiche uniquement l'image avec une largeur fixe.
47
48
  */
48
- class CellImage extends React.PureComponent {
49
+ class CellImage extends React.Component {
50
+
51
+ shouldComponentUpdate(nextProps, nextState) {
52
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
53
+ }
49
54
 
50
55
  render() {
51
56
  const { classes, path, value, view, size } = this.props;
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
 
@@ -15,7 +16,11 @@ export const styles = theme => ({
15
16
  /**
16
17
  * Cette cellule permet d'afficher un volume ou un montant avec devise
17
18
  */
18
- class CellNumeric extends React.PureComponent {
19
+ class CellNumeric extends React.Component {
20
+
21
+ shouldComponentUpdate(nextProps, nextState) {
22
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
23
+ }
19
24
 
20
25
  render() {
21
26
  const { classes, value, locale, currency, view, precision } = this.props;
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classNames from 'classnames';
@@ -45,7 +46,11 @@ export const styles = theme => ({
45
46
  * Cette cellule permet d'afficher un pourcentage
46
47
  * avec une icône d'évolution (optionnelle) et un indicateur du type de données représentées (optionnel)
47
48
  */
48
- class CellRate extends React.PureComponent {
49
+ class CellRate extends React.Component {
50
+
51
+ shouldComponentUpdate(nextProps, nextState) {
52
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
53
+ }
49
54
 
50
55
  render() {
51
56
 
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import Tooltip from '../../Tooltip';
@@ -21,7 +22,11 @@ export const styles = {
21
22
  /**
22
23
  * Cette cellule permet d'afficher le résultat de Sentinel (score & fraudResult & smartDecision)
23
24
  */
24
- class CellSentinel extends React.PureComponent {
25
+ class CellSentinel extends React.Component {
26
+
27
+ shouldComponentUpdate(nextProps, nextState) {
28
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
29
+ }
25
30
 
26
31
  constructor(props) {
27
32
  super(props);
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
 
@@ -18,7 +19,11 @@ export const styles = theme => ({
18
19
  }
19
20
  });
20
21
 
21
- class CellStatus extends React.PureComponent {
22
+ class CellStatus extends React.Component {
23
+
24
+ shouldComponentUpdate(nextProps, nextState) {
25
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
26
+ }
22
27
 
23
28
  render() {
24
29
  const { classes, theme, nbOperations, value, code, onOpenDetails } = this.props;
@@ -68,7 +73,7 @@ CellStatus.propTypes = process.env.NODE_ENV !== "production" ? {
68
73
  /**
69
74
  * Code du statut courant de la transaction (détermine la couleur du label)
70
75
  */
71
- code: PropTypes.number.isRequired,
76
+ code: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
72
77
  /**
73
78
  * Fonction de callback appelée pour ouvrir les lignes de détails
74
79
  */
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
 
@@ -27,7 +28,11 @@ export const styles = theme => ({
27
28
  }
28
29
  });
29
30
 
30
- class CellText extends React.PureComponent {
31
+ class CellText extends React.Component {
32
+
33
+ shouldComponentUpdate(nextProps, nextState) {
34
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
35
+ }
31
36
 
32
37
  constructor(props) {
33
38
  super(props);
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  // @inheritedComponent CellLayout
2
3
 
3
4
  import React from 'react';
@@ -19,7 +20,11 @@ export const styles = {
19
20
  /**
20
21
  * Cette cellule permet d'afficher une icône représentant le statut du 3DS.
21
22
  */
22
- class CellThirdPartySecurity extends React.PureComponent {
23
+ class CellThirdPartySecurity extends React.Component {
24
+
25
+ shouldComponentUpdate(nextProps, nextState) {
26
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
27
+ }
23
28
 
24
29
  render() {
25
30
  const { classes, theme, label, value } = this.props;
@@ -1,5 +1,6 @@
1
1
  import _extends from 'babel-runtime/helpers/extends';
2
2
  import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
3
4
 
4
5
  // @inheritedComponent BodyCellBuilder
5
6
  import React from 'react';
@@ -8,7 +9,7 @@ import classNames from 'classnames';
8
9
  import { TableRow, TableCell } from 'material-ui/Table';
9
10
  import { fade } from 'material-ui/styles/colorManipulator';
10
11
  import BodyCellBuilder from './BodyCellBuilder';
11
- import { withStyles, withTheme } from '../styles';
12
+ import { withStyles } from '../styles';
12
13
  import * as cst from './constants';
13
14
 
14
15
  export const styles = theme => ({
@@ -45,7 +46,7 @@ export const styles = theme => ({
45
46
  }
46
47
  });
47
48
 
48
- class BodyRow extends React.PureComponent {
49
+ class BodyRow extends React.Component {
49
50
 
50
51
  constructor(props) {
51
52
  super();
@@ -67,6 +68,10 @@ class BodyRow extends React.PureComponent {
67
68
  this.handleSelect = this.handleSelect.bind(this);
68
69
  }
69
70
 
71
+ shouldComponentUpdate(nextProps, nextState) {
72
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
73
+ }
74
+
70
75
  componentDidMount() {
71
76
  // Live data animation
72
77
  if (this.state.live) {
@@ -30,9 +30,6 @@ export const styles = theme => ({
30
30
  padding: 10,
31
31
  color: theme.palette.neutral.normal
32
32
  },
33
- menuItemSortable: {
34
- paddingLeft: 8
35
- },
36
33
  menuItemFilter: _extends({}, theme.typography.body1, {
37
34
  color: theme.palette.neutral.dark,
38
35
  fontWeight: theme.typography.fontWeightMedium,
@@ -73,7 +70,7 @@ export const styles = theme => ({
73
70
  fontSize: 14
74
71
  },
75
72
  button: {
76
- height: 40,
73
+ minHeight: 40,
77
74
  fontSize: 14,
78
75
  width: '50%'
79
76
  },
@@ -200,7 +197,7 @@ class ColumnFilter extends React.Component {
200
197
  ),
201
198
  !!sortable && React.createElement(
202
199
  'div',
203
- { className: classes.menuItemSortable },
200
+ null,
204
201
  React.createElement(
205
202
  MenuItem,
206
203
  {