@hipay/hipay-material-ui 2.0.0-beta.61 → 2.0.0-beta.63
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 +136 -0
- package/HiDatePicker/HiDateRangeSelector.js +1 -1
- package/HiForm/HiInput.js +11 -3
- package/{HiSelectNew → HiSelect}/HiDynamicSelect.js +3 -3
- package/{HiSelectNew → HiSelect}/HiNestedSelect.js +9 -9
- package/{HiSelectNew → HiSelect}/HiNestedSelectContent.js +9 -9
- package/HiSelect/HiSelect.js +499 -608
- package/{HiSelectNew → HiSelect}/HiSelectContent.js +7 -7
- package/HiSelect/index.js +41 -3
- package/HiSelectableList/HiSelectableList.js +59 -3
- package/HiSelectableList/HiSelectableListItem.js +21 -6
- package/README.md +15 -0
- package/es/HiDatePicker/HiDateRangeSelector.js +1 -1
- package/es/HiForm/HiInput.js +11 -3
- package/es/{HiSelectNew → HiSelect}/HiNestedSelect.js +1 -1
- package/es/{HiSelectNew → HiSelect}/HiNestedSelectContent.js +1 -1
- package/es/HiSelect/HiSelect.js +451 -565
- package/es/{HiSelectNew → HiSelect}/HiSelectContent.js +1 -1
- package/es/HiSelect/index.js +4 -1
- package/es/HiSelectableList/HiSelectableList.js +56 -4
- package/es/HiSelectableList/HiSelectableListItem.js +18 -6
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -1
- package/umd/hipay-material-ui.development.js +41761 -39667
- package/umd/hipay-material-ui.production.min.js +2 -2
- package/HiSelect/SelectInput.js +0 -369
- package/HiSelectNew/HiSelect.js +0 -929
- package/HiSelectNew/HiSelectField.js +0 -146
- package/HiSelectNew/index.js +0 -69
- package/es/HiSelect/SelectInput.js +0 -321
- package/es/HiSelectNew/HiSelect.js +0 -852
- package/es/HiSelectNew/HiSelectField.js +0 -111
- package/es/HiSelectNew/index.js +0 -6
- /package/{HiSelectNew → HiSelect}/HiDynamicSelectField.js +0 -0
- /package/{HiSelectNew → HiSelect}/HiNestedSelectField.js +0 -0
- /package/{HiSelectNew → HiSelect}/HiSelectInput.js +0 -0
- /package/es/{HiSelectNew → HiSelect}/HiDynamicSelect.js +0 -0
- /package/es/{HiSelectNew → HiSelect}/HiDynamicSelectField.js +0 -0
- /package/es/{HiSelectNew → HiSelect}/HiNestedSelectField.js +0 -0
- /package/es/{HiSelectNew → HiSelect}/HiSelectInput.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,139 @@
|
|
|
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
|
+
|
|
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)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
* **eslint:** remove eslint warrnings in components (ignore test files) ([d236c62](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d236c62))
|
|
77
|
+
* **HiBreadcrumb:** clean eslint warnings ([6db12fb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6db12fb))
|
|
78
|
+
* **HiDatePicker:** add static positions for custom overlays ([c3edf24](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c3edf24))
|
|
79
|
+
* **HiExpansionPanel:** Fix props type a requirement ([cbc3b48](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cbc3b48))
|
|
80
|
+
* **HiInput:** handle focus state through prop when needed to override default comportment ([9a133cc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a133cc))
|
|
81
|
+
* **HiKpiNotice:** eslint clean warnings ([11b5552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/11b5552))
|
|
82
|
+
* **HiSelect:** Fix build of HiSelectContent ([4b87f78](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4b87f78))
|
|
83
|
+
* **HiSelect:** focus on undefined item ([2d084e6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2d084e6))
|
|
84
|
+
* **HiSelect:** handle staticPosition & width properly for HiDateRangeSelector usage ([7b19ffb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7b19ffb))
|
|
85
|
+
* **HiSelect:** remove HiSelectNew calls ([cc5397d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cc5397d))
|
|
86
|
+
* **HiSelectableListItem:** disabled item checkbox color ([9f10552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9f10552))
|
|
87
|
+
* **HiSelectableListItem:** remove item width ([a913945](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a913945))
|
|
88
|
+
* **HiSelectContent:** Remove compute of input value ([b86db83](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b86db83))
|
|
89
|
+
* **HiSlider:** eslint clean warnings ([08964b1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/08964b1))
|
|
90
|
+
* **HiUploadField:** clean eslint warnings ([c76aaf1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c76aaf1))
|
|
91
|
+
* **migration:** fix contrast threshold ... ([6fb3b18](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6fb3b18))
|
|
92
|
+
* **package:** add cross-env ([7098fd6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7098fd6))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Code Refactoring
|
|
96
|
+
|
|
97
|
+
* deleting the old HiSelect and replacing it by the new (PSYCHE-1382) ([d5fc252](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d5fc252))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
* **CellImage:** Handle fallbackImage ([254799d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/254799d))
|
|
103
|
+
* **CellSentinel:** Uniformize cell api with front CellSentinel ([4e2975b](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4e2975b))
|
|
104
|
+
* **CellSentinel:** Update CellSentinel to the new way (split each result in different column) ([efe2711](https://gitlab.hipay.org/backend/hipay-material-ui/commit/efe2711))
|
|
105
|
+
* **CellSentinelScore:** Add CellSentinelScore ([2fff04d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2fff04d))
|
|
106
|
+
* **CellText:** Handle active prop in CellText & column views in HiTable ([4366e60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4366e60))
|
|
107
|
+
* **HiCells:** Add simple cells types (Address, Date, Icon, Image, Numeric, PinToAction, Rate, Senti ([f688517](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f688517))
|
|
108
|
+
* **HiDatePicke:** add timezone props ([18360a5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/18360a5))
|
|
109
|
+
* **HiDatePicker:** BREAKING CHANGE - add local prop to handle calendar translations ([b1b3743](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1b3743))
|
|
110
|
+
* **HiIcon:** Add mdi-material-ui as available icons via 'mdi_' prefix ([1091d6d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/1091d6d))
|
|
111
|
+
* **HiMap:** unregister fetch on unmount ([0afa931](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0afa931))
|
|
112
|
+
* **HiSelect:** Add (NEW) HiSelect, HiNestedSelect, HiDynamicSelect ([4c6447e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4c6447e))
|
|
113
|
+
* **HiSelect:** Reset search input on blur & on close ([d9af584](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d9af584))
|
|
114
|
+
* **HiSelectableList:** Add sort props to sort item list on label ([f412ddc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f412ddc))
|
|
115
|
+
* **HiSelectContent:** Add new HiSelectContent & HiNestedSelectContent ([215ad8f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/215ad8f))
|
|
116
|
+
* **HiSelectContent:** export utils functions ([7c41d87](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7c41d87))
|
|
117
|
+
* **HiUploadField:** rename component HiUploadField ([593f77e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/593f77e))
|
|
118
|
+
* **notice:** Création notice KPI ([bba3f89](https://gitlab.hipay.org/backend/hipay-material-ui/commit/bba3f89))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Performance Improvements
|
|
122
|
+
|
|
123
|
+
* **PureFunction:** Use pure & functional components ([220c686](https://gitlab.hipay.org/backend/hipay-material-ui/commit/220c686))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### BREAKING CHANGES
|
|
127
|
+
|
|
128
|
+
* HiSelectNew no longer exist, make sure you're importing HiSelect instead
|
|
129
|
+
* **HiDatePicker:** Required "local" props (use polyglot, p.currentLocal)
|
|
130
|
+
* **HiUploadField:** Components names changes
|
|
131
|
+
* **HiCells:** Remove CellCountry, CellThirdParty, CellStatus & CellAccount (use generic type
|
|
132
|
+
CellImage & CellText)
|
|
133
|
+
* **HiSelect:** HiSelect API change, use HiNestedSelect or HiDynamicSelect relative to situation
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
1
137
|
<a name="2.0.0-beta.61"></a>
|
|
2
138
|
# [2.0.0-beta.61](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.61) (2019-01-24)
|
|
3
139
|
|
|
@@ -39,7 +39,7 @@ var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
|
|
|
39
39
|
|
|
40
40
|
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
|
41
41
|
|
|
42
|
-
var _HiSelectField = _interopRequireDefault(require("../
|
|
42
|
+
var _HiSelectField = _interopRequireDefault(require("../HiSelect/HiSelectField"));
|
|
43
43
|
|
|
44
44
|
var _HiDateRangePicker = _interopRequireDefault(require("./HiDateRangePicker"));
|
|
45
45
|
|
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
|
*/
|
|
@@ -80,7 +80,7 @@ function (_React$PureComponent) {
|
|
|
80
80
|
return id !== item.id;
|
|
81
81
|
}), item);
|
|
82
82
|
} else {
|
|
83
|
-
onChange(event, (0, _toConsumableArray2.default)(value)
|
|
83
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
|
|
@@ -91,14 +91,14 @@ function (_React$PureComponent) {
|
|
|
91
91
|
var _this$props2 = _this.props,
|
|
92
92
|
nextPage = _this$props2.nextPage,
|
|
93
93
|
translations = _this$props2.translations;
|
|
94
|
-
var itemList = (0, _toConsumableArray2.default)(options.length === 0 && !loading ? [{
|
|
94
|
+
var itemList = [].concat((0, _toConsumableArray2.default)(options.length === 0 && !loading ? [{
|
|
95
95
|
id: '_no_result',
|
|
96
96
|
type: 'text',
|
|
97
97
|
disabled: true,
|
|
98
98
|
centered: true,
|
|
99
99
|
hideCheckbox: true,
|
|
100
100
|
label: translations.no_result_match
|
|
101
|
-
}] : [])
|
|
101
|
+
}] : []), (0, _toConsumableArray2.default)(options), (0, _toConsumableArray2.default)(!loading && nextPage === 'manual' ? [{
|
|
102
102
|
id: '_next_page',
|
|
103
103
|
type: 'button',
|
|
104
104
|
centered: true,
|
|
@@ -47,12 +47,12 @@ var _helpers = require("../utils/helpers");
|
|
|
47
47
|
*/
|
|
48
48
|
function getRecursiveFinalItemIdList(itemList) {
|
|
49
49
|
var finalItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
50
|
-
return (0, _toConsumableArray2.default)(finalItemIdList)
|
|
50
|
+
return [].concat((0, _toConsumableArray2.default)(finalItemIdList), (0, _toConsumableArray2.default)(itemList.reduce(function (memo, item) {
|
|
51
51
|
if (item.children) {
|
|
52
52
|
return getRecursiveFinalItemIdList(item.children, memo);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
return (0, _toConsumableArray2.default)(memo)
|
|
55
|
+
return [].concat((0, _toConsumableArray2.default)(memo), [item.id]);
|
|
56
56
|
}, [])));
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -128,7 +128,7 @@ function buildFilteredItemList(itemList) {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return {
|
|
131
|
-
l: (0, _toConsumableArray2.default)(memoItemList)
|
|
131
|
+
l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _extends2.default)({}, item, disabledParent && {
|
|
132
132
|
disabled: true,
|
|
133
133
|
hideCheckbox: true // don't display checkbox on disabled parent
|
|
134
134
|
|
|
@@ -147,7 +147,7 @@ function buildFilteredItemList(itemList) {
|
|
|
147
147
|
|
|
148
148
|
var itemSelected = selectedItemIdList.includes(item.id);
|
|
149
149
|
return {
|
|
150
|
-
l: (0, _toConsumableArray2.default)(memoItemList)
|
|
150
|
+
l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _extends2.default)({
|
|
151
151
|
displayed: itemVisible || visibleParent
|
|
152
152
|
}, item)]),
|
|
153
153
|
s: itemSelected && memoSelected,
|
|
@@ -266,9 +266,9 @@ function (_React$PureComponent) {
|
|
|
266
266
|
}), item);
|
|
267
267
|
} else {
|
|
268
268
|
// select parent > add each selectable child without duplicates.
|
|
269
|
-
onChange(event, (0, _toConsumableArray2.default)(value.filter(function (vid) {
|
|
269
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value.filter(function (vid) {
|
|
270
270
|
return !parentSelectableItemIdList.includes(vid);
|
|
271
|
-
}))
|
|
271
|
+
})), (0, _toConsumableArray2.default)(parentSelectableItemIdList)), item);
|
|
272
272
|
}
|
|
273
273
|
} else if (value.includes(item.id)) {
|
|
274
274
|
// unselect item
|
|
@@ -276,7 +276,7 @@ function (_React$PureComponent) {
|
|
|
276
276
|
return id !== item.id;
|
|
277
277
|
}), item);
|
|
278
278
|
} else {
|
|
279
|
-
onChange(event, (0, _toConsumableArray2.default)(value)
|
|
279
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
282
|
|
|
@@ -315,14 +315,14 @@ function (_React$PureComponent) {
|
|
|
315
315
|
centered: true,
|
|
316
316
|
hideCheckbox: true,
|
|
317
317
|
label: translations.no_result_match
|
|
318
|
-
}]) : (0, _toConsumableArray2.default)(loading ? [{
|
|
318
|
+
}]) : [].concat((0, _toConsumableArray2.default)(loading ? [{
|
|
319
319
|
id: '_loading',
|
|
320
320
|
type: 'loader',
|
|
321
321
|
disabled: true,
|
|
322
322
|
centered: true,
|
|
323
323
|
hideCheckbox: true,
|
|
324
324
|
label: 'loading'
|
|
325
|
-
}] : [])
|
|
325
|
+
}] : []), (0, _toConsumableArray2.default)(hasAll ? [{
|
|
326
326
|
id: '_all',
|
|
327
327
|
iconAll: iconAll,
|
|
328
328
|
label: translations.all,
|
|
@@ -43,12 +43,12 @@ var _helpers = require("../utils/helpers");
|
|
|
43
43
|
*/
|
|
44
44
|
function getRecursiveFinalItemIdList(itemList) {
|
|
45
45
|
var finalItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
46
|
-
return (0, _toConsumableArray2.default)(finalItemIdList)
|
|
46
|
+
return [].concat((0, _toConsumableArray2.default)(finalItemIdList), (0, _toConsumableArray2.default)(itemList.reduce(function (memo, item) {
|
|
47
47
|
if (item.children) {
|
|
48
48
|
return getRecursiveFinalItemIdList(item.children, memo);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
return (0, _toConsumableArray2.default)(memo)
|
|
51
|
+
return [].concat((0, _toConsumableArray2.default)(memo), [item.id]);
|
|
52
52
|
}, [])));
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -124,7 +124,7 @@ function buildFilteredItemList(itemList) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
return {
|
|
127
|
-
l: (0, _toConsumableArray2.default)(memoItemList)
|
|
127
|
+
l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _extends2.default)({}, item, disabledParent && {
|
|
128
128
|
disabled: true,
|
|
129
129
|
hideCheckbox: true // don't display checkbox on disabled parent
|
|
130
130
|
|
|
@@ -143,7 +143,7 @@ function buildFilteredItemList(itemList) {
|
|
|
143
143
|
|
|
144
144
|
var itemSelected = selectedItemIdList.includes(item.id);
|
|
145
145
|
return {
|
|
146
|
-
l: (0, _toConsumableArray2.default)(memoItemList)
|
|
146
|
+
l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _extends2.default)({
|
|
147
147
|
displayed: itemVisible || visibleParent
|
|
148
148
|
}, item)]),
|
|
149
149
|
s: itemSelected && memoSelected,
|
|
@@ -223,9 +223,9 @@ function (_React$PureComponent) {
|
|
|
223
223
|
}), item);
|
|
224
224
|
} else {
|
|
225
225
|
// select parent > add each selectable child without duplicates.
|
|
226
|
-
onChange(event, (0, _toConsumableArray2.default)(value.filter(function (vid) {
|
|
226
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value.filter(function (vid) {
|
|
227
227
|
return !parentSelectableItemIdList.includes(vid);
|
|
228
|
-
}))
|
|
228
|
+
})), (0, _toConsumableArray2.default)(parentSelectableItemIdList)), item);
|
|
229
229
|
}
|
|
230
230
|
} else if (value.includes(item.id)) {
|
|
231
231
|
// unselect item
|
|
@@ -233,7 +233,7 @@ function (_React$PureComponent) {
|
|
|
233
233
|
return id !== item.id;
|
|
234
234
|
}), item);
|
|
235
235
|
} else {
|
|
236
|
-
onChange(event, (0, _toConsumableArray2.default)(value)
|
|
236
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
239
|
|
|
@@ -271,14 +271,14 @@ function (_React$PureComponent) {
|
|
|
271
271
|
centered: true,
|
|
272
272
|
hideCheckbox: true,
|
|
273
273
|
label: translations.no_result_match
|
|
274
|
-
}]) : (0, _toConsumableArray2.default)(loading ? [{
|
|
274
|
+
}]) : [].concat((0, _toConsumableArray2.default)(loading ? [{
|
|
275
275
|
id: '_loading',
|
|
276
276
|
type: 'loader',
|
|
277
277
|
disabled: true,
|
|
278
278
|
centered: true,
|
|
279
279
|
hideCheckbox: true,
|
|
280
280
|
label: 'loading'
|
|
281
|
-
}] : [])
|
|
281
|
+
}] : []), (0, _toConsumableArray2.default)(hasAll ? [{
|
|
282
282
|
id: '_all',
|
|
283
283
|
iconAll: iconAll,
|
|
284
284
|
label: translations.all,
|