@onemrvapublic/design-system 20.11.3 → 21.0.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -9
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs +14 -20
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-layout.mjs +207 -290
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +19 -25
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs +58 -223
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs +47 -53
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +50 -71
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +27 -29
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +24 -42
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +8 -12
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +4 -4
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs +10 -18
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +98 -173
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +32 -52
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +10 -13
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +10 -13
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +24 -44
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +22 -40
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +26 -39
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs +45 -180
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +38 -63
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs +40 -65
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +19 -59
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs +23 -49
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs +61 -101
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs +30 -50
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs +26 -38
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +66 -105
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +23 -43
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs +15 -26
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs +62 -177
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs +17 -21
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +14 -22
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs +8 -8
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +79 -93
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs +59 -94
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +178 -245
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +7 -7
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs +33 -43
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-page-error.mjs +33 -39
- package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs +38 -42
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +188 -312
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-utils.mjs.map +1 -1
- package/mat-choice-chip/src/onemrva-mat-choice-chip.component.scss +13 -3
- package/mat-empty-row/src/onemrva-mat-empty-row.component.scss +2 -2
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +1 -1
- package/mat-input-phone/src/onemrva-mat-input-phone.component.scss +1 -1
- package/mat-panel/src/onemrva-mat-panel-content.scss +1 -1
- package/mat-skeleton/src/onemrva-mat-skeleton.component.scss +1 -1
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.scss +10 -2
- package/package.json +72 -62
- package/theme/index.scss +230 -0
- package/theme/overrides/_autocomplete.scss +9 -0
- package/theme/overrides/_button-toggle.scss +14 -0
- package/theme/overrides/_button.scss +140 -0
- package/theme/overrides/_card.scss +34 -0
- package/theme/overrides/_carousel.scss +13 -0
- package/theme/overrides/_checkbox.scss +49 -0
- package/theme/overrides/_chips.scss +42 -0
- package/theme/overrides/_datepicker.scss +10 -0
- package/theme/overrides/_dialogs.scss +118 -0
- package/theme/overrides/_divider.scss +9 -0
- package/theme/overrides/_drag-and-drop.scss +74 -0
- package/theme/overrides/_expansion.scss +51 -0
- package/theme/overrides/_fab.scss +45 -0
- package/theme/overrides/_form-field.scss +223 -0
- package/theme/overrides/_icon-button.scss +24 -0
- package/theme/overrides/_icon.scss +97 -0
- package/theme/overrides/_input.scss +18 -0
- package/theme/overrides/_layout.scss +35 -0
- package/theme/overrides/_menu.scss +45 -0
- package/theme/overrides/_option.scss +15 -0
- package/theme/overrides/_panel.scss +59 -0
- package/theme/overrides/_progress-bar.scss +29 -0
- package/theme/overrides/_radio.scss +16 -0
- package/theme/overrides/_select.scss +124 -0
- package/theme/overrides/_sidenav.scss +13 -0
- package/theme/overrides/_slide-toggle.scss +53 -0
- package/theme/overrides/_stepper.scss +196 -0
- package/theme/overrides/_stickers.scss +13 -0
- package/theme/overrides/_table.scss +115 -0
- package/theme/overrides/_tabs.scss +20 -0
- package/theme/overrides/_toast.scss +16 -0
- package/theme/overrides/_toc.scss +26 -0
- package/theme/overrides/_toolbar.scss +26 -0
- package/theme/overrides/_tooltip.scss +19 -0
- package/theme/palettes/_palette.scss +189 -0
- package/theme/utilities/_animations.scss +54 -0
- package/theme/utilities/_container.scss +14 -0
- package/theme/utilities/_fonts.scss +170 -0
- package/theme/utilities/_grid.scss +75 -0
- package/theme/utilities/_media.scss +33 -0
- package/theme/utilities/_palettes.scss +120 -0
- package/theme/utilities/_spacing.scss +86 -0
- package/theme/utilities/_tokens.scss +123 -0
- package/theme/utilities/_utilities.scss +351 -0
- package/theme/utilities/_variables.scss +42 -0
- package/types/onemrvapublic-design-system-flag-icon.d.ts +18 -0
- package/types/onemrvapublic-design-system-layout.d.ts +305 -0
- package/{mat-address/index.d.ts → types/onemrvapublic-design-system-mat-address.d.ts} +8 -8
- package/types/onemrvapublic-design-system-mat-avatar.d.ts +67 -0
- package/{mat-breadcrumb/index.d.ts → types/onemrvapublic-design-system-mat-breadcrumb.d.ts} +8 -6
- package/types/onemrvapublic-design-system-mat-carousel.d.ts +52 -0
- package/types/onemrvapublic-design-system-mat-choice-chip.d.ts +23 -0
- package/types/onemrvapublic-design-system-mat-copy-to-clipboard.d.ts +25 -0
- package/types/onemrvapublic-design-system-mat-country-item.d.ts +10 -0
- package/types/onemrvapublic-design-system-mat-empty-row.d.ts +18 -0
- package/{mat-file-upload/index.d.ts → types/onemrvapublic-design-system-mat-file-upload.d.ts} +53 -51
- package/types/onemrvapublic-design-system-mat-input-address.d.ts +32 -0
- package/{mat-input-birthplace/index.d.ts → types/onemrvapublic-design-system-mat-input-birthplace.d.ts} +10 -10
- package/{mat-input-country/index.d.ts → types/onemrvapublic-design-system-mat-input-country.d.ts} +2 -2
- package/types/onemrvapublic-design-system-mat-input-enterprise-number.d.ts +37 -0
- package/{mat-input-iban/index.d.ts → types/onemrvapublic-design-system-mat-input-iban.d.ts} +12 -13
- package/{mat-input-phone/index.d.ts → types/onemrvapublic-design-system-mat-input-phone.d.ts} +12 -12
- package/types/onemrvapublic-design-system-mat-message-box.d.ts +29 -0
- package/types/onemrvapublic-design-system-mat-multi-select.d.ts +57 -0
- package/types/onemrvapublic-design-system-mat-navigation.d.ts +55 -0
- package/types/onemrvapublic-design-system-mat-notification.d.ts +23 -0
- package/types/onemrvapublic-design-system-mat-paginator.d.ts +58 -0
- package/types/onemrvapublic-design-system-mat-panel.d.ts +66 -0
- package/types/onemrvapublic-design-system-mat-pop-over.d.ts +40 -0
- package/types/onemrvapublic-design-system-mat-progress-bar.d.ts +16 -0
- package/{mat-select-search/index.d.ts → types/onemrvapublic-design-system-mat-select-search.d.ts} +35 -35
- package/types/onemrvapublic-design-system-mat-selectable-box.d.ts +26 -0
- package/{mat-side-menu/index.d.ts → types/onemrvapublic-design-system-mat-side-menu.d.ts} +6 -6
- package/types/onemrvapublic-design-system-mat-skeleton.d.ts +82 -0
- package/{mat-spinner/index.d.ts → types/onemrvapublic-design-system-mat-spinner.d.ts} +3 -4
- package/{mat-stepper/index.d.ts → types/onemrvapublic-design-system-mat-stepper.d.ts} +3 -6
- package/types/onemrvapublic-design-system-mat-table-of-content.d.ts +85 -0
- package/types/onemrvapublic-design-system-mat-task-list.d.ts +56 -0
- package/{mat-timepicker/index.d.ts → types/onemrvapublic-design-system-mat-timepicker.d.ts} +50 -66
- package/types/onemrvapublic-design-system-mat-tooltip.d.ts +40 -0
- package/types/onemrvapublic-design-system-page-error.d.ts +29 -0
- package/{page-not-found/index.d.ts → types/onemrvapublic-design-system-page-not-found.d.ts} +6 -6
- package/{shared/index.d.ts → types/onemrvapublic-design-system-shared.d.ts} +47 -71
- package/flag-icon/index.d.ts +0 -18
- package/layout/index.d.ts +0 -295
- package/mat-avatar/index.d.ts +0 -187
- package/mat-carousel/index.d.ts +0 -52
- package/mat-choice-chip/index.d.ts +0 -21
- package/mat-copy-to-clipboard/index.d.ts +0 -25
- package/mat-country-item/index.d.ts +0 -10
- package/mat-empty-row/index.d.ts +0 -19
- package/mat-input-address/index.d.ts +0 -32
- package/mat-input-enterprise-number/index.d.ts +0 -37
- package/mat-message-box/index.d.ts +0 -101
- package/mat-multi-select/index.d.ts +0 -57
- package/mat-navigation/index.d.ts +0 -54
- package/mat-notification/index.d.ts +0 -43
- package/mat-paginator/index.d.ts +0 -58
- package/mat-panel/index.d.ts +0 -66
- package/mat-pop-over/index.d.ts +0 -40
- package/mat-progress-bar/index.d.ts +0 -18
- package/mat-selectable-box/index.d.ts +0 -29
- package/mat-skeleton/index.d.ts +0 -100
- package/mat-table-of-content/index.d.ts +0 -84
- package/mat-task-list/index.d.ts +0 -57
- package/mat-tooltip/index.d.ts +0 -40
- package/page-error/index.d.ts +0 -34
- /package/{mat-datepicker-header/index.d.ts → types/onemrvapublic-design-system-mat-datepicker-header.d.ts} +0 -0
- /package/{mat-sticker/index.d.ts → types/onemrvapublic-design-system-mat-sticker.d.ts} +0 -0
- /package/{mat-toast/index.d.ts → types/onemrvapublic-design-system-mat-toast.d.ts} +0 -0
- /package/{utils/index.d.ts → types/onemrvapublic-design-system-utils.d.ts} +0 -0
- /package/{index.d.ts → types/onemrvapublic-design-system.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, contentChildren, computed, inject, ChangeDetectorRef, forwardRef, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormControl, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
6
|
import { TranslateService, TranslatePipe } from '@ngx-translate/core';
|
|
7
7
|
import { MatOption } from '@angular/material/core';
|
|
8
8
|
import { Subject, debounceTime, startWith, map, takeUntil } from 'rxjs';
|
|
9
|
-
import {
|
|
9
|
+
import { AsyncPipe } from '@angular/common';
|
|
10
10
|
import { MatIcon } from '@angular/material/icon';
|
|
11
11
|
import * as i2 from '@angular/material/select';
|
|
12
12
|
import { MatSelectModule } from '@angular/material/select';
|
|
@@ -14,9 +14,6 @@ import { MatSelectSearchComponent } from '@onemrvapublic/design-system/mat-selec
|
|
|
14
14
|
|
|
15
15
|
let NEXT_ID = 0;
|
|
16
16
|
class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
17
|
-
get opacity() {
|
|
18
|
-
return this.disabled ? 0.4 : 1;
|
|
19
|
-
}
|
|
20
17
|
onFocus() {
|
|
21
18
|
this.focused = true;
|
|
22
19
|
this.stateChanges.next();
|
|
@@ -30,20 +27,22 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
|
30
27
|
this.counter = 0;
|
|
31
28
|
this._values = [];
|
|
32
29
|
this.stateChanges = new Subject();
|
|
33
|
-
this.multiple = true;
|
|
30
|
+
this.multiple = input(true, ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
31
|
+
this.formControl = input.required(...(ngDevMode ? [{ debugName: "formControl" }] : []));
|
|
34
32
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
35
|
-
this.role = 'select';
|
|
33
|
+
this.role = input('select', { ...(ngDevMode ? { debugName: "role" } : {}), alias: 'attr.role' });
|
|
36
34
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
37
|
-
this.label = '';
|
|
35
|
+
this.label = input('', { ...(ngDevMode ? { debugName: "label" } : {}), alias: 'attr.aria-label' });
|
|
38
36
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
39
|
-
this.invalid = false;
|
|
40
|
-
this.showFilter = true;
|
|
41
|
-
this.selectionToggle = true;
|
|
37
|
+
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : {}), alias: 'attr.aria-invalid' });
|
|
38
|
+
this.showFilter = input(true, ...(ngDevMode ? [{ debugName: "showFilter" }] : []));
|
|
39
|
+
this.selectionToggle = input(true, ...(ngDevMode ? [{ debugName: "selectionToggle" }] : []));
|
|
42
40
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
43
|
-
this.dataCy = `onemrva-mat-multi-select-${NEXT_ID++}
|
|
41
|
+
this.dataCy = input(`onemrva-mat-multi-select-${NEXT_ID++}`, { ...(ngDevMode ? { debugName: "dataCy" } : {}), alias: 'attr.data-cy' });
|
|
44
42
|
this.searchFilter = new FormControl('');
|
|
45
|
-
this.matOptions =
|
|
43
|
+
this.matOptions = contentChildren(MatOption, ...(ngDevMode ? [{ debugName: "matOptions" }] : []));
|
|
46
44
|
this.onDestroy$ = new Subject();
|
|
45
|
+
this._opacity = computed(() => (this.disabled ? 0.4 : 1), ...(ngDevMode ? [{ debugName: "_opacity" }] : []));
|
|
47
46
|
this.focused = false;
|
|
48
47
|
this.translate = inject(TranslateService);
|
|
49
48
|
this.cd = inject(ChangeDetectorRef);
|
|
@@ -63,7 +62,7 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
|
63
62
|
// Allows Angular to update the model (rating).
|
|
64
63
|
// Update the model and changes needed for the view here.
|
|
65
64
|
writeValue(values) {
|
|
66
|
-
if (this.multiple) {
|
|
65
|
+
if (this.multiple()) {
|
|
67
66
|
this.counter = 0;
|
|
68
67
|
if (Array.isArray(values))
|
|
69
68
|
this.counter = values.length;
|
|
@@ -83,20 +82,20 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
|
83
82
|
this.onTouched = fn;
|
|
84
83
|
}
|
|
85
84
|
isAllSelected() {
|
|
86
|
-
return this.counter === this.matOptions.length;
|
|
85
|
+
return this.counter === this.matOptions().length;
|
|
87
86
|
}
|
|
88
87
|
selectAll() {
|
|
89
|
-
this._values = this.matOptions.map(option => {
|
|
88
|
+
this._values = this.matOptions().map(option => {
|
|
90
89
|
return option.value;
|
|
91
90
|
});
|
|
92
|
-
this.formControl.setValue(this._values);
|
|
91
|
+
this.formControl().setValue(this._values);
|
|
93
92
|
}
|
|
94
93
|
isNoneSelected() {
|
|
95
94
|
return this.counter === 0;
|
|
96
95
|
}
|
|
97
96
|
deselectAll(_$event) {
|
|
98
97
|
this._values = [];
|
|
99
|
-
this.formControl.setValue(this._values);
|
|
98
|
+
this.formControl().setValue(this._values);
|
|
100
99
|
}
|
|
101
100
|
onContainerClick(_event) {
|
|
102
101
|
//
|
|
@@ -110,37 +109,38 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
|
110
109
|
}
|
|
111
110
|
ngOnInit() {
|
|
112
111
|
this.matOptions$ = this.searchFilter.valueChanges.pipe(debounceTime(200), startWith(''), map((value) => {
|
|
113
|
-
this.optionSize = this.matOptions.length;
|
|
112
|
+
this.optionSize = this.matOptions().length;
|
|
114
113
|
if (this._values !== null) {
|
|
115
114
|
this.counter = this._values.length;
|
|
116
115
|
}
|
|
117
116
|
if (value === '') {
|
|
118
|
-
return this.matOptions.filter(_o => {
|
|
117
|
+
return this.matOptions().filter(_o => {
|
|
119
118
|
return true;
|
|
120
119
|
});
|
|
121
120
|
}
|
|
122
|
-
return this.matOptions.filter(option => {
|
|
121
|
+
return this.matOptions().filter(option => {
|
|
123
122
|
return option?._text?.nativeElement.innerHTML
|
|
124
123
|
.toLowerCase()
|
|
125
124
|
.includes(value.toLowerCase());
|
|
126
125
|
});
|
|
127
126
|
}));
|
|
128
|
-
this.formControl
|
|
129
|
-
.pipe(takeUntil(this.onDestroy$))
|
|
127
|
+
this.formControl()
|
|
128
|
+
.valueChanges.pipe(takeUntil(this.onDestroy$))
|
|
130
129
|
.subscribe(values => {
|
|
131
130
|
this._values = values;
|
|
132
131
|
this.counter = this._values.length;
|
|
133
132
|
});
|
|
134
133
|
}
|
|
135
134
|
ngAfterContentChecked() {
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const matOptions = this.matOptions();
|
|
136
|
+
if (matOptions.length !== this.optionSize) {
|
|
137
|
+
this.optionSize = matOptions.length;
|
|
138
138
|
this.counter = 0;
|
|
139
139
|
this.searchFilter.updateValueAndValidity({ emitEvent: true });
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: OnemrvaMatMultiSelectComponent, isStandalone: true, selector: "onemrva-mat-multi-select", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, role: { classPropertyName: "role", publicName: "attr.role", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "attr.aria-label", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "attr.aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, selectionToggle: { classPropertyName: "selectionToggle", publicName: "selectionToggle", isSignal: true, isRequired: false, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "attr.data-cy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.opacity": "_opacity()" } }, providers: [
|
|
144
144
|
{
|
|
145
145
|
provide: MatFormFieldControl,
|
|
146
146
|
useExisting: OnemrvaMatMultiSelectComponent,
|
|
@@ -151,11 +151,13 @@ class OnemrvaMatMultiSelectComponent extends MatFormFieldControl {
|
|
|
151
151
|
useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),
|
|
152
152
|
multi: true,
|
|
153
153
|
},
|
|
154
|
-
], queries: [{ propertyName: "matOptions", predicate: MatOption }], usesInheritance: true, ngImport: i0, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [
|
|
154
|
+
], queries: [{ propertyName: "matOptions", predicate: MatOption, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<mat-select\n [multiple]=\"multiple()\"\n [formControl]=\"formControl()\"\n [attr.data-cy]=\"dataCy()\"\n [attr.aria-label]=\"label()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple() && selectionToggle()) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [class.mat-disabled]=\"isAllSelected()\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\"> | </span>\n <a\n tabindex=\"2\"\n [class.mat-disabled]=\"isNoneSelected()\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter()) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n />\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple() && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.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: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatSelectSearchComponent, selector: "mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
155
155
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectComponent, decorators: [{
|
|
157
157
|
type: Component,
|
|
158
|
-
args: [{ selector: 'onemrva-mat-multi-select',
|
|
158
|
+
args: [{ selector: 'onemrva-mat-multi-select', host: {
|
|
159
|
+
'[style.opacity]': '_opacity()',
|
|
160
|
+
}, providers: [
|
|
159
161
|
{
|
|
160
162
|
provide: MatFormFieldControl,
|
|
161
163
|
useExisting: OnemrvaMatMultiSelectComponent,
|
|
@@ -167,48 +169,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
167
169
|
multi: true,
|
|
168
170
|
},
|
|
169
171
|
], imports: [
|
|
170
|
-
NgClass,
|
|
171
172
|
TranslatePipe,
|
|
172
173
|
ReactiveFormsModule,
|
|
173
174
|
MatSelectModule,
|
|
174
175
|
AsyncPipe,
|
|
175
176
|
MatIcon,
|
|
176
177
|
MatSelectSearchComponent,
|
|
177
|
-
], standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [
|
|
178
|
-
}], ctorParameters: () => [], propDecorators: { multiple: [{
|
|
179
|
-
type: Input
|
|
180
|
-
}], formControl: [{
|
|
181
|
-
type: Input
|
|
182
|
-
}], role: [{
|
|
183
|
-
type: Input,
|
|
184
|
-
args: ['attr.role']
|
|
185
|
-
}], label: [{
|
|
186
|
-
type: Input,
|
|
187
|
-
args: ['attr.aria-label']
|
|
188
|
-
}], invalid: [{
|
|
189
|
-
type: Input,
|
|
190
|
-
args: ['attr.aria-invalid']
|
|
191
|
-
}], showFilter: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], selectionToggle: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], dataCy: [{
|
|
196
|
-
type: Input,
|
|
197
|
-
args: ['attr.data-cy']
|
|
198
|
-
}], matOptions: [{
|
|
199
|
-
type: ContentChildren,
|
|
200
|
-
args: [MatOption]
|
|
201
|
-
}], opacity: [{
|
|
202
|
-
type: HostBinding,
|
|
203
|
-
args: ['style.opacity']
|
|
204
|
-
}] } });
|
|
178
|
+
], standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<mat-select\n [multiple]=\"multiple()\"\n [formControl]=\"formControl()\"\n [attr.data-cy]=\"dataCy()\"\n [attr.aria-label]=\"label()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple() && selectionToggle()) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [class.mat-disabled]=\"isAllSelected()\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\"> | </span>\n <a\n tabindex=\"2\"\n [class.mat-disabled]=\"isNoneSelected()\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter()) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n />\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple() && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n", styles: [":host{display:inline-block;width:100%}:host .mat-select-counter{top:var(--spacer);right:var(--triple-spacer);display:block;padding:var(--quarter-spacer) var(--half-spacer) var(--quarter-spacer) var(--spacer);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);min-width:var(--triple-spacer);font-family:var(--brand-font);border:1px solid var(--mat-sys-primary);border-radius:var(--button-border-radius)}:host .mat-select-counter span.text{font-family:var(--sys-label-large-font);font-style:normal;font-weight:500;font-size:.75rem;line-height:1.25rem}:host .mat-select-counter mat-icon{font-size:.75rem;height:.75rem;width:.75rem;line-height:1rem;padding:0 var(--quarter-spacer) 0 var(--quarter-spacer);cursor:pointer}\n"] }]
|
|
179
|
+
}], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], formControl: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControl", required: true }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "attr.role", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "attr.aria-label", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "attr.aria-invalid", required: false }] }], showFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilter", required: false }] }], selectionToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionToggle", required: false }] }], dataCy: [{ type: i0.Input, args: [{ isSignal: true, alias: "attr.data-cy", required: false }] }], matOptions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MatOption), { isSignal: true }] }] } });
|
|
205
180
|
|
|
206
181
|
class OnemrvaMatMultiSelectModule {
|
|
207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
208
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
209
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
182
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
183
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectModule, imports: [OnemrvaMatMultiSelectComponent] }); }
|
|
184
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectModule, imports: [OnemrvaMatMultiSelectComponent] }); }
|
|
210
185
|
}
|
|
211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatMultiSelectModule, decorators: [{
|
|
212
187
|
type: NgModule,
|
|
213
188
|
args: [{
|
|
214
189
|
declarations: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onemrvapublic-design-system-mat-multi-select.mjs","sources":["../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts","../../../../projects/onemrva/design-system/mat-multi-select/onemrvapublic-design-system-mat-multi-select.ts"],"sourcesContent":["import {\n AfterContentChecked,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n forwardRef,\n HostBinding,\n inject,\n Input,\n OnDestroy,\n OnInit,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { MatOption } from '@angular/material/core';\nimport {\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n} from 'rxjs';\nimport { AsyncPipe, NgClass } from '@angular/common';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSelectSearchComponent } from '@onemrvapublic/design-system/mat-select-search';\n\nlet NEXT_ID = 0;\n\n@Component({\n selector: 'onemrva-mat-multi-select',\n templateUrl: 'onemrva-mat-multi-select.component.html',\n styleUrl: 'onemrva-mat-multi-select.component.scss',\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: OnemrvaMatMultiSelectComponent,\n multi: false,\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),\n multi: true,\n },\n ],\n imports: [\n NgClass,\n TranslatePipe,\n ReactiveFormsModule,\n MatSelectModule,\n AsyncPipe,\n MatIcon,\n MatSelectSearchComponent,\n ],\n standalone: true,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class OnemrvaMatMultiSelectComponent\n extends MatFormFieldControl<any>\n implements OnInit, OnDestroy, AfterContentChecked\n{\n counter = 0;\n _values: any[] = [];\n public override stateChanges = new Subject<void>();\n\n @Input()\n multiple = true;\n\n @Input()\n formControl!: FormControl;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.role')\n public role = 'select';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-label')\n public label = '';\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.aria-invalid')\n public invalid = false;\n\n @Input()\n showFilter = true;\n\n @Input()\n selectionToggle = true;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('attr.data-cy')\n public dataCy = `onemrva-mat-multi-select-${NEXT_ID++}`;\n\n searchFilter: FormControl = new FormControl<string>('');\n\n @ContentChildren(MatOption)\n matOptions: QueryList<MatOption> = new QueryList<MatOption>();\n matOptions$?: Observable<MatOption<any>[]>;\n onDestroy$: Subject<any> = new Subject<any>();\n\n @HostBinding('style.opacity')\n get opacity() {\n return this.disabled ? 0.4 : 1;\n }\n\n override focused = false;\n\n onFocus() {\n this.focused = true;\n this.stateChanges.next();\n }\n\n onBlur() {\n this.focused = false;\n this.stateChanges.next();\n }\n\n translate = inject(TranslateService);\n cd = inject(ChangeDetectorRef);\n\n constructor() {\n super();\n setTimeout(() => {\n this.focused = false;\n }, 3000);\n }\n\n // Function to call when the rating changes.\n onChange = (_values: any[]) => {\n //\n };\n\n // Function to call when the input is touched (when a star is clicked).\n onTouched = () => {\n //\n };\n\n // Allows Angular to update the model (rating).\n // Update the model and changes needed for the view here.\n writeValue(values: any[] | any | undefined | null): void {\n if (this.multiple) {\n this.counter = 0;\n if (Array.isArray(values)) this.counter = values.length;\n //else if (Array.isArray(this._values)) this.counter = this._values.length;\n }\n this._values = values;\n this.onChange(this._values);\n }\n\n // Allows Angular to register a function to call when the model (rating) changes.\n // Save the function as a property to call later here.\n registerOnChange(fn: (value: any[]) => void): void {\n this.onChange = fn;\n }\n\n // Allows Angular to register a function to call when the input has been touched.\n // Save the function as a property to call later here.\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n isAllSelected() {\n return this.counter === this.matOptions.length;\n }\n\n selectAll() {\n this._values = this.matOptions.map(option => {\n return option.value;\n });\n this.formControl.setValue(this._values);\n }\n\n isNoneSelected() {\n return this.counter === 0;\n }\n\n deselectAll(_$event: MouseEvent) {\n this._values = [];\n this.formControl.setValue(this._values);\n }\n\n onContainerClick(_event: MouseEvent): void {\n //\n }\n\n setDescribedByIds(_ids: string[]): void {\n //\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next('');\n this.onDestroy$.complete();\n }\n\n optionSize = 0;\n\n ngOnInit(): void {\n this.matOptions$ = this.searchFilter.valueChanges.pipe(\n debounceTime(200),\n startWith(''),\n map((value: string) => {\n this.optionSize = this.matOptions.length;\n if (this._values !== null) {\n this.counter = this._values.length;\n }\n if (value === '') {\n return this.matOptions.filter(_o => {\n return true;\n });\n }\n return this.matOptions.filter(option => {\n return option?._text?.nativeElement.innerHTML\n .toLowerCase()\n .includes(value.toLowerCase());\n });\n }),\n );\n this.formControl.valueChanges\n .pipe(takeUntil(this.onDestroy$))\n .subscribe(values => {\n this._values = values;\n this.counter = this._values.length;\n });\n }\n\n ngAfterContentChecked(): void {\n if (this.matOptions.length !== this.optionSize) {\n this.optionSize = this.matOptions.length;\n this.counter = 0;\n this.searchFilter.updateValueAndValidity({ emitEvent: true });\n }\n }\n}\n","<mat-select\n [multiple]=\"multiple\"\n [formControl]=\"formControl\"\n [attr.data-cy]=\"dataCy\"\n [attr.aria-label]=\"label\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple && selectionToggle) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [ngClass]=\"{ 'mat-disabled': isAllSelected() }\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\"> | </span>\n <a\n tabindex=\"2\"\n [ngClass]=\"{ 'mat-disabled': isNoneSelected() }\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n ></mat-select-search>\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { OnemrvaMatMultiSelectComponent } from './onemrva-mat-multi-select.component';\n\n@NgModule({\n declarations: [],\n imports: [OnemrvaMatMultiSelectComponent],\n exports: [],\n})\nexport class OnemrvaMatMultiSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAmCA,IAAI,OAAO,GAAG,CAAC;AA8BT,MAAO,8BACX,SAAQ,mBAAwB,CAAA;AA0ChC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC;IAChC;IAI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O,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"onemrvapublic-design-system-mat-multi-select.mjs","sources":["../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.ts","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.component.html","../../../../projects/onemrva/design-system/mat-multi-select/src/onemrva-mat-multi-select.module.ts","../../../../projects/onemrva/design-system/mat-multi-select/onemrvapublic-design-system-mat-multi-select.ts"],"sourcesContent":["import {\n AfterContentChecked,\n ChangeDetectorRef,\n Component,\n forwardRef,\n inject,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n input,\n contentChildren,\n computed,\n} from '@angular/core';\nimport {\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { MatOption } from '@angular/material/core';\nimport {\n debounceTime,\n map,\n Observable,\n startWith,\n Subject,\n takeUntil,\n} from 'rxjs';\nimport { AsyncPipe } from '@angular/common';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSelectSearchComponent } from '@onemrvapublic/design-system/mat-select-search';\n\nlet NEXT_ID = 0;\n\n@Component({\n selector: 'onemrva-mat-multi-select',\n templateUrl: 'onemrva-mat-multi-select.component.html',\n styleUrl: 'onemrva-mat-multi-select.component.scss',\n host: {\n '[style.opacity]': '_opacity()',\n },\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: OnemrvaMatMultiSelectComponent,\n multi: false,\n },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => OnemrvaMatMultiSelectComponent),\n multi: true,\n },\n ],\n imports: [\n TranslatePipe,\n ReactiveFormsModule,\n MatSelectModule,\n AsyncPipe,\n MatIcon,\n MatSelectSearchComponent,\n ],\n standalone: true,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class OnemrvaMatMultiSelectComponent\n extends MatFormFieldControl<any>\n implements OnInit, OnDestroy, AfterContentChecked\n{\n counter = 0;\n _values: any[] = [];\n public override stateChanges = new Subject<void>();\n\n readonly multiple = input(true);\n\n readonly formControl = input.required<FormControl>();\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly role = input('select', { alias: 'attr.role' });\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly label = input('', { alias: 'attr.aria-label' });\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly invalid = input(false, { alias: 'attr.aria-invalid' });\n\n readonly showFilter = input(true);\n\n readonly selectionToggle = input(true);\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n public readonly dataCy = input(`onemrva-mat-multi-select-${NEXT_ID++}`, {\n alias: 'attr.data-cy',\n });\n\n searchFilter: FormControl = new FormControl<string>('');\n\n readonly matOptions = contentChildren(MatOption);\n matOptions$?: Observable<MatOption<any>[]>;\n onDestroy$: Subject<any> = new Subject<any>();\n\n readonly _opacity = computed(() => (this.disabled ? 0.4 : 1));\n\n override focused = false;\n\n onFocus() {\n this.focused = true;\n this.stateChanges.next();\n }\n\n onBlur() {\n this.focused = false;\n this.stateChanges.next();\n }\n\n translate = inject(TranslateService);\n cd = inject(ChangeDetectorRef);\n\n constructor() {\n super();\n setTimeout(() => {\n this.focused = false;\n }, 3000);\n }\n\n // Function to call when the rating changes.\n onChange = (_values: any[]) => {\n //\n };\n\n // Function to call when the input is touched (when a star is clicked).\n onTouched = () => {\n //\n };\n\n // Allows Angular to update the model (rating).\n // Update the model and changes needed for the view here.\n writeValue(values: any[] | any | undefined | null): void {\n if (this.multiple()) {\n this.counter = 0;\n if (Array.isArray(values)) this.counter = values.length;\n //else if (Array.isArray(this._values)) this.counter = this._values.length;\n }\n this._values = values;\n this.onChange(this._values);\n }\n\n // Allows Angular to register a function to call when the model (rating) changes.\n // Save the function as a property to call later here.\n registerOnChange(fn: (value: any[]) => void): void {\n this.onChange = fn;\n }\n\n // Allows Angular to register a function to call when the input has been touched.\n // Save the function as a property to call later here.\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n isAllSelected() {\n return this.counter === this.matOptions().length;\n }\n\n selectAll() {\n this._values = this.matOptions().map(option => {\n return option.value;\n });\n this.formControl().setValue(this._values);\n }\n\n isNoneSelected() {\n return this.counter === 0;\n }\n\n deselectAll(_$event: MouseEvent) {\n this._values = [];\n this.formControl().setValue(this._values);\n }\n\n onContainerClick(_event: MouseEvent): void {\n //\n }\n\n setDescribedByIds(_ids: string[]): void {\n //\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next('');\n this.onDestroy$.complete();\n }\n\n optionSize = 0;\n\n ngOnInit(): void {\n this.matOptions$ = this.searchFilter.valueChanges.pipe(\n debounceTime(200),\n startWith(''),\n map((value: string) => {\n this.optionSize = this.matOptions().length;\n if (this._values !== null) {\n this.counter = this._values.length;\n }\n if (value === '') {\n return this.matOptions().filter(_o => {\n return true;\n });\n }\n return this.matOptions().filter(option => {\n return option?._text?.nativeElement.innerHTML\n .toLowerCase()\n .includes(value.toLowerCase());\n });\n }),\n );\n this.formControl()\n .valueChanges.pipe(takeUntil(this.onDestroy$))\n .subscribe(values => {\n this._values = values;\n this.counter = this._values.length;\n });\n }\n\n ngAfterContentChecked(): void {\n const matOptions = this.matOptions();\n if (matOptions.length !== this.optionSize) {\n this.optionSize = matOptions.length;\n this.counter = 0;\n this.searchFilter.updateValueAndValidity({ emitEvent: true });\n }\n }\n}\n","<mat-select\n [multiple]=\"multiple()\"\n [formControl]=\"formControl()\"\n [attr.data-cy]=\"dataCy()\"\n [attr.aria-label]=\"label()\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n>\n @if (multiple() && selectionToggle()) {\n <div class=\"selection-choice text-right\">\n <a\n tabindex=\"1\"\n [class.mat-disabled]=\"isAllSelected()\"\n (click)=\"selectAll()\"\n >{{ 'select.select.all' | translate }}</a\n ><span class=\"separator\"> | </span>\n <a\n tabindex=\"2\"\n [class.mat-disabled]=\"isNoneSelected()\"\n (click)=\"deselectAll($event)\"\n >{{ 'select.deselect.all' | translate }}</a\n >\n </div>\n }\n <div class=\"option-list\">\n @if (showFilter()) {\n <mat-option>\n <mat-select-search\n [formControl]=\"searchFilter\"\n ariaLabel=\"{{ 'select.search.filter' | translate }}\"\n noEntriesFoundLabel=\"{{ 'select.search.notFound' | translate }}\"\n placeholderLabel=\"{{ 'select.search.filter' | translate }}\"\n />\n </mat-option>\n }\n @for (matOption of matOptions$ | async; track matOption.value) {\n <ng-container>\n <mat-option\n [disabled]=\"matOption.disabled\"\n [value]=\"matOption.value\"\n [attr.data-cy]=\"matOption._getHostElement().dataset['cy']\"\n >\n {{ matOption._text?.nativeElement?.textContent }}\n </mat-option>\n </ng-container>\n }\n </div>\n</mat-select>\n@if (multiple() && counter > 0) {\n <div class=\"mat-select-counter float-right position-absolute text-center\">\n <span class=\"text\">{{ counter }}</span\n ><mat-icon (click)=\"deselectAll($event)\">close</mat-icon>\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { OnemrvaMatMultiSelectComponent } from './onemrva-mat-multi-select.component';\n\n@NgModule({\n declarations: [],\n imports: [OnemrvaMatMultiSelectComponent],\n exports: [],\n})\nexport class OnemrvaMatMultiSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkCA,IAAI,OAAO,GAAG,CAAC;AAgCT,MAAO,8BACX,SAAQ,mBAAwB,CAAA;IAuChC,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IAC1B;IAEA,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACpB,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE;IA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OAAO,EAAE,EAAE;AACZ,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,87 +1,62 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, viewChild, signal, computed, inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import { RouterLinkActive, RouterLink, Router, NavigationEnd } from '@angular/router';
|
|
4
4
|
import { filter } from 'rxjs/operators';
|
|
5
5
|
import { MatIcon } from '@angular/material/icon';
|
|
6
6
|
import { MatExpansionPanel } from '@angular/material/expansion';
|
|
7
|
-
import { NgClass } from '@angular/common';
|
|
8
7
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
9
8
|
|
|
10
9
|
class OnemrvaMatNavigationItemComponent {
|
|
11
10
|
constructor() {
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
11
|
+
this.routerLink = input(...(ngDevMode ? [undefined, { debugName: "routerLink" }] : []));
|
|
12
|
+
this.routerLinkActiveOptions = input(...(ngDevMode ? [undefined, { debugName: "routerLinkActiveOptions" }] : []));
|
|
13
|
+
this.dataCy = input(...(ngDevMode ? [undefined, { debugName: "dataCy" }] : []));
|
|
14
|
+
this.baseRouteForActiveMenu = input(...(ngDevMode ? [undefined, { debugName: "baseRouteForActiveMenu" }] : []));
|
|
15
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
16
|
+
this.icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : []));
|
|
17
|
+
this.level = input(0, ...(ngDevMode ? [{ debugName: "level" }] : []));
|
|
18
|
+
this.highlighted = input(...(ngDevMode ? [undefined, { debugName: "highlighted" }] : []));
|
|
19
|
+
this.opened = input(...(ngDevMode ? [undefined, { debugName: "opened" }] : []));
|
|
20
|
+
this.children = input(...(ngDevMode ? [undefined, { debugName: "children" }] : []));
|
|
21
|
+
this.customNgClass = input(...(ngDevMode ? [undefined, { debugName: "customNgClass" }] : []));
|
|
22
|
+
this.translate = input(true, ...(ngDevMode ? [{ debugName: "translate" }] : []));
|
|
23
|
+
this._highlighted = this.highlighted();
|
|
24
|
+
this.matExpansionPanel = viewChild(MatExpansionPanel, ...(ngDevMode ? [{ debugName: "matExpansionPanel" }] : []));
|
|
25
|
+
this._isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : []));
|
|
26
|
+
this._isHighlighted = computed(() => this.highlighted(), ...(ngDevMode ? [{ debugName: "_isHighlighted" }] : []));
|
|
27
|
+
this._isHighlighted2 = computed(() => !this.highlighted() && this._isExpanded(), ...(ngDevMode ? [{ debugName: "_isHighlighted2" }] : []));
|
|
16
28
|
this.cd = inject(ChangeDetectorRef);
|
|
17
29
|
}
|
|
18
|
-
get isHighlighted() {
|
|
19
|
-
return this.highlighted;
|
|
20
|
-
}
|
|
21
|
-
get isHighlighted2() {
|
|
22
|
-
return !this.highlighted && this.isExpanded;
|
|
23
|
-
}
|
|
24
30
|
get indentArray() {
|
|
25
|
-
return Array(this.level).fill(0);
|
|
31
|
+
return Array(this.level()).fill(0);
|
|
26
32
|
}
|
|
27
33
|
ngAfterViewInit() {
|
|
28
|
-
this.matExpansionPanel?.afterCollapse.subscribe(() => {
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
34
|
+
this.matExpansionPanel()?.afterCollapse.subscribe(() => {
|
|
35
|
+
this._highlighted = false;
|
|
36
|
+
this._isExpanded.set(false);
|
|
31
37
|
this.cd.markForCheck();
|
|
32
38
|
});
|
|
33
|
-
this.matExpansionPanel?.afterExpand.subscribe(() => {
|
|
34
|
-
this.
|
|
39
|
+
this.matExpansionPanel()?.afterExpand.subscribe(() => {
|
|
40
|
+
this._isExpanded.set(true);
|
|
35
41
|
this.cd.markForCheck();
|
|
36
42
|
});
|
|
37
43
|
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: OnemrvaMatNavigationItemComponent, isStandalone: true, selector: "onemrva-mat-navigation-item", inputs: { routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null }, baseRouteForActiveMenu: { classPropertyName: "baseRouteForActiveMenu", publicName: "baseRouteForActiveMenu", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: false, transformFunction: null }, customNgClass: { classPropertyName: "customNgClass", publicName: "customNgClass", isSignal: true, isRequired: false, transformFunction: null }, translate: { classPropertyName: "translate", publicName: "translate", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.highlighted": "_isHighlighted()", "class.highlighted2": "_isHighlighted2()" } }, viewQueries: [{ propertyName: "matExpansionPanel", first: true, predicate: MatExpansionPanel, descendants: true, isSignal: true }], ngImport: i0, template: "@if (routerLink()) {\n <button\n [routerLink]=\"routerLink()\"\n [attr.data-cy]=\"dataCy()\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n routerLinkActive=\"active\"\n class=\"mobile-menu-item\"\n >\n @for (_ of indentArray; track $index) {\n <span class=\"indent-spacer\"></span>\n }\n @if (icon()) {\n <mat-icon>{{ icon() }}</mat-icon>\n }\n @if (translate() && label().trim() !== '') {\n <span [innerHTML]=\"label() | translate\"></span>\n } @else {\n <span [innerHTML]=\"label()\"></span>\n }\n </button>\n} @else {\n <button\n [class]=\"{ 'mobile-menu-item': true, highlighted: highlighted() === true }\"\n [attr.data-cy]=\"dataCy()\"\n (click)=\"subMenu.toggle()\"\n >\n @for (_ of indentArray; track $index) {\n <span class=\"indent-spacer\"></span>\n }\n\n @if (icon()) {\n <mat-icon>{{ icon() }}</mat-icon>\n }\n\n @if (translate() && label().trim() !== '') {\n <span [innerHTML]=\"label() | translate\"></span>\n } @else {\n <span [innerHTML]=\"label()\"></span>\n }\n\n <mat-icon [class]=\"{ end: true, opened: subMenu.expanded }\"\n >arrow_drop_down</mat-icon\n >\n </button>\n <mat-expansion-panel #subMenu [expanded]=\"opened()\">\n <ng-content />\n </mat-expansion-panel>\n}\n", styles: [":host.highlighted2 .mobile-menu-item{transition:border-left .4s ease;border-left:.5rem solid var(--mat-sys-tertiary-container)}:host.highlighted .mobile-menu-item{transition:border-left .4s ease;border-left:.5rem solid var(--mat-sys-tertiary)}:host .mobile-menu-item{display:flex;width:100%;background:var(--mat-sys-background);padding:var(--double-spacer) var(--quad-spacer);border:none;box-shadow:none;align-items:center;text-align:left;cursor:pointer;font:var(--mat-sys-body-medium);text-decoration:none;color:var(--mat-sys-on-surface);border-left:.5rem solid transparent}:host .mobile-menu-item.active{border-left:.5rem solid var(--mat-sys-tertiary);font-weight:600}:host .mobile-menu-item.active mat-icon{font-variation-settings:\"FILL\" 1,\"wght\" 600,\"GRAD\" 0,\"opsz\" 24}:host .mobile-menu-item.active{background:var(--mat-sys-surface-container-low)}:host .mobile-menu-item:hover,:host .mobile-menu-item:focus{background:var(--mat-sys-surface-container-low)}:host .mobile-menu-item mat-icon{margin-left:-4px;margin-right:var(--spacer);transition:transform .3s ease}:host .mobile-menu-item mat-icon.opened{transform:rotate(180deg)}:host .mobile-menu-item mat-icon.end{margin-left:auto}:host .mobile-menu-item .indent-spacer{width:var(--double-spacer);flex-shrink:0}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
40
46
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationItemComponent, decorators: [{
|
|
42
48
|
type: Component,
|
|
43
49
|
args: [{ selector: 'onemrva-mat-navigation-item', imports: [
|
|
44
50
|
MatIcon,
|
|
45
51
|
RouterLinkActive,
|
|
46
52
|
RouterLink,
|
|
47
53
|
MatExpansionPanel,
|
|
48
|
-
NgClass,
|
|
49
54
|
TranslatePipe,
|
|
50
|
-
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}], dataCy: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], baseRouteForActiveMenu: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}], label: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], icon: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], level: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], highlighted: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], opened: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], children: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], customNgClass: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}], translate: [{
|
|
74
|
-
type: Input
|
|
75
|
-
}], matExpansionPanel: [{
|
|
76
|
-
type: ViewChild,
|
|
77
|
-
args: [MatExpansionPanel]
|
|
78
|
-
}], isHighlighted: [{
|
|
79
|
-
type: HostBinding,
|
|
80
|
-
args: ['class.highlighted']
|
|
81
|
-
}], isHighlighted2: [{
|
|
82
|
-
type: HostBinding,
|
|
83
|
-
args: ['class.highlighted2']
|
|
84
|
-
}] } });
|
|
55
|
+
], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
56
|
+
'[class.highlighted]': '_isHighlighted()',
|
|
57
|
+
'[class.highlighted2]': '_isHighlighted2()',
|
|
58
|
+
}, template: "@if (routerLink()) {\n <button\n [routerLink]=\"routerLink()\"\n [attr.data-cy]=\"dataCy()\"\n [routerLinkActiveOptions]=\"{ exact: true }\"\n routerLinkActive=\"active\"\n class=\"mobile-menu-item\"\n >\n @for (_ of indentArray; track $index) {\n <span class=\"indent-spacer\"></span>\n }\n @if (icon()) {\n <mat-icon>{{ icon() }}</mat-icon>\n }\n @if (translate() && label().trim() !== '') {\n <span [innerHTML]=\"label() | translate\"></span>\n } @else {\n <span [innerHTML]=\"label()\"></span>\n }\n </button>\n} @else {\n <button\n [class]=\"{ 'mobile-menu-item': true, highlighted: highlighted() === true }\"\n [attr.data-cy]=\"dataCy()\"\n (click)=\"subMenu.toggle()\"\n >\n @for (_ of indentArray; track $index) {\n <span class=\"indent-spacer\"></span>\n }\n\n @if (icon()) {\n <mat-icon>{{ icon() }}</mat-icon>\n }\n\n @if (translate() && label().trim() !== '') {\n <span [innerHTML]=\"label() | translate\"></span>\n } @else {\n <span [innerHTML]=\"label()\"></span>\n }\n\n <mat-icon [class]=\"{ end: true, opened: subMenu.expanded }\"\n >arrow_drop_down</mat-icon\n >\n </button>\n <mat-expansion-panel #subMenu [expanded]=\"opened()\">\n <ng-content />\n </mat-expansion-panel>\n}\n", styles: [":host.highlighted2 .mobile-menu-item{transition:border-left .4s ease;border-left:.5rem solid var(--mat-sys-tertiary-container)}:host.highlighted .mobile-menu-item{transition:border-left .4s ease;border-left:.5rem solid var(--mat-sys-tertiary)}:host .mobile-menu-item{display:flex;width:100%;background:var(--mat-sys-background);padding:var(--double-spacer) var(--quad-spacer);border:none;box-shadow:none;align-items:center;text-align:left;cursor:pointer;font:var(--mat-sys-body-medium);text-decoration:none;color:var(--mat-sys-on-surface);border-left:.5rem solid transparent}:host .mobile-menu-item.active{border-left:.5rem solid var(--mat-sys-tertiary);font-weight:600}:host .mobile-menu-item.active mat-icon{font-variation-settings:\"FILL\" 1,\"wght\" 600,\"GRAD\" 0,\"opsz\" 24}:host .mobile-menu-item.active{background:var(--mat-sys-surface-container-low)}:host .mobile-menu-item:hover,:host .mobile-menu-item:focus{background:var(--mat-sys-surface-container-low)}:host .mobile-menu-item mat-icon{margin-left:-4px;margin-right:var(--spacer);transition:transform .3s ease}:host .mobile-menu-item mat-icon.opened{transform:rotate(180deg)}:host .mobile-menu-item mat-icon.end{margin-left:auto}:host .mobile-menu-item .indent-spacer{width:var(--double-spacer);flex-shrink:0}\n"] }]
|
|
59
|
+
}], propDecorators: { routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], dataCy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCy", required: false }] }], baseRouteForActiveMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRouteForActiveMenu", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }], children: [{ type: i0.Input, args: [{ isSignal: true, alias: "children", required: false }] }], customNgClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customNgClass", required: false }] }], translate: [{ type: i0.Input, args: [{ isSignal: true, alias: "translate", required: false }] }], matExpansionPanel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatExpansionPanel), { isSignal: true }] }] } });
|
|
85
60
|
|
|
86
61
|
class OnemrvaMatNavigationTreeComponent {
|
|
87
62
|
constructor() {
|
|
@@ -89,12 +64,12 @@ class OnemrvaMatNavigationTreeComponent {
|
|
|
89
64
|
this.level = input(0, ...(ngDevMode ? [{ debugName: "level" }] : []));
|
|
90
65
|
this.translate = input(true, ...(ngDevMode ? [{ debugName: "translate" }] : []));
|
|
91
66
|
}
|
|
92
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: OnemrvaMatNavigationTreeComponent, isStandalone: true, selector: "onemrva-mat-navigation-tree", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, translate: { classPropertyName: "translate", publicName: "translate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@for (item of items(); track item) {\n <onemrva-mat-navigation-item\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [routerLink]=\"item.routerLink\"\n [level]=\"level()\"\n [dataCy]=\"item.dataCy\"\n [highlighted]=\"item.highlighted\"\n [children]=\"item.children\"\n [opened]=\"item.opened\"\n [translate]=\"translate()\"\n >\n @if (item.children?.length) {\n <onemrva-mat-navigation-tree\n [items]=\"item.children ?? []\"\n [level]=\"level() + 1\"\n />\n }\n </onemrva-mat-navigation-item>\n}\n", styles: [":host{display:flex;flex-direction:column;width:100%}\n"], dependencies: [{ kind: "component", type: OnemrvaMatNavigationTreeComponent, selector: "onemrva-mat-navigation-tree", inputs: ["items", "level", "translate"] }, { kind: "component", type: OnemrvaMatNavigationItemComponent, selector: "onemrva-mat-navigation-item", inputs: ["routerLink", "routerLinkActiveOptions", "dataCy", "baseRouteForActiveMenu", "label", "icon", "level", "highlighted", "opened", "children", "customNgClass", "translate"] }] }); }
|
|
94
69
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationTreeComponent, decorators: [{
|
|
96
71
|
type: Component,
|
|
97
|
-
args: [{ selector: 'onemrva-mat-navigation-tree', imports: [OnemrvaMatNavigationItemComponent], standalone: true, template: "@for (item of items(); track item) {\n <onemrva-mat-navigation-item\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [routerLink]=\"item.routerLink\"\n [level]=\"level()\"\n [dataCy]=\"item.dataCy\"\n [highlighted]=\"item.highlighted\"\n [children]=\"item.children\"\n [opened]=\"item.opened\"\n [translate]=\"translate()\"\n >\n @if (item.children?.length) {\n <onemrva-mat-navigation-tree\n [items]=\"item.children ?? []\"\n [level]=\"level() + 1\"\n
|
|
72
|
+
args: [{ selector: 'onemrva-mat-navigation-tree', imports: [OnemrvaMatNavigationItemComponent], standalone: true, template: "@for (item of items(); track item) {\n <onemrva-mat-navigation-item\n [label]=\"item.label\"\n [icon]=\"item.icon\"\n [routerLink]=\"item.routerLink\"\n [level]=\"level()\"\n [dataCy]=\"item.dataCy\"\n [highlighted]=\"item.highlighted\"\n [children]=\"item.children\"\n [opened]=\"item.opened\"\n [translate]=\"translate()\"\n >\n @if (item.children?.length) {\n <onemrva-mat-navigation-tree\n [items]=\"item.children ?? []\"\n [level]=\"level() + 1\"\n />\n }\n </onemrva-mat-navigation-item>\n}\n", styles: [":host{display:flex;flex-direction:column;width:100%}\n"] }]
|
|
98
73
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], translate: [{ type: i0.Input, args: [{ isSignal: true, alias: "translate", required: false }] }] } });
|
|
99
74
|
|
|
100
75
|
class OnemrvaMatNavigationComponent {
|
|
@@ -149,12 +124,12 @@ class OnemrvaMatNavigationComponent {
|
|
|
149
124
|
}
|
|
150
125
|
return [];
|
|
151
126
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: OnemrvaMatNavigationComponent, isStandalone: true, selector: "onemrva-mat-navigation", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, translate: { classPropertyName: "translate", publicName: "translate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<onemrva-mat-navigation-tree [items]=\"items()\" [level]=\"level() + 1\" />\n", styles: ["onemrva-mat-navigation{display:flex;width:100%;max-height:calc(100vh - var(--layout-header-height));overflow-y:auto;padding:var(--double-spacer) 0}onemrva-mat-navigation .mat-expansion-panel-body{padding:0}onemrva-mat-navigation .mobile-menu-item{display:flex;width:100%;background:var(--mat-sys-background);padding:var(--double-spacer);border:none;box-shadow:none;align-items:center;text-align:left;font:var(--mat-sys-body-large)}onemrva-mat-navigation .mobile-menu-item:active button,onemrva-mat-navigation .mobile-menu-item.active button{border-left:4px solid var(--mat-sys-tertiary)}onemrva-mat-navigation .mobile-menu-item:hover,onemrva-mat-navigation .mobile-menu-item:focus{background:var(--mat-sys-surface-container-low)}onemrva-mat-navigation .mobile-menu-item mat-icon{margin-left:var(--half-spacer)}onemrva-mat-navigation .mobile-menu-item mat-icon:first-child{margin-right:var(--spacer)}onemrva-mat-navigation .mobile-menu-item mat-icon.end{margin-left:auto}\n"], dependencies: [{ kind: "component", type: OnemrvaMatNavigationTreeComponent, selector: "onemrva-mat-navigation-tree", inputs: ["items", "level", "translate"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
154
129
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatNavigationComponent, decorators: [{
|
|
156
131
|
type: Component,
|
|
157
|
-
args: [{ selector: 'onemrva-mat-navigation', imports: [OnemrvaMatNavigationTreeComponent], encapsulation: ViewEncapsulation.None, standalone: true, template: "<onemrva-mat-navigation-tree
|
|
132
|
+
args: [{ selector: 'onemrva-mat-navigation', imports: [OnemrvaMatNavigationTreeComponent], encapsulation: ViewEncapsulation.None, standalone: true, template: "<onemrva-mat-navigation-tree [items]=\"items()\" [level]=\"level() + 1\" />\n", styles: ["onemrva-mat-navigation{display:flex;width:100%;max-height:calc(100vh - var(--layout-header-height));overflow-y:auto;padding:var(--double-spacer) 0}onemrva-mat-navigation .mat-expansion-panel-body{padding:0}onemrva-mat-navigation .mobile-menu-item{display:flex;width:100%;background:var(--mat-sys-background);padding:var(--double-spacer);border:none;box-shadow:none;align-items:center;text-align:left;font:var(--mat-sys-body-large)}onemrva-mat-navigation .mobile-menu-item:active button,onemrva-mat-navigation .mobile-menu-item.active button{border-left:4px solid var(--mat-sys-tertiary)}onemrva-mat-navigation .mobile-menu-item:hover,onemrva-mat-navigation .mobile-menu-item:focus{background:var(--mat-sys-surface-container-low)}onemrva-mat-navigation .mobile-menu-item mat-icon{margin-left:var(--half-spacer)}onemrva-mat-navigation .mobile-menu-item mat-icon:first-child{margin-right:var(--spacer)}onemrva-mat-navigation .mobile-menu-item mat-icon.end{margin-left:auto}\n"] }]
|
|
158
133
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], translate: [{ type: i0.Input, args: [{ isSignal: true, alias: "translate", required: false }] }] } });
|
|
159
134
|
|
|
160
135
|
/*
|