@ethlete/core 0.2.0-next.2 → 0.2.0-next.21
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/components/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/structured-data.component.mjs +37 -0
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +37 -0
- package/esm2020/lib/directives/click-outside/public-api.mjs +2 -0
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.mjs +3 -0
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +147 -0
- package/esm2020/lib/directives/cursor-drag-scroll/public-api.mjs +2 -0
- package/esm2020/lib/directives/let/let.directive.mjs +8 -8
- package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +11 -11
- package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +11 -12
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.constants.mjs +3 -0
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +171 -0
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.types.mjs +2 -0
- package/esm2020/lib/directives/observe-scroll-state/public-api.mjs +3 -0
- package/esm2020/lib/directives/public-api.mjs +10 -3
- package/esm2020/lib/directives/repeat/repeat.directive.mjs +10 -11
- package/esm2020/lib/directives/scroll-observer-first-element/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-first-element/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +31 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +18 -0
- package/esm2020/lib/directives/scroll-observer-last-element/index.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-last-element/public-api.mjs +2 -0
- package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +34 -0
- package/esm2020/lib/directives/seo/public-api.mjs +5 -0
- package/esm2020/lib/directives/seo/seo.directive.constants.mjs +3 -0
- package/esm2020/lib/directives/seo/seo.directive.mjs +166 -0
- package/esm2020/lib/directives/seo/seo.directive.types.mjs +2 -0
- package/esm2020/lib/directives/seo/seo.directive.utils.mjs +7 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +34 -0
- package/esm2020/lib/pipes/normalize-game-result-type/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +47 -0
- package/esm2020/lib/pipes/normalize-match-participants/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +126 -0
- package/esm2020/lib/pipes/normalize-match-score/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-state/index.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +19 -0
- package/esm2020/lib/pipes/normalize-match-state/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +38 -0
- package/esm2020/lib/pipes/normalize-match-type/public-api.mjs +3 -0
- package/esm2020/lib/pipes/public-api.mjs +6 -1
- package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +3 -3
- package/esm2020/lib/public-api.mjs +2 -1
- package/esm2020/lib/services/click-observer.service.mjs +73 -0
- package/esm2020/lib/services/content-observer.service.mjs +6 -6
- package/esm2020/lib/services/destroy.service.mjs +19 -0
- package/esm2020/lib/services/focus-visible.service.mjs +7 -7
- package/esm2020/lib/services/public-api.mjs +7 -4
- package/esm2020/lib/services/resize-observer.service.mjs +6 -6
- package/esm2020/lib/services/router-state.service.mjs +115 -0
- package/esm2020/lib/services/viewport.service.mjs +16 -16
- package/esm2020/lib/types/angular.types.mjs +36 -2
- package/esm2020/lib/types/i18n.types.mjs +2 -0
- package/esm2020/lib/types/public-api.mjs +3 -2
- package/esm2020/lib/utils/clone.util.mjs +78 -0
- package/esm2020/lib/utils/cookie.util.mjs +48 -0
- package/esm2020/lib/utils/equal.util.mjs +118 -0
- package/esm2020/lib/utils/index.mjs +2 -0
- package/esm2020/lib/utils/public-api.mjs +7 -2
- package/esm2020/lib/utils/reactive-binding.util.mjs +111 -0
- package/esm2020/lib/utils/scrollable.utils.mjs +5 -0
- package/fesm2015/ethlete-core.mjs +1821 -289
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +1818 -289
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/components/public-api.d.ts +1 -0
- package/lib/components/structured-data/public-api.d.ts +1 -0
- package/lib/components/structured-data/structured-data.component.d.ts +11 -0
- package/lib/directives/click-outside/click-outside.directive.d.ts +12 -0
- package/lib/directives/click-outside/public-api.d.ts +1 -0
- package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.d.ts +2 -0
- package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.d.ts +27 -0
- package/lib/directives/cursor-drag-scroll/public-api.d.ts +1 -0
- package/lib/directives/let/let.directive.d.ts +1 -1
- package/lib/directives/observe-content/observe-content.directive.d.ts +2 -4
- package/lib/directives/observe-resize/observe-resize.directive.d.ts +3 -5
- package/lib/directives/observe-scroll-state/observe-scroll-state.constants.d.ts +3 -0
- package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +31 -0
- package/lib/directives/observe-scroll-state/observe-scroll-state.types.d.ts +6 -0
- package/lib/directives/observe-scroll-state/public-api.d.ts +3 -0
- package/lib/directives/public-api.d.ts +9 -2
- package/lib/directives/repeat/repeat.directive.d.ts +3 -4
- package/lib/directives/scroll-observer-first-element/index.d.ts +1 -0
- package/lib/directives/scroll-observer-first-element/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.d.ts +10 -0
- package/lib/directives/scroll-observer-ignore-target/index.d.ts +1 -0
- package/lib/directives/scroll-observer-ignore-target/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.d.ts +6 -0
- package/lib/directives/scroll-observer-last-element/index.d.ts +1 -0
- package/lib/directives/scroll-observer-last-element/public-api.d.ts +1 -0
- package/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.d.ts +10 -0
- package/lib/directives/seo/public-api.d.ts +4 -0
- package/lib/directives/seo/seo.directive.constants.d.ts +3 -0
- package/lib/directives/seo/seo.directive.d.ts +21 -0
- package/lib/directives/seo/seo.directive.types.d.ts +51 -0
- package/lib/directives/seo/seo.directive.utils.d.ts +2 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +4 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +2 -0
- package/lib/pipes/normalize-game-result-type/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +21 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +4 -0
- package/lib/pipes/normalize-match-participants/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +12 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +27 -0
- package/lib/pipes/normalize-match-score/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-state/index.d.ts +1 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +3 -0
- package/lib/pipes/normalize-match-state/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +3 -0
- package/lib/pipes/normalize-match-type/public-api.d.ts +2 -0
- package/lib/pipes/public-api.d.ts +5 -0
- package/lib/public-api.d.ts +1 -0
- package/lib/services/click-observer.service.d.ts +21 -0
- package/lib/services/destroy.service.d.ts +9 -0
- package/lib/services/public-api.d.ts +6 -3
- package/lib/services/router-state.service.d.ts +40 -0
- package/lib/services/viewport.types.d.ts +1 -1
- package/lib/types/angular.types.d.ts +14 -1
- package/lib/types/i18n.types.d.ts +4 -0
- package/lib/types/public-api.d.ts +2 -1
- package/lib/types/viewport.types.d.ts +2 -2
- package/lib/utils/clone.util.d.ts +15 -0
- package/lib/utils/cookie.util.d.ts +5 -0
- package/lib/utils/equal.util.d.ts +27 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/public-api.d.ts +6 -1
- package/lib/utils/reactive-binding.util.d.ts +19 -0
- package/lib/utils/scrollable.utils.d.ts +1 -0
- package/package.json +9 -5
|
@@ -1,12 +1,48 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, InjectionToken, Injectable, ElementRef, Inject, Optional, EventEmitter, Directive, Output, NgZone, Pipe, QueryList } from '@angular/core';
|
|
3
|
+
import { DomSanitizer, Meta, Title } from '@angular/platform-browser';
|
|
4
|
+
import { coerceElement, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
5
|
+
import { fromEvent, Observable, Subject, takeUntil, distinctUntilChanged, BehaviorSubject, filter, map, combineLatest, pairwise, debounceTime, shareReplay, startWith, tap, take } from 'rxjs';
|
|
6
|
+
import { DOCUMENT } from '@angular/common';
|
|
7
|
+
import { Router, NavigationEnd } from '@angular/router';
|
|
5
8
|
import { __decorate, __metadata } from 'tslib';
|
|
6
9
|
import * as i1 from '@angular/cdk/layout';
|
|
7
|
-
import { DOCUMENT } from '@angular/common';
|
|
8
10
|
import { debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
9
11
|
|
|
12
|
+
class StructuredDataComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
this._sanitizer = inject(DomSanitizer);
|
|
15
|
+
}
|
|
16
|
+
set data(currentValue) {
|
|
17
|
+
this.jsonLD = this.getSafeHTML(currentValue);
|
|
18
|
+
}
|
|
19
|
+
getSafeHTML(value) {
|
|
20
|
+
const json = value ? JSON.stringify(value, null, 2).replace(/<\/script>/g, '<\\/script>') : '';
|
|
21
|
+
const html = `<script type="application/ld+json">${json}</script>`;
|
|
22
|
+
return this._sanitizer.bypassSecurityTrustHtml(html);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
StructuredDataComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: StructuredDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
StructuredDataComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: StructuredDataComponent, isStandalone: true, selector: "et-structured-data", inputs: { data: "data" }, host: { properties: { "innerHTML": "this.jsonLD" }, styleAttribute: "display: none" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: StructuredDataComponent, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{
|
|
30
|
+
selector: 'et-structured-data',
|
|
31
|
+
standalone: true,
|
|
32
|
+
template: '',
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
encapsulation: ViewEncapsulation.None,
|
|
35
|
+
host: {
|
|
36
|
+
style: 'display: none',
|
|
37
|
+
},
|
|
38
|
+
}]
|
|
39
|
+
}], propDecorators: { data: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], jsonLD: [{
|
|
42
|
+
type: HostBinding,
|
|
43
|
+
args: ['innerHTML']
|
|
44
|
+
}] } });
|
|
45
|
+
|
|
10
46
|
const VIEWPORT_CONFIG = new InjectionToken('ViewportConfig');
|
|
11
47
|
/**
|
|
12
48
|
* Default viewport config based on Tailwind CSS.
|
|
@@ -48,127 +84,772 @@ const Memo = (config = {}) => (_, __, descriptor) => {
|
|
|
48
84
|
return descriptor;
|
|
49
85
|
};
|
|
50
86
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
56
|
-
this.etLet = null;
|
|
87
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
88
|
+
class ClickObserverFactory {
|
|
89
|
+
create() {
|
|
90
|
+
return fromEvent(document, 'click');
|
|
57
91
|
}
|
|
58
92
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
93
|
+
ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverFactory, decorators: [{
|
|
96
|
+
type: Injectable,
|
|
97
|
+
args: [{ providedIn: 'root' }]
|
|
98
|
+
}] });
|
|
99
|
+
class ClickObserverService {
|
|
100
|
+
constructor(_clickObserverFactory) {
|
|
101
|
+
this._clickObserverFactory = _clickObserverFactory;
|
|
102
|
+
this._observedElements = new Map();
|
|
67
103
|
}
|
|
68
|
-
|
|
69
|
-
this.
|
|
70
|
-
this._updateView();
|
|
104
|
+
ngOnDestroy() {
|
|
105
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
71
106
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
107
|
+
observe(elementOrRef) {
|
|
108
|
+
const element = coerceElement(elementOrRef);
|
|
109
|
+
return new Observable((observer) => {
|
|
110
|
+
const stream = this._observeElement(element);
|
|
111
|
+
const subscription = stream.subscribe(observer);
|
|
112
|
+
return () => {
|
|
113
|
+
subscription.unsubscribe();
|
|
114
|
+
this._unobserveElement(element);
|
|
115
|
+
};
|
|
116
|
+
});
|
|
75
117
|
}
|
|
76
|
-
|
|
77
|
-
if (!this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
118
|
+
_observeElement(element) {
|
|
119
|
+
if (!this._observedElements.has(element)) {
|
|
120
|
+
const stream = new Subject();
|
|
121
|
+
const observer = this._clickObserverFactory.create();
|
|
122
|
+
const sub = observer.subscribe((event) => stream.next(event));
|
|
123
|
+
this._observedElements.set(element, { observer: sub, stream, count: 1 });
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this._observedElements.get(element).count++;
|
|
127
|
+
}
|
|
128
|
+
return this._observedElements.get(element).stream;
|
|
129
|
+
}
|
|
130
|
+
_unobserveElement(element) {
|
|
131
|
+
if (this._observedElements.has(element)) {
|
|
132
|
+
this._observedElements.get(element).count--;
|
|
133
|
+
if (!this._observedElements.get(element).count) {
|
|
134
|
+
this._cleanupObserver(element);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
_cleanupObserver(element) {
|
|
139
|
+
if (this._observedElements.has(element)) {
|
|
140
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
141
|
+
if (observer) {
|
|
142
|
+
observer.unsubscribe();
|
|
81
143
|
}
|
|
144
|
+
stream.complete();
|
|
145
|
+
this._observedElements.delete(element);
|
|
82
146
|
}
|
|
83
147
|
}
|
|
84
148
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
-
type:
|
|
89
|
-
args: [{
|
|
90
|
-
|
|
91
|
-
standalone: true,
|
|
92
|
-
}]
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { etLet: [{
|
|
94
|
-
type: Input
|
|
95
|
-
}] } });
|
|
149
|
+
ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
150
|
+
ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickObserverService, decorators: [{
|
|
152
|
+
type: Injectable,
|
|
153
|
+
args: [{ providedIn: 'root' }]
|
|
154
|
+
}], ctorParameters: function () { return [{ type: ClickObserverFactory }]; } });
|
|
96
155
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._repeatCount = 2;
|
|
156
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
157
|
+
class MutationObserverFactory {
|
|
158
|
+
create(callback) {
|
|
159
|
+
return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
|
|
102
160
|
}
|
|
103
|
-
|
|
104
|
-
|
|
161
|
+
}
|
|
162
|
+
MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
163
|
+
MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: MutationObserverFactory, decorators: [{
|
|
165
|
+
type: Injectable,
|
|
166
|
+
args: [{ providedIn: 'root' }]
|
|
167
|
+
}] });
|
|
168
|
+
class ContentObserverService {
|
|
169
|
+
constructor(_mutationObserverFactory) {
|
|
170
|
+
this._mutationObserverFactory = _mutationObserverFactory;
|
|
171
|
+
this._observedElements = new Map();
|
|
105
172
|
}
|
|
106
|
-
|
|
107
|
-
this.
|
|
173
|
+
ngOnDestroy() {
|
|
174
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
108
175
|
}
|
|
109
|
-
|
|
110
|
-
|
|
176
|
+
observe(elementOrRef) {
|
|
177
|
+
const element = coerceElement(elementOrRef);
|
|
178
|
+
return new Observable((observer) => {
|
|
179
|
+
const stream = this._observeElement(element);
|
|
180
|
+
const subscription = stream.subscribe(observer);
|
|
181
|
+
return () => {
|
|
182
|
+
subscription.unsubscribe();
|
|
183
|
+
this._unobserveElement(element);
|
|
184
|
+
};
|
|
185
|
+
});
|
|
111
186
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
187
|
+
_observeElement(element) {
|
|
188
|
+
if (!this._observedElements.has(element)) {
|
|
189
|
+
const stream = new Subject();
|
|
190
|
+
const observer = this._mutationObserverFactory.create((mutations) => stream.next(mutations));
|
|
191
|
+
if (observer) {
|
|
192
|
+
observer.observe(element, {
|
|
193
|
+
characterData: true,
|
|
194
|
+
childList: true,
|
|
195
|
+
subtree: true,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this._observedElements.get(element).count++;
|
|
202
|
+
}
|
|
203
|
+
return this._observedElements.get(element).stream;
|
|
204
|
+
}
|
|
205
|
+
_unobserveElement(element) {
|
|
206
|
+
if (this._observedElements.has(element)) {
|
|
207
|
+
this._observedElements.get(element).count--;
|
|
208
|
+
if (!this._observedElements.get(element).count) {
|
|
209
|
+
this._cleanupObserver(element);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
_cleanupObserver(element) {
|
|
214
|
+
if (this._observedElements.has(element)) {
|
|
215
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
216
|
+
if (observer) {
|
|
217
|
+
observer.disconnect();
|
|
218
|
+
}
|
|
219
|
+
stream.complete();
|
|
220
|
+
this._observedElements.delete(element);
|
|
115
221
|
}
|
|
116
222
|
}
|
|
117
223
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
-
type:
|
|
122
|
-
args: [{
|
|
123
|
-
|
|
124
|
-
standalone: true,
|
|
125
|
-
}]
|
|
126
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { repeatCount: [{
|
|
127
|
-
type: Input,
|
|
128
|
-
args: ['etRepeat']
|
|
129
|
-
}] } });
|
|
224
|
+
ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
225
|
+
ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ContentObserverService, decorators: [{
|
|
227
|
+
type: Injectable,
|
|
228
|
+
args: [{ providedIn: 'root' }]
|
|
229
|
+
}], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
|
|
130
230
|
|
|
131
|
-
class
|
|
132
|
-
constructor(
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
135
|
-
this._isSm$ = new BehaviorSubject(false);
|
|
136
|
-
this._isMd$ = new BehaviorSubject(false);
|
|
137
|
-
this._isLg$ = new BehaviorSubject(false);
|
|
138
|
-
this._isXl$ = new BehaviorSubject(false);
|
|
139
|
-
this._is2Xl$ = new BehaviorSubject(false);
|
|
140
|
-
this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay());
|
|
141
|
-
this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
|
|
142
|
-
this._observeDefaultBreakpoints();
|
|
231
|
+
class DestroyService {
|
|
232
|
+
constructor() {
|
|
233
|
+
this._destroy$ = new Subject();
|
|
234
|
+
this.destroy$ = this._destroy$.asObservable();
|
|
143
235
|
}
|
|
144
|
-
|
|
145
|
-
|
|
236
|
+
ngOnDestroy() {
|
|
237
|
+
this._destroy$.next(true);
|
|
238
|
+
this._destroy$.unsubscribe();
|
|
146
239
|
}
|
|
147
|
-
|
|
148
|
-
|
|
240
|
+
}
|
|
241
|
+
DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
242
|
+
DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService });
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: DestroyService, decorators: [{
|
|
244
|
+
type: Injectable
|
|
245
|
+
}] });
|
|
246
|
+
|
|
247
|
+
class FocusVisibleService {
|
|
248
|
+
get isFocusVisible() {
|
|
249
|
+
return this._hadKeyboardEvent;
|
|
149
250
|
}
|
|
150
|
-
|
|
151
|
-
|
|
251
|
+
constructor() {
|
|
252
|
+
this._document = inject(DOCUMENT);
|
|
253
|
+
this._hadKeyboardEvent = false;
|
|
254
|
+
this._document.addEventListener('keydown', this.onKeyDown.bind(this), true);
|
|
255
|
+
this._document.addEventListener('mousedown', this.onPointerDown.bind(this), true);
|
|
256
|
+
this._document.addEventListener('pointerdown', this.onPointerDown.bind(this), true);
|
|
257
|
+
this._document.addEventListener('touchstart', this.onPointerDown.bind(this), true);
|
|
152
258
|
}
|
|
153
|
-
|
|
154
|
-
|
|
259
|
+
onKeyDown(e) {
|
|
260
|
+
if (e.metaKey || e.altKey || e.ctrlKey) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
this._hadKeyboardEvent = true;
|
|
155
264
|
}
|
|
156
|
-
|
|
157
|
-
|
|
265
|
+
onPointerDown() {
|
|
266
|
+
this._hadKeyboardEvent = false;
|
|
158
267
|
}
|
|
159
|
-
|
|
160
|
-
|
|
268
|
+
}
|
|
269
|
+
FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
270
|
+
FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: FocusVisibleService, decorators: [{
|
|
272
|
+
type: Injectable,
|
|
273
|
+
args: [{
|
|
274
|
+
providedIn: 'root',
|
|
275
|
+
}]
|
|
276
|
+
}], ctorParameters: function () { return []; } });
|
|
277
|
+
|
|
278
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
279
|
+
class ResizeObserverFactory {
|
|
280
|
+
create(callback) {
|
|
281
|
+
return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
|
|
161
282
|
}
|
|
162
|
-
|
|
163
|
-
|
|
283
|
+
}
|
|
284
|
+
ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
285
|
+
ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverFactory, decorators: [{
|
|
287
|
+
type: Injectable,
|
|
288
|
+
args: [{ providedIn: 'root' }]
|
|
289
|
+
}] });
|
|
290
|
+
class ResizeObserverService {
|
|
291
|
+
constructor(_mutationObserverFactory) {
|
|
292
|
+
this._mutationObserverFactory = _mutationObserverFactory;
|
|
293
|
+
this._observedElements = new Map();
|
|
164
294
|
}
|
|
165
|
-
|
|
166
|
-
|
|
295
|
+
ngOnDestroy() {
|
|
296
|
+
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
167
297
|
}
|
|
168
|
-
|
|
169
|
-
|
|
298
|
+
observe(elementOrRef) {
|
|
299
|
+
const element = coerceElement(elementOrRef);
|
|
300
|
+
return new Observable((observer) => {
|
|
301
|
+
const stream = this._observeElement(element);
|
|
302
|
+
const subscription = stream.subscribe(observer);
|
|
303
|
+
return () => {
|
|
304
|
+
subscription.unsubscribe();
|
|
305
|
+
this._unobserveElement(element);
|
|
306
|
+
};
|
|
307
|
+
});
|
|
170
308
|
}
|
|
171
|
-
|
|
309
|
+
_observeElement(element) {
|
|
310
|
+
if (!this._observedElements.has(element)) {
|
|
311
|
+
const stream = new Subject();
|
|
312
|
+
const observer = this._mutationObserverFactory.create((resizes) => stream.next(resizes));
|
|
313
|
+
if (observer) {
|
|
314
|
+
observer.observe(element);
|
|
315
|
+
}
|
|
316
|
+
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
this._observedElements.get(element).count++;
|
|
320
|
+
}
|
|
321
|
+
return this._observedElements.get(element).stream;
|
|
322
|
+
}
|
|
323
|
+
_unobserveElement(element) {
|
|
324
|
+
if (this._observedElements.has(element)) {
|
|
325
|
+
this._observedElements.get(element).count--;
|
|
326
|
+
if (!this._observedElements.get(element).count) {
|
|
327
|
+
this._cleanupObserver(element);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
_cleanupObserver(element) {
|
|
332
|
+
if (this._observedElements.has(element)) {
|
|
333
|
+
const { observer, stream } = this._observedElements.get(element);
|
|
334
|
+
if (observer) {
|
|
335
|
+
observer.disconnect();
|
|
336
|
+
}
|
|
337
|
+
stream.complete();
|
|
338
|
+
this._observedElements.delete(element);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
343
|
+
ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
345
|
+
type: Injectable,
|
|
346
|
+
args: [{ providedIn: 'root' }]
|
|
347
|
+
}], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
|
|
348
|
+
|
|
349
|
+
const clamp = (value, min = 0, max = 100) => {
|
|
350
|
+
return Math.max(min, Math.min(max, value));
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
354
|
+
/* eslint-disable no-var */
|
|
355
|
+
/**
|
|
356
|
+
* Stolen from klona to avoid adding a dependency
|
|
357
|
+
* https://github.com/lukeed/klona
|
|
358
|
+
*
|
|
359
|
+
* MIT License
|
|
360
|
+
*
|
|
361
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
362
|
+
*
|
|
363
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
364
|
+
*
|
|
365
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
366
|
+
*
|
|
367
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
368
|
+
*/
|
|
369
|
+
const set = (obj, key, val) => {
|
|
370
|
+
if (typeof val.value === 'object')
|
|
371
|
+
val.value = clone(val.value);
|
|
372
|
+
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {
|
|
373
|
+
Object.defineProperty(obj, key, val);
|
|
374
|
+
}
|
|
375
|
+
else
|
|
376
|
+
obj[key] = val.value;
|
|
377
|
+
};
|
|
378
|
+
const clone = (original) => {
|
|
379
|
+
if (typeof original !== 'object')
|
|
380
|
+
return original;
|
|
381
|
+
var _og = original;
|
|
382
|
+
var i = 0, k, list, tmp, str = Object.prototype.toString.call(_og);
|
|
383
|
+
if (str === '[object Object]') {
|
|
384
|
+
tmp = Object.create(_og.__proto__ || null);
|
|
385
|
+
}
|
|
386
|
+
else if (str === '[object Array]') {
|
|
387
|
+
tmp = Array(_og.length);
|
|
388
|
+
}
|
|
389
|
+
else if (str === '[object Set]') {
|
|
390
|
+
tmp = new Set();
|
|
391
|
+
_og.forEach(function (val) {
|
|
392
|
+
tmp.add(clone(val));
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else if (str === '[object Map]') {
|
|
396
|
+
tmp = new Map();
|
|
397
|
+
_og.forEach(function (val, key) {
|
|
398
|
+
tmp.set(clone(key), clone(val));
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
else if (str === '[object Date]') {
|
|
402
|
+
tmp = new Date(+_og);
|
|
403
|
+
}
|
|
404
|
+
else if (str === '[object RegExp]') {
|
|
405
|
+
tmp = new RegExp(_og.source, _og.flags);
|
|
406
|
+
}
|
|
407
|
+
else if (str === '[object DataView]') {
|
|
408
|
+
tmp = new _og.constructor(clone(_og.buffer));
|
|
409
|
+
}
|
|
410
|
+
else if (str === '[object ArrayBuffer]') {
|
|
411
|
+
tmp = _og.slice(0);
|
|
412
|
+
}
|
|
413
|
+
else if (str.slice(-6) === 'Array]') {
|
|
414
|
+
// ArrayBuffer.isView(x)
|
|
415
|
+
// ~> `new` bcuz `Buffer.slice` => ref
|
|
416
|
+
tmp = new _og.constructor(_og);
|
|
417
|
+
}
|
|
418
|
+
if (tmp) {
|
|
419
|
+
for (list = Object.getOwnPropertySymbols(_og); i < list.length; i++) {
|
|
420
|
+
set(tmp, list[i], Object.getOwnPropertyDescriptor(_og, list[i]));
|
|
421
|
+
}
|
|
422
|
+
for (i = 0, list = Object.getOwnPropertyNames(_og); i < list.length; i++) {
|
|
423
|
+
if (Object.hasOwnProperty.call(tmp, (k = list[i])) && tmp[k] === _og[k])
|
|
424
|
+
continue;
|
|
425
|
+
set(tmp, k, Object.getOwnPropertyDescriptor(_og, k));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return tmp || _og;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
const hasCookie = (name) => {
|
|
432
|
+
if (typeof document === 'undefined') {
|
|
433
|
+
return false;
|
|
434
|
+
}
|
|
435
|
+
return document.cookie.split(';').some((c) => {
|
|
436
|
+
return c.trim().startsWith(name + '=');
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
const getCookie = (name) => {
|
|
440
|
+
if (typeof document === 'undefined') {
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
// From https://stackoverflow.com/questions/10730362/get-cookie-by-name
|
|
444
|
+
return ('; ' + document.cookie).split(`; ${name}=`).pop()?.split(';')[0];
|
|
445
|
+
};
|
|
446
|
+
const setCookie = (name, data, expiresInDays = 30, domain = getDomain()) => {
|
|
447
|
+
if (typeof document === 'undefined') {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
const date = new Date();
|
|
451
|
+
date.setTime(date.getTime() + expiresInDays * 24 * 60 * 60 * 1000);
|
|
452
|
+
document.cookie = `${name}=${data}; path=/; expires=${date.toUTCString()}; domain=${domain}; SameSite=Lax;`;
|
|
453
|
+
};
|
|
454
|
+
const deleteCookie = (name, path, domain = getDomain()) => {
|
|
455
|
+
if (hasCookie(name)) {
|
|
456
|
+
document.cookie =
|
|
457
|
+
name +
|
|
458
|
+
'=' +
|
|
459
|
+
(path ? ';path=' + path : '') +
|
|
460
|
+
(domain ? ';domain=' + domain : '') +
|
|
461
|
+
';expires=Thu, 01 Jan 1970 00:00:01 GMT';
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
const getDomain = () => {
|
|
465
|
+
if (typeof navigator === 'undefined') {
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
const hostname = window.location.hostname;
|
|
469
|
+
if (hostname.includes('localhost')) {
|
|
470
|
+
return 'localhost';
|
|
471
|
+
}
|
|
472
|
+
const splitHost = hostname.split('.');
|
|
473
|
+
if (splitHost.length > 2) {
|
|
474
|
+
return `${splitHost[splitHost.length - 2]}.${splitHost[splitHost.length - 1]}`;
|
|
475
|
+
}
|
|
476
|
+
return hostname;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
480
|
+
/* eslint-disable no-var */
|
|
481
|
+
/**
|
|
482
|
+
* Stolen from dequal to avoid adding a dependency
|
|
483
|
+
* https://github.com/lukeed/dequal
|
|
484
|
+
*
|
|
485
|
+
* The MIT License (MIT)
|
|
486
|
+
*
|
|
487
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
488
|
+
*
|
|
489
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
490
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
491
|
+
* in the Software without restriction, including without limitation the rights
|
|
492
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
493
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
494
|
+
* furnished to do so, subject to the following conditions:
|
|
495
|
+
*
|
|
496
|
+
* The above copyright notice and this permission notice shall be included in
|
|
497
|
+
* all copies or substantial portions of the Software.
|
|
498
|
+
*
|
|
499
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
500
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
501
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
502
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
503
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
504
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
505
|
+
* THE SOFTWARE.
|
|
506
|
+
*/
|
|
507
|
+
const has = Object.prototype.hasOwnProperty;
|
|
508
|
+
function find(iter, tar, key) {
|
|
509
|
+
for (key of iter.keys()) {
|
|
510
|
+
if (equal(key, tar))
|
|
511
|
+
return key;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const equal = (foo, bar) => {
|
|
515
|
+
var ctor, len, tmp;
|
|
516
|
+
if (foo === bar)
|
|
517
|
+
return true;
|
|
518
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
|
519
|
+
if (ctor === Date)
|
|
520
|
+
return foo.getTime() === bar.getTime();
|
|
521
|
+
if (ctor === RegExp)
|
|
522
|
+
return foo.toString() === bar.toString();
|
|
523
|
+
if (ctor === Array) {
|
|
524
|
+
if ((len = foo.length) === bar.length) {
|
|
525
|
+
while (len-- && equal(foo[len], bar[len]))
|
|
526
|
+
;
|
|
527
|
+
}
|
|
528
|
+
return len === -1;
|
|
529
|
+
}
|
|
530
|
+
if (ctor === Set) {
|
|
531
|
+
if (foo.size !== bar.size) {
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
for (len of foo) {
|
|
535
|
+
tmp = len;
|
|
536
|
+
if (tmp && typeof tmp === 'object') {
|
|
537
|
+
tmp = find(bar, tmp);
|
|
538
|
+
if (!tmp)
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
if (!bar.has(tmp))
|
|
542
|
+
return false;
|
|
543
|
+
}
|
|
544
|
+
return true;
|
|
545
|
+
}
|
|
546
|
+
if (ctor === Map) {
|
|
547
|
+
if (foo.size !== bar.size) {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
for (len of foo) {
|
|
551
|
+
tmp = len[0];
|
|
552
|
+
if (tmp && typeof tmp === 'object') {
|
|
553
|
+
tmp = find(bar, tmp);
|
|
554
|
+
if (!tmp)
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
if (!equal(len[1], bar.get(tmp))) {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
return true;
|
|
562
|
+
}
|
|
563
|
+
if (ctor === ArrayBuffer) {
|
|
564
|
+
foo = new Uint8Array(foo);
|
|
565
|
+
bar = new Uint8Array(bar);
|
|
566
|
+
}
|
|
567
|
+
else if (ctor === DataView) {
|
|
568
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
569
|
+
while (len-- && foo.getInt8(len) === bar.getInt8(len))
|
|
570
|
+
;
|
|
571
|
+
}
|
|
572
|
+
return len === -1;
|
|
573
|
+
}
|
|
574
|
+
if (ArrayBuffer.isView(foo)) {
|
|
575
|
+
if ((len = foo.byteLength) === bar.byteLength) {
|
|
576
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
577
|
+
//@ts-ignore
|
|
578
|
+
while (len-- && foo[len] === bar[len])
|
|
579
|
+
;
|
|
580
|
+
}
|
|
581
|
+
return len === -1;
|
|
582
|
+
}
|
|
583
|
+
if (!ctor || typeof foo === 'object') {
|
|
584
|
+
len = 0;
|
|
585
|
+
for (ctor in foo) {
|
|
586
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor))
|
|
587
|
+
return false;
|
|
588
|
+
if (!(ctor in bar) || !equal(foo[ctor], bar[ctor]))
|
|
589
|
+
return false;
|
|
590
|
+
}
|
|
591
|
+
return Object.keys(bar).length === len;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return foo !== foo && bar !== bar;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
const isAttributeRenderBinding = (value) => typeof value === 'boolean';
|
|
598
|
+
const isAttributeValueBinding = (value) => typeof value === 'object';
|
|
599
|
+
const createReactiveBindings = (...values) => {
|
|
600
|
+
const rootElementRef = inject(ElementRef);
|
|
601
|
+
const destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
602
|
+
const subscriptions = [];
|
|
603
|
+
const pushedAttributes = [];
|
|
604
|
+
const defaults = {};
|
|
605
|
+
const push = (value) => {
|
|
606
|
+
const { attribute, observable, elementRef } = value;
|
|
607
|
+
const elRef = elementRef || rootElementRef;
|
|
608
|
+
const attributes = Array.isArray(attribute) ? attribute : [attribute];
|
|
609
|
+
pushedAttributes.push(attributes);
|
|
610
|
+
for (const attribute of attributes) {
|
|
611
|
+
if (!defaults[attribute]) {
|
|
612
|
+
defaults[attribute] = elRef.nativeElement.getAttribute(attribute) || undefined;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
const subscription = observable
|
|
616
|
+
.pipe(takeUntil(destroy$), distinctUntilChanged((a, b) => {
|
|
617
|
+
if (isAttributeRenderBinding(a) && isAttributeRenderBinding(b)) {
|
|
618
|
+
return a === b;
|
|
619
|
+
}
|
|
620
|
+
else if (isAttributeValueBinding(a) && isAttributeValueBinding(b)) {
|
|
621
|
+
return a.render === b.render && a.value === b.value;
|
|
622
|
+
}
|
|
623
|
+
return false;
|
|
624
|
+
}))
|
|
625
|
+
.subscribe((value) => {
|
|
626
|
+
const currentAttributes = pushedAttributes.find((s) => s.some((current) => attributes.includes(current))) || [];
|
|
627
|
+
for (const attribute of currentAttributes) {
|
|
628
|
+
const isSingleClassMutation = attribute.startsWith('class.');
|
|
629
|
+
const isMultipleClassMutation = attribute === 'class';
|
|
630
|
+
const render = isAttributeRenderBinding(value) ? value : value.render;
|
|
631
|
+
if (isSingleClassMutation) {
|
|
632
|
+
const className = attribute.replace('class.', '');
|
|
633
|
+
if (!className) {
|
|
634
|
+
continue;
|
|
635
|
+
}
|
|
636
|
+
if (!render) {
|
|
637
|
+
elRef.nativeElement.classList.remove(className);
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
elRef.nativeElement.classList.add(className);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
else if (isMultipleClassMutation) {
|
|
644
|
+
const classes = isAttributeRenderBinding(value) ? '' : `${value.value}`;
|
|
645
|
+
if (!classes) {
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
if (!render) {
|
|
649
|
+
elRef.nativeElement.classList.remove(...classes.split(' '));
|
|
650
|
+
}
|
|
651
|
+
else {
|
|
652
|
+
elRef.nativeElement.classList.add(...classes.split(' '));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
const attributeValue = isAttributeRenderBinding(value) ? true : `${value.value}`;
|
|
657
|
+
if (!attribute) {
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
if (!render) {
|
|
661
|
+
elRef.nativeElement.removeAttribute(attribute);
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
elRef.nativeElement.setAttribute(attribute, `${attributeValue}`);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
subscriptions.push({ attributes, subscription });
|
|
670
|
+
};
|
|
671
|
+
const remove = (...attributes) => {
|
|
672
|
+
for (const attribute of attributes) {
|
|
673
|
+
const sub = subscriptions.find((s) => s.attributes.includes(attribute));
|
|
674
|
+
const attributeStack = pushedAttributes.find((a) => a.includes(attribute));
|
|
675
|
+
if (sub) {
|
|
676
|
+
sub.attributes = sub.attributes.filter((a) => a !== attribute);
|
|
677
|
+
attributeStack?.splice(attributeStack.indexOf(attribute), 1);
|
|
678
|
+
if (sub.attributes.length === 0) {
|
|
679
|
+
sub.subscription.unsubscribe();
|
|
680
|
+
subscriptions.splice(subscriptions.indexOf(sub), 1);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
const reset = () => {
|
|
686
|
+
for (const attribute in defaults) {
|
|
687
|
+
if (defaults[attribute] === undefined) {
|
|
688
|
+
rootElementRef.nativeElement.removeAttribute(attribute);
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
rootElementRef.nativeElement.setAttribute(attribute, defaults[attribute]);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
for (const value of values) {
|
|
696
|
+
push(value);
|
|
697
|
+
}
|
|
698
|
+
return {
|
|
699
|
+
push,
|
|
700
|
+
remove,
|
|
701
|
+
reset,
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
const elementCanScroll = (element) => {
|
|
706
|
+
const { scrollHeight, clientHeight, scrollWidth, clientWidth } = element;
|
|
707
|
+
return scrollHeight > clientHeight || scrollWidth > clientWidth;
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
const provideViewportConfig = (viewportConfig) => {
|
|
711
|
+
return { provide: VIEWPORT_CONFIG, useValue: viewportConfig };
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
const routerDisableScrollTop = (config = {}) => {
|
|
715
|
+
if (!config.asReturnRoute) {
|
|
716
|
+
return {
|
|
717
|
+
disableScrollTop: true,
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
return {
|
|
721
|
+
disableScrollTopAsReturnRoute: true,
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
class RouterStateService {
|
|
725
|
+
get route$() {
|
|
726
|
+
return this._route$.asObservable();
|
|
727
|
+
}
|
|
728
|
+
get state$() {
|
|
729
|
+
return this._state$.asObservable();
|
|
730
|
+
}
|
|
731
|
+
constructor() {
|
|
732
|
+
this._isScrollTopOnNavigationEnabled = false;
|
|
733
|
+
this._router = inject(Router);
|
|
734
|
+
this._route$ = new BehaviorSubject('/');
|
|
735
|
+
this._state$ = new BehaviorSubject({
|
|
736
|
+
title: null,
|
|
737
|
+
fragment: null,
|
|
738
|
+
data: {},
|
|
739
|
+
pathParams: {},
|
|
740
|
+
queryParams: {},
|
|
741
|
+
});
|
|
742
|
+
this._router.events
|
|
743
|
+
.pipe(filter((event) => event instanceof NavigationEnd), distinctUntilChanged((a, b) => a.url === b.url), map((event) => {
|
|
744
|
+
const { url } = event;
|
|
745
|
+
const urlWithoutQueryParams = url.split('?')[0];
|
|
746
|
+
const withoutFragment = urlWithoutQueryParams.split('#')[0];
|
|
747
|
+
return withoutFragment;
|
|
748
|
+
}))
|
|
749
|
+
.subscribe(this._route$);
|
|
750
|
+
this._route$
|
|
751
|
+
.pipe(map(() => {
|
|
752
|
+
let route = this._router.routerState.snapshot.root;
|
|
753
|
+
while (route.firstChild) {
|
|
754
|
+
route = route.firstChild;
|
|
755
|
+
}
|
|
756
|
+
const { data, params, queryParams, title, fragment } = route;
|
|
757
|
+
return {
|
|
758
|
+
data,
|
|
759
|
+
pathParams: params,
|
|
760
|
+
queryParams,
|
|
761
|
+
title: title ?? null,
|
|
762
|
+
fragment,
|
|
763
|
+
};
|
|
764
|
+
}))
|
|
765
|
+
.subscribe(this._state$);
|
|
766
|
+
}
|
|
767
|
+
enableScrollEnhancements(config = {}) {
|
|
768
|
+
if (this._isScrollTopOnNavigationEnabled) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
this._isScrollTopOnNavigationEnabled = true;
|
|
772
|
+
combineLatest([this._state$.pipe(pairwise()), this._route$.pipe(pairwise())])
|
|
773
|
+
.pipe(debounceTime(1))
|
|
774
|
+
.subscribe(([[prevState, currState], [prevRoute, currRoute]]) => {
|
|
775
|
+
const sameUrlNavigation = prevRoute === currRoute && equal(prevState.pathParams, currState.pathParams);
|
|
776
|
+
const didFragmentChange = prevState.fragment !== currState.fragment;
|
|
777
|
+
if (sameUrlNavigation) {
|
|
778
|
+
const allQueryParams = [
|
|
779
|
+
...new Set(Object.keys(prevState.queryParams).concat(Object.keys(currState.queryParams))),
|
|
780
|
+
];
|
|
781
|
+
const changedQueryParams = allQueryParams.filter((key) => currState.queryParams[key] !== prevState.queryParams[key]);
|
|
782
|
+
if (!config.queryParamTriggerList?.length && !didFragmentChange) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
const caseQueryParams = changedQueryParams.some((key) => config.queryParamTriggerList?.includes(key));
|
|
786
|
+
const caseFragment = didFragmentChange && config.fragment?.enabled;
|
|
787
|
+
if (caseQueryParams) {
|
|
788
|
+
(config.scrollElement ?? document.documentElement).scrollTop = 0;
|
|
789
|
+
}
|
|
790
|
+
else if (caseFragment) {
|
|
791
|
+
const fragmentElement = document.getElementById(currState.fragment ?? '');
|
|
792
|
+
if (fragmentElement) {
|
|
793
|
+
fragmentElement.scrollIntoView({ behavior: config.fragment?.smooth ? 'smooth' : 'auto' });
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
if (!(currState.data['disableScrollTopAsReturnRoute'] && prevState.data['disableScrollTop']) &&
|
|
799
|
+
!currState.data['disableScrollTop']) {
|
|
800
|
+
(config.scrollElement ?? document.documentElement).scrollTop = 0;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
selectQueryParam(key) {
|
|
806
|
+
return this._state$.pipe(map((state) => state.queryParams[key]));
|
|
807
|
+
}
|
|
808
|
+
selectPathParam(key) {
|
|
809
|
+
return this._state$.pipe(map((state) => state.pathParams[key]));
|
|
810
|
+
}
|
|
811
|
+
selectData(key) {
|
|
812
|
+
return this._state$.pipe(map((state) => state.data[key]));
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
RouterStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
816
|
+
RouterStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, providedIn: 'root' });
|
|
817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RouterStateService, decorators: [{
|
|
818
|
+
type: Injectable,
|
|
819
|
+
args: [{
|
|
820
|
+
providedIn: 'root',
|
|
821
|
+
}]
|
|
822
|
+
}], ctorParameters: function () { return []; } });
|
|
823
|
+
|
|
824
|
+
class ViewportService {
|
|
825
|
+
get isXs$() {
|
|
826
|
+
return this._isXs$.asObservable();
|
|
827
|
+
}
|
|
828
|
+
get isXs() {
|
|
829
|
+
return this._isXs$.value;
|
|
830
|
+
}
|
|
831
|
+
get isSm$() {
|
|
832
|
+
return this._isSm$.asObservable();
|
|
833
|
+
}
|
|
834
|
+
get isSm() {
|
|
835
|
+
return this._isSm$.value;
|
|
836
|
+
}
|
|
837
|
+
get isMd$() {
|
|
838
|
+
return this._isMd$.asObservable();
|
|
839
|
+
}
|
|
840
|
+
get isMd() {
|
|
841
|
+
return this._isMd$.value;
|
|
842
|
+
}
|
|
843
|
+
get isLg$() {
|
|
844
|
+
return this._isLg$.asObservable();
|
|
845
|
+
}
|
|
846
|
+
get isLg() {
|
|
847
|
+
return this._isLg$.value;
|
|
848
|
+
}
|
|
849
|
+
get isXl$() {
|
|
850
|
+
return this._isXl$.asObservable();
|
|
851
|
+
}
|
|
852
|
+
get isXl() {
|
|
172
853
|
return this._isXl$.value;
|
|
173
854
|
}
|
|
174
855
|
get is2Xl$() {
|
|
@@ -180,6 +861,18 @@ class ViewportService {
|
|
|
180
861
|
get currentViewport() {
|
|
181
862
|
return this.getCurrentViewport([this.isXs, this.isSm, this.isMd, this.isLg, this.isXl, this.is2Xl]);
|
|
182
863
|
}
|
|
864
|
+
constructor(_viewportConfig, _breakpointObserver) {
|
|
865
|
+
this._breakpointObserver = _breakpointObserver;
|
|
866
|
+
this._isXs$ = new BehaviorSubject(false);
|
|
867
|
+
this._isSm$ = new BehaviorSubject(false);
|
|
868
|
+
this._isMd$ = new BehaviorSubject(false);
|
|
869
|
+
this._isLg$ = new BehaviorSubject(false);
|
|
870
|
+
this._isXl$ = new BehaviorSubject(false);
|
|
871
|
+
this._is2Xl$ = new BehaviorSubject(false);
|
|
872
|
+
this.currentViewport$ = combineLatest([this.isXs$, this.isSm$, this.isMd$, this.isLg$, this.isXl$, this.is2Xl$]).pipe(map((val) => this.getCurrentViewport(val)), shareReplay());
|
|
873
|
+
this._viewportConfig = _viewportConfig || DEFAULT_VIEWPORT_CONFIG;
|
|
874
|
+
this._observeDefaultBreakpoints();
|
|
875
|
+
}
|
|
183
876
|
observe(options) {
|
|
184
877
|
const mediaQuery = this._buildMediaQuery(options);
|
|
185
878
|
return this._breakpointObserver.observe(mediaQuery).pipe(map((x) => x.matches), shareReplay());
|
|
@@ -258,8 +951,8 @@ class ViewportService {
|
|
|
258
951
|
return 'xs';
|
|
259
952
|
}
|
|
260
953
|
}
|
|
261
|
-
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
262
|
-
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
954
|
+
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
955
|
+
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, providedIn: 'root' });
|
|
263
956
|
__decorate([
|
|
264
957
|
Memo(),
|
|
265
958
|
__metadata("design:type", Function),
|
|
@@ -276,7 +969,7 @@ __decorate([
|
|
|
276
969
|
__metadata("design:paramtypes", [Object]),
|
|
277
970
|
__metadata("design:returntype", void 0)
|
|
278
971
|
], ViewportService.prototype, "_buildMediaQuery", null);
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ViewportService, decorators: [{
|
|
280
973
|
type: Injectable,
|
|
281
974
|
args: [{
|
|
282
975
|
providedIn: 'root',
|
|
@@ -288,188 +981,234 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
|
|
|
288
981
|
type: Optional
|
|
289
982
|
}] }, { type: i1.BreakpointObserver }]; }, propDecorators: { _getViewportSize: [], _buildMediaQuery: [] } });
|
|
290
983
|
|
|
291
|
-
class
|
|
984
|
+
class ClickOutsideDirective {
|
|
292
985
|
constructor() {
|
|
293
|
-
this.
|
|
294
|
-
this.
|
|
295
|
-
this.
|
|
296
|
-
this.
|
|
297
|
-
this._document.addEventListener('pointerdown', this.onPointerDown.bind(this), true);
|
|
298
|
-
this._document.addEventListener('touchstart', this.onPointerDown.bind(this), true);
|
|
299
|
-
}
|
|
300
|
-
get isFocusVisible() {
|
|
301
|
-
return this._hadKeyboardEvent;
|
|
986
|
+
this._elementRef = inject(ElementRef);
|
|
987
|
+
this._clickObserverService = inject(ClickObserverService);
|
|
988
|
+
this._subscription = null;
|
|
989
|
+
this.etClickOutside = new EventEmitter();
|
|
302
990
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
991
|
+
ngOnInit() {
|
|
992
|
+
setTimeout(() => {
|
|
993
|
+
this._subscription = this._clickObserverService.observe(this._elementRef.nativeElement).subscribe((event) => {
|
|
994
|
+
const activeElement = event.target;
|
|
995
|
+
const isInside = this._elementRef.nativeElement.contains(activeElement);
|
|
996
|
+
if (!isInside) {
|
|
997
|
+
this.etClickOutside.emit(event);
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
});
|
|
308
1001
|
}
|
|
309
|
-
|
|
310
|
-
this.
|
|
1002
|
+
ngOnDestroy() {
|
|
1003
|
+
this._subscription?.unsubscribe();
|
|
311
1004
|
}
|
|
312
1005
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
-
type:
|
|
1006
|
+
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1007
|
+
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
1009
|
+
type: Directive,
|
|
317
1010
|
args: [{
|
|
318
|
-
|
|
1011
|
+
selector: '[etClickOutside]',
|
|
1012
|
+
standalone: true,
|
|
319
1013
|
}]
|
|
320
|
-
}],
|
|
1014
|
+
}], propDecorators: { etClickOutside: [{
|
|
1015
|
+
type: Output
|
|
1016
|
+
}] } });
|
|
321
1017
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
this.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
1018
|
+
const CURSOR_DRAG_SCROLLING_CLASS = 'et-cursor-drag-scroll--scrolling';
|
|
1019
|
+
const CURSOR_DRAG_SCROLLING_PREPARED_CLASS = 'et-cursor-drag-scroll--prepared';
|
|
1020
|
+
|
|
1021
|
+
class CursorDragScrollDirective {
|
|
1022
|
+
constructor() {
|
|
1023
|
+
this._subscriptions = [];
|
|
1024
|
+
this._destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
1025
|
+
this._elementRef = inject(ElementRef);
|
|
1026
|
+
this._contentObserverService = inject(ContentObserverService);
|
|
1027
|
+
this._resizeObserverService = inject(ResizeObserverService);
|
|
1028
|
+
this._bufferUntilScroll = 5;
|
|
1029
|
+
this._mouseUp$ = new Subject();
|
|
1030
|
+
this._isScrolling = false;
|
|
1031
|
+
this._canScroll = false;
|
|
1032
|
+
this._currentScrollState = {
|
|
1033
|
+
top: 0,
|
|
1034
|
+
left: 0,
|
|
1035
|
+
x: 0,
|
|
1036
|
+
y: 0,
|
|
1037
|
+
};
|
|
1038
|
+
this._enabled = false;
|
|
1039
|
+
}
|
|
1040
|
+
get enabled() {
|
|
1041
|
+
return this._enabled;
|
|
1042
|
+
}
|
|
1043
|
+
set enabled(value) {
|
|
1044
|
+
this._enabled = coerceBooleanProperty(value);
|
|
1045
|
+
if (this._enabled) {
|
|
1046
|
+
this._enableCursorDragScroll();
|
|
1047
|
+
}
|
|
1048
|
+
else {
|
|
1049
|
+
this._disableCursorDragScroll();
|
|
1050
|
+
}
|
|
352
1051
|
}
|
|
353
|
-
|
|
354
|
-
if (
|
|
355
|
-
|
|
356
|
-
const observer = this._mutationObserverFactory.create((resizes) => stream.next(resizes));
|
|
357
|
-
if (observer) {
|
|
358
|
-
observer.observe(element);
|
|
359
|
-
}
|
|
360
|
-
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
1052
|
+
ngAfterViewInit() {
|
|
1053
|
+
if (this.enabled) {
|
|
1054
|
+
this._enableCursorDragScroll();
|
|
361
1055
|
}
|
|
362
1056
|
else {
|
|
363
|
-
this.
|
|
1057
|
+
this._disableCursorDragScroll();
|
|
364
1058
|
}
|
|
365
|
-
return this._observedElements.get(element).stream;
|
|
366
1059
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
this.
|
|
370
|
-
|
|
371
|
-
|
|
1060
|
+
_enableCursorDragScroll() {
|
|
1061
|
+
const contentResizeSub = combineLatest([
|
|
1062
|
+
this._contentObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
|
|
1063
|
+
this._resizeObserverService.observe(this._elementRef.nativeElement).pipe(startWith(null)),
|
|
1064
|
+
])
|
|
1065
|
+
.pipe(debounceTime(25), tap(() => this._updateCanScrollState()), takeUntil(this._destroy$))
|
|
1066
|
+
.subscribe();
|
|
1067
|
+
const mousedownSub = fromEvent(this._elementRef.nativeElement, 'mousedown')
|
|
1068
|
+
.pipe(tap((e) => this._onMouseDown(e)), takeUntil(this._destroy$))
|
|
1069
|
+
.subscribe();
|
|
1070
|
+
this._subscriptions.push(contentResizeSub, mousedownSub);
|
|
1071
|
+
this._updateCanScrollState();
|
|
1072
|
+
}
|
|
1073
|
+
_disableCursorDragScroll() {
|
|
1074
|
+
this._subscriptions.forEach((sub) => sub.unsubscribe());
|
|
1075
|
+
this._subscriptions.length = 0;
|
|
1076
|
+
this._elementRef.nativeElement.style.cursor = 'default';
|
|
1077
|
+
}
|
|
1078
|
+
_onMouseDown(e) {
|
|
1079
|
+
if (!this._elementRef?.nativeElement || !this._canScroll) {
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
const element = this._elementRef.nativeElement;
|
|
1083
|
+
element.classList.add(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
|
|
1084
|
+
this._elementRef.nativeElement.style.scrollSnapType = 'none';
|
|
1085
|
+
this._elementRef.nativeElement.style.scrollBehavior = 'unset';
|
|
1086
|
+
this._currentScrollState = {
|
|
1087
|
+
left: this._elementRef.nativeElement.scrollLeft,
|
|
1088
|
+
top: this._elementRef.nativeElement.scrollTop,
|
|
1089
|
+
x: e.clientX,
|
|
1090
|
+
y: e.clientY,
|
|
1091
|
+
};
|
|
1092
|
+
fromEvent(document, 'mousemove')
|
|
1093
|
+
.pipe(tap((e) => this._mouseMoveHandler(e)), takeUntil(this._mouseUp$), takeUntil(this._destroy$))
|
|
1094
|
+
.subscribe();
|
|
1095
|
+
fromEvent(document, 'mouseup')
|
|
1096
|
+
.pipe(tap(() => this._mouseUpHandler()), take(1), takeUntil(this._destroy$))
|
|
1097
|
+
.subscribe();
|
|
1098
|
+
}
|
|
1099
|
+
_mouseMoveHandler(e) {
|
|
1100
|
+
e.preventDefault();
|
|
1101
|
+
if (!this._elementRef?.nativeElement) {
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
const dx = e.clientX - this._currentScrollState.x;
|
|
1105
|
+
const dy = e.clientY - this._currentScrollState.y;
|
|
1106
|
+
if (Math.abs(dx) > this._bufferUntilScroll || Math.abs(dy) > this._bufferUntilScroll) {
|
|
1107
|
+
const element = this._elementRef.nativeElement;
|
|
1108
|
+
if (!this._isScrolling) {
|
|
1109
|
+
this._isScrolling = true;
|
|
1110
|
+
element.style.cursor = 'grabbing';
|
|
1111
|
+
element.classList.add(CURSOR_DRAG_SCROLLING_CLASS);
|
|
1112
|
+
element.scroll({
|
|
1113
|
+
top: this._currentScrollState.top - dy,
|
|
1114
|
+
left: this._currentScrollState.left - dx,
|
|
1115
|
+
behavior: 'smooth',
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
else {
|
|
1119
|
+
element.scrollTop = this._currentScrollState.top - dy;
|
|
1120
|
+
element.scrollLeft = this._currentScrollState.left - dx;
|
|
372
1121
|
}
|
|
373
1122
|
}
|
|
374
1123
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
1124
|
+
_mouseUpHandler() {
|
|
1125
|
+
this._mouseUp$.next(true);
|
|
1126
|
+
this._isScrolling = false;
|
|
1127
|
+
if (!this._elementRef?.nativeElement) {
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
this._elementRef.nativeElement.style.scrollSnapType = '';
|
|
1131
|
+
this._elementRef.nativeElement.style.scrollBehavior = '';
|
|
1132
|
+
this._elementRef.nativeElement.style.cursor = 'grab';
|
|
1133
|
+
this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_CLASS);
|
|
1134
|
+
this._elementRef.nativeElement.classList.remove(CURSOR_DRAG_SCROLLING_PREPARED_CLASS);
|
|
1135
|
+
}
|
|
1136
|
+
_updateCanScrollState() {
|
|
1137
|
+
this._canScroll = elementCanScroll(this._elementRef.nativeElement);
|
|
1138
|
+
if (this._canScroll) {
|
|
1139
|
+
this._elementRef.nativeElement.style.cursor = 'grab';
|
|
1140
|
+
}
|
|
1141
|
+
else {
|
|
1142
|
+
this._elementRef.nativeElement.style.cursor = 'default';
|
|
383
1143
|
}
|
|
384
1144
|
}
|
|
385
1145
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
389
|
-
type:
|
|
390
|
-
args: [{
|
|
391
|
-
|
|
1146
|
+
CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1147
|
+
CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
|
|
1148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
|
|
1149
|
+
type: Directive,
|
|
1150
|
+
args: [{
|
|
1151
|
+
selector: '[etCursorDragScroll]',
|
|
1152
|
+
exportAs: 'etCursorDragScroll',
|
|
1153
|
+
standalone: true,
|
|
1154
|
+
providers: [DestroyService],
|
|
1155
|
+
}]
|
|
1156
|
+
}], propDecorators: { enabled: [{
|
|
1157
|
+
type: Input,
|
|
1158
|
+
args: ['etCursorDragScroll']
|
|
1159
|
+
}] } });
|
|
392
1160
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
1161
|
+
class LetContext {
|
|
1162
|
+
constructor() {
|
|
1163
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1164
|
+
this.$implicit = null;
|
|
1165
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1166
|
+
this.etLet = null;
|
|
397
1167
|
}
|
|
398
1168
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}] });
|
|
405
|
-
class ContentObserverService {
|
|
406
|
-
constructor(_mutationObserverFactory) {
|
|
407
|
-
this._mutationObserverFactory = _mutationObserverFactory;
|
|
408
|
-
this._observedElements = new Map();
|
|
409
|
-
}
|
|
410
|
-
ngOnDestroy() {
|
|
411
|
-
this._observedElements.forEach((_, element) => this._cleanupObserver(element));
|
|
412
|
-
}
|
|
413
|
-
observe(elementOrRef) {
|
|
414
|
-
const element = coerceElement(elementOrRef);
|
|
415
|
-
return new Observable((observer) => {
|
|
416
|
-
const stream = this._observeElement(element);
|
|
417
|
-
const subscription = stream.subscribe(observer);
|
|
418
|
-
return () => {
|
|
419
|
-
subscription.unsubscribe();
|
|
420
|
-
this._unobserveElement(element);
|
|
421
|
-
};
|
|
422
|
-
});
|
|
1169
|
+
|
|
1170
|
+
class LetDirective {
|
|
1171
|
+
set etLet(value) {
|
|
1172
|
+
this._context.$implicit = this._context.etLet = value;
|
|
1173
|
+
this._updateView();
|
|
423
1174
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
characterData: true,
|
|
431
|
-
childList: true,
|
|
432
|
-
subtree: true,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
this._observedElements.set(element, { observer, stream, count: 1 });
|
|
436
|
-
}
|
|
437
|
-
else {
|
|
438
|
-
this._observedElements.get(element).count++;
|
|
439
|
-
}
|
|
440
|
-
return this._observedElements.get(element).stream;
|
|
1175
|
+
constructor(_viewContainer, templateRef) {
|
|
1176
|
+
this._viewContainer = _viewContainer;
|
|
1177
|
+
this._context = new LetContext();
|
|
1178
|
+
this._templateRef = null;
|
|
1179
|
+
this._viewRef = null;
|
|
1180
|
+
this._templateRef = templateRef;
|
|
441
1181
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (!this._observedElements.get(element).count) {
|
|
446
|
-
this._cleanupObserver(element);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
1182
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1183
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
1184
|
+
return true;
|
|
449
1185
|
}
|
|
450
|
-
|
|
451
|
-
if (this.
|
|
452
|
-
|
|
453
|
-
if (
|
|
454
|
-
|
|
1186
|
+
_updateView() {
|
|
1187
|
+
if (!this._viewRef) {
|
|
1188
|
+
this._viewContainer.clear();
|
|
1189
|
+
if (this._templateRef) {
|
|
1190
|
+
this._viewRef = this._viewContainer.createEmbeddedView(this._templateRef, this._context);
|
|
455
1191
|
}
|
|
456
|
-
stream.complete();
|
|
457
|
-
this._observedElements.delete(element);
|
|
458
1192
|
}
|
|
459
1193
|
}
|
|
460
1194
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
464
|
-
type:
|
|
465
|
-
args: [{
|
|
466
|
-
|
|
1195
|
+
LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1196
|
+
LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
|
|
1197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: LetDirective, decorators: [{
|
|
1198
|
+
type: Directive,
|
|
1199
|
+
args: [{
|
|
1200
|
+
selector: '[etLet]',
|
|
1201
|
+
standalone: true,
|
|
1202
|
+
}]
|
|
1203
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { etLet: [{
|
|
1204
|
+
type: Input
|
|
1205
|
+
}] } });
|
|
467
1206
|
|
|
468
|
-
class
|
|
469
|
-
constructor(
|
|
470
|
-
this._contentObserver =
|
|
471
|
-
this._elementRef =
|
|
472
|
-
this._ngZone =
|
|
1207
|
+
class ObserveContentDirective {
|
|
1208
|
+
constructor() {
|
|
1209
|
+
this._contentObserver = inject(ContentObserverService);
|
|
1210
|
+
this._elementRef = inject(ElementRef);
|
|
1211
|
+
this._ngZone = inject(NgZone);
|
|
473
1212
|
this.event = new EventEmitter();
|
|
474
1213
|
this._disabled = false;
|
|
475
1214
|
this._debounce = null;
|
|
@@ -501,38 +1240,38 @@ class ObserveResizeDirective {
|
|
|
501
1240
|
this._unsubscribe();
|
|
502
1241
|
const stream = this._contentObserver.observe(this._elementRef);
|
|
503
1242
|
this._ngZone.runOutsideAngular(() => {
|
|
504
|
-
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);
|
|
1243
|
+
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime$1(this.debounce)) : stream).subscribe(this.event);
|
|
505
1244
|
});
|
|
506
1245
|
}
|
|
507
1246
|
_unsubscribe() {
|
|
508
1247
|
this._currentSubscription?.unsubscribe();
|
|
509
1248
|
}
|
|
510
1249
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1250
|
+
ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1251
|
+
ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { event: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveContentDirective, decorators: [{
|
|
514
1253
|
type: Directive,
|
|
515
1254
|
args: [{
|
|
516
|
-
selector: '[
|
|
517
|
-
exportAs: '
|
|
1255
|
+
selector: '[etObserveContent]',
|
|
1256
|
+
exportAs: 'etObserveContent',
|
|
518
1257
|
standalone: true,
|
|
519
1258
|
}]
|
|
520
|
-
}],
|
|
1259
|
+
}], propDecorators: { event: [{
|
|
521
1260
|
type: Output,
|
|
522
|
-
args: ['
|
|
1261
|
+
args: ['etObserveContent']
|
|
523
1262
|
}], disabled: [{
|
|
524
1263
|
type: Input,
|
|
525
|
-
args: ['
|
|
1264
|
+
args: ['etObserveContentDisabled']
|
|
526
1265
|
}], debounce: [{
|
|
527
1266
|
type: Input,
|
|
528
|
-
args: ['
|
|
1267
|
+
args: ['etObserveContentDebounce']
|
|
529
1268
|
}] } });
|
|
530
1269
|
|
|
531
|
-
class
|
|
532
|
-
constructor(
|
|
533
|
-
this.
|
|
534
|
-
this._elementRef =
|
|
535
|
-
this._ngZone =
|
|
1270
|
+
class ObserveResizeDirective {
|
|
1271
|
+
constructor() {
|
|
1272
|
+
this._resizeObserver = inject(ResizeObserverService);
|
|
1273
|
+
this._elementRef = inject(ElementRef);
|
|
1274
|
+
this._ngZone = inject(NgZone);
|
|
536
1275
|
this.event = new EventEmitter();
|
|
537
1276
|
this._disabled = false;
|
|
538
1277
|
this._debounce = null;
|
|
@@ -562,34 +1301,797 @@ class ObserveContentDirective {
|
|
|
562
1301
|
}
|
|
563
1302
|
_subscribe() {
|
|
564
1303
|
this._unsubscribe();
|
|
565
|
-
const stream = this.
|
|
1304
|
+
const stream = this._resizeObserver.observe(this._elementRef);
|
|
566
1305
|
this._ngZone.runOutsideAngular(() => {
|
|
567
|
-
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime
|
|
1306
|
+
this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);
|
|
568
1307
|
});
|
|
569
1308
|
}
|
|
570
1309
|
_unsubscribe() {
|
|
571
1310
|
this._currentSubscription?.unsubscribe();
|
|
572
1311
|
}
|
|
573
1312
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1313
|
+
ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1314
|
+
ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { event: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveResizeDirective, decorators: [{
|
|
577
1316
|
type: Directive,
|
|
578
1317
|
args: [{
|
|
579
|
-
selector: '[
|
|
580
|
-
exportAs: '
|
|
1318
|
+
selector: '[etObserveResize]',
|
|
1319
|
+
exportAs: 'etObserveResize',
|
|
1320
|
+
standalone: true,
|
|
581
1321
|
}]
|
|
582
|
-
}],
|
|
1322
|
+
}], propDecorators: { event: [{
|
|
583
1323
|
type: Output,
|
|
584
|
-
args: ['
|
|
1324
|
+
args: ['etObserveResize']
|
|
585
1325
|
}], disabled: [{
|
|
586
1326
|
type: Input,
|
|
587
|
-
args: ['
|
|
1327
|
+
args: ['etObserveResizeDisabled']
|
|
588
1328
|
}], debounce: [{
|
|
589
1329
|
type: Input,
|
|
590
|
-
args: ['
|
|
1330
|
+
args: ['etObserveResizeDebounce']
|
|
1331
|
+
}] } });
|
|
1332
|
+
|
|
1333
|
+
const SCROLL_OBSERVER_FIRST_ELEMENT_CLASS = 'et-scroll-observer-first-element';
|
|
1334
|
+
class ScrollObserverFirstElementDirective {
|
|
1335
|
+
constructor() {
|
|
1336
|
+
this._isFirstElement = false;
|
|
1337
|
+
}
|
|
1338
|
+
get isFirstElement() {
|
|
1339
|
+
return this._isFirstElement;
|
|
1340
|
+
}
|
|
1341
|
+
set isFirstElement(value) {
|
|
1342
|
+
this._isFirstElement = coerceBooleanProperty(value);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1346
|
+
ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
|
|
1347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
|
|
1348
|
+
type: Directive,
|
|
1349
|
+
args: [{
|
|
1350
|
+
selector: '[etScrollObserverFirstElement]',
|
|
1351
|
+
standalone: true,
|
|
1352
|
+
}]
|
|
1353
|
+
}], propDecorators: { isFirstElement: [{
|
|
1354
|
+
type: Input,
|
|
1355
|
+
args: ['etScrollObserverFirstElement']
|
|
1356
|
+
}, {
|
|
1357
|
+
type: HostBinding,
|
|
1358
|
+
args: [`class.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`]
|
|
1359
|
+
}] } });
|
|
1360
|
+
|
|
1361
|
+
const SCROLL_OBSERVER_IGNORE_TARGET_CLASS = 'et-scroll-observer-ignore-target';
|
|
1362
|
+
class ScrollObserverIgnoreTargetDirective {
|
|
1363
|
+
}
|
|
1364
|
+
ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1365
|
+
ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
|
|
1366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
|
|
1367
|
+
type: Directive,
|
|
1368
|
+
args: [{
|
|
1369
|
+
selector: '[etScrollObserverIgnoreTarget]',
|
|
1370
|
+
standalone: true,
|
|
1371
|
+
host: {
|
|
1372
|
+
class: SCROLL_OBSERVER_IGNORE_TARGET_CLASS,
|
|
1373
|
+
},
|
|
1374
|
+
}]
|
|
1375
|
+
}] });
|
|
1376
|
+
|
|
1377
|
+
const SCROLL_OBSERVER_LAST_ELEMENT_CLASS = 'et-scroll-observer-last-element';
|
|
1378
|
+
class ScrollObserverLastElementDirective {
|
|
1379
|
+
constructor() {
|
|
1380
|
+
this._isLastElement = false;
|
|
1381
|
+
}
|
|
1382
|
+
get isLastElement() {
|
|
1383
|
+
return this._isLastElement;
|
|
1384
|
+
}
|
|
1385
|
+
set isLastElement(value) {
|
|
1386
|
+
this._isLastElement = coerceBooleanProperty(value);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1390
|
+
ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", 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 });
|
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
|
|
1392
|
+
type: Directive,
|
|
1393
|
+
args: [{
|
|
1394
|
+
selector: '[etScrollObserverLastElement]',
|
|
1395
|
+
standalone: true,
|
|
1396
|
+
host: {
|
|
1397
|
+
class: SCROLL_OBSERVER_LAST_ELEMENT_CLASS,
|
|
1398
|
+
},
|
|
1399
|
+
}]
|
|
1400
|
+
}], propDecorators: { isLastElement: [{
|
|
1401
|
+
type: Input,
|
|
1402
|
+
args: ['etScrollObserverLastElement']
|
|
1403
|
+
}, {
|
|
1404
|
+
type: HostBinding,
|
|
1405
|
+
args: [`class.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`]
|
|
1406
|
+
}] } });
|
|
1407
|
+
|
|
1408
|
+
const OBSERVE_SCROLL_STATE = new InjectionToken('OBSERVE_SCROLL_STATE');
|
|
1409
|
+
|
|
1410
|
+
class ObserveScrollStateDirective {
|
|
1411
|
+
constructor() {
|
|
1412
|
+
this._destroy$ = inject(DestroyService, { host: true }).destroy$;
|
|
1413
|
+
this._elementRef = inject(ElementRef);
|
|
1414
|
+
this._contentObserverService = inject(ContentObserverService);
|
|
1415
|
+
this._resizeObserverService = inject(ResizeObserverService);
|
|
1416
|
+
this._observedChildren = {
|
|
1417
|
+
first: this._firstCurrentChild,
|
|
1418
|
+
last: this._lastCurrentChild,
|
|
1419
|
+
};
|
|
1420
|
+
this._rootMargin = 0;
|
|
1421
|
+
this._threshold = 1;
|
|
1422
|
+
this._intersectionObserver = null;
|
|
1423
|
+
this.etObserveScrollState = new EventEmitter();
|
|
1424
|
+
}
|
|
1425
|
+
get _firstCurrentChild() {
|
|
1426
|
+
const explicitFirstElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_FIRST_ELEMENT_CLASS}`);
|
|
1427
|
+
if (explicitFirstElement) {
|
|
1428
|
+
return explicitFirstElement;
|
|
1429
|
+
}
|
|
1430
|
+
const element = this._elementRef.nativeElement.children[0];
|
|
1431
|
+
return this._getNonIgnoredChild(element, 'next');
|
|
1432
|
+
}
|
|
1433
|
+
get _lastCurrentChild() {
|
|
1434
|
+
const explicitLastElement = this._elementRef.nativeElement.querySelector(`.${SCROLL_OBSERVER_LAST_ELEMENT_CLASS}`);
|
|
1435
|
+
if (explicitLastElement) {
|
|
1436
|
+
return explicitLastElement;
|
|
1437
|
+
}
|
|
1438
|
+
const element = this._elementRef.nativeElement.children[this._elementRef.nativeElement.children.length - 1];
|
|
1439
|
+
return this._getNonIgnoredChild(element, 'previous');
|
|
1440
|
+
}
|
|
1441
|
+
get observerRootMargin() {
|
|
1442
|
+
return this._rootMargin;
|
|
1443
|
+
}
|
|
1444
|
+
set observerRootMargin(value) {
|
|
1445
|
+
this._rootMargin = coerceNumberProperty(value);
|
|
1446
|
+
}
|
|
1447
|
+
get observerThreshold() {
|
|
1448
|
+
return this._threshold;
|
|
1449
|
+
}
|
|
1450
|
+
set observerThreshold(value) {
|
|
1451
|
+
this._threshold = coerceNumberProperty(value);
|
|
1452
|
+
}
|
|
1453
|
+
ngOnInit() {
|
|
1454
|
+
this._contentObserverService
|
|
1455
|
+
.observe(this._elementRef.nativeElement)
|
|
1456
|
+
.pipe(tap(() => this._checkChildren()), takeUntil(this._destroy$))
|
|
1457
|
+
.subscribe();
|
|
1458
|
+
this._resizeObserverService
|
|
1459
|
+
.observe(this._elementRef.nativeElement)
|
|
1460
|
+
.pipe(debounceTime(25), tap(() => {
|
|
1461
|
+
const canScroll = elementCanScroll(this._elementRef.nativeElement);
|
|
1462
|
+
if ((!this._intersectionObserver && canScroll) || (this._intersectionObserver && !canScroll)) {
|
|
1463
|
+
this._checkChildren();
|
|
1464
|
+
}
|
|
1465
|
+
}), takeUntil(this._destroy$))
|
|
1466
|
+
.subscribe();
|
|
1467
|
+
this._checkChildren();
|
|
1468
|
+
}
|
|
1469
|
+
ngOnDestroy() {
|
|
1470
|
+
this._clearIntersectionObserver();
|
|
1471
|
+
}
|
|
1472
|
+
_checkChildren() {
|
|
1473
|
+
this._clearIntersectionObserver();
|
|
1474
|
+
if (this._firstCurrentChild === this._lastCurrentChild ||
|
|
1475
|
+
!this._firstCurrentChild ||
|
|
1476
|
+
!this._lastCurrentChild ||
|
|
1477
|
+
!elementCanScroll(this._elementRef.nativeElement)) {
|
|
1478
|
+
this._unobserveChild('first');
|
|
1479
|
+
this._unobserveChild('last');
|
|
1480
|
+
this.etObserveScrollState.emit({
|
|
1481
|
+
isAtStart: true,
|
|
1482
|
+
isAtEnd: true,
|
|
1483
|
+
canScroll: false,
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
else {
|
|
1487
|
+
this._intersectionObserver = this._initiateIntersectionObserver();
|
|
1488
|
+
this._observeChild('first', this._firstCurrentChild);
|
|
1489
|
+
this._observeChild('last', this._lastCurrentChild);
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
_initiateIntersectionObserver() {
|
|
1493
|
+
const observer = new IntersectionObserver((entries) => {
|
|
1494
|
+
const { first, last } = this._observedChildren;
|
|
1495
|
+
const isAtStart = entries.find((entry) => entry.target === first)?.isIntersecting ?? false;
|
|
1496
|
+
const isAtEnd = entries.find((entry) => entry.target === last)?.isIntersecting ?? false;
|
|
1497
|
+
this.etObserveScrollState.emit({
|
|
1498
|
+
isAtStart,
|
|
1499
|
+
isAtEnd,
|
|
1500
|
+
canScroll: !isAtStart || !isAtEnd,
|
|
1501
|
+
});
|
|
1502
|
+
}, {
|
|
1503
|
+
root: this._elementRef.nativeElement,
|
|
1504
|
+
rootMargin: `${this._rootMargin}px`,
|
|
1505
|
+
threshold: this._threshold,
|
|
1506
|
+
});
|
|
1507
|
+
return observer;
|
|
1508
|
+
}
|
|
1509
|
+
_observeChild(child, element) {
|
|
1510
|
+
this._intersectionObserver?.observe(element);
|
|
1511
|
+
this._observedChildren[child] = element;
|
|
1512
|
+
element.classList.add(`et-scroll-observer-observing-${child}-element`);
|
|
1513
|
+
}
|
|
1514
|
+
_unobserveChild(child) {
|
|
1515
|
+
const observedChild = this._observedChildren[child];
|
|
1516
|
+
if (!observedChild) {
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
observedChild.classList.remove('et-scroll-observer-observing-first-element', 'et-scroll-observer-observing-last-element');
|
|
1520
|
+
this._intersectionObserver?.unobserve(observedChild);
|
|
1521
|
+
this._observedChildren[child] = null;
|
|
1522
|
+
}
|
|
1523
|
+
_clearIntersectionObserver() {
|
|
1524
|
+
this._intersectionObserver?.disconnect();
|
|
1525
|
+
this._intersectionObserver = null;
|
|
1526
|
+
}
|
|
1527
|
+
_getNonIgnoredChild(element, direction) {
|
|
1528
|
+
if (!element) {
|
|
1529
|
+
return null;
|
|
1530
|
+
}
|
|
1531
|
+
if (element?.classList.contains(SCROLL_OBSERVER_IGNORE_TARGET_CLASS)) {
|
|
1532
|
+
const nextElement = element[`${direction}ElementSibling`];
|
|
1533
|
+
if (!nextElement) {
|
|
1534
|
+
return null;
|
|
1535
|
+
}
|
|
1536
|
+
return this._getNonIgnoredChild(nextElement, direction);
|
|
1537
|
+
}
|
|
1538
|
+
return element;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1542
|
+
ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { etObserveScrollState: "etObserveScrollState" }, providers: [
|
|
1543
|
+
{
|
|
1544
|
+
provide: OBSERVE_SCROLL_STATE,
|
|
1545
|
+
useExisting: ObserveScrollStateDirective,
|
|
1546
|
+
},
|
|
1547
|
+
DestroyService,
|
|
1548
|
+
], exportAs: ["etObserveScrollState"], ngImport: i0 });
|
|
1549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
|
|
1550
|
+
type: Directive,
|
|
1551
|
+
args: [{
|
|
1552
|
+
selector: '[etObserveScrollState]',
|
|
1553
|
+
exportAs: 'etObserveScrollState',
|
|
1554
|
+
standalone: true,
|
|
1555
|
+
providers: [
|
|
1556
|
+
{
|
|
1557
|
+
provide: OBSERVE_SCROLL_STATE,
|
|
1558
|
+
useExisting: ObserveScrollStateDirective,
|
|
1559
|
+
},
|
|
1560
|
+
DestroyService,
|
|
1561
|
+
],
|
|
1562
|
+
}]
|
|
1563
|
+
}], propDecorators: { observerRootMargin: [{
|
|
1564
|
+
type: Input
|
|
1565
|
+
}], observerThreshold: [{
|
|
1566
|
+
type: Input
|
|
1567
|
+
}], etObserveScrollState: [{
|
|
1568
|
+
type: Output
|
|
591
1569
|
}] } });
|
|
592
1570
|
|
|
1571
|
+
class RepeatDirective {
|
|
1572
|
+
get repeatCount() {
|
|
1573
|
+
return this._repeatCount;
|
|
1574
|
+
}
|
|
1575
|
+
set repeatCount(value) {
|
|
1576
|
+
this._repeatCount = coerceNumberProperty(value);
|
|
1577
|
+
this._render();
|
|
1578
|
+
}
|
|
1579
|
+
constructor(_mainTemplateRef, _viewContainerRef) {
|
|
1580
|
+
this._mainTemplateRef = _mainTemplateRef;
|
|
1581
|
+
this._viewContainerRef = _viewContainerRef;
|
|
1582
|
+
this._repeatCount = 2;
|
|
1583
|
+
}
|
|
1584
|
+
_render() {
|
|
1585
|
+
this._viewContainerRef.clear();
|
|
1586
|
+
for (let i = 0; i < this.repeatCount; i++) {
|
|
1587
|
+
this._viewContainerRef.createEmbeddedView(this._mainTemplateRef);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1592
|
+
RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
|
|
1593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: RepeatDirective, decorators: [{
|
|
1594
|
+
type: Directive,
|
|
1595
|
+
args: [{
|
|
1596
|
+
selector: '[etRepeat]',
|
|
1597
|
+
standalone: true,
|
|
1598
|
+
}]
|
|
1599
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { repeatCount: [{
|
|
1600
|
+
type: Input,
|
|
1601
|
+
args: ['etRepeat']
|
|
1602
|
+
}] } });
|
|
1603
|
+
|
|
1604
|
+
const SEO_DIRECTIVE_TOKEN = new InjectionToken('SEO_DIRECTIVE_TOKEN');
|
|
1605
|
+
|
|
1606
|
+
const mergeSeoConfig = (config, parentConfig) => {
|
|
1607
|
+
return {
|
|
1608
|
+
...parentConfig,
|
|
1609
|
+
...config,
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
class SeoDirective {
|
|
1614
|
+
constructor() {
|
|
1615
|
+
this._metaService = inject(Meta);
|
|
1616
|
+
this._titleService = inject(Title);
|
|
1617
|
+
this._onDeactivate$ = new Subject();
|
|
1618
|
+
this._isDeactivated = false;
|
|
1619
|
+
this.parent = inject(SEO_DIRECTIVE_TOKEN, { optional: true, skipSelf: true });
|
|
1620
|
+
this._config = {};
|
|
1621
|
+
}
|
|
1622
|
+
get config() {
|
|
1623
|
+
return this._config;
|
|
1624
|
+
}
|
|
1625
|
+
ngOnInit() {
|
|
1626
|
+
this.parent?._deactivate();
|
|
1627
|
+
}
|
|
1628
|
+
ngOnDestroy() {
|
|
1629
|
+
this._deactivate();
|
|
1630
|
+
this._cleanUp();
|
|
1631
|
+
this.parent?._activate();
|
|
1632
|
+
}
|
|
1633
|
+
// TODO(TRB): This should get split up into multiple methods to make it more readable
|
|
1634
|
+
// - updateTitle
|
|
1635
|
+
// - updateMeta
|
|
1636
|
+
// - updateLink
|
|
1637
|
+
updateConfig(config) {
|
|
1638
|
+
this._config = mergeSeoConfig(config, this.parent?.config || {});
|
|
1639
|
+
if (this._isDeactivated) {
|
|
1640
|
+
return;
|
|
1641
|
+
}
|
|
1642
|
+
this._deactivate();
|
|
1643
|
+
this._activate();
|
|
1644
|
+
}
|
|
1645
|
+
_activate() {
|
|
1646
|
+
this._onDeactivate$.next(false);
|
|
1647
|
+
this._isDeactivated = false;
|
|
1648
|
+
for (const [key, value] of Object.entries(this._config)) {
|
|
1649
|
+
if (value instanceof Observable) {
|
|
1650
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1651
|
+
}
|
|
1652
|
+
else if (Array.isArray(value)) {
|
|
1653
|
+
value.forEach((value) => {
|
|
1654
|
+
if (value instanceof Observable) {
|
|
1655
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1656
|
+
}
|
|
1657
|
+
else {
|
|
1658
|
+
this._update(key, value);
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
else if (typeof value === 'object' && value !== null) {
|
|
1663
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
1664
|
+
if (subValue instanceof Observable) {
|
|
1665
|
+
subValue.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(`${key}:${subKey}`, value));
|
|
1666
|
+
}
|
|
1667
|
+
else {
|
|
1668
|
+
this._update(`${key}:${subKey}`, subValue);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
this._update(key, value);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
_deactivate() {
|
|
1678
|
+
this._onDeactivate$.next(true);
|
|
1679
|
+
this._isDeactivated = true;
|
|
1680
|
+
}
|
|
1681
|
+
_update(key, value) {
|
|
1682
|
+
switch (key) {
|
|
1683
|
+
case 'title':
|
|
1684
|
+
if (value && typeof value === 'string') {
|
|
1685
|
+
this._titleService.setTitle(value);
|
|
1686
|
+
}
|
|
1687
|
+
break;
|
|
1688
|
+
case 'canonical':
|
|
1689
|
+
{
|
|
1690
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1691
|
+
if (link) {
|
|
1692
|
+
link.setAttribute('href', value);
|
|
1693
|
+
}
|
|
1694
|
+
else {
|
|
1695
|
+
const newLink = document.createElement('link');
|
|
1696
|
+
newLink.setAttribute('rel', key);
|
|
1697
|
+
newLink.setAttribute('href', value);
|
|
1698
|
+
document.head.appendChild(newLink);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
break;
|
|
1702
|
+
case 'alternate':
|
|
1703
|
+
{
|
|
1704
|
+
const link = document.querySelector(`link[rel="${key}"][hreflang="${value.hreflang}"]`);
|
|
1705
|
+
if (link) {
|
|
1706
|
+
link.setAttribute('href', value.href);
|
|
1707
|
+
}
|
|
1708
|
+
else {
|
|
1709
|
+
const newLink = document.createElement('link');
|
|
1710
|
+
newLink.setAttribute('rel', key);
|
|
1711
|
+
newLink.setAttribute('hreflang', value.hreflang);
|
|
1712
|
+
newLink.setAttribute('href', value.href);
|
|
1713
|
+
document.head.appendChild(newLink);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
break;
|
|
1717
|
+
default:
|
|
1718
|
+
if (value !== undefined && value !== null) {
|
|
1719
|
+
const val = Array.isArray(value) ? value.join(', ') : value;
|
|
1720
|
+
this._metaService.updateTag({ name: key, content: val });
|
|
1721
|
+
}
|
|
1722
|
+
else {
|
|
1723
|
+
this._metaService.removeTag(`name="${key}"`);
|
|
1724
|
+
}
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
_cleanUp() {
|
|
1729
|
+
for (const key in this._config) {
|
|
1730
|
+
if (key === 'alternate') {
|
|
1731
|
+
const links = document.querySelectorAll(`link[rel="${key}"]`);
|
|
1732
|
+
links.forEach((link) => {
|
|
1733
|
+
link.remove();
|
|
1734
|
+
});
|
|
1735
|
+
continue;
|
|
1736
|
+
}
|
|
1737
|
+
if (key === 'canonical') {
|
|
1738
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1739
|
+
if (link) {
|
|
1740
|
+
link.remove();
|
|
1741
|
+
}
|
|
1742
|
+
continue;
|
|
1743
|
+
}
|
|
1744
|
+
if (typeof this._config[key] === 'object' &&
|
|
1745
|
+
this._config[key] !== null &&
|
|
1746
|
+
!(this._config[key] instanceof Observable)) {
|
|
1747
|
+
for (const subKey in this._config[key]) {
|
|
1748
|
+
const parentValue = this.parent?.config?.[key]?.[subKey];
|
|
1749
|
+
if (parentValue === undefined) {
|
|
1750
|
+
this._update(`${key}:${subKey}`, undefined);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
else {
|
|
1755
|
+
const parentValue = this.parent?.config?.[key];
|
|
1756
|
+
if (parentValue === undefined) {
|
|
1757
|
+
this._update(key, null);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
SeoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: SeoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1764
|
+
SeoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: SeoDirective, isStandalone: true, providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }], ngImport: i0 });
|
|
1765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: SeoDirective, decorators: [{
|
|
1766
|
+
type: Directive,
|
|
1767
|
+
args: [{
|
|
1768
|
+
standalone: true,
|
|
1769
|
+
providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }],
|
|
1770
|
+
}]
|
|
1771
|
+
}] });
|
|
1772
|
+
|
|
1773
|
+
// TODO(TRB): Add correct type once provided by API
|
|
1774
|
+
const normalizeGameResultType = (type) => {
|
|
1775
|
+
if (!type) {
|
|
1776
|
+
return null;
|
|
1777
|
+
}
|
|
1778
|
+
switch (type) {
|
|
1779
|
+
case 'extra_time':
|
|
1780
|
+
return {
|
|
1781
|
+
i18n: 'game-result-type.extra-time',
|
|
1782
|
+
shortCode: 'AET',
|
|
1783
|
+
text: 'After Extra Time',
|
|
1784
|
+
};
|
|
1785
|
+
case 'penalty':
|
|
1786
|
+
return {
|
|
1787
|
+
i18n: 'game-result-type.penalty',
|
|
1788
|
+
shortCode: 'PSO',
|
|
1789
|
+
text: 'Penalty shootout',
|
|
1790
|
+
};
|
|
1791
|
+
case 'golden_goal':
|
|
1792
|
+
return {
|
|
1793
|
+
i18n: 'game-result-type.golden-goal',
|
|
1794
|
+
shortCode: 'GG',
|
|
1795
|
+
text: 'Golden Goal',
|
|
1796
|
+
};
|
|
1797
|
+
case 'default':
|
|
1798
|
+
default:
|
|
1799
|
+
return {
|
|
1800
|
+
i18n: 'game-result-type.full-time',
|
|
1801
|
+
shortCode: 'FT',
|
|
1802
|
+
text: 'Full Time',
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
class NormalizeGameResultTypePipe {
|
|
1808
|
+
constructor() {
|
|
1809
|
+
this.transform = normalizeGameResultType;
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
NormalizeGameResultTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1813
|
+
NormalizeGameResultTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, isStandalone: true, name: "etNormalizeGameResultType" });
|
|
1814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeGameResultTypePipe, decorators: [{
|
|
1815
|
+
type: Pipe,
|
|
1816
|
+
args: [{ name: 'etNormalizeGameResultType', standalone: true }]
|
|
1817
|
+
}] });
|
|
1818
|
+
|
|
1819
|
+
const normalizeMatchState = (match) => {
|
|
1820
|
+
if (match?.isCompletedByReferee) {
|
|
1821
|
+
return "autoWin" /* MatchStateType.AUTO_WIN */;
|
|
1822
|
+
}
|
|
1823
|
+
else if (match?.status === 'preparing') {
|
|
1824
|
+
return "preMatch" /* MatchStateType.PRE_MATCH */;
|
|
1825
|
+
}
|
|
1826
|
+
else if (match?.status === 'started') {
|
|
1827
|
+
return "live" /* MatchStateType.LIVE */;
|
|
1828
|
+
}
|
|
1829
|
+
else if (match?.status === 'published' || match?.status === 'finished') {
|
|
1830
|
+
return "postMatch" /* MatchStateType.POST_MATCH */;
|
|
1831
|
+
}
|
|
1832
|
+
else if (match?.round.state !== 'preparing') {
|
|
1833
|
+
return "preparingRound" /* MatchStateType.PREPARING_ROUND */;
|
|
1834
|
+
}
|
|
1835
|
+
return null;
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
class NormalizeMatchStatePipe {
|
|
1839
|
+
constructor() {
|
|
1840
|
+
this.transform = normalizeMatchState;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
NormalizeMatchStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1844
|
+
NormalizeMatchStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, isStandalone: true, name: "etNormalizeMatchState" });
|
|
1845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchStatePipe, decorators: [{
|
|
1846
|
+
type: Pipe,
|
|
1847
|
+
args: [{ name: 'etNormalizeMatchState', standalone: true }]
|
|
1848
|
+
}] });
|
|
1849
|
+
|
|
1850
|
+
const normalizeMatchParticipants = (match) => {
|
|
1851
|
+
const matchState = normalizeMatchState(match);
|
|
1852
|
+
if (!match || !matchState) {
|
|
1853
|
+
return null;
|
|
1854
|
+
}
|
|
1855
|
+
return {
|
|
1856
|
+
home: normalizeMatchParticipant(match, 'home'),
|
|
1857
|
+
away: normalizeMatchParticipant(match, 'away'),
|
|
1858
|
+
};
|
|
1859
|
+
};
|
|
1860
|
+
const normalizeMatchParticipant = (match, side) => {
|
|
1861
|
+
const matchState = normalizeMatchState(match);
|
|
1862
|
+
if (!match || !matchState) {
|
|
1863
|
+
return null;
|
|
1864
|
+
}
|
|
1865
|
+
const participant = match[side];
|
|
1866
|
+
const participantType = match.home?.type ?? match.away?.type ?? 'unknown';
|
|
1867
|
+
if (!participant) {
|
|
1868
|
+
if (matchState === "postMatch" /* MatchStateType.POST_MATCH */ || matchState === "autoWin" /* MatchStateType.AUTO_WIN */) {
|
|
1869
|
+
return {
|
|
1870
|
+
participantType,
|
|
1871
|
+
type: 'none',
|
|
1872
|
+
i18n: 'match-participant.none',
|
|
1873
|
+
text: 'No opponent',
|
|
1874
|
+
data: participant,
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
else {
|
|
1878
|
+
return {
|
|
1879
|
+
participantType,
|
|
1880
|
+
type: 'tbd',
|
|
1881
|
+
i18n: 'match-participant.tbd',
|
|
1882
|
+
text: 'TBD',
|
|
1883
|
+
data: participant,
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
else {
|
|
1888
|
+
return {
|
|
1889
|
+
participantType,
|
|
1890
|
+
type: 'participant',
|
|
1891
|
+
data: participant,
|
|
1892
|
+
};
|
|
1893
|
+
}
|
|
1894
|
+
};
|
|
1895
|
+
|
|
1896
|
+
class NormalizeMatchParticipantsPipe {
|
|
1897
|
+
constructor() {
|
|
1898
|
+
this.transform = normalizeMatchParticipants;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
NormalizeMatchParticipantsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1902
|
+
NormalizeMatchParticipantsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, isStandalone: true, name: "etNormalizeMatchParticipants" });
|
|
1903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchParticipantsPipe, decorators: [{
|
|
1904
|
+
type: Pipe,
|
|
1905
|
+
args: [{ name: 'etNormalizeMatchParticipants', standalone: true }]
|
|
1906
|
+
}] });
|
|
1907
|
+
|
|
1908
|
+
const EMPTY_SCORE = {
|
|
1909
|
+
home: { score: 'match-score.placeholder', isWinner: false },
|
|
1910
|
+
away: { score: 'match-score.placeholder', isWinner: false },
|
|
1911
|
+
isNumeric: false,
|
|
1912
|
+
subLine: null,
|
|
1913
|
+
};
|
|
1914
|
+
const normalizeMatchScore = (match) => {
|
|
1915
|
+
if (!match) {
|
|
1916
|
+
return null;
|
|
1917
|
+
}
|
|
1918
|
+
const matchState = normalizeMatchState(match);
|
|
1919
|
+
const subLine = getMatchScoreSubLine(match);
|
|
1920
|
+
if (!match.homeScore && !match.awayScore) {
|
|
1921
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1922
|
+
}
|
|
1923
|
+
if (isKnockoutMatch(match)) {
|
|
1924
|
+
if (matchState === "preMatch" /* MatchStateType.PRE_MATCH */ || matchState === "live" /* MatchStateType.LIVE */) {
|
|
1925
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1926
|
+
}
|
|
1927
|
+
return {
|
|
1928
|
+
home: {
|
|
1929
|
+
score: getKnockoutMatchScore(match.homeScore),
|
|
1930
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1931
|
+
},
|
|
1932
|
+
away: {
|
|
1933
|
+
score: getKnockoutMatchScore(match.awayScore),
|
|
1934
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1935
|
+
},
|
|
1936
|
+
subLine,
|
|
1937
|
+
isNumeric: false,
|
|
1938
|
+
};
|
|
1939
|
+
}
|
|
1940
|
+
else if (isGroupMatch(match)) {
|
|
1941
|
+
if (match.games.length === 1) {
|
|
1942
|
+
// Return the score if only one game has been played
|
|
1943
|
+
return {
|
|
1944
|
+
...getGroupMatchScore(match),
|
|
1945
|
+
subLine,
|
|
1946
|
+
isNumeric: true,
|
|
1947
|
+
};
|
|
1948
|
+
}
|
|
1949
|
+
else {
|
|
1950
|
+
return {
|
|
1951
|
+
...getGroupMatchPoints(match),
|
|
1952
|
+
subLine,
|
|
1953
|
+
isNumeric: true,
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
else {
|
|
1958
|
+
return {
|
|
1959
|
+
...getGroupMatchScore(match),
|
|
1960
|
+
subLine,
|
|
1961
|
+
isNumeric: true,
|
|
1962
|
+
};
|
|
1963
|
+
}
|
|
1964
|
+
};
|
|
1965
|
+
const isKnockoutMatch = (match) => {
|
|
1966
|
+
if (!match) {
|
|
1967
|
+
return false;
|
|
1968
|
+
}
|
|
1969
|
+
return (match.matchType === 'single_elimination' ||
|
|
1970
|
+
match.matchType === 'double_elimination' ||
|
|
1971
|
+
match.matchType === 'fifa_swiss');
|
|
1972
|
+
};
|
|
1973
|
+
const isGroupMatch = (match) => {
|
|
1974
|
+
if (!match) {
|
|
1975
|
+
return false;
|
|
1976
|
+
}
|
|
1977
|
+
return match.matchType === 'groups' || match.matchType === 'league';
|
|
1978
|
+
};
|
|
1979
|
+
const getKnockoutMatchScore = (score) => {
|
|
1980
|
+
if (score?.status === 'won') {
|
|
1981
|
+
return 'match-score.knockout.won';
|
|
1982
|
+
}
|
|
1983
|
+
else if (score?.status === 'lost') {
|
|
1984
|
+
return 'match-score.knockout.lost';
|
|
1985
|
+
}
|
|
1986
|
+
else if (score?.status === 'tie') {
|
|
1987
|
+
return 'match-score.knockout.tie';
|
|
1988
|
+
}
|
|
1989
|
+
return null;
|
|
1990
|
+
};
|
|
1991
|
+
const getMatchScoreSubLine = (match) => {
|
|
1992
|
+
if (isKnockoutMatch(match)) {
|
|
1993
|
+
return null;
|
|
1994
|
+
}
|
|
1995
|
+
else if (isGroupMatch(match)) {
|
|
1996
|
+
return 'match-score.groups.sub-line';
|
|
1997
|
+
}
|
|
1998
|
+
else {
|
|
1999
|
+
return null;
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
const getGroupMatchScore = (match) => {
|
|
2003
|
+
if (!match) {
|
|
2004
|
+
return null;
|
|
2005
|
+
}
|
|
2006
|
+
return {
|
|
2007
|
+
home: {
|
|
2008
|
+
score: match.homeScore?.ownPoints || 0,
|
|
2009
|
+
isWinner: match.homeScore?.status === 'won',
|
|
2010
|
+
},
|
|
2011
|
+
away: {
|
|
2012
|
+
score: match.awayScore?.ownPoints || 0,
|
|
2013
|
+
isWinner: match.awayScore?.status === 'won',
|
|
2014
|
+
},
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
const getGroupMatchPoints = (match) => {
|
|
2018
|
+
if (!match) {
|
|
2019
|
+
return null;
|
|
2020
|
+
}
|
|
2021
|
+
return {
|
|
2022
|
+
home: {
|
|
2023
|
+
score: match.homeScore?.score || 0,
|
|
2024
|
+
isWinner: match.homeScore?.status === 'won',
|
|
2025
|
+
},
|
|
2026
|
+
away: {
|
|
2027
|
+
score: match.awayScore?.score || 0,
|
|
2028
|
+
isWinner: match.awayScore?.status === 'won',
|
|
2029
|
+
},
|
|
2030
|
+
};
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
class NormalizeMatchScorePipe {
|
|
2034
|
+
constructor() {
|
|
2035
|
+
this.transform = normalizeMatchScore;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
NormalizeMatchScorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2039
|
+
NormalizeMatchScorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, isStandalone: true, name: "etNormalizeMatchScore" });
|
|
2040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchScorePipe, decorators: [{
|
|
2041
|
+
type: Pipe,
|
|
2042
|
+
args: [{ name: 'etNormalizeMatchScore', standalone: true }]
|
|
2043
|
+
}] });
|
|
2044
|
+
|
|
2045
|
+
const normalizeMatchType = (matchType) => {
|
|
2046
|
+
if (!matchType) {
|
|
2047
|
+
return null;
|
|
2048
|
+
}
|
|
2049
|
+
switch (matchType) {
|
|
2050
|
+
case 'double_elimination':
|
|
2051
|
+
return {
|
|
2052
|
+
i18n: 'match-type.double-elimination',
|
|
2053
|
+
text: 'Double Elimination',
|
|
2054
|
+
};
|
|
2055
|
+
case 'single_elimination':
|
|
2056
|
+
return {
|
|
2057
|
+
i18n: 'match-type.single-elimination',
|
|
2058
|
+
text: 'Single Elimination',
|
|
2059
|
+
};
|
|
2060
|
+
case 'fifa_swiss':
|
|
2061
|
+
return {
|
|
2062
|
+
i18n: 'match-type.fifa-swiss',
|
|
2063
|
+
text: 'FIFA Swiss',
|
|
2064
|
+
};
|
|
2065
|
+
case 'groups':
|
|
2066
|
+
return {
|
|
2067
|
+
i18n: 'match-type.groups',
|
|
2068
|
+
text: 'Groups',
|
|
2069
|
+
};
|
|
2070
|
+
case 'league':
|
|
2071
|
+
return {
|
|
2072
|
+
i18n: 'match-type.league',
|
|
2073
|
+
text: 'League',
|
|
2074
|
+
};
|
|
2075
|
+
case 'pools':
|
|
2076
|
+
return {
|
|
2077
|
+
i18n: 'match-type.pools',
|
|
2078
|
+
text: 'Pools',
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
class NormalizeMatchTypePipe {
|
|
2084
|
+
constructor() {
|
|
2085
|
+
this.transform = normalizeMatchType;
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
NormalizeMatchTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2089
|
+
NormalizeMatchTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, isStandalone: true, name: "etNormalizeMatchType" });
|
|
2090
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NormalizeMatchTypePipe, decorators: [{
|
|
2091
|
+
type: Pipe,
|
|
2092
|
+
args: [{ name: 'etNormalizeMatchType', standalone: true }]
|
|
2093
|
+
}] });
|
|
2094
|
+
|
|
593
2095
|
const toArray = (value) => {
|
|
594
2096
|
return Array.from({ length: value }, (_, i) => i);
|
|
595
2097
|
};
|
|
@@ -600,24 +2102,51 @@ class ToArrayPipe {
|
|
|
600
2102
|
this.transform = toArray;
|
|
601
2103
|
}
|
|
602
2104
|
}
|
|
603
|
-
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
604
|
-
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2105
|
+
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2106
|
+
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
|
|
2107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToArrayPipe, decorators: [{
|
|
606
2108
|
type: Pipe,
|
|
607
2109
|
args: [{ name: 'toArray', standalone: true }]
|
|
608
2110
|
}] });
|
|
609
2111
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
};
|
|
2112
|
+
var _a;
|
|
2113
|
+
class TypedQueryList extends QueryList {
|
|
2114
|
+
constructor() {
|
|
2115
|
+
super(...arguments);
|
|
2116
|
+
this[_a] = () => {
|
|
2117
|
+
return super[Symbol.iterator]();
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
get changes() {
|
|
2121
|
+
return super.changes;
|
|
2122
|
+
}
|
|
2123
|
+
toArray() {
|
|
2124
|
+
return super.toArray();
|
|
2125
|
+
}
|
|
2126
|
+
forEach(fn) {
|
|
2127
|
+
super.forEach(fn);
|
|
2128
|
+
}
|
|
2129
|
+
filter(fn) {
|
|
2130
|
+
return super.filter(fn);
|
|
2131
|
+
}
|
|
2132
|
+
map(fn) {
|
|
2133
|
+
return super.map(fn);
|
|
2134
|
+
}
|
|
2135
|
+
reduce(fn, initialValue) {
|
|
2136
|
+
return super.reduce(fn, initialValue);
|
|
2137
|
+
}
|
|
2138
|
+
some(fn) {
|
|
2139
|
+
return super.some(fn);
|
|
2140
|
+
}
|
|
2141
|
+
find(fn) {
|
|
2142
|
+
return super.find(fn);
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
_a = Symbol.iterator;
|
|
617
2146
|
|
|
618
2147
|
/**
|
|
619
2148
|
* Generated bundle index. Do not edit.
|
|
620
2149
|
*/
|
|
621
2150
|
|
|
622
|
-
export { ContentObserverService, DEFAULT_VIEWPORT_CONFIG, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, ObserveContentDirective, ObserveResizeDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, provideViewportConfig, toArray, toArrayTrackByFn };
|
|
2151
|
+
export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, 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, ViewportService, clamp, clone, createReactiveBindings, deleteCookie, elementCanScroll, equal, getCookie, getDomain, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, hasCookie, isGroupMatch, isKnockoutMatch, mergeSeoConfig, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, routerDisableScrollTop, setCookie, toArray, toArrayTrackByFn };
|
|
623
2152
|
//# sourceMappingURL=ethlete-core.mjs.map
|