@griddo/core 1.75.155 → 1.75.157
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/autotypes.cjs.js +1 -1
- package/dist/autotypes.cjs.js.map +1 -1
- package/dist/autotypes.js +1 -1
- package/dist/autotypes.js.map +1 -1
- package/dist/components/GriddoImage/index.d.ts +2 -2
- package/dist/components/GriddoLink/index.d.ts +1 -1
- package/dist/components/Preview/index.d.ts +1 -1
- package/dist/contexts/Page/index.d.ts +2 -2
- package/dist/contexts/Session/index.d.ts +1 -1
- package/dist/functions/autotypes/types.d.ts +6 -6
- package/dist/functions/autotypes/utils.d.ts +1 -1
- package/dist/functions/image-utils.d.ts +1 -1
- package/dist/functions/utils.d.ts +1 -1
- package/dist/hooks/themes/types.d.ts +4 -4
- package/dist/hooks/useDataFilters.d.ts +3 -3
- package/dist/hooks/useFetch.d.ts +1 -1
- package/dist/hooks/useGriddoImage.d.ts +1 -1
- package/dist/hooks/useI18n.d.ts +1 -1
- package/dist/hooks/useImage.d.ts +3 -3
- package/dist/hooks/useList.d.ts +3 -3
- package/dist/hooks/useScript.d.ts +1 -1
- package/dist/hooks/useSite.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/api-response-fields/index.d.ts +42 -42
- package/dist/types/core/index.d.ts +16 -16
- package/dist/types/global.d.ts +5 -5
- package/dist/types/schema-fields/base.d.ts +5 -5
- package/dist/types/schema-fields/page-content-type-fields.d.ts +33 -33
- package/dist/types/schema-fields/props.d.ts +24 -24
- package/dist/types/schema-fields/simple-content-type-fields.d.ts +31 -31
- package/dist/types/schema-fields/ui-fields.d.ts +33 -33
- package/dist/types/schemas/HeaderFooter.d.ts +2 -2
- package/dist/types/schemas/Languages.d.ts +1 -1
- package/dist/types/schemas/Menu.d.ts +1 -1
- package/dist/types/schemas/ModuleCategories.d.ts +1 -1
- package/dist/types/schemas/PageContentType.d.ts +1 -1
- package/dist/types/schemas/SimpleContentType.d.ts +1 -1
- package/dist/types/schemas/Themes.d.ts +1 -1
- package/dist/types/schemas/Translations.d.ts +1 -1
- package/dist/types/schemas/base.d.ts +1 -1
- package/dist/types/schemas/props.d.ts +2 -2
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/utilities.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { HTMLHeadingTag } from "../global";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type FieldsDivider = string;
|
|
3
|
+
export type ArrayFieldGroup<Fields> = Array<Fields>;
|
|
4
|
+
export type AsyncCheckGroup = Array<{
|
|
5
5
|
value: number;
|
|
6
6
|
name: number;
|
|
7
7
|
title: string;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
9
|
+
export type AsyncSelect = number;
|
|
10
|
+
export type CheckGroup<NameValues> = Array<NameValues>;
|
|
11
|
+
export type ColorPicker = string;
|
|
12
|
+
export type ColorPickerFixed = {
|
|
13
13
|
name: string;
|
|
14
14
|
hex: string;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
16
|
+
export type ComponentArray<ComponentProps> = Array<ComponentProps>;
|
|
17
|
+
export type ComponentContainer<ComponentProps> = ComponentProps;
|
|
18
|
+
export type Conditional<Values> = Values;
|
|
19
|
+
export type Date = string;
|
|
20
|
+
export type FieldGroup = string;
|
|
21
|
+
export type File = {
|
|
22
22
|
/** URL for the document */
|
|
23
23
|
url?: string;
|
|
24
24
|
/** Size for the document file in bytes */
|
|
@@ -26,13 +26,13 @@ export declare type File = {
|
|
|
26
26
|
/** Upload date */
|
|
27
27
|
uploadDate?: string;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type Heading<HeadingTagsType = HTMLHeadingTag> = {
|
|
30
30
|
/** Text content */
|
|
31
31
|
content?: string;
|
|
32
32
|
/** HTML tag used to render the content */
|
|
33
33
|
tag?: HeadingTagsType | null;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type Image = {
|
|
36
36
|
/** Image id */
|
|
37
37
|
id?: number;
|
|
38
38
|
/** Original image name */
|
|
@@ -89,8 +89,8 @@ interface LinkModal<ModalComponents> extends LinkCommon {
|
|
|
89
89
|
modal?: ModalComponents;
|
|
90
90
|
}
|
|
91
91
|
/** Field of type link in which a whitelist of modules can be added, for example to open them in a modal. */
|
|
92
|
-
export
|
|
93
|
-
export
|
|
92
|
+
export type Link<ModalComponents> = LinkUrl | LinkModal<ModalComponents>;
|
|
93
|
+
export type SourceReturnComplex<FromData> = FromData extends false ? {
|
|
94
94
|
name?: number;
|
|
95
95
|
value?: number;
|
|
96
96
|
title?: string;
|
|
@@ -98,14 +98,14 @@ export declare type SourceReturnComplex<FromData> = FromData extends false ? {
|
|
|
98
98
|
id?: number;
|
|
99
99
|
label?: string;
|
|
100
100
|
};
|
|
101
|
-
export
|
|
102
|
-
export
|
|
103
|
-
export
|
|
101
|
+
export type SourceReturn<Relations, FromData> = Relations extends true ? SourceReturnComplex<FromData> : number;
|
|
102
|
+
export type MultiCheckSelect<Relations = unknown, FromData = false> = Relations extends false ? Array<SourceReturn<false, FromData>> : Array<SourceReturn<true, FromData>>;
|
|
103
|
+
export type MultiCheckSelectGroup<T extends string, Relations = unknown> = {
|
|
104
104
|
[K in T]: MultiCheckSelect<Relations>;
|
|
105
105
|
};
|
|
106
|
-
export
|
|
107
|
-
export
|
|
108
|
-
export
|
|
106
|
+
export type Note = string;
|
|
107
|
+
export type Number = number | null | "";
|
|
108
|
+
export type RadioGroup<Values> = Values;
|
|
109
109
|
export interface Reference<ContentType> {
|
|
110
110
|
mode: "auto" | "manual";
|
|
111
111
|
order?: string;
|
|
@@ -123,17 +123,17 @@ export interface Reference<ContentType> {
|
|
|
123
123
|
fullRelations?: boolean;
|
|
124
124
|
allLanguages?: boolean;
|
|
125
125
|
}
|
|
126
|
-
export
|
|
127
|
-
export
|
|
128
|
-
export
|
|
129
|
-
export
|
|
130
|
-
export
|
|
126
|
+
export type RichText = string;
|
|
127
|
+
export type ScrollableUniqueSelection = string;
|
|
128
|
+
export type Select<Values> = Values;
|
|
129
|
+
export type Slider = number;
|
|
130
|
+
export type TextArea = string;
|
|
131
131
|
/** Return type of an Text */
|
|
132
|
-
export
|
|
133
|
-
export
|
|
134
|
-
export
|
|
135
|
-
export
|
|
136
|
-
export
|
|
132
|
+
export type Text = string;
|
|
133
|
+
export type Time = string;
|
|
134
|
+
export type Toggle = boolean;
|
|
135
|
+
export type UniqueCheck = boolean;
|
|
136
|
+
export type Url = {
|
|
137
137
|
href?: string;
|
|
138
138
|
title?: string;
|
|
139
139
|
linkToURL?: string;
|
|
@@ -141,14 +141,14 @@ export declare type Url = {
|
|
|
141
141
|
noFollow?: boolean;
|
|
142
142
|
subSlug?: string;
|
|
143
143
|
};
|
|
144
|
-
export
|
|
145
|
-
export
|
|
146
|
-
|
|
144
|
+
export type VisualUniqueSelection<Values> = Values;
|
|
145
|
+
export type Wysiwyg = string;
|
|
146
|
+
type ConfigBase = {
|
|
147
147
|
type?: "link" | "group";
|
|
148
148
|
headerStyle?: string;
|
|
149
149
|
footerStyle?: string;
|
|
150
150
|
};
|
|
151
|
-
|
|
151
|
+
type MenuItemBase = {
|
|
152
152
|
label?: string;
|
|
153
153
|
url?: Url;
|
|
154
154
|
auxText?: string;
|
|
@@ -169,14 +169,14 @@ interface MenuChildrenLinkType extends MenuItemBase {
|
|
|
169
169
|
config?: ConfigLinkType;
|
|
170
170
|
children?: Array<MenuElement>;
|
|
171
171
|
}
|
|
172
|
-
export
|
|
173
|
-
export
|
|
172
|
+
export type MenuElement = MenuChildrenGroupType | MenuChildrenLinkType;
|
|
173
|
+
export type Menu = {
|
|
174
174
|
elements?: Array<MenuElement>;
|
|
175
175
|
};
|
|
176
|
-
export
|
|
176
|
+
export type TemplateSection<GriddoModule> = {
|
|
177
177
|
modules: Array<GriddoModule>;
|
|
178
178
|
};
|
|
179
|
-
export
|
|
179
|
+
export type QueriedData<ContentType> = Array<{
|
|
180
180
|
/** Item Id */
|
|
181
181
|
id?: number;
|
|
182
182
|
/** ContentType content */
|
|
@@ -195,7 +195,7 @@ export declare type QueriedData<ContentType> = Array<{
|
|
|
195
195
|
}>;
|
|
196
196
|
};
|
|
197
197
|
}>;
|
|
198
|
-
export
|
|
198
|
+
export type ExtraListTemplateProps = {
|
|
199
199
|
/** Full URL for the page */
|
|
200
200
|
baseLink?: string;
|
|
201
201
|
/** Total count of the ContentType items. Useful is you want to build a `n of totalItems` pagination. */
|
|
@@ -4,9 +4,9 @@ import { GriddoLinkProps } from "../../components/GriddoLink";
|
|
|
4
4
|
import { Image, Menu } from "../api-response-fields";
|
|
5
5
|
import locales from "../constants/locales";
|
|
6
6
|
import timezone from "../constants/timezone";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
export type Renderers = "gatsby" | "editor" | "preview";
|
|
8
|
+
export type SocialName = "instagram" | "linkedIn" | "facebook" | "twitter" | "youTube" | "flickr" | "tiktok" | "snapchat" | "newsletter";
|
|
9
|
+
export type Breadcrumb = Array<{
|
|
10
10
|
path?: string;
|
|
11
11
|
label: string;
|
|
12
12
|
fullPath: string;
|
|
@@ -152,7 +152,7 @@ export interface CloudinaryDefaults extends Partial<Pick<CloudinaryImageProps, "
|
|
|
152
152
|
src?: string;
|
|
153
153
|
srcSet?: string;
|
|
154
154
|
}
|
|
155
|
-
export
|
|
155
|
+
export type GriddoDamDefaults = {
|
|
156
156
|
quality?: number;
|
|
157
157
|
crop?: ImageCropType;
|
|
158
158
|
loading?: ImageLoading;
|
|
@@ -208,19 +208,19 @@ export interface Site {
|
|
|
208
208
|
translations?: LocaleTranslations;
|
|
209
209
|
}
|
|
210
210
|
/** Type for fetch priority */
|
|
211
|
-
export
|
|
211
|
+
export type FetchPriority = "auto" | "high" | "low";
|
|
212
212
|
/** Kind of Griddo image croping */
|
|
213
|
-
export
|
|
213
|
+
export type ImageCropType = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
214
214
|
/** Kind of image decoding */
|
|
215
|
-
export
|
|
215
|
+
export type ImageDecoding = "auto" | "sync" | "async";
|
|
216
216
|
/** Griddo image formats */
|
|
217
|
-
export
|
|
217
|
+
export type ImageFormats = "avif" | "webp" | "jpeg" | "jpg" | "png" | "gif" | "svg";
|
|
218
218
|
/** Kind of browser image load method */
|
|
219
|
-
export
|
|
219
|
+
export type ImageLoading = "lazy" | "eager";
|
|
220
220
|
/** Image transforms for the Griddo cdn image provider */
|
|
221
|
-
export
|
|
221
|
+
export type ImageTransform = "grayscale" | "flip" | "flop" | "blur";
|
|
222
222
|
/** Background image type */
|
|
223
|
-
export
|
|
223
|
+
export type BackgroundImageSizesProps = {
|
|
224
224
|
/** Breakpoint in px */
|
|
225
225
|
breakpoint: string;
|
|
226
226
|
/** Width of the image */
|
|
@@ -230,18 +230,18 @@ export declare type BackgroundImageSizesProps = {
|
|
|
230
230
|
quality?: number;
|
|
231
231
|
};
|
|
232
232
|
/** Image position for the Griddo cdn image provider */
|
|
233
|
-
export
|
|
233
|
+
export type ImagePosition = "attention" | "bottom" | "center" | "entropy" | "left-bottom" | "left-top" | "left" | "right-bottom" | "right-top" | "right" | "top";
|
|
234
234
|
/** Type definition for a Griddo component or a module */
|
|
235
235
|
export interface LibraryComponentProps {
|
|
236
236
|
component: string;
|
|
237
237
|
[key: string]: unknown;
|
|
238
238
|
}
|
|
239
239
|
/** Custom object with value/keys containing static translations */
|
|
240
|
-
export
|
|
240
|
+
export type LocaleTranslations = Partial<Record<typeof locales[number], Record<string, unknown>>>;
|
|
241
241
|
/** Locale zone codes */
|
|
242
|
-
export
|
|
242
|
+
export type Locale = typeof locales[number];
|
|
243
243
|
/** Time zone codes */
|
|
244
|
-
export
|
|
244
|
+
export type TimeZone = typeof timezone[number];
|
|
245
245
|
export interface ResponsiveImageProps {
|
|
246
246
|
/** Breakpoint in px or null if its the first one (mobile) */
|
|
247
247
|
breakpoint?: null | string;
|
|
@@ -272,7 +272,7 @@ export interface FullPath {
|
|
|
272
272
|
/** Slug for the compose url with the format `/language-name/` */
|
|
273
273
|
compose?: string;
|
|
274
274
|
}
|
|
275
|
-
export
|
|
275
|
+
export type ListContentType<Item> = Omit<Item, "contentTypeName" | "relatedContentTypeNames"> & {
|
|
276
276
|
id: number;
|
|
277
277
|
url: string;
|
|
278
278
|
};
|
package/dist/types/global.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ListContentType } from "./core";
|
|
2
2
|
import { Fields } from "../index";
|
|
3
|
-
export
|
|
3
|
+
export type HTMLHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
4
|
export interface SetQueryProps<ContentType> {
|
|
5
5
|
/** The ReferenceField prop */
|
|
6
6
|
data?: Fields.Reference<ContentType>;
|
|
@@ -43,11 +43,11 @@ export interface ListApiQueryResponseProps<ContentTypeFields> {
|
|
|
43
43
|
totalItems?: number;
|
|
44
44
|
totalPages?: number;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
type FilterDataItem = {
|
|
47
47
|
label: string;
|
|
48
48
|
id: number;
|
|
49
49
|
};
|
|
50
|
-
export
|
|
50
|
+
export type FiltersDataApiQueryResponseProps<ContentType> = ContentType extends {
|
|
51
51
|
relatedContentTypeNames: Array<string>;
|
|
52
52
|
} ? {
|
|
53
53
|
[P in ContentType["relatedContentTypeNames"][number]]: {
|
|
@@ -55,8 +55,8 @@ export declare type FiltersDataApiQueryResponseProps<ContentType> = ContentType
|
|
|
55
55
|
items: Array<FilterDataItem>;
|
|
56
56
|
};
|
|
57
57
|
} : never;
|
|
58
|
-
export
|
|
58
|
+
export type PickRename<T, K extends keyof T, R extends PropertyKey> = Omit<T, K> & {
|
|
59
59
|
[P in R]: T[K];
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type Hideable<T> = T | null;
|
|
62
62
|
export {};
|
|
@@ -2,7 +2,7 @@ import { WithDisabled, WithEntity, WithGroup, Option, WithSource, ThemeColors, T
|
|
|
2
2
|
import { HTMLHeadingTag } from "../global";
|
|
3
3
|
import { DistributiveOmit } from "../utilities";
|
|
4
4
|
/** Type generator options */
|
|
5
|
-
|
|
5
|
+
type TypeGeneratorBase = {
|
|
6
6
|
/** Comment for the Types generator */
|
|
7
7
|
doc?: string;
|
|
8
8
|
/** Ignore this field for the Types generator */
|
|
@@ -63,8 +63,8 @@ interface ExclusiveSource extends Partial<WithSource> {
|
|
|
63
63
|
interface ExclusiveEntity extends Partial<WithEntity> {
|
|
64
64
|
source?: never;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
export
|
|
66
|
+
type SourceOrEntity = ExclusiveSource | ExclusiveEntity;
|
|
67
|
+
export type BaseAsyncSelect = GenericField & WithDisabled & SourceOrEntity & {
|
|
68
68
|
type: "AsyncSelect";
|
|
69
69
|
};
|
|
70
70
|
export interface BaseCheckGroup extends GenericField {
|
|
@@ -96,7 +96,7 @@ interface FixedColorPicker extends GenericColorPicker {
|
|
|
96
96
|
/** Array of objects with { name: 'primitiveName', hex: '#xxxxxx' }. */
|
|
97
97
|
colors: Array<ThemeFixedColors>;
|
|
98
98
|
}
|
|
99
|
-
export
|
|
99
|
+
export type BaseColorPicker = DynamicColorPicker | FixedColorPicker;
|
|
100
100
|
export interface BaseComponentArray extends GenericComponentField {
|
|
101
101
|
/** Campo para añadir múltiples componentes a un módulo. */
|
|
102
102
|
type: "ComponentArray";
|
|
@@ -287,5 +287,5 @@ export interface BaseWysiwyg extends GenericField {
|
|
|
287
287
|
/** Option to show the full version of the toolbar with all buttons. Default: `true`. */
|
|
288
288
|
full?: boolean;
|
|
289
289
|
}
|
|
290
|
-
export
|
|
290
|
+
export type BaseFields<T> = BaseArrayFieldGroup<T> | BaseAsyncCheckGroup | BaseAsyncSelect | BaseCheckGroup | BaseColorPicker | BaseComponentArray | BaseComponentContainer | BaseConditionalField<T> | BaseDateField | BaseFieldGroup<T> | BaseFieldsDivider | BaseFileField | BaseHeadingField | BaseImageField | BaseLinkField | BaseMultiCheckSelect | BaseMultiCheckSelectGroup | BaseNoteField | BaseNumberField | BaseRadioGroup | BaseReferenceField | BaseRichText | BaseSelect | BaseSliderField | BaseTextArea | BaseTextField | BaseToggleField | BaseUniqueCheck | BaseUrlField | BaseVisualUniqueSelection | BaseWysiwyg;
|
|
291
291
|
export {};
|
|
@@ -1,36 +1,36 @@
|
|
|
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
2
|
import { WithIndexable, WithShowList, WithFrom, WithRelations_AutoTypes, WithWhiteList } from "./props";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
3
|
+
type Common = WithFrom & WithIndexable & WithShowList;
|
|
4
|
+
export type ArrayFieldGroup = BaseArrayFieldGroup<PageContentTypeFields> & Common;
|
|
5
|
+
export type ConditionalField = BaseConditionalField<PageContentTypeFields> & Common;
|
|
6
|
+
export type FieldGroup = BaseFieldGroup<PageContentTypeFields> & Common;
|
|
7
|
+
export type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
8
|
+
export type AsyncSelect = BaseAsyncSelect & Common;
|
|
9
|
+
export type CheckGroup = BaseCheckGroup & Common;
|
|
10
|
+
export type ColorPicker = BaseColorPicker & Common;
|
|
11
|
+
export type ComponentArray<WhiteListElements = unknown> = BaseComponentArray & WithWhiteList<WhiteListElements> & Common;
|
|
12
|
+
export type ComponentContainer<WhiteListElements = unknown> = BaseComponentContainer & WithWhiteList<WhiteListElements> & Common;
|
|
13
|
+
export type DateField = BaseDateField & Common;
|
|
14
|
+
export type FieldsDivider = BaseFieldsDivider & Common;
|
|
15
|
+
export type FileField = BaseFileField & Common;
|
|
16
|
+
export type HeadingField = BaseHeadingField & Common;
|
|
17
|
+
export type ImageField = BaseImageField & Common;
|
|
18
|
+
export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
|
|
19
|
+
export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
|
|
20
|
+
export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
|
|
21
|
+
export type NoteField = BaseNoteField & Common;
|
|
22
|
+
export type NumberField = BaseNumberField & Common;
|
|
23
|
+
export type RadioGroup = BaseRadioGroup & Common;
|
|
24
|
+
export type ReferenceField = BaseReferenceField & Common;
|
|
25
|
+
export type RichText = BaseRichText & Common;
|
|
26
|
+
export type Select = BaseSelect & Common;
|
|
27
|
+
export type SliderField = BaseSliderField & Common;
|
|
28
|
+
export type TextArea = BaseTextArea & Common;
|
|
29
|
+
export type TextField = BaseTextField & Common;
|
|
30
|
+
export type ToggleField = BaseToggleField & Common;
|
|
31
|
+
export type UniqueCheck = BaseUniqueCheck & Common;
|
|
32
|
+
export type UrlField = BaseUrlField & Common;
|
|
33
|
+
export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
34
|
+
export type Wysiwyg = BaseWysiwyg & Common;
|
|
35
|
+
export type PageContentTypeFields<WhiteListElements = unknown> = ArrayFieldGroup | ConditionalField | FieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentArray<WhiteListElements> | ComponentContainer<WhiteListElements> | DateField | FieldsDivider | FileField | HeadingField | ImageField | LinkField<WhiteListElements> | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
36
36
|
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WithDisabled = {
|
|
2
2
|
/** If select is disabled. Default: `false`. */
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type WithEntity = {
|
|
6
6
|
/** Type of entity from which you have to load the options. */
|
|
7
7
|
entity: "menu_containers" | "pages" | "categories" | "sites";
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type WithFrom = {
|
|
10
10
|
/** The property of the page template from which the value of that field should be extracted. */
|
|
11
11
|
from: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type WithGroup = {
|
|
14
14
|
/** Array of elements to be displayed */
|
|
15
15
|
options: Array<Option>;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type WithHelpText = {
|
|
18
18
|
/** Help text that appears below the field. */
|
|
19
19
|
helptext?: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type WithHideable = {
|
|
22
22
|
/** If `true` the field can be hidden in the editor. */
|
|
23
23
|
hideable?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type WithIndexable = {
|
|
26
26
|
/** Default is false. If that field is to be used as an index (to be able to sort by that field, etc.) */
|
|
27
27
|
indexable?: boolean;
|
|
28
28
|
};
|
|
29
29
|
/** Por defecto es false. Si ese campo se va a utilizar como índice (para poder ordenar por ese campo, etc.) */
|
|
30
|
-
export
|
|
30
|
+
export type WithIsMockup = {
|
|
31
31
|
/** Mark the content of the default field as dummy content which forces the user editor to change it. Otherwise when trying to publish the Griddo editor will warn us to change it. */
|
|
32
32
|
isMockup?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type Option = {
|
|
35
35
|
/** Label that will appear in the form. */
|
|
36
36
|
title: string;
|
|
37
37
|
/** Field name. */
|
|
@@ -41,58 +41,58 @@ export declare type Option = {
|
|
|
41
41
|
/** If the option is disabled. */
|
|
42
42
|
disabled?: boolean;
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type WithPlaceHolder = {
|
|
45
45
|
/** Sample content text. */
|
|
46
46
|
placeholder?: string;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type WithPrefix = {
|
|
49
49
|
/** Fixed string to appear and be included in the field value. */
|
|
50
50
|
prefix?: "#" | (string & {});
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type WithReadonly = {
|
|
53
53
|
/** If the field is read-only. */
|
|
54
54
|
readonly?: boolean;
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type WithSearchable = {
|
|
57
57
|
/** Only for the field with key "title". If set to false, this title will not be used in searches. */
|
|
58
58
|
searchable?: boolean;
|
|
59
59
|
};
|
|
60
|
-
export
|
|
60
|
+
export type SearchFrom = {
|
|
61
61
|
/** An array of `keys` representing the fields by which a search can be performed. */
|
|
62
62
|
searchFrom?: Array<string>;
|
|
63
63
|
};
|
|
64
|
-
export
|
|
64
|
+
export type WithShowList = {
|
|
65
65
|
/** Default is false. If in the lists this field must be included as another data. WARNING: normally if it is showList it must also be indexable. */
|
|
66
66
|
showList?: boolean;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type WithSlugTo = {
|
|
69
69
|
/** If a key is specified, the value of this field will appear in the text field that has that key in slug format. */
|
|
70
70
|
slugTo?: string;
|
|
71
71
|
};
|
|
72
|
-
export
|
|
72
|
+
export type WithSource = {
|
|
73
73
|
/** Structured data type from which you have to load the options. */
|
|
74
74
|
source: string;
|
|
75
75
|
};
|
|
76
|
-
export
|
|
76
|
+
export type ThemeColors = {
|
|
77
77
|
theme: string;
|
|
78
78
|
options: Array<string>;
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type ThemeFixedColors = {
|
|
81
81
|
theme: string;
|
|
82
82
|
options: Array<{
|
|
83
83
|
name: string;
|
|
84
84
|
hex: string;
|
|
85
85
|
}>;
|
|
86
86
|
};
|
|
87
|
-
export
|
|
87
|
+
export type ThemeVisualUniqueSelection = {
|
|
88
88
|
theme: string;
|
|
89
89
|
options: Array<ThumbnailOption>;
|
|
90
90
|
};
|
|
91
|
-
export
|
|
91
|
+
export type ThumbnailOption = {
|
|
92
92
|
value: unknown;
|
|
93
93
|
img: string;
|
|
94
94
|
};
|
|
95
|
-
export
|
|
95
|
+
export type WithValidators = {
|
|
96
96
|
/** Validation of `string`, `number` and `date` type fields. */
|
|
97
97
|
validators?: {
|
|
98
98
|
/** Validates the minimum length of a string. */
|
|
@@ -109,11 +109,11 @@ export declare type WithValidators = {
|
|
|
109
109
|
dateFormat?: "futureDate" | "pastDate";
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
export
|
|
112
|
+
export type WithWhiteList<WhiteListElements> = {
|
|
113
113
|
/** Array of strings with the names of the modules or components that can be added. */
|
|
114
114
|
whiteList: Array<WhiteListElements>;
|
|
115
115
|
};
|
|
116
|
-
export
|
|
116
|
+
export type WithRelations_AutoTypes = {
|
|
117
117
|
_autoType?: {
|
|
118
118
|
relations?: boolean;
|
|
119
119
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
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
2
|
import { WithHelpText, WithHideable, WithIndexable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes, WithShowList, WithSlugTo, WithValidators, WithWhiteList } from "./props";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
3
|
+
type Common = WithHideable & WithIndexable & WithShowList & WithHelpText;
|
|
4
|
+
export type ArrayFieldGroup = BaseArrayFieldGroup<SimpleContentTypeFields> & Common;
|
|
5
|
+
export type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
6
|
+
export type AsyncSelect = BaseAsyncSelect & Common & WithPlaceHolder;
|
|
7
|
+
export type CheckGroup = BaseCheckGroup & Common;
|
|
8
|
+
export type ColorPicker = BaseColorPicker & Common;
|
|
9
|
+
export type ConditionalField = BaseConditionalField<SimpleContentTypeFields> & Common;
|
|
10
|
+
export type DateField = BaseDateField & WithValidators & Common & WithPlaceHolder;
|
|
11
|
+
export type FieldGroup = BaseFieldGroup<SimpleContentTypeFields> & Common;
|
|
12
|
+
export type FieldsDivider = BaseFieldsDivider & Common;
|
|
13
|
+
export type FileField = BaseFileField & Common & WithPlaceHolder;
|
|
14
|
+
export type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
15
|
+
export type ImageField = BaseImageField & WithIsMockup & Common;
|
|
16
|
+
export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
|
|
17
|
+
export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
|
|
18
|
+
export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
|
|
19
|
+
export type NoteField = BaseNoteField & Common;
|
|
20
|
+
export type NumberField = BaseNumberField & WithValidators & Common & WithPlaceHolder;
|
|
21
|
+
export type RadioGroup = BaseRadioGroup & Common;
|
|
22
|
+
export type ReferenceField = BaseReferenceField & Common;
|
|
23
|
+
export type RichText = BaseRichText & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
24
|
+
export type Select = BaseSelect & WithValidators & Common & WithPlaceHolder;
|
|
25
|
+
export type SliderField = BaseSliderField & WithValidators & Common;
|
|
26
|
+
export type TextArea = BaseTextArea & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
27
|
+
export type TextField = BaseTextField & WithIsMockup & WithValidators & WithReadonly & WithSlugTo & WithPrefix & WithPlaceHolder & Common;
|
|
28
|
+
export type ToggleField = BaseToggleField & Common;
|
|
29
|
+
export type UniqueCheck = BaseUniqueCheck & Common;
|
|
30
|
+
export type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
|
|
31
|
+
export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
32
|
+
export type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
33
|
+
export type SimpleContentTypeFields<WhiteListElements = unknown> = ArrayFieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ConditionalField | DateField | FieldGroup | FieldsDivider | FileField | HeadingField | ImageField | LinkField<WhiteListElements> | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
34
34
|
export {};
|