@energinet/watt 0.0.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/LICENSE +201 -0
- package/badge/index.d.ts +17 -0
- package/badge/watt-badge.component.d.ts +15 -0
- package/breadcrumbs/index.d.ts +17 -0
- package/breadcrumbs/watt-breadcrumbs.component.d.ts +23 -0
- package/button/index.d.ts +17 -0
- package/button/watt-button.component.d.ts +20 -0
- package/card/index.d.ts +18 -0
- package/card/watt-card-title.component.d.ts +6 -0
- package/card/watt-card.component.d.ts +15 -0
- package/checkbox/index.d.ts +17 -0
- package/checkbox/watt-checkbox.component.d.ts +17 -0
- package/chip/index.d.ts +23 -0
- package/chip/watt-action-chip.component.d.ts +8 -0
- package/chip/watt-chip.component.d.ts +8 -0
- package/chip/watt-chip.directive.d.ts +16 -0
- package/chip/watt-date-chip.component.d.ts +29 -0
- package/chip/watt-date-range-chip.component.d.ts +50 -0
- package/chip/watt-filter-chip.component.d.ts +30 -0
- package/chip/watt-menu-chip.component.d.ts +30 -0
- package/clipboard/index.d.ts +18 -0
- package/clipboard/watt-clipboard-intl.service.d.ts +7 -0
- package/clipboard/watt-copy-to-clipboard.directive.d.ts +12 -0
- package/code/index.d.ts +18 -0
- package/code/watt-code.component.d.ts +32 -0
- package/code/watt-code.worker.token.d.ts +18 -0
- package/core/breakpoints/_breakpoints.import.scss +53 -0
- package/core/breakpoints/_include-media.scss +568 -0
- package/core/breakpoints/breakpoints-observer.d.ts +39 -0
- package/core/breakpoints/breakpoints.d.ts +29 -0
- package/core/breakpoints/index.d.ts +18 -0
- package/core/color/+storybook/storybook-colors-overview.component.scss +50 -0
- package/core/color/color-helper.service.d.ts +12 -0
- package/core/color/colors.d.ts +51 -0
- package/core/color/index.d.ts +18 -0
- package/core/date/dayjs.d.ts +22 -0
- package/core/date/index.d.ts +23 -0
- package/core/date/watt-danish-datetime.providers.d.ts +1 -0
- package/core/date/watt-date-adapter.d.ts +31 -0
- package/core/date/watt-date-range.d.ts +25 -0
- package/core/date/watt-date.pipe.d.ts +28 -0
- package/core/date/watt-format-date.d.ts +11 -0
- package/core/date/watt-locale.service.d.ts +13 -0
- package/core/styles/@energinet-datahub/watt/_index.scss +52 -0
- package/core/styles/@energinet-datahub/watt/_utils.scss +16 -0
- package/core/styles/@energinet-datahub/watt/theme/light-theme.scss +71 -0
- package/core/styles/@energinet-datahub/watt/theme/material-overwrites/datepicker.scss +69 -0
- package/core/styles/@energinet-datahub/watt/theme/material-overwrites/snack-bar.scss +26 -0
- package/core/styles/_box-sizing.scss +22 -0
- package/core/styles/_chips.scss +22 -0
- package/core/styles/_elevation.scss +18 -0
- package/core/styles/_hr.scss +20 -0
- package/core/styles/_table.scss +89 -0
- package/core/styles/_tokens.scss +134 -0
- package/core/styles/_tooltip.scss +64 -0
- package/core/styles/_variables.scss +106 -0
- package/core/styles/_vater.scss +69 -0
- package/core/styles/spacing/+storybook/storybook-spacing-overview.component.scss +25 -0
- package/core/styles/spacing/_baseline.scss +23 -0
- package/core/styles/spacing/_inline.scss +38 -0
- package/core/styles/spacing/_inset.scss +61 -0
- package/core/styles/spacing/_spacing.import.scss +113 -0
- package/core/styles/spacing/_stack.scss +38 -0
- package/core/styles/spacing/_variables.scss +14 -0
- package/core/styles/spacing/index.scss +18 -0
- package/core/styles/typography/+storybook/storybook-typography-overview.component.scss +78 -0
- package/core/styles/typography/_rem.scss +24 -0
- package/core/styles/typography/_typography.import.scss +195 -0
- package/core/styles/typography/index.scss +118 -0
- package/data/index.d.ts +20 -0
- package/data/watt-data-actions.component.d.ts +5 -0
- package/data/watt-data-filters.component.d.ts +5 -0
- package/data/watt-data-intl.service.d.ts +15 -0
- package/data/watt-data-table.component.d.ts +27 -0
- package/datetime-field/index.d.ts +17 -0
- package/datetime-field/watt-datetime-field.component.d.ts +39 -0
- package/description-list/index.d.ts +17 -0
- package/description-list/watt-description-list-item.component.d.ts +27 -0
- package/description-list/watt-description-list.component.d.ts +19 -0
- package/drawer/index.d.ts +21 -0
- package/drawer/watt-drawer-actions.component.d.ts +5 -0
- package/drawer/watt-drawer-content.component.d.ts +5 -0
- package/drawer/watt-drawer-heading.component.d.ts +5 -0
- package/drawer/watt-drawer-topbar.component.d.ts +5 -0
- package/drawer/watt-drawer.component.d.ts +61 -0
- package/dropdown/index.d.ts +19 -0
- package/dropdown/watt-dropdown-option.d.ts +22 -0
- package/dropdown/watt-dropdown-value.d.ts +17 -0
- package/dropdown/watt-dropdown.component.d.ts +195 -0
- package/empty-state/icons/explore.d.ts +5 -0
- package/empty-state/icons/no-results.d.ts +5 -0
- package/empty-state/icons/power.d.ts +5 -0
- package/empty-state/index.d.ts +20 -0
- package/empty-state/watt-empty-state.component.d.ts +16 -0
- package/expandable-card/index.d.ts +19 -0
- package/expandable-card/watt-expandable-card.component.d.ts +34 -0
- package/expansion/expansion.component.d.ts +18 -0
- package/expansion/index.d.ts +17 -0
- package/fesm2022/energinet-watt-badge.mjs +66 -0
- package/fesm2022/energinet-watt-badge.mjs.map +1 -0
- package/fesm2022/energinet-watt-breadcrumbs.mjs +116 -0
- package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -0
- package/fesm2022/energinet-watt-button.mjs +120 -0
- package/fesm2022/energinet-watt-button.mjs.map +1 -0
- package/fesm2022/energinet-watt-card.mjs +117 -0
- package/fesm2022/energinet-watt-card.mjs.map +1 -0
- package/fesm2022/energinet-watt-checkbox.mjs +118 -0
- package/fesm2022/energinet-watt-checkbox.mjs.map +1 -0
- package/fesm2022/energinet-watt-chip.mjs +760 -0
- package/fesm2022/energinet-watt-chip.mjs.map +1 -0
- package/fesm2022/energinet-watt-clipboard.mjs +118 -0
- package/fesm2022/energinet-watt-clipboard.mjs.map +1 -0
- package/fesm2022/energinet-watt-code.mjs +119 -0
- package/fesm2022/energinet-watt-code.mjs.map +1 -0
- package/fesm2022/energinet-watt-core-breakpoints.mjs +100 -0
- package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -0
- package/fesm2022/energinet-watt-core-color.mjs +127 -0
- package/fesm2022/energinet-watt-core-color.mjs.map +1 -0
- package/fesm2022/energinet-watt-core-date.mjs +260 -0
- package/fesm2022/energinet-watt-core-date.mjs.map +1 -0
- package/fesm2022/energinet-watt-data.mjs +286 -0
- package/fesm2022/energinet-watt-data.mjs.map +1 -0
- package/fesm2022/energinet-watt-datetime-field.mjs +233 -0
- package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -0
- package/fesm2022/energinet-watt-description-list.mjs +130 -0
- package/fesm2022/energinet-watt-description-list.mjs.map +1 -0
- package/fesm2022/energinet-watt-drawer.mjs +271 -0
- package/fesm2022/energinet-watt-drawer.mjs.map +1 -0
- package/fesm2022/energinet-watt-dropdown.mjs +423 -0
- package/fesm2022/energinet-watt-dropdown.mjs.map +1 -0
- package/fesm2022/energinet-watt-empty-state.mjs +299 -0
- package/fesm2022/energinet-watt-empty-state.mjs.map +1 -0
- package/fesm2022/energinet-watt-expandable-card.mjs +151 -0
- package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -0
- package/fesm2022/energinet-watt-expansion.mjs +78 -0
- package/fesm2022/energinet-watt-expansion.mjs.map +1 -0
- package/fesm2022/energinet-watt-field.mjs +249 -0
- package/fesm2022/energinet-watt-field.mjs.map +1 -0
- package/fesm2022/energinet-watt-icon-flags.mjs +376 -0
- package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -0
- package/fesm2022/energinet-watt-icon.mjs +195 -0
- package/fesm2022/energinet-watt-icon.mjs.map +1 -0
- package/fesm2022/energinet-watt-modal.mjs +260 -0
- package/fesm2022/energinet-watt-modal.mjs.map +1 -0
- package/fesm2022/energinet-watt-paginator.mjs +164 -0
- package/fesm2022/energinet-watt-paginator.mjs.map +1 -0
- package/fesm2022/energinet-watt-phone-field.mjs +322 -0
- package/fesm2022/energinet-watt-phone-field.mjs.map +1 -0
- package/fesm2022/energinet-watt-picker-__shared.mjs +384 -0
- package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -0
- package/fesm2022/energinet-watt-picker-datepicker.mjs +430 -0
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -0
- package/fesm2022/energinet-watt-picker-timepicker.mjs +394 -0
- package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -0
- package/fesm2022/energinet-watt-progress-tracker.mjs +141 -0
- package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -0
- package/fesm2022/energinet-watt-query-params.mjs +95 -0
- package/fesm2022/energinet-watt-query-params.mjs.map +1 -0
- package/fesm2022/energinet-watt-radio.mjs +125 -0
- package/fesm2022/energinet-watt-radio.mjs.map +1 -0
- package/fesm2022/energinet-watt-search.mjs +126 -0
- package/fesm2022/energinet-watt-search.mjs.map +1 -0
- package/fesm2022/energinet-watt-shell.mjs +315 -0
- package/fesm2022/energinet-watt-shell.mjs.map +1 -0
- package/fesm2022/energinet-watt-slider.mjs +159 -0
- package/fesm2022/energinet-watt-slider.mjs.map +1 -0
- package/fesm2022/energinet-watt-spinner.mjs +72 -0
- package/fesm2022/energinet-watt-spinner.mjs.map +1 -0
- package/fesm2022/energinet-watt-stepper.mjs +185 -0
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -0
- package/fesm2022/energinet-watt-table.mjs +423 -0
- package/fesm2022/energinet-watt-table.mjs.map +1 -0
- package/fesm2022/energinet-watt-tabs.mjs +254 -0
- package/fesm2022/energinet-watt-tabs.mjs.map +1 -0
- package/fesm2022/energinet-watt-text-field.mjs +316 -0
- package/fesm2022/energinet-watt-text-field.mjs.map +1 -0
- package/fesm2022/energinet-watt-textarea-field.mjs +136 -0
- package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -0
- package/fesm2022/energinet-watt-toast.mjs +174 -0
- package/fesm2022/energinet-watt-toast.mjs.map +1 -0
- package/fesm2022/energinet-watt-tooltip.mjs +214 -0
- package/fesm2022/energinet-watt-tooltip.mjs.map +1 -0
- package/fesm2022/energinet-watt-utils-css.mjs +72 -0
- package/fesm2022/energinet-watt-utils-css.mjs.map +1 -0
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs +83 -0
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -0
- package/fesm2022/energinet-watt-utils-resize-observer.mjs +144 -0
- package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -0
- package/fesm2022/energinet-watt-validation-message.mjs +114 -0
- package/fesm2022/energinet-watt-validation-message.mjs.map +1 -0
- package/fesm2022/energinet-watt-validators.mjs +40 -0
- package/fesm2022/energinet-watt-validators.mjs.map +1 -0
- package/fesm2022/energinet-watt-vater.mjs +287 -0
- package/fesm2022/energinet-watt-vater.mjs.map +1 -0
- package/fesm2022/energinet-watt.mjs +47 -0
- package/fesm2022/energinet-watt.mjs.map +1 -0
- package/field/index.d.ts +20 -0
- package/field/watt-field-error.component.d.ts +5 -0
- package/field/watt-field-hint.component.d.ts +5 -0
- package/field/watt-field-intl.service.d.ts +8 -0
- package/field/watt-field.component.d.ts +42 -0
- package/icon/flags/index.d.ts +23 -0
- package/icon/flags/watt-flag-de.d.ts +5 -0
- package/icon/flags/watt-flag-dk.d.ts +5 -0
- package/icon/flags/watt-flag-fi.d.ts +5 -0
- package/icon/flags/watt-flag-no.d.ts +5 -0
- package/icon/flags/watt-flag-pl.d.ts +5 -0
- package/icon/flags/watt-flag-se.d.ts +5 -0
- package/icon/flags/watt-flag.d.ts +13 -0
- package/icon/icon.component.d.ts +20 -0
- package/icon/icons.d.ts +82 -0
- package/icon/index.d.ts +17 -0
- package/index.d.ts +33 -0
- package/modal/index.d.ts +18 -0
- package/modal/watt-modal.component.d.ts +86 -0
- package/modal/watt-modal.service.d.ts +62 -0
- package/package.json +237 -0
- package/paginator/index.d.ts +18 -0
- package/paginator/watt-paginator-intl.service.d.ts +14 -0
- package/paginator/watt-paginator.component.d.ts +53 -0
- package/phone-field/index.d.ts +18 -0
- package/phone-field/watt-phone-field-intl.service.d.ts +14 -0
- package/phone-field/watt-phone-field.component.d.ts +75 -0
- package/picker/__shared/index.d.ts +19 -0
- package/picker/__shared/placeholder-mask/watt-placeholder-mask.component.d.ts +34 -0
- package/picker/__shared/watt-picker-base.d.ts +201 -0
- package/picker/__shared/watt-picker-value.d.ts +18 -0
- package/picker/datepicker/index.d.ts +19 -0
- package/picker/datepicker/watt-datepicker-intl.service.d.ts +7 -0
- package/picker/datepicker/watt-datepicker.component.d.ts +149 -0
- package/picker/timepicker/index.d.ts +17 -0
- package/picker/timepicker/maskito-time-range-mask.d.ts +18 -0
- package/picker/timepicker/watt-timepicker.component.d.ts +132 -0
- package/progress-tracker/index.d.ts +20 -0
- package/progress-tracker/watt-progress-tracker-step.component.d.ts +10 -0
- package/progress-tracker/watt-progress-tracker.component.d.ts +5 -0
- package/query-params/index.d.ts +17 -0
- package/query-params/watt-query-params.directive.d.ts +27 -0
- package/radio/index.d.ts +17 -0
- package/radio/watt-radio.component.d.ts +24 -0
- package/search/index.d.ts +17 -0
- package/search/watt-search.component.d.ts +31 -0
- package/shell/index.d.ts +18 -0
- package/shell/nav-list/index.d.ts +18 -0
- package/shell/nav-list/watt-expand-on-active-link.directive.d.ts +26 -0
- package/shell/nav-list/watt-nav-list-item.component.d.ts +16 -0
- package/shell/nav-list/watt-nav-list.component.d.ts +12 -0
- package/shell/shell.component.d.ts +28 -0
- package/slider/index.d.ts +17 -0
- package/slider/watt-slider.component.d.ts +57 -0
- package/spinner/index.d.ts +17 -0
- package/spinner/watt-spinner.component.d.ts +15 -0
- package/stepper/index.d.ts +18 -0
- package/stepper/watt-stepper-step.component.d.ts +34 -0
- package/stepper/watt-stepper.component.d.ts +40 -0
- package/table/index.d.ts +18 -0
- package/table/watt-table-data-source.d.ts +37 -0
- package/table/watt-table.component.d.ts +239 -0
- package/tabs/index.d.ts +26 -0
- package/tabs/watt-link-tab.component.d.ts +7 -0
- package/tabs/watt-link-tabs.component.d.ts +7 -0
- package/tabs/watt-tab.component.d.ts +26 -0
- package/tabs/watt-tabs-action.component.d.ts +5 -0
- package/tabs/watt-tabs.component.d.ts +36 -0
- package/text-field/index.d.ts +17 -0
- package/text-field/watt-text-field.component.d.ts +77 -0
- package/textarea-field/index.d.ts +17 -0
- package/textarea-field/watt-textarea-field.component.d.ts +27 -0
- package/toast/index.d.ts +19 -0
- package/toast/watt-toast.component.d.ts +47 -0
- package/toast/watt-toast.service.d.ts +13 -0
- package/tooltip/index.d.ts +17 -0
- package/tooltip/watt-tooltip.component.d.ts +47 -0
- package/tooltip/watt-tooltip.directive.d.ts +31 -0
- package/utils/css/css-custom-properties.service.d.ts +10 -0
- package/utils/css/index.d.ts +17 -0
- package/utils/intersection-observer/index.d.ts +17 -0
- package/utils/intersection-observer/watt-intersection-observer.service.d.ts +21 -0
- package/utils/resize-observer/index.d.ts +18 -0
- package/utils/resize-observer/watt-resize-observer.directive.d.ts +35 -0
- package/utils/resize-observer/watt-resize-observer.service.d.ts +39 -0
- package/validation-message/index.d.ts +17 -0
- package/validation-message/watt-validation-message.component.d.ts +50 -0
- package/validators/index.d.ts +17 -0
- package/validators/watt-range.validators.d.ts +23 -0
- package/vater/index.d.ts +20 -0
- package/vater/types.d.ts +21 -0
- package/vater/vater-flex.component.d.ts +19 -0
- package/vater/vater-spacer.component.d.ts +5 -0
- package/vater/vater-stack.component.d.ts +14 -0
- package/vater/vater-utility.directive.d.ts +16 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, Input, HostBinding, ViewChild, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/forms';
|
|
4
|
+
import { NgControl, FormControl, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { NgClass } from '@angular/common';
|
|
6
|
+
import { RxPush } from '@rx-angular/template/push';
|
|
7
|
+
import * as i1 from '@angular/material/select';
|
|
8
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
9
|
+
import * as i4 from 'ngx-mat-select-search';
|
|
10
|
+
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
11
|
+
import { ReplaySubject, take, map, of, filter } from 'rxjs';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
|
+
import { WattFieldComponent } from '@energinet/watt/field';
|
|
14
|
+
import { WattMenuChipComponent } from '@energinet/watt/chip';
|
|
15
|
+
import { WattIconComponent } from '@energinet/watt/icon';
|
|
16
|
+
import * as i2 from '@angular/material/core';
|
|
17
|
+
|
|
18
|
+
//#region License
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
22
|
+
*
|
|
23
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
24
|
+
* you may not use this file except in compliance with the License.
|
|
25
|
+
* You may obtain a copy of the License at
|
|
26
|
+
*
|
|
27
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
28
|
+
*
|
|
29
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
30
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32
|
+
* See the License for the specific language governing permissions and
|
|
33
|
+
* limitations under the License.
|
|
34
|
+
*/
|
|
35
|
+
//#endregion
|
|
36
|
+
class WattDropdownComponent {
|
|
37
|
+
parentControlDirective = inject(NgControl, { host: true });
|
|
38
|
+
/**
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
_destroyRef = inject(DestroyRef);
|
|
42
|
+
/**
|
|
43
|
+
* @ignore
|
|
44
|
+
*/
|
|
45
|
+
parentControl = null;
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
validateParent;
|
|
50
|
+
/**
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
validateParentAsync;
|
|
54
|
+
/**
|
|
55
|
+
* @ignore
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
isDisabled = false;
|
|
59
|
+
/**
|
|
60
|
+
* @ignore
|
|
61
|
+
*/
|
|
62
|
+
matSelectControl = new FormControl(null);
|
|
63
|
+
/**
|
|
64
|
+
* Control for the MatSelect filter keyword
|
|
65
|
+
*
|
|
66
|
+
* @ignore
|
|
67
|
+
*/
|
|
68
|
+
filterControl = new UntypedFormControl();
|
|
69
|
+
/**
|
|
70
|
+
* List of options filtered by search keyword
|
|
71
|
+
*
|
|
72
|
+
* @ignore
|
|
73
|
+
*/
|
|
74
|
+
filteredOptions$ = new ReplaySubject(1);
|
|
75
|
+
/**
|
|
76
|
+
* @ignore
|
|
77
|
+
*/
|
|
78
|
+
emDash = '—';
|
|
79
|
+
/**
|
|
80
|
+
* @ignore
|
|
81
|
+
*/
|
|
82
|
+
isToggleAllChecked = false;
|
|
83
|
+
/**
|
|
84
|
+
* @ignore
|
|
85
|
+
*/
|
|
86
|
+
isToggleAllIndeterminate = false;
|
|
87
|
+
_options = [];
|
|
88
|
+
/**
|
|
89
|
+
* @ignore
|
|
90
|
+
*/
|
|
91
|
+
get showTriggerValue() {
|
|
92
|
+
return (this.multiple &&
|
|
93
|
+
this.matSelectControl.value?.length === 1 &&
|
|
94
|
+
this.matSelectControl.value[0] !== '') ||
|
|
95
|
+
(!this.multiple && this.matSelect?.triggerValue)
|
|
96
|
+
? true
|
|
97
|
+
: false;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @ignore
|
|
101
|
+
*/
|
|
102
|
+
get showChipLabel() {
|
|
103
|
+
return this.multiple && this.matSelectControl.value && this.matSelectControl.value.length > 1
|
|
104
|
+
? true
|
|
105
|
+
: false;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @ignore
|
|
109
|
+
*/
|
|
110
|
+
matSelect;
|
|
111
|
+
hideSearch = false;
|
|
112
|
+
panelWidth = null;
|
|
113
|
+
getCustomTrigger;
|
|
114
|
+
/**
|
|
115
|
+
* Set the mode of the dropdown.
|
|
116
|
+
*/
|
|
117
|
+
chipMode = false;
|
|
118
|
+
get chipModeClass() {
|
|
119
|
+
return this.chipMode;
|
|
120
|
+
}
|
|
121
|
+
disableSelectedMode = false;
|
|
122
|
+
sortDirection = undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Sets the options for the dropdown.
|
|
125
|
+
*/
|
|
126
|
+
set options(options) {
|
|
127
|
+
if (Array.isArray(options)) {
|
|
128
|
+
let optionsCopy = [...options];
|
|
129
|
+
if (this.sortDirection) {
|
|
130
|
+
optionsCopy = this.sortOptions(optionsCopy);
|
|
131
|
+
}
|
|
132
|
+
this._options = optionsCopy;
|
|
133
|
+
this.filteredOptions$.next(optionsCopy);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
get options() {
|
|
137
|
+
return this._options;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Sets support for selecting multiple dropdown options.
|
|
141
|
+
*/
|
|
142
|
+
multiple = false;
|
|
143
|
+
/**
|
|
144
|
+
* Sets support for hiding the reset option in "single" select mode.
|
|
145
|
+
*/
|
|
146
|
+
showResetOption = true;
|
|
147
|
+
/**
|
|
148
|
+
* Sets the placeholder for the dropdown.
|
|
149
|
+
*/
|
|
150
|
+
placeholder = '';
|
|
151
|
+
/**
|
|
152
|
+
* Sets the label for the dropdown.
|
|
153
|
+
*/
|
|
154
|
+
label = '';
|
|
155
|
+
/**
|
|
156
|
+
* Label to be shown when no options are found after filtering.
|
|
157
|
+
*
|
|
158
|
+
* Note: The label is visible in "multiple" mode only.
|
|
159
|
+
*/
|
|
160
|
+
noOptionsFoundLabel = '';
|
|
161
|
+
constructor() {
|
|
162
|
+
this.parentControlDirective.valueAccessor = this;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @ignore
|
|
166
|
+
*/
|
|
167
|
+
ngOnInit() {
|
|
168
|
+
this.listenForFilterFieldValueChanges();
|
|
169
|
+
this.initializePropertiesFromParent();
|
|
170
|
+
this.bindParentValidatorsToControl();
|
|
171
|
+
this.bindControlToParent();
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @ignore
|
|
175
|
+
*/
|
|
176
|
+
writeValue(value) {
|
|
177
|
+
this.matSelectControl.setValue(value);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @ignore
|
|
181
|
+
*/
|
|
182
|
+
registerOnChange(onChangeFn) {
|
|
183
|
+
this.changeParentValue = onChangeFn;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @ignore
|
|
187
|
+
*/
|
|
188
|
+
registerOnTouched(onTouchFn) {
|
|
189
|
+
this.markParentControlAsTouched = onTouchFn;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @ignore
|
|
193
|
+
*/
|
|
194
|
+
setDisabledState(shouldDisable) {
|
|
195
|
+
this.isDisabled = shouldDisable;
|
|
196
|
+
if (shouldDisable) {
|
|
197
|
+
this.matSelectControl.disable();
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.matSelectControl.enable();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @ignore
|
|
205
|
+
*/
|
|
206
|
+
onToggleAll(toggleAllState) {
|
|
207
|
+
this.filteredOptions$
|
|
208
|
+
.pipe(take(1), map((options) => options.map((option) => option.value)))
|
|
209
|
+
.subscribe((filteredOptions) => {
|
|
210
|
+
const optionsToSelect = toggleAllState ? filteredOptions : [];
|
|
211
|
+
this.matSelectControl.patchValue(optionsToSelect);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
sortOptions(options) {
|
|
215
|
+
return [...options].sort((a, b) => {
|
|
216
|
+
return this.sortDirection === 'asc'
|
|
217
|
+
? a.displayValue.localeCompare(b.displayValue)
|
|
218
|
+
: b.displayValue.localeCompare(a.displayValue);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* @ignore
|
|
223
|
+
*/
|
|
224
|
+
listenForFilterFieldValueChanges() {
|
|
225
|
+
this.filterControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
226
|
+
this.filterOptions();
|
|
227
|
+
if (this.multiple) {
|
|
228
|
+
this.determineToggleAllCheckboxState();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @ignore
|
|
234
|
+
*/
|
|
235
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
236
|
+
changeParentValue = (value) => {
|
|
237
|
+
// Intentionally left empty
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* @ignore
|
|
241
|
+
*/
|
|
242
|
+
markParentControlAsTouched = () => {
|
|
243
|
+
// Intentionally left empty
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* @ignore
|
|
247
|
+
*
|
|
248
|
+
* Store the parent control, its validators and async validators in properties
|
|
249
|
+
* of this component.
|
|
250
|
+
*/
|
|
251
|
+
initializePropertiesFromParent() {
|
|
252
|
+
this.parentControl = this.parentControlDirective.control;
|
|
253
|
+
this.validateParent =
|
|
254
|
+
(this.parentControl.validator && this.parentControl.validator.bind(this.parentControl)) ||
|
|
255
|
+
(() => null);
|
|
256
|
+
this.validateParentAsync =
|
|
257
|
+
(this.parentControl.asyncValidator &&
|
|
258
|
+
this.parentControl.asyncValidator.bind(this.parentControl)) ||
|
|
259
|
+
(() => of(null));
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* @ignore
|
|
263
|
+
*
|
|
264
|
+
* Inherit validators from parent form control.
|
|
265
|
+
*/
|
|
266
|
+
bindParentValidatorsToControl() {
|
|
267
|
+
const validators = !this.matSelectControl.validator
|
|
268
|
+
? [this.validateParent]
|
|
269
|
+
: Array.isArray(this.matSelectControl.validator)
|
|
270
|
+
? [...this.matSelectControl.validator, this.validateParent]
|
|
271
|
+
: [this.matSelectControl.validator, this.validateParent];
|
|
272
|
+
this.matSelectControl.setValidators(validators);
|
|
273
|
+
const asyncValidators = !this.matSelectControl.asyncValidator
|
|
274
|
+
? [this.validateParentAsync]
|
|
275
|
+
: Array.isArray(this.matSelectControl.asyncValidator)
|
|
276
|
+
? [...this.matSelectControl.asyncValidator, this.validateParentAsync]
|
|
277
|
+
: [this.matSelectControl.asyncValidator, this.validateParentAsync];
|
|
278
|
+
this.matSelectControl.setAsyncValidators(asyncValidators);
|
|
279
|
+
this.matSelectControl.updateValueAndValidity();
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @ignore
|
|
283
|
+
*
|
|
284
|
+
* Emit values to the parent form control when our form control's value
|
|
285
|
+
* changes.
|
|
286
|
+
*
|
|
287
|
+
* Reflect parent validation errors in our form control.
|
|
288
|
+
*/
|
|
289
|
+
bindControlToParent() {
|
|
290
|
+
this.matSelectControl.valueChanges
|
|
291
|
+
.pipe(map((value) => (value === undefined ? null : value)), map((value) => {
|
|
292
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
return value;
|
|
296
|
+
}), takeUntilDestroyed(this._destroyRef))
|
|
297
|
+
.subscribe((value) => {
|
|
298
|
+
if (this.multiple) {
|
|
299
|
+
this.determineToggleAllCheckboxState();
|
|
300
|
+
}
|
|
301
|
+
this.markParentControlAsTouched();
|
|
302
|
+
this.changeParentValue(value);
|
|
303
|
+
});
|
|
304
|
+
this.parentControl?.statusChanges
|
|
305
|
+
.pipe(map(() => ({
|
|
306
|
+
...this.parentControl?.errors,
|
|
307
|
+
})), map((errors) => (Object.keys(errors).length > 0 ? errors : null)), takeUntilDestroyed(this._destroyRef))
|
|
308
|
+
.subscribe((errors) => {
|
|
309
|
+
this.matSelectControl.setErrors(errors);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* @ignore
|
|
314
|
+
*/
|
|
315
|
+
filterOptions() {
|
|
316
|
+
if (!this._options) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
// get the search keyword
|
|
320
|
+
let search = this.filterControl.value.trim();
|
|
321
|
+
if (search) {
|
|
322
|
+
search = search.toLowerCase();
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
return this.filteredOptions$.next(this._options.slice());
|
|
326
|
+
}
|
|
327
|
+
// filter the options
|
|
328
|
+
this.filteredOptions$.next(this._options.filter((option) => option.displayValue.toLowerCase().indexOf(search) > -1));
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @ignore
|
|
332
|
+
*/
|
|
333
|
+
determineToggleAllCheckboxState() {
|
|
334
|
+
this.filteredOptions$
|
|
335
|
+
.pipe(take(1), filter((options) => options != null && options !== undefined), map((options) => options.map((option) => option.value)))
|
|
336
|
+
.subscribe((filteredOptions) => {
|
|
337
|
+
const selectedOptions = this.matSelectControl.value;
|
|
338
|
+
if (Array.isArray(selectedOptions)) {
|
|
339
|
+
const selectedFilteredOptions = filteredOptions.filter((option) => selectedOptions.includes(option));
|
|
340
|
+
this.isToggleAllIndeterminate =
|
|
341
|
+
selectedFilteredOptions.length > 0 &&
|
|
342
|
+
selectedFilteredOptions.length < filteredOptions.length;
|
|
343
|
+
this.isToggleAllChecked =
|
|
344
|
+
selectedFilteredOptions.length > 0 &&
|
|
345
|
+
selectedFilteredOptions.length === filteredOptions.length;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
350
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDropdownComponent, isStandalone: true, selector: "watt-dropdown", inputs: { hideSearch: "hideSearch", panelWidth: "panelWidth", getCustomTrigger: "getCustomTrigger", chipMode: "chipMode", disableSelectedMode: "disableSelectedMode", sortDirection: "sortDirection", options: "options", multiple: "multiple", showResetOption: "showResetOption", placeholder: "placeholder", label: "label", noOptionsFoundLabel: "noOptionsFoundLabel" }, host: { properties: { "attr.watt-field-disabled": "this.isDisabled", "class.watt-chip-mode": "this.chipModeClass" } }, viewQueries: [{ propertyName: "matSelect", first: true, predicate: ["matSelect"], descendants: true, static: true }], ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field\n [control]=\"parentControl\"\n [chipMode]=\"chipMode\"\n [label]=\"label\"\n (click)=\"matSelect.open()\"\n>\n @if (chipMode) {\n <watt-menu-chip\n [opened]=\"matSelect.panelOpen\"\n (toggle)=\"matSelect.open()\"\n [selected]=\"!!matSelect?.triggerValue && !disableSelectedMode\"\n [disabled]=\"matSelectControl.disabled\"\n >\n {{ placeholder }}\n @if (showTriggerValue) {\n <span>\n @if (placeholder) {\n :\n }\n {{ getCustomTrigger?.(matSelect.value) ?? matSelect?.triggerValue }}\n </span>\n }\n @if (showChipLabel) {\n <span class=\"watt-chip-label\">{{ matSelectControl.value?.length }}</span>\n }\n </watt-menu-chip>\n }\n\n <mat-select\n [attr.aria-label]=\"label\"\n [formControl]=\"matSelectControl\"\n [placeholder]=\"placeholder\"\n #matSelect\n [panelWidth]=\"panelWidth\"\n [multiple]=\"multiple\"\n [ngClass]=\"{ chip: chipMode }\"\n [panelClass]=\"{\n 'watt-dropdown-panel': true,\n 'watt-dropdown-panel-chip-mode': chipMode,\n }\"\n >\n <!-- We use this instead of ngIf, since it will trigger a NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. -->\n <mat-option [style.display]=\"!hideSearch ? 'block' : 'none'\">\n <ngx-mat-select-search\n [formControl]=\"filterControl\"\n [placeholderLabel]=\"placeholder\"\n closeIcon=\"close\"\n [showToggleAllCheckbox]=\"multiple\"\n (toggleAll)=\"onToggleAll($event)\"\n [toggleAllCheckboxChecked]=\"isToggleAllChecked\"\n [toggleAllCheckboxIndeterminate]=\"isToggleAllIndeterminate\"\n [noEntriesFoundLabel]=\"noOptionsFoundLabel\"\n >\n <watt-icon ngxMatSelectSearchClear name=\"close\" size=\"s\" />\n </ngx-mat-select-search>\n </mat-option>\n\n @if (!multiple && showResetOption) {\n <mat-option>{{ emDash }}</mat-option>\n }\n\n @for (option of filteredOptions$ | push; track option) {\n <mat-option [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.displayValue }}\n </mat-option>\n }\n </mat-select>\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n", styles: ["watt-dropdown:not(.watt-chip-mode){width:100%}watt-dropdown{--watt-input-color: var(--watt-typography-text-color);--watt-input-placeholder-color: var(--watt-on-light-high-emphasis);display:block;width:auto;overflow:hidden}watt-dropdown watt-field label .watt-field-wrapper{padding:0;position:relative}watt-dropdown.watt-chip-mode.ng-dirty.ng-invalid .watt-field-wrapper watt-chip label{border:1px solid var(--watt-color-state-danger)}watt-dropdown.watt-chip-mode[disabled=true] watt-field label .watt-field-wrapper{background-color:transparent}watt-dropdown .mat-input-element{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;color:var(--watt-input-color);caret-color:var(--watt-color-neutral-grey-900)!important;padding:0 12px}watt-dropdown .mat-mdc-select-arrow{color:var(--watt-dropdown-arrow-color, rgba(0, 0, 0, .54));border:none;width:auto;height:auto}watt-dropdown .mat-mdc-select-arrow:before{width:.6em;height:.6em;bottom:.2em;position:relative;display:inline-block;border-style:solid;border-width:0 0 .15em .15em;transform:rotate(315deg);border-color:var(--watt-color-primary);content:\"\"}watt-dropdown .mat-mdc-select-arrow svg{display:none}watt-dropdown .mat-mdc-select-trigger{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;padding:0 var(--watt-space-m)}watt-dropdown .mat-mdc-select-value{color:var(--watt-color-neutral-black);padding-right:var(--watt-space-m)}watt-dropdown .mat-mdc-select.mat-mdc-select-invalid.ng-pristine .mat-mdc-select-arrow{color:currentColor}watt-dropdown .watt-chip-label{float:right;margin-left:var(--watt-space-s);background:var(--watt-color-neutral-white)}watt-dropdown .watt-field--chip .mat-mdc-select{visibility:hidden;position:absolute;width:100%}watt-dropdown .mat-mdc-select-placeholder{color:var(--watt-input-placeholder-color)}watt-dropdown watt-field label .watt-field-wrapper{background-color:transparent}.watt-dropdown-panel{--watt-input-color: var(--watt-typography-text-color);padding:0}.watt-dropdown-panel mat-option:nth-of-type(2){border-top:1px solid var(--watt-color-neutral-grey-300)}.watt-dropdown-panel .mat-select-search-inner-row .mat-select-search-input,.watt-dropdown-panel mat-option.contains-mat-select-search{height:48px}.watt-dropdown-panel:not(.watt-dropdown-panel-chip-mode){min-width:calc(100% + 2px)!important;margin-top:-36px;margin-left:-1px;min-height:48px}.watt-dropdown-panel .mat-mdc-checkbox.mat-select-search-toggle-all-checkbox{padding:0;margin:0 var(--watt-space-m)}.watt-dropdown-panel .mat-datepicker-content .mat-mdc-icon-button{--mat-mdc-button-persistent-ripple-color: transparent;--mat-mdc-button-ripple-color: transparent}.watt-dropdown-panel.watt-dropdown-panel-chip-mode{margin-top:4px}.watt-dropdown-panel.mat-mdc-select-search-panel{transform:scaleY(1)!important}.watt-dropdown-panel .mat-mdc-option.mdc-list-item.contains-mat-select-search.mat-mdc-option-multiple{background-color:transparent}.watt-dropdown-panel ngx-mat-select-search .mat-select-search-inner-multiple .mat-select-search-inner-row{margin-left:5px}.watt-dropdown-panel ngx-mat-select-search .mat-mdc-checkbox.mat-select-search-toggle-all-checkbox{margin:0}.watt-dropdown-panel .mdc-list-item .mat-select-search-input,.watt-dropdown-panel .mat-mdc-option.mdc-list-item,.watt-dropdown-panel .mat-select-search-no-entries-found{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;color:var(--watt-input-color)}.watt-dropdown-panel .mat-mdc-option.mdc-list-item .mat-select-search-no-entries-found{padding:var(--watt-space-s)}.watt-dropdown-panel .mat-checkbox-frame,.watt-dropdown-panel .mat-mdc-checkbox{border-color:var(--watt-color-primary)}.watt-dropdown-panel :not(.mat-mdc-option-multiple) .mat-pseudo-checkbox{display:none}.watt-dropdown-panel .mat-pseudo-checkbox,.watt-dropdown-panel .mat-mdc-checkbox{color:var(--watt-color-primary)}.watt-dropdown-panel .mat-mdc-option{color:var(--watt-color-neutral-black);min-height:42px}.watt-dropdown-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search{margin-top:0;top:auto}.watt-dropdown-panel .mat-mdc-option.mdc-list-item.mat-mdc-option-active,.watt-dropdown-panel .mat-mdc-option.mdc-list-item.mdc-list-item--selected.mat-mdc-option-active:not(.mat-mdc-option-multiple),.watt-dropdown-panel .mat-mdc-option:hover:not(.mat-mdc-option-disabled,.contains-mat-select-search),.watt-dropdown-panel .mat-mdc-option:focus:not(.mat-mdc-option-disabled){background-color:var(--watt-color-primary-light)}.watt-dropdown-panel .mat-mdc-option .mat-mdc-select-search-no-entries-found{text-align:center;padding:0}.watt-dropdown-panel .mat-mdc-option.mat-mdc-option-disabled{color:var(--watt-color-neutral-grey-400);cursor:not-allowed}.watt-dropdown-panel .mat-mdc-select-search-input:not(.mat-mdc-select-search-hidden){color:var(--watt-color-neutral-black)}.watt-dropdown-panel .mat-mdc-select-search-clear{background-color:var(--watt-color-neutral-white);color:var(--watt-color-neutral-grey-400)}.watt-dropdown-panel .mat-mdc-select-search-clear mat-icon{line-height:20px!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: RxPush, name: "push" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxMatSelectSearchModule }, { kind: "component", type: i4.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i4.MatSelectSearchClearDirective, selector: "[ngxMatSelectSearchClear]" }, { kind: "component", type: WattMenuChipComponent, selector: "watt-menu-chip", inputs: ["opened", "disabled", "name", "value", "selected", "hasPopup"], outputs: ["toggle"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
351
|
+
}
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDropdownComponent, decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{ selector: 'watt-dropdown', encapsulation: ViewEncapsulation.None, imports: [
|
|
355
|
+
NgClass,
|
|
356
|
+
MatSelectModule,
|
|
357
|
+
RxPush,
|
|
358
|
+
ReactiveFormsModule,
|
|
359
|
+
NgxMatSelectSearchModule,
|
|
360
|
+
WattMenuChipComponent,
|
|
361
|
+
WattFieldComponent,
|
|
362
|
+
WattIconComponent,
|
|
363
|
+
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field\n [control]=\"parentControl\"\n [chipMode]=\"chipMode\"\n [label]=\"label\"\n (click)=\"matSelect.open()\"\n>\n @if (chipMode) {\n <watt-menu-chip\n [opened]=\"matSelect.panelOpen\"\n (toggle)=\"matSelect.open()\"\n [selected]=\"!!matSelect?.triggerValue && !disableSelectedMode\"\n [disabled]=\"matSelectControl.disabled\"\n >\n {{ placeholder }}\n @if (showTriggerValue) {\n <span>\n @if (placeholder) {\n :\n }\n {{ getCustomTrigger?.(matSelect.value) ?? matSelect?.triggerValue }}\n </span>\n }\n @if (showChipLabel) {\n <span class=\"watt-chip-label\">{{ matSelectControl.value?.length }}</span>\n }\n </watt-menu-chip>\n }\n\n <mat-select\n [attr.aria-label]=\"label\"\n [formControl]=\"matSelectControl\"\n [placeholder]=\"placeholder\"\n #matSelect\n [panelWidth]=\"panelWidth\"\n [multiple]=\"multiple\"\n [ngClass]=\"{ chip: chipMode }\"\n [panelClass]=\"{\n 'watt-dropdown-panel': true,\n 'watt-dropdown-panel-chip-mode': chipMode,\n }\"\n >\n <!-- We use this instead of ngIf, since it will trigger a NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. -->\n <mat-option [style.display]=\"!hideSearch ? 'block' : 'none'\">\n <ngx-mat-select-search\n [formControl]=\"filterControl\"\n [placeholderLabel]=\"placeholder\"\n closeIcon=\"close\"\n [showToggleAllCheckbox]=\"multiple\"\n (toggleAll)=\"onToggleAll($event)\"\n [toggleAllCheckboxChecked]=\"isToggleAllChecked\"\n [toggleAllCheckboxIndeterminate]=\"isToggleAllIndeterminate\"\n [noEntriesFoundLabel]=\"noOptionsFoundLabel\"\n >\n <watt-icon ngxMatSelectSearchClear name=\"close\" size=\"s\" />\n </ngx-mat-select-search>\n </mat-option>\n\n @if (!multiple && showResetOption) {\n <mat-option>{{ emDash }}</mat-option>\n }\n\n @for (option of filteredOptions$ | push; track option) {\n <mat-option [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.displayValue }}\n </mat-option>\n }\n </mat-select>\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n", styles: ["watt-dropdown:not(.watt-chip-mode){width:100%}watt-dropdown{--watt-input-color: var(--watt-typography-text-color);--watt-input-placeholder-color: var(--watt-on-light-high-emphasis);display:block;width:auto;overflow:hidden}watt-dropdown watt-field label .watt-field-wrapper{padding:0;position:relative}watt-dropdown.watt-chip-mode.ng-dirty.ng-invalid .watt-field-wrapper watt-chip label{border:1px solid var(--watt-color-state-danger)}watt-dropdown.watt-chip-mode[disabled=true] watt-field label .watt-field-wrapper{background-color:transparent}watt-dropdown .mat-input-element{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;color:var(--watt-input-color);caret-color:var(--watt-color-neutral-grey-900)!important;padding:0 12px}watt-dropdown .mat-mdc-select-arrow{color:var(--watt-dropdown-arrow-color, rgba(0, 0, 0, .54));border:none;width:auto;height:auto}watt-dropdown .mat-mdc-select-arrow:before{width:.6em;height:.6em;bottom:.2em;position:relative;display:inline-block;border-style:solid;border-width:0 0 .15em .15em;transform:rotate(315deg);border-color:var(--watt-color-primary);content:\"\"}watt-dropdown .mat-mdc-select-arrow svg{display:none}watt-dropdown .mat-mdc-select-trigger{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;padding:0 var(--watt-space-m)}watt-dropdown .mat-mdc-select-value{color:var(--watt-color-neutral-black);padding-right:var(--watt-space-m)}watt-dropdown .mat-mdc-select.mat-mdc-select-invalid.ng-pristine .mat-mdc-select-arrow{color:currentColor}watt-dropdown .watt-chip-label{float:right;margin-left:var(--watt-space-s);background:var(--watt-color-neutral-white)}watt-dropdown .watt-field--chip .mat-mdc-select{visibility:hidden;position:absolute;width:100%}watt-dropdown .mat-mdc-select-placeholder{color:var(--watt-input-placeholder-color)}watt-dropdown watt-field label .watt-field-wrapper{background-color:transparent}.watt-dropdown-panel{--watt-input-color: var(--watt-typography-text-color);padding:0}.watt-dropdown-panel mat-option:nth-of-type(2){border-top:1px solid var(--watt-color-neutral-grey-300)}.watt-dropdown-panel .mat-select-search-inner-row .mat-select-search-input,.watt-dropdown-panel mat-option.contains-mat-select-search{height:48px}.watt-dropdown-panel:not(.watt-dropdown-panel-chip-mode){min-width:calc(100% + 2px)!important;margin-top:-36px;margin-left:-1px;min-height:48px}.watt-dropdown-panel .mat-mdc-checkbox.mat-select-search-toggle-all-checkbox{padding:0;margin:0 var(--watt-space-m)}.watt-dropdown-panel .mat-datepicker-content .mat-mdc-icon-button{--mat-mdc-button-persistent-ripple-color: transparent;--mat-mdc-button-ripple-color: transparent}.watt-dropdown-panel.watt-dropdown-panel-chip-mode{margin-top:4px}.watt-dropdown-panel.mat-mdc-select-search-panel{transform:scaleY(1)!important}.watt-dropdown-panel .mat-mdc-option.mdc-list-item.contains-mat-select-search.mat-mdc-option-multiple{background-color:transparent}.watt-dropdown-panel ngx-mat-select-search .mat-select-search-inner-multiple .mat-select-search-inner-row{margin-left:5px}.watt-dropdown-panel ngx-mat-select-search .mat-mdc-checkbox.mat-select-search-toggle-all-checkbox{margin:0}.watt-dropdown-panel .mdc-list-item .mat-select-search-input,.watt-dropdown-panel .mat-mdc-option.mdc-list-item,.watt-dropdown-panel .mat-select-search-no-entries-found{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;color:var(--watt-input-color)}.watt-dropdown-panel .mat-mdc-option.mdc-list-item .mat-select-search-no-entries-found{padding:var(--watt-space-s)}.watt-dropdown-panel .mat-checkbox-frame,.watt-dropdown-panel .mat-mdc-checkbox{border-color:var(--watt-color-primary)}.watt-dropdown-panel :not(.mat-mdc-option-multiple) .mat-pseudo-checkbox{display:none}.watt-dropdown-panel .mat-pseudo-checkbox,.watt-dropdown-panel .mat-mdc-checkbox{color:var(--watt-color-primary)}.watt-dropdown-panel .mat-mdc-option{color:var(--watt-color-neutral-black);min-height:42px}.watt-dropdown-panel .mat-mdc-option[aria-disabled=true].contains-mat-select-search{margin-top:0;top:auto}.watt-dropdown-panel .mat-mdc-option.mdc-list-item.mat-mdc-option-active,.watt-dropdown-panel .mat-mdc-option.mdc-list-item.mdc-list-item--selected.mat-mdc-option-active:not(.mat-mdc-option-multiple),.watt-dropdown-panel .mat-mdc-option:hover:not(.mat-mdc-option-disabled,.contains-mat-select-search),.watt-dropdown-panel .mat-mdc-option:focus:not(.mat-mdc-option-disabled){background-color:var(--watt-color-primary-light)}.watt-dropdown-panel .mat-mdc-option .mat-mdc-select-search-no-entries-found{text-align:center;padding:0}.watt-dropdown-panel .mat-mdc-option.mat-mdc-option-disabled{color:var(--watt-color-neutral-grey-400);cursor:not-allowed}.watt-dropdown-panel .mat-mdc-select-search-input:not(.mat-mdc-select-search-hidden){color:var(--watt-color-neutral-black)}.watt-dropdown-panel .mat-mdc-select-search-clear{background-color:var(--watt-color-neutral-white);color:var(--watt-color-neutral-grey-400)}.watt-dropdown-panel .mat-mdc-select-search-clear mat-icon{line-height:20px!important}\n"] }]
|
|
364
|
+
}], ctorParameters: () => [], propDecorators: { isDisabled: [{
|
|
365
|
+
type: HostBinding,
|
|
366
|
+
args: ['attr.watt-field-disabled']
|
|
367
|
+
}], matSelect: [{
|
|
368
|
+
type: ViewChild,
|
|
369
|
+
args: ['matSelect', { static: true }]
|
|
370
|
+
}], hideSearch: [{
|
|
371
|
+
type: Input
|
|
372
|
+
}], panelWidth: [{
|
|
373
|
+
type: Input
|
|
374
|
+
}], getCustomTrigger: [{
|
|
375
|
+
type: Input
|
|
376
|
+
}], chipMode: [{
|
|
377
|
+
type: Input
|
|
378
|
+
}], chipModeClass: [{
|
|
379
|
+
type: HostBinding,
|
|
380
|
+
args: ['class.watt-chip-mode']
|
|
381
|
+
}], disableSelectedMode: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], sortDirection: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], options: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}], multiple: [{
|
|
388
|
+
type: Input
|
|
389
|
+
}], showResetOption: [{
|
|
390
|
+
type: Input
|
|
391
|
+
}], placeholder: [{
|
|
392
|
+
type: Input
|
|
393
|
+
}], label: [{
|
|
394
|
+
type: Input
|
|
395
|
+
}], noOptionsFoundLabel: [{
|
|
396
|
+
type: Input
|
|
397
|
+
}] } });
|
|
398
|
+
|
|
399
|
+
//#region License
|
|
400
|
+
/**
|
|
401
|
+
* @license
|
|
402
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
403
|
+
*
|
|
404
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
405
|
+
* you may not use this file except in compliance with the License.
|
|
406
|
+
* You may obtain a copy of the License at
|
|
407
|
+
*
|
|
408
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
409
|
+
*
|
|
410
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
411
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
412
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
413
|
+
* See the License for the specific language governing permissions and
|
|
414
|
+
* limitations under the License.
|
|
415
|
+
*/
|
|
416
|
+
//#endregion
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Generated bundle index. Do not edit.
|
|
420
|
+
*/
|
|
421
|
+
|
|
422
|
+
export { WattDropdownComponent };
|
|
423
|
+
//# sourceMappingURL=energinet-watt-dropdown.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energinet-watt-dropdown.mjs","sources":["../../../libs/watt/package/dropdown/watt-dropdown.component.ts","../../../libs/watt/package/dropdown/watt-dropdown.component.html","../../../libs/watt/package/dropdown/index.ts","../../../libs/watt/package/dropdown/energinet-watt-dropdown.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n DestroyRef,\n HostBinding,\n Input,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {\n AsyncValidatorFn,\n ControlValueAccessor,\n FormControl,\n NgControl,\n UntypedFormControl,\n ValidationErrors,\n ValidatorFn,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { NgClass } from '@angular/common';\nimport { RxPush } from '@rx-angular/template/push';\nimport { MatSelectModule, MatSelect } from '@angular/material/select';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { of, ReplaySubject, map, take, filter } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport type { WattDropdownOptions } from './watt-dropdown-option';\nimport type { WattDropdownValue } from './watt-dropdown-value';\nimport { WattMenuChipComponent } from '@energinet/watt/chip';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n selector: 'watt-dropdown',\n templateUrl: './watt-dropdown.component.html',\n styleUrls: ['./watt-dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgClass,\n MatSelectModule,\n RxPush,\n ReactiveFormsModule,\n NgxMatSelectSearchModule,\n WattMenuChipComponent,\n WattFieldComponent,\n WattIconComponent,\n ],\n})\nexport class WattDropdownComponent implements ControlValueAccessor, OnInit {\n private parentControlDirective = inject(NgControl, { host: true });\n /**\n * @ignore\n */\n private _destroyRef = inject(DestroyRef);\n /**\n * @ignore\n */\n parentControl: FormControl | null = null;\n /**\n * @ignore\n */\n private validateParent?: ValidatorFn;\n /**\n * @ignore\n */\n private validateParentAsync?: AsyncValidatorFn;\n\n /**\n * @ignore\n *\n */\n @HostBinding('attr.watt-field-disabled') isDisabled = false;\n\n /**\n * @ignore\n */\n matSelectControl = new FormControl<string | string[] | undefined | null>(null);\n\n /**\n * Control for the MatSelect filter keyword\n *\n * @ignore\n */\n filterControl = new UntypedFormControl();\n\n /**\n * List of options filtered by search keyword\n *\n * @ignore\n */\n filteredOptions$ = new ReplaySubject<WattDropdownOptions>(1);\n\n /**\n * @ignore\n */\n emDash = '—';\n\n /**\n * @ignore\n */\n isToggleAllChecked = false;\n\n /**\n * @ignore\n */\n isToggleAllIndeterminate = false;\n\n _options: WattDropdownOptions = [];\n\n /**\n * @ignore\n */\n get showTriggerValue(): boolean {\n return (this.multiple &&\n this.matSelectControl.value?.length === 1 &&\n this.matSelectControl.value[0] !== '') ||\n (!this.multiple && this.matSelect?.triggerValue)\n ? true\n : false;\n }\n\n /**\n * @ignore\n */\n get showChipLabel() {\n return this.multiple && this.matSelectControl.value && this.matSelectControl.value.length > 1\n ? true\n : false;\n }\n\n /**\n * @ignore\n */\n @ViewChild('matSelect', { static: true }) matSelect?: MatSelect;\n\n @Input() hideSearch = false;\n @Input() panelWidth: null | 'auto' = null;\n @Input() getCustomTrigger?: (value: string | string[]) => string;\n\n /**\n * Set the mode of the dropdown.\n */\n @Input() chipMode = false;\n @HostBinding('class.watt-chip-mode')\n get chipModeClass() {\n return this.chipMode;\n }\n\n @Input() disableSelectedMode = false;\n\n @Input()\n sortDirection: 'asc' | 'desc' | undefined = undefined;\n\n /**\n * Sets the options for the dropdown.\n */\n @Input()\n set options(options: WattDropdownOptions) {\n if (Array.isArray(options)) {\n let optionsCopy = [...options];\n\n if (this.sortDirection) {\n optionsCopy = this.sortOptions(optionsCopy);\n }\n\n this._options = optionsCopy;\n this.filteredOptions$.next(optionsCopy);\n }\n }\n get options(): WattDropdownOptions {\n return this._options;\n }\n\n /**\n * Sets support for selecting multiple dropdown options.\n */\n @Input() multiple = false;\n\n /**\n * Sets support for hiding the reset option in \"single\" select mode.\n */\n @Input() showResetOption = true;\n\n /**\n * Sets the placeholder for the dropdown.\n */\n @Input() placeholder = '';\n\n /**\n * Sets the label for the dropdown.\n */\n @Input() label = '';\n\n /**\n * Label to be shown when no options are found after filtering.\n *\n * Note: The label is visible in \"multiple\" mode only.\n */\n @Input() noOptionsFoundLabel = '';\n\n constructor() {\n this.parentControlDirective.valueAccessor = this;\n }\n\n /**\n * @ignore\n */\n ngOnInit(): void {\n this.listenForFilterFieldValueChanges();\n this.initializePropertiesFromParent();\n this.bindParentValidatorsToControl();\n this.bindControlToParent();\n }\n\n /**\n * @ignore\n */\n writeValue(value: WattDropdownValue): void {\n this.matSelectControl.setValue(value);\n }\n\n /**\n * @ignore\n */\n registerOnChange(onChangeFn: (value: WattDropdownValue) => void): void {\n this.changeParentValue = onChangeFn;\n }\n\n /**\n * @ignore\n */\n registerOnTouched(onTouchFn: () => void) {\n this.markParentControlAsTouched = onTouchFn;\n }\n\n /**\n * @ignore\n */\n setDisabledState(shouldDisable: boolean): void {\n this.isDisabled = shouldDisable;\n if (shouldDisable) {\n this.matSelectControl.disable();\n } else {\n this.matSelectControl.enable();\n }\n }\n\n /**\n * @ignore\n */\n onToggleAll(toggleAllState: boolean): void {\n this.filteredOptions$\n .pipe(\n take(1),\n map((options) => options.map((option) => option.value))\n )\n .subscribe((filteredOptions: string[]) => {\n const optionsToSelect = toggleAllState ? filteredOptions : [];\n this.matSelectControl.patchValue(optionsToSelect);\n });\n }\n\n public sortOptions(options: WattDropdownOptions): WattDropdownOptions {\n return [...options].sort((a, b) => {\n return this.sortDirection === 'asc'\n ? a.displayValue.localeCompare(b.displayValue)\n : b.displayValue.localeCompare(a.displayValue);\n });\n }\n\n /**\n * @ignore\n */\n private listenForFilterFieldValueChanges() {\n this.filterControl.valueChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {\n this.filterOptions();\n\n if (this.multiple) {\n this.determineToggleAllCheckboxState();\n }\n });\n }\n\n /**\n * @ignore\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private changeParentValue = (value: WattDropdownValue): void => {\n // Intentionally left empty\n };\n\n /**\n * @ignore\n */\n private markParentControlAsTouched = (): void => {\n // Intentionally left empty\n };\n\n /**\n * @ignore\n *\n * Store the parent control, its validators and async validators in properties\n * of this component.\n */\n private initializePropertiesFromParent(): void {\n this.parentControl = this.parentControlDirective.control as UntypedFormControl;\n\n this.validateParent =\n (this.parentControl.validator && this.parentControl.validator.bind(this.parentControl)) ||\n (() => null);\n\n this.validateParentAsync =\n (this.parentControl.asyncValidator &&\n this.parentControl.asyncValidator.bind(this.parentControl)) ||\n (() => of(null));\n }\n\n /**\n * @ignore\n *\n * Inherit validators from parent form control.\n */\n private bindParentValidatorsToControl(): void {\n const validators = !this.matSelectControl.validator\n ? [this.validateParent]\n : Array.isArray(this.matSelectControl.validator)\n ? [...this.matSelectControl.validator, this.validateParent]\n : [this.matSelectControl.validator, this.validateParent];\n this.matSelectControl.setValidators(validators);\n\n const asyncValidators = !this.matSelectControl.asyncValidator\n ? [this.validateParentAsync]\n : Array.isArray(this.matSelectControl.asyncValidator)\n ? [...this.matSelectControl.asyncValidator, this.validateParentAsync]\n : [this.matSelectControl.asyncValidator, this.validateParentAsync];\n this.matSelectControl.setAsyncValidators(asyncValidators);\n\n this.matSelectControl.updateValueAndValidity();\n }\n\n /**\n * @ignore\n *\n * Emit values to the parent form control when our form control's value\n * changes.\n *\n * Reflect parent validation errors in our form control.\n */\n private bindControlToParent(): void {\n this.matSelectControl.valueChanges\n .pipe(\n map((value) => (value === undefined ? null : value)),\n map((value: WattDropdownValue) => {\n if (Array.isArray(value) && value.length === 0) {\n return null;\n }\n\n return value;\n }),\n takeUntilDestroyed(this._destroyRef)\n )\n .subscribe((value: WattDropdownValue) => {\n if (this.multiple) {\n this.determineToggleAllCheckboxState();\n }\n\n this.markParentControlAsTouched();\n this.changeParentValue(value);\n });\n\n this.parentControl?.statusChanges\n .pipe(\n map(\n () =>\n ({\n ...this.parentControl?.errors,\n }) as ValidationErrors\n ),\n map((errors) => (Object.keys(errors).length > 0 ? errors : null)),\n takeUntilDestroyed(this._destroyRef)\n )\n .subscribe((errors) => {\n this.matSelectControl.setErrors(errors);\n });\n }\n\n /**\n * @ignore\n */\n private filterOptions() {\n if (!this._options) {\n return;\n }\n\n // get the search keyword\n let search = (this.filterControl.value as string).trim();\n\n if (search) {\n search = search.toLowerCase();\n } else {\n return this.filteredOptions$.next(this._options.slice());\n }\n\n // filter the options\n this.filteredOptions$.next(\n this._options.filter((option) => option.displayValue.toLowerCase().indexOf(search) > -1)\n );\n }\n\n /**\n * @ignore\n */\n private determineToggleAllCheckboxState(): void {\n this.filteredOptions$\n .pipe(\n take(1),\n filter((options) => options != null && options !== undefined),\n map((options) => options.map((option) => option.value))\n )\n .subscribe((filteredOptions: string[]) => {\n const selectedOptions = this.matSelectControl.value;\n\n if (Array.isArray(selectedOptions)) {\n const selectedFilteredOptions = filteredOptions.filter((option) =>\n selectedOptions.includes(option)\n );\n\n this.isToggleAllIndeterminate =\n selectedFilteredOptions.length > 0 &&\n selectedFilteredOptions.length < filteredOptions.length;\n\n this.isToggleAllChecked =\n selectedFilteredOptions.length > 0 &&\n selectedFilteredOptions.length === filteredOptions.length;\n }\n });\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field\n [control]=\"parentControl\"\n [chipMode]=\"chipMode\"\n [label]=\"label\"\n (click)=\"matSelect.open()\"\n>\n @if (chipMode) {\n <watt-menu-chip\n [opened]=\"matSelect.panelOpen\"\n (toggle)=\"matSelect.open()\"\n [selected]=\"!!matSelect?.triggerValue && !disableSelectedMode\"\n [disabled]=\"matSelectControl.disabled\"\n >\n {{ placeholder }}\n @if (showTriggerValue) {\n <span>\n @if (placeholder) {\n :\n }\n {{ getCustomTrigger?.(matSelect.value) ?? matSelect?.triggerValue }}\n </span>\n }\n @if (showChipLabel) {\n <span class=\"watt-chip-label\">{{ matSelectControl.value?.length }}</span>\n }\n </watt-menu-chip>\n }\n\n <mat-select\n [attr.aria-label]=\"label\"\n [formControl]=\"matSelectControl\"\n [placeholder]=\"placeholder\"\n #matSelect\n [panelWidth]=\"panelWidth\"\n [multiple]=\"multiple\"\n [ngClass]=\"{ chip: chipMode }\"\n [panelClass]=\"{\n 'watt-dropdown-panel': true,\n 'watt-dropdown-panel-chip-mode': chipMode,\n }\"\n >\n <!-- We use this instead of ngIf, since it will trigger a NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. -->\n <mat-option [style.display]=\"!hideSearch ? 'block' : 'none'\">\n <ngx-mat-select-search\n [formControl]=\"filterControl\"\n [placeholderLabel]=\"placeholder\"\n closeIcon=\"close\"\n [showToggleAllCheckbox]=\"multiple\"\n (toggleAll)=\"onToggleAll($event)\"\n [toggleAllCheckboxChecked]=\"isToggleAllChecked\"\n [toggleAllCheckboxIndeterminate]=\"isToggleAllIndeterminate\"\n [noEntriesFoundLabel]=\"noOptionsFoundLabel\"\n >\n <watt-icon ngxMatSelectSearchClear name=\"close\" size=\"s\" />\n </ngx-mat-select-search>\n </mat-option>\n\n @if (!multiple && showResetOption) {\n <mat-option>{{ emDash }}</mat-option>\n }\n\n @for (option of filteredOptions$ | push; track option) {\n <mat-option [value]=\"option.value\" [disabled]=\"option.disabled\">\n {{ option.displayValue }}\n </mat-option>\n }\n </mat-select>\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDropdownComponent } from './watt-dropdown.component';\nexport { type WattDropdownOption, type WattDropdownOptions } from './watt-dropdown-option';\nexport { type WattDropdownValue } from './watt-dropdown-value';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;A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