@ethlete/contentful 0.1.0-next.1 → 0.1.0-next.2
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/audio/contentful-audio.component.mjs +28 -14
- package/esm2020/lib/components/file/contentful-file.component.mjs +22 -10
- package/esm2020/lib/components/image/contentful-image.component.mjs +23 -10
- package/esm2020/lib/components/rich-text-renderer/rich-text-renderer.component.mjs +5 -5
- package/esm2020/lib/components/video/contentful-video.component.mjs +20 -12
- package/esm2020/lib/contentful.module.mjs +4 -4
- package/esm2020/lib/utils/contentful-config.mjs +1 -1
- package/fesm2015/ethlete-contentful.mjs +94 -47
- package/fesm2015/ethlete-contentful.mjs.map +1 -1
- package/fesm2020/ethlete-contentful.mjs +94 -47
- package/fesm2020/ethlete-contentful.mjs.map +1 -1
- package/lib/components/audio/contentful-audio.component.d.ts +7 -3
- package/lib/components/file/contentful-file.component.d.ts +5 -3
- package/lib/components/image/contentful-image.component.d.ts +6 -3
- package/lib/components/rich-text-renderer/rich-text-renderer.component.d.ts +2 -2
- package/lib/components/rich-text-renderer/rich-text-renderer.util.d.ts +4 -4
- package/lib/components/video/contentful-video.component.d.ts +5 -3
- package/lib/utils/contentful-config.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NgIf, DOCUMENT } from '@angular/common';
|
|
1
|
+
import { NgIf, NgClass, DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, InjectionToken, inject, Renderer2, ElementRef, ViewContainerRef, ComponentFactoryResolver, ApplicationRef, Injector, NgModule } from '@angular/core';
|
|
4
4
|
import { DomPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -7,91 +7,124 @@ import { BLOCKS, INLINES } from '@contentful/rich-text-types';
|
|
|
7
7
|
class ContentfulAudioComponent {
|
|
8
8
|
constructor() {
|
|
9
9
|
this._data = null;
|
|
10
|
+
this.audioClass = null;
|
|
11
|
+
this.figureClass = null;
|
|
12
|
+
this.figcaptionClass = null;
|
|
10
13
|
}
|
|
11
14
|
get data() {
|
|
12
15
|
return this._data;
|
|
13
16
|
}
|
|
14
17
|
set data(v) {
|
|
18
|
+
if (v && !v.contentType) {
|
|
19
|
+
this._data = null;
|
|
20
|
+
console.warn('The provided asset is invalid', v);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
15
23
|
if (v && !v.contentType.startsWith('audio/')) {
|
|
16
24
|
throw new Error('The provided asset is not an audio');
|
|
17
25
|
}
|
|
18
|
-
this._data = v;
|
|
26
|
+
this._data = v ?? null;
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
|
-
ContentfulAudioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
22
|
-
ContentfulAudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
23
|
-
<figure *ngIf="data">
|
|
24
|
-
<figcaption>{{ data.title }}</figcaption>
|
|
25
|
-
<audio controls src="{{ data.url }}"></audio>
|
|
29
|
+
ContentfulAudioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
ContentfulAudioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: ContentfulAudioComponent, isStandalone: true, selector: "et-contentful-audio", inputs: { data: "data", audioClass: "audioClass", figureClass: "figureClass", figcaptionClass: "figcaptionClass" }, ngImport: i0, template: `
|
|
31
|
+
<figure *ngIf="data" [ngClass]="figureClass">
|
|
32
|
+
<figcaption [ngClass]="figcaptionClass">{{ data.title }}</figcaption>
|
|
33
|
+
<audio [ngClass]="audioClass" controls src="{{ data.url }}"></audio>
|
|
26
34
|
</figure>
|
|
27
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
35
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulAudioComponent, decorators: [{
|
|
29
37
|
type: Component,
|
|
30
38
|
args: [{
|
|
31
39
|
selector: 'et-contentful-audio',
|
|
32
40
|
template: `
|
|
33
|
-
<figure *ngIf="data">
|
|
34
|
-
<figcaption>{{ data.title }}</figcaption>
|
|
35
|
-
<audio controls src="{{ data.url }}"></audio>
|
|
41
|
+
<figure *ngIf="data" [ngClass]="figureClass">
|
|
42
|
+
<figcaption [ngClass]="figcaptionClass">{{ data.title }}</figcaption>
|
|
43
|
+
<audio [ngClass]="audioClass" controls src="{{ data.url }}"></audio>
|
|
36
44
|
</figure>
|
|
37
45
|
`,
|
|
38
46
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
47
|
encapsulation: ViewEncapsulation.None,
|
|
40
48
|
standalone: true,
|
|
41
|
-
imports: [NgIf],
|
|
49
|
+
imports: [NgIf, NgClass],
|
|
42
50
|
}]
|
|
43
51
|
}], propDecorators: { data: [{
|
|
44
52
|
type: Input
|
|
53
|
+
}], audioClass: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], figureClass: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], figcaptionClass: [{
|
|
58
|
+
type: Input
|
|
45
59
|
}] } });
|
|
46
60
|
|
|
47
61
|
class ContentfulFileComponent {
|
|
48
62
|
constructor() {
|
|
49
63
|
this._data = null;
|
|
64
|
+
this.fileClass = null;
|
|
50
65
|
}
|
|
51
66
|
get data() {
|
|
52
67
|
return this._data;
|
|
53
68
|
}
|
|
54
69
|
set data(v) {
|
|
55
|
-
|
|
70
|
+
if (v && !v.contentType) {
|
|
71
|
+
this._data = null;
|
|
72
|
+
console.warn('The provided asset is invalid', v);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._data = v ?? null;
|
|
56
76
|
}
|
|
57
77
|
}
|
|
58
|
-
ContentfulFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
59
|
-
ContentfulFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
60
|
-
<a *ngIf="data" [href]="data.url" class="underline" target="_blank">
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
ContentfulFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
ContentfulFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: ContentfulFileComponent, isStandalone: true, selector: "et-contentful-file", inputs: { data: "data", fileClass: "fileClass" }, ngImport: i0, template: `
|
|
80
|
+
<a *ngIf="data" [href]="data.url" [ngClass]="fileClass" class="underline" target="_blank">
|
|
81
|
+
{{ data.title }} ({{ data.size }} Bytes)
|
|
82
|
+
</a>
|
|
83
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulFileComponent, decorators: [{
|
|
63
85
|
type: Component,
|
|
64
86
|
args: [{
|
|
65
87
|
selector: 'et-contentful-file',
|
|
66
88
|
template: `
|
|
67
|
-
<a *ngIf="data" [href]="data.url" class="underline" target="_blank">
|
|
89
|
+
<a *ngIf="data" [href]="data.url" [ngClass]="fileClass" class="underline" target="_blank">
|
|
90
|
+
{{ data.title }} ({{ data.size }} Bytes)
|
|
91
|
+
</a>
|
|
68
92
|
`,
|
|
69
93
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
94
|
encapsulation: ViewEncapsulation.None,
|
|
71
95
|
standalone: true,
|
|
72
|
-
imports: [NgIf],
|
|
96
|
+
imports: [NgIf, NgClass],
|
|
73
97
|
}]
|
|
74
98
|
}], propDecorators: { data: [{
|
|
75
99
|
type: Input
|
|
100
|
+
}], fileClass: [{
|
|
101
|
+
type: Input
|
|
76
102
|
}] } });
|
|
77
103
|
|
|
78
104
|
class ContentfulImageComponent {
|
|
79
105
|
constructor() {
|
|
80
106
|
this._data = null;
|
|
107
|
+
this.imgClass = null;
|
|
108
|
+
this.pictureClass = null;
|
|
81
109
|
}
|
|
82
110
|
get data() {
|
|
83
111
|
return this._data;
|
|
84
112
|
}
|
|
85
113
|
set data(v) {
|
|
114
|
+
if (v && !v.contentType) {
|
|
115
|
+
this._data = null;
|
|
116
|
+
console.warn('The provided asset is invalid', v);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
86
119
|
if (v && !v.contentType.startsWith('image/')) {
|
|
87
120
|
throw new Error('The provided asset is not an image');
|
|
88
121
|
}
|
|
89
|
-
this._data = v;
|
|
122
|
+
this._data = v ?? null;
|
|
90
123
|
}
|
|
91
124
|
}
|
|
92
|
-
ContentfulImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
93
|
-
ContentfulImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
94
|
-
<picture *ngIf="data">
|
|
125
|
+
ContentfulImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
+
ContentfulImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: ContentfulImageComponent, isStandalone: true, selector: "et-contentful-image", inputs: { data: "data", imgClass: "imgClass", pictureClass: "pictureClass" }, ngImport: i0, template: `
|
|
127
|
+
<picture *ngIf="data" [ngClass]="pictureClass">
|
|
95
128
|
<source srcset="{{ data.url }}?fm=avif" />
|
|
96
129
|
<source srcset="{{ data.url }}?fm=webp" />
|
|
97
130
|
<source srcset="{{ data.url }}?fm=jpg" />
|
|
@@ -99,16 +132,17 @@ ContentfulImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
99
132
|
[attr.alt]="data.description ?? undefined"
|
|
100
133
|
[attr.width]="data.width ?? undefined"
|
|
101
134
|
[attr.height]="data.height ?? undefined"
|
|
135
|
+
[ngClass]="imgClass"
|
|
102
136
|
src="{{ data.url }}"
|
|
103
137
|
/>
|
|
104
138
|
</picture>
|
|
105
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
139
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulImageComponent, decorators: [{
|
|
107
141
|
type: Component,
|
|
108
142
|
args: [{
|
|
109
143
|
selector: 'et-contentful-image',
|
|
110
144
|
template: `
|
|
111
|
-
<picture *ngIf="data">
|
|
145
|
+
<picture *ngIf="data" [ngClass]="pictureClass">
|
|
112
146
|
<source srcset="{{ data.url }}?fm=avif" />
|
|
113
147
|
<source srcset="{{ data.url }}?fm=webp" />
|
|
114
148
|
<source srcset="{{ data.url }}?fm=jpg" />
|
|
@@ -116,6 +150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
116
150
|
[attr.alt]="data.description ?? undefined"
|
|
117
151
|
[attr.width]="data.width ?? undefined"
|
|
118
152
|
[attr.height]="data.height ?? undefined"
|
|
153
|
+
[ngClass]="imgClass"
|
|
119
154
|
src="{{ data.url }}"
|
|
120
155
|
/>
|
|
121
156
|
</picture>
|
|
@@ -123,10 +158,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
123
158
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
124
159
|
encapsulation: ViewEncapsulation.None,
|
|
125
160
|
standalone: true,
|
|
126
|
-
imports: [NgIf],
|
|
161
|
+
imports: [NgIf, NgClass],
|
|
127
162
|
}]
|
|
128
163
|
}], propDecorators: { data: [{
|
|
129
164
|
type: Input
|
|
165
|
+
}], imgClass: [{
|
|
166
|
+
type: Input
|
|
167
|
+
}], pictureClass: [{
|
|
168
|
+
type: Input
|
|
130
169
|
}] } });
|
|
131
170
|
|
|
132
171
|
const CONTENTFUL_CONFIG = new InjectionToken('TooltipConfig');
|
|
@@ -156,39 +195,47 @@ const provideContentfulConfig = (contentfulConfig) => {
|
|
|
156
195
|
class ContentfulVideoComponent {
|
|
157
196
|
constructor() {
|
|
158
197
|
this._data = null;
|
|
198
|
+
this.videoClass = null;
|
|
159
199
|
}
|
|
160
200
|
get data() {
|
|
161
201
|
return this._data;
|
|
162
202
|
}
|
|
163
203
|
set data(v) {
|
|
204
|
+
if (v && !v.contentType) {
|
|
205
|
+
this._data = null;
|
|
206
|
+
console.warn('The provided asset is invalid', v);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
164
209
|
if (v && !v.contentType.startsWith('video/')) {
|
|
165
210
|
throw new Error('The provided asset is not an video');
|
|
166
211
|
}
|
|
167
|
-
this._data = v;
|
|
212
|
+
this._data = v ?? null;
|
|
168
213
|
}
|
|
169
214
|
}
|
|
170
|
-
ContentfulVideoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
171
|
-
ContentfulVideoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
172
|
-
<video *ngIf="data" controls>
|
|
173
|
-
<source src="
|
|
215
|
+
ContentfulVideoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulVideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
216
|
+
ContentfulVideoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: ContentfulVideoComponent, isStandalone: true, selector: "et-contentful-video", inputs: { data: "data", videoClass: "videoClass" }, ngImport: i0, template: `
|
|
217
|
+
<video *ngIf="data" [ngClass]="videoClass" controls>
|
|
218
|
+
<source src="{{ data.url }}" type="{{ data.contentType }}" />
|
|
174
219
|
</video>
|
|
175
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
220
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulVideoComponent, decorators: [{
|
|
177
222
|
type: Component,
|
|
178
223
|
args: [{
|
|
179
224
|
selector: 'et-contentful-video',
|
|
180
225
|
template: `
|
|
181
|
-
<video *ngIf="data" controls>
|
|
182
|
-
<source src="
|
|
226
|
+
<video *ngIf="data" [ngClass]="videoClass" controls>
|
|
227
|
+
<source src="{{ data.url }}" type="{{ data.contentType }}" />
|
|
183
228
|
</video>
|
|
184
229
|
`,
|
|
185
230
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
186
231
|
encapsulation: ViewEncapsulation.None,
|
|
187
232
|
standalone: true,
|
|
188
|
-
imports: [NgIf],
|
|
233
|
+
imports: [NgIf, NgClass],
|
|
189
234
|
}]
|
|
190
235
|
}], propDecorators: { data: [{
|
|
191
236
|
type: Input
|
|
237
|
+
}], videoClass: [{
|
|
238
|
+
type: Input
|
|
192
239
|
}] } });
|
|
193
240
|
|
|
194
241
|
const createRenderCommandsFromContentfulRichText = (options) => {
|
|
@@ -375,7 +422,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
375
422
|
return this._richText;
|
|
376
423
|
}
|
|
377
424
|
set richText(v) {
|
|
378
|
-
this._richText = v;
|
|
425
|
+
this._richText = v ?? null;
|
|
379
426
|
// clear the element
|
|
380
427
|
this._viewContainerRef.clear();
|
|
381
428
|
if (!v) {
|
|
@@ -429,9 +476,9 @@ class ContentfulRichTextRendererComponent {
|
|
|
429
476
|
}
|
|
430
477
|
}
|
|
431
478
|
}
|
|
432
|
-
ContentfulRichTextRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
433
|
-
ContentfulRichTextRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
479
|
+
ContentfulRichTextRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulRichTextRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
480
|
+
ContentfulRichTextRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.6", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { richText: "richText" }, host: { classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulRichTextRendererComponent, decorators: [{
|
|
435
482
|
type: Component,
|
|
436
483
|
args: [{
|
|
437
484
|
selector: 'et-contentful-rich-text-renderer',
|
|
@@ -449,8 +496,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
449
496
|
|
|
450
497
|
class ContentfulModule {
|
|
451
498
|
}
|
|
452
|
-
ContentfulModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
453
|
-
ContentfulModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
499
|
+
ContentfulModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
500
|
+
ContentfulModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.6", ngImport: i0, type: ContentfulModule, imports: [ContentfulAudioComponent,
|
|
454
501
|
ContentfulFileComponent,
|
|
455
502
|
ContentfulImageComponent,
|
|
456
503
|
ContentfulVideoComponent,
|
|
@@ -459,12 +506,12 @@ ContentfulModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
459
506
|
ContentfulImageComponent,
|
|
460
507
|
ContentfulVideoComponent,
|
|
461
508
|
ContentfulRichTextRendererComponent] });
|
|
462
|
-
ContentfulModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
509
|
+
ContentfulModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulModule, imports: [ContentfulAudioComponent,
|
|
463
510
|
ContentfulFileComponent,
|
|
464
511
|
ContentfulImageComponent,
|
|
465
512
|
ContentfulVideoComponent,
|
|
466
513
|
ContentfulRichTextRendererComponent] });
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.6", ngImport: i0, type: ContentfulModule, decorators: [{
|
|
468
515
|
type: NgModule,
|
|
469
516
|
args: [{
|
|
470
517
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethlete-contentful.mjs","sources":["../../../../libs/contentful/src/lib/components/audio/contentful-audio.component.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/utils/contentful-config.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/lib/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.util.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.component.ts","../../../../libs/contentful/src/lib/contentful.module.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-audio',\n template: `\n <figure *ngIf=\"data\">\n <figcaption>{{ data.title }}</figcaption>\n <audio controls src=\"{{ data.url }}\"></audio>\n </figure>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf],\n})\nexport class ContentfulAudioComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null) {\n if (v && !v.contentType.startsWith('audio/')) {\n throw new Error('The provided asset is not an audio');\n }\n\n this._data = v;\n }\n private _data: ContentfulAsset | null = null;\n}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n <a *ngIf=\"data\" [href]=\"data.url\" class=\"underline\" target=\"_blank\"> {{ data.title }} ({{ data.size }} Bytes) </a>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf],\n})\nexport class ContentfulFileComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null) {\n this._data = v;\n }\n private _data: ContentfulAsset | null = null;\n}\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <picture *ngIf=\"data\">\n <source srcset=\"{{ data.url }}?fm=avif\" />\n <source srcset=\"{{ data.url }}?fm=webp\" />\n <source srcset=\"{{ data.url }}?fm=jpg\" />\n <img\n [attr.alt]=\"data.description ?? undefined\"\n [attr.width]=\"data.width ?? undefined\"\n [attr.height]=\"data.height ?? undefined\"\n src=\"{{ data.url }}\"\n />\n </picture>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf],\n})\nexport class ContentfulImageComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null) {\n if (v && !v.contentType.startsWith('image/')) {\n throw new Error('The provided asset is not an image');\n }\n\n this._data = v;\n }\n private _data: ContentfulAsset | null = null;\n}\n","import { InjectionToken } from '@angular/core';\nimport { ContentfulConfig } from '../utils';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('TooltipConfig');\n","import { ComponentType } from '@angular/cdk/portal';\nimport {\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n} from '../components';\nimport { ContentfulAsset } from '../types';\n\ntype ComponentLikeWithAsset = ComponentType<{ data: ContentfulAsset | null }>;\n\nexport interface ContentfulAssetComponents {\n file: ComponentLikeWithAsset;\n image: ComponentLikeWithAsset;\n video: ComponentLikeWithAsset;\n audio: ComponentLikeWithAsset;\n}\n\nexport class ContentfulConfig {\n /**\n * Default components for rendering contentful assets\n */\n components?: Partial<ContentfulAssetComponents> = {\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n audio: ContentfulAudioComponent,\n };\n\n /**\n * Component for rendering embedded entries\n */\n customComponents?: Record<string, ComponentType<unknown>>;\n\n /**\n * Determines if the contentful rich text renderer should render the contentful rich text with tailwind css classes\n */\n useTailwindClasses = false;\n}\n","import { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig: ContentfulConfig) => {\n return { provide: CONTENTFUL_CONFIG, useValue: contentfulConfig };\n};\n","import { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-video',\n template: `\n <video *ngIf=\"data\" controls>\n <source src=\" {{ data.url }} \" type=\" {{ data.contentType }}\" />\n </video>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf],\n})\nexport class ContentfulVideoComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null) {\n if (v && !v.contentType.startsWith('video/')) {\n throw new Error('The provided asset is not an video');\n }\n\n this._data = v;\n }\n private _data: ContentfulAsset | null = null;\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Block, BLOCKS, Inline, INLINES, Mark, Text } from '@contentful/rich-text-types';\nimport { RichTextResponse, ContentfulAsset } from '../../types';\nimport { ContentfulAssetComponents, ContentfulConfig } from '../../utils';\nimport { ContentfulAudioComponent } from '../audio';\nimport { ContentfulFileComponent } from '../file';\nimport { ContentfulImageComponent } from '../image';\nimport { ContentfulVideoComponent } from '../video';\nimport { RichTextRenderCommand } from './rich-text-renderer.types';\n\nexport const createRenderCommandsFromContentfulRichText = (options: {\n data: RichTextResponse;\n config: ContentfulConfig;\n}) => {\n const { data, config } = options;\n\n const commands: RichTextRenderCommand[] = [];\n const assetMap = new Map<string, ContentfulAsset>();\n\n const assetComponents = getAssetComponentsFromConfig(config);\n\n for (const asset of data.links.assets.block) {\n assetMap.set(asset.sys.id, asset);\n }\n\n createContentfulRenderCommand(\n data.json,\n { children: commands, payload: data.json.nodeType },\n assetMap,\n config.useTailwindClasses,\n assetComponents,\n config.customComponents,\n );\n\n return commands;\n};\n\nexport const createContentfulRenderCommand = (\n node: Block | Inline | Text,\n parent: RichTextRenderCommand,\n assetMap: Map<string, ContentfulAsset>,\n useTailwindClasses: boolean,\n assetComponents: ContentfulAssetComponents,\n customComponents: Record<string, ComponentType<unknown>> | undefined,\n) => {\n const { nodeType, data: nodeData } = node;\n\n const { children, marks, value } = getContentfulNodeProps(node);\n\n const command: RichTextRenderCommand = {\n payload: translateContentfulNodeTypeToHtmlTag(nodeType),\n data: value,\n attributes: {\n ...(marks\n ? {\n class: transformContentfulMarks(marks, useTailwindClasses),\n }\n : {}),\n ...(nodeData['uri'] ? { href: nodeData['uri'], target: '_blank' } : {}),\n },\n children: [],\n };\n\n if (nodeType === BLOCKS.EMBEDDED_ASSET) {\n const asset = assetMap.get(nodeData['target']?.sys?.id);\n\n if (asset) {\n const isImage = asset.contentType.startsWith('image/');\n const isVideo = asset.contentType.startsWith('video/');\n const isAudio = asset.contentType.startsWith('audio/');\n\n command.data = asset;\n\n if (isImage) {\n command.payload = assetComponents.image;\n } else if (isVideo) {\n command.payload = assetComponents.video;\n } else if (isAudio) {\n command.payload = assetComponents.audio;\n } else {\n command.payload = assetComponents.file;\n }\n }\n } else if (nodeType === BLOCKS.EMBEDDED_ENTRY || nodeType === INLINES.EMBEDDED_ENTRY) {\n const componentId = nodeData['target']?.sys?.contentType?.sys?.id;\n const component = customComponents?.[componentId];\n\n if (component) {\n command.payload = component;\n command.data = nodeData['target']?.fields;\n } else {\n command.data = `No component found for embedded entry ${componentId} as ${nodeType}!`;\n }\n }\n\n if (children && (children.length !== 1 || children[0].nodeType !== 'text')) {\n children.forEach((child) => {\n createContentfulRenderCommand(child, command, assetMap, useTailwindClasses, assetComponents, customComponents);\n });\n }\n\n parent.children.push(command);\n\n return command;\n};\n\nexport const getContentfulNodeProps = (node: Block | Inline | Text) => {\n const children = 'content' in node ? node.content : null;\n let marks: Mark[] | null = null;\n let value: string | null = null;\n\n if (children && children.length === 1 && children[0].nodeType === 'text') {\n marks = children[0].marks?.length ? children[0].marks : null;\n value = children[0].value;\n } else {\n marks = 'marks' in node ? (node.marks?.length ? node.marks : null) : null;\n value = 'value' in node ? node.value : null;\n }\n\n return {\n children,\n marks,\n value,\n };\n};\n\nexport const getAssetComponentsFromConfig = (config: ContentfulConfig) => {\n return {\n file: config.components?.file ?? ContentfulFileComponent,\n image: config.components?.image ?? ContentfulImageComponent,\n video: config.components?.video ?? ContentfulVideoComponent,\n audio: config.components?.audio ?? ContentfulAudioComponent,\n };\n};\n\nexport const transformContentfulMarks = (marks: Mark[], useTailwindClasses: boolean) => {\n return marks\n .map((mark) => {\n switch (mark.type) {\n case 'bold':\n return useTailwindClasses ? 'font-bold' : mark.type;\n case 'italic':\n return useTailwindClasses ? 'italic' : mark.type;\n case 'underline':\n return useTailwindClasses ? 'underline' : mark.type;\n case 'code':\n return useTailwindClasses ? 'font-mono' : mark.type;\n default:\n return mark.type;\n }\n })\n .join(' ');\n};\n\nexport const translateContentfulNodeTypeToHtmlTag = (nodeType: 'text' | BLOCKS | INLINES) => {\n switch (nodeType) {\n case BLOCKS.HEADING_1:\n return 'h1';\n case BLOCKS.HEADING_2:\n return 'h2';\n case BLOCKS.HEADING_3:\n return 'h3';\n case BLOCKS.HEADING_4:\n return 'h4';\n case BLOCKS.HEADING_5:\n return 'h5';\n case BLOCKS.HEADING_6:\n return 'h6';\n case BLOCKS.PARAGRAPH:\n return 'p';\n case BLOCKS.UL_LIST:\n return 'ul';\n case BLOCKS.OL_LIST:\n return 'ol';\n case BLOCKS.LIST_ITEM:\n return 'li';\n case BLOCKS.HR:\n return 'hr';\n case BLOCKS.QUOTE:\n return 'blockquote';\n case BLOCKS.TABLE:\n return 'table';\n case BLOCKS.TABLE_ROW:\n return 'tr';\n case BLOCKS.TABLE_CELL:\n return 'td';\n case BLOCKS.TABLE_HEADER_CELL:\n return 'th';\n case BLOCKS.EMBEDDED_ASSET:\n return 'div';\n\n case INLINES.HYPERLINK:\n return 'a';\n case INLINES.ENTRY_HYPERLINK:\n return 'a';\n case INLINES.ASSET_HYPERLINK:\n return 'a';\n\n case 'text':\n return 'span';\n\n // Will be ignored by the renderer\n case 'document':\n return 'document';\n\n // TODO(TRB): These should render components\n case BLOCKS.EMBEDDED_ENTRY:\n return 'div';\n case INLINES.EMBEDDED_ENTRY:\n return 'div';\n\n default:\n return 'div';\n }\n};\n","import { ComponentPortal, DomPortalOutlet } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n ComponentFactoryResolver,\n ElementRef,\n inject,\n Injector,\n Input,\n Renderer2,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../../constants';\nimport { RichTextResponse } from '../../types';\nimport { ContentfulConfig } from '../../utils';\nimport { RichTextRenderCommand } from './rich-text-renderer.types';\nimport { createRenderCommandsFromContentfulRichText } from './rich-text-renderer.util';\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n class: 'et-contentful-rich-text-renderer',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n @Input()\n get richText() {\n return this._richText;\n }\n set richText(v: RichTextResponse | null) {\n this._richText = v;\n\n // clear the element\n this._viewContainerRef.clear();\n\n if (!v) {\n return;\n }\n\n const commands = createRenderCommandsFromContentfulRichText({ data: v, config: this._config });\n\n this._render(commands);\n }\n private _richText: RichTextResponse | null = null;\n\n private _renderer = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _viewContainerRef = inject(ViewContainerRef);\n private _componentFactoryResolver = inject(ComponentFactoryResolver);\n private _document = inject<Document>(DOCUMENT);\n private _appRef = inject(ApplicationRef);\n private _injector = inject(Injector);\n private _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? new ContentfulConfig();\n\n private _render(commands: RichTextRenderCommand[]) {\n // create a document fragment to hold the elements while we create them\n const fragment = document.createDocumentFragment();\n\n const hostCommand: RichTextRenderCommand = {\n payload: 'document',\n children: commands,\n };\n\n // loop over the commands\n this._executeCommand({ command: hostCommand, parent: fragment });\n\n // append the fragment to the host element\n this._renderer.appendChild(this._elementRef.nativeElement, fragment);\n }\n\n private _executeCommand(data: { command: RichTextRenderCommand; parent: Element | DocumentFragment }) {\n const { command, parent } = data;\n\n let element: Element | null = null;\n if (command.payload !== 'document') {\n if (typeof command.payload === 'string') {\n element = this._renderer.createElement(command.payload);\n\n if (command.data) {\n this._renderer.setProperty(element, 'innerText', command.data);\n }\n\n if (command.attributes) {\n for (const [name, value] of Object.entries(command.attributes)) {\n this._renderer.setAttribute(element, name, value);\n }\n }\n\n this._renderer.appendChild(parent, element);\n } else {\n const portal = new DomPortalOutlet(\n parent as Element,\n this._componentFactoryResolver,\n this._appRef,\n this._injector,\n this._document,\n );\n\n const comp = new ComponentPortal(command.payload);\n const ref = comp.attach(portal);\n\n if (command.data) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ref.instance as any).data = command.data;\n }\n\n element = ref.location.nativeElement;\n }\n }\n\n // loop over the commands\n for (const childCommand of command.children) {\n this._executeCommand({ command: childCommand, parent: element ?? parent });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport {\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulRichTextRendererComponent,\n ContentfulVideoComponent,\n} from './public-api';\n\n@NgModule({\n imports: [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n ],\n exports: [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n ],\n})\nexport class ContentfulModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAiBa,wBAAwB,CAAA;AAbrC,IAAA,WAAA,GAAA;QAyBU,IAAK,CAAA,KAAA,GAA2B,IAAI,CAAC;AAC9C,KAAA;AAZC,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IACD,IAAI,IAAI,C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BAAuB;QACvB,wBAAwB;QACxB,wBAAwB;AACxB,QAAA,mCAAmC,aAGnC,wBAAwB;QACxB,uBAAuB;QACvB,wBAAwB;QACxB,wBAAwB;QACxB,mCAAmC,CAAA,EAAA,CAAA,CAAA;AAG1B,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAdzB,wBAAwB;QACxB,uBAAuB;QACvB,wBAAwB;QACxB,wBAAwB;QACxB,mCAAmC,CAAA,EAAA,CAAA,CAAA;2FAU1B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,uBAAuB;wBACvB,wBAAwB;wBACxB,wBAAwB;wBACxB,mCAAmC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,uBAAuB;wBACvB,wBAAwB;wBACxB,wBAAwB;wBACxB,mCAAmC;AACpC,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ethlete-contentful.mjs","sources":["../../../../libs/contentful/src/lib/components/audio/contentful-audio.component.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/utils/contentful-config.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/lib/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.util.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.component.ts","../../../../libs/contentful/src/lib/contentful.module.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { NgClass, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-audio',\n template: `\n <figure *ngIf=\"data\" [ngClass]=\"figureClass\">\n <figcaption [ngClass]=\"figcaptionClass\">{{ data.title }}</figcaption>\n <audio [ngClass]=\"audioClass\" controls src=\"{{ data.url }}\"></audio>\n </figure>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf, NgClass],\n})\nexport class ContentfulAudioComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null | undefined) {\n if (v && !v.contentType) {\n this._data = null;\n\n console.warn('The provided asset is invalid', v);\n\n return;\n }\n\n if (v && !v.contentType.startsWith('audio/')) {\n throw new Error('The provided asset is not an audio');\n }\n\n this._data = v ?? null;\n }\n private _data: ContentfulAsset | null = null;\n\n @Input()\n audioClass: NgClassType = null;\n\n @Input()\n figureClass: NgClassType = null;\n\n @Input()\n figcaptionClass: NgClassType = null;\n}\n","import { NgClass, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n <a *ngIf=\"data\" [href]=\"data.url\" [ngClass]=\"fileClass\" class=\"underline\" target=\"_blank\">\n {{ data.title }} ({{ data.size }} Bytes)\n </a>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf, NgClass],\n})\nexport class ContentfulFileComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null | undefined) {\n if (v && !v.contentType) {\n this._data = null;\n\n console.warn('The provided asset is invalid', v);\n\n return;\n }\n\n this._data = v ?? null;\n }\n private _data: ContentfulAsset | null = null;\n\n @Input()\n fileClass: NgClassType = null;\n}\n","import { NgClass, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <picture *ngIf=\"data\" [ngClass]=\"pictureClass\">\n <source srcset=\"{{ data.url }}?fm=avif\" />\n <source srcset=\"{{ data.url }}?fm=webp\" />\n <source srcset=\"{{ data.url }}?fm=jpg\" />\n <img\n [attr.alt]=\"data.description ?? undefined\"\n [attr.width]=\"data.width ?? undefined\"\n [attr.height]=\"data.height ?? undefined\"\n [ngClass]=\"imgClass\"\n src=\"{{ data.url }}\"\n />\n </picture>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf, NgClass],\n})\nexport class ContentfulImageComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null | undefined) {\n if (v && !v.contentType) {\n this._data = null;\n\n console.warn('The provided asset is invalid', v);\n\n return;\n }\n\n if (v && !v.contentType.startsWith('image/')) {\n throw new Error('The provided asset is not an image');\n }\n\n this._data = v ?? null;\n }\n private _data: ContentfulAsset | null = null;\n\n @Input()\n imgClass: NgClassType = null;\n\n @Input()\n pictureClass: NgClassType = null;\n}\n","import { InjectionToken } from '@angular/core';\nimport { ContentfulConfig } from '../utils';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('TooltipConfig');\n","import { ComponentType } from '@angular/cdk/portal';\nimport {\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n} from '../components';\nimport { ContentfulAsset } from '../types';\n\ntype ComponentLikeWithAsset = ComponentType<{ data: ContentfulAsset | null | undefined }>;\n\nexport interface ContentfulAssetComponents {\n file: ComponentLikeWithAsset;\n image: ComponentLikeWithAsset;\n video: ComponentLikeWithAsset;\n audio: ComponentLikeWithAsset;\n}\n\nexport class ContentfulConfig {\n /**\n * Default components for rendering contentful assets\n */\n components?: Partial<ContentfulAssetComponents> = {\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n audio: ContentfulAudioComponent,\n };\n\n /**\n * Component for rendering embedded entries\n */\n customComponents?: Record<string, ComponentType<unknown>>;\n\n /**\n * Determines if the contentful rich text renderer should render the contentful rich text with tailwind css classes\n */\n useTailwindClasses = false;\n}\n","import { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig: ContentfulConfig) => {\n return { provide: CONTENTFUL_CONFIG, useValue: contentfulConfig };\n};\n","import { NgClass, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-video',\n template: `\n <video *ngIf=\"data\" [ngClass]=\"videoClass\" controls>\n <source src=\"{{ data.url }}\" type=\"{{ data.contentType }}\" />\n </video>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgIf, NgClass],\n})\nexport class ContentfulVideoComponent {\n @Input()\n get data() {\n return this._data;\n }\n set data(v: ContentfulAsset | null | undefined) {\n if (v && !v.contentType) {\n this._data = null;\n\n console.warn('The provided asset is invalid', v);\n\n return;\n }\n\n if (v && !v.contentType.startsWith('video/')) {\n throw new Error('The provided asset is not an video');\n }\n\n this._data = v ?? null;\n }\n private _data: ContentfulAsset | null = null;\n\n @Input()\n videoClass: NgClassType = null;\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Block, BLOCKS, Inline, INLINES, Mark, Text } from '@contentful/rich-text-types';\nimport { RichTextResponse, ContentfulAsset } from '../../types';\nimport { ContentfulAssetComponents, ContentfulConfig } from '../../utils';\nimport { ContentfulAudioComponent } from '../audio';\nimport { ContentfulFileComponent } from '../file';\nimport { ContentfulImageComponent } from '../image';\nimport { ContentfulVideoComponent } from '../video';\nimport { RichTextRenderCommand } from './rich-text-renderer.types';\n\nexport const createRenderCommandsFromContentfulRichText = (options: {\n data: RichTextResponse;\n config: ContentfulConfig;\n}) => {\n const { data, config } = options;\n\n const commands: RichTextRenderCommand[] = [];\n const assetMap = new Map<string, ContentfulAsset>();\n\n const assetComponents = getAssetComponentsFromConfig(config);\n\n for (const asset of data.links.assets.block) {\n assetMap.set(asset.sys.id, asset);\n }\n\n createContentfulRenderCommand(\n data.json,\n { children: commands, payload: data.json.nodeType },\n assetMap,\n config.useTailwindClasses,\n assetComponents,\n config.customComponents,\n );\n\n return commands;\n};\n\nexport const createContentfulRenderCommand = (\n node: Block | Inline | Text,\n parent: RichTextRenderCommand,\n assetMap: Map<string, ContentfulAsset>,\n useTailwindClasses: boolean,\n assetComponents: ContentfulAssetComponents,\n customComponents: Record<string, ComponentType<unknown>> | undefined,\n) => {\n const { nodeType, data: nodeData } = node;\n\n const { children, marks, value } = getContentfulNodeProps(node);\n\n const command: RichTextRenderCommand = {\n payload: translateContentfulNodeTypeToHtmlTag(nodeType),\n data: value,\n attributes: {\n ...(marks\n ? {\n class: transformContentfulMarks(marks, useTailwindClasses),\n }\n : {}),\n ...(nodeData['uri'] ? { href: nodeData['uri'], target: '_blank' } : {}),\n },\n children: [],\n };\n\n if (nodeType === BLOCKS.EMBEDDED_ASSET) {\n const asset = assetMap.get(nodeData['target']?.sys?.id);\n\n if (asset) {\n const isImage = asset.contentType.startsWith('image/');\n const isVideo = asset.contentType.startsWith('video/');\n const isAudio = asset.contentType.startsWith('audio/');\n\n command.data = asset;\n\n if (isImage) {\n command.payload = assetComponents.image;\n } else if (isVideo) {\n command.payload = assetComponents.video;\n } else if (isAudio) {\n command.payload = assetComponents.audio;\n } else {\n command.payload = assetComponents.file;\n }\n }\n } else if (nodeType === BLOCKS.EMBEDDED_ENTRY || nodeType === INLINES.EMBEDDED_ENTRY) {\n const componentId = nodeData['target']?.sys?.contentType?.sys?.id;\n const component = customComponents?.[componentId];\n\n if (component) {\n command.payload = component;\n command.data = nodeData['target']?.fields;\n } else {\n command.data = `No component found for embedded entry ${componentId} as ${nodeType}!`;\n }\n }\n\n if (children && (children.length !== 1 || children[0].nodeType !== 'text')) {\n children.forEach((child) => {\n createContentfulRenderCommand(child, command, assetMap, useTailwindClasses, assetComponents, customComponents);\n });\n }\n\n parent.children.push(command);\n\n return command;\n};\n\nexport const getContentfulNodeProps = (node: Block | Inline | Text) => {\n const children = 'content' in node ? node.content : null;\n let marks: Mark[] | null = null;\n let value: string | null = null;\n\n if (children && children.length === 1 && children[0].nodeType === 'text') {\n marks = children[0].marks?.length ? children[0].marks : null;\n value = children[0].value;\n } else {\n marks = 'marks' in node ? (node.marks?.length ? node.marks : null) : null;\n value = 'value' in node ? node.value : null;\n }\n\n return {\n children,\n marks,\n value,\n };\n};\n\nexport const getAssetComponentsFromConfig = (config: ContentfulConfig) => {\n return {\n file: config.components?.file ?? ContentfulFileComponent,\n image: config.components?.image ?? ContentfulImageComponent,\n video: config.components?.video ?? ContentfulVideoComponent,\n audio: config.components?.audio ?? ContentfulAudioComponent,\n };\n};\n\nexport const transformContentfulMarks = (marks: Mark[], useTailwindClasses: boolean) => {\n return marks\n .map((mark) => {\n switch (mark.type) {\n case 'bold':\n return useTailwindClasses ? 'font-bold' : mark.type;\n case 'italic':\n return useTailwindClasses ? 'italic' : mark.type;\n case 'underline':\n return useTailwindClasses ? 'underline' : mark.type;\n case 'code':\n return useTailwindClasses ? 'font-mono' : mark.type;\n default:\n return mark.type;\n }\n })\n .join(' ');\n};\n\nexport const translateContentfulNodeTypeToHtmlTag = (nodeType: 'text' | BLOCKS | INLINES) => {\n switch (nodeType) {\n case BLOCKS.HEADING_1:\n return 'h1';\n case BLOCKS.HEADING_2:\n return 'h2';\n case BLOCKS.HEADING_3:\n return 'h3';\n case BLOCKS.HEADING_4:\n return 'h4';\n case BLOCKS.HEADING_5:\n return 'h5';\n case BLOCKS.HEADING_6:\n return 'h6';\n case BLOCKS.PARAGRAPH:\n return 'p';\n case BLOCKS.UL_LIST:\n return 'ul';\n case BLOCKS.OL_LIST:\n return 'ol';\n case BLOCKS.LIST_ITEM:\n return 'li';\n case BLOCKS.HR:\n return 'hr';\n case BLOCKS.QUOTE:\n return 'blockquote';\n case BLOCKS.TABLE:\n return 'table';\n case BLOCKS.TABLE_ROW:\n return 'tr';\n case BLOCKS.TABLE_CELL:\n return 'td';\n case BLOCKS.TABLE_HEADER_CELL:\n return 'th';\n case BLOCKS.EMBEDDED_ASSET:\n return 'div';\n\n case INLINES.HYPERLINK:\n return 'a';\n case INLINES.ENTRY_HYPERLINK:\n return 'a';\n case INLINES.ASSET_HYPERLINK:\n return 'a';\n\n case 'text':\n return 'span';\n\n // Will be ignored by the renderer\n case 'document':\n return 'document';\n\n // TODO(TRB): These should render components\n case BLOCKS.EMBEDDED_ENTRY:\n return 'div';\n case INLINES.EMBEDDED_ENTRY:\n return 'div';\n\n default:\n return 'div';\n }\n};\n","import { ComponentPortal, DomPortalOutlet } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n ComponentFactoryResolver,\n ElementRef,\n inject,\n Injector,\n Input,\n Renderer2,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../../constants';\nimport { RichTextResponse } from '../../types';\nimport { ContentfulConfig } from '../../utils';\nimport { RichTextRenderCommand } from './rich-text-renderer.types';\nimport { createRenderCommandsFromContentfulRichText } from './rich-text-renderer.util';\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n class: 'et-contentful-rich-text-renderer',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n @Input()\n get richText() {\n return this._richText;\n }\n set richText(v: RichTextResponse | null | undefined) {\n this._richText = v ?? null;\n\n // clear the element\n this._viewContainerRef.clear();\n\n if (!v) {\n return;\n }\n\n const commands = createRenderCommandsFromContentfulRichText({ data: v, config: this._config });\n\n this._render(commands);\n }\n private _richText: RichTextResponse | null = null;\n\n private _renderer = inject(Renderer2);\n private _elementRef = inject(ElementRef);\n private _viewContainerRef = inject(ViewContainerRef);\n private _componentFactoryResolver = inject(ComponentFactoryResolver);\n private _document = inject<Document>(DOCUMENT);\n private _appRef = inject(ApplicationRef);\n private _injector = inject(Injector);\n private _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? new ContentfulConfig();\n\n private _render(commands: RichTextRenderCommand[]) {\n // create a document fragment to hold the elements while we create them\n const fragment = document.createDocumentFragment();\n\n const hostCommand: RichTextRenderCommand = {\n payload: 'document',\n children: commands,\n };\n\n // loop over the commands\n this._executeCommand({ command: hostCommand, parent: fragment });\n\n // append the fragment to the host element\n this._renderer.appendChild(this._elementRef.nativeElement, fragment);\n }\n\n private _executeCommand(data: { command: RichTextRenderCommand; parent: Element | DocumentFragment }) {\n const { command, parent } = data;\n\n let element: Element | null = null;\n if (command.payload !== 'document') {\n if (typeof command.payload === 'string') {\n element = this._renderer.createElement(command.payload);\n\n if (command.data) {\n this._renderer.setProperty(element, 'innerText', command.data);\n }\n\n if (command.attributes) {\n for (const [name, value] of Object.entries(command.attributes)) {\n this._renderer.setAttribute(element, name, value);\n }\n }\n\n this._renderer.appendChild(parent, element);\n } else {\n const portal = new DomPortalOutlet(\n parent as Element,\n this._componentFactoryResolver,\n this._appRef,\n this._injector,\n this._document,\n );\n\n const comp = new ComponentPortal(command.payload);\n const ref = comp.attach(portal);\n\n if (command.data) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ref.instance as any).data = command.data;\n }\n\n element = ref.location.nativeElement;\n }\n }\n\n // loop over the commands\n for (const childCommand of command.children) {\n this._executeCommand({ command: childCommand, parent: element ?? parent });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport {\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulRichTextRendererComponent,\n ContentfulVideoComponent,\n} from './public-api';\n\n@NgModule({\n imports: [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n ],\n exports: [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n ],\n})\nexport class ContentfulModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAkBa,wBAAwB,CAAA;AAbrC,IAAA,WAAA,GAAA;QAiCU,IAAK,CAAA,KAAA,GAA2B,IAAI,CAAC;QAG7C,IAAU,CAAA,UAAA,GAAgB,IAAI,CAAC;QAG/B,IAAW,CAAA,WAAA,GAAgB,IAAI,CAAC;QAGhC,IAAe,CAAA,eAAA,GAAgB,IAAI,CAAC;AACrC,KAAA;AA7BC,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;IACD,IAAI,IAAI,CAAC,CAAqC,EAAA;AAC5C,QAAA,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE;AACvB,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAElB,YAAA,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;YAEjD,OAAO;AACR,SAAA;QAED,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC5C,YAAA,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;AACvD,SAAA;AAED,QAAA,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC;KACxB;;qHA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AA,CAAA;AAG1B,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAdzB,wBAAwB;QACxB,uBAAuB;QACvB,wBAAwB;QACxB,wBAAwB;QACxB,mCAAmC,CAAA,EAAA,CAAA,CAAA;2FAU1B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,uBAAuB;wBACvB,wBAAwB;wBACxB,wBAAwB;wBACxB,mCAAmC;AACpC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,uBAAuB;wBACvB,wBAAwB;wBACxB,wBAAwB;wBACxB,mCAAmC;AACpC,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { NgClassType } from '@ethlete/core';
|
|
1
2
|
import { ContentfulAsset } from '../../types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ContentfulAudioComponent {
|
|
4
|
-
get data(): ContentfulAsset | null;
|
|
5
|
-
set data(v: ContentfulAsset | null);
|
|
5
|
+
get data(): ContentfulAsset | null | undefined;
|
|
6
|
+
set data(v: ContentfulAsset | null | undefined);
|
|
6
7
|
private _data;
|
|
8
|
+
audioClass: NgClassType;
|
|
9
|
+
figureClass: NgClassType;
|
|
10
|
+
figcaptionClass: NgClassType;
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContentfulAudioComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulAudioComponent, "et-contentful-audio", never, { "data": "data"; }, {}, never, never, true>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulAudioComponent, "et-contentful-audio", never, { "data": "data"; "audioClass": "audioClass"; "figureClass": "figureClass"; "figcaptionClass": "figcaptionClass"; }, {}, never, never, true>;
|
|
9
13
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { NgClassType } from '@ethlete/core';
|
|
1
2
|
import { ContentfulAsset } from '../../types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ContentfulFileComponent {
|
|
4
|
-
get data(): ContentfulAsset | null;
|
|
5
|
-
set data(v: ContentfulAsset | null);
|
|
5
|
+
get data(): ContentfulAsset | null | undefined;
|
|
6
|
+
set data(v: ContentfulAsset | null | undefined);
|
|
6
7
|
private _data;
|
|
8
|
+
fileClass: NgClassType;
|
|
7
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContentfulFileComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulFileComponent, "et-contentful-file", never, { "data": "data"; }, {}, never, never, true>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulFileComponent, "et-contentful-file", never, { "data": "data"; "fileClass": "fileClass"; }, {}, never, never, true>;
|
|
9
11
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { NgClassType } from '@ethlete/core';
|
|
1
2
|
import { ContentfulAsset } from '../../types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ContentfulImageComponent {
|
|
4
|
-
get data(): ContentfulAsset | null;
|
|
5
|
-
set data(v: ContentfulAsset | null);
|
|
5
|
+
get data(): ContentfulAsset | null | undefined;
|
|
6
|
+
set data(v: ContentfulAsset | null | undefined);
|
|
6
7
|
private _data;
|
|
8
|
+
imgClass: NgClassType;
|
|
9
|
+
pictureClass: NgClassType;
|
|
7
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContentfulImageComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulImageComponent, "et-contentful-image", never, { "data": "data"; }, {}, never, never, true>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulImageComponent, "et-contentful-image", never, { "data": "data"; "imgClass": "imgClass"; "pictureClass": "pictureClass"; }, {}, never, never, true>;
|
|
9
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RichTextResponse } from '../../types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ContentfulRichTextRendererComponent {
|
|
4
|
-
get richText(): RichTextResponse | null;
|
|
5
|
-
set richText(v: RichTextResponse | null);
|
|
4
|
+
get richText(): RichTextResponse | null | undefined;
|
|
5
|
+
set richText(v: RichTextResponse | null | undefined);
|
|
6
6
|
private _richText;
|
|
7
7
|
private _renderer;
|
|
8
8
|
private _elementRef;
|
|
@@ -15,16 +15,16 @@ export declare const getContentfulNodeProps: (node: Block | Inline | Text) => {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const getAssetComponentsFromConfig: (config: ContentfulConfig) => {
|
|
17
17
|
file: ComponentType<{
|
|
18
|
-
data: ContentfulAsset | null;
|
|
18
|
+
data: ContentfulAsset | null | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
image: ComponentType<{
|
|
21
|
-
data: ContentfulAsset | null;
|
|
21
|
+
data: ContentfulAsset | null | undefined;
|
|
22
22
|
}>;
|
|
23
23
|
video: ComponentType<{
|
|
24
|
-
data: ContentfulAsset | null;
|
|
24
|
+
data: ContentfulAsset | null | undefined;
|
|
25
25
|
}>;
|
|
26
26
|
audio: ComponentType<{
|
|
27
|
-
data: ContentfulAsset | null;
|
|
27
|
+
data: ContentfulAsset | null | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
};
|
|
30
30
|
export declare const transformContentfulMarks: (marks: Mark[], useTailwindClasses: boolean) => string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { NgClassType } from '@ethlete/core';
|
|
1
2
|
import { ContentfulAsset } from '../../types';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ContentfulVideoComponent {
|
|
4
|
-
get data(): ContentfulAsset | null;
|
|
5
|
-
set data(v: ContentfulAsset | null);
|
|
5
|
+
get data(): ContentfulAsset | null | undefined;
|
|
6
|
+
set data(v: ContentfulAsset | null | undefined);
|
|
6
7
|
private _data;
|
|
8
|
+
videoClass: NgClassType;
|
|
7
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContentfulVideoComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulVideoComponent, "et-contentful-video", never, { "data": "data"; }, {}, never, never, true>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentfulVideoComponent, "et-contentful-video", never, { "data": "data"; "videoClass": "videoClass"; }, {}, never, never, true>;
|
|
9
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/portal';
|
|
2
2
|
import { ContentfulAsset } from '../types';
|
|
3
3
|
declare type ComponentLikeWithAsset = ComponentType<{
|
|
4
|
-
data: ContentfulAsset | null;
|
|
4
|
+
data: ContentfulAsset | null | undefined;
|
|
5
5
|
}>;
|
|
6
6
|
export interface ContentfulAssetComponents {
|
|
7
7
|
file: ComponentLikeWithAsset;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/contentful",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@angular/common": "^14.2.0",
|
|
9
9
|
"@angular/core": "^14.2.0",
|
|
10
|
-
"@
|
|
10
|
+
"@ethlete/core": "0.2.0-next.1"
|
|
11
11
|
},
|
|
12
12
|
"module": "fesm2015/ethlete-contentful.mjs",
|
|
13
13
|
"es2020": "fesm2020/ethlete-contentful.mjs",
|