@griddo/core 1.75.126 → 1.75.128

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.
@@ -29,73 +29,6 @@ declare function getGenericFromCheckBoxOptions(options: Array<{
29
29
  }>): string;
30
30
  declare function getGenericFromWhitelist(whiteList: Array<string>): string;
31
31
  declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
32
- component: string;
33
- taxonomy: false;
34
- fromPage: true;
35
- schema: import("../../types/schema-fields/props").SearchFrom & {
36
- templates: string[];
37
- fields: [import("../../types/schema-fields/base").BaseTextField & import("../../types/schema-fields/props").WithFrom & import("../../types/schema-fields/props").WithIndexable & import("../../types/schema-fields/props").WithShowList & import("../../types/schema-fields/props").WithSearchable & {
38
- key: "title";
39
- }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]];
40
- };
41
- title: string;
42
- local?: boolean | undefined;
43
- editable?: boolean | undefined;
44
- translate?: boolean | undefined;
45
- clone?: {
46
- cloneAll: boolean;
47
- sourceSites: number[];
48
- targetSites: {
49
- site: number;
50
- path: string;
51
- mandatory: boolean;
52
- }[];
53
- sections: {
54
- section: string;
55
- sync: string;
56
- }[];
57
- } | null | undefined;
58
- defaultValues?: unknown;
59
- _autoType?: {
60
- relations?: boolean | undefined;
61
- } | undefined;
62
- dataPacks?: string[] | null | undefined;
63
- expirationDateField?: string | undefined;
64
- expirationDateOffset?: number | undefined;
65
- } | {
66
- component: string;
67
- fromPage: false;
68
- schema: import("../../types/schema-fields/props").SearchFrom & {
69
- fields: [import("../../types/schema-fields/base").BaseTextField & import("../../types/schema-fields/props").WithIsMockup & import("../../types/schema-fields/props").WithValidators & import("../../types/schema-fields/props").WithReadonly & import("../../types/schema-fields/props").WithSlugTo & import("../../types/schema-fields/props").WithPrefix & import("../../types/schema-fields/props").WithPlaceHolder & import("../../types/schema-fields/props").WithHideable & import("../../types/schema-fields/props").WithIndexable & import("../../types/schema-fields/props").WithShowList & import("../../types/schema-fields/props").WithHelpText & import("../../types/schema-fields/props").WithSearchable & {
70
- key: "title";
71
- }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields<unknown>[]];
72
- };
73
- title: string;
74
- local?: boolean | undefined;
75
- taxonomy?: 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
32
  component: string;
100
33
  schemaType: "component";
101
34
  default: import("../../types/schemas/UI").BaseDefault;
@@ -211,6 +144,73 @@ declare function schemasToArray(objectSchemas: Record<string, SchemaType>): ({
211
144
  _autoType?: {
212
145
  relations?: boolean | undefined;
213
146
  } | undefined;
147
+ } | {
148
+ component: string;
149
+ fromPage: false;
150
+ schema: import("../../types/schema-fields/props").SearchFrom & {
151
+ 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 & {
152
+ key: "title";
153
+ }, ...import("../../types/schema-fields/simple-content-type-fields").SimpleContentTypeFields<unknown>[]];
154
+ };
155
+ title: string;
156
+ local?: boolean | undefined;
157
+ taxonomy?: boolean | undefined;
158
+ editable?: boolean | undefined;
159
+ translate?: boolean | undefined;
160
+ clone?: {
161
+ cloneAll: boolean;
162
+ sourceSites: number[];
163
+ targetSites: {
164
+ site: number;
165
+ path: string;
166
+ mandatory: boolean;
167
+ }[];
168
+ sections: {
169
+ section: string;
170
+ sync: string;
171
+ }[];
172
+ } | null | undefined;
173
+ defaultValues?: unknown;
174
+ _autoType?: {
175
+ relations?: boolean | undefined;
176
+ } | undefined;
177
+ dataPacks?: string[] | null | undefined;
178
+ expirationDateField?: string | undefined;
179
+ expirationDateOffset?: number | undefined;
180
+ } | {
181
+ component: string;
182
+ taxonomy: false;
183
+ fromPage: true;
184
+ schema: import("../../types/schema-fields/props").SearchFrom & {
185
+ templates: string[];
186
+ 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 & {
187
+ key: "title";
188
+ }, ...import("../../types/schema-fields/page-content-type-fields").PageContentTypeFields<unknown>[]];
189
+ };
190
+ title: string;
191
+ local?: boolean | undefined;
192
+ editable?: boolean | undefined;
193
+ translate?: boolean | undefined;
194
+ clone?: {
195
+ cloneAll: boolean;
196
+ sourceSites: number[];
197
+ targetSites: {
198
+ site: number;
199
+ path: string;
200
+ mandatory: boolean;
201
+ }[];
202
+ sections: {
203
+ section: string;
204
+ sync: string;
205
+ }[];
206
+ } | null | undefined;
207
+ defaultValues?: unknown;
208
+ _autoType?: {
209
+ relations?: boolean | undefined;
210
+ } | undefined;
211
+ dataPacks?: string[] | null | undefined;
212
+ expirationDateField?: string | undefined;
213
+ expirationDateOffset?: number | undefined;
214
214
  })[];
