@hipay/hipay-material-ui 1.0.0-beta.6 → 1.0.0-beta.8

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 (57) hide show
  1. package/HiAlertModal/HiAlertModal.js +247 -0
  2. package/HiAlertModal/index.js +16 -0
  3. package/HiBreadcrumb/HiBreadcrumb.js +143 -0
  4. package/HiBreadcrumb/HiStep.js +123 -0
  5. package/HiBreadcrumb/HiStepConnector.js +142 -0
  6. package/HiBreadcrumb/HiStepIcon.js +134 -0
  7. package/HiBreadcrumb/HiStepLabel.js +182 -0
  8. package/HiBreadcrumb/HiStepper.js +125 -0
  9. package/HiBreadcrumb/index.js +16 -0
  10. package/HiDatePicker/HiDateRangeSelector.js +1 -1
  11. package/HiExpansionPanel/HiExpansionPanel.js +231 -0
  12. package/HiExpansionPanel/index.js +16 -0
  13. package/HiForm/HiFormControl.js +19 -24
  14. package/HiForm/HiSearchField.js +1 -1
  15. package/HiPins/HiPins.js +0 -1
  16. package/HiSelect/HiSelect.js +50 -31
  17. package/HiSelectableList/HiSelectableListItem.js +54 -16
  18. package/HiTable/BodyCells/CellCountry.js +1 -1
  19. package/HiTable/BodyCells/CellLayout.js +5 -1
  20. package/HiTable/BodyCells/CellStatus.js +5 -1
  21. package/HiTable/BodyCells/CellText.js +2 -1
  22. package/HiTable/ColumnFilter.js +5 -1
  23. package/HiTable/HiTable.js +15 -8
  24. package/HiTable/HiTableBody.js +13 -3
  25. package/HiTable/OrderColumns.js +6 -2
  26. package/es/HiAlertModal/HiAlertModal.js +189 -0
  27. package/es/HiAlertModal/index.js +1 -0
  28. package/es/HiBreadcrumb/HiBreadcrumb.js +73 -0
  29. package/es/HiBreadcrumb/HiStep.js +93 -0
  30. package/es/HiBreadcrumb/HiStepConnector.js +83 -0
  31. package/es/HiBreadcrumb/HiStepIcon.js +81 -0
  32. package/es/HiBreadcrumb/HiStepLabel.js +154 -0
  33. package/es/HiBreadcrumb/HiStepper.js +62 -0
  34. package/es/HiBreadcrumb/index.js +1 -0
  35. package/es/HiDatePicker/HiDateRangeSelector.js +1 -1
  36. package/es/HiExpansionPanel/HiExpansionPanel.js +170 -0
  37. package/es/HiExpansionPanel/index.js +1 -0
  38. package/es/HiForm/HiFormControl.js +15 -12
  39. package/es/HiForm/HiSearchField.js +1 -1
  40. package/es/HiPins/HiPins.js +0 -1
  41. package/es/HiSelect/HiSelect.js +49 -31
  42. package/es/HiSelectableList/HiSelectableListItem.js +49 -16
  43. package/es/HiTable/BodyCells/CellCountry.js +1 -1
  44. package/es/HiTable/BodyCells/CellLayout.js +5 -1
  45. package/es/HiTable/BodyCells/CellStatus.js +5 -1
  46. package/es/HiTable/BodyCells/CellText.js +2 -1
  47. package/es/HiTable/ColumnFilter.js +5 -1
  48. package/es/HiTable/HiTable.js +15 -8
  49. package/es/HiTable/HiTableBody.js +13 -3
  50. package/es/HiTable/OrderColumns.js +6 -2
  51. package/es/styles/createHiMuiTheme.js +4 -0
  52. package/index.es.js +1 -1
  53. package/index.js +1 -1
  54. package/package.json +1 -1
  55. package/styles/createHiMuiTheme.js +4 -0
  56. package/umd/hipay-material-ui.development.js +923 -834
  57. package/umd/hipay-material-ui.production.min.js +4 -4
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _HiExpansionPanel = require('./HiExpansionPanel');
8
+
9
+ Object.defineProperty(exports, 'default', {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _interopRequireDefault(_HiExpansionPanel).default;
13
+ }
14
+ });
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -149,6 +149,21 @@ var HiFormControl = function (_React$PureComponent) {
149
149
 
150
150
  var _this = (0, _possibleConstructorReturn3.default)(this, (HiFormControl.__proto__ || (0, _getPrototypeOf2.default)(HiFormControl)).call(this, props));
151
151
 
152
+ _this.handleFocus = function (value) {
153
+ return function () {
154
+ _this.setState({ focused: value });
155
+ if (value === false && _this.state.hovered) {
156
+ _this.setState({ hovered: false });
157
+ }
158
+ };
159
+ };
160
+
161
+ _this.handleHover = function (value) {
162
+ return function () {
163
+ _this.setState({ hovered: value });
164
+ };
165
+ };
166
+
152
167
  _this.state = {
153
168
  helperOpen: false,
154
169
  focused: false,
@@ -171,21 +186,9 @@ var HiFormControl = function (_React$PureComponent) {
171
186
  event.preventDefault();
172
187
  }
173
188
  }
174
- }, {
175
- key: 'handleFocus',
176
- value: function handleFocus(value) {
177
- this.setState({ focused: value });
178
- }
179
- }, {
180
- key: 'handleHover',
181
- value: function handleHover(value) {
182
- this.setState({ hovered: value });
183
- }
184
189
  }, {
185
190
  key: 'render',
186
191
  value: function render() {
187
- var _this2 = this;
188
-
189
192
  var _props = this.props,
190
193
  children = _props.children,
191
194
  classes = _props.classes,
@@ -263,18 +266,10 @@ var HiFormControl = function (_React$PureComponent) {
263
266
  _react2.default.createElement(
264
267
  'div',
265
268
  {
266
- onMouseEnter: function onMouseEnter() {
267
- return _this2.handleHover(true);
268
- },
269
- onMouseLeave: function onMouseLeave() {
270
- return _this2.handleHover(false);
271
- },
272
- onFocus: function onFocus() {
273
- return _this2.handleFocus(true);
274
- },
275
- onBlur: function onBlur() {
276
- return _this2.handleFocus(false);
277
- }
269
+ onMouseEnter: this.handleHover(true),
270
+ onMouseLeave: this.handleHover(false),
271
+ onFocus: this.handleFocus(true),
272
+ onBlur: this.handleFocus(false)
278
273
  },
279
274
  children
280
275
  ),
@@ -137,7 +137,7 @@ var HiSearchField = function (_React$Component) {
137
137
  if (typeof this.props.onSearch === 'undefined') {
138
138
  this.props.callbackFilteredList(this.props.itemList);
139
139
  } else {
140
- this.props.onSearch('');
140
+ this.props.onSearch(undefined, '');
141
141
  }
142
142
  }
143
143
  }, {
package/HiPins/HiPins.js CHANGED
@@ -42,7 +42,6 @@ var styles = exports.styles = function styles(theme) {
42
42
  textAlign: 'center',
43
43
  borderRadius: '45px',
44
44
  verticalAlign: 'middle',
45
- margin: 0.5 * theme.spacing.unit,
46
45
  fontSize: 11,
47
46
  fontWeight: theme.typography.fontWeightMedium,
48
47
  fontFamily: theme.typography.fontFamily
@@ -163,43 +163,28 @@ var HiSelect = function (_React$PureComponent) {
163
163
 
164
164
  // Check if value is in options
165
165
  var valueInOptions = false;
166
- var val = _this.props.value;
166
+ var val = props.value;
167
167
  // No options provided.
168
- if (!_this.props.options.length || !val.length) {
168
+ if (!props.options.length || !val || !val.length) {
169
169
  valueInOptions = true;
170
+ } else {
171
+ // Check if an option match value prop.
172
+ props.options.forEach(function (item) {
173
+ if (!valueInOptions && val.indexOf(item.id) !== -1) {
174
+ valueInOptions = true;
175
+ }
176
+ });
170
177
  }
171
- // Check if an option match value prop.
172
- _this.props.options.forEach(function (item) {
173
- if (!valueInOptions && val.indexOf(item.id) !== -1) {
174
- valueInOptions = true;
175
- }
176
- });
178
+
177
179
  if (!valueInOptions) {
178
180
  throw new Error('prop value provided does not match any option.');
179
181
  }
180
182
 
181
183
  if (props.hierarchic === true && props.options.length > 1) {
182
- // Construct two associative arrays
183
- // hierarchy[parentId] => children
184
- // hierarchySelected[parentId] => selected children
185
- var hierarchy = {};
186
- var hierarchySelected = {};
187
- var value = props.value || [];
188
- if (!Array.isArray(value)) value = [props.value];
189
- props.options.forEach(function (option) {
190
- if (option.hasChildren === true && !hierarchy.hasOwnProperty(option.id)) {
191
- hierarchy[option.id] = [];
192
- hierarchySelected[option.id] = [];
193
- } else if (option.hasOwnProperty('parentId')) {
194
- hierarchy[option.parentId].push(option.id);
195
- if (value.includes(option.id)) {
196
- hierarchySelected[option.parentId].push(option.id);
197
- }
198
- }
199
- });
184
+ var hierarchyTrees = _this.buildHierarchyTrees(props);
200
185
 
201
- _this.state.hierarchy = hierarchy;
202
- _this.state.hierarchySelected = hierarchySelected;
186
+ _this.state.hierarchy = hierarchyTrees.hierarchy;
187
+ _this.state.hierarchySelected = hierarchyTrees.hierarchySelected;
203
188
  }
204
189
 
205
190
  if (props.options.length > 0) {
@@ -238,6 +223,34 @@ var HiSelect = function (_React$PureComponent) {
238
223
  });
239
224
  this.setState({ nbOptions: optionsLength });
240
225
  }
226
+
227
+ if (nextProps.hierarchic === true && nextProps.options.length > 1) {
228
+ var hierarchyTrees = this.buildHierarchyTrees(nextProps);
229
+ this.setState({ hierarchy: hierarchyTrees.hierarchy, hierarchySelected: hierarchyTrees.hierarchySelected });
230
+ }
231
+ }
232
+ }, {
233
+ key: 'buildHierarchyTrees',
234
+ value: function buildHierarchyTrees(props) {
235
+ // Construct two associative arrays
236
+ // hierarchy[parentId] => children
237
+ // hierarchySelected[parentId] => selected children
238
+ var hierarchy = {};
239
+ var hierarchySelected = {};
240
+ var value = props.value || [];
241
+ if (!Array.isArray(value)) value = [props.value];
242
+ props.options.forEach(function (option) {
243
+ if (option.hasChildren === true && !hierarchy.hasOwnProperty(option.id)) {
244
+ hierarchy[option.id] = [];
245
+ hierarchySelected[option.id] = [];
246
+ } else if (option.hasOwnProperty('parentId')) {
247
+ hierarchy[option.parentId].push(option.id);
248
+ if (value.includes(option.id)) {
249
+ hierarchySelected[option.parentId].push(option.id);
250
+ }
251
+ }
252
+ });
253
+ return { hierarchy: hierarchy, hierarchySelected: hierarchySelected };
241
254
  }
242
255
 
243
256
  // Key down on list items
@@ -287,7 +300,8 @@ var HiSelect = function (_React$PureComponent) {
287
300
  hoverIcon = _props.hoverIcon,
288
301
  checkedIcon = _props.checkedIcon,
289
302
  hierarchic = _props.hierarchic,
290
- id = _props.id;
303
+ id = _props.id,
304
+ placeholder = _props.placeholder;
291
305
  var _state = this.state,
292
306
  open = _state.open,
293
307
  suggestions = _state.suggestions,
@@ -322,7 +336,7 @@ var HiSelect = function (_React$PureComponent) {
322
336
  }
323
337
 
324
338
  if (displayAsChip) {
325
- var chipFilter = _react2.default.createElement(_HiChip2.default, { label: display, onDelete: this.handleRequestDelete });
339
+ var chipFilter = _react2.default.createElement(_HiChip2.default, { label: placeholder || display, onDelete: this.handleRequestDelete });
326
340
  if (display) {
327
341
  display = chipFilter;
328
342
  }
@@ -356,7 +370,7 @@ var HiSelect = function (_React$PureComponent) {
356
370
  null,
357
371
  _react2.default.createElement(_SelectInput2.default, {
358
372
  id: id,
359
- value: display,
373
+ value: placeholder || display,
360
374
  open: open,
361
375
  focused: focused,
362
376
  type: type,
@@ -808,6 +822,11 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
808
822
  * Les items parents sont sélectionnables
809
823
  */
810
824
  parentItemSelectable: _propTypes2.default.bool,
825
+ /**
826
+ * Placeholder affiché lorsque le select est fermé
827
+ * Surcharge le placeholder par défaut
828
+ */
829
+ placeholder: _propTypes2.default.string,
811
830
  /**
812
831
  * Affiche un input de recherche permettant de filtrer les options
813
832
  */
@@ -69,13 +69,18 @@ var _HiIconBuilder = require('../utils/HiIconBuilder');
69
69
 
70
70
  var _HiIconBuilder2 = _interopRequireDefault(_HiIconBuilder);
71
71
 
72
+ var _HiColoredLabel = require('../HiColoredLabel');
73
+
74
+ var _HiColoredLabel2 = _interopRequireDefault(_HiColoredLabel);
75
+
72
76
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73
77
 
74
78
  var styles = exports.styles = function styles(theme) {
75
79
  return {
76
80
  listItem: {
77
81
  padding: 9 + 'px 0px',
78
- fontWeight: theme.typography.fontWeightRegular
82
+ fontWeight: theme.typography.fontWeightRegular,
83
+ maxHeight: 40
79
84
  },
80
85
  listItemTitle: {
81
86
  padding: 9 + 'px 0px',
@@ -112,9 +117,10 @@ var styles = exports.styles = function styles(theme) {
112
117
  fontWeight: 'inherit',
113
118
  width: '100%'
114
119
  }),
115
- listItemSecondaryText: (0, _extends3.default)({}, theme.typography.body4, {
120
+ listItemSecondaryText: (0, _extends3.default)({}, theme.typography.body5, {
116
121
  fontWeight: theme.typography.fontWeightLight,
117
- marginLeft: theme.spacing.unit
122
+ marginLeft: theme.spacing.unit,
123
+ color: theme.palette.neutral.normal
118
124
  }),
119
125
  listItemInfoText: (0, _extends3.default)({
120
126
  whiteSpace: 'nowrap',
@@ -165,6 +171,11 @@ var styles = exports.styles = function styles(theme) {
165
171
  color: '#000000'
166
172
  }
167
173
  },
174
+ labelHighlightColored: {
175
+ '&>strong': {
176
+ fontWeight: theme.typography.fontWeightMedium
177
+ }
178
+ },
168
179
  primaryHighlight: {
169
180
  fontWeight: theme.typography.fontWeightMedium,
170
181
  color: theme.palette.business.primary.normal,
@@ -213,8 +224,12 @@ var HiSelectableListItem = function (_React$Component) {
213
224
  'div',
214
225
  { className: classes.listItemContent, 'data-id': item.id },
215
226
  !effectiveCheckbox && _react2.default.createElement(_HiIconBuilder2.default, { icon: item.icon, className: classes.icon }),
216
- item.label,
217
- _react2.default.createElement('span', { className: classes.listItemSecondaryText }),
227
+ _this.getItemLabel(item),
228
+ _react2.default.createElement(
229
+ 'span',
230
+ { className: classes.listItemSecondaryText },
231
+ item.secondaryLabel
232
+ ),
218
233
  childrenIndicator
219
234
  );
220
235
  case 'image':
@@ -228,8 +243,12 @@ var HiSelectableListItem = function (_React$Component) {
228
243
  'div',
229
244
  { className: classes.listItemContent, 'data-id': item.id },
230
245
  img,
231
- item.label,
232
- _react2.default.createElement('span', { className: classes.listItemSecondaryText }),
246
+ _this.getItemLabel(item),
247
+ _react2.default.createElement(
248
+ 'span',
249
+ { className: classes.listItemSecondaryText },
250
+ item.secondaryLabel
251
+ ),
233
252
  childrenIndicator
234
253
  );
235
254
  case 'primary-highlight':
@@ -239,7 +258,7 @@ var HiSelectableListItem = function (_React$Component) {
239
258
  return _react2.default.createElement(
240
259
  'div',
241
260
  { className: itemPrimaryHighlightClass, 'data-id': item.id },
242
- item.label
261
+ _this.getItemLabel(item)
243
262
  );
244
263
  case 'text':
245
264
  default:
@@ -248,14 +267,12 @@ var HiSelectableListItem = function (_React$Component) {
248
267
  return _react2.default.createElement(
249
268
  'div',
250
269
  { className: itemTextClass, 'data-id': item.id },
251
- item.labelHighlight && _react2.default.createElement('span', {
252
- className: classes.labelHighlight,
253
- dangerouslySetInnerHTML: {
254
- __html: (0, _hiHelpers.escapeHTML)(item.labelHighlight)
255
- }
256
- }),
257
- !item.labelHighlight && item.label,
258
- _react2.default.createElement('span', { className: classes.listItemSecondaryText }),
270
+ _this.getItemLabel(item),
271
+ _react2.default.createElement(
272
+ 'span',
273
+ { className: classes.listItemSecondaryText },
274
+ item.secondaryLabel
275
+ ),
259
276
  childrenIndicator
260
277
  );
261
278
  }
@@ -275,6 +292,27 @@ var HiSelectableListItem = function (_React$Component) {
275
292
  value: function toggleHover() {
276
293
  this.setState({ hover: !this.state.hover });
277
294
  }
295
+ }, {
296
+ key: 'getItemLabel',
297
+ value: function getItemLabel(item) {
298
+ var classes = this.props.classes;
299
+
300
+ if (!item.labelHighlight && item.color && this.props.selected) {
301
+ return _react2.default.createElement(_HiColoredLabel2.default, { color: item.color, label: item.label });
302
+ } else if (item.labelHighlight) {
303
+ var mLabel = _react2.default.createElement('span', {
304
+ className: item.color ? classes.labelHighlightColored : classes.labelHighlight,
305
+ dangerouslySetInnerHTML: {
306
+ __html: (0, _hiHelpers.escapeHTML)(item.labelHighlight)
307
+ }
308
+ });
309
+ if (item.color && this.props.selected) {
310
+ return _react2.default.createElement(_HiColoredLabel2.default, { color: item.color, label: mLabel });
311
+ }
312
+ return mLabel;
313
+ }
314
+ return item.label;
315
+ }
278
316
 
279
317
  /**
280
318
  * Build list item from type
@@ -112,7 +112,7 @@ var CellCountry = function (_React$PureComponent) {
112
112
  view = _props.view;
113
113
 
114
114
 
115
- var path = '/static/hmus/images/countries/' + isoCode.toLowerCase() + '.svg';
115
+ var path = '/static/hmu/images/countries/' + isoCode.toLowerCase() + '.svg';
116
116
 
117
117
  var tooltipContent = _react2.default.createElement(
118
118
  'div',
@@ -83,6 +83,10 @@ var styles = exports.styles = function styles(theme) {
83
83
  lookedUp: {
84
84
  background: 'linear-gradient(0deg, transparent 25%, #FFFF8D 10%, #FFFF8D 75%, transparent 30%)',
85
85
  borderRadius: '45%'
86
+ },
87
+ pins: {
88
+ position: 'relative',
89
+ top: 3
86
90
  }
87
91
  };
88
92
  };
@@ -196,7 +200,7 @@ var CellLayout = function (_React$Component) {
196
200
  },
197
201
  _react2.default.createElement(
198
202
  _HiPins2.default,
199
- { color: theme.palette.business.primary.normal },
203
+ { color: theme.palette.business.primary.normal, className: classes.pins },
200
204
  childrenCount
201
205
  )
202
206
  )
@@ -55,6 +55,10 @@ var styles = exports.styles = function styles(theme) {
55
55
  display: 'inline-flex',
56
56
  alignItems: 'baseline',
57
57
  maxWidth: 'calc(100% - 36px)'
58
+ },
59
+ pins: {
60
+ position: 'relative',
61
+ bottom: 1
58
62
  }
59
63
  };
60
64
  };
@@ -93,7 +97,7 @@ var CellStatus = function (_React$PureComponent) {
93
97
  _react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color }),
94
98
  _react2.default.createElement(
95
99
  _HiPins2.default,
96
- { color: color, onClick: onOpenDetails },
100
+ { color: color, onClick: onOpenDetails, className: classes.pins },
97
101
  nbOperations
98
102
  )
99
103
  ) : _react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color })
@@ -66,7 +66,8 @@ var styles = exports.styles = function styles(theme) {
66
66
  display: 'inline-block',
67
67
  overflow: 'hidden',
68
68
  textOverflow: 'ellipsis',
69
- whiteSpace: 'pre'
69
+ whiteSpace: 'pre',
70
+ width: '100%'
70
71
  },
71
72
  noEllipsisSpan: {
72
73
  display: 'inline-block',
@@ -345,7 +345,11 @@ var ColumnFilter = function (_React$Component) {
345
345
  _react2.default.createElement(
346
346
  'div',
347
347
  { className: classes.menuItemFilter },
348
- translations.filter,
348
+ _react2.default.createElement(
349
+ 'span',
350
+ { style: { marginRight: 4 } },
351
+ translations.filter
352
+ ),
349
353
  _react2.default.createElement(
350
354
  _HiPins2.default,
351
355
  {
@@ -705,7 +705,8 @@ var HiTable = function (_React$Component) {
705
705
  translations = _props.translations,
706
706
  view = _props.view,
707
707
  groupBy = _props.groupBy,
708
- lookupColumns = _props.lookupColumns;
708
+ lookupColumns = _props.lookupColumns,
709
+ loading = _props.loading;
709
710
  var _state = this.state,
710
711
  dateUpdate = _state.dateUpdate,
711
712
  isScrollToBottom = _state.isScrollToBottom,
@@ -780,7 +781,8 @@ var HiTable = function (_React$Component) {
780
781
  groupBy: groupBy,
781
782
  onClickNext: this.handleNextStickyRow,
782
783
  groupByIds: groupByIds,
783
- lookupColumns: lookupColumns
784
+ lookupColumns: lookupColumns,
785
+ loading: loading
784
786
  }),
785
787
  infiniteScroll && _react2.default.createElement(_HiTableFooterScroll2.default, {
786
788
  tabId: tabId,
@@ -849,7 +851,8 @@ HiTable.defaultProps = {
849
851
  }
850
852
  },
851
853
  view: 'l',
852
- lookupColumns: []
854
+ lookupColumns: [],
855
+ loading: false
853
856
  };
854
857
  HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
855
858
  /**
@@ -880,6 +883,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
880
883
  * Active le filtre sur les colonnes filtrables
881
884
  */
882
885
  filterable: _propTypes2.default.bool,
886
+ /**
887
+ * Id de la colonne par laquelle sont regroupé les éléments
888
+ */
889
+ groupBy: _propTypes2.default.string,
883
890
  /**
884
891
  * Ajoute le loader et le requestNextDatas en fin de tableau (si infiniteScroll activé)
885
892
  */
@@ -892,6 +899,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
892
899
  * Ajoute l'infinite scroll
893
900
  */
894
901
  infiniteScroll: _propTypes2.default.bool,
902
+ /**
903
+ * État du tableau en cours de chargement des données
904
+ */
905
+ loading: _propTypes2.default.bool,
895
906
  /**
896
907
  * Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
897
908
  */
@@ -1003,10 +1014,6 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
1003
1014
  * Taille du tableau (L/M/S),
1004
1015
  * définit l'espace entre les cellules et leurs tailles par default
1005
1016
  */
1006
- view: _propTypes2.default.oneOf(['l', 'm', 's']),
1007
- /**
1008
- * Id de la colonne par laquelle sont regroupé les éléments
1009
- */
1010
- groupBy: _propTypes2.default.string
1017
+ view: _propTypes2.default.oneOf(['l', 'm', 's'])
1011
1018
  } : {};
1012
1019
  exports.default = (0, _styles.withStyles)(styles, { withTheme: true, name: 'HmuiHiTable' })(HiTable);
@@ -281,7 +281,8 @@ var HiTableBody = function (_React$Component) {
281
281
  numberLocale = _props.numberLocale,
282
282
  groupByIds = _props.groupByIds,
283
283
  sortedColumnId = _props.sortedColumnId,
284
- lookupColumns = _props.lookupColumns;
284
+ lookupColumns = _props.lookupColumns,
285
+ loading = _props.loading;
285
286
  var _state = this.state,
286
287
  openedParentRowId = _state.openedParentRowId,
287
288
  openedDetailsRowIdList = _state.openedDetailsRowIdList;
@@ -421,7 +422,11 @@ var HiTableBody = function (_React$Component) {
421
422
  {
422
423
  id: tabId + '-body',
423
424
  className: classes.tbody,
424
- style: { height: height },
425
+ style: (0, _extends3.default)({
426
+ height: height
427
+ }, loading && {
428
+ opacity: 0.6
429
+ }),
425
430
  onScroll: onScroll
426
431
  },
427
432
  tableRows.map(function (tableRow) {
@@ -442,7 +447,8 @@ HiTableBody.defaultProps = {
442
447
  dense: false,
443
448
  height: 450,
444
449
  sticky: true,
445
- view: 'l'
450
+ view: 'l',
451
+ loading: false
446
452
  };
447
453
  HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
448
454
  /**
@@ -474,6 +480,10 @@ HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
474
480
  * Hauteur du tableau (px)
475
481
  */
476
482
  height: _propTypes2.default.number,
483
+ /**
484
+ * État du tableau en cours de chargement des données
485
+ */
486
+ loading: _propTypes2.default.bool,
477
487
  /**
478
488
  * Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
479
489
  */
@@ -141,7 +141,8 @@ var styles = exports.styles = function styles(theme) {
141
141
  controlLabelRoot: {
142
142
  marginLeft: 6,
143
143
  marginBottom: 8,
144
- fontSize: 15
144
+ fontSize: 15,
145
+ width: 160
145
146
  },
146
147
  switchLabelRoot: {
147
148
  marginLeft: 15,
@@ -150,7 +151,10 @@ var styles = exports.styles = function styles(theme) {
150
151
  columnLabel: {
151
152
  position: 'relative',
152
153
  top: 5,
153
- left: 5
154
+ left: 5,
155
+ overflow: 'hidden',
156
+ textOverflow: 'ellipsis',
157
+ whiteSpace: 'nowrap'
154
158
  },
155
159
  label: {
156
160
  fontWeight: 'inherit'