@hipay/hipay-material-ui 2.0.0-beta.69 → 2.0.0-beta.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/HiCell/CellIcon.js +33 -3
- package/HiCell/CellRate.js +1 -1
- package/HiCell/CellTextStyled.js +31 -0
- package/HiChip/HiChipSwitch.js +1 -1
- package/HiForm/HiInput.js +1 -1
- package/HiPin/HiPin.js +3 -3
- package/HiSelect/HiSelect.js +4 -3
- package/HiSelect/HiSelectInput.js +3 -2
- package/HiSelect/HiSuggestSelect.js +9 -2
- package/HiTable/HiCellBuilder.js +10 -5
- package/HiTable/HiTableHeader.js +19 -14
- package/HiTable/HiTableRow.js +7 -3
- package/es/HiCell/CellIcon.js +32 -3
- package/es/HiCell/CellRate.js +1 -1
- package/es/HiCell/CellTextStyled.js +30 -0
- package/es/HiChip/HiChipSwitch.js +1 -1
- package/es/HiForm/HiInput.js +1 -1
- package/es/HiPin/HiPin.js +3 -3
- package/es/HiSelect/HiSelect.js +4 -3
- package/es/HiSelect/HiSelectInput.js +3 -2
- package/es/HiSelect/HiSuggestSelect.js +10 -3
- package/es/HiTable/HiCellBuilder.js +10 -5
- package/es/HiTable/HiTableHeader.js +16 -12
- package/es/HiTable/HiTableRow.js +7 -3
- package/es/hi-svg-icons/HiActivity.js +36 -0
- package/es/hi-svg-icons/HiPermission.js +36 -0
- package/es/hi-svg-icons/index.js +3 -1
- package/hi-svg-icons/HiActivity.js +50 -0
- package/hi-svg-icons/HiPermission.js +50 -0
- package/hi-svg-icons/index.js +17 -1
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +185 -45
- package/umd/hipay-material-ui.production.min.js +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,79 @@
|
|
1
|
+
# [2.0.0-beta.64](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.64) (2019-04-15)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **eslint:** remove eslint warrnings in components (ignore test files) ([d236c62](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d236c62))
|
7
|
+
* **HiAlertModal:** Correct styles and buttons positions ([2cfa2a9](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2cfa2a9))
|
8
|
+
* **HiBreadcrumb:** clean eslint warnings ([6db12fb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6db12fb))
|
9
|
+
* **HiDatePicker:** add static positions for custom overlays ([c3edf24](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c3edf24))
|
10
|
+
* **HiDynamicSelect:** remove onSelect override ([b803044](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b803044))
|
11
|
+
* **HiExpansionPanel:** fix props propagation collapseDisable || expanded ([eb18a96](https://gitlab.hipay.org/backend/hipay-material-ui/commit/eb18a96))
|
12
|
+
* **HiExpansionPanel:** Fix props type a requirement ([cbc3b48](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cbc3b48))
|
13
|
+
* **HiInput:** forward event in onClick ([be94fe0](https://gitlab.hipay.org/backend/hipay-material-ui/commit/be94fe0))
|
14
|
+
* **HiInput:** handle focus state through prop when needed to override default comportment ([9a133cc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a133cc))
|
15
|
+
* **HiInput:** rename prop to spellCheck ([c11939f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c11939f))
|
16
|
+
* **HiKpiNotice:** eslint clean warnings ([11b5552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/11b5552))
|
17
|
+
* **HiSelect:** Fix build of HiSelectContent ([4b87f78](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4b87f78))
|
18
|
+
* **HiSelect:** focus on undefined item ([2d084e6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2d084e6))
|
19
|
+
* **HiSelect:** Forward event in onBlur ([76c6778](https://gitlab.hipay.org/backend/hipay-material-ui/commit/76c6778))
|
20
|
+
* **HiSelect:** handle staticPosition & width properly for HiDateRangeSelector usage ([7b19ffb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7b19ffb))
|
21
|
+
* **HiSelect:** remove HiSelectNew calls ([cc5397d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cc5397d))
|
22
|
+
* **HiSelectableList:** Add lazy props to activate lazyloading (default true) and fix unit tests ([b41f8d2](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b41f8d2))
|
23
|
+
* **HiSelectableListItem:** disabled item checkbox color ([9f10552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9f10552))
|
24
|
+
* **HiSelectableListItem:** remove item width ([a913945](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a913945))
|
25
|
+
* **HiSelectContent:** Remove compute of input value ([b86db83](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b86db83))
|
26
|
+
* **HiSlider:** eslint clean warnings ([08964b1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/08964b1))
|
27
|
+
* **HiTable:** Fix test ([9a009a8](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a009a8))
|
28
|
+
* **HiUploadField:** clean eslint warnings ([c76aaf1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c76aaf1))
|
29
|
+
* **migration:** fix contrast threshold ... ([6fb3b18](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6fb3b18))
|
30
|
+
* **package:** add cross-env ([7098fd6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7098fd6))
|
31
|
+
|
32
|
+
|
33
|
+
### Code Refactoring
|
34
|
+
|
35
|
+
* deleting the old HiSelect and replacing it by the new (PSYCHE-1382) ([d5fc252](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d5fc252))
|
36
|
+
|
37
|
+
|
38
|
+
### Features
|
39
|
+
|
40
|
+
* **CellImage:** Handle fallbackImage ([254799d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/254799d))
|
41
|
+
* **CellSentinel:** Uniformize cell api with front CellSentinel ([4e2975b](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4e2975b))
|
42
|
+
* **CellSentinel:** Update CellSentinel to the new way (split each result in different column) ([efe2711](https://gitlab.hipay.org/backend/hipay-material-ui/commit/efe2711))
|
43
|
+
* **CellSentinelScore:** Add CellSentinelScore ([2fff04d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2fff04d))
|
44
|
+
* **CellText:** Handle active prop in CellText & column views in HiTable ([4366e60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4366e60))
|
45
|
+
* **HiCells:** Add simple cells types (Address, Date, Icon, Image, Numeric, PinToAction, Rate, Senti ([f688517](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f688517))
|
46
|
+
* **HiDatePicke:** add timezone props ([18360a5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/18360a5))
|
47
|
+
* **HiDatePicker:** BREAKING CHANGE - add local prop to handle calendar translations ([b1b3743](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1b3743))
|
48
|
+
* **HiIcon:** Add mdi-material-ui as available icons via 'mdi_' prefix ([1091d6d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/1091d6d))
|
49
|
+
* **HiInput:** Add inputProps to enable passing props directly to input element ([d57466c](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d57466c))
|
50
|
+
* **HiInput:** add spellcheck property ([b2feac3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b2feac3))
|
51
|
+
* **HiMap:** unregister fetch on unmount ([0afa931](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0afa931))
|
52
|
+
* **HiSelect:** Add (NEW) HiSelect, HiNestedSelect, HiDynamicSelect ([4c6447e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4c6447e))
|
53
|
+
* **HiSelect:** Reset search input on blur & on close ([d9af584](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d9af584))
|
54
|
+
* **HiSelectableList:** Add sort props to sort item list on label ([f412ddc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f412ddc))
|
55
|
+
* **HiSelectContent:** Add new HiSelectContent & HiNestedSelectContent ([215ad8f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/215ad8f))
|
56
|
+
* **HiSelectContent:** export utils functions ([7c41d87](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7c41d87))
|
57
|
+
* **HiUploadField:** rename component HiUploadField ([593f77e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/593f77e))
|
58
|
+
* **notice:** Création notice KPI ([bba3f89](https://gitlab.hipay.org/backend/hipay-material-ui/commit/bba3f89))
|
59
|
+
|
60
|
+
|
61
|
+
### Performance Improvements
|
62
|
+
|
63
|
+
* **PureFunction:** Use pure & functional components ([220c686](https://gitlab.hipay.org/backend/hipay-material-ui/commit/220c686))
|
64
|
+
|
65
|
+
|
66
|
+
### BREAKING CHANGES
|
67
|
+
|
68
|
+
* HiSelectNew no longer exist, make sure you're importing HiSelect instead
|
69
|
+
* **HiDatePicker:** Required "local" props (use polyglot, p.currentLocal)
|
70
|
+
* **HiUploadField:** Components names changes
|
71
|
+
* **HiCells:** Remove CellCountry, CellThirdParty, CellStatus & CellAccount (use generic type
|
72
|
+
CellImage & CellText)
|
73
|
+
* **HiSelect:** HiSelect API change, use HiNestedSelect or HiDynamicSelect relative to situation
|
74
|
+
|
75
|
+
|
76
|
+
|
1
77
|
# [2.0.0-beta.64](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.64) (2019-04-04)
|
2
78
|
|
3
79
|
|
package/HiCell/CellIcon.js
CHANGED
@@ -25,6 +25,8 @@ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
|
25
25
|
|
26
26
|
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
27
27
|
|
28
|
+
var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
|
29
|
+
|
28
30
|
var styles = {
|
29
31
|
icon: {
|
30
32
|
float: 'left'
|
@@ -65,12 +67,35 @@ function (_React$PureComponent) {
|
|
65
67
|
color = _this$props.color,
|
66
68
|
icon = _this$props.icon,
|
67
69
|
label = _this$props.label,
|
68
|
-
|
69
|
-
size = _this$props.size
|
70
|
+
onClick = _this$props.onClick,
|
71
|
+
size = _this$props.size,
|
72
|
+
view = _this$props.view;
|
73
|
+
|
74
|
+
if (onClick) {
|
75
|
+
return _react.default.createElement("div", {
|
76
|
+
className: classes.wrapper,
|
77
|
+
title: label
|
78
|
+
}, _react.default.createElement(_HiIconButton.default, {
|
79
|
+
color: 'inherit',
|
80
|
+
style: {
|
81
|
+
color: color,
|
82
|
+
fontSize: size || 24,
|
83
|
+
maxHeight: 31,
|
84
|
+
maxWidth: 31
|
85
|
+
},
|
86
|
+
onClick: onClick
|
87
|
+
}, _react.default.createElement(_HiIcon.default, {
|
88
|
+
className: classes.icon,
|
89
|
+
icon: icon
|
90
|
+
}), view !== 's' && label && _react.default.createElement("span", {
|
91
|
+
className: classes.label
|
92
|
+
}, label)));
|
93
|
+
}
|
94
|
+
|
70
95
|
return _react.default.createElement("div", {
|
71
96
|
className: classes.wrapper,
|
72
97
|
title: label
|
73
|
-
},
|
98
|
+
}, _react.default.createElement(_HiIcon.default, {
|
74
99
|
color: 'inherit',
|
75
100
|
style: {
|
76
101
|
color: color,
|
@@ -112,6 +137,11 @@ CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
112
137
|
*/
|
113
138
|
label: _propTypes.default.string,
|
114
139
|
|
140
|
+
/**
|
141
|
+
* Fonction déclenchée lors du clic
|
142
|
+
*/
|
143
|
+
onClick: _propTypes.default.func,
|
144
|
+
|
115
145
|
/**
|
116
146
|
* View (L/M/S)
|
117
147
|
*/
|
package/HiCell/CellRate.js
CHANGED
package/HiCell/CellTextStyled.js
CHANGED
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
14
14
|
var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
|
15
15
|
|
16
|
+
var _HiButton = _interopRequireDefault(require("../HiButton"));
|
17
|
+
|
16
18
|
var styleRoot = {
|
17
19
|
width: '100%',
|
18
20
|
height: 19,
|
@@ -33,12 +35,18 @@ var styleLabel = {
|
|
33
35
|
whiteSpace: 'pre',
|
34
36
|
width: '100%'
|
35
37
|
};
|
38
|
+
var styleButton = {
|
39
|
+
padding: '1px 5px',
|
40
|
+
minHeight: '18px',
|
41
|
+
maxHeight: '18px'
|
42
|
+
};
|
36
43
|
/**
|
37
44
|
* CellText functional component
|
38
45
|
* (don't includes complex ellipsis: middle, after-first-word...)
|
39
46
|
*
|
40
47
|
* @param label
|
41
48
|
* @param color
|
49
|
+
* @param isButton
|
42
50
|
* @param value
|
43
51
|
* @param active
|
44
52
|
* @param title
|
@@ -49,6 +57,8 @@ var styleLabel = {
|
|
49
57
|
var CellTextStyled = function CellTextStyled(_ref) {
|
50
58
|
var label = _ref.label,
|
51
59
|
color = _ref.color,
|
60
|
+
isButton = _ref.isButton,
|
61
|
+
onClick = _ref.onClick,
|
52
62
|
_ref$value = _ref.value,
|
53
63
|
value = _ref$value === void 0 ? '' : _ref$value,
|
54
64
|
_ref$active = _ref.active,
|
@@ -56,6 +66,17 @@ var CellTextStyled = function CellTextStyled(_ref) {
|
|
56
66
|
_ref$title = _ref.title,
|
57
67
|
title = _ref$title === void 0 ? '' : _ref$title;
|
58
68
|
var valueString = label ? label.toString() : value.toString();
|
69
|
+
|
70
|
+
if (isButton) {
|
71
|
+
return _react.default.createElement(_HiButton.default, {
|
72
|
+
color: color,
|
73
|
+
onClick: onClick,
|
74
|
+
size: "small",
|
75
|
+
style: styleButton,
|
76
|
+
variant: "raised"
|
77
|
+
}, valueString);
|
78
|
+
}
|
79
|
+
|
59
80
|
return _react.default.createElement("div", {
|
60
81
|
style: styleRoot,
|
61
82
|
title: title || valueString
|
@@ -80,11 +101,21 @@ CellTextStyled.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
101
|
*/
|
81
102
|
color: _propTypes.default.string,
|
82
103
|
|
104
|
+
/**
|
105
|
+
* Définit si la cellule de text
|
106
|
+
*/
|
107
|
+
isButton: _propTypes.default.bool,
|
108
|
+
|
83
109
|
/**
|
84
110
|
* Label
|
85
111
|
*/
|
86
112
|
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
87
113
|
|
114
|
+
/**
|
115
|
+
* Fonction déclenchée lors du clic
|
116
|
+
*/
|
117
|
+
onClick: _propTypes.default.func,
|
118
|
+
|
88
119
|
/**
|
89
120
|
* Tooltip
|
90
121
|
*/
|
package/HiChip/HiChipSwitch.js
CHANGED
package/HiForm/HiInput.js
CHANGED
package/HiPin/HiPin.js
CHANGED
@@ -23,9 +23,9 @@ var styles = function styles(theme) {
|
|
23
23
|
return {
|
24
24
|
root: {
|
25
25
|
display: 'inline-block',
|
26
|
-
padding: '
|
27
|
-
height:
|
28
|
-
lineHeight: '
|
26
|
+
padding: '0px 9px',
|
27
|
+
height: 17,
|
28
|
+
lineHeight: '17px',
|
29
29
|
minWidth: 25,
|
30
30
|
textAlign: 'center',
|
31
31
|
borderRadius: '45px',
|
package/HiSelect/HiSelect.js
CHANGED
@@ -79,13 +79,14 @@ var styles = function styles(theme) {
|
|
79
79
|
transition: 'none !important'
|
80
80
|
},
|
81
81
|
labelIcon: {
|
82
|
-
marginRight: 10
|
82
|
+
marginRight: 10,
|
83
|
+
verticalAlign: 'text-bottom'
|
83
84
|
},
|
84
85
|
labelImg: {
|
85
86
|
height: 18,
|
86
87
|
width: 'auto',
|
87
88
|
margin: '0 4px',
|
88
|
-
verticalAlign: '
|
89
|
+
verticalAlign: 'text-bottom'
|
89
90
|
},
|
90
91
|
selectIconLabel: (0, _extends2.default)({
|
91
92
|
whiteSpace: 'nowrap',
|
@@ -93,7 +94,7 @@ var styles = function styles(theme) {
|
|
93
94
|
textOverflow: 'ellipsis',
|
94
95
|
paddingRight: 16
|
95
96
|
}, theme.typography.b1, {
|
96
|
-
display: 'inline-
|
97
|
+
display: 'inline-block',
|
97
98
|
width: '100%'
|
98
99
|
}),
|
99
100
|
selectImgLabel: (0, _extends2.default)({
|
@@ -127,8 +127,9 @@ var styles = function styles(theme) {
|
|
127
127
|
overflow: 'hidden',
|
128
128
|
textOverflow: 'ellipsis'
|
129
129
|
}, theme.typography.b1, {
|
130
|
-
display: 'inline-
|
131
|
-
width: '100%'
|
130
|
+
display: 'inline-block',
|
131
|
+
width: '100%',
|
132
|
+
maxWidth: 500
|
132
133
|
}),
|
133
134
|
placeholder: {
|
134
135
|
color: theme.palette.grey[400]
|
@@ -225,7 +225,8 @@ function (_React$PureComponent) {
|
|
225
225
|
onSearch = _this$props.onSearch,
|
226
226
|
translations = _this$props.translations,
|
227
227
|
align = _this$props.align,
|
228
|
-
|
228
|
+
inputClasses = _this$props.inputClasses,
|
229
|
+
otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align", "inputClasses"]);
|
229
230
|
var _this$state = this.state,
|
230
231
|
focused = _this$state.focused,
|
231
232
|
options = _this$state.options;
|
@@ -265,7 +266,8 @@ function (_React$PureComponent) {
|
|
265
266
|
onChange: onSearch,
|
266
267
|
onKeyDown: this.handleKeyDownSearch,
|
267
268
|
onBlur: this.handleBlur,
|
268
|
-
onFocus: this.handleFocus
|
269
|
+
onFocus: this.handleFocus,
|
270
|
+
classes: inputClasses
|
269
271
|
})), open && _react.default.createElement(_Popper.default, {
|
270
272
|
disablePortal: true,
|
271
273
|
anchorEl: this.textInput,
|
@@ -319,6 +321,11 @@ HiSuggestSelect.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
319
321
|
*/
|
320
322
|
id: _propTypes.default.string,
|
321
323
|
|
324
|
+
/**
|
325
|
+
* Object that contains the style for Input component
|
326
|
+
*/
|
327
|
+
inputClasses: _propTypes.default.object,
|
328
|
+
|
322
329
|
/**
|
323
330
|
* Passe une ref callback au composant input
|
324
331
|
*/
|
package/HiTable/HiCellBuilder.js
CHANGED
@@ -150,6 +150,7 @@ function (_React$PureComponent) {
|
|
150
150
|
color: datacell.color,
|
151
151
|
icon: datacell.icon,
|
152
152
|
label: datacell.label,
|
153
|
+
onClick: datacell.handleClick,
|
153
154
|
view: cell.view ? cell.view : cst.DEFAULT_VIEWS[cell.type],
|
154
155
|
size: cell.size
|
155
156
|
});
|
@@ -194,6 +195,8 @@ function (_React$PureComponent) {
|
|
194
195
|
active: datacell.active,
|
195
196
|
color: datacell.color,
|
196
197
|
label: datacell.label,
|
198
|
+
isButton: datacell.isButton,
|
199
|
+
onClick: datacell.handleClick,
|
197
200
|
title: cell.title ? cell.title(datacell, cell) : datacell.title,
|
198
201
|
value: datacell.value
|
199
202
|
});
|
@@ -211,15 +214,12 @@ function (_React$PureComponent) {
|
|
211
214
|
key: "render",
|
212
215
|
value: function render() {
|
213
216
|
var _this$props = this.props,
|
217
|
+
className = _this$props.className,
|
214
218
|
column = _this$props.column,
|
215
219
|
data = _this$props.data,
|
216
220
|
locale = _this$props.locale;
|
217
221
|
return _react.default.createElement(_TableCell.default, {
|
218
|
-
|
219
|
-
border: 'none',
|
220
|
-
paddingRight: '13px',
|
221
|
-
paddingLeft: '13px'
|
222
|
-
}
|
222
|
+
className: className
|
223
223
|
}, this.createCell(column, data, locale));
|
224
224
|
}
|
225
225
|
}]);
|
@@ -227,6 +227,11 @@ function (_React$PureComponent) {
|
|
227
227
|
}(_react.default.PureComponent);
|
228
228
|
|
229
229
|
HiCellBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
|
230
|
+
/**
|
231
|
+
* Override TableCell style
|
232
|
+
*/
|
233
|
+
className: _propTypes.default.object,
|
234
|
+
|
230
235
|
/**
|
231
236
|
* Propriétés de la colonne
|
232
237
|
*/
|
package/HiTable/HiTableHeader.js
CHANGED
@@ -36,13 +36,21 @@ var _TableSortLabel = _interopRequireDefault(require("@material-ui/core/TableSor
|
|
36
36
|
var cst = _interopRequireWildcard(require("./constants"));
|
37
37
|
|
38
38
|
// @inheritedComponent TableHeader
|
39
|
-
var styles = {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
var styles = function styles(theme) {
|
40
|
+
return {
|
41
|
+
head: {
|
42
|
+
cursor: 'inherit',
|
43
|
+
borderBottom: "solid 1px ".concat(theme.palette.divider)
|
44
|
+
},
|
45
|
+
cell: {
|
46
|
+
border: 'none',
|
47
|
+
paddingRight: '13px',
|
48
|
+
paddingLeft: '13px'
|
49
|
+
},
|
50
|
+
icon: {
|
51
|
+
color: '#00ADE9'
|
52
|
+
}
|
53
|
+
};
|
46
54
|
};
|
47
55
|
|
48
56
|
var HiTableHeader =
|
@@ -84,7 +92,9 @@ function (_React$PureComponent) {
|
|
84
92
|
orderBy = _this$props.orderBy,
|
85
93
|
sortable = _this$props.sortable,
|
86
94
|
dense = _this$props.dense;
|
87
|
-
return _react.default.createElement(_TableHead.default,
|
95
|
+
return _react.default.createElement(_TableHead.default, {
|
96
|
+
className: classes.head
|
97
|
+
}, _react.default.createElement(_TableRow.default, {
|
88
98
|
style: {
|
89
99
|
height: dense ? cst.CELL_HEADER_HEIGHT_DENSE : cst.CELL_HEADER_HEIGHT,
|
90
100
|
whiteSpace: 'nowrap'
|
@@ -100,13 +110,8 @@ function (_React$PureComponent) {
|
|
100
110
|
var finalLabel = view === 's' ? smallLabel : label;
|
101
111
|
return _react.default.createElement(_TableCell.default, {
|
102
112
|
key: colId,
|
113
|
+
className: classes.cell,
|
103
114
|
sortDirection: orderBy === colId ? order : false,
|
104
|
-
style: {
|
105
|
-
border: 'none',
|
106
|
-
borderBottom: orderBy === colId ? 'solid 1px #00ADE9' : 'none',
|
107
|
-
paddingRight: '13px',
|
108
|
-
paddingLeft: '13px'
|
109
|
-
},
|
110
115
|
numeric: cst.ALIGN_RIGHT_TYPES.includes(type),
|
111
116
|
title: headerTooltip
|
112
117
|
}, sortable ? _react.default.createElement(_TableSortLabel.default, {
|
package/HiTable/HiTableRow.js
CHANGED
@@ -46,15 +46,18 @@ var styles = function styles(theme) {
|
|
46
46
|
'&:last-child': {
|
47
47
|
borderBottom: 'solid 1px #E4E7E8'
|
48
48
|
},
|
49
|
-
'&:first-child': {
|
50
|
-
borderTop: 'solid 1px #E4E7E8'
|
51
|
-
},
|
52
49
|
'&:hover, &:focus': {
|
53
50
|
backgroundColor: "".concat(theme.palette.action.hover, " !important")
|
54
51
|
}
|
55
52
|
},
|
56
53
|
clickableRow: {
|
57
54
|
cursor: 'pointer'
|
55
|
+
},
|
56
|
+
cell: {
|
57
|
+
border: 'none',
|
58
|
+
padding: '0px 13px',
|
59
|
+
minHeight: '32px',
|
60
|
+
maxHeight: '40px'
|
58
61
|
}
|
59
62
|
};
|
60
63
|
};
|
@@ -115,6 +118,7 @@ function (_React$PureComponent) {
|
|
115
118
|
}, Object.keys(columns).map(function (column) {
|
116
119
|
return _react.default.createElement(_HiCellBuilder.default, {
|
117
120
|
key: columns[column].colId,
|
121
|
+
className: classes.cell,
|
118
122
|
column: columns[column],
|
119
123
|
data: rowdata,
|
120
124
|
locale: locale
|
package/es/HiCell/CellIcon.js
CHANGED
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import withStyles from '../styles/withStyles';
|
4
4
|
import HiIcon from '../HiIcon';
|
5
|
+
import HiIconButton from '../HiIconButton';
|
5
6
|
export const styles = {
|
6
7
|
icon: {
|
7
8
|
float: 'left'
|
@@ -29,13 +30,36 @@ class CellIcon extends React.PureComponent {
|
|
29
30
|
color,
|
30
31
|
icon,
|
31
32
|
label,
|
32
|
-
|
33
|
-
size
|
33
|
+
onClick,
|
34
|
+
size,
|
35
|
+
view
|
34
36
|
} = this.props;
|
37
|
+
|
38
|
+
if (onClick) {
|
39
|
+
return React.createElement("div", {
|
40
|
+
className: classes.wrapper,
|
41
|
+
title: label
|
42
|
+
}, React.createElement(HiIconButton, {
|
43
|
+
color: 'inherit',
|
44
|
+
style: {
|
45
|
+
color,
|
46
|
+
fontSize: size || 24,
|
47
|
+
maxHeight: 31,
|
48
|
+
maxWidth: 31
|
49
|
+
},
|
50
|
+
onClick: onClick
|
51
|
+
}, React.createElement(HiIcon, {
|
52
|
+
className: classes.icon,
|
53
|
+
icon: icon
|
54
|
+
}), view !== 's' && label && React.createElement("span", {
|
55
|
+
className: classes.label
|
56
|
+
}, label)));
|
57
|
+
}
|
58
|
+
|
35
59
|
return React.createElement("div", {
|
36
60
|
className: classes.wrapper,
|
37
61
|
title: label
|
38
|
-
},
|
62
|
+
}, React.createElement(HiIcon, {
|
39
63
|
color: 'inherit',
|
40
64
|
style: {
|
41
65
|
color,
|
@@ -76,6 +100,11 @@ CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
76
100
|
*/
|
77
101
|
label: PropTypes.string,
|
78
102
|
|
103
|
+
/**
|
104
|
+
* Fonction déclenchée lors du clic
|
105
|
+
*/
|
106
|
+
onClick: PropTypes.func,
|
107
|
+
|
79
108
|
/**
|
80
109
|
* View (L/M/S)
|
81
110
|
*/
|
package/es/HiCell/CellRate.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import HiColoredLabel from '../HiColoredLabel';
|
4
|
+
import HiButton from '../HiButton';
|
4
5
|
const styleRoot = {
|
5
6
|
width: '100%',
|
6
7
|
height: 19,
|
@@ -21,12 +22,18 @@ const styleLabel = {
|
|
21
22
|
whiteSpace: 'pre',
|
22
23
|
width: '100%'
|
23
24
|
};
|
25
|
+
const styleButton = {
|
26
|
+
padding: '1px 5px',
|
27
|
+
minHeight: '18px',
|
28
|
+
maxHeight: '18px'
|
29
|
+
};
|
24
30
|
/**
|
25
31
|
* CellText functional component
|
26
32
|
* (don't includes complex ellipsis: middle, after-first-word...)
|
27
33
|
*
|
28
34
|
* @param label
|
29
35
|
* @param color
|
36
|
+
* @param isButton
|
30
37
|
* @param value
|
31
38
|
* @param active
|
32
39
|
* @param title
|
@@ -37,11 +44,24 @@ const styleLabel = {
|
|
37
44
|
const CellTextStyled = ({
|
38
45
|
label,
|
39
46
|
color,
|
47
|
+
isButton,
|
48
|
+
onClick,
|
40
49
|
value = '',
|
41
50
|
active = false,
|
42
51
|
title = ''
|
43
52
|
}) => {
|
44
53
|
const valueString = label ? label.toString() : value.toString();
|
54
|
+
|
55
|
+
if (isButton) {
|
56
|
+
return React.createElement(HiButton, {
|
57
|
+
color: color,
|
58
|
+
onClick: onClick,
|
59
|
+
size: "small",
|
60
|
+
style: styleButton,
|
61
|
+
variant: "raised"
|
62
|
+
}, valueString);
|
63
|
+
}
|
64
|
+
|
45
65
|
return React.createElement("div", {
|
46
66
|
style: styleRoot,
|
47
67
|
title: title || valueString
|
@@ -66,11 +86,21 @@ CellTextStyled.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
66
86
|
*/
|
67
87
|
color: PropTypes.string,
|
68
88
|
|
89
|
+
/**
|
90
|
+
* Définit si la cellule de text
|
91
|
+
*/
|
92
|
+
isButton: PropTypes.bool,
|
93
|
+
|
69
94
|
/**
|
70
95
|
* Label
|
71
96
|
*/
|
72
97
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
73
98
|
|
99
|
+
/**
|
100
|
+
* Fonction déclenchée lors du clic
|
101
|
+
*/
|
102
|
+
onClick: PropTypes.func,
|
103
|
+
|
74
104
|
/**
|
75
105
|
* Tooltip
|
76
106
|
*/
|
package/es/HiForm/HiInput.js
CHANGED
package/es/HiPin/HiPin.js
CHANGED
@@ -6,9 +6,9 @@ import { withStyles } from '../styles';
|
|
6
6
|
export const styles = theme => ({
|
7
7
|
root: {
|
8
8
|
display: 'inline-block',
|
9
|
-
padding: '
|
10
|
-
height:
|
11
|
-
lineHeight: '
|
9
|
+
padding: '0px 9px',
|
10
|
+
height: 17,
|
11
|
+
lineHeight: '17px',
|
12
12
|
minWidth: 25,
|
13
13
|
textAlign: 'center',
|
14
14
|
borderRadius: '45px',
|
package/es/HiSelect/HiSelect.js
CHANGED
@@ -38,13 +38,14 @@ export const styles = theme => ({
|
|
38
38
|
transition: 'none !important'
|
39
39
|
},
|
40
40
|
labelIcon: {
|
41
|
-
marginRight: 10
|
41
|
+
marginRight: 10,
|
42
|
+
verticalAlign: 'text-bottom'
|
42
43
|
},
|
43
44
|
labelImg: {
|
44
45
|
height: 18,
|
45
46
|
width: 'auto',
|
46
47
|
margin: '0 4px',
|
47
|
-
verticalAlign: '
|
48
|
+
verticalAlign: 'text-bottom'
|
48
49
|
},
|
49
50
|
selectIconLabel: _objectSpread({
|
50
51
|
whiteSpace: 'nowrap',
|
@@ -52,7 +53,7 @@ export const styles = theme => ({
|
|
52
53
|
textOverflow: 'ellipsis',
|
53
54
|
paddingRight: 16
|
54
55
|
}, theme.typography.b1, {
|
55
|
-
display: 'inline-
|
56
|
+
display: 'inline-block',
|
56
57
|
width: '100%'
|
57
58
|
}),
|
58
59
|
selectImgLabel: _objectSpread({
|