@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
@@ -100,13 +100,13 @@ function buildDateRangeOptionByKey(key, t, format) {
100
100
  label = t.current_week;
101
101
  from = (0, _moment2.default)().startOf('week');
102
102
  to = (0, _moment2.default)();
103
- info = t.week + ' ' + from.format('w') + ', \n ' + from.format(format) + ' ' + t.to_now;
103
+ info = '' + t.short_week + from.format('w') + ', \n ' + from.format(format) + ' ' + t.to_now;
104
104
  break;
105
105
  case 'pw':
106
106
  label = t.previous_week;
107
107
  from = (0, _moment2.default)().subtract(1, 'week').startOf('week');
108
108
  to = (0, _moment2.default)().subtract(1, 'week').endOf('week');
109
- info = t.week + ' ' + from.format('w') + ', ' + from.format(format) + ' ' + t.to + ' ' + to.format(format);
109
+ info = '' + t.short_week + from.format('w') + ', ' + from.format(format) + ' ' + t.to + ' ' + to.format(format);
110
110
  break;
111
111
  case 'cm':
112
112
  label = t.current_month;
@@ -308,6 +308,16 @@ var HiDateRangeSelector = function (_React$Component) {
308
308
  )
309
309
  );
310
310
  }
311
+ }], [{
312
+ key: 'getDerivedStateFromProps',
313
+ value: function getDerivedStateFromProps(props, state) {
314
+ if (props.defaultPreset && props.returnSelectValue) {
315
+ return {
316
+ selectedPreset: props.defaultPreset
317
+ };
318
+ }
319
+ return null;
320
+ }
311
321
  }]);
312
322
  return HiDateRangeSelector;
313
323
  }(_react2.default.Component);
@@ -327,6 +337,7 @@ HiDateRangeSelector.defaultProps = {
327
337
  month: 'Month',
328
338
  quarter: 'Quarter',
329
339
  week: 'Week',
340
+ short_week: 'W',
330
341
  year: 'Year',
331
342
  days: 'days',
332
343
  custom_period: 'Custom Period',
@@ -378,7 +389,7 @@ HiDateRangeSelector.propTypes = process.env.NODE_ENV !== "production" ? {
378
389
  /**
379
390
  * Date de début sélectionnée
380
391
  */
381
- from: _propTypes2.default.instanceOf(Date),
392
+ from: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(Date), _propTypes2.default.string]),
382
393
  /**
383
394
  * Si "true", le texte d'aide s'affichera seulement au clic sur l'icône "Information"
384
395
  */
@@ -426,7 +437,7 @@ HiDateRangeSelector.propTypes = process.env.NODE_ENV !== "production" ? {
426
437
  /**
427
438
  * Date de fin sélectionnée
428
439
  */
429
- to: _propTypes2.default.instanceOf(Date),
440
+ to: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(Date), _propTypes2.default.string]),
430
441
  /**
431
442
  * Traductions
432
443
  */
@@ -113,7 +113,7 @@ Overlay.propTypes = process.env.NODE_ENV !== "production" ? {
113
113
  * ReactDayPicker prop
114
114
  * The currently selected day or selected days
115
115
  */
116
- selectedDay: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.array]),
116
+ selectedDay: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.array, _propTypes2.default.string]),
117
117
  /**
118
118
  * Définit comment construire le Paper dans le cas d'un double input
119
119
  */
