@ethlete/cdk 3.18.3 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/esm2022/lib/components/button/directives/button/button.directive.mjs +10 -25
- package/esm2022/lib/components/button/directives/query-button/query-button.directive.mjs +8 -17
- package/esm2022/lib/components/filter/rich-filter/components/rich-filter-host/rich-filter-host.component.mjs +5 -4
- package/esm2022/lib/components/forms/components/checkbox/directives/checkbox/checkbox.directive.mjs +7 -11
- package/esm2022/lib/components/forms/components/checkbox/directives/checkbox-field/checkbox-field.directive.mjs +17 -14
- package/esm2022/lib/components/forms/components/checkbox/directives/checkbox-group-control/checkbox-group-control.directive.mjs +6 -13
- package/esm2022/lib/components/forms/components/error/components/error/error.component.mjs +7 -9
- package/esm2022/lib/components/forms/components/radio/directives/radio/radio.directive.mjs +6 -8
- package/esm2022/lib/components/forms/components/radio/directives/radio-field/radio-field.directive.mjs +14 -18
- package/esm2022/lib/components/forms/components/radio/directives/radio-group/radio-group.directive.mjs +5 -11
- package/esm2022/lib/components/forms/components/segmented-button/directives/segmented-button/segmented-button.directive.mjs +6 -8
- package/esm2022/lib/components/forms/components/segmented-button/directives/segmented-button-field/segmented-button-field.directive.mjs +14 -18
- package/esm2022/lib/components/forms/components/segmented-button/directives/segmented-button-group/segmented-button-group.directive.mjs +6 -11
- package/esm2022/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.mjs +14 -25
- package/esm2022/lib/components/forms/components/select/components/combobox/partials/combobox-body/combobox-body.component.mjs +13 -23
- package/esm2022/lib/components/forms/components/select/components/combobox/partials/combobox-option/combobox-option.component.mjs +11 -23
- package/esm2022/lib/components/forms/components/select/components/select/directives/select/select.directive.mjs +26 -22
- package/esm2022/lib/components/forms/components/select/components/select/directives/select-body/select-body.directive.mjs +7 -15
- package/esm2022/lib/components/forms/components/select/components/select/directives/select-option/select-option.directive.mjs +13 -14
- package/esm2022/lib/components/forms/components/select/directives/select-field/select-field.directive.mjs +3 -4
- package/esm2022/lib/components/forms/components/slide-toggle/directives/slide-toggle/slide-toggle.directive.mjs +6 -8
- package/esm2022/lib/components/forms/components/slider/components/slider/slider.component.mjs +18 -41
- package/esm2022/lib/components/forms/directives/input/input.directive.mjs +4 -1
- package/esm2022/lib/components/forms/directives/writeable-input/writeable-input.directive.mjs +10 -23
- package/esm2022/lib/components/forms/services/input-state.service.mjs +21 -4
- package/esm2022/lib/components/forms/utils/decorated-form-field.base.mjs +5 -8
- package/esm2022/lib/components/forms/utils/decorated-input.base.mjs +26 -23
- package/esm2022/lib/components/masonry/components/masonry/masonry.component.mjs +6 -8
- package/esm2022/lib/components/pagination/components/pagination/pagination.component.mjs +4 -2
- package/fesm2022/ethlete-cdk.mjs +213 -346
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/button/directives/button/button.directive.d.ts +4 -1
- package/lib/components/button/directives/query-button/query-button.directive.d.ts +4 -1
- package/lib/components/filter/rich-filter/components/rich-filter-host/rich-filter-host.component.d.ts +1 -0
- package/lib/components/forms/components/checkbox/directives/checkbox/checkbox.directive.d.ts +4 -1
- package/lib/components/forms/components/checkbox/directives/checkbox-field/checkbox-field.directive.d.ts +11 -6
- package/lib/components/forms/components/checkbox/directives/checkbox-group-control/checkbox-group-control.directive.d.ts +6 -4
- package/lib/components/forms/components/error/components/error/error.component.d.ts +4 -1
- package/lib/components/forms/components/radio/directives/radio/radio.directive.d.ts +4 -1
- package/lib/components/forms/components/radio/directives/radio-field/radio-field.directive.d.ts +12 -6
- package/lib/components/forms/components/radio/directives/radio-group/radio-group.directive.d.ts +4 -1
- package/lib/components/forms/components/segmented-button/directives/segmented-button/segmented-button.directive.d.ts +4 -1
- package/lib/components/forms/components/segmented-button/directives/segmented-button-field/segmented-button-field.directive.d.ts +12 -7
- package/lib/components/forms/components/segmented-button/directives/segmented-button-group/segmented-button-group.directive.d.ts +4 -1
- package/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.d.ts +9 -1
- package/lib/components/forms/components/select/components/combobox/partials/combobox-body/combobox-body.component.d.ts +8 -1
- package/lib/components/forms/components/select/components/combobox/partials/combobox-option/combobox-option.component.d.ts +8 -1
- package/lib/components/forms/components/select/components/select/directives/select/select.directive.d.ts +14 -3
- package/lib/components/forms/components/select/components/select/directives/select-body/select-body.directive.d.ts +4 -1
- package/lib/components/forms/components/select/components/select/directives/select-option/select-option.directive.d.ts +10 -1
- package/lib/components/forms/components/select/directives/select-field/select-field.directive.d.ts +2 -2
- package/lib/components/forms/components/slide-toggle/directives/slide-toggle/slide-toggle.directive.d.ts +4 -1
- package/lib/components/forms/components/slider/components/slider/slider.component.d.ts +8 -1
- package/lib/components/forms/directives/input/input.directive.d.ts +21 -19
- package/lib/components/forms/directives/writeable-input/writeable-input.directive.d.ts +4 -1
- package/lib/components/forms/services/input-state.service.d.ts +13 -6
- package/lib/components/forms/utils/decorated-form-field.base.d.ts +4 -1
- package/lib/components/forms/utils/decorated-input.base.d.ts +13 -6
- package/lib/components/masonry/components/masonry/masonry.component.d.ts +4 -1
- package/lib/components/pagination/components/pagination/pagination.component.d.ts +2 -2
- package/package.json +2 -2
package/fesm2022/ethlete-cdk.mjs
CHANGED
|
@@ -4,10 +4,11 @@ import { AsyncPipe, NgIf, NgClass, NgTemplateOutlet, NgForOf, NgFor, NgComponent
|
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, InjectionToken, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, computed, signal, Optional, Inject, Injectable, SkipSelf, HostListener, ViewContainerRef, EventEmitter, NgZone, isDevMode, Output, NgModule, ChangeDetectorRef, ViewChild, runInInjectionContext, TemplateRef, forwardRef, LOCALE_ID, numberAttribute, ViewChildren, Renderer2, Attribute } from '@angular/core';
|
|
6
6
|
import * as i1$2 from '@ethlete/core';
|
|
7
|
-
import { LetDirective, createDestroy, ScrollObserverFirstElementDirective, ScrollObserverLastElementDirective, Memo,
|
|
8
|
-
import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, Subject, filter, take, merge, skipUntil, defer, fromEvent, partition, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, withLatestFrom, skipWhile, catchError, throwError, firstValueFrom, timer, Subscription
|
|
7
|
+
import { LetDirective, createDestroy, ScrollObserverFirstElementDirective, ScrollObserverLastElementDirective, Memo, signalHostAttributes, signalHostClasses, AnimatedIfDirective, AnimatedLifecycleDirective, SmartBlockScrollStrategy, RouterStateService, ANIMATED_LIFECYCLE_TOKEN, nextFrame, elementCanScroll, equal, ViewportService, AnimatedOverlayDirective, ClickObserverService, FocusVisibleService, cloneFormGroup, getFormGroupValue, ObserveVisibilityDirective, signalVisibilityChangeClasses, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, switchQueryListChanges, signalAttributes, ResizeObserverService, createFlipAnimation, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, signalClasses, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, getElementVisibleStates, IS_ACTIVE_ELEMENT, IS_ELEMENT, CursorDragScrollDirective, ObserveScrollStateDirective, IsElementDirective, IsActiveElementDirective, ScrollObserverIgnoreTargetDirective, TypedQueryList } from '@ethlete/core';
|
|
8
|
+
import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, Subject, filter, take, merge, skipUntil, defer, fromEvent, partition, debounceTime as debounceTime$1, Observable, distinctUntilChanged as distinctUntilChanged$1, withLatestFrom, skipWhile, catchError, throwError, firstValueFrom, timer, Subscription } from 'rxjs';
|
|
9
9
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
10
10
|
import { __decorate, __metadata } from 'tslib';
|
|
11
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
12
|
import { extractQuery, isQueryStateLoading, isQueryStateSuccess, isQueryStateFailure, QueryDirective, shouldRetryRequest, isClassValidatorError, isSymfonyFormViolationListError } from '@ethlete/query';
|
|
12
13
|
import { CdkDialogContainer, Dialog, DialogConfig, DIALOG_SCROLL_STRATEGY_PROVIDER as DIALOG_SCROLL_STRATEGY_PROVIDER$1 } from '@angular/cdk/dialog';
|
|
13
14
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
@@ -17,12 +18,11 @@ import { ViewportRuler, STANDARD_DROPDOWN_BELOW_POSITIONS, Overlay, OverlayConfi
|
|
|
17
18
|
import { ESCAPE, hasModifierKey, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, TAB as TAB$1, BACKSPACE, A, PAGE_DOWN, PAGE_UP, END, HOME } from '@angular/cdk/keycodes';
|
|
18
19
|
import * as i1$4 from '@angular/cdk/bidi';
|
|
19
20
|
import { Directionality } from '@angular/cdk/bidi';
|
|
20
|
-
import { coerceBooleanProperty, coerceCssPixelValue, _isNumberValue } from '@angular/cdk/coercion';
|
|
21
|
+
import { coerceBooleanProperty, coerceCssPixelValue, coerceElement, _isNumberValue } from '@angular/cdk/coercion';
|
|
21
22
|
import * as i2$1 from '@angular/cdk/platform';
|
|
22
23
|
import { _getEventTarget } from '@angular/cdk/platform';
|
|
23
24
|
import { startWith as startWith$1, debounceTime, distinctUntilChanged, takeUntil as takeUntil$1, skip as skip$1, filter as filter$1, mergeMap, mapTo, mergeAll, switchMap as switchMap$1, take as take$1 } from 'rxjs/operators';
|
|
24
25
|
import { UniqueSelectionDispatcher, _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';
|
|
25
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
26
26
|
import { AutofillMonitor } from '@angular/cdk/text-field';
|
|
27
27
|
import { FormControl, NgControl, Validators, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
28
28
|
import { Title } from '@angular/platform-browser';
|
|
@@ -1027,27 +1027,11 @@ class ButtonDirective {
|
|
|
1027
1027
|
this._disabled$ = new BehaviorSubject(false);
|
|
1028
1028
|
this._type$ = new BehaviorSubject('button');
|
|
1029
1029
|
this._pressed$ = new BehaviorSubject(false);
|
|
1030
|
-
this.
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}))),
|
|
1036
|
-
}, {
|
|
1037
|
-
attribute: ['tabindex'],
|
|
1038
|
-
observable: this.disabled$.pipe(map((disabled) => ({
|
|
1039
|
-
render: disabled && this.isAnchor,
|
|
1040
|
-
value: -1,
|
|
1041
|
-
}))),
|
|
1042
|
-
}, {
|
|
1043
|
-
attribute: ['type'],
|
|
1044
|
-
observable: this.type$.pipe(map((type) => ({
|
|
1045
|
-
render: this.isButton,
|
|
1046
|
-
value: type,
|
|
1047
|
-
}))),
|
|
1048
|
-
}, {
|
|
1049
|
-
attribute: ['aria-pressed'],
|
|
1050
|
-
observable: this._pressed$,
|
|
1030
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
1031
|
+
'disabled aria-disabled': toSignal(this.disabled$),
|
|
1032
|
+
'aria-pressed': toSignal(this._pressed$),
|
|
1033
|
+
...(this.isAnchor ? { tabindex: toSignal(this.disabled$.pipe(map((disabled) => (disabled ? -1 : 0)))) } : {}),
|
|
1034
|
+
...(this.isButton ? { type: toSignal(this.type$) } : {}),
|
|
1051
1035
|
});
|
|
1052
1036
|
}
|
|
1053
1037
|
get disabled() {
|
|
@@ -1075,10 +1059,10 @@ class ButtonDirective {
|
|
|
1075
1059
|
this._pressed$.next(booleanAttribute(value));
|
|
1076
1060
|
}
|
|
1077
1061
|
_removeDisabledBindings() {
|
|
1078
|
-
this.
|
|
1062
|
+
this.hostAttributeBindings.remove('disabled', 'aria-disabled');
|
|
1079
1063
|
}
|
|
1080
1064
|
_removeTabIndexBindings() {
|
|
1081
|
-
this.
|
|
1065
|
+
this.hostAttributeBindings.remove('tabindex');
|
|
1082
1066
|
}
|
|
1083
1067
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1084
1068
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: ButtonDirective, isStandalone: true, inputs: { disabled: "disabled", type: "type", pressed: "pressed" }, exportAs: ["etButton"], ngImport: i0 }); }
|
|
@@ -1133,7 +1117,6 @@ class QueryButtonDirective {
|
|
|
1133
1117
|
classList.remove(CLASSES.success);
|
|
1134
1118
|
classList.remove(CLASSES.failure);
|
|
1135
1119
|
classList.remove(CLASSES.loading);
|
|
1136
|
-
this._bindings.reset();
|
|
1137
1120
|
const query = extractQuery(this._query$.value);
|
|
1138
1121
|
if (!query) {
|
|
1139
1122
|
return;
|
|
@@ -1184,15 +1167,9 @@ class QueryButtonDirective {
|
|
|
1184
1167
|
this._skipFailure = false;
|
|
1185
1168
|
this._skipLoading = false;
|
|
1186
1169
|
this._query$ = new BehaviorSubject(null);
|
|
1187
|
-
this.
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
render: disabled || showFailure || showSuccess || isLoading,
|
|
1191
|
-
value: true,
|
|
1192
|
-
}))),
|
|
1193
|
-
}, {
|
|
1194
|
-
attribute: ['aria-live'],
|
|
1195
|
-
observable: combineLatest([
|
|
1170
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
1171
|
+
'disabled aria-disabled': toSignal(combineLatest([this._button.disabled$, this.showFailure$, this.showSuccess$, this.isLoading$]).pipe(map(([disabled, showFailure, showSuccess, isLoading]) => disabled || showFailure || showSuccess || isLoading))),
|
|
1172
|
+
'aria-live': toSignal(combineLatest([
|
|
1196
1173
|
this.query$.pipe(map((q) => extractQuery(q)), switchMap((q) => q?.state$ ?? of(null))),
|
|
1197
1174
|
this.didLoadOnce$,
|
|
1198
1175
|
]).pipe(map(([state, didLoadOnce]) => {
|
|
@@ -1200,11 +1177,8 @@ class QueryButtonDirective {
|
|
|
1200
1177
|
if (isQueryStateLoading(state) || isQueryStateSuccess(state) || isQueryStateFailure(state) || didLoadOnce) {
|
|
1201
1178
|
value = 'assertive';
|
|
1202
1179
|
}
|
|
1203
|
-
return
|
|
1204
|
-
|
|
1205
|
-
value,
|
|
1206
|
-
};
|
|
1207
|
-
})),
|
|
1180
|
+
return value;
|
|
1181
|
+
}))),
|
|
1208
1182
|
});
|
|
1209
1183
|
this._button._removeDisabledBindings();
|
|
1210
1184
|
}
|
|
@@ -5683,10 +5657,11 @@ class RichFilterHostComponent {
|
|
|
5683
5657
|
this.buttonSlot$ = new BehaviorSubject(null);
|
|
5684
5658
|
this.content$ = new BehaviorSubject(null);
|
|
5685
5659
|
this.top$ = new BehaviorSubject(this._implicitTop);
|
|
5686
|
-
this.buttonSlotVisibilityChanges$ = this.buttonSlot$.pipe(switchMap((buttonSlot) => buttonSlot?.visibilityObserver.
|
|
5687
|
-
this.contentVisibilityChanges$ = this.content$.pipe(switchMap((content) => content?.visibilityObserver.
|
|
5660
|
+
this.buttonSlotVisibilityChanges$ = this.buttonSlot$.pipe(switchMap((buttonSlot) => buttonSlot?.visibilityObserver.currentVisibility$ ?? of(null)));
|
|
5661
|
+
this.contentVisibilityChanges$ = this.content$.pipe(switchMap((content) => content?.visibilityObserver.currentVisibility$ ?? of(null)));
|
|
5688
5662
|
this.buttonSlotVisibilityChanges = toSignal(this.buttonSlotVisibilityChanges$, { requireSync: true });
|
|
5689
5663
|
this.contentVisibilityChanges = toSignal(this.contentVisibilityChanges$, { requireSync: true });
|
|
5664
|
+
this.topElementRef = toSignal(this.top$.pipe(map((top) => top.elementRef)), { requireSync: true });
|
|
5690
5665
|
signalHostClasses({
|
|
5691
5666
|
...signalVisibilityChangeClasses({
|
|
5692
5667
|
name: 'et-rich-filter-host-button',
|
|
@@ -5853,8 +5828,25 @@ class InputStateService {
|
|
|
5853
5828
|
this.valueIsTruthy = toSignal(this.valueIsTruthy$, { requireSync: true });
|
|
5854
5829
|
this.valueIsFalsy$ = this.value$.pipe(map((value) => !value));
|
|
5855
5830
|
this.valueIsFalsy = toSignal(this.valueIsFalsy$, { requireSync: true });
|
|
5856
|
-
|
|
5857
|
-
|
|
5831
|
+
/**
|
|
5832
|
+
* Selects might have a option that is "null".
|
|
5833
|
+
* This helper can be used to enhance the detection of empty values.
|
|
5834
|
+
* The input is empty if the helper returns a falsy value and the value itself is falsy or an empty array.
|
|
5835
|
+
*/
|
|
5836
|
+
this.isEmptyHelper$ = new BehaviorSubject(undefined);
|
|
5837
|
+
this.isEmptyHelper = toSignal(this.isEmptyHelper$, { requireSync: true });
|
|
5838
|
+
this.valueIsEmpty$ = combineLatest([
|
|
5839
|
+
this.value$,
|
|
5840
|
+
this.autofilled$,
|
|
5841
|
+
this.isEmptyHelper$.pipe(switchMap((isEmptyHelper) => (isEmptyHelper instanceof Observable ? isEmptyHelper : of(isEmptyHelper)))),
|
|
5842
|
+
]).pipe(map(([value, autofilled, isEmptyHelper]) => {
|
|
5843
|
+
const defaultIsEmpty = (value === null || value === undefined || value === '' || (Array.isArray(value) && !value.length)) &&
|
|
5844
|
+
!autofilled;
|
|
5845
|
+
if (isEmptyHelper !== undefined) {
|
|
5846
|
+
return !isEmptyHelper && defaultIsEmpty;
|
|
5847
|
+
}
|
|
5848
|
+
return defaultIsEmpty;
|
|
5849
|
+
}));
|
|
5858
5850
|
this.valueIsEmpty = toSignal(this.valueIsEmpty$, { requireSync: true });
|
|
5859
5851
|
this.errors$ = new BehaviorSubject(null);
|
|
5860
5852
|
this.errors = toSignal(this.errors$, { requireSync: true });
|
|
@@ -6334,6 +6326,9 @@ class InputDirective {
|
|
|
6334
6326
|
}
|
|
6335
6327
|
this._inputStateService.shouldDisplayError$.next(value);
|
|
6336
6328
|
}
|
|
6329
|
+
_setEmptyHelper(value) {
|
|
6330
|
+
this._inputStateService.isEmptyHelper$.next(value);
|
|
6331
|
+
}
|
|
6337
6332
|
_detectControlRequiredValidationChanges() {
|
|
6338
6333
|
const hasRequired = this.control.hasValidator(Validators.required) ?? false;
|
|
6339
6334
|
const hasRequiredTrue = this.control.hasValidator(Validators.requiredTrue) ?? false;
|
|
@@ -6617,27 +6612,14 @@ const WRITEABLE_INPUT_VALUE_ACCESSOR = {
|
|
|
6617
6612
|
class WriteableInputDirective {
|
|
6618
6613
|
constructor() {
|
|
6619
6614
|
this._inputStateService = inject(InputStateService);
|
|
6620
|
-
this.
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
observable: this._inputStateService.valueIsTruthy$,
|
|
6629
|
-
}, {
|
|
6630
|
-
attribute: 'class.et-value-is-falsy',
|
|
6631
|
-
observable: this._inputStateService.valueIsFalsy$,
|
|
6632
|
-
}, {
|
|
6633
|
-
attribute: 'class.et-empty',
|
|
6634
|
-
observable: this._inputStateService.valueIsEmpty$,
|
|
6635
|
-
}, {
|
|
6636
|
-
attribute: 'class.et-should-display-error',
|
|
6637
|
-
observable: this._inputStateService.shouldDisplayError$,
|
|
6638
|
-
}, {
|
|
6639
|
-
attribute: 'class.et-autofilled',
|
|
6640
|
-
observable: this._inputStateService.autofilled$,
|
|
6615
|
+
this.hostClassBindings = signalHostClasses({
|
|
6616
|
+
'et-required': this._inputStateService.required,
|
|
6617
|
+
'et-disabled': this._inputStateService.disabled,
|
|
6618
|
+
'et-value-is-truthy': this._inputStateService.valueIsTruthy,
|
|
6619
|
+
'et-value-is-falsy': this._inputStateService.valueIsFalsy,
|
|
6620
|
+
'et-empty': this._inputStateService.valueIsEmpty,
|
|
6621
|
+
'et-should-display-error': this._inputStateService.shouldDisplayError,
|
|
6622
|
+
'et-autofilled': this._inputStateService.autofilled,
|
|
6641
6623
|
});
|
|
6642
6624
|
}
|
|
6643
6625
|
writeValue(value) {
|
|
@@ -6681,12 +6663,9 @@ class ErrorComponent {
|
|
|
6681
6663
|
this.errorText$ = new BehaviorSubject(null);
|
|
6682
6664
|
this.id = `et-error-${_uniqueIdCounter++}`;
|
|
6683
6665
|
this._errors = null;
|
|
6684
|
-
this.
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
}, {
|
|
6688
|
-
attribute: 'class.cdk-visually-hidden',
|
|
6689
|
-
observable: this._dynamicFormGroupOrField.hideErrorMessage$,
|
|
6666
|
+
this.hostClassBindings = signalHostClasses({
|
|
6667
|
+
'et-error--has-errors': toSignal(this.errorText$),
|
|
6668
|
+
'cdk-visually-hidden': toSignal(this._dynamicFormGroupOrField.hideErrorMessage$),
|
|
6690
6669
|
});
|
|
6691
6670
|
}
|
|
6692
6671
|
get errors() {
|
|
@@ -6725,19 +6704,21 @@ const CHECKBOX_FIELD_TOKEN = new InjectionToken('ET_CHECKBOX_FIELD_DIRECTIVE_TOK
|
|
|
6725
6704
|
class CheckboxFieldDirective {
|
|
6726
6705
|
constructor() {
|
|
6727
6706
|
this.inputState = inject(InputStateService);
|
|
6728
|
-
this.
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
observable: this._checkbox.changes.pipe(startWith(this._checkbox)).pipe(switchMap((checkboxes) => combineLatest(checkboxes.filter((cb) => !!cb).map((checkbox) => checkbox.indeterminate$))), map((checked) => checked.some((value) => value))),
|
|
6707
|
+
this._checkbox$ = new BehaviorSubject(null);
|
|
6708
|
+
this.hostClassBindings = signalHostClasses({
|
|
6709
|
+
'et-checkbox-field--indeterminate': toSignal(this._checkbox$.pipe(switchQueryListChanges(), switchMap((checkboxes) => {
|
|
6710
|
+
if (!checkboxes?.length) {
|
|
6711
|
+
return of(null);
|
|
6712
|
+
}
|
|
6713
|
+
return combineLatest(checkboxes.map((checkbox) => checkbox.indeterminate$)).pipe(map((indeterminateStates) => indeterminateStates.some((isIndeterminate) => isIndeterminate)));
|
|
6714
|
+
}))),
|
|
6737
6715
|
});
|
|
6738
6716
|
}
|
|
6717
|
+
set checkbox(checkbox) {
|
|
6718
|
+
this._checkbox$.next(checkbox);
|
|
6719
|
+
}
|
|
6739
6720
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: CheckboxFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6740
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: CheckboxFieldDirective, isStandalone: true, providers: [{ provide: CHECKBOX_FIELD_TOKEN, useExisting: CheckboxFieldDirective }], queries: [{ propertyName: "
|
|
6721
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: CheckboxFieldDirective, isStandalone: true, providers: [{ provide: CHECKBOX_FIELD_TOKEN, useExisting: CheckboxFieldDirective }], queries: [{ propertyName: "checkbox", predicate: i0.forwardRef(function () { return CHECKBOX_TOKEN; }), descendants: true }], exportAs: ["etCheckboxGroup"], ngImport: i0 }); }
|
|
6741
6722
|
}
|
|
6742
6723
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: CheckboxFieldDirective, decorators: [{
|
|
6743
6724
|
type: Directive,
|
|
@@ -6746,7 +6727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
6746
6727
|
providers: [{ provide: CHECKBOX_FIELD_TOKEN, useExisting: CheckboxFieldDirective }],
|
|
6747
6728
|
exportAs: 'etCheckboxGroup',
|
|
6748
6729
|
}]
|
|
6749
|
-
}], propDecorators: {
|
|
6730
|
+
}], propDecorators: { checkbox: [{
|
|
6750
6731
|
type: ContentChildren,
|
|
6751
6732
|
args: [forwardRef(() => CHECKBOX_TOKEN), { descendants: true }]
|
|
6752
6733
|
}] } });
|
|
@@ -6757,15 +6738,10 @@ class CheckboxDirective {
|
|
|
6757
6738
|
this.input = inject(INPUT_TOKEN);
|
|
6758
6739
|
this.checked$ = this.input.value$.pipe(map((value) => !!value));
|
|
6759
6740
|
this.indeterminate$ = new BehaviorSubject(false);
|
|
6760
|
-
this.
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
attribute: ['class.et-checkbox--disabled'],
|
|
6765
|
-
observable: this.input.disabled$,
|
|
6766
|
-
}, {
|
|
6767
|
-
attribute: ['class.et-checkbox--indeterminate'],
|
|
6768
|
-
observable: combineLatest([this.checked$, this.indeterminate$]).pipe(map(([checked, indeterminate]) => !checked && indeterminate)),
|
|
6741
|
+
this.hostClassBindings = signalHostClasses({
|
|
6742
|
+
'et-checkbox--checked': toSignal(this.checked$),
|
|
6743
|
+
'et-checkbox--disabled': toSignal(this.input.disabled$),
|
|
6744
|
+
'et-checkbox--indeterminate': toSignal(combineLatest([this.checked$, this.indeterminate$]).pipe(map(([checked, indeterminate]) => !checked && indeterminate))),
|
|
6769
6745
|
});
|
|
6770
6746
|
}
|
|
6771
6747
|
_onInputInteraction(event) {
|
|
@@ -6873,16 +6849,8 @@ class CheckboxGroupControlDirective {
|
|
|
6873
6849
|
this.checkbox = inject(CHECKBOX_TOKEN);
|
|
6874
6850
|
this.input = inject(INPUT_TOKEN);
|
|
6875
6851
|
this.group = inject(CHECKBOX_GROUP_TOKEN);
|
|
6876
|
-
this.
|
|
6877
|
-
|
|
6878
|
-
ngAfterContentInit() {
|
|
6879
|
-
this._bindings.push({
|
|
6880
|
-
attribute: ['aria-controls'],
|
|
6881
|
-
elementRef: this.input.nativeInputRef?.element,
|
|
6882
|
-
observable: this.group.checkboxesWithoutGroupCtrl$.pipe(map((checkboxes) => ({
|
|
6883
|
-
render: true,
|
|
6884
|
-
value: checkboxes.map((checkbox) => checkbox.input.id).join(' '),
|
|
6885
|
-
}))) ?? of(false),
|
|
6852
|
+
this.inputAttributeBindings = signalAttributes(this.input.nativeInputRef$.pipe(map((el) => el?.element)), {
|
|
6853
|
+
'aria-controls': toSignal(this.group.checkboxesWithoutGroupCtrl$.pipe(map((checkboxes) => checkboxes.map((checkbox) => checkbox.input.id).join(' ')))),
|
|
6886
6854
|
});
|
|
6887
6855
|
}
|
|
6888
6856
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: CheckboxGroupControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -6946,12 +6914,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
6946
6914
|
class DecoratedFormFieldBase {
|
|
6947
6915
|
constructor() {
|
|
6948
6916
|
this._formFieldStateService = inject(FormFieldStateService);
|
|
6949
|
-
this.
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
}, {
|
|
6953
|
-
attribute: 'class.et-form-field--has-suffix',
|
|
6954
|
-
observable: this._formFieldStateService.hasSuffix$,
|
|
6917
|
+
this.hostClassBindings = signalHostClasses({
|
|
6918
|
+
'et-form-field--has-prefix': this._formFieldStateService.hasPrefix,
|
|
6919
|
+
'et-form-field--has-suffix': this._formFieldStateService.hasSuffix,
|
|
6955
6920
|
});
|
|
6956
6921
|
}
|
|
6957
6922
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DecoratedFormFieldBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -6979,35 +6944,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
6979
6944
|
}] } });
|
|
6980
6945
|
|
|
6981
6946
|
class DecoratedInputBase extends InputBase {
|
|
6947
|
+
set inputPrefix(inputPrefix) {
|
|
6948
|
+
this.inputPrefix$.next(inputPrefix);
|
|
6949
|
+
}
|
|
6950
|
+
set inputSuffix(inputSuffix) {
|
|
6951
|
+
this.inputSuffix$.next(inputSuffix);
|
|
6952
|
+
}
|
|
6982
6953
|
constructor() {
|
|
6983
|
-
super(
|
|
6954
|
+
super();
|
|
6984
6955
|
this._formFieldStateService = inject(FormFieldStateService);
|
|
6985
6956
|
this._destroy$ = createDestroy();
|
|
6986
|
-
this.
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6957
|
+
this.inputPrefix$ = new BehaviorSubject(null);
|
|
6958
|
+
this.inputSuffix$ = new BehaviorSubject(null);
|
|
6959
|
+
this.hasPrefix$ = this.inputPrefix$.pipe(switchQueryListChanges(), map((list) => !!list && list?.length > 0));
|
|
6960
|
+
this.hasSuffix$ = this.inputSuffix$.pipe(switchQueryListChanges(), map((list) => !!list && list?.length > 0));
|
|
6961
|
+
this.hostClassBindings = signalHostClasses({
|
|
6962
|
+
'et-input--has-prefix': toSignal(this.hasPrefix$),
|
|
6963
|
+
'et-input--has-suffix': toSignal(this.hasSuffix$),
|
|
6992
6964
|
});
|
|
6965
|
+
this.hasPrefix$
|
|
6966
|
+
.pipe(takeUntilDestroyed(), tap((hasPrefix) => this._formFieldStateService.hasPrefix$.next(hasPrefix)))
|
|
6967
|
+
.subscribe();
|
|
6968
|
+
this.hasSuffix$
|
|
6969
|
+
.pipe(takeUntilDestroyed(), tap((hasSuffix) => this._formFieldStateService.hasSuffix$.next(hasSuffix)))
|
|
6970
|
+
.subscribe();
|
|
6993
6971
|
}
|
|
6994
|
-
|
|
6995
|
-
if (!this.inputPrefix || !this.inputSuffix) {
|
|
6996
|
-
return;
|
|
6997
|
-
}
|
|
6998
|
-
this.inputPrefix.changes
|
|
6999
|
-
.pipe(takeUntil(this._destroy$), startWith(this.inputPrefix), map((list) => list.length > 0))
|
|
7000
|
-
.subscribe(this._formFieldStateService.hasPrefix$);
|
|
7001
|
-
this.inputSuffix.changes
|
|
7002
|
-
.pipe(takeUntil(this._destroy$), startWith(this.inputSuffix), map((list) => list.length > 0))
|
|
7003
|
-
.subscribe(this._formFieldStateService.hasSuffix$);
|
|
7004
|
-
}
|
|
7005
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DecoratedInputBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6972
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DecoratedInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7006
6973
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: DecoratedInputBase, queries: [{ propertyName: "inputPrefix", predicate: INPUT_PREFIX_TOKEN }, { propertyName: "inputSuffix", predicate: INPUT_SUFFIX_TOKEN }], usesInheritance: true, ngImport: i0 }); }
|
|
7007
6974
|
}
|
|
7008
6975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: DecoratedInputBase, decorators: [{
|
|
7009
6976
|
type: Directive
|
|
7010
|
-
}], propDecorators: { inputPrefix: [{
|
|
6977
|
+
}], ctorParameters: function () { return []; }, propDecorators: { inputPrefix: [{
|
|
7011
6978
|
type: ContentChildren,
|
|
7012
6979
|
args: [INPUT_PREFIX_TOKEN]
|
|
7013
6980
|
}], inputSuffix: [{
|
|
@@ -7638,12 +7605,9 @@ class RadioDirective {
|
|
|
7638
7605
|
this._disabled$ = new BehaviorSubject(false);
|
|
7639
7606
|
this.checked$ = combineLatest([this.input.value$, this._value$]).pipe(map(([inputValue, value]) => inputValue === value));
|
|
7640
7607
|
this.disabled$ = combineLatest([this.input.disabled$, this._disabled$]).pipe(map(([inputDisabled, disabled]) => inputDisabled || disabled));
|
|
7641
|
-
this.
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
}, {
|
|
7645
|
-
attribute: ['class.et-radio--disabled'],
|
|
7646
|
-
observable: this.disabled$,
|
|
7608
|
+
this.hostClassBindings = signalHostClasses({
|
|
7609
|
+
'et-radio--checked': toSignal(this.disabled$),
|
|
7610
|
+
'et-radio--disabled': toSignal(this.disabled$),
|
|
7647
7611
|
});
|
|
7648
7612
|
}
|
|
7649
7613
|
get value() {
|
|
@@ -7691,23 +7655,18 @@ const RADIO_FIELD_TOKEN = new InjectionToken('ET_RADIO_FIELD_DIRECTIVE_TOKEN');
|
|
|
7691
7655
|
class RadioFieldDirective {
|
|
7692
7656
|
constructor() {
|
|
7693
7657
|
this.inputState = inject(InputStateService);
|
|
7694
|
-
this.
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
}
|
|
7700
|
-
this._bindings.push({
|
|
7701
|
-
attribute: 'class.et-radio-field--checked',
|
|
7702
|
-
observable: this._radio.changes.pipe(startWith(this._radio)).pipe(switchMap((radios) => combineLatest(radios.filter((radio) => !!radio).map((radio) => radio.checked$))), map((checked) => checked.some((value) => value))),
|
|
7703
|
-
});
|
|
7704
|
-
this._bindings.push({
|
|
7705
|
-
attribute: 'class.et-radio-field--disabled',
|
|
7706
|
-
observable: this._radio.changes.pipe(startWith(this._radio)).pipe(switchMap((radios) => combineLatest(radios.filter((radio) => !!radio).map((radio) => radio.disabled$))), map((disabled) => disabled.some((value) => value))),
|
|
7658
|
+
this._radio$ = new BehaviorSubject(null);
|
|
7659
|
+
this.radioQueryList$ = this._radio$.pipe(switchQueryListChanges());
|
|
7660
|
+
this.hostClassBindings = signalHostClasses({
|
|
7661
|
+
'et-radio-field--checked': toSignal(this.radioQueryList$.pipe(switchMap((radios) => (radios?.length ? combineLatest(radios.map((radio) => radio.disabled$)) : of([]))), map((checked) => checked.some((value) => value)))),
|
|
7662
|
+
'et-radio-field--disabled': toSignal(this.radioQueryList$.pipe(switchMap((radios) => (radios?.length ? combineLatest(radios.map((radio) => radio.disabled$)) : of([]))), map((disabled) => disabled.some((value) => value)))),
|
|
7707
7663
|
});
|
|
7708
7664
|
}
|
|
7665
|
+
set radio(radio) {
|
|
7666
|
+
this._radio$.next(radio);
|
|
7667
|
+
}
|
|
7709
7668
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: RadioFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7710
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: RadioFieldDirective, isStandalone: true, providers: [{ provide: RADIO_FIELD_TOKEN, useExisting: RadioFieldDirective }], queries: [{ propertyName: "
|
|
7669
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: RadioFieldDirective, isStandalone: true, providers: [{ provide: RADIO_FIELD_TOKEN, useExisting: RadioFieldDirective }], queries: [{ propertyName: "radio", predicate: i0.forwardRef(function () { return RADIO_TOKEN; }), descendants: true }], exportAs: ["etRadioField"], ngImport: i0 }); }
|
|
7711
7670
|
}
|
|
7712
7671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: RadioFieldDirective, decorators: [{
|
|
7713
7672
|
type: Directive,
|
|
@@ -7716,7 +7675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
7716
7675
|
providers: [{ provide: RADIO_FIELD_TOKEN, useExisting: RadioFieldDirective }],
|
|
7717
7676
|
exportAs: 'etRadioField',
|
|
7718
7677
|
}]
|
|
7719
|
-
}], propDecorators: {
|
|
7678
|
+
}], propDecorators: { radio: [{
|
|
7720
7679
|
type: ContentChildren,
|
|
7721
7680
|
args: [forwardRef(() => RADIO_TOKEN), { descendants: true }]
|
|
7722
7681
|
}] } });
|
|
@@ -7727,14 +7686,8 @@ class RadioGroupDirective {
|
|
|
7727
7686
|
constructor() {
|
|
7728
7687
|
this._formGroupStateService = inject(FormGroupStateService);
|
|
7729
7688
|
this.name = `et-radio-group-${++nextUniqueId$3}`;
|
|
7730
|
-
this.
|
|
7731
|
-
|
|
7732
|
-
observable: this._formGroupStateService.describedBy$.pipe(map((describedBy) => {
|
|
7733
|
-
return {
|
|
7734
|
-
render: !!describedBy,
|
|
7735
|
-
value: `${describedBy}`,
|
|
7736
|
-
};
|
|
7737
|
-
})),
|
|
7689
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
7690
|
+
'aria-labelledby': toSignal(this._formGroupStateService.describedBy$),
|
|
7738
7691
|
});
|
|
7739
7692
|
}
|
|
7740
7693
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: RadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -7835,12 +7788,9 @@ class SegmentedButtonDirective {
|
|
|
7835
7788
|
this._disabled$ = new BehaviorSubject(false);
|
|
7836
7789
|
this.checked$ = combineLatest([this.input.value$, this._value$]).pipe(map(([inputValue, value]) => inputValue === value));
|
|
7837
7790
|
this.disabled$ = combineLatest([this.input.disabled$, this._disabled$]).pipe(map(([inputDisabled, disabled]) => inputDisabled || disabled));
|
|
7838
|
-
this.
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
}, {
|
|
7842
|
-
attribute: ['class.et-segmented-button--disabled'],
|
|
7843
|
-
observable: this.disabled$,
|
|
7791
|
+
this.hostClassBindings = signalHostClasses({
|
|
7792
|
+
'et-segmented-button--checked': toSignal(this.checked$),
|
|
7793
|
+
'et-segmented-button--disabled': toSignal(this.disabled$),
|
|
7844
7794
|
});
|
|
7845
7795
|
}
|
|
7846
7796
|
get value() {
|
|
@@ -7897,23 +7847,18 @@ const SEGMENTED_BUTTON_FIELD_TOKEN = new InjectionToken('ET_SEGMENTED_BUTTON_FIE
|
|
|
7897
7847
|
class SegmentedButtonFieldDirective {
|
|
7898
7848
|
constructor() {
|
|
7899
7849
|
this.inputState = inject(InputStateService);
|
|
7900
|
-
this.
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
}
|
|
7906
|
-
this._bindings.push({
|
|
7907
|
-
attribute: 'class.et-segmented-button-field--checked',
|
|
7908
|
-
observable: this._segmentedButton.changes.pipe(startWith(this._segmentedButton)).pipe(switchMap((buttons) => combineLatest(buttons.filter((radio) => !!radio).map((button) => button.checked$))), map((checked) => checked.some((value) => value))),
|
|
7909
|
-
});
|
|
7910
|
-
this._bindings.push({
|
|
7911
|
-
attribute: 'class.et-segmented-button-field--disabled',
|
|
7912
|
-
observable: this._segmentedButton.changes.pipe(startWith(this._segmentedButton)).pipe(switchMap((buttons) => combineLatest(buttons.filter((radio) => !!radio).map((button) => button.disabled$))), map((disabled) => disabled.some((value) => value))),
|
|
7850
|
+
this._segmentedButton$ = new BehaviorSubject(null);
|
|
7851
|
+
this.segmentedButtonQueryList$ = this._segmentedButton$.pipe(switchQueryListChanges());
|
|
7852
|
+
this.hostClassBindings = signalHostClasses({
|
|
7853
|
+
'et-segmented-button-field--checked': toSignal(this.segmentedButtonQueryList$.pipe(switchMap((buttons) => (buttons?.length ? combineLatest(buttons.map((radio) => radio.disabled$)) : of([]))), map((checked) => checked.some((value) => value)))),
|
|
7854
|
+
'et-segmented-button-field--disabled': toSignal(this.segmentedButtonQueryList$.pipe(switchMap((buttons) => (buttons?.length ? combineLatest(buttons.map((radio) => radio.disabled$)) : of([]))), map((disabled) => disabled.some((value) => value)))),
|
|
7913
7855
|
});
|
|
7914
7856
|
}
|
|
7857
|
+
set segmentedButton(segmentedButton) {
|
|
7858
|
+
this._segmentedButton$.next(segmentedButton);
|
|
7859
|
+
}
|
|
7915
7860
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: SegmentedButtonFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7916
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: SegmentedButtonFieldDirective, isStandalone: true, providers: [{ provide: SEGMENTED_BUTTON_FIELD_TOKEN, useExisting: SegmentedButtonFieldDirective }], queries: [{ propertyName: "
|
|
7861
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: SegmentedButtonFieldDirective, isStandalone: true, providers: [{ provide: SEGMENTED_BUTTON_FIELD_TOKEN, useExisting: SegmentedButtonFieldDirective }], queries: [{ propertyName: "segmentedButton", predicate: i0.forwardRef(function () { return SEGMENTED_BUTTON_TOKEN; }), descendants: true }], exportAs: ["etSegmentedButtonField"], ngImport: i0 }); }
|
|
7917
7862
|
}
|
|
7918
7863
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: SegmentedButtonFieldDirective, decorators: [{
|
|
7919
7864
|
type: Directive,
|
|
@@ -7922,7 +7867,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
7922
7867
|
providers: [{ provide: SEGMENTED_BUTTON_FIELD_TOKEN, useExisting: SegmentedButtonFieldDirective }],
|
|
7923
7868
|
exportAs: 'etSegmentedButtonField',
|
|
7924
7869
|
}]
|
|
7925
|
-
}], propDecorators: {
|
|
7870
|
+
}], propDecorators: { segmentedButton: [{
|
|
7926
7871
|
type: ContentChildren,
|
|
7927
7872
|
args: [forwardRef(() => SEGMENTED_BUTTON_TOKEN), { descendants: true }]
|
|
7928
7873
|
}] } });
|
|
@@ -7935,14 +7880,8 @@ class SegmentedButtonGroupDirective {
|
|
|
7935
7880
|
this._inputStateService = inject(InputStateService);
|
|
7936
7881
|
this._destroy$ = createDestroy();
|
|
7937
7882
|
this.name = `et-segmented-button-group-${++nextUniqueId$2}`;
|
|
7938
|
-
this.
|
|
7939
|
-
|
|
7940
|
-
observable: this._formGroupStateService.describedBy$.pipe(map((describedBy) => {
|
|
7941
|
-
return {
|
|
7942
|
-
render: !!describedBy,
|
|
7943
|
-
value: `${describedBy}`,
|
|
7944
|
-
};
|
|
7945
|
-
})),
|
|
7883
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
7884
|
+
'aria-labelledby': toSignal(this._formGroupStateService.describedBy$),
|
|
7946
7885
|
});
|
|
7947
7886
|
}
|
|
7948
7887
|
ngAfterContentInit() {
|
|
@@ -8077,7 +8016,7 @@ const SegmentedButtonImports = [
|
|
|
8077
8016
|
const SELECT_FIELD_TOKEN = new InjectionToken('ET_SELECT_FIELD_DIRECTIVE_TOKEN');
|
|
8078
8017
|
class SelectFieldDirective {
|
|
8079
8018
|
constructor() {
|
|
8080
|
-
this.
|
|
8019
|
+
this.elementRef = inject(ElementRef);
|
|
8081
8020
|
}
|
|
8082
8021
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: SelectFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8083
8022
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: SelectFieldDirective, isStandalone: true, providers: [{ provide: SELECT_FIELD_TOKEN, useExisting: SelectFieldDirective }], exportAs: ["etSelectField"], ngImport: i0 }); }
|
|
@@ -8525,6 +8464,7 @@ class ComboboxDirective {
|
|
|
8525
8464
|
this.activeOptionId$ = new BehaviorSubject(null);
|
|
8526
8465
|
this._currentFilter$ = new BehaviorSubject('');
|
|
8527
8466
|
this.isOpen$ = this._animatedOverlay.isMounted$;
|
|
8467
|
+
this.isOpen = toSignal(this.isOpen$);
|
|
8528
8468
|
this._selectionModel = new SelectionModel();
|
|
8529
8469
|
this._activeSelectionModel = new ActiveSelectionModel();
|
|
8530
8470
|
this._backspaceKeyPressManager = new KeyPressManager(BACKSPACE);
|
|
@@ -8539,21 +8479,16 @@ class ComboboxDirective {
|
|
|
8539
8479
|
this._bodyErrorTemplate$ = new BehaviorSubject(null);
|
|
8540
8480
|
this._bodyEmptyTemplate$ = new BehaviorSubject(null);
|
|
8541
8481
|
this._bodyMoreItemsHintTemplate$ = new BehaviorSubject(null);
|
|
8542
|
-
this.
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
}
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
attribute: 'class.et-select-field--multiple',
|
|
8553
|
-
observable: this.multiple$,
|
|
8554
|
-
}, {
|
|
8555
|
-
attribute: 'class.et-select-field--open',
|
|
8556
|
-
observable: this.isOpen$,
|
|
8482
|
+
this.hostClassBindings = signalHostClasses({
|
|
8483
|
+
'et-combobox--loading': toSignal(this._loading$),
|
|
8484
|
+
'et-combobox--error': toSignal(this._error$.pipe(map((v) => !!v))),
|
|
8485
|
+
'et-combobox--open': toSignal(this.isOpen$),
|
|
8486
|
+
'et-select-field--multiple': toSignal(this.multiple$),
|
|
8487
|
+
'et-select-field--open': this.isOpen,
|
|
8488
|
+
});
|
|
8489
|
+
this.fieldHostClassBindings = signalClasses(this._selectField.elementRef, {
|
|
8490
|
+
'et-select-field--open': toSignal(this.isOpen$),
|
|
8491
|
+
'et-select-field--multiple': toSignal(this.multiple$),
|
|
8557
8492
|
});
|
|
8558
8493
|
this._comboboxBodyComponent = null;
|
|
8559
8494
|
//#endregion
|
|
@@ -8575,14 +8510,7 @@ class ComboboxDirective {
|
|
|
8575
8510
|
this._animatedOverlay.placement = 'bottom';
|
|
8576
8511
|
this._animatedOverlay.fallbackPlacements = ['bottom', 'top'];
|
|
8577
8512
|
this._animatedOverlay.autoResize = true;
|
|
8578
|
-
this.
|
|
8579
|
-
attribute: 'class.et-select-field--open',
|
|
8580
|
-
observable: this.isOpen$,
|
|
8581
|
-
});
|
|
8582
|
-
this._selectField._bindings.push({
|
|
8583
|
-
attribute: 'class.et-select-field--multiple',
|
|
8584
|
-
observable: this.multiple$,
|
|
8585
|
-
});
|
|
8513
|
+
this._input._setEmptyHelper(this._currentFilter$);
|
|
8586
8514
|
}
|
|
8587
8515
|
ngOnInit() {
|
|
8588
8516
|
this._initDispatchFilterChanges();
|
|
@@ -9025,27 +8953,14 @@ class ComboboxOptionComponent {
|
|
|
9025
8953
|
this.disabled$ = this._option$.pipe(map((opt) => isOptionDisabled(opt)));
|
|
9026
8954
|
this.selected$ = this._option$.pipe(switchMap((opt) => this.combobox.isOptionSelected(opt)));
|
|
9027
8955
|
this.active$ = this._option$.pipe(switchMap((opt) => this.combobox.isOptionActive(opt)));
|
|
9028
|
-
this.
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
observable: this.active$,
|
|
9037
|
-
}, {
|
|
9038
|
-
attribute: 'aria-selected',
|
|
9039
|
-
observable: this.selected$.pipe(map((selected) => ({
|
|
9040
|
-
render: true,
|
|
9041
|
-
value: selected,
|
|
9042
|
-
}))),
|
|
9043
|
-
}, {
|
|
9044
|
-
attribute: 'aria-diabled',
|
|
9045
|
-
observable: this.disabled$.pipe(map((selected) => ({
|
|
9046
|
-
render: true,
|
|
9047
|
-
value: selected,
|
|
9048
|
-
}))),
|
|
8956
|
+
this.hostClassBindings = signalHostClasses({
|
|
8957
|
+
'et-combobox-option--selected': toSignal(this.selected$),
|
|
8958
|
+
'et-combobox-option--disabled': toSignal(this.disabled$),
|
|
8959
|
+
'et-combobox-option--active': toSignal(this.active$),
|
|
8960
|
+
});
|
|
8961
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
8962
|
+
'aria-selected': toSignal(this.selected$),
|
|
8963
|
+
'aria-disabled': toSignal(this.disabled$),
|
|
9049
8964
|
});
|
|
9050
8965
|
}
|
|
9051
8966
|
get option() {
|
|
@@ -9100,24 +9015,13 @@ class ComboboxBodyComponent {
|
|
|
9100
9015
|
this._clickOutside = inject(ClickOutsideDirective);
|
|
9101
9016
|
this.combobox = inject(COMBOBOX_TOKEN);
|
|
9102
9017
|
this._options$ = new BehaviorSubject(null);
|
|
9103
|
-
this.
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
}
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
attribute: 'aria-multiselectable',
|
|
9111
|
-
observable: this.combobox.multiple$.pipe(map((multiple) => ({
|
|
9112
|
-
render: true,
|
|
9113
|
-
value: multiple,
|
|
9114
|
-
}))),
|
|
9115
|
-
}, {
|
|
9116
|
-
attribute: 'aria-labelledby',
|
|
9117
|
-
observable: this.combobox._input.labelId$.pipe(map((labelId) => ({
|
|
9118
|
-
render: !!labelId,
|
|
9119
|
-
value: labelId,
|
|
9120
|
-
}))),
|
|
9018
|
+
this.hostClassBindings = signalHostClasses({
|
|
9019
|
+
'et-combobox-body--loading': toSignal(this.combobox.loading$),
|
|
9020
|
+
'et-combobox-body--multiple': toSignal(this.combobox.multiple$),
|
|
9021
|
+
});
|
|
9022
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
9023
|
+
'aria-multiselectable': toSignal(this.combobox.multiple$),
|
|
9024
|
+
'aria-labelledby': toSignal(this.combobox._input.labelId$),
|
|
9121
9025
|
});
|
|
9122
9026
|
this._bodyTemplate = null;
|
|
9123
9027
|
this.trackByFn = (index, item) => this.combobox._selectionModel.getKey(item);
|
|
@@ -9136,7 +9040,7 @@ class ComboboxBodyComponent {
|
|
|
9136
9040
|
provide: COMBOBOX_BODY_TOKEN,
|
|
9137
9041
|
useExisting: ComboboxBodyComponent,
|
|
9138
9042
|
},
|
|
9139
|
-
], viewQueries: [{ propertyName: "_containerElementRef", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef, static: true }, { propertyName: "_animatedLifecycle", first: true, predicate: ANIMATED_LIFECYCLE_TOKEN, descendants: true, static: true }, { propertyName: "_options", predicate: ComboboxOptionComponent, descendants: true }], hostDirectives: [{ directive: i1$2.ClickOutsideDirective }], ngImport: i0, template: "<div #containerElement class=\"et-combobox-body-container\" etAnimatedLifecycle>\n <ng-container *etLet=\"combobox.options$ | async as options\">\n <ng-container *ngIf=\"!options?.length && !combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyEmptyTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyEmptyComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p class=\"et-combobox-body--empty\">{{ combobox._tempEmptyText }}</p>\n </ng-template>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyErrorTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl; context: { error: combobox.error }\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyErrorComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp; inputs: { error: combobox.error }\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyLoadingTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyLoadingComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <et-combobox-option *ngFor=\"let option of options; trackBy: trackByFn\" [option]=\"option\" />\n\n <ng-container *ngIf=\"options?.length && combobox.showBodyMoreItemsHint\">\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p *ngIf=\"combobox.bodyMoreItemsHintText\" class=\"et-combobox-body--more-items-hint\">\n {{ combobox.bodyMoreItemsHintText }}\n </p>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ComboboxOptionComponent, selector: "et-combobox-option", inputs: ["option"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: AnimatedLifecycleDirective, selector: "[etAnimatedLifecycle]", exportAs: ["etAnimatedLifecycle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9043
|
+
], viewQueries: [{ propertyName: "_containerElementRef", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef, static: true }, { propertyName: "_animatedLifecycle", first: true, predicate: ANIMATED_LIFECYCLE_TOKEN, descendants: true, static: true }, { propertyName: "_options", predicate: ComboboxOptionComponent, descendants: true }], hostDirectives: [{ directive: i1$2.ClickOutsideDirective }], ngImport: i0, template: "<div #containerElement class=\"et-combobox-body-container\" etAnimatedLifecycle>\n <ng-container *etLet=\"combobox.options$ | async as options\">\n <ng-container *ngIf=\"!options?.length && !combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyEmptyTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyEmptyComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p class=\"et-combobox-body--empty\">{{ combobox._tempEmptyText }}</p>\n </ng-template>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyErrorTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl; context: { error: combobox.error }\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyErrorComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp; inputs: { error: combobox.error }\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.loading$ | async\">\n <ng-container *ngIf=\"combobox.customBodyLoadingTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyLoadingComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <et-combobox-option *ngFor=\"let option of options; trackBy: trackByFn\" [option]=\"option\" />\n\n <ng-container *ngIf=\"options?.length && combobox.showBodyMoreItemsHint\">\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p *ngIf=\"combobox.bodyMoreItemsHintText\" class=\"et-combobox-body--more-items-hint\">\n {{ combobox.bodyMoreItemsHintText }}\n </p>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ComboboxOptionComponent, selector: "et-combobox-option", inputs: ["option"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: AnimatedLifecycleDirective, selector: "[etAnimatedLifecycle]", exportAs: ["etAnimatedLifecycle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9140
9044
|
}
|
|
9141
9045
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: ComboboxBodyComponent, decorators: [{
|
|
9142
9046
|
type: Component,
|
|
@@ -9159,7 +9063,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
9159
9063
|
provide: COMBOBOX_BODY_TOKEN,
|
|
9160
9064
|
useExisting: ComboboxBodyComponent,
|
|
9161
9065
|
},
|
|
9162
|
-
], template: "<div #containerElement class=\"et-combobox-body-container\" etAnimatedLifecycle>\n <ng-container *etLet=\"combobox.options$ | async as options\">\n <ng-container *ngIf=\"!options?.length && !combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyEmptyTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyEmptyComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p class=\"et-combobox-body--empty\">{{ combobox._tempEmptyText }}</p>\n </ng-template>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyErrorTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl; context: { error: combobox.error }\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyErrorComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp; inputs: { error: combobox.error }\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyLoadingTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyLoadingComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <et-combobox-option *ngFor=\"let option of options; trackBy: trackByFn\" [option]=\"option\" />\n\n <ng-container *ngIf=\"options?.length && combobox.showBodyMoreItemsHint\">\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p *ngIf=\"combobox.bodyMoreItemsHintText\" class=\"et-combobox-body--more-items-hint\">\n {{ combobox.bodyMoreItemsHintText }}\n </p>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n" }]
|
|
9066
|
+
], template: "<div #containerElement class=\"et-combobox-body-container\" etAnimatedLifecycle>\n <ng-container *etLet=\"combobox.options$ | async as options\">\n <ng-container *ngIf=\"!options?.length && !combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyEmptyTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyEmptyComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p class=\"et-combobox-body--empty\">{{ combobox._tempEmptyText }}</p>\n </ng-template>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.error && !combobox.loading\">\n <ng-container *ngIf=\"combobox.customBodyErrorTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl; context: { error: combobox.error }\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyErrorComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp; inputs: { error: combobox.error }\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngIf=\"combobox.loading$ | async\">\n <ng-container *ngIf=\"combobox.customBodyLoadingTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyLoadingComponent$ | async as comp\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n </ng-template>\n </ng-container>\n\n <et-combobox-option *ngFor=\"let option of options; trackBy: trackByFn\" [option]=\"option\" />\n\n <ng-container *ngIf=\"options?.length && combobox.showBodyMoreItemsHint\">\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintTpl$ | async as tpl; else componentOrNone\">\n <ng-container *ngTemplateOutlet=\"tpl\" />\n </ng-container>\n <ng-template #componentOrNone>\n <ng-container *ngIf=\"combobox.customBodyMoreItemsHintComponent$ | async as comp; else default\">\n <ng-container *ngComponentOutlet=\"comp\" />\n </ng-container>\n <ng-template #default>\n <p *ngIf=\"combobox.bodyMoreItemsHintText\" class=\"et-combobox-body--more-items-hint\">\n {{ combobox.bodyMoreItemsHintText }}\n </p>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n</div>\n" }]
|
|
9163
9067
|
}], propDecorators: { _containerElementRef: [{
|
|
9164
9068
|
type: ViewChild,
|
|
9165
9069
|
args: ['containerElement', { static: true, read: ElementRef }]
|
|
@@ -9405,21 +9309,16 @@ class SelectOptionDirective {
|
|
|
9405
9309
|
}
|
|
9406
9310
|
return selectValue === optionValue;
|
|
9407
9311
|
}));
|
|
9312
|
+
this.isSelected = toSignal(this.isSelected$);
|
|
9408
9313
|
this.viewValue$ = this._viewValue$.asObservable();
|
|
9409
9314
|
this.disabled$ = this._disabled$.asObservable();
|
|
9410
9315
|
this.isActive$ = this._isActive$.asObservable();
|
|
9411
|
-
this.
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
}
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
}, {
|
|
9418
|
-
attribute: 'aria-selected',
|
|
9419
|
-
observable: this.isSelected$.pipe(map((selected) => ({
|
|
9420
|
-
render: true,
|
|
9421
|
-
value: selected,
|
|
9422
|
-
}))),
|
|
9316
|
+
this.hostClassBindings = signalHostClasses({
|
|
9317
|
+
'et-select-option--selected': this.isSelected,
|
|
9318
|
+
'et-select-option--active': toSignal(this._isActive$),
|
|
9319
|
+
});
|
|
9320
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
9321
|
+
'aria-selected': this.isSelected,
|
|
9423
9322
|
});
|
|
9424
9323
|
}
|
|
9425
9324
|
get value() {
|
|
@@ -9434,6 +9333,9 @@ class SelectOptionDirective {
|
|
|
9434
9333
|
set disabled(value) {
|
|
9435
9334
|
this._disabled$.next(booleanAttribute(value));
|
|
9436
9335
|
}
|
|
9336
|
+
get viewValue() {
|
|
9337
|
+
return this._viewValue$.value;
|
|
9338
|
+
}
|
|
9437
9339
|
ngAfterContentInit() {
|
|
9438
9340
|
this._updateViewValue();
|
|
9439
9341
|
}
|
|
@@ -9524,14 +9426,15 @@ class SelectDirective {
|
|
|
9524
9426
|
this.input = inject(INPUT_TOKEN);
|
|
9525
9427
|
this._selectBodyId$ = new BehaviorSubject(null);
|
|
9526
9428
|
this._isOpen$ = new BehaviorSubject(false);
|
|
9429
|
+
this.elementRef = inject(ElementRef);
|
|
9430
|
+
this._selectionModel = new SelectionModel();
|
|
9431
|
+
this._activeSelectionModel = new ActiveSelectionModel();
|
|
9527
9432
|
this._multiple$ = new BehaviorSubject(false);
|
|
9528
9433
|
this._selectOptionsQueryList$ = new BehaviorSubject(null);
|
|
9529
|
-
this.selectOptions$ = this._selectOptionsQueryList$.pipe(
|
|
9434
|
+
this.selectOptions$ = this._selectOptionsQueryList$.pipe(switchQueryListChanges(), switchMap((queryList) => {
|
|
9530
9435
|
if (!queryList)
|
|
9531
9436
|
return of(null);
|
|
9532
|
-
const items = queryList
|
|
9533
|
-
.filter((i) => !!i)
|
|
9534
|
-
.map((opt) => combineLatest([opt.isSelected$, opt.isActive$]).pipe(map(([selected, active]) => ({ opt, selected, active }))));
|
|
9437
|
+
const items = queryList.map((opt) => combineLatest([opt.isSelected$, opt.isActive$]).pipe(map(([selected, active]) => ({ opt, selected, active }))));
|
|
9535
9438
|
return combineLatest(items ?? of(null));
|
|
9536
9439
|
}));
|
|
9537
9440
|
this.activeOption$ = this.selectOptions$.pipe(map((options) => {
|
|
@@ -9558,6 +9461,7 @@ class SelectDirective {
|
|
|
9558
9461
|
this.selectedOption$ = this.selectedOptions$.pipe(map((options) => options?.[0] ?? null));
|
|
9559
9462
|
this.selectBodyId$ = this._selectBodyId$.asObservable();
|
|
9560
9463
|
this.isOpen$ = this._isOpen$.asObservable();
|
|
9464
|
+
this.isOpen = toSignal(this.isOpen$);
|
|
9561
9465
|
this.multiple$ = this._multiple$.asObservable();
|
|
9562
9466
|
this.selectCurrentValueId = `et-select-current-value-${uniqueId$1++}`;
|
|
9563
9467
|
this.ariaViewValue$ = this.selectedOptions$.pipe(switchMap((options) => {
|
|
@@ -9585,25 +9489,26 @@ class SelectDirective {
|
|
|
9585
9489
|
const ids = [labelId, this.selectCurrentValueId];
|
|
9586
9490
|
return ids.filter((id) => !!id).join(' ');
|
|
9587
9491
|
}));
|
|
9588
|
-
this.
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
}
|
|
9592
|
-
|
|
9593
|
-
|
|
9492
|
+
this.hostClassBindings = signalHostClasses({
|
|
9493
|
+
'et-select--is-open': this.isOpen,
|
|
9494
|
+
'et-select--disabled': toSignal(this.input.disabled$),
|
|
9495
|
+
});
|
|
9496
|
+
this.fieldHostClassBindings = signalClasses(this._selectField.elementRef, {
|
|
9497
|
+
'et-select-field--open': this.isOpen,
|
|
9498
|
+
'et-select-field--multiple': toSignal(this.multiple$),
|
|
9594
9499
|
});
|
|
9595
9500
|
this.trackByFn = (_, item) => item.id;
|
|
9596
9501
|
this._animatedOverlay.placement = 'bottom';
|
|
9597
9502
|
this._animatedOverlay.fallbackPlacements = ['bottom', 'top'];
|
|
9598
9503
|
this._animatedOverlay.autoResize = true;
|
|
9599
|
-
this.
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9504
|
+
this.input._setEmptyHelper(this.ariaViewValue$);
|
|
9505
|
+
this._selectionModel
|
|
9506
|
+
.setOptionsFromQueryList$(this._selectOptionsQueryList$)
|
|
9507
|
+
.setLabelBinding((v) => v.viewValue)
|
|
9508
|
+
.setValueBinding((v) => v.value)
|
|
9509
|
+
.setDisabledBinding((v) => v.disabled);
|
|
9510
|
+
this._activeSelectionModel.setSelectionModel(this._selectionModel);
|
|
9511
|
+
//TODO: TO BE CONTINUED...
|
|
9607
9512
|
}
|
|
9608
9513
|
ngOnInit() {
|
|
9609
9514
|
this._unmountSelectBodyOnDisable();
|
|
@@ -9959,18 +9864,9 @@ class SelectBodyDirective {
|
|
|
9959
9864
|
this._select = inject(SELECT_TOKEN);
|
|
9960
9865
|
this._clickOutside = inject(ClickOutsideDirective);
|
|
9961
9866
|
this.id = `et-select-body-${uniqueId++}`;
|
|
9962
|
-
this.
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
render: true,
|
|
9966
|
-
value: multiple,
|
|
9967
|
-
}))),
|
|
9968
|
-
}, {
|
|
9969
|
-
attribute: 'aria-labelledby',
|
|
9970
|
-
observable: this._select.input.labelId$.pipe(map((labelId) => ({
|
|
9971
|
-
render: !!labelId,
|
|
9972
|
-
value: labelId,
|
|
9973
|
-
}))),
|
|
9867
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
9868
|
+
'aria-multiselectable': toSignal(this._select.multiple$),
|
|
9869
|
+
'aria-labelledby': toSignal(this._select.input.labelId$),
|
|
9974
9870
|
});
|
|
9975
9871
|
}
|
|
9976
9872
|
ngOnInit() {
|
|
@@ -10413,12 +10309,9 @@ class SlideToggleDirective {
|
|
|
10413
10309
|
constructor() {
|
|
10414
10310
|
this.input = inject(INPUT_TOKEN);
|
|
10415
10311
|
this.checked$ = this.input.value$.pipe(map((value) => !!value));
|
|
10416
|
-
this.
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
}, {
|
|
10420
|
-
attribute: ['class.et-slide-toggle--disabled'],
|
|
10421
|
-
observable: this.input.disabled$,
|
|
10312
|
+
this.hostClassBindings = signalHostClasses({
|
|
10313
|
+
'et-slide-toggle--checked': toSignal(this.checked$),
|
|
10314
|
+
'et-slide-toggle--disabled': toSignal(this.input.disabled$),
|
|
10422
10315
|
});
|
|
10423
10316
|
}
|
|
10424
10317
|
_onInputInteraction(event) {
|
|
@@ -10603,45 +10496,21 @@ class SliderComponent {
|
|
|
10603
10496
|
this.disableAnimations$ = new BehaviorSubject(false);
|
|
10604
10497
|
this.touchId$ = new BehaviorSubject(null);
|
|
10605
10498
|
this.lastPointerEvent$ = new BehaviorSubject(null);
|
|
10606
|
-
this.
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
}, {
|
|
10622
|
-
attribute: 'aria-valuemax',
|
|
10623
|
-
observable: this._max$.pipe(map((value) => ({ render: true, value }))),
|
|
10624
|
-
}, {
|
|
10625
|
-
attribute: 'aria-valuetext',
|
|
10626
|
-
observable: this.valueText$.pipe(map((value) => ({ render: true, value }))),
|
|
10627
|
-
}, {
|
|
10628
|
-
attribute: 'tabindex',
|
|
10629
|
-
observable: this._input.disabled$.pipe(map((disabled) => ({ render: true, value: disabled ? -1 : 0 }))),
|
|
10630
|
-
}, {
|
|
10631
|
-
attribute: 'class.et-slider--is-sliding',
|
|
10632
|
-
observable: this.isSlidingVia$.pipe(map((isSlidingVia) => !!isSlidingVia)),
|
|
10633
|
-
}, {
|
|
10634
|
-
attribute: 'class.et-slider--inverted',
|
|
10635
|
-
observable: this._inverted$,
|
|
10636
|
-
}, {
|
|
10637
|
-
attribute: 'class.et-slider--disable-animations',
|
|
10638
|
-
observable: this.disableAnimations$,
|
|
10639
|
-
}, {
|
|
10640
|
-
attribute: 'aria-labeledby',
|
|
10641
|
-
observable: this._formFieldStateService.labelId$.pipe(map((labelId) => ({ render: !!labelId, value: labelId ?? '' }))),
|
|
10642
|
-
}, {
|
|
10643
|
-
attribute: 'aria-describedby',
|
|
10644
|
-
observable: this._formFieldStateService.describedBy$.pipe(map((describedBy) => ({ render: !!describedBy, value: describedBy ?? '' }))),
|
|
10499
|
+
this.hostClassBindings = signalHostClasses({
|
|
10500
|
+
'et-slider--is-sliding': toSignal(this.isSlidingVia$),
|
|
10501
|
+
'et-slider--inverted': toSignal(this._inverted$),
|
|
10502
|
+
'et-slider--disable-animations': toSignal(this.disableAnimations$),
|
|
10503
|
+
});
|
|
10504
|
+
this.hostAttributeBindings = signalHostAttributes({
|
|
10505
|
+
'aria-orientation': toSignal(this._vertical$.pipe(map((vertical) => (vertical ? 'vertical' : 'horizontal')))),
|
|
10506
|
+
'aria-disabled': toSignal(this._input.disabled$),
|
|
10507
|
+
'aria-valuenow': toSignal(this._value$),
|
|
10508
|
+
'aria-valuemin': toSignal(this._min$),
|
|
10509
|
+
'aria-valuemax': toSignal(this._max$),
|
|
10510
|
+
'aria-valuetext': toSignal(this.valueText$),
|
|
10511
|
+
tabindex: toSignal(this._input.disabled$.pipe(map((disabled) => (disabled ? -1 : 0)))),
|
|
10512
|
+
'aria-labeledby': this._formFieldStateService.labelId,
|
|
10513
|
+
'aria-describedby': this._formFieldStateService.describedBy,
|
|
10645
10514
|
});
|
|
10646
10515
|
this._updateValueFromPosition = (pos, sliderDimensions, shouldInvertMouseCoords) => {
|
|
10647
10516
|
const offset = this.vertical ? sliderDimensions.top : sliderDimensions.left;
|
|
@@ -10931,12 +10800,9 @@ class MasonryComponent {
|
|
|
10931
10800
|
this._didResize$ = new BehaviorSubject(false);
|
|
10932
10801
|
this._didInitialize$ = new BehaviorSubject(false);
|
|
10933
10802
|
this._hideOverflow$ = new BehaviorSubject(false);
|
|
10934
|
-
this.
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
}, {
|
|
10938
|
-
attribute: 'class.et-masonry--hide-overflow',
|
|
10939
|
-
observable: this._hideOverflow$,
|
|
10803
|
+
this.hostClassBindings = signalHostClasses({
|
|
10804
|
+
'et-masonry--initialized': toSignal(this._didInitialize$),
|
|
10805
|
+
'et-masonry--hide-overflow': toSignal(this._hideOverflow$),
|
|
10940
10806
|
});
|
|
10941
10807
|
this._state = {
|
|
10942
10808
|
preferredColumnWidth: 0,
|
|
@@ -11369,7 +11235,8 @@ class PaginationComponent {
|
|
|
11369
11235
|
this.pageControl?.setValue(page.page);
|
|
11370
11236
|
this._paginationHeadService._updateHead(page.page);
|
|
11371
11237
|
if (this.pageChangeScrollAnchor) {
|
|
11372
|
-
this.pageChangeScrollAnchor
|
|
11238
|
+
const el = coerceElement(this.pageChangeScrollAnchor);
|
|
11239
|
+
el?.scrollIntoView();
|
|
11373
11240
|
}
|
|
11374
11241
|
}
|
|
11375
11242
|
_subscribeToPageControlChanges() {
|