@hipay/hipay-material-ui 2.0.0-beta.71 → 2.0.0-beta.72
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +76 -0
- package/HiCell/CellIcon.js +14 -3
- package/HiForm/HiFormControl.js +2 -2
- package/HiForm/HiUploadField.js +1 -1
- package/HiMap/HiMap.js +9 -16
- package/HiSelect/HiSelect.js +16 -12
- package/HiTable/HiCellBuilder.js +1 -0
- package/HiTable/HiTableHeader.js +6 -2
- package/README.md +1 -1
- package/es/HiCell/CellIcon.js +14 -3
- package/es/HiForm/HiFormControl.js +2 -2
- package/es/HiForm/HiUploadField.js +1 -1
- package/es/HiMap/HiMap.js +3 -12
- package/es/HiSelect/HiSelect.js +16 -12
- package/es/HiTable/HiCellBuilder.js +1 -0
- package/es/HiTable/HiTableHeader.js +6 -2
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/umd/hipay-material-ui.development.js +0 -119185
- package/umd/hipay-material-ui.production.min.js +0 -6
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,79 @@
|
|
1
|
+
# [2.0.0-beta.72](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.72) (2019-05-14)
|
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-15)
|
2
78
|
|
3
79
|
|
package/HiCell/CellIcon.js
CHANGED
@@ -40,6 +40,10 @@ var styles = {
|
|
40
40
|
wrapper: {
|
41
41
|
maxWidth: '100%',
|
42
42
|
display: 'inline-flex'
|
43
|
+
},
|
44
|
+
flexContent: {
|
45
|
+
display: 'flex',
|
46
|
+
justifyContent: 'flex-end'
|
43
47
|
}
|
44
48
|
};
|
45
49
|
/**
|
@@ -63,6 +67,7 @@ function (_React$PureComponent) {
|
|
63
67
|
key: "render",
|
64
68
|
value: function render() {
|
65
69
|
var _this$props = this.props,
|
70
|
+
align = _this$props.align,
|
66
71
|
classes = _this$props.classes,
|
67
72
|
color = _this$props.color,
|
68
73
|
icon = _this$props.icon,
|
@@ -73,7 +78,7 @@ function (_React$PureComponent) {
|
|
73
78
|
|
74
79
|
if (onClick) {
|
75
80
|
return _react.default.createElement("div", {
|
76
|
-
className: classes.wrapper,
|
81
|
+
className: align === 'right' ? classes.flexContent : classes.wrapper,
|
77
82
|
title: label
|
78
83
|
}, _react.default.createElement(_HiIconButton.default, {
|
79
84
|
color: 'inherit',
|
@@ -86,14 +91,15 @@ function (_React$PureComponent) {
|
|
86
91
|
onClick: onClick
|
87
92
|
}, _react.default.createElement(_HiIcon.default, {
|
88
93
|
className: classes.icon,
|
89
|
-
icon: icon
|
94
|
+
icon: icon,
|
95
|
+
color: color
|
90
96
|
}), view !== 's' && label && _react.default.createElement("span", {
|
91
97
|
className: classes.label
|
92
98
|
}, label)));
|
93
99
|
}
|
94
100
|
|
95
101
|
return _react.default.createElement("div", {
|
96
|
-
className: classes.wrapper,
|
102
|
+
className: align === 'right' ? classes.flexContent : classes.wrapper,
|
97
103
|
title: label
|
98
104
|
}, _react.default.createElement(_HiIcon.default, {
|
99
105
|
color: 'inherit',
|
@@ -116,6 +122,11 @@ CellIcon.defaultProps = {
|
|
116
122
|
color: 'neutral'
|
117
123
|
};
|
118
124
|
CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
125
|
+
/**
|
126
|
+
* Alignement de l'icône dans sa cellule
|
127
|
+
*/
|
128
|
+
align: _propTypes.default.oneOf(['right']),
|
129
|
+
|
119
130
|
/**
|
120
131
|
* Useful to extend the style applied to components.
|
121
132
|
*/
|
package/HiForm/HiFormControl.js
CHANGED
@@ -91,7 +91,7 @@ var styles = function styles(theme) {
|
|
91
91
|
verticalAlign: 'middle',
|
92
92
|
borderRadius: 2,
|
93
93
|
position: 'relative',
|
94
|
-
marginBottom:
|
94
|
+
marginBottom: 22,
|
95
95
|
fontWeight: theme.typography.fontWeightRegular
|
96
96
|
}),
|
97
97
|
arrowDown: {
|
@@ -106,7 +106,7 @@ var styles = function styles(theme) {
|
|
106
106
|
left: 8
|
107
107
|
},
|
108
108
|
'&$arrowFullWidth': {
|
109
|
-
right:
|
109
|
+
right: 12
|
110
110
|
}
|
111
111
|
},
|
112
112
|
arrowNotFullWidth: {},
|
package/HiForm/HiUploadField.js
CHANGED
@@ -60,7 +60,7 @@ function (_React$PureComponent) {
|
|
60
60
|
if (value !== undefined) {
|
61
61
|
empty = value.value !== null && !value.error ? false : empty;
|
62
62
|
error = value.error || error;
|
63
|
-
errorText
|
63
|
+
errorText += "".concat(value.errorMessage);
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
package/HiMap/HiMap.js
CHANGED
@@ -31,6 +31,10 @@ var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
|
31
31
|
|
32
32
|
var _HiLoader = _interopRequireDefault(require("../HiLoader"));
|
33
33
|
|
34
|
+
var _leaflet = _interopRequireDefault(require("leaflet"));
|
35
|
+
|
36
|
+
var _reactLeaflet = require("react-leaflet");
|
37
|
+
|
34
38
|
var apiUrl = 'https://nominatim.openstreetmap.org/search?q='; // The original CSS can be found here : https://unpkg.com/leaflet@1.3.1/dist/leaflet.css
|
35
39
|
|
36
40
|
var styles = function styles(theme) {
|
@@ -119,12 +123,8 @@ var styles = function styles(theme) {
|
|
119
123
|
};
|
120
124
|
|
121
125
|
exports.styles = styles;
|
122
|
-
var L;
|
123
|
-
var Map;
|
124
|
-
var TileLayer;
|
125
|
-
var Marker;
|
126
126
|
|
127
|
-
var _ref = _react.default.createElement(TileLayer, {
|
127
|
+
var _ref = _react.default.createElement(_reactLeaflet.TileLayer, {
|
128
128
|
url: "http://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png"
|
129
129
|
});
|
130
130
|
|
@@ -163,13 +163,6 @@ function (_React$PureComponent) {
|
|
163
163
|
value: function componentDidMount() {
|
164
164
|
this.mounted = true;
|
165
165
|
this.findCoords();
|
166
|
-
/* eslint-disable */
|
167
|
-
|
168
|
-
L = require('leaflet');
|
169
|
-
Map = require('react-leaflet').Map;
|
170
|
-
Marker = require('react-leaflet').Marker;
|
171
|
-
TileLayer = require('react-leaflet').TileLayer;
|
172
|
-
/* eslint-enable */
|
173
166
|
}
|
174
167
|
}, {
|
175
168
|
key: "componentWillUnmount",
|
@@ -255,18 +248,18 @@ function (_React$PureComponent) {
|
|
255
248
|
var myIcon;
|
256
249
|
if (notFound) element = translations.notFound;
|
257
250
|
|
258
|
-
if (loaded) {
|
259
|
-
myIcon =
|
251
|
+
if (loaded && _leaflet.default && _reactLeaflet.Map) {
|
252
|
+
myIcon = _leaflet.default.divIcon({
|
260
253
|
html: '<svg x="0px" y="0px" viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">\n' + '<path class="map_marker" ' + 'd="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9 ' + 'C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z' + ' M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8 ' + 'c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>\n' + '</svg>',
|
261
254
|
iconSize: [24, 36],
|
262
255
|
iconAnchor: [11, 36]
|
263
256
|
});
|
264
|
-
element = _react.default.createElement(Map, {
|
257
|
+
element = _react.default.createElement(_reactLeaflet.Map, {
|
265
258
|
zoom: zoom,
|
266
259
|
center: position,
|
267
260
|
className: classes.map,
|
268
261
|
onViewportChange: this.handleScrollZoom
|
269
|
-
}, _ref, _react.default.createElement(Marker, {
|
262
|
+
}, _ref, _react.default.createElement(_reactLeaflet.Marker, {
|
270
263
|
position: position,
|
271
264
|
icon: myIcon
|
272
265
|
}), _react.default.createElement("div", {
|
package/HiSelect/HiSelect.js
CHANGED
@@ -270,8 +270,10 @@ function (_React$PureComponent) {
|
|
270
270
|
if (_this.props.onClick) _this.props.onClick(); // Gestion du focus
|
271
271
|
|
272
272
|
if (!_this.props.searchable) {
|
273
|
-
|
274
|
-
|
273
|
+
setTimeout(function () {
|
274
|
+
// Sinon focus sur l'élément sélectionné
|
275
|
+
_this.focusOnSelectedItem(_this.props.value);
|
276
|
+
}, 1);
|
275
277
|
} else {
|
276
278
|
if (_this.searchField) {
|
277
279
|
setTimeout(function () {
|
@@ -285,17 +287,19 @@ function (_React$PureComponent) {
|
|
285
287
|
_this.focusOnSelectedItem = function (selectedValue) {
|
286
288
|
if (_this.overlay && _this.overlay.getElementsByTagName('li')[0]) {
|
287
289
|
setTimeout(function () {
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
290
|
+
if (_this.overlay) {
|
291
|
+
// On initialise au premier élément pour être sûr de ne pas se retrouver avec un focus of undefined
|
292
|
+
var item = _this.overlay.getElementsByTagName('li')[0];
|
293
|
+
|
294
|
+
if (selectedValue && typeof selectedValue === 'string') {
|
295
|
+
item = _this.overlay.getElementsByTagName('li')[selectedValue];
|
296
|
+
} else if (selectedValue && typeof selectedValue === 'number') {
|
297
|
+
item = _this.overlay.getElementsByTagName('li')[selectedValue - 1];
|
298
|
+
}
|
296
299
|
|
297
|
-
|
298
|
-
|
300
|
+
if (item) {
|
301
|
+
item.focus();
|
302
|
+
}
|
299
303
|
}
|
300
304
|
}, 1);
|
301
305
|
}
|
package/HiTable/HiCellBuilder.js
CHANGED
package/HiTable/HiTableHeader.js
CHANGED
@@ -45,7 +45,10 @@ var styles = function styles(theme) {
|
|
45
45
|
cell: {
|
46
46
|
border: 'none',
|
47
47
|
paddingRight: '13px',
|
48
|
-
paddingLeft: '13px'
|
48
|
+
paddingLeft: '13px',
|
49
|
+
overflow: 'hidden',
|
50
|
+
textOverflow: 'ellipsis',
|
51
|
+
whiteSpace: 'nowrap'
|
49
52
|
},
|
50
53
|
icon: {
|
51
54
|
color: '#00ADE9'
|
@@ -101,6 +104,7 @@ function (_React$PureComponent) {
|
|
101
104
|
}
|
102
105
|
}, Object.keys(columns).map(function (key) {
|
103
106
|
var _columns$key = columns[key],
|
107
|
+
align = _columns$key.align,
|
104
108
|
colId = _columns$key.colId,
|
105
109
|
type = _columns$key.type,
|
106
110
|
label = _columns$key.label,
|
@@ -112,7 +116,7 @@ function (_React$PureComponent) {
|
|
112
116
|
key: colId,
|
113
117
|
className: classes.cell,
|
114
118
|
sortDirection: orderBy === colId ? order : false,
|
115
|
-
numeric: cst.ALIGN_RIGHT_TYPES.includes(type),
|
119
|
+
numeric: cst.ALIGN_RIGHT_TYPES.includes(type) || align === 'right',
|
116
120
|
title: headerTooltip
|
117
121
|
}, sortable ? _react.default.createElement(_TableSortLabel.default, {
|
118
122
|
active: orderBy === colId,
|
package/README.md
CHANGED
@@ -110,7 +110,7 @@ git flow init
|
|
110
110
|
- Pour activer ESLint sur PHPStorm : File -> Settings -> Languages & Frameworks -> Code Qaulity Tools -> ESLint -> Enable
|
111
111
|
|
112
112
|
#### Pour rajouter de la documentation dans les démos
|
113
|
-
[Lire ce guide](https://github.com/
|
113
|
+
[Lire ce guide](https://github.com/mui-org/material-ui/blob/v3.0.1/CONTRIBUTING.md)
|
114
114
|
|
115
115
|
#### Pour rajouter des composants dans la liste "API"
|
116
116
|
Il faut les rajouter tout en haut du markdown de la page dans la liste des "components:"
|
package/es/HiCell/CellIcon.js
CHANGED
@@ -16,6 +16,10 @@ export const styles = {
|
|
16
16
|
wrapper: {
|
17
17
|
maxWidth: '100%',
|
18
18
|
display: 'inline-flex'
|
19
|
+
},
|
20
|
+
flexContent: {
|
21
|
+
display: 'flex',
|
22
|
+
justifyContent: 'flex-end'
|
19
23
|
}
|
20
24
|
};
|
21
25
|
/**
|
@@ -26,6 +30,7 @@ export const styles = {
|
|
26
30
|
class CellIcon extends React.PureComponent {
|
27
31
|
render() {
|
28
32
|
const {
|
33
|
+
align,
|
29
34
|
classes,
|
30
35
|
color,
|
31
36
|
icon,
|
@@ -37,7 +42,7 @@ class CellIcon extends React.PureComponent {
|
|
37
42
|
|
38
43
|
if (onClick) {
|
39
44
|
return React.createElement("div", {
|
40
|
-
className: classes.wrapper,
|
45
|
+
className: align === 'right' ? classes.flexContent : classes.wrapper,
|
41
46
|
title: label
|
42
47
|
}, React.createElement(HiIconButton, {
|
43
48
|
color: 'inherit',
|
@@ -50,14 +55,15 @@ class CellIcon extends React.PureComponent {
|
|
50
55
|
onClick: onClick
|
51
56
|
}, React.createElement(HiIcon, {
|
52
57
|
className: classes.icon,
|
53
|
-
icon: icon
|
58
|
+
icon: icon,
|
59
|
+
color: color
|
54
60
|
}), view !== 's' && label && React.createElement("span", {
|
55
61
|
className: classes.label
|
56
62
|
}, label)));
|
57
63
|
}
|
58
64
|
|
59
65
|
return React.createElement("div", {
|
60
|
-
className: classes.wrapper,
|
66
|
+
className: align === 'right' ? classes.flexContent : classes.wrapper,
|
61
67
|
title: label
|
62
68
|
}, React.createElement(HiIcon, {
|
63
69
|
color: 'inherit',
|
@@ -79,6 +85,11 @@ CellIcon.defaultProps = {
|
|
79
85
|
color: 'neutral'
|
80
86
|
};
|
81
87
|
CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
88
|
+
/**
|
89
|
+
* Alignement de l'icône dans sa cellule
|
90
|
+
*/
|
91
|
+
align: PropTypes.oneOf(['right']),
|
92
|
+
|
82
93
|
/**
|
83
94
|
* Useful to extend the style applied to components.
|
84
95
|
*/
|
@@ -54,7 +54,7 @@ export const styles = theme => ({
|
|
54
54
|
verticalAlign: 'middle',
|
55
55
|
borderRadius: 2,
|
56
56
|
position: 'relative',
|
57
|
-
marginBottom:
|
57
|
+
marginBottom: 22,
|
58
58
|
fontWeight: theme.typography.fontWeightRegular
|
59
59
|
}),
|
60
60
|
arrowDown: {
|
@@ -69,7 +69,7 @@ export const styles = theme => ({
|
|
69
69
|
left: 8
|
70
70
|
},
|
71
71
|
'&$arrowFullWidth': {
|
72
|
-
right:
|
72
|
+
right: 12
|
73
73
|
}
|
74
74
|
},
|
75
75
|
arrowNotFullWidth: {},
|
@@ -28,7 +28,7 @@ class HiUploadField extends React.PureComponent {
|
|
28
28
|
if (value !== undefined) {
|
29
29
|
empty = value.value !== null && !value.error ? false : empty;
|
30
30
|
error = value.error || error;
|
31
|
-
errorText
|
31
|
+
errorText += `${value.errorMessage}`;
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
package/es/HiMap/HiMap.js
CHANGED
@@ -4,6 +4,8 @@ import { withStyles } from '../styles';
|
|
4
4
|
import HiButton from '../HiButton';
|
5
5
|
import HiIcon from '../HiIcon';
|
6
6
|
import HiLoader from '../HiLoader';
|
7
|
+
import L from 'leaflet';
|
8
|
+
import { Map, TileLayer, Marker } from 'react-leaflet';
|
7
9
|
const apiUrl = 'https://nominatim.openstreetmap.org/search?q='; // The original CSS can be found here : https://unpkg.com/leaflet@1.3.1/dist/leaflet.css
|
8
10
|
|
9
11
|
export const styles = theme => ({
|
@@ -88,10 +90,6 @@ export const styles = theme => ({
|
|
88
90
|
}
|
89
91
|
}
|
90
92
|
});
|
91
|
-
let L;
|
92
|
-
let Map;
|
93
|
-
let TileLayer;
|
94
|
-
let Marker;
|
95
93
|
|
96
94
|
var _ref = React.createElement(TileLayer, {
|
97
95
|
url: "http://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png"
|
@@ -122,13 +120,6 @@ class HiMap extends React.PureComponent {
|
|
122
120
|
componentDidMount() {
|
123
121
|
this.mounted = true;
|
124
122
|
this.findCoords();
|
125
|
-
/* eslint-disable */
|
126
|
-
|
127
|
-
L = require('leaflet');
|
128
|
-
Map = require('react-leaflet').Map;
|
129
|
-
Marker = require('react-leaflet').Marker;
|
130
|
-
TileLayer = require('react-leaflet').TileLayer;
|
131
|
-
/* eslint-enable */
|
132
123
|
}
|
133
124
|
|
134
125
|
componentWillUnmount() {
|
@@ -204,7 +195,7 @@ class HiMap extends React.PureComponent {
|
|
204
195
|
let myIcon;
|
205
196
|
if (notFound) element = translations.notFound;
|
206
197
|
|
207
|
-
if (loaded) {
|
198
|
+
if (loaded && L && Map) {
|
208
199
|
myIcon = L.divIcon({
|
209
200
|
html: '<svg x="0px" y="0px" viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">\n' + '<path class="map_marker" ' + 'd="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9 ' + 'C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z' + ' M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8 ' + 'c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>\n' + '</svg>',
|
210
201
|
iconSize: [24, 36],
|
package/es/HiSelect/HiSelect.js
CHANGED
@@ -208,8 +208,10 @@ class HiSelect extends React.PureComponent {
|
|
208
208
|
if (this.props.onClick) this.props.onClick(); // Gestion du focus
|
209
209
|
|
210
210
|
if (!this.props.searchable) {
|
211
|
-
|
212
|
-
|
211
|
+
setTimeout(() => {
|
212
|
+
// Sinon focus sur l'élément sélectionné
|
213
|
+
this.focusOnSelectedItem(this.props.value);
|
214
|
+
}, 1);
|
213
215
|
} else {
|
214
216
|
if (this.searchField) {
|
215
217
|
setTimeout(() => {
|
@@ -223,17 +225,19 @@ class HiSelect extends React.PureComponent {
|
|
223
225
|
this.focusOnSelectedItem = selectedValue => {
|
224
226
|
if (this.overlay && this.overlay.getElementsByTagName('li')[0]) {
|
225
227
|
setTimeout(() => {
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
228
|
+
if (this.overlay) {
|
229
|
+
// On initialise au premier élément pour être sûr de ne pas se retrouver avec un focus of undefined
|
230
|
+
let item = this.overlay.getElementsByTagName('li')[0];
|
231
|
+
|
232
|
+
if (selectedValue && typeof selectedValue === 'string') {
|
233
|
+
item = this.overlay.getElementsByTagName('li')[selectedValue];
|
234
|
+
} else if (selectedValue && typeof selectedValue === 'number') {
|
235
|
+
item = this.overlay.getElementsByTagName('li')[selectedValue - 1];
|
236
|
+
}
|
234
237
|
|
235
|
-
|
236
|
-
|
238
|
+
if (item) {
|
239
|
+
item.focus();
|
240
|
+
}
|
237
241
|
}
|
238
242
|
}, 1);
|
239
243
|
}
|
@@ -16,7 +16,10 @@ const styles = theme => ({
|
|
16
16
|
cell: {
|
17
17
|
border: 'none',
|
18
18
|
paddingRight: '13px',
|
19
|
-
paddingLeft: '13px'
|
19
|
+
paddingLeft: '13px',
|
20
|
+
overflow: 'hidden',
|
21
|
+
textOverflow: 'ellipsis',
|
22
|
+
whiteSpace: 'nowrap'
|
20
23
|
},
|
21
24
|
icon: {
|
22
25
|
color: '#00ADE9'
|
@@ -50,6 +53,7 @@ class HiTableHeader extends React.PureComponent {
|
|
50
53
|
}
|
51
54
|
}, Object.keys(columns).map(key => {
|
52
55
|
const {
|
56
|
+
align,
|
53
57
|
colId,
|
54
58
|
type,
|
55
59
|
label,
|
@@ -62,7 +66,7 @@ class HiTableHeader extends React.PureComponent {
|
|
62
66
|
key: colId,
|
63
67
|
className: classes.cell,
|
64
68
|
sortDirection: orderBy === colId ? order : false,
|
65
|
-
numeric: cst.ALIGN_RIGHT_TYPES.includes(type),
|
69
|
+
numeric: cst.ALIGN_RIGHT_TYPES.includes(type) || align === 'right',
|
66
70
|
title: headerTooltip
|
67
71
|
}, sortable ? React.createElement(TableSortLabel, {
|
68
72
|
active: orderBy === colId,
|
package/index.es.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@hipay/hipay-material-ui",
|
3
3
|
"private": false,
|
4
4
|
"author": "HiPay PSYCHE Team",
|
5
|
-
"version": "2.0.0-beta.
|
5
|
+
"version": "2.0.0-beta.72",
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
7
7
|
"keywords": [
|
8
8
|
"react",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"jss-props-sort": "^6.0.0",
|
48
48
|
"jss-vendor-prefixer": "^8.0.1",
|
49
49
|
"keycode": "^2.1.9",
|
50
|
-
"leaflet": "^1.
|
50
|
+
"leaflet": "^1.5.1",
|
51
51
|
"mdi-material-ui": "^5.4.0",
|
52
52
|
"moment": "^2.22.2",
|
53
53
|
"moment-timezone": "^0.5.23",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"react-event-listener": "^0.6.2",
|
60
60
|
"react-jss": "^8.1.0",
|
61
61
|
"react-lazyload": "^2.5.0",
|
62
|
-
"react-leaflet": "^2.
|
62
|
+
"react-leaflet": "^2.3.0",
|
63
63
|
"react-pdf": "^3.0.5",
|
64
64
|
"react-spinners": "^0.4.5",
|
65
65
|
"react-transition-group": "^2.2.1",
|