@ukic/canary-web-components 3.0.0-canary.21 → 3.0.0-canary.22
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/README.md +2 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +29 -21
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +17 -10
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +39 -47
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -10
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +15 -4
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -4
- package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +14 -8
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +23 -15
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +3 -2
- package/dist/collection/components/ic-data-table/ic-data-table.js +28 -20
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js +2 -2
- package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +32 -73
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +37 -10
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +14 -8
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +23 -15
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/components/ic-data-table.js +29 -21
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-picker.js +18 -10
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-loading-indicator2.js +1 -1
- package/dist/components/ic-loading-indicator2.js.map +1 -1
- package/dist/components/ic-menu2.js +42 -47
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-item.js +3 -10
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-search-bar.js +2 -2
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select2.js +2 -2
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +2 -2
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +17 -4
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-toggle-button.js +14 -4
- package/dist/components/ic-toggle-button.js.map +1 -1
- package/dist/components/ic-tree-item.js +15 -9
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +24 -16
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-156fc5f1.entry.js +2 -0
- package/dist/core/p-156fc5f1.entry.js.map +1 -0
- package/dist/core/{p-b6c3cc1c.entry.js → p-15ec796a.entry.js} +2 -2
- package/dist/core/p-15ec796a.entry.js.map +1 -0
- package/dist/core/{p-145238fe.entry.js → p-1ffac8ae.entry.js} +2 -2
- package/dist/core/{p-145238fe.entry.js.map → p-1ffac8ae.entry.js.map} +1 -1
- package/dist/core/{p-b6d1988d.entry.js → p-6e7aaca5.entry.js} +2 -2
- package/dist/core/{p-b6d1988d.entry.js.map → p-6e7aaca5.entry.js.map} +1 -1
- package/dist/core/p-755bdc43.entry.js +2 -0
- package/dist/core/p-755bdc43.entry.js.map +1 -0
- package/dist/core/p-78635447.entry.js +2 -0
- package/dist/core/p-78635447.entry.js.map +1 -0
- package/dist/core/{p-1bcf49fa.entry.js → p-a220535c.entry.js} +2 -2
- package/dist/core/p-a220535c.entry.js.map +1 -0
- package/dist/core/{p-9fafa5fa.entry.js → p-b88585bf.entry.js} +2 -2
- package/dist/core/p-b88585bf.entry.js.map +1 -0
- package/dist/core/{p-b6b7c15c.entry.js → p-bc974a3e.entry.js} +2 -2
- package/dist/core/p-bc974a3e.entry.js.map +1 -0
- package/dist/core/p-c67381b1.entry.js +2 -0
- package/dist/core/p-c67381b1.entry.js.map +1 -0
- package/dist/core/p-d04b75cb.entry.js +2 -0
- package/dist/core/p-d04b75cb.entry.js.map +1 -0
- package/dist/core/p-e2103bcc.entry.js +2 -0
- package/dist/core/p-e2103bcc.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-button_3.entry.js +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-data-table.entry.js +29 -21
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +17 -10
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +39 -47
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +3 -10
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +2 -2
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +2 -2
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-side-navigation.entry.js +2 -2
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +15 -4
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button.entry.js +13 -4
- package/dist/esm/ic-toggle-button.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +15 -9
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +24 -16
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +1 -1
- package/dist/types/components/ic-data-table/story-data.d.ts +0 -64
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
- package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +2 -1
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +166 -126
- package/hydrate/index.mjs +166 -126
- package/package.json +3 -3
- package/dist/core/p-1b20ab19.entry.js +0 -2
- package/dist/core/p-1b20ab19.entry.js.map +0 -1
- package/dist/core/p-1bcf49fa.entry.js.map +0 -1
- package/dist/core/p-5f8b09e4.entry.js +0 -2
- package/dist/core/p-5f8b09e4.entry.js.map +0 -1
- package/dist/core/p-7001f1c1.entry.js +0 -2
- package/dist/core/p-7001f1c1.entry.js.map +0 -1
- package/dist/core/p-9fafa5fa.entry.js.map +0 -1
- package/dist/core/p-b6b7c15c.entry.js.map +0 -1
- package/dist/core/p-b6c3cc1c.entry.js.map +0 -1
- package/dist/core/p-b9369ce5.entry.js +0 -2
- package/dist/core/p-b9369ce5.entry.js.map +0 -1
- package/dist/core/p-cbbba154.entry.js +0 -2
- package/dist/core/p-cbbba154.entry.js.map +0 -1
- package/dist/core/p-dc3aba7c.entry.js +0 -2
- package/dist/core/p-dc3aba7c.entry.js.map +0 -1
@@ -118,9 +118,6 @@ const Menu = class {
|
|
118
118
|
this.hasPreviouslyBlurred = false;
|
119
119
|
this.hasTimedOut = false;
|
120
120
|
this.isLoading = false;
|
121
|
-
this.isMultiSelect = false;
|
122
|
-
this.isSearchBar = false;
|
123
|
-
this.isSearchableSelect = false;
|
124
121
|
this.lastOptionSelected = null; // Index of last option selected
|
125
122
|
this.lastOptionFocused = null; // Index of last option focused
|
126
123
|
this.multiOptionClicked = null;
|
@@ -153,6 +150,18 @@ const Menu = class {
|
|
153
150
|
* The custom name for the label field for IcMenuOption.
|
154
151
|
*/
|
155
152
|
this.labelField = "label";
|
153
|
+
/**
|
154
|
+
* @internal - flag to specify if menu is in a ic-select multiple.
|
155
|
+
*/
|
156
|
+
this.multiSelect = false;
|
157
|
+
/**
|
158
|
+
* @internal - flag to specify if menu is in a searchable ic-select.
|
159
|
+
*/
|
160
|
+
this.searchableSelect = false;
|
161
|
+
/**
|
162
|
+
* @internal - flag to specify if menu is in a ic-search-bar.
|
163
|
+
*/
|
164
|
+
this.searchBar = false;
|
156
165
|
/**
|
157
166
|
* Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.
|
158
167
|
*/
|
@@ -185,7 +194,7 @@ const Menu = class {
|
|
185
194
|
this.preventClickOpen = false;
|
186
195
|
}
|
187
196
|
// Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
|
188
|
-
if (this.
|
197
|
+
if (this.multiSelect) {
|
189
198
|
this.optionHighlighted = undefined;
|
190
199
|
this.multiOptionClicked = null;
|
191
200
|
}
|
@@ -219,27 +228,12 @@ const Menu = class {
|
|
219
228
|
});
|
220
229
|
}
|
221
230
|
};
|
222
|
-
this.getParentEl = (parent) => {
|
223
|
-
if (parent.tagName === this.SEARCH_BAR_TAG) {
|
224
|
-
this.isSearchBar = true;
|
225
|
-
}
|
226
|
-
else if (parent.tagName === "IC-SELECT") {
|
227
|
-
if (parent.getAttribute("searchable") !== null &&
|
228
|
-
parent.getAttribute("searchable") !== undefined) {
|
229
|
-
this.isSearchableSelect = true;
|
230
|
-
}
|
231
|
-
else if (parent.getAttribute("multiple") !== null &&
|
232
|
-
parent.getAttribute("multiple") !== undefined) {
|
233
|
-
this.isMultiSelect = true;
|
234
|
-
}
|
235
|
-
}
|
236
|
-
};
|
237
231
|
// Open menu when up or down arrow keys are pressed
|
238
232
|
this.arrowBehaviour = (event) => {
|
239
233
|
event.preventDefault();
|
240
234
|
this.handleMenuChange(true);
|
241
235
|
};
|
242
|
-
this.getMenuOptions = () => this.
|
236
|
+
this.getMenuOptions = () => this.searchBar ? this.options : this.ungroupedOptions;
|
243
237
|
// Set option that is focused and so should show focus state
|
244
238
|
this.setHighlightedOption = (highlightedIndex) => {
|
245
239
|
const menuOptions = this.getMenuOptions();
|
@@ -277,11 +271,11 @@ const Menu = class {
|
|
277
271
|
if (!this.isLoading && !this.hasTimedOut) {
|
278
272
|
this.keyboardNav = true;
|
279
273
|
}
|
280
|
-
const isOpen = this.
|
274
|
+
const isOpen = this.searchBar || this.searchableSelect || this.open;
|
281
275
|
if (isOpen) {
|
282
276
|
if (highlightedOptionIndex >= 0) {
|
283
277
|
if (options[highlightedOptionIndex] !== undefined) {
|
284
|
-
if (this.
|
278
|
+
if (this.searchBar &&
|
285
279
|
options[highlightedOptionIndex].disabled === true) {
|
286
280
|
this.disabledOptionSelected = true;
|
287
281
|
}
|
@@ -326,7 +320,7 @@ const Menu = class {
|
|
326
320
|
const clickedMultiOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.multiOptionClicked);
|
327
321
|
const getOptionId = (index) => { var _a; return (_a = Array.from(this.host.querySelectorAll("li"))[index]) === null || _a === void 0 ? void 0 : _a.id; };
|
328
322
|
// Space press should be equivalent to Enter when multi-select
|
329
|
-
if (event.key === " " && this.
|
323
|
+
if (event.key === " " && this.multiSelect) {
|
330
324
|
this.handleOptionSelect(event, highlightedOptionIndex);
|
331
325
|
}
|
332
326
|
else {
|
@@ -357,7 +351,7 @@ const Menu = class {
|
|
357
351
|
this.handleSingleShiftSelect(event, 0, menuOptions);
|
358
352
|
}
|
359
353
|
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
360
|
-
if (this.
|
354
|
+
if (this.multiSelect && this.shiftPressed) {
|
361
355
|
this.deselectSelectedOptions([
|
362
356
|
highlightedOptionIndex,
|
363
357
|
this.getOptionHighlightedIndex(),
|
@@ -396,7 +390,7 @@ const Menu = class {
|
|
396
390
|
this.handleSingleShiftSelect(event, highlightedOptionIndex - 1, menuOptions);
|
397
391
|
}
|
398
392
|
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
399
|
-
if (this.
|
393
|
+
if (this.multiSelect && this.shiftPressed) {
|
400
394
|
this.deselectSelectedOptions([
|
401
395
|
highlightedOptionIndex,
|
402
396
|
this.getOptionHighlightedIndex(),
|
@@ -444,7 +438,7 @@ const Menu = class {
|
|
444
438
|
if (!isKeyboardCombination) {
|
445
439
|
this.keyboardNav = false;
|
446
440
|
}
|
447
|
-
if (this.
|
441
|
+
if (this.searchBar || this.searchableSelect) {
|
448
442
|
break;
|
449
443
|
}
|
450
444
|
else {
|
@@ -482,10 +476,10 @@ const Menu = class {
|
|
482
476
|
if (event.key === "Shift") {
|
483
477
|
this.shiftPressed = true;
|
484
478
|
}
|
485
|
-
if (this.
|
479
|
+
if (this.searchBar) {
|
486
480
|
this.keyboardNav = true;
|
487
481
|
}
|
488
|
-
if (this.
|
482
|
+
if (this.multiSelect) {
|
489
483
|
if (this.open && !event.shiftKey && this.selectAllButton) {
|
490
484
|
event.preventDefault();
|
491
485
|
this.selectAllButton.focus(); // Move focus to select all button instead of focused option
|
@@ -528,7 +522,7 @@ const Menu = class {
|
|
528
522
|
};
|
529
523
|
this.handleOptionClick = (event) => {
|
530
524
|
const { value, label } = event.target.dataset;
|
531
|
-
if (this.
|
525
|
+
if (this.multiSelect) {
|
532
526
|
const menuOptions = this.getMenuOptions();
|
533
527
|
const selectedOptionIndex = menuOptions.findIndex((option) => option.value === value);
|
534
528
|
this.handleOptionSelect(event, selectedOptionIndex, true);
|
@@ -570,7 +564,7 @@ const Menu = class {
|
|
570
564
|
this.lastOptionFocused = null;
|
571
565
|
this.lastOptionSelected = null;
|
572
566
|
}
|
573
|
-
if (!this.
|
567
|
+
if (!this.searchBar)
|
574
568
|
this.hasPreviouslyBlurred = !!event.relatedTarget;
|
575
569
|
};
|
576
570
|
this.handleMouseDown = (event) => {
|
@@ -580,7 +574,7 @@ const Menu = class {
|
|
580
574
|
if (this.activationType === "automatic") {
|
581
575
|
this.autoSetValueOnMenuKeyDown(event);
|
582
576
|
}
|
583
|
-
else if (this.activationType === "manual" && !this.
|
577
|
+
else if (this.activationType === "manual" && !this.searchBar) {
|
584
578
|
this.manualSetInputValueKeyboardOpen(event);
|
585
579
|
}
|
586
580
|
};
|
@@ -623,7 +617,7 @@ const Menu = class {
|
|
623
617
|
// When shift key is being used to select contiguous options one by one on a multi-select
|
624
618
|
// I.e. holding shift and pressing up and down arrow keys
|
625
619
|
this.handleSingleShiftSelect = (event, optionToSelectIndex, options) => {
|
626
|
-
if (this.
|
620
|
+
if (this.multiSelect &&
|
627
621
|
event.shiftKey &&
|
628
622
|
!this.isOptionSelected(optionToSelectIndex)) {
|
629
623
|
this.selectHighlightedOption(options, optionToSelectIndex);
|
@@ -873,9 +867,7 @@ const Menu = class {
|
|
873
867
|
this.loadUngroupedOptions();
|
874
868
|
}
|
875
869
|
connectedCallback() {
|
876
|
-
if (this.
|
877
|
-
this.getParentEl(this.parentEl);
|
878
|
-
if (this.isSearchBar) {
|
870
|
+
if (this.searchBar) {
|
879
871
|
if (this.searchMode === "navigation")
|
880
872
|
this.setHighlightedOption(0);
|
881
873
|
this.initialOptionsListRender = true;
|
@@ -896,7 +888,7 @@ const Menu = class {
|
|
896
888
|
this.isLoading = (_d = this.options) === null || _d === void 0 ? void 0 : _d.some((opt) => opt.loading);
|
897
889
|
}
|
898
890
|
componentDidLoad() {
|
899
|
-
if (this.
|
891
|
+
if (this.searchBar &&
|
900
892
|
this.parentEl.disableAutoFiltering) {
|
901
893
|
this.focusFromSearchKeypress = true;
|
902
894
|
}
|
@@ -918,7 +910,7 @@ const Menu = class {
|
|
918
910
|
this.keyboardNav &&
|
919
911
|
inputValueInOptions &&
|
920
912
|
this.autofocusOnSelected &&
|
921
|
-
!this.
|
913
|
+
!this.searchableSelect) {
|
922
914
|
this.scrollToSelected(this.menu);
|
923
915
|
}
|
924
916
|
else if (this.selectOnEnter) {
|
@@ -1012,21 +1004,21 @@ const Menu = class {
|
|
1012
1004
|
focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex) {
|
1013
1005
|
if (!menuOptions[highlightedOptionIndex])
|
1014
1006
|
return;
|
1015
|
-
if (this.
|
1007
|
+
if (this.searchBar) {
|
1016
1008
|
this.parentEl.setFocus();
|
1017
1009
|
if (this.searchMode === "navigation")
|
1018
1010
|
this.setHighlightedOption(0);
|
1019
1011
|
}
|
1020
|
-
if (this.
|
1012
|
+
if (this.searchableSelect) {
|
1021
1013
|
this.parentEl.setFocus();
|
1022
1014
|
}
|
1023
1015
|
this.focusFromSearchKeypress = true;
|
1024
1016
|
}
|
1025
1017
|
render() {
|
1026
|
-
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, } = this;
|
1018
|
+
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, multiSelect, } = this;
|
1027
1019
|
const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
|
1028
1020
|
const hasNoResults = this.host.classList.contains("no-results");
|
1029
|
-
return (index.h(index.Host, { key: '
|
1021
|
+
return (index.h(index.Host, { key: 'bce19ee8d7929f03d2de173ad6f2b639cd2fbf2c', class: {
|
1030
1022
|
"ic-menu-full-width": !!fullWidth,
|
1031
1023
|
"ic-menu-no-focus": ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" &&
|
1032
1024
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) !== SEARCH_BAR_TAG) ||
|
@@ -1034,8 +1026,8 @@ const Menu = class {
|
|
1034
1026
|
isLoading,
|
1035
1027
|
[`ic-menu-${size}`]: true,
|
1036
1028
|
"ic-menu-open": open && options.length !== 0,
|
1037
|
-
"ic-menu-multiple":
|
1038
|
-
} }, options.length !== 0 && (index.h("ul", { key: '
|
1029
|
+
"ic-menu-multiple": multiSelect,
|
1030
|
+
} }, options.length !== 0 && (index.h("ul", { key: 'edbb9d969dd8218a45c6d012abf8964fc2acd0a7', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", tabindex: open &&
|
1039
1031
|
!keyboardNav &&
|
1040
1032
|
((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ||
|
1041
1033
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) === SEARCH_BAR_TAG)
|
@@ -1044,7 +1036,7 @@ const Menu = class {
|
|
1044
1036
|
if (option.children) {
|
1045
1037
|
if (option.children.length > 0) {
|
1046
1038
|
return (index.h("div", null, index.h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, index.h("p", null, option[this.labelField])), option.children.map((childOption) => childOption.label &&
|
1047
|
-
this.displayOption(childOption,
|
1039
|
+
this.displayOption(childOption, multiSelect
|
1048
1040
|
? value === null || value === void 0 ? void 0 : value.includes(childOption[this.valueField])
|
1049
1041
|
: childOption[this.valueField] === value, index$1, option))));
|
1050
1042
|
}
|
@@ -1055,15 +1047,15 @@ const Menu = class {
|
|
1055
1047
|
else {
|
1056
1048
|
// Display option only if it has a label (rather than displaying an empty space)
|
1057
1049
|
return (option.label &&
|
1058
|
-
this.displayOption(option,
|
1050
|
+
this.displayOption(option, multiSelect
|
1059
1051
|
? value === null || value === void 0 ? void 0 : value.includes(option[this.valueField])
|
1060
1052
|
: option[this.valueField] === value, index$1));
|
1061
1053
|
}
|
1062
1054
|
}))), options.length !== 0 &&
|
1063
|
-
|
1055
|
+
multiSelect &&
|
1064
1056
|
!isLoading &&
|
1065
1057
|
!hasTimedOut &&
|
1066
|
-
!hasNoResults && (index.h("div", { key: '
|
1058
|
+
!hasNoResults && (index.h("div", { key: '317f18bd8ff88fadf840ccc5666bf7ae7a6b1e65', class: "option-bar" }, index.h("ic-typography", { key: '32e28e814c9c3d4ac243e2d45cb2487a99a900ba' }, index.h("p", { key: '6ed28e350ad356ef669b4b6b9f3d8718a7274782' }, `${value ? value.length : 0}/${helpers.getOptionsWithoutGroupTitlesCount(this.options)} selected`)), index.h("ic-button", { key: 'e66e1b04732d26ebbc05751eadc49968c11ac92c', class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
|
1067
1059
|
}
|
1068
1060
|
get host() { return index.getElement(this); }
|
1069
1061
|
static get watchers() { return {
|