@griddo/core 1.75.249 → 1.75.251

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.
@@ -1,11 +1,11 @@
1
1
  import type { FieldReturnTypes, Fields, SchemaFieldTypes, SchemaType } from "./types";
2
2
  import type { UIFields } from "../../types/schema-fields/ui-fields";
3
3
  /** Get all fields from one schema */
4
- declare function getAllFields(schema: SchemaType): [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 & {
4
+ declare function getAllFields(schema: SchemaType): UIFields[] | [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
5
  key: "title";
6
- }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields<unknown>[]] | [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 & {
6
+ }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields[]] | [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 & {
7
7
  key: "title";
8
- }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]] | UIFields<unknown>[];
8
+ }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields[]];
9
9
  /** Build a interface prop based on the field from the schema.
10
10
  * Optionally it can receives a custom value for the type and a generic string to use as generic value
11
11
  *
@@ -62,14 +62,84 @@ declare function getGenericFromWhitelist(whiteList: Array<string>): string;
62
62
  * [ {component: "BasicContent"}, {component: "NewsTemplate"}, ... ]
63
63
  */
64
64
  declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
65
+ component: string;
66
+ taxonomy: false;
67
+ fromPage: true;
68
+ schema: import("../../types/schema-fields/props").SearchFrom & {
69
+ templates: string[];
70
+ 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 & {
71
+ key: "title";
72
+ }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields[]];
73
+ };
74
+ title: string;
75
+ local?: boolean | undefined;
76
+ editable?: boolean | undefined;
77
+ translate?: boolean | undefined;
78
+ clone?: {
79
+ cloneAll: boolean;
80
+ sourceSites: number[];
81
+ targetSites: {
82
+ site: number;
83
+ path: string;
84
+ mandatory: boolean;
85
+ }[];
86
+ sections: {
87
+ section: string;
88
+ sync: string;
89
+ }[];
90
+ } | null | undefined;
91
+ defaultValues?: unknown;
92
+ _autoType?: {
93
+ relations?: boolean | undefined;
94
+ } | undefined;
95
+ dataPacks?: string[] | null | undefined;
96
+ expirationDateField?: string | undefined;
97
+ expirationDateOffset?: number | undefined;
98
+ } | {
99
+ component: string;
100
+ fromPage: false;
101
+ schema: import("../../types/schema-fields/props").SearchFrom & {
102
+ 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 & {
103
+ key: "title";
104
+ }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields[]];
105
+ };
106
+ title: string;
107
+ local?: boolean | undefined;
108
+ taxonomy?: boolean | undefined;
109
+ editable?: boolean | undefined;
110
+ translate?: boolean | undefined;
111
+ clone?: {
112
+ cloneAll: boolean;
113
+ sourceSites: number[];
114
+ targetSites: {
115
+ site: number;
116
+ path: string;
117
+ mandatory: boolean;
118
+ }[];
119
+ sections: {
120
+ section: string;
121
+ sync: string;
122
+ }[];
123
+ } | null | undefined;
124
+ defaultValues?: unknown;
125
+ _autoType?: {
126
+ relations?: boolean | undefined;
127
+ } | undefined;
128
+ dataPacks?: string[] | null | undefined;
129
+ expirationDateField?: string | undefined;
130
+ expirationDateOffset?: number | undefined;
131
+ } | {
65
132
  component: string;
66
133
  schemaType: "component";
67
- default: import("../../types/schemas/UI").BaseDefault;
68
- configTabs: import("../../types/schemas/props").ConfigTabs<unknown>[];
134
+ default: {
135
+ [key: string]: any;
136
+ component: string;
137
+ };
138
+ configTabs: import("../../types/schemas/props").ConfigTabs[];
69
139
  singleInstance?: boolean | undefined;
70
140
  category?: string | undefined;
71
141
  displayName: string;
72
- sectionList?: unknown;
142
+ sectionList?: Record<string, string[]> | undefined;
73
143
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
74
144
  [key: string]: import("../../types/schemas/props").Thumbnails;
75
145
  } | undefined;
