@ethlete/contentful 2.1.1 → 3.0.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 +235 -0
- package/esm2022/index.mjs +12 -2
- package/esm2022/lib/components/audio/contentful-audio.component.mjs +18 -47
- package/esm2022/lib/components/audio/index.mjs +2 -0
- package/esm2022/lib/components/file/contentful-file.component.mjs +14 -36
- package/esm2022/lib/components/file/index.mjs +2 -0
- package/esm2022/lib/components/image/contentful-image.component.mjs +64 -113
- package/esm2022/lib/components/image/contentful-image.component.utils.mjs +15 -19
- package/esm2022/lib/components/image/index.mjs +3 -2
- package/esm2022/lib/components/rich-text-renderer/index.mjs +3 -2
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.component.mjs +683 -78
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.errors.mjs +21 -0
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.util.mjs +4 -133
- package/esm2022/lib/components/video/contentful-video.component.mjs +14 -39
- package/esm2022/lib/components/video/index.mjs +2 -0
- package/esm2022/lib/constants/index.mjs +2 -2
- package/esm2022/lib/contentful.imports.mjs +6 -2
- package/esm2022/lib/gql/asset.fragments.mjs +1 -17
- package/esm2022/lib/gql/index.mjs +2 -0
- package/esm2022/lib/types/contentful.types.mjs +1 -1
- package/esm2022/lib/types/index.mjs +2 -2
- package/esm2022/lib/utils/contentful-config.mjs +5 -2
- package/esm2022/lib/utils/contentful.util.mjs +1 -7
- package/esm2022/lib/utils/index.mjs +3 -2
- package/fesm2022/ethlete-contentful.mjs +887 -536
- package/fesm2022/ethlete-contentful.mjs.map +1 -1
- package/index.d.ts +10 -1
- package/lib/components/audio/contentful-audio.component.d.ts +6 -11
- package/lib/components/file/contentful-file.component.d.ts +4 -9
- package/lib/components/image/contentful-image.component.d.ts +19 -24
- package/lib/components/image/contentful-image.component.utils.d.ts +2 -2
- package/lib/components/image/index.d.ts +2 -1
- package/lib/components/rich-text-renderer/index.d.ts +2 -1
- package/lib/components/rich-text-renderer/rich-text-renderer.component.d.ts +160 -15
- package/lib/components/rich-text-renderer/rich-text-renderer.errors.d.ts +12 -0
- package/lib/components/rich-text-renderer/rich-text-renderer.util.d.ts +4 -17
- package/lib/components/video/contentful-video.component.d.ts +4 -9
- package/lib/constants/index.d.ts +1 -1
- package/lib/contentful.imports.d.ts +5 -1
- package/lib/gql/asset.fragments.d.ts +0 -1
- package/lib/types/contentful.types.d.ts +92 -48
- package/lib/types/index.d.ts +1 -1
- package/lib/utils/contentful.util.d.ts +1 -3
- package/lib/utils/index.d.ts +2 -1
- package/package.json +4 -4
- package/esm2022/lib/components/audio/public-api.mjs +0 -2
- package/esm2022/lib/components/file/public-api.mjs +0 -2
- package/esm2022/lib/components/image/public-api.mjs +0 -3
- package/esm2022/lib/components/index.mjs +0 -2
- package/esm2022/lib/components/public-api.mjs +0 -6
- package/esm2022/lib/components/rich-text-renderer/public-api.mjs +0 -5
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.constants.mjs +0 -3
- package/esm2022/lib/components/rich-text-renderer/rich-text-renderer.types.mjs +0 -2
- package/esm2022/lib/components/video/public-api.mjs +0 -2
- package/esm2022/lib/constants/public-api.mjs +0 -2
- package/esm2022/lib/gql/public-api.mjs +0 -2
- package/esm2022/lib/public-api.mjs +0 -7
- package/esm2022/lib/types/public-api.mjs +0 -2
- package/esm2022/lib/utils/public-api.mjs +0 -3
- package/lib/components/image/public-api.d.ts +0 -2
- package/lib/components/index.d.ts +0 -1
- package/lib/components/public-api.d.ts +0 -5
- package/lib/components/rich-text-renderer/public-api.d.ts +0 -4
- package/lib/components/rich-text-renderer/rich-text-renderer.constants.d.ts +0 -2
- package/lib/components/rich-text-renderer/rich-text-renderer.types.d.ts +0 -12
- package/lib/constants/public-api.d.ts +0 -1
- package/lib/public-api.d.ts +0 -6
- package/lib/types/public-api.d.ts +0 -1
- package/lib/utils/public-api.d.ts +0 -2
- /package/lib/components/audio/{public-api.d.ts → index.d.ts} +0 -0
- /package/lib/components/file/{public-api.d.ts → index.d.ts} +0 -0
- /package/lib/components/video/{public-api.d.ts → index.d.ts} +0 -0
- /package/lib/gql/{public-api.d.ts → index.d.ts} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# @ethlete/contentful
|
|
2
|
+
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`ef63100`](https://github.com/ethlete-io/ethdk/commit/ef6310039b70c0321021a532b5818822518f47c6) Thanks [@TomTomB](https://github.com/TomTomB)! - The `rich-text-renderer` component was rebuild from scratch.
|
|
8
|
+
|
|
9
|
+
- The `richText` input was renamed to `content` and is required.
|
|
10
|
+
- The value of the `content` input should be a `ContentfulCollection` object. This can be directly fetched using the Contentful REST API. Do not use their GraphQL API for this purpose.
|
|
11
|
+
- A `richTextPath` input was added to allow for the customization of the path to the `richText` field in the `ContentfulCollection` object. It is required and should point to the start of the rich text object inside the `ContentfulCollection` object. The start contains a `nodeType` property with the value `document`.
|
|
12
|
+
- All custom components now can contain the following input signals. They are optional and will be used by the renderer to expose the entry's data.
|
|
13
|
+
- `fields` with your custom type defined inside Contentful.
|
|
14
|
+
- `includes` with a type of `ContentfulIncludeMap`. Using this map you can access linked entries and assets.
|
|
15
|
+
- `metadata` with a type of `ContentfulMetadata`
|
|
16
|
+
- `sys` with a type of `ContentfulSys`
|
|
17
|
+
- Inside the `ContentfulAudioComponent`, `ContentfulFileComponent`, `ContentfulImageComponent`, and `ContentfulVideoComponent` components, the `data` input was renamed to `asset`.
|
|
18
|
+
- If you supply custom components for the ones mentioned above, they must also contain an `asset` signal with a type of `ContentfulAsset`.
|
|
19
|
+
- Everything evolving around the `RICH_TEXT_RENDERER_COMPONENT_DATA` DI token was removed. The renderer now sets and updates inputs instead of using dependency injection.
|
|
20
|
+
- The `GQL_FRAGMENT_CONTENTFUL_IMAGE` constant has been removed without replacement.
|
|
21
|
+
|
|
22
|
+
## 2.1.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [#1614](https://github.com/ethlete-io/ethdk/pull/1614) [`5f414b9`](https://github.com/ethlete-io/ethdk/commit/5f414b96362366f650945835b87d3cf8ce292bc1) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix various circular dependencies
|
|
27
|
+
|
|
28
|
+
## 2.1.1
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- [`2a75a9d8`](https://github.com/ethlete-io/ethdk/commit/2a75a9d856b6f5190570ac2bebcc02afdd409745) Thanks [@TomTomB](https://github.com/TomTomB)! - Migrate to new control flow
|
|
33
|
+
|
|
34
|
+
## 2.1.0
|
|
35
|
+
|
|
36
|
+
### Minor Changes
|
|
37
|
+
|
|
38
|
+
- [`8a714a01`](https://github.com/ethlete-io/ethdk/commit/8a714a0147a58fa84c9258fd4b14ffdc835b3442) Thanks [@TomTomB](https://github.com/TomTomB)! - Update to Angular 17
|
|
39
|
+
|
|
40
|
+
## 2.0.3
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies []:
|
|
45
|
+
- @ethlete/cdk@4.0.3
|
|
46
|
+
- @ethlete/core@4.0.3
|
|
47
|
+
- @ethlete/query@5.0.3
|
|
48
|
+
|
|
49
|
+
## 2.0.2
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies []:
|
|
54
|
+
- @ethlete/cdk@4.0.2
|
|
55
|
+
- @ethlete/core@4.0.2
|
|
56
|
+
- @ethlete/query@5.0.2
|
|
57
|
+
|
|
58
|
+
## 2.0.1
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [[`3f77e8d5`](https://github.com/ethlete-io/ethdk/commit/3f77e8d52a5ba45c4f3da4e34dcc08e0561ae04d)]:
|
|
63
|
+
- @ethlete/core@4.0.1
|
|
64
|
+
- @ethlete/cdk@4.0.1
|
|
65
|
+
- @ethlete/query@5.0.1
|
|
66
|
+
|
|
67
|
+
## 2.0.0
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [[`2ded18ef`](https://github.com/ethlete-io/ethdk/commit/2ded18ef14115c9c9e2fb4f86c688d436c807766)]:
|
|
72
|
+
- @ethlete/cdk@4.0.0
|
|
73
|
+
- @ethlete/core@4.0.0
|
|
74
|
+
- @ethlete/query@5.0.0
|
|
75
|
+
|
|
76
|
+
## 1.0.3
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- [`0328fb76`](https://github.com/ethlete-io/ethdk/commit/0328fb769ca53042835826c1967b8d2f25072d63) Thanks [@TomTomB](https://github.com/TomTomB)! - Dependency sync only
|
|
81
|
+
|
|
82
|
+
- Updated dependencies [[`0328fb76`](https://github.com/ethlete-io/ethdk/commit/0328fb769ca53042835826c1967b8d2f25072d63)]:
|
|
83
|
+
- @ethlete/cdk@3.22.7
|
|
84
|
+
- @ethlete/core@3.13.2
|
|
85
|
+
- @ethlete/query@4.20.5
|
|
86
|
+
|
|
87
|
+
## 1.0.2
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- [`04e0db6`](https://github.com/ethlete-io/ethdk/commit/04e0db6c0007d58705f88605f3f8ed2d0ad05ce3) Thanks [@TomTomB](https://github.com/TomTomB)! - Update to Angular 16
|
|
92
|
+
|
|
93
|
+
## 1.0.1
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [`3fe7e30`](https://github.com/ethlete-io/ethdk/commit/3fe7e30756f24543c96ac62aec86a0efba7fddac) Thanks [@TomTomB](https://github.com/TomTomB)! - Update deps to use cdk instead of components
|
|
98
|
+
|
|
99
|
+
## 1.0.0
|
|
100
|
+
|
|
101
|
+
### Major Changes
|
|
102
|
+
|
|
103
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`44ac6e6`](https://github.com/ethlete-io/ethdk/commit/44ac6e621c9b2c2e02b45f7abc2c1b3111604d56) Thanks [@TomTomB](https://github.com/TomTomB)! - Initial stable release
|
|
104
|
+
|
|
105
|
+
### Minor Changes
|
|
106
|
+
|
|
107
|
+
- [#63](https://github.com/ethlete-io/ethdk/pull/63) [`8b05caa`](https://github.com/ethlete-io/ethdk/commit/8b05caa7234aa2ea22efe59c6c955b6981d50f18) Thanks [@TomTomB](https://github.com/TomTomB)! - Add contentful rich text renderer
|
|
108
|
+
|
|
109
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`24b5fd2`](https://github.com/ethlete-io/ethdk/commit/24b5fd2bc443cb31752c01d7afaaa7c881714e41) Thanks [@TomTomB](https://github.com/TomTomB)! - Add contentful image and asset fragments
|
|
110
|
+
|
|
111
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`4cfa96d`](https://github.com/ethlete-io/ethdk/commit/4cfa96d6b13c8ea51c9428b6fe0badf692f776d6) Thanks [@TomTomB](https://github.com/TomTomB)! - Update contentful image to use the new picture component
|
|
112
|
+
|
|
113
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`36e6462`](https://github.com/ethlete-io/ethdk/commit/36e6462b46ff8241e666f5e4355b28a4f40fa4b5) Thanks [@TomTomB](https://github.com/TomTomB)! - Make image sizes only defineable via code
|
|
114
|
+
|
|
115
|
+
- [#418](https://github.com/ethlete-io/ethdk/pull/418) [`07e8687`](https://github.com/ethlete-io/ethdk/commit/07e8687f3771b6286ab6bb621fe05816fc09066f) Thanks [@nziermann](https://github.com/nziermann)! - Switch from modules to pure array exports
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- [#278](https://github.com/ethlete-io/ethdk/pull/278) [`d3555ab`](https://github.com/ethlete-io/ethdk/commit/d3555abdb5279967b95b34a9ce1e4c0401fde0f2) Thanks [@manuelschulte](https://github.com/manuelschulte)! - Clear childNodes to prevent appending to existing ones
|
|
120
|
+
|
|
121
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`ba8071c`](https://github.com/ethlete-io/ethdk/commit/ba8071caa08636193bebc0fdcb986205b41b7023) Thanks [@TomTomB](https://github.com/TomTomB)! - Do not use injected rich text data if custom data is provided
|
|
122
|
+
|
|
123
|
+
- [#183](https://github.com/ethlete-io/ethdk/pull/183) [`1521117`](https://github.com/ethlete-io/ethdk/commit/152111770cd33dec9aa81288e8a596f86e32b154) Thanks [@baltruschat](https://github.com/baltruschat)! - Add source types to contentful image component
|
|
124
|
+
|
|
125
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`516b56b`](https://github.com/ethlete-io/ethdk/commit/516b56bf8d913a17370ea07e71facc534adb73bc) Thanks [@TomTomB](https://github.com/TomTomB)! - Remove no longer existing properties from contentful image gql fragment
|
|
126
|
+
|
|
127
|
+
- [#65](https://github.com/ethlete-io/ethdk/pull/65) [`1cf9a35`](https://github.com/ethlete-io/ethdk/commit/1cf9a35a39885c1054721db20ce23424c81bad74) Thanks [@TomTomB](https://github.com/TomTomB)! - Add missing exports
|
|
128
|
+
|
|
129
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`4491262`](https://github.com/ethlete-io/ethdk/commit/4491262c1d1575f20dacf5abd34e382fd8eb32b3) Thanks [@TomTomB](https://github.com/TomTomB)! - Use ngSrc directive for contentful image
|
|
130
|
+
|
|
131
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`4d5247f`](https://github.com/ethlete-io/ethdk/commit/4d5247ffaa6f1dab2370328c5a84ffcf88664445) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix rich text renderer data injector using the wrong data
|
|
132
|
+
|
|
133
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`516b56b`](https://github.com/ethlete-io/ethdk/commit/516b56bf8d913a17370ea07e71facc534adb73bc) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix contentful image api jpeg source type naming
|
|
134
|
+
|
|
135
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`1327af1`](https://github.com/ethlete-io/ethdk/commit/1327af13c721f8fe26d53bd12abd17e93d62bee5) Thanks [@TomTomB](https://github.com/TomTomB)! - Dependency updates
|
|
136
|
+
|
|
137
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`d92c892`](https://github.com/ethlete-io/ethdk/commit/d92c892b567903cb6118a1c72f1251a362af5b15) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix rich text rendering of embedded entries
|
|
138
|
+
|
|
139
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`08dedb4`](https://github.com/ethlete-io/ethdk/commit/08dedb4644d0a77f975bd01f500d51d345b39a18) Thanks [@TomTomB](https://github.com/TomTomB)! - Switch from config classes to objects
|
|
140
|
+
|
|
141
|
+
- [#475](https://github.com/ethlete-io/ethdk/pull/475) [`b7e087c`](https://github.com/ethlete-io/ethdk/commit/b7e087c096aea289fdc81806839ea7dede72e5db) Thanks [@TomTomB](https://github.com/TomTomB)! - Add inputs to configure classes inside contentful components
|
|
142
|
+
|
|
143
|
+
## 0.1.0-next.14
|
|
144
|
+
|
|
145
|
+
### Minor Changes
|
|
146
|
+
|
|
147
|
+
- [#309](https://github.com/ethlete-io/ethdk/pull/309) [`07e8687`](https://github.com/ethlete-io/ethdk/commit/07e8687f3771b6286ab6bb621fe05816fc09066f) Thanks [@renovate](https://github.com/apps/renovate)! - Switch from modules to pure array exports
|
|
148
|
+
|
|
149
|
+
## 0.1.0-next.13
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- [`1327af1`](https://github.com/ethlete-io/ethdk/commit/1327af13c721f8fe26d53bd12abd17e93d62bee5) Thanks [@TomTomB](https://github.com/TomTomB)! - Dependency updates
|
|
154
|
+
|
|
155
|
+
## 0.1.0-next.12
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- [`516b56b`](https://github.com/ethlete-io/ethdk/commit/516b56bf8d913a17370ea07e71facc534adb73bc) Thanks [@TomTomB](https://github.com/TomTomB)! - Remove no longer existing properties from contentful image gql fragment
|
|
160
|
+
|
|
161
|
+
- [`516b56b`](https://github.com/ethlete-io/ethdk/commit/516b56bf8d913a17370ea07e71facc534adb73bc) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix contentful image api jpeg source type naming
|
|
162
|
+
|
|
163
|
+
## 0.1.0-next.11
|
|
164
|
+
|
|
165
|
+
### Minor Changes
|
|
166
|
+
|
|
167
|
+
- [`36e6462`](https://github.com/ethlete-io/ethdk/commit/36e6462b46ff8241e666f5e4355b28a4f40fa4b5) - Make image sizes only defineable via code
|
|
168
|
+
|
|
169
|
+
## 0.1.0-next.10
|
|
170
|
+
|
|
171
|
+
### Minor Changes
|
|
172
|
+
|
|
173
|
+
- [`4cfa96d`](https://github.com/ethlete-io/ethdk/commit/4cfa96d6b13c8ea51c9428b6fe0badf692f776d6) Thanks [@TomTomB](https://github.com/TomTomB)! - Update contentful image to use the new picture component
|
|
174
|
+
|
|
175
|
+
## 0.1.0-next.9
|
|
176
|
+
|
|
177
|
+
### Minor Changes
|
|
178
|
+
|
|
179
|
+
- [`24b5fd2`](https://github.com/ethlete-io/ethdk/commit/24b5fd2bc443cb31752c01d7afaaa7c881714e41) Thanks [@TomTomB](https://github.com/TomTomB)! - Add contentful image and asset fragments
|
|
180
|
+
|
|
181
|
+
## 0.1.0-next.8
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- [#278](https://github.com/ethlete-io/ethdk/pull/278) [`d3555ab`](https://github.com/ethlete-io/ethdk/commit/d3555abdb5279967b95b34a9ce1e4c0401fde0f2) Thanks [@manuelschulte](https://github.com/manuelschulte)! - Clear childNodes to prevent appending to existing ones
|
|
186
|
+
|
|
187
|
+
## 0.1.0-next.7
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- [#193](https://github.com/ethlete-io/ethdk/pull/193) [`4491262`](https://github.com/ethlete-io/ethdk/commit/4491262c1d1575f20dacf5abd34e382fd8eb32b3) Thanks [@renovate](https://github.com/apps/renovate)! - Use ngSrc directive for contentful image
|
|
192
|
+
|
|
193
|
+
- [#193](https://github.com/ethlete-io/ethdk/pull/193) [`08dedb4`](https://github.com/ethlete-io/ethdk/commit/08dedb4644d0a77f975bd01f500d51d345b39a18) Thanks [@renovate](https://github.com/apps/renovate)! - Switch from config classes to objects
|
|
194
|
+
|
|
195
|
+
## 0.1.0-next.6
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- [#183](https://github.com/ethlete-io/ethdk/pull/183) [`1521117`](https://github.com/ethlete-io/ethdk/commit/152111770cd33dec9aa81288e8a596f86e32b154) Thanks [@baltruschat](https://github.com/baltruschat)! - Add source types to contentful image component
|
|
200
|
+
|
|
201
|
+
## 0.1.0-next.5
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- [`ba8071c`](https://github.com/ethlete-io/ethdk/commit/ba8071caa08636193bebc0fdcb986205b41b7023) Thanks [@TomTomB](https://github.com/TomTomB)! - Do not use injected rich text data if custom data is provided
|
|
206
|
+
|
|
207
|
+
## 0.1.0-next.4
|
|
208
|
+
|
|
209
|
+
### Patch Changes
|
|
210
|
+
|
|
211
|
+
- [`4d5247f`](https://github.com/ethlete-io/ethdk/commit/4d5247ffaa6f1dab2370328c5a84ffcf88664445) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix rich text renderer data injector using the wrong data
|
|
212
|
+
|
|
213
|
+
## 0.1.0-next.3
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- [`d92c892`](https://github.com/ethlete-io/ethdk/commit/d92c892b567903cb6118a1c72f1251a362af5b15) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix rich text rendering of embedded entries
|
|
218
|
+
|
|
219
|
+
## 0.1.0-next.2
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- [`b7e087c`](https://github.com/ethlete-io/ethdk/commit/b7e087c096aea289fdc81806839ea7dede72e5db) Thanks [@TomTomB](https://github.com/TomTomB)! - Add inputs to configure classes inside contentful components
|
|
224
|
+
|
|
225
|
+
## 0.1.0-next.1
|
|
226
|
+
|
|
227
|
+
### Patch Changes
|
|
228
|
+
|
|
229
|
+
- [#65](https://github.com/ethlete-io/ethdk/pull/65) [`1cf9a35`](https://github.com/ethlete-io/ethdk/commit/1cf9a35a39885c1054721db20ce23424c81bad74) Thanks [@TomTomB](https://github.com/TomTomB)! - Add missing exports
|
|
230
|
+
|
|
231
|
+
## 0.1.0-next.0
|
|
232
|
+
|
|
233
|
+
### Minor Changes
|
|
234
|
+
|
|
235
|
+
- [#63](https://github.com/ethlete-io/ethdk/pull/63) [`8b05caa`](https://github.com/ethlete-io/ethdk/commit/8b05caa7234aa2ea22efe59c6c955b6981d50f18) Thanks [@TomTomB](https://github.com/TomTomB)! - Add contentful rich text renderer
|
package/esm2022/index.mjs
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export * from './lib/
|
|
2
|
-
|
|
1
|
+
export * from './lib/components/audio';
|
|
2
|
+
export * from './lib/components/file';
|
|
3
|
+
export * from './lib/components/image';
|
|
4
|
+
export * from './lib/components/rich-text-renderer';
|
|
5
|
+
export * from './lib/components/video';
|
|
6
|
+
export * from './lib/constants';
|
|
7
|
+
export * from './lib/contentful.imports';
|
|
8
|
+
export * from './lib/gql';
|
|
9
|
+
export * from './lib/types';
|
|
10
|
+
export * from './lib/utils';
|
|
11
|
+
// Burst cache
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL2NvbnRlbnRmdWwvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMscUNBQXFDLENBQUM7QUFDcEQsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxhQUFhLENBQUM7QUFFNUIsY0FBYyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvYXVkaW8nO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9maWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMvaW1hZ2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9yaWNoLXRleHQtcmVuZGVyZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy92aWRlbyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25zdGFudHMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29udGVudGZ1bC5pbXBvcnRzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2dxbCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90eXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi91dGlscyc7XG5cbi8vIEJ1cnN0IGNhY2hlXG4iXX0=
|
|
@@ -1,53 +1,32 @@
|
|
|
1
1
|
import { NgClass } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component,
|
|
3
|
-
import { RICH_TEXT_RENDERER_COMPONENT_DATA } from '../rich-text-renderer';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export class ContentfulAudioComponent {
|
|
6
5
|
constructor() {
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.figcaptionClass = null;
|
|
6
|
+
this.asset = input.required();
|
|
7
|
+
this.audioClass = input(null);
|
|
8
|
+
this.figureClass = input(null);
|
|
9
|
+
this.figcaptionClass = input(null);
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
console.warn('The provided asset is invalid', v);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (v && !v.contentType.startsWith('audio/')) {
|
|
23
|
-
throw new Error('The provided asset is not an audio');
|
|
24
|
-
}
|
|
25
|
-
this._data = v ?? null;
|
|
26
|
-
}
|
|
27
|
-
ngOnInit() {
|
|
28
|
-
if (this._richTextData && !this.data) {
|
|
29
|
-
this.data = this._richTextData;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ContentfulAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.2", type: ContentfulAudioComponent, isStandalone: true, selector: "et-contentful-audio", inputs: { data: "data", audioClass: "audioClass", figureClass: "figureClass", figcaptionClass: "figcaptionClass" }, ngImport: i0, template: `
|
|
34
|
-
@if (data) {
|
|
35
|
-
<figure [ngClass]="figureClass">
|
|
36
|
-
<figcaption [ngClass]="figcaptionClass">{{ data.title }}</figcaption>
|
|
37
|
-
<audio [ngClass]="audioClass" controls src="{{ data.url }}"></audio>
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContentfulAudioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", 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: `
|
|
13
|
+
@if (asset(); as data) {
|
|
14
|
+
<figure [ngClass]="figureClass()">
|
|
15
|
+
<figcaption [ngClass]="figcaptionClass()">{{ data.fields.title }}</figcaption>
|
|
16
|
+
<audio [ngClass]="audioClass()" controls src="{{ data.fields.file.url }}"></audio>
|
|
38
17
|
</figure>
|
|
39
18
|
}
|
|
40
19
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
41
20
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContentfulAudioComponent, decorators: [{
|
|
43
22
|
type: Component,
|
|
44
23
|
args: [{
|
|
45
24
|
selector: 'et-contentful-audio',
|
|
46
25
|
template: `
|
|
47
|
-
@if (data) {
|
|
48
|
-
<figure [ngClass]="figureClass">
|
|
49
|
-
<figcaption [ngClass]="figcaptionClass">{{ data.title }}</figcaption>
|
|
50
|
-
<audio [ngClass]="audioClass" controls src="{{ data.url }}"></audio>
|
|
26
|
+
@if (asset(); as data) {
|
|
27
|
+
<figure [ngClass]="figureClass()">
|
|
28
|
+
<figcaption [ngClass]="figcaptionClass()">{{ data.fields.title }}</figcaption>
|
|
29
|
+
<audio [ngClass]="audioClass()" controls src="{{ data.fields.file.url }}"></audio>
|
|
51
30
|
</figure>
|
|
52
31
|
}
|
|
53
32
|
`,
|
|
@@ -56,13 +35,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
56
35
|
standalone: true,
|
|
57
36
|
imports: [NgClass],
|
|
58
37
|
}]
|
|
59
|
-
}]
|
|
60
|
-
|
|
61
|
-
}], audioClass: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], figureClass: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], figcaptionClass: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}] } });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudGZ1bC1hdWRpby5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbnRlbnRmdWwvc3JjL2xpYi9jb21wb25lbnRzL2F1ZGlvL2NvbnRlbnRmdWwtYXVkaW8uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMxQyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBVSxpQkFBaUIsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHN0csT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7O0FBaUIxRSxNQUFNLE9BQU8sd0JBQXdCO0lB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b25lbnRzL2F1ZGlvL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbnRlbnRmdWwtYXVkaW8uY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,46 +1,28 @@
|
|
|
1
1
|
import { NgClass } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component,
|
|
3
|
-
import { RICH_TEXT_RENDERER_COMPONENT_DATA } from '../rich-text-renderer';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, input } from '@angular/core';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export class ContentfulFileComponent {
|
|
6
5
|
constructor() {
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
9
|
-
this.fileClass = null;
|
|
6
|
+
this.asset = input.required();
|
|
7
|
+
this.fileClass = input(null);
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
this._data = null;
|
|
17
|
-
console.warn('The provided asset is invalid', v);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
this._data = v ?? null;
|
|
21
|
-
}
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
if (this._richTextData && !this.data) {
|
|
24
|
-
this.data = this._richTextData;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ContentfulFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.2", type: ContentfulFileComponent, isStandalone: true, selector: "et-contentful-file", inputs: { data: "data", fileClass: "fileClass" }, ngImport: i0, template: `
|
|
29
|
-
@if (data) {
|
|
30
|
-
<a [href]="data.url" [ngClass]="fileClass" class="underline" target="_blank">
|
|
31
|
-
{{ data.title }} ({{ data.size }} Bytes)
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContentfulFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", 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: `
|
|
11
|
+
@if (asset(); as data) {
|
|
12
|
+
<a [href]="data.fields.file.url" [ngClass]="fileClass()" class="underline" target="_blank">
|
|
13
|
+
{{ data.fields.title }} ({{ data.fields.file.details.size }} Bytes)
|
|
32
14
|
</a>
|
|
33
15
|
}
|
|
34
16
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
35
17
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ContentfulFileComponent, decorators: [{
|
|
37
19
|
type: Component,
|
|
38
20
|
args: [{
|
|
39
21
|
selector: 'et-contentful-file',
|
|
40
22
|
template: `
|
|
41
|
-
@if (data) {
|
|
42
|
-
<a [href]="data.url" [ngClass]="fileClass" class="underline" target="_blank">
|
|
43
|
-
{{ data.title }} ({{ data.size }} Bytes)
|
|
23
|
+
@if (asset(); as data) {
|
|
24
|
+
<a [href]="data.fields.file.url" [ngClass]="fileClass()" class="underline" target="_blank">
|
|
25
|
+
{{ data.fields.title }} ({{ data.fields.file.details.size }} Bytes)
|
|
44
26
|
</a>
|
|
45
27
|
}
|
|
46
28
|
`,
|
|
@@ -49,9 +31,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
49
31
|
standalone: true,
|
|
50
32
|
imports: [NgClass],
|
|
51
33
|
}]
|
|
52
|
-
}]
|
|
53
|
-
|
|
54
|
-
}], fileClass: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}] } });
|
|
57
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudGZ1bC1maWxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29udGVudGZ1bC9zcmMvbGliL2NvbXBvbmVudHMvZmlsZS9jb250ZW50ZnVsLWZpbGUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMxQyxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBVSxpQkFBaUIsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHN0csT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7O0FBZ0IxRSxNQUFNLE9BQU8sdUJBQXVCO0lBZHBDO1FBZVUsa0JBQWEsR0FBRyxNQUFNLENBQWtCLGlDQUFpQyxFQUFFLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7UUFpQi9GLFVBQUssR0FBMkIsSUFBSSxDQUFDO1FBRzdDLGNBQVMsR0FBZ0IsSUFBSSxDQUFDO0tBTy9CO0lBekJDLElBQ0ksSUFBSTtRQUNOLE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ICAgICAgPGEgW2hyZWZdPVwiZGF0YS5maWVsZHMuZmlsZS51cmxcIiBbbmdDbGFzc109XCJmaWxlQ2xhc3MoKVwiIGNsYXNzPVwidW5kZXJsaW5lXCIgdGFyZ2V0PVwiX2JsYW5rXCI+XG4gICAgICAgIHt7IGRhdGEuZmllbGRzLnRpdGxlIH19ICh7eyBkYXRhLmZpZWxkcy5maWxlLmRldGFpbHMuc2l6ZSB9fSBCeXRlcylcbiAgICAgIDwvYT5cbiAgICB9XG4gIGAsXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxuICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICBzdGFuZGFsb25lOiB0cnVlLFxuICBpbXBvcnRzOiBbTmdDbGFzc10sXG59KVxuZXhwb3J0IGNsYXNzIENvbnRlbnRmdWxGaWxlQ29tcG9uZW50IHtcbiAgYXNzZXQgPSBpbnB1dC5yZXF1aXJlZDxDb250ZW50ZnVsQXNzZXQgfCBudWxsIHwgdW5kZWZpbmVkPigpO1xuICBmaWxlQ2xhc3MgPSBpbnB1dDxOZ0NsYXNzVHlwZT4obnVsbCk7XG59XG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './contentful-file.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbnRlbnRmdWwvc3JjL2xpYi9jb21wb25lbnRzL2ZpbGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw2QkFBNkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGVudGZ1bC1maWxlLmNvbXBvbmVudCc7XG4iXX0=
|