@@ -34,6 +34,9 @@ exports.default = function (theme) {
34
34
  absolute: {
35
35
  position: 'absolute'
36
36
  },
37
+ right4: {
38
+ right: 4
39
+ },
37
40
  dayPickerMargin: {
38
41
  top: -337,
39
42
  width: 'calc(100% - 4px)'
package/HiForm/HiInput.js CHANGED
@@ -219,6 +219,7 @@ var HiInput = function (_React$PureComponent) {
219
219
  if (this.props.onReset) {
220
220
  this.props.onReset();
221
221
  }
222
+ this.inputElement.focus();
222
223
  }
223
224
  }, {
224
225
  key: 'handleBlur',
@@ -307,7 +308,8 @@ var HiInput = function (_React$PureComponent) {
307
308
  rows = _props.rows,
308
309
  inputClassName = _props.inputClassName,
309
310
  onReset = _props.onReset,
310
- theme = _props.theme;
311
+ theme = _props.theme,
312
+ startAdornmentColor = _props.startAdornmentColor;
311
313
  var focused = this.state.focused;
312
314
 
313
315
 
@@ -322,13 +324,17 @@ var HiInput = function (_React$PureComponent) {
322
324
  });
323
325
 
324
326
  var leftIcon = void 0;
327
+ var startAdornmentStyle = { padding: 8 };
328
+ if (startAdornmentColor) {
329
+ startAdornmentStyle.color = startAdornmentColor;
330
+ }
325
331
  if (startAdornment) {
326
332
  var _classNames2;
327
333
 
328
334
  leftIcon = _react2.default.createElement(_HiIconBuilder2.default, {
329
335
  icon: startAdornment,
330
336
  size: 36,
331
- style: { padding: '8px' },
337
+ style: startAdornmentStyle,
332
338
  onClick: this.props.onLeftIconClick,
333
339
  className: (0, _classnames2.default)(classes.startAdornment, (_classNames2 = {}, (0, _defineProperty3.default)(_classNames2, classes.startAdornmentFocus, focused), (0, _defineProperty3.default)(_classNames2, classes.startAdornmentDisabled, disabled), (0, _defineProperty3.default)(_classNames2, classes.iconPointer, this.props.onLeftIconClick), _classNames2))
334
340
  });
@@ -521,6 +527,10 @@ HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
521
527
  * Icône à afficher à gauche de l'input
522
528
  */
523
529
  startAdornment: _propTypes2.default.string,
530
+ /**
531
+ * Couleur de l'icône à afficher à gauche de l'input
532
+ */
533
+ startAdornmentColor: _propTypes2.default.string,
524
534
  /**
525
535
  * @ignore
526
536
  */
@@ -63,9 +63,9 @@ var styles = exports.styles = function styles(theme) {
63
63
  return {
64
64
  inputPassword: {
65
65
  fontWeight: 'bolder',
66
- fontFamily: 'Verdana, sans-serif',
66
+ fontFamily: 'inherit',
67
67
  letterSpacing: '4px',
68
- fontSize: 25
68
+ fontSize: '1.6rem'
69
69
  }
70
70
  };
71
71
  };
@@ -114,7 +114,12 @@ var HiPasswordField = function (_React$Component) {
114
114
  return _react2.default.createElement(_HiTextField2.default, (0, _extends3.default)({}, otherProps, {
115
115
  type: type,
116
116
  onRightIconClick: this.handlePasswordToggle,
117
- HiInputProps: (0, _extends3.default)({}, HiInputProps, { endAdornment: endAdornment, placeholder: '', inputClassName: inputClassName })
117
+ HiInputProps: (0, _extends3.default)({}, HiInputProps, {
118
+ endAdornment: endAdornment,
119
+ placeholder: '',
120
+ inputClassName: inputClassName,
121
+ autocomplete: 'on'
122
+ })
118
123
  }));
119
124
  }
120
125
  }]);
@@ -26,16 +26,19 @@ var styles = exports.styles = function styles() {
26
26
  };
27
27
 