@@ -80,12 +150,20 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
80
150
  } | {
81
151
  component: string;
82
152
  schemaType: "module";
83
- default: import("../../types/schemas/UI").ContentTypeModuleDefault;
84
- configTabs: import("../../types/schemas/props").ConfigTabs<unknown>[];
153
+ default: {
154
+ [key: string]: any;
155
+ component: string;
156
+ hasDistributorData: true;
157
+ data: Omit<import("../../types/api-response-fields").Reference<unknown>, "source" | "mode"> & {
158
+ mode: "auto" | "manual";
159
+ source?: string[] | undefined;
160
+ };
161
+ };
162
+ configTabs: import("../../types/schemas/props").ConfigTabs[];
85
163
  singleInstance?: boolean | undefined;
86
164
  category?: string | undefined;
87
165
  displayName: string;
88
- sectionList?: unknown;
166
+ sectionList?: Record<string, string[]> | undefined;
89
167
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
90
168
  [key: string]: import("../../types/schemas/props").Thumbnails;
91
169
  } | undefined;
@@ -96,12 +174,17 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
96
174
  } | {
97
175
  component: string;
98
176
  schemaType: "module";
99
- default: import("../../types/schemas/UI").MultiPageModuleDefault;
100
- configTabs: import("../../types/schemas/props").ConfigTabs<unknown>[];
177
+ default: {
178
+ [key: string]: any;
179
+ component: string;
180
+ hasGriddoMultiPage: true;
181
+ elements: unknown[];
182
+ };
183
+ configTabs: import("../../types/schemas/props").ConfigTabs[];
101
184
  singleInstance?: boolean | undefined;
102
185
  category?: string | undefined;
103
186
  displayName: string;
104
- sectionList?: unknown;
187
+ sectionList?: Record<string, string[]> | undefined;
105
188
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
106
189
  [key: string]: import("../../types/schemas/props").Thumbnails;
107
190
  } | undefined;
@@ -112,12 +195,15 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
112
195
  } | {
113
196
  component: string;
114
197
  schemaType: "module";
115
- default: import("../../types/schemas/UI").BaseDefault;
116
- configTabs: import("../../types/schemas/props").ConfigTabs<unknown>[];
198
+ default: {
199
+ [key: string]: any;
200
+ component: string;
201
+ };
202
+ configTabs: import("../../types/schemas/props").ConfigTabs[];
117
203
  singleInstance?: boolean | undefined;
118
204
  category?: string | undefined;
119
205
  displayName: string;
120
- sectionList?: unknown;
206
+ sectionList?: Record<string, string[]> | undefined;
121
207
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
122
208
  [key: string]: import("../../types/schemas/props").Thumbnails;
123
209
  } | undefined;
@@ -127,7 +213,11 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
127
213
  } | undefined;
128
214
  } | {
129
215
  component: string;
130
- default: import("../../types/schemas/UI").TemplateDefaultBase;
216
+ default: {
217
+ [key: string]: any;
218
+ type: "template";
219
+ templateType: any;
220
+ } & Omit<any, "component">;
131
221
  schemaType: "template";
132
222
  type: {
133
223
  label: string;
@@ -136,14 +226,12 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
136
226
  special?: "404" | "sitemap" | undefined;
137
227
  };
138
228
  dimensions?: import("../../types/schemas/props").Dimension[] | undefined;
139
- content: UIFields<unknown>[];
140
- config?: UIFields<unknown>[] | undefined;
229
+ content: UIFields[];
230
+ config?: UIFields[] | undefined;
141
231
  singleInstance?: boolean | undefined;
142
232
  category?: string | undefined;
143
233
  displayName: string;
144
- sectionList?: {
145
- [x: string]: string[];
146
- } | undefined;
234
+ sectionList?: Record<string, string[]> | undefined;
147
235
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
148
236
  [key: string]: import("../../types/schemas/props").Thumbnails;
149
237
  } | undefined;
