@ethlete/contentful 3.5.0 → 3.6.1
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 +13 -4
- package/esm2022/lib/components/audio/contentful-audio.component.mjs +3 -3
- package/esm2022/lib/components/file/contentful-file.component.mjs +3 -3
- package/esm2022/lib/components/image/contentful-image.component.mjs +4 -4
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.component.mjs +6 -51
- package/esm2022/lib/components/video/contentful-video.component.mjs +3 -3
- package/esm2022/lib/gql/asset.fragments.mjs +1 -1
- package/esm2022/lib/types/contentful.types.mjs +1 -1
- package/fesm2022/ethlete-contentful.mjs +18 -63
- package/fesm2022/ethlete-contentful.mjs.map +1 -1
- package/lib/components/rich-text-renderer/rich-text-renderer.component.d.ts +1 -4
- package/lib/gql/asset.fragments.d.ts +63 -0
- package/lib/types/contentful.types.d.ts +2 -3
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudGZ1bC50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGVudGZ1bC9zcmMvbGliL3R5cGVzL2NvbnRlbnRmdWwudHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudFR5cGUgfSBmcm9tICdAYW5ndWxhci9jZGsvcG9ydGFsJztcbmltcG9ydCB7IElucHV0U2lnbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBCbG9jaywgTm9kZURhdGEgfSBmcm9tICdAY29udGVudGZ1bC9yaWNoLXRleHQtdHlwZXMnO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AdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG5leHBvcnQgaW50ZXJmYWNlIENvbnRlbnRmdWxFbnRyeTxUID0geyBba2V5OiBzdHJpbmddOiBhbnkgfT4ge1xuICBzeXM6IENvbnRlbnRmdWxFbnRyeVN5cztcbiAgZmllbGRzOiBUO1xuICBtZXRhZGF0YTogQ29udGVudGZ1bE1ldGFkYXRhO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIENvbnRlbnRmdWxDb2xsZWN0aW9uIHtcbiAgaW5jbHVkZXM6IHtcbiAgICBBc3NldDogQ29udGVudGZ1bFJlc3RBc3NldFtdO1xuICAgIEVudHJ5OiBDb250ZW50ZnVsRW50cnlbXTtcbiAgfTtcbiAgaXRlbXM6IENvbnRlbnRmdWxFbnRyeVtdO1xuICBsaW1pdDogbnVtYmVyO1xuICBza2lwOiBudW1iZXI7XG4gIHRvdGFsOiBudW1iZXI7XG4gIHN5czoge1xuICAgIHR5cGU6ICdBcnJheSc7XG4gIH07XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgUmljaFRleHRSZXNwb25zZSB7XG4gIG5vZGVUeXBlOiAnZG9jdW1lbnQnO1xuICBkYXRhOiBOb2RlRGF0YTtcbiAgY29udGVudDogQmxvY2tbXTtcbn1cbiJdfQ==
|
|
@@ -50,8 +50,8 @@ class ContentfulAudioComponent {
|
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
54
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
53
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: ContentfulAudioComponent, isStandalone: true, selector: "et-contentful-audio", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, audioClass: { classPropertyName: "audioClass", publicName: "audioClass", isSignal: true, isRequired: false, transformFunction: null }, figureClass: { classPropertyName: "figureClass", publicName: "figureClass", isSignal: true, isRequired: false, transformFunction: null }, figcaptionClass: { classPropertyName: "figcaptionClass", publicName: "figcaptionClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
55
55
|
@if (data(); as data) {
|
|
56
56
|
<figure [ngClass]="figureClass()">
|
|
57
57
|
<figcaption [ngClass]="figcaptionClass()">{{ data.title }}</figcaption>
|
|
@@ -60,7 +60,7 @@ class ContentfulAudioComponent {
|
|
|
60
60
|
}
|
|
61
61
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulAudioComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
65
|
args: [{
|
|
66
66
|
selector: 'et-contentful-audio',
|
|
@@ -104,8 +104,8 @@ class ContentfulFileComponent {
|
|
|
104
104
|
};
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: ContentfulFileComponent, isStandalone: true, selector: "et-contentful-file", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, fileClass: { classPropertyName: "fileClass", publicName: "fileClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
109
109
|
@if (data(); as data) {
|
|
110
110
|
<a [href]="data.url" [ngClass]="fileClass()" class="underline" target="_blank">
|
|
111
111
|
{{ data.title }} ({{ data.size }} Bytes)
|
|
@@ -113,7 +113,7 @@ class ContentfulFileComponent {
|
|
|
113
113
|
}
|
|
114
114
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
115
115
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulFileComponent, decorators: [{
|
|
117
117
|
type: Component,
|
|
118
118
|
args: [{
|
|
119
119
|
selector: 'et-contentful-file',
|
|
@@ -273,8 +273,8 @@ class ContentfulImageComponent {
|
|
|
273
273
|
return asset ? generateDefaultContentfulImageSource(asset) : null;
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
277
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.9", type: ContentfulImageComponent, isStandalone: true, selector: "et-contentful-image", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, srcsetSizes: { classPropertyName: "srcsetSizes", publicName: "srcsetSizes", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, focusArea: { classPropertyName: "focusArea", publicName: "focusArea", isSignal: true, isRequired: false, transformFunction: null }, resizeBehavior: { classPropertyName: "resizeBehavior", publicName: "resizeBehavior", isSignal: true, isRequired: false, transformFunction: null }, hasPriority: { classPropertyName: "hasPriority", publicName: "hasPriority", isSignal: true, isRequired: false, transformFunction: null }, imgClass: { classPropertyName: "imgClass", publicName: "imgClass", isSignal: true, isRequired: false, transformFunction: null }, figureClass: { classPropertyName: "figureClass", publicName: "figureClass", isSignal: true, isRequired: false, transformFunction: null }, figcaptionClass: { classPropertyName: "figcaptionClass", publicName: "figcaptionClass", isSignal: true, isRequired: false, transformFunction: null }, pictureClass: { classPropertyName: "pictureClass", publicName: "pictureClass", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-contentful-image" }, ngImport: i0, template: `
|
|
278
278
|
<et-picture
|
|
279
279
|
[imgClass]="imgClass()"
|
|
280
280
|
[hasPriority]="hasPriority()"
|
|
@@ -289,9 +289,9 @@ class ContentfulImageComponent {
|
|
|
289
289
|
[sizes]="sizes()"
|
|
290
290
|
[sources]="_sources()"
|
|
291
291
|
/>
|
|
292
|
-
`, isInline: true, dependencies: [{ kind: "component", type: PictureComponent, selector: "et-picture", inputs: ["sources", "hasPriority", "imgClass", "figureClass", "figcaptionClass", "pictureClass", "defaultSrc", "alt", "figcaption", "width", "height", "sizes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
292
|
+
`, isInline: true, dependencies: [{ kind: "component", type: PictureComponent, selector: "et-picture", inputs: ["sources", "hasPriority", "imgClass", "figureClass", "figcaptionClass", "pictureClass", "defaultSrc", "alt", "figcaption", "width", "height", "sizes"], outputs: ["imgLoaded", "imgError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
293
293
|
}
|
|
294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulImageComponent, decorators: [{
|
|
295
295
|
type: Component,
|
|
296
296
|
args: [{
|
|
297
297
|
selector: 'et-contentful-image',
|
|
@@ -342,8 +342,8 @@ class ContentfulVideoComponent {
|
|
|
342
342
|
};
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.
|
|
346
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.
|
|
345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulVideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
346
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.9", type: ContentfulVideoComponent, isStandalone: true, selector: "et-contentful-video", inputs: { asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: true, transformFunction: null }, videoClass: { classPropertyName: "videoClass", publicName: "videoClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
347
347
|
@if (data(); as data) {
|
|
348
348
|
<video [ngClass]="videoClass()" controls>
|
|
349
349
|
<source src="{{ data.url }}" type="{{ data.contentType }}" />
|
|
@@ -351,7 +351,7 @@ class ContentfulVideoComponent {
|
|
|
351
351
|
}
|
|
352
352
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
353
353
|
}
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulVideoComponent, decorators: [{
|
|
355
355
|
type: Component,
|
|
356
356
|
args: [{
|
|
357
357
|
selector: 'et-contentful-video',
|
|
@@ -640,7 +640,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
640
640
|
this.content = input.required();
|
|
641
641
|
/**
|
|
642
642
|
* The path to where the rich text field is inside the contentful response. Dot and array notation is allowed.
|
|
643
|
-
* @
|
|
643
|
+
* @example "items[0].fields.html"
|
|
644
644
|
*/
|
|
645
645
|
this.richTextPath = input.required();
|
|
646
646
|
/**
|
|
@@ -1133,7 +1133,7 @@ class ContentfulRichTextRendererComponent {
|
|
|
1133
1133
|
const domPosition = command[RENDER_COMMAND_POSITION.DOM_POSITION];
|
|
1134
1134
|
const nestingLevel = command[RENDER_COMMAND_POSITION.NESTING_LEVEL];
|
|
1135
1135
|
const type = command[RENDER_COMMAND_POSITION.TYPE];
|
|
1136
|
-
//
|
|
1136
|
+
// Try to find an already rendered element with a domPosition that is greater than the current domPosition. If there are multiple, use the one with the smallest domPosition.
|
|
1137
1137
|
// If it does not exist, use .appendChild to simply append the element to the end of the parent element.
|
|
1138
1138
|
// If it does exist, use .insertBefore to insert the element before the found element.
|
|
1139
1139
|
for (const cached of cacheArray) {
|
|
@@ -1155,41 +1155,10 @@ class ContentfulRichTextRendererComponent {
|
|
|
1155
1155
|
this._renderer.appendChild(parentElement, nodeToRender);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
const prettified = formatHTML(debug);
|
|
1161
|
-
return prettified;
|
|
1162
|
-
}
|
|
1163
|
-
_stringifyRenderCommand(command) {
|
|
1164
|
-
const nestAttr = `nest="${command[RENDER_COMMAND_POSITION.NESTING_LEVEL]}"`;
|
|
1165
|
-
const domAttr = `dom="${command[RENDER_COMMAND_POSITION.DOM_POSITION]}"`;
|
|
1166
|
-
if (isHtmlOpenRenderCommand(command)) {
|
|
1167
|
-
return `<${command[HTML_OPEN_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr}>`;
|
|
1168
|
-
}
|
|
1169
|
-
else if (isHtmlCloseRenderCommand(command)) {
|
|
1170
|
-
return `</${command[HTML_CLOSE_RENDER_COMMAND_POSITION.TAG_NAME]} ${nestAttr} ${domAttr}>`;
|
|
1171
|
-
}
|
|
1172
|
-
else if (isTextRenderCommand(command)) {
|
|
1173
|
-
return [`<span ${nestAttr} ${domAttr}>`, command[TEXT_RENDER_COMMAND_POSITION.TEXT], '</span>'];
|
|
1174
|
-
}
|
|
1175
|
-
else if (isComponentRenderCommand(command)) {
|
|
1176
|
-
const selector = command[COMPONENT_RENDER_COMMAND_POSITION.COMPONENT_TYPE];
|
|
1177
|
-
return [`<${selector} ${nestAttr} ${domAttr}>`, `</${selector}>`];
|
|
1178
|
-
}
|
|
1179
|
-
else {
|
|
1180
|
-
return 'UNKNOWN';
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
_stringifyRenderInstruction(instruction) {
|
|
1184
|
-
const type = instruction[RENDER_INSTRUCTION_POSITION.TYPE];
|
|
1185
|
-
const translatedType = Object.entries(RENDER_INSTRUCTION_TYPE).find(([, value]) => value === type)?.[0];
|
|
1186
|
-
const command = this._stringifyRenderCommand(instruction[RENDER_INSTRUCTION_POSITION.COMMAND]);
|
|
1187
|
-
return `${translatedType}: ${command}`;
|
|
1188
|
-
}
|
|
1189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: ContentfulRichTextRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.6", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, richTextPath: { classPropertyName: "richTextPath", publicName: "richTextPath", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1158
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulRichTextRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.9", type: ContentfulRichTextRendererComponent, isStandalone: true, selector: "et-contentful-rich-text-renderer", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, richTextPath: { classPropertyName: "richTextPath", publicName: "richTextPath", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-contentful-rich-text-renderer" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1191
1160
|
}
|
|
1192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.
|
|
1161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.9", ngImport: i0, type: ContentfulRichTextRendererComponent, decorators: [{
|
|
1193
1162
|
type: Component,
|
|
1194
1163
|
args: [{
|
|
1195
1164
|
selector: 'et-contentful-rich-text-renderer',
|
|
@@ -1202,20 +1171,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImpor
|
|
|
1202
1171
|
},
|
|
1203
1172
|
}]
|
|
1204
1173
|
}], ctorParameters: () => [] });
|
|
1205
|
-
function formatHTML(html) {
|
|
1206
|
-
const result = [];
|
|
1207
|
-
let indent = 0;
|
|
1208
|
-
for (const tag of html) {
|
|
1209
|
-
if (tag.startsWith('</')) {
|
|
1210
|
-
indent--;
|
|
1211
|
-
}
|
|
1212
|
-
result.push(' '.repeat(indent * 2) + tag);
|
|
1213
|
-
if (tag.startsWith('<') && !tag.startsWith('</')) {
|
|
1214
|
-
indent++;
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
return result.join('\n');
|
|
1218
|
-
}
|
|
1219
1174
|
|
|
1220
1175
|
const ContentfulImports = [
|
|
1221
1176
|
ContentfulAudioComponent,
|