@griddo/core 1.75.117 → 1.75.119
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/dist/functions/autotypes/utils.d.ts +11 -9
- package/dist/types/schema-fields/page-content-type-fields.d.ts +2 -2
- package/dist/types/schema-fields/simple-content-type-fields.d.ts +2 -2
- package/dist/types/schemas/PageContentType.d.ts +8 -3
- package/dist/types/schemas/SimpleContentType.d.ts +8 -3
- package/dist/types/schemas/base.d.ts +2 -6
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { UIFields } from "../../types/schema-fields/ui-fields";
|
|
2
2
|
import { FieldReturnTypes, Fields, SchemaFieldTypes, SchemaType } from "./types";
|
|
3
3
|
/** Get all fields from one schema */
|
|
4
|
-
declare function getAllFields(schema: SchemaType): import("../../types/schema-fields/
|
|
4
|
+
declare function getAllFields(schema: SchemaType): [import("../../types/schema-fields/base").BaseTextField & import("../../types/schema-fields/props").WithFrom & import("../../types/schema-fields/props").WithIndexable & import("../../types/schema-fields/props").WithShowList & import("../../types/schema-fields/props").WithSearchable & {
|
|
5
|
+
key: "title";
|
|
6
|
+
}, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]] | UIFields<unknown>[];
|
|
5
7
|
/** Build a interface prop based on the field from the schema.
|
|
6
8
|
* Optionally it can receives a custom value for the type and a generic string to use as generic value
|
|
7
9
|
*
|
|
@@ -32,11 +34,11 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
|
|
|
32
34
|
fromPage: true;
|
|
33
35
|
schema: import("../../types/schema-fields/props").SearchFrom & {
|
|
34
36
|
templates: string[];
|
|
35
|
-
fields: import("../../types/schema-fields/
|
|
37
|
+
fields: [import("../../types/schema-fields/base").BaseTextField & import("../../types/schema-fields/props").WithFrom & import("../../types/schema-fields/props").WithIndexable & import("../../types/schema-fields/props").WithShowList & import("../../types/schema-fields/props").WithSearchable & {
|
|
38
|
+
key: "title";
|
|
39
|
+
}, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]];
|
|
36
40
|
};
|
|
37
41
|
title: string;
|
|
38
|
-
abstract?: string | undefined;
|
|
39
|
-
image?: string | undefined;
|
|
40
42
|
local?: boolean | undefined;
|
|
41
43
|
editable?: boolean | undefined;
|
|
42
44
|
translate?: boolean | undefined;
|
|
@@ -53,7 +55,7 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
|
|
|
53
55
|
sync: string;
|
|
54
56
|
}[];
|
|
55
57
|
} | null | undefined;
|
|
56
|
-
|
|
58
|
+
defaults?: unknown;
|
|
57
59
|
_autoType?: {
|
|
58
60
|
relations?: boolean | undefined;
|
|
59
61
|
} | undefined;
|
|
@@ -64,11 +66,11 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
|
|
|
64
66
|
component: string;
|
|
65
67
|
fromPage: false;
|
|
66
68
|
schema: import("../../types/schema-fields/props").SearchFrom & {
|
|
67
|
-
fields: import("../../types/schema-fields/
|
|
69
|
+
fields: [import("../../types/schema-fields/base").BaseTextField & import("../../types/schema-fields/props").WithIsMockup & import("../../types/schema-fields/props").WithValidators & import("../../types/schema-fields/props").WithReadonly & import("../../types/schema-fields/props").WithSlugTo & import("../../types/schema-fields/props").WithPrefix & import("../../types/schema-fields/props").WithPlaceHolder & import("../../types/schema-fields/props").WithHideable & import("../../types/schema-fields/props").WithIndexable & import("../../types/schema-fields/props").WithShowList & import("../../types/schema-fields/props").WithHelpText & import("../../types/schema-fields/props").WithSearchable & {
|
|
70
|
+
key: "title";
|
|
71
|
+
}, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields<unknown>[]];
|
|
68
72
|
};
|
|
69
73
|
title: string;
|
|
70
|
-
abstract?: string | undefined;
|
|
71
|
-
image?: string | undefined;
|
|
72
74
|
local?: boolean | undefined;
|
|
73
75
|
taxonomy?: boolean | undefined;
|
|
74
76
|
editable?: boolean | undefined;
|
|
@@ -86,7 +88,7 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
|
|
|
86
88
|
sync: string;
|
|
87
89
|
}[];
|
|
88
90
|
} | null | undefined;
|
|
89
|
-
|
|
91
|
+
defaults?: unknown;
|
|
90
92
|
_autoType?: {
|
|
91
93
|
relations?: boolean | undefined;
|
|
92
94
|
} | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseArrayFieldGroup, BaseAsyncCheckGroup, BaseAsyncSelect, BaseCheckGroup, BaseColorPicker, BaseComponentArray, BaseComponentContainer, BaseConditionalField, BaseDateField, BaseFieldGroup, BaseFieldsDivider, BaseFileField, BaseHeadingField, BaseImageField, BaseLinkField, BaseMultiCheckSelect, BaseMultiCheckSelectGroup, BaseNoteField, BaseNumberField, BaseRadioGroup, BaseReferenceField, BaseRichText, BaseSelect, BaseSliderField, BaseTextArea, BaseTextField, BaseToggleField, BaseUniqueCheck, BaseUrlField, BaseVisualUniqueSelection, BaseWysiwyg } from "./base";
|
|
2
|
-
import { WithIndexable,
|
|
3
|
-
declare type Common = WithFrom & WithIndexable &
|
|
2
|
+
import { WithIndexable, WithShowList, WithFrom, WithRelations_AutoTypes, WithWhiteList } from "./props";
|
|
3
|
+
declare type Common = WithFrom & WithIndexable & WithShowList;
|
|
4
4
|
export declare type ArrayFieldGroup = BaseArrayFieldGroup<PageContentTypeFields> & Common;
|
|
5
5
|
export declare type ConditionalField = BaseConditionalField<PageContentTypeFields> & Common;
|
|
6
6
|
export declare type FieldGroup = BaseFieldGroup<PageContentTypeFields> & Common;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseArrayFieldGroup, BaseAsyncCheckGroup, BaseAsyncSelect, BaseCheckGroup, BaseColorPicker, BaseConditionalField, BaseDateField, BaseFieldGroup, BaseFieldsDivider, BaseFileField, BaseHeadingField, BaseImageField, BaseLinkField, BaseMultiCheckSelect, BaseMultiCheckSelectGroup, BaseNoteField, BaseNumberField, BaseRadioGroup, BaseReferenceField, BaseRichText, BaseSelect, BaseSliderField, BaseTextArea, BaseTextField, BaseToggleField, BaseUniqueCheck, BaseUrlField, BaseVisualUniqueSelection, BaseWysiwyg } from "./base";
|
|
2
|
-
import { WithHelpText, WithHideable, WithIndexable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes,
|
|
3
|
-
declare type Common = WithHideable & WithIndexable &
|
|
2
|
+
import { WithHelpText, WithHideable, WithIndexable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes, WithShowList, WithSlugTo, WithValidators, WithWhiteList } from "./props";
|
|
3
|
+
declare type Common = WithHideable & WithIndexable & WithShowList & WithHelpText;
|
|
4
4
|
export declare type ArrayFieldGroup = BaseArrayFieldGroup<SimpleContentTypeFields> & Common;
|
|
5
5
|
export declare type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
6
6
|
export declare type AsyncSelect = BaseAsyncSelect & Common & WithPlaceHolder;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { PageContentTypeFields } from "../schema-fields/page-content-type-fields";
|
|
2
|
-
import { SearchFrom } from "../schema-fields/props";
|
|
1
|
+
import { PageContentTypeFields, TextField } from "../schema-fields/page-content-type-fields";
|
|
2
|
+
import { SearchFrom, WithSearchable } from "../schema-fields/props";
|
|
3
3
|
import { BaseContentType } from "./base";
|
|
4
4
|
import { DataPacks, ExpirationData } from "./props";
|
|
5
5
|
declare type PageContentTypeProp = SearchFrom & {
|
|
6
6
|
/** The name of the Reacttemplates to use with the page type Schema. */
|
|
7
7
|
templates: Array<string>;
|
|
8
8
|
/** An array of Griddo fields. */
|
|
9
|
-
fields:
|
|
9
|
+
fields: [
|
|
10
|
+
TextField & WithSearchable & {
|
|
11
|
+
key: "title";
|
|
12
|
+
},
|
|
13
|
+
...PageContentTypeFields[]
|
|
14
|
+
];
|
|
10
15
|
};
|
|
11
16
|
export interface PageContentType extends BaseContentType, DataPacks, ExpirationData {
|
|
12
17
|
/** Indicates that is a taxonomy. In this case must be `false`.*/
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { SearchFrom } from "../schema-fields/props";
|
|
2
|
-
import { SimpleContentTypeFields } from "../schema-fields/simple-content-type-fields";
|
|
1
|
+
import { SearchFrom, WithSearchable } from "../schema-fields/props";
|
|
2
|
+
import { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
|
|
3
3
|
import { BaseContentType } from "./base";
|
|
4
4
|
import { DataPacks, ExpirationData } from "./props";
|
|
5
5
|
declare type SimpleContentTypeProp = SearchFrom & {
|
|
6
6
|
/** An array of Griddo fields. */
|
|
7
|
-
fields:
|
|
7
|
+
fields: [
|
|
8
|
+
TextField & WithSearchable & {
|
|
9
|
+
key: "title";
|
|
10
|
+
},
|
|
11
|
+
...SimpleContentTypeFields[]
|
|
12
|
+
];
|
|
8
13
|
};
|
|
9
14
|
export interface SimpleContentType extends BaseContentType, DataPacks, ExpirationData {
|
|
10
15
|
/** Indicates that the data is of type simple/category. Must always be `false`. */
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { DataPacks, Thumbnails, _AutoTypes } from "./props";
|
|
2
2
|
interface BaseContentType extends _AutoTypes {
|
|
3
|
-
/** Title
|
|
3
|
+
/** Title for the Content Type */
|
|
4
4
|
title: string;
|
|
5
|
-
/** It is recommended, as it is used for listings and searches. */
|
|
6
|
-
abstract?: string;
|
|
7
|
-
/** Is the one to be used as the image in such listings and searches, if applicable. */
|
|
8
|
-
image?: string;
|
|
9
5
|
/** If `true`, the data will be of type Site, if `false`, it will be of type global. */
|
|
10
6
|
local?: boolean;
|
|
11
7
|
/** If it is a taxonomy or a simple or page ContentType. The difference is that a taxonomy does not have to define fields or schema, because it only has title and slug. */
|
|
@@ -31,7 +27,7 @@ interface BaseContentType extends _AutoTypes {
|
|
|
31
27
|
}>;
|
|
32
28
|
} | null;
|
|
33
29
|
/** Field default values. */
|
|
34
|
-
|
|
30
|
+
defaults?: unknown;
|
|
35
31
|
}
|
|
36
32
|
declare type BaseSectionList = Record<string, Array<string>>;
|
|
37
33
|
interface BaseUI<SectionList = BaseSectionList> extends DataPacks, _AutoTypes {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@griddo/core",
|
|
3
3
|
"description": "Reload version of Griddo Core",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.75.
|
|
5
|
+
"version": "1.75.119",
|
|
6
6
|
"authors": [
|
|
7
7
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
8
8
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"resolutions": {
|
|
79
79
|
"colors": "1.4.0"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "db2cc892d7ebb1f7ec73ae394b72acb523987fc0"
|
|
82
82
|
}
|