@hipay/hipay-material-ui 1.0.0-beta.27 → 1.0.0-beta.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/HiCheckbox/HiCheckbox.js +6 -3
  2. package/HiColoredLabel/HiColoredLabel.js +2 -2
  3. package/HiDatePicker/HiDateRangeSelector.js +32 -9
  4. package/HiForm/HiSearchField.js +7 -1
  5. package/HiSelect/HiSelect.js +187 -77
  6. package/HiSelect/HiSuggestSelect.js +22 -6
  7. package/HiSelect/SelectInput.js +63 -10
  8. package/HiSelectableList/HiSelectableListItem.js +2 -1
  9. package/HiTable/BodyCellBuilder.js +22 -16
  10. package/HiTable/BodyCells/CellAccount.js +1 -5
  11. package/HiTable/BodyCells/CellAddress.js +3 -50
  12. package/HiTable/BodyCells/CellCountry.js +0 -4
  13. package/HiTable/BodyCells/CellDate.js +4 -13
  14. package/HiTable/BodyCells/CellIcon.js +10 -27
  15. package/HiTable/BodyCells/CellImage.js +1 -21
  16. package/HiTable/BodyCells/CellLayout.js +11 -4
  17. package/HiTable/BodyCells/CellNumeric.js +3 -23
  18. package/HiTable/BodyCells/CellSentinel.js +20 -49
  19. package/HiTable/BodyCells/CellStatus.js +11 -19
  20. package/HiTable/BodyCells/CellText.js +3 -10
  21. package/HiTable/BodyCells/CellThirdPartySecurity.js +4 -18
  22. package/HiTable/BodyCells/index.js +0 -9
  23. package/HiTable/BodyRow.js +15 -17
  24. package/HiTable/HiTable.js +41 -26
  25. package/HiTable/HiTableBody.js +2 -1
  26. package/HiTable/HiTableContextMenu.js +4 -3
  27. package/HiTable/constants.js +2 -2
  28. package/es/HiCheckbox/HiCheckbox.js +6 -3
  29. package/es/HiColoredLabel/HiColoredLabel.js +2 -2
  30. package/es/HiDatePicker/HiDateRangeSelector.js +27 -9
  31. package/es/HiForm/HiSearchField.js +2 -1
  32. package/es/HiSelect/HiSelect.js +133 -36
  33. package/es/HiSelect/HiSuggestSelect.js +22 -7
  34. package/es/HiSelect/SelectInput.js +50 -10
  35. package/es/HiSelectableList/HiSelectableListItem.js +2 -1
  36. package/es/HiTable/BodyCellBuilder.js +21 -19
  37. package/es/HiTable/BodyCells/CellAccount.js +1 -5
  38. package/es/HiTable/BodyCells/CellAddress.js +3 -44
  39. package/es/HiTable/BodyCells/CellCountry.js +0 -2
  40. package/es/HiTable/BodyCells/CellDate.js +4 -10
  41. package/es/HiTable/BodyCells/CellIcon.js +10 -24
  42. package/es/HiTable/BodyCells/CellImage.js +1 -21
  43. package/es/HiTable/BodyCells/CellLayout.js +10 -4
  44. package/es/HiTable/BodyCells/CellNumeric.js +3 -16
  45. package/es/HiTable/BodyCells/CellSentinel.js +20 -46
  46. package/es/HiTable/BodyCells/CellStatus.js +11 -16
  47. package/es/HiTable/BodyCells/CellText.js +3 -7
  48. package/es/HiTable/BodyCells/CellThirdPartySecurity.js +3 -15
  49. package/es/HiTable/BodyCells/index.js +0 -2
  50. package/es/HiTable/BodyRow.js +12 -14
  51. package/es/HiTable/HiTable.js +41 -26
  52. package/es/HiTable/HiTableBody.js +2 -1
  53. package/es/HiTable/HiTableContextMenu.js +4 -3
  54. package/es/HiTable/constants.js +7 -7
  55. package/es/utils/HiIconBuilder.js +12 -4
  56. package/es/utils/hiHelpers.js +1 -1
  57. package/index.es.js +1 -1
  58. package/index.js +1 -1
  59. package/package.json +1 -1
  60. package/umd/hipay-material-ui.development.js +9073 -9614
  61. package/umd/hipay-material-ui.production.min.js +5 -5
  62. package/utils/HiIconBuilder.js +13 -3
  63. package/utils/hiHelpers.js +1 -1
  64. package/HiTable/BodyCells/CellAccountNumber.js +0 -229
  65. package/es/HiTable/BodyCells/CellAccountNumber.js +0 -171
