@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.
Files changed (96) hide show
  1. package/README.md +60 -66
  2. package/dist/assets/svg/Delete.d.ts +3 -0
  3. package/dist/assets/svg/Duplicate.d.ts +3 -0
  4. package/dist/components/CloudinaryBackgroundImage/index.d.ts +23 -0
  5. package/dist/components/CloudinaryImage/index.d.ts +30 -0
  6. package/dist/components/Component/ComponentWrapper/index.d.ts +16 -0
  7. package/dist/components/Component/index.d.ts +27 -0
  8. package/dist/components/GriddoBackgroundImage/index.d.ts +7 -0
  9. package/dist/components/GriddoImage/index.d.ts +57 -0
  10. package/dist/components/GriddoLink/index.d.ts +59 -0
  11. package/dist/components/GriddoLink/utils.d.ts +9 -0
  12. package/dist/components/LdJson/index.d.ts +14 -0
  13. package/dist/components/Link/index.d.ts +15 -0
  14. package/dist/components/ModulePreview/index.d.ts +15 -0
  15. package/dist/components/Page/index.d.ts +16 -0
  16. package/dist/components/Preview/index.d.ts +11 -0
  17. package/dist/components/index.d.ts +12 -0
  18. package/dist/constants/cloudinary.d.ts +17 -0
  19. package/dist/contexts/I18n/index.d.ts +24 -0
  20. package/dist/contexts/Navigation/index.d.ts +13 -0
  21. package/dist/contexts/Page/index.d.ts +15 -0
  22. package/dist/contexts/Site/index.d.ts +27 -0
  23. package/dist/contexts/index.d.ts +4 -0
  24. package/dist/functions/create-schemas/index.d.ts +18 -0
  25. package/dist/functions/image-utils.d.ts +43 -0
  26. package/dist/functions/index.d.ts +7 -0
  27. package/dist/functions/utils.d.ts +74 -0
  28. package/dist/hooks/index.d.ts +18 -0
  29. package/dist/hooks/themes/types.d.ts +20 -0
  30. package/dist/hooks/themes/useGlobalTheme.d.ts +6 -0
  31. package/dist/hooks/themes/useTheme.d.ts +8 -0
  32. package/dist/hooks/themes/useThemeColors.d.ts +8 -0
  33. package/dist/hooks/themes/useThemeFont.d.ts +8 -0
  34. package/dist/hooks/themes/useThemePrimitives.d.ts +8 -0
  35. package/dist/hooks/themes/utils.d.ts +61 -0
  36. package/dist/hooks/useContentType.d.ts +11 -0
  37. package/dist/hooks/useDataFilters.d.ts +35 -0
  38. package/dist/hooks/useGriddoImage.d.ts +49 -0
  39. package/dist/hooks/useI18n.d.ts +38 -0
  40. package/dist/hooks/useImage.d.ts +44 -0
  41. package/dist/hooks/useLink.d.ts +8 -0
  42. package/dist/hooks/useList.d.ts +36 -0
  43. package/dist/hooks/useNavigation.d.ts +5 -0
  44. package/dist/hooks/usePage.d.ts +11 -0
  45. package/dist/hooks/useReferenceFieldData.d.ts +11 -0
  46. package/dist/hooks/useSite.d.ts +12 -0
  47. package/dist/hooks/useSitemap.d.ts +7 -0
  48. package/dist/index.d.ts +24 -6
  49. package/dist/index.js +1 -1
  50. package/dist/types/constants/locales.d.ts +2 -0
  51. package/dist/types/constants/timezone.d.ts +2 -0
  52. package/dist/types/constants/utilities.d.ts +1 -0
  53. package/dist/types/core.d.ts +263 -0
  54. package/dist/types/fields.d.ts +191 -0
  55. package/dist/types/global.d.ts +33 -0
  56. package/dist/{src/types → types}/schema-functions/fields/base.d.ts +33 -43
  57. package/dist/{src/types/schema-functions/fields/page-data-fields.d.ts → types/schema-functions/fields/page-content-type-fields.d.ts} +4 -4
  58. package/dist/{src/types → types}/schema-functions/fields/props.d.ts +11 -26
  59. package/dist/{src/types/schema-functions/fields/pure-data-fields.d.ts → types/schema-functions/fields/simple-content-type-fields.d.ts} +4 -4
  60. package/dist/{src/types → types}/schema-functions/fields/ui-fields.d.ts +6 -6
  61. package/dist/types/schema-functions/schemas/Categories.d.ts +10 -0
  62. package/dist/types/schema-functions/schemas/ContentType.d.ts +4 -0
  63. package/dist/types/schema-functions/schemas/DamDefaults.d.ts +13 -0
  64. package/dist/{src/types/schema-functions/schemas/DataPackSchema.d.ts → types/schema-functions/schemas/DataPack.d.ts} +3 -4
  65. package/dist/types/schema-functions/schemas/DataPackCategory.d.ts +4 -0
  66. package/dist/{src/types/schema-functions/schemas/HeaderFooterSchema.d.ts → types/schema-functions/schemas/HeaderFooter.d.ts} +15 -16
  67. package/dist/types/schema-functions/schemas/Languages.d.ts +9 -0
  68. package/dist/{src/types/schema-functions/schemas/MenuSchema.d.ts → types/schema-functions/schemas/Menu.d.ts} +2 -2
  69. package/dist/types/schema-functions/schemas/ModuleCategories.d.ts +9 -0
  70. package/dist/types/schema-functions/schemas/PageContentType.d.ts +19 -0
  71. package/dist/types/schema-functions/schemas/SimpleContentType.d.ts +15 -0
  72. package/dist/types/schema-functions/schemas/Themes.d.ts +9 -0
  73. package/dist/types/schema-functions/schemas/Translations.d.ts +2 -0
  74. package/dist/types/schema-functions/schemas/UI.d.ts +49 -0
  75. package/dist/{src/types → types}/schema-functions/schemas/base.d.ts +15 -27
  76. package/dist/types/schema-functions/schemas/index.d.ts +12 -0
  77. package/dist/{src/types → types}/schema-functions/schemas/props.d.ts +6 -7
  78. package/dist/{src/types → types}/schema.d.ts +0 -0
  79. package/dist/types/theme.d.ts +51 -0
  80. package/package.json +74 -75
  81. package/dist/src/functions/create-schemas/index.d.ts +0 -69
  82. package/dist/src/functions/create-schemas/utils.d.ts +0 -33
  83. package/dist/src/types/core.d.ts +0 -419
  84. package/dist/src/types/fields.d.ts +0 -7
  85. package/dist/src/types/schema-functions/schemas/CategoriesSchema.d.ts +0 -13
  86. package/dist/src/types/schema-functions/schemas/DamDefaultsSchema.d.ts +0 -11
  87. package/dist/src/types/schema-functions/schemas/DataPackCategoriesSchema.d.ts +0 -4
  88. package/dist/src/types/schema-functions/schemas/LanguagesSchema.d.ts +0 -8
  89. package/dist/src/types/schema-functions/schemas/ModuleCategoriesSchema.d.ts +0 -6
  90. package/dist/src/types/schema-functions/schemas/PageDataSchema.d.ts +0 -20
  91. package/dist/src/types/schema-functions/schemas/PureDataSchema.d.ts +0 -14
  92. package/dist/src/types/schema-functions/schemas/ThemesSchema.d.ts +0 -11
  93. package/dist/src/types/schema-functions/schemas/TranslationsSchema.d.ts +0 -3
  94. package/dist/src/types/schema-functions/schemas/UISchema.d.ts +0 -47
  95. package/dist/src/types/schema-functions/schemas/index.d.ts +0 -14
  96. package/dist/src/types/theme.d.ts +0 -57
