react-datocms 4.1.3 → 4.2.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/README.md +34 -6
- package/dist/cjs/Image/index.js +68 -74
- package/dist/cjs/Image/index.js.map +1 -1
- package/dist/cjs/Image/useInView.js +3 -14
- package/dist/cjs/Image/useInView.js.map +1 -1
- package/dist/cjs/Seo/index.js +1 -1
- package/dist/cjs/Seo/nextUtils.js +28 -49
- package/dist/cjs/Seo/nextUtils.js.map +1 -1
- package/dist/cjs/Seo/remixUtils.js +6 -18
- package/dist/cjs/Seo/remixUtils.js.map +1 -1
- package/dist/cjs/Seo/renderMetaTags.js +6 -18
- package/dist/cjs/Seo/renderMetaTags.js.map +1 -1
- package/dist/cjs/Seo/renderMetaTagsToString.js +7 -7
- package/dist/cjs/Seo/renderMetaTagsToString.js.map +1 -1
- package/dist/cjs/Seo/types.js +31 -51
- package/dist/cjs/Seo/types.js.map +1 -1
- package/dist/cjs/StructuredText/index.js +40 -52
- package/dist/cjs/StructuredText/index.js.map +1 -1
- package/dist/cjs/VideoPlayer/index.js +67 -0
- package/dist/cjs/VideoPlayer/index.js.map +1 -0
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/useQuerySubscription/index.js +25 -70
- package/dist/cjs/useQuerySubscription/index.js.map +1 -1
- package/dist/cjs/useSiteSearch/index.js +71 -123
- package/dist/cjs/useSiteSearch/index.js.map +1 -1
- package/dist/cjs/useVideoPlayer/index.js +31 -0
- package/dist/cjs/useVideoPlayer/index.js.map +1 -0
- package/dist/esm/Image/index.js +62 -68
- package/dist/esm/Image/index.js.map +1 -1
- package/dist/esm/Seo/nextUtils.js +26 -47
- package/dist/esm/Seo/nextUtils.js.map +1 -1
- package/dist/esm/Seo/remixUtils.js +5 -17
- package/dist/esm/Seo/remixUtils.js.map +1 -1
- package/dist/esm/Seo/renderMetaTags.js +4 -16
- package/dist/esm/Seo/renderMetaTags.js.map +1 -1
- package/dist/esm/Seo/renderMetaTagsToString.js +6 -6
- package/dist/esm/Seo/renderMetaTagsToString.js.map +1 -1
- package/dist/esm/Seo/types.js +30 -50
- package/dist/esm/Seo/types.js.map +1 -1
- package/dist/esm/StructuredText/index.js +33 -45
- package/dist/esm/StructuredText/index.js.map +1 -1
- package/dist/esm/VideoPlayer/index.js +38 -0
- package/dist/esm/VideoPlayer/index.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/useQuerySubscription/index.js +22 -67
- package/dist/esm/useQuerySubscription/index.js.map +1 -1
- package/dist/esm/useSiteSearch/index.js +65 -117
- package/dist/esm/useSiteSearch/index.js.map +1 -1
- package/dist/esm/useVideoPlayer/index.js +27 -0
- package/dist/esm/useVideoPlayer/index.js.map +1 -0
- package/dist/types/Seo/nextUtils.d.ts +1 -1
- package/dist/types/Seo/remixUtils.d.ts +1 -1
- package/dist/types/Seo/renderMetaTags.d.ts +1 -1
- package/dist/types/Seo/renderMetaTagsToString.d.ts +1 -1
- package/dist/types/StructuredText/index.d.ts +2 -2
- package/dist/types/VideoPlayer/index.d.ts +26 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/useVideoPlayer/index.d.ts +17 -0
- package/package.json +41 -51
- package/src/Image/__tests__/__snapshots__/index.test.tsx.snap +91 -91
- package/src/Image/__tests__/index.test.tsx +2 -2
- package/src/Image/index.tsx +11 -9
- package/src/Seo/__tests__/__snapshots__/index.test.tsx.snap +53 -53
- package/src/Seo/__tests__/index.test.tsx +1 -1
- package/src/Seo/nextUtils.ts +1 -1
- package/src/Seo/remixUtils.ts +1 -1
- package/src/Seo/renderMetaTags.tsx +1 -1
- package/src/Seo/renderMetaTagsToString.tsx +1 -1
- package/src/StructuredText/__tests__/__snapshots__/index.test.tsx.snap +58 -58
- package/src/StructuredText/__tests__/index.test.tsx +5 -5
- package/src/StructuredText/index.tsx +10 -10
- package/src/VideoPlayer/index.tsx +107 -0
- package/src/{setupTests.ts → __tests__/setup.ts} +4 -1
- package/src/index.ts +4 -1
- package/src/useQuerySubscription/index.ts +6 -6
- package/src/useVideoPlayer/__tests__/index.test.tsx +98 -0
- package/src/useVideoPlayer/index.ts +68 -0
- package/dist/cjs/Image/__tests__/index.test.js +0 -99
- package/dist/cjs/Image/__tests__/index.test.js.map +0 -1
- package/dist/cjs/Seo/__tests__/index.test.js +0 -330
- package/dist/cjs/Seo/__tests__/index.test.js.map +0 -1
- package/dist/cjs/StructuredText/__tests__/index.test.js +0 -243
- package/dist/cjs/StructuredText/__tests__/index.test.js.map +0 -1
- package/dist/cjs/setupTests.js +0 -11
- package/dist/cjs/setupTests.js.map +0 -1
- package/dist/esm/Image/__tests__/index.test.d.ts +0 -1
- package/dist/esm/Image/__tests__/index.test.js +0 -74
- package/dist/esm/Image/__tests__/index.test.js.map +0 -1
- package/dist/esm/Image/index.d.ts +0 -93
- package/dist/esm/Image/useInView.d.ts +0 -1
- package/dist/esm/Seo/__tests__/index.test.d.ts +0 -1
- package/dist/esm/Seo/__tests__/index.test.js +0 -305
- package/dist/esm/Seo/__tests__/index.test.js.map +0 -1
- package/dist/esm/Seo/index.d.ts +0 -5
- package/dist/esm/Seo/nextUtils.d.ts +0 -48
- package/dist/esm/Seo/remixUtils.d.ts +0 -6
- package/dist/esm/Seo/renderMetaTags.d.ts +0 -3
- package/dist/esm/Seo/renderMetaTagsToString.d.ts +0 -2
- package/dist/esm/Seo/types.d.ts +0 -55
- package/dist/esm/StructuredText/__tests__/index.test.d.ts +0 -1
- package/dist/esm/StructuredText/__tests__/index.test.js +0 -218
- package/dist/esm/StructuredText/__tests__/index.test.js.map +0 -1
- package/dist/esm/StructuredText/index.d.ts +0 -52
- package/dist/esm/index.d.ts +0 -5
- package/dist/esm/setupTests.d.ts +0 -1
- package/dist/esm/setupTests.js +0 -6
- package/dist/esm/setupTests.js.map +0 -1
- package/dist/esm/useQuerySubscription/index.d.ts +0 -20
- package/dist/esm/useSiteSearch/index.d.ts +0 -83
- package/dist/types/Image/__tests__/index.test.d.ts +0 -1
- package/dist/types/Seo/__tests__/index.test.d.ts +0 -1
- package/dist/types/StructuredText/__tests__/index.test.d.ts +0 -1
- package/dist/types/setupTests.d.ts +0 -1
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
exports.__esModule = true;
|
|
26
|
-
var React = __importStar(require("react"));
|
|
27
|
-
var enzyme_1 = require("enzyme");
|
|
28
|
-
var index_js_1 = require("../index.js");
|
|
29
|
-
var metaTags = [
|
|
30
|
-
{
|
|
31
|
-
content: 'Remix CMS - The easiest way to manage content with Remix',
|
|
32
|
-
attributes: null,
|
|
33
|
-
tag: 'title'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
content: null,
|
|
37
|
-
attributes: {
|
|
38
|
-
property: 'og:title',
|
|
39
|
-
content: 'Remix CMS - The easiest way to manage content with Remix'
|
|
40
|
-
},
|
|
41
|
-
tag: 'meta'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
content: null,
|
|
45
|
-
attributes: {
|
|
46
|
-
name: 'twitter:title',
|
|
47
|
-
content: 'Remix CMS - The easiest way to manage content with Remix'
|
|
48
|
-
},
|
|
49
|
-
tag: 'meta'
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
content: null,
|
|
53
|
-
attributes: {
|
|
54
|
-
name: 'description',
|
|
55
|
-
content: 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.'
|
|
56
|
-
},
|
|
57
|
-
tag: 'meta'
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
content: null,
|
|
61
|
-
attributes: {
|
|
62
|
-
property: 'og:description',
|
|
63
|
-
content: 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.'
|
|
64
|
-
},
|
|
65
|
-
tag: 'meta'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
content: null,
|
|
69
|
-
attributes: {
|
|
70
|
-
name: 'twitter:description',
|
|
71
|
-
content: 'Remix makes building scalable and fast React apps simple, pair it with a CMS that shares the same intuitiveness. Start a new Remix + Dato project now.'
|
|
72
|
-
},
|
|
73
|
-
tag: 'meta'
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
content: null,
|
|
77
|
-
attributes: {
|
|
78
|
-
property: 'og:image',
|
|
79
|
-
content: 'https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000'
|
|
80
|
-
},
|
|
81
|
-
tag: 'meta'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
content: null,
|
|
85
|
-
attributes: {
|
|
86
|
-
property: 'og:image:width',
|
|
87
|
-
content: '746'
|
|
88
|
-
},
|
|
89
|
-
tag: 'meta'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
content: null,
|
|
93
|
-
attributes: {
|
|
94
|
-
property: 'og:image:height',
|
|
95
|
-
content: '186'
|
|
96
|
-
},
|
|
97
|
-
tag: 'meta'
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
content: null,
|
|
101
|
-
attributes: {
|
|
102
|
-
name: 'twitter:image',
|
|
103
|
-
content: 'https://www.datocms-assets.com/205/1642515293-full-logo.svg?fit=max&fm=jpg&w=1000'
|
|
104
|
-
},
|
|
105
|
-
tag: 'meta'
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
content: null,
|
|
109
|
-
attributes: {
|
|
110
|
-
property: 'og:locale',
|
|
111
|
-
content: 'en'
|
|
112
|
-
},
|
|
113
|
-
tag: 'meta'
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
content: null,
|
|
117
|
-
attributes: {
|
|
118
|
-
property: 'og:type',
|
|
119
|
-
content: 'article'
|
|
120
|
-
},
|
|
121
|
-
tag: 'meta'
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
content: null,
|
|
125
|
-
attributes: {
|
|
126
|
-
property: 'og:site_name',
|
|
127
|
-
content: 'DatoCMS'
|
|
128
|
-
},
|
|
129
|
-
tag: 'meta'
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
content: null,
|
|
133
|
-
attributes: {
|
|
134
|
-
property: 'article:modified_time',
|
|
135
|
-
content: '2022-01-18T14:02:47Z'
|
|
136
|
-
},
|
|
137
|
-
tag: 'meta'
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
content: null,
|
|
141
|
-
attributes: {
|
|
142
|
-
name: 'twitter:card',
|
|
143
|
-
content: 'summary_large_image'
|
|
144
|
-
},
|
|
145
|
-
tag: 'meta'
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
content: null,
|
|
149
|
-
attributes: {
|
|
150
|
-
name: 'twitter:site',
|
|
151
|
-
content: '@datocms'
|
|
152
|
-
},
|
|
153
|
-
tag: 'meta'
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
attributes: {
|
|
157
|
-
sizes: '16x16',
|
|
158
|
-
type: 'image/png',
|
|
159
|
-
rel: 'icon',
|
|
160
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=16&w=16'
|
|
161
|
-
},
|
|
162
|
-
content: null,
|
|
163
|
-
tag: 'link'
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
attributes: {
|
|
167
|
-
sizes: '32x32',
|
|
168
|
-
type: 'image/png',
|
|
169
|
-
rel: 'icon',
|
|
170
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=32&w=32'
|
|
171
|
-
},
|
|
172
|
-
content: null,
|
|
173
|
-
tag: 'link'
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
attributes: {
|
|
177
|
-
sizes: '96x96',
|
|
178
|
-
type: 'image/png',
|
|
179
|
-
rel: 'icon',
|
|
180
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=96&w=96'
|
|
181
|
-
},
|
|
182
|
-
content: null,
|
|
183
|
-
tag: 'link'
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
attributes: {
|
|
187
|
-
sizes: '192x192',
|
|
188
|
-
type: 'image/png',
|
|
189
|
-
rel: 'icon',
|
|
190
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=192&w=192'
|
|
191
|
-
},
|
|
192
|
-
content: null,
|
|
193
|
-
tag: 'link'
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
attributes: {
|
|
197
|
-
sizes: '57x57',
|
|
198
|
-
rel: 'apple-touch-icon',
|
|
199
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=57&w=57'
|
|
200
|
-
},
|
|
201
|
-
content: null,
|
|
202
|
-
tag: 'link'
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
attributes: {
|
|
206
|
-
sizes: '60x60',
|
|
207
|
-
rel: 'apple-touch-icon',
|
|
208
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=60&w=60'
|
|
209
|
-
},
|
|
210
|
-
content: null,
|
|
211
|
-
tag: 'link'
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
attributes: {
|
|
215
|
-
sizes: '72x72',
|
|
216
|
-
rel: 'apple-touch-icon',
|
|
217
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=72&w=72'
|
|
218
|
-
},
|
|
219
|
-
content: null,
|
|
220
|
-
tag: 'link'
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
attributes: {
|
|
224
|
-
sizes: '76x76',
|
|
225
|
-
rel: 'apple-touch-icon',
|
|
226
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=76&w=76'
|
|
227
|
-
},
|
|
228
|
-
content: null,
|
|
229
|
-
tag: 'link'
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
attributes: {
|
|
233
|
-
sizes: '114x114',
|
|
234
|
-
rel: 'apple-touch-icon',
|
|
235
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=114&w=114'
|
|
236
|
-
},
|
|
237
|
-
content: null,
|
|
238
|
-
tag: 'link'
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
attributes: {
|
|
242
|
-
sizes: '120x120',
|
|
243
|
-
rel: 'apple-touch-icon',
|
|
244
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=120&w=120'
|
|
245
|
-
},
|
|
246
|
-
content: null,
|
|
247
|
-
tag: 'link'
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
attributes: {
|
|
251
|
-
sizes: '144x144',
|
|
252
|
-
rel: 'apple-touch-icon',
|
|
253
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=144&w=144'
|
|
254
|
-
},
|
|
255
|
-
content: null,
|
|
256
|
-
tag: 'link'
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
attributes: {
|
|
260
|
-
sizes: '152x152',
|
|
261
|
-
rel: 'apple-touch-icon',
|
|
262
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=152&w=152'
|
|
263
|
-
},
|
|
264
|
-
content: null,
|
|
265
|
-
tag: 'link'
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
attributes: {
|
|
269
|
-
sizes: '180x180',
|
|
270
|
-
rel: 'apple-touch-icon',
|
|
271
|
-
href: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=180&w=180'
|
|
272
|
-
},
|
|
273
|
-
content: null,
|
|
274
|
-
tag: 'link'
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
attributes: {
|
|
278
|
-
name: 'msapplication-square70x70logo',
|
|
279
|
-
content: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=70&w=70'
|
|
280
|
-
},
|
|
281
|
-
content: null,
|
|
282
|
-
tag: 'meta'
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
attributes: {
|
|
286
|
-
name: 'msapplication-square150x150logo',
|
|
287
|
-
content: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=150'
|
|
288
|
-
},
|
|
289
|
-
content: null,
|
|
290
|
-
tag: 'meta'
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
attributes: {
|
|
294
|
-
name: 'msapplication-square310x310logo',
|
|
295
|
-
content: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=310&w=310'
|
|
296
|
-
},
|
|
297
|
-
content: null,
|
|
298
|
-
tag: 'meta'
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
attributes: {
|
|
302
|
-
name: 'msapplication-square310x150logo',
|
|
303
|
-
content: 'https://www.datocms-assets.com/205/1525789775-dato.png?h=150&w=310'
|
|
304
|
-
},
|
|
305
|
-
content: null,
|
|
306
|
-
tag: 'meta'
|
|
307
|
-
},
|
|
308
|
-
];
|
|
309
|
-
describe('renderMetaTags', function () {
|
|
310
|
-
it('generates an array of meta tags', function () {
|
|
311
|
-
var wrapper = (0, enzyme_1.shallow)(React.createElement("head", null, (0, index_js_1.renderMetaTags)(metaTags)));
|
|
312
|
-
expect(wrapper).toMatchSnapshot();
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
describe('renderMetaTagsToString', function () {
|
|
316
|
-
it('generates an array of meta tags', function () {
|
|
317
|
-
expect((0, index_js_1.renderMetaTagsToString)(metaTags)).toMatchSnapshot();
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
describe('toRemixMeta', function () {
|
|
321
|
-
it('generates a meta descriptor', function () {
|
|
322
|
-
expect((0, index_js_1.toRemixMeta)(metaTags)).toMatchSnapshot();
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
describe('toNextMetadata', function () {
|
|
326
|
-
it('generates a Next Metadata object', function () {
|
|
327
|
-
expect((0, index_js_1.toNextMetadata)(metaTags)).toMatchSnapshot();
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/Seo/__tests__/index.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,iCAAiC;AACjC,wCAKqB;AAGrB,IAAM,QAAQ,GAAuB;IACnC;QACE,OAAO,EAAE,0DAA0D;QACnE,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,OAAO;KACb;IACD;QACE,OAAO,EAAE,IAAI;QACb,UAAU,EAAE;YACV,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,0DAA0D;SACpE;QACD,GAAG,EAAE,MAAM;KACZ;IACD;QACE,OAAO,EAAE,IAAI;QACb,U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A6B,EAAE;QAChC,MAAM,CAAC,IAAA,sBAAW,EAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,gBAAgB,EAAE;IACzB,EAAE,CAAC,kCAAkC,EAAE;QACrC,MAAM,CAAC,IAAA,yBAAc,EAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
exports.__esModule = true;
|
|
37
|
-
var enzyme_1 = require("enzyme");
|
|
38
|
-
var React = __importStar(require("react"));
|
|
39
|
-
var index_js_1 = require("../index.js");
|
|
40
|
-
var datocms_structured_text_utils_1 = require("datocms-structured-text-utils");
|
|
41
|
-
var datocms_structured_text_generic_html_renderer_1 = require("datocms-structured-text-generic-html-renderer");
|
|
42
|
-
describe('StructuredText', function () {
|
|
43
|
-
describe('with no value', function () {
|
|
44
|
-
it('renders null', function () {
|
|
45
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: null }));
|
|
46
|
-
expect(wrapper).toMatchSnapshot();
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
describe('simple dast /2', function () {
|
|
50
|
-
var structuredText = {
|
|
51
|
-
schema: 'dast',
|
|
52
|
-
document: {
|
|
53
|
-
type: 'root',
|
|
54
|
-
children: [
|
|
55
|
-
{
|
|
56
|
-
type: 'heading',
|
|
57
|
-
level: 1,
|
|
58
|
-
children: [
|
|
59
|
-
{
|
|
60
|
-
type: 'span',
|
|
61
|
-
value: 'This\nis a '
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: 'span',
|
|
65
|
-
marks: ['strong'],
|
|
66
|
-
value: 'title'
|
|
67
|
-
},
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
describe('with default rules', function () {
|
|
74
|
-
it('renders the document', function () {
|
|
75
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: structuredText }));
|
|
76
|
-
expect(wrapper).toMatchSnapshot();
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
describe('with custom mark rules', function () {
|
|
80
|
-
it('renders the document', function () {
|
|
81
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: structuredText, customMarkRules: [
|
|
82
|
-
(0, datocms_structured_text_generic_html_renderer_1.renderMarkRule)('strong', function (_a) {
|
|
83
|
-
var children = _a.children, key = _a.key;
|
|
84
|
-
return (React.createElement("b", { key: key }, children));
|
|
85
|
-
}),
|
|
86
|
-
] }));
|
|
87
|
-
expect(wrapper).toMatchSnapshot();
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
describe('simple dast with no links/blocks', function () {
|
|
92
|
-
var structuredText = {
|
|
93
|
-
value: {
|
|
94
|
-
schema: 'dast',
|
|
95
|
-
document: {
|
|
96
|
-
type: 'root',
|
|
97
|
-
children: [
|
|
98
|
-
{
|
|
99
|
-
type: 'heading',
|
|
100
|
-
level: 1,
|
|
101
|
-
children: [
|
|
102
|
-
{
|
|
103
|
-
type: 'span',
|
|
104
|
-
value: 'This\nis a '
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
type: 'span',
|
|
108
|
-
marks: ['strong'],
|
|
109
|
-
value: 'title'
|
|
110
|
-
},
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
describe('with default rules', function () {
|
|
118
|
-
it('renders the document', function () {
|
|
119
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: structuredText }));
|
|
120
|
-
expect(wrapper).toMatchSnapshot();
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
describe('with custom rules', function () {
|
|
124
|
-
it('renders the document', function () {
|
|
125
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: structuredText, renderText: function (text, key) {
|
|
126
|
-
return (React.createElement(React.Fragment, { key: key }, text.replace(/This/, 'That')));
|
|
127
|
-
}, customNodeRules: [
|
|
128
|
-
(0, index_js_1.renderNodeRule)(datocms_structured_text_utils_1.isHeading, function (_a) {
|
|
129
|
-
var renderNode = _a.adapter.renderNode, node = _a.node, children = _a.children, key = _a.key;
|
|
130
|
-
return renderNode("h".concat(node.level + 1), { key: key }, children);
|
|
131
|
-
}),
|
|
132
|
-
] }));
|
|
133
|
-
expect(wrapper).toMatchSnapshot();
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
describe('with links/blocks', function () {
|
|
138
|
-
var structuredText = {
|
|
139
|
-
value: {
|
|
140
|
-
schema: 'dast',
|
|
141
|
-
document: {
|
|
142
|
-
type: 'root',
|
|
143
|
-
children: [
|
|
144
|
-
{
|
|
145
|
-
type: 'heading',
|
|
146
|
-
level: 1,
|
|
147
|
-
children: [
|
|
148
|
-
{
|
|
149
|
-
type: 'span',
|
|
150
|
-
value: 'This is a'
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
type: 'span',
|
|
154
|
-
marks: ['highlight'],
|
|
155
|
-
value: 'title'
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
type: 'inlineItem',
|
|
159
|
-
item: '123'
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
type: 'itemLink',
|
|
163
|
-
item: '123',
|
|
164
|
-
meta: [{ id: 'target', value: '_blank' }],
|
|
165
|
-
children: [{ type: 'span', value: 'here!' }]
|
|
166
|
-
},
|
|
167
|
-
]
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
type: 'block',
|
|
171
|
-
item: '456'
|
|
172
|
-
},
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
blocks: [
|
|
177
|
-
{
|
|
178
|
-
id: '456',
|
|
179
|
-
__typename: 'QuoteRecord',
|
|
180
|
-
quote: 'Foo bar.',
|
|
181
|
-
author: 'Mark Smith'
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
links: [
|
|
185
|
-
{
|
|
186
|
-
id: '123',
|
|
187
|
-
__typename: 'DocPageRecord',
|
|
188
|
-
title: 'How to code',
|
|
189
|
-
slug: 'how-to-code'
|
|
190
|
-
},
|
|
191
|
-
]
|
|
192
|
-
};
|
|
193
|
-
describe('with default rules', function () {
|
|
194
|
-
it('renders the document', function () {
|
|
195
|
-
var wrapper = (0, enzyme_1.mount)(React.createElement(index_js_1.StructuredText, { data: structuredText, renderInlineRecord: function (_a) {
|
|
196
|
-
var record = _a.record;
|
|
197
|
-
switch (record.__typename) {
|
|
198
|
-
case 'DocPageRecord':
|
|
199
|
-
return React.createElement("a", { href: "/docs/".concat(record.slug) }, record.title);
|
|
200
|
-
default:
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
}, renderLinkToRecord: function (_a) {
|
|
204
|
-
var record = _a.record, children = _a.children, transformedMeta = _a.transformedMeta;
|
|
205
|
-
switch (record.__typename) {
|
|
206
|
-
case 'DocPageRecord':
|
|
207
|
-
return (React.createElement("a", __assign({}, transformedMeta, { href: "/docs/".concat(record.slug) }), children));
|
|
208
|
-
default:
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
}, renderBlock: function (_a) {
|
|
212
|
-
var record = _a.record;
|
|
213
|
-
switch (record.__typename) {
|
|
214
|
-
case 'QuoteRecord':
|
|
215
|
-
return (React.createElement("figure", null,
|
|
216
|
-
React.createElement("blockquote", null, record.quote),
|
|
217
|
-
React.createElement("figcaption", null, record.author)));
|
|
218
|
-
default:
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
|
-
} }));
|
|
222
|
-
expect(wrapper).toMatchSnapshot();
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
describe('with missing renderInlineRecord prop', function () {
|
|
226
|
-
it('raises an error', function () {
|
|
227
|
-
expect(function () {
|
|
228
|
-
(0, enzyme_1.shallow)(React.createElement(index_js_1.StructuredText, { data: structuredText }));
|
|
229
|
-
}).toThrow(index_js_1.RenderError);
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
describe('with missing record', function () {
|
|
233
|
-
it('raises an error', function () {
|
|
234
|
-
expect(function () {
|
|
235
|
-
(0, enzyme_1.shallow)(React.createElement(index_js_1.StructuredText, { data: __assign(__assign({}, structuredText), { links: [] }), renderInlineRecord: function () {
|
|
236
|
-
return null;
|
|
237
|
-
} }));
|
|
238
|
-
}).toThrow(index_js_1.RenderError);
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/StructuredText/__tests__/index.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgD;AAChD,2CAA+B;AAC/B,wCAMqB;AACrB,+EAA0D;AAC1D,+GAA+E;AAE/E,QAAQ,CAAC,gBAAgB,EAAE;IACzB,QAAQ,CAAC,eAAe,EAAE;QACxB,EAAE,CAAC,cAAc,EAAE;YACjB,IAAM,OAAO,GAAG,IAAA,cAAK,EAAC,oBAAC,yBAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,gBAAgB,EAAE;QACzB,IAAM,cAAc,GAA2B;YAC7C,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE;gBACR,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,CAAC;wBACR,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE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BACL,IAAA,gBAAO,EACL,oBAAC,yBAAc,IACb,IAAI,wBAAO,cAAc,KAAE,KAAK,EAAE,EAAE,KACpC,kBAAkB,EAAE;4BAClB,OAAO,IAAI,CAAC;wBACd,CAAC,GACD,CACH,CAAC;gBACJ,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAW,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/cjs/setupTests.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
exports.__esModule = true;
|
|
6
|
-
var enzyme_1 = require("enzyme");
|
|
7
|
-
var enzyme_adapter_react_17_1 = __importDefault(require("@wojtekmaj/enzyme-adapter-react-17"));
|
|
8
|
-
(0, enzyme_1.configure)({
|
|
9
|
-
adapter: new enzyme_adapter_react_17_1["default"]()
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=setupTests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/setupTests.ts"],"names":[],"mappings":";;;;;AAAA,iCAAmC;AACnC,+FAAyD;AAEzD,IAAA,kBAAS,EAAC;IACR,OAAO,EAAE,IAAI,oCAAO,EAAE;CACvB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'intersection-observer';
|