@ethlete/contentful 4.0.0-next.1 → 4.0.0-next.10
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 +86 -0
- package/README.md +23 -4
- package/fesm2022/ethlete-contentful.mjs +785 -743
- package/fesm2022/ethlete-contentful.mjs.map +1 -1
- package/generators/generators.json +9 -0
- package/generators/migrate-to-contentful-v5/migration-scope.js +41 -0
- package/generators/migrate-to-contentful-v5/migration.js +256 -0
- package/generators/migrate-to-contentful-v5/schema.json +26 -0
- package/migrations.json +12 -0
- package/package.json +19 -13
- package/types/ethlete-contentful.d.ts +78 -226
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Type, InputSignal, InjectionToken, Provider } from '@angular/core';
|
|
3
3
|
import { NgClassType } from '@ethlete/core';
|
|
4
|
-
import
|
|
5
|
-
import { ComponentType } from '@angular/cdk/portal';
|
|
4
|
+
import { GQL } from '@ethlete/query';
|
|
6
5
|
import { Mark, BLOCKS, INLINES, NodeData, Block } from '@contentful/rich-text-types';
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import * as _ethlete_components from '@ethlete/components';
|
|
7
|
+
import { PictureSource } from '@ethlete/components';
|
|
8
|
+
import * as _angular_router from '@angular/router';
|
|
10
9
|
|
|
11
|
-
declare const GQL_FRAGMENT_CONTENTFUL_ASSET:
|
|
10
|
+
declare const GQL_FRAGMENT_CONTENTFUL_ASSET: GQL;
|
|
12
11
|
type ContentfulGqlAsset = {
|
|
13
12
|
sys: {
|
|
14
13
|
id: string;
|
|
@@ -86,111 +85,17 @@ type ContentfulGqlCollectionFilterVariables<TCustomWhere extends Record<string,
|
|
|
86
85
|
locale?: string;
|
|
87
86
|
};
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
readonly INDEX: 3;
|
|
100
|
-
};
|
|
101
|
-
declare const HTML_OPEN_RENDER_COMMAND_POSITION: {
|
|
102
|
-
readonly ATTRIBUTES: 4;
|
|
103
|
-
readonly TAG_NAME: 5;
|
|
104
|
-
readonly ELEMENT_ID: 6;
|
|
105
|
-
};
|
|
106
|
-
declare const HTML_CLOSE_RENDER_COMMAND_POSITION: {
|
|
107
|
-
readonly TAG_NAME: 4;
|
|
108
|
-
readonly ELEMENT_ID: 5;
|
|
109
|
-
};
|
|
110
|
-
declare const TEXT_RENDER_COMMAND_POSITION: {
|
|
111
|
-
readonly ATTRIBUTES: 4;
|
|
112
|
-
readonly TEXT: 5;
|
|
113
|
-
readonly TEXT_ID: 6;
|
|
114
|
-
};
|
|
115
|
-
declare const COMPONENT_RENDER_COMMAND_POSITION: {
|
|
116
|
-
readonly ATTRIBUTES: 4;
|
|
117
|
-
readonly COMPONENT: 5;
|
|
118
|
-
readonly INPUTS: 6;
|
|
119
|
-
readonly COMPONENT_ID: 7;
|
|
120
|
-
};
|
|
121
|
-
type HtmlOpenRenderCommand = [
|
|
122
|
-
type: typeof RENDER_COMMAND_TYPE.HTML_OPEN,
|
|
123
|
-
nestingLevel: number,
|
|
124
|
-
domPosition: number,
|
|
125
|
-
index: number,
|
|
126
|
-
attributes: Record<string, string>,
|
|
127
|
-
tagName: keyof HTMLElementTagNameMap,
|
|
128
|
-
textId: string
|
|
129
|
-
];
|
|
130
|
-
type HtmlCloseRenderCommand = [
|
|
131
|
-
type: typeof RENDER_COMMAND_TYPE.HTML_CLOSE,
|
|
132
|
-
nestingLevel: number,
|
|
133
|
-
domPosition: number,
|
|
134
|
-
index: number,
|
|
135
|
-
tagName: keyof HTMLElementTagNameMap,
|
|
136
|
-
elementId: string
|
|
137
|
-
];
|
|
138
|
-
type TextRenderCommand = [
|
|
139
|
-
type: typeof RENDER_COMMAND_TYPE.TEXT,
|
|
140
|
-
nestingLevel: number,
|
|
141
|
-
domPosition: number,
|
|
142
|
-
index: number,
|
|
143
|
-
attributes: Record<string, string>,
|
|
144
|
-
text: string,
|
|
145
|
-
elementId: string
|
|
146
|
-
];
|
|
147
|
-
type ComponentRenderCommand = [
|
|
148
|
-
type: typeof RENDER_COMMAND_TYPE.COMPONENT,
|
|
149
|
-
nestingLevel: number,
|
|
150
|
-
domPosition: number,
|
|
151
|
-
index: number,
|
|
152
|
-
attributes: Record<string, string>,
|
|
153
|
-
component: ComponentType<unknown>,
|
|
154
|
-
inputs: Record<string, unknown>,
|
|
155
|
-
componentId: string
|
|
156
|
-
];
|
|
157
|
-
type RenderCommand = HtmlOpenRenderCommand | HtmlCloseRenderCommand | TextRenderCommand | ComponentRenderCommand;
|
|
158
|
-
declare const RENDER_INSTRUCTION_POSITION: {
|
|
159
|
-
readonly TYPE: 0;
|
|
160
|
-
readonly COMMAND: 1;
|
|
161
|
-
};
|
|
162
|
-
declare const RENDER_INSTRUCTION_TYPE: {
|
|
163
|
-
readonly CREATE: 0;
|
|
164
|
-
readonly UPDATE: 1;
|
|
165
|
-
readonly DELETE: 2;
|
|
166
|
-
readonly MOVE: 3;
|
|
167
|
-
};
|
|
168
|
-
type RenderInstructionTypeValue = (typeof RENDER_INSTRUCTION_TYPE)[keyof typeof RENDER_INSTRUCTION_TYPE];
|
|
169
|
-
type RenderInstruction = [RenderInstructionTypeValue, RenderCommand];
|
|
88
|
+
type MarkTagName = 'strong' | 'em' | 'u' | 'code' | 's' | 'sub' | 'sup';
|
|
89
|
+
/**
|
|
90
|
+
* Translates contentful text marks into the semantic html elements the marked text is
|
|
91
|
+
* wrapped in, outermost first. Unknown marks are skipped (with a dev-mode warning).
|
|
92
|
+
*/
|
|
93
|
+
declare const marksToTags: (marks: Mark[]) => MarkTagName[];
|
|
94
|
+
/**
|
|
95
|
+
* The classes marked text inside a hyperlink is rendered with, since the link component
|
|
96
|
+
* receives its text as a plain string.
|
|
97
|
+
*/
|
|
170
98
|
declare const marksToClass: (marks: Mark[]) => string;
|
|
171
|
-
declare const isHtmlOpenRenderCommand: (command: RenderCommand) => command is HtmlOpenRenderCommand;
|
|
172
|
-
declare const isHtmlCloseRenderCommand: (command: RenderCommand) => command is HtmlCloseRenderCommand;
|
|
173
|
-
declare const isTextRenderCommand: (command: RenderCommand) => command is TextRenderCommand;
|
|
174
|
-
declare const isComponentRenderCommand: (command: RenderCommand) => command is ComponentRenderCommand;
|
|
175
|
-
declare const getRenderCommandId: (command: RenderCommand) => string;
|
|
176
|
-
type ExecutedCommandCacheItemBase = {
|
|
177
|
-
element: HTMLElement;
|
|
178
|
-
};
|
|
179
|
-
type ExecutedComponentCommandCacheItem = {
|
|
180
|
-
command: ComponentRenderCommand;
|
|
181
|
-
componentRef: ComponentRef<unknown>;
|
|
182
|
-
} & ExecutedCommandCacheItemBase;
|
|
183
|
-
type ExecutedHtmlCommandCacheItem = {
|
|
184
|
-
command: HtmlOpenRenderCommand | HtmlCloseRenderCommand;
|
|
185
|
-
} & ExecutedCommandCacheItemBase;
|
|
186
|
-
type ExecutedTextCommandCacheItem = {
|
|
187
|
-
command: TextRenderCommand;
|
|
188
|
-
textNode: unknown;
|
|
189
|
-
} & ExecutedCommandCacheItemBase;
|
|
190
|
-
type ExecutedCommandCacheItem = ExecutedComponentCommandCacheItem | ExecutedHtmlCommandCacheItem | ExecutedTextCommandCacheItem;
|
|
191
|
-
declare const isExecutedComponentCommandCacheItem: (cache: ExecutedCommandCacheItem) => cache is ExecutedComponentCommandCacheItem;
|
|
192
|
-
declare const isExecutedHtmlOrTextCommandCacheItem: (cache: ExecutedCommandCacheItem) => cache is ExecutedHtmlCommandCacheItem;
|
|
193
|
-
declare const isExecutedTextCommandCacheItem: (cache: ExecutedCommandCacheItem) => cache is ExecutedTextCommandCacheItem;
|
|
194
99
|
declare const ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID = "$$$_et-contentful-any-entry-content-type-sys-id";
|
|
195
100
|
type ContentfulIncludeMap = {
|
|
196
101
|
/**
|
|
@@ -236,49 +141,10 @@ type CreateContentfulIncludeMapConfig = {
|
|
|
236
141
|
*/
|
|
237
142
|
declare const createContentfulIncludeMap: (config: CreateContentfulIncludeMapConfig) => ContentfulIncludeMap;
|
|
238
143
|
declare class ContentfulRichTextRendererComponent {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
toggleClass: (element: HTMLElement, className: string, force?: boolean) => boolean;
|
|
244
|
-
setStyle: (element: HTMLElement, style: Partial<Record<keyof CSSStyleDeclaration, string | null>>, flags?: _angular_core.RendererStyleFlags2) => void;
|
|
245
|
-
removeStyle: (element: HTMLElement, style: keyof CSSStyleDeclaration | string, flags?: _angular_core.RendererStyleFlags2) => void;
|
|
246
|
-
removeStyles: (element: HTMLElement, ...styles: (keyof CSSStyleDeclaration | string)[]) => void;
|
|
247
|
-
setAttribute: (element: HTMLElement, name: string, value: string | null, namespace?: string | null) => void;
|
|
248
|
-
removeAttribute: (element: HTMLElement, ...names: string[]) => void;
|
|
249
|
-
setProperty: (element: HTMLElement, name: string, value: unknown) => void;
|
|
250
|
-
setProperties: (element: HTMLElement, properties: Record<string, unknown>) => void;
|
|
251
|
-
createElement: <K extends keyof HTMLElementTagNameMap>(tagName: K, namespace?: string | null) => HTMLElementTagNameMap[K];
|
|
252
|
-
createText: (value: string) => globalThis.Text;
|
|
253
|
-
createComment: (value: string) => Comment;
|
|
254
|
-
appendChild: (parent: HTMLElement, newChild: Node) => void;
|
|
255
|
-
insertBefore: (parent: Node, newChild: Node, refChild: Node | null) => void;
|
|
256
|
-
removeChild: (parent: Node, oldChild: Node, isHostElement?: boolean) => void;
|
|
257
|
-
selectRootElement: (selectorOrNode: string | HTMLElement, preserveContent?: boolean) => HTMLElement;
|
|
258
|
-
parentNode: (node: Node) => Node | null;
|
|
259
|
-
nextSibling: (node: Node) => Node | null;
|
|
260
|
-
setValue: (node: Node, value: string) => void;
|
|
261
|
-
listen: (target: HTMLElement | Window | Document | "window" | "document" | "body", eventName: string, callback: (event: Event) => boolean | void) => (() => void);
|
|
262
|
-
destroyNode: (node: Node) => void;
|
|
263
|
-
replaceChild: (parent: Node, newChild: Node, oldChild: Node) => void;
|
|
264
|
-
empty: (element: HTMLElement) => void;
|
|
265
|
-
setTextContent: (element: HTMLElement, text: string) => void;
|
|
266
|
-
setInnerHTML: (element: HTMLElement, html: string) => void;
|
|
267
|
-
setAttributes: (element: HTMLElement, attributes: Record<string, string | null>, namespace?: string | null) => void;
|
|
268
|
-
setDataAttributes: (element: HTMLElement, data: Record<string, string | null>) => void;
|
|
269
|
-
setCssProperty: (element: HTMLElement, name: string, value: string | null) => void;
|
|
270
|
-
setCssProperties: (element: HTMLElement, properties: Record<string, string | null>) => void;
|
|
271
|
-
renderer: _angular_core.Renderer2;
|
|
272
|
-
};
|
|
273
|
-
_elementRef: ElementRef<HTMLElement>;
|
|
274
|
-
_document: Document;
|
|
275
|
-
_config: _ethlete_contentful.ContentfulConfig;
|
|
276
|
-
/**
|
|
277
|
-
* A cache for all executed commands that are not deleted.
|
|
278
|
-
* This is used to keep track of all rendered elements and components.
|
|
279
|
-
* The key is the render command element ID.
|
|
280
|
-
*/
|
|
281
|
-
_executedCommandsCache: Map<string, ExecutedCommandCacheItem>;
|
|
144
|
+
private viewContainerRef;
|
|
145
|
+
private renderer;
|
|
146
|
+
private elementRef;
|
|
147
|
+
private config;
|
|
282
148
|
/**
|
|
283
149
|
* The contentful response gotten via their REST api.
|
|
284
150
|
* @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection
|
|
@@ -289,60 +155,51 @@ declare class ContentfulRichTextRendererComponent {
|
|
|
289
155
|
* @example "items[0].fields.html"
|
|
290
156
|
*/
|
|
291
157
|
richTextPath: _angular_core.InputSignal<string>;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* The rich text data that should be rendered.
|
|
299
|
-
*/
|
|
300
|
-
richTextData: _angular_core.Signal<RichTextResponse | null>;
|
|
301
|
-
renderCommands: _angular_core.Signal<RenderCommand[]>;
|
|
302
|
-
renderCommandHistory: _angular_core.Signal<[RenderCommand[], RenderCommand[]]>;
|
|
303
|
-
previousRenderCommandMap: _angular_core.Signal<Map<string | number, RenderCommand>>;
|
|
304
|
-
renderInstructions: _angular_core.Signal<RenderInstruction[]>;
|
|
158
|
+
private readonly executedCommandsCache;
|
|
159
|
+
private contentIncludesMap;
|
|
160
|
+
private richTextData;
|
|
161
|
+
private renderCommands;
|
|
162
|
+
private renderInstructions;
|
|
305
163
|
constructor();
|
|
306
|
-
private
|
|
307
|
-
private
|
|
308
|
-
private
|
|
309
|
-
private
|
|
310
|
-
private
|
|
311
|
-
private
|
|
312
|
-
private
|
|
313
|
-
private
|
|
314
|
-
private
|
|
315
|
-
private
|
|
316
|
-
private _renderInsertOrAppend;
|
|
164
|
+
private createRenderCommands;
|
|
165
|
+
private execInstructions;
|
|
166
|
+
private runCreateInstruction;
|
|
167
|
+
private runUpdateInstruction;
|
|
168
|
+
private runMoveInstruction;
|
|
169
|
+
private runDeleteInstruction;
|
|
170
|
+
private getComponentRootNode;
|
|
171
|
+
private findParent;
|
|
172
|
+
private findFollowingElement;
|
|
173
|
+
private renderInsertOrAppend;
|
|
317
174
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulRichTextRendererComponent, never>;
|
|
318
175
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulRichTextRendererComponent, "et-contentful-rich-text-renderer", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "richTextPath": { "alias": "richTextPath"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
319
176
|
}
|
|
320
177
|
|
|
321
178
|
declare const isRichTextRootNode: (node: unknown) => node is RichTextResponse;
|
|
322
|
-
declare const translateContentfulNodeTypeToHtmlTag: (nodeType: "text" | BLOCKS | INLINES) => "
|
|
179
|
+
declare const translateContentfulNodeTypeToHtmlTag: (nodeType: "text" | BLOCKS | INLINES) => "hr" | "blockquote" | "table" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "ul" | "ol" | "li" | "tr" | "td" | "th" | "div" | "a" | "span";
|
|
323
180
|
|
|
324
181
|
type ContentfulImageResizeBehavior = 'pad' | 'crop' | 'fill' | 'scale' | 'thumb' | 'fit';
|
|
325
182
|
type ContentfulImageFocusArea = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right' | 'face' | 'faces';
|
|
326
|
-
type ComponentLikeWithAsset =
|
|
183
|
+
type ComponentLikeWithAsset = Type<{
|
|
327
184
|
asset: InputSignal<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>;
|
|
328
185
|
}>;
|
|
329
|
-
type ComponentLikeWithLink =
|
|
186
|
+
type ComponentLikeWithLink = Type<{
|
|
330
187
|
href: InputSignal<string>;
|
|
331
188
|
text: InputSignal<string>;
|
|
332
189
|
textClass: InputSignal<string>;
|
|
333
190
|
}>;
|
|
334
|
-
type ComponentLikeWithContentfulRendererInputs =
|
|
191
|
+
type ComponentLikeWithContentfulRendererInputs = Type<{
|
|
335
192
|
fields?: InputSignal<any>;
|
|
336
193
|
includes?: InputSignal<ContentfulIncludeMap>;
|
|
337
194
|
metadata?: InputSignal<ContentfulMetadata>;
|
|
338
195
|
sys?: InputSignal<ContentfulEntrySys>;
|
|
339
196
|
}>;
|
|
340
197
|
type ContentfulAssetComponents = {
|
|
341
|
-
file
|
|
342
|
-
image
|
|
343
|
-
video
|
|
344
|
-
audio
|
|
345
|
-
link
|
|
198
|
+
file?: ComponentLikeWithAsset;
|
|
199
|
+
image?: ComponentLikeWithAsset;
|
|
200
|
+
video?: ComponentLikeWithAsset;
|
|
201
|
+
audio?: ComponentLikeWithAsset;
|
|
202
|
+
link?: ComponentLikeWithLink;
|
|
346
203
|
};
|
|
347
204
|
type ContentfulConfig = {
|
|
348
205
|
/**
|
|
@@ -353,15 +210,11 @@ type ContentfulConfig = {
|
|
|
353
210
|
* Component for rendering embedded entries
|
|
354
211
|
*/
|
|
355
212
|
customComponents: Record<string, ComponentLikeWithContentfulRendererInputs>;
|
|
356
|
-
/**
|
|
357
|
-
* Determines if the contentful rich text renderer should render the contentful rich text with tailwind css classes
|
|
358
|
-
*/
|
|
359
|
-
useTailwindClasses: boolean;
|
|
360
213
|
/**
|
|
361
214
|
* Additional hostnames that should be treated as internal links (in addition to the current page's host).
|
|
362
215
|
* Useful when the app runs on localhost during development but Contentful content references the production domain.
|
|
363
|
-
*
|
|
364
|
-
*
|
|
216
|
+
* A configured hostname also covers its subdomains, so adding "example.com" treats
|
|
217
|
+
* "foo.example.com" as internal without matching unrelated public-suffix siblings.
|
|
365
218
|
*
|
|
366
219
|
* @example ['example.com']
|
|
367
220
|
*/
|
|
@@ -375,7 +228,7 @@ type ContentfulConfig = {
|
|
|
375
228
|
* - `"400"` - 400px width
|
|
376
229
|
* - `"400x300"` - 400px width and 300px height
|
|
377
230
|
* - `"400w"` - 400px width
|
|
378
|
-
* - `"400h"` - 400px height
|
|
231
|
+
* - `"400h"` - 400px height (requires image dimensions to derive a valid width descriptor)
|
|
379
232
|
* - `"400wx300h"` - 400px width and 300px height
|
|
380
233
|
**/
|
|
381
234
|
srcsetSizes: string[];
|
|
@@ -465,9 +318,9 @@ type ContentfulEntry<T = {
|
|
|
465
318
|
metadata: ContentfulMetadata;
|
|
466
319
|
};
|
|
467
320
|
type ContentfulCollection = {
|
|
468
|
-
includes
|
|
469
|
-
Asset
|
|
470
|
-
Entry
|
|
321
|
+
includes?: {
|
|
322
|
+
Asset?: ContentfulRestAsset[];
|
|
323
|
+
Entry?: ContentfulEntry[];
|
|
471
324
|
};
|
|
472
325
|
items: ContentfulEntry[];
|
|
473
326
|
limit: number;
|
|
@@ -488,8 +341,8 @@ declare class ContentfulAudioComponent {
|
|
|
488
341
|
audioClass: _angular_core.InputSignal<NgClassType>;
|
|
489
342
|
figureClass: _angular_core.InputSignal<NgClassType>;
|
|
490
343
|
figcaptionClass: _angular_core.InputSignal<NgClassType>;
|
|
491
|
-
data: _angular_core.Signal<{
|
|
492
|
-
url: string
|
|
344
|
+
protected data: _angular_core.Signal<{
|
|
345
|
+
url: string;
|
|
493
346
|
title: string | null;
|
|
494
347
|
} | null>;
|
|
495
348
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulAudioComponent, never>;
|
|
@@ -499,9 +352,8 @@ declare class ContentfulAudioComponent {
|
|
|
499
352
|
declare class ContentfulFileComponent {
|
|
500
353
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
501
354
|
fileClass: _angular_core.InputSignal<NgClassType>;
|
|
502
|
-
data: _angular_core.Signal<{
|
|
503
|
-
url: string
|
|
504
|
-
contentType: string | null;
|
|
355
|
+
protected data: _angular_core.Signal<{
|
|
356
|
+
url: string;
|
|
505
357
|
size: number | null;
|
|
506
358
|
title: string | null;
|
|
507
359
|
} | null>;
|
|
@@ -510,29 +362,25 @@ declare class ContentfulFileComponent {
|
|
|
510
362
|
}
|
|
511
363
|
|
|
512
364
|
declare class ContentfulImageComponent {
|
|
513
|
-
|
|
365
|
+
private contentfulConfig;
|
|
514
366
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
515
367
|
backgroundColor: _angular_core.InputSignal<string | null>;
|
|
516
368
|
srcsetSizes: _angular_core.InputSignal<string[]>;
|
|
517
369
|
quality: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
518
370
|
focusArea: _angular_core.InputSignal<ContentfulImageFocusArea | null>;
|
|
519
371
|
resizeBehavior: _angular_core.InputSignal<ContentfulImageResizeBehavior | null>;
|
|
520
|
-
|
|
521
|
-
imgClass: _angular_core.InputSignal<NgClassType>;
|
|
522
|
-
figureClass: _angular_core.InputSignal<NgClassType>;
|
|
523
|
-
figcaptionClass: _angular_core.InputSignal<NgClassType>;
|
|
524
|
-
pictureClass: _angular_core.InputSignal<NgClassType>;
|
|
372
|
+
priority: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
525
373
|
sizes: _angular_core.InputSignalWithTransform<string | null, string | string[] | null>;
|
|
526
|
-
normalizedAsset: _angular_core.Signal<{
|
|
374
|
+
protected normalizedAsset: _angular_core.Signal<{
|
|
527
375
|
alt: string | null;
|
|
528
376
|
figcaption: string | null;
|
|
529
377
|
width: number | null;
|
|
530
378
|
height: number | null;
|
|
531
379
|
}>;
|
|
532
|
-
|
|
533
|
-
|
|
380
|
+
protected sourcesValue: _angular_core.Signal<_ethlete_components.PictureSource[]>;
|
|
381
|
+
protected defaultSrcValue: _angular_core.Signal<_ethlete_components.PictureSource | null>;
|
|
534
382
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulImageComponent, never>;
|
|
535
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulImageComponent, "et-contentful-image", never, { "asset": { "alias": "asset"; "required": true; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "srcsetSizes": { "alias": "srcsetSizes"; "required": false; "isSignal": true; }; "quality": { "alias": "quality"; "required": false; "isSignal": true; }; "focusArea": { "alias": "focusArea"; "required": false; "isSignal": true; }; "resizeBehavior": { "alias": "resizeBehavior"; "required": false; "isSignal": true; }; "
|
|
383
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulImageComponent, "et-contentful-image", never, { "asset": { "alias": "asset"; "required": true; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "srcsetSizes": { "alias": "srcsetSizes"; "required": false; "isSignal": true; }; "quality": { "alias": "quality"; "required": false; "isSignal": true; }; "focusArea": { "alias": "focusArea"; "required": false; "isSignal": true; }; "resizeBehavior": { "alias": "resizeBehavior"; "required": false; "isSignal": true; }; "priority": { "alias": "priority"; "required": false; "isSignal": true; }; "sizes": { "alias": "sizes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
536
384
|
}
|
|
537
385
|
|
|
538
386
|
declare const generateDefaultContentfulImageSource: (data: ContentfulRestAsset | ContentfulGqlAsset) => PictureSource;
|
|
@@ -551,15 +399,17 @@ declare const parseContentfulImageSize: (size: string) => {
|
|
|
551
399
|
declare const generateContentfulImageSources: (data: ContentfulRestAsset | ContentfulGqlAsset, srcsetSizes: string[], backgroundColor: string | null, quality: number | null, focusArea: ContentfulImageFocusArea | null, resizeBehavior: ContentfulImageResizeBehavior | null) => PictureSource[];
|
|
552
400
|
|
|
553
401
|
declare class ContentfulLinkComponent {
|
|
554
|
-
private
|
|
555
|
-
private
|
|
402
|
+
private document;
|
|
403
|
+
private router;
|
|
404
|
+
private config;
|
|
556
405
|
href: _angular_core.InputSignal<string>;
|
|
557
406
|
text: _angular_core.InputSignal<string>;
|
|
558
407
|
textClass: _angular_core.InputSignal<string>;
|
|
559
|
-
|
|
560
|
-
openInNewTab: _angular_core.Signal<boolean>;
|
|
561
|
-
internalPath: _angular_core.Signal<string>;
|
|
562
|
-
|
|
408
|
+
protected usesRouterLink: _angular_core.Signal<boolean>;
|
|
409
|
+
protected openInNewTab: _angular_core.Signal<boolean>;
|
|
410
|
+
protected internalPath: _angular_core.Signal<string>;
|
|
411
|
+
protected internalUrlTree: _angular_core.Signal<_angular_router.UrlTree>;
|
|
412
|
+
protected linkClass: _angular_core.Signal<string>;
|
|
563
413
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulLinkComponent, never>;
|
|
564
414
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContentfulLinkComponent, "et-contentful-link", never, { "href": { "alias": "href"; "required": true; "isSignal": true; }; "text": { "alias": "text"; "required": true; "isSignal": true; }; "textClass": { "alias": "textClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
565
415
|
}
|
|
@@ -567,8 +417,8 @@ declare class ContentfulLinkComponent {
|
|
|
567
417
|
declare class ContentfulVideoComponent {
|
|
568
418
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
569
419
|
videoClass: _angular_core.InputSignal<NgClassType>;
|
|
570
|
-
data: _angular_core.Signal<{
|
|
571
|
-
url: string
|
|
420
|
+
protected data: _angular_core.Signal<{
|
|
421
|
+
url: string;
|
|
572
422
|
contentType: string | null;
|
|
573
423
|
} | null>;
|
|
574
424
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulVideoComponent, never>;
|
|
@@ -579,13 +429,15 @@ declare const CONTENTFUL_CONFIG: InjectionToken<ContentfulConfig>;
|
|
|
579
429
|
|
|
580
430
|
declare const ContentfulImports: readonly [typeof ContentfulAudioComponent, typeof ContentfulFileComponent, typeof ContentfulImageComponent, typeof ContentfulVideoComponent, typeof ContentfulRichTextRendererComponent];
|
|
581
431
|
|
|
582
|
-
declare const createContentfulConfig: (config?: Partial<ContentfulConfig> | null
|
|
432
|
+
declare const createContentfulConfig: (config?: Partial<ContentfulConfig> | null) => ContentfulConfig;
|
|
433
|
+
/**
|
|
434
|
+
* Reads the contentful config from the current injector. Falls back to a config without
|
|
435
|
+
* any `components` when none was provided via `provideContentfulConfig()`.
|
|
436
|
+
*/
|
|
437
|
+
declare const injectContentfulConfig: () => ContentfulConfig;
|
|
583
438
|
|
|
584
|
-
declare const provideContentfulConfig: (contentfulConfig?: Partial<ContentfulConfig> | null
|
|
585
|
-
provide: _angular_core.InjectionToken<ContentfulConfig>;
|
|
586
|
-
useValue: ContentfulConfig;
|
|
587
|
-
};
|
|
439
|
+
declare const provideContentfulConfig: (contentfulConfig?: Partial<ContentfulConfig> | null) => Provider;
|
|
588
440
|
declare const isContentfulEntryType: <T extends ContentfulEntry>(entry: ContentfulEntry, type: string) => entry is T;
|
|
589
441
|
|
|
590
|
-
export {
|
|
442
|
+
export { CONTENTFUL_CONFIG, ContentfulAudioComponent, ContentfulFileComponent, ContentfulImageComponent, ContentfulImports, ContentfulLinkComponent, ContentfulRichTextRendererComponent, ContentfulVideoComponent, ET_CONTENTFUL_ANY_ENTRY_CONTENT_TYPE_SYS_ID, GQL_FRAGMENT_CONTENTFUL_ASSET, createContentfulConfig, createContentfulIncludeMap, generateContentfulImageSources, generateDefaultContentfulImageSource, injectContentfulConfig, isContentfulEntryType, isContentfulGqlAsset, isRichTextRootNode, marksToClass, marksToTags, parseContentfulImageSize, provideContentfulConfig, translateContentfulNodeTypeToHtmlTag };
|
|
591
443
|
export type { ComponentLikeWithAsset, ComponentLikeWithContentfulRendererInputs, ComponentLikeWithLink, ContentfulAssetComponents, ContentfulAssetFileData, ContentfulAssetImageData, ContentfulAssetLink, ContentfulAssetLinkItem, ContentfulCollection, ContentfulConfig, ContentfulContentTypeLink, ContentfulEntry, ContentfulEntryLink, ContentfulEntryLinkItem, ContentfulEntrySys, ContentfulEnvironmentLink, ContentfulGqlAsset, ContentfulGqlCollectionFilterVariables, ContentfulGqlOrder, ContentfulGqlWhereFilter, ContentfulImageFocusArea, ContentfulImageResizeBehavior, ContentfulIncludeMap, ContentfulLink, ContentfulLinkType, ContentfulMetadata, ContentfulRestAsset, ContentfulSpaceLink, ContentfulSys, ContentfulTagLink, ContentfulTagLinkItem, CreateContentfulIncludeMapConfig, RichTextResponse };
|