@ethlete/contentful 4.0.0-next.4 → 4.0.0-next.5
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ethlete/contentful
|
|
2
2
|
|
|
3
|
+
## 4.0.0-next.5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`edea44b`](https://github.com/ethlete-io/ethdk/commit/edea44bf1c494420f02b545202f4b24db9a6395c) Thanks [@TomTomB](https://github.com/TomTomB)! - Update to angular 22
|
|
8
|
+
|
|
3
9
|
## 4.0.0-next.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -30,10 +30,14 @@ const isContentfulGqlAsset = (asset) => {
|
|
|
30
30
|
|
|
31
31
|
class ContentfulAudioComponent {
|
|
32
32
|
constructor() {
|
|
33
|
-
this.asset = input.required(
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
|
|
33
|
+
this.asset = input.required(/* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "asset" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.audioClass = input(null, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "audioClass" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.figureClass = input(null, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "figureClass" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.figcaptionClass = input(null, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "figcaptionClass" }] : /* istanbul ignore next */ []));
|
|
37
41
|
this.data = computed(() => {
|
|
38
42
|
const asset = this.asset();
|
|
39
43
|
if (!asset) {
|
|
@@ -49,10 +53,11 @@ class ContentfulAudioComponent {
|
|
|
49
53
|
url: asset.fields.file.url,
|
|
50
54
|
title: asset.fields.title,
|
|
51
55
|
};
|
|
52
|
-
},
|
|
56
|
+
}, /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
53
58
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ContentfulAudioComponent, isStandalone: true, selector: "et-contentful-audio", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, audioClass: { classPropertyName: "audioClass", publicName: "audioClass", isSignal: true, isRequired: false, transformFunction: null }, figureClass: { classPropertyName: "figureClass", publicName: "figureClass", isSignal: true, isRequired: false, transformFunction: null }, figcaptionClass: { classPropertyName: "figcaptionClass", publicName: "figcaptionClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
56
61
|
@if (data(); as data) {
|
|
57
62
|
<figure [ngClass]="figureClass()">
|
|
58
63
|
<figcaption [ngClass]="figcaptionClass()">{{ data.title }}</figcaption>
|
|
@@ -61,7 +66,7 @@ class ContentfulAudioComponent {
|
|
|
61
66
|
}
|
|
62
67
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
63
68
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulAudioComponent, decorators: [{
|
|
65
70
|
type: Component,
|
|
66
71
|
args: [{
|
|
67
72
|
selector: 'et-contentful-audio',
|
|
@@ -81,8 +86,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
81
86
|
|
|
82
87
|
class ContentfulFileComponent {
|
|
83
88
|
constructor() {
|
|
84
|
-
this.asset = input.required(
|
|
85
|
-
|
|
89
|
+
this.asset = input.required(/* @ts-ignore */
|
|
90
|
+
...(ngDevMode ? [{ debugName: "asset" }] : /* istanbul ignore next */ []));
|
|
91
|
+
this.fileClass = input(null, /* @ts-ignore */
|
|
92
|
+
...(ngDevMode ? [{ debugName: "fileClass" }] : /* istanbul ignore next */ []));
|
|
86
93
|
this.data = computed(() => {
|
|
87
94
|
const asset = this.asset();
|
|
88
95
|
if (!asset) {
|
|
@@ -102,10 +109,11 @@ class ContentfulFileComponent {
|
|
|
102
109
|
size: asset.fields.file.details.size,
|
|
103
110
|
title: asset.fields.title,
|
|
104
111
|
};
|
|
105
|
-
},
|
|
112
|
+
}, /* @ts-ignore */
|
|
113
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
106
114
|
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ContentfulFileComponent, isStandalone: true, selector: "et-contentful-file", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, fileClass: { classPropertyName: "fileClass", publicName: "fileClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
109
117
|
@if (data(); as data) {
|
|
110
118
|
<a [href]="data.url" [ngClass]="fileClass()" class="underline" target="_blank">
|
|
111
119
|
{{ data.title }} ({{ data.size }} Bytes)
|
|
@@ -113,7 +121,7 @@ class ContentfulFileComponent {
|
|
|
113
121
|
}
|
|
114
122
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
115
123
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulFileComponent, decorators: [{
|
|
117
125
|
type: Component,
|
|
118
126
|
args: [{
|
|
119
127
|
selector: 'et-contentful-file',
|
|
@@ -234,17 +242,26 @@ const generateContentfulImageSources = (data, srcsetSizes, backgroundColor, qual
|
|
|
234
242
|
class ContentfulImageComponent {
|
|
235
243
|
constructor() {
|
|
236
244
|
this._contentfulConfig = inject(CONTENTFUL_CONFIG);
|
|
237
|
-
this.asset = input.required(
|
|
238
|
-
|
|
239
|
-
this.
|
|
245
|
+
this.asset = input.required(/* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "asset" }] : /* istanbul ignore next */ []));
|
|
247
|
+
this.backgroundColor = input(null, /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "backgroundColor" }] : /* istanbul ignore next */ []));
|
|
249
|
+
this.srcsetSizes = input(this._contentfulConfig.imageOptions.srcsetSizes, /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "srcsetSizes" }] : /* istanbul ignore next */ []));
|
|
240
251
|
this.quality = input(null, { ...(ngDevMode ? { debugName: "quality" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
241
|
-
this.focusArea = input(null,
|
|
242
|
-
|
|
252
|
+
this.focusArea = input(null, /* @ts-ignore */
|
|
253
|
+
...(ngDevMode ? [{ debugName: "focusArea" }] : /* istanbul ignore next */ []));
|
|
254
|
+
this.resizeBehavior = input(null, /* @ts-ignore */
|
|
255
|
+
...(ngDevMode ? [{ debugName: "resizeBehavior" }] : /* istanbul ignore next */ []));
|
|
243
256
|
this.hasPriority = input(false, { ...(ngDevMode ? { debugName: "hasPriority" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
244
|
-
this.imgClass = input(null,
|
|
245
|
-
|
|
246
|
-
this.
|
|
247
|
-
|
|
257
|
+
this.imgClass = input(null, /* @ts-ignore */
|
|
258
|
+
...(ngDevMode ? [{ debugName: "imgClass" }] : /* istanbul ignore next */ []));
|
|
259
|
+
this.figureClass = input(null, /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "figureClass" }] : /* istanbul ignore next */ []));
|
|
261
|
+
this.figcaptionClass = input(null, /* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [{ debugName: "figcaptionClass" }] : /* istanbul ignore next */ []));
|
|
263
|
+
this.pictureClass = input(null, /* @ts-ignore */
|
|
264
|
+
...(ngDevMode ? [{ debugName: "pictureClass" }] : /* istanbul ignore next */ []));
|
|
248
265
|
this.sizes = input(normalizePictureSizes(this._contentfulConfig.imageOptions.sizes), { ...(ngDevMode ? { debugName: "sizes" } : /* istanbul ignore next */ {}), transform: (v) => normalizePictureSizes(v) });
|
|
249
266
|
this.normalizedAsset = computed(() => {
|
|
250
267
|
const asset = this.asset();
|
|
@@ -264,7 +281,8 @@ class ContentfulImageComponent {
|
|
|
264
281
|
height: asset?.fields?.file?.details?.image?.height ?? null,
|
|
265
282
|
};
|
|
266
283
|
}
|
|
267
|
-
},
|
|
284
|
+
}, /* @ts-ignore */
|
|
285
|
+
...(ngDevMode ? [{ debugName: "normalizedAsset" }] : /* istanbul ignore next */ []));
|
|
268
286
|
this._sources = computed(() => {
|
|
269
287
|
const asset = this.asset();
|
|
270
288
|
const backgroundColor = this.backgroundColor();
|
|
@@ -276,14 +294,16 @@ class ContentfulImageComponent {
|
|
|
276
294
|
return [];
|
|
277
295
|
}
|
|
278
296
|
return generateContentfulImageSources(asset, srcsetSizes, backgroundColor, quality, focusArea, resizeBehavior);
|
|
279
|
-
},
|
|
297
|
+
}, /* @ts-ignore */
|
|
298
|
+
...(ngDevMode ? [{ debugName: "_sources" }] : /* istanbul ignore next */ []));
|
|
280
299
|
this._defaultSrc = computed(() => {
|
|
281
300
|
const asset = this.asset();
|
|
282
301
|
return asset ? generateDefaultContentfulImageSource(asset) : null;
|
|
283
|
-
},
|
|
302
|
+
}, /* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [{ debugName: "_defaultSrc" }] : /* istanbul ignore next */ []));
|
|
284
304
|
}
|
|
285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
286
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
305
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
306
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: ContentfulImageComponent, isStandalone: true, selector: "et-contentful-image", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, srcsetSizes: { classPropertyName: "srcsetSizes", publicName: "srcsetSizes", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, focusArea: { classPropertyName: "focusArea", publicName: "focusArea", isSignal: true, isRequired: false, transformFunction: null }, resizeBehavior: { classPropertyName: "resizeBehavior", publicName: "resizeBehavior", isSignal: true, isRequired: false, transformFunction: null }, hasPriority: { classPropertyName: "hasPriority", publicName: "hasPriority", isSignal: true, isRequired: false, transformFunction: null }, imgClass: { classPropertyName: "imgClass", publicName: "imgClass", isSignal: true, isRequired: false, transformFunction: null }, figureClass: { classPropertyName: "figureClass", publicName: "figureClass", isSignal: true, isRequired: false, transformFunction: null }, figcaptionClass: { classPropertyName: "figcaptionClass", publicName: "figcaptionClass", isSignal: true, isRequired: false, transformFunction: null }, pictureClass: { classPropertyName: "pictureClass", publicName: "pictureClass", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-contentful-image" }, ngImport: i0, template: `
|
|
287
307
|
<et-picture
|
|
288
308
|
[imgClass]="imgClass()"
|
|
289
309
|
[hasPriority]="hasPriority()"
|
|
@@ -300,7 +320,7 @@ class ContentfulImageComponent {
|
|
|
300
320
|
/>
|
|
301
321
|
`, isInline: true, dependencies: [{ kind: "component", type: PictureComponent, selector: "et-picture", inputs: ["sources", "hasPriority", "imgClass", "figureClass", "figcaptionClass", "pictureClass", "defaultSrc", "alt", "figcaption", "width", "height", "sizes"], outputs: ["imgLoaded", "imgError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
302
322
|
}
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulImageComponent, decorators: [{
|
|
304
324
|
type: Component,
|
|
305
325
|
args: [{
|
|
306
326
|
selector: 'et-contentful-image',
|
|
@@ -331,8 +351,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
331
351
|
|
|
332
352
|
class ContentfulVideoComponent {
|
|
333
353
|
constructor() {
|
|
334
|
-
this.asset = input.required(
|
|
335
|
-
|
|
354
|
+
this.asset = input.required(/* @ts-ignore */
|
|
355
|
+
...(ngDevMode ? [{ debugName: "asset" }] : /* istanbul ignore next */ []));
|
|
356
|
+
this.videoClass = input(null, /* @ts-ignore */
|
|
357
|
+
...(ngDevMode ? [{ debugName: "videoClass" }] : /* istanbul ignore next */ []));
|
|
336
358
|
this.data = computed(() => {
|
|
337
359
|
const asset = this.asset();
|
|
338
360
|
if (!asset) {
|
|
@@ -348,10 +370,11 @@ class ContentfulVideoComponent {
|
|
|
348
370
|
url: asset.fields.file.url,
|
|
349
371
|
contentType: asset.fields.file.contentType,
|
|
350
372
|
};
|
|
351
|
-
},
|
|
373
|
+
}, /* @ts-ignore */
|
|
374
|
+
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
352
375
|
}
|
|
353
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
354
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
376
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulVideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
377
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ContentfulVideoComponent, isStandalone: true, selector: "et-contentful-video", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, videoClass: { classPropertyName: "videoClass", publicName: "videoClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
355
378
|
@if (data(); as data) {
|
|
356
379
|
<video [ngClass]="videoClass()" controls>
|
|
357
380
|
<source src="{{ data.url }}" type="{{ data.contentType }}" />
|
|
@@ -359,7 +382,7 @@ class ContentfulVideoComponent {
|
|
|
359
382
|
}
|
|
360
383
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
361
384
|
}
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulVideoComponent, decorators: [{
|
|
363
386
|
type: Component,
|
|
364
387
|
args: [{
|
|
365
388
|
selector: 'et-contentful-video',
|
|
@@ -406,9 +429,12 @@ class ContentfulLinkComponent {
|
|
|
406
429
|
constructor() {
|
|
407
430
|
this._document = inject(DOCUMENT);
|
|
408
431
|
this._config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? createContentfulConfig();
|
|
409
|
-
this.href = input.required(
|
|
410
|
-
|
|
411
|
-
this.
|
|
432
|
+
this.href = input.required(/* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
|
|
434
|
+
this.text = input.required(/* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
436
|
+
this.textClass = input('', /* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [{ debugName: "textClass" }] : /* istanbul ignore next */ []));
|
|
412
438
|
this.isExternal = computed(() => {
|
|
413
439
|
const href = this.href();
|
|
414
440
|
const isAbsolute = href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//');
|
|
@@ -422,7 +448,8 @@ class ContentfulLinkComponent {
|
|
|
422
448
|
catch {
|
|
423
449
|
return true;
|
|
424
450
|
}
|
|
425
|
-
},
|
|
451
|
+
}, /* @ts-ignore */
|
|
452
|
+
...(ngDevMode ? [{ debugName: "isExternal" }] : /* istanbul ignore next */ []));
|
|
426
453
|
this.openInNewTab = computed(() => {
|
|
427
454
|
if (!this.isExternal())
|
|
428
455
|
return false;
|
|
@@ -438,7 +465,8 @@ class ContentfulLinkComponent {
|
|
|
438
465
|
catch {
|
|
439
466
|
return true;
|
|
440
467
|
}
|
|
441
|
-
},
|
|
468
|
+
}, /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "openInNewTab" }] : /* istanbul ignore next */ []));
|
|
442
470
|
this.internalPath = computed(() => {
|
|
443
471
|
const href = this.href();
|
|
444
472
|
if (!href.startsWith('http://') && !href.startsWith('https://') && !href.startsWith('//')) {
|
|
@@ -451,15 +479,17 @@ class ContentfulLinkComponent {
|
|
|
451
479
|
catch {
|
|
452
480
|
return href;
|
|
453
481
|
}
|
|
454
|
-
},
|
|
482
|
+
}, /* @ts-ignore */
|
|
483
|
+
...(ngDevMode ? [{ debugName: "internalPath" }] : /* istanbul ignore next */ []));
|
|
455
484
|
this.linkClass = computed(() => {
|
|
456
485
|
const base = 'et-contentful-rich-text-default-element et-contentful-rich-text-default-a';
|
|
457
486
|
const extra = this.textClass();
|
|
458
487
|
return extra ? `${base} ${extra}` : base;
|
|
459
|
-
},
|
|
488
|
+
}, /* @ts-ignore */
|
|
489
|
+
...(ngDevMode ? [{ debugName: "linkClass" }] : /* istanbul ignore next */ []));
|
|
460
490
|
}
|
|
461
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
462
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
492
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ContentfulLinkComponent, isStandalone: true, selector: "et-contentful-link", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, textClass: { classPropertyName: "textClass", publicName: "textClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
463
493
|
@if (isExternal()) {
|
|
464
494
|
<a
|
|
465
495
|
[class]="linkClass()"
|
|
@@ -471,9 +501,9 @@ class ContentfulLinkComponent {
|
|
|
471
501
|
} @else {
|
|
472
502
|
<a [class]="linkClass()" [routerLink]="internalPath()">{{ text() }}</a>
|
|
473
503
|
}
|
|
474
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
504
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
475
505
|
}
|
|
476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulLinkComponent, decorators: [{
|
|
477
507
|
type: Component,
|
|
478
508
|
args: [{
|
|
479
509
|
selector: 'et-contentful-link',
|
|
@@ -748,12 +778,14 @@ class ContentfulRichTextRendererComponent {
|
|
|
748
778
|
* The contentful response gotten via their REST api.
|
|
749
779
|
* @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection
|
|
750
780
|
*/
|
|
751
|
-
this.content = input.required(
|
|
781
|
+
this.content = input.required(/* @ts-ignore */
|
|
782
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
752
783
|
/**
|
|
753
784
|
* The path to where the rich text field is inside the contentful response. Dot and array notation is allowed.
|
|
754
785
|
* @example "items[0].fields.html"
|
|
755
786
|
*/
|
|
756
|
-
this.richTextPath = input.required(
|
|
787
|
+
this.richTextPath = input.required(/* @ts-ignore */
|
|
788
|
+
...(ngDevMode ? [{ debugName: "richTextPath" }] : /* istanbul ignore next */ []));
|
|
757
789
|
/**
|
|
758
790
|
* A map of all includes in the contentful response.
|
|
759
791
|
* This is useful for looking up assets and entries that are referenced in the rich text without having to use loops.
|
|
@@ -763,7 +795,8 @@ class ContentfulRichTextRendererComponent {
|
|
|
763
795
|
const assets = content?.includes.Asset;
|
|
764
796
|
const entries = content?.includes.Entry;
|
|
765
797
|
return createContentfulIncludeMap({ assets: assets ?? [], entries: entries ?? [] });
|
|
766
|
-
},
|
|
798
|
+
}, /* @ts-ignore */
|
|
799
|
+
...(ngDevMode ? [{ debugName: "contentIncludesMap" }] : /* istanbul ignore next */ []));
|
|
767
800
|
/**
|
|
768
801
|
* The rich text data that should be rendered.
|
|
769
802
|
*/
|
|
@@ -781,14 +814,16 @@ class ContentfulRichTextRendererComponent {
|
|
|
781
814
|
throw richTextRendererError('rich_text_wrong_type', { content, richTextPath });
|
|
782
815
|
}
|
|
783
816
|
return richText;
|
|
784
|
-
},
|
|
817
|
+
}, /* @ts-ignore */
|
|
818
|
+
...(ngDevMode ? [{ debugName: "richTextData" }] : /* istanbul ignore next */ []));
|
|
785
819
|
this.renderCommands = computed(() => {
|
|
786
820
|
const richTextData = this.richTextData();
|
|
787
821
|
if (!richTextData) {
|
|
788
822
|
return [];
|
|
789
823
|
}
|
|
790
824
|
return this._createRenderCommands(richTextData);
|
|
791
|
-
},
|
|
825
|
+
}, /* @ts-ignore */
|
|
826
|
+
...(ngDevMode ? [{ debugName: "renderCommands" }] : /* istanbul ignore next */ []));
|
|
792
827
|
this.renderCommandHistory = toSignal(toObservable(this.renderCommands).pipe(startWith([]), pairwise()), { initialValue: [[], []] });
|
|
793
828
|
this.previousRenderCommandMap = computed(() => {
|
|
794
829
|
const [prevCommands] = this.renderCommandHistory();
|
|
@@ -797,7 +832,8 @@ class ContentfulRichTextRendererComponent {
|
|
|
797
832
|
map.set(getRenderCommandId(command), command);
|
|
798
833
|
}
|
|
799
834
|
return map;
|
|
800
|
-
},
|
|
835
|
+
}, /* @ts-ignore */
|
|
836
|
+
...(ngDevMode ? [{ debugName: "previousRenderCommandMap" }] : /* istanbul ignore next */ []));
|
|
801
837
|
this.renderInstructions = computed(() => {
|
|
802
838
|
const commands = this.renderCommands();
|
|
803
839
|
const previousRenderCommandMap = new Map(this.previousRenderCommandMap());
|
|
@@ -863,7 +899,8 @@ class ContentfulRichTextRendererComponent {
|
|
|
863
899
|
}
|
|
864
900
|
}
|
|
865
901
|
return instructions;
|
|
866
|
-
},
|
|
902
|
+
}, /* @ts-ignore */
|
|
903
|
+
...(ngDevMode ? [{ debugName: "renderInstructions" }] : /* istanbul ignore next */ []));
|
|
867
904
|
toObservable(this.renderInstructions)
|
|
868
905
|
.pipe(takeUntilDestroyed(), tap((instructions) => {
|
|
869
906
|
this._execInstructions(instructions);
|
|
@@ -1324,10 +1361,10 @@ class ContentfulRichTextRendererComponent {
|
|
|
1324
1361
|
this._renderer.appendChild(parentElement, nodeToRender);
|
|
1325
1362
|
}
|
|
1326
1363
|
}
|
|
1327
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1328
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulRichTextRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1365
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, richTextPath: { classPropertyName: "richTextPath", publicName: "richTextPath", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1329
1366
|
}
|
|
1330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ContentfulRichTextRendererComponent, decorators: [{
|
|
1331
1368
|
type: Component,
|
|
1332
1369
|
args: [{
|
|
1333
1370
|
selector: 'et-contentful-rich-text-renderer',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethlete-contentful.mjs","sources":["../../../../libs/contentful/src/lib/gql/asset.fragments.ts","../../../../libs/contentful/src/lib/components/audio/contentful-audio.component.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.utils.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.ts","../../../../libs/contentful/src/lib/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/utils/contentful-config.ts","../../../../libs/contentful/src/lib/components/link/contentful-link.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.errors.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.imports.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/index.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { gql } from '@ethlete/query';\n\nexport const GQL_FRAGMENT_CONTENTFUL_ASSET = gql`\n fragment AssetData on Asset {\n sys {\n id\n }\n url\n title\n width\n height\n description\n contentType\n size\n }\n`;\n\nexport type ContentfulGqlAsset = {\n sys: {\n id: string;\n };\n title: string | null;\n contentType: string | null;\n url: string | null;\n description: string | null;\n width: number | null;\n height: number | null;\n size: number | null;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isContentfulGqlAsset = (asset: any): asset is ContentfulGqlAsset => {\n return asset?.sys?.id && asset?.url && typeof asset?.size === 'number';\n};\n\nexport type ContentfulGqlWhereFilter<TLinkedFrom extends Record<string, unknown> = Record<string, unknown>> = {\n /**\n * Filer by ids.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters/sys-filters\n */\n sys?: {\n id?: string;\n id_not?: string;\n id_in?: string[];\n id_not_in?: string[];\n id_contains?: string;\n id_not_contains?: string;\n };\n /**\n * Filer by tags.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters/contentfulmetadata-filters\n */\n contentfulMetadata?: {\n tags_exists?: boolean;\n tags?: {\n id_contains_some?: string[];\n id_contains_none?: string[];\n id_contains_all?: string[];\n };\n };\n /**\n * Retrieve a collection of entries linked to the specified entry or asset.\n * @see https://www.contentful.com/developers/docs/references/graphql/#links-to-a-specific-item\n */\n linkedFrom?: TLinkedFrom;\n};\n\nexport type ContentfulGqlOrder = `${string}_${'ASC' | 'DESC'}`;\n\nexport type ContentfulGqlCollectionFilterVariables<\n TCustomWhere extends Record<string, unknown> = Record<string, unknown>,\n TLinkedFrom extends Record<string, unknown> = Record<string, unknown>,\n> = {\n /**\n * Zero-indexed offset in the collection from which items are fetched\n * @default 0\n */\n skip?: number;\n\n /**\n * Maximum number of items to fetch. Maximum is 1000.\n * @default 100\n */\n limit?: number;\n\n /**\n * Filter specifications to apply on the collection query.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters\n */\n where?: TCustomWhere & ContentfulGqlWhereFilter<TLinkedFrom>;\n\n /**\n * Order specifications to apply on the collection query.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-order\n */\n order?: ContentfulGqlOrder[];\n\n /**\n * When set to `true` the field will be resolved with non published content.\n * @default false\n */\n preview?: boolean;\n\n /**\n * Locale for the collection items. If not set the default locale is used.\n */\n locale?: string;\n};\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-audio',\n template: `\n @if (data(); as data) {\n <figure [ngClass]=\"figureClass()\">\n <figcaption [ngClass]=\"figcaptionClass()\">{{ data.title }}</figcaption>\n <audio [ngClass]=\"audioClass()\" controls src=\"{{ data.url }}\"></audio>\n </figure>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulAudioComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n audioClass = input<NgClassType>(null);\n figureClass = input<NgClassType>(null);\n figcaptionClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n title: asset.title,\n };\n }\n\n return {\n url: asset.fields.file.url,\n title: asset.fields.title,\n };\n });\n}\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n @if (data(); as data) {\n <a [href]=\"data.url\" [ngClass]=\"fileClass()\" class=\"underline\" target=\"_blank\">\n {{ data.title }} ({{ data.size }} Bytes)\n </a>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulFileComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n fileClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n size: asset.size,\n title: asset.title,\n };\n }\n\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n size: asset.fields.file.details.size,\n title: asset.fields.title,\n };\n });\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ContentfulConfig } from '../types';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('ContentfulConfig');\n","import { PictureSource } from '@ethlete/cdk';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\n\nexport const generateDefaultContentfulImageSource = (data: ContentfulRestAsset | ContentfulGqlAsset): PictureSource => {\n if (isContentfulGqlAsset(data)) {\n if (!data.contentType || !data.url) {\n return {\n type: '',\n srcset: '',\n };\n }\n\n return {\n type: data.contentType,\n srcset: data.url,\n };\n }\n\n if (!data.fields.file.contentType || !data.fields.file.url) {\n return {\n type: '',\n srcset: '',\n };\n }\n\n return {\n type: data.fields.file.contentType,\n srcset: data.fields.file.url,\n };\n};\n\n/**\n * Parses source set sizes into an object containing with and height. Eg.\n * - `\"400\"` - 400px width\n * - `\"400x300\"` - 400px width and 300px height\n * - `\"400w\"` - 400px width\n * - `\"400h\"` - 400px height\n * - `\"400wx300h\"` - 400px width and 300px height\n **/\nexport const parseContentfulImageSize = (size: string): { width: number | null; height: number | null } => {\n let width: string | null | undefined = null;\n let height: string | null | undefined = null;\n\n if (size.includes('x')) {\n const [w, h] = size.split('x');\n\n width = w;\n height = h;\n } else if (size.includes('h')) {\n height = size;\n } else {\n width = size;\n }\n\n return {\n width: width ? parseInt(width, 10) : null,\n height: height ? parseInt(height, 10) : null,\n };\n};\n\nexport const generateContentfulImageSources = (\n data: ContentfulRestAsset | ContentfulGqlAsset,\n srcsetSizes: string[],\n backgroundColor: string | null,\n quality: number | null,\n focusArea: ContentfulImageFocusArea | null,\n resizeBehavior: ContentfulImageResizeBehavior | null,\n): PictureSource[] => {\n const assetData = data;\n\n if (!assetData) {\n return [];\n }\n\n const sources: PictureSource[] = [];\n\n const SOURCE_TYPES = ['image/avif', 'image/webp', 'image/png', 'image/jpg'];\n\n for (const type of SOURCE_TYPES) {\n const baseUrl = isContentfulGqlAsset(assetData) ? assetData.url : assetData.fields.file.url;\n const sourceSets: string[] = [];\n const queryParams: string[] = [];\n\n // Set the format (e.g. 'fm=webp')\n queryParams.push(`fm=${type.split('/')[1]}`);\n\n if (backgroundColor) {\n queryParams.push(`bg=rgb:${backgroundColor}`);\n }\n\n if (quality !== null) {\n queryParams.push(`q=${quality}`);\n }\n\n if (focusArea) {\n queryParams.push(`f=${focusArea}`);\n }\n\n if (resizeBehavior) {\n queryParams.push(`fit=${resizeBehavior}`);\n }\n if (srcsetSizes?.length) {\n const urlWithParams = `${baseUrl}?${queryParams.join('&')}`;\n\n for (const size of srcsetSizes) {\n const { width, height } = parseContentfulImageSize(size);\n\n if (width && height) {\n sourceSets.push(`${urlWithParams}&w=${width}&h=${height} ${width}w`);\n } else if (width) {\n sourceSets.push(`${urlWithParams}&w=${width} ${width}w`);\n } else if (height) {\n sourceSets.push(`${urlWithParams}&h=${height} ${height}h`);\n }\n }\n }\n\n sources.push({\n type,\n srcset: sourceSets.length ? sourceSets.join(', ') : `${baseUrl}?${queryParams.join('&')}`,\n });\n }\n\n return sources;\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { PictureComponent, normalizePictureSizes } from '@ethlete/cdk';\nimport { NgClassType } from '@ethlete/core';\nimport { CONTENTFUL_CONFIG } from '../../constants';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\nimport {\n generateContentfulImageSources,\n generateDefaultContentfulImageSource,\n} from './contentful-image.component.utils';\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <et-picture\n [imgClass]=\"imgClass()\"\n [hasPriority]=\"hasPriority()\"\n [figureClass]=\"figureClass()\"\n [pictureClass]=\"pictureClass()\"\n [figcaptionClass]=\"figcaptionClass()\"\n [defaultSrc]=\"_defaultSrc()\"\n [alt]=\"normalizedAsset().alt ?? null\"\n [figcaption]=\"normalizedAsset().figcaption ?? null\"\n [width]=\"normalizedAsset().width ?? null\"\n [height]=\"normalizedAsset().height ?? null\"\n [sizes]=\"sizes()\"\n [sources]=\"_sources()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [PictureComponent],\n host: {\n class: 'et-contentful-image',\n },\n})\nexport class ContentfulImageComponent {\n _contentfulConfig = inject(CONTENTFUL_CONFIG);\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n backgroundColor = input<string | null>(null);\n srcsetSizes = input<string[]>(this._contentfulConfig.imageOptions.srcsetSizes);\n\n quality = input(null, { transform: numberAttribute });\n focusArea = input<ContentfulImageFocusArea | null>(null);\n resizeBehavior = input<ContentfulImageResizeBehavior | null>(null);\n hasPriority = input(false, { transform: booleanAttribute });\n imgClass = input<NgClassType>(null);\n figureClass = input<NgClassType>(null);\n figcaptionClass = input<NgClassType>(null);\n pictureClass = input<NgClassType>(null);\n sizes = input<string | null, string[] | string | null>(\n normalizePictureSizes(this._contentfulConfig.imageOptions.sizes),\n {\n transform: (v) => normalizePictureSizes(v),\n },\n );\n\n normalizedAsset = computed(() => {\n const asset = this.asset();\n\n if (isContentfulGqlAsset(asset)) {\n return {\n alt: asset.title || null,\n figcaption: asset.description || null,\n width: asset.width,\n height: asset.height,\n };\n } else {\n return {\n alt: asset?.fields?.title || null,\n figcaption: asset?.fields?.description || null,\n width: asset?.fields?.file?.details?.image?.width ?? null,\n height: asset?.fields?.file?.details?.image?.height ?? null,\n };\n }\n });\n\n _sources = computed(() => {\n const asset = this.asset();\n const backgroundColor = this.backgroundColor();\n const srcsetSizes = this.srcsetSizes();\n const quality = this.quality();\n const focusArea = this.focusArea();\n const resizeBehavior = this.resizeBehavior();\n\n if (!asset) {\n return [];\n }\n\n return generateContentfulImageSources(asset, srcsetSizes, backgroundColor, quality, focusArea, resizeBehavior);\n });\n\n _defaultSrc = computed(() => {\n const asset = this.asset();\n\n return asset ? generateDefaultContentfulImageSource(asset) : null;\n });\n}\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-video',\n template: `\n @if (data(); as data) {\n <video [ngClass]=\"videoClass()\" controls>\n <source src=\"{{ data.url }}\" type=\"{{ data.contentType }}\" />\n </video>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulVideoComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n videoClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n };\n }\n\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n };\n });\n}\n","import { ContentfulAudioComponent } from '../components/audio';\nimport { ContentfulFileComponent } from '../components/file';\nimport { ContentfulImageComponent } from '../components/image';\nimport { ContentfulLinkComponent } from '../components/link';\nimport { ContentfulVideoComponent } from '../components/video';\nimport { ContentfulConfig } from '../types';\n\nexport const createContentfulConfig = (\n config: Partial<ContentfulConfig> | null | undefined = {},\n): ContentfulConfig => ({\n // This default config must be inline and not saved inside a const for some weird webpack reason\n ...{\n useTailwindClasses: false,\n internalHosts: [],\n components: {\n audio: ContentfulAudioComponent,\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n link: ContentfulLinkComponent,\n },\n customComponents: {},\n imageOptions: {\n srcsetSizes: ['375w', '1280w', '1920w', '2560w'],\n sizes: [],\n backgroundColor: null,\n },\n },\n ...(config || {}),\n});\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { CONTENTFUL_CONFIG } from '../../constants/contentful.constants';\nimport { createContentfulConfig } from '../../utils/contentful-config';\n\nconst getPrimaryDomain = (host: string): string => {\n const parts = host.split('.');\n return parts.length > 2 ? parts.slice(-2).join('.') : host;\n};\n\n@Component({\n selector: 'et-contentful-link',\n template: `\n @if (isExternal()) {\n <a\n [class]=\"linkClass()\"\n [href]=\"href()\"\n [target]=\"openInNewTab() ? '_blank' : null\"\n [rel]=\"openInNewTab() ? 'noopener noreferrer' : null\"\n >{{ text() }}</a\n >\n } @else {\n <a [class]=\"linkClass()\" [routerLink]=\"internalPath()\">{{ text() }}</a>\n }\n `,\n host: {\n style: 'display: contents',\n },\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ContentfulLinkComponent {\n private readonly _document = inject(DOCUMENT);\n private readonly _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? createContentfulConfig();\n\n href = input.required<string>();\n text = input.required<string>();\n textClass = input('');\n\n isExternal = computed(() => {\n const href = this.href();\n const isAbsolute = href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//');\n\n if (!isAbsolute) return false;\n\n try {\n const parsed = new URL(href.startsWith('//') ? `https:${href}` : href);\n const internalHosts = [this._document.location.host, ...this._config.internalHosts];\n return !internalHosts.includes(parsed.host);\n } catch {\n return true;\n }\n });\n\n openInNewTab = computed(() => {\n if (!this.isExternal()) return false;\n\n const href = this.href();\n\n try {\n const parsed = new URL(href.startsWith('//') ? `https:${href}` : href);\n const internalPrimaryDomains = [\n getPrimaryDomain(this._document.location.host),\n ...this._config.internalHosts.map(getPrimaryDomain),\n ];\n return !internalPrimaryDomains.includes(getPrimaryDomain(parsed.host));\n } catch {\n return true;\n }\n });\n\n internalPath = computed(() => {\n const href = this.href();\n\n if (!href.startsWith('http://') && !href.startsWith('https://') && !href.startsWith('//')) {\n return href;\n }\n\n try {\n const url = new URL(href.startsWith('//') ? `https:${href}` : href);\n return url.pathname + url.search + url.hash;\n } catch {\n return href;\n }\n });\n\n linkClass = computed(() => {\n const base = 'et-contentful-rich-text-default-element et-contentful-rich-text-default-a';\n const extra = this.textClass();\n\n return extra ? `${base} ${extra}` : base;\n });\n}\n","import { RuntimeError } from '@ethlete/core';\n\nexport const RICH_TEXT_RENDERER_ERRORS = {\n rich_text_undefined:\n 'The property value given at richTextPath is undefined. Use the richTextPath input to specify the path to the rich text object.',\n rich_text_wrong_type:\n 'The rich text object does not satisfy the RichTextResponse interface. It should contain a property named \"nodeType\" with the value \"document\".',\n\n asset_id_not_found: 'The asset ID was not found. This node is not supported.',\n entry_id_not_found: 'The entry ID was not found. This node is not supported.',\n\n asset_not_found: 'The asset was not found. This node is not supported.',\n entry_not_found: 'The entry was not found. This node is not supported.',\n\n custom_component_not_found: 'No custom component found for entry type. Please provide one for this type.',\n\n text_parent_not_found: 'The parent node is not found. This structure is not supported.',\n text_parent_wrong_type:\n 'The parent node neither a html element nor a custom component. This structure is not supported.',\n} as const;\n\nconst RICH_TEXT_RENDERER_ERROR_CODES = Object.keys(RICH_TEXT_RENDERER_ERRORS).reduce(\n (acc, key, index) => {\n acc[key as keyof typeof RICH_TEXT_RENDERER_ERRORS] = index;\n return acc;\n },\n {} as Record<keyof typeof RICH_TEXT_RENDERER_ERRORS, number>,\n);\n\nexport const richTextRendererError = (code: keyof typeof RICH_TEXT_RENDERER_ERRORS, data?: unknown) => {\n const message = `<et-contentful-rich-text-renderer>: ${RICH_TEXT_RENDERER_ERRORS[code]}`;\n\n throw new RuntimeError(RICH_TEXT_RENDERER_ERROR_CODES[code], message, data);\n};\n","import { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { isObject } from '@ethlete/core';\nimport { RichTextResponse } from '../../types';\n\nexport const isRichTextRootNode = (node: unknown): node is RichTextResponse => {\n return isObject(node) && 'nodeType' in node && node['nodeType'] === 'document';\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.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 'div';\n\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 { ComponentType } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n ViewContainerRef,\n ViewEncapsulation,\n computed,\n inject,\n input,\n isDevMode,\n reflectComponentType,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { BLOCKS, Block, INLINES, Inline, Mark, Text } from '@contentful/rich-text-types';\nimport { getObjectProperty, injectRenderer, isObject } from '@ethlete/core';\nimport { pairwise, startWith, tap } from 'rxjs';\nimport { CONTENTFUL_CONFIG } from '../../constants/contentful.constants';\nimport {\n ContentfulCollection,\n ContentfulEntry,\n ContentfulEntryLinkItem,\n ContentfulRestAsset,\n RichTextResponse,\n} from '../../types';\nimport { createContentfulConfig } from '../../utils/contentful-config';\nimport { richTextRendererError } from './rich-text-renderer.errors';\nimport { isRichTextRootNode, translateContentfulNodeTypeToHtmlTag } from './rich-text-renderer.util';\n\nexport const RENDER_COMMAND_TYPE = {\n HTML_OPEN: 0,\n HTML_CLOSE: 1,\n TEXT: 2,\n COMPONENT: 3,\n} as const;\n\nexport const RENDER_COMMAND_POSITION = {\n TYPE: 0,\n NESTING_LEVEL: 1,\n DOM_POSITION: 2,\n INDEX: 3,\n} as const;\n\nexport const HTML_OPEN_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n TAG_NAME: 5,\n ELEMENT_ID: 6,\n} as const;\n\nexport const HTML_CLOSE_RENDER_COMMAND_POSITION = {\n TAG_NAME: 4,\n ELEMENT_ID: 5,\n} as const;\n\nexport const TEXT_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n TEXT: 5,\n TEXT_ID: 6,\n} as const;\n\nexport const COMPONENT_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n COMPONENT: 5,\n INPUTS: 6,\n COMPONENT_ID: 7,\n} as const;\n\ntype HtmlOpenRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.HTML_OPEN,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n tagName: keyof HTMLElementTagNameMap,\n textId: string,\n];\n\ntype HtmlCloseRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.HTML_CLOSE,\n nestingLevel: number,\n domPosition: number,\n index: number,\n tagName: keyof HTMLElementTagNameMap,\n elementId: string,\n];\n\ntype TextRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.TEXT,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n text: string,\n elementId: string,\n];\n\ntype ComponentRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.COMPONENT,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n component: ComponentType<unknown>,\n inputs: Record<string, unknown>,\n componentId: string,\n];\n\ntype RenderCommand = HtmlOpenRenderCommand | HtmlCloseRenderCommand | TextRenderCommand | ComponentRenderCommand;\n\nexport const RENDER_INSTRUCTION_POSITION = {\n TYPE: 0,\n COMMAND: 1,\n} as const;\n\nexport const RENDER_INSTRUCTION_TYPE = {\n CREATE: 0,\n UPDATE: 1,\n DELETE: 2,\n MOVE: 3,\n} as const;\n\ntype RenderInstructionTypeValue = (typeof RENDER_INSTRUCTION_TYPE)[keyof typeof RENDER_INSTRUCTION_TYPE];\n\ntype RenderInstruction = [RenderInstructionTypeValue, RenderCommand];\n\nconst MARK_TAILWIND_MAP: Record<string, string> = {\n bold: 'font-bold',\n italic: 'italic',\n underline: 'underline',\n code: 'font-mono',\n};\n\nexport const marksToClass = (marks: Mark[]) => {\n const classes: string[] = [];\n\n for (const mark of marks) {\n let klass = MARK_TAILWIND_MAP[mark.type];\n\n if (!klass) {\n console.warn(`No class found for mark type! Falling back to \"${mark.type}\".`, mark);\n\n klass = mark.type;\n }\n\n classes.push(klass);\n }\n\n return classes.join(' ');\n};\n\nexport const isHtmlOpenRenderCommand = (command: RenderCommand): command is HtmlOpenRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_OPEN;\n};\n\nexport const isHtmlCloseRenderCommand = (command: RenderCommand): command is HtmlCloseRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_CLOSE;\n};\n\nexport const isTextRenderCommand = (command: RenderCommand): command is TextRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.TEXT;\n};\n\nexport const isComponentRenderCommand = (command: RenderCommand): command is ComponentRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.COMPONENT;\n};\n\nexport const getRenderCommandId = (command: RenderCommand) => {\n if (isHtmlOpenRenderCommand(command)) {\n return command[HTML_OPEN_RENDER_COMMAND_POSITION.ELEMENT_ID];\n } else if (isHtmlCloseRenderCommand(command)) {\n return command[HTML_CLOSE_RENDER_COMMAND_POSITION.ELEMENT_ID];\n } else if (isTextRenderCommand(command)) {\n return command[TEXT_RENDER_COMMAND_POSITION.TEXT_ID];\n } else {\n return command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT_ID];\n }\n};\n\nconst CLASS_ATTR = 'class';\nconst DEFAULT_COMPONENT_TYPES = {\n IMAGE: '$$$_et-image',\n VIDEO: '$$$_et-video',\n AUDIO: '$$$_et-audio',\n FILE: '$$$_et-file',\n LINK: '$$$_et-link',\n};\n\ntype ExecutedCommandCacheItemBase = {\n element: HTMLElement;\n};\n\ntype ExecutedComponentCommandCacheItem = {\n command: ComponentRenderCommand;\n componentRef: ComponentRef<unknown>;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedHtmlCommandCacheItem = {\n command: HtmlOpenRenderCommand | HtmlCloseRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedTextCommandCacheItem = {\n command: TextRenderCommand;\n textNode: unknown;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedCommandCacheItem =\n | ExecutedComponentCommandCacheItem\n | ExecutedHtmlCommandCacheItem\n | ExecutedTextCommandCacheItem;\n\nexport const isExecutedComponentCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedComponentCommandCacheItem => {\n return isComponentRenderCommand(cache.command);\n};\n\nexport const isExecutedHtmlOrTextCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedHtmlCommandCacheItem => {\n return isHtmlCloseRenderCommand(cache.command) || isHtmlOpenRenderCommand(cache.command);\n};\n\nexport const isExecutedTextCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedTextCommandCacheItem => {\n return isTextRenderCommand(cache.command);\n};\n\nexport const ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID = '$$$_et-contentful-any-entry-content-type-sys-id';\n\nexport type ContentfulIncludeMap = {\n /**\n * Select an entry by its ID and content type ID.\n *\n * The content type ID can be found inside the entry -> sys -> contentType -> sys -> id property.\n *\n * You can provide the `ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID` constant to match any entry sys ID.\n * But be aware that this will return the entry as is without any type checking.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntry: <T extends { [key: string]: any }>(id: string, contentTypeId: string) => ContentfulEntry<T> | null;\n\n /**\n * Select multiple entries by their IDs and content type ID.\n * If an entry is not found, it will be omitted from the result.\n *\n * The content type ID can be found inside the entry -> sys -> contentType -> sys -> id property.\n *\n * You can provide the `ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID` constant to match any entry sys ID.\n * But be aware that this will return the entry as is without any type checking.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries: <T extends { [key: string]: any }>(\n ids: string[] | ContentfulEntryLinkItem[],\n contentTypeId: string,\n ) => ContentfulEntry<T>[];\n\n /**\n * Select an asset by its ID.\n */\n getAsset: (id: string) => ContentfulRestAsset | null;\n\n /**\n * Select multiple assets by their IDs. If an asset is not found, it will be omitted from the result.\n */\n getAssets: (ids: string[]) => ContentfulRestAsset[];\n};\n\nexport type CreateContentfulIncludeMapConfig = {\n /** The entries that should be present inside the map */\n entries: ContentfulEntry[];\n\n /** The assets that should be present inside the map */\n assets: ContentfulRestAsset[];\n};\n\n/**\n * Create a contentful include map using the provided entries and assets.\n */\nexport const createContentfulIncludeMap = (config: CreateContentfulIncludeMapConfig): ContentfulIncludeMap => {\n const { entries, assets } = config;\n\n const assetMap = new Map(assets.map((asset) => [asset.sys.id, asset]));\n const entryMap = new Map(entries.map((entry) => [entry.sys.id, entry]));\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getEntry = <T extends { [key: string]: any }>(id: string, contentTypeId: string) => {\n const entry = entryMap.get(id);\n\n if (!entry) {\n if (isDevMode()) {\n console.warn('Entry not found! Will return null. Is the include query param to low?', { id, entryMap });\n }\n\n return null;\n }\n\n if (contentTypeId === ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID) {\n return entry as ContentfulEntry<T>;\n }\n\n if (entry.sys.contentType.sys.id !== contentTypeId) {\n if (isDevMode()) {\n console.warn('Entry sys ID does not match the provided sys ID! Will return null.', {\n entry,\n sysId: contentTypeId,\n });\n }\n\n return null;\n }\n\n return entry as ContentfulEntry<T>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getEntries = <T extends { [key: string]: any }>(\n ids: string[] | ContentfulEntryLinkItem[],\n contentTypeId: string,\n ) => {\n const entries = ids\n .map((id) => (typeof id === 'string' ? id : id.sys.id))\n .map((id) => getEntry<T>(id, contentTypeId))\n .filter((entry): entry is ContentfulEntry<T> => entry !== null);\n\n return entries;\n };\n\n const getAsset = (id: string) => {\n return assetMap.get(id) ?? null;\n };\n\n const getAssets = (ids: string[]) => {\n return ids.map((id) => getAsset(id)).filter((asset): asset is ContentfulRestAsset => asset !== null);\n };\n\n return {\n getEntry,\n getEntries,\n getAsset,\n getAssets,\n };\n};\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'et-contentful-rich-text-renderer',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n _viewContainerRef = inject(ViewContainerRef);\n _renderer = injectRenderer();\n _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n _document = inject(DOCUMENT);\n _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? createContentfulConfig();\n\n /**\n * A cache for all executed commands that are not deleted.\n * This is used to keep track of all rendered elements and components.\n * The key is the render command element ID.\n */\n _executedCommandsCache = new Map<string, ExecutedCommandCacheItem>();\n\n /**\n * The contentful response gotten via their REST api.\n * @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection\n */\n content = input.required<ContentfulCollection | null | undefined>();\n\n /**\n * The path to where the rich text field is inside the contentful response. Dot and array notation is allowed.\n * @example \"items[0].fields.html\"\n */\n richTextPath = input.required<string>();\n\n /**\n * A map of all includes in the contentful response.\n * This is useful for looking up assets and entries that are referenced in the rich text without having to use loops.\n */\n contentIncludesMap = computed<ContentfulIncludeMap>(() => {\n const content = this.content();\n const assets = content?.includes.Asset;\n const entries = content?.includes.Entry;\n\n return createContentfulIncludeMap({ assets: assets ?? [], entries: entries ?? [] });\n });\n\n /**\n * The rich text data that should be rendered.\n */\n richTextData = computed(() => {\n const content = this.content();\n const richTextPath = this.richTextPath();\n\n if (!content) {\n return null;\n }\n\n const richText = getObjectProperty(content as unknown as Record<string, unknown>, richTextPath);\n\n if (!isObject(richText)) {\n throw richTextRendererError('rich_text_undefined', { content, richTextPath });\n }\n\n if (!isRichTextRootNode(richText)) {\n throw richTextRendererError('rich_text_wrong_type', { content, richTextPath });\n }\n\n return richText as RichTextResponse;\n });\n\n renderCommands = computed(() => {\n const richTextData = this.richTextData();\n\n if (!richTextData) {\n return [];\n }\n\n return this._createRenderCommands(richTextData);\n });\n\n renderCommandHistory = toSignal(\n toObservable(this.renderCommands).pipe(startWith([] as RenderCommand[]), pairwise()),\n { initialValue: [[], []] },\n );\n\n previousRenderCommandMap = computed(() => {\n const [prevCommands] = this.renderCommandHistory();\n\n const map = new Map<string | number, RenderCommand>();\n\n for (const command of prevCommands) {\n map.set(getRenderCommandId(command), command);\n }\n\n return map;\n });\n\n renderInstructions = computed(() => {\n const commands = this.renderCommands();\n const previousRenderCommandMap = new Map(this.previousRenderCommandMap());\n\n const instructions: RenderInstruction[] = [];\n\n // remove deleted components as well as all other elements\n for (const [, command] of previousRenderCommandMap) {\n if (isComponentRenderCommand(command)) {\n // keep the component around if it's still in the new commands\n if (commands.some((c) => getRenderCommandId(c) === getRenderCommandId(command))) {\n continue;\n }\n }\n\n instructions.push([RENDER_INSTRUCTION_TYPE.DELETE, command]);\n\n // remove from map to mark as used\n previousRenderCommandMap.delete(getRenderCommandId(command));\n }\n\n // Find the indexes of the commands remaining in the previousRenderCommandMap in the new commands array.\n const lastComponentIndexes: { newIndex: number; prevIndex: number; command: RenderCommand }[] = [];\n for (const [id, command] of previousRenderCommandMap) {\n const index = commands.findIndex((c) => getRenderCommandId(c) === id);\n const newCommand = commands[index]!;\n\n if (index === -1) {\n throw new Error('Command not found!');\n }\n\n lastComponentIndexes.push({\n newIndex: index,\n prevIndex: command[RENDER_COMMAND_POSITION.INDEX],\n command: newCommand,\n });\n }\n\n lastComponentIndexes.sort((a, b) => a.newIndex - b.newIndex);\n\n // check if the prevIndex are in order ascending\n // for indexes that are not in order, create a move instruction\n // for indexes that are in order, create an update instruction\n let moveCheckIndex = 0;\n while (moveCheckIndex < lastComponentIndexes.length - 1) {\n const moveCurr = lastComponentIndexes[moveCheckIndex];\n const moveNext = lastComponentIndexes[moveCheckIndex + 1];\n\n if (!moveCurr || !moveNext) {\n break;\n }\n\n if (moveCurr.prevIndex > moveNext.prevIndex) {\n lastComponentIndexes.splice(moveCheckIndex + 1, 1);\n instructions.push([RENDER_INSTRUCTION_TYPE.MOVE, moveNext.command]);\n } else {\n instructions.push([RENDER_INSTRUCTION_TYPE.UPDATE, moveNext.command]);\n moveCheckIndex++;\n }\n }\n\n for (const command of commands) {\n const id = getRenderCommandId(command);\n\n if (isComponentRenderCommand(command)) {\n const previousCommand = previousRenderCommandMap.get(id);\n\n if (!previousCommand) {\n // create\n instructions.push([RENDER_INSTRUCTION_TYPE.CREATE, command]);\n }\n } else {\n // create\n instructions.push([RENDER_INSTRUCTION_TYPE.CREATE, command]);\n }\n }\n\n return instructions;\n });\n\n constructor() {\n toObservable(this.renderInstructions)\n .pipe(\n takeUntilDestroyed(),\n tap((instructions) => {\n this._execInstructions(instructions);\n }),\n )\n .subscribe();\n }\n\n private _createRenderCommands(richTextData: RichTextResponse) {\n /** List of all render commands */\n const rootCommands: RenderCommand[] = [];\n\n /** Counter for generating unique html element IDs. */\n let elementOpenId = 0;\n\n /** Counter for generating unique html element IDs. */\n let elementCloseId = 0;\n\n /** Counter for generating unique component IDs. */\n const componentIdMap = new Map<string, number>();\n\n /** The nesting level of the current node. */\n let nestingLevel = 0;\n\n /** The position (index) of the current node inside the parent node. */\n let domPosition = 0;\n\n let textId = 0;\n\n let commandIndex = 0;\n\n const traverse = (node: Block | Inline | Text) => {\n switch (node.nodeType) {\n case 'text': {\n // Render media\n const type = RENDER_COMMAND_TYPE.TEXT;\n const text = node.value;\n\n if (!text) break;\n\n const attributes: Record<string, string> = {\n class: 'et-contentful-rich-text-default-element et-contentful-rich-text-default-span',\n };\n\n if (node.marks.length) {\n const markClasses = marksToClass(node.marks);\n\n if (CLASS_ATTR in attributes) {\n attributes[CLASS_ATTR] += ` ${markClasses}`;\n } else {\n attributes[CLASS_ATTR] = markClasses;\n }\n }\n\n const id = 't' + textId++;\n\n const command: TextRenderCommand = [type, nestingLevel, domPosition, commandIndex++, attributes, text, id];\n\n rootCommands.push(command);\n domPosition++;\n\n break;\n }\n\n case BLOCKS.EMBEDDED_ASSET: {\n // Render media\n const type = RENDER_COMMAND_TYPE.COMPONENT;\n const assetId = node.data['target']?.sys?.id;\n\n if (!assetId) {\n throw richTextRendererError('asset_id_not_found', { node });\n }\n\n const asset = this.contentIncludesMap().getAsset(assetId);\n\n if (!asset) {\n throw richTextRendererError('asset_not_found', { assetId, node });\n }\n\n const contentType = asset.fields.file.contentType;\n const assetComponents = this._config.components;\n\n // Every property inside the asset will be null if no file was provided for a translation.\n // In this case, we can assume that the asset is missing due to user error.\n const isMissing = !contentType && !asset.fields.file.url;\n\n if (isMissing) {\n if (isDevMode()) {\n console.warn(\n 'Asset is missing file data! Asset will be skipped. Did you forget to upload a file for the current translation in Contentful?',\n { asset },\n );\n }\n\n break;\n }\n\n const isImage = contentType?.startsWith('image/');\n const isVideo = contentType?.startsWith('video/');\n const isAudio = contentType?.startsWith('audio/');\n\n const component = isImage\n ? assetComponents.image\n : isVideo\n ? assetComponents.video\n : isAudio\n ? assetComponents.audio\n : assetComponents.file;\n\n const componentType = isImage\n ? DEFAULT_COMPONENT_TYPES.IMAGE\n : isVideo\n ? DEFAULT_COMPONENT_TYPES.VIDEO\n : isAudio\n ? DEFAULT_COMPONENT_TYPES.AUDIO\n : DEFAULT_COMPONENT_TYPES.FILE;\n\n let componentId = componentIdMap.get(componentType) ?? -1;\n const id = componentType + ++componentId;\n componentIdMap.set(componentType, componentId);\n\n const attributes = {};\n\n const inputs = {\n asset,\n };\n\n const command: ComponentRenderCommand = [\n type,\n nestingLevel,\n domPosition,\n commandIndex++,\n attributes,\n component,\n inputs,\n id,\n ];\n\n rootCommands.push(command);\n\n domPosition++;\n\n break;\n }\n\n case INLINES.HYPERLINK: {\n const uri = (node.data['uri'] as string) ?? '';\n\n // Collect all text and marks from children (hyperlink children are text nodes)\n let linkText = '';\n const linkMarks: Mark[] = [];\n\n for (const child of node.content) {\n if (child.nodeType === 'text') {\n linkText += child.value;\n linkMarks.push(...child.marks);\n }\n }\n\n const textClass = linkMarks.length ? marksToClass(linkMarks) : '';\n\n let linkComponentId = componentIdMap.get(DEFAULT_COMPONENT_TYPES.LINK) ?? -1;\n const linkId = DEFAULT_COMPONENT_TYPES.LINK + ++linkComponentId;\n componentIdMap.set(DEFAULT_COMPONENT_TYPES.LINK, linkComponentId);\n\n const linkCommand: ComponentRenderCommand = [\n RENDER_COMMAND_TYPE.COMPONENT,\n nestingLevel,\n domPosition,\n commandIndex++,\n {},\n this._config.components.link,\n { href: uri, text: linkText, textClass },\n linkId,\n ];\n\n rootCommands.push(linkCommand);\n domPosition++;\n\n break;\n }\n\n case BLOCKS.EMBEDDED_ENTRY:\n case INLINES.EMBEDDED_ENTRY: {\n // Render component\n const type = RENDER_COMMAND_TYPE.COMPONENT;\n const entryId = node.data['target']?.sys?.id;\n\n if (!entryId) {\n throw richTextRendererError('entry_id_not_found', { node });\n }\n\n const entry = this.contentIncludesMap().getEntry(entryId, ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID);\n\n if (!entry) {\n throw richTextRendererError('entry_not_found', { entryId, node });\n }\n\n const componentType = entry.sys.contentType.sys.id;\n\n const component = this._config.customComponents[componentType];\n\n if (!component) {\n throw richTextRendererError('custom_component_not_found', {\n componentType,\n customComponents: this._config.customComponents,\n entry,\n });\n }\n\n const attributes = {};\n let componentId = componentIdMap.get(componentType) ?? -1;\n const id = componentType + ++componentId;\n componentIdMap.set(componentType, componentId);\n\n const inputs = {\n fields: entry.fields,\n metadata: entry.metadata,\n sys: entry.sys,\n includes: this.contentIncludesMap(),\n };\n\n const command: ComponentRenderCommand = [\n type,\n nestingLevel,\n domPosition,\n commandIndex++,\n attributes,\n component,\n inputs,\n id,\n ];\n\n rootCommands.push(command);\n\n domPosition++;\n\n break;\n }\n\n default: {\n const type = RENDER_COMMAND_TYPE.HTML_OPEN;\n const tag = translateContentfulNodeTypeToHtmlTag(node.nodeType);\n const attributes: Record<string, string> = {\n class: `et-contentful-rich-text-default-element et-contentful-rich-text-default-${tag}`,\n };\n const id = 'e-o' + elementOpenId++;\n\n const command: HtmlOpenRenderCommand = [type, nestingLevel, domPosition, commandIndex++, attributes, tag, id];\n\n rootCommands.push(command);\n\n const domPositionAtThisLevel = domPosition;\n // Normal html elements can have children\n for (const child of node.content) {\n domPosition = 0;\n nestingLevel++;\n traverse(child);\n nestingLevel--;\n domPosition = domPositionAtThisLevel;\n }\n\n const lastCommand = rootCommands[rootCommands.length - 1];\n\n if (\n lastCommand?.[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_OPEN &&\n lastCommand[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME] !== 'td' &&\n lastCommand[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME] !== 'hr'\n ) {\n // If the last command is an open command, we can remove it since it's empty\n rootCommands.pop();\n elementOpenId--;\n commandIndex--;\n } else {\n const closeId = 'e-c' + elementCloseId++;\n\n const closeCommand: HtmlCloseRenderCommand = [\n RENDER_COMMAND_TYPE.HTML_CLOSE,\n nestingLevel,\n domPosition,\n commandIndex++,\n tag,\n closeId,\n ];\n rootCommands.push(closeCommand);\n\n domPosition++;\n }\n\n break;\n }\n }\n };\n\n for (const node of richTextData.content) {\n traverse(node);\n }\n\n return rootCommands;\n }\n\n private _execInstructions(instructions: RenderInstruction[]) {\n for (const instruction of instructions) {\n const type = instruction[RENDER_INSTRUCTION_POSITION.TYPE];\n const command = instruction[RENDER_INSTRUCTION_POSITION.COMMAND];\n\n switch (type) {\n case RENDER_INSTRUCTION_TYPE.CREATE:\n this._runCreateInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.UPDATE:\n this._runUpdateInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.MOVE:\n this._runMoveInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.DELETE:\n this._runDeleteInstruction(command);\n break;\n }\n }\n }\n\n private _runCreateInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const parentElement = this._findParent(command);\n const nextElement = this._findFollowingElement(command);\n\n if (isComponentRenderCommand(command)) {\n const componentRef = this._viewContainerRef.createComponent(command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT]);\n\n this._updateComponentInputs(command, componentRef);\n\n const rootNode = this._getComponentRootNode(componentRef);\n\n this._renderInsertOrAppend(rootNode, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n componentRef,\n element: rootNode,\n });\n } else if (isTextRenderCommand(command)) {\n const text = command[TEXT_RENDER_COMMAND_POSITION.TEXT];\n const span = this._renderer.createElement('span');\n const attributes = command[TEXT_RENDER_COMMAND_POSITION.ATTRIBUTES];\n const textSplitInLineBreaks = text.split('\\n').filter((t) => t.trim().length > 0);\n\n const textNodes: unknown[] = [];\n\n for (const [key, value] of Object.entries(attributes)) {\n this._renderer.setAttribute(span, key, value);\n }\n\n if (text.startsWith('\\n')) {\n const brNode = this._renderer.createElement('br');\n this._renderer.appendChild(parentElement, brNode);\n }\n\n for (const [textPartIndex, textPart] of textSplitInLineBreaks.entries()) {\n if (textPartIndex > 0) {\n const brNode = this._renderer.createElement('br');\n this._renderer.appendChild(span, brNode);\n }\n\n const textNode = this._renderer.createText(textPart);\n\n this._renderer.appendChild(span, textNode);\n\n textNodes.push(textNode);\n }\n\n this._renderInsertOrAppend(span, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n element: span,\n textNode: textNodes,\n });\n } else if (isHtmlOpenRenderCommand(command)) {\n const tag = command[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME];\n const attributes = command[HTML_OPEN_RENDER_COMMAND_POSITION.ATTRIBUTES];\n const element = this._renderer.createElement(tag);\n\n for (const [key, value] of Object.entries(attributes)) {\n this._renderer.setAttribute(element, key, value);\n }\n\n this._renderInsertOrAppend(element, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n element,\n });\n }\n }\n\n private _runUpdateInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n const componentRef = cached.componentRef;\n\n if (!componentRef) {\n throw new Error('Component ref not found!');\n }\n\n this._updateComponentInputs(command, componentRef);\n }\n\n this._executedCommandsCache.set(id, {\n ...cached,\n command: command as any,\n });\n }\n\n private _runMoveInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n const componentRef = cached.componentRef;\n\n if (!componentRef) {\n throw new Error('Component ref not found!');\n }\n\n const rootNode = cached.element;\n const oldParentElement = cached.element.parentElement;\n\n if (oldParentElement) {\n this._renderer.removeChild(oldParentElement, rootNode);\n }\n\n const newParentElement = this._findParent(command);\n const nextElement = this._findFollowingElement(command);\n\n this._renderInsertOrAppend(rootNode, newParentElement, nextElement);\n\n this._updateComponentInputs(command, componentRef);\n\n this._executedCommandsCache.set(id, {\n ...cached,\n command: command as any,\n });\n }\n }\n\n private _runDeleteInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n if (isHtmlCloseRenderCommand(command)) {\n return;\n }\n\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n cached.componentRef?.destroy();\n } else if (isTextRenderCommand(command)) {\n if (cached.element?.parentElement) {\n this._renderer.removeChild(cached.element.parentElement, cached.element);\n }\n } else if (isHtmlOpenRenderCommand(command)) {\n if (cached.element?.parentElement) {\n this._renderer.removeChild(cached.element.parentElement, cached.element);\n }\n }\n\n this._executedCommandsCache.delete(id);\n }\n\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n\n private _updateComponentInputs(command: ComponentRenderCommand, componentRef: ComponentRef<any>) {\n const inputMeta = reflectComponentType(command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT])?.inputs ?? [];\n const inputsByProp = new Map(inputMeta.map((i) => [i.propName, i.templateName]));\n\n for (const [key, value] of Object.entries(command[COMPONENT_RENDER_COMMAND_POSITION.INPUTS])) {\n const publicName = inputsByProp.get(key);\n\n if (publicName === undefined) continue;\n\n componentRef.setInput(publicName, value);\n }\n }\n\n private _findParent(command: RenderCommand) {\n const hostElement = this._elementRef.nativeElement;\n const nestingLevel = command[RENDER_COMMAND_POSITION.NESTING_LEVEL];\n let parentElement: HTMLElement | undefined;\n\n if (nestingLevel === 0) {\n parentElement = hostElement;\n } else {\n // Reverse search all render commands beginning from the current one using a for loop.\n // The parent is found when the command's nesting level ist the same as the current nesting level minus 1.\n // If the parent is not found, throw an error.\n const allCommands = this.renderCommands();\n const currentCommandIndex = command[RENDER_COMMAND_POSITION.INDEX];\n\n let parentCommand: RenderCommand | null = null;\n\n for (let i = currentCommandIndex - 1; i >= 0; i--) {\n const cmd = allCommands[i];\n\n if (!cmd) {\n throw new Error('Command not found!');\n }\n\n if (cmd[RENDER_COMMAND_POSITION.NESTING_LEVEL] === nestingLevel - 1 && isHtmlOpenRenderCommand(cmd)) {\n parentCommand = cmd;\n break;\n }\n }\n\n if (!parentCommand) {\n throw new Error('Parent command not found!');\n }\n\n parentElement = this._executedCommandsCache.get(getRenderCommandId(parentCommand))?.element;\n }\n\n if (!parentElement) {\n throw new Error('Parent element not found!');\n }\n\n return parentElement;\n }\n\n private _findFollowingElement(command: RenderCommand) {\n const cacheArray = Array.from(this._executedCommandsCache.values());\n let nextElement: HTMLElement | undefined = undefined;\n\n const domPosition = command[RENDER_COMMAND_POSITION.DOM_POSITION];\n const nestingLevel = command[RENDER_COMMAND_POSITION.NESTING_LEVEL];\n const type = command[RENDER_COMMAND_POSITION.TYPE];\n\n // Try to find an already rendered element with a domPosition that is greater than the current domPosition. If there are multiple, use the one with the smallest domPosition.\n // If it does not exist, use .appendChild to simply append the element to the end of the parent element.\n // If it does exist, use .insertBefore to insert the element before the found element.\n for (const cached of cacheArray) {\n if (\n cached.command[RENDER_COMMAND_POSITION.DOM_POSITION] > domPosition &&\n cached.command[RENDER_COMMAND_POSITION.NESTING_LEVEL] === nestingLevel &&\n // Make sure the element does not find itself\n cached.command[RENDER_COMMAND_POSITION.TYPE] !== type\n ) {\n nextElement = cached.element;\n break;\n }\n }\n\n return nextElement;\n }\n\n private _renderInsertOrAppend(\n nodeToRender: HTMLElement,\n parentElement: HTMLElement,\n nextElement: HTMLElement | undefined,\n ) {\n if (nextElement) {\n this._renderer.insertBefore(parentElement, nodeToRender, nextElement);\n } else {\n this._renderer.appendChild(parentElement, nodeToRender);\n }\n }\n}\n\n// const stringifyRenderCommand = (command: RenderCommand) => {\n// const nestAttr = `nest=\"${command[RENDER_COMMAND_POSITION.NESTING_LEVEL]}\"`;\n// const domAttr = `dom=\"${command[RENDER_COMMAND_POSITION.DOM_POSITION]}\"`;\n\n// if (isHtmlOpenRenderCommand(command)) {\n// return `<${command[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr} _id=\"${command[HTML_OPEN_RENDER_COMMAND_POSITION.ELEMENT_ID]}\" _index=\"${command[RENDER_COMMAND_POSITION.INDEX]}\">`;\n// } else if (isHtmlCloseRenderCommand(command)) {\n// return `</${command[HTML_CLOSE_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr}>`;\n// } else if (isTextRenderCommand(command)) {\n// let text = command[TEXT_RENDER_COMMAND_POSITION.TEXT];\n// const brStart = text.startsWith('\\n') ? '<br/>' : '';\n// text = brStart ? text.slice(1) : text;\n\n// return [\n// ...(brStart ? [brStart] : []),\n// `<span ${nestAttr} ${domAttr} _index=\"${command[RENDER_COMMAND_POSITION.INDEX]}\">`,\n// text.replace(/\\n/g, ' <br/> '),\n// '</span>',\n// ];\n// } else if (isComponentRenderCommand(command)) {\n// const selector = command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT_ID];\n// return [`<${selector} ${nestAttr} ${domAttr}>`, `</${selector}>`];\n// } else {\n// return 'UNKNOWN';\n// }\n// };\n\n// const formatHTMLStringArray = (html: string[]) => {\n// const result: string[] = [];\n// let indent = 0;\n\n// for (const tag of html) {\n// if (tag.startsWith('</')) {\n// indent--;\n// }\n\n// result.push(' '.repeat(indent * 2) + tag);\n\n// if (tag.startsWith('<') && !tag.startsWith('</') && !tag.startsWith('<br')) {\n// indent++;\n// }\n// }\n\n// return result.join('\\n');\n// };\n\n// const debugVisualizeRenderCommands = (commands: RenderCommand[]) => {\n// const debug = commands.map((command) => stringifyRenderCommand(command)).flat();\n\n// const prettified = formatHTMLStringArray(debug);\n\n// return prettified;\n// };\n\n// const stringifyRenderInstruction = (instruction: RenderInstruction) => {\n// const type = instruction[RENDER_INSTRUCTION_POSITION.TYPE];\n// const translatedType = Object.entries(RENDER_INSTRUCTION_TYPE).find(([, value]) => value === type)?.[0];\n\n// const command = stringifyRenderCommand(instruction[RENDER_INSTRUCTION_POSITION.COMMAND]);\n\n// return `${translatedType}: ${command}`;\n// };\n","import { ContentfulAudioComponent } from './components/audio';\nimport { ContentfulFileComponent } from './components/file';\nimport { ContentfulImageComponent } from './components/image';\nimport { ContentfulRichTextRendererComponent } from './components/rich-text-renderer';\nimport { ContentfulVideoComponent } from './components/video';\n\nexport const ContentfulImports = [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n] as const;\n","import { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfig, ContentfulEntry } from '../types';\nimport { createContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig: Partial<ContentfulConfig> | null | undefined = {}) => {\n return { provide: CONTENTFUL_CONFIG, useValue: createContentfulConfig(contentfulConfig) };\n};\n\nexport const isContentfulEntryType = <T extends ContentfulEntry>(entry: ContentfulEntry, type: string): entry is T =>\n entry.sys.contentType.sys.id === type;\n","export * from './lib/components/audio';\nexport * from './lib/components/file';\nexport * from './lib/components/image';\nexport * from './lib/components/link';\nexport * from './lib/components/rich-text-renderer';\nexport * from './lib/components/video';\nexport * from './lib/constants';\nexport * from './lib/contentful.imports';\nexport * from './lib/gql';\nexport * from './lib/types';\nexport * from './lib/utils';\n\n// Burst cache\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,6BAA6B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;AA4BhD;AACO,MAAM,oBAAoB,GAAG,CAAC,KAAU,KAAiC;AAC9E,IAAA,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,KAAK,EAAE,GAAG,IAAI,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ;AACxE;;MCba,wBAAwB,CAAA;AAdrC,IAAA,WAAA,GAAA;AAeE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAA+D;AACrF,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAc,IAAI,iFAAC;AACrC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAc,IAAI,kFAAC;AACtC,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAc,IAAI,sFAAC;AAE1C,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AACnB,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;YAE1B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,OAAO,IAAI;YACb;AAEA,YAAA,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;gBAC/B,OAAO;oBACL,GAAG,EAAE,KAAK,CAAC,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AAC5C,oBAAA,QAAQ,EAAE,CAAA,CAAE;oBACZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,kCAAkC;AAC1C,qBAAA;AACF,iBAAA;;;AC7VM,MAAM,iBAAiB,GAAG;IAC/B,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,mCAAmC;;;MCPxB,uBAAuB,GAAG,CAAC,gBAAA,GAAiE,EAAE,KAAI;AAC7G,IAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,EAAE;AAC3F;MAEa,qBAAqB,GAAG,CAA4B,KAAsB,EAAE,IAAY,KACnG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,KAAK;;ACGnC;;ACZA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ethlete-contentful.mjs","sources":["../../../../libs/contentful/src/lib/gql/asset.fragments.ts","../../../../libs/contentful/src/lib/components/audio/contentful-audio.component.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.utils.ts","../../../../libs/contentful/src/lib/components/image/contentful-image.component.ts","../../../../libs/contentful/src/lib/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/utils/contentful-config.ts","../../../../libs/contentful/src/lib/components/link/contentful-link.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-renderer.errors.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.imports.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/index.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { gql } from '@ethlete/query';\n\nexport const GQL_FRAGMENT_CONTENTFUL_ASSET = gql`\n fragment AssetData on Asset {\n sys {\n id\n }\n url\n title\n width\n height\n description\n contentType\n size\n }\n`;\n\nexport type ContentfulGqlAsset = {\n sys: {\n id: string;\n };\n title: string | null;\n contentType: string | null;\n url: string | null;\n description: string | null;\n width: number | null;\n height: number | null;\n size: number | null;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const isContentfulGqlAsset = (asset: any): asset is ContentfulGqlAsset => {\n return asset?.sys?.id && asset?.url && typeof asset?.size === 'number';\n};\n\nexport type ContentfulGqlWhereFilter<TLinkedFrom extends Record<string, unknown> = Record<string, unknown>> = {\n /**\n * Filer by ids.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters/sys-filters\n */\n sys?: {\n id?: string;\n id_not?: string;\n id_in?: string[];\n id_not_in?: string[];\n id_contains?: string;\n id_not_contains?: string;\n };\n /**\n * Filer by tags.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters/contentfulmetadata-filters\n */\n contentfulMetadata?: {\n tags_exists?: boolean;\n tags?: {\n id_contains_some?: string[];\n id_contains_none?: string[];\n id_contains_all?: string[];\n };\n };\n /**\n * Retrieve a collection of entries linked to the specified entry or asset.\n * @see https://www.contentful.com/developers/docs/references/graphql/#links-to-a-specific-item\n */\n linkedFrom?: TLinkedFrom;\n};\n\nexport type ContentfulGqlOrder = `${string}_${'ASC' | 'DESC'}`;\n\nexport type ContentfulGqlCollectionFilterVariables<\n TCustomWhere extends Record<string, unknown> = Record<string, unknown>,\n TLinkedFrom extends Record<string, unknown> = Record<string, unknown>,\n> = {\n /**\n * Zero-indexed offset in the collection from which items are fetched\n * @default 0\n */\n skip?: number;\n\n /**\n * Maximum number of items to fetch. Maximum is 1000.\n * @default 100\n */\n limit?: number;\n\n /**\n * Filter specifications to apply on the collection query.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-filters\n */\n where?: TCustomWhere & ContentfulGqlWhereFilter<TLinkedFrom>;\n\n /**\n * Order specifications to apply on the collection query.\n * @see https://www.contentful.com/developers/docs/references/graphql/#/reference/collection-order\n */\n order?: ContentfulGqlOrder[];\n\n /**\n * When set to `true` the field will be resolved with non published content.\n * @default false\n */\n preview?: boolean;\n\n /**\n * Locale for the collection items. If not set the default locale is used.\n */\n locale?: string;\n};\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-audio',\n template: `\n @if (data(); as data) {\n <figure [ngClass]=\"figureClass()\">\n <figcaption [ngClass]=\"figcaptionClass()\">{{ data.title }}</figcaption>\n <audio [ngClass]=\"audioClass()\" controls src=\"{{ data.url }}\"></audio>\n </figure>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulAudioComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n audioClass = input<NgClassType>(null);\n figureClass = input<NgClassType>(null);\n figcaptionClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n title: asset.title,\n };\n }\n\n return {\n url: asset.fields.file.url,\n title: asset.fields.title,\n };\n });\n}\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n @if (data(); as data) {\n <a [href]=\"data.url\" [ngClass]=\"fileClass()\" class=\"underline\" target=\"_blank\">\n {{ data.title }} ({{ data.size }} Bytes)\n </a>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulFileComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n fileClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n size: asset.size,\n title: asset.title,\n };\n }\n\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n size: asset.fields.file.details.size,\n title: asset.fields.title,\n };\n });\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { ContentfulConfig } from '../types';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('ContentfulConfig');\n","import { PictureSource } from '@ethlete/cdk';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\n\nexport const generateDefaultContentfulImageSource = (data: ContentfulRestAsset | ContentfulGqlAsset): PictureSource => {\n if (isContentfulGqlAsset(data)) {\n if (!data.contentType || !data.url) {\n return {\n type: '',\n srcset: '',\n };\n }\n\n return {\n type: data.contentType,\n srcset: data.url,\n };\n }\n\n if (!data.fields.file.contentType || !data.fields.file.url) {\n return {\n type: '',\n srcset: '',\n };\n }\n\n return {\n type: data.fields.file.contentType,\n srcset: data.fields.file.url,\n };\n};\n\n/**\n * Parses source set sizes into an object containing with and height. Eg.\n * - `\"400\"` - 400px width\n * - `\"400x300\"` - 400px width and 300px height\n * - `\"400w\"` - 400px width\n * - `\"400h\"` - 400px height\n * - `\"400wx300h\"` - 400px width and 300px height\n **/\nexport const parseContentfulImageSize = (size: string): { width: number | null; height: number | null } => {\n let width: string | null | undefined = null;\n let height: string | null | undefined = null;\n\n if (size.includes('x')) {\n const [w, h] = size.split('x');\n\n width = w;\n height = h;\n } else if (size.includes('h')) {\n height = size;\n } else {\n width = size;\n }\n\n return {\n width: width ? parseInt(width, 10) : null,\n height: height ? parseInt(height, 10) : null,\n };\n};\n\nexport const generateContentfulImageSources = (\n data: ContentfulRestAsset | ContentfulGqlAsset,\n srcsetSizes: string[],\n backgroundColor: string | null,\n quality: number | null,\n focusArea: ContentfulImageFocusArea | null,\n resizeBehavior: ContentfulImageResizeBehavior | null,\n): PictureSource[] => {\n const assetData = data;\n\n if (!assetData) {\n return [];\n }\n\n const sources: PictureSource[] = [];\n\n const SOURCE_TYPES = ['image/avif', 'image/webp', 'image/png', 'image/jpg'];\n\n for (const type of SOURCE_TYPES) {\n const baseUrl = isContentfulGqlAsset(assetData) ? assetData.url : assetData.fields.file.url;\n const sourceSets: string[] = [];\n const queryParams: string[] = [];\n\n // Set the format (e.g. 'fm=webp')\n queryParams.push(`fm=${type.split('/')[1]}`);\n\n if (backgroundColor) {\n queryParams.push(`bg=rgb:${backgroundColor}`);\n }\n\n if (quality !== null) {\n queryParams.push(`q=${quality}`);\n }\n\n if (focusArea) {\n queryParams.push(`f=${focusArea}`);\n }\n\n if (resizeBehavior) {\n queryParams.push(`fit=${resizeBehavior}`);\n }\n if (srcsetSizes?.length) {\n const urlWithParams = `${baseUrl}?${queryParams.join('&')}`;\n\n for (const size of srcsetSizes) {\n const { width, height } = parseContentfulImageSize(size);\n\n if (width && height) {\n sourceSets.push(`${urlWithParams}&w=${width}&h=${height} ${width}w`);\n } else if (width) {\n sourceSets.push(`${urlWithParams}&w=${width} ${width}w`);\n } else if (height) {\n sourceSets.push(`${urlWithParams}&h=${height} ${height}h`);\n }\n }\n }\n\n sources.push({\n type,\n srcset: sourceSets.length ? sourceSets.join(', ') : `${baseUrl}?${queryParams.join('&')}`,\n });\n }\n\n return sources;\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { PictureComponent, normalizePictureSizes } from '@ethlete/cdk';\nimport { NgClassType } from '@ethlete/core';\nimport { CONTENTFUL_CONFIG } from '../../constants';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\nimport {\n generateContentfulImageSources,\n generateDefaultContentfulImageSource,\n} from './contentful-image.component.utils';\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <et-picture\n [imgClass]=\"imgClass()\"\n [hasPriority]=\"hasPriority()\"\n [figureClass]=\"figureClass()\"\n [pictureClass]=\"pictureClass()\"\n [figcaptionClass]=\"figcaptionClass()\"\n [defaultSrc]=\"_defaultSrc()\"\n [alt]=\"normalizedAsset().alt ?? null\"\n [figcaption]=\"normalizedAsset().figcaption ?? null\"\n [width]=\"normalizedAsset().width ?? null\"\n [height]=\"normalizedAsset().height ?? null\"\n [sizes]=\"sizes()\"\n [sources]=\"_sources()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [PictureComponent],\n host: {\n class: 'et-contentful-image',\n },\n})\nexport class ContentfulImageComponent {\n _contentfulConfig = inject(CONTENTFUL_CONFIG);\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n backgroundColor = input<string | null>(null);\n srcsetSizes = input<string[]>(this._contentfulConfig.imageOptions.srcsetSizes);\n\n quality = input(null, { transform: numberAttribute });\n focusArea = input<ContentfulImageFocusArea | null>(null);\n resizeBehavior = input<ContentfulImageResizeBehavior | null>(null);\n hasPriority = input(false, { transform: booleanAttribute });\n imgClass = input<NgClassType>(null);\n figureClass = input<NgClassType>(null);\n figcaptionClass = input<NgClassType>(null);\n pictureClass = input<NgClassType>(null);\n sizes = input<string | null, string[] | string | null>(\n normalizePictureSizes(this._contentfulConfig.imageOptions.sizes),\n {\n transform: (v) => normalizePictureSizes(v),\n },\n );\n\n normalizedAsset = computed(() => {\n const asset = this.asset();\n\n if (isContentfulGqlAsset(asset)) {\n return {\n alt: asset.title || null,\n figcaption: asset.description || null,\n width: asset.width,\n height: asset.height,\n };\n } else {\n return {\n alt: asset?.fields?.title || null,\n figcaption: asset?.fields?.description || null,\n width: asset?.fields?.file?.details?.image?.width ?? null,\n height: asset?.fields?.file?.details?.image?.height ?? null,\n };\n }\n });\n\n _sources = computed(() => {\n const asset = this.asset();\n const backgroundColor = this.backgroundColor();\n const srcsetSizes = this.srcsetSizes();\n const quality = this.quality();\n const focusArea = this.focusArea();\n const resizeBehavior = this.resizeBehavior();\n\n if (!asset) {\n return [];\n }\n\n return generateContentfulImageSources(asset, srcsetSizes, backgroundColor, quality, focusArea, resizeBehavior);\n });\n\n _defaultSrc = computed(() => {\n const asset = this.asset();\n\n return asset ? generateDefaultContentfulImageSource(asset) : null;\n });\n}\n","import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { NgClassType } from '@ethlete/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\n\n@Component({\n selector: 'et-contentful-video',\n template: `\n @if (data(); as data) {\n <video [ngClass]=\"videoClass()\" controls>\n <source src=\"{{ data.url }}\" type=\"{{ data.contentType }}\" />\n </video>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgClass],\n})\nexport class ContentfulVideoComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n videoClass = input<NgClassType>(null);\n\n data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset)) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n };\n }\n\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n };\n });\n}\n","import { ContentfulAudioComponent } from '../components/audio';\nimport { ContentfulFileComponent } from '../components/file';\nimport { ContentfulImageComponent } from '../components/image';\nimport { ContentfulLinkComponent } from '../components/link';\nimport { ContentfulVideoComponent } from '../components/video';\nimport { ContentfulConfig } from '../types';\n\nexport const createContentfulConfig = (\n config: Partial<ContentfulConfig> | null | undefined = {},\n): ContentfulConfig => ({\n // This default config must be inline and not saved inside a const for some weird webpack reason\n ...{\n useTailwindClasses: false,\n internalHosts: [],\n components: {\n audio: ContentfulAudioComponent,\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n link: ContentfulLinkComponent,\n },\n customComponents: {},\n imageOptions: {\n srcsetSizes: ['375w', '1280w', '1920w', '2560w'],\n sizes: [],\n backgroundColor: null,\n },\n },\n ...(config || {}),\n});\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { CONTENTFUL_CONFIG } from '../../constants/contentful.constants';\nimport { createContentfulConfig } from '../../utils/contentful-config';\n\nconst getPrimaryDomain = (host: string): string => {\n const parts = host.split('.');\n return parts.length > 2 ? parts.slice(-2).join('.') : host;\n};\n\n@Component({\n selector: 'et-contentful-link',\n template: `\n @if (isExternal()) {\n <a\n [class]=\"linkClass()\"\n [href]=\"href()\"\n [target]=\"openInNewTab() ? '_blank' : null\"\n [rel]=\"openInNewTab() ? 'noopener noreferrer' : null\"\n >{{ text() }}</a\n >\n } @else {\n <a [class]=\"linkClass()\" [routerLink]=\"internalPath()\">{{ text() }}</a>\n }\n `,\n host: {\n style: 'display: contents',\n },\n imports: [RouterLink],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ContentfulLinkComponent {\n private readonly _document = inject(DOCUMENT);\n private readonly _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? createContentfulConfig();\n\n href = input.required<string>();\n text = input.required<string>();\n textClass = input('');\n\n isExternal = computed(() => {\n const href = this.href();\n const isAbsolute = href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//');\n\n if (!isAbsolute) return false;\n\n try {\n const parsed = new URL(href.startsWith('//') ? `https:${href}` : href);\n const internalHosts = [this._document.location.host, ...this._config.internalHosts];\n return !internalHosts.includes(parsed.host);\n } catch {\n return true;\n }\n });\n\n openInNewTab = computed(() => {\n if (!this.isExternal()) return false;\n\n const href = this.href();\n\n try {\n const parsed = new URL(href.startsWith('//') ? `https:${href}` : href);\n const internalPrimaryDomains = [\n getPrimaryDomain(this._document.location.host),\n ...this._config.internalHosts.map(getPrimaryDomain),\n ];\n return !internalPrimaryDomains.includes(getPrimaryDomain(parsed.host));\n } catch {\n return true;\n }\n });\n\n internalPath = computed(() => {\n const href = this.href();\n\n if (!href.startsWith('http://') && !href.startsWith('https://') && !href.startsWith('//')) {\n return href;\n }\n\n try {\n const url = new URL(href.startsWith('//') ? `https:${href}` : href);\n return url.pathname + url.search + url.hash;\n } catch {\n return href;\n }\n });\n\n linkClass = computed(() => {\n const base = 'et-contentful-rich-text-default-element et-contentful-rich-text-default-a';\n const extra = this.textClass();\n\n return extra ? `${base} ${extra}` : base;\n });\n}\n","import { RuntimeError } from '@ethlete/core';\n\nexport const RICH_TEXT_RENDERER_ERRORS = {\n rich_text_undefined:\n 'The property value given at richTextPath is undefined. Use the richTextPath input to specify the path to the rich text object.',\n rich_text_wrong_type:\n 'The rich text object does not satisfy the RichTextResponse interface. It should contain a property named \"nodeType\" with the value \"document\".',\n\n asset_id_not_found: 'The asset ID was not found. This node is not supported.',\n entry_id_not_found: 'The entry ID was not found. This node is not supported.',\n\n asset_not_found: 'The asset was not found. This node is not supported.',\n entry_not_found: 'The entry was not found. This node is not supported.',\n\n custom_component_not_found: 'No custom component found for entry type. Please provide one for this type.',\n\n text_parent_not_found: 'The parent node is not found. This structure is not supported.',\n text_parent_wrong_type:\n 'The parent node neither a html element nor a custom component. This structure is not supported.',\n} as const;\n\nconst RICH_TEXT_RENDERER_ERROR_CODES = Object.keys(RICH_TEXT_RENDERER_ERRORS).reduce(\n (acc, key, index) => {\n acc[key as keyof typeof RICH_TEXT_RENDERER_ERRORS] = index;\n return acc;\n },\n {} as Record<keyof typeof RICH_TEXT_RENDERER_ERRORS, number>,\n);\n\nexport const richTextRendererError = (code: keyof typeof RICH_TEXT_RENDERER_ERRORS, data?: unknown) => {\n const message = `<et-contentful-rich-text-renderer>: ${RICH_TEXT_RENDERER_ERRORS[code]}`;\n\n throw new RuntimeError(RICH_TEXT_RENDERER_ERROR_CODES[code], message, data);\n};\n","import { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { isObject } from '@ethlete/core';\nimport { RichTextResponse } from '../../types';\n\nexport const isRichTextRootNode = (node: unknown): node is RichTextResponse => {\n return isObject(node) && 'nodeType' in node && node['nodeType'] === 'document';\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.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 'div';\n\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 { ComponentType } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n ViewContainerRef,\n ViewEncapsulation,\n computed,\n inject,\n input,\n isDevMode,\n reflectComponentType,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { BLOCKS, Block, INLINES, Inline, Mark, Text } from '@contentful/rich-text-types';\nimport { getObjectProperty, injectRenderer, isObject } from '@ethlete/core';\nimport { pairwise, startWith, tap } from 'rxjs';\nimport { CONTENTFUL_CONFIG } from '../../constants/contentful.constants';\nimport {\n ContentfulCollection,\n ContentfulEntry,\n ContentfulEntryLinkItem,\n ContentfulRestAsset,\n RichTextResponse,\n} from '../../types';\nimport { createContentfulConfig } from '../../utils/contentful-config';\nimport { richTextRendererError } from './rich-text-renderer.errors';\nimport { isRichTextRootNode, translateContentfulNodeTypeToHtmlTag } from './rich-text-renderer.util';\n\nexport const RENDER_COMMAND_TYPE = {\n HTML_OPEN: 0,\n HTML_CLOSE: 1,\n TEXT: 2,\n COMPONENT: 3,\n} as const;\n\nexport const RENDER_COMMAND_POSITION = {\n TYPE: 0,\n NESTING_LEVEL: 1,\n DOM_POSITION: 2,\n INDEX: 3,\n} as const;\n\nexport const HTML_OPEN_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n TAG_NAME: 5,\n ELEMENT_ID: 6,\n} as const;\n\nexport const HTML_CLOSE_RENDER_COMMAND_POSITION = {\n TAG_NAME: 4,\n ELEMENT_ID: 5,\n} as const;\n\nexport const TEXT_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n TEXT: 5,\n TEXT_ID: 6,\n} as const;\n\nexport const COMPONENT_RENDER_COMMAND_POSITION = {\n ATTRIBUTES: 4,\n COMPONENT: 5,\n INPUTS: 6,\n COMPONENT_ID: 7,\n} as const;\n\ntype HtmlOpenRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.HTML_OPEN,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n tagName: keyof HTMLElementTagNameMap,\n textId: string,\n];\n\ntype HtmlCloseRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.HTML_CLOSE,\n nestingLevel: number,\n domPosition: number,\n index: number,\n tagName: keyof HTMLElementTagNameMap,\n elementId: string,\n];\n\ntype TextRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.TEXT,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n text: string,\n elementId: string,\n];\n\ntype ComponentRenderCommand = [\n type: typeof RENDER_COMMAND_TYPE.COMPONENT,\n nestingLevel: number,\n domPosition: number,\n index: number,\n attributes: Record<string, string>,\n component: ComponentType<unknown>,\n inputs: Record<string, unknown>,\n componentId: string,\n];\n\ntype RenderCommand = HtmlOpenRenderCommand | HtmlCloseRenderCommand | TextRenderCommand | ComponentRenderCommand;\n\nexport const RENDER_INSTRUCTION_POSITION = {\n TYPE: 0,\n COMMAND: 1,\n} as const;\n\nexport const RENDER_INSTRUCTION_TYPE = {\n CREATE: 0,\n UPDATE: 1,\n DELETE: 2,\n MOVE: 3,\n} as const;\n\ntype RenderInstructionTypeValue = (typeof RENDER_INSTRUCTION_TYPE)[keyof typeof RENDER_INSTRUCTION_TYPE];\n\ntype RenderInstruction = [RenderInstructionTypeValue, RenderCommand];\n\nconst MARK_TAILWIND_MAP: Record<string, string> = {\n bold: 'font-bold',\n italic: 'italic',\n underline: 'underline',\n code: 'font-mono',\n};\n\nexport const marksToClass = (marks: Mark[]) => {\n const classes: string[] = [];\n\n for (const mark of marks) {\n let klass = MARK_TAILWIND_MAP[mark.type];\n\n if (!klass) {\n console.warn(`No class found for mark type! Falling back to \"${mark.type}\".`, mark);\n\n klass = mark.type;\n }\n\n classes.push(klass);\n }\n\n return classes.join(' ');\n};\n\nexport const isHtmlOpenRenderCommand = (command: RenderCommand): command is HtmlOpenRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_OPEN;\n};\n\nexport const isHtmlCloseRenderCommand = (command: RenderCommand): command is HtmlCloseRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_CLOSE;\n};\n\nexport const isTextRenderCommand = (command: RenderCommand): command is TextRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.TEXT;\n};\n\nexport const isComponentRenderCommand = (command: RenderCommand): command is ComponentRenderCommand => {\n return command[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.COMPONENT;\n};\n\nexport const getRenderCommandId = (command: RenderCommand) => {\n if (isHtmlOpenRenderCommand(command)) {\n return command[HTML_OPEN_RENDER_COMMAND_POSITION.ELEMENT_ID];\n } else if (isHtmlCloseRenderCommand(command)) {\n return command[HTML_CLOSE_RENDER_COMMAND_POSITION.ELEMENT_ID];\n } else if (isTextRenderCommand(command)) {\n return command[TEXT_RENDER_COMMAND_POSITION.TEXT_ID];\n } else {\n return command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT_ID];\n }\n};\n\nconst CLASS_ATTR = 'class';\nconst DEFAULT_COMPONENT_TYPES = {\n IMAGE: '$$$_et-image',\n VIDEO: '$$$_et-video',\n AUDIO: '$$$_et-audio',\n FILE: '$$$_et-file',\n LINK: '$$$_et-link',\n};\n\ntype ExecutedCommandCacheItemBase = {\n element: HTMLElement;\n};\n\ntype ExecutedComponentCommandCacheItem = {\n command: ComponentRenderCommand;\n componentRef: ComponentRef<unknown>;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedHtmlCommandCacheItem = {\n command: HtmlOpenRenderCommand | HtmlCloseRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedTextCommandCacheItem = {\n command: TextRenderCommand;\n textNode: unknown;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedCommandCacheItem =\n | ExecutedComponentCommandCacheItem\n | ExecutedHtmlCommandCacheItem\n | ExecutedTextCommandCacheItem;\n\nexport const isExecutedComponentCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedComponentCommandCacheItem => {\n return isComponentRenderCommand(cache.command);\n};\n\nexport const isExecutedHtmlOrTextCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedHtmlCommandCacheItem => {\n return isHtmlCloseRenderCommand(cache.command) || isHtmlOpenRenderCommand(cache.command);\n};\n\nexport const isExecutedTextCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedTextCommandCacheItem => {\n return isTextRenderCommand(cache.command);\n};\n\nexport const ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID = '$$$_et-contentful-any-entry-content-type-sys-id';\n\nexport type ContentfulIncludeMap = {\n /**\n * Select an entry by its ID and content type ID.\n *\n * The content type ID can be found inside the entry -> sys -> contentType -> sys -> id property.\n *\n * You can provide the `ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID` constant to match any entry sys ID.\n * But be aware that this will return the entry as is without any type checking.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntry: <T extends { [key: string]: any }>(id: string, contentTypeId: string) => ContentfulEntry<T> | null;\n\n /**\n * Select multiple entries by their IDs and content type ID.\n * If an entry is not found, it will be omitted from the result.\n *\n * The content type ID can be found inside the entry -> sys -> contentType -> sys -> id property.\n *\n * You can provide the `ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID` constant to match any entry sys ID.\n * But be aware that this will return the entry as is without any type checking.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries: <T extends { [key: string]: any }>(\n ids: string[] | ContentfulEntryLinkItem[],\n contentTypeId: string,\n ) => ContentfulEntry<T>[];\n\n /**\n * Select an asset by its ID.\n */\n getAsset: (id: string) => ContentfulRestAsset | null;\n\n /**\n * Select multiple assets by their IDs. If an asset is not found, it will be omitted from the result.\n */\n getAssets: (ids: string[]) => ContentfulRestAsset[];\n};\n\nexport type CreateContentfulIncludeMapConfig = {\n /** The entries that should be present inside the map */\n entries: ContentfulEntry[];\n\n /** The assets that should be present inside the map */\n assets: ContentfulRestAsset[];\n};\n\n/**\n * Create a contentful include map using the provided entries and assets.\n */\nexport const createContentfulIncludeMap = (config: CreateContentfulIncludeMapConfig): ContentfulIncludeMap => {\n const { entries, assets } = config;\n\n const assetMap = new Map(assets.map((asset) => [asset.sys.id, asset]));\n const entryMap = new Map(entries.map((entry) => [entry.sys.id, entry]));\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getEntry = <T extends { [key: string]: any }>(id: string, contentTypeId: string) => {\n const entry = entryMap.get(id);\n\n if (!entry) {\n if (isDevMode()) {\n console.warn('Entry not found! Will return null. Is the include query param to low?', { id, entryMap });\n }\n\n return null;\n }\n\n if (contentTypeId === ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID) {\n return entry as ContentfulEntry<T>;\n }\n\n if (entry.sys.contentType.sys.id !== contentTypeId) {\n if (isDevMode()) {\n console.warn('Entry sys ID does not match the provided sys ID! Will return null.', {\n entry,\n sysId: contentTypeId,\n });\n }\n\n return null;\n }\n\n return entry as ContentfulEntry<T>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getEntries = <T extends { [key: string]: any }>(\n ids: string[] | ContentfulEntryLinkItem[],\n contentTypeId: string,\n ) => {\n const entries = ids\n .map((id) => (typeof id === 'string' ? id : id.sys.id))\n .map((id) => getEntry<T>(id, contentTypeId))\n .filter((entry): entry is ContentfulEntry<T> => entry !== null);\n\n return entries;\n };\n\n const getAsset = (id: string) => {\n return assetMap.get(id) ?? null;\n };\n\n const getAssets = (ids: string[]) => {\n return ids.map((id) => getAsset(id)).filter((asset): asset is ContentfulRestAsset => asset !== null);\n };\n\n return {\n getEntry,\n getEntries,\n getAsset,\n getAssets,\n };\n};\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'et-contentful-rich-text-renderer',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n _viewContainerRef = inject(ViewContainerRef);\n _renderer = injectRenderer();\n _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n _document = inject(DOCUMENT);\n _config = inject(CONTENTFUL_CONFIG, { optional: true }) ?? createContentfulConfig();\n\n /**\n * A cache for all executed commands that are not deleted.\n * This is used to keep track of all rendered elements and components.\n * The key is the render command element ID.\n */\n _executedCommandsCache = new Map<string, ExecutedCommandCacheItem>();\n\n /**\n * The contentful response gotten via their REST api.\n * @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection\n */\n content = input.required<ContentfulCollection | null | undefined>();\n\n /**\n * The path to where the rich text field is inside the contentful response. Dot and array notation is allowed.\n * @example \"items[0].fields.html\"\n */\n richTextPath = input.required<string>();\n\n /**\n * A map of all includes in the contentful response.\n * This is useful for looking up assets and entries that are referenced in the rich text without having to use loops.\n */\n contentIncludesMap = computed<ContentfulIncludeMap>(() => {\n const content = this.content();\n const assets = content?.includes.Asset;\n const entries = content?.includes.Entry;\n\n return createContentfulIncludeMap({ assets: assets ?? [], entries: entries ?? [] });\n });\n\n /**\n * The rich text data that should be rendered.\n */\n richTextData = computed(() => {\n const content = this.content();\n const richTextPath = this.richTextPath();\n\n if (!content) {\n return null;\n }\n\n const richText = getObjectProperty(content as unknown as Record<string, unknown>, richTextPath);\n\n if (!isObject(richText)) {\n throw richTextRendererError('rich_text_undefined', { content, richTextPath });\n }\n\n if (!isRichTextRootNode(richText)) {\n throw richTextRendererError('rich_text_wrong_type', { content, richTextPath });\n }\n\n return richText as RichTextResponse;\n });\n\n renderCommands = computed(() => {\n const richTextData = this.richTextData();\n\n if (!richTextData) {\n return [];\n }\n\n return this._createRenderCommands(richTextData);\n });\n\n renderCommandHistory = toSignal(\n toObservable(this.renderCommands).pipe(startWith([] as RenderCommand[]), pairwise()),\n { initialValue: [[], []] },\n );\n\n previousRenderCommandMap = computed(() => {\n const [prevCommands] = this.renderCommandHistory();\n\n const map = new Map<string | number, RenderCommand>();\n\n for (const command of prevCommands) {\n map.set(getRenderCommandId(command), command);\n }\n\n return map;\n });\n\n renderInstructions = computed(() => {\n const commands = this.renderCommands();\n const previousRenderCommandMap = new Map(this.previousRenderCommandMap());\n\n const instructions: RenderInstruction[] = [];\n\n // remove deleted components as well as all other elements\n for (const [, command] of previousRenderCommandMap) {\n if (isComponentRenderCommand(command)) {\n // keep the component around if it's still in the new commands\n if (commands.some((c) => getRenderCommandId(c) === getRenderCommandId(command))) {\n continue;\n }\n }\n\n instructions.push([RENDER_INSTRUCTION_TYPE.DELETE, command]);\n\n // remove from map to mark as used\n previousRenderCommandMap.delete(getRenderCommandId(command));\n }\n\n // Find the indexes of the commands remaining in the previousRenderCommandMap in the new commands array.\n const lastComponentIndexes: { newIndex: number; prevIndex: number; command: RenderCommand }[] = [];\n for (const [id, command] of previousRenderCommandMap) {\n const index = commands.findIndex((c) => getRenderCommandId(c) === id);\n const newCommand = commands[index]!;\n\n if (index === -1) {\n throw new Error('Command not found!');\n }\n\n lastComponentIndexes.push({\n newIndex: index,\n prevIndex: command[RENDER_COMMAND_POSITION.INDEX],\n command: newCommand,\n });\n }\n\n lastComponentIndexes.sort((a, b) => a.newIndex - b.newIndex);\n\n // check if the prevIndex are in order ascending\n // for indexes that are not in order, create a move instruction\n // for indexes that are in order, create an update instruction\n let moveCheckIndex = 0;\n while (moveCheckIndex < lastComponentIndexes.length - 1) {\n const moveCurr = lastComponentIndexes[moveCheckIndex];\n const moveNext = lastComponentIndexes[moveCheckIndex + 1];\n\n if (!moveCurr || !moveNext) {\n break;\n }\n\n if (moveCurr.prevIndex > moveNext.prevIndex) {\n lastComponentIndexes.splice(moveCheckIndex + 1, 1);\n instructions.push([RENDER_INSTRUCTION_TYPE.MOVE, moveNext.command]);\n } else {\n instructions.push([RENDER_INSTRUCTION_TYPE.UPDATE, moveNext.command]);\n moveCheckIndex++;\n }\n }\n\n for (const command of commands) {\n const id = getRenderCommandId(command);\n\n if (isComponentRenderCommand(command)) {\n const previousCommand = previousRenderCommandMap.get(id);\n\n if (!previousCommand) {\n // create\n instructions.push([RENDER_INSTRUCTION_TYPE.CREATE, command]);\n }\n } else {\n // create\n instructions.push([RENDER_INSTRUCTION_TYPE.CREATE, command]);\n }\n }\n\n return instructions;\n });\n\n constructor() {\n toObservable(this.renderInstructions)\n .pipe(\n takeUntilDestroyed(),\n tap((instructions) => {\n this._execInstructions(instructions);\n }),\n )\n .subscribe();\n }\n\n private _createRenderCommands(richTextData: RichTextResponse) {\n /** List of all render commands */\n const rootCommands: RenderCommand[] = [];\n\n /** Counter for generating unique html element IDs. */\n let elementOpenId = 0;\n\n /** Counter for generating unique html element IDs. */\n let elementCloseId = 0;\n\n /** Counter for generating unique component IDs. */\n const componentIdMap = new Map<string, number>();\n\n /** The nesting level of the current node. */\n let nestingLevel = 0;\n\n /** The position (index) of the current node inside the parent node. */\n let domPosition = 0;\n\n let textId = 0;\n\n let commandIndex = 0;\n\n const traverse = (node: Block | Inline | Text) => {\n switch (node.nodeType) {\n case 'text': {\n // Render media\n const type = RENDER_COMMAND_TYPE.TEXT;\n const text = node.value;\n\n if (!text) break;\n\n const attributes: Record<string, string> = {\n class: 'et-contentful-rich-text-default-element et-contentful-rich-text-default-span',\n };\n\n if (node.marks.length) {\n const markClasses = marksToClass(node.marks);\n\n if (CLASS_ATTR in attributes) {\n attributes[CLASS_ATTR] += ` ${markClasses}`;\n } else {\n attributes[CLASS_ATTR] = markClasses;\n }\n }\n\n const id = 't' + textId++;\n\n const command: TextRenderCommand = [type, nestingLevel, domPosition, commandIndex++, attributes, text, id];\n\n rootCommands.push(command);\n domPosition++;\n\n break;\n }\n\n case BLOCKS.EMBEDDED_ASSET: {\n // Render media\n const type = RENDER_COMMAND_TYPE.COMPONENT;\n const assetId = node.data['target']?.sys?.id;\n\n if (!assetId) {\n throw richTextRendererError('asset_id_not_found', { node });\n }\n\n const asset = this.contentIncludesMap().getAsset(assetId);\n\n if (!asset) {\n throw richTextRendererError('asset_not_found', { assetId, node });\n }\n\n const contentType = asset.fields.file.contentType;\n const assetComponents = this._config.components;\n\n // Every property inside the asset will be null if no file was provided for a translation.\n // In this case, we can assume that the asset is missing due to user error.\n const isMissing = !contentType && !asset.fields.file.url;\n\n if (isMissing) {\n if (isDevMode()) {\n console.warn(\n 'Asset is missing file data! Asset will be skipped. Did you forget to upload a file for the current translation in Contentful?',\n { asset },\n );\n }\n\n break;\n }\n\n const isImage = contentType?.startsWith('image/');\n const isVideo = contentType?.startsWith('video/');\n const isAudio = contentType?.startsWith('audio/');\n\n const component = isImage\n ? assetComponents.image\n : isVideo\n ? assetComponents.video\n : isAudio\n ? assetComponents.audio\n : assetComponents.file;\n\n const componentType = isImage\n ? DEFAULT_COMPONENT_TYPES.IMAGE\n : isVideo\n ? DEFAULT_COMPONENT_TYPES.VIDEO\n : isAudio\n ? DEFAULT_COMPONENT_TYPES.AUDIO\n : DEFAULT_COMPONENT_TYPES.FILE;\n\n let componentId = componentIdMap.get(componentType) ?? -1;\n const id = componentType + ++componentId;\n componentIdMap.set(componentType, componentId);\n\n const attributes = {};\n\n const inputs = {\n asset,\n };\n\n const command: ComponentRenderCommand = [\n type,\n nestingLevel,\n domPosition,\n commandIndex++,\n attributes,\n component,\n inputs,\n id,\n ];\n\n rootCommands.push(command);\n\n domPosition++;\n\n break;\n }\n\n case INLINES.HYPERLINK: {\n const uri = (node.data['uri'] as string) ?? '';\n\n // Collect all text and marks from children (hyperlink children are text nodes)\n let linkText = '';\n const linkMarks: Mark[] = [];\n\n for (const child of node.content) {\n if (child.nodeType === 'text') {\n linkText += child.value;\n linkMarks.push(...child.marks);\n }\n }\n\n const textClass = linkMarks.length ? marksToClass(linkMarks) : '';\n\n let linkComponentId = componentIdMap.get(DEFAULT_COMPONENT_TYPES.LINK) ?? -1;\n const linkId = DEFAULT_COMPONENT_TYPES.LINK + ++linkComponentId;\n componentIdMap.set(DEFAULT_COMPONENT_TYPES.LINK, linkComponentId);\n\n const linkCommand: ComponentRenderCommand = [\n RENDER_COMMAND_TYPE.COMPONENT,\n nestingLevel,\n domPosition,\n commandIndex++,\n {},\n this._config.components.link,\n { href: uri, text: linkText, textClass },\n linkId,\n ];\n\n rootCommands.push(linkCommand);\n domPosition++;\n\n break;\n }\n\n case BLOCKS.EMBEDDED_ENTRY:\n case INLINES.EMBEDDED_ENTRY: {\n // Render component\n const type = RENDER_COMMAND_TYPE.COMPONENT;\n const entryId = node.data['target']?.sys?.id;\n\n if (!entryId) {\n throw richTextRendererError('entry_id_not_found', { node });\n }\n\n const entry = this.contentIncludesMap().getEntry(entryId, ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID);\n\n if (!entry) {\n throw richTextRendererError('entry_not_found', { entryId, node });\n }\n\n const componentType = entry.sys.contentType.sys.id;\n\n const component = this._config.customComponents[componentType];\n\n if (!component) {\n throw richTextRendererError('custom_component_not_found', {\n componentType,\n customComponents: this._config.customComponents,\n entry,\n });\n }\n\n const attributes = {};\n let componentId = componentIdMap.get(componentType) ?? -1;\n const id = componentType + ++componentId;\n componentIdMap.set(componentType, componentId);\n\n const inputs = {\n fields: entry.fields,\n metadata: entry.metadata,\n sys: entry.sys,\n includes: this.contentIncludesMap(),\n };\n\n const command: ComponentRenderCommand = [\n type,\n nestingLevel,\n domPosition,\n commandIndex++,\n attributes,\n component,\n inputs,\n id,\n ];\n\n rootCommands.push(command);\n\n domPosition++;\n\n break;\n }\n\n default: {\n const type = RENDER_COMMAND_TYPE.HTML_OPEN;\n const tag = translateContentfulNodeTypeToHtmlTag(node.nodeType);\n const attributes: Record<string, string> = {\n class: `et-contentful-rich-text-default-element et-contentful-rich-text-default-${tag}`,\n };\n const id = 'e-o' + elementOpenId++;\n\n const command: HtmlOpenRenderCommand = [type, nestingLevel, domPosition, commandIndex++, attributes, tag, id];\n\n rootCommands.push(command);\n\n const domPositionAtThisLevel = domPosition;\n // Normal html elements can have children\n for (const child of node.content) {\n domPosition = 0;\n nestingLevel++;\n traverse(child);\n nestingLevel--;\n domPosition = domPositionAtThisLevel;\n }\n\n const lastCommand = rootCommands[rootCommands.length - 1];\n\n if (\n lastCommand?.[RENDER_COMMAND_POSITION.TYPE] === RENDER_COMMAND_TYPE.HTML_OPEN &&\n lastCommand[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME] !== 'td' &&\n lastCommand[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME] !== 'hr'\n ) {\n // If the last command is an open command, we can remove it since it's empty\n rootCommands.pop();\n elementOpenId--;\n commandIndex--;\n } else {\n const closeId = 'e-c' + elementCloseId++;\n\n const closeCommand: HtmlCloseRenderCommand = [\n RENDER_COMMAND_TYPE.HTML_CLOSE,\n nestingLevel,\n domPosition,\n commandIndex++,\n tag,\n closeId,\n ];\n rootCommands.push(closeCommand);\n\n domPosition++;\n }\n\n break;\n }\n }\n };\n\n for (const node of richTextData.content) {\n traverse(node);\n }\n\n return rootCommands;\n }\n\n private _execInstructions(instructions: RenderInstruction[]) {\n for (const instruction of instructions) {\n const type = instruction[RENDER_INSTRUCTION_POSITION.TYPE];\n const command = instruction[RENDER_INSTRUCTION_POSITION.COMMAND];\n\n switch (type) {\n case RENDER_INSTRUCTION_TYPE.CREATE:\n this._runCreateInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.UPDATE:\n this._runUpdateInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.MOVE:\n this._runMoveInstruction(command);\n break;\n case RENDER_INSTRUCTION_TYPE.DELETE:\n this._runDeleteInstruction(command);\n break;\n }\n }\n }\n\n private _runCreateInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const parentElement = this._findParent(command);\n const nextElement = this._findFollowingElement(command);\n\n if (isComponentRenderCommand(command)) {\n const componentRef = this._viewContainerRef.createComponent(command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT]);\n\n this._updateComponentInputs(command, componentRef);\n\n const rootNode = this._getComponentRootNode(componentRef);\n\n this._renderInsertOrAppend(rootNode, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n componentRef,\n element: rootNode,\n });\n } else if (isTextRenderCommand(command)) {\n const text = command[TEXT_RENDER_COMMAND_POSITION.TEXT];\n const span = this._renderer.createElement('span');\n const attributes = command[TEXT_RENDER_COMMAND_POSITION.ATTRIBUTES];\n const textSplitInLineBreaks = text.split('\\n').filter((t) => t.trim().length > 0);\n\n const textNodes: unknown[] = [];\n\n for (const [key, value] of Object.entries(attributes)) {\n this._renderer.setAttribute(span, key, value);\n }\n\n if (text.startsWith('\\n')) {\n const brNode = this._renderer.createElement('br');\n this._renderer.appendChild(parentElement, brNode);\n }\n\n for (const [textPartIndex, textPart] of textSplitInLineBreaks.entries()) {\n if (textPartIndex > 0) {\n const brNode = this._renderer.createElement('br');\n this._renderer.appendChild(span, brNode);\n }\n\n const textNode = this._renderer.createText(textPart);\n\n this._renderer.appendChild(span, textNode);\n\n textNodes.push(textNode);\n }\n\n this._renderInsertOrAppend(span, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n element: span,\n textNode: textNodes,\n });\n } else if (isHtmlOpenRenderCommand(command)) {\n const tag = command[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME];\n const attributes = command[HTML_OPEN_RENDER_COMMAND_POSITION.ATTRIBUTES];\n const element = this._renderer.createElement(tag);\n\n for (const [key, value] of Object.entries(attributes)) {\n this._renderer.setAttribute(element, key, value);\n }\n\n this._renderInsertOrAppend(element, parentElement, nextElement);\n\n this._executedCommandsCache.set(id, {\n command,\n element,\n });\n }\n }\n\n private _runUpdateInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n const componentRef = cached.componentRef;\n\n if (!componentRef) {\n throw new Error('Component ref not found!');\n }\n\n this._updateComponentInputs(command, componentRef);\n }\n\n this._executedCommandsCache.set(id, {\n ...cached,\n command: command as any,\n });\n }\n\n private _runMoveInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n const componentRef = cached.componentRef;\n\n if (!componentRef) {\n throw new Error('Component ref not found!');\n }\n\n const rootNode = cached.element;\n const oldParentElement = cached.element.parentElement;\n\n if (oldParentElement) {\n this._renderer.removeChild(oldParentElement, rootNode);\n }\n\n const newParentElement = this._findParent(command);\n const nextElement = this._findFollowingElement(command);\n\n this._renderInsertOrAppend(rootNode, newParentElement, nextElement);\n\n this._updateComponentInputs(command, componentRef);\n\n this._executedCommandsCache.set(id, {\n ...cached,\n command: command as any,\n });\n }\n }\n\n private _runDeleteInstruction(command: RenderCommand) {\n const id = getRenderCommandId(command);\n const cached = this._executedCommandsCache.get(id);\n\n if (!cached) {\n if (isHtmlCloseRenderCommand(command)) {\n return;\n }\n\n throw new Error('Cached command not found!');\n }\n\n if (isComponentRenderCommand(command)) {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw new Error('Cached command is not a component command!');\n }\n\n cached.componentRef?.destroy();\n } else if (isTextRenderCommand(command)) {\n if (cached.element?.parentElement) {\n this._renderer.removeChild(cached.element.parentElement, cached.element);\n }\n } else if (isHtmlOpenRenderCommand(command)) {\n if (cached.element?.parentElement) {\n this._renderer.removeChild(cached.element.parentElement, cached.element);\n }\n }\n\n this._executedCommandsCache.delete(id);\n }\n\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n\n private _updateComponentInputs(command: ComponentRenderCommand, componentRef: ComponentRef<any>) {\n const inputMeta = reflectComponentType(command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT])?.inputs ?? [];\n const inputsByProp = new Map(inputMeta.map((i) => [i.propName, i.templateName]));\n\n for (const [key, value] of Object.entries(command[COMPONENT_RENDER_COMMAND_POSITION.INPUTS])) {\n const publicName = inputsByProp.get(key);\n\n if (publicName === undefined) continue;\n\n componentRef.setInput(publicName, value);\n }\n }\n\n private _findParent(command: RenderCommand) {\n const hostElement = this._elementRef.nativeElement;\n const nestingLevel = command[RENDER_COMMAND_POSITION.NESTING_LEVEL];\n let parentElement: HTMLElement | undefined;\n\n if (nestingLevel === 0) {\n parentElement = hostElement;\n } else {\n // Reverse search all render commands beginning from the current one using a for loop.\n // The parent is found when the command's nesting level ist the same as the current nesting level minus 1.\n // If the parent is not found, throw an error.\n const allCommands = this.renderCommands();\n const currentCommandIndex = command[RENDER_COMMAND_POSITION.INDEX];\n\n let parentCommand: RenderCommand | null = null;\n\n for (let i = currentCommandIndex - 1; i >= 0; i--) {\n const cmd = allCommands[i];\n\n if (!cmd) {\n throw new Error('Command not found!');\n }\n\n if (cmd[RENDER_COMMAND_POSITION.NESTING_LEVEL] === nestingLevel - 1 && isHtmlOpenRenderCommand(cmd)) {\n parentCommand = cmd;\n break;\n }\n }\n\n if (!parentCommand) {\n throw new Error('Parent command not found!');\n }\n\n parentElement = this._executedCommandsCache.get(getRenderCommandId(parentCommand))?.element;\n }\n\n if (!parentElement) {\n throw new Error('Parent element not found!');\n }\n\n return parentElement;\n }\n\n private _findFollowingElement(command: RenderCommand) {\n const cacheArray = Array.from(this._executedCommandsCache.values());\n let nextElement: HTMLElement | undefined = undefined;\n\n const domPosition = command[RENDER_COMMAND_POSITION.DOM_POSITION];\n const nestingLevel = command[RENDER_COMMAND_POSITION.NESTING_LEVEL];\n const type = command[RENDER_COMMAND_POSITION.TYPE];\n\n // Try to find an already rendered element with a domPosition that is greater than the current domPosition. If there are multiple, use the one with the smallest domPosition.\n // If it does not exist, use .appendChild to simply append the element to the end of the parent element.\n // If it does exist, use .insertBefore to insert the element before the found element.\n for (const cached of cacheArray) {\n if (\n cached.command[RENDER_COMMAND_POSITION.DOM_POSITION] > domPosition &&\n cached.command[RENDER_COMMAND_POSITION.NESTING_LEVEL] === nestingLevel &&\n // Make sure the element does not find itself\n cached.command[RENDER_COMMAND_POSITION.TYPE] !== type\n ) {\n nextElement = cached.element;\n break;\n }\n }\n\n return nextElement;\n }\n\n private _renderInsertOrAppend(\n nodeToRender: HTMLElement,\n parentElement: HTMLElement,\n nextElement: HTMLElement | undefined,\n ) {\n if (nextElement) {\n this._renderer.insertBefore(parentElement, nodeToRender, nextElement);\n } else {\n this._renderer.appendChild(parentElement, nodeToRender);\n }\n }\n}\n\n// const stringifyRenderCommand = (command: RenderCommand) => {\n// const nestAttr = `nest=\"${command[RENDER_COMMAND_POSITION.NESTING_LEVEL]}\"`;\n// const domAttr = `dom=\"${command[RENDER_COMMAND_POSITION.DOM_POSITION]}\"`;\n\n// if (isHtmlOpenRenderCommand(command)) {\n// return `<${command[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr} _id=\"${command[HTML_OPEN_RENDER_COMMAND_POSITION.ELEMENT_ID]}\" _index=\"${command[RENDER_COMMAND_POSITION.INDEX]}\">`;\n// } else if (isHtmlCloseRenderCommand(command)) {\n// return `</${command[HTML_CLOSE_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr}>`;\n// } else if (isTextRenderCommand(command)) {\n// let text = command[TEXT_RENDER_COMMAND_POSITION.TEXT];\n// const brStart = text.startsWith('\\n') ? '<br/>' : '';\n// text = brStart ? text.slice(1) : text;\n\n// return [\n// ...(brStart ? [brStart] : []),\n// `<span ${nestAttr} ${domAttr} _index=\"${command[RENDER_COMMAND_POSITION.INDEX]}\">`,\n// text.replace(/\\n/g, ' <br/> '),\n// '</span>',\n// ];\n// } else if (isComponentRenderCommand(command)) {\n// const selector = command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT_ID];\n// return [`<${selector} ${nestAttr} ${domAttr}>`, `</${selector}>`];\n// } else {\n// return 'UNKNOWN';\n// }\n// };\n\n// const formatHTMLStringArray = (html: string[]) => {\n// const result: string[] = [];\n// let indent = 0;\n\n// for (const tag of html) {\n// if (tag.startsWith('</')) {\n// indent--;\n// }\n\n// result.push(' '.repeat(indent * 2) + tag);\n\n// if (tag.startsWith('<') && !tag.startsWith('</') && !tag.startsWith('<br')) {\n// indent++;\n// }\n// }\n\n// return result.join('\\n');\n// };\n\n// const debugVisualizeRenderCommands = (commands: RenderCommand[]) => {\n// const debug = commands.map((command) => stringifyRenderCommand(command)).flat();\n\n// const prettified = formatHTMLStringArray(debug);\n\n// return prettified;\n// };\n\n// const stringifyRenderInstruction = (instruction: RenderInstruction) => {\n// const type = instruction[RENDER_INSTRUCTION_POSITION.TYPE];\n// const translatedType = Object.entries(RENDER_INSTRUCTION_TYPE).find(([, value]) => value === type)?.[0];\n\n// const command = stringifyRenderCommand(instruction[RENDER_INSTRUCTION_POSITION.COMMAND]);\n\n// return `${translatedType}: ${command}`;\n// };\n","import { ContentfulAudioComponent } from './components/audio';\nimport { ContentfulFileComponent } from './components/file';\nimport { ContentfulImageComponent } from './components/image';\nimport { ContentfulRichTextRendererComponent } from './components/rich-text-renderer';\nimport { ContentfulVideoComponent } from './components/video';\n\nexport const ContentfulImports = [\n ContentfulAudioComponent,\n ContentfulFileComponent,\n ContentfulImageComponent,\n ContentfulVideoComponent,\n ContentfulRichTextRendererComponent,\n] as const;\n","import { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfig, ContentfulEntry } from '../types';\nimport { createContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig: Partial<ContentfulConfig> | null | undefined = {}) => {\n return { provide: CONTENTFUL_CONFIG, useValue: createContentfulConfig(contentfulConfig) };\n};\n\nexport const isContentfulEntryType = <T extends ContentfulEntry>(entry: ContentfulEntry, type: string): entry is T =>\n entry.sys.contentType.sys.id === type;\n","export * from './lib/components/audio';\nexport * from './lib/components/file';\nexport * from './lib/components/image';\nexport * from './lib/components/link';\nexport * from './lib/components/rich-text-renderer';\nexport * from './lib/components/video';\nexport * from './lib/constants';\nexport * from './lib/contentful.imports';\nexport * from './lib/gql';\nexport * from './lib/types';\nexport * from './lib/utils';\n\n// Burst cache\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAEO,MAAM,6BAA6B,GAAG,GAAG,CAAA;;;;;;;;;;;;;;AA4BhD;AACO,MAAM,oBAAoB,GAAG,CAAC,KAAU,KAAiC;AAC9E,IAAA,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,IAAI,KAAK,EAAE,GAAG,IAAI,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ;AACxE;;MCba,wBAAwB,CAAA;AAdrC,IAAA,WAAA,GAAA;QAeE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAA+D;QACrF,IAAA,CAAA,UAAU,GAAG,KAAK,CAAc,IAAI;uFAAC;QACrC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAc,IAAI;wFAAC;QACtC,IAAA,CAAA,eAAe,GAAG,KAAK,CAAc,IAAI;4FAAC;AAE1C,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AACnB,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;YAE1B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,OAAO,IAAI;YACb;AAEA,YAAA,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;gBAC/B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B,GAAG;IAC/B,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,mCAAmC;;;MCPxB,uBAAuB,GAAG,CAAC,gBAAA,GAAiE,EAAE,KAAI;AAC7G,IAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,EAAE;AAC3F;MAEa,qBAAqB,GAAG,CAA4B,KAAsB,EAAE,IAAY,KACnG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,KAAK;;ACGnC;;ACZA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/contentful",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@analogjs/vite-plugin-angular": "2.
|
|
8
|
-
"@angular/cdk": "
|
|
9
|
-
"@angular/common": "
|
|
10
|
-
"@angular/core": "
|
|
11
|
-
"@angular/router": "
|
|
7
|
+
"@analogjs/vite-plugin-angular": "2.6.2",
|
|
8
|
+
"@angular/cdk": "22.0.3",
|
|
9
|
+
"@angular/common": "22.0.5",
|
|
10
|
+
"@angular/core": "22.0.5",
|
|
11
|
+
"@angular/router": "22.0.5",
|
|
12
12
|
"@contentful/rich-text-types": "17.2.7",
|
|
13
13
|
"@ethlete/cdk": "^5.0.0-beta.12",
|
|
14
14
|
"@ethlete/core": "^5.0.0-beta.11",
|
|
15
15
|
"@ethlete/query": "^6.0.0-beta.8",
|
|
16
|
-
"@nx/vite": "
|
|
16
|
+
"@nx/vite": "23.1.0-beta.7",
|
|
17
17
|
"rxjs": "7.8.2",
|
|
18
18
|
"vite": "8.0.13"
|
|
19
19
|
},
|