@@ -153,7 +241,14 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
153
241
  } | undefined;
154
242
  } | {
155
243
  component: string;
156
- default: import("../../types/schemas/UI").ListTemplateDefault;
244
+ default: {
245
+ [key: string]: any;
246
+ type: "template";
247
+ templateType: any;
248
+ hasDistributorData: true;
249
+ itemsPerPage: number;
250
+ activePage: number;
251
+ } & Omit<any, "component">;
157
252
  schemaType: "template";
158
253
  type: {
159
254
  label: string;
@@ -162,14 +257,12 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
162
257
  special?: "404" | "sitemap" | undefined;
163
258
  };
164
259
  dimensions?: import("../../types/schemas/props").Dimension[] | undefined;
165
- content: UIFields<unknown>[];
166
- config?: UIFields<unknown>[] | undefined;
260
+ content: UIFields[];
261
+ config?: UIFields[] | undefined;
167
262
  singleInstance?: boolean | undefined;
168
263
  category?: string | undefined;
169
264
  displayName: string;
170
- sectionList?: {
171
- [x: string]: string[];
172
- } | undefined;
265
+ sectionList?: Record<string, string[]> | undefined;
173
266
  thumbnails?: import("../../types/schemas/props").Thumbnails | {
174
267
  [key: string]: import("../../types/schemas/props").Thumbnails;
175
268
  } | undefined;
@@ -177,73 +270,6 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
177
270
  _autoType?: {
178
271
  relations?: boolean | undefined;
179
272
  } | undefined;
180
- } | {
181
- component: string;
182
- fromPage: false;
183
- schema: import("../../types/schema-fields/props").SearchFrom & {
184
- 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 & {
185
- key: "title";
186
- }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields<unknown>[]];
187
- };
188
- title: string;
189
- local?: boolean | undefined;
190
- taxonomy?: boolean | undefined;
191
- editable?: boolean | undefined;
192
- translate?: boolean | undefined;
193
- clone?: {
194
- cloneAll: boolean;
195
- sourceSites: number[];
196
- targetSites: {
197
- site: number;
198
- path: string;
199
- mandatory: boolean;
200
- }[];
201
- sections: {
202
- section: string;
203
- sync: string;
204
- }[];
205
- } | null | undefined;
206
- defaultValues?: unknown;
207
- _autoType?: {
208
- relations?: boolean | undefined;
209
- } | undefined;
210
- dataPacks?: string[] | null | undefined;
211
- expirationDateField?: string | undefined;
212
- expirationDateOffset?: number | undefined;
213
- } | {
214
- component: string;
215
- taxonomy: false;
216
- fromPage: true;
217
- schema: import("../../types/schema-fields/props").SearchFrom & {
218
- templates: string[];
219
- 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 & {
220
- key: "title";
221
- }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]];
222
- };
223
- title: string;
224
- local?: boolean | undefined;
225
- editable?: boolean | undefined;
226
- translate?: boolean | undefined;
227
- clone?: {
228
- cloneAll: boolean;
229
- sourceSites: number[];
230
- targetSites: {
231
- site: number;
232
- path: string;
233
- mandatory: boolean;
234
- }[];
235
- sections: {
236
- section: string;
237
- sync: string;
238
- }[];
239
- } | null | undefined;
240
- defaultValues?: unknown;
241
- _autoType?: {
242
- relations?: boolean | undefined;
243
- } | undefined;
244
- dataPacks?: string[] | null | undefined;
245
- expirationDateField?: string | undefined;
246
- expirationDateOffset?: number | undefined;
247
273
  })[];
248
274
  declare function returnType(type: SchemaFieldTypes): FieldReturnTypes;
249
275
  declare function extendsType(types: Array<string>): string;