28
28
  function HiLoader(props) {
29
- var theme = props.theme,
30
- loading = props.loading;
29
+ var className = props.className,
30
+ theme = props.theme,
31
+ loading = props.loading,
32
+ _props$size = props.size,
33
+ size = _props$size === undefined ? 12 : _props$size;
31
34
 
32
35
 
33
36
  return _react2.default.createElement(
34
37
  'div',
35
- { id: 'hi-loader' },
38
+ { id: 'hi-loader', className: className },
36
39
  _react2.default.createElement(_reactSpinners.PropagateLoader, {
37
40
  loading: loading,
38
- size: 12,
41
+ size: size,
39
42
  color: theme.palette.business.primary.normal
40
43
  })
41
44
  );
package/HiPins/HiPins.js CHANGED
@@ -37,7 +37,7 @@ var styles = exports.styles = function styles(theme) {
37
37
  display: 'inline-block',
38
38
  padding: '0 9px',
39
39
  height: 16,
40
- lineHeight: '16px',
40
+ lineHeight: '18px',
41
41
  minWidth: 25,
42
42
  textAlign: 'center',
43
43
  borderRadius: '45px',
@@ -64,13 +64,15 @@ var styles = exports.styles = function styles(theme) {
64
64
 
65
65
  function HiPins(props) {
66
66
  var classes = props.classes,
67
+ theme = props.theme,
67
68
  children = props.children,
68
- color = props.color,
69
+ _props$color = props.color,
70
+ color = _props$color === undefined ? props.theme.palette.business.primary.normal : _props$color,
69
71
  onClick = props.onClick,
70
72
  className = props.className;
71
73
 
72
74
 
73
- var textColor = (0, _colorManipulator.getContrastedTextColor)(color, props.theme.palette.neutral.dark, '#FFF');
75
+ var textColor = (0, _colorManipulator.getContrastedTextColor)(color, theme.palette.neutral.dark, '#FFF');
74
76
 
75
77
  var divProps = {
76
78
  style: { backgroundColor: color, color: textColor }
@@ -92,7 +94,7 @@ HiPins.propTypes = process.env.NODE_ENV !== "production" ? {
92
94
  children: _propTypes2.default.node.isRequired,
93
95
  classes: _propTypes2.default.object.isRequired,
94
96
  className: _propTypes2.default.string,
95
- color: _propTypes2.default.string.isRequired,
97
+ color: _propTypes2.default.string,
96
98
  onClick: _propTypes2.default.func
97
99
  } : {};
98
100
  exports.default = (0, _styles.withStyles)(styles, { withTheme: true, name: 'HmuiHiPins' })(HiPins);
@@ -297,6 +297,7 @@ var HiSelect = function (_React$PureComponent) {
297
297
  classes = _props.classes,
298
298
  disabled = _props.disabled,
299
299
  error = _props.error,
300
+ loading = _props.loading,
300
301
  options = _props.options,
301
302
  checkbox = _props.checkbox,
302
303
  searchable = _props.searchable,
@@ -313,26 +314,41 @@ var HiSelect = function (_React$PureComponent) {
313
314
  id = _props.id,
314
315
  placeholder = _props.placeholder,
315
316
  staticPosition = _props.staticPosition,
316
- pinnedItem = _props.pinnedItem;
317
+ pinnedItem = _props.pinnedItem,
318
+ hasAll = _props.hasAll;
317
319
  var _state = this.state,
318
320
  open = _state.open,
319
321
  suggestions = _state.suggestions,
320
- focused = _state.focused;
322
+ focused = _state.focused,
323
+ dynamic = _state.dynamic;
321
324
 
322
325
 
323
326
  var display = '';
324
327
  var selectedIdList = Array.isArray(value) ? value : value ? [value] : [];
325
328
 
326
329
  var _suggestions = [].concat((0, _toConsumableArray3.default)(suggestions));
330
+
327
331
  if (pinnedItem) {
328
- _suggestions = [pinnedItem].concat((0, _toConsumableArray3.default)(suggestions));
332
+ _suggestions.unshift(pinnedItem);
333
+ }
334
+
335
+ // If loading
336
+ if (loading) {
337
+ _suggestions.unshift({
338
+ id: '_loading',
339
+ type: 'loader',
340
+ disabled: true,
341
+ centered: true,
342
+ checkbox: false,
343
+ label: 'loading'
344
+ });
329
345
  }
330
346
 
331
- if (this.state.dynamic && selectedIdList.length === 1) {
347
+ if ((dynamic || loading) && selectedIdList.length === 1) {
332
348
  display = translations.one_item_selected.replace('%s', selectedIdList.length);
333
- } else if (this.state.nbOptions !== selectedIdList.length && selectedIdList.length > 1) {
349
+ } else if ((this.state.nbOptions !== selectedIdList.length || !hasAll) && selectedIdList.length > 1) {
334
350
  display = translations.n_items_selected.replace('%s', selectedIdList.length);
335
- } else if (this.state.nbOptions === selectedIdList.length && this.state.nbOptions >= 1) {
351
+ } else if (this.state.nbOptions === selectedIdList.length && this.state.nbOptions > 1) {
336
352
  display = translations.all;
337
353
  } else if (selectedIdList.length === 1) {
338
354
  if (type !== 'icon') {
@@ -832,6 +848,10 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
832
848
  * id du select
833
849
  */
834
850
  id: _propTypes2.default.string,
851
+ /**
852
+ * Ajoute un loader
853
+ */
854
+ loading: _propTypes2.default.bool,
835
855
  /**
836
856
  * Autorise la sélection de plusieurs valeurs
837
857
  */
@@ -210,6 +210,7 @@ var HiSuggestSelect = function (_React$PureComponent) {
210
210
  label: showNoResults ? translations.no_result_match : translations.min_length
211
211
  }];
212
212
  }
213
+
213
214
  var open = !!optionsShown.length && focused;
214
215
 
215
216
  return _react2.default.createElement(
@@ -274,7 +275,7 @@ HiSuggestSelect.defaultProps = {
274
275
  showMinLength: false,
275
276
  showNoResults: false,
276
277
  translations: {
277
- no_result_match: 'No result match',
278
+ no_result_match: 'Aucun résultat correspondant',
278
279
  min_length: 'Veuillez saisir 3 caractères minimum'
279
280
  },
280
281
  options: []
@@ -67,7 +67,8 @@ var styles = exports.styles = function styles(theme) {
67
67
  width: '100%',
68
68
  height: 40,
69
69
  maxWidth: 500,
70
- justifyContent: 'flex-start',
70
+ display: 'flex',
71
+ justifyContent: 'center',
71
72
  padding: 8,
72
73
  cursor: 'pointer'
73
74
  },
@@ -142,18 +143,12 @@ var styles = exports.styles = function styles(theme) {
142
143
  label: (0, _extends3.default)({
143
144
  whiteSpace: 'nowrap',
144
145
  overflow: 'hidden',
145
- textOverflow: 'ellipsis',
146
- paddingRight: 16
146
+ textOverflow: 'ellipsis'
147
147
  }, theme.typography.body1, {
148
148
  display: 'inline-flex',
149
149
  width: '100%'
150
150
  }),
151
151
  icon: {
152
- position: 'absolute',
153
- display: 'flex',
154
- alignItems: 'center',
155
- right: 0,
156
- height: 40,
157
152
  transition: theme.transitions.create(['opacity', 'transform'], {
158
153
  duration: theme.transitions.duration.shorter
159
154
  })
@@ -112,59 +112,61 @@ var HiSelectableList = function (_React$PureComponent) {
112
112
  _List2.default,
113
113
  { className: classes.root, onKeyDown: this.props.onKeyDown },
114
114
  itemList.map(function (item) {
115
- /**
116
- * Calcul du level de l'item
117
- */
118
- if (hierarchic) {
119
- // On stocke l'id des parents dans un tableau
120
- if (item.parentId && !parents.includes(item.parentId)) {
121
- parents.push(item.parentId);
122
- } else if (item.parentId && parents.includes(item.parentId)) {
123
- // Si l'item n'a pas de parentId ou qu'on l'a déjà stocké :
124
- // Et si le parentId n'est pas le dernier inseré
125
- if (item.parentId !== parents[parents.length - 1]) {
126
- // On est donc redescendu d'un niveau
127
- // donc on supprime le dernier parent
128
- parents.pop();
115
+ if (item.displayed !== false) {
116
+ /**
117
+ * Calcul du level de l'item
118
+ */
119
+ if (hierarchic) {
120
+ // On stocke l'id des parents dans un tableau
121
+ if (item.parentId && !parents.includes(item.parentId)) {
122
+ parents.push(item.parentId);
123
+ } else if (item.parentId && parents.includes(item.parentId)) {
124
+ // Si l'item n'a pas de parentId ou qu'on l'a déjà stocké :
125
+ // Et si le parentId n'est pas le dernier inseré
126
+ if (item.parentId !== parents[parents.length - 1]) {
127
+ // On est donc redescendu d'un niveau
128
+ // donc on supprime le dernier parent
129
+ parents.pop();
130
+ }
131
+ } else if (!item.parentId && parents.length > 0) {
132
+ // Si l'item n'a pas de parent et que le tableau des parent
133
+ // n'est pas vide => on le réinitialise
134
+ parents = [];
129
135
  }
130
- } else if (!item.parentId && parents.length > 0) {
131
- // Si l'item n'a pas de parent et que le tableau des parent
132
- // n'est pas vide => on le réinitialise
133
- parents = [];
134
136
  }
135
- }
136
137
 
137
- /**
138
- * L'élément est-il selectionné ?
139
- */
140
- var selected = false;
141
- if (item.id === '_all') {
142
- selected = allSelected;
143
- } else if (!item.hasChildren) {
144
- selected = selectedIdList.includes(item.id);
145
- } else if (hierarchic && parentItemSelectable) {
146
- selected = hierarchySelected[item.id].length === hierarchy[item.id].length;
147
- }
138
+ /**
139
+ * L'élément est-il selectionné ?
140
+ */
141
+ var selected = false;
142
+ if (item.id === '_all') {
143
+ selected = allSelected;
144
+ } else if (!item.hasChildren) {
145
+ selected = selectedIdList.includes(item.id);
146
+ } else if (hierarchic && parentItemSelectable) {
147
+ selected = hierarchySelected[item.id].length === hierarchy[item.id].length;
148
+ }
148
149
 
149
- return _react2.default.createElement(_HiSelectableListItem2.default, (0, _extends3.default)({
150
- key: item.id,
151
- item: item,
152
- selected: selected,
153
- indeterminate: item.hasChildren && parentItemSelectable ? hierarchySelected[item.id].length > 0 && hierarchySelected[item.id].length !== hierarchy[item.id].length : false,
154
- onSelect: onSelect,
155
- hierarchySelected: hierarchySelected,
156
- parentItemSelectable: parentItemSelectable,
157
- nbChildren: typeof hierarchy !== 'undefined' && typeof hierarchy[item.id] !== 'undefined' ? hierarchy[item.id].length : 0,
158
- hierarchic: hierarchic,
159
- translations: translations,
160
- icon: icon,
161
- parentIcon: parentIcon,
162
- hoverIcon: hoverIcon,
163
- checkedIcon: checkedIcon,
164
- checkbox: checkbox,
165
- level: parents.length,
166
- disabled: disabledIds ? disabledIds.includes(item.id) : false
167
- }, others));
150
+ return _react2.default.createElement(_HiSelectableListItem2.default, (0, _extends3.default)({
151
+ key: item.id,
152
+ item: item,
153
+ selected: selected,
154
+ indeterminate: item.hasChildren && parentItemSelectable ? hierarchySelected[item.id].length > 0 && hierarchySelected[item.id].length !== hierarchy[item.id].length : false,
155
+ onSelect: onSelect,
156
+ hierarchySelected: hierarchySelected,
157
+ parentItemSelectable: parentItemSelectable,
158
+ nbChildren: typeof hierarchy !== 'undefined' && typeof hierarchy[item.id] !== 'undefined' ? hierarchy[item.id].length : 0,
159
+ hierarchic: hierarchic,
160
+ translations: translations,
161
+ icon: icon,
162
+ parentIcon: parentIcon,
163
+ hoverIcon: hoverIcon,
164
+ checkedIcon: checkedIcon,
165
+ checkbox: checkbox,
166
+ level: parents.length,
167
+ disabled: disabledIds ? disabledIds.includes(item.id) : false
168
+ }, others));
169
+ }
168
170
  })
169
171
  )
170
172
  );
@@ -73,14 +73,20 @@ var _HiColoredLabel = require('../HiColoredLabel');
73
73
 
74
74
  var _HiColoredLabel2 = _interopRequireDefault(_HiColoredLabel);
75
75
 
76
+ var _HiLoader = require('../HiLoader');
77
+
78
+ var _HiLoader2 = _interopRequireDefault(_HiLoader);
79
+
76
80
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
77
81
 
78
82
  var styles = exports.styles = function styles(theme) {
79
83
  return {
80
84
  listItem: {
81
- padding: 9 + 'px 0px',
85
+ padding: '9px 0px',
82
86
  fontWeight: theme.typography.fontWeightRegular,
83
- maxHeight: 40
87
+ maxHeight: 40,
88
+ display: 'flex',
89
+ alignItems: 'flex-start'
84
90
  },
85
91
  listItemTitle: {
86
92
  padding: 9 + 'px 0px',
@@ -100,6 +106,13 @@ var styles = exports.styles = function styles(theme) {
100
106
  textAlign: 'center',
101
107
  width: '100%'
102
108
  },
109
+ loader: {
110
+ textAlign: 'center',
111
+ width: 1,
112
+ height: 22,
113
+ padding: '8px 0',
114
+ margin: 'auto'
115
+ },
103
116
  selected: {
104
117
  backgroundColor: theme.palette.selected
105
118
  },
@@ -259,6 +272,9 @@ var HiSelectableListItem = function (_React$Component) {
259
272
  { className: itemPrimaryHighlightClass, 'data-id': item.id },
260
273
  _this.getItemLabel(item)
261
274
  );
275
+ case 'loader':
276
+ return _react2.default.createElement(_HiLoader2.default, { loading: true, className: classes.loader, size: 8 });
277
+ break;
262
278
  case 'text':
263
279
  default:
264
280
  var itemTextClass = (0, _classnames2.default)(classes.listItemContent, (0, _defineProperty3.default)({}, classes.centered, item.centered));
@@ -12,6 +12,10 @@ var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProp
12
12
 
13
13
  var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
14
14
 
15
+ var _stringify = require('babel-runtime/core-js/json/stringify');
16
+
17
+ var _stringify2 = _interopRequireDefault(_stringify);
18
+
15
19
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
16
20
 
17
21
  var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -57,8 +61,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
57
61
  /**
58
62
  * Construit la cellule correspondante au type demandé
59
63
  */
60
- var BodyCellBuilder = function (_React$PureComponent) {
61
- (0, _inherits3.default)(BodyCellBuilder, _React$PureComponent);
64
+ var BodyCellBuilder = function (_React$Component) {
65
+ (0, _inherits3.default)(BodyCellBuilder, _React$Component);
62
66
 
63
67
  function BodyCellBuilder(props) {
64
68
  (0, _classCallCheck3.default)(this, BodyCellBuilder);
@@ -69,16 +73,21 @@ var BodyCellBuilder = function (_React$PureComponent) {
69
73
  return _this;
70
74
  }
71
75
 
72
- /**
73
- * CollecContextMenuDatas
74
- *
75
- * définit les données utilisées par le context menu (lookup, exclude, copy, redirect)
76
- * - value : valeur sur laquelle on filtre
77
- * - label : label de la value (traduite)
78
- */
76
+ (0, _createClass3.default)(BodyCellBuilder, [{
77
+ key: 'shouldComponentUpdate',
78
+ value: function shouldComponentUpdate(nextProps, nextState) {
79
+ return (0, _stringify2.default)(this.props) !== (0, _stringify2.default)(nextProps) || (0, _stringify2.default)(this.state) !== (0, _stringify2.default)(nextState);
80
+ }
79
81
 
82
+ /**
83
+ * CollecContextMenuDatas
84
+ *
85
+ * définit les données utilisées par le context menu (lookup, exclude, copy, redirect)
86
+ * - value : valeur sur laquelle on filtre
87
+ * - label : label de la value (traduite)
88
+ */
80
89
 
81
- (0, _createClass3.default)(BodyCellBuilder, [{
90
+ }, {
82
91
  key: 'collectContextMenuDatas',
83
92
  value: function collectContextMenuDatas() {
84
93
  var _props$data = this.props.data,
@@ -205,7 +214,8 @@ var BodyCellBuilder = function (_React$PureComponent) {
205
214
  locale: dateLocale,
206
215
  view: view,
207
216
  displayTime: props.displayTime,
208
- sticky: sticky
217
+ sticky: sticky,
218
+ formatShort: this.props.formatShort
209
219
  });
210
220
  break;
211
221
 
@@ -315,7 +325,7 @@ var BodyCellBuilder = function (_React$PureComponent) {
315
325
  }
316
326
  }]);
317
327
  return BodyCellBuilder;
318
- }(_react2.default.PureComponent);
328
+ }(_react2.default.Component);
319
329
 
320
330
  BodyCellBuilder.defaultProps = {
321
331
  ellipsis: 'right',
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.styles = undefined;
7
7
 
8
+ var _stringify = require('babel-runtime/core-js/json/stringify');
9
+
10
+ var _stringify2 = _interopRequireDefault(_stringify);
11
+
8
12
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
9
13
 
10
14
  var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -56,8 +60,8 @@ var styles = exports.styles = function styles(theme) {
56
60
  */
57
61
 
58
62
 
59
- var CellAccount = function (_React$PureComponent) {
60
- (0, _inherits3.default)(CellAccount, _React$PureComponent);
63
+ var CellAccount = function (_React$Component) {
64
+ (0, _inherits3.default)(CellAccount, _React$Component);
61
65
 
62
66
  function CellAccount() {
63
67
  (0, _classCallCheck3.default)(this, CellAccount);
@@ -65,6 +69,11 @@ var CellAccount = function (_React$PureComponent) {
65
69
  }
66
70
 
67
71
  (0, _createClass3.default)(CellAccount, [{
72
+ key: 'shouldComponentUpdate',
73
+ value: function shouldComponentUpdate(nextProps, nextState) {
74
+ return (0, _stringify2.default)(this.props) !== (0, _stringify2.default)(nextProps) || (0, _stringify2.default)(this.state) !== (0, _stringify2.default)(nextState);
75
+ }
76
+ }, {
68
77
  key: 'render',
69
78
  value: function render() {
70
79
  var _props = this.props,
@@ -80,7 +89,7 @@ var CellAccount = function (_React$PureComponent) {
80
89
  }
81
90
  }]);
82
91
  return CellAccount;
83
- }(_react2.default.PureComponent);
92
+ }(_react2.default.Component);
84
93
 
85
94
  CellAccount.defaultProps = {};
86
95
  CellAccount.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -91,7 +100,7 @@ CellAccount.propTypes = process.env.NODE_ENV !== "production" ? {
91
100
  /**
92
101
  * Couleur du compte
93
102
  */
94
- color: _propTypes2.default.string.isRequired,
103
+ color: _propTypes2.default.string,
95
104
  /**
96
105
  * Nom du compte
97
106
  */
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.styles = undefined;
7
7
 
8
+ var _stringify = require('babel-runtime/core-js/json/stringify');
9
+
10
+ var _stringify2 = _interopRequireDefault(_stringify);
11
+
8
12
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
9
13
 
10
14
  var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -86,8 +90,8 @@ var styles = exports.styles = function styles(theme) {
86
90
  * Le tooltip affiche les informations complémentaires (country, expiration date..)
87
91
  */
88
92
 
89
- var CellAccountNumber = function (_React$PureComponent) {
90
- (0, _inherits3.default)(CellAccountNumber, _React$PureComponent);
93
+ var CellAccountNumber = function (_React$Component) {
94
+ (0, _inherits3.default)(CellAccountNumber, _React$Component);
91
95
 
92
96
  function CellAccountNumber() {
93
97
  (0, _classCallCheck3.default)(this, CellAccountNumber);
@@ -95,6 +99,11 @@ var CellAccountNumber = function (_React$PureComponent) {
95
99
  }
96
100
 
97
101
  (0, _createClass3.default)(CellAccountNumber, [{
102
+ key: 'shouldComponentUpdate',
103
+ value: function shouldComponentUpdate(nextProps, nextState) {
104
+ return (0, _stringify2.default)(this.props) !== (0, _stringify2.default)(nextProps) || (0, _stringify2.default)(this.state) !== (0, _stringify2.default)(nextState);
105
+ }
106
+ }, {
98
107
  key: 'render',
99
108
  value: function render() {
100
109
  var _this2 = this;
@@ -180,7 +189,7 @@ var CellAccountNumber = function (_React$PureComponent) {
180
189
  }
181
190
  }]);
182
191
  return CellAccountNumber;
183
- }(_react2.default.PureComponent);
192
+ }(_react2.default.Component);
184
193
 
185
194
  CellAccountNumber.propTypes = process.env.NODE_ENV !== "production" ? {
186
195
  /**