@tandem-language-exchange/content-store 1.2.20 → 1.2.22
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/dist/sanity-studio.d.ts +11 -0
- package/dist/sanity-studio.js +3256 -0
- package/dist/sanity-studio.js.map +1 -0
- package/dist/sanity.d.ts +1 -10
- package/dist/sanity.js +0 -317
- package/dist/sanity.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,3256 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/client/sanity/studio.tsx
|
|
4
|
+
import { useEffect as useEffect3, useState as useState2 } from "react";
|
|
5
|
+
|
|
6
|
+
// src/client/sanity/config.ts
|
|
7
|
+
import { defineConfig } from "sanity";
|
|
8
|
+
import { structureTool } from "sanity/structure";
|
|
9
|
+
import { documentInternationalization } from "@sanity/document-internationalization";
|
|
10
|
+
import { markdownSchema } from "sanity-plugin-markdown/next";
|
|
11
|
+
import { media } from "sanity-plugin-media";
|
|
12
|
+
import { references, referencesView } from "sanity-plugin-references";
|
|
13
|
+
|
|
14
|
+
// src/shared/sanity/schemaTypes/audioPhrase.ts
|
|
15
|
+
import { defineField, defineType } from "sanity";
|
|
16
|
+
var audioPhrase_default = defineType({
|
|
17
|
+
name: "audioPhrase",
|
|
18
|
+
title: "Audio phrase",
|
|
19
|
+
type: "document",
|
|
20
|
+
fields: [
|
|
21
|
+
defineField({
|
|
22
|
+
name: "locale",
|
|
23
|
+
title: "Locale",
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Set by the document-internationalization plugin.",
|
|
26
|
+
hidden: true,
|
|
27
|
+
readOnly: true
|
|
28
|
+
}),
|
|
29
|
+
defineField({
|
|
30
|
+
name: "contentfulId",
|
|
31
|
+
title: "Contentful ID",
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
34
|
+
hidden: true,
|
|
35
|
+
readOnly: true
|
|
36
|
+
}),
|
|
37
|
+
defineField({
|
|
38
|
+
name: "phrase",
|
|
39
|
+
title: "Phrase",
|
|
40
|
+
type: "string"
|
|
41
|
+
}),
|
|
42
|
+
defineField({
|
|
43
|
+
name: "pronunciation",
|
|
44
|
+
title: "Pronunciation",
|
|
45
|
+
type: "string"
|
|
46
|
+
}),
|
|
47
|
+
defineField({
|
|
48
|
+
name: "translation",
|
|
49
|
+
title: "Translation",
|
|
50
|
+
type: "string"
|
|
51
|
+
}),
|
|
52
|
+
defineField({
|
|
53
|
+
name: "audio",
|
|
54
|
+
title: "Audio",
|
|
55
|
+
type: "image",
|
|
56
|
+
options: { hotspot: true }
|
|
57
|
+
}),
|
|
58
|
+
defineField({
|
|
59
|
+
name: "lang",
|
|
60
|
+
title: "Language",
|
|
61
|
+
type: "string"
|
|
62
|
+
})
|
|
63
|
+
],
|
|
64
|
+
preview: {
|
|
65
|
+
select: {
|
|
66
|
+
title: "phrase",
|
|
67
|
+
locale: "locale"
|
|
68
|
+
},
|
|
69
|
+
prepare(selection) {
|
|
70
|
+
const { title, locale } = selection;
|
|
71
|
+
return {
|
|
72
|
+
title: title ?? "",
|
|
73
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// src/shared/sanity/schemaTypes/banner.ts
|
|
80
|
+
import { defineField as defineField2, defineType as defineType2 } from "sanity";
|
|
81
|
+
var banner_default = defineType2({
|
|
82
|
+
name: "banner",
|
|
83
|
+
title: "Banner",
|
|
84
|
+
type: "document",
|
|
85
|
+
fields: [
|
|
86
|
+
defineField2({
|
|
87
|
+
name: "locale",
|
|
88
|
+
title: "Locale",
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Set by the document-internationalization plugin.",
|
|
91
|
+
hidden: true,
|
|
92
|
+
readOnly: true
|
|
93
|
+
}),
|
|
94
|
+
defineField2({
|
|
95
|
+
name: "contentfulId",
|
|
96
|
+
title: "Contentful ID",
|
|
97
|
+
type: "string",
|
|
98
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
99
|
+
hidden: true,
|
|
100
|
+
readOnly: true
|
|
101
|
+
}),
|
|
102
|
+
defineField2({
|
|
103
|
+
name: "id",
|
|
104
|
+
title: "ID",
|
|
105
|
+
type: "string",
|
|
106
|
+
validation: (rule) => rule.required()
|
|
107
|
+
}),
|
|
108
|
+
defineField2({
|
|
109
|
+
name: "heading",
|
|
110
|
+
title: "Heading",
|
|
111
|
+
type: "string"
|
|
112
|
+
}),
|
|
113
|
+
defineField2({
|
|
114
|
+
name: "body",
|
|
115
|
+
title: "Body",
|
|
116
|
+
type: "text"
|
|
117
|
+
}),
|
|
118
|
+
defineField2({
|
|
119
|
+
name: "links",
|
|
120
|
+
title: "Links",
|
|
121
|
+
type: "array",
|
|
122
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
123
|
+
}),
|
|
124
|
+
defineField2({
|
|
125
|
+
name: "style",
|
|
126
|
+
title: "Style",
|
|
127
|
+
type: "string",
|
|
128
|
+
validation: (rule) => rule.required()
|
|
129
|
+
}),
|
|
130
|
+
defineField2({
|
|
131
|
+
name: "background",
|
|
132
|
+
title: "Background",
|
|
133
|
+
type: "string"
|
|
134
|
+
}),
|
|
135
|
+
defineField2({
|
|
136
|
+
name: "customData",
|
|
137
|
+
title: "Custom Data",
|
|
138
|
+
type: "text",
|
|
139
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
140
|
+
}),
|
|
141
|
+
defineField2({
|
|
142
|
+
name: "devicesToRender",
|
|
143
|
+
title: "Devices To Render",
|
|
144
|
+
type: "array",
|
|
145
|
+
of: [{ type: "string" }]
|
|
146
|
+
})
|
|
147
|
+
],
|
|
148
|
+
preview: {
|
|
149
|
+
select: {
|
|
150
|
+
title: "id",
|
|
151
|
+
locale: "locale"
|
|
152
|
+
},
|
|
153
|
+
prepare(selection) {
|
|
154
|
+
const { title, locale } = selection;
|
|
155
|
+
return {
|
|
156
|
+
title: title ?? "",
|
|
157
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// src/shared/sanity/schemaTypes/blogGetAppBanner.ts
|
|
164
|
+
import { defineField as defineField3, defineType as defineType3 } from "sanity";
|
|
165
|
+
var blogGetAppBanner_default = defineType3({
|
|
166
|
+
name: "blogGetAppBanner",
|
|
167
|
+
title: "Blog Post Get App Banner",
|
|
168
|
+
type: "document",
|
|
169
|
+
fields: [
|
|
170
|
+
defineField3({
|
|
171
|
+
name: "locale",
|
|
172
|
+
title: "Locale",
|
|
173
|
+
type: "string",
|
|
174
|
+
description: "Set by the document-internationalization plugin.",
|
|
175
|
+
hidden: true,
|
|
176
|
+
readOnly: true
|
|
177
|
+
}),
|
|
178
|
+
defineField3({
|
|
179
|
+
name: "contentfulId",
|
|
180
|
+
title: "Contentful ID",
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Original Contentful entry ID; used to resolve references when migrating blog posts.",
|
|
183
|
+
hidden: true,
|
|
184
|
+
readOnly: true
|
|
185
|
+
}),
|
|
186
|
+
defineField3({
|
|
187
|
+
name: "title",
|
|
188
|
+
title: "Title",
|
|
189
|
+
type: "string",
|
|
190
|
+
validation: (rule) => rule.required()
|
|
191
|
+
}),
|
|
192
|
+
defineField3({
|
|
193
|
+
name: "body",
|
|
194
|
+
title: "Body",
|
|
195
|
+
type: "text"
|
|
196
|
+
}),
|
|
197
|
+
defineField3({
|
|
198
|
+
name: "image",
|
|
199
|
+
title: "Image",
|
|
200
|
+
type: "image",
|
|
201
|
+
options: { hotspot: true }
|
|
202
|
+
}),
|
|
203
|
+
defineField3({
|
|
204
|
+
name: "mobileImage",
|
|
205
|
+
title: "Mobile Image",
|
|
206
|
+
type: "image",
|
|
207
|
+
options: { hotspot: true }
|
|
208
|
+
}),
|
|
209
|
+
defineField3({
|
|
210
|
+
name: "qrCode",
|
|
211
|
+
title: "QR code",
|
|
212
|
+
type: "image",
|
|
213
|
+
options: { hotspot: true }
|
|
214
|
+
}),
|
|
215
|
+
defineField3({
|
|
216
|
+
name: "links",
|
|
217
|
+
title: "Links",
|
|
218
|
+
type: "array",
|
|
219
|
+
of: [{ type: "reference", to: [{ type: "button" }] }]
|
|
220
|
+
}),
|
|
221
|
+
defineField3({
|
|
222
|
+
name: "mobLinks",
|
|
223
|
+
title: "Mobile Links",
|
|
224
|
+
type: "array",
|
|
225
|
+
of: [{ type: "reference", to: [{ type: "button" }] }]
|
|
226
|
+
}),
|
|
227
|
+
defineField3({
|
|
228
|
+
name: "background",
|
|
229
|
+
title: "Background",
|
|
230
|
+
type: "string",
|
|
231
|
+
options: {
|
|
232
|
+
list: [
|
|
233
|
+
{ title: "Transparent", value: "transparent" },
|
|
234
|
+
{ title: "Light", value: "light" },
|
|
235
|
+
{ title: "Dark", value: "dark" }
|
|
236
|
+
],
|
|
237
|
+
layout: "radio"
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
],
|
|
241
|
+
preview: {
|
|
242
|
+
select: {
|
|
243
|
+
title: "title",
|
|
244
|
+
locale: "locale"
|
|
245
|
+
},
|
|
246
|
+
prepare(selection) {
|
|
247
|
+
const { title, locale } = selection;
|
|
248
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
249
|
+
return {
|
|
250
|
+
title: title ?? "",
|
|
251
|
+
subtitle: localeSuffix
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// src/shared/sanity/schemaTypes/blogLanguagesSidebar.ts
|
|
258
|
+
import { defineField as defineField4, defineType as defineType4 } from "sanity";
|
|
259
|
+
var blogLanguagesSidebar_default = defineType4({
|
|
260
|
+
name: "blogLanguagesSidebar",
|
|
261
|
+
title: "Blog Languages Sidebar",
|
|
262
|
+
type: "document",
|
|
263
|
+
fields: [
|
|
264
|
+
defineField4({
|
|
265
|
+
name: "locale",
|
|
266
|
+
title: "Locale",
|
|
267
|
+
type: "string",
|
|
268
|
+
description: "Set by the document-internationalization plugin.",
|
|
269
|
+
hidden: true,
|
|
270
|
+
readOnly: true
|
|
271
|
+
}),
|
|
272
|
+
defineField4({
|
|
273
|
+
name: "title",
|
|
274
|
+
title: "Title",
|
|
275
|
+
type: "string",
|
|
276
|
+
validation: (rule) => rule.required()
|
|
277
|
+
}),
|
|
278
|
+
defineField4({
|
|
279
|
+
name: "languages",
|
|
280
|
+
title: "Languages",
|
|
281
|
+
type: "array",
|
|
282
|
+
description: "Languages that are available for practice",
|
|
283
|
+
of: [{ type: "string" }],
|
|
284
|
+
validation: (rule) => rule.required()
|
|
285
|
+
})
|
|
286
|
+
],
|
|
287
|
+
preview: {
|
|
288
|
+
select: {
|
|
289
|
+
title: "title",
|
|
290
|
+
locale: "locale"
|
|
291
|
+
},
|
|
292
|
+
prepare(selection) {
|
|
293
|
+
const { title, locale } = selection;
|
|
294
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
295
|
+
return {
|
|
296
|
+
title: title ?? "",
|
|
297
|
+
subtitle: localeSuffix
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
|
|
303
|
+
// src/shared/sanity/schemaTypes/blogPopup.ts
|
|
304
|
+
import { defineField as defineField5, defineType as defineType5 } from "sanity";
|
|
305
|
+
var blogPopup_default = defineType5({
|
|
306
|
+
name: "blogPopup",
|
|
307
|
+
title: "Blog Popup",
|
|
308
|
+
type: "document",
|
|
309
|
+
fields: [
|
|
310
|
+
defineField5({
|
|
311
|
+
name: "locale",
|
|
312
|
+
title: "Locale",
|
|
313
|
+
type: "string",
|
|
314
|
+
description: "Set by the document-internationalization plugin.",
|
|
315
|
+
hidden: true,
|
|
316
|
+
readOnly: true
|
|
317
|
+
}),
|
|
318
|
+
defineField5({
|
|
319
|
+
name: "contentfulId",
|
|
320
|
+
title: "Contentful ID",
|
|
321
|
+
type: "string",
|
|
322
|
+
description: "Original Contentful entry ID; used to resolve references when migrating blog posts.",
|
|
323
|
+
hidden: true,
|
|
324
|
+
readOnly: true
|
|
325
|
+
}),
|
|
326
|
+
defineField5({
|
|
327
|
+
name: "title",
|
|
328
|
+
title: "Title",
|
|
329
|
+
type: "string",
|
|
330
|
+
validation: (rule) => rule.required()
|
|
331
|
+
}),
|
|
332
|
+
defineField5({
|
|
333
|
+
name: "body",
|
|
334
|
+
title: "Body",
|
|
335
|
+
type: "text"
|
|
336
|
+
}),
|
|
337
|
+
defineField5({
|
|
338
|
+
name: "image",
|
|
339
|
+
title: "Image",
|
|
340
|
+
type: "image",
|
|
341
|
+
options: { hotspot: true }
|
|
342
|
+
}),
|
|
343
|
+
defineField5({
|
|
344
|
+
name: "mobileImage",
|
|
345
|
+
title: "Mobile Image",
|
|
346
|
+
type: "image",
|
|
347
|
+
options: { hotspot: true }
|
|
348
|
+
}),
|
|
349
|
+
defineField5({
|
|
350
|
+
name: "qrCode",
|
|
351
|
+
title: "QR Code",
|
|
352
|
+
type: "image",
|
|
353
|
+
options: { hotspot: true }
|
|
354
|
+
}),
|
|
355
|
+
defineField5({
|
|
356
|
+
name: "links",
|
|
357
|
+
title: "Links",
|
|
358
|
+
type: "array",
|
|
359
|
+
of: [{ type: "reference", to: [{ type: "button" }] }]
|
|
360
|
+
}),
|
|
361
|
+
defineField5({
|
|
362
|
+
name: "mobLinks",
|
|
363
|
+
title: "Mobile Links",
|
|
364
|
+
type: "array",
|
|
365
|
+
of: [{ type: "reference", to: [{ type: "button" }] }]
|
|
366
|
+
})
|
|
367
|
+
],
|
|
368
|
+
preview: {
|
|
369
|
+
select: {
|
|
370
|
+
title: "title",
|
|
371
|
+
locale: "locale"
|
|
372
|
+
},
|
|
373
|
+
prepare(selection) {
|
|
374
|
+
const { title, locale } = selection;
|
|
375
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
376
|
+
return {
|
|
377
|
+
title: title ?? "",
|
|
378
|
+
subtitle: localeSuffix
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
// src/shared/sanity/schemaTypes/blogPost.ts
|
|
385
|
+
import { defineField as defineField6, defineType as defineType6 } from "sanity";
|
|
386
|
+
|
|
387
|
+
// src/shared/sanity/schemaTypes/validation/validateValidSlugOrUrl.ts
|
|
388
|
+
var asRule = (rule) => rule;
|
|
389
|
+
var isSlug = (v) => v.startsWith("/") && !v.startsWith("//");
|
|
390
|
+
var isAbsoluteUrl = (v) => {
|
|
391
|
+
try {
|
|
392
|
+
new URL(v);
|
|
393
|
+
return true;
|
|
394
|
+
} catch {
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
var message = (slug, absolute) => {
|
|
399
|
+
if (slug && absolute) return "Use a path starting with / or a valid URL";
|
|
400
|
+
if (slug) return "Use a path starting with / (e.g. /blog/my-post)";
|
|
401
|
+
return "Enter a valid URL";
|
|
402
|
+
};
|
|
403
|
+
var slugOrUrlRules = (rule, options) => {
|
|
404
|
+
const { slug, absolute, required = true } = options;
|
|
405
|
+
if (!slug && !absolute) {
|
|
406
|
+
throw new Error("slugOrUrlRules: set slug and/or absolute to true");
|
|
407
|
+
}
|
|
408
|
+
const r = asRule(rule);
|
|
409
|
+
const custom = (value) => {
|
|
410
|
+
if (typeof value !== "string" || !value.trim()) return true;
|
|
411
|
+
const v = value.trim();
|
|
412
|
+
if (slug && isSlug(v)) return true;
|
|
413
|
+
if (absolute && isAbsoluteUrl(v)) return true;
|
|
414
|
+
return message(slug, absolute);
|
|
415
|
+
};
|
|
416
|
+
return required ? [r.required(), r.custom(custom)] : [r.custom(custom)];
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// src/shared/sanity/schemaTypes/blogPost.ts
|
|
420
|
+
var blogPost_default = defineType6({
|
|
421
|
+
name: "blogPost",
|
|
422
|
+
title: "Blog Post",
|
|
423
|
+
type: "document",
|
|
424
|
+
fields: [
|
|
425
|
+
defineField6({
|
|
426
|
+
name: "locale",
|
|
427
|
+
title: "Locale",
|
|
428
|
+
type: "string",
|
|
429
|
+
description: "Set by the document-internationalization plugin.",
|
|
430
|
+
hidden: true,
|
|
431
|
+
readOnly: true
|
|
432
|
+
}),
|
|
433
|
+
defineField6({
|
|
434
|
+
name: "contentfulId",
|
|
435
|
+
title: "Contentful ID",
|
|
436
|
+
type: "string",
|
|
437
|
+
description: "Original Contentful entry ID; used to resolve references.",
|
|
438
|
+
hidden: true,
|
|
439
|
+
readOnly: true
|
|
440
|
+
}),
|
|
441
|
+
defineField6({
|
|
442
|
+
name: "title",
|
|
443
|
+
title: "Title",
|
|
444
|
+
type: "string",
|
|
445
|
+
validation: (rule) => rule.required()
|
|
446
|
+
}),
|
|
447
|
+
defineField6({
|
|
448
|
+
name: "slug",
|
|
449
|
+
title: "Slug",
|
|
450
|
+
type: "string",
|
|
451
|
+
description: "URL path (e.g. /blog/my-post).",
|
|
452
|
+
validation: (rule) => [
|
|
453
|
+
...slugOrUrlRules(rule, { slug: true, absolute: false }),
|
|
454
|
+
rule.custom(async (value, context) => {
|
|
455
|
+
if (!value) return true;
|
|
456
|
+
const { document, getClient } = context;
|
|
457
|
+
const client = getClient({ apiVersion: "2024-01-01" });
|
|
458
|
+
const id = document?._id.replace(/^drafts\./, "");
|
|
459
|
+
const count = await client.fetch(
|
|
460
|
+
'count(*[_type == "blogPost" && slug == $slug && !(_id in [$draftId, $publishedId])])',
|
|
461
|
+
{ slug: value, draftId: `drafts.${id}`, publishedId: id }
|
|
462
|
+
);
|
|
463
|
+
return count > 0 ? "A blog post with this slug already exists." : true;
|
|
464
|
+
})
|
|
465
|
+
]
|
|
466
|
+
}),
|
|
467
|
+
defineField6({
|
|
468
|
+
name: "heroImage",
|
|
469
|
+
title: "Hero Image",
|
|
470
|
+
type: "reference",
|
|
471
|
+
to: [{ type: "heroImage" }],
|
|
472
|
+
validation: (rule) => rule.required()
|
|
473
|
+
}),
|
|
474
|
+
defineField6({
|
|
475
|
+
name: "thumbnailDescription",
|
|
476
|
+
title: "Thumbnail description",
|
|
477
|
+
type: "markdown",
|
|
478
|
+
description: "Markdown content for the blog card/thumbnail.",
|
|
479
|
+
validation: (rule) => rule.required()
|
|
480
|
+
}),
|
|
481
|
+
defineField6({
|
|
482
|
+
name: "body",
|
|
483
|
+
title: "Body",
|
|
484
|
+
type: "markdown",
|
|
485
|
+
description: "Markdown content (GitHub-flavoured). Supports image uploads.",
|
|
486
|
+
validation: (rule) => rule.required()
|
|
487
|
+
}),
|
|
488
|
+
defineField6({
|
|
489
|
+
name: "author",
|
|
490
|
+
title: "Author",
|
|
491
|
+
type: "string"
|
|
492
|
+
}),
|
|
493
|
+
defineField6({
|
|
494
|
+
name: "publishDate",
|
|
495
|
+
title: "Publish Date",
|
|
496
|
+
type: "datetime",
|
|
497
|
+
validation: (rule) => rule.required()
|
|
498
|
+
}),
|
|
499
|
+
defineField6({
|
|
500
|
+
name: "category",
|
|
501
|
+
title: "Category",
|
|
502
|
+
type: "string",
|
|
503
|
+
options: {
|
|
504
|
+
list: [
|
|
505
|
+
"culture",
|
|
506
|
+
"language",
|
|
507
|
+
"tandem-tales",
|
|
508
|
+
"tandem-tips",
|
|
509
|
+
"general",
|
|
510
|
+
"tandem-app",
|
|
511
|
+
"how-to-speak-spanish",
|
|
512
|
+
"how-to-speak-german",
|
|
513
|
+
"how-to-speak-french",
|
|
514
|
+
"how-to-speak-japanese",
|
|
515
|
+
"how-to-speak-russian",
|
|
516
|
+
"how-to-speak-italian",
|
|
517
|
+
"how-to-speak-korean",
|
|
518
|
+
"how-to-speak-portuguese"
|
|
519
|
+
].map((value) => ({ title: value, value }))
|
|
520
|
+
},
|
|
521
|
+
validation: (rule) => rule.required()
|
|
522
|
+
}),
|
|
523
|
+
defineField6({
|
|
524
|
+
name: "tags",
|
|
525
|
+
title: "Tags",
|
|
526
|
+
type: "array",
|
|
527
|
+
of: [{ type: "string" }],
|
|
528
|
+
options: {
|
|
529
|
+
list: [
|
|
530
|
+
"Pronouns",
|
|
531
|
+
"Adjectives",
|
|
532
|
+
"Accents",
|
|
533
|
+
"Nouns",
|
|
534
|
+
"Alphabet",
|
|
535
|
+
"Japanese",
|
|
536
|
+
"Russian",
|
|
537
|
+
"Verbs",
|
|
538
|
+
"Spanish",
|
|
539
|
+
"French",
|
|
540
|
+
"German",
|
|
541
|
+
"Korean",
|
|
542
|
+
"Italian"
|
|
543
|
+
].map((value) => ({ title: value, value }))
|
|
544
|
+
}
|
|
545
|
+
}),
|
|
546
|
+
defineField6({
|
|
547
|
+
name: "metaTitle",
|
|
548
|
+
title: "Meta Title",
|
|
549
|
+
type: "text"
|
|
550
|
+
}),
|
|
551
|
+
defineField6({
|
|
552
|
+
name: "metaDescription",
|
|
553
|
+
title: "Meta Description",
|
|
554
|
+
type: "text"
|
|
555
|
+
}),
|
|
556
|
+
defineField6({
|
|
557
|
+
name: "metaKeywords",
|
|
558
|
+
title: "Meta Keywords",
|
|
559
|
+
type: "array",
|
|
560
|
+
of: [{ type: "string" }]
|
|
561
|
+
}),
|
|
562
|
+
defineField6({
|
|
563
|
+
name: "linkedPosts",
|
|
564
|
+
title: "Linked Posts",
|
|
565
|
+
type: "array",
|
|
566
|
+
description: "Same post in other locales (translations).",
|
|
567
|
+
of: [{ type: "reference", to: [{ type: "blogPost" }] }]
|
|
568
|
+
}),
|
|
569
|
+
defineField6({
|
|
570
|
+
name: "previewImage",
|
|
571
|
+
title: "Preview image",
|
|
572
|
+
type: "image",
|
|
573
|
+
options: { hotspot: true }
|
|
574
|
+
}),
|
|
575
|
+
defineField6({
|
|
576
|
+
name: "imageAlt",
|
|
577
|
+
title: "Image Alt Text",
|
|
578
|
+
description: "Used for the blog card/thumbnail preview.",
|
|
579
|
+
type: "string"
|
|
580
|
+
}),
|
|
581
|
+
defineField6({
|
|
582
|
+
name: "cta",
|
|
583
|
+
title: "CTA",
|
|
584
|
+
type: "reference",
|
|
585
|
+
to: [{ type: "blogGetAppBanner" }]
|
|
586
|
+
}),
|
|
587
|
+
defineField6({
|
|
588
|
+
name: "smartBannerAdjustLink",
|
|
589
|
+
title: "Smart Banner Adjust Link",
|
|
590
|
+
type: "string",
|
|
591
|
+
description: "Adjust or other https URL, or an internal path starting with /.",
|
|
592
|
+
validation: (rule) => slugOrUrlRules(rule, { slug: true, absolute: true, required: false })
|
|
593
|
+
}),
|
|
594
|
+
defineField6({
|
|
595
|
+
name: "hideBlogPopup",
|
|
596
|
+
title: "Hide Blog Popup",
|
|
597
|
+
type: "boolean"
|
|
598
|
+
}),
|
|
599
|
+
defineField6({
|
|
600
|
+
name: "structuredData",
|
|
601
|
+
title: "Structured Data",
|
|
602
|
+
type: "text",
|
|
603
|
+
description: "Plain JSON (e.g. for SEO structured data).",
|
|
604
|
+
validation: (rule) => rule.custom((value) => {
|
|
605
|
+
if (value == null || value === "") return true;
|
|
606
|
+
try {
|
|
607
|
+
JSON.parse(value);
|
|
608
|
+
return true;
|
|
609
|
+
} catch {
|
|
610
|
+
return "Must be valid JSON";
|
|
611
|
+
}
|
|
612
|
+
})
|
|
613
|
+
})
|
|
614
|
+
],
|
|
615
|
+
preview: {
|
|
616
|
+
select: {
|
|
617
|
+
title: "title",
|
|
618
|
+
locale: "locale"
|
|
619
|
+
},
|
|
620
|
+
prepare(selection) {
|
|
621
|
+
const { title, locale } = selection;
|
|
622
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
623
|
+
return {
|
|
624
|
+
title: title ?? "",
|
|
625
|
+
subtitle: localeSuffix
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
// src/shared/sanity/schemaTypes/blogThumbs.ts
|
|
632
|
+
import { defineField as defineField7, defineType as defineType7 } from "sanity";
|
|
633
|
+
var blogThumbs_default = defineType7({
|
|
634
|
+
name: "blogThumbs",
|
|
635
|
+
title: "Blog thumbs",
|
|
636
|
+
type: "document",
|
|
637
|
+
fields: [
|
|
638
|
+
defineField7({
|
|
639
|
+
name: "locale",
|
|
640
|
+
title: "Locale",
|
|
641
|
+
type: "string",
|
|
642
|
+
description: "Set by the document-internationalization plugin.",
|
|
643
|
+
hidden: true,
|
|
644
|
+
readOnly: true
|
|
645
|
+
}),
|
|
646
|
+
defineField7({
|
|
647
|
+
name: "contentfulId",
|
|
648
|
+
title: "Contentful ID",
|
|
649
|
+
type: "string",
|
|
650
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
651
|
+
hidden: true,
|
|
652
|
+
readOnly: true
|
|
653
|
+
}),
|
|
654
|
+
defineField7({
|
|
655
|
+
name: "id",
|
|
656
|
+
title: "ID",
|
|
657
|
+
type: "string"
|
|
658
|
+
}),
|
|
659
|
+
defineField7({
|
|
660
|
+
name: "title",
|
|
661
|
+
title: "Title",
|
|
662
|
+
type: "string"
|
|
663
|
+
}),
|
|
664
|
+
defineField7({
|
|
665
|
+
name: "post1",
|
|
666
|
+
title: "Post 1",
|
|
667
|
+
type: "string"
|
|
668
|
+
}),
|
|
669
|
+
defineField7({
|
|
670
|
+
name: "post2",
|
|
671
|
+
title: "Post 2",
|
|
672
|
+
type: "string"
|
|
673
|
+
}),
|
|
674
|
+
defineField7({
|
|
675
|
+
name: "post3",
|
|
676
|
+
title: "Post 3",
|
|
677
|
+
type: "string"
|
|
678
|
+
}),
|
|
679
|
+
defineField7({
|
|
680
|
+
name: "style",
|
|
681
|
+
title: "Style",
|
|
682
|
+
type: "string"
|
|
683
|
+
})
|
|
684
|
+
],
|
|
685
|
+
preview: {
|
|
686
|
+
select: {
|
|
687
|
+
title: "id",
|
|
688
|
+
locale: "locale"
|
|
689
|
+
},
|
|
690
|
+
prepare(selection) {
|
|
691
|
+
const { title, locale } = selection;
|
|
692
|
+
return {
|
|
693
|
+
title: title ?? "",
|
|
694
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
// src/shared/sanity/schemaTypes/columnizedText.ts
|
|
701
|
+
import { defineField as defineField8, defineType as defineType8 } from "sanity";
|
|
702
|
+
var columnizedText_default = defineType8({
|
|
703
|
+
name: "columnizedText",
|
|
704
|
+
title: "Columnized text",
|
|
705
|
+
type: "document",
|
|
706
|
+
fields: [
|
|
707
|
+
defineField8({
|
|
708
|
+
name: "locale",
|
|
709
|
+
title: "Locale",
|
|
710
|
+
type: "string",
|
|
711
|
+
description: "Set by the document-internationalization plugin.",
|
|
712
|
+
hidden: true,
|
|
713
|
+
readOnly: true
|
|
714
|
+
}),
|
|
715
|
+
defineField8({
|
|
716
|
+
name: "contentfulId",
|
|
717
|
+
title: "Contentful ID",
|
|
718
|
+
type: "string",
|
|
719
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
720
|
+
hidden: true,
|
|
721
|
+
readOnly: true
|
|
722
|
+
}),
|
|
723
|
+
defineField8({
|
|
724
|
+
name: "id",
|
|
725
|
+
title: "ID",
|
|
726
|
+
type: "string"
|
|
727
|
+
}),
|
|
728
|
+
defineField8({
|
|
729
|
+
name: "title",
|
|
730
|
+
title: "Title",
|
|
731
|
+
type: "string"
|
|
732
|
+
}),
|
|
733
|
+
defineField8({
|
|
734
|
+
name: "column1",
|
|
735
|
+
title: "Column 1",
|
|
736
|
+
type: "text",
|
|
737
|
+
validation: (rule) => rule.required()
|
|
738
|
+
}),
|
|
739
|
+
defineField8({
|
|
740
|
+
name: "column2",
|
|
741
|
+
title: "Column 2",
|
|
742
|
+
type: "text"
|
|
743
|
+
}),
|
|
744
|
+
defineField8({
|
|
745
|
+
name: "column3",
|
|
746
|
+
title: "Column 3",
|
|
747
|
+
type: "text"
|
|
748
|
+
}),
|
|
749
|
+
defineField8({
|
|
750
|
+
name: "background",
|
|
751
|
+
title: "Background",
|
|
752
|
+
type: "string"
|
|
753
|
+
}),
|
|
754
|
+
defineField8({
|
|
755
|
+
name: "alignButtonLeft",
|
|
756
|
+
title: "Align Button Left",
|
|
757
|
+
type: "boolean"
|
|
758
|
+
}),
|
|
759
|
+
defineField8({
|
|
760
|
+
name: "ctaLinks",
|
|
761
|
+
title: "CTA links",
|
|
762
|
+
type: "array",
|
|
763
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
764
|
+
}),
|
|
765
|
+
defineField8({
|
|
766
|
+
name: "mobileCtaLinks",
|
|
767
|
+
title: "Mobile CTA links",
|
|
768
|
+
type: "array",
|
|
769
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
770
|
+
}),
|
|
771
|
+
defineField8({
|
|
772
|
+
name: "buttonText",
|
|
773
|
+
title: "Button Text",
|
|
774
|
+
type: "string"
|
|
775
|
+
}),
|
|
776
|
+
defineField8({
|
|
777
|
+
name: "buttonLink",
|
|
778
|
+
title: "Button Link",
|
|
779
|
+
type: "string"
|
|
780
|
+
}),
|
|
781
|
+
defineField8({
|
|
782
|
+
name: "buttonStyle",
|
|
783
|
+
title: "buttonStyle",
|
|
784
|
+
type: "string"
|
|
785
|
+
}),
|
|
786
|
+
defineField8({
|
|
787
|
+
name: "invertButton",
|
|
788
|
+
title: "Invert button",
|
|
789
|
+
type: "boolean"
|
|
790
|
+
})
|
|
791
|
+
],
|
|
792
|
+
preview: {
|
|
793
|
+
select: {
|
|
794
|
+
title: "id",
|
|
795
|
+
locale: "locale"
|
|
796
|
+
},
|
|
797
|
+
prepare(selection) {
|
|
798
|
+
const { title, locale } = selection;
|
|
799
|
+
return {
|
|
800
|
+
title: title ?? "",
|
|
801
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
// src/shared/sanity/schemaTypes/cookieBanner.ts
|
|
808
|
+
import { defineField as defineField9, defineType as defineType9 } from "sanity";
|
|
809
|
+
var cookieBanner_default = defineType9({
|
|
810
|
+
name: "cookieBanner",
|
|
811
|
+
title: "Cookie Banner",
|
|
812
|
+
type: "document",
|
|
813
|
+
fields: [
|
|
814
|
+
defineField9({
|
|
815
|
+
name: "locale",
|
|
816
|
+
title: "Locale",
|
|
817
|
+
type: "string",
|
|
818
|
+
description: "Set by the document-internationalization plugin.",
|
|
819
|
+
hidden: true,
|
|
820
|
+
readOnly: true
|
|
821
|
+
}),
|
|
822
|
+
defineField9({
|
|
823
|
+
name: "contentfulId",
|
|
824
|
+
title: "Contentful ID",
|
|
825
|
+
type: "string",
|
|
826
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
827
|
+
hidden: true,
|
|
828
|
+
readOnly: true
|
|
829
|
+
}),
|
|
830
|
+
defineField9({
|
|
831
|
+
name: "client",
|
|
832
|
+
title: "Client",
|
|
833
|
+
type: "string",
|
|
834
|
+
validation: (rule) => rule.required()
|
|
835
|
+
}),
|
|
836
|
+
defineField9({
|
|
837
|
+
name: "entryId",
|
|
838
|
+
title: "Entry ID",
|
|
839
|
+
type: "string",
|
|
840
|
+
validation: (rule) => rule.required()
|
|
841
|
+
}),
|
|
842
|
+
defineField9({
|
|
843
|
+
name: "body",
|
|
844
|
+
title: "Body",
|
|
845
|
+
type: "text",
|
|
846
|
+
validation: (rule) => rule.required()
|
|
847
|
+
}),
|
|
848
|
+
defineField9({
|
|
849
|
+
name: "settingsLinks",
|
|
850
|
+
title: "Settings Links",
|
|
851
|
+
type: "array",
|
|
852
|
+
of: [{ type: "reference", to: [{ type: "link" }] }],
|
|
853
|
+
validation: (rule) => rule.required()
|
|
854
|
+
}),
|
|
855
|
+
defineField9({
|
|
856
|
+
name: "settingsHeading",
|
|
857
|
+
title: "Settings Heading",
|
|
858
|
+
type: "string",
|
|
859
|
+
validation: (rule) => rule.required()
|
|
860
|
+
}),
|
|
861
|
+
defineField9({
|
|
862
|
+
name: "cookiesHeading",
|
|
863
|
+
title: "Cookies Heading",
|
|
864
|
+
type: "string",
|
|
865
|
+
validation: (rule) => rule.required()
|
|
866
|
+
}),
|
|
867
|
+
defineField9({
|
|
868
|
+
name: "categories",
|
|
869
|
+
title: "Categories",
|
|
870
|
+
type: "text",
|
|
871
|
+
description: "JSON data (migrated from Contentful Object field).",
|
|
872
|
+
validation: (rule) => rule.required()
|
|
873
|
+
}),
|
|
874
|
+
defineField9({
|
|
875
|
+
name: "cookies",
|
|
876
|
+
title: "Cookies",
|
|
877
|
+
type: "text",
|
|
878
|
+
description: "JSON data (migrated from Contentful Object field).",
|
|
879
|
+
validation: (rule) => rule.required()
|
|
880
|
+
}),
|
|
881
|
+
defineField9({
|
|
882
|
+
name: "settings",
|
|
883
|
+
title: "Settings",
|
|
884
|
+
type: "text",
|
|
885
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
886
|
+
}),
|
|
887
|
+
defineField9({
|
|
888
|
+
name: "performanceScripts",
|
|
889
|
+
title: "Performance Scripts",
|
|
890
|
+
type: "image",
|
|
891
|
+
options: { hotspot: true }
|
|
892
|
+
}),
|
|
893
|
+
defineField9({
|
|
894
|
+
name: "functionalScripts",
|
|
895
|
+
title: "Functional Scripts",
|
|
896
|
+
type: "image",
|
|
897
|
+
options: { hotspot: true }
|
|
898
|
+
}),
|
|
899
|
+
defineField9({
|
|
900
|
+
name: "advertisingScripts",
|
|
901
|
+
title: "Advertising Scripts",
|
|
902
|
+
type: "image",
|
|
903
|
+
options: { hotspot: true }
|
|
904
|
+
})
|
|
905
|
+
],
|
|
906
|
+
preview: {
|
|
907
|
+
select: {
|
|
908
|
+
title: "entryId",
|
|
909
|
+
locale: "locale"
|
|
910
|
+
},
|
|
911
|
+
prepare(selection) {
|
|
912
|
+
const { title, locale } = selection;
|
|
913
|
+
return {
|
|
914
|
+
title: title ?? "",
|
|
915
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
// src/shared/sanity/schemaTypes/customJson.ts
|
|
922
|
+
import { defineField as defineField10, defineType as defineType10 } from "sanity";
|
|
923
|
+
var customJson_default = defineType10({
|
|
924
|
+
name: "customJson",
|
|
925
|
+
title: "Custom JSON",
|
|
926
|
+
type: "document",
|
|
927
|
+
fields: [
|
|
928
|
+
defineField10({
|
|
929
|
+
name: "locale",
|
|
930
|
+
title: "Locale",
|
|
931
|
+
type: "string",
|
|
932
|
+
description: "Set by the document-internationalization plugin.",
|
|
933
|
+
hidden: true,
|
|
934
|
+
readOnly: true
|
|
935
|
+
}),
|
|
936
|
+
defineField10({
|
|
937
|
+
name: "contentfulId",
|
|
938
|
+
title: "Contentful ID",
|
|
939
|
+
type: "string",
|
|
940
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
941
|
+
hidden: true,
|
|
942
|
+
readOnly: true
|
|
943
|
+
}),
|
|
944
|
+
defineField10({
|
|
945
|
+
name: "title",
|
|
946
|
+
title: "Title",
|
|
947
|
+
type: "string",
|
|
948
|
+
validation: (rule) => rule.required()
|
|
949
|
+
}),
|
|
950
|
+
defineField10({
|
|
951
|
+
name: "json",
|
|
952
|
+
title: "json",
|
|
953
|
+
type: "text",
|
|
954
|
+
description: "JSON data (migrated from Contentful Object field).",
|
|
955
|
+
validation: (rule) => rule.required()
|
|
956
|
+
})
|
|
957
|
+
],
|
|
958
|
+
preview: {
|
|
959
|
+
select: {
|
|
960
|
+
title: "title",
|
|
961
|
+
locale: "locale"
|
|
962
|
+
},
|
|
963
|
+
prepare(selection) {
|
|
964
|
+
const { title, locale } = selection;
|
|
965
|
+
return {
|
|
966
|
+
title: title ?? "",
|
|
967
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
});
|
|
972
|
+
|
|
973
|
+
// src/shared/sanity/schemaTypes/downloadPage.ts
|
|
974
|
+
import { defineField as defineField11, defineType as defineType11 } from "sanity";
|
|
975
|
+
var downloadPage_default = defineType11({
|
|
976
|
+
name: "downloadPage",
|
|
977
|
+
title: "Download Page",
|
|
978
|
+
type: "document",
|
|
979
|
+
fields: [
|
|
980
|
+
defineField11({
|
|
981
|
+
name: "locale",
|
|
982
|
+
title: "Locale",
|
|
983
|
+
type: "string",
|
|
984
|
+
description: "Set by the document-internationalization plugin.",
|
|
985
|
+
hidden: true,
|
|
986
|
+
readOnly: true
|
|
987
|
+
}),
|
|
988
|
+
defineField11({
|
|
989
|
+
name: "contentfulId",
|
|
990
|
+
title: "Contentful ID",
|
|
991
|
+
type: "string",
|
|
992
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
993
|
+
hidden: true,
|
|
994
|
+
readOnly: true
|
|
995
|
+
}),
|
|
996
|
+
defineField11({
|
|
997
|
+
name: "name",
|
|
998
|
+
title: "Name",
|
|
999
|
+
type: "string",
|
|
1000
|
+
validation: (rule) => rule.required()
|
|
1001
|
+
}),
|
|
1002
|
+
defineField11({
|
|
1003
|
+
name: "slug",
|
|
1004
|
+
title: "Slug",
|
|
1005
|
+
type: "string",
|
|
1006
|
+
validation: (rule) => rule.required()
|
|
1007
|
+
}),
|
|
1008
|
+
defineField11({
|
|
1009
|
+
name: "title",
|
|
1010
|
+
title: "Title",
|
|
1011
|
+
type: "string",
|
|
1012
|
+
validation: (rule) => rule.required()
|
|
1013
|
+
}),
|
|
1014
|
+
defineField11({
|
|
1015
|
+
name: "description",
|
|
1016
|
+
title: "Description",
|
|
1017
|
+
type: "text",
|
|
1018
|
+
validation: (rule) => rule.required()
|
|
1019
|
+
}),
|
|
1020
|
+
defineField11({
|
|
1021
|
+
name: "image",
|
|
1022
|
+
title: "Image",
|
|
1023
|
+
type: "image",
|
|
1024
|
+
options: { hotspot: true },
|
|
1025
|
+
validation: (rule) => rule.required()
|
|
1026
|
+
}),
|
|
1027
|
+
defineField11({
|
|
1028
|
+
name: "buttonLabel",
|
|
1029
|
+
title: "Button Label",
|
|
1030
|
+
type: "string",
|
|
1031
|
+
validation: (rule) => rule.required()
|
|
1032
|
+
}),
|
|
1033
|
+
defineField11({
|
|
1034
|
+
name: "url",
|
|
1035
|
+
title: "URL",
|
|
1036
|
+
type: "string",
|
|
1037
|
+
validation: (rule) => rule.required()
|
|
1038
|
+
}),
|
|
1039
|
+
defineField11({
|
|
1040
|
+
name: "colourScheme",
|
|
1041
|
+
title: "Colour Scheme",
|
|
1042
|
+
type: "string",
|
|
1043
|
+
validation: (rule) => rule.required()
|
|
1044
|
+
}),
|
|
1045
|
+
defineField11({
|
|
1046
|
+
name: "destination",
|
|
1047
|
+
title: "Destination",
|
|
1048
|
+
type: "string",
|
|
1049
|
+
validation: (rule) => rule.required()
|
|
1050
|
+
}),
|
|
1051
|
+
defineField11({
|
|
1052
|
+
name: "metaTitle",
|
|
1053
|
+
title: "Meta Title",
|
|
1054
|
+
type: "string",
|
|
1055
|
+
validation: (rule) => rule.required()
|
|
1056
|
+
}),
|
|
1057
|
+
defineField11({
|
|
1058
|
+
name: "metaDescription",
|
|
1059
|
+
title: "Meta Description",
|
|
1060
|
+
type: "string",
|
|
1061
|
+
validation: (rule) => rule.required()
|
|
1062
|
+
}),
|
|
1063
|
+
defineField11({
|
|
1064
|
+
name: "titleQrCodeModal",
|
|
1065
|
+
title: "Title - QR Code Modal",
|
|
1066
|
+
type: "string",
|
|
1067
|
+
validation: (rule) => rule.required()
|
|
1068
|
+
}),
|
|
1069
|
+
defineField11({
|
|
1070
|
+
name: "subtitleQrCodeModal",
|
|
1071
|
+
title: "Subtitle - QR Code Modal",
|
|
1072
|
+
type: "string"
|
|
1073
|
+
}),
|
|
1074
|
+
defineField11({
|
|
1075
|
+
name: "backgroundImage",
|
|
1076
|
+
title: "Background Image",
|
|
1077
|
+
type: "image",
|
|
1078
|
+
options: { hotspot: true }
|
|
1079
|
+
})
|
|
1080
|
+
],
|
|
1081
|
+
preview: {
|
|
1082
|
+
select: {
|
|
1083
|
+
title: "name",
|
|
1084
|
+
locale: "locale"
|
|
1085
|
+
},
|
|
1086
|
+
prepare(selection) {
|
|
1087
|
+
const { title, locale } = selection;
|
|
1088
|
+
return {
|
|
1089
|
+
title: title ?? "",
|
|
1090
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
// src/shared/sanity/schemaTypes/faqItem.ts
|
|
1097
|
+
import { defineField as defineField12, defineType as defineType12 } from "sanity";
|
|
1098
|
+
var faqItem_default = defineType12({
|
|
1099
|
+
name: "faqItem",
|
|
1100
|
+
title: "FAQ item",
|
|
1101
|
+
type: "document",
|
|
1102
|
+
fields: [
|
|
1103
|
+
defineField12({
|
|
1104
|
+
name: "locale",
|
|
1105
|
+
title: "Locale",
|
|
1106
|
+
type: "string",
|
|
1107
|
+
description: "Set by the document-internationalization plugin.",
|
|
1108
|
+
hidden: true,
|
|
1109
|
+
readOnly: true
|
|
1110
|
+
}),
|
|
1111
|
+
defineField12({
|
|
1112
|
+
name: "contentfulId",
|
|
1113
|
+
title: "Contentful ID",
|
|
1114
|
+
type: "string",
|
|
1115
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1116
|
+
hidden: true,
|
|
1117
|
+
readOnly: true
|
|
1118
|
+
}),
|
|
1119
|
+
defineField12({
|
|
1120
|
+
name: "category",
|
|
1121
|
+
title: "Category",
|
|
1122
|
+
type: "string"
|
|
1123
|
+
}),
|
|
1124
|
+
defineField12({
|
|
1125
|
+
name: "question",
|
|
1126
|
+
title: "Question",
|
|
1127
|
+
type: "string",
|
|
1128
|
+
validation: (rule) => rule.required()
|
|
1129
|
+
}),
|
|
1130
|
+
defineField12({
|
|
1131
|
+
name: "answer",
|
|
1132
|
+
title: "Answer",
|
|
1133
|
+
type: "text",
|
|
1134
|
+
validation: (rule) => rule.required()
|
|
1135
|
+
})
|
|
1136
|
+
],
|
|
1137
|
+
preview: {
|
|
1138
|
+
select: {
|
|
1139
|
+
title: "question",
|
|
1140
|
+
locale: "locale"
|
|
1141
|
+
},
|
|
1142
|
+
prepare(selection) {
|
|
1143
|
+
const { title, locale } = selection;
|
|
1144
|
+
return {
|
|
1145
|
+
title: title ?? "",
|
|
1146
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
// src/shared/sanity/schemaTypes/freeformText.ts
|
|
1153
|
+
import { defineField as defineField13, defineType as defineType13 } from "sanity";
|
|
1154
|
+
var freeformText_default = defineType13({
|
|
1155
|
+
name: "freeformText",
|
|
1156
|
+
title: "Freeform Text",
|
|
1157
|
+
type: "document",
|
|
1158
|
+
fields: [
|
|
1159
|
+
defineField13({
|
|
1160
|
+
name: "locale",
|
|
1161
|
+
title: "Locale",
|
|
1162
|
+
type: "string",
|
|
1163
|
+
description: "Set by the document-internationalization plugin.",
|
|
1164
|
+
hidden: true,
|
|
1165
|
+
readOnly: true
|
|
1166
|
+
}),
|
|
1167
|
+
defineField13({
|
|
1168
|
+
name: "contentfulId",
|
|
1169
|
+
title: "Contentful ID",
|
|
1170
|
+
type: "string",
|
|
1171
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1172
|
+
hidden: true,
|
|
1173
|
+
readOnly: true
|
|
1174
|
+
}),
|
|
1175
|
+
defineField13({
|
|
1176
|
+
name: "title",
|
|
1177
|
+
title: "Title",
|
|
1178
|
+
type: "string",
|
|
1179
|
+
validation: (rule) => rule.required()
|
|
1180
|
+
}),
|
|
1181
|
+
defineField13({
|
|
1182
|
+
name: "body",
|
|
1183
|
+
title: "Body",
|
|
1184
|
+
type: "text",
|
|
1185
|
+
validation: (rule) => rule.required()
|
|
1186
|
+
}),
|
|
1187
|
+
defineField13({
|
|
1188
|
+
name: "button",
|
|
1189
|
+
title: "Button",
|
|
1190
|
+
type: "reference",
|
|
1191
|
+
to: [{ type: "link" }]
|
|
1192
|
+
}),
|
|
1193
|
+
defineField13({
|
|
1194
|
+
name: "alignment",
|
|
1195
|
+
title: "Alignment",
|
|
1196
|
+
type: "string",
|
|
1197
|
+
validation: (rule) => rule.required()
|
|
1198
|
+
}),
|
|
1199
|
+
defineField13({
|
|
1200
|
+
name: "width",
|
|
1201
|
+
title: "width",
|
|
1202
|
+
type: "string"
|
|
1203
|
+
}),
|
|
1204
|
+
defineField13({
|
|
1205
|
+
name: "borders",
|
|
1206
|
+
title: "borders",
|
|
1207
|
+
type: "array",
|
|
1208
|
+
of: [{ type: "string" }]
|
|
1209
|
+
}),
|
|
1210
|
+
defineField13({
|
|
1211
|
+
name: "padding",
|
|
1212
|
+
title: "Padding",
|
|
1213
|
+
type: "array",
|
|
1214
|
+
of: [{ type: "string" }]
|
|
1215
|
+
})
|
|
1216
|
+
],
|
|
1217
|
+
preview: {
|
|
1218
|
+
select: {
|
|
1219
|
+
title: "title",
|
|
1220
|
+
locale: "locale"
|
|
1221
|
+
},
|
|
1222
|
+
prepare(selection) {
|
|
1223
|
+
const { title, locale } = selection;
|
|
1224
|
+
return {
|
|
1225
|
+
title: title ?? "",
|
|
1226
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
// src/shared/sanity/schemaTypes/gridLayout.ts
|
|
1233
|
+
import { defineField as defineField14, defineType as defineType14 } from "sanity";
|
|
1234
|
+
var gridLayout_default = defineType14({
|
|
1235
|
+
name: "gridLayout",
|
|
1236
|
+
title: "Grid Layout",
|
|
1237
|
+
type: "document",
|
|
1238
|
+
fields: [
|
|
1239
|
+
defineField14({
|
|
1240
|
+
name: "locale",
|
|
1241
|
+
title: "Locale",
|
|
1242
|
+
type: "string",
|
|
1243
|
+
description: "Set by the document-internationalization plugin.",
|
|
1244
|
+
hidden: true,
|
|
1245
|
+
readOnly: true
|
|
1246
|
+
}),
|
|
1247
|
+
defineField14({
|
|
1248
|
+
name: "contentfulId",
|
|
1249
|
+
title: "Contentful ID",
|
|
1250
|
+
type: "string",
|
|
1251
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1252
|
+
hidden: true,
|
|
1253
|
+
readOnly: true
|
|
1254
|
+
}),
|
|
1255
|
+
defineField14({
|
|
1256
|
+
name: "title",
|
|
1257
|
+
title: "Title",
|
|
1258
|
+
type: "string"
|
|
1259
|
+
}),
|
|
1260
|
+
defineField14({
|
|
1261
|
+
name: "bodyBefore",
|
|
1262
|
+
title: "Body Before",
|
|
1263
|
+
type: "text"
|
|
1264
|
+
}),
|
|
1265
|
+
defineField14({
|
|
1266
|
+
name: "columns",
|
|
1267
|
+
title: "Columns",
|
|
1268
|
+
type: "string",
|
|
1269
|
+
validation: (rule) => rule.required()
|
|
1270
|
+
}),
|
|
1271
|
+
defineField14({
|
|
1272
|
+
name: "refsType",
|
|
1273
|
+
title: "Refs Type",
|
|
1274
|
+
type: "string",
|
|
1275
|
+
validation: (rule) => rule.required()
|
|
1276
|
+
}),
|
|
1277
|
+
defineField14({
|
|
1278
|
+
name: "refs",
|
|
1279
|
+
title: "Refs",
|
|
1280
|
+
type: "array",
|
|
1281
|
+
of: [{ type: "reference", to: [{ type: "iconWithText" }, { type: "markDown" }] }]
|
|
1282
|
+
}),
|
|
1283
|
+
defineField14({
|
|
1284
|
+
name: "bodyAfter",
|
|
1285
|
+
title: "Body After",
|
|
1286
|
+
type: "text"
|
|
1287
|
+
}),
|
|
1288
|
+
defineField14({
|
|
1289
|
+
name: "textAlign",
|
|
1290
|
+
title: "Text Align",
|
|
1291
|
+
type: "string"
|
|
1292
|
+
}),
|
|
1293
|
+
defineField14({
|
|
1294
|
+
name: "width",
|
|
1295
|
+
title: "width",
|
|
1296
|
+
type: "string"
|
|
1297
|
+
}),
|
|
1298
|
+
defineField14({
|
|
1299
|
+
name: "borders",
|
|
1300
|
+
title: "borders",
|
|
1301
|
+
type: "array",
|
|
1302
|
+
of: [{ type: "string" }]
|
|
1303
|
+
}),
|
|
1304
|
+
defineField14({
|
|
1305
|
+
name: "padding",
|
|
1306
|
+
title: "padding",
|
|
1307
|
+
type: "array",
|
|
1308
|
+
of: [{ type: "string" }]
|
|
1309
|
+
})
|
|
1310
|
+
],
|
|
1311
|
+
preview: {
|
|
1312
|
+
select: {
|
|
1313
|
+
title: "title",
|
|
1314
|
+
locale: "locale"
|
|
1315
|
+
},
|
|
1316
|
+
prepare(selection) {
|
|
1317
|
+
const { title, locale } = selection;
|
|
1318
|
+
return {
|
|
1319
|
+
title: title ?? "",
|
|
1320
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
});
|
|
1325
|
+
|
|
1326
|
+
// src/shared/sanity/schemaTypes/heroBlock.ts
|
|
1327
|
+
import { defineField as defineField15, defineType as defineType15 } from "sanity";
|
|
1328
|
+
var heroBlock_default = defineType15({
|
|
1329
|
+
name: "heroBlock",
|
|
1330
|
+
title: "Hero block",
|
|
1331
|
+
type: "document",
|
|
1332
|
+
fields: [
|
|
1333
|
+
defineField15({
|
|
1334
|
+
name: "locale",
|
|
1335
|
+
title: "Locale",
|
|
1336
|
+
type: "string",
|
|
1337
|
+
description: "Set by the document-internationalization plugin.",
|
|
1338
|
+
hidden: true,
|
|
1339
|
+
readOnly: true
|
|
1340
|
+
}),
|
|
1341
|
+
defineField15({
|
|
1342
|
+
name: "contentfulId",
|
|
1343
|
+
title: "Contentful ID",
|
|
1344
|
+
type: "string",
|
|
1345
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1346
|
+
hidden: true,
|
|
1347
|
+
readOnly: true
|
|
1348
|
+
}),
|
|
1349
|
+
defineField15({
|
|
1350
|
+
name: "title",
|
|
1351
|
+
title: "Title",
|
|
1352
|
+
type: "string"
|
|
1353
|
+
}),
|
|
1354
|
+
defineField15({
|
|
1355
|
+
name: "blurb",
|
|
1356
|
+
title: "Blurb",
|
|
1357
|
+
type: "string"
|
|
1358
|
+
}),
|
|
1359
|
+
defineField15({
|
|
1360
|
+
name: "footer",
|
|
1361
|
+
title: "Footer",
|
|
1362
|
+
type: "string"
|
|
1363
|
+
}),
|
|
1364
|
+
defineField15({
|
|
1365
|
+
name: "image",
|
|
1366
|
+
title: "Image",
|
|
1367
|
+
type: "image",
|
|
1368
|
+
options: { hotspot: true }
|
|
1369
|
+
}),
|
|
1370
|
+
defineField15({
|
|
1371
|
+
name: "portraitImage",
|
|
1372
|
+
title: "Portrait image",
|
|
1373
|
+
type: "image",
|
|
1374
|
+
options: { hotspot: true }
|
|
1375
|
+
}),
|
|
1376
|
+
defineField15({
|
|
1377
|
+
name: "tabletImage",
|
|
1378
|
+
title: "Tablet Image",
|
|
1379
|
+
type: "image",
|
|
1380
|
+
options: { hotspot: true }
|
|
1381
|
+
}),
|
|
1382
|
+
defineField15({
|
|
1383
|
+
name: "imageAlt",
|
|
1384
|
+
title: "Image Alt Text",
|
|
1385
|
+
type: "string"
|
|
1386
|
+
}),
|
|
1387
|
+
defineField15({
|
|
1388
|
+
name: "imageOnly",
|
|
1389
|
+
title: "Image Only",
|
|
1390
|
+
type: "boolean"
|
|
1391
|
+
}),
|
|
1392
|
+
defineField15({
|
|
1393
|
+
name: "ctaLinks",
|
|
1394
|
+
title: "CTA links",
|
|
1395
|
+
type: "array",
|
|
1396
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
1397
|
+
}),
|
|
1398
|
+
defineField15({
|
|
1399
|
+
name: "mobileCtaLinks",
|
|
1400
|
+
title: "Mobile CTA links",
|
|
1401
|
+
type: "array",
|
|
1402
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
1403
|
+
}),
|
|
1404
|
+
defineField15({
|
|
1405
|
+
name: "linkText",
|
|
1406
|
+
title: "Button text",
|
|
1407
|
+
type: "string"
|
|
1408
|
+
}),
|
|
1409
|
+
defineField15({
|
|
1410
|
+
name: "linkUrl",
|
|
1411
|
+
title: "Button URL",
|
|
1412
|
+
type: "string"
|
|
1413
|
+
}),
|
|
1414
|
+
defineField15({
|
|
1415
|
+
name: "skinny",
|
|
1416
|
+
title: "Skinny",
|
|
1417
|
+
type: "boolean"
|
|
1418
|
+
}),
|
|
1419
|
+
defineField15({
|
|
1420
|
+
name: "aboveTheFold",
|
|
1421
|
+
title: "aboveTheFold",
|
|
1422
|
+
type: "boolean"
|
|
1423
|
+
}),
|
|
1424
|
+
defineField15({
|
|
1425
|
+
name: "style",
|
|
1426
|
+
title: "Style",
|
|
1427
|
+
type: "string"
|
|
1428
|
+
}),
|
|
1429
|
+
defineField15({
|
|
1430
|
+
name: "invertedBackground",
|
|
1431
|
+
title: "Inverted Background",
|
|
1432
|
+
type: "boolean"
|
|
1433
|
+
}),
|
|
1434
|
+
defineField15({
|
|
1435
|
+
name: "width",
|
|
1436
|
+
title: "Width",
|
|
1437
|
+
type: "string"
|
|
1438
|
+
})
|
|
1439
|
+
],
|
|
1440
|
+
preview: {
|
|
1441
|
+
select: {
|
|
1442
|
+
title: "title",
|
|
1443
|
+
locale: "locale"
|
|
1444
|
+
},
|
|
1445
|
+
prepare(selection) {
|
|
1446
|
+
const { title, locale } = selection;
|
|
1447
|
+
return {
|
|
1448
|
+
title: title ?? "",
|
|
1449
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
|
|
1455
|
+
// src/shared/sanity/schemaTypes/iconWithText.ts
|
|
1456
|
+
import { defineField as defineField16, defineType as defineType16 } from "sanity";
|
|
1457
|
+
var iconWithText_default = defineType16({
|
|
1458
|
+
name: "iconWithText",
|
|
1459
|
+
title: "Icon With Text",
|
|
1460
|
+
type: "document",
|
|
1461
|
+
fields: [
|
|
1462
|
+
defineField16({
|
|
1463
|
+
name: "locale",
|
|
1464
|
+
title: "Locale",
|
|
1465
|
+
type: "string",
|
|
1466
|
+
description: "Set by the document-internationalization plugin.",
|
|
1467
|
+
hidden: true,
|
|
1468
|
+
readOnly: true
|
|
1469
|
+
}),
|
|
1470
|
+
defineField16({
|
|
1471
|
+
name: "contentfulId",
|
|
1472
|
+
title: "Contentful ID",
|
|
1473
|
+
type: "string",
|
|
1474
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1475
|
+
hidden: true,
|
|
1476
|
+
readOnly: true
|
|
1477
|
+
}),
|
|
1478
|
+
defineField16({
|
|
1479
|
+
name: "heading",
|
|
1480
|
+
title: "Heading",
|
|
1481
|
+
type: "string"
|
|
1482
|
+
}),
|
|
1483
|
+
defineField16({
|
|
1484
|
+
name: "hideHeading",
|
|
1485
|
+
title: "Hide Heading",
|
|
1486
|
+
type: "boolean"
|
|
1487
|
+
}),
|
|
1488
|
+
defineField16({
|
|
1489
|
+
name: "text",
|
|
1490
|
+
title: "Text",
|
|
1491
|
+
type: "text",
|
|
1492
|
+
validation: (rule) => rule.required()
|
|
1493
|
+
}),
|
|
1494
|
+
defineField16({
|
|
1495
|
+
name: "icon",
|
|
1496
|
+
title: "Icon",
|
|
1497
|
+
type: "image",
|
|
1498
|
+
options: { hotspot: true },
|
|
1499
|
+
validation: (rule) => rule.required()
|
|
1500
|
+
}),
|
|
1501
|
+
defineField16({
|
|
1502
|
+
name: "colour",
|
|
1503
|
+
title: "Colour",
|
|
1504
|
+
type: "string",
|
|
1505
|
+
validation: (rule) => rule.required()
|
|
1506
|
+
}),
|
|
1507
|
+
defineField16({
|
|
1508
|
+
name: "variant",
|
|
1509
|
+
title: "Variant",
|
|
1510
|
+
type: "string",
|
|
1511
|
+
validation: (rule) => rule.required()
|
|
1512
|
+
}),
|
|
1513
|
+
defineField16({
|
|
1514
|
+
name: "buttons",
|
|
1515
|
+
title: "Buttons",
|
|
1516
|
+
type: "array",
|
|
1517
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
1518
|
+
})
|
|
1519
|
+
],
|
|
1520
|
+
preview: {
|
|
1521
|
+
select: {
|
|
1522
|
+
title: "heading",
|
|
1523
|
+
locale: "locale"
|
|
1524
|
+
},
|
|
1525
|
+
prepare(selection) {
|
|
1526
|
+
const { title, locale } = selection;
|
|
1527
|
+
return {
|
|
1528
|
+
title: title ?? "",
|
|
1529
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
// src/shared/sanity/schemaTypes/imageAndContent.ts
|
|
1536
|
+
import { defineField as defineField17, defineType as defineType17 } from "sanity";
|
|
1537
|
+
var imageAndContent_default = defineType17({
|
|
1538
|
+
name: "imageAndContent",
|
|
1539
|
+
title: "Image and Content",
|
|
1540
|
+
type: "document",
|
|
1541
|
+
fields: [
|
|
1542
|
+
defineField17({
|
|
1543
|
+
name: "locale",
|
|
1544
|
+
title: "Locale",
|
|
1545
|
+
type: "string",
|
|
1546
|
+
description: "Set by the document-internationalization plugin.",
|
|
1547
|
+
hidden: true,
|
|
1548
|
+
readOnly: true
|
|
1549
|
+
}),
|
|
1550
|
+
defineField17({
|
|
1551
|
+
name: "contentfulId",
|
|
1552
|
+
title: "Contentful ID",
|
|
1553
|
+
type: "string",
|
|
1554
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1555
|
+
hidden: true,
|
|
1556
|
+
readOnly: true
|
|
1557
|
+
}),
|
|
1558
|
+
defineField17({
|
|
1559
|
+
name: "title",
|
|
1560
|
+
title: "Title",
|
|
1561
|
+
type: "string"
|
|
1562
|
+
}),
|
|
1563
|
+
defineField17({
|
|
1564
|
+
name: "image",
|
|
1565
|
+
title: "Image",
|
|
1566
|
+
type: "image",
|
|
1567
|
+
options: { hotspot: true }
|
|
1568
|
+
}),
|
|
1569
|
+
defineField17({
|
|
1570
|
+
name: "mobileImage",
|
|
1571
|
+
title: "MobileImage",
|
|
1572
|
+
type: "image",
|
|
1573
|
+
options: { hotspot: true }
|
|
1574
|
+
}),
|
|
1575
|
+
defineField17({
|
|
1576
|
+
name: "body",
|
|
1577
|
+
title: "Body",
|
|
1578
|
+
type: "text",
|
|
1579
|
+
validation: (rule) => rule.required()
|
|
1580
|
+
}),
|
|
1581
|
+
defineField17({
|
|
1582
|
+
name: "imageWidth",
|
|
1583
|
+
title: "Image Width",
|
|
1584
|
+
type: "number",
|
|
1585
|
+
validation: (rule) => rule.integer()
|
|
1586
|
+
}),
|
|
1587
|
+
defineField17({
|
|
1588
|
+
name: "direction",
|
|
1589
|
+
title: "Direction",
|
|
1590
|
+
type: "string"
|
|
1591
|
+
}),
|
|
1592
|
+
defineField17({
|
|
1593
|
+
name: "directionMobile",
|
|
1594
|
+
title: "Direction Mobile",
|
|
1595
|
+
type: "string"
|
|
1596
|
+
}),
|
|
1597
|
+
defineField17({
|
|
1598
|
+
name: "borders",
|
|
1599
|
+
title: "Borders",
|
|
1600
|
+
type: "array",
|
|
1601
|
+
of: [{ type: "string" }]
|
|
1602
|
+
}),
|
|
1603
|
+
defineField17({
|
|
1604
|
+
name: "alignContent",
|
|
1605
|
+
title: "Align Content",
|
|
1606
|
+
type: "string"
|
|
1607
|
+
}),
|
|
1608
|
+
defineField17({
|
|
1609
|
+
name: "padding",
|
|
1610
|
+
title: "Padding",
|
|
1611
|
+
type: "array",
|
|
1612
|
+
of: [{ type: "string" }]
|
|
1613
|
+
}),
|
|
1614
|
+
defineField17({
|
|
1615
|
+
name: "cta",
|
|
1616
|
+
title: "CTA",
|
|
1617
|
+
type: "reference",
|
|
1618
|
+
to: [{ type: "link" }]
|
|
1619
|
+
})
|
|
1620
|
+
],
|
|
1621
|
+
preview: {
|
|
1622
|
+
select: {
|
|
1623
|
+
title: "title",
|
|
1624
|
+
locale: "locale"
|
|
1625
|
+
},
|
|
1626
|
+
prepare(selection) {
|
|
1627
|
+
const { title, locale } = selection;
|
|
1628
|
+
return {
|
|
1629
|
+
title: title ?? "",
|
|
1630
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
});
|
|
1635
|
+
|
|
1636
|
+
// src/shared/sanity/schemaTypes/link.ts
|
|
1637
|
+
import { defineField as defineField18, defineType as defineType18 } from "sanity";
|
|
1638
|
+
var link_default = defineType18({
|
|
1639
|
+
name: "link",
|
|
1640
|
+
title: "Link",
|
|
1641
|
+
type: "document",
|
|
1642
|
+
fields: [
|
|
1643
|
+
defineField18({
|
|
1644
|
+
name: "locale",
|
|
1645
|
+
title: "Locale",
|
|
1646
|
+
type: "string",
|
|
1647
|
+
description: "Set by the document-internationalization plugin.",
|
|
1648
|
+
hidden: true,
|
|
1649
|
+
readOnly: true
|
|
1650
|
+
}),
|
|
1651
|
+
defineField18({
|
|
1652
|
+
name: "contentfulId",
|
|
1653
|
+
title: "Contentful ID",
|
|
1654
|
+
type: "string",
|
|
1655
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1656
|
+
hidden: true,
|
|
1657
|
+
readOnly: true
|
|
1658
|
+
}),
|
|
1659
|
+
defineField18({
|
|
1660
|
+
name: "text",
|
|
1661
|
+
title: "Text",
|
|
1662
|
+
type: "string"
|
|
1663
|
+
}),
|
|
1664
|
+
defineField18({
|
|
1665
|
+
name: "dataTrack",
|
|
1666
|
+
title: "Data-track",
|
|
1667
|
+
type: "string"
|
|
1668
|
+
}),
|
|
1669
|
+
defineField18({
|
|
1670
|
+
name: "url",
|
|
1671
|
+
title: "URL",
|
|
1672
|
+
type: "string"
|
|
1673
|
+
}),
|
|
1674
|
+
defineField18({
|
|
1675
|
+
name: "icon",
|
|
1676
|
+
title: "Icon",
|
|
1677
|
+
type: "image",
|
|
1678
|
+
options: { hotspot: true }
|
|
1679
|
+
}),
|
|
1680
|
+
defineField18({
|
|
1681
|
+
name: "links",
|
|
1682
|
+
title: "Links",
|
|
1683
|
+
type: "array",
|
|
1684
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
1685
|
+
}),
|
|
1686
|
+
defineField18({
|
|
1687
|
+
name: "description",
|
|
1688
|
+
title: "Description",
|
|
1689
|
+
type: "string"
|
|
1690
|
+
}),
|
|
1691
|
+
defineField18({
|
|
1692
|
+
name: "rel",
|
|
1693
|
+
title: "Rel",
|
|
1694
|
+
type: "string"
|
|
1695
|
+
}),
|
|
1696
|
+
defineField18({
|
|
1697
|
+
name: "buttonStyle",
|
|
1698
|
+
title: "Button style",
|
|
1699
|
+
type: "string"
|
|
1700
|
+
}),
|
|
1701
|
+
defineField18({
|
|
1702
|
+
name: "invertButton",
|
|
1703
|
+
title: "Invert button",
|
|
1704
|
+
type: "boolean"
|
|
1705
|
+
}),
|
|
1706
|
+
defineField18({
|
|
1707
|
+
name: "size",
|
|
1708
|
+
title: "size",
|
|
1709
|
+
type: "string"
|
|
1710
|
+
}),
|
|
1711
|
+
defineField18({
|
|
1712
|
+
name: "loggedInLinkToWebApp",
|
|
1713
|
+
title: "loggedInLinkToWebApp",
|
|
1714
|
+
type: "boolean"
|
|
1715
|
+
})
|
|
1716
|
+
],
|
|
1717
|
+
preview: {
|
|
1718
|
+
select: {
|
|
1719
|
+
title: "text",
|
|
1720
|
+
locale: "locale"
|
|
1721
|
+
},
|
|
1722
|
+
prepare(selection) {
|
|
1723
|
+
const { title, locale } = selection;
|
|
1724
|
+
return {
|
|
1725
|
+
title: title ?? "",
|
|
1726
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1731
|
+
|
|
1732
|
+
// src/shared/sanity/schemaTypes/longtailPage.ts
|
|
1733
|
+
import { defineField as defineField19, defineType as defineType19 } from "sanity";
|
|
1734
|
+
var longtailPage_default = defineType19({
|
|
1735
|
+
name: "longtailPage",
|
|
1736
|
+
title: "Longtail Page",
|
|
1737
|
+
type: "document",
|
|
1738
|
+
fields: [
|
|
1739
|
+
defineField19({
|
|
1740
|
+
name: "locale",
|
|
1741
|
+
title: "Locale",
|
|
1742
|
+
type: "string",
|
|
1743
|
+
description: "Set by the document-internationalization plugin.",
|
|
1744
|
+
hidden: true,
|
|
1745
|
+
readOnly: true
|
|
1746
|
+
}),
|
|
1747
|
+
defineField19({
|
|
1748
|
+
name: "contentfulId",
|
|
1749
|
+
title: "Contentful ID",
|
|
1750
|
+
type: "string",
|
|
1751
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1752
|
+
hidden: true,
|
|
1753
|
+
readOnly: true
|
|
1754
|
+
}),
|
|
1755
|
+
defineField19({
|
|
1756
|
+
name: "newSlug",
|
|
1757
|
+
title: "Slug",
|
|
1758
|
+
type: "string",
|
|
1759
|
+
validation: (rule) => rule.required()
|
|
1760
|
+
}),
|
|
1761
|
+
defineField19({
|
|
1762
|
+
name: "longtailPageType",
|
|
1763
|
+
title: "Longtail Page Type",
|
|
1764
|
+
type: "string",
|
|
1765
|
+
validation: (rule) => rule.required()
|
|
1766
|
+
}),
|
|
1767
|
+
defineField19({
|
|
1768
|
+
name: "sectionsAboveProfiles",
|
|
1769
|
+
title: "Sections Above Profiles",
|
|
1770
|
+
type: "array",
|
|
1771
|
+
of: [{ type: "reference", to: [{ type: "banner" }, { type: "columnizedText" }, { type: "heroBlock" }, { type: "refsList" }, { type: "statsBlock" }, { type: "pageSection" }] }]
|
|
1772
|
+
}),
|
|
1773
|
+
defineField19({
|
|
1774
|
+
name: "sections",
|
|
1775
|
+
title: "Sections",
|
|
1776
|
+
type: "array",
|
|
1777
|
+
of: [{ type: "reference", to: [{ type: "banner" }, { type: "columnizedText" }, { type: "heroBlock" }, { type: "refsList" }, { type: "statsBlock" }, { type: "pageSection" }] }]
|
|
1778
|
+
}),
|
|
1779
|
+
defineField19({
|
|
1780
|
+
name: "sectionsUnderProfiles",
|
|
1781
|
+
title: "Sections Under Profiles",
|
|
1782
|
+
type: "array",
|
|
1783
|
+
of: [{ type: "reference", to: [{ type: "columnizedText" }, { type: "refsList" }, { type: "statsBlock" }, { type: "pageSection" }] }]
|
|
1784
|
+
}),
|
|
1785
|
+
defineField19({
|
|
1786
|
+
name: "title",
|
|
1787
|
+
title: "Title",
|
|
1788
|
+
type: "string",
|
|
1789
|
+
validation: (rule) => rule.required()
|
|
1790
|
+
}),
|
|
1791
|
+
defineField19({
|
|
1792
|
+
name: "metaTitle",
|
|
1793
|
+
title: "Meta Title",
|
|
1794
|
+
type: "string",
|
|
1795
|
+
validation: (rule) => rule.required()
|
|
1796
|
+
}),
|
|
1797
|
+
defineField19({
|
|
1798
|
+
name: "metaDescription",
|
|
1799
|
+
title: "Meta Description",
|
|
1800
|
+
type: "string",
|
|
1801
|
+
validation: (rule) => rule.required()
|
|
1802
|
+
}),
|
|
1803
|
+
defineField19({
|
|
1804
|
+
name: "blurb",
|
|
1805
|
+
title: "Blurb",
|
|
1806
|
+
type: "string",
|
|
1807
|
+
validation: (rule) => rule.required()
|
|
1808
|
+
}),
|
|
1809
|
+
defineField19({
|
|
1810
|
+
name: "ctaLink",
|
|
1811
|
+
title: "CTA Link",
|
|
1812
|
+
type: "reference",
|
|
1813
|
+
to: [{ type: "link" }],
|
|
1814
|
+
validation: (rule) => rule.required()
|
|
1815
|
+
}),
|
|
1816
|
+
defineField19({
|
|
1817
|
+
name: "mobileCtaLink",
|
|
1818
|
+
title: "Mobile CTA Link",
|
|
1819
|
+
type: "reference",
|
|
1820
|
+
to: [{ type: "link" }],
|
|
1821
|
+
validation: (rule) => rule.required()
|
|
1822
|
+
}),
|
|
1823
|
+
defineField19({
|
|
1824
|
+
name: "idealPartnerPhrases",
|
|
1825
|
+
title: "Ideal Partner Phrases",
|
|
1826
|
+
type: "array",
|
|
1827
|
+
of: [{ type: "string" }],
|
|
1828
|
+
validation: (rule) => rule.required()
|
|
1829
|
+
}),
|
|
1830
|
+
defineField19({
|
|
1831
|
+
name: "countryCodesList",
|
|
1832
|
+
title: "Country Codes List",
|
|
1833
|
+
type: "reference",
|
|
1834
|
+
to: [{ type: "statsBlock" }]
|
|
1835
|
+
}),
|
|
1836
|
+
defineField19({
|
|
1837
|
+
name: "languageCodesList",
|
|
1838
|
+
title: "Language Codes List",
|
|
1839
|
+
type: "reference",
|
|
1840
|
+
to: [{ type: "statsBlock" }],
|
|
1841
|
+
validation: (rule) => rule.required()
|
|
1842
|
+
}),
|
|
1843
|
+
defineField19({
|
|
1844
|
+
name: "smartBannerAdjustLink",
|
|
1845
|
+
title: "Smart Banner Adjust Link",
|
|
1846
|
+
type: "string"
|
|
1847
|
+
}),
|
|
1848
|
+
defineField19({
|
|
1849
|
+
name: "deletedUsers",
|
|
1850
|
+
title: "Deleted Users",
|
|
1851
|
+
type: "reference",
|
|
1852
|
+
to: [{ type: "statsBlock" }],
|
|
1853
|
+
validation: (rule) => rule.required()
|
|
1854
|
+
}),
|
|
1855
|
+
defineField19({
|
|
1856
|
+
name: "summaryHeading",
|
|
1857
|
+
title: "SEO Summary Heading",
|
|
1858
|
+
type: "string"
|
|
1859
|
+
}),
|
|
1860
|
+
defineField19({
|
|
1861
|
+
name: "summaryBody",
|
|
1862
|
+
title: "SEO Summary Body",
|
|
1863
|
+
type: "text"
|
|
1864
|
+
})
|
|
1865
|
+
],
|
|
1866
|
+
preview: {
|
|
1867
|
+
select: {
|
|
1868
|
+
title: "newSlug",
|
|
1869
|
+
locale: "locale"
|
|
1870
|
+
},
|
|
1871
|
+
prepare(selection) {
|
|
1872
|
+
const { title, locale } = selection;
|
|
1873
|
+
return {
|
|
1874
|
+
title: title ?? "",
|
|
1875
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
});
|
|
1880
|
+
|
|
1881
|
+
// src/shared/sanity/schemaTypes/markDown.ts
|
|
1882
|
+
import { defineField as defineField20, defineType as defineType20 } from "sanity";
|
|
1883
|
+
var markDown_default = defineType20({
|
|
1884
|
+
name: "markDown",
|
|
1885
|
+
title: "Markdown",
|
|
1886
|
+
type: "document",
|
|
1887
|
+
fields: [
|
|
1888
|
+
defineField20({
|
|
1889
|
+
name: "locale",
|
|
1890
|
+
title: "Locale",
|
|
1891
|
+
type: "string",
|
|
1892
|
+
description: "Set by the document-internationalization plugin.",
|
|
1893
|
+
hidden: true,
|
|
1894
|
+
readOnly: true
|
|
1895
|
+
}),
|
|
1896
|
+
defineField20({
|
|
1897
|
+
name: "contentfulId",
|
|
1898
|
+
title: "Contentful ID",
|
|
1899
|
+
type: "string",
|
|
1900
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1901
|
+
hidden: true,
|
|
1902
|
+
readOnly: true
|
|
1903
|
+
}),
|
|
1904
|
+
defineField20({
|
|
1905
|
+
name: "title",
|
|
1906
|
+
title: "Title",
|
|
1907
|
+
type: "string",
|
|
1908
|
+
validation: (rule) => rule.required()
|
|
1909
|
+
}),
|
|
1910
|
+
defineField20({
|
|
1911
|
+
name: "body",
|
|
1912
|
+
title: "Body",
|
|
1913
|
+
type: "text",
|
|
1914
|
+
validation: (rule) => rule.required()
|
|
1915
|
+
})
|
|
1916
|
+
],
|
|
1917
|
+
preview: {
|
|
1918
|
+
select: {
|
|
1919
|
+
title: "title",
|
|
1920
|
+
locale: "locale"
|
|
1921
|
+
},
|
|
1922
|
+
prepare(selection) {
|
|
1923
|
+
const { title, locale } = selection;
|
|
1924
|
+
return {
|
|
1925
|
+
title: title ?? "",
|
|
1926
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
});
|
|
1931
|
+
|
|
1932
|
+
// src/shared/sanity/schemaTypes/menu.ts
|
|
1933
|
+
import { defineField as defineField21, defineType as defineType21 } from "sanity";
|
|
1934
|
+
var menu_default = defineType21({
|
|
1935
|
+
name: "menu",
|
|
1936
|
+
title: "Menu",
|
|
1937
|
+
type: "document",
|
|
1938
|
+
fields: [
|
|
1939
|
+
defineField21({
|
|
1940
|
+
name: "locale",
|
|
1941
|
+
title: "Locale",
|
|
1942
|
+
type: "string",
|
|
1943
|
+
description: "Set by the document-internationalization plugin.",
|
|
1944
|
+
hidden: true,
|
|
1945
|
+
readOnly: true
|
|
1946
|
+
}),
|
|
1947
|
+
defineField21({
|
|
1948
|
+
name: "contentfulId",
|
|
1949
|
+
title: "Contentful ID",
|
|
1950
|
+
type: "string",
|
|
1951
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
1952
|
+
hidden: true,
|
|
1953
|
+
readOnly: true
|
|
1954
|
+
}),
|
|
1955
|
+
defineField21({
|
|
1956
|
+
name: "id",
|
|
1957
|
+
title: "ID",
|
|
1958
|
+
type: "string"
|
|
1959
|
+
}),
|
|
1960
|
+
defineField21({
|
|
1961
|
+
name: "title",
|
|
1962
|
+
title: "Title",
|
|
1963
|
+
type: "string"
|
|
1964
|
+
}),
|
|
1965
|
+
defineField21({
|
|
1966
|
+
name: "links",
|
|
1967
|
+
title: "Links",
|
|
1968
|
+
type: "array",
|
|
1969
|
+
of: [{ type: "reference", to: [{ type: "link" }] }],
|
|
1970
|
+
validation: (rule) => rule.required()
|
|
1971
|
+
})
|
|
1972
|
+
],
|
|
1973
|
+
preview: {
|
|
1974
|
+
select: {
|
|
1975
|
+
title: "id",
|
|
1976
|
+
locale: "locale"
|
|
1977
|
+
},
|
|
1978
|
+
prepare(selection) {
|
|
1979
|
+
const { title, locale } = selection;
|
|
1980
|
+
return {
|
|
1981
|
+
title: title ?? "",
|
|
1982
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
|
|
1988
|
+
// src/shared/sanity/schemaTypes/page.ts
|
|
1989
|
+
import { defineField as defineField22, defineType as defineType22 } from "sanity";
|
|
1990
|
+
var page_default = defineType22({
|
|
1991
|
+
name: "page",
|
|
1992
|
+
title: "Page",
|
|
1993
|
+
type: "document",
|
|
1994
|
+
fields: [
|
|
1995
|
+
defineField22({
|
|
1996
|
+
name: "locale",
|
|
1997
|
+
title: "Locale",
|
|
1998
|
+
type: "string",
|
|
1999
|
+
description: "Set by the document-internationalization plugin.",
|
|
2000
|
+
hidden: true,
|
|
2001
|
+
readOnly: true
|
|
2002
|
+
}),
|
|
2003
|
+
defineField22({
|
|
2004
|
+
name: "contentfulId",
|
|
2005
|
+
title: "Contentful ID",
|
|
2006
|
+
type: "string",
|
|
2007
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2008
|
+
hidden: true,
|
|
2009
|
+
readOnly: true
|
|
2010
|
+
}),
|
|
2011
|
+
defineField22({
|
|
2012
|
+
name: "newSlug",
|
|
2013
|
+
title: "New Slug",
|
|
2014
|
+
type: "string",
|
|
2015
|
+
validation: (rule) => rule.required()
|
|
2016
|
+
}),
|
|
2017
|
+
defineField22({
|
|
2018
|
+
name: "title",
|
|
2019
|
+
title: "Title",
|
|
2020
|
+
type: "string",
|
|
2021
|
+
validation: (rule) => rule.required()
|
|
2022
|
+
}),
|
|
2023
|
+
defineField22({
|
|
2024
|
+
name: "blurb",
|
|
2025
|
+
title: "Blurb",
|
|
2026
|
+
type: "string"
|
|
2027
|
+
}),
|
|
2028
|
+
defineField22({
|
|
2029
|
+
name: "metaTitle",
|
|
2030
|
+
title: "Meta title",
|
|
2031
|
+
type: "string"
|
|
2032
|
+
}),
|
|
2033
|
+
defineField22({
|
|
2034
|
+
name: "metaDescription",
|
|
2035
|
+
title: "Meta description",
|
|
2036
|
+
type: "text"
|
|
2037
|
+
}),
|
|
2038
|
+
defineField22({
|
|
2039
|
+
name: "metaKeywords",
|
|
2040
|
+
title: "Meta Keywords",
|
|
2041
|
+
type: "array",
|
|
2042
|
+
of: [{ type: "string" }]
|
|
2043
|
+
}),
|
|
2044
|
+
defineField22({
|
|
2045
|
+
name: "sections",
|
|
2046
|
+
title: "Sections",
|
|
2047
|
+
type: "array",
|
|
2048
|
+
of: [{ type: "reference", to: [{ type: "banner" }, { type: "blogThumbs" }, { type: "profilesCarousel" }, { type: "columnizedText" }, { type: "heroBlock" }, { type: "refsList" }, { type: "statsBlock" }, { type: "menu" }, { type: "pageSection" }, { type: "imageAndContent" }, { type: "freeformText" }, { type: "gridLayout" }] }]
|
|
2049
|
+
}),
|
|
2050
|
+
defineField22({
|
|
2051
|
+
name: "heroImage",
|
|
2052
|
+
title: "Hero image",
|
|
2053
|
+
type: "image",
|
|
2054
|
+
options: { hotspot: true }
|
|
2055
|
+
}),
|
|
2056
|
+
defineField22({
|
|
2057
|
+
name: "portraitImage",
|
|
2058
|
+
title: "Portrait Hero Image",
|
|
2059
|
+
type: "image",
|
|
2060
|
+
options: { hotspot: true }
|
|
2061
|
+
}),
|
|
2062
|
+
defineField22({
|
|
2063
|
+
name: "imageAlt",
|
|
2064
|
+
title: "Image Alt Text",
|
|
2065
|
+
type: "string"
|
|
2066
|
+
}),
|
|
2067
|
+
defineField22({
|
|
2068
|
+
name: "isLight",
|
|
2069
|
+
title: "Light hero image",
|
|
2070
|
+
type: "boolean"
|
|
2071
|
+
}),
|
|
2072
|
+
defineField22({
|
|
2073
|
+
name: "body",
|
|
2074
|
+
title: "Body",
|
|
2075
|
+
type: "text"
|
|
2076
|
+
}),
|
|
2077
|
+
defineField22({
|
|
2078
|
+
name: "linkedPosts",
|
|
2079
|
+
title: "Linked pages",
|
|
2080
|
+
type: "array",
|
|
2081
|
+
of: [{ type: "reference", to: [{ type: "page" }] }]
|
|
2082
|
+
}),
|
|
2083
|
+
defineField22({
|
|
2084
|
+
name: "customRefs",
|
|
2085
|
+
title: "Custom references",
|
|
2086
|
+
type: "array",
|
|
2087
|
+
// TODO: no linkContentType constraint — restrict as needed
|
|
2088
|
+
of: [{ type: "reference", to: [{ type: "audioPhrase" }, { type: "banner" }, { type: "blogThumbs" }, { type: "columnizedText" }, { type: "cookieBanner" }, { type: "customJson" }, { type: "downloadPage" }, { type: "faqItem" }, { type: "freeformText" }, { type: "gridLayout" }, { type: "heroBlock" }, { type: "iconWithText" }, { type: "imageAndContent" }, { type: "link" }, { type: "longtailPage" }, { type: "markDown" }, { type: "menu" }, { type: "page" }, { type: "pageSection" }, { type: "profile" }, { type: "profilesCarousel" }, { type: "refsList" }, { type: "scheduledParty" }, { type: "sliderSection" }, { type: "statsBlock" }] }]
|
|
2089
|
+
}),
|
|
2090
|
+
defineField22({
|
|
2091
|
+
name: "customData",
|
|
2092
|
+
title: "Custom data",
|
|
2093
|
+
type: "text",
|
|
2094
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
2095
|
+
}),
|
|
2096
|
+
defineField22({
|
|
2097
|
+
name: "specialPageType",
|
|
2098
|
+
title: "Special Page Type",
|
|
2099
|
+
type: "string"
|
|
2100
|
+
}),
|
|
2101
|
+
defineField22({
|
|
2102
|
+
name: "hideFromSitemap",
|
|
2103
|
+
title: "Hide From Sitemap",
|
|
2104
|
+
type: "boolean"
|
|
2105
|
+
}),
|
|
2106
|
+
defineField22({
|
|
2107
|
+
name: "slug",
|
|
2108
|
+
title: "Slug",
|
|
2109
|
+
type: "string",
|
|
2110
|
+
validation: (rule) => rule.required()
|
|
2111
|
+
}),
|
|
2112
|
+
defineField22({
|
|
2113
|
+
name: "smartBannerAdjustLink",
|
|
2114
|
+
title: "Smart Banner Adjust Link",
|
|
2115
|
+
type: "string"
|
|
2116
|
+
}),
|
|
2117
|
+
defineField22({
|
|
2118
|
+
name: "customHeroImage",
|
|
2119
|
+
title: "Custom Hero Image",
|
|
2120
|
+
type: "reference",
|
|
2121
|
+
to: [{ type: "heroBlock" }]
|
|
2122
|
+
})
|
|
2123
|
+
],
|
|
2124
|
+
preview: {
|
|
2125
|
+
select: {
|
|
2126
|
+
title: "title",
|
|
2127
|
+
locale: "locale"
|
|
2128
|
+
},
|
|
2129
|
+
prepare(selection) {
|
|
2130
|
+
const { title, locale } = selection;
|
|
2131
|
+
return {
|
|
2132
|
+
title: title ?? "",
|
|
2133
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
});
|
|
2138
|
+
|
|
2139
|
+
// src/shared/sanity/schemaTypes/pageSection.ts
|
|
2140
|
+
import { defineField as defineField23, defineType as defineType23 } from "sanity";
|
|
2141
|
+
var pageSection_default = defineType23({
|
|
2142
|
+
name: "pageSection",
|
|
2143
|
+
title: "Page section",
|
|
2144
|
+
type: "document",
|
|
2145
|
+
fields: [
|
|
2146
|
+
defineField23({
|
|
2147
|
+
name: "locale",
|
|
2148
|
+
title: "Locale",
|
|
2149
|
+
type: "string",
|
|
2150
|
+
description: "Set by the document-internationalization plugin.",
|
|
2151
|
+
hidden: true,
|
|
2152
|
+
readOnly: true
|
|
2153
|
+
}),
|
|
2154
|
+
defineField23({
|
|
2155
|
+
name: "contentfulId",
|
|
2156
|
+
title: "Contentful ID",
|
|
2157
|
+
type: "string",
|
|
2158
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2159
|
+
hidden: true,
|
|
2160
|
+
readOnly: true
|
|
2161
|
+
}),
|
|
2162
|
+
defineField23({
|
|
2163
|
+
name: "id",
|
|
2164
|
+
title: "ID",
|
|
2165
|
+
type: "string"
|
|
2166
|
+
}),
|
|
2167
|
+
defineField23({
|
|
2168
|
+
name: "title",
|
|
2169
|
+
title: "Title",
|
|
2170
|
+
type: "string"
|
|
2171
|
+
}),
|
|
2172
|
+
defineField23({
|
|
2173
|
+
name: "body",
|
|
2174
|
+
title: "Body",
|
|
2175
|
+
type: "text"
|
|
2176
|
+
}),
|
|
2177
|
+
defineField23({
|
|
2178
|
+
name: "image",
|
|
2179
|
+
title: "Image",
|
|
2180
|
+
type: "image",
|
|
2181
|
+
options: { hotspot: true }
|
|
2182
|
+
}),
|
|
2183
|
+
defineField23({
|
|
2184
|
+
name: "mobileImage",
|
|
2185
|
+
title: "Mobile Image",
|
|
2186
|
+
type: "image",
|
|
2187
|
+
options: { hotspot: true }
|
|
2188
|
+
}),
|
|
2189
|
+
defineField23({
|
|
2190
|
+
name: "imageAlt",
|
|
2191
|
+
title: "Image Alt Text",
|
|
2192
|
+
type: "string"
|
|
2193
|
+
}),
|
|
2194
|
+
defineField23({
|
|
2195
|
+
name: "imagePosition",
|
|
2196
|
+
title: "Image position",
|
|
2197
|
+
type: "string"
|
|
2198
|
+
}),
|
|
2199
|
+
defineField23({
|
|
2200
|
+
name: "links",
|
|
2201
|
+
title: "CTA Links",
|
|
2202
|
+
type: "array",
|
|
2203
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
2204
|
+
}),
|
|
2205
|
+
defineField23({
|
|
2206
|
+
name: "mobLinks",
|
|
2207
|
+
title: "CTA Mobile Links",
|
|
2208
|
+
type: "array",
|
|
2209
|
+
of: [{ type: "reference", to: [{ type: "link" }] }]
|
|
2210
|
+
}),
|
|
2211
|
+
defineField23({
|
|
2212
|
+
name: "linkText",
|
|
2213
|
+
title: "Link text",
|
|
2214
|
+
type: "string"
|
|
2215
|
+
}),
|
|
2216
|
+
defineField23({
|
|
2217
|
+
name: "linkUrl",
|
|
2218
|
+
title: "Link URL",
|
|
2219
|
+
type: "string"
|
|
2220
|
+
}),
|
|
2221
|
+
defineField23({
|
|
2222
|
+
name: "background",
|
|
2223
|
+
title: "Background",
|
|
2224
|
+
type: "string"
|
|
2225
|
+
}),
|
|
2226
|
+
defineField23({
|
|
2227
|
+
name: "subsections",
|
|
2228
|
+
title: "Subsections",
|
|
2229
|
+
type: "array",
|
|
2230
|
+
of: [{ type: "reference", to: [{ type: "faqItem" }, { type: "pageSection" }, { type: "sliderSection" }] }]
|
|
2231
|
+
}),
|
|
2232
|
+
defineField23({
|
|
2233
|
+
name: "style",
|
|
2234
|
+
title: "Style",
|
|
2235
|
+
type: "string"
|
|
2236
|
+
}),
|
|
2237
|
+
defineField23({
|
|
2238
|
+
name: "backgroundImage",
|
|
2239
|
+
title: "Background Image",
|
|
2240
|
+
type: "image",
|
|
2241
|
+
options: { hotspot: true }
|
|
2242
|
+
}),
|
|
2243
|
+
defineField23({
|
|
2244
|
+
name: "backgroundImageMobile",
|
|
2245
|
+
title: "Background Image Mobile",
|
|
2246
|
+
type: "image",
|
|
2247
|
+
options: { hotspot: true }
|
|
2248
|
+
}),
|
|
2249
|
+
defineField23({
|
|
2250
|
+
name: "customData",
|
|
2251
|
+
title: "Custom Data",
|
|
2252
|
+
type: "text",
|
|
2253
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
2254
|
+
})
|
|
2255
|
+
],
|
|
2256
|
+
preview: {
|
|
2257
|
+
select: {
|
|
2258
|
+
title: "id",
|
|
2259
|
+
locale: "locale"
|
|
2260
|
+
},
|
|
2261
|
+
prepare(selection) {
|
|
2262
|
+
const { title, locale } = selection;
|
|
2263
|
+
return {
|
|
2264
|
+
title: title ?? "",
|
|
2265
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
});
|
|
2270
|
+
|
|
2271
|
+
// src/shared/sanity/schemaTypes/profile.ts
|
|
2272
|
+
import { defineField as defineField24, defineType as defineType24 } from "sanity";
|
|
2273
|
+
var profile_default = defineType24({
|
|
2274
|
+
name: "profile",
|
|
2275
|
+
title: "Profile",
|
|
2276
|
+
type: "document",
|
|
2277
|
+
fields: [
|
|
2278
|
+
defineField24({
|
|
2279
|
+
name: "locale",
|
|
2280
|
+
title: "Locale",
|
|
2281
|
+
type: "string",
|
|
2282
|
+
description: "Set by the document-internationalization plugin.",
|
|
2283
|
+
hidden: true,
|
|
2284
|
+
readOnly: true
|
|
2285
|
+
}),
|
|
2286
|
+
defineField24({
|
|
2287
|
+
name: "contentfulId",
|
|
2288
|
+
title: "Contentful ID",
|
|
2289
|
+
type: "string",
|
|
2290
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2291
|
+
hidden: true,
|
|
2292
|
+
readOnly: true
|
|
2293
|
+
}),
|
|
2294
|
+
defineField24({
|
|
2295
|
+
name: "id",
|
|
2296
|
+
title: "ID",
|
|
2297
|
+
type: "string",
|
|
2298
|
+
validation: (rule) => rule.required()
|
|
2299
|
+
}),
|
|
2300
|
+
defineField24({
|
|
2301
|
+
name: "type",
|
|
2302
|
+
title: "Type",
|
|
2303
|
+
type: "string",
|
|
2304
|
+
validation: (rule) => rule.required()
|
|
2305
|
+
}),
|
|
2306
|
+
defineField24({
|
|
2307
|
+
name: "name",
|
|
2308
|
+
title: "Name",
|
|
2309
|
+
type: "string",
|
|
2310
|
+
validation: (rule) => rule.required()
|
|
2311
|
+
}),
|
|
2312
|
+
defineField24({
|
|
2313
|
+
name: "nativeLanguage",
|
|
2314
|
+
title: "Native language",
|
|
2315
|
+
type: "string",
|
|
2316
|
+
validation: (rule) => rule.required()
|
|
2317
|
+
}),
|
|
2318
|
+
defineField24({
|
|
2319
|
+
name: "practicingLanguage",
|
|
2320
|
+
title: "Practicing language",
|
|
2321
|
+
type: "string",
|
|
2322
|
+
validation: (rule) => rule.required()
|
|
2323
|
+
}),
|
|
2324
|
+
defineField24({
|
|
2325
|
+
name: "picture",
|
|
2326
|
+
title: "Picture",
|
|
2327
|
+
type: "image",
|
|
2328
|
+
options: { hotspot: true },
|
|
2329
|
+
validation: (rule) => rule.required()
|
|
2330
|
+
}),
|
|
2331
|
+
defineField24({
|
|
2332
|
+
name: "useCase",
|
|
2333
|
+
title: "Tandem Use Case",
|
|
2334
|
+
type: "string",
|
|
2335
|
+
validation: (rule) => rule.required()
|
|
2336
|
+
}),
|
|
2337
|
+
defineField24({
|
|
2338
|
+
name: "text",
|
|
2339
|
+
title: "Text",
|
|
2340
|
+
type: "text",
|
|
2341
|
+
validation: (rule) => rule.required()
|
|
2342
|
+
})
|
|
2343
|
+
],
|
|
2344
|
+
preview: {
|
|
2345
|
+
select: {
|
|
2346
|
+
title: "id",
|
|
2347
|
+
locale: "locale"
|
|
2348
|
+
},
|
|
2349
|
+
prepare(selection) {
|
|
2350
|
+
const { title, locale } = selection;
|
|
2351
|
+
return {
|
|
2352
|
+
title: title ?? "",
|
|
2353
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2359
|
+
// src/shared/sanity/schemaTypes/profilesCarousel.ts
|
|
2360
|
+
import { defineField as defineField25, defineType as defineType25 } from "sanity";
|
|
2361
|
+
var profilesCarousel_default = defineType25({
|
|
2362
|
+
name: "profilesCarousel",
|
|
2363
|
+
title: "Carousel: User Profiles",
|
|
2364
|
+
type: "document",
|
|
2365
|
+
fields: [
|
|
2366
|
+
defineField25({
|
|
2367
|
+
name: "locale",
|
|
2368
|
+
title: "Locale",
|
|
2369
|
+
type: "string",
|
|
2370
|
+
description: "Set by the document-internationalization plugin.",
|
|
2371
|
+
hidden: true,
|
|
2372
|
+
readOnly: true
|
|
2373
|
+
}),
|
|
2374
|
+
defineField25({
|
|
2375
|
+
name: "contentfulId",
|
|
2376
|
+
title: "Contentful ID",
|
|
2377
|
+
type: "string",
|
|
2378
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2379
|
+
hidden: true,
|
|
2380
|
+
readOnly: true
|
|
2381
|
+
}),
|
|
2382
|
+
defineField25({
|
|
2383
|
+
name: "heading",
|
|
2384
|
+
title: "Heading",
|
|
2385
|
+
type: "string",
|
|
2386
|
+
validation: (rule) => rule.required()
|
|
2387
|
+
}),
|
|
2388
|
+
defineField25({
|
|
2389
|
+
name: "practicingText",
|
|
2390
|
+
title: "Practicing text",
|
|
2391
|
+
type: "string",
|
|
2392
|
+
validation: (rule) => rule.required()
|
|
2393
|
+
}),
|
|
2394
|
+
defineField25({
|
|
2395
|
+
name: "nativeText",
|
|
2396
|
+
title: "Native text",
|
|
2397
|
+
type: "string",
|
|
2398
|
+
validation: (rule) => rule.required()
|
|
2399
|
+
}),
|
|
2400
|
+
defineField25({
|
|
2401
|
+
name: "buttonText",
|
|
2402
|
+
title: "Button text",
|
|
2403
|
+
type: "string",
|
|
2404
|
+
validation: (rule) => rule.required()
|
|
2405
|
+
}),
|
|
2406
|
+
defineField25({
|
|
2407
|
+
name: "dataTrack",
|
|
2408
|
+
title: "dataTrack",
|
|
2409
|
+
type: "string",
|
|
2410
|
+
validation: (rule) => rule.required()
|
|
2411
|
+
}),
|
|
2412
|
+
defineField25({
|
|
2413
|
+
name: "profiles",
|
|
2414
|
+
title: "Profiles",
|
|
2415
|
+
type: "array",
|
|
2416
|
+
of: [{ type: "reference", to: [{ type: "profile" }] }],
|
|
2417
|
+
validation: (rule) => rule.required()
|
|
2418
|
+
})
|
|
2419
|
+
],
|
|
2420
|
+
preview: {
|
|
2421
|
+
select: {
|
|
2422
|
+
title: "heading",
|
|
2423
|
+
locale: "locale"
|
|
2424
|
+
},
|
|
2425
|
+
prepare(selection) {
|
|
2426
|
+
const { title, locale } = selection;
|
|
2427
|
+
return {
|
|
2428
|
+
title: title ?? "",
|
|
2429
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
|
|
2435
|
+
// src/shared/sanity/schemaTypes/refsList.ts
|
|
2436
|
+
import { defineField as defineField26, defineType as defineType26 } from "sanity";
|
|
2437
|
+
var refsList_default = defineType26({
|
|
2438
|
+
name: "refsList",
|
|
2439
|
+
title: "List of refs",
|
|
2440
|
+
type: "document",
|
|
2441
|
+
fields: [
|
|
2442
|
+
defineField26({
|
|
2443
|
+
name: "locale",
|
|
2444
|
+
title: "Locale",
|
|
2445
|
+
type: "string",
|
|
2446
|
+
description: "Set by the document-internationalization plugin.",
|
|
2447
|
+
hidden: true,
|
|
2448
|
+
readOnly: true
|
|
2449
|
+
}),
|
|
2450
|
+
defineField26({
|
|
2451
|
+
name: "contentfulId",
|
|
2452
|
+
title: "Contentful ID",
|
|
2453
|
+
type: "string",
|
|
2454
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2455
|
+
hidden: true,
|
|
2456
|
+
readOnly: true
|
|
2457
|
+
}),
|
|
2458
|
+
defineField26({
|
|
2459
|
+
name: "id",
|
|
2460
|
+
title: "ID",
|
|
2461
|
+
type: "string",
|
|
2462
|
+
validation: (rule) => rule.required()
|
|
2463
|
+
}),
|
|
2464
|
+
defineField26({
|
|
2465
|
+
name: "title",
|
|
2466
|
+
title: "Title",
|
|
2467
|
+
type: "string"
|
|
2468
|
+
}),
|
|
2469
|
+
defineField26({
|
|
2470
|
+
name: "refs",
|
|
2471
|
+
title: "References",
|
|
2472
|
+
type: "array",
|
|
2473
|
+
// TODO: no linkContentType constraint — restrict as needed
|
|
2474
|
+
of: [{ type: "reference", to: [{ type: "audioPhrase" }, { type: "banner" }, { type: "blogThumbs" }, { type: "columnizedText" }, { type: "cookieBanner" }, { type: "customJson" }, { type: "downloadPage" }, { type: "faqItem" }, { type: "freeformText" }, { type: "gridLayout" }, { type: "heroBlock" }, { type: "iconWithText" }, { type: "imageAndContent" }, { type: "link" }, { type: "longtailPage" }, { type: "markDown" }, { type: "menu" }, { type: "page" }, { type: "pageSection" }, { type: "profile" }, { type: "profilesCarousel" }, { type: "refsList" }, { type: "scheduledParty" }, { type: "sliderSection" }, { type: "statsBlock" }] }]
|
|
2475
|
+
}),
|
|
2476
|
+
defineField26({
|
|
2477
|
+
name: "type",
|
|
2478
|
+
title: "type",
|
|
2479
|
+
type: "string",
|
|
2480
|
+
validation: (rule) => rule.required()
|
|
2481
|
+
}),
|
|
2482
|
+
defineField26({
|
|
2483
|
+
name: "background",
|
|
2484
|
+
title: "background",
|
|
2485
|
+
type: "string"
|
|
2486
|
+
}),
|
|
2487
|
+
defineField26({
|
|
2488
|
+
name: "customData",
|
|
2489
|
+
title: "Custom Data",
|
|
2490
|
+
type: "text",
|
|
2491
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
2492
|
+
}),
|
|
2493
|
+
defineField26({
|
|
2494
|
+
name: "width",
|
|
2495
|
+
title: "width",
|
|
2496
|
+
type: "string"
|
|
2497
|
+
}),
|
|
2498
|
+
defineField26({
|
|
2499
|
+
name: "alignTitle",
|
|
2500
|
+
title: "Align Title",
|
|
2501
|
+
type: "string"
|
|
2502
|
+
}),
|
|
2503
|
+
defineField26({
|
|
2504
|
+
name: "borders",
|
|
2505
|
+
title: "Borders",
|
|
2506
|
+
type: "array",
|
|
2507
|
+
of: [{ type: "string" }]
|
|
2508
|
+
})
|
|
2509
|
+
],
|
|
2510
|
+
preview: {
|
|
2511
|
+
select: {
|
|
2512
|
+
title: "id",
|
|
2513
|
+
locale: "locale"
|
|
2514
|
+
},
|
|
2515
|
+
prepare(selection) {
|
|
2516
|
+
const { title, locale } = selection;
|
|
2517
|
+
return {
|
|
2518
|
+
title: title ?? "",
|
|
2519
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2520
|
+
};
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
|
|
2525
|
+
// src/shared/sanity/schemaTypes/scheduledParty.ts
|
|
2526
|
+
import { defineField as defineField27, defineType as defineType27 } from "sanity";
|
|
2527
|
+
var scheduledParty_default = defineType27({
|
|
2528
|
+
name: "scheduledParty",
|
|
2529
|
+
title: "Scheduled Party",
|
|
2530
|
+
type: "document",
|
|
2531
|
+
fields: [
|
|
2532
|
+
defineField27({
|
|
2533
|
+
name: "locale",
|
|
2534
|
+
title: "Locale",
|
|
2535
|
+
type: "string",
|
|
2536
|
+
description: "Set by the document-internationalization plugin.",
|
|
2537
|
+
hidden: true,
|
|
2538
|
+
readOnly: true
|
|
2539
|
+
}),
|
|
2540
|
+
defineField27({
|
|
2541
|
+
name: "contentfulId",
|
|
2542
|
+
title: "Contentful ID",
|
|
2543
|
+
type: "string",
|
|
2544
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2545
|
+
hidden: true,
|
|
2546
|
+
readOnly: true
|
|
2547
|
+
}),
|
|
2548
|
+
defineField27({
|
|
2549
|
+
name: "title",
|
|
2550
|
+
title: "Title",
|
|
2551
|
+
type: "string",
|
|
2552
|
+
validation: (rule) => rule.required()
|
|
2553
|
+
}),
|
|
2554
|
+
defineField27({
|
|
2555
|
+
name: "date",
|
|
2556
|
+
title: "Date",
|
|
2557
|
+
type: "datetime",
|
|
2558
|
+
validation: (rule) => rule.required()
|
|
2559
|
+
}),
|
|
2560
|
+
defineField27({
|
|
2561
|
+
name: "languages",
|
|
2562
|
+
title: "Languages",
|
|
2563
|
+
type: "array",
|
|
2564
|
+
of: [{ type: "string" }],
|
|
2565
|
+
validation: (rule) => rule.required()
|
|
2566
|
+
})
|
|
2567
|
+
],
|
|
2568
|
+
preview: {
|
|
2569
|
+
select: {
|
|
2570
|
+
title: "title",
|
|
2571
|
+
locale: "locale"
|
|
2572
|
+
},
|
|
2573
|
+
prepare(selection) {
|
|
2574
|
+
const { title, locale } = selection;
|
|
2575
|
+
return {
|
|
2576
|
+
title: title ?? "",
|
|
2577
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2578
|
+
};
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
});
|
|
2582
|
+
|
|
2583
|
+
// src/shared/sanity/schemaTypes/sliderSection.ts
|
|
2584
|
+
import { defineField as defineField28, defineType as defineType28 } from "sanity";
|
|
2585
|
+
var sliderSection_default = defineType28({
|
|
2586
|
+
name: "sliderSection",
|
|
2587
|
+
title: "Slider section",
|
|
2588
|
+
type: "document",
|
|
2589
|
+
fields: [
|
|
2590
|
+
defineField28({
|
|
2591
|
+
name: "locale",
|
|
2592
|
+
title: "Locale",
|
|
2593
|
+
type: "string",
|
|
2594
|
+
description: "Set by the document-internationalization plugin.",
|
|
2595
|
+
hidden: true,
|
|
2596
|
+
readOnly: true
|
|
2597
|
+
}),
|
|
2598
|
+
defineField28({
|
|
2599
|
+
name: "contentfulId",
|
|
2600
|
+
title: "Contentful ID",
|
|
2601
|
+
type: "string",
|
|
2602
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2603
|
+
hidden: true,
|
|
2604
|
+
readOnly: true
|
|
2605
|
+
}),
|
|
2606
|
+
defineField28({
|
|
2607
|
+
name: "id",
|
|
2608
|
+
title: "ID",
|
|
2609
|
+
type: "string"
|
|
2610
|
+
}),
|
|
2611
|
+
defineField28({
|
|
2612
|
+
name: "title",
|
|
2613
|
+
title: "Title",
|
|
2614
|
+
type: "string",
|
|
2615
|
+
validation: (rule) => rule.required()
|
|
2616
|
+
}),
|
|
2617
|
+
defineField28({
|
|
2618
|
+
name: "icon",
|
|
2619
|
+
title: "Icon",
|
|
2620
|
+
type: "image",
|
|
2621
|
+
options: { hotspot: true },
|
|
2622
|
+
validation: (rule) => rule.required()
|
|
2623
|
+
}),
|
|
2624
|
+
defineField28({
|
|
2625
|
+
name: "screen",
|
|
2626
|
+
title: "Screen",
|
|
2627
|
+
type: "image",
|
|
2628
|
+
options: { hotspot: true },
|
|
2629
|
+
validation: (rule) => rule.required()
|
|
2630
|
+
}),
|
|
2631
|
+
defineField28({
|
|
2632
|
+
name: "fallbackScreen",
|
|
2633
|
+
title: "Fallback Screen",
|
|
2634
|
+
type: "image",
|
|
2635
|
+
options: { hotspot: true },
|
|
2636
|
+
validation: (rule) => rule.required()
|
|
2637
|
+
}),
|
|
2638
|
+
defineField28({
|
|
2639
|
+
name: "still",
|
|
2640
|
+
title: "Still",
|
|
2641
|
+
type: "image",
|
|
2642
|
+
options: { hotspot: true },
|
|
2643
|
+
validation: (rule) => rule.required()
|
|
2644
|
+
})
|
|
2645
|
+
],
|
|
2646
|
+
preview: {
|
|
2647
|
+
select: {
|
|
2648
|
+
title: "id",
|
|
2649
|
+
locale: "locale"
|
|
2650
|
+
},
|
|
2651
|
+
prepare(selection) {
|
|
2652
|
+
const { title, locale } = selection;
|
|
2653
|
+
return {
|
|
2654
|
+
title: title ?? "",
|
|
2655
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2656
|
+
};
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
});
|
|
2660
|
+
|
|
2661
|
+
// src/shared/sanity/schemaTypes/statsBlock.ts
|
|
2662
|
+
import { defineField as defineField29, defineType as defineType29 } from "sanity";
|
|
2663
|
+
var statsBlock_default = defineType29({
|
|
2664
|
+
name: "statsBlock",
|
|
2665
|
+
title: "List of texts",
|
|
2666
|
+
type: "document",
|
|
2667
|
+
fields: [
|
|
2668
|
+
defineField29({
|
|
2669
|
+
name: "locale",
|
|
2670
|
+
title: "Locale",
|
|
2671
|
+
type: "string",
|
|
2672
|
+
description: "Set by the document-internationalization plugin.",
|
|
2673
|
+
hidden: true,
|
|
2674
|
+
readOnly: true
|
|
2675
|
+
}),
|
|
2676
|
+
defineField29({
|
|
2677
|
+
name: "contentfulId",
|
|
2678
|
+
title: "Contentful ID",
|
|
2679
|
+
type: "string",
|
|
2680
|
+
description: "Original Contentful entry ID; used to resolve references during migration.",
|
|
2681
|
+
hidden: true,
|
|
2682
|
+
readOnly: true
|
|
2683
|
+
}),
|
|
2684
|
+
defineField29({
|
|
2685
|
+
name: "id",
|
|
2686
|
+
title: "ID",
|
|
2687
|
+
type: "string"
|
|
2688
|
+
}),
|
|
2689
|
+
defineField29({
|
|
2690
|
+
name: "type",
|
|
2691
|
+
title: "Type",
|
|
2692
|
+
type: "string"
|
|
2693
|
+
}),
|
|
2694
|
+
defineField29({
|
|
2695
|
+
name: "heading",
|
|
2696
|
+
title: "Heading",
|
|
2697
|
+
type: "string"
|
|
2698
|
+
}),
|
|
2699
|
+
defineField29({
|
|
2700
|
+
name: "subHeading",
|
|
2701
|
+
title: "Subheading",
|
|
2702
|
+
type: "string"
|
|
2703
|
+
}),
|
|
2704
|
+
defineField29({
|
|
2705
|
+
name: "elements",
|
|
2706
|
+
title: "Elements",
|
|
2707
|
+
type: "array",
|
|
2708
|
+
of: [{ type: "string" }]
|
|
2709
|
+
}),
|
|
2710
|
+
defineField29({
|
|
2711
|
+
name: "customData",
|
|
2712
|
+
title: "customData",
|
|
2713
|
+
type: "text",
|
|
2714
|
+
description: "JSON data (migrated from Contentful Object field)."
|
|
2715
|
+
}),
|
|
2716
|
+
defineField29({
|
|
2717
|
+
name: "cta",
|
|
2718
|
+
title: "CTA",
|
|
2719
|
+
type: "reference",
|
|
2720
|
+
to: [{ type: "link" }]
|
|
2721
|
+
})
|
|
2722
|
+
],
|
|
2723
|
+
preview: {
|
|
2724
|
+
select: {
|
|
2725
|
+
title: "id",
|
|
2726
|
+
locale: "locale"
|
|
2727
|
+
},
|
|
2728
|
+
prepare(selection) {
|
|
2729
|
+
const { title, locale } = selection;
|
|
2730
|
+
return {
|
|
2731
|
+
title: title ?? "",
|
|
2732
|
+
subtitle: locale ? ` [${locale}]` : ""
|
|
2733
|
+
};
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
});
|
|
2737
|
+
|
|
2738
|
+
// src/shared/sanity/schemaTypes/components/button.ts
|
|
2739
|
+
import { defineField as defineField30, defineType as defineType30 } from "sanity";
|
|
2740
|
+
var button_default = defineType30({
|
|
2741
|
+
name: "button",
|
|
2742
|
+
title: "Button",
|
|
2743
|
+
type: "document",
|
|
2744
|
+
fields: [
|
|
2745
|
+
defineField30({
|
|
2746
|
+
name: "locale",
|
|
2747
|
+
title: "Locale",
|
|
2748
|
+
type: "string",
|
|
2749
|
+
description: "Set by the document-internationalization plugin.",
|
|
2750
|
+
hidden: true,
|
|
2751
|
+
readOnly: true
|
|
2752
|
+
}),
|
|
2753
|
+
defineField30({
|
|
2754
|
+
name: "contentfulId",
|
|
2755
|
+
title: "Contentful ID",
|
|
2756
|
+
type: "string",
|
|
2757
|
+
description: "Original Contentful entry ID; used to resolve references when migrating blog posts.",
|
|
2758
|
+
hidden: true,
|
|
2759
|
+
readOnly: true
|
|
2760
|
+
}),
|
|
2761
|
+
defineField30({
|
|
2762
|
+
name: "title",
|
|
2763
|
+
title: "Title",
|
|
2764
|
+
type: "string",
|
|
2765
|
+
description: "Internal title for this button entry",
|
|
2766
|
+
validation: (rule) => rule.required()
|
|
2767
|
+
}),
|
|
2768
|
+
defineField30({
|
|
2769
|
+
name: "label",
|
|
2770
|
+
title: "Label",
|
|
2771
|
+
type: "string",
|
|
2772
|
+
description: "Text displayed on the button",
|
|
2773
|
+
validation: (rule) => rule.required()
|
|
2774
|
+
}),
|
|
2775
|
+
defineField30({
|
|
2776
|
+
name: "url",
|
|
2777
|
+
title: "URL",
|
|
2778
|
+
type: "string",
|
|
2779
|
+
description: "Relative slug (e.g. /download) or absolute URL.",
|
|
2780
|
+
validation: (rule) => slugOrUrlRules(rule, { slug: true, absolute: true })
|
|
2781
|
+
}),
|
|
2782
|
+
defineField30({
|
|
2783
|
+
name: "icon",
|
|
2784
|
+
title: "Icon",
|
|
2785
|
+
type: "image",
|
|
2786
|
+
options: {
|
|
2787
|
+
hotspot: true
|
|
2788
|
+
}
|
|
2789
|
+
}),
|
|
2790
|
+
defineField30({
|
|
2791
|
+
name: "rel",
|
|
2792
|
+
title: "Rel attribute",
|
|
2793
|
+
type: "string",
|
|
2794
|
+
description: "Optional rel attribute (e.g. noopener, noreferrer)"
|
|
2795
|
+
}),
|
|
2796
|
+
defineField30({
|
|
2797
|
+
name: "dataTrack",
|
|
2798
|
+
title: "data-track",
|
|
2799
|
+
type: "string",
|
|
2800
|
+
description: "Custom data attribute, mapped to data-track on the button"
|
|
2801
|
+
}),
|
|
2802
|
+
defineField30({
|
|
2803
|
+
name: "size",
|
|
2804
|
+
title: "Size",
|
|
2805
|
+
type: "string",
|
|
2806
|
+
options: {
|
|
2807
|
+
list: [
|
|
2808
|
+
{ title: "Small", value: "small" },
|
|
2809
|
+
{ title: "Default", value: "default" },
|
|
2810
|
+
{ title: "Large", value: "large" }
|
|
2811
|
+
],
|
|
2812
|
+
layout: "radio"
|
|
2813
|
+
},
|
|
2814
|
+
initialValue: "default",
|
|
2815
|
+
validation: (rule) => rule.required()
|
|
2816
|
+
}),
|
|
2817
|
+
defineField30({
|
|
2818
|
+
name: "variant",
|
|
2819
|
+
title: "Variant",
|
|
2820
|
+
type: "string",
|
|
2821
|
+
options: {
|
|
2822
|
+
list: [
|
|
2823
|
+
{ title: "Solid", value: "solid" },
|
|
2824
|
+
{ title: "Outline", value: "outline" },
|
|
2825
|
+
{ title: "Ghost", value: "ghost" }
|
|
2826
|
+
],
|
|
2827
|
+
layout: "radio"
|
|
2828
|
+
},
|
|
2829
|
+
initialValue: "solid",
|
|
2830
|
+
validation: (rule) => rule.required()
|
|
2831
|
+
})
|
|
2832
|
+
],
|
|
2833
|
+
preview: {
|
|
2834
|
+
select: {
|
|
2835
|
+
title: "title",
|
|
2836
|
+
locale: "locale"
|
|
2837
|
+
},
|
|
2838
|
+
prepare(selection) {
|
|
2839
|
+
const { title, locale } = selection;
|
|
2840
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
2841
|
+
return {
|
|
2842
|
+
title: title ?? "",
|
|
2843
|
+
subtitle: localeSuffix
|
|
2844
|
+
};
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
});
|
|
2848
|
+
|
|
2849
|
+
// src/shared/sanity/schemaTypes/components/heroImage.ts
|
|
2850
|
+
import { defineField as defineField31, defineType as defineType31 } from "sanity";
|
|
2851
|
+
var heroImage_default = defineType31({
|
|
2852
|
+
name: "heroImage",
|
|
2853
|
+
title: "Hero Image",
|
|
2854
|
+
type: "document",
|
|
2855
|
+
fields: [
|
|
2856
|
+
defineField31({
|
|
2857
|
+
name: "locale",
|
|
2858
|
+
title: "Locale",
|
|
2859
|
+
type: "string",
|
|
2860
|
+
description: "Set by the document-internationalization plugin.",
|
|
2861
|
+
hidden: true,
|
|
2862
|
+
readOnly: true
|
|
2863
|
+
}),
|
|
2864
|
+
defineField31({
|
|
2865
|
+
name: "title",
|
|
2866
|
+
title: "Title",
|
|
2867
|
+
type: "string",
|
|
2868
|
+
validation: (rule) => rule.required()
|
|
2869
|
+
}),
|
|
2870
|
+
defineField31({
|
|
2871
|
+
name: "image",
|
|
2872
|
+
title: "Image",
|
|
2873
|
+
type: "image",
|
|
2874
|
+
options: { hotspot: true },
|
|
2875
|
+
validation: (rule) => rule.required()
|
|
2876
|
+
}),
|
|
2877
|
+
defineField31({
|
|
2878
|
+
name: "tabletImage",
|
|
2879
|
+
title: "Tablet Image",
|
|
2880
|
+
type: "image",
|
|
2881
|
+
options: { hotspot: true }
|
|
2882
|
+
}),
|
|
2883
|
+
defineField31({
|
|
2884
|
+
name: "mobileImage",
|
|
2885
|
+
title: "Mobile Image",
|
|
2886
|
+
type: "image",
|
|
2887
|
+
options: { hotspot: true }
|
|
2888
|
+
}),
|
|
2889
|
+
defineField31({
|
|
2890
|
+
name: "imageAlt",
|
|
2891
|
+
title: "Image Alt Text",
|
|
2892
|
+
type: "string"
|
|
2893
|
+
})
|
|
2894
|
+
],
|
|
2895
|
+
preview: {
|
|
2896
|
+
select: {
|
|
2897
|
+
title: "title",
|
|
2898
|
+
locale: "locale"
|
|
2899
|
+
},
|
|
2900
|
+
prepare(selection) {
|
|
2901
|
+
const { title, locale } = selection;
|
|
2902
|
+
const localeSuffix = locale ? ` [${locale}]` : "";
|
|
2903
|
+
return {
|
|
2904
|
+
title: title ?? "",
|
|
2905
|
+
subtitle: localeSuffix
|
|
2906
|
+
};
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
|
|
2911
|
+
// src/shared/sanity/schemaTypes/index.ts
|
|
2912
|
+
var schemaTypes_default = [
|
|
2913
|
+
audioPhrase_default,
|
|
2914
|
+
banner_default,
|
|
2915
|
+
blogGetAppBanner_default,
|
|
2916
|
+
blogLanguagesSidebar_default,
|
|
2917
|
+
blogPopup_default,
|
|
2918
|
+
blogPost_default,
|
|
2919
|
+
blogThumbs_default,
|
|
2920
|
+
button_default,
|
|
2921
|
+
columnizedText_default,
|
|
2922
|
+
cookieBanner_default,
|
|
2923
|
+
customJson_default,
|
|
2924
|
+
downloadPage_default,
|
|
2925
|
+
faqItem_default,
|
|
2926
|
+
freeformText_default,
|
|
2927
|
+
gridLayout_default,
|
|
2928
|
+
heroBlock_default,
|
|
2929
|
+
heroImage_default,
|
|
2930
|
+
iconWithText_default,
|
|
2931
|
+
imageAndContent_default,
|
|
2932
|
+
link_default,
|
|
2933
|
+
longtailPage_default,
|
|
2934
|
+
markDown_default,
|
|
2935
|
+
menu_default,
|
|
2936
|
+
page_default,
|
|
2937
|
+
pageSection_default,
|
|
2938
|
+
profile_default,
|
|
2939
|
+
profilesCarousel_default,
|
|
2940
|
+
refsList_default,
|
|
2941
|
+
scheduledParty_default,
|
|
2942
|
+
sliderSection_default,
|
|
2943
|
+
statsBlock_default
|
|
2944
|
+
];
|
|
2945
|
+
|
|
2946
|
+
// src/shared/sanity/structure.ts
|
|
2947
|
+
var structure = (S) => S.list().title("Content").items([
|
|
2948
|
+
S.listItem().title("Pages").child(
|
|
2949
|
+
S.list().title("Pages").items([
|
|
2950
|
+
S.documentTypeListItem("page").title("Page"),
|
|
2951
|
+
S.documentTypeListItem("longtailPage").title("Longtail Page"),
|
|
2952
|
+
S.documentTypeListItem("pageSection").title("Page Section")
|
|
2953
|
+
])
|
|
2954
|
+
),
|
|
2955
|
+
S.listItem().title("Components").child(
|
|
2956
|
+
S.list().title("Page Section Components").items([
|
|
2957
|
+
S.documentTypeListItem("audioPhrase").title("Audio Phrase"),
|
|
2958
|
+
S.documentTypeListItem("banner").title("Banner"),
|
|
2959
|
+
S.documentTypeListItem("button").title("Button"),
|
|
2960
|
+
S.documentTypeListItem("columnizedText").title("Columnized Text"),
|
|
2961
|
+
S.documentTypeListItem("cookieBanner").title("Cookie Banner"),
|
|
2962
|
+
S.documentTypeListItem("customJson").title("Custom JSON"),
|
|
2963
|
+
S.documentTypeListItem("freeformText").title("Freeform Text"),
|
|
2964
|
+
S.documentTypeListItem("gridLayout").title("Grid Layout"),
|
|
2965
|
+
S.documentTypeListItem("heroBlock").title("Hero Block"),
|
|
2966
|
+
S.documentTypeListItem("heroImage").title("Hero Image"),
|
|
2967
|
+
S.documentTypeListItem("imageAndContent").title("Image and Content"),
|
|
2968
|
+
S.documentTypeListItem("profile").title("Profile"),
|
|
2969
|
+
S.documentTypeListItem("menu").title("Menu"),
|
|
2970
|
+
S.documentTypeListItem("refsList").title("References List")
|
|
2971
|
+
])
|
|
2972
|
+
),
|
|
2973
|
+
S.listItem().title("Blog").child(
|
|
2974
|
+
S.list().title("Blog").items([
|
|
2975
|
+
S.documentTypeListItem("blogPost").title("Blog Post"),
|
|
2976
|
+
S.documentTypeListItem("blogGetAppBanner").title("Blog Post Get App Banner"),
|
|
2977
|
+
S.documentTypeListItem("blogPopup").title("Blog Popup"),
|
|
2978
|
+
S.documentTypeListItem("blogLanguagesSidebar").title("Blog Languages Sidebar")
|
|
2979
|
+
])
|
|
2980
|
+
),
|
|
2981
|
+
S.divider(),
|
|
2982
|
+
S.listItem().title("Utils (Ignore)").child(
|
|
2983
|
+
S.list().title("Utils (Ignore)").items([
|
|
2984
|
+
S.documentTypeListItem("translation.metadata").title(
|
|
2985
|
+
"Translation Metadata"
|
|
2986
|
+
),
|
|
2987
|
+
S.documentTypeListItem("media.tag").title("Media Tag")
|
|
2988
|
+
])
|
|
2989
|
+
)
|
|
2990
|
+
]);
|
|
2991
|
+
|
|
2992
|
+
// src/shared/sanity/documentCountsTool.tsx
|
|
2993
|
+
import { useEffect, useState, useCallback } from "react";
|
|
2994
|
+
import { definePlugin, useClient } from "sanity";
|
|
2995
|
+
import {
|
|
2996
|
+
Card,
|
|
2997
|
+
Stack,
|
|
2998
|
+
Text,
|
|
2999
|
+
Heading,
|
|
3000
|
+
Flex,
|
|
3001
|
+
Spinner,
|
|
3002
|
+
Button,
|
|
3003
|
+
Badge,
|
|
3004
|
+
Container
|
|
3005
|
+
} from "@sanity/ui";
|
|
3006
|
+
import { DocumentsIcon } from "@sanity/icons";
|
|
3007
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3008
|
+
var DocumentCountsDashboard = () => {
|
|
3009
|
+
const client = useClient({ apiVersion: "2024-01-01" });
|
|
3010
|
+
const [counts, setCounts] = useState([]);
|
|
3011
|
+
const [loading, setLoading] = useState(true);
|
|
3012
|
+
const [totals, setTotals] = useState({ published: 0, drafts: 0, total: 0 });
|
|
3013
|
+
const fetchCounts = useCallback(async () => {
|
|
3014
|
+
setLoading(true);
|
|
3015
|
+
try {
|
|
3016
|
+
const types = await client.fetch(
|
|
3017
|
+
"array::unique(*[]._type)"
|
|
3018
|
+
);
|
|
3019
|
+
if (!types.length) {
|
|
3020
|
+
setCounts([]);
|
|
3021
|
+
setTotals({ published: 0, drafts: 0, total: 0 });
|
|
3022
|
+
setLoading(false);
|
|
3023
|
+
return;
|
|
3024
|
+
}
|
|
3025
|
+
const projections = types.map(
|
|
3026
|
+
(t) => `"${t}": { "published": count(*[_type == "${t}" && !(_id in path("drafts.**"))]), "drafts": count(*[_type == "${t}" && _id in path("drafts.**")]) }`
|
|
3027
|
+
).join(", ");
|
|
3028
|
+
const result = await client.fetch(`{ ${projections} }`);
|
|
3029
|
+
const typeCounts = types.map((type) => ({
|
|
3030
|
+
type,
|
|
3031
|
+
published: result[type]?.published || 0,
|
|
3032
|
+
drafts: result[type]?.drafts || 0,
|
|
3033
|
+
total: (result[type]?.published || 0) + (result[type]?.drafts || 0)
|
|
3034
|
+
})).sort((a, b) => b.total - a.total);
|
|
3035
|
+
setCounts(typeCounts);
|
|
3036
|
+
setTotals(
|
|
3037
|
+
typeCounts.reduce(
|
|
3038
|
+
(acc, tc) => ({
|
|
3039
|
+
published: acc.published + tc.published,
|
|
3040
|
+
drafts: acc.drafts + tc.drafts,
|
|
3041
|
+
total: acc.total + tc.total
|
|
3042
|
+
}),
|
|
3043
|
+
{ published: 0, drafts: 0, total: 0 }
|
|
3044
|
+
)
|
|
3045
|
+
);
|
|
3046
|
+
} catch (err) {
|
|
3047
|
+
console.error("Failed to fetch document counts:", err);
|
|
3048
|
+
} finally {
|
|
3049
|
+
setLoading(false);
|
|
3050
|
+
}
|
|
3051
|
+
}, [client]);
|
|
3052
|
+
useEffect(() => {
|
|
3053
|
+
fetchCounts();
|
|
3054
|
+
}, [fetchCounts]);
|
|
3055
|
+
if (loading) {
|
|
3056
|
+
return /* @__PURE__ */ jsx(Flex, { align: "center", justify: "center", padding: 5, height: "fill", children: /* @__PURE__ */ jsx(Spinner, { muted: true }) });
|
|
3057
|
+
}
|
|
3058
|
+
return /* @__PURE__ */ jsx(Container, { width: 2, padding: 4, children: /* @__PURE__ */ jsxs(Stack, { space: 5, children: [
|
|
3059
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", justify: "space-between", children: [
|
|
3060
|
+
/* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
3061
|
+
/* @__PURE__ */ jsx(Heading, { size: 3, children: "Document Counts" }),
|
|
3062
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 4, children: [
|
|
3063
|
+
/* @__PURE__ */ jsxs(Text, { muted: true, size: 2, children: [
|
|
3064
|
+
"Total: ",
|
|
3065
|
+
totals.total.toLocaleString()
|
|
3066
|
+
] }),
|
|
3067
|
+
/* @__PURE__ */ jsxs(Text, { muted: true, size: 2, children: [
|
|
3068
|
+
"Published: ",
|
|
3069
|
+
totals.published.toLocaleString()
|
|
3070
|
+
] }),
|
|
3071
|
+
/* @__PURE__ */ jsxs(Text, { muted: true, size: 2, children: [
|
|
3072
|
+
"Drafts: ",
|
|
3073
|
+
totals.drafts.toLocaleString()
|
|
3074
|
+
] })
|
|
3075
|
+
] })
|
|
3076
|
+
] }),
|
|
3077
|
+
/* @__PURE__ */ jsx(
|
|
3078
|
+
Button,
|
|
3079
|
+
{
|
|
3080
|
+
text: "Refresh",
|
|
3081
|
+
tone: "primary",
|
|
3082
|
+
mode: "ghost",
|
|
3083
|
+
onClick: () => fetchCounts()
|
|
3084
|
+
}
|
|
3085
|
+
)
|
|
3086
|
+
] }),
|
|
3087
|
+
/* @__PURE__ */ jsx(Card, { border: true, radius: 3, overflow: "hidden", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
3088
|
+
/* @__PURE__ */ jsx(Card, { borderBottom: true, padding: 3, tone: "transparent", children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, children: [
|
|
3089
|
+
/* @__PURE__ */ jsx(Flex, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: 1, weight: "semibold", muted: true, children: "Document Type" }) }),
|
|
3090
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Text, { size: 1, weight: "semibold", muted: true, children: "Published" }) }),
|
|
3091
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Text, { size: 1, weight: "semibold", muted: true, children: "Drafts" }) }),
|
|
3092
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Text, { size: 1, weight: "semibold", muted: true, children: "Total" }) })
|
|
3093
|
+
] }) }),
|
|
3094
|
+
counts.map(({ type, published, drafts, total }, index) => /* @__PURE__ */ jsx(
|
|
3095
|
+
Card,
|
|
3096
|
+
{
|
|
3097
|
+
borderBottom: index < counts.length - 1,
|
|
3098
|
+
padding: 3,
|
|
3099
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, children: [
|
|
3100
|
+
/* @__PURE__ */ jsx(Flex, { flex: 1, children: /* @__PURE__ */ jsx(Text, { size: 2, children: type }) }),
|
|
3101
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Badge, { tone: "positive", fontSize: 1, children: published.toLocaleString() }) }),
|
|
3102
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Badge, { tone: "caution", fontSize: 1, children: drafts.toLocaleString() }) }),
|
|
3103
|
+
/* @__PURE__ */ jsx(Flex, { style: { width: 80 }, justify: "flex-end", children: /* @__PURE__ */ jsx(Badge, { tone: "primary", fontSize: 1, children: total.toLocaleString() }) })
|
|
3104
|
+
] })
|
|
3105
|
+
},
|
|
3106
|
+
type
|
|
3107
|
+
)),
|
|
3108
|
+
counts.length === 0 && /* @__PURE__ */ jsx(Card, { padding: 4, children: /* @__PURE__ */ jsx(Text, { align: "center", muted: true, children: "No documents found" }) })
|
|
3109
|
+
] }) })
|
|
3110
|
+
] }) });
|
|
3111
|
+
};
|
|
3112
|
+
var documentCountsPlugin = definePlugin({
|
|
3113
|
+
name: "document-counts",
|
|
3114
|
+
tools: [
|
|
3115
|
+
{
|
|
3116
|
+
name: "document-counts",
|
|
3117
|
+
title: "Document Counts",
|
|
3118
|
+
component: DocumentCountsDashboard,
|
|
3119
|
+
icon: DocumentsIcon
|
|
3120
|
+
}
|
|
3121
|
+
]
|
|
3122
|
+
});
|
|
3123
|
+
|
|
3124
|
+
// src/shared/sanity/previewInspector.ts
|
|
3125
|
+
import { useEffect as useEffect2, useRef } from "react";
|
|
3126
|
+
import { useEditState } from "sanity";
|
|
3127
|
+
import { EyeOpenIcon } from "@sanity/icons";
|
|
3128
|
+
var STAGING_BASE_URL = "https://devtandem.net";
|
|
3129
|
+
var lastOpenByKey = /* @__PURE__ */ new Map();
|
|
3130
|
+
var OPEN_DEDUPE_MS = 800;
|
|
3131
|
+
var buildPreviewUrl = (slug) => `${STAGING_BASE_URL}${slug.startsWith("/") ? slug : `/${slug}`}`;
|
|
3132
|
+
var getSlugFromEditState = (editState) => editState.draft?.slug ?? editState.published?.slug;
|
|
3133
|
+
var usePreviewMenuItem = () => ({
|
|
3134
|
+
icon: EyeOpenIcon,
|
|
3135
|
+
showAsAction: true,
|
|
3136
|
+
title: "Preview on Staging"
|
|
3137
|
+
});
|
|
3138
|
+
var PreviewInspector = ({
|
|
3139
|
+
documentId,
|
|
3140
|
+
documentType,
|
|
3141
|
+
onClose
|
|
3142
|
+
}) => {
|
|
3143
|
+
const publishedId = documentId.replace(/^drafts\./, "");
|
|
3144
|
+
const editState = useEditState(publishedId, documentType);
|
|
3145
|
+
const slug = getSlugFromEditState(editState);
|
|
3146
|
+
const onCloseRef = useRef(onClose);
|
|
3147
|
+
onCloseRef.current = onClose;
|
|
3148
|
+
useEffect2(() => {
|
|
3149
|
+
if (!editState.ready) return;
|
|
3150
|
+
const previewUrl = slug ? buildPreviewUrl(slug) : null;
|
|
3151
|
+
if (previewUrl) {
|
|
3152
|
+
const dedupeKey = `${documentId}::${previewUrl}`;
|
|
3153
|
+
const now = Date.now();
|
|
3154
|
+
const last = lastOpenByKey.get(dedupeKey) ?? 0;
|
|
3155
|
+
if (now - last >= OPEN_DEDUPE_MS) {
|
|
3156
|
+
lastOpenByKey.set(dedupeKey, now);
|
|
3157
|
+
window.open(previewUrl, "_blank", "noopener,noreferrer");
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
queueMicrotask(() => onCloseRef.current());
|
|
3161
|
+
}, [editState.ready, slug, documentId]);
|
|
3162
|
+
return null;
|
|
3163
|
+
};
|
|
3164
|
+
var previewInspector_default = PreviewInspector;
|
|
3165
|
+
|
|
3166
|
+
// src/client/sanity/config.ts
|
|
3167
|
+
var projectId = "l12d16xw";
|
|
3168
|
+
var dataset = "main";
|
|
3169
|
+
var schema = { types: schemaTypes_default };
|
|
3170
|
+
var schemaTypeNames = schema.types.map((i) => i.name).filter(Boolean);
|
|
3171
|
+
var config = defineConfig({
|
|
3172
|
+
name: "website",
|
|
3173
|
+
basePath: "/sanity",
|
|
3174
|
+
projectId,
|
|
3175
|
+
dataset,
|
|
3176
|
+
schema,
|
|
3177
|
+
document: {
|
|
3178
|
+
newDocumentOptions: (prev) => prev.filter(
|
|
3179
|
+
(templateItem) => !schemaTypeNames.includes(templateItem.templateId)
|
|
3180
|
+
),
|
|
3181
|
+
inspectors: (prev, context) => {
|
|
3182
|
+
const typesWithSlug = schema.types.filter(
|
|
3183
|
+
(t) => "fields" in t && t.fields?.some((f) => f.name === "slug")
|
|
3184
|
+
).map((t) => t.name);
|
|
3185
|
+
if (!typesWithSlug.includes(context.documentType)) return prev;
|
|
3186
|
+
return [
|
|
3187
|
+
...prev,
|
|
3188
|
+
{
|
|
3189
|
+
name: "preview-staging",
|
|
3190
|
+
component: previewInspector_default,
|
|
3191
|
+
useMenuItem: usePreviewMenuItem
|
|
3192
|
+
}
|
|
3193
|
+
];
|
|
3194
|
+
}
|
|
3195
|
+
},
|
|
3196
|
+
plugins: [
|
|
3197
|
+
structureTool({
|
|
3198
|
+
structure,
|
|
3199
|
+
defaultDocumentNode: (S) => S.document().views([S.view.form(), referencesView(S)])
|
|
3200
|
+
}),
|
|
3201
|
+
media(),
|
|
3202
|
+
markdownSchema(),
|
|
3203
|
+
references(),
|
|
3204
|
+
documentCountsPlugin(),
|
|
3205
|
+
documentInternationalization({
|
|
3206
|
+
supportedLanguages: [
|
|
3207
|
+
{ id: "en", title: "English [en]" },
|
|
3208
|
+
{ id: "de", title: "German [de]" },
|
|
3209
|
+
{ id: "es", title: "Spanish [es]" },
|
|
3210
|
+
{ id: "fr", title: "French [fr]" },
|
|
3211
|
+
{ id: "it", title: "Italian [it]" },
|
|
3212
|
+
{ id: "pt-br", title: "Portuguese (Brazil) [pt-br]" },
|
|
3213
|
+
{ id: "ru", title: "Russian [ru]" },
|
|
3214
|
+
{ id: "ja", title: "Japanese [ja]" },
|
|
3215
|
+
{ id: "ko", title: "Korean [ko]" },
|
|
3216
|
+
{ id: "zh-hans", title: "Chinese (Simplified) [zh-hans]" },
|
|
3217
|
+
{ id: "zh-hant", title: "Chinese (Traditional) [zh-hant]" }
|
|
3218
|
+
],
|
|
3219
|
+
schemaTypes: schemaTypeNames,
|
|
3220
|
+
languageField: "locale"
|
|
3221
|
+
})
|
|
3222
|
+
]
|
|
3223
|
+
});
|
|
3224
|
+
var config_default = config;
|
|
3225
|
+
|
|
3226
|
+
// src/client/sanity/studio.tsx
|
|
3227
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
3228
|
+
var StudioPage = ({ config: overrides } = {}) => {
|
|
3229
|
+
const [Studio, setStudio] = useState2(null);
|
|
3230
|
+
useEffect3(() => {
|
|
3231
|
+
import("sanity").then((mod) => setStudio(() => mod.Studio));
|
|
3232
|
+
}, []);
|
|
3233
|
+
const config2 = overrides ? { ...config_default, ...overrides } : config_default;
|
|
3234
|
+
if (!Studio) {
|
|
3235
|
+
return /* @__PURE__ */ jsx2("div", { style: { height: "100vh", background: "#101112" } });
|
|
3236
|
+
}
|
|
3237
|
+
return /* @__PURE__ */ jsx2(
|
|
3238
|
+
"div",
|
|
3239
|
+
{
|
|
3240
|
+
style: {
|
|
3241
|
+
height: "100vh",
|
|
3242
|
+
maxHeight: "100dvh",
|
|
3243
|
+
overscrollBehavior: "none",
|
|
3244
|
+
WebkitFontSmoothing: "antialiased",
|
|
3245
|
+
overflow: "hidden"
|
|
3246
|
+
},
|
|
3247
|
+
children: /* @__PURE__ */ jsx2(Studio, { config: config2 })
|
|
3248
|
+
}
|
|
3249
|
+
);
|
|
3250
|
+
};
|
|
3251
|
+
var studio_default = StudioPage;
|
|
3252
|
+
export {
|
|
3253
|
+
studio_default as StudioPage,
|
|
3254
|
+
config_default as sanityConfig
|
|
3255
|
+
};
|
|
3256
|
+
//# sourceMappingURL=sanity-studio.js.map
|