@splunk/react-ui 4.22.1 → 4.23.0

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/Select.js CHANGED
@@ -71,10 +71,10 @@
71
71
  var r = e.n(n);
72
72
  // CONCATENATED MODULE: external "prop-types"
73
73
  const o = require("prop-types");
74
- var i = e.n(o);
74
+ var a = e.n(o);
75
75
  // CONCATENATED MODULE: external "lodash/has"
76
- const a = require("lodash/has");
77
- var l = e.n(a);
76
+ const i = require("lodash/has");
77
+ var l = e.n(i);
78
78
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
79
79
  const c = require("@splunk/ui-utils/i18n");
80
80
  // CONCATENATED MODULE: external "lodash/castArray"
@@ -158,18 +158,18 @@
158
158
  // CONCATENATED MODULE: ./src/Select/icons/Search.tsx
159
159
  var ee = function e() {
160
160
  var t = (0, U.useSplunkTheme)(), n = t.isEnterprise, o = t.isCompact;
161
- var i = (0, c._)("Search");
162
- var a = o ? "20px" : "24px";
161
+ var a = (0, c._)("Search");
162
+ var i = o ? "20px" : "24px";
163
163
  var l = n ? r().createElement(X(), {
164
164
  role: "presentation",
165
165
  size: "16px",
166
- screenReaderText: i,
166
+ screenReaderText: a,
167
167
  hideDefaultTooltip: true
168
168
  }) : r().createElement(Z(), {
169
169
  role: "presentation",
170
- "aria-label": i,
171
- width: a,
172
- height: a
170
+ "aria-label": a,
171
+ width: i,
172
+ height: i
173
173
  });
174
174
  return l;
175
175
  };
@@ -204,12 +204,12 @@
204
204
  }
205
205
  function oe(e, t) {
206
206
  if (e == null) return {};
207
- var n = ie(e, t);
207
+ var n = ae(e, t);
208
208
  var r, o;
209
209
  if (Object.getOwnPropertySymbols) {
210
- var i = Object.getOwnPropertySymbols(e);
211
- for (o = 0; o < i.length; o++) {
212
- r = i[o];
210
+ var a = Object.getOwnPropertySymbols(e);
211
+ for (o = 0; o < a.length; o++) {
212
+ r = a[o];
213
213
  if (t.indexOf(r) >= 0) continue;
214
214
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
215
215
  n[r] = e[r];
@@ -217,19 +217,19 @@
217
217
  }
218
218
  return n;
219
219
  }
220
- function ie(e, t) {
220
+ function ae(e, t) {
221
221
  if (e == null) return {};
222
222
  var n = {};
223
223
  var r = Object.keys(e);
224
- var o, i;
225
- for (i = 0; i < r.length; i++) {
226
- o = r[i];
224
+ var o, a;
225
+ for (a = 0; a < r.length; a++) {
226
+ o = r[a];
227
227
  if (t.indexOf(o) >= 0) continue;
228
228
  n[o] = e[o];
229
229
  }
230
230
  return n;
231
231
  }
232
- function ae(e, t) {
232
+ function ie(e, t) {
233
233
  if (!(e instanceof t)) {
234
234
  throw new TypeError("Cannot call a class as a function");
235
235
  }
@@ -273,8 +273,8 @@
273
273
  return function n() {
274
274
  var r = he(e), o;
275
275
  if (t) {
276
- var i = he(this).constructor;
277
- o = Reflect.construct(r, arguments, i);
276
+ var a = he(this).constructor;
277
+ o = Reflect.construct(r, arguments, a);
278
278
  } else {
279
279
  o = r.apply(this, arguments);
280
280
  }
@@ -325,28 +325,28 @@
325
325
  }
326
326
  var me = {
327
327
  /** @private */
328
- active: i().bool,
329
- children: i().node,
330
- description: i().string,
331
- descriptionPosition: i().oneOf([ "right", "bottom" ]),
332
- disabled: i().bool,
333
- hidden: i().bool,
334
- icon: i().node,
335
- label: i().string.isRequired,
328
+ active: a().bool,
329
+ children: a().node,
330
+ description: a().string,
331
+ descriptionPosition: a().oneOf([ "right", "bottom" ]),
332
+ disabled: a().bool,
333
+ hidden: a().bool,
334
+ icon: a().node,
335
+ label: a().string.isRequired,
336
336
  /**
337
337
  * @private Passed down from <BaseSelect>
338
338
  */
339
- multiple: i().bool,
340
- matchRanges: i().arrayOf(i().shape({
341
- start: i().number.isRequired,
342
- end: i().number.isRequired
339
+ multiple: a().bool,
340
+ matchRanges: a().arrayOf(a().shape({
341
+ start: a().number.isRequired,
342
+ end: a().number.isRequired
343
343
  })),
344
344
  /** @private */
345
- onClick: i().func,
345
+ onClick: a().func,
346
346
  /** @private */
347
- selected: i().bool,
348
- truncate: i().bool,
349
- value: i().oneOfType([ i().string, i().number, i().bool ]).isRequired
347
+ selected: a().bool,
348
+ truncate: a().bool,
349
+ value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
350
350
  };
351
351
  var ye = {
352
352
  descriptionPosition: "bottom",
@@ -364,15 +364,15 @@
364
364
  var t = pe(n);
365
365
  function n() {
366
366
  var e;
367
- ae(this, n);
368
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
369
- o[i] = arguments[i];
367
+ ie(this, n);
368
+ for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++) {
369
+ o[a] = arguments[a];
370
370
  }
371
371
  e = t.call.apply(t, [ this ].concat(o));
372
372
  be(de(e), "c", null);
373
373
  be(de(e), "handleClick", (function(t) {
374
- var n = e.props, r = n.onClick, o = n.value, i = n.disabled;
375
- if (!i) {
374
+ var n = e.props, r = n.onClick, o = n.value, a = n.disabled;
375
+ if (!a) {
376
376
  r === null || r === void 0 ? void 0 : r(t, {
377
377
  value: o
378
378
  });
@@ -400,7 +400,7 @@
400
400
  }, {
401
401
  key: "render",
402
402
  value: function e() {
403
- var t = this.props, n = t.value, o = t.children, i = t.label, a = t.multiple, l = oe(t, [ "value", "children", "label", "multiple" ]);
403
+ var t = this.props, n = t.value, o = t.children, a = t.label, i = t.multiple, l = oe(t, [ "value", "children", "label", "multiple" ]);
404
404
 
405
405
  return r().createElement(T.Item, re({
406
406
  "aria-selected": this.props.selected,
@@ -409,11 +409,11 @@
409
409
  ref: this.handleMount
410
410
  }, l, {
411
411
  selectable: true,
412
- selectableAppearance: a ? "checkbox" : undefined,
412
+ selectableAppearance: i ? "checkbox" : undefined,
413
413
  onClick: this.handleClick,
414
414
  role: "option",
415
415
  value: n.toString()
416
- }), o || i);
416
+ }), o || a);
417
417
  }
418
418
  } ]);
419
419
  return n;
@@ -618,25 +618,25 @@
618
618
  }));
619
619
  // CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
620
620
  var Ke = {
621
- active: i().bool,
622
- elementRef: i().oneOfType([ i().func, i().object ]),
623
- id: i().string,
624
- onClick: i().func,
625
- selectAllLabel: i().string,
626
- totalCount: i().number,
627
- changedToggle: i().bool,
628
- selected: i().oneOf([ false, true, "some" ])
621
+ active: a().bool,
622
+ elementRef: a().oneOfType([ a().func, a().object ]),
623
+ id: a().string,
624
+ onClick: a().func,
625
+ selectAllLabel: a().string,
626
+ totalCount: a().number,
627
+ changedToggle: a().bool,
628
+ selected: a().oneOf([ false, true, "some" ])
629
629
  };
630
630
  var Fe = r().forwardRef((function(e, t) {
631
- var n = e.active, o = e.id, i = e.onClick, a = e.selectAllLabel, l = e.totalCount, s = e.changedToggle, u = e.selected;
632
- // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select All menu item
631
+ var n = e.active, o = e.id, a = e.onClick, i = e.selectAllLabel, l = e.totalCount, s = e.changedToggle, u = e.selected;
632
+ // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select all menu item
633
633
  var p = s ? " (".concat(l === null || l === void 0 ? void 0 : l.toString(), ")") : "";
634
634
 
635
635
  return r().createElement(Be, {
636
- label: a,
636
+ label: i,
637
637
  value: "selectAll",
638
638
  key: "selectAll",
639
- onClick: i,
639
+ onClick: a,
640
640
  "data-test": "select-all",
641
641
  "aria-keyshortcuts": "Control+A",
642
642
  id: o,
@@ -661,7 +661,7 @@
661
661
  $truncate: false
662
662
  }, r().createElement(Ne, {
663
663
  $truncate: false
664
- }, a))));
664
+ }, i))));
665
665
  }));