@@ -4,9 +4,9 @@ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
4
4
  import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { ContextMenuTrigger } from 'react-contextmenu';
7
-
7
+ import moment from 'moment';
8
8
  import * as cst from './constants';
9
- import { CellLayout, CellAccount, CellAccountNumber, CellAddress, CellDate, CellIcon, CellImage, CellNumeric, CellRate, CellSentinel, CellStatus, CellText, CellThirdPartySecurity, CellCountry } from './BodyCells';
9
+ import { CellLayout, CellAccount, CellAddress, CellDate, CellIcon, CellImage, CellNumeric, CellRate, CellSentinel, CellStatus, CellText, CellThirdPartySecurity, CellCountry } from './BodyCells';
10
10
  import { formatRate } from '../utils/hiHelpers';
11
11
 
12
12
  /**
@@ -72,6 +72,7 @@ export default class BodyCellBuilder extends React.Component {
72
72
  align,
73
73
  dense,
74
74
  ellipsis,
75
+ formatShort,
75
76
  onSelect,
76
77
  selectable,
77
78
  selected,
@@ -83,9 +84,11 @@ export default class BodyCellBuilder extends React.Component {
83
84
  lookedUp,
84
85
  fixedColumnWidth,
85
86
  disableContextMenu,
86
- detailInfos
87
+ detailInfos,
88
+ size,
89
+ tabId
87
90
  } = _props,
88
- props = _objectWithoutProperties(_props, ['ukey', 'type', 'data', 'view', 'width', 'padding', 'align', 'dense', 'ellipsis', 'onSelect', 'selectable', 'selected', 'sticky', 'dateLocale', 'numberLocale', 'childrenCount', 'onOpenDetails', 'lookedUp', 'fixedColumnWidth', 'disableContextMenu', 'detailInfos']);
91
+ props = _objectWithoutProperties(_props, ['ukey', 'type', 'data', 'view', 'width', 'padding', 'align', 'dense', 'ellipsis', 'formatShort', 'onSelect', 'selectable', 'selected', 'sticky', 'dateLocale', 'numberLocale', 'childrenCount', 'onOpenDetails', 'lookedUp', 'fixedColumnWidth', 'disableContextMenu', 'detailInfos', 'size', 'tabId']);
89
92
 
90
93
  const layoutProps = {
91
94
  type,
@@ -112,22 +115,12 @@ export default class BodyCellBuilder extends React.Component {
112
115
 
113
116
  switch (type) {
114
117
  case cst.TYPE_ACCOUNT:
118
+ layoutProps.title = data.value;
115
119
  cellElement = React.createElement(CellAccount, { value: data.value, color: data.color, sticky: sticky });
116
120
  break;
117
121
 
118
- case cst.TYPE_ACCOUNT_NUMBER:
119
- cellElement = React.createElement(CellAccountNumber, {
120
- value: data.value,
121
- country: data.country,
122
- expirationDate: data.expirationDate,
123
- expirationDateLabel: data.expirationDateLabel,
124
- statusColor: data.statusColor,
125
- issuer: data.issuer,
126
- sticky: sticky
127
- });
128
- break;
129
-
130
122
  case cst.TYPE_ADDRESS:
123
+ layoutProps.title = `${data.name}, ${data.value}, ${data.city}`;
131
124
  cellElement = React.createElement(CellAddress, {
132
125
  name: data.name,
133
126
  streetAddress: data.value,
@@ -141,6 +134,7 @@ export default class BodyCellBuilder extends React.Component {
141
134
  break;
142
135
 
143
136
  case cst.TYPE_COUNTRY:
137
+ layoutProps.title = data.label ? data.label : data.value;
144
138
  cellElement = React.createElement(CellCountry, {
145
139
  label: data.label ? data.label : data.value,
146
140
  path: data.img,
@@ -151,17 +145,19 @@ export default class BodyCellBuilder extends React.Component {
151
145
  break;
152
146
 
153
147
  case cst.TYPE_DATE:
148
+ if (!props.displayTime) layoutProps.title = moment(data.value).format('dddd DD MMMM YYYY HH:mm:ss');
154
149
  cellElement = React.createElement(CellDate, {
155
150
  value: data.value,
156
151
  locale: dateLocale,
157
152
  view: view,
158
153
  displayTime: props.displayTime,
159
154
  sticky: sticky,
160
- formatShort: this.props.formatShort
155
+ formatShort: formatShort
161
156
  });
162
157
  break;
163
158
 
164
159
  case cst.TYPE_ICON:
160
+ if (view === cst.VIEWS.SMALL) layoutProps.title = data.label ? data.label : data.value;
165
161
  cellElement = React.createElement(CellIcon, {
166
162
  value: data.label ? data.label : data.value,
167
163
  icon: data.icon,
@@ -172,16 +168,18 @@ export default class BodyCellBuilder extends React.Component {
172
168
  break;
173
169
 
174
170
  case cst.TYPE_IMAGE:
171
+ if (view === cst.VIEWS.SMALL) layoutProps.title = data.label ? data.label : data.value;
175
172
  cellElement = React.createElement(CellImage, {
176
173
  value: data.label ? data.label : data.value,
177
174
  path: data.img,
178
- size: this.props.size,
175
+ size: size,
179
176
  view: view,
180
177
  sticky: sticky
181
178
  });
182
179
  break;
183
180
 
184
181
  case cst.TYPE_NUMERIC:
182
+ if (view !== cst.VIEWS.LARGE) layoutProps.title = data.label ? data.label : data.value;
185
183
  cellElement = React.createElement(CellNumeric, {
186
184
  value: data.value,
187
185
  currency: data.currency,
@@ -216,6 +214,7 @@ export default class BodyCellBuilder extends React.Component {
216
214
  break;
217
215
 
218
216
  case cst.TYPE_STATUS:
217
+ layoutProps.title = data.label ? data.label : data.value;
219
218
  cellElement = React.createElement(CellStatus, _extends({
220
219
  code: data.value,
221
220
  value: data.label ? data.label : data.value,
@@ -229,6 +228,7 @@ export default class BodyCellBuilder extends React.Component {
229
228
  break;
230
229
 
231
230
  case cst.TYPE_THIRD_PARTY_SECURITY:
231
+ layoutProps.title = data.label ? data.label : data.value;
232
232
  layoutProps.align = 'center';
233
233
  cellElement = React.createElement(CellThirdPartySecurity, {
234
234
  value: data.value,
@@ -237,8 +237,10 @@ export default class BodyCellBuilder extends React.Component {
237
237
  });
238
238
  break;
239
239
 
240
+ case cst.TYPE_ACCOUNT_NUMBER:
240
241
  case cst.TYPE_TEXT:
241
242
  default:
243
+ layoutProps.title = data.label ? data.label : data.value;
242
244
  cellElement = React.createElement(CellText, {
243
245
  ukey: ukey,
244
246
  value: data.label ? data.label : data.value,
@@ -253,7 +255,7 @@ export default class BodyCellBuilder extends React.Component {
253
255
  cellContent = disableContextMenu ? cellElement : React.createElement(
254
256
  ContextMenuTrigger,
255
257
  {
256
- id: `hitable_context_menu_${this.props.tabId}`,
258
+ id: `hitable_context_menu_${tabId}`,
257
259
  collect: this.collectContextMenuDatas
258
260
  },
259
261
  cellElement
@@ -16,11 +16,7 @@ class CellAccount extends React.Component {
16
16
  render() {
17
17
  const { value, color } = this.props;
18
18
 
19
- return React.createElement(
20
- Tooltip,
21
- { title: value, placement: 'bottom' },
22
- React.createElement(HiColoredLabel, { label: value, color: color })
23
- );
19
+ return React.createElement(HiColoredLabel, { label: value, color: color });
24
20
  }
25
21
  }
26
22
 
@@ -1,12 +1,9 @@
1
1
  import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
2
2
  // @inheritedComponent CellLayout
3
-
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
- import Tooltip from '../../Tooltip';
7
5
  import * as cst from '../constants';
8
6
  import withStyles from '../../styles/withStyles';
9
- import CellLayout from './CellLayout';
10
7
 
11
8
  export const styles = theme => ({
12
9
  rightEllipsisSpan: {
@@ -48,48 +45,10 @@ class CellAddress extends React.Component {
48
45
  label += isoCountry;
49
46
  }
50
47
 
51
- let tooltipContent = React.createElement(
52
- 'div',
53
- null,
54
- React.createElement(
55
- 'div',
56
- null,
57
- name
58
- ),
59
- React.createElement(
60
- 'div',
61
- null,
62
- streetAddress
63
- ),
64
- React.createElement(
65
- 'div',
66
- null,
67
- React.createElement(
68
- 'span',
69
- null,
70
- city + ', '
71
- ),
72
- React.createElement(
73
- 'span',
74
- null,
75
- postalCode
76
- )
77
- ),
78
- React.createElement(
79
- 'div',
80
- null,
81
- country
82
- )
83
- );
84
-
85
48
  return React.createElement(
86
- Tooltip,
87
- { title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
88
- React.createElement(
89
- 'div',
90
- { className: classes.rightEllipsisSpan },
91
- label
92
- )
49
+ 'div',
50
+ { className: classes.rightEllipsisSpan },
51
+ label
93
52
  );
94
53
  }
95
54
  }
@@ -1,9 +1,7 @@
1
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
-
5
4
  import CellImage from './CellImage';
6
- import Tooltip from '../../Tooltip';
7
5
  import withStyles from '../../styles/withStyles';
8
6
  import * as cst from '../constants';
9
7
 
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
4
4
  import moment from 'moment';
5
5
  import 'moment/locale/fr';
6
6
  import withStyles from '../../styles/withStyles';
7
- import Tooltip from '../../Tooltip';
8
7
  import * as cst from '../constants';
9
8
 
10
9
  export const styles = {
@@ -37,8 +36,7 @@ class CellDate extends React.Component {
37
36
  const date = moment(value);
38
37
  date.locale(locale);
39
38
 
40
- const titleValue = displayTime ? date.format(this.formatLong) : date.format(this.formatLong.replace(' HH:mm:ss', ''));
41
- let displayedValue = titleValue;
39
+ let displayedValue = displayTime ? date.format(this.formatLong) : date.format(this.formatLong.replace(' HH:mm:ss', ''));
42
40
  if (view === cst.VIEWS.SMALL) {
43
41
  displayedValue = displayTime ? date.format(`${formatShort.replace('YYYY', 'YY')} HH:mm:ss`) : date.format(formatShort.replace('YYYY', 'YY'));
44
42
  } else if (view === cst.VIEWS.MEDIUM) {
@@ -54,13 +52,9 @@ class CellDate extends React.Component {
54
52
  }
55
53
 
56
54
  return React.createElement(
57
- Tooltip,
58
- { title: titleValue, placement: this.props.sticky ? 'right' : 'bottom' },
59
- React.createElement(
60
- 'div',
61
- { className: classes.rightEllipsisSpan },
62
- displayedValue
63
- )
55
+ 'div',
56
+ { className: classes.rightEllipsisSpan },
57
+ displayedValue
64
58
  );
65
59
  }
66
60
  }
@@ -1,7 +1,6 @@
1
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 Tooltip from '../../Tooltip';
5
4
  import withStyles from '../../styles/withStyles';
6
5
  import * as cst from '../constants';
7
6
  import HiIconBuilder from '../../utils/HiIconBuilder';
@@ -11,13 +10,15 @@ export const styles = {
11
10
  float: 'left'
12
11
  },
13
12
  label: {
14
- margin: 5
15
- },
16
- wrapper: {
13
+ margin: '4px 0',
17
14
  whiteSpace: 'nowrap',
18
15
  overflow: 'hidden',
19
16
  textOverflow: 'ellipsis'
20
17
  },
18
+ wrapper: {
19
+ maxWidth: '100%',
20
+ display: 'inline-flex'
21
+ },
21
22
  nowrap: {
22
23
  whiteSpace: 'nowrap'
23
24
  }
@@ -36,33 +37,18 @@ class CellIcon extends React.Component {
36
37
  render() {
37
38
  const { classes, icon, value, view, color } = this.props;
38
39
 
39
- const iconElement = icon !== '' ? React.createElement(HiIconBuilder, { color: color, className: classes.icon, icon: icon, size: 18 }) : '';
40
+ const iconElement = icon !== '' ? React.createElement(HiIconBuilder, { color: color, className: classes.icon, icon: icon, width: 40, height: 24 }) : '';
40
41
 
41
- const tooltipContent = React.createElement(
42
+ return React.createElement(
42
43
  'div',
43
- { className: classes.nowrap },
44
+ { className: classes.wrapper },
44
45
  iconElement,
45
- React.createElement(
46
+ view !== cst.VIEWS.SMALL && typeof value !== 'undefined' && React.createElement(
46
47
  'span',
47
- null,
48
+ { className: classes.label },
48
49
  value
49
50
  )
50
51
  );
51
-
52
- return React.createElement(
53
- Tooltip,
54
- { title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
55
- React.createElement(
56
- 'div',
57
- { className: classes.wrapper },
58
- iconElement,
59
- view !== cst.VIEWS.SMALL && typeof value !== 'undefined' && React.createElement(
60
- 'span',
61
- { className: classes.label },
62
- value
63
- )
64
- )
65
- );
66
52
  }
67
53
  }
68
54
 
@@ -55,17 +55,6 @@ class CellImage extends React.Component {
55
55
  render() {
56
56
  const { classes, path, value, view, size } = this.props;
57
57
 
58
- const tooltipContent = React.createElement(
59
- 'div',
60
- { className: classes.tooltipContainer },
61
- React.createElement('img', { src: path, alt: value, className: classes.tooltipImg, width: size }),
62
- React.createElement(
63
- 'span',
64
- { className: classes.tooltipLabel },
65
- value
66
- )
67
- );
68
-
69
58
  let innerCellElement = null;
70
59
  if (path) {
71
60
  if (view === cst.VIEWS.SMALL) {
@@ -98,16 +87,7 @@ class CellImage extends React.Component {
98
87
  );
99
88
  }
100
89
 
101
- if (view === cst.VIEWS.LARGE) {
102
- // Don't add tooltip for large view
103
- return innerCellElement;
104
- } else {
105
- return React.createElement(
106
- Tooltip,
107
- { title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
108
- innerCellElement
109
- );
110
- }
90
+ return innerCellElement;
111
91
  }
112
92
  }
113
93
 
@@ -63,7 +63,7 @@ class CellLayout extends React.Component {
63
63
  align = cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left',
64
64
  view, dense, width = cst.DEFAULT_WIDTHS[type][view], fixedColumnWidth, sticky,
65
65
  selectable, selected, onSelect, childrenCount, detailInfos, onOpenDetails, theme, padding,
66
- lookedUp
66
+ lookedUp, title
67
67
  } = this.props;
68
68
 
69
69
  const offset = selectable ? dense ? 32 : 40 : 0;
@@ -106,7 +106,8 @@ class CellLayout extends React.Component {
106
106
  paddingLeft: selectable ? 0 : padding,
107
107
  paddingRight: padding,
108
108
  height: dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT
109
- }
109
+ },
110
+ title: title
110
111
  },
111
112
  children,
112
113
  childrenCount && React.createElement(
@@ -153,7 +154,8 @@ CellLayout.defaultProps = {
153
154
  fixedColumnWidth: true,
154
155
  sticky: false,
155
156
  padding: 8,
156
- detailInfos: null
157
+ detailInfos: null,
158
+ title: null
157
159
  };
158
160
  CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
159
161
  /**
@@ -220,6 +222,10 @@ CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
220
222
  /**
221
223
  * Nombre d'enfants
222
224
  */
