@prismicio/types-internal 2.7.0-alpha.2 → 2.7.0-alpha.3
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/lib/content/Document.d.ts +13 -409
- package/lib/content/fields/WidgetContent.d.ts +12 -408
- package/lib/content/fields/nestable/LinkContent.d.ts +8 -54
- package/lib/content/fields/nestable/LinkContent.js +1 -10
- package/lib/content/fields/nestable/NestableContent.d.ts +2 -68
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +6 -129
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +0 -60
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +4 -136
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -32
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +4 -136
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +2 -68
- package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +2 -68
- package/lib/content/fields/slices/Slice/index.d.ts +10 -250
- package/lib/content/fields/slices/SliceItem.d.ts +10 -250
- package/lib/content/fields/slices/SlicesContent.d.ts +10 -340
- package/lib/customtypes/CustomType.d.ts +484 -344
- package/lib/customtypes/Section.d.ts +484 -344
- package/lib/customtypes/diff/SharedSlice.d.ts +232 -152
- package/lib/customtypes/diff/Variation.d.ts +232 -152
- package/lib/customtypes/widgets/Group.d.ts +315 -72
- package/lib/customtypes/widgets/Group.js +43 -5
- package/lib/customtypes/widgets/Widget.d.ts +520 -330
- package/lib/customtypes/widgets/nestable/Link.d.ts +0 -20
- package/lib/customtypes/widgets/nestable/Link.js +0 -2
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +0 -10
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +0 -20
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +42 -22
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +168 -88
- package/lib/customtypes/widgets/slices/SlicePrimaryWidget.d.ts +191 -91
- package/lib/customtypes/widgets/slices/Slices.d.ts +523 -443
- package/package.json +1 -1
- package/src/content/fields/nestable/LinkContent.ts +1 -12
- package/src/customtypes/widgets/Group.ts +52 -6
- package/src/customtypes/widgets/nestable/Link.ts +0 -2
- package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +0 -727
- package/lib/content/fields/nestable/RichTextContent/TextBlock.js +0 -80
- package/lib/customtypes/widgets/slices/SliceWidget.d.ts +0 -327
- package/lib/customtypes/widgets/slices/SliceWidget.js +0 -8
|
@@ -1,6 +1,83 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
export declare const GroupFieldType = "Group";
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const AdvancedGroupConfig: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
4
|
+
as: t.LiteralC<"Link">;
|
|
5
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
6
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
7
|
+
type: t.LiteralC<"Link">;
|
|
8
|
+
}>, t.PartialC<{
|
|
9
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
10
|
+
config: t.ExactC<t.PartialC<{
|
|
11
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
12
|
+
useAsTitle: t.BooleanC;
|
|
13
|
+
placeholder: t.StringC;
|
|
14
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
15
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
16
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
17
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
18
|
+
allowTargetBlank: t.BooleanC;
|
|
19
|
+
}>>;
|
|
20
|
+
}>]>>;
|
|
21
|
+
}>>, t.ExactC<t.PartialC<{
|
|
22
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
23
|
+
type: t.LiteralC<"Text">;
|
|
24
|
+
}>, t.PartialC<{
|
|
25
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
26
|
+
config: t.ExactC<t.PartialC<{
|
|
27
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
28
|
+
useAsTitle: t.BooleanC;
|
|
29
|
+
placeholder: t.StringC;
|
|
30
|
+
}>>;
|
|
31
|
+
}>]>>;
|
|
32
|
+
}>>]>;
|
|
33
|
+
}>>, t.ExactC<t.PartialC<{
|
|
34
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
35
|
+
repeat: t.BooleanC;
|
|
36
|
+
}>>]>;
|
|
37
|
+
export declare type AdvancedGroupConfig = t.TypeOf<typeof AdvancedGroupConfig>;
|
|
38
|
+
export declare const AdvancedLink: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
39
|
+
type: t.LiteralC<"Group">;
|
|
40
|
+
}>, t.PartialC<{
|
|
41
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
42
|
+
icon: t.StringC;
|
|
43
|
+
description: t.StringC;
|
|
44
|
+
config: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
45
|
+
as: t.LiteralC<"Link">;
|
|
46
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
47
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
48
|
+
type: t.LiteralC<"Link">;
|
|
49
|
+
}>, t.PartialC<{
|
|
50
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
51
|
+
config: t.ExactC<t.PartialC<{
|
|
52
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
53
|
+
useAsTitle: t.BooleanC;
|
|
54
|
+
placeholder: t.StringC;
|
|
55
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
56
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
57
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
58
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
59
|
+
allowTargetBlank: t.BooleanC;
|
|
60
|
+
}>>;
|
|
61
|
+
}>]>>;
|
|
62
|
+
}>>, t.ExactC<t.PartialC<{
|
|
63
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
64
|
+
type: t.LiteralC<"Text">;
|
|
65
|
+
}>, t.PartialC<{
|
|
66
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
67
|
+
config: t.ExactC<t.PartialC<{
|
|
68
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
69
|
+
useAsTitle: t.BooleanC;
|
|
70
|
+
placeholder: t.StringC;
|
|
71
|
+
}>>;
|
|
72
|
+
}>]>>;
|
|
73
|
+
}>>]>;
|
|
74
|
+
}>>, t.ExactC<t.PartialC<{
|
|
75
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
76
|
+
repeat: t.BooleanC;
|
|
77
|
+
}>>]>;
|
|
78
|
+
}>]>>;
|
|
79
|
+
export declare type AdvancedLink = t.TypeOf<typeof AdvancedLink>;
|
|
80
|
+
export declare const NestedGroupConfig: t.UnionC<[t.ExactC<t.PartialC<{
|
|
4
81
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
5
82
|
repeat: t.BooleanC;
|
|
6
83
|
fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -131,16 +208,6 @@ export declare const NestedGroupConfig: t.ExactC<t.PartialC<{
|
|
|
131
208
|
masks: t.Type<readonly string[], object, unknown>;
|
|
132
209
|
tags: t.Type<readonly string[], object, unknown>;
|
|
133
210
|
allowTargetBlank: t.BooleanC;
|
|
134
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
135
|
-
type: t.LiteralC<"Text">;
|
|
136
|
-
}>, t.PartialC<{
|
|
137
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
138
|
-
config: t.ExactC<t.PartialC<{
|
|
139
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
140
|
-
useAsTitle: t.BooleanC;
|
|
141
|
-
placeholder: t.StringC;
|
|
142
|
-
}>>;
|
|
143
|
-
}>]>>;
|
|
144
211
|
}>>;
|
|
145
212
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
146
213
|
type: t.LiteralC<"Image">;
|
|
@@ -170,9 +237,82 @@ export declare const NestedGroupConfig: t.ExactC<t.PartialC<{
|
|
|
170
237
|
catalog: t.StringC;
|
|
171
238
|
}>>;
|
|
172
239
|
}>]>>]>>;
|
|
173
|
-
}
|
|
240
|
+
}>>, t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
241
|
+
as: t.LiteralC<"Link">;
|
|
242
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
243
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
244
|
+
type: t.LiteralC<"Link">;
|
|
245
|
+
}>, t.PartialC<{
|
|
246
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
247
|
+
config: t.ExactC<t.PartialC<{
|
|
248
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
249
|
+
useAsTitle: t.BooleanC;
|
|
250
|
+
placeholder: t.StringC;
|
|
251
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
252
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
253
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
254
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
255
|
+
allowTargetBlank: t.BooleanC;
|
|
256
|
+
}>>;
|
|
257
|
+
}>]>>;
|
|
258
|
+
}>>, t.ExactC<t.PartialC<{
|
|
259
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
260
|
+
type: t.LiteralC<"Text">;
|
|
261
|
+
}>, t.PartialC<{
|
|
262
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
263
|
+
config: t.ExactC<t.PartialC<{
|
|
264
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
265
|
+
useAsTitle: t.BooleanC;
|
|
266
|
+
placeholder: t.StringC;
|
|
267
|
+
}>>;
|
|
268
|
+
}>]>>;
|
|
269
|
+
}>>]>;
|
|
270
|
+
}>>, t.ExactC<t.PartialC<{
|
|
271
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
272
|
+
repeat: t.BooleanC;
|
|
273
|
+
}>>]>]>;
|
|
174
274
|
export declare type NestedGroupConfig = t.TypeOf<typeof NestedGroupConfig>;
|
|
175
|
-
export declare const NestedGroup: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
275
|
+
export declare const NestedGroup: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
276
|
+
type: t.LiteralC<"Group">;
|
|
277
|
+
}>, t.PartialC<{
|
|
278
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
279
|
+
icon: t.StringC;
|
|
280
|
+
description: t.StringC;
|
|
281
|
+
config: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
282
|
+
as: t.LiteralC<"Link">;
|
|
283
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
284
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
285
|
+
type: t.LiteralC<"Link">;
|
|
286
|
+
}>, t.PartialC<{
|
|
287
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
288
|
+
config: t.ExactC<t.PartialC<{
|
|
289
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
290
|
+
useAsTitle: t.BooleanC;
|
|
291
|
+
placeholder: t.StringC;
|
|
292
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
293
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
294
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
295
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
296
|
+
allowTargetBlank: t.BooleanC;
|
|
297
|
+
}>>;
|
|
298
|
+
}>]>>;
|
|
299
|
+
}>>, t.ExactC<t.PartialC<{
|
|
300
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
301
|
+
type: t.LiteralC<"Text">;
|
|
302
|
+
}>, t.PartialC<{
|
|
303
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
304
|
+
config: t.ExactC<t.PartialC<{
|
|
305
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
306
|
+
useAsTitle: t.BooleanC;
|
|
307
|
+
placeholder: t.StringC;
|
|
308
|
+
}>>;
|
|
309
|
+
}>]>>;
|
|
310
|
+
}>>]>;
|
|
311
|
+
}>>, t.ExactC<t.PartialC<{
|
|
312
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
313
|
+
repeat: t.BooleanC;
|
|
314
|
+
}>>]>;
|
|
315
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
176
316
|
type: t.LiteralC<"Group">;
|
|
177
317
|
}>, t.PartialC<{
|
|
178
318
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -309,16 +449,6 @@ export declare const NestedGroup: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
309
449
|
masks: t.Type<readonly string[], object, unknown>;
|
|
310
450
|
tags: t.Type<readonly string[], object, unknown>;
|
|
311
451
|
allowTargetBlank: t.BooleanC;
|
|
312
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
313
|
-
type: t.LiteralC<"Text">;
|
|
314
|
-
}>, t.PartialC<{
|
|
315
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
316
|
-
config: t.ExactC<t.PartialC<{
|
|
317
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
318
|
-
useAsTitle: t.BooleanC;
|
|
319
|
-
placeholder: t.StringC;
|
|
320
|
-
}>>;
|
|
321
|
-
}>]>>;
|
|
322
452
|
}>>;
|
|
323
453
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
324
454
|
type: t.LiteralC<"Image">;
|
|
@@ -349,9 +479,42 @@ export declare const NestedGroup: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
349
479
|
}>>;
|
|
350
480
|
}>]>>]>>;
|
|
351
481
|
}>>;
|
|
352
|
-
}>]
|
|
482
|
+
}>]>>]>;
|
|
353
483
|
export declare type NestedGroup = t.TypeOf<typeof NestedGroup>;
|
|
354
|
-
export declare const GroupConfig: t.ExactC<t.
|
|
484
|
+
export declare const GroupConfig: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
485
|
+
as: t.LiteralC<"Link">;
|
|
486
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
487
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
488
|
+
type: t.LiteralC<"Link">;
|
|
489
|
+
}>, t.PartialC<{
|
|
490
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
491
|
+
config: t.ExactC<t.PartialC<{
|
|
492
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
493
|
+
useAsTitle: t.BooleanC;
|
|
494
|
+
placeholder: t.StringC;
|
|
495
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
496
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
497
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
498
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
499
|
+
allowTargetBlank: t.BooleanC;
|
|
500
|
+
}>>;
|
|
501
|
+
}>]>>;
|
|
502
|
+
}>>, t.ExactC<t.PartialC<{
|
|
503
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
504
|
+
type: t.LiteralC<"Text">;
|
|
505
|
+
}>, t.PartialC<{
|
|
506
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
507
|
+
config: t.ExactC<t.PartialC<{
|
|
508
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
509
|
+
useAsTitle: t.BooleanC;
|
|
510
|
+
placeholder: t.StringC;
|
|
511
|
+
}>>;
|
|
512
|
+
}>]>>;
|
|
513
|
+
}>>]>;
|
|
514
|
+
}>>, t.ExactC<t.PartialC<{
|
|
515
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
516
|
+
repeat: t.BooleanC;
|
|
517
|
+
}>>]>, t.ExactC<t.PartialC<{
|
|
355
518
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
356
519
|
repeat: t.BooleanC;
|
|
357
520
|
fields: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -482,16 +645,6 @@ export declare const GroupConfig: t.ExactC<t.PartialC<{
|
|
|
482
645
|
masks: t.Type<readonly string[], object, unknown>;
|
|
483
646
|
tags: t.Type<readonly string[], object, unknown>;
|
|
484
647
|
allowTargetBlank: t.BooleanC;
|
|
485
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
486
|
-
type: t.LiteralC<"Text">;
|
|
487
|
-
}>, t.PartialC<{
|
|
488
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
489
|
-
config: t.ExactC<t.PartialC<{
|
|
490
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
491
|
-
useAsTitle: t.BooleanC;
|
|
492
|
-
placeholder: t.StringC;
|
|
493
|
-
}>>;
|
|
494
|
-
}>]>>;
|
|
495
648
|
}>>;
|
|
496
649
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
497
650
|
type: t.LiteralC<"Image">;
|
|
@@ -520,7 +673,47 @@ export declare const GroupConfig: t.ExactC<t.PartialC<{
|
|
|
520
673
|
placeholder: t.StringC;
|
|
521
674
|
catalog: t.StringC;
|
|
522
675
|
}>>;
|
|
523
|
-
}>]>>]>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
676
|
+
}>]>>]>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
677
|
+
type: t.LiteralC<"Group">;
|
|
678
|
+
}>, t.PartialC<{
|
|
679
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
680
|
+
icon: t.StringC;
|
|
681
|
+
description: t.StringC;
|
|
682
|
+
config: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
683
|
+
as: t.LiteralC<"Link">;
|
|
684
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
685
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
686
|
+
type: t.LiteralC<"Link">;
|
|
687
|
+
}>, t.PartialC<{
|
|
688
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
689
|
+
config: t.ExactC<t.PartialC<{
|
|
690
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
691
|
+
useAsTitle: t.BooleanC;
|
|
692
|
+
placeholder: t.StringC;
|
|
693
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
694
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
695
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
696
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
697
|
+
allowTargetBlank: t.BooleanC;
|
|
698
|
+
}>>;
|
|
699
|
+
}>]>>;
|
|
700
|
+
}>>, t.ExactC<t.PartialC<{
|
|
701
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
702
|
+
type: t.LiteralC<"Text">;
|
|
703
|
+
}>, t.PartialC<{
|
|
704
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
705
|
+
config: t.ExactC<t.PartialC<{
|
|
706
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
707
|
+
useAsTitle: t.BooleanC;
|
|
708
|
+
placeholder: t.StringC;
|
|
709
|
+
}>>;
|
|
710
|
+
}>]>>;
|
|
711
|
+
}>>]>;
|
|
712
|
+
}>>, t.ExactC<t.PartialC<{
|
|
713
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
714
|
+
repeat: t.BooleanC;
|
|
715
|
+
}>>]>;
|
|
716
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
524
717
|
type: t.LiteralC<"Group">;
|
|
525
718
|
}>, t.PartialC<{
|
|
526
719
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -657,16 +850,6 @@ export declare const GroupConfig: t.ExactC<t.PartialC<{
|
|
|
657
850
|
masks: t.Type<readonly string[], object, unknown>;
|
|
658
851
|
tags: t.Type<readonly string[], object, unknown>;
|
|
659
852
|
allowTargetBlank: t.BooleanC;
|
|
660
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
661
|
-
type: t.LiteralC<"Text">;
|
|
662
|
-
}>, t.PartialC<{
|
|
663
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
664
|
-
config: t.ExactC<t.PartialC<{
|
|
665
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
666
|
-
useAsTitle: t.BooleanC;
|
|
667
|
-
placeholder: t.StringC;
|
|
668
|
-
}>>;
|
|
669
|
-
}>]>>;
|
|
670
853
|
}>>;
|
|
671
854
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
672
855
|
type: t.LiteralC<"Image">;
|
|
@@ -697,10 +880,50 @@ export declare const GroupConfig: t.ExactC<t.PartialC<{
|
|
|
697
880
|
}>>;
|
|
698
881
|
}>]>>]>>;
|
|
699
882
|
}>>;
|
|
700
|
-
}>]>>]>>;
|
|
701
|
-
}
|
|
883
|
+
}>]>>]>]>>;
|
|
884
|
+
}>>]>;
|
|
702
885
|
export declare type GroupConfig = t.TypeOf<typeof GroupConfig>;
|
|
703
|
-
export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
886
|
+
export declare const Group: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
887
|
+
type: t.LiteralC<"Group">;
|
|
888
|
+
}>, t.PartialC<{
|
|
889
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
890
|
+
icon: t.StringC;
|
|
891
|
+
description: t.StringC;
|
|
892
|
+
config: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
893
|
+
as: t.LiteralC<"Link">;
|
|
894
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
895
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
896
|
+
type: t.LiteralC<"Link">;
|
|
897
|
+
}>, t.PartialC<{
|
|
898
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
899
|
+
config: t.ExactC<t.PartialC<{
|
|
900
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
901
|
+
useAsTitle: t.BooleanC;
|
|
902
|
+
placeholder: t.StringC;
|
|
903
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
904
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
905
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
906
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
907
|
+
allowTargetBlank: t.BooleanC;
|
|
908
|
+
}>>;
|
|
909
|
+
}>]>>;
|
|
910
|
+
}>>, t.ExactC<t.PartialC<{
|
|
911
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
912
|
+
type: t.LiteralC<"Text">;
|
|
913
|
+
}>, t.PartialC<{
|
|
914
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
915
|
+
config: t.ExactC<t.PartialC<{
|
|
916
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
917
|
+
useAsTitle: t.BooleanC;
|
|
918
|
+
placeholder: t.StringC;
|
|
919
|
+
}>>;
|
|
920
|
+
}>]>>;
|
|
921
|
+
}>>]>;
|
|
922
|
+
}>>, t.ExactC<t.PartialC<{
|
|
923
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
924
|
+
repeat: t.BooleanC;
|
|
925
|
+
}>>]>;
|
|
926
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
704
927
|
type: t.LiteralC<"Group">;
|
|
705
928
|
}>, t.PartialC<{
|
|
706
929
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -837,16 +1060,6 @@ export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
837
1060
|
masks: t.Type<readonly string[], object, unknown>;
|
|
838
1061
|
tags: t.Type<readonly string[], object, unknown>;
|
|
839
1062
|
allowTargetBlank: t.BooleanC;
|
|
840
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
841
|
-
type: t.LiteralC<"Text">;
|
|
842
|
-
}>, t.PartialC<{
|
|
843
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
844
|
-
config: t.ExactC<t.PartialC<{
|
|
845
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
846
|
-
useAsTitle: t.BooleanC;
|
|
847
|
-
placeholder: t.StringC;
|
|
848
|
-
}>>;
|
|
849
|
-
}>]>>;
|
|
850
1063
|
}>>;
|
|
851
1064
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
852
1065
|
type: t.LiteralC<"Image">;
|
|
@@ -875,7 +1088,47 @@ export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
875
1088
|
placeholder: t.StringC;
|
|
876
1089
|
catalog: t.StringC;
|
|
877
1090
|
}>>;
|
|
878
|
-
}>]>>]>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1091
|
+
}>]>>]>, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1092
|
+
type: t.LiteralC<"Group">;
|
|
1093
|
+
}>, t.PartialC<{
|
|
1094
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1095
|
+
icon: t.StringC;
|
|
1096
|
+
description: t.StringC;
|
|
1097
|
+
config: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
1098
|
+
as: t.LiteralC<"Link">;
|
|
1099
|
+
fields: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
1100
|
+
link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1101
|
+
type: t.LiteralC<"Link">;
|
|
1102
|
+
}>, t.PartialC<{
|
|
1103
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1104
|
+
config: t.ExactC<t.PartialC<{
|
|
1105
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1106
|
+
useAsTitle: t.BooleanC;
|
|
1107
|
+
placeholder: t.StringC;
|
|
1108
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
1109
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
1110
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
1111
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
1112
|
+
allowTargetBlank: t.BooleanC;
|
|
1113
|
+
}>>;
|
|
1114
|
+
}>]>>;
|
|
1115
|
+
}>>, t.ExactC<t.PartialC<{
|
|
1116
|
+
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1117
|
+
type: t.LiteralC<"Text">;
|
|
1118
|
+
}>, t.PartialC<{
|
|
1119
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1120
|
+
config: t.ExactC<t.PartialC<{
|
|
1121
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1122
|
+
useAsTitle: t.BooleanC;
|
|
1123
|
+
placeholder: t.StringC;
|
|
1124
|
+
}>>;
|
|
1125
|
+
}>]>>;
|
|
1126
|
+
}>>]>;
|
|
1127
|
+
}>>, t.ExactC<t.PartialC<{
|
|
1128
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1129
|
+
repeat: t.BooleanC;
|
|
1130
|
+
}>>]>;
|
|
1131
|
+
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
879
1132
|
type: t.LiteralC<"Group">;
|
|
880
1133
|
}>, t.PartialC<{
|
|
881
1134
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -1012,16 +1265,6 @@ export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
1012
1265
|
masks: t.Type<readonly string[], object, unknown>;
|
|
1013
1266
|
tags: t.Type<readonly string[], object, unknown>;
|
|
1014
1267
|
allowTargetBlank: t.BooleanC;
|
|
1015
|
-
text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1016
|
-
type: t.LiteralC<"Text">;
|
|
1017
|
-
}>, t.PartialC<{
|
|
1018
|
-
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1019
|
-
config: t.ExactC<t.PartialC<{
|
|
1020
|
-
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1021
|
-
useAsTitle: t.BooleanC;
|
|
1022
|
-
placeholder: t.StringC;
|
|
1023
|
-
}>>;
|
|
1024
|
-
}>]>>;
|
|
1025
1268
|
}>>;
|
|
1026
1269
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
1027
1270
|
type: t.LiteralC<"Image">;
|
|
@@ -1052,7 +1295,7 @@ export declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
1052
1295
|
}>>;
|
|
1053
1296
|
}>]>>]>>;
|
|
1054
1297
|
}>>;
|
|
1055
|
-
}>]>>]>>;
|
|
1298
|
+
}>]>>]>]>>;
|
|
1056
1299
|
}>>;
|
|
1057
|
-
}>]
|
|
1300
|
+
}>]>>]>;
|
|
1058
1301
|
export declare type Group = t.TypeOf<typeof Group>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Group = exports.GroupConfig = exports.NestedGroup = exports.NestedGroupConfig = exports.GroupFieldType = void 0;
|
|
3
|
+
exports.Group = exports.GroupConfig = exports.NestedGroup = exports.NestedGroupConfig = exports.AdvancedLink = exports.AdvancedGroupConfig = exports.GroupFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const validators_1 = require("../../validators");
|
|
8
|
+
const nestable_1 = require("./nestable");
|
|
8
9
|
const NestableWidget_1 = require("./nestable/NestableWidget");
|
|
9
10
|
exports.GroupFieldType = "Group";
|
|
10
11
|
// We're obliged to use `t.Mixed` here, otherwise the factory would be
|
|
@@ -27,7 +28,44 @@ const createGroup = (widgets) => t.exact(t.intersection([
|
|
|
27
28
|
config: createGroupConfig(widgets),
|
|
28
29
|
}),
|
|
29
30
|
]));
|
|
30
|
-
exports.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
exports.AdvancedGroupConfig = t.intersection([
|
|
32
|
+
t.strict({
|
|
33
|
+
as: t.literal("Link"),
|
|
34
|
+
fields: t.intersection([
|
|
35
|
+
t.strict({
|
|
36
|
+
link: nestable_1.Link,
|
|
37
|
+
}),
|
|
38
|
+
t.exact(t.partial({
|
|
39
|
+
text: nestable_1.Text,
|
|
40
|
+
})),
|
|
41
|
+
]),
|
|
42
|
+
}),
|
|
43
|
+
t.exact(t.partial({
|
|
44
|
+
label: validators_1.StringOrNull,
|
|
45
|
+
repeat: t.boolean,
|
|
46
|
+
})),
|
|
47
|
+
]);
|
|
48
|
+
exports.AdvancedLink = t.exact(t.intersection([
|
|
49
|
+
t.type({
|
|
50
|
+
type: t.literal(exports.GroupFieldType),
|
|
51
|
+
}),
|
|
52
|
+
t.partial({
|
|
53
|
+
fieldset: validators_1.StringOrNull,
|
|
54
|
+
icon: t.string,
|
|
55
|
+
description: t.string,
|
|
56
|
+
config: exports.AdvancedGroupConfig,
|
|
57
|
+
}),
|
|
58
|
+
]));
|
|
59
|
+
exports.NestedGroupConfig = t.union([
|
|
60
|
+
createGroupConfig(NestableWidget_1.NestableWidget),
|
|
61
|
+
exports.AdvancedGroupConfig,
|
|
62
|
+
]);
|
|
63
|
+
exports.NestedGroup = t.union([exports.AdvancedLink, createGroup(NestableWidget_1.NestableWidget)]);
|
|
64
|
+
exports.GroupConfig = t.union([
|
|
65
|
+
exports.AdvancedGroupConfig,
|
|
66
|
+
createGroupConfig(t.union([NestableWidget_1.NestableWidget, exports.NestedGroup])),
|
|
67
|
+
]);
|
|
68
|
+
exports.Group = t.union([
|
|
69
|
+
exports.AdvancedLink,
|
|
70
|
+
createGroup(t.union([NestableWidget_1.NestableWidget, exports.NestedGroup])),
|
|
71
|
+
]);
|