@hipay/hipay-material-ui 1.0.0-beta.21 → 1.0.0-beta.22
Sign up to get free protection for your applications and to get access to all the features.
- package/HiLoader/HiLoader.js +9 -5
- package/HiSelect/HiSelect.js +6 -1
- package/HiTable/HeaderCell.js +55 -49
- package/HiTable/HiTable.js +4 -14
- package/HiTable/HiTableHead.js +4 -6
- package/es/HiLoader/HiLoader.js +9 -5
- package/es/HiSelect/HiSelect.js +6 -1
- package/es/HiTable/HeaderCell.js +64 -59
- package/es/HiTable/HiTable.js +4 -14
- package/es/HiTable/HiTableHead.js +4 -6
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +56603 -13734
- package/umd/hipay-material-ui.production.min.js +5 -5
package/HiLoader/HiLoader.js
CHANGED
@@ -30,11 +30,15 @@ function HiLoader(props) {
|
|
30
30
|
loading = props.loading;
|
31
31
|
|
32
32
|
|
33
|
-
return _react2.default.createElement(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
return _react2.default.createElement(
|
34
|
+
'div',
|
35
|
+
{ id: 'hi-loader' },
|
36
|
+
_react2.default.createElement(_reactSpinners.PropagateLoader, {
|
37
|
+
loading: loading,
|
38
|
+
size: 12,
|
39
|
+
color: theme.palette.business.primary.normal
|
40
|
+
})
|
41
|
+
);
|
38
42
|
}
|
39
43
|
|
40
44
|
HiLoader.propTypes = process.env.NODE_ENV !== "production" ? {
|
package/HiSelect/HiSelect.js
CHANGED
@@ -107,7 +107,7 @@ var styles = exports.styles = function styles(theme) {
|
|
107
107
|
},
|
108
108
|
popper: {
|
109
109
|
width: '100%',
|
110
|
-
zIndex:
|
110
|
+
zIndex: 1200
|
111
111
|
},
|
112
112
|
paper: {
|
113
113
|
borderRadius: '0px 2px',
|
@@ -178,6 +178,11 @@ var HiSelect = function (_React$PureComponent) {
|
|
178
178
|
valueInOptions = true;
|
179
179
|
}
|
180
180
|
});
|
181
|
+
if (!valueInOptions && props.pinnedItem) {
|
182
|
+
if (props.value.indexOf(props.pinnedItem.id) >= 0) {
|
183
|
+
valueInOptions = true;
|
184
|
+
}
|
185
|
+
}
|
181
186
|
}
|
182
187
|
|
183
188
|
if (!valueInOptions) {
|
package/HiTable/HeaderCell.js
CHANGED
@@ -170,7 +170,7 @@ var HeaderCell = function (_React$PureComponent) {
|
|
170
170
|
|
171
171
|
_this.onFilterClick = _this.onFilterClick.bind(_this);
|
172
172
|
_this.openFilterMenu = _this.openFilterMenu.bind(_this);
|
173
|
-
_this.
|
173
|
+
_this.handleClose = _this.handleClose.bind(_this);
|
174
174
|
_this.handleSort = _this.handleSort.bind(_this);
|
175
175
|
_this.handleFilterChange = _this.handleFilterChange.bind(_this);
|
176
176
|
return _this;
|
@@ -186,8 +186,8 @@ var HeaderCell = function (_React$PureComponent) {
|
|
186
186
|
});
|
187
187
|
}
|
188
188
|
}, {
|
189
|
-
key: '
|
190
|
-
value: function
|
189
|
+
key: 'handleClose',
|
190
|
+
value: function handleClose() {
|
191
191
|
this.setState({ filterOpen: false, anchorEl: null, menuFilters: [] });
|
192
192
|
}
|
193
193
|
|
@@ -232,7 +232,8 @@ var HeaderCell = function (_React$PureComponent) {
|
|
232
232
|
align = _props$align === undefined ? cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left' : _props$align,
|
233
233
|
sticky = _props.sticky,
|
234
234
|
padding = _props.padding,
|
235
|
-
lookedUp = _props.lookedUp
|
235
|
+
lookedUp = _props.lookedUp,
|
236
|
+
translations = _props.translations;
|
236
237
|
var _state = this.state,
|
237
238
|
filterOpen = _state.filterOpen,
|
238
239
|
anchorEl = _state.anchorEl,
|
@@ -323,7 +324,7 @@ var HeaderCell = function (_React$PureComponent) {
|
|
323
324
|
{
|
324
325
|
className: classes.labelContainer + (_sorted ? ' ' + classes.labelContainerOrdered : '')
|
325
326
|
},
|
326
|
-
view !== 's' ? title : smallTitle
|
327
|
+
view !== 's' ? title : smallTitle || title
|
327
328
|
),
|
328
329
|
align !== 'right' && _icons
|
329
330
|
) : _react2.default.createElement(
|
@@ -340,7 +341,7 @@ var HeaderCell = function (_React$PureComponent) {
|
|
340
341
|
_react2.default.createElement(
|
341
342
|
'span',
|
342
343
|
{ className: classes.labelContainer, style: { width: '100%' } },
|
343
|
-
view !== 's' ? title : smallTitle
|
344
|
+
view !== 's' ? title : smallTitle || title
|
344
345
|
)
|
345
346
|
)
|
346
347
|
),
|
@@ -351,11 +352,12 @@ var HeaderCell = function (_React$PureComponent) {
|
|
351
352
|
title: title,
|
352
353
|
filterValueList: menuFilters,
|
353
354
|
isOpen: filterOpen,
|
354
|
-
onClose: this.
|
355
|
+
onClose: this.handleClose,
|
355
356
|
anchorEl: anchorEl,
|
356
357
|
sortable: sortable,
|
357
358
|
onSort: this.handleSort,
|
358
|
-
onFilterChange: this.handleFilterChange
|
359
|
+
onFilterChange: this.handleFilterChange,
|
360
|
+
translations: translations.columnFilter
|
359
361
|
})
|
360
362
|
);
|
361
363
|
}
|
@@ -376,18 +378,50 @@ HeaderCell.defaultProps = {
|
|
376
378
|
padding: 8
|
377
379
|
};
|
378
380
|
HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
381
|
+
/**
|
382
|
+
* Title alignement, est déduit de type par défaut
|
383
|
+
*/
|
384
|
+
align: _propTypes2.default.string,
|
379
385
|
/**
|
380
386
|
* Useful to extend the style applied to components.
|
381
387
|
*/
|
382
388
|
classes: _propTypes2.default.object,
|
389
|
+
/**
|
390
|
+
* Densité, défini la hauteur de la ligne
|
391
|
+
*/
|
392
|
+
dense: _propTypes2.default.bool,
|
393
|
+
/**
|
394
|
+
* Ajoute le composant ColumnFilter, par défaut à True si filterSource est définie.
|
395
|
+
*/
|
396
|
+
filterable: _propTypes2.default.bool,
|
397
|
+
/**
|
398
|
+
* Liste fermé des valeurs disponibles sur lesquelles filtrer (inclure/exclure)
|
399
|
+
*/
|
400
|
+
filterSource: _propTypes2.default.array,
|
401
|
+
/**
|
402
|
+
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
403
|
+
*/
|
404
|
+
fixedColumnWidth: _propTypes2.default.bool,
|
383
405
|
/**
|
384
406
|
* Recherche lookup sur cette colonne
|
385
407
|
*/
|
386
408
|
lookedUp: _propTypes2.default.bool,
|
409
|
+
/**
|
410
|
+
* Padding de la cellule (px)
|
411
|
+
*/
|
412
|
+
padding: _propTypes2.default.number,
|
413
|
+
/**
|
414
|
+
* Fonction de callback au changement du filtre - passe la liste des id des valeurs incluses
|
415
|
+
*/
|
416
|
+
onFilterChange: _propTypes2.default.func,
|
387
417
|
/**
|
388
418
|
* Fonction de callback au click du select
|
389
419
|
*/
|
390
420
|
onSelect: _propTypes2.default.func,
|
421
|
+
/**
|
422
|
+
* Fonction de callback au tri - passe la direction du tri
|
423
|
+
*/
|
424
|
+
onSort: _propTypes2.default.func,
|
391
425
|
/**
|
392
426
|
* Ajoute une checkbox
|
393
427
|
*/
|
@@ -400,69 +434,41 @@ HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
400
434
|
* Titre condensé
|
401
435
|
*/
|
402
436
|
smallTitle: _propTypes2.default.string,
|
403
|
-
/**
|
404
|
-
* Titre de la colonne
|
405
|
-
*/
|
406
|
-
title: _propTypes2.default.string.isRequired,
|
407
|
-
/**
|
408
|
-
* Type de cellule
|
409
|
-
*/
|
410
|
-
type: _propTypes2.default.string.isRequired,
|
411
437
|
/**
|
412
438
|
* Ajoute la fonction de tri au click sur le label & dans le ColumnFilter
|
413
439
|
*/
|
414
440
|
sortable: _propTypes2.default.bool,
|
415
|
-
/**
|
416
|
-
* Tri actif / inactif
|
417
|
-
*/
|
418
|
-
sorted: _propTypes2.default.bool,
|
419
441
|
/**
|
420
442
|
* Sens du tri
|
421
443
|
*/
|
422
444
|
sortDirection: _propTypes2.default.oneOf(['asc', 'desc']),
|
423
445
|
/**
|
424
|
-
*
|
446
|
+
* Tri actif / inactif
|
425
447
|
*/
|
426
|
-
|
448
|
+
sorted: _propTypes2.default.bool,
|
427
449
|
/**
|
428
|
-
*
|
450
|
+
* True si la colonne est la première colonne et doit avoir un comportement "sticky" lors du scroll horizontal
|
429
451
|
*/
|
430
|
-
|
452
|
+
sticky: _propTypes2.default.bool,
|
431
453
|
/**
|
432
|
-
*
|
454
|
+
* Titre de la colonne
|
433
455
|
*/
|
434
|
-
|
456
|
+
title: _propTypes2.default.string.isRequired,
|
435
457
|
/**
|
436
|
-
*
|
458
|
+
* Traduction des chaînes affichées
|
437
459
|
*/
|
438
|
-
|
460
|
+
translations: _propTypes2.default.object,
|
439
461
|
/**
|
440
|
-
*
|
462
|
+
* Type de cellule
|
441
463
|
*/
|
442
|
-
|
464
|
+
type: _propTypes2.default.string.isRequired,
|
443
465
|
/**
|
444
|
-
*
|
466
|
+
* View (L/M/S)
|
445
467
|
*/
|
446
|
-
|
468
|
+
view: _propTypes2.default.oneOf(['l', 'm', 's']),
|
447
469
|
/**
|
448
470
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
449
471
|
*/
|
450
|
-
width: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string])
|
451
|
-
/**
|
452
|
-
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
453
|
-
*/
|
454
|
-
fixedColumnWidth: _propTypes2.default.bool,
|
455
|
-
/**
|
456
|
-
* Title alignement, est déduit de type par défaut
|
457
|
-
*/
|
458
|
-
align: _propTypes2.default.string,
|
459
|
-
/**
|
460
|
-
* True si la colonne est la première colonne et doit avoir un comportement "sticky" lors du scroll horizontal
|
461
|
-
*/
|
462
|
-
sticky: _propTypes2.default.bool,
|
463
|
-
/**
|
464
|
-
* Padding de la cellule (px)
|
465
|
-
*/
|
466
|
-
padding: _propTypes2.default.number
|
472
|
+
width: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string])
|
467
473
|
} : {};
|
468
474
|
exports.default = (0, _styles.withStyles)(styles, { withTheme: true, name: 'HmuiHeaderCell' })(HeaderCell);
|
package/HiTable/HiTable.js
CHANGED
@@ -770,7 +770,7 @@ var HiTable = function (_React$Component) {
|
|
770
770
|
height: headerHeight,
|
771
771
|
sticky: sticky,
|
772
772
|
view: view,
|
773
|
-
translations: translations,
|
773
|
+
translations: translations.tableHead,
|
774
774
|
lookupColumns: lookupColumns,
|
775
775
|
fixedColumnWidth: fixedColumnWidth
|
776
776
|
}),
|
@@ -793,7 +793,7 @@ var HiTable = function (_React$Component) {
|
|
793
793
|
onRowClick: onRowClick,
|
794
794
|
onScroll: this.handleVerticalScroll,
|
795
795
|
addNewRowRefs: this.addNewRowRefs,
|
796
|
-
translations: translations,
|
796
|
+
translations: translations.tableBody,
|
797
797
|
groupBy: groupBy,
|
798
798
|
onClickNext: this.handleNextStickyRow,
|
799
799
|
groupByIds: groupByIds,
|
@@ -809,7 +809,7 @@ var HiTable = function (_React$Component) {
|
|
809
809
|
requestNextDatas: requestNextDatas,
|
810
810
|
maxAutoRequest: 3,
|
811
811
|
isScrollToBottom: isScrollToBottom,
|
812
|
-
translations: translations
|
812
|
+
translations: translations.tableFooterScroll
|
813
813
|
}),
|
814
814
|
!infiniteScroll && footerContent && _react2.default.createElement(
|
815
815
|
_HiTableFooter2.default,
|
@@ -866,17 +866,7 @@ HiTable.defaultProps = {
|
|
866
866
|
height: 450,
|
867
867
|
sticky: true,
|
868
868
|
translations: {
|
869
|
-
|
870
|
-
back_to_top: 'Back to top',
|
871
|
-
get_the_n_new_items: 'See %s new items',
|
872
|
-
choose_and_organize_columns: 'Choose & organize columns',
|
873
|
-
search: 'Search',
|
874
|
-
time: 'Time',
|
875
|
-
stickyRow: {
|
876
|
-
button: {
|
877
|
-
next: 'Next day'
|
878
|
-
}
|
879
|
-
}
|
869
|
+
back_to_top: 'Back to top'
|
880
870
|
},
|
881
871
|
view: 'l',
|
882
872
|
lookupColumns: [],
|
package/HiTable/HiTableHead.js
CHANGED
@@ -313,7 +313,8 @@ var HiTableHead = function (_React$Component) {
|
|
313
313
|
align: column['align'],
|
314
314
|
sticky: firstColumn && sticky,
|
315
315
|
lookedUp: lookupColumns.includes(column.colId),
|
316
|
-
fixedColumnWidth: fixedColumnWidth
|
316
|
+
fixedColumnWidth: fixedColumnWidth,
|
317
|
+
translations: translations.headerCell
|
317
318
|
});
|
318
319
|
}
|
319
320
|
}),
|
@@ -347,7 +348,7 @@ var HiTableHead = function (_React$Component) {
|
|
347
348
|
columns: columns,
|
348
349
|
orderedColumns: orderedColumns,
|
349
350
|
mandatoryColumnId: mandatoryColumnId,
|
350
|
-
translations: translations
|
351
|
+
translations: translations.orderColumns
|
351
352
|
})
|
352
353
|
)
|
353
354
|
),
|
@@ -391,10 +392,7 @@ HiTableHead.defaultProps = {
|
|
391
392
|
dense: false,
|
392
393
|
sticky: true,
|
393
394
|
translations: {
|
394
|
-
get_the_n_new_items: 'Get the %s new items'
|
395
|
-
choose_and_organize_columns: 'Choose & organize columns',
|
396
|
-
search: 'Search',
|
397
|
-
time: 'Time'
|
395
|
+
get_the_n_new_items: 'Get the %s new items'
|
398
396
|
},
|
399
397
|
view: 'l'
|
400
398
|
};
|
package/es/HiLoader/HiLoader.js
CHANGED
@@ -8,11 +8,15 @@ export const styles = () => ({});
|
|
8
8
|
function HiLoader(props) {
|
9
9
|
const { theme, loading } = props;
|
10
10
|
|
11
|
-
return React.createElement(
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
return React.createElement(
|
12
|
+
'div',
|
13
|
+
{ id: 'hi-loader' },
|
14
|
+
React.createElement(PropagateLoader, {
|
15
|
+
loading: loading,
|
16
|
+
size: 12,
|
17
|
+
color: theme.palette.business.primary.normal
|
18
|
+
})
|
19
|
+
);
|
16
20
|
}
|
17
21
|
|
18
22
|
HiLoader.propTypes = process.env.NODE_ENV !== "production" ? {
|
package/es/HiSelect/HiSelect.js
CHANGED
@@ -28,7 +28,7 @@ export const styles = theme => ({
|
|
28
28
|
},
|
29
29
|
popper: {
|
30
30
|
width: '100%',
|
31
|
-
zIndex:
|
31
|
+
zIndex: 1200
|
32
32
|
},
|
33
33
|
paper: {
|
34
34
|
borderRadius: '0px 2px',
|
@@ -94,6 +94,11 @@ class HiSelect extends React.PureComponent {
|
|
94
94
|
valueInOptions = true;
|
95
95
|
}
|
96
96
|
});
|
97
|
+
if (!valueInOptions && props.pinnedItem) {
|
98
|
+
if (props.value.indexOf(props.pinnedItem.id) >= 0) {
|
99
|
+
valueInOptions = true;
|
100
|
+
}
|
101
|
+
}
|
97
102
|
}
|
98
103
|
|
99
104
|
if (!valueInOptions) {
|
package/es/HiTable/HeaderCell.js
CHANGED
@@ -7,7 +7,6 @@ import ButtonBase from 'material-ui/ButtonBase';
|
|
7
7
|
import FilterVariantIcon from 'mdi-material-ui/FilterVariant';
|
8
8
|
import MenuIcon from 'mdi-material-ui/Menu';
|
9
9
|
import ArrowDownwardIcon from '../svg-icons/ArrowDownward';
|
10
|
-
|
11
10
|
import HiCheckbox from '../HiCheckbox';
|
12
11
|
import { withStyles, withTheme } from '../styles';
|
13
12
|
import ColumnFilter from './ColumnFilter';
|
@@ -71,7 +70,7 @@ export const styles = theme => ({
|
|
71
70
|
transform: 'scale(1,-1)'
|
72
71
|
},
|
73
72
|
lookedUp: {
|
74
|
-
background:
|
73
|
+
background: 'linear-gradient(0deg, transparent 25%, #FFFF8D 10%, #FFFF8D 75%, transparent 30%)',
|
75
74
|
borderRadius: '45%'
|
76
75
|
}
|
77
76
|
});
|
@@ -96,7 +95,7 @@ class HeaderCell extends React.PureComponent {
|
|
96
95
|
|
97
96
|
this.onFilterClick = this.onFilterClick.bind(this);
|
98
97
|
this.openFilterMenu = this.openFilterMenu.bind(this);
|
99
|
-
this.
|
98
|
+
this.handleClose = this.handleClose.bind(this);
|
100
99
|
this.handleSort = this.handleSort.bind(this);
|
101
100
|
this.handleFilterChange = this.handleFilterChange.bind(this);
|
102
101
|
}
|
@@ -109,7 +108,7 @@ class HeaderCell extends React.PureComponent {
|
|
109
108
|
});
|
110
109
|
}
|
111
110
|
|
112
|
-
|
111
|
+
handleClose() {
|
113
112
|
this.setState({ filterOpen: false, anchorEl: null, menuFilters: [] });
|
114
113
|
}
|
115
114
|
|
@@ -146,36 +145,37 @@ class HeaderCell extends React.PureComponent {
|
|
146
145
|
align = cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left',
|
147
146
|
sticky,
|
148
147
|
padding,
|
149
|
-
lookedUp
|
148
|
+
lookedUp,
|
149
|
+
translations
|
150
150
|
} = this.props;
|
151
151
|
|
152
152
|
const { filterOpen, anchorEl, menuFilters } = this.state;
|
153
153
|
|
154
|
-
|
154
|
+
const offset = selectable ? dense ? 32 : 40 : padding;
|
155
155
|
|
156
156
|
// Inclue le padding et/ou la checkbox dans la largeur de la cellule
|
157
|
-
|
157
|
+
const _width = (width || cst.DEFAULT_WIDTHS[type][view]) + offset + padding;
|
158
158
|
// N'affiche pas le tri si il est désactivé.
|
159
|
-
|
159
|
+
const _sorted = sortable && sorted;
|
160
160
|
// N'active pas le filtre si il n'y a pas de jeu de donnée sur lesquelles filtrées.
|
161
|
-
|
161
|
+
const _filterable = filterable && typeof filterSource !== 'undefined' && filterSource.length > 0;
|
162
162
|
|
163
163
|
// La bordure n'est pas défini en css car elle s'appliquerait
|
164
164
|
// sur le background et ne supporterait pas le scroll horizontal.
|
165
|
-
|
165
|
+
const sortedBorderElement = _sorted ? React.createElement('div', {
|
166
166
|
className: classes.sortedBorder,
|
167
167
|
style: { marginLeft: offset, marginRight: padding }
|
168
168
|
}) : null;
|
169
169
|
|
170
170
|
const sortIconClassName = classNames(classes.icon, classes.primary, {
|
171
|
-
[classes[
|
171
|
+
[classes[`sort${sortDirection}`]]: !!sortDirection
|
172
172
|
});
|
173
173
|
|
174
174
|
const filterIconClassName = classNames(classes.icon, classes.primary, {
|
175
|
-
[classes[
|
175
|
+
[classes[`filter${sortDirection}`]]: !!sortDirection
|
176
176
|
});
|
177
177
|
|
178
|
-
|
178
|
+
const _icons = _filterable || sortable ? _filterable ? _sorted ? React.createElement(FilterVariantIcon, { className: filterIconClassName }) : React.createElement(MenuIcon, { className: classes.icon }) : _sorted && React.createElement(ArrowDownwardIcon, { className: sortIconClassName }) : '';
|
179
179
|
|
180
180
|
const lookedUpClassName = classNames({ [classes.lookedUp]: lookedUp });
|
181
181
|
|
@@ -237,9 +237,9 @@ class HeaderCell extends React.PureComponent {
|
|
237
237
|
React.createElement(
|
238
238
|
'span',
|
239
239
|
{
|
240
|
-
className: classes.labelContainer + (_sorted ?
|
240
|
+
className: classes.labelContainer + (_sorted ? ` ${classes.labelContainerOrdered}` : '')
|
241
241
|
},
|
242
|
-
view !== 's' ? title : smallTitle
|
242
|
+
view !== 's' ? title : smallTitle || title
|
243
243
|
),
|
244
244
|
align !== 'right' && _icons
|
245
245
|
) : React.createElement(
|
@@ -256,7 +256,7 @@ class HeaderCell extends React.PureComponent {
|
|
256
256
|
React.createElement(
|
257
257
|
'span',
|
258
258
|
{ className: classes.labelContainer, style: { width: '100%' } },
|
259
|
-
view !== 's' ? title : smallTitle
|
259
|
+
view !== 's' ? title : smallTitle || title
|
260
260
|
)
|
261
261
|
)
|
262
262
|
),
|
@@ -267,11 +267,12 @@ class HeaderCell extends React.PureComponent {
|
|
267
267
|
title: title,
|
268
268
|
filterValueList: menuFilters,
|
269
269
|
isOpen: filterOpen,
|
270
|
-
onClose: this.
|
270
|
+
onClose: this.handleClose,
|
271
271
|
anchorEl: anchorEl,
|
272
272
|
sortable: sortable,
|
273
273
|
onSort: this.handleSort,
|
274
|
-
onFilterChange: this.handleFilterChange
|
274
|
+
onFilterChange: this.handleFilterChange,
|
275
|
+
translations: translations.columnFilter
|
275
276
|
})
|
276
277
|
);
|
277
278
|
}
|
@@ -290,18 +291,50 @@ HeaderCell.defaultProps = {
|
|
290
291
|
padding: 8
|
291
292
|
};
|
292
293
|
HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
294
|
+
/**
|
295
|
+
* Title alignement, est déduit de type par défaut
|
296
|
+
*/
|
297
|
+
align: PropTypes.string,
|
293
298
|
/**
|
294
299
|
* Useful to extend the style applied to components.
|
295
300
|
*/
|
296
301
|
classes: PropTypes.object,
|
302
|
+
/**
|
303
|
+
* Densité, défini la hauteur de la ligne
|
304
|
+
*/
|
305
|
+
dense: PropTypes.bool,
|
306
|
+
/**
|
307
|
+
* Ajoute le composant ColumnFilter, par défaut à True si filterSource est définie.
|
308
|
+
*/
|
309
|
+
filterable: PropTypes.bool,
|
310
|
+
/**
|
311
|
+
* Liste fermé des valeurs disponibles sur lesquelles filtrer (inclure/exclure)
|
312
|
+
*/
|
313
|
+
filterSource: PropTypes.array,
|
314
|
+
/**
|
315
|
+
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
316
|
+
*/
|
317
|
+
fixedColumnWidth: PropTypes.bool,
|
297
318
|
/**
|
298
319
|
* Recherche lookup sur cette colonne
|
299
320
|
*/
|
300
321
|
lookedUp: PropTypes.bool,
|
322
|
+
/**
|
323
|
+
* Padding de la cellule (px)
|
324
|
+
*/
|
325
|
+
padding: PropTypes.number,
|
326
|
+
/**
|
327
|
+
* Fonction de callback au changement du filtre - passe la liste des id des valeurs incluses
|
328
|
+
*/
|
329
|
+
onFilterChange: PropTypes.func,
|
301
330
|
/**
|
302
331
|
* Fonction de callback au click du select
|
303
332
|
*/
|
304
333
|
onSelect: PropTypes.func,
|
334
|
+
/**
|
335
|
+
* Fonction de callback au tri - passe la direction du tri
|
336
|
+
*/
|
337
|
+
onSort: PropTypes.func,
|
305
338
|
/**
|
306
339
|
* Ajoute une checkbox
|
307
340
|
*/
|
@@ -314,69 +347,41 @@ HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
314
347
|
* Titre condensé
|
315
348
|
*/
|
316
349
|
smallTitle: PropTypes.string,
|
317
|
-
/**
|
318
|
-
* Titre de la colonne
|
319
|
-
*/
|
320
|
-
title: PropTypes.string.isRequired,
|
321
|
-
/**
|
322
|
-
* Type de cellule
|
323
|
-
*/
|
324
|
-
type: PropTypes.string.isRequired,
|
325
350
|
/**
|
326
351
|
* Ajoute la fonction de tri au click sur le label & dans le ColumnFilter
|
327
352
|
*/
|
328
353
|
sortable: PropTypes.bool,
|
329
|
-
/**
|
330
|
-
* Tri actif / inactif
|
331
|
-
*/
|
332
|
-
sorted: PropTypes.bool,
|
333
354
|
/**
|
334
355
|
* Sens du tri
|
335
356
|
*/
|
336
357
|
sortDirection: PropTypes.oneOf(['asc', 'desc']),
|
337
358
|
/**
|
338
|
-
*
|
359
|
+
* Tri actif / inactif
|
339
360
|
*/
|
340
|
-
|
361
|
+
sorted: PropTypes.bool,
|
341
362
|
/**
|
342
|
-
*
|
363
|
+
* True si la colonne est la première colonne et doit avoir un comportement "sticky" lors du scroll horizontal
|
343
364
|
*/
|
344
|
-
|
365
|
+
sticky: PropTypes.bool,
|
345
366
|
/**
|
346
|
-
*
|
367
|
+
* Titre de la colonne
|
347
368
|
*/
|
348
|
-
|
369
|
+
title: PropTypes.string.isRequired,
|
349
370
|
/**
|
350
|
-
*
|
371
|
+
* Traduction des chaînes affichées
|
351
372
|
*/
|
352
|
-
|
373
|
+
translations: PropTypes.object,
|
353
374
|
/**
|
354
|
-
*
|
375
|
+
* Type de cellule
|
355
376
|
*/
|
356
|
-
|
377
|
+
type: PropTypes.string.isRequired,
|
357
378
|
/**
|
358
|
-
*
|
379
|
+
* View (L/M/S)
|
359
380
|
*/
|
360
|
-
|
381
|
+
view: PropTypes.oneOf(['l', 'm', 's']),
|
361
382
|
/**
|
362
383
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
363
384
|
*/
|
364
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
365
|
-
/**
|
366
|
-
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
367
|
-
*/
|
368
|
-
fixedColumnWidth: PropTypes.bool,
|
369
|
-
/**
|
370
|
-
* Title alignement, est déduit de type par défaut
|
371
|
-
*/
|
372
|
-
align: PropTypes.string,
|
373
|
-
/**
|
374
|
-
* True si la colonne est la première colonne et doit avoir un comportement "sticky" lors du scroll horizontal
|
375
|
-
*/
|
376
|
-
sticky: PropTypes.bool,
|
377
|
-
/**
|
378
|
-
* Padding de la cellule (px)
|
379
|
-
*/
|
380
|
-
padding: PropTypes.number
|
385
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
381
386
|
} : {};
|
382
387
|
export default withStyles(styles, { withTheme: true, name: 'HmuiHeaderCell' })(HeaderCell);
|
package/es/HiTable/HiTable.js
CHANGED
@@ -639,7 +639,7 @@ class HiTable extends React.Component {
|
|
639
639
|
height: headerHeight,
|
640
640
|
sticky: sticky,
|
641
641
|
view: view,
|
642
|
-
translations: translations,
|
642
|
+
translations: translations.tableHead,
|
643
643
|
lookupColumns: lookupColumns,
|
644
644
|
fixedColumnWidth: fixedColumnWidth
|
645
645
|
}),
|
@@ -662,7 +662,7 @@ class HiTable extends React.Component {
|
|
662
662
|
onRowClick: onRowClick,
|
663
663
|
onScroll: this.handleVerticalScroll,
|
664
664
|
addNewRowRefs: this.addNewRowRefs,
|
665
|
-
translations: translations,
|
665
|
+
translations: translations.tableBody,
|
666
666
|
groupBy: groupBy,
|
667
667
|
onClickNext: this.handleNextStickyRow,
|
668
668
|
groupByIds: groupByIds,
|
@@ -678,7 +678,7 @@ class HiTable extends React.Component {
|
|
678
678
|
requestNextDatas: requestNextDatas,
|
679
679
|
maxAutoRequest: 3,
|
680
680
|
isScrollToBottom: isScrollToBottom,
|
681
|
-
translations: translations
|
681
|
+
translations: translations.tableFooterScroll
|
682
682
|
}),
|
683
683
|
!infiniteScroll && footerContent && React.createElement(
|
684
684
|
HiTableFooter,
|
@@ -731,17 +731,7 @@ HiTable.defaultProps = {
|
|
731
731
|
height: 450,
|
732
732
|
sticky: true,
|
733
733
|
translations: {
|
734
|
-
|
735
|
-
back_to_top: 'Back to top',
|
736
|
-
get_the_n_new_items: 'See %s new items',
|
737
|
-
choose_and_organize_columns: 'Choose & organize columns',
|
738
|
-
search: 'Search',
|
739
|
-
time: 'Time',
|
740
|
-
stickyRow: {
|
741
|
-
button: {
|
742
|
-
next: 'Next day'
|
743
|
-
}
|
744
|
-
}
|
734
|
+
back_to_top: 'Back to top'
|
745
735
|
},
|
746
736
|
view: 'l',
|
747
737
|
lookupColumns: [],
|