@@ -1,18 +1,18 @@
1
1
  import type { CategoryContentType, Component, DamDefaults, DataPack, DataPackCategory, Footer, Header, Languages, Menu, Module, ModuleCategories, PageContentType, SimpleContentType, Template, Themes, Translations } from "../../types/schemas";
2
2
  declare const createComponentSchema: (schema: Component) => Component<unknown>;
3
- declare const createSimpleContentTypeSchema: (schema: SimpleContentType) => SimpleContentType<unknown>;
4
- declare const createPageContentTypeSchema: (schema: PageContentType) => PageContentType<unknown>;
3
+ declare const createSimpleContentTypeSchema: (schema: SimpleContentType) => SimpleContentType;
4
+ declare const createPageContentTypeSchema: (schema: PageContentType) => PageContentType;
5
5
  declare const createCategoryContentTypeSchema: (schema: CategoryContentType) => CategoryContentType;
6
6
  declare const createDamDefaultsSchema: (schema: DamDefaults) => DamDefaults;
7
7
  declare const createDataPackCategorySchema: (schema: DataPackCategory) => DataPackCategory;
8
8
  declare const createDataPackSchema: (schema: DataPack) => DataPack;
9
- declare const createFooterSchema: (schema: Footer) => Footer<unknown>;
10
- declare const createHeaderSchema: (schema: Header) => Header<unknown>;
9
+ declare const createFooterSchema: (schema: Footer) => Footer;
10
+ declare const createHeaderSchema: (schema: Header) => Header;
11
11
  declare const createLanguagesSchema: (schema: Languages) => Languages;
12
12
  declare const createMenuSchema: (schema: Menu) => Menu;
13
13
  declare const createModuleCategoriesSchema: (schema: ModuleCategories) => ModuleCategories;
14
- declare const createModuleSchema: (schema: Module) => Module<unknown, unknown>;
15
- declare const createTemplateSchema: (schema: Template) => Template<unknown>;
14
+ declare const createModuleSchema: (schema: Module) => Module<unknown>;
15
+ declare const createTemplateSchema: (schema: Template) => Template<any>;
16
16
  declare const createThemesSchema: (schema: Themes) => Themes;
