@griddo/core 1.74.37 → 1.75.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/README.md +60 -66
- package/dist/assets/svg/Delete.d.ts +3 -0
- package/dist/assets/svg/Duplicate.d.ts +3 -0
- package/dist/components/CloudinaryBackgroundImage/index.d.ts +23 -0
- package/dist/components/CloudinaryImage/index.d.ts +30 -0
- package/dist/components/Component/ComponentWrapper/index.d.ts +16 -0
- package/dist/components/Component/index.d.ts +27 -0
- package/dist/components/GriddoBackgroundImage/index.d.ts +7 -0
- package/dist/components/GriddoImage/index.d.ts +57 -0
- package/dist/components/GriddoLink/index.d.ts +59 -0
- package/dist/components/GriddoLink/utils.d.ts +9 -0
- package/dist/components/LdJson/index.d.ts +14 -0
- package/dist/components/Link/index.d.ts +15 -0
- package/dist/components/ModulePreview/index.d.ts +15 -0
- package/dist/components/Page/index.d.ts +16 -0
- package/dist/components/Preview/index.d.ts +11 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/constants/cloudinary.d.ts +17 -0
- package/dist/contexts/I18n/index.d.ts +24 -0
- package/dist/contexts/Navigation/index.d.ts +13 -0
- package/dist/contexts/Page/index.d.ts +15 -0
- package/dist/contexts/Site/index.d.ts +27 -0
- package/dist/contexts/index.d.ts +4 -0
- package/dist/functions/create-schemas/index.d.ts +18 -0
- package/dist/functions/image-utils.d.ts +43 -0
- package/dist/functions/index.d.ts +7 -0
- package/dist/functions/utils.d.ts +74 -0
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/themes/types.d.ts +20 -0
- package/dist/hooks/themes/useGlobalTheme.d.ts +6 -0
- package/dist/hooks/themes/useTheme.d.ts +8 -0
- package/dist/hooks/themes/useThemeColors.d.ts +8 -0
- package/dist/hooks/themes/useThemeFont.d.ts +8 -0
- package/dist/hooks/themes/useThemePrimitives.d.ts +8 -0
- package/dist/hooks/themes/utils.d.ts +61 -0
- package/dist/hooks/useContentType.d.ts +11 -0
- package/dist/hooks/useDataFilters.d.ts +35 -0
- package/dist/hooks/useGriddoImage.d.ts +49 -0
- package/dist/hooks/useI18n.d.ts +38 -0
- package/dist/hooks/useImage.d.ts +44 -0
- package/dist/hooks/useLink.d.ts +8 -0
- package/dist/hooks/useList.d.ts +36 -0
- package/dist/hooks/useNavigation.d.ts +5 -0
- package/dist/hooks/usePage.d.ts +11 -0
- package/dist/hooks/useReferenceFieldData.d.ts +11 -0
- package/dist/hooks/useSite.d.ts +12 -0
- package/dist/hooks/useSitemap.d.ts +7 -0
- package/dist/index.d.ts +24 -6
- package/dist/index.js +1 -1
- package/dist/types/constants/locales.d.ts +2 -0
- package/dist/types/constants/timezone.d.ts +2 -0
- package/dist/types/constants/utilities.d.ts +1 -0
- package/dist/types/core.d.ts +263 -0
- package/dist/types/fields.d.ts +191 -0
- package/dist/types/global.d.ts +33 -0
- package/dist/{src/types → types}/schema-functions/fields/base.d.ts +33 -43
- package/dist/{src/types/schema-functions/fields/page-data-fields.d.ts → types/schema-functions/fields/page-content-type-fields.d.ts} +4 -4
- package/dist/{src/types → types}/schema-functions/fields/props.d.ts +11 -26
- package/dist/{src/types/schema-functions/fields/pure-data-fields.d.ts → types/schema-functions/fields/simple-content-type-fields.d.ts} +4 -4
- package/dist/{src/types → types}/schema-functions/fields/ui-fields.d.ts +6 -6
- package/dist/types/schema-functions/schemas/Categories.d.ts +10 -0
- package/dist/types/schema-functions/schemas/ContentType.d.ts +4 -0
- package/dist/types/schema-functions/schemas/DamDefaults.d.ts +13 -0
- package/dist/{src/types/schema-functions/schemas/DataPackSchema.d.ts → types/schema-functions/schemas/DataPack.d.ts} +3 -4
- package/dist/types/schema-functions/schemas/DataPackCategory.d.ts +4 -0
- package/dist/{src/types/schema-functions/schemas/HeaderFooterSchema.d.ts → types/schema-functions/schemas/HeaderFooter.d.ts} +15 -16
- package/dist/types/schema-functions/schemas/Languages.d.ts +9 -0
- package/dist/{src/types/schema-functions/schemas/MenuSchema.d.ts → types/schema-functions/schemas/Menu.d.ts} +2 -2
- package/dist/types/schema-functions/schemas/ModuleCategories.d.ts +9 -0
- package/dist/types/schema-functions/schemas/PageContentType.d.ts +19 -0
- package/dist/types/schema-functions/schemas/SimpleContentType.d.ts +15 -0
- package/dist/types/schema-functions/schemas/Themes.d.ts +9 -0
- package/dist/types/schema-functions/schemas/Translations.d.ts +2 -0
- package/dist/types/schema-functions/schemas/UI.d.ts +49 -0
- package/dist/{src/types → types}/schema-functions/schemas/base.d.ts +15 -27
- package/dist/types/schema-functions/schemas/index.d.ts +12 -0
- package/dist/{src/types → types}/schema-functions/schemas/props.d.ts +6 -7
- package/dist/{src/types → types}/schema.d.ts +0 -0
- package/dist/types/theme.d.ts +51 -0
- package/package.json +74 -75
- package/dist/src/functions/create-schemas/index.d.ts +0 -69
- package/dist/src/functions/create-schemas/utils.d.ts +0 -33
- package/dist/src/types/core.d.ts +0 -419
- package/dist/src/types/fields.d.ts +0 -7
- package/dist/src/types/schema-functions/schemas/CategoriesSchema.d.ts +0 -13
- package/dist/src/types/schema-functions/schemas/DamDefaultsSchema.d.ts +0 -11
- package/dist/src/types/schema-functions/schemas/DataPackCategoriesSchema.d.ts +0 -4
- package/dist/src/types/schema-functions/schemas/LanguagesSchema.d.ts +0 -8
- package/dist/src/types/schema-functions/schemas/ModuleCategoriesSchema.d.ts +0 -6
- package/dist/src/types/schema-functions/schemas/PageDataSchema.d.ts +0 -20
- package/dist/src/types/schema-functions/schemas/PureDataSchema.d.ts +0 -14
- package/dist/src/types/schema-functions/schemas/ThemesSchema.d.ts +0 -11
- package/dist/src/types/schema-functions/schemas/TranslationsSchema.d.ts +0 -3
- package/dist/src/types/schema-functions/schemas/UISchema.d.ts +0 -47
- package/dist/src/types/schema-functions/schemas/index.d.ts +0 -14
- package/dist/src/types/theme.d.ts +0 -57
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
declare type GriddoComponent<T> = T & {
|
|
2
|
+
component: string;
|
|
3
|
+
};
|
|
4
|
+
export declare type ArrayFieldGroup<FieldKeys> = Array<FieldKeys>;
|
|
5
|
+
export declare type AsyncCheckGroup = Array<string>;
|
|
6
|
+
export declare type CheckGroupField<NameValues> = NameValues;
|
|
7
|
+
export declare type ColorPickerField = string;
|
|
8
|
+
export declare type ColorPickerFixedField = {
|
|
9
|
+
name: string;
|
|
10
|
+
hex: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type ComponentArrayField<ComponentProps> = Array<ComponentProps>;
|
|
13
|
+
export declare type ComponentContainerField<ComponentProps> = GriddoComponent<ComponentProps>;
|
|
14
|
+
export declare type ConditionalField<Values> = Values;
|
|
15
|
+
export declare type DateField = string;
|
|
16
|
+
export declare type FileField = {
|
|
17
|
+
/** URL for the document */
|
|
18
|
+
url?: string;
|
|
19
|
+
/** Size for the document file in bytes */
|
|
20
|
+
sizeBytes?: number;
|
|
21
|
+
/** Upload date */
|
|
22
|
+
uploadDate?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare type HeadingField<HeadingTagsType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6"> = {
|
|
25
|
+
/** Text content */
|
|
26
|
+
content?: string;
|
|
27
|
+
/** HTML tag used to render the content */
|
|
28
|
+
tag?: HeadingTagsType | null;
|
|
29
|
+
};
|
|
30
|
+
export declare type ImageField = {
|
|
31
|
+
/** Image id */
|
|
32
|
+
id?: number;
|
|
33
|
+
/** Original image name */
|
|
34
|
+
name?: string;
|
|
35
|
+
/** Image name from the gallery */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Image description from the gallery */
|
|
38
|
+
description?: string;
|
|
39
|
+
/** Alternative text for the image */
|
|
40
|
+
alt?: string;
|
|
41
|
+
/** Image tags from the gallery */
|
|
42
|
+
tags?: Array<string>;
|
|
43
|
+
/** Griddo DAM image url */
|
|
44
|
+
url?: string;
|
|
45
|
+
/** Griddo DAM image url thumbnail */
|
|
46
|
+
thumb?: string;
|
|
47
|
+
/** Cloudinary `public-id`
|
|
48
|
+
* @deprecated
|
|
49
|
+
* Cloudinary will be deprecated in the future
|
|
50
|
+
* */
|
|
51
|
+
publicId?: string;
|
|
52
|
+
/** Griddo DAM image id
|
|
53
|
+
* @deprecated
|
|
54
|
+
* This id is internal and should not be used
|
|
55
|
+
*/
|
|
56
|
+
damId?: string;
|
|
57
|
+
/** Image publication date */
|
|
58
|
+
published?: string;
|
|
59
|
+
/** Original image size in bytes */
|
|
60
|
+
size?: number;
|
|
61
|
+
/** Original image width in pixels */
|
|
62
|
+
width?: number;
|
|
63
|
+
/** Original image height in pixels */
|
|
64
|
+
height?: number;
|
|
65
|
+
/** Original image orientation
|
|
66
|
+
* P: Portrait
|
|
67
|
+
* L: Landscape
|
|
68
|
+
* S: Square
|
|
69
|
+
*/
|
|
70
|
+
orientation?: "P" | "L" | "S";
|
|
71
|
+
/** Site to which image belongs */
|
|
72
|
+
site?: number;
|
|
73
|
+
};
|
|
74
|
+
interface LinkFieldCommon {
|
|
75
|
+
/** Link text */
|
|
76
|
+
text?: string;
|
|
77
|
+
}
|
|
78
|
+
interface LinkFieldUrl extends LinkFieldCommon {
|
|
79
|
+
linkType: "url";
|
|
80
|
+
url: UrlField;
|
|
81
|
+
}
|
|
82
|
+
interface LinkFieldModal<T> extends LinkFieldCommon {
|
|
83
|
+
linkType: "modal";
|
|
84
|
+
modal?: {
|
|
85
|
+
[key: string]: ComponentContainerField<T>;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/** Field of type link in which a whitelist of modules can be added, for example to open them in a modal. */
|
|
89
|
+
export declare type LinkField<ModalComponents> = LinkFieldUrl | LinkFieldModal<ModalComponents>;
|
|
90
|
+
declare type SourceReturn<Relations> = Relations extends true ? {
|
|
91
|
+
id?: number;
|
|
92
|
+
label?: string;
|
|
93
|
+
} : number;
|
|
94
|
+
export declare type MultiCheckSelectField<Relations = unknown> = Relations extends false ? Array<SourceReturn<false>> : Array<SourceReturn<true>>;
|
|
95
|
+
export declare type MultiCheckSelectGroup<T extends string, Relations> = {
|
|
96
|
+
[K in T]: MultiCheckSelectField<Relations>;
|
|
97
|
+
};
|
|
98
|
+
export declare type NoteField = string;
|
|
99
|
+
export declare type NumberField = number;
|
|
100
|
+
export declare type RadioGroupField<Values> = Values;
|
|
101
|
+
export interface ReferenceField<ContentType> {
|
|
102
|
+
mode: "auto" | "manual";
|
|
103
|
+
order?: string;
|
|
104
|
+
fixed?: Array<number>;
|
|
105
|
+
source?: ContentType extends {
|
|
106
|
+
contentTypeName: unknown;
|
|
107
|
+
} ? Array<ContentType["contentTypeName"]> : never;
|
|
108
|
+
/** 0 means all */
|
|
109
|
+
quantity?: number;
|
|
110
|
+
filter?: Array<{
|
|
111
|
+
id: number;
|
|
112
|
+
label: string;
|
|
113
|
+
source: string;
|
|
114
|
+
}>;
|
|
115
|
+
fullRelations?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export declare type RichTextField = string;
|
|
118
|
+
export declare type ScrollableUniqueSelectionField = string;
|
|
119
|
+
export declare type SelectField<Values> = Values;
|
|
120
|
+
export declare type SliderField = number;
|
|
121
|
+
export declare type TextAreaField = string;
|
|
122
|
+
/** Return type of an TextField */
|
|
123
|
+
export declare type TextField = string;
|
|
124
|
+
export declare type TimeField = string;
|
|
125
|
+
export declare type UrlField = {
|
|
126
|
+
href?: string;
|
|
127
|
+
title?: string;
|
|
128
|
+
linkToURL?: string;
|
|
129
|
+
newTab?: boolean;
|
|
130
|
+
noFollow?: boolean;
|
|
131
|
+
subSlug?: string;
|
|
132
|
+
};
|
|
133
|
+
export declare type VisualUniqueSelectionField<Values> = Values;
|
|
134
|
+
export declare type WysiwygField = string;
|
|
135
|
+
declare type ConfigBase = {
|
|
136
|
+
type?: "link" | "group";
|
|
137
|
+
headerStyle?: string;
|
|
138
|
+
footerStyle?: string;
|
|
139
|
+
};
|
|
140
|
+
declare type MenuItemBase = {
|
|
141
|
+
label?: string;
|
|
142
|
+
url?: UrlField;
|
|
143
|
+
auxText?: string;
|
|
144
|
+
image?: ImageField;
|
|
145
|
+
};
|
|
146
|
+
interface GroupLinkType extends ConfigBase {
|
|
147
|
+
type?: "group";
|
|
148
|
+
}
|
|
149
|
+
interface ConfigLinkType extends ConfigBase {
|
|
150
|
+
type?: "link";
|
|
151
|
+
}
|
|
152
|
+
interface MenuChildrenGroupType extends MenuItemBase {
|
|
153
|
+
url?: never;
|
|
154
|
+
config?: GroupLinkType;
|
|
155
|
+
children?: Array<MenuElement>;
|
|
156
|
+
}
|
|
157
|
+
interface MenuChildrenLinkType extends MenuItemBase {
|
|
158
|
+
config?: ConfigLinkType;
|
|
159
|
+
children?: Array<MenuElement>;
|
|
160
|
+
}
|
|
161
|
+
export declare type MenuElement = MenuChildrenGroupType | MenuChildrenLinkType;
|
|
162
|
+
export declare type Menu = {
|
|
163
|
+
elements: Array<MenuElement>;
|
|
164
|
+
};
|
|
165
|
+
export declare type TemplateSection<GriddoModule> = {
|
|
166
|
+
modules: Array<GriddoModule>;
|
|
167
|
+
};
|
|
168
|
+
export declare type QueriedDataOf<ContentType> = Array<{
|
|
169
|
+
structuredData?: ContentType extends {
|
|
170
|
+
contentTypeName: unknown;
|
|
171
|
+
} ? ContentType["contentTypeName"] : never;
|
|
172
|
+
content?: Omit<ContentType, "contentTypeName">;
|
|
173
|
+
relatedPage?: {
|
|
174
|
+
pageId: number;
|
|
175
|
+
url?: string;
|
|
176
|
+
origin?: string;
|
|
177
|
+
availableSites?: Array<{
|
|
178
|
+
id?: number;
|
|
179
|
+
name?: string;
|
|
180
|
+
}>;
|
|
181
|
+
editable?: boolean;
|
|
182
|
+
manuallyImported?: boolean;
|
|
183
|
+
originalPageId?: number;
|
|
184
|
+
originalStructuredDataId?: number;
|
|
185
|
+
};
|
|
186
|
+
relatedSite?: number;
|
|
187
|
+
modified?: string;
|
|
188
|
+
published?: string;
|
|
189
|
+
}>;
|
|
190
|
+
export declare type QueriedData<ContentType> = QueriedDataOf<ContentType>;
|
|
191
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Fields } from "../index";
|
|
2
|
+
export interface SetQueryProps<ContentType> {
|
|
3
|
+
/** The ReferenceField prop */
|
|
4
|
+
data?: Fields.ReferenceField<ContentType>;
|
|
5
|
+
/** The URL of the public API, if not provided, will be obtained from the context */
|
|
6
|
+
apiUrl?: string;
|
|
7
|
+
/** Number of items that will be fetched */
|
|
8
|
+
items?: number;
|
|
9
|
+
/** Language id for the fetched data, if not provided, will be obtained from the context */
|
|
10
|
+
lang?: number;
|
|
11
|
+
/** For the MANUAL content type, in combination with `itemsPerPage` return the "page" for the content type items */
|
|
12
|
+
page?: number;
|
|
13
|
+
/** Site id, if not provided, will be obtained from the context */
|
|
14
|
+
site?: number;
|
|
15
|
+
/** String array of the keys/properties in order to restrict the query. */
|
|
16
|
+
fields?: Array<keyof Omit<ContentType, "contentTypeName">>;
|
|
17
|
+
/** Array of content type ids to filter the query */
|
|
18
|
+
filterIds?: Array<number>;
|
|
19
|
+
/** String as HASH to cache the query (Mostly interal use) */
|
|
20
|
+
cached?: string;
|
|
21
|
+
/** Search string, the spaces will be removed */
|
|
22
|
+
search?: string;
|
|
23
|
+
/** Operator OR | AND */
|
|
24
|
+
operator?: "and" | "or" | "AND" | "OR";
|
|
25
|
+
/** Operator OR | AND */
|
|
26
|
+
filterOperator?: "and" | "or" | "AND" | "OR";
|
|
27
|
+
/** Operator OR | AND */
|
|
28
|
+
globalOperator?: "and" | "or" | "AND" | "OR";
|
|
29
|
+
/** Array of content types ids to exclude from the query */
|
|
30
|
+
exclude?: Array<number>;
|
|
31
|
+
/** Indicates if we want to obtain a list with all the available relationship options, for example to make search filters. */
|
|
32
|
+
relations?: boolean;
|
|
33
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WithDisabled, WithEntity, WithGroup,
|
|
1
|
+
import { WithDisabled, WithEntity, WithGroup, HTMLHeadingTag, Option, WithSource, ThemeColors, ThemeFixedColors, ThemeVisualUniqueSelection, ThumbnailOption } from "./props";
|
|
2
2
|
export declare type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
3
3
|
interface GenericField {
|
|
4
|
-
/** Sets the field type */
|
|
4
|
+
/** Sets the field type. */
|
|
5
5
|
type: string;
|
|
6
6
|
/** Value with which the field will be identified in the API. Use camelCase. */
|
|
7
7
|
key: string;
|
|
@@ -11,9 +11,7 @@ interface GenericField {
|
|
|
11
11
|
mandatory?: boolean;
|
|
12
12
|
}
|
|
13
13
|
interface GenericComponentField extends GenericField {
|
|
14
|
-
/** Forces all elements of the Array to be of the same type. If this option is
|
|
15
|
-
* enabled the schema should include a `VisualUniqueSelection` to choose the
|
|
16
|
-
* type. */
|
|
14
|
+
/** Forces all elements of the Array to be of the same type. If this option is enabled the schema should include a `VisualUniqueSelection` to choose the type. */
|
|
17
15
|
elementUniqueSelection?: boolean;
|
|
18
16
|
/** Maximum number of components that can be added. */
|
|
19
17
|
maxItems?: number | null;
|
|
@@ -23,8 +21,7 @@ interface GenericArrayFieldGroup extends GenericField {
|
|
|
23
21
|
name: string;
|
|
24
22
|
/** Add a FieldsDivider field as a header. */
|
|
25
23
|
divider?: FieldsDividerData;
|
|
26
|
-
/** The two ways to display the array of items, with the fields collapsed
|
|
27
|
-
* (dropdown) or visible (inline). */
|
|
24
|
+
/** The two ways to display the array of items, with the fields collapsed (dropdown) or visible (inline). */
|
|
28
25
|
arrayType: string;
|
|
29
26
|
/** Fields template to be repeated in each item. */
|
|
30
27
|
fields: Array<unknown>;
|
|
@@ -57,20 +54,17 @@ export interface BaseCheckGroup extends GenericField, WithGroup {
|
|
|
57
54
|
interface GenericColorPicker extends GenericField {
|
|
58
55
|
/** Texfield that allows to display a modal to choose a color. */
|
|
59
56
|
type: "ColorPicker";
|
|
60
|
-
/** If `true` (only fixed colors are used) the text field is disabled and the
|
|
61
|
-
* name value is stored, which will be common to all theme options. In this
|
|
62
|
-
* case, the scheme colors must be declared as an array of objects. */
|
|
57
|
+
/** If `true` (only fixed colors are used) the text field is disabled and the name value is stored, which will be common to all theme options. In this case, the scheme colors must be declared as an array of objects. */
|
|
63
58
|
onlyFixedColors?: boolean;
|
|
64
59
|
}
|
|
65
60
|
interface DynamicColorPicker extends GenericColorPicker {
|
|
66
61
|
onlyFixedColors?: false;
|
|
67
|
-
/** Array of hexadecimal codes of the colors that will appear by default. It is
|
|
68
|
-
* also possible to specify a theme to customize the colors. */
|
|
62
|
+
/** Array of hexadecimal codes of the colors that will appear by default. It is also possible to specify a theme to customize the colors. */
|
|
69
63
|
colors: Array<string> | Array<ThemeColors>;
|
|
70
64
|
}
|
|
71
65
|
interface FixedColorPicker extends GenericColorPicker {
|
|
72
66
|
onlyFixedColors?: true;
|
|
73
|
-
/** Array of objects with { name: 'primitiveName', hex: '#xxxxxx' } */
|
|
67
|
+
/** Array of objects with { name: 'primitiveName', hex: '#xxxxxx' }. */
|
|
74
68
|
colors: Array<ThemeFixedColors>;
|
|
75
69
|
}
|
|
76
70
|
export declare type BaseColorPicker = DynamicColorPicker | FixedColorPicker;
|
|
@@ -83,10 +77,7 @@ export interface BaseComponentContainer extends GenericComponentField {
|
|
|
83
77
|
type: "ComponentContainer";
|
|
84
78
|
}
|
|
85
79
|
export interface BaseConditionalField<FieldsType> extends GenericField {
|
|
86
|
-
/** Set of radio buttons to show or hide different fields according to the
|
|
87
|
-
* chosen value. The fields inside fields must have the key condition with one
|
|
88
|
-
* of the options values to show the field when the value of the radio button
|
|
89
|
-
* matches the condition. */
|
|
80
|
+
/** Set of radio buttons to show or hide different fields according to the chosen value. The fields inside fields must have the key condition with one of the options values to show the field when the value of the radio button matches the condition. */
|
|
90
81
|
type: "ConditionalField";
|
|
91
82
|
/** Array of options (radio buttons). */
|
|
92
83
|
options: Array<Option>;
|
|
@@ -127,24 +118,23 @@ export interface BaseHeadingField extends GenericField {
|
|
|
127
118
|
advanced?: boolean;
|
|
128
119
|
/** Field defaults. */
|
|
129
120
|
default: {
|
|
130
|
-
tag:
|
|
121
|
+
tag: HTMLHeadingTag;
|
|
131
122
|
content: string;
|
|
132
123
|
};
|
|
133
124
|
/** Array of options that will appear in the Select. */
|
|
134
125
|
options: Array<{
|
|
135
|
-
value:
|
|
126
|
+
value: HTMLHeadingTag;
|
|
136
127
|
label: string;
|
|
137
128
|
}>;
|
|
138
129
|
}
|
|
139
130
|
export interface BaseImageField extends GenericField {
|
|
140
|
-
/** Allows the user to upload an image */
|
|
131
|
+
/** Allows the user to upload an image. */
|
|
141
132
|
type: "ImageField";
|
|
142
|
-
/** If true crops the preview, if `false` scales the preview. Default: `false
|
|
133
|
+
/** If true crops the preview, if `false` scales the preview. Default: `false`. */
|
|
143
134
|
cropPreview?: boolean;
|
|
144
135
|
}
|
|
145
136
|
export interface BaseLinkField extends GenericField {
|
|
146
|
-
/** Campo que combina `TextField` + `ConditionalField` (`UrlField` o
|
|
147
|
-
* `ComponentContainer`) */
|
|
137
|
+
/** Campo que combina `TextField` + `ConditionalField` (`UrlField` o `ComponentContainer`). */
|
|
148
138
|
type: "LinkField";
|
|
149
139
|
}
|
|
150
140
|
export interface BaseMultiCheckSelect extends GenericField, WithSource {
|
|
@@ -154,29 +144,32 @@ export interface BaseMultiCheckSelect extends GenericField, WithSource {
|
|
|
154
144
|
export interface BaseMultiCheckSelectGroup extends GenericField {
|
|
155
145
|
/** Field to render multiple MultiCheckSelect. */
|
|
156
146
|
type: "MultiCheckSelectGroup";
|
|
157
|
-
/** `NoteField` with help text appearing under the label */
|
|
147
|
+
/** `NoteField` with help text appearing under the label. */
|
|
158
148
|
note?: string;
|
|
159
|
-
/** Array with the data from the different `MultiCheckSelect
|
|
149
|
+
/** Array with the data from the different `MultiCheckSelect`. */
|
|
160
150
|
elements: Array<DistributiveOmit<BaseMultiCheckSelect, "type">>;
|
|
161
|
-
/** If filled is `true` the field will have a white background. Default: false */
|
|
151
|
+
/** If filled is `true` the field will have a white background. Default: `false`. */
|
|
162
152
|
filled?: boolean;
|
|
163
153
|
}
|
|
164
154
|
export interface BaseNoteField extends GenericField {
|
|
165
155
|
/** Field to add a highlighted text. */
|
|
166
156
|
type: "NoteField";
|
|
167
|
-
/** Default value for NoteField */
|
|
157
|
+
/** Default value for NoteField. */
|
|
168
158
|
value?: {
|
|
169
159
|
title: string;
|
|
170
160
|
text: string;
|
|
171
161
|
};
|
|
172
162
|
}
|
|
173
163
|
export interface BaseNumberField extends Omit<BaseSliderField, "type" | "step"> {
|
|
174
|
-
/** Field for numbers. Includes buttons to increment or decrement the value of
|
|
175
|
-
* the field. */
|
|
164
|
+
/** Field for numbers. Includes buttons to increment or decrement the value of the field. */
|
|
176
165
|
type: "NumberField";
|
|
177
|
-
/** Min value */
|
|
166
|
+
/** Min value. */
|
|
167
|
+
min?: number;
|
|
168
|
+
/** Max value. */
|
|
169
|
+
max?: number;
|
|
170
|
+
/** @deprecated use `min` instead. */
|
|
178
171
|
minValue?: number;
|
|
179
|
-
/**
|
|
172
|
+
/** @deprecated use `max` instead. */
|
|
180
173
|
maxValue?: number;
|
|
181
174
|
}
|
|
182
175
|
export interface BaseRadioGroup extends GenericField, WithGroup {
|
|
@@ -184,8 +177,7 @@ export interface BaseRadioGroup extends GenericField, WithGroup {
|
|
|
184
177
|
type: "RadioGroup";
|
|
185
178
|
}
|
|
186
179
|
export interface BaseReferenceField extends GenericField {
|
|
187
|
-
/** Field that loads Structured Data (usually pure) from the database. It is
|
|
188
|
-
* usually used in distributor modules. */
|
|
180
|
+
/** Field that loads Structured Data (usually pure) from the database. It is usually used in distributor modules. */
|
|
189
181
|
type: "ReferenceField";
|
|
190
182
|
/** Selection types: manual, automatic or both. Default: ["auto", "manual"]. */
|
|
191
183
|
selectionType?: Array<"auto" | "manual">;
|
|
@@ -195,8 +187,7 @@ export interface BaseReferenceField extends GenericField {
|
|
|
195
187
|
source: Array<string>;
|
|
196
188
|
}
|
|
197
189
|
export interface BaseRichText extends GenericField {
|
|
198
|
-
/** TextArea with simple editor that exports to markdown or html. Uses the
|
|
199
|
-
* draft.js and react-draft-wysiwyg.js libraries */
|
|
190
|
+
/** TextArea with simple editor that exports to markdown or html. Uses the draft.js and react-draft-wysiwyg.js libraries. */
|
|
200
191
|
type: "RichText";
|
|
201
192
|
/** If true export to `html` instead of `markdown`. Default: `false`. */
|
|
202
193
|
html?: boolean;
|
|
@@ -213,17 +204,18 @@ export interface BaseSelect extends GenericField, WithDisabled {
|
|
|
213
204
|
export interface BaseSliderField extends GenericField {
|
|
214
205
|
/** Field to render a slider. Returns a number. */
|
|
215
206
|
type: "SliderField";
|
|
216
|
-
/** Increment with each slider step. Default: `1
|
|
207
|
+
/** Increment with each slider step. Default: `1`. */
|
|
217
208
|
step?: 0.1 | 1 | 2 | 5 | 10 | (number & {});
|
|
218
|
-
/** Minimum slider value. Default: `1
|
|
209
|
+
/** Minimum slider value. Default: `1`. */
|
|
219
210
|
min?: number;
|
|
220
|
-
/** Maximum slider value. Default: `100
|
|
211
|
+
/** Maximum slider value. Default: `100`. */
|
|
221
212
|
max?: number;
|
|
222
213
|
/** String to display in front of the value in the slider tooltip. */
|
|
223
214
|
prefix?: string;
|
|
224
215
|
/** String to display after the value in the slider tooltip. */
|
|
225
216
|
suffix?: string;
|
|
226
|
-
/** Default value of the slider. Default is the minimum value.
|
|
217
|
+
/** Default value of the slider. Default is the minimum value.
|
|
218
|
+
* @deprecated Set the default value for the field inside the Schema `default` property */
|
|
227
219
|
defaultValue?: number;
|
|
228
220
|
}
|
|
229
221
|
export interface BaseTextArea extends GenericField {
|
|
@@ -247,8 +239,7 @@ export interface BaseUniqueCheck extends GenericField {
|
|
|
247
239
|
}>;
|
|
248
240
|
}
|
|
249
241
|
export interface BaseUrlField extends GenericField {
|
|
250
|
-
/** `TextField` to link external pages or urls. Display two checkboxes for
|
|
251
|
-
* `nofollow` and open in a new tab: `newTab` */
|
|
242
|
+
/** `TextField` to link external pages or urls. Display two checkboxes for `nofollow` and open in a new tab: `newTab`. */
|
|
252
243
|
type: "UrlField";
|
|
253
244
|
/** Enables to display checks. Default: `false`. */
|
|
254
245
|
advanced?: boolean;
|
|
@@ -264,8 +255,7 @@ export interface BaseVisualUniqueSelection extends GenericField {
|
|
|
264
255
|
export interface BaseWysiwyg extends GenericField {
|
|
265
256
|
/** `TextArea` with Froala editor. */
|
|
266
257
|
type: "Wysiwyg";
|
|
267
|
-
/** Option to show the full version of the toolbar with all buttons. Default:
|
|
268
|
-
* `true`. */
|
|
258
|
+
/** Option to show the full version of the toolbar with all buttons. Default: `true`. */
|
|
269
259
|
full?: boolean;
|
|
270
260
|
}
|
|
271
261
|
export declare 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;
|
|
@@ -1,9 +1,9 @@
|
|
|
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, WithSearchable, WithShowList, WithFrom } from "./props";
|
|
3
3
|
declare type Common = WithFrom & WithIndexable & WithSearchable & WithShowList;
|
|
4
|
-
export declare type ArrayFieldGroup = BaseArrayFieldGroup<
|
|
5
|
-
export declare type ConditionalField = BaseConditionalField<
|
|
6
|
-
export declare type FieldGroup = BaseFieldGroup<
|
|
4
|
+
export declare type ArrayFieldGroup = BaseArrayFieldGroup<PageContentTypeFields> & Common;
|
|
5
|
+
export declare type ConditionalField = BaseConditionalField<PageContentTypeFields> & Common;
|
|
6
|
+
export declare type FieldGroup = BaseFieldGroup<PageContentTypeFields> & Common;
|
|
7
7
|
export declare type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
8
8
|
export declare type AsyncSelect = BaseAsyncSelect & Common;
|
|
9
9
|
export declare type CheckGroup = BaseCheckGroup & Common;
|
|
@@ -32,5 +32,5 @@ export declare type UniqueCheck = BaseUniqueCheck & Common;
|
|
|
32
32
|
export declare type UrlField = BaseUrlField & Common;
|
|
33
33
|
export declare type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
34
34
|
export declare type Wysiwyg = BaseWysiwyg & Common;
|
|
35
|
-
export declare type
|
|
35
|
+
export declare type PageContentTypeFields = ArrayFieldGroup | ConditionalField | FieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentArray | ComponentContainer | DateField | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
36
36
|
export {};
|
|
@@ -7,8 +7,7 @@ export declare type WithEntity = {
|
|
|
7
7
|
entity: "menu_containers" | "pages" | "categories";
|
|
8
8
|
};
|
|
9
9
|
export declare type WithFrom = {
|
|
10
|
-
/** The property of the page template from which the value of that field should
|
|
11
|
-
* be extracted. */
|
|
10
|
+
/** The property of the page template from which the value of that field should be extracted. */
|
|
12
11
|
from: string;
|
|
13
12
|
};
|
|
14
13
|
export declare type WithGroup = {
|
|
@@ -23,18 +22,14 @@ export declare type WithHideable = {
|
|
|
23
22
|
/** If `true` the field can be hidden in the editor. */
|
|
24
23
|
hideable?: boolean;
|
|
25
24
|
};
|
|
26
|
-
export declare type
|
|
25
|
+
export declare type HTMLHeadingTag = "h1" | "h2" | "h3" | "h4";
|
|
27
26
|
export declare type WithIndexable = {
|
|
28
|
-
/** Default is false. If that field is to be used as an index (to be able to
|
|
29
|
-
* sort by that field, etc.) */
|
|
27
|
+
/** Default is false. If that field is to be used as an index (to be able to sort by that field, etc.) */
|
|
30
28
|
indexable?: boolean;
|
|
31
29
|
};
|
|
32
|
-
/** Por defecto es false. Si ese campo se va a utilizar como índice (para poder
|
|
33
|
-
* ordenar por ese campo, etc.) */
|
|
30
|
+
/** Por defecto es false. Si ese campo se va a utilizar como índice (para poder ordenar por ese campo, etc.) */
|
|
34
31
|
export declare type WithIsMockup = {
|
|
35
|
-
/** Mark the content of the default field as dummy content which forces the
|
|
36
|
-
* user editor to change it. Otherwise when trying to publish the Griddo
|
|
37
|
-
* editor will warn us to change it. */
|
|
32
|
+
/** 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. */
|
|
38
33
|
isMockup?: boolean;
|
|
39
34
|
};
|
|
40
35
|
export declare type Option = {
|
|
@@ -60,23 +55,19 @@ export declare type WithReadonly = {
|
|
|
60
55
|
readonly?: boolean;
|
|
61
56
|
};
|
|
62
57
|
export declare type WithSearchable = {
|
|
63
|
-
/** Only for the field with key "title". If set to false, this title will not
|
|
64
|
-
* be used in searches. */
|
|
58
|
+
/** Only for the field with key "title". If set to false, this title will not be used in searches. */
|
|
65
59
|
searchable?: boolean;
|
|
66
60
|
};
|
|
67
61
|
export declare type SearchFrom = {
|
|
68
|
-
/** An array of `keys` representing the fields by which a search can be
|
|
69
|
-
* performed. */
|
|
62
|
+
/** An array of `keys` representing the fields by which a search can be performed. */
|
|
70
63
|
searchFrom?: Array<string>;
|
|
71
64
|
};
|
|
72
65
|
export declare type WithShowList = {
|
|
73
|
-
/** Default is false. If in the lists this field must be included as another
|
|
74
|
-
* data. WARNING: normally if it is showList it must also be indexable. */
|
|
66
|
+
/** 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. */
|
|
75
67
|
showList?: boolean;
|
|
76
68
|
};
|
|
77
69
|
export declare type WithSlugTo = {
|
|
78
|
-
/** If a key is specified, the value of this field will appear in the text
|
|
79
|
-
* field that has that key in slug format. */
|
|
70
|
+
/** If a key is specified, the value of this field will appear in the text field that has that key in slug format. */
|
|
80
71
|
slugTo?: string;
|
|
81
72
|
};
|
|
82
73
|
export declare type WithSource = {
|
|
@@ -115,17 +106,11 @@ export declare type WithValidators = {
|
|
|
115
106
|
maxValue?: number;
|
|
116
107
|
/** Validates that the content of the field complies with a specific format. */
|
|
117
108
|
format?: "email" | "URL" | "phone";
|
|
118
|
-
/** Validates that the date is in the future or past according to the current
|
|
119
|
-
* day. */
|
|
109
|
+
/** Validates that the date is in the future or past according to the current day. */
|
|
120
110
|
dateFormat?: "futureDate" | "pastDate";
|
|
121
111
|
};
|
|
122
112
|
};
|
|
123
|
-
export declare type WithValue = {
|
|
124
|
-
/** Default value of the field. */
|
|
125
|
-
value?: unknown;
|
|
126
|
-
};
|
|
127
113
|
export declare type WithWhiteList = {
|
|
128
|
-
/** Array of strings with the names of the modules or components that can be
|
|
129
|
-
* added. */
|
|
114
|
+
/** Array of strings with the names of the modules or components that can be added. */
|
|
130
115
|
whiteList: Array<string>;
|
|
131
116
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
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, WithSearchable, WithShowList, WithSlugTo, WithValidators } from "./props";
|
|
3
3
|
declare type Common = WithHideable & WithIndexable & WithSearchable & WithShowList & WithHelpText;
|
|
4
|
-
export declare type ArrayFieldGroup = BaseArrayFieldGroup<
|
|
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;
|
|
7
7
|
export declare type CheckGroup = BaseCheckGroup & Common;
|
|
8
8
|
export declare type ColorPicker = BaseColorPicker & Common;
|
|
9
|
-
export declare type ConditionalField = BaseConditionalField<
|
|
9
|
+
export declare type ConditionalField = BaseConditionalField<SimpleContentTypeFields> & Common;
|
|
10
10
|
export declare type DateField = BaseDateField & WithValidators & Common & WithPlaceHolder;
|
|
11
|
-
export declare type FieldGroup = BaseFieldGroup<
|
|
11
|
+
export declare type FieldGroup = BaseFieldGroup<SimpleContentTypeFields> & Common;
|
|
12
12
|
export declare type FieldsDivider = BaseFieldsDivider & Common;
|
|
13
13
|
export declare type FileField = BaseFileField & Common & WithPlaceHolder;
|
|
14
14
|
export declare type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
@@ -30,5 +30,5 @@ export declare type UniqueCheck = BaseUniqueCheck & Common;
|
|
|
30
30
|
export declare type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
|
|
31
31
|
export declare type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
32
32
|
export declare type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
33
|
-
export declare type
|
|
33
|
+
export declare type SimpleContentTypeFields = ArrayFieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ConditionalField | DateField | FieldGroup | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
34
34
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
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 { WithHelpText, WithHideable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithSlugTo, WithValidators,
|
|
3
|
-
export declare type Common = WithHelpText & WithHideable
|
|
4
|
-
export declare type ArrayFieldGroup = BaseArrayFieldGroup<
|
|
2
|
+
import { WithHelpText, WithHideable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithSlugTo, WithValidators, WithWhiteList } from "./props";
|
|
3
|
+
export declare type Common = WithHelpText & WithHideable;
|
|
4
|
+
export declare type ArrayFieldGroup = BaseArrayFieldGroup<UIFields> & Common;
|
|
5
5
|
export declare type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
6
6
|
export declare type AsyncSelect = BaseAsyncSelect & Common & WithPlaceHolder;
|
|
7
7
|
export declare type CheckGroup = BaseCheckGroup & Common;
|
|
8
8
|
export declare type ColorPicker = BaseColorPicker & Common;
|
|
9
9
|
export declare type ComponentArray = BaseComponentArray & WithWhiteList & Common;
|
|
10
10
|
export declare type ComponentContainer = BaseComponentContainer & WithWhiteList & Common;
|
|
11
|
-
export declare type ConditionalField = BaseConditionalField<
|
|
11
|
+
export declare type ConditionalField = BaseConditionalField<UIFields> & Common;
|
|
12
12
|
export declare type DateField = BaseDateField & WithValidators & Common & WithPlaceHolder;
|
|
13
|
-
export declare type FieldGroup = BaseFieldGroup<
|
|
13
|
+
export declare type FieldGroup = BaseFieldGroup<UIFields> & Common;
|
|
14
14
|
export declare type FieldsDivider = BaseFieldsDivider & Common;
|
|
15
15
|
export declare type FileField = BaseFileField & Common & WithPlaceHolder;
|
|
16
16
|
export declare type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
@@ -32,4 +32,4 @@ export declare type UniqueCheck = BaseUniqueCheck & Common;
|
|
|
32
32
|
export declare type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
|
|
33
33
|
export declare type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
34
34
|
export declare type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
35
|
-
export declare type
|
|
35
|
+
export declare type UIFields = ArrayFieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentArray | ComponentContainer | ConditionalField | DateField | FieldGroup | FieldsDivider | FileField | HeadingField | ImageField | LinkField | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseContentType } from "./base";
|
|
2
|
+
import { DataPacks } from "./props";
|
|
3
|
+
export interface Categories extends BaseContentType, Required<DataPacks> {
|
|
4
|
+
/** Indicates that it is a category, must always be `true`. */
|
|
5
|
+
taxonomy: true;
|
|
6
|
+
/** Indicates that the data is of type simple/category. Must always be `false`. */
|
|
7
|
+
fromPage: false;
|
|
8
|
+
/** It is not necessary to indicate `schema` in the categories. */
|
|
9
|
+
schema?: never;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ImageCropType, ImageDecoding, ImageLoading } from "../../core";
|
|
2
|
+
export interface DamDefaults {
|
|
3
|
+
/** Quality compression for the jpeg, webp and avif formats. */
|
|
4
|
+
quality?: number;
|
|
5
|
+
/** Kind of crop of Griddo DAM. */
|
|
6
|
+
crop?: ImageCropType;
|
|
7
|
+
/** Kind of loading for the browser. */
|
|
8
|
+
loading?: ImageLoading;
|
|
9
|
+
/** Kind of decoding for the browser. */
|
|
10
|
+
decoding?: ImageDecoding;
|
|
11
|
+
/** Griddo cdn formats. */
|
|
12
|
+
formats?: Array<"webp" | "avif">;
|
|
13
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface DataPack {
|
|
2
2
|
/** Title of the Data Pack that will appear in the Griddo editor. */
|
|
3
3
|
title: string;
|
|
4
|
-
/** Data Pack Category */
|
|
4
|
+
/** Data Pack Category. */
|
|
5
5
|
category: string;
|
|
6
6
|
/** Description of the Data Pack that will appear in the Griddo editor. */
|
|
7
7
|
description: string;
|
|
8
|
-
/** Thumbnail of the Data Pack that will appear in the Griddo editor. It can be
|
|
9
|
-
* an image or an object representing an image for each teheme. */
|
|
8
|
+
/** Thumbnail of the Data Pack that will appear in the Griddo editor. It can be an image or an object representing an image for each teheme. */
|
|
10
9
|
image?: {
|
|
11
10
|
[key: string]: unknown;
|
|
12
11
|
} | string;
|