@hipay/hipay-material-ui 1.0.0-beta.26 → 1.0.0-beta.28
Sign up to get free protection for your applications and to get access to all the features.
- package/HI-CHANGELOG.md +37 -0
- package/HiCheckbox/HiCheckbox.js +6 -3
- package/HiColoredLabel/HiColoredLabel.js +2 -2
- package/HiDatePicker/HiDateRangeSelector.js +32 -9
- package/HiForm/HiFormControl.js +4 -4
- package/HiForm/HiSearchField.js +7 -1
- package/HiSelect/HiSelect.js +195 -83
- package/HiSelect/HiSuggestSelect.js +22 -6
- package/HiSelect/SelectInput.js +63 -10
- package/HiSelectableList/HiSelectableListItem.js +2 -1
- package/HiTable/BodyCellBuilder.js +22 -16
- package/HiTable/BodyCells/CellAccount.js +1 -5
- package/HiTable/BodyCells/CellAddress.js +3 -50
- package/HiTable/BodyCells/CellCountry.js +0 -4
- package/HiTable/BodyCells/CellDate.js +4 -13
- package/HiTable/BodyCells/CellIcon.js +10 -27
- package/HiTable/BodyCells/CellImage.js +1 -21
- package/HiTable/BodyCells/CellLayout.js +11 -4
- package/HiTable/BodyCells/CellNumeric.js +3 -23
- package/HiTable/BodyCells/CellRate.js +3 -3
- package/HiTable/BodyCells/CellSentinel.js +20 -49
- package/HiTable/BodyCells/CellStatus.js +11 -19
- package/HiTable/BodyCells/CellText.js +3 -10
- package/HiTable/BodyCells/CellThirdPartySecurity.js +4 -18
- package/HiTable/BodyCells/index.js +0 -9
- package/HiTable/BodyRow.js +15 -17
- package/HiTable/HiTable.js +41 -26
- package/HiTable/HiTableBody.js +2 -1
- package/HiTable/HiTableContextMenu.js +4 -3
- package/HiTable/HiTableFooter.js +5 -6
- package/HiTable/constants.js +2 -2
- package/es/HiCheckbox/HiCheckbox.js +6 -3
- package/es/HiColoredLabel/HiColoredLabel.js +2 -2
- package/es/HiDatePicker/HiDateRangeSelector.js +27 -9
- package/es/HiForm/HiFormControl.js +4 -4
- package/es/HiForm/HiSearchField.js +2 -1
- package/es/HiSelect/HiSelect.js +141 -42
- package/es/HiSelect/HiSuggestSelect.js +22 -7
- package/es/HiSelect/SelectInput.js +50 -10
- package/es/HiSelectableList/HiSelectableListItem.js +2 -1
- package/es/HiTable/BodyCellBuilder.js +21 -19
- package/es/HiTable/BodyCells/CellAccount.js +1 -5
- package/es/HiTable/BodyCells/CellAddress.js +3 -44
- package/es/HiTable/BodyCells/CellCountry.js +0 -2
- package/es/HiTable/BodyCells/CellDate.js +4 -10
- package/es/HiTable/BodyCells/CellIcon.js +10 -24
- package/es/HiTable/BodyCells/CellImage.js +1 -21
- package/es/HiTable/BodyCells/CellLayout.js +10 -4
- package/es/HiTable/BodyCells/CellNumeric.js +3 -16
- package/es/HiTable/BodyCells/CellRate.js +3 -3
- package/es/HiTable/BodyCells/CellSentinel.js +20 -46
- package/es/HiTable/BodyCells/CellStatus.js +11 -16
- package/es/HiTable/BodyCells/CellText.js +3 -7
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +3 -15
- package/es/HiTable/BodyCells/index.js +0 -2
- package/es/HiTable/BodyRow.js +12 -14
- package/es/HiTable/HiTable.js +41 -26
- package/es/HiTable/HiTableBody.js +2 -1
- package/es/HiTable/HiTableContextMenu.js +4 -3
- package/es/HiTable/HiTableFooter.js +6 -6
- package/es/HiTable/constants.js +7 -7
- package/es/utils/HiIconBuilder.js +12 -4
- package/es/utils/hiHelpers.js +1 -1
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +9093 -9629
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/HiIconBuilder.js +13 -3
- package/utils/hiHelpers.js +1 -1
- package/HiTable/BodyCells/CellAccountNumber.js +0 -229
- package/es/HiTable/BodyCells/CellAccountNumber.js +0 -171
@@ -37,10 +37,6 @@ var _propTypes = require('prop-types');
|
|
37
37
|
|
38
38
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
39
39
|
|
40
|
-
var _Tooltip = require('../../Tooltip');
|
41
|
-
|
42
|
-
var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
43
|
-
|
44
40
|
var _HiColoredLabel = require('../../HiColoredLabel');
|
45
41
|
|
46
42
|
var _HiColoredLabel2 = _interopRequireDefault(_HiColoredLabel);
|
@@ -141,54 +137,29 @@ var CellSentinel = function (_React$Component) {
|
|
141
137
|
|
142
138
|
var scoreLabel = score > 0 ? '+' + score : '' + score;
|
143
139
|
|
144
|
-
var tooltipContent = _react2.default.createElement(
|
145
|
-
'div',
|
146
|
-
null,
|
147
|
-
_react2.default.createElement(
|
148
|
-
'div',
|
149
|
-
{ className: classes.nowrap },
|
150
|
-
scoreLabel
|
151
|
-
),
|
152
|
-
_react2.default.createElement(
|
153
|
-
'div',
|
154
|
-
{ className: classes.nowrap },
|
155
|
-
fraudResult
|
156
|
-
),
|
157
|
-
!!smartDecision && automaticFraudReviewResult && _react2.default.createElement(
|
158
|
-
'div',
|
159
|
-
{ className: classes.nowrap },
|
160
|
-
'SD: ',
|
161
|
-
automaticFraudReviewResult
|
162
|
-
)
|
163
|
-
);
|
164
|
-
|
165
140
|
return _react2.default.createElement(
|
166
|
-
|
167
|
-
{
|
168
|
-
_react2.default.createElement(
|
141
|
+
'div',
|
142
|
+
{ style: { textAlign: 'right' } },
|
143
|
+
_react2.default.createElement(_HiColoredLabel2.default, {
|
144
|
+
label: scoreLabel,
|
145
|
+
color: this.getColorFromFraudResult(fraudResult.toLowerCase()),
|
146
|
+
classes: { root: classes.label },
|
147
|
+
active: pendingManualAction
|
148
|
+
}),
|
149
|
+
!hideFraudResult && _react2.default.createElement(_HiColoredLabel2.default, {
|
150
|
+
label: fraudResult.toUpperCase().substr(0, 1),
|
151
|
+
color: this.getColorFromFraudResult(fraudResult),
|
152
|
+
classes: { root: classes.label },
|
153
|
+
active: pendingManualAction
|
154
|
+
}),
|
155
|
+
!!smartDecision && _react2.default.createElement(
|
169
156
|
'div',
|
170
|
-
{
|
171
|
-
_react2.default.createElement(_HiColoredLabel2.default, {
|
172
|
-
label:
|
173
|
-
color: this.getColorFromFraudResult(
|
174
|
-
classes: { root: classes.label },
|
175
|
-
active: pendingManualAction
|
176
|
-
}),
|
177
|
-
!hideFraudResult && _react2.default.createElement(_HiColoredLabel2.default, {
|
178
|
-
label: fraudResult.toUpperCase().substr(0, 1),
|
179
|
-
color: this.getColorFromFraudResult(fraudResult),
|
180
|
-
classes: { root: classes.label },
|
157
|
+
{ className: classes.smartDecision },
|
158
|
+
automaticFraudReviewResult && _react2.default.createElement(_HiColoredLabel2.default, {
|
159
|
+
label: automaticFraudReviewResult.toUpperCase().substr(0, 1),
|
160
|
+
color: this.getColorFromFraudResult(automaticFraudReviewResult),
|
181
161
|
active: pendingManualAction
|
182
|
-
})
|
183
|
-
!!smartDecision && _react2.default.createElement(
|
184
|
-
'div',
|
185
|
-
{ className: classes.smartDecision },
|
186
|
-
automaticFraudReviewResult && _react2.default.createElement(_HiColoredLabel2.default, {
|
187
|
-
label: automaticFraudReviewResult.toUpperCase().substr(0, 1),
|
188
|
-
color: this.getColorFromFraudResult(automaticFraudReviewResult),
|
189
|
-
active: pendingManualAction
|
190
|
-
})
|
191
|
-
)
|
162
|
+
})
|
192
163
|
)
|
193
164
|
);
|
194
165
|
}
|
@@ -47,10 +47,6 @@ var _HiPins2 = _interopRequireDefault(_HiPins);
|
|
47
47
|
|
48
48
|
var _styles = require('../../styles');
|
49
49
|
|
50
|
-
var _Tooltip = require('../../Tooltip');
|
51
|
-
|
52
|
-
var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
53
|
-
|
54
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
55
51
|
|
56
52
|
var styles = exports.styles = function styles(theme) {
|
@@ -95,22 +91,18 @@ var CellStatus = function (_React$Component) {
|
|
95
91
|
var color = typeof theme.palette.status[code] !== 'undefined' ? theme.palette.status[code] : theme.palette.neutral.normal;
|
96
92
|
|
97
93
|
return _react2.default.createElement(
|
98
|
-
|
99
|
-
|
100
|
-
_react2.default.createElement(
|
94
|
+
'div',
|
95
|
+
null,
|
96
|
+
nbOperations > 0 ? _react2.default.createElement(
|
101
97
|
'div',
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
nbOperations
|
111
|
-
)
|
112
|
-
) : _react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color })
|
113
|
-
)
|
98
|
+
{ className: classes.labelDiv },
|
99
|
+
_react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color }),
|
100
|
+
_react2.default.createElement(
|
101
|
+
_HiPins2.default,
|
102
|
+
{ color: color, onClick: onOpenDetails, className: classes.pins },
|
103
|
+
nbOperations
|
104
|
+
)
|
105
|
+
) : _react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color })
|
114
106
|
);
|
115
107
|
}
|
116
108
|
}]);
|
@@ -41,10 +41,6 @@ var _propTypes = require('prop-types');
|
|
41
41
|
|
42
42
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
43
43
|
|
44
|
-
var _Tooltip = require('../../Tooltip');
|
45
|
-
|
46
|
-
var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
47
|
-
|
48
44
|
var _withStyles = require('../../styles/withStyles');
|
49
45
|
|
50
46
|
var _withStyles2 = _interopRequireDefault(_withStyles);
|
@@ -126,7 +122,7 @@ var CellText = function (_React$Component) {
|
|
126
122
|
* Calcul l'espace disponible dans la cellule en plus du premier mot
|
127
123
|
* si il reste de l'espace, définit la largeur du span pour le reste du texte
|
128
124
|
*/
|
129
|
-
if (this.props.ellipsis === cst.ELLIPSIS_AFTER_FIRST_WORD) {
|
125
|
+
if (this.props.ellipsis === cst.ELLIPSIS_AFTER_FIRST_WORD || this.props.ellipsis === cst.ELLIPSIS_NAME) {
|
130
126
|
if (this.cellText !== null) {
|
131
127
|
var _cellText$getElements = this.cellText.getElementsByTagName('span'),
|
132
128
|
_cellText$getElements2 = (0, _slicedToArray3.default)(_cellText$getElements, 2),
|
@@ -189,6 +185,7 @@ var CellText = function (_React$Component) {
|
|
189
185
|
var valueString = value.toString();
|
190
186
|
|
191
187
|
switch (ellipsis) {
|
188
|
+
case cst.ELLIPSIS_NAME:
|
192
189
|
case cst.ELLIPSIS_AFTER_FIRST_WORD:
|
193
190
|
// Split value in 2 strings around first whitespace
|
194
191
|
start = valueString.substr(0, valueString.indexOf(' '));
|
@@ -275,11 +272,7 @@ var CellText = function (_React$Component) {
|
|
275
272
|
break;
|
276
273
|
}
|
277
274
|
|
278
|
-
return
|
279
|
-
_Tooltip2.default,
|
280
|
-
{ title: value, placement: this.props.sticky ? 'right' : 'bottom' },
|
281
|
-
valueElement
|
282
|
-
);
|
275
|
+
return valueElement;
|
283
276
|
}
|
284
277
|
}]);
|
285
278
|
return CellText;
|
@@ -39,14 +39,11 @@ var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
39
39
|
|
40
40
|
var _mdiMaterialUi = require('mdi-material-ui');
|
41
41
|
|
42
|
-
var _Tooltip = require('../../Tooltip');
|
43
|
-
|
44
|
-
var _Tooltip2 = _interopRequireDefault(_Tooltip);
|
45
|
-
|
46
42
|
var _styles = require('../../styles');
|
47
43
|
|
48
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
49
45
|
|
46
|
+
// @inheritedComponent CellLayout
|
50
47
|
var styles = exports.styles = {
|
51
48
|
icon: {
|
52
49
|
width: 18,
|
@@ -60,7 +57,6 @@ var styles = exports.styles = {
|
|
60
57
|
/**
|
61
58
|
* Cette cellule permet d'afficher une icône représentant le statut du 3DS.
|
62
59
|
*/
|
63
|
-
// @inheritedComponent CellLayout
|
64
60
|
|
65
61
|
var CellThirdPartySecurity = function (_React$Component) {
|
66
62
|
(0, _inherits3.default)(CellThirdPartySecurity, _React$Component);
|
@@ -124,20 +120,10 @@ var CellThirdPartySecurity = function (_React$Component) {
|
|
124
120
|
break;
|
125
121
|
}
|
126
122
|
|
127
|
-
var tooltipContent = _react2.default.createElement(
|
128
|
-
'div',
|
129
|
-
{ className: classes.nowrap },
|
130
|
-
label
|
131
|
-
);
|
132
|
-
|
133
123
|
return _react2.default.createElement(
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
'div',
|
138
|
-
null,
|
139
|
-
icon
|
140
|
-
)
|
124
|
+
'div',
|
125
|
+
null,
|
126
|
+
icon
|
141
127
|
);
|
142
128
|
}
|
143
129
|
}]);
|
@@ -22,15 +22,6 @@ Object.defineProperty(exports, 'CellAccount', {
|
|
22
22
|
}
|
23
23
|
});
|
24
24
|
|
25
|
-
var _CellAccountNumber = require('./CellAccountNumber');
|
26
|
-
|
27
|
-
Object.defineProperty(exports, 'CellAccountNumber', {
|
28
|
-
enumerable: true,
|
29
|
-
get: function get() {
|
30
|
-
return _interopRequireDefault(_CellAccountNumber).default;
|
31
|
-
}
|
32
|
-
});
|
33
|
-
|
34
25
|
var _CellAddress = require('./CellAddress');
|
35
26
|
|
36
27
|
Object.defineProperty(exports, 'CellAddress', {
|
package/HiTable/BodyRow.js
CHANGED
@@ -9,10 +9,6 @@ var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
|
9
9
|
|
10
10
|
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11
11
|
|
12
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
13
|
-
|
14
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
15
|
-
|
16
12
|
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
17
13
|
|
18
14
|
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
@@ -21,6 +17,10 @@ var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
21
17
|
|
22
18
|
var _stringify2 = _interopRequireDefault(_stringify);
|
23
19
|
|
20
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
21
|
+
|
22
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
23
|
+
|
24
24
|
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
25
25
|
|
26
26
|
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
@@ -74,9 +74,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
74
74
|
// @inheritedComponent BodyCellBuilder
|
75
75
|
var styles = exports.styles = function styles(theme) {
|
76
76
|
return {
|
77
|
-
|
77
|
+
root: {
|
78
78
|
backgroundColor: theme.palette.background3
|
79
79
|
},
|
80
|
+
rootSelected: {
|
81
|
+
backgroundColor: theme.palette.background1
|
82
|
+
},
|
80
83
|
hover: {
|
81
84
|
'&:hover': {
|
82
85
|
backgroundColor: theme.palette.hover,
|
@@ -124,10 +127,10 @@ var BodyRow = function (_React$Component) {
|
|
124
127
|
|
125
128
|
_this.state = {
|
126
129
|
live: props.live,
|
127
|
-
style: {
|
128
|
-
backgroundColor:
|
129
|
-
transition:
|
130
|
-
}
|
130
|
+
style: (0, _extends3.default)({}, props.live && {
|
131
|
+
backgroundColor: (0, _colorManipulator.fade)(props.theme.palette.business.primary.normal, 0.08),
|
132
|
+
transition: 'background-color 2s'
|
133
|
+
})
|
131
134
|
};
|
132
135
|
|
133
136
|
_this.handleClick = _this.handleClick.bind(_this);
|
@@ -148,10 +151,7 @@ var BodyRow = function (_React$Component) {
|
|
148
151
|
if (this.state.live) {
|
149
152
|
this.setState({
|
150
153
|
live: false,
|
151
|
-
style: {
|
152
|
-
backgroundColor: this.props.theme.palette.background3,
|
153
|
-
transition: 'background-color 2s'
|
154
|
-
}
|
154
|
+
style: {}
|
155
155
|
});
|
156
156
|
}
|
157
157
|
}
|
@@ -164,10 +164,7 @@ var BodyRow = function (_React$Component) {
|
|
164
164
|
if (prevState.live === true && this.state.live === false) {
|
165
165
|
setTimeout(function () {
|
166
166
|
_this2.setState({
|
167
|
-
style: {
|
168
|
-
backgroundColor: _this2.props.theme.palette.background3,
|
169
|
-
transition: 'none'
|
170
|
-
}
|
167
|
+
style: {}
|
171
168
|
});
|
172
169
|
}, 2500);
|
173
170
|
}
|
@@ -240,6 +237,7 @@ var BodyRow = function (_React$Component) {
|
|
240
237
|
return _react2.default.createElement(
|
241
238
|
_Table.TableRow,
|
242
239
|
{
|
240
|
+
className: classes.root,
|
243
241
|
classes: { selected: classes.rootSelected, hover: classes.hover },
|
244
242
|
onClick: this.handleClick,
|
245
243
|
hover: true,
|
package/HiTable/HiTable.js
CHANGED
@@ -199,16 +199,18 @@ var HiTable = function (_React$Component) {
|
|
199
199
|
_this.groupByRowsPositions = [];
|
200
200
|
|
201
201
|
_this.updateFloatingBodyElementRefs = function () {
|
202
|
-
|
202
|
+
if (_this.tBody) {
|
203
|
+
_this.tBodyScrollbarWidth = _this.tBody.offsetWidth - _this.tBody.clientWidth;
|
203
204
|
|
204
|
-
|
205
|
-
|
206
|
-
|
205
|
+
if (_this.tHead && _this.tBodyScrollbarWidth > 0) {
|
206
|
+
_this.tHead.style.width = 'calc(100% - ' + _this.tBodyScrollbarWidth + 'px)';
|
207
|
+
}
|
207
208
|
|
208
|
-
|
209
|
-
|
209
|
+
_this.tBodyLeftPaddingElements = _this.tBody.querySelectorAll('tr td:nth-child(1), .floating-parent-row-label');
|
210
|
+
_this.tBodyRightPaddingElements = _this.tBody.querySelectorAll('tr td:nth-last-child(1), .floating-parent-row-indicator');
|
210
211
|
|
211
|
-
|
212
|
+
_this.tBodyFirstElements = _this.tBody.querySelectorAll('tr td:nth-child(2)');
|
213
|
+
}
|
212
214
|
};
|
213
215
|
|
214
216
|
_this.addNewRowRefs = function () {
|
@@ -326,8 +328,9 @@ var HiTable = function (_React$Component) {
|
|
326
328
|
this.handleStickyRowPositions();
|
327
329
|
}
|
328
330
|
}
|
329
|
-
|
330
|
-
|
331
|
+
if (this.tBody) {
|
332
|
+
this.isScrollToBottom(this.scrollTop === this.tBody.scrollHeight - this.tBody.offsetHeight);
|
333
|
+
}
|
331
334
|
|
332
335
|
this.placeHorizontalFloatingElement();
|
333
336
|
}
|
@@ -343,11 +346,13 @@ var HiTable = function (_React$Component) {
|
|
343
346
|
this.groupByRowsPositions = [];
|
344
347
|
// Initialize new stickyRows position
|
345
348
|
var tableBody = document.getElementById(this.props.tabId + '-body');
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
349
|
+
if (tableBody) {
|
350
|
+
var stickyRows = tableBody.getElementsByClassName('stickyGroupBy');
|
351
|
+
if (stickyRows.length > 0) {
|
352
|
+
Array.prototype.filter.call(stickyRows, function (stickyRow) {
|
353
|
+
_this2.groupByRowsPositions.push(stickyRow.nextSibling.nextSibling.offsetTop - rowHeight);
|
354
|
+
});
|
355
|
+
}
|
351
356
|
}
|
352
357
|
}
|
353
358
|
}, {
|
@@ -465,8 +470,9 @@ var HiTable = function (_React$Component) {
|
|
465
470
|
}
|
466
471
|
|
467
472
|
this.handleStickyRowPositions();
|
468
|
-
|
469
|
-
|
473
|
+
if (this.tBody) {
|
474
|
+
this.isScrollToBottom(this.scrollTop === event.target.scrollHeight - this.tBody.offsetHeight);
|
475
|
+
}
|
470
476
|
}
|
471
477
|
}, {
|
472
478
|
key: 'handleStickyRowPositions',
|
@@ -474,7 +480,7 @@ var HiTable = function (_React$Component) {
|
|
474
480
|
var _this3 = this;
|
475
481
|
|
476
482
|
var tableBody = document.getElementById(this.props.tabId + '-body');
|
477
|
-
var stickyRows = tableBody.getElementsByClassName('stickyGroupBy');
|
483
|
+
var stickyRows = tableBody ? tableBody.getElementsByClassName('stickyGroupBy') : [];
|
478
484
|
var rowHeight = this.props.dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT;
|
479
485
|
if (stickyRows.length > 0) {
|
480
486
|
Array.prototype.filter.call(stickyRows, function (stickyRow, index) {
|
@@ -571,7 +577,7 @@ var HiTable = function (_React$Component) {
|
|
571
577
|
|
572
578
|
// Replace stickyRowContent
|
573
579
|
var tableBody = document.getElementById(this.props.tabId + '-body');
|
574
|
-
var stickyRowContentDiv = tableBody.getElementsByClassName('stickyRowContent');
|
580
|
+
var stickyRowContentDiv = tableBody ? tableBody.getElementsByClassName('stickyRowContent') : [];
|
575
581
|
if (stickyRowContentDiv.length > 0) {
|
576
582
|
Array.prototype.filter.call(stickyRowContentDiv, function (div) {
|
577
583
|
div.style.left = _this4.wrapperDiv.scrollLeft + (_this4.props.selectable ? 25 : 0) + 'px';
|
@@ -596,7 +602,9 @@ var HiTable = function (_React$Component) {
|
|
596
602
|
this.backToTopButton['style'].top = -99999 + 'px';
|
597
603
|
|
598
604
|
// Set scroll top to 0
|
599
|
-
this.tBody
|
605
|
+
if (this.tBody) {
|
606
|
+
this.tBody.scrollTop = 0;
|
607
|
+
}
|
600
608
|
this.scrollTop = 0;
|
601
609
|
}
|
602
610
|
}, {
|
@@ -676,7 +684,8 @@ var HiTable = function (_React$Component) {
|
|
676
684
|
fixedColumnWidth = _props.fixedColumnWidth,
|
677
685
|
disableContextMenu = _props.disableContextMenu,
|
678
686
|
footerContent = _props.footerContent,
|
679
|
-
detailRowsOptions = _props.detailRowsOptions
|
687
|
+
detailRowsOptions = _props.detailRowsOptions,
|
688
|
+
noResultsContent = _props.noResultsContent;
|
680
689
|
var _state = this.state,
|
681
690
|
dateUpdate = _state.dateUpdate,
|
682
691
|
isScrollToBottom = _state.isScrollToBottom;
|
@@ -735,7 +744,7 @@ var HiTable = function (_React$Component) {
|
|
735
744
|
lookupColumns: lookupColumns,
|
736
745
|
fixedColumnWidth: fixedColumnWidth
|
737
746
|
}),
|
738
|
-
_react2.default.createElement(_HiTableBody2.default, {
|
747
|
+
dataSource.length > 0 && _react2.default.createElement(_HiTableBody2.default, {
|
739
748
|
tabId: tabId,
|
740
749
|
columns: columns,
|
741
750
|
orderedColumns: orderedColumns,
|
@@ -763,7 +772,7 @@ var HiTable = function (_React$Component) {
|
|
763
772
|
disableContextMenu: disableContextMenu,
|
764
773
|
detailRowsOptions: detailRowsOptions
|
765
774
|
}),
|
766
|
-
infiniteScroll && _react2.default.createElement(_HiTableFooterScroll2.default, {
|
775
|
+
dataSource.length > 0 && infiniteScroll && _react2.default.createElement(_HiTableFooterScroll2.default, {
|
767
776
|
tabId: tabId,
|
768
777
|
hasNextDatas: hasNextDatas,
|
769
778
|
requestNextDatas: requestNextDatas,
|
@@ -771,7 +780,7 @@ var HiTable = function (_React$Component) {
|
|
771
780
|
isScrollToBottom: isScrollToBottom,
|
772
781
|
translations: translations.tableFooterScroll
|
773
782
|
}),
|
774
|
-
!infiniteScroll && footerContent && _react2.default.createElement(
|
783
|
+
dataSource.length > 0 && !infiniteScroll && footerContent && _react2.default.createElement(
|
775
784
|
_HiTableFooter2.default,
|
776
785
|
{
|
777
786
|
nbColumnsDisplayed: nbColumnsDisplayed,
|
@@ -804,7 +813,8 @@ var HiTable = function (_React$Component) {
|
|
804
813
|
_react2.default.createElement(_ArrowUp2.default, { className: classes.backToTopButtonArrow })
|
805
814
|
)
|
806
815
|
)
|
807
|
-
)
|
816
|
+
),
|
817
|
+
dataSource.length === 0 && noResultsContent && noResultsContent
|
808
818
|
);
|
809
819
|
}
|
810
820
|
}]);
|
@@ -833,7 +843,8 @@ HiTable.defaultProps = {
|
|
833
843
|
lookupColumns: [],
|
834
844
|
loading: false,
|
835
845
|
fixedColumnWidth: true,
|
836
|
-
disableContextMenu: true
|
846
|
+
disableContextMenu: true,
|
847
|
+
noResultsContent: null
|
837
848
|
};
|
838
849
|
HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
839
850
|
/**
|
@@ -1022,6 +1033,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1022
1033
|
* Taille du tableau (L/M/S),
|
1023
1034
|
* définit l'espace entre les cellules et leurs tailles par default
|
1024
1035
|
*/
|
1025
|
-
view: _propTypes2.default.oneOf(['l', 'm', 's'])
|
1036
|
+
view: _propTypes2.default.oneOf(['l', 'm', 's']),
|
1037
|
+
/**
|
1038
|
+
* No results content.
|
1039
|
+
*/
|
1040
|
+
noResultsContent: _propTypes2.default.object
|
1026
1041
|
} : {};
|
1027
1042
|
exports.default = (0, _styles.withStyles)(styles, { withTheme: true, name: 'HmuiHiTable' })(HiTable);
|
package/HiTable/HiTableBody.js
CHANGED
@@ -539,7 +539,8 @@ HiTableBody.defaultProps = {
|
|
539
539
|
view: 'l',
|
540
540
|
loading: false,
|
541
541
|
disableContextMenu: true,
|
542
|
-
detailRowsOptions: {}
|
542
|
+
detailRowsOptions: {},
|
543
|
+
noResultsContent: null
|
543
544
|
};
|
544
545
|
HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
|
545
546
|
/**
|
@@ -54,13 +54,14 @@ var styles = exports.styles = function styles(theme) {
|
|
54
54
|
contextMenu: {
|
55
55
|
zIndex: 9999,
|
56
56
|
backgroundColor: theme.palette.background3,
|
57
|
-
boxShadow: '0px 2px 2px rgba(100, 100, 100, 0.5)'
|
57
|
+
boxShadow: '0px 2px 2px rgba(100, 100, 100, 0.5)',
|
58
|
+
textAlign: 'left'
|
58
59
|
},
|
59
60
|
contextMenuItem: (0, _extends3.default)({}, theme.typography.body1, {
|
60
61
|
height: 40,
|
61
62
|
width: 300,
|
62
63
|
cursor: 'pointer',
|
63
|
-
padding:
|
64
|
+
padding: 10,
|
64
65
|
color: theme.palette.neutral.dark,
|
65
66
|
'&:hover': {
|
66
67
|
backgroundColor: theme.palette.hover,
|
@@ -192,7 +193,7 @@ HiTableContextMenu.defaultProps = {
|
|
192
193
|
copy: 'Copy',
|
193
194
|
exclude: 'Exclude "%s"',
|
194
195
|
lookUp: 'Look up "%s"',
|
195
|
-
openInNewTab: 'Open
|
196
|
+
openInNewTab: 'Open in new tab'
|
196
197
|
}
|
197
198
|
};
|
198
199
|
HiTableContextMenu.propTypes = process.env.NODE_ENV !== "production" ? {
|
package/HiTable/HiTableFooter.js
CHANGED
@@ -5,10 +5,6 @@ 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
|
-
|
12
8
|
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
13
9
|
|
14
10
|
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
@@ -83,8 +79,11 @@ var HiTableFooter = function (_React$Component) {
|
|
83
79
|
|
84
80
|
(0, _createClass3.default)(HiTableFooter, [{
|
85
81
|
key: 'shouldComponentUpdate',
|
86
|
-
|
87
|
-
|
82
|
+
|
83
|
+
|
84
|
+
// Table footer never need to be updated
|
85
|
+
value: function shouldComponentUpdate() {
|
86
|
+
return false;
|
88
87
|
}
|
89
88
|
}, {
|
90
89
|
key: 'render',
|
package/HiTable/constants.js
CHANGED
@@ -85,7 +85,7 @@ var FRAUD_RESULT_ASK_AUTHENTICATE = exports.FRAUD_RESULT_ASK_AUTHENTICATE = 'ASK
|
|
85
85
|
* Cell default width for each views
|
86
86
|
* @type {{}}
|
87
87
|
*/
|
88
|
-
var DEFAULT_WIDTHS = exports.DEFAULT_WIDTHS = (_DEFAULT_WIDTHS = {}, (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ACCOUNT, (_TYPE_ACCOUNT = {}, (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.LARGE, 160), (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.MEDIUM, 120), (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.SMALL, 80), _TYPE_ACCOUNT)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ACCOUNT_NUMBER, (_TYPE_ACCOUNT_NUMBER = {}, (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.LARGE, 100), (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.MEDIUM, 80), (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.SMALL, 60), _TYPE_ACCOUNT_NUMBER)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ADDRESS, (_TYPE_ADDRESS = {}, (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.SMALL, 80), _TYPE_ADDRESS)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_CHECKBOX, (_TYPE_CHECKBOX = {}, (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.LARGE, 40), (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.MEDIUM, 40), (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.SMALL, 40), _TYPE_CHECKBOX)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_COUNTRY, (_TYPE_COUNTRY = {}, (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.MEDIUM, 80), (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.SMALL, 40), _TYPE_COUNTRY)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_DATE, (_TYPE_DATE = {}, (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.LARGE, 220), (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.MEDIUM, 140), (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.SMALL, 120), _TYPE_DATE)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ICON, (_TYPE_ICON = {}, (0, _defineProperty3.default)(_TYPE_ICON, VIEWS.LARGE,
|
88
|
+
var DEFAULT_WIDTHS = exports.DEFAULT_WIDTHS = (_DEFAULT_WIDTHS = {}, (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ACCOUNT, (_TYPE_ACCOUNT = {}, (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.LARGE, 160), (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.MEDIUM, 120), (0, _defineProperty3.default)(_TYPE_ACCOUNT, VIEWS.SMALL, 80), _TYPE_ACCOUNT)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ACCOUNT_NUMBER, (_TYPE_ACCOUNT_NUMBER = {}, (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.LARGE, 100), (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.MEDIUM, 80), (0, _defineProperty3.default)(_TYPE_ACCOUNT_NUMBER, VIEWS.SMALL, 60), _TYPE_ACCOUNT_NUMBER)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ADDRESS, (_TYPE_ADDRESS = {}, (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_ADDRESS, VIEWS.SMALL, 80), _TYPE_ADDRESS)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_CHECKBOX, (_TYPE_CHECKBOX = {}, (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.LARGE, 40), (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.MEDIUM, 40), (0, _defineProperty3.default)(_TYPE_CHECKBOX, VIEWS.SMALL, 40), _TYPE_CHECKBOX)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_COUNTRY, (_TYPE_COUNTRY = {}, (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.MEDIUM, 80), (0, _defineProperty3.default)(_TYPE_COUNTRY, VIEWS.SMALL, 40), _TYPE_COUNTRY)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_DATE, (_TYPE_DATE = {}, (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.LARGE, 220), (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.MEDIUM, 140), (0, _defineProperty3.default)(_TYPE_DATE, VIEWS.SMALL, 120), _TYPE_DATE)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_ICON, (_TYPE_ICON = {}, (0, _defineProperty3.default)(_TYPE_ICON, VIEWS.LARGE, 140), (0, _defineProperty3.default)(_TYPE_ICON, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_ICON, VIEWS.SMALL, 60), _TYPE_ICON)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_IMAGE, (_TYPE_IMAGE = {}, (0, _defineProperty3.default)(_TYPE_IMAGE, VIEWS.LARGE, 140), (0, _defineProperty3.default)(_TYPE_IMAGE, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_IMAGE, VIEWS.SMALL, 60), _TYPE_IMAGE)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_NUMERIC, (_TYPE_NUMERIC = {}, (0, _defineProperty3.default)(_TYPE_NUMERIC, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_NUMERIC, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_NUMERIC, VIEWS.SMALL, 80), _TYPE_NUMERIC)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_RATE, (_TYPE_RATE = {}, (0, _defineProperty3.default)(_TYPE_RATE, VIEWS.LARGE, 100), (0, _defineProperty3.default)(_TYPE_RATE, VIEWS.MEDIUM, 90), (0, _defineProperty3.default)(_TYPE_RATE, VIEWS.SMALL, 80), _TYPE_RATE)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_SENTINEL, (_TYPE_SENTINEL = {}, (0, _defineProperty3.default)(_TYPE_SENTINEL, VIEWS.LARGE, 80), (0, _defineProperty3.default)(_TYPE_SENTINEL, VIEWS.MEDIUM, 80), (0, _defineProperty3.default)(_TYPE_SENTINEL, VIEWS.SMALL, 80), _TYPE_SENTINEL)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_STATUS, (_TYPE_STATUS = {}, (0, _defineProperty3.default)(_TYPE_STATUS, VIEWS.LARGE, 120), (0, _defineProperty3.default)(_TYPE_STATUS, VIEWS.MEDIUM, 100), (0, _defineProperty3.default)(_TYPE_STATUS, VIEWS.SMALL, 80), _TYPE_STATUS)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_TEXT, (_TYPE_TEXT = {}, (0, _defineProperty3.default)(_TYPE_TEXT, VIEWS.LARGE, 200), (0, _defineProperty3.default)(_TYPE_TEXT, VIEWS.MEDIUM, 120), (0, _defineProperty3.default)(_TYPE_TEXT, VIEWS.SMALL, 80), _TYPE_TEXT)), (0, _defineProperty3.default)(_DEFAULT_WIDTHS, TYPE_THIRD_PARTY_SECURITY, (_TYPE_THIRD_PARTY_SEC = {}, (0, _defineProperty3.default)(_TYPE_THIRD_PARTY_SEC, VIEWS.LARGE, 40), (0, _defineProperty3.default)(_TYPE_THIRD_PARTY_SEC, VIEWS.MEDIUM, 40), (0, _defineProperty3.default)(_TYPE_THIRD_PARTY_SEC, VIEWS.SMALL, 40), _TYPE_THIRD_PARTY_SEC)), _DEFAULT_WIDTHS);
|
89
89
|
/**
|
90
90
|
* Cell default width for each views
|
91
91
|
* @type {{}}
|
@@ -96,7 +96,7 @@ var DEFAULT_VIEWS = exports.DEFAULT_VIEWS = (_DEFAULT_VIEWS = {}, (0, _definePro
|
|
96
96
|
* Cell default side padding (one side) for each views
|
97
97
|
* @type {{}}
|
98
98
|
*/
|
99
|
-
var DEFAULT_PADDING = exports.DEFAULT_PADDING = (_DEFAULT_PADDING = {}, (0, _defineProperty3.default)(_DEFAULT_PADDING, VIEWS.LARGE,
|
99
|
+
var DEFAULT_PADDING = exports.DEFAULT_PADDING = (_DEFAULT_PADDING = {}, (0, _defineProperty3.default)(_DEFAULT_PADDING, VIEWS.LARGE, 8), (0, _defineProperty3.default)(_DEFAULT_PADDING, VIEWS.MEDIUM, 8), (0, _defineProperty3.default)(_DEFAULT_PADDING, VIEWS.SMALL, 8), _DEFAULT_PADDING);
|
100
100
|
|
101
101
|
/**
|
102
102
|
* Cell types which are align right by default
|
@@ -17,17 +17,20 @@ export const styles = theme => ({
|
|
17
17
|
marginLeft: 12
|
18
18
|
},
|
19
19
|
checked: {
|
20
|
-
color: theme.palette.business.primary.normal
|
20
|
+
color: theme.palette.business.primary.normal,
|
21
|
+
'&$disabled': {
|
22
|
+
color: '#999999'
|
23
|
+
}
|
21
24
|
},
|
22
25
|
disabled: {
|
23
|
-
color: theme.palette.
|
26
|
+
color: theme.palette.placeholder
|
24
27
|
}
|
25
28
|
});
|
26
29
|
|
27
30
|
class HiCheckbox extends React.Component {
|
28
31
|
|
29
32
|
constructor(props) {
|
30
|
-
super();
|
33
|
+
super(props);
|
31
34
|
|
32
35
|
this.handleChange = this.handleChange.bind(this);
|
33
36
|
}
|
@@ -6,10 +6,10 @@ import { getContrastedTextColor, fade } from '../styles/colorManipulator';
|
|
6
6
|
|
7
7
|
export const styles = theme => ({
|
8
8
|
root: {
|
9
|
-
display: 'inline-
|
9
|
+
display: 'inline-block',
|
10
10
|
alignItems: 'baseline',
|
11
11
|
maxWidth: '100%',
|
12
|
-
padding: '2px
|
12
|
+
padding: '2px 8px',
|
13
13
|
borderRadius: 2,
|
14
14
|
textOverflow: 'ellipsis',
|
15
15
|
overflow: 'hidden',
|