@hipay/hipay-material-ui 2.0.0-beta.62 → 2.0.0-beta.64

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 CHANGED
@@ -1,3 +1,73 @@
1
+ # [2.0.0-beta.63](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.63) (2019-02-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
+ * **HiBreadcrumb:** clean eslint warnings ([6db12fb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6db12fb))
8
+ * **HiDatePicker:** add static positions for custom overlays ([c3edf24](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c3edf24))
9
+ * **HiExpansionPanel:** Fix props type a requirement ([cbc3b48](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cbc3b48))
10
+ * **HiInput:** forward event in onClick ([be94fe0](https://gitlab.hipay.org/backend/hipay-material-ui/commit/be94fe0))
11
+ * **HiInput:** handle focus state through prop when needed to override default comportment ([9a133cc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a133cc))
12
+ * **HiInput:** rename prop to spellCheck ([c11939f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c11939f))
13
+ * **HiKpiNotice:** eslint clean warnings ([11b5552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/11b5552))
14
+ * **HiSelect:** Fix build of HiSelectContent ([4b87f78](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4b87f78))
15
+ * **HiSelect:** focus on undefined item ([2d084e6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2d084e6))
16
+ * **HiSelect:** Forward event in onBlur ([76c6778](https://gitlab.hipay.org/backend/hipay-material-ui/commit/76c6778))
17
+ * **HiSelect:** handle staticPosition & width properly for HiDateRangeSelector usage ([7b19ffb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7b19ffb))
18
+ * **HiSelect:** remove HiSelectNew calls ([cc5397d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cc5397d))
19
+ * **HiSelectableListItem:** disabled item checkbox color ([9f10552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9f10552))
20
+ * **HiSelectableListItem:** remove item width ([a913945](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a913945))
21
+ * **HiSelectContent:** Remove compute of input value ([b86db83](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b86db83))
22
+ * **HiSlider:** eslint clean warnings ([08964b1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/08964b1))
23
+ * **HiUploadField:** clean eslint warnings ([c76aaf1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c76aaf1))
24
+ * **migration:** fix contrast threshold ... ([6fb3b18](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6fb3b18))
25
+ * **package:** add cross-env ([7098fd6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7098fd6))
26
+
27
+
28
+ ### Code Refactoring
29
+
30
+ * deleting the old HiSelect and replacing it by the new (PSYCHE-1382) ([d5fc252](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d5fc252))
31
+
32
+
33
+ ### Features
34
+
35
+ * **CellImage:** Handle fallbackImage ([254799d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/254799d))
36
+ * **CellSentinel:** Uniformize cell api with front CellSentinel ([4e2975b](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4e2975b))
37
+ * **CellSentinel:** Update CellSentinel to the new way (split each result in different column) ([efe2711](https://gitlab.hipay.org/backend/hipay-material-ui/commit/efe2711))
38
+ * **CellSentinelScore:** Add CellSentinelScore ([2fff04d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2fff04d))
39
+ * **CellText:** Handle active prop in CellText & column views in HiTable ([4366e60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4366e60))
40
+ * **HiCells:** Add simple cells types (Address, Date, Icon, Image, Numeric, PinToAction, Rate, Senti ([f688517](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f688517))
41
+ * **HiDatePicke:** add timezone props ([18360a5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/18360a5))
42
+ * **HiDatePicker:** BREAKING CHANGE - add local prop to handle calendar translations ([b1b3743](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1b3743))
43
+ * **HiIcon:** Add mdi-material-ui as available icons via 'mdi_' prefix ([1091d6d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/1091d6d))
44
+ * **HiInput:** add spellcheck property ([b2feac3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b2feac3))
45
+ * **HiMap:** unregister fetch on unmount ([0afa931](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0afa931))
46
+ * **HiSelect:** Add (NEW) HiSelect, HiNestedSelect, HiDynamicSelect ([4c6447e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4c6447e))
47
+ * **HiSelect:** Reset search input on blur & on close ([d9af584](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d9af584))
48
+ * **HiSelectableList:** Add sort props to sort item list on label ([f412ddc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f412ddc))
49
+ * **HiSelectContent:** Add new HiSelectContent & HiNestedSelectContent ([215ad8f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/215ad8f))
50
+ * **HiSelectContent:** export utils functions ([7c41d87](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7c41d87))
51
+ * **HiUploadField:** rename component HiUploadField ([593f77e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/593f77e))
52
+ * **notice:** Création notice KPI ([bba3f89](https://gitlab.hipay.org/backend/hipay-material-ui/commit/bba3f89))
53
+
54
+
55
+ ### Performance Improvements
56
+
57
+ * **PureFunction:** Use pure & functional components ([220c686](https://gitlab.hipay.org/backend/hipay-material-ui/commit/220c686))
58
+
59
+
60
+ ### BREAKING CHANGES
61
+
62
+ * HiSelectNew no longer exist, make sure you're importing HiSelect instead
63
+ * **HiDatePicker:** Required "local" props (use polyglot, p.currentLocal)
64
+ * **HiUploadField:** Components names changes
65
+ * **HiCells:** Remove CellCountry, CellThirdParty, CellStatus & CellAccount (use generic type
66
+ CellImage & CellText)
67
+ * **HiSelect:** HiSelect API change, use HiNestedSelect or HiDynamicSelect relative to situation
68
+
69
+
70
+
1
71
  # [2.0.0-beta.62](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.62) (2019-02-01)
2
72
 
3
73
 
package/HiForm/HiInput.js CHANGED
@@ -184,9 +184,9 @@ function (_React$PureComponent) {
184
184
  }
185
185
  };
186
186
 
187
- _this.handleClick = function () {
187
+ _this.handleClick = function (event) {
188
188
  if (_this.props.onClick) {
189
- _this.props.onClick();
189
+ _this.props.onClick(event);
190
190
  }
191
191
  };
192
192
 
@@ -340,6 +340,7 @@ function (_React$PureComponent) {
340
340
  rows = _this$props.rows,
341
341
  inputClassName = _this$props.inputClassName,
342
342
  onReset = _this$props.onReset,
343
+ spellcheck = _this$props.spellcheck,
343
344
  startAdornmentColor = _this$props.startAdornmentColor;
344
345
  var focused = this.state.focused;
345
346
  var overlayProps = (0, _extends2.default)({
@@ -420,6 +421,7 @@ function (_React$PureComponent) {
420
421
  }
421
422
  }, eraseIcon, endAdornment),
422
423
  inputProps: {
424
+ spellCheck: spellcheck ? "true" : "false",
423
425
  className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, classes.inputText, !multiline), (0, _defineProperty2.default)(_classNames4, classes.inputTextArea, multiline), _classNames4))
424
426
  }
425
427
  }));
@@ -449,7 +451,8 @@ HiInput.defaultProps = {
449
451
  type: 'text',
450
452
  multiline: false,
451
453
  error: false,
452
- onlyNumbers: false
454
+ onlyNumbers: false,
455
+ spellcheck: false
453
456
  };
454
457
  HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
455
458
  /**
@@ -596,6 +599,11 @@ HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
596
599
  */
597
600
  rows: _propTypes.default.number,
598
601
 
602
+ /**
603
+ * Active browser default spellcheck (red underline)
604
+ */
605
+ spellcheck: _propTypes.default.bool,
606
+
599
607
  /**
600
608
  * Icône à afficher à gauche de l'input
601
609
  */
@@ -356,14 +356,12 @@ function (_React$PureComponent) {
356
356
  return _react.default.createElement("div", {
357
357
  className: classes.flexContainer
358
358
  }, _react.default.createElement("label", {
359
- htmlFor: "flat-button-file",
360
359
  ref: function ref(label) {
361
360
  _this2.uploadFieldRef = label;
362
361
  },
363
362
  tabIndex: "-1"
364
363
  }, _react.default.createElement("input", {
365
364
  hidden: true,
366
- id: "flat-button-file",
367
365
  type: !complete || values.length === 1 ? 'file' : 'hidden',
368
366
  onChange: this.handleChange,
369
367
  onClick: focusable ? this.handleEmptyField : undefined,
@@ -244,12 +244,16 @@ function (_React$PureComponent) {
244
244
  }
245
245
  };
246
246
 
247
- _this.handleBlur = function () {
247
+ _this.handleBlur = function (event) {
248
248
  _this.handleSearchReset();
249
249
 
250
250
  _this.setState({
251
251
  focused: false
252
252
  });
253
+
254
+ if (_this.props.onBlur && !_this.inputEl.contains(event.relatedTarget) && !_this.state.open) {
255
+ _this.props.onBlur(event);
256
+ }
253
257
  };
254
258
 
255
259
  _this.handleClick = function () {
@@ -525,10 +529,10 @@ function (_React$PureComponent) {
525
529
  onScrollReachBottom = _this$props4.onScrollReachBottom,
526
530
  onSubmit = _this$props4.onSubmit,
527
531
  placeholder = _this$props4.placeholder,
528
- startAdornment = _this$props4.startAdornment,
529
- staticPosition = _this$props4.staticPosition,
530
532
  _this$props4$searchVa = _this$props4.searchValue,
531
533
  searchValue = _this$props4$searchVa === void 0 ? this.state.searchValue : _this$props4$searchVa,
534
+ startAdornment = _this$props4.startAdornment,
535
+ staticPosition = _this$props4.staticPosition,
532
536
  _this$props4$buildSel = _this$props4.buildSelectProps,
533
537
  buildSelectProps = _this$props4$buildSel === void 0 ? this.buildSelectProps : _this$props4$buildSel;
534
538
  var _this$state = this.state,
@@ -808,6 +812,11 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
808
812
  */
809
813
  name: _propTypes.default.string.isRequired,
810
814
 
815
+ /**
816
+ * Fonction de callback appelée lorsqu'on perd le focus
817
+ */
818
+ onBlur: _propTypes.default.func,
819
+
811
820
  /**
812
821
  * Fonction de callback qui renvoit la/les valeurs sélectionnées
813
822
  *
@@ -165,7 +165,7 @@ function (_React$PureComponent) {
165
165
  value: function componentDidMount() {
166
166
  if (this.props.overlay && this.props.overlay.getElementsByTagName('li')[0]) {
167
167
  var item = this.props.overlay.getElementsByTagName('li')[0];
168
- var value = (0, _typeof2.default)(this.props.value) === 'object' ? this.props.value[0] : this.props.value;
168
+ var value = this.props.value && (0, _typeof2.default)(this.props.value) === 'object' ? this.props.value[0] : this.props.value;
169
169
 
170
170
  if (value) {
171
171
  if (typeof this.props.value[0] === 'string') {
@@ -100,6 +100,9 @@ var styles = function styles(theme) {
100
100
  cursor: 'default',
101
101
  opacity: 'inherit'
102
102
  },
103
+ selected: {
104
+ backgroundColor: theme.palette.action.selected
105
+ },
103
106
  pinned: {
104
107
  display: 'inherit',
105
108
  marginRight: 8,
@@ -348,7 +351,7 @@ function (_React$PureComponent) {
348
351
  classes: {
349
352
  root: classes.root
350
353
  },
351
- className: (0, _classnames.default)(classes.listItem, classes.listItemHover, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.thin, thin), (0, _defineProperty2.default)(_classNames, classes.pinned, pinned), (0, _defineProperty2.default)(_classNames, classes.inline, secondaryInline), (0, _defineProperty2.default)(_classNames, classes.listItemWithoutSecondaryInline, !secondaryInline), (0, _defineProperty2.default)(_classNames, classes.listItemInlineWithInfoWithoutSecondary, secondaryInline && info && !secondaryLabel), _classNames)),
354
+ className: (0, _classnames.default)(classes.listItem, classes.listItemHover, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), (0, _defineProperty2.default)(_classNames, classes.selected, selected), (0, _defineProperty2.default)(_classNames, classes.thin, thin), (0, _defineProperty2.default)(_classNames, classes.pinned, pinned), (0, _defineProperty2.default)(_classNames, classes.inline, secondaryInline), (0, _defineProperty2.default)(_classNames, classes.listItemWithoutSecondaryInline, !secondaryInline), (0, _defineProperty2.default)(_classNames, classes.listItemInlineWithInfoWithoutSecondary, secondaryInline && info && !secondaryLabel), _classNames)),
352
355
  disabled: disabled
353
356
  }, disabled || {
354
357
  onClick: onSelect,
@@ -141,9 +141,9 @@ class HiInput extends React.PureComponent {
141
141
  }
142
142
  };
143
143
 
144
- this.handleClick = () => {
144
+ this.handleClick = event => {
145
145
  if (this.props.onClick) {
146
- this.props.onClick();
146
+ this.props.onClick(event);
147
147
  }
148
148
  };
149
149
 
@@ -291,6 +291,7 @@ class HiInput extends React.PureComponent {
291
291
  rows,
292
292
  inputClassName,
293
293
  onReset,
294
+ spellcheck,
294
295
  startAdornmentColor
295
296
  } = this.props;
296
297
  const {
@@ -385,6 +386,7 @@ class HiInput extends React.PureComponent {
385
386
  }
386
387
  }, eraseIcon, endAdornment),
387
388
  inputProps: {
389
+ spellCheck: spellcheck ? "true" : "false",
388
390
  className: classNames(inputClassName, classes.inputPropsClassName, {
389
391
  [classes.inputText]: !multiline,
390
392
  [classes.inputTextArea]: multiline
@@ -405,7 +407,8 @@ HiInput.defaultProps = {
405
407
  type: 'text',
406
408
  multiline: false,
407
409
  error: false,
408
- onlyNumbers: false
410
+ onlyNumbers: false,
411
+ spellcheck: false
409
412
  };
410
413
  HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
411
414
  /**
@@ -552,6 +555,11 @@ HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
552
555
  */
553
556
  rows: PropTypes.number,
554
557
 
558
+ /**
559
+ * Active browser default spellcheck (red underline)
560
+ */
561
+ spellcheck: PropTypes.bool,
562
+
555
563
  /**
556
564
  * Icône à afficher à gauche de l'input
557
565
  */
@@ -310,14 +310,12 @@ class HiUpload extends React.PureComponent {
310
310
  return React.createElement("div", {
311
311
  className: classes.flexContainer
312
312
  }, React.createElement("label", {
313
- htmlFor: "flat-button-file",
314
313
  ref: label => {
315
314
  this.uploadFieldRef = label;
316
315
  },
317
316
  tabIndex: "-1"
318
317
  }, React.createElement("input", {
319
318
  hidden: true,
320
- id: "flat-button-file",
321
319
  type: !complete || values.length === 1 ? 'file' : 'hidden',
322
320
  onChange: this.handleChange,
323
321
  onClick: focusable ? this.handleEmptyField : undefined,
@@ -185,11 +185,15 @@ class HiSelect extends React.PureComponent {
185
185
  }
186
186
  };
187
187
 
188
- this.handleBlur = () => {
188
+ this.handleBlur = event => {
189
189
  this.handleSearchReset();
190
190
  this.setState({
191
191
  focused: false
192
192
  });
193
+
194
+ if (this.props.onBlur && !this.inputEl.contains(event.relatedTarget) && !this.state.open) {
195
+ this.props.onBlur(event);
196
+ }
193
197
  };
194
198
 
195
199
  this.handleClick = () => {
@@ -467,9 +471,9 @@ class HiSelect extends React.PureComponent {
467
471
  onScrollReachBottom,
468
472
  onSubmit,
469
473
  placeholder,
474
+ searchValue = this.state.searchValue,
470
475
  startAdornment,
471
476
  staticPosition,
472
- searchValue = this.state.searchValue,
473
477
  buildSelectProps = this.buildSelectProps // use parent builder if defined
474
478
 
475
479
  } = this.props;
@@ -734,6 +738,11 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
734
738
  */
735
739
  name: PropTypes.string.isRequired,
736
740
 
741
+ /**
742
+ * Fonction de callback appelée lorsqu'on perd le focus
743
+ */
744
+ onBlur: PropTypes.func,
745
+
737
746
  /**
738
747
  * Fonction de callback qui renvoit la/les valeurs sélectionnées
739
748
  *
@@ -107,7 +107,7 @@ class HiSelectableList extends React.PureComponent {
107
107
  componentDidMount() {
108
108
  if (this.props.overlay && this.props.overlay.getElementsByTagName('li')[0]) {
109
109
  let item = this.props.overlay.getElementsByTagName('li')[0];
110
- const value = typeof this.props.value === 'object' ? this.props.value[0] : this.props.value;
110
+ const value = this.props.value && typeof this.props.value === 'object' ? this.props.value[0] : this.props.value;
111
111
 
112
112
  if (value) {
113
113
  if (typeof this.props.value[0] === 'string') {
@@ -62,6 +62,9 @@ export const styles = theme => ({
62
62
  cursor: 'default',
63
63
  opacity: 'inherit'
64
64
  },
65
+ selected: {
66
+ backgroundColor: theme.palette.action.selected
67
+ },
65
68
  pinned: {
66
69
  display: 'inherit',
67
70
  marginRight: 8,
@@ -292,6 +295,7 @@ class HiSelectableListItem extends React.PureComponent {
292
295
  },
293
296
  className: classNames(classes.listItem, classes.listItemHover, {
294
297
  [classes.disabled]: disabled,
298
+ [classes.selected]: selected,
295
299
  [classes.thin]: thin,
296
300
  [classes.pinned]: pinned,
297
301
  [classes.inline]: secondaryInline,
package/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.62
1
+ /** @license HiPay-Material-UI v2.0.0-beta.64
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.62
1
+ /** @license HiPay-Material-UI v2.0.0-beta.64
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
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.62",
5
+ "version": "2.0.0-beta.64",
6
6
  "description": "React components that implement Google's Material Design.",
7
7
  "keywords": [
8
8
  "react",
@@ -76,4 +76,4 @@
76
76
  },
77
77
  "main": "./index.js",
78
78
  "module": "./index.es.js"
79
- }
79
+ }
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.62
1
+ /** @license HiPay-Material-UI v2.0.0-beta.64
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -79511,9 +79511,9 @@
79511
79511
  }
79512
79512
  };
79513
79513
 
79514
- _this.handleClick = function () {
79514
+ _this.handleClick = function (event) {
79515
79515
  if (_this.props.onClick) {
79516
- _this.props.onClick();
79516
+ _this.props.onClick(event);
79517
79517
  }
79518
79518
  };
79519
79519
 
@@ -79667,6 +79667,7 @@
79667
79667
  rows = _this$props.rows,
79668
79668
  inputClassName = _this$props.inputClassName,
79669
79669
  onReset = _this$props.onReset,
79670
+ spellcheck = _this$props.spellcheck,
79670
79671
  startAdornmentColor = _this$props.startAdornmentColor;
79671
79672
  var focused = this.state.focused;
79672
79673
 
@@ -79748,6 +79749,7 @@
79748
79749
  }
79749
79750
  }, eraseIcon, endAdornment),
79750
79751
  inputProps: {
79752
+ spellCheck: spellcheck ? "true" : "false",
79751
79753
  className: classnames(inputClassName, classes.inputPropsClassName, (_classNames4 = {}, defineProperty(_classNames4, classes.inputText, !multiline), defineProperty(_classNames4, classes.inputTextArea, multiline), _classNames4))
79752
79754
  }
79753
79755
  }));
@@ -79778,7 +79780,8 @@
79778
79780
  type: 'text',
79779
79781
  multiline: false,
79780
79782
  error: false,
79781
- onlyNumbers: false
79783
+ onlyNumbers: false,
79784
+ spellcheck: false
79782
79785
  };
79783
79786
  HiInput.propTypes = {
79784
79787
  /**
@@ -79925,6 +79928,11 @@
79925
79928
  */
79926
79929
  rows: propTypes.number,
79927
79930
 
79931
+ /**
79932
+ * Active browser default spellcheck (red underline)
79933
+ */
79934
+ spellcheck: propTypes.bool,
79935
+
79928
79936
  /**
79929
79937
  * Icône à afficher à gauche de l'input
79930
79938
  */
@@ -84851,6 +84859,9 @@
84851
84859
  cursor: 'default',
84852
84860
  opacity: 'inherit'
84853
84861
  },
84862
+ selected: {
84863
+ backgroundColor: theme.palette.action.selected
84864
+ },
84854
84865
  pinned: {
84855
84866
  display: 'inherit',
84856
84867
  marginRight: 8,
@@ -85097,7 +85108,7 @@
85097
85108
  classes: {
85098
85109
  root: classes.root
85099
85110
  },
85100
- className: classnames(classes.listItem, classes.listItemHover, (_classNames = {}, defineProperty(_classNames, classes.disabled, disabled), defineProperty(_classNames, classes.thin, thin), defineProperty(_classNames, classes.pinned, pinned), defineProperty(_classNames, classes.inline, secondaryInline), defineProperty(_classNames, classes.listItemWithoutSecondaryInline, !secondaryInline), defineProperty(_classNames, classes.listItemInlineWithInfoWithoutSecondary, secondaryInline && info && !secondaryLabel), _classNames)),
85111
+ className: classnames(classes.listItem, classes.listItemHover, (_classNames = {}, defineProperty(_classNames, classes.disabled, disabled), defineProperty(_classNames, classes.selected, selected), defineProperty(_classNames, classes.thin, thin), defineProperty(_classNames, classes.pinned, pinned), defineProperty(_classNames, classes.inline, secondaryInline), defineProperty(_classNames, classes.listItemWithoutSecondaryInline, !secondaryInline), defineProperty(_classNames, classes.listItemInlineWithInfoWithoutSecondary, secondaryInline && info && !secondaryLabel), _classNames)),
85101
85112
  disabled: disabled
85102
85113
  }, disabled || {
85103
85114
  onClick: onSelect,
@@ -85434,7 +85445,7 @@
85434
85445
  value: function componentDidMount() {
85435
85446
  if (this.props.overlay && this.props.overlay.getElementsByTagName('li')[0]) {
85436
85447
  var item = this.props.overlay.getElementsByTagName('li')[0];
85437
- var value = _typeof_1(this.props.value) === 'object' ? this.props.value[0] : this.props.value;
85448
+ var value = this.props.value && _typeof_1(this.props.value) === 'object' ? this.props.value[0] : this.props.value;
85438
85449
 
85439
85450
  if (value) {
85440
85451
  if (typeof this.props.value[0] === 'string') {
@@ -113803,12 +113814,16 @@
113803
113814
  }
113804
113815
  };
113805
113816
 
113806
- _this.handleBlur = function () {
113817
+ _this.handleBlur = function (event) {
113807
113818
  _this.handleSearchReset();
113808
113819
 
113809
113820
  _this.setState({
113810
113821
  focused: false
113811
113822
  });
113823
+
113824
+ if (_this.props.onBlur && !_this.inputEl.contains(event.relatedTarget) && !_this.state.open) {
113825
+ _this.props.onBlur(event);
113826
+ }
113812
113827
  };
113813
113828
 
113814
113829
  _this.handleClick = function () {
@@ -114084,10 +114099,10 @@
114084
114099
  onScrollReachBottom = _this$props4.onScrollReachBottom,
114085
114100
  onSubmit = _this$props4.onSubmit,
114086
114101
  placeholder = _this$props4.placeholder,
114087
- startAdornment = _this$props4.startAdornment,
114088
- staticPosition = _this$props4.staticPosition,
114089
114102
  _this$props4$searchVa = _this$props4.searchValue,
114090
114103
  searchValue = _this$props4$searchVa === void 0 ? this.state.searchValue : _this$props4$searchVa,
114104
+ startAdornment = _this$props4.startAdornment,
114105
+ staticPosition = _this$props4.staticPosition,
114091
114106
  _this$props4$buildSel = _this$props4.buildSelectProps,
114092
114107
  buildSelectProps = _this$props4$buildSel === void 0 ? this.buildSelectProps : _this$props4$buildSel;
114093
114108
  var _this$state = this.state,
@@ -114368,6 +114383,11 @@
114368
114383
  */
114369
114384
  name: propTypes.string.isRequired,
114370
114385
 
114386
+ /**
114387
+ * Fonction de callback appelée lorsqu'on perd le focus
114388
+ */
114389
+ onBlur: propTypes.func,
114390
+
114371
114391
  /**
114372
114392
  * Fonction de callback qui renvoit la/les valeurs sélectionnées
114373
114393
  *