223
- childrenCount: PropTypes.number
225
+ childrenCount: PropTypes.number,
226
+ /**
227
+ * Html title attribute
228
+ */
229
+ title: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
224
230
  } : {};
225
231
  export default withStyles(styles, { withTheme: true, name: 'HmuiCellLayout' })(CellLayout);
@@ -1,11 +1,8 @@
1
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
-
5
4
  import withStyles from '../../styles/withStyles';
6
5
  import { formatNumber, formatCurrencyAmount } from '../../utils/hiHelpers';
7
- import Tooltip from '../../Tooltip';
8
- import * as cst from '../constants';
9
6
 
10
7
  export const styles = theme => ({
11
8
  spanNumeric: {
@@ -26,27 +23,17 @@ class CellNumeric extends React.Component {
26
23
  const { classes, value, locale, currency, view, precision } = this.props;
27
24
 
28
25
  let displayedValue = '';
29
- let titleValue = '';
30
26
 
31
27
  if (currency) {
32
28
  displayedValue = formatCurrencyAmount(value, view, locale, currency);
33
- if (view === cst.VIEWS.LARGE) {
34
- titleValue = displayedValue;
35
- } else {
36
- titleValue = formatCurrencyAmount(value, cst.VIEWS.LARGE, locale, currency);
37
- }
38
29
  } else {
39
30
  displayedValue = formatNumber(value, view, locale, precision);
40
31
  }
41
32
 
42
33
  return React.createElement(
43
- Tooltip,
44
- { title: titleValue, placement: this.props.sticky ? 'right' : 'bottom' },
45
- React.createElement(
46
- 'span',
47
- { className: classes.spanNumeric },
48
- displayedValue
49
- )
34
+ 'span',
35
+ { className: classes.spanNumeric },
36
+ displayedValue
50
37
  );
51
38
  }
52
39
  }
@@ -1,7 +1,6 @@
1
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 Tooltip from '../../Tooltip';
5
4
  import HiColoredLabel from '../../HiColoredLabel';
6
5
  import { withStyles } from '../../styles';
7
6
  import * as cst from '../constants';
@@ -80,54 +79,29 @@ class CellSentinel extends React.Component {
80
79
 
81
80
  const scoreLabel = score > 0 ? `+${score}` : `${score}`;
82
81
 
83
- const tooltipContent = React.createElement(
84
- 'div',
85
- null,
86
- React.createElement(
87
- 'div',
88
- { className: classes.nowrap },
89
- scoreLabel
90
- ),
91
- React.createElement(
92
- 'div',
93
- { className: classes.nowrap },
94
- fraudResult
95
- ),
96
- !!smartDecision && automaticFraudReviewResult && React.createElement(
97
- 'div',
98
- { className: classes.nowrap },
99
- 'SD: ',
100
- automaticFraudReviewResult
101
- )
102
- );
103
-
104
82
  return React.createElement(
105
- Tooltip,
106
- { title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
107
- React.createElement(
83
+ 'div',
84
+ { style: { textAlign: 'right' } },
85
+ React.createElement(HiColoredLabel, {
86
+ label: scoreLabel,
87
+ color: this.getColorFromFraudResult(fraudResult.toLowerCase()),
88
+ classes: { root: classes.label },
89
+ active: pendingManualAction
90
+ }),
91
+ !hideFraudResult && React.createElement(HiColoredLabel, {
92
+ label: fraudResult.toUpperCase().substr(0, 1),
93
+ color: this.getColorFromFraudResult(fraudResult),
94
+ classes: { root: classes.label },
95
+ active: pendingManualAction
96
+ }),
97
+ !!smartDecision && React.createElement(
108
98
  'div',
109
- { style: { textAlign: 'right' } },
110
- React.createElement(HiColoredLabel, {
111
- label: scoreLabel,
112
- color: this.getColorFromFraudResult(fraudResult.toLowerCase()),
113
- classes: { root: classes.label },
114
- active: pendingManualAction
115
- }),
116
- !hideFraudResult && React.createElement(HiColoredLabel, {
117
- label: fraudResult.toUpperCase().substr(0, 1),
118
- color: this.getColorFromFraudResult(fraudResult),
119
- classes: { root: classes.label },
99
+ { className: classes.smartDecision },
100
+ automaticFraudReviewResult && React.createElement(HiColoredLabel, {
101
+ label: automaticFraudReviewResult.toUpperCase().substr(0, 1),
102
+ color: this.getColorFromFraudResult(automaticFraudReviewResult),
120
103
  active: pendingManualAction
121
- }),
122
- !!smartDecision && React.createElement(
123
- 'div',
124
- { className: classes.smartDecision },
125
- automaticFraudReviewResult && React.createElement(HiColoredLabel, {
126
- label: automaticFraudReviewResult.toUpperCase().substr(0, 1),
127
- color: this.getColorFromFraudResult(automaticFraudReviewResult),
128
- active: pendingManualAction
129
- })
130
- )
104
+ })
131
105
  )
132
106
  );
133
107
  }
@@ -5,7 +5,6 @@ import PropTypes from 'prop-types';
5
5
  import HiColoredLabel from '../../HiColoredLabel';
6
6
  import HiPins from '../../HiPins';
7
7
  import { withStyles } from '../../styles';
8
- import Tooltip from '../../Tooltip';
9
8
 
10
9
  export const styles = theme => ({
11
10
  labelDiv: {
@@ -31,22 +30,18 @@ class CellStatus extends React.Component {
31
30
  const color = typeof theme.palette.status[code] !== 'undefined' ? theme.palette.status[code] : theme.palette.neutral.normal;
32
31
 
33
32
  return React.createElement(
34
- Tooltip,
35
- { title: value, placement: this.props.sticky ? 'right' : 'bottom' },
36
- React.createElement(
33
+ 'div',
34
+ null,
35
+ nbOperations > 0 ? React.createElement(
37
36
  'div',
38
- null,
39
- nbOperations > 0 ? React.createElement(
40
- 'div',
41
- { className: classes.labelDiv },
42
- React.createElement(HiColoredLabel, { label: value, color: color }),
43
- React.createElement(
44
- HiPins,
45
- { color: color, onClick: onOpenDetails, className: classes.pins },
46
- nbOperations
47
- )
48
- ) : React.createElement(HiColoredLabel, { label: value, color: color })
49
- )
37
+ { className: classes.labelDiv },
38
+ React.createElement(HiColoredLabel, { label: value, color: color }),
39
+ React.createElement(
40
+ HiPins,
41
+ { color: color, onClick: onOpenDetails, className: classes.pins },
42
+ nbOperations
43
+ )
44
+ ) : React.createElement(HiColoredLabel, { label: value, color: color })
50
45
  );
51
46
  }
52
47
  }
@@ -1,7 +1,6 @@
1
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 Tooltip from '../../Tooltip';
5
4
  import withStyles from '../../styles/withStyles';
6
5
  import * as cst from '../constants';
7
6
  import HiColoredLabel from '../../HiColoredLabel';
@@ -57,7 +56,7 @@ class CellText extends React.Component {
57
56
  * Calcul l'espace disponible dans la cellule en plus du premier mot
58
57
  * si il reste de l'espace, définit la largeur du span pour le reste du texte
59
58
  */
60
- if (this.props.ellipsis === cst.ELLIPSIS_AFTER_FIRST_WORD) {
59
+ if (this.props.ellipsis === cst.ELLIPSIS_AFTER_FIRST_WORD || this.props.ellipsis === cst.ELLIPSIS_NAME) {
61
60
  if (this.cellText !== null) {
62
61
  const [startSpan, endSpan] = this.cellText.getElementsByTagName('span');
63
62
  if (typeof startSpan !== 'undefined' && typeof endSpan !== 'undefined') {
@@ -104,6 +103,7 @@ class CellText extends React.Component {
104
103
  const valueString = value.toString();
105
104
 
106
105
  switch (ellipsis) {
106
+ case cst.ELLIPSIS_NAME:
107
107
  case cst.ELLIPSIS_AFTER_FIRST_WORD:
108
108
  // Split value in 2 strings around first whitespace
109
109
  start = valueString.substr(0, valueString.indexOf(' '));
@@ -190,11 +190,7 @@ class CellText extends React.Component {
190
190
  break;
191
191
  }
192
192
 
193
- return React.createElement(
194
- Tooltip,
195
- { title: value, placement: this.props.sticky ? 'right' : 'bottom' },
196
- valueElement
197
- );
193
+ return valueElement;
198
194
  }
199
195
  }
200
196
 
@@ -1,10 +1,8 @@
1
1
  import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
2
2
  // @inheritedComponent CellLayout
3
-
4
3
  import React from 'react';
5
4
  import PropTypes from 'prop-types';
6
5
  import { Lock, LockOpen, LockOpenOutline } from 'mdi-material-ui';
7
- import Tooltip from '../../Tooltip';
8
6
  import { withStyles } from '../../styles';
9
7
 
10
8
  export const styles = {
@@ -68,20 +66,10 @@ class CellThirdPartySecurity extends React.Component {
68
66
  break;
69
67
  }
70
68
 
71
- const tooltipContent = React.createElement(
72
- 'div',
73
- { className: classes.nowrap },
74
- label
75
- );
76
-
77
69
  return React.createElement(
78
- Tooltip,
79
- { title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
80
- React.createElement(
81
- 'div',
82
- null,
83
- icon
84
- )
70
+ 'div',
71
+ null,
72
+ icon
85
73
  );
86
74
  }
87
75
  }
@@ -1,8 +1,6 @@
1
1
  //flow
2
-
3
2
  export { default as CellThirdPartySecurity } from './CellThirdPartySecurity';
4
3
  export { default as CellAccount } from './CellAccount';
5
- export { default as CellAccountNumber } from './CellAccountNumber';
6
4
  export { default as CellAddress } from './CellAddress';
7
5
  export { default as CellDate } from './CellDate';
8
6
  export { default as CellIcon } from './CellIcon';