@splunk/react-ui 4.21.1 → 4.22.1
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 +24 -1
- package/Code.js +0 -1
- package/Color.js +238 -235
- package/ComboBox.js +197 -185
- package/Date.js +3 -3
- package/List.js +17 -12
- package/Menu.js +100 -101
- package/Message.js +1 -1
- package/Multiselect.js +655 -641
- package/Number.js +3 -3
- package/RadioBar.js +91 -67
- package/ResultsMenu.js +107 -122
- package/Search.js +258 -246
- package/Select.js +461 -457
- package/Slider.js +87 -76
- package/TabBar.js +99 -84
- package/Table.js +805 -673
- package/Text.js +25 -15
- package/TextArea.js +27 -17
- package/package.json +5 -5
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/ComboBox/ComboBox.d.ts +13 -3
- package/types/src/Date/Date.d.ts +13 -3
- package/types/src/List/List.d.ts +11 -4
- package/types/src/Number/Number.d.ts +13 -3
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Search/Search.d.ts +13 -3
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/types/src/Text/Text.d.ts +13 -3
- package/types/src/TextArea/TextArea.d.ts +13 -3
- package/Code.js.LICENSE.txt +0 -8
package/Multiselect.js
CHANGED
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
Divider: () => /* reexport */ p.Divider,
|
|
65
65
|
Heading: () => /* reexport */ p.Heading,
|
|
66
66
|
Option: () => /* reexport */ J,
|
|
67
|
-
default: () => /* reexport */
|
|
67
|
+
default: () => /* reexport */ Fr
|
|
68
68
|
});
|
|
69
69
|
// CONCATENATED MODULE: external "react"
|
|
70
70
|
const n = require("react");
|
|
71
71
|
var r = e.n(n);
|
|
72
72
|
// CONCATENATED MODULE: external "prop-types"
|
|
73
73
|
const o = require("prop-types");
|
|
74
|
-
var
|
|
74
|
+
var a = e.n(o);
|
|
75
75
|
// CONCATENATED MODULE: external "lodash/has"
|
|
76
|
-
const
|
|
77
|
-
var l = e.n(
|
|
76
|
+
const i = require("lodash/has");
|
|
77
|
+
var l = e.n(i);
|
|
78
78
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
79
79
|
const s = require("lodash/omit");
|
|
80
80
|
var c = e.n(s);
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
var n = h(e, t);
|
|
116
116
|
var r, o;
|
|
117
117
|
if (Object.getOwnPropertySymbols) {
|
|
118
|
-
var
|
|
119
|
-
for (o = 0; o <
|
|
120
|
-
r =
|
|
118
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
119
|
+
for (o = 0; o < a.length; o++) {
|
|
120
|
+
r = a[o];
|
|
121
121
|
if (t.indexOf(r) >= 0) continue;
|
|
122
122
|
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
123
123
|
n[r] = e[r];
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
if (e == null) return {};
|
|
130
130
|
var n = {};
|
|
131
131
|
var r = Object.keys(e);
|
|
132
|
-
var o,
|
|
133
|
-
for (
|
|
134
|
-
o = r[
|
|
132
|
+
var o, a;
|
|
133
|
+
for (a = 0; a < r.length; a++) {
|
|
134
|
+
o = r[a];
|
|
135
135
|
if (t.indexOf(o) >= 0) continue;
|
|
136
136
|
n[o] = e[o];
|
|
137
137
|
}
|
|
@@ -181,8 +181,8 @@
|
|
|
181
181
|
return function n() {
|
|
182
182
|
var r = k(e), o;
|
|
183
183
|
if (t) {
|
|
184
|
-
var
|
|
185
|
-
o = Reflect.construct(r, arguments,
|
|
184
|
+
var a = k(this).constructor;
|
|
185
|
+
o = Reflect.construct(r, arguments, a);
|
|
186
186
|
} else {
|
|
187
187
|
o = r.apply(this, arguments);
|
|
188
188
|
}
|
|
@@ -233,28 +233,28 @@
|
|
|
233
233
|
}
|
|
234
234
|
var j = {
|
|
235
235
|
/** @private */
|
|
236
|
-
active:
|
|
237
|
-
children:
|
|
238
|
-
description:
|
|
239
|
-
descriptionPosition:
|
|
240
|
-
disabled:
|
|
241
|
-
hidden:
|
|
242
|
-
icon:
|
|
243
|
-
label:
|
|
236
|
+
active: a().bool,
|
|
237
|
+
children: a().node,
|
|
238
|
+
description: a().string,
|
|
239
|
+
descriptionPosition: a().oneOf([ "right", "bottom" ]),
|
|
240
|
+
disabled: a().bool,
|
|
241
|
+
hidden: a().bool,
|
|
242
|
+
icon: a().node,
|
|
243
|
+
label: a().string.isRequired,
|
|
244
244
|
/**
|
|
245
245
|
* @private Passed down from <BaseSelect>
|
|
246
246
|
*/
|
|
247
|
-
multiple:
|
|
248
|
-
matchRanges:
|
|
249
|
-
start:
|
|
250
|
-
end:
|
|
247
|
+
multiple: a().bool,
|
|
248
|
+
matchRanges: a().arrayOf(a().shape({
|
|
249
|
+
start: a().number.isRequired,
|
|
250
|
+
end: a().number.isRequired
|
|
251
251
|
})),
|
|
252
252
|
/** @private */
|
|
253
|
-
onClick:
|
|
253
|
+
onClick: a().func,
|
|
254
254
|
/** @private */
|
|
255
|
-
selected:
|
|
256
|
-
truncate:
|
|
257
|
-
value:
|
|
255
|
+
selected: a().bool,
|
|
256
|
+
truncate: a().bool,
|
|
257
|
+
value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
|
|
258
258
|
};
|
|
259
259
|
var _ = {
|
|
260
260
|
descriptionPosition: "bottom",
|
|
@@ -273,14 +273,14 @@
|
|
|
273
273
|
function n() {
|
|
274
274
|
var e;
|
|
275
275
|
b(this, n);
|
|
276
|
-
for (var r = arguments.length, o = new Array(r),
|
|
277
|
-
o[
|
|
276
|
+
for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++) {
|
|
277
|
+
o[a] = arguments[a];
|
|
278
278
|
}
|
|
279
279
|
e = t.call.apply(t, [ this ].concat(o));
|
|
280
280
|
I(C(e), "c", null);
|
|
281
281
|
I(C(e), "handleClick", (function(t) {
|
|
282
|
-
var n = e.props, r = n.onClick, o = n.value,
|
|
283
|
-
if (!
|
|
282
|
+
var n = e.props, r = n.onClick, o = n.value, a = n.disabled;
|
|
283
|
+
if (!a) {
|
|
284
284
|
r === null || r === void 0 ? void 0 : r(t, {
|
|
285
285
|
value: o
|
|
286
286
|
});
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
}, {
|
|
309
309
|
key: "render",
|
|
310
310
|
value: function e() {
|
|
311
|
-
var t = this.props, n = t.value, o = t.children,
|
|
311
|
+
var t = this.props, n = t.value, o = t.children, a = t.label, i = t.multiple, l = v(t, [ "value", "children", "label", "multiple" ]);
|
|
312
312
|
|
|
313
313
|
return r().createElement(p.Item, d({
|
|
314
314
|
"aria-selected": this.props.selected,
|
|
@@ -317,11 +317,11 @@
|
|
|
317
317
|
ref: this.handleMount
|
|
318
318
|
}, l, {
|
|
319
319
|
selectable: true,
|
|
320
|
-
selectableAppearance:
|
|
320
|
+
selectableAppearance: i ? "checkbox" : undefined,
|
|
321
321
|
onClick: this.handleClick,
|
|
322
322
|
role: "option",
|
|
323
323
|
value: n.toString()
|
|
324
|
-
}), o ||
|
|
324
|
+
}), o || a);
|
|
325
325
|
}
|
|
326
326
|
} ]);
|
|
327
327
|
return n;
|
|
@@ -363,9 +363,9 @@
|
|
|
363
363
|
var n = R(e, t);
|
|
364
364
|
var r, o;
|
|
365
365
|
if (Object.getOwnPropertySymbols) {
|
|
366
|
-
var
|
|
367
|
-
for (o = 0; o <
|
|
368
|
-
r =
|
|
366
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
367
|
+
for (o = 0; o < a.length; o++) {
|
|
368
|
+
r = a[o];
|
|
369
369
|
if (t.indexOf(r) >= 0) continue;
|
|
370
370
|
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
371
371
|
n[r] = e[r];
|
|
@@ -377,9 +377,9 @@
|
|
|
377
377
|
if (e == null) return {};
|
|
378
378
|
var n = {};
|
|
379
379
|
var r = Object.keys(e);
|
|
380
|
-
var o,
|
|
381
|
-
for (
|
|
382
|
-
o = r[
|
|
380
|
+
var o, a;
|
|
381
|
+
for (a = 0; a < r.length; a++) {
|
|
382
|
+
o = r[a];
|
|
383
383
|
if (t.indexOf(o) >= 0) continue;
|
|
384
384
|
n[o] = e[o];
|
|
385
385
|
}
|
|
@@ -429,8 +429,8 @@
|
|
|
429
429
|
return function n() {
|
|
430
430
|
var r = H(e), o;
|
|
431
431
|
if (t) {
|
|
432
|
-
var
|
|
433
|
-
o = Reflect.construct(r, arguments,
|
|
432
|
+
var a = H(this).constructor;
|
|
433
|
+
o = Reflect.construct(r, arguments, a);
|
|
434
434
|
} else {
|
|
435
435
|
o = r.apply(this, arguments);
|
|
436
436
|
}
|
|
@@ -481,31 +481,31 @@
|
|
|
481
481
|
}
|
|
482
482
|
var z = {
|
|
483
483
|
/** @private */
|
|
484
|
-
active:
|
|
485
|
-
children:
|
|
484
|
+
active: a().bool,
|
|
485
|
+
children: a().node,
|
|
486
486
|
/**
|
|
487
487
|
* @private this is passed down from Multiselect.
|
|
488
488
|
*/
|
|
489
|
-
compact:
|
|
490
|
-
description:
|
|
491
|
-
descriptionPosition:
|
|
492
|
-
disabled:
|
|
493
|
-
hidden:
|
|
494
|
-
icon:
|
|
495
|
-
label:
|
|
496
|
-
matchRanges:
|
|
497
|
-
start:
|
|
498
|
-
end:
|
|
489
|
+
compact: a().bool,
|
|
490
|
+
description: a().string,
|
|
491
|
+
descriptionPosition: a().oneOf([ "right", "bottom" ]),
|
|
492
|
+
disabled: a().bool,
|
|
493
|
+
hidden: a().bool,
|
|
494
|
+
icon: a().node,
|
|
495
|
+
label: a().string.isRequired,
|
|
496
|
+
matchRanges: a().arrayOf(a().shape({
|
|
497
|
+
start: a().number.isRequired,
|
|
498
|
+
end: a().number.isRequired
|
|
499
499
|
})),
|
|
500
500
|
/** @private */
|
|
501
|
-
onClick:
|
|
501
|
+
onClick: a().func,
|
|
502
502
|
/** @private */
|
|
503
|
-
selected:
|
|
504
|
-
selectedAppearance:
|
|
505
|
-
selectedBackgroundColor:
|
|
506
|
-
selectedForegroundColor:
|
|
507
|
-
truncate:
|
|
508
|
-
value:
|
|
503
|
+
selected: a().bool,
|
|
504
|
+
selectedAppearance: a().oneOf([ "info", "success", "warning", "error" ]),
|
|
505
|
+
selectedBackgroundColor: a().string,
|
|
506
|
+
selectedForegroundColor: a().string,
|
|
507
|
+
truncate: a().bool,
|
|
508
|
+
value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
|
|
509
509
|
};
|
|
510
510
|
var U = {
|
|
511
511
|
compact: false,
|
|
@@ -524,8 +524,8 @@
|
|
|
524
524
|
function n() {
|
|
525
525
|
var e;
|
|
526
526
|
T(this, n);
|
|
527
|
-
for (var r = arguments.length, o = new Array(r),
|
|
528
|
-
o[
|
|
527
|
+
for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++) {
|
|
528
|
+
o[a] = arguments[a];
|
|
529
529
|
}
|
|
530
530
|
e = t.call.apply(t, [ this ].concat(o));
|
|
531
531
|
W(F(e), "c", null);
|
|
@@ -578,10 +578,10 @@
|
|
|
578
578
|
var re = e.n(ne);
|
|
579
579
|
// CONCATENATED MODULE: external "lodash/isUndefined"
|
|
580
580
|
const oe = require("lodash/isUndefined");
|
|
581
|
-
var
|
|
581
|
+
var ae = e.n(oe);
|
|
582
582
|
// CONCATENATED MODULE: external "lodash/keys"
|
|
583
|
-
const
|
|
584
|
-
var le = e.n(
|
|
583
|
+
const ie = require("lodash/keys");
|
|
584
|
+
var le = e.n(ie);
|
|
585
585
|
// CONCATENATED MODULE: external "lodash/memoize"
|
|
586
586
|
const se = require("lodash/memoize");
|
|
587
587
|
var ce = e.n(se);
|
|
@@ -640,18 +640,18 @@
|
|
|
640
640
|
// CONCATENATED MODULE: ./src/Select/icons/Search.tsx
|
|
641
641
|
var Ne = function e() {
|
|
642
642
|
var t = (0, Me.useSplunkTheme)(), n = t.isEnterprise, o = t.isCompact;
|
|
643
|
-
var
|
|
644
|
-
var
|
|
643
|
+
var a = (0, u._)("Search");
|
|
644
|
+
var i = o ? "20px" : "24px";
|
|
645
645
|
var l = n ? r().createElement(Te(), {
|
|
646
646
|
role: "presentation",
|
|
647
647
|
size: "16px",
|
|
648
|
-
screenReaderText:
|
|
648
|
+
screenReaderText: a,
|
|
649
649
|
hideDefaultTooltip: true
|
|
650
650
|
}) : r().createElement(qe(), {
|
|
651
651
|
role: "presentation",
|
|
652
|
-
"aria-label":
|
|
653
|
-
width:
|
|
654
|
-
height:
|
|
652
|
+
"aria-label": a,
|
|
653
|
+
width: i,
|
|
654
|
+
height: i
|
|
655
655
|
});
|
|
656
656
|
return l;
|
|
657
657
|
};
|
|
@@ -831,17 +831,19 @@
|
|
|
831
831
|
var rt = Ke().span.withConfig({
|
|
832
832
|
displayName: "ItemStyles__StyledSubmenu",
|
|
833
833
|
componentId: "sc-4kc053-10"
|
|
834
|
-
})([ "float:right;padding-left:", ";color:", ";" ], Me.variables.spacingSmall, (0,
|
|
834
|
+
})([ "float:right;padding-left:", ";color:", ";", "" ], Me.variables.spacingSmall, (0,
|
|
835
835
|
Me.pick)({
|
|
836
836
|
prisma: "inherit",
|
|
837
837
|
enterprise: Me.variables.textGray
|
|
838
|
+
}), (0, Me.pick)({
|
|
839
|
+
prisma: (0, Le.css)([ "& > svg{width:20px;height:20px;}" ])
|
|
838
840
|
}));
|
|
839
841
|
// CONCATENATED MODULE: ./src/Select/SelectAllOptionStyles.ts
|
|
840
842
|
var ot = Ke()(tt).withConfig({
|
|
841
843
|
displayName: "SelectAllOptionStyles__StyledSelectAllLabel",
|
|
842
844
|
componentId: "y6bn08-0"
|
|
843
845
|
})([ "font-weight:", ";" ], Me.variables.fontWeightBold);
|
|
844
|
-
var
|
|
846
|
+
var at = Ke()(E).withConfig({
|
|
845
847
|
displayName: "SelectAllOptionStyles__StyledSelectAllOption",
|
|
846
848
|
componentId: "y6bn08-1"
|
|
847
849
|
})([ "padding-inline-start:", ";box-shadow:none;" ], (0, Me.pick)({
|
|
@@ -849,26 +851,26 @@
|
|
|
849
851
|
enterprise: "32px;"
|
|
850
852
|
}));
|
|
851
853
|
// CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
|
|
852
|
-
var
|
|
853
|
-
active:
|
|
854
|
-
elementRef:
|
|
855
|
-
id:
|
|
856
|
-
onClick:
|
|
857
|
-
selectAllLabel:
|
|
858
|
-
totalCount:
|
|
859
|
-
changedToggle:
|
|
860
|
-
selected:
|
|
854
|
+
var it = {
|
|
855
|
+
active: a().bool,
|
|
856
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
857
|
+
id: a().string,
|
|
858
|
+
onClick: a().func,
|
|
859
|
+
selectAllLabel: a().string,
|
|
860
|
+
totalCount: a().number,
|
|
861
|
+
changedToggle: a().bool,
|
|
862
|
+
selected: a().oneOf([ false, true, "some" ])
|
|
861
863
|
};
|
|
862
864
|
var lt = r().forwardRef((function(e, t) {
|
|
863
|
-
var n = e.active, o = e.id,
|
|
865
|
+
var n = e.active, o = e.id, a = e.onClick, i = e.selectAllLabel, l = e.totalCount, s = e.changedToggle, c = e.selected;
|
|
864
866
|
// When toggle is changed the total count is not displayed anymore so the count is now shown in the Select All menu item
|
|
865
867
|
var p = s ? " (".concat(l === null || l === void 0 ? void 0 : l.toString(), ")") : "";
|
|
866
868
|
|
|
867
|
-
return r().createElement(
|
|
868
|
-
label:
|
|
869
|
+
return r().createElement(at, {
|
|
870
|
+
label: i,
|
|
869
871
|
value: "selectAll",
|
|
870
872
|
key: "selectAll",
|
|
871
|
-
onClick:
|
|
873
|
+
onClick: a,
|
|
872
874
|
"data-test": "select-all",
|
|
873
875
|
"aria-keyshortcuts": "Control+A",
|
|
874
876
|
id: o,
|
|
@@ -893,9 +895,9 @@
|
|
|
893
895
|
$truncate: false
|
|
894
896
|
}, r().createElement(ot, {
|
|
895
897
|
$truncate: false
|
|
896
|
-
},
|
|
898
|
+
}, i))));
|
|
897
899
|
}));
|
|
898
|
-
lt.propTypes =
|
|
900
|
+
lt.propTypes = it;
|
|
899
901
|
/* harmony default export */ const st = lt;
|
|
900
902
|
// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
901
903
|
const ct = require("@splunk/react-ui/Button");
|
|
@@ -980,7 +982,7 @@
|
|
|
980
982
|
}
|
|
981
983
|
var r = null;
|
|
982
984
|
var o = false;
|
|
983
|
-
var
|
|
985
|
+
var a = t.filter((function(e) {
|
|
984
986
|
var t = gt(e, n.index);
|
|
985
987
|
if (t === n.value) {
|
|
986
988
|
o = true;
|
|
@@ -989,22 +991,22 @@
|
|
|
989
991
|
// If we haven't found a match yet, keep track of the next closest match.
|
|
990
992
|
// Secondary matching looks for the closest character of a higher value, and failing that, closest of a lower value.
|
|
991
993
|
if (!o) {
|
|
992
|
-
var
|
|
993
|
-
if (!
|
|
994
|
+
var a = gt(r, n.index);
|
|
995
|
+
if (!a) {
|
|
994
996
|
r = e;
|
|
995
997
|
} else if (t > n.value) {
|
|
996
|
-
if (
|
|
998
|
+
if (a < n.value) {
|
|
997
999
|
r = e;
|
|
998
|
-
} else if (
|
|
1000
|
+
} else if (a > t) {
|
|
999
1001
|
r = e;
|
|
1000
1002
|
}
|
|
1001
|
-
} else if (t >
|
|
1003
|
+
} else if (t > a) {
|
|
1002
1004
|
r = e;
|
|
1003
1005
|
}
|
|
1004
1006
|
}
|
|
1005
1007
|
return false;
|
|
1006
1008
|
}));
|
|
1007
|
-
return
|
|
1009
|
+
return a.length === 0 && r ? [ r ] : a;
|
|
1008
1010
|
};
|
|
1009
1011
|
// CONCATENATED MODULE: ./src/utils/ssrDocument.ts
|
|
1010
1012
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
@@ -1153,20 +1155,20 @@
|
|
|
1153
1155
|
var n = [];
|
|
1154
1156
|
var r = true;
|
|
1155
1157
|
var o = false;
|
|
1156
|
-
var
|
|
1158
|
+
var a = undefined;
|
|
1157
1159
|
try {
|
|
1158
|
-
for (var
|
|
1160
|
+
for (var i = e[Symbol.iterator](), l; !(r = (l = i.next()).done); r = true) {
|
|
1159
1161
|
n.push(l.value);
|
|
1160
1162
|
if (t && n.length === t) break;
|
|
1161
1163
|
}
|
|
1162
1164
|
} catch (e) {
|
|
1163
1165
|
o = true;
|
|
1164
|
-
|
|
1166
|
+
a = e;
|
|
1165
1167
|
} finally {
|
|
1166
1168
|
try {
|
|
1167
|
-
if (!r &&
|
|
1169
|
+
if (!r && i["return"] != null) i["return"]();
|
|
1168
1170
|
} finally {
|
|
1169
|
-
if (o) throw
|
|
1171
|
+
if (o) throw a;
|
|
1170
1172
|
}
|
|
1171
1173
|
}
|
|
1172
1174
|
return n;
|
|
@@ -1245,8 +1247,8 @@
|
|
|
1245
1247
|
return function n() {
|
|
1246
1248
|
var r = Wt(e), o;
|
|
1247
1249
|
if (t) {
|
|
1248
|
-
var
|
|
1249
|
-
o = Reflect.construct(r, arguments,
|
|
1250
|
+
var a = Wt(this).constructor;
|
|
1251
|
+
o = Reflect.construct(r, arguments, a);
|
|
1250
1252
|
} else {
|
|
1251
1253
|
o = r.apply(this, arguments);
|
|
1252
1254
|
}
|
|
@@ -1337,48 +1339,48 @@
|
|
|
1337
1339
|
return e;
|
|
1338
1340
|
}
|
|
1339
1341
|
var Qt = {
|
|
1340
|
-
allowKeyMatching:
|
|
1341
|
-
allowNewValues:
|
|
1342
|
-
animateLoading:
|
|
1343
|
-
appearance:
|
|
1344
|
-
append:
|
|
1345
|
-
children:
|
|
1346
|
-
defaultPlacement:
|
|
1347
|
-
defaultValues:
|
|
1348
|
-
describedBy:
|
|
1349
|
-
disabled:
|
|
1350
|
-
elementRef:
|
|
1351
|
-
error:
|
|
1352
|
-
filter:
|
|
1353
|
-
footerMessage:
|
|
1354
|
-
inline:
|
|
1355
|
-
inputId:
|
|
1356
|
-
inputRef:
|
|
1357
|
-
isLoadingOptions:
|
|
1358
|
-
labelledBy:
|
|
1359
|
-
labelText:
|
|
1360
|
-
loadingMessage:
|
|
1361
|
-
menuStyle:
|
|
1362
|
-
multiple:
|
|
1363
|
-
name:
|
|
1364
|
-
noOptionsMessage:
|
|
1365
|
-
onChange:
|
|
1366
|
-
onClose:
|
|
1367
|
-
onFilterChange:
|
|
1368
|
-
onOpen:
|
|
1369
|
-
onScroll:
|
|
1370
|
-
onScrollBottom:
|
|
1342
|
+
allowKeyMatching: a().bool,
|
|
1343
|
+
allowNewValues: a().bool,
|
|
1344
|
+
animateLoading: a().bool,
|
|
1345
|
+
appearance: a().oneOf([ "default", "link", "primary", "pill", "toggle", "flat" ]),
|
|
1346
|
+
append: a().bool,
|
|
1347
|
+
children: a().node,
|
|
1348
|
+
defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
|
|
1349
|
+
defaultValues: a().array,
|
|
1350
|
+
describedBy: a().string,
|
|
1351
|
+
disabled: a().bool,
|
|
1352
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
1353
|
+
error: a().bool,
|
|
1354
|
+
filter: a().oneOf([ false, true, "controlled" ]),
|
|
1355
|
+
footerMessage: a().node,
|
|
1356
|
+
inline: a().bool,
|
|
1357
|
+
inputId: a().string,
|
|
1358
|
+
inputRef: a().oneOfType([ a().func, a().object ]),
|
|
1359
|
+
isLoadingOptions: a().bool,
|
|
1360
|
+
labelledBy: a().string,
|
|
1361
|
+
labelText: a().string,
|
|
1362
|
+
loadingMessage: a().node,
|
|
1363
|
+
menuStyle: a().object,
|
|
1364
|
+
multiple: a().bool,
|
|
1365
|
+
name: a().string,
|
|
1366
|
+
noOptionsMessage: a().node,
|
|
1367
|
+
onChange: a().func,
|
|
1368
|
+
onClose: a().func,
|
|
1369
|
+
onFilterChange: a().func,
|
|
1370
|
+
onOpen: a().func,
|
|
1371
|
+
onScroll: a().func,
|
|
1372
|
+
onScrollBottom: a().func,
|
|
1371
1373
|
/** @private. */
|
|
1372
|
-
required:
|
|
1373
|
-
placeholder:
|
|
1374
|
-
prefixLabel:
|
|
1375
|
-
prepend:
|
|
1376
|
-
repositionMode:
|
|
1377
|
-
selectAllAppearance:
|
|
1378
|
-
showSelectedValuesFirst:
|
|
1379
|
-
suffixLabel:
|
|
1380
|
-
tabConfirmsNewValue:
|
|
1381
|
-
values:
|
|
1374
|
+
required: a().bool,
|
|
1375
|
+
placeholder: a().string,
|
|
1376
|
+
prefixLabel: a().string,
|
|
1377
|
+
prepend: a().bool,
|
|
1378
|
+
repositionMode: a().oneOf([ "none", "flip" ]),
|
|
1379
|
+
selectAllAppearance: a().oneOf([ "buttongroup", "checkbox" ]),
|
|
1380
|
+
showSelectedValuesFirst: a().oneOf([ "nextOpen", "immediately", "never" ]),
|
|
1381
|
+
suffixLabel: a().string,
|
|
1382
|
+
tabConfirmsNewValue: a().bool,
|
|
1383
|
+
values: a().array
|
|
1382
1384
|
};
|
|
1383
1385
|
var Xt = {
|
|
1384
1386
|
allowKeyMatching: true,
|
|
@@ -1405,13 +1407,15 @@
|
|
|
1405
1407
|
}));
|
|
1406
1408
|
// preserve separate widths for single vs. multi mode
|
|
1407
1409
|
var Zt = ce()((function(e) {
|
|
1408
|
-
var t = e.anchorWidth, n = e.isMultiple, r = e.menuStyle;
|
|
1410
|
+
var t = e.anchorWidth, n = e.isMultiple, r = e.maxHeight, o = e.menuStyle;
|
|
1409
1411
|
return n ? Gt({
|
|
1410
|
-
width: Math.max(t !== null && t !== void 0 ? t : 0, 200)
|
|
1411
|
-
|
|
1412
|
+
width: Math.max(t !== null && t !== void 0 ? t : 0, 200),
|
|
1413
|
+
maxHeight: r
|
|
1414
|
+
}, o) : Gt({
|
|
1412
1415
|
minWidth: t !== null && t !== void 0 ? t : undefined,
|
|
1413
|
-
maxWidth: Math.max(t !== null && t !== void 0 ? t : 0, 300)
|
|
1414
|
-
|
|
1416
|
+
maxWidth: Math.max(t !== null && t !== void 0 ? t : 0, 300),
|
|
1417
|
+
maxHeight: r
|
|
1418
|
+
}, o);
|
|
1415
1419
|
}));
|
|
1416
1420
|
var en = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
|
|
1417
1421
|
function tn(e) {
|
|
@@ -1431,149 +1435,149 @@
|
|
|
1431
1435
|
}
|
|
1432
1436
|
} ]);
|
|
1433
1437
|
function o(e) {
|
|
1434
|
-
var
|
|
1438
|
+
var a;
|
|
1435
1439
|
Dt(this, o);
|
|
1436
|
-
|
|
1437
|
-
Jt($t(
|
|
1438
|
-
Jt($t(
|
|
1439
|
-
Jt($t(
|
|
1440
|
-
Jt($t(
|
|
1441
|
-
Jt($t(
|
|
1442
|
-
Jt($t(
|
|
1443
|
-
Jt($t(
|
|
1444
|
-
Jt($t(
|
|
1445
|
-
Jt($t(
|
|
1446
|
-
Jt($t(
|
|
1447
|
-
Jt($t(
|
|
1448
|
-
Jt($t(
|
|
1449
|
-
Jt($t(
|
|
1450
|
-
Jt($t(
|
|
1451
|
-
Jt($t(
|
|
1452
|
-
Jt($t(
|
|
1453
|
-
Jt($t(
|
|
1454
|
-
Jt($t(
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
if (
|
|
1458
|
-
clearTimeout(
|
|
1440
|
+
a = t.call(this, e);
|
|
1441
|
+
Jt($t(a), "activeItemId", void 0);
|
|
1442
|
+
Jt($t(a), "activeValue", void 0);
|
|
1443
|
+
Jt($t(a), "availableOptionCount", void 0);
|
|
1444
|
+
Jt($t(a), "controlledExternally", void 0);
|
|
1445
|
+
Jt($t(a), "displayedValues", void 0);
|
|
1446
|
+
Jt($t(a), "dropdown", null);
|
|
1447
|
+
Jt($t(a), "firstSelectedEnabledOption", null);
|
|
1448
|
+
Jt($t(a), "firstSelectedOptionIndex", void 0);
|
|
1449
|
+
Jt($t(a), "menuId", void 0);
|
|
1450
|
+
Jt($t(a), "previousActiveIndex", null);
|
|
1451
|
+
Jt($t(a), "selectedOptionCount", void 0);
|
|
1452
|
+
Jt($t(a), "optionRefsByKey", void 0);
|
|
1453
|
+
Jt($t(a), "matchCharacter", void 0);
|
|
1454
|
+
Jt($t(a), "matchTimeout", void 0);
|
|
1455
|
+
Jt($t(a), "currentMatchOptions", void 0);
|
|
1456
|
+
Jt($t(a), "availableMatchOptions", void 0);
|
|
1457
|
+
Jt($t(a), "optionSelection", void 0);
|
|
1458
|
+
Jt($t(a), "resetMatches", (function() {
|
|
1459
|
+
a.matchCharacter = null;
|
|
1460
|
+
a.currentMatchOptions = [];
|
|
1461
|
+
if (a.matchTimeout) {
|
|
1462
|
+
clearTimeout(a.matchTimeout);
|
|
1459
1463
|
}
|
|
1460
1464
|
}));
|
|
1461
|
-
Jt($t(
|
|
1465
|
+
Jt($t(a), "handleSelectAll", (function(e) {
|
|
1462
1466
|
var t, n, o;
|
|
1463
|
-
var
|
|
1467
|
+
var i = a.props, l = i.name, s = i.children, c = i.multiple;
|
|
1464
1468
|
// this doesn't make sense if we can't select multiple values
|
|
1465
1469
|
if (!c) {
|
|
1466
1470
|
return;
|
|
1467
1471
|
}
|
|
1468
|
-
var u = (t =
|
|
1469
|
-
var p = de()(u.concat(
|
|
1472
|
+
var u = (t = a.getCurrentValues()) !== null && t !== void 0 ? t : [];
|
|
1473
|
+
var p = de()(u.concat(a.displayedValues));
|
|
1470
1474
|
p = r().Children.toArray(s).filter((function(e) {
|
|
1471
1475
|
return tn(e) && re()(p, e.props.value) && (!e.props.disabled || re()(u, e.props.value));
|
|
1472
1476
|
})).map((function(e) {
|
|
1473
1477
|
return e.props.value;
|
|
1474
1478
|
}));
|
|
1475
|
-
if (!
|
|
1476
|
-
|
|
1479
|
+
if (!a.isControlled()) {
|
|
1480
|
+
a.setState({
|
|
1477
1481
|
values: p
|
|
1478
1482
|
});
|
|
1479
1483
|
}
|
|
1480
|
-
(n = (o =
|
|
1484
|
+
(n = (o = a.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
|
|
1481
1485
|
values: p,
|
|
1482
1486
|
name: l,
|
|
1483
1487
|
reason: "selectAll"
|
|
1484
1488
|
});
|
|
1485
1489
|
}));
|
|
1486
|
-
Jt($t(
|
|
1490
|
+
Jt($t(a), "handleClearAll", (function(e) {
|
|
1487
1491
|
var t, n, o;
|
|
1488
|
-
var
|
|
1492
|
+
var i = a.props, l = i.name, s = i.children, c = i.multiple;
|
|
1489
1493
|
// this doesn't make sense if we can't select multiple values
|
|
1490
1494
|
if (!c) {
|
|
1491
1495
|
return;
|
|
1492
1496
|
}
|
|
1493
|
-
var u = (t =
|
|
1494
|
-
var p = he().apply(void 0, [ u ].concat(Et(
|
|
1497
|
+
var u = (t = a.getCurrentValues()) !== null && t !== void 0 ? t : [];
|
|
1498
|
+
var p = he().apply(void 0, [ u ].concat(Et(a.displayedValues)));
|
|
1495
1499
|
// this will unselect all selected values unless those values are disabled or hidden by the filter
|
|
1496
1500
|
var f = r().Children.toArray(s).filter((function(e) {
|
|
1497
1501
|
return tn(e) && (re()(u, e.props.value) && e.props.disabled || re()(p, e.props.value));
|
|
1498
1502
|
})).map((function(e) {
|
|
1499
1503
|
return e.props.value;
|
|
1500
1504
|
}));
|
|
1501
|
-
if (!
|
|
1502
|
-
|
|
1505
|
+
if (!a.isControlled()) {
|
|
1506
|
+
a.setState({
|
|
1503
1507
|
values: f
|
|
1504
1508
|
});
|
|
1505
1509
|
}
|
|
1506
|
-
(n = (o =
|
|
1510
|
+
(n = (o = a.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
|
|
1507
1511
|
values: f,
|
|
1508
1512
|
name: l,
|
|
1509
1513
|
reason: "clearAll"
|
|
1510
1514
|
});
|
|
1511
1515
|
}));
|
|
1512
|
-
Jt($t(
|
|
1513
|
-
var t =
|
|
1516
|
+
Jt($t(a), "handleTextKeyDown", (function(e) {
|
|
1517
|
+
var t = a.props, r = t.children, o = t.onScrollBottom, i = t.tabConfirmsNewValue;
|
|
1514
1518
|
var l = (0, ge.keycode)(e.nativeEvent);
|
|
1515
1519
|
if (l === "tab") {
|
|
1516
|
-
if (
|
|
1520
|
+
if (i && !ae()(a.activeValue) && a.availableOptionCount <= 1) {
|
|
1517
1521
|
e.preventDefault();
|
|
1518
|
-
|
|
1522
|
+
a.toggleValue(e, a.activeValue);
|
|
1519
1523
|
}
|
|
1520
1524
|
}
|
|
1521
1525
|
if (e.shiftKey || e.metaKey || e.ctrlKey) {
|
|
1522
1526
|
if (l === "a" && (e.ctrlKey || e.metaKey)) {
|
|
1523
1527
|
// handle control + A
|
|
1524
|
-
if (
|
|
1525
|
-
|
|
1528
|
+
if (a.optionSelection === "all") {
|
|
1529
|
+
a.handleClearAll(e);
|
|
1526
1530
|
} else {
|
|
1527
|
-
|
|
1531
|
+
a.handleSelectAll(e);
|
|
1528
1532
|
}
|
|
1529
1533
|
}
|
|
1530
1534
|
return;
|
|
1531
1535
|
}
|
|
1532
1536
|
if (l === "down") {
|
|
1533
1537
|
e.preventDefault();
|
|
1534
|
-
|
|
1538
|
+
a.setState((function(e) {
|
|
1535
1539
|
return {
|
|
1536
|
-
activeIndex: Math.min(e.activeIndex + 1,
|
|
1540
|
+
activeIndex: Math.min(e.activeIndex + 1, a.props.selectAllAppearance === "checkbox" ? a.availableOptionCount : a.availableOptionCount - 1)
|
|
1537
1541
|
};
|
|
1538
1542
|
}));
|
|
1539
1543
|
if (r && o) {
|
|
1540
1544
|
var s;
|
|
1541
|
-
var c = n.Children.toArray(r).length - (2 + ((s =
|
|
1542
|
-
if (
|
|
1543
|
-
|
|
1545
|
+
var c = n.Children.toArray(r).length - (2 + ((s = a.getCurrentValues()) !== null && s !== void 0 ? s : []).length);
|
|
1546
|
+
if (a.state.activeIndex === c) {
|
|
1547
|
+
a.handleScrollBottom(e);
|
|
1544
1548
|
}
|
|
1545
1549
|
}
|
|
1546
1550
|
}
|
|
1547
1551
|
if (l === "up") {
|
|
1548
1552
|
e.preventDefault();
|
|
1549
|
-
|
|
1553
|
+
a.setState((function(e) {
|
|
1550
1554
|
return {
|
|
1551
1555
|
activeIndex: Math.max(e.activeIndex - 1, 0)
|
|
1552
1556
|
};
|
|
1553
1557
|
}));
|
|
1554
1558
|
}
|
|
1555
|
-
if (l === "enter" && !
|
|
1556
|
-
if (
|
|
1557
|
-
if (
|
|
1558
|
-
|
|
1559
|
+
if (l === "enter" && !ae()(a.activeValue) && a.state.open) {
|
|
1560
|
+
if (a.activeValue === "selectAll") {
|
|
1561
|
+
if (a.optionSelection === "all") {
|
|
1562
|
+
a.handleClearAll(e);
|
|
1559
1563
|
} else {
|
|
1560
|
-
|
|
1564
|
+
a.handleSelectAll(e);
|
|
1561
1565
|
}
|
|
1562
1566
|
} else {
|
|
1563
1567
|
e.preventDefault();
|
|
1564
|
-
|
|
1568
|
+
a.toggleValue(e, a.activeValue);
|
|
1565
1569
|
}
|
|
1566
1570
|
}
|
|
1567
1571
|
}));
|
|
1568
|
-
Jt($t(
|
|
1572
|
+
Jt($t(a), "handleMenuOptionClick", (function(e, t) {
|
|
1569
1573
|
var n = t.value;
|
|
1570
1574
|
e.preventDefault();
|
|
1571
|
-
if (!
|
|
1575
|
+
if (!a.state.open) {
|
|
1572
1576
|
return;
|
|
1573
1577
|
}
|
|
1574
|
-
|
|
1578
|
+
a.toggleValue(e, n);
|
|
1575
1579
|
}));
|
|
1576
|
-
Jt($t(
|
|
1580
|
+
Jt($t(a), "handleMenuOptionKeyDown", (function(e, t) {
|
|
1577
1581
|
var n = e.nativeEvent.key;
|
|
1578
1582
|
// Checking for a single character to avoid complications from double-byte languages and emojis.
|
|
1579
1583
|
if (n.length === 1) {
|
|
@@ -1582,131 +1586,131 @@
|
|
|
1582
1586
|
index: 0,
|
|
1583
1587
|
value: n
|
|
1584
1588
|
};
|
|
1585
|
-
if (!
|
|
1589
|
+
if (!a.matchCharacter) {
|
|
1586
1590
|
if (n === " ") {
|
|
1587
|
-
|
|
1591
|
+
a.resetMatches();
|
|
1588
1592
|
return;
|
|
1589
1593
|
}
|
|
1590
|
-
r = Ot(
|
|
1591
|
-
} else if (
|
|
1592
|
-
o.index =
|
|
1593
|
-
r = Ot(
|
|
1594
|
+
r = Ot(a.availableMatchOptions, o);
|
|
1595
|
+
} else if (a.currentMatchOptions.length > 1) {
|
|
1596
|
+
o.index = a.matchCharacter.index + 1;
|
|
1597
|
+
r = Ot(a.currentMatchOptions, o);
|
|
1594
1598
|
}
|
|
1595
1599
|
if (r.length) {
|
|
1596
|
-
var
|
|
1600
|
+
var i = 0;
|
|
1597
1601
|
// If the active option is a first character match, cycle to the next matching option.
|
|
1598
1602
|
if (o.index === 0 && r.length > 1) {
|
|
1599
|
-
var l = r.indexOf(
|
|
1603
|
+
var l = r.indexOf(a.availableMatchOptions[t]);
|
|
1600
1604
|
if (l >= 0) {
|
|
1601
|
-
|
|
1605
|
+
i = l === r.length - 1 ? 0 : l + 1;
|
|
1602
1606
|
}
|
|
1603
1607
|
}
|
|
1604
|
-
var s = r[
|
|
1605
|
-
var c =
|
|
1608
|
+
var s = r[i];
|
|
1609
|
+
var c = a.optionRefsByKey[nn(s.value, s.label)];
|
|
1606
1610
|
if (c != null) {
|
|
1607
1611
|
var u;
|
|
1608
1612
|
(u = c.focus) === null || u === void 0 ? void 0 : u.call(c);
|
|
1609
1613
|
}
|
|
1610
1614
|
}
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
if (
|
|
1614
|
-
clearTimeout(
|
|
1615
|
+
a.currentMatchOptions = r;
|
|
1616
|
+
a.matchCharacter = o;
|
|
1617
|
+
if (a.matchTimeout) {
|
|
1618
|
+
clearTimeout(a.matchTimeout);
|
|
1615
1619
|
}
|
|
1616
|
-
|
|
1620
|
+
a.matchTimeout = setTimeout(a.resetMatches, 500);
|
|
1617
1621
|
e.preventDefault();
|
|
1618
1622
|
e.stopPropagation();
|
|
1619
1623
|
}
|
|
1620
1624
|
}));
|
|
1621
|
-
Jt($t(
|
|
1625
|
+
Jt($t(a), "handleTextChange", (function(e, t) {
|
|
1622
1626
|
var n, r;
|
|
1623
1627
|
var o = t.value;
|
|
1624
|
-
|
|
1628
|
+
a.setState({
|
|
1625
1629
|
filterKeyword: o,
|
|
1626
1630
|
open: true,
|
|
1627
1631
|
activeIndex: 0
|
|
1628
1632
|
});
|
|
1629
|
-
(n = (r =
|
|
1633
|
+
(n = (r = a.props).onFilterChange) === null || n === void 0 ? void 0 : n.call(r, e, {
|
|
1630
1634
|
keyword: o
|
|
1631
1635
|
});
|
|
1632
1636
|
}));
|
|
1633
|
-
Jt($t(
|
|
1634
|
-
|
|
1637
|
+
Jt($t(a), "handleTextFocus", (function() {
|
|
1638
|
+
a.setState({
|
|
1635
1639
|
textHasFocus: true
|
|
1636
1640
|
});
|
|
1637
1641
|
}));
|
|
1638
|
-
Jt($t(
|
|
1639
|
-
|
|
1642
|
+
Jt($t(a), "handleTextBlur", (function() {
|
|
1643
|
+
a.setState({
|
|
1640
1644
|
textHasFocus: false
|
|
1641
1645
|
});
|
|
1642
1646
|
}));
|
|
1643
|
-
Jt($t(
|
|
1647
|
+
Jt($t(a), "handleRequestOpen", (function(e) {
|
|
1644
1648
|
var t = {
|
|
1645
1649
|
open: true,
|
|
1646
|
-
topValues:
|
|
1650
|
+
topValues: a.getTopValues()
|
|
1647
1651
|
};
|
|
1648
1652
|
// SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
|
|
1649
|
-
if (
|
|
1653
|
+
if (a.props.multiple) {
|
|
1650
1654
|
t.filterKeyword = "";
|
|
1651
1655
|
}
|
|
1652
|
-
var n =
|
|
1653
|
-
|
|
1656
|
+
var n = a.state.filterKeyword;
|
|
1657
|
+
a.setState(t, (function() {
|
|
1654
1658
|
var t, r;
|
|
1655
|
-
(t = (r =
|
|
1656
|
-
if (
|
|
1657
|
-
|
|
1659
|
+
(t = (r = a.props).onOpen) === null || t === void 0 ? void 0 : t.call(r);
|
|
1660
|
+
if (a.firstSelectedEnabledOption && !a.hasFilter()) {
|
|
1661
|
+
a.firstSelectedEnabledOption.focus();
|
|
1658
1662
|
} else {
|
|
1659
1663
|
var o;
|
|
1660
|
-
|
|
1661
|
-
activeIndex: (o =
|
|
1664
|
+
a.setState({
|
|
1665
|
+
activeIndex: (o = a.firstSelectedOptionIndex) !== null && o !== void 0 ? o : 0
|
|
1662
1666
|
});
|
|
1663
1667
|
}
|
|
1664
|
-
if (n !==
|
|
1665
|
-
var
|
|
1666
|
-
(
|
|
1667
|
-
keyword:
|
|
1668
|
+
if (n !== a.state.filterKeyword) {
|
|
1669
|
+
var i, l;
|
|
1670
|
+
(i = (l = a.props).onFilterChange) === null || i === void 0 ? void 0 : i.call(l, e, {
|
|
1671
|
+
keyword: a.state.filterKeyword
|
|
1668
1672
|
});
|
|
1669
1673
|
}
|
|
1670
1674
|
}));
|
|
1671
1675
|
}));
|
|
1672
|
-
Jt($t(
|
|
1673
|
-
|
|
1676
|
+
Jt($t(a), "handleRequestClose", (function() {
|
|
1677
|
+
a.setState({
|
|
1674
1678
|
open: false,
|
|
1675
1679
|
activeIndex: 0
|
|
1676
1680
|
}, (function() {
|
|
1677
1681
|
var e, t;
|
|
1678
|
-
|
|
1679
|
-
(e = (t =
|
|
1682
|
+
a.previousActiveIndex = null;
|
|
1683
|
+
(e = (t = a.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
|
|
1680
1684
|
}));
|
|
1681
1685
|
}));
|
|
1682
|
-
Jt($t(
|
|
1683
|
-
if (
|
|
1686
|
+
Jt($t(a), "handleScrollBottom", (function(e) {
|
|
1687
|
+
if (a.state.open && !a.props.isLoadingOptions) {
|
|
1684
1688
|
var t, n;
|
|
1685
|
-
(t = (n =
|
|
1689
|
+
(t = (n = a.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
1686
1690
|
}
|
|
1687
1691
|
}));
|
|
1688
|
-
Jt($t(
|
|
1689
|
-
if (
|
|
1692
|
+
Jt($t(a), "handleActiveOptionMount", (function(e) {
|
|
1693
|
+
if (a.previousActiveIndex !== a.state.activeIndex) {
|
|
1690
1694
|
e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
|
|
1691
1695
|
}
|
|
1692
1696
|
}));
|
|
1693
|
-
Jt($t(
|
|
1697
|
+
Jt($t(a), "handleOptionMount", (function(e, t, n) {
|
|
1694
1698
|
if (n) {
|
|
1695
|
-
|
|
1699
|
+
a.firstSelectedEnabledOption = e;
|
|
1696
1700
|
}
|
|
1697
1701
|
if (e == null) {
|
|
1698
|
-
delete
|
|
1702
|
+
delete a.optionRefsByKey[t];
|
|
1699
1703
|
} else {
|
|
1700
|
-
|
|
1704
|
+
a.optionRefsByKey[t] = e;
|
|
1701
1705
|
}
|
|
1702
1706
|
}));
|
|
1703
|
-
Jt($t(
|
|
1707
|
+
Jt($t(a), "createToggle", (function() {
|
|
1704
1708
|
var e;
|
|
1705
|
-
var t =
|
|
1709
|
+
var t = a.props, i = t.toggle, l = t.appearance, s = t.children, p = t.describedBy, f = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, y = t.labelText, m = t.multiple, g = t.placeholder, O = t.prefixLabel, w = t.required, S = t.suffixLabel;
|
|
1706
1710
|
var C;
|
|
1707
1711
|
var x;
|
|
1708
1712
|
// Generate buttonLabels
|
|
1709
|
-
var k = (e =
|
|
1713
|
+
var k = (e = a.getCurrentValues()) !== null && e !== void 0 ? e : [];
|
|
1710
1714
|
var I = n.Children.toArray(s);
|
|
1711
1715
|
var j = k.reduce((function(e, t, n, r) {
|
|
1712
1716
|
var o = Z()(I, (function(e) {
|
|
@@ -1730,7 +1734,7 @@
|
|
|
1730
1734
|
x = j;
|
|
1731
1735
|
// only apply prefix / suffix if the label is not empty
|
|
1732
1736
|
if (x.length > 0) {
|
|
1733
|
-
x =
|
|
1737
|
+
x = a.wrapLabel({
|
|
1734
1738
|
prefixLabel: O,
|
|
1735
1739
|
label: x,
|
|
1736
1740
|
suffixLabel: S
|
|
@@ -1747,7 +1751,7 @@
|
|
|
1747
1751
|
// If there's more than one item selected, read out the selected total
|
|
1748
1752
|
// rather than reading out each selected item
|
|
1749
1753
|
if (x.length > 1) {
|
|
1750
|
-
_ =
|
|
1754
|
+
_ = a.wrapLabel({
|
|
1751
1755
|
prefixLabel: O,
|
|
1752
1756
|
label: [ "".concat(k.length, " items selected") ],
|
|
1753
1757
|
suffixLabel: S
|
|
@@ -1764,16 +1768,16 @@
|
|
|
1764
1768
|
disabled: f,
|
|
1765
1769
|
elementRef: d,
|
|
1766
1770
|
error: v
|
|
1767
|
-
}, c()(
|
|
1771
|
+
}, c()(a.props, le()(o.propTypes)));
|
|
1768
1772
|
if (m) {
|
|
1769
1773
|
A["data-test-values"] = JSON.stringify(k);
|
|
1770
1774
|
} else {
|
|
1771
1775
|
var E = It(k, 1), M = E[0];
|
|
1772
1776
|
A["data-test-value"] = M;
|
|
1773
1777
|
}
|
|
1774
|
-
if (
|
|
1778
|
+
if (i) {
|
|
1775
1779
|
|
|
1776
|
-
return (0, n.cloneElement)(
|
|
1780
|
+
return (0, n.cloneElement)(i, A);
|
|
1777
1781
|
}
|
|
1778
1782
|
if (l === "link") {
|
|
1779
1783
|
|
|
@@ -1791,61 +1795,61 @@
|
|
|
1791
1795
|
inline: h,
|
|
1792
1796
|
isMenu: true,
|
|
1793
1797
|
"aria-haspopup": "listbox",
|
|
1794
|
-
"aria-owns":
|
|
1795
|
-
onClick:
|
|
1796
|
-
}, pe()(
|
|
1798
|
+
"aria-owns": a.menuId,
|
|
1799
|
+
onClick: a.props.onClick
|
|
1800
|
+
}, pe()(a.props, o.invalidLinkAppearanceProps)), !!k.length && m && r().createElement(bt, {
|
|
1797
1801
|
"data-role": "count"
|
|
1798
1802
|
}, "(", k.length, ")"));
|
|
1799
1803
|
}));
|
|
1800
|
-
Jt($t(
|
|
1801
|
-
var e =
|
|
1802
|
-
var l =
|
|
1803
|
-
var m =
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1804
|
+
Jt($t(a), "createChildren", (function() {
|
|
1805
|
+
var e = a.state, t = e.filterKeyword, o = e.textHasFocus, i = e.topValues;
|
|
1806
|
+
var l = a.props, s = l.allowKeyMatching, c = l.allowNewValues, f = l.filter, d = l.multiple, v = l.selectAllAppearance, h = l.showSelectedValuesFirst, b = l.isLoadingOptions, y = l.onScrollBottom;
|
|
1807
|
+
var m = a.getCurrentValues();
|
|
1808
|
+
a.availableOptionCount = 0;
|
|
1809
|
+
a.firstSelectedOptionIndex = undefined;
|
|
1810
|
+
a.selectedOptionCount = 0;
|
|
1811
|
+
a.activeValue = undefined;
|
|
1812
|
+
a.availableMatchOptions = [];
|
|
1809
1813
|
var g;
|
|
1810
1814
|
var O = 0;
|
|
1811
1815
|
var w = false;
|
|
1812
1816
|
// used to avoid overwriting the selected item ref in multiple mode
|
|
1813
1817
|
var S;
|
|
1814
|
-
var C = h === "immediately" ?
|
|
1815
|
-
var x = n.Children.toArray(
|
|
1818
|
+
var C = h === "immediately" ? a.getTopValues() : i;
|
|
1819
|
+
var x = n.Children.toArray(a.props.children).reduce((function(e, t, o) {
|
|
1816
1820
|
// ignore Headings and Dividers
|
|
1817
1821
|
if (!tn(t)) {
|
|
1818
1822
|
e.push(t);
|
|
1819
1823
|
return e;
|
|
1820
1824
|
}
|
|
1821
1825
|
// Find out if the search string exactly matches a value
|
|
1822
|
-
if (t.props.value ===
|
|
1826
|
+
if (t.props.value === a.state.filterKeyword) {
|
|
1823
1827
|
g = true;
|
|
1824
1828
|
}
|
|
1825
|
-
var
|
|
1826
|
-
var l = !!
|
|
1829
|
+
var i = m && m.indexOf(t.props.value) >= 0;
|
|
1830
|
+
var l = !!i && !t.props.disabled && !S;
|
|
1827
1831
|
var c = s && !d && !f && !b && !y;
|
|
1828
1832
|
var u = nn(t.props.value, t.props.label);
|
|
1829
1833
|
var v = -1;
|
|
1830
1834
|
if (c && !t.props.disabled && !t.props.hidden) {
|
|
1831
|
-
|
|
1835
|
+
a.availableMatchOptions.push({
|
|
1832
1836
|
label: t.props.label,
|
|
1833
1837
|
value: t.props.value
|
|
1834
1838
|
});
|
|
1835
|
-
v =
|
|
1839
|
+
v = a.availableMatchOptions.length - 1;
|
|
1836
1840
|
}
|
|
1837
1841
|
// Format the Menu.Item
|
|
1838
1842
|
var h = (0, n.cloneElement)(t, {
|
|
1839
1843
|
key: t.key || o,
|
|
1840
|
-
onClick:
|
|
1844
|
+
onClick: a.handleMenuOptionClick,
|
|
1841
1845
|
onKeyDown: c ? function(e) {
|
|
1842
|
-
return
|
|
1846
|
+
return a.handleMenuOptionKeyDown(e, v);
|
|
1843
1847
|
} : undefined,
|
|
1844
|
-
selected:
|
|
1848
|
+
selected: i,
|
|
1845
1849
|
multiple: d,
|
|
1846
1850
|
role: "option",
|
|
1847
1851
|
ref: function e(t) {
|
|
1848
|
-
return
|
|
1852
|
+
return a.handleOptionMount(t, u, l);
|
|
1849
1853
|
}
|
|
1850
1854
|
});
|
|
1851
1855
|
if (l) {
|
|
@@ -1872,7 +1876,7 @@
|
|
|
1872
1876
|
return tn(t) && t.props && t.props.value === e;
|
|
1873
1877
|
}));
|
|
1874
1878
|
if (!t) {
|
|
1875
|
-
if (e ===
|
|
1879
|
+
if (e === a.state.filterKeyword) {
|
|
1876
1880
|
g = true;
|
|
1877
1881
|
}
|
|
1878
1882
|
var n = C && C.indexOf(e) >= 0;
|
|
@@ -1888,7 +1892,7 @@
|
|
|
1888
1892
|
label: String(e),
|
|
1889
1893
|
value: e,
|
|
1890
1894
|
key: "missing-value-".concat(e),
|
|
1891
|
-
onClick:
|
|
1895
|
+
onClick: a.handleMenuOptionClick,
|
|
1892
1896
|
multiple: d,
|
|
1893
1897
|
selected: true
|
|
1894
1898
|
}));
|
|
@@ -1926,7 +1930,7 @@
|
|
|
1926
1930
|
value: t,
|
|
1927
1931
|
key: "newValue",
|
|
1928
1932
|
multiple: d,
|
|
1929
|
-
onClick:
|
|
1933
|
+
onClick: a.handleMenuOptionClick
|
|
1930
1934
|
}));
|
|
1931
1935
|
}
|
|
1932
1936
|
// When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
|
|
@@ -1943,13 +1947,13 @@
|
|
|
1943
1947
|
if (t.props && t.props.hidden) {
|
|
1944
1948
|
return e;
|
|
1945
1949
|
}
|
|
1946
|
-
if (t.props.selected && !t.props.disabled &&
|
|
1947
|
-
|
|
1950
|
+
if (t.props.selected && !t.props.disabled && a.firstSelectedOptionIndex == null) {
|
|
1951
|
+
a.firstSelectedOptionIndex = a.availableOptionCount;
|
|
1948
1952
|
}
|
|
1949
|
-
var r = _ ===
|
|
1953
|
+
var r = _ === a.state.activeIndex;
|
|
1950
1954
|
_ += 1;
|
|
1951
|
-
|
|
1952
|
-
|
|
1955
|
+
a.availableOptionCount += 1;
|
|
1956
|
+
a.selectedOptionCount += t.props.selected ? 1 : 0;
|
|
1953
1957
|
if (t.key !== "newValue" && !t.props.disabled && !t.props.selected) {
|
|
1954
1958
|
A = false;
|
|
1955
1959
|
}
|
|
@@ -1958,22 +1962,22 @@
|
|
|
1958
1962
|
return e;
|
|
1959
1963
|
}
|
|
1960
1964
|
if (!t.props.disabled) {
|
|
1961
|
-
|
|
1965
|
+
a.activeValue = t.props.value;
|
|
1962
1966
|
}
|
|
1963
|
-
var
|
|
1967
|
+
var i = (0, n.cloneElement)(t, {
|
|
1964
1968
|
active: r,
|
|
1965
|
-
id:
|
|
1966
|
-
ref:
|
|
1969
|
+
id: a.activeItemId,
|
|
1970
|
+
ref: a.handleActiveOptionMount
|
|
1967
1971
|
});
|
|
1968
|
-
e.push(
|
|
1972
|
+
e.push(i);
|
|
1969
1973
|
return e;
|
|
1970
1974
|
}), []);
|
|
1971
|
-
|
|
1975
|
+
a.optionSelection = a.selectedOptionCount === 0 && "none" || A && "all" || "some";
|
|
1972
1976
|
// add select all option
|
|
1973
|
-
if (v === "checkbox" && d &&
|
|
1977
|
+
if (v === "checkbox" && d && a.availableOptionCount > 0) {
|
|
1974
1978
|
var M;
|
|
1975
1979
|
var P;
|
|
1976
|
-
if (
|
|
1980
|
+
if (a.optionSelection === "all") {
|
|
1977
1981
|
if (t === "") {
|
|
1978
1982
|
P = (0, u._)("Clear all");
|
|
1979
1983
|
} else {
|
|
@@ -1984,25 +1988,25 @@
|
|
|
1984
1988
|
} else {
|
|
1985
1989
|
P = (0, u._)("Select all matches");
|
|
1986
1990
|
}
|
|
1987
|
-
if (
|
|
1988
|
-
|
|
1991
|
+
if (a.state.activeIndex === 0 && o) {
|
|
1992
|
+
a.activeValue = "selectAll";
|
|
1989
1993
|
}
|
|
1990
1994
|
x.unshift( r().createElement(st, {
|
|
1991
1995
|
key: "selectAllOption",
|
|
1992
|
-
selected:
|
|
1996
|
+
selected: a.optionSelection === "all" || a.optionSelection !== "none" && "some",
|
|
1993
1997
|
selectAllLabel: P,
|
|
1994
|
-
totalCount: (M =
|
|
1995
|
-
changedToggle: !!
|
|
1996
|
-
onClick:
|
|
1997
|
-
id:
|
|
1998
|
-
active:
|
|
1999
|
-
ref:
|
|
1998
|
+
totalCount: (M = a.getCurrentValues()) === null || M === void 0 ? void 0 : M.length,
|
|
1999
|
+
changedToggle: !!a.props.toggle,
|
|
2000
|
+
onClick: a.optionSelection === "all" ? a.handleClearAll : a.handleSelectAll,
|
|
2001
|
+
id: a.state.activeIndex === 0 ? a.activeItemId : undefined,
|
|
2002
|
+
active: a.state.activeIndex === 0,
|
|
2003
|
+
ref: a.handleActiveOptionMount,
|
|
2000
2004
|
tabIndex: -1
|
|
2001
2005
|
}), r().createElement(p.Divider, {
|
|
2002
2006
|
key: "selectAllDivider"
|
|
2003
2007
|
}));
|
|
2004
2008
|
}
|
|
2005
|
-
|
|
2009
|
+
a.displayedValues = x.reduce((function(e, t) {
|
|
2006
2010
|
if (tn(t)) {
|
|
2007
2011
|
e.push(t.props.value);
|
|
2008
2012
|
}
|
|
@@ -2010,7 +2014,7 @@
|
|
|
2010
2014
|
}), []);
|
|
2011
2015
|
return x;
|
|
2012
2016
|
}));
|
|
2013
|
-
Jt($t(
|
|
2017
|
+
Jt($t(a), "wrapLabel", (function(e) {
|
|
2014
2018
|
var t = e.prefixLabel, n = e.label, r = e.suffixLabel;
|
|
2015
2019
|
var o = n;
|
|
2016
2020
|
if (t) {
|
|
@@ -2021,10 +2025,10 @@
|
|
|
2021
2025
|
}
|
|
2022
2026
|
return o;
|
|
2023
2027
|
}));
|
|
2024
|
-
Jt($t(
|
|
2025
|
-
|
|
2028
|
+
Jt($t(a), "handleDropdownMount", (function(e) {
|
|
2029
|
+
a.dropdown = e;
|
|
2026
2030
|
}));
|
|
2027
|
-
|
|
2031
|
+
a.state = {
|
|
2028
2032
|
activeIndex: 0,
|
|
2029
2033
|
filterKeyword: "",
|
|
2030
2034
|
open: false,
|
|
@@ -2032,23 +2036,23 @@
|
|
|
2032
2036
|
topValues: [],
|
|
2033
2037
|
values: e.defaultValues || []
|
|
2034
2038
|
};
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2039
|
+
a.controlledExternally = l()(e, "values");
|
|
2040
|
+
a.displayedValues = [];
|
|
2041
|
+
a.availableOptionCount = 0;
|
|
2042
|
+
a.firstSelectedOptionIndex = undefined;
|
|
2043
|
+
a.selectedOptionCount = 0;
|
|
2044
|
+
a.matchCharacter = null;
|
|
2045
|
+
a.matchTimeout = null;
|
|
2046
|
+
a.currentMatchOptions = [];
|
|
2047
|
+
a.availableMatchOptions = [];
|
|
2048
|
+
a.optionRefsByKey = {};
|
|
2049
|
+
a.optionSelection = "none";
|
|
2046
2050
|
if (false) {}
|
|
2047
2051
|
if (false) {}
|
|
2048
2052
|
o.validateAppearance(e);
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
return
|
|
2053
|
+
a.menuId = (0, be.createDOMID)("menu");
|
|
2054
|
+
a.activeItemId = (0, be.createDOMID)("active-item");
|
|
2055
|
+
return a;
|
|
2052
2056
|
}
|
|
2053
2057
|
Nt(o, [ {
|
|
2054
2058
|
key: "componentDidUpdate",
|
|
@@ -2084,16 +2088,16 @@
|
|
|
2084
2088
|
}, {
|
|
2085
2089
|
key: "toggleValue",
|
|
2086
2090
|
value: function e(t, n) {
|
|
2087
|
-
var r, o,
|
|
2088
|
-
var
|
|
2089
|
-
var l =
|
|
2091
|
+
var r, o, a;
|
|
2092
|
+
var i = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
|
|
2093
|
+
var l = i.indexOf(n);
|
|
2090
2094
|
var s = this.props, c = s.name, u = s.multiple;
|
|
2091
2095
|
var p;
|
|
2092
2096
|
if (u) {
|
|
2093
2097
|
if (l >= 0) {
|
|
2094
|
-
p = [].concat(Et(
|
|
2098
|
+
p = [].concat(Et(i.slice(0, l)), Et(i.slice(l + 1)));
|
|
2095
2099
|
} else {
|
|
2096
|
-
p =
|
|
2100
|
+
p = i.concat([ n ]);
|
|
2097
2101
|
}
|
|
2098
2102
|
} else {
|
|
2099
2103
|
// non-multiple mode must always have a value
|
|
@@ -2120,7 +2124,7 @@
|
|
|
2120
2124
|
});
|
|
2121
2125
|
this.focus();
|
|
2122
2126
|
}
|
|
2123
|
-
(o = (
|
|
2127
|
+
(o = (a = this.props).onChange) === null || o === void 0 ? void 0 : o.call(a, t, {
|
|
2124
2128
|
values: p,
|
|
2125
2129
|
name: c,
|
|
2126
2130
|
reason: "valueToggle"
|
|
@@ -2138,8 +2142,8 @@
|
|
|
2138
2142
|
key: "renderControls",
|
|
2139
2143
|
value: function e(t) {
|
|
2140
2144
|
var n = t.hasChildren, o = t.placement;
|
|
2141
|
-
var
|
|
2142
|
-
var
|
|
2145
|
+
var a = this.state.filterKeyword;
|
|
2146
|
+
var i = this.props, l = i.inputId, s = i.inputRef, c = i.multiple, p = i.selectAllAppearance;
|
|
2143
2147
|
var f = (0, u._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
|
|
2144
2148
|
var d = (0, u._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
|
|
2145
2149
|
// only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
|
|
@@ -2151,19 +2155,19 @@
|
|
|
2151
2155
|
"aria-label": f,
|
|
2152
2156
|
onClick: this.handleSelectAll,
|
|
2153
2157
|
"data-test": "select-all"
|
|
2154
|
-
},
|
|
2158
|
+
}, a ? (0, u._)("Select All Matches") : (0, u._)("Select All")), r().createElement(yt, {
|
|
2155
2159
|
$disabled: this.optionSelection === "none",
|
|
2156
2160
|
"aria-label": d,
|
|
2157
2161
|
onClick: this.handleClearAll,
|
|
2158
2162
|
"data-test": "clear-all"
|
|
2159
|
-
},
|
|
2163
|
+
}, a ? (0, u._)("Clear All Matches") : (0, u._)("Clear All")));
|
|
2160
2164
|
return this.hasFilter() && r().createElement("div", {
|
|
2161
2165
|
key: "controls"
|
|
2162
2166
|
}, r().createElement(vt, {
|
|
2163
2167
|
key: "filter",
|
|
2164
2168
|
"data-test": "filter"
|
|
2165
2169
|
}, r().createElement(Ie(), {
|
|
2166
|
-
value:
|
|
2170
|
+
value: a,
|
|
2167
2171
|
autoCapitalize: "off",
|
|
2168
2172
|
autoComplete: "off",
|
|
2169
2173
|
autoCorrect: "off",
|
|
@@ -2187,10 +2191,10 @@
|
|
|
2187
2191
|
key: "render",
|
|
2188
2192
|
value: function e() {
|
|
2189
2193
|
var t, o = this;
|
|
2190
|
-
var
|
|
2194
|
+
var a = this.props, i = a.children, l = a.defaultPlacement, s = a.inputId, c = a.multiple, u = a.repositionMode;
|
|
2191
2195
|
var p = this.hasFilter();
|
|
2192
2196
|
var f = (t = this.getCurrentValues()) !== null && t !== void 0 ? t : [];
|
|
2193
|
-
var d = n.Children.toArray(
|
|
2197
|
+
var d = n.Children.toArray(i);
|
|
2194
2198
|
var v = f.some((function(e) {
|
|
2195
2199
|
var t = Z()(d, (function(t) {
|
|
2196
2200
|
return tn(t) && t.props.value === e;
|
|
@@ -2200,10 +2204,11 @@
|
|
|
2200
2204
|
var h = this.createChildren();
|
|
2201
2205
|
var b = this.createToggle();
|
|
2202
2206
|
var y = function e(t) {
|
|
2203
|
-
var n = t.anchorWidth,
|
|
2207
|
+
var n = t.anchorWidth, a = t.maxHeight, i = t.placement;
|
|
2204
2208
|
var l = Zt({
|
|
2205
2209
|
anchorWidth: n,
|
|
2206
2210
|
isMultiple: o.props.multiple,
|
|
2211
|
+
maxHeight: a,
|
|
2207
2212
|
menuStyle: o.props.menuStyle
|
|
2208
2213
|
});
|
|
2209
2214
|
var s = f.length > 0 && !v && !o.hasFilter() ? 0 : undefined;
|
|
@@ -2211,12 +2216,11 @@
|
|
|
2211
2216
|
return r().createElement(xe(), kt({
|
|
2212
2217
|
"aria-multiselectable": c || undefined,
|
|
2213
2218
|
childrenStart: o.renderControls({
|
|
2214
|
-
placement:
|
|
2219
|
+
placement: i,
|
|
2215
2220
|
hasChildren: !!h.length
|
|
2216
2221
|
}),
|
|
2217
2222
|
controlledExternally: o.hasFilter(),
|
|
2218
|
-
placement:
|
|
2219
|
-
maxHeight: i !== null && i !== void 0 ? i : undefined,
|
|
2223
|
+
placement: i !== null && i !== void 0 ? i : undefined,
|
|
2220
2224
|
onScrollBottom: o.props.onScrollBottom ? o.handleScrollBottom : undefined,
|
|
2221
2225
|
"data-test": "results-menu",
|
|
2222
2226
|
isLoading: o.props.isLoadingOptions,
|
|
@@ -2286,9 +2290,9 @@
|
|
|
2286
2290
|
var n = cn(e, t);
|
|
2287
2291
|
var r, o;
|
|
2288
2292
|
if (Object.getOwnPropertySymbols) {
|
|
2289
|
-
var
|
|
2290
|
-
for (o = 0; o <
|
|
2291
|
-
r =
|
|
2293
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
2294
|
+
for (o = 0; o < a.length; o++) {
|
|
2295
|
+
r = a[o];
|
|
2292
2296
|
if (t.indexOf(r) >= 0) continue;
|
|
2293
2297
|
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
2294
2298
|
n[r] = e[r];
|
|
@@ -2300,9 +2304,9 @@
|
|
|
2300
2304
|
if (e == null) return {};
|
|
2301
2305
|
var n = {};
|
|
2302
2306
|
var r = Object.keys(e);
|
|
2303
|
-
var o,
|
|
2304
|
-
for (
|
|
2305
|
-
o = r[
|
|
2307
|
+
var o, a;
|
|
2308
|
+
for (a = 0; a < r.length; a++) {
|
|
2309
|
+
o = r[a];
|
|
2306
2310
|
if (t.indexOf(o) >= 0) continue;
|
|
2307
2311
|
n[o] = e[o];
|
|
2308
2312
|
}
|
|
@@ -2352,8 +2356,8 @@
|
|
|
2352
2356
|
return function n() {
|
|
2353
2357
|
var r = gn(e), o;
|
|
2354
2358
|
if (t) {
|
|
2355
|
-
var
|
|
2356
|
-
o = Reflect.construct(r, arguments,
|
|
2359
|
+
var a = gn(this).constructor;
|
|
2360
|
+
o = Reflect.construct(r, arguments, a);
|
|
2357
2361
|
} else {
|
|
2358
2362
|
o = r.apply(this, arguments);
|
|
2359
2363
|
}
|
|
@@ -2403,39 +2407,39 @@
|
|
|
2403
2407
|
return e;
|
|
2404
2408
|
}
|
|
2405
2409
|
var wn = {
|
|
2406
|
-
allowNewValues:
|
|
2407
|
-
animateLoading:
|
|
2408
|
-
children:
|
|
2409
|
-
controlledFilter:
|
|
2410
|
-
defaultPlacement:
|
|
2411
|
-
defaultValues:
|
|
2412
|
-
describedBy:
|
|
2413
|
-
disabled:
|
|
2414
|
-
elementRef:
|
|
2415
|
-
error:
|
|
2416
|
-
filter:
|
|
2417
|
-
footerMessage:
|
|
2418
|
-
inline:
|
|
2419
|
-
inputId:
|
|
2420
|
-
inputRef:
|
|
2421
|
-
isLoadingOptions:
|
|
2422
|
-
labelledBy:
|
|
2423
|
-
loadingMessage:
|
|
2424
|
-
menuStyle:
|
|
2425
|
-
name:
|
|
2426
|
-
noOptionsMessage:
|
|
2427
|
-
onChange:
|
|
2428
|
-
onClose:
|
|
2429
|
-
onFilterChange:
|
|
2430
|
-
onOpen:
|
|
2431
|
-
onScroll:
|
|
2432
|
-
onScrollBottom:
|
|
2433
|
-
placeholder:
|
|
2434
|
-
repositionMode:
|
|
2435
|
-
selectAllAppearance:
|
|
2436
|
-
showSelectedValuesFirst:
|
|
2437
|
-
tabConfirmsNewValue:
|
|
2438
|
-
values:
|
|
2410
|
+
allowNewValues: a().bool,
|
|
2411
|
+
animateLoading: a().bool,
|
|
2412
|
+
children: a().node,
|
|
2413
|
+
controlledFilter: a().bool,
|
|
2414
|
+
defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
|
|
2415
|
+
defaultValues: a().array,
|
|
2416
|
+
describedBy: a().string,
|
|
2417
|
+
disabled: a().bool,
|
|
2418
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
2419
|
+
error: a().bool,
|
|
2420
|
+
filter: a().oneOf([ false, true, "controlled" ]),
|
|
2421
|
+
footerMessage: a().node,
|
|
2422
|
+
inline: a().bool,
|
|
2423
|
+
inputId: a().string,
|
|
2424
|
+
inputRef: a().oneOfType([ a().func, a().object ]),
|
|
2425
|
+
isLoadingOptions: a().bool,
|
|
2426
|
+
labelledBy: a().string,
|
|
2427
|
+
loadingMessage: a().node,
|
|
2428
|
+
menuStyle: a().object,
|
|
2429
|
+
name: a().string,
|
|
2430
|
+
noOptionsMessage: a().node,
|
|
2431
|
+
onChange: a().func,
|
|
2432
|
+
onClose: a().func,
|
|
2433
|
+
onFilterChange: a().func,
|
|
2434
|
+
onOpen: a().func,
|
|
2435
|
+
onScroll: a().func,
|
|
2436
|
+
onScrollBottom: a().func,
|
|
2437
|
+
placeholder: a().string,
|
|
2438
|
+
repositionMode: a().oneOf([ "none", "flip" ]),
|
|
2439
|
+
selectAllAppearance: a().oneOf([ "buttongroup", "checkbox" ]),
|
|
2440
|
+
showSelectedValuesFirst: a().oneOf([ "nextOpen", "immediately", "never" ]),
|
|
2441
|
+
tabConfirmsNewValue: a().bool,
|
|
2442
|
+
values: a().array
|
|
2439
2443
|
};
|
|
2440
2444
|
var Sn = {
|
|
2441
2445
|
allowNewValues: false,
|
|
@@ -2462,16 +2466,16 @@
|
|
|
2462
2466
|
key: "render",
|
|
2463
2467
|
// @docs-props-type CompactPropsBase
|
|
2464
2468
|
value: function e() {
|
|
2465
|
-
var t = this.props, o = t.defaultValues,
|
|
2469
|
+
var t = this.props, o = t.defaultValues, a = t.children, i = t.controlledFilter, l = t.filter, s = t.values, c = sn(t, [ "defaultValues", "children", "controlledFilter", "filter", "values" ]);
|
|
2466
2470
|
var u = true;
|
|
2467
2471
|
if (l != null) {
|
|
2468
2472
|
u = l;
|
|
2469
2473
|
if (false) {}
|
|
2470
2474
|
} else {
|
|
2471
|
-
u =
|
|
2475
|
+
u = i ? "controlled" : true;
|
|
2472
2476
|
}
|
|
2473
2477
|
var p = {
|
|
2474
|
-
children: n.Children.toArray(
|
|
2478
|
+
children: n.Children.toArray(a).map((function(e) {
|
|
2475
2479
|
if (tn(e)) {
|
|
2476
2480
|
|
|
2477
2481
|
return r().createElement(E, ln({}, e.props, {
|
|
@@ -2695,14 +2699,14 @@
|
|
|
2695
2699
|
}
|
|
2696
2700
|
return e;
|
|
2697
2701
|
}
|
|
2698
|
-
function
|
|
2702
|
+
function ar(e, t) {
|
|
2699
2703
|
if (e == null) return {};
|
|
2700
|
-
var n =
|
|
2704
|
+
var n = ir(e, t);
|
|
2701
2705
|
var r, o;
|
|
2702
2706
|
if (Object.getOwnPropertySymbols) {
|
|
2703
|
-
var
|
|
2704
|
-
for (o = 0; o <
|
|
2705
|
-
r =
|
|
2707
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
2708
|
+
for (o = 0; o < a.length; o++) {
|
|
2709
|
+
r = a[o];
|
|
2706
2710
|
if (t.indexOf(r) >= 0) continue;
|
|
2707
2711
|
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
2708
2712
|
n[r] = e[r];
|
|
@@ -2710,13 +2714,13 @@
|
|
|
2710
2714
|
}
|
|
2711
2715
|
return n;
|
|
2712
2716
|
}
|
|
2713
|
-
function
|
|
2717
|
+
function ir(e, t) {
|
|
2714
2718
|
if (e == null) return {};
|
|
2715
2719
|
var n = {};
|
|
2716
2720
|
var r = Object.keys(e);
|
|
2717
|
-
var o,
|
|
2718
|
-
for (
|
|
2719
|
-
o = r[
|
|
2721
|
+
var o, a;
|
|
2722
|
+
for (a = 0; a < r.length; a++) {
|
|
2723
|
+
o = r[a];
|
|
2720
2724
|
if (t.indexOf(o) >= 0) continue;
|
|
2721
2725
|
n[o] = e[o];
|
|
2722
2726
|
}
|
|
@@ -2780,8 +2784,8 @@
|
|
|
2780
2784
|
return function n() {
|
|
2781
2785
|
var r = yr(e), o;
|
|
2782
2786
|
if (t) {
|
|
2783
|
-
var
|
|
2784
|
-
o = Reflect.construct(r, arguments,
|
|
2787
|
+
var a = yr(this).constructor;
|
|
2788
|
+
o = Reflect.construct(r, arguments, a);
|
|
2785
2789
|
} else {
|
|
2786
2790
|
o = r.apply(this, arguments);
|
|
2787
2791
|
}
|
|
@@ -2831,39 +2835,39 @@
|
|
|
2831
2835
|
return e;
|
|
2832
2836
|
}
|
|
2833
2837
|
var gr = {
|
|
2834
|
-
allowNewValues:
|
|
2835
|
-
animateLoading:
|
|
2836
|
-
children:
|
|
2837
|
-
controlledFilter:
|
|
2838
|
-
defaultPlacement:
|
|
2839
|
-
defaultValues:
|
|
2840
|
-
describedBy:
|
|
2841
|
-
disabled:
|
|
2842
|
-
elementRef:
|
|
2843
|
-
error:
|
|
2844
|
-
footerMessage:
|
|
2845
|
-
inline:
|
|
2846
|
-
inputId:
|
|
2847
|
-
inputRef:
|
|
2848
|
-
isLoadingOptions:
|
|
2849
|
-
labelledBy:
|
|
2850
|
-
loadingMessage:
|
|
2851
|
-
menuStyle:
|
|
2852
|
-
name:
|
|
2853
|
-
noOptionsMessage:
|
|
2854
|
-
onChange:
|
|
2855
|
-
onClose:
|
|
2856
|
-
onFilterChange:
|
|
2857
|
-
onOpen:
|
|
2858
|
-
onScroll:
|
|
2859
|
-
onScrollBottom:
|
|
2860
|
-
placeholder:
|
|
2838
|
+
allowNewValues: a().bool,
|
|
2839
|
+
animateLoading: a().bool,
|
|
2840
|
+
children: a().node,
|
|
2841
|
+
controlledFilter: a().bool,
|
|
2842
|
+
defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
|
|
2843
|
+
defaultValues: a().array,
|
|
2844
|
+
describedBy: a().string,
|
|
2845
|
+
disabled: a().bool,
|
|
2846
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
2847
|
+
error: a().bool,
|
|
2848
|
+
footerMessage: a().node,
|
|
2849
|
+
inline: a().bool,
|
|
2850
|
+
inputId: a().string,
|
|
2851
|
+
inputRef: a().oneOfType([ a().func, a().object ]),
|
|
2852
|
+
isLoadingOptions: a().bool,
|
|
2853
|
+
labelledBy: a().string,
|
|
2854
|
+
loadingMessage: a().node,
|
|
2855
|
+
menuStyle: a().object,
|
|
2856
|
+
name: a().string,
|
|
2857
|
+
noOptionsMessage: a().node,
|
|
2858
|
+
onChange: a().func,
|
|
2859
|
+
onClose: a().func,
|
|
2860
|
+
onFilterChange: a().func,
|
|
2861
|
+
onOpen: a().func,
|
|
2862
|
+
onScroll: a().func,
|
|
2863
|
+
onScrollBottom: a().func,
|
|
2864
|
+
placeholder: a().string,
|
|
2861
2865
|
/** @private. */
|
|
2862
|
-
required:
|
|
2863
|
-
repositionMode:
|
|
2864
|
-
tabConfirmsNewValue:
|
|
2865
|
-
useClickawayOverlay:
|
|
2866
|
-
values:
|
|
2866
|
+
required: a().bool,
|
|
2867
|
+
repositionMode: a().oneOf([ "none", "flip" ]),
|
|
2868
|
+
tabConfirmsNewValue: a().bool,
|
|
2869
|
+
useClickawayOverlay: a().bool,
|
|
2870
|
+
values: a().array
|
|
2867
2871
|
};
|
|
2868
2872
|
var Or = {
|
|
2869
2873
|
allowNewValues: false,
|
|
@@ -2884,62 +2888,70 @@
|
|
|
2884
2888
|
width: e
|
|
2885
2889
|
};
|
|
2886
2890
|
}));
|
|
2891
|
+
var Sr = ce()((function(e) {
|
|
2892
|
+
var t = e.anchorWidth, n = e.maxHeight, r = e.menuStyle;
|
|
2893
|
+
return _n()({
|
|
2894
|
+
maxHeight: n,
|
|
2895
|
+
overflow: "auto",
|
|
2896
|
+
width: Math.max(t !== null && t !== void 0 ? t : 0, 200)
|
|
2897
|
+
}, r);
|
|
2898
|
+
}));
|
|
2887
2899
|
// TS: not typed controlled/uncontrolled, handled by Multiselect wrapper component
|
|
2888
|
-
var
|
|
2900
|
+
var Cr = function(e) {
|
|
2889
2901
|
pr(o, e);
|
|
2890
2902
|
var t = dr(o);
|
|
2891
2903
|
// @docs-props-type NormalPropsBase
|
|
2892
2904
|
function o(e) {
|
|
2893
|
-
var
|
|
2905
|
+
var a;
|
|
2894
2906
|
sr(this, o);
|
|
2895
|
-
|
|
2896
|
-
mr(hr(
|
|
2897
|
-
mr(hr(
|
|
2898
|
-
mr(hr(
|
|
2899
|
-
mr(hr(
|
|
2900
|
-
mr(hr(
|
|
2901
|
-
mr(hr(
|
|
2902
|
-
mr(hr(
|
|
2903
|
-
mr(hr(
|
|
2904
|
-
mr(hr(
|
|
2907
|
+
a = t.call(this, e);
|
|
2908
|
+
mr(hr(a), "activeItemId", void 0);
|
|
2909
|
+
mr(hr(a), "activeValue", void 0);
|
|
2910
|
+
mr(hr(a), "availableOptionCount", void 0);
|
|
2911
|
+
mr(hr(a), "children", void 0);
|
|
2912
|
+
mr(hr(a), "controlledExternally", void 0);
|
|
2913
|
+
mr(hr(a), "input", null);
|
|
2914
|
+
mr(hr(a), "popoverId", void 0);
|
|
2915
|
+
mr(hr(a), "previousActiveIndex", null);
|
|
2916
|
+
mr(hr(a), "handleClick", (function() {
|
|
2905
2917
|
var e;
|
|
2906
|
-
(e =
|
|
2918
|
+
(e = a.input) === null || e === void 0 ? void 0 : e.focus();
|
|
2907
2919
|
}));
|
|
2908
|
-
mr(hr(
|
|
2920
|
+
mr(hr(a), "handleRequestRemove", (function(e, t) {
|
|
2909
2921
|
var n = t.value;
|
|
2910
2922
|
In()((function() {
|
|
2911
|
-
return
|
|
2923
|
+
return a.removeValue(e, n);
|
|
2912
2924
|
}));
|
|
2913
2925
|
// allow the event to bubble before removing.
|
|
2914
2926
|
}));
|
|
2915
|
-
mr(hr(
|
|
2916
|
-
if (
|
|
2927
|
+
mr(hr(a), "handleInputFocus", (function(e) {
|
|
2928
|
+
if (a.state.filterKeyword !== "") {
|
|
2917
2929
|
var t, n;
|
|
2918
|
-
(t = (n =
|
|
2930
|
+
(t = (n = a.props).onFilterChange) === null || t === void 0 ? void 0 : t.call(n, e, {
|
|
2919
2931
|
keyword: ""
|
|
2920
2932
|
});
|
|
2921
2933
|
}
|
|
2922
|
-
|
|
2934
|
+
a.setState({
|
|
2923
2935
|
filterKeyword: "",
|
|
2924
2936
|
hasFocus: true,
|
|
2925
2937
|
open: true
|
|
2926
2938
|
}, (function() {
|
|
2927
2939
|
var e, t;
|
|
2928
|
-
(e = (t =
|
|
2940
|
+
(e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
|
|
2929
2941
|
}));
|
|
2930
2942
|
}));
|
|
2931
|
-
mr(hr(
|
|
2943
|
+
mr(hr(a), "handleInputKeyDown", (function(e) {
|
|
2932
2944
|
var t, r;
|
|
2933
|
-
var o =
|
|
2945
|
+
var o = a.props, i = o.children, l = o.onScrollBottom, s = o.tabConfirmsNewValue;
|
|
2934
2946
|
var c = (0, ge.keycode)(e.nativeEvent);
|
|
2935
|
-
if (c === "tab" &&
|
|
2936
|
-
if (s && !
|
|
2947
|
+
if (c === "tab" && a.state.open) {
|
|
2948
|
+
if (s && !ae()(a.activeValue) && a.availableOptionCount <= 1) {
|
|
2937
2949
|
var u;
|
|
2938
2950
|
e.preventDefault();
|
|
2939
|
-
|
|
2940
|
-
(u =
|
|
2951
|
+
a.addValue(e, a.activeValue);
|
|
2952
|
+
(u = a.input) === null || u === void 0 ? void 0 : u.focus();
|
|
2941
2953
|
} else {
|
|
2942
|
-
|
|
2954
|
+
a.setState({
|
|
2943
2955
|
open: false
|
|
2944
2956
|
});
|
|
2945
2957
|
}
|
|
@@ -2947,155 +2959,157 @@
|
|
|
2947
2959
|
if (e.shiftKey || e.metaKey || e.ctrlKey) {
|
|
2948
2960
|
return;
|
|
2949
2961
|
}
|
|
2950
|
-
if (c === "end" &&
|
|
2962
|
+
if (c === "end" && a.state.open) {
|
|
2951
2963
|
e.preventDefault();
|
|
2952
|
-
|
|
2953
|
-
activeIndex:
|
|
2964
|
+
a.setState({
|
|
2965
|
+
activeIndex: a.availableOptionCount - 1
|
|
2954
2966
|
});
|
|
2955
2967
|
}
|
|
2956
|
-
if (c === "home" &&
|
|
2968
|
+
if (c === "home" && a.state.open) {
|
|
2957
2969
|
e.preventDefault();
|
|
2958
|
-
|
|
2970
|
+
a.setState({
|
|
2959
2971
|
activeIndex: 0
|
|
2960
2972
|
});
|
|
2961
2973
|
}
|
|
2962
2974
|
if (c === "down") {
|
|
2963
2975
|
e.preventDefault();
|
|
2964
|
-
if (
|
|
2965
|
-
|
|
2976
|
+
if (a.state.open) {
|
|
2977
|
+
a.setState((function(e) {
|
|
2966
2978
|
return {
|
|
2967
|
-
activeIndex: Math.min(e.activeIndex + 1,
|
|
2979
|
+
activeIndex: Math.min(e.activeIndex + 1, a.availableOptionCount - 1)
|
|
2968
2980
|
};
|
|
2969
2981
|
}));
|
|
2970
2982
|
} else {
|
|
2971
|
-
|
|
2983
|
+
a.setState({
|
|
2972
2984
|
activeIndex: 0,
|
|
2973
2985
|
open: true
|
|
2974
2986
|
});
|
|
2975
2987
|
}
|
|
2976
|
-
if (
|
|
2988
|
+
if (i && l) {
|
|
2977
2989
|
var p;
|
|
2978
|
-
var f = n.Children.toArray(
|
|
2979
|
-
if (
|
|
2980
|
-
|
|
2990
|
+
var f = n.Children.toArray(i).length - (2 + ((p = a.getCurrentValues()) !== null && p !== void 0 ? p : []).length);
|
|
2991
|
+
if (a.state.activeIndex === f) {
|
|
2992
|
+
a.handleScrollBottom(e);
|
|
2981
2993
|
}
|
|
2982
2994
|
}
|
|
2983
2995
|
}
|
|
2984
2996
|
if (c === "up") {
|
|
2985
2997
|
e.preventDefault();
|
|
2986
|
-
if (
|
|
2987
|
-
|
|
2998
|
+
if (a.state.open) {
|
|
2999
|
+
a.setState((function(e) {
|
|
2988
3000
|
return {
|
|
2989
3001
|
activeIndex: Math.max(e.activeIndex - 1, 0)
|
|
2990
3002
|
};
|
|
2991
3003
|
}));
|
|
2992
3004
|
} else {
|
|
2993
|
-
|
|
3005
|
+
a.setState({
|
|
2994
3006
|
activeIndex: 0,
|
|
2995
3007
|
open: true
|
|
2996
3008
|
});
|
|
2997
3009
|
}
|
|
2998
3010
|
}
|
|
2999
|
-
if (c === "enter" && !
|
|
3000
|
-
|
|
3011
|
+
if (c === "enter" && !ae()(a.activeValue) && a.state.open) {
|
|
3012
|
+
a.addValue(e, a.activeValue);
|
|
3001
3013
|
}
|
|
3002
|
-
if (c === "backspace" && ((t =
|
|
3003
|
-
|
|
3014
|
+
if (c === "backspace" && ((t = a.input) === null || t === void 0 ? void 0 : t.value) === "" && ((r = a.getCurrentValues()) === null || r === void 0 ? void 0 : r.length)) {
|
|
3015
|
+
a.removeValue(e, Rn()(a.getCurrentValues()));
|
|
3004
3016
|
}
|
|
3005
3017
|
}));
|
|
3006
|
-
mr(hr(
|
|
3018
|
+
mr(hr(a), "handleInputChange", (function(e) {
|
|
3007
3019
|
var t, n;
|
|
3008
|
-
|
|
3020
|
+
a.setState({
|
|
3009
3021
|
filterKeyword: e.target.value,
|
|
3010
3022
|
open: true,
|
|
3011
3023
|
activeIndex: 0
|
|
3012
3024
|
});
|
|
3013
|
-
(t = (n =
|
|
3025
|
+
(t = (n = a.props).onFilterChange) === null || t === void 0 ? void 0 : t.call(n, e, {
|
|
3014
3026
|
keyword: e.target.value
|
|
3015
3027
|
});
|
|
3016
3028
|
}));
|
|
3017
|
-
mr(hr(
|
|
3029
|
+
mr(hr(a), "handleMenuOptionClick", (function(e, t) {
|
|
3018
3030
|
var n;
|
|
3019
3031
|
var r = t.value;
|
|
3020
|
-
|
|
3021
|
-
(n =
|
|
3032
|
+
a.addValue(e, r);
|
|
3033
|
+
(n = a.input) === null || n === void 0 ? void 0 : n.focus();
|
|
3022
3034
|
}));
|
|
3023
|
-
mr(hr(
|
|
3024
|
-
var t = document.getElementById(
|
|
3035
|
+
mr(hr(a), "handleInputBlur", (function(e) {
|
|
3036
|
+
var t = document.getElementById(a.popoverId);
|
|
3025
3037
|
var n = e.relatedTarget || document.activeElement;
|
|
3026
3038
|
// IE11 doesn't support relatedTarget but sets activeElement
|
|
3027
3039
|
var r = t && n && t.contains(n);
|
|
3028
3040
|
// TS: target as Node is an unsafe assumption
|
|
3029
|
-
|
|
3041
|
+
a.setState((function(e) {
|
|
3030
3042
|
return {
|
|
3031
3043
|
filterKeyword: r ? e.filterKeyword : "",
|
|
3032
3044
|
hasFocus: false
|
|
3033
3045
|
};
|
|
3034
3046
|
}));
|
|
3035
3047
|
if (!r) {
|
|
3036
|
-
var o,
|
|
3037
|
-
(o = (
|
|
3048
|
+
var o, i;
|
|
3049
|
+
(o = (i = a.props).onFilterChange) === null || o === void 0 ? void 0 : o.call(i, e, {
|
|
3038
3050
|
keyword: ""
|
|
3039
3051
|
});
|
|
3040
3052
|
}
|
|
3041
3053
|
}));
|
|
3042
|
-
mr(hr(
|
|
3054
|
+
mr(hr(a), "handleRequestClose", (function(e) {
|
|
3043
3055
|
var t;
|
|
3044
3056
|
var n = e.reason, r = e.event;
|
|
3045
|
-
if (n === "escapeKey" || n === "offScreen" || n === "clickAway" && r !== undefined && !((t =
|
|
3046
|
-
|
|
3057
|
+
if (n === "escapeKey" || n === "offScreen" || n === "clickAway" && r !== undefined && !((t = a.state.el) === null || t === void 0 ? void 0 : t.contains(r.target))) {
|
|
3058
|
+
a.setState({
|
|
3047
3059
|
open: false
|
|
3048
3060
|
}, (function() {
|
|
3049
3061
|
var e, t;
|
|
3050
|
-
|
|
3051
|
-
(e = (t =
|
|
3062
|
+
a.previousActiveIndex = null;
|
|
3063
|
+
(e = (t = a.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
|
|
3052
3064
|
}));
|
|
3053
3065
|
}
|
|
3054
3066
|
if (n === "escapeKey") {
|
|
3055
3067
|
var o;
|
|
3056
|
-
(o =
|
|
3068
|
+
(o = a.input) === null || o === void 0 ? void 0 : o.focus();
|
|
3057
3069
|
}
|
|
3058
3070
|
}));
|
|
3059
|
-
mr(hr(
|
|
3060
|
-
if (
|
|
3071
|
+
mr(hr(a), "handleScrollBottom", (function(e) {
|
|
3072
|
+
if (a.state.open && !a.props.isLoadingOptions) {
|
|
3061
3073
|
var t, n;
|
|
3062
|
-
(t = (n =
|
|
3063
|
-
|
|
3064
|
-
loadingMoreMessage: "".concat(
|
|
3074
|
+
(t = (n = a.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
3075
|
+
a.setState({
|
|
3076
|
+
loadingMoreMessage: "".concat(a.availableOptionCount, " options, loading more options")
|
|
3065
3077
|
});
|
|
3066
3078
|
}
|
|
3067
3079
|
}));
|
|
3068
|
-
mr(hr(
|
|
3069
|
-
|
|
3080
|
+
mr(hr(a), "handleMount", (function(e) {
|
|
3081
|
+
a.setState({
|
|
3070
3082
|
el: e
|
|
3071
3083
|
});
|
|
3072
|
-
Jn(
|
|
3084
|
+
Jn(a.props.elementRef, e);
|
|
3073
3085
|
}));
|
|
3074
|
-
mr(hr(
|
|
3075
|
-
|
|
3076
|
-
Jn(
|
|
3086
|
+
mr(hr(a), "handleInputMount", (function(e) {
|
|
3087
|
+
a.input = e;
|
|
3088
|
+
Jn(a.props.inputRef, e);
|
|
3077
3089
|
}));
|
|
3078
|
-
mr(hr(
|
|
3079
|
-
if (
|
|
3090
|
+
mr(hr(a), "handleActiveOptionMount", (function(e) {
|
|
3091
|
+
if (a.previousActiveIndex !== a.state.activeIndex) {
|
|
3080
3092
|
e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
|
|
3081
3093
|
}
|
|
3082
3094
|
}));
|
|
3083
|
-
mr(hr(
|
|
3095
|
+
mr(hr(a), "renderMenu", (function(e) {
|
|
3084
3096
|
var t = e.anchorWidth, n = e.maxHeight, o = e.placement;
|
|
3097
|
+
var i = Sr({
|
|
3098
|
+
anchorWidth: t,
|
|
3099
|
+
maxHeight: n,
|
|
3100
|
+
menuStyle: a.props.menuStyle
|
|
3101
|
+
});
|
|
3085
3102
|
|
|
3086
3103
|
return r().createElement(xe(), lr({
|
|
3087
3104
|
controlledExternally: true,
|
|
3088
3105
|
placement: o !== null && o !== void 0 ? o : undefined,
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
width: Math.max(t !== null && t !== void 0 ? t : 0, 200)
|
|
3095
|
-
}, i.props.menuStyle)
|
|
3096
|
-
}), i.children);
|
|
3106
|
+
isLoading: a.props.isLoadingOptions,
|
|
3107
|
+
onScrollBottom: a.props.onScrollBottom ? a.handleScrollBottom : undefined
|
|
3108
|
+
}, pe()(a.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll"), {
|
|
3109
|
+
style: i
|
|
3110
|
+
}), a.children);
|
|
3097
3111
|
}));
|
|
3098
|
-
|
|
3112
|
+
a.state = {
|
|
3099
3113
|
activeIndex: 0,
|
|
3100
3114
|
el: null,
|
|
3101
3115
|
filterKeyword: "",
|
|
@@ -3104,14 +3118,14 @@
|
|
|
3104
3118
|
values: e.defaultValues || [],
|
|
3105
3119
|
loadingMoreMessage: ""
|
|
3106
3120
|
};
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3121
|
+
a.availableOptionCount = 0;
|
|
3122
|
+
a.children = [];
|
|
3123
|
+
a.controlledExternally = l()(e, "values");
|
|
3124
|
+
a.activeItemId = (0, be.createDOMID)("active-item");
|
|
3125
|
+
a.popoverId = (0, be.createDOMID)("popover");
|
|
3112
3126
|
if (false) {}
|
|
3113
3127
|
if (false) {}
|
|
3114
|
-
return
|
|
3128
|
+
return a;
|
|
3115
3129
|
}
|
|
3116
3130
|
ur(o, [ {
|
|
3117
3131
|
key: "componentDidUpdate",
|
|
@@ -3149,19 +3163,19 @@
|
|
|
3149
3163
|
}, {
|
|
3150
3164
|
key: "addValue",
|
|
3151
3165
|
value: function e(t, n) {
|
|
3152
|
-
var r, o,
|
|
3153
|
-
var
|
|
3166
|
+
var r, o, a;
|
|
3167
|
+
var i = ((r = this.getCurrentValues()) !== null && r !== void 0 ? r : []).concat([ n ]);
|
|
3154
3168
|
var l = this.props.name;
|
|
3155
3169
|
if (!this.isControlled()) {
|
|
3156
3170
|
this.setState({
|
|
3157
|
-
values:
|
|
3171
|
+
values: i,
|
|
3158
3172
|
activeIndex: 0,
|
|
3159
3173
|
open: true,
|
|
3160
3174
|
filterKeyword: ""
|
|
3161
3175
|
});
|
|
3162
3176
|
}
|
|
3163
|
-
(o = (
|
|
3164
|
-
values:
|
|
3177
|
+
(o = (a = this.props).onChange) === null || o === void 0 ? void 0 : o.call(a, t, {
|
|
3178
|
+
values: i,
|
|
3165
3179
|
name: l
|
|
3166
3180
|
});
|
|
3167
3181
|
}
|
|
@@ -3169,16 +3183,16 @@
|
|
|
3169
3183
|
key: "removeValue",
|
|
3170
3184
|
value: function e(t, n) {
|
|
3171
3185
|
var r, o;
|
|
3172
|
-
var
|
|
3173
|
-
var
|
|
3186
|
+
var a = he()(this.getCurrentValues(), n);
|
|
3187
|
+
var i = this.props.name;
|
|
3174
3188
|
if (!this.isControlled()) {
|
|
3175
3189
|
this.setState({
|
|
3176
|
-
values:
|
|
3190
|
+
values: a
|
|
3177
3191
|
});
|
|
3178
3192
|
}
|
|
3179
3193
|
(r = (o = this.props).onChange) === null || r === void 0 ? void 0 : r.call(o, t, {
|
|
3180
|
-
values:
|
|
3181
|
-
name:
|
|
3194
|
+
values: a,
|
|
3195
|
+
name: i
|
|
3182
3196
|
});
|
|
3183
3197
|
}
|
|
3184
3198
|
}, {
|
|
@@ -3209,7 +3223,7 @@
|
|
|
3209
3223
|
key: "render",
|
|
3210
3224
|
value: function e() {
|
|
3211
3225
|
var t, o = this;
|
|
3212
|
-
var
|
|
3226
|
+
var a = this.props, i = a.allowNewValues, s = a.children, p = a.controlledFilter, f = a.defaultPlacement, d = a.describedBy, v = a.disabled, h = a.error, b = a.inline, y = a.inputId, m = a.labelledBy, g = a.placeholder, O = a.required, w = a.repositionMode, S = a.useClickawayOverlay, C = ar(a, [ "allowNewValues", "children", "controlledFilter", "defaultPlacement", "describedBy", "disabled", "error", "inline", "inputId", "labelledBy", "placeholder", "required", "repositionMode", "useClickawayOverlay" ]);
|
|
3213
3227
|
var x = or(or({}, Dn()(C, (function(e, t) {
|
|
3214
3228
|
return t === "role" || t.indexOf("aria-") === 0;
|
|
3215
3229
|
}))), {}, {
|
|
@@ -3259,12 +3273,12 @@
|
|
|
3259
3273
|
_ = true;
|
|
3260
3274
|
}
|
|
3261
3275
|
// remove items that are already selected
|
|
3262
|
-
var
|
|
3263
|
-
if (
|
|
3276
|
+
var a = I.indexOf(r.props.value);
|
|
3277
|
+
if (a >= 0) {
|
|
3264
3278
|
return null;
|
|
3265
3279
|
}
|
|
3266
3280
|
// highlight matched text
|
|
3267
|
-
var
|
|
3281
|
+
var i = r.props, s = i.children, c = i.label, u = i.matchRanges;
|
|
3268
3282
|
var f = s === undefined || Pn()(s);
|
|
3269
3283
|
var d = f && !p && !u && A && (0, Oe.keywordLocations)(c, A);
|
|
3270
3284
|
// clone item
|
|
@@ -3278,7 +3292,7 @@
|
|
|
3278
3292
|
return e !== null;
|
|
3279
3293
|
}));
|
|
3280
3294
|
// Add the option to add the new value
|
|
3281
|
-
if (
|
|
3295
|
+
if (i && !_ && this.state.filterKeyword) {
|
|
3282
3296
|
this.children.unshift( r().createElement(J, {
|
|
3283
3297
|
label: "".concat(this.state.filterKeyword),
|
|
3284
3298
|
description: (0, u._)("(New value)"),
|
|
@@ -3304,12 +3318,12 @@
|
|
|
3304
3318
|
if (!t.props.disabled) {
|
|
3305
3319
|
o.activeValue = t.props.value;
|
|
3306
3320
|
}
|
|
3307
|
-
var
|
|
3321
|
+
var a = (0, n.cloneElement)(t, {
|
|
3308
3322
|
active: r,
|
|
3309
3323
|
id: o.activeItemId,
|
|
3310
3324
|
ref: o.handleActiveOptionMount
|
|
3311
3325
|
});
|
|
3312
|
-
return
|
|
3326
|
+
return a;
|
|
3313
3327
|
}));
|
|
3314
3328
|
}
|
|
3315
3329
|
var M = wr("".concat(this.state.filterKeyword.length * .8, "em"));
|
|
@@ -3377,28 +3391,28 @@
|
|
|
3377
3391
|
} ]);
|
|
3378
3392
|
return o;
|
|
3379
3393
|
}(n.Component);
|
|
3380
|
-
mr(
|
|
3381
|
-
mr(
|
|
3382
|
-
mr(
|
|
3383
|
-
mr(
|
|
3384
|
-
mr(
|
|
3385
|
-
/* harmony default export */ const
|
|
3394
|
+
mr(Cr, "propTypes", gr);
|
|
3395
|
+
mr(Cr, "defaultProps", Or);
|
|
3396
|
+
mr(Cr, "Option", J);
|
|
3397
|
+
mr(Cr, "Divider", p.Divider);
|
|
3398
|
+
mr(Cr, "Heading", p.Heading);
|
|
3399
|
+
/* harmony default export */ const xr = Cr;
|
|
3386
3400
|
// CONCATENATED MODULE: ./src/Multiselect/Multiselect.tsx
|
|
3387
|
-
function
|
|
3401
|
+
function kr(e) {
|
|
3388
3402
|
"@babel/helpers - typeof";
|
|
3389
3403
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3390
|
-
|
|
3404
|
+
kr = function e(t) {
|
|
3391
3405
|
return typeof t;
|
|
3392
3406
|
};
|
|
3393
3407
|
} else {
|
|
3394
|
-
|
|
3408
|
+
kr = function e(t) {
|
|
3395
3409
|
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3396
3410
|
};
|
|
3397
3411
|
}
|
|
3398
|
-
return
|
|
3412
|
+
return kr(e);
|
|
3399
3413
|
}
|
|
3400
|
-
function
|
|
3401
|
-
|
|
3414
|
+
function Ir() {
|
|
3415
|
+
Ir = Object.assign || function(e) {
|
|
3402
3416
|
for (var t = 1; t < arguments.length; t++) {
|
|
3403
3417
|
var n = arguments[t];
|
|
3404
3418
|
for (var r in n) {
|
|
@@ -3409,14 +3423,14 @@
|
|
|
3409
3423
|
}
|
|
3410
3424
|
return e;
|
|
3411
3425
|
};
|
|
3412
|
-
return
|
|
3426
|
+
return Ir.apply(this, arguments);
|
|
3413
3427
|
}
|
|
3414
|
-
function
|
|
3428
|
+
function jr(e, t) {
|
|
3415
3429
|
if (!(e instanceof t)) {
|
|
3416
3430
|
throw new TypeError("Cannot call a class as a function");
|
|
3417
3431
|
}
|
|
3418
3432
|
}
|
|
3419
|
-
function
|
|
3433
|
+
function _r(e, t) {
|
|
3420
3434
|
for (var n = 0; n < t.length; n++) {
|
|
3421
3435
|
var r = t[n];
|
|
3422
3436
|
r.enumerable = r.enumerable || false;
|
|
@@ -3425,12 +3439,12 @@
|
|
|
3425
3439
|
Object.defineProperty(e, r.key, r);
|
|
3426
3440
|
}
|
|
3427
3441
|
}
|
|
3428
|
-
function
|
|
3429
|
-
if (t)
|
|
3430
|
-
if (n)
|
|
3442
|
+
function Ar(e, t, n) {
|
|
3443
|
+
if (t) _r(e.prototype, t);
|
|
3444
|
+
if (n) _r(e, n);
|
|
3431
3445
|
return e;
|
|
3432
3446
|
}
|
|
3433
|
-
function
|
|
3447
|
+
function Er(e, t) {
|
|
3434
3448
|
if (typeof t !== "function" && t !== null) {
|
|
3435
3449
|
throw new TypeError("Super expression must either be null or a function");
|
|
3436
3450
|
}
|
|
@@ -3441,41 +3455,41 @@
|
|
|
3441
3455
|
configurable: true
|
|
3442
3456
|
}
|
|
3443
3457
|
});
|
|
3444
|
-
if (t)
|
|
3458
|
+
if (t) Mr(e, t);
|
|
3445
3459
|
}
|
|
3446
|
-
function
|
|
3447
|
-
|
|
3460
|
+
function Mr(e, t) {
|
|
3461
|
+
Mr = Object.setPrototypeOf || function e(t, n) {
|
|
3448
3462
|
t.__proto__ = n;
|
|
3449
3463
|
return t;
|
|
3450
3464
|
};
|
|
3451
|
-
return
|
|
3465
|
+
return Mr(e, t);
|
|
3452
3466
|
}
|
|
3453
|
-
function
|
|
3454
|
-
var t =
|
|
3467
|
+
function Pr(e) {
|
|
3468
|
+
var t = Tr();
|
|
3455
3469
|
return function n() {
|
|
3456
|
-
var r =
|
|
3470
|
+
var r = Dr(e), o;
|
|
3457
3471
|
if (t) {
|
|
3458
|
-
var
|
|
3459
|
-
o = Reflect.construct(r, arguments,
|
|
3472
|
+
var a = Dr(this).constructor;
|
|
3473
|
+
o = Reflect.construct(r, arguments, a);
|
|
3460
3474
|
} else {
|
|
3461
3475
|
o = r.apply(this, arguments);
|
|
3462
3476
|
}
|
|
3463
|
-
return
|
|
3477
|
+
return Vr(this, o);
|
|
3464
3478
|
};
|
|
3465
3479
|
}
|
|
3466
|
-
function
|
|
3467
|
-
if (t && (
|
|
3480
|
+
function Vr(e, t) {
|
|
3481
|
+
if (t && (kr(t) === "object" || typeof t === "function")) {
|
|
3468
3482
|
return t;
|
|
3469
3483
|
}
|
|
3470
|
-
return
|
|
3484
|
+
return Rr(e);
|
|
3471
3485
|
}
|
|
3472
|
-
function
|
|
3486
|
+
function Rr(e) {
|
|
3473
3487
|
if (e === void 0) {
|
|
3474
3488
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3475
3489
|
}
|
|
3476
3490
|
return e;
|
|
3477
3491
|
}
|
|
3478
|
-
function
|
|
3492
|
+
function Tr() {
|
|
3479
3493
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
3480
3494
|
if (Reflect.construct.sham) return false;
|
|
3481
3495
|
if (typeof Proxy === "function") return true;
|
|
@@ -3486,13 +3500,13 @@
|
|
|
3486
3500
|
return false;
|
|
3487
3501
|
}
|
|
3488
3502
|
}
|
|
3489
|
-
function
|
|
3490
|
-
|
|
3503
|
+
function Dr(e) {
|
|
3504
|
+
Dr = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
3491
3505
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
3492
3506
|
};
|
|
3493
|
-
return
|
|
3507
|
+
return Dr(e);
|
|
3494
3508
|
}
|
|
3495
|
-
function
|
|
3509
|
+
function qr(e, t, n) {
|
|
3496
3510
|
if (t in e) {
|
|
3497
3511
|
Object.defineProperty(e, t, {
|
|
3498
3512
|
value: n,
|
|
@@ -3505,44 +3519,44 @@
|
|
|
3505
3519
|
}
|
|
3506
3520
|
return e;
|
|
3507
3521
|
}
|
|
3508
|
-
var qr = {
|
|
3509
|
-
allowNewValues: i().bool,
|
|
3510
|
-
animateLoading: i().bool,
|
|
3511
|
-
children: i().node,
|
|
3512
|
-
compact: i().bool,
|
|
3513
|
-
controlledFilter: i().bool,
|
|
3514
|
-
defaultPlacement: i().oneOf([ "above", "below", "vertical" ]),
|
|
3515
|
-
defaultValues: i().array,
|
|
3516
|
-
describedBy: i().string,
|
|
3517
|
-
disabled: i().bool,
|
|
3518
|
-
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
3519
|
-
error: i().bool,
|
|
3520
|
-
filter: i().oneOf([ false, true, "controlled" ]),
|
|
3521
|
-
footerMessage: i().node,
|
|
3522
|
-
inline: i().bool,
|
|
3523
|
-
inputId: i().string,
|
|
3524
|
-
inputRef: i().oneOfType([ i().func, i().object ]),
|
|
3525
|
-
isLoadingOptions: i().bool,
|
|
3526
|
-
labelledBy: i().string,
|
|
3527
|
-
loadingMessage: i().node,
|
|
3528
|
-
menuStyle: i().object,
|
|
3529
|
-
name: i().string,
|
|
3530
|
-
noOptionsMessage: i().node,
|
|
3531
|
-
onChange: i().func,
|
|
3532
|
-
onClose: i().func,
|
|
3533
|
-
onFilterChange: i().func,
|
|
3534
|
-
onOpen: i().func,
|
|
3535
|
-
onScroll: i().func,
|
|
3536
|
-
onScrollBottom: i().func,
|
|
3537
|
-
placeholder: i().string,
|
|
3538
|
-
repositionMode: i().oneOf([ "none", "flip" ]),
|
|
3539
|
-
selectAllAppearance: i().oneOf([ "buttongroup", "checkbox" ]),
|
|
3540
|
-
showSelectedValuesFirst: i().oneOf([ "nextOpen", "immediately", "never" ]),
|
|
3541
|
-
tabConfirmsNewValue: i().bool,
|
|
3542
|
-
useClickawayOverlay: i().bool,
|
|
3543
|
-
values: i().array
|
|
3544
|
-
};
|
|
3545
3522
|
var Nr = {
|
|
3523
|
+
allowNewValues: a().bool,
|
|
3524
|
+
animateLoading: a().bool,
|
|
3525
|
+
children: a().node,
|
|
3526
|
+
compact: a().bool,
|
|
3527
|
+
controlledFilter: a().bool,
|
|
3528
|
+
defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
|
|
3529
|
+
defaultValues: a().array,
|
|
3530
|
+
describedBy: a().string,
|
|
3531
|
+
disabled: a().bool,
|
|
3532
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
3533
|
+
error: a().bool,
|
|
3534
|
+
filter: a().oneOf([ false, true, "controlled" ]),
|
|
3535
|
+
footerMessage: a().node,
|
|
3536
|
+
inline: a().bool,
|
|
3537
|
+
inputId: a().string,
|
|
3538
|
+
inputRef: a().oneOfType([ a().func, a().object ]),
|
|
3539
|
+
isLoadingOptions: a().bool,
|
|
3540
|
+
labelledBy: a().string,
|
|
3541
|
+
loadingMessage: a().node,
|
|
3542
|
+
menuStyle: a().object,
|
|
3543
|
+
name: a().string,
|
|
3544
|
+
noOptionsMessage: a().node,
|
|
3545
|
+
onChange: a().func,
|
|
3546
|
+
onClose: a().func,
|
|
3547
|
+
onFilterChange: a().func,
|
|
3548
|
+
onOpen: a().func,
|
|
3549
|
+
onScroll: a().func,
|
|
3550
|
+
onScrollBottom: a().func,
|
|
3551
|
+
placeholder: a().string,
|
|
3552
|
+
repositionMode: a().oneOf([ "none", "flip" ]),
|
|
3553
|
+
selectAllAppearance: a().oneOf([ "buttongroup", "checkbox" ]),
|
|
3554
|
+
showSelectedValuesFirst: a().oneOf([ "nextOpen", "immediately", "never" ]),
|
|
3555
|
+
tabConfirmsNewValue: a().bool,
|
|
3556
|
+
useClickawayOverlay: a().bool,
|
|
3557
|
+
values: a().array
|
|
3558
|
+
};
|
|
3559
|
+
var Br = {
|
|
3546
3560
|
allowNewValues: false,
|
|
3547
3561
|
animateLoading: false,
|
|
3548
3562
|
compact: false,
|
|
@@ -3557,43 +3571,43 @@
|
|
|
3557
3571
|
tabConfirmsNewValue: false,
|
|
3558
3572
|
useClickawayOverlay: false
|
|
3559
3573
|
};
|
|
3560
|
-
function
|
|
3574
|
+
function Lr(e) {
|
|
3561
3575
|
return e && e.compact === true;
|
|
3562
3576
|
}
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3565
|
-
var t =
|
|
3577
|
+
var Kr = function(e) {
|
|
3578
|
+
Er(n, e);
|
|
3579
|
+
var t = Pr(n);
|
|
3566
3580
|
function n() {
|
|
3567
|
-
|
|
3581
|
+
jr(this, n);
|
|
3568
3582
|
return t.apply(this, arguments);
|
|
3569
3583
|
}
|
|
3570
|
-
|
|
3584
|
+
Ar(n, [ {
|
|
3571
3585
|
key: "render",
|
|
3572
3586
|
// @docs-props-type MultiselectPropsBase
|
|
3573
3587
|
// TODO: SUI-3402, this can be removed when ControlGroup no longer needs to inspect componentType
|
|
3574
3588
|
value: function e() {
|
|
3575
|
-
if (
|
|
3589
|
+
if (Lr(this.props)) {
|
|
3576
3590
|
|
|
3577
|
-
return r().createElement(xn,
|
|
3591
|
+
return r().createElement(xn, Ir({
|
|
3578
3592
|
"data-test": "multiselect"
|
|
3579
3593
|
}, c()(this.props, "compact")));
|
|
3580
3594
|
}
|
|
3581
3595
|
if (false) {}
|
|
3582
3596
|
|
|
3583
|
-
return r().createElement(
|
|
3597
|
+
return r().createElement(xr, Ir({
|
|
3584
3598
|
"data-test": "multiselect"
|
|
3585
3599
|
}, c()(this.props, "compact")));
|
|
3586
3600
|
}
|
|
3587
3601
|
} ]);
|
|
3588
3602
|
return n;
|
|
3589
3603
|
}(n.Component);
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
/* harmony default export */ const
|
|
3604
|
+
qr(Kr, "propTypes", Nr);
|
|
3605
|
+
qr(Kr, "defaultProps", Br);
|
|
3606
|
+
qr(Kr, "componentType", "Multiselect");
|
|
3607
|
+
qr(Kr, "Option", J);
|
|
3608
|
+
qr(Kr, "Heading", p.Heading);
|
|
3609
|
+
qr(Kr, "Divider", p.Divider);
|
|
3610
|
+
/* harmony default export */ const Fr = Kr;
|
|
3597
3611
|
// CONCATENATED MODULE: ./src/Multiselect/index.ts
|
|
3598
3612
|
module.exports = t;
|
|
3599
3613
|
/******/})();
|