@prismicio/types-internal 3.14.0 → 3.15.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +868 -0
- package/lib/content/Document.d.ts +18 -24
- package/lib/content/fields/GroupContent.d.ts +1 -1
- package/lib/content/fields/GroupContent.js +9 -18
- package/lib/content/fields/WidgetContent.d.ts +18 -24
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +9 -12
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +3 -4
- package/lib/content/fields/slices/Slice/RepeatableContent.js +5 -9
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +9 -12
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/index.d.ts +12 -16
- package/lib/content/fields/slices/SliceItem.d.ts +12 -16
- package/lib/content/fields/slices/SlicesContent.d.ts +18 -24
- package/lib/customtypes/widgets/nestable/NestableWidgetZ.d.ts +3 -0
- package/lib/customtypes/widgets/nestable/NestableWidgetZ.js +29 -0
- package/lib/customtypes/widgets/slices/SharedSliceZ.d.ts +16 -0
- package/lib/customtypes/widgets/slices/SharedSliceZ.js +39 -0
- package/lib/customtypes/widgets/slices/SlicePrimaryWidgetZ.d.ts +3 -0
- package/lib/customtypes/widgets/slices/SlicePrimaryWidgetZ.js +6 -0
- package/package.json +1 -1
- package/src/content/fields/GroupContent.ts +12 -23
- package/src/content/fields/slices/Slice/CompositeSliceContent.ts +1 -1
- package/src/content/fields/slices/Slice/RepeatableContent.ts +5 -11
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +1 -1
- package/lib/content/fields/RepeatableContent.d.ts +0 -162
- package/lib/content/fields/RepeatableContent.js +0 -93
- 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
|
@@ -1542,8 +1542,9 @@ export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.Unio
|
|
|
1542
1542
|
}>]>>]>]>;
|
|
1543
1543
|
}>>]>>;
|
|
1544
1544
|
}>>]>>;
|
|
1545
|
-
repeat: t.ArrayC<t.ExactC<t.
|
|
1545
|
+
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
1546
1546
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
1547
|
+
key: t.StringC;
|
|
1547
1548
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
1548
1549
|
type: t.StringC;
|
|
1549
1550
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -2308,9 +2309,7 @@ export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.Unio
|
|
|
2308
2309
|
}>]>>]>]>;
|
|
2309
2310
|
}>>]>>;
|
|
2310
2311
|
}>>]>, t.Type<import("./fields").GroupContent, import("./fields").GroupContent, unknown>]>]>>;
|
|
2311
|
-
}
|
|
2312
|
-
key: t.StringC;
|
|
2313
|
-
}>]>>>;
|
|
2312
|
+
}>>>;
|
|
2314
2313
|
}>>, t.ExactC<t.TypeC<{
|
|
2315
2314
|
__TYPE__: t.LiteralC<"SharedSliceContent">;
|
|
2316
2315
|
variation: t.StringC;
|
|
@@ -3078,8 +3077,9 @@ export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.Unio
|
|
|
3078
3077
|
}>]>>]>]>;
|
|
3079
3078
|
}>>]>>;
|
|
3080
3079
|
}>>]>, t.Type<import("./fields").GroupContent, import("./fields").GroupContent, unknown>]>>;
|
|
3081
|
-
items: t.ArrayC<t.ExactC<t.
|
|
3080
|
+
items: t.ArrayC<t.ExactC<t.TypeC<{
|
|
3082
3081
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
3082
|
+
key: t.StringC;
|
|
3083
3083
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3084
3084
|
type: t.StringC;
|
|
3085
3085
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -3844,9 +3844,7 @@ export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.Unio
|
|
|
3844
3844
|
}>]>>]>]>;
|
|
3845
3845
|
}>>]>>;
|
|
3846
3846
|
}>>]>, t.Type<import("./fields").GroupContent, import("./fields").GroupContent, unknown>]>]>>;
|
|
3847
|
-
}
|
|
3848
|
-
key: t.StringC;
|
|
3849
|
-
}>]>>>;
|
|
3847
|
+
}>>>;
|
|
3850
3848
|
}>>, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3851
3849
|
type: t.StringC;
|
|
3852
3850
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -6413,8 +6411,9 @@ export declare const DocumentLegacy: {
|
|
|
6413
6411
|
})[];
|
|
6414
6412
|
};
|
|
6415
6413
|
};
|
|
6416
|
-
repeat:
|
|
6414
|
+
repeat: {
|
|
6417
6415
|
__TYPE__: "GroupItemContent";
|
|
6416
|
+
key: string;
|
|
6418
6417
|
value: [string, {
|
|
6419
6418
|
type: string;
|
|
6420
6419
|
__TYPE__: "EmptyContent";
|
|
@@ -7005,9 +7004,7 @@ export declare const DocumentLegacy: {
|
|
|
7005
7004
|
})[];
|
|
7006
7005
|
})[];
|
|
7007
7006
|
}][];
|
|
7008
|
-
}
|
|
7009
|
-
key?: string;
|
|
7010
|
-
})[];
|
|
7007
|
+
}[];
|
|
7011
7008
|
} | {
|
|
7012
7009
|
__TYPE__: "SharedSliceContent";
|
|
7013
7010
|
variation: string;
|
|
@@ -7603,8 +7600,9 @@ export declare const DocumentLegacy: {
|
|
|
7603
7600
|
})[];
|
|
7604
7601
|
};
|
|
7605
7602
|
};
|
|
7606
|
-
items:
|
|
7603
|
+
items: {
|
|
7607
7604
|
__TYPE__: "GroupItemContent";
|
|
7605
|
+
key: string;
|
|
7608
7606
|
value: [string, {
|
|
7609
7607
|
type: string;
|
|
7610
7608
|
__TYPE__: "EmptyContent";
|
|
@@ -8195,9 +8193,7 @@ export declare const DocumentLegacy: {
|
|
|
8195
8193
|
})[];
|
|
8196
8194
|
})[];
|
|
8197
8195
|
}][];
|
|
8198
|
-
}
|
|
8199
|
-
key?: string;
|
|
8200
|
-
})[];
|
|
8196
|
+
}[];
|
|
8201
8197
|
};
|
|
8202
8198
|
}[];
|
|
8203
8199
|
};
|
|
@@ -10017,8 +10013,9 @@ export declare function migrateDocument(document: Document, customType: StaticCu
|
|
|
10017
10013
|
})[];
|
|
10018
10014
|
};
|
|
10019
10015
|
};
|
|
10020
|
-
repeat:
|
|
10016
|
+
repeat: {
|
|
10021
10017
|
__TYPE__: "GroupItemContent";
|
|
10018
|
+
key: string;
|
|
10022
10019
|
value: [string, {
|
|
10023
10020
|
type: string;
|
|
10024
10021
|
__TYPE__: "EmptyContent";
|
|
@@ -10609,9 +10606,7 @@ export declare function migrateDocument(document: Document, customType: StaticCu
|
|
|
10609
10606
|
})[];
|
|
10610
10607
|
})[];
|
|
10611
10608
|
}][];
|
|
10612
|
-
}
|
|
10613
|
-
key?: string;
|
|
10614
|
-
})[];
|
|
10609
|
+
}[];
|
|
10615
10610
|
} | {
|
|
10616
10611
|
__TYPE__: "SharedSliceContent";
|
|
10617
10612
|
variation: string;
|
|
@@ -11207,8 +11202,9 @@ export declare function migrateDocument(document: Document, customType: StaticCu
|
|
|
11207
11202
|
})[];
|
|
11208
11203
|
};
|
|
11209
11204
|
};
|
|
11210
|
-
items:
|
|
11205
|
+
items: {
|
|
11211
11206
|
__TYPE__: "GroupItemContent";
|
|
11207
|
+
key: string;
|
|
11212
11208
|
value: [string, {
|
|
11213
11209
|
type: string;
|
|
11214
11210
|
__TYPE__: "EmptyContent";
|
|
@@ -11799,9 +11795,7 @@ export declare function migrateDocument(document: Document, customType: StaticCu
|
|
|
11799
11795
|
})[];
|
|
11800
11796
|
})[];
|
|
11801
11797
|
}][];
|
|
11802
|
-
}
|
|
11803
|
-
key?: string;
|
|
11804
|
-
})[];
|
|
11798
|
+
}[];
|
|
11805
11799
|
};
|
|
11806
11800
|
}[];
|
|
11807
11801
|
};
|
|
@@ -8,7 +8,7 @@ export declare const GroupContentType: "GroupContentType";
|
|
|
8
8
|
export declare const GroupItemContent: t.Type<GroupItemContent>;
|
|
9
9
|
export declare type GroupItemContent = {
|
|
10
10
|
__TYPE__: typeof GroupItemContentType;
|
|
11
|
-
key
|
|
11
|
+
key: string;
|
|
12
12
|
value: [string, NestableContent | GroupContent][];
|
|
13
13
|
};
|
|
14
14
|
export declare const GroupContent: t.Type<GroupContent>;
|
|
@@ -13,15 +13,11 @@ const nestable_1 = require("./nestable");
|
|
|
13
13
|
const withDefaultValues_1 = require("./withDefaultValues");
|
|
14
14
|
exports.GroupItemContentType = "GroupItemContent";
|
|
15
15
|
exports.GroupContentType = "GroupContentType";
|
|
16
|
-
exports.GroupItemContent = t.recursion("GroupItemContent", () => t.
|
|
17
|
-
t.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
t.partial({
|
|
22
|
-
key: t.string,
|
|
23
|
-
}),
|
|
24
|
-
])));
|
|
16
|
+
exports.GroupItemContent = t.recursion("GroupItemContent", () => t.strict({
|
|
17
|
+
__TYPE__: t.literal(exports.GroupItemContentType),
|
|
18
|
+
key: t.string,
|
|
19
|
+
value: t.array(t.tuple([t.string, t.union([nestable_1.NestableContent, exports.GroupContent])])),
|
|
20
|
+
}));
|
|
25
21
|
exports.GroupContent = t.recursion("GroupContent", () => t.strict({
|
|
26
22
|
__TYPE__: t.literal(exports.GroupContentType),
|
|
27
23
|
value: t.array(exports.GroupItemContent),
|
|
@@ -73,11 +69,7 @@ const GroupItemLegacy = (ctx, index) => {
|
|
|
73
69
|
types: { ...acc.types, ...encoded.types },
|
|
74
70
|
keys: { ...acc.keys, ...encoded.keys },
|
|
75
71
|
};
|
|
76
|
-
}, {
|
|
77
|
-
content: {},
|
|
78
|
-
types: {},
|
|
79
|
-
keys: item.key ? { [groupItemCtx.keyOfKey]: item.key } : {},
|
|
80
|
-
});
|
|
72
|
+
}, { content: {}, types: {}, keys: { [groupItemCtx.keyOfKey]: item.key } });
|
|
81
73
|
});
|
|
82
74
|
};
|
|
83
75
|
exports.GroupItemLegacy = GroupItemLegacy;
|
|
@@ -155,10 +147,9 @@ function traverseGroupContent({ path, key, apiId, model, content, }) {
|
|
|
155
147
|
exports.traverseGroupContent = traverseGroupContent;
|
|
156
148
|
function traverseGroupItemsContent({ path, model, content, }) {
|
|
157
149
|
return (transform) => {
|
|
158
|
-
return content.map((groupItem
|
|
159
|
-
var _a;
|
|
150
|
+
return content.map((groupItem) => {
|
|
160
151
|
const groupItemPath = path.concat([
|
|
161
|
-
{ key:
|
|
152
|
+
{ key: groupItem.key, type: "GroupItem" },
|
|
162
153
|
]);
|
|
163
154
|
const groupItemFields = groupItem.value.reduce((acc, [fieldKey, fieldContent]) => {
|
|
164
155
|
const fieldDef = model === null || model === void 0 ? void 0 : model[fieldKey];
|
|
@@ -208,8 +199,8 @@ function traverseGroupItemsContent({ path, model, content, }) {
|
|
|
208
199
|
}, []);
|
|
209
200
|
return {
|
|
210
201
|
__TYPE__: groupItem.__TYPE__,
|
|
202
|
+
key: groupItem.key,
|
|
211
203
|
value: groupItemFields,
|
|
212
|
-
...(groupItem.key && { key: groupItem.key }),
|
|
213
204
|
};
|
|
214
205
|
});
|
|
215
206
|
};
|
|
@@ -1539,8 +1539,9 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
|
|
|
1539
1539
|
}>]>>]>]>;
|
|
1540
1540
|
}>>]>>;
|
|
1541
1541
|
}>>]>>;
|
|
1542
|
-
repeat: t.ArrayC<t.ExactC<t.
|
|
1542
|
+
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
1543
1543
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
1544
|
+
key: t.StringC;
|
|
1544
1545
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
1545
1546
|
type: t.StringC;
|
|
1546
1547
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -2305,9 +2306,7 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
|
|
|
2305
2306
|
}>]>>]>]>;
|
|
2306
2307
|
}>>]>>;
|
|
2307
2308
|
}>>]>, t.Type<GroupContent, GroupContent, unknown>]>]>>;
|
|
2308
|
-
}
|
|
2309
|
-
key: t.StringC;
|
|
2310
|
-
}>]>>>;
|
|
2309
|
+
}>>>;
|
|
2311
2310
|
}>>, t.ExactC<t.TypeC<{
|
|
2312
2311
|
__TYPE__: t.LiteralC<"SharedSliceContent">;
|
|
2313
2312
|
variation: t.StringC;
|
|
@@ -3075,8 +3074,9 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
|
|
|
3075
3074
|
}>]>>]>]>;
|
|
3076
3075
|
}>>]>>;
|
|
3077
3076
|
}>>]>, t.Type<GroupContent, GroupContent, unknown>]>>;
|
|
3078
|
-
items: t.ArrayC<t.ExactC<t.
|
|
3077
|
+
items: t.ArrayC<t.ExactC<t.TypeC<{
|
|
3079
3078
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
3079
|
+
key: t.StringC;
|
|
3080
3080
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3081
3081
|
type: t.StringC;
|
|
3082
3082
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -3841,9 +3841,7 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
|
|
|
3841
3841
|
}>]>>]>]>;
|
|
3842
3842
|
}>>]>>;
|
|
3843
3843
|
}>>]>, t.Type<GroupContent, GroupContent, unknown>]>]>>;
|
|
3844
|
-
}
|
|
3845
|
-
key: t.StringC;
|
|
3846
|
-
}>]>>>;
|
|
3844
|
+
}>>>;
|
|
3847
3845
|
}>>, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3848
3846
|
type: t.StringC;
|
|
3849
3847
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -6391,8 +6389,9 @@ export declare const isWidgetContent: (u: unknown) => u is {
|
|
|
6391
6389
|
})[];
|
|
6392
6390
|
};
|
|
6393
6391
|
};
|
|
6394
|
-
repeat:
|
|
6392
|
+
repeat: {
|
|
6395
6393
|
__TYPE__: "GroupItemContent";
|
|
6394
|
+
key: string;
|
|
6396
6395
|
value: [string, {
|
|
6397
6396
|
type: string;
|
|
6398
6397
|
__TYPE__: "EmptyContent";
|
|
@@ -6983,9 +6982,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
|
|
|
6983
6982
|
})[];
|
|
6984
6983
|
})[];
|
|
6985
6984
|
}][];
|
|
6986
|
-
}
|
|
6987
|
-
key?: string;
|
|
6988
|
-
})[];
|
|
6985
|
+
}[];
|
|
6989
6986
|
} | {
|
|
6990
6987
|
__TYPE__: "SharedSliceContent";
|
|
6991
6988
|
variation: string;
|
|
@@ -7581,8 +7578,9 @@ export declare const isWidgetContent: (u: unknown) => u is {
|
|
|
7581
7578
|
})[];
|
|
7582
7579
|
};
|
|
7583
7580
|
};
|
|
7584
|
-
items:
|
|
7581
|
+
items: {
|
|
7585
7582
|
__TYPE__: "GroupItemContent";
|
|
7583
|
+
key: string;
|
|
7586
7584
|
value: [string, {
|
|
7587
7585
|
type: string;
|
|
7588
7586
|
__TYPE__: "EmptyContent";
|
|
@@ -8173,9 +8171,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
|
|
|
8173
8171
|
})[];
|
|
8174
8172
|
})[];
|
|
8175
8173
|
}][];
|
|
8176
|
-
}
|
|
8177
|
-
key?: string;
|
|
8178
|
-
})[];
|
|
8174
|
+
}[];
|
|
8179
8175
|
};
|
|
8180
8176
|
}[];
|
|
8181
8177
|
};
|
|
@@ -9963,8 +9959,9 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
|
|
|
9963
9959
|
})[];
|
|
9964
9960
|
};
|
|
9965
9961
|
};
|
|
9966
|
-
repeat:
|
|
9962
|
+
repeat: {
|
|
9967
9963
|
__TYPE__: "GroupItemContent";
|
|
9964
|
+
key: string;
|
|
9968
9965
|
value: [string, {
|
|
9969
9966
|
type: string;
|
|
9970
9967
|
__TYPE__: "EmptyContent";
|
|
@@ -10555,9 +10552,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
|
|
|
10555
10552
|
})[];
|
|
10556
10553
|
})[];
|
|
10557
10554
|
}][];
|
|
10558
|
-
}
|
|
10559
|
-
key?: string;
|
|
10560
|
-
})[];
|
|
10555
|
+
}[];
|
|
10561
10556
|
} | {
|
|
10562
10557
|
__TYPE__: "SharedSliceContent";
|
|
10563
10558
|
variation: string;
|
|
@@ -11153,8 +11148,9 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
|
|
|
11153
11148
|
})[];
|
|
11154
11149
|
};
|
|
11155
11150
|
};
|
|
11156
|
-
items:
|
|
11151
|
+
items: {
|
|
11157
11152
|
__TYPE__: "GroupItemContent";
|
|
11153
|
+
key: string;
|
|
11158
11154
|
value: [string, {
|
|
11159
11155
|
type: string;
|
|
11160
11156
|
__TYPE__: "EmptyContent";
|
|
@@ -11745,9 +11741,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
|
|
|
11745
11741
|
})[];
|
|
11746
11742
|
})[];
|
|
11747
11743
|
}][];
|
|
11748
|
-
}
|
|
11749
|
-
key?: string;
|
|
11750
|
-
})[];
|
|
11744
|
+
}[];
|
|
11751
11745
|
};
|
|
11752
11746
|
}[];
|
|
11753
11747
|
}> | import("fp-ts/lib/Either").Right<GroupContent> | undefined;
|
|
@@ -598,8 +598,9 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
598
598
|
})[];
|
|
599
599
|
};
|
|
600
600
|
};
|
|
601
|
-
repeat:
|
|
601
|
+
repeat: {
|
|
602
602
|
__TYPE__: "GroupItemContent";
|
|
603
|
+
key: string;
|
|
603
604
|
value: [string, {
|
|
604
605
|
type: string;
|
|
605
606
|
__TYPE__: "EmptyContent";
|
|
@@ -1190,9 +1191,7 @@ export declare const isCompositeSliceContent: (u: unknown) => u is {
|
|
|
1190
1191
|
})[];
|
|
1191
1192
|
})[];
|
|
1192
1193
|
}][];
|
|
1193
|
-
}
|
|
1194
|
-
key?: string;
|
|
1195
|
-
})[];
|
|
1194
|
+
}[];
|
|
1196
1195
|
};
|
|
1197
1196
|
export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
1198
1197
|
__TYPE__: "CompositeSliceContent";
|
|
@@ -1788,8 +1787,9 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1788
1787
|
})[];
|
|
1789
1788
|
};
|
|
1790
1789
|
};
|
|
1791
|
-
repeat:
|
|
1790
|
+
repeat: {
|
|
1792
1791
|
__TYPE__: "GroupItemContent";
|
|
1792
|
+
key: string;
|
|
1793
1793
|
value: [string, {
|
|
1794
1794
|
type: string;
|
|
1795
1795
|
__TYPE__: "EmptyContent";
|
|
@@ -2380,9 +2380,7 @@ export declare const CompositeSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
2380
2380
|
})[];
|
|
2381
2381
|
})[];
|
|
2382
2382
|
}][];
|
|
2383
|
-
}
|
|
2384
|
-
key?: string;
|
|
2385
|
-
})[];
|
|
2383
|
+
}[];
|
|
2386
2384
|
}, WithTypes<{
|
|
2387
2385
|
repeat?: unknown[];
|
|
2388
2386
|
"non-repeat"?: {
|
|
@@ -3155,8 +3153,9 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
3155
3153
|
}>]>>]>]>;
|
|
3156
3154
|
}>>]>>;
|
|
3157
3155
|
}>>]>>;
|
|
3158
|
-
repeat: t.ArrayC<t.ExactC<t.
|
|
3156
|
+
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
3159
3157
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
3158
|
+
key: t.StringC;
|
|
3160
3159
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3161
3160
|
type: t.StringC;
|
|
3162
3161
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -3921,9 +3920,7 @@ export declare const CompositeSliceContent: t.ExactC<t.TypeC<{
|
|
|
3921
3920
|
}>]>>]>]>;
|
|
3922
3921
|
}>>]>>;
|
|
3923
3922
|
}>>]>, t.Type<import("../../GroupContent").GroupContent, import("../../GroupContent").GroupContent, unknown>]>]>>;
|
|
3924
|
-
}
|
|
3925
|
-
key: t.StringC;
|
|
3926
|
-
}>]>>>;
|
|
3923
|
+
}>>>;
|
|
3927
3924
|
}>>;
|
|
3928
3925
|
export declare type CompositeSliceContent = t.TypeOf<typeof CompositeSliceContent>;
|
|
3929
3926
|
export declare function compositeSliceContentWithDefaultValues(customType: CompositeSlice, content: CompositeSliceContent): CompositeSliceContent;
|
|
@@ -178,7 +178,7 @@ function migrateCompositeSlice(model, content) {
|
|
|
178
178
|
items: content.widget.repeat.map((groupItem) => {
|
|
179
179
|
return {
|
|
180
180
|
__TYPE__: "GroupItemContent",
|
|
181
|
-
|
|
181
|
+
key: groupItem.key,
|
|
182
182
|
value: groupItem.value.reduce((acc, [fieldKey, fieldContent]) => {
|
|
183
183
|
var _a;
|
|
184
184
|
if (!((_a = model.fields.items) === null || _a === void 0 ? void 0 : _a[fieldKey])) {
|
|
@@ -4,8 +4,9 @@ import { GroupContent, GroupItemContent } from "../../GroupContent";
|
|
|
4
4
|
export declare const RepeatableWidgetsLegacy: (ctx: LegacyContentCtx) => t.Type<GroupItemContent[], WithTypes<{
|
|
5
5
|
[x: string]: unknown;
|
|
6
6
|
}>[], unknown>;
|
|
7
|
-
export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.
|
|
7
|
+
export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.TypeC<{
|
|
8
8
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
9
|
+
key: t.StringC;
|
|
9
10
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
10
11
|
type: t.StringC;
|
|
11
12
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -770,6 +771,4 @@ export declare const RepeatableWidgets: t.ArrayC<t.ExactC<t.IntersectionC<[t.Typ
|
|
|
770
771
|
}>]>>]>]>;
|
|
771
772
|
}>>]>>;
|
|
772
773
|
}>>]>, t.Type<GroupContent, GroupContent, unknown>]>]>>;
|
|
773
|
-
}
|
|
774
|
-
key: t.StringC;
|
|
775
|
-
}>]>>>;
|
|
774
|
+
}>>>;
|
|
@@ -13,13 +13,9 @@ const RepeatableWidget = t.tuple([
|
|
|
13
13
|
t.string,
|
|
14
14
|
t.union([nestable_1.NestableContent, GroupContent_1.GroupContent]),
|
|
15
15
|
]);
|
|
16
|
-
const RepeatableWidgetsBlock = t.
|
|
17
|
-
t.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
t.partial({
|
|
22
|
-
key: t.string,
|
|
23
|
-
}),
|
|
24
|
-
]));
|
|
16
|
+
const RepeatableWidgetsBlock = t.strict({
|
|
17
|
+
__TYPE__: t.literal(GroupContent_1.GroupItemContentType),
|
|
18
|
+
key: t.string,
|
|
19
|
+
value: t.array(RepeatableWidget),
|
|
20
|
+
});
|
|
25
21
|
exports.RepeatableWidgets = t.array(RepeatableWidgetsBlock);
|
|
@@ -599,8 +599,9 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
|
|
|
599
599
|
})[];
|
|
600
600
|
};
|
|
601
601
|
};
|
|
602
|
-
items:
|
|
602
|
+
items: {
|
|
603
603
|
__TYPE__: "GroupItemContent";
|
|
604
|
+
key: string;
|
|
604
605
|
value: [string, {
|
|
605
606
|
type: string;
|
|
606
607
|
__TYPE__: "EmptyContent";
|
|
@@ -1191,9 +1192,7 @@ export declare const isSharedSliceContent: (u: unknown) => u is {
|
|
|
1191
1192
|
})[];
|
|
1192
1193
|
})[];
|
|
1193
1194
|
}][];
|
|
1194
|
-
}
|
|
1195
|
-
key?: string;
|
|
1196
|
-
})[];
|
|
1195
|
+
}[];
|
|
1197
1196
|
};
|
|
1198
1197
|
export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
1199
1198
|
__TYPE__: "SharedSliceContent";
|
|
@@ -1790,8 +1789,9 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
1790
1789
|
})[];
|
|
1791
1790
|
};
|
|
1792
1791
|
};
|
|
1793
|
-
items:
|
|
1792
|
+
items: {
|
|
1794
1793
|
__TYPE__: "GroupItemContent";
|
|
1794
|
+
key: string;
|
|
1795
1795
|
value: [string, {
|
|
1796
1796
|
type: string;
|
|
1797
1797
|
__TYPE__: "EmptyContent";
|
|
@@ -2382,9 +2382,7 @@ export declare const SharedSliceLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
2382
2382
|
})[];
|
|
2383
2383
|
})[];
|
|
2384
2384
|
}][];
|
|
2385
|
-
}
|
|
2386
|
-
key?: string;
|
|
2387
|
-
})[];
|
|
2385
|
+
}[];
|
|
2388
2386
|
}, WithTypes<{
|
|
2389
2387
|
variation: string;
|
|
2390
2388
|
items: unknown[];
|
|
@@ -3159,8 +3157,9 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
3159
3157
|
}>]>>]>]>;
|
|
3160
3158
|
}>>]>>;
|
|
3161
3159
|
}>>]>, t.Type<import("../../GroupContent").GroupContent, import("../../GroupContent").GroupContent, unknown>]>>;
|
|
3162
|
-
items: t.ArrayC<t.ExactC<t.
|
|
3160
|
+
items: t.ArrayC<t.ExactC<t.TypeC<{
|
|
3163
3161
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
3162
|
+
key: t.StringC;
|
|
3164
3163
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3165
3164
|
type: t.StringC;
|
|
3166
3165
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -3925,9 +3924,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
3925
3924
|
}>]>>]>]>;
|
|
3926
3925
|
}>>]>>;
|
|
3927
3926
|
}>>]>, t.Type<import("../../GroupContent").GroupContent, import("../../GroupContent").GroupContent, unknown>]>]>>;
|
|
3928
|
-
}
|
|
3929
|
-
key: t.StringC;
|
|
3930
|
-
}>]>>>;
|
|
3927
|
+
}>>>;
|
|
3931
3928
|
}>>;
|
|
3932
3929
|
export declare type SharedSliceContent = t.TypeOf<typeof SharedSliceContent>;
|
|
3933
3930
|
export declare function sharedSliceContentWithDefaultValues(customType: SharedSlice, content: SharedSliceContent): SharedSliceContent;
|
|
@@ -101,7 +101,7 @@ function migrateSimpleSlice(model, content) {
|
|
|
101
101
|
items: content.widget.value.map((groupItem) => {
|
|
102
102
|
return {
|
|
103
103
|
__TYPE__: "GroupItemContent",
|
|
104
|
-
|
|
104
|
+
key: groupItem.key,
|
|
105
105
|
value: groupItem.value.reduce((acc, [fieldKey, fieldContent]) => {
|
|
106
106
|
var _a;
|
|
107
107
|
return ((_a = model.fields.items) === null || _a === void 0 ? void 0 : _a[fieldKey])
|
|
@@ -1184,8 +1184,9 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
1184
1184
|
})[];
|
|
1185
1185
|
};
|
|
1186
1186
|
};
|
|
1187
|
-
repeat:
|
|
1187
|
+
repeat: {
|
|
1188
1188
|
__TYPE__: "GroupItemContent";
|
|
1189
|
+
key: string;
|
|
1189
1190
|
value: [string, {
|
|
1190
1191
|
type: string;
|
|
1191
1192
|
__TYPE__: "EmptyContent";
|
|
@@ -1776,9 +1777,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
1776
1777
|
})[];
|
|
1777
1778
|
})[];
|
|
1778
1779
|
}][];
|
|
1779
|
-
}
|
|
1780
|
-
key?: string;
|
|
1781
|
-
})[];
|
|
1780
|
+
}[];
|
|
1782
1781
|
}> | import("fp-ts/lib/Either").Right<{
|
|
1783
1782
|
__TYPE__: "SharedSliceContent";
|
|
1784
1783
|
variation: string;
|
|
@@ -2374,8 +2373,9 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
2374
2373
|
})[];
|
|
2375
2374
|
};
|
|
2376
2375
|
};
|
|
2377
|
-
items:
|
|
2376
|
+
items: {
|
|
2378
2377
|
__TYPE__: "GroupItemContent";
|
|
2378
|
+
key: string;
|
|
2379
2379
|
value: [string, {
|
|
2380
2380
|
type: string;
|
|
2381
2381
|
__TYPE__: "EmptyContent";
|
|
@@ -2966,9 +2966,7 @@ export declare const SliceLegacy: (ctx: LegacyContentCtx) => {
|
|
|
2966
2966
|
})[];
|
|
2967
2967
|
})[];
|
|
2968
2968
|
}][];
|
|
2969
|
-
}
|
|
2970
|
-
key?: string;
|
|
2971
|
-
})[];
|
|
2969
|
+
}[];
|
|
2972
2970
|
}> | import("fp-ts/lib/Either").Right<import("../..").GroupContent> | undefined;
|
|
2973
2971
|
encode: (value: SliceContent) => import("../../../LegacyContentCtx").WithTypes<unknown> | undefined;
|
|
2974
2972
|
};
|
|
@@ -3738,8 +3736,9 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
3738
3736
|
}>]>>]>]>;
|
|
3739
3737
|
}>>]>>;
|
|
3740
3738
|
}>>]>>;
|
|
3741
|
-
repeat: t.ArrayC<t.ExactC<t.
|
|
3739
|
+
repeat: t.ArrayC<t.ExactC<t.TypeC<{
|
|
3742
3740
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
3741
|
+
key: t.StringC;
|
|
3743
3742
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
3744
3743
|
type: t.StringC;
|
|
3745
3744
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -4504,9 +4503,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
4504
4503
|
}>]>>]>]>;
|
|
4505
4504
|
}>>]>>;
|
|
4506
4505
|
}>>]>, t.Type<import("../..").GroupContent, import("../..").GroupContent, unknown>]>]>>;
|
|
4507
|
-
}
|
|
4508
|
-
key: t.StringC;
|
|
4509
|
-
}>]>>>;
|
|
4506
|
+
}>>>;
|
|
4510
4507
|
}>>, t.ExactC<t.TypeC<{
|
|
4511
4508
|
__TYPE__: t.LiteralC<"SharedSliceContent">;
|
|
4512
4509
|
variation: t.StringC;
|
|
@@ -5274,8 +5271,9 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
5274
5271
|
}>]>>]>]>;
|
|
5275
5272
|
}>>]>>;
|
|
5276
5273
|
}>>]>, t.Type<import("../..").GroupContent, import("../..").GroupContent, unknown>]>>;
|
|
5277
|
-
items: t.ArrayC<t.ExactC<t.
|
|
5274
|
+
items: t.ArrayC<t.ExactC<t.TypeC<{
|
|
5278
5275
|
__TYPE__: t.LiteralC<"GroupItemContent">;
|
|
5276
|
+
key: t.StringC;
|
|
5279
5277
|
value: t.ArrayC<t.TupleC<[t.StringC, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
5280
5278
|
type: t.StringC;
|
|
5281
5279
|
__TYPE__: t.LiteralC<"EmptyContent">;
|
|
@@ -6040,9 +6038,7 @@ export declare const SliceContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
6040
6038
|
}>]>>]>]>;
|
|
6041
6039
|
}>>]>>;
|
|
6042
6040
|
}>>]>, t.Type<import("../..").GroupContent, import("../..").GroupContent, unknown>]>]>>;
|
|
6043
|
-
}
|
|
6044
|
-
key: t.StringC;
|
|
6045
|
-
}>]>>>;
|
|
6041
|
+
}>>>;
|
|
6046
6042
|
}>>, t.UnionC<[t.UnionC<[t.ExactC<t.TypeC<{
|
|
6047
6043
|
type: t.StringC;
|
|
6048
6044
|
__TYPE__: t.LiteralC<"EmptyContent">;
|