@griddo/core 1.75.155 → 1.75.157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autotypes.cjs.js +1 -1
- package/dist/autotypes.cjs.js.map +1 -1
- package/dist/autotypes.js +1 -1
- package/dist/autotypes.js.map +1 -1
- package/dist/components/GriddoImage/index.d.ts +2 -2
- package/dist/components/GriddoLink/index.d.ts +1 -1
- package/dist/components/Preview/index.d.ts +1 -1
- package/dist/contexts/Page/index.d.ts +2 -2
- package/dist/contexts/Session/index.d.ts +1 -1
- package/dist/functions/autotypes/types.d.ts +6 -6
- package/dist/functions/autotypes/utils.d.ts +1 -1
- package/dist/functions/image-utils.d.ts +1 -1
- package/dist/functions/utils.d.ts +1 -1
- package/dist/hooks/themes/types.d.ts +4 -4
- package/dist/hooks/useDataFilters.d.ts +3 -3
- package/dist/hooks/useFetch.d.ts +1 -1
- package/dist/hooks/useGriddoImage.d.ts +1 -1
- package/dist/hooks/useI18n.d.ts +1 -1
- package/dist/hooks/useImage.d.ts +3 -3
- package/dist/hooks/useList.d.ts +3 -3
- package/dist/hooks/useScript.d.ts +1 -1
- package/dist/hooks/useSite.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/api-response-fields/index.d.ts +42 -42
- package/dist/types/core/index.d.ts +16 -16
- package/dist/types/global.d.ts +5 -5
- package/dist/types/schema-fields/base.d.ts +5 -5
- package/dist/types/schema-fields/page-content-type-fields.d.ts +33 -33
- package/dist/types/schema-fields/props.d.ts +24 -24
- package/dist/types/schema-fields/simple-content-type-fields.d.ts +31 -31
- package/dist/types/schema-fields/ui-fields.d.ts +33 -33
- package/dist/types/schemas/HeaderFooter.d.ts +2 -2
- package/dist/types/schemas/Languages.d.ts +1 -1
- package/dist/types/schemas/Menu.d.ts +1 -1
- package/dist/types/schemas/ModuleCategories.d.ts +1 -1
- package/dist/types/schemas/PageContentType.d.ts +1 -1
- package/dist/types/schemas/SimpleContentType.d.ts +1 -1
- package/dist/types/schemas/Themes.d.ts +1 -1
- package/dist/types/schemas/Translations.d.ts +1 -1
- package/dist/types/schemas/base.d.ts +1 -1
- package/dist/types/schemas/props.d.ts +2 -2
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/utilities.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,35 +1,35 @@
|
|
|
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 { WithHelpText, WithHideable, WithIsMockup, WithPlaceHolder, WithPrefix, WithReadonly, WithRelations_AutoTypes, WithSlugTo, WithValidators, WithWhiteList } from "./props";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
3
|
+
export type Common = WithHelpText & WithHideable;
|
|
4
|
+
export type ArrayFieldGroup = BaseArrayFieldGroup<UIFields> & Common;
|
|
5
|
+
export type AsyncCheckGroup = BaseAsyncCheckGroup & Common;
|
|
6
|
+
export type AsyncSelect = BaseAsyncSelect & Common & WithPlaceHolder;
|
|
7
|
+
export type CheckGroup = BaseCheckGroup & Common;
|
|
8
|
+
export type ColorPicker = BaseColorPicker & Common;
|
|
9
|
+
export type ComponentArray<WhiteListElements = unknown> = BaseComponentArray & WithWhiteList<WhiteListElements> & Common;
|
|
10
|
+
export type ComponentContainer<WhiteListElements = unknown> = BaseComponentContainer & WithWhiteList<WhiteListElements> & Common;
|
|
11
|
+
export type ConditionalField = BaseConditionalField<UIFields> & Common;
|
|
12
|
+
export type DateField = BaseDateField & WithValidators & Common & WithPlaceHolder;
|
|
13
|
+
export type FieldGroup = BaseFieldGroup<UIFields> & Common;
|
|
14
|
+
export type FieldsDivider = BaseFieldsDivider & Common;
|
|
15
|
+
export type FileField = BaseFileField & Common & WithPlaceHolder;
|
|
16
|
+
export type HeadingField = BaseHeadingField & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
17
|
+
export type ImageField = BaseImageField & WithIsMockup & Common;
|
|
18
|
+
export type LinkField<WhiteListElements = unknown> = BaseLinkField & WithWhiteList<WhiteListElements> & Common;
|
|
19
|
+
export type MultiCheckSelect = BaseMultiCheckSelect & WithRelations_AutoTypes & Common;
|
|
20
|
+
export type MultiCheckSelectGroup = BaseMultiCheckSelectGroup & WithRelations_AutoTypes & Common;
|
|
21
|
+
export type NoteField = BaseNoteField & Common;
|
|
22
|
+
export type NumberField = BaseNumberField & WithValidators & Common;
|
|
23
|
+
export type RadioGroup = BaseRadioGroup & Common;
|
|
24
|
+
export type ReferenceField = BaseReferenceField & Common;
|
|
25
|
+
export type RichText = BaseRichText & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
26
|
+
export type Select = BaseSelect & WithValidators & Common & WithPlaceHolder;
|
|
27
|
+
export type SliderField = BaseSliderField & WithValidators & Common;
|
|
28
|
+
export type TextArea = BaseTextArea & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
29
|
+
export type TextField = BaseTextField & WithIsMockup & WithValidators & WithReadonly & WithSlugTo & WithPrefix & WithPlaceHolder & Common;
|
|
30
|
+
export type ToggleField = BaseToggleField & Common;
|
|
31
|
+
export type UniqueCheck = BaseUniqueCheck & Common;
|
|
32
|
+
export type UrlField = BaseUrlField & WithValidators & Common & WithPlaceHolder;
|
|
33
|
+
export type VisualUniqueSelection = BaseVisualUniqueSelection & Common;
|
|
34
|
+
export type Wysiwyg = BaseWysiwyg & WithIsMockup & WithValidators & Common & WithPlaceHolder;
|
|
35
|
+
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 | ToggleField | UniqueCheck | UrlField | VisualUniqueSelection | Wysiwyg;
|
|
@@ -26,9 +26,9 @@ export interface HeaderFooter<WhiteListElements = unknown> {
|
|
|
26
26
|
[key: string]: Thumbnails;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type Header<WhiteListElements = unknown> = HeaderFooter<WhiteListElements> & {
|
|
30
30
|
type: "header";
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type Footer<WhiteListElements = unknown> = HeaderFooter<WhiteListElements> & {
|
|
33
33
|
type: "footer";
|
|
34
34
|
};
|
|
@@ -7,5 +7,5 @@ interface LanguageEntry {
|
|
|
7
7
|
/** Alias for the locale in case you need to modify it. */
|
|
8
8
|
alias?: Array<Locale>;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type Languages = Partial<Record<Locale, LanguageEntry>>;
|
|
11
11
|
export {};
|
|
@@ -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
|
-
|
|
5
|
+
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. */
|
|
@@ -2,7 +2,7 @@ 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
|
-
|
|
5
|
+
type SimpleContentTypeProp<WhitelistElements> = SearchFrom & {
|
|
6
6
|
/** An array of Griddo fields. */
|
|
7
7
|
fields: [
|
|
8
8
|
TextField & WithSearchable & {
|
|
@@ -6,4 +6,4 @@ export interface ThemeEntry {
|
|
|
6
6
|
/** Indicates if it is the default theme to be used for example in the global data pages (since these do not have a default site assigned and therefore do not have a theme). */
|
|
7
7
|
default?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type Themes = Array<ThemeEntry>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LocaleTranslations } from "../core";
|
|
2
|
-
export
|
|
2
|
+
export type Translations = LocaleTranslations;
|
|
@@ -29,7 +29,7 @@ interface BaseContentType extends _AutoTypes {
|
|
|
29
29
|
/** Field default values. */
|
|
30
30
|
defaultValues?: unknown;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
type BaseSectionList = Record<string, Array<string>>;
|
|
33
33
|
interface BaseUI<SectionList = BaseSectionList> extends DataPacks, _AutoTypes {
|
|
34
34
|
/** Sets the schema type. For internal use. */
|
|
35
35
|
schemaType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UIFields } from "../schema-fields/ui-fields";
|
|
2
|
-
|
|
2
|
+
type DataPacks = {
|
|
3
3
|
/** Sets the Data Packs to which this schema belongs. */
|
|
4
4
|
dataPacks?: Array<string> | null;
|
|
5
5
|
};
|
|
@@ -17,7 +17,7 @@ interface ExpirationData {
|
|
|
17
17
|
/** Specifies the offset in days to apply to the expirationDateField value. */
|
|
18
18
|
expirationDateOffset?: number;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type Thumbnails = {
|
|
21
21
|
/** Thumbnail for 1x density screens. */
|
|
22
22
|
"1x"?: unknown;
|
|
23
23
|
/** Thumbnail for 2x density screens. */
|
|
@@ -15,12 +15,12 @@ export interface Primitive {
|
|
|
15
15
|
value: string;
|
|
16
16
|
}>;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type PrimitivesObj = {
|
|
19
19
|
common?: Array<Primitive>;
|
|
20
20
|
light: Array<Primitive>;
|
|
21
21
|
dark: Array<Primitive>;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type Primitives = Array<Primitive> | PrimitivesObj;
|
|
24
24
|
export interface BaseTheme {
|
|
25
25
|
/** Unique theme id */
|
|
26
26
|
id: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type NonEmptyArray<T> = [T, ...T[]];
|
|
2
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
|
|
3
|
+
export type PartiallyRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
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.
|
|
5
|
+
"version": "1.75.157",
|
|
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": "
|
|
81
|
+
"gitHead": "91898dc56560e90731dcba47458d225558440b5f"
|
|
82
82
|
}
|