17
17
  declare const createTranslationsSchema: (schema: Translations) => Partial<Record<"br" | "hr" | "li" | "th" | "tr" | "Cy_az_AZ" | "Cy_sr_SP" | "Cy_uz_UZ" | "Lt_az_AZ" | "Lt_sr_SP" | "Lt_uz_UZ" | "aa" | "ab" | "ae" | "af" | "af_ZA" | "ak" | "am" | "an" | "ar" | "ar_AE" | "ar_BH" | "ar_DZ" | "ar_EG" | "ar_IQ" | "ar_JO" | "ar_KW" | "ar_LB" | "ar_LY" | "ar_MA" | "ar_OM" | "ar_QA" | "ar_SA" | "ar_SY" | "ar_TN" | "ar_YE" | "as" | "av" | "ay" | "az" | "ba" | "be" | "be_BY" | "bg" | "bg_BG" | "bh" | "bi" | "bm" | "bn" | "bo" | "bs" | "ca" | "ca_ES" | "ce" | "ch" | "co" | "cr" | "cs" | "cs_CZ" | "cu" | "cv" | "cy" | "da" | "da_DK" | "de" | "de_AT" | "de_CH" | "de_DE" | "de_LI" | "de_LU" | "div_MV" | "dv" | "dz" | "ee" | "el" | "el_GR" | "en" | "en_AU" | "en_BZ" | "en_CA" | "en_CB" | "en_GB" | "en_IE" | "en_JM" | "en_NZ" | "en_PH" | "en_TT" | "en_US" | "en_ZA" | "en_ZW" | "eo" | "es" | "es_AR" | "es_BO" | "es_CL" | "es_CO" | "es_CR" | "es_DO" | "es_EC" | "es_ES" | "es_GT" | "es_HN" | "es_MX" | "es_NI" | "es_PA" | "es_PE" | "es_PR" | "es_PY" | "es_SV" | "es_UY" | "es_VE" | "et" | "et_EE" | "eu" | "eu_ES" | "fa" | "fa_IR" | "ff" | "fi" | "fi_FI" | "fj" | "fo" | "fo_FO" | "fr" | "fr_BE" | "fr_CA" | "fr_CH" | "fr_FR" | "fr_LU" | "fr_MC" | "fy" | "ga" | "gd" | "gl" | "gl_ES" | "gn" | "gu" | "gu_IN" | "gv" | "ha" | "he" | "he_IL" | "hi" | "hi_IN" | "ho" | "hr_HR" | "ht" | "hu" | "hu_HU" | "hy" | "hy_AM" | "hz" | "ia" | "id" | "id_ID" | "ie" | "ig" | "ii" | "ik" | "io" | "is" | "is_IS" | "it" | "it_CH" | "it_IT" | "iu" | "ja" | "ja_JP" | "jv" | "ka" | "ka_GE" | "kg" | "ki" | "kj" | "kk" | "kk_KZ" | "kl" | "km" | "kn" | "kn_IN" | "ko" | "ko_KR" | "kr" | "ks" | "ku" | "kv" | "kw" | "ky" | "ky_KZ" | "la" | "lb" | "lg" | "ln" | "lo" | "lt" | "lt_LT" | "lu" | "lv" | "lv_LV" | "mg" | "mh" | "mi" | "mk" | "mk_MK" | "ml" | "mn" | "mn_MN" | "mr" | "mr_IN" | "ms" | "ms_BN" | "ms_MY" | "mt" | "my" | "na" | "nb" | "nb_NO" | "nd" | "ne" | "ng" | "nl" | "nl_BE" | "nl_NL" | "nn" | "nn_NO" | "no" | "nr" | "nv" | "ny" | "oc" | "oj" | "om" | "or" | "os" | "pa" | "pa_IN" | "pi" | "pl" | "pl_PL" | "ps" | "pt" | "pt_BR" | "pt_PT" | "qu" | "rm" | "rn" | "ro" | "ro_RO" | "ru" | "ru_RU" | "rw" | "sa" | "sa_IN" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sk_SK" | "sl" | "sl_SI" | "sm" | "sn" | "so" | "sq" | "sq_AL" | "sr" | "ss" | "st" | "su" | "sv" | "sv_FI" | "sv_SE" | "sw" | "sw_KE" | "ta" | "ta_IN" | "te" | "te_IN" | "tg" | "th_TH" | "ti" | "tk" | "tl" | "tn" | "to" | "tr_TR" | "ts" | "tt" | "tt_RU" | "tw" | "ty" | "ug" | "uk" | "uk_UA" | "ur" | "ur_PK" | "uz" | "ve" | "vi" | "vi_VN" | "vo" | "wa" | "wo" | "xh" | "yi" | "yo" | "za" | "zh" | "zh_CHS" | "zh_CHT" | "zh_CN" | "zh_HK" | "zh_MO" | "zh_SG" | "zh_TW" | "zu", Record<string, unknown>>>;
18
18
  export { createCategoryContentTypeSchema, createComponentSchema, createDamDefaultsSchema, createDataPackCategorySchema, createDataPackSchema, createFooterSchema, createHeaderSchema, createLanguagesSchema, createMenuSchema, createModuleCategoriesSchema, createModuleSchema, createPageContentTypeSchema, createSimpleContentTypeSchema, createTemplateSchema, createThemesSchema, createTranslationsSchema, };