@@ -1,419 +0,0 @@
1
- /**
2
- * Type for a Griddo component which is an object with properties and values
3
- * that at least includes the prop component.
4
- */
5
- export declare module Core {
6
- type GriddoComponent<T> = T & {
7
- component: string;
8
- };
9
- type ArrayFieldGroup<FieldKeys> = Array<FieldKeys>;
10
- type AsyncCheckGroup = Array<string>;
11
- type CheckGroupField<Options> = Options;
12
- type ColorPickerField = string;
13
- type ColorPickerFixedField = {
14
- name: string;
15
- hex: string;
16
- };
17
- type ComponentArrayField<ComponentProps> = Array<ComponentProps>;
18
- type ComponentContainerField<T> = GriddoComponent<T>;
19
- type ConditionalField<T> = T;
20
- type DateField = string;
21
- type FileField = {
22
- /** URL for the document */
23
- url?: string;
24
- /** Size for the document file in bytes */
25
- sizeBytes?: number;
26
- /** Upload date */
27
- uploadDate?: string;
28
- };
29
- type HeadingField<HeadingTagsType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span"> = {
30
- /** Text content */
31
- content?: string;
32
- /** HTML tag used to render the content */
33
- tag?: HeadingTagsType | null;
34
- };
35
- type ImageField = {
36
- /** Image id */
37
- id?: number;
38
- /** Original image name */
39
- name?: string;
40
- /** Image name from the gallery */
41
- title?: string;
42
- /** Image description from the gallery */
43
- description?: string;
44
- /** Alternative text for the image */
45
- alt?: string;
46
- /** Image tags from the gallery */
47
- tags?: Array<string>;
48
- /** Griddo DAM image url */
49
- url?: string;
50
- /** Griddo DAM image url thumbnail */
51
- thumb?: string;
52
- /** Cloudinary `public-id`
53
- * @deprecated
54
- * Cloudinary will be deprecated in the future
55
- * */
56
- publicId?: string;
57
- /** Griddo DAM image id
58
- * @deprecated
59
- * This id is internal and should not be used
60
- */
61
- damId?: string;
62
- /** Image publication date */
63
- published?: string;
64
- /** Original image size in bytes */
65
- size?: number;
66
- /** Original image width in pixels */
67
- width?: number;
68
- /** Original image height in pixels */
69
- height?: number;
70
- /** Original image orientation
71
- * P: Portrait
72
- * L: Landscape
73
- * S: Square
74
- */
75
- orientation?: "P" | "L" | "S";
76
- /** Site to which image belongs */
77
- site?: number;
78
- };
79
- interface LinkFieldCommon {
80
- /** Link text */
81
- text?: string;
82
- }
83
- interface LinkFieldUrl extends LinkFieldCommon {
84
- linkType: "url";
85
- url: UrlField;
86
- }
87
- interface LinkFieldModal<T> extends LinkFieldCommon {
88
- linkType: "modal";
89
- modal?: {
90
- [key: string]: ComponentContainerField<T>;
91
- };
92
- }
93
- /** Field of type link in which a whitelist of modules can be added, for example to open them in a modal. */
94
- type LinkField<ModalComponents> = LinkFieldUrl | LinkFieldModal<ModalComponents>;
95
- type SourceReturn = {
96
- value?: number | string;
97
- name?: number;
98
- title?: string;
99
- label?: string;
100
- };
101
- type MultiCheckSelectField = Array<SourceReturn>;
102
- type MultiCheckSelectGroup<T extends string> = {
103
- [K in T]: MultiCheckSelectField;
104
- };
105
- type NoteField = string;
106
- type NumberField = number;
107
- type RadioGroupField<OptionsValues> = OptionsValues;
108
- type ReferenceField<ContentType> = {
109
- mode: "auto" | "manual";
110
- order: string;
111
- source: ContentType extends {
112
- contentTypeName: unknown;
113
- } ? Array<ContentType["contentTypeName"]> : never;
114
- /** 0 means all */
115
- quantity: number;
116
- filter: Array<{
117
- id: number;
118
- label: string;
119
- source: string;
120
- }>;
121
- fullRelations: boolean;
122
- };
123
- type RichTextField = string;
124
- type ScrollableUniqueSelectionField = string;
125
- type SelectField<Values> = Values;
126
- type SliderField = number;
127
- type TextAreaField = string;
128
- /** Return type of an TextField */
129
- type TextField = string;
130
- type TimeField = string;
131
- type UrlField = {
132
- href?: string;
133
- title?: string;
134
- linkToURL?: string;
135
- newTab?: boolean;
136
- noFollow?: boolean;
137
- subSlug?: string;
138
- };
139
- type VisualUniqueSelectionField<Values> = Values;
140
- type WysiwygField = string;
141
- type Renderers = "gatsby" | "editor" | "preview";
142
- type Breadcrumb = Array<{
143
- path?: string;
144
- label: string;
145
- fullPath: string;
146
- }>;
147
- type ConfigBase = {
148
- type?: "link" | "group";
149
- headerStyle?: string;
150
- footerStyle?: string;
151
- };
152
- type MenuItemBase = {
153
- label?: string;
154
- url?: UrlField;
155
- auxText?: string;
156
- image?: ImageField;
157
- };
158
- interface GroupLinkType extends ConfigBase {
159
- type?: "group";
160
- }
161
- interface ConfigLinkType extends ConfigBase {
162
- type?: "link";
163
- }
164
- interface MenuChildrenGroupType extends MenuItemBase {
165
- url?: never;
166
- config?: GroupLinkType;
167
- children?: Array<MenuElement>;
168
- }
169
- interface MenuChildrenLinkType extends MenuItemBase {
170
- config?: ConfigLinkType;
171
- children?: Array<MenuElement>;
172
- }
173
- type MenuElement = MenuChildrenGroupType | MenuChildrenLinkType;
174
- type Menu = {
175
- elements: Array<MenuElement>;
176
- };
177
- type TemplateSection<GriddoModule> = {
178
- modules: Array<GriddoModule>;
179
- };
180
- interface PageLanguage {
181
- id: number;
182
- locale: string;
183
- }
184
- interface SiteLanguage {
185
- id: number;
186
- locale: string;
187
- language: string;
188
- label: string;
189
- isDefault: boolean;
190
- }
191
- interface Page {
192
- language?: PageLanguage;
193
- id?: number;
194
- setAsHome?: boolean;
195
- entity?: string;
196
- site: number;
197
- title: string;
198
- slug: string;
199
- author?: number;
200
- readonly isHome?: boolean;
201
- canonicalURL?: string;
202
- parent?: unknown;
203
- readonly component?: "Page";
204
- deleted?: boolean;
205
- follow?: boolean;
206
- header?: unknown;
207
- footer?: unknown;
208
- isIndexed?: boolean;
209
- liveStatus?: {
210
- id: 1 | 2 | 3 | 4 | 5 | 6;
211
- title: string;
212
- status: "offline" | "upload-pending" | "active" | "offline-pending" | "modified" | "scheduled";
213
- };
214
- locale?: unknown;
215
- metaDescription?: string;
216
- metaTitle?: string;
217
- metasAdvanced?: string;
218
- socialTitle?: string;
219
- socialDescription?: string;
220
- socialImage?: unknown;
221
- template: {
222
- type?: string;
223
- templateType: string;
224
- [key: string]: unknown;
225
- };
226
- url?: string;
227
- workflowStatus?: unknown;
228
- modified?: string;
229
- published?: string;
230
- pageLanguages?: [
231
- {
232
- siteId: number;
233
- languageId: number;
234
- pageId: number;
235
- title: string;
236
- locale: string;
237
- isLive: boolean;
238
- draftFromPage: unknown;
239
- url: string;
240
- path: {
241
- site: string;
242
- domain: string;
243
- domainUrl: string;
244
- language: string;
245
- page: string;
246
- compose: string;
247
- };
248
- }
249
- ];
250
- templateId?: string;
251
- structuredData?: unknown;
252
- readonly hash?: string;
253
- origin?: string;
254
- editable?: boolean;
255
- manuallyImported?: boolean;
256
- availableSites?: Array<{
257
- id: number;
258
- name: string;
259
- }>;
260
- canBeUnpublished?: boolean;
261
- editing?: {
262
- id: number;
263
- name: string;
264
- username: string;
265
- email: string;
266
- };
267
- draftFromPage?: unknown;
268
- haveDraftPage?: unknown;
269
- liveChanged?: boolean;
270
- noTranslate?: boolean;
271
- dimensions?: {
272
- values: unknown;
273
- };
274
- readonly breadcrumb?: Breadcrumb;
275
- readonly path?: string;
276
- readonly fullPath?: {
277
- site: string;
278
- domain: string;
279
- domainUrl: string;
280
- language: string;
281
- page: string;
282
- compose: string;
283
- };
284
- readonly fullUrl?: string;
285
- templateConfig?: unknown;
286
- }
287
- type CloudinaryDefaults = {
288
- domain: "https://res.cloudinary.com";
289
- uploadFolder: "image/upload";
290
- fallback404Image: "placeholders/fallback-404-image";
291
- quality: "80";
292
- crop: "fill";
293
- gravity: "faces:center";
294
- format: "auto";
295
- loading: "lazy";
296
- backgroundLazy: false;
297
- decoding: "auto";
298
- };
299
- type GriddoDamDefaults = {
300
- quality: number;
301
- crop: ImageCropType;
302
- loading: ImageLoading;
303
- decoding: ImageDecoding;
304
- blurSize: string;
305
- blurCSSTransition: string;
306
- formats: Array<ImageFormats>;
307
- };
308
- interface Site {
309
- apiUrl?: string;
310
- bigAvatar: string;
311
- cloudinaryCloudName?: string;
312
- cloudinaryDefaults?: CloudinaryDefaults;
313
- defaultLanguage?: SiteLanguage;
314
- domain: number;
315
- favicon: string;
316
- griddoDamDefaults?: GriddoDamDefaults;
317
- name: string;
318
- path: string;
319
- publicApiUrl?: string;
320
- renderer?: Renderers;
321
- siteId?: number;
322
- siteLangs?: Array<{
323
- id: number;
324
- locale: string;
325
- language: string;
326
- path: string;
327
- label: string;
328
- isDefault: boolean;
329
- home: string;
330
- domain: {
331
- id: number;
332
- url: string;
333
- slug: string;
334
- };
335
- }>;
336
- smallAvatar: string;
337
- theme: string;
338
- thumbnail: string;
339
- timezone: TimeZone;
340
- translations?: Record<string, unknown>;
341
- }
342
- type FetchPriority = "auto" | "high" | "low";
343
- type ImageCropType = "cover" | "contain" | "fill" | "inside" | "outside";
344
- type ImageDecoding = "auto" | "sync" | "async";
345
- type ImageFormats = "avif" | "webp" | "jpeg" | "jpg" | "png" | "gif";
346
- type ImageLoading = "lazy" | "eager";
347
- type ImageTransform = "grayscale" | "flip" | "flop" | "blur";
348
- type QueriedDataOf<ContentType> = Array<{
349
- structuredData?: ContentType extends {
350
- contentTypeName: unknown;
351
- } ? ContentType["contentTypeName"] : never;
352
- content?: Omit<ContentType, "contentTypeName">;
353
- relatedPage?: {
354
- pageId: number;
355
- url?: string;
356
- origin?: string;
357
- availableSites?: Array<{
358
- id?: number;
359
- name?: string;
360
- }>;
361
- editable?: boolean;
362
- manuallyImported?: boolean;
363
- originalPageId?: number;
364
- originalStructuredDataId?: number;
365
- };
366
- relatedSite?: number;
367
- modified?: string;
368
- published?: string;
369
- }>;
370
- type QueriedData<ContentType> = QueriedDataOf<ContentType>;
371
- type BackgroundImageSizesProps = {
372
- breakpoint: string;
373
- width?: string;
374
- height?: string;
375
- quality?: number;
376
- };
377
- type ImagePosition = "top" | "right top" | "right" | "right bottom" | "bottom" | "left bottom" | "left" | "left top" | "entropy" | "attention";
378
- interface GriddoCoreComponentProps {
379
- component: string;
380
- libComponents: {
381
- [key: string]: unknown;
382
- };
383
- }
384
- type TimeZone = "" | "Pacific/Pago_Pago" | "Pacific/Honolulu" | "America/Los_Angeles" | "America/Tijuana" | "America/Denver" | "America/Phoenix" | "America/Mazatlan" | "America/Chicago" | "America/Mexico_City" | "America/Regina" | "America/Guatemala" | "America/Bogota" | "America/New_York" | "America/Lima" | "America/Caracas" | "America/Halifax" | "America/Guyana" | "America/La_Paz" | "America/Argentina/Buenos_Aires" | "America/Godthab" | "America/Montevideo" | "America/St_Johns" | "America/Santiago" | "America/Sao_Paulo" | "Atlantic/South_Georgia" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Casablanca" | "Europe/Dublin" | "Europe/Lisbon" | "Europe/London" | "Africa/Monrovia" | "Africa/Algiers" | "Europe/Amsterdam" | "Europe/Berlin" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Belgrade" | "Europe/Prague" | "Europe/Copenhagen" | "Europe/Madrid" | "Europe/Paris" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Athens" | "Europe/Bucharest" | "Africa/Cairo" | "Asia/Jerusalem" | "Africa/Johannesburg" | "Europe/Helsinki" | "Europe/Kiev" | "Europe/Kaliningrad" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Vilnius" | "Europe/Istanbul" | "Asia/Baghdad" | "Africa/Nairobi" | "Europe/Minsk" | "Asia/Riyadh" | "Europe/Moscow" | "Asia/Tehran" | "Asia/Baku" | "Europe/Samara" | "Asia/Tbilisi" | "Asia/Yerevan" | "Asia/Kabul" | "Asia/Karachi" | "Asia/Yekaterinburg" | "Asia/Tashkent" | "Asia/Colombo" | "Asia/Almaty" | "Asia/Dhaka" | "Asia/Rangoon" | "Asia/Bangkok" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Shanghai" | "Asia/Hong_Kong" | "Asia/Kuala_Lumpur" | "Asia/Irkutsk" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Asia/Yakutsk" | "Asia/Seoul" | "Asia/Tokyo" | "Australia/Darwin" | "Australia/Brisbane" | "Pacific/Guam" | "Asia/Magadan" | "Asia/Vladivostok" | "Pacific/Port_Moresby" | "Australia/Adelaide" | "Australia/Hobart" | "Australia/Sydney" | "Pacific/Guadalcanal" | "Pacific/Noumea" | "Pacific/Majuro" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Tongatapu" | "Pacific/Apia";
385
- interface Module {
386
- component: string;
387
- [key: string]: unknown;
388
- }
389
- type UseListItem<T> = Omit<T, "contentTypeName"> & {
390
- id: number;
391
- };
392
- type UseListState<Item> = {
393
- isError: {
394
- code: number;
395
- message: string;
396
- };
397
- isLoading: boolean;
398
- msg: {
399
- code: number;
400
- msg: string;
401
- };
402
- query?: {
403
- page: number;
404
- totalItems: number;
405
- items: Array<UseListItem<Item>>;
406
- };
407
- };
408
- interface UseListSetStateAction<ContentType> {
409
- data: ReferenceField<ContentType>;
410
- items?: number;
411
- page?: number;
412
- filterIds?: Array<number>;
413
- /** String array of the keys/properties you want the query restrict to.
414
- * @example
415
- * fields: ['title', 'image']
416
- */
417
- fields?: Array<keyof Omit<ContentType, "contentTypeName">>;
418
- }
419
- }
@@ -1,7 +0,0 @@
1
- export * as UIFields from "./schema-functions/fields/ui-fields";
2
- export * as PureDataFields from "./schema-functions/fields/pure-data-fields";
3
- export * as SimpleContentTypeFields from "./schema-functions/fields/pure-data-fields";
4
- export * as SimpleCTFields from "./schema-functions/fields/pure-data-fields";
5
- export * as PageDataFields from "./schema-functions/fields/page-data-fields";
6
- export * as PageContentTypeFields from "./schema-functions/fields/page-data-fields";
7
- export * as PageCTFields from "./schema-functions/fields/page-data-fields";
@@ -1,13 +0,0 @@
1
- import { DataPacks } from "./props";
2
- import { BaseDataSchema } from "./base";
3
- export interface CategoriesSchema extends BaseDataSchema, Required<DataPacks> {
4
- /** Indicates that it is a category, must always be `true` */
5
- taxonomy: true;
6
- /** It is not necessary to indicate `fromPage` in the categories as they must
7
- * always be `false`.
8
- * @deprecated */
9
- fromPage?: false;
10
- /** It is not necessary to indicate `schema` in the categories.
11
- * @deprecated */
12
- schema?: never;
13
- }
@@ -1,11 +0,0 @@
1
- export interface DamDefaultsSchema {
2
- /** Quality compression for the jpeg, webp and avif formats */
3
- quality?: number;
4
- /** Kind of crop of Griddo DAM */
5
- crop?: "cover" | "contain" | "fill" | "inside" | "outside";
6
- loading?: "eager" | "lazy";
7
- decoding?: "auto" | "async" | "sync";
8
- formats?: Array<"webp" | "avif">;
9
- blurSize?: string;
10
- blurCSSTransition?: string;
11
- }
@@ -1,4 +0,0 @@
1
- export interface DataPackCategoriesSchema {
2
- /** Data Packs Category Title */
3
- title: string;
4
- }
@@ -1,8 +0,0 @@
1
- export interface LanguagesSchema {
2
- [key: string]: {
3
- /** Internal name for API */
4
- name: string;
5
- /** Name that appears in the Griddo editor. */
6
- label: string;
7
- };
8
- }
@@ -1,6 +0,0 @@
1
- export interface ModuleCategoryEntry {
2
- featured?: boolean;
3
- label: string;
4
- value: string;
5
- }
6
- export declare type ModuleCategoriesSchema = Array<ModuleCategoryEntry>;
@@ -1,20 +0,0 @@
1
- import { SearchFrom } from "../fields/props";
2
- import { PageDataFieldsSchema } from "../fields/page-data-fields";
3
- import { DataPacks, ExpirationData } from "./props";
4
- import { BaseDataSchema } from "./base";
5
- declare type PageDataSchemaProp = SearchFrom & {
6
- /** The name of the Reacttemplates to use with the page type Schema. */
7
- templates: Array<string>;
8
- /** An array of Griddo fields. */
9
- fields: Array<PageDataFieldsSchema>;
10
- };
11
- export interface PageDataSchema extends BaseDataSchema, DataPacks, ExpirationData {
12
- /** It is not necessary to specify the `taxonomy` prop because it will always
13
- * be `false`. @deprecated */
14
- taxonomy?: false;
15
- /** Always mus be true to indicate that is page Content Type */
16
- fromPage: true;
17
- /** Schema for data. */
18
- schema: PageDataSchemaProp | null;
19
- }
20
- export {};
@@ -1,14 +0,0 @@
1
- import { SearchFrom } from "../fields/props";
2
- import { PureDataFieldsSchema } from "../fields/pure-data-fields";
3
- import { DataPacks, ExpirationData } from "./props";
4
- import { BaseDataSchema } from "./base";
5
- declare type PureDataSchemaProp = SearchFrom & {
6
- /** An array of Griddo fields. */
7
- fields: Array<PureDataFieldsSchema>;
8
- };
9
- export interface PureDataSchema extends BaseDataSchema, DataPacks, ExpirationData {
10
- /** Always mus be false to indicate that is simple Content Type */
11
- fromPage: false;
12
- schema: PureDataSchemaProp;
13
- }
14
- export {};
@@ -1,11 +0,0 @@
1
- export interface ThemeEntry {
2
- /** Text with which the theme will be shown in the selector */
3
- label: string;
4
- /** Value equivalent to the id of the theme within the instance. */
5
- value: string;
6
- /** Indicates if it is the default theme to be used for example in the global
7
- * data pages (since these do not have a default site assigned and therefore
8
- * do not have a theme) */
9
- default?: boolean;
10
- }
11
- export declare type ThemesSchema = Array<ThemeEntry>;
@@ -1,3 +0,0 @@
1
- export interface TranslationsSchema {
2
- [key: string]: unknown;
3
- }
@@ -1,47 +0,0 @@
1
- import { UIFieldsSchema } from "../fields/ui-fields";
2
- import { BaseUISchema } from "./base";
3
- import { ConfigTabs, Dimension } from "./props";
4
- interface ComponentAndModuleBase extends BaseUISchema {
5
- /** Array of objects that represent each of the tabs of the component, module
6
- * or template in the Griddo editor where the form fields for data entry will
7
- * be displayed. */
8
- configTabs: Array<ConfigTabs>;
9
- /** Object to set default values of schema keys. */
10
- default: {
11
- /** Component or module name of this schema */
12
- component: string;
13
- [key: string]: unknown;
14
- };
15
- }
16
- interface Component extends ComponentAndModuleBase {
17
- schemaType: "component";
18
- }
19
- interface Module extends ComponentAndModuleBase {
20
- schemaType: "module";
21
- }
22
- interface Template extends BaseUISchema {
23
- /** Template Schema */
24
- schemaType: "template";
25
- /** Indicates the type of Schema for the template: List, Detail, 404, etc.... */
26
- type: {
27
- label: string;
28
- value: string;
29
- mode?: "list" | "detail";
30
- special?: "404" | "sitemap";
31
- };
32
- /** Array of key-values that are bound to a page and used to be sent to the
33
- * dataLayer (Analytics) when the page loads. */
34
- dimensions?: Array<Dimension>;
35
- /** Array of fields for the content tab */
36
- content?: Array<UIFieldsSchema>;
37
- /** Array of fields for the config tab */
38
- config?: Array<UIFieldsSchema>;
39
- /** Object to set default values of schema keys. */
40
- default: {
41
- /** Name of the template of this schema */
42
- templateType: string;
43
- [key: string]: unknown;
44
- };
45
- }
46
- export declare type UISchema = Component | Module | Template;
47
- export {};
@@ -1,14 +0,0 @@
1
- import { CategoriesSchema } from "./CategoriesSchema";
2
- import { DamDefaultsSchema } from "./DamDefaultsSchema";
3
- import { DataPackCategoriesSchema } from "./DataPackCategoriesSchema";
4
- import { DataPackSchema } from "./DataPackSchema";
5
- import { LanguagesSchema } from "./LanguagesSchema";
6
- import { MenuSchema } from "./MenuSchema";
7
- import { ModuleCategoriesSchema } from "./ModuleCategoriesSchema";
8
- import { PageDataSchema } from "./PageDataSchema";
9
- import { PureDataSchema } from "./PureDataSchema";
10
- import { ThemesSchema } from "./ThemesSchema";
11
- import { TranslationsSchema } from "./TranslationsSchema";
12
- import { UISchema } from "./UISchema";
13
- import { HeaderFooterSchema } from "./HeaderFooterSchema";
14
- export { CategoriesSchema as Categories, DamDefaultsSchema as DamDefaults, DataPackCategoriesSchema as DataPackCategories, DataPackSchema as DataPack, LanguagesSchema as Languages, MenuSchema as Menu, ModuleCategoriesSchema as ModuleCategories, PageDataSchema as PageData, PureDataSchema as PureData, ThemesSchema as Themes, TranslationsSchema as Translations, UISchema as UI, HeaderFooterSchema as HeaderFooter, };
@@ -1,57 +0,0 @@
1
- /**
2
- * This file contains
3
- * - Theme types
4
- */
5
- export declare module Theme {
6
- interface Primitive {
7
- /** Unique primitive group id */
8
- id: string;
9
- /** Name for the primitive group */
10
- name: string;
11
- /** Description for the primitive group */
12
- description?: string;
13
- /** CSS values for the primitive group */
14
- values: Array<{
15
- /** Name for the primitive */
16
- name?: string;
17
- /** Name for the css variable for the primitive */
18
- cssVar: string;
19
- /** CSS value for the primitive */
20
- value: string;
21
- }>;
22
- }
23
- type PrimitivesObj = {
24
- common?: Array<Primitive>;
25
- light: Array<Primitive>;
26
- dark: Array<Primitive>;
27
- };
28
- type Primitives = Array<Primitive> | PrimitivesObj;
29
- interface BaseTheme {
30
- /** Unique theme id */
31
- id: string;
32
- /** Theme name */
33
- name: string;
34
- /** CSS selector that will encompass the theme css variables */
35
- selector: string;
36
- /** Theme description */
37
- description?: string;
38
- /** Theme primitives */
39
- primitives: Primitives;
40
- }
41
- interface GlobalTheme extends BaseTheme {
42
- /** Custom media queries using css vars (custom properties) */
43
- customMedia?: {
44
- [key: string]: string;
45
- };
46
- }
47
- interface Theme extends BaseTheme {
48
- /** Subthemes */
49
- subthemes?: Array<BaseTheme>;
50
- }
51
- interface GriddoTheme {
52
- /** Global theme entry */
53
- global: GlobalTheme;
54
- /** Instance themes array */
55
- themes: Array<Theme>;
56
- }
57
- }