igniteui-webcomponents 6.3.4 → 6.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +3 -0
- package/animations/player.d.ts +37 -11
- package/animations/player.js +32 -41
- package/animations/player.js.map +1 -1
- package/components/accordion/accordion.d.ts +18 -12
- package/components/accordion/accordion.js +82 -65
- package/components/accordion/accordion.js.map +1 -1
- package/components/badge/badge.d.ts +8 -0
- package/components/badge/badge.js +16 -1
- package/components/badge/badge.js.map +1 -1
- package/components/badge/themes/badge.base.css.js +1 -1
- package/components/badge/themes/badge.base.css.js.map +1 -1
- package/components/badge/themes/dark/badge.bootstrap.css.js +1 -1
- package/components/badge/themes/dark/badge.bootstrap.css.js.map +1 -1
- package/components/badge/themes/dark/badge.fluent.css.js +1 -1
- package/components/badge/themes/dark/badge.fluent.css.js.map +1 -1
- package/components/badge/themes/dark/badge.indigo.css.js +1 -1
- package/components/badge/themes/dark/badge.indigo.css.js.map +1 -1
- package/components/badge/themes/dark/badge.material.css.js +1 -1
- package/components/badge/themes/dark/badge.material.css.js.map +1 -1
- package/components/badge/themes/light/badge.bootstrap.css.js +1 -1
- package/components/badge/themes/light/badge.bootstrap.css.js.map +1 -1
- package/components/badge/themes/light/badge.fluent.css.js +1 -1
- package/components/badge/themes/light/badge.fluent.css.js.map +1 -1
- package/components/badge/themes/light/badge.indigo.css.js +1 -1
- package/components/badge/themes/light/badge.indigo.css.js.map +1 -1
- package/components/badge/themes/light/badge.material.css.js +1 -1
- package/components/badge/themes/light/badge.material.css.js.map +1 -1
- package/components/badge/themes/light/badge.shared.css.js +1 -1
- package/components/badge/themes/light/badge.shared.css.js.map +1 -1
- package/components/badge/themes/shared/badge.bootstrap.css.js +1 -1
- package/components/badge/themes/shared/badge.bootstrap.css.js.map +1 -1
- package/components/badge/themes/shared/badge.common.css.js +1 -1
- package/components/badge/themes/shared/badge.common.css.js.map +1 -1
- package/components/badge/themes/shared/badge.fluent.css.d.ts +1 -0
- package/components/badge/themes/shared/badge.fluent.css.js +3 -0
- package/components/badge/themes/shared/badge.fluent.css.js.map +1 -0
- package/components/badge/themes/shared/badge.indigo.css.js +1 -1
- package/components/badge/themes/shared/badge.indigo.css.js.map +1 -1
- package/components/badge/themes/shared/badge.material.css.d.ts +1 -0
- package/components/badge/themes/shared/badge.material.css.js +3 -0
- package/components/badge/themes/shared/badge.material.css.js.map +1 -0
- package/components/badge/themes/themes.js +6 -4
- package/components/badge/themes/themes.js.map +1 -1
- package/components/banner/banner.d.ts +2 -3
- package/components/banner/banner.js +13 -19
- package/components/banner/banner.js.map +1 -1
- package/components/calendar/base.d.ts +9 -1
- package/components/calendar/base.js +21 -2
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +0 -4
- package/components/calendar/calendar.js +0 -5
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +0 -2
- package/components/calendar/days-view/days-view.js +0 -5
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/carousel/carousel.d.ts +19 -2
- package/components/carousel/carousel.js +41 -6
- package/components/carousel/carousel.js.map +1 -1
- package/components/carousel/themes/dark/carousel.indigo.css.js +1 -1
- package/components/carousel/themes/dark/carousel.indigo.css.js.map +1 -1
- package/components/carousel/themes/light/carousel.indigo.css.js +1 -1
- package/components/carousel/themes/light/carousel.indigo.css.js.map +1 -1
- package/components/carousel/themes/shared/carousel.common.css.js +1 -1
- package/components/carousel/themes/shared/carousel.common.css.js.map +1 -1
- package/components/carousel/themes/shared/carousel.indigo.css.js +1 -1
- package/components/carousel/themes/shared/carousel.indigo.css.js.map +1 -1
- package/components/carousel/themes/shared/indicator-container/indicator-container.common.css.js +1 -1
- package/components/carousel/themes/shared/indicator-container/indicator-container.common.css.js.map +1 -1
- package/components/chat/chat-input.d.ts +5 -0
- package/components/chat/chat-input.js +35 -6
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat-message.js +2 -2
- package/components/chat/chat-message.js.map +1 -1
- package/components/chat/chat-state.d.ts +3 -4
- package/components/chat/chat-state.js +4 -23
- package/components/chat/chat-state.js.map +1 -1
- package/components/chat/chat.d.ts +2 -1
- package/components/chat/chat.js +26 -22
- package/components/chat/chat.js.map +1 -1
- package/components/chat/themes/chat.base.css.js +1 -1
- package/components/chat/themes/chat.base.css.js.map +1 -1
- package/components/chat/types.d.ts +2 -0
- package/components/chat/types.js.map +1 -1
- package/components/chat/utils.d.ts +2 -2
- package/components/chat/utils.js +6 -3
- package/components/chat/utils.js.map +1 -1
- package/components/checkbox/themes/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js +1 -1
- package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js.map +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.fluent.css.js +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.fluent.css.js.map +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.shared.css.js +1 -1
- package/components/checkbox/themes/light/checkbox/checkbox.shared.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js.map +1 -1
- package/components/chip/chip.d.ts +13 -0
- package/components/chip/chip.js +29 -2
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/shared/chip.common.css.js +1 -1
- package/components/chip/themes/shared/chip.common.css.js.map +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
- package/components/combo/combo.d.ts +33 -10
- package/components/combo/combo.js +72 -53
- package/components/combo/combo.js.map +1 -1
- package/components/combo/controllers/navigation.d.ts +39 -43
- package/components/combo/controllers/navigation.js +153 -175
- package/components/combo/controllers/navigation.js.map +1 -1
- package/components/combo/operations/group.d.ts +0 -1
- package/components/combo/operations/group.js +19 -23
- package/components/combo/operations/group.js.map +1 -1
- package/components/combo/themes/combo-header.base.css.js +1 -1
- package/components/combo/themes/combo-header.base.css.js.map +1 -1
- package/components/combo/themes/combo-item.base.css.js +1 -1
- package/components/combo/themes/combo-item.base.css.js.map +1 -1
- package/components/combo/themes/combo.base.css.js +1 -1
- package/components/combo/themes/combo.base.css.js.map +1 -1
- package/components/combo/themes/shared/combo.bootstrap.css.js +1 -1
- package/components/combo/themes/shared/combo.bootstrap.css.js.map +1 -1
- package/components/combo/themes/shared/combo.fluent.css.js +1 -1
- package/components/combo/themes/shared/combo.fluent.css.js.map +1 -1
- package/components/combo/themes/shared/combo.indigo.css.js +1 -1
- package/components/combo/themes/shared/combo.indigo.css.js.map +1 -1
- package/components/combo/themes/shared/combo.material.css.js +1 -1
- package/components/combo/themes/shared/combo.material.css.js.map +1 -1
- package/components/combo/validators.js +2 -2
- package/components/combo/validators.js.map +1 -1
- package/components/common/i18n/EN/calendar.resources.js +4 -0
- package/components/common/i18n/EN/calendar.resources.js.map +1 -0
- package/components/common/i18n/EN/chat.resources.js.map +1 -0
- package/components/common/i18n/EN/date-range-picker.resources.js +8 -0
- package/components/common/i18n/EN/date-range-picker.resources.js.map +1 -0
- package/components/common/i18n/i18n-controller.d.ts +74 -0
- package/components/common/i18n/i18n-controller.js +89 -0
- package/components/common/i18n/i18n-controller.js.map +1 -0
- package/components/common/i18n/utils.d.ts +19 -0
- package/components/common/i18n/utils.js +100 -0
- package/components/common/i18n/utils.js.map +1 -0
- package/components/common/mixins/forms/associated.js +23 -3
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/util.d.ts +0 -1
- package/components/common/util.js +0 -15
- package/components/common/util.js.map +1 -1
- package/components/common/validators.d.ts +4 -2
- package/components/common/validators.js +19 -13
- package/components/common/validators.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +13 -8
- package/components/date-picker/date-picker.js +20 -6
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/date-picker.base.css.js +1 -1
- package/components/date-picker/themes/date-picker.base.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.material.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.material.css.js.map +1 -1
- package/components/date-picker/validators.js +3 -2
- package/components/date-picker/validators.js.map +1 -1
- package/components/date-range-picker/date-range-picker.base.css.js +1 -1
- package/components/date-range-picker/date-range-picker.base.css.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +10 -2
- package/components/date-range-picker/date-range-picker.js +19 -5
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.d.ts +4 -2
- package/components/date-range-picker/predefined-ranges-area.js +12 -3
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js +1 -1
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js.map +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.shared.css.js +1 -1
- package/components/date-range-picker/themes/light/date-range-picker.shared.css.js.map +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js.map +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.common.css.js +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.common.css.js.map +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js.map +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js.map +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.material.css.js +1 -1
- package/components/date-range-picker/themes/shared/date-range-picker.material.css.js.map +1 -1
- package/components/date-range-picker/validators.js +8 -5
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-time-input.d.ts +5 -3
- package/components/date-time-input/date-time-input.js +11 -2
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js.map +1 -1
- package/components/expansion-panel/expansion-panel.d.ts +6 -5
- package/components/expansion-panel/expansion-panel.js +33 -42
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/input/themes/dark/input.bootstrap.css.js +1 -1
- package/components/input/themes/dark/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/input.base.css.js +1 -1
- package/components/input/themes/input.base.css.js.map +1 -1
- package/components/input/themes/light/input.bootstrap.css.js +1 -1
- package/components/input/themes/light/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.common.css.js +1 -1
- package/components/input/themes/shared/input.common.css.js.map +1 -1
- package/components/input/themes/shared/input.fluent.css.js +1 -1
- package/components/input/themes/shared/input.fluent.css.js.map +1 -1
- package/components/input/themes/shared/input.indigo.css.js +1 -1
- package/components/input/themes/shared/input.indigo.css.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/input/validators.js +3 -3
- package/components/input/validators.js.map +1 -1
- package/components/mask-input/validators.js +2 -2
- package/components/mask-input/validators.js.map +1 -1
- package/components/radio/validators.js +2 -2
- package/components/radio/validators.js.map +1 -1
- package/components/select/themes/select.base.css.js +1 -1
- package/components/select/themes/select.base.css.js.map +1 -1
- package/components/select/themes/shared/select.fluent.css.js +1 -1
- package/components/select/themes/shared/select.fluent.css.js.map +1 -1
- package/components/select/themes/shared/select.indigo.css.js +1 -1
- package/components/select/themes/shared/select.indigo.css.js.map +1 -1
- package/components/select/themes/shared/select.material.css.js +1 -1
- package/components/select/themes/shared/select.material.css.js.map +1 -1
- package/components/stepper/step.d.ts +1 -1
- package/components/stepper/step.js +4 -6
- package/components/stepper/step.js.map +1 -1
- package/components/textarea/textarea.d.ts +1 -1
- package/components/textarea/textarea.js +1 -1
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/dark/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/dark/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/light/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
- package/components/textarea/themes/textarea.base.css.js +1 -1
- package/components/textarea/themes/textarea.base.css.js.map +1 -1
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tooltip/controller.d.ts +1 -0
- package/components/tooltip/controller.js +9 -0
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/themes/tooltip.base.css.js +1 -1
- package/components/tooltip/themes/tooltip.base.css.js.map +1 -1
- package/components/tooltip/tooltip.d.ts +2 -0
- package/components/tooltip/tooltip.js +10 -2
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.js +1 -5
- package/components/tree/tree-item.js.map +1 -1
- package/custom-elements.json +2000 -985
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +2 -2
- package/components/common/i18n/calendar.resources.js +0 -17
- package/components/common/i18n/calendar.resources.js.map +0 -1
- package/components/common/i18n/chat.resources.js.map +0 -1
- package/components/common/i18n/date-range-picker.resources.js +0 -12
- package/components/common/i18n/date-range-picker.resources.js.map +0 -1
- package/components/common/localization/validation-en.d.ts +0 -13
- package/components/common/localization/validation-en.js +0 -13
- package/components/common/localization/validation-en.js.map +0 -1
- /package/components/common/i18n/{calendar.resources.d.ts → EN/calendar.resources.d.ts} +0 -0
- /package/components/common/i18n/{chat.resources.d.ts → EN/chat.resources.d.ts} +0 -0
- /package/components/common/i18n/{chat.resources.js → EN/chat.resources.js} +0 -0
- /package/components/common/i18n/{date-range-picker.resources.d.ts → EN/date-range-picker.resources.d.ts} +0 -0
|
@@ -5,15 +5,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var IgcComboComponent_1;
|
|
8
|
+
import { ComboResourceStringsEN, } from 'igniteui-i18n-core';
|
|
8
9
|
import { html, LitElement, nothing } from 'lit';
|
|
9
|
-
import { property,
|
|
10
|
+
import { property, queryAssignedElements, state } from 'lit/decorators.js';
|
|
10
11
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
13
|
import { addThemingController } from '../../theming/theming-controller.js';
|
|
12
14
|
import { addRootClickController } from '../common/controllers/root-click.js';
|
|
13
15
|
import { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';
|
|
14
16
|
import { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';
|
|
15
17
|
import { watch } from '../common/decorators/watch.js';
|
|
16
18
|
import { registerComponent } from '../common/definitions/register.js';
|
|
19
|
+
import { addI18nController } from '../common/i18n/i18n-controller.js';
|
|
17
20
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
18
21
|
import { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';
|
|
19
22
|
import { createFormValueState } from '../common/mixins/forms/form-value.js';
|
|
@@ -27,7 +30,7 @@ import IgcComboHeaderComponent from './combo-header.js';
|
|
|
27
30
|
import IgcComboItemComponent from './combo-item.js';
|
|
28
31
|
import IgcComboListComponent from './combo-list.js';
|
|
29
32
|
import { DataController } from './controllers/data.js';
|
|
30
|
-
import {
|
|
33
|
+
import { ComboNavigationController } from './controllers/navigation.js';
|
|
31
34
|
import { SelectionController } from './controllers/selection.js';
|
|
32
35
|
import { styles } from './themes/combo.base.css.js';
|
|
33
36
|
import { styles as shared } from './themes/shared/combo.common.css.js';
|
|
@@ -71,6 +74,26 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
71
74
|
get singleSelect() {
|
|
72
75
|
return this._singleSelect;
|
|
73
76
|
}
|
|
77
|
+
set locale(value) {
|
|
78
|
+
this._i18nController.locale = value;
|
|
79
|
+
}
|
|
80
|
+
get locale() {
|
|
81
|
+
return this._i18nController.locale;
|
|
82
|
+
}
|
|
83
|
+
set placeholderSearch(value) {
|
|
84
|
+
this._placeholderSearch = value;
|
|
85
|
+
}
|
|
86
|
+
get placeholderSearch() {
|
|
87
|
+
return (this._placeholderSearch ??
|
|
88
|
+
this.resourceStrings.combo_filter_search_placeholder ??
|
|
89
|
+
'Search');
|
|
90
|
+
}
|
|
91
|
+
set resourceStrings(value) {
|
|
92
|
+
this._i18nController.resourceStrings = value;
|
|
93
|
+
}
|
|
94
|
+
get resourceStrings() {
|
|
95
|
+
return this._i18nController.resourceStrings;
|
|
96
|
+
}
|
|
74
97
|
set valueKey(value) {
|
|
75
98
|
this._valueKey = value;
|
|
76
99
|
this._displayKey = this._displayKey ?? this._valueKey;
|
|
@@ -143,6 +166,9 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
143
166
|
}
|
|
144
167
|
constructor() {
|
|
145
168
|
super();
|
|
169
|
+
this._inputRef = createRef();
|
|
170
|
+
this._searchRef = createRef();
|
|
171
|
+
this._listRef = createRef();
|
|
146
172
|
this._rootClickController = addRootClickController(this, {
|
|
147
173
|
onHide: async () => {
|
|
148
174
|
if (!this.handleClosing()) {
|
|
@@ -153,6 +179,9 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
153
179
|
this.emitEvent('igcClosed');
|
|
154
180
|
},
|
|
155
181
|
});
|
|
182
|
+
this._i18nController = addI18nController(this, {
|
|
183
|
+
defaultEN: ComboResourceStringsEN,
|
|
184
|
+
});
|
|
156
185
|
this._formValue = createFormValueState(this, {
|
|
157
186
|
initialValue: [],
|
|
158
187
|
transformers: {
|
|
@@ -172,12 +201,16 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
172
201
|
this._displayValue = '';
|
|
173
202
|
this._state = new DataController(this);
|
|
174
203
|
this._selection = new SelectionController(this, this._state);
|
|
175
|
-
this._navigation = new
|
|
204
|
+
this._navigation = new ComboNavigationController(this, this._state, {
|
|
205
|
+
input: this._inputRef,
|
|
206
|
+
search: this._searchRef,
|
|
207
|
+
list: this._listRef,
|
|
208
|
+
});
|
|
176
209
|
this.outlined = false;
|
|
177
210
|
this.autofocusList = false;
|
|
178
|
-
this.placeholderSearch = 'Search';
|
|
179
211
|
this.open = false;
|
|
180
212
|
this.caseSensitiveIcon = false;
|
|
213
|
+
this.disableClear = false;
|
|
181
214
|
this.itemTemplate = ({ item }) => html `${this.displayKey ? item[this.displayKey] : item}`;
|
|
182
215
|
this.groupHeaderTemplate = ({ item }) => html `${this.groupKey && item[this.groupKey]}`;
|
|
183
216
|
this.itemRenderer = (item, index) => {
|
|
@@ -216,7 +249,6 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
216
249
|
addThemingController(this, all);
|
|
217
250
|
addSafeEventListener(this, 'blur', this._handleBlur);
|
|
218
251
|
addSafeEventListener(this, 'focusin', this._handleFocusIn);
|
|
219
|
-
this.addEventListener('keydown', this._navigation.navigateHost.bind(this._navigation));
|
|
220
252
|
}
|
|
221
253
|
async firstUpdated() {
|
|
222
254
|
await this.updateComplete;
|
|
@@ -265,14 +297,14 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
265
297
|
this._setFormValue();
|
|
266
298
|
if (!initial) {
|
|
267
299
|
this._validate();
|
|
268
|
-
this.
|
|
300
|
+
this._listRef.value.requestUpdate();
|
|
269
301
|
}
|
|
270
302
|
}
|
|
271
303
|
focus(options) {
|
|
272
|
-
this.
|
|
304
|
+
this._inputRef.value.focus(options);
|
|
273
305
|
}
|
|
274
306
|
blur() {
|
|
275
|
-
this.
|
|
307
|
+
this._inputRef.value.blur();
|
|
276
308
|
}
|
|
277
309
|
get selection() {
|
|
278
310
|
return this._selection.asArray;
|
|
@@ -292,7 +324,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
292
324
|
await this.updateComplete;
|
|
293
325
|
const matchIndex = this._state.dataState.findIndex((i) => !i.header);
|
|
294
326
|
this._navigation.active = detail ? matchIndex : -1;
|
|
295
|
-
this.
|
|
327
|
+
this._listRef.value.requestUpdate();
|
|
296
328
|
this.clearSingleSelection();
|
|
297
329
|
}
|
|
298
330
|
_handleFocusIn() {
|
|
@@ -324,10 +356,10 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
324
356
|
this.emitEvent('igcOpened');
|
|
325
357
|
}
|
|
326
358
|
if (!this.singleSelect) {
|
|
327
|
-
this.
|
|
359
|
+
this._listRef.value.focus();
|
|
328
360
|
}
|
|
329
361
|
if (!this.autofocusList) {
|
|
330
|
-
this.
|
|
362
|
+
this._searchRef.value.focus();
|
|
331
363
|
}
|
|
332
364
|
return true;
|
|
333
365
|
}
|
|
@@ -360,12 +392,6 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
360
392
|
const id = this.id ? `${this.id}-item-${position}` : `item-${position}`;
|
|
361
393
|
return { id, position };
|
|
362
394
|
}
|
|
363
|
-
listKeydownHandler(event) {
|
|
364
|
-
const target = findElementFromEventPath(IgcComboListComponent.tagName, event);
|
|
365
|
-
if (target) {
|
|
366
|
-
this._navigation.navigateList(event, target);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
395
|
itemClickHandler(event) {
|
|
370
396
|
this._setTouchedState();
|
|
371
397
|
const target = findElementFromEventPath(IgcComboItemComponent.tagName, event);
|
|
@@ -374,11 +400,11 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
374
400
|
}
|
|
375
401
|
this.toggleSelect(target.index);
|
|
376
402
|
if (this.singleSelect) {
|
|
377
|
-
this.
|
|
403
|
+
this._inputRef.value.focus();
|
|
378
404
|
this._hide();
|
|
379
405
|
}
|
|
380
406
|
else {
|
|
381
|
-
this.
|
|
407
|
+
this._searchRef.value.focus();
|
|
382
408
|
}
|
|
383
409
|
}
|
|
384
410
|
toggleSelect(index) {
|
|
@@ -393,6 +419,16 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
393
419
|
this._navigation.active = index;
|
|
394
420
|
this.updateValue();
|
|
395
421
|
}
|
|
422
|
+
clearSelection() {
|
|
423
|
+
if (this.singleSelect) {
|
|
424
|
+
this.resetSearchTerm();
|
|
425
|
+
this.clearSingleSelection();
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
this._selection.deselect([], true);
|
|
429
|
+
}
|
|
430
|
+
this.updateValue();
|
|
431
|
+
}
|
|
396
432
|
clearSingleSelection() {
|
|
397
433
|
const _selection = this._selection.asArray;
|
|
398
434
|
const selection = first(_selection);
|
|
@@ -404,23 +440,9 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
404
440
|
}
|
|
405
441
|
handleClearIconClick(e) {
|
|
406
442
|
e.stopPropagation();
|
|
407
|
-
|
|
408
|
-
this.resetSearchTerm();
|
|
409
|
-
this.clearSingleSelection();
|
|
410
|
-
}
|
|
411
|
-
else {
|
|
412
|
-
this._selection.deselect([], true);
|
|
413
|
-
}
|
|
414
|
-
this.updateValue();
|
|
443
|
+
this.clearSelection();
|
|
415
444
|
this._navigation.active = -1;
|
|
416
445
|
}
|
|
417
|
-
handleMainInputKeydown(e) {
|
|
418
|
-
this._setTouchedState();
|
|
419
|
-
this._navigation.navigateMainInput(e, this._list);
|
|
420
|
-
}
|
|
421
|
-
handleSearchInputKeydown(e) {
|
|
422
|
-
this._navigation.navigateSearchInput(e, this._list);
|
|
423
|
-
}
|
|
424
446
|
toggleCaseSensitivity() {
|
|
425
447
|
this.filteringOptions = {
|
|
426
448
|
caseSensitive: !this.filteringOptions.caseSensitive,
|
|
@@ -454,7 +476,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
454
476
|
slot="suffix"
|
|
455
477
|
part="clear-icon"
|
|
456
478
|
@click=${this.handleClearIconClick}
|
|
457
|
-
?hidden=${this._selection.isEmpty}
|
|
479
|
+
?hidden=${this.disableClear || this._selection.isEmpty}
|
|
458
480
|
>
|
|
459
481
|
<slot name="clear-icon">
|
|
460
482
|
<igc-icon
|
|
@@ -469,6 +491,7 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
469
491
|
renderMainInput() {
|
|
470
492
|
return html `
|
|
471
493
|
<igc-input
|
|
494
|
+
${ref(this._inputRef)}
|
|
472
495
|
id="target"
|
|
473
496
|
slot="anchor"
|
|
474
497
|
role="combobox"
|
|
@@ -483,7 +506,6 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
483
506
|
label=${ifDefined(this.label)}
|
|
484
507
|
@igcChange=${this._stopPropagation}
|
|
485
508
|
@igcInput=${this.handleMainInput}
|
|
486
|
-
@keydown=${this.handleMainInputKeydown}
|
|
487
509
|
.value=${this._displayValue}
|
|
488
510
|
.disabled=${this.disabled}
|
|
489
511
|
.required=${this.required}
|
|
@@ -510,12 +532,12 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
510
532
|
?hidden=${this.disableFiltering || this.singleSelect}
|
|
511
533
|
>
|
|
512
534
|
<igc-input
|
|
535
|
+
${ref(this._searchRef)}
|
|
513
536
|
.value=${this._state.searchTerm}
|
|
514
537
|
part="search-input"
|
|
515
538
|
placeholder=${this.placeholderSearch}
|
|
516
539
|
exportparts="input: search-input"
|
|
517
540
|
@igcInput=${this.handleSearchInput}
|
|
518
|
-
@keydown=${this.handleSearchInputKeydown}
|
|
519
541
|
>
|
|
520
542
|
<igc-icon
|
|
521
543
|
slot=${this.caseSensitiveIcon && 'suffix'}
|
|
@@ -534,22 +556,19 @@ let IgcComboComponent = class IgcComboComponent extends FormAssociatedRequiredMi
|
|
|
534
556
|
renderEmptyTemplate() {
|
|
535
557
|
return html `
|
|
536
558
|
<div part="empty" ?hidden=${!isEmpty(this._state.dataState)}>
|
|
537
|
-
<slot name="empty"
|
|
559
|
+
<slot name="empty">${this.resourceStrings.combo_empty_message}</slot>
|
|
538
560
|
</div>
|
|
539
561
|
`;
|
|
540
562
|
}
|
|
541
563
|
renderList() {
|
|
542
564
|
return html `
|
|
543
|
-
<div
|
|
544
|
-
.inert=${!this.open}
|
|
545
|
-
@keydown=${this.listKeydownHandler}
|
|
546
|
-
part="list-wrapper"
|
|
547
|
-
>
|
|
565
|
+
<div .inert=${!this.open} part="list-wrapper">
|
|
548
566
|
${this.renderSearchInput()}
|
|
549
567
|
<div part="header">
|
|
550
568
|
<slot name="header"></slot>
|
|
551
569
|
</div>
|
|
552
570
|
<igc-combo-list
|
|
571
|
+
${ref(this._listRef)}
|
|
553
572
|
aria-multiselectable=${!this.singleSelect}
|
|
554
573
|
id="dropdown"
|
|
555
574
|
part="list"
|
|
@@ -597,15 +616,6 @@ __decorate([
|
|
|
597
616
|
__decorate([
|
|
598
617
|
queryAssignedElements({ slot: 'prefix' })
|
|
599
618
|
], IgcComboComponent.prototype, "inputPrefix", void 0);
|
|
600
|
-
__decorate([
|
|
601
|
-
query('[part="search-input"]')
|
|
602
|
-
], IgcComboComponent.prototype, "_searchInput", void 0);
|
|
603
|
-
__decorate([
|
|
604
|
-
query('#target', true)
|
|
605
|
-
], IgcComboComponent.prototype, "_input", void 0);
|
|
606
|
-
__decorate([
|
|
607
|
-
query(IgcComboListComponent.tagName, true)
|
|
608
|
-
], IgcComboComponent.prototype, "_list", void 0);
|
|
609
619
|
__decorate([
|
|
610
620
|
property({ attribute: false })
|
|
611
621
|
], IgcComboComponent.prototype, "data", null);
|
|
@@ -621,6 +631,9 @@ __decorate([
|
|
|
621
631
|
__decorate([
|
|
622
632
|
property({ type: Boolean, attribute: 'autofocus-list' })
|
|
623
633
|
], IgcComboComponent.prototype, "autofocusList", void 0);
|
|
634
|
+
__decorate([
|
|
635
|
+
property()
|
|
636
|
+
], IgcComboComponent.prototype, "locale", null);
|
|
624
637
|
__decorate([
|
|
625
638
|
property()
|
|
626
639
|
], IgcComboComponent.prototype, "label", void 0);
|
|
@@ -629,10 +642,13 @@ __decorate([
|
|
|
629
642
|
], IgcComboComponent.prototype, "placeholder", void 0);
|
|
630
643
|
__decorate([
|
|
631
644
|
property({ attribute: 'placeholder-search' })
|
|
632
|
-
], IgcComboComponent.prototype, "placeholderSearch",
|
|
645
|
+
], IgcComboComponent.prototype, "placeholderSearch", null);
|
|
633
646
|
__decorate([
|
|
634
647
|
property({ type: Boolean, reflect: true })
|
|
635
648
|
], IgcComboComponent.prototype, "open", void 0);
|
|
649
|
+
__decorate([
|
|
650
|
+
property({ attribute: false })
|
|
651
|
+
], IgcComboComponent.prototype, "resourceStrings", null);
|
|
636
652
|
__decorate([
|
|
637
653
|
property({ attribute: 'value-key' })
|
|
638
654
|
], IgcComboComponent.prototype, "valueKey", null);
|
|
@@ -654,6 +670,9 @@ __decorate([
|
|
|
654
670
|
__decorate([
|
|
655
671
|
property({ type: Boolean, attribute: 'disable-filtering' })
|
|
656
672
|
], IgcComboComponent.prototype, "disableFiltering", null);
|
|
673
|
+
__decorate([
|
|
674
|
+
property({ type: Boolean, attribute: 'disable-clear' })
|
|
675
|
+
], IgcComboComponent.prototype, "disableClear", void 0);
|
|
657
676
|
__decorate([
|
|
658
677
|
property({ attribute: false })
|
|
659
678
|
], IgcComboComponent.prototype, "itemTemplate", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo.js","sourceRoot":"","sources":["../../../src/components/combo/combo.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,O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;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;yDAI3D;AAYM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDAE2B;AAQnD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8DAEiB;AAiChD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAOzB;AAkBS;IADT,KAAK,CAAC,MAAM,CAAC;8DAGb;AA3WkB,iBAAiB;IAFrC,4BAA4B,CAAC,qCAAqC,CAAC;IACnE,oBAAoB;GACA,iBAAiB,CAo5BrC;eAp5BoB,iBAAiB","sourcesContent":["import { html, LitElement, nothing, type TemplateResult } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { addRootClickController } from '../common/controllers/root-click.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport {\n addSafeEventListener,\n asArray,\n equal,\n findElementFromEventPath,\n first,\n isEmpty,\n} from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport IgcComboHeaderComponent from './combo-header.js';\nimport IgcComboItemComponent from './combo-item.js';\nimport IgcComboListComponent from './combo-list.js';\nimport { DataController } from './controllers/data.js';\nimport { NavigationController } from './controllers/navigation.js';\nimport { SelectionController } from './controllers/selection.js';\nimport { styles } from './themes/combo.base.css.js';\nimport { styles as shared } from './themes/shared/combo.common.css.js';\nimport { all } from './themes/themes.js';\nimport type {\n ComboItemTemplate,\n ComboRecord,\n ComboRenderFunction,\n ComboValue,\n FilteringOptions,\n GroupingDirection,\n IgcComboComponentEventMap,\n Item,\n Keys,\n} from './types.js';\nimport { comboValidators } from './validators.js';\n\n/* blazorSupportsVisualChildren */\n/**\n * The Combo component is similar to the Select component in that it provides a list of options from which the user can make a selection.\n * In contrast to the Select component, the Combo component displays all options in a virtualized list of items,\n * meaning the combo box can simultaneously show thousands of options, where one or more options can be selected.\n * Additionally, users can create custom item templates, allowing for robust data visualization.\n * The Combo component features case-sensitive filtering, grouping, complex data binding, dynamic addition of values and more.\n *\n * @element igc-combo\n *\n * @slot prefix - Renders content before the input of the combo.\n * @slot suffix - Renders content after the input of the combo.\n * @slot header - Renders a container before the list of options of the combo.\n * @slot footer - Renders a container after the list of options of the combo.\n * @slot helper-text - Renders content below the input of the combo.\n * @slot toggle-icon - Renders content inside the suffix container of the combo.\n * @slot clear-icon - Renders content inside the suffix container of the combo.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's selection has changed.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart label - The encapsulated text label of the combo.\n * @csspart input - The main input field of the combo.\n * @csspart native-input - The native input of the main input field of the combo.\n * @csspart prefix - The prefix wrapper of the combo.\n * @csspart suffix - The suffix wrapper of the combo.\n * @csspart toggle-icon - The toggle icon wrapper of the combo.\n * @csspart clear-icon - The clear icon wrapper of the combo.\n * @csspart case-icon - The case icon wrapper of the combo.\n * @csspart helper-text - The helper text wrapper of the combo.\n * @csspart search-input - The search input field of the combo.\n * @csspart list-wrapper - The list of options wrapper of the combo.\n * @csspart list - The list of options box of the combo.\n * @csspart item - Represents each item in the list of options of the combo.\n * @csspart group-header - Represents each header in the list of options of the combo.\n * @csspart active - Appended to the item parts list when the item is active of the combo.\n * @csspart selected - Appended to the item parts list when the item is selected of the combo.\n * @csspart checkbox - Represents each checkbox of each list item of the combo.\n * @csspart checkbox-indicator - Represents the checkbox indicator of each list item of the combo.\n * @csspart checked - Appended to checkbox parts list when checkbox is checked in the combo.\n * @csspart header - The container holding the header content of the combo.\n * @csspart footer - The container holding the footer content of the combo.\n * @csspart empty - The container holding the empty content of the combo.\n */\n@blazorAdditionalDependencies('IgcIconComponent, IgcInputComponent')\n@blazorIndirectRender\nexport default class IgcComboComponent<\n T extends object = any,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcComboComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-combo';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcComboComponent,\n IgcIconComponent,\n IgcComboListComponent,\n IgcComboItemComponent,\n IgcComboHeaderComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent\n );\n }\n\n protected override get __validators() {\n return comboValidators;\n }\n\n private readonly _rootClickController = addRootClickController(this, {\n onHide: async () => {\n if (!this.handleClosing()) {\n return;\n }\n this.open = false;\n\n await this.updateComplete;\n this.emitEvent('igcClosed');\n },\n });\n\n protected override readonly _formValue = createFormValueState<\n ComboValue<T>[]\n >(this, {\n initialValue: [],\n transformers: {\n setValue: asArray,\n setDefaultValue: asArray,\n },\n });\n private _data: T[] = [];\n\n private _valueKey?: Keys<T>;\n private _displayKey?: Keys<T>;\n private _groupKey?: Keys<T>;\n\n private _disableFiltering = false;\n private _singleSelect = false;\n\n private _groupSorting: GroupingDirection = 'asc';\n private _filteringOptions: FilteringOptions<T> = {\n filterKey: this.displayKey,\n caseSensitive: false,\n matchDiacritics: false,\n };\n\n @state()\n private _activeDescendant!: string;\n\n @state()\n private _displayValue = '';\n\n protected _state = new DataController<T>(this);\n protected _selection = new SelectionController<T>(this, this._state);\n protected _navigation = new NavigationController<T>(this, this._state);\n\n @queryAssignedElements({ slot: 'suffix' })\n protected inputSuffix!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'prefix' })\n protected inputPrefix!: HTMLElement[];\n\n @query('[part=\"search-input\"]')\n protected _searchInput!: IgcInputComponent;\n\n @query('#target', true)\n private _input!: IgcInputComponent;\n\n @query(IgcComboListComponent.tagName, true)\n private _list!: IgcComboListComponent;\n\n /** The data source used to generate the list of options. */\n /* treatAsRef */\n @property({ attribute: false })\n public set data(value: T[]) {\n if (this._data === value) {\n return;\n }\n this._data = asArray(value);\n const pristine = this._pristine;\n this.value = asArray(this.value);\n this._pristine = pristine;\n this._state.runPipeline();\n }\n\n public get data() {\n return this._data;\n }\n\n /**\n * The outlined attribute of the control.\n * @attr outlined\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * Enables single selection mode and moves item filtering to the main input.\n * @attr single-select\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'single-select' })\n public set singleSelect(value: boolean) {\n if (this._singleSelect === Boolean(value)) {\n return;\n }\n\n this._singleSelect = Boolean(value);\n this._selection.clear();\n if (this.hasUpdated) {\n this.updateValue();\n this.resetSearchTerm();\n this._navigation.active = -1;\n }\n }\n\n public get singleSelect(): boolean {\n return this._singleSelect;\n }\n\n /**\n * The autofocus attribute of the control.\n * @attr autofocus\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * Focuses the list of options when the menu opens.\n * @attr autofocus-list\n */\n @property({ type: Boolean, attribute: 'autofocus-list' })\n public autofocusList = false;\n\n /**\n * The label attribute of the control.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The placeholder attribute of the control.\n * @attr placeholder\n */\n @property()\n public placeholder!: string;\n\n /**\n * The placeholder attribute of the search input.\n * @attr placeholder-search\n */\n @property({ attribute: 'placeholder-search' })\n public placeholderSearch = 'Search';\n\n /**\n * Sets the open state of the component.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The key in the data source used when selecting items.\n * @attr value-key\n */\n @property({ attribute: 'value-key' })\n public set valueKey(value: Keys<T> | undefined) {\n this._valueKey = value;\n this._displayKey = this._displayKey ?? this._valueKey;\n }\n\n public get valueKey() {\n return this._valueKey;\n }\n\n /**\n * The key in the data source used to display items in the list.\n * @attr display-key\n */\n @property({ attribute: 'display-key' })\n public set displayKey(value: Keys<T> | undefined) {\n this._displayKey = value;\n if (!this.filteringOptions.filterKey) {\n this.filteringOptions = { filterKey: this.displayKey };\n }\n }\n\n public get displayKey() {\n return this._displayKey ?? this._valueKey;\n }\n\n /**\n * The key in the data source used to group items in the list.\n * @attr group-key\n */\n @property({ attribute: 'group-key' })\n public set groupKey(value: Keys<T> | undefined) {\n if (this._groupKey !== value) {\n this._groupKey = value;\n this._state.runPipeline();\n }\n }\n\n public get groupKey() {\n return this._groupKey;\n }\n\n /**\n * Sorts the items in each group by ascending or descending order.\n * @attr group-sorting\n * @default asc\n * @type {\"asc\" | \"desc\" | \"none\"}\n */\n @property({ attribute: 'group-sorting' })\n public set groupSorting(value: GroupingDirection) {\n if (this._groupSorting !== value) {\n this._groupSorting = value;\n this._state.runPipeline();\n }\n }\n\n public get groupSorting() {\n return this._groupSorting;\n }\n\n /**\n * An object that configures the filtering of the combo.\n * @attr filtering-options\n * @type {FilteringOptions<T>}\n * @param filterKey - The key in the data source used when filtering the list of options.\n * @param caseSensitive - Determines whether the filtering operation should be case sensitive.\n * @param matchDiacritics -If true, the filter distinguishes between accented letters and their base letters.\n */\n @property({ type: Object, attribute: 'filtering-options' })\n public set filteringOptions(value: Partial<FilteringOptions<T>>) {\n const options = { ...this._filteringOptions, ...value };\n if (!equal(options, this._filteringOptions)) {\n this._filteringOptions = options;\n this._state.runPipeline();\n }\n }\n\n public get filteringOptions(): FilteringOptions<T> {\n return this._filteringOptions;\n }\n\n /**\n * Enables the case sensitive search icon in the filtering input.\n * @attr case-sensitive-icon\n */\n @property({ type: Boolean, attribute: 'case-sensitive-icon' })\n public caseSensitiveIcon = false;\n\n /**\n * Disables the filtering of the list of options.\n * @attr disable-filtering\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-filtering' })\n public set disableFiltering(value: boolean) {\n this._disableFiltering = value;\n this.resetSearchTerm();\n }\n\n public get disableFiltering(): boolean {\n return this._disableFiltering;\n }\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo item.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public itemTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.displayKey ? item[this.displayKey] : item}`;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo group header.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public groupHeaderTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.groupKey && item[this.groupKey]}`;\n\n /**\n * Sets the value (selected items). The passed value must be a valid JSON array.\n * If the data source is an array of complex objects, the `valueKey` attribute must be set.\n * Note that when `displayKey` is not explicitly set, it will fall back to the value of `valueKey`.\n *\n * @attr value\n *\n * @example\n * ```tsx\n * <igc-combo\n * .data=${[\n * {\n * id: 'BG01',\n * name: 'Sofia'\n * },\n * {\n * id: 'BG02',\n * name: 'Plovdiv'\n * }\n * ]}\n * display-key='name'\n * value-key='id'\n * value='[\"BG01\", \"BG02\"]'>\n * </igc-combo>\n * ```\n */\n /* blazorPrimitiveValue */\n /* blazorByValueArray */\n /* blazorGenericType */\n /* @tsTwoWayProperty (true, \"Change\", \"Detail.NewValue\", false) */\n @property({ type: Array })\n public set value(items: ComboValue<T>[]) {\n this._formValue.value = items;\n if (this.hasUpdated) {\n this._updateSelection();\n this.updateValue();\n }\n }\n\n /**\n * Returns the current selection as a list of comma separated values,\n * represented by the value key, when provided.\n */\n public get value(): ComboValue<T>[] {\n return this._formValue.value;\n }\n\n protected _updateSelection() {\n this._selection.deselect();\n if (!isEmpty(this.value)) {\n this._selection.select(this.value);\n }\n }\n\n @watch('open')\n protected toggleDirectiveChange() {\n this._rootClickController.update();\n }\n\n constructor() {\n super();\n\n addThemingController(this, all);\n addSafeEventListener(this, 'blur', this._handleBlur);\n addSafeEventListener(this, 'focusin', this._handleFocusIn);\n\n // TODO\n this.addEventListener(\n 'keydown',\n this._navigation.navigateHost.bind(this._navigation)\n );\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n\n this._updateSelection();\n this.updateValue(this.hasUpdated);\n this._pristine = true;\n this._state.runPipeline();\n }\n\n protected override _restoreDefaultValue(): void {\n this._formValue.value = this._formValue.defaultValue;\n this._updateSelection();\n this.updateValue(true);\n this._validate();\n }\n\n protected override _setDefaultValue(current: string | null): void {\n this.defaultValue = JSON.parse(current ?? '[]');\n }\n\n protected override _setFormValue(): void {\n if (isEmpty(this.value)) {\n super._setFormValue(null);\n return;\n }\n\n if (this.singleSelect) {\n super._setFormValue(`${first(this.value)}`);\n return;\n }\n\n if (this.name) {\n const value = new FormData();\n for (const item of this.value) {\n value.append(this.name, `${item}`);\n }\n super._setFormValue(value);\n }\n }\n\n protected resetSearchTerm() {\n this._state.searchTerm = '';\n }\n\n protected updateValue(initial = false) {\n if (isEmpty(this.data)) {\n return;\n }\n this._formValue.value = this._selection.getSelectedValuesByKey(\n this.valueKey\n );\n this._displayValue = this._selection\n .getSelectedValuesByKey(this.displayKey)\n .join(', ');\n\n this._setFormValue();\n\n if (!initial) {\n this._validate();\n this._list.requestUpdate();\n }\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions) {\n this._input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur() {\n this._input.blur();\n }\n\n /**\n * Returns the current selection as an array of objects as provided in the `data` source.\n */\n public get selection(): T[] {\n return this._selection.asArray;\n }\n\n /**\n * Selects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be selected.\n * @param { Item<T> | Items<T> } items - One or more items to be selected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Select one item at a time by reference when valueKey is not specified.\n * combo.select(combo.data[0]);\n *\n * // Select multiple items at a time by reference when valueKey is not specified.\n * combo.select([combo.data[0], combo.data[1]]);\n *\n * // Select one item at a time when valueKey is specified.\n * combo.select('BG01');\n *\n * // Select multiple items at a time when valueKey is specified.\n * combo.select(['BG01', 'BG02']);\n * ```\n */\n public select(items?: Item<T> | Item<T>[]) {\n this._selection.select(items);\n this.updateValue();\n }\n\n /**\n * Deselects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be deselected.\n * @param { Item<T> | Items<T> } items - One or more items to be deselected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Deselect one item at a time by reference when valueKey is not specified.\n * combo.deselect(combo.data[0]);\n *\n * // Deselect multiple items at a time by reference when valueKey is not specified.\n * combo.deselect([combo.data[0], combo.data[1]]);\n *\n * // Deselect one item at a time when valueKey is specified.\n * combo.deselect('BG01');\n *\n * // Deselect multiple items at a time when valueKey is specified.\n * combo.deselect(['BG01', 'BG02']);\n * ```\n */\n public deselect(items?: Item<T> | Item<T>[]) {\n this._selection.deselect(items);\n this.updateValue();\n }\n\n protected async handleMainInput({ detail }: CustomEvent<string>) {\n this._setTouchedState();\n this._show();\n this._state.searchTerm = detail;\n\n // wait for the dataState to update after filtering\n await this.updateComplete;\n\n const matchIndex = this._state.dataState.findIndex((i) => !i.header);\n this._navigation.active = detail ? matchIndex : -1;\n\n // update the list after changing the active item\n this._list.requestUpdate();\n\n // clear the selection upon typing\n this.clearSingleSelection();\n }\n\n protected _handleFocusIn() {\n this._setTouchedState();\n }\n\n protected override _handleBlur() {\n if (this._selection.isEmpty) {\n this._displayValue = '';\n this.resetSearchTerm();\n }\n super._handleBlur();\n }\n\n protected handleSearchInput({ detail }: CustomEvent<string>) {\n this._state.searchTerm = detail;\n }\n\n protected handleOpening() {\n return this.emitEvent('igcOpening', { cancelable: true });\n }\n\n protected handleClosing(): boolean {\n return this.emitEvent('igcClosing', { cancelable: true });\n }\n\n protected async _show(emitEvent = true) {\n if (this.open || (emitEvent && !this.handleOpening())) {\n return false;\n }\n\n this.open = true;\n await this.updateComplete;\n\n if (emitEvent) {\n this.emitEvent('igcOpened');\n }\n\n if (!this.singleSelect) {\n this._list.focus();\n }\n\n if (!this.autofocusList) {\n this._searchInput.focus();\n }\n\n return true;\n }\n\n /** Shows the list of options. */\n public async show(): Promise<boolean> {\n return await this._show(false);\n }\n\n protected async _hide(emitEvent = true) {\n if (!this.open || (emitEvent && !this.handleClosing())) {\n return false;\n }\n\n this.open = false;\n await this.updateComplete;\n\n if (emitEvent) {\n this.emitEvent('igcClosed');\n }\n this._navigation.active = -1;\n return true;\n }\n\n /** Hides the list of options. */\n public async hide(): Promise<boolean> {\n return await this._hide(false);\n }\n\n protected _toggle(emit = true) {\n return this.open ? this._hide(emit) : this._show(emit);\n }\n\n /** Toggles the list of options. */\n public async toggle(): Promise<boolean> {\n return await this._toggle(false);\n }\n\n private _getActiveDescendantId(index: number) {\n const position = index + 1;\n const id = this.id ? `${this.id}-item-${position}` : `item-${position}`;\n\n return { id, position };\n }\n\n protected itemRenderer: ComboRenderFunction<T> = (\n item: ComboRecord<T>,\n index: number\n ) => {\n if (!item) {\n return html`${nothing}`;\n }\n\n if (this.groupKey && item.header) {\n return html`\n <igc-combo-header part=\"group-header\">\n ${this.groupHeaderTemplate({ item: item.value })}\n </igc-combo-header>\n `;\n }\n\n const { id, position } = this._getActiveDescendantId(index);\n const active = this._navigation.active === index;\n const selected = this._selection.has(this.data.at(item.dataIndex));\n\n if (active) {\n this._activeDescendant = id;\n }\n\n return html`\n <igc-combo-item\n id=${id}\n part=${partMap({ item: true, selected, active })}\n aria-setsize=${this._state.dataState.length}\n aria-posinset=${position}\n exportparts=\"checkbox, checkbox-indicator, checked\"\n .index=${index}\n ?active=${active}\n ?selected=${selected}\n ?hide-checkbox=${this.singleSelect}\n >\n ${this.itemTemplate({ item: item.value })}\n </igc-combo-item>\n `;\n };\n\n protected listKeydownHandler(event: KeyboardEvent) {\n const target = findElementFromEventPath<IgcComboListComponent>(\n IgcComboListComponent.tagName,\n event\n );\n\n if (target) {\n this._navigation.navigateList(event, target);\n }\n }\n\n protected itemClickHandler(event: PointerEvent) {\n this._setTouchedState();\n const target = findElementFromEventPath<IgcComboItemComponent>(\n IgcComboItemComponent.tagName,\n event\n );\n\n if (!target) {\n return;\n }\n\n this.toggleSelect(target.index);\n\n if (this.singleSelect) {\n this._input.focus();\n this._hide();\n } else {\n this._searchInput.focus();\n }\n }\n\n protected toggleSelect(index: number) {\n const { dataIndex } = this._state.dataState.at(index)!;\n\n this._selection.changeSelection(dataIndex);\n this._navigation.active = index;\n this.updateValue();\n }\n\n protected selectByIndex(index: number) {\n const { dataIndex } = this._state.dataState.at(index)!;\n\n this._selection.selectByIndex(dataIndex);\n this._navigation.active = index;\n this.updateValue();\n }\n\n protected clearSingleSelection() {\n const _selection = this._selection.asArray;\n const selection = first(_selection);\n\n if (selection) {\n const item = this.valueKey ? selection[this.valueKey] : selection;\n this._selection.deselect(item, !isEmpty(_selection));\n this._formValue.value = [];\n }\n }\n\n protected handleClearIconClick(e: PointerEvent) {\n e.stopPropagation();\n\n if (this.singleSelect) {\n this.resetSearchTerm();\n this.clearSingleSelection();\n } else {\n this._selection.deselect([], true);\n }\n\n this.updateValue();\n this._navigation.active = -1;\n }\n\n protected handleMainInputKeydown(e: KeyboardEvent) {\n this._setTouchedState();\n this._navigation.navigateMainInput(e, this._list);\n }\n\n protected handleSearchInputKeydown(e: KeyboardEvent) {\n this._navigation.navigateSearchInput(e, this._list);\n }\n\n protected toggleCaseSensitivity() {\n this.filteringOptions = {\n caseSensitive: !this.filteringOptions.caseSensitive,\n };\n }\n\n private _stopPropagation(e: Event) {\n e.stopPropagation();\n }\n\n private renderToggleIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=${partMap({\n 'toggle-icon': true,\n filled: !isEmpty(this.value),\n })}\n >\n <slot name=\"toggle-icon\">\n <igc-icon\n name=${this.open ? 'input_collapse' : 'input_expand'}\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private renderClearIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n @click=${this.handleClearIconClick}\n ?hidden=${this._selection.isEmpty}\n >\n <slot name=\"clear-icon\">\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private renderMainInput() {\n return html`\n <igc-input\n id=\"target\"\n slot=\"anchor\"\n role=\"combobox\"\n aria-controls=\"dropdown\"\n aria-owns=\"dropdown\"\n aria-expanded=${this.open}\n aria-describedby=\"combo-helper-text\"\n aria-disabled=${this.disabled}\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n @click=${this._toggle}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n @igcChange=${this._stopPropagation}\n @igcInput=${this.handleMainInput}\n @keydown=${this.handleMainInputKeydown}\n .value=${this._displayValue}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n .autofocus=${this.autofocus}\n ?readonly=${!this.singleSelect}\n >\n <span slot=${!isEmpty(this.inputPrefix) && 'prefix'}>\n <slot name=\"prefix\"></slot>\n </span>\n ${this.renderClearIcon()}\n <span slot=${!isEmpty(this.inputSuffix) && 'suffix'}>\n <slot name=\"suffix\"></slot>\n </span>\n ${this.renderToggleIcon()}\n </igc-input>\n `;\n }\n\n private renderSearchInput() {\n return html`\n <div\n part=\"filter-input\"\n ?hidden=${this.disableFiltering || this.singleSelect}\n >\n <igc-input\n .value=${this._state.searchTerm}\n part=\"search-input\"\n placeholder=${this.placeholderSearch}\n exportparts=\"input: search-input\"\n @igcInput=${this.handleSearchInput}\n @keydown=${this.handleSearchInputKeydown}\n >\n <igc-icon\n slot=${this.caseSensitiveIcon && 'suffix'}\n name=\"case_sensitive\"\n collection=\"default\"\n part=${partMap({\n 'case-icon': true,\n active: this.filteringOptions.caseSensitive ?? false,\n })}\n @click=${this.toggleCaseSensitivity}\n ></igc-icon>\n </igc-input>\n </div>\n `;\n }\n\n private renderEmptyTemplate() {\n return html`\n <div part=\"empty\" ?hidden=${!isEmpty(this._state.dataState)}>\n <slot name=\"empty\">The list is empty</slot>\n </div>\n `;\n }\n\n private renderList() {\n return html`\n <div\n .inert=${!this.open}\n @keydown=${this.listKeydownHandler}\n part=\"list-wrapper\"\n >\n ${this.renderSearchInput()}\n <div part=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <igc-combo-list\n aria-multiselectable=${!this.singleSelect}\n id=\"dropdown\"\n part=\"list\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-labelledby=\"target\"\n aria-activedescendant=${ifDefined(this._activeDescendant)}\n .items=${this._state.dataState}\n .renderItem=${this.itemRenderer}\n ?hidden=${isEmpty(this._state.dataState)}\n @click=${this.itemClickHandler}\n >\n </igc-combo-list>\n ${this.renderEmptyTemplate()}\n <div part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n private renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this, {\n id: 'combo-helper-text',\n hasHelperText: true,\n });\n }\n\n protected override render() {\n return html`\n <igc-popover ?open=${this.open} flip shift same-width>\n ${this.renderMainInput()} ${this.renderList()}\n </igc-popover>\n ${this.renderHelperText()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-combo': IgcComboComponent<object>;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"combo.js","sourceRoot":"","sources":["../../../src/components/combo/combo.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,sBAAsB,GAEvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,KAAK,EACL,wBAAwB,EACxB,KAAK,EACL,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,mBAAmB,CAAC;AAClD,OAA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AAC;yDAI3D;AAYM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAC5B;AAQrB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDAE2B;AAQnD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8DAEiB;AAiChD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAOzB;AAkBS;IADT,KAAK,CAAC,MAAM,CAAC;8DAGb;AApakB,iBAAiB;IAFrC,4BAA4B,CAAC,qCAAqC,CAAC;IACnE,oBAAoB;GACA,iBAAiB,CAm7BrC;eAn7BoB,iBAAiB","sourcesContent":["import {\n ComboResourceStringsEN,\n type IComboResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { property, queryAssignedElements, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\n\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { addRootClickController } from '../common/controllers/root-click.js';\nimport { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';\nimport { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { addI18nController } from '../common/i18n/i18n-controller.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport {\n addSafeEventListener,\n asArray,\n equal,\n findElementFromEventPath,\n first,\n isEmpty,\n} from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcInputComponent from '../input/input.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport IgcComboHeaderComponent from './combo-header.js';\nimport IgcComboItemComponent from './combo-item.js';\nimport IgcComboListComponent from './combo-list.js';\nimport { DataController } from './controllers/data.js';\nimport { ComboNavigationController } from './controllers/navigation.js';\nimport { SelectionController } from './controllers/selection.js';\nimport { styles } from './themes/combo.base.css.js';\nimport { styles as shared } from './themes/shared/combo.common.css.js';\nimport { all } from './themes/themes.js';\nimport type {\n ComboItemTemplate,\n ComboRecord,\n ComboRenderFunction,\n ComboValue,\n FilteringOptions,\n GroupingDirection,\n IgcComboComponentEventMap,\n Item,\n Keys,\n} from './types.js';\nimport { comboValidators } from './validators.js';\n\n/* blazorSupportsVisualChildren */\n/**\n * The Combo component is similar to the Select component in that it provides a list of options from which the user can make a selection.\n * In contrast to the Select component, the Combo component displays all options in a virtualized list of items,\n * meaning the combo box can simultaneously show thousands of options, where one or more options can be selected.\n * Additionally, users can create custom item templates, allowing for robust data visualization.\n * The Combo component features case-sensitive filtering, grouping, complex data binding, dynamic addition of values and more.\n *\n * @element igc-combo\n *\n * @slot prefix - Renders content before the input of the combo.\n * @slot suffix - Renders content after the input of the combo.\n * @slot header - Renders a container before the list of options of the combo.\n * @slot footer - Renders a container after the list of options of the combo.\n * @slot empty - Renders content when the combo dropdown list has no items/data.\n * @slot helper-text - Renders content below the input of the combo.\n * @slot toggle-icon - Renders content inside the suffix container of the combo.\n * @slot clear-icon - Renders content inside the suffix container of the combo.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's selection has changed.\n * @fires igcOpening - Emitted just before the list of options is opened.\n * @fires igcOpened - Emitted after the list of options is opened.\n * @fires igcClosing - Emitter just before the list of options is closed.\n * @fires igcClosed - Emitted after the list of options is closed.\n *\n * @csspart label - The encapsulated text label of the combo.\n * @csspart input - The main input field of the combo.\n * @csspart native-input - The native input of the main input field of the combo.\n * @csspart prefix - The prefix wrapper of the combo.\n * @csspart suffix - The suffix wrapper of the combo.\n * @csspart toggle-icon - The toggle icon wrapper of the combo.\n * @csspart clear-icon - The clear icon wrapper of the combo.\n * @csspart case-icon - The case icon wrapper of the combo.\n * @csspart helper-text - The helper text wrapper of the combo.\n * @csspart search-input - The search input field of the combo.\n * @csspart list-wrapper - The list of options wrapper of the combo.\n * @csspart list - The list of options box of the combo.\n * @csspart item - Represents each item in the list of options of the combo.\n * @csspart group-header - Represents each header in the list of options of the combo.\n * @csspart active - Appended to the item parts list when the item is active of the combo.\n * @csspart selected - Appended to the item parts list when the item is selected of the combo.\n * @csspart checkbox - Represents each checkbox of each list item of the combo.\n * @csspart checkbox-indicator - Represents the checkbox indicator of each list item of the combo.\n * @csspart checked - Appended to checkbox parts list when checkbox is checked in the combo.\n * @csspart header - The container holding the header content of the combo.\n * @csspart footer - The container holding the footer content of the combo.\n * @csspart empty - The container holding the empty content of the combo.\n */\n@blazorAdditionalDependencies('IgcIconComponent, IgcInputComponent')\n@blazorIndirectRender\nexport default class IgcComboComponent<\n T extends object = any,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcComboComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-combo';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(\n IgcComboComponent,\n IgcIconComponent,\n IgcComboListComponent,\n IgcComboItemComponent,\n IgcComboHeaderComponent,\n IgcInputComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent\n );\n }\n\n protected override get __validators() {\n return comboValidators;\n }\n\n /** The primary input of the combo component. */\n private _inputRef = createRef<IgcInputComponent>();\n\n /** The search input of the combo component. */\n private _searchRef = createRef<IgcInputComponent>();\n\n /** The combo virtualized dropdown list. */\n private _listRef = createRef<IgcComboListComponent>();\n\n private readonly _rootClickController = addRootClickController(this, {\n onHide: async () => {\n if (!this.handleClosing()) {\n return;\n }\n this.open = false;\n\n await this.updateComplete;\n this.emitEvent('igcClosed');\n },\n });\n\n private readonly _i18nController = addI18nController<IComboResourceStrings>(\n this,\n {\n defaultEN: ComboResourceStringsEN,\n }\n );\n\n protected override readonly _formValue = createFormValueState<\n ComboValue<T>[]\n >(this, {\n initialValue: [],\n transformers: {\n setValue: asArray,\n setDefaultValue: asArray,\n },\n });\n\n private _data: T[] = [];\n\n private _valueKey?: Keys<T>;\n private _displayKey?: Keys<T>;\n private _groupKey?: Keys<T>;\n\n private _disableFiltering = false;\n private _singleSelect = false;\n\n private _groupSorting: GroupingDirection = 'asc';\n private _filteringOptions: FilteringOptions<T> = {\n filterKey: this.displayKey,\n caseSensitive: false,\n matchDiacritics: false,\n };\n\n @state()\n private _activeDescendant!: string;\n\n @state()\n private _displayValue = '';\n\n protected _state = new DataController<T>(this);\n protected _selection = new SelectionController<T>(this, this._state);\n protected _navigation = new ComboNavigationController(this, this._state, {\n input: this._inputRef,\n search: this._searchRef,\n list: this._listRef,\n });\n\n @queryAssignedElements({ slot: 'suffix' })\n protected inputSuffix!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'prefix' })\n protected inputPrefix!: HTMLElement[];\n\n /** The data source used to generate the list of options. */\n /* treatAsRef */\n @property({ attribute: false })\n public set data(value: T[]) {\n if (this._data === value) {\n return;\n }\n this._data = asArray(value);\n const pristine = this._pristine;\n this.value = asArray(this.value);\n this._pristine = pristine;\n this._state.runPipeline();\n }\n\n public get data() {\n return this._data;\n }\n\n /**\n * The outlined attribute of the control.\n * @attr outlined\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * Enables single selection mode and moves item filtering to the main input.\n * @attr single-select\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'single-select' })\n public set singleSelect(value: boolean) {\n if (this._singleSelect === Boolean(value)) {\n return;\n }\n\n this._singleSelect = Boolean(value);\n this._selection.clear();\n if (this.hasUpdated) {\n this.updateValue();\n this.resetSearchTerm();\n this._navigation.active = -1;\n }\n }\n\n public get singleSelect(): boolean {\n return this._singleSelect;\n }\n\n /**\n * The autofocus attribute of the control.\n * @attr autofocus\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /**\n * Focuses the list of options when the menu opens.\n * @attr autofocus-list\n */\n @property({ type: Boolean, attribute: 'autofocus-list' })\n public autofocusList = false;\n\n /**\n * Gets/Sets the locale used for formatting and displaying the dates in the component.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale() {\n return this._i18nController.locale;\n }\n\n /**\n * The label attribute of the control.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The placeholder attribute of the control.\n * @attr placeholder\n */\n @property()\n public placeholder!: string;\n\n /**\n * The placeholder attribute of the search input.\n * @attr placeholder-search\n */\n @property({ attribute: 'placeholder-search' })\n public set placeholderSearch(value: string) {\n this._placeholderSearch = value;\n }\n\n public get placeholderSearch() {\n return (\n this._placeholderSearch ??\n this.resourceStrings.combo_filter_search_placeholder ??\n 'Search'\n );\n }\n\n private _placeholderSearch: string | undefined;\n\n /**\n * Sets the open state of the component.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IComboResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IComboResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /**\n * The key in the data source used when selecting items.\n * @attr value-key\n */\n @property({ attribute: 'value-key' })\n public set valueKey(value: Keys<T> | undefined) {\n this._valueKey = value;\n this._displayKey = this._displayKey ?? this._valueKey;\n }\n\n public get valueKey() {\n return this._valueKey;\n }\n\n /**\n * The key in the data source used to display items in the list.\n * @attr display-key\n */\n @property({ attribute: 'display-key' })\n public set displayKey(value: Keys<T> | undefined) {\n this._displayKey = value;\n if (!this.filteringOptions.filterKey) {\n this.filteringOptions = { filterKey: this.displayKey };\n }\n }\n\n public get displayKey() {\n return this._displayKey ?? this._valueKey;\n }\n\n /**\n * The key in the data source used to group items in the list.\n * @attr group-key\n */\n @property({ attribute: 'group-key' })\n public set groupKey(value: Keys<T> | undefined) {\n if (this._groupKey !== value) {\n this._groupKey = value;\n this._state.runPipeline();\n }\n }\n\n public get groupKey() {\n return this._groupKey;\n }\n\n /**\n * Sorts the items in each group by ascending or descending order.\n * @attr group-sorting\n * @default asc\n * @type {\"asc\" | \"desc\" | \"none\"}\n */\n @property({ attribute: 'group-sorting' })\n public set groupSorting(value: GroupingDirection) {\n if (this._groupSorting !== value) {\n this._groupSorting = value;\n this._state.runPipeline();\n }\n }\n\n public get groupSorting() {\n return this._groupSorting;\n }\n\n /**\n * An object that configures the filtering of the combo.\n * @attr filtering-options\n * @type {FilteringOptions<T>}\n * @param filterKey - The key in the data source used when filtering the list of options.\n * @param caseSensitive - Determines whether the filtering operation should be case sensitive.\n * @param matchDiacritics -If true, the filter distinguishes between accented letters and their base letters.\n */\n @property({ type: Object, attribute: 'filtering-options' })\n public set filteringOptions(value: Partial<FilteringOptions<T>>) {\n const options = { ...this._filteringOptions, ...value };\n if (!equal(options, this._filteringOptions)) {\n this._filteringOptions = options;\n this._state.runPipeline();\n }\n }\n\n public get filteringOptions(): FilteringOptions<T> {\n return this._filteringOptions;\n }\n\n /**\n * Enables the case sensitive search icon in the filtering input.\n * @attr case-sensitive-icon\n */\n @property({ type: Boolean, attribute: 'case-sensitive-icon' })\n public caseSensitiveIcon = false;\n\n /**\n * Disables the filtering of the list of options.\n * @attr disable-filtering\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-filtering' })\n public set disableFiltering(value: boolean) {\n this._disableFiltering = value;\n this.resetSearchTerm();\n }\n\n public get disableFiltering(): boolean {\n return this._disableFiltering;\n }\n\n /**\n * Hides the clear button.\n * @attr disable-clear\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-clear' })\n public disableClear = false;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo item.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public itemTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.displayKey ? item[this.displayKey] : item}`;\n\n /* blazorSuppress */\n /**\n * The template used for the content of each combo group header.\n * @type {ComboItemTemplate<T>}\n */\n @property({ attribute: false })\n public groupHeaderTemplate: ComboItemTemplate<T> = ({ item }) =>\n html`${this.groupKey && item[this.groupKey]}`;\n\n /**\n * Sets the value (selected items). The passed value must be a valid JSON array.\n * If the data source is an array of complex objects, the `valueKey` attribute must be set.\n * Note that when `displayKey` is not explicitly set, it will fall back to the value of `valueKey`.\n *\n * @attr value\n *\n * @example\n * ```tsx\n * <igc-combo\n * .data=${[\n * {\n * id: 'BG01',\n * name: 'Sofia'\n * },\n * {\n * id: 'BG02',\n * name: 'Plovdiv'\n * }\n * ]}\n * display-key='name'\n * value-key='id'\n * value='[\"BG01\", \"BG02\"]'>\n * </igc-combo>\n * ```\n */\n /* blazorPrimitiveValue */\n /* blazorByValueArray */\n /* blazorGenericType */\n /* @tsTwoWayProperty (true, \"Change\", \"Detail.NewValue\", false) */\n @property({ type: Array })\n public set value(items: ComboValue<T>[]) {\n this._formValue.value = items;\n if (this.hasUpdated) {\n this._updateSelection();\n this.updateValue();\n }\n }\n\n /**\n * Returns the current selection as a list of comma separated values,\n * represented by the value key, when provided.\n */\n public get value(): ComboValue<T>[] {\n return this._formValue.value;\n }\n\n protected _updateSelection() {\n this._selection.deselect();\n if (!isEmpty(this.value)) {\n this._selection.select(this.value);\n }\n }\n\n @watch('open')\n protected toggleDirectiveChange() {\n this._rootClickController.update();\n }\n\n constructor() {\n super();\n\n addThemingController(this, all);\n addSafeEventListener(this, 'blur', this._handleBlur);\n addSafeEventListener(this, 'focusin', this._handleFocusIn);\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n\n this._updateSelection();\n this.updateValue(this.hasUpdated);\n this._pristine = true;\n this._state.runPipeline();\n }\n\n protected override _restoreDefaultValue(): void {\n this._formValue.value = this._formValue.defaultValue;\n this._updateSelection();\n this.updateValue(true);\n this._validate();\n }\n\n protected override _setDefaultValue(current: string | null): void {\n this.defaultValue = JSON.parse(current ?? '[]');\n }\n\n protected override _setFormValue(): void {\n if (isEmpty(this.value)) {\n super._setFormValue(null);\n return;\n }\n\n if (this.singleSelect) {\n super._setFormValue(`${first(this.value)}`);\n return;\n }\n\n if (this.name) {\n const value = new FormData();\n for (const item of this.value) {\n value.append(this.name, `${item}`);\n }\n super._setFormValue(value);\n }\n }\n\n protected resetSearchTerm() {\n this._state.searchTerm = '';\n }\n\n protected updateValue(initial = false) {\n if (isEmpty(this.data)) {\n return;\n }\n this._formValue.value = this._selection.getSelectedValuesByKey(\n this.valueKey\n );\n this._displayValue = this._selection\n .getSelectedValuesByKey(this.displayKey)\n .join(', ');\n\n this._setFormValue();\n\n if (!initial) {\n this._validate();\n this._listRef.value!.requestUpdate();\n }\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the component. */\n public override focus(options?: FocusOptions) {\n this._inputRef.value!.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the component. */\n public override blur() {\n this._inputRef.value!.blur();\n }\n\n /**\n * Returns the current selection as an array of objects as provided in the `data` source.\n */\n public get selection(): T[] {\n return this._selection.asArray;\n }\n\n /**\n * Selects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be selected.\n * @param { Item<T> | Items<T> } items - One or more items to be selected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Select one item at a time by reference when valueKey is not specified.\n * combo.select(combo.data[0]);\n *\n * // Select multiple items at a time by reference when valueKey is not specified.\n * combo.select([combo.data[0], combo.data[1]]);\n *\n * // Select one item at a time when valueKey is specified.\n * combo.select('BG01');\n *\n * // Select multiple items at a time when valueKey is specified.\n * combo.select(['BG01', 'BG02']);\n * ```\n */\n public select(items?: Item<T> | Item<T>[]) {\n this._selection.select(items);\n this.updateValue();\n }\n\n /**\n * Deselects option(s) in the list by either reference or valueKey.\n * If not argument is provided all items will be deselected.\n * @param { Item<T> | Items<T> } items - One or more items to be deselected. Multiple items should be passed as an array.\n * When valueKey is specified, the corresponding value should be used in place of the item reference.\n * @example\n * ```typescript\n * const combo<IgcComboComponent<T>> = document.querySelector('igc-combo');\n *\n * // Deselect one item at a time by reference when valueKey is not specified.\n * combo.deselect(combo.data[0]);\n *\n * // Deselect multiple items at a time by reference when valueKey is not specified.\n * combo.deselect([combo.data[0], combo.data[1]]);\n *\n * // Deselect one item at a time when valueKey is specified.\n * combo.deselect('BG01');\n *\n * // Deselect multiple items at a time when valueKey is specified.\n * combo.deselect(['BG01', 'BG02']);\n * ```\n */\n public deselect(items?: Item<T> | Item<T>[]) {\n this._selection.deselect(items);\n this.updateValue();\n }\n\n protected async handleMainInput({ detail }: CustomEvent<string>) {\n this._setTouchedState();\n this._show();\n this._state.searchTerm = detail;\n\n // wait for the dataState to update after filtering\n await this.updateComplete;\n\n const matchIndex = this._state.dataState.findIndex((i) => !i.header);\n this._navigation.active = detail ? matchIndex : -1;\n\n // update the list after changing the active item\n this._listRef.value!.requestUpdate();\n\n // clear the selection upon typing\n this.clearSingleSelection();\n }\n\n protected _handleFocusIn() {\n this._setTouchedState();\n }\n\n protected override _handleBlur() {\n if (this._selection.isEmpty) {\n this._displayValue = '';\n this.resetSearchTerm();\n }\n super._handleBlur();\n }\n\n protected handleSearchInput({ detail }: CustomEvent<string>) {\n this._state.searchTerm = detail;\n }\n\n protected handleOpening() {\n return this.emitEvent('igcOpening', { cancelable: true });\n }\n\n protected handleClosing(): boolean {\n return this.emitEvent('igcClosing', { cancelable: true });\n }\n\n protected async _show(emitEvent = true) {\n if (this.open || (emitEvent && !this.handleOpening())) {\n return false;\n }\n\n this.open = true;\n await this.updateComplete;\n\n if (emitEvent) {\n this.emitEvent('igcOpened');\n }\n\n if (!this.singleSelect) {\n this._listRef.value!.focus();\n }\n\n if (!this.autofocusList) {\n this._searchRef.value!.focus();\n }\n\n return true;\n }\n\n /** Shows the list of options. */\n public async show(): Promise<boolean> {\n return await this._show(false);\n }\n\n protected async _hide(emitEvent = true) {\n if (!this.open || (emitEvent && !this.handleClosing())) {\n return false;\n }\n\n this.open = false;\n await this.updateComplete;\n\n if (emitEvent) {\n this.emitEvent('igcClosed');\n }\n this._navigation.active = -1;\n return true;\n }\n\n /** Hides the list of options. */\n public async hide(): Promise<boolean> {\n return await this._hide(false);\n }\n\n protected _toggle(emit = true) {\n return this.open ? this._hide(emit) : this._show(emit);\n }\n\n /** Toggles the list of options. */\n public async toggle(): Promise<boolean> {\n return await this._toggle(false);\n }\n\n private _getActiveDescendantId(index: number) {\n const position = index + 1;\n const id = this.id ? `${this.id}-item-${position}` : `item-${position}`;\n\n return { id, position };\n }\n\n protected itemRenderer: ComboRenderFunction<T> = (\n item: ComboRecord<T>,\n index: number\n ) => {\n if (!item) {\n return html`${nothing}`;\n }\n\n if (this.groupKey && item.header) {\n return html`\n <igc-combo-header part=\"group-header\">\n ${this.groupHeaderTemplate({ item: item.value })}\n </igc-combo-header>\n `;\n }\n\n const { id, position } = this._getActiveDescendantId(index);\n const active = this._navigation.active === index;\n const selected = this._selection.has(this.data.at(item.dataIndex));\n\n if (active) {\n this._activeDescendant = id;\n }\n\n return html`\n <igc-combo-item\n id=${id}\n part=${partMap({ item: true, selected, active })}\n aria-setsize=${this._state.dataState.length}\n aria-posinset=${position}\n exportparts=\"checkbox, checkbox-indicator, checked\"\n .index=${index}\n ?active=${active}\n ?selected=${selected}\n ?hide-checkbox=${this.singleSelect}\n >\n ${this.itemTemplate({ item: item.value })}\n </igc-combo-item>\n `;\n };\n\n protected itemClickHandler(event: PointerEvent) {\n this._setTouchedState();\n const target = findElementFromEventPath<IgcComboItemComponent>(\n IgcComboItemComponent.tagName,\n event\n );\n\n if (!target) {\n return;\n }\n\n this.toggleSelect(target.index);\n\n if (this.singleSelect) {\n this._inputRef.value!.focus();\n this._hide();\n } else {\n this._searchRef.value!.focus();\n }\n }\n\n protected toggleSelect(index: number) {\n const { dataIndex } = this._state.dataState.at(index)!;\n\n this._selection.changeSelection(dataIndex);\n this._navigation.active = index;\n this.updateValue();\n }\n\n protected selectByIndex(index: number) {\n const { dataIndex } = this._state.dataState.at(index)!;\n\n this._selection.selectByIndex(dataIndex);\n this._navigation.active = index;\n this.updateValue();\n }\n\n /** @hidden @internal */\n public clearSelection() {\n if (this.singleSelect) {\n this.resetSearchTerm();\n this.clearSingleSelection();\n } else {\n this._selection.deselect([], true);\n }\n this.updateValue();\n }\n\n protected clearSingleSelection() {\n const _selection = this._selection.asArray;\n const selection = first(_selection);\n\n if (selection) {\n const item = this.valueKey ? selection[this.valueKey] : selection;\n this._selection.deselect(item, !isEmpty(_selection));\n this._formValue.value = [];\n }\n }\n\n protected handleClearIconClick(e: PointerEvent) {\n e.stopPropagation();\n this.clearSelection();\n this._navigation.active = -1;\n }\n\n protected toggleCaseSensitivity() {\n this.filteringOptions = {\n caseSensitive: !this.filteringOptions.caseSensitive,\n };\n }\n\n private _stopPropagation(e: Event) {\n e.stopPropagation();\n }\n\n private renderToggleIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=${partMap({\n 'toggle-icon': true,\n filled: !isEmpty(this.value),\n })}\n >\n <slot name=\"toggle-icon\">\n <igc-icon\n name=${this.open ? 'input_collapse' : 'input_expand'}\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private renderClearIcon() {\n return html`\n <span\n slot=\"suffix\"\n part=\"clear-icon\"\n @click=${this.handleClearIconClick}\n ?hidden=${this.disableClear || this._selection.isEmpty}\n >\n <slot name=\"clear-icon\">\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `;\n }\n\n private renderMainInput() {\n return html`\n <igc-input\n ${ref(this._inputRef)}\n id=\"target\"\n slot=\"anchor\"\n role=\"combobox\"\n aria-controls=\"dropdown\"\n aria-owns=\"dropdown\"\n aria-expanded=${this.open}\n aria-describedby=\"combo-helper-text\"\n aria-disabled=${this.disabled}\n exportparts=\"container: input, input: native-input, label, prefix, suffix\"\n @click=${this._toggle}\n placeholder=${ifDefined(this.placeholder)}\n label=${ifDefined(this.label)}\n @igcChange=${this._stopPropagation}\n @igcInput=${this.handleMainInput}\n .value=${this._displayValue}\n .disabled=${this.disabled}\n .required=${this.required}\n .invalid=${this.invalid}\n .outlined=${this.outlined}\n .autofocus=${this.autofocus}\n ?readonly=${!this.singleSelect}\n >\n <span slot=${!isEmpty(this.inputPrefix) && 'prefix'}>\n <slot name=\"prefix\"></slot>\n </span>\n ${this.renderClearIcon()}\n <span slot=${!isEmpty(this.inputSuffix) && 'suffix'}>\n <slot name=\"suffix\"></slot>\n </span>\n ${this.renderToggleIcon()}\n </igc-input>\n `;\n }\n\n private renderSearchInput() {\n return html`\n <div\n part=\"filter-input\"\n ?hidden=${this.disableFiltering || this.singleSelect}\n >\n <igc-input\n ${ref(this._searchRef)}\n .value=${this._state.searchTerm}\n part=\"search-input\"\n placeholder=${this.placeholderSearch}\n exportparts=\"input: search-input\"\n @igcInput=${this.handleSearchInput}\n >\n <igc-icon\n slot=${this.caseSensitiveIcon && 'suffix'}\n name=\"case_sensitive\"\n collection=\"default\"\n part=${partMap({\n 'case-icon': true,\n active: this.filteringOptions.caseSensitive ?? false,\n })}\n @click=${this.toggleCaseSensitivity}\n ></igc-icon>\n </igc-input>\n </div>\n `;\n }\n\n private renderEmptyTemplate() {\n return html`\n <div part=\"empty\" ?hidden=${!isEmpty(this._state.dataState)}>\n <slot name=\"empty\">${this.resourceStrings.combo_empty_message}</slot>\n </div>\n `;\n }\n\n private renderList() {\n return html`\n <div .inert=${!this.open} part=\"list-wrapper\">\n ${this.renderSearchInput()}\n <div part=\"header\">\n <slot name=\"header\"></slot>\n </div>\n <igc-combo-list\n ${ref(this._listRef)}\n aria-multiselectable=${!this.singleSelect}\n id=\"dropdown\"\n part=\"list\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-labelledby=\"target\"\n aria-activedescendant=${ifDefined(this._activeDescendant)}\n .items=${this._state.dataState}\n .renderItem=${this.itemRenderer}\n ?hidden=${isEmpty(this._state.dataState)}\n @click=${this.itemClickHandler}\n >\n </igc-combo-list>\n ${this.renderEmptyTemplate()}\n <div part=\"footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n private renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this, {\n id: 'combo-helper-text',\n hasHelperText: true,\n });\n }\n\n protected override render() {\n return html`\n <igc-popover ?open=${this.open} flip shift same-width>\n ${this.renderMainInput()} ${this.renderList()}\n </igc-popover>\n ${this.renderHelperText()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-combo': IgcComboComponent<object>;\n }\n}\n"]}
|