@ethlete/core 2.7.0 → 2.7.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-lifecycle/animated-lifecycle.directive.mjs +2 -1
- package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -4
- package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +5 -12
- package/esm2022/lib/directives/is-element/is-element.directive.mjs +5 -12
- package/esm2022/lib/directives/let/let.directive.mjs +10 -11
- package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +4 -5
- package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +4 -5
- package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +10 -16
- package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -4
- package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +5 -12
- package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +5 -12
- package/esm2022/lib/services/click-observer.service.mjs +7 -7
- package/esm2022/lib/services/content-observer.service.mjs +7 -7
- package/esm2022/lib/services/resize-observer.service.mjs +7 -7
- package/esm2022/lib/services/viewport.service.mjs +7 -13
- package/esm2022/lib/utils/reactive-binding.util.mjs +4 -4
- package/fesm2022/ethlete-core.mjs +57 -91
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.d.ts +1 -2
- package/lib/directives/is-active-element/is-active-element.directive.d.ts +2 -4
- package/lib/directives/is-element/is-element.directive.d.ts +2 -4
- package/lib/directives/let/let.directive.d.ts +0 -2
- package/lib/directives/observe-content/observe-content.directive.d.ts +2 -3
- package/lib/directives/observe-resize/observe-resize.directive.d.ts +2 -3
- package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +4 -6
- package/lib/directives/repeat/repeat.directive.d.ts +1 -2
- package/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.d.ts +2 -4
- package/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.d.ts +2 -4
- package/lib/services/click-observer.service.d.ts +1 -2
- package/lib/services/content-observer.service.d.ts +1 -2
- package/lib/services/resize-observer.service.d.ts +1 -2
- package/lib/services/viewport.service.d.ts +5 -6
- package/lib/utils/reactive-binding.util.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, assertInInjectionContext, DestroyRef, ElementRef, isDevMode, Directive, Injectable,
|
|
2
|
+
import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, assertInInjectionContext, DestroyRef, ElementRef, 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
4
|
import { Subject, BehaviorSubject, takeUntil, switchMap, of, tap, Observable, combineLatest, startWith, map, distinctUntilChanged, shareReplay, skip, take, debounceTime, merge, fromEvent, filter, pairwise, finalize } from 'rxjs';
|
|
5
5
|
import { END, HOME, PAGE_DOWN, PAGE_UP, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
|
6
|
-
import { coerceCssPixelValue, coerceElement
|
|
6
|
+
import { coerceCssPixelValue, coerceElement } from '@angular/cdk/coercion';
|
|
7
7
|
import { supportsScrollBehavior } from '@angular/cdk/platform';
|
|
8
8
|
import { Overlay } from '@angular/cdk/overlay';
|
|
9
9
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -11,7 +11,7 @@ import { createPopper } from '@popperjs/core';
|
|
|
11
11
|
import { DOCUMENT } from '@angular/common';
|
|
12
12
|
import { Router, NavigationEnd } from '@angular/router';
|
|
13
13
|
import { __decorate, __metadata } from 'tslib';
|
|
14
|
-
import
|
|
14
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
15
15
|
import { debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
16
16
|
|
|
17
17
|
class StructuredDataComponent {
|
|
@@ -566,7 +566,7 @@ const createReactiveBindings = (...values) => {
|
|
|
566
566
|
const pushedAttributes = [];
|
|
567
567
|
const defaults = {};
|
|
568
568
|
const push = (value) => {
|
|
569
|
-
const { attribute, observable, elementRef } = value;
|
|
569
|
+
const { attribute, observable, elementRef, eager } = value;
|
|
570
570
|
const elRef = elementRef || rootElementRef;
|
|
571
571
|
const attributes = Array.isArray(attribute) ? attribute : [attribute];
|
|
572
572
|
pushedAttributes.push(attributes);
|
|
@@ -584,7 +584,7 @@ const createReactiveBindings = (...values) => {
|
|
|
584
584
|
return a.render === b.render && a.value === b.value;
|
|
585
585
|
}
|
|
586
586
|
return false;
|
|
587
|
-
}), switchMap((v) => fromNextFrame().pipe(map(() => v))))
|
|
587
|
+
}), switchMap((v) => (eager ? of(v) : fromNextFrame().pipe(map(() => v)))))
|
|
588
588
|
.subscribe((value) => {
|
|
589
589
|
const currentAttributes = pushedAttributes.find((s) => s.some((current) => attributes.includes(current))) || [];
|
|
590
590
|
for (const attribute of currentAttributes) {
|
|
@@ -1324,6 +1324,7 @@ class AnimatedLifecycleDirective {
|
|
|
1324
1324
|
this._bindings = createReactiveBindings({
|
|
1325
1325
|
attribute: 'class.et-force-invisible',
|
|
1326
1326
|
observable: this._state$.pipe(map((state) => state === 'init')),
|
|
1327
|
+
eager: true,
|
|
1327
1328
|
});
|
|
1328
1329
|
}
|
|
1329
1330
|
get state() {
|
|
@@ -1423,8 +1424,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
1423
1424
|
args: [{ providedIn: 'root' }]
|
|
1424
1425
|
}] });
|
|
1425
1426
|
class ClickObserverService {
|
|
1426
|
-
constructor(
|
|
1427
|
-
this._clickObserverFactory =
|
|
1427
|
+
constructor() {
|
|
1428
|
+
this._clickObserverFactory = inject(ClickObserverFactory);
|
|
1428
1429
|
this._observedElements = new Map();
|
|
1429
1430
|
}
|
|
1430
1431
|
ngOnDestroy() {
|
|
@@ -1471,13 +1472,13 @@ class ClickObserverService {
|
|
|
1471
1472
|
this._observedElements.delete(element);
|
|
1472
1473
|
}
|
|
1473
1474
|
}
|
|
1474
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ClickObserverService, deps: [
|
|
1475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ClickObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1475
1476
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ClickObserverService, providedIn: 'root' }); }
|
|
1476
1477
|
}
|
|
1477
1478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ClickObserverService, decorators: [{
|
|
1478
1479
|
type: Injectable,
|
|
1479
1480
|
args: [{ providedIn: 'root' }]
|
|
1480
|
-
}]
|
|
1481
|
+
}] });
|
|
1481
1482
|
|
|
1482
1483
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
1483
1484
|
class MutationObserverFactory {
|
|
@@ -1492,8 +1493,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
1492
1493
|
args: [{ providedIn: 'root' }]
|
|
1493
1494
|
}] });
|
|
1494
1495
|
class ContentObserverService {
|
|
1495
|
-
constructor(
|
|
1496
|
-
this._mutationObserverFactory =
|
|
1496
|
+
constructor() {
|
|
1497
|
+
this._mutationObserverFactory = inject(MutationObserverFactory);
|
|
1497
1498
|
this._observedElements = new Map();
|
|
1498
1499
|
}
|
|
1499
1500
|
ngOnDestroy() {
|
|
@@ -1546,13 +1547,13 @@ class ContentObserverService {
|
|
|
1546
1547
|
this._observedElements.delete(element);
|
|
1547
1548
|
}
|
|
1548
1549
|
}
|
|
1549
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ContentObserverService, deps: [
|
|
1550
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ContentObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1550
1551
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ContentObserverService, providedIn: 'root' }); }
|
|
1551
1552
|
}
|
|
1552
1553
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ContentObserverService, decorators: [{
|
|
1553
1554
|
type: Injectable,
|
|
1554
1555
|
args: [{ providedIn: 'root' }]
|
|
1555
|
-
}]
|
|
1556
|
+
}] });
|
|
1556
1557
|
|
|
1557
1558
|
class FocusVisibleService {
|
|
1558
1559
|
get isFocusVisible() {
|
|
@@ -1598,8 +1599,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
1598
1599
|
args: [{ providedIn: 'root' }]
|
|
1599
1600
|
}] });
|
|
1600
1601
|
class ResizeObserverService {
|
|
1601
|
-
constructor(
|
|
1602
|
-
this._mutationObserverFactory =
|
|
1602
|
+
constructor() {
|
|
1603
|
+
this._mutationObserverFactory = inject(ResizeObserverFactory);
|
|
1603
1604
|
this._observedElements = new Map();
|
|
1604
1605
|
}
|
|
1605
1606
|
ngOnDestroy() {
|
|
@@ -1648,13 +1649,13 @@ class ResizeObserverService {
|
|
|
1648
1649
|
this._observedElements.delete(element);
|
|
1649
1650
|
}
|
|
1650
1651
|
}
|
|
1651
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ResizeObserverService, deps: [
|
|
1652
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ResizeObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1652
1653
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ResizeObserverService, providedIn: 'root' }); }
|
|
1653
1654
|
}
|
|
1654
1655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
1655
1656
|
type: Injectable,
|
|
1656
1657
|
args: [{ providedIn: 'root' }]
|
|
1657
|
-
}]
|
|
1658
|
+
}] });
|
|
1658
1659
|
|
|
1659
1660
|
const ET_DISABLE_SCROLL_TOP = Symbol('ET_DISABLE_SCROLL_TOP');
|
|
1660
1661
|
const ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE = Symbol('ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE');
|
|
@@ -1881,9 +1882,10 @@ class ViewportService {
|
|
|
1881
1882
|
get currentViewport() {
|
|
1882
1883
|
return this.getCurrentViewport([this.isXs, this.isSm, this.isMd, this.isLg, this.isXl, this.is2Xl]);
|
|
1883
1884
|
}
|
|
1884
|
-
constructor(
|
|
1885
|
-
this._breakpointObserver = _breakpointObserver;
|
|
1885
|
+
constructor() {
|
|
1886
1886
|
this._resizeObserverService = inject(ResizeObserverService);
|
|
1887
|
+
this._viewportConfig = inject(VIEWPORT_CONFIG, { optional: true }) || DEFAULT_VIEWPORT_CONFIG;
|
|
1888
|
+
this._breakpointObserver = inject(BreakpointObserver);
|
|
1887
1889
|
this._viewportMonitorStop$ = new Subject();
|
|
1888
1890
|
this._isViewportMonitorEnabled = false;
|
|
1889
1891
|
this._isXs$ = new BehaviorSubject(false);
|
|
@@ -1895,7 +1897,6 @@ class ViewportService {
|
|
|
1895
1897
|
this._viewportSize$ = new BehaviorSubject(null);
|
|
1896
1898
|
this._scrollbarSize$ = new BehaviorSubject(null);
|
|
1897
1899
|
this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay(1));
|
|
1898
|
-
this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
|
|
1899
1900
|
this._observeDefaultBreakpoints();
|
|
1900
1901
|
}
|
|
1901
1902
|
observe(options) {
|
|
@@ -2026,7 +2027,7 @@ class ViewportService {
|
|
|
2026
2027
|
}
|
|
2027
2028
|
return 'xs';
|
|
2028
2029
|
}
|
|
2029
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ViewportService, deps: [
|
|
2030
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2030
2031
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ViewportService, providedIn: 'root' }); }
|
|
2031
2032
|
}
|
|
2032
2033
|
__decorate([
|
|
@@ -2050,12 +2051,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2050
2051
|
args: [{
|
|
2051
2052
|
providedIn: 'root',
|
|
2052
2053
|
}]
|
|
2053
|
-
}], ctorParameters: function () { return [{
|
|
2054
|
-
type: Inject,
|
|
2055
|
-
args: [VIEWPORT_CONFIG]
|
|
2056
|
-
}, {
|
|
2057
|
-
type: Optional
|
|
2058
|
-
}] }, { type: i1.BreakpointObserver }]; }, propDecorators: { _getViewportSize: [], _buildMediaQuery: [] } });
|
|
2054
|
+
}], ctorParameters: function () { return []; }, propDecorators: { _getViewportSize: [], _buildMediaQuery: [] } });
|
|
2059
2055
|
|
|
2060
2056
|
class ObserveResizeDirective {
|
|
2061
2057
|
constructor() {
|
|
@@ -2071,14 +2067,14 @@ class ObserveResizeDirective {
|
|
|
2071
2067
|
return this._disabled;
|
|
2072
2068
|
}
|
|
2073
2069
|
set disabled(value) {
|
|
2074
|
-
this._disabled =
|
|
2070
|
+
this._disabled = booleanAttribute(value);
|
|
2075
2071
|
this._disabled ? this._unsubscribe() : this._subscribe();
|
|
2076
2072
|
}
|
|
2077
2073
|
get debounce() {
|
|
2078
2074
|
return this._debounce;
|
|
2079
2075
|
}
|
|
2080
2076
|
set debounce(value) {
|
|
2081
|
-
this._debounce =
|
|
2077
|
+
this._debounce = numberAttribute(value) ?? null;
|
|
2082
2078
|
this._subscribe();
|
|
2083
2079
|
}
|
|
2084
2080
|
ngAfterContentInit() {
|
|
@@ -2421,7 +2417,7 @@ class CursorDragScrollDirective {
|
|
|
2421
2417
|
return this._enabled;
|
|
2422
2418
|
}
|
|
2423
2419
|
set enabled(value) {
|
|
2424
|
-
this._enabled =
|
|
2420
|
+
this._enabled = booleanAttribute(value);
|
|
2425
2421
|
if (this._enabled) {
|
|
2426
2422
|
this._enableCursorDragScroll();
|
|
2427
2423
|
}
|
|
@@ -2614,16 +2610,10 @@ const IS_ACTIVE_ELEMENT = new InjectionToken('ET_IS_ACTIVE_ELEMENT');
|
|
|
2614
2610
|
class IsActiveElementDirective {
|
|
2615
2611
|
constructor() {
|
|
2616
2612
|
this.elementRef = inject(ElementRef);
|
|
2617
|
-
this.
|
|
2618
|
-
}
|
|
2619
|
-
get isActiveElement() {
|
|
2620
|
-
return this._isActiveElement;
|
|
2621
|
-
}
|
|
2622
|
-
set isActiveElement(value) {
|
|
2623
|
-
this._isActiveElement = coerceBooleanProperty(value);
|
|
2613
|
+
this.isActiveElement = false;
|
|
2624
2614
|
}
|
|
2625
2615
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: IsActiveElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2626
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: IsActiveElementDirective, isStandalone: true, selector: "[etIsActiveElement]", inputs: { isActiveElement: ["etIsActiveElement", "isActiveElement"] }, providers: [
|
|
2616
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: IsActiveElementDirective, isStandalone: true, selector: "[etIsActiveElement]", inputs: { isActiveElement: ["etIsActiveElement", "isActiveElement", booleanAttribute] }, providers: [
|
|
2627
2617
|
{
|
|
2628
2618
|
provide: IS_ACTIVE_ELEMENT,
|
|
2629
2619
|
useExisting: IsActiveElementDirective,
|
|
@@ -2644,23 +2634,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2644
2634
|
}]
|
|
2645
2635
|
}], propDecorators: { isActiveElement: [{
|
|
2646
2636
|
type: Input,
|
|
2647
|
-
args: ['etIsActiveElement']
|
|
2637
|
+
args: [{ alias: 'etIsActiveElement', transform: booleanAttribute }]
|
|
2648
2638
|
}] } });
|
|
2649
2639
|
|
|
2650
2640
|
const IS_ELEMENT = new InjectionToken('ET_IS_ELEMENT');
|
|
2651
2641
|
class IsElementDirective {
|
|
2652
2642
|
constructor() {
|
|
2653
2643
|
this.elementRef = inject(ElementRef);
|
|
2654
|
-
this.
|
|
2655
|
-
}
|
|
2656
|
-
get isElement() {
|
|
2657
|
-
return this._isElement;
|
|
2658
|
-
}
|
|
2659
|
-
set isElement(value) {
|
|
2660
|
-
this._isElement = coerceBooleanProperty(value);
|
|
2644
|
+
this.isElement = false;
|
|
2661
2645
|
}
|
|
2662
2646
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: IsElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2663
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: IsElementDirective, isStandalone: true, selector: "[etIsElement]", inputs: { isElement: ["etIsElement", "isElement"] }, providers: [
|
|
2647
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: IsElementDirective, isStandalone: true, selector: "[etIsElement]", inputs: { isElement: ["etIsElement", "isElement", booleanAttribute] }, providers: [
|
|
2664
2648
|
{
|
|
2665
2649
|
provide: IS_ELEMENT,
|
|
2666
2650
|
useExisting: IsElementDirective,
|
|
@@ -2681,7 +2665,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2681
2665
|
}]
|
|
2682
2666
|
}], propDecorators: { isElement: [{
|
|
2683
2667
|
type: Input,
|
|
2684
|
-
args: ['etIsElement']
|
|
2668
|
+
args: [{ alias: 'etIsElement', transform: booleanAttribute }]
|
|
2685
2669
|
}] } });
|
|
2686
2670
|
|
|
2687
2671
|
class LetContext {
|
|
@@ -2694,17 +2678,16 @@ class LetContext {
|
|
|
2694
2678
|
}
|
|
2695
2679
|
|
|
2696
2680
|
class LetDirective {
|
|
2681
|
+
constructor() {
|
|
2682
|
+
this._viewContainer = inject(ViewContainerRef);
|
|
2683
|
+
this._context = new LetContext();
|
|
2684
|
+
this._templateRef = inject(TemplateRef);
|
|
2685
|
+
this._viewRef = null;
|
|
2686
|
+
}
|
|
2697
2687
|
set etLet(value) {
|
|
2698
2688
|
this._context.$implicit = this._context.etLet = value;
|
|
2699
2689
|
this._updateView();
|
|
2700
2690
|
}
|
|
2701
|
-
constructor(_viewContainer, templateRef) {
|
|
2702
|
-
this._viewContainer = _viewContainer;
|
|
2703
|
-
this._context = new LetContext();
|
|
2704
|
-
this._templateRef = null;
|
|
2705
|
-
this._viewRef = null;
|
|
2706
|
-
this._templateRef = templateRef;
|
|
2707
|
-
}
|
|
2708
2691
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2709
2692
|
static ngTemplateContextGuard(dir, ctx) {
|
|
2710
2693
|
return true;
|
|
@@ -2717,7 +2700,7 @@ class LetDirective {
|
|
|
2717
2700
|
}
|
|
2718
2701
|
}
|
|
2719
2702
|
}
|
|
2720
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: LetDirective, deps: [
|
|
2703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: LetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2721
2704
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 }); }
|
|
2722
2705
|
}
|
|
2723
2706
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: LetDirective, decorators: [{
|
|
@@ -2726,7 +2709,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2726
2709
|
selector: '[etLet]',
|
|
2727
2710
|
standalone: true,
|
|
2728
2711
|
}]
|
|
2729
|
-
}],
|
|
2712
|
+
}], propDecorators: { etLet: [{
|
|
2730
2713
|
type: Input
|
|
2731
2714
|
}] } });
|
|
2732
2715
|
|
|
@@ -2744,14 +2727,14 @@ class ObserveContentDirective {
|
|
|
2744
2727
|
return this._disabled;
|
|
2745
2728
|
}
|
|
2746
2729
|
set disabled(value) {
|
|
2747
|
-
this._disabled =
|
|
2730
|
+
this._disabled = booleanAttribute(value);
|
|
2748
2731
|
this._disabled ? this._unsubscribe() : this._subscribe();
|
|
2749
2732
|
}
|
|
2750
2733
|
get debounce() {
|
|
2751
2734
|
return this._debounce;
|
|
2752
2735
|
}
|
|
2753
2736
|
set debounce(value) {
|
|
2754
|
-
this._debounce =
|
|
2737
|
+
this._debounce = numberAttribute(value) ?? null;
|
|
2755
2738
|
this._subscribe();
|
|
2756
2739
|
}
|
|
2757
2740
|
ngAfterContentInit() {
|
|
@@ -2796,16 +2779,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2796
2779
|
const SCROLL_OBSERVER_FIRST_ELEMENT_CLASS = 'et-scroll-observer-first-element';
|
|
2797
2780
|
class ScrollObserverFirstElementDirective {
|
|
2798
2781
|
constructor() {
|
|
2799
|
-
this.
|
|
2800
|
-
}
|
|
2801
|
-
get isFirstElement() {
|
|
2802
|
-
return this._isFirstElement;
|
|
2803
|
-
}
|
|
2804
|
-
set isFirstElement(value) {
|
|
2805
|
-
this._isFirstElement = coerceBooleanProperty(value);
|
|
2782
|
+
this.isFirstElement = false;
|
|
2806
2783
|
}
|
|
2807
2784
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2808
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 }); }
|
|
2785
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement", booleanAttribute] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 }); }
|
|
2809
2786
|
}
|
|
2810
2787
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
|
|
2811
2788
|
type: Directive,
|
|
@@ -2815,7 +2792,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2815
2792
|
}]
|
|
2816
2793
|
}], propDecorators: { isFirstElement: [{
|
|
2817
2794
|
type: Input,
|
|
2818
|
-
args: ['etScrollObserverFirstElement']
|
|
2795
|
+
args: [{ alias: 'etScrollObserverFirstElement', transform: booleanAttribute }]
|
|
2819
2796
|
}, {
|
|
2820
2797
|
type: HostBinding,
|
|
2821
2798
|
args: [`class.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`]
|
|
@@ -2840,16 +2817,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2840
2817
|
const SCROLL_OBSERVER_LAST_ELEMENT_CLASS = 'et-scroll-observer-last-element';
|
|
2841
2818
|
class ScrollObserverLastElementDirective {
|
|
2842
2819
|
constructor() {
|
|
2843
|
-
this.
|
|
2844
|
-
}
|
|
2845
|
-
get isLastElement() {
|
|
2846
|
-
return this._isLastElement;
|
|
2847
|
-
}
|
|
2848
|
-
set isLastElement(value) {
|
|
2849
|
-
this._isLastElement = coerceBooleanProperty(value);
|
|
2820
|
+
this.isLastElement = false;
|
|
2850
2821
|
}
|
|
2851
2822
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2852
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ScrollObserverLastElementDirective, isStandalone: true, selector: "[etScrollObserverLastElement]", inputs: { isLastElement: ["etScrollObserverLastElement", "isLastElement"] }, host: { properties: { "class.et-scroll-observer-last-element": "this.isLastElement" }, classAttribute: "et-scroll-observer-last-element" }, ngImport: i0 }); }
|
|
2823
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ScrollObserverLastElementDirective, isStandalone: true, selector: "[etScrollObserverLastElement]", inputs: { isLastElement: ["etScrollObserverLastElement", "isLastElement", booleanAttribute] }, host: { properties: { "class.et-scroll-observer-last-element": "this.isLastElement" }, classAttribute: "et-scroll-observer-last-element" }, ngImport: i0 }); }
|
|
2853
2824
|
}
|
|
2854
2825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
|
|
2855
2826
|
type: Directive,
|
|
@@ -2862,7 +2833,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
2862
2833
|
}]
|
|
2863
2834
|
}], propDecorators: { isLastElement: [{
|
|
2864
2835
|
type: Input,
|
|
2865
|
-
args: ['etScrollObserverLastElement']
|
|
2836
|
+
args: [{ alias: 'etScrollObserverLastElement', transform: booleanAttribute }]
|
|
2866
2837
|
}, {
|
|
2867
2838
|
type: HostBinding,
|
|
2868
2839
|
args: [`class.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`]
|
|
@@ -2882,7 +2853,7 @@ class ObserveScrollStateDirective {
|
|
|
2882
2853
|
first: this._firstCurrentChild,
|
|
2883
2854
|
last: this._lastCurrentChild,
|
|
2884
2855
|
};
|
|
2885
|
-
this.
|
|
2856
|
+
this.rootMargin = 0;
|
|
2886
2857
|
this._threshold = [0.99999, 0.9999, 0.999, 0.99, 1];
|
|
2887
2858
|
this._intersectionObserver = null;
|
|
2888
2859
|
this.valueChange = new EventEmitter();
|
|
@@ -2903,21 +2874,15 @@ class ObserveScrollStateDirective {
|
|
|
2903
2874
|
const element = this._elementRef.nativeElement.children[this._elementRef.nativeElement.children.length - 1];
|
|
2904
2875
|
return this._getNonIgnoredChild(element, 'previous');
|
|
2905
2876
|
}
|
|
2906
|
-
get observerRootMargin() {
|
|
2907
|
-
return this._rootMargin;
|
|
2908
|
-
}
|
|
2909
|
-
set observerRootMargin(value) {
|
|
2910
|
-
this._rootMargin = coerceNumberProperty(value);
|
|
2911
|
-
}
|
|
2912
2877
|
get observerThreshold() {
|
|
2913
2878
|
return this._threshold;
|
|
2914
2879
|
}
|
|
2915
2880
|
set observerThreshold(value) {
|
|
2916
2881
|
if (Array.isArray(value)) {
|
|
2917
|
-
this._threshold = value;
|
|
2882
|
+
this._threshold = value.map((threshold) => numberAttribute(threshold));
|
|
2918
2883
|
return;
|
|
2919
2884
|
}
|
|
2920
|
-
this._threshold =
|
|
2885
|
+
this._threshold = numberAttribute(value);
|
|
2921
2886
|
}
|
|
2922
2887
|
ngOnInit() {
|
|
2923
2888
|
this._contentObserverService
|
|
@@ -2970,7 +2935,7 @@ class ObserveScrollStateDirective {
|
|
|
2970
2935
|
});
|
|
2971
2936
|
}, {
|
|
2972
2937
|
root: this._elementRef.nativeElement,
|
|
2973
|
-
rootMargin: this.
|
|
2938
|
+
rootMargin: this.rootMargin ? `${this.rootMargin}px` : undefined,
|
|
2974
2939
|
threshold: this._threshold,
|
|
2975
2940
|
});
|
|
2976
2941
|
return observer;
|
|
@@ -3012,7 +2977,7 @@ class ObserveScrollStateDirective {
|
|
|
3012
2977
|
return element;
|
|
3013
2978
|
}
|
|
3014
2979
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3015
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: {
|
|
2980
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { rootMargin: ["rootMargin", "rootMargin", numberAttribute], observerThreshold: "observerThreshold" }, outputs: { valueChange: "etObserveScrollState" }, providers: [
|
|
3016
2981
|
{
|
|
3017
2982
|
provide: OBSERVE_SCROLL_STATE,
|
|
3018
2983
|
useExisting: ObserveScrollStateDirective,
|
|
@@ -3032,8 +2997,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
3032
2997
|
},
|
|
3033
2998
|
],
|
|
3034
2999
|
}]
|
|
3035
|
-
}], propDecorators: {
|
|
3036
|
-
type: Input
|
|
3000
|
+
}], propDecorators: { rootMargin: [{
|
|
3001
|
+
type: Input,
|
|
3002
|
+
args: [{ transform: numberAttribute }]
|
|
3037
3003
|
}], observerThreshold: [{
|
|
3038
3004
|
type: Input
|
|
3039
3005
|
}], valueChange: [{
|
|
@@ -3046,7 +3012,7 @@ class RepeatDirective {
|
|
|
3046
3012
|
return this._repeatCount;
|
|
3047
3013
|
}
|
|
3048
3014
|
set repeatCount(value) {
|
|
3049
|
-
this._repeatCount =
|
|
3015
|
+
this._repeatCount = numberAttribute(value);
|
|
3050
3016
|
this._render();
|
|
3051
3017
|
}
|
|
3052
3018
|
constructor(_mainTemplateRef, _viewContainerRef) {
|