@ethlete/cdk 5.0.0-next.32 → 5.0.0-next.34
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 +12 -0
- package/fesm2022/ethlete-cdk.mjs +32 -30
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ethlete/cdk
|
|
2
2
|
|
|
3
|
+
## 5.0.0-next.34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The icon directive and masonry items set their host styles through style bindings instead of a static `style` attribute, which a strict `style-src` blocked.
|
|
8
|
+
|
|
9
|
+
## 5.0.0-next.33
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Place `takeUntilDestroyed()` last in every pipe, so operators after it no longer run or stay subscribed after destroy.
|
|
14
|
+
|
|
3
15
|
## 5.0.0-next.32
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/fesm2022/ethlete-cdk.mjs
CHANGED
|
@@ -200,7 +200,7 @@ class IconDirective {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: IconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
203
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: IconDirective, isStandalone: true, selector: "[etIcon]", inputs: { iconNameToUse: { classPropertyName: "iconNameToUse", publicName: "etIcon", isSignal: true, isRequired: true, transformFunction: null }, allowHardcodedColor: { classPropertyName: "allowHardcodedColor", publicName: "allowHardcodedColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "innerHTML": "iconSrc()", "class": "hostClasses()"
|
|
203
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: IconDirective, isStandalone: true, selector: "[etIcon]", inputs: { iconNameToUse: { classPropertyName: "iconNameToUse", publicName: "etIcon", isSignal: true, isRequired: true, transformFunction: null }, allowHardcodedColor: { classPropertyName: "allowHardcodedColor", publicName: "allowHardcodedColor", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "innerHTML": "iconSrc()", "class": "hostClasses()", "style.display": "\"flex\"", "style.align-items": "\"center\"", "style.justify-content": "\"center\"" } }, providers: [
|
|
204
204
|
{
|
|
205
205
|
provide: ICON_DIRECTIVE_TOKEN,
|
|
206
206
|
useExisting: IconDirective,
|
|
@@ -221,7 +221,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
221
221
|
'[innerHTML]': 'iconSrc()',
|
|
222
222
|
'aria-hidden': 'true',
|
|
223
223
|
'[class]': 'hostClasses()',
|
|
224
|
-
style: '
|
|
224
|
+
'[style.display]': '"flex"',
|
|
225
|
+
'[style.align-items]': '"center"',
|
|
226
|
+
'[style.justify-content]': '"center"',
|
|
225
227
|
},
|
|
226
228
|
}]
|
|
227
229
|
}], ctorParameters: () => [], propDecorators: { iconNameToUse: [{ type: i0.Input, args: [{ isSignal: true, alias: "etIcon", required: true }] }], allowHardcodedColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowHardcodedColor", required: false }] }] } });
|
|
@@ -5885,10 +5887,10 @@ class DecoratedInputBase extends InputBase {
|
|
|
5885
5887
|
'et-input--has-suffix': toSignal(this.hasSuffix$),
|
|
5886
5888
|
});
|
|
5887
5889
|
this.hasPrefix$
|
|
5888
|
-
.pipe(
|
|
5890
|
+
.pipe(tap((hasPrefix) => this._formFieldStateService.hasPrefix$.next(hasPrefix)), takeUntilDestroyed())
|
|
5889
5891
|
.subscribe();
|
|
5890
5892
|
this.hasSuffix$
|
|
5891
|
-
.pipe(
|
|
5893
|
+
.pipe(tap((hasSuffix) => this._formFieldStateService.hasSuffix$.next(hasSuffix)), takeUntilDestroyed())
|
|
5892
5894
|
.subscribe();
|
|
5893
5895
|
}
|
|
5894
5896
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: DecoratedInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -8447,19 +8449,19 @@ const createOverlayHandler = (rootConfig) => {
|
|
|
8447
8449
|
if (afterClosedFn) {
|
|
8448
8450
|
ref
|
|
8449
8451
|
.afterClosed()
|
|
8450
|
-
.pipe(
|
|
8452
|
+
.pipe(tap((r) => afterClosedFn(r ?? null)), takeUntilDestroyed(destroyRef))
|
|
8451
8453
|
.subscribe();
|
|
8452
8454
|
}
|
|
8453
8455
|
if (beforeClosedFn) {
|
|
8454
8456
|
ref
|
|
8455
8457
|
.beforeClosed()
|
|
8456
|
-
.pipe(
|
|
8458
|
+
.pipe(tap((r) => beforeClosedFn(r ?? null)), takeUntilDestroyed(destroyRef))
|
|
8457
8459
|
.subscribe();
|
|
8458
8460
|
}
|
|
8459
8461
|
if (afterOpenedFn) {
|
|
8460
8462
|
ref
|
|
8461
8463
|
.afterOpened()
|
|
8462
|
-
.pipe(
|
|
8464
|
+
.pipe(tap(() => afterOpenedFn()), takeUntilDestroyed(destroyRef))
|
|
8463
8465
|
.subscribe();
|
|
8464
8466
|
}
|
|
8465
8467
|
return ref;
|
|
@@ -8539,7 +8541,7 @@ const createOverlayHandlerWithQueryParamLifecycle = (config) => {
|
|
|
8539
8541
|
currentOverlayRef = overlayHandler.open();
|
|
8540
8542
|
currentOverlayRef
|
|
8541
8543
|
.beforeClosed()
|
|
8542
|
-
.pipe(
|
|
8544
|
+
.pipe(tap(() => cleanup()), takeUntilDestroyed(destroyRef))
|
|
8543
8545
|
.subscribe();
|
|
8544
8546
|
const inputSignal = getQueryParamInput();
|
|
8545
8547
|
if (inputSignal) {
|
|
@@ -10113,14 +10115,14 @@ class OverlayCloseBlockerDirective {
|
|
|
10113
10115
|
if (!this._animatedOverlay || !this._nearestOverlayRef)
|
|
10114
10116
|
return;
|
|
10115
10117
|
combineLatest([this._animatedOverlay.isMounted$, this._animatedOverlay.isHidden$])
|
|
10116
|
-
.pipe(
|
|
10118
|
+
.pipe(tap(([mounted, hidden]) => {
|
|
10117
10119
|
if (mounted && !hidden) {
|
|
10118
10120
|
this._nearestOverlayRef?._addInternalBackdropCloseInitiator(this._id);
|
|
10119
10121
|
}
|
|
10120
10122
|
else {
|
|
10121
10123
|
this._nearestOverlayRef?._removeInternalBackdropCloseInitiator(this._id);
|
|
10122
10124
|
}
|
|
10123
|
-
}))
|
|
10125
|
+
}), takeUntilDestroyed())
|
|
10124
10126
|
.subscribe();
|
|
10125
10127
|
}
|
|
10126
10128
|
ngOnDestroy() {
|
|
@@ -10845,7 +10847,7 @@ class ScrollableComponent {
|
|
|
10845
10847
|
threshold: ELEMENT_INTERSECTION_THRESHOLD,
|
|
10846
10848
|
});
|
|
10847
10849
|
this.scrollableContentIntersections$ = toObservable(this.scrollableContentIntersections);
|
|
10848
|
-
this.maxVisibleItemCount = toSignal(this.scrollableContentIntersections$.pipe(
|
|
10850
|
+
this.maxVisibleItemCount = toSignal(this.scrollableContentIntersections$.pipe(debounceTime(150), map((entries) => entries.filter((i) => i.intersectionRatio > 0).length), takeUntilDestroyed()), { initialValue: 0 });
|
|
10849
10851
|
this.nonScrollableIntersections = computed(() => {
|
|
10850
10852
|
const allIntersections = this.scrollableContentIntersections();
|
|
10851
10853
|
return allIntersections.filter((i) => i.intersectionRatio !== 1).map((i) => i.target);
|
|
@@ -10907,12 +10909,12 @@ class ScrollableComponent {
|
|
|
10907
10909
|
return gap;
|
|
10908
10910
|
}, /* @ts-ignore */
|
|
10909
10911
|
...(ngDevMode ? [{ debugName: "gapValue" }] : /* istanbul ignore next */ []));
|
|
10910
|
-
this.intersectionChange = outputFromObservable(toObservable(this.scrollableContentIntersections).pipe(
|
|
10912
|
+
this.intersectionChange = outputFromObservable(toObservable(this.scrollableContentIntersections).pipe(debounceTime(50), map((entries) => entries.map((i, index) => ({
|
|
10911
10913
|
index,
|
|
10912
10914
|
element: i.target,
|
|
10913
10915
|
intersectionRatio: i.intersectionRatio,
|
|
10914
10916
|
isIntersecting: i.isIntersecting,
|
|
10915
|
-
})))));
|
|
10917
|
+
}))), takeUntilDestroyed()));
|
|
10916
10918
|
this.scrollStateChange = outputFromObservable(toObservable(computed(() => ({
|
|
10917
10919
|
canScroll: this.canScroll(),
|
|
10918
10920
|
isAtEnd: this.isAtEnd(),
|
|
@@ -10955,7 +10957,7 @@ class ScrollableComponent {
|
|
|
10955
10957
|
const isDragging$ = toObservable(this.cursorDragScrollState.isDragging);
|
|
10956
10958
|
const scrollable$ = toObservable(this.scrollable);
|
|
10957
10959
|
toObservable(this.snap)
|
|
10958
|
-
.pipe(
|
|
10960
|
+
.pipe(switchMap((enabled) => {
|
|
10959
10961
|
if (!enabled)
|
|
10960
10962
|
return EMPTY;
|
|
10961
10963
|
return combineLatest([this.scrollableContentIntersections$, isDragging$]).pipe(filter(([, isDragging]) => !isDragging), map(([intersections]) => intersections), debounceTime(150), tap((allIntersections) => {
|
|
@@ -10970,14 +10972,14 @@ class ScrollableComponent {
|
|
|
10970
10972
|
this.scrollToElement({ element: target.element, origin: target.origin, ignoreForcedOrigin: true });
|
|
10971
10973
|
}
|
|
10972
10974
|
}));
|
|
10973
|
-
}))
|
|
10975
|
+
}), takeUntilDestroyed())
|
|
10974
10976
|
.subscribe();
|
|
10975
10977
|
toObservable(this.manualActiveNavigationIndex)
|
|
10976
|
-
.pipe(
|
|
10978
|
+
.pipe(filter((i) => i !== null), switchMap(() => scrollable$.pipe(switchMap((ref) => {
|
|
10977
10979
|
if (!ref)
|
|
10978
10980
|
return EMPTY;
|
|
10979
10981
|
return fromEvent(ref.nativeElement, 'scroll');
|
|
10980
|
-
}))), debounceTime(50), tap(() => this.manualActiveNavigationIndex.set(null)))
|
|
10982
|
+
}))), debounceTime(50), tap(() => this.manualActiveNavigationIndex.set(null)), takeUntilDestroyed())
|
|
10981
10983
|
.subscribe();
|
|
10982
10984
|
}
|
|
10983
10985
|
getNavigationDotsContainerTranslate(navigationDotCount, activeIndex) {
|
|
@@ -11288,10 +11290,10 @@ class MenuComponent {
|
|
|
11288
11290
|
this.elementsIfIsCurrentFocusTarget = this.focusRegistry.currentFocusTarget(this.id);
|
|
11289
11291
|
this._trigger._connectWithMenu(this);
|
|
11290
11292
|
fromEvent(this.elementRef.nativeElement, 'focus')
|
|
11291
|
-
.pipe(
|
|
11293
|
+
.pipe(tap(() => this.focusFirstItem()), takeUntilDestroyed())
|
|
11292
11294
|
.subscribe();
|
|
11293
11295
|
fromEvent(this.elementRef.nativeElement, 'keydown')
|
|
11294
|
-
.pipe(
|
|
11296
|
+
.pipe(tap((e) => this._handleKeydown(e)), takeUntilDestroyed())
|
|
11295
11297
|
.subscribe();
|
|
11296
11298
|
const initialFocusEffectRef = effect(() => {
|
|
11297
11299
|
const items = this.menuItemList();
|
|
@@ -12731,7 +12733,7 @@ class CarouselNextButtonDirective {
|
|
|
12731
12733
|
'aria-disabled': computed(() => !this.canGoNext()),
|
|
12732
12734
|
});
|
|
12733
12735
|
fromEvent(injectHostElement(), 'click')
|
|
12734
|
-
.pipe(
|
|
12736
|
+
.pipe(filter(() => this.canGoNext()), tap(() => this.carousel.next()), takeUntilDestroyed())
|
|
12735
12737
|
.subscribe();
|
|
12736
12738
|
}
|
|
12737
12739
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselNextButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -12776,7 +12778,7 @@ class CarouselPreviousButtonDirective {
|
|
|
12776
12778
|
'aria-disabled': computed(() => !this.canGoPrevious()),
|
|
12777
12779
|
});
|
|
12778
12780
|
fromEvent(injectHostElement(), 'click')
|
|
12779
|
-
.pipe(
|
|
12781
|
+
.pipe(filter(() => this.canGoPrevious()), tap(() => this.carousel.prev()), takeUntilDestroyed())
|
|
12780
12782
|
.subscribe();
|
|
12781
12783
|
}
|
|
12782
12784
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselPreviousButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -12818,7 +12820,7 @@ class CarouselToggleAutoPlayButtonDirective {
|
|
|
12818
12820
|
'et-carousel-toggle-auto-play-button--paused': computed(() => this.carousel.isAutoPlayPaused()),
|
|
12819
12821
|
});
|
|
12820
12822
|
fromEvent(injectHostElement(), 'click')
|
|
12821
|
-
.pipe(
|
|
12823
|
+
.pipe(tap(() => (this.carousel.isAutoPlayPaused() ? this.carousel.resumeAutoPlay() : this.carousel.stopAutoPlay())), takeUntilDestroyed())
|
|
12822
12824
|
.subscribe();
|
|
12823
12825
|
}
|
|
12824
12826
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: CarouselToggleAutoPlayButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -14184,7 +14186,7 @@ class IfSupportsShowPickerDirective {
|
|
|
14184
14186
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
14185
14187
|
this.didCreateView = false;
|
|
14186
14188
|
this.input.nativeInputRef$
|
|
14187
|
-
.pipe(
|
|
14189
|
+
.pipe(distinctUntilChanged(), tap((value) => {
|
|
14188
14190
|
const inputElement = value?.element.nativeElement;
|
|
14189
14191
|
if (inputElement && 'type' in inputElement) {
|
|
14190
14192
|
const type = inputElement.type;
|
|
@@ -14197,7 +14199,7 @@ class IfSupportsShowPickerDirective {
|
|
|
14197
14199
|
this.didCreateView = false;
|
|
14198
14200
|
}
|
|
14199
14201
|
}
|
|
14200
|
-
}))
|
|
14202
|
+
}), takeUntilDestroyed())
|
|
14201
14203
|
.subscribe();
|
|
14202
14204
|
}
|
|
14203
14205
|
getShowPickerSupportPlatformKey() {
|
|
@@ -15973,11 +15975,11 @@ class ComboboxDirective {
|
|
|
15973
15975
|
setInputSignal(this._animatedOverlay.fallbackPlacements, ['bottom', 'top']);
|
|
15974
15976
|
setInputSignal(this._animatedOverlay.autoResize, true);
|
|
15975
15977
|
this._selectionModel.allowMultiple$
|
|
15976
|
-
.pipe(
|
|
15978
|
+
.pipe(tap((allowMultiple) => {
|
|
15977
15979
|
if (allowMultiple) {
|
|
15978
15980
|
this._updateFilter('');
|
|
15979
15981
|
}
|
|
15980
|
-
}))
|
|
15982
|
+
}), takeUntilDestroyed())
|
|
15981
15983
|
.subscribe();
|
|
15982
15984
|
this._input._setEmptyHelper(this._currentFilter$);
|
|
15983
15985
|
}
|
|
@@ -16531,7 +16533,7 @@ class ComboboxBodyComponent {
|
|
|
16531
16533
|
this._customErrorComponentInputs = toSignal(combineLatest([this.combobox.error$, toObservable(this.combobox.bodyErrorComponentInputs)]).pipe(map(([error, inputs]) => ({ error, ...inputs }))));
|
|
16532
16534
|
this._bodyTemplate = null;
|
|
16533
16535
|
outputToObservable(this.clickOutside.didClickOutside)
|
|
16534
|
-
.pipe(
|
|
16536
|
+
.pipe(tap(() => this.combobox.close()), takeUntilDestroyed())
|
|
16535
16537
|
.subscribe();
|
|
16536
16538
|
}
|
|
16537
16539
|
setColorFromProvider(provider) {
|
|
@@ -17232,7 +17234,7 @@ class SelectBodyDirective {
|
|
|
17232
17234
|
'aria-labelledby': toSignal(this._select.input.labelId$),
|
|
17233
17235
|
});
|
|
17234
17236
|
outputToObservable(this._clickOutside.didClickOutside)
|
|
17235
|
-
.pipe(
|
|
17237
|
+
.pipe(tap(() => this._select.close()), takeUntilDestroyed())
|
|
17236
17238
|
.subscribe();
|
|
17237
17239
|
}
|
|
17238
17240
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: SelectBodyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -18271,7 +18273,7 @@ class MasonryItemComponent {
|
|
|
18271
18273
|
}
|
|
18272
18274
|
}
|
|
18273
18275
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: MasonryItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18274
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: MasonryItemComponent, isStandalone: true, selector: "[et-masonry-item], et-masonry-item", inputs: { key: "key" }, host: { attributes: { "role": "listitem" },
|
|
18276
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: MasonryItemComponent, isStandalone: true, selector: "[et-masonry-item], et-masonry-item", inputs: { key: "key" }, host: { attributes: { "role": "listitem" }, properties: { "style.opacity": "\"0\"" }, classAttribute: "et-masonry-item et-legacy" }, providers: [{ provide: MASONRY_ITEM_TOKEN, useExisting: MasonryItemComponent }], viewQueries: [{ propertyName: "_innerElementRef", first: true, predicate: ["innerElement"], descendants: true, isSignal: true }], exportAs: ["etMasonryItem"], ngImport: i0, template: `<div #innerElement class="et-masonry-item-inner"><ng-content /></div>`, isInline: true }); }
|
|
18275
18277
|
}
|
|
18276
18278
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: MasonryItemComponent, decorators: [{
|
|
18277
18279
|
type: Component,
|
|
@@ -18282,7 +18284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
18282
18284
|
host: {
|
|
18283
18285
|
class: 'et-masonry-item et-legacy',
|
|
18284
18286
|
role: 'listitem',
|
|
18285
|
-
style: '
|
|
18287
|
+
'[style.opacity]': '"0"',
|
|
18286
18288
|
},
|
|
18287
18289
|
providers: [{ provide: MASONRY_ITEM_TOKEN, useExisting: MasonryItemComponent }],
|
|
18288
18290
|
}]
|