@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
@@ -114,9 +114,6 @@ const Menu = class {
|
|
114
114
|
this.hasPreviouslyBlurred = false;
|
115
115
|
this.hasTimedOut = false;
|
116
116
|
this.isLoading = false;
|
117
|
-
this.isMultiSelect = false;
|
118
|
-
this.isSearchBar = false;
|
119
|
-
this.isSearchableSelect = false;
|
120
117
|
this.lastOptionSelected = null; // Index of last option selected
|
121
118
|
this.lastOptionFocused = null; // Index of last option focused
|
122
119
|
this.multiOptionClicked = null;
|
@@ -149,6 +146,18 @@ const Menu = class {
|
|
149
146
|
* The custom name for the label field for IcMenuOption.
|
150
147
|
*/
|
151
148
|
this.labelField = "label";
|
149
|
+
/**
|
150
|
+
* @internal - flag to specify if menu is in a ic-select multiple.
|
151
|
+
*/
|
152
|
+
this.multiSelect = false;
|
153
|
+
/**
|
154
|
+
* @internal - flag to specify if menu is in a searchable ic-select.
|
155
|
+
*/
|
156
|
+
this.searchableSelect = false;
|
157
|
+
/**
|
158
|
+
* @internal - flag to specify if menu is in a ic-search-bar.
|
159
|
+
*/
|
160
|
+
this.searchBar = false;
|
152
161
|
/**
|
153
162
|
* Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.
|
154
163
|
*/
|
@@ -181,7 +190,7 @@ const Menu = class {
|
|
181
190
|
this.preventClickOpen = false;
|
182
191
|
}
|
183
192
|
// Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
|
184
|
-
if (this.
|
193
|
+
if (this.multiSelect) {
|
185
194
|
this.optionHighlighted = undefined;
|
186
195
|
this.multiOptionClicked = null;
|
187
196
|
}
|
@@ -215,27 +224,12 @@ const Menu = class {
|
|
215
224
|
});
|
216
225
|
}
|
217
226
|
};
|
218
|
-
this.getParentEl = (parent) => {
|
219
|
-
if (parent.tagName === this.SEARCH_BAR_TAG) {
|
220
|
-
this.isSearchBar = true;
|
221
|
-
}
|
222
|
-
else if (parent.tagName === "IC-SELECT") {
|
223
|
-
if (parent.getAttribute("searchable") !== null &&
|
224
|
-
parent.getAttribute("searchable") !== undefined) {
|
225
|
-
this.isSearchableSelect = true;
|
226
|
-
}
|
227
|
-
else if (parent.getAttribute("multiple") !== null &&
|
228
|
-
parent.getAttribute("multiple") !== undefined) {
|
229
|
-
this.isMultiSelect = true;
|
230
|
-
}
|
231
|
-
}
|
232
|
-
};
|
233
227
|
// Open menu when up or down arrow keys are pressed
|
234
228
|
this.arrowBehaviour = (event) => {
|
235
229
|
event.preventDefault();
|
236
230
|
this.handleMenuChange(true);
|
237
231
|
};
|
238
|
-
this.getMenuOptions = () => this.
|
232
|
+
this.getMenuOptions = () => this.searchBar ? this.options : this.ungroupedOptions;
|
239
233
|
// Set option that is focused and so should show focus state
|
240
234
|
this.setHighlightedOption = (highlightedIndex) => {
|
241
235
|
const menuOptions = this.getMenuOptions();
|
@@ -273,11 +267,11 @@ const Menu = class {
|
|
273
267
|
if (!this.isLoading && !this.hasTimedOut) {
|
274
268
|
this.keyboardNav = true;
|
275
269
|
}
|
276
|
-
const isOpen = this.
|
270
|
+
const isOpen = this.searchBar || this.searchableSelect || this.open;
|
277
271
|
if (isOpen) {
|
278
272
|
if (highlightedOptionIndex >= 0) {
|
279
273
|
if (options[highlightedOptionIndex] !== undefined) {
|
280
|
-
if (this.
|
274
|
+
if (this.searchBar &&
|
281
275
|
options[highlightedOptionIndex].disabled === true) {
|
282
276
|
this.disabledOptionSelected = true;
|
283
277
|
}
|
@@ -322,7 +316,7 @@ const Menu = class {
|
|
322
316
|
const clickedMultiOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.multiOptionClicked);
|
323
317
|
const getOptionId = (index) => { var _a; return (_a = Array.from(this.host.querySelectorAll("li"))[index]) === null || _a === void 0 ? void 0 : _a.id; };
|
324
318
|
// Space press should be equivalent to Enter when multi-select
|
325
|
-
if (event.key === " " && this.
|
319
|
+
if (event.key === " " && this.multiSelect) {
|
326
320
|
this.handleOptionSelect(event, highlightedOptionIndex);
|
327
321
|
}
|
328
322
|
else {
|
@@ -353,7 +347,7 @@ const Menu = class {
|
|
353
347
|
this.handleSingleShiftSelect(event, 0, menuOptions);
|
354
348
|
}
|
355
349
|
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
356
|
-
if (this.
|
350
|
+
if (this.multiSelect && this.shiftPressed) {
|
357
351
|
this.deselectSelectedOptions([
|
358
352
|
highlightedOptionIndex,
|
359
353
|
this.getOptionHighlightedIndex(),
|
@@ -392,7 +386,7 @@ const Menu = class {
|
|
392
386
|
this.handleSingleShiftSelect(event, highlightedOptionIndex - 1, menuOptions);
|
393
387
|
}
|
394
388
|
// Deselect currently selected options if arrow was pressed for first time after shift is held
|
395
|
-
if (this.
|
389
|
+
if (this.multiSelect && this.shiftPressed) {
|
396
390
|
this.deselectSelectedOptions([
|
397
391
|
highlightedOptionIndex,
|
398
392
|
this.getOptionHighlightedIndex(),
|
@@ -440,7 +434,7 @@ const Menu = class {
|
|
440
434
|
if (!isKeyboardCombination) {
|
441
435
|
this.keyboardNav = false;
|
442
436
|
}
|
443
|
-
if (this.
|
437
|
+
if (this.searchBar || this.searchableSelect) {
|
444
438
|
break;
|
445
439
|
}
|
446
440
|
else {
|
@@ -478,10 +472,10 @@ const Menu = class {
|
|
478
472
|
if (event.key === "Shift") {
|
479
473
|
this.shiftPressed = true;
|
480
474
|
}
|
481
|
-
if (this.
|
475
|
+
if (this.searchBar) {
|
482
476
|
this.keyboardNav = true;
|
483
477
|
}
|
484
|
-
if (this.
|
478
|
+
if (this.multiSelect) {
|
485
479
|
if (this.open && !event.shiftKey && this.selectAllButton) {
|
486
480
|
event.preventDefault();
|
487
481
|
this.selectAllButton.focus(); // Move focus to select all button instead of focused option
|
@@ -524,7 +518,7 @@ const Menu = class {
|
|
524
518
|
};
|
525
519
|
this.handleOptionClick = (event) => {
|
526
520
|
const { value, label } = event.target.dataset;
|
527
|
-
if (this.
|
521
|
+
if (this.multiSelect) {
|
528
522
|
const menuOptions = this.getMenuOptions();
|
529
523
|
const selectedOptionIndex = menuOptions.findIndex((option) => option.value === value);
|
530
524
|
this.handleOptionSelect(event, selectedOptionIndex, true);
|
@@ -566,7 +560,7 @@ const Menu = class {
|
|
566
560
|
this.lastOptionFocused = null;
|
567
561
|
this.lastOptionSelected = null;
|
568
562
|
}
|
569
|
-
if (!this.
|
563
|
+
if (!this.searchBar)
|
570
564
|
this.hasPreviouslyBlurred = !!event.relatedTarget;
|
571
565
|
};
|
572
566
|
this.handleMouseDown = (event) => {
|
@@ -576,7 +570,7 @@ const Menu = class {
|
|
576
570
|
if (this.activationType === "automatic") {
|
577
571
|
this.autoSetValueOnMenuKeyDown(event);
|
578
572
|
}
|
579
|
-
else if (this.activationType === "manual" && !this.
|
573
|
+
else if (this.activationType === "manual" && !this.searchBar) {
|
580
574
|
this.manualSetInputValueKeyboardOpen(event);
|
581
575
|
}
|
582
576
|
};
|
@@ -619,7 +613,7 @@ const Menu = class {
|
|
619
613
|
// When shift key is being used to select contiguous options one by one on a multi-select
|
620
614
|
// I.e. holding shift and pressing up and down arrow keys
|
621
615
|
this.handleSingleShiftSelect = (event, optionToSelectIndex, options) => {
|
622
|
-
if (this.
|
616
|
+
if (this.multiSelect &&
|
623
617
|
event.shiftKey &&
|
624
618
|
!this.isOptionSelected(optionToSelectIndex)) {
|
625
619
|
this.selectHighlightedOption(options, optionToSelectIndex);
|
@@ -869,9 +863,7 @@ const Menu = class {
|
|
869
863
|
this.loadUngroupedOptions();
|
870
864
|
}
|
871
865
|
connectedCallback() {
|
872
|
-
if (this.
|
873
|
-
this.getParentEl(this.parentEl);
|
874
|
-
if (this.isSearchBar) {
|
866
|
+
if (this.searchBar) {
|
875
867
|
if (this.searchMode === "navigation")
|
876
868
|
this.setHighlightedOption(0);
|
877
869
|
this.initialOptionsListRender = true;
|
@@ -892,7 +884,7 @@ const Menu = class {
|
|
892
884
|
this.isLoading = (_d = this.options) === null || _d === void 0 ? void 0 : _d.some((opt) => opt.loading);
|
893
885
|
}
|
894
886
|
componentDidLoad() {
|
895
|
-
if (this.
|
887
|
+
if (this.searchBar &&
|
896
888
|
this.parentEl.disableAutoFiltering) {
|
897
889
|
this.focusFromSearchKeypress = true;
|
898
890
|
}
|
@@ -914,7 +906,7 @@ const Menu = class {
|
|
914
906
|
this.keyboardNav &&
|
915
907
|
inputValueInOptions &&
|
916
908
|
this.autofocusOnSelected &&
|
917
|
-
!this.
|
909
|
+
!this.searchableSelect) {
|
918
910
|
this.scrollToSelected(this.menu);
|
919
911
|
}
|
920
912
|
else if (this.selectOnEnter) {
|
@@ -1008,21 +1000,21 @@ const Menu = class {
|
|
1008
1000
|
focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex) {
|
1009
1001
|
if (!menuOptions[highlightedOptionIndex])
|
1010
1002
|
return;
|
1011
|
-
if (this.
|
1003
|
+
if (this.searchBar) {
|
1012
1004
|
this.parentEl.setFocus();
|
1013
1005
|
if (this.searchMode === "navigation")
|
1014
1006
|
this.setHighlightedOption(0);
|
1015
1007
|
}
|
1016
|
-
if (this.
|
1008
|
+
if (this.searchableSelect) {
|
1017
1009
|
this.parentEl.setFocus();
|
1018
1010
|
}
|
1019
1011
|
this.focusFromSearchKeypress = true;
|
1020
1012
|
}
|
1021
1013
|
render() {
|
1022
|
-
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, } = this;
|
1014
|
+
const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, multiSelect, } = this;
|
1023
1015
|
const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
|
1024
1016
|
const hasNoResults = this.host.classList.contains("no-results");
|
1025
|
-
return (h(Host, { key: '
|
1017
|
+
return (h(Host, { key: 'bce19ee8d7929f03d2de173ad6f2b639cd2fbf2c', class: {
|
1026
1018
|
"ic-menu-full-width": !!fullWidth,
|
1027
1019
|
"ic-menu-no-focus": ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" &&
|
1028
1020
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) !== SEARCH_BAR_TAG) ||
|
@@ -1030,8 +1022,8 @@ const Menu = class {
|
|
1030
1022
|
isLoading,
|
1031
1023
|
[`ic-menu-${size}`]: true,
|
1032
1024
|
"ic-menu-open": open && options.length !== 0,
|
1033
|
-
"ic-menu-multiple":
|
1034
|
-
} }, options.length !== 0 && (h("ul", { key: '
|
1025
|
+
"ic-menu-multiple": multiSelect,
|
1026
|
+
} }, options.length !== 0 && (h("ul", { key: 'edbb9d969dd8218a45c6d012abf8964fc2acd0a7', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", tabindex: open &&
|
1035
1027
|
!keyboardNav &&
|
1036
1028
|
((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ||
|
1037
1029
|
(parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) === SEARCH_BAR_TAG)
|
@@ -1040,7 +1032,7 @@ const Menu = class {
|
|
1040
1032
|
if (option.children) {
|
1041
1033
|
if (option.children.length > 0) {
|
1042
1034
|
return (h("div", null, h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, h("p", null, option[this.labelField])), option.children.map((childOption) => childOption.label &&
|
1043
|
-
this.displayOption(childOption,
|
1035
|
+
this.displayOption(childOption, multiSelect
|
1044
1036
|
? value === null || value === void 0 ? void 0 : value.includes(childOption[this.valueField])
|
1045
1037
|
: childOption[this.valueField] === value, index, option))));
|
1046
1038
|
}
|
@@ -1051,15 +1043,15 @@ const Menu = class {
|
|
1051
1043
|
else {
|
1052
1044
|
// Display option only if it has a label (rather than displaying an empty space)
|
1053
1045
|
return (option.label &&
|
1054
|
-
this.displayOption(option,
|
1046
|
+
this.displayOption(option, multiSelect
|
1055
1047
|
? value === null || value === void 0 ? void 0 : value.includes(option[this.valueField])
|
1056
1048
|
: option[this.valueField] === value, index));
|
1057
1049
|
}
|
1058
1050
|
}))), options.length !== 0 &&
|
1059
|
-
|
1051
|
+
multiSelect &&
|
1060
1052
|
!isLoading &&
|
1061
1053
|
!hasTimedOut &&
|
1062
|
-
!hasNoResults && (h("div", { key: '
|
1054
|
+
!hasNoResults && (h("div", { key: '317f18bd8ff88fadf840ccc5666bf7ae7a6b1e65', class: "option-bar" }, h("ic-typography", { key: '32e28e814c9c3d4ac243e2d45cb2487a99a900ba' }, h("p", { key: '6ed28e350ad356ef669b4b6b9f3d8718a7274782' }, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), 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)))));
|
1063
1055
|
}
|
1064
1056
|
get host() { return getElement(this); }
|
1065
1057
|
static get watchers() { return {
|