@prismicio/types-internal 2.0.0-beta.0 → 2.0.0-beta.1
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 +14 -2
- package/lib/customtypes/CustomType.js +7 -2
- package/lib/customtypes/Section.d.ts +2 -2
- package/lib/customtypes/Section.js +1 -1
- package/lib/customtypes/diff/Changes.d.ts +4 -4
- package/lib/customtypes/diff/SharedSlice.d.ts +671 -3
- package/lib/customtypes/diff/Variation.d.ts +657 -3
- package/lib/customtypes/diff/index.js +3 -3
- package/lib/customtypes/index.js +4 -4
- package/lib/customtypes/widgets/Group.d.ts +2 -2
- 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 +3 -3
- 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/index.js +56 -0
- package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Link.js +1 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -2
- 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 +2 -2
- package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.js +1 -1
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -2
- 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 +5 -5
- 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
|
@@ -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) => {
|
|
@@ -3,7 +3,7 @@ export declare const CompositeSliceType = "Slice";
|
|
|
3
3
|
export declare const CompositeSliceConfig: t.ExactC<t.PartialC<{
|
|
4
4
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
5
5
|
}>>;
|
|
6
|
-
export type CompositeSliceConfig = t.TypeOf<typeof CompositeSliceConfig>;
|
|
6
|
+
export declare type CompositeSliceConfig = t.TypeOf<typeof CompositeSliceConfig>;
|
|
7
7
|
export declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
8
8
|
type: t.LiteralC<"Slice">;
|
|
9
9
|
}>, t.PartialC<{
|
|
@@ -329,4 +329,4 @@ export declare const CompositeSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
329
329
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
330
330
|
}>>;
|
|
331
331
|
}>]>>;
|
|
332
|
-
export type CompositeSlice = t.TypeOf<typeof CompositeSlice>;
|
|
332
|
+
export declare type CompositeSlice = t.TypeOf<typeof CompositeSlice>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CompositeSlice = exports.CompositeSliceConfig = exports.CompositeSliceType = 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 common_1 = require("../../../common");
|
|
7
7
|
const validators_1 = require("../../../validators");
|
|
8
8
|
const NestableWidget_1 = require("../nestable/NestableWidget");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LegacySlice = 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 Group_1 = require("../Group");
|
|
7
7
|
const NestableWidget_1 = require("../nestable/NestableWidget");
|
|
8
8
|
exports.LegacySlice = t.union([NestableWidget_1.NestableWidget, Group_1.Group]);
|
|
@@ -323,7 +323,7 @@ export declare const Variation: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
323
323
|
}>>;
|
|
324
324
|
}>]>>]>>;
|
|
325
325
|
}>]>>;
|
|
326
|
-
export type Variation = t.TypeOf<typeof Variation>;
|
|
326
|
+
export declare type Variation = t.TypeOf<typeof Variation>;
|
|
327
327
|
export declare const SharedSliceType = "SharedSlice";
|
|
328
328
|
export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
329
329
|
id: t.StringC;
|
|
@@ -656,4 +656,4 @@ export declare const SharedSlice: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
656
656
|
}>, t.PartialC<{
|
|
657
657
|
description: t.StringC;
|
|
658
658
|
}>]>>;
|
|
659
|
-
export type SharedSlice = t.TypeOf<typeof SharedSlice>;
|
|
659
|
+
export declare type SharedSlice = t.TypeOf<typeof SharedSlice>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SharedSlice = exports.SharedSliceType = exports.Variation = 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 withFallback_1 = require("io-ts-types/lib/withFallback");
|
|
7
7
|
const common_1 = require("../../../common");
|
|
8
8
|
const NestableWidget_1 = require("../nestable/NestableWidget");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SharedSliceRef = 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 SharedSlice_1 = require("./SharedSlice");
|
|
7
7
|
exports.SharedSliceRef = t.exact(t.type({
|
|
8
8
|
type: t.literal(SharedSlice_1.SharedSliceType),
|
|
@@ -2,5 +2,5 @@ import type { CompositeSlice } from "./CompositeSlice";
|
|
|
2
2
|
import type { LegacySlice } from "./LegacySlice";
|
|
3
3
|
import type { SharedSlice } from "./SharedSlice";
|
|
4
4
|
import type { SharedSliceRef } from "./SharedSliceRef";
|
|
5
|
-
export type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
|
|
6
|
-
export type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
|
|
5
|
+
export declare type DynamicSlice = CompositeSlice | LegacySlice | SharedSliceRef;
|
|
6
|
+
export declare type StaticSlice = CompositeSlice | LegacySlice | SharedSlice;
|
|
@@ -8,7 +8,7 @@ export declare const SlicesLabels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArra
|
|
|
8
8
|
}>, t.PartialC<{
|
|
9
9
|
display: t.StringC;
|
|
10
10
|
}>]>>>>, t.NullC]>;
|
|
11
|
-
export type SlicesLabels = t.TypeOf<typeof SlicesLabels>;
|
|
11
|
+
export declare type SlicesLabels = t.TypeOf<typeof SlicesLabels>;
|
|
12
12
|
export declare function slicesConfigReader<T extends SharedSlice | SharedSliceRef>(codec: t.Type<T, unknown>): t.ExactC<t.PartialC<{
|
|
13
13
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
14
14
|
labels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -1655,7 +1655,7 @@ export declare const StaticSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
1655
1655
|
description?: string;
|
|
1656
1656
|
}, unknown, unknown>]>>;
|
|
1657
1657
|
}>>;
|
|
1658
|
-
export type StaticSlicesConfig = t.TypeOf<typeof StaticSlicesConfig>;
|
|
1658
|
+
export declare type StaticSlicesConfig = t.TypeOf<typeof StaticSlicesConfig>;
|
|
1659
1659
|
export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
1660
1660
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
1661
1661
|
labels: t.UnionC<[t.RecordC<t.StringC, t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
@@ -2314,7 +2314,7 @@ export declare const DynamicSlicesConfig: t.ExactC<t.PartialC<{
|
|
|
2314
2314
|
type: "SharedSlice";
|
|
2315
2315
|
}, unknown, unknown>]>>;
|
|
2316
2316
|
}>>;
|
|
2317
|
-
export type DynamicSlicesConfig = t.TypeOf<typeof DynamicSlicesConfig>;
|
|
2317
|
+
export declare type DynamicSlicesConfig = t.TypeOf<typeof DynamicSlicesConfig>;
|
|
2318
2318
|
export declare function slicesReader<T extends StaticSlicesConfig | DynamicSlicesConfig>(codec: t.Type<T, unknown>): t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
2319
2319
|
type: t.KeyofC<{
|
|
2320
2320
|
Slices: null;
|
|
@@ -3332,7 +3332,7 @@ export declare const StaticSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
3332
3332
|
};
|
|
3333
3333
|
}, unknown, unknown>;
|
|
3334
3334
|
}>]>>;
|
|
3335
|
-
export type StaticSlices = t.TypeOf<typeof StaticSlices>;
|
|
3335
|
+
export declare type StaticSlices = t.TypeOf<typeof StaticSlices>;
|
|
3336
3336
|
export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
3337
3337
|
type: t.KeyofC<{
|
|
3338
3338
|
Slices: null;
|
|
@@ -4009,7 +4009,7 @@ export declare const DynamicSlices: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
4009
4009
|
};
|
|
4010
4010
|
}, unknown, unknown>;
|
|
4011
4011
|
}>]>>;
|
|
4012
|
-
export type DynamicSlices = t.TypeOf<typeof DynamicSlices>;
|
|
4012
|
+
export declare type DynamicSlices = t.TypeOf<typeof DynamicSlices>;
|
|
4013
4013
|
export declare const Slices: {
|
|
4014
4014
|
toStatic(slices: DynamicSlices, sharedSlices: Map<string, SharedSlice>): StaticSlices;
|
|
4015
4015
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Slices = exports.DynamicSlices = exports.StaticSlices = exports.slicesReader = exports.DynamicSlicesConfig = exports.StaticSlicesConfig = exports.slicesConfigReader = exports.SlicesLabels = exports.SlicesFieldType = exports.LegacySlicesFieldType = 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 common_1 = require("../../../common");
|
|
7
7
|
const validators_1 = require("../../../validators");
|
|
8
8
|
const CompositeSlice_1 = require("./CompositeSlice");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SlicesTypes = 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 CompositeSlice_1 = require("./CompositeSlice");
|
|
7
7
|
const SharedSlice_1 = require("./SharedSlice");
|
|
8
8
|
exports.SlicesTypes = t.keyof({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./CompositeSlice"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./LegacySlice"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./SharedSlice"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./SharedSliceRef"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./Slice"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./Slices"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./SlicesTypes"), exports);
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./CompositeSlice"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./LegacySlice"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./SharedSlice"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./SharedSliceRef"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./Slice"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./Slices"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./SlicesTypes"), exports);
|
package/lib/utils/index.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Objects = exports.Arrays = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
exports.Arrays = tslib_1.__importStar(require("./Arrays"));
|
|
6
|
-
exports.Objects = tslib_1.__importStar(require("./Objects"));
|
|
5
|
+
exports.Arrays = (0, tslib_1.__importStar)(require("./Arrays"));
|
|
6
|
+
exports.Objects = (0, tslib_1.__importStar)(require("./Objects"));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
exports.default = new t.Type("dateFromString", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.string.validate(u, c), (0, Either_1.chain)((s) => {
|
|
8
8
|
const d = new Date(s);
|
|
9
9
|
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
exports.default = new t.Type("dateFromStringOrNumber", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.union([t.number, t.string]).validate(u, c), (0, Either_1.chain)((s) => {
|
|
8
8
|
const d = new Date(s);
|
|
9
9
|
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
exports.default = new t.Type("dateFromTsMs", (u) => u instanceof Date, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((s) => {
|
|
8
8
|
const d = new Date(s);
|
|
9
9
|
return isNaN(d.getTime()) ? t.failure(u, c) : t.success(d);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
export type IntFromNumberC = t.Type<t.Int, number, unknown>;
|
|
3
|
-
/** A codec that succeeds if a number can be parsed to an integer */
|
|
2
|
+
export declare type IntFromNumberC = t.Type<t.Int, number, unknown>;
|
|
4
3
|
declare const _default: t.Type<t.Int, number, unknown>;
|
|
4
|
+
/** A codec that succeeds if a number can be parsed to an integer */
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
/** A codec that succeeds if a number can be parsed to an integer */
|
|
8
8
|
exports.default = new t.Type("IntFromNumber", t.Int.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((n) => {
|
|
9
9
|
if (t.Int.is(n))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
export type IntFromPixelsC = t.Type<t.Int, string, unknown>;
|
|
2
|
+
export declare type IntFromPixelsC = t.Type<t.Int, string, unknown>;
|
|
3
|
+
declare const _default: t.Type<t.Int, string, unknown>;
|
|
3
4
|
/**
|
|
4
5
|
* A codec that succeeds if a string representing pixels (eg: "200px") can be
|
|
5
6
|
* parsed to an integer
|
|
6
7
|
*/
|
|
7
|
-
declare const _default: t.Type<t.Int, string, unknown>;
|
|
8
8
|
export default _default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
const PixelsRegex = /^([0-9]+)px$/;
|
|
8
8
|
/**
|
|
9
9
|
* A codec that succeeds if a string representing pixels (eg: "200px") can be
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
5
|
const function_1 = require("./function");
|
|
6
6
|
exports.default = (0, function_1.refineType)(t.string, "nonEmptyString", (s) => s.trim().length > 0);
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
6
|
const io_ts_1 = require("io-ts");
|
|
7
|
-
const StringOrNull_1 = tslib_1.__importDefault(require("./StringOrNull"));
|
|
7
|
+
const StringOrNull_1 = (0, tslib_1.__importDefault)(require("./StringOrNull"));
|
|
8
8
|
exports.default = new io_ts_1.Type("nonEmptyStringOrNull", (u) => typeof u === "string" || u === null, (u, c) => (0, function_1.pipe)(StringOrNull_1.default.validate(u, c), (0, Either_1.chain)((s) => {
|
|
9
9
|
if (typeof s === "string" && s.length > 0) {
|
|
10
10
|
return (0, io_ts_1.success)(s);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
5
|
const function_1 = require("./function");
|
|
6
6
|
exports.default = (0, function_1.nullable)(t.number);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
export type StringFromBooleanC = t.Type<string, string, unknown>;
|
|
3
|
-
/** A codec that validates a Boolean and convert it as a string */
|
|
2
|
+
export declare type StringFromBooleanC = t.Type<string, string, unknown>;
|
|
4
3
|
declare const _default: t.Type<string, string, unknown>;
|
|
4
|
+
/** A codec that validates a Boolean and convert it as a string */
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
/** A codec that validates a Boolean and convert it as a string */
|
|
8
8
|
exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.boolean.validate(u, c), (0, Either_1.chain)((i) => {
|
|
9
9
|
return t.success(i.toString());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
export type StringFromNumberC = t.Type<string, string, unknown>;
|
|
3
|
-
/** A codec that validates a number and convert it as a string */
|
|
2
|
+
export declare type StringFromNumberC = t.Type<string, string, unknown>;
|
|
4
3
|
declare const _default: t.Type<string, string, unknown>;
|
|
4
|
+
/** A codec that validates a number and convert it as a string */
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
/** A codec that validates a number and convert it as a string */
|
|
8
8
|
exports.default = new t.Type("StringFromInt", t.string.is, (u, c) => (0, function_1.pipe)(t.number.validate(u, c), (0, Either_1.chain)((i) => {
|
|
9
9
|
return t.success(i.toString());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
4
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
5
|
const function_1 = require("./function");
|
|
6
6
|
exports.default = (0, function_1.nullable)(t.string);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
export type TrimmedStringC = t.Type<string, string, unknown>;
|
|
3
|
-
/** A codec that validates a Boolean and convert it as a string */
|
|
2
|
+
export declare type TrimmedStringC = t.Type<string, string, unknown>;
|
|
4
3
|
declare const _default: t.Type<string, string, unknown>;
|
|
4
|
+
/** A codec that validates a Boolean and convert it as a string */
|
|
5
5
|
export default _default;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const Either_1 = require("fp-ts/Either");
|
|
5
5
|
const function_1 = require("fp-ts/function");
|
|
6
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
7
7
|
function trimScalaStyle(s) {
|
|
8
8
|
let startAt = 0;
|
|
9
9
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
@@ -4,7 +4,7 @@ exports.addType = exports.isEmpty = exports.objectToMap = exports.grouped = expo
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/function");
|
|
7
|
-
const t = tslib_1.__importStar(require("io-ts"));
|
|
7
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
8
8
|
const mapOutput_1 = require("io-ts-types/mapOutput");
|
|
9
9
|
function nullable(c) {
|
|
10
10
|
return t.union([c, t.null, t.undefined]);
|
package/lib/validators/index.js
CHANGED
|
@@ -3,25 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StringOrNull = exports.StringFromNumber = exports.StringFromBoolean = exports.NumberOrNull = exports.NonEmptyStringOrNull = exports.NonEmptyString = exports.IntFromPixels = exports.IntFromNumber = exports.Function = exports.DateFromTsMs = exports.DateFromStringOrNumber = exports.DateFromString = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var DateFromString_1 = require("./DateFromString");
|
|
6
|
-
Object.defineProperty(exports, "DateFromString", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromString_1).default; } });
|
|
6
|
+
Object.defineProperty(exports, "DateFromString", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromString_1).default; } });
|
|
7
7
|
var DateFromStringOrNumber_1 = require("./DateFromStringOrNumber");
|
|
8
|
-
Object.defineProperty(exports, "DateFromStringOrNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromStringOrNumber_1).default; } });
|
|
8
|
+
Object.defineProperty(exports, "DateFromStringOrNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromStringOrNumber_1).default; } });
|
|
9
9
|
var DateFromTsMs_1 = require("./DateFromTsMs");
|
|
10
|
-
Object.defineProperty(exports, "DateFromTsMs", { enumerable: true, get: function () { return tslib_1.__importDefault(DateFromTsMs_1).default; } });
|
|
11
|
-
exports.Function = tslib_1.__importStar(require("./function"));
|
|
10
|
+
Object.defineProperty(exports, "DateFromTsMs", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(DateFromTsMs_1).default; } });
|
|
11
|
+
exports.Function = (0, tslib_1.__importStar)(require("./function"));
|
|
12
12
|
var IntFromNumber_1 = require("./IntFromNumber");
|
|
13
|
-
Object.defineProperty(exports, "IntFromNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(IntFromNumber_1).default; } });
|
|
13
|
+
Object.defineProperty(exports, "IntFromNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntFromNumber_1).default; } });
|
|
14
14
|
var IntFromPixels_1 = require("./IntFromPixels");
|
|
15
|
-
Object.defineProperty(exports, "IntFromPixels", { enumerable: true, get: function () { return tslib_1.__importDefault(IntFromPixels_1).default; } });
|
|
15
|
+
Object.defineProperty(exports, "IntFromPixels", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(IntFromPixels_1).default; } });
|
|
16
16
|
var NonEmptyString_1 = require("./NonEmptyString");
|
|
17
|
-
Object.defineProperty(exports, "NonEmptyString", { enumerable: true, get: function () { return tslib_1.__importDefault(NonEmptyString_1).default; } });
|
|
17
|
+
Object.defineProperty(exports, "NonEmptyString", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NonEmptyString_1).default; } });
|
|
18
18
|
var NonEmptyStringOrNull_1 = require("./NonEmptyStringOrNull");
|
|
19
|
-
Object.defineProperty(exports, "NonEmptyStringOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(NonEmptyStringOrNull_1).default; } });
|
|
19
|
+
Object.defineProperty(exports, "NonEmptyStringOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NonEmptyStringOrNull_1).default; } });
|
|
20
20
|
var NumberOrNull_1 = require("./NumberOrNull");
|
|
21
|
-
Object.defineProperty(exports, "NumberOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(NumberOrNull_1).default; } });
|
|
21
|
+
Object.defineProperty(exports, "NumberOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(NumberOrNull_1).default; } });
|
|
22
22
|
var StringFromBoolean_1 = require("./StringFromBoolean");
|
|
23
|
-
Object.defineProperty(exports, "StringFromBoolean", { enumerable: true, get: function () { return tslib_1.__importDefault(StringFromBoolean_1).default; } });
|
|
23
|
+
Object.defineProperty(exports, "StringFromBoolean", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringFromBoolean_1).default; } });
|
|
24
24
|
var StringFromNumber_1 = require("./StringFromNumber");
|
|
25
|
-
Object.defineProperty(exports, "StringFromNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(StringFromNumber_1).default; } });
|
|
25
|
+
Object.defineProperty(exports, "StringFromNumber", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringFromNumber_1).default; } });
|
|
26
26
|
var StringOrNull_1 = require("./StringOrNull");
|
|
27
|
-
Object.defineProperty(exports, "StringOrNull", { enumerable: true, get: function () { return tslib_1.__importDefault(StringOrNull_1).default; } });
|
|
27
|
+
Object.defineProperty(exports, "StringOrNull", { enumerable: true, get: function () { return (0, tslib_1.__importDefault)(StringOrNull_1).default; } });
|