@hipay/hipay-material-ui 2.0.0-beta.50 → 2.0.0-beta.52
Sign up to get free protection for your applications and to get access to all the features.
- package/HiCell/CellAddress.js +0 -1
- package/HiCheckbox/HiCheckbox.js +3 -3
- package/HiColoredLabel/HiColoredLabel.js +3 -2
- package/HiForm/HiInput.js +1 -5
- package/HiSelectNew/HiNestedSelectContent.js +410 -0
- package/HiSelectNew/HiSelectContent.js +525 -0
- package/HiSelectNew/index.js +31 -1
- package/HiSelectableList/HiSelectableListItem.js +10 -6
- package/HiTable/HiTableRow.js +11 -4
- package/es/HiCell/CellAddress.js +0 -1
- package/es/HiCheckbox/HiCheckbox.js +1 -1
- package/es/HiColoredLabel/HiColoredLabel.js +3 -2
- package/es/HiForm/HiInput.js +1 -5
- package/es/HiSelectNew/HiNestedSelectContent.js +347 -0
- package/es/HiSelectNew/HiSelectContent.js +457 -0
- package/es/HiSelectNew/index.js +3 -1
- package/es/HiSelectableList/HiSelectableListItem.js +6 -4
- package/es/HiTable/HiTableRow.js +10 -4
- package/es/styles/createPalette.js +9 -1
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/styles/createPalette.js +10 -1
- package/umd/hipay-material-ui.development.js +32 -22
- package/umd/hipay-material-ui.production.min.js +2 -2
package/HiCell/CellAddress.js
CHANGED
package/HiCheckbox/HiCheckbox.js
CHANGED
@@ -74,8 +74,8 @@ exports.styles = styles;
|
|
74
74
|
|
75
75
|
var HiCheckbox =
|
76
76
|
/*#__PURE__*/
|
77
|
-
function (_React$
|
78
|
-
(0, _inherits2.default)(HiCheckbox, _React$
|
77
|
+
function (_React$PureComponent) {
|
78
|
+
(0, _inherits2.default)(HiCheckbox, _React$PureComponent);
|
79
79
|
|
80
80
|
function HiCheckbox(props) {
|
81
81
|
var _this;
|
@@ -158,7 +158,7 @@ function (_React$Component) {
|
|
158
158
|
}
|
159
159
|
}]);
|
160
160
|
return HiCheckbox;
|
161
|
-
}(_react.default.
|
161
|
+
}(_react.default.PureComponent);
|
162
162
|
|
163
163
|
HiCheckbox.defaultProps = {
|
164
164
|
checked: false,
|
@@ -136,13 +136,14 @@ function HiColoredLabel(props) {
|
|
136
136
|
color = props.color,
|
137
137
|
active = props.active,
|
138
138
|
fontWeight = props.fontWeight,
|
139
|
+
style = props.style,
|
139
140
|
theme = props.theme,
|
140
|
-
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "label", "color", "active", "fontWeight", "theme"]);
|
141
|
+
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "label", "color", "active", "fontWeight", "style", "theme"]);
|
141
142
|
var isHiColor = ['primary', 'secondary', 'positive', 'negative', 'middle', 'neutral'].includes(color);
|
142
143
|
var isHexColor = !isHiColor && /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color);
|
143
144
|
return _react.default.createElement("div", (0, _extends2.default)({
|
144
145
|
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.color, !active), (0, _defineProperty2.default)(_classNames, classes.activeColor, active), (0, _defineProperty2.default)(_classNames, classes["activeColor".concat((0, _helpers.capitalize)(color))], active && isHiColor), (0, _defineProperty2.default)(_classNames, classes["color".concat((0, _helpers.capitalize)(color))], !active && isHiColor), _classNames), className),
|
145
|
-
style: (0, _extends2.default)({}, isHexColor && {
|
146
|
+
style: (0, _extends2.default)({}, style, isHexColor && {
|
146
147
|
backgroundColor: active ? color : (0, _colorManipulator.fade)(color, 0.08),
|
147
148
|
color: active ? theme.palette.getContrastText(color) : color
|
148
149
|
}, fontWeight && {
|
package/HiForm/HiInput.js
CHANGED
@@ -196,12 +196,8 @@ function (_React$PureComponent) {
|
|
196
196
|
}, {
|
197
197
|
key: "handleChange",
|
198
198
|
value: function handleChange(event) {
|
199
|
-
var authorizedChar = '1234567890TOto<>';
|
200
|
-
|
201
199
|
if (this.props.onChange) {
|
202
|
-
|
203
|
-
this.props.onChange(event);
|
204
|
-
}
|
200
|
+
this.props.onChange(event);
|
205
201
|
}
|
206
202
|
}
|
207
203
|
}, {
|
@@ -0,0 +1,410 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.getRecursiveFinalItemIdList = getRecursiveFinalItemIdList;
|
9
|
+
exports.findFinalItemRecursively = findFinalItemRecursively;
|
10
|
+
exports.default = void 0;
|
11
|
+
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
13
|
+
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
15
|
+
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
17
|
+
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
19
|
+
|
20
|
+
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
21
|
+
|
22
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
23
|
+
|
24
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
25
|
+
|
26
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
27
|
+
|
28
|
+
var _react = _interopRequireDefault(require("react"));
|
29
|
+
|
30
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
31
|
+
|
32
|
+
var _HiSelectContent = _interopRequireDefault(require("./HiSelectContent"));
|
33
|
+
|
34
|
+
var _helpers = require("../utils/helpers");
|
35
|
+
|
36
|
+
// @inheritedComponent HiSelectContent
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Return array of final item id in nested list (via props children)
|
40
|
+
* @param itemList
|
41
|
+
* @param finalItemIdList
|
42
|
+
* @returns {*[]}
|
43
|
+
*/
|
44
|
+
function getRecursiveFinalItemIdList(itemList) {
|
45
|
+
var finalItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
46
|
+
return (0, _toConsumableArray2.default)(finalItemIdList).concat((0, _toConsumableArray2.default)(itemList.reduce(function (memo, item) {
|
47
|
+
if (item.children) {
|
48
|
+
return getRecursiveFinalItemIdList(item.children, memo);
|
49
|
+
}
|
50
|
+
|
51
|
+
return (0, _toConsumableArray2.default)(memo).concat([item.id]);
|
52
|
+
}, [])));
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Find item by id in nested list (via props children)
|
56
|
+
* @param itemList
|
57
|
+
* @param searchId
|
58
|
+
* @returns {boolean}
|
59
|
+
*/
|
60
|
+
|
61
|
+
|
62
|
+
function findFinalItemRecursively(itemList, searchId) {
|
63
|
+
var foundItem = false;
|
64
|
+
itemList.some(function (item) {
|
65
|
+
if (item.id === searchId) {
|
66
|
+
foundItem = item;
|
67
|
+
} else if (item.children && !foundItem) {
|
68
|
+
foundItem = findFinalItemRecursively(item.children, searchId);
|
69
|
+
}
|
70
|
+
|
71
|
+
return foundItem !== false;
|
72
|
+
});
|
73
|
+
return foundItem;
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* Build item list by settings item props relative to the nested parent/child situation
|
77
|
+
* Reduce the item list to build specified items (displayed, pinned, disabled, selected, indeterminate)
|
78
|
+
* Parent item is selected if each children item is include in selectedItemIdList (s stay to true)
|
79
|
+
* Parent item is indeterminate if it is not selected & not unselected (s goes false & u goes false)
|
80
|
+
*
|
81
|
+
* @param itemList - initial list of item
|
82
|
+
* @param selectedItemIdList - global list of selected id
|
83
|
+
* @param searchValue - search value on which filter item
|
84
|
+
* @param visibleParent - visibility of the list parent item (default false)
|
85
|
+
* @param pinnedParent - parent will be displayed as pinned items
|
86
|
+
* @param disabledParent - parent will not be selectable
|
87
|
+
* @param nbChildrenAsInfo - Show children number as info
|
88
|
+
* @param translations - Translations
|
89
|
+
* @returns {*}
|
90
|
+
*/
|
91
|
+
|
92
|
+
|
93
|
+
function buildFilteredItemList(itemList) {
|
94
|
+
var selectedItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
95
|
+
var searchValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
96
|
+
var visibleParent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
97
|
+
var pinnedParent = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
98
|
+
var disabledParent = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
99
|
+
var nbChildrenAsInfo = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
100
|
+
var translations = arguments.length > 7 ? arguments[7] : undefined;
|
101
|
+
return itemList.reduce(function (_ref, item) {
|
102
|
+
var memoItemList = _ref.l,
|
103
|
+
memoSelected = _ref.s,
|
104
|
+
memoUnselected = _ref.u,
|
105
|
+
memoVisible = _ref.v;
|
106
|
+
var itemVisible = searchValue === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(searchValue.toLowerCase())) !== -1; // Parent item
|
107
|
+
|
108
|
+
if (item.children) {
|
109
|
+
var _buildFilteredItemLis = buildFilteredItemList(item.children, selectedItemIdList, searchValue, itemVisible, pinnedParent, disabledParent),
|
110
|
+
customizedChildren = _buildFilteredItemLis.l,
|
111
|
+
selected = _buildFilteredItemLis.s,
|
112
|
+
unselected = _buildFilteredItemLis.u,
|
113
|
+
visible = _buildFilteredItemLis.v;
|
114
|
+
|
115
|
+
if (nbChildrenAsInfo) {
|
116
|
+
item.info = translations.n_children.replace('%s', item.children.length);
|
117
|
+
}
|
118
|
+
|
119
|
+
return {
|
120
|
+
l: (0, _toConsumableArray2.default)(memoItemList).concat([(0, _extends2.default)({}, item, disabledParent && {
|
121
|
+
disabled: true,
|
122
|
+
hideCheckbox: true // don't display checkbox on disabled parent
|
123
|
+
|
124
|
+
}, {
|
125
|
+
pinned: pinnedParent,
|
126
|
+
children: customizedChildren,
|
127
|
+
selected: selected,
|
128
|
+
indeterminate: !selected && !unselected,
|
129
|
+
displayed: itemVisible || visible
|
130
|
+
})]),
|
131
|
+
s: memoSelected && selected,
|
132
|
+
u: memoUnselected && unselected,
|
133
|
+
v: memoVisible || itemVisible || visible
|
134
|
+
};
|
135
|
+
}
|
136
|
+
|
137
|
+
var itemSelected = selectedItemIdList.includes(item.id);
|
138
|
+
return {
|
139
|
+
l: (0, _toConsumableArray2.default)(memoItemList).concat([(0, _extends2.default)({
|
140
|
+
displayed: itemVisible || visibleParent
|
141
|
+
}, item)]),
|
142
|
+
s: itemSelected && memoSelected,
|
143
|
+
u: !itemSelected && memoUnselected,
|
144
|
+
v: itemVisible || visibleParent || memoVisible
|
145
|
+
};
|
146
|
+
}, {
|
147
|
+
l: [],
|
148
|
+
s: true,
|
149
|
+
u: true,
|
150
|
+
v: visibleParent
|
151
|
+
});
|
152
|
+
}
|
153
|
+
/**
|
154
|
+
* HiNestedSelectContent hérite du composant HiSelectContent
|
155
|
+
*
|
156
|
+
* Sa fonction buildSelectProps construit la liste des options selon le comportement d'un object nested
|
157
|
+
* (association parent/child via la prop children). Le composant accepte des props spécifique à cet utilisation,
|
158
|
+
* comme disableParent ou pinnedParent. Uniquement les ids des enfants finaux (n'ayant pas d'enfants) sont considérés.
|
159
|
+
* Comportement:
|
160
|
+
* - si un parent est sélectionné, on ajoute tous ses enfants dans la liste des éléments sélectionné (mais pas le parent)
|
161
|
+
* - si tous les enfants sont sélectionnés, le parent est affiché "selected".
|
162
|
+
* - si une partie des enfants sont sélectionné, le parent est affiché "indeterminate".
|
163
|
+
* - si aucun enfant n'est sélectionné, le parent est affiché "unselected".
|
164
|
+
*/
|
165
|
+
|
166
|
+
|
167
|
+
var HiNestedSelectContent =
|
168
|
+
/*#__PURE__*/
|
169
|
+
function (_React$PureComponent) {
|
170
|
+
(0, _inherits2.default)(HiNestedSelectContent, _React$PureComponent);
|
171
|
+
|
172
|
+
function HiNestedSelectContent() {
|
173
|
+
var _getPrototypeOf2;
|
174
|
+
|
175
|
+
var _this;
|
176
|
+
|
177
|
+
(0, _classCallCheck2.default)(this, HiNestedSelectContent);
|
178
|
+
|
179
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
180
|
+
args[_key] = arguments[_key];
|
181
|
+
}
|
182
|
+
|
183
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (_getPrototypeOf2 = (0, _getPrototypeOf3.default)(HiNestedSelectContent)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
184
|
+
|
185
|
+
_this.handleSelect = function (event, item) {
|
186
|
+
var _this$props = _this.props,
|
187
|
+
hasAll = _this$props.hasAll,
|
188
|
+
multiple = _this$props.multiple,
|
189
|
+
onChange = _this$props.onChange,
|
190
|
+
options = _this$props.options,
|
191
|
+
value = _this$props.value;
|
192
|
+
|
193
|
+
if (!multiple) {
|
194
|
+
// single value
|
195
|
+
onChange(event, item.id, item);
|
196
|
+
} else if (hasAll && item.id === '_all') {
|
197
|
+
// ALL
|
198
|
+
var selectableItemIdList = getRecursiveFinalItemIdList(options);
|
199
|
+
|
200
|
+
if (value.length === selectableItemIdList.length) {
|
201
|
+
// unselect _all options
|
202
|
+
onChange(event, [], item);
|
203
|
+
} else {
|
204
|
+
// select _all options
|
205
|
+
onChange(event, selectableItemIdList, item);
|
206
|
+
}
|
207
|
+
} else if (item.children) {
|
208
|
+
// PARENT
|
209
|
+
var parentSelectableItemIdList = getRecursiveFinalItemIdList(item.children); // deselect parent if every selectable child id is includes in value.
|
210
|
+
|
211
|
+
if (parentSelectableItemIdList.every(function (pid) {
|
212
|
+
return value.includes(pid);
|
213
|
+
})) {
|
214
|
+
onChange(event, value.filter(function (vid) {
|
215
|
+
return !parentSelectableItemIdList.includes(vid);
|
216
|
+
}), item);
|
217
|
+
} else {
|
218
|
+
// select parent > add each selectable child without duplicates.
|
219
|
+
onChange(event, (0, _toConsumableArray2.default)(value.filter(function (vid) {
|
220
|
+
return !parentSelectableItemIdList.includes(vid);
|
221
|
+
})).concat((0, _toConsumableArray2.default)(parentSelectableItemIdList)), item);
|
222
|
+
}
|
223
|
+
} else if (value.includes(item.id)) {
|
224
|
+
// unselect item
|
225
|
+
onChange(event, value.filter(function (id) {
|
226
|
+
return id !== item.id;
|
227
|
+
}), item);
|
228
|
+
} else {
|
229
|
+
onChange(event, (0, _toConsumableArray2.default)(value).concat([item.id]), item);
|
230
|
+
}
|
231
|
+
};
|
232
|
+
|
233
|
+
_this.buildSelectProps = function (options) {
|
234
|
+
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
235
|
+
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
236
|
+
var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
237
|
+
var _this$props2 = _this.props,
|
238
|
+
classes = _this$props2.classes,
|
239
|
+
disabledParent = _this$props2.disabledParent,
|
240
|
+
hasAll = _this$props2.hasAll,
|
241
|
+
iconAll = _this$props2.iconAll,
|
242
|
+
multiple = _this$props2.multiple,
|
243
|
+
nbChildrenAsInfo = _this$props2.nbChildrenAsInfo,
|
244
|
+
pinnedParent = _this$props2.pinnedParent,
|
245
|
+
translations = _this$props2.translations; // build item list
|
246
|
+
|
247
|
+
var _buildFilteredItemLis2 = buildFilteredItemList(options, value, search, false, pinnedParent, disabledParent || !multiple, nbChildrenAsInfo, translations),
|
248
|
+
filteredItemList = _buildFilteredItemLis2.l,
|
249
|
+
allSelected = _buildFilteredItemLis2.s,
|
250
|
+
allUnselected = _buildFilteredItemLis2.u,
|
251
|
+
visible = _buildFilteredItemLis2.v;
|
252
|
+
|
253
|
+
var itemList = !visible ? (0, _toConsumableArray2.default)(loading ? [{
|
254
|
+
id: '_loading',
|
255
|
+
type: 'loader',
|
256
|
+
disabled: true,
|
257
|
+
centered: true,
|
258
|
+
hideCheckbox: true,
|
259
|
+
label: 'loading'
|
260
|
+
}] : [{
|
261
|
+
id: '_no_result',
|
262
|
+
type: 'text',
|
263
|
+
disabled: true,
|
264
|
+
centered: true,
|
265
|
+
hideCheckbox: true,
|
266
|
+
label: translations.no_result_match
|
267
|
+
}]) : (0, _toConsumableArray2.default)(loading ? [{
|
268
|
+
id: '_loading',
|
269
|
+
type: 'loader',
|
270
|
+
disabled: true,
|
271
|
+
centered: true,
|
272
|
+
hideCheckbox: true,
|
273
|
+
label: 'loading'
|
274
|
+
}] : []).concat((0, _toConsumableArray2.default)(hasAll ? [{
|
275
|
+
id: '_all',
|
276
|
+
iconAll: iconAll,
|
277
|
+
label: translations.all,
|
278
|
+
selected: allSelected,
|
279
|
+
indeterminate: !allSelected && !allUnselected,
|
280
|
+
displayed: search === ''
|
281
|
+
}] : []), (0, _toConsumableArray2.default)(filteredItemList));
|
282
|
+
return {
|
283
|
+
itemList: itemList
|
284
|
+
};
|
285
|
+
};
|
286
|
+
|
287
|
+
return _this;
|
288
|
+
}
|
289
|
+
|
290
|
+
(0, _createClass2.default)(HiNestedSelectContent, [{
|
291
|
+
key: "render",
|
292
|
+
value: function render() {
|
293
|
+
var _this$props3 = this.props,
|
294
|
+
hasAll = _this$props3.hasAll,
|
295
|
+
hiSelectableListProps = _this$props3.hiSelectableListProps,
|
296
|
+
multiple = _this$props3.multiple,
|
297
|
+
options = _this$props3.options,
|
298
|
+
searchable = _this$props3.searchable,
|
299
|
+
translations = _this$props3.translations,
|
300
|
+
value = _this$props3.value,
|
301
|
+
other = (0, _objectWithoutProperties2.default)(_this$props3, ["hasAll", "hiSelectableListProps", "multiple", "options", "searchable", "translations", "value"]);
|
302
|
+
|
303
|
+
if (multiple) {
|
304
|
+
if (!Array.isArray(value)) {
|
305
|
+
throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
return _react.default.createElement(_HiSelectContent.default, (0, _extends2.default)({
|
310
|
+
buildSelectProps: this.buildSelectProps,
|
311
|
+
hasAll: hasAll,
|
312
|
+
hiSelectableListProps: (0, _extends2.default)({
|
313
|
+
onSelect: this.handleSelect
|
314
|
+
}, hiSelectableListProps),
|
315
|
+
multiple: multiple,
|
316
|
+
options: options,
|
317
|
+
searchable: searchable,
|
318
|
+
translations: translations,
|
319
|
+
value: value
|
320
|
+
}, other));
|
321
|
+
}
|
322
|
+
}]);
|
323
|
+
return HiNestedSelectContent;
|
324
|
+
}(_react.default.PureComponent);
|
325
|
+
|
326
|
+
HiNestedSelectContent.defaultProps = {
|
327
|
+
disabledParent: false,
|
328
|
+
hasAll: false,
|
329
|
+
multiple: false,
|
330
|
+
pinnedParent: false,
|
331
|
+
searchable: false,
|
332
|
+
translations: {
|
333
|
+
all: 'All',
|
334
|
+
no_result_match: 'No result match',
|
335
|
+
search: 'Search',
|
336
|
+
n_children: '%s',
|
337
|
+
one_child: '%s item'
|
338
|
+
}
|
339
|
+
};
|
340
|
+
HiNestedSelectContent.propTypes = process.env.NODE_ENV !== "production" ? {
|
341
|
+
/**
|
342
|
+
* Useful to extend the style applied to components.
|
343
|
+
*/
|
344
|
+
classes: _propTypes.default.object,
|
345
|
+
|
346
|
+
/**
|
347
|
+
* Parent items are not selectable
|
348
|
+
*/
|
349
|
+
disabledParent: _propTypes.default.bool,
|
350
|
+
|
351
|
+
/**
|
352
|
+
* Affiche l'élément 'All'
|
353
|
+
*/
|
354
|
+
hasAll: _propTypes.default.bool,
|
355
|
+
|
356
|
+
/**
|
357
|
+
* id du select
|
358
|
+
*/
|
359
|
+
id: _propTypes.default.string,
|
360
|
+
|
361
|
+
/**
|
362
|
+
* Ajoute un loader
|
363
|
+
*/
|
364
|
+
loading: _propTypes.default.bool,
|
365
|
+
|
366
|
+
/**
|
367
|
+
* Autorise la sélection de plusieurs valeurs
|
368
|
+
*/
|
369
|
+
multiple: _propTypes.default.bool,
|
370
|
+
|
371
|
+
/**
|
372
|
+
* Définit si l'on doit afficher le nombre d'enfants du parent dans son champ info
|
373
|
+
*/
|
374
|
+
nbChildrenAsInfo: _propTypes.default.bool,
|
375
|
+
|
376
|
+
/**
|
377
|
+
* Fonction de callback qui renvoit la/les valeurs sélectionnées
|
378
|
+
*
|
379
|
+
* @param {object} event
|
380
|
+
* @param {string || array} value
|
381
|
+
*/
|
382
|
+
onChange: _propTypes.default.func.isRequired,
|
383
|
+
|
384
|
+
/**
|
385
|
+
* Listes des options du select
|
386
|
+
*/
|
387
|
+
options: _propTypes.default.array.isRequired,
|
388
|
+
|
389
|
+
/**
|
390
|
+
* Parent items are pinned, with sticky behavior (hide checkboxes but still selectable)
|
391
|
+
*/
|
392
|
+
pinnedParent: _propTypes.default.bool,
|
393
|
+
|
394
|
+
/**
|
395
|
+
* Affiche un input de recherche permettant de filtrer les options
|
396
|
+
*/
|
397
|
+
searchable: _propTypes.default.bool,
|
398
|
+
|
399
|
+
/**
|
400
|
+
* Traductions (par défaut en anglais)
|
401
|
+
*/
|
402
|
+
translations: _propTypes.default.object,
|
403
|
+
|
404
|
+
/**
|
405
|
+
* Value(s) du select
|
406
|
+
*/
|
407
|
+
value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array])
|
408
|
+
} : {};
|
409
|
+
var _default = HiNestedSelectContent;
|
410
|
+
exports.default = _default;
|