@ethlete/contentful 4.0.0-next.13 → 4.0.0-next.14
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.14
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- **Breaking:** an `internalHosts` entry now matches its host exactly; list a subdomain or write `*.example.com`. Also adds `entryHref`, embedded entry rich text, and fixes several embed and SSR hydration bugs.
|
|
8
|
+
|
|
3
9
|
## 4.0.0-next.13
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ViewEncapsulation, Component, InjectionToken, inject, numberAttribute, booleanAttribute, isDevMode, ViewContainerRef, ElementRef, effect, untracked, signal, reflectComponentType, inputBinding } from '@angular/core';
|
|
2
|
+
import { input, computed, ViewEncapsulation, Component, InjectionToken, inject, numberAttribute, booleanAttribute, isDevMode, ViewContainerRef, ElementRef, Injector, effect, untracked, signal, reflectComponentType, inputBinding } from '@angular/core';
|
|
3
3
|
import { formatFileSize, normalizePictureSizes, PictureComponent } from '@ethlete/components';
|
|
4
4
|
import { defineLabels, toProvideFn, toInjectFn, toToken, injectUrl, RuntimeError, isObject, getObjectProperty, injectRenderer } from '@ethlete/core';
|
|
5
5
|
import { DOCUMENT, Location } from '@angular/common';
|
|
@@ -169,6 +169,7 @@ const CONTENTFUL_CONFIG = new InjectionToken('ContentfulConfig');
|
|
|
169
169
|
*/
|
|
170
170
|
const CONTENTFUL_FALLBACK_CONFIG = {
|
|
171
171
|
internalHosts: [],
|
|
172
|
+
entryHref: null,
|
|
172
173
|
components: {},
|
|
173
174
|
customComponents: {},
|
|
174
175
|
imageOptions: {
|
|
@@ -395,25 +396,34 @@ const parseWebUrl = (href) => {
|
|
|
395
396
|
return null;
|
|
396
397
|
}
|
|
397
398
|
};
|
|
398
|
-
const
|
|
399
|
+
const parseConfiguredHost = (host) => {
|
|
399
400
|
const value = host.trim().toLowerCase();
|
|
401
|
+
const wildcard = value.startsWith('*.');
|
|
402
|
+
const bare = wildcard ? value.slice(2) : value;
|
|
400
403
|
try {
|
|
401
|
-
|
|
404
|
+
const url = new URL(bare.includes('://') ? bare : 'https://' + bare);
|
|
405
|
+
return { hostname: url.hostname, port: url.port, wildcard };
|
|
402
406
|
}
|
|
403
407
|
catch {
|
|
404
|
-
return
|
|
408
|
+
return { hostname: bare.split(':')[0] ?? bare, port: '', wildcard };
|
|
405
409
|
}
|
|
406
410
|
};
|
|
407
|
-
const
|
|
408
|
-
const
|
|
409
|
-
|
|
411
|
+
const matchesConfiguredHost = (url, configuredHost) => {
|
|
412
|
+
const { hostname, port, wildcard } = parseConfiguredHost(configuredHost);
|
|
413
|
+
if (!hostname || (port && url.port !== port))
|
|
414
|
+
return false;
|
|
415
|
+
return wildcard ? url.hostname.endsWith('.' + hostname) : url.hostname === hostname;
|
|
410
416
|
};
|
|
411
417
|
const isInternalWebUrl = (url, { location, internalHosts }) => (url.hostname === location.hostname && url.port === location.port) ||
|
|
412
|
-
internalHosts.some((host) =>
|
|
418
|
+
internalHosts.some((host) => matchesConfiguredHost(url, host));
|
|
413
419
|
const isExternalWebHref = (href, context) => {
|
|
414
420
|
const url = parseWebUrl(href);
|
|
415
421
|
return url !== null && !isInternalWebUrl(url, context);
|
|
416
422
|
};
|
|
423
|
+
const internalWebHrefPath = (href, context) => {
|
|
424
|
+
const url = parseWebUrl(href);
|
|
425
|
+
return url && isInternalWebUrl(url, context) ? url.pathname + url.search + url.hash : null;
|
|
426
|
+
};
|
|
417
427
|
const hasUrlScheme = (href) => /^[a-z][a-z\d+.-]*:/i.test(href);
|
|
418
428
|
const isRouteRelativeHref = (href) => !hasUrlScheme(href) && !href.startsWith('/');
|
|
419
429
|
const resolveHrefAgainstRoute = (href, routerUrl) => {
|
|
@@ -558,7 +568,7 @@ const CF_INLINES = {
|
|
|
558
568
|
const RICH_TEXT_RENDERER_ERRORS = {
|
|
559
569
|
rich_text_not_object: (data) => `The value at richTextPath is a ${data.type}, not a rich-text document object. Point richTextPath at the rich-text field itself (e.g. items[0].fields.body).`,
|
|
560
570
|
rich_text_wrong_type: 'The rich text object does not satisfy the RichTextResponse interface. It should contain a property named "nodeType" with the value "document".',
|
|
561
|
-
rich_text_conflicting_inputs: '
|
|
571
|
+
rich_text_conflicting_inputs: 'Set exactly one rich-text source: a GraphQL rich-text field through gqlRichText, a REST response through content and richTextPath, or a bare document through richText (with includes).',
|
|
562
572
|
asset_id_not_found: 'The asset ID was not found. This node is not supported.',
|
|
563
573
|
entry_id_not_found: 'The entry ID was not found. This node is not supported.',
|
|
564
574
|
text_parent_not_found: 'The parent node is not found. This structure is not supported.',
|
|
@@ -582,6 +592,11 @@ const richTextRendererError = (code, data) => {
|
|
|
582
592
|
};
|
|
583
593
|
|
|
584
594
|
const lowerCaseFirst = (value) => value.charAt(0).toLowerCase() + value.slice(1);
|
|
595
|
+
const toGqlTypeName = (contentTypeId) => {
|
|
596
|
+
const pascal = contentTypeId.replace(/[^a-z0-9]+(.)?/gi, (_, next) => next?.toUpperCase() ?? '');
|
|
597
|
+
return pascal.charAt(0).toUpperCase() + pascal.slice(1);
|
|
598
|
+
};
|
|
599
|
+
const toContentTypeId = (typename, contentTypeIds) => contentTypeIds.find((id) => toGqlTypeName(id) === typename) ?? lowerCaseFirst(typename);
|
|
585
600
|
const toRestAsset = (asset) => ({
|
|
586
601
|
sys: { type: 'Asset', id: asset.sys.id, createdAt: '', updatedAt: '', locale: '' },
|
|
587
602
|
fields: {
|
|
@@ -601,7 +616,7 @@ const toRestAsset = (asset) => ({
|
|
|
601
616
|
},
|
|
602
617
|
metadata: { tags: [] },
|
|
603
618
|
});
|
|
604
|
-
const toRestEntry = (entry) => {
|
|
619
|
+
const toRestEntry = (entry, contentTypeIds) => {
|
|
605
620
|
const { __typename, sys, ...fields } = entry;
|
|
606
621
|
if (!__typename) {
|
|
607
622
|
return null;
|
|
@@ -613,7 +628,7 @@ const toRestEntry = (entry) => {
|
|
|
613
628
|
createdAt: '',
|
|
614
629
|
updatedAt: '',
|
|
615
630
|
locale: '',
|
|
616
|
-
contentType: { sys: { type: 'Link', linkType: 'ContentType', id:
|
|
631
|
+
contentType: { sys: { type: 'Link', linkType: 'ContentType', id: toContentTypeId(__typename, contentTypeIds) } },
|
|
617
632
|
},
|
|
618
633
|
fields,
|
|
619
634
|
metadata: { tags: [] },
|
|
@@ -622,11 +637,11 @@ const toRestEntry = (entry) => {
|
|
|
622
637
|
const present = (items) => (items ?? []).filter((item) => item !== null && item !== undefined);
|
|
623
638
|
/**
|
|
624
639
|
* Maps the `links` of a GraphQL rich-text field to the entries and assets the renderer resolves
|
|
625
|
-
* embeds against. An entry's content type id is
|
|
626
|
-
*
|
|
627
|
-
* `__typename` are dropped.
|
|
640
|
+
* embeds against. An entry's content type id is the id in `contentTypeIds` whose GraphQL type name
|
|
641
|
+
* (PascalCase, separators dropped: `product-teaser` → `ProductTeaser`) equals its `__typename`, else the
|
|
642
|
+
* `__typename` with the first letter lower-cased. Entries without a `__typename` are dropped.
|
|
628
643
|
*/
|
|
629
|
-
const mapContentfulGqlLinks = (links) => {
|
|
644
|
+
const mapContentfulGqlLinks = (links, contentTypeIds = []) => {
|
|
630
645
|
const assets = new Map();
|
|
631
646
|
const entries = new Map();
|
|
632
647
|
for (const asset of [...present(links?.assets?.block), ...present(links?.assets?.hyperlink)]) {
|
|
@@ -637,7 +652,7 @@ const mapContentfulGqlLinks = (links) => {
|
|
|
637
652
|
...present(links?.entries?.inline),
|
|
638
653
|
...present(links?.entries?.hyperlink),
|
|
639
654
|
]) {
|
|
640
|
-
const entry = toRestEntry(gqlEntry);
|
|
655
|
+
const entry = toRestEntry(gqlEntry, contentTypeIds);
|
|
641
656
|
if (entry) {
|
|
642
657
|
entries.set(entry.sys.id, entry);
|
|
643
658
|
}
|
|
@@ -734,6 +749,12 @@ const isExecutedComponentCommandCacheItem = (cache) => {
|
|
|
734
749
|
return cache.command.kind === 'component';
|
|
735
750
|
};
|
|
736
751
|
const ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID = '$$$_et-contentful-any-entry-content-type-sys-id';
|
|
752
|
+
const includeMapLookups = /* @__PURE__ */ new WeakMap();
|
|
753
|
+
const lookupOf = (includes) => includeMapLookups.get(includes) ?? {
|
|
754
|
+
entry: (id) => includes.getEntry(id, ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID),
|
|
755
|
+
asset: (id) => includes.getAsset(id),
|
|
756
|
+
};
|
|
757
|
+
const ANCESTOR_ENTRY_IDS = /* @__PURE__ */ new InjectionToken('ContentfulRichTextAncestorEntryIds');
|
|
737
758
|
/**
|
|
738
759
|
* Create a contentful include map using the provided entries and assets.
|
|
739
760
|
*/
|
|
@@ -778,12 +799,12 @@ const createContentfulIncludeMap = (config) => {
|
|
|
778
799
|
const getAssets = (ids) => {
|
|
779
800
|
return ids.map((id) => getAsset(id)).filter((asset) => asset !== null);
|
|
780
801
|
};
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
802
|
+
const includeMap = { getEntry, getEntries, getAsset, getAssets };
|
|
803
|
+
includeMapLookups.set(includeMap, {
|
|
804
|
+
entry: (id) => entryMap.get(id) ?? null,
|
|
805
|
+
asset: (id) => assetMap.get(id) ?? null,
|
|
806
|
+
});
|
|
807
|
+
return includeMap;
|
|
787
808
|
};
|
|
788
809
|
const warnedRichTextPaths = /* @__PURE__ */ new Set();
|
|
789
810
|
const warnOnUnresolvedParentPath = (content, richTextPath) => {
|
|
@@ -811,6 +832,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
811
832
|
this.document = inject(DOCUMENT);
|
|
812
833
|
this.location = inject(Location);
|
|
813
834
|
this.url = injectUrl();
|
|
835
|
+
this.injector = inject(Injector);
|
|
814
836
|
/**
|
|
815
837
|
* The contentful response gotten via their REST api.
|
|
816
838
|
* @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection
|
|
@@ -830,26 +852,50 @@ class ContentfulRichTextRendererComponent {
|
|
|
830
852
|
*/
|
|
831
853
|
this.gqlRichText = input(/* @ts-ignore */
|
|
832
854
|
...(ngDevMode ? [undefined, { debugName: "gqlRichText" }] : /* istanbul ignore next */ []));
|
|
855
|
+
/**
|
|
856
|
+
* A bare rich-text document, e.g. a rich-text field of an embedded entry. Pair it with `includes` so its
|
|
857
|
+
* embeds resolve. An alternative to `content` / `richTextPath` and `gqlRichText`.
|
|
858
|
+
* @example <et-contentful-rich-text-renderer [richText]="fields().body" [includes]="includes()" />
|
|
859
|
+
*/
|
|
860
|
+
this.richText = input(/* @ts-ignore */
|
|
861
|
+
...(ngDevMode ? [undefined, { debugName: "richText" }] : /* istanbul ignore next */ []));
|
|
862
|
+
/** The linked entries and assets `richText` resolves its embeds against, e.g. a custom component's `includes`. */
|
|
863
|
+
this.includes = input(/* @ts-ignore */
|
|
864
|
+
...(ngDevMode ? [undefined, { debugName: "includes" }] : /* istanbul ignore next */ []));
|
|
865
|
+
this.ancestorEntryIds = inject(ANCESTOR_ENTRY_IDS, { optional: true }) ?? new Set();
|
|
833
866
|
this.executedCommandsCache = new Map();
|
|
834
|
-
this.
|
|
867
|
+
this.contentIncludesMap = computed(() => {
|
|
868
|
+
const includes = this.includes();
|
|
869
|
+
if (includes) {
|
|
870
|
+
return includes;
|
|
871
|
+
}
|
|
835
872
|
const gqlRichText = this.gqlRichText();
|
|
836
873
|
if (gqlRichText) {
|
|
837
|
-
return mapContentfulGqlLinks(gqlRichText.links);
|
|
874
|
+
return createContentfulIncludeMap(mapContentfulGqlLinks(gqlRichText.links, Object.keys(this.config.customComponents)));
|
|
875
|
+
}
|
|
876
|
+
const content = this.content();
|
|
877
|
+
const entries = new Map();
|
|
878
|
+
for (const entry of [...(content?.items ?? []), ...(content?.includes?.Entry ?? [])]) {
|
|
879
|
+
entries.set(entry.sys.id, entry);
|
|
838
880
|
}
|
|
839
|
-
|
|
840
|
-
return { assets: includes?.Asset ?? [], entries: includes?.Entry ?? [] };
|
|
881
|
+
return createContentfulIncludeMap({ assets: content?.includes?.Asset ?? [], entries: [...entries.values()] });
|
|
841
882
|
}, /* @ts-ignore */
|
|
842
|
-
...(ngDevMode ? [{ debugName: "includes" }] : /* istanbul ignore next */ []));
|
|
843
|
-
this.contentIncludesMap = computed(() => createContentfulIncludeMap(this.includes()), /* @ts-ignore */
|
|
844
883
|
...(ngDevMode ? [{ debugName: "contentIncludesMap" }] : /* istanbul ignore next */ []));
|
|
845
|
-
this.
|
|
846
|
-
...(ngDevMode ? [{ debugName: "
|
|
884
|
+
this.linkLookup = computed(() => lookupOf(this.contentIncludesMap()), /* @ts-ignore */
|
|
885
|
+
...(ngDevMode ? [{ debugName: "linkLookup" }] : /* istanbul ignore next */ []));
|
|
847
886
|
this.richTextData = computed(() => {
|
|
848
887
|
const gqlRichText = this.gqlRichText();
|
|
849
888
|
const content = this.content();
|
|
850
889
|
const richTextPath = this.richTextPath();
|
|
851
|
-
|
|
852
|
-
|
|
890
|
+
const richText = this.richText();
|
|
891
|
+
if (ngDevMode && [gqlRichText, content || richTextPath, richText].filter(Boolean).length > 1) {
|
|
892
|
+
throw richTextRendererError('rich_text_conflicting_inputs', { gqlRichText, content, richTextPath, richText });
|
|
893
|
+
}
|
|
894
|
+
if (richText) {
|
|
895
|
+
if (!isRichTextRootNode(richText)) {
|
|
896
|
+
throw richTextRendererError('rich_text_wrong_type', { richText });
|
|
897
|
+
}
|
|
898
|
+
return richText;
|
|
853
899
|
}
|
|
854
900
|
if (gqlRichText) {
|
|
855
901
|
if (!isRichTextRootNode(gqlRichText.json)) {
|
|
@@ -866,20 +912,20 @@ class ContentfulRichTextRendererComponent {
|
|
|
866
912
|
}
|
|
867
913
|
return null;
|
|
868
914
|
}
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
if (ngDevMode &&
|
|
915
|
+
const pathValue = getObjectProperty(content, richTextPath);
|
|
916
|
+
if (pathValue === null || pathValue === undefined) {
|
|
917
|
+
if (ngDevMode && pathValue === undefined) {
|
|
872
918
|
warnOnUnresolvedParentPath(content, richTextPath);
|
|
873
919
|
}
|
|
874
920
|
return null;
|
|
875
921
|
}
|
|
876
|
-
if (!isObject(
|
|
877
|
-
throw richTextRendererError('rich_text_not_object', { content, richTextPath, type: typeof
|
|
922
|
+
if (!isObject(pathValue)) {
|
|
923
|
+
throw richTextRendererError('rich_text_not_object', { content, richTextPath, type: typeof pathValue });
|
|
878
924
|
}
|
|
879
|
-
if (!isRichTextRootNode(
|
|
925
|
+
if (!isRichTextRootNode(pathValue)) {
|
|
880
926
|
throw richTextRendererError('rich_text_wrong_type', { content, richTextPath });
|
|
881
927
|
}
|
|
882
|
-
return
|
|
928
|
+
return pathValue;
|
|
883
929
|
}, /* @ts-ignore */
|
|
884
930
|
...(ngDevMode ? [{ debugName: "richTextData" }] : /* istanbul ignore next */ []));
|
|
885
931
|
this.renderCommands = computed(() => {
|
|
@@ -999,7 +1045,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
999
1045
|
if (!assetId) {
|
|
1000
1046
|
throw richTextRendererError('asset_id_not_found', { node });
|
|
1001
1047
|
}
|
|
1002
|
-
const asset = this.
|
|
1048
|
+
const asset = this.linkLookup().asset(assetId);
|
|
1003
1049
|
if (!asset) {
|
|
1004
1050
|
if (isDevMode()) {
|
|
1005
1051
|
console.warn('Embedded asset is missing from the includes! The asset will be skipped. Is it unpublished or deleted?', { assetId, node });
|
|
@@ -1055,10 +1101,16 @@ class ContentfulRichTextRendererComponent {
|
|
|
1055
1101
|
}
|
|
1056
1102
|
else if (node.nodeType === CF_INLINES.ASSET_HYPERLINK) {
|
|
1057
1103
|
const assetId = node.data['target']?.sys?.id;
|
|
1058
|
-
const asset = assetId ? this.
|
|
1104
|
+
const asset = assetId ? this.linkLookup().asset(assetId) : null;
|
|
1059
1105
|
const url = asset?.fields.file?.url;
|
|
1060
1106
|
href = url ? normalizeHref(url) : null;
|
|
1061
1107
|
}
|
|
1108
|
+
else if (this.config.entryHref) {
|
|
1109
|
+
const entryId = node.data['target']?.sys?.id;
|
|
1110
|
+
const entry = entryId ? this.linkLookup().entry(entryId) : null;
|
|
1111
|
+
const entryHref = entry ? this.config.entryHref(entry) : null;
|
|
1112
|
+
href = entryHref ? normalizeHref(entryHref) : null;
|
|
1113
|
+
}
|
|
1062
1114
|
const linkTexts = node.content.filter((child) => child.nodeType === 'text' && Boolean(child.value));
|
|
1063
1115
|
if (!linkTexts.length) {
|
|
1064
1116
|
break;
|
|
@@ -1066,11 +1118,15 @@ class ContentfulRichTextRendererComponent {
|
|
|
1066
1118
|
const linkText = linkTexts.map((child) => child.value).join('');
|
|
1067
1119
|
const linkComponent = href ? this.config.components.link : null;
|
|
1068
1120
|
if (href && !linkComponent) {
|
|
1069
|
-
const
|
|
1070
|
-
|
|
1071
|
-
|
|
1121
|
+
const webUrlContext = { location: this.document.location, internalHosts: this.config.internalHosts };
|
|
1122
|
+
const internalPath = internalWebHrefPath(href, webUrlContext);
|
|
1123
|
+
const anchorHref = internalPath !== null
|
|
1124
|
+
? this.location.prepareExternalUrl(internalPath)
|
|
1125
|
+
: isRouteRelativeHref(href)
|
|
1126
|
+
? this.location.prepareExternalUrl(resolveHrefAgainstRoute(href, this.url()))
|
|
1127
|
+
: href;
|
|
1072
1128
|
const attributes = { class: DEFAULT_ANCHOR_CLASS, href: anchorHref };
|
|
1073
|
-
if (isExternalWebHref(href,
|
|
1129
|
+
if (isExternalWebHref(href, webUrlContext)) {
|
|
1074
1130
|
attributes['target'] = '_blank';
|
|
1075
1131
|
attributes['rel'] = 'noopener noreferrer';
|
|
1076
1132
|
}
|
|
@@ -1135,7 +1191,13 @@ class ContentfulRichTextRendererComponent {
|
|
|
1135
1191
|
if (!entryId) {
|
|
1136
1192
|
throw richTextRendererError('entry_id_not_found', { node });
|
|
1137
1193
|
}
|
|
1138
|
-
|
|
1194
|
+
if (this.ancestorEntryIds.has(entryId)) {
|
|
1195
|
+
if (isDevMode()) {
|
|
1196
|
+
console.warn('Embedded entry embeds itself through its own rich text! The nested occurrence is skipped to stop the cycle.', { entryId, node });
|
|
1197
|
+
}
|
|
1198
|
+
break;
|
|
1199
|
+
}
|
|
1200
|
+
const entry = this.linkLookup().entry(entryId);
|
|
1139
1201
|
if (!entry) {
|
|
1140
1202
|
if (isDevMode()) {
|
|
1141
1203
|
console.warn('Embedded entry is missing from the includes! The entry will be skipped. Is it unpublished or deleted, or is the include query param too low?', { entryId, node });
|
|
@@ -1166,11 +1228,22 @@ class ContentfulRichTextRendererComponent {
|
|
|
1166
1228
|
sys: entry.sys,
|
|
1167
1229
|
includes: this.contentIncludesMap(),
|
|
1168
1230
|
},
|
|
1231
|
+
entryId,
|
|
1169
1232
|
id,
|
|
1170
1233
|
});
|
|
1171
1234
|
domPosition++;
|
|
1172
1235
|
break;
|
|
1173
1236
|
}
|
|
1237
|
+
case CF_BLOCKS.EMBEDDED_RESOURCE:
|
|
1238
|
+
case CF_INLINES.EMBEDDED_RESOURCE: {
|
|
1239
|
+
if (isDevMode()) {
|
|
1240
|
+
console.warn(`Rich text node type "${node.nodeType}" is not supported and is skipped.`, {
|
|
1241
|
+
urn: node.data['target']?.sys?.urn,
|
|
1242
|
+
node,
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
break;
|
|
1246
|
+
}
|
|
1174
1247
|
default: {
|
|
1175
1248
|
const tag = translateContentfulNodeTypeToHtmlTag(node.nodeType);
|
|
1176
1249
|
const attributes = {
|
|
@@ -1257,7 +1330,15 @@ class ContentfulRichTextRendererComponent {
|
|
|
1257
1330
|
const bindings = declaredInputs
|
|
1258
1331
|
.filter((declared) => declared.propName in command.inputs)
|
|
1259
1332
|
.map((declared) => inputBinding(declared.templateName, () => inputs()[declared.propName]));
|
|
1260
|
-
const
|
|
1333
|
+
const injector = command.entryId
|
|
1334
|
+
? Injector.create({
|
|
1335
|
+
providers: [
|
|
1336
|
+
{ provide: ANCESTOR_ENTRY_IDS, useValue: new Set([...this.ancestorEntryIds, command.entryId]) },
|
|
1337
|
+
],
|
|
1338
|
+
parent: this.injector,
|
|
1339
|
+
})
|
|
1340
|
+
: undefined;
|
|
1341
|
+
const componentRef = this.viewContainerRef.createComponent(command.component, { bindings, injector });
|
|
1261
1342
|
const rootNode = this.getComponentRootNode(componentRef);
|
|
1262
1343
|
this.renderInsertAfter(rootNode, { parentElement, previousSibling });
|
|
1263
1344
|
this.executedCommandsCache.set(command.id, {
|
|
@@ -1383,7 +1464,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
1383
1464
|
this.renderer.insertBefore(parentElement, node, previousSibling ? previousSibling.nextSibling : parentElement.firstChild);
|
|
1384
1465
|
}
|
|
1385
1466
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ContentfulRichTextRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1386
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, richTextPath: { classPropertyName: "richTextPath", publicName: "richTextPath", isSignal: true, isRequired: false, transformFunction: null }, gqlRichText: { classPropertyName: "gqlRichText", publicName: "gqlRichText", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, richTextPath: { classPropertyName: "richTextPath", publicName: "richTextPath", isSignal: true, isRequired: false, transformFunction: null }, gqlRichText: { classPropertyName: "gqlRichText", publicName: "gqlRichText", isSignal: true, isRequired: false, transformFunction: null }, richText: { classPropertyName: "richText", publicName: "richText", isSignal: true, isRequired: false, transformFunction: null }, includes: { classPropertyName: "includes", publicName: "includes", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ngSkipHydration": "true" }, classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1387
1468
|
}
|
|
1388
1469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ContentfulRichTextRendererComponent, decorators: [{
|
|
1389
1470
|
type: Component,
|
|
@@ -1393,9 +1474,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
1393
1474
|
encapsulation: ViewEncapsulation.None,
|
|
1394
1475
|
host: {
|
|
1395
1476
|
class: 'et-contentful-rich-text-renderer',
|
|
1477
|
+
ngSkipHydration: 'true',
|
|
1396
1478
|
},
|
|
1397
1479
|
}]
|
|
1398
|
-
}], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], richTextPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "richTextPath", required: false }] }], gqlRichText: [{ type: i0.Input, args: [{ isSignal: true, alias: "gqlRichText", required: false }] }] } });
|
|
1480
|
+
}], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], richTextPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "richTextPath", required: false }] }], gqlRichText: [{ type: i0.Input, args: [{ isSignal: true, alias: "gqlRichText", required: false }] }], richText: [{ type: i0.Input, args: [{ isSignal: true, alias: "richText", required: false }] }], includes: [{ type: i0.Input, args: [{ isSignal: true, alias: "includes", required: false }] }] } });
|
|
1399
1481
|
|
|
1400
1482
|
class ContentfulVideoComponent {
|
|
1401
1483
|
constructor() {
|
|
@@ -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-labels.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/utils/contentful-config.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/link/contentful-link.util.ts","../../../../libs/contentful/src/lib/components/link/contentful-link.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-node-types.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.gql.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/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/contentful.imports.ts","../../../../libs/contentful/src/lib/utils/contentful-default-components.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { GQL } from '@ethlete/query';\n\nexport const GQL_FRAGMENT_CONTENTFUL_ASSET = `\n fragment ContentfulAssetData on Asset {\n sys {\n id\n }\n url\n title\n fileName\n width\n height\n description\n contentType\n size\n }\n` as GQL;\n\nexport type ContentfulGqlAsset = {\n sys: {\n id: string;\n };\n title: string | null;\n fileName?: 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 Boolean(asset && typeof asset === 'object' && asset.sys?.id && !('fields' in asset));\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 { Component, ViewEncapsulation, computed, input } from '@angular/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 class=\"et-contentful-audio-figure\">\n @if (data.title) {\n <figcaption class=\"et-contentful-audio-figcaption\">{{ data.title }}</figcaption>\n }\n <audio [src]=\"data.url\" class=\"et-contentful-audio-audio\" controls></audio>\n </figure>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-audio',\n },\n})\nexport class ContentfulAudioComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n title: asset.title || asset.fileName || null,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n title: asset.fields.title || asset.fields.file.fileName || null,\n };\n }\n\n return null;\n });\n}\n","import { formatFileSize } from '@ethlete/components';\nimport { defineLabels, toInjectFn, toProvideFn, toToken } from '@ethlete/core';\n\n/** Every string `et-contentful-file` renders itself. Override them app-wide with {@link provideContentfulFileLabels}. */\nexport type ContentfulFileLabels = {\n /** The size shown after the file title, e.g. `'(1.5 MB)'`. */\n fileSize: (bytes: number) => string;\n};\n\n/** The built-in English labels. */\nexport const DEFAULT_CONTENTFUL_FILE_LABELS: ContentfulFileLabels = {\n fileSize: (bytes) => `(${formatFileSize(bytes)})`,\n};\n\nconst CONTENTFUL_FILE_LABELS_DEF = /* @__PURE__ */ defineLabels<ContentfulFileLabels>(\n 'CONTENTFUL_FILE_LABELS',\n DEFAULT_CONTENTFUL_FILE_LABELS,\n);\n\n/**\n * Localize `et-contentful-file` for everything below this injector, and read the set in effect here as a signal.\n * Partial - whatever you leave out keeps its {@link DEFAULT_CONTENTFUL_FILE_LABELS} value.\n *\n * @example\n * provideContentfulFileLabels({ fileSize: (bytes) => `(${new Intl.NumberFormat('de').format(bytes)} Byte)` });\n */\nexport const provideContentfulFileLabels = /* @__PURE__ */ toProvideFn(CONTENTFUL_FILE_LABELS_DEF);\nexport const injectContentfulFileLabels = /* @__PURE__ */ toInjectFn(CONTENTFUL_FILE_LABELS_DEF);\nexport const CONTENTFUL_FILE_LABELS = /* @__PURE__ */ toToken(CONTENTFUL_FILE_LABELS_DEF);\n","import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\nimport { injectContentfulFileLabels } from './contentful-file-labels';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n @if (data(); as data) {\n <a [href]=\"data.url\" class=\"et-contentful-file-anchor\" target=\"_blank\" rel=\"noopener noreferrer\">\n {{ data.title }}\n @if (data.size !== null) {\n {{ labels().fileSize(data.size) }}\n }\n </a>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-file',\n },\n})\nexport class ContentfulFileComponent {\n protected labels = injectContentfulFileLabels();\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n size: asset.size,\n title: asset.title || asset.fileName || null,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n size: asset.fields.file.details.size,\n title: asset.fields.title || asset.fields.file.fileName || null,\n };\n }\n\n return null;\n });\n}\n","import { InjectionToken } from '@angular/core';\nimport { ContentfulConfig } from '../types';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('ContentfulConfig');\n","import { inject } from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../constants/contentful.constants';\nimport { ContentfulConfig, ContentfulConfigOptions } from '../types';\n\n/**\n * The config used when no `provideContentfulConfig()` is in scope. It declares no\n * `components`, so embedded assets are skipped and hyperlinks render as plain anchors\n * until a config is provided.\n */\nconst CONTENTFUL_FALLBACK_CONFIG: ContentfulConfig = {\n internalHosts: [],\n components: {},\n customComponents: {},\n imageOptions: {\n srcsetSizes: ['375w', '1280w', '1920w', '2560w'],\n sizes: ['100vw'],\n backgroundColor: null,\n },\n};\n\nconst withoutUndefined = <T extends object>(value: T | null | undefined) =>\n Object.fromEntries(Object.entries(value ?? {}).filter(([, entry]) => entry !== undefined)) as Partial<T>;\n\nexport const createContentfulConfig = (options?: ContentfulConfigOptions | null): ContentfulConfig => {\n const config = options ?? {};\n\n return {\n ...CONTENTFUL_FALLBACK_CONFIG,\n ...config,\n components: config.components ?? CONTENTFUL_FALLBACK_CONFIG.components,\n customComponents: config.customComponents ?? CONTENTFUL_FALLBACK_CONFIG.customComponents,\n internalHosts: config.internalHosts ?? CONTENTFUL_FALLBACK_CONFIG.internalHosts,\n imageOptions: { ...CONTENTFUL_FALLBACK_CONFIG.imageOptions, ...withoutUndefined(config.imageOptions) },\n };\n};\n\n/**\n * Reads the contentful config from the current injector. Falls back to a config without\n * any `components` when none was provided via `provideContentfulConfig()`.\n */\nexport const injectContentfulConfig = (): ContentfulConfig =>\n inject(CONTENTFUL_CONFIG, { optional: true }) ?? CONTENTFUL_FALLBACK_CONFIG;\n","import { PictureSource } from '@ethlete/components';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\n\nexport const generateDefaultContentfulImageSource = (data: ContentfulRestAsset | ContentfulGqlAsset): PictureSource => {\n const { url, contentType } = isContentfulGqlAsset(data) ? data : (data.fields.file ?? {});\n\n return url ? { type: contentType ?? '', srcset: url } : { type: '', srcset: '' };\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 const widthAndHeight = /^(\\d+)w?x(\\d+)h?$/.exec(size);\n\n if (widthAndHeight) {\n return {\n width: Number(widthAndHeight[1]),\n height: Number(widthAndHeight[2]),\n };\n }\n\n const height = /^(\\d+)h$/.exec(size);\n\n if (height) {\n return { width: null, height: Number(height[1]) };\n }\n\n const width = /^(\\d+)w?$/.exec(size);\n\n return width ? { width: Number(width[1]), height: null } : { width: null, height: null };\n};\n\nconst SOURCE_TYPES = ['image/avif', 'image/webp'];\n\nexport type ContentfulImageSourcesOptions = {\n srcsetSizes?: string[];\n backgroundColor?: string | null;\n quality?: number | null;\n focusArea?: ContentfulImageFocusArea | null;\n resizeBehavior?: ContentfulImageResizeBehavior | null;\n};\n\n/**\n * Builds AVIF and WebP `<source>` entries for a Contentful asset through the Contentful Images API.\n *\n * @example\n * generateContentfulImageSources(asset, { srcsetSizes: ['400w', '800w'], quality: 80 });\n */\nexport const generateContentfulImageSources = (\n data: ContentfulRestAsset | ContentfulGqlAsset,\n options: ContentfulImageSourcesOptions = {},\n): PictureSource[] => {\n const { srcsetSizes = [], backgroundColor = null, quality = null, focusArea = null, resizeBehavior = null } = options;\n\n const isGqlAsset = isContentfulGqlAsset(data);\n const baseUrl = isGqlAsset ? data.url : data.fields.file?.url;\n\n if (!baseUrl) {\n return [];\n }\n\n const imageDimensions = isGqlAsset ? data : data.fields.file?.details.image;\n const sources: PictureSource[] = [];\n\n for (const type of SOURCE_TYPES) {\n const sourceSets: string[] = [];\n const queryParams: string[] = [];\n\n queryParams.push(`fm=${type.split('/')[1]}`);\n\n if (backgroundColor) {\n queryParams.push(`bg=rgb:${backgroundColor.replace(/^#/, '')}`);\n }\n\n if (quality !== null && Number.isFinite(quality)) {\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\n if (srcsetSizes.length) {\n const urlWithParams = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${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 && imageDimensions?.width && imageDimensions.height) {\n const derivedWidth = Math.round((height * imageDimensions.width) / imageDimensions.height);\n sourceSets.push(`${urlWithParams}&w=${derivedWidth}&h=${height} ${derivedWidth}w`);\n } else if (ngDevMode && type === SOURCE_TYPES[0]) {\n console.warn(\n height\n ? `Contentful image: srcsetSizes entry \"${size}\" is dropped. A height-only size needs the asset's width and height to derive a width descriptor.`\n : `Contentful image: srcsetSizes entry \"${size}\" is not a valid size and is dropped. Use \"400\", \"400w\", \"400h\" or \"400x300\"; viewport sizes like \"50vw\" belong in sizes.`,\n );\n }\n }\n }\n\n sources.push({\n type,\n srcset: sourceSets.length\n ? sourceSets.join(', ')\n : `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${queryParams.join('&')}`,\n });\n }\n\n return sources;\n};\n","import { Component, ViewEncapsulation, booleanAttribute, computed, input, numberAttribute } from '@angular/core';\nimport { PictureComponent, normalizePictureSizes } from '@ethlete/components';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport {\n generateContentfulImageSources,\n generateDefaultContentfulImageSource,\n} from './contentful-image.component.utils';\n\nconst optionalNumberAttribute = (value: unknown) => {\n const transformed = numberAttribute(value);\n\n return Number.isFinite(transformed) ? transformed : null;\n};\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <et-picture\n [priority]=\"priority()\"\n [defaultSrc]=\"defaultSrcValue()\"\n [alt]=\"normalizedAsset().alt ?? ''\"\n [figcaption]=\"normalizedAsset().figcaption ?? null\"\n [width]=\"normalizedAsset().width ?? null\"\n [height]=\"normalizedAsset().height ?? null\"\n [sizes]=\"sizes()\"\n [sources]=\"sourcesValue()\"\n />\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [PictureComponent],\n host: {\n class: 'et-contentful-image',\n },\n})\nexport class ContentfulImageComponent {\n private contentfulConfig = injectContentfulConfig();\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n backgroundColor = input<string | null>(this.contentfulConfig.imageOptions.backgroundColor);\n srcsetSizes = input<string[]>(this.contentfulConfig.imageOptions.srcsetSizes);\n\n quality = input(null, { transform: optionalNumberAttribute });\n focusArea = input<ContentfulImageFocusArea | null>(null);\n resizeBehavior = input<ContentfulImageResizeBehavior | null>(null);\n priority = input(false, { transform: booleanAttribute });\n sizes = input<string | null, string[] | string | null>(\n normalizePictureSizes(this.contentfulConfig.imageOptions.sizes),\n {\n transform: (v) => normalizePictureSizes(v),\n },\n );\n\n protected 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 protected sourcesValue = computed(() => {\n const asset = this.asset();\n const options = {\n srcsetSizes: this.srcsetSizes(),\n backgroundColor: this.backgroundColor(),\n quality: this.quality(),\n focusArea: this.focusArea(),\n resizeBehavior: this.resizeBehavior(),\n };\n\n if (!asset) {\n return [];\n }\n\n return generateContentfulImageSources(asset, options);\n });\n\n protected defaultSrcValue = computed(() => {\n const asset = this.asset();\n\n return asset ? generateDefaultContentfulImageSource(asset) : null;\n });\n}\n","export const parseWebUrl = (href: string): URL | null => {\n if (!/^(?:https?:)?\\/\\//i.test(href)) {\n return null;\n }\n\n try {\n return new URL(href.startsWith('//') ? 'https:' + href : href);\n } catch {\n return null;\n }\n};\n\nconst normalizeHostname = (host: string) => {\n const value = host.trim().toLowerCase();\n\n try {\n return new URL(value.includes('://') ? value : 'https://' + value).hostname;\n } catch {\n return value.split(':')[0] ?? value;\n }\n};\n\nconst matchesHostname = (hostname: string, configuredHost: string) => {\n const normalizedHost = normalizeHostname(configuredHost);\n\n return hostname === normalizedHost || hostname.endsWith('.' + normalizedHost);\n};\n\nexport type WebUrlContext = { location: Location; internalHosts: string[] };\n\nexport const isInternalWebUrl = (url: URL, { location, internalHosts }: WebUrlContext) =>\n (url.hostname === location.hostname && url.port === location.port) ||\n internalHosts.some((host) => matchesHostname(url.hostname, host));\n\nexport const isExternalWebHref = (href: string, context: WebUrlContext) => {\n const url = parseWebUrl(href);\n\n return url !== null && !isInternalWebUrl(url, context);\n};\n\nexport const hasUrlScheme = (href: string) => /^[a-z][a-z\\d+.-]*:/i.test(href);\n\nexport const isRouteRelativeHref = (href: string) => !hasUrlScheme(href) && !href.startsWith('/');\n\nexport const resolveHrefAgainstRoute = (href: string, routerUrl: string) => {\n const resolved = new URL(href, 'https://contentful.invalid' + routerUrl);\n\n return resolved.pathname + resolved.search + resolved.hash;\n};\n","import { DOCUMENT, Location } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\nimport { injectUrl } from '@ethlete/core';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport { hasUrlScheme, isInternalWebUrl, parseWebUrl, resolveHrefAgainstRoute } from './contentful-link.util';\n\nconst RICH_TEXT_ANCHOR_CLASSES = ['et-contentful-rich-text-default-element', 'et-contentful-rich-text-default-a'];\n\n@Component({\n selector: 'et-contentful-link',\n template: `\n @if (usesRouterLink()) {\n <a [class]=\"modifierClasses()\" [routerLink]=\"internalUrlTree()\" class=\"et-contentful-link-anchor\">{{ text() }}</a>\n } @else {\n <a\n [class]=\"modifierClasses()\"\n [href]=\"anchorHref()\"\n [attr.target]=\"openInNewTab() ? '_blank' : null\"\n [attr.rel]=\"openInNewTab() ? 'noopener noreferrer' : null\"\n class=\"et-contentful-link-anchor\"\n >{{ text() }}</a\n >\n }\n `,\n styleUrl: './contentful-link.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [RouterLink],\n host: {\n class: 'et-contentful-link',\n },\n})\nexport class ContentfulLinkComponent {\n private document = inject(DOCUMENT);\n private location = inject(Location);\n private router = inject(Router);\n private config = injectContentfulConfig();\n private url = injectUrl();\n\n href = input.required<string>();\n text = input.required<string>();\n marks = input<readonly string[]>([]);\n richText = input(false);\n\n protected usesRouterLink = computed(() => {\n const href = this.href();\n const absoluteUrl = parseWebUrl(href);\n\n if (absoluteUrl) {\n return isInternalWebUrl(absoluteUrl, {\n location: this.document.location,\n internalHosts: this.config.internalHosts,\n });\n }\n\n return !href.startsWith('#') && !hasUrlScheme(href);\n });\n\n protected anchorHref = computed(() => {\n const href = this.href();\n\n return href.startsWith('#') ? this.location.prepareExternalUrl(resolveHrefAgainstRoute(href, this.url())) : href;\n });\n\n protected openInNewTab = computed(() => Boolean(parseWebUrl(this.href())) && !this.usesRouterLink());\n\n protected internalPath = computed(() => {\n const href = this.href();\n const url = parseWebUrl(href);\n\n if (url) {\n return url.pathname + url.search + url.hash;\n }\n\n if (href.startsWith('/')) {\n return href;\n }\n\n return resolveHrefAgainstRoute(href, this.url());\n });\n\n protected internalUrlTree = computed(() => this.router.parseUrl(this.internalPath()));\n\n protected modifierClasses = computed(() => [\n ...(this.richText() ? RICH_TEXT_ANCHOR_CLASSES : []),\n ...this.marks().map((mark) => `et-contentful-rich-text-mark-${mark}`),\n ]);\n}\n","import { BLOCKS, INLINES } from '@contentful/rich-text-types';\n\n/**\n * The `BLOCKS` node type strings of `@contentful/rich-text-types`, as a plain literal map.\n * Keep the values in sync with the enum - they are part of the Contentful Delivery API.\n *\n * These maps exist because `BLOCKS` and `INLINES` are TS enums: reading one in a *value* position\n * anywhere in this lib emits a runtime import and costs every consumer ~2.4 kB gz. Use the enums for\n * types only - the `contentful-deps` size golden fails if that slips.\n */\nexport const CF_BLOCKS = {\n DOCUMENT: 'document',\n PARAGRAPH: 'paragraph',\n HEADING_1: 'heading-1',\n HEADING_2: 'heading-2',\n HEADING_3: 'heading-3',\n HEADING_4: 'heading-4',\n HEADING_5: 'heading-5',\n HEADING_6: 'heading-6',\n OL_LIST: 'ordered-list',\n UL_LIST: 'unordered-list',\n LIST_ITEM: 'list-item',\n HR: 'hr',\n QUOTE: 'blockquote',\n EMBEDDED_ENTRY: 'embedded-entry-block',\n EMBEDDED_ASSET: 'embedded-asset-block',\n EMBEDDED_RESOURCE: 'embedded-resource-block',\n TABLE: 'table',\n TABLE_ROW: 'table-row',\n TABLE_CELL: 'table-cell',\n TABLE_HEADER_CELL: 'table-header-cell',\n} as unknown as typeof BLOCKS;\n\n/**\n * The `INLINES` node type strings of `@contentful/rich-text-types`, as a plain literal map.\n * Keep the values in sync with the enum - they are part of the Contentful Delivery API.\n */\nexport const CF_INLINES = {\n ASSET_HYPERLINK: 'asset-hyperlink',\n EMBEDDED_ENTRY: 'embedded-entry-inline',\n EMBEDDED_RESOURCE: 'embedded-resource-inline',\n ENTRY_HYPERLINK: 'entry-hyperlink',\n HYPERLINK: 'hyperlink',\n RESOURCE_HYPERLINK: 'resource-hyperlink',\n} as unknown as typeof INLINES;\n","import { RuntimeError } from '@ethlete/core';\n\nexport const RICH_TEXT_RENDERER_ERRORS = {\n rich_text_not_object: (data: { type: string }) =>\n `The value at richTextPath is a ${data.type}, not a rich-text document object. Point richTextPath at the rich-text field itself (e.g. items[0].fields.body).`,\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 rich_text_conflicting_inputs:\n 'gqlRichText cannot be combined with content or richTextPath. Pass either a GraphQL rich-text field through gqlRichText, or a REST response through content and richTextPath.',\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 text_parent_not_found: 'The parent node is not found. This structure is not supported.',\n\n cached_command_not_found: 'No rendered node was found for a render command. The renderer state is out of sync.',\n cached_command_not_component:\n 'The rendered node for a component command is not a component. The renderer state is out of sync.',\n} as const;\n\nconst RICH_TEXT_RENDERER_ERROR_CODES: Record<keyof typeof RICH_TEXT_RENDERER_ERRORS, number> = {\n rich_text_not_object: 0,\n rich_text_wrong_type: 1,\n rich_text_conflicting_inputs: 11,\n asset_id_not_found: 2,\n entry_id_not_found: 3,\n text_parent_not_found: 7,\n cached_command_not_found: 9,\n cached_command_not_component: 10,\n};\n\nexport const richTextRendererError = (code: keyof typeof RICH_TEXT_RENDERER_ERRORS, data?: unknown) => {\n const entry: string | ((data: never) => string) = RICH_TEXT_RENDERER_ERRORS[code];\n const message = `<et-contentful-rich-text-renderer>: ${typeof entry === 'function' ? entry(data as never) : entry}`;\n\n throw new RuntimeError(RICH_TEXT_RENDERER_ERROR_CODES[code], message, data);\n};\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { ContentfulGqlAsset } from '../../gql';\nimport { ContentfulEntry, ContentfulRestAsset, RichTextResponse } from '../../types';\n\nexport type ContentfulGqlRichTextEntry = {\n __typename?: string | null;\n sys: { id: string };\n [field: string]: unknown;\n};\n\ntype ContentfulGqlLinkList<T> = (T | null | undefined)[] | null;\n\n/**\n * A rich-text field as returned by the Contentful GraphQL API. Select `json` and the `links` the\n * document references, and pass the field to `[gqlRichText]` as-is.\n */\nexport type ContentfulGqlRichText = {\n json: RichTextResponse;\n links?: {\n assets?: {\n block?: ContentfulGqlLinkList<ContentfulGqlAsset>;\n hyperlink?: ContentfulGqlLinkList<ContentfulGqlAsset>;\n } | null;\n entries?: {\n block?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n inline?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n hyperlink?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n } | null;\n } | null;\n};\n\nconst lowerCaseFirst = (value: string) => value.charAt(0).toLowerCase() + value.slice(1);\n\nconst toRestAsset = (asset: ContentfulGqlAsset): ContentfulRestAsset => ({\n sys: { type: 'Asset', id: asset.sys.id, createdAt: '', updatedAt: '', locale: '' },\n fields: {\n title: asset.title ?? '',\n description: asset.description ?? '',\n file: {\n url: asset.url,\n details: {\n size: asset.size,\n ...(asset.width !== null && asset.height !== null\n ? { image: { width: asset.width, height: asset.height } }\n : {}),\n },\n fileName: asset.fileName ?? null,\n contentType: asset.contentType,\n },\n },\n metadata: { tags: [] },\n});\n\nconst toRestEntry = (entry: ContentfulGqlRichTextEntry): ContentfulEntry | null => {\n const { __typename, sys, ...fields } = entry;\n\n if (!__typename) {\n return null;\n }\n\n return {\n sys: {\n type: 'Entry',\n id: sys.id,\n createdAt: '',\n updatedAt: '',\n locale: '',\n contentType: { sys: { type: 'Link', linkType: 'ContentType', id: lowerCaseFirst(__typename) } },\n },\n fields,\n metadata: { tags: [] },\n };\n};\n\nconst present = <T>(items: ContentfulGqlLinkList<T> | undefined) =>\n (items ?? []).filter((item): item is T => item !== null && item !== undefined);\n\n/**\n * Maps the `links` of a GraphQL rich-text field to the entries and assets the renderer resolves\n * embeds against. An entry's content type id is its `__typename` with the first letter lower-cased,\n * which is how Contentful derives a GraphQL type name from a content type id. Entries without a\n * `__typename` are dropped.\n */\nexport const mapContentfulGqlLinks = (links: ContentfulGqlRichText['links']) => {\n const assets = new Map<string, ContentfulRestAsset>();\n const entries = new Map<string, ContentfulEntry>();\n\n for (const asset of [...present(links?.assets?.block), ...present(links?.assets?.hyperlink)]) {\n assets.set(asset.sys.id, toRestAsset(asset));\n }\n\n for (const gqlEntry of [\n ...present(links?.entries?.block),\n ...present(links?.entries?.inline),\n ...present(links?.entries?.hyperlink),\n ]) {\n const entry = toRestEntry(gqlEntry);\n\n if (entry) {\n entries.set(entry.sys.id, entry);\n }\n }\n\n return { assets: [...assets.values()], entries: [...entries.values()] };\n};\n","import { isDevMode } from '@angular/core';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { isObject } from '@ethlete/core';\nimport { RichTextResponse } from '../../types';\nimport { CF_BLOCKS, CF_INLINES } from './rich-text-node-types';\n\nexport const isRichTextRootNode = (node: unknown): node is RichTextResponse => {\n return isObject(node) && 'nodeType' in node && node['nodeType'] === 'document';\n};\n\nconst NODE_TYPE_TAGS: Record<string, keyof HTMLElementTagNameMap> = /* @__PURE__ */ (() => ({\n [CF_BLOCKS.HEADING_1]: 'h1',\n [CF_BLOCKS.HEADING_2]: 'h2',\n [CF_BLOCKS.HEADING_3]: 'h3',\n [CF_BLOCKS.HEADING_4]: 'h4',\n [CF_BLOCKS.HEADING_5]: 'h5',\n [CF_BLOCKS.HEADING_6]: 'h6',\n [CF_BLOCKS.PARAGRAPH]: 'p',\n [CF_BLOCKS.UL_LIST]: 'ul',\n [CF_BLOCKS.OL_LIST]: 'ol',\n [CF_BLOCKS.LIST_ITEM]: 'li',\n [CF_BLOCKS.HR]: 'hr',\n [CF_BLOCKS.QUOTE]: 'blockquote',\n [CF_BLOCKS.TABLE]: 'table',\n [CF_BLOCKS.TABLE_ROW]: 'tr',\n [CF_BLOCKS.TABLE_CELL]: 'td',\n [CF_BLOCKS.TABLE_HEADER_CELL]: 'th',\n}))();\n\nconst INLINE_NODE_TYPES = /* @__PURE__ */ (() => new Set<string>(Object.values(CF_INLINES)))();\n\n/**\n * The html element a structural rich text node renders as. A node type without an element\n * (an unsupported inline or block) falls back to `span` for inlines and `div` otherwise,\n * with a dev-mode warning.\n */\nexport const translateContentfulNodeTypeToHtmlTag = (\n nodeType: 'text' | BLOCKS | INLINES,\n): keyof HTMLElementTagNameMap => {\n const tag = NODE_TYPE_TAGS[nodeType];\n\n if (tag) {\n return tag;\n }\n\n const fallback = INLINE_NODE_TYPES.has(nodeType) ? 'span' : 'div';\n\n if (isDevMode()) {\n console.warn(`Unsupported rich text node type \"${nodeType}\"! Its content is rendered inside a <${fallback}>.`);\n }\n\n return fallback;\n};\n","import { DOCUMENT, Location } from '@angular/common';\nimport {\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n Type,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n inputBinding,\n isDevMode,\n reflectComponentType,\n signal,\n untracked,\n} from '@angular/core';\nimport { Block, Inline, Mark, Text } from '@contentful/rich-text-types';\nimport { getObjectProperty, injectRenderer, injectUrl, isObject } from '@ethlete/core';\nimport {\n ContentfulCollection,\n ContentfulEntry,\n ContentfulEntryLinkItem,\n ContentfulRestAsset,\n RichTextResponse,\n} from '../../types';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport { isExternalWebHref, isRouteRelativeHref, resolveHrefAgainstRoute } from '../link/contentful-link.util';\nimport { CF_BLOCKS, CF_INLINES } from './rich-text-node-types';\nimport { richTextRendererError } from './rich-text-renderer.errors';\nimport { ContentfulGqlRichText, mapContentfulGqlLinks } from './rich-text-renderer.gql';\nimport { isRichTextRootNode, translateContentfulNodeTypeToHtmlTag } from './rich-text-renderer.util';\n\ntype HtmlOpenRenderCommand = {\n kind: 'htmlOpen';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n attributes: Record<string, string>;\n tagName: keyof HTMLElementTagNameMap;\n id: string;\n};\n\ntype HtmlCloseRenderCommand = {\n kind: 'htmlClose';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n tagName: keyof HTMLElementTagNameMap;\n id: string;\n};\n\ntype TextRenderCommand = {\n kind: 'text';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n attributes: Record<string, string>;\n markTags: MarkTagName[];\n text: string;\n id: string;\n};\n\ntype ComponentRenderCommand = {\n kind: 'component';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n component: Type<unknown>;\n inputs: Record<string, unknown>;\n id: string;\n};\n\ntype RenderCommand = HtmlOpenRenderCommand | HtmlCloseRenderCommand | TextRenderCommand | ComponentRenderCommand;\n\ntype RenderInstruction = {\n type: 'create' | 'update' | 'move' | 'delete';\n command: RenderCommand;\n};\n\ntype MarkTagName = 'strong' | 'em' | 'u' | 'code' | 's' | 'sub' | 'sup';\n\nconst DEFAULT_ANCHOR_CLASS = 'et-contentful-rich-text-default-element et-contentful-rich-text-default-a';\n\nconst MARK_TAG_MAP: Record<string, MarkTagName> = {\n bold: 'strong',\n italic: 'em',\n underline: 'u',\n code: 'code',\n strikethrough: 's',\n subscript: 'sub',\n superscript: 'sup',\n};\n\n/**\n * Translates contentful text marks into the semantic html elements the marked text is\n * wrapped in, outermost first. Unknown marks are skipped (with a dev-mode warning).\n */\nexport const marksToTags = (marks: Mark[]) => {\n const tags: MarkTagName[] = [];\n\n for (const mark of marks) {\n const tag = MARK_TAG_MAP[mark.type];\n\n if (!tag) {\n if (isDevMode()) {\n console.warn(`No element found for mark type \"${mark.type}\"! The mark is ignored.`, mark);\n }\n\n continue;\n }\n\n tags.push(tag);\n }\n\n return tags;\n};\n\n/**\n * The classes marked text inside a hyperlink is rendered with, since the link component\n * receives its text as a plain string.\n */\nexport const marksToClass = (marks: Mark[]) =>\n marks.map((mark) => `et-contentful-rich-text-mark-${mark.type}`).join(' ');\n\nconst LINK_COMPONENT_TYPE = '$$$_et-link';\n\nconst normalizeHref = (href: string): string | null => {\n if (!href.trim()) {\n return null;\n }\n\n try {\n const url = new URL(href, 'https://contentful.invalid');\n\n return ['http:', 'https:', 'mailto:', 'tel:', 'ftp:'].includes(url.protocol) ? href : null;\n } catch {\n return null;\n }\n};\n\ntype ExecutedCommandCacheItemBase = {\n element: HTMLElement;\n};\n\ntype ExecutedComponentCommandCacheItem = {\n command: ComponentRenderCommand;\n componentRef: ComponentRef<unknown>;\n inputs: WritableSignal<Record<string, unknown>>;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedHtmlCommandCacheItem = {\n command: HtmlOpenRenderCommand | HtmlCloseRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedTextCommandCacheItem = {\n command: TextRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedCommandCacheItem =\n ExecutedComponentCommandCacheItem | ExecutedHtmlCommandCacheItem | ExecutedTextCommandCacheItem;\n\nconst isExecutedComponentCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedComponentCommandCacheItem => {\n return cache.command.kind === 'component';\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(\n 'Entry not found! Will return null. Is it unpublished or deleted, or is the include query param too low?',\n { id },\n );\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\nconst warnedRichTextPaths = /* @__PURE__ */ new Set<string>();\n\nconst warnOnUnresolvedParentPath = (content: ContentfulCollection, richTextPath: string) => {\n const segments = richTextPath.split('.');\n const root = content as unknown as Record<string, unknown>;\n\n if (segments.length < 2 || isObject(getObjectProperty(root, segments.slice(0, -1).join('.')))) return;\n if (warnedRichTextPaths.has(richTextPath)) return;\n\n warnedRichTextPaths.add(richTextPath);\n\n let resolvedSegments = 0;\n\n while (\n resolvedSegments < segments.length - 1 &&\n isObject(getObjectProperty(root, segments.slice(0, resolvedSegments + 1).join('.')))\n ) {\n resolvedSegments++;\n }\n\n const resolvedPath = segments.slice(0, resolvedSegments).join('.') || '(the content itself)';\n\n console.warn(\n `<et-contentful-rich-text-renderer>: richTextPath \"${richTextPath}\" does not resolve, so nothing is rendered. The deepest part that resolves is ${resolvedPath}; check the next segment for a typo or a missing item.`,\n { content, richTextPath },\n );\n};\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-rich-text-renderer',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n private viewContainerRef = inject(ViewContainerRef);\n private renderer = injectRenderer();\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private config = injectContentfulConfig();\n private document = inject(DOCUMENT);\n private location = inject(Location);\n private url = injectUrl();\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<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<string>();\n\n /**\n * A rich-text field from the Contentful GraphQL API, passed as-is. An alternative to `content` and\n * `richTextPath`; setting both is an error in dev mode.\n * @example { json, links: { assets: { block, hyperlink }, entries: { block, inline, hyperlink } } }\n */\n gqlRichText = input<ContentfulGqlRichText | null | undefined>();\n\n private readonly executedCommandsCache = new Map<string, ExecutedCommandCacheItem>();\n\n private includes = computed(() => {\n const gqlRichText = this.gqlRichText();\n\n if (gqlRichText) {\n return mapContentfulGqlLinks(gqlRichText.links);\n }\n\n const includes = this.content()?.includes;\n\n return { assets: includes?.Asset ?? [], entries: includes?.Entry ?? [] };\n });\n\n private contentIncludesMap = computed<ContentfulIncludeMap>(() => createContentfulIncludeMap(this.includes()));\n\n private includedEntries = computed(() => new Map(this.includes().entries.map((entry) => [entry.sys.id, entry])));\n\n private richTextData = computed(() => {\n const gqlRichText = this.gqlRichText();\n const content = this.content();\n const richTextPath = this.richTextPath();\n\n if (ngDevMode && gqlRichText && (content || richTextPath)) {\n throw richTextRendererError('rich_text_conflicting_inputs', { gqlRichText, content, richTextPath });\n }\n\n if (gqlRichText) {\n if (!isRichTextRootNode(gqlRichText.json)) {\n throw richTextRendererError('rich_text_wrong_type', { gqlRichText });\n }\n\n return gqlRichText.json;\n }\n\n if (!content) {\n return null;\n }\n\n if (!richTextPath) {\n if (ngDevMode) {\n console.warn(\n '<et-contentful-rich-text-renderer>: content is set without richTextPath, so nothing is rendered. Set richTextPath, or pass a GraphQL field through gqlRichText.',\n );\n }\n\n return null;\n }\n\n const richText = getObjectProperty(content as unknown as Record<string, unknown>, richTextPath);\n\n if (richText === null || richText === undefined) {\n if (ngDevMode && richText === undefined) {\n warnOnUnresolvedParentPath(content, richTextPath);\n }\n\n return null;\n }\n\n if (!isObject(richText)) {\n throw richTextRendererError('rich_text_not_object', { content, richTextPath, type: typeof richText });\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 private renderCommands = computed(() => {\n const richTextData = this.richTextData();\n\n if (!richTextData) {\n return [];\n }\n\n return this.createRenderCommands(richTextData);\n });\n\n private renderInstructions = computed(() => {\n const commands = this.renderCommands();\n const previousRenderCommandMap = new Map(\n [...this.executedCommandsCache.entries()].map(([id, item]) => [id, item.command]),\n );\n\n const instructions: RenderInstruction[] = [];\n\n const preserved = new Set<string>();\n const needsReattach = new Set<string>();\n\n const markTagsEqual = (a: MarkTagName[], b: MarkTagName[]) =>\n a.length === b.length && a.every((tag, index) => tag === b[index]);\n\n const attributesEqual = (a: Record<string, string>, b: Record<string, string>) => {\n const aKeys = Object.keys(a);\n\n return aKeys.length === Object.keys(b).length && aKeys.every((key) => a[key] === b[key]);\n };\n\n for (const command of commands) {\n if (command.kind === 'htmlClose') {\n continue;\n }\n\n const previous = previousRenderCommandMap.get(command.id);\n\n if (!previous || previous.kind !== command.kind) {\n continue;\n }\n\n if (previous.kind === 'component' && command.kind === 'component' && previous.component !== command.component) {\n continue;\n }\n\n const parentPreserved =\n previous.parentId === command.parentId && (command.parentId === null || preserved.has(command.parentId));\n\n if (command.kind === 'component') {\n preserved.add(command.id);\n\n const samePlace =\n parentPreserved &&\n previous.nestingLevel === command.nestingLevel &&\n previous.domPosition === command.domPosition;\n\n if (!samePlace) {\n needsReattach.add(command.id);\n }\n\n continue;\n }\n\n const sameOutput =\n previous.kind === command.kind &&\n (previous.kind !== 'htmlOpen' || previous.tagName === (command as HtmlOpenRenderCommand).tagName) &&\n (previous.kind !== 'text' ||\n (previous.text === (command as TextRenderCommand).text &&\n markTagsEqual(previous.markTags, (command as TextRenderCommand).markTags)));\n\n if (\n parentPreserved &&\n sameOutput &&\n previous.nestingLevel === command.nestingLevel &&\n previous.domPosition === command.domPosition &&\n attributesEqual(previous.attributes, command.attributes)\n ) {\n preserved.add(command.id);\n }\n }\n\n for (const [id, command] of previousRenderCommandMap) {\n if (command.kind !== 'htmlClose' && !preserved.has(id)) {\n instructions.push({ type: 'delete', command });\n }\n }\n\n for (const command of commands) {\n if (command.kind === 'htmlClose') {\n continue;\n }\n\n if (!preserved.has(command.id)) {\n instructions.push({ type: 'create', command });\n } else if (command.kind === 'component' && needsReattach.has(command.id)) {\n instructions.push({ type: 'move', command });\n } else {\n instructions.push({ type: 'update', command });\n }\n }\n\n return instructions;\n });\n\n constructor() {\n effect(() => {\n const instructions = this.renderInstructions();\n\n untracked(() => this.execInstructions(instructions));\n });\n }\n\n private createRenderCommands(richTextData: RichTextResponse) {\n const rootCommands: RenderCommand[] = [];\n let elementOpenId = 0;\n let elementCloseId = 0;\n const componentIdMap = new Map<string, number>();\n let nestingLevel = 0;\n let domPosition = 0;\n\n let textId = 0;\n\n const openElementIds: string[] = [];\n\n const traverse = (node: Block | Inline | Text) => {\n switch (node.nodeType) {\n case '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 rootCommands.push({\n kind: 'text',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n markTags: node.marks.length ? marksToTags(node.marks) : [],\n text,\n id: 't' + textId++,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_BLOCKS.EMBEDDED_ASSET: {\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 if (isDevMode()) {\n console.warn(\n 'Embedded asset is missing from the includes! The asset will be skipped. Is it unpublished or deleted?',\n { assetId, node },\n );\n }\n\n break;\n }\n\n const contentType = asset.fields.file?.contentType;\n const assetComponents = this.config.components;\n\n if (!asset.fields.file?.url) {\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 if (!component) {\n if (isDevMode()) {\n console.warn(\n 'No component registered for this embedded asset! The asset will be skipped. Provide one via provideContentfulConfig({ components: … }).',\n { asset },\n );\n }\n\n break;\n }\n\n const occurrenceKey = 'asset:' + assetId;\n const occurrence = (componentIdMap.get(occurrenceKey) ?? -1) + 1;\n componentIdMap.set(occurrenceKey, occurrence);\n const id = occurrence === 0 ? occurrenceKey : `${occurrenceKey}:${occurrence}`;\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component,\n inputs: { asset },\n id,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_INLINES.HYPERLINK:\n case CF_INLINES.ASSET_HYPERLINK:\n case CF_INLINES.ENTRY_HYPERLINK: {\n let href: string | null = null;\n\n if (node.nodeType === CF_INLINES.HYPERLINK) {\n href = normalizeHref((node.data['uri'] as string) ?? '');\n } else if (node.nodeType === CF_INLINES.ASSET_HYPERLINK) {\n const assetId = node.data['target']?.sys?.id;\n const asset = assetId ? this.contentIncludesMap().getAsset(assetId) : null;\n const url = asset?.fields.file?.url;\n href = url ? normalizeHref(url) : null;\n }\n\n const linkTexts = node.content.filter(\n (child): child is Text => child.nodeType === 'text' && Boolean(child.value),\n );\n if (!linkTexts.length) {\n break;\n }\n\n const linkText = linkTexts.map((child) => child.value).join('');\n const linkComponent = href ? this.config.components.link : null;\n\n if (href && !linkComponent) {\n const anchorHref = isRouteRelativeHref(href)\n ? this.location.prepareExternalUrl(resolveHrefAgainstRoute(href, this.url()))\n : href;\n const attributes: Record<string, string> = { class: DEFAULT_ANCHOR_CLASS, href: anchorHref };\n\n if (\n isExternalWebHref(href, { location: this.document.location, internalHosts: this.config.internalHosts })\n ) {\n attributes['target'] = '_blank';\n attributes['rel'] = 'noopener noreferrer';\n }\n\n rootCommands.push({\n kind: 'htmlOpen',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n tagName: 'a',\n id: 'e-o' + elementOpenId++,\n });\n\n const anchorDomPosition = domPosition;\n\n openElementIds.push('e-o' + (elementOpenId - 1));\n nestingLevel++;\n domPosition = 0;\n\n for (const child of linkTexts) {\n traverse(child);\n }\n\n openElementIds.pop();\n nestingLevel--;\n domPosition = anchorDomPosition;\n\n rootCommands.push({\n kind: 'htmlClose',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n tagName: 'a',\n id: 'e-c' + elementCloseId++,\n });\n\n domPosition++;\n\n break;\n }\n\n if (!href) {\n for (const child of linkTexts) {\n traverse(child);\n }\n\n break;\n }\n\n if (!linkComponent) {\n break;\n }\n\n const sharedMarks =\n linkTexts[0]?.marks.filter((mark) =>\n linkTexts.every((child) => child.marks.some((other) => other.type === mark.type)),\n ) ?? [];\n\n let linkComponentId = componentIdMap.get(LINK_COMPONENT_TYPE) ?? -1;\n const linkId = LINK_COMPONENT_TYPE + ++linkComponentId;\n componentIdMap.set(LINK_COMPONENT_TYPE, linkComponentId);\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component: linkComponent,\n inputs: { href, text: linkText, marks: sharedMarks.map((mark) => mark.type), richText: true },\n id: linkId,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_BLOCKS.EMBEDDED_ENTRY:\n case CF_INLINES.EMBEDDED_ENTRY: {\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.includedEntries().get(entryId);\n\n if (!entry) {\n if (isDevMode()) {\n console.warn(\n 'Embedded entry is missing from the includes! The entry will be skipped. Is it unpublished or deleted, or is the include query param too low?',\n { entryId, node },\n );\n }\n\n break;\n }\n\n const componentType = entry.sys.contentType.sys.id;\n\n const component = this.config.customComponents[componentType];\n\n if (!component) {\n if (isDevMode()) {\n console.warn(\n 'No custom component registered for this embedded entry type! The entry will be skipped. Provide one via provideContentfulConfig({ customComponents: … }).',\n { componentType, customComponents: this.config.customComponents, entry },\n );\n }\n\n break;\n }\n\n const occurrenceKey = 'entry:' + entryId;\n const occurrence = (componentIdMap.get(occurrenceKey) ?? -1) + 1;\n componentIdMap.set(occurrenceKey, occurrence);\n const id = occurrence === 0 ? occurrenceKey : `${occurrenceKey}:${occurrence}`;\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component,\n inputs: {\n fields: entry.fields,\n metadata: entry.metadata,\n sys: entry.sys,\n includes: this.contentIncludesMap(),\n },\n id,\n });\n\n domPosition++;\n\n break;\n }\n\n default: {\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\n rootCommands.push({\n kind: 'htmlOpen',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n tagName: tag,\n id: 'e-o' + elementOpenId++,\n });\n\n const domPositionAtThisLevel = domPosition;\n openElementIds.push('e-o' + (elementOpenId - 1));\n nestingLevel++;\n domPosition = 0;\n\n for (const child of node.content) {\n traverse(child);\n }\n\n openElementIds.pop();\n nestingLevel--;\n domPosition = domPositionAtThisLevel;\n\n const lastCommand = rootCommands[rootCommands.length - 1];\n\n if (\n lastCommand?.kind === 'htmlOpen' &&\n lastCommand.tagName !== 'td' &&\n lastCommand.tagName !== 'th' &&\n lastCommand.tagName !== 'hr'\n ) {\n rootCommands.pop();\n elementOpenId--;\n } else {\n rootCommands.push({\n kind: 'htmlClose',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n tagName: tag,\n id: 'e-c' + elementCloseId++,\n });\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 const lastPlacedChild = new Map<string | null, HTMLElement>();\n\n for (const { type, command } of instructions) {\n if (type === 'delete') {\n this.runDeleteInstruction(command);\n\n continue;\n }\n\n const previousSibling = lastPlacedChild.get(command.parentId) ?? null;\n\n switch (type) {\n case 'create':\n this.runCreateInstruction(command, previousSibling);\n break;\n case 'update':\n this.runUpdateInstruction(command);\n break;\n case 'move':\n this.runMoveInstruction(command, previousSibling);\n break;\n }\n\n const element = this.executedCommandsCache.get(command.id)?.element;\n\n if (element) {\n lastPlacedChild.set(command.parentId, element);\n }\n }\n }\n\n private runCreateInstruction(command: RenderCommand, previousSibling: HTMLElement | null) {\n const parentElement = this.findParent(command);\n\n if (command.kind === 'component') {\n const inputs = signal(command.inputs);\n\n const declaredInputs = reflectComponentType(command.component)?.inputs ?? [];\n const bindings = declaredInputs\n .filter((declared) => declared.propName in command.inputs)\n .map((declared) => inputBinding(declared.templateName, () => inputs()[declared.propName]));\n\n const componentRef = this.viewContainerRef.createComponent(command.component, { bindings });\n\n const rootNode = this.getComponentRootNode(componentRef);\n\n this.renderInsertAfter(rootNode, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n componentRef,\n inputs,\n element: rootNode,\n });\n } else if (command.kind === 'text') {\n const span = this.renderer.createElement('span');\n const textSplitInLineBreaks = command.text.split('\\n');\n\n for (const [key, value] of Object.entries(command.attributes)) {\n this.renderer.setAttribute(span, key, value);\n }\n\n let textContainer = span;\n\n for (const tag of command.markTags) {\n const markElement = this.renderer.createElement(tag);\n\n this.renderer.appendChild(textContainer, markElement);\n textContainer = markElement;\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(textContainer, brNode);\n }\n\n if (textPart) {\n const textNode = this.renderer.createText(textPart);\n\n this.renderer.appendChild(textContainer, textNode);\n }\n }\n\n this.renderInsertAfter(span, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n element: span,\n });\n } else if (command.kind === 'htmlOpen') {\n const element = this.renderer.createElement(command.tagName);\n\n for (const [key, value] of Object.entries(command.attributes)) {\n this.renderer.setAttribute(element, key, value);\n }\n\n this.renderInsertAfter(element, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n element,\n });\n }\n }\n\n private runUpdateInstruction(command: RenderCommand) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\n }\n\n cached.inputs.set(command.inputs);\n }\n\n this.executedCommandsCache.set(command.id, {\n ...cached,\n command,\n } as ExecutedCommandCacheItem);\n }\n\n private runMoveInstruction(command: RenderCommand, previousSibling: HTMLElement | null) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\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 this.renderInsertAfter(rootNode, { parentElement: this.findParent(command), previousSibling });\n\n cached.inputs.set(command.inputs);\n\n this.executedCommandsCache.set(command.id, {\n ...cached,\n command,\n } as ExecutedCommandCacheItem);\n }\n }\n\n private runDeleteInstruction(command: RenderCommand) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n if (command.kind === 'htmlClose') {\n return;\n }\n\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\n }\n\n cached.componentRef.destroy();\n } else if (command.kind === 'text' || command.kind === 'htmlOpen') {\n if (cached.element.parentElement) {\n this.renderer.removeChild(cached.element.parentElement, cached.element);\n }\n }\n\n this.executedCommandsCache.delete(command.id);\n }\n\n private getComponentRootNode(componentRef: ComponentRef<unknown>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n }\n\n private findParent(command: RenderCommand) {\n if (command.parentId === null) {\n return this.elementRef.nativeElement;\n }\n\n const parentElement = this.executedCommandsCache.get(command.parentId)?.element;\n\n if (!parentElement) {\n throw richTextRendererError('text_parent_not_found', { command });\n }\n\n return parentElement;\n }\n\n private renderInsertAfter(\n node: HTMLElement,\n { parentElement, previousSibling }: { parentElement: HTMLElement; previousSibling: HTMLElement | null },\n ) {\n this.renderer.insertBefore(\n parentElement,\n node,\n previousSibling ? previousSibling.nextSibling : parentElement.firstChild,\n );\n }\n}\n","import { Component, ViewEncapsulation, computed, input } from '@angular/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 class=\"et-contentful-video-video\" controls>\n <source [src]=\"data.url\" [attr.type]=\"data.contentType || null\" class=\"et-contentful-video-source\" />\n </video>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-video',\n },\n})\nexport class ContentfulVideoComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n };\n }\n\n return null;\n });\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 { 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\n/**\n * The shipped audio, file, image, video and link components, to spread into `provideContentfulConfig`.\n * An app that brings its own components, or renders text only, leaves this out and bundles none of them.\n * To replace one, spread the map instead: `components: { ...CONTENTFUL_DEFAULT_COMPONENTS.components, image: MyImage }`.\n *\n * @example\n * provideContentfulConfig({ ...CONTENTFUL_DEFAULT_COMPONENTS });\n */\nexport const CONTENTFUL_DEFAULT_COMPONENTS = {\n components: {\n audio: ContentfulAudioComponent,\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n link: ContentfulLinkComponent,\n },\n} satisfies Partial<ContentfulConfig>;\n","import { Provider } from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfigOptions, ContentfulEntry } from '../types';\nimport { createContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig?: ContentfulConfigOptions | null): Provider => {\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;;;AA8B7C;AACO,MAAM,oBAAoB,GAAG,CAAC,KAAU,KAAiC;IAC9E,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,KAAK,CAAC,CAAC;AAC7F;;MCda,wBAAwB,CAAA;AAjBrC,IAAA,WAAA,GAAA;QAkBE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAA+D;AAE3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AA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAZzB;;;;;;AAMT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAMU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAdpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;oBACD,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,qBAAqB;AAC7B,qBAAA;AACF,iBAAA;;;ACXM,MAAM,iBAAiB,GAAG;IAC/B,wBAAwB;IACxB,uBAAuB;IACvB,wBAAwB;IACxB,wBAAwB;IACxB,mCAAmC;;;ACJrC;;;;;;;AAOG;AACI,MAAM,6BAA6B,GAAG;AAC3C,IAAA,UAAU,EAAE;AACV,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,IAAI,EAAE,uBAAuB;AAC7B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;;ACjBI,MAAM,uBAAuB,GAAG,CAAC,gBAAiD,KAAc;AACrG,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;;ACVnC;;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-labels.ts","../../../../libs/contentful/src/lib/components/file/contentful-file.component.ts","../../../../libs/contentful/src/lib/constants/contentful.constants.ts","../../../../libs/contentful/src/lib/utils/contentful-config.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/link/contentful-link.util.ts","../../../../libs/contentful/src/lib/components/link/contentful-link.component.ts","../../../../libs/contentful/src/lib/components/rich-text-renderer/rich-text-node-types.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.gql.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/components/video/contentful-video.component.ts","../../../../libs/contentful/src/lib/contentful.imports.ts","../../../../libs/contentful/src/lib/utils/contentful-default-components.ts","../../../../libs/contentful/src/lib/utils/contentful.util.ts","../../../../libs/contentful/src/ethlete-contentful.ts"],"sourcesContent":["import { GQL } from '@ethlete/query';\n\nexport const GQL_FRAGMENT_CONTENTFUL_ASSET = `\n fragment ContentfulAssetData on Asset {\n sys {\n id\n }\n url\n title\n fileName\n width\n height\n description\n contentType\n size\n }\n` as GQL;\n\nexport type ContentfulGqlAsset = {\n sys: {\n id: string;\n };\n title: string | null;\n fileName?: 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 Boolean(asset && typeof asset === 'object' && asset.sys?.id && !('fields' in asset));\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 { Component, ViewEncapsulation, computed, input } from '@angular/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 class=\"et-contentful-audio-figure\">\n @if (data.title) {\n <figcaption class=\"et-contentful-audio-figcaption\">{{ data.title }}</figcaption>\n }\n <audio [src]=\"data.url\" class=\"et-contentful-audio-audio\" controls></audio>\n </figure>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-audio',\n },\n})\nexport class ContentfulAudioComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n title: asset.title || asset.fileName || null,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n title: asset.fields.title || asset.fields.file.fileName || null,\n };\n }\n\n return null;\n });\n}\n","import { formatFileSize } from '@ethlete/components';\nimport { defineLabels, toInjectFn, toProvideFn, toToken } from '@ethlete/core';\n\n/** Every string `et-contentful-file` renders itself. Override them app-wide with {@link provideContentfulFileLabels}. */\nexport type ContentfulFileLabels = {\n /** The size shown after the file title, e.g. `'(1.5 MB)'`. */\n fileSize: (bytes: number) => string;\n};\n\n/** The built-in English labels. */\nexport const DEFAULT_CONTENTFUL_FILE_LABELS: ContentfulFileLabels = {\n fileSize: (bytes) => `(${formatFileSize(bytes)})`,\n};\n\nconst CONTENTFUL_FILE_LABELS_DEF = /* @__PURE__ */ defineLabels<ContentfulFileLabels>(\n 'CONTENTFUL_FILE_LABELS',\n DEFAULT_CONTENTFUL_FILE_LABELS,\n);\n\n/**\n * Localize `et-contentful-file` for everything below this injector, and read the set in effect here as a signal.\n * Partial - whatever you leave out keeps its {@link DEFAULT_CONTENTFUL_FILE_LABELS} value.\n *\n * @example\n * provideContentfulFileLabels({ fileSize: (bytes) => `(${new Intl.NumberFormat('de').format(bytes)} Byte)` });\n */\nexport const provideContentfulFileLabels = /* @__PURE__ */ toProvideFn(CONTENTFUL_FILE_LABELS_DEF);\nexport const injectContentfulFileLabels = /* @__PURE__ */ toInjectFn(CONTENTFUL_FILE_LABELS_DEF);\nexport const CONTENTFUL_FILE_LABELS = /* @__PURE__ */ toToken(CONTENTFUL_FILE_LABELS_DEF);\n","import { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulRestAsset } from '../../types';\nimport { injectContentfulFileLabels } from './contentful-file-labels';\n\n@Component({\n selector: 'et-contentful-file',\n template: `\n @if (data(); as data) {\n <a [href]=\"data.url\" class=\"et-contentful-file-anchor\" target=\"_blank\" rel=\"noopener noreferrer\">\n {{ data.title }}\n @if (data.size !== null) {\n {{ labels().fileSize(data.size) }}\n }\n </a>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-file',\n },\n})\nexport class ContentfulFileComponent {\n protected labels = injectContentfulFileLabels();\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n size: asset.size,\n title: asset.title || asset.fileName || null,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n size: asset.fields.file.details.size,\n title: asset.fields.title || asset.fields.file.fileName || null,\n };\n }\n\n return null;\n });\n}\n","import { InjectionToken } from '@angular/core';\nimport { ContentfulConfig } from '../types';\n\nexport const CONTENTFUL_CONFIG = new InjectionToken<ContentfulConfig>('ContentfulConfig');\n","import { inject } from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../constants/contentful.constants';\nimport { ContentfulConfig, ContentfulConfigOptions } from '../types';\n\n/**\n * The config used when no `provideContentfulConfig()` is in scope. It declares no\n * `components`, so embedded assets are skipped and hyperlinks render as plain anchors\n * until a config is provided.\n */\nconst CONTENTFUL_FALLBACK_CONFIG: ContentfulConfig = {\n internalHosts: [],\n entryHref: null,\n components: {},\n customComponents: {},\n imageOptions: {\n srcsetSizes: ['375w', '1280w', '1920w', '2560w'],\n sizes: ['100vw'],\n backgroundColor: null,\n },\n};\n\nconst withoutUndefined = <T extends object>(value: T | null | undefined) =>\n Object.fromEntries(Object.entries(value ?? {}).filter(([, entry]) => entry !== undefined)) as Partial<T>;\n\nexport const createContentfulConfig = (options?: ContentfulConfigOptions | null): ContentfulConfig => {\n const config = options ?? {};\n\n return {\n ...CONTENTFUL_FALLBACK_CONFIG,\n ...config,\n components: config.components ?? CONTENTFUL_FALLBACK_CONFIG.components,\n customComponents: config.customComponents ?? CONTENTFUL_FALLBACK_CONFIG.customComponents,\n internalHosts: config.internalHosts ?? CONTENTFUL_FALLBACK_CONFIG.internalHosts,\n imageOptions: { ...CONTENTFUL_FALLBACK_CONFIG.imageOptions, ...withoutUndefined(config.imageOptions) },\n };\n};\n\n/**\n * Reads the contentful config from the current injector. Falls back to a config without\n * any `components` when none was provided via `provideContentfulConfig()`.\n */\nexport const injectContentfulConfig = (): ContentfulConfig =>\n inject(CONTENTFUL_CONFIG, { optional: true }) ?? CONTENTFUL_FALLBACK_CONFIG;\n","import { PictureSource } from '@ethlete/components';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\n\nexport const generateDefaultContentfulImageSource = (data: ContentfulRestAsset | ContentfulGqlAsset): PictureSource => {\n const { url, contentType } = isContentfulGqlAsset(data) ? data : (data.fields.file ?? {});\n\n return url ? { type: contentType ?? '', srcset: url } : { type: '', srcset: '' };\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 const widthAndHeight = /^(\\d+)w?x(\\d+)h?$/.exec(size);\n\n if (widthAndHeight) {\n return {\n width: Number(widthAndHeight[1]),\n height: Number(widthAndHeight[2]),\n };\n }\n\n const height = /^(\\d+)h$/.exec(size);\n\n if (height) {\n return { width: null, height: Number(height[1]) };\n }\n\n const width = /^(\\d+)w?$/.exec(size);\n\n return width ? { width: Number(width[1]), height: null } : { width: null, height: null };\n};\n\nconst SOURCE_TYPES = ['image/avif', 'image/webp'];\n\nexport type ContentfulImageSourcesOptions = {\n srcsetSizes?: string[];\n backgroundColor?: string | null;\n quality?: number | null;\n focusArea?: ContentfulImageFocusArea | null;\n resizeBehavior?: ContentfulImageResizeBehavior | null;\n};\n\n/**\n * Builds AVIF and WebP `<source>` entries for a Contentful asset through the Contentful Images API.\n *\n * @example\n * generateContentfulImageSources(asset, { srcsetSizes: ['400w', '800w'], quality: 80 });\n */\nexport const generateContentfulImageSources = (\n data: ContentfulRestAsset | ContentfulGqlAsset,\n options: ContentfulImageSourcesOptions = {},\n): PictureSource[] => {\n const { srcsetSizes = [], backgroundColor = null, quality = null, focusArea = null, resizeBehavior = null } = options;\n\n const isGqlAsset = isContentfulGqlAsset(data);\n const baseUrl = isGqlAsset ? data.url : data.fields.file?.url;\n\n if (!baseUrl) {\n return [];\n }\n\n const imageDimensions = isGqlAsset ? data : data.fields.file?.details.image;\n const sources: PictureSource[] = [];\n\n for (const type of SOURCE_TYPES) {\n const sourceSets: string[] = [];\n const queryParams: string[] = [];\n\n queryParams.push(`fm=${type.split('/')[1]}`);\n\n if (backgroundColor) {\n queryParams.push(`bg=rgb:${backgroundColor.replace(/^#/, '')}`);\n }\n\n if (quality !== null && Number.isFinite(quality)) {\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\n if (srcsetSizes.length) {\n const urlWithParams = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${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 && imageDimensions?.width && imageDimensions.height) {\n const derivedWidth = Math.round((height * imageDimensions.width) / imageDimensions.height);\n sourceSets.push(`${urlWithParams}&w=${derivedWidth}&h=${height} ${derivedWidth}w`);\n } else if (ngDevMode && type === SOURCE_TYPES[0]) {\n console.warn(\n height\n ? `Contentful image: srcsetSizes entry \"${size}\" is dropped. A height-only size needs the asset's width and height to derive a width descriptor.`\n : `Contentful image: srcsetSizes entry \"${size}\" is not a valid size and is dropped. Use \"400\", \"400w\", \"400h\" or \"400x300\"; viewport sizes like \"50vw\" belong in sizes.`,\n );\n }\n }\n }\n\n sources.push({\n type,\n srcset: sourceSets.length\n ? sourceSets.join(', ')\n : `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${queryParams.join('&')}`,\n });\n }\n\n return sources;\n};\n","import { Component, ViewEncapsulation, booleanAttribute, computed, input, numberAttribute } from '@angular/core';\nimport { PictureComponent, normalizePictureSizes } from '@ethlete/components';\nimport { ContentfulGqlAsset, isContentfulGqlAsset } from '../../gql';\nimport { ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulRestAsset } from '../../types';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport {\n generateContentfulImageSources,\n generateDefaultContentfulImageSource,\n} from './contentful-image.component.utils';\n\nconst optionalNumberAttribute = (value: unknown) => {\n const transformed = numberAttribute(value);\n\n return Number.isFinite(transformed) ? transformed : null;\n};\n\n@Component({\n selector: 'et-contentful-image',\n template: `\n <et-picture\n [priority]=\"priority()\"\n [defaultSrc]=\"defaultSrcValue()\"\n [alt]=\"normalizedAsset().alt ?? ''\"\n [figcaption]=\"normalizedAsset().figcaption ?? null\"\n [width]=\"normalizedAsset().width ?? null\"\n [height]=\"normalizedAsset().height ?? null\"\n [sizes]=\"sizes()\"\n [sources]=\"sourcesValue()\"\n />\n `,\n encapsulation: ViewEncapsulation.None,\n imports: [PictureComponent],\n host: {\n class: 'et-contentful-image',\n },\n})\nexport class ContentfulImageComponent {\n private contentfulConfig = injectContentfulConfig();\n\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n backgroundColor = input<string | null>(this.contentfulConfig.imageOptions.backgroundColor);\n srcsetSizes = input<string[]>(this.contentfulConfig.imageOptions.srcsetSizes);\n\n quality = input(null, { transform: optionalNumberAttribute });\n focusArea = input<ContentfulImageFocusArea | null>(null);\n resizeBehavior = input<ContentfulImageResizeBehavior | null>(null);\n priority = input(false, { transform: booleanAttribute });\n sizes = input<string | null, string[] | string | null>(\n normalizePictureSizes(this.contentfulConfig.imageOptions.sizes),\n {\n transform: (v) => normalizePictureSizes(v),\n },\n );\n\n protected 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 protected sourcesValue = computed(() => {\n const asset = this.asset();\n const options = {\n srcsetSizes: this.srcsetSizes(),\n backgroundColor: this.backgroundColor(),\n quality: this.quality(),\n focusArea: this.focusArea(),\n resizeBehavior: this.resizeBehavior(),\n };\n\n if (!asset) {\n return [];\n }\n\n return generateContentfulImageSources(asset, options);\n });\n\n protected defaultSrcValue = computed(() => {\n const asset = this.asset();\n\n return asset ? generateDefaultContentfulImageSource(asset) : null;\n });\n}\n","export const parseWebUrl = (href: string): URL | null => {\n if (!/^(?:https?:)?\\/\\//i.test(href)) {\n return null;\n }\n\n try {\n return new URL(href.startsWith('//') ? 'https:' + href : href);\n } catch {\n return null;\n }\n};\n\nconst parseConfiguredHost = (host: string) => {\n const value = host.trim().toLowerCase();\n const wildcard = value.startsWith('*.');\n const bare = wildcard ? value.slice(2) : value;\n\n try {\n const url = new URL(bare.includes('://') ? bare : 'https://' + bare);\n\n return { hostname: url.hostname, port: url.port, wildcard };\n } catch {\n return { hostname: bare.split(':')[0] ?? bare, port: '', wildcard };\n }\n};\n\nconst matchesConfiguredHost = (url: URL, configuredHost: string) => {\n const { hostname, port, wildcard } = parseConfiguredHost(configuredHost);\n\n if (!hostname || (port && url.port !== port)) return false;\n\n return wildcard ? url.hostname.endsWith('.' + hostname) : url.hostname === hostname;\n};\n\nexport type WebUrlContext = { location: Location; internalHosts: string[] };\n\nexport const isInternalWebUrl = (url: URL, { location, internalHosts }: WebUrlContext) =>\n (url.hostname === location.hostname && url.port === location.port) ||\n internalHosts.some((host) => matchesConfiguredHost(url, host));\n\nexport const isExternalWebHref = (href: string, context: WebUrlContext) => {\n const url = parseWebUrl(href);\n\n return url !== null && !isInternalWebUrl(url, context);\n};\n\nexport const internalWebHrefPath = (href: string, context: WebUrlContext) => {\n const url = parseWebUrl(href);\n\n return url && isInternalWebUrl(url, context) ? url.pathname + url.search + url.hash : null;\n};\n\nexport const hasUrlScheme = (href: string) => /^[a-z][a-z\\d+.-]*:/i.test(href);\n\nexport const isRouteRelativeHref = (href: string) => !hasUrlScheme(href) && !href.startsWith('/');\n\nexport const resolveHrefAgainstRoute = (href: string, routerUrl: string) => {\n const resolved = new URL(href, 'https://contentful.invalid' + routerUrl);\n\n return resolved.pathname + resolved.search + resolved.hash;\n};\n","import { DOCUMENT, Location } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport { Router, RouterLink } from '@angular/router';\nimport { injectUrl } from '@ethlete/core';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport { hasUrlScheme, isInternalWebUrl, parseWebUrl, resolveHrefAgainstRoute } from './contentful-link.util';\n\nconst RICH_TEXT_ANCHOR_CLASSES = ['et-contentful-rich-text-default-element', 'et-contentful-rich-text-default-a'];\n\n@Component({\n selector: 'et-contentful-link',\n template: `\n @if (usesRouterLink()) {\n <a [class]=\"modifierClasses()\" [routerLink]=\"internalUrlTree()\" class=\"et-contentful-link-anchor\">{{ text() }}</a>\n } @else {\n <a\n [class]=\"modifierClasses()\"\n [href]=\"anchorHref()\"\n [attr.target]=\"openInNewTab() ? '_blank' : null\"\n [attr.rel]=\"openInNewTab() ? 'noopener noreferrer' : null\"\n class=\"et-contentful-link-anchor\"\n >{{ text() }}</a\n >\n }\n `,\n styleUrl: './contentful-link.component.css',\n encapsulation: ViewEncapsulation.None,\n imports: [RouterLink],\n host: {\n class: 'et-contentful-link',\n },\n})\nexport class ContentfulLinkComponent {\n private document = inject(DOCUMENT);\n private location = inject(Location);\n private router = inject(Router);\n private config = injectContentfulConfig();\n private url = injectUrl();\n\n href = input.required<string>();\n text = input.required<string>();\n marks = input<readonly string[]>([]);\n richText = input(false);\n\n protected usesRouterLink = computed(() => {\n const href = this.href();\n const absoluteUrl = parseWebUrl(href);\n\n if (absoluteUrl) {\n return isInternalWebUrl(absoluteUrl, {\n location: this.document.location,\n internalHosts: this.config.internalHosts,\n });\n }\n\n return !href.startsWith('#') && !hasUrlScheme(href);\n });\n\n protected anchorHref = computed(() => {\n const href = this.href();\n\n return href.startsWith('#') ? this.location.prepareExternalUrl(resolveHrefAgainstRoute(href, this.url())) : href;\n });\n\n protected openInNewTab = computed(() => Boolean(parseWebUrl(this.href())) && !this.usesRouterLink());\n\n protected internalPath = computed(() => {\n const href = this.href();\n const url = parseWebUrl(href);\n\n if (url) {\n return url.pathname + url.search + url.hash;\n }\n\n if (href.startsWith('/')) {\n return href;\n }\n\n return resolveHrefAgainstRoute(href, this.url());\n });\n\n protected internalUrlTree = computed(() => this.router.parseUrl(this.internalPath()));\n\n protected modifierClasses = computed(() => [\n ...(this.richText() ? RICH_TEXT_ANCHOR_CLASSES : []),\n ...this.marks().map((mark) => `et-contentful-rich-text-mark-${mark}`),\n ]);\n}\n","import { BLOCKS, INLINES } from '@contentful/rich-text-types';\n\n/**\n * The `BLOCKS` node type strings of `@contentful/rich-text-types`, as a plain literal map.\n * Keep the values in sync with the enum - they are part of the Contentful Delivery API.\n *\n * These maps exist because `BLOCKS` and `INLINES` are TS enums: reading one in a *value* position\n * anywhere in this lib emits a runtime import and costs every consumer ~2.4 kB gz. Use the enums for\n * types only - the `contentful-deps` size golden fails if that slips.\n */\nexport const CF_BLOCKS = {\n DOCUMENT: 'document',\n PARAGRAPH: 'paragraph',\n HEADING_1: 'heading-1',\n HEADING_2: 'heading-2',\n HEADING_3: 'heading-3',\n HEADING_4: 'heading-4',\n HEADING_5: 'heading-5',\n HEADING_6: 'heading-6',\n OL_LIST: 'ordered-list',\n UL_LIST: 'unordered-list',\n LIST_ITEM: 'list-item',\n HR: 'hr',\n QUOTE: 'blockquote',\n EMBEDDED_ENTRY: 'embedded-entry-block',\n EMBEDDED_ASSET: 'embedded-asset-block',\n EMBEDDED_RESOURCE: 'embedded-resource-block',\n TABLE: 'table',\n TABLE_ROW: 'table-row',\n TABLE_CELL: 'table-cell',\n TABLE_HEADER_CELL: 'table-header-cell',\n} as unknown as typeof BLOCKS;\n\n/**\n * The `INLINES` node type strings of `@contentful/rich-text-types`, as a plain literal map.\n * Keep the values in sync with the enum - they are part of the Contentful Delivery API.\n */\nexport const CF_INLINES = {\n ASSET_HYPERLINK: 'asset-hyperlink',\n EMBEDDED_ENTRY: 'embedded-entry-inline',\n EMBEDDED_RESOURCE: 'embedded-resource-inline',\n ENTRY_HYPERLINK: 'entry-hyperlink',\n HYPERLINK: 'hyperlink',\n RESOURCE_HYPERLINK: 'resource-hyperlink',\n} as unknown as typeof INLINES;\n","import { RuntimeError } from '@ethlete/core';\n\nexport const RICH_TEXT_RENDERER_ERRORS = {\n rich_text_not_object: (data: { type: string }) =>\n `The value at richTextPath is a ${data.type}, not a rich-text document object. Point richTextPath at the rich-text field itself (e.g. items[0].fields.body).`,\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 rich_text_conflicting_inputs:\n 'Set exactly one rich-text source: a GraphQL rich-text field through gqlRichText, a REST response through content and richTextPath, or a bare document through richText (with includes).',\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 text_parent_not_found: 'The parent node is not found. This structure is not supported.',\n\n cached_command_not_found: 'No rendered node was found for a render command. The renderer state is out of sync.',\n cached_command_not_component:\n 'The rendered node for a component command is not a component. The renderer state is out of sync.',\n} as const;\n\nconst RICH_TEXT_RENDERER_ERROR_CODES: Record<keyof typeof RICH_TEXT_RENDERER_ERRORS, number> = {\n rich_text_not_object: 0,\n rich_text_wrong_type: 1,\n rich_text_conflicting_inputs: 11,\n asset_id_not_found: 2,\n entry_id_not_found: 3,\n text_parent_not_found: 7,\n cached_command_not_found: 9,\n cached_command_not_component: 10,\n};\n\nexport const richTextRendererError = (code: keyof typeof RICH_TEXT_RENDERER_ERRORS, data?: unknown) => {\n const entry: string | ((data: never) => string) = RICH_TEXT_RENDERER_ERRORS[code];\n const message = `<et-contentful-rich-text-renderer>: ${typeof entry === 'function' ? entry(data as never) : entry}`;\n\n throw new RuntimeError(RICH_TEXT_RENDERER_ERROR_CODES[code], message, data);\n};\n","/* eslint-disable @typescript-eslint/naming-convention */\nimport { ContentfulGqlAsset } from '../../gql';\nimport { ContentfulEntry, ContentfulRestAsset, RichTextResponse } from '../../types';\n\nexport type ContentfulGqlRichTextEntry = {\n __typename?: string | null;\n sys: { id: string };\n [field: string]: unknown;\n};\n\ntype ContentfulGqlLinkList<T> = (T | null | undefined)[] | null;\n\n/**\n * A rich-text field as returned by the Contentful GraphQL API. Select `json` and the `links` the\n * document references, and pass the field to `[gqlRichText]` as-is.\n */\nexport type ContentfulGqlRichText = {\n json: RichTextResponse;\n links?: {\n assets?: {\n block?: ContentfulGqlLinkList<ContentfulGqlAsset>;\n hyperlink?: ContentfulGqlLinkList<ContentfulGqlAsset>;\n } | null;\n entries?: {\n block?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n inline?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n hyperlink?: ContentfulGqlLinkList<ContentfulGqlRichTextEntry>;\n } | null;\n } | null;\n};\n\nconst lowerCaseFirst = (value: string) => value.charAt(0).toLowerCase() + value.slice(1);\n\nconst toGqlTypeName = (contentTypeId: string) => {\n const pascal = contentTypeId.replace(/[^a-z0-9]+(.)?/gi, (_, next: string | undefined) => next?.toUpperCase() ?? '');\n\n return pascal.charAt(0).toUpperCase() + pascal.slice(1);\n};\n\nconst toContentTypeId = (typename: string, contentTypeIds: readonly string[]) =>\n contentTypeIds.find((id) => toGqlTypeName(id) === typename) ?? lowerCaseFirst(typename);\n\nconst toRestAsset = (asset: ContentfulGqlAsset): ContentfulRestAsset => ({\n sys: { type: 'Asset', id: asset.sys.id, createdAt: '', updatedAt: '', locale: '' },\n fields: {\n title: asset.title ?? '',\n description: asset.description ?? '',\n file: {\n url: asset.url,\n details: {\n size: asset.size,\n ...(asset.width !== null && asset.height !== null\n ? { image: { width: asset.width, height: asset.height } }\n : {}),\n },\n fileName: asset.fileName ?? null,\n contentType: asset.contentType,\n },\n },\n metadata: { tags: [] },\n});\n\nconst toRestEntry = (entry: ContentfulGqlRichTextEntry, contentTypeIds: readonly string[]): ContentfulEntry | null => {\n const { __typename, sys, ...fields } = entry;\n\n if (!__typename) {\n return null;\n }\n\n return {\n sys: {\n type: 'Entry',\n id: sys.id,\n createdAt: '',\n updatedAt: '',\n locale: '',\n contentType: { sys: { type: 'Link', linkType: 'ContentType', id: toContentTypeId(__typename, contentTypeIds) } },\n },\n fields,\n metadata: { tags: [] },\n };\n};\n\nconst present = <T>(items: ContentfulGqlLinkList<T> | undefined) =>\n (items ?? []).filter((item): item is T => item !== null && item !== undefined);\n\n/**\n * Maps the `links` of a GraphQL rich-text field to the entries and assets the renderer resolves\n * embeds against. An entry's content type id is the id in `contentTypeIds` whose GraphQL type name\n * (PascalCase, separators dropped: `product-teaser` → `ProductTeaser`) equals its `__typename`, else the\n * `__typename` with the first letter lower-cased. Entries without a `__typename` are dropped.\n */\nexport const mapContentfulGqlLinks = (\n links: ContentfulGqlRichText['links'],\n contentTypeIds: readonly string[] = [],\n) => {\n const assets = new Map<string, ContentfulRestAsset>();\n const entries = new Map<string, ContentfulEntry>();\n\n for (const asset of [...present(links?.assets?.block), ...present(links?.assets?.hyperlink)]) {\n assets.set(asset.sys.id, toRestAsset(asset));\n }\n\n for (const gqlEntry of [\n ...present(links?.entries?.block),\n ...present(links?.entries?.inline),\n ...present(links?.entries?.hyperlink),\n ]) {\n const entry = toRestEntry(gqlEntry, contentTypeIds);\n\n if (entry) {\n entries.set(entry.sys.id, entry);\n }\n }\n\n return { assets: [...assets.values()], entries: [...entries.values()] };\n};\n","import { isDevMode } from '@angular/core';\nimport { BLOCKS, INLINES } from '@contentful/rich-text-types';\nimport { isObject } from '@ethlete/core';\nimport { RichTextResponse } from '../../types';\nimport { CF_BLOCKS, CF_INLINES } from './rich-text-node-types';\n\nexport const isRichTextRootNode = (node: unknown): node is RichTextResponse => {\n return isObject(node) && 'nodeType' in node && node['nodeType'] === 'document';\n};\n\nconst NODE_TYPE_TAGS: Record<string, keyof HTMLElementTagNameMap> = /* @__PURE__ */ (() => ({\n [CF_BLOCKS.HEADING_1]: 'h1',\n [CF_BLOCKS.HEADING_2]: 'h2',\n [CF_BLOCKS.HEADING_3]: 'h3',\n [CF_BLOCKS.HEADING_4]: 'h4',\n [CF_BLOCKS.HEADING_5]: 'h5',\n [CF_BLOCKS.HEADING_6]: 'h6',\n [CF_BLOCKS.PARAGRAPH]: 'p',\n [CF_BLOCKS.UL_LIST]: 'ul',\n [CF_BLOCKS.OL_LIST]: 'ol',\n [CF_BLOCKS.LIST_ITEM]: 'li',\n [CF_BLOCKS.HR]: 'hr',\n [CF_BLOCKS.QUOTE]: 'blockquote',\n [CF_BLOCKS.TABLE]: 'table',\n [CF_BLOCKS.TABLE_ROW]: 'tr',\n [CF_BLOCKS.TABLE_CELL]: 'td',\n [CF_BLOCKS.TABLE_HEADER_CELL]: 'th',\n}))();\n\nconst INLINE_NODE_TYPES = /* @__PURE__ */ (() => new Set<string>(Object.values(CF_INLINES)))();\n\n/**\n * The html element a structural rich text node renders as. A node type without an element\n * (an unsupported inline or block) falls back to `span` for inlines and `div` otherwise,\n * with a dev-mode warning.\n */\nexport const translateContentfulNodeTypeToHtmlTag = (\n nodeType: 'text' | BLOCKS | INLINES,\n): keyof HTMLElementTagNameMap => {\n const tag = NODE_TYPE_TAGS[nodeType];\n\n if (tag) {\n return tag;\n }\n\n const fallback = INLINE_NODE_TYPES.has(nodeType) ? 'span' : 'div';\n\n if (isDevMode()) {\n console.warn(`Unsupported rich text node type \"${nodeType}\"! Its content is rendered inside a <${fallback}>.`);\n }\n\n return fallback;\n};\n","import { DOCUMENT, Location } from '@angular/common';\nimport {\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n InjectionToken,\n Injector,\n Type,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n computed,\n effect,\n inject,\n input,\n inputBinding,\n isDevMode,\n reflectComponentType,\n signal,\n untracked,\n} from '@angular/core';\nimport { Block, Inline, Mark, Text } from '@contentful/rich-text-types';\nimport { getObjectProperty, injectRenderer, injectUrl, isObject } from '@ethlete/core';\nimport {\n ContentfulCollection,\n ContentfulEntry,\n ContentfulEntryLinkItem,\n ContentfulRestAsset,\n RichTextResponse,\n} from '../../types';\nimport { injectContentfulConfig } from '../../utils/contentful-config';\nimport {\n internalWebHrefPath,\n isExternalWebHref,\n isRouteRelativeHref,\n resolveHrefAgainstRoute,\n} from '../link/contentful-link.util';\nimport { CF_BLOCKS, CF_INLINES } from './rich-text-node-types';\nimport { richTextRendererError } from './rich-text-renderer.errors';\nimport { ContentfulGqlRichText, mapContentfulGqlLinks } from './rich-text-renderer.gql';\nimport { isRichTextRootNode, translateContentfulNodeTypeToHtmlTag } from './rich-text-renderer.util';\n\ntype HtmlOpenRenderCommand = {\n kind: 'htmlOpen';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n attributes: Record<string, string>;\n tagName: keyof HTMLElementTagNameMap;\n id: string;\n};\n\ntype HtmlCloseRenderCommand = {\n kind: 'htmlClose';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n tagName: keyof HTMLElementTagNameMap;\n id: string;\n};\n\ntype TextRenderCommand = {\n kind: 'text';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n attributes: Record<string, string>;\n markTags: MarkTagName[];\n text: string;\n id: string;\n};\n\ntype ComponentRenderCommand = {\n kind: 'component';\n nestingLevel: number;\n domPosition: number;\n parentId: string | null;\n component: Type<unknown>;\n inputs: Record<string, unknown>;\n entryId?: string;\n id: string;\n};\n\ntype RenderCommand = HtmlOpenRenderCommand | HtmlCloseRenderCommand | TextRenderCommand | ComponentRenderCommand;\n\ntype RenderInstruction = {\n type: 'create' | 'update' | 'move' | 'delete';\n command: RenderCommand;\n};\n\ntype MarkTagName = 'strong' | 'em' | 'u' | 'code' | 's' | 'sub' | 'sup';\n\nconst DEFAULT_ANCHOR_CLASS = 'et-contentful-rich-text-default-element et-contentful-rich-text-default-a';\n\nconst MARK_TAG_MAP: Record<string, MarkTagName> = {\n bold: 'strong',\n italic: 'em',\n underline: 'u',\n code: 'code',\n strikethrough: 's',\n subscript: 'sub',\n superscript: 'sup',\n};\n\n/**\n * Translates contentful text marks into the semantic html elements the marked text is\n * wrapped in, outermost first. Unknown marks are skipped (with a dev-mode warning).\n */\nexport const marksToTags = (marks: Mark[]) => {\n const tags: MarkTagName[] = [];\n\n for (const mark of marks) {\n const tag = MARK_TAG_MAP[mark.type];\n\n if (!tag) {\n if (isDevMode()) {\n console.warn(`No element found for mark type \"${mark.type}\"! The mark is ignored.`, mark);\n }\n\n continue;\n }\n\n tags.push(tag);\n }\n\n return tags;\n};\n\n/**\n * The classes marked text inside a hyperlink is rendered with, since the link component\n * receives its text as a plain string.\n */\nexport const marksToClass = (marks: Mark[]) =>\n marks.map((mark) => `et-contentful-rich-text-mark-${mark.type}`).join(' ');\n\nconst LINK_COMPONENT_TYPE = '$$$_et-link';\n\nconst normalizeHref = (href: string): string | null => {\n if (!href.trim()) {\n return null;\n }\n\n try {\n const url = new URL(href, 'https://contentful.invalid');\n\n return ['http:', 'https:', 'mailto:', 'tel:', 'ftp:'].includes(url.protocol) ? href : null;\n } catch {\n return null;\n }\n};\n\ntype ExecutedCommandCacheItemBase = {\n element: HTMLElement;\n};\n\ntype ExecutedComponentCommandCacheItem = {\n command: ComponentRenderCommand;\n componentRef: ComponentRef<unknown>;\n inputs: WritableSignal<Record<string, unknown>>;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedHtmlCommandCacheItem = {\n command: HtmlOpenRenderCommand | HtmlCloseRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedTextCommandCacheItem = {\n command: TextRenderCommand;\n} & ExecutedCommandCacheItemBase;\n\ntype ExecutedCommandCacheItem =\n ExecutedComponentCommandCacheItem | ExecutedHtmlCommandCacheItem | ExecutedTextCommandCacheItem;\n\nconst isExecutedComponentCommandCacheItem = (\n cache: ExecutedCommandCacheItem,\n): cache is ExecutedComponentCommandCacheItem => {\n return cache.command.kind === 'component';\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\ntype IncludeMapLookup = {\n entry: (id: string) => ContentfulEntry | null;\n asset: (id: string) => ContentfulRestAsset | null;\n};\n\nconst includeMapLookups = /* @__PURE__ */ new WeakMap<ContentfulIncludeMap, IncludeMapLookup>();\n\nconst lookupOf = (includes: ContentfulIncludeMap): IncludeMapLookup =>\n includeMapLookups.get(includes) ?? {\n entry: (id) => includes.getEntry(id, ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID),\n asset: (id) => includes.getAsset(id),\n };\n\nconst ANCESTOR_ENTRY_IDS = /* @__PURE__ */ new InjectionToken<ReadonlySet<string>>(\n 'ContentfulRichTextAncestorEntryIds',\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(\n 'Entry not found! Will return null. Is it unpublished or deleted, or is the include query param too low?',\n { id },\n );\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 const includeMap: ContentfulIncludeMap = { getEntry, getEntries, getAsset, getAssets };\n\n includeMapLookups.set(includeMap, {\n entry: (id) => entryMap.get(id) ?? null,\n asset: (id) => assetMap.get(id) ?? null,\n });\n\n return includeMap;\n};\n\nconst warnedRichTextPaths = /* @__PURE__ */ new Set<string>();\n\nconst warnOnUnresolvedParentPath = (content: ContentfulCollection, richTextPath: string) => {\n const segments = richTextPath.split('.');\n const root = content as unknown as Record<string, unknown>;\n\n if (segments.length < 2 || isObject(getObjectProperty(root, segments.slice(0, -1).join('.')))) return;\n if (warnedRichTextPaths.has(richTextPath)) return;\n\n warnedRichTextPaths.add(richTextPath);\n\n let resolvedSegments = 0;\n\n while (\n resolvedSegments < segments.length - 1 &&\n isObject(getObjectProperty(root, segments.slice(0, resolvedSegments + 1).join('.')))\n ) {\n resolvedSegments++;\n }\n\n const resolvedPath = segments.slice(0, resolvedSegments).join('.') || '(the content itself)';\n\n console.warn(\n `<et-contentful-rich-text-renderer>: richTextPath \"${richTextPath}\" does not resolve, so nothing is rendered. The deepest part that resolves is ${resolvedPath}; check the next segment for a typo or a missing item.`,\n { content, richTextPath },\n );\n};\n\n@Component({\n selector: 'et-contentful-rich-text-renderer',\n template: ``,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-rich-text-renderer',\n ngSkipHydration: 'true',\n },\n})\nexport class ContentfulRichTextRendererComponent {\n private viewContainerRef = inject(ViewContainerRef);\n private renderer = injectRenderer();\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private config = injectContentfulConfig();\n private document = inject(DOCUMENT);\n private location = inject(Location);\n private url = injectUrl();\n private injector = inject(Injector);\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<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<string>();\n\n /**\n * A rich-text field from the Contentful GraphQL API, passed as-is. An alternative to `content` and\n * `richTextPath`; setting both is an error in dev mode.\n * @example { json, links: { assets: { block, hyperlink }, entries: { block, inline, hyperlink } } }\n */\n gqlRichText = input<ContentfulGqlRichText | null | undefined>();\n\n /**\n * A bare rich-text document, e.g. a rich-text field of an embedded entry. Pair it with `includes` so its\n * embeds resolve. An alternative to `content` / `richTextPath` and `gqlRichText`.\n * @example <et-contentful-rich-text-renderer [richText]=\"fields().body\" [includes]=\"includes()\" />\n */\n richText = input<RichTextResponse | null | undefined>();\n\n /** The linked entries and assets `richText` resolves its embeds against, e.g. a custom component's `includes`. */\n includes = input<ContentfulIncludeMap | null | undefined>();\n\n private ancestorEntryIds = inject(ANCESTOR_ENTRY_IDS, { optional: true }) ?? new Set<string>();\n\n private readonly executedCommandsCache = new Map<string, ExecutedCommandCacheItem>();\n\n private contentIncludesMap = computed<ContentfulIncludeMap>(() => {\n const includes = this.includes();\n\n if (includes) {\n return includes;\n }\n\n const gqlRichText = this.gqlRichText();\n\n if (gqlRichText) {\n return createContentfulIncludeMap(\n mapContentfulGqlLinks(gqlRichText.links, Object.keys(this.config.customComponents)),\n );\n }\n\n const content = this.content();\n const entries = new Map<string, ContentfulEntry>();\n\n for (const entry of [...(content?.items ?? []), ...(content?.includes?.Entry ?? [])]) {\n entries.set(entry.sys.id, entry);\n }\n\n return createContentfulIncludeMap({ assets: content?.includes?.Asset ?? [], entries: [...entries.values()] });\n });\n\n private linkLookup = computed(() => lookupOf(this.contentIncludesMap()));\n\n private richTextData = computed(() => {\n const gqlRichText = this.gqlRichText();\n const content = this.content();\n const richTextPath = this.richTextPath();\n const richText = this.richText();\n\n if (ngDevMode && [gqlRichText, content || richTextPath, richText].filter(Boolean).length > 1) {\n throw richTextRendererError('rich_text_conflicting_inputs', { gqlRichText, content, richTextPath, richText });\n }\n\n if (richText) {\n if (!isRichTextRootNode(richText)) {\n throw richTextRendererError('rich_text_wrong_type', { richText });\n }\n\n return richText;\n }\n\n if (gqlRichText) {\n if (!isRichTextRootNode(gqlRichText.json)) {\n throw richTextRendererError('rich_text_wrong_type', { gqlRichText });\n }\n\n return gqlRichText.json;\n }\n\n if (!content) {\n return null;\n }\n\n if (!richTextPath) {\n if (ngDevMode) {\n console.warn(\n '<et-contentful-rich-text-renderer>: content is set without richTextPath, so nothing is rendered. Set richTextPath, or pass a GraphQL field through gqlRichText.',\n );\n }\n\n return null;\n }\n\n const pathValue = getObjectProperty(content as unknown as Record<string, unknown>, richTextPath);\n\n if (pathValue === null || pathValue === undefined) {\n if (ngDevMode && pathValue === undefined) {\n warnOnUnresolvedParentPath(content, richTextPath);\n }\n\n return null;\n }\n\n if (!isObject(pathValue)) {\n throw richTextRendererError('rich_text_not_object', { content, richTextPath, type: typeof pathValue });\n }\n\n if (!isRichTextRootNode(pathValue)) {\n throw richTextRendererError('rich_text_wrong_type', { content, richTextPath });\n }\n\n return pathValue as RichTextResponse;\n });\n\n private renderCommands = computed(() => {\n const richTextData = this.richTextData();\n\n if (!richTextData) {\n return [];\n }\n\n return this.createRenderCommands(richTextData);\n });\n\n private renderInstructions = computed(() => {\n const commands = this.renderCommands();\n const previousRenderCommandMap = new Map(\n [...this.executedCommandsCache.entries()].map(([id, item]) => [id, item.command]),\n );\n\n const instructions: RenderInstruction[] = [];\n\n const preserved = new Set<string>();\n const needsReattach = new Set<string>();\n\n const markTagsEqual = (a: MarkTagName[], b: MarkTagName[]) =>\n a.length === b.length && a.every((tag, index) => tag === b[index]);\n\n const attributesEqual = (a: Record<string, string>, b: Record<string, string>) => {\n const aKeys = Object.keys(a);\n\n return aKeys.length === Object.keys(b).length && aKeys.every((key) => a[key] === b[key]);\n };\n\n for (const command of commands) {\n if (command.kind === 'htmlClose') {\n continue;\n }\n\n const previous = previousRenderCommandMap.get(command.id);\n\n if (!previous || previous.kind !== command.kind) {\n continue;\n }\n\n if (previous.kind === 'component' && command.kind === 'component' && previous.component !== command.component) {\n continue;\n }\n\n const parentPreserved =\n previous.parentId === command.parentId && (command.parentId === null || preserved.has(command.parentId));\n\n if (command.kind === 'component') {\n preserved.add(command.id);\n\n const samePlace =\n parentPreserved &&\n previous.nestingLevel === command.nestingLevel &&\n previous.domPosition === command.domPosition;\n\n if (!samePlace) {\n needsReattach.add(command.id);\n }\n\n continue;\n }\n\n const sameOutput =\n previous.kind === command.kind &&\n (previous.kind !== 'htmlOpen' || previous.tagName === (command as HtmlOpenRenderCommand).tagName) &&\n (previous.kind !== 'text' ||\n (previous.text === (command as TextRenderCommand).text &&\n markTagsEqual(previous.markTags, (command as TextRenderCommand).markTags)));\n\n if (\n parentPreserved &&\n sameOutput &&\n previous.nestingLevel === command.nestingLevel &&\n previous.domPosition === command.domPosition &&\n attributesEqual(previous.attributes, command.attributes)\n ) {\n preserved.add(command.id);\n }\n }\n\n for (const [id, command] of previousRenderCommandMap) {\n if (command.kind !== 'htmlClose' && !preserved.has(id)) {\n instructions.push({ type: 'delete', command });\n }\n }\n\n for (const command of commands) {\n if (command.kind === 'htmlClose') {\n continue;\n }\n\n if (!preserved.has(command.id)) {\n instructions.push({ type: 'create', command });\n } else if (command.kind === 'component' && needsReattach.has(command.id)) {\n instructions.push({ type: 'move', command });\n } else {\n instructions.push({ type: 'update', command });\n }\n }\n\n return instructions;\n });\n\n constructor() {\n effect(() => {\n const instructions = this.renderInstructions();\n\n untracked(() => this.execInstructions(instructions));\n });\n }\n\n private createRenderCommands(richTextData: RichTextResponse) {\n const rootCommands: RenderCommand[] = [];\n let elementOpenId = 0;\n let elementCloseId = 0;\n const componentIdMap = new Map<string, number>();\n let nestingLevel = 0;\n let domPosition = 0;\n\n let textId = 0;\n\n const openElementIds: string[] = [];\n\n const traverse = (node: Block | Inline | Text) => {\n switch (node.nodeType) {\n case '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 rootCommands.push({\n kind: 'text',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n markTags: node.marks.length ? marksToTags(node.marks) : [],\n text,\n id: 't' + textId++,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_BLOCKS.EMBEDDED_ASSET: {\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.linkLookup().asset(assetId);\n\n if (!asset) {\n if (isDevMode()) {\n console.warn(\n 'Embedded asset is missing from the includes! The asset will be skipped. Is it unpublished or deleted?',\n { assetId, node },\n );\n }\n\n break;\n }\n\n const contentType = asset.fields.file?.contentType;\n const assetComponents = this.config.components;\n\n if (!asset.fields.file?.url) {\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 if (!component) {\n if (isDevMode()) {\n console.warn(\n 'No component registered for this embedded asset! The asset will be skipped. Provide one via provideContentfulConfig({ components: … }).',\n { asset },\n );\n }\n\n break;\n }\n\n const occurrenceKey = 'asset:' + assetId;\n const occurrence = (componentIdMap.get(occurrenceKey) ?? -1) + 1;\n componentIdMap.set(occurrenceKey, occurrence);\n const id = occurrence === 0 ? occurrenceKey : `${occurrenceKey}:${occurrence}`;\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component,\n inputs: { asset },\n id,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_INLINES.HYPERLINK:\n case CF_INLINES.ASSET_HYPERLINK:\n case CF_INLINES.ENTRY_HYPERLINK: {\n let href: string | null = null;\n\n if (node.nodeType === CF_INLINES.HYPERLINK) {\n href = normalizeHref((node.data['uri'] as string) ?? '');\n } else if (node.nodeType === CF_INLINES.ASSET_HYPERLINK) {\n const assetId = node.data['target']?.sys?.id;\n const asset = assetId ? this.linkLookup().asset(assetId) : null;\n const url = asset?.fields.file?.url;\n href = url ? normalizeHref(url) : null;\n } else if (this.config.entryHref) {\n const entryId = node.data['target']?.sys?.id;\n const entry = entryId ? this.linkLookup().entry(entryId) : null;\n const entryHref = entry ? this.config.entryHref(entry) : null;\n href = entryHref ? normalizeHref(entryHref) : null;\n }\n\n const linkTexts = node.content.filter(\n (child): child is Text => child.nodeType === 'text' && Boolean(child.value),\n );\n if (!linkTexts.length) {\n break;\n }\n\n const linkText = linkTexts.map((child) => child.value).join('');\n const linkComponent = href ? this.config.components.link : null;\n\n if (href && !linkComponent) {\n const webUrlContext = { location: this.document.location, internalHosts: this.config.internalHosts };\n const internalPath = internalWebHrefPath(href, webUrlContext);\n const anchorHref =\n internalPath !== null\n ? this.location.prepareExternalUrl(internalPath)\n : isRouteRelativeHref(href)\n ? this.location.prepareExternalUrl(resolveHrefAgainstRoute(href, this.url()))\n : href;\n const attributes: Record<string, string> = { class: DEFAULT_ANCHOR_CLASS, href: anchorHref };\n\n if (isExternalWebHref(href, webUrlContext)) {\n attributes['target'] = '_blank';\n attributes['rel'] = 'noopener noreferrer';\n }\n\n rootCommands.push({\n kind: 'htmlOpen',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n tagName: 'a',\n id: 'e-o' + elementOpenId++,\n });\n\n const anchorDomPosition = domPosition;\n\n openElementIds.push('e-o' + (elementOpenId - 1));\n nestingLevel++;\n domPosition = 0;\n\n for (const child of linkTexts) {\n traverse(child);\n }\n\n openElementIds.pop();\n nestingLevel--;\n domPosition = anchorDomPosition;\n\n rootCommands.push({\n kind: 'htmlClose',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n tagName: 'a',\n id: 'e-c' + elementCloseId++,\n });\n\n domPosition++;\n\n break;\n }\n\n if (!href) {\n for (const child of linkTexts) {\n traverse(child);\n }\n\n break;\n }\n\n if (!linkComponent) {\n break;\n }\n\n const sharedMarks =\n linkTexts[0]?.marks.filter((mark) =>\n linkTexts.every((child) => child.marks.some((other) => other.type === mark.type)),\n ) ?? [];\n\n let linkComponentId = componentIdMap.get(LINK_COMPONENT_TYPE) ?? -1;\n const linkId = LINK_COMPONENT_TYPE + ++linkComponentId;\n componentIdMap.set(LINK_COMPONENT_TYPE, linkComponentId);\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component: linkComponent,\n inputs: { href, text: linkText, marks: sharedMarks.map((mark) => mark.type), richText: true },\n id: linkId,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_BLOCKS.EMBEDDED_ENTRY:\n case CF_INLINES.EMBEDDED_ENTRY: {\n const entryId = node.data['target']?.sys?.id;\n\n if (!entryId) {\n throw richTextRendererError('entry_id_not_found', { node });\n }\n\n if (this.ancestorEntryIds.has(entryId)) {\n if (isDevMode()) {\n console.warn(\n 'Embedded entry embeds itself through its own rich text! The nested occurrence is skipped to stop the cycle.',\n { entryId, node },\n );\n }\n\n break;\n }\n\n const entry = this.linkLookup().entry(entryId);\n\n if (!entry) {\n if (isDevMode()) {\n console.warn(\n 'Embedded entry is missing from the includes! The entry will be skipped. Is it unpublished or deleted, or is the include query param too low?',\n { entryId, node },\n );\n }\n\n break;\n }\n\n const componentType = entry.sys.contentType.sys.id;\n\n const component = this.config.customComponents[componentType];\n\n if (!component) {\n if (isDevMode()) {\n console.warn(\n 'No custom component registered for this embedded entry type! The entry will be skipped. Provide one via provideContentfulConfig({ customComponents: … }).',\n { componentType, customComponents: this.config.customComponents, entry },\n );\n }\n\n break;\n }\n\n const occurrenceKey = 'entry:' + entryId;\n const occurrence = (componentIdMap.get(occurrenceKey) ?? -1) + 1;\n componentIdMap.set(occurrenceKey, occurrence);\n const id = occurrence === 0 ? occurrenceKey : `${occurrenceKey}:${occurrence}`;\n\n rootCommands.push({\n kind: 'component',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n component,\n inputs: {\n fields: entry.fields,\n metadata: entry.metadata,\n sys: entry.sys,\n includes: this.contentIncludesMap(),\n },\n entryId,\n id,\n });\n\n domPosition++;\n\n break;\n }\n\n case CF_BLOCKS.EMBEDDED_RESOURCE:\n case CF_INLINES.EMBEDDED_RESOURCE: {\n if (isDevMode()) {\n console.warn(`Rich text node type \"${node.nodeType}\" is not supported and is skipped.`, {\n urn: node.data['target']?.sys?.urn,\n node,\n });\n }\n\n break;\n }\n\n default: {\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\n rootCommands.push({\n kind: 'htmlOpen',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n attributes,\n tagName: tag,\n id: 'e-o' + elementOpenId++,\n });\n\n const domPositionAtThisLevel = domPosition;\n openElementIds.push('e-o' + (elementOpenId - 1));\n nestingLevel++;\n domPosition = 0;\n\n for (const child of node.content) {\n traverse(child);\n }\n\n openElementIds.pop();\n nestingLevel--;\n domPosition = domPositionAtThisLevel;\n\n const lastCommand = rootCommands[rootCommands.length - 1];\n\n if (\n lastCommand?.kind === 'htmlOpen' &&\n lastCommand.tagName !== 'td' &&\n lastCommand.tagName !== 'th' &&\n lastCommand.tagName !== 'hr'\n ) {\n rootCommands.pop();\n elementOpenId--;\n } else {\n rootCommands.push({\n kind: 'htmlClose',\n nestingLevel,\n domPosition,\n parentId: openElementIds.at(-1) ?? null,\n tagName: tag,\n id: 'e-c' + elementCloseId++,\n });\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 const lastPlacedChild = new Map<string | null, HTMLElement>();\n\n for (const { type, command } of instructions) {\n if (type === 'delete') {\n this.runDeleteInstruction(command);\n\n continue;\n }\n\n const previousSibling = lastPlacedChild.get(command.parentId) ?? null;\n\n switch (type) {\n case 'create':\n this.runCreateInstruction(command, previousSibling);\n break;\n case 'update':\n this.runUpdateInstruction(command);\n break;\n case 'move':\n this.runMoveInstruction(command, previousSibling);\n break;\n }\n\n const element = this.executedCommandsCache.get(command.id)?.element;\n\n if (element) {\n lastPlacedChild.set(command.parentId, element);\n }\n }\n }\n\n private runCreateInstruction(command: RenderCommand, previousSibling: HTMLElement | null) {\n const parentElement = this.findParent(command);\n\n if (command.kind === 'component') {\n const inputs = signal(command.inputs);\n\n const declaredInputs = reflectComponentType(command.component)?.inputs ?? [];\n const bindings = declaredInputs\n .filter((declared) => declared.propName in command.inputs)\n .map((declared) => inputBinding(declared.templateName, () => inputs()[declared.propName]));\n\n const injector = command.entryId\n ? Injector.create({\n providers: [\n { provide: ANCESTOR_ENTRY_IDS, useValue: new Set([...this.ancestorEntryIds, command.entryId]) },\n ],\n parent: this.injector,\n })\n : undefined;\n\n const componentRef = this.viewContainerRef.createComponent(command.component, { bindings, injector });\n\n const rootNode = this.getComponentRootNode(componentRef);\n\n this.renderInsertAfter(rootNode, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n componentRef,\n inputs,\n element: rootNode,\n });\n } else if (command.kind === 'text') {\n const span = this.renderer.createElement('span');\n const textSplitInLineBreaks = command.text.split('\\n');\n\n for (const [key, value] of Object.entries(command.attributes)) {\n this.renderer.setAttribute(span, key, value);\n }\n\n let textContainer = span;\n\n for (const tag of command.markTags) {\n const markElement = this.renderer.createElement(tag);\n\n this.renderer.appendChild(textContainer, markElement);\n textContainer = markElement;\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(textContainer, brNode);\n }\n\n if (textPart) {\n const textNode = this.renderer.createText(textPart);\n\n this.renderer.appendChild(textContainer, textNode);\n }\n }\n\n this.renderInsertAfter(span, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n element: span,\n });\n } else if (command.kind === 'htmlOpen') {\n const element = this.renderer.createElement(command.tagName);\n\n for (const [key, value] of Object.entries(command.attributes)) {\n this.renderer.setAttribute(element, key, value);\n }\n\n this.renderInsertAfter(element, { parentElement, previousSibling });\n\n this.executedCommandsCache.set(command.id, {\n command,\n element,\n });\n }\n }\n\n private runUpdateInstruction(command: RenderCommand) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\n }\n\n cached.inputs.set(command.inputs);\n }\n\n this.executedCommandsCache.set(command.id, {\n ...cached,\n command,\n } as ExecutedCommandCacheItem);\n }\n\n private runMoveInstruction(command: RenderCommand, previousSibling: HTMLElement | null) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\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 this.renderInsertAfter(rootNode, { parentElement: this.findParent(command), previousSibling });\n\n cached.inputs.set(command.inputs);\n\n this.executedCommandsCache.set(command.id, {\n ...cached,\n command,\n } as ExecutedCommandCacheItem);\n }\n }\n\n private runDeleteInstruction(command: RenderCommand) {\n const cached = this.executedCommandsCache.get(command.id);\n\n if (!cached) {\n if (command.kind === 'htmlClose') {\n return;\n }\n\n throw richTextRendererError('cached_command_not_found', { command });\n }\n\n if (command.kind === 'component') {\n if (!isExecutedComponentCommandCacheItem(cached)) {\n throw richTextRendererError('cached_command_not_component', { command });\n }\n\n cached.componentRef.destroy();\n } else if (command.kind === 'text' || command.kind === 'htmlOpen') {\n if (cached.element.parentElement) {\n this.renderer.removeChild(cached.element.parentElement, cached.element);\n }\n }\n\n this.executedCommandsCache.delete(command.id);\n }\n\n private getComponentRootNode(componentRef: ComponentRef<unknown>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<unknown>).rootNodes[0] as HTMLElement;\n }\n\n private findParent(command: RenderCommand) {\n if (command.parentId === null) {\n return this.elementRef.nativeElement;\n }\n\n const parentElement = this.executedCommandsCache.get(command.parentId)?.element;\n\n if (!parentElement) {\n throw richTextRendererError('text_parent_not_found', { command });\n }\n\n return parentElement;\n }\n\n private renderInsertAfter(\n node: HTMLElement,\n { parentElement, previousSibling }: { parentElement: HTMLElement; previousSibling: HTMLElement | null },\n ) {\n this.renderer.insertBefore(\n parentElement,\n node,\n previousSibling ? previousSibling.nextSibling : parentElement.firstChild,\n );\n }\n}\n","import { Component, ViewEncapsulation, computed, input } from '@angular/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 class=\"et-contentful-video-video\" controls>\n <source [src]=\"data.url\" [attr.type]=\"data.contentType || null\" class=\"et-contentful-video-source\" />\n </video>\n }\n `,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'et-contentful-video',\n },\n})\nexport class ContentfulVideoComponent {\n asset = input.required<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>();\n\n protected data = computed(() => {\n const asset = this.asset();\n\n if (!asset) {\n return null;\n }\n\n if (isContentfulGqlAsset(asset) && asset.url) {\n return {\n url: asset.url,\n contentType: asset.contentType,\n };\n }\n\n if (!isContentfulGqlAsset(asset) && asset.fields.file?.url) {\n return {\n url: asset.fields.file.url,\n contentType: asset.fields.file.contentType,\n };\n }\n\n return null;\n });\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 { 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\n/**\n * The shipped audio, file, image, video and link components, to spread into `provideContentfulConfig`.\n * An app that brings its own components, or renders text only, leaves this out and bundles none of them.\n * To replace one, spread the map instead: `components: { ...CONTENTFUL_DEFAULT_COMPONENTS.components, image: MyImage }`.\n *\n * @example\n * provideContentfulConfig({ ...CONTENTFUL_DEFAULT_COMPONENTS });\n */\nexport const CONTENTFUL_DEFAULT_COMPONENTS = {\n components: {\n audio: ContentfulAudioComponent,\n file: ContentfulFileComponent,\n image: ContentfulImageComponent,\n video: ContentfulVideoComponent,\n link: ContentfulLinkComponent,\n },\n} satisfies Partial<ContentfulConfig>;\n","import { Provider } from '@angular/core';\nimport { CONTENTFUL_CONFIG } from '../constants';\nimport { ContentfulConfigOptions, ContentfulEntry } from '../types';\nimport { createContentfulConfig } from './contentful-config';\n\nexport const provideContentfulConfig = (contentfulConfig?: ContentfulConfigOptions | null): Provider => {\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEO,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;;;AA8B7C;AACO,MAAM,oBAAoB,GAAG,CAAC,KAAU,KAAiC;IAC9E,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,KAAK,CAAC,CAAC;AAC7F;;MCda,wBAAwB,CAAA;AAjBrC,IAAA,WAAA,GAAA;QAkBE,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAA+D;AAE3E,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAK;AAC7B,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;YAE1B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,OAAO,IAAI;YACb;YAEA,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,GAAG,EAAE;gBAC5C,OAAO;oBAC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B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,KAAK,EAAE,wBAAwB;AAC/B,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;;ACjBI,MAAM,uBAAuB,GAAG,CAAC,gBAAiD,KAAc;AACrG,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;;ACVnC;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -115,11 +115,11 @@ type ContentfulGqlRichText = {
|
|
|
115
115
|
};
|
|
116
116
|
/**
|
|
117
117
|
* Maps the `links` of a GraphQL rich-text field to the entries and assets the renderer resolves
|
|
118
|
-
* embeds against. An entry's content type id is
|
|
119
|
-
*
|
|
120
|
-
* `__typename` are dropped.
|
|
118
|
+
* embeds against. An entry's content type id is the id in `contentTypeIds` whose GraphQL type name
|
|
119
|
+
* (PascalCase, separators dropped: `product-teaser` → `ProductTeaser`) equals its `__typename`, else the
|
|
120
|
+
* `__typename` with the first letter lower-cased. Entries without a `__typename` are dropped.
|
|
121
121
|
*/
|
|
122
|
-
declare const mapContentfulGqlLinks: (links: ContentfulGqlRichText["links"]) => {
|
|
122
|
+
declare const mapContentfulGqlLinks: (links: ContentfulGqlRichText["links"], contentTypeIds?: readonly string[]) => {
|
|
123
123
|
assets: ContentfulRestAsset[];
|
|
124
124
|
entries: ContentfulEntry[];
|
|
125
125
|
};
|
|
@@ -187,6 +187,7 @@ declare class ContentfulRichTextRendererComponent {
|
|
|
187
187
|
private document;
|
|
188
188
|
private location;
|
|
189
189
|
private url;
|
|
190
|
+
private injector;
|
|
190
191
|
/**
|
|
191
192
|
* The contentful response gotten via their REST api.
|
|
192
193
|
* @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection
|
|
@@ -203,10 +204,18 @@ declare class ContentfulRichTextRendererComponent {
|
|
|
203
204
|
* @example { json, links: { assets: { block, hyperlink }, entries: { block, inline, hyperlink } } }
|
|
204
205
|
*/
|
|
205
206
|
gqlRichText: _angular_core.InputSignal<ContentfulGqlRichText | null | undefined>;
|
|
207
|
+
/**
|
|
208
|
+
* A bare rich-text document, e.g. a rich-text field of an embedded entry. Pair it with `includes` so its
|
|
209
|
+
* embeds resolve. An alternative to `content` / `richTextPath` and `gqlRichText`.
|
|
210
|
+
* @example <et-contentful-rich-text-renderer [richText]="fields().body" [includes]="includes()" />
|
|
211
|
+
*/
|
|
212
|
+
richText: _angular_core.InputSignal<RichTextResponse | null | undefined>;
|
|
213
|
+
/** The linked entries and assets `richText` resolves its embeds against, e.g. a custom component's `includes`. */
|
|
214
|
+
includes: _angular_core.InputSignal<ContentfulIncludeMap | null | undefined>;
|
|
215
|
+
private ancestorEntryIds;
|
|
206
216
|
private readonly executedCommandsCache;
|
|
207
|
-
private includes;
|
|
208
217
|
private contentIncludesMap;
|
|
209
|
-
private
|
|
218
|
+
private linkLookup;
|
|
210
219
|
private richTextData;
|
|
211
220
|
private renderCommands;
|
|
212
221
|
private renderInstructions;
|
|
@@ -221,7 +230,7 @@ declare class ContentfulRichTextRendererComponent {
|
|
|
221
230
|
private findParent;
|
|
222
231
|
private renderInsertAfter;
|
|
223
232
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulRichTextRendererComponent, never>;
|
|
224
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulRichTextRendererComponent, "et-contentful-rich-text-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "richTextPath": { "alias": "richTextPath"; "required": false; "isSignal": true; }; "gqlRichText": { "alias": "gqlRichText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
233
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulRichTextRendererComponent, "et-contentful-rich-text-renderer", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "richTextPath": { "alias": "richTextPath"; "required": false; "isSignal": true; }; "gqlRichText": { "alias": "gqlRichText"; "required": false; "isSignal": true; }; "richText": { "alias": "richText"; "required": false; "isSignal": true; }; "includes": { "alias": "includes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
225
234
|
}
|
|
226
235
|
|
|
227
236
|
declare const isRichTextRootNode: (node: unknown) => node is RichTextResponse;
|
|
@@ -267,14 +276,21 @@ type ContentfulConfig = {
|
|
|
267
276
|
*/
|
|
268
277
|
customComponents: Record<string, ComponentLikeWithContentfulRendererInputs>;
|
|
269
278
|
/**
|
|
270
|
-
* Additional
|
|
279
|
+
* Additional hosts that should be treated as internal links (in addition to the current page's host).
|
|
271
280
|
* Useful when the app runs on localhost during development but Contentful content references the production domain.
|
|
272
|
-
* A
|
|
273
|
-
*
|
|
281
|
+
* A host matches exactly, so a subdomain needs its own entry; `'*.example.com'` matches every subdomain of
|
|
282
|
+
* `example.com` (but not `example.com` itself).
|
|
274
283
|
*
|
|
275
|
-
* @example ['example.com']
|
|
284
|
+
* @example ['example.com', '*.example.com']
|
|
276
285
|
*/
|
|
277
286
|
internalHosts: string[];
|
|
287
|
+
/**
|
|
288
|
+
* Turns the entry an `entry-hyperlink` points at into an href. Return `null` to render the link text without a link.
|
|
289
|
+
* Without it, entry hyperlinks render as text.
|
|
290
|
+
*
|
|
291
|
+
* @example (entry) => (entry.sys.contentType.sys.id === 'page' ? `/${entry.fields.slug}` : null)
|
|
292
|
+
*/
|
|
293
|
+
entryHref: ((entry: ContentfulEntry) => string | null) | null;
|
|
278
294
|
/**
|
|
279
295
|
* Default options for the contentful image api
|
|
280
296
|
*/
|