@ethlete/core 3.12.0 → 3.13.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/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +19 -3
- package/esm2022/lib/directives/public-api.mjs +2 -1
- package/esm2022/lib/directives/root-boundary/index.mjs +2 -0
- package/esm2022/lib/directives/root-boundary/public-api.mjs +2 -0
- package/esm2022/lib/directives/root-boundary/root-boundary.directive.mjs +36 -0
- package/esm2022/lib/utils/active-selection-model.utils.mjs +15 -10
- package/esm2022/lib/utils/selection-model.utils.mjs +87 -38
- package/fesm2022/ethlete-core.mjs +150 -48
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/directives/animated-overlay/animated-overlay.directive.d.ts +4 -0
- package/lib/directives/public-api.d.ts +1 -0
- package/lib/directives/root-boundary/index.d.ts +1 -0
- package/lib/directives/root-boundary/public-api.d.ts +1 -0
- package/lib/directives/root-boundary/root-boundary.directive.d.ts +11 -0
- package/lib/utils/active-selection-model.utils.d.ts +4 -1
- package/lib/utils/selection-model.utils.d.ts +12 -3
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, assertInInjectionContext, DestroyRef, ElementRef, isSignal, computed, signal, effect, isDevMode, Directive, Injectable, NgZone, EventEmitter, booleanAttribute, numberAttribute, Output, Injector, ViewContainerRef, TemplateRef, Pipe, QueryList } from '@angular/core';
|
|
3
3
|
import { DomSanitizer, Meta, Title } from '@angular/platform-browser';
|
|
4
|
-
import { Subject, BehaviorSubject, takeUntil, switchMap, of, tap, startWith, Observable, combineLatest, timer,
|
|
4
|
+
import { Subject, BehaviorSubject, takeUntil, switchMap, of, tap, map, startWith, Observable, combineLatest, timer, distinctUntilChanged, shareReplay, filter, take, skip, debounceTime, merge, fromEvent, takeWhile, pairwise, finalize } from 'rxjs';
|
|
5
5
|
import { END, HOME, PAGE_DOWN, PAGE_UP, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
|
6
6
|
import { FormGroup, FormArray, FormControl } from '@angular/forms';
|
|
7
|
-
import {
|
|
7
|
+
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { coerceElement, coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
9
9
|
import { supportsScrollBehavior } from '@angular/cdk/platform';
|
|
10
10
|
import * as i1 from '@angular/common';
|
|
@@ -132,34 +132,38 @@ class ActiveSelectionModel {
|
|
|
132
132
|
this._activeOption$.next(option);
|
|
133
133
|
return this;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
isOptionActive$(option) {
|
|
136
|
+
return this.activeOption$.pipe(map((activeOption) => activeOption === option));
|
|
137
|
+
}
|
|
138
|
+
evaluateKeyboardEvent(event, config) {
|
|
139
|
+
const { skipDisabled = false } = config ?? {};
|
|
136
140
|
const keyCode = event.keyCode;
|
|
137
141
|
const activeOption = this.activeOption;
|
|
138
142
|
if (!this.selectionModel || !activeOption)
|
|
139
|
-
return;
|
|
143
|
+
return null;
|
|
140
144
|
const currentIndex = this.selectionModel?.getOptionIndex(activeOption);
|
|
141
145
|
if (currentIndex === null)
|
|
142
|
-
return;
|
|
146
|
+
return null;
|
|
143
147
|
let newActiveOption = undefined;
|
|
144
148
|
switch (keyCode) {
|
|
145
149
|
case DOWN_ARROW:
|
|
146
150
|
{
|
|
147
|
-
newActiveOption = this.selectionModel?.getOptionByOffset(1, currentIndex);
|
|
151
|
+
newActiveOption = this.selectionModel?.getOptionByOffset(1, currentIndex, { skipDisabled });
|
|
148
152
|
}
|
|
149
153
|
break;
|
|
150
154
|
case UP_ARROW:
|
|
151
155
|
{
|
|
152
|
-
newActiveOption = this.selectionModel?.getOptionByOffset(-1, currentIndex);
|
|
156
|
+
newActiveOption = this.selectionModel?.getOptionByOffset(-1, currentIndex, { skipDisabled });
|
|
153
157
|
}
|
|
154
158
|
break;
|
|
155
159
|
case PAGE_UP:
|
|
156
160
|
{
|
|
157
|
-
newActiveOption = this.selectionModel?.getOptionByOffset(-10, currentIndex);
|
|
161
|
+
newActiveOption = this.selectionModel?.getOptionByOffset(-10, currentIndex, { skipDisabled, clamp: true });
|
|
158
162
|
}
|
|
159
163
|
break;
|
|
160
164
|
case PAGE_DOWN:
|
|
161
165
|
{
|
|
162
|
-
newActiveOption = this.selectionModel?.getOptionByOffset(10, currentIndex);
|
|
166
|
+
newActiveOption = this.selectionModel?.getOptionByOffset(10, currentIndex, { skipDisabled, clamp: true });
|
|
163
167
|
}
|
|
164
168
|
break;
|
|
165
169
|
case HOME:
|
|
@@ -176,9 +180,10 @@ class ActiveSelectionModel {
|
|
|
176
180
|
if (newActiveOption !== undefined) {
|
|
177
181
|
event.preventDefault();
|
|
178
182
|
}
|
|
179
|
-
if (newActiveOption !== activeOption && newActiveOption
|
|
183
|
+
if (newActiveOption !== activeOption && newActiveOption) {
|
|
180
184
|
this._activeOption$.next(newActiveOption);
|
|
181
185
|
}
|
|
186
|
+
return newActiveOption ?? null;
|
|
182
187
|
}
|
|
183
188
|
_resetActiveOptions() {
|
|
184
189
|
const firstOption = this.selectionModel?.getFirstOption();
|
|
@@ -1005,27 +1010,6 @@ const getObjectProperty = (obj, prop) => {
|
|
|
1005
1010
|
return value;
|
|
1006
1011
|
};
|
|
1007
1012
|
class SelectionModel {
|
|
1008
|
-
constructor() {
|
|
1009
|
-
this._selection$ = new BehaviorSubject([]);
|
|
1010
|
-
this._options$ = new BehaviorSubject([]);
|
|
1011
|
-
this._valueBinding$ = new BehaviorSubject(null);
|
|
1012
|
-
this._keyBinding$ = new BehaviorSubject(null);
|
|
1013
|
-
this._labelBinding$ = new BehaviorSubject(null);
|
|
1014
|
-
this._disabledBinding$ = new BehaviorSubject(null);
|
|
1015
|
-
this._allowMultiple$ = new BehaviorSubject(false);
|
|
1016
|
-
this._filter$ = new BehaviorSubject('');
|
|
1017
|
-
this.value$ = combineLatest([this.selection$, this.valueBinding$, this.allowMultiple$]).pipe(map(([selection, valueBinding, allowMultiple]) => {
|
|
1018
|
-
if (allowMultiple) {
|
|
1019
|
-
return selection.map((option) => this.execFnOrGetOptionProperty(option, valueBinding));
|
|
1020
|
-
}
|
|
1021
|
-
const [option] = selection;
|
|
1022
|
-
if (!option)
|
|
1023
|
-
return null;
|
|
1024
|
-
return this.execFnOrGetOptionProperty(option, valueBinding);
|
|
1025
|
-
}));
|
|
1026
|
-
this.filteredOptions$ = combineLatest([this.options$, this.filter$, this.labelBinding$]).pipe(map(([options, filter]) => this.getFilteredOptions(filter, options)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1027
|
-
this._optionsAndSelection$ = combineLatest([this._options$, this._selection$]);
|
|
1028
|
-
}
|
|
1029
1013
|
get selection$() {
|
|
1030
1014
|
return this._selection$.asObservable();
|
|
1031
1015
|
}
|
|
@@ -1074,6 +1058,40 @@ class SelectionModel {
|
|
|
1074
1058
|
get filter() {
|
|
1075
1059
|
return this._filter$.value;
|
|
1076
1060
|
}
|
|
1061
|
+
constructor() {
|
|
1062
|
+
this._destroy$ = createDestroy();
|
|
1063
|
+
this._lastSelectionSetSubscription = null;
|
|
1064
|
+
this._selection$ = new BehaviorSubject([]);
|
|
1065
|
+
this._options$ = new BehaviorSubject([]);
|
|
1066
|
+
this.optionsSignal = toSignal(this.options$);
|
|
1067
|
+
this._valueBinding$ = new BehaviorSubject(null);
|
|
1068
|
+
this._keyBinding$ = new BehaviorSubject(null);
|
|
1069
|
+
this._labelBinding$ = new BehaviorSubject(null);
|
|
1070
|
+
this._disabledBinding$ = new BehaviorSubject(null);
|
|
1071
|
+
this._allowMultiple$ = new BehaviorSubject(false);
|
|
1072
|
+
this._filter$ = new BehaviorSubject('');
|
|
1073
|
+
this.value$ = combineLatest([this.selection$, this.valueBinding$, this.allowMultiple$]).pipe(map(([selection, valueBinding, allowMultiple]) => {
|
|
1074
|
+
if (allowMultiple) {
|
|
1075
|
+
return selection.map((option) => this.execFnOrGetOptionProperty(option, valueBinding));
|
|
1076
|
+
}
|
|
1077
|
+
const [option] = selection;
|
|
1078
|
+
if (!option)
|
|
1079
|
+
return null;
|
|
1080
|
+
return this.execFnOrGetOptionProperty(option, valueBinding);
|
|
1081
|
+
}));
|
|
1082
|
+
this.filteredOptions$ = combineLatest([this.options$, this.filter$, this.labelBinding$]).pipe(map(([options, filter]) => this.getFilteredOptions(filter, options)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
1083
|
+
this._optionsAndSelection$ = combineLatest([this._options$, this._selection$]);
|
|
1084
|
+
this.allowMultiple$
|
|
1085
|
+
.pipe(tap(() => {
|
|
1086
|
+
if (this.allowMultiple)
|
|
1087
|
+
return;
|
|
1088
|
+
const [option] = this.selection;
|
|
1089
|
+
if (!option)
|
|
1090
|
+
return;
|
|
1091
|
+
this.setSelection([option]);
|
|
1092
|
+
}), takeUntilDestroyed())
|
|
1093
|
+
.subscribe();
|
|
1094
|
+
}
|
|
1077
1095
|
setSelection(selection) {
|
|
1078
1096
|
if (!Array.isArray(selection)) {
|
|
1079
1097
|
selection = [selection];
|
|
@@ -1081,6 +1099,24 @@ class SelectionModel {
|
|
|
1081
1099
|
this._selection$.next(selection);
|
|
1082
1100
|
return this;
|
|
1083
1101
|
}
|
|
1102
|
+
setSelectionFromValue(value) {
|
|
1103
|
+
if (Array.isArray(value)) {
|
|
1104
|
+
const selection = value.map((v) => this.getOptionByValue(v)).filter((v) => v !== undefined);
|
|
1105
|
+
this.setSelection(selection);
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
const selection = this.getOptionByValue(value);
|
|
1109
|
+
if (selection) {
|
|
1110
|
+
this.setSelection(selection);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
setSelectionFromValue$(value) {
|
|
1115
|
+
this._lastSelectionSetSubscription?.unsubscribe();
|
|
1116
|
+
this._lastSelectionSetSubscription = this.options$
|
|
1117
|
+
.pipe(takeUntil(this._destroy$), filter((o) => !!o.length), tap(() => this.setSelectionFromValue(value)), take(1))
|
|
1118
|
+
.subscribe();
|
|
1119
|
+
}
|
|
1084
1120
|
setValueBinding(fnOrPropertyPath) {
|
|
1085
1121
|
this._valueBinding$.next(fnOrPropertyPath);
|
|
1086
1122
|
return this;
|
|
@@ -1128,6 +1164,7 @@ class SelectionModel {
|
|
|
1128
1164
|
this._options$.next([]);
|
|
1129
1165
|
this._valueBinding$.next(null);
|
|
1130
1166
|
this._keyBinding$.next(null);
|
|
1167
|
+
this._disabledBinding$.next(null);
|
|
1131
1168
|
this._labelBinding$.next(null);
|
|
1132
1169
|
this._allowMultiple$.next(false);
|
|
1133
1170
|
}
|
|
@@ -1177,29 +1214,40 @@ class SelectionModel {
|
|
|
1177
1214
|
getOptionByIndex(index, options = this.getFilteredOptions()) {
|
|
1178
1215
|
return options[index] || null;
|
|
1179
1216
|
}
|
|
1180
|
-
getOptionByOffset(offset, index,
|
|
1181
|
-
const { loop, clamp } = config;
|
|
1217
|
+
getOptionByOffset(offset, index, config = { clamp: true }) {
|
|
1218
|
+
const { loop, clamp, skipDisabled, options = this.getFilteredOptions() } = config;
|
|
1182
1219
|
const newIndex = index + offset;
|
|
1183
1220
|
const remainingOffset = newIndex * -1;
|
|
1221
|
+
let optionResult = null;
|
|
1184
1222
|
if (newIndex < 0) {
|
|
1185
1223
|
if (loop) {
|
|
1186
|
-
|
|
1224
|
+
optionResult = this.getOptionByOffset(remainingOffset, options.length - 1, config);
|
|
1187
1225
|
}
|
|
1188
|
-
if (clamp) {
|
|
1189
|
-
|
|
1226
|
+
else if (clamp) {
|
|
1227
|
+
optionResult = this.getFirstOption();
|
|
1228
|
+
}
|
|
1229
|
+
else {
|
|
1230
|
+
optionResult = null;
|
|
1190
1231
|
}
|
|
1191
|
-
return null;
|
|
1192
1232
|
}
|
|
1193
|
-
if (newIndex >= options.length) {
|
|
1233
|
+
else if (newIndex >= options.length) {
|
|
1194
1234
|
if (loop) {
|
|
1195
|
-
|
|
1235
|
+
optionResult = this.getOptionByOffset(remainingOffset, 0, config);
|
|
1196
1236
|
}
|
|
1197
|
-
if (clamp) {
|
|
1198
|
-
|
|
1237
|
+
else if (clamp) {
|
|
1238
|
+
optionResult = this.getLastOption();
|
|
1239
|
+
}
|
|
1240
|
+
else {
|
|
1241
|
+
optionResult = null;
|
|
1199
1242
|
}
|
|
1200
|
-
return null;
|
|
1201
1243
|
}
|
|
1202
|
-
|
|
1244
|
+
else {
|
|
1245
|
+
optionResult = this.getOptionByIndex(newIndex);
|
|
1246
|
+
}
|
|
1247
|
+
if (optionResult && skipDisabled && this.isDisabled(optionResult)) {
|
|
1248
|
+
return this.getOptionByOffset(offset, newIndex, config);
|
|
1249
|
+
}
|
|
1250
|
+
return optionResult;
|
|
1203
1251
|
}
|
|
1204
1252
|
getFirstOption(options = this.getFilteredOptions()) {
|
|
1205
1253
|
return this.getOptionByIndex(0, options);
|
|
@@ -1231,7 +1279,7 @@ class SelectionModel {
|
|
|
1231
1279
|
const index = this.getNonMultipleSelectedOptionIndex();
|
|
1232
1280
|
if (index === null)
|
|
1233
1281
|
return null;
|
|
1234
|
-
return this.getOptionByOffset(index, offset,
|
|
1282
|
+
return this.getOptionByOffset(index, offset, config);
|
|
1235
1283
|
}
|
|
1236
1284
|
getLabel(option) {
|
|
1237
1285
|
return this.execFnOrGetOptionProperty(option, this.labelBinding);
|
|
@@ -1253,6 +1301,11 @@ class SelectionModel {
|
|
|
1253
1301
|
}
|
|
1254
1302
|
return getObjectProperty(option, fnOrPropertyPath);
|
|
1255
1303
|
}
|
|
1304
|
+
execFnOrGetOptionPropertyNullable(option, fnOrPropertyPath) {
|
|
1305
|
+
if (!fnOrPropertyPath || !isObject(option))
|
|
1306
|
+
return null;
|
|
1307
|
+
return this.execFnOrGetOptionProperty(option, fnOrPropertyPath);
|
|
1308
|
+
}
|
|
1256
1309
|
getOptionProperty(option, propertyPath) {
|
|
1257
1310
|
if (!propertyPath || !isObject(option))
|
|
1258
1311
|
return option;
|
|
@@ -1263,7 +1316,7 @@ class SelectionModel {
|
|
|
1263
1316
|
return this.getOption(optionKey, this.keyBinding, this.selection) !== undefined;
|
|
1264
1317
|
}
|
|
1265
1318
|
isDisabled(option) {
|
|
1266
|
-
return this.
|
|
1319
|
+
return !!this.execFnOrGetOptionPropertyNullable(option, this.disabledBinding);
|
|
1267
1320
|
}
|
|
1268
1321
|
getFilteredOptions(filter = this.filter, options = this.options) {
|
|
1269
1322
|
if (!filter)
|
|
@@ -2602,6 +2655,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
2602
2655
|
args: ['etObserveResizeDebounce']
|
|
2603
2656
|
}] } });
|
|
2604
2657
|
|
|
2658
|
+
const ROOT_BOUNDARY_TOKEN = new InjectionToken('ROOT_BOUNDARY_TOKEN');
|
|
2659
|
+
class RootBoundaryDirective {
|
|
2660
|
+
constructor() {
|
|
2661
|
+
this._elementRef = inject(ElementRef);
|
|
2662
|
+
this._boundaryElement = null;
|
|
2663
|
+
}
|
|
2664
|
+
get boundaryElement() {
|
|
2665
|
+
return this._boundaryElement ?? this._elementRef.nativeElement;
|
|
2666
|
+
}
|
|
2667
|
+
set boundaryElement(v) {
|
|
2668
|
+
this._boundaryElement = v;
|
|
2669
|
+
}
|
|
2670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: RootBoundaryDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2671
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: RootBoundaryDirective, isStandalone: true, selector: "[etRootBoundary]", providers: [
|
|
2672
|
+
{
|
|
2673
|
+
provide: ROOT_BOUNDARY_TOKEN,
|
|
2674
|
+
useExisting: RootBoundaryDirective,
|
|
2675
|
+
},
|
|
2676
|
+
], ngImport: i0 }); }
|
|
2677
|
+
}
|
|
2678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: RootBoundaryDirective, decorators: [{
|
|
2679
|
+
type: Directive,
|
|
2680
|
+
args: [{
|
|
2681
|
+
selector: '[etRootBoundary]',
|
|
2682
|
+
standalone: true,
|
|
2683
|
+
providers: [
|
|
2684
|
+
{
|
|
2685
|
+
provide: ROOT_BOUNDARY_TOKEN,
|
|
2686
|
+
useExisting: RootBoundaryDirective,
|
|
2687
|
+
},
|
|
2688
|
+
],
|
|
2689
|
+
}]
|
|
2690
|
+
}] });
|
|
2691
|
+
|
|
2605
2692
|
class AnimatedOverlayDirective {
|
|
2606
2693
|
constructor() {
|
|
2607
2694
|
this._destroy$ = createDestroy();
|
|
@@ -2611,6 +2698,7 @@ class AnimatedOverlayDirective {
|
|
|
2611
2698
|
this._zone = inject(NgZone);
|
|
2612
2699
|
this._elementRef = inject(ElementRef);
|
|
2613
2700
|
this._observeResize = inject(ObserveResizeDirective);
|
|
2701
|
+
this._rootBoundary = inject(RootBoundaryDirective, { optional: true });
|
|
2614
2702
|
this._portal = null;
|
|
2615
2703
|
this._overlayRef = null;
|
|
2616
2704
|
this._componentRef = null;
|
|
@@ -2622,6 +2710,7 @@ class AnimatedOverlayDirective {
|
|
|
2622
2710
|
this._isMounted$ = new BehaviorSubject(false);
|
|
2623
2711
|
this._isMounting$ = new BehaviorSubject(false);
|
|
2624
2712
|
this._isUnmounting$ = new BehaviorSubject(false);
|
|
2713
|
+
this._isHidden$ = new BehaviorSubject(false);
|
|
2625
2714
|
/**
|
|
2626
2715
|
* The placement of the animated overlay.
|
|
2627
2716
|
* @default undefined
|
|
@@ -2670,6 +2759,12 @@ class AnimatedOverlayDirective {
|
|
|
2670
2759
|
get isUnmounting() {
|
|
2671
2760
|
return this._isUnmounting$.value;
|
|
2672
2761
|
}
|
|
2762
|
+
get isHidden$() {
|
|
2763
|
+
return this._isHidden$.asObservable();
|
|
2764
|
+
}
|
|
2765
|
+
get isHidden() {
|
|
2766
|
+
return this._isHidden$.value;
|
|
2767
|
+
}
|
|
2673
2768
|
get portal() {
|
|
2674
2769
|
return this._portal;
|
|
2675
2770
|
}
|
|
@@ -2723,6 +2818,7 @@ class AnimatedOverlayDirective {
|
|
|
2723
2818
|
const floatingElArrow = this._componentRef.instance._elementRef?.nativeElement.querySelector('[et-floating-arrow]');
|
|
2724
2819
|
floatingEl.classList.add('et-floating-element');
|
|
2725
2820
|
const refEl = this._elementRef.nativeElement;
|
|
2821
|
+
const boundary = this._rootBoundary?.boundaryElement ?? undefined;
|
|
2726
2822
|
this._floatingElCleanupFn = autoUpdate(refEl, floatingEl, () => {
|
|
2727
2823
|
if (!this._componentRef)
|
|
2728
2824
|
return;
|
|
@@ -2734,6 +2830,7 @@ class AnimatedOverlayDirective {
|
|
|
2734
2830
|
fallbackPlacements: this.fallbackPlacements ?? undefined,
|
|
2735
2831
|
fallbackAxisSideDirection: 'start',
|
|
2736
2832
|
crossAxis: false,
|
|
2833
|
+
boundary,
|
|
2737
2834
|
}),
|
|
2738
2835
|
...(this.autoResize
|
|
2739
2836
|
? [
|
|
@@ -2746,9 +2843,9 @@ class AnimatedOverlayDirective {
|
|
|
2746
2843
|
}),
|
|
2747
2844
|
]
|
|
2748
2845
|
: []),
|
|
2749
|
-
shift({ limiter: limitShift(), padding: this.viewportPadding ?? undefined }),
|
|
2846
|
+
shift({ limiter: limitShift(), padding: this.viewportPadding ?? undefined, boundary }),
|
|
2750
2847
|
...(floatingElArrow ? [arrow({ element: floatingElArrow, padding: this.arrowPadding ?? undefined })] : []),
|
|
2751
|
-
...(this.autoHide ? [hide({ strategy: 'referenceHidden' })] : []),
|
|
2848
|
+
...(this.autoHide ? [hide({ strategy: 'referenceHidden', boundary })] : []),
|
|
2752
2849
|
],
|
|
2753
2850
|
}).then(({ x, y, placement, middlewareData }) => {
|
|
2754
2851
|
floatingEl.style.setProperty('--et-floating-translate', `translate3d(${x}px, ${y}px, 0)`);
|
|
@@ -2759,9 +2856,11 @@ class AnimatedOverlayDirective {
|
|
|
2759
2856
|
}
|
|
2760
2857
|
if (middlewareData.hide?.referenceHidden) {
|
|
2761
2858
|
floatingEl.classList.add('et-floating-element--hidden');
|
|
2859
|
+
this._isHidden$.next(true);
|
|
2762
2860
|
}
|
|
2763
2861
|
else {
|
|
2764
2862
|
floatingEl.classList.remove('et-floating-element--hidden');
|
|
2863
|
+
this._isHidden$.next(false);
|
|
2765
2864
|
}
|
|
2766
2865
|
});
|
|
2767
2866
|
});
|
|
@@ -2794,6 +2893,9 @@ class AnimatedOverlayDirective {
|
|
|
2794
2893
|
if (!this._componentRef) {
|
|
2795
2894
|
return;
|
|
2796
2895
|
}
|
|
2896
|
+
if (this.isHidden) {
|
|
2897
|
+
return;
|
|
2898
|
+
}
|
|
2797
2899
|
this._isUnmounting$.next(true);
|
|
2798
2900
|
this._beforeClosed?.next();
|
|
2799
2901
|
this._componentRef.instance._animatedLifecycle?.leave();
|
|
@@ -4444,5 +4546,5 @@ const Validators = {
|
|
|
4444
4546
|
* Generated bundle index. Do not edit.
|
|
4445
4547
|
*/
|
|
4446
4548
|
|
|
4447
|
-
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, AT_LEAST_ONE_REQUIRED, ActiveSelectionModel, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEBUG_TOKEN, DEFAULT_VIEWPORT_CONFIG, DELAYABLE_TOKEN, DebugDirective, DelayableDirective, ET_PROPERTY_REMOVED, FocusVisibleService, IS_ACTIVE_ELEMENT, IS_ARRAY_NOT_EMPTY, IS_ELEMENT, IS_EMAIL, InferMimeTypePipe, IntersectionObserverFactory, IntersectionObserverService, IsActiveElementDirective, IsArrayNotEmpty, IsElementDirective, IsEmail, KeyPressManager, LetContext, LetDirective, MUST_MATCH, Memo, MustMatch, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, OBSERVE_VISIBILITY_TOKEN, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, ObserveVisibilityDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeObserverFactory, ResizeObserverService, RouterStateService, RuntimeError, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SCROLL_OBSERVER_OBSERVING_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_OBSERVING_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SelectionModel, SeoDirective, SmartBlockScrollStrategy, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, ValidateAtLeastOneRequired, Validators, ViewportService, buildSignalEffects, clamp, clone, cloneFormGroup, createDestroy, createFlipAnimation, createFlipAnimationGroup, createMediaQueryObservable, createMutationObservable, createReactiveBindings, createResizeObservable, deleteCookie, elementCanScroll, equal, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementVisibleStates, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, inferMimeType, isElementVisible, isEmptyArray, isGroupMatch, isKnockoutMatch, isObjectArray, isPrimitiveArray, mergeSeoConfig, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, round, routerDisableScrollTop, scrollToElement, setCookie, signalAttributes, signalClasses, signalHostAttributes, signalHostClasses, signalHostStyles, signalStyles, signalVisibilityChangeClasses, switchQueryListChanges, toArray, toArrayTrackByFn };
|
|
4549
|
+
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, AT_LEAST_ONE_REQUIRED, ActiveSelectionModel, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AnimatedOverlayDirective, ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEBUG_TOKEN, DEFAULT_VIEWPORT_CONFIG, DELAYABLE_TOKEN, DebugDirective, DelayableDirective, ET_PROPERTY_REMOVED, FocusVisibleService, IS_ACTIVE_ELEMENT, IS_ARRAY_NOT_EMPTY, IS_ELEMENT, IS_EMAIL, InferMimeTypePipe, IntersectionObserverFactory, IntersectionObserverService, IsActiveElementDirective, IsArrayNotEmpty, IsElementDirective, IsEmail, KeyPressManager, LetContext, LetDirective, MUST_MATCH, Memo, MustMatch, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, OBSERVE_VISIBILITY_TOKEN, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, ObserveVisibilityDirective, ROOT_BOUNDARY_TOKEN, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeObserverFactory, ResizeObserverService, RootBoundaryDirective, RouterStateService, RuntimeError, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SCROLL_OBSERVER_OBSERVING_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_OBSERVING_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SelectionModel, SeoDirective, SmartBlockScrollStrategy, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, ValidateAtLeastOneRequired, Validators, ViewportService, buildSignalEffects, clamp, clone, cloneFormGroup, createDestroy, createFlipAnimation, createFlipAnimationGroup, createMediaQueryObservable, createMutationObservable, createReactiveBindings, createResizeObservable, deleteCookie, elementCanScroll, equal, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementVisibleStates, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, inferMimeType, isElementVisible, isEmptyArray, isGroupMatch, isKnockoutMatch, isObjectArray, isPrimitiveArray, mergeSeoConfig, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, round, routerDisableScrollTop, scrollToElement, setCookie, signalAttributes, signalClasses, signalHostAttributes, signalHostClasses, signalHostStyles, signalStyles, signalVisibilityChangeClasses, switchQueryListChanges, toArray, toArrayTrackByFn };
|
|
4448
4550
|
//# sourceMappingURL=ethlete-core.mjs.map
|