@prismicio/types-internal 0.1.1 → 0.2.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/README.md +13 -13
- package/{dist → lib}/customtypes/CustomType.d.ts +697 -715
- package/{dist → lib}/customtypes/CustomType.js +42 -52
- package/{dist → lib}/customtypes/Format.d.ts +0 -0
- package/{dist → lib}/customtypes/Format.js +0 -0
- package/{dist → lib}/customtypes/Section.d.ts +1035 -1062
- package/lib/customtypes/Section.js +21 -0
- package/lib/customtypes/index.d.ts +4 -0
- package/lib/customtypes/index.js +9 -0
- package/{dist → lib}/customtypes/widgets/Group.d.ts +45 -45
- package/lib/customtypes/widgets/Group.js +24 -0
- package/{dist → lib}/customtypes/widgets/UID.d.ts +4 -4
- package/lib/customtypes/widgets/UID.js +21 -0
- package/{dist → lib}/customtypes/widgets/Widget.d.ts +1036 -1063
- package/lib/customtypes/widgets/Widget.js +27 -0
- package/{dist → lib}/customtypes/widgets/WidgetTypes.d.ts +0 -0
- package/{dist → lib}/customtypes/widgets/WidgetTypes.js +0 -0
- package/lib/customtypes/widgets/index.d.ts +7 -0
- package/lib/customtypes/widgets/index.js +14 -0
- package/{dist → lib}/customtypes/widgets/nestable/BooleanField.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/BooleanField.js +21 -0
- package/{dist → lib}/customtypes/widgets/nestable/Color.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Color.js +20 -0
- package/{dist → lib}/customtypes/widgets/nestable/Date.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Date.js +21 -0
- package/{dist → lib}/customtypes/widgets/nestable/Embed.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Embed.js +21 -0
- package/{dist → lib}/customtypes/widgets/nestable/GeoPoint.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/GeoPoint.js +19 -0
- package/lib/customtypes/widgets/nestable/Image.d.ts +23 -0
- package/lib/customtypes/widgets/nestable/Image.js +29 -0
- package/{dist → lib}/customtypes/widgets/nestable/IntegrationField.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/IntegrationField.js +21 -0
- package/{dist → lib}/customtypes/widgets/nestable/Link.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Link.js +54 -0
- package/{dist → lib}/customtypes/widgets/nestable/NestableWidget.d.ts +42 -42
- package/lib/customtypes/widgets/nestable/NestableWidget.js +37 -0
- package/{dist → lib}/customtypes/widgets/nestable/Number.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Number.js +24 -0
- package/{dist → lib}/customtypes/widgets/nestable/Range.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Range.js +24 -0
- package/{dist → lib}/customtypes/widgets/nestable/RichText.d.ts +6 -6
- package/lib/customtypes/widgets/nestable/RichText.js +111 -0
- package/lib/customtypes/widgets/nestable/Select.d.ts +15 -0
- package/lib/customtypes/widgets/nestable/Select.js +22 -0
- package/{dist → lib}/customtypes/widgets/nestable/Separator.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/Separator.js +18 -0
- package/{dist → lib}/customtypes/widgets/nestable/Text.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Text.js +21 -0
- package/{dist → lib}/customtypes/widgets/nestable/Timestamp.d.ts +4 -4
- package/lib/customtypes/widgets/nestable/Timestamp.js +21 -0
- package/lib/customtypes/widgets/nestable/index.d.ts +15 -0
- package/{dist → lib}/customtypes/widgets/nestable/index.js +0 -0
- package/{dist → lib}/customtypes/widgets/shared/ImageConstraint.d.ts +3 -3
- package/lib/customtypes/widgets/shared/ImageConstraint.js +31 -0
- package/lib/customtypes/widgets/shared/index.d.ts +1 -0
- package/{dist → lib}/customtypes/widgets/shared/index.js +0 -0
- package/{dist → lib}/customtypes/widgets/slices/CompositeSlice.d.ts +87 -87
- package/lib/customtypes/widgets/slices/CompositeSlice.js +25 -0
- package/{dist → lib}/customtypes/widgets/slices/LegacySlice.d.ts +86 -95
- package/lib/customtypes/widgets/slices/LegacySlice.js +8 -0
- package/{dist → lib}/customtypes/widgets/slices/SharedSlice.d.ts +84 -84
- package/lib/customtypes/widgets/slices/SharedSlice.js +35 -0
- package/{dist → lib}/customtypes/widgets/slices/SharedSliceRef.d.ts +2 -2
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +9 -0
- package/lib/customtypes/widgets/slices/Slice.d.ts +6 -0
- package/{dist → lib}/customtypes/widgets/slices/Slice.js +0 -0
- package/{dist → lib}/customtypes/widgets/slices/Slices.d.ts +1550 -1604
- package/lib/customtypes/widgets/slices/Slices.js +93 -0
- package/{dist → lib}/customtypes/widgets/slices/SlicesTypes.d.ts +0 -0
- package/{dist → lib}/customtypes/widgets/slices/SlicesTypes.js +0 -0
- package/lib/customtypes/widgets/slices/index.d.ts +7 -0
- package/lib/customtypes/widgets/slices/index.js +16 -0
- package/lib/documents/DocumentData.d.ts +8 -0
- package/lib/documents/DocumentData.js +28 -0
- package/lib/documents/index.d.ts +2 -0
- package/lib/documents/index.js +7 -0
- package/lib/documents/widgets/EmptyContent.d.ts +8 -0
- package/lib/documents/widgets/EmptyContent.js +9 -0
- package/lib/documents/widgets/GroupContent.d.ts +16 -0
- package/lib/documents/widgets/GroupContent.js +59 -0
- package/lib/documents/widgets/SimpleWidgetContent.d.ts +20 -0
- package/lib/documents/widgets/SimpleWidgetContent.js +75 -0
- package/lib/documents/widgets/StaticWidgetContent.d.ts +10 -0
- package/lib/documents/widgets/StaticWidgetContent.js +26 -0
- package/lib/documents/widgets/UIDContent.d.ts +7 -0
- package/lib/documents/widgets/UIDContent.js +10 -0
- package/lib/documents/widgets/index.d.ts +35 -0
- package/lib/documents/widgets/index.js +36 -0
- package/lib/documents/widgets/nestable/BooleanContent.d.ts +8 -0
- package/lib/documents/widgets/nestable/BooleanContent.js +11 -0
- package/lib/documents/widgets/nestable/EmbedContent.d.ts +40 -0
- package/lib/documents/widgets/nestable/EmbedContent.js +36 -0
- package/lib/documents/widgets/nestable/FieldContent.d.ts +12 -0
- package/lib/documents/widgets/nestable/FieldContent.js +37 -0
- package/lib/documents/widgets/nestable/GeoPointContent.d.ts +17 -0
- package/lib/documents/widgets/nestable/GeoPointContent.js +13 -0
- package/lib/documents/widgets/nestable/ImageContent.d.ts +127 -0
- package/lib/documents/widgets/nestable/ImageContent.js +41 -0
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.d.ts +8 -0
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +16 -0
- package/lib/documents/widgets/nestable/Link/DocumentLink.d.ts +12 -0
- package/lib/documents/widgets/nestable/Link/DocumentLink.js +13 -0
- package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +24 -0
- package/lib/documents/widgets/nestable/Link/ExternalLink.js +24 -0
- package/lib/documents/widgets/nestable/Link/FileLink.d.ts +22 -0
- package/lib/documents/widgets/nestable/Link/FileLink.js +24 -0
- package/lib/documents/widgets/nestable/Link/ImageLink.d.ts +28 -0
- package/lib/documents/widgets/nestable/Link/ImageLink.js +26 -0
- package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +36 -0
- package/lib/documents/widgets/nestable/Link/LinkContent.js +13 -0
- package/lib/documents/widgets/nestable/Link/index.d.ts +89 -0
- package/lib/documents/widgets/nestable/Link/index.js +35 -0
- package/lib/documents/widgets/nestable/SeparatorContent.d.ts +7 -0
- package/lib/documents/widgets/nestable/SeparatorContent.js +10 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +274 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +97 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/index.d.ts +9 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/index.js +14 -0
- package/lib/documents/widgets/nestable/index.d.ts +26 -0
- package/lib/documents/widgets/nestable/index.js +40 -0
- package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +14 -0
- package/lib/documents/widgets/slices/CompositeSliceContent.js +50 -0
- package/lib/documents/widgets/slices/SharedSliceContent.d.ts +15 -0
- package/lib/documents/widgets/slices/SharedSliceContent.js +62 -0
- package/lib/documents/widgets/slices/SimpleSliceContent.d.ts +6 -0
- package/lib/documents/widgets/slices/SimpleSliceContent.js +6 -0
- package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +8 -0
- package/lib/documents/widgets/slices/SliceWidgetContent.js +26 -0
- package/lib/documents/widgets/slices/SlicesContent.d.ts +17 -0
- package/lib/documents/widgets/slices/SlicesContent.js +51 -0
- package/lib/documents/widgets/slices/index.d.ts +5 -0
- package/lib/documents/widgets/slices/index.js +8 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +7 -0
- package/lib/validators/DateFromString.d.ts +3 -0
- package/lib/validators/DateFromString.js +10 -0
- package/lib/validators/DateFromStringOrNumber.d.ts +3 -0
- package/lib/validators/DateFromStringOrNumber.js +10 -0
- package/lib/validators/DateFromTsMs.d.ts +3 -0
- package/lib/validators/DateFromTsMs.js +10 -0
- package/lib/validators/IntFromNumber.d.ts +5 -0
- package/lib/validators/IntFromNumber.js +14 -0
- package/lib/validators/IntFromPixels.d.ts +8 -0
- package/lib/validators/IntFromPixels.js +24 -0
- package/lib/validators/NonEmptyString.d.ts +3 -0
- package/lib/validators/NonEmptyString.js +6 -0
- package/lib/validators/NonEmptyStringOrNull.d.ts +3 -0
- package/lib/validators/NonEmptyStringOrNull.js +15 -0
- package/lib/validators/NumberOrNull.d.ts +3 -0
- package/lib/validators/NumberOrNull.js +6 -0
- package/lib/validators/StringFromBoolean.d.ts +5 -0
- package/lib/validators/StringFromBoolean.js +10 -0
- package/lib/validators/StringFromNumber.d.ts +5 -0
- package/lib/validators/StringFromNumber.js +10 -0
- package/lib/validators/StringOrNull.d.ts +3 -0
- package/lib/validators/StringOrNull.js +6 -0
- package/lib/validators/function.d.ts +14 -0
- package/lib/validators/function.js +60 -0
- package/lib/validators/index.d.ts +12 -0
- package/lib/validators/index.js +27 -0
- package/package.json +30 -18
- package/src/customtypes/CustomType.ts +173 -116
- package/src/customtypes/Format.ts +3 -3
- package/src/customtypes/Section.ts +26 -13
- package/src/customtypes/index.ts +4 -4
- package/src/customtypes/widgets/Group.ts +21 -20
- package/src/customtypes/widgets/UID.ts +18 -17
- package/src/customtypes/widgets/Widget.ts +22 -23
- package/src/customtypes/widgets/WidgetTypes.ts +21 -21
- package/src/customtypes/widgets/index.ts +7 -7
- package/src/customtypes/widgets/nestable/BooleanField.ts +19 -19
- package/src/customtypes/widgets/nestable/Color.ts +17 -16
- package/src/customtypes/widgets/nestable/Date.ts +19 -18
- package/src/customtypes/widgets/nestable/Embed.ts +19 -18
- package/src/customtypes/widgets/nestable/GeoPoint.ts +17 -16
- package/src/customtypes/widgets/nestable/Image.ts +26 -26
- package/src/customtypes/widgets/nestable/IntegrationField.ts +18 -17
- package/src/customtypes/widgets/nestable/Link.ts +80 -68
- package/src/customtypes/widgets/nestable/NestableWidget.ts +32 -32
- package/src/customtypes/widgets/nestable/Number.ts +22 -21
- package/src/customtypes/widgets/nestable/Range.ts +22 -21
- package/src/customtypes/widgets/nestable/RichText.ts +164 -134
- package/src/customtypes/widgets/nestable/Select.ts +22 -21
- package/src/customtypes/widgets/nestable/Separator.ts +15 -14
- package/src/customtypes/widgets/nestable/Text.ts +18 -17
- package/src/customtypes/widgets/nestable/Timestamp.ts +19 -18
- package/src/customtypes/widgets/nestable/index.ts +15 -15
- package/src/customtypes/widgets/shared/ImageConstraint.ts +31 -29
- package/src/customtypes/widgets/shared/index.ts +1 -1
- package/src/customtypes/widgets/slices/CompositeSlice.ts +21 -21
- package/src/customtypes/widgets/slices/LegacySlice.ts +5 -10
- package/src/customtypes/widgets/slices/SharedSlice.ts +33 -31
- package/src/customtypes/widgets/slices/SharedSliceRef.ts +6 -6
- package/src/customtypes/widgets/slices/Slice.ts +4 -4
- package/src/customtypes/widgets/slices/Slices.ts +95 -73
- package/src/customtypes/widgets/slices/SlicesTypes.ts +3 -3
- package/src/customtypes/widgets/slices/index.ts +7 -7
- package/src/documents/DocumentData.ts +54 -0
- package/src/documents/index.ts +2 -0
- package/src/documents/widgets/EmptyContent.ts +8 -0
- package/src/documents/widgets/GroupContent.ts +91 -0
- package/src/documents/widgets/SimpleWidgetContent.ts +96 -0
- package/src/documents/widgets/StaticWidgetContent.ts +46 -0
- package/src/documents/widgets/UIDContent.ts +18 -0
- package/src/documents/widgets/index.ts +56 -0
- package/src/documents/widgets/nestable/BooleanContent.ts +21 -0
- package/src/documents/widgets/nestable/EmbedContent.ts +54 -0
- package/src/documents/widgets/nestable/FieldContent.ts +45 -0
- package/src/documents/widgets/nestable/GeoPointContent.ts +18 -0
- package/src/documents/widgets/nestable/ImageContent.ts +51 -0
- package/src/documents/widgets/nestable/IntegrationFieldsContent.ts +26 -0
- package/src/documents/widgets/nestable/Link/DocumentLink.ts +18 -0
- package/src/documents/widgets/nestable/Link/ExternalLink.ts +31 -0
- package/src/documents/widgets/nestable/Link/FileLink.ts +29 -0
- package/src/documents/widgets/nestable/Link/ImageLink.ts +31 -0
- package/src/documents/widgets/nestable/Link/LinkContent.ts +22 -0
- package/src/documents/widgets/nestable/Link/index.ts +33 -0
- package/src/documents/widgets/nestable/SeparatorContent.ts +8 -0
- package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +122 -0
- package/src/documents/widgets/nestable/StructuredTextContent/index.ts +25 -0
- package/src/documents/widgets/nestable/index.ts +35 -0
- package/src/documents/widgets/slices/CompositeSliceContent.ts +77 -0
- package/src/documents/widgets/slices/SharedSliceContent.ts +94 -0
- package/src/documents/widgets/slices/SimpleSliceContent.ts +4 -0
- package/src/documents/widgets/slices/SliceWidgetContent.ts +51 -0
- package/src/documents/widgets/slices/SlicesContent.ts +91 -0
- package/src/documents/widgets/slices/index.ts +5 -0
- package/src/index.ts +3 -1
- package/src/validators/DateFromString.ts +17 -0
- package/src/validators/DateFromStringOrNumber.ts +17 -0
- package/src/validators/DateFromTsMs.ts +17 -0
- package/src/validators/IntFromNumber.ts +22 -24
- package/src/validators/IntFromPixels.ts +27 -26
- package/src/validators/NonEmptyString.ts +9 -0
- package/src/validators/NonEmptyStringOrNull.ts +22 -0
- package/src/validators/NumberOrNull.ts +5 -0
- package/src/validators/StringFromBoolean.ts +17 -19
- package/src/validators/StringFromNumber.ts +17 -19
- package/src/validators/StringOrNull.ts +4 -2
- package/src/validators/function.ts +71 -0
- package/src/validators/index.ts +12 -0
- package/dist/customtypes/Section.js +0 -40
- package/dist/customtypes/index.d.ts +0 -4
- package/dist/customtypes/index.js +0 -30
- package/dist/customtypes/widgets/Group.js +0 -45
- package/dist/customtypes/widgets/UID.js +0 -42
- package/dist/customtypes/widgets/Widget.js +0 -51
- package/dist/customtypes/widgets/index.d.ts +0 -7
- package/dist/customtypes/widgets/index.js +0 -35
- package/dist/customtypes/widgets/nestable/BooleanField.js +0 -42
- package/dist/customtypes/widgets/nestable/Color.js +0 -41
- package/dist/customtypes/widgets/nestable/Date.js +0 -42
- package/dist/customtypes/widgets/nestable/Embed.js +0 -42
- package/dist/customtypes/widgets/nestable/GeoPoint.js +0 -40
- package/dist/customtypes/widgets/nestable/Image.d.ts +0 -23
- package/dist/customtypes/widgets/nestable/Image.js +0 -50
- package/dist/customtypes/widgets/nestable/IntegrationField.js +0 -42
- package/dist/customtypes/widgets/nestable/Link.js +0 -78
- package/dist/customtypes/widgets/nestable/NestableWidget.js +0 -58
- package/dist/customtypes/widgets/nestable/Number.js +0 -45
- package/dist/customtypes/widgets/nestable/Range.js +0 -45
- package/dist/customtypes/widgets/nestable/RichText.js +0 -134
- package/dist/customtypes/widgets/nestable/Select.d.ts +0 -15
- package/dist/customtypes/widgets/nestable/Select.js +0 -45
- package/dist/customtypes/widgets/nestable/Separator.js +0 -39
- package/dist/customtypes/widgets/nestable/Text.js +0 -42
- package/dist/customtypes/widgets/nestable/Timestamp.js +0 -42
- package/dist/customtypes/widgets/nestable/index.d.ts +0 -15
- package/dist/customtypes/widgets/shared/ImageConstraint.js +0 -48
- package/dist/customtypes/widgets/shared/index.d.ts +0 -1
- package/dist/customtypes/widgets/slices/CompositeSlice.js +0 -46
- package/dist/customtypes/widgets/slices/LegacySlice.js +0 -34
- package/dist/customtypes/widgets/slices/SharedSlice.js +0 -56
- package/dist/customtypes/widgets/slices/SharedSliceRef.js +0 -30
- package/dist/customtypes/widgets/slices/Slice.d.ts +0 -6
- package/dist/customtypes/widgets/slices/Slices.js +0 -106
- package/dist/customtypes/widgets/slices/index.d.ts +0 -7
- package/dist/customtypes/widgets/slices/index.js +0 -37
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -23
- package/dist/index.js.map +0 -1
- package/dist/validators/IntFromNumber.d.ts +0 -7
- package/dist/validators/IntFromNumber.js +0 -35
- package/dist/validators/IntFromPixels.d.ts +0 -7
- package/dist/validators/IntFromPixels.js +0 -43
- package/dist/validators/StringFromBoolean.d.ts +0 -7
- package/dist/validators/StringFromBoolean.js +0 -31
- package/dist/validators/StringFromNumber.d.ts +0 -7
- package/dist/validators/StringFromNumber.js +0 -31
- package/dist/validators/StringOrNull.d.ts +0 -2
- package/dist/validators/StringOrNull.js +0 -24
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Widgets = exports.DynamicWidget = exports.StaticWidget = exports.widgetReader = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const Format_1 = require("../Format");
|
|
7
|
+
const Group_1 = (0, tslib_1.__importDefault)(require("./Group"));
|
|
8
|
+
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("./nestable/NestableWidget"));
|
|
9
|
+
const Slices_1 = require("./slices/Slices");
|
|
10
|
+
const UID_1 = (0, tslib_1.__importDefault)(require("./UID"));
|
|
11
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("./WidgetTypes"));
|
|
12
|
+
function widgetReader(format) {
|
|
13
|
+
return t.union([UID_1.default, NestableWidget_1.default, Group_1.default, (0, Slices_1.slicesReader)(format)]);
|
|
14
|
+
}
|
|
15
|
+
exports.widgetReader = widgetReader;
|
|
16
|
+
exports.StaticWidget = widgetReader(Format_1.Format.Static);
|
|
17
|
+
exports.DynamicWidget = widgetReader(Format_1.Format.Dynamic);
|
|
18
|
+
exports.Widgets = {
|
|
19
|
+
toStatic(widget, sharedSlices) {
|
|
20
|
+
switch (widget.type) {
|
|
21
|
+
case WidgetTypes_1.default.Slices:
|
|
22
|
+
return Slices_1.Slices.toStatic(widget, sharedSlices);
|
|
23
|
+
default:
|
|
24
|
+
return widget;
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Group } from "./Group";
|
|
2
|
+
export * as Nestable from "./nestable";
|
|
3
|
+
export * as Shared from "./shared";
|
|
4
|
+
export * as Slices from "./slices";
|
|
5
|
+
export { default as UID } from "./UID";
|
|
6
|
+
export * as Widget from "./Widget";
|
|
7
|
+
export { default as WidgetTypes } from "./WidgetTypes";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WidgetTypes = exports.Widget = exports.UID = exports.Slices = exports.Shared = exports.Nestable = exports.Group = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var Group_1 = require("./Group");
|
|
6
|
+
Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(Group_1).default; } });
|
|
7
|
+
exports.Nestable = (0, tslib_1.__importStar)(require("./nestable"));
|
|
8
|
+
exports.Shared = (0, tslib_1.__importStar)(require("./shared"));
|
|
9
|
+
exports.Slices = (0, tslib_1.__importStar)(require("./slices"));
|
|
10
|
+
var UID_1 = require("./UID");
|
|
11
|
+
Object.defineProperty(exports, "UID", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(UID_1).default; } });
|
|
12
|
+
exports.Widget = (0, tslib_1.__importStar)(require("./Widget"));
|
|
13
|
+
var WidgetTypes_1 = require("./WidgetTypes");
|
|
14
|
+
Object.defineProperty(exports, "WidgetTypes", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(WidgetTypes_1).default; } });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const BooleanField: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.BooleanField>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
6
|
config: t.ExactC<t.PartialC<{
|
|
7
|
-
label: t.UnionC<[t.
|
|
7
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
8
8
|
default_value: t.BooleanC;
|
|
9
9
|
placeholder_true: t.StringC;
|
|
10
10
|
placeholder_false: t.StringC;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const BooleanConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
default_value: t.boolean,
|
|
10
|
+
placeholder_true: t.string,
|
|
11
|
+
placeholder_false: t.string,
|
|
12
|
+
}));
|
|
13
|
+
const BooleanField = t.exact(t.intersection([
|
|
14
|
+
t.type({
|
|
15
|
+
type: t.literal(WidgetTypes_1.default.BooleanField),
|
|
16
|
+
}),
|
|
17
|
+
t.partial({
|
|
18
|
+
config: BooleanConfig,
|
|
19
|
+
}),
|
|
20
|
+
]));
|
|
21
|
+
exports.default = BooleanField;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const Color: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.Color>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
placeholder: t.StringC;
|
|
10
10
|
}>>;
|
|
11
11
|
}>]>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const ColorConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
placeholder: t.string,
|
|
10
|
+
}));
|
|
11
|
+
const Color = t.exact(t.intersection([
|
|
12
|
+
t.type({
|
|
13
|
+
type: t.literal(WidgetTypes_1.default.Color),
|
|
14
|
+
}),
|
|
15
|
+
t.partial({
|
|
16
|
+
fieldset: validators_1.StringOrNull,
|
|
17
|
+
config: ColorConfig,
|
|
18
|
+
}),
|
|
19
|
+
]));
|
|
20
|
+
exports.default = Color;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const Date: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.Date>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
placeholder: t.StringC;
|
|
10
10
|
default: t.StringC;
|
|
11
11
|
}>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const DateConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
placeholder: t.string,
|
|
10
|
+
default: t.string,
|
|
11
|
+
}));
|
|
12
|
+
const Date = t.exact(t.intersection([
|
|
13
|
+
t.type({
|
|
14
|
+
type: t.literal(WidgetTypes_1.default.Date),
|
|
15
|
+
}),
|
|
16
|
+
t.partial({
|
|
17
|
+
fieldset: validators_1.StringOrNull,
|
|
18
|
+
config: DateConfig,
|
|
19
|
+
}),
|
|
20
|
+
]));
|
|
21
|
+
exports.default = Date;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const Embed: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.Embed>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
placeholder: t.StringC;
|
|
10
10
|
useAsTitle: t.BooleanC;
|
|
11
11
|
}>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const EmbedConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
placeholder: t.string,
|
|
10
|
+
useAsTitle: t.boolean,
|
|
11
|
+
}));
|
|
12
|
+
const Embed = t.exact(t.intersection([
|
|
13
|
+
t.type({
|
|
14
|
+
type: t.literal(WidgetTypes_1.default.Embed),
|
|
15
|
+
}),
|
|
16
|
+
t.partial({
|
|
17
|
+
fieldset: validators_1.StringOrNull,
|
|
18
|
+
config: EmbedConfig,
|
|
19
|
+
}),
|
|
20
|
+
]));
|
|
21
|
+
exports.default = Embed;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const GeoPoint: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.GeoPoint>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
}>>;
|
|
10
10
|
}>]>>;
|
|
11
11
|
declare type GeoPoint = t.TypeOf<typeof GeoPoint>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const GeoPointConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
}));
|
|
10
|
+
const GeoPoint = t.exact(t.intersection([
|
|
11
|
+
t.type({
|
|
12
|
+
type: t.literal(WidgetTypes_1.default.GeoPoint),
|
|
13
|
+
}),
|
|
14
|
+
t.partial({
|
|
15
|
+
fieldset: validators_1.StringOrNull,
|
|
16
|
+
config: GeoPointConfig,
|
|
17
|
+
}),
|
|
18
|
+
]));
|
|
19
|
+
exports.default = GeoPoint;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
|
+
declare const Image: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
|
+
type: t.LiteralC<WidgetTypes.Image>;
|
|
5
|
+
}>, t.PartialC<{
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
|
+
config: t.ExactC<t.PartialC<{
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
|
+
placeholder: t.StringC;
|
|
10
|
+
constraint: t.PartialC<{
|
|
11
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
12
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
13
|
+
}>;
|
|
14
|
+
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
15
|
+
name: t.StringC;
|
|
16
|
+
}>, t.PartialC<{
|
|
17
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
18
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
19
|
+
}>]>>>;
|
|
20
|
+
}>>;
|
|
21
|
+
}>]>>;
|
|
22
|
+
declare type Image = t.TypeOf<typeof Image>;
|
|
23
|
+
export default Image;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
|
|
7
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
8
|
+
const Thumbnail = t.exact(t.intersection([
|
|
9
|
+
t.type({
|
|
10
|
+
name: t.string,
|
|
11
|
+
}),
|
|
12
|
+
ImageConstraint_1.default,
|
|
13
|
+
]));
|
|
14
|
+
const ImageConfig = t.exact(t.partial({
|
|
15
|
+
label: validators_1.StringOrNull,
|
|
16
|
+
placeholder: t.string,
|
|
17
|
+
constraint: ImageConstraint_1.default,
|
|
18
|
+
thumbnails: t.array(Thumbnail),
|
|
19
|
+
}));
|
|
20
|
+
const Image = t.exact(t.intersection([
|
|
21
|
+
t.type({
|
|
22
|
+
type: t.literal(WidgetTypes_1.default.Image),
|
|
23
|
+
}),
|
|
24
|
+
t.partial({
|
|
25
|
+
fieldset: validators_1.StringOrNull,
|
|
26
|
+
config: ImageConfig,
|
|
27
|
+
}),
|
|
28
|
+
]));
|
|
29
|
+
exports.default = Image;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const IntegrationField: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.IntegrationField>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
placeholder: t.StringC;
|
|
10
10
|
catalog: t.StringC;
|
|
11
11
|
}>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
|
+
const validators_1 = require("../../../validators");
|
|
6
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
7
|
+
const IntegrationFieldConfig = t.exact(t.partial({
|
|
8
|
+
label: validators_1.StringOrNull,
|
|
9
|
+
placeholder: t.string,
|
|
10
|
+
catalog: t.string,
|
|
11
|
+
}));
|
|
12
|
+
const IntegrationField = t.exact(t.intersection([
|
|
13
|
+
t.type({
|
|
14
|
+
type: t.literal(WidgetTypes_1.default.IntegrationField),
|
|
15
|
+
}),
|
|
16
|
+
t.partial({
|
|
17
|
+
fieldset: validators_1.StringOrNull,
|
|
18
|
+
config: IntegrationFieldConfig,
|
|
19
|
+
}),
|
|
20
|
+
]));
|
|
21
|
+
exports.default = IntegrationField;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as t from
|
|
2
|
-
import WidgetTypes from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import WidgetTypes from "../WidgetTypes";
|
|
3
3
|
declare const Link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
4
|
type: t.LiteralC<WidgetTypes.Link>;
|
|
5
5
|
}>, t.PartialC<{
|
|
6
|
-
fieldset: t.UnionC<[t.
|
|
6
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
7
|
config: t.ExactC<t.PartialC<{
|
|
8
|
-
label: t.UnionC<[t.
|
|
8
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
9
9
|
useAsTitle: t.BooleanC;
|
|
10
10
|
placeholder: t.StringC;
|
|
11
11
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const Either_1 = require("fp-ts/lib/Either");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
|
+
const withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
7
|
+
const validators_1 = require("../../../validators");
|
|
8
|
+
const WidgetTypes_1 = (0, tslib_1.__importDefault)(require("../WidgetTypes"));
|
|
9
|
+
const arrayString = (entries) => {
|
|
10
|
+
if (entries instanceof Array) {
|
|
11
|
+
const isValidEntries = entries.reduce((acc, l) => acc && typeof l === "string", true);
|
|
12
|
+
if (isValidEntries)
|
|
13
|
+
return t.success(entries);
|
|
14
|
+
}
|
|
15
|
+
return;
|
|
16
|
+
};
|
|
17
|
+
const plainString = (entries) => {
|
|
18
|
+
if (typeof entries === "string") {
|
|
19
|
+
return t.success([entries]);
|
|
20
|
+
}
|
|
21
|
+
return;
|
|
22
|
+
};
|
|
23
|
+
const MasksArrayString = new t.Type("MasksArrayString", (u) => {
|
|
24
|
+
return u instanceof Array;
|
|
25
|
+
}, (u, context) => {
|
|
26
|
+
return Either_1.either.chain(t.union([t.array(t.string), t.string]).validate(u, context), (masks) => {
|
|
27
|
+
return arrayString(masks) || plainString(masks) || t.failure(u, context);
|
|
28
|
+
});
|
|
29
|
+
}, (res) => res);
|
|
30
|
+
const LinkConfig = t.exact(t.partial({
|
|
31
|
+
label: validators_1.StringOrNull,
|
|
32
|
+
useAsTitle: t.boolean,
|
|
33
|
+
placeholder: t.string,
|
|
34
|
+
select: (0, withFallback_1.withFallback)(t.union([
|
|
35
|
+
t.literal("media"),
|
|
36
|
+
t.literal("document"),
|
|
37
|
+
t.literal("web"),
|
|
38
|
+
t.null,
|
|
39
|
+
]), null),
|
|
40
|
+
customtypes: t.array(t.string),
|
|
41
|
+
masks: MasksArrayString,
|
|
42
|
+
tags: MasksArrayString,
|
|
43
|
+
allowTargetBlank: t.boolean,
|
|
44
|
+
}));
|
|
45
|
+
const Link = t.exact(t.intersection([
|
|
46
|
+
t.type({
|
|
47
|
+
type: t.literal(WidgetTypes_1.default.Link),
|
|
48
|
+
}),
|
|
49
|
+
t.partial({
|
|
50
|
+
fieldset: validators_1.StringOrNull,
|
|
51
|
+
config: LinkConfig,
|
|
52
|
+
}),
|
|
53
|
+
]));
|
|
54
|
+
exports.default = Link;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as t from
|
|
1
|
+
import * as t from "io-ts";
|
|
2
2
|
declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
3
3
|
type: t.LiteralC<import("../WidgetTypes").default.Color>;
|
|
4
4
|
}>, t.PartialC<{
|
|
5
|
-
fieldset: t.UnionC<[t.
|
|
5
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
6
6
|
config: t.ExactC<t.PartialC<{
|
|
7
|
-
label: t.UnionC<[t.
|
|
7
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
8
8
|
placeholder: t.StringC;
|
|
9
9
|
}>>;
|
|
10
10
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
11
11
|
type: t.LiteralC<import("../WidgetTypes").default.BooleanField>;
|
|
12
12
|
}>, t.PartialC<{
|
|
13
13
|
config: t.ExactC<t.PartialC<{
|
|
14
|
-
label: t.UnionC<[t.
|
|
14
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
15
15
|
default_value: t.BooleanC;
|
|
16
16
|
placeholder_true: t.StringC;
|
|
17
17
|
placeholder_false: t.StringC;
|
|
@@ -19,63 +19,63 @@ declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
19
19
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
20
20
|
type: t.LiteralC<import("../WidgetTypes").default.Embed>;
|
|
21
21
|
}>, t.PartialC<{
|
|
22
|
-
fieldset: t.UnionC<[t.
|
|
22
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
23
23
|
config: t.ExactC<t.PartialC<{
|
|
24
|
-
label: t.UnionC<[t.
|
|
24
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
25
25
|
placeholder: t.StringC;
|
|
26
26
|
useAsTitle: t.BooleanC;
|
|
27
27
|
}>>;
|
|
28
28
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
29
29
|
type: t.LiteralC<import("../WidgetTypes").default.GeoPoint>;
|
|
30
30
|
}>, t.PartialC<{
|
|
31
|
-
fieldset: t.UnionC<[t.
|
|
31
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
32
32
|
config: t.ExactC<t.PartialC<{
|
|
33
|
-
label: t.UnionC<[t.
|
|
33
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
34
34
|
}>>;
|
|
35
35
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
36
36
|
type: t.LiteralC<import("../WidgetTypes").default.Date>;
|
|
37
37
|
}>, t.PartialC<{
|
|
38
|
-
fieldset: t.UnionC<[t.
|
|
38
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
39
39
|
config: t.ExactC<t.PartialC<{
|
|
40
|
-
label: t.UnionC<[t.
|
|
40
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
41
41
|
placeholder: t.StringC;
|
|
42
42
|
default: t.StringC;
|
|
43
43
|
}>>;
|
|
44
44
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
45
45
|
type: t.LiteralC<import("../WidgetTypes").default.Number>;
|
|
46
46
|
}>, t.PartialC<{
|
|
47
|
-
fieldset: t.UnionC<[t.
|
|
47
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
48
48
|
config: t.ExactC<t.PartialC<{
|
|
49
|
-
label: t.UnionC<[t.
|
|
49
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
50
50
|
placeholder: t.StringC;
|
|
51
|
-
min: t.UnionC<[t.NumberC, import("io-ts-types
|
|
52
|
-
max: t.UnionC<[t.NumberC, import("io-ts-types
|
|
53
|
-
step: t.UnionC<[t.NumberC, import("io-ts-types
|
|
51
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
52
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
53
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
54
54
|
}>>;
|
|
55
55
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
56
56
|
type: t.LiteralC<import("../WidgetTypes").default.Range>;
|
|
57
57
|
}>, t.PartialC<{
|
|
58
|
-
fieldset: t.UnionC<[t.
|
|
58
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
59
59
|
config: t.ExactC<t.PartialC<{
|
|
60
|
-
label: t.UnionC<[t.
|
|
60
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
61
61
|
placeholder: t.StringC;
|
|
62
|
-
min: t.UnionC<[t.NumberC, import("io-ts-types
|
|
63
|
-
max: t.UnionC<[t.NumberC, import("io-ts-types
|
|
64
|
-
step: t.UnionC<[t.NumberC, import("io-ts-types
|
|
62
|
+
min: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
63
|
+
max: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
64
|
+
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
65
65
|
}>>;
|
|
66
66
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
67
67
|
type: t.LiteralC<import("../WidgetTypes").default.RichText>;
|
|
68
68
|
}>, t.PartialC<{
|
|
69
|
-
fieldset: t.UnionC<[t.
|
|
69
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
70
70
|
config: t.ExactC<t.PartialC<{
|
|
71
|
-
label: t.UnionC<[t.
|
|
71
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
72
72
|
placeholder: t.StringC;
|
|
73
73
|
useAsTitle: t.BooleanC;
|
|
74
74
|
single: t.Type<string, string, unknown>;
|
|
75
75
|
multi: t.Type<string, string, unknown>;
|
|
76
76
|
imageConstraint: t.PartialC<{
|
|
77
|
-
width: t.Type<number | null,
|
|
78
|
-
height: t.Type<number | null,
|
|
77
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
78
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
79
79
|
}>;
|
|
80
80
|
labels: t.Type<string[], object, unknown>;
|
|
81
81
|
allowTargetBlank: t.BooleanC;
|
|
@@ -83,43 +83,43 @@ declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
83
83
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
84
84
|
type: t.LiteralC<import("../WidgetTypes").default.Select>;
|
|
85
85
|
}>, t.PartialC<{
|
|
86
|
-
fieldset: t.UnionC<[t.
|
|
86
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
87
87
|
config: t.ExactC<t.PartialC<{
|
|
88
|
-
label: t.UnionC<[t.
|
|
88
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
89
89
|
placeholder: t.StringC;
|
|
90
90
|
default_value: t.StringC;
|
|
91
|
-
options: t.ArrayC<t.UnionC<[t.StringC,
|
|
91
|
+
options: t.ArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
92
92
|
}>>;
|
|
93
93
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
94
94
|
type: t.LiteralC<import("../WidgetTypes").default.Separator>;
|
|
95
95
|
}>, t.PartialC<{
|
|
96
96
|
config: t.ExactC<t.PartialC<{
|
|
97
|
-
label: t.UnionC<[t.
|
|
97
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
98
98
|
}>>;
|
|
99
99
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
100
100
|
type: t.LiteralC<import("../WidgetTypes").default.Text>;
|
|
101
101
|
}>, t.PartialC<{
|
|
102
|
-
fieldset: t.UnionC<[t.
|
|
102
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
103
103
|
config: t.ExactC<t.PartialC<{
|
|
104
|
-
label: t.UnionC<[t.
|
|
104
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
105
105
|
useAsTitle: t.BooleanC;
|
|
106
106
|
placeholder: t.StringC;
|
|
107
107
|
}>>;
|
|
108
108
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
109
109
|
type: t.LiteralC<import("../WidgetTypes").default.Timestamp>;
|
|
110
110
|
}>, t.PartialC<{
|
|
111
|
-
fieldset: t.UnionC<[t.
|
|
111
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
112
112
|
config: t.ExactC<t.PartialC<{
|
|
113
|
-
label: t.UnionC<[t.
|
|
113
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
114
114
|
placeholder: t.StringC;
|
|
115
115
|
default: t.StringC;
|
|
116
116
|
}>>;
|
|
117
117
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
118
118
|
type: t.LiteralC<import("../WidgetTypes").default.Link>;
|
|
119
119
|
}>, t.PartialC<{
|
|
120
|
-
fieldset: t.UnionC<[t.
|
|
120
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
121
121
|
config: t.ExactC<t.PartialC<{
|
|
122
|
-
label: t.UnionC<[t.
|
|
122
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
123
123
|
useAsTitle: t.BooleanC;
|
|
124
124
|
placeholder: t.StringC;
|
|
125
125
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
@@ -131,27 +131,27 @@ declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
131
131
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
132
132
|
type: t.LiteralC<import("../WidgetTypes").default.Image>;
|
|
133
133
|
}>, t.PartialC<{
|
|
134
|
-
fieldset: t.UnionC<[t.
|
|
134
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
135
135
|
config: t.ExactC<t.PartialC<{
|
|
136
|
-
label: t.UnionC<[t.
|
|
136
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
137
137
|
placeholder: t.StringC;
|
|
138
138
|
constraint: t.PartialC<{
|
|
139
|
-
width: t.Type<number | null,
|
|
140
|
-
height: t.Type<number | null,
|
|
139
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
140
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
141
141
|
}>;
|
|
142
142
|
thumbnails: t.ArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
143
143
|
name: t.StringC;
|
|
144
144
|
}>, t.PartialC<{
|
|
145
|
-
width: t.Type<number | null,
|
|
146
|
-
height: t.Type<number | null,
|
|
145
|
+
width: t.Type<number | null, unknown, unknown>;
|
|
146
|
+
height: t.Type<number | null, unknown, unknown>;
|
|
147
147
|
}>]>>>;
|
|
148
148
|
}>>;
|
|
149
149
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
150
150
|
type: t.LiteralC<import("../WidgetTypes").default.IntegrationField>;
|
|
151
151
|
}>, t.PartialC<{
|
|
152
|
-
fieldset: t.UnionC<[t.
|
|
152
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
153
153
|
config: t.ExactC<t.PartialC<{
|
|
154
|
-
label: t.UnionC<[t.
|
|
154
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
155
155
|
placeholder: t.StringC;
|
|
156
156
|
catalog: t.StringC;
|
|
157
157
|
}>>;
|