@prismicio/types-internal 2.0.0-beta.0 → 2.1.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/lib/common/WidgetKey.d.ts +1 -1
- package/lib/common/WidgetKey.js +1 -1
- package/lib/common/index.js +1 -1
- package/lib/content/Document.d.ts +20 -100
- package/lib/content/Document.js +1 -1
- package/lib/content/LegacyContentCtx.d.ts +2 -2
- package/lib/content/LegacyContentCtx.js +1 -1
- package/lib/content/fields/EmptyContent.d.ts +1 -1
- package/lib/content/fields/EmptyContent.js +1 -1
- package/lib/content/fields/GroupContent.d.ts +8 -28
- package/lib/content/fields/GroupContent.js +1 -1
- package/lib/content/fields/UIDContent.d.ts +1 -1
- package/lib/content/fields/UIDContent.js +1 -1
- package/lib/content/fields/WidgetContent.d.ts +18 -98
- package/lib/content/fields/WidgetContent.js +1 -1
- package/lib/content/fields/index.js +6 -6
- package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
- package/lib/content/fields/nestable/BooleanContent.js +1 -1
- package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
- package/lib/content/fields/nestable/EmbedContent.js +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
- package/lib/content/fields/nestable/FieldContent/index.js +9 -9
- package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
- package/lib/content/fields/nestable/GeoPointContent.js +1 -1
- package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
- package/lib/content/fields/nestable/ImageContent.js +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
- package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
- package/lib/content/fields/nestable/LinkContent.js +1 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +4 -14
- package/lib/content/fields/nestable/NestableContent.js +1 -1
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +11 -31
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +15 -11
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +3 -13
- package/lib/content/fields/nestable/RichTextContent/index.js +3 -3
- package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
- package/lib/content/fields/nestable/SeparatorContent.js +1 -1
- package/lib/content/fields/nestable/index.js +10 -10
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +5 -25
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +2 -12
- package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +5 -25
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +279 -27
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +6 -2
- package/lib/content/fields/slices/Slice/index.d.ts +285 -73
- package/lib/content/fields/slices/Slice/index.js +4 -4
- package/lib/content/fields/slices/SliceItem.d.ts +13 -73
- package/lib/content/fields/slices/SliceItem.js +1 -1
- package/lib/content/fields/slices/SlicesContent.d.ts +14 -74
- package/lib/content/fields/slices/SlicesContent.js +1 -1
- package/lib/content/fields/slices/index.js +3 -3
- package/lib/content/index.js +3 -3
- package/lib/content/utils.d.ts +2 -2
- package/lib/content/utils.js +2 -1
- package/lib/customtypes/CustomType.d.ts +210 -16
- package/lib/customtypes/CustomType.js +7 -2
- package/lib/customtypes/Section.d.ts +198 -16
- package/lib/customtypes/Section.js +1 -1
- package/lib/customtypes/diff/Changes.d.ts +4 -4
- package/lib/customtypes/diff/SharedSlice.d.ts +723 -3
- package/lib/customtypes/diff/Variation.d.ts +709 -3
- package/lib/customtypes/diff/index.js +3 -3
- package/lib/customtypes/index.js +4 -4
- package/lib/customtypes/widgets/Group.d.ts +56 -4
- package/lib/customtypes/widgets/Group.js +1 -1
- package/lib/customtypes/widgets/UID.d.ts +2 -2
- package/lib/customtypes/widgets/UID.js +1 -1
- package/lib/customtypes/widgets/Widget.d.ts +305 -19
- package/lib/customtypes/widgets/Widget.js +1 -1
- package/lib/customtypes/widgets/index.js +6 -6
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
- package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Color.js +1 -1
- package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Date.js +1 -1
- package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Embed.js +1 -1
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
- package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/Image.js +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.d.ts +29 -0
- package/lib/customtypes/widgets/nestable/Link/ContentRelationshipResolver.js +44 -0
- package/lib/customtypes/widgets/nestable/Link/index.d.ts +82 -0
- package/lib/customtypes/widgets/nestable/{Link.js → Link/index.js} +5 -3
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +29 -3
- package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
- package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Number.js +1 -1
- package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Range.js +1 -1
- package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/RichText.js +2 -2
- package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Select.js +1 -1
- package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Separator.js +1 -1
- package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Text.js +1 -1
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
- package/lib/customtypes/widgets/nestable/index.js +16 -16
- package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
- package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +56 -4
- package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +55 -3
- package/lib/customtypes/widgets/slices/LegacySlice.js +1 -1
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +110 -6
- package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
- package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/Slices.d.ts +497 -29
- package/lib/customtypes/widgets/slices/Slices.js +1 -1
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
- package/lib/customtypes/widgets/slices/index.js +7 -7
- package/lib/utils/index.js +2 -2
- package/lib/validators/DateFromString.js +1 -1
- package/lib/validators/DateFromStringOrNumber.js +1 -1
- package/lib/validators/DateFromTsMs.js +1 -1
- package/lib/validators/IntFromNumber.d.ts +2 -2
- package/lib/validators/IntFromNumber.js +1 -1
- package/lib/validators/IntFromPixels.d.ts +2 -2
- package/lib/validators/IntFromPixels.js +1 -1
- package/lib/validators/NonEmptyString.js +1 -1
- package/lib/validators/NonEmptyStringOrNull.js +1 -1
- package/lib/validators/NumberOrNull.js +1 -1
- package/lib/validators/StringFromBoolean.d.ts +2 -2
- package/lib/validators/StringFromBoolean.js +1 -1
- package/lib/validators/StringFromNumber.d.ts +2 -2
- package/lib/validators/StringFromNumber.js +1 -1
- package/lib/validators/StringOrNull.js +1 -1
- package/lib/validators/TrimmedString.d.ts +2 -2
- package/lib/validators/TrimmedString.js +1 -1
- package/lib/validators/function.js +1 -1
- package/lib/validators/index.js +12 -12
- package/package.json +1 -1
- package/src/content/fields/nestable/RichTextContent/Blocks.ts +31 -23
- package/src/content/fields/nestable/RichTextContent/index.ts +1 -3
- package/src/content/fields/slices/Slice/SimpleSliceContent.ts +4 -1
- package/src/customtypes/CustomType.ts +6 -0
- package/src/customtypes/widgets/nestable/Link/ContentRelationshipResolver.ts +69 -0
- package/src/customtypes/widgets/nestable/{Link.ts → Link/index.ts} +5 -2
- package/lib/customtypes/widgets/nestable/Link.d.ts +0 -29
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Color = exports.ColorConfig = exports.ColorFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.ColorFieldType = "Color";
|
|
8
8
|
exports.ColorConfig = t.exact(t.partial({
|
|
@@ -5,7 +5,7 @@ export declare const DateConfig: t.ExactC<t.PartialC<{
|
|
|
5
5
|
placeholder: t.StringC;
|
|
6
6
|
default: t.StringC;
|
|
7
7
|
}>>;
|
|
8
|
-
export type DateConfig = t.TypeOf<typeof DateConfig>;
|
|
8
|
+
export declare type DateConfig = t.TypeOf<typeof DateConfig>;
|
|
9
9
|
export declare const Date: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
10
10
|
type: t.LiteralC<"Date">;
|
|
11
11
|
}>, t.PartialC<{
|
|
@@ -16,4 +16,4 @@ export declare const Date: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
16
16
|
default: t.StringC;
|
|
17
17
|
}>>;
|
|
18
18
|
}>]>>;
|
|
19
|
-
export type Date = t.TypeOf<typeof Date>;
|
|
19
|
+
export declare type Date = t.TypeOf<typeof Date>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Date = exports.DateConfig = exports.DateFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.DateFieldType = "Date";
|
|
8
8
|
exports.DateConfig = t.exact(t.partial({
|
|
@@ -5,7 +5,7 @@ export declare const EmbedConfig: t.ExactC<t.PartialC<{
|
|
|
5
5
|
placeholder: t.StringC;
|
|
6
6
|
useAsTitle: t.BooleanC;
|
|
7
7
|
}>>;
|
|
8
|
-
export type EmbedConfig = t.TypeOf<typeof EmbedConfig>;
|
|
8
|
+
export declare type EmbedConfig = t.TypeOf<typeof EmbedConfig>;
|
|
9
9
|
export declare const Embed: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
10
10
|
type: t.LiteralC<"Embed">;
|
|
11
11
|
}>, t.PartialC<{
|
|
@@ -16,4 +16,4 @@ export declare const Embed: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
16
16
|
useAsTitle: t.BooleanC;
|
|
17
17
|
}>>;
|
|
18
18
|
}>]>>;
|
|
19
|
-
export type Embed = t.TypeOf<typeof Embed>;
|
|
19
|
+
export declare type Embed = t.TypeOf<typeof Embed>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Embed = exports.EmbedConfig = exports.EmbedFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.EmbedFieldType = "Embed";
|
|
8
8
|
exports.EmbedConfig = t.exact(t.partial({
|
|
@@ -3,7 +3,7 @@ export declare const GeoPointFieldType = "GeoPoint";
|
|
|
3
3
|
export declare const GeoPointConfig: t.ExactC<t.PartialC<{
|
|
4
4
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
5
5
|
}>>;
|
|
6
|
-
export type GeoPointConfig = t.TypeOf<typeof GeoPointConfig>;
|
|
6
|
+
export declare type GeoPointConfig = t.TypeOf<typeof GeoPointConfig>;
|
|
7
7
|
export declare const GeoPoint: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
8
8
|
type: t.LiteralC<"GeoPoint">;
|
|
9
9
|
}>, t.PartialC<{
|
|
@@ -12,4 +12,4 @@ export declare const GeoPoint: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
12
12
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
13
13
|
}>>;
|
|
14
14
|
}>]>>;
|
|
15
|
-
export type GeoPoint = t.TypeOf<typeof GeoPoint>;
|
|
15
|
+
export declare type GeoPoint = t.TypeOf<typeof GeoPoint>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GeoPoint = exports.GeoPointConfig = exports.GeoPointFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.GeoPointFieldType = "GeoPoint";
|
|
8
8
|
exports.GeoPointConfig = t.exact(t.partial({
|
|
@@ -6,7 +6,7 @@ export declare const Thumbnail: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
6
6
|
width: t.Type<number | null, unknown, unknown>;
|
|
7
7
|
height: t.Type<number | null, unknown, unknown>;
|
|
8
8
|
}>]>>;
|
|
9
|
-
export type Thumbnail = t.TypeOf<typeof Thumbnail>;
|
|
9
|
+
export declare type Thumbnail = t.TypeOf<typeof Thumbnail>;
|
|
10
10
|
export declare const ImageConfig: t.ExactC<t.PartialC<{
|
|
11
11
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
12
12
|
placeholder: t.StringC;
|
|
@@ -21,7 +21,7 @@ export declare const ImageConfig: t.ExactC<t.PartialC<{
|
|
|
21
21
|
height: t.Type<number | null, unknown, unknown>;
|
|
22
22
|
}>]>>>;
|
|
23
23
|
}>>;
|
|
24
|
-
export type ImageConfig = t.TypeOf<typeof ImageConfig>;
|
|
24
|
+
export declare type ImageConfig = t.TypeOf<typeof ImageConfig>;
|
|
25
25
|
export declare const Image: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
26
26
|
type: t.LiteralC<"Image">;
|
|
27
27
|
}>, t.PartialC<{
|
|
@@ -41,4 +41,4 @@ export declare const Image: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
41
41
|
}>]>>>;
|
|
42
42
|
}>>;
|
|
43
43
|
}>]>>;
|
|
44
|
-
export type Image = t.TypeOf<typeof Image>;
|
|
44
|
+
export declare type Image = t.TypeOf<typeof Image>;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Image = exports.ImageConfig = exports.Thumbnail = exports.ImageFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
|
-
const ImageConstraint_1 = tslib_1.__importDefault(require("../shared/ImageConstraint"));
|
|
7
|
+
const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
|
|
8
8
|
exports.ImageFieldType = "Image";
|
|
9
9
|
exports.Thumbnail = t.exact(t.intersection([
|
|
10
10
|
t.type({
|
|
@@ -5,7 +5,7 @@ export declare const IntegrationFieldConfig: t.ExactC<t.PartialC<{
|
|
|
5
5
|
placeholder: t.StringC;
|
|
6
6
|
catalog: t.StringC;
|
|
7
7
|
}>>;
|
|
8
|
-
export type IntegrationFieldConfig = t.TypeOf<typeof IntegrationFieldConfig>;
|
|
8
|
+
export declare type IntegrationFieldConfig = t.TypeOf<typeof IntegrationFieldConfig>;
|
|
9
9
|
export declare const IntegrationField: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
10
10
|
type: t.LiteralC<"IntegrationFields">;
|
|
11
11
|
}>, t.PartialC<{
|
|
@@ -16,4 +16,4 @@ export declare const IntegrationField: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
16
16
|
catalog: t.StringC;
|
|
17
17
|
}>>;
|
|
18
18
|
}>]>>;
|
|
19
|
-
export type IntegrationField = t.TypeOf<typeof IntegrationField>;
|
|
19
|
+
export declare type IntegrationField = t.TypeOf<typeof IntegrationField>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IntegrationField = exports.IntegrationFieldConfig = exports.IntegrationFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.IntegrationFieldType = "IntegrationFields";
|
|
8
8
|
exports.IntegrationFieldConfig = t.exact(t.partial({
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const ContentRelationShipResolver: t.ReadonlyArrayC<t.Type<{
|
|
3
|
+
customTypeId: string;
|
|
4
|
+
} & {
|
|
5
|
+
fields?: readonly ({
|
|
6
|
+
fieldId: string;
|
|
7
|
+
} & {
|
|
8
|
+
customTypes?: readonly {
|
|
9
|
+
customTypeId: string;
|
|
10
|
+
fields: readonly {
|
|
11
|
+
fieldId: string;
|
|
12
|
+
}[];
|
|
13
|
+
}[];
|
|
14
|
+
})[];
|
|
15
|
+
}, {
|
|
16
|
+
customTypeId: string;
|
|
17
|
+
} & {
|
|
18
|
+
fields?: readonly ({
|
|
19
|
+
fieldId: string;
|
|
20
|
+
} & {
|
|
21
|
+
customTypes?: readonly {
|
|
22
|
+
customTypeId: string;
|
|
23
|
+
fields: readonly {
|
|
24
|
+
fieldId: string;
|
|
25
|
+
}[];
|
|
26
|
+
}[];
|
|
27
|
+
})[];
|
|
28
|
+
}, unknown>>;
|
|
29
|
+
export declare type ContentRelationShipResolver = t.TypeOf<typeof ContentRelationShipResolver>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentRelationShipResolver = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fp_ts_1 = require("fp-ts");
|
|
6
|
+
const function_1 = require("fp-ts/function");
|
|
7
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
8
|
+
// This allow to parse an element that is either a string or a type T and convert the string to T if necessary so we get a consistent output.
|
|
9
|
+
const StringOrT = (codec) => {
|
|
10
|
+
return (asObject) => new t.Type("StringOrT", (u) => u instanceof Object, (u) => {
|
|
11
|
+
return (0, function_1.pipe)(t.union([t.string, codec]).decode(u), fp_ts_1.either.map((decoded) => {
|
|
12
|
+
if (typeof decoded === "string")
|
|
13
|
+
return asObject(decoded);
|
|
14
|
+
return decoded;
|
|
15
|
+
}));
|
|
16
|
+
}, (f) => f);
|
|
17
|
+
};
|
|
18
|
+
/*
|
|
19
|
+
* The models have slight differences if they are nested or not to avoid recursion and so an infinite level of nesting which would be incompatible with the Content API mechanism to resolve nested content.
|
|
20
|
+
*/
|
|
21
|
+
const SimpleFieldResolver = StringOrT(t.type({
|
|
22
|
+
fieldId: t.string,
|
|
23
|
+
}))((id) => ({ fieldId: id }));
|
|
24
|
+
const NestedCustomTypeResolver = t.type({
|
|
25
|
+
customTypeId: t.string,
|
|
26
|
+
fields: t.readonlyArray(SimpleFieldResolver),
|
|
27
|
+
});
|
|
28
|
+
const FieldResolver = StringOrT(t.intersection([
|
|
29
|
+
t.type({
|
|
30
|
+
fieldId: t.string,
|
|
31
|
+
}),
|
|
32
|
+
t.partial({
|
|
33
|
+
customTypes: t.readonlyArray(NestedCustomTypeResolver),
|
|
34
|
+
}),
|
|
35
|
+
]))((id) => ({ fieldId: id }));
|
|
36
|
+
const CustomTypeResolver = StringOrT(t.intersection([
|
|
37
|
+
t.type({
|
|
38
|
+
customTypeId: t.string,
|
|
39
|
+
}),
|
|
40
|
+
t.partial({
|
|
41
|
+
fields: t.readonlyArray(FieldResolver),
|
|
42
|
+
}),
|
|
43
|
+
]))((id) => ({ customTypeId: id }));
|
|
44
|
+
exports.ContentRelationShipResolver = t.readonlyArray(CustomTypeResolver);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
export declare const LinkFieldType = "Link";
|
|
3
|
+
export declare const LinkConfig: t.ExactC<t.PartialC<{
|
|
4
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
5
|
+
useAsTitle: t.BooleanC;
|
|
6
|
+
placeholder: t.StringC;
|
|
7
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
8
|
+
customtypes: t.ReadonlyArrayC<t.Type<{
|
|
9
|
+
customTypeId: string;
|
|
10
|
+
} & {
|
|
11
|
+
fields?: readonly ({
|
|
12
|
+
fieldId: string;
|
|
13
|
+
} & {
|
|
14
|
+
customTypes?: readonly {
|
|
15
|
+
customTypeId: string;
|
|
16
|
+
fields: readonly {
|
|
17
|
+
fieldId: string;
|
|
18
|
+
}[];
|
|
19
|
+
}[];
|
|
20
|
+
})[];
|
|
21
|
+
}, {
|
|
22
|
+
customTypeId: string;
|
|
23
|
+
} & {
|
|
24
|
+
fields?: readonly ({
|
|
25
|
+
fieldId: string;
|
|
26
|
+
} & {
|
|
27
|
+
customTypes?: readonly {
|
|
28
|
+
customTypeId: string;
|
|
29
|
+
fields: readonly {
|
|
30
|
+
fieldId: string;
|
|
31
|
+
}[];
|
|
32
|
+
}[];
|
|
33
|
+
})[];
|
|
34
|
+
}, unknown>>;
|
|
35
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
36
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
37
|
+
allowTargetBlank: t.BooleanC;
|
|
38
|
+
}>>;
|
|
39
|
+
export declare type LinkConfig = t.TypeOf<typeof LinkConfig>;
|
|
40
|
+
export declare const Link: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
41
|
+
type: t.LiteralC<"Link">;
|
|
42
|
+
}>, t.PartialC<{
|
|
43
|
+
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
44
|
+
config: t.ExactC<t.PartialC<{
|
|
45
|
+
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
46
|
+
useAsTitle: t.BooleanC;
|
|
47
|
+
placeholder: t.StringC;
|
|
48
|
+
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
49
|
+
customtypes: t.ReadonlyArrayC<t.Type<{
|
|
50
|
+
customTypeId: string;
|
|
51
|
+
} & {
|
|
52
|
+
fields?: readonly ({
|
|
53
|
+
fieldId: string;
|
|
54
|
+
} & {
|
|
55
|
+
customTypes?: readonly {
|
|
56
|
+
customTypeId: string;
|
|
57
|
+
fields: readonly {
|
|
58
|
+
fieldId: string;
|
|
59
|
+
}[];
|
|
60
|
+
}[];
|
|
61
|
+
})[];
|
|
62
|
+
}, {
|
|
63
|
+
customTypeId: string;
|
|
64
|
+
} & {
|
|
65
|
+
fields?: readonly ({
|
|
66
|
+
fieldId: string;
|
|
67
|
+
} & {
|
|
68
|
+
customTypes?: readonly {
|
|
69
|
+
customTypeId: string;
|
|
70
|
+
fields: readonly {
|
|
71
|
+
fieldId: string;
|
|
72
|
+
}[];
|
|
73
|
+
}[];
|
|
74
|
+
})[];
|
|
75
|
+
}, unknown>>;
|
|
76
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
77
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
78
|
+
allowTargetBlank: t.BooleanC;
|
|
79
|
+
}>>;
|
|
80
|
+
}>]>>;
|
|
81
|
+
export declare type Link = t.TypeOf<typeof Link>;
|
|
82
|
+
export * from "./ContentRelationshipResolver";
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Link = exports.LinkConfig = exports.LinkFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Either_1 = require("fp-ts/lib/Either");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
const withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
8
|
-
const validators_1 = require("
|
|
8
|
+
const validators_1 = require("../../../../validators");
|
|
9
|
+
const ContentRelationshipResolver_1 = require("./ContentRelationshipResolver");
|
|
9
10
|
const arrayString = (entries) => {
|
|
10
11
|
if (entries instanceof Array) {
|
|
11
12
|
const isValidEntries = entries.reduce((acc, l) => acc && typeof l === "string", true);
|
|
@@ -38,7 +39,7 @@ exports.LinkConfig = t.exact(t.partial({
|
|
|
38
39
|
t.literal("web"),
|
|
39
40
|
t.null,
|
|
40
41
|
]), null),
|
|
41
|
-
customtypes:
|
|
42
|
+
customtypes: ContentRelationshipResolver_1.ContentRelationShipResolver,
|
|
42
43
|
masks: MasksArrayString,
|
|
43
44
|
tags: MasksArrayString,
|
|
44
45
|
allowTargetBlank: t.boolean,
|
|
@@ -52,3 +53,4 @@ exports.Link = t.exact(t.intersection([
|
|
|
52
53
|
config: exports.LinkConfig,
|
|
53
54
|
}),
|
|
54
55
|
]));
|
|
56
|
+
(0, tslib_1.__exportStar)(require("./ContentRelationshipResolver"), exports);
|
|
@@ -123,7 +123,33 @@ export declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC
|
|
|
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]>;
|
|
126
|
-
customtypes: t.ReadonlyArrayC<t.
|
|
126
|
+
customtypes: t.ReadonlyArrayC<t.Type<{
|
|
127
|
+
customTypeId: string;
|
|
128
|
+
} & {
|
|
129
|
+
fields?: readonly ({
|
|
130
|
+
fieldId: string;
|
|
131
|
+
} & {
|
|
132
|
+
customTypes?: readonly {
|
|
133
|
+
customTypeId: string;
|
|
134
|
+
fields: readonly {
|
|
135
|
+
fieldId: string;
|
|
136
|
+
}[];
|
|
137
|
+
}[];
|
|
138
|
+
})[];
|
|
139
|
+
}, {
|
|
140
|
+
customTypeId: string;
|
|
141
|
+
} & {
|
|
142
|
+
fields?: readonly ({
|
|
143
|
+
fieldId: string;
|
|
144
|
+
} & {
|
|
145
|
+
customTypes?: readonly {
|
|
146
|
+
customTypeId: string;
|
|
147
|
+
fields: readonly {
|
|
148
|
+
fieldId: string;
|
|
149
|
+
}[];
|
|
150
|
+
}[];
|
|
151
|
+
})[];
|
|
152
|
+
}, unknown>>;
|
|
127
153
|
masks: t.Type<readonly string[], object, unknown>;
|
|
128
154
|
tags: t.Type<readonly string[], object, unknown>;
|
|
129
155
|
allowTargetBlank: t.BooleanC;
|
|
@@ -156,5 +182,5 @@ export declare const NestableWidget: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC
|
|
|
156
182
|
catalog: t.StringC;
|
|
157
183
|
}>>;
|
|
158
184
|
}>]>>]>;
|
|
159
|
-
export type NestableWidget = t.TypeOf<typeof NestableWidget>;
|
|
160
|
-
export type NestableFieldTypes = NestableWidget["type"];
|
|
185
|
+
export declare type NestableWidget = t.TypeOf<typeof NestableWidget>;
|
|
186
|
+
export declare type NestableFieldTypes = NestableWidget["type"];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NestableWidget = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const BooleanField_1 = require("./BooleanField");
|
|
7
7
|
const Color_1 = require("./Color");
|
|
8
8
|
const Date_1 = require("./Date");
|
|
@@ -7,7 +7,7 @@ export declare const NumberConfig: t.ExactC<t.PartialC<{
|
|
|
7
7
|
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
8
8
|
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
9
9
|
}>>;
|
|
10
|
-
export type NumberConfig = t.TypeOf<typeof NumberConfig>;
|
|
10
|
+
export declare type NumberConfig = t.TypeOf<typeof NumberConfig>;
|
|
11
11
|
export declare const Number: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
12
12
|
type: t.LiteralC<"Number">;
|
|
13
13
|
}>, t.PartialC<{
|
|
@@ -20,4 +20,4 @@ export declare const Number: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
20
20
|
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
21
21
|
}>>;
|
|
22
22
|
}>]>>;
|
|
23
|
-
export type Number = t.TypeOf<typeof Number>;
|
|
23
|
+
export declare type Number = t.TypeOf<typeof Number>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Number = exports.NumberConfig = exports.NumberFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const NumberFromString_1 = require("io-ts-types/lib/NumberFromString");
|
|
7
7
|
const validators_1 = require("../../../validators");
|
|
8
8
|
exports.NumberFieldType = "Number";
|
|
@@ -7,7 +7,7 @@ export declare const RangeConfig: t.ExactC<t.PartialC<{
|
|
|
7
7
|
max: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
8
8
|
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
9
9
|
}>>;
|
|
10
|
-
export type RangeConfig = t.TypeOf<typeof RangeConfig>;
|
|
10
|
+
export declare type RangeConfig = t.TypeOf<typeof RangeConfig>;
|
|
11
11
|
export declare const Range: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
12
12
|
type: t.LiteralC<"Range">;
|
|
13
13
|
}>, t.PartialC<{
|
|
@@ -20,4 +20,4 @@ export declare const Range: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
20
20
|
step: t.UnionC<[t.NumberC, import("io-ts-types/lib/NumberFromString").NumberFromStringC]>;
|
|
21
21
|
}>>;
|
|
22
22
|
}>]>>;
|
|
23
|
-
export type Range = t.TypeOf<typeof Range>;
|
|
23
|
+
export declare type Range = t.TypeOf<typeof Range>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Range = exports.RangeConfig = exports.RangeFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const NumberFromString_1 = require("io-ts-types/lib/NumberFromString");
|
|
7
7
|
const validators_1 = require("../../../validators");
|
|
8
8
|
exports.RangeFieldType = "Range";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
export declare const RichTextFieldType = "StructuredText";
|
|
3
3
|
export declare const DEFAULT_OPTION = "paragraph";
|
|
4
|
-
export type RichTextNodeType = typeof RichTextNodeType[keyof typeof RichTextNodeType];
|
|
4
|
+
export declare type RichTextNodeType = typeof RichTextNodeType[keyof typeof RichTextNodeType];
|
|
5
5
|
export declare const RichTextNodeType: {
|
|
6
6
|
readonly heading1: "heading1";
|
|
7
7
|
readonly heading2: "heading2";
|
|
@@ -51,7 +51,7 @@ export declare const RichTextConfig: t.ExactC<t.PartialC<{
|
|
|
51
51
|
labels: t.Type<readonly string[], object, unknown>;
|
|
52
52
|
allowTargetBlank: t.BooleanC;
|
|
53
53
|
}>>;
|
|
54
|
-
export type RichTextConfig = t.TypeOf<typeof RichTextConfig>;
|
|
54
|
+
export declare type RichTextConfig = t.TypeOf<typeof RichTextConfig>;
|
|
55
55
|
export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
56
56
|
type: t.LiteralC<"StructuredText">;
|
|
57
57
|
}>, t.PartialC<{
|
|
@@ -70,4 +70,4 @@ export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
70
70
|
allowTargetBlank: t.BooleanC;
|
|
71
71
|
}>>;
|
|
72
72
|
}>]>>;
|
|
73
|
-
export type RichText = t.TypeOf<typeof RichText>;
|
|
73
|
+
export declare type RichText = t.TypeOf<typeof RichText>;
|
|
@@ -5,9 +5,9 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const fp_ts_1 = require("fp-ts/");
|
|
6
6
|
const Either_1 = require("fp-ts/lib/Either");
|
|
7
7
|
const function_1 = require("fp-ts/lib/function");
|
|
8
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
9
9
|
const validators_1 = require("../../../validators");
|
|
10
|
-
const ImageConstraint_1 = tslib_1.__importDefault(require("../shared/ImageConstraint"));
|
|
10
|
+
const ImageConstraint_1 = (0, tslib_1.__importDefault)(require("../shared/ImageConstraint"));
|
|
11
11
|
exports.RichTextFieldType = "StructuredText";
|
|
12
12
|
exports.DEFAULT_OPTION = "paragraph";
|
|
13
13
|
exports.RichTextNodeType = {
|
|
@@ -6,7 +6,7 @@ export declare const SelectConfig: t.ExactC<t.PartialC<{
|
|
|
6
6
|
default_value: t.StringC;
|
|
7
7
|
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
8
8
|
}>>;
|
|
9
|
-
export type SelectConfig = t.TypeOf<typeof SelectConfig>;
|
|
9
|
+
export declare type SelectConfig = t.TypeOf<typeof SelectConfig>;
|
|
10
10
|
export declare const Select: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
11
11
|
type: t.LiteralC<"Select">;
|
|
12
12
|
}>, t.PartialC<{
|
|
@@ -18,4 +18,4 @@ export declare const Select: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
18
18
|
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
19
19
|
}>>;
|
|
20
20
|
}>]>>;
|
|
21
|
-
export type Select = t.TypeOf<typeof Select>;
|
|
21
|
+
export declare type Select = t.TypeOf<typeof Select>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Select = exports.SelectConfig = exports.SelectFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.SelectFieldType = "Select";
|
|
8
8
|
exports.SelectConfig = t.exact(t.partial({
|
|
@@ -3,7 +3,7 @@ export declare const SeparatorFieldType = "Separator";
|
|
|
3
3
|
export declare const SeparatorConfig: t.ExactC<t.PartialC<{
|
|
4
4
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
5
5
|
}>>;
|
|
6
|
-
export type SeparatorConfig = t.TypeOf<typeof SeparatorConfig>;
|
|
6
|
+
export declare type SeparatorConfig = t.TypeOf<typeof SeparatorConfig>;
|
|
7
7
|
export declare const Separator: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
8
8
|
type: t.LiteralC<"Separator">;
|
|
9
9
|
}>, t.PartialC<{
|
|
@@ -11,4 +11,4 @@ export declare const Separator: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
11
11
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
12
12
|
}>>;
|
|
13
13
|
}>]>>;
|
|
14
|
-
export type Separator = t.TypeOf<typeof Separator>;
|
|
14
|
+
export declare type Separator = t.TypeOf<typeof Separator>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Separator = exports.SeparatorConfig = exports.SeparatorFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.SeparatorFieldType = "Separator";
|
|
8
8
|
exports.SeparatorConfig = t.exact(t.partial({
|
|
@@ -5,7 +5,7 @@ export declare const TextConfig: t.ExactC<t.PartialC<{
|
|
|
5
5
|
useAsTitle: t.BooleanC;
|
|
6
6
|
placeholder: t.StringC;
|
|
7
7
|
}>>;
|
|
8
|
-
export type TextConfig = t.TypeOf<typeof TextConfig>;
|
|
8
|
+
export declare type TextConfig = t.TypeOf<typeof TextConfig>;
|
|
9
9
|
export declare const Text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
10
10
|
type: t.LiteralC<"Text">;
|
|
11
11
|
}>, t.PartialC<{
|
|
@@ -16,4 +16,4 @@ export declare const Text: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
16
16
|
placeholder: t.StringC;
|
|
17
17
|
}>>;
|
|
18
18
|
}>]>>;
|
|
19
|
-
export type Text = t.TypeOf<typeof Text>;
|
|
19
|
+
export declare type Text = t.TypeOf<typeof Text>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Text = exports.TextConfig = exports.TextFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.TextFieldType = "Text";
|
|
8
8
|
exports.TextConfig = t.exact(t.partial({
|
|
@@ -5,7 +5,7 @@ export declare const TimestampConfig: t.ExactC<t.PartialC<{
|
|
|
5
5
|
placeholder: t.StringC;
|
|
6
6
|
default: t.StringC;
|
|
7
7
|
}>>;
|
|
8
|
-
export type TimestampConfig = t.TypeOf<typeof TimestampConfig>;
|
|
8
|
+
export declare type TimestampConfig = t.TypeOf<typeof TimestampConfig>;
|
|
9
9
|
export declare const Timestamp: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
10
10
|
type: t.LiteralC<"Timestamp">;
|
|
11
11
|
}>, t.PartialC<{
|
|
@@ -16,4 +16,4 @@ export declare const Timestamp: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
16
16
|
default: t.StringC;
|
|
17
17
|
}>>;
|
|
18
18
|
}>]>>;
|
|
19
|
-
export type Timestamp = t.TypeOf<typeof Timestamp>;
|
|
19
|
+
export declare type Timestamp = t.TypeOf<typeof Timestamp>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Timestamp = exports.TimestampConfig = exports.TimestampFieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
7
|
exports.TimestampFieldType = "Timestamp";
|
|
8
8
|
exports.TimestampConfig = t.exact(t.partial({
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./BooleanField"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Color"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./Date"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./Embed"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./GeoPoint"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./Image"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./IntegrationField"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./Link"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./NestableWidget"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./Number"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./Range"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./RichText"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./Select"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./Separator"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./Text"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./Timestamp"), exports);
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./BooleanField"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./Color"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./Date"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./Embed"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./GeoPoint"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./Image"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./IntegrationField"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./Link"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./NestableWidget"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./Number"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./Range"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./RichText"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./Select"), exports);
|
|
17
|
+
(0, tslib_1.__exportStar)(require("./Separator"), exports);
|
|
18
|
+
(0, tslib_1.__exportStar)(require("./Text"), exports);
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./Timestamp"), exports);
|
|
@@ -3,5 +3,5 @@ declare const ImageConstraint: t.PartialC<{
|
|
|
3
3
|
width: t.Type<number | null, unknown, unknown>;
|
|
4
4
|
height: t.Type<number | null, unknown, unknown>;
|
|
5
5
|
}>;
|
|
6
|
-
type ImageConstraint = t.TypeOf<typeof ImageConstraint>;
|
|
6
|
+
declare type ImageConstraint = t.TypeOf<typeof ImageConstraint>;
|
|
7
7
|
export default ImageConstraint;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/lib/Either");
|
|
5
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
6
6
|
const IntFromString_1 = require("io-ts-types/lib/IntFromString");
|
|
7
7
|
const validators_1 = require("../../../validators");
|
|
8
8
|
const SideConstraint = new t.Type("SideConstraints", (u) => {
|