@ethlete/contentful 4.0.0-next.6 → 4.0.0-next.8
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 +37 -0
- package/README.md +23 -4
- package/fesm2022/ethlete-contentful.mjs +734 -723
- 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/package.json +12 -10
- package/types/ethlete-contentful.d.ts +78 -231
|
@@ -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,54 +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
|
-
moveBefore: (config: {
|
|
272
|
-
newParent: HTMLElement;
|
|
273
|
-
child: HTMLElement;
|
|
274
|
-
before?: Node | null;
|
|
275
|
-
}) => void;
|
|
276
|
-
renderer: _angular_core.Renderer2;
|
|
277
|
-
};
|
|
278
|
-
_elementRef: ElementRef<HTMLElement>;
|
|
279
|
-
_document: Document;
|
|
280
|
-
_config: _ethlete_contentful.ContentfulConfig;
|
|
281
|
-
/**
|
|
282
|
-
* A cache for all executed commands that are not deleted.
|
|
283
|
-
* This is used to keep track of all rendered elements and components.
|
|
284
|
-
* The key is the render command element ID.
|
|
285
|
-
*/
|
|
286
|
-
_executedCommandsCache: Map<string, ExecutedCommandCacheItem>;
|
|
144
|
+
private viewContainerRef;
|
|
145
|
+
private renderer;
|
|
146
|
+
private elementRef;
|
|
147
|
+
private config;
|
|
287
148
|
/**
|
|
288
149
|
* The contentful response gotten via their REST api.
|
|
289
150
|
* @see https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection
|
|
@@ -294,60 +155,51 @@ declare class ContentfulRichTextRendererComponent {
|
|
|
294
155
|
* @example "items[0].fields.html"
|
|
295
156
|
*/
|
|
296
157
|
richTextPath: _angular_core.InputSignal<string>;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* The rich text data that should be rendered.
|
|
304
|
-
*/
|
|
305
|
-
richTextData: _angular_core.Signal<RichTextResponse | null>;
|
|
306
|
-
renderCommands: _angular_core.Signal<RenderCommand[]>;
|
|
307
|
-
renderCommandHistory: _angular_core.Signal<[RenderCommand[], RenderCommand[]]>;
|
|
308
|
-
previousRenderCommandMap: _angular_core.Signal<Map<string | number, RenderCommand>>;
|
|
309
|
-
renderInstructions: _angular_core.Signal<RenderInstruction[]>;
|
|
158
|
+
private readonly executedCommandsCache;
|
|
159
|
+
private contentIncludesMap;
|
|
160
|
+
private richTextData;
|
|
161
|
+
private renderCommands;
|
|
162
|
+
private renderInstructions;
|
|
310
163
|
constructor();
|
|
311
|
-
private
|
|
312
|
-
private
|
|
313
|
-
private
|
|
314
|
-
private
|
|
315
|
-
private
|
|
316
|
-
private
|
|
317
|
-
private
|
|
318
|
-
private
|
|
319
|
-
private
|
|
320
|
-
private
|
|
321
|
-
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;
|
|
322
174
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulRichTextRendererComponent, never>;
|
|
323
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>;
|
|
324
176
|
}
|
|
325
177
|
|
|
326
178
|
declare const isRichTextRootNode: (node: unknown) => node is RichTextResponse;
|
|
327
|
-
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";
|
|
328
180
|
|
|
329
181
|
type ContentfulImageResizeBehavior = 'pad' | 'crop' | 'fill' | 'scale' | 'thumb' | 'fit';
|
|
330
182
|
type ContentfulImageFocusArea = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right' | 'face' | 'faces';
|
|
331
|
-
type ComponentLikeWithAsset =
|
|
183
|
+
type ComponentLikeWithAsset = Type<{
|
|
332
184
|
asset: InputSignal<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>;
|
|
333
185
|
}>;
|
|
334
|
-
type ComponentLikeWithLink =
|
|
186
|
+
type ComponentLikeWithLink = Type<{
|
|
335
187
|
href: InputSignal<string>;
|
|
336
188
|
text: InputSignal<string>;
|
|
337
189
|
textClass: InputSignal<string>;
|
|
338
190
|
}>;
|
|
339
|
-
type ComponentLikeWithContentfulRendererInputs =
|
|
191
|
+
type ComponentLikeWithContentfulRendererInputs = Type<{
|
|
340
192
|
fields?: InputSignal<any>;
|
|
341
193
|
includes?: InputSignal<ContentfulIncludeMap>;
|
|
342
194
|
metadata?: InputSignal<ContentfulMetadata>;
|
|
343
195
|
sys?: InputSignal<ContentfulEntrySys>;
|
|
344
196
|
}>;
|
|
345
197
|
type ContentfulAssetComponents = {
|
|
346
|
-
file
|
|
347
|
-
image
|
|
348
|
-
video
|
|
349
|
-
audio
|
|
350
|
-
link
|
|
198
|
+
file?: ComponentLikeWithAsset;
|
|
199
|
+
image?: ComponentLikeWithAsset;
|
|
200
|
+
video?: ComponentLikeWithAsset;
|
|
201
|
+
audio?: ComponentLikeWithAsset;
|
|
202
|
+
link?: ComponentLikeWithLink;
|
|
351
203
|
};
|
|
352
204
|
type ContentfulConfig = {
|
|
353
205
|
/**
|
|
@@ -358,15 +210,11 @@ type ContentfulConfig = {
|
|
|
358
210
|
* Component for rendering embedded entries
|
|
359
211
|
*/
|
|
360
212
|
customComponents: Record<string, ComponentLikeWithContentfulRendererInputs>;
|
|
361
|
-
/**
|
|
362
|
-
* Determines if the contentful rich text renderer should render the contentful rich text with tailwind css classes
|
|
363
|
-
*/
|
|
364
|
-
useTailwindClasses: boolean;
|
|
365
213
|
/**
|
|
366
214
|
* Additional hostnames that should be treated as internal links (in addition to the current page's host).
|
|
367
215
|
* Useful when the app runs on localhost during development but Contentful content references the production domain.
|
|
368
|
-
*
|
|
369
|
-
*
|
|
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.
|
|
370
218
|
*
|
|
371
219
|
* @example ['example.com']
|
|
372
220
|
*/
|
|
@@ -380,7 +228,7 @@ type ContentfulConfig = {
|
|
|
380
228
|
* - `"400"` - 400px width
|
|
381
229
|
* - `"400x300"` - 400px width and 300px height
|
|
382
230
|
* - `"400w"` - 400px width
|
|
383
|
-
* - `"400h"` - 400px height
|
|
231
|
+
* - `"400h"` - 400px height (requires image dimensions to derive a valid width descriptor)
|
|
384
232
|
* - `"400wx300h"` - 400px width and 300px height
|
|
385
233
|
**/
|
|
386
234
|
srcsetSizes: string[];
|
|
@@ -470,9 +318,9 @@ type ContentfulEntry<T = {
|
|
|
470
318
|
metadata: ContentfulMetadata;
|
|
471
319
|
};
|
|
472
320
|
type ContentfulCollection = {
|
|
473
|
-
includes
|
|
474
|
-
Asset
|
|
475
|
-
Entry
|
|
321
|
+
includes?: {
|
|
322
|
+
Asset?: ContentfulRestAsset[];
|
|
323
|
+
Entry?: ContentfulEntry[];
|
|
476
324
|
};
|
|
477
325
|
items: ContentfulEntry[];
|
|
478
326
|
limit: number;
|
|
@@ -493,8 +341,8 @@ declare class ContentfulAudioComponent {
|
|
|
493
341
|
audioClass: _angular_core.InputSignal<NgClassType>;
|
|
494
342
|
figureClass: _angular_core.InputSignal<NgClassType>;
|
|
495
343
|
figcaptionClass: _angular_core.InputSignal<NgClassType>;
|
|
496
|
-
data: _angular_core.Signal<{
|
|
497
|
-
url: string
|
|
344
|
+
protected data: _angular_core.Signal<{
|
|
345
|
+
url: string;
|
|
498
346
|
title: string | null;
|
|
499
347
|
} | null>;
|
|
500
348
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulAudioComponent, never>;
|
|
@@ -504,9 +352,8 @@ declare class ContentfulAudioComponent {
|
|
|
504
352
|
declare class ContentfulFileComponent {
|
|
505
353
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
506
354
|
fileClass: _angular_core.InputSignal<NgClassType>;
|
|
507
|
-
data: _angular_core.Signal<{
|
|
508
|
-
url: string
|
|
509
|
-
contentType: string | null;
|
|
355
|
+
protected data: _angular_core.Signal<{
|
|
356
|
+
url: string;
|
|
510
357
|
size: number | null;
|
|
511
358
|
title: string | null;
|
|
512
359
|
} | null>;
|
|
@@ -515,29 +362,25 @@ declare class ContentfulFileComponent {
|
|
|
515
362
|
}
|
|
516
363
|
|
|
517
364
|
declare class ContentfulImageComponent {
|
|
518
|
-
|
|
365
|
+
private contentfulConfig;
|
|
519
366
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
520
367
|
backgroundColor: _angular_core.InputSignal<string | null>;
|
|
521
368
|
srcsetSizes: _angular_core.InputSignal<string[]>;
|
|
522
369
|
quality: _angular_core.InputSignalWithTransform<number | null, unknown>;
|
|
523
370
|
focusArea: _angular_core.InputSignal<ContentfulImageFocusArea | null>;
|
|
524
371
|
resizeBehavior: _angular_core.InputSignal<ContentfulImageResizeBehavior | null>;
|
|
525
|
-
|
|
526
|
-
imgClass: _angular_core.InputSignal<NgClassType>;
|
|
527
|
-
figureClass: _angular_core.InputSignal<NgClassType>;
|
|
528
|
-
figcaptionClass: _angular_core.InputSignal<NgClassType>;
|
|
529
|
-
pictureClass: _angular_core.InputSignal<NgClassType>;
|
|
372
|
+
priority: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
530
373
|
sizes: _angular_core.InputSignalWithTransform<string | null, string | string[] | null>;
|
|
531
|
-
normalizedAsset: _angular_core.Signal<{
|
|
374
|
+
protected normalizedAsset: _angular_core.Signal<{
|
|
532
375
|
alt: string | null;
|
|
533
376
|
figcaption: string | null;
|
|
534
377
|
width: number | null;
|
|
535
378
|
height: number | null;
|
|
536
379
|
}>;
|
|
537
|
-
|
|
538
|
-
|
|
380
|
+
protected sourcesValue: _angular_core.Signal<_ethlete_components.PictureSource[]>;
|
|
381
|
+
protected defaultSrcValue: _angular_core.Signal<_ethlete_components.PictureSource | null>;
|
|
539
382
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulImageComponent, never>;
|
|
540
|
-
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>;
|
|
541
384
|
}
|
|
542
385
|
|
|
543
386
|
declare const generateDefaultContentfulImageSource: (data: ContentfulRestAsset | ContentfulGqlAsset) => PictureSource;
|
|
@@ -556,15 +399,17 @@ declare const parseContentfulImageSize: (size: string) => {
|
|
|
556
399
|
declare const generateContentfulImageSources: (data: ContentfulRestAsset | ContentfulGqlAsset, srcsetSizes: string[], backgroundColor: string | null, quality: number | null, focusArea: ContentfulImageFocusArea | null, resizeBehavior: ContentfulImageResizeBehavior | null) => PictureSource[];
|
|
557
400
|
|
|
558
401
|
declare class ContentfulLinkComponent {
|
|
559
|
-
private
|
|
560
|
-
private
|
|
402
|
+
private document;
|
|
403
|
+
private router;
|
|
404
|
+
private config;
|
|
561
405
|
href: _angular_core.InputSignal<string>;
|
|
562
406
|
text: _angular_core.InputSignal<string>;
|
|
563
407
|
textClass: _angular_core.InputSignal<string>;
|
|
564
|
-
|
|
565
|
-
openInNewTab: _angular_core.Signal<boolean>;
|
|
566
|
-
internalPath: _angular_core.Signal<string>;
|
|
567
|
-
|
|
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>;
|
|
568
413
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulLinkComponent, never>;
|
|
569
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>;
|
|
570
415
|
}
|
|
@@ -572,8 +417,8 @@ declare class ContentfulLinkComponent {
|
|
|
572
417
|
declare class ContentfulVideoComponent {
|
|
573
418
|
asset: _angular_core.InputSignal<ContentfulGqlAsset | ContentfulRestAsset | null | undefined>;
|
|
574
419
|
videoClass: _angular_core.InputSignal<NgClassType>;
|
|
575
|
-
data: _angular_core.Signal<{
|
|
576
|
-
url: string
|
|
420
|
+
protected data: _angular_core.Signal<{
|
|
421
|
+
url: string;
|
|
577
422
|
contentType: string | null;
|
|
578
423
|
} | null>;
|
|
579
424
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContentfulVideoComponent, never>;
|
|
@@ -584,13 +429,15 @@ declare const CONTENTFUL_CONFIG: InjectionToken<ContentfulConfig>;
|
|
|
584
429
|
|
|
585
430
|
declare const ContentfulImports: readonly [typeof ContentfulAudioComponent, typeof ContentfulFileComponent, typeof ContentfulImageComponent, typeof ContentfulVideoComponent, typeof ContentfulRichTextRendererComponent];
|
|
586
431
|
|
|
587
|
-
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;
|
|
588
438
|
|
|
589
|
-
declare const provideContentfulConfig: (contentfulConfig?: Partial<ContentfulConfig> | null
|
|
590
|
-
provide: _angular_core.InjectionToken<ContentfulConfig>;
|
|
591
|
-
useValue: ContentfulConfig;
|
|
592
|
-
};
|
|
439
|
+
declare const provideContentfulConfig: (contentfulConfig?: Partial<ContentfulConfig> | null) => Provider;
|
|
593
440
|
declare const isContentfulEntryType: <T extends ContentfulEntry>(entry: ContentfulEntry, type: string) => entry is T;
|
|
594
441
|
|
|
595
|
-
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 };
|
|
596
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 };
|