@ethlete/contentful 3.2.1 → 3.4.0
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 +14 -0
- package/esm2022/lib/components/audio/contentful-audio.component.mjs +28 -11
- package/esm2022/lib/components/file/contentful-file.component.mjs +32 -11
- package/esm2022/lib/components/image/contentful-image.component.mjs +32 -12
- package/esm2022/lib/components/image/contentful-image.component.utils.mjs +11 -5
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.component.mjs +56 -49
- package/esm2022/lib/components/video/contentful-video.component.mjs +26 -9
- package/esm2022/lib/gql/asset.fragments.mjs +5 -1
- package/esm2022/lib/types/contentful.types.mjs +1 -1
- package/fesm2022/ethlete-contentful.mjs +193 -106
- package/fesm2022/ethlete-contentful.mjs.map +1 -1
- package/lib/components/audio/contentful-audio.component.d.ts +7 -2
- package/lib/components/file/contentful-file.component.d.ts +9 -2
- package/lib/components/image/contentful-image.component.d.ts +9 -2
- package/lib/components/image/contentful-image.component.utils.d.ts +4 -3
- package/lib/components/rich-text-renderer/rich-text-renderer.component.d.ts +13 -3
- package/lib/components/video/contentful-video.component.d.ts +7 -2
- package/lib/gql/asset.fragments.d.ts +1 -0
- package/lib/types/contentful.types.d.ts +4 -3
- package/package.json +4 -4
|
@@ -2,10 +2,11 @@ import { ComponentType } from '@angular/cdk/portal';
|
|
|
2
2
|
import { InputSignal } from '@angular/core';
|
|
3
3
|
import { Block, NodeData } from '@contentful/rich-text-types';
|
|
4
4
|
import { ContentfulIncludeMap } from '../components/rich-text-renderer';
|
|
5
|
+
import { ContentfulGqlAsset } from '../gql';
|
|
5
6
|
export type ContentfulImageResizeBehavior = 'pad' | 'crop' | 'fill' | 'scale' | 'thumb' | 'fit';
|
|
6
7
|
export type ContentfulImageFocusArea = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right' | 'face' | 'faces';
|
|
7
8
|
type ComponentLikeWithAsset = ComponentType<{
|
|
8
|
-
asset: InputSignal<
|
|
9
|
+
asset: InputSignal<ContentfulRestAsset | ContentfulGqlAsset | null | undefined>;
|
|
9
10
|
}>;
|
|
10
11
|
type ComponentLikeWithContentfulRendererInputs = ComponentType<{
|
|
11
12
|
fields?: InputSignal<any>;
|
|
@@ -112,7 +113,7 @@ export interface ContentfulAssetFileData {
|
|
|
112
113
|
fileName: string;
|
|
113
114
|
contentType: string;
|
|
114
115
|
}
|
|
115
|
-
export interface
|
|
116
|
+
export interface ContentfulRestAsset {
|
|
116
117
|
sys: ContentfulSys;
|
|
117
118
|
fields: {
|
|
118
119
|
title: string;
|
|
@@ -130,7 +131,7 @@ export interface ContentfulEntry<T = {
|
|
|
130
131
|
}
|
|
131
132
|
export interface ContentfulCollection {
|
|
132
133
|
includes: {
|
|
133
|
-
Asset:
|
|
134
|
+
Asset: ContentfulRestAsset[];
|
|
134
135
|
Entry: ContentfulEntry[];
|
|
135
136
|
};
|
|
136
137
|
items: ContentfulEntry[];
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/contentful",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/cdk": "17.3.
|
|
6
|
-
"@angular/common": "17.3.
|
|
7
|
-
"@angular/core": "17.3.
|
|
5
|
+
"@angular/cdk": "17.3.5",
|
|
6
|
+
"@angular/common": "17.3.5",
|
|
7
|
+
"@angular/core": "17.3.5",
|
|
8
8
|
"@contentful/rich-text-types": "^16.3.0",
|
|
9
9
|
"@ethlete/cdk": "^4.0.3",
|
|
10
10
|
"@ethlete/core": "^4.0.3",
|