@@ -164,12 +164,29 @@ export type Url = {
164
164
  export type VisualUniqueSelection<Values> = Values;
165
165
  export type Wysiwyg = string;
166
166
  export type MenuItemsKind = {
167
- link: any;
168
- group: any;
167
+ link: {
168
+ config?: {
169
+ headerStyle?: string;
170
+ footerStyle?: string;
171
+ type?: "link";
172
+ };
173
+ };
174
+ group: {
175
+ config?: {
176
+ headerStyle?: string;
177
+ footerStyle?: string;
178
+ type?: "group";
179
+ };
180
+ url?: null;
181
+ };
169
182
  };
170
- export interface BaseLink<T extends MenuItemsKind, Type extends "link" | "group", URL extends Url | undefined> {
183
+ export type BaseLinkElement<IM extends MenuItemsKind> = {
171
184
  /** Label */
172
185
  label?: string;
186
+ /** Children */
187
+ children?: Array<MenuElement<IM>>;
188
+ /** Url */
189
+ url?: Url | null;
173
190
  /** Config */
174
191
  config?: {
175
192
  /** Header style */
@@ -177,24 +194,21 @@ export interface BaseLink<T extends MenuItemsKind, Type extends "link" | "group"
177
194
  /** Footer style */
178
195
  footerStyle?: string;
179
196
  /** Type of menu element */
180
- type?: Type;
197
+ type?: "link" | "group";
181
198
  };
182
- /** Children */
183
- children?: Array<MenuElement<T>>;
184
- /** Url */
185
- url?: URL;
186
- }
187
- /**
188
- * A Griddo menu element: link or group.
189
- */
190
- export type MenuElement<T extends MenuItemsKind> = (BaseLink<T["link"], "link", Url> & T["link"]) | (BaseLink<T["group"], "group", undefined> & T["group"]);
199
+ };
191
200
  /**
192
201
  * Griddo Menu Schema
193
202
  */
194
- export type Menu<T extends MenuItemsKind> = {
195
- elements?: Array<MenuElement<T>>;
203
+ export type MenuElement<IM extends MenuItemsKind> = BaseLinkElement<IM> & (IM["link"] | IM["group"]);
204
+ export type LinkMenuElement<IM extends MenuItemsKind> = BaseLinkElement<IM> & IM["link"];
205
+ export type GroupMenuElement<IM extends MenuItemsKind> = BaseLinkElement<IM> & IM["group"];
206
+ export type Menu<IM extends MenuItemsKind> = {
207
+ elements?: Array<MenuElement<IM>>;
196
208
  };
197
209
  export type TemplateSection<GriddoModule> = {
210
+ component: "Section";
211
+ name: string;
198
212
  modules: Array<GriddoModule>;
199
213
  };
200
214
  export interface SimpleContentType<ContentType> {
@@ -8,14 +8,14 @@ export type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
8
8
  export type AsyncSelect = BaseAsyncSelect & Common;
9
9
  export type CheckGroup = BaseCheckGroup & Common;
10
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;
11
+ export type ComponentArray = BaseComponentArray & WithWhiteList & Common;
12
+ export type ComponentContainer = BaseComponentContainer & WithWhiteList & Common;
13
13
  export type DateField = BaseDateField & Common;
14
14
  export type FieldsDivider = BaseFieldsDivider & Common;
15
15
  export type FileField = BaseFileField & Common;
16
16
  export type HeadingField = BaseHeadingField & Common;
17
17
  export type ImageField = BaseImageField & Common;
18
- export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
18
+ export type LinkField = BaseLinkField & WithWhiteList & Common;
19
19
  export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
20
20
  export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
21
21
  export type NoteField = BaseNoteField & Common;
@@ -33,5 +33,5 @@ export type UniqueCheck = BaseUniqueCheck & Common;
33
33
  export type UrlField = BaseUrlField & Common;
34
34
  export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
35
35
  export type Wysiwyg = BaseWysiwyg & Common;
36
- 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 | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
36
+ export 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 | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
37
37
  export {};
@@ -125,9 +125,9 @@ export type WithValidators = {
125
125
  dateFormat?: "futureDate" | "pastDate";
126
126
  };
127
127
  };
128
- export type WithWhiteList<WhiteListElements> = {
128
+ export type WithWhiteList = {
129
129
  /** Array of strings with the names of the modules or components that can be added. */
130
- whiteList: Array<WhiteListElements>;
130
+ whiteList: Array<string>;
131
131
  };
132
132
  export type WithRelations_AutoTypes = {
133
133
  _autoType?: {
@@ -13,7 +13,7 @@ export type FieldsDivider = BaseFieldsDivider & Common;
13
13
  export type FileField = BaseFileField & Common & WithPlaceHolder;
14
14
  export type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & Common & WithPlaceHolder;
15
15
  export type ImageField = BaseImageField & WithIsMockup & WithFullWidth & Common;
16
- export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
16
+ export type LinkField = BaseLinkField & WithWhiteList & Common;
17
17
  export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
18
18
  export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
19
19
  export type NoteField = BaseNoteField & Common;
@@ -31,5 +31,5 @@ export type UniqueCheck = BaseUniqueCheck & Common;
31
31
  export type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
32
32
  export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
33
33
  export type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & Common & WithPlaceHolder;
34
- 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 | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
34
+ export 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 | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
35
35
  export {};
@@ -6,8 +6,8 @@ export type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
6
6
  export type AsyncSelect = BaseAsyncSelect & Common & WithPlaceHolder;
7
7
  export type CheckGroup = BaseCheckGroup & Common;
8
8
  export type ColorPicker = BaseColorPicker & Common;
9
- export type ComponentArray<WhiteListElements = unknown> = BaseComponentArray & WithWhiteList<WhiteListElements> & Common;
10
- export type ComponentContainer<WhiteListElements = unknown> = BaseComponentContainer & WithWhiteList<WhiteListElements> & Common;
9
+ export type ComponentArray = BaseComponentArray & WithWhiteList & Common;
10
+ export type ComponentContainer = BaseComponentContainer & WithWhiteList & Common;
11
11
  export type ConditionalField = BaseConditionalField<UIFields> & Common;
12
12
  export type DateField = BaseDateField & WithValidators & Common & WithPlaceHolder;
13
13
  export type FieldGroup = BaseFieldGroup<UIFields> & Common;
@@ -15,7 +15,7 @@ export type FieldsDivider = BaseFieldsDivider & Common;
15
15
  export type FileField = BaseFileField & Common & WithPlaceHolder;
16
16
  export type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & WithPlaceHolder & WithHumanReadable & Common;
17
17
  export type ImageField = BaseImageField & WithIsMockup & WithFullWidth & Common;
18
- export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
18
+ export type LinkField = BaseLinkField & WithWhiteList & Common;
19
19
  export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
20
20
  export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
21
21
  export type NoteField = BaseNoteField & Common;
@@ -33,4 +33,4 @@ export type UniqueCheck = BaseUniqueCheck & Common;
33
33
  export type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
34
34
  export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
35
35
  export type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & WithPlaceHolder & WithHumanReadable & Common;
36
- export type UIFields<WhiteListElements = unknown> = ArrayFieldGroup | AsyncCheckGroup | AsyncSelect | CheckGroup | ColorPicker | ComponentArray<WhiteListElements> | ComponentContainer<WhiteListElements> | ConditionalField | DateField | FieldGroup | FieldsDivider | FileField | HeadingField | ImageField | LinkField<WhiteListElements> | MultiCheckSelect | MultiCheckSelectGroup | NoteField | NumberField | RadioGroup | ReferenceField | RichText | Select | SliderField | TextArea | TextField | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
36
+ export 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 | TimeField | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
@@ -1,5 +1,5 @@
1
1
  import { ConfigTabs, Thumbnails } from "./props";
2
- export interface HeaderFooter<WhiteListElements = unknown> {
2
+ export interface HeaderFooter {
3
3
  schemaType: "module";
4
4
  /** Indicates whether a module is treated as footer or header. If specified, it will be mandatory to specify if it is the default module with the `defaultNavigation` prop. */
5
5
  type: "footer" | "header";
@@ -10,7 +10,7 @@ export interface HeaderFooter<WhiteListElements = unknown> {
10
10
  /** Name to represent the component, module or template in the Griddo editor interface. */
11
11
  displayName: string;
12
12
  /** Array of objects representing each of the tabs of the component, module or template in the Griddo editor where the form fields for data entry will be displayed. */
13
- configTabs: Array<ConfigTabs<WhiteListElements>>;
13
+ configTabs: Array<ConfigTabs>;
14
14
  /** Object to set default values for schema keys. */
15
15
  default: {
16
16
  /** Name of the component or module of this schema. */
@@ -26,9 +26,9 @@ export interface HeaderFooter<WhiteListElements = unknown> {
26
26
  [key: string]: Thumbnails;
27
27
  };
28
28
  }
29
- export type Header<WhiteListElements = unknown> = HeaderFooter<WhiteListElements> & {
29
+ export type Header = HeaderFooter & {
30
30
  type: "header";
31
31
  };
32
- export type Footer<WhiteListElements = unknown> = HeaderFooter<WhiteListElements> & {
32
+ export type Footer = HeaderFooter & {
33
33
  type: "footer";
34
34
  };
@@ -2,7 +2,7 @@ import { BaseContentType } from "./base";
2
2
  import { DataPacks, ExpirationData } from "./props";
3
3
  import { PageContentTypeFields, TextField } from "../schema-fields/page-content-type-fields";
4
4
  import { SearchFrom, WithSearchable } from "../schema-fields/props";
5
- type PageContentTypeProp<WhitelistElements> = SearchFrom & {
5
+ 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. */
@@ -10,15 +10,15 @@ type PageContentTypeProp<WhitelistElements> = SearchFrom & {
10
10
  TextField & WithSearchable & {
11
11
  key: "title";
12
12
  },
13
- ...PageContentTypeFields<WhitelistElements>[]
13
+ ...PageContentTypeFields[]
14
14
  ];
15
15
  };
16
- export interface PageContentType<WhitelistElements = unknown> extends BaseContentType, DataPacks, ExpirationData {
16
+ export interface PageContentType extends BaseContentType, DataPacks, ExpirationData {
17
17
  /** Indicates that is a taxonomy. In this case must be `false`.*/
18
18
  taxonomy: false;
19
19
  /** xIndicates that the data is of type page. Must always be `true`. */
20
20
  fromPage: true;
21
21
  /** Schema for the page content type. */
22
- schema: PageContentTypeProp<WhitelistElements>;
22
+ schema: PageContentTypeProp;
23
23
  }
24
24
  export {};
@@ -2,19 +2,19 @@ import { BaseContentType } from "./base";
2
2
  import { DataPacks, ExpirationData } from "./props";
3
3
  import { SearchFrom, WithSearchable } from "../schema-fields/props";
4
4
  import { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
5
- type SimpleContentTypeProp<WhitelistElements> = SearchFrom & {
5
+ type SimpleContentTypeProp = SearchFrom & {
6
6
  /** An array of Griddo fields. */
7
7
  fields: [
8
8
  TextField & WithSearchable & {
9
9
  key: "title";
10
10
  },
11
- ...SimpleContentTypeFields<WhitelistElements>[]
11
+ ...SimpleContentTypeFields[]
12
12
  ];
13
13
  };
14
- export interface SimpleContentType<WhitelistElements = unknown> extends BaseContentType, DataPacks, ExpirationData {
14
+ export interface SimpleContentType extends BaseContentType, DataPacks, ExpirationData {
15
15
  /** Indicates that the data is of type simple/category. Must always be `false`. */
16
16
  fromPage: false;
17
17
  /** Schema for the simple content type. */
18
- schema: SimpleContentTypeProp<WhitelistElements>;
18
+ schema: SimpleContentTypeProp;
19
19
  }
20
20
  export {};