215
215
  declare function returnType(type: SchemaFieldTypes): FieldReturnTypes;
216
216
  declare function extendsType(types: Array<string>): string;
@@ -1,7 +1,7 @@
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;
4
- declare const createPageContentTypeSchema: (schema: PageContentType) => PageContentType;
3
+ declare const createSimpleContentTypeSchema: (schema: SimpleContentType) => SimpleContentType<unknown>;
4
+ declare const createPageContentTypeSchema: (schema: PageContentType) => PageContentType<unknown>;
5
5
  declare const createCategoryContentTypeSchema: (schema: CategoryContentType) => CategoryContentType;
6
6
  declare const createDamDefaultsSchema: (schema: DamDefaults) => DamDefaults;
7
7
  declare const createDataPackCategorySchema: (schema: DataPackCategory) => DataPackCategory;
@@ -2,7 +2,7 @@ import { PageContentTypeFields, TextField } from "../schema-fields/page-content-
2
2
  import { SearchFrom, WithSearchable } from "../schema-fields/props";
3
3
  import { BaseContentType } from "./base";
4
4
  import { DataPacks, ExpirationData } from "./props";
5
- declare type PageContentTypeProp = SearchFrom & {
5
+ declare type PageContentTypeProp<WhitelistElements> = 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 @@ declare type PageContentTypeProp = SearchFrom & {
10
10
  TextField & WithSearchable & {
11
11
  key: "title";
12
12
  },
13
- ...PageContentTypeFields[]
13
+ ...PageContentTypeFields<WhitelistElements>[]
14
14
  ];
15
15
  };
16
- export interface PageContentType extends BaseContentType, DataPacks, ExpirationData {
16
+ export interface PageContentType<WhitelistElements = unknown> 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;
22
+ schema: PageContentTypeProp<WhitelistElements>;
23
23
  }
24
24
  export {};
@@ -2,19 +2,19 @@ import { SearchFrom, WithSearchable } from "../schema-fields/props";
2
2
  import { SimpleContentTypeFields, TextField } from "../schema-fields/simple-content-type-fields";
3
3
  import { BaseContentType } from "./base";
4
4
  import { DataPacks, ExpirationData } from "./props";
5
- declare type SimpleContentTypeProp = SearchFrom & {
5
+ declare type SimpleContentTypeProp<WhitelistElements> = SearchFrom & {
6
6
  /** An array of Griddo fields. */
7
7
  fields: [
8
8
  TextField & WithSearchable & {
9
9
  key: "title";
10
10
  },
11
- ...SimpleContentTypeFields[]
11
+ ...SimpleContentTypeFields<WhitelistElements>[]
12
12
  ];
13
13
  };
14
- export interface SimpleContentType extends BaseContentType, DataPacks, ExpirationData {
14
+ export interface SimpleContentType<WhitelistElements = unknown> 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;
18
+ schema: SimpleContentTypeProp<WhitelistElements>;
19
19
  }
20
20
  export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "MIT",
5
- "version": "1.75.126",
5
+ "version": "1.75.128",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -78,5 +78,5 @@
78
78
  "resolutions": {
79
79
  "colors": "1.4.0"
80
80
  },
81
- "gitHead": "15ccbba34e3335c01c7d1e15588d47694e6b0983"
81
+ "gitHead": "52d9e79c0d743d8990f88fe36825c67d5dcfc07f"
82
82
  }