@ethlete/core 0.2.0-next.7 → 0.2.0-next.9
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/directives/click-outside/click-outside.directive.mjs +3 -3
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
- package/esm2020/lib/directives/destroy/destroy.directive.mjs +3 -3
- package/esm2020/lib/directives/let/let.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
- package/esm2020/lib/directives/public-api.mjs +2 -1
- package/esm2020/lib/directives/repeat/repeat.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
- 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/services/click-observer.service.mjs +6 -6
- package/esm2020/lib/services/content-observer.service.mjs +6 -6
- package/esm2020/lib/services/destroy.service.mjs +3 -3
- package/esm2020/lib/services/focus-visible.service.mjs +3 -3
- package/esm2020/lib/services/resize-observer.service.mjs +6 -6
- package/esm2020/lib/services/viewport.service.mjs +3 -3
- package/esm2020/lib/types/i18n.types.mjs +2 -0
- package/esm2020/lib/types/public-api.mjs +3 -2
- package/fesm2015/ethlete-core.mjs +549 -64
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +556 -64
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/directives/public-api.d.ts +1 -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/types/i18n.types.d.ts +4 -0
- package/lib/types/public-api.d.ts +2 -1
- package/package.json +4 -2
|
@@ -6,6 +6,7 @@ import { DOCUMENT } from '@angular/common';
|
|
|
6
6
|
import { __decorate, __metadata } from 'tslib';
|
|
7
7
|
import * as i1 from '@angular/cdk/layout';
|
|
8
8
|
import { debounceTime as debounceTime$1 } from 'rxjs/operators';
|
|
9
|
+
import { Meta, Title } from '@angular/platform-browser';
|
|
9
10
|
|
|
10
11
|
const VIEWPORT_CONFIG = new InjectionToken('ViewportConfig');
|
|
11
12
|
/**
|
|
@@ -54,9 +55,9 @@ class ClickObserverFactory {
|
|
|
54
55
|
return fromEvent(document, 'click');
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
58
|
-
ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
58
|
+
ClickObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
59
|
+
ClickObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, providedIn: 'root' });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverFactory, decorators: [{
|
|
60
61
|
type: Injectable,
|
|
61
62
|
args: [{ providedIn: 'root' }]
|
|
62
63
|
}] });
|
|
@@ -110,9 +111,9 @@ class ClickObserverService {
|
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
114
|
-
ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
114
|
+
ClickObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, deps: [{ token: ClickObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
115
|
+
ClickObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, providedIn: 'root' });
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickObserverService, decorators: [{
|
|
116
117
|
type: Injectable,
|
|
117
118
|
args: [{ providedIn: 'root' }]
|
|
118
119
|
}], ctorParameters: function () { return [{ type: ClickObserverFactory }]; } });
|
|
@@ -123,9 +124,9 @@ class MutationObserverFactory {
|
|
|
123
124
|
return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
127
|
-
MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
127
|
+
MutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
128
|
+
MutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MutationObserverFactory, decorators: [{
|
|
129
130
|
type: Injectable,
|
|
130
131
|
args: [{ providedIn: 'root' }]
|
|
131
132
|
}] });
|
|
@@ -185,9 +186,9 @@ class ContentObserverService {
|
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
189
|
-
ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
189
|
+
ContentObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
190
|
+
ContentObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, providedIn: 'root' });
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ContentObserverService, decorators: [{
|
|
191
192
|
type: Injectable,
|
|
192
193
|
args: [{ providedIn: 'root' }]
|
|
193
194
|
}], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });
|
|
@@ -202,9 +203,9 @@ class DestroyService {
|
|
|
202
203
|
this._destroy$.unsubscribe();
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
206
|
-
DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
206
|
+
DestroyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
207
|
+
DestroyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService });
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyService, decorators: [{
|
|
208
209
|
type: Injectable
|
|
209
210
|
}] });
|
|
210
211
|
|
|
@@ -230,9 +231,9 @@ class FocusVisibleService {
|
|
|
230
231
|
this._hadKeyboardEvent = false;
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
|
-
FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
234
|
-
FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
234
|
+
FocusVisibleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
235
|
+
FocusVisibleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, providedIn: 'root' });
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusVisibleService, decorators: [{
|
|
236
237
|
type: Injectable,
|
|
237
238
|
args: [{
|
|
238
239
|
providedIn: 'root',
|
|
@@ -245,9 +246,9 @@ class ResizeObserverFactory {
|
|
|
245
246
|
return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
|
-
ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
249
|
-
ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
249
|
+
ResizeObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
250
|
+
ResizeObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' });
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverFactory, decorators: [{
|
|
251
252
|
type: Injectable,
|
|
252
253
|
args: [{ providedIn: 'root' }]
|
|
253
254
|
}] });
|
|
@@ -303,9 +304,9 @@ class ResizeObserverService {
|
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
|
-
ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
307
|
-
ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
307
|
+
ResizeObserverService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
308
|
+
ResizeObserverService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, providedIn: 'root' });
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
309
310
|
type: Injectable,
|
|
310
311
|
args: [{ providedIn: 'root' }]
|
|
311
312
|
}], ctorParameters: function () { return [{ type: ResizeObserverFactory }]; } });
|
|
@@ -440,8 +441,8 @@ class ViewportService {
|
|
|
440
441
|
return 'xs';
|
|
441
442
|
}
|
|
442
443
|
}
|
|
443
|
-
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
444
|
-
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.
|
|
444
|
+
ViewportService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, deps: [{ token: VIEWPORT_CONFIG, optional: true }, { token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
445
|
+
ViewportService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, providedIn: 'root' });
|
|
445
446
|
__decorate([
|
|
446
447
|
Memo(),
|
|
447
448
|
__metadata("design:type", Function),
|
|
@@ -458,7 +459,7 @@ __decorate([
|
|
|
458
459
|
__metadata("design:paramtypes", [Object]),
|
|
459
460
|
__metadata("design:returntype", void 0)
|
|
460
461
|
], ViewportService.prototype, "_buildMediaQuery", null);
|
|
461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ViewportService, decorators: [{
|
|
462
463
|
type: Injectable,
|
|
463
464
|
args: [{
|
|
464
465
|
providedIn: 'root',
|
|
@@ -492,9 +493,9 @@ class ClickOutsideDirective {
|
|
|
492
493
|
this._subscription?.unsubscribe();
|
|
493
494
|
}
|
|
494
495
|
}
|
|
495
|
-
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
496
|
-
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
496
|
+
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
497
|
+
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClickOutsideDirective, isStandalone: true, selector: "[etClickOutside]", outputs: { etClickOutside: "etClickOutside" }, ngImport: i0 });
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
498
499
|
type: Directive,
|
|
499
500
|
args: [{
|
|
500
501
|
selector: '[etClickOutside]',
|
|
@@ -645,9 +646,9 @@ class CursorDragScrollDirective {
|
|
|
645
646
|
}
|
|
646
647
|
}
|
|
647
648
|
}
|
|
648
|
-
CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
649
|
-
CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
649
|
+
CursorDragScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CursorDragScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
650
|
+
CursorDragScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: CursorDragScrollDirective, isStandalone: true, selector: "[etCursorDragScroll]", inputs: { enabled: ["etCursorDragScroll", "enabled"] }, providers: [DestroyService], exportAs: ["etCursorDragScroll"], ngImport: i0 });
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CursorDragScrollDirective, decorators: [{
|
|
651
652
|
type: Directive,
|
|
652
653
|
args: [{
|
|
653
654
|
selector: '[etCursorDragScroll]',
|
|
@@ -670,9 +671,9 @@ class DestroyDirective {
|
|
|
670
671
|
this._destroy$.unsubscribe();
|
|
671
672
|
}
|
|
672
673
|
}
|
|
673
|
-
DestroyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
674
|
-
DestroyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
675
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
674
|
+
DestroyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
675
|
+
DestroyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: DestroyDirective, isStandalone: true, ngImport: i0 });
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DestroyDirective, decorators: [{
|
|
676
677
|
type: Directive,
|
|
677
678
|
args: [{
|
|
678
679
|
standalone: true,
|
|
@@ -713,9 +714,9 @@ class LetDirective {
|
|
|
713
714
|
}
|
|
714
715
|
}
|
|
715
716
|
}
|
|
716
|
-
LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
717
|
-
LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
717
|
+
LetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LetDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
718
|
+
LetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: LetDirective, isStandalone: true, selector: "[etLet]", inputs: { etLet: "etLet" }, ngImport: i0 });
|
|
719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LetDirective, decorators: [{
|
|
719
720
|
type: Directive,
|
|
720
721
|
args: [{
|
|
721
722
|
selector: '[etLet]',
|
|
@@ -768,9 +769,9 @@ class ObserveContentDirective {
|
|
|
768
769
|
this._currentSubscription?.unsubscribe();
|
|
769
770
|
}
|
|
770
771
|
}
|
|
771
|
-
ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
772
|
-
ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
772
|
+
ObserveContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
773
|
+
ObserveContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveContentDirective, isStandalone: true, selector: "[etObserveContent]", inputs: { disabled: ["etObserveContentDisabled", "disabled"], debounce: ["etObserveContentDebounce", "debounce"] }, outputs: { event: "etObserveContent" }, exportAs: ["etObserveContent"], ngImport: i0 });
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveContentDirective, decorators: [{
|
|
774
775
|
type: Directive,
|
|
775
776
|
args: [{
|
|
776
777
|
selector: '[etObserveContent]',
|
|
@@ -831,9 +832,9 @@ class ObserveResizeDirective {
|
|
|
831
832
|
this._currentSubscription?.unsubscribe();
|
|
832
833
|
}
|
|
833
834
|
}
|
|
834
|
-
ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
835
|
-
ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
835
|
+
ObserveResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveResizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
836
|
+
ObserveResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveResizeDirective, isStandalone: true, selector: "[etObserveResize]", inputs: { disabled: ["etObserveResizeDisabled", "disabled"], debounce: ["etObserveResizeDebounce", "debounce"] }, outputs: { event: "etObserveResize" }, exportAs: ["etObserveResize"], ngImport: i0 });
|
|
837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveResizeDirective, decorators: [{
|
|
837
838
|
type: Directive,
|
|
838
839
|
args: [{
|
|
839
840
|
selector: '[etObserveResize]',
|
|
@@ -863,9 +864,9 @@ class ScrollObserverFirstElementDirective {
|
|
|
863
864
|
this._isFirstElement = coerceBooleanProperty(value);
|
|
864
865
|
}
|
|
865
866
|
}
|
|
866
|
-
ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
867
|
-
ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
867
|
+
ScrollObserverFirstElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverFirstElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
868
|
+
ScrollObserverFirstElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ScrollObserverFirstElementDirective, isStandalone: true, selector: "[etScrollObserverFirstElement]", inputs: { isFirstElement: ["etScrollObserverFirstElement", "isFirstElement"] }, host: { properties: { "class.et-scroll-observer-first-element": "this.isFirstElement" } }, ngImport: i0 });
|
|
869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverFirstElementDirective, decorators: [{
|
|
869
870
|
type: Directive,
|
|
870
871
|
args: [{
|
|
871
872
|
selector: '[etScrollObserverFirstElement]',
|
|
@@ -882,9 +883,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
882
883
|
const SCROLL_OBSERVER_IGNORE_TARGET_CLASS = 'et-scroll-observer-ignore-target';
|
|
883
884
|
class ScrollObserverIgnoreTargetDirective {
|
|
884
885
|
}
|
|
885
|
-
ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
886
|
-
ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
886
|
+
ScrollObserverIgnoreTargetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
887
|
+
ScrollObserverIgnoreTargetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ScrollObserverIgnoreTargetDirective, isStandalone: true, selector: "[etScrollObserverIgnoreTarget]", host: { classAttribute: "et-scroll-observer-ignore-target" }, ngImport: i0 });
|
|
888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverIgnoreTargetDirective, decorators: [{
|
|
888
889
|
type: Directive,
|
|
889
890
|
args: [{
|
|
890
891
|
selector: '[etScrollObserverIgnoreTarget]',
|
|
@@ -907,9 +908,9 @@ class ScrollObserverLastElementDirective {
|
|
|
907
908
|
this._isLastElement = coerceBooleanProperty(value);
|
|
908
909
|
}
|
|
909
910
|
}
|
|
910
|
-
ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
911
|
-
ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
911
|
+
ScrollObserverLastElementDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverLastElementDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
912
|
+
ScrollObserverLastElementDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", 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 });
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ScrollObserverLastElementDirective, decorators: [{
|
|
913
914
|
type: Directive,
|
|
914
915
|
args: [{
|
|
915
916
|
selector: '[etScrollObserverLastElement]',
|
|
@@ -1059,15 +1060,15 @@ class ObserveScrollStateDirective {
|
|
|
1059
1060
|
return element;
|
|
1060
1061
|
}
|
|
1061
1062
|
}
|
|
1062
|
-
ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
1063
|
-
ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
1063
|
+
ObserveScrollStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveScrollStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1064
|
+
ObserveScrollStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveScrollStateDirective, isStandalone: true, selector: "[etObserveScrollState]", inputs: { observerRootMargin: "observerRootMargin", observerThreshold: "observerThreshold" }, outputs: { etObserveScrollState: "etObserveScrollState" }, providers: [
|
|
1064
1065
|
{
|
|
1065
1066
|
provide: OBSERVE_SCROLL_STATE,
|
|
1066
1067
|
useExisting: ObserveScrollStateDirective,
|
|
1067
1068
|
},
|
|
1068
1069
|
DestroyService,
|
|
1069
1070
|
], exportAs: ["etObserveScrollState"], ngImport: i0 });
|
|
1070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveScrollStateDirective, decorators: [{
|
|
1071
1072
|
type: Directive,
|
|
1072
1073
|
args: [{
|
|
1073
1074
|
selector: '[etObserveScrollState]',
|
|
@@ -1110,9 +1111,9 @@ class RepeatDirective {
|
|
|
1110
1111
|
}
|
|
1111
1112
|
}
|
|
1112
1113
|
}
|
|
1113
|
-
RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
1114
|
-
RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.
|
|
1115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
1114
|
+
RepeatDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RepeatDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1115
|
+
RepeatDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: RepeatDirective, isStandalone: true, selector: "[etRepeat]", inputs: { repeatCount: ["etRepeat", "repeatCount"] }, ngImport: i0 });
|
|
1116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RepeatDirective, decorators: [{
|
|
1116
1117
|
type: Directive,
|
|
1117
1118
|
args: [{
|
|
1118
1119
|
selector: '[etRepeat]',
|
|
@@ -1123,6 +1124,497 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
1123
1124
|
args: ['etRepeat']
|
|
1124
1125
|
}] } });
|
|
1125
1126
|
|
|
1127
|
+
const SEO_DIRECTIVE_TOKEN = new InjectionToken('SEO_DIRECTIVE_TOKEN');
|
|
1128
|
+
|
|
1129
|
+
const mergeSeoConfig = (config, parentConfig) => {
|
|
1130
|
+
return {
|
|
1131
|
+
...parentConfig,
|
|
1132
|
+
...config,
|
|
1133
|
+
};
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
class SeoDirective {
|
|
1137
|
+
constructor() {
|
|
1138
|
+
this._metaService = inject(Meta);
|
|
1139
|
+
this._titleService = inject(Title);
|
|
1140
|
+
this._onDeactivate$ = new Subject();
|
|
1141
|
+
this._isDeactivated = false;
|
|
1142
|
+
this.parent = inject(SEO_DIRECTIVE_TOKEN, { optional: true, skipSelf: true });
|
|
1143
|
+
this._config = {};
|
|
1144
|
+
}
|
|
1145
|
+
get config() {
|
|
1146
|
+
return this._config;
|
|
1147
|
+
}
|
|
1148
|
+
ngOnInit() {
|
|
1149
|
+
this.parent?._deactivate();
|
|
1150
|
+
}
|
|
1151
|
+
ngOnDestroy() {
|
|
1152
|
+
this._deactivate();
|
|
1153
|
+
this._cleanUp();
|
|
1154
|
+
this.parent?._activate();
|
|
1155
|
+
}
|
|
1156
|
+
// TODO(TRB): This should get split up into multiple methods to make it more readable
|
|
1157
|
+
// - updateTitle
|
|
1158
|
+
// - updateMeta
|
|
1159
|
+
// - updateLink
|
|
1160
|
+
updateConfig(config) {
|
|
1161
|
+
this._config = mergeSeoConfig(config, this.parent?.config || {});
|
|
1162
|
+
if (this._isDeactivated) {
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
this._deactivate();
|
|
1166
|
+
this._activate();
|
|
1167
|
+
}
|
|
1168
|
+
_activate() {
|
|
1169
|
+
this._onDeactivate$.next(false);
|
|
1170
|
+
this._isDeactivated = false;
|
|
1171
|
+
for (const [key, value] of Object.entries(this._config)) {
|
|
1172
|
+
if (value instanceof Observable) {
|
|
1173
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1174
|
+
}
|
|
1175
|
+
else if (Array.isArray(value)) {
|
|
1176
|
+
value.forEach((value) => {
|
|
1177
|
+
if (value instanceof Observable) {
|
|
1178
|
+
value.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(key, value));
|
|
1179
|
+
}
|
|
1180
|
+
else {
|
|
1181
|
+
this._update(key, value);
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
else if (typeof value === 'object' && value !== null) {
|
|
1186
|
+
for (const [subKey, subValue] of Object.entries(value)) {
|
|
1187
|
+
if (subValue instanceof Observable) {
|
|
1188
|
+
subValue.pipe(takeUntil(this._onDeactivate$)).subscribe((value) => this._update(`${key}:${subKey}`, value));
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
this._update(`${key}:${subKey}`, subValue);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
else {
|
|
1196
|
+
this._update(key, value);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
_deactivate() {
|
|
1201
|
+
this._onDeactivate$.next(true);
|
|
1202
|
+
this._isDeactivated = true;
|
|
1203
|
+
}
|
|
1204
|
+
_update(key, value) {
|
|
1205
|
+
switch (key) {
|
|
1206
|
+
case 'title':
|
|
1207
|
+
if (value && typeof value === 'string') {
|
|
1208
|
+
this._titleService.setTitle(value);
|
|
1209
|
+
}
|
|
1210
|
+
break;
|
|
1211
|
+
case 'canonical':
|
|
1212
|
+
{
|
|
1213
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1214
|
+
if (link) {
|
|
1215
|
+
link.setAttribute('href', value);
|
|
1216
|
+
}
|
|
1217
|
+
else {
|
|
1218
|
+
const newLink = document.createElement('link');
|
|
1219
|
+
newLink.setAttribute('rel', key);
|
|
1220
|
+
newLink.setAttribute('href', value);
|
|
1221
|
+
document.head.appendChild(newLink);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
break;
|
|
1225
|
+
case 'alternate':
|
|
1226
|
+
{
|
|
1227
|
+
const link = document.querySelector(`link[rel="${key}"][hreflang="${value.hreflang}"]`);
|
|
1228
|
+
if (link) {
|
|
1229
|
+
link.setAttribute('href', value.href);
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
const newLink = document.createElement('link');
|
|
1233
|
+
newLink.setAttribute('rel', key);
|
|
1234
|
+
newLink.setAttribute('hreflang', value.hreflang);
|
|
1235
|
+
newLink.setAttribute('href', value.href);
|
|
1236
|
+
document.head.appendChild(newLink);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
break;
|
|
1240
|
+
default:
|
|
1241
|
+
if (value !== undefined && value !== null) {
|
|
1242
|
+
const val = Array.isArray(value) ? value.join(', ') : value;
|
|
1243
|
+
this._metaService.updateTag({ name: key, content: val });
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
this._metaService.removeTag(`name="${key}"`);
|
|
1247
|
+
}
|
|
1248
|
+
break;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
_cleanUp() {
|
|
1252
|
+
for (const key in this._config) {
|
|
1253
|
+
if (key === 'alternate') {
|
|
1254
|
+
const links = document.querySelectorAll(`link[rel="${key}"]`);
|
|
1255
|
+
links.forEach((link) => {
|
|
1256
|
+
link.remove();
|
|
1257
|
+
});
|
|
1258
|
+
continue;
|
|
1259
|
+
}
|
|
1260
|
+
if (key === 'canonical') {
|
|
1261
|
+
const link = document.querySelector(`link[rel="${key}"]`);
|
|
1262
|
+
if (link) {
|
|
1263
|
+
link.remove();
|
|
1264
|
+
}
|
|
1265
|
+
continue;
|
|
1266
|
+
}
|
|
1267
|
+
if (typeof this._config[key] === 'object' &&
|
|
1268
|
+
this._config[key] !== null &&
|
|
1269
|
+
!(this._config[key] instanceof Observable)) {
|
|
1270
|
+
for (const subKey in this._config[key]) {
|
|
1271
|
+
const parentValue = this.parent?.config?.[key]?.[subKey];
|
|
1272
|
+
if (parentValue === undefined) {
|
|
1273
|
+
this._update(`${key}:${subKey}`, undefined);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
else {
|
|
1278
|
+
const parentValue = this.parent?.config?.[key];
|
|
1279
|
+
if (parentValue === undefined) {
|
|
1280
|
+
this._update(key, null);
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
SeoDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SeoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1287
|
+
SeoDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: SeoDirective, isStandalone: true, providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }], ngImport: i0 });
|
|
1288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SeoDirective, decorators: [{
|
|
1289
|
+
type: Directive,
|
|
1290
|
+
args: [{
|
|
1291
|
+
standalone: true,
|
|
1292
|
+
providers: [{ provide: SEO_DIRECTIVE_TOKEN, useExisting: SeoDirective }],
|
|
1293
|
+
}]
|
|
1294
|
+
}] });
|
|
1295
|
+
|
|
1296
|
+
// TODO(TRB): Add correct type once provided by API
|
|
1297
|
+
const normalizeGameResultType = (type) => {
|
|
1298
|
+
if (!type) {
|
|
1299
|
+
return null;
|
|
1300
|
+
}
|
|
1301
|
+
switch (type) {
|
|
1302
|
+
case 'extra_time':
|
|
1303
|
+
return {
|
|
1304
|
+
i18n: 'game-result-type.extra-time',
|
|
1305
|
+
shortCode: 'AET',
|
|
1306
|
+
text: 'After Extra Time',
|
|
1307
|
+
};
|
|
1308
|
+
case 'penalty':
|
|
1309
|
+
return {
|
|
1310
|
+
i18n: 'game-result-type.penalty',
|
|
1311
|
+
shortCode: 'PSO',
|
|
1312
|
+
text: 'Penalty shootout',
|
|
1313
|
+
};
|
|
1314
|
+
case 'golden_goal':
|
|
1315
|
+
return {
|
|
1316
|
+
i18n: 'game-result-type.golden-goal',
|
|
1317
|
+
shortCode: 'GG',
|
|
1318
|
+
text: 'Golden Goal',
|
|
1319
|
+
};
|
|
1320
|
+
case 'default':
|
|
1321
|
+
default:
|
|
1322
|
+
return {
|
|
1323
|
+
i18n: 'game-result-type.full-time',
|
|
1324
|
+
shortCode: 'FT',
|
|
1325
|
+
text: 'Full Time',
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
class NormalizeGameResultTypePipe {
|
|
1331
|
+
constructor() {
|
|
1332
|
+
this.transform = normalizeGameResultType;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
NormalizeGameResultTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1336
|
+
NormalizeGameResultTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, isStandalone: true, name: "etNormalizeGameResultType" });
|
|
1337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeGameResultTypePipe, decorators: [{
|
|
1338
|
+
type: Pipe,
|
|
1339
|
+
args: [{ name: 'etNormalizeGameResultType', standalone: true }]
|
|
1340
|
+
}] });
|
|
1341
|
+
|
|
1342
|
+
const normalizeMatchState = (match) => {
|
|
1343
|
+
if (match?.isCompletedByReferee) {
|
|
1344
|
+
return "autoWin" /* MatchStateType.AUTO_WIN */;
|
|
1345
|
+
}
|
|
1346
|
+
else if (match?.status === 'preparing') {
|
|
1347
|
+
return "preMatch" /* MatchStateType.PRE_MATCH */;
|
|
1348
|
+
}
|
|
1349
|
+
else if (match?.status === 'started') {
|
|
1350
|
+
return "live" /* MatchStateType.LIVE */;
|
|
1351
|
+
}
|
|
1352
|
+
else if (match?.status === 'published' || match?.status === 'finished') {
|
|
1353
|
+
return "postMatch" /* MatchStateType.POST_MATCH */;
|
|
1354
|
+
}
|
|
1355
|
+
else if (match?.round.state !== 'preparing') {
|
|
1356
|
+
return "preparingRound" /* MatchStateType.PREPARING_ROUND */;
|
|
1357
|
+
}
|
|
1358
|
+
return null;
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
class NormalizeMatchStatePipe {
|
|
1362
|
+
constructor() {
|
|
1363
|
+
this.transform = normalizeMatchState;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
NormalizeMatchStatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1367
|
+
NormalizeMatchStatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, isStandalone: true, name: "etNormalizeMatchState" });
|
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchStatePipe, decorators: [{
|
|
1369
|
+
type: Pipe,
|
|
1370
|
+
args: [{ name: 'etNormalizeMatchState', standalone: true }]
|
|
1371
|
+
}] });
|
|
1372
|
+
|
|
1373
|
+
const normalizeMatchParticipants = (match) => {
|
|
1374
|
+
const matchState = normalizeMatchState(match);
|
|
1375
|
+
if (!match || !matchState) {
|
|
1376
|
+
return null;
|
|
1377
|
+
}
|
|
1378
|
+
return {
|
|
1379
|
+
home: normalizeMatchParticipant(match, 'home'),
|
|
1380
|
+
away: normalizeMatchParticipant(match, 'away'),
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
const normalizeMatchParticipant = (match, side) => {
|
|
1384
|
+
const matchState = normalizeMatchState(match);
|
|
1385
|
+
if (!match || !matchState) {
|
|
1386
|
+
return null;
|
|
1387
|
+
}
|
|
1388
|
+
const participant = match[side];
|
|
1389
|
+
const participantType = match.home?.type ?? match.away?.type ?? 'unknown';
|
|
1390
|
+
if (!participant) {
|
|
1391
|
+
if (matchState === "postMatch" /* MatchStateType.POST_MATCH */ || matchState === "autoWin" /* MatchStateType.AUTO_WIN */) {
|
|
1392
|
+
return {
|
|
1393
|
+
participantType,
|
|
1394
|
+
type: 'none',
|
|
1395
|
+
i18n: 'match-participant.none',
|
|
1396
|
+
text: 'No opponent',
|
|
1397
|
+
data: participant,
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
else {
|
|
1401
|
+
return {
|
|
1402
|
+
participantType,
|
|
1403
|
+
type: 'tbd',
|
|
1404
|
+
i18n: 'match-participant.tbd',
|
|
1405
|
+
text: 'TBD',
|
|
1406
|
+
data: participant,
|
|
1407
|
+
};
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
return {
|
|
1412
|
+
participantType,
|
|
1413
|
+
type: 'participant',
|
|
1414
|
+
data: participant,
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
class NormalizeMatchParticipantsPipe {
|
|
1420
|
+
constructor() {
|
|
1421
|
+
this.transform = normalizeMatchParticipants;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
NormalizeMatchParticipantsPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1425
|
+
NormalizeMatchParticipantsPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, isStandalone: true, name: "etNormalizeMatchParticipants" });
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchParticipantsPipe, decorators: [{
|
|
1427
|
+
type: Pipe,
|
|
1428
|
+
args: [{ name: 'etNormalizeMatchParticipants', standalone: true }]
|
|
1429
|
+
}] });
|
|
1430
|
+
|
|
1431
|
+
const EMPTY_SCORE = {
|
|
1432
|
+
home: { score: 'match-score.placeholder', isWinner: false },
|
|
1433
|
+
away: { score: 'match-score.placeholder', isWinner: false },
|
|
1434
|
+
isNumeric: false,
|
|
1435
|
+
subLine: null,
|
|
1436
|
+
};
|
|
1437
|
+
const normalizeMatchScore = (match) => {
|
|
1438
|
+
if (!match) {
|
|
1439
|
+
return null;
|
|
1440
|
+
}
|
|
1441
|
+
const matchState = normalizeMatchState(match);
|
|
1442
|
+
const subLine = getMatchScoreSubLine(match);
|
|
1443
|
+
if (!match.homeScore && !match.awayScore) {
|
|
1444
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1445
|
+
}
|
|
1446
|
+
if (isKnockoutMatch(match)) {
|
|
1447
|
+
if (matchState === "preMatch" /* MatchStateType.PRE_MATCH */ || matchState === "live" /* MatchStateType.LIVE */) {
|
|
1448
|
+
return { ...EMPTY_SCORE, subLine, isNumeric: false };
|
|
1449
|
+
}
|
|
1450
|
+
return {
|
|
1451
|
+
home: {
|
|
1452
|
+
score: getKnockoutMatchScore(match.homeScore),
|
|
1453
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1454
|
+
},
|
|
1455
|
+
away: {
|
|
1456
|
+
score: getKnockoutMatchScore(match.awayScore),
|
|
1457
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1458
|
+
},
|
|
1459
|
+
subLine,
|
|
1460
|
+
isNumeric: false,
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
else if (isGroupMatch(match)) {
|
|
1464
|
+
if (match.games.length === 1) {
|
|
1465
|
+
// Return the score if only one game has been played
|
|
1466
|
+
return {
|
|
1467
|
+
...getGroupMatchScore(match),
|
|
1468
|
+
subLine,
|
|
1469
|
+
isNumeric: true,
|
|
1470
|
+
};
|
|
1471
|
+
}
|
|
1472
|
+
else {
|
|
1473
|
+
return {
|
|
1474
|
+
...getGroupMatchPoints(match),
|
|
1475
|
+
subLine,
|
|
1476
|
+
isNumeric: true,
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
else {
|
|
1481
|
+
return {
|
|
1482
|
+
...getGroupMatchScore(match),
|
|
1483
|
+
subLine,
|
|
1484
|
+
isNumeric: true,
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
};
|
|
1488
|
+
const isKnockoutMatch = (match) => {
|
|
1489
|
+
if (!match) {
|
|
1490
|
+
return false;
|
|
1491
|
+
}
|
|
1492
|
+
return (match.matchType === 'single_elimination' ||
|
|
1493
|
+
match.matchType === 'double_elimination' ||
|
|
1494
|
+
match.matchType === 'fifa_swiss');
|
|
1495
|
+
};
|
|
1496
|
+
const isGroupMatch = (match) => {
|
|
1497
|
+
if (!match) {
|
|
1498
|
+
return false;
|
|
1499
|
+
}
|
|
1500
|
+
return match.matchType === 'groups' || match.matchType === 'league';
|
|
1501
|
+
};
|
|
1502
|
+
const getKnockoutMatchScore = (score) => {
|
|
1503
|
+
if (score?.status === 'won') {
|
|
1504
|
+
return 'match-score.knockout.won';
|
|
1505
|
+
}
|
|
1506
|
+
else if (score?.status === 'lost') {
|
|
1507
|
+
return 'match-score.knockout.lost';
|
|
1508
|
+
}
|
|
1509
|
+
else if (score?.status === 'tie') {
|
|
1510
|
+
return 'match-score.knockout.tie';
|
|
1511
|
+
}
|
|
1512
|
+
return null;
|
|
1513
|
+
};
|
|
1514
|
+
const getMatchScoreSubLine = (match) => {
|
|
1515
|
+
if (isKnockoutMatch(match)) {
|
|
1516
|
+
return null;
|
|
1517
|
+
}
|
|
1518
|
+
else if (isGroupMatch(match)) {
|
|
1519
|
+
return 'match-score.groups.sub-line';
|
|
1520
|
+
}
|
|
1521
|
+
else {
|
|
1522
|
+
return null;
|
|
1523
|
+
}
|
|
1524
|
+
};
|
|
1525
|
+
const getGroupMatchScore = (match) => {
|
|
1526
|
+
if (!match) {
|
|
1527
|
+
return null;
|
|
1528
|
+
}
|
|
1529
|
+
return {
|
|
1530
|
+
home: {
|
|
1531
|
+
score: match.homeScore?.ownPoints || 0,
|
|
1532
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1533
|
+
},
|
|
1534
|
+
away: {
|
|
1535
|
+
score: match.awayScore?.ownPoints || 0,
|
|
1536
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1537
|
+
},
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
const getGroupMatchPoints = (match) => {
|
|
1541
|
+
if (!match) {
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1544
|
+
return {
|
|
1545
|
+
home: {
|
|
1546
|
+
score: match.homeScore?.score || 0,
|
|
1547
|
+
isWinner: match.homeScore?.status === 'won',
|
|
1548
|
+
},
|
|
1549
|
+
away: {
|
|
1550
|
+
score: match.awayScore?.score || 0,
|
|
1551
|
+
isWinner: match.awayScore?.status === 'won',
|
|
1552
|
+
},
|
|
1553
|
+
};
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
class NormalizeMatchScorePipe {
|
|
1557
|
+
constructor() {
|
|
1558
|
+
this.transform = normalizeMatchScore;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
NormalizeMatchScorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1562
|
+
NormalizeMatchScorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, isStandalone: true, name: "etNormalizeMatchScore" });
|
|
1563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchScorePipe, decorators: [{
|
|
1564
|
+
type: Pipe,
|
|
1565
|
+
args: [{ name: 'etNormalizeMatchScore', standalone: true }]
|
|
1566
|
+
}] });
|
|
1567
|
+
|
|
1568
|
+
const normalizeMatchType = (matchType) => {
|
|
1569
|
+
if (!matchType) {
|
|
1570
|
+
return null;
|
|
1571
|
+
}
|
|
1572
|
+
switch (matchType) {
|
|
1573
|
+
case 'double_elimination':
|
|
1574
|
+
return {
|
|
1575
|
+
i18n: 'match-type.double-elimination',
|
|
1576
|
+
text: 'Double Elimination',
|
|
1577
|
+
};
|
|
1578
|
+
case 'single_elimination':
|
|
1579
|
+
return {
|
|
1580
|
+
i18n: 'match-type.single-elimination',
|
|
1581
|
+
text: 'Single Elimination',
|
|
1582
|
+
};
|
|
1583
|
+
case 'fifa_swiss':
|
|
1584
|
+
return {
|
|
1585
|
+
i18n: 'match-type.fifa-swiss',
|
|
1586
|
+
text: 'FIFA Swiss',
|
|
1587
|
+
};
|
|
1588
|
+
case 'groups':
|
|
1589
|
+
return {
|
|
1590
|
+
i18n: 'match-type.groups',
|
|
1591
|
+
text: 'Groups',
|
|
1592
|
+
};
|
|
1593
|
+
case 'league':
|
|
1594
|
+
return {
|
|
1595
|
+
i18n: 'match-type.league',
|
|
1596
|
+
text: 'League',
|
|
1597
|
+
};
|
|
1598
|
+
case 'pools':
|
|
1599
|
+
return {
|
|
1600
|
+
i18n: 'match-type.pools',
|
|
1601
|
+
text: 'Pools',
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
|
|
1606
|
+
class NormalizeMatchTypePipe {
|
|
1607
|
+
constructor() {
|
|
1608
|
+
this.transform = normalizeMatchType;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
NormalizeMatchTypePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1612
|
+
NormalizeMatchTypePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, isStandalone: true, name: "etNormalizeMatchType" });
|
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NormalizeMatchTypePipe, decorators: [{
|
|
1614
|
+
type: Pipe,
|
|
1615
|
+
args: [{ name: 'etNormalizeMatchType', standalone: true }]
|
|
1616
|
+
}] });
|
|
1617
|
+
|
|
1126
1618
|
const toArray = (value) => {
|
|
1127
1619
|
return Array.from({ length: value }, (_, i) => i);
|
|
1128
1620
|
};
|
|
@@ -1133,9 +1625,9 @@ class ToArrayPipe {
|
|
|
1133
1625
|
this.transform = toArray;
|
|
1134
1626
|
}
|
|
1135
1627
|
}
|
|
1136
|
-
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.
|
|
1137
|
-
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.
|
|
1138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.
|
|
1628
|
+
ToArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1629
|
+
ToArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" });
|
|
1630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToArrayPipe, decorators: [{
|
|
1139
1631
|
type: Pipe,
|
|
1140
1632
|
args: [{ name: 'toArray', standalone: true }]
|
|
1141
1633
|
}] });
|
|
@@ -1144,5 +1636,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
|
|
|
1144
1636
|
* Generated bundle index. Do not edit.
|
|
1145
1637
|
*/
|
|
1146
1638
|
|
|
1147
|
-
export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyDirective, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, elementCanScroll, provideViewportConfig, toArray, toArrayTrackByFn };
|
|
1639
|
+
export { ClickObserverFactory, ClickObserverService, ClickOutsideDirective, ContentObserverService, CursorDragScrollDirective, DEFAULT_VIEWPORT_CONFIG, DestroyDirective, DestroyService, FocusVisibleService, LetContext, LetDirective, Memo, MutationObserverFactory, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OBSERVE_SCROLL_STATE, ObserveContentDirective, ObserveResizeDirective, ObserveScrollStateDirective, RepeatDirective, ResizeObserverFactory, ResizeObserverService, SCROLL_OBSERVER_FIRST_ELEMENT_CLASS, SCROLL_OBSERVER_IGNORE_TARGET_CLASS, SCROLL_OBSERVER_LAST_ELEMENT_CLASS, SEO_DIRECTIVE_TOKEN, ScrollObserverFirstElementDirective, ScrollObserverIgnoreTargetDirective, ScrollObserverLastElementDirective, SeoDirective, ToArrayPipe, VIEWPORT_CONFIG, ViewportService, clamp, elementCanScroll, getGroupMatchPoints, getGroupMatchScore, getKnockoutMatchScore, getMatchScoreSubLine, isGroupMatch, isKnockoutMatch, mergeSeoConfig, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, provideViewportConfig, toArray, toArrayTrackByFn };
|
|
1148
1640
|
//# sourceMappingURL=ethlete-core.mjs.map
|