@hipay/hipay-material-ui 1.0.0-beta.23 → 1.0.0-beta.26
Sign up to get free protection for your applications and to get access to all the features.
- package/HI-CHANGELOG.md +58 -39
- package/HiChip/HiChip.js +67 -8
- package/HiDatePicker/HiDateRangePicker.js +27 -13
- package/HiDatePicker/HiDateRangeSelector.js +13 -2
- package/HiForm/HiInput.js +1 -0
- package/HiForm/HiPasswordField.js +2 -2
- package/HiPins/HiPins.js +6 -4
- package/HiSelect/HiSelect.js +28 -20
- package/HiSelect/SelectInput.js +3 -8
- package/HiSelectableList/HiSelectableList.js +51 -49
- package/HiSelectableList/HiSelectableListItem.js +7 -5
- package/HiTable/BodyCellBuilder.js +25 -14
- package/HiTable/BodyCells/CellAccount.js +13 -15
- package/HiTable/BodyCells/CellAccountNumber.js +12 -3
- package/HiTable/BodyCells/CellAddress.js +12 -3
- package/HiTable/BodyCells/CellCountry.js +12 -3
- package/HiTable/BodyCells/CellDate.js +56 -52
- package/HiTable/BodyCells/CellIcon.js +12 -3
- package/HiTable/BodyCells/CellImage.js +12 -3
- package/HiTable/BodyCells/CellNumeric.js +12 -3
- package/HiTable/BodyCells/CellRate.js +12 -3
- package/HiTable/BodyCells/CellSentinel.js +17 -7
- package/HiTable/BodyCells/CellStatus.js +12 -3
- package/HiTable/BodyCells/CellText.js +75 -37
- package/HiTable/BodyCells/CellThirdPartySecurity.js +12 -3
- package/HiTable/BodyRow.js +12 -3
- package/HiTable/ColumnFilter.js +1 -4
- package/HiTable/HeaderCell.js +21 -11
- package/HiTable/HiStickyRow.js +27 -16
- package/HiTable/HiTable.js +30 -69
- package/HiTable/HiTableBody.js +99 -29
- package/HiTable/HiTableContextMenu.js +31 -16
- package/HiTable/HiTableFooter.js +9 -0
- package/HiTable/HiTableHead.js +15 -7
- package/HiTopBar/HiTopBar.js +6 -0
- package/README.md +72 -6
- package/es/HiChip/HiChip.js +81 -9
- package/es/HiDatePicker/HiDateRangePicker.js +25 -12
- package/es/HiDatePicker/HiDateRangeSelector.js +12 -2
- package/es/HiForm/HiInput.js +1 -0
- package/es/HiForm/HiPasswordField.js +2 -2
- package/es/HiPins/HiPins.js +4 -4
- package/es/HiSelect/HiSelect.js +25 -16
- package/es/HiSelect/SelectInput.js +3 -8
- package/es/HiSelectableList/HiSelectableList.js +51 -49
- package/es/HiSelectableList/HiSelectableListItem.js +7 -5
- package/es/HiTable/BodyCellBuilder.js +11 -4
- package/es/HiTable/BodyCells/CellAccount.js +7 -5
- package/es/HiTable/BodyCells/CellAccountNumber.js +6 -1
- package/es/HiTable/BodyCells/CellAddress.js +6 -1
- package/es/HiTable/BodyCells/CellCountry.js +6 -1
- package/es/HiTable/BodyCells/CellDate.js +35 -40
- package/es/HiTable/BodyCells/CellIcon.js +6 -1
- package/es/HiTable/BodyCells/CellImage.js +6 -1
- package/es/HiTable/BodyCells/CellNumeric.js +6 -1
- package/es/HiTable/BodyCells/CellRate.js +6 -1
- package/es/HiTable/BodyCells/CellSentinel.js +6 -1
- package/es/HiTable/BodyCells/CellStatus.js +6 -1
- package/es/HiTable/BodyCells/CellText.js +50 -20
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +6 -1
- package/es/HiTable/BodyRow.js +7 -2
- package/es/HiTable/ColumnFilter.js +1 -4
- package/es/HiTable/HeaderCell.js +16 -9
- package/es/HiTable/HiStickyRow.js +21 -14
- package/es/HiTable/HiTable.js +4 -40
- package/es/HiTable/HiTableBody.js +78 -26
- package/es/HiTable/HiTableContextMenu.js +28 -16
- package/es/HiTable/HiTableFooter.js +5 -0
- package/es/HiTable/HiTableHead.js +11 -6
- package/es/HiTopBar/HiTopBar.js +5 -0
- package/es/svg-icons/Cancel.js +2 -0
- package/es/svg-icons/HiBriefcaseRescue.js +15 -0
- package/es/svg-icons/index.js +2 -1
- package/es/utils/HiIconBuilder.js +6 -2
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +7 -1
- package/svg-icons/Cancel.js +2 -0
- package/svg-icons/HiBriefcaseRescue.js +30 -0
- package/svg-icons/index.js +9 -0
- package/umd/hipay-material-ui.development.js +110915 -119592
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/HiIconBuilder.js +6 -2
@@ -14,7 +14,8 @@ export const styles = theme => ({
|
|
14
14
|
width: '100%',
|
15
15
|
height: 40,
|
16
16
|
maxWidth: 500,
|
17
|
-
|
17
|
+
display: 'flex',
|
18
|
+
justifyContent: 'center',
|
18
19
|
padding: 8,
|
19
20
|
cursor: 'pointer'
|
20
21
|
},
|
@@ -89,18 +90,12 @@ export const styles = theme => ({
|
|
89
90
|
label: _extends({
|
90
91
|
whiteSpace: 'nowrap',
|
91
92
|
overflow: 'hidden',
|
92
|
-
textOverflow: 'ellipsis'
|
93
|
-
paddingRight: 16
|
93
|
+
textOverflow: 'ellipsis'
|
94
94
|
}, theme.typography.body1, {
|
95
95
|
display: 'inline-flex',
|
96
96
|
width: '100%'
|
97
97
|
}),
|
98
98
|
icon: {
|
99
|
-
position: 'absolute',
|
100
|
-
display: 'flex',
|
101
|
-
alignItems: 'center',
|
102
|
-
right: 0,
|
103
|
-
height: 40,
|
104
99
|
transition: theme.transitions.create(['opacity', 'transform'], {
|
105
100
|
duration: theme.transitions.duration.shorter
|
106
101
|
})
|
@@ -51,59 +51,61 @@ class HiSelectableList extends React.PureComponent {
|
|
51
51
|
List,
|
52
52
|
{ className: classes.root, onKeyDown: this.props.onKeyDown },
|
53
53
|
itemList.map(item => {
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
parents.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
54
|
+
if (item.displayed !== false) {
|
55
|
+
/**
|
56
|
+
* Calcul du level de l'item
|
57
|
+
*/
|
58
|
+
if (hierarchic) {
|
59
|
+
// On stocke l'id des parents dans un tableau
|
60
|
+
if (item.parentId && !parents.includes(item.parentId)) {
|
61
|
+
parents.push(item.parentId);
|
62
|
+
} else if (item.parentId && parents.includes(item.parentId)) {
|
63
|
+
// Si l'item n'a pas de parentId ou qu'on l'a déjà stocké :
|
64
|
+
// Et si le parentId n'est pas le dernier inseré
|
65
|
+
if (item.parentId !== parents[parents.length - 1]) {
|
66
|
+
// On est donc redescendu d'un niveau
|
67
|
+
// donc on supprime le dernier parent
|
68
|
+
parents.pop();
|
69
|
+
}
|
70
|
+
} else if (!item.parentId && parents.length > 0) {
|
71
|
+
// Si l'item n'a pas de parent et que le tableau des parent
|
72
|
+
// n'est pas vide => on le réinitialise
|
73
|
+
parents = [];
|
68
74
|
}
|
69
|
-
} else if (!item.parentId && parents.length > 0) {
|
70
|
-
// Si l'item n'a pas de parent et que le tableau des parent
|
71
|
-
// n'est pas vide => on le réinitialise
|
72
|
-
parents = [];
|
73
75
|
}
|
74
|
-
}
|
75
76
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
77
|
+
/**
|
78
|
+
* L'élément est-il selectionné ?
|
79
|
+
*/
|
80
|
+
let selected = false;
|
81
|
+
if (item.id === '_all') {
|
82
|
+
selected = allSelected;
|
83
|
+
} else if (!item.hasChildren) {
|
84
|
+
selected = selectedIdList.includes(item.id);
|
85
|
+
} else if (hierarchic && parentItemSelectable) {
|
86
|
+
selected = hierarchySelected[item.id].length === hierarchy[item.id].length;
|
87
|
+
}
|
87
88
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
89
|
+
return React.createElement(HiSelectableListItem, _extends({
|
90
|
+
key: item.id,
|
91
|
+
item: item,
|
92
|
+
selected: selected,
|
93
|
+
indeterminate: item.hasChildren && parentItemSelectable ? hierarchySelected[item.id].length > 0 && hierarchySelected[item.id].length !== hierarchy[item.id].length : false,
|
94
|
+
onSelect: onSelect,
|
95
|
+
hierarchySelected: hierarchySelected,
|
96
|
+
parentItemSelectable: parentItemSelectable,
|
97
|
+
nbChildren: typeof hierarchy !== 'undefined' && typeof hierarchy[item.id] !== 'undefined' ? hierarchy[item.id].length : 0,
|
98
|
+
hierarchic: hierarchic,
|
99
|
+
translations: translations,
|
100
|
+
icon: icon,
|
101
|
+
parentIcon: parentIcon,
|
102
|
+
hoverIcon: hoverIcon,
|
103
|
+
checkedIcon: checkedIcon,
|
104
|
+
checkbox: checkbox,
|
105
|
+
level: item.level ? item.level : parents.length,
|
106
|
+
disabled: disabledIds ? disabledIds.includes(item.id) : false
|
107
|
+
}, others));
|
108
|
+
}
|
107
109
|
})
|
108
110
|
)
|
109
111
|
);
|
@@ -14,9 +14,11 @@ import HiLoader from '../HiLoader';
|
|
14
14
|
|
15
15
|
export const styles = theme => ({
|
16
16
|
listItem: {
|
17
|
-
padding:
|
17
|
+
padding: '9px 0px',
|
18
18
|
fontWeight: theme.typography.fontWeightRegular,
|
19
|
-
maxHeight: 40
|
19
|
+
maxHeight: 40,
|
20
|
+
display: 'flex',
|
21
|
+
alignItems: 'flex-start'
|
20
22
|
},
|
21
23
|
listItemTitle: {
|
22
24
|
padding: `${9}px 0px`,
|
@@ -311,7 +313,7 @@ class HiSelectableListItem extends React.Component {
|
|
311
313
|
|
312
314
|
if (leftPadding) {
|
313
315
|
paddingLeft = leftPadding;
|
314
|
-
} else if (!hierarchic) {
|
316
|
+
} else if (!hierarchic && level === 0) {
|
315
317
|
// Si pas de hiérarchie et sans checkbox, padding de 8px
|
316
318
|
if (!effectiveCheckbox) {
|
317
319
|
paddingLeft = 8;
|
@@ -328,9 +330,9 @@ class HiSelectableListItem extends React.Component {
|
|
328
330
|
}
|
329
331
|
} else if (level > 0) {
|
330
332
|
if (effectiveCheckbox) {
|
331
|
-
paddingLeft = 16 * (level - 1);
|
332
|
-
} else {
|
333
333
|
paddingLeft = 16 * level;
|
334
|
+
} else {
|
335
|
+
paddingLeft = 16 * (level + 1);
|
334
336
|
}
|
335
337
|
} else if (!effectiveCheckbox) {
|
336
338
|
if (item.id === '_all') {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import _extends from 'babel-runtime/helpers/extends';
|
2
2
|
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
3
4
|
import React from 'react';
|
4
5
|
import PropTypes from 'prop-types';
|
5
6
|
import { ContextMenuTrigger } from 'react-contextmenu';
|
@@ -11,7 +12,7 @@ import { formatRate } from '../utils/hiHelpers';
|
|
11
12
|
/**
|
12
13
|
* Construit la cellule correspondante au type demandé
|
13
14
|
*/
|
14
|
-
export default class BodyCellBuilder extends React.
|
15
|
+
export default class BodyCellBuilder extends React.Component {
|
15
16
|
|
16
17
|
constructor(props) {
|
17
18
|
super(props);
|
@@ -19,6 +20,10 @@ export default class BodyCellBuilder extends React.PureComponent {
|
|
19
20
|
this.collectContextMenuDatas = this.collectContextMenuDatas.bind(this);
|
20
21
|
}
|
21
22
|
|
23
|
+
shouldComponentUpdate(nextProps, nextState) {
|
24
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
25
|
+
}
|
26
|
+
|
22
27
|
/**
|
23
28
|
* CollecContextMenuDatas
|
24
29
|
*
|
@@ -151,7 +156,8 @@ export default class BodyCellBuilder extends React.PureComponent {
|
|
151
156
|
locale: dateLocale,
|
152
157
|
view: view,
|
153
158
|
displayTime: props.displayTime,
|
154
|
-
sticky: sticky
|
159
|
+
sticky: sticky,
|
160
|
+
formatShort: this.props.formatShort
|
155
161
|
});
|
156
162
|
break;
|
157
163
|
|
@@ -235,10 +241,11 @@ export default class BodyCellBuilder extends React.PureComponent {
|
|
235
241
|
default:
|
236
242
|
cellElement = React.createElement(CellText, {
|
237
243
|
ukey: ukey,
|
238
|
-
value: data.value,
|
244
|
+
value: data.label ? data.label : data.value,
|
239
245
|
ellipsis: ellipsis,
|
240
246
|
view: view,
|
241
|
-
sticky: sticky
|
247
|
+
sticky: sticky,
|
248
|
+
color: data.color
|
242
249
|
});
|
243
250
|
break;
|
244
251
|
}
|
@@ -1,15 +1,17 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Tooltip from '../../Tooltip';
|
4
5
|
import HiColoredLabel from '../../HiColoredLabel';
|
5
|
-
import withStyles from '../../styles/withStyles';
|
6
|
-
|
7
|
-
export const styles = theme => ({});
|
8
6
|
|
9
7
|
/**
|
10
8
|
* Cette cellule permet d'afficher le nom d'un compte sous la forme d'un label coloré.
|
11
9
|
*/
|
12
|
-
class CellAccount extends React.
|
10
|
+
class CellAccount extends React.Component {
|
11
|
+
|
12
|
+
shouldComponentUpdate(nextProps, nextState) {
|
13
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
14
|
+
}
|
13
15
|
|
14
16
|
render() {
|
15
17
|
const { value, color } = this.props;
|
@@ -37,4 +39,4 @@ CellAccount.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
37
39
|
*/
|
38
40
|
value: PropTypes.string.isRequired
|
39
41
|
} : {};
|
40
|
-
export default
|
42
|
+
export default CellAccount;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import { Circle } from 'mdi-material-ui';
|
@@ -44,7 +45,11 @@ export const styles = theme => ({
|
|
44
45
|
* Cette cellule permet d'afficher un numéro de compte
|
45
46
|
* Le tooltip affiche les informations complémentaires (country, expiration date..)
|
46
47
|
*/
|
47
|
-
class CellAccountNumber extends React.
|
48
|
+
class CellAccountNumber extends React.Component {
|
49
|
+
|
50
|
+
shouldComponentUpdate(nextProps, nextState) {
|
51
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
52
|
+
}
|
48
53
|
|
49
54
|
render() {
|
50
55
|
const {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
// @inheritedComponent CellLayout
|
2
3
|
|
3
4
|
import React from 'react';
|
@@ -23,7 +24,11 @@ export const styles = theme => ({
|
|
23
24
|
* - sinon on affiche la ville et le pays
|
24
25
|
* - tous les champs définis sont affichés dans le tooltip
|
25
26
|
*/
|
26
|
-
class CellAddress extends React.
|
27
|
+
class CellAddress extends React.Component {
|
28
|
+
|
29
|
+
shouldComponentUpdate(nextProps, nextState) {
|
30
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
31
|
+
}
|
27
32
|
|
28
33
|
render() {
|
29
34
|
const { classes, streetAddress, name, city, postalCode, view, country, isoCountry } = this.props;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
|
@@ -44,7 +45,11 @@ export const styles = theme => ({
|
|
44
45
|
* en vue small : Affiche la valeur courte (id), tooltip = Image + Value
|
45
46
|
*
|
46
47
|
*/
|
47
|
-
class CellCountry extends React.
|
48
|
+
class CellCountry extends React.Component {
|
49
|
+
|
50
|
+
shouldComponentUpdate(nextProps, nextState) {
|
51
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
52
|
+
}
|
48
53
|
|
49
54
|
render() {
|
50
55
|
const { label, path, value, view } = this.props;
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import
|
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
|
-
|
4
|
+
import moment from 'moment';
|
5
|
+
import 'moment/locale/fr';
|
5
6
|
import withStyles from '../../styles/withStyles';
|
6
7
|
import Tooltip from '../../Tooltip';
|
7
8
|
import * as cst from '../constants';
|
8
9
|
|
9
|
-
export const styles =
|
10
|
+
export const styles = {
|
10
11
|
rightEllipsisSpan: {
|
11
12
|
display: 'inline-block',
|
12
13
|
overflow: 'hidden',
|
@@ -14,51 +15,34 @@ export const styles = theme => ({
|
|
14
15
|
whiteSpace: 'pre',
|
15
16
|
width: '100%'
|
16
17
|
}
|
17
|
-
}
|
18
|
+
};
|
18
19
|
|
19
20
|
/**
|
20
21
|
* Cette cellule permet d'afficher une date en fonction de la locale de l'utilisateur
|
21
22
|
*/
|
22
23
|
class CellDate extends React.Component {
|
24
|
+
constructor(...args) {
|
25
|
+
var _temp;
|
26
|
+
|
27
|
+
return _temp = super(...args), this.formatLong = 'dddd DD MMMM YYYY HH:mm:ss', _temp;
|
28
|
+
}
|
29
|
+
|
30
|
+
shouldComponentUpdate(nextProps, nextState) {
|
31
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
32
|
+
}
|
23
33
|
|
24
34
|
render() {
|
25
|
-
const { classes, displayTime, value, locale, view } = this.props;
|
35
|
+
const { classes, displayTime, value, locale, view, formatShort } = this.props;
|
26
36
|
|
27
|
-
const date =
|
37
|
+
const date = moment(value);
|
38
|
+
date.locale(locale);
|
28
39
|
|
29
|
-
|
30
|
-
weekday: 'long',
|
31
|
-
year: 'numeric',
|
32
|
-
month: 'long',
|
33
|
-
day: '2-digit'
|
34
|
-
}, displayTime && {
|
35
|
-
hour: '2-digit',
|
36
|
-
minute: '2-digit',
|
37
|
-
second: '2-digit'
|
38
|
-
});
|
39
|
-
const titleValue = date.toLocaleString(locale, options);
|
40
|
+
const titleValue = displayTime ? date.format(this.formatLong) : date.format(this.formatLong.replace(' HH:mm:ss', ''));
|
40
41
|
let displayedValue = titleValue;
|
41
42
|
if (view === cst.VIEWS.SMALL) {
|
42
|
-
|
43
|
-
year: '2-digit',
|
44
|
-
month: '2-digit',
|
45
|
-
day: '2-digit'
|
46
|
-
}, displayTime && {
|
47
|
-
hour: '2-digit',
|
48
|
-
minute: '2-digit'
|
49
|
-
});
|
50
|
-
displayedValue = date.toLocaleString(locale, options);
|
43
|
+
displayedValue = displayTime ? date.format(`${formatShort.replace('YYYY', 'YY')} HH:mm:ss`) : date.format(formatShort.replace('YYYY', 'YY'));
|
51
44
|
} else if (view === cst.VIEWS.MEDIUM) {
|
52
|
-
|
53
|
-
year: 'numeric',
|
54
|
-
month: '2-digit',
|
55
|
-
day: '2-digit'
|
56
|
-
}, displayTime && {
|
57
|
-
hour: '2-digit',
|
58
|
-
minute: '2-digit',
|
59
|
-
second: '2-digit'
|
60
|
-
});
|
61
|
-
displayedValue = date.toLocaleString(locale, options);
|
45
|
+
displayedValue = displayTime ? date.format(`${formatShort} HH:mm:ss`) : date.format(formatShort);
|
62
46
|
}
|
63
47
|
|
64
48
|
if (view === cst.VIEWS.LARGE) {
|
@@ -83,8 +67,9 @@ class CellDate extends React.Component {
|
|
83
67
|
|
84
68
|
CellDate.defaultProps = {
|
85
69
|
displayTime: false,
|
86
|
-
locale: 'en
|
87
|
-
view: 'l'
|
70
|
+
locale: 'en',
|
71
|
+
view: 'l',
|
72
|
+
formatShort: 'DD/MM/YYYY'
|
88
73
|
};
|
89
74
|
CellDate.propTypes = process.env.NODE_ENV !== "production" ? {
|
90
75
|
/**
|
@@ -96,11 +81,21 @@ CellDate.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
96
81
|
*/
|
97
82
|
displayTime: PropTypes.bool,
|
98
83
|
/**
|
99
|
-
*
|
84
|
+
* Format de la date en vue small (ex: DD/MM/YYYY)
|
85
|
+
* @see https://momentjs.com/docs/#/parsing/string-format/
|
86
|
+
*/
|
87
|
+
formatShort: PropTypes.string.isRequired,
|
88
|
+
/**
|
89
|
+
* Locale moment
|
100
90
|
*/
|
101
91
|
locale: PropTypes.string,
|
102
92
|
/**
|
103
|
-
*
|
93
|
+
* True si la colonne est la première colonne et
|
94
|
+
* doit avoir un comportement "sticky" lors du scroll horizontal
|
95
|
+
*/
|
96
|
+
sticky: PropTypes.bool,
|
97
|
+
/**
|
98
|
+
* Date as string
|
104
99
|
*/
|
105
100
|
value: PropTypes.string.isRequired,
|
106
101
|
/**
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Tooltip from '../../Tooltip';
|
@@ -26,7 +27,11 @@ export const styles = {
|
|
26
27
|
* Cette cellule permet d'afficher une icône et un label (optionnel).
|
27
28
|
* En vue small (s) elle affiche uniquement l'icône avec une largeur fixe.
|
28
29
|
*/
|
29
|
-
class CellIcon extends React.
|
30
|
+
class CellIcon extends React.Component {
|
31
|
+
|
32
|
+
shouldComponentUpdate(nextProps, nextState) {
|
33
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
34
|
+
}
|
30
35
|
|
31
36
|
render() {
|
32
37
|
const { classes, icon, value, view, color } = this.props;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Tooltip from '../../Tooltip';
|
@@ -45,7 +46,11 @@ export const styles = theme => ({
|
|
45
46
|
* En vue large, aucun tooltip n'est affiché
|
46
47
|
* En vue small (s) elle affiche uniquement l'image avec une largeur fixe.
|
47
48
|
*/
|
48
|
-
class CellImage extends React.
|
49
|
+
class CellImage extends React.Component {
|
50
|
+
|
51
|
+
shouldComponentUpdate(nextProps, nextState) {
|
52
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
53
|
+
}
|
49
54
|
|
50
55
|
render() {
|
51
56
|
const { classes, path, value, view, size } = this.props;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
|
@@ -15,7 +16,11 @@ export const styles = theme => ({
|
|
15
16
|
/**
|
16
17
|
* Cette cellule permet d'afficher un volume ou un montant avec devise
|
17
18
|
*/
|
18
|
-
class CellNumeric extends React.
|
19
|
+
class CellNumeric extends React.Component {
|
20
|
+
|
21
|
+
shouldComponentUpdate(nextProps, nextState) {
|
22
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
23
|
+
}
|
19
24
|
|
20
25
|
render() {
|
21
26
|
const { classes, value, locale, currency, view, precision } = this.props;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import classNames from 'classnames';
|
@@ -45,7 +46,11 @@ export const styles = theme => ({
|
|
45
46
|
* Cette cellule permet d'afficher un pourcentage
|
46
47
|
* avec une icône d'évolution (optionnelle) et un indicateur du type de données représentées (optionnel)
|
47
48
|
*/
|
48
|
-
class CellRate extends React.
|
49
|
+
class CellRate extends React.Component {
|
50
|
+
|
51
|
+
shouldComponentUpdate(nextProps, nextState) {
|
52
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
53
|
+
}
|
49
54
|
|
50
55
|
render() {
|
51
56
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import Tooltip from '../../Tooltip';
|
@@ -21,7 +22,11 @@ export const styles = {
|
|
21
22
|
/**
|
22
23
|
* Cette cellule permet d'afficher le résultat de Sentinel (score & fraudResult & smartDecision)
|
23
24
|
*/
|
24
|
-
class CellSentinel extends React.
|
25
|
+
class CellSentinel extends React.Component {
|
26
|
+
|
27
|
+
shouldComponentUpdate(nextProps, nextState) {
|
28
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
29
|
+
}
|
25
30
|
|
26
31
|
constructor(props) {
|
27
32
|
super(props);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
|
1
2
|
import React from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
|
@@ -18,7 +19,11 @@ export const styles = theme => ({
|
|
18
19
|
}
|
19
20
|
});
|
20
21
|
|
21
|
-
class CellStatus extends React.
|
22
|
+
class CellStatus extends React.Component {
|
23
|
+
|
24
|
+
shouldComponentUpdate(nextProps, nextState) {
|
25
|
+
return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
|
26
|
+
}
|
22
27
|
|
23
28
|
render() {
|
24
29
|
const { classes, theme, nbOperations, value, code, onOpenDetails } = this.props;
|