666
666
  Fe.propTypes = Ke;
667
667
  /* harmony default export */ const $e = Fe;
@@ -748,7 +748,7 @@
748
748
  }
749
749
  var r = null;
750
750
  var o = false;
751
- var i = t.filter((function(e) {
751
+ var a = t.filter((function(e) {
752
752
  var t = et(e, n.index);
753
753
  if (t === n.value) {
754
754
  o = true;
@@ -757,22 +757,22 @@
757
757
  // If we haven't found a match yet, keep track of the next closest match.
758
758
  // Secondary matching looks for the closest character of a higher value, and failing that, closest of a lower value.
759
759
  if (!o) {
760
- var i = et(r, n.index);
761
- if (!i) {
760
+ var a = et(r, n.index);
761
+ if (!a) {
762
762
  r = e;
763
763
  } else if (t > n.value) {
764
- if (i < n.value) {
764
+ if (a < n.value) {
765
765
  r = e;
766
- } else if (i > t) {
766
+ } else if (a > t) {
767
767
  r = e;
768
768
  }
769
- } else if (t > i) {
769
+ } else if (t > a) {
770
770
  r = e;
771
771
  }
772
772
  }
773
773
  return false;
774
774
  }));
775
- return i.length === 0 && r ? [ r ] : i;
775
+ return a.length === 0 && r ? [ r ] : a;
776
776
  };
777
777
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
778
778
  /* eslint-disable @typescript-eslint/no-empty-function */
@@ -891,13 +891,13 @@
891
891
  clearTimeout(t);
892
892
  }
893
893
  };
894
- function it() {
894
+ function at() {
895
895
  var e = typeof window !== "undefined" ? window : ot;
896
896
  return e;
897
897
  }
898
898
  // CONCATENATED MODULE: ./src/Select/SelectBase.tsx
899
- function at() {
900
- at = Object.assign || function(e) {
899
+ function it() {
900
+ it = Object.assign || function(e) {
901
901
  for (var t = 1; t < arguments.length; t++) {
902
902
  var n = arguments[t];
903
903
  for (var r in n) {
@@ -908,7 +908,7 @@
908
908
  }
909
909
  return e;
910
910
  };
911
- return at.apply(this, arguments);
911
+ return it.apply(this, arguments);
912
912
  }
913
913
  function lt(e, t) {
914
914
  return ut(e) || st(e, t) || dt(e, t) || ct();
@@ -921,20 +921,20 @@
921
921
  var n = [];
922
922
  var r = true;
923
923
  var o = false;
924
- var i = undefined;
924
+ var a = undefined;
925
925
  try {
926
- for (var a = e[Symbol.iterator](), l; !(r = (l = a.next()).done); r = true) {
926
+ for (var i = e[Symbol.iterator](), l; !(r = (l = i.next()).done); r = true) {
927
927
  n.push(l.value);
928
928
  if (t && n.length === t) break;
929
929
  }
930
930
  } catch (e) {
931
931
  o = true;
932
- i = e;
932
+ a = e;
933
933
  } finally {
934
934
  try {
935
- if (!r && a["return"] != null) a["return"]();
935
+ if (!r && i["return"] != null) i["return"]();
936
936
  } finally {
937
- if (o) throw i;
937
+ if (o) throw a;
938
938
  }
939
939
  }
940
940
  return n;
@@ -1013,8 +1013,8 @@
1013
1013
  return function n() {
1014
1014
  var r = It(e), o;
1015
1015
  if (t) {
1016
- var i = It(this).constructor;
1017
- o = Reflect.construct(r, arguments, i);
1016
+ var a = It(this).constructor;
1017
+ o = Reflect.construct(r, arguments, a);
1018
1018
  } else {
1019
1019
  o = r.apply(this, arguments);
1020
1020
  }
@@ -1105,48 +1105,48 @@
1105
1105
  return e;
1106
1106
  }
1107
1107
  var Mt = {
1108
- allowKeyMatching: i().bool,
1109
- allowNewValues: i().bool,
1110
- animateLoading: i().bool,
1111
- appearance: i().oneOf([ "default", "link", "primary", "pill", "toggle", "flat" ]),
1112
- append: i().bool,
1113
- children: i().node,
1114
- defaultPlacement: i().oneOf([ "above", "below", "vertical" ]),
1115
- defaultValues: i().array,
1116
- describedBy: i().string,
1117
- disabled: i().bool,
1118
- elementRef: i().oneOfType([ i().func, i().object ]),
1119
- error: i().bool,
1120
- filter: i().oneOf([ false, true, "controlled" ]),
1121
- footerMessage: i().node,
1122
- inline: i().bool,
1123
- inputId: i().string,
1124
- inputRef: i().oneOfType([ i().func, i().object ]),
1125
- isLoadingOptions: i().bool,
1126
- labelledBy: i().string,
1127
- labelText: i().string,
1128
- loadingMessage: i().node,
1129
- menuStyle: i().object,
1130
- multiple: i().bool,
1131
- name: i().string,
1132
- noOptionsMessage: i().node,
1133
- onChange: i().func,
1134
- onClose: i().func,
1135
- onFilterChange: i().func,
1136
- onOpen: i().func,
1137
- onScroll: i().func,
1138
- onScrollBottom: i().func,
1108
+ allowKeyMatching: a().bool,
1109
+ allowNewValues: a().bool,
1110
+ animateLoading: a().bool,
1111
+ appearance: a().oneOf([ "default", "link", "primary", "pill", "toggle", "flat" ]),
1112
+ append: a().bool,
1113
+ children: a().node,
1114
+ defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
1115
+ defaultValues: a().array,
1116
+ describedBy: a().string,
1117
+ disabled: a().bool,
1118
+ elementRef: a().oneOfType([ a().func, a().object ]),
1119
+ error: a().bool,
1120
+ filter: a().oneOf([ false, true, "controlled" ]),
1121
+ footerMessage: a().node,
1122
+ inline: a().bool,
1123
+ inputId: a().string,
1124
+ inputRef: a().oneOfType([ a().func, a().object ]),
1125
+ isLoadingOptions: a().bool,
1126
+ labelledBy: a().string,
1127
+ labelText: a().string,
1128
+ loadingMessage: a().node,
1129
+ menuStyle: a().object,
1130
+ multiple: a().bool,
1131
+ name: a().string,
1132
+ noOptionsMessage: a().node,
1133
+ onChange: a().func,
1134
+ onClose: a().func,
1135
+ onFilterChange: a().func,
1136
+ onOpen: a().func,
1137
+ onScroll: a().func,
1138
+ onScrollBottom: a().func,
1139
1139
  /** @private. */
1140
- required: i().bool,
1141
- placeholder: i().string,
1142
- prefixLabel: i().string,
1143
- prepend: i().bool,
1144
- repositionMode: i().oneOf([ "none", "flip" ]),
1145
- selectAllAppearance: i().oneOf([ "buttongroup", "checkbox" ]),
1146
- showSelectedValuesFirst: i().oneOf([ "nextOpen", "immediately", "never" ]),
1147
- suffixLabel: i().string,
1148
- tabConfirmsNewValue: i().bool,
1149
- values: i().array
1140
+ required: a().bool,
1141
+ placeholder: a().string,
1142
+ prefixLabel: a().string,
1143
+ prepend: a().bool,
1144
+ repositionMode: a().oneOf([ "none", "flip" ]),
1145
+ selectAllAppearance: a().oneOf([ "buttongroup", "checkbox" ]),
1146
+ showSelectedValuesFirst: a().oneOf([ "nextOpen", "immediately", "never" ]),
1147
+ suffixLabel: a().string,
1148
+ tabConfirmsNewValue: a().bool,
1149
+ values: a().array
1150
1150
  };
1151
1151
  var Tt = {
1152
1152
  allowKeyMatching: true,
@@ -1201,149 +1201,149 @@
1201
1201
  }
1202
1202
  } ]);
1203
1203
  function o(e) {
1204
- var i;
1204
+ var a;
1205
1205
  mt(this, o);
1206
- i = t.call(this, e);
1207
- Et(xt(i), "activeItemId", void 0);
1208
- Et(xt(i), "activeValue", void 0);
1209
- Et(xt(i), "availableOptionCount", void 0);
1210
- Et(xt(i), "controlledExternally", void 0);
1211
- Et(xt(i), "displayedValues", void 0);
1212
- Et(xt(i), "dropdown", null);
1213
- Et(xt(i), "firstSelectedEnabledOption", null);
1214
- Et(xt(i), "firstSelectedOptionIndex", void 0);
1215
- Et(xt(i), "menuId", void 0);
1216
- Et(xt(i), "previousActiveIndex", null);
1217
- Et(xt(i), "selectedOptionCount", void 0);
1218
- Et(xt(i), "optionRefsByKey", void 0);
1219
- Et(xt(i), "matchCharacter", void 0);
1220
- Et(xt(i), "matchTimeout", void 0);
1221
- Et(xt(i), "currentMatchOptions", void 0);
1222
- Et(xt(i), "availableMatchOptions", void 0);
1223
- Et(xt(i), "optionSelection", void 0);
1224
- Et(xt(i), "resetMatches", (function() {
1225
- i.matchCharacter = null;
1226
- i.currentMatchOptions = [];
1227
- if (i.matchTimeout) {
1228
- clearTimeout(i.matchTimeout);
1206
+ a = t.call(this, e);
1207
+ Et(xt(a), "activeItemId", void 0);
1208
+ Et(xt(a), "activeValue", void 0);
1209
+ Et(xt(a), "availableOptionCount", void 0);
1210
+ Et(xt(a), "controlledExternally", void 0);
1211
+ Et(xt(a), "displayedValues", void 0);
1212
+ Et(xt(a), "dropdown", null);
1213
+ Et(xt(a), "firstSelectedEnabledOption", null);
1214
+ Et(xt(a), "firstSelectedOptionIndex", void 0);
1215
+ Et(xt(a), "menuId", void 0);
1216
+ Et(xt(a), "previousActiveIndex", null);
1217
+ Et(xt(a), "selectedOptionCount", void 0);
1218
+ Et(xt(a), "optionRefsByKey", void 0);
1219
+ Et(xt(a), "matchCharacter", void 0);
1220
+ Et(xt(a), "matchTimeout", void 0);
1221
+ Et(xt(a), "currentMatchOptions", void 0);
1222
+ Et(xt(a), "availableMatchOptions", void 0);
1223
+ Et(xt(a), "optionSelection", void 0);
1224
+ Et(xt(a), "resetMatches", (function() {
1225
+ a.matchCharacter = null;
1226
+ a.currentMatchOptions = [];
1227
+ if (a.matchTimeout) {
1228
+ clearTimeout(a.matchTimeout);
1229
1229
  }
1230
1230
  }));
1231
- Et(xt(i), "handleSelectAll", (function(e) {
1231
+ Et(xt(a), "handleSelectAll", (function(e) {
1232
1232
  var t, n, o;
1233
- var a = i.props, l = a.name, c = a.children, s = a.multiple;
1233
+ var i = a.props, l = i.name, c = i.children, s = i.multiple;
1234
1234
  // this doesn't make sense if we can't select multiple values
1235
1235
  if (!s) {
1236
1236
  return;
1237
1237
  }
1238
- var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1239
- var p = A()(u.concat(i.displayedValues));
1238
+ var u = (t = a.getCurrentValues()) !== null && t !== void 0 ? t : [];
1239
+ var p = A()(u.concat(a.displayedValues));
1240
1240
  p = r().Children.toArray(c).filter((function(e) {
1241
1241
  return Dt(e) && b()(p, e.props.value) && (!e.props.disabled || b()(u, e.props.value));
1242
1242
  })).map((function(e) {
1243
1243
  return e.props.value;
1244
1244
  }));
1245
- if (!i.isControlled()) {
1246
- i.setState({
1245
+ if (!a.isControlled()) {
1246
+ a.setState({
1247
1247
  values: p
1248
1248
  });
1249
1249
  }
1250
- (n = (o = i.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1250
+ (n = (o = a.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1251
1251
  values: p,
1252
1252
  name: l,
1253
1253
  reason: "selectAll"
1254
1254
  });
1255
1255
  }));
1256
- Et(xt(i), "handleClearAll", (function(e) {
1256
+ Et(xt(a), "handleClearAll", (function(e) {
1257
1257
  var t, n, o;
1258
- var a = i.props, l = a.name, c = a.children, s = a.multiple;
1258
+ var i = a.props, l = i.name, c = i.children, s = i.multiple;
1259
1259
  // this doesn't make sense if we can't select multiple values
1260
1260
  if (!s) {
1261
1261
  return;
1262
1262
  }
1263
- var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1264
- var p = E().apply(void 0, [ u ].concat(pt(i.displayedValues)));
1263
+ var u = (t = a.getCurrentValues()) !== null && t !== void 0 ? t : [];
1264
+ var p = E().apply(void 0, [ u ].concat(pt(a.displayedValues)));
1265
1265
  // this will unselect all selected values unless those values are disabled or hidden by the filter
1266
1266
  var f = r().Children.toArray(c).filter((function(e) {
1267
1267
  return Dt(e) && (b()(u, e.props.value) && e.props.disabled || b()(p, e.props.value));
1268
1268
  })).map((function(e) {
1269
1269
  return e.props.value;
1270
1270
  }));
1271
- if (!i.isControlled()) {
1272
- i.setState({
1271
+ if (!a.isControlled()) {
1272
+ a.setState({
1273
1273
  values: f
1274
1274
  });
1275
1275
  }
1276
- (n = (o = i.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1276
+ (n = (o = a.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1277
1277
  values: f,
1278
1278
  name: l,
1279
1279
  reason: "clearAll"
1280
1280
  });
1281
1281
  }));
1282
- Et(xt(i), "handleTextKeyDown", (function(e) {
1283
- var t = i.props, r = t.children, o = t.onScrollBottom, a = t.tabConfirmsNewValue;
1282
+ Et(xt(a), "handleTextKeyDown", (function(e) {
1283
+ var t = a.props, r = t.children, o = t.onScrollBottom, i = t.tabConfirmsNewValue;
1284
1284
  var l = (0, R.keycode)(e.nativeEvent);
1285
1285
  if (l === "tab") {
1286
- if (a && !y()(i.activeValue) && i.availableOptionCount <= 1) {
1286
+ if (i && !y()(a.activeValue) && a.availableOptionCount <= 1) {
1287
1287
  e.preventDefault();
1288
- i.toggleValue(e, i.activeValue);
1288
+ a.toggleValue(e, a.activeValue);
1289
1289
  }
1290
1290
  }
1291
1291
  if (e.shiftKey || e.metaKey || e.ctrlKey) {
1292
1292
  if (l === "a" && (e.ctrlKey || e.metaKey)) {
1293
1293
  // handle control + A
1294
- if (i.optionSelection === "all") {
1295
- i.handleClearAll(e);
1294
+ if (a.optionSelection === "all") {
1295
+ a.handleClearAll(e);
1296
1296
  } else {
1297
- i.handleSelectAll(e);
1297
+ a.handleSelectAll(e);
1298
1298
  }
1299
1299
  }
1300
1300
  return;
1301
1301
  }
1302
1302
  if (l === "down") {
1303
1303
  e.preventDefault();
1304
- i.setState((function(e) {
1304
+ a.setState((function(e) {
1305
1305
  return {
1306
- activeIndex: Math.min(e.activeIndex + 1, i.props.selectAllAppearance === "checkbox" ? i.availableOptionCount : i.availableOptionCount - 1)
1306
+ activeIndex: Math.min(e.activeIndex + 1, a.props.selectAllAppearance === "checkbox" ? a.availableOptionCount : a.availableOptionCount - 1)
1307
1307
  };
1308
1308
  }));
1309
1309
  if (r && o) {
1310
1310
  var c;
1311
- var s = n.Children.toArray(r).length - (2 + ((c = i.getCurrentValues()) !== null && c !== void 0 ? c : []).length);
1312
- if (i.state.activeIndex === s) {
1313
- i.handleScrollBottom(e);
1311
+ var s = n.Children.toArray(r).length - (2 + ((c = a.getCurrentValues()) !== null && c !== void 0 ? c : []).length);
1312
+ if (a.state.activeIndex === s) {
1313
+ a.handleScrollBottom(e);
1314
1314
  }
1315
1315
  }
1316
1316
  }
1317
1317
  if (l === "up") {
1318
1318
  e.preventDefault();
1319
- i.setState((function(e) {
1319
+ a.setState((function(e) {
1320
1320
  return {
1321
1321
  activeIndex: Math.max(e.activeIndex - 1, 0)
1322
1322
  };
1323
1323
  }));
1324
1324
  }
1325
- if (l === "enter" && !y()(i.activeValue) && i.state.open) {
1326
- if (i.activeValue === "selectAll") {
1327
- if (i.optionSelection === "all") {
1328
- i.handleClearAll(e);
1325
+ if (l === "enter" && !y()(a.activeValue) && a.state.open) {
1326
+ if (a.activeValue === "selectAll") {
1327
+ if (a.optionSelection === "all") {
1328
+ a.handleClearAll(e);
1329
1329
  } else {
1330
- i.handleSelectAll(e);
1330
+ a.handleSelectAll(e);
1331
1331
  }
1332
1332
  } else {
1333
1333
  e.preventDefault();
1334
- i.toggleValue(e, i.activeValue);
1334
+ a.toggleValue(e, a.activeValue);
1335
1335
  }
1336
1336
  }
1337
1337
  }));
1338
- Et(xt(i), "handleMenuOptionClick", (function(e, t) {
1338
+ Et(xt(a), "handleMenuOptionClick", (function(e, t) {
1339
1339
  var n = t.value;
1340
1340
  e.preventDefault();
1341
- if (!i.state.open) {
1341
+ if (!a.state.open) {
1342
1342
  return;
1343
1343
  }
1344
- i.toggleValue(e, n);
1344
+ a.toggleValue(e, n);
1345
1345
  }));
1346
- Et(xt(i), "handleMenuOptionKeyDown", (function(e, t) {
1346
+ Et(xt(a), "handleMenuOptionKeyDown", (function(e, t) {
1347
1347
  var n = e.nativeEvent.key;
1348
1348
  // Checking for a single character to avoid complications from double-byte languages and emojis.
1349
1349
  if (n.length === 1) {
@@ -1352,131 +1352,131 @@
1352
1352
  index: 0,
1353
1353
  value: n
1354
1354
  };
1355
- if (!i.matchCharacter) {
1355
+ if (!a.matchCharacter) {
1356
1356
  if (n === " ") {
1357
- i.resetMatches();
1357
+ a.resetMatches();
1358
1358
  return;
1359
1359
  }
1360
- r = tt(i.availableMatchOptions, o);
1361
- } else if (i.currentMatchOptions.length > 1) {
1362
- o.index = i.matchCharacter.index + 1;
1363
- r = tt(i.currentMatchOptions, o);
1360
+ r = tt(a.availableMatchOptions, o);
1361
+ } else if (a.currentMatchOptions.length > 1) {
1362
+ o.index = a.matchCharacter.index + 1;
1363
+ r = tt(a.currentMatchOptions, o);
1364
1364
  }
1365
1365
  if (r.length) {
1366
- var a = 0;
1366
+ var i = 0;
1367
1367
  // If the active option is a first character match, cycle to the next matching option.
1368
1368
  if (o.index === 0 && r.length > 1) {
1369
- var l = r.indexOf(i.availableMatchOptions[t]);
1369
+ var l = r.indexOf(a.availableMatchOptions[t]);
1370
1370
  if (l >= 0) {
1371
- a = l === r.length - 1 ? 0 : l + 1;
1371
+ i = l === r.length - 1 ? 0 : l + 1;
1372
1372
  }
1373
1373
  }
1374
- var c = r[a];
1375
- var s = i.optionRefsByKey[qt(c.value, c.label)];
1374
+ var c = r[i];
1375
+ var s = a.optionRefsByKey[qt(c.value, c.label)];
1376
1376
  if (s != null) {
1377
1377
  var u;
1378
1378
  (u = s.focus) === null || u === void 0 ? void 0 : u.call(s);
1379
1379
  }
1380
1380
  }
1381
- i.currentMatchOptions = r;
1382
- i.matchCharacter = o;
1383
- if (i.matchTimeout) {
1384
- clearTimeout(i.matchTimeout);
1381
+ a.currentMatchOptions = r;
1382
+ a.matchCharacter = o;
1383
+ if (a.matchTimeout) {
1384
+ clearTimeout(a.matchTimeout);
1385
1385
  }
1386
- i.matchTimeout = setTimeout(i.resetMatches, 500);
1386
+ a.matchTimeout = setTimeout(a.resetMatches, 500);
1387
1387
  e.preventDefault();
1388
1388
  e.stopPropagation();
1389
1389
  }
1390
1390
  }));
1391
- Et(xt(i), "handleTextChange", (function(e, t) {
1391
+ Et(xt(a), "handleTextChange", (function(e, t) {
1392
1392
  var n, r;
1393
1393
  var o = t.value;
1394
- i.setState({
1394
+ a.setState({
1395
1395
  filterKeyword: o,
1396
1396
  open: true,
1397
1397
  activeIndex: 0
1398
1398
  });
1399
- (n = (r = i.props).onFilterChange) === null || n === void 0 ? void 0 : n.call(r, e, {
1399
+ (n = (r = a.props).onFilterChange) === null || n === void 0 ? void 0 : n.call(r, e, {
1400
1400
  keyword: o
1401
1401
  });
1402
1402
  }));
1403
- Et(xt(i), "handleTextFocus", (function() {
1404
- i.setState({
1403
+ Et(xt(a), "handleTextFocus", (function() {
1404
+ a.setState({
1405
1405
  textHasFocus: true
1406
1406
  });
1407
1407
  }));
1408
- Et(xt(i), "handleTextBlur", (function() {
1409
- i.setState({
1408
+ Et(xt(a), "handleTextBlur", (function() {
1409
+ a.setState({
1410
1410
  textHasFocus: false
1411
1411
  });
1412
1412
  }));
1413
- Et(xt(i), "handleRequestOpen", (function(e) {
1413
+ Et(xt(a), "handleRequestOpen", (function(e) {
1414
1414
  var t = {
1415
1415
  open: true,
1416
- topValues: i.getTopValues()
1416
+ topValues: a.getTopValues()
1417
1417
  };
1418
1418
  // SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
1419
- if (i.props.multiple) {
1419
+ if (a.props.multiple) {
1420
1420
  t.filterKeyword = "";
1421
1421
  }
1422
- var n = i.state.filterKeyword;
1423
- i.setState(t, (function() {
1422
+ var n = a.state.filterKeyword;
1423
+ a.setState(t, (function() {
1424
1424
  var t, r;
1425
- (t = (r = i.props).onOpen) === null || t === void 0 ? void 0 : t.call(r);
1426
- if (i.firstSelectedEnabledOption && !i.hasFilter()) {
1427
- i.firstSelectedEnabledOption.focus();
1425
+ (t = (r = a.props).onOpen) === null || t === void 0 ? void 0 : t.call(r);
1426
+ if (a.firstSelectedEnabledOption && !a.hasFilter()) {
1427
+ a.firstSelectedEnabledOption.focus();
1428
1428
  } else {
1429
1429
  var o;
1430
- i.setState({
1431
- activeIndex: (o = i.firstSelectedOptionIndex) !== null && o !== void 0 ? o : 0
1430
+ a.setState({
1431
+ activeIndex: (o = a.firstSelectedOptionIndex) !== null && o !== void 0 ? o : 0
1432
1432
  });
1433
1433
  }
1434
- if (n !== i.state.filterKeyword) {
1435
- var a, l;
1436
- (a = (l = i.props).onFilterChange) === null || a === void 0 ? void 0 : a.call(l, e, {
1437
- keyword: i.state.filterKeyword
1434
+ if (n !== a.state.filterKeyword) {
1435
+ var i, l;
1436
+ (i = (l = a.props).onFilterChange) === null || i === void 0 ? void 0 : i.call(l, e, {
1437
+ keyword: a.state.filterKeyword
1438
1438
  });
1439
1439
  }
1440
1440
  }));
1441
1441
  }));
1442
- Et(xt(i), "handleRequestClose", (function() {
1443
- i.setState({
1442
+ Et(xt(a), "handleRequestClose", (function() {
1443
+ a.setState({
1444
1444
  open: false,
1445
1445
  activeIndex: 0
1446
1446
  }, (function() {
1447
1447
  var e, t;
1448
- i.previousActiveIndex = null;
1449
- (e = (t = i.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
1448
+ a.previousActiveIndex = null;
1449
+ (e = (t = a.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
1450
1450
  }));
1451
1451
  }));
1452
- Et(xt(i), "handleScrollBottom", (function(e) {
1453
- if (i.state.open && !i.props.isLoadingOptions) {
1452
+ Et(xt(a), "handleScrollBottom", (function(e) {
1453
+ if (a.state.open && !a.props.isLoadingOptions) {
1454
1454
  var t, n;
1455
- (t = (n = i.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
1455
+ (t = (n = a.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
1456
1456
  }
1457
1457
  }));
1458
- Et(xt(i), "handleActiveOptionMount", (function(e) {
1459
- if (i.previousActiveIndex !== i.state.activeIndex) {
1458
+ Et(xt(a), "handleActiveOptionMount", (function(e) {
1459
+ if (a.previousActiveIndex !== a.state.activeIndex) {
1460
1460
  e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
1461
1461
  }
1462
1462
  }));
1463
- Et(xt(i), "handleOptionMount", (function(e, t, n) {
1463
+ Et(xt(a), "handleOptionMount", (function(e, t, n) {
1464
1464
  if (n) {
1465
- i.firstSelectedEnabledOption = e;
1465
+ a.firstSelectedEnabledOption = e;
1466
1466
  }
1467
1467
  if (e == null) {
1468
- delete i.optionRefsByKey[t];
1468
+ delete a.optionRefsByKey[t];
1469
1469
  } else {
1470
- i.optionRefsByKey[t] = e;
1470
+ a.optionRefsByKey[t] = e;
1471
1471
  }
1472
1472
  }));
1473
- Et(xt(i), "createToggle", (function() {
1473
+ Et(xt(a), "createToggle", (function() {
1474
1474
  var e;
1475
- var t = i.props, a = t.toggle, l = t.appearance, s = t.children, u = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, m = t.labelText, y = t.multiple, g = t.placeholder, S = t.prefixLabel, w = t.required, k = t.suffixLabel;
1475
+ var t = a.props, i = t.toggle, l = t.appearance, s = t.children, u = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, m = t.labelText, y = t.multiple, g = t.placeholder, S = t.prefixLabel, w = t.required, k = t.suffixLabel;
1476
1476
  var C;
1477
1477
  var _;
1478
1478
  // Generate buttonLabels
1479
- var A = (e = i.getCurrentValues()) !== null && e !== void 0 ? e : [];
1479
+ var A = (e = a.getCurrentValues()) !== null && e !== void 0 ? e : [];
1480
1480
  var j = n.Children.toArray(s);
1481
1481
  var E = A.reduce((function(e, t, n, r) {
1482
1482
  var o = f()(j, (function(e) {
@@ -1500,7 +1500,7 @@
1500
1500
  _ = E;
1501
1501
  // only apply prefix / suffix if the label is not empty
1502
1502
  if (_.length > 0) {
1503
- _ = i.wrapLabel({
1503
+ _ = a.wrapLabel({
1504
1504
  prefixLabel: S,
1505
1505
  label: _,
1506
1506
  suffixLabel: k
@@ -1517,7 +1517,7 @@
1517
1517
  // If there's more than one item selected, read out the selected total
1518
1518
  // rather than reading out each selected item
1519
1519
  if (_.length > 1) {
1520
- M = i.wrapLabel({
1520
+ M = a.wrapLabel({
1521
1521
  prefixLabel: S,
1522
1522
  label: [ "".concat(A.length, " items selected") ],
1523
1523
  suffixLabel: k
@@ -1534,25 +1534,25 @@
1534
1534
  disabled: p,
1535
1535
  elementRef: d,
1536
1536
  error: v
1537
- }, x()(i.props, O()(o.propTypes)));
1537
+ }, x()(a.props, O()(o.propTypes)));
1538
1538
  if (y) {
1539
1539
  T["data-test-values"] = JSON.stringify(A);
1540
1540
  } else {
1541
1541
  var P = lt(A, 1), V = P[0];
1542
1542
  T["data-test-value"] = V;
1543
1543
  }
1544
- if (a) {
1544
+ if (i) {
1545
1545
 
1546
- return (0, n.cloneElement)(a, T);
1546
+ return (0, n.cloneElement)(i, T);
1547
1547
  }
1548
1548
  if (l === "link") {
1549
1549
 
1550
- return r().createElement(L(), at({}, T, {
1550
+ return r().createElement(L(), it({}, T, {
1551
1551
  "data-select-appearance": "link"
1552
1552
  }), !!C && r().createElement(Ue, null, C), _ || g, r().createElement(Ge, null, r().createElement(J, null)));
1553
1553
  }
1554
1554
 
1555
- return r().createElement(ze, at({}, T, {
1555
+ return r().createElement(ze, it({}, T, {
1556
1556
  $multiple: y,
1557
1557
  appearance: l,
1558
1558
  label: _,
@@ -1561,61 +1561,61 @@
1561
1561
  inline: h,
1562
1562
  isMenu: true,
1563
1563
  "aria-haspopup": "listbox",
1564
- "aria-owns": i.menuId,
1565
- onClick: i.props.onClick
1566
- }, I()(i.props, o.invalidLinkAppearanceProps)), !!A.length && y && r().createElement(Xe, {
1564
+ "aria-owns": a.menuId,
1565
+ onClick: a.props.onClick
1566
+ }, I()(a.props, o.invalidLinkAppearanceProps)), !!A.length && y && r().createElement(Xe, {
1567
1567
  "data-role": "count"
1568
1568
  }, "(", A.length, ")"));
1569
1569
  }));
1570
- Et(xt(i), "createChildren", (function() {
1571
- var e = i.state, t = e.filterKeyword, o = e.textHasFocus, a = e.topValues;
1572
- var l = i.props, s = l.allowKeyMatching, u = l.allowNewValues, p = l.filter, d = l.multiple, h = l.selectAllAppearance, b = l.showSelectedValuesFirst, m = l.isLoadingOptions, y = l.onScrollBottom;
1573
- var g = i.getCurrentValues();
1574
- i.availableOptionCount = 0;
1575
- i.firstSelectedOptionIndex = undefined;
1576
- i.selectedOptionCount = 0;
1577
- i.activeValue = undefined;
1578
- i.availableMatchOptions = [];
1570
+ Et(xt(a), "createChildren", (function() {
1571
+ var e = a.state, t = e.filterKeyword, o = e.textHasFocus, i = e.topValues;
1572
+ var l = a.props, s = l.allowKeyMatching, u = l.allowNewValues, p = l.filter, d = l.multiple, h = l.selectAllAppearance, b = l.showSelectedValuesFirst, m = l.isLoadingOptions, y = l.onScrollBottom;
1573
+ var g = a.getCurrentValues();
1574
+ a.availableOptionCount = 0;
1575
+ a.firstSelectedOptionIndex = undefined;
1576
+ a.selectedOptionCount = 0;
1577
+ a.activeValue = undefined;
1578
+ a.availableMatchOptions = [];
1579
1579
  var O;
1580
1580
  var S = 0;
1581
1581
  var w = false;
1582
1582
  // used to avoid overwriting the selected item ref in multiple mode
1583
1583
  var k;
1584
- var x = b === "immediately" ? i.getTopValues() : a;
1585
- var C = n.Children.toArray(i.props.children).reduce((function(e, t, o) {
1584
+ var x = b === "immediately" ? a.getTopValues() : i;
1585
+ var C = n.Children.toArray(a.props.children).reduce((function(e, t, o) {
1586
1586
  // ignore Headings and Dividers
1587
1587
  if (!Dt(t)) {
1588
1588
  e.push(t);
1589
1589
  return e;
1590
1590
  }
1591
1591
  // Find out if the search string exactly matches a value
1592
- if (t.props.value === i.state.filterKeyword) {
1592
+ if (t.props.value === a.state.filterKeyword) {
1593
1593
  O = true;
1594
1594
  }
1595
- var a = g && g.indexOf(t.props.value) >= 0;
1596
- var l = !!a && !t.props.disabled && !k;
1595
+ var i = g && g.indexOf(t.props.value) >= 0;
1596
+ var l = !!i && !t.props.disabled && !k;
1597
1597
  var c = s && !d && !p && !m && !y;
1598
1598
  var u = qt(t.props.value, t.props.label);
1599
1599
  var f = -1;
1600
1600
  if (c && !t.props.disabled && !t.props.hidden) {
1601
- i.availableMatchOptions.push({
1601
+ a.availableMatchOptions.push({
1602
1602
  label: t.props.label,
1603
1603
  value: t.props.value
1604
1604
  });
1605
- f = i.availableMatchOptions.length - 1;
1605
+ f = a.availableMatchOptions.length - 1;
1606
1606
  }
1607
1607
  // Format the Menu.Item
1608
1608
  var v = (0, n.cloneElement)(t, {
1609
1609
  key: t.key || o,
1610
- onClick: i.handleMenuOptionClick,
1610
+ onClick: a.handleMenuOptionClick,
1611
1611
  onKeyDown: c ? function(e) {
1612
- return i.handleMenuOptionKeyDown(e, f);
1612
+ return a.handleMenuOptionKeyDown(e, f);
1613
1613
  } : undefined,
1614
- selected: a,
1614
+ selected: i,
1615
1615
  multiple: d,
1616
1616
  role: "option",
1617
1617
  ref: function e(t) {
1618
- return i.handleOptionMount(t, u, l);
1618
+ return a.handleOptionMount(t, u, l);
1619
1619
  }
1620
1620
  });
1621
1621
  if (l) {
@@ -1642,7 +1642,7 @@
1642
1642
  return Dt(t) && t.props && t.props.value === e;
1643
1643
  }));
1644
1644
  if (!t) {
1645
- if (e === i.state.filterKeyword) {
1645
+ if (e === a.state.filterKeyword) {
1646
1646
  O = true;
1647
1647
  }
1648
1648
  var n = x && x.indexOf(e) >= 0;
@@ -1658,7 +1658,7 @@
1658
1658
  label: String(e),
1659
1659
  value: e,
1660
1660
  key: "missing-value-".concat(e),
1661
- onClick: i.handleMenuOptionClick,
1661
+ onClick: a.handleMenuOptionClick,
1662
1662
  multiple: d,
1663
1663
  selected: true
1664
1664
  }));
@@ -1696,7 +1696,7 @@
1696
1696
  value: t,
1697
1697
  key: "newValue",
1698
1698
  multiple: d,
1699
- onClick: i.handleMenuOptionClick
1699
+ onClick: a.handleMenuOptionClick
1700
1700
  }));
1701
1701
  }
1702
1702
  // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
@@ -1713,13 +1713,13 @@
1713
1713
  if (t.props && t.props.hidden) {
1714
1714
  return e;
1715
1715
  }
1716
- if (t.props.selected && !t.props.disabled && i.firstSelectedOptionIndex == null) {
1717
- i.firstSelectedOptionIndex = i.availableOptionCount;
1716
+ if (t.props.selected && !t.props.disabled && a.firstSelectedOptionIndex == null) {
1717
+ a.firstSelectedOptionIndex = a.availableOptionCount;
1718
1718
  }
1719
- var r = j === i.state.activeIndex;
1719
+ var r = j === a.state.activeIndex;
1720
1720
  j += 1;
1721
- i.availableOptionCount += 1;
1722
- i.selectedOptionCount += t.props.selected ? 1 : 0;
1721
+ a.availableOptionCount += 1;
1722
+ a.selectedOptionCount += t.props.selected ? 1 : 0;
1723
1723
  if (t.key !== "newValue" && !t.props.disabled && !t.props.selected) {
1724
1724
  E = false;
1725
1725
  }
@@ -1728,22 +1728,22 @@
1728
1728
  return e;
1729
1729
  }
1730
1730
  if (!t.props.disabled) {
1731
- i.activeValue = t.props.value;
1731
+ a.activeValue = t.props.value;
1732
1732
  }
1733
- var a = (0, n.cloneElement)(t, {
1733
+ var i = (0, n.cloneElement)(t, {
1734
1734
  active: r,
1735
- id: i.activeItemId,
1736
- ref: i.handleActiveOptionMount
1735
+ id: a.activeItemId,
1736
+ ref: a.handleActiveOptionMount
1737
1737
  });
1738
- e.push(a);
1738
+ e.push(i);
1739
1739
  return e;
1740
1740
  }), []);
1741
- i.optionSelection = i.selectedOptionCount === 0 && "none" || E && "all" || "some";
1741
+ a.optionSelection = a.selectedOptionCount === 0 && "none" || E && "all" || "some";
1742
1742
  // add select all option
1743
- if (h === "checkbox" && d && i.availableOptionCount > 0) {
1743
+ if (h === "checkbox" && d && a.availableOptionCount > 0) {
1744
1744
  var M;
1745
1745
  var P;
1746
- if (i.optionSelection === "all") {
1746
+ if (a.optionSelection === "all") {
1747
1747
  if (t === "") {
1748
1748
  P = (0, c._)("Clear all");
1749
1749
  } else {
@@ -1754,25 +1754,25 @@
1754
1754
  } else {
1755
1755
  P = (0, c._)("Select all matches");
1756
1756
  }
1757
- if (i.state.activeIndex === 0 && o) {
1758
- i.activeValue = "selectAll";
1757
+ if (a.state.activeIndex === 0 && o) {
1758
+ a.activeValue = "selectAll";
1759
1759
  }
1760
1760
  C.unshift( r().createElement($e, {
1761
1761
  key: "selectAllOption",
1762
- selected: i.optionSelection === "all" || i.optionSelection !== "none" && "some",
1762
+ selected: a.optionSelection === "all" || a.optionSelection !== "none" && "some",
1763
1763
  selectAllLabel: P,
1764
- totalCount: (M = i.getCurrentValues()) === null || M === void 0 ? void 0 : M.length,
1765
- changedToggle: !!i.props.toggle,
1766
- onClick: i.optionSelection === "all" ? i.handleClearAll : i.handleSelectAll,
1767
- id: i.state.activeIndex === 0 ? i.activeItemId : undefined,
1768
- active: i.state.activeIndex === 0,
1769
- ref: i.handleActiveOptionMount,
1764
+ totalCount: (M = a.getCurrentValues()) === null || M === void 0 ? void 0 : M.length,
1765
+ changedToggle: !!a.props.toggle,
1766
+ onClick: a.optionSelection === "all" ? a.handleClearAll : a.handleSelectAll,
1767
+ id: a.state.activeIndex === 0 ? a.activeItemId : undefined,
1768
+ active: a.state.activeIndex === 0,
1769
+ ref: a.handleActiveOptionMount,
1770
1770
  tabIndex: -1
1771
1771
  }), r().createElement(T.Divider, {
1772
1772
  key: "selectAllDivider"
1773
1773
  }));
1774
1774
  }
1775
- i.displayedValues = C.reduce((function(e, t) {
1775
+ a.displayedValues = C.reduce((function(e, t) {
1776
1776
  if (Dt(t)) {
1777
1777
  e.push(t.props.value);
1778
1778
  }
@@ -1780,7 +1780,7 @@
1780
1780
  }), []);
1781
1781
  return C;
1782
1782
  }));
1783
- Et(xt(i), "wrapLabel", (function(e) {
1783
+ Et(xt(a), "wrapLabel", (function(e) {
1784
1784
  var t = e.prefixLabel, n = e.label, r = e.suffixLabel;
1785
1785
  var o = n;
1786
1786
  if (t) {
@@ -1791,10 +1791,10 @@
1791
1791
  }
1792
1792
  return o;
1793
1793
  }));
1794
- Et(xt(i), "handleDropdownMount", (function(e) {
1795
- i.dropdown = e;
1794
+ Et(xt(a), "handleDropdownMount", (function(e) {
1795
+ a.dropdown = e;
1796
1796
  }));
1797
- i.state = {
1797
+ a.state = {
1798
1798
  activeIndex: 0,
1799
1799
  filterKeyword: "",
1800
1800
  open: false,
@@ -1802,23 +1802,23 @@
1802
1802
  topValues: [],
1803
1803
  values: e.defaultValues || []
1804
1804
  };
1805
- i.controlledExternally = l()(e, "values");
1806
- i.displayedValues = [];
1807
- i.availableOptionCount = 0;
1808
- i.firstSelectedOptionIndex = undefined;
1809
- i.selectedOptionCount = 0;
1810
- i.matchCharacter = null;
1811
- i.matchTimeout = null;
1812
- i.currentMatchOptions = [];
1813
- i.availableMatchOptions = [];
1814
- i.optionRefsByKey = {};
1815
- i.optionSelection = "none";
1805
+ a.controlledExternally = l()(e, "values");
1806
+ a.displayedValues = [];
1807
+ a.availableOptionCount = 0;
1808
+ a.firstSelectedOptionIndex = undefined;
1809
+ a.selectedOptionCount = 0;
1810
+ a.matchCharacter = null;
1811
+ a.matchTimeout = null;
1812
+ a.currentMatchOptions = [];
1813
+ a.availableMatchOptions = [];
1814
+ a.optionRefsByKey = {};
1815
+ a.optionSelection = "none";
1816
1816
  if (false) {}
1817
1817
  if (false) {}
1818
1818
  o.validateAppearance(e);
1819
- i.menuId = (0, M.createDOMID)("menu");
1820
- i.activeItemId = (0, M.createDOMID)("active-item");
1821
- return i;
1819
+ a.menuId = (0, M.createDOMID)("menu");
1820
+ a.activeItemId = (0, M.createDOMID)("active-item");
1821
+ return a;
1822
1822
  }
1823
1823
  gt(o, [ {
1824
1824
  key: "componentDidUpdate",
@@ -1854,16 +1854,16 @@
1854
1854
  }, {
1855
1855
  key: "toggleValue",
1856
1856
  value: function e(t, n) {
1857
- var r, o, i;
1858
- var a = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
1859
- var l = a.indexOf(n);
1857
+ var r, o, a;
1858
+ var i = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
1859
+ var l = i.indexOf(n);
1860
1860
  var c = this.props, s = c.name, u = c.multiple;
1861
1861
  var p;
1862
1862
  if (u) {
1863
1863
  if (l >= 0) {
1864
- p = [].concat(pt(a.slice(0, l)), pt(a.slice(l + 1)));
1864
+ p = [].concat(pt(i.slice(0, l)), pt(i.slice(l + 1)));
1865
1865
  } else {
1866
- p = a.concat([ n ]);
1866
+ p = i.concat([ n ]);
1867
1867
  }
1868
1868
  } else {
1869
1869
  // non-multiple mode must always have a value
@@ -1890,7 +1890,7 @@
1890
1890
  });
1891
1891
  this.focus();
1892
1892
  }
1893
- (o = (i = this.props).onChange) === null || o === void 0 ? void 0 : o.call(i, t, {
1893
+ (o = (a = this.props).onChange) === null || o === void 0 ? void 0 : o.call(a, t, {
1894
1894
  values: p,
1895
1895
  name: s,
1896
1896
  reason: "valueToggle"
@@ -1908,8 +1908,8 @@
1908
1908
  key: "renderControls",
1909
1909
  value: function e(t) {
1910
1910
  var n = t.hasChildren, o = t.placement;
1911
- var i = this.state.filterKeyword;
1912
- var a = this.props, l = a.inputId, s = a.inputRef, u = a.multiple, p = a.selectAllAppearance;
1911
+ var a = this.state.filterKeyword;
1912
+ var i = this.props, l = i.inputId, s = i.inputRef, u = i.multiple, p = i.selectAllAppearance;
1913
1913
  var f = (0, c._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
1914
1914
  var d = (0, c._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
1915
1915
  // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
@@ -1921,19 +1921,19 @@
1921
1921
  "aria-label": f,
1922
1922
  onClick: this.handleSelectAll,
1923
1923
  "data-test": "select-all"
1924
- }, i ? (0, c._)("Select All Matches") : (0, c._)("Select All")), r().createElement(Ye, {
1924
+ }, a ? (0, c._)("Select all Matches") : (0, c._)("Select all")), r().createElement(Ye, {
1925
1925
  $disabled: this.optionSelection === "none",
1926
1926
  "aria-label": d,
1927
1927
  onClick: this.handleClearAll,
1928
1928
  "data-test": "clear-all"
1929
- }, i ? (0, c._)("Clear All Matches") : (0, c._)("Clear All")));
1929
+ }, a ? (0, c._)("Clear all Matches") : (0, c._)("Clear all")));
1930
1930
  return this.hasFilter() && r().createElement("div", {
1931
1931
  key: "controls"
1932
1932
  }, r().createElement(Je, {
1933
1933
  key: "filter",
1934
1934
  "data-test": "filter"
1935
1935
  }, r().createElement(F(), {
1936
- value: i,
1936
+ value: a,
1937
1937
  autoCapitalize: "off",
1938
1938
  autoComplete: "off",
1939
1939
  autoCorrect: "off",
@@ -1957,10 +1957,10 @@
1957
1957
  key: "render",
1958
1958
  value: function e() {
1959
1959
  var t, o = this;
1960
- var i = this.props, a = i.children, l = i.defaultPlacement, c = i.inputId, s = i.multiple, u = i.repositionMode;
1960
+ var a = this.props, i = a.children, l = a.defaultPlacement, c = a.inputId, s = a.multiple, u = a.repositionMode;
1961
1961
  var p = this.hasFilter();
1962
1962
  var d = (t = this.getCurrentValues()) !== null && t !== void 0 ? t : [];
1963
- var v = n.Children.toArray(a);
1963
+ var v = n.Children.toArray(i);
1964
1964
  var h = d.some((function(e) {
1965
1965
  var t = f()(v, (function(t) {
1966
1966
  return Dt(t) && t.props.value === e;
@@ -1970,23 +1970,23 @@
1970
1970
  var b = this.createChildren();
1971
1971
  var m = this.createToggle();
1972
1972
  var y = function e(t) {
1973
- var n = t.anchorWidth, i = t.maxHeight, a = t.placement;
1973
+ var n = t.anchorWidth, a = t.maxHeight, i = t.placement;
1974
1974
  var l = Vt({
1975
1975
  anchorWidth: n,
1976
1976
  isMultiple: o.props.multiple,
1977
- maxHeight: i,
1977
+ maxHeight: a,
1978
1978
  menuStyle: o.props.menuStyle
1979
1979
  });
1980
1980
  var c = d.length > 0 && !h && !o.hasFilter() ? 0 : undefined;
1981
1981
 
1982
- return r().createElement(B(), at({
1982
+ return r().createElement(B(), it({
1983
1983
  "aria-multiselectable": s || undefined,
1984
1984
  childrenStart: o.renderControls({
1985
- placement: a,
1985
+ placement: i,
1986
1986
  hasChildren: !!b.length
1987
1987
  }),
1988
1988
  controlledExternally: o.hasFilter(),
1989
- placement: a !== null && a !== void 0 ? a : undefined,
1989
+ placement: i !== null && i !== void 0 ? i : undefined,
1990
1990
  onScrollBottom: o.props.onScrollBottom ? o.handleScrollBottom : undefined,
1991
1991
  "data-test": "results-menu",
1992
1992
  isLoading: o.props.isLoadingOptions,
@@ -2007,7 +2007,7 @@
2007
2007
  openWithArrowKeys: true,
2008
2008
  repositionMode: u,
2009
2009
  defaultPlacement: p ? l : undefined,
2010
- canCoverAnchor: it().innerHeight < 500,
2010
+ canCoverAnchor: at().innerHeight < 500,
2011
2011
  ref: this.handleDropdownMount,
2012
2012
  retainFocus: false,
2013
2013
  takeFocus: d.length === 0 || d.length > 0 && !h || !!p
@@ -2095,8 +2095,8 @@
2095
2095
  return function n() {
2096
2096
  var r = Xt(e), o;
2097
2097
  if (t) {
2098
- var i = Xt(this).constructor;
2099
- o = Reflect.construct(r, arguments, i);
2098
+ var a = Xt(this).constructor;
2099
+ o = Reflect.construct(r, arguments, a);
2100
2100
  } else {
2101
2101
  o = r.apply(this, arguments);
2102
2102
  }
@@ -2147,24 +2147,24 @@
2147
2147
  }
2148
2148
  var Zt = {
2149
2149
  /** @private */
2150
- active: i().bool,
2151
- children: i().node,
2152
- description: i().string,
2153
- descriptionPosition: i().oneOf([ "right", "bottom" ]),
2154
- disabled: i().bool,
2155
- hidden: i().bool,
2156
- icon: i().node,
2157
- label: i().string.isRequired,
2158
- matchRanges: i().arrayOf(i().shape({
2159
- start: i().number.isRequired,
2160
- end: i().number.isRequired
2150
+ active: a().bool,
2151
+ children: a().node,
2152
+ description: a().string,
2153
+ descriptionPosition: a().oneOf([ "right", "bottom" ]),
2154
+ disabled: a().bool,
2155
+ hidden: a().bool,
2156
+ icon: a().node,
2157
+ label: a().string.isRequired,
2158
+ matchRanges: a().arrayOf(a().shape({
2159
+ start: a().number.isRequired,
2160
+ end: a().number.isRequired
2161
2161
  })),
2162
2162
  /** @private */
2163
- onClick: i().func,
2163
+ onClick: a().func,
2164
2164
  /** @private */
2165
- selected: i().bool,
2166
- truncate: i().bool,
2167
- value: i().oneOfType([ i().string, i().number, i().bool ]).isRequired
2165
+ selected: a().bool,
2166
+ truncate: a().bool,
2167
+ value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
2168
2168
  };
2169
2169
  var en = {
2170
2170
  active: false,
@@ -2184,8 +2184,8 @@
2184
2184
  function n() {
2185
2185
  var e;
2186
2186
  Ft(this, n);
2187
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
2188
- o[i] = arguments[i];
2187
+ for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++) {
2188
+ o[a] = arguments[a];
2189
2189
  }
2190
2190
  e = t.call.apply(t, [ this ].concat(o));
2191
2191
  Yt(Jt(e), "c", null);
@@ -2256,9 +2256,9 @@
2256
2256
  var n = ln(e, t);
2257
2257
  var r, o;
2258
2258
  if (Object.getOwnPropertySymbols) {
2259
- var i = Object.getOwnPropertySymbols(e);
2260
- for (o = 0; o < i.length; o++) {
2261
- r = i[o];
2259
+ var a = Object.getOwnPropertySymbols(e);
2260
+ for (o = 0; o < a.length; o++) {
2261
+ r = a[o];
2262
2262
  if (t.indexOf(r) >= 0) continue;
2263
2263
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
2264
2264
  n[r] = e[r];
@@ -2270,9 +2270,9 @@
2270
2270
  if (e == null) return {};
2271
2271
  var n = {};
2272
2272
  var r = Object.keys(e);
2273
- var o, i;
2274
- for (i = 0; i < r.length; i++) {
2275
- o = r[i];
2273
+ var o, a;
2274
+ for (a = 0; a < r.length; a++) {
2275
+ o = r[a];
2276
2276
  if (t.indexOf(o) >= 0) continue;
2277
2277
  n[o] = e[o];
2278
2278
  }
@@ -2322,8 +2322,8 @@
2322
2322
  return function n() {
2323
2323
  var r = mn(e), o;
2324
2324
  if (t) {
2325
- var i = mn(this).constructor;
2326
- o = Reflect.construct(r, arguments, i);
2325
+ var a = mn(this).constructor;
2326
+ o = Reflect.construct(r, arguments, a);
2327
2327
  } else {
2328
2328
  o = r.apply(this, arguments);
2329
2329
  }
@@ -2374,40 +2374,40 @@
2374
2374
  }
2375
2375
  /* eslint-disable max-classes-per-file */
2376
2376
  /** @public */ var gn = {
2377
- allowKeyMatching: i().bool,
2378
- animateLoading: i().bool,
2379
- appearance: i().oneOf([ "default", "link", "primary", "pill", "toggle", "flat" ]),
2380
- append: i().bool,
2381
- children: i().node,
2382
- defaultPlacement: i().oneOf([ "above", "below", "vertical" ]),
2383
- defaultValue: i().oneOfType([ i().string, i().number, i().bool ]),
2384
- describedBy: i().string,
2385
- disabled: i().bool,
2386
- elementRef: i().oneOfType([ i().func, i().object ]),
2387
- error: i().bool,
2388
- filter: i().oneOf([ false, true, "controlled" ]),
2389
- footerMessage: i().node,
2390
- inline: i().bool,
2391
- inputId: i().string,
2392
- inputRef: i().oneOfType([ i().func, i().object ]),
2393
- isLoadingOptions: i().bool,
2394
- labelledBy: i().string,
2395
- labelText: i().string,
2396
- loadingMessage: i().node,
2397
- menuStyle: i().object,
2398
- name: i().string,
2399
- noOptionsMessage: i().node,
2400
- onChange: i().func,
2401
- onClose: i().func,
2402
- onFilterChange: i().func,
2403
- onOpen: i().func,
2404
- onScroll: i().func,
2405
- onScrollBottom: i().func,
2406
- placeholder: i().string,
2407
- prefixLabel: i().string,
2408
- prepend: i().bool,
2409
- suffixLabel: i().string,
2410
- value: i().oneOfType([ i().string, i().number, i().bool ])
2377
+ allowKeyMatching: a().bool,
2378
+ animateLoading: a().bool,
2379
+ appearance: a().oneOf([ "default", "link", "primary", "pill", "toggle", "flat" ]),
2380
+ append: a().bool,
2381
+ children: a().node,
2382
+ defaultPlacement: a().oneOf([ "above", "below", "vertical" ]),
2383
+ defaultValue: a().oneOfType([ a().string, a().number, a().bool ]),
2384
+ describedBy: a().string,
2385
+ disabled: a().bool,
2386
+ elementRef: a().oneOfType([ a().func, a().object ]),
2387
+ error: a().bool,
2388
+ filter: a().oneOf([ false, true, "controlled" ]),
2389
+ footerMessage: a().node,
2390
+ inline: a().bool,
2391
+ inputId: a().string,
2392
+ inputRef: a().oneOfType([ a().func, a().object ]),
2393
+ isLoadingOptions: a().bool,
2394
+ labelledBy: a().string,
2395
+ labelText: a().string,
2396
+ loadingMessage: a().node,
2397
+ menuStyle: a().object,
2398
+ name: a().string,
2399
+ noOptionsMessage: a().node,
2400
+ onChange: a().func,
2401
+ onClose: a().func,
2402
+ onFilterChange: a().func,
2403
+ onOpen: a().func,
2404
+ onScroll: a().func,
2405
+ onScrollBottom: a().func,
2406
+ placeholder: a().string,
2407
+ prefixLabel: a().string,
2408
+ prepend: a().bool,
2409
+ suffixLabel: a().string,
2410
+ value: a().oneOfType([ a().string, a().number, a().bool ])
2411
2411
  };
2412
2412
  var On = {
2413
2413
  allowKeyMatching: true,
@@ -2455,20 +2455,20 @@
2455
2455
  }, {
2456
2456
  key: "render",
2457
2457
  value: function e() {
2458
- var t = this.props, n = t.defaultValue, o = t.onChange, i = t.value, a = an(t, [ "defaultValue", "onChange", "value" ]);
2458
+ var t = this.props, n = t.defaultValue, o = t.onChange, a = t.value, i = an(t, [ "defaultValue", "onChange", "value" ]);
2459
2459
  var c = {
2460
2460
  onChange: function e(t, n) {
2461
- var r = n.name, i = n.values;
2461
+ var r = n.name, a = n.values;
2462
2462
  o === null || o === void 0 ? void 0 : o(t, {
2463
2463
  name: r,
2464
- value: i[0]
2464
+ value: a[0]
2465
2465
  });
2466
2466
  }
2467
2467
  };
2468
2468
  // using "has" as opposed to a null check to match SelectBase
2469
2469
  if (l()(this.props, "value")) {
2470
- if (i != null) {
2471
- c.values = [ i ];
2470
+ if (a != null) {
2471
+ c.values = [ a ];
2472
2472
  } else {
2473
2473
  c.values = [];
2474
2474
  }
@@ -2477,7 +2477,7 @@
2477
2477
  c.defaultValues = this.state.defaultValues;
2478
2478
  }
2479
2479
 
2480
- return r().createElement(Nt, on({}, a, c, {
2480
+ return r().createElement(Nt, on({}, i, c, {
2481
2481
  multiple: false
2482
2482
  }));
2483
2483
  }