@ethlete/core 3.3.1 → 3.5.0

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.
Files changed (53) hide show
  1. package/esm2022/lib/components/structured-data/structured-data.component.mjs +3 -3
  2. package/esm2022/lib/directives/animatable/animatable.directive.mjs +3 -3
  3. package/esm2022/lib/directives/animated-if/animated-if.directive.mjs +54 -0
  4. package/esm2022/lib/directives/animated-if/public-api.mjs +2 -0
  5. package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +20 -4
  6. package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +3 -3
  7. package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  8. package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  9. package/esm2022/lib/directives/delayable/delayable.directive.mjs +3 -3
  10. package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +3 -3
  11. package/esm2022/lib/directives/is-element/is-element.directive.mjs +3 -3
  12. package/esm2022/lib/directives/let/let.directive.mjs +3 -3
  13. package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  14. package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  15. package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  16. package/esm2022/lib/directives/public-api.mjs +2 -1
  17. package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
  18. package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  19. package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  20. package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  21. package/esm2022/lib/directives/seo/seo.directive.mjs +3 -3
  22. package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +3 -3
  23. package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +3 -3
  24. package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +3 -3
  25. package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +3 -3
  26. package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +3 -3
  27. package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  28. package/esm2022/lib/services/click-observer.service.mjs +6 -6
  29. package/esm2022/lib/services/content-observer.service.mjs +6 -6
  30. package/esm2022/lib/services/focus-visible.service.mjs +3 -3
  31. package/esm2022/lib/services/resize-observer.service.mjs +6 -6
  32. package/esm2022/lib/services/router-state.service.mjs +3 -3
  33. package/esm2022/lib/services/viewport.service.mjs +17 -17
  34. package/esm2022/lib/utils/cookie.util.mjs +4 -4
  35. package/esm2022/lib/utils/form.utils.mjs +40 -0
  36. package/esm2022/lib/utils/public-api.mjs +3 -1
  37. package/esm2022/lib/utils/resize-observable.util.mjs +12 -0
  38. package/esm2022/lib/utils/scrollable.utils.mjs +8 -2
  39. package/esm2022/lib/utils/smart-block-scroll-strategy.utils.mjs +35 -17
  40. package/fesm2022/ethlete-core.mjs +271 -134
  41. package/fesm2022/ethlete-core.mjs.map +1 -1
  42. package/lib/directives/animated-if/animated-if.directive.d.ts +12 -0
  43. package/lib/directives/animated-if/public-api.d.ts +1 -0
  44. package/lib/directives/animated-lifecycle/animated-lifecycle.directive.d.ts +9 -4
  45. package/lib/directives/public-api.d.ts +1 -0
  46. package/lib/services/viewport.service.d.ts +1 -1
  47. package/lib/utils/cookie.util.d.ts +2 -2
  48. package/lib/utils/form.utils.d.ts +2 -0
  49. package/lib/utils/public-api.d.ts +2 -0
  50. package/lib/utils/resize-observable.util.d.ts +5 -0
  51. package/lib/utils/scrollable.utils.d.ts +1 -1
  52. package/lib/utils/smart-block-scroll-strategy.utils.d.ts +2 -0
  53. package/package.json +6 -6
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@angular/common";
4
+ export declare const ANIMATED_IF_TOKEN: InjectionToken<AnimatedIfDirective>;
5
+ export declare class AnimatedIfDirective {
6
+ private readonly _destroy$;
7
+ private readonly _ngIf;
8
+ private readonly _animatedLifecycle;
9
+ set shouldRender(value: unknown);
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnimatedIfDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatedIfDirective, "[etAnimatedIf]", never, { "shouldRender": { "alias": "etAnimatedIf"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.NgIf; inputs: {}; outputs: {}; }]>;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './animated-if.directive';
@@ -1,22 +1,27 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import { AfterViewInit, InjectionToken } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  import * as i1 from "../animatable/animatable.directive";
4
4
  export declare const ANIMATED_LIFECYCLE_TOKEN: InjectionToken<AnimatedLifecycleDirective>;
5
- export declare class AnimatedLifecycleDirective {
5
+ type AnimatedLifecycleState = 'entering' | 'entered' | 'leaving' | 'left' | 'init';
6
+ export declare class AnimatedLifecycleDirective implements AfterViewInit {
6
7
  private readonly _destroy$;
7
8
  private readonly _elementRef;
8
9
  private readonly _animatable;
9
10
  private readonly _classList;
11
+ private _isConstructed;
10
12
  private _state$;
11
- readonly state$: import("rxjs").Observable<"entering" | "entered" | "leaving" | "left" | "init">;
12
- get state(): "entering" | "entered" | "leaving" | "left" | "init";
13
+ readonly state$: import("rxjs").Observable<AnimatedLifecycleState>;
14
+ get state(): AnimatedLifecycleState;
13
15
  private readonly _bindings;
16
+ ngAfterViewInit(): void;
14
17
  enter(config?: {
15
18
  onlyTransition?: boolean;
16
19
  }): void;
17
20
  leave(config?: {
18
21
  onlyTransition?: boolean;
19
22
  }): void;
23
+ _forceState(state: AnimatedLifecycleState): void;
20
24
  static ɵfac: i0.ɵɵFactoryDeclaration<AnimatedLifecycleDirective, never>;
21
25
  static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatedLifecycleDirective, "[etAnimatedLifecycle]", ["etAnimatedLifecycle"], {}, {}, never, never, true, [{ directive: typeof i1.AnimatableDirective; inputs: {}; outputs: {}; }]>;
22
26
  }
27
+ export {};
@@ -1,4 +1,5 @@
1
1
  export * from './animatable/public-api';
2
+ export * from './animated-if/public-api';
2
3
  export * from './animated-lifecycle/public-api';
3
4
  export * from './animated-overlay/public-api';
4
5
  export * from './click-outside/public-api';
@@ -55,8 +55,8 @@ export declare class ViewportService {
55
55
  */
56
56
  monitorViewport(): void;
57
57
  unmonitorViewport(): void;
58
+ getBreakpointSize(type: Breakpoint, option: 'min' | 'max'): number;
58
59
  private _observeDefaultBreakpoints;
59
- private _getViewportSize;
60
60
  private _buildMediaQuery;
61
61
  private getCurrentViewport;
62
62
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
@@ -1,5 +1,5 @@
1
1
  export declare const hasCookie: (name: string) => boolean;
2
2
  export declare const getCookie: (name: string) => string | null | undefined;
3
- export declare const setCookie: (name: string, data: string, expiresInDays?: number, domain?: string | null) => void;
4
- export declare const deleteCookie: (name: string, path: string, domain?: string | null) => void;
3
+ export declare const setCookie: (name: string, data: string, expiresInDays?: number, domain?: string | null, path?: string) => void;
4
+ export declare const deleteCookie: (name: string, path?: string, domain?: string | null) => void;
5
5
  export declare const getDomain: () => string | null;
@@ -0,0 +1,2 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ export declare const cloneFormGroup: <T extends FormGroup<any>>(formGroup: T) => T;
@@ -5,10 +5,12 @@ export * from './clone.util';
5
5
  export * from './cookie.util';
6
6
  export * from './destroy.utils';
7
7
  export * from './equal.util';
8
+ export * from './form.utils';
8
9
  export * from './key-press-manager.utils';
9
10
  export * from './media-query-observable.util';
10
11
  export * from './mutation-observable.util';
11
12
  export * from './reactive-binding.util';
13
+ export * from './resize-observable.util';
12
14
  export * from './round.utils';
13
15
  export * from './runtime-error.utils';
14
16
  export * from './scrollable.utils';
@@ -0,0 +1,5 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare const createResizeObservable: (config: {
3
+ elements: HTMLElement | HTMLElement[];
4
+ options?: ResizeObserverOptions;
5
+ }) => Observable<ResizeObserverEntry[]>;
@@ -1,4 +1,4 @@
1
- export declare const elementCanScroll: (element: HTMLElement) => boolean;
1
+ export declare const elementCanScroll: (element: HTMLElement, direction?: 'x' | 'y') => boolean;
2
2
  export interface IsElementVisibleOptions {
3
3
  /**
4
4
  * The element to check if it is visible inside a container.
@@ -4,11 +4,13 @@ import { RouterStateService } from '../services';
4
4
  export declare class SmartBlockScrollStrategy implements ScrollStrategy {
5
5
  private _viewportRuler;
6
6
  private _routerState;
7
+ private _id;
7
8
  private _previousHTMLStyles;
8
9
  private _previousScrollPosition;
9
10
  private _isEnabled;
10
11
  private _document;
11
12
  private _urlSubscription;
13
+ private _resizeSubscription;
12
14
  private _didNavigate;
13
15
  constructor(_viewportRuler: ViewportRuler, _routerState: RouterStateService, document: Document);
14
16
  attach(): void;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "3.3.1",
3
+ "version": "3.5.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },
7
7
  "peerDependencies": {
8
8
  "@angular/common": "^15.2.1 || ^16.0.0",
9
9
  "@angular/core": "^15.2.1 || ^16.0.0",
10
- "@angular/platform-browser": "16.2.2",
10
+ "@angular/platform-browser": "16.2.5",
11
11
  "@ethlete/types": "1.4.0",
12
12
  "rxjs": "7.8.1",
13
- "@angular/cdk": "16.2.1",
14
- "@floating-ui/dom": "1.5.1",
15
- "@angular/router": "16.2.2",
16
- "@angular/forms": "16.2.2"
13
+ "@angular/cdk": "16.2.4",
14
+ "@floating-ui/dom": "1.5.3",
15
+ "@angular/router": "16.2.5",
16
+ "@angular/forms": "16.2.5"
17
17
  },
18
18
  "module": "fesm2022/ethlete-core.mjs",
19
19
  "typings": "index.d.ts",