@ethlete/core 1.3.0 → 1.4.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/esm2020/lib/services/destroy.service.mjs +5 -1
- package/esm2020/lib/utils/public-api.mjs +2 -1
- package/esm2020/lib/utils/rxjs.utils.mjs +27 -0
- package/fesm2015/ethlete-core.mjs +28 -1
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +31 -1
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/services/destroy.service.d.ts +3 -0
- package/lib/utils/public-api.d.ts +1 -0
- package/lib/utils/rxjs.utils.d.ts +9 -0
- package/package.json +1 -1
|
@@ -228,6 +228,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
228
228
|
args: [{ providedIn: 'root' }]
|
|
229
229
|
}], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated Will be replaced with the upcoming Angular 16 `DestroyRef` feature.
|
|
233
|
+
*/
|
|
234
|
+
// TODO: Replace with Angular 16 `DestroyRef` feature when available.
|
|
231
235
|
class DestroyService {
|
|
232
236
|
constructor() {
|
|
233
237
|
this._destroy$ = new Subject();
|
|
@@ -827,6 +831,32 @@ const createReactiveBindings = (...values) => {
|
|
|
827
831
|
};
|
|
828
832
|
};
|
|
829
833
|
|
|
834
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
835
|
+
class BehaviorSubjectWithSubscriberCount extends BehaviorSubject {
|
|
836
|
+
constructor() {
|
|
837
|
+
super(...arguments);
|
|
838
|
+
this._subscriberCount = 0;
|
|
839
|
+
}
|
|
840
|
+
get subscriberCount() {
|
|
841
|
+
return this._subscriberCount;
|
|
842
|
+
}
|
|
843
|
+
subscribe(observerOrNext) {
|
|
844
|
+
this._subscriberCount++;
|
|
845
|
+
const sub = super.subscribe(observerOrNext);
|
|
846
|
+
return {
|
|
847
|
+
...sub,
|
|
848
|
+
unsubscribe: () => {
|
|
849
|
+
sub.unsubscribe();
|
|
850
|
+
this._subscriberCount--;
|
|
851
|
+
},
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
unsubscribe() {
|
|
855
|
+
this._subscriberCount--;
|
|
856
|
+
return super.unsubscribe();
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
830
860
|
const elementCanScroll = (element) => {
|
|
831
861
|
const { scrollHeight, clientHeight, scrollWidth, clientWidth } = element;
|
|
832
862
|
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
@@ -2537,5 +2567,5 @@ const Validators = {
|
|
|
2537
2567
|
* Generated bundle index. Do not edit.
|
|
2538
2568
|
*/
|
|
2539
2569
|
|
|
2540
|
-
export { ANIMATABLE_TOKEN, ANIMATED_LIFECYCLE_TOKEN, AnimatableDirective, AnimatedLifecycleDirective, ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyService, FocusVisibleService, IS_ARRAY_NOT_EMPTY, IS_EMAIL, IsArrayNotEmpty, IsEmail, LetContext, LetDirective, MUST_MATCH, Memo, MustMatch, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, RouterStateService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SeoDirective, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, Validators, ViewportService, clamp, clone, createFlipAnimation, createFlipAnimationGroup, createMediaQueryObservable, createReactiveBindings, deleteCookie, elementCanScroll, equal, forceReflow, fromNextFrame, getCookie, getDomain, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, isGroupMatch, isKnockoutMatch, mergeSeoConfig, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, routerDisableScrollTop, setCookie, toArray, toArrayTrackByFn };
|
|
2570
|
+
export { ANIMATABLE_TOKEN, ANIMATED_LIFECYCLE_TOKEN, AnimatableDirective, AnimatedLifecycleDirective, BehaviorSubjectWithSubscriberCount, ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyService, FocusVisibleService, IS_ARRAY_NOT_EMPTY, IS_EMAIL, IsArrayNotEmpty, IsEmail, LetContext, LetDirective, MUST_MATCH, Memo, MustMatch, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, RouterStateService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SeoDirective, StructuredDataComponent, ToArrayPipe, TypedQueryList, VIEWPORT_CONFIG, Validators, ViewportService, clamp, clone, createFlipAnimation, createFlipAnimationGroup, createMediaQueryObservable, createReactiveBindings, deleteCookie, elementCanScroll, equal, forceReflow, fromNextFrame, getCookie, getDomain, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, isGroupMatch, isKnockoutMatch, mergeSeoConfig, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, routerDisableScrollTop, setCookie, toArray, toArrayTrackByFn };
|
|
2541
2571
|
//# sourceMappingURL=ethlete-core